@wix/auto_sdk_loyalty_coupons 1.0.25 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -275,6 +275,28 @@ interface RedeemCurrentMemberPointsForCouponResponse {
275
275
  /** Created loyalty coupon. */
276
276
  coupon?: LoyaltyCoupon;
277
277
  }
278
+ interface RedeemMemberPointsForDiscountAmountCouponRequest {
279
+ /**
280
+ * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.
281
+ * @format GUID
282
+ */
283
+ rewardId?: string;
284
+ /**
285
+ * Loyalty account ID. See the Loyalty Accounts API for more information.
286
+ * @format GUID
287
+ */
288
+ loyaltyAccountId?: string;
289
+ /** Number of points to redeem. */
290
+ pointsToRedeem?: number;
291
+ /** Coupon specification. */
292
+ specification?: Specification;
293
+ }
294
+ interface RedeemMemberPointsForDiscountAmountCouponResponse {
295
+ /** Created loyalty coupon. */
296
+ coupon?: LoyaltyCoupon;
297
+ /** Transaction ID of the coupon redemption. */
298
+ transactionId?: string;
299
+ }
278
300
  interface GetLoyaltyCouponRequest {
279
301
  /**
280
302
  * ID of the loyalty coupon to retrieve.
@@ -459,6 +481,144 @@ interface DeleteLoyaltyCouponRequest {
459
481
  }
460
482
  interface DeleteLoyaltyCouponResponse {
461
483
  }
484
+ interface DomainEvent extends DomainEventBodyOneOf {
485
+ createdEvent?: EntityCreatedEvent;
486
+ updatedEvent?: EntityUpdatedEvent;
487
+ deletedEvent?: EntityDeletedEvent;
488
+ actionEvent?: ActionEvent;
489
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
490
+ id?: string;
491
+ /**
492
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
493
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
494
+ */
495
+ entityFqdn?: string;
496
+ /**
497
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
498
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
499
+ */
500
+ slug?: string;
501
+ /** ID of the entity associated with the event. */
502
+ entityId?: string;
503
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
504
+ eventTime?: Date | null;
505
+ /**
506
+ * Whether the event was triggered as a result of a privacy regulation application
507
+ * (for example, GDPR).
508
+ */
509
+ triggeredByAnonymizeRequest?: boolean | null;
510
+ /** If present, indicates the action that triggered the event. */
511
+ originatedFrom?: string | null;
512
+ /**
513
+ * 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.
514
+ * 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.
515
+ */
516
+ entityEventSequence?: string | null;
517
+ }
518
+ /** @oneof */
519
+ interface DomainEventBodyOneOf {
520
+ createdEvent?: EntityCreatedEvent;
521
+ updatedEvent?: EntityUpdatedEvent;
522
+ deletedEvent?: EntityDeletedEvent;
523
+ actionEvent?: ActionEvent;
524
+ }
525
+ interface EntityCreatedEvent {
526
+ entityAsJson?: string;
527
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
528
+ restoreInfo?: RestoreInfo;
529
+ }
530
+ interface RestoreInfo {
531
+ deletedDate?: Date | null;
532
+ }
533
+ interface EntityUpdatedEvent {
534
+ /**
535
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
536
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
537
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
538
+ */
539
+ currentEntityAsJson?: string;
540
+ }
541
+ interface EntityDeletedEvent {
542
+ /** Entity that was deleted. */
543
+ deletedEntityAsJson?: string | null;
544
+ }
545
+ interface ActionEvent {
546
+ bodyAsJson?: string;
547
+ }
548
+ interface Empty {
549
+ }
550
+ interface MessageEnvelope {
551
+ /**
552
+ * App instance ID.
553
+ * @format GUID
554
+ */
555
+ instanceId?: string | null;
556
+ /**
557
+ * Event type.
558
+ * @maxLength 150
559
+ */
560
+ eventType?: string;
561
+ /** The identification type and identity data. */
562
+ identity?: IdentificationData;
563
+ /** Stringify payload. */
564
+ data?: string;
565
+ }
566
+ interface IdentificationData extends IdentificationDataIdOneOf {
567
+ /**
568
+ * ID of a site visitor that has not logged in to the site.
569
+ * @format GUID
570
+ */
571
+ anonymousVisitorId?: string;
572
+ /**
573
+ * ID of a site visitor that has logged in to the site.
574
+ * @format GUID
575
+ */
576
+ memberId?: string;
577
+ /**
578
+ * ID of a Wix user (site owner, contributor, etc.).
579
+ * @format GUID
580
+ */
581
+ wixUserId?: string;
582
+ /**
583
+ * ID of an app.
584
+ * @format GUID
585
+ */
586
+ appId?: string;
587
+ /** @readonly */
588
+ identityType?: WebhookIdentityTypeWithLiterals;
589
+ }
590
+ /** @oneof */
591
+ interface IdentificationDataIdOneOf {
592
+ /**
593
+ * ID of a site visitor that has not logged in to the site.
594
+ * @format GUID
595
+ */
596
+ anonymousVisitorId?: string;
597
+ /**
598
+ * ID of a site visitor that has logged in to the site.
599
+ * @format GUID
600
+ */
601
+ memberId?: string;
602
+ /**
603
+ * ID of a Wix user (site owner, contributor, etc.).
604
+ * @format GUID
605
+ */
606
+ wixUserId?: string;
607
+ /**
608
+ * ID of an app.
609
+ * @format GUID
610
+ */
611
+ appId?: string;
612
+ }
613
+ declare enum WebhookIdentityType {
614
+ UNKNOWN = "UNKNOWN",
615
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
616
+ MEMBER = "MEMBER",
617
+ WIX_USER = "WIX_USER",
618
+ APP = "APP"
619
+ }
620
+ /** @enumType */
621
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
462
622
 
463
623
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
464
624
  getUrl: (context: any) => string;
@@ -482,4 +642,4 @@ declare function deleteLoyaltyCoupon(): __PublicMethodMetaInfo<'DELETE', {
482
642
  id: string;
483
643
  }, DeleteLoyaltyCouponRequest$1, DeleteLoyaltyCouponRequest, DeleteLoyaltyCouponResponse$1, DeleteLoyaltyCouponResponse>;
484
644
 
485
- export { type __PublicMethodMetaInfo, bulkGetLoyaltyCoupon, deleteLoyaltyCoupon, getCurrentMemberCoupons, getLoyaltyCoupon, queryLoyaltyCoupons, redeemCurrentMemberPointsForCoupon, redeemPointsForCoupon };
645
+ export { type ActionEvent as ActionEventOriginal, type BulkGetLoyaltyCouponRequest as BulkGetLoyaltyCouponRequestOriginal, type BulkGetLoyaltyCouponResponse as BulkGetLoyaltyCouponResponseOriginal, type BuyXGetY as BuyXGetYOriginal, type CouponReference as CouponReferenceOriginal, type CouponsInSite as CouponsInSiteOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteLoyaltyCouponRequest as DeleteLoyaltyCouponRequestOriginal, type DeleteLoyaltyCouponResponse as DeleteLoyaltyCouponResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetCurrentMemberCouponsRequest as GetCurrentMemberCouponsRequestOriginal, type GetCurrentMemberCouponsResponse as GetCurrentMemberCouponsResponseOriginal, type GetLoyaltyCouponRequest as GetLoyaltyCouponRequestOriginal, type GetLoyaltyCouponResponse as GetLoyaltyCouponResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type LoyaltyCoupon as LoyaltyCouponOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type QueryLoyaltyCouponRequest as QueryLoyaltyCouponRequestOriginal, type QueryLoyaltyCouponResponse as QueryLoyaltyCouponResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type RedeemCurrentMemberPointsForCouponRequest as RedeemCurrentMemberPointsForCouponRequestOriginal, type RedeemCurrentMemberPointsForCouponResponse as RedeemCurrentMemberPointsForCouponResponseOriginal, type RedeemMemberPointsForDiscountAmountCouponRequest as RedeemMemberPointsForDiscountAmountCouponRequestOriginal, type RedeemMemberPointsForDiscountAmountCouponResponse as RedeemMemberPointsForDiscountAmountCouponResponseOriginal, type RedeemPointsForCouponRequest as RedeemPointsForCouponRequestOriginal, type RedeemPointsForCouponResponse as RedeemPointsForCouponResponseOriginal, type RestoreInfo as RestoreInfoOriginal, type Scope as ScopeOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type Specification as SpecificationOriginal, type SpecificationScopeOrMinSubtotalOneOf as SpecificationScopeOrMinSubtotalOneOfOriginal, type SpecificationTypeDetailsOneOf as SpecificationTypeDetailsOneOfOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkGetLoyaltyCoupon, deleteLoyaltyCoupon, getCurrentMemberCoupons, getLoyaltyCoupon, queryLoyaltyCoupons, redeemCurrentMemberPointsForCoupon, redeemPointsForCoupon };
package/build/cjs/meta.js CHANGED
@@ -20,6 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // meta.ts
21
21
  var meta_exports = {};
22
22
  __export(meta_exports, {
23
+ SortOrderOriginal: () => SortOrder,
24
+ StatusOriginal: () => Status,
25
+ TypeOriginal: () => Type,
26
+ WebhookIdentityTypeOriginal: () => WebhookIdentityType,
23
27
  bulkGetLoyaltyCoupon: () => bulkGetLoyaltyCoupon2,
24
28
  deleteLoyaltyCoupon: () => deleteLoyaltyCoupon2,
25
29
  getCurrentMemberCoupons: () => getCurrentMemberCoupons2,
@@ -396,6 +400,39 @@ function deleteLoyaltyCoupon(payload) {
396
400
  return __deleteLoyaltyCoupon;
397
401
  }
398
402
 
403
+ // src/loyalty-v1-coupon-coupons.types.ts
404
+ var Type = /* @__PURE__ */ ((Type2) => {
405
+ Type2["UNKNOWN"] = "UNKNOWN";
406
+ Type2["MONEY_OFF_AMOUNT"] = "MONEY_OFF_AMOUNT";
407
+ Type2["PERCENT_OFF_RATE"] = "PERCENT_OFF_RATE";
408
+ Type2["FREE_SHIPPING"] = "FREE_SHIPPING";
409
+ Type2["FIXED_PRICE_AMOUNT"] = "FIXED_PRICE_AMOUNT";
410
+ Type2["BUY_X_GET_Y"] = "BUY_X_GET_Y";
411
+ return Type2;
412
+ })(Type || {});
413
+ var Status = /* @__PURE__ */ ((Status2) => {
414
+ Status2["UNKNOWN"] = "UNKNOWN";
415
+ Status2["PENDING"] = "PENDING";
416
+ Status2["ACTIVE"] = "ACTIVE";
417
+ Status2["APPLIED"] = "APPLIED";
418
+ Status2["FAILED"] = "FAILED";
419
+ Status2["ARCHIVED"] = "ARCHIVED";
420
+ return Status2;
421
+ })(Status || {});
422
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
423
+ SortOrder2["ASC"] = "ASC";
424
+ SortOrder2["DESC"] = "DESC";
425
+ return SortOrder2;
426
+ })(SortOrder || {});
427
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
428
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
429
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
430
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
431
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
432
+ WebhookIdentityType2["APP"] = "APP";
433
+ return WebhookIdentityType2;
434
+ })(WebhookIdentityType || {});
435
+
399
436
  // src/loyalty-v1-coupon-coupons.meta.ts
400
437
  function redeemPointsForCoupon2() {
401
438
  const payload = {};
@@ -525,6 +562,10 @@ function deleteLoyaltyCoupon2() {
525
562
  }
526
563
  // Annotate the CommonJS export names for ESM import in node:
527
564
  0 && (module.exports = {
565
+ SortOrderOriginal,
566
+ StatusOriginal,
567
+ TypeOriginal,
568
+ WebhookIdentityTypeOriginal,
528
569
  bulkGetLoyaltyCoupon,
529
570
  deleteLoyaltyCoupon,
530
571
  getCurrentMemberCoupons,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/loyalty-v1-coupon-coupons.http.ts","../../src/loyalty-v1-coupon-coupons.meta.ts"],"sourcesContent":["export * from './src/loyalty-v1-coupon-coupons.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-coupons',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/loyalty-coupons',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_coupons';\n\n/**\n * Redeems a customer's loyalty points for a loyalty reward and creates a loyalty coupon.\n *\n * Creating a loyalty coupon also creates a corresponding \"reference\" coupon with the Coupons API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)).\n * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon\n * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.\n *\n * Check which loyalty rewards a site has available with List Rewards in the Loyalty Rewards API.\n */\nexport function redeemPointsForCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __redeemPointsForCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'coupon.createdDate' },\n { path: 'coupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'coupon.couponReference.specification.moneyOffAmount' },\n { path: 'coupon.couponReference.specification.percentOffRate' },\n { path: 'coupon.couponReference.specification.fixedPriceAmount' },\n { path: 'coupon.couponReference.specification.minimumSubtotal' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __redeemPointsForCoupon;\n}\n\n/**\n * Redeems a current customer's loyalty points for a loyalty reward and creates a loyalty coupon.\n *\n * Creating a loyalty coupon also creates a corresponding \"reference\" coupon with the Coupons API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)).\n * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon\n * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.\n *\n * Check which loyalty rewards a site has available with List Rewards in the Loyalty Rewards API.\n *\n * >**Note:**\n * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n */\nexport function redeemCurrentMemberPointsForCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __redeemCurrentMemberPointsForCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/redeem-my-coupon',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'coupon.createdDate' },\n { path: 'coupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'coupon.couponReference.specification.moneyOffAmount' },\n { path: 'coupon.couponReference.specification.percentOffRate' },\n { path: 'coupon.couponReference.specification.fixedPriceAmount' },\n { path: 'coupon.couponReference.specification.minimumSubtotal' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __redeemCurrentMemberPointsForCoupon;\n}\n\n/** Retrieves a loyalty coupon. */\nexport function getLoyaltyCoupon(payload: object): RequestOptionsFactory<any> {\n function __getLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/{loyaltyCouponId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyCoupon.createdDate' },\n { path: 'loyaltyCoupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupon.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLoyaltyCoupon;\n}\n\n/** Retrieves a sequence of loyalty coupons. */\nexport function bulkGetLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGetLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/bulk/coupons',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'couponsInSite.loyaltyCoupons.createdDate' },\n { path: 'couponsInSite.loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkGetLoyaltyCoupon;\n}\n\n/**\n * Retrieves the loyalty coupons for the currently logged-in member.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n */\nexport function getCurrentMemberCoupons(\n payload: object\n): RequestOptionsFactory<any> {\n function __getCurrentMemberCoupons({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/my-coupons',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyCoupons.createdDate' },\n { path: 'loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCurrentMemberCoupons;\n}\n\n/** Retrieves a list of loyalty coupons, with the specified paging, filtering, and sorting. */\nexport function queryLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyCoupons.createdDate' },\n { path: 'loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLoyaltyCoupon;\n}\n\n/**\n * Deletes a loyalty coupon.\n *\n * The deletion of a loyalty coupon does not impact the functionality of the corresponding coupon itself.\n */\nexport function deleteLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLoyaltyCoupon;\n}\n","import * as ambassadorWixLoyaltyV1Coupon from './loyalty-v1-coupon-coupons.http.js';\nimport * as ambassadorWixLoyaltyV1CouponTypes from './loyalty-v1-coupon-coupons.types.js';\nimport * as ambassadorWixLoyaltyV1CouponUniversalTypes from './loyalty-v1-coupon-coupons.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 redeemPointsForCoupon(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.RedeemPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemPointsForCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.RedeemPointsForCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.redeemPointsForCoupon(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/coupons',\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 function redeemCurrentMemberPointsForCoupon(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemCurrentMemberPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.RedeemCurrentMemberPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemCurrentMemberPointsForCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.RedeemCurrentMemberPointsForCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.redeemCurrentMemberPointsForCoupon(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/coupons/redeem-my-coupon',\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 function getLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'GET',\n { loyaltyCouponId: string },\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.GetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.GetLoyaltyCouponResponse\n> {\n const payload = { loyaltyCouponId: ':loyaltyCouponId' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.getLoyaltyCoupon(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: '/v1/coupons/{loyaltyCouponId}',\n pathParams: { loyaltyCouponId: 'loyaltyCouponId' },\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 bulkGetLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.BulkGetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.BulkGetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.BulkGetLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.BulkGetLoyaltyCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.bulkGetLoyaltyCoupon(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: '/v1/bulk/coupons',\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 function getCurrentMemberCoupons(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetCurrentMemberCouponsRequest,\n ambassadorWixLoyaltyV1CouponTypes.GetCurrentMemberCouponsRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetCurrentMemberCouponsResponse,\n ambassadorWixLoyaltyV1CouponTypes.GetCurrentMemberCouponsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.getCurrentMemberCoupons(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: '/v1/coupons/my-coupons',\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 function queryLoyaltyCoupons(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.QueryLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.QueryLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.QueryLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.QueryLoyaltyCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.queryLoyaltyCoupon(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/coupons/query',\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 function deleteLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixLoyaltyV1CouponUniversalTypes.DeleteLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.DeleteLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.DeleteLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.DeleteLoyaltyCouponResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.deleteLoyaltyCoupon(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: '/v1/coupons/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,8BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA;AAAA,4CAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SA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,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["bulkGetLoyaltyCoupon","deleteLoyaltyCoupon","getCurrentMemberCoupons","getLoyaltyCoupon","redeemCurrentMemberPointsForCoupon","redeemPointsForCoupon","import_rest_modules","payload","redeemPointsForCoupon","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","deleteLoyaltyCoupon"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/loyalty-v1-coupon-coupons.http.ts","../../src/loyalty-v1-coupon-coupons.types.ts","../../src/loyalty-v1-coupon-coupons.meta.ts"],"sourcesContent":["export * from './src/loyalty-v1-coupon-coupons.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-coupons',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/loyalty-coupons',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_coupons';\n\n/**\n * Redeems a customer's loyalty points for a loyalty reward and creates a loyalty coupon.\n *\n * Creating a loyalty coupon also creates a corresponding \"reference\" coupon with the Coupons API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)).\n * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon\n * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.\n *\n * Check which loyalty rewards a site has available with List Rewards in the Loyalty Rewards API.\n */\nexport function redeemPointsForCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __redeemPointsForCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'coupon.createdDate' },\n { path: 'coupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'coupon.couponReference.specification.moneyOffAmount' },\n { path: 'coupon.couponReference.specification.percentOffRate' },\n { path: 'coupon.couponReference.specification.fixedPriceAmount' },\n { path: 'coupon.couponReference.specification.minimumSubtotal' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __redeemPointsForCoupon;\n}\n\n/**\n * Redeems a current customer's loyalty points for a loyalty reward and creates a loyalty coupon.\n *\n * Creating a loyalty coupon also creates a corresponding \"reference\" coupon with the Coupons API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)).\n * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon\n * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.\n *\n * Check which loyalty rewards a site has available with List Rewards in the Loyalty Rewards API.\n *\n * >**Note:**\n * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n */\nexport function redeemCurrentMemberPointsForCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __redeemCurrentMemberPointsForCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/redeem-my-coupon',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'coupon.createdDate' },\n { path: 'coupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'coupon.couponReference.specification.moneyOffAmount' },\n { path: 'coupon.couponReference.specification.percentOffRate' },\n { path: 'coupon.couponReference.specification.fixedPriceAmount' },\n { path: 'coupon.couponReference.specification.minimumSubtotal' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __redeemCurrentMemberPointsForCoupon;\n}\n\n/** Retrieves a loyalty coupon. */\nexport function getLoyaltyCoupon(payload: object): RequestOptionsFactory<any> {\n function __getLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/{loyaltyCouponId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyCoupon.createdDate' },\n { path: 'loyaltyCoupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupon.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLoyaltyCoupon;\n}\n\n/** Retrieves a sequence of loyalty coupons. */\nexport function bulkGetLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGetLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/bulk/coupons',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'couponsInSite.loyaltyCoupons.createdDate' },\n { path: 'couponsInSite.loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkGetLoyaltyCoupon;\n}\n\n/**\n * Retrieves the loyalty coupons for the currently logged-in member.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n */\nexport function getCurrentMemberCoupons(\n payload: object\n): RequestOptionsFactory<any> {\n function __getCurrentMemberCoupons({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/my-coupons',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyCoupons.createdDate' },\n { path: 'loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCurrentMemberCoupons;\n}\n\n/** Retrieves a list of loyalty coupons, with the specified paging, filtering, and sorting. */\nexport function queryLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyCoupons.createdDate' },\n { path: 'loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLoyaltyCoupon;\n}\n\n/**\n * Deletes a loyalty coupon.\n *\n * The deletion of a loyalty coupon does not impact the functionality of the corresponding coupon itself.\n */\nexport function deleteLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLoyaltyCoupon;\n}\n","/**\n * A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon\n * also creates a corresponding \"reference\" coupon with the Coupons API.\n */\nexport interface LoyaltyCoupon {\n /**\n * Loyalty coupon ID.\n * @format GUID\n * @readonly\n */\n id?: string;\n /**\n * Loyalty account ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/loyalty/accounts/introduction) | [REST](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object)) of the customer that redeemed points for a coupon.\n * @format GUID\n * @readonly\n */\n accountId?: string;\n /**\n * Member ID of the customer that redeemed points for a coupon. See the Members API for more information.\n * @format GUID\n * @readonly\n * @deprecated Member ID of the customer that redeemed points for a coupon. See the Members API for more information.\n * @replacedBy member_id\n * @targetRemovalDate 2024-06-01\n */\n memberIdDeprecated?: string;\n /**\n * Member ID of the customer that redeemed points for a coupon. See the Members API for more information.\n * @format GUID\n * @readonly\n */\n memberId?: string | null;\n /**\n * Transaction ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/loyalty/transactions/introduction) | [REST](https://dev.wix.com/docs/rest/crm/loyalty-program/transactions/loyalty-transaction-object)) for the transaction that created a coupon.\n * @format GUID\n * @readonly\n */\n transactionId?: string | null;\n /**\n * Reference coupon information for the corresponding coupon ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object))\n * that is created along with the loyalty coupon.\n * @readonly\n */\n couponReference?: CouponReference;\n /**\n * Loyalty coupon status.\n *\n * This status relates to the corresponding coupon that is created\n * at the same time as the loyalty coupon and is included in `couponReference`.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Name of reward that was redeemed to create this coupon.\n * @minLength 1\n * @maxLength 50\n * @readonly\n */\n rewardName?: string;\n /**\n * Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n * @immutable\n */\n revision?: string | null;\n /**\n * Date and time the loyalty coupon was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the loyalty coupon was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n}\n\nexport interface CouponReference {\n /**\n * Coupon ID.\n * @format GUID\n * @readonly\n */\n couponId?: string;\n /**\n * Coupon code.\n *\n * Unique code entered by a customer to apply the coupon.\n * @maxLength 20\n * @readonly\n */\n code?: string;\n /**\n * Name of coupon.\n * @maxLength 80\n * @readonly\n */\n name?: string | null;\n /**\n * The information to use when creating the coupon.\n * @readonly\n */\n specification?: Specification;\n /**\n * Whether the referenced coupon was deleted.\n * @readonly\n */\n deleted?: boolean | null;\n}\n\nexport interface Specification\n extends SpecificationTypeDetailsOneOf,\n SpecificationScopeOrMinSubtotalOneOf {\n /**\n * Fixed price discount.\n * @min 0.01\n */\n moneyOffAmount?: number;\n /** Discount as a percentage. */\n percentOffRate?: number;\n /** Free shipping. If true, the coupon applies to all items in all `namespaces` on a site. */\n freeShipping?: boolean;\n /** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */\n fixedPriceAmount?: number;\n /**\n * Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the\n * following scenario: if a visitor purchases x number of products, they receive y number of products for free. C\n * urrently only supported for coupons with a `stores` `namespace`.\n */\n buyXGetY?: BuyXGetY;\n /**\n * Scope of the coupon. When no scope is defined, the coupon applies to all\n * items in all `namespaces` in the site.\n */\n scope?: Scope;\n /** The coupon is only applicable when the order subtotal is over this amount. */\n minimumSubtotal?: number | null;\n /** Name of coupon. */\n name?: string | null;\n type?: TypeWithLiterals;\n /**\n * Whether the coupon is limited to 1 discount per order. If true and a customer pays for multiple items\n * that the coupon applies to, only the lowest priced item is discounted.\n * Coupons with a `bookings` `namespace` are always limited to 1 item.\n */\n limitedToOneItem?: boolean | null;\n /** Whether the coupon also applies to subscriptions. */\n appliesToSubscriptions?: boolean | null;\n /**\n * Specifies the amount of cycles to apply the discount to for a subscription item.\n *\n * Can only be set when `appliesToSubscriptions` is `TRUE` and `specification.scope.namespace` is `pricingPlans`.\n * If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n *\n * Min: `1`\n *\n * Max: `999`\n */\n discountedCycleCount?: number | null;\n}\n\n/** @oneof */\nexport interface SpecificationTypeDetailsOneOf {\n /**\n * Fixed price discount.\n * @min 0.01\n */\n moneyOffAmount?: number;\n /** Discount as a percentage. */\n percentOffRate?: number;\n /** Free shipping. If true, the coupon applies to all items in all `namespaces` on a site. */\n freeShipping?: boolean;\n /** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */\n fixedPriceAmount?: number;\n /**\n * Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the\n * following scenario: if a visitor purchases x number of products, they receive y number of products for free. C\n * urrently only supported for coupons with a `stores` `namespace`.\n */\n buyXGetY?: BuyXGetY;\n}\n\n/** @oneof */\nexport interface SpecificationScopeOrMinSubtotalOneOf {\n /**\n * Scope of the coupon. When no scope is defined, the coupon applies to all\n * items in all `namespaces` in the site.\n */\n scope?: Scope;\n /** The coupon is only applicable when the order subtotal is over this amount. */\n minimumSubtotal?: number | null;\n}\n\nexport enum Type {\n UNKNOWN = 'UNKNOWN',\n MONEY_OFF_AMOUNT = 'MONEY_OFF_AMOUNT',\n PERCENT_OFF_RATE = 'PERCENT_OFF_RATE',\n FREE_SHIPPING = 'FREE_SHIPPING',\n FIXED_PRICE_AMOUNT = 'FIXED_PRICE_AMOUNT',\n BUY_X_GET_Y = 'BUY_X_GET_Y',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN'\n | 'MONEY_OFF_AMOUNT'\n | 'PERCENT_OFF_RATE'\n | 'FREE_SHIPPING'\n | 'FIXED_PRICE_AMOUNT'\n | 'BUY_X_GET_Y';\n\nexport interface BuyXGetY {\n /** Number of purchased items required to receive free items. */\n x?: number;\n /** Number of items received for free if required number of items were purchased. */\n y?: number;\n}\n\nexport interface Scope {\n /**\n * Group within a `namespace` for which the coupon is applicable.\n *\n * If no group is specified, the coupon applies to all items in the namespace.\n * `group` is required in some namespaces. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)\n * for a list of currently supported groups for each namespace.\n */\n name?: string | null;\n /**\n * ID of the specific entity in the group for which the coupon is applicable.\n *\n * If no `entityId` is specified, the coupon applies to all entities in the group. In some cases when a group is specified,\n * an `entityId` is required. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)\n * for a list of currently supported entities for each namespace and group.\n */\n entityId?: string | null;\n /**\n * Wix application for which the coupon is applicable.\n *\n * One of the following:\n * + `\"stores\"`\n * + `\"bookings\"`\n * + `\"events\"`\n * + `\"pricingPlans\"`\n */\n namespace?: string;\n}\n\nexport enum Status {\n /** Unknown status. */\n UNKNOWN = 'UNKNOWN',\n /** The reference coupon was created but the loyalty points have not been redeemed yet. */\n PENDING = 'PENDING',\n /** The reference coupon is active and available to the customer. */\n ACTIVE = 'ACTIVE',\n /** The reference coupon was applied and is no longer available for use. */\n APPLIED = 'APPLIED',\n /** The reference coupon was created but something went wrong when redeeming points from the loyalty account. */\n FAILED = 'FAILED',\n /** The reference coupon was deleted. */\n ARCHIVED = 'ARCHIVED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'PENDING'\n | 'ACTIVE'\n | 'APPLIED'\n | 'FAILED'\n | 'ARCHIVED';\n\nexport interface RedeemPointsForCouponRequest {\n /**\n * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @format GUID\n */\n rewardId: string;\n /**\n * ID of the loyalty account of the customer redeeming points. See the Loyalty Accounts API for more information.\n * @format GUID\n */\n loyaltyAccountId: string;\n}\n\nexport interface RedeemPointsForCouponResponse {\n /** Created loyalty coupon. */\n coupon?: LoyaltyCoupon;\n}\n\nexport interface RedeemCurrentMemberPointsForCouponRequest {\n /**\n * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @format GUID\n */\n rewardId: string;\n}\n\nexport interface RedeemCurrentMemberPointsForCouponResponse {\n /** Created loyalty coupon. */\n coupon?: LoyaltyCoupon;\n}\n\nexport interface RedeemMemberPointsForDiscountAmountCouponRequest {\n /**\n * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @format GUID\n */\n rewardId?: string;\n /**\n * Loyalty account ID. See the Loyalty Accounts API for more information.\n * @format GUID\n */\n loyaltyAccountId?: string;\n /** Number of points to redeem. */\n pointsToRedeem?: number;\n /** Coupon specification. */\n specification?: Specification;\n}\n\nexport interface RedeemMemberPointsForDiscountAmountCouponResponse {\n /** Created loyalty coupon. */\n coupon?: LoyaltyCoupon;\n /** Transaction ID of the coupon redemption. */\n transactionId?: string;\n}\n\nexport interface GetLoyaltyCouponRequest {\n /**\n * ID of the loyalty coupon to retrieve.\n * @format GUID\n */\n loyaltyCouponId: string;\n}\n\nexport interface GetLoyaltyCouponResponse {\n /** Retrieved loyalty coupon. */\n loyaltyCoupon?: LoyaltyCoupon;\n}\n\nexport interface BulkGetLoyaltyCouponRequest {\n /** Query to filter loyalty coupons. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface BulkGetLoyaltyCouponResponse {\n /**\n * Retrieved loyalty coupons.\n * @maxSize 100\n */\n couponsInSite?: CouponsInSite[];\n}\n\nexport interface CouponsInSite {\n /**\n * Metasite ID.\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Retrieved loyalty coupons.\n * @maxSize 100\n */\n loyaltyCoupons?: LoyaltyCoupon[];\n}\n\nexport interface GetCurrentMemberCouponsRequest {}\n\nexport interface GetCurrentMemberCouponsResponse {\n /** Retrieved loyalty coupons. */\n loyaltyCoupons?: LoyaltyCoupon[];\n}\n\nexport interface QueryLoyaltyCouponRequest {\n /** Query options. */\n query: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n */\n sort?: Sorting[];\n /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */\n fields?: string[];\n /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface QueryLoyaltyCouponResponse {\n /** Retrieved loyalty coupons. */\n loyaltyCoupons?: LoyaltyCoupon[];\n /** Metadata. */\n metadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\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. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteLoyaltyCouponRequest {\n /**\n * ID of the loyalty coupon to delete.\n * @format GUID\n */\n id: string;\n /**\n * Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n */\n revision?: string;\n}\n\nexport interface DeleteLoyaltyCouponResponse {}\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 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}\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","import * as ambassadorWixLoyaltyV1Coupon from './loyalty-v1-coupon-coupons.http.js';\nimport * as ambassadorWixLoyaltyV1CouponTypes from './loyalty-v1-coupon-coupons.types.js';\nimport * as ambassadorWixLoyaltyV1CouponUniversalTypes from './loyalty-v1-coupon-coupons.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 redeemPointsForCoupon(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.RedeemPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemPointsForCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.RedeemPointsForCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.redeemPointsForCoupon(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/coupons',\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 function redeemCurrentMemberPointsForCoupon(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemCurrentMemberPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.RedeemCurrentMemberPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemCurrentMemberPointsForCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.RedeemCurrentMemberPointsForCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.redeemCurrentMemberPointsForCoupon(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/coupons/redeem-my-coupon',\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 function getLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'GET',\n { loyaltyCouponId: string },\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.GetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.GetLoyaltyCouponResponse\n> {\n const payload = { loyaltyCouponId: ':loyaltyCouponId' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.getLoyaltyCoupon(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: '/v1/coupons/{loyaltyCouponId}',\n pathParams: { loyaltyCouponId: 'loyaltyCouponId' },\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 bulkGetLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.BulkGetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.BulkGetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.BulkGetLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.BulkGetLoyaltyCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.bulkGetLoyaltyCoupon(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: '/v1/bulk/coupons',\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 function getCurrentMemberCoupons(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetCurrentMemberCouponsRequest,\n ambassadorWixLoyaltyV1CouponTypes.GetCurrentMemberCouponsRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetCurrentMemberCouponsResponse,\n ambassadorWixLoyaltyV1CouponTypes.GetCurrentMemberCouponsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.getCurrentMemberCoupons(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: '/v1/coupons/my-coupons',\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 function queryLoyaltyCoupons(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.QueryLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.QueryLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.QueryLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.QueryLoyaltyCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.queryLoyaltyCoupon(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/coupons/query',\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 function deleteLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixLoyaltyV1CouponUniversalTypes.DeleteLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.DeleteLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.DeleteLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.DeleteLoyaltyCouponResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.deleteLoyaltyCoupon(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: '/v1/coupons/{id}',\n pathParams: { id: 'id' },\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 LoyaltyCoupon as LoyaltyCouponOriginal,\n CouponReference as CouponReferenceOriginal,\n Specification as SpecificationOriginal,\n SpecificationTypeDetailsOneOf as SpecificationTypeDetailsOneOfOriginal,\n SpecificationScopeOrMinSubtotalOneOf as SpecificationScopeOrMinSubtotalOneOfOriginal,\n Type as TypeOriginal,\n TypeWithLiterals as TypeWithLiteralsOriginal,\n BuyXGetY as BuyXGetYOriginal,\n Scope as ScopeOriginal,\n Status as StatusOriginal,\n StatusWithLiterals as StatusWithLiteralsOriginal,\n RedeemPointsForCouponRequest as RedeemPointsForCouponRequestOriginal,\n RedeemPointsForCouponResponse as RedeemPointsForCouponResponseOriginal,\n RedeemCurrentMemberPointsForCouponRequest as RedeemCurrentMemberPointsForCouponRequestOriginal,\n RedeemCurrentMemberPointsForCouponResponse as RedeemCurrentMemberPointsForCouponResponseOriginal,\n RedeemMemberPointsForDiscountAmountCouponRequest as RedeemMemberPointsForDiscountAmountCouponRequestOriginal,\n RedeemMemberPointsForDiscountAmountCouponResponse as RedeemMemberPointsForDiscountAmountCouponResponseOriginal,\n GetLoyaltyCouponRequest as GetLoyaltyCouponRequestOriginal,\n GetLoyaltyCouponResponse as GetLoyaltyCouponResponseOriginal,\n BulkGetLoyaltyCouponRequest as BulkGetLoyaltyCouponRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n BulkGetLoyaltyCouponResponse as BulkGetLoyaltyCouponResponseOriginal,\n CouponsInSite as CouponsInSiteOriginal,\n GetCurrentMemberCouponsRequest as GetCurrentMemberCouponsRequestOriginal,\n GetCurrentMemberCouponsResponse as GetCurrentMemberCouponsResponseOriginal,\n QueryLoyaltyCouponRequest as QueryLoyaltyCouponRequestOriginal,\n QueryV2 as QueryV2Original,\n QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal,\n Paging as PagingOriginal,\n QueryLoyaltyCouponResponse as QueryLoyaltyCouponResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\n DeleteLoyaltyCouponRequest as DeleteLoyaltyCouponRequestOriginal,\n DeleteLoyaltyCouponResponse as DeleteLoyaltyCouponResponseOriginal,\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 MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './loyalty-v1-coupon-coupons.types.js';\n"],"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AC1B;AACF;AAEO,SAASC,2BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyB,wBAAwB,OAAO;AAE9D,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,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAAS,sBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyB,mBAAmB,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,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,uBAOd;AACA,QAAM,UAAU,EAAE,IAAI,MAAM;AAE5B,QAAM,oBACyB,oBAAoB,OAAO;AAE1D,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,IAAI,KAAK;AAAA,IACvB,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["bulkGetLoyaltyCoupon","deleteLoyaltyCoupon","getCurrentMemberCoupons","getLoyaltyCoupon","redeemCurrentMemberPointsForCoupon","redeemPointsForCoupon","import_rest_modules","payload","Type","Status","SortOrder","WebhookIdentityType","redeemPointsForCoupon","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","deleteLoyaltyCoupon"]}
@@ -275,6 +275,28 @@ interface RedeemCurrentMemberPointsForCouponResponse {
275
275
  /** Created loyalty coupon. */
276
276
  coupon?: LoyaltyCoupon;
277
277
  }
278
+ interface RedeemMemberPointsForDiscountAmountCouponRequest {
279
+ /**
280
+ * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.
281
+ * @format GUID
282
+ */
283
+ rewardId?: string;
284
+ /**
285
+ * Loyalty account ID. See the Loyalty Accounts API for more information.
286
+ * @format GUID
287
+ */
288
+ loyaltyAccountId?: string;
289
+ /** Number of points to redeem. */
290
+ pointsToRedeem?: number;
291
+ /** Coupon specification. */
292
+ specification?: Specification;
293
+ }
294
+ interface RedeemMemberPointsForDiscountAmountCouponResponse {
295
+ /** Created loyalty coupon. */
296
+ coupon?: LoyaltyCoupon;
297
+ /** Transaction ID of the coupon redemption. */
298
+ transactionId?: string;
299
+ }
278
300
  interface GetLoyaltyCouponRequest {
279
301
  /**
280
302
  * ID of the loyalty coupon to retrieve.
@@ -459,6 +481,144 @@ interface DeleteLoyaltyCouponRequest {
459
481
  }
460
482
  interface DeleteLoyaltyCouponResponse {
461
483
  }
484
+ interface DomainEvent extends DomainEventBodyOneOf {
485
+ createdEvent?: EntityCreatedEvent;
486
+ updatedEvent?: EntityUpdatedEvent;
487
+ deletedEvent?: EntityDeletedEvent;
488
+ actionEvent?: ActionEvent;
489
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
490
+ id?: string;
491
+ /**
492
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
493
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
494
+ */
495
+ entityFqdn?: string;
496
+ /**
497
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
498
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
499
+ */
500
+ slug?: string;
501
+ /** ID of the entity associated with the event. */
502
+ entityId?: string;
503
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
504
+ eventTime?: Date | null;
505
+ /**
506
+ * Whether the event was triggered as a result of a privacy regulation application
507
+ * (for example, GDPR).
508
+ */
509
+ triggeredByAnonymizeRequest?: boolean | null;
510
+ /** If present, indicates the action that triggered the event. */
511
+ originatedFrom?: string | null;
512
+ /**
513
+ * 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.
514
+ * 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.
515
+ */
516
+ entityEventSequence?: string | null;
517
+ }
518
+ /** @oneof */
519
+ interface DomainEventBodyOneOf {
520
+ createdEvent?: EntityCreatedEvent;
521
+ updatedEvent?: EntityUpdatedEvent;
522
+ deletedEvent?: EntityDeletedEvent;
523
+ actionEvent?: ActionEvent;
524
+ }
525
+ interface EntityCreatedEvent {
526
+ entityAsJson?: string;
527
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
528
+ restoreInfo?: RestoreInfo;
529
+ }
530
+ interface RestoreInfo {
531
+ deletedDate?: Date | null;
532
+ }
533
+ interface EntityUpdatedEvent {
534
+ /**
535
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
536
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
537
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
538
+ */
539
+ currentEntityAsJson?: string;
540
+ }
541
+ interface EntityDeletedEvent {
542
+ /** Entity that was deleted. */
543
+ deletedEntityAsJson?: string | null;
544
+ }
545
+ interface ActionEvent {
546
+ bodyAsJson?: string;
547
+ }
548
+ interface Empty {
549
+ }
550
+ interface MessageEnvelope {
551
+ /**
552
+ * App instance ID.
553
+ * @format GUID
554
+ */
555
+ instanceId?: string | null;
556
+ /**
557
+ * Event type.
558
+ * @maxLength 150
559
+ */
560
+ eventType?: string;
561
+ /** The identification type and identity data. */
562
+ identity?: IdentificationData;
563
+ /** Stringify payload. */
564
+ data?: string;
565
+ }
566
+ interface IdentificationData extends IdentificationDataIdOneOf {
567
+ /**
568
+ * ID of a site visitor that has not logged in to the site.
569
+ * @format GUID
570
+ */
571
+ anonymousVisitorId?: string;
572
+ /**
573
+ * ID of a site visitor that has logged in to the site.
574
+ * @format GUID
575
+ */
576
+ memberId?: string;
577
+ /**
578
+ * ID of a Wix user (site owner, contributor, etc.).
579
+ * @format GUID
580
+ */
581
+ wixUserId?: string;
582
+ /**
583
+ * ID of an app.
584
+ * @format GUID
585
+ */
586
+ appId?: string;
587
+ /** @readonly */
588
+ identityType?: WebhookIdentityTypeWithLiterals;
589
+ }
590
+ /** @oneof */
591
+ interface IdentificationDataIdOneOf {
592
+ /**
593
+ * ID of a site visitor that has not logged in to the site.
594
+ * @format GUID
595
+ */
596
+ anonymousVisitorId?: string;
597
+ /**
598
+ * ID of a site visitor that has logged in to the site.
599
+ * @format GUID
600
+ */
601
+ memberId?: string;
602
+ /**
603
+ * ID of a Wix user (site owner, contributor, etc.).
604
+ * @format GUID
605
+ */
606
+ wixUserId?: string;
607
+ /**
608
+ * ID of an app.
609
+ * @format GUID
610
+ */
611
+ appId?: string;
612
+ }
613
+ declare enum WebhookIdentityType {
614
+ UNKNOWN = "UNKNOWN",
615
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
616
+ MEMBER = "MEMBER",
617
+ WIX_USER = "WIX_USER",
618
+ APP = "APP"
619
+ }
620
+ /** @enumType */
621
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
462
622
 
463
623
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
464
624
  getUrl: (context: any) => string;
@@ -482,4 +642,4 @@ declare function deleteLoyaltyCoupon(): __PublicMethodMetaInfo<'DELETE', {
482
642
  id: string;
483
643
  }, DeleteLoyaltyCouponRequest$1, DeleteLoyaltyCouponRequest, DeleteLoyaltyCouponResponse$1, DeleteLoyaltyCouponResponse>;
484
644
 
485
- export { type __PublicMethodMetaInfo, bulkGetLoyaltyCoupon, deleteLoyaltyCoupon, getCurrentMemberCoupons, getLoyaltyCoupon, queryLoyaltyCoupons, redeemCurrentMemberPointsForCoupon, redeemPointsForCoupon };
645
+ export { type ActionEvent as ActionEventOriginal, type BulkGetLoyaltyCouponRequest as BulkGetLoyaltyCouponRequestOriginal, type BulkGetLoyaltyCouponResponse as BulkGetLoyaltyCouponResponseOriginal, type BuyXGetY as BuyXGetYOriginal, type CouponReference as CouponReferenceOriginal, type CouponsInSite as CouponsInSiteOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteLoyaltyCouponRequest as DeleteLoyaltyCouponRequestOriginal, type DeleteLoyaltyCouponResponse as DeleteLoyaltyCouponResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetCurrentMemberCouponsRequest as GetCurrentMemberCouponsRequestOriginal, type GetCurrentMemberCouponsResponse as GetCurrentMemberCouponsResponseOriginal, type GetLoyaltyCouponRequest as GetLoyaltyCouponRequestOriginal, type GetLoyaltyCouponResponse as GetLoyaltyCouponResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type LoyaltyCoupon as LoyaltyCouponOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type QueryLoyaltyCouponRequest as QueryLoyaltyCouponRequestOriginal, type QueryLoyaltyCouponResponse as QueryLoyaltyCouponResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type RedeemCurrentMemberPointsForCouponRequest as RedeemCurrentMemberPointsForCouponRequestOriginal, type RedeemCurrentMemberPointsForCouponResponse as RedeemCurrentMemberPointsForCouponResponseOriginal, type RedeemMemberPointsForDiscountAmountCouponRequest as RedeemMemberPointsForDiscountAmountCouponRequestOriginal, type RedeemMemberPointsForDiscountAmountCouponResponse as RedeemMemberPointsForDiscountAmountCouponResponseOriginal, type RedeemPointsForCouponRequest as RedeemPointsForCouponRequestOriginal, type RedeemPointsForCouponResponse as RedeemPointsForCouponResponseOriginal, type RestoreInfo as RestoreInfoOriginal, type Scope as ScopeOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type Specification as SpecificationOriginal, type SpecificationScopeOrMinSubtotalOneOf as SpecificationScopeOrMinSubtotalOneOfOriginal, type SpecificationTypeDetailsOneOf as SpecificationTypeDetailsOneOfOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkGetLoyaltyCoupon, deleteLoyaltyCoupon, getCurrentMemberCoupons, getLoyaltyCoupon, queryLoyaltyCoupons, redeemCurrentMemberPointsForCoupon, redeemPointsForCoupon };