@wix/subscription 1.0.33 → 1.0.34

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.
@@ -89,6 +89,8 @@ interface Subscription$1 {
89
89
  changesCounter?: string | null;
90
90
  /** Billing order id. Optional. */
91
91
  orderId?: string | null;
92
+ /** Platform origin subscription is coming from. */
93
+ platformOrigin?: PlatformOrigin$1;
92
94
  /** items, minSize is 1, maxSize is 100 */
93
95
  items?: Item$1[];
94
96
  }
@@ -211,7 +213,9 @@ declare enum CollectionMethodEnumCollectionMethod$1 {
211
213
  /** Payment will be collected somehow. Billing only issues invoice per cycle. */
212
214
  SEND_INVOICE = "SEND_INVOICE",
213
215
  /** Payment will be collected externally */
214
- EXTERNAL = "EXTERNAL"
216
+ EXTERNAL = "EXTERNAL",
217
+ /** Indicates the product has a zero amount, meaning its free with no payment required. */
218
+ FREE = "FREE"
215
219
  }
216
220
  interface Duration$1 {
217
221
  /** Duration unit: DAY, WEEK, MONTH, YEAR */
@@ -814,18 +818,151 @@ interface SpecificDateSubscriptionUpdateData$1 {
814
818
  updateData?: SubscriptionUpdateData$1;
815
819
  executionDate?: Date | null;
816
820
  }
817
- interface GetSubscriptionRequest$1 {
818
- id: string;
821
+ interface PlatformOrigin$1 {
822
+ appId?: string | null;
823
+ entityId?: string | null;
819
824
  }
820
- interface GetSubscriptionResponse$1 {
825
+ interface ListSubscriptionHistoryRequest$1 {
826
+ subscriptionId: string;
827
+ /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
828
+ mode?: HistoryViewMode$1;
829
+ /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
830
+ cursor?: CursorPaging$1;
831
+ }
832
+ declare enum HistoryViewMode$1 {
833
+ UNKNOWN = "UNKNOWN",
834
+ /** Comprehensive view including all history events. */
835
+ BACKOFFICE = "BACKOFFICE",
836
+ /** User-centric view of the history. */
837
+ USER = "USER"
838
+ }
839
+ interface CursorPaging$1 {
840
+ /** Maximum number of items to return in the results. */
841
+ limit?: number | null;
842
+ /**
843
+ * Pointer to the next or previous page in the list of results.
844
+ *
845
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
846
+ * Not relevant for the first request.
847
+ */
848
+ cursor?: string | null;
849
+ }
850
+ interface ListSubscriptionHistoryResponse$1 {
851
+ /** List of history entries for the subscription. */
852
+ historyEntries?: SubscriptionHistoryEntry$1[];
853
+ /** Paging metadata. A `next` cursor is returned if there are more results. */
854
+ pagingMetadata?: PagingMetadataV2$1;
855
+ }
856
+ interface SubscriptionHistoryEntry$1 {
857
+ entryId?: string;
858
+ /** TODO: add max length? it is not defined in domainevents, so should we? */
859
+ slug?: string;
860
+ entryTime?: Date | null;
861
+ event?: SubscriptionEvent$1;
862
+ }
863
+ interface SubscriptionEvent$1 extends SubscriptionEventPayloadOneOf$1 {
864
+ created?: SubscriptionCreated$1;
865
+ updated?: SubscriptionUpdated$1;
866
+ deleted?: SubscriptionDeleted$1;
867
+ activated?: SubscriptionActivated$1;
868
+ ended?: SubscriptionEnded$1;
869
+ canceled?: SubscriptionCanceled$1;
870
+ paused?: SubscriptionPaused$1;
871
+ resumed?: SubscriptionResumed$1;
872
+ pauseRequested?: PauseSubscriptionRequested$1;
873
+ resumeRequested?: ResumeSubscriptionRequested$1;
874
+ scheduledPauseCanceled?: ScheduledPauseCanceled$1;
875
+ scheduledResumeCanceled?: ScheduledResumeCanceled$1;
876
+ billingCycleStarted?: SubscriptionBillingCycleStarted$1;
877
+ autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn$1;
878
+ autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff$1;
879
+ cycleReadyToPay?: SubscriptionCycleReadyToPay$1;
880
+ extended?: SubscriptionExtended$1;
881
+ initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted$1;
882
+ latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid$1;
883
+ revived?: SubscriptionRevived$1;
884
+ billingDateUpdated?: SubscriptionBillingDateUpdated$1;
885
+ futureUpdatesRequested?: FutureUpdatesRequested$1;
886
+ updatesApplied?: UpdatesApplied$1;
887
+ resetPendingUpdates?: ResetPendingUpdates$1;
888
+ gracePeriodStarted?: GracePeriodStarted$1;
889
+ gracePeriodEnded?: GracePeriodEnded$1;
890
+ paymentMethodUpdated?: PaymentMethodUpdated$1;
891
+ collectionMethodUpdated?: SubscriptionCollectionMethodUpdated$1;
892
+ freeTrailStarted?: FreeTrailStarted$1;
893
+ freeTrailEnded?: FreeTrailEnded$1;
894
+ subscriptionBoAction?: SubscriptionBackOfficeAction$1;
895
+ unknown?: UnknownSubscriptionEvent$1;
896
+ }
897
+ /** @oneof */
898
+ interface SubscriptionEventPayloadOneOf$1 {
899
+ created?: SubscriptionCreated$1;
900
+ updated?: SubscriptionUpdated$1;
901
+ deleted?: SubscriptionDeleted$1;
902
+ activated?: SubscriptionActivated$1;
903
+ ended?: SubscriptionEnded$1;
904
+ canceled?: SubscriptionCanceled$1;
905
+ paused?: SubscriptionPaused$1;
906
+ resumed?: SubscriptionResumed$1;
907
+ pauseRequested?: PauseSubscriptionRequested$1;
908
+ resumeRequested?: ResumeSubscriptionRequested$1;
909
+ scheduledPauseCanceled?: ScheduledPauseCanceled$1;
910
+ scheduledResumeCanceled?: ScheduledResumeCanceled$1;
911
+ billingCycleStarted?: SubscriptionBillingCycleStarted$1;
912
+ autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn$1;
913
+ autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff$1;
914
+ cycleReadyToPay?: SubscriptionCycleReadyToPay$1;
915
+ extended?: SubscriptionExtended$1;
916
+ initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted$1;
917
+ latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid$1;
918
+ revived?: SubscriptionRevived$1;
919
+ billingDateUpdated?: SubscriptionBillingDateUpdated$1;
920
+ futureUpdatesRequested?: FutureUpdatesRequested$1;
921
+ updatesApplied?: UpdatesApplied$1;
922
+ resetPendingUpdates?: ResetPendingUpdates$1;
923
+ gracePeriodStarted?: GracePeriodStarted$1;
924
+ gracePeriodEnded?: GracePeriodEnded$1;
925
+ paymentMethodUpdated?: PaymentMethodUpdated$1;
926
+ collectionMethodUpdated?: SubscriptionCollectionMethodUpdated$1;
927
+ freeTrailStarted?: FreeTrailStarted$1;
928
+ freeTrailEnded?: FreeTrailEnded$1;
929
+ subscriptionBoAction?: SubscriptionBackOfficeAction$1;
930
+ unknown?: UnknownSubscriptionEvent$1;
931
+ }
932
+ interface SubscriptionCreated$1 {
821
933
  subscription?: Subscription$1;
822
934
  }
823
- interface CustomerCancelSubscriptionRequest$1 {
824
- id: string;
825
- /** Optional action reason message */
826
- reason?: string | null;
935
+ interface SubscriptionUpdated$1 {
936
+ current?: Subscription$1;
937
+ previous?: Subscription$1;
938
+ diff?: SubscriptionDiff$1;
827
939
  }
828
- interface CustomerCancelSubscriptionResponse$1 {
940
+ interface SubscriptionDiff$1 {
941
+ added?: string | null;
942
+ changed?: string | null;
943
+ deleted?: string | null;
944
+ }
945
+ interface SubscriptionDeleted$1 {
946
+ subscriptionId?: string;
947
+ }
948
+ /**
949
+ * Sent each time a subscription status has been set to Active
950
+ * Active shows that a subscription is live and operational.
951
+ * For example:
952
+ * * For subscription with free trial, free trial start date is also the activation date.
953
+ * * For a subscription with future start date, the start date is also the activation date.
954
+ * * When a subscription is resumed from a pause status, the resume date is also the activation date.
955
+ */
956
+ interface SubscriptionActivated$1 {
957
+ subscription?: Subscription$1;
958
+ }
959
+ /**
960
+ * Sent each time a subscription status has been set to Ended
961
+ * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
962
+ * This is different from a Canceled subscription which ends the subscription before a designated end date.
963
+ * Therefore, Ended and Canceled are mutually exclusive.
964
+ */
965
+ interface SubscriptionEnded$1 {
829
966
  subscription?: Subscription$1;
830
967
  }
831
968
  /**
@@ -843,32 +980,48 @@ interface ActionDetails$1 {
843
980
  initiator?: HistoryActionInitiator$1;
844
981
  reason?: string | null;
845
982
  }
846
- interface CustomerTurnOnAutoRenewalRequest$1 {
847
- id: string;
848
- /** Optional action reason message */
849
- reason?: string | null;
983
+ interface SubscriptionPaused$1 {
984
+ subscription?: Subscription$1;
985
+ pausePolicy?: PausePolicy$1;
986
+ actionDetails?: ActionDetails$1;
850
987
  }
851
- interface CustomerTurnOnAutoRenewalResponse$1 {
988
+ interface SubscriptionResumed$1 {
852
989
  subscription?: Subscription$1;
990
+ actionDetails?: ActionDetails$1;
853
991
  }
854
- interface CustomerTurnOffAutoRenewalRequest$1 {
855
- id: string;
856
- /** Optional action reason message */
857
- reason?: string | null;
992
+ interface PauseSubscriptionRequested$1 {
993
+ subscription?: Subscription$1;
994
+ pauseAt?: PauseAt$1;
995
+ pausePolicy?: PausePolicy$1;
996
+ actionDetails?: ActionDetails$1;
858
997
  }
859
- interface CustomerTurnOffAutoRenewalResponse$1 {
998
+ interface ResumeSubscriptionRequested$1 {
860
999
  subscription?: Subscription$1;
1000
+ resumeAt?: ResumeAt$1;
1001
+ actionDetails?: ActionDetails$1;
861
1002
  }
862
- interface CustomerExtendSubscriptionRequest$1 {
863
- /** The ID of the subscription to be extended */
864
- id: string;
865
- /** Optional action reason message */
866
- reason?: string | null;
867
- /** For termed - Subscription end date will be updated with the extension period and number of cycles will be added */
868
- billingCyclesToAdd: number | null;
1003
+ interface ScheduledPauseCanceled$1 {
1004
+ subscription?: Subscription$1;
1005
+ actionDetails?: ActionDetails$1;
869
1006
  }
870
- interface CustomerExtendSubscriptionResponse$1 {
871
- /** The now extended subscription */
1007
+ interface ScheduledResumeCanceled$1 {
1008
+ subscription?: Subscription$1;
1009
+ actionDetails?: ActionDetails$1;
1010
+ }
1011
+ interface SubscriptionBillingCycleStarted$1 {
1012
+ subscription?: Subscription$1;
1013
+ /** Wix Pay transaction id, optional. Exists if event was triggered by a payment. */
1014
+ paymentTransactionId?: string | null;
1015
+ }
1016
+ interface SubscriptionAutoRenewalTurnedOn$1 {
1017
+ subscription?: Subscription$1;
1018
+ actionDetails?: ActionDetails$1;
1019
+ }
1020
+ interface SubscriptionAutoRenewalTurnedOff$1 {
1021
+ subscription?: Subscription$1;
1022
+ actionDetails?: ActionDetails$1;
1023
+ }
1024
+ interface SubscriptionCycleReadyToPay$1 {
872
1025
  subscription?: Subscription$1;
873
1026
  }
874
1027
  interface SubscriptionExtended$1 extends SubscriptionExtendedExtendPolicyOneOf$1 {
@@ -882,68 +1035,95 @@ interface SubscriptionExtendedExtendPolicyOneOf$1 {
882
1035
  extensionPeriod?: Duration$1;
883
1036
  extensionBillingCycles?: number;
884
1037
  }
885
- interface QuerySubscriptionsRequest$1 {
886
- query?: QueryV2$1;
1038
+ interface SubscriptionInitialPurchaseCompleted$1 {
1039
+ subscription?: Subscription$1;
1040
+ actionDetails?: ActionDetails$1;
1041
+ paymentTransactionId?: string | null;
887
1042
  }
888
- interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 {
889
- /** Paging options to limit and skip the number of items. */
890
- paging?: Paging$1;
891
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
892
- cursorPaging?: CursorPaging$1;
893
- /**
894
- * Filter object.
895
- *
896
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
897
- */
898
- filter?: Record<string, any> | null;
899
- /**
900
- * Sort object.
901
- *
902
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
903
- */
904
- sort?: Sorting$1[];
905
- /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
906
- fields?: string[];
907
- /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
908
- fieldsets?: string[];
1043
+ interface LatestInvoiceMarkedAsPaid$1 {
1044
+ subscription?: Subscription$1;
909
1045
  }
910
- /** @oneof */
911
- interface QueryV2PagingMethodOneOf$1 {
912
- /** Paging options to limit and skip the number of items. */
913
- paging?: Paging$1;
914
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
915
- cursorPaging?: CursorPaging$1;
1046
+ interface SubscriptionRevived$1 {
1047
+ subscription?: Subscription$1;
916
1048
  }
917
- interface Sorting$1 {
918
- /** Name of the field to sort by. */
919
- fieldName?: string;
920
- /** Sort order. */
921
- order?: SortOrder$1;
1049
+ interface SubscriptionBillingDateUpdated$1 {
1050
+ subscription?: Subscription$1;
1051
+ billingDate?: Date | null;
1052
+ proration?: Proration$1;
922
1053
  }
923
- declare enum SortOrder$1 {
924
- ASC = "ASC",
925
- DESC = "DESC"
1054
+ interface FutureUpdatesRequested$1 {
1055
+ subscription?: Subscription$1;
1056
+ requestedUpdateData?: SubscriptionUpdateData$1;
926
1057
  }
927
- interface Paging$1 {
928
- /** Number of items to load. */
929
- limit?: number | null;
930
- /** Number of items to skip in the current sort order. */
931
- offset?: number | null;
1058
+ interface UpdatesApplied$1 {
1059
+ subscription?: Subscription$1;
1060
+ updateAction?: UpdateAction$1;
1061
+ appliedUpdateData?: SubscriptionUpdateData$1;
932
1062
  }
933
- interface CursorPaging$1 {
934
- /** Maximum number of items to return in the results. */
935
- limit?: number | null;
936
- /**
937
- * Pointer to the next or previous page in the list of results.
938
- *
939
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
940
- * Not relevant for the first request.
941
- */
942
- cursor?: string | null;
1063
+ declare enum UpdateAction$1 {
1064
+ NONE = "NONE",
1065
+ /** Update subscription immediately, please note proration for updates changing price are not yet supported */
1066
+ IMMEDIATELY = "IMMEDIATELY",
1067
+ /** Request updates that will take affect only at the start of the next billing cycle. */
1068
+ NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
1069
+ /** Reset all pending updates */
1070
+ RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
1071
+ /** Request updates that will take affect only at a specific date. */
1072
+ SPECIFIC_DATE = "SPECIFIC_DATE"
943
1073
  }
944
- interface QuerySubscriptionsResponse$1 {
945
- subscriptions?: Subscription$1[];
946
- metadata?: PagingMetadataV2$1;
1074
+ interface ResetPendingUpdates$1 {
1075
+ subscription?: Subscription$1;
1076
+ }
1077
+ interface GracePeriodStarted$1 {
1078
+ subscription?: Subscription$1;
1079
+ }
1080
+ interface GracePeriodEnded$1 {
1081
+ subscription?: Subscription$1;
1082
+ /** Indication for the payment settlement method. */
1083
+ paymentSettlementMethod?: PaymentSettlementMethod$1;
1084
+ }
1085
+ declare enum PaymentSettlementMethod$1 {
1086
+ UNKNOWN = "UNKNOWN",
1087
+ /** System-defined payment settlement. */
1088
+ SYSTEM = "SYSTEM",
1089
+ /** Manually mark the payment as paid. */
1090
+ MARK_AS_PAID = "MARK_AS_PAID",
1091
+ /** Require the customer to pay immediately, by insert a new payment method. */
1092
+ CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
1093
+ }
1094
+ interface PaymentMethodUpdated$1 {
1095
+ subscription?: Subscription$1;
1096
+ initiator?: HistoryActionInitiator$1;
1097
+ paymentMode?: PaymentMode$1;
1098
+ }
1099
+ declare enum PaymentMode$1 {
1100
+ NONE = "NONE",
1101
+ /** The latest invoice of the subscription will be charged. */
1102
+ CHARGE = "CHARGE",
1103
+ /** An authorization invoice with zero amount will be created. */
1104
+ AUTHORIZATION = "AUTHORIZATION"
1105
+ }
1106
+ interface SubscriptionCollectionMethodUpdated$1 {
1107
+ subscription?: Subscription$1;
1108
+ newCollectionMethod?: CollectionMethodEnumCollectionMethod$1;
1109
+ previousCollectionMethod?: CollectionMethodEnumCollectionMethod$1;
1110
+ }
1111
+ interface FreeTrailStarted$1 {
1112
+ subscription?: Subscription$1;
1113
+ }
1114
+ interface FreeTrailEnded$1 {
1115
+ subscription?: Subscription$1;
1116
+ }
1117
+ interface SubscriptionBackOfficeAction$1 {
1118
+ subscription?: Subscription$1;
1119
+ /** The backoffice method name */
1120
+ name?: string;
1121
+ /** json as string format, to store the flatted request object */
1122
+ params?: string;
1123
+ }
1124
+ /** Defines unknown events restored from the logs */
1125
+ interface UnknownSubscriptionEvent$1 {
1126
+ subscriptionAsString?: string | null;
947
1127
  }
948
1128
  interface PagingMetadataV2$1 {
949
1129
  /** Number of items returned in the response. */
@@ -963,6 +1143,100 @@ interface Cursors$1 {
963
1143
  /** Cursor pointing to the previous page in the list of results. */
964
1144
  prev?: string | null;
965
1145
  }
1146
+ interface GetSubscriptionRequest$1 {
1147
+ id: string;
1148
+ }
1149
+ interface GetSubscriptionResponse$1 {
1150
+ subscription?: Subscription$1;
1151
+ }
1152
+ interface CustomerCancelSubscriptionRequest$1 {
1153
+ id: string;
1154
+ /** Optional action reason message */
1155
+ reason?: string | null;
1156
+ }
1157
+ interface CustomerCancelSubscriptionResponse$1 {
1158
+ subscription?: Subscription$1;
1159
+ }
1160
+ interface CustomerTurnOnAutoRenewalRequest$1 {
1161
+ id: string;
1162
+ /** Optional action reason message */
1163
+ reason?: string | null;
1164
+ }
1165
+ interface CustomerTurnOnAutoRenewalResponse$1 {
1166
+ subscription?: Subscription$1;
1167
+ }
1168
+ interface CustomerTurnOffAutoRenewalRequest$1 {
1169
+ id: string;
1170
+ /** Optional action reason message */
1171
+ reason?: string | null;
1172
+ }
1173
+ interface CustomerTurnOffAutoRenewalResponse$1 {
1174
+ subscription?: Subscription$1;
1175
+ }
1176
+ interface CustomerExtendSubscriptionRequest$1 {
1177
+ /** The ID of the subscription to be extended */
1178
+ id: string;
1179
+ /** Optional action reason message */
1180
+ reason?: string | null;
1181
+ /** For termed - Subscription end date will be updated with the extension period and number of cycles will be added */
1182
+ billingCyclesToAdd: number | null;
1183
+ }
1184
+ interface CustomerExtendSubscriptionResponse$1 {
1185
+ /** The now extended subscription */
1186
+ subscription?: Subscription$1;
1187
+ }
1188
+ interface QuerySubscriptionsRequest$1 {
1189
+ query?: QueryV2$1;
1190
+ }
1191
+ interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 {
1192
+ /** Paging options to limit and skip the number of items. */
1193
+ paging?: Paging$1;
1194
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1195
+ cursorPaging?: CursorPaging$1;
1196
+ /**
1197
+ * Filter object.
1198
+ *
1199
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1200
+ */
1201
+ filter?: Record<string, any> | null;
1202
+ /**
1203
+ * Sort object.
1204
+ *
1205
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1206
+ */
1207
+ sort?: Sorting$1[];
1208
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
1209
+ fields?: string[];
1210
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
1211
+ fieldsets?: string[];
1212
+ }
1213
+ /** @oneof */
1214
+ interface QueryV2PagingMethodOneOf$1 {
1215
+ /** Paging options to limit and skip the number of items. */
1216
+ paging?: Paging$1;
1217
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1218
+ cursorPaging?: CursorPaging$1;
1219
+ }
1220
+ interface Sorting$1 {
1221
+ /** Name of the field to sort by. */
1222
+ fieldName?: string;
1223
+ /** Sort order. */
1224
+ order?: SortOrder$1;
1225
+ }
1226
+ declare enum SortOrder$1 {
1227
+ ASC = "ASC",
1228
+ DESC = "DESC"
1229
+ }
1230
+ interface Paging$1 {
1231
+ /** Number of items to load. */
1232
+ limit?: number | null;
1233
+ /** Number of items to skip in the current sort order. */
1234
+ offset?: number | null;
1235
+ }
1236
+ interface QuerySubscriptionsResponse$1 {
1237
+ subscriptions?: Subscription$1[];
1238
+ metadata?: PagingMetadataV2$1;
1239
+ }
966
1240
  interface CountSubscriptionsRequest$1 {
967
1241
  /** Filters to specify which subscriptions are counted. */
968
1242
  filter?: CountSubscriptionFilter$1;
@@ -1266,13 +1540,6 @@ interface InitiatePaymentMethodSetupRequest$1 {
1266
1540
  paymentMode?: PaymentMode$1;
1267
1541
  paymentSettings?: PaymentSettings$1;
1268
1542
  }
1269
- declare enum PaymentMode$1 {
1270
- NONE = "NONE",
1271
- /** The latest invoice of the subscription will be charged. */
1272
- CHARGE = "CHARGE",
1273
- /** An authorization invoice with zero amount will be created. */
1274
- AUTHORIZATION = "AUTHORIZATION"
1275
- }
1276
1543
  interface PaymentSettings$1 {
1277
1544
  /** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */
1278
1545
  allowedProviderIds?: string[];
@@ -1315,64 +1582,6 @@ interface PaymentOrigin$1 {
1315
1582
  interface InitiatePaymentMethodSetupResponse$1 {
1316
1583
  paymentOrderId?: string;
1317
1584
  }
1318
- interface PayCycleRequest$1 {
1319
- subscriptionId: string;
1320
- paymentTestMode?: PaymentTestMode$1;
1321
- tenantId: string;
1322
- }
1323
- declare enum PaymentTestMode$1 {
1324
- REGULAR = "REGULAR",
1325
- FAIL_TECHNICAL = "FAIL_TECHNICAL",
1326
- FAIL_DECLINE = "FAIL_DECLINE",
1327
- FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
1328
- }
1329
- interface PayCycleResponse$1 {
1330
- invoiceId?: string;
1331
- paymentOrderId?: string | null;
1332
- subscription?: Subscription$1;
1333
- }
1334
- declare enum ActionInitiator$1 {
1335
- UNDEFINED = "UNDEFINED",
1336
- BUSINESS = "BUSINESS",
1337
- CUSTOMER = "CUSTOMER",
1338
- SYSTEM = "SYSTEM"
1339
- }
1340
- interface SubscriptionBillingCycleStarted$1 {
1341
- subscription?: Subscription$1;
1342
- /** Wix Pay transaction id, optional. Exists if event was triggered by a payment. */
1343
- paymentTransactionId?: string | null;
1344
- }
1345
- /**
1346
- * Sent each time a subscription status has been set to Active
1347
- * Active shows that a subscription is live and operational.
1348
- * For example:
1349
- * * For subscription with free trial, free trial start date is also the activation date.
1350
- * * For a subscription with future start date, the start date is also the activation date.
1351
- * * When a subscription is resumed from a pause status, the resume date is also the activation date.
1352
- */
1353
- interface SubscriptionActivated$1 {
1354
- subscription?: Subscription$1;
1355
- }
1356
- /**
1357
- * Sent each time a subscription status has been set to Ended
1358
- * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
1359
- * This is different from a Canceled subscription which ends the subscription before a designated end date.
1360
- * Therefore, Ended and Canceled are mutually exclusive.
1361
- */
1362
- interface SubscriptionEnded$1 {
1363
- subscription?: Subscription$1;
1364
- }
1365
- interface SubscriptionInitialPurchaseCompleted$1 {
1366
- subscription?: Subscription$1;
1367
- actionDetails?: ActionDetails$1;
1368
- paymentTransactionId?: string | null;
1369
- }
1370
- interface SubscriptionCycleReadyToPay$1 {
1371
- subscription?: Subscription$1;
1372
- }
1373
- interface SubscriptionRevived$1 {
1374
- subscription?: Subscription$1;
1375
- }
1376
1585
  interface UpdateSubscriptionBillingDateRequest$1 {
1377
1586
  /** ID of the subscription to update the billing date for. */
1378
1587
  id: string;
@@ -1393,22 +1602,6 @@ interface UpdateSubscriptionBillingDateResponse$1 {
1393
1602
  /** Updated subscription. */
1394
1603
  subscription?: Subscription$1;
1395
1604
  }
1396
- interface SubscriptionBillingDateUpdated$1 {
1397
- subscription?: Subscription$1;
1398
- billingDate?: Date | null;
1399
- proration?: Proration$1;
1400
- }
1401
- declare enum UpdateAction$1 {
1402
- NONE = "NONE",
1403
- /** Update subscription immediately, please note proration for updates changing price are not yet supported */
1404
- IMMEDIATELY = "IMMEDIATELY",
1405
- /** Request updates that will take affect only at the start of the next billing cycle. */
1406
- NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
1407
- /** Reset all pending updates */
1408
- RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
1409
- /** Request updates that will take affect only at a specific date. */
1410
- SPECIFIC_DATE = "SPECIFIC_DATE"
1411
- }
1412
1605
  interface ScheduleAdditionalInfo$1 extends ScheduleAdditionalInfoParamOneOf$1 {
1413
1606
  /**
1414
1607
  * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
@@ -1457,6 +1650,12 @@ interface ActionContext$1 {
1457
1650
  /** Optional action reason message */
1458
1651
  reason?: string | null;
1459
1652
  }
1653
+ declare enum ActionInitiator$1 {
1654
+ UNDEFINED = "UNDEFINED",
1655
+ BUSINESS = "BUSINESS",
1656
+ CUSTOMER = "CUSTOMER",
1657
+ SYSTEM = "SYSTEM"
1658
+ }
1460
1659
  interface CancelSubscriptionResponse$1 {
1461
1660
  subscription?: Subscription$1;
1462
1661
  }
@@ -1473,21 +1672,6 @@ interface PauseSubscriptionRequest$1 {
1473
1672
  interface PauseSubscriptionResponse$1 {
1474
1673
  subscription?: Subscription$1;
1475
1674
  }
1476
- interface SubscriptionPaused$1 {
1477
- subscription?: Subscription$1;
1478
- pausePolicy?: PausePolicy$1;
1479
- actionDetails?: ActionDetails$1;
1480
- }
1481
- interface PauseSubscriptionRequested$1 {
1482
- subscription?: Subscription$1;
1483
- pauseAt?: PauseAt$1;
1484
- pausePolicy?: PausePolicy$1;
1485
- actionDetails?: ActionDetails$1;
1486
- }
1487
- interface ScheduledPauseCanceled$1 {
1488
- subscription?: Subscription$1;
1489
- actionDetails?: ActionDetails$1;
1490
- }
1491
1675
  interface ResumeSubscriptionRequest$1 {
1492
1676
  id: string;
1493
1677
  resumeAt?: ResumeAt$1;
@@ -1498,19 +1682,6 @@ interface ResumeSubscriptionRequest$1 {
1498
1682
  interface ResumeSubscriptionResponse$1 {
1499
1683
  subscription?: Subscription$1;
1500
1684
  }
1501
- interface SubscriptionResumed$1 {
1502
- subscription?: Subscription$1;
1503
- actionDetails?: ActionDetails$1;
1504
- }
1505
- interface ResumeSubscriptionRequested$1 {
1506
- subscription?: Subscription$1;
1507
- resumeAt?: ResumeAt$1;
1508
- actionDetails?: ActionDetails$1;
1509
- }
1510
- interface ScheduledResumeCanceled$1 {
1511
- subscription?: Subscription$1;
1512
- actionDetails?: ActionDetails$1;
1513
- }
1514
1685
  interface SearchSubscriptionsRequest$1 extends SearchSubscriptionsRequestPagingMethodOneOf$1 {
1515
1686
  /** Limit number of results and enable to skip rows. The default limit is 25. */
1516
1687
  paging?: Paging$1;
@@ -1542,10 +1713,6 @@ interface TurnOnSubscriptionAutoRenewalRequest$1 {
1542
1713
  interface TurnOnSubscriptionAutoRenewalResponse$1 {
1543
1714
  subscription?: Subscription$1;
1544
1715
  }
1545
- interface SubscriptionAutoRenewalTurnedOn$1 {
1546
- subscription?: Subscription$1;
1547
- actionDetails?: ActionDetails$1;
1548
- }
1549
1716
  interface TurnOffSubscriptionAutoRenewalRequest$1 {
1550
1717
  id: string;
1551
1718
  actionContext: ActionContext$1;
@@ -1553,10 +1720,6 @@ interface TurnOffSubscriptionAutoRenewalRequest$1 {
1553
1720
  interface TurnOffSubscriptionAutoRenewalResponse$1 {
1554
1721
  subscription?: Subscription$1;
1555
1722
  }
1556
- interface SubscriptionAutoRenewalTurnedOff$1 {
1557
- subscription?: Subscription$1;
1558
- actionDetails?: ActionDetails$1;
1559
- }
1560
1723
  interface MarkLatestInvoiceAsPaidRequest$1 {
1561
1724
  /** The ID of the offline subscription to mark as paid its latest invoice */
1562
1725
  subscriptionId: string;
@@ -1564,9 +1727,6 @@ interface MarkLatestInvoiceAsPaidRequest$1 {
1564
1727
  interface MarkLatestInvoiceAsPaidResponse$1 {
1565
1728
  subscription?: Subscription$1;
1566
1729
  }
1567
- interface LatestInvoiceMarkedAsPaid$1 {
1568
- subscription?: Subscription$1;
1569
- }
1570
1730
  interface GetSubscriptionsStatsRequest$1 {
1571
1731
  }
1572
1732
  interface GetSubscriptionsStatsResponse$1 {
@@ -1705,173 +1865,21 @@ interface SubscriptionCharges$1 {
1705
1865
  /** Charges for subscription. */
1706
1866
  charges?: Charge$1[];
1707
1867
  }
1708
- interface ListSubscriptionHistoryRequest$1 {
1868
+ interface PayCycleRequest$1 {
1709
1869
  subscriptionId: string;
1710
- /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
1711
- mode?: HistoryViewMode$1;
1712
- /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
1713
- cursor?: CursorPaging$1;
1714
- }
1715
- declare enum HistoryViewMode$1 {
1716
- UNKNOWN = "UNKNOWN",
1717
- /** Comprehensive view including all history events. */
1718
- BACKOFFICE = "BACKOFFICE",
1719
- /** User-centric view of the history. */
1720
- USER = "USER"
1721
- }
1722
- interface ListSubscriptionHistoryResponse$1 {
1723
- /** List of history entries for the subscription. */
1724
- historyEntries?: SubscriptionHistoryEntry$1[];
1725
- /** Paging metadata. A `next` cursor is returned if there are more results. */
1726
- pagingMetadata?: PagingMetadataV2$1;
1727
- }
1728
- interface SubscriptionHistoryEntry$1 {
1729
- entryId?: string;
1730
- /** TODO: add max length? it is not defined in domainevents, so should we? */
1731
- slug?: string;
1732
- entryTime?: Date | null;
1733
- event?: SubscriptionEvent$1;
1734
- }
1735
- interface SubscriptionEvent$1 extends SubscriptionEventPayloadOneOf$1 {
1736
- created?: SubscriptionCreated$1;
1737
- updated?: SubscriptionUpdated$1;
1738
- deleted?: SubscriptionDeleted$1;
1739
- activated?: SubscriptionActivated$1;
1740
- ended?: SubscriptionEnded$1;
1741
- canceled?: SubscriptionCanceled$1;
1742
- paused?: SubscriptionPaused$1;
1743
- resumed?: SubscriptionResumed$1;
1744
- pauseRequested?: PauseSubscriptionRequested$1;
1745
- resumeRequested?: ResumeSubscriptionRequested$1;
1746
- scheduledPauseCanceled?: ScheduledPauseCanceled$1;
1747
- scheduledResumeCanceled?: ScheduledResumeCanceled$1;
1748
- billingCycleStarted?: SubscriptionBillingCycleStarted$1;
1749
- autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn$1;
1750
- autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff$1;
1751
- cycleReadyToPay?: SubscriptionCycleReadyToPay$1;
1752
- extended?: SubscriptionExtended$1;
1753
- initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted$1;
1754
- latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid$1;
1755
- revived?: SubscriptionRevived$1;
1756
- billingDateUpdated?: SubscriptionBillingDateUpdated$1;
1757
- futureUpdatesRequested?: FutureUpdatesRequested$1;
1758
- updatesApplied?: UpdatesApplied$1;
1759
- resetPendingUpdates?: ResetPendingUpdates$1;
1760
- gracePeriodStarted?: GracePeriodStarted$1;
1761
- gracePeriodEnded?: GracePeriodEnded$1;
1762
- paymentMethodUpdated?: PaymentMethodUpdated$1;
1763
- collectionMethodUpdated?: SubscriptionCollectionMethodUpdated$1;
1764
- freeTrailStarted?: FreeTrailStarted$1;
1765
- freeTrailEnded?: FreeTrailEnded$1;
1766
- subscriptionBoAction?: SubscriptionBackOfficeAction$1;
1767
- unknown?: UnknownSubscriptionEvent$1;
1768
- }
1769
- /** @oneof */
1770
- interface SubscriptionEventPayloadOneOf$1 {
1771
- created?: SubscriptionCreated$1;
1772
- updated?: SubscriptionUpdated$1;
1773
- deleted?: SubscriptionDeleted$1;
1774
- activated?: SubscriptionActivated$1;
1775
- ended?: SubscriptionEnded$1;
1776
- canceled?: SubscriptionCanceled$1;
1777
- paused?: SubscriptionPaused$1;
1778
- resumed?: SubscriptionResumed$1;
1779
- pauseRequested?: PauseSubscriptionRequested$1;
1780
- resumeRequested?: ResumeSubscriptionRequested$1;
1781
- scheduledPauseCanceled?: ScheduledPauseCanceled$1;
1782
- scheduledResumeCanceled?: ScheduledResumeCanceled$1;
1783
- billingCycleStarted?: SubscriptionBillingCycleStarted$1;
1784
- autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn$1;
1785
- autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff$1;
1786
- cycleReadyToPay?: SubscriptionCycleReadyToPay$1;
1787
- extended?: SubscriptionExtended$1;
1788
- initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted$1;
1789
- latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid$1;
1790
- revived?: SubscriptionRevived$1;
1791
- billingDateUpdated?: SubscriptionBillingDateUpdated$1;
1792
- futureUpdatesRequested?: FutureUpdatesRequested$1;
1793
- updatesApplied?: UpdatesApplied$1;
1794
- resetPendingUpdates?: ResetPendingUpdates$1;
1795
- gracePeriodStarted?: GracePeriodStarted$1;
1796
- gracePeriodEnded?: GracePeriodEnded$1;
1797
- paymentMethodUpdated?: PaymentMethodUpdated$1;
1798
- collectionMethodUpdated?: SubscriptionCollectionMethodUpdated$1;
1799
- freeTrailStarted?: FreeTrailStarted$1;
1800
- freeTrailEnded?: FreeTrailEnded$1;
1801
- subscriptionBoAction?: SubscriptionBackOfficeAction$1;
1802
- unknown?: UnknownSubscriptionEvent$1;
1803
- }
1804
- interface SubscriptionCreated$1 {
1805
- subscription?: Subscription$1;
1806
- }
1807
- interface SubscriptionUpdated$1 {
1808
- current?: Subscription$1;
1809
- previous?: Subscription$1;
1810
- diff?: SubscriptionDiff$1;
1811
- }
1812
- interface SubscriptionDiff$1 {
1813
- added?: string | null;
1814
- changed?: string | null;
1815
- deleted?: string | null;
1816
- }
1817
- interface SubscriptionDeleted$1 {
1818
- subscriptionId?: string;
1819
- }
1820
- interface FutureUpdatesRequested$1 {
1821
- subscription?: Subscription$1;
1822
- requestedUpdateData?: SubscriptionUpdateData$1;
1823
- }
1824
- interface UpdatesApplied$1 {
1825
- subscription?: Subscription$1;
1826
- updateAction?: UpdateAction$1;
1827
- appliedUpdateData?: SubscriptionUpdateData$1;
1828
- }
1829
- interface ResetPendingUpdates$1 {
1830
- subscription?: Subscription$1;
1831
- }
1832
- interface GracePeriodStarted$1 {
1833
- subscription?: Subscription$1;
1834
- }
1835
- interface GracePeriodEnded$1 {
1836
- subscription?: Subscription$1;
1837
- /** Indication for the payment settlement method. */
1838
- paymentSettlementMethod?: PaymentSettlementMethod$1;
1839
- }
1840
- declare enum PaymentSettlementMethod$1 {
1841
- UNKNOWN = "UNKNOWN",
1842
- /** System-defined payment settlement. */
1843
- SYSTEM = "SYSTEM",
1844
- /** Manually mark the payment as paid. */
1845
- MARK_AS_PAID = "MARK_AS_PAID",
1846
- /** Require the customer to pay immediately, by insert a new payment method. */
1847
- CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
1848
- }
1849
- interface PaymentMethodUpdated$1 {
1850
- subscription?: Subscription$1;
1851
- initiator?: HistoryActionInitiator$1;
1852
- paymentMode?: PaymentMode$1;
1853
- }
1854
- interface SubscriptionCollectionMethodUpdated$1 {
1855
- subscription?: Subscription$1;
1856
- newCollectionMethod?: CollectionMethodEnumCollectionMethod$1;
1857
- previousCollectionMethod?: CollectionMethodEnumCollectionMethod$1;
1858
- }
1859
- interface FreeTrailStarted$1 {
1860
- subscription?: Subscription$1;
1870
+ paymentTestMode?: PaymentTestMode$1;
1871
+ tenantId: string;
1861
1872
  }
1862
- interface FreeTrailEnded$1 {
1863
- subscription?: Subscription$1;
1873
+ declare enum PaymentTestMode$1 {
1874
+ REGULAR = "REGULAR",
1875
+ FAIL_TECHNICAL = "FAIL_TECHNICAL",
1876
+ FAIL_DECLINE = "FAIL_DECLINE",
1877
+ FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
1864
1878
  }
1865
- interface SubscriptionBackOfficeAction$1 {
1879
+ interface PayCycleResponse$1 {
1880
+ invoiceId?: string;
1881
+ paymentOrderId?: string | null;
1866
1882
  subscription?: Subscription$1;
1867
- /** The backoffice method name */
1868
- name?: string;
1869
- /** json as string format, to store the flatted request object */
1870
- params?: string;
1871
- }
1872
- /** Defines unknown events restored from the logs */
1873
- interface UnknownSubscriptionEvent$1 {
1874
- subscriptionAsString?: string | null;
1875
1883
  }
1876
1884
  interface CustomerNonNullableFields$1 {
1877
1885
  visitorId: string;
@@ -2046,29 +2054,195 @@ interface SubscriptionNonNullableFields$1 {
2046
2054
  specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields$1;
2047
2055
  items: ItemNonNullableFields$1[];
2048
2056
  }
2049
- interface GetSubscriptionResponseNonNullableFields$1 {
2057
+ interface SubscriptionCreatedNonNullableFields$1 {
2050
2058
  subscription?: SubscriptionNonNullableFields$1;
2051
2059
  }
2052
- interface CustomerCancelSubscriptionResponseNonNullableFields$1 {
2060
+ interface SubscriptionUpdatedNonNullableFields$1 {
2061
+ current?: SubscriptionNonNullableFields$1;
2062
+ previous?: SubscriptionNonNullableFields$1;
2063
+ }
2064
+ interface SubscriptionDeletedNonNullableFields$1 {
2065
+ subscriptionId: string;
2066
+ }
2067
+ interface SubscriptionActivatedNonNullableFields$1 {
2053
2068
  subscription?: SubscriptionNonNullableFields$1;
2054
2069
  }
2055
- interface CustomerTurnOnAutoRenewalResponseNonNullableFields$1 {
2070
+ interface SubscriptionEndedNonNullableFields$1 {
2056
2071
  subscription?: SubscriptionNonNullableFields$1;
2057
2072
  }
2058
- interface CustomerTurnOffAutoRenewalResponseNonNullableFields$1 {
2073
+ interface ActionDetailsNonNullableFields$1 {
2074
+ initiator: HistoryActionInitiator$1;
2075
+ }
2076
+ interface SubscriptionCanceledNonNullableFields$1 {
2059
2077
  subscription?: SubscriptionNonNullableFields$1;
2078
+ actionDetails?: ActionDetailsNonNullableFields$1;
2060
2079
  }
2061
- interface CustomerExtendSubscriptionResponseNonNullableFields$1 {
2080
+ interface SubscriptionPausedNonNullableFields$1 {
2062
2081
  subscription?: SubscriptionNonNullableFields$1;
2082
+ pausePolicy: PausePolicy$1;
2083
+ actionDetails?: ActionDetailsNonNullableFields$1;
2063
2084
  }
2064
- interface QuerySubscriptionsResponseNonNullableFields$1 {
2065
- subscriptions: SubscriptionNonNullableFields$1[];
2085
+ interface SubscriptionResumedNonNullableFields$1 {
2086
+ subscription?: SubscriptionNonNullableFields$1;
2087
+ actionDetails?: ActionDetailsNonNullableFields$1;
2066
2088
  }
2067
- interface UpdateSubscriptionPaymentMethodResponseNonNullableFields$1 {
2089
+ interface PauseSubscriptionRequestedNonNullableFields$1 {
2068
2090
  subscription?: SubscriptionNonNullableFields$1;
2091
+ pauseAt: PauseAt$1;
2092
+ pausePolicy: PausePolicy$1;
2093
+ actionDetails?: ActionDetailsNonNullableFields$1;
2069
2094
  }
2070
- interface ActionNonNullableFields$1 {
2071
- actionType: ActionType$1;
2095
+ interface ResumeSubscriptionRequestedNonNullableFields$1 {
2096
+ subscription?: SubscriptionNonNullableFields$1;
2097
+ resumeAt: ResumeAt$1;
2098
+ actionDetails?: ActionDetailsNonNullableFields$1;
2099
+ }
2100
+ interface ScheduledPauseCanceledNonNullableFields$1 {
2101
+ subscription?: SubscriptionNonNullableFields$1;
2102
+ actionDetails?: ActionDetailsNonNullableFields$1;
2103
+ }
2104
+ interface ScheduledResumeCanceledNonNullableFields$1 {
2105
+ subscription?: SubscriptionNonNullableFields$1;
2106
+ actionDetails?: ActionDetailsNonNullableFields$1;
2107
+ }
2108
+ interface SubscriptionBillingCycleStartedNonNullableFields$1 {
2109
+ subscription?: SubscriptionNonNullableFields$1;
2110
+ }
2111
+ interface SubscriptionAutoRenewalTurnedOnNonNullableFields$1 {
2112
+ subscription?: SubscriptionNonNullableFields$1;
2113
+ actionDetails?: ActionDetailsNonNullableFields$1;
2114
+ }
2115
+ interface SubscriptionAutoRenewalTurnedOffNonNullableFields$1 {
2116
+ subscription?: SubscriptionNonNullableFields$1;
2117
+ actionDetails?: ActionDetailsNonNullableFields$1;
2118
+ }
2119
+ interface SubscriptionCycleReadyToPayNonNullableFields$1 {
2120
+ subscription?: SubscriptionNonNullableFields$1;
2121
+ }
2122
+ interface SubscriptionExtendedNonNullableFields$1 {
2123
+ extensionPeriod?: DurationNonNullableFields$1;
2124
+ extensionBillingCycles: number;
2125
+ subscription?: SubscriptionNonNullableFields$1;
2126
+ actionDetails?: ActionDetailsNonNullableFields$1;
2127
+ }
2128
+ interface SubscriptionInitialPurchaseCompletedNonNullableFields$1 {
2129
+ subscription?: SubscriptionNonNullableFields$1;
2130
+ actionDetails?: ActionDetailsNonNullableFields$1;
2131
+ }
2132
+ interface LatestInvoiceMarkedAsPaidNonNullableFields$1 {
2133
+ subscription?: SubscriptionNonNullableFields$1;
2134
+ }
2135
+ interface SubscriptionRevivedNonNullableFields$1 {
2136
+ subscription?: SubscriptionNonNullableFields$1;
2137
+ }
2138
+ interface SubscriptionBillingDateUpdatedNonNullableFields$1 {
2139
+ subscription?: SubscriptionNonNullableFields$1;
2140
+ proration?: ProrationNonNullableFields$1;
2141
+ }
2142
+ interface FutureUpdatesRequestedNonNullableFields$1 {
2143
+ subscription?: SubscriptionNonNullableFields$1;
2144
+ requestedUpdateData?: SubscriptionUpdateDataNonNullableFields$1;
2145
+ }
2146
+ interface UpdatesAppliedNonNullableFields$1 {
2147
+ subscription?: SubscriptionNonNullableFields$1;
2148
+ updateAction: UpdateAction$1;
2149
+ appliedUpdateData?: SubscriptionUpdateDataNonNullableFields$1;
2150
+ }
2151
+ interface ResetPendingUpdatesNonNullableFields$1 {
2152
+ subscription?: SubscriptionNonNullableFields$1;
2153
+ }
2154
+ interface GracePeriodStartedNonNullableFields$1 {
2155
+ subscription?: SubscriptionNonNullableFields$1;
2156
+ }
2157
+ interface GracePeriodEndedNonNullableFields$1 {
2158
+ subscription?: SubscriptionNonNullableFields$1;
2159
+ paymentSettlementMethod: PaymentSettlementMethod$1;
2160
+ }
2161
+ interface PaymentMethodUpdatedNonNullableFields$1 {
2162
+ subscription?: SubscriptionNonNullableFields$1;
2163
+ initiator: HistoryActionInitiator$1;
2164
+ paymentMode: PaymentMode$1;
2165
+ }
2166
+ interface SubscriptionCollectionMethodUpdatedNonNullableFields$1 {
2167
+ subscription?: SubscriptionNonNullableFields$1;
2168
+ newCollectionMethod: CollectionMethodEnumCollectionMethod$1;
2169
+ previousCollectionMethod: CollectionMethodEnumCollectionMethod$1;
2170
+ }
2171
+ interface FreeTrailStartedNonNullableFields$1 {
2172
+ subscription?: SubscriptionNonNullableFields$1;
2173
+ }
2174
+ interface FreeTrailEndedNonNullableFields$1 {
2175
+ subscription?: SubscriptionNonNullableFields$1;
2176
+ }
2177
+ interface SubscriptionBackOfficeActionNonNullableFields$1 {
2178
+ subscription?: SubscriptionNonNullableFields$1;
2179
+ name: string;
2180
+ params: string;
2181
+ }
2182
+ interface SubscriptionEventNonNullableFields$1 {
2183
+ created?: SubscriptionCreatedNonNullableFields$1;
2184
+ updated?: SubscriptionUpdatedNonNullableFields$1;
2185
+ deleted?: SubscriptionDeletedNonNullableFields$1;
2186
+ activated?: SubscriptionActivatedNonNullableFields$1;
2187
+ ended?: SubscriptionEndedNonNullableFields$1;
2188
+ canceled?: SubscriptionCanceledNonNullableFields$1;
2189
+ paused?: SubscriptionPausedNonNullableFields$1;
2190
+ resumed?: SubscriptionResumedNonNullableFields$1;
2191
+ pauseRequested?: PauseSubscriptionRequestedNonNullableFields$1;
2192
+ resumeRequested?: ResumeSubscriptionRequestedNonNullableFields$1;
2193
+ scheduledPauseCanceled?: ScheduledPauseCanceledNonNullableFields$1;
2194
+ scheduledResumeCanceled?: ScheduledResumeCanceledNonNullableFields$1;
2195
+ billingCycleStarted?: SubscriptionBillingCycleStartedNonNullableFields$1;
2196
+ autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOnNonNullableFields$1;
2197
+ autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOffNonNullableFields$1;
2198
+ cycleReadyToPay?: SubscriptionCycleReadyToPayNonNullableFields$1;
2199
+ extended?: SubscriptionExtendedNonNullableFields$1;
2200
+ initialPurchaseCompleted?: SubscriptionInitialPurchaseCompletedNonNullableFields$1;
2201
+ latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaidNonNullableFields$1;
2202
+ revived?: SubscriptionRevivedNonNullableFields$1;
2203
+ billingDateUpdated?: SubscriptionBillingDateUpdatedNonNullableFields$1;
2204
+ futureUpdatesRequested?: FutureUpdatesRequestedNonNullableFields$1;
2205
+ updatesApplied?: UpdatesAppliedNonNullableFields$1;
2206
+ resetPendingUpdates?: ResetPendingUpdatesNonNullableFields$1;
2207
+ gracePeriodStarted?: GracePeriodStartedNonNullableFields$1;
2208
+ gracePeriodEnded?: GracePeriodEndedNonNullableFields$1;
2209
+ paymentMethodUpdated?: PaymentMethodUpdatedNonNullableFields$1;
2210
+ collectionMethodUpdated?: SubscriptionCollectionMethodUpdatedNonNullableFields$1;
2211
+ freeTrailStarted?: FreeTrailStartedNonNullableFields$1;
2212
+ freeTrailEnded?: FreeTrailEndedNonNullableFields$1;
2213
+ subscriptionBoAction?: SubscriptionBackOfficeActionNonNullableFields$1;
2214
+ }
2215
+ interface SubscriptionHistoryEntryNonNullableFields$1 {
2216
+ entryId: string;
2217
+ slug: string;
2218
+ event?: SubscriptionEventNonNullableFields$1;
2219
+ }
2220
+ interface ListSubscriptionHistoryResponseNonNullableFields$1 {
2221
+ historyEntries: SubscriptionHistoryEntryNonNullableFields$1[];
2222
+ }
2223
+ interface GetSubscriptionResponseNonNullableFields$1 {
2224
+ subscription?: SubscriptionNonNullableFields$1;
2225
+ }
2226
+ interface CustomerCancelSubscriptionResponseNonNullableFields$1 {
2227
+ subscription?: SubscriptionNonNullableFields$1;
2228
+ }
2229
+ interface CustomerTurnOnAutoRenewalResponseNonNullableFields$1 {
2230
+ subscription?: SubscriptionNonNullableFields$1;
2231
+ }
2232
+ interface CustomerTurnOffAutoRenewalResponseNonNullableFields$1 {
2233
+ subscription?: SubscriptionNonNullableFields$1;
2234
+ }
2235
+ interface CustomerExtendSubscriptionResponseNonNullableFields$1 {
2236
+ subscription?: SubscriptionNonNullableFields$1;
2237
+ }
2238
+ interface QuerySubscriptionsResponseNonNullableFields$1 {
2239
+ subscriptions: SubscriptionNonNullableFields$1[];
2240
+ }
2241
+ interface UpdateSubscriptionPaymentMethodResponseNonNullableFields$1 {
2242
+ subscription?: SubscriptionNonNullableFields$1;
2243
+ }
2244
+ interface ActionNonNullableFields$1 {
2245
+ actionType: ActionType$1;
2072
2246
  pausePolicies: PausePolicy$1[];
2073
2247
  pauseAt: PauseAt$1[];
2074
2248
  resumeAt: ResumeAt$1[];
@@ -2132,10 +2306,6 @@ interface CustomerListUpcomingChargesResponseNonNullableFields$1 {
2132
2306
  interface InitiatePaymentMethodSetupResponseNonNullableFields$1 {
2133
2307
  paymentOrderId: string;
2134
2308
  }
2135
- interface PayCycleResponseNonNullableFields$1 {
2136
- invoiceId: string;
2137
- subscription?: SubscriptionNonNullableFields$1;
2138
- }
2139
2309
  interface UpdateSubscriptionBillingDateResponseNonNullableFields$1 {
2140
2310
  subscription?: SubscriptionNonNullableFields$1;
2141
2311
  }
@@ -2206,266 +2376,106 @@ interface SubscriptionChargesNonNullableFields$1 {
2206
2376
  interface PreviewSubscriptionsChargesResponseNonNullableFields$1 {
2207
2377
  subscriptionsCharges: SubscriptionChargesNonNullableFields$1[];
2208
2378
  }
2209
- interface SubscriptionCreatedNonNullableFields$1 {
2379
+ interface PayCycleResponseNonNullableFields$1 {
2380
+ invoiceId: string;
2210
2381
  subscription?: SubscriptionNonNullableFields$1;
2211
2382
  }
2212
- interface SubscriptionUpdatedNonNullableFields$1 {
2213
- current?: SubscriptionNonNullableFields$1;
2214
- previous?: SubscriptionNonNullableFields$1;
2215
- }
2216
- interface SubscriptionDeletedNonNullableFields$1 {
2217
- subscriptionId: string;
2218
- }
2219
- interface SubscriptionActivatedNonNullableFields$1 {
2220
- subscription?: SubscriptionNonNullableFields$1;
2221
- }
2222
- interface SubscriptionEndedNonNullableFields$1 {
2223
- subscription?: SubscriptionNonNullableFields$1;
2224
- }
2225
- interface ActionDetailsNonNullableFields$1 {
2226
- initiator: HistoryActionInitiator$1;
2227
- }
2228
- interface SubscriptionCanceledNonNullableFields$1 {
2229
- subscription?: SubscriptionNonNullableFields$1;
2230
- actionDetails?: ActionDetailsNonNullableFields$1;
2231
- }
2232
- interface SubscriptionPausedNonNullableFields$1 {
2233
- subscription?: SubscriptionNonNullableFields$1;
2234
- pausePolicy: PausePolicy$1;
2235
- actionDetails?: ActionDetailsNonNullableFields$1;
2236
- }
2237
- interface SubscriptionResumedNonNullableFields$1 {
2238
- subscription?: SubscriptionNonNullableFields$1;
2239
- actionDetails?: ActionDetailsNonNullableFields$1;
2240
- }
2241
- interface PauseSubscriptionRequestedNonNullableFields$1 {
2242
- subscription?: SubscriptionNonNullableFields$1;
2243
- pauseAt: PauseAt$1;
2244
- pausePolicy: PausePolicy$1;
2245
- actionDetails?: ActionDetailsNonNullableFields$1;
2246
- }
2247
- interface ResumeSubscriptionRequestedNonNullableFields$1 {
2248
- subscription?: SubscriptionNonNullableFields$1;
2249
- resumeAt: ResumeAt$1;
2250
- actionDetails?: ActionDetailsNonNullableFields$1;
2251
- }
2252
- interface ScheduledPauseCanceledNonNullableFields$1 {
2253
- subscription?: SubscriptionNonNullableFields$1;
2254
- actionDetails?: ActionDetailsNonNullableFields$1;
2255
- }
2256
- interface ScheduledResumeCanceledNonNullableFields$1 {
2257
- subscription?: SubscriptionNonNullableFields$1;
2258
- actionDetails?: ActionDetailsNonNullableFields$1;
2259
- }
2260
- interface SubscriptionBillingCycleStartedNonNullableFields$1 {
2261
- subscription?: SubscriptionNonNullableFields$1;
2262
- }
2263
- interface SubscriptionAutoRenewalTurnedOnNonNullableFields$1 {
2264
- subscription?: SubscriptionNonNullableFields$1;
2265
- actionDetails?: ActionDetailsNonNullableFields$1;
2266
- }
2267
- interface SubscriptionAutoRenewalTurnedOffNonNullableFields$1 {
2268
- subscription?: SubscriptionNonNullableFields$1;
2269
- actionDetails?: ActionDetailsNonNullableFields$1;
2270
- }
2271
- interface SubscriptionCycleReadyToPayNonNullableFields$1 {
2272
- subscription?: SubscriptionNonNullableFields$1;
2273
- }
2274
- interface SubscriptionExtendedNonNullableFields$1 {
2275
- extensionPeriod?: DurationNonNullableFields$1;
2276
- extensionBillingCycles: number;
2277
- subscription?: SubscriptionNonNullableFields$1;
2278
- actionDetails?: ActionDetailsNonNullableFields$1;
2279
- }
2280
- interface SubscriptionInitialPurchaseCompletedNonNullableFields$1 {
2281
- subscription?: SubscriptionNonNullableFields$1;
2282
- actionDetails?: ActionDetailsNonNullableFields$1;
2283
- }
2284
- interface LatestInvoiceMarkedAsPaidNonNullableFields$1 {
2285
- subscription?: SubscriptionNonNullableFields$1;
2286
- }
2287
- interface SubscriptionRevivedNonNullableFields$1 {
2288
- subscription?: SubscriptionNonNullableFields$1;
2289
- }
2290
- interface SubscriptionBillingDateUpdatedNonNullableFields$1 {
2291
- subscription?: SubscriptionNonNullableFields$1;
2292
- proration?: ProrationNonNullableFields$1;
2293
- }
2294
- interface FutureUpdatesRequestedNonNullableFields$1 {
2295
- subscription?: SubscriptionNonNullableFields$1;
2296
- requestedUpdateData?: SubscriptionUpdateDataNonNullableFields$1;
2297
- }
2298
- interface UpdatesAppliedNonNullableFields$1 {
2299
- subscription?: SubscriptionNonNullableFields$1;
2300
- updateAction: UpdateAction$1;
2301
- appliedUpdateData?: SubscriptionUpdateDataNonNullableFields$1;
2302
- }
2303
- interface ResetPendingUpdatesNonNullableFields$1 {
2304
- subscription?: SubscriptionNonNullableFields$1;
2305
- }
2306
- interface GracePeriodStartedNonNullableFields$1 {
2307
- subscription?: SubscriptionNonNullableFields$1;
2308
- }
2309
- interface GracePeriodEndedNonNullableFields$1 {
2310
- subscription?: SubscriptionNonNullableFields$1;
2311
- paymentSettlementMethod: PaymentSettlementMethod$1;
2312
- }
2313
- interface PaymentMethodUpdatedNonNullableFields$1 {
2314
- subscription?: SubscriptionNonNullableFields$1;
2315
- initiator: HistoryActionInitiator$1;
2316
- paymentMode: PaymentMode$1;
2317
- }
2318
- interface SubscriptionCollectionMethodUpdatedNonNullableFields$1 {
2319
- subscription?: SubscriptionNonNullableFields$1;
2320
- newCollectionMethod: CollectionMethodEnumCollectionMethod$1;
2321
- previousCollectionMethod: CollectionMethodEnumCollectionMethod$1;
2322
- }
2323
- interface FreeTrailStartedNonNullableFields$1 {
2324
- subscription?: SubscriptionNonNullableFields$1;
2325
- }
2326
- interface FreeTrailEndedNonNullableFields$1 {
2327
- subscription?: SubscriptionNonNullableFields$1;
2328
- }
2329
- interface SubscriptionBackOfficeActionNonNullableFields$1 {
2330
- subscription?: SubscriptionNonNullableFields$1;
2331
- name: string;
2332
- params: string;
2333
- }
2334
- interface SubscriptionEventNonNullableFields$1 {
2335
- created?: SubscriptionCreatedNonNullableFields$1;
2336
- updated?: SubscriptionUpdatedNonNullableFields$1;
2337
- deleted?: SubscriptionDeletedNonNullableFields$1;
2338
- activated?: SubscriptionActivatedNonNullableFields$1;
2339
- ended?: SubscriptionEndedNonNullableFields$1;
2340
- canceled?: SubscriptionCanceledNonNullableFields$1;
2341
- paused?: SubscriptionPausedNonNullableFields$1;
2342
- resumed?: SubscriptionResumedNonNullableFields$1;
2343
- pauseRequested?: PauseSubscriptionRequestedNonNullableFields$1;
2344
- resumeRequested?: ResumeSubscriptionRequestedNonNullableFields$1;
2345
- scheduledPauseCanceled?: ScheduledPauseCanceledNonNullableFields$1;
2346
- scheduledResumeCanceled?: ScheduledResumeCanceledNonNullableFields$1;
2347
- billingCycleStarted?: SubscriptionBillingCycleStartedNonNullableFields$1;
2348
- autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOnNonNullableFields$1;
2349
- autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOffNonNullableFields$1;
2350
- cycleReadyToPay?: SubscriptionCycleReadyToPayNonNullableFields$1;
2351
- extended?: SubscriptionExtendedNonNullableFields$1;
2352
- initialPurchaseCompleted?: SubscriptionInitialPurchaseCompletedNonNullableFields$1;
2353
- latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaidNonNullableFields$1;
2354
- revived?: SubscriptionRevivedNonNullableFields$1;
2355
- billingDateUpdated?: SubscriptionBillingDateUpdatedNonNullableFields$1;
2356
- futureUpdatesRequested?: FutureUpdatesRequestedNonNullableFields$1;
2357
- updatesApplied?: UpdatesAppliedNonNullableFields$1;
2358
- resetPendingUpdates?: ResetPendingUpdatesNonNullableFields$1;
2359
- gracePeriodStarted?: GracePeriodStartedNonNullableFields$1;
2360
- gracePeriodEnded?: GracePeriodEndedNonNullableFields$1;
2361
- paymentMethodUpdated?: PaymentMethodUpdatedNonNullableFields$1;
2362
- collectionMethodUpdated?: SubscriptionCollectionMethodUpdatedNonNullableFields$1;
2363
- freeTrailStarted?: FreeTrailStartedNonNullableFields$1;
2364
- freeTrailEnded?: FreeTrailEndedNonNullableFields$1;
2365
- subscriptionBoAction?: SubscriptionBackOfficeActionNonNullableFields$1;
2366
- }
2367
- interface SubscriptionHistoryEntryNonNullableFields$1 {
2368
- entryId: string;
2369
- slug: string;
2370
- event?: SubscriptionEventNonNullableFields$1;
2371
- }
2372
- interface ListSubscriptionHistoryResponseNonNullableFields$1 {
2373
- historyEntries: SubscriptionHistoryEntryNonNullableFields$1[];
2374
- }
2375
-
2376
- interface Subscription {
2377
- /**
2378
- * Subscription's unique id. Automatically generated and read-only.
2379
- * @readonly
2380
- */
2381
- _id?: string | null;
2382
- /**
2383
- * Date when subscription was created
2384
- * @readonly
2385
- */
2386
- _createdDate?: Date | null;
2387
- /**
2388
- * Date when subscription was updated
2389
- * @readonly
2390
- */
2391
- _updatedDate?: Date | null;
2392
- /**
2393
- * Revision of subscription. Increments upon changes
2394
- * @readonly
2395
- */
2396
- revision?: string | null;
2397
- /** Subscription name: minLength is 1, maxLength is 150 */
2398
- name?: string;
2399
- /** Subscription description. Optional. */
2400
- description?: string | null;
2401
- /**
2402
- * If start_date is set in the future: custom_billing_schedule.cycles_to_pay_on_creation should be set to 1
2403
- * in order to pay on creation for first cycle, Subscription will be then activated in the future.
2404
- * Future start_date is not supported for `SEND_INVOICE` CollectionMethod
2405
- * If start_date is set in past, it means subscription was already started.
2406
- */
2407
- startDate?: Date | null;
2408
- /**
2409
- * Represents when the subscription will end, relevant for subscriptions with a termed period.
2410
- * If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription.
2411
- * Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies.
2412
- */
2413
- endDate?: Date | null;
2414
- /** Business origin subscription is coming from. In site-level subscription it will be vertical app_id and entity_id */
2415
- origin?: BusinessOrigin;
2416
- /** Customer information like id and identity type (member or contact) */
2417
- customer?: Customer;
2418
- /**
2419
- * Status of subscription
2420
- * @readonly
2421
- */
2422
- status?: SubscriptionStatusEnumSubscriptionStatus;
2423
- /** Billing details parameters including schedule, currency, etc. */
2424
- billingSettings?: BillingSettings;
2425
- /**
2426
- * Includes many attributes about billing status of the subscription
2427
- * @readonly
2428
- */
2429
- billingStatus?: BillingStatus;
2430
- /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
2431
- shippingAddress?: FullAddressDetails;
2432
- /** Restrictions on possible subscription actions. If not provided, default policies are all restrictions enabled. */
2433
- policies?: SubscriptionPolicies;
2434
- /**
2435
- * Information related to either paused subscription or scheduled for future pause
2436
- * @readonly
2437
- */
2438
- pauseInfo?: PauseInfo;
2439
- /**
2440
- * Information related to cancellation for already canceled subscription or scheduled for cancel
2441
- * @readonly
2442
- */
2443
- cancellationInfo?: CancellationInfo;
2444
- /**
2445
- * Pending update for the next billing cycle
2446
- * @readonly
2447
- */
2448
- pendingUpdateData?: SubscriptionUpdateData;
2449
- /**
2450
- * Key / Value store to keep up to 10 additional values related to the subscription.
2451
- * Key max length = 50, Value max length = 200. Value can not be empty.
2452
- * Should not include any sensitive or PII information.
2453
- */
2454
- metadata?: Record<string, string>;
2455
- /**
2456
- * Pending update for a specific date
2457
- * @readonly
2458
- */
2459
- specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateData;
2460
- /**
2461
- * ChangesCounter of subscription. Increments upon every change to the domain
2462
- * @readonly
2463
- */
2464
- changesCounter?: string | null;
2465
- /** Billing order id. Optional. */
2466
- orderId?: string | null;
2467
- /** items, minSize is 1, maxSize is 100 */
2468
- items?: Item[];
2383
+
2384
+ interface Subscription {
2385
+ /**
2386
+ * Subscription's unique id. Automatically generated and read-only.
2387
+ * @readonly
2388
+ */
2389
+ _id?: string | null;
2390
+ /**
2391
+ * Date when subscription was created
2392
+ * @readonly
2393
+ */
2394
+ _createdDate?: Date | null;
2395
+ /**
2396
+ * Date when subscription was updated
2397
+ * @readonly
2398
+ */
2399
+ _updatedDate?: Date | null;
2400
+ /**
2401
+ * Revision of subscription. Increments upon changes
2402
+ * @readonly
2403
+ */
2404
+ revision?: string | null;
2405
+ /** Subscription name: minLength is 1, maxLength is 150 */
2406
+ name?: string;
2407
+ /** Subscription description. Optional. */
2408
+ description?: string | null;
2409
+ /**
2410
+ * If start_date is set in the future: custom_billing_schedule.cycles_to_pay_on_creation should be set to 1
2411
+ * in order to pay on creation for first cycle, Subscription will be then activated in the future.
2412
+ * Future start_date is not supported for `SEND_INVOICE` CollectionMethod
2413
+ * If start_date is set in past, it means subscription was already started.
2414
+ */
2415
+ startDate?: Date | null;
2416
+ /**
2417
+ * Represents when the subscription will end, relevant for subscriptions with a termed period.
2418
+ * If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription.
2419
+ * Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies.
2420
+ */
2421
+ endDate?: Date | null;
2422
+ /** Business origin subscription is coming from. In site-level subscription it will be vertical app_id and entity_id */
2423
+ origin?: BusinessOrigin;
2424
+ /** Customer information like id and identity type (member or contact) */
2425
+ customer?: Customer;
2426
+ /**
2427
+ * Status of subscription
2428
+ * @readonly
2429
+ */
2430
+ status?: SubscriptionStatusEnumSubscriptionStatus;
2431
+ /** Billing details parameters including schedule, currency, etc. */
2432
+ billingSettings?: BillingSettings;
2433
+ /**
2434
+ * Includes many attributes about billing status of the subscription
2435
+ * @readonly
2436
+ */
2437
+ billingStatus?: BillingStatus;
2438
+ /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
2439
+ shippingAddress?: FullAddressDetails;
2440
+ /** Restrictions on possible subscription actions. If not provided, default policies are all restrictions enabled. */
2441
+ policies?: SubscriptionPolicies;
2442
+ /**
2443
+ * Information related to either paused subscription or scheduled for future pause
2444
+ * @readonly
2445
+ */
2446
+ pauseInfo?: PauseInfo;
2447
+ /**
2448
+ * Information related to cancellation for already canceled subscription or scheduled for cancel
2449
+ * @readonly
2450
+ */
2451
+ cancellationInfo?: CancellationInfo;
2452
+ /**
2453
+ * Pending update for the next billing cycle
2454
+ * @readonly
2455
+ */
2456
+ pendingUpdateData?: SubscriptionUpdateData;
2457
+ /**
2458
+ * Key / Value store to keep up to 10 additional values related to the subscription.
2459
+ * Key max length = 50, Value max length = 200. Value can not be empty.
2460
+ * Should not include any sensitive or PII information.
2461
+ */
2462
+ metadata?: Record<string, string>;
2463
+ /**
2464
+ * Pending update for a specific date
2465
+ * @readonly
2466
+ */
2467
+ specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateData;
2468
+ /**
2469
+ * ChangesCounter of subscription. Increments upon every change to the domain
2470
+ * @readonly
2471
+ */
2472
+ changesCounter?: string | null;
2473
+ /** Billing order id. Optional. */
2474
+ orderId?: string | null;
2475
+ /** Platform origin subscription is coming from. */
2476
+ platformOrigin?: PlatformOrigin;
2477
+ /** items, minSize is 1, maxSize is 100 */
2478
+ items?: Item[];
2469
2479
  }
2470
2480
  interface BusinessOrigin {
2471
2481
  appId?: string | null;
@@ -2586,7 +2596,9 @@ declare enum CollectionMethodEnumCollectionMethod {
2586
2596
  /** Payment will be collected somehow. Billing only issues invoice per cycle. */
2587
2597
  SEND_INVOICE = "SEND_INVOICE",
2588
2598
  /** Payment will be collected externally */
2589
- EXTERNAL = "EXTERNAL"
2599
+ EXTERNAL = "EXTERNAL",
2600
+ /** Indicates the product has a zero amount, meaning its free with no payment required. */
2601
+ FREE = "FREE"
2590
2602
  }
2591
2603
  interface Duration {
2592
2604
  /** Duration unit: DAY, WEEK, MONTH, YEAR */
@@ -3102,92 +3114,417 @@ interface PricingModel extends PricingModelModelOneOf {
3102
3114
  /** Details about the fixed item price. */
3103
3115
  fixedPrice?: FixedPrice;
3104
3116
  }
3105
- /** @oneof */
3106
- interface PricingModelModelOneOf {
3107
- /** Details about the fixed item price. */
3108
- fixedPrice?: FixedPrice;
3117
+ /** @oneof */
3118
+ interface PricingModelModelOneOf {
3119
+ /** Details about the fixed item price. */
3120
+ fixedPrice?: FixedPrice;
3121
+ }
3122
+ interface FixedPrice {
3123
+ /**
3124
+ * Fixed item price with a period as a decimal separator. For example, `3.99`.
3125
+ * Price doesn't include tax, discounts, or application fee.
3126
+ *
3127
+ * Min: `0.01`
3128
+ */
3129
+ itemPrice?: string;
3130
+ }
3131
+ interface Item {
3132
+ /**
3133
+ * Unique identifier of subscription item. Automatically generated and read-only.
3134
+ * @readonly
3135
+ */
3136
+ _id?: string | null;
3137
+ /** Name of the item. Typically product name. */
3138
+ name?: string;
3139
+ /** Description of the item. */
3140
+ description?: string | null;
3141
+ /** References to external product catalog data known to client. */
3142
+ catalogReference?: CatalogReference;
3143
+ /** Category of item. Whether it is digital or physical one. */
3144
+ category?: ItemCategory;
3145
+ /** Amount of products */
3146
+ quantity?: number;
3147
+ /** Pricing model of the item. Whether fixed price or dynamic price models. */
3148
+ pricingModel?: PricingModel;
3149
+ /** Tax, positive value, optional */
3150
+ tax?: Tax;
3151
+ /** Discounts applied on item price */
3152
+ discounts?: Discount[];
3153
+ /** Application specific fee, positive value, optional (if application_fee == 0, don't include it to request). Only positive values. */
3154
+ applicationFee?: ApplicationFee;
3155
+ /**
3156
+ * External reference identifier for mapping item in consumer's system.
3157
+ * This allows the consumer to correlate the item in their system with the item in this API.
3158
+ */
3159
+ externalId?: string | null;
3160
+ /**
3161
+ * Key / Value store to keep up to 10 additional values related to the subscription item.
3162
+ * Key max length = 50, Value max length = 200. Value can not be empty.
3163
+ * Should not include any sensitive or PII information.
3164
+ */
3165
+ metadata?: Record<string, string>;
3166
+ }
3167
+ interface CatalogReference {
3168
+ /** Product ID from the external catalog. */
3169
+ catalogItemId?: string;
3170
+ /**
3171
+ * ID of the app that the product catalog belongs to.
3172
+ * When omitted, BASS assumes that the product belongs to the subscription's
3173
+ * `origin.appId`.
3174
+ *
3175
+ * Min: 1 character
3176
+ * Max: 50 characters
3177
+ */
3178
+ appId?: string | null;
3179
+ }
3180
+ declare enum ItemCategory {
3181
+ UNKNOWN = "UNKNOWN",
3182
+ PHYSICAL = "PHYSICAL",
3183
+ DIGITAL = "DIGITAL"
3184
+ }
3185
+ interface ApplicationFee extends ApplicationFeeValueOneOf {
3186
+ /** Amount of the application fee in `0.00` format. */
3187
+ amount?: string;
3188
+ /**
3189
+ * Discounts for the application fee.
3190
+ *
3191
+ * Max: 5 discounts
3192
+ */
3193
+ discounts?: Discount[];
3194
+ }
3195
+ /** @oneof */
3196
+ interface ApplicationFeeValueOneOf {
3197
+ /** Amount of the application fee in `0.00` format. */
3198
+ amount?: string;
3199
+ }
3200
+ interface SpecificDateSubscriptionUpdateData {
3201
+ updateData?: SubscriptionUpdateData;
3202
+ executionDate?: Date | null;
3203
+ }
3204
+ interface PlatformOrigin {
3205
+ appId?: string | null;
3206
+ entityId?: string | null;
3207
+ }
3208
+ interface ListSubscriptionHistoryRequest {
3209
+ subscriptionId: string;
3210
+ /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
3211
+ mode?: HistoryViewMode;
3212
+ /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
3213
+ cursor?: CursorPaging;
3214
+ }
3215
+ declare enum HistoryViewMode {
3216
+ UNKNOWN = "UNKNOWN",
3217
+ /** Comprehensive view including all history events. */
3218
+ BACKOFFICE = "BACKOFFICE",
3219
+ /** User-centric view of the history. */
3220
+ USER = "USER"
3221
+ }
3222
+ interface CursorPaging {
3223
+ /** Maximum number of items to return in the results. */
3224
+ limit?: number | null;
3225
+ /**
3226
+ * Pointer to the next or previous page in the list of results.
3227
+ *
3228
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
3229
+ * Not relevant for the first request.
3230
+ */
3231
+ cursor?: string | null;
3232
+ }
3233
+ interface ListSubscriptionHistoryResponse {
3234
+ /** List of history entries for the subscription. */
3235
+ historyEntries?: SubscriptionHistoryEntry[];
3236
+ /** Paging metadata. A `next` cursor is returned if there are more results. */
3237
+ pagingMetadata?: PagingMetadataV2;
3238
+ }
3239
+ interface SubscriptionHistoryEntry {
3240
+ entryId?: string;
3241
+ /** TODO: add max length? it is not defined in domainevents, so should we? */
3242
+ slug?: string;
3243
+ entryTime?: Date | null;
3244
+ event?: SubscriptionEvent;
3245
+ }
3246
+ interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
3247
+ created?: SubscriptionCreated;
3248
+ updated?: SubscriptionUpdated;
3249
+ deleted?: SubscriptionDeleted;
3250
+ activated?: SubscriptionActivated;
3251
+ ended?: SubscriptionEnded;
3252
+ canceled?: SubscriptionCanceled;
3253
+ paused?: SubscriptionPaused;
3254
+ resumed?: SubscriptionResumed;
3255
+ pauseRequested?: PauseSubscriptionRequested;
3256
+ resumeRequested?: ResumeSubscriptionRequested;
3257
+ scheduledPauseCanceled?: ScheduledPauseCanceled;
3258
+ scheduledResumeCanceled?: ScheduledResumeCanceled;
3259
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
3260
+ autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
3261
+ autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
3262
+ cycleReadyToPay?: SubscriptionCycleReadyToPay;
3263
+ extended?: SubscriptionExtended;
3264
+ initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
3265
+ latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
3266
+ revived?: SubscriptionRevived;
3267
+ billingDateUpdated?: SubscriptionBillingDateUpdated;
3268
+ futureUpdatesRequested?: FutureUpdatesRequested;
3269
+ updatesApplied?: UpdatesApplied;
3270
+ resetPendingUpdates?: ResetPendingUpdates;
3271
+ gracePeriodStarted?: GracePeriodStarted;
3272
+ gracePeriodEnded?: GracePeriodEnded;
3273
+ paymentMethodUpdated?: PaymentMethodUpdated;
3274
+ collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
3275
+ freeTrailStarted?: FreeTrailStarted;
3276
+ freeTrailEnded?: FreeTrailEnded;
3277
+ subscriptionBoAction?: SubscriptionBackOfficeAction;
3278
+ unknown?: UnknownSubscriptionEvent;
3279
+ }
3280
+ /** @oneof */
3281
+ interface SubscriptionEventPayloadOneOf {
3282
+ created?: SubscriptionCreated;
3283
+ updated?: SubscriptionUpdated;
3284
+ deleted?: SubscriptionDeleted;
3285
+ activated?: SubscriptionActivated;
3286
+ ended?: SubscriptionEnded;
3287
+ canceled?: SubscriptionCanceled;
3288
+ paused?: SubscriptionPaused;
3289
+ resumed?: SubscriptionResumed;
3290
+ pauseRequested?: PauseSubscriptionRequested;
3291
+ resumeRequested?: ResumeSubscriptionRequested;
3292
+ scheduledPauseCanceled?: ScheduledPauseCanceled;
3293
+ scheduledResumeCanceled?: ScheduledResumeCanceled;
3294
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
3295
+ autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
3296
+ autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
3297
+ cycleReadyToPay?: SubscriptionCycleReadyToPay;
3298
+ extended?: SubscriptionExtended;
3299
+ initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
3300
+ latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
3301
+ revived?: SubscriptionRevived;
3302
+ billingDateUpdated?: SubscriptionBillingDateUpdated;
3303
+ futureUpdatesRequested?: FutureUpdatesRequested;
3304
+ updatesApplied?: UpdatesApplied;
3305
+ resetPendingUpdates?: ResetPendingUpdates;
3306
+ gracePeriodStarted?: GracePeriodStarted;
3307
+ gracePeriodEnded?: GracePeriodEnded;
3308
+ paymentMethodUpdated?: PaymentMethodUpdated;
3309
+ collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
3310
+ freeTrailStarted?: FreeTrailStarted;
3311
+ freeTrailEnded?: FreeTrailEnded;
3312
+ subscriptionBoAction?: SubscriptionBackOfficeAction;
3313
+ unknown?: UnknownSubscriptionEvent;
3314
+ }
3315
+ interface SubscriptionCreated {
3316
+ subscription?: Subscription;
3317
+ }
3318
+ interface SubscriptionUpdated {
3319
+ current?: Subscription;
3320
+ previous?: Subscription;
3321
+ diff?: SubscriptionDiff;
3322
+ }
3323
+ interface SubscriptionDiff {
3324
+ added?: string | null;
3325
+ changed?: string | null;
3326
+ deleted?: string | null;
3327
+ }
3328
+ interface SubscriptionDeleted {
3329
+ subscriptionId?: string;
3330
+ }
3331
+ /**
3332
+ * Sent each time a subscription status has been set to Active
3333
+ * Active shows that a subscription is live and operational.
3334
+ * For example:
3335
+ * * For subscription with free trial, free trial start date is also the activation date.
3336
+ * * For a subscription with future start date, the start date is also the activation date.
3337
+ * * When a subscription is resumed from a pause status, the resume date is also the activation date.
3338
+ */
3339
+ interface SubscriptionActivated {
3340
+ subscription?: Subscription;
3341
+ }
3342
+ /**
3343
+ * Sent each time a subscription status has been set to Ended
3344
+ * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
3345
+ * This is different from a Canceled subscription which ends the subscription before a designated end date.
3346
+ * Therefore, Ended and Canceled are mutually exclusive.
3347
+ */
3348
+ interface SubscriptionEnded {
3349
+ subscription?: Subscription;
3350
+ }
3351
+ /**
3352
+ * Sent each time a subscription status has been set to Canceled
3353
+ * Canceled shows that a subscription was canceled and ended its life cycle as a result of some intervention
3354
+ * For example:
3355
+ * * A user decided to cancel a subscription before the original end date
3356
+ * * A subscription is canceled due to bad payment
3357
+ */
3358
+ interface SubscriptionCanceled {
3359
+ subscription?: Subscription;
3360
+ actionDetails?: ActionDetails;
3361
+ }
3362
+ interface ActionDetails {
3363
+ initiator?: HistoryActionInitiator;
3364
+ reason?: string | null;
3365
+ }
3366
+ interface SubscriptionPaused {
3367
+ subscription?: Subscription;
3368
+ pausePolicy?: PausePolicy;
3369
+ actionDetails?: ActionDetails;
3370
+ }
3371
+ interface SubscriptionResumed {
3372
+ subscription?: Subscription;
3373
+ actionDetails?: ActionDetails;
3374
+ }
3375
+ interface PauseSubscriptionRequested {
3376
+ subscription?: Subscription;
3377
+ pauseAt?: PauseAt;
3378
+ pausePolicy?: PausePolicy;
3379
+ actionDetails?: ActionDetails;
3380
+ }
3381
+ interface ResumeSubscriptionRequested {
3382
+ subscription?: Subscription;
3383
+ resumeAt?: ResumeAt;
3384
+ actionDetails?: ActionDetails;
3385
+ }
3386
+ interface ScheduledPauseCanceled {
3387
+ subscription?: Subscription;
3388
+ actionDetails?: ActionDetails;
3389
+ }
3390
+ interface ScheduledResumeCanceled {
3391
+ subscription?: Subscription;
3392
+ actionDetails?: ActionDetails;
3393
+ }
3394
+ interface SubscriptionBillingCycleStarted {
3395
+ subscription?: Subscription;
3396
+ /** Wix Pay transaction id, optional. Exists if event was triggered by a payment. */
3397
+ paymentTransactionId?: string | null;
3398
+ }
3399
+ interface SubscriptionAutoRenewalTurnedOn {
3400
+ subscription?: Subscription;
3401
+ actionDetails?: ActionDetails;
3402
+ }
3403
+ interface SubscriptionAutoRenewalTurnedOff {
3404
+ subscription?: Subscription;
3405
+ actionDetails?: ActionDetails;
3406
+ }
3407
+ interface SubscriptionCycleReadyToPay {
3408
+ subscription?: Subscription;
3409
+ }
3410
+ interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
3411
+ extensionPeriod?: Duration;
3412
+ extensionBillingCycles?: number;
3413
+ subscription?: Subscription;
3414
+ actionDetails?: ActionDetails;
3415
+ }
3416
+ /** @oneof */
3417
+ interface SubscriptionExtendedExtendPolicyOneOf {
3418
+ extensionPeriod?: Duration;
3419
+ extensionBillingCycles?: number;
3420
+ }
3421
+ interface SubscriptionInitialPurchaseCompleted {
3422
+ subscription?: Subscription;
3423
+ actionDetails?: ActionDetails;
3424
+ paymentTransactionId?: string | null;
3425
+ }
3426
+ interface LatestInvoiceMarkedAsPaid {
3427
+ subscription?: Subscription;
3428
+ }
3429
+ interface SubscriptionRevived {
3430
+ subscription?: Subscription;
3431
+ }
3432
+ interface SubscriptionBillingDateUpdated {
3433
+ subscription?: Subscription;
3434
+ billingDate?: Date | null;
3435
+ proration?: Proration;
3436
+ }
3437
+ interface FutureUpdatesRequested {
3438
+ subscription?: Subscription;
3439
+ requestedUpdateData?: SubscriptionUpdateData;
3440
+ }
3441
+ interface UpdatesApplied {
3442
+ subscription?: Subscription;
3443
+ updateAction?: UpdateAction;
3444
+ appliedUpdateData?: SubscriptionUpdateData;
3445
+ }
3446
+ declare enum UpdateAction {
3447
+ NONE = "NONE",
3448
+ /** Update subscription immediately, please note proration for updates changing price are not yet supported */
3449
+ IMMEDIATELY = "IMMEDIATELY",
3450
+ /** Request updates that will take affect only at the start of the next billing cycle. */
3451
+ NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
3452
+ /** Reset all pending updates */
3453
+ RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
3454
+ /** Request updates that will take affect only at a specific date. */
3455
+ SPECIFIC_DATE = "SPECIFIC_DATE"
3456
+ }
3457
+ interface ResetPendingUpdates {
3458
+ subscription?: Subscription;
3459
+ }
3460
+ interface GracePeriodStarted {
3461
+ subscription?: Subscription;
3462
+ }
3463
+ interface GracePeriodEnded {
3464
+ subscription?: Subscription;
3465
+ /** Indication for the payment settlement method. */
3466
+ paymentSettlementMethod?: PaymentSettlementMethod;
3467
+ }
3468
+ declare enum PaymentSettlementMethod {
3469
+ UNKNOWN = "UNKNOWN",
3470
+ /** System-defined payment settlement. */
3471
+ SYSTEM = "SYSTEM",
3472
+ /** Manually mark the payment as paid. */
3473
+ MARK_AS_PAID = "MARK_AS_PAID",
3474
+ /** Require the customer to pay immediately, by insert a new payment method. */
3475
+ CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
3476
+ }
3477
+ interface PaymentMethodUpdated {
3478
+ subscription?: Subscription;
3479
+ initiator?: HistoryActionInitiator;
3480
+ paymentMode?: PaymentMode;
3481
+ }
3482
+ declare enum PaymentMode {
3483
+ NONE = "NONE",
3484
+ /** The latest invoice of the subscription will be charged. */
3485
+ CHARGE = "CHARGE",
3486
+ /** An authorization invoice with zero amount will be created. */
3487
+ AUTHORIZATION = "AUTHORIZATION"
3109
3488
  }
3110
- interface FixedPrice {
3111
- /**
3112
- * Fixed item price with a period as a decimal separator. For example, `3.99`.
3113
- * Price doesn't include tax, discounts, or application fee.
3114
- *
3115
- * Min: `0.01`
3116
- */
3117
- itemPrice?: string;
3489
+ interface SubscriptionCollectionMethodUpdated {
3490
+ subscription?: Subscription;
3491
+ newCollectionMethod?: CollectionMethodEnumCollectionMethod;
3492
+ previousCollectionMethod?: CollectionMethodEnumCollectionMethod;
3118
3493
  }
3119
- interface Item {
3120
- /**
3121
- * Unique identifier of subscription item. Automatically generated and read-only.
3122
- * @readonly
3123
- */
3124
- _id?: string | null;
3125
- /** Name of the item. Typically product name. */
3126
- name?: string;
3127
- /** Description of the item. */
3128
- description?: string | null;
3129
- /** References to external product catalog data known to client. */
3130
- catalogReference?: CatalogReference;
3131
- /** Category of item. Whether it is digital or physical one. */
3132
- category?: ItemCategory;
3133
- /** Amount of products */
3134
- quantity?: number;
3135
- /** Pricing model of the item. Whether fixed price or dynamic price models. */
3136
- pricingModel?: PricingModel;
3137
- /** Tax, positive value, optional */
3138
- tax?: Tax;
3139
- /** Discounts applied on item price */
3140
- discounts?: Discount[];
3141
- /** Application specific fee, positive value, optional (if application_fee == 0, don't include it to request). Only positive values. */
3142
- applicationFee?: ApplicationFee;
3143
- /**
3144
- * External reference identifier for mapping item in consumer's system.
3145
- * This allows the consumer to correlate the item in their system with the item in this API.
3146
- */
3147
- externalId?: string | null;
3148
- /**
3149
- * Key / Value store to keep up to 10 additional values related to the subscription item.
3150
- * Key max length = 50, Value max length = 200. Value can not be empty.
3151
- * Should not include any sensitive or PII information.
3152
- */
3153
- metadata?: Record<string, string>;
3494
+ interface FreeTrailStarted {
3495
+ subscription?: Subscription;
3154
3496
  }
3155
- interface CatalogReference {
3156
- /** Product ID from the external catalog. */
3157
- catalogItemId?: string;
3158
- /**
3159
- * ID of the app that the product catalog belongs to.
3160
- * When omitted, BASS assumes that the product belongs to the subscription's
3161
- * `origin.appId`.
3162
- *
3163
- * Min: 1 character
3164
- * Max: 50 characters
3165
- */
3166
- appId?: string | null;
3497
+ interface FreeTrailEnded {
3498
+ subscription?: Subscription;
3167
3499
  }
3168
- declare enum ItemCategory {
3169
- UNKNOWN = "UNKNOWN",
3170
- PHYSICAL = "PHYSICAL",
3171
- DIGITAL = "DIGITAL"
3500
+ interface SubscriptionBackOfficeAction {
3501
+ subscription?: Subscription;
3502
+ /** The backoffice method name */
3503
+ name?: string;
3504
+ /** json as string format, to store the flatted request object */
3505
+ params?: string;
3172
3506
  }
3173
- interface ApplicationFee extends ApplicationFeeValueOneOf {
3174
- /** Amount of the application fee in `0.00` format. */
3175
- amount?: string;
3176
- /**
3177
- * Discounts for the application fee.
3178
- *
3179
- * Max: 5 discounts
3180
- */
3181
- discounts?: Discount[];
3507
+ /** Defines unknown events restored from the logs */
3508
+ interface UnknownSubscriptionEvent {
3509
+ subscriptionAsString?: string | null;
3182
3510
  }
3183
- /** @oneof */
3184
- interface ApplicationFeeValueOneOf {
3185
- /** Amount of the application fee in `0.00` format. */
3186
- amount?: string;
3511
+ interface PagingMetadataV2 {
3512
+ /** Number of items returned in the response. */
3513
+ count?: number | null;
3514
+ /** Offset that was requested. */
3515
+ offset?: number | null;
3516
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
3517
+ total?: number | null;
3518
+ /** Flag that indicates the server failed to calculate the `total` field. */
3519
+ tooManyToCount?: boolean | null;
3520
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
3521
+ cursors?: Cursors;
3187
3522
  }
3188
- interface SpecificDateSubscriptionUpdateData {
3189
- updateData?: SubscriptionUpdateData;
3190
- executionDate?: Date | null;
3523
+ interface Cursors {
3524
+ /** Cursor string pointing to the next page in the list of results. */
3525
+ next?: string | null;
3526
+ /** Cursor pointing to the previous page in the list of results. */
3527
+ prev?: string | null;
3191
3528
  }
3192
3529
  interface GetSubscriptionRequest {
3193
3530
  _id: string;
@@ -3203,21 +3540,6 @@ interface CustomerCancelSubscriptionRequest {
3203
3540
  interface CustomerCancelSubscriptionResponse {
3204
3541
  subscription?: Subscription;
3205
3542
  }
3206
- /**
3207
- * Sent each time a subscription status has been set to Canceled
3208
- * Canceled shows that a subscription was canceled and ended its life cycle as a result of some intervention
3209
- * For example:
3210
- * * A user decided to cancel a subscription before the original end date
3211
- * * A subscription is canceled due to bad payment
3212
- */
3213
- interface SubscriptionCanceled {
3214
- subscription?: Subscription;
3215
- actionDetails?: ActionDetails;
3216
- }
3217
- interface ActionDetails {
3218
- initiator?: HistoryActionInitiator;
3219
- reason?: string | null;
3220
- }
3221
3543
  interface CustomerTurnOnAutoRenewalRequest {
3222
3544
  _id: string;
3223
3545
  /** Optional action reason message */
@@ -3246,17 +3568,6 @@ interface CustomerExtendSubscriptionResponse {
3246
3568
  /** The now extended subscription */
3247
3569
  subscription?: Subscription;
3248
3570
  }
3249
- interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
3250
- extensionPeriod?: Duration;
3251
- extensionBillingCycles?: number;
3252
- subscription?: Subscription;
3253
- actionDetails?: ActionDetails;
3254
- }
3255
- /** @oneof */
3256
- interface SubscriptionExtendedExtendPolicyOneOf {
3257
- extensionPeriod?: Duration;
3258
- extensionBillingCycles?: number;
3259
- }
3260
3571
  interface QuerySubscriptionsRequest {
3261
3572
  query?: QueryV2;
3262
3573
  }
@@ -3305,39 +3616,10 @@ interface Paging {
3305
3616
  /** Number of items to skip in the current sort order. */
3306
3617
  offset?: number | null;
3307
3618
  }
3308
- interface CursorPaging {
3309
- /** Maximum number of items to return in the results. */
3310
- limit?: number | null;
3311
- /**
3312
- * Pointer to the next or previous page in the list of results.
3313
- *
3314
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
3315
- * Not relevant for the first request.
3316
- */
3317
- cursor?: string | null;
3318
- }
3319
3619
  interface QuerySubscriptionsResponse {
3320
3620
  subscriptions?: Subscription[];
3321
3621
  metadata?: PagingMetadataV2;
3322
3622
  }
3323
- interface PagingMetadataV2 {
3324
- /** Number of items returned in the response. */
3325
- count?: number | null;
3326
- /** Offset that was requested. */
3327
- offset?: number | null;
3328
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
3329
- total?: number | null;
3330
- /** Flag that indicates the server failed to calculate the `total` field. */
3331
- tooManyToCount?: boolean | null;
3332
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
3333
- cursors?: Cursors;
3334
- }
3335
- interface Cursors {
3336
- /** Cursor string pointing to the next page in the list of results. */
3337
- next?: string | null;
3338
- /** Cursor pointing to the previous page in the list of results. */
3339
- prev?: string | null;
3340
- }
3341
3623
  interface CountSubscriptionsRequest {
3342
3624
  /** Filters to specify which subscriptions are counted. */
3343
3625
  filter?: CountSubscriptionFilter;
@@ -3641,13 +3923,6 @@ interface InitiatePaymentMethodSetupRequest {
3641
3923
  paymentMode?: PaymentMode;
3642
3924
  paymentSettings?: PaymentSettings;
3643
3925
  }
3644
- declare enum PaymentMode {
3645
- NONE = "NONE",
3646
- /** The latest invoice of the subscription will be charged. */
3647
- CHARGE = "CHARGE",
3648
- /** An authorization invoice with zero amount will be created. */
3649
- AUTHORIZATION = "AUTHORIZATION"
3650
- }
3651
3926
  interface PaymentSettings {
3652
3927
  /** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */
3653
3928
  allowedProviderIds?: string[];
@@ -3661,92 +3936,34 @@ interface PaymentSettings {
3661
3936
  * When set, the payment order will be created with the specified origin
3662
3937
  * instead of the default origin.
3663
3938
  */
3664
- paymentOrigin?: PaymentOrigin;
3665
- }
3666
- declare enum OrderMethod {
3667
- UNKNOWN = "UNKNOWN",
3668
- MOTO = "MOTO",
3669
- NOT_MOTO = "NOT_MOTO"
3670
- }
3671
- interface RedirectUrls {
3672
- /** URL to redirect buyer in case of approved (successful) transaction (required) */
3673
- successUrl?: string;
3674
- /** URL to redirect buyer in case of failed/rejected transaction (required) */
3675
- errorUrl?: string;
3676
- /** URL to redirect buyer in case of buyer canceled the transaction (optional, default: `{error_url}`) */
3677
- cancelUrl?: string;
3678
- /**
3679
- * URL to redirect buyer in case of pending transaction (that might take some time to process) (optional, default:
3680
- * `{success_url}`)
3681
- */
3682
- pendingUrl?: string;
3683
- }
3684
- interface PaymentOrigin {
3685
- /** ID of the app for which the Payment will create the order on. For example, Paypal. */
3686
- appId?: string;
3687
- /** Id of the entity that order will be created on */
3688
- instanceId?: string;
3689
- }
3690
- interface InitiatePaymentMethodSetupResponse {
3691
- paymentOrderId?: string;
3692
- }
3693
- interface PayCycleRequest {
3694
- subscriptionId: string;
3695
- paymentTestMode?: PaymentTestMode;
3696
- tenantId: string;
3697
- }
3698
- declare enum PaymentTestMode {
3699
- REGULAR = "REGULAR",
3700
- FAIL_TECHNICAL = "FAIL_TECHNICAL",
3701
- FAIL_DECLINE = "FAIL_DECLINE",
3702
- FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
3703
- }
3704
- interface PayCycleResponse {
3705
- invoiceId?: string;
3706
- paymentOrderId?: string | null;
3707
- subscription?: Subscription;
3708
- }
3709
- declare enum ActionInitiator {
3710
- UNDEFINED = "UNDEFINED",
3711
- BUSINESS = "BUSINESS",
3712
- CUSTOMER = "CUSTOMER",
3713
- SYSTEM = "SYSTEM"
3714
- }
3715
- interface SubscriptionBillingCycleStarted {
3716
- subscription?: Subscription;
3717
- /** Wix Pay transaction id, optional. Exists if event was triggered by a payment. */
3718
- paymentTransactionId?: string | null;
3719
- }
3720
- /**
3721
- * Sent each time a subscription status has been set to Active
3722
- * Active shows that a subscription is live and operational.
3723
- * For example:
3724
- * * For subscription with free trial, free trial start date is also the activation date.
3725
- * * For a subscription with future start date, the start date is also the activation date.
3726
- * * When a subscription is resumed from a pause status, the resume date is also the activation date.
3727
- */
3728
- interface SubscriptionActivated {
3729
- subscription?: Subscription;
3730
- }
3731
- /**
3732
- * Sent each time a subscription status has been set to Ended
3733
- * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
3734
- * This is different from a Canceled subscription which ends the subscription before a designated end date.
3735
- * Therefore, Ended and Canceled are mutually exclusive.
3736
- */
3737
- interface SubscriptionEnded {
3738
- subscription?: Subscription;
3939
+ paymentOrigin?: PaymentOrigin;
3739
3940
  }
3740
- interface SubscriptionInitialPurchaseCompleted {
3741
- subscription?: Subscription;
3742
- actionDetails?: ActionDetails;
3743
- paymentTransactionId?: string | null;
3941
+ declare enum OrderMethod {
3942
+ UNKNOWN = "UNKNOWN",
3943
+ MOTO = "MOTO",
3944
+ NOT_MOTO = "NOT_MOTO"
3744
3945
  }
3745
- interface SubscriptionCycleReadyToPay {
3746
- subscription?: Subscription;
3946
+ interface RedirectUrls {
3947
+ /** URL to redirect buyer in case of approved (successful) transaction (required) */
3948
+ successUrl?: string;
3949
+ /** URL to redirect buyer in case of failed/rejected transaction (required) */
3950
+ errorUrl?: string;
3951
+ /** URL to redirect buyer in case of buyer canceled the transaction (optional, default: `{error_url}`) */
3952
+ cancelUrl?: string;
3953
+ /**
3954
+ * URL to redirect buyer in case of pending transaction (that might take some time to process) (optional, default:
3955
+ * `{success_url}`)
3956
+ */
3957
+ pendingUrl?: string;
3747
3958
  }
3748
- interface SubscriptionRevived {
3749
- subscription?: Subscription;
3959
+ interface PaymentOrigin {
3960
+ /** ID of the app for which the Payment will create the order on. For example, Paypal. */
3961
+ appId?: string;
3962
+ /** Id of the entity that order will be created on */
3963
+ instanceId?: string;
3964
+ }
3965
+ interface InitiatePaymentMethodSetupResponse {
3966
+ paymentOrderId?: string;
3750
3967
  }
3751
3968
  interface UpdateSubscriptionBillingDateRequest {
3752
3969
  /** ID of the subscription to update the billing date for. */
@@ -3768,22 +3985,6 @@ interface UpdateSubscriptionBillingDateResponse {
3768
3985
  /** Updated subscription. */
3769
3986
  subscription?: Subscription;
3770
3987
  }
3771
- interface SubscriptionBillingDateUpdated {
3772
- subscription?: Subscription;
3773
- billingDate?: Date | null;
3774
- proration?: Proration;
3775
- }
3776
- declare enum UpdateAction {
3777
- NONE = "NONE",
3778
- /** Update subscription immediately, please note proration for updates changing price are not yet supported */
3779
- IMMEDIATELY = "IMMEDIATELY",
3780
- /** Request updates that will take affect only at the start of the next billing cycle. */
3781
- NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
3782
- /** Reset all pending updates */
3783
- RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
3784
- /** Request updates that will take affect only at a specific date. */
3785
- SPECIFIC_DATE = "SPECIFIC_DATE"
3786
- }
3787
3988
  interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
3788
3989
  /**
3789
3990
  * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
@@ -3832,6 +4033,12 @@ interface ActionContext {
3832
4033
  /** Optional action reason message */
3833
4034
  reason?: string | null;
3834
4035
  }
4036
+ declare enum ActionInitiator {
4037
+ UNDEFINED = "UNDEFINED",
4038
+ BUSINESS = "BUSINESS",
4039
+ CUSTOMER = "CUSTOMER",
4040
+ SYSTEM = "SYSTEM"
4041
+ }
3835
4042
  interface CancelSubscriptionResponse {
3836
4043
  subscription?: Subscription;
3837
4044
  }
@@ -3848,21 +4055,6 @@ interface PauseSubscriptionRequest {
3848
4055
  interface PauseSubscriptionResponse {
3849
4056
  subscription?: Subscription;
3850
4057
  }
3851
- interface SubscriptionPaused {
3852
- subscription?: Subscription;
3853
- pausePolicy?: PausePolicy;
3854
- actionDetails?: ActionDetails;
3855
- }
3856
- interface PauseSubscriptionRequested {
3857
- subscription?: Subscription;
3858
- pauseAt?: PauseAt;
3859
- pausePolicy?: PausePolicy;
3860
- actionDetails?: ActionDetails;
3861
- }
3862
- interface ScheduledPauseCanceled {
3863
- subscription?: Subscription;
3864
- actionDetails?: ActionDetails;
3865
- }
3866
4058
  interface ResumeSubscriptionRequest {
3867
4059
  _id: string;
3868
4060
  resumeAt?: ResumeAt;
@@ -3873,19 +4065,6 @@ interface ResumeSubscriptionRequest {
3873
4065
  interface ResumeSubscriptionResponse {
3874
4066
  subscription?: Subscription;
3875
4067
  }
3876
- interface SubscriptionResumed {
3877
- subscription?: Subscription;
3878
- actionDetails?: ActionDetails;
3879
- }
3880
- interface ResumeSubscriptionRequested {
3881
- subscription?: Subscription;
3882
- resumeAt?: ResumeAt;
3883
- actionDetails?: ActionDetails;
3884
- }
3885
- interface ScheduledResumeCanceled {
3886
- subscription?: Subscription;
3887
- actionDetails?: ActionDetails;
3888
- }
3889
4068
  interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
3890
4069
  /** Limit number of results and enable to skip rows. The default limit is 25. */
3891
4070
  paging?: Paging;
@@ -3917,10 +4096,6 @@ interface TurnOnSubscriptionAutoRenewalRequest {
3917
4096
  interface TurnOnSubscriptionAutoRenewalResponse {
3918
4097
  subscription?: Subscription;
3919
4098
  }
3920
- interface SubscriptionAutoRenewalTurnedOn {
3921
- subscription?: Subscription;
3922
- actionDetails?: ActionDetails;
3923
- }
3924
4099
  interface TurnOffSubscriptionAutoRenewalRequest {
3925
4100
  _id: string;
3926
4101
  actionContext: ActionContext;
@@ -3928,10 +4103,6 @@ interface TurnOffSubscriptionAutoRenewalRequest {
3928
4103
  interface TurnOffSubscriptionAutoRenewalResponse {
3929
4104
  subscription?: Subscription;
3930
4105
  }
3931
- interface SubscriptionAutoRenewalTurnedOff {
3932
- subscription?: Subscription;
3933
- actionDetails?: ActionDetails;
3934
- }
3935
4106
  interface MarkLatestInvoiceAsPaidRequest {
3936
4107
  /** The ID of the offline subscription to mark as paid its latest invoice */
3937
4108
  subscriptionId: string;
@@ -3939,9 +4110,6 @@ interface MarkLatestInvoiceAsPaidRequest {
3939
4110
  interface MarkLatestInvoiceAsPaidResponse {
3940
4111
  subscription?: Subscription;
3941
4112
  }
3942
- interface LatestInvoiceMarkedAsPaid {
3943
- subscription?: Subscription;
3944
- }
3945
4113
  interface GetSubscriptionsStatsRequest {
3946
4114
  }
3947
4115
  interface GetSubscriptionsStatsResponse {
@@ -4049,204 +4217,52 @@ interface PreviewSubscriptionsChargesRequest {
4049
4217
  * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
4050
4218
  * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
4051
4219
  * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
4052
- * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
4053
- * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
4054
- * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
4055
- * in this case, charges for cycle 1 through 3.
4056
- * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
4057
- * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
4058
- */
4059
- numberOfNextRecurringCharges?: number | null;
4060
- }
4061
- interface SubscriptionBillingDetails {
4062
- /** External identifier of the subscription */
4063
- externalId?: string | null;
4064
- /** Billing details parameters including schedule, currency, etc. */
4065
- billingSettings?: BillingSettings;
4066
- /** Items, minSize is 1, maxSize is 100 */
4067
- items?: Item[];
4068
- /** Subscription start date, now if not set */
4069
- startDate?: Date | null;
4070
- /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
4071
- shippingAddress?: FullAddressDetails;
4072
- }
4073
- interface PreviewSubscriptionsChargesResponse {
4074
- /** Charges for the subscriptions, including an identifier. */
4075
- subscriptionsCharges?: SubscriptionCharges[];
4076
- }
4077
- interface SubscriptionCharges {
4078
- /** External identifier of the subscription */
4079
- externalId?: string | null;
4080
- /** Charges for subscription. */
4081
- charges?: Charge[];
4082
- }
4083
- interface ListSubscriptionHistoryRequest {
4084
- subscriptionId: string;
4085
- /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
4086
- mode?: HistoryViewMode;
4087
- /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
4088
- cursor?: CursorPaging;
4089
- }
4090
- declare enum HistoryViewMode {
4091
- UNKNOWN = "UNKNOWN",
4092
- /** Comprehensive view including all history events. */
4093
- BACKOFFICE = "BACKOFFICE",
4094
- /** User-centric view of the history. */
4095
- USER = "USER"
4096
- }
4097
- interface ListSubscriptionHistoryResponse {
4098
- /** List of history entries for the subscription. */
4099
- historyEntries?: SubscriptionHistoryEntry[];
4100
- /** Paging metadata. A `next` cursor is returned if there are more results. */
4101
- pagingMetadata?: PagingMetadataV2;
4102
- }
4103
- interface SubscriptionHistoryEntry {
4104
- entryId?: string;
4105
- /** TODO: add max length? it is not defined in domainevents, so should we? */
4106
- slug?: string;
4107
- entryTime?: Date | null;
4108
- event?: SubscriptionEvent;
4109
- }
4110
- interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
4111
- created?: SubscriptionCreated;
4112
- updated?: SubscriptionUpdated;
4113
- deleted?: SubscriptionDeleted;
4114
- activated?: SubscriptionActivated;
4115
- ended?: SubscriptionEnded;
4116
- canceled?: SubscriptionCanceled;
4117
- paused?: SubscriptionPaused;
4118
- resumed?: SubscriptionResumed;
4119
- pauseRequested?: PauseSubscriptionRequested;
4120
- resumeRequested?: ResumeSubscriptionRequested;
4121
- scheduledPauseCanceled?: ScheduledPauseCanceled;
4122
- scheduledResumeCanceled?: ScheduledResumeCanceled;
4123
- billingCycleStarted?: SubscriptionBillingCycleStarted;
4124
- autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
4125
- autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
4126
- cycleReadyToPay?: SubscriptionCycleReadyToPay;
4127
- extended?: SubscriptionExtended;
4128
- initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
4129
- latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
4130
- revived?: SubscriptionRevived;
4131
- billingDateUpdated?: SubscriptionBillingDateUpdated;
4132
- futureUpdatesRequested?: FutureUpdatesRequested;
4133
- updatesApplied?: UpdatesApplied;
4134
- resetPendingUpdates?: ResetPendingUpdates;
4135
- gracePeriodStarted?: GracePeriodStarted;
4136
- gracePeriodEnded?: GracePeriodEnded;
4137
- paymentMethodUpdated?: PaymentMethodUpdated;
4138
- collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
4139
- freeTrailStarted?: FreeTrailStarted;
4140
- freeTrailEnded?: FreeTrailEnded;
4141
- subscriptionBoAction?: SubscriptionBackOfficeAction;
4142
- unknown?: UnknownSubscriptionEvent;
4143
- }
4144
- /** @oneof */
4145
- interface SubscriptionEventPayloadOneOf {
4146
- created?: SubscriptionCreated;
4147
- updated?: SubscriptionUpdated;
4148
- deleted?: SubscriptionDeleted;
4149
- activated?: SubscriptionActivated;
4150
- ended?: SubscriptionEnded;
4151
- canceled?: SubscriptionCanceled;
4152
- paused?: SubscriptionPaused;
4153
- resumed?: SubscriptionResumed;
4154
- pauseRequested?: PauseSubscriptionRequested;
4155
- resumeRequested?: ResumeSubscriptionRequested;
4156
- scheduledPauseCanceled?: ScheduledPauseCanceled;
4157
- scheduledResumeCanceled?: ScheduledResumeCanceled;
4158
- billingCycleStarted?: SubscriptionBillingCycleStarted;
4159
- autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
4160
- autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
4161
- cycleReadyToPay?: SubscriptionCycleReadyToPay;
4162
- extended?: SubscriptionExtended;
4163
- initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
4164
- latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
4165
- revived?: SubscriptionRevived;
4166
- billingDateUpdated?: SubscriptionBillingDateUpdated;
4167
- futureUpdatesRequested?: FutureUpdatesRequested;
4168
- updatesApplied?: UpdatesApplied;
4169
- resetPendingUpdates?: ResetPendingUpdates;
4170
- gracePeriodStarted?: GracePeriodStarted;
4171
- gracePeriodEnded?: GracePeriodEnded;
4172
- paymentMethodUpdated?: PaymentMethodUpdated;
4173
- collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
4174
- freeTrailStarted?: FreeTrailStarted;
4175
- freeTrailEnded?: FreeTrailEnded;
4176
- subscriptionBoAction?: SubscriptionBackOfficeAction;
4177
- unknown?: UnknownSubscriptionEvent;
4178
- }
4179
- interface SubscriptionCreated {
4180
- subscription?: Subscription;
4181
- }
4182
- interface SubscriptionUpdated {
4183
- current?: Subscription;
4184
- previous?: Subscription;
4185
- diff?: SubscriptionDiff;
4186
- }
4187
- interface SubscriptionDiff {
4188
- added?: string | null;
4189
- changed?: string | null;
4190
- deleted?: string | null;
4191
- }
4192
- interface SubscriptionDeleted {
4193
- subscriptionId?: string;
4194
- }
4195
- interface FutureUpdatesRequested {
4196
- subscription?: Subscription;
4197
- requestedUpdateData?: SubscriptionUpdateData;
4198
- }
4199
- interface UpdatesApplied {
4200
- subscription?: Subscription;
4201
- updateAction?: UpdateAction;
4202
- appliedUpdateData?: SubscriptionUpdateData;
4203
- }
4204
- interface ResetPendingUpdates {
4205
- subscription?: Subscription;
4206
- }
4207
- interface GracePeriodStarted {
4208
- subscription?: Subscription;
4209
- }
4210
- interface GracePeriodEnded {
4211
- subscription?: Subscription;
4212
- /** Indication for the payment settlement method. */
4213
- paymentSettlementMethod?: PaymentSettlementMethod;
4220
+ * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
4221
+ * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
4222
+ * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
4223
+ * in this case, charges for cycle 1 through 3.
4224
+ * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
4225
+ * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
4226
+ */
4227
+ numberOfNextRecurringCharges?: number | null;
4214
4228
  }
4215
- declare enum PaymentSettlementMethod {
4216
- UNKNOWN = "UNKNOWN",
4217
- /** System-defined payment settlement. */
4218
- SYSTEM = "SYSTEM",
4219
- /** Manually mark the payment as paid. */
4220
- MARK_AS_PAID = "MARK_AS_PAID",
4221
- /** Require the customer to pay immediately, by insert a new payment method. */
4222
- CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
4229
+ interface SubscriptionBillingDetails {
4230
+ /** External identifier of the subscription */
4231
+ externalId?: string | null;
4232
+ /** Billing details parameters including schedule, currency, etc. */
4233
+ billingSettings?: BillingSettings;
4234
+ /** Items, minSize is 1, maxSize is 100 */
4235
+ items?: Item[];
4236
+ /** Subscription start date, now if not set */
4237
+ startDate?: Date | null;
4238
+ /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
4239
+ shippingAddress?: FullAddressDetails;
4223
4240
  }
4224
- interface PaymentMethodUpdated {
4225
- subscription?: Subscription;
4226
- initiator?: HistoryActionInitiator;
4227
- paymentMode?: PaymentMode;
4241
+ interface PreviewSubscriptionsChargesResponse {
4242
+ /** Charges for the subscriptions, including an identifier. */
4243
+ subscriptionsCharges?: SubscriptionCharges[];
4228
4244
  }
4229
- interface SubscriptionCollectionMethodUpdated {
4230
- subscription?: Subscription;
4231
- newCollectionMethod?: CollectionMethodEnumCollectionMethod;
4232
- previousCollectionMethod?: CollectionMethodEnumCollectionMethod;
4245
+ interface SubscriptionCharges {
4246
+ /** External identifier of the subscription */
4247
+ externalId?: string | null;
4248
+ /** Charges for subscription. */
4249
+ charges?: Charge[];
4233
4250
  }
4234
- interface FreeTrailStarted {
4235
- subscription?: Subscription;
4251
+ interface PayCycleRequest {
4252
+ subscriptionId: string;
4253
+ paymentTestMode?: PaymentTestMode;
4254
+ tenantId: string;
4236
4255
  }
4237
- interface FreeTrailEnded {
4238
- subscription?: Subscription;
4256
+ declare enum PaymentTestMode {
4257
+ REGULAR = "REGULAR",
4258
+ FAIL_TECHNICAL = "FAIL_TECHNICAL",
4259
+ FAIL_DECLINE = "FAIL_DECLINE",
4260
+ FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
4239
4261
  }
4240
- interface SubscriptionBackOfficeAction {
4262
+ interface PayCycleResponse {
4263
+ invoiceId?: string;
4264
+ paymentOrderId?: string | null;
4241
4265
  subscription?: Subscription;
4242
- /** The backoffice method name */
4243
- name?: string;
4244
- /** json as string format, to store the flatted request object */
4245
- params?: string;
4246
- }
4247
- /** Defines unknown events restored from the logs */
4248
- interface UnknownSubscriptionEvent {
4249
- subscriptionAsString?: string | null;
4250
4266
  }
4251
4267
  interface CustomerNonNullableFields {
4252
4268
  visitorId: string;
@@ -4351,235 +4367,75 @@ interface AutomaticRetryDataNonNullableFields {
4351
4367
  interface GracePeriodDataNonNullableFields {
4352
4368
  automaticRetryData?: AutomaticRetryDataNonNullableFields;
4353
4369
  }
4354
- interface BillingStatusNonNullableFields {
4355
- currentCycle: number;
4356
- latestPaymentData?: PaymentDataNonNullableFields;
4357
- updateBillingDateData?: UpdateBillingDateDataNonNullableFields;
4358
- gracePeriodData?: GracePeriodDataNonNullableFields;
4359
- }
4360
- interface SubscriptionPoliciesNonNullableFields {
4361
- customerCanCancel: boolean;
4362
- businessCanExtend: boolean;
4363
- allowEndOfCycleCancellation: boolean;
4364
- }
4365
- interface PauseInfoNonNullableFields {
4366
- pausePolicy: PausePolicy;
4367
- pauseAt: PauseAt;
4368
- resumeAt: ResumeAt;
4369
- }
4370
- interface CancellationInfoNonNullableFields {
4371
- initiator: HistoryActionInitiator;
4372
- }
4373
- interface FixedPriceNonNullableFields {
4374
- itemPrice: string;
4375
- }
4376
- interface PricingModelNonNullableFields {
4377
- fixedPrice?: FixedPriceNonNullableFields;
4378
- }
4379
- interface ItemChangeNonNullableFields {
4380
- _id: string;
4381
- pricingModel?: PricingModelNonNullableFields;
4382
- tax?: TaxNonNullableFields;
4383
- }
4384
- interface CatalogReferenceNonNullableFields {
4385
- catalogItemId: string;
4386
- }
4387
- interface ApplicationFeeNonNullableFields {
4388
- amount: string;
4389
- discounts: DiscountNonNullableFields[];
4390
- }
4391
- interface ItemNonNullableFields {
4392
- name: string;
4393
- catalogReference?: CatalogReferenceNonNullableFields;
4394
- category: ItemCategory;
4395
- quantity: number;
4396
- pricingModel?: PricingModelNonNullableFields;
4397
- tax?: TaxNonNullableFields;
4398
- discounts: DiscountNonNullableFields[];
4399
- applicationFee?: ApplicationFeeNonNullableFields;
4400
- }
4401
- interface SubscriptionUpdateDataNonNullableFields {
4402
- itemsToUpdate: ItemChangeNonNullableFields[];
4403
- itemsToAdd: ItemNonNullableFields[];
4404
- numberOfRequests: number;
4405
- }
4406
- interface SpecificDateSubscriptionUpdateDataNonNullableFields {
4407
- updateData?: SubscriptionUpdateDataNonNullableFields;
4408
- }
4409
- interface SubscriptionNonNullableFields {
4410
- name: string;
4411
- customer?: CustomerNonNullableFields;
4412
- status: SubscriptionStatusEnumSubscriptionStatus;
4413
- billingSettings?: BillingSettingsNonNullableFields;
4414
- billingStatus?: BillingStatusNonNullableFields;
4415
- shippingAddress?: FullAddressDetailsNonNullableFields;
4416
- policies?: SubscriptionPoliciesNonNullableFields;
4417
- pauseInfo?: PauseInfoNonNullableFields;
4418
- cancellationInfo?: CancellationInfoNonNullableFields;
4419
- pendingUpdateData?: SubscriptionUpdateDataNonNullableFields;
4420
- bassManaged: boolean;
4421
- specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields;
4422
- items: ItemNonNullableFields[];
4423
- }
4424
- interface GetSubscriptionResponseNonNullableFields {
4425
- subscription?: SubscriptionNonNullableFields;
4426
- }
4427
- interface CustomerCancelSubscriptionResponseNonNullableFields {
4428
- subscription?: SubscriptionNonNullableFields;
4429
- }
4430
- interface CustomerTurnOnAutoRenewalResponseNonNullableFields {
4431
- subscription?: SubscriptionNonNullableFields;
4432
- }
4433
- interface CustomerTurnOffAutoRenewalResponseNonNullableFields {
4434
- subscription?: SubscriptionNonNullableFields;
4435
- }
4436
- interface CustomerExtendSubscriptionResponseNonNullableFields {
4437
- subscription?: SubscriptionNonNullableFields;
4438
- }
4439
- interface QuerySubscriptionsResponseNonNullableFields {
4440
- subscriptions: SubscriptionNonNullableFields[];
4441
- }
4442
- interface UpdateSubscriptionPaymentMethodResponseNonNullableFields {
4443
- subscription?: SubscriptionNonNullableFields;
4444
- }
4445
- interface ActionNonNullableFields {
4446
- actionType: ActionType;
4447
- pausePolicies: PausePolicy[];
4448
- pauseAt: PauseAt[];
4449
- resumeAt: ResumeAt[];
4450
- extendPolicies: ExtendPolicyType[];
4451
- }
4452
- interface CustomerAllowedActionsResponseNonNullableFields {
4453
- actions: ActionNonNullableFields[];
4454
- }
4455
- interface RecurringNonNullableFields {
4456
- cycleNumber: number;
4457
- }
4458
- interface InvoiceDiscountNonNullableFields {
4459
- amount: string;
4460
- percentage: string;
4461
- origin?: DiscountOriginNonNullableFields;
4462
- }
4463
- interface InvoiceApplicationFeeNonNullableFields {
4464
- amount: string;
4465
- discount?: InvoiceDiscountNonNullableFields;
4466
- }
4467
- interface PriceDetailsNonNullableFields {
4468
- price: string;
4469
- tax?: TaxNonNullableFields;
4470
- discount?: InvoiceDiscountNonNullableFields;
4471
- applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
4472
- }
4473
- interface LineItemTaxSummaryNonNullableFields {
4474
- aggregatedTaxAmount: string;
4475
- aggregatedTaxRate: string;
4476
- taxableAmount: string;
4477
- }
4478
- interface TaxBreakdownNonNullableFields {
4479
- taxType: string;
4480
- taxRate: string;
4481
- jurisdictionType: string;
4482
- }
4483
- interface ItemTaxDataNonNullableFields {
4484
- lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields;
4485
- taxBreakdowns: TaxBreakdownNonNullableFields[];
4486
- }
4487
- interface InvoiceItemNonNullableFields {
4488
- recurring?: RecurringNonNullableFields;
4489
- _id: string;
4490
- name: string;
4491
- catalogReference?: CatalogReferenceNonNullableFields;
4492
- category: ItemCategory;
4493
- quantity: number;
4494
- priceDetails?: PriceDetailsNonNullableFields;
4495
- totals?: TotalsNonNullableFields;
4496
- taxData?: ItemTaxDataNonNullableFields;
4497
- }
4498
- interface SubscriptionChargeNonNullableFields {
4499
- cycle: number;
4500
- totals?: TotalsNonNullableFields;
4501
- invoiceItems: InvoiceItemNonNullableFields[];
4502
- discount?: InvoiceDiscountNonNullableFields;
4503
- }
4504
- interface CustomerListUpcomingChargesResponseNonNullableFields {
4505
- upcomingCharge?: SubscriptionChargeNonNullableFields;
4506
- }
4507
- interface InitiatePaymentMethodSetupResponseNonNullableFields {
4508
- paymentOrderId: string;
4509
- }
4510
- interface PayCycleResponseNonNullableFields {
4511
- invoiceId: string;
4512
- subscription?: SubscriptionNonNullableFields;
4513
- }
4514
- interface UpdateSubscriptionBillingDateResponseNonNullableFields {
4515
- subscription?: SubscriptionNonNullableFields;
4516
- }
4517
- interface CancelSubscriptionResponseNonNullableFields {
4518
- subscription?: SubscriptionNonNullableFields;
4519
- }
4520
- interface PauseSubscriptionResponseNonNullableFields {
4521
- subscription?: SubscriptionNonNullableFields;
4522
- }
4523
- interface ResumeSubscriptionResponseNonNullableFields {
4524
- subscription?: SubscriptionNonNullableFields;
4525
- }
4526
- interface SearchSubscriptionsResponseNonNullableFields {
4527
- subscriptions: SubscriptionNonNullableFields[];
4528
- }
4529
- interface CountByStatusNonNullableFields {
4530
- status: SubscriptionStatusEnumSubscriptionStatus;
4531
- count: number;
4532
- }
4533
- interface CountSubscriptionsResponseNonNullableFields {
4534
- countByStatus: CountByStatusNonNullableFields[];
4535
- total: number;
4536
- }
4537
- interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields {
4538
- subscription?: SubscriptionNonNullableFields;
4539
- }
4540
- interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields {
4541
- subscription?: SubscriptionNonNullableFields;
4370
+ interface BillingStatusNonNullableFields {
4371
+ currentCycle: number;
4372
+ latestPaymentData?: PaymentDataNonNullableFields;
4373
+ updateBillingDateData?: UpdateBillingDateDataNonNullableFields;
4374
+ gracePeriodData?: GracePeriodDataNonNullableFields;
4542
4375
  }
4543
- interface MarkLatestInvoiceAsPaidResponseNonNullableFields {
4544
- subscription?: SubscriptionNonNullableFields;
4376
+ interface SubscriptionPoliciesNonNullableFields {
4377
+ customerCanCancel: boolean;
4378
+ businessCanExtend: boolean;
4379
+ allowEndOfCycleCancellation: boolean;
4545
4380
  }
4546
- interface AmountByStatusNonNullableFields {
4547
- status: SubscriptionStatusEnumSubscriptionStatus;
4548
- amount: number;
4381
+ interface PauseInfoNonNullableFields {
4382
+ pausePolicy: PausePolicy;
4383
+ pauseAt: PauseAt;
4384
+ resumeAt: ResumeAt;
4549
4385
  }
4550
- interface GetSubscriptionsStatsResponseNonNullableFields {
4551
- amountByStatuses: AmountByStatusNonNullableFields[];
4552
- total: number;
4386
+ interface CancellationInfoNonNullableFields {
4387
+ initiator: HistoryActionInitiator;
4553
4388
  }
4554
- interface ExtendSubscriptionResponseNonNullableFields {
4555
- subscription?: SubscriptionNonNullableFields;
4389
+ interface FixedPriceNonNullableFields {
4390
+ itemPrice: string;
4556
4391
  }
4557
- interface UnsupportedReasonNonNullableFields {
4558
- code: string;
4392
+ interface PricingModelNonNullableFields {
4393
+ fixedPrice?: FixedPriceNonNullableFields;
4559
4394
  }
4560
- interface UnsupportedActionNonNullableFields {
4561
- actionType: ActionType;
4562
- reasons: UnsupportedReasonNonNullableFields[];
4395
+ interface ItemChangeNonNullableFields {
4396
+ _id: string;
4397
+ pricingModel?: PricingModelNonNullableFields;
4398
+ tax?: TaxNonNullableFields;
4563
4399
  }
4564
- interface AllowedActionsResponseNonNullableFields {
4565
- actions: ActionNonNullableFields[];
4566
- unsupportedActions: UnsupportedActionNonNullableFields[];
4400
+ interface CatalogReferenceNonNullableFields {
4401
+ catalogItemId: string;
4567
4402
  }
4568
- interface ListUpcomingChargesResponseNonNullableFields {
4569
- upcomingCharges: SubscriptionChargeNonNullableFields[];
4403
+ interface ApplicationFeeNonNullableFields {
4404
+ amount: string;
4405
+ discounts: DiscountNonNullableFields[];
4570
4406
  }
4571
- interface ChargeNonNullableFields {
4572
- cycleFrom: number;
4573
- totals?: TotalsNonNullableFields;
4407
+ interface ItemNonNullableFields {
4408
+ name: string;
4409
+ catalogReference?: CatalogReferenceNonNullableFields;
4410
+ category: ItemCategory;
4411
+ quantity: number;
4412
+ pricingModel?: PricingModelNonNullableFields;
4413
+ tax?: TaxNonNullableFields;
4414
+ discounts: DiscountNonNullableFields[];
4415
+ applicationFee?: ApplicationFeeNonNullableFields;
4574
4416
  }
4575
- interface PreviewSubscriptionChargesResponseNonNullableFields {
4576
- charges: ChargeNonNullableFields[];
4417
+ interface SubscriptionUpdateDataNonNullableFields {
4418
+ itemsToUpdate: ItemChangeNonNullableFields[];
4419
+ itemsToAdd: ItemNonNullableFields[];
4420
+ numberOfRequests: number;
4577
4421
  }
4578
- interface SubscriptionChargesNonNullableFields {
4579
- charges: ChargeNonNullableFields[];
4422
+ interface SpecificDateSubscriptionUpdateDataNonNullableFields {
4423
+ updateData?: SubscriptionUpdateDataNonNullableFields;
4580
4424
  }
4581
- interface PreviewSubscriptionsChargesResponseNonNullableFields {
4582
- subscriptionsCharges: SubscriptionChargesNonNullableFields[];
4425
+ interface SubscriptionNonNullableFields {
4426
+ name: string;
4427
+ customer?: CustomerNonNullableFields;
4428
+ status: SubscriptionStatusEnumSubscriptionStatus;
4429
+ billingSettings?: BillingSettingsNonNullableFields;
4430
+ billingStatus?: BillingStatusNonNullableFields;
4431
+ shippingAddress?: FullAddressDetailsNonNullableFields;
4432
+ policies?: SubscriptionPoliciesNonNullableFields;
4433
+ pauseInfo?: PauseInfoNonNullableFields;
4434
+ cancellationInfo?: CancellationInfoNonNullableFields;
4435
+ pendingUpdateData?: SubscriptionUpdateDataNonNullableFields;
4436
+ bassManaged: boolean;
4437
+ specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields;
4438
+ items: ItemNonNullableFields[];
4583
4439
  }
4584
4440
  interface SubscriptionCreatedNonNullableFields {
4585
4441
  subscription?: SubscriptionNonNullableFields;
@@ -4747,6 +4603,166 @@ interface SubscriptionHistoryEntryNonNullableFields {
4747
4603
  interface ListSubscriptionHistoryResponseNonNullableFields {
4748
4604
  historyEntries: SubscriptionHistoryEntryNonNullableFields[];
4749
4605
  }
4606
+ interface GetSubscriptionResponseNonNullableFields {
4607
+ subscription?: SubscriptionNonNullableFields;
4608
+ }
4609
+ interface CustomerCancelSubscriptionResponseNonNullableFields {
4610
+ subscription?: SubscriptionNonNullableFields;
4611
+ }
4612
+ interface CustomerTurnOnAutoRenewalResponseNonNullableFields {
4613
+ subscription?: SubscriptionNonNullableFields;
4614
+ }
4615
+ interface CustomerTurnOffAutoRenewalResponseNonNullableFields {
4616
+ subscription?: SubscriptionNonNullableFields;
4617
+ }
4618
+ interface CustomerExtendSubscriptionResponseNonNullableFields {
4619
+ subscription?: SubscriptionNonNullableFields;
4620
+ }
4621
+ interface QuerySubscriptionsResponseNonNullableFields {
4622
+ subscriptions: SubscriptionNonNullableFields[];
4623
+ }
4624
+ interface UpdateSubscriptionPaymentMethodResponseNonNullableFields {
4625
+ subscription?: SubscriptionNonNullableFields;
4626
+ }
4627
+ interface ActionNonNullableFields {
4628
+ actionType: ActionType;
4629
+ pausePolicies: PausePolicy[];
4630
+ pauseAt: PauseAt[];
4631
+ resumeAt: ResumeAt[];
4632
+ extendPolicies: ExtendPolicyType[];
4633
+ }
4634
+ interface CustomerAllowedActionsResponseNonNullableFields {
4635
+ actions: ActionNonNullableFields[];
4636
+ }
4637
+ interface RecurringNonNullableFields {
4638
+ cycleNumber: number;
4639
+ }
4640
+ interface InvoiceDiscountNonNullableFields {
4641
+ amount: string;
4642
+ percentage: string;
4643
+ origin?: DiscountOriginNonNullableFields;
4644
+ }
4645
+ interface InvoiceApplicationFeeNonNullableFields {
4646
+ amount: string;
4647
+ discount?: InvoiceDiscountNonNullableFields;
4648
+ }
4649
+ interface PriceDetailsNonNullableFields {
4650
+ price: string;
4651
+ tax?: TaxNonNullableFields;
4652
+ discount?: InvoiceDiscountNonNullableFields;
4653
+ applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
4654
+ }
4655
+ interface LineItemTaxSummaryNonNullableFields {
4656
+ aggregatedTaxAmount: string;
4657
+ aggregatedTaxRate: string;
4658
+ taxableAmount: string;
4659
+ }
4660
+ interface TaxBreakdownNonNullableFields {
4661
+ taxType: string;
4662
+ taxRate: string;
4663
+ jurisdictionType: string;
4664
+ }
4665
+ interface ItemTaxDataNonNullableFields {
4666
+ lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields;
4667
+ taxBreakdowns: TaxBreakdownNonNullableFields[];
4668
+ }
4669
+ interface InvoiceItemNonNullableFields {
4670
+ recurring?: RecurringNonNullableFields;
4671
+ _id: string;
4672
+ name: string;
4673
+ catalogReference?: CatalogReferenceNonNullableFields;
4674
+ category: ItemCategory;
4675
+ quantity: number;
4676
+ priceDetails?: PriceDetailsNonNullableFields;
4677
+ totals?: TotalsNonNullableFields;
4678
+ taxData?: ItemTaxDataNonNullableFields;
4679
+ }
4680
+ interface SubscriptionChargeNonNullableFields {
4681
+ cycle: number;
4682
+ totals?: TotalsNonNullableFields;
4683
+ invoiceItems: InvoiceItemNonNullableFields[];
4684
+ discount?: InvoiceDiscountNonNullableFields;
4685
+ }
4686
+ interface CustomerListUpcomingChargesResponseNonNullableFields {
4687
+ upcomingCharge?: SubscriptionChargeNonNullableFields;
4688
+ }
4689
+ interface InitiatePaymentMethodSetupResponseNonNullableFields {
4690
+ paymentOrderId: string;
4691
+ }
4692
+ interface UpdateSubscriptionBillingDateResponseNonNullableFields {
4693
+ subscription?: SubscriptionNonNullableFields;
4694
+ }
4695
+ interface CancelSubscriptionResponseNonNullableFields {
4696
+ subscription?: SubscriptionNonNullableFields;
4697
+ }
4698
+ interface PauseSubscriptionResponseNonNullableFields {
4699
+ subscription?: SubscriptionNonNullableFields;
4700
+ }
4701
+ interface ResumeSubscriptionResponseNonNullableFields {
4702
+ subscription?: SubscriptionNonNullableFields;
4703
+ }
4704
+ interface SearchSubscriptionsResponseNonNullableFields {
4705
+ subscriptions: SubscriptionNonNullableFields[];
4706
+ }
4707
+ interface CountByStatusNonNullableFields {
4708
+ status: SubscriptionStatusEnumSubscriptionStatus;
4709
+ count: number;
4710
+ }
4711
+ interface CountSubscriptionsResponseNonNullableFields {
4712
+ countByStatus: CountByStatusNonNullableFields[];
4713
+ total: number;
4714
+ }
4715
+ interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields {
4716
+ subscription?: SubscriptionNonNullableFields;
4717
+ }
4718
+ interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields {
4719
+ subscription?: SubscriptionNonNullableFields;
4720
+ }
4721
+ interface MarkLatestInvoiceAsPaidResponseNonNullableFields {
4722
+ subscription?: SubscriptionNonNullableFields;
4723
+ }
4724
+ interface AmountByStatusNonNullableFields {
4725
+ status: SubscriptionStatusEnumSubscriptionStatus;
4726
+ amount: number;
4727
+ }
4728
+ interface GetSubscriptionsStatsResponseNonNullableFields {
4729
+ amountByStatuses: AmountByStatusNonNullableFields[];
4730
+ total: number;
4731
+ }
4732
+ interface ExtendSubscriptionResponseNonNullableFields {
4733
+ subscription?: SubscriptionNonNullableFields;
4734
+ }
4735
+ interface UnsupportedReasonNonNullableFields {
4736
+ code: string;
4737
+ }
4738
+ interface UnsupportedActionNonNullableFields {
4739
+ actionType: ActionType;
4740
+ reasons: UnsupportedReasonNonNullableFields[];
4741
+ }
4742
+ interface AllowedActionsResponseNonNullableFields {
4743
+ actions: ActionNonNullableFields[];
4744
+ unsupportedActions: UnsupportedActionNonNullableFields[];
4745
+ }
4746
+ interface ListUpcomingChargesResponseNonNullableFields {
4747
+ upcomingCharges: SubscriptionChargeNonNullableFields[];
4748
+ }
4749
+ interface ChargeNonNullableFields {
4750
+ cycleFrom: number;
4751
+ totals?: TotalsNonNullableFields;
4752
+ }
4753
+ interface PreviewSubscriptionChargesResponseNonNullableFields {
4754
+ charges: ChargeNonNullableFields[];
4755
+ }
4756
+ interface SubscriptionChargesNonNullableFields {
4757
+ charges: ChargeNonNullableFields[];
4758
+ }
4759
+ interface PreviewSubscriptionsChargesResponseNonNullableFields {
4760
+ subscriptionsCharges: SubscriptionChargesNonNullableFields[];
4761
+ }
4762
+ interface PayCycleResponseNonNullableFields {
4763
+ invoiceId: string;
4764
+ subscription?: SubscriptionNonNullableFields;
4765
+ }
4750
4766
 
4751
4767
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4752
4768
  getUrl: (context: any) => string;
@@ -4758,6 +4774,9 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
4758
4774
  __responseType: Q;
4759
4775
  __originalResponseType: R;
4760
4776
  };
4777
+ declare function listSubscriptionHistory(): __PublicMethodMetaInfo<'GET', {
4778
+ subscriptionId: string;
4779
+ }, ListSubscriptionHistoryRequest, ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryResponse & ListSubscriptionHistoryResponseNonNullableFields, ListSubscriptionHistoryResponse$1 & ListSubscriptionHistoryResponseNonNullableFields$1>;
4761
4780
  declare function customerGetSubscription(): __PublicMethodMetaInfo<'GET', {
4762
4781
  id: string;
4763
4782
  }, GetSubscriptionRequest, GetSubscriptionRequest$1, GetSubscriptionResponse & GetSubscriptionResponseNonNullableFields, GetSubscriptionResponse$1 & GetSubscriptionResponseNonNullableFields$1>;
@@ -4786,9 +4805,6 @@ declare function customerListUpcomingCharges(): __PublicMethodMetaInfo<'GET', {
4786
4805
  declare function customerInitiatePaymentMethodSetup(): __PublicMethodMetaInfo<'POST', {
4787
4806
  id: string;
4788
4807
  }, InitiatePaymentMethodSetupRequest, InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupResponse & InitiatePaymentMethodSetupResponseNonNullableFields, InitiatePaymentMethodSetupResponse$1 & InitiatePaymentMethodSetupResponseNonNullableFields$1>;
4789
- declare function payCycle(): __PublicMethodMetaInfo<'POST', {
4790
- subscriptionId: string;
4791
- }, PayCycleRequest, PayCycleRequest$1, PayCycleResponse & PayCycleResponseNonNullableFields, PayCycleResponse$1 & PayCycleResponseNonNullableFields$1>;
4792
4808
  declare function getSubscription(): __PublicMethodMetaInfo<'GET', {
4793
4809
  id: string;
4794
4810
  }, GetSubscriptionRequest, GetSubscriptionRequest$1, GetSubscriptionResponse & GetSubscriptionResponseNonNullableFields, GetSubscriptionResponse$1 & GetSubscriptionResponseNonNullableFields$1>;
@@ -4834,9 +4850,9 @@ declare function previewSubscriptionsCharges(): __PublicMethodMetaInfo<'GET', {}
4834
4850
  declare function initiatePaymentMethodSetup(): __PublicMethodMetaInfo<'POST', {
4835
4851
  id: string;
4836
4852
  }, InitiatePaymentMethodSetupRequest, InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupResponse & InitiatePaymentMethodSetupResponseNonNullableFields, InitiatePaymentMethodSetupResponse$1 & InitiatePaymentMethodSetupResponseNonNullableFields$1>;
4837
- declare function listSubscriptionHistory(): __PublicMethodMetaInfo<'GET', {
4853
+ declare function payCycle(): __PublicMethodMetaInfo<'POST', {
4838
4854
  subscriptionId: string;
4839
- }, ListSubscriptionHistoryRequest, ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryResponse & ListSubscriptionHistoryResponseNonNullableFields, ListSubscriptionHistoryResponse$1 & ListSubscriptionHistoryResponseNonNullableFields$1>;
4855
+ }, PayCycleRequest, PayCycleRequest$1, PayCycleResponse & PayCycleResponseNonNullableFields, PayCycleResponse$1 & PayCycleResponseNonNullableFields$1>;
4840
4856
 
4841
4857
  type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
4842
4858
  declare const meta_allowedActions: typeof allowedActions;