@wix/auto_sdk_pricing-plans_orders 1.0.120 → 1.0.121

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 +129 -129
  2. package/build/cjs/index.js +548 -548
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +787 -787
  5. package/build/cjs/index.typings.js +421 -421
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +484 -484
  8. package/build/cjs/meta.js +352 -352
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +199 -199
  11. package/build/cjs/schemas.js +885 -885
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +129 -129
  14. package/build/es/index.mjs +548 -548
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +787 -787
  17. package/build/es/index.typings.mjs +421 -421
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +484 -484
  20. package/build/es/meta.mjs +352 -352
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +199 -199
  23. package/build/es/schemas.mjs +885 -885
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +129 -129
  26. package/build/internal/cjs/index.js +548 -548
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +845 -786
  29. package/build/internal/cjs/index.typings.js +421 -421
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +578 -477
  32. package/build/internal/cjs/meta.js +352 -352
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +199 -199
  35. package/build/internal/cjs/schemas.js +885 -885
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +129 -129
  38. package/build/internal/es/index.mjs +548 -548
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +845 -786
  41. package/build/internal/es/index.typings.mjs +421 -421
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +578 -477
  44. package/build/internal/es/meta.mjs +352 -352
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +199 -199
  47. package/build/internal/es/schemas.mjs +885 -885
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +4 -4
@@ -1,4 +1,4 @@
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';
1
+ import { 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, 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
  /**
@@ -66,6 +66,12 @@ interface Order {
66
66
  * @readonly
67
67
  */
68
68
  type?: OrderTypeWithLiterals;
69
+ /**
70
+ * Method by which checkout was initiated on buyer's behalf.
71
+ * @internal
72
+ * @readonly
73
+ */
74
+ orderMethod?: OrderMethodWithLiterals;
69
75
  /**
70
76
  * Status of the order.
71
77
  * @readonly
@@ -135,6 +141,12 @@ interface Order {
135
141
  * @readonly
136
142
  */
137
143
  currentCycle?: CurrentCycle;
144
+ /**
145
+ * Past and current cycles for the order.
146
+ * @internal
147
+ * @readonly
148
+ */
149
+ cycles?: OrderCycle[];
138
150
  /**
139
151
  * Plan name at the time of purchase.
140
152
  * @readonly
@@ -166,6 +178,17 @@ interface Order {
166
178
  * @readonly
167
179
  */
168
180
  formData?: FormData;
181
+ /**
182
+ * TODO PPL-1357: Remove when migration to new status is completed
183
+ * @internal
184
+ */
185
+ statusNew?: OrderStatusWithLiterals;
186
+ /**
187
+ * Used to differentiate orders that were created from eCom flow.
188
+ * @internal
189
+ * @readonly
190
+ */
191
+ onEcom?: boolean;
169
192
  }
170
193
  interface Buyer {
171
194
  /**
@@ -392,6 +415,14 @@ interface Price {
392
415
  * @format CURRENCY
393
416
  */
394
417
  currency?: string;
418
+ /**
419
+ * Additional fees that would have been applied to the price, one of which could be a setup fee.
420
+ *
421
+ * Tax is also applied to additional fees.
422
+ * @internal
423
+ * @readonly
424
+ */
425
+ fees?: Fee[];
395
426
  /**
396
427
  * Price change after billing date was change and price was adjusted. Could be positive and negative values.
397
428
  * @format DECIMAL_VALUE
@@ -614,8 +645,18 @@ interface DomainEventBodyOneOf {
614
645
  }
615
646
  interface EntityCreatedEvent {
616
647
  entityAsJson?: string;
648
+ /**
649
+ * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
650
+ * @internal
651
+ */
652
+ triggeredByUndelete?: boolean | null;
617
653
  /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
618
654
  restoreInfo?: RestoreInfo;
655
+ /**
656
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
657
+ * @internal
658
+ */
659
+ additionalMetadataAsJson?: string | null;
619
660
  }
620
661
  interface RestoreInfo {
621
662
  deletedDate?: Date | null;
@@ -627,355 +668,357 @@ interface EntityUpdatedEvent {
627
668
  * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
628
669
  */
629
670
  currentEntityAsJson?: string;
671
+ /**
672
+ * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
673
+ * wont populate it / have any reference to it in the API.
674
+ * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
675
+ * the developer should send only the new (current) entity.
676
+ * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
677
+ * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
678
+ * @internal
679
+ * @deprecated
680
+ */
681
+ previousEntityAsJson?: string | null;
682
+ /**
683
+ * Map of fully qualified field paths to their previous values for fields that changed.
684
+ * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
685
+ * @internal
686
+ */
687
+ modifiedFields?: Record<string, any>;
688
+ /**
689
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
690
+ * @internal
691
+ */
692
+ additionalMetadataAsJson?: string | null;
630
693
  }
631
694
  interface EntityDeletedEvent {
695
+ /**
696
+ * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
697
+ * @internal
698
+ */
699
+ movedToTrash?: boolean | null;
632
700
  /** Entity that was deleted. */
633
701
  deletedEntityAsJson?: string | null;
702
+ /**
703
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
704
+ * @internal
705
+ */
706
+ additionalMetadataAsJson?: string | null;
634
707
  }
635
708
  interface ActionEvent {
636
709
  bodyAsJson?: string;
637
710
  }
638
711
  interface Empty {
639
712
  }
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;
713
+ interface CreateOnlineOrderRequest {
714
+ /**
715
+ * Plan ID.
716
+ * @format GUID
717
+ */
718
+ planId: string;
719
+ /**
720
+ * Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
721
+ *
722
+ * Default: Current date and time.
723
+ */
724
+ startDate?: Date | null;
725
+ /**
726
+ * Coupon code to apply.
727
+ * @minLength 1
728
+ * @maxLength 20
729
+ */
730
+ couponCode?: string | null;
731
+ /** Provided if checkout is initiated on buyer's behalf. */
732
+ onBehalf?: OnBehalf;
733
+ /**
734
+ * Submission ID of the form submitted with this order.
735
+ * @format GUID
736
+ */
737
+ submissionId?: string | null;
647
738
  }
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;
739
+ interface OnBehalf {
740
+ /**
741
+ * Member ID.
742
+ * @format GUID
743
+ */
744
+ memberId?: string;
745
+ /** Method by which checkout is initiated. */
746
+ orderMethod?: OrderMethodWithLiterals;
658
747
  }
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. */
748
+ interface CreateOnlineOrderResponse {
749
+ /** Created online order. */
662
750
  order?: Order;
663
751
  }
664
- interface OrderEnded {
665
- /** Order that ended. */
666
- order?: Order;
752
+ interface CouponsError {
753
+ /** Coupon code. */
754
+ couponCode?: string;
755
+ /** Plan ID. */
756
+ planId?: string;
667
757
  }
668
- interface GetOrderRequest {
758
+ interface CreateGuestOnlineOrderRequest {
669
759
  /**
670
- * Order ID.
760
+ * Plan ID.
671
761
  * @format GUID
672
762
  */
673
- id: string;
763
+ planId?: string;
674
764
  /**
675
- * Predefined set of fields to return.
765
+ * Start date for the ordered plan.
676
766
  *
677
- * Default: If `fieldSet` is omitted, no order form submission data is returned.
767
+ * Default: Current date
678
768
  */
679
- fieldSet?: SetWithLiterals;
769
+ startDate?: Date | null;
770
+ /**
771
+ * Coupon code to apply.
772
+ * @minLength 1
773
+ * @maxLength 20
774
+ */
775
+ couponCode?: string | null;
776
+ /** Captcha data to prove you are not a robot */
777
+ captcha?: Captcha;
778
+ /** Visitor info */
779
+ guest?: Guest;
780
+ /**
781
+ * Form submission id that was submitted together with the order
782
+ * @format GUID
783
+ */
784
+ submissionId?: string | null;
680
785
  }
681
- declare enum Set {
682
- /** Same behavior as `BASIC`.` */
683
- UNKNOWN_SET = "UNKNOWN_SET",
684
- /** Doesn't return any order form submission data. */
685
- BASIC = "BASIC",
686
- /** Returns all order form submission data. */
687
- FULL = "FULL"
786
+ interface Captcha {
787
+ /** Token from captcha */
788
+ token?: string;
688
789
  }
689
- /** @enumType */
690
- type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
691
- interface GetOrderResponse {
790
+ interface Guest {
791
+ /**
792
+ * Email for checkout
793
+ * @format EMAIL
794
+ */
795
+ email?: string;
796
+ }
797
+ interface CreateGuestOnlineOrderResponse {
692
798
  /** Order. */
693
799
  order?: Order;
694
800
  }
695
- interface ListOrdersRequest {
801
+ interface CreateOfflineOrderRequest {
696
802
  /**
697
- * Filter by a buyer's member ID, from the Members API.
803
+ * ID of the plan being ordered, from the Plans API.
698
804
  * @format GUID
699
805
  */
700
- buyerIds?: string[];
806
+ planId: string;
701
807
  /**
702
- * Filter by plan IDs, from the Plans API.
808
+ * ID of the member ordering the plan, from the Members API.
703
809
  * @format GUID
704
810
  */
705
- planIds?: string[];
706
- /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
707
- autoRenewCanceled?: boolean | null;
708
- /** Filter by order status. */
709
- orderStatuses?: OrderStatusWithLiterals[];
710
- /** Filter by payment status. */
711
- paymentStatuses?: PaymentStatusWithLiterals[];
712
- /**
713
- * Number of orders to return. See Sorting and Paging for more information.
714
- *
715
- * Max: `50`
716
- * @min 1
717
- * @max 50
718
- */
719
- limit?: number | null;
720
- /** Number of orders to skip in the current sort order. */
721
- offset?: number | null;
811
+ memberId: string;
722
812
  /**
723
- * Sort order.
724
- *
725
- * Use `ASC` for ascending order or `DESC` for descending order.
813
+ * Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
726
814
  *
727
- * Default: `DESC`.
815
+ * Default: Current date and time.
728
816
  */
729
- sorting?: Sorting;
817
+ startDate?: Date | null;
730
818
  /**
731
- * Predefined set of fields to return.
819
+ * Whether the order is paid.
732
820
  *
733
- * Default: If `fieldSet` is omitted, no order form submission data is returned.
821
+ * Default: `false`
734
822
  */
735
- fieldSet?: SetWithLiterals;
736
- }
737
- interface Sorting {
823
+ paid?: boolean | null;
738
824
  /**
739
- * Name of the field to sort by.
740
- * @maxLength 512
825
+ * Coupon code to apply, from the Coupons API.
826
+ * @minLength 1
827
+ * @maxLength 20
741
828
  */
742
- fieldName?: string;
743
- /** Sort order. */
744
- order?: SortOrderWithLiterals;
829
+ couponCode?: string | null;
745
830
  /**
746
- * Origin point for geo-distance sorting on a GEO field
747
- * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
831
+ * Form submission ID that was submitted with the order.
832
+ * @format GUID
748
833
  */
749
- origin?: AddressLocation;
750
- }
751
- declare enum SortOrder {
752
- ASC = "ASC",
753
- DESC = "DESC"
754
- }
755
- /** @enumType */
756
- type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
757
- interface AddressLocation {
758
- /** Address latitude. */
759
- latitude?: number | null;
760
- /** Address longitude. */
761
- longitude?: number | null;
762
- }
763
- interface ListOrdersResponse {
764
- /** List of orders. */
765
- orders?: Order[];
766
- /** Object containing paging-related data (number of orders returned, offset). */
767
- pagingMetadata?: PagingMetadataV2;
834
+ submissionId?: string | null;
768
835
  }
769
- interface PagingMetadataV2 {
770
- /** Number of items returned in the response. */
771
- count?: number | null;
772
- /** Offset that was requested. */
773
- offset?: number | null;
774
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
775
- total?: number | null;
776
- /** Flag that indicates the server failed to calculate the `total` field. */
777
- tooManyToCount?: boolean | null;
778
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
779
- cursors?: Cursors;
836
+ interface CreateOfflineOrderResponse {
837
+ /** Order. */
838
+ order?: Order;
780
839
  }
781
- interface Cursors {
840
+ interface CreateExternalOrderRequest {
782
841
  /**
783
- * Cursor string pointing to the next page in the list of results.
784
- * @maxLength 16000
842
+ * Plan ID.
843
+ * @format GUID
785
844
  */
786
- next?: string | null;
845
+ planId?: string;
787
846
  /**
788
- * Cursor pointing to the previous page in the list of results.
789
- * @maxLength 16000
847
+ * Form submission id that was submitted together with the order
848
+ * @format GUID
790
849
  */
791
- prev?: string | null;
792
- }
793
- interface GetOrdersStatsRequest {
850
+ submissionId?: string | null;
794
851
  }
795
- interface GetOrdersStatsResponse {
796
- /** Total number of orders. */
797
- totalOrderCount?: number;
798
- /** Number of active orders. */
799
- activeOrderCount?: number;
852
+ interface CreateExternalOrderResponse {
853
+ /** Created order */
854
+ order?: Order;
800
855
  }
801
- interface GetAvailableOrderActionsRequest {
856
+ interface GetOnlineOrderPreviewRequest {
802
857
  /**
803
- * Order ID.
858
+ * Plan ID.
804
859
  * @format GUID
805
860
  */
806
- id?: string;
807
- }
808
- interface GetAvailableOrderActionsResponse {
809
- /** Whether the order can be suspended. */
810
- suspendable?: boolean;
811
- /** If the order cannot be suspended, a reason is returned here. */
812
- notSuspendableReason?: ReasonNotSuspendableWithLiterals;
813
- /** Whether the order can be canceled by the buyer. */
814
- cancelableByBuyer?: boolean;
861
+ planId: string;
862
+ /**
863
+ * Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
864
+ *
865
+ * Default: Current date and time.
866
+ */
867
+ startDate?: Date | null;
868
+ /**
869
+ * Coupon code to apply.
870
+ * @minLength 1
871
+ * @maxLength 20
872
+ */
873
+ couponCode?: string | null;
815
874
  }
816
- declare enum ReasonNotSuspendable {
817
- /** Undefined reason. */
818
- UNDEFINED = "UNDEFINED",
819
- /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
820
- PENDING = "PENDING",
821
- /** Trial orders can't be suspended. */
822
- TRIAL = "TRIAL",
823
- /** Canceled orders can't be suspended. */
824
- CANCELED = "CANCELED",
825
- /** Ended orders can't be suspended. */
826
- ENDED = "ENDED",
827
- /** Paid for orders with future start dates can't be suspended. */
828
- NOT_STARTED = "NOT_STARTED",
829
- /** Order is already suspended. */
830
- ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
831
- /** Orders based on recurring payments using older stripe versions can't be suspended. */
832
- OLD_STRIPE = "OLD_STRIPE"
875
+ interface GetOnlineOrderPreviewResponse {
876
+ /** Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan. */
877
+ order?: Order;
878
+ /** Whether the member has already reached purchase limit for the order's plan. */
879
+ purchaseLimitExceeded?: boolean;
833
880
  }
834
- /** @enumType */
835
- type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
836
- interface PostponeEndDateRequest {
881
+ interface GetGuestOnlineOrderPreviewRequest {
837
882
  /**
838
- * Order ID.
883
+ * Plan ID.
839
884
  * @format GUID
840
885
  */
841
- id: string;
886
+ planId?: string;
842
887
  /**
843
- * New end date and time.
888
+ * Start date for the ordered plan.
844
889
  *
845
- * Must be later than the current end date and time.
890
+ * Default: Current date
846
891
  */
847
- endDate: Date | null;
848
- }
849
- interface PostponeEndDateResponse {
892
+ startDate?: Date | null;
893
+ /**
894
+ * Coupon code to apply.
895
+ * @minLength 1
896
+ * @maxLength 20
897
+ */
898
+ couponCode?: string | null;
899
+ /**
900
+ * Email for checkout
901
+ * @format EMAIL
902
+ */
903
+ email?: string;
850
904
  }
851
- interface OrderEndDatePostponed {
852
- /** Order whose `endDate` was postponed. */
905
+ interface GetGuestOnlineOrderPreviewResponse {
906
+ /** Will be missing if limit is exceeded */
853
907
  order?: Order;
908
+ /**
909
+ * Whether the purchase limit has already been reached for this plan by this email.
910
+ * Always false for plans without purchase limits.
911
+ */
912
+ purchaseLimitExceeded?: boolean;
854
913
  }
855
- interface CancelOrderRequest {
914
+ interface GetOfflineOrderPreviewRequest {
856
915
  /**
857
- * Order ID.
916
+ * ID of the plan of the previewed order, from the Plans API.
858
917
  * @format GUID
859
918
  */
860
- id: string;
861
- /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
862
- effectiveAt: CancellationEffectiveAtWithLiterals;
863
- }
864
- interface CancelOrderResponse {
919
+ planId: string;
920
+ /**
921
+ * Member ID of the buyer the previewed order is for, from the Members API.
922
+ * @format GUID
923
+ */
924
+ memberId: string;
925
+ /**
926
+ * Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
927
+ *
928
+ * Default: Current date and time.
929
+ */
930
+ startDate?: Date | null;
931
+ /**
932
+ * Coupon code to apply, from the Coupons API.
933
+ * @minLength 1
934
+ * @maxLength 20
935
+ */
936
+ couponCode?: string | null;
865
937
  }
866
- /**
867
- * Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
868
- *
869
- * To determine the specific reason of the cancellation check `order.cancellation.cause` field.
870
- */
871
- interface OrderCanceled {
872
- /** Canceled order. */
938
+ interface GetOfflineOrderPreviewResponse {
939
+ /** The previewed order, as if the plan had been ordered. */
873
940
  order?: Order;
941
+ /**
942
+ * Whether this previewed order would exceed the permitted amount of purchases available
943
+ * for this plan for this buyer.
944
+ *
945
+ * Always `false` for plans that do not have purchase limits.
946
+ */
947
+ purchaseLimitExceeded?: boolean;
874
948
  }
875
- interface MarkAsPaidRequest {
949
+ interface GetPricePreviewRequest {
876
950
  /**
877
- * Order ID.
951
+ * ID of plan to preview.
878
952
  * @format GUID
879
953
  */
880
- id: string;
881
- }
882
- interface MarkAsPaidResponse {
954
+ planId: string;
955
+ /**
956
+ * Coupon code to apply, from the Coupons API.
957
+ * @minLength 1
958
+ * @maxLength 20
959
+ */
960
+ couponCode?: string | null;
883
961
  }
884
- interface OrderMarkedAsPaid {
885
- /** Order that was marked as paid. */
886
- order?: Order;
962
+ interface GetPricePreviewResponse {
963
+ /**
964
+ * __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
965
+ * @deprecated __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
966
+ * @replacedBy prices
967
+ * @targetRemovalDate 2022-10-01
968
+ */
969
+ price?: PriceDetails;
970
+ /** Pricing details. */
971
+ prices?: SpannedPrice[];
887
972
  }
888
- interface PauseOrderRequest {
973
+ interface ChangeStartDateRequest {
889
974
  /**
890
- * Order ID.
975
+ * Draft order ID.
891
976
  * @format GUID
892
977
  */
893
- id: string;
978
+ orderId?: string;
979
+ /** New valid from date (timestamp). */
980
+ startDate?: Date | null;
894
981
  }
895
- interface PauseOrderResponse {
982
+ interface ChangeStartDateResponse {
983
+ /** Updated draft order. */
984
+ order?: Order;
896
985
  }
897
- interface OrderPaused {
898
- /** Paused order. */
986
+ interface OrderStartDateChanged {
987
+ /** Order whose `startDate` changed. */
899
988
  order?: Order;
900
989
  }
901
- interface BulkPauseOrderRequest {
990
+ interface ApplyCouponRequest {
902
991
  /**
903
- * List of Order IDs.
992
+ * Draft order ID.
904
993
  * @format GUID
905
- * @minSize 1
906
- * @maxSize 100
907
994
  */
908
- ids?: string[];
909
- /** Set to true to return Order entity in response. */
910
- returnFullEntity?: boolean;
911
- }
912
- interface BulkPauseOrderResponse {
913
- /** Orders that were paused. */
914
- results?: BulkOrderResult[];
915
- /** Bulk action metadata. */
916
- bulkActionMetadata?: BulkActionMetadata;
995
+ orderId?: string;
996
+ /**
997
+ * Coupon code to apply.
998
+ * @minLength 1
999
+ * @maxLength 20
1000
+ */
1001
+ couponCode?: string;
917
1002
  }
918
- interface BulkOrderResult {
919
- /** Item metadata */
920
- itemMetadata?: ItemMetadata;
921
- /** The order. */
1003
+ interface ApplyCouponResponse {
1004
+ /** Order with applied coupon and recalculated tax. */
922
1005
  order?: Order;
923
1006
  }
924
- interface ItemMetadata {
925
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
926
- id?: string | null;
927
- /** Index of the item within the request array. Allows for correlation between request and response items. */
928
- originalIndex?: number;
929
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
930
- success?: boolean;
931
- /** Details about the error in case of failure. */
932
- error?: ApplicationError;
933
- }
934
- interface ApplicationError {
935
- /** Error code. */
936
- code?: string;
937
- /** Description of the error. */
938
- description?: string;
939
- /** Data related to the error. */
940
- data?: Record<string, any> | null;
941
- }
942
- interface BulkActionMetadata {
943
- /** Number of items that were successfully processed. */
944
- totalSuccesses?: number;
945
- /** Number of items that couldn't be processed. */
946
- totalFailures?: number;
947
- /** Number of failures without details because detailed failure threshold was exceeded. */
948
- undetailedFailures?: number;
949
- }
950
- interface ResumeOrderRequest {
1007
+ interface SetSubmissionRequest {
951
1008
  /**
952
1009
  * Order ID.
953
1010
  * @format GUID
954
1011
  */
955
- id: string;
956
- }
957
- interface ResumeOrderResponse {
958
- }
959
- interface OrderResumed {
960
- /** Resumed order. */
961
- order?: Order;
962
- }
963
- interface BulkResumeOrderRequest {
1012
+ orderId?: string;
964
1013
  /**
965
- * List of Order IDs.
1014
+ * Submission ID.
966
1015
  * @format GUID
967
- * @minSize 1
968
- * @maxSize 100
969
1016
  */
970
- ids?: string[];
971
- /** Set to true to return Order entity in response. */
972
- returnFullEntity?: boolean;
1017
+ submissionId?: string;
973
1018
  }
974
- interface BulkResumeOrderResponse {
975
- /** Orders that were resumed. */
976
- results?: BulkOrderResult[];
977
- /** Bulk action metadata. */
978
- bulkActionMetadata?: BulkActionMetadata;
1019
+ interface SetSubmissionResponse {
1020
+ /** Order with submission id */
1021
+ order?: Order;
979
1022
  }
980
1023
  interface MessageEnvelope {
981
1024
  /**
@@ -1068,315 +1111,373 @@ interface AccountInfo {
1068
1111
  */
1069
1112
  siteId?: string | null;
1070
1113
  }
1071
- interface CreateOnlineOrderRequest {
1072
- /**
1073
- * Plan ID.
1074
- * @format GUID
1075
- */
1076
- planId: string;
1077
- /**
1078
- * Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
1079
- *
1080
- * Default: Current date and time.
1081
- */
1082
- startDate?: Date | null;
1083
- /**
1084
- * Coupon code to apply.
1085
- * @minLength 1
1086
- * @maxLength 20
1087
- */
1088
- couponCode?: string | null;
1089
- /** Provided if checkout is initiated on buyer's behalf. */
1090
- onBehalf?: OnBehalf;
1091
- /**
1092
- * Submission ID of the form submitted with this order.
1093
- * @format GUID
1094
- */
1095
- submissionId?: string | null;
1114
+ interface OrderPurchased {
1115
+ /** Order that was paid for. If a free or an offline order, the order that was created. */
1116
+ order?: Order;
1096
1117
  }
1097
- interface OnBehalf {
1098
- /**
1099
- * Member ID.
1100
- * @format GUID
1101
- */
1102
- memberId?: string;
1103
- /** Method by which checkout is initiated. */
1104
- orderMethod?: OrderMethodWithLiterals;
1118
+ interface OrderStarted {
1119
+ /** Order that reached its `startDate`. */
1120
+ order?: Order;
1105
1121
  }
1106
- interface CreateOnlineOrderResponse {
1107
- /** Created online order. */
1122
+ /**
1123
+ * Triggered at the start of a new payment cycle for an existing order.
1124
+ *
1125
+ * This webhook does not trigger at the initial start of an offline order.
1126
+ */
1127
+ interface OrderCycleStarted {
1128
+ /** Order whose new cycle started. */
1129
+ order?: Order;
1130
+ /** 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. */
1131
+ cycleNumber?: number;
1132
+ }
1133
+ /** Emitted when a recurring order is canceled for the next payment cycle */
1134
+ interface OrderAutoRenewCanceled {
1135
+ /** Order that is canceled, effective at the end of the current payment cycle. */
1108
1136
  order?: Order;
1109
1137
  }
1110
- interface CouponsError {
1111
- /** Coupon code. */
1112
- couponCode?: string;
1113
- /** Plan ID. */
1114
- planId?: string;
1138
+ interface OrderEnded {
1139
+ /** Order that ended. */
1140
+ order?: Order;
1115
1141
  }
1116
- interface CreateGuestOnlineOrderRequest {
1142
+ interface GetOrderRequest {
1117
1143
  /**
1118
- * Plan ID.
1144
+ * Order ID.
1119
1145
  * @format GUID
1120
1146
  */
1121
- planId?: string;
1147
+ id: string;
1122
1148
  /**
1123
- * Start date for the ordered plan.
1149
+ * Predefined set of fields to return.
1124
1150
  *
1125
- * Default: Current date
1126
- */
1127
- startDate?: Date | null;
1128
- /**
1129
- * Coupon code to apply.
1130
- * @minLength 1
1131
- * @maxLength 20
1132
- */
1133
- couponCode?: string | null;
1134
- /** Captcha data to prove you are not a robot */
1135
- captcha?: Captcha;
1136
- /** Visitor info */
1137
- guest?: Guest;
1138
- /**
1139
- * Form submission id that was submitted together with the order
1140
- * @format GUID
1151
+ * Default: If `fieldSet` is omitted, no order form submission data is returned.
1141
1152
  */
1142
- submissionId?: string | null;
1143
- }
1144
- interface Captcha {
1145
- /** Token from captcha */
1146
- token?: string;
1153
+ fieldSet?: SetWithLiterals;
1147
1154
  }
1148
- interface Guest {
1149
- /**
1150
- * Email for checkout
1151
- * @format EMAIL
1152
- */
1153
- email?: string;
1155
+ declare enum Set {
1156
+ /** Same behavior as `BASIC`.` */
1157
+ UNKNOWN_SET = "UNKNOWN_SET",
1158
+ /** Doesn't return any order form submission data. */
1159
+ BASIC = "BASIC",
1160
+ /** Returns all order form submission data. */
1161
+ FULL = "FULL"
1154
1162
  }
1155
- interface CreateGuestOnlineOrderResponse {
1163
+ /** @enumType */
1164
+ type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
1165
+ interface GetOrderResponse {
1156
1166
  /** Order. */
1157
1167
  order?: Order;
1158
1168
  }
1159
- interface CreateOfflineOrderRequest {
1169
+ interface ListOrdersRequest {
1160
1170
  /**
1161
- * ID of the plan being ordered, from the Plans API.
1171
+ * Filter by a buyer's member ID, from the Members API.
1162
1172
  * @format GUID
1163
1173
  */
1164
- planId: string;
1174
+ buyerIds?: string[];
1165
1175
  /**
1166
- * ID of the member ordering the plan, from the Members API.
1176
+ * Filter by plan IDs, from the Plans API.
1167
1177
  * @format GUID
1168
1178
  */
1169
- memberId: string;
1179
+ planIds?: string[];
1180
+ /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
1181
+ autoRenewCanceled?: boolean | null;
1182
+ /** Filter by order status. */
1183
+ orderStatuses?: OrderStatusWithLiterals[];
1184
+ /** Filter by payment status. */
1185
+ paymentStatuses?: PaymentStatusWithLiterals[];
1170
1186
  /**
1171
- * Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
1187
+ * Number of orders to return. See Sorting and Paging for more information.
1172
1188
  *
1173
- * Default: Current date and time.
1189
+ * Max: `50`
1190
+ * @min 1
1191
+ * @max 50
1174
1192
  */
1175
- startDate?: Date | null;
1193
+ limit?: number | null;
1194
+ /** Number of orders to skip in the current sort order. */
1195
+ offset?: number | null;
1176
1196
  /**
1177
- * Whether the order is paid.
1197
+ * Sort order.
1178
1198
  *
1179
- * Default: `false`
1199
+ * Use `ASC` for ascending order or `DESC` for descending order.
1200
+ *
1201
+ * Default: `DESC`.
1180
1202
  */
1181
- paid?: boolean | null;
1203
+ sorting?: Sorting;
1182
1204
  /**
1183
- * Coupon code to apply, from the Coupons API.
1184
- * @minLength 1
1185
- * @maxLength 20
1205
+ * Predefined set of fields to return.
1206
+ *
1207
+ * Default: If `fieldSet` is omitted, no order form submission data is returned.
1186
1208
  */
1187
- couponCode?: string | null;
1209
+ fieldSet?: SetWithLiterals;
1188
1210
  /**
1189
- * Form submission ID that was submitted with the order.
1211
+ * Filter by order IDs.
1212
+ * @internal
1190
1213
  * @format GUID
1214
+ * @maxSize 50
1191
1215
  */
1192
- submissionId?: string | null;
1216
+ orderIds?: string[];
1193
1217
  }
1194
- interface CreateOfflineOrderResponse {
1195
- /** Order. */
1196
- order?: Order;
1197
- }
1198
- interface CreateExternalOrderRequest {
1199
- /**
1200
- * Plan ID.
1201
- * @format GUID
1202
- */
1203
- planId?: string;
1204
- /**
1205
- * Form submission id that was submitted together with the order
1206
- * @format GUID
1207
- */
1208
- submissionId?: string | null;
1209
- }
1210
- interface CreateExternalOrderResponse {
1211
- /** Created order */
1212
- order?: Order;
1213
- }
1214
- interface GetOnlineOrderPreviewRequest {
1218
+ interface Sorting {
1215
1219
  /**
1216
- * Plan ID.
1217
- * @format GUID
1220
+ * Name of the field to sort by.
1221
+ * @maxLength 512
1218
1222
  */
1219
- planId: string;
1223
+ fieldName?: string;
1224
+ /** Sort order. */
1225
+ order?: SortOrderWithLiterals;
1220
1226
  /**
1221
- * Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
1227
+ * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
1228
+ * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
1222
1229
  *
1223
- * Default: Current date and time.
1230
+ * If multiple filters are provided, they are combined with AND operator.
1231
+ *
1232
+ * Example:
1233
+ * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
1234
+ * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
1235
+ * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
1236
+ * @internal
1237
+ * @maxSize 10
1224
1238
  */
1225
- startDate?: Date | null;
1239
+ selectItemsBy?: Record<string, any>[] | null;
1226
1240
  /**
1227
- * Coupon code to apply.
1228
- * @minLength 1
1229
- * @maxLength 20
1241
+ * Origin point for geo-distance sorting on a GEO field
1242
+ * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
1230
1243
  */
1231
- couponCode?: string | null;
1244
+ origin?: AddressLocation;
1232
1245
  }
1233
- interface GetOnlineOrderPreviewResponse {
1234
- /** Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan. */
1235
- order?: Order;
1236
- /** Whether the member has already reached purchase limit for the order's plan. */
1237
- purchaseLimitExceeded?: boolean;
1246
+ declare enum SortOrder {
1247
+ ASC = "ASC",
1248
+ DESC = "DESC"
1238
1249
  }
1239
- interface GetGuestOnlineOrderPreviewRequest {
1240
- /**
1241
- * Plan ID.
1242
- * @format GUID
1243
- */
1244
- planId?: string;
1250
+ /** @enumType */
1251
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
1252
+ interface AddressLocation {
1253
+ /** Address latitude. */
1254
+ latitude?: number | null;
1255
+ /** Address longitude. */
1256
+ longitude?: number | null;
1257
+ }
1258
+ interface ListOrdersResponse {
1259
+ /** List of orders. */
1260
+ orders?: Order[];
1261
+ /** Object containing paging-related data (number of orders returned, offset). */
1262
+ pagingMetadata?: PagingMetadataV2;
1263
+ }
1264
+ interface PagingMetadataV2 {
1265
+ /** Number of items returned in the response. */
1266
+ count?: number | null;
1267
+ /** Offset that was requested. */
1268
+ offset?: number | null;
1269
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1270
+ total?: number | null;
1271
+ /** Flag that indicates the server failed to calculate the `total` field. */
1272
+ tooManyToCount?: boolean | null;
1273
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1274
+ cursors?: Cursors;
1245
1275
  /**
1246
- * Start date for the ordered plan.
1247
- *
1248
- * Default: Current date
1276
+ * Indicates if there are more results after the current page.
1277
+ * If `true`, another page of results can be retrieved.
1278
+ * If `false`, this is the last page.
1279
+ * @internal
1249
1280
  */
1250
- startDate?: Date | null;
1281
+ hasNext?: boolean | null;
1282
+ }
1283
+ interface Cursors {
1251
1284
  /**
1252
- * Coupon code to apply.
1253
- * @minLength 1
1254
- * @maxLength 20
1285
+ * Cursor string pointing to the next page in the list of results.
1286
+ * @maxLength 16000
1255
1287
  */
1256
- couponCode?: string | null;
1288
+ next?: string | null;
1257
1289
  /**
1258
- * Email for checkout
1259
- * @format EMAIL
1290
+ * Cursor pointing to the previous page in the list of results.
1291
+ * @maxLength 16000
1260
1292
  */
1261
- email?: string;
1293
+ prev?: string | null;
1262
1294
  }
1263
- interface GetGuestOnlineOrderPreviewResponse {
1264
- /** Will be missing if limit is exceeded */
1265
- order?: Order;
1266
- /**
1267
- * Whether the purchase limit has already been reached for this plan by this email.
1268
- * Always false for plans without purchase limits.
1269
- */
1270
- purchaseLimitExceeded?: boolean;
1295
+ interface GetOrdersStatsRequest {
1271
1296
  }
1272
- interface GetOfflineOrderPreviewRequest {
1297
+ interface GetOrdersStatsResponse {
1298
+ /** Total number of orders. */
1299
+ totalOrderCount?: number;
1300
+ /** Number of active orders. */
1301
+ activeOrderCount?: number;
1302
+ }
1303
+ interface GetAvailableOrderActionsRequest {
1273
1304
  /**
1274
- * ID of the plan of the previewed order, from the Plans API.
1305
+ * Order ID.
1275
1306
  * @format GUID
1276
1307
  */
1277
- planId: string;
1308
+ id?: string;
1309
+ }
1310
+ interface GetAvailableOrderActionsResponse {
1311
+ /** Whether the order can be suspended. */
1312
+ suspendable?: boolean;
1313
+ /** If the order cannot be suspended, a reason is returned here. */
1314
+ notSuspendableReason?: ReasonNotSuspendableWithLiterals;
1315
+ /** Whether the order can be canceled by the buyer. */
1316
+ cancelableByBuyer?: boolean;
1317
+ }
1318
+ declare enum ReasonNotSuspendable {
1319
+ /** Undefined reason. */
1320
+ UNDEFINED = "UNDEFINED",
1321
+ /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
1322
+ PENDING = "PENDING",
1323
+ /** Trial orders can't be suspended. */
1324
+ TRIAL = "TRIAL",
1325
+ /** Canceled orders can't be suspended. */
1326
+ CANCELED = "CANCELED",
1327
+ /** Ended orders can't be suspended. */
1328
+ ENDED = "ENDED",
1329
+ /** Paid for orders with future start dates can't be suspended. */
1330
+ NOT_STARTED = "NOT_STARTED",
1331
+ /** Order is already suspended. */
1332
+ ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
1333
+ /** Orders based on recurring payments using older stripe versions can't be suspended. */
1334
+ OLD_STRIPE = "OLD_STRIPE"
1335
+ }
1336
+ /** @enumType */
1337
+ type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
1338
+ interface PostponeEndDateRequest {
1278
1339
  /**
1279
- * Member ID of the buyer the previewed order is for, from the Members API.
1340
+ * Order ID.
1280
1341
  * @format GUID
1281
1342
  */
1282
- memberId: string;
1343
+ id: string;
1283
1344
  /**
1284
- * Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
1345
+ * New end date and time.
1285
1346
  *
1286
- * Default: Current date and time.
1287
- */
1288
- startDate?: Date | null;
1289
- /**
1290
- * Coupon code to apply, from the Coupons API.
1291
- * @minLength 1
1292
- * @maxLength 20
1347
+ * Must be later than the current end date and time.
1293
1348
  */
1294
- couponCode?: string | null;
1349
+ endDate: Date | null;
1295
1350
  }
1296
- interface GetOfflineOrderPreviewResponse {
1297
- /** The previewed order, as if the plan had been ordered. */
1351
+ interface PostponeEndDateResponse {
1352
+ }
1353
+ interface OrderEndDatePostponed {
1354
+ /** Order whose `endDate` was postponed. */
1298
1355
  order?: Order;
1299
- /**
1300
- * Whether this previewed order would exceed the permitted amount of purchases available
1301
- * for this plan for this buyer.
1302
- *
1303
- * Always `false` for plans that do not have purchase limits.
1304
- */
1305
- purchaseLimitExceeded?: boolean;
1306
1356
  }
1307
- interface GetPricePreviewRequest {
1357
+ interface CancelOrderRequest {
1308
1358
  /**
1309
- * ID of plan to preview.
1359
+ * Order ID.
1310
1360
  * @format GUID
1311
1361
  */
1312
- planId: string;
1313
- /**
1314
- * Coupon code to apply, from the Coupons API.
1315
- * @minLength 1
1316
- * @maxLength 20
1317
- */
1318
- couponCode?: string | null;
1362
+ id: string;
1363
+ /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
1364
+ effectiveAt: CancellationEffectiveAtWithLiterals;
1319
1365
  }
1320
- interface GetPricePreviewResponse {
1321
- /**
1322
- * __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
1323
- * @deprecated __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
1324
- * @replacedBy prices
1325
- * @targetRemovalDate 2022-10-01
1326
- */
1327
- price?: PriceDetails;
1328
- /** Pricing details. */
1329
- prices?: SpannedPrice[];
1366
+ interface CancelOrderResponse {
1330
1367
  }
1331
- interface ChangeStartDateRequest {
1368
+ /**
1369
+ * Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
1370
+ *
1371
+ * To determine the specific reason of the cancellation check `order.cancellation.cause` field.
1372
+ */
1373
+ interface OrderCanceled {
1374
+ /** Canceled order. */
1375
+ order?: Order;
1376
+ }
1377
+ interface MarkAsPaidRequest {
1332
1378
  /**
1333
- * Draft order ID.
1379
+ * Order ID.
1334
1380
  * @format GUID
1335
1381
  */
1336
- orderId?: string;
1337
- /** New valid from date (timestamp). */
1338
- startDate?: Date | null;
1382
+ id: string;
1339
1383
  }
1340
- interface ChangeStartDateResponse {
1341
- /** Updated draft order. */
1342
- order?: Order;
1384
+ interface MarkAsPaidResponse {
1343
1385
  }
1344
- interface OrderStartDateChanged {
1345
- /** Order whose `startDate` changed. */
1386
+ interface OrderMarkedAsPaid {
1387
+ /** Order that was marked as paid. */
1346
1388
  order?: Order;
1347
1389
  }
1348
- interface ApplyCouponRequest {
1390
+ interface PauseOrderRequest {
1349
1391
  /**
1350
- * Draft order ID.
1392
+ * Order ID.
1351
1393
  * @format GUID
1352
1394
  */
1353
- orderId?: string;
1395
+ id: string;
1396
+ }
1397
+ interface PauseOrderResponse {
1398
+ }
1399
+ interface OrderPaused {
1400
+ /** Paused order. */
1401
+ order?: Order;
1402
+ }
1403
+ interface BulkPauseOrderRequest {
1354
1404
  /**
1355
- * Coupon code to apply.
1356
- * @minLength 1
1357
- * @maxLength 20
1405
+ * List of Order IDs.
1406
+ * @format GUID
1407
+ * @minSize 1
1408
+ * @maxSize 100
1358
1409
  */
1359
- couponCode?: string;
1410
+ ids?: string[];
1411
+ /** Set to true to return Order entity in response. */
1412
+ returnFullEntity?: boolean;
1360
1413
  }
1361
- interface ApplyCouponResponse {
1362
- /** Order with applied coupon and recalculated tax. */
1414
+ interface BulkPauseOrderResponse {
1415
+ /** Orders that were paused. */
1416
+ results?: BulkOrderResult[];
1417
+ /** Bulk action metadata. */
1418
+ bulkActionMetadata?: BulkActionMetadata;
1419
+ }
1420
+ interface BulkOrderResult {
1421
+ /** Item metadata */
1422
+ itemMetadata?: ItemMetadata;
1423
+ /** The order. */
1363
1424
  order?: Order;
1364
1425
  }
1365
- interface SetSubmissionRequest {
1426
+ interface ItemMetadata {
1427
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1428
+ id?: string | null;
1429
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1430
+ originalIndex?: number;
1431
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1432
+ success?: boolean;
1433
+ /** Details about the error in case of failure. */
1434
+ error?: ApplicationError;
1435
+ }
1436
+ interface ApplicationError {
1437
+ /** Error code. */
1438
+ code?: string;
1439
+ /** Description of the error. */
1440
+ description?: string;
1441
+ /** Data related to the error. */
1442
+ data?: Record<string, any> | null;
1443
+ }
1444
+ interface BulkActionMetadata {
1445
+ /** Number of items that were successfully processed. */
1446
+ totalSuccesses?: number;
1447
+ /** Number of items that couldn't be processed. */
1448
+ totalFailures?: number;
1449
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1450
+ undetailedFailures?: number;
1451
+ }
1452
+ interface ResumeOrderRequest {
1366
1453
  /**
1367
1454
  * Order ID.
1368
1455
  * @format GUID
1369
1456
  */
1370
- orderId?: string;
1457
+ id: string;
1458
+ }
1459
+ interface ResumeOrderResponse {
1460
+ }
1461
+ interface OrderResumed {
1462
+ /** Resumed order. */
1463
+ order?: Order;
1464
+ }
1465
+ interface BulkResumeOrderRequest {
1371
1466
  /**
1372
- * Submission ID.
1467
+ * List of Order IDs.
1373
1468
  * @format GUID
1469
+ * @minSize 1
1470
+ * @maxSize 100
1374
1471
  */
1375
- submissionId?: string;
1472
+ ids?: string[];
1473
+ /** Set to true to return Order entity in response. */
1474
+ returnFullEntity?: boolean;
1376
1475
  }
1377
- interface SetSubmissionResponse {
1378
- /** Order with submission id */
1379
- order?: Order;
1476
+ interface BulkResumeOrderResponse {
1477
+ /** Orders that were resumed. */
1478
+ results?: BulkOrderResult[];
1479
+ /** Bulk action metadata. */
1480
+ bulkActionMetadata?: BulkActionMetadata;
1380
1481
  }
1381
1482
  interface MemberGetOrderRequest {
1382
1483
  /**
@@ -1748,6 +1849,11 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
1748
1849
  __responseType: Q;
1749
1850
  __originalResponseType: R;
1750
1851
  };
1852
+ declare function createOnlineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOnlineOrderRequest$1, CreateOnlineOrderRequest, CreateOnlineOrderResponse$1, CreateOnlineOrderResponse>;
1853
+ declare function createOfflineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOfflineOrderRequest$1, CreateOfflineOrderRequest, CreateOfflineOrderResponse$1, CreateOfflineOrderResponse>;
1854
+ declare function getOnlineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOnlineOrderPreviewRequest$1, GetOnlineOrderPreviewRequest, GetOnlineOrderPreviewResponse$1, GetOnlineOrderPreviewResponse>;
1855
+ declare function getOfflineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewRequest, GetOfflineOrderPreviewResponse$1, GetOfflineOrderPreviewResponse>;
1856
+ declare function getPricePreview(): __PublicMethodMetaInfo<'POST', {}, GetPricePreviewRequest$1, GetPricePreviewRequest, GetPricePreviewResponse$1, GetPricePreviewResponse>;
1751
1857
  declare function managementGetOrder(): __PublicMethodMetaInfo<'GET', {
1752
1858
  id: string;
1753
1859
  }, GetOrderRequest$1, GetOrderRequest, GetOrderResponse$1, GetOrderResponse>;
@@ -1767,11 +1873,6 @@ declare function pauseOrder(): __PublicMethodMetaInfo<'POST', {
1767
1873
  declare function resumeOrder(): __PublicMethodMetaInfo<'POST', {
1768
1874
  id: string;
1769
1875
  }, ResumeOrderRequest$1, ResumeOrderRequest, ResumeOrderResponse$1, ResumeOrderResponse>;
1770
- declare function createOnlineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOnlineOrderRequest$1, CreateOnlineOrderRequest, CreateOnlineOrderResponse$1, CreateOnlineOrderResponse>;
1771
- declare function createOfflineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOfflineOrderRequest$1, CreateOfflineOrderRequest, CreateOfflineOrderResponse$1, CreateOfflineOrderResponse>;
1772
- declare function getOnlineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOnlineOrderPreviewRequest$1, GetOnlineOrderPreviewRequest, GetOnlineOrderPreviewResponse$1, GetOnlineOrderPreviewResponse>;
1773
- declare function getOfflineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewRequest, GetOfflineOrderPreviewResponse$1, GetOfflineOrderPreviewResponse>;
1774
- declare function getPricePreview(): __PublicMethodMetaInfo<'POST', {}, GetPricePreviewRequest$1, GetPricePreviewRequest, GetPricePreviewResponse$1, GetPricePreviewResponse>;
1775
1876
  declare function memberGetOrder(): __PublicMethodMetaInfo<'GET', {
1776
1877
  id: string;
1777
1878
  }, MemberGetOrderRequest$1, MemberGetOrderRequest, MemberGetOrderResponse$1, MemberGetOrderResponse>;