@wix/auto_sdk_pricing-plans_orders 1.0.92 → 1.0.94

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +153 -153
  2. package/build/cjs/index.js +711 -711
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +804 -804
  5. package/build/cjs/index.typings.js +577 -577
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +464 -464
  8. package/build/cjs/meta.js +403 -403
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +153 -153
  11. package/build/es/index.mjs +711 -711
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +804 -804
  14. package/build/es/index.typings.mjs +577 -577
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +464 -464
  17. package/build/es/meta.mjs +403 -403
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +153 -153
  20. package/build/internal/cjs/index.js +711 -711
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +804 -804
  23. package/build/internal/cjs/index.typings.js +577 -577
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +464 -464
  26. package/build/internal/cjs/meta.js +403 -403
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +153 -153
  29. package/build/internal/es/index.mjs +711 -711
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +804 -804
  32. package/build/internal/es/index.typings.mjs +577 -577
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +464 -464
  35. package/build/internal/es/meta.mjs +403 -403
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -626,35 +626,7 @@ interface ActionEvent {
626
626
  }
627
627
  interface Empty {
628
628
  }
629
- interface OrderPurchased {
630
- /** Order that was paid for. If a free or an offline order, the order that was created. */
631
- order?: Order;
632
- }
633
- interface OrderStarted {
634
- /** Order that reached its `startDate`. */
635
- order?: Order;
636
- }
637
- /**
638
- * Triggered at the start of a new payment cycle for an existing order.
639
- *
640
- * This webhook does not trigger at the initial start of an offline order.
641
- */
642
- interface OrderCycleStarted {
643
- /** Order whose new cycle started. */
644
- order?: Order;
645
- /** Number of the payment cycle will be 0 when the order is in the free trial period. In other cases, the cycle number starts from 1. */
646
- cycleNumber?: number;
647
- }
648
- /** Emitted when a recurring order is canceled for the next payment cycle */
649
- interface OrderAutoRenewCanceled {
650
- /** Order that is canceled, effective at the end of the current payment cycle. */
651
- order?: Order;
652
- }
653
- interface OrderEnded {
654
- /** Order that ended. */
655
- order?: Order;
656
- }
657
- interface GetOrderRequest {
629
+ interface MemberGetOrderRequest {
658
630
  /**
659
631
  * Order ID.
660
632
  * @format GUID
@@ -677,44 +649,31 @@ declare enum Set {
677
649
  }
678
650
  /** @enumType */
679
651
  type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
680
- interface GetOrderResponse {
681
- /** Order. */
652
+ interface MemberGetOrderResponse {
653
+ /** Requested order. */
682
654
  order?: Order;
683
655
  }
684
- interface ListOrdersRequest {
685
- /**
686
- * Filter by a buyer's member ID, from the Members API.
687
- * @format GUID
688
- */
689
- buyerIds?: string[];
656
+ interface MemberListOrdersRequest {
690
657
  /**
691
- * Filter by plan IDs, from the Plans API.
658
+ * Filter by plan IDs.
692
659
  * @format GUID
693
660
  */
694
661
  planIds?: string[];
695
- /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
662
+ /** Filter for orders where auto renewal was canceled. */
696
663
  autoRenewCanceled?: boolean | null;
697
664
  /** Filter by order status. */
698
665
  orderStatuses?: OrderStatusWithLiterals[];
699
666
  /** Filter by payment status. */
700
667
  paymentStatuses?: PaymentStatusWithLiterals[];
701
668
  /**
702
- * Number of orders to return. See Sorting and Paging for more information.
703
- *
704
- * Max: `50`
669
+ * Limit the number of pricing plans returned. Default limit is 50.
705
670
  * @min 1
706
671
  * @max 50
707
672
  */
708
673
  limit?: number | null;
709
- /** Number of orders to skip in the current sort order. */
674
+ /** Number of entries to offset. */
710
675
  offset?: number | null;
711
- /**
712
- * Sort order.
713
- *
714
- * Use `ASC` for ascending order or `DESC` for descending order.
715
- *
716
- * Default: `DESC`.
717
- */
676
+ /** Sorting direction (defaults to ASC) and field to sort by. */
718
677
  sorting?: Sorting;
719
678
  /**
720
679
  * Predefined set of fields to return.
@@ -738,8 +697,8 @@ declare enum SortOrder {
738
697
  }
739
698
  /** @enumType */
740
699
  type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
741
- interface ListOrdersResponse {
742
- /** List of orders. */
700
+ interface MemberListOrdersResponse {
701
+ /** Requested orders. */
743
702
  orders?: Order[];
744
703
  /** Object containing paging-related data (number of orders returned, offset). */
745
704
  pagingMetadata?: PagingMetadataV2;
@@ -768,7 +727,11 @@ interface Cursors {
768
727
  */
769
728
  prev?: string | null;
770
729
  }
771
- interface OrdersQueryOrdersRequest {
730
+ /**
731
+ * TODO: Write orders filter and sort docs page
732
+ * Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
733
+ */
734
+ interface QueryOrdersRequest {
772
735
  /** Query filter. */
773
736
  query?: QueryV2;
774
737
  }
@@ -822,84 +785,22 @@ interface CursorPaging {
822
785
  */
823
786
  cursor?: string | null;
824
787
  }
825
- interface OrdersQueryOrdersResponse {
826
- /** Retrieved orders. */
788
+ interface QueryOrdersResponse {
789
+ /** Order data. */
827
790
  plans?: Order[];
828
791
  /** Paging-related data (number of orders returned, offset). */
829
792
  pagingMetadata?: PagingMetadataV2;
830
793
  }
831
- interface GetOrdersStatsRequest {
832
- }
833
- interface GetOrdersStatsResponse {
834
- /** Total number of orders. */
835
- totalOrderCount?: number;
836
- /** Number of active orders. */
837
- activeOrderCount?: number;
838
- }
839
- interface GetAvailableOrderActionsRequest {
840
- /**
841
- * Order ID.
842
- * @format GUID
843
- */
844
- _id?: string;
845
- }
846
- interface GetAvailableOrderActionsResponse {
847
- /** Whether the order can be suspended. */
848
- suspendable?: boolean;
849
- /** If the order cannot be suspended, a reason is returned here. */
850
- notSuspendableReason?: ReasonNotSuspendableWithLiterals;
851
- /** Whether the order can be canceled by the buyer. */
852
- cancelableByBuyer?: boolean;
853
- }
854
- declare enum ReasonNotSuspendable {
855
- /** Undefined reason. */
856
- UNDEFINED = "UNDEFINED",
857
- /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
858
- PENDING = "PENDING",
859
- /** Trial orders can't be suspended. */
860
- TRIAL = "TRIAL",
861
- /** Canceled orders can't be suspended. */
862
- CANCELED = "CANCELED",
863
- /** Ended orders can't be suspended. */
864
- ENDED = "ENDED",
865
- /** Paid for orders with future start dates can't be suspended. */
866
- NOT_STARTED = "NOT_STARTED",
867
- /** Order is already suspended. */
868
- ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
869
- /** Orders based on recurring payments using older stripe versions can't be suspended. */
870
- OLD_STRIPE = "OLD_STRIPE"
871
- }
872
- /** @enumType */
873
- type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
874
- interface PostponeEndDateRequest {
875
- /**
876
- * Order ID.
877
- * @format GUID
878
- */
879
- _id: string;
880
- /**
881
- * New end date and time.
882
- *
883
- * Must be later than the current end date and time.
884
- */
885
- endDate: Date | null;
886
- }
887
- interface PostponeEndDateResponse {
888
- }
889
- interface OrderEndDatePostponed {
890
- /** Order whose `endDate` was postponed. */
891
- order?: Order;
892
- }
893
- interface CancelOrderRequest {
794
+ interface RequestCancellationRequest {
894
795
  /**
895
796
  * Order ID.
896
797
  * @format GUID
897
798
  */
898
799
  _id: string;
899
- /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
800
+ /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
900
801
  effectiveAt: CancellationEffectiveAtWithLiterals;
901
802
  }
902
- interface CancelOrderResponse {
803
+ interface RequestCancellationResponse {
903
804
  }
904
805
  /**
905
806
  * Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
@@ -910,111 +811,6 @@ interface OrderCanceled {
910
811
  /** Canceled order. */
911
812
  order?: Order;
912
813
  }
913
- interface MarkAsPaidRequest {
914
- /**
915
- * Order ID.
916
- * @format GUID
917
- */
918
- _id: string;
919
- }
920
- interface MarkAsPaidResponse {
921
- }
922
- interface OrderMarkedAsPaid {
923
- /** Order that was marked as paid. */
924
- order?: Order;
925
- }
926
- interface PauseOrderRequest {
927
- /**
928
- * Order ID.
929
- * @format GUID
930
- */
931
- _id: string;
932
- }
933
- interface PauseOrderResponse {
934
- }
935
- interface OrderPaused {
936
- /** Paused order. */
937
- order?: Order;
938
- }
939
- interface BulkPauseOrderRequest {
940
- /**
941
- * List of Order IDs.
942
- * @format GUID
943
- * @minSize 1
944
- * @maxSize 100
945
- */
946
- ids?: string[];
947
- /** Set to true to return Order entity in response. */
948
- returnFullEntity?: boolean;
949
- }
950
- interface BulkPauseOrderResponse {
951
- /** Orders that were paused. */
952
- results?: BulkOrderResult[];
953
- /** Bulk action metadata. */
954
- bulkActionMetadata?: BulkActionMetadata;
955
- }
956
- interface BulkOrderResult {
957
- /** Item metadata */
958
- itemMetadata?: ItemMetadata;
959
- /** The order. */
960
- order?: Order;
961
- }
962
- interface ItemMetadata {
963
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
964
- _id?: string | null;
965
- /** Index of the item within the request array. Allows for correlation between request and response items. */
966
- originalIndex?: number;
967
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
968
- success?: boolean;
969
- /** Details about the error in case of failure. */
970
- error?: ApplicationError;
971
- }
972
- interface ApplicationError {
973
- /** Error code. */
974
- code?: string;
975
- /** Description of the error. */
976
- description?: string;
977
- /** Data related to the error. */
978
- data?: Record<string, any> | null;
979
- }
980
- interface BulkActionMetadata {
981
- /** Number of items that were successfully processed. */
982
- totalSuccesses?: number;
983
- /** Number of items that couldn't be processed. */
984
- totalFailures?: number;
985
- /** Number of failures without details because detailed failure threshold was exceeded. */
986
- undetailedFailures?: number;
987
- }
988
- interface ResumeOrderRequest {
989
- /**
990
- * Order ID.
991
- * @format GUID
992
- */
993
- _id: string;
994
- }
995
- interface ResumeOrderResponse {
996
- }
997
- interface OrderResumed {
998
- /** Resumed order. */
999
- order?: Order;
1000
- }
1001
- interface BulkResumeOrderRequest {
1002
- /**
1003
- * List of Order IDs.
1004
- * @format GUID
1005
- * @minSize 1
1006
- * @maxSize 100
1007
- */
1008
- ids?: string[];
1009
- /** Set to true to return Order entity in response. */
1010
- returnFullEntity?: boolean;
1011
- }
1012
- interface BulkResumeOrderResponse {
1013
- /** Orders that were resumed. */
1014
- results?: BulkOrderResult[];
1015
- /** Bulk action metadata. */
1016
- bulkActionMetadata?: BulkActionMetadata;
1017
- }
1018
814
  interface MessageEnvelope {
1019
815
  /**
1020
816
  * App instance ID.
@@ -1087,110 +883,33 @@ declare enum WebhookIdentityType {
1087
883
  }
1088
884
  /** @enumType */
1089
885
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1090
- interface AccountDetails {
886
+ interface AccountInfo {
1091
887
  /**
1092
- * ID of the account.
888
+ * ID of the Wix account associated with the event.
1093
889
  * @format GUID
1094
890
  */
1095
891
  accountId?: string | null;
1096
892
  /**
1097
- * ID of the parent account.
893
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
1098
894
  * @format GUID
1099
895
  */
1100
896
  parentAccountId?: string | null;
1101
897
  /**
1102
- * ID of the site, if applicable.
898
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
1103
899
  * @format GUID
1104
900
  */
1105
901
  siteId?: string | null;
1106
902
  }
1107
- interface MemberGetOrderRequest {
903
+ interface CreateOnlineOrderRequest {
1108
904
  /**
1109
- * Order ID.
905
+ * Plan ID.
1110
906
  * @format GUID
1111
907
  */
1112
- _id: string;
908
+ planId: string;
1113
909
  /**
1114
- * Predefined set of fields to return.
910
+ * Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
1115
911
  *
1116
- * Default: If `fieldSet` is omitted, no order form submission data is returned.
1117
- */
1118
- fieldSet?: SetWithLiterals;
1119
- }
1120
- interface MemberGetOrderResponse {
1121
- /** Requested order. */
1122
- order?: Order;
1123
- }
1124
- interface MemberListOrdersRequest {
1125
- /**
1126
- * Filter by plan IDs.
1127
- * @format GUID
1128
- */
1129
- planIds?: string[];
1130
- /** Filter for orders where auto renewal was canceled. */
1131
- autoRenewCanceled?: boolean | null;
1132
- /** Filter by order status. */
1133
- orderStatuses?: OrderStatusWithLiterals[];
1134
- /** Filter by payment status. */
1135
- paymentStatuses?: PaymentStatusWithLiterals[];
1136
- /**
1137
- * Limit the number of pricing plans returned. Default limit is 50.
1138
- * @min 1
1139
- * @max 50
1140
- */
1141
- limit?: number | null;
1142
- /** Number of entries to offset. */
1143
- offset?: number | null;
1144
- /** Sorting direction (defaults to ASC) and field to sort by. */
1145
- sorting?: Sorting;
1146
- /**
1147
- * Predefined set of fields to return.
1148
- *
1149
- * Default: If `fieldSet` is omitted, no order form submission data is returned.
1150
- */
1151
- fieldSet?: SetWithLiterals;
1152
- }
1153
- interface MemberListOrdersResponse {
1154
- /** Requested orders. */
1155
- orders?: Order[];
1156
- /** Object containing paging-related data (number of orders returned, offset). */
1157
- pagingMetadata?: PagingMetadataV2;
1158
- }
1159
- /**
1160
- * TODO: Write orders filter and sort docs page
1161
- * Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
1162
- */
1163
- interface QueryOrdersRequest {
1164
- /** Query filter. */
1165
- query?: QueryV2;
1166
- }
1167
- interface QueryOrdersResponse {
1168
- /** Order data. */
1169
- plans?: Order[];
1170
- /** Paging-related data (number of orders returned, offset). */
1171
- pagingMetadata?: PagingMetadataV2;
1172
- }
1173
- interface RequestCancellationRequest {
1174
- /**
1175
- * Order ID.
1176
- * @format GUID
1177
- */
1178
- _id: string;
1179
- /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
1180
- effectiveAt: CancellationEffectiveAtWithLiterals;
1181
- }
1182
- interface RequestCancellationResponse {
1183
- }
1184
- interface CreateOnlineOrderRequest {
1185
- /**
1186
- * Plan ID.
1187
- * @format GUID
1188
- */
1189
- planId: string;
1190
- /**
1191
- * Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
1192
- *
1193
- * Default: Current date and time.
912
+ * Default: Current date and time.
1194
913
  */
1195
914
  startDate?: Date | null;
1196
915
  /**
@@ -1484,185 +1203,466 @@ interface SetSubmissionResponse {
1484
1203
  /** Order with submission id */
1485
1204
  order?: Order;
1486
1205
  }
1487
- /** @docsIgnore */
1488
- type CreateOnlineOrderApplicationErrors = {
1489
- code?: 'MEMBER_REQUIRED';
1490
- description?: string;
1491
- data?: Record<string, any>;
1492
- } | {
1493
- code?: 'archived_plan';
1494
- description?: string;
1495
- data?: Record<string, any>;
1496
- } | {
1497
- code?: 'member_not_found';
1498
- description?: string;
1499
- data?: Record<string, any>;
1500
- } | {
1501
- code?: 'purchases_limit_reached';
1502
- description?: string;
1503
- data?: Record<string, any>;
1504
- } | {
1505
- code?: 'buyer_can_not_pick_future_start_date';
1506
- description?: string;
1507
- data?: Record<string, any>;
1508
- } | {
1509
- code?: 'invalid_start_date';
1510
- description?: string;
1511
- data?: Record<string, any>;
1512
- } | {
1513
- code?: 'accept_payment_feature_missing';
1514
- description?: string;
1515
- data?: Record<string, any>;
1516
- } | {
1517
- code?: 'meta_site_id_missing';
1518
- description?: string;
1519
- data?: Record<string, any>;
1520
- } | {
1521
- code?: 'ERROR_COUPON_IS_DISABLED';
1522
- description?: string;
1523
- data?: CouponsError;
1524
- } | {
1525
- code?: 'ERROR_COUPON_USAGE_EXCEEDED';
1526
- description?: string;
1527
- data?: CouponsError;
1528
- } | {
1529
- code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';
1530
- description?: string;
1531
- data?: CouponsError;
1532
- } | {
1533
- code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';
1534
- description?: string;
1535
- data?: CouponsError;
1536
- } | {
1537
- code?: 'ERROR_COUPON_HAS_EXPIRED';
1538
- description?: string;
1539
- data?: CouponsError;
1540
- } | {
1541
- code?: 'ERROR_COUPON_DOES_NOT_EXIST';
1542
- description?: string;
1543
- data?: CouponsError;
1544
- } | {
1545
- code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';
1546
- description?: string;
1547
- data?: CouponsError;
1548
- } | {
1549
- code?: 'ERROR_INVALID_SUBTOTAL';
1550
- description?: string;
1551
- data?: CouponsError;
1552
- } | {
1553
- code?: 'undefined_not_allowed';
1554
- description?: string;
1555
- data?: Record<string, any>;
1556
- } | {
1557
- code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';
1558
- description?: string;
1559
- data?: Record<string, any>;
1560
- } | {
1561
- code?: 'MISSING_BUSINESS_ADDRESS_STATE';
1562
- description?: string;
1563
- data?: Record<string, any>;
1564
- };
1565
- /** @docsIgnore */
1566
- type CreateOnlineOrderValidationErrors = {
1567
- ruleName?: 'UNKNOWN_ORDER_METHOD';
1568
- } | {
1569
- ruleName?: 'RECURRING_POS_UNSUPPORTED';
1570
- } | {
1571
- ruleName?: 'invalid_sort_field';
1572
- };
1573
- /** @docsIgnore */
1574
- type CreateOfflineOrderApplicationErrors = {
1575
- code?: 'PRICING_PLANS_NOT_INSTALLED';
1576
- description?: string;
1577
- data?: Record<string, any>;
1578
- } | {
1579
- code?: 'meta_site_id_missing';
1580
- description?: string;
1581
- data?: Record<string, any>;
1582
- } | {
1583
- code?: 'ERROR_COUPON_IS_DISABLED';
1584
- description?: string;
1585
- data?: CouponsError;
1586
- } | {
1587
- code?: 'ERROR_COUPON_USAGE_EXCEEDED';
1588
- description?: string;
1589
- data?: CouponsError;
1590
- } | {
1591
- code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';
1592
- description?: string;
1593
- data?: CouponsError;
1594
- } | {
1595
- code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';
1596
- description?: string;
1597
- data?: CouponsError;
1598
- } | {
1599
- code?: 'ERROR_COUPON_HAS_EXPIRED';
1600
- description?: string;
1601
- data?: CouponsError;
1602
- } | {
1603
- code?: 'ERROR_COUPON_DOES_NOT_EXIST';
1604
- description?: string;
1605
- data?: CouponsError;
1606
- } | {
1607
- code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';
1608
- description?: string;
1609
- data?: CouponsError;
1610
- } | {
1611
- code?: 'ERROR_INVALID_SUBTOTAL';
1612
- description?: string;
1613
- data?: CouponsError;
1614
- } | {
1615
- code?: 'undefined_not_allowed';
1616
- description?: string;
1617
- data?: Record<string, any>;
1618
- } | {
1619
- code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';
1620
- description?: string;
1621
- data?: Record<string, any>;
1622
- } | {
1623
- code?: 'MISSING_BUSINESS_ADDRESS_STATE';
1624
- description?: string;
1625
- data?: Record<string, any>;
1626
- };
1627
- /** @docsIgnore */
1628
- type CreateOfflineOrderValidationErrors = {
1629
- ruleName?: 'MEMBER_DOESNT_EXIST';
1630
- } | {
1631
- ruleName?: 'invalid_sort_field';
1632
- };
1633
- /** @docsIgnore */
1634
- type GetOnlineOrderPreviewApplicationErrors = {
1635
- code?: 'PRICING_PLANS_NOT_INSTALLED';
1636
- description?: string;
1637
- data?: Record<string, any>;
1638
- } | {
1639
- code?: 'ERROR_COUPON_IS_DISABLED';
1640
- description?: string;
1641
- data?: CouponsError;
1642
- } | {
1643
- code?: 'ERROR_COUPON_USAGE_EXCEEDED';
1644
- description?: string;
1645
- data?: CouponsError;
1646
- } | {
1647
- code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';
1648
- description?: string;
1649
- data?: CouponsError;
1650
- } | {
1651
- code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';
1652
- description?: string;
1653
- data?: CouponsError;
1654
- } | {
1655
- code?: 'ERROR_COUPON_HAS_EXPIRED';
1656
- description?: string;
1657
- data?: CouponsError;
1658
- } | {
1659
- code?: 'ERROR_COUPON_DOES_NOT_EXIST';
1660
- description?: string;
1661
- data?: CouponsError;
1662
- } | {
1663
- code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';
1664
- description?: string;
1665
- data?: CouponsError;
1206
+ interface OrderPurchased {
1207
+ /** Order that was paid for. If a free or an offline order, the order that was created. */
1208
+ order?: Order;
1209
+ }
1210
+ interface OrderStarted {
1211
+ /** Order that reached its `startDate`. */
1212
+ order?: Order;
1213
+ }
1214
+ /**
1215
+ * Triggered at the start of a new payment cycle for an existing order.
1216
+ *
1217
+ * This webhook does not trigger at the initial start of an offline order.
1218
+ */
1219
+ interface OrderCycleStarted {
1220
+ /** Order whose new cycle started. */
1221
+ order?: Order;
1222
+ /** Number of the payment cycle will be 0 when the order is in the free trial period. In other cases, the cycle number starts from 1. */
1223
+ cycleNumber?: number;
1224
+ }
1225
+ /** Emitted when a recurring order is canceled for the next payment cycle */
1226
+ interface OrderAutoRenewCanceled {
1227
+ /** Order that is canceled, effective at the end of the current payment cycle. */
1228
+ order?: Order;
1229
+ }
1230
+ interface OrderEnded {
1231
+ /** Order that ended. */
1232
+ order?: Order;
1233
+ }
1234
+ interface GetOrderRequest {
1235
+ /**
1236
+ * Order ID.
1237
+ * @format GUID
1238
+ */
1239
+ _id: string;
1240
+ /**
1241
+ * Predefined set of fields to return.
1242
+ *
1243
+ * Default: If `fieldSet` is omitted, no order form submission data is returned.
1244
+ */
1245
+ fieldSet?: SetWithLiterals;
1246
+ }
1247
+ interface GetOrderResponse {
1248
+ /** Order. */
1249
+ order?: Order;
1250
+ }
1251
+ interface ListOrdersRequest {
1252
+ /**
1253
+ * Filter by a buyer's member ID, from the Members API.
1254
+ * @format GUID
1255
+ */
1256
+ buyerIds?: string[];
1257
+ /**
1258
+ * Filter by plan IDs, from the Plans API.
1259
+ * @format GUID
1260
+ */
1261
+ planIds?: string[];
1262
+ /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
1263
+ autoRenewCanceled?: boolean | null;
1264
+ /** Filter by order status. */
1265
+ orderStatuses?: OrderStatusWithLiterals[];
1266
+ /** Filter by payment status. */
1267
+ paymentStatuses?: PaymentStatusWithLiterals[];
1268
+ /**
1269
+ * Number of orders to return. See Sorting and Paging for more information.
1270
+ *
1271
+ * Max: `50`
1272
+ * @min 1
1273
+ * @max 50
1274
+ */
1275
+ limit?: number | null;
1276
+ /** Number of orders to skip in the current sort order. */
1277
+ offset?: number | null;
1278
+ /**
1279
+ * Sort order.
1280
+ *
1281
+ * Use `ASC` for ascending order or `DESC` for descending order.
1282
+ *
1283
+ * Default: `DESC`.
1284
+ */
1285
+ sorting?: Sorting;
1286
+ /**
1287
+ * Predefined set of fields to return.
1288
+ *
1289
+ * Default: If `fieldSet` is omitted, no order form submission data is returned.
1290
+ */
1291
+ fieldSet?: SetWithLiterals;
1292
+ }
1293
+ interface ListOrdersResponse {
1294
+ /** List of orders. */
1295
+ orders?: Order[];
1296
+ /** Object containing paging-related data (number of orders returned, offset). */
1297
+ pagingMetadata?: PagingMetadataV2;
1298
+ }
1299
+ interface OrdersQueryOrdersRequest {
1300
+ /** Query filter. */
1301
+ query?: QueryV2;
1302
+ }
1303
+ interface OrdersQueryOrdersResponse {
1304
+ /** Retrieved orders. */
1305
+ plans?: Order[];
1306
+ /** Paging-related data (number of orders returned, offset). */
1307
+ pagingMetadata?: PagingMetadataV2;
1308
+ }
1309
+ interface GetOrdersStatsRequest {
1310
+ }
1311
+ interface GetOrdersStatsResponse {
1312
+ /** Total number of orders. */
1313
+ totalOrderCount?: number;
1314
+ /** Number of active orders. */
1315
+ activeOrderCount?: number;
1316
+ }
1317
+ interface GetAvailableOrderActionsRequest {
1318
+ /**
1319
+ * Order ID.
1320
+ * @format GUID
1321
+ */
1322
+ _id?: string;
1323
+ }
1324
+ interface GetAvailableOrderActionsResponse {
1325
+ /** Whether the order can be suspended. */
1326
+ suspendable?: boolean;
1327
+ /** If the order cannot be suspended, a reason is returned here. */
1328
+ notSuspendableReason?: ReasonNotSuspendableWithLiterals;
1329
+ /** Whether the order can be canceled by the buyer. */
1330
+ cancelableByBuyer?: boolean;
1331
+ }
1332
+ declare enum ReasonNotSuspendable {
1333
+ /** Undefined reason. */
1334
+ UNDEFINED = "UNDEFINED",
1335
+ /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
1336
+ PENDING = "PENDING",
1337
+ /** Trial orders can't be suspended. */
1338
+ TRIAL = "TRIAL",
1339
+ /** Canceled orders can't be suspended. */
1340
+ CANCELED = "CANCELED",
1341
+ /** Ended orders can't be suspended. */
1342
+ ENDED = "ENDED",
1343
+ /** Paid for orders with future start dates can't be suspended. */
1344
+ NOT_STARTED = "NOT_STARTED",
1345
+ /** Order is already suspended. */
1346
+ ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
1347
+ /** Orders based on recurring payments using older stripe versions can't be suspended. */
1348
+ OLD_STRIPE = "OLD_STRIPE"
1349
+ }
1350
+ /** @enumType */
1351
+ type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
1352
+ interface PostponeEndDateRequest {
1353
+ /**
1354
+ * Order ID.
1355
+ * @format GUID
1356
+ */
1357
+ _id: string;
1358
+ /**
1359
+ * New end date and time.
1360
+ *
1361
+ * Must be later than the current end date and time.
1362
+ */
1363
+ endDate: Date | null;
1364
+ }
1365
+ interface PostponeEndDateResponse {
1366
+ }
1367
+ interface OrderEndDatePostponed {
1368
+ /** Order whose `endDate` was postponed. */
1369
+ order?: Order;
1370
+ }
1371
+ interface CancelOrderRequest {
1372
+ /**
1373
+ * Order ID.
1374
+ * @format GUID
1375
+ */
1376
+ _id: string;
1377
+ /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
1378
+ effectiveAt: CancellationEffectiveAtWithLiterals;
1379
+ }
1380
+ interface CancelOrderResponse {
1381
+ }
1382
+ interface MarkAsPaidRequest {
1383
+ /**
1384
+ * Order ID.
1385
+ * @format GUID
1386
+ */
1387
+ _id: string;
1388
+ }
1389
+ interface MarkAsPaidResponse {
1390
+ }
1391
+ interface OrderMarkedAsPaid {
1392
+ /** Order that was marked as paid. */
1393
+ order?: Order;
1394
+ }
1395
+ interface PauseOrderRequest {
1396
+ /**
1397
+ * Order ID.
1398
+ * @format GUID
1399
+ */
1400
+ _id: string;
1401
+ }
1402
+ interface PauseOrderResponse {
1403
+ }
1404
+ interface OrderPaused {
1405
+ /** Paused order. */
1406
+ order?: Order;
1407
+ }
1408
+ interface BulkPauseOrderRequest {
1409
+ /**
1410
+ * List of Order IDs.
1411
+ * @format GUID
1412
+ * @minSize 1
1413
+ * @maxSize 100
1414
+ */
1415
+ ids?: string[];
1416
+ /** Set to true to return Order entity in response. */
1417
+ returnFullEntity?: boolean;
1418
+ }
1419
+ interface BulkPauseOrderResponse {
1420
+ /** Orders that were paused. */
1421
+ results?: BulkOrderResult[];
1422
+ /** Bulk action metadata. */
1423
+ bulkActionMetadata?: BulkActionMetadata;
1424
+ }
1425
+ interface BulkOrderResult {
1426
+ /** Item metadata */
1427
+ itemMetadata?: ItemMetadata;
1428
+ /** The order. */
1429
+ order?: Order;
1430
+ }
1431
+ interface ItemMetadata {
1432
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1433
+ _id?: string | null;
1434
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1435
+ originalIndex?: number;
1436
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1437
+ success?: boolean;
1438
+ /** Details about the error in case of failure. */
1439
+ error?: ApplicationError;
1440
+ }
1441
+ interface ApplicationError {
1442
+ /** Error code. */
1443
+ code?: string;
1444
+ /** Description of the error. */
1445
+ description?: string;
1446
+ /** Data related to the error. */
1447
+ data?: Record<string, any> | null;
1448
+ }
1449
+ interface BulkActionMetadata {
1450
+ /** Number of items that were successfully processed. */
1451
+ totalSuccesses?: number;
1452
+ /** Number of items that couldn't be processed. */
1453
+ totalFailures?: number;
1454
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1455
+ undetailedFailures?: number;
1456
+ }
1457
+ interface ResumeOrderRequest {
1458
+ /**
1459
+ * Order ID.
1460
+ * @format GUID
1461
+ */
1462
+ _id: string;
1463
+ }
1464
+ interface ResumeOrderResponse {
1465
+ }
1466
+ interface OrderResumed {
1467
+ /** Resumed order. */
1468
+ order?: Order;
1469
+ }
1470
+ interface BulkResumeOrderRequest {
1471
+ /**
1472
+ * List of Order IDs.
1473
+ * @format GUID
1474
+ * @minSize 1
1475
+ * @maxSize 100
1476
+ */
1477
+ ids?: string[];
1478
+ /** Set to true to return Order entity in response. */
1479
+ returnFullEntity?: boolean;
1480
+ }
1481
+ interface BulkResumeOrderResponse {
1482
+ /** Orders that were resumed. */
1483
+ results?: BulkOrderResult[];
1484
+ /** Bulk action metadata. */
1485
+ bulkActionMetadata?: BulkActionMetadata;
1486
+ }
1487
+ /** @docsIgnore */
1488
+ type CreateOnlineOrderApplicationErrors = {
1489
+ code?: 'MEMBER_REQUIRED';
1490
+ description?: string;
1491
+ data?: Record<string, any>;
1492
+ } | {
1493
+ code?: 'archived_plan';
1494
+ description?: string;
1495
+ data?: Record<string, any>;
1496
+ } | {
1497
+ code?: 'member_not_found';
1498
+ description?: string;
1499
+ data?: Record<string, any>;
1500
+ } | {
1501
+ code?: 'purchases_limit_reached';
1502
+ description?: string;
1503
+ data?: Record<string, any>;
1504
+ } | {
1505
+ code?: 'buyer_can_not_pick_future_start_date';
1506
+ description?: string;
1507
+ data?: Record<string, any>;
1508
+ } | {
1509
+ code?: 'invalid_start_date';
1510
+ description?: string;
1511
+ data?: Record<string, any>;
1512
+ } | {
1513
+ code?: 'accept_payment_feature_missing';
1514
+ description?: string;
1515
+ data?: Record<string, any>;
1516
+ } | {
1517
+ code?: 'meta_site_id_missing';
1518
+ description?: string;
1519
+ data?: Record<string, any>;
1520
+ } | {
1521
+ code?: 'ERROR_COUPON_IS_DISABLED';
1522
+ description?: string;
1523
+ data?: CouponsError;
1524
+ } | {
1525
+ code?: 'ERROR_COUPON_USAGE_EXCEEDED';
1526
+ description?: string;
1527
+ data?: CouponsError;
1528
+ } | {
1529
+ code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';
1530
+ description?: string;
1531
+ data?: CouponsError;
1532
+ } | {
1533
+ code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';
1534
+ description?: string;
1535
+ data?: CouponsError;
1536
+ } | {
1537
+ code?: 'ERROR_COUPON_HAS_EXPIRED';
1538
+ description?: string;
1539
+ data?: CouponsError;
1540
+ } | {
1541
+ code?: 'ERROR_COUPON_DOES_NOT_EXIST';
1542
+ description?: string;
1543
+ data?: CouponsError;
1544
+ } | {
1545
+ code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';
1546
+ description?: string;
1547
+ data?: CouponsError;
1548
+ } | {
1549
+ code?: 'ERROR_INVALID_SUBTOTAL';
1550
+ description?: string;
1551
+ data?: CouponsError;
1552
+ } | {
1553
+ code?: 'undefined_not_allowed';
1554
+ description?: string;
1555
+ data?: Record<string, any>;
1556
+ } | {
1557
+ code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';
1558
+ description?: string;
1559
+ data?: Record<string, any>;
1560
+ } | {
1561
+ code?: 'MISSING_BUSINESS_ADDRESS_STATE';
1562
+ description?: string;
1563
+ data?: Record<string, any>;
1564
+ };
1565
+ /** @docsIgnore */
1566
+ type CreateOnlineOrderValidationErrors = {
1567
+ ruleName?: 'UNKNOWN_ORDER_METHOD';
1568
+ } | {
1569
+ ruleName?: 'RECURRING_POS_UNSUPPORTED';
1570
+ } | {
1571
+ ruleName?: 'invalid_sort_field';
1572
+ };
1573
+ /** @docsIgnore */
1574
+ type CreateOfflineOrderApplicationErrors = {
1575
+ code?: 'PRICING_PLANS_NOT_INSTALLED';
1576
+ description?: string;
1577
+ data?: Record<string, any>;
1578
+ } | {
1579
+ code?: 'meta_site_id_missing';
1580
+ description?: string;
1581
+ data?: Record<string, any>;
1582
+ } | {
1583
+ code?: 'ERROR_COUPON_IS_DISABLED';
1584
+ description?: string;
1585
+ data?: CouponsError;
1586
+ } | {
1587
+ code?: 'ERROR_COUPON_USAGE_EXCEEDED';
1588
+ description?: string;
1589
+ data?: CouponsError;
1590
+ } | {
1591
+ code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';
1592
+ description?: string;
1593
+ data?: CouponsError;
1594
+ } | {
1595
+ code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';
1596
+ description?: string;
1597
+ data?: CouponsError;
1598
+ } | {
1599
+ code?: 'ERROR_COUPON_HAS_EXPIRED';
1600
+ description?: string;
1601
+ data?: CouponsError;
1602
+ } | {
1603
+ code?: 'ERROR_COUPON_DOES_NOT_EXIST';
1604
+ description?: string;
1605
+ data?: CouponsError;
1606
+ } | {
1607
+ code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';
1608
+ description?: string;
1609
+ data?: CouponsError;
1610
+ } | {
1611
+ code?: 'ERROR_INVALID_SUBTOTAL';
1612
+ description?: string;
1613
+ data?: CouponsError;
1614
+ } | {
1615
+ code?: 'undefined_not_allowed';
1616
+ description?: string;
1617
+ data?: Record<string, any>;
1618
+ } | {
1619
+ code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';
1620
+ description?: string;
1621
+ data?: Record<string, any>;
1622
+ } | {
1623
+ code?: 'MISSING_BUSINESS_ADDRESS_STATE';
1624
+ description?: string;
1625
+ data?: Record<string, any>;
1626
+ };
1627
+ /** @docsIgnore */
1628
+ type CreateOfflineOrderValidationErrors = {
1629
+ ruleName?: 'MEMBER_DOESNT_EXIST';
1630
+ } | {
1631
+ ruleName?: 'invalid_sort_field';
1632
+ };
1633
+ /** @docsIgnore */
1634
+ type GetOnlineOrderPreviewApplicationErrors = {
1635
+ code?: 'PRICING_PLANS_NOT_INSTALLED';
1636
+ description?: string;
1637
+ data?: Record<string, any>;
1638
+ } | {
1639
+ code?: 'ERROR_COUPON_IS_DISABLED';
1640
+ description?: string;
1641
+ data?: CouponsError;
1642
+ } | {
1643
+ code?: 'ERROR_COUPON_USAGE_EXCEEDED';
1644
+ description?: string;
1645
+ data?: CouponsError;
1646
+ } | {
1647
+ code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';
1648
+ description?: string;
1649
+ data?: CouponsError;
1650
+ } | {
1651
+ code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';
1652
+ description?: string;
1653
+ data?: CouponsError;
1654
+ } | {
1655
+ code?: 'ERROR_COUPON_HAS_EXPIRED';
1656
+ description?: string;
1657
+ data?: CouponsError;
1658
+ } | {
1659
+ code?: 'ERROR_COUPON_DOES_NOT_EXIST';
1660
+ description?: string;
1661
+ data?: CouponsError;
1662
+ } | {
1663
+ code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';
1664
+ description?: string;
1665
+ data?: CouponsError;
1666
1666
  } | {
1667
1667
  code?: 'ERROR_INVALID_SUBTOTAL';
1668
1668
  description?: string;
@@ -1824,31 +1824,6 @@ interface EventMetadata extends BaseEventMetadata {
1824
1824
  */
1825
1825
  entityEventSequence?: string | null;
1826
1826
  }
1827
- interface OrderAutoRenewCanceledEnvelope {
1828
- data: OrderAutoRenewCanceled;
1829
- metadata: EventMetadata;
1830
- }
1831
- /**
1832
- * Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
1833
- *
1834
- * This webhook is *not* triggered in the following scenarios:
1835
- * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
1836
- * + When an order expires at the end of the current payment cycle because it was canceled and `effectiveAt` was set to `NEXT_PAYMENT_DATE`. Instead, at the time of expiration, Order Canceled and Order Ended are triggered.
1837
- * @permissionScope Manage Orders
1838
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1839
- * @permissionScope Read Orders
1840
- * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1841
- * @permissionScope Manage plans and orders of Pricing Plans
1842
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
1843
- * @permissionScope Manage Events
1844
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1845
- * @permissionId PRICING_PLANS.READ_ORDERS
1846
- * @webhook
1847
- * @eventType wix.pricing_plans.v2.order_auto_renew_canceled
1848
- * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
1849
- * @slug auto_renew_canceled
1850
- */
1851
- declare function onOrderAutoRenewCanceled(handler: (event: OrderAutoRenewCanceledEnvelope) => void | Promise<void>): void;
1852
1827
  interface OrderCanceledEnvelope {
1853
1828
  data: OrderCanceled;
1854
1829
  metadata: EventMetadata;
@@ -1870,64 +1845,16 @@ interface OrderCanceledEnvelope {
1870
1845
  * @permissionId PRICING_PLANS.READ_ORDERS
1871
1846
  * @webhook
1872
1847
  * @eventType wix.pricing_plans.v2.order_canceled
1873
- * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
1848
+ * @serviceIdentifier com.wixpress.membership.v2.orders.member.MemberOrdersService
1874
1849
  * @slug canceled
1875
1850
  */
1876
1851
  declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise<void>): void;
1877
- interface OrderCycleStartedEnvelope {
1878
- data: OrderCycleStarted;
1879
- metadata: EventMetadata;
1880
- }
1881
- /**
1882
- * Triggered at the start of a new payment cycle for an existing order.
1883
- *
1884
- * Not triggered at the initial start of an offline order.
1885
- * @permissionScope Manage Orders
1886
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1887
- * @permissionScope Read Orders
1888
- * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1889
- * @permissionScope Manage plans and orders of Pricing Plans
1890
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
1891
- * @permissionScope Manage Events
1892
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1893
- * @permissionId PRICING_PLANS.READ_ORDERS
1894
- * @webhook
1895
- * @eventType wix.pricing_plans.v2.order_cycle_started
1896
- * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
1897
- * @slug cycle_started
1898
- */
1899
- declare function onOrderCycleStarted(handler: (event: OrderCycleStartedEnvelope) => void | Promise<void>): void;
1900
- interface OrderEndDatePostponedEnvelope {
1901
- data: OrderEndDatePostponed;
1902
- metadata: EventMetadata;
1903
- }
1904
- /**
1905
- * Triggered when an order's `endDate` is postponed.
1906
- * @permissionScope Manage Orders
1907
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1908
- * @permissionScope Read Orders
1909
- * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1910
- * @permissionScope Manage plans and orders of Pricing Plans
1911
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
1912
- * @permissionScope Manage Events
1913
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1914
- * @permissionId PRICING_PLANS.READ_ORDERS
1915
- * @webhook
1916
- * @eventType wix.pricing_plans.v2.order_end_date_postponed
1917
- * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
1918
- * @slug end_date_postponed
1919
- */
1920
- declare function onOrderEndDatePostponed(handler: (event: OrderEndDatePostponedEnvelope) => void | Promise<void>): void;
1921
- interface OrderEndedEnvelope {
1922
- data: OrderEnded;
1852
+ interface OrderCreatedEnvelope {
1853
+ entity: Order;
1923
1854
  metadata: EventMetadata;
1924
1855
  }
1925
1856
  /**
1926
- * Triggered when an order ends.
1927
- *
1928
- * This webhook is triggered:
1929
- * + When an order expires at the end of the current payment cycle.
1930
- * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`.
1857
+ * Triggered when an order is created.
1931
1858
  * @permissionScope Manage Orders
1932
1859
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1933
1860
  * @permissionScope Read Orders
@@ -1938,17 +1865,17 @@ interface OrderEndedEnvelope {
1938
1865
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1939
1866
  * @permissionId PRICING_PLANS.READ_ORDERS
1940
1867
  * @webhook
1941
- * @eventType wix.pricing_plans.v2.order_ended
1942
- * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
1943
- * @slug ended
1868
+ * @eventType wix.pricing_plans.v2.order_created
1869
+ * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
1870
+ * @slug created
1944
1871
  */
1945
- declare function onOrderEnded(handler: (event: OrderEndedEnvelope) => void | Promise<void>): void;
1946
- interface OrderMarkedAsPaidEnvelope {
1947
- data: OrderMarkedAsPaid;
1872
+ declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
1873
+ interface OrderStartDateChangedEnvelope {
1874
+ data: OrderStartDateChanged;
1948
1875
  metadata: EventMetadata;
1949
1876
  }
1950
1877
  /**
1951
- * Triggered when an offline order is marked as paid.
1878
+ * Triggered when an order's `startDate` is changed.
1952
1879
  * @permissionScope Manage Orders
1953
1880
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1954
1881
  * @permissionScope Read Orders
@@ -1959,17 +1886,25 @@ interface OrderMarkedAsPaidEnvelope {
1959
1886
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1960
1887
  * @permissionId PRICING_PLANS.READ_ORDERS
1961
1888
  * @webhook
1962
- * @eventType wix.pricing_plans.v2.order_marked_as_paid
1963
- * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
1964
- * @slug marked_as_paid
1889
+ * @eventType wix.pricing_plans.v2.order_start_date_changed
1890
+ * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
1891
+ * @slug start_date_changed
1965
1892
  */
1966
- declare function onOrderMarkedAsPaid(handler: (event: OrderMarkedAsPaidEnvelope) => void | Promise<void>): void;
1967
- interface OrderPausedEnvelope {
1968
- data: OrderPaused;
1893
+ declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
1894
+ interface OrderUpdatedEnvelope {
1895
+ entity: Order;
1969
1896
  metadata: EventMetadata;
1970
1897
  }
1971
1898
  /**
1972
- * Triggered when an order is paused.
1899
+ * Triggered for any of the following update events:
1900
+ *
1901
+ * + Order is paid for. Order Purchased is also triggered.
1902
+ * + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
1903
+ * + New payment cycle of an order starts. Order Cycle Started is also triggered.
1904
+ * + Offline order is marked as paid. Order Marked As Paid is also triggered.
1905
+ * + End date of the order is postponed. Order End Date Postponed is also triggered
1906
+ * + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
1907
+ * + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
1973
1908
  * @permissionScope Manage Orders
1974
1909
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1975
1910
  * @permissionScope Read Orders
@@ -1980,21 +1915,21 @@ interface OrderPausedEnvelope {
1980
1915
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1981
1916
  * @permissionId PRICING_PLANS.READ_ORDERS
1982
1917
  * @webhook
1983
- * @eventType wix.pricing_plans.v2.order_paused
1984
- * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
1985
- * @slug paused
1918
+ * @eventType wix.pricing_plans.v2.order_updated
1919
+ * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
1920
+ * @slug updated
1986
1921
  */
1987
- declare function onOrderPaused(handler: (event: OrderPausedEnvelope) => void | Promise<void>): void;
1988
- interface OrderPurchasedEnvelope {
1989
- data: OrderPurchased;
1922
+ declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
1923
+ interface OrderAutoRenewCanceledEnvelope {
1924
+ data: OrderAutoRenewCanceled;
1990
1925
  metadata: EventMetadata;
1991
1926
  }
1992
1927
  /**
1993
- * Triggered for any of the following purchase events:
1994
- * + Order is paid in full.
1995
- * + At least 1 order cycle payment is paid for.
1996
- * + Offline order is created, even if not yet marked as paid.
1997
- * + Free order is created.
1928
+ * Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
1929
+ *
1930
+ * This webhook is *not* triggered in the following scenarios:
1931
+ * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
1932
+ * + When an order expires at the end of the current payment cycle because it was canceled and `effectiveAt` was set to `NEXT_PAYMENT_DATE`. Instead, at the time of expiration, Order Canceled and Order Ended are triggered.
1998
1933
  * @permissionScope Manage Orders
1999
1934
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2000
1935
  * @permissionScope Read Orders
@@ -2005,17 +1940,19 @@ interface OrderPurchasedEnvelope {
2005
1940
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2006
1941
  * @permissionId PRICING_PLANS.READ_ORDERS
2007
1942
  * @webhook
2008
- * @eventType wix.pricing_plans.v2.order_purchased
1943
+ * @eventType wix.pricing_plans.v2.order_auto_renew_canceled
2009
1944
  * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2010
- * @slug purchased
1945
+ * @slug auto_renew_canceled
2011
1946
  */
2012
- declare function onOrderPurchased(handler: (event: OrderPurchasedEnvelope) => void | Promise<void>): void;
2013
- interface OrderResumedEnvelope {
2014
- data: OrderResumed;
1947
+ declare function onOrderAutoRenewCanceled(handler: (event: OrderAutoRenewCanceledEnvelope) => void | Promise<void>): void;
1948
+ interface OrderCycleStartedEnvelope {
1949
+ data: OrderCycleStarted;
2015
1950
  metadata: EventMetadata;
2016
1951
  }
2017
1952
  /**
2018
- * Triggered when a paused order is resumed.
1953
+ * Triggered at the start of a new payment cycle for an existing order.
1954
+ *
1955
+ * Not triggered at the initial start of an offline order.
2019
1956
  * @permissionScope Manage Orders
2020
1957
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2021
1958
  * @permissionScope Read Orders
@@ -2026,17 +1963,17 @@ interface OrderResumedEnvelope {
2026
1963
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2027
1964
  * @permissionId PRICING_PLANS.READ_ORDERS
2028
1965
  * @webhook
2029
- * @eventType wix.pricing_plans.v2.order_resumed
1966
+ * @eventType wix.pricing_plans.v2.order_cycle_started
2030
1967
  * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2031
- * @slug resumed
1968
+ * @slug cycle_started
2032
1969
  */
2033
- declare function onOrderResumed(handler: (event: OrderResumedEnvelope) => void | Promise<void>): void;
2034
- interface OrderStartedEnvelope {
2035
- data: OrderStarted;
1970
+ declare function onOrderCycleStarted(handler: (event: OrderCycleStartedEnvelope) => void | Promise<void>): void;
1971
+ interface OrderEndDatePostponedEnvelope {
1972
+ data: OrderEndDatePostponed;
2036
1973
  metadata: EventMetadata;
2037
1974
  }
2038
1975
  /**
2039
- * Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.
1976
+ * Triggered when an order's `endDate` is postponed.
2040
1977
  * @permissionScope Manage Orders
2041
1978
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2042
1979
  * @permissionScope Read Orders
@@ -2047,25 +1984,21 @@ interface OrderStartedEnvelope {
2047
1984
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2048
1985
  * @permissionId PRICING_PLANS.READ_ORDERS
2049
1986
  * @webhook
2050
- * @eventType wix.pricing_plans.v2.order_started
1987
+ * @eventType wix.pricing_plans.v2.order_end_date_postponed
2051
1988
  * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2052
- * @slug started
1989
+ * @slug end_date_postponed
2053
1990
  */
2054
- declare function onOrderStarted(handler: (event: OrderStartedEnvelope) => void | Promise<void>): void;
2055
- interface OrderUpdatedEnvelope {
2056
- entity: Order;
1991
+ declare function onOrderEndDatePostponed(handler: (event: OrderEndDatePostponedEnvelope) => void | Promise<void>): void;
1992
+ interface OrderEndedEnvelope {
1993
+ data: OrderEnded;
2057
1994
  metadata: EventMetadata;
2058
1995
  }
2059
1996
  /**
2060
- * Triggered for any of the following update events:
1997
+ * Triggered when an order ends.
2061
1998
  *
2062
- * + Order is paid for. Order Purchased is also triggered.
2063
- * + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
2064
- * + New payment cycle of an order starts. Order Cycle Started is also triggered.
2065
- * + Offline order is marked as paid. Order Marked As Paid is also triggered.
2066
- * + End date of the order is postponed. Order End Date Postponed is also triggered
2067
- * + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
2068
- * + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
1999
+ * This webhook is triggered:
2000
+ * + When an order expires at the end of the current payment cycle.
2001
+ * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`.
2069
2002
  * @permissionScope Manage Orders
2070
2003
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2071
2004
  * @permissionScope Read Orders
@@ -2076,17 +2009,17 @@ interface OrderUpdatedEnvelope {
2076
2009
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2077
2010
  * @permissionId PRICING_PLANS.READ_ORDERS
2078
2011
  * @webhook
2079
- * @eventType wix.pricing_plans.v2.order_updated
2012
+ * @eventType wix.pricing_plans.v2.order_ended
2080
2013
  * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2081
- * @slug updated
2014
+ * @slug ended
2082
2015
  */
2083
- declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
2084
- interface OrderCreatedEnvelope {
2085
- entity: Order;
2016
+ declare function onOrderEnded(handler: (event: OrderEndedEnvelope) => void | Promise<void>): void;
2017
+ interface OrderMarkedAsPaidEnvelope {
2018
+ data: OrderMarkedAsPaid;
2086
2019
  metadata: EventMetadata;
2087
2020
  }
2088
2021
  /**
2089
- * Triggered when an order is created.
2022
+ * Triggered when an offline order is marked as paid.
2090
2023
  * @permissionScope Manage Orders
2091
2024
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2092
2025
  * @permissionScope Read Orders
@@ -2097,17 +2030,17 @@ interface OrderCreatedEnvelope {
2097
2030
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2098
2031
  * @permissionId PRICING_PLANS.READ_ORDERS
2099
2032
  * @webhook
2100
- * @eventType wix.pricing_plans.v2.order_created
2101
- * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
2102
- * @slug created
2033
+ * @eventType wix.pricing_plans.v2.order_marked_as_paid
2034
+ * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2035
+ * @slug marked_as_paid
2103
2036
  */
2104
- declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
2105
- interface OrderStartDateChangedEnvelope {
2106
- data: OrderStartDateChanged;
2037
+ declare function onOrderMarkedAsPaid(handler: (event: OrderMarkedAsPaidEnvelope) => void | Promise<void>): void;
2038
+ interface OrderPausedEnvelope {
2039
+ data: OrderPaused;
2107
2040
  metadata: EventMetadata;
2108
2041
  }
2109
2042
  /**
2110
- * Triggered when an order's `startDate` is changed.
2043
+ * Triggered when an order is paused.
2111
2044
  * @permissionScope Manage Orders
2112
2045
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2113
2046
  * @permissionScope Read Orders
@@ -2118,185 +2051,78 @@ interface OrderStartDateChangedEnvelope {
2118
2051
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2119
2052
  * @permissionId PRICING_PLANS.READ_ORDERS
2120
2053
  * @webhook
2121
- * @eventType wix.pricing_plans.v2.order_start_date_changed
2122
- * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
2123
- * @slug start_date_changed
2124
- */
2125
- declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
2126
- /**
2127
- * Retrieves an order by ID.
2128
- * @param _id - Order ID.
2129
- * @public
2130
- * @requiredField _id
2131
- * @param options - Options to use when getting an order.
2132
- * @permissionId PRICING_PLANS.READ_ORDERS
2133
- * @applicableIdentity APP
2134
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
2135
- */
2136
- declare function managementGetOrder(_id: string, options?: ManagementGetOrderOptions): Promise<NonNullablePaths<GetOrderResponse, `order._id` | `order.planId` | `order.subscriptionId` | `order.buyer.memberId` | `order.buyer.contactId` | `order.priceDetails.subscription.cycleDuration.unit` | `order.priceDetails.subtotal` | `order.priceDetails.discount` | `order.priceDetails.tax.name` | `order.priceDetails.tax.includedInPrice` | `order.priceDetails.tax.rate` | `order.priceDetails.tax.amount` | `order.priceDetails.total` | `order.priceDetails.planPrice` | `order.priceDetails.currency` | `order.priceDetails.coupon.code` | `order.priceDetails.coupon.amount` | `order.priceDetails.coupon._id` | `order.pricing.prices` | `order.pricing.prices.${number}.duration.cycleFrom` | `order.pricing.prices.${number}.price.subtotal` | `order.pricing.prices.${number}.price.discount` | `order.pricing.prices.${number}.price.total` | `order.pricing.prices.${number}.price.currency` | `order.pricing.prices.${number}.price.proration` | `order.type` | `order.status` | `order.cancellation.cause` | `order.cancellation.effectiveAt` | `order.lastPaymentStatus` | `order.pausePeriods` | `order.pausePeriods.${number}.status` | `order.currentCycle.index` | `order.planName` | `order.planDescription` | `order.planPrice`, 7>>;
2137
- interface ManagementGetOrderOptions {
2138
- /**
2139
- * Predefined set of fields to return.
2140
- *
2141
- * Default: If `fieldSet` is omitted, no order form submission data is returned.
2142
- */
2143
- fieldSet?: SetWithLiterals;
2144
- }
2145
- /**
2146
- * Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
2147
- *
2148
- * By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
2149
- * `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
2150
- * @public
2151
- * @param options - Filtering, sorting, and pagination options.
2152
- * @permissionId PRICING_PLANS.READ_ORDERS
2153
- * @applicableIdentity APP
2154
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
2054
+ * @eventType wix.pricing_plans.v2.order_paused
2055
+ * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2056
+ * @slug paused
2155
2057
  */
2156
- declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<NonNullablePaths<ListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 6>>;
2157
- interface ManagementListOrdersOptions {
2158
- /**
2159
- * Filter by a buyer's member ID, from the Members API.
2160
- * @format GUID
2161
- */
2162
- buyerIds?: string[];
2163
- /**
2164
- * Filter by plan IDs, from the Plans API.
2165
- * @format GUID
2166
- */
2167
- planIds?: string[];
2168
- /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
2169
- autoRenewCanceled?: boolean | null;
2170
- /** Filter by order status. */
2171
- orderStatuses?: OrderStatusWithLiterals[];
2172
- /** Filter by payment status. */
2173
- paymentStatuses?: PaymentStatusWithLiterals[];
2174
- /**
2175
- * Number of orders to return. See Sorting and Paging for more information.
2176
- *
2177
- * Max: `50`
2178
- * @min 1
2179
- * @max 50
2180
- */
2181
- limit?: number | null;
2182
- /** Number of orders to skip in the current sort order. */
2183
- offset?: number | null;
2184
- /**
2185
- * Sort order.
2186
- *
2187
- * Use `ASC` for ascending order or `DESC` for descending order.
2188
- *
2189
- * Default: `DESC`.
2190
- */
2191
- sorting?: Sorting;
2192
- /**
2193
- * Predefined set of fields to return.
2194
- *
2195
- * Default: If `fieldSet` is omitted, no order form submission data is returned.
2196
- */
2197
- fieldSet?: SetWithLiterals;
2058
+ declare function onOrderPaused(handler: (event: OrderPausedEnvelope) => void | Promise<void>): void;
2059
+ interface OrderPurchasedEnvelope {
2060
+ data: OrderPurchased;
2061
+ metadata: EventMetadata;
2198
2062
  }
2199
2063
  /**
2200
- * Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments.
2201
- *
2202
- * New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
2203
- * Can't postpone an order with `status`: `PAUSED`.
2204
- * @param _id - Order ID.
2205
- * @param endDate - New end date and time.
2206
- *
2207
- * Must be later than the current end date and time.
2208
- * @public
2209
- * @requiredField _id
2210
- * @requiredField endDate
2211
- * @param options - Options for postponing the end date of an order.
2212
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2213
- * @applicableIdentity APP
2214
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
2215
- */
2216
- declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
2217
- /**
2218
- * Cancels an existing order.
2219
- *
2220
- * For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
2221
- * For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
2222
- *
2223
- * #### Canceling during the free trial period.
2224
- *
2225
- * When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
2226
- * of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
2227
- * of the free trial period.
2228
- *
2229
- * When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
2230
- * `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
2231
- * immediately, even during the free trial period and the buyer won't be billed. Canceling at the
2232
- * `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
2233
- * Then, the subscription ends and the buyer is not billed.
2234
- * @param _id - Order ID.
2235
- * @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
2236
- * @public
2237
- * @requiredField _id
2238
- * @requiredField effectiveAt
2239
- * @param options - Options for canceling orders.
2240
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2241
- * @applicableIdentity APP
2242
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
2243
- */
2244
- declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
2245
- /**
2246
- * Marks an offline order as paid.
2247
- * > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
2248
- *
2249
- * Marking an offline order as paid causes the following changes:
2250
- * - The order's `lastPaymentStatus` changes to `"PAID"`.
2251
- * - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
2252
- *
2253
- * An error occurs if you attempt to:
2254
- * - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
2255
- * - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
2256
- * @param _id - Order ID.
2257
- * @public
2258
- * @requiredField _id
2259
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2260
- * @applicableIdentity APP
2261
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
2064
+ * Triggered for any of the following purchase events:
2065
+ * + Order is paid in full.
2066
+ * + At least 1 order cycle payment is paid for.
2067
+ * + Offline order is created, even if not yet marked as paid.
2068
+ * + Free order is created.
2069
+ * @permissionScope Manage Orders
2070
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2071
+ * @permissionScope Read Orders
2072
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
2073
+ * @permissionScope Manage plans and orders of Pricing Plans
2074
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
2075
+ * @permissionScope Manage Events
2076
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2077
+ * @permissionId PRICING_PLANS.READ_ORDERS
2078
+ * @webhook
2079
+ * @eventType wix.pricing_plans.v2.order_purchased
2080
+ * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2081
+ * @slug purchased
2262
2082
  */
2263
- declare function markAsPaid(_id: string): Promise<void>;
2083
+ declare function onOrderPurchased(handler: (event: OrderPurchasedEnvelope) => void | Promise<void>): void;
2084
+ interface OrderResumedEnvelope {
2085
+ data: OrderResumed;
2086
+ metadata: EventMetadata;
2087
+ }
2264
2088
  /**
2265
- * Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
2266
- *
2267
- * Only orders with `status`: `ACTIVE` can be paused.
2268
- * For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
2269
- * Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
2270
- * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
2271
- *
2272
- * To resume a paused order, call Resume Order.
2273
- * @param _id - Order ID.
2274
- * @public
2275
- * @requiredField _id
2276
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2277
- * @applicableIdentity APP
2278
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
2089
+ * Triggered when a paused order is resumed.
2090
+ * @permissionScope Manage Orders
2091
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2092
+ * @permissionScope Read Orders
2093
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
2094
+ * @permissionScope Manage plans and orders of Pricing Plans
2095
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
2096
+ * @permissionScope Manage Events
2097
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2098
+ * @permissionId PRICING_PLANS.READ_ORDERS
2099
+ * @webhook
2100
+ * @eventType wix.pricing_plans.v2.order_resumed
2101
+ * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2102
+ * @slug resumed
2279
2103
  */
2280
- declare function pauseOrder(_id: string): Promise<void>;
2104
+ declare function onOrderResumed(handler: (event: OrderResumedEnvelope) => void | Promise<void>): void;
2105
+ interface OrderStartedEnvelope {
2106
+ data: OrderStarted;
2107
+ metadata: EventMetadata;
2108
+ }
2281
2109
  /**
2282
- * Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
2283
- *
2284
- * Resuming an order causes the following changes:
2285
- * - The order status changes to `"ACTIVE"`.
2286
- * - The `pausePeriods` array is updated.
2287
- * - The `endDate` for the order is adjusted to include the pause period.
2288
- * - For orders with recurring payments, the payment schedule is restarted.
2289
- * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
2290
- *
2291
- * To pause an order, call Pause Order.
2292
- * @param _id - Order ID.
2293
- * @public
2294
- * @requiredField _id
2295
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2296
- * @applicableIdentity APP
2297
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
2110
+ * Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.
2111
+ * @permissionScope Manage Orders
2112
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2113
+ * @permissionScope Read Orders
2114
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
2115
+ * @permissionScope Manage plans and orders of Pricing Plans
2116
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
2117
+ * @permissionScope Manage Events
2118
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2119
+ * @permissionId PRICING_PLANS.READ_ORDERS
2120
+ * @webhook
2121
+ * @eventType wix.pricing_plans.v2.order_started
2122
+ * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2123
+ * @slug started
2298
2124
  */
2299
- declare function resumeOrder(_id: string): Promise<void>;
2125
+ declare function onOrderStarted(handler: (event: OrderStartedEnvelope) => void | Promise<void>): void;
2300
2126
  /**
2301
2127
  * Retrieves an order for the currently logged-in member by ID.
2302
2128
  * @param _id - Order ID.
@@ -2306,10 +2132,9 @@ declare function resumeOrder(_id: string): Promise<void>;
2306
2132
  * @permissionId PRICING_PLANS.READ_OWN_ORDERS
2307
2133
  * @applicableIdentity APP
2308
2134
  * @applicableIdentity MEMBER
2309
- * @returns Requested order.
2310
2135
  * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder
2311
2136
  */
2312
- declare function memberGetOrder(_id: string, options?: MemberGetOrderOptions): Promise<NonNullablePaths<Order, `_id` | `planId` | `subscriptionId` | `buyer.memberId` | `buyer.contactId` | `priceDetails.subscription.cycleDuration.unit` | `priceDetails.subtotal` | `priceDetails.discount` | `priceDetails.tax.name` | `priceDetails.tax.includedInPrice` | `priceDetails.tax.rate` | `priceDetails.tax.amount` | `priceDetails.total` | `priceDetails.planPrice` | `priceDetails.currency` | `priceDetails.coupon.code` | `priceDetails.coupon.amount` | `priceDetails.coupon._id` | `pricing.prices` | `pricing.prices.${number}.duration.cycleFrom` | `pricing.prices.${number}.price.subtotal` | `pricing.prices.${number}.price.discount` | `pricing.prices.${number}.price.total` | `pricing.prices.${number}.price.currency` | `pricing.prices.${number}.price.proration` | `type` | `status` | `cancellation.cause` | `cancellation.effectiveAt` | `lastPaymentStatus` | `pausePeriods` | `pausePeriods.${number}.status` | `currentCycle.index` | `planName` | `planDescription` | `planPrice`, 6>>;
2137
+ declare function memberGetOrder(_id: string, options?: MemberGetOrderOptions): Promise<NonNullablePaths<MemberGetOrderResponse, `order._id` | `order.planId` | `order.subscriptionId` | `order.buyer.memberId` | `order.buyer.contactId` | `order.priceDetails.subscription.cycleDuration.unit` | `order.priceDetails.subtotal` | `order.priceDetails.discount` | `order.priceDetails.tax.name` | `order.priceDetails.tax.includedInPrice` | `order.priceDetails.tax.rate` | `order.priceDetails.tax.amount` | `order.priceDetails.total` | `order.priceDetails.planPrice` | `order.priceDetails.currency` | `order.priceDetails.coupon.code` | `order.priceDetails.coupon.amount` | `order.priceDetails.coupon._id` | `order.pricing.prices` | `order.pricing.prices.${number}.duration.cycleFrom` | `order.pricing.prices.${number}.price.subtotal` | `order.pricing.prices.${number}.price.discount` | `order.pricing.prices.${number}.price.total` | `order.pricing.prices.${number}.price.currency` | `order.pricing.prices.${number}.price.proration` | `order.type` | `order.status` | `order.cancellation.cause` | `order.cancellation.effectiveAt` | `order.lastPaymentStatus` | `order.pausePeriods` | `order.pausePeriods.${number}.status` | `order.currentCycle.index` | `order.planName` | `order.planDescription` | `order.planPrice`, 7>>;
2313
2138
  interface MemberGetOrderOptions {
2314
2139
  /**
2315
2140
  * Predefined set of fields to return.
@@ -2572,5 +2397,180 @@ interface GetPricePreviewOptions {
2572
2397
  */
2573
2398
  couponCode?: string | null;
2574
2399
  }
2400
+ /**
2401
+ * Retrieves an order by ID.
2402
+ * @param _id - Order ID.
2403
+ * @public
2404
+ * @requiredField _id
2405
+ * @param options - Options to use when getting an order.
2406
+ * @permissionId PRICING_PLANS.READ_ORDERS
2407
+ * @applicableIdentity APP
2408
+ * @returns Order.
2409
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
2410
+ */
2411
+ declare function managementGetOrder(_id: string, options?: ManagementGetOrderOptions): Promise<NonNullablePaths<Order, `_id` | `planId` | `subscriptionId` | `buyer.memberId` | `buyer.contactId` | `priceDetails.subscription.cycleDuration.unit` | `priceDetails.subtotal` | `priceDetails.discount` | `priceDetails.tax.name` | `priceDetails.tax.includedInPrice` | `priceDetails.tax.rate` | `priceDetails.tax.amount` | `priceDetails.total` | `priceDetails.planPrice` | `priceDetails.currency` | `priceDetails.coupon.code` | `priceDetails.coupon.amount` | `priceDetails.coupon._id` | `pricing.prices` | `pricing.prices.${number}.duration.cycleFrom` | `pricing.prices.${number}.price.subtotal` | `pricing.prices.${number}.price.discount` | `pricing.prices.${number}.price.total` | `pricing.prices.${number}.price.currency` | `pricing.prices.${number}.price.proration` | `type` | `status` | `cancellation.cause` | `cancellation.effectiveAt` | `lastPaymentStatus` | `pausePeriods` | `pausePeriods.${number}.status` | `currentCycle.index` | `planName` | `planDescription` | `planPrice`, 6>>;
2412
+ interface ManagementGetOrderOptions {
2413
+ /**
2414
+ * Predefined set of fields to return.
2415
+ *
2416
+ * Default: If `fieldSet` is omitted, no order form submission data is returned.
2417
+ */
2418
+ fieldSet?: SetWithLiterals;
2419
+ }
2420
+ /**
2421
+ * Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
2422
+ *
2423
+ * By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
2424
+ * `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
2425
+ * @public
2426
+ * @param options - Filtering, sorting, and pagination options.
2427
+ * @permissionId PRICING_PLANS.READ_ORDERS
2428
+ * @applicableIdentity APP
2429
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
2430
+ */
2431
+ declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<NonNullablePaths<ListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 6>>;
2432
+ interface ManagementListOrdersOptions {
2433
+ /**
2434
+ * Filter by a buyer's member ID, from the Members API.
2435
+ * @format GUID
2436
+ */
2437
+ buyerIds?: string[];
2438
+ /**
2439
+ * Filter by plan IDs, from the Plans API.
2440
+ * @format GUID
2441
+ */
2442
+ planIds?: string[];
2443
+ /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
2444
+ autoRenewCanceled?: boolean | null;
2445
+ /** Filter by order status. */
2446
+ orderStatuses?: OrderStatusWithLiterals[];
2447
+ /** Filter by payment status. */
2448
+ paymentStatuses?: PaymentStatusWithLiterals[];
2449
+ /**
2450
+ * Number of orders to return. See Sorting and Paging for more information.
2451
+ *
2452
+ * Max: `50`
2453
+ * @min 1
2454
+ * @max 50
2455
+ */
2456
+ limit?: number | null;
2457
+ /** Number of orders to skip in the current sort order. */
2458
+ offset?: number | null;
2459
+ /**
2460
+ * Sort order.
2461
+ *
2462
+ * Use `ASC` for ascending order or `DESC` for descending order.
2463
+ *
2464
+ * Default: `DESC`.
2465
+ */
2466
+ sorting?: Sorting;
2467
+ /**
2468
+ * Predefined set of fields to return.
2469
+ *
2470
+ * Default: If `fieldSet` is omitted, no order form submission data is returned.
2471
+ */
2472
+ fieldSet?: SetWithLiterals;
2473
+ }
2474
+ /**
2475
+ * Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments.
2476
+ *
2477
+ * New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
2478
+ * Can't postpone an order with `status`: `PAUSED`.
2479
+ * @param _id - Order ID.
2480
+ * @param endDate - New end date and time.
2481
+ *
2482
+ * Must be later than the current end date and time.
2483
+ * @public
2484
+ * @requiredField _id
2485
+ * @requiredField endDate
2486
+ * @param options - Options for postponing the end date of an order.
2487
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2488
+ * @applicableIdentity APP
2489
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
2490
+ */
2491
+ declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
2492
+ /**
2493
+ * Cancels an existing order.
2494
+ *
2495
+ * For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
2496
+ * For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
2497
+ *
2498
+ * #### Canceling during the free trial period.
2499
+ *
2500
+ * When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
2501
+ * of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
2502
+ * of the free trial period.
2503
+ *
2504
+ * When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
2505
+ * `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
2506
+ * immediately, even during the free trial period and the buyer won't be billed. Canceling at the
2507
+ * `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
2508
+ * Then, the subscription ends and the buyer is not billed.
2509
+ * @param _id - Order ID.
2510
+ * @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
2511
+ * @public
2512
+ * @requiredField _id
2513
+ * @requiredField effectiveAt
2514
+ * @param options - Options for canceling orders.
2515
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2516
+ * @applicableIdentity APP
2517
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
2518
+ */
2519
+ declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
2520
+ /**
2521
+ * Marks an offline order as paid.
2522
+ * > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
2523
+ *
2524
+ * Marking an offline order as paid causes the following changes:
2525
+ * - The order's `lastPaymentStatus` changes to `"PAID"`.
2526
+ * - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
2527
+ *
2528
+ * An error occurs if you attempt to:
2529
+ * - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
2530
+ * - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
2531
+ * @param _id - Order ID.
2532
+ * @public
2533
+ * @requiredField _id
2534
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2535
+ * @applicableIdentity APP
2536
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
2537
+ */
2538
+ declare function markAsPaid(_id: string): Promise<void>;
2539
+ /**
2540
+ * Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
2541
+ *
2542
+ * Only orders with `status`: `ACTIVE` can be paused.
2543
+ * For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
2544
+ * Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
2545
+ * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
2546
+ *
2547
+ * To resume a paused order, call Resume Order.
2548
+ * @param _id - Order ID.
2549
+ * @public
2550
+ * @requiredField _id
2551
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2552
+ * @applicableIdentity APP
2553
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
2554
+ */
2555
+ declare function pauseOrder(_id: string): Promise<void>;
2556
+ /**
2557
+ * Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
2558
+ *
2559
+ * Resuming an order causes the following changes:
2560
+ * - The order status changes to `"ACTIVE"`.
2561
+ * - The `pausePeriods` array is updated.
2562
+ * - The `endDate` for the order is adjusted to include the pause period.
2563
+ * - For orders with recurring payments, the payment schedule is restarted.
2564
+ * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
2565
+ *
2566
+ * To pause an order, call Pause Order.
2567
+ * @param _id - Order ID.
2568
+ * @public
2569
+ * @requiredField _id
2570
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2571
+ * @applicableIdentity APP
2572
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
2573
+ */
2574
+ declare function resumeOrder(_id: string): Promise<void>;
2575
2575
 
2576
- export { type AccountDetails, type ActionEvent, type ApplicationError, type ApplyCouponRequest, type ApplyCouponResponse, type BaseEventMetadata, type BulkActionMetadata, type BulkOrderResult, type BulkPauseOrderRequest, type BulkPauseOrderResponse, type BulkResumeOrderRequest, type BulkResumeOrderResponse, type Buyer, type CancelOrderRequest, type CancelOrderResponse, type Cancellation, CancellationCause, type CancellationCauseWithLiterals, CancellationEffectiveAt, type CancellationEffectiveAtWithLiterals, type Captcha, type ChangeStartDateRequest, type ChangeStartDateResponse, type Coupon, type CouponsError, type CreateExternalOrderRequest, type CreateExternalOrderResponse, type CreateGuestOnlineOrderRequest, type CreateGuestOnlineOrderResponse, type CreateOfflineOrderApplicationErrors, type CreateOfflineOrderOptions, type CreateOfflineOrderRequest, type CreateOfflineOrderResponse, type CreateOfflineOrderValidationErrors, type CreateOnlineOrderApplicationErrors, type CreateOnlineOrderOptions, type CreateOnlineOrderRequest, type CreateOnlineOrderResponse, type CreateOnlineOrderValidationErrors, type CurrentCycle, type CursorPaging, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type Duration, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type Fee, type FormData, type GetAvailableOrderActionsRequest, type GetAvailableOrderActionsResponse, type GetGuestOnlineOrderPreviewRequest, type GetGuestOnlineOrderPreviewResponse, type GetOfflineOrderPreviewApplicationErrors, type GetOfflineOrderPreviewOptions, type GetOfflineOrderPreviewRequest, type GetOfflineOrderPreviewResponse, type GetOfflineOrderPreviewValidationErrors, type GetOnlineOrderPreviewApplicationErrors, type GetOnlineOrderPreviewOptions, type GetOnlineOrderPreviewRequest, type GetOnlineOrderPreviewResponse, type GetOnlineOrderPreviewValidationErrors, type GetOrderRequest, type GetOrderResponse, type GetOrdersStatsRequest, type GetOrdersStatsResponse, type GetPricePreviewApplicationErrors, type GetPricePreviewOptions, type GetPricePreviewRequest, type GetPricePreviewResponse, type Guest, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ListOrdersRequest, type ListOrdersResponse, type ManagementGetOrderOptions, type ManagementListOrdersOptions, type MarkAsPaidRequest, type MarkAsPaidResponse, type MemberGetOrderOptions, type MemberGetOrderRequest, type MemberGetOrderResponse, type MemberListOrdersOptions, type MemberListOrdersRequest, type MemberListOrdersResponse, type MessageEnvelope, type OnBehalf, type Order, type OrderAutoRenewCanceled, type OrderAutoRenewCanceledEnvelope, type OrderCanceled, type OrderCanceledEnvelope, type OrderCreatedEnvelope, type OrderCycle, type OrderCycleStarted, type OrderCycleStartedEnvelope, type OrderEndDatePostponed, type OrderEndDatePostponedEnvelope, type OrderEnded, type OrderEndedEnvelope, type OrderMarkedAsPaid, type OrderMarkedAsPaidEnvelope, OrderMethod, type OrderMethodWithLiterals, type OrderPaused, type OrderPausedEnvelope, type OrderPurchased, type OrderPurchasedEnvelope, type OrderResumed, type OrderResumedEnvelope, type OrderStartDateChanged, type OrderStartDateChangedEnvelope, type OrderStarted, type OrderStartedEnvelope, OrderStatus, type OrderStatusWithLiterals, OrderType, type OrderTypeWithLiterals, type OrderUpdatedEnvelope, type OrdersQueryOrdersRequest, type OrdersQueryOrdersResponse, type Paging, type PagingMetadataV2, type PauseOrderRequest, type PauseOrderResponse, type PausePeriod, PaymentStatus, type PaymentStatusWithLiterals, PeriodUnit, type PeriodUnitWithLiterals, type PostponeEndDateRequest, type PostponeEndDateResponse, type Price, type PriceDetails, type PriceDetailsPricingModelOneOf, type PriceDuration, type PricingDetails, type PricingDetailsPricingModelOneOf, type QueryOrdersRequest, type QueryOrdersResponse, type QueryV2, type QueryV2PagingMethodOneOf, ReasonNotSuspendable, type ReasonNotSuspendableWithLiterals, type Recurrence, type RequestCancellationRequest, type RequestCancellationResponse, type RestoreInfo, type ResumeOrderRequest, type ResumeOrderResponse, Set, type SetSubmissionRequest, type SetSubmissionResponse, type SetWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type SpannedPrice, Status, type StatusWithLiterals, type Tax, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, cancelOrder, createOfflineOrder, createOnlineOrder, getOfflineOrderPreview, getOnlineOrderPreview, getPricePreview, managementGetOrder, managementListOrders, markAsPaid, memberGetOrder, memberListOrders, onOrderAutoRenewCanceled, onOrderCanceled, onOrderCreated, onOrderCycleStarted, onOrderEndDatePostponed, onOrderEnded, onOrderMarkedAsPaid, onOrderPaused, onOrderPurchased, onOrderResumed, onOrderStartDateChanged, onOrderStarted, onOrderUpdated, pauseOrder, postponeEndDate, requestCancellation, resumeOrder };
2576
+ export { type AccountInfo, type ActionEvent, type ApplicationError, type ApplyCouponRequest, type ApplyCouponResponse, type BaseEventMetadata, type BulkActionMetadata, type BulkOrderResult, type BulkPauseOrderRequest, type BulkPauseOrderResponse, type BulkResumeOrderRequest, type BulkResumeOrderResponse, type Buyer, type CancelOrderRequest, type CancelOrderResponse, type Cancellation, CancellationCause, type CancellationCauseWithLiterals, CancellationEffectiveAt, type CancellationEffectiveAtWithLiterals, type Captcha, type ChangeStartDateRequest, type ChangeStartDateResponse, type Coupon, type CouponsError, type CreateExternalOrderRequest, type CreateExternalOrderResponse, type CreateGuestOnlineOrderRequest, type CreateGuestOnlineOrderResponse, type CreateOfflineOrderApplicationErrors, type CreateOfflineOrderOptions, type CreateOfflineOrderRequest, type CreateOfflineOrderResponse, type CreateOfflineOrderValidationErrors, type CreateOnlineOrderApplicationErrors, type CreateOnlineOrderOptions, type CreateOnlineOrderRequest, type CreateOnlineOrderResponse, type CreateOnlineOrderValidationErrors, type CurrentCycle, type CursorPaging, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type Duration, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type Fee, type FormData, type GetAvailableOrderActionsRequest, type GetAvailableOrderActionsResponse, type GetGuestOnlineOrderPreviewRequest, type GetGuestOnlineOrderPreviewResponse, type GetOfflineOrderPreviewApplicationErrors, type GetOfflineOrderPreviewOptions, type GetOfflineOrderPreviewRequest, type GetOfflineOrderPreviewResponse, type GetOfflineOrderPreviewValidationErrors, type GetOnlineOrderPreviewApplicationErrors, type GetOnlineOrderPreviewOptions, type GetOnlineOrderPreviewRequest, type GetOnlineOrderPreviewResponse, type GetOnlineOrderPreviewValidationErrors, type GetOrderRequest, type GetOrderResponse, type GetOrdersStatsRequest, type GetOrdersStatsResponse, type GetPricePreviewApplicationErrors, type GetPricePreviewOptions, type GetPricePreviewRequest, type GetPricePreviewResponse, type Guest, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ListOrdersRequest, type ListOrdersResponse, type ManagementGetOrderOptions, type ManagementListOrdersOptions, type MarkAsPaidRequest, type MarkAsPaidResponse, type MemberGetOrderOptions, type MemberGetOrderRequest, type MemberGetOrderResponse, type MemberListOrdersOptions, type MemberListOrdersRequest, type MemberListOrdersResponse, type MessageEnvelope, type OnBehalf, type Order, type OrderAutoRenewCanceled, type OrderAutoRenewCanceledEnvelope, type OrderCanceled, type OrderCanceledEnvelope, type OrderCreatedEnvelope, type OrderCycle, type OrderCycleStarted, type OrderCycleStartedEnvelope, type OrderEndDatePostponed, type OrderEndDatePostponedEnvelope, type OrderEnded, type OrderEndedEnvelope, type OrderMarkedAsPaid, type OrderMarkedAsPaidEnvelope, OrderMethod, type OrderMethodWithLiterals, type OrderPaused, type OrderPausedEnvelope, type OrderPurchased, type OrderPurchasedEnvelope, type OrderResumed, type OrderResumedEnvelope, type OrderStartDateChanged, type OrderStartDateChangedEnvelope, type OrderStarted, type OrderStartedEnvelope, OrderStatus, type OrderStatusWithLiterals, OrderType, type OrderTypeWithLiterals, type OrderUpdatedEnvelope, type OrdersQueryOrdersRequest, type OrdersQueryOrdersResponse, type Paging, type PagingMetadataV2, type PauseOrderRequest, type PauseOrderResponse, type PausePeriod, PaymentStatus, type PaymentStatusWithLiterals, PeriodUnit, type PeriodUnitWithLiterals, type PostponeEndDateRequest, type PostponeEndDateResponse, type Price, type PriceDetails, type PriceDetailsPricingModelOneOf, type PriceDuration, type PricingDetails, type PricingDetailsPricingModelOneOf, type QueryOrdersRequest, type QueryOrdersResponse, type QueryV2, type QueryV2PagingMethodOneOf, ReasonNotSuspendable, type ReasonNotSuspendableWithLiterals, type Recurrence, type RequestCancellationRequest, type RequestCancellationResponse, type RestoreInfo, type ResumeOrderRequest, type ResumeOrderResponse, Set, type SetSubmissionRequest, type SetSubmissionResponse, type SetWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type SpannedPrice, Status, type StatusWithLiterals, type Tax, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, cancelOrder, createOfflineOrder, createOnlineOrder, getOfflineOrderPreview, getOnlineOrderPreview, getPricePreview, managementGetOrder, managementListOrders, markAsPaid, memberGetOrder, memberListOrders, onOrderAutoRenewCanceled, onOrderCanceled, onOrderCreated, onOrderCycleStarted, onOrderEndDatePostponed, onOrderEnded, onOrderMarkedAsPaid, onOrderPaused, onOrderPurchased, onOrderResumed, onOrderStartDateChanged, onOrderStarted, onOrderUpdated, pauseOrder, postponeEndDate, requestCancellation, resumeOrder };