@wix/auto_sdk_pricing-plans_orders 1.0.111 → 1.0.113

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 (49) hide show
  1. package/build/cjs/index.d.ts +155 -155
  2. package/build/cjs/index.js +466 -466
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +489 -489
  5. package/build/cjs/index.typings.js +339 -339
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +259 -259
  8. package/build/cjs/meta.js +344 -344
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +30 -30
  11. package/build/cjs/schemas.js +59 -59
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +155 -155
  14. package/build/es/index.mjs +466 -466
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +489 -489
  17. package/build/es/index.typings.mjs +339 -339
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +259 -259
  20. package/build/es/meta.mjs +344 -344
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +30 -30
  23. package/build/es/schemas.mjs +59 -59
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +155 -155
  26. package/build/internal/cjs/index.js +466 -466
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +489 -489
  29. package/build/internal/cjs/index.typings.js +339 -339
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +259 -259
  32. package/build/internal/cjs/meta.js +344 -344
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +30 -30
  35. package/build/internal/cjs/schemas.js +59 -59
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +155 -155
  38. package/build/internal/es/index.mjs +466 -466
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +489 -489
  41. package/build/internal/es/index.typings.mjs +339 -339
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +259 -259
  44. package/build/internal/es/meta.mjs +344 -344
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +30 -30
  47. package/build/internal/es/schemas.mjs +59 -59
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { MemberGetOrderRequest as MemberGetOrderRequest$1, MemberGetOrderResponse as MemberGetOrderResponse$1, MemberListOrdersRequest as MemberListOrdersRequest$1, MemberListOrdersResponse as MemberListOrdersResponse$1, RequestCancellationRequest as RequestCancellationRequest$1, RequestCancellationResponse as RequestCancellationResponse$1, CreateOnlineOrderRequest as CreateOnlineOrderRequest$1, CreateOnlineOrderResponse as CreateOnlineOrderResponse$1, CreateOfflineOrderRequest as CreateOfflineOrderRequest$1, CreateOfflineOrderResponse as CreateOfflineOrderResponse$1, GetOnlineOrderPreviewRequest as GetOnlineOrderPreviewRequest$1, GetOnlineOrderPreviewResponse as GetOnlineOrderPreviewResponse$1, GetOfflineOrderPreviewRequest as GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewResponse as GetOfflineOrderPreviewResponse$1, GetPricePreviewRequest as GetPricePreviewRequest$1, GetPricePreviewResponse as GetPricePreviewResponse$1, GetOrderRequest as GetOrderRequest$1, GetOrderResponse as GetOrderResponse$1, ListOrdersRequest as ListOrdersRequest$1, ListOrdersResponse as ListOrdersResponse$1, PostponeEndDateRequest as PostponeEndDateRequest$1, PostponeEndDateResponse as PostponeEndDateResponse$1, CancelOrderRequest as CancelOrderRequest$1, CancelOrderResponse as CancelOrderResponse$1, MarkAsPaidRequest as MarkAsPaidRequest$1, MarkAsPaidResponse as MarkAsPaidResponse$1, PauseOrderRequest as PauseOrderRequest$1, PauseOrderResponse as PauseOrderResponse$1, ResumeOrderRequest as ResumeOrderRequest$1, ResumeOrderResponse as ResumeOrderResponse$1 } from './index.typings.mjs';
1
+ import { GetOrderRequest as GetOrderRequest$1, GetOrderResponse as GetOrderResponse$1, ListOrdersRequest as ListOrdersRequest$1, ListOrdersResponse as ListOrdersResponse$1, PostponeEndDateRequest as PostponeEndDateRequest$1, PostponeEndDateResponse as PostponeEndDateResponse$1, CancelOrderRequest as CancelOrderRequest$1, CancelOrderResponse as CancelOrderResponse$1, MarkAsPaidRequest as MarkAsPaidRequest$1, MarkAsPaidResponse as MarkAsPaidResponse$1, PauseOrderRequest as PauseOrderRequest$1, PauseOrderResponse as PauseOrderResponse$1, ResumeOrderRequest as ResumeOrderRequest$1, ResumeOrderResponse as ResumeOrderResponse$1, CreateOnlineOrderRequest as CreateOnlineOrderRequest$1, CreateOnlineOrderResponse as CreateOnlineOrderResponse$1, CreateOfflineOrderRequest as CreateOfflineOrderRequest$1, CreateOfflineOrderResponse as CreateOfflineOrderResponse$1, GetOnlineOrderPreviewRequest as GetOnlineOrderPreviewRequest$1, GetOnlineOrderPreviewResponse as GetOnlineOrderPreviewResponse$1, GetOfflineOrderPreviewRequest as GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewResponse as GetOfflineOrderPreviewResponse$1, GetPricePreviewRequest as GetPricePreviewRequest$1, GetPricePreviewResponse as GetPricePreviewResponse$1, MemberGetOrderRequest as MemberGetOrderRequest$1, MemberGetOrderResponse as MemberGetOrderResponse$1, MemberListOrdersRequest as MemberListOrdersRequest$1, MemberListOrdersResponse as MemberListOrdersResponse$1, RequestCancellationRequest as RequestCancellationRequest$1, RequestCancellationResponse as RequestCancellationResponse$1 } from './index.typings.mjs';
2
2
  import '@wix/sdk-types';
3
3
 
4
4
  /**
@@ -637,7 +637,35 @@ interface ActionEvent {
637
637
  }
638
638
  interface Empty {
639
639
  }
640
- interface MemberGetOrderRequest {
640
+ interface OrderPurchased {
641
+ /** Order that was paid for. If a free or an offline order, the order that was created. */
642
+ order?: Order;
643
+ }
644
+ interface OrderStarted {
645
+ /** Order that reached its `startDate`. */
646
+ order?: Order;
647
+ }
648
+ /**
649
+ * Triggered at the start of a new payment cycle for an existing order.
650
+ *
651
+ * This webhook does not trigger at the initial start of an offline order.
652
+ */
653
+ interface OrderCycleStarted {
654
+ /** Order whose new cycle started. */
655
+ order?: Order;
656
+ /** 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. */
657
+ cycleNumber?: number;
658
+ }
659
+ /** Emitted when a recurring order is canceled for the next payment cycle */
660
+ interface OrderAutoRenewCanceled {
661
+ /** Order that is canceled, effective at the end of the current payment cycle. */
662
+ order?: Order;
663
+ }
664
+ interface OrderEnded {
665
+ /** Order that ended. */
666
+ order?: Order;
667
+ }
668
+ interface GetOrderRequest {
641
669
  /**
642
670
  * Order ID.
643
671
  * @format GUID
@@ -660,31 +688,44 @@ declare enum Set {
660
688
  }
661
689
  /** @enumType */
662
690
  type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
663
- interface MemberGetOrderResponse {
664
- /** Requested order. */
691
+ interface GetOrderResponse {
692
+ /** Order. */
665
693
  order?: Order;
666
694
  }
667
- interface MemberListOrdersRequest {
695
+ interface ListOrdersRequest {
668
696
  /**
669
- * Filter by plan IDs.
697
+ * Filter by a buyer's member ID, from the Members API.
698
+ * @format GUID
699
+ */
700
+ buyerIds?: string[];
701
+ /**
702
+ * Filter by plan IDs, from the Plans API.
670
703
  * @format GUID
671
704
  */
672
705
  planIds?: string[];
673
- /** Filter for orders where auto renewal was canceled. */
706
+ /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
674
707
  autoRenewCanceled?: boolean | null;
675
708
  /** Filter by order status. */
676
709
  orderStatuses?: OrderStatusWithLiterals[];
677
710
  /** Filter by payment status. */
678
711
  paymentStatuses?: PaymentStatusWithLiterals[];
679
712
  /**
680
- * Limit the number of pricing plans returned. Default limit is 50.
713
+ * Number of orders to return. See Sorting and Paging for more information.
714
+ *
715
+ * Max: `50`
681
716
  * @min 1
682
717
  * @max 50
683
718
  */
684
719
  limit?: number | null;
685
- /** Number of entries to offset. */
720
+ /** Number of orders to skip in the current sort order. */
686
721
  offset?: number | null;
687
- /** Sorting direction (defaults to ASC) and field to sort by. */
722
+ /**
723
+ * Sort order.
724
+ *
725
+ * Use `ASC` for ascending order or `DESC` for descending order.
726
+ *
727
+ * Default: `DESC`.
728
+ */
688
729
  sorting?: Sorting;
689
730
  /**
690
731
  * Predefined set of fields to return.
@@ -708,8 +749,8 @@ declare enum SortOrder {
708
749
  }
709
750
  /** @enumType */
710
751
  type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
711
- interface MemberListOrdersResponse {
712
- /** Requested orders. */
752
+ interface ListOrdersResponse {
753
+ /** List of orders. */
713
754
  orders?: Order[];
714
755
  /** Object containing paging-related data (number of orders returned, offset). */
715
756
  pagingMetadata?: PagingMetadataV2;
@@ -738,11 +779,7 @@ interface Cursors {
738
779
  */
739
780
  prev?: string | null;
740
781
  }
741
- /**
742
- * TODO: Write orders filter and sort docs page
743
- * Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
744
- */
745
- interface QueryOrdersRequest {
782
+ interface OrdersQueryOrdersRequest {
746
783
  /** Query filter. */
747
784
  query?: QueryV2;
748
785
  }
@@ -796,22 +833,84 @@ interface CursorPaging {
796
833
  */
797
834
  cursor?: string | null;
798
835
  }
799
- interface QueryOrdersResponse {
800
- /** Order data. */
836
+ interface OrdersQueryOrdersResponse {
837
+ /** Retrieved orders. */
801
838
  plans?: Order[];
802
839
  /** Paging-related data (number of orders returned, offset). */
803
840
  pagingMetadata?: PagingMetadataV2;
804
841
  }
805
- interface RequestCancellationRequest {
842
+ interface GetOrdersStatsRequest {
843
+ }
844
+ interface GetOrdersStatsResponse {
845
+ /** Total number of orders. */
846
+ totalOrderCount?: number;
847
+ /** Number of active orders. */
848
+ activeOrderCount?: number;
849
+ }
850
+ interface GetAvailableOrderActionsRequest {
851
+ /**
852
+ * Order ID.
853
+ * @format GUID
854
+ */
855
+ id?: string;
856
+ }
857
+ interface GetAvailableOrderActionsResponse {
858
+ /** Whether the order can be suspended. */
859
+ suspendable?: boolean;
860
+ /** If the order cannot be suspended, a reason is returned here. */
861
+ notSuspendableReason?: ReasonNotSuspendableWithLiterals;
862
+ /** Whether the order can be canceled by the buyer. */
863
+ cancelableByBuyer?: boolean;
864
+ }
865
+ declare enum ReasonNotSuspendable {
866
+ /** Undefined reason. */
867
+ UNDEFINED = "UNDEFINED",
868
+ /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
869
+ PENDING = "PENDING",
870
+ /** Trial orders can't be suspended. */
871
+ TRIAL = "TRIAL",
872
+ /** Canceled orders can't be suspended. */
873
+ CANCELED = "CANCELED",
874
+ /** Ended orders can't be suspended. */
875
+ ENDED = "ENDED",
876
+ /** Paid for orders with future start dates can't be suspended. */
877
+ NOT_STARTED = "NOT_STARTED",
878
+ /** Order is already suspended. */
879
+ ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
880
+ /** Orders based on recurring payments using older stripe versions can't be suspended. */
881
+ OLD_STRIPE = "OLD_STRIPE"
882
+ }
883
+ /** @enumType */
884
+ type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
885
+ interface PostponeEndDateRequest {
806
886
  /**
807
887
  * Order ID.
808
888
  * @format GUID
809
889
  */
810
890
  id: string;
811
- /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
891
+ /**
892
+ * New end date and time.
893
+ *
894
+ * Must be later than the current end date and time.
895
+ */
896
+ endDate: Date | null;
897
+ }
898
+ interface PostponeEndDateResponse {
899
+ }
900
+ interface OrderEndDatePostponed {
901
+ /** Order whose `endDate` was postponed. */
902
+ order?: Order;
903
+ }
904
+ interface CancelOrderRequest {
905
+ /**
906
+ * Order ID.
907
+ * @format GUID
908
+ */
909
+ id: string;
910
+ /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
812
911
  effectiveAt: CancellationEffectiveAtWithLiterals;
813
912
  }
814
- interface RequestCancellationResponse {
913
+ interface CancelOrderResponse {
815
914
  }
816
915
  /**
817
916
  * Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
@@ -822,6 +921,111 @@ interface OrderCanceled {
822
921
  /** Canceled order. */
823
922
  order?: Order;
824
923
  }
924
+ interface MarkAsPaidRequest {
925
+ /**
926
+ * Order ID.
927
+ * @format GUID
928
+ */
929
+ id: string;
930
+ }
931
+ interface MarkAsPaidResponse {
932
+ }
933
+ interface OrderMarkedAsPaid {
934
+ /** Order that was marked as paid. */
935
+ order?: Order;
936
+ }
937
+ interface PauseOrderRequest {
938
+ /**
939
+ * Order ID.
940
+ * @format GUID
941
+ */
942
+ id: string;
943
+ }
944
+ interface PauseOrderResponse {
945
+ }
946
+ interface OrderPaused {
947
+ /** Paused order. */
948
+ order?: Order;
949
+ }
950
+ interface BulkPauseOrderRequest {
951
+ /**
952
+ * List of Order IDs.
953
+ * @format GUID
954
+ * @minSize 1
955
+ * @maxSize 100
956
+ */
957
+ ids?: string[];
958
+ /** Set to true to return Order entity in response. */
959
+ returnFullEntity?: boolean;
960
+ }
961
+ interface BulkPauseOrderResponse {
962
+ /** Orders that were paused. */
963
+ results?: BulkOrderResult[];
964
+ /** Bulk action metadata. */
965
+ bulkActionMetadata?: BulkActionMetadata;
966
+ }
967
+ interface BulkOrderResult {
968
+ /** Item metadata */
969
+ itemMetadata?: ItemMetadata;
970
+ /** The order. */
971
+ order?: Order;
972
+ }
973
+ interface ItemMetadata {
974
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
975
+ id?: string | null;
976
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
977
+ originalIndex?: number;
978
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
979
+ success?: boolean;
980
+ /** Details about the error in case of failure. */
981
+ error?: ApplicationError;
982
+ }
983
+ interface ApplicationError {
984
+ /** Error code. */
985
+ code?: string;
986
+ /** Description of the error. */
987
+ description?: string;
988
+ /** Data related to the error. */
989
+ data?: Record<string, any> | null;
990
+ }
991
+ interface BulkActionMetadata {
992
+ /** Number of items that were successfully processed. */
993
+ totalSuccesses?: number;
994
+ /** Number of items that couldn't be processed. */
995
+ totalFailures?: number;
996
+ /** Number of failures without details because detailed failure threshold was exceeded. */
997
+ undetailedFailures?: number;
998
+ }
999
+ interface ResumeOrderRequest {
1000
+ /**
1001
+ * Order ID.
1002
+ * @format GUID
1003
+ */
1004
+ id: string;
1005
+ }
1006
+ interface ResumeOrderResponse {
1007
+ }
1008
+ interface OrderResumed {
1009
+ /** Resumed order. */
1010
+ order?: Order;
1011
+ }
1012
+ interface BulkResumeOrderRequest {
1013
+ /**
1014
+ * List of Order IDs.
1015
+ * @format GUID
1016
+ * @minSize 1
1017
+ * @maxSize 100
1018
+ */
1019
+ ids?: string[];
1020
+ /** Set to true to return Order entity in response. */
1021
+ returnFullEntity?: boolean;
1022
+ }
1023
+ interface BulkResumeOrderResponse {
1024
+ /** Orders that were resumed. */
1025
+ results?: BulkOrderResult[];
1026
+ /** Bulk action metadata. */
1027
+ bulkActionMetadata?: BulkActionMetadata;
1028
+ }
825
1029
  interface MessageEnvelope {
826
1030
  /**
827
1031
  * App instance ID.
@@ -1223,35 +1427,7 @@ interface SetSubmissionResponse {
1223
1427
  /** Order with submission id */
1224
1428
  order?: Order;
1225
1429
  }
1226
- interface OrderPurchased {
1227
- /** Order that was paid for. If a free or an offline order, the order that was created. */
1228
- order?: Order;
1229
- }
1230
- interface OrderStarted {
1231
- /** Order that reached its `startDate`. */
1232
- order?: Order;
1233
- }
1234
- /**
1235
- * Triggered at the start of a new payment cycle for an existing order.
1236
- *
1237
- * This webhook does not trigger at the initial start of an offline order.
1238
- */
1239
- interface OrderCycleStarted {
1240
- /** Order whose new cycle started. */
1241
- order?: Order;
1242
- /** 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. */
1243
- cycleNumber?: number;
1244
- }
1245
- /** Emitted when a recurring order is canceled for the next payment cycle */
1246
- interface OrderAutoRenewCanceled {
1247
- /** Order that is canceled, effective at the end of the current payment cycle. */
1248
- order?: Order;
1249
- }
1250
- interface OrderEnded {
1251
- /** Order that ended. */
1252
- order?: Order;
1253
- }
1254
- interface GetOrderRequest {
1430
+ interface MemberGetOrderRequest {
1255
1431
  /**
1256
1432
  * Order ID.
1257
1433
  * @format GUID
@@ -1264,44 +1440,31 @@ interface GetOrderRequest {
1264
1440
  */
1265
1441
  fieldSet?: SetWithLiterals;
1266
1442
  }
1267
- interface GetOrderResponse {
1268
- /** Order. */
1443
+ interface MemberGetOrderResponse {
1444
+ /** Requested order. */
1269
1445
  order?: Order;
1270
1446
  }
1271
- interface ListOrdersRequest {
1272
- /**
1273
- * Filter by a buyer's member ID, from the Members API.
1274
- * @format GUID
1275
- */
1276
- buyerIds?: string[];
1447
+ interface MemberListOrdersRequest {
1277
1448
  /**
1278
- * Filter by plan IDs, from the Plans API.
1449
+ * Filter by plan IDs.
1279
1450
  * @format GUID
1280
1451
  */
1281
1452
  planIds?: string[];
1282
- /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
1453
+ /** Filter for orders where auto renewal was canceled. */
1283
1454
  autoRenewCanceled?: boolean | null;
1284
1455
  /** Filter by order status. */
1285
1456
  orderStatuses?: OrderStatusWithLiterals[];
1286
1457
  /** Filter by payment status. */
1287
1458
  paymentStatuses?: PaymentStatusWithLiterals[];
1288
1459
  /**
1289
- * Number of orders to return. See Sorting and Paging for more information.
1290
- *
1291
- * Max: `50`
1460
+ * Limit the number of pricing plans returned. Default limit is 50.
1292
1461
  * @min 1
1293
1462
  * @max 50
1294
1463
  */
1295
1464
  limit?: number | null;
1296
- /** Number of orders to skip in the current sort order. */
1465
+ /** Number of entries to offset. */
1297
1466
  offset?: number | null;
1298
- /**
1299
- * Sort order.
1300
- *
1301
- * Use `ASC` for ascending order or `DESC` for descending order.
1302
- *
1303
- * Default: `DESC`.
1304
- */
1467
+ /** Sorting direction (defaults to ASC) and field to sort by. */
1305
1468
  sorting?: Sorting;
1306
1469
  /**
1307
1470
  * Predefined set of fields to return.
@@ -1310,199 +1473,36 @@ interface ListOrdersRequest {
1310
1473
  */
1311
1474
  fieldSet?: SetWithLiterals;
1312
1475
  }
1313
- interface ListOrdersResponse {
1314
- /** List of orders. */
1476
+ interface MemberListOrdersResponse {
1477
+ /** Requested orders. */
1315
1478
  orders?: Order[];
1316
1479
  /** Object containing paging-related data (number of orders returned, offset). */
1317
1480
  pagingMetadata?: PagingMetadataV2;
1318
1481
  }
1319
- interface OrdersQueryOrdersRequest {
1482
+ /**
1483
+ * TODO: Write orders filter and sort docs page
1484
+ * Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
1485
+ */
1486
+ interface QueryOrdersRequest {
1320
1487
  /** Query filter. */
1321
1488
  query?: QueryV2;
1322
1489
  }
1323
- interface OrdersQueryOrdersResponse {
1324
- /** Retrieved orders. */
1490
+ interface QueryOrdersResponse {
1491
+ /** Order data. */
1325
1492
  plans?: Order[];
1326
1493
  /** Paging-related data (number of orders returned, offset). */
1327
1494
  pagingMetadata?: PagingMetadataV2;
1328
1495
  }
1329
- interface GetOrdersStatsRequest {
1330
- }
1331
- interface GetOrdersStatsResponse {
1332
- /** Total number of orders. */
1333
- totalOrderCount?: number;
1334
- /** Number of active orders. */
1335
- activeOrderCount?: number;
1336
- }
1337
- interface GetAvailableOrderActionsRequest {
1338
- /**
1339
- * Order ID.
1340
- * @format GUID
1341
- */
1342
- id?: string;
1343
- }
1344
- interface GetAvailableOrderActionsResponse {
1345
- /** Whether the order can be suspended. */
1346
- suspendable?: boolean;
1347
- /** If the order cannot be suspended, a reason is returned here. */
1348
- notSuspendableReason?: ReasonNotSuspendableWithLiterals;
1349
- /** Whether the order can be canceled by the buyer. */
1350
- cancelableByBuyer?: boolean;
1351
- }
1352
- declare enum ReasonNotSuspendable {
1353
- /** Undefined reason. */
1354
- UNDEFINED = "UNDEFINED",
1355
- /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
1356
- PENDING = "PENDING",
1357
- /** Trial orders can't be suspended. */
1358
- TRIAL = "TRIAL",
1359
- /** Canceled orders can't be suspended. */
1360
- CANCELED = "CANCELED",
1361
- /** Ended orders can't be suspended. */
1362
- ENDED = "ENDED",
1363
- /** Paid for orders with future start dates can't be suspended. */
1364
- NOT_STARTED = "NOT_STARTED",
1365
- /** Order is already suspended. */
1366
- ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
1367
- /** Orders based on recurring payments using older stripe versions can't be suspended. */
1368
- OLD_STRIPE = "OLD_STRIPE"
1369
- }
1370
- /** @enumType */
1371
- type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
1372
- interface PostponeEndDateRequest {
1373
- /**
1374
- * Order ID.
1375
- * @format GUID
1376
- */
1377
- id: string;
1378
- /**
1379
- * New end date and time.
1380
- *
1381
- * Must be later than the current end date and time.
1382
- */
1383
- endDate: Date | null;
1384
- }
1385
- interface PostponeEndDateResponse {
1386
- }
1387
- interface OrderEndDatePostponed {
1388
- /** Order whose `endDate` was postponed. */
1389
- order?: Order;
1390
- }
1391
- interface CancelOrderRequest {
1496
+ interface RequestCancellationRequest {
1392
1497
  /**
1393
1498
  * Order ID.
1394
1499
  * @format GUID
1395
1500
  */
1396
1501
  id: string;
1397
- /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
1502
+ /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
1398
1503
  effectiveAt: CancellationEffectiveAtWithLiterals;
1399
1504
  }
1400
- interface CancelOrderResponse {
1401
- }
1402
- interface MarkAsPaidRequest {
1403
- /**
1404
- * Order ID.
1405
- * @format GUID
1406
- */
1407
- id: string;
1408
- }
1409
- interface MarkAsPaidResponse {
1410
- }
1411
- interface OrderMarkedAsPaid {
1412
- /** Order that was marked as paid. */
1413
- order?: Order;
1414
- }
1415
- interface PauseOrderRequest {
1416
- /**
1417
- * Order ID.
1418
- * @format GUID
1419
- */
1420
- id: string;
1421
- }
1422
- interface PauseOrderResponse {
1423
- }
1424
- interface OrderPaused {
1425
- /** Paused order. */
1426
- order?: Order;
1427
- }
1428
- interface BulkPauseOrderRequest {
1429
- /**
1430
- * List of Order IDs.
1431
- * @format GUID
1432
- * @minSize 1
1433
- * @maxSize 100
1434
- */
1435
- ids?: string[];
1436
- /** Set to true to return Order entity in response. */
1437
- returnFullEntity?: boolean;
1438
- }
1439
- interface BulkPauseOrderResponse {
1440
- /** Orders that were paused. */
1441
- results?: BulkOrderResult[];
1442
- /** Bulk action metadata. */
1443
- bulkActionMetadata?: BulkActionMetadata;
1444
- }
1445
- interface BulkOrderResult {
1446
- /** Item metadata */
1447
- itemMetadata?: ItemMetadata;
1448
- /** The order. */
1449
- order?: Order;
1450
- }
1451
- interface ItemMetadata {
1452
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1453
- id?: string | null;
1454
- /** Index of the item within the request array. Allows for correlation between request and response items. */
1455
- originalIndex?: number;
1456
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1457
- success?: boolean;
1458
- /** Details about the error in case of failure. */
1459
- error?: ApplicationError;
1460
- }
1461
- interface ApplicationError {
1462
- /** Error code. */
1463
- code?: string;
1464
- /** Description of the error. */
1465
- description?: string;
1466
- /** Data related to the error. */
1467
- data?: Record<string, any> | null;
1468
- }
1469
- interface BulkActionMetadata {
1470
- /** Number of items that were successfully processed. */
1471
- totalSuccesses?: number;
1472
- /** Number of items that couldn't be processed. */
1473
- totalFailures?: number;
1474
- /** Number of failures without details because detailed failure threshold was exceeded. */
1475
- undetailedFailures?: number;
1476
- }
1477
- interface ResumeOrderRequest {
1478
- /**
1479
- * Order ID.
1480
- * @format GUID
1481
- */
1482
- id: string;
1483
- }
1484
- interface ResumeOrderResponse {
1485
- }
1486
- interface OrderResumed {
1487
- /** Resumed order. */
1488
- order?: Order;
1489
- }
1490
- interface BulkResumeOrderRequest {
1491
- /**
1492
- * List of Order IDs.
1493
- * @format GUID
1494
- * @minSize 1
1495
- * @maxSize 100
1496
- */
1497
- ids?: string[];
1498
- /** Set to true to return Order entity in response. */
1499
- returnFullEntity?: boolean;
1500
- }
1501
- interface BulkResumeOrderResponse {
1502
- /** Orders that were resumed. */
1503
- results?: BulkOrderResult[];
1504
- /** Bulk action metadata. */
1505
- bulkActionMetadata?: BulkActionMetadata;
1505
+ interface RequestCancellationResponse {
1506
1506
  }
1507
1507
  /** @docsIgnore */
1508
1508
  type CreateOnlineOrderApplicationErrors = {
@@ -1811,18 +1811,6 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
1811
1811
  __responseType: Q;
1812
1812
  __originalResponseType: R;
1813
1813
  };
1814
- declare function memberGetOrder(): __PublicMethodMetaInfo<'GET', {
1815
- id: string;
1816
- }, MemberGetOrderRequest$1, MemberGetOrderRequest, MemberGetOrderResponse$1, MemberGetOrderResponse>;
1817
- declare function memberListOrders(): __PublicMethodMetaInfo<'GET', {}, MemberListOrdersRequest$1, MemberListOrdersRequest, MemberListOrdersResponse$1, MemberListOrdersResponse>;
1818
- declare function requestCancellation(): __PublicMethodMetaInfo<'POST', {
1819
- id: string;
1820
- }, RequestCancellationRequest$1, RequestCancellationRequest, RequestCancellationResponse$1, RequestCancellationResponse>;
1821
- declare function createOnlineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOnlineOrderRequest$1, CreateOnlineOrderRequest, CreateOnlineOrderResponse$1, CreateOnlineOrderResponse>;
1822
- declare function createOfflineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOfflineOrderRequest$1, CreateOfflineOrderRequest, CreateOfflineOrderResponse$1, CreateOfflineOrderResponse>;
1823
- declare function getOnlineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOnlineOrderPreviewRequest$1, GetOnlineOrderPreviewRequest, GetOnlineOrderPreviewResponse$1, GetOnlineOrderPreviewResponse>;
1824
- declare function getOfflineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewRequest, GetOfflineOrderPreviewResponse$1, GetOfflineOrderPreviewResponse>;
1825
- declare function getPricePreview(): __PublicMethodMetaInfo<'POST', {}, GetPricePreviewRequest$1, GetPricePreviewRequest, GetPricePreviewResponse$1, GetPricePreviewResponse>;
1826
1814
  declare function managementGetOrder(): __PublicMethodMetaInfo<'GET', {
1827
1815
  id: string;
1828
1816
  }, GetOrderRequest$1, GetOrderRequest, GetOrderResponse$1, GetOrderResponse>;
@@ -1842,5 +1830,17 @@ declare function pauseOrder(): __PublicMethodMetaInfo<'POST', {
1842
1830
  declare function resumeOrder(): __PublicMethodMetaInfo<'POST', {
1843
1831
  id: string;
1844
1832
  }, ResumeOrderRequest$1, ResumeOrderRequest, ResumeOrderResponse$1, ResumeOrderResponse>;
1833
+ declare function createOnlineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOnlineOrderRequest$1, CreateOnlineOrderRequest, CreateOnlineOrderResponse$1, CreateOnlineOrderResponse>;
1834
+ declare function createOfflineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOfflineOrderRequest$1, CreateOfflineOrderRequest, CreateOfflineOrderResponse$1, CreateOfflineOrderResponse>;
1835
+ declare function getOnlineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOnlineOrderPreviewRequest$1, GetOnlineOrderPreviewRequest, GetOnlineOrderPreviewResponse$1, GetOnlineOrderPreviewResponse>;
1836
+ declare function getOfflineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewRequest, GetOfflineOrderPreviewResponse$1, GetOfflineOrderPreviewResponse>;
1837
+ declare function getPricePreview(): __PublicMethodMetaInfo<'POST', {}, GetPricePreviewRequest$1, GetPricePreviewRequest, GetPricePreviewResponse$1, GetPricePreviewResponse>;
1838
+ declare function memberGetOrder(): __PublicMethodMetaInfo<'GET', {
1839
+ id: string;
1840
+ }, MemberGetOrderRequest$1, MemberGetOrderRequest, MemberGetOrderResponse$1, MemberGetOrderResponse>;
1841
+ declare function memberListOrders(): __PublicMethodMetaInfo<'GET', {}, MemberListOrdersRequest$1, MemberListOrdersRequest, MemberListOrdersResponse$1, MemberListOrdersResponse>;
1842
+ declare function requestCancellation(): __PublicMethodMetaInfo<'POST', {
1843
+ id: string;
1844
+ }, RequestCancellationRequest$1, RequestCancellationRequest, RequestCancellationResponse$1, RequestCancellationResponse>;
1845
1845
 
1846
1846
  export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type ApplyCouponRequest as ApplyCouponRequestOriginal, type ApplyCouponResponse as ApplyCouponResponseOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkOrderResult as BulkOrderResultOriginal, type BulkPauseOrderRequest as BulkPauseOrderRequestOriginal, type BulkPauseOrderResponse as BulkPauseOrderResponseOriginal, type BulkResumeOrderRequest as BulkResumeOrderRequestOriginal, type BulkResumeOrderResponse as BulkResumeOrderResponseOriginal, type Buyer as BuyerOriginal, type CancelOrderRequest as CancelOrderRequestOriginal, type CancelOrderResponse as CancelOrderResponseOriginal, CancellationCause as CancellationCauseOriginal, type CancellationCauseWithLiterals as CancellationCauseWithLiteralsOriginal, CancellationEffectiveAt as CancellationEffectiveAtOriginal, type CancellationEffectiveAtWithLiterals as CancellationEffectiveAtWithLiteralsOriginal, type Cancellation as CancellationOriginal, type Captcha as CaptchaOriginal, type ChangeStartDateRequest as ChangeStartDateRequestOriginal, type ChangeStartDateResponse as ChangeStartDateResponseOriginal, type Coupon as CouponOriginal, type CouponsError as CouponsErrorOriginal, type CreateExternalOrderRequest as CreateExternalOrderRequestOriginal, type CreateExternalOrderResponse as CreateExternalOrderResponseOriginal, type CreateGuestOnlineOrderRequest as CreateGuestOnlineOrderRequestOriginal, type CreateGuestOnlineOrderResponse as CreateGuestOnlineOrderResponseOriginal, type CreateOfflineOrderApplicationErrors as CreateOfflineOrderApplicationErrorsOriginal, type CreateOfflineOrderRequest as CreateOfflineOrderRequestOriginal, type CreateOfflineOrderResponse as CreateOfflineOrderResponseOriginal, type CreateOfflineOrderValidationErrors as CreateOfflineOrderValidationErrorsOriginal, type CreateOnlineOrderApplicationErrors as CreateOnlineOrderApplicationErrorsOriginal, type CreateOnlineOrderRequest as CreateOnlineOrderRequestOriginal, type CreateOnlineOrderResponse as CreateOnlineOrderResponseOriginal, type CreateOnlineOrderValidationErrors as CreateOnlineOrderValidationErrorsOriginal, type CurrentCycle as CurrentCycleOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Duration as DurationOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type Fee as FeeOriginal, type FormData as FormDataOriginal, type GetAvailableOrderActionsRequest as GetAvailableOrderActionsRequestOriginal, type GetAvailableOrderActionsResponse as GetAvailableOrderActionsResponseOriginal, type GetGuestOnlineOrderPreviewRequest as GetGuestOnlineOrderPreviewRequestOriginal, type GetGuestOnlineOrderPreviewResponse as GetGuestOnlineOrderPreviewResponseOriginal, type GetOfflineOrderPreviewApplicationErrors as GetOfflineOrderPreviewApplicationErrorsOriginal, type GetOfflineOrderPreviewRequest as GetOfflineOrderPreviewRequestOriginal, type GetOfflineOrderPreviewResponse as GetOfflineOrderPreviewResponseOriginal, type GetOfflineOrderPreviewValidationErrors as GetOfflineOrderPreviewValidationErrorsOriginal, type GetOnlineOrderPreviewApplicationErrors as GetOnlineOrderPreviewApplicationErrorsOriginal, type GetOnlineOrderPreviewRequest as GetOnlineOrderPreviewRequestOriginal, type GetOnlineOrderPreviewResponse as GetOnlineOrderPreviewResponseOriginal, type GetOnlineOrderPreviewValidationErrors as GetOnlineOrderPreviewValidationErrorsOriginal, type GetOrderRequest as GetOrderRequestOriginal, type GetOrderResponse as GetOrderResponseOriginal, type GetOrdersStatsRequest as GetOrdersStatsRequestOriginal, type GetOrdersStatsResponse as GetOrdersStatsResponseOriginal, type GetPricePreviewApplicationErrors as GetPricePreviewApplicationErrorsOriginal, type GetPricePreviewRequest as GetPricePreviewRequestOriginal, type GetPricePreviewResponse as GetPricePreviewResponseOriginal, type Guest as GuestOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemMetadata as ItemMetadataOriginal, type ListOrdersRequest as ListOrdersRequestOriginal, type ListOrdersResponse as ListOrdersResponseOriginal, type MarkAsPaidRequest as MarkAsPaidRequestOriginal, type MarkAsPaidResponse as MarkAsPaidResponseOriginal, type MemberGetOrderRequest as MemberGetOrderRequestOriginal, type MemberGetOrderResponse as MemberGetOrderResponseOriginal, type MemberListOrdersRequest as MemberListOrdersRequestOriginal, type MemberListOrdersResponse as MemberListOrdersResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type OnBehalf as OnBehalfOriginal, type OrderAutoRenewCanceled as OrderAutoRenewCanceledOriginal, type OrderCanceled as OrderCanceledOriginal, type OrderCycle as OrderCycleOriginal, type OrderCycleStarted as OrderCycleStartedOriginal, type OrderEndDatePostponed as OrderEndDatePostponedOriginal, type OrderEnded as OrderEndedOriginal, type OrderMarkedAsPaid as OrderMarkedAsPaidOriginal, OrderMethod as OrderMethodOriginal, type OrderMethodWithLiterals as OrderMethodWithLiteralsOriginal, type Order as OrderOriginal, type OrderPaused as OrderPausedOriginal, type OrderPurchased as OrderPurchasedOriginal, type OrderResumed as OrderResumedOriginal, type OrderStartDateChanged as OrderStartDateChangedOriginal, type OrderStarted as OrderStartedOriginal, OrderStatus as OrderStatusOriginal, type OrderStatusWithLiterals as OrderStatusWithLiteralsOriginal, OrderType as OrderTypeOriginal, type OrderTypeWithLiterals as OrderTypeWithLiteralsOriginal, type OrdersQueryOrdersRequest as OrdersQueryOrdersRequestOriginal, type OrdersQueryOrdersResponse as OrdersQueryOrdersResponseOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type PauseOrderRequest as PauseOrderRequestOriginal, type PauseOrderResponse as PauseOrderResponseOriginal, type PausePeriod as PausePeriodOriginal, PaymentStatus as PaymentStatusOriginal, type PaymentStatusWithLiterals as PaymentStatusWithLiteralsOriginal, PeriodUnit as PeriodUnitOriginal, type PeriodUnitWithLiterals as PeriodUnitWithLiteralsOriginal, type PostponeEndDateRequest as PostponeEndDateRequestOriginal, type PostponeEndDateResponse as PostponeEndDateResponseOriginal, type PriceDetails as PriceDetailsOriginal, type PriceDetailsPricingModelOneOf as PriceDetailsPricingModelOneOfOriginal, type PriceDuration as PriceDurationOriginal, type Price as PriceOriginal, type PricingDetails as PricingDetailsOriginal, type PricingDetailsPricingModelOneOf as PricingDetailsPricingModelOneOfOriginal, type QueryOrdersRequest as QueryOrdersRequestOriginal, type QueryOrdersResponse as QueryOrdersResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, ReasonNotSuspendable as ReasonNotSuspendableOriginal, type ReasonNotSuspendableWithLiterals as ReasonNotSuspendableWithLiteralsOriginal, type Recurrence as RecurrenceOriginal, type RequestCancellationRequest as RequestCancellationRequestOriginal, type RequestCancellationResponse as RequestCancellationResponseOriginal, type RestoreInfo as RestoreInfoOriginal, type ResumeOrderRequest as ResumeOrderRequestOriginal, type ResumeOrderResponse as ResumeOrderResponseOriginal, Set as SetOriginal, type SetSubmissionRequest as SetSubmissionRequestOriginal, type SetSubmissionResponse as SetSubmissionResponseOriginal, type SetWithLiterals as SetWithLiteralsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type SpannedPrice as SpannedPriceOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type Tax as TaxOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, cancelOrder, createOfflineOrder, createOnlineOrder, getOfflineOrderPreview, getOnlineOrderPreview, getPricePreview, managementGetOrder, managementListOrders, markAsPaid, memberGetOrder, memberListOrders, pauseOrder, postponeEndDate, requestCancellation, resumeOrder };