@stigg/api-client-js 0.0.9 → 0.2.0

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.
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PublishMigrationType = exports.ProvisionSubscriptionStatus = exports.ProrationBehavior = exports.PromotionalEntitlementStatus = exports.PromotionalEntitlementSortFields = exports.PromotionalEntitlementPeriod = exports.ProductSortFields = exports.PricingType = exports.PriceSortFields = exports.PlanSortFields = exports.PaymentMethodType = exports.PackageStatus = exports.PackageEntitlementSortFields = exports.PackageDtoSortFields = exports.MonthlyAccordingTo = exports.MeterType = exports.MemberStatus = exports.MemberSortFields = exports.IntegrationSortFields = exports.ImportIntegrationTaskSortFields = exports.HookStatus = exports.HookSortFields = exports.FontWeight = exports.FeatureType = exports.FeatureStatus = exports.FeatureSortFields = exports.ExperimentStatus = exports.ExperimentSortFields = exports.EventLogType = exports.ErrorCode = exports.EnvironmentSortFields = exports.EnvironmentProvisionStatus = exports.EntitySelectionMode = exports.EntitlementResetPeriod = exports.CustomerSubscriptionSortFields = exports.CustomerSortFields = exports.Currency = exports.CouponType = exports.CouponStatus = exports.CouponSortFields = exports.ChangeType = exports.BillingPeriod = exports.BillingModel = exports.BillingAnchor = exports.ApiKeyType = exports.ApiKeySortFields = exports.Alignment = exports.AddonSortFields = exports.AccountStatus = exports.AccessDeniedReason = void 0;
4
- exports.ImportCustomerDocument = exports.ProvisionCustomerDocument = exports.PaywallConfigurationFragmentDoc = exports.LayoutConfigurationFragmentDoc = exports.TypographyConfigurationFragmentDoc = exports.FontVariantFragmentDoc = exports.PaywallPlanFragmentDoc = exports.PaywallAddonFragmentDoc = exports.PaywallPackageEntitlementFragmentDoc = exports.EntitlementFragmentDoc = exports.FeatureFragmentDoc = exports.ResetPeriodConfigurationFragmentDoc = exports.WeeklyResetPeriodConfigFragmentDoc = exports.MonthlyResetPeriodConfigFragmentDoc = exports.SubscriptionPreviewFragmentDoc = exports.CustomerFragmentDoc = exports.SubscriptionFragmentDoc = exports.SubscriptionScheduledUpdateDataFragmentDoc = exports.PlanFragmentDoc = exports.AddonFragmentDoc = exports.PackageEntitlementFragmentDoc = exports.PromotionalEntitlementFragmentDoc = exports.CouponFragmentDoc = exports.SlimSubscriptionFragmentDoc = exports.TotalPriceFragmentDoc = exports.PriceFragmentDoc = exports.ExperimentGroupType = exports.WidgetType = exports.WeeklyAccordingTo = exports.VendorIdentifier = exports.UsageMeasurementSortFields = exports.TrialPeriodUnits = exports.TaskType = exports.TaskStatus = exports.SyncStatus = exports.SubscriptionStatus = exports.SubscriptionStartSetup = exports.SubscriptionScheduleType = exports.SubscriptionScheduleStatus = exports.SubscriptionPriceSortFields = exports.SubscriptionMigrationTaskSortFields = exports.SubscriptionEntitlementSortFields = exports.SubscriptionEndSetup = exports.SubscriptionDecisionStrategy = exports.SubscriptionCancellationTime = exports.SubscriptionCancelReason = exports.SubscriptionAddonSortFields = exports.SourceType = exports.SortNulls = exports.SortDirection = void 0;
5
- exports.getSdk = exports.GetEntitlementDocument = exports.GetEntitlementsDocument = exports.GetPaywallDocument = exports.GetCouponsDocument = exports.GetCustomerByIdDocument = exports.ReportUsageDocument = exports.EstimateSubscriptionUpdateDocument = exports.EstimateSubscriptionDocument = exports.InitiateCheckoutDocument = exports.CancelSubscriptionDocument = exports.UpdateSubscriptionDocument = exports.ProvisionSubscriptionDocument = exports.UpdateCustomerDocument = void 0;
3
+ exports.SubscriptionCancelReason = exports.SubscriptionAddonSortFields = exports.SourceType = exports.SortNulls = exports.SortDirection = exports.PublishMigrationType = exports.PromotionalEntitlementStatus = exports.PromotionalEntitlementSortFields = exports.PromotionalEntitlementPeriod = exports.ProductSortFields = exports.PricingType = exports.PriceSortFields = exports.PlanSortFields = exports.PaymentMethodType = exports.PackageStatus = exports.PackageEntitlementSortFields = exports.PackageDtoSortFields = exports.MonthlyAccordingTo = exports.MeterType = exports.MemberStatus = exports.MemberSortFields = exports.IntegrationSortFields = exports.ImportIntegrationTaskSortFields = exports.HookStatus = exports.HookSortFields = exports.FeatureType = exports.FeatureStatus = exports.FeatureSortFields = exports.ExperimentStatus = exports.ExperimentSortFields = exports.ExperimentGroup = exports.EventLogType = exports.ErrorCode = exports.EnvironmentSortFields = exports.EntitySelectionMode = exports.EntitlementResetPeriod = exports.CustomerSubscriptionSortFields = exports.CustomerSortFields = exports.Currency = exports.CouponType = exports.CouponStatus = exports.CouponSortFields = exports.ChangeType = exports.BillingPeriod = exports.BillingModel = exports.BillingAnchor = exports.ApiKeyType = exports.ApiKeySortFields = exports.AddonSortFields = exports.AccessDeniedReason = void 0;
4
+ exports.getSdk = exports.GetCouponsDocument = exports.GetCustomerByIdDocument = exports.InitiateCheckoutDocument = exports.CancelSubscriptionDocument = exports.CreateSubscriptionDocument = exports.UpdateSubscriptionDocument = exports.UpdateCustomerDocument = exports.ImportCustomerDocument = exports.ProvisionCustomerDocument = exports.CreateCustomerDocument = exports.PaywallAddonFragmentDoc = exports.PaywallPlanFragmentDoc = exports.PaywallPriceFragmentDoc = exports.PaywallPackageEntitlementFragmentDoc = exports.SlimSubscriptionFragmentDoc = exports.CustomerFragmentDoc = exports.CouponFragmentDoc = exports.PromotionalEntitlementFragmentDoc = exports.SubscriptionFragmentDoc = exports.PlanFragmentDoc = exports.AddonFragmentDoc = exports.PackageEntitlementFragmentDoc = exports.TotalPriceFragmentDoc = exports.PriceFragmentDoc = exports.FeatureFragmentDoc = exports.WeeklyAccordingTo = exports.VendorIdentifier = exports.UsageMeasurementSortFields = exports.TrialPeriodUnits = exports.TaskType = exports.TaskStatus = exports.SyncStatus = exports.SubscriptionStrategyDecision = exports.SubscriptionStatus = exports.SubscriptionStartSetup = exports.SubscriptionPriceSortFields = exports.SubscriptionMigrationTaskSortFields = exports.SubscriptionEndSetup = exports.SubscriptionCancellationTime = void 0;
6
5
  const graphql_tag_1 = require("graphql-tag");
7
6
  /** DenyReason of get access policy */
8
7
  var AccessDeniedReason;
@@ -14,11 +13,6 @@ var AccessDeniedReason;
14
13
  AccessDeniedReason["RequestedUsageExceedingLimit"] = "RequestedUsageExceedingLimit";
15
14
  AccessDeniedReason["Unknown"] = "Unknown";
16
15
  })(AccessDeniedReason = exports.AccessDeniedReason || (exports.AccessDeniedReason = {}));
17
- var AccountStatus;
18
- (function (AccountStatus) {
19
- AccountStatus["Active"] = "ACTIVE";
20
- AccountStatus["Blocked"] = "BLOCKED";
21
- })(AccountStatus = exports.AccountStatus || (exports.AccountStatus = {}));
22
16
  var AddonSortFields;
23
17
  (function (AddonSortFields) {
24
18
  AddonSortFields["BillingId"] = "billingId";
@@ -35,13 +29,6 @@ var AddonSortFields;
35
29
  AddonSortFields["UpdatedAt"] = "updatedAt";
36
30
  AddonSortFields["VersionNumber"] = "versionNumber";
37
31
  })(AddonSortFields = exports.AddonSortFields || (exports.AddonSortFields = {}));
38
- /** Alignment */
39
- var Alignment;
40
- (function (Alignment) {
41
- Alignment["Center"] = "CENTER";
42
- Alignment["Left"] = "LEFT";
43
- Alignment["Right"] = "RIGHT";
44
- })(Alignment = exports.Alignment || (exports.Alignment = {}));
45
32
  var ApiKeySortFields;
46
33
  (function (ApiKeySortFields) {
47
34
  ApiKeySortFields["Id"] = "id";
@@ -74,7 +61,6 @@ var ChangeType;
74
61
  ChangeType["Added"] = "ADDED";
75
62
  ChangeType["Deleted"] = "DELETED";
76
63
  ChangeType["Modified"] = "MODIFIED";
77
- ChangeType["Reordered"] = "REORDERED";
78
64
  })(ChangeType = exports.ChangeType || (exports.ChangeType = {}));
79
65
  var CouponSortFields;
80
66
  (function (CouponSortFields) {
@@ -104,126 +90,7 @@ var CouponType;
104
90
  /** Currency */
105
91
  var Currency;
106
92
  (function (Currency) {
107
- Currency["Aed"] = "AED";
108
- Currency["All"] = "ALL";
109
- Currency["Amd"] = "AMD";
110
- Currency["Ang"] = "ANG";
111
- Currency["Aud"] = "AUD";
112
- Currency["Awg"] = "AWG";
113
- Currency["Azn"] = "AZN";
114
- Currency["Bam"] = "BAM";
115
- Currency["Bbd"] = "BBD";
116
- Currency["Bdt"] = "BDT";
117
- Currency["Bgn"] = "BGN";
118
- Currency["Bhd"] = "BHD";
119
- Currency["Bif"] = "BIF";
120
- Currency["Bmd"] = "BMD";
121
- Currency["Bnd"] = "BND";
122
- Currency["Bsd"] = "BSD";
123
- Currency["Bwp"] = "BWP";
124
- Currency["Byn"] = "BYN";
125
- Currency["Bzd"] = "BZD";
126
- Currency["Cad"] = "CAD";
127
- Currency["Cdf"] = "CDF";
128
- Currency["Chf"] = "CHF";
129
- Currency["Clp"] = "CLP";
130
- Currency["Cny"] = "CNY";
131
- Currency["Czk"] = "CZK";
132
- Currency["Djf"] = "DJF";
133
- Currency["Dkk"] = "DKK";
134
- Currency["Dop"] = "DOP";
135
- Currency["Dzd"] = "DZD";
136
- Currency["Egp"] = "EGP";
137
- Currency["Etb"] = "ETB";
138
- Currency["Eur"] = "EUR";
139
- Currency["Fjd"] = "FJD";
140
- Currency["Gbp"] = "GBP";
141
- Currency["Gel"] = "GEL";
142
- Currency["Gip"] = "GIP";
143
- Currency["Gmd"] = "GMD";
144
- Currency["Gnf"] = "GNF";
145
- Currency["Gyd"] = "GYD";
146
- Currency["Hkd"] = "HKD";
147
- Currency["Hrk"] = "HRK";
148
- Currency["Htg"] = "HTG";
149
- Currency["Idr"] = "IDR";
150
- Currency["Ils"] = "ILS";
151
- Currency["Inr"] = "INR";
152
- Currency["Isk"] = "ISK";
153
- Currency["Jmd"] = "JMD";
154
- Currency["Jod"] = "JOD";
155
- Currency["Jpy"] = "JPY";
156
- Currency["Kes"] = "KES";
157
- Currency["Kgs"] = "KGS";
158
- Currency["Khr"] = "KHR";
159
- Currency["Kmf"] = "KMF";
160
- Currency["Krw"] = "KRW";
161
- Currency["Kwd"] = "KWD";
162
- Currency["Kyd"] = "KYD";
163
- Currency["Kzt"] = "KZT";
164
- Currency["Lbp"] = "LBP";
165
- Currency["Lkr"] = "LKR";
166
- Currency["Lrd"] = "LRD";
167
- Currency["Lsl"] = "LSL";
168
- Currency["Mad"] = "MAD";
169
- Currency["Mdl"] = "MDL";
170
- Currency["Mga"] = "MGA";
171
- Currency["Mkd"] = "MKD";
172
- Currency["Mmk"] = "MMK";
173
- Currency["Mnt"] = "MNT";
174
- Currency["Mop"] = "MOP";
175
- Currency["Mro"] = "MRO";
176
- Currency["Mvr"] = "MVR";
177
- Currency["Mwk"] = "MWK";
178
- Currency["Mxn"] = "MXN";
179
- Currency["Myr"] = "MYR";
180
- Currency["Mzn"] = "MZN";
181
- Currency["Nad"] = "NAD";
182
- Currency["Ngn"] = "NGN";
183
- Currency["Nok"] = "NOK";
184
- Currency["Npr"] = "NPR";
185
- Currency["Nzd"] = "NZD";
186
- Currency["Omr"] = "OMR";
187
- Currency["Pgk"] = "PGK";
188
- Currency["Php"] = "PHP";
189
- Currency["Pkr"] = "PKR";
190
- Currency["Pln"] = "PLN";
191
- Currency["Pyg"] = "PYG";
192
- Currency["Qar"] = "QAR";
193
- Currency["Ron"] = "RON";
194
- Currency["Rsd"] = "RSD";
195
- Currency["Rub"] = "RUB";
196
- Currency["Rwf"] = "RWF";
197
- Currency["Sar"] = "SAR";
198
- Currency["Sbd"] = "SBD";
199
- Currency["Scr"] = "SCR";
200
- Currency["Sek"] = "SEK";
201
- Currency["Sgd"] = "SGD";
202
- Currency["Sle"] = "SLE";
203
- Currency["Sll"] = "SLL";
204
- Currency["Sos"] = "SOS";
205
- Currency["Szl"] = "SZL";
206
- Currency["Thb"] = "THB";
207
- Currency["Tjs"] = "TJS";
208
- Currency["Tnd"] = "TND";
209
- Currency["Top"] = "TOP";
210
- Currency["Try"] = "TRY";
211
- Currency["Ttd"] = "TTD";
212
- Currency["Tzs"] = "TZS";
213
- Currency["Uah"] = "UAH";
214
- Currency["Ugx"] = "UGX";
215
93
  Currency["Usd"] = "USD";
216
- Currency["Uzs"] = "UZS";
217
- Currency["Vnd"] = "VND";
218
- Currency["Vuv"] = "VUV";
219
- Currency["Wst"] = "WST";
220
- Currency["Xaf"] = "XAF";
221
- Currency["Xcd"] = "XCD";
222
- Currency["Xof"] = "XOF";
223
- Currency["Xpf"] = "XPF";
224
- Currency["Yer"] = "YER";
225
- Currency["Zar"] = "ZAR";
226
- Currency["Zmw"] = "ZMW";
227
94
  })(Currency = exports.Currency || (exports.Currency = {}));
228
95
  var CustomerSortFields;
229
96
  (function (CustomerSortFields) {
@@ -232,9 +99,9 @@ var CustomerSortFields;
232
99
  CustomerSortFields["CrmHubspotCompanyId"] = "crmHubspotCompanyId";
233
100
  CustomerSortFields["CrmHubspotCompanyUrl"] = "crmHubspotCompanyUrl";
234
101
  CustomerSortFields["CrmId"] = "crmId";
235
- CustomerSortFields["CustomerId"] = "customerId";
236
102
  CustomerSortFields["Email"] = "email";
237
103
  CustomerSortFields["EnvironmentId"] = "environmentId";
104
+ CustomerSortFields["ExperimentGroup"] = "experimentGroup";
238
105
  CustomerSortFields["Id"] = "id";
239
106
  CustomerSortFields["Name"] = "name";
240
107
  CustomerSortFields["RefId"] = "refId";
@@ -251,13 +118,12 @@ var CustomerSubscriptionSortFields;
251
118
  CustomerSubscriptionSortFields["EffectiveEndDate"] = "effectiveEndDate";
252
119
  CustomerSubscriptionSortFields["EndDate"] = "endDate";
253
120
  CustomerSubscriptionSortFields["EnvironmentId"] = "environmentId";
121
+ CustomerSubscriptionSortFields["ExperimentGroup"] = "experimentGroup";
254
122
  CustomerSubscriptionSortFields["Id"] = "id";
255
- CustomerSubscriptionSortFields["OldBillingId"] = "oldBillingId";
256
123
  CustomerSubscriptionSortFields["PricingType"] = "pricingType";
257
124
  CustomerSubscriptionSortFields["RefId"] = "refId";
258
125
  CustomerSubscriptionSortFields["StartDate"] = "startDate";
259
126
  CustomerSubscriptionSortFields["Status"] = "status";
260
- CustomerSubscriptionSortFields["SubscriptionId"] = "subscriptionId";
261
127
  CustomerSubscriptionSortFields["TrialEndDate"] = "trialEndDate";
262
128
  })(CustomerSubscriptionSortFields = exports.CustomerSubscriptionSortFields || (exports.CustomerSubscriptionSortFields = {}));
263
129
  /** Entitlement reset period. */
@@ -273,14 +139,6 @@ var EntitySelectionMode;
273
139
  EntitySelectionMode["BlackList"] = "BLACK_LIST";
274
140
  EntitySelectionMode["WhiteList"] = "WHITE_LIST";
275
141
  })(EntitySelectionMode = exports.EntitySelectionMode || (exports.EntitySelectionMode = {}));
276
- /** EnvironmentProvisionStatus. */
277
- var EnvironmentProvisionStatus;
278
- (function (EnvironmentProvisionStatus) {
279
- EnvironmentProvisionStatus["Done"] = "DONE";
280
- EnvironmentProvisionStatus["Failed"] = "FAILED";
281
- EnvironmentProvisionStatus["InProgress"] = "IN_PROGRESS";
282
- EnvironmentProvisionStatus["NotProvisioned"] = "NOT_PROVISIONED";
283
- })(EnvironmentProvisionStatus = exports.EnvironmentProvisionStatus || (exports.EnvironmentProvisionStatus = {}));
284
142
  var EnvironmentSortFields;
285
143
  (function (EnvironmentSortFields) {
286
144
  EnvironmentSortFields["CreatedAt"] = "createdAt";
@@ -295,31 +153,22 @@ var ErrorCode;
295
153
  ErrorCode["AddonHasToHavePriceError"] = "AddonHasToHavePriceError";
296
154
  ErrorCode["AddonNotFound"] = "AddonNotFound";
297
155
  ErrorCode["ArchivedCouponCantBeApplied"] = "ArchivedCouponCantBeApplied";
298
- ErrorCode["AuthCustomerMismatch"] = "AuthCustomerMismatch";
299
156
  ErrorCode["BadUserInput"] = "BadUserInput";
300
157
  ErrorCode["BillingPeriodMissingError"] = "BillingPeriodMissingError";
301
158
  ErrorCode["CannotDeleteCustomerError"] = "CannotDeleteCustomerError";
302
159
  ErrorCode["CannotDeleteFeatureError"] = "CannotDeleteFeatureError";
303
- ErrorCode["CannotEditPackageInNonDraftMode"] = "CannotEditPackageInNonDraftMode";
160
+ ErrorCode["CantCreateExperiment"] = "CantCreateExperiment";
304
161
  ErrorCode["CheckoutIsNotSupported"] = "CheckoutIsNotSupported";
305
- ErrorCode["CheckoutOptionsMissing"] = "CheckoutOptionsMissing";
306
162
  ErrorCode["CouponNotFound"] = "CouponNotFound";
307
- ErrorCode["CustomerAlreadyHaveCustomerCoupon"] = "CustomerAlreadyHaveCustomerCoupon";
308
- ErrorCode["CustomerAlreadyUsesCoupon"] = "CustomerAlreadyUsesCoupon";
309
163
  ErrorCode["CustomerHasNoPaymentMethod"] = "CustomerHasNoPaymentMethod";
310
164
  ErrorCode["CustomerNoBillingId"] = "CustomerNoBillingId";
311
165
  ErrorCode["CustomerNotFound"] = "CustomerNotFound";
312
- ErrorCode["DowngradeBillingPeriodNotSupportedError"] = "DowngradeBillingPeriodNotSupportedError";
313
166
  ErrorCode["DraftPlanCantBeArchived"] = "DraftPlanCantBeArchived";
314
167
  ErrorCode["DuplicatedEntityNotAllowed"] = "DuplicatedEntityNotAllowed";
315
168
  ErrorCode["EditAllowedOnDraftPackageOnlyError"] = "EditAllowedOnDraftPackageOnlyError";
316
- ErrorCode["EntitlementsMustBelongToSamePackage"] = "EntitlementsMustBelongToSamePackage";
317
- ErrorCode["EntityIdDifferentFromRefIdError"] = "EntityIdDifferentFromRefIdError";
318
169
  ErrorCode["EnvironmentMissing"] = "EnvironmentMissing";
319
- ErrorCode["ExperimentAlreadyRunning"] = "ExperimentAlreadyRunning";
320
170
  ErrorCode["ExperimentNotFoundError"] = "ExperimentNotFoundError";
321
171
  ErrorCode["ExperimentStatusError"] = "ExperimentStatusError";
322
- ErrorCode["FailedToCreateCheckoutSessionError"] = "FailedToCreateCheckoutSessionError";
323
172
  ErrorCode["FailedToImportCustomer"] = "FailedToImportCustomer";
324
173
  ErrorCode["FeatureNotFound"] = "FeatureNotFound";
325
174
  ErrorCode["IdentityForbidden"] = "IdentityForbidden";
@@ -339,26 +188,16 @@ var ErrorCode;
339
188
  ErrorCode["MemberInvitationError"] = "MemberInvitationError";
340
189
  ErrorCode["MemberNotFound"] = "MemberNotFound";
341
190
  ErrorCode["MeteringNotAvailableForFeatureType"] = "MeteringNotAvailableForFeatureType";
342
- ErrorCode["MissingEntityIdError"] = "MissingEntityIdError";
343
191
  ErrorCode["NoFeatureEntitlementInSubscription"] = "NoFeatureEntitlementInSubscription";
344
- ErrorCode["NoProductsAvailable"] = "NoProductsAvailable";
345
- ErrorCode["OperationNotAllowedDuringInProgressExperiment"] = "OperationNotAllowedDuringInProgressExperiment";
346
192
  ErrorCode["PackageAlreadyPublished"] = "PackageAlreadyPublished";
347
193
  ErrorCode["PackagePricingTypeNotSet"] = "PackagePricingTypeNotSet";
348
194
  ErrorCode["PlanAlreadyExtended"] = "PlanAlreadyExtended";
349
- ErrorCode["PlanCannotBePublishWhenBasePlanIsDraft"] = "PlanCannotBePublishWhenBasePlanIsDraft";
350
195
  ErrorCode["PlanIsUsedAsDefaultStartPlan"] = "PlanIsUsedAsDefaultStartPlan";
351
196
  ErrorCode["PlanIsUsedAsDowngradePlan"] = "PlanIsUsedAsDowngradePlan";
352
197
  ErrorCode["PlanNotFound"] = "PlanNotFound";
353
198
  ErrorCode["PlanWithChildCantBeDeleted"] = "PlanWithChildCantBeDeleted";
354
199
  ErrorCode["PlansCircularDependencyError"] = "PlansCircularDependencyError";
355
200
  ErrorCode["PriceNotFound"] = "PriceNotFound";
356
- ErrorCode["PromotionCodeCustomerNotFirstPurchase"] = "PromotionCodeCustomerNotFirstPurchase";
357
- ErrorCode["PromotionCodeMaxRedemptionsReached"] = "PromotionCodeMaxRedemptionsReached";
358
- ErrorCode["PromotionCodeMinimumAmountNotReached"] = "PromotionCodeMinimumAmountNotReached";
359
- ErrorCode["PromotionCodeNotActive"] = "PromotionCodeNotActive";
360
- ErrorCode["PromotionCodeNotForCustomer"] = "PromotionCodeNotForCustomer";
361
- ErrorCode["PromotionCodeNotFound"] = "PromotionCodeNotFound";
362
201
  ErrorCode["RateLimitExceeded"] = "RateLimitExceeded";
363
202
  ErrorCode["ResyncAlreadyInProgress"] = "ResyncAlreadyInProgress";
364
203
  ErrorCode["SelectedBillingModelDoesntMatchImportedItemError"] = "SelectedBillingModelDoesntMatchImportedItemError";
@@ -373,7 +212,6 @@ var ErrorCode;
373
212
  ErrorCode["UncompatibleSubscriptionAddon"] = "UncompatibleSubscriptionAddon";
374
213
  ErrorCode["UnexpectedError"] = "UnexpectedError";
375
214
  ErrorCode["UnsupportedFeatureType"] = "UnsupportedFeatureType";
376
- ErrorCode["UnsupportedSubscriptionScheduleType"] = "UnsupportedSubscriptionScheduleType";
377
215
  ErrorCode["UnsupportedVendorIdentifier"] = "UnsupportedVendorIdentifier";
378
216
  })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
379
217
  /** EventLogType */
@@ -390,12 +228,10 @@ var EventLogType;
390
228
  EventLogType["CustomerDeleted"] = "CUSTOMER_DELETED";
391
229
  EventLogType["CustomerPaymentFailed"] = "CUSTOMER_PAYMENT_FAILED";
392
230
  EventLogType["CustomerUpdated"] = "CUSTOMER_UPDATED";
393
- EventLogType["EdgeApiDataResync"] = "EDGE_API_DATA_RESYNC";
394
231
  EventLogType["EntitlementsUpdated"] = "ENTITLEMENTS_UPDATED";
395
232
  EventLogType["EntitlementDenied"] = "ENTITLEMENT_DENIED";
396
233
  EventLogType["EntitlementGranted"] = "ENTITLEMENT_GRANTED";
397
234
  EventLogType["EntitlementRequested"] = "ENTITLEMENT_REQUESTED";
398
- EventLogType["EnvironmentDeleted"] = "ENVIRONMENT_DELETED";
399
235
  EventLogType["FeatureCreated"] = "FEATURE_CREATED";
400
236
  EventLogType["FeatureDeleted"] = "FEATURE_DELETED";
401
237
  EventLogType["FeatureUpdated"] = "FEATURE_UPDATED";
@@ -406,9 +242,6 @@ var EventLogType;
406
242
  EventLogType["PlanCreated"] = "PLAN_CREATED";
407
243
  EventLogType["PlanDeleted"] = "PLAN_DELETED";
408
244
  EventLogType["PlanUpdated"] = "PLAN_UPDATED";
409
- EventLogType["ProductCreated"] = "PRODUCT_CREATED";
410
- EventLogType["ProductDeleted"] = "PRODUCT_DELETED";
411
- EventLogType["ProductUpdated"] = "PRODUCT_UPDATED";
412
245
  EventLogType["PromotionalEntitlementExpired"] = "PROMOTIONAL_ENTITLEMENT_EXPIRED";
413
246
  EventLogType["PromotionalEntitlementGranted"] = "PROMOTIONAL_ENTITLEMENT_GRANTED";
414
247
  EventLogType["PromotionalEntitlementRevoked"] = "PROMOTIONAL_ENTITLEMENT_REVOKED";
@@ -424,8 +257,13 @@ var EventLogType;
424
257
  EventLogType["SubscriptionUpdated"] = "SUBSCRIPTION_UPDATED";
425
258
  EventLogType["SubscriptionUsageUpdated"] = "SUBSCRIPTION_USAGE_UPDATED";
426
259
  EventLogType["SyncFailed"] = "SYNC_FAILED";
427
- EventLogType["WidgetConfigurationUpdated"] = "WIDGET_CONFIGURATION_UPDATED";
428
260
  })(EventLogType = exports.EventLogType || (exports.EventLogType = {}));
261
+ /** The group of the experiment */
262
+ var ExperimentGroup;
263
+ (function (ExperimentGroup) {
264
+ ExperimentGroup["Control"] = "CONTROL";
265
+ ExperimentGroup["Variant"] = "VARIANT";
266
+ })(ExperimentGroup = exports.ExperimentGroup || (exports.ExperimentGroup = {}));
429
267
  var ExperimentSortFields;
430
268
  (function (ExperimentSortFields) {
431
269
  ExperimentSortFields["CreatedAt"] = "createdAt";
@@ -469,12 +307,6 @@ var FeatureType;
469
307
  FeatureType["Boolean"] = "BOOLEAN";
470
308
  FeatureType["Number"] = "NUMBER";
471
309
  })(FeatureType = exports.FeatureType || (exports.FeatureType = {}));
472
- /** Font weight */
473
- var FontWeight;
474
- (function (FontWeight) {
475
- FontWeight["Bold"] = "BOLD";
476
- FontWeight["Normal"] = "NORMAL";
477
- })(FontWeight = exports.FontWeight || (exports.FontWeight = {}));
478
310
  var HookSortFields;
479
311
  (function (HookSortFields) {
480
312
  HookSortFields["CreatedAt"] = "createdAt";
@@ -583,7 +415,6 @@ var PlanSortFields;
583
415
  })(PlanSortFields = exports.PlanSortFields || (exports.PlanSortFields = {}));
584
416
  var PriceSortFields;
585
417
  (function (PriceSortFields) {
586
- PriceSortFields["BillingId"] = "billingId";
587
418
  PriceSortFields["BillingModel"] = "billingModel";
588
419
  PriceSortFields["BillingPeriod"] = "billingPeriod";
589
420
  PriceSortFields["CreatedAt"] = "createdAt";
@@ -632,17 +463,6 @@ var PromotionalEntitlementStatus;
632
463
  PromotionalEntitlementStatus["Expired"] = "Expired";
633
464
  PromotionalEntitlementStatus["Paused"] = "Paused";
634
465
  })(PromotionalEntitlementStatus = exports.PromotionalEntitlementStatus || (exports.PromotionalEntitlementStatus = {}));
635
- var ProrationBehavior;
636
- (function (ProrationBehavior) {
637
- ProrationBehavior["CreateProrations"] = "CREATE_PRORATIONS";
638
- ProrationBehavior["InvoiceImmediately"] = "INVOICE_IMMEDIATELY";
639
- })(ProrationBehavior = exports.ProrationBehavior || (exports.ProrationBehavior = {}));
640
- /** Provision subscription status */
641
- var ProvisionSubscriptionStatus;
642
- (function (ProvisionSubscriptionStatus) {
643
- ProvisionSubscriptionStatus["PaymentRequired"] = "PAYMENT_REQUIRED";
644
- ProvisionSubscriptionStatus["Success"] = "SUCCESS";
645
- })(ProvisionSubscriptionStatus = exports.ProvisionSubscriptionStatus || (exports.ProvisionSubscriptionStatus = {}));
646
466
  /** PublishMigrationType */
647
467
  var PublishMigrationType;
648
468
  (function (PublishMigrationType) {
@@ -692,27 +512,11 @@ var SubscriptionCancellationTime;
692
512
  SubscriptionCancellationTime["Immediate"] = "IMMEDIATE";
693
513
  SubscriptionCancellationTime["SpecificDate"] = "SPECIFIC_DATE";
694
514
  })(SubscriptionCancellationTime = exports.SubscriptionCancellationTime || (exports.SubscriptionCancellationTime = {}));
695
- /** Subscription decision strategy */
696
- var SubscriptionDecisionStrategy;
697
- (function (SubscriptionDecisionStrategy) {
698
- SubscriptionDecisionStrategy["PredefinedFreePlan"] = "PREDEFINED_FREE_PLAN";
699
- SubscriptionDecisionStrategy["PredefinedTrialPlan"] = "PREDEFINED_TRIAL_PLAN";
700
- SubscriptionDecisionStrategy["RequestedPlan"] = "REQUESTED_PLAN";
701
- SubscriptionDecisionStrategy["SkippedSubscriptionCreation"] = "SKIPPED_SUBSCRIPTION_CREATION";
702
- })(SubscriptionDecisionStrategy = exports.SubscriptionDecisionStrategy || (exports.SubscriptionDecisionStrategy = {}));
703
515
  var SubscriptionEndSetup;
704
516
  (function (SubscriptionEndSetup) {
705
517
  SubscriptionEndSetup["CancelSubscription"] = "CANCEL_SUBSCRIPTION";
706
518
  SubscriptionEndSetup["DowngradeToFree"] = "DOWNGRADE_TO_FREE";
707
519
  })(SubscriptionEndSetup = exports.SubscriptionEndSetup || (exports.SubscriptionEndSetup = {}));
708
- var SubscriptionEntitlementSortFields;
709
- (function (SubscriptionEntitlementSortFields) {
710
- SubscriptionEntitlementSortFields["CreatedAt"] = "createdAt";
711
- SubscriptionEntitlementSortFields["EnvironmentId"] = "environmentId";
712
- SubscriptionEntitlementSortFields["Id"] = "id";
713
- SubscriptionEntitlementSortFields["SubscriptionId"] = "subscriptionId";
714
- SubscriptionEntitlementSortFields["UpdatedAt"] = "updatedAt";
715
- })(SubscriptionEntitlementSortFields = exports.SubscriptionEntitlementSortFields || (exports.SubscriptionEntitlementSortFields = {}));
716
520
  var SubscriptionMigrationTaskSortFields;
717
521
  (function (SubscriptionMigrationTaskSortFields) {
718
522
  SubscriptionMigrationTaskSortFields["CreatedAt"] = "createdAt";
@@ -728,21 +532,6 @@ var SubscriptionPriceSortFields;
728
532
  SubscriptionPriceSortFields["UpdatedAt"] = "updatedAt";
729
533
  SubscriptionPriceSortFields["UsageLimit"] = "usageLimit";
730
534
  })(SubscriptionPriceSortFields = exports.SubscriptionPriceSortFields || (exports.SubscriptionPriceSortFields = {}));
731
- /** Subscription scheduled schedule status */
732
- var SubscriptionScheduleStatus;
733
- (function (SubscriptionScheduleStatus) {
734
- SubscriptionScheduleStatus["Canceled"] = "Canceled";
735
- SubscriptionScheduleStatus["Done"] = "Done";
736
- SubscriptionScheduleStatus["Failed"] = "Failed";
737
- SubscriptionScheduleStatus["Scheduled"] = "Scheduled";
738
- })(SubscriptionScheduleStatus = exports.SubscriptionScheduleStatus || (exports.SubscriptionScheduleStatus = {}));
739
- /** Subscription scheduled schedule type */
740
- var SubscriptionScheduleType;
741
- (function (SubscriptionScheduleType) {
742
- SubscriptionScheduleType["BillingPeriod"] = "BillingPeriod";
743
- SubscriptionScheduleType["Downgrade"] = "Downgrade";
744
- SubscriptionScheduleType["UnitAmount"] = "UnitAmount";
745
- })(SubscriptionScheduleType = exports.SubscriptionScheduleType || (exports.SubscriptionScheduleType = {}));
746
535
  var SubscriptionStartSetup;
747
536
  (function (SubscriptionStartSetup) {
748
537
  SubscriptionStartSetup["FreePlan"] = "FREE_PLAN";
@@ -759,6 +548,14 @@ var SubscriptionStatus;
759
548
  SubscriptionStatus["NotStarted"] = "NOT_STARTED";
760
549
  SubscriptionStatus["PaymentPending"] = "PAYMENT_PENDING";
761
550
  })(SubscriptionStatus = exports.SubscriptionStatus || (exports.SubscriptionStatus = {}));
551
+ /** Subscription strategy decision */
552
+ var SubscriptionStrategyDecision;
553
+ (function (SubscriptionStrategyDecision) {
554
+ SubscriptionStrategyDecision["PredefinedFreePlan"] = "PREDEFINED_FREE_PLAN";
555
+ SubscriptionStrategyDecision["PredefinedTrialPlan"] = "PREDEFINED_TRIAL_PLAN";
556
+ SubscriptionStrategyDecision["RequestedPlan"] = "REQUESTED_PLAN";
557
+ SubscriptionStrategyDecision["SkippedSubscriptionCreation"] = "SKIPPED_SUBSCRIPTION_CREATION";
558
+ })(SubscriptionStrategyDecision = exports.SubscriptionStrategyDecision || (exports.SubscriptionStrategyDecision = {}));
762
559
  /** Status of the integration sync */
763
560
  var SyncStatus;
764
561
  (function (SyncStatus) {
@@ -812,36 +609,30 @@ var WeeklyAccordingTo;
812
609
  WeeklyAccordingTo["EveryWednesday"] = "EveryWednesday";
813
610
  WeeklyAccordingTo["SubscriptionStart"] = "SubscriptionStart";
814
611
  })(WeeklyAccordingTo = exports.WeeklyAccordingTo || (exports.WeeklyAccordingTo = {}));
815
- /** The widget type */
816
- var WidgetType;
817
- (function (WidgetType) {
818
- WidgetType["CustomerPortal"] = "CUSTOMER_PORTAL";
819
- WidgetType["Paywall"] = "PAYWALL";
820
- })(WidgetType = exports.WidgetType || (exports.WidgetType = {}));
821
- /** The group of the experiment */
822
- var ExperimentGroupType;
823
- (function (ExperimentGroupType) {
824
- ExperimentGroupType["Control"] = "CONTROL";
825
- ExperimentGroupType["Variant"] = "VARIANT";
826
- })(ExperimentGroupType = exports.ExperimentGroupType || (exports.ExperimentGroupType = {}));
612
+ exports.FeatureFragmentDoc = (0, graphql_tag_1.default) `
613
+ fragment FeatureFragment on Feature {
614
+ id: refId
615
+ featureType
616
+ meterType
617
+ featureUnits
618
+ featureUnitsPlural
619
+ displayName
620
+ description
621
+ }
622
+ `;
827
623
  exports.PriceFragmentDoc = (0, graphql_tag_1.default) `
828
624
  fragment PriceFragment on Price {
829
625
  billingModel
830
626
  billingPeriod
831
- billingId
832
- minUnitQuantity
833
- maxUnitQuantity
834
627
  price {
835
628
  amount
836
629
  currency
837
630
  }
838
631
  feature {
839
- featureUnits
840
- featureUnitsPlural
841
- displayName
632
+ ...FeatureFragment
842
633
  }
843
634
  }
844
- `;
635
+ ${exports.FeatureFragmentDoc}`;
845
636
  exports.TotalPriceFragmentDoc = (0, graphql_tag_1.default) `
846
637
  fragment TotalPriceFragment on CustomerSubscriptionTotalPrice {
847
638
  subTotal {
@@ -854,154 +645,42 @@ exports.TotalPriceFragmentDoc = (0, graphql_tag_1.default) `
854
645
  }
855
646
  }
856
647
  `;
857
- exports.SlimSubscriptionFragmentDoc = (0, graphql_tag_1.default) `
858
- fragment SlimSubscriptionFragment on CustomerSubscription {
859
- id
860
- refId
861
- status
862
- additionalMetaData
863
- billingId
864
- billingLinkUrl
865
- effectiveEndDate
866
- currentBillingPeriodEnd
867
- pricingType
868
- experimentInfo {
869
- name
870
- id
871
- groupName
872
- groupType
873
- }
874
- prices {
875
- usageLimit
876
- price {
877
- ...PriceFragment
878
- }
879
- }
880
- totalPrice {
881
- ...TotalPriceFragment
882
- }
883
- plan {
884
- id
885
- refId
886
- }
887
- addons {
888
- quantity
889
- addon {
890
- id
891
- refId
892
- }
893
- }
894
- customer {
895
- id
896
- refId
897
- }
898
- }
899
- ${exports.PriceFragmentDoc}
900
- ${exports.TotalPriceFragmentDoc}`;
901
- exports.CouponFragmentDoc = (0, graphql_tag_1.default) `
902
- fragment CouponFragment on Coupon {
903
- id
904
- discountValue
905
- type
906
- additionalMetaData
907
- refId
908
- name
909
- description
910
- createdAt
911
- updatedAt
912
- billingId
913
- billingLinkUrl
914
- type
915
- status
916
- syncStates {
917
- vendorIdentifier
918
- status
919
- }
920
- customers {
921
- id
922
- }
923
- }
924
- `;
925
- exports.PromotionalEntitlementFragmentDoc = (0, graphql_tag_1.default) `
926
- fragment PromotionalEntitlementFragment on PromotionalEntitlement {
927
- status
928
- usageLimit
929
- featureId
930
- hasUnlimitedUsage
931
- resetPeriod
932
- endDate
933
- isVisible
934
- feature {
935
- featureType
936
- meterType
937
- featureUnits
938
- featureUnitsPlural
939
- displayName
940
- description
941
- refId
942
- additionalMetaData
943
- }
944
- }
945
- `;
946
648
  exports.PackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
947
649
  fragment PackageEntitlementFragment on PackageEntitlement {
948
650
  usageLimit
949
651
  hasUnlimitedUsage
950
652
  featureId
951
653
  resetPeriod
952
- hiddenFromWidgets
953
- isCustom
954
- displayNameOverride
955
654
  feature {
956
- featureType
957
- meterType
958
- featureUnits
959
- featureUnitsPlural
960
- displayName
961
- description
962
- refId
963
- additionalMetaData
655
+ ...FeatureFragment
964
656
  }
965
657
  }
966
- `;
658
+ ${exports.FeatureFragmentDoc}`;
967
659
  exports.AddonFragmentDoc = (0, graphql_tag_1.default) `
968
660
  fragment AddonFragment on Addon {
969
- refId
970
- billingId
661
+ id: refId
971
662
  displayName
972
663
  description
973
- additionalMetaData
664
+ metadata: additionalMetaData
974
665
  entitlements {
975
666
  ...PackageEntitlementFragment
976
667
  }
977
- prices {
978
- ...PriceFragment
979
- }
980
668
  pricingType
981
669
  }
982
- ${exports.PackageEntitlementFragmentDoc}
983
- ${exports.PriceFragmentDoc}`;
670
+ ${exports.PackageEntitlementFragmentDoc}`;
984
671
  exports.PlanFragmentDoc = (0, graphql_tag_1.default) `
985
672
  fragment PlanFragment on Plan {
986
- refId
673
+ id: refId
987
674
  displayName
988
675
  description
989
- billingId
990
- additionalMetaData
676
+ metadata: additionalMetaData
991
677
  product {
992
- refId
678
+ id: refId
993
679
  displayName
994
680
  description
995
- additionalMetaData
996
- productSettings {
997
- downgradePlan {
998
- refId
999
- displayName
1000
- }
1001
- }
1002
681
  }
1003
682
  basePlan {
1004
- refId
683
+ id: refId
1005
684
  displayName
1006
685
  }
1007
686
  entitlements {
@@ -1025,46 +704,19 @@ exports.PlanFragmentDoc = (0, graphql_tag_1.default) `
1025
704
  ${exports.PackageEntitlementFragmentDoc}
1026
705
  ${exports.AddonFragmentDoc}
1027
706
  ${exports.PriceFragmentDoc}`;
1028
- exports.SubscriptionScheduledUpdateDataFragmentDoc = (0, graphql_tag_1.default) `
1029
- fragment SubscriptionScheduledUpdateData on SubscriptionScheduledUpdate {
1030
- subscriptionScheduleType
1031
- scheduleStatus
1032
- scheduledExecutionTime
1033
- scheduleVariables {
1034
- ... on DowngradeChangeVariables {
1035
- addonRefIds
1036
- billingPeriod
1037
- downgradePlanRefId
1038
- }
1039
- ... on BillingPeriodChangeVariables {
1040
- billingPeriod
1041
- }
1042
- ... on UnitAmountChangeVariables {
1043
- newUnitAmount
1044
- }
1045
- }
1046
- }
1047
- `;
1048
707
  exports.SubscriptionFragmentDoc = (0, graphql_tag_1.default) `
1049
708
  fragment SubscriptionFragment on CustomerSubscription {
1050
- id
709
+ id: refId
710
+ status
1051
711
  startDate
1052
712
  endDate
1053
713
  trialEndDate
1054
714
  cancellationDate
1055
715
  effectiveEndDate
1056
- status
1057
- refId
1058
716
  currentBillingPeriodEnd
1059
- additionalMetaData
717
+ metadata: additionalMetaData
1060
718
  billingId
1061
719
  billingLinkUrl
1062
- experimentInfo {
1063
- name
1064
- groupType
1065
- groupName
1066
- id
1067
- }
1068
720
  prices {
1069
721
  usageLimit
1070
722
  price {
@@ -1085,139 +737,98 @@ exports.SubscriptionFragmentDoc = (0, graphql_tag_1.default) `
1085
737
  ...AddonFragment
1086
738
  }
1087
739
  }
1088
- scheduledUpdates {
1089
- ...SubscriptionScheduledUpdateData
1090
- }
1091
740
  }
1092
741
  ${exports.PriceFragmentDoc}
1093
742
  ${exports.TotalPriceFragmentDoc}
1094
743
  ${exports.PlanFragmentDoc}
1095
- ${exports.AddonFragmentDoc}
1096
- ${exports.SubscriptionScheduledUpdateDataFragmentDoc}`;
744
+ ${exports.AddonFragmentDoc}`;
745
+ exports.PromotionalEntitlementFragmentDoc = (0, graphql_tag_1.default) `
746
+ fragment PromotionalEntitlementFragment on PromotionalEntitlement {
747
+ status
748
+ usageLimit
749
+ featureId
750
+ hasUnlimitedUsage
751
+ resetPeriod
752
+ endDate
753
+ isVisible
754
+ feature {
755
+ ...FeatureFragment
756
+ }
757
+ }
758
+ ${exports.FeatureFragmentDoc}`;
759
+ exports.CouponFragmentDoc = (0, graphql_tag_1.default) `
760
+ fragment CouponFragment on Coupon {
761
+ id: refId
762
+ name
763
+ description
764
+ type
765
+ discountValue
766
+ metadata: additionalMetaData
767
+ createdAt
768
+ updatedAt
769
+ billingId
770
+ billingLinkUrl
771
+ status
772
+ }
773
+ `;
1097
774
  exports.CustomerFragmentDoc = (0, graphql_tag_1.default) `
1098
775
  fragment CustomerFragment on Customer {
1099
- id
776
+ customerId
1100
777
  name
1101
778
  email
1102
779
  createdAt
1103
780
  updatedAt
1104
- hasPaymentMethod
1105
- refId
1106
- billingId
1107
- defaultPaymentExpirationMonth
1108
- defaultPaymentExpirationYear
1109
- defaultPaymentMethodLast4Digits
1110
- additionalMetaData
1111
- trialedPlans {
1112
- productId
1113
- productRefId
1114
- planRefId
1115
- planId
1116
- }
1117
- experimentInfo {
1118
- groupType
1119
- groupName
1120
- id
1121
- name
1122
- }
1123
- coupon {
1124
- ...CouponFragment
1125
- }
1126
- eligibleForTrial {
1127
- productId
1128
- productRefId
1129
- eligible
781
+ subscriptions {
782
+ ...SubscriptionFragment
1130
783
  }
1131
784
  promotionalEntitlements {
1132
785
  ...PromotionalEntitlementFragment
1133
786
  }
1134
- subscriptions {
1135
- ...SubscriptionFragment
787
+ hasPaymentMethod
788
+ coupon {
789
+ ...CouponFragment
1136
790
  }
791
+ billingId
792
+ metadata: additionalMetaData
793
+ email2: email
1137
794
  }
1138
- ${exports.CouponFragmentDoc}
795
+ ${exports.SubscriptionFragmentDoc}
1139
796
  ${exports.PromotionalEntitlementFragmentDoc}
1140
- ${exports.SubscriptionFragmentDoc}`;
1141
- exports.SubscriptionPreviewFragmentDoc = (0, graphql_tag_1.default) `
1142
- fragment SubscriptionPreviewFragment on SubscriptionPreview {
1143
- subTotal {
1144
- amount
1145
- currency
1146
- }
1147
- total {
1148
- amount
1149
- currency
1150
- }
1151
- billingPeriodRange {
1152
- start
1153
- end
1154
- }
1155
- proration {
1156
- prorationDate
1157
- credit {
1158
- amount
1159
- currency
1160
- }
1161
- debit {
1162
- amount
1163
- currency
797
+ ${exports.CouponFragmentDoc}`;
798
+ exports.SlimSubscriptionFragmentDoc = (0, graphql_tag_1.default) `
799
+ fragment SlimSubscriptionFragment on CustomerSubscription {
800
+ id: refId
801
+ status
802
+ metadata: additionalMetaData
803
+ billingId
804
+ billingLinkUrl
805
+ effectiveEndDate
806
+ currentBillingPeriodEnd
807
+ pricingType
808
+ prices {
809
+ usageLimit
810
+ price {
811
+ ...PriceFragment
1164
812
  }
1165
813
  }
1166
- }
1167
- `;
1168
- exports.MonthlyResetPeriodConfigFragmentDoc = (0, graphql_tag_1.default) `
1169
- fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {
1170
- monthlyAccordingTo
1171
- }
1172
- `;
1173
- exports.WeeklyResetPeriodConfigFragmentDoc = (0, graphql_tag_1.default) `
1174
- fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {
1175
- weeklyAccordingTo
1176
- }
1177
- `;
1178
- exports.ResetPeriodConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1179
- fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {
1180
- __typename
1181
- ... on MonthlyResetPeriodConfig {
1182
- ...MonthlyResetPeriodConfigFragment
814
+ totalPrice {
815
+ ...TotalPriceFragment
1183
816
  }
1184
- ... on WeeklyResetPeriodConfig {
1185
- ...WeeklyResetPeriodConfigFragment
817
+ plan {
818
+ id: refId
1186
819
  }
1187
- }
1188
- ${exports.MonthlyResetPeriodConfigFragmentDoc}
1189
- ${exports.WeeklyResetPeriodConfigFragmentDoc}`;
1190
- exports.FeatureFragmentDoc = (0, graphql_tag_1.default) `
1191
- fragment FeatureFragment on EntitlementFeature {
1192
- featureType
1193
- meterType
1194
- featureUnits
1195
- featureUnitsPlural
1196
- description
1197
- displayName
1198
- refId
1199
- }
1200
- `;
1201
- exports.EntitlementFragmentDoc = (0, graphql_tag_1.default) `
1202
- fragment EntitlementFragment on Entitlement {
1203
- isGranted
1204
- accessDeniedReason
1205
- customerId
1206
- usageLimit
1207
- hasUnlimitedUsage
1208
- currentUsage
1209
- requestedUsage
1210
- nextResetDate
1211
- resetPeriod
1212
- resetPeriodConfiguration {
1213
- ...ResetPeriodConfigurationFragment
820
+ addons {
821
+ quantity
822
+ addon {
823
+ id: refId
824
+ }
1214
825
  }
1215
- feature {
1216
- ...FeatureFragment
826
+ customer {
827
+ id: refId
1217
828
  }
1218
829
  }
1219
- ${exports.ResetPeriodConfigurationFragmentDoc}
1220
- ${exports.FeatureFragmentDoc}`;
830
+ ${exports.PriceFragmentDoc}
831
+ ${exports.TotalPriceFragmentDoc}`;
1221
832
  exports.PaywallPackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
1222
833
  fragment PaywallPackageEntitlementFragment on PackageEntitlement {
1223
834
  usageLimit
@@ -1225,135 +836,89 @@ exports.PaywallPackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
1225
836
  featureId
1226
837
  resetPeriod
1227
838
  feature {
1228
- featureType
1229
- meterType
1230
- featureUnits
1231
- featureUnitsPlural
1232
- displayName
1233
- description
1234
- refId
839
+ ...FeatureFragment
1235
840
  }
1236
841
  }
1237
- `;
1238
- exports.PaywallAddonFragmentDoc = (0, graphql_tag_1.default) `
1239
- fragment PaywallAddonFragment on Addon {
1240
- id
1241
- refId
1242
- billingId
1243
- displayName
1244
- description
1245
- entitlements {
1246
- ...PaywallPackageEntitlementFragment
842
+ ${exports.FeatureFragmentDoc}`;
843
+ exports.PaywallPriceFragmentDoc = (0, graphql_tag_1.default) `
844
+ fragment PaywallPriceFragment on Price {
845
+ billingModel
846
+ billingPeriod
847
+ price {
848
+ amount
849
+ currency
1247
850
  }
1248
- prices {
1249
- ...PriceFragment
851
+ feature {
852
+ ...FeatureFragment
1250
853
  }
1251
- additionalMetaData
1252
- pricingType
1253
854
  }
1254
- ${exports.PaywallPackageEntitlementFragmentDoc}
1255
- ${exports.PriceFragmentDoc}`;
855
+ ${exports.FeatureFragmentDoc}`;
1256
856
  exports.PaywallPlanFragmentDoc = (0, graphql_tag_1.default) `
1257
857
  fragment PaywallPlanFragment on Plan {
1258
- id
1259
- refId
858
+ id: refId
1260
859
  description
1261
860
  displayName
1262
- billingId
1263
861
  product {
1264
- refId
862
+ id: refId
1265
863
  displayName
1266
864
  description
1267
- additionalMetaData
1268
- productSettings {
1269
- downgradePlan {
1270
- refId
1271
- displayName
1272
- }
1273
- }
1274
865
  }
1275
866
  basePlan {
1276
- refId
867
+ id: refId
1277
868
  displayName
1278
869
  }
1279
870
  entitlements {
1280
871
  ...PaywallPackageEntitlementFragment
1281
872
  }
1282
- additionalMetaData
873
+ metadata: additionalMetaData
1283
874
  inheritedEntitlements {
1284
875
  ...PaywallPackageEntitlementFragment
1285
876
  }
1286
877
  prices {
1287
- ...PriceFragment
878
+ ...PaywallPriceFragment
1288
879
  }
1289
880
  pricingType
1290
881
  defaultTrialConfig {
1291
882
  duration
1292
883
  units
1293
884
  }
1294
- compatibleAddons {
1295
- ...PaywallAddonFragment
1296
- }
1297
885
  }
1298
886
  ${exports.PaywallPackageEntitlementFragmentDoc}
1299
- ${exports.PriceFragmentDoc}
1300
- ${exports.PaywallAddonFragmentDoc}`;
1301
- exports.FontVariantFragmentDoc = (0, graphql_tag_1.default) `
1302
- fragment FontVariantFragment on FontVariant {
1303
- fontSize
1304
- fontWeight
1305
- }
1306
- `;
1307
- exports.TypographyConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1308
- fragment TypographyConfigurationFragment on TypographyConfiguration {
1309
- fontFamily
1310
- h1 {
1311
- ...FontVariantFragment
1312
- }
1313
- h2 {
1314
- ...FontVariantFragment
1315
- }
1316
- h3 {
1317
- ...FontVariantFragment
887
+ ${exports.PaywallPriceFragmentDoc}`;
888
+ exports.PaywallAddonFragmentDoc = (0, graphql_tag_1.default) `
889
+ fragment PaywallAddonFragment on Addon {
890
+ id: refId
891
+ displayName
892
+ description
893
+ entitlements {
894
+ ...PaywallPackageEntitlementFragment
1318
895
  }
1319
- body {
1320
- ...FontVariantFragment
896
+ prices {
897
+ ...PaywallPriceFragment
1321
898
  }
899
+ metadata: additionalMetaData
900
+ pricingType
1322
901
  }
1323
- ${exports.FontVariantFragmentDoc}`;
1324
- exports.LayoutConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1325
- fragment LayoutConfigurationFragment on PaywallLayoutConfiguration {
1326
- alignment
1327
- planWidth
1328
- planMargin
1329
- planPadding
1330
- }
1331
- `;
1332
- exports.PaywallConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1333
- fragment PaywallConfigurationFragment on PaywallConfiguration {
1334
- palette {
1335
- primary
1336
- textColor
1337
- backgroundColor
1338
- borderColor
1339
- currentPlanBackground
1340
- }
1341
- typography {
1342
- ...TypographyConfigurationFragment
1343
- }
1344
- layout {
1345
- ...LayoutConfigurationFragment
902
+ ${exports.PaywallPackageEntitlementFragmentDoc}
903
+ ${exports.PaywallPriceFragmentDoc}`;
904
+ exports.CreateCustomerDocument = (0, graphql_tag_1.default) `
905
+ mutation createCustomer($customerId: String!, $email: String, $name: String, $billingInfo: CustomerBillingInfo, $metadata: JSON, $couponId: String, $shouldSyncFree: Boolean) {
906
+ createCustomer: createOneCustomer(
907
+ input: {refId: $customerId, additionalMetaData: $metadata, billingInformation: $billingInfo, couponRefId: $couponId, email: $email, name: $name, shouldSyncFree: $shouldSyncFree}
908
+ ) {
909
+ ...CustomerFragment
1346
910
  }
1347
911
  }
1348
- ${exports.TypographyConfigurationFragmentDoc}
1349
- ${exports.LayoutConfigurationFragmentDoc}`;
912
+ ${exports.CustomerFragmentDoc}`;
1350
913
  exports.ProvisionCustomerDocument = (0, graphql_tag_1.default) `
1351
- mutation provisionCustomer($input: ProvisionCustomerInput!) {
1352
- provisionCustomer(input: $input) {
914
+ mutation provisionCustomer($customerId: String!, $email: String, $name: String, $billingInfo: CustomerBillingInfo, $metadata: JSON, $couponId: String, $shouldSyncFree: Boolean, $subscriptionParams: SubscriptionBaseInput) {
915
+ provisionCustomer(
916
+ input: {refId: $customerId, additionalMetaData: $metadata, billingInformation: $billingInfo, couponRefId: $couponId, email: $email, name: $name, shouldSyncFree: $shouldSyncFree, subscriptionParams: $subscriptionParams}
917
+ ) {
1353
918
  customer {
1354
919
  ...CustomerFragment
1355
920
  }
1356
- subscriptionDecisionStrategy
921
+ subscriptionStrategyDecision
1357
922
  subscription {
1358
923
  ...SlimSubscriptionFragment
1359
924
  }
@@ -1362,77 +927,69 @@ exports.ProvisionCustomerDocument = (0, graphql_tag_1.default) `
1362
927
  ${exports.CustomerFragmentDoc}
1363
928
  ${exports.SlimSubscriptionFragmentDoc}`;
1364
929
  exports.ImportCustomerDocument = (0, graphql_tag_1.default) `
1365
- mutation importCustomer($input: ImportCustomerInput!) {
1366
- importCustomer: importOneCustomer(input: $input) {
930
+ mutation importCustomer($customerId: String!, $billingId: String!, $email: String, $name: String) {
931
+ importCustomer: importOneCustomer(
932
+ input: {refId: $customerId, billingId: $billingId, email: $email, name: $name}
933
+ ) {
1367
934
  ...CustomerFragment
1368
935
  }
1369
936
  }
1370
937
  ${exports.CustomerFragmentDoc}`;
1371
938
  exports.UpdateCustomerDocument = (0, graphql_tag_1.default) `
1372
- mutation updateCustomer($input: UpdateCustomerInput!) {
1373
- updateCustomer: updateOneCustomer(input: $input) {
939
+ mutation updateCustomer($metadata: JSON, $billingInfo: CustomerBillingInfo, $couponId: String, $email: String, $name: String, $customerId: String!) {
940
+ updateCustomer: updateOneCustomer(
941
+ input: {refId: $customerId, name: $name, email: $email, couponRefId: $couponId, billingInformation: $billingInfo, additionalMetaData: $metadata}
942
+ ) {
1374
943
  ...CustomerFragment
1375
944
  }
1376
945
  }
1377
946
  ${exports.CustomerFragmentDoc}`;
1378
- exports.ProvisionSubscriptionDocument = (0, graphql_tag_1.default) `
1379
- mutation provisionSubscription($input: ProvisionSubscriptionInput!) {
1380
- provisionSubscriptionV2(input: $input) {
1381
- checkoutUrl
1382
- status
1383
- subscription {
1384
- ...SlimSubscriptionFragment
1385
- }
947
+ exports.UpdateSubscriptionDocument = (0, graphql_tag_1.default) `
948
+ mutation updateSubscription($metadata: JSON, $subscriptionId: String!, $unitQuantity: Float) {
949
+ updateSubscription: updateOneSubscription(
950
+ input: {additionalMetaData: $metadata, refId: $subscriptionId, unitQuantity: $unitQuantity}
951
+ ) {
952
+ ...SlimSubscriptionFragment
1386
953
  }
1387
954
  }
1388
955
  ${exports.SlimSubscriptionFragmentDoc}`;
1389
- exports.UpdateSubscriptionDocument = (0, graphql_tag_1.default) `
1390
- mutation updateSubscription($input: UpdateSubscriptionInput!) {
1391
- updateSubscription: updateOneSubscription(input: $input) {
956
+ exports.CreateSubscriptionDocument = (0, graphql_tag_1.default) `
957
+ mutation createSubscription($metadata: JSON, $addons: [SubscriptionAddonInput!], $awaitPaymentConfirmation: Boolean, $billingId: String, $billingInfo: SubscriptionBillingInfo, $billingPeriod: BillingPeriod, $customerId: String!, $isTrial: Boolean, $isOverridingTrialConfig: Boolean, $planId: String, $unitQuantity: Float, $subscriptionId: String, $startDate: DateTime) {
958
+ createSubscription(
959
+ subscription: {refId: $subscriptionId, additionalMetaData: $metadata, billingInformation: $billingInfo, billingId: $billingId, addons: $addons, customerId: $customerId, awaitPaymentConfirmation: $awaitPaymentConfirmation, billingPeriod: $billingPeriod, isTrial: $isTrial, isOverridingTrialConfig: $isOverridingTrialConfig, planId: $planId, priceUnitAmount: $unitQuantity, startDate: $startDate}
960
+ ) {
1392
961
  ...SlimSubscriptionFragment
1393
962
  }
1394
963
  }
1395
964
  ${exports.SlimSubscriptionFragmentDoc}`;
1396
965
  exports.CancelSubscriptionDocument = (0, graphql_tag_1.default) `
1397
- mutation cancelSubscription($input: SubscriptionCancellationInput!) {
1398
- cancelSubscription(input: $input) {
966
+ mutation cancelSubscription($endDate: DateTime, $cancellationTime: SubscriptionCancellationTime, $subscriptionId: String!) {
967
+ cancelSubscription(
968
+ input: {subscriptionRefId: $subscriptionId, subscriptionCancellationTime: $cancellationTime, endDate: $endDate}
969
+ ) {
1399
970
  ...SlimSubscriptionFragment
1400
971
  }
1401
972
  }
1402
973
  ${exports.SlimSubscriptionFragmentDoc}`;
1403
974
  exports.InitiateCheckoutDocument = (0, graphql_tag_1.default) `
1404
- mutation initiateCheckout($input: InitiateCheckoutInput!) {
1405
- initiateCheckout(input: $input) {
975
+ mutation initiateCheckout($addons: [SubscriptionAddonInput!], $billingPeriod: BillingPeriod!, $cancelUrl: String!, $customerId: String!, $planId: String!, $successUrl: String!, $unitQuantity: Int) {
976
+ initiateCheckout(
977
+ input: {planId: $planId, billingPeriod: $billingPeriod, cancelUrl: $cancelUrl, customerId: $customerId, addons: $addons, unitQuantity: $unitQuantity, successUrl: $successUrl}
978
+ ) {
979
+ id
1406
980
  checkoutUrl
1407
981
  checkoutBillingId
1408
982
  }
1409
983
  }
1410
984
  `;
1411
- exports.EstimateSubscriptionDocument = (0, graphql_tag_1.default) `
1412
- mutation estimateSubscription($input: EstimateSubscriptionInput!) {
1413
- estimateSubscription(input: $input) {
1414
- ...SubscriptionPreviewFragment
1415
- }
1416
- }
1417
- ${exports.SubscriptionPreviewFragmentDoc}`;
1418
- exports.EstimateSubscriptionUpdateDocument = (0, graphql_tag_1.default) `
1419
- mutation estimateSubscriptionUpdate($input: EstimateSubscriptionUpdateInput!) {
1420
- estimateSubscriptionUpdate(input: $input) {
1421
- ...SubscriptionPreviewFragment
1422
- }
1423
- }
1424
- ${exports.SubscriptionPreviewFragmentDoc}`;
1425
- exports.ReportUsageDocument = (0, graphql_tag_1.default) `
1426
- mutation reportUsage($input: UsageMeasurementCreateInput!) {
1427
- createUsageMeasurement(usageMeasurement: $input) {
1428
- id
1429
- }
1430
- }
1431
- `;
1432
985
  exports.GetCustomerByIdDocument = (0, graphql_tag_1.default) `
1433
- query getCustomerById($input: GetCustomerByRefIdInput!) {
1434
- getCustomerByRefId(input: $input) {
1435
- ...CustomerFragment
986
+ query getCustomerById($customerId: String) {
987
+ customers(filter: {refId: {eq: $customerId}}) {
988
+ edges {
989
+ node {
990
+ ...CustomerFragment
991
+ }
992
+ }
1436
993
  }
1437
994
  }
1438
995
  ${exports.CustomerFragmentDoc}`;
@@ -1447,40 +1004,12 @@ exports.GetCouponsDocument = (0, graphql_tag_1.default) `
1447
1004
  }
1448
1005
  }
1449
1006
  ${exports.CouponFragmentDoc}`;
1450
- exports.GetPaywallDocument = (0, graphql_tag_1.default) `
1451
- query getPaywall($input: GetPaywallInput!) {
1452
- paywall(input: $input) {
1453
- plans {
1454
- ...PlanFragment
1455
- }
1456
- configuration {
1457
- ...PaywallConfigurationFragment
1458
- }
1459
- customer {
1460
- ...CustomerFragment
1461
- }
1462
- }
1463
- }
1464
- ${exports.PlanFragmentDoc}
1465
- ${exports.PaywallConfigurationFragmentDoc}
1466
- ${exports.CustomerFragmentDoc}`;
1467
- exports.GetEntitlementsDocument = (0, graphql_tag_1.default) `
1468
- query getEntitlements($query: FetchEntitlementsQuery!) {
1469
- entitlements: cachedEntitlements(query: $query) {
1470
- ...EntitlementFragment
1471
- }
1472
- }
1473
- ${exports.EntitlementFragmentDoc}`;
1474
- exports.GetEntitlementDocument = (0, graphql_tag_1.default) `
1475
- query getEntitlement($query: FetchEntitlementQuery!) {
1476
- entitlement(query: $query) {
1477
- ...EntitlementFragment
1478
- }
1479
- }
1480
- ${exports.EntitlementFragmentDoc}`;
1481
1007
  const defaultWrapper = (action, _operationName, _operationType) => action();
1482
1008
  function getSdk(client, withWrapper = defaultWrapper) {
1483
1009
  return {
1010
+ createCustomer(variables, requestHeaders) {
1011
+ return withWrapper((wrappedRequestHeaders) => client.request(exports.CreateCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createCustomer', 'mutation');
1012
+ },
1484
1013
  provisionCustomer(variables, requestHeaders) {
1485
1014
  return withWrapper((wrappedRequestHeaders) => client.request(exports.ProvisionCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'provisionCustomer', 'mutation');
1486
1015
  },
@@ -1490,41 +1019,23 @@ function getSdk(client, withWrapper = defaultWrapper) {
1490
1019
  updateCustomer(variables, requestHeaders) {
1491
1020
  return withWrapper((wrappedRequestHeaders) => client.request(exports.UpdateCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateCustomer', 'mutation');
1492
1021
  },
1493
- provisionSubscription(variables, requestHeaders) {
1494
- return withWrapper((wrappedRequestHeaders) => client.request(exports.ProvisionSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'provisionSubscription', 'mutation');
1495
- },
1496
1022
  updateSubscription(variables, requestHeaders) {
1497
1023
  return withWrapper((wrappedRequestHeaders) => client.request(exports.UpdateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateSubscription', 'mutation');
1498
1024
  },
1025
+ createSubscription(variables, requestHeaders) {
1026
+ return withWrapper((wrappedRequestHeaders) => client.request(exports.CreateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createSubscription', 'mutation');
1027
+ },
1499
1028
  cancelSubscription(variables, requestHeaders) {
1500
1029
  return withWrapper((wrappedRequestHeaders) => client.request(exports.CancelSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'cancelSubscription', 'mutation');
1501
1030
  },
1502
1031
  initiateCheckout(variables, requestHeaders) {
1503
1032
  return withWrapper((wrappedRequestHeaders) => client.request(exports.InitiateCheckoutDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'initiateCheckout', 'mutation');
1504
1033
  },
1505
- estimateSubscription(variables, requestHeaders) {
1506
- return withWrapper((wrappedRequestHeaders) => client.request(exports.EstimateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'estimateSubscription', 'mutation');
1507
- },
1508
- estimateSubscriptionUpdate(variables, requestHeaders) {
1509
- return withWrapper((wrappedRequestHeaders) => client.request(exports.EstimateSubscriptionUpdateDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'estimateSubscriptionUpdate', 'mutation');
1510
- },
1511
- reportUsage(variables, requestHeaders) {
1512
- return withWrapper((wrappedRequestHeaders) => client.request(exports.ReportUsageDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'reportUsage', 'mutation');
1513
- },
1514
1034
  getCustomerById(variables, requestHeaders) {
1515
1035
  return withWrapper((wrappedRequestHeaders) => client.request(exports.GetCustomerByIdDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCustomerById', 'query');
1516
1036
  },
1517
1037
  getCoupons(variables, requestHeaders) {
1518
1038
  return withWrapper((wrappedRequestHeaders) => client.request(exports.GetCouponsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCoupons', 'query');
1519
- },
1520
- getPaywall(variables, requestHeaders) {
1521
- return withWrapper((wrappedRequestHeaders) => client.request(exports.GetPaywallDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getPaywall', 'query');
1522
- },
1523
- getEntitlements(variables, requestHeaders) {
1524
- return withWrapper((wrappedRequestHeaders) => client.request(exports.GetEntitlementsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEntitlements', 'query');
1525
- },
1526
- getEntitlement(variables, requestHeaders) {
1527
- return withWrapper((wrappedRequestHeaders) => client.request(exports.GetEntitlementDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEntitlement', 'query');
1528
1039
  }
1529
1040
  };
1530
1041
  }