{"version":3,"sources":["../../src/contacts-v4-attachment-attachments.http.ts","../../src/contacts-v4-attachment-attachments.types.ts","../../src/contacts-v4-attachment-attachments.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressContactsAttachmentsV4ContactAttachmentsServiceV4Url(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/contacts-attachments-app',\n        destPath: '',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/contacts/v4/attachments',\n        destPath: '/v4/attachments',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/contacts/v4/attachments',\n        destPath: '/v4/attachments',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/contacts/v4/attachments',\n        destPath: '/v4/attachments',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/contacts/v4/attachments',\n        destPath: '/v4/attachments',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/contacts/v4/attachments',\n        destPath: '/v4/attachments',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/contacts/v4/attachments',\n        destPath: '/v4/attachments',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/contacts/v4/attachments',\n        destPath: '/v4/attachments',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/contacts/v4/attachments',\n        destPath: '/v4/attachments',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_attachments';\n\n/**\n * Generates an upload URL for uploading a file as an attachment to a specified contact.\n *\n * To learn how to use the generated upload URL in the response to upload an attachment file,\n * see the [Upload API](https://dev.wix.com/docs/rest/assets/media/media-manager/files/upload-api).\n */\nexport function generateAttachmentUploadUrl(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __generateAttachmentUploadUrl({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.contacts.v4.attachment',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.contacts.attachments.v4.ContactAttachmentsServiceV4.GenerateAttachmentUploadUrl',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressContactsAttachmentsV4ContactAttachmentsServiceV4Url(\n        {\n          protoPath: '/v4/attachments/{contactId}/upload-url',\n          data: payload,\n          host,\n        }\n      ),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __generateAttachmentUploadUrl;\n}\n\n/** Retrieves a list of attachments associated with a specified contact. */\nexport function listAttachments(payload: object): RequestOptionsFactory<any> {\n  function __listAttachments({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.contacts.v4.attachment',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.contacts.attachments.v4.ContactAttachmentsServiceV4.ListAttachments',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressContactsAttachmentsV4ContactAttachmentsServiceV4Url(\n        { protoPath: '/v4/attachments/{contactId}', data: payload, host }\n      ),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'attachments.image.urlExpirationDate' },\n              { path: 'attachments.document.urlExpirationDate' },\n              { path: 'attachments.previewImage.urlExpirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __listAttachments;\n}\n\n/** Deletes the specified attachment from the specified contact. */\nexport function deleteAttachment(payload: object): RequestOptionsFactory<any> {\n  function __deleteAttachment({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.contacts.v4.attachment',\n      method: 'DELETE' as any,\n      methodFqn:\n        'com.wixpress.contacts.attachments.v4.ContactAttachmentsServiceV4.DeleteAttachment',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressContactsAttachmentsV4ContactAttachmentsServiceV4Url(\n        {\n          protoPath: '/v4/attachments/{contactId}/{attachmentId}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __deleteAttachment;\n}\n\n/** Retrieves the specified attachment for the specified contact. */\nexport function getAttachment(payload: object): RequestOptionsFactory<any> {\n  function __getAttachment({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.contacts.v4.attachment',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.contacts.attachments.v4.ContactAttachmentsServiceV4.GetAttachment',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressContactsAttachmentsV4ContactAttachmentsServiceV4Url(\n        {\n          protoPath: '/v4/attachments/{contactId}/{attachmentId}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'attachment.image.urlExpirationDate' },\n              { path: 'attachment.document.urlExpirationDate' },\n              { path: 'attachment.previewImage.urlExpirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getAttachment;\n}\n","export interface ContactAttachment extends ContactAttachmentMediaOneOf {\n  /** Image details when the attachment type is `IMAGE`. */\n  image?: Image;\n  /** Document details when the attachment type is `OTHER`. */\n  document?: Document;\n  /**\n   * Attachment ID.\n   * @readonly\n   * @format GUID\n   */\n  id?: string;\n  /**\n   * Details of the preview image reduced size when the attachment is of type `IMAGE`.\n   * @readonly\n   */\n  previewImage?: Image;\n  /**\n   * Name of the attachment file.\n   * @readonly\n   */\n  fileName?: string;\n  /**\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   * @readonly\n   */\n  mimeType?: string;\n  /**\n   * Type of the attachment.\n   * @readonly\n   */\n  attachmentType?: AttachmentTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ContactAttachmentMediaOneOf {\n  /** Image details when the attachment type is `IMAGE`. */\n  image?: Image;\n  /** Document details when the attachment type is `OTHER`. */\n  document?: Document;\n}\n\nexport interface Image {\n  /** WixMedia image ID. */\n  id?: string;\n  /** Image URL. */\n  url?: string;\n  /**\n   * Original image height.\n   * @readonly\n   */\n  height?: number;\n  /**\n   * Original image width.\n   * @readonly\n   */\n  width?: number;\n  /** Image alt text. Optional. */\n  altText?: string | null;\n  /**\n   * Image URL expiration date when relevant.\n   * @readonly\n   */\n  urlExpirationDate?: Date | null;\n}\n\nexport interface Document {\n  /** WixMedia ID. */\n  id?: string;\n  /** Document URL. */\n  url?: string;\n  /**\n   * Document URL expiration date when relevant.\n   * @readonly\n   */\n  urlExpirationDate?: Date | null;\n}\n\nexport enum AttachmentType {\n  /** Unknown attachment type. */\n  UNKNOWN = 'UNKNOWN',\n  /** Attachment is an image file. */\n  IMAGE = 'IMAGE',\n  /** Attachment is a document or any non-image file type. */\n  OTHER = 'OTHER',\n}\n\n/** @enumType */\nexport type AttachmentTypeWithLiterals =\n  | AttachmentType\n  | 'UNKNOWN'\n  | 'IMAGE'\n  | 'OTHER';\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entityAsJson?: string;\n  /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n  restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n  bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface CrmAttachmentUploadedEvent {\n  attachment?: CrmAttachment;\n  /** @format GUID */\n  uploadJobId?: string;\n}\n\nexport interface CrmAttachment {\n  /**\n   * @readonly\n   * @format GUID\n   */\n  id?: string | null;\n  revision?: string | null;\n  /** @readonly */\n  createdDate?: Date | null;\n  /** @readonly */\n  updatedDate?: Date | null;\n  /** @readonly */\n  source?: AttachmentSource;\n  metadata?: AttachmentMetadata;\n  media?: AttachmentMedia;\n  /**\n   * Inferred by the media type\n   * @readonly\n   */\n  attachmentType?: CrmAttachmentAttachmentTypeWithLiterals;\n}\n\nexport interface AttachmentSource {\n  appId?: string;\n}\n\nexport interface AttachmentMetadata {\n  /**\n   * Entity type e.g: INVOICES\n   * @minLength 2\n   * @maxLength 50\n   */\n  entityType?: string | null;\n  /**\n   * Id of the entity, e.g: invoice id\n   * @minLength 1\n   * @maxLength 50\n   */\n  entityId?: string | null;\n  /** @format GUID */\n  contactId?: string | null;\n  /**\n   * @minLength 1\n   * @maxLength 50\n   */\n  externalId?: string | null;\n}\n\nexport interface AttachmentMedia extends AttachmentMediaMediaOneOf {\n  image?: CommonImage;\n  document?: CommonDocument;\n  /** @readonly */\n  previewImage?: CommonImage;\n  /** @minLength 1 */\n  fileName?: string;\n  /**\n   * @minLength 1\n   * @maxLength 100\n   */\n  mimeType?: string;\n}\n\n/** @oneof */\nexport interface AttachmentMediaMediaOneOf {\n  image?: CommonImage;\n  document?: CommonDocument;\n}\n\nexport interface CommonImage {\n  /** WixMedia image ID. */\n  id?: string;\n  /**\n   * Image URL.\n   * @format WEB_URL\n   * @readonly\n   */\n  url?: string;\n  /**\n   * Original image height.\n   * @readonly\n   */\n  height?: number;\n  /**\n   * Original image width.\n   * @readonly\n   */\n  width?: number;\n  /** Image alt text. Optional. */\n  altText?: string | null;\n  /**\n   * Image URL expiration date (when relevant). Optional\n   * @readonly\n   */\n  urlExpirationDate?: Date | null;\n}\n\nexport interface CommonDocument {\n  /** WixMedia ID. */\n  id?: string;\n  /**\n   * Document URL.\n   * @readonly\n   */\n  url?: string;\n  /**\n   * Document URL expiration date (when relevant). Optional\n   * @readonly\n   */\n  urlExpirationDate?: Date | null;\n}\n\nexport enum CrmAttachmentAttachmentType {\n  UNKNOWN = 'UNKNOWN',\n  DOCUMENT = 'DOCUMENT',\n  IMAGE = 'IMAGE',\n}\n\n/** @enumType */\nexport type CrmAttachmentAttachmentTypeWithLiterals =\n  | CrmAttachmentAttachmentType\n  | 'UNKNOWN'\n  | 'DOCUMENT'\n  | 'IMAGE';\n\nexport interface CreateDemoAttachmentRequest {\n  /**\n   * The contact id whose demo attachment is being created\n   * @format GUID\n   */\n  contactId?: string;\n  /** The type of the demo contact */\n  demoContactType?: DemoContactTypeWithLiterals;\n}\n\nexport enum DemoContactType {\n  KAT = 'KAT',\n  DAN = 'DAN',\n}\n\n/** @enumType */\nexport type DemoContactTypeWithLiterals = DemoContactType | 'KAT' | 'DAN';\n\nexport interface CreateDemoAttachmentResponse {\n  /** The created attachment */\n  attachment?: ContactAttachment;\n}\n\nexport interface GenerateAttachmentUploadUrlRequest {\n  /**\n   * ID of the contact for whom the attachment is being uploaded.\n   * @format GUID\n   */\n  contactId: string;\n  /**\n   * File name of the attachment including the extension, for example, `contact-cv.pdf`.\n   * @minLength 1\n   * @maxLength 260\n   */\n  fileName: string;\n  /**\n   * Mime type of the attachment file, for example, `application/pdf`.\n   * See [supported mime types](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/attachments/attachment-v4/supported-mime-types).\n   * @minLength 1\n   * @maxLength 255\n   */\n  mimeType: string;\n}\n\nexport interface GenerateAttachmentUploadUrlResponse {\n  /**\n   * The URL for uploading a file as an attachment to the contact.\n   * @format WEB_URL\n   */\n  uploadUrl?: string;\n}\n\nexport interface ListAttachmentsRequest {\n  /**\n   * Contact ID for the attachments to be listed.\n   * @format GUID\n   */\n  contactId: string;\n  /** Allow paginating, default: limit = 100 and offset = 0 */\n  paging?: Paging;\n}\n\nexport interface Paging {\n  /**\n   * Number of items to return.\n   *\n   * Default: `100`\n   * Max: `100`\n   * @max 100\n   */\n  limit?: number | null;\n  /** Number of items to skip in the current sort order. */\n  offset?: number | null;\n}\n\nexport interface ListAttachmentsResponse {\n  /** List of attachments for the specified contact. */\n  attachments?: ContactAttachment[];\n  /** Metadata for the paginated results. */\n  metadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. */\n  total?: number | null;\n  /** Whether the server failed to calculate the `total` field. */\n  tooManyToCount?: boolean | null;\n}\n\nexport interface DeleteAttachmentRequest {\n  /**\n   * Contact ID for the attachment to delete.\n   * @format GUID\n   */\n  contactId: string;\n  /**\n   * Attachment ID to delete.\n   * @format GUID\n   */\n  attachmentId: string;\n}\n\nexport interface DeleteAttachmentResponse {}\n\nexport interface GetAttachmentRequest {\n  /**\n   * Contact ID for the attachment to retrieve.\n   * @format GUID\n   */\n  contactId: string;\n  /**\n   * Attachment ID to retrieve.\n   * @format GUID\n   */\n  attachmentId: string;\n}\n\nexport interface GetAttachmentResponse {\n  /** The requested attachment. */\n  attachment?: ContactAttachment;\n}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n","import * as ambassadorWixContactsV4Attachment from './contacts-v4-attachment-attachments.http.js';\nimport * as ambassadorWixContactsV4AttachmentTypes from './contacts-v4-attachment-attachments.types.js';\nimport * as ambassadorWixContactsV4AttachmentUniversalTypes from './contacts-v4-attachment-attachments.universal.js';\n\nexport type __PublicMethodMetaInfo<\n  K = string,\n  M = unknown,\n  T = unknown,\n  S = unknown,\n  Q = unknown,\n  R = unknown\n> = {\n  getUrl: (context: any) => string;\n  httpMethod: K;\n  path: string;\n  pathParams: M;\n  __requestType: T;\n  __originalRequestType: S;\n  __responseType: Q;\n  __originalResponseType: R;\n};\n\nexport function generateAttachmentUploadUrl(): __PublicMethodMetaInfo<\n  'POST',\n  { contactId: string },\n  ambassadorWixContactsV4AttachmentUniversalTypes.GenerateAttachmentUploadUrlRequest,\n  ambassadorWixContactsV4AttachmentTypes.GenerateAttachmentUploadUrlRequest,\n  ambassadorWixContactsV4AttachmentUniversalTypes.GenerateAttachmentUploadUrlResponse,\n  ambassadorWixContactsV4AttachmentTypes.GenerateAttachmentUploadUrlResponse\n> {\n  const payload = { contactId: ':contactId' } as any;\n\n  const getRequestOptions =\n    ambassadorWixContactsV4Attachment.generateAttachmentUploadUrl(payload);\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'POST',\n    path: '/v4/attachments/{contactId}/upload-url',\n    pathParams: { contactId: 'contactId' },\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport function listAttachments(): __PublicMethodMetaInfo<\n  'GET',\n  { contactId: string },\n  ambassadorWixContactsV4AttachmentUniversalTypes.ListAttachmentsRequest,\n  ambassadorWixContactsV4AttachmentTypes.ListAttachmentsRequest,\n  ambassadorWixContactsV4AttachmentUniversalTypes.ListAttachmentsResponse,\n  ambassadorWixContactsV4AttachmentTypes.ListAttachmentsResponse\n> {\n  const payload = { contactId: ':contactId' } as any;\n\n  const getRequestOptions =\n    ambassadorWixContactsV4Attachment.listAttachments(payload);\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'GET',\n    path: '/v4/attachments/{contactId}',\n    pathParams: { contactId: 'contactId' },\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport function deleteAttachment(): __PublicMethodMetaInfo<\n  'DELETE',\n  { contactId: string; attachmentId: string },\n  ambassadorWixContactsV4AttachmentUniversalTypes.DeleteAttachmentRequest,\n  ambassadorWixContactsV4AttachmentTypes.DeleteAttachmentRequest,\n  ambassadorWixContactsV4AttachmentUniversalTypes.DeleteAttachmentResponse,\n  ambassadorWixContactsV4AttachmentTypes.DeleteAttachmentResponse\n> {\n  const payload = {\n    contactId: ':contactId',\n    attachmentId: ':attachmentId',\n  } as any;\n\n  const getRequestOptions =\n    ambassadorWixContactsV4Attachment.deleteAttachment(payload);\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'DELETE',\n    path: '/v4/attachments/{contactId}/{attachmentId}',\n    pathParams: { contactId: 'contactId', attachmentId: 'attachmentId' },\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport function getAttachment(): __PublicMethodMetaInfo<\n  'GET',\n  { contactId: string; attachmentId: string },\n  ambassadorWixContactsV4AttachmentUniversalTypes.GetAttachmentRequest,\n  ambassadorWixContactsV4AttachmentTypes.GetAttachmentRequest,\n  ambassadorWixContactsV4AttachmentUniversalTypes.GetAttachmentResponse,\n  ambassadorWixContactsV4AttachmentTypes.GetAttachmentResponse\n> {\n  const payload = {\n    contactId: ':contactId',\n    attachmentId: ':attachmentId',\n  } as any;\n\n  const getRequestOptions =\n    ambassadorWixContactsV4Attachment.getAttachment(payload);\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'GET',\n    path: '/v4/attachments/{contactId}/{attachmentId}',\n    pathParams: { contactId: 'contactId', attachmentId: 'attachmentId' },\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport {\n  ContactAttachment as ContactAttachmentOriginal,\n  ContactAttachmentMediaOneOf as ContactAttachmentMediaOneOfOriginal,\n  Image as ImageOriginal,\n  Document as DocumentOriginal,\n  AttachmentType as AttachmentTypeOriginal,\n  AttachmentTypeWithLiterals as AttachmentTypeWithLiteralsOriginal,\n  DomainEvent as DomainEventOriginal,\n  DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n  EntityCreatedEvent as EntityCreatedEventOriginal,\n  RestoreInfo as RestoreInfoOriginal,\n  EntityUpdatedEvent as EntityUpdatedEventOriginal,\n  EntityDeletedEvent as EntityDeletedEventOriginal,\n  ActionEvent as ActionEventOriginal,\n  Empty as EmptyOriginal,\n  CrmAttachmentUploadedEvent as CrmAttachmentUploadedEventOriginal,\n  CrmAttachment as CrmAttachmentOriginal,\n  AttachmentSource as AttachmentSourceOriginal,\n  AttachmentMetadata as AttachmentMetadataOriginal,\n  AttachmentMedia as AttachmentMediaOriginal,\n  AttachmentMediaMediaOneOf as AttachmentMediaMediaOneOfOriginal,\n  CommonImage as CommonImageOriginal,\n  CommonDocument as CommonDocumentOriginal,\n  CrmAttachmentAttachmentType as CrmAttachmentAttachmentTypeOriginal,\n  CrmAttachmentAttachmentTypeWithLiterals as CrmAttachmentAttachmentTypeWithLiteralsOriginal,\n  CreateDemoAttachmentRequest as CreateDemoAttachmentRequestOriginal,\n  DemoContactType as DemoContactTypeOriginal,\n  DemoContactTypeWithLiterals as DemoContactTypeWithLiteralsOriginal,\n  CreateDemoAttachmentResponse as CreateDemoAttachmentResponseOriginal,\n  GenerateAttachmentUploadUrlRequest as GenerateAttachmentUploadUrlRequestOriginal,\n  GenerateAttachmentUploadUrlResponse as GenerateAttachmentUploadUrlResponseOriginal,\n  ListAttachmentsRequest as ListAttachmentsRequestOriginal,\n  Paging as PagingOriginal,\n  ListAttachmentsResponse as ListAttachmentsResponseOriginal,\n  PagingMetadata as PagingMetadataOriginal,\n  DeleteAttachmentRequest as DeleteAttachmentRequestOriginal,\n  DeleteAttachmentResponse as DeleteAttachmentResponseOriginal,\n  GetAttachmentRequest as GetAttachmentRequestOriginal,\n  GetAttachmentResponse as GetAttachmentResponseOriginal,\n  MessageEnvelope as MessageEnvelopeOriginal,\n  IdentificationData as IdentificationDataOriginal,\n  IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n  WebhookIdentityType as WebhookIdentityTypeOriginal,\n  WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n  AccountInfo as AccountInfoOriginal,\n} from './contacts-v4-attachment-attachments.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,sEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;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aAAa,cAAc,eAAe;AAAA,IACnE,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,iBAOd;AACA,QAAM,UAAU;AAAA,IACd,WAAW;AAAA,IACX,cAAc;AAAA,EAChB;AAEA,QAAM,oBAC8B,cAAc,OAAO;AAEzD,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,WAAW,aAAa,cAAc,eAAe;AAAA,IACnE,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","AttachmentType","CrmAttachmentAttachmentType","DemoContactType","WebhookIdentityType","generateAttachmentUploadUrl","listAttachments","deleteAttachment","getAttachment"]}