{"version":3,"sources":["../../src/restaurants-catalogs-v3-discount-discount.public.ts","../../src/restaurants-catalogs-v3-discount-discount.universal.ts","../../src/restaurants-catalogs-v3-discount-discount.http.ts","../../src/restaurants-catalogs-v3-discount-discount.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  CreateDiscountOptions,\n  Discount,\n  DiscountCreatedEnvelope,\n  DiscountUpdatedEnvelope,\n  GetDiscountIdentifiers,\n  ListDiscountsOptions,\n  ListDiscountsResponse,\n  UpdateDiscountIdentifiers,\n  UpdateDiscountOptions,\n  createDiscount as universalCreateDiscount,\n  getDiscount as universalGetDiscount,\n  listDiscounts as universalListDiscounts,\n  updateDiscount as universalUpdateDiscount,\n} from './restaurants-catalogs-v3-discount-discount.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/restaurants' };\n\nexport function getDiscount(httpClient: HttpClient): GetDiscountSignature {\n  return (\n    identifiers: NonNullablePaths<\n      GetDiscountIdentifiers,\n      `catalogId` | `discountId`,\n      2\n    >\n  ) =>\n    universalGetDiscount(\n      identifiers,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetDiscountSignature {\n  /**\n   * Retrieves a discount.\n   * @returns Retrieved discount.\n   * @deprecated\n   */\n  (\n    identifiers: NonNullablePaths<\n      GetDiscountIdentifiers,\n      `catalogId` | `discountId`,\n      2\n    >\n  ): Promise<\n    NonNullablePaths<\n      Discount,\n      | `amount.value`\n      | `amount.currency`\n      | `sectionIds.values`\n      | `itemIds.values`\n      | `type`\n      | `condition.fulfillmentTypes`\n      | `condition.platforms`\n      | `condition.availability.periods`\n      | `condition.availability.periods.${number}.openDay`\n      | `condition.availability.periods.${number}.openTime`\n      | `condition.availability.periods.${number}.closeDay`\n      | `condition.availability.periods.${number}.closeTime`\n      | `condition.availability.specialHourPeriods`\n      | `condition.availability.specialHourPeriods.${number}.startDate`\n      | `condition.availability.specialHourPeriods.${number}.endDate`\n      | `condition.availability.specialHourPeriods.${number}.available`,\n      6\n    >\n  >;\n}\n\nexport function updateDiscount(\n  httpClient: HttpClient\n): UpdateDiscountSignature {\n  return (\n    identifiers: NonNullablePaths<UpdateDiscountIdentifiers, `catalogId`, 2>,\n    options: NonNullablePaths<UpdateDiscountOptions, `discount`, 2>\n  ) =>\n    universalUpdateDiscount(\n      identifiers,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateDiscountSignature {\n  /**\n   * Updates a discount.\n   * A discount can belong to a catalog, section, or dish. You can't create a discount that applies to a menu.\n   * @returns Updated discount.\n   * @deprecated\n   */\n  (\n    identifiers: NonNullablePaths<UpdateDiscountIdentifiers, `catalogId`, 2>,\n    options: NonNullablePaths<UpdateDiscountOptions, `discount`, 2>\n  ): Promise<\n    NonNullablePaths<\n      Discount,\n      | `amount.value`\n      | `amount.currency`\n      | `sectionIds.values`\n      | `itemIds.values`\n      | `type`\n      | `condition.fulfillmentTypes`\n      | `condition.platforms`\n      | `condition.availability.periods`\n      | `condition.availability.periods.${number}.openDay`\n      | `condition.availability.periods.${number}.openTime`\n      | `condition.availability.periods.${number}.closeDay`\n      | `condition.availability.periods.${number}.closeTime`\n      | `condition.availability.specialHourPeriods`\n      | `condition.availability.specialHourPeriods.${number}.startDate`\n      | `condition.availability.specialHourPeriods.${number}.endDate`\n      | `condition.availability.specialHourPeriods.${number}.available`,\n      6\n    >\n  >;\n}\n\nexport function createDiscount(\n  httpClient: HttpClient\n): CreateDiscountSignature {\n  return (\n    catalogId: string,\n    options?: NonNullablePaths<\n      CreateDiscountOptions,\n      | `discount.active`\n      | `discount.condition.fulfillmentTypes`\n      | `discount.condition.minOrderPrice`\n      | `discount.condition.platforms`\n      | `discount.name`,\n      4\n    >\n  ) =>\n    universalCreateDiscount(\n      catalogId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateDiscountSignature {\n  /**\n   * Creates a discount.\n   * You can create discounts for catalogs, sections, or dishes. You can't create a discount that applies to a menu.\n   * @param - ID of the catalog the discount belongs to.\n   * @returns Created discount.\n   * @deprecated\n   */\n  (\n    catalogId: string,\n    options?: NonNullablePaths<\n      CreateDiscountOptions,\n      | `discount.active`\n      | `discount.condition.fulfillmentTypes`\n      | `discount.condition.minOrderPrice`\n      | `discount.condition.platforms`\n      | `discount.name`,\n      4\n    >\n  ): Promise<\n    NonNullablePaths<\n      Discount,\n      | `amount.value`\n      | `amount.currency`\n      | `sectionIds.values`\n      | `itemIds.values`\n      | `type`\n      | `condition.fulfillmentTypes`\n      | `condition.platforms`\n      | `condition.availability.periods`\n      | `condition.availability.periods.${number}.openDay`\n      | `condition.availability.periods.${number}.openTime`\n      | `condition.availability.periods.${number}.closeDay`\n      | `condition.availability.periods.${number}.closeTime`\n      | `condition.availability.specialHourPeriods`\n      | `condition.availability.specialHourPeriods.${number}.startDate`\n      | `condition.availability.specialHourPeriods.${number}.endDate`\n      | `condition.availability.specialHourPeriods.${number}.available`,\n      6\n    >\n  >;\n}\n\nexport function listDiscounts(httpClient: HttpClient): ListDiscountsSignature {\n  return (catalogId: string, options?: ListDiscountsOptions) =>\n    universalListDiscounts(\n      catalogId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ListDiscountsSignature {\n  /**\n   * Retrieves up to 1000 discounts.\n   * @param - ID of the catalog the discounts belong to.\n   * @deprecated\n   */\n  (catalogId: string, options?: ListDiscountsOptions): Promise<\n    NonNullablePaths<\n      ListDiscountsResponse,\n      | `discounts`\n      | `discounts.${number}.amount.value`\n      | `discounts.${number}.amount.currency`\n      | `discounts.${number}.type`,\n      5\n    >\n  >;\n}\n\nexport const onDiscountCreated = EventDefinition(\n  'wix.restaurants.catalogs.v3.discount_created',\n  true,\n  (event: DiscountCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [{ path: 'metadata.eventTime' }],\n        },\n      ])\n    )\n)<DiscountCreatedEnvelope>();\nexport const onDiscountUpdated = EventDefinition(\n  'wix.restaurants.catalogs.v3.discount_updated',\n  true,\n  (event: DiscountUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [{ path: 'metadata.eventTime' }],\n        },\n      ])\n    )\n)<DiscountUpdatedEnvelope>();\n\nexport {\n  AccountInfo,\n  AccountInfoMetadata,\n  ActionEvent,\n  AddLoyaltyDiscount,\n  Availability,\n  BaseEventMetadata,\n  Coupon,\n  CreateDiscountOptions,\n  CreateDiscountRequest,\n  CreateDiscountResponse,\n  DayOfWeek,\n  Discount,\n  DiscountApplyToFilterOneOf,\n  DiscountCondition,\n  DiscountCreatedEnvelope,\n  DiscountPlatform,\n  DiscountType,\n  DiscountUpdatedEnvelope,\n  DiscountValueOneOf,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  Empty,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  FulfillmentType,\n  GetDiscountIdentifiers,\n  GetDiscountRequest,\n  GetDiscountResponse,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  ItemIds,\n  ListDiscountsOptions,\n  ListDiscountsRequest,\n  ListDiscountsResponse,\n  MessageEnvelope,\n  Money,\n  RestoreInfo,\n  SectionIds,\n  SpecialHourPeriod,\n  TimePeriod,\n  UpdateDiscountIdentifiers,\n  UpdateDiscountOptions,\n  UpdateDiscountRequest,\n  UpdateDiscountResponse,\n  WebhookIdentityType,\n} from './restaurants-catalogs-v3-discount-discount.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixRestaurantsCatalogsV3Discount from './restaurants-catalogs-v3-discount-discount.http.js';\n\n/**\n * Customers can use a discount to pay less. Can be an amount or a percentage.\n * You can read more about discounts in the [introduction](https://dev.wix.com/api/rest/wix-restaurants/catalogs/introduction).\n */\nexport interface Discount\n  extends DiscountValueOneOf,\n    DiscountApplyToFilterOneOf {\n  /** Discount amount. */\n  amount?: Money;\n  /**\n   * Discount percentage.\n   * @decimalValue options { maxScale:3 }\n   */\n  percentage?: string | null;\n  /** IDs of the sections the discount applies to. */\n  sectionIds?: SectionIds;\n  /** IDs of the items the discount applies to. **Note:** The items must be of type `dish`. */\n  itemIds?: ItemIds;\n  /**\n   * Discount ID.\n   * @readonly\n   */\n  discountId?: string | null;\n  /** Discount name. */\n  name?: string | null;\n  /** Discount description. */\n  description?: string | null;\n  /** Whether the discount is active. Defaults to `true`. */\n  active?: boolean | null;\n  /** Discount type. */\n  type?: DiscountTypeWithLiterals;\n  /**\n   * Discount condition.\n   * All conditions must be met so that a customer can apply the discount.\n   */\n  condition?: DiscountCondition;\n}\n\n/** @oneof */\nexport interface DiscountValueOneOf {\n  /** Discount amount. */\n  amount?: Money;\n  /**\n   * Discount percentage.\n   * @decimalValue options { maxScale:3 }\n   */\n  percentage?: string | null;\n}\n\n/** @oneof */\nexport interface DiscountApplyToFilterOneOf {\n  /** IDs of the sections the discount applies to. */\n  sectionIds?: SectionIds;\n  /** IDs of the items the discount applies to. **Note:** The items must be of type `dish`. */\n  itemIds?: ItemIds;\n}\n\nexport enum DiscountType {\n  UNSPECIFIED_TYPE = 'UNSPECIFIED_TYPE',\n  OFF_ITEM = 'OFF_ITEM',\n  OFF_ORDER = 'OFF_ORDER',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n  | DiscountType\n  | 'UNSPECIFIED_TYPE'\n  | 'OFF_ITEM'\n  | 'OFF_ORDER';\n\n/**\n * Money.\n * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.\n */\nexport interface Money {\n  /**\n   * Monetary amount in decimal string format. For example, `3.99`, `6`, and `10.5` are all accepted values.\n   * @format DECIMAL_VALUE\n   */\n  value?: string;\n  /**\n   * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n   * @format CURRENCY\n   * @readonly\n   */\n  currency?: string;\n}\n\nexport interface SectionIds {\n  values?: string[];\n}\n\nexport interface ItemIds {\n  values?: string[];\n}\n\nexport interface DiscountCondition {\n  /**\n   * Which fulfillment types the discount applies to.\n   * @minSize 1\n   * @maxSize 2\n   */\n  fulfillmentTypes?: FulfillmentTypeWithLiterals[];\n  /**\n   * Which ordering platforms the discount applies to.\n   * @minSize 1\n   * @maxSize 3\n   */\n  platforms?: DiscountPlatformWithLiterals[];\n  /** List of times when the discount is available. */\n  availability?: Availability;\n  /** Minimum order price for the discount. */\n  minOrderPrice?: Money;\n  /**\n   * Coupon associated with the discount.\n   * @readonly\n   */\n  coupon?: Coupon;\n}\n\nexport enum FulfillmentType {\n  UNSPECIFIED_FULFILLMENT_TYPE = 'UNSPECIFIED_FULFILLMENT_TYPE',\n  DELIVERY = 'DELIVERY',\n  PICKUP_OR_DINE_IN = 'PICKUP_OR_DINE_IN',\n}\n\n/** @enumType */\nexport type FulfillmentTypeWithLiterals =\n  | FulfillmentType\n  | 'UNSPECIFIED_FULFILLMENT_TYPE'\n  | 'DELIVERY'\n  | 'PICKUP_OR_DINE_IN';\n\nexport enum DiscountPlatform {\n  UNSPECIFIED_PLATFORM = 'UNSPECIFIED_PLATFORM',\n  SITE = 'SITE',\n  MOBILE_SITE = 'MOBILE_SITE',\n  CALL_CENTER = 'CALL_CENTER',\n}\n\n/** @enumType */\nexport type DiscountPlatformWithLiterals =\n  | DiscountPlatform\n  | 'UNSPECIFIED_PLATFORM'\n  | 'SITE'\n  | 'MOBILE_SITE'\n  | 'CALL_CENTER';\n\nexport interface Availability {\n  /**\n   * Weekly recurring time periods when the entity is available.\n   * Limited to 100 time periods.\n   */\n  periods?: TimePeriod[];\n  /** Exceptions to the entity's regular availability. The entity can be available or not available during the special hour period. */\n  specialHourPeriods?: SpecialHourPeriod[];\n}\n\n/** Weekly recurring time periods when the entity is available. */\nexport interface TimePeriod {\n  /** Day of the week the period starts on. */\n  openDay?: DayOfWeekWithLiterals;\n  /**\n   * Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are 00:00-24:00, where 24:00 represents\n   * midnight at the end of the specified day.\n   */\n  openTime?: string;\n  /** Day of the week the period ends on. */\n  closeDay?: DayOfWeekWithLiterals;\n  /**\n   * Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are 00:00-24:00, where 24:00 represents\n   * midnight at the end of the specified day.\n   * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.\n   */\n  closeTime?: string;\n}\n\nexport enum DayOfWeek {\n  UNDEFINED = 'UNDEFINED',\n  SUN = 'SUN',\n  MON = 'MON',\n  TUE = 'TUE',\n  WED = 'WED',\n  THU = 'THU',\n  FRI = 'FRI',\n  SAT = 'SAT',\n}\n\n/** @enumType */\nexport type DayOfWeekWithLiterals =\n  | DayOfWeek\n  | 'UNDEFINED'\n  | 'SUN'\n  | 'MON'\n  | 'TUE'\n  | 'WED'\n  | 'THU'\n  | 'FRI'\n  | 'SAT';\n\n/** Exception to the business's regular hours. The business can be open or closed during the exception. */\nexport interface SpecialHourPeriod {\n  /** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n  startDate?: string;\n  /** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n  endDate?: string;\n  /** Whether the item is available during the exception. Defaults to `true`. */\n  available?: boolean;\n  /** Name of the special hour period. In the dashboard, the special hour period is called event. */\n  eventName?: string | null;\n}\n\nexport interface Coupon {\n  /**\n   * Whether the customer needs to enter the coupon code to receive the discount. Defaults to `true`.\n   * @readonly\n   */\n  applied?: boolean | null;\n  /**\n   * Coupon code.\n   * @readonly\n   */\n  code?: string | null;\n}\n\nexport interface GetDiscountRequest {\n  /**\n   * ID of the discount to retrieve.\n   * @format GUID\n   */\n  discountId: string;\n  /**\n   * ID of the catalog the discount belongs to.\n   * @format GUID\n   */\n  catalogId: string;\n}\n\nexport interface GetDiscountResponse {\n  /** Retrieved discount. */\n  discount?: Discount;\n}\n\nexport interface UpdateDiscountRequest {\n  /** Discount to update. */\n  discount?: Discount;\n  /**\n   * ID of the catalog the discount belongs to.\n   * @format GUID\n   */\n  catalogId: string;\n}\n\nexport interface UpdateDiscountResponse {\n  /** Updated discount. */\n  discount?: Discount;\n}\n\nexport interface CreateDiscountRequest {\n  /** Discount to create. */\n  discount?: Discount;\n  /**\n   * ID of the catalog the discount belongs to.\n   * @format GUID\n   */\n  catalogId: string;\n}\n\nexport interface CreateDiscountResponse {\n  /** Created discount. */\n  discount?: Discount;\n}\n\nexport interface ListDiscountsRequest {\n  /** Filed mask path. */\n  fieldMask?: string[];\n  /** Whether only active discounts are returned. Defaults to `true`. */\n  active?: boolean | null;\n  /**\n   * ID of the catalog the discounts belong to.\n   * @format GUID\n   */\n  catalogId: string;\n}\n\nexport interface ListDiscountsResponse {\n  /** Retrieved discounts. */\n  discounts?: Discount[];\n}\n\nexport interface AddLoyaltyDiscount {\n  /** @format GUID */\n  locationId?: string | null;\n}\n\nexport interface Empty {}\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  entity?: string;\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  currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n  body?: string;\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\nexport interface BaseEventMetadata {\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  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\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  accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n  /** ID of the Wix account associated with the event */\n  accountId: string;\n  /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n  siteId?: string;\n  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n  parentAccountId?: string;\n}\n\nexport interface DiscountCreatedEnvelope {\n  entity: Discount;\n  metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.restaurants.catalogs.v3.discount_created\n * @serviceIdentifier com.wixpress.restaurants.catalogs.v3.DiscountsApi\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onDiscountCreated(\n  handler: (event: DiscountCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DiscountUpdatedEnvelope {\n  entity: Discount;\n  metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.restaurants.catalogs.v3.discount_updated\n * @serviceIdentifier com.wixpress.restaurants.catalogs.v3.DiscountsApi\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onDiscountUpdated(\n  handler: (event: DiscountUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a discount.\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.catalogId\n * @requiredField identifiers.discountId\n * @permissionId WIX_RESTAURANTS.READ_CATALOGS\n * @applicableIdentity APP\n * @returns Retrieved discount.\n * @fqn com.wixpress.restaurants.catalogs.v3.DiscountsApi.GetDiscount\n * @deprecated\n * @replacedBy com.wix.ecom.discounts.DiscountRuleService.GetDiscountRule\n * @targetRemovalDate 2025-09-30\n */\nexport async function getDiscount(\n  identifiers: NonNullablePaths<\n    GetDiscountIdentifiers,\n    `catalogId` | `discountId`,\n    2\n  >\n): Promise<\n  NonNullablePaths<\n    Discount,\n    | `amount.value`\n    | `amount.currency`\n    | `sectionIds.values`\n    | `itemIds.values`\n    | `type`\n    | `condition.fulfillmentTypes`\n    | `condition.platforms`\n    | `condition.availability.periods`\n    | `condition.availability.periods.${number}.openDay`\n    | `condition.availability.periods.${number}.openTime`\n    | `condition.availability.periods.${number}.closeDay`\n    | `condition.availability.periods.${number}.closeTime`\n    | `condition.availability.specialHourPeriods`\n    | `condition.availability.specialHourPeriods.${number}.startDate`\n    | `condition.availability.specialHourPeriods.${number}.endDate`\n    | `condition.availability.specialHourPeriods.${number}.available`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    catalogId: identifiers?.catalogId,\n    discountId: identifiers?.discountId,\n  });\n\n  const reqOpts =\n    ambassadorWixRestaurantsCatalogsV3Discount.getDiscount(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.discount!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          catalogId: '$[0].catalogId',\n          discountId: '$[0].discountId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['identifiers']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface GetDiscountIdentifiers {\n  /**\n   * ID of the catalog the discount belongs to.\n   * @format GUID\n   */\n  catalogId: string;\n  /**\n   * ID of the discount to retrieve.\n   * @format GUID\n   */\n  discountId: string;\n}\n\n/**\n * Updates a discount.\n * A discount can belong to a catalog, section, or dish. You can't create a discount that applies to a menu.\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.catalogId\n * @requiredField options\n * @requiredField options.discount\n * @permissionId WIX_RESTAURANTS.MANAGE_CATALOGS\n * @applicableIdentity APP\n * @returns Updated discount.\n * @fqn com.wixpress.restaurants.catalogs.v3.DiscountsApi.UpdateDiscount\n * @deprecated\n * @replacedBy com.wix.ecom.discounts.DiscountRuleService.UpdateDiscountRule\n * @targetRemovalDate 2025-09-30\n */\nexport async function updateDiscount(\n  identifiers: NonNullablePaths<UpdateDiscountIdentifiers, `catalogId`, 2>,\n  options: NonNullablePaths<UpdateDiscountOptions, `discount`, 2>\n): Promise<\n  NonNullablePaths<\n    Discount,\n    | `amount.value`\n    | `amount.currency`\n    | `sectionIds.values`\n    | `itemIds.values`\n    | `type`\n    | `condition.fulfillmentTypes`\n    | `condition.platforms`\n    | `condition.availability.periods`\n    | `condition.availability.periods.${number}.openDay`\n    | `condition.availability.periods.${number}.openTime`\n    | `condition.availability.periods.${number}.closeDay`\n    | `condition.availability.periods.${number}.closeTime`\n    | `condition.availability.specialHourPeriods`\n    | `condition.availability.specialHourPeriods.${number}.startDate`\n    | `condition.availability.specialHourPeriods.${number}.endDate`\n    | `condition.availability.specialHourPeriods.${number}.available`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    catalogId: identifiers?.catalogId,\n    discount: options?.discount,\n  });\n\n  const reqOpts =\n    ambassadorWixRestaurantsCatalogsV3Discount.updateDiscount(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.discount!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          catalogId: '$[0].catalogId',\n          discount: '$[1].discount',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['identifiers', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateDiscountIdentifiers {\n  /**\n   * ID of the catalog the discount belongs to.\n   * @format GUID\n   */\n  catalogId: string;\n}\n\nexport interface UpdateDiscountOptions {\n  /** Discount to update. */\n  discount?: Discount;\n}\n\n/**\n * Creates a discount.\n * You can create discounts for catalogs, sections, or dishes. You can't create a discount that applies to a menu.\n * @param catalogId - ID of the catalog the discount belongs to.\n * @public\n * @documentationMaturity preview\n * @requiredField catalogId\n * @requiredField options.discount.active\n * @requiredField options.discount.condition.fulfillmentTypes\n * @requiredField options.discount.condition.minOrderPrice\n * @requiredField options.discount.condition.platforms\n * @requiredField options.discount.name\n * @permissionId WIX_RESTAURANTS.MANAGE_CATALOGS\n * @applicableIdentity APP\n * @returns Created discount.\n * @fqn com.wixpress.restaurants.catalogs.v3.DiscountsApi.CreateDiscount\n * @deprecated\n * @replacedBy com.wix.ecom.discounts.DiscountRuleService.CreateDiscountRule\n * @targetRemovalDate 2025-09-30\n */\nexport async function createDiscount(\n  catalogId: string,\n  options?: NonNullablePaths<\n    CreateDiscountOptions,\n    | `discount.active`\n    | `discount.condition.fulfillmentTypes`\n    | `discount.condition.minOrderPrice`\n    | `discount.condition.platforms`\n    | `discount.name`,\n    4\n  >\n): Promise<\n  NonNullablePaths<\n    Discount,\n    | `amount.value`\n    | `amount.currency`\n    | `sectionIds.values`\n    | `itemIds.values`\n    | `type`\n    | `condition.fulfillmentTypes`\n    | `condition.platforms`\n    | `condition.availability.periods`\n    | `condition.availability.periods.${number}.openDay`\n    | `condition.availability.periods.${number}.openTime`\n    | `condition.availability.periods.${number}.closeDay`\n    | `condition.availability.periods.${number}.closeTime`\n    | `condition.availability.specialHourPeriods`\n    | `condition.availability.specialHourPeriods.${number}.startDate`\n    | `condition.availability.specialHourPeriods.${number}.endDate`\n    | `condition.availability.specialHourPeriods.${number}.available`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    catalogId: catalogId,\n    discount: options?.discount,\n  });\n\n  const reqOpts =\n    ambassadorWixRestaurantsCatalogsV3Discount.createDiscount(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.discount!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          catalogId: '$[0]',\n          discount: '$[1].discount',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['catalogId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreateDiscountOptions {\n  /** Discount to create. */\n  discount?: Discount;\n}\n\n/**\n * Retrieves up to 1000 discounts.\n * @param catalogId - ID of the catalog the discounts belong to.\n * @public\n * @documentationMaturity preview\n * @requiredField catalogId\n * @permissionId WIX_RESTAURANTS.READ_CATALOGS\n * @applicableIdentity APP\n * @fqn com.wixpress.restaurants.catalogs.v3.DiscountsApi.ListDiscounts\n * @deprecated\n * @replacedBy com.wix.ecom.discounts.DiscountRuleService.QueryDiscountRules\n * @targetRemovalDate 2025-09-30\n */\nexport async function listDiscounts(\n  catalogId: string,\n  options?: ListDiscountsOptions\n): Promise<\n  NonNullablePaths<\n    ListDiscountsResponse,\n    | `discounts`\n    | `discounts.${number}.amount.value`\n    | `discounts.${number}.amount.currency`\n    | `discounts.${number}.type`,\n    5\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    catalogId: catalogId,\n    fieldMask: options?.fieldMask,\n    active: options?.active,\n  });\n\n  const reqOpts =\n    ambassadorWixRestaurantsCatalogsV3Discount.listDiscounts(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          catalogId: '$[0]',\n          fieldMask: '$[1].fieldMask',\n          active: '$[1].active',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['catalogId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ListDiscountsOptions {\n  /** Filed mask path. */\n  fieldMask?: string[];\n  /** Whether only active discounts are returned. Defaults to `true`. */\n  active?: boolean | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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 resolveComWixpressRestaurantsCatalogsV3DiscountsApiUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {};\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_restaurants_discount';\n\n/**\n * Retrieves a discount.\n * @deprecated It has been replaced with com.wix.ecom.discounts.DiscountRuleService.GetDiscountRule(), and will be removed on 2025-09-30.\n */\nexport function getDiscount(payload: object): RequestOptionsFactory<any> {\n  function __getDiscount({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.restaurants.catalogs.v3.discount',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.restaurants.catalogs.v3.DiscountsApi.GetDiscount',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressRestaurantsCatalogsV3DiscountsApiUrl({\n        protoPath: '/v3/catalogs/{catalogId}/discounts/{discountId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __getDiscount;\n}\n\n/**\n * Updates a discount.\n * A discount can belong to a catalog, section, or dish. You can't create a discount that applies to a menu.\n * @deprecated It has been replaced with com.wix.ecom.discounts.DiscountRuleService.UpdateDiscountRule(), and will be removed on 2025-09-30.\n */\nexport function updateDiscount(payload: object): RequestOptionsFactory<any> {\n  function __updateDiscount({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.restaurants.catalogs.v3.discount',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wixpress.restaurants.catalogs.v3.DiscountsApi.UpdateDiscount',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressRestaurantsCatalogsV3DiscountsApiUrl({\n        protoPath: '/v3/catalogs/{catalogId}/discounts/{discount.id}',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __updateDiscount;\n}\n\n/**\n * Creates a discount.\n * You can create discounts for catalogs, sections, or dishes. You can't create a discount that applies to a menu.\n * @deprecated It has been replaced with com.wix.ecom.discounts.DiscountRuleService.CreateDiscountRule(), and will be removed on 2025-09-30.\n */\nexport function createDiscount(payload: object): RequestOptionsFactory<any> {\n  function __createDiscount({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.restaurants.catalogs.v3.discount',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.restaurants.catalogs.v3.DiscountsApi.CreateDiscount',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressRestaurantsCatalogsV3DiscountsApiUrl({\n        protoPath: '/v3/catalogs/{catalogId}/discounts',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __createDiscount;\n}\n\n/**\n * Retrieves up to 1000 discounts.\n * @deprecated It has been replaced with com.wix.ecom.discounts.DiscountRuleService.QueryDiscountRules(), and will be removed on 2025-09-30.\n */\nexport function listDiscounts(payload: object): RequestOptionsFactory<any> {\n  function __listDiscounts({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'fieldMask' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.restaurants.catalogs.v3.discount',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.restaurants.catalogs.v3.DiscountsApi.ListDiscounts',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressRestaurantsCatalogsV3DiscountsApiUrl({\n        protoPath: '/v3/catalogs/{catalogId}/discounts',\n        data: serializedData,\n        host,\n      }),\n      params: toURLSearchParams(serializedData),\n    };\n\n    return metadata;\n  }\n\n  return __listDiscounts;\n}\n","import {\n  getDiscount as publicGetDiscount,\n  updateDiscount as publicUpdateDiscount,\n  createDiscount as publicCreateDiscount,\n  listDiscounts as publicListDiscounts,\n} from './restaurants-catalogs-v3-discount-discount.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n  BuildRESTFunction,\n  MaybeContext,\n  BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onDiscountCreated as publicOnDiscountCreated } from './restaurants-catalogs-v3-discount-discount.public.js';\nimport { onDiscountUpdated as publicOnDiscountUpdated } from './restaurants-catalogs-v3-discount-discount.public.js';\n\nexport const getDiscount: MaybeContext<\n  BuildRESTFunction<typeof publicGetDiscount> & typeof publicGetDiscount\n> = /*#__PURE__*/ createRESTModule(publicGetDiscount);\nexport const updateDiscount: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateDiscount> & typeof publicUpdateDiscount\n> = /*#__PURE__*/ createRESTModule(publicUpdateDiscount);\nexport const createDiscount: MaybeContext<\n  BuildRESTFunction<typeof publicCreateDiscount> & typeof publicCreateDiscount\n> = /*#__PURE__*/ createRESTModule(publicCreateDiscount);\nexport const listDiscounts: MaybeContext<\n  BuildRESTFunction<typeof publicListDiscounts> & typeof publicListDiscounts\n> = /*#__PURE__*/ createRESTModule(publicListDiscounts);\n/** */\nexport const onDiscountCreated: BuildEventDefinition<\n  typeof publicOnDiscountCreated\n> &\n  typeof publicOnDiscountCreated = createEventModule(publicOnDiscountCreated);\n/** */\nexport const onDiscountUpdated: BuildEventDefinition<\n  typeof publicOnDiscountUpdated\n> &\n  typeof publicOnDiscountUpdated = createEventModule(publicOnDiscountUpdated);\n\nexport {\n  DiscountType,\n  FulfillmentType,\n  DiscountPlatform,\n  DayOfWeek,\n  WebhookIdentityType,\n} from './restaurants-catalogs-v3-discount-discount.universal.js';\nexport {\n  Discount,\n  DiscountValueOneOf,\n  DiscountApplyToFilterOneOf,\n  Money,\n  SectionIds,\n  ItemIds,\n  DiscountCondition,\n  Availability,\n  TimePeriod,\n  SpecialHourPeriod,\n  Coupon,\n  GetDiscountRequest,\n  GetDiscountResponse,\n  UpdateDiscountRequest,\n  UpdateDiscountResponse,\n  CreateDiscountRequest,\n  CreateDiscountResponse,\n  ListDiscountsRequest,\n  ListDiscountsResponse,\n  AddLoyaltyDiscount,\n  Empty,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  AccountInfo,\n  BaseEventMetadata,\n  EventMetadata,\n  AccountInfoMetadata,\n  DiscountCreatedEnvelope,\n  DiscountUpdatedEnvelope,\n  GetDiscountIdentifiers,\n  UpdateDiscountIdentifiers,\n  UpdateDiscountOptions,\n  CreateDiscountOptions,\n  ListDiscountsOptions,\n} from './restaurants-catalogs-v3-discount-discount.universal.js';\nexport {\n  DiscountTypeWithLiterals,\n  FulfillmentTypeWithLiterals,\n  DiscountPlatformWithLiterals,\n  DayOfWeekWithLiterals,\n  WebhookIdentityTypeWithLiterals,\n} from './restaurants-catalogs-v3-discount-discount.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,4CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,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,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA2B;;;AG3O3B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAS3B,IAAMC,eAEK,iCAAiBA,YAAiB;AAC7C,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,iBAEK,iCAAiBA,cAAmB;AAE/C,IAAMC,qBAGsB,kBAAkB,iBAAuB;AAErE,IAAMC,qBAGsB,kBAAkB,iBAAuB;","names":["renameKeysFromRESTResponseToSDKResponse","transformPaths","DiscountType","FulfillmentType","DiscountPlatform","DayOfWeek","WebhookIdentityType","getDiscount","updateDiscount","createDiscount","listDiscounts","getDiscount","updateDiscount","createDiscount","listDiscounts","renameKeysFromRESTResponseToSDKResponse","transformPaths","getDiscount","updateDiscount","createDiscount","listDiscounts","onDiscountCreated","onDiscountUpdated"]}