@wix/auto_sdk_pricing-plans_orders 1.0.95 → 1.0.97

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