@stigg/api-client-js 0.0.1 → 0.0.2
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.
- package/package.json +1 -1
- package/src/generated/sdk.d.ts +828 -354
- package/src/generated/sdk.js +453 -218
- package/src/generated/sdk.js.map +1 -1
- package/src/lib/client.d.ts +1 -1
- package/src/lib/client.js +2 -1
- package/src/lib/client.js.map +1 -1
package/src/generated/sdk.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
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.ReportUsageDocument = exports.EstimateSubscriptionUpdateDocument = exports.EstimateSubscriptionDocument = exports.InitiateCheckoutDocument = exports.CancelSubscriptionDocument = exports.UpdateSubscriptionDocument = exports.ProvisionSubscriptionDocument = exports.UpdateCustomerDocument = exports.ImportCustomerDocument = exports.ProvisionCustomerDocument = exports.PaywallPlanFragmentDoc = exports.PaywallAddonFragmentDoc = exports.PaywallPackageEntitlementFragmentDoc = exports.EntitlementFragmentDoc = exports.FeatureFragmentDoc = 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 = void 0;
|
|
5
6
|
const graphql_tag_1 = require("graphql-tag");
|
|
6
7
|
/** DenyReason of get access policy */
|
|
7
8
|
var AccessDeniedReason;
|
|
@@ -13,6 +14,11 @@ var AccessDeniedReason;
|
|
|
13
14
|
AccessDeniedReason["RequestedUsageExceedingLimit"] = "RequestedUsageExceedingLimit";
|
|
14
15
|
AccessDeniedReason["Unknown"] = "Unknown";
|
|
15
16
|
})(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 = {}));
|
|
16
22
|
var AddonSortFields;
|
|
17
23
|
(function (AddonSortFields) {
|
|
18
24
|
AddonSortFields["BillingId"] = "billingId";
|
|
@@ -29,6 +35,13 @@ var AddonSortFields;
|
|
|
29
35
|
AddonSortFields["UpdatedAt"] = "updatedAt";
|
|
30
36
|
AddonSortFields["VersionNumber"] = "versionNumber";
|
|
31
37
|
})(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 = {}));
|
|
32
45
|
var ApiKeySortFields;
|
|
33
46
|
(function (ApiKeySortFields) {
|
|
34
47
|
ApiKeySortFields["Id"] = "id";
|
|
@@ -61,6 +74,7 @@ var ChangeType;
|
|
|
61
74
|
ChangeType["Added"] = "ADDED";
|
|
62
75
|
ChangeType["Deleted"] = "DELETED";
|
|
63
76
|
ChangeType["Modified"] = "MODIFIED";
|
|
77
|
+
ChangeType["Reordered"] = "REORDERED";
|
|
64
78
|
})(ChangeType = exports.ChangeType || (exports.ChangeType = {}));
|
|
65
79
|
var CouponSortFields;
|
|
66
80
|
(function (CouponSortFields) {
|
|
@@ -90,6 +104,7 @@ var CouponType;
|
|
|
90
104
|
/** Currency */
|
|
91
105
|
var Currency;
|
|
92
106
|
(function (Currency) {
|
|
107
|
+
Currency["Ils"] = "ILS";
|
|
93
108
|
Currency["Usd"] = "USD";
|
|
94
109
|
})(Currency = exports.Currency || (exports.Currency = {}));
|
|
95
110
|
var CustomerSortFields;
|
|
@@ -99,9 +114,9 @@ var CustomerSortFields;
|
|
|
99
114
|
CustomerSortFields["CrmHubspotCompanyId"] = "crmHubspotCompanyId";
|
|
100
115
|
CustomerSortFields["CrmHubspotCompanyUrl"] = "crmHubspotCompanyUrl";
|
|
101
116
|
CustomerSortFields["CrmId"] = "crmId";
|
|
117
|
+
CustomerSortFields["CustomerId"] = "customerId";
|
|
102
118
|
CustomerSortFields["Email"] = "email";
|
|
103
119
|
CustomerSortFields["EnvironmentId"] = "environmentId";
|
|
104
|
-
CustomerSortFields["ExperimentGroup"] = "experimentGroup";
|
|
105
120
|
CustomerSortFields["Id"] = "id";
|
|
106
121
|
CustomerSortFields["Name"] = "name";
|
|
107
122
|
CustomerSortFields["RefId"] = "refId";
|
|
@@ -118,12 +133,13 @@ var CustomerSubscriptionSortFields;
|
|
|
118
133
|
CustomerSubscriptionSortFields["EffectiveEndDate"] = "effectiveEndDate";
|
|
119
134
|
CustomerSubscriptionSortFields["EndDate"] = "endDate";
|
|
120
135
|
CustomerSubscriptionSortFields["EnvironmentId"] = "environmentId";
|
|
121
|
-
CustomerSubscriptionSortFields["ExperimentGroup"] = "experimentGroup";
|
|
122
136
|
CustomerSubscriptionSortFields["Id"] = "id";
|
|
137
|
+
CustomerSubscriptionSortFields["OldBillingId"] = "oldBillingId";
|
|
123
138
|
CustomerSubscriptionSortFields["PricingType"] = "pricingType";
|
|
124
139
|
CustomerSubscriptionSortFields["RefId"] = "refId";
|
|
125
140
|
CustomerSubscriptionSortFields["StartDate"] = "startDate";
|
|
126
141
|
CustomerSubscriptionSortFields["Status"] = "status";
|
|
142
|
+
CustomerSubscriptionSortFields["SubscriptionId"] = "subscriptionId";
|
|
127
143
|
CustomerSubscriptionSortFields["TrialEndDate"] = "trialEndDate";
|
|
128
144
|
})(CustomerSubscriptionSortFields = exports.CustomerSubscriptionSortFields || (exports.CustomerSubscriptionSortFields = {}));
|
|
129
145
|
/** Entitlement reset period. */
|
|
@@ -139,6 +155,14 @@ var EntitySelectionMode;
|
|
|
139
155
|
EntitySelectionMode["BlackList"] = "BLACK_LIST";
|
|
140
156
|
EntitySelectionMode["WhiteList"] = "WHITE_LIST";
|
|
141
157
|
})(EntitySelectionMode = exports.EntitySelectionMode || (exports.EntitySelectionMode = {}));
|
|
158
|
+
/** EnvironmentProvisionStatus. */
|
|
159
|
+
var EnvironmentProvisionStatus;
|
|
160
|
+
(function (EnvironmentProvisionStatus) {
|
|
161
|
+
EnvironmentProvisionStatus["Done"] = "DONE";
|
|
162
|
+
EnvironmentProvisionStatus["Failed"] = "FAILED";
|
|
163
|
+
EnvironmentProvisionStatus["InProgress"] = "IN_PROGRESS";
|
|
164
|
+
EnvironmentProvisionStatus["NotProvisioned"] = "NOT_PROVISIONED";
|
|
165
|
+
})(EnvironmentProvisionStatus = exports.EnvironmentProvisionStatus || (exports.EnvironmentProvisionStatus = {}));
|
|
142
166
|
var EnvironmentSortFields;
|
|
143
167
|
(function (EnvironmentSortFields) {
|
|
144
168
|
EnvironmentSortFields["CreatedAt"] = "createdAt";
|
|
@@ -153,22 +177,31 @@ var ErrorCode;
|
|
|
153
177
|
ErrorCode["AddonHasToHavePriceError"] = "AddonHasToHavePriceError";
|
|
154
178
|
ErrorCode["AddonNotFound"] = "AddonNotFound";
|
|
155
179
|
ErrorCode["ArchivedCouponCantBeApplied"] = "ArchivedCouponCantBeApplied";
|
|
180
|
+
ErrorCode["AuthCustomerMismatch"] = "AuthCustomerMismatch";
|
|
156
181
|
ErrorCode["BadUserInput"] = "BadUserInput";
|
|
157
182
|
ErrorCode["BillingPeriodMissingError"] = "BillingPeriodMissingError";
|
|
158
183
|
ErrorCode["CannotDeleteCustomerError"] = "CannotDeleteCustomerError";
|
|
159
184
|
ErrorCode["CannotDeleteFeatureError"] = "CannotDeleteFeatureError";
|
|
160
|
-
ErrorCode["
|
|
185
|
+
ErrorCode["CannotEditPackageInNonDraftMode"] = "CannotEditPackageInNonDraftMode";
|
|
161
186
|
ErrorCode["CheckoutIsNotSupported"] = "CheckoutIsNotSupported";
|
|
187
|
+
ErrorCode["CheckoutOptionsMissing"] = "CheckoutOptionsMissing";
|
|
162
188
|
ErrorCode["CouponNotFound"] = "CouponNotFound";
|
|
189
|
+
ErrorCode["CustomerAlreadyHaveCustomerCoupon"] = "CustomerAlreadyHaveCustomerCoupon";
|
|
190
|
+
ErrorCode["CustomerAlreadyUsesCoupon"] = "CustomerAlreadyUsesCoupon";
|
|
163
191
|
ErrorCode["CustomerHasNoPaymentMethod"] = "CustomerHasNoPaymentMethod";
|
|
164
192
|
ErrorCode["CustomerNoBillingId"] = "CustomerNoBillingId";
|
|
165
193
|
ErrorCode["CustomerNotFound"] = "CustomerNotFound";
|
|
194
|
+
ErrorCode["DowngradeBillingPeriodNotSupportedError"] = "DowngradeBillingPeriodNotSupportedError";
|
|
166
195
|
ErrorCode["DraftPlanCantBeArchived"] = "DraftPlanCantBeArchived";
|
|
167
196
|
ErrorCode["DuplicatedEntityNotAllowed"] = "DuplicatedEntityNotAllowed";
|
|
168
197
|
ErrorCode["EditAllowedOnDraftPackageOnlyError"] = "EditAllowedOnDraftPackageOnlyError";
|
|
198
|
+
ErrorCode["EntitlementsMustBelongToSamePackage"] = "EntitlementsMustBelongToSamePackage";
|
|
199
|
+
ErrorCode["EntityIdDifferentFromRefIdError"] = "EntityIdDifferentFromRefIdError";
|
|
169
200
|
ErrorCode["EnvironmentMissing"] = "EnvironmentMissing";
|
|
201
|
+
ErrorCode["ExperimentAlreadyRunning"] = "ExperimentAlreadyRunning";
|
|
170
202
|
ErrorCode["ExperimentNotFoundError"] = "ExperimentNotFoundError";
|
|
171
203
|
ErrorCode["ExperimentStatusError"] = "ExperimentStatusError";
|
|
204
|
+
ErrorCode["FailedToCreateCheckoutSessionError"] = "FailedToCreateCheckoutSessionError";
|
|
172
205
|
ErrorCode["FailedToImportCustomer"] = "FailedToImportCustomer";
|
|
173
206
|
ErrorCode["FeatureNotFound"] = "FeatureNotFound";
|
|
174
207
|
ErrorCode["IdentityForbidden"] = "IdentityForbidden";
|
|
@@ -188,16 +221,26 @@ var ErrorCode;
|
|
|
188
221
|
ErrorCode["MemberInvitationError"] = "MemberInvitationError";
|
|
189
222
|
ErrorCode["MemberNotFound"] = "MemberNotFound";
|
|
190
223
|
ErrorCode["MeteringNotAvailableForFeatureType"] = "MeteringNotAvailableForFeatureType";
|
|
224
|
+
ErrorCode["MissingEntityIdError"] = "MissingEntityIdError";
|
|
191
225
|
ErrorCode["NoFeatureEntitlementInSubscription"] = "NoFeatureEntitlementInSubscription";
|
|
226
|
+
ErrorCode["NoProductsAvailable"] = "NoProductsAvailable";
|
|
227
|
+
ErrorCode["OperationNotAllowedDuringInProgressExperiment"] = "OperationNotAllowedDuringInProgressExperiment";
|
|
192
228
|
ErrorCode["PackageAlreadyPublished"] = "PackageAlreadyPublished";
|
|
193
229
|
ErrorCode["PackagePricingTypeNotSet"] = "PackagePricingTypeNotSet";
|
|
194
230
|
ErrorCode["PlanAlreadyExtended"] = "PlanAlreadyExtended";
|
|
231
|
+
ErrorCode["PlanCannotBePublishWhenBasePlanIsDraft"] = "PlanCannotBePublishWhenBasePlanIsDraft";
|
|
195
232
|
ErrorCode["PlanIsUsedAsDefaultStartPlan"] = "PlanIsUsedAsDefaultStartPlan";
|
|
196
233
|
ErrorCode["PlanIsUsedAsDowngradePlan"] = "PlanIsUsedAsDowngradePlan";
|
|
197
234
|
ErrorCode["PlanNotFound"] = "PlanNotFound";
|
|
198
235
|
ErrorCode["PlanWithChildCantBeDeleted"] = "PlanWithChildCantBeDeleted";
|
|
199
236
|
ErrorCode["PlansCircularDependencyError"] = "PlansCircularDependencyError";
|
|
200
237
|
ErrorCode["PriceNotFound"] = "PriceNotFound";
|
|
238
|
+
ErrorCode["PromotionCodeCustomerNotFirstPurchase"] = "PromotionCodeCustomerNotFirstPurchase";
|
|
239
|
+
ErrorCode["PromotionCodeMaxRedemptionsReached"] = "PromotionCodeMaxRedemptionsReached";
|
|
240
|
+
ErrorCode["PromotionCodeMinimumAmountNotReached"] = "PromotionCodeMinimumAmountNotReached";
|
|
241
|
+
ErrorCode["PromotionCodeNotActive"] = "PromotionCodeNotActive";
|
|
242
|
+
ErrorCode["PromotionCodeNotForCustomer"] = "PromotionCodeNotForCustomer";
|
|
243
|
+
ErrorCode["PromotionCodeNotFound"] = "PromotionCodeNotFound";
|
|
201
244
|
ErrorCode["RateLimitExceeded"] = "RateLimitExceeded";
|
|
202
245
|
ErrorCode["ResyncAlreadyInProgress"] = "ResyncAlreadyInProgress";
|
|
203
246
|
ErrorCode["SelectedBillingModelDoesntMatchImportedItemError"] = "SelectedBillingModelDoesntMatchImportedItemError";
|
|
@@ -212,6 +255,7 @@ var ErrorCode;
|
|
|
212
255
|
ErrorCode["UncompatibleSubscriptionAddon"] = "UncompatibleSubscriptionAddon";
|
|
213
256
|
ErrorCode["UnexpectedError"] = "UnexpectedError";
|
|
214
257
|
ErrorCode["UnsupportedFeatureType"] = "UnsupportedFeatureType";
|
|
258
|
+
ErrorCode["UnsupportedSubscriptionScheduleType"] = "UnsupportedSubscriptionScheduleType";
|
|
215
259
|
ErrorCode["UnsupportedVendorIdentifier"] = "UnsupportedVendorIdentifier";
|
|
216
260
|
})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
|
|
217
261
|
/** EventLogType */
|
|
@@ -228,10 +272,12 @@ var EventLogType;
|
|
|
228
272
|
EventLogType["CustomerDeleted"] = "CUSTOMER_DELETED";
|
|
229
273
|
EventLogType["CustomerPaymentFailed"] = "CUSTOMER_PAYMENT_FAILED";
|
|
230
274
|
EventLogType["CustomerUpdated"] = "CUSTOMER_UPDATED";
|
|
275
|
+
EventLogType["EdgeApiDataResync"] = "EDGE_API_DATA_RESYNC";
|
|
231
276
|
EventLogType["EntitlementsUpdated"] = "ENTITLEMENTS_UPDATED";
|
|
232
277
|
EventLogType["EntitlementDenied"] = "ENTITLEMENT_DENIED";
|
|
233
278
|
EventLogType["EntitlementGranted"] = "ENTITLEMENT_GRANTED";
|
|
234
279
|
EventLogType["EntitlementRequested"] = "ENTITLEMENT_REQUESTED";
|
|
280
|
+
EventLogType["EnvironmentDeleted"] = "ENVIRONMENT_DELETED";
|
|
235
281
|
EventLogType["FeatureCreated"] = "FEATURE_CREATED";
|
|
236
282
|
EventLogType["FeatureDeleted"] = "FEATURE_DELETED";
|
|
237
283
|
EventLogType["FeatureUpdated"] = "FEATURE_UPDATED";
|
|
@@ -242,6 +288,9 @@ var EventLogType;
|
|
|
242
288
|
EventLogType["PlanCreated"] = "PLAN_CREATED";
|
|
243
289
|
EventLogType["PlanDeleted"] = "PLAN_DELETED";
|
|
244
290
|
EventLogType["PlanUpdated"] = "PLAN_UPDATED";
|
|
291
|
+
EventLogType["ProductCreated"] = "PRODUCT_CREATED";
|
|
292
|
+
EventLogType["ProductDeleted"] = "PRODUCT_DELETED";
|
|
293
|
+
EventLogType["ProductUpdated"] = "PRODUCT_UPDATED";
|
|
245
294
|
EventLogType["PromotionalEntitlementExpired"] = "PROMOTIONAL_ENTITLEMENT_EXPIRED";
|
|
246
295
|
EventLogType["PromotionalEntitlementGranted"] = "PROMOTIONAL_ENTITLEMENT_GRANTED";
|
|
247
296
|
EventLogType["PromotionalEntitlementRevoked"] = "PROMOTIONAL_ENTITLEMENT_REVOKED";
|
|
@@ -257,13 +306,8 @@ var EventLogType;
|
|
|
257
306
|
EventLogType["SubscriptionUpdated"] = "SUBSCRIPTION_UPDATED";
|
|
258
307
|
EventLogType["SubscriptionUsageUpdated"] = "SUBSCRIPTION_USAGE_UPDATED";
|
|
259
308
|
EventLogType["SyncFailed"] = "SYNC_FAILED";
|
|
309
|
+
EventLogType["WidgetConfigurationUpdated"] = "WIDGET_CONFIGURATION_UPDATED";
|
|
260
310
|
})(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 = {}));
|
|
267
311
|
var ExperimentSortFields;
|
|
268
312
|
(function (ExperimentSortFields) {
|
|
269
313
|
ExperimentSortFields["CreatedAt"] = "createdAt";
|
|
@@ -307,6 +351,12 @@ var FeatureType;
|
|
|
307
351
|
FeatureType["Boolean"] = "BOOLEAN";
|
|
308
352
|
FeatureType["Number"] = "NUMBER";
|
|
309
353
|
})(FeatureType = exports.FeatureType || (exports.FeatureType = {}));
|
|
354
|
+
/** Font weight */
|
|
355
|
+
var FontWeight;
|
|
356
|
+
(function (FontWeight) {
|
|
357
|
+
FontWeight["Bold"] = "BOLD";
|
|
358
|
+
FontWeight["Normal"] = "NORMAL";
|
|
359
|
+
})(FontWeight = exports.FontWeight || (exports.FontWeight = {}));
|
|
310
360
|
var HookSortFields;
|
|
311
361
|
(function (HookSortFields) {
|
|
312
362
|
HookSortFields["CreatedAt"] = "createdAt";
|
|
@@ -415,6 +465,7 @@ var PlanSortFields;
|
|
|
415
465
|
})(PlanSortFields = exports.PlanSortFields || (exports.PlanSortFields = {}));
|
|
416
466
|
var PriceSortFields;
|
|
417
467
|
(function (PriceSortFields) {
|
|
468
|
+
PriceSortFields["BillingId"] = "billingId";
|
|
418
469
|
PriceSortFields["BillingModel"] = "billingModel";
|
|
419
470
|
PriceSortFields["BillingPeriod"] = "billingPeriod";
|
|
420
471
|
PriceSortFields["CreatedAt"] = "createdAt";
|
|
@@ -463,6 +514,17 @@ var PromotionalEntitlementStatus;
|
|
|
463
514
|
PromotionalEntitlementStatus["Expired"] = "Expired";
|
|
464
515
|
PromotionalEntitlementStatus["Paused"] = "Paused";
|
|
465
516
|
})(PromotionalEntitlementStatus = exports.PromotionalEntitlementStatus || (exports.PromotionalEntitlementStatus = {}));
|
|
517
|
+
var ProrationBehavior;
|
|
518
|
+
(function (ProrationBehavior) {
|
|
519
|
+
ProrationBehavior["CreateProrations"] = "CREATE_PRORATIONS";
|
|
520
|
+
ProrationBehavior["InvoiceImmediately"] = "INVOICE_IMMEDIATELY";
|
|
521
|
+
})(ProrationBehavior = exports.ProrationBehavior || (exports.ProrationBehavior = {}));
|
|
522
|
+
/** Provision subscription status */
|
|
523
|
+
var ProvisionSubscriptionStatus;
|
|
524
|
+
(function (ProvisionSubscriptionStatus) {
|
|
525
|
+
ProvisionSubscriptionStatus["PaymentRequired"] = "PAYMENT_REQUIRED";
|
|
526
|
+
ProvisionSubscriptionStatus["Success"] = "SUCCESS";
|
|
527
|
+
})(ProvisionSubscriptionStatus = exports.ProvisionSubscriptionStatus || (exports.ProvisionSubscriptionStatus = {}));
|
|
466
528
|
/** PublishMigrationType */
|
|
467
529
|
var PublishMigrationType;
|
|
468
530
|
(function (PublishMigrationType) {
|
|
@@ -512,11 +574,27 @@ var SubscriptionCancellationTime;
|
|
|
512
574
|
SubscriptionCancellationTime["Immediate"] = "IMMEDIATE";
|
|
513
575
|
SubscriptionCancellationTime["SpecificDate"] = "SPECIFIC_DATE";
|
|
514
576
|
})(SubscriptionCancellationTime = exports.SubscriptionCancellationTime || (exports.SubscriptionCancellationTime = {}));
|
|
577
|
+
/** Subscription decision strategy */
|
|
578
|
+
var SubscriptionDecisionStrategy;
|
|
579
|
+
(function (SubscriptionDecisionStrategy) {
|
|
580
|
+
SubscriptionDecisionStrategy["PredefinedFreePlan"] = "PREDEFINED_FREE_PLAN";
|
|
581
|
+
SubscriptionDecisionStrategy["PredefinedTrialPlan"] = "PREDEFINED_TRIAL_PLAN";
|
|
582
|
+
SubscriptionDecisionStrategy["RequestedPlan"] = "REQUESTED_PLAN";
|
|
583
|
+
SubscriptionDecisionStrategy["SkippedSubscriptionCreation"] = "SKIPPED_SUBSCRIPTION_CREATION";
|
|
584
|
+
})(SubscriptionDecisionStrategy = exports.SubscriptionDecisionStrategy || (exports.SubscriptionDecisionStrategy = {}));
|
|
515
585
|
var SubscriptionEndSetup;
|
|
516
586
|
(function (SubscriptionEndSetup) {
|
|
517
587
|
SubscriptionEndSetup["CancelSubscription"] = "CANCEL_SUBSCRIPTION";
|
|
518
588
|
SubscriptionEndSetup["DowngradeToFree"] = "DOWNGRADE_TO_FREE";
|
|
519
589
|
})(SubscriptionEndSetup = exports.SubscriptionEndSetup || (exports.SubscriptionEndSetup = {}));
|
|
590
|
+
var SubscriptionEntitlementSortFields;
|
|
591
|
+
(function (SubscriptionEntitlementSortFields) {
|
|
592
|
+
SubscriptionEntitlementSortFields["CreatedAt"] = "createdAt";
|
|
593
|
+
SubscriptionEntitlementSortFields["EnvironmentId"] = "environmentId";
|
|
594
|
+
SubscriptionEntitlementSortFields["Id"] = "id";
|
|
595
|
+
SubscriptionEntitlementSortFields["SubscriptionId"] = "subscriptionId";
|
|
596
|
+
SubscriptionEntitlementSortFields["UpdatedAt"] = "updatedAt";
|
|
597
|
+
})(SubscriptionEntitlementSortFields = exports.SubscriptionEntitlementSortFields || (exports.SubscriptionEntitlementSortFields = {}));
|
|
520
598
|
var SubscriptionMigrationTaskSortFields;
|
|
521
599
|
(function (SubscriptionMigrationTaskSortFields) {
|
|
522
600
|
SubscriptionMigrationTaskSortFields["CreatedAt"] = "createdAt";
|
|
@@ -532,6 +610,21 @@ var SubscriptionPriceSortFields;
|
|
|
532
610
|
SubscriptionPriceSortFields["UpdatedAt"] = "updatedAt";
|
|
533
611
|
SubscriptionPriceSortFields["UsageLimit"] = "usageLimit";
|
|
534
612
|
})(SubscriptionPriceSortFields = exports.SubscriptionPriceSortFields || (exports.SubscriptionPriceSortFields = {}));
|
|
613
|
+
/** Subscription scheduled schedule status */
|
|
614
|
+
var SubscriptionScheduleStatus;
|
|
615
|
+
(function (SubscriptionScheduleStatus) {
|
|
616
|
+
SubscriptionScheduleStatus["Canceled"] = "Canceled";
|
|
617
|
+
SubscriptionScheduleStatus["Done"] = "Done";
|
|
618
|
+
SubscriptionScheduleStatus["Failed"] = "Failed";
|
|
619
|
+
SubscriptionScheduleStatus["Scheduled"] = "Scheduled";
|
|
620
|
+
})(SubscriptionScheduleStatus = exports.SubscriptionScheduleStatus || (exports.SubscriptionScheduleStatus = {}));
|
|
621
|
+
/** Subscription scheduled schedule type */
|
|
622
|
+
var SubscriptionScheduleType;
|
|
623
|
+
(function (SubscriptionScheduleType) {
|
|
624
|
+
SubscriptionScheduleType["BillingPeriod"] = "BillingPeriod";
|
|
625
|
+
SubscriptionScheduleType["Downgrade"] = "Downgrade";
|
|
626
|
+
SubscriptionScheduleType["UnitAmount"] = "UnitAmount";
|
|
627
|
+
})(SubscriptionScheduleType = exports.SubscriptionScheduleType || (exports.SubscriptionScheduleType = {}));
|
|
535
628
|
var SubscriptionStartSetup;
|
|
536
629
|
(function (SubscriptionStartSetup) {
|
|
537
630
|
SubscriptionStartSetup["FreePlan"] = "FREE_PLAN";
|
|
@@ -548,14 +641,6 @@ var SubscriptionStatus;
|
|
|
548
641
|
SubscriptionStatus["NotStarted"] = "NOT_STARTED";
|
|
549
642
|
SubscriptionStatus["PaymentPending"] = "PAYMENT_PENDING";
|
|
550
643
|
})(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 = {}));
|
|
559
644
|
/** Status of the integration sync */
|
|
560
645
|
var SyncStatus;
|
|
561
646
|
(function (SyncStatus) {
|
|
@@ -609,30 +694,36 @@ var WeeklyAccordingTo;
|
|
|
609
694
|
WeeklyAccordingTo["EveryWednesday"] = "EveryWednesday";
|
|
610
695
|
WeeklyAccordingTo["SubscriptionStart"] = "SubscriptionStart";
|
|
611
696
|
})(WeeklyAccordingTo = exports.WeeklyAccordingTo || (exports.WeeklyAccordingTo = {}));
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
697
|
+
/** The widget type */
|
|
698
|
+
var WidgetType;
|
|
699
|
+
(function (WidgetType) {
|
|
700
|
+
WidgetType["CustomerPortal"] = "CUSTOMER_PORTAL";
|
|
701
|
+
WidgetType["Paywall"] = "PAYWALL";
|
|
702
|
+
})(WidgetType = exports.WidgetType || (exports.WidgetType = {}));
|
|
703
|
+
/** The group of the experiment */
|
|
704
|
+
var ExperimentGroupType;
|
|
705
|
+
(function (ExperimentGroupType) {
|
|
706
|
+
ExperimentGroupType["Control"] = "CONTROL";
|
|
707
|
+
ExperimentGroupType["Variant"] = "VARIANT";
|
|
708
|
+
})(ExperimentGroupType = exports.ExperimentGroupType || (exports.ExperimentGroupType = {}));
|
|
623
709
|
exports.PriceFragmentDoc = (0, graphql_tag_1.default) `
|
|
624
710
|
fragment PriceFragment on Price {
|
|
625
711
|
billingModel
|
|
626
712
|
billingPeriod
|
|
713
|
+
billingId
|
|
714
|
+
minUnitQuantity
|
|
715
|
+
maxUnitQuantity
|
|
627
716
|
price {
|
|
628
717
|
amount
|
|
629
718
|
currency
|
|
630
719
|
}
|
|
631
720
|
feature {
|
|
632
|
-
|
|
721
|
+
featureUnits
|
|
722
|
+
featureUnitsPlural
|
|
723
|
+
displayName
|
|
633
724
|
}
|
|
634
725
|
}
|
|
635
|
-
|
|
726
|
+
`;
|
|
636
727
|
exports.TotalPriceFragmentDoc = (0, graphql_tag_1.default) `
|
|
637
728
|
fragment TotalPriceFragment on CustomerSubscriptionTotalPrice {
|
|
638
729
|
subTotal {
|
|
@@ -645,6 +736,94 @@ exports.TotalPriceFragmentDoc = (0, graphql_tag_1.default) `
|
|
|
645
736
|
}
|
|
646
737
|
}
|
|
647
738
|
`;
|
|
739
|
+
exports.SlimSubscriptionFragmentDoc = (0, graphql_tag_1.default) `
|
|
740
|
+
fragment SlimSubscriptionFragment on CustomerSubscription {
|
|
741
|
+
id
|
|
742
|
+
refId
|
|
743
|
+
status
|
|
744
|
+
additionalMetaData
|
|
745
|
+
billingId
|
|
746
|
+
billingLinkUrl
|
|
747
|
+
effectiveEndDate
|
|
748
|
+
currentBillingPeriodEnd
|
|
749
|
+
pricingType
|
|
750
|
+
experimentInfo {
|
|
751
|
+
name
|
|
752
|
+
id
|
|
753
|
+
groupName
|
|
754
|
+
groupType
|
|
755
|
+
}
|
|
756
|
+
prices {
|
|
757
|
+
usageLimit
|
|
758
|
+
price {
|
|
759
|
+
...PriceFragment
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
totalPrice {
|
|
763
|
+
...TotalPriceFragment
|
|
764
|
+
}
|
|
765
|
+
plan {
|
|
766
|
+
id
|
|
767
|
+
refId
|
|
768
|
+
}
|
|
769
|
+
addons {
|
|
770
|
+
quantity
|
|
771
|
+
addon {
|
|
772
|
+
id
|
|
773
|
+
refId
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
customer {
|
|
777
|
+
id
|
|
778
|
+
refId
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
${exports.PriceFragmentDoc}
|
|
782
|
+
${exports.TotalPriceFragmentDoc}`;
|
|
783
|
+
exports.CouponFragmentDoc = (0, graphql_tag_1.default) `
|
|
784
|
+
fragment CouponFragment on Coupon {
|
|
785
|
+
id
|
|
786
|
+
discountValue
|
|
787
|
+
type
|
|
788
|
+
additionalMetaData
|
|
789
|
+
refId
|
|
790
|
+
name
|
|
791
|
+
description
|
|
792
|
+
createdAt
|
|
793
|
+
updatedAt
|
|
794
|
+
billingId
|
|
795
|
+
billingLinkUrl
|
|
796
|
+
type
|
|
797
|
+
status
|
|
798
|
+
syncStates {
|
|
799
|
+
vendorIdentifier
|
|
800
|
+
status
|
|
801
|
+
}
|
|
802
|
+
customers {
|
|
803
|
+
id
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
`;
|
|
807
|
+
exports.PromotionalEntitlementFragmentDoc = (0, graphql_tag_1.default) `
|
|
808
|
+
fragment PromotionalEntitlementFragment on PromotionalEntitlement {
|
|
809
|
+
status
|
|
810
|
+
usageLimit
|
|
811
|
+
featureId
|
|
812
|
+
hasUnlimitedUsage
|
|
813
|
+
resetPeriod
|
|
814
|
+
endDate
|
|
815
|
+
isVisible
|
|
816
|
+
feature {
|
|
817
|
+
featureType
|
|
818
|
+
meterType
|
|
819
|
+
featureUnits
|
|
820
|
+
featureUnitsPlural
|
|
821
|
+
displayName
|
|
822
|
+
description
|
|
823
|
+
refId
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
`;
|
|
648
827
|
exports.PackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
|
|
649
828
|
fragment PackageEntitlementFragment on PackageEntitlement {
|
|
650
829
|
usageLimit
|
|
@@ -652,16 +831,24 @@ exports.PackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
|
|
|
652
831
|
featureId
|
|
653
832
|
resetPeriod
|
|
654
833
|
feature {
|
|
655
|
-
|
|
834
|
+
featureType
|
|
835
|
+
meterType
|
|
836
|
+
featureUnits
|
|
837
|
+
featureUnitsPlural
|
|
838
|
+
displayName
|
|
839
|
+
description
|
|
840
|
+
refId
|
|
656
841
|
}
|
|
657
842
|
}
|
|
658
|
-
|
|
843
|
+
`;
|
|
659
844
|
exports.AddonFragmentDoc = (0, graphql_tag_1.default) `
|
|
660
845
|
fragment AddonFragment on Addon {
|
|
661
|
-
id
|
|
846
|
+
id
|
|
847
|
+
refId
|
|
848
|
+
billingId
|
|
662
849
|
displayName
|
|
663
850
|
description
|
|
664
|
-
|
|
851
|
+
additionalMetaData
|
|
665
852
|
entitlements {
|
|
666
853
|
...PackageEntitlementFragment
|
|
667
854
|
}
|
|
@@ -670,17 +857,27 @@ exports.AddonFragmentDoc = (0, graphql_tag_1.default) `
|
|
|
670
857
|
${exports.PackageEntitlementFragmentDoc}`;
|
|
671
858
|
exports.PlanFragmentDoc = (0, graphql_tag_1.default) `
|
|
672
859
|
fragment PlanFragment on Plan {
|
|
673
|
-
id
|
|
860
|
+
id
|
|
861
|
+
refId
|
|
674
862
|
displayName
|
|
675
863
|
description
|
|
676
|
-
|
|
864
|
+
billingId
|
|
865
|
+
additionalMetaData
|
|
677
866
|
product {
|
|
678
|
-
|
|
867
|
+
refId
|
|
679
868
|
displayName
|
|
680
869
|
description
|
|
870
|
+
additionalMetaData
|
|
871
|
+
productSettings {
|
|
872
|
+
downgradePlan {
|
|
873
|
+
refId
|
|
874
|
+
displayName
|
|
875
|
+
}
|
|
876
|
+
}
|
|
681
877
|
}
|
|
682
878
|
basePlan {
|
|
683
|
-
id
|
|
879
|
+
id
|
|
880
|
+
refId
|
|
684
881
|
displayName
|
|
685
882
|
}
|
|
686
883
|
entitlements {
|
|
@@ -706,17 +903,24 @@ ${exports.AddonFragmentDoc}
|
|
|
706
903
|
${exports.PriceFragmentDoc}`;
|
|
707
904
|
exports.SubscriptionFragmentDoc = (0, graphql_tag_1.default) `
|
|
708
905
|
fragment SubscriptionFragment on CustomerSubscription {
|
|
709
|
-
id
|
|
710
|
-
status
|
|
906
|
+
id
|
|
711
907
|
startDate
|
|
712
908
|
endDate
|
|
713
909
|
trialEndDate
|
|
714
910
|
cancellationDate
|
|
715
911
|
effectiveEndDate
|
|
912
|
+
status
|
|
913
|
+
refId
|
|
716
914
|
currentBillingPeriodEnd
|
|
717
|
-
|
|
915
|
+
additionalMetaData
|
|
718
916
|
billingId
|
|
719
917
|
billingLinkUrl
|
|
918
|
+
experimentInfo {
|
|
919
|
+
name
|
|
920
|
+
groupType
|
|
921
|
+
groupName
|
|
922
|
+
id
|
|
923
|
+
}
|
|
720
924
|
prices {
|
|
721
925
|
usageLimit
|
|
722
926
|
price {
|
|
@@ -742,92 +946,103 @@ exports.SubscriptionFragmentDoc = (0, graphql_tag_1.default) `
|
|
|
742
946
|
${exports.TotalPriceFragmentDoc}
|
|
743
947
|
${exports.PlanFragmentDoc}
|
|
744
948
|
${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
|
-
`;
|
|
774
949
|
exports.CustomerFragmentDoc = (0, graphql_tag_1.default) `
|
|
775
950
|
fragment CustomerFragment on Customer {
|
|
776
|
-
id
|
|
951
|
+
id
|
|
777
952
|
name
|
|
778
953
|
email
|
|
779
954
|
createdAt
|
|
780
955
|
updatedAt
|
|
781
|
-
|
|
782
|
-
|
|
956
|
+
hasPaymentMethod
|
|
957
|
+
refId
|
|
958
|
+
billingId
|
|
959
|
+
defaultPaymentExpirationMonth
|
|
960
|
+
defaultPaymentExpirationYear
|
|
961
|
+
defaultPaymentMethodLast4Digits
|
|
962
|
+
additionalMetaData
|
|
963
|
+
trialedPlans {
|
|
964
|
+
productRefId
|
|
965
|
+
planRefId
|
|
783
966
|
}
|
|
784
|
-
|
|
785
|
-
|
|
967
|
+
experimentInfo {
|
|
968
|
+
groupType
|
|
969
|
+
groupName
|
|
970
|
+
id
|
|
971
|
+
name
|
|
786
972
|
}
|
|
787
|
-
hasPaymentMethod
|
|
788
973
|
coupon {
|
|
789
974
|
...CouponFragment
|
|
790
975
|
}
|
|
791
|
-
|
|
792
|
-
|
|
976
|
+
promotionalEntitlements {
|
|
977
|
+
...PromotionalEntitlementFragment
|
|
978
|
+
}
|
|
979
|
+
subscriptions {
|
|
980
|
+
...SubscriptionFragment
|
|
981
|
+
}
|
|
793
982
|
}
|
|
794
|
-
${exports.
|
|
983
|
+
${exports.CouponFragmentDoc}
|
|
795
984
|
${exports.PromotionalEntitlementFragmentDoc}
|
|
796
|
-
${exports.
|
|
797
|
-
exports.
|
|
798
|
-
fragment
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
billingId
|
|
803
|
-
billingLinkUrl
|
|
804
|
-
effectiveEndDate
|
|
805
|
-
currentBillingPeriodEnd
|
|
806
|
-
pricingType
|
|
807
|
-
prices {
|
|
808
|
-
usageLimit
|
|
809
|
-
price {
|
|
810
|
-
...PriceFragment
|
|
811
|
-
}
|
|
985
|
+
${exports.SubscriptionFragmentDoc}`;
|
|
986
|
+
exports.SubscriptionPreviewFragmentDoc = (0, graphql_tag_1.default) `
|
|
987
|
+
fragment SubscriptionPreviewFragment on SubscriptionPreview {
|
|
988
|
+
subTotal {
|
|
989
|
+
amount
|
|
990
|
+
currency
|
|
812
991
|
}
|
|
813
|
-
|
|
814
|
-
|
|
992
|
+
total {
|
|
993
|
+
amount
|
|
994
|
+
currency
|
|
815
995
|
}
|
|
816
|
-
|
|
817
|
-
|
|
996
|
+
billingPeriodRange {
|
|
997
|
+
start
|
|
998
|
+
end
|
|
818
999
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
1000
|
+
proration {
|
|
1001
|
+
prorationDate
|
|
1002
|
+
credit {
|
|
1003
|
+
amount
|
|
1004
|
+
currency
|
|
1005
|
+
}
|
|
1006
|
+
debit {
|
|
1007
|
+
amount
|
|
1008
|
+
currency
|
|
823
1009
|
}
|
|
824
1010
|
}
|
|
825
|
-
|
|
826
|
-
|
|
1011
|
+
}
|
|
1012
|
+
`;
|
|
1013
|
+
exports.FeatureFragmentDoc = (0, graphql_tag_1.default) `
|
|
1014
|
+
fragment FeatureFragment on EntitlementFeature {
|
|
1015
|
+
featureType
|
|
1016
|
+
meterType
|
|
1017
|
+
featureUnits
|
|
1018
|
+
featureUnitsPlural
|
|
1019
|
+
refId
|
|
1020
|
+
}
|
|
1021
|
+
`;
|
|
1022
|
+
exports.EntitlementFragmentDoc = (0, graphql_tag_1.default) `
|
|
1023
|
+
fragment EntitlementFragment on Entitlement {
|
|
1024
|
+
isGranted
|
|
1025
|
+
accessDeniedReason
|
|
1026
|
+
customerId
|
|
1027
|
+
usageLimit
|
|
1028
|
+
hasUnlimitedUsage
|
|
1029
|
+
currentUsage
|
|
1030
|
+
requestedUsage
|
|
1031
|
+
nextResetDate
|
|
1032
|
+
resetPeriod
|
|
1033
|
+
resetPeriodConfiguration {
|
|
1034
|
+
... on MonthlyResetPeriodConfig {
|
|
1035
|
+
monthlyAccordingTo
|
|
1036
|
+
}
|
|
1037
|
+
... on WeeklyResetPeriodConfig {
|
|
1038
|
+
weeklyAccordingTo
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
feature {
|
|
1042
|
+
...FeatureFragment
|
|
827
1043
|
}
|
|
828
1044
|
}
|
|
829
|
-
${exports.
|
|
830
|
-
${exports.TotalPriceFragmentDoc}`;
|
|
1045
|
+
${exports.FeatureFragmentDoc}`;
|
|
831
1046
|
exports.PaywallPackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
|
|
832
1047
|
fragment PaywallPackageEntitlementFragment on PackageEntitlement {
|
|
833
1048
|
usageLimit
|
|
@@ -835,89 +1050,87 @@ exports.PaywallPackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
|
|
|
835
1050
|
featureId
|
|
836
1051
|
resetPeriod
|
|
837
1052
|
feature {
|
|
838
|
-
|
|
1053
|
+
featureType
|
|
1054
|
+
meterType
|
|
1055
|
+
featureUnits
|
|
1056
|
+
featureUnitsPlural
|
|
1057
|
+
displayName
|
|
1058
|
+
description
|
|
1059
|
+
refId
|
|
839
1060
|
}
|
|
840
1061
|
}
|
|
841
|
-
|
|
842
|
-
exports.
|
|
843
|
-
fragment
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
1062
|
+
`;
|
|
1063
|
+
exports.PaywallAddonFragmentDoc = (0, graphql_tag_1.default) `
|
|
1064
|
+
fragment PaywallAddonFragment on Addon {
|
|
1065
|
+
id
|
|
1066
|
+
refId
|
|
1067
|
+
billingId
|
|
1068
|
+
displayName
|
|
1069
|
+
description
|
|
1070
|
+
entitlements {
|
|
1071
|
+
...PaywallPackageEntitlementFragment
|
|
849
1072
|
}
|
|
850
|
-
|
|
851
|
-
...
|
|
1073
|
+
prices {
|
|
1074
|
+
...PriceFragment
|
|
852
1075
|
}
|
|
1076
|
+
additionalMetaData
|
|
1077
|
+
pricingType
|
|
853
1078
|
}
|
|
854
|
-
${exports.
|
|
1079
|
+
${exports.PaywallPackageEntitlementFragmentDoc}
|
|
1080
|
+
${exports.PriceFragmentDoc}`;
|
|
855
1081
|
exports.PaywallPlanFragmentDoc = (0, graphql_tag_1.default) `
|
|
856
1082
|
fragment PaywallPlanFragment on Plan {
|
|
857
|
-
id
|
|
1083
|
+
id
|
|
1084
|
+
refId
|
|
858
1085
|
description
|
|
859
1086
|
displayName
|
|
1087
|
+
billingId
|
|
860
1088
|
product {
|
|
861
|
-
|
|
1089
|
+
refId
|
|
862
1090
|
displayName
|
|
863
1091
|
description
|
|
1092
|
+
additionalMetaData
|
|
1093
|
+
productSettings {
|
|
1094
|
+
downgradePlan {
|
|
1095
|
+
refId
|
|
1096
|
+
displayName
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
864
1099
|
}
|
|
865
1100
|
basePlan {
|
|
866
|
-
id
|
|
1101
|
+
id
|
|
1102
|
+
refId
|
|
867
1103
|
displayName
|
|
868
1104
|
}
|
|
869
1105
|
entitlements {
|
|
870
1106
|
...PaywallPackageEntitlementFragment
|
|
871
1107
|
}
|
|
872
|
-
|
|
1108
|
+
additionalMetaData
|
|
873
1109
|
inheritedEntitlements {
|
|
874
1110
|
...PaywallPackageEntitlementFragment
|
|
875
1111
|
}
|
|
876
1112
|
prices {
|
|
877
|
-
...
|
|
1113
|
+
...PriceFragment
|
|
878
1114
|
}
|
|
879
1115
|
pricingType
|
|
880
1116
|
defaultTrialConfig {
|
|
881
1117
|
duration
|
|
882
1118
|
units
|
|
883
1119
|
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
${exports.PaywallPriceFragmentDoc}`;
|
|
887
|
-
exports.PaywallAddonFragmentDoc = (0, graphql_tag_1.default) `
|
|
888
|
-
fragment PaywallAddonFragment on Addon {
|
|
889
|
-
id: refId
|
|
890
|
-
displayName
|
|
891
|
-
description
|
|
892
|
-
entitlements {
|
|
893
|
-
...PaywallPackageEntitlementFragment
|
|
894
|
-
}
|
|
895
|
-
prices {
|
|
896
|
-
...PaywallPriceFragment
|
|
1120
|
+
compatibleAddons {
|
|
1121
|
+
...PaywallAddonFragment
|
|
897
1122
|
}
|
|
898
|
-
metadata: additionalMetaData
|
|
899
|
-
pricingType
|
|
900
1123
|
}
|
|
901
1124
|
${exports.PaywallPackageEntitlementFragmentDoc}
|
|
902
|
-
${exports.
|
|
903
|
-
exports.
|
|
904
|
-
mutation createCustomer($customerId: String!, $email: String, $name: String, $billingInfo: CustomerBillingInfo, $metadata: JSON, $couponId: String, $shouldSyncFree: Boolean = true) {
|
|
905
|
-
createCustomer: createOneCustomer(
|
|
906
|
-
input: {refId: $customerId, additionalMetaData: $metadata, billingInformation: $billingInfo, couponRefId: $couponId, email: $email, name: $name, shouldSyncFree: $shouldSyncFree}
|
|
907
|
-
) {
|
|
908
|
-
...CustomerFragment
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
${exports.CustomerFragmentDoc}`;
|
|
1125
|
+
${exports.PriceFragmentDoc}
|
|
1126
|
+
${exports.PaywallAddonFragmentDoc}`;
|
|
912
1127
|
exports.ProvisionCustomerDocument = (0, graphql_tag_1.default) `
|
|
913
|
-
mutation provisionCustomer($
|
|
914
|
-
provisionCustomer(
|
|
915
|
-
input: {refId: $customerId, additionalMetaData: $metadata, billingInformation: $billingInfo, couponRefId: $couponId, email: $email, name: $name, shouldSyncFree: $shouldSyncFree, subscriptionParams: $subscriptionParams}
|
|
916
|
-
) {
|
|
1128
|
+
mutation provisionCustomer($input: ProvisionCustomerInput!) {
|
|
1129
|
+
provisionCustomer(input: $input) {
|
|
917
1130
|
customer {
|
|
918
1131
|
...CustomerFragment
|
|
919
1132
|
}
|
|
920
|
-
|
|
1133
|
+
subscriptionDecisionStrategy
|
|
921
1134
|
subscription {
|
|
922
1135
|
...SlimSubscriptionFragment
|
|
923
1136
|
}
|
|
@@ -926,91 +1139,80 @@ exports.ProvisionCustomerDocument = (0, graphql_tag_1.default) `
|
|
|
926
1139
|
${exports.CustomerFragmentDoc}
|
|
927
1140
|
${exports.SlimSubscriptionFragmentDoc}`;
|
|
928
1141
|
exports.ImportCustomerDocument = (0, graphql_tag_1.default) `
|
|
929
|
-
mutation importCustomer($
|
|
930
|
-
importCustomer: importOneCustomer(
|
|
931
|
-
input: {refId: $customerId, billingId: $billingId, email: $email, name: $name}
|
|
932
|
-
) {
|
|
1142
|
+
mutation importCustomer($input: ImportCustomerInput!) {
|
|
1143
|
+
importCustomer: importOneCustomer(input: $input) {
|
|
933
1144
|
...CustomerFragment
|
|
934
1145
|
}
|
|
935
1146
|
}
|
|
936
1147
|
${exports.CustomerFragmentDoc}`;
|
|
937
1148
|
exports.UpdateCustomerDocument = (0, graphql_tag_1.default) `
|
|
938
|
-
mutation updateCustomer($
|
|
939
|
-
updateCustomer: updateOneCustomer(
|
|
940
|
-
input: {refId: $customerId, name: $name, email: $email, couponRefId: $couponId, billingInformation: $billingInfo, additionalMetaData: $metadata}
|
|
941
|
-
) {
|
|
1149
|
+
mutation updateCustomer($input: UpdateCustomerInput!) {
|
|
1150
|
+
updateCustomer: updateOneCustomer(input: $input) {
|
|
942
1151
|
...CustomerFragment
|
|
943
1152
|
}
|
|
944
1153
|
}
|
|
945
1154
|
${exports.CustomerFragmentDoc}`;
|
|
946
|
-
exports.
|
|
947
|
-
mutation
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1155
|
+
exports.ProvisionSubscriptionDocument = (0, graphql_tag_1.default) `
|
|
1156
|
+
mutation provisionSubscription($input: ProvisionSubscriptionInput!) {
|
|
1157
|
+
provisionSubscriptionV2(input: $input) {
|
|
1158
|
+
checkoutUrl
|
|
1159
|
+
status
|
|
1160
|
+
subscription {
|
|
1161
|
+
...SlimSubscriptionFragment
|
|
1162
|
+
}
|
|
952
1163
|
}
|
|
953
1164
|
}
|
|
954
1165
|
${exports.SlimSubscriptionFragmentDoc}`;
|
|
955
|
-
exports.
|
|
956
|
-
mutation
|
|
957
|
-
|
|
958
|
-
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}
|
|
959
|
-
) {
|
|
1166
|
+
exports.UpdateSubscriptionDocument = (0, graphql_tag_1.default) `
|
|
1167
|
+
mutation updateSubscription($input: UpdateSubscriptionInput!) {
|
|
1168
|
+
updateSubscription: updateOneSubscription(input: $input) {
|
|
960
1169
|
...SlimSubscriptionFragment
|
|
961
1170
|
}
|
|
962
1171
|
}
|
|
963
1172
|
${exports.SlimSubscriptionFragmentDoc}`;
|
|
964
1173
|
exports.CancelSubscriptionDocument = (0, graphql_tag_1.default) `
|
|
965
|
-
mutation cancelSubscription($
|
|
966
|
-
cancelSubscription(
|
|
967
|
-
input: {subscriptionRefId: $subscriptionId, subscriptionCancellationTime: $cancellationTime, endDate: $endDate}
|
|
968
|
-
) {
|
|
1174
|
+
mutation cancelSubscription($input: SubscriptionCancellationInput!) {
|
|
1175
|
+
cancelSubscription(input: $input) {
|
|
969
1176
|
...SlimSubscriptionFragment
|
|
970
1177
|
}
|
|
971
1178
|
}
|
|
972
1179
|
${exports.SlimSubscriptionFragmentDoc}`;
|
|
973
1180
|
exports.InitiateCheckoutDocument = (0, graphql_tag_1.default) `
|
|
974
|
-
mutation initiateCheckout($
|
|
975
|
-
initiateCheckout(
|
|
976
|
-
input: {planId: $planId, billingPeriod: $billingPeriod, cancelUrl: $cancelUrl, customerId: $customerId, addons: $addons, unitQuantity: $unitQuantity, successUrl: $successUrl}
|
|
977
|
-
) {
|
|
978
|
-
id
|
|
1181
|
+
mutation initiateCheckout($input: InitiateCheckoutInput!) {
|
|
1182
|
+
initiateCheckout(input: $input) {
|
|
979
1183
|
checkoutUrl
|
|
980
1184
|
checkoutBillingId
|
|
981
1185
|
}
|
|
982
1186
|
}
|
|
983
1187
|
`;
|
|
984
|
-
exports.
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
node {
|
|
989
|
-
...CustomerFragment
|
|
990
|
-
}
|
|
991
|
-
}
|
|
1188
|
+
exports.EstimateSubscriptionDocument = (0, graphql_tag_1.default) `
|
|
1189
|
+
mutation estimateSubscription($input: EstimateSubscriptionInput!) {
|
|
1190
|
+
estimateSubscription(input: $input) {
|
|
1191
|
+
...SubscriptionPreviewFragment
|
|
992
1192
|
}
|
|
993
1193
|
}
|
|
994
|
-
${exports.
|
|
995
|
-
exports.
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
filter: {status: {eq: PUBLISHED}, isLatest: {is: true}, product: {refId: {eq: $productId}}}
|
|
1000
|
-
sorting: {field: refId, direction: ASC}
|
|
1001
|
-
) {
|
|
1002
|
-
edges {
|
|
1003
|
-
node {
|
|
1004
|
-
...PaywallPlanFragment
|
|
1005
|
-
compatibleAddons(filter: {status: {eq: PUBLISHED}, isLatest: {is: true}}) {
|
|
1006
|
-
...PaywallAddonFragment
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1194
|
+
${exports.SubscriptionPreviewFragmentDoc}`;
|
|
1195
|
+
exports.EstimateSubscriptionUpdateDocument = (0, graphql_tag_1.default) `
|
|
1196
|
+
mutation estimateSubscriptionUpdate($input: EstimateSubscriptionUpdateInput!) {
|
|
1197
|
+
estimateSubscriptionUpdate(input: $input) {
|
|
1198
|
+
...SubscriptionPreviewFragment
|
|
1010
1199
|
}
|
|
1011
1200
|
}
|
|
1012
|
-
${exports.
|
|
1013
|
-
|
|
1201
|
+
${exports.SubscriptionPreviewFragmentDoc}`;
|
|
1202
|
+
exports.ReportUsageDocument = (0, graphql_tag_1.default) `
|
|
1203
|
+
mutation reportUsage($input: UsageMeasurementCreateInput!) {
|
|
1204
|
+
createUsageMeasurement(usageMeasurement: $input) {
|
|
1205
|
+
id
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
`;
|
|
1209
|
+
exports.GetCustomerByIdDocument = (0, graphql_tag_1.default) `
|
|
1210
|
+
query getCustomerById($input: GetCustomerByRefIdInput!) {
|
|
1211
|
+
getCustomerByRefId(input: $input) {
|
|
1212
|
+
...CustomerFragment
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
${exports.CustomerFragmentDoc}`;
|
|
1014
1216
|
exports.GetCouponsDocument = (0, graphql_tag_1.default) `
|
|
1015
1217
|
query getCoupons {
|
|
1016
1218
|
coupons(filter: {status: {eq: ACTIVE}}, paging: {first: 50}) {
|
|
@@ -1022,12 +1224,30 @@ exports.GetCouponsDocument = (0, graphql_tag_1.default) `
|
|
|
1022
1224
|
}
|
|
1023
1225
|
}
|
|
1024
1226
|
${exports.CouponFragmentDoc}`;
|
|
1227
|
+
exports.GetPaywallDocument = (0, graphql_tag_1.default) `
|
|
1228
|
+
query getPaywall($input: GetPaywallInput!) {
|
|
1229
|
+
getPaywall(input: $input) {
|
|
1230
|
+
...PaywallPlanFragment
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
${exports.PaywallPlanFragmentDoc}`;
|
|
1234
|
+
exports.GetEntitlementsDocument = (0, graphql_tag_1.default) `
|
|
1235
|
+
query getEntitlements($query: FetchEntitlementsQuery!) {
|
|
1236
|
+
entitlements: cachedEntitlements(query: $query) {
|
|
1237
|
+
...EntitlementFragment
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
${exports.EntitlementFragmentDoc}`;
|
|
1241
|
+
exports.GetEntitlementDocument = (0, graphql_tag_1.default) `
|
|
1242
|
+
query getEntitlement($query: FetchEntitlementQuery!) {
|
|
1243
|
+
entitlement(query: $query) {
|
|
1244
|
+
...EntitlementFragment
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
${exports.EntitlementFragmentDoc}`;
|
|
1025
1248
|
const defaultWrapper = (action, _operationName, _operationType) => action();
|
|
1026
1249
|
function getSdk(client, withWrapper = defaultWrapper) {
|
|
1027
1250
|
return {
|
|
1028
|
-
createCustomer(variables, requestHeaders) {
|
|
1029
|
-
return withWrapper((wrappedRequestHeaders) => client.request(exports.CreateCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createCustomer', 'mutation');
|
|
1030
|
-
},
|
|
1031
1251
|
provisionCustomer(variables, requestHeaders) {
|
|
1032
1252
|
return withWrapper((wrappedRequestHeaders) => client.request(exports.ProvisionCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'provisionCustomer', 'mutation');
|
|
1033
1253
|
},
|
|
@@ -1037,26 +1257,41 @@ function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
1037
1257
|
updateCustomer(variables, requestHeaders) {
|
|
1038
1258
|
return withWrapper((wrappedRequestHeaders) => client.request(exports.UpdateCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateCustomer', 'mutation');
|
|
1039
1259
|
},
|
|
1260
|
+
provisionSubscription(variables, requestHeaders) {
|
|
1261
|
+
return withWrapper((wrappedRequestHeaders) => client.request(exports.ProvisionSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'provisionSubscription', 'mutation');
|
|
1262
|
+
},
|
|
1040
1263
|
updateSubscription(variables, requestHeaders) {
|
|
1041
1264
|
return withWrapper((wrappedRequestHeaders) => client.request(exports.UpdateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateSubscription', 'mutation');
|
|
1042
1265
|
},
|
|
1043
|
-
createSubscription(variables, requestHeaders) {
|
|
1044
|
-
return withWrapper((wrappedRequestHeaders) => client.request(exports.CreateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createSubscription', 'mutation');
|
|
1045
|
-
},
|
|
1046
1266
|
cancelSubscription(variables, requestHeaders) {
|
|
1047
1267
|
return withWrapper((wrappedRequestHeaders) => client.request(exports.CancelSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'cancelSubscription', 'mutation');
|
|
1048
1268
|
},
|
|
1049
1269
|
initiateCheckout(variables, requestHeaders) {
|
|
1050
1270
|
return withWrapper((wrappedRequestHeaders) => client.request(exports.InitiateCheckoutDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'initiateCheckout', 'mutation');
|
|
1051
1271
|
},
|
|
1272
|
+
estimateSubscription(variables, requestHeaders) {
|
|
1273
|
+
return withWrapper((wrappedRequestHeaders) => client.request(exports.EstimateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'estimateSubscription', 'mutation');
|
|
1274
|
+
},
|
|
1275
|
+
estimateSubscriptionUpdate(variables, requestHeaders) {
|
|
1276
|
+
return withWrapper((wrappedRequestHeaders) => client.request(exports.EstimateSubscriptionUpdateDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'estimateSubscriptionUpdate', 'mutation');
|
|
1277
|
+
},
|
|
1278
|
+
reportUsage(variables, requestHeaders) {
|
|
1279
|
+
return withWrapper((wrappedRequestHeaders) => client.request(exports.ReportUsageDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'reportUsage', 'mutation');
|
|
1280
|
+
},
|
|
1052
1281
|
getCustomerById(variables, requestHeaders) {
|
|
1053
1282
|
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetCustomerByIdDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCustomerById', 'query');
|
|
1054
1283
|
},
|
|
1284
|
+
getCoupons(variables, requestHeaders) {
|
|
1285
|
+
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetCouponsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCoupons', 'query');
|
|
1286
|
+
},
|
|
1055
1287
|
getPaywall(variables, requestHeaders) {
|
|
1056
1288
|
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetPaywallDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getPaywall', 'query');
|
|
1057
1289
|
},
|
|
1058
|
-
|
|
1059
|
-
return withWrapper((wrappedRequestHeaders) => client.request(exports.
|
|
1290
|
+
getEntitlements(variables, requestHeaders) {
|
|
1291
|
+
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetEntitlementsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEntitlements', 'query');
|
|
1292
|
+
},
|
|
1293
|
+
getEntitlement(variables, requestHeaders) {
|
|
1294
|
+
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetEntitlementDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEntitlement', 'query');
|
|
1060
1295
|
}
|
|
1061
1296
|
};
|
|
1062
1297
|
}
|