{"version":3,"sources":["../../src/contacts-v4-attachment-attachments.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const GenerateAttachmentUploadUrlRequest = z.object({\n  contactId: z\n    .string()\n    .describe('ID of the contact for whom the attachment is being uploaded.')\n    .regex(\n      /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n      'Must be a valid GUID'\n    ),\n  fileName: z\n    .string()\n    .describe(\n      'File name of the attachment including the extension, for example, `contact-cv.pdf`.'\n    )\n    .min(1)\n    .max(260),\n  options: z.object({\n    mimeType: z\n      .string()\n      .describe(\n        'Mime type of the attachment file, for example, `application/pdf`.\\nSee [supported mime types](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/attachments/attachment-v4/supported-mime-types).'\n      )\n      .min(1)\n      .max(255),\n  }),\n});\nexport const GenerateAttachmentUploadUrlResponse = z.object({\n  uploadUrl: z\n    .string()\n    .describe('The URL for uploading a file as an attachment to the contact.')\n    .url()\n    .optional(),\n});\nexport const ListAttachmentsRequest = z.object({\n  contactId: z\n    .string()\n    .describe('Contact ID for the attachments to be listed.')\n    .regex(\n      /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n      'Must be a valid GUID'\n    ),\n  options: z\n    .object({\n      paging: z\n        .object({\n          limit: z\n            .number()\n            .int()\n            .describe(\n              'Number of items to return.\\n\\nDefault: `100`\\nMax: `100`'\n            )\n            .min(0)\n            .max(100)\n            .optional()\n            .nullable(),\n          offset: z\n            .number()\n            .int()\n            .describe('Number of items to skip in the current sort order.')\n            .min(0)\n            .optional()\n            .nullable(),\n        })\n        .describe('Allow paginating, default: limit = 100 and offset = 0')\n        .optional(),\n    })\n    .optional(),\n});\nexport const ListAttachmentsResponse = z.object({\n  attachments: z\n    .array(\n      z.intersection(\n        z.object({\n          _id: z\n            .string()\n            .describe('Attachment ID.')\n            .regex(\n              /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n              'Must be a valid GUID'\n            )\n            .optional(),\n          previewImage: z\n            .string()\n            .describe(\n              'Details of the preview image reduced size when the attachment is of type `IMAGE`.'\n            )\n            .optional(),\n          fileName: z\n            .string()\n            .describe('Name of the attachment file.')\n            .optional(),\n          mimeType: z\n            .string()\n            .describe(\n              'Mime type of the attachment. See [supported mime types](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/attachments/attachment-v4/supported-mime-types).'\n            )\n            .optional(),\n          attachmentType: z\n            .enum(['UNKNOWN', 'IMAGE', 'OTHER'])\n            .describe('Type of the attachment.')\n            .optional(),\n        }),\n        z.xor([\n          z.object({\n            image: z.never().optional(),\n            document: z.never().optional(),\n          }),\n          z.object({\n            document: z.never().optional(),\n            image: z\n              .string()\n              .describe('Image details when the attachment type is `IMAGE`.'),\n          }),\n          z.object({\n            image: z.never().optional(),\n            document: z\n              .string()\n              .describe(\n                'Document details when the attachment type is `OTHER`.'\n              ),\n          }),\n        ])\n      )\n    )\n    .optional(),\n  metadata: z\n    .object({\n      count: z\n        .number()\n        .int()\n        .describe('Number of items returned in the response.')\n        .optional()\n        .nullable(),\n      offset: z\n        .number()\n        .int()\n        .describe('Offset that was requested.')\n        .optional()\n        .nullable(),\n      total: z\n        .number()\n        .int()\n        .describe('Total number of items that match the query.')\n        .optional()\n        .nullable(),\n      tooManyToCount: z\n        .boolean()\n        .describe('Whether the server failed to calculate the `total` field.')\n        .optional()\n        .nullable(),\n    })\n    .describe('Metadata for the paginated results.')\n    .optional(),\n});\nexport const DeleteAttachmentRequest = z.object({\n  identifiers: z.object({\n    contactId: z\n      .string()\n      .describe('Contact ID for the attachment to delete.')\n      .regex(\n        /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n        'Must be a valid GUID'\n      ),\n    attachmentId: z\n      .string()\n      .describe('Attachment ID to delete.')\n      .regex(\n        /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n        'Must be a valid GUID'\n      ),\n  }),\n});\nexport const DeleteAttachmentResponse = z.object({});\nexport const GetAttachmentRequest = z.object({\n  identifiers: z.object({\n    contactId: z\n      .string()\n      .describe('Contact ID for the attachment to retrieve.')\n      .regex(\n        /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n        'Must be a valid GUID'\n      ),\n    attachmentId: z\n      .string()\n      .describe('Attachment ID to retrieve.')\n      .regex(\n        /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n        'Must be a valid GUID'\n      ),\n  }),\n});\nexport const GetAttachmentResponse = z.intersection(\n  z.object({\n    _id: z\n      .string()\n      .describe('Attachment ID.')\n      .regex(\n        /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n        'Must be a valid GUID'\n      )\n      .optional(),\n    previewImage: z\n      .string()\n      .describe(\n        'Details of the preview image reduced size when the attachment is of type `IMAGE`.'\n      )\n      .optional(),\n    fileName: z.string().describe('Name of the attachment file.').optional(),\n    mimeType: z\n      .string()\n      .describe(\n        'Mime type of the attachment. See [supported mime types](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/attachments/attachment-v4/supported-mime-types).'\n      )\n      .optional(),\n    attachmentType: z\n      .enum(['UNKNOWN', 'IMAGE', 'OTHER'])\n      .describe('Type of the attachment.')\n      .optional(),\n  }),\n  z.xor([\n    z.object({ image: z.never().optional(), document: z.never().optional() }),\n    z.object({\n      document: z.never().optional(),\n      image: z\n        .string()\n        .describe('Image details when the attachment type is `IMAGE`.'),\n    }),\n    z.object({\n      image: z.never().optional(),\n      document: z\n        .string()\n        .describe('Document details when the attachment type is `OTHER`.'),\n    }),\n  ])\n);\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,qCAAuC,SAAO;AAAA,EACzD,WACG,SAAO,EACP,SAAS,8DAA8D,EACvE;AAAA,IACC;AAAA,IACA;AAAA,EACF;AAAA,EACF,UACG,SAAO,EACP;AAAA,IACC;AAAA,EACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG;AAAA,EACV,SAAW,SAAO;AAAA,IAChB,UACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG;AAAA,EACZ,CAAC;AACH,CAAC;AACM,IAAM,sCAAwC,SAAO;AAAA,EAC1D,WACG,SAAO,EACP,SAAS,+DAA+D,EACxE,IAAI,EACJ,SAAS;AACd,CAAC;AACM,IAAM,yBAA2B,SAAO;AAAA,EAC7C,WACG,SAAO,EACP,SAAS,8CAA8C,EACvD;AAAA,IACC;AAAA,IACA;AAAA,EACF;AAAA,EACF,SACG,SAAO;AAAA,IACN,QACG,SAAO;AAAA,MACN,OACG,SAAO,EACP,IAAI,EACJ;AAAA,QACC;AAAA,MACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS,EACT,SAAS;AAAA,MACZ,QACG,SAAO,EACP,IAAI,EACJ,SAAS,oDAAoD,EAC7D,IAAI,CAAC,EACL,SAAS,EACT,SAAS;AAAA,IACd,CAAC,EACA,SAAS,uDAAuD,EAChE,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,0BAA4B,SAAO;AAAA,EAC9C,aACG;AAAA,IACG;AAAA,MACE,SAAO;AAAA,QACP,KACG,SAAO,EACP,SAAS,gBAAgB,EACzB;AAAA,UACC;AAAA,UACA;AAAA,QACF,EACC,SAAS;AAAA,QACZ,cACG,SAAO,E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