{"version":3,"file":"deployment.cjs","names":[],"sources":["../../../../src/rest/commands/create/deployment.ts"],"sourcesContent":["import type { DirectusDeployment } from '../../../schema/deployment.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreateDeploymentOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusDeployment<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Create a new deployment provider.\n *\n * @param item The deployment to create\n * @param query Optional return data query\n *\n * @returns Returns the created deployment object.\n */\nexport const createDeployment =\n\t<Schema, const TQuery extends Query<Schema, DirectusDeployment<Schema>>>(\n\t\titem: NestedPartial<DirectusDeployment<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateDeploymentOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/deployments`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(item),\n\t\tmethod: 'POST',\n\t});\n"],"mappings":"AAkBA,MAAa,GAEX,EACA,SAEM,CACN,KAAM,eACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}