{"version":3,"sources":["../../src/platform-v1-wishlist-wishlist.http.ts","../../src/platform-v1-wishlist-wishlist.types.ts","../../src/platform-v1-wishlist-wishlist.meta.ts"],"sourcesContent":["import { 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 resolveComWixpressWishlistWishlistUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'bo._base_domain_': [\n      {\n        srcPath: '/wishlist-server',\n        destPath: '',\n      },\n    ],\n    'wixbo.ai': [\n      {\n        srcPath: '/wishlist-server',\n        destPath: '',\n      },\n    ],\n    'wix-bo.com': [\n      {\n        srcPath: '/wishlist-server',\n        destPath: '',\n      },\n    ],\n    'api._api_base_domain_': [\n      {\n        srcPath: '/wishlist-server',\n        destPath: '',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/wishlist-server',\n        destPath: '',\n      },\n    ],\n    'ecom._base_domain_': [\n      {\n        srcPath: '/_api/wishlist-server',\n        destPath: '',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/wishlist-server',\n        destPath: '/api',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/wishlist-server',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/stores/v1/wishlists',\n        destPath: '/v1/wishlists',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/wishlist-server',\n        destPath: '',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/wishlist-server',\n        destPath: '',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/wishlist-server',\n        destPath: '',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/wishlist-server',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_stores_wishlist';\n\n/** Get wishlist by id */\nexport function getWishlistById(payload: object): RequestOptionsFactory<any> {\n  function __getWishlistById({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.platform.v1.wishlist',\n      method: 'POST' as any,\n      methodFqn: 'com.wixpress.wishlist.Wishlist.GetWishlistById',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressWishlistWishlistUrl({\n        protoPath: '/v1/wishlists/get',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [{ path: 'wishlist.items.dateAdded' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getWishlistById;\n}\n","export interface WishlistData {\n  /**\n   * GUID unique to this list for this site\n   * @format GUID\n   */\n  id?: string | null;\n  /** Member id the list belongs to */\n  ownerId?: string;\n  /**\n   * List of items in the list. Not necessarily the full list (can depends on request data)\n   * @minSize 1\n   * @maxSize 100\n   */\n  items?: WishlistItem[];\n  /**\n   * Total count of items in the list\n   * @min 1\n   * @max 100\n   */\n  totalCount?: number;\n}\n\nexport interface WishlistItem {\n  /** Unique identifier for an item of this type and origin */\n  id?: string;\n  /**\n   * The data the item was save to the list\n   * @readonly\n   */\n  dateAdded?: Date | null;\n  /** The type of the item. For example \"product\" */\n  type?: string;\n  /** The origin of the item. Should be the scope the item type is related to. For example \"wixstores\" */\n  origin?: string;\n}\n\nexport interface ItemsAddedToWishlist {\n  /**\n   * GUID unique to this list for its site\n   * @format GUID\n   */\n  id?: string | null;\n  /** Member id the list belongs to */\n  ownerId?: string;\n  /**\n   * List of items that were added to wishlist\n   * @minSize 1\n   * @maxSize 100\n   */\n  items?: WishlistItem[];\n}\n\nexport interface ItemsRemovedFromWishlist {\n  /**\n   * GUID unique to this list for its site\n   * @format GUID\n   */\n  id?: string | null;\n  /** Member id the list belongs to */\n  ownerId?: string;\n  /**\n   * List of items that were removed from wishlist\n   * @minSize 1\n   * @maxSize 100\n   */\n  items?: WishlistItem[];\n}\n\nexport interface GetWishlistRequest {\n  /**\n   * List length limit. Default is 100\n   * @min 1\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * List starting index offset. Default is 0\n   * @max 100\n   */\n  offset?: number | null;\n  /** Filter requested list by specific kinds of items */\n  kind?: WishlistItemKind[];\n}\n\nexport interface WishlistItemKind {\n  /** The type of the item. For example \"product\" */\n  type?: string;\n  /** The origin of the item. Should be the scope the item type is related to. For example \"wixstores\" */\n  origin?: string;\n}\n\nexport interface GetWishlistResponse {\n  /** Object containing requested list data */\n  wishlist?: WishlistData;\n}\n\nexport interface AddToWishlistRequest {\n  /**\n   * List of items to add to list\n   * @minSize 1\n   * @maxSize 100\n   */\n  items?: WishlistItem[];\n}\n\nexport interface AddToWishlistResponse {}\n\nexport interface RemoveFromWishlistRequest {\n  /**\n   * List of items to remove from list\n   * @minSize 1\n   * @maxSize 100\n   */\n  items?: WishlistItem[];\n}\n\nexport interface RemoveFromWishlistResponse {}\n\nexport interface GetWishlistByIdRequest {\n  /**\n   * Unique identifier representing requested list\n   * @format GUID\n   */\n  id: string;\n  /**\n   * List length limit. Default is 100\n   * @min 1\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * List starting index offset. Default is 0\n   * @max 100\n   */\n  offset?: number | null;\n  /** Filter requested list by specific kinds of items */\n  kind?: WishlistItemKind[];\n}\n\nexport interface GetWishlistByIdResponse {\n  /** Object containing requested list data */\n  wishlist?: WishlistData;\n}\n\nexport interface GetWishlistsRequest {\n  /**\n   * List length limit. Default is 100\n   * @min 1\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * List starting index offset. Default is 0\n   * @max 100\n   */\n  offset?: number | null;\n}\n\nexport interface GetWishlistsResponse {\n  /** List result of requested wishlists */\n  wishlists?: WishlistData[];\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 ambassadorWixPlatformV1Wishlist from './platform-v1-wishlist-wishlist.http.js';\nimport * as ambassadorWixPlatformV1WishlistTypes from './platform-v1-wishlist-wishlist.types.js';\nimport * as ambassadorWixPlatformV1WishlistUniversalTypes from './platform-v1-wishlist-wishlist.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 getWishlistById(): __PublicMethodMetaInfo<\n  'POST',\n  {},\n  ambassadorWixPlatformV1WishlistUniversalTypes.GetWishlistByIdRequest,\n  ambassadorWixPlatformV1WishlistTypes.GetWishlistByIdRequest,\n  ambassadorWixPlatformV1WishlistUniversalTypes.GetWishlistByIdResponse,\n  ambassadorWixPlatformV1WishlistTypes.GetWishlistByIdResponse\n> {\n  const payload = {} as any;\n\n  const getRequestOptions =\n    ambassadorWixPlatformV1Wishlist.getWishlistById(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: '/v1/wishlists/get',\n    pathParams: {},\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  WishlistData as WishlistDataOriginal,\n  WishlistItem as WishlistItemOriginal,\n  ItemsAddedToWishlist as ItemsAddedToWishlistOriginal,\n  ItemsRemovedFromWishlist as ItemsRemovedFromWishlistOriginal,\n  GetWishlistRequest as GetWishlistRequestOriginal,\n  WishlistItemKind as WishlistItemKindOriginal,\n  GetWishlistResponse as GetWishlistResponseOriginal,\n  AddToWishlistRequest as AddToWishlistRequestOriginal,\n  AddToWishlistResponse as AddToWishlistResponseOriginal,\n  RemoveFromWishlistRequest as RemoveFromWishlistRequestOriginal,\n  RemoveFromWishlistResponse as RemoveFromWishlistResponseOriginal,\n  GetWishlistByIdRequest as GetWishlistByIdRequestOriginal,\n  GetWishlistByIdResponse as GetWishlistByIdResponseOriginal,\n  GetWishlistsRequest as GetWishlistsRequestOriginal,\n  GetWishlistsResponse as GetWishlistsResponseOriginal,\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 './platform-v1-wishlist-wishlist.types.js';\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,sCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;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,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