@stigg/api-client-js 0.0.8 → 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.UpdateCustomerDocument = 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.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 = 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,153 +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
- }
943
- }
944
- `;
945
648
  exports.PackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
946
649
  fragment PackageEntitlementFragment on PackageEntitlement {
947
650
  usageLimit
948
651
  hasUnlimitedUsage
949
652
  featureId
950
653
  resetPeriod
951
- hiddenFromWidgets
952
- isCustom
953
- displayNameOverride
954
654
  feature {
955
- featureType
956
- meterType
957
- featureUnits
958
- featureUnitsPlural
959
- displayName
960
- description
961
- refId
962
- additionalMetaData
655
+ ...FeatureFragment
963
656
  }
964
657
  }
965
- `;
658
+ ${exports.FeatureFragmentDoc}`;
966
659
  exports.AddonFragmentDoc = (0, graphql_tag_1.default) `
967
660
  fragment AddonFragment on Addon {
968
- refId
969
- billingId
661
+ id: refId
970
662
  displayName
971
663
  description
972
- additionalMetaData
664
+ metadata: additionalMetaData
973
665
  entitlements {
974
666
  ...PackageEntitlementFragment
975
667
  }
976
- prices {
977
- ...PriceFragment
978
- }
979
668
  pricingType
980
669
  }
981
- ${exports.PackageEntitlementFragmentDoc}
982
- ${exports.PriceFragmentDoc}`;
670
+ ${exports.PackageEntitlementFragmentDoc}`;
983
671
  exports.PlanFragmentDoc = (0, graphql_tag_1.default) `
984
672
  fragment PlanFragment on Plan {
985
- refId
673
+ id: refId
986
674
  displayName
987
675
  description
988
- billingId
989
- additionalMetaData
676
+ metadata: additionalMetaData
990
677
  product {
991
- refId
678
+ id: refId
992
679
  displayName
993
680
  description
994
- additionalMetaData
995
- productSettings {
996
- downgradePlan {
997
- refId
998
- displayName
999
- }
1000
- }
1001
681
  }
1002
682
  basePlan {
1003
- refId
683
+ id: refId
1004
684
  displayName
1005
685
  }
1006
686
  entitlements {
@@ -1026,24 +706,17 @@ ${exports.AddonFragmentDoc}
1026
706
  ${exports.PriceFragmentDoc}`;
1027
707
  exports.SubscriptionFragmentDoc = (0, graphql_tag_1.default) `
1028
708
  fragment SubscriptionFragment on CustomerSubscription {
1029
- id
709
+ id: refId
710
+ status
1030
711
  startDate
1031
712
  endDate
1032
713
  trialEndDate
1033
714
  cancellationDate
1034
715
  effectiveEndDate
1035
- status
1036
- refId
1037
716
  currentBillingPeriodEnd
1038
- additionalMetaData
717
+ metadata: additionalMetaData
1039
718
  billingId
1040
719
  billingLinkUrl
1041
- experimentInfo {
1042
- name
1043
- groupType
1044
- groupName
1045
- id
1046
- }
1047
720
  prices {
1048
721
  usageLimit
1049
722
  price {
@@ -1069,125 +742,93 @@ exports.SubscriptionFragmentDoc = (0, graphql_tag_1.default) `
1069
742
  ${exports.TotalPriceFragmentDoc}
1070
743
  ${exports.PlanFragmentDoc}
1071
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
+ `;
1072
774
  exports.CustomerFragmentDoc = (0, graphql_tag_1.default) `
1073
775
  fragment CustomerFragment on Customer {
1074
- id
776
+ customerId
1075
777
  name
1076
778
  email
1077
779
  createdAt
1078
780
  updatedAt
1079
- hasPaymentMethod
1080
- refId
1081
- billingId
1082
- defaultPaymentExpirationMonth
1083
- defaultPaymentExpirationYear
1084
- defaultPaymentMethodLast4Digits
1085
- additionalMetaData
1086
- trialedPlans {
1087
- productId
1088
- productRefId
1089
- planRefId
1090
- planId
1091
- }
1092
- experimentInfo {
1093
- groupType
1094
- groupName
1095
- id
1096
- name
1097
- }
1098
- coupon {
1099
- ...CouponFragment
781
+ subscriptions {
782
+ ...SubscriptionFragment
1100
783
  }
1101
784
  promotionalEntitlements {
1102
785
  ...PromotionalEntitlementFragment
1103
786
  }
1104
- subscriptions {
1105
- ...SubscriptionFragment
787
+ hasPaymentMethod
788
+ coupon {
789
+ ...CouponFragment
1106
790
  }
791
+ billingId
792
+ metadata: additionalMetaData
793
+ email2: email
1107
794
  }
1108
- ${exports.CouponFragmentDoc}
795
+ ${exports.SubscriptionFragmentDoc}
1109
796
  ${exports.PromotionalEntitlementFragmentDoc}
1110
- ${exports.SubscriptionFragmentDoc}`;
1111
- exports.SubscriptionPreviewFragmentDoc = (0, graphql_tag_1.default) `
1112
- fragment SubscriptionPreviewFragment on SubscriptionPreview {
1113
- subTotal {
1114
- amount
1115
- currency
1116
- }
1117
- total {
1118
- amount
1119
- currency
1120
- }
1121
- billingPeriodRange {
1122
- start
1123
- end
1124
- }
1125
- proration {
1126
- prorationDate
1127
- credit {
1128
- amount
1129
- currency
1130
- }
1131
- debit {
1132
- amount
1133
- 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
1134
812
  }
1135
813
  }
1136
- }
1137
- `;
1138
- exports.MonthlyResetPeriodConfigFragmentDoc = (0, graphql_tag_1.default) `
1139
- fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {
1140
- monthlyAccordingTo
1141
- }
1142
- `;
1143
- exports.WeeklyResetPeriodConfigFragmentDoc = (0, graphql_tag_1.default) `
1144
- fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {
1145
- weeklyAccordingTo
1146
- }
1147
- `;
1148
- exports.ResetPeriodConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1149
- fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {
1150
- __typename
1151
- ... on MonthlyResetPeriodConfig {
1152
- ...MonthlyResetPeriodConfigFragment
814
+ totalPrice {
815
+ ...TotalPriceFragment
1153
816
  }
1154
- ... on WeeklyResetPeriodConfig {
1155
- ...WeeklyResetPeriodConfigFragment
817
+ plan {
818
+ id: refId
1156
819
  }
1157
- }
1158
- ${exports.MonthlyResetPeriodConfigFragmentDoc}
1159
- ${exports.WeeklyResetPeriodConfigFragmentDoc}`;
1160
- exports.FeatureFragmentDoc = (0, graphql_tag_1.default) `
1161
- fragment FeatureFragment on EntitlementFeature {
1162
- featureType
1163
- meterType
1164
- featureUnits
1165
- featureUnitsPlural
1166
- description
1167
- displayName
1168
- refId
1169
- }
1170
- `;
1171
- exports.EntitlementFragmentDoc = (0, graphql_tag_1.default) `
1172
- fragment EntitlementFragment on Entitlement {
1173
- isGranted
1174
- accessDeniedReason
1175
- customerId
1176
- usageLimit
1177
- hasUnlimitedUsage
1178
- currentUsage
1179
- requestedUsage
1180
- nextResetDate
1181
- resetPeriod
1182
- resetPeriodConfiguration {
1183
- ...ResetPeriodConfigurationFragment
820
+ addons {
821
+ quantity
822
+ addon {
823
+ id: refId
824
+ }
1184
825
  }
1185
- feature {
1186
- ...FeatureFragment
826
+ customer {
827
+ id: refId
1187
828
  }
1188
829
  }
1189
- ${exports.ResetPeriodConfigurationFragmentDoc}
1190
- ${exports.FeatureFragmentDoc}`;
830
+ ${exports.PriceFragmentDoc}
831
+ ${exports.TotalPriceFragmentDoc}`;
1191
832
  exports.PaywallPackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
1192
833
  fragment PaywallPackageEntitlementFragment on PackageEntitlement {
1193
834
  usageLimit
@@ -1195,135 +836,89 @@ exports.PaywallPackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
1195
836
  featureId
1196
837
  resetPeriod
1197
838
  feature {
1198
- featureType
1199
- meterType
1200
- featureUnits
1201
- featureUnitsPlural
1202
- displayName
1203
- description
1204
- refId
839
+ ...FeatureFragment
1205
840
  }
1206
841
  }
1207
- `;
1208
- exports.PaywallAddonFragmentDoc = (0, graphql_tag_1.default) `
1209
- fragment PaywallAddonFragment on Addon {
1210
- id
1211
- refId
1212
- billingId
1213
- displayName
1214
- description
1215
- entitlements {
1216
- ...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
1217
850
  }
1218
- prices {
1219
- ...PriceFragment
851
+ feature {
852
+ ...FeatureFragment
1220
853
  }
1221
- additionalMetaData
1222
- pricingType
1223
854
  }
1224
- ${exports.PaywallPackageEntitlementFragmentDoc}
1225
- ${exports.PriceFragmentDoc}`;
855
+ ${exports.FeatureFragmentDoc}`;
1226
856
  exports.PaywallPlanFragmentDoc = (0, graphql_tag_1.default) `
1227
857
  fragment PaywallPlanFragment on Plan {
1228
- id
1229
- refId
858
+ id: refId
1230
859
  description
1231
860
  displayName
1232
- billingId
1233
861
  product {
1234
- refId
862
+ id: refId
1235
863
  displayName
1236
864
  description
1237
- additionalMetaData
1238
- productSettings {
1239
- downgradePlan {
1240
- refId
1241
- displayName
1242
- }
1243
- }
1244
865
  }
1245
866
  basePlan {
1246
- refId
867
+ id: refId
1247
868
  displayName
1248
869
  }
1249
870
  entitlements {
1250
871
  ...PaywallPackageEntitlementFragment
1251
872
  }
1252
- additionalMetaData
873
+ metadata: additionalMetaData
1253
874
  inheritedEntitlements {
1254
875
  ...PaywallPackageEntitlementFragment
1255
876
  }
1256
877
  prices {
1257
- ...PriceFragment
878
+ ...PaywallPriceFragment
1258
879
  }
1259
880
  pricingType
1260
881
  defaultTrialConfig {
1261
882
  duration
1262
883
  units
1263
884
  }
1264
- compatibleAddons {
1265
- ...PaywallAddonFragment
1266
- }
1267
885
  }
1268
886
  ${exports.PaywallPackageEntitlementFragmentDoc}
1269
- ${exports.PriceFragmentDoc}
1270
- ${exports.PaywallAddonFragmentDoc}`;
1271
- exports.FontVariantFragmentDoc = (0, graphql_tag_1.default) `
1272
- fragment FontVariantFragment on FontVariant {
1273
- fontSize
1274
- fontWeight
1275
- }
1276
- `;
1277
- exports.TypographyConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1278
- fragment TypographyConfigurationFragment on TypographyConfiguration {
1279
- fontFamily
1280
- h1 {
1281
- ...FontVariantFragment
1282
- }
1283
- h2 {
1284
- ...FontVariantFragment
1285
- }
1286
- h3 {
1287
- ...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
1288
895
  }
1289
- body {
1290
- ...FontVariantFragment
896
+ prices {
897
+ ...PaywallPriceFragment
1291
898
  }
899
+ metadata: additionalMetaData
900
+ pricingType
1292
901
  }
1293
- ${exports.FontVariantFragmentDoc}`;
1294
- exports.LayoutConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1295
- fragment LayoutConfigurationFragment on PaywallLayoutConfiguration {
1296
- alignment
1297
- planWidth
1298
- planMargin
1299
- planPadding
1300
- }
1301
- `;
1302
- exports.PaywallConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1303
- fragment PaywallConfigurationFragment on PaywallConfiguration {
1304
- palette {
1305
- primary
1306
- textColor
1307
- backgroundColor
1308
- borderColor
1309
- currentPlanBackground
1310
- }
1311
- typography {
1312
- ...TypographyConfigurationFragment
1313
- }
1314
- layout {
1315
- ...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
1316
910
  }
1317
911
  }
1318
- ${exports.TypographyConfigurationFragmentDoc}
1319
- ${exports.LayoutConfigurationFragmentDoc}`;
912
+ ${exports.CustomerFragmentDoc}`;
1320
913
  exports.ProvisionCustomerDocument = (0, graphql_tag_1.default) `
1321
- mutation provisionCustomer($input: ProvisionCustomerInput!) {
1322
- 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
+ ) {
1323
918
  customer {
1324
919
  ...CustomerFragment
1325
920
  }
1326
- subscriptionDecisionStrategy
921
+ subscriptionStrategyDecision
1327
922
  subscription {
1328
923
  ...SlimSubscriptionFragment
1329
924
  }
@@ -1332,77 +927,69 @@ exports.ProvisionCustomerDocument = (0, graphql_tag_1.default) `
1332
927
  ${exports.CustomerFragmentDoc}
1333
928
  ${exports.SlimSubscriptionFragmentDoc}`;
1334
929
  exports.ImportCustomerDocument = (0, graphql_tag_1.default) `
1335
- mutation importCustomer($input: ImportCustomerInput!) {
1336
- 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
+ ) {
1337
934
  ...CustomerFragment
1338
935
  }
1339
936
  }
1340
937
  ${exports.CustomerFragmentDoc}`;
1341
938
  exports.UpdateCustomerDocument = (0, graphql_tag_1.default) `
1342
- mutation updateCustomer($input: UpdateCustomerInput!) {
1343
- 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
+ ) {
1344
943
  ...CustomerFragment
1345
944
  }
1346
945
  }
1347
946
  ${exports.CustomerFragmentDoc}`;
1348
- exports.ProvisionSubscriptionDocument = (0, graphql_tag_1.default) `
1349
- mutation provisionSubscription($input: ProvisionSubscriptionInput!) {
1350
- provisionSubscriptionV2(input: $input) {
1351
- checkoutUrl
1352
- status
1353
- subscription {
1354
- ...SlimSubscriptionFragment
1355
- }
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
1356
953
  }
1357
954
  }
1358
955
  ${exports.SlimSubscriptionFragmentDoc}`;
1359
- exports.UpdateSubscriptionDocument = (0, graphql_tag_1.default) `
1360
- mutation updateSubscription($input: UpdateSubscriptionInput!) {
1361
- 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
+ ) {
1362
961
  ...SlimSubscriptionFragment
1363
962
  }
1364
963
  }
1365
964
  ${exports.SlimSubscriptionFragmentDoc}`;
1366
965
  exports.CancelSubscriptionDocument = (0, graphql_tag_1.default) `
1367
- mutation cancelSubscription($input: SubscriptionCancellationInput!) {
1368
- cancelSubscription(input: $input) {
966
+ mutation cancelSubscription($endDate: DateTime, $cancellationTime: SubscriptionCancellationTime, $subscriptionId: String!) {
967
+ cancelSubscription(
968
+ input: {subscriptionRefId: $subscriptionId, subscriptionCancellationTime: $cancellationTime, endDate: $endDate}
969
+ ) {
1369
970
  ...SlimSubscriptionFragment
1370
971
  }
1371
972
  }
1372
973
  ${exports.SlimSubscriptionFragmentDoc}`;
1373
974
  exports.InitiateCheckoutDocument = (0, graphql_tag_1.default) `
1374
- mutation initiateCheckout($input: InitiateCheckoutInput!) {
1375
- 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
1376
980
  checkoutUrl
1377
981
  checkoutBillingId
1378
982
  }
1379
983
  }
1380
984
  `;
1381
- exports.EstimateSubscriptionDocument = (0, graphql_tag_1.default) `
1382
- mutation estimateSubscription($input: EstimateSubscriptionInput!) {
1383
- estimateSubscription(input: $input) {
1384
- ...SubscriptionPreviewFragment
1385
- }
1386
- }
1387
- ${exports.SubscriptionPreviewFragmentDoc}`;
1388
- exports.EstimateSubscriptionUpdateDocument = (0, graphql_tag_1.default) `
1389
- mutation estimateSubscriptionUpdate($input: EstimateSubscriptionUpdateInput!) {
1390
- estimateSubscriptionUpdate(input: $input) {
1391
- ...SubscriptionPreviewFragment
1392
- }
1393
- }
1394
- ${exports.SubscriptionPreviewFragmentDoc}`;
1395
- exports.ReportUsageDocument = (0, graphql_tag_1.default) `
1396
- mutation reportUsage($input: UsageMeasurementCreateInput!) {
1397
- createUsageMeasurement(usageMeasurement: $input) {
1398
- id
1399
- }
1400
- }
1401
- `;
1402
985
  exports.GetCustomerByIdDocument = (0, graphql_tag_1.default) `
1403
- query getCustomerById($input: GetCustomerByRefIdInput!) {
1404
- getCustomerByRefId(input: $input) {
1405
- ...CustomerFragment
986
+ query getCustomerById($customerId: String) {
987
+ customers(filter: {refId: {eq: $customerId}}) {
988
+ edges {
989
+ node {
990
+ ...CustomerFragment
991
+ }
992
+ }
1406
993
  }
1407
994
  }
1408
995
  ${exports.CustomerFragmentDoc}`;
@@ -1417,40 +1004,12 @@ exports.GetCouponsDocument = (0, graphql_tag_1.default) `
1417
1004
  }
1418
1005
  }
1419
1006
  ${exports.CouponFragmentDoc}`;
1420
- exports.GetPaywallDocument = (0, graphql_tag_1.default) `
1421
- query getPaywall($input: GetPaywallInput!) {
1422
- paywall(input: $input) {
1423
- plans {
1424
- ...PlanFragment
1425
- }
1426
- configuration {
1427
- ...PaywallConfigurationFragment
1428
- }
1429
- customer {
1430
- ...CustomerFragment
1431
- }
1432
- }
1433
- }
1434
- ${exports.PlanFragmentDoc}
1435
- ${exports.PaywallConfigurationFragmentDoc}
1436
- ${exports.CustomerFragmentDoc}`;
1437
- exports.GetEntitlementsDocument = (0, graphql_tag_1.default) `
1438
- query getEntitlements($query: FetchEntitlementsQuery!) {
1439
- entitlements: cachedEntitlements(query: $query) {
1440
- ...EntitlementFragment
1441
- }
1442
- }
1443
- ${exports.EntitlementFragmentDoc}`;
1444
- exports.GetEntitlementDocument = (0, graphql_tag_1.default) `
1445
- query getEntitlement($query: FetchEntitlementQuery!) {
1446
- entitlement(query: $query) {
1447
- ...EntitlementFragment
1448
- }
1449
- }
1450
- ${exports.EntitlementFragmentDoc}`;
1451
1007
  const defaultWrapper = (action, _operationName, _operationType) => action();
1452
1008
  function getSdk(client, withWrapper = defaultWrapper) {
1453
1009
  return {
1010
+ createCustomer(variables, requestHeaders) {
1011
+ return withWrapper((wrappedRequestHeaders) => client.request(exports.CreateCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createCustomer', 'mutation');
1012
+ },
1454
1013
  provisionCustomer(variables, requestHeaders) {
1455
1014
  return withWrapper((wrappedRequestHeaders) => client.request(exports.ProvisionCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'provisionCustomer', 'mutation');
1456
1015
  },
@@ -1460,41 +1019,23 @@ function getSdk(client, withWrapper = defaultWrapper) {
1460
1019
  updateCustomer(variables, requestHeaders) {
1461
1020
  return withWrapper((wrappedRequestHeaders) => client.request(exports.UpdateCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateCustomer', 'mutation');
1462
1021
  },
1463
- provisionSubscription(variables, requestHeaders) {
1464
- return withWrapper((wrappedRequestHeaders) => client.request(exports.ProvisionSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'provisionSubscription', 'mutation');
1465
- },
1466
1022
  updateSubscription(variables, requestHeaders) {
1467
1023
  return withWrapper((wrappedRequestHeaders) => client.request(exports.UpdateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateSubscription', 'mutation');
1468
1024
  },
1025
+ createSubscription(variables, requestHeaders) {
1026
+ return withWrapper((wrappedRequestHeaders) => client.request(exports.CreateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createSubscription', 'mutation');
1027
+ },
1469
1028
  cancelSubscription(variables, requestHeaders) {
1470
1029
  return withWrapper((wrappedRequestHeaders) => client.request(exports.CancelSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'cancelSubscription', 'mutation');
1471
1030
  },
1472
1031
  initiateCheckout(variables, requestHeaders) {
1473
1032
  return withWrapper((wrappedRequestHeaders) => client.request(exports.InitiateCheckoutDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'initiateCheckout', 'mutation');
1474
1033
  },
1475
- estimateSubscription(variables, requestHeaders) {
1476
- return withWrapper((wrappedRequestHeaders) => client.request(exports.EstimateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'estimateSubscription', 'mutation');
1477
- },
1478
- estimateSubscriptionUpdate(variables, requestHeaders) {
1479
- return withWrapper((wrappedRequestHeaders) => client.request(exports.EstimateSubscriptionUpdateDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'estimateSubscriptionUpdate', 'mutation');
1480
- },
1481
- reportUsage(variables, requestHeaders) {
1482
- return withWrapper((wrappedRequestHeaders) => client.request(exports.ReportUsageDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'reportUsage', 'mutation');
1483
- },
1484
1034
  getCustomerById(variables, requestHeaders) {
1485
1035
  return withWrapper((wrappedRequestHeaders) => client.request(exports.GetCustomerByIdDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCustomerById', 'query');
1486
1036
  },
1487
1037
  getCoupons(variables, requestHeaders) {
1488
1038
  return withWrapper((wrappedRequestHeaders) => client.request(exports.GetCouponsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCoupons', 'query');
1489
- },
1490
- getPaywall(variables, requestHeaders) {
1491
- return withWrapper((wrappedRequestHeaders) => client.request(exports.GetPaywallDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getPaywall', 'query');
1492
- },
1493
- getEntitlements(variables, requestHeaders) {
1494
- return withWrapper((wrappedRequestHeaders) => client.request(exports.GetEntitlementsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEntitlements', 'query');
1495
- },
1496
- getEntitlement(variables, requestHeaders) {
1497
- return withWrapper((wrappedRequestHeaders) => client.request(exports.GetEntitlementDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEntitlement', 'query');
1498
1039
  }
1499
1040
  };
1500
1041
  }