@stigg/api-client-js
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "@stigg/api-client-js", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
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; | ||
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; | ||
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; | ||
exports.ImportCustomerDocument = exports.ProvisionCustomerDocument = exports.PaywallConfigurationFragmentDoc = exports.LayoutConfigurationFragmentDoc = exports.TypographyConfigurationFragmentDoc = exports.FontVariantFragmentDoc = exports.PaywallPlanFragmentDoc = exports.PaywallAddonFragmentDoc = exports.PaywallPackageEntitlementFragmentDoc = exports.EntitlementFragmentDoc = exports.FeatureFragmentDoc = exports.ResetPeriodConfigurationFragmentDoc = exports.WeeklyResetPeriodConfigFragmentDoc = exports.MonthlyResetPeriodConfigFragmentDoc = exports.SubscriptionPreviewFragmentDoc = exports.CustomerFragmentDoc = exports.SubscriptionFragmentDoc = exports.SubscriptionScheduledUpdateDataFragmentDoc = exports.PlanFragmentDoc = exports.AddonFragmentDoc = exports.PackageEntitlementFragmentDoc = exports.PromotionalEntitlementFragmentDoc = exports.CouponFragmentDoc = exports.SlimSubscriptionFragmentDoc = exports.TotalPriceFragmentDoc = exports.PriceFragmentDoc = exports.ExperimentGroupType = exports.WidgetType = exports.WeeklyAccordingTo = exports.VendorIdentifier = exports.UsageMeasurementSortFields = exports.TrialPeriodUnits = exports.TaskType = exports.TaskStatus = exports.SyncStatus = exports.SubscriptionStatus = exports.SubscriptionStartSetup = exports.SubscriptionScheduleType = exports.SubscriptionScheduleStatus = exports.SubscriptionPriceSortFields = exports.SubscriptionMigrationTaskSortFields = exports.SubscriptionEntitlementSortFields = exports.SubscriptionEndSetup = exports.SubscriptionDecisionStrategy = exports.SubscriptionCancellationTime = exports.SubscriptionCancelReason = exports.SubscriptionAddonSortFields = exports.SourceType = exports.SortNulls = exports.SortDirection = void 0; | ||
exports.getSdk = exports.GetEntitlementDocument = exports.GetEntitlementsDocument = exports.GetPaywallDocument = exports.GetCouponsDocument = exports.GetCustomerByIdDocument = exports.ReportUsageDocument = exports.EstimateSubscriptionUpdateDocument = exports.EstimateSubscriptionDocument = exports.InitiateCheckoutDocument = exports.CancelSubscriptionDocument = exports.UpdateSubscriptionDocument = exports.ProvisionSubscriptionDocument = exports.UpdateCustomerDocument = void 0; | ||
const graphql_tag_1 = require("graphql-tag"); | ||
@@ -16,2 +17,7 @@ /** DenyReason of get access policy */ | ||
})(AccessDeniedReason = exports.AccessDeniedReason || (exports.AccessDeniedReason = {})); | ||
var AccountStatus; | ||
(function (AccountStatus) { | ||
AccountStatus["Active"] = "ACTIVE"; | ||
AccountStatus["Blocked"] = "BLOCKED"; | ||
})(AccountStatus = exports.AccountStatus || (exports.AccountStatus = {})); | ||
var AddonSortFields; | ||
@@ -33,2 +39,9 @@ (function (AddonSortFields) { | ||
})(AddonSortFields = exports.AddonSortFields || (exports.AddonSortFields = {})); | ||
/** Alignment */ | ||
var Alignment; | ||
(function (Alignment) { | ||
Alignment["Center"] = "CENTER"; | ||
Alignment["Left"] = "LEFT"; | ||
Alignment["Right"] = "RIGHT"; | ||
})(Alignment = exports.Alignment || (exports.Alignment = {})); | ||
var ApiKeySortFields; | ||
@@ -66,2 +79,3 @@ (function (ApiKeySortFields) { | ||
ChangeType["Modified"] = "MODIFIED"; | ||
ChangeType["Reordered"] = "REORDERED"; | ||
})(ChangeType = exports.ChangeType || (exports.ChangeType = {})); | ||
@@ -96,3 +110,117 @@ var CouponSortFields; | ||
(function (Currency) { | ||
Currency["Aed"] = "AED"; | ||
Currency["All"] = "ALL"; | ||
Currency["Amd"] = "AMD"; | ||
Currency["Ang"] = "ANG"; | ||
Currency["Aud"] = "AUD"; | ||
Currency["Awg"] = "AWG"; | ||
Currency["Azn"] = "AZN"; | ||
Currency["Bam"] = "BAM"; | ||
Currency["Bbd"] = "BBD"; | ||
Currency["Bdt"] = "BDT"; | ||
Currency["Bgn"] = "BGN"; | ||
Currency["Bif"] = "BIF"; | ||
Currency["Bmd"] = "BMD"; | ||
Currency["Bnd"] = "BND"; | ||
Currency["Bsd"] = "BSD"; | ||
Currency["Bwp"] = "BWP"; | ||
Currency["Byn"] = "BYN"; | ||
Currency["Bzd"] = "BZD"; | ||
Currency["Cad"] = "CAD"; | ||
Currency["Cdf"] = "CDF"; | ||
Currency["Chf"] = "CHF"; | ||
Currency["Clp"] = "CLP"; | ||
Currency["Cny"] = "CNY"; | ||
Currency["Czk"] = "CZK"; | ||
Currency["Djf"] = "DJF"; | ||
Currency["Dkk"] = "DKK"; | ||
Currency["Dop"] = "DOP"; | ||
Currency["Dzd"] = "DZD"; | ||
Currency["Egp"] = "EGP"; | ||
Currency["Etb"] = "ETB"; | ||
Currency["Eur"] = "EUR"; | ||
Currency["Fjd"] = "FJD"; | ||
Currency["Gbp"] = "GBP"; | ||
Currency["Gel"] = "GEL"; | ||
Currency["Gip"] = "GIP"; | ||
Currency["Gmd"] = "GMD"; | ||
Currency["Gnf"] = "GNF"; | ||
Currency["Gyd"] = "GYD"; | ||
Currency["Hkd"] = "HKD"; | ||
Currency["Hrk"] = "HRK"; | ||
Currency["Htg"] = "HTG"; | ||
Currency["Idr"] = "IDR"; | ||
Currency["Ils"] = "ILS"; | ||
Currency["Inr"] = "INR"; | ||
Currency["Isk"] = "ISK"; | ||
Currency["Jmd"] = "JMD"; | ||
Currency["Jpy"] = "JPY"; | ||
Currency["Kes"] = "KES"; | ||
Currency["Kgs"] = "KGS"; | ||
Currency["Khr"] = "KHR"; | ||
Currency["Kmf"] = "KMF"; | ||
Currency["Krw"] = "KRW"; | ||
Currency["Kyd"] = "KYD"; | ||
Currency["Kzt"] = "KZT"; | ||
Currency["Lbp"] = "LBP"; | ||
Currency["Lkr"] = "LKR"; | ||
Currency["Lrd"] = "LRD"; | ||
Currency["Lsl"] = "LSL"; | ||
Currency["Mad"] = "MAD"; | ||
Currency["Mdl"] = "MDL"; | ||
Currency["Mga"] = "MGA"; | ||
Currency["Mkd"] = "MKD"; | ||
Currency["Mmk"] = "MMK"; | ||
Currency["Mnt"] = "MNT"; | ||
Currency["Mop"] = "MOP"; | ||
Currency["Mro"] = "MRO"; | ||
Currency["Mvr"] = "MVR"; | ||
Currency["Mwk"] = "MWK"; | ||
Currency["Mxn"] = "MXN"; | ||
Currency["Myr"] = "MYR"; | ||
Currency["Mzn"] = "MZN"; | ||
Currency["Nad"] = "NAD"; | ||
Currency["Ngn"] = "NGN"; | ||
Currency["Nok"] = "NOK"; | ||
Currency["Npr"] = "NPR"; | ||
Currency["Nzd"] = "NZD"; | ||
Currency["Pgk"] = "PGK"; | ||
Currency["Php"] = "PHP"; | ||
Currency["Pkr"] = "PKR"; | ||
Currency["Pln"] = "PLN"; | ||
Currency["Pyg"] = "PYG"; | ||
Currency["Qar"] = "QAR"; | ||
Currency["Ron"] = "RON"; | ||
Currency["Rsd"] = "RSD"; | ||
Currency["Rub"] = "RUB"; | ||
Currency["Rwf"] = "RWF"; | ||
Currency["Sar"] = "SAR"; | ||
Currency["Sbd"] = "SBD"; | ||
Currency["Scr"] = "SCR"; | ||
Currency["Sek"] = "SEK"; | ||
Currency["Sgd"] = "SGD"; | ||
Currency["Sle"] = "SLE"; | ||
Currency["Sll"] = "SLL"; | ||
Currency["Sos"] = "SOS"; | ||
Currency["Szl"] = "SZL"; | ||
Currency["Thb"] = "THB"; | ||
Currency["Tjs"] = "TJS"; | ||
Currency["Top"] = "TOP"; | ||
Currency["Try"] = "TRY"; | ||
Currency["Ttd"] = "TTD"; | ||
Currency["Tzs"] = "TZS"; | ||
Currency["Uah"] = "UAH"; | ||
Currency["Ugx"] = "UGX"; | ||
Currency["Usd"] = "USD"; | ||
Currency["Uzs"] = "UZS"; | ||
Currency["Vnd"] = "VND"; | ||
Currency["Vuv"] = "VUV"; | ||
Currency["Wst"] = "WST"; | ||
Currency["Xaf"] = "XAF"; | ||
Currency["Xcd"] = "XCD"; | ||
Currency["Xof"] = "XOF"; | ||
Currency["Xpf"] = "XPF"; | ||
Currency["Yer"] = "YER"; | ||
Currency["Zar"] = "ZAR"; | ||
Currency["Zmw"] = "ZMW"; | ||
})(Currency = exports.Currency || (exports.Currency = {})); | ||
@@ -106,5 +234,5 @@ var CustomerSortFields; | ||
CustomerSortFields["CrmId"] = "crmId"; | ||
CustomerSortFields["CustomerId"] = "customerId"; | ||
CustomerSortFields["Email"] = "email"; | ||
CustomerSortFields["EnvironmentId"] = "environmentId"; | ||
CustomerSortFields["ExperimentGroup"] = "experimentGroup"; | ||
CustomerSortFields["Id"] = "id"; | ||
@@ -126,4 +254,4 @@ CustomerSortFields["Name"] = "name"; | ||
CustomerSubscriptionSortFields["EnvironmentId"] = "environmentId"; | ||
CustomerSubscriptionSortFields["ExperimentGroup"] = "experimentGroup"; | ||
CustomerSubscriptionSortFields["Id"] = "id"; | ||
CustomerSubscriptionSortFields["OldBillingId"] = "oldBillingId"; | ||
CustomerSubscriptionSortFields["PricingType"] = "pricingType"; | ||
@@ -133,2 +261,3 @@ CustomerSubscriptionSortFields["RefId"] = "refId"; | ||
CustomerSubscriptionSortFields["Status"] = "status"; | ||
CustomerSubscriptionSortFields["SubscriptionId"] = "subscriptionId"; | ||
CustomerSubscriptionSortFields["TrialEndDate"] = "trialEndDate"; | ||
@@ -149,2 +278,10 @@ })(CustomerSubscriptionSortFields = exports.CustomerSubscriptionSortFields || (exports.CustomerSubscriptionSortFields = {})); | ||
})(EntitySelectionMode = exports.EntitySelectionMode || (exports.EntitySelectionMode = {})); | ||
/** EnvironmentProvisionStatus. */ | ||
var EnvironmentProvisionStatus; | ||
(function (EnvironmentProvisionStatus) { | ||
EnvironmentProvisionStatus["Done"] = "DONE"; | ||
EnvironmentProvisionStatus["Failed"] = "FAILED"; | ||
EnvironmentProvisionStatus["InProgress"] = "IN_PROGRESS"; | ||
EnvironmentProvisionStatus["NotProvisioned"] = "NOT_PROVISIONED"; | ||
})(EnvironmentProvisionStatus = exports.EnvironmentProvisionStatus || (exports.EnvironmentProvisionStatus = {})); | ||
var EnvironmentSortFields; | ||
@@ -164,2 +301,3 @@ (function (EnvironmentSortFields) { | ||
ErrorCode["ArchivedCouponCantBeApplied"] = "ArchivedCouponCantBeApplied"; | ||
ErrorCode["AuthCustomerMismatch"] = "AuthCustomerMismatch"; | ||
ErrorCode["BadUserInput"] = "BadUserInput"; | ||
@@ -169,14 +307,22 @@ ErrorCode["BillingPeriodMissingError"] = "BillingPeriodMissingError"; | ||
ErrorCode["CannotDeleteFeatureError"] = "CannotDeleteFeatureError"; | ||
ErrorCode["CantCreateExperiment"] = "CantCreateExperiment"; | ||
ErrorCode["CannotEditPackageInNonDraftMode"] = "CannotEditPackageInNonDraftMode"; | ||
ErrorCode["CheckoutIsNotSupported"] = "CheckoutIsNotSupported"; | ||
ErrorCode["CheckoutOptionsMissing"] = "CheckoutOptionsMissing"; | ||
ErrorCode["CouponNotFound"] = "CouponNotFound"; | ||
ErrorCode["CustomerAlreadyHaveCustomerCoupon"] = "CustomerAlreadyHaveCustomerCoupon"; | ||
ErrorCode["CustomerAlreadyUsesCoupon"] = "CustomerAlreadyUsesCoupon"; | ||
ErrorCode["CustomerHasNoPaymentMethod"] = "CustomerHasNoPaymentMethod"; | ||
ErrorCode["CustomerNoBillingId"] = "CustomerNoBillingId"; | ||
ErrorCode["CustomerNotFound"] = "CustomerNotFound"; | ||
ErrorCode["DowngradeBillingPeriodNotSupportedError"] = "DowngradeBillingPeriodNotSupportedError"; | ||
ErrorCode["DraftPlanCantBeArchived"] = "DraftPlanCantBeArchived"; | ||
ErrorCode["DuplicatedEntityNotAllowed"] = "DuplicatedEntityNotAllowed"; | ||
ErrorCode["EditAllowedOnDraftPackageOnlyError"] = "EditAllowedOnDraftPackageOnlyError"; | ||
ErrorCode["EntitlementsMustBelongToSamePackage"] = "EntitlementsMustBelongToSamePackage"; | ||
ErrorCode["EntityIdDifferentFromRefIdError"] = "EntityIdDifferentFromRefIdError"; | ||
ErrorCode["EnvironmentMissing"] = "EnvironmentMissing"; | ||
ErrorCode["ExperimentAlreadyRunning"] = "ExperimentAlreadyRunning"; | ||
ErrorCode["ExperimentNotFoundError"] = "ExperimentNotFoundError"; | ||
ErrorCode["ExperimentStatusError"] = "ExperimentStatusError"; | ||
ErrorCode["FailedToCreateCheckoutSessionError"] = "FailedToCreateCheckoutSessionError"; | ||
ErrorCode["FailedToImportCustomer"] = "FailedToImportCustomer"; | ||
@@ -201,6 +347,10 @@ ErrorCode["FeatureNotFound"] = "FeatureNotFound"; | ||
ErrorCode["MeteringNotAvailableForFeatureType"] = "MeteringNotAvailableForFeatureType"; | ||
ErrorCode["MissingEntityIdError"] = "MissingEntityIdError"; | ||
ErrorCode["NoFeatureEntitlementInSubscription"] = "NoFeatureEntitlementInSubscription"; | ||
ErrorCode["NoProductsAvailable"] = "NoProductsAvailable"; | ||
ErrorCode["OperationNotAllowedDuringInProgressExperiment"] = "OperationNotAllowedDuringInProgressExperiment"; | ||
ErrorCode["PackageAlreadyPublished"] = "PackageAlreadyPublished"; | ||
ErrorCode["PackagePricingTypeNotSet"] = "PackagePricingTypeNotSet"; | ||
ErrorCode["PlanAlreadyExtended"] = "PlanAlreadyExtended"; | ||
ErrorCode["PlanCannotBePublishWhenBasePlanIsDraft"] = "PlanCannotBePublishWhenBasePlanIsDraft"; | ||
ErrorCode["PlanIsUsedAsDefaultStartPlan"] = "PlanIsUsedAsDefaultStartPlan"; | ||
@@ -212,2 +362,8 @@ ErrorCode["PlanIsUsedAsDowngradePlan"] = "PlanIsUsedAsDowngradePlan"; | ||
ErrorCode["PriceNotFound"] = "PriceNotFound"; | ||
ErrorCode["PromotionCodeCustomerNotFirstPurchase"] = "PromotionCodeCustomerNotFirstPurchase"; | ||
ErrorCode["PromotionCodeMaxRedemptionsReached"] = "PromotionCodeMaxRedemptionsReached"; | ||
ErrorCode["PromotionCodeMinimumAmountNotReached"] = "PromotionCodeMinimumAmountNotReached"; | ||
ErrorCode["PromotionCodeNotActive"] = "PromotionCodeNotActive"; | ||
ErrorCode["PromotionCodeNotForCustomer"] = "PromotionCodeNotForCustomer"; | ||
ErrorCode["PromotionCodeNotFound"] = "PromotionCodeNotFound"; | ||
ErrorCode["RateLimitExceeded"] = "RateLimitExceeded"; | ||
@@ -227,2 +383,3 @@ ErrorCode["ResyncAlreadyInProgress"] = "ResyncAlreadyInProgress"; | ||
ErrorCode["UnsupportedFeatureType"] = "UnsupportedFeatureType"; | ||
ErrorCode["UnsupportedSubscriptionScheduleType"] = "UnsupportedSubscriptionScheduleType"; | ||
ErrorCode["UnsupportedVendorIdentifier"] = "UnsupportedVendorIdentifier"; | ||
@@ -244,2 +401,3 @@ })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); | ||
EventLogType["CustomerUpdated"] = "CUSTOMER_UPDATED"; | ||
EventLogType["EdgeApiDataResync"] = "EDGE_API_DATA_RESYNC"; | ||
EventLogType["EntitlementsUpdated"] = "ENTITLEMENTS_UPDATED"; | ||
@@ -249,2 +407,3 @@ EventLogType["EntitlementDenied"] = "ENTITLEMENT_DENIED"; | ||
EventLogType["EntitlementRequested"] = "ENTITLEMENT_REQUESTED"; | ||
EventLogType["EnvironmentDeleted"] = "ENVIRONMENT_DELETED"; | ||
EventLogType["FeatureCreated"] = "FEATURE_CREATED"; | ||
@@ -260,2 +419,5 @@ EventLogType["FeatureDeleted"] = "FEATURE_DELETED"; | ||
EventLogType["PlanUpdated"] = "PLAN_UPDATED"; | ||
EventLogType["ProductCreated"] = "PRODUCT_CREATED"; | ||
EventLogType["ProductDeleted"] = "PRODUCT_DELETED"; | ||
EventLogType["ProductUpdated"] = "PRODUCT_UPDATED"; | ||
EventLogType["PromotionalEntitlementExpired"] = "PROMOTIONAL_ENTITLEMENT_EXPIRED"; | ||
@@ -276,9 +438,4 @@ EventLogType["PromotionalEntitlementGranted"] = "PROMOTIONAL_ENTITLEMENT_GRANTED"; | ||
EventLogType["SyncFailed"] = "SYNC_FAILED"; | ||
EventLogType["WidgetConfigurationUpdated"] = "WIDGET_CONFIGURATION_UPDATED"; | ||
})(EventLogType = exports.EventLogType || (exports.EventLogType = {})); | ||
/** The group of the experiment */ | ||
var ExperimentGroup; | ||
(function (ExperimentGroup) { | ||
ExperimentGroup["Control"] = "CONTROL"; | ||
ExperimentGroup["Variant"] = "VARIANT"; | ||
})(ExperimentGroup = exports.ExperimentGroup || (exports.ExperimentGroup = {})); | ||
var ExperimentSortFields; | ||
@@ -327,2 +484,8 @@ (function (ExperimentSortFields) { | ||
})(FeatureType = exports.FeatureType || (exports.FeatureType = {})); | ||
/** Font weight */ | ||
var FontWeight; | ||
(function (FontWeight) { | ||
FontWeight["Bold"] = "BOLD"; | ||
FontWeight["Normal"] = "NORMAL"; | ||
})(FontWeight = exports.FontWeight || (exports.FontWeight = {})); | ||
var HookSortFields; | ||
@@ -436,2 +599,3 @@ (function (HookSortFields) { | ||
(function (PriceSortFields) { | ||
PriceSortFields["BillingId"] = "billingId"; | ||
PriceSortFields["BillingModel"] = "billingModel"; | ||
@@ -485,2 +649,13 @@ PriceSortFields["BillingPeriod"] = "billingPeriod"; | ||
})(PromotionalEntitlementStatus = exports.PromotionalEntitlementStatus || (exports.PromotionalEntitlementStatus = {})); | ||
var ProrationBehavior; | ||
(function (ProrationBehavior) { | ||
ProrationBehavior["CreateProrations"] = "CREATE_PRORATIONS"; | ||
ProrationBehavior["InvoiceImmediately"] = "INVOICE_IMMEDIATELY"; | ||
})(ProrationBehavior = exports.ProrationBehavior || (exports.ProrationBehavior = {})); | ||
/** Provision subscription status */ | ||
var ProvisionSubscriptionStatus; | ||
(function (ProvisionSubscriptionStatus) { | ||
ProvisionSubscriptionStatus["PaymentRequired"] = "PAYMENT_REQUIRED"; | ||
ProvisionSubscriptionStatus["Success"] = "SUCCESS"; | ||
})(ProvisionSubscriptionStatus = exports.ProvisionSubscriptionStatus || (exports.ProvisionSubscriptionStatus = {})); | ||
/** PublishMigrationType */ | ||
@@ -535,2 +710,10 @@ var PublishMigrationType; | ||
})(SubscriptionCancellationTime = exports.SubscriptionCancellationTime || (exports.SubscriptionCancellationTime = {})); | ||
/** Subscription decision strategy */ | ||
var SubscriptionDecisionStrategy; | ||
(function (SubscriptionDecisionStrategy) { | ||
SubscriptionDecisionStrategy["PredefinedFreePlan"] = "PREDEFINED_FREE_PLAN"; | ||
SubscriptionDecisionStrategy["PredefinedTrialPlan"] = "PREDEFINED_TRIAL_PLAN"; | ||
SubscriptionDecisionStrategy["RequestedPlan"] = "REQUESTED_PLAN"; | ||
SubscriptionDecisionStrategy["SkippedSubscriptionCreation"] = "SKIPPED_SUBSCRIPTION_CREATION"; | ||
})(SubscriptionDecisionStrategy = exports.SubscriptionDecisionStrategy || (exports.SubscriptionDecisionStrategy = {})); | ||
var SubscriptionEndSetup; | ||
@@ -541,2 +724,10 @@ (function (SubscriptionEndSetup) { | ||
})(SubscriptionEndSetup = exports.SubscriptionEndSetup || (exports.SubscriptionEndSetup = {})); | ||
var SubscriptionEntitlementSortFields; | ||
(function (SubscriptionEntitlementSortFields) { | ||
SubscriptionEntitlementSortFields["CreatedAt"] = "createdAt"; | ||
SubscriptionEntitlementSortFields["EnvironmentId"] = "environmentId"; | ||
SubscriptionEntitlementSortFields["Id"] = "id"; | ||
SubscriptionEntitlementSortFields["SubscriptionId"] = "subscriptionId"; | ||
SubscriptionEntitlementSortFields["UpdatedAt"] = "updatedAt"; | ||
})(SubscriptionEntitlementSortFields = exports.SubscriptionEntitlementSortFields || (exports.SubscriptionEntitlementSortFields = {})); | ||
var SubscriptionMigrationTaskSortFields; | ||
@@ -557,2 +748,17 @@ (function (SubscriptionMigrationTaskSortFields) { | ||
})(SubscriptionPriceSortFields = exports.SubscriptionPriceSortFields || (exports.SubscriptionPriceSortFields = {})); | ||
/** Subscription scheduled schedule status */ | ||
var SubscriptionScheduleStatus; | ||
(function (SubscriptionScheduleStatus) { | ||
SubscriptionScheduleStatus["Canceled"] = "Canceled"; | ||
SubscriptionScheduleStatus["Done"] = "Done"; | ||
SubscriptionScheduleStatus["Failed"] = "Failed"; | ||
SubscriptionScheduleStatus["Scheduled"] = "Scheduled"; | ||
})(SubscriptionScheduleStatus = exports.SubscriptionScheduleStatus || (exports.SubscriptionScheduleStatus = {})); | ||
/** Subscription scheduled schedule type */ | ||
var SubscriptionScheduleType; | ||
(function (SubscriptionScheduleType) { | ||
SubscriptionScheduleType["BillingPeriod"] = "BillingPeriod"; | ||
SubscriptionScheduleType["Downgrade"] = "Downgrade"; | ||
SubscriptionScheduleType["UnitAmount"] = "UnitAmount"; | ||
})(SubscriptionScheduleType = exports.SubscriptionScheduleType || (exports.SubscriptionScheduleType = {})); | ||
var SubscriptionStartSetup; | ||
@@ -574,10 +780,2 @@ (function (SubscriptionStartSetup) { | ||
})(SubscriptionStatus = exports.SubscriptionStatus || (exports.SubscriptionStatus = {})); | ||
/** Subscription strategy decision */ | ||
var SubscriptionStrategyDecision; | ||
(function (SubscriptionStrategyDecision) { | ||
SubscriptionStrategyDecision["PredefinedFreePlan"] = "PREDEFINED_FREE_PLAN"; | ||
SubscriptionStrategyDecision["PredefinedTrialPlan"] = "PREDEFINED_TRIAL_PLAN"; | ||
SubscriptionStrategyDecision["RequestedPlan"] = "REQUESTED_PLAN"; | ||
SubscriptionStrategyDecision["SkippedSubscriptionCreation"] = "SKIPPED_SUBSCRIPTION_CREATION"; | ||
})(SubscriptionStrategyDecision = exports.SubscriptionStrategyDecision || (exports.SubscriptionStrategyDecision = {})); | ||
/** Status of the integration sync */ | ||
@@ -636,13 +834,14 @@ var SyncStatus; | ||
})(WeeklyAccordingTo = exports.WeeklyAccordingTo || (exports.WeeklyAccordingTo = {})); | ||
exports.FeatureFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment FeatureFragment on Feature { | ||
id: refId | ||
featureType | ||
meterType | ||
featureUnits | ||
featureUnitsPlural | ||
displayName | ||
description | ||
} | ||
`; | ||
/** The widget type */ | ||
var WidgetType; | ||
(function (WidgetType) { | ||
WidgetType["CustomerPortal"] = "CUSTOMER_PORTAL"; | ||
WidgetType["Paywall"] = "PAYWALL"; | ||
})(WidgetType = exports.WidgetType || (exports.WidgetType = {})); | ||
/** The group of the experiment */ | ||
var ExperimentGroupType; | ||
(function (ExperimentGroupType) { | ||
ExperimentGroupType["Control"] = "CONTROL"; | ||
ExperimentGroupType["Variant"] = "VARIANT"; | ||
})(ExperimentGroupType = exports.ExperimentGroupType || (exports.ExperimentGroupType = {})); | ||
exports.PriceFragmentDoc = (0, graphql_tag_1.default) ` | ||
@@ -652,2 +851,5 @@ fragment PriceFragment on Price { | ||
billingPeriod | ||
billingId | ||
minUnitQuantity | ||
maxUnitQuantity | ||
price { | ||
@@ -658,6 +860,8 @@ amount | ||
feature { | ||
...FeatureFragment | ||
featureUnits | ||
featureUnitsPlural | ||
displayName | ||
} | ||
} | ||
${exports.FeatureFragmentDoc}`; | ||
`; | ||
exports.TotalPriceFragmentDoc = (0, graphql_tag_1.default) ` | ||
@@ -675,2 +879,91 @@ fragment TotalPriceFragment on CustomerSubscriptionTotalPrice { | ||
`; | ||
exports.SlimSubscriptionFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment SlimSubscriptionFragment on CustomerSubscription { | ||
id | ||
refId | ||
status | ||
additionalMetaData | ||
billingId | ||
billingLinkUrl | ||
effectiveEndDate | ||
currentBillingPeriodEnd | ||
pricingType | ||
experimentInfo { | ||
name | ||
id | ||
groupName | ||
groupType | ||
} | ||
prices { | ||
usageLimit | ||
price { | ||
...PriceFragment | ||
} | ||
} | ||
totalPrice { | ||
...TotalPriceFragment | ||
} | ||
plan { | ||
id | ||
refId | ||
} | ||
addons { | ||
quantity | ||
addon { | ||
id | ||
refId | ||
} | ||
} | ||
customer { | ||
id | ||
refId | ||
} | ||
} | ||
${exports.PriceFragmentDoc} | ||
${exports.TotalPriceFragmentDoc}`; | ||
exports.CouponFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment CouponFragment on Coupon { | ||
id | ||
discountValue | ||
type | ||
additionalMetaData | ||
refId | ||
name | ||
description | ||
createdAt | ||
updatedAt | ||
billingId | ||
billingLinkUrl | ||
type | ||
status | ||
syncStates { | ||
vendorIdentifier | ||
status | ||
} | ||
customers { | ||
id | ||
} | ||
} | ||
`; | ||
exports.PromotionalEntitlementFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment PromotionalEntitlementFragment on PromotionalEntitlement { | ||
status | ||
usageLimit | ||
featureId | ||
hasUnlimitedUsage | ||
resetPeriod | ||
endDate | ||
isVisible | ||
feature { | ||
featureType | ||
meterType | ||
featureUnits | ||
featureUnitsPlural | ||
displayName | ||
description | ||
refId | ||
additionalMetaData | ||
} | ||
} | ||
`; | ||
exports.PackageEntitlementFragmentDoc = (0, graphql_tag_1.default) ` | ||
@@ -682,32 +975,57 @@ fragment PackageEntitlementFragment on PackageEntitlement { | ||
resetPeriod | ||
hiddenFromWidgets | ||
isCustom | ||
displayNameOverride | ||
feature { | ||
...FeatureFragment | ||
featureType | ||
meterType | ||
featureUnits | ||
featureUnitsPlural | ||
displayName | ||
description | ||
refId | ||
additionalMetaData | ||
} | ||
} | ||
${exports.FeatureFragmentDoc}`; | ||
`; | ||
exports.AddonFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment AddonFragment on Addon { | ||
id: refId | ||
id | ||
refId | ||
billingId | ||
displayName | ||
description | ||
metadata: additionalMetaData | ||
additionalMetaData | ||
entitlements { | ||
...PackageEntitlementFragment | ||
} | ||
prices { | ||
...PriceFragment | ||
} | ||
pricingType | ||
} | ||
${exports.PackageEntitlementFragmentDoc}`; | ||
${exports.PackageEntitlementFragmentDoc} | ||
${exports.PriceFragmentDoc}`; | ||
exports.PlanFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment PlanFragment on Plan { | ||
id: refId | ||
id | ||
refId | ||
displayName | ||
description | ||
metadata: additionalMetaData | ||
billingId | ||
additionalMetaData | ||
product { | ||
id: refId | ||
refId | ||
displayName | ||
description | ||
additionalMetaData | ||
productSettings { | ||
downgradePlan { | ||
refId | ||
displayName | ||
} | ||
} | ||
} | ||
basePlan { | ||
id: refId | ||
refId | ||
displayName | ||
@@ -736,6 +1054,30 @@ } | ||
${exports.PriceFragmentDoc}`; | ||
exports.SubscriptionScheduledUpdateDataFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment SubscriptionScheduledUpdateData on SubscriptionScheduledUpdate { | ||
subscriptionScheduleType | ||
scheduleStatus | ||
scheduledExecutionTime | ||
targetPackage { | ||
id | ||
refId | ||
displayName | ||
} | ||
scheduleVariables { | ||
... on DowngradeChangeVariables { | ||
addonRefIds | ||
billingPeriod | ||
downgradePlanRefId | ||
} | ||
... on BillingPeriodChangeVariables { | ||
billingPeriod | ||
} | ||
... on UnitAmountChangeVariables { | ||
newUnitAmount | ||
} | ||
} | ||
} | ||
`; | ||
exports.SubscriptionFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment SubscriptionFragment on CustomerSubscription { | ||
id: refId | ||
status | ||
id | ||
startDate | ||
@@ -746,6 +1088,14 @@ endDate | ||
effectiveEndDate | ||
status | ||
refId | ||
currentBillingPeriodEnd | ||
metadata: additionalMetaData | ||
additionalMetaData | ||
billingId | ||
billingLinkUrl | ||
experimentInfo { | ||
name | ||
groupType | ||
groupName | ||
id | ||
} | ||
prices { | ||
@@ -771,2 +1121,5 @@ usageLimit | ||
} | ||
scheduledUpdates { | ||
...SubscriptionScheduledUpdateData | ||
} | ||
} | ||
@@ -776,35 +1129,7 @@ ${exports.PriceFragmentDoc} | ||
${exports.PlanFragmentDoc} | ||
${exports.AddonFragmentDoc}`; | ||
exports.PromotionalEntitlementFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment PromotionalEntitlementFragment on PromotionalEntitlement { | ||
status | ||
usageLimit | ||
featureId | ||
hasUnlimitedUsage | ||
resetPeriod | ||
endDate | ||
isVisible | ||
feature { | ||
...FeatureFragment | ||
} | ||
} | ||
${exports.FeatureFragmentDoc}`; | ||
exports.CouponFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment CouponFragment on Coupon { | ||
id: refId | ||
name | ||
description | ||
type | ||
discountValue | ||
metadata: additionalMetaData | ||
createdAt | ||
updatedAt | ||
billingId | ||
billingLinkUrl | ||
status | ||
} | ||
`; | ||
${exports.AddonFragmentDoc} | ||
${exports.SubscriptionScheduledUpdateDataFragmentDoc}`; | ||
exports.CustomerFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment CustomerFragment on Customer { | ||
customerId | ||
id | ||
name | ||
@@ -814,53 +1139,121 @@ email | ||
updatedAt | ||
subscriptions { | ||
...SubscriptionFragment | ||
hasPaymentMethod | ||
refId | ||
billingId | ||
defaultPaymentExpirationMonth | ||
defaultPaymentExpirationYear | ||
defaultPaymentMethodLast4Digits | ||
additionalMetaData | ||
trialedPlans { | ||
productId | ||
productRefId | ||
planRefId | ||
planId | ||
} | ||
promotionalEntitlements { | ||
...PromotionalEntitlementFragment | ||
experimentInfo { | ||
groupType | ||
groupName | ||
id | ||
name | ||
} | ||
hasPaymentMethod | ||
coupon { | ||
...CouponFragment | ||
} | ||
billingId | ||
metadata: additionalMetaData | ||
email2: email | ||
eligibleForTrial { | ||
productId | ||
productRefId | ||
eligible | ||
} | ||
promotionalEntitlements { | ||
...PromotionalEntitlementFragment | ||
} | ||
subscriptions { | ||
...SubscriptionFragment | ||
} | ||
} | ||
${exports.SubscriptionFragmentDoc} | ||
${exports.CouponFragmentDoc} | ||
${exports.PromotionalEntitlementFragmentDoc} | ||
${exports.CouponFragmentDoc}`; | ||
exports.SlimSubscriptionFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment SlimSubscriptionFragment on CustomerSubscription { | ||
id: refId | ||
status | ||
metadata: additionalMetaData | ||
billingId | ||
billingLinkUrl | ||
effectiveEndDate | ||
currentBillingPeriodEnd | ||
pricingType | ||
prices { | ||
usageLimit | ||
price { | ||
...PriceFragment | ||
} | ||
${exports.SubscriptionFragmentDoc}`; | ||
exports.SubscriptionPreviewFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment SubscriptionPreviewFragment on SubscriptionPreview { | ||
subTotal { | ||
amount | ||
currency | ||
} | ||
totalPrice { | ||
...TotalPriceFragment | ||
total { | ||
amount | ||
currency | ||
} | ||
plan { | ||
id: refId | ||
billingPeriodRange { | ||
start | ||
end | ||
} | ||
addons { | ||
quantity | ||
addon { | ||
id: refId | ||
proration { | ||
prorationDate | ||
credit { | ||
amount | ||
currency | ||
} | ||
debit { | ||
amount | ||
currency | ||
} | ||
} | ||
customer { | ||
id: refId | ||
} | ||
`; | ||
exports.MonthlyResetPeriodConfigFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig { | ||
monthlyAccordingTo | ||
} | ||
`; | ||
exports.WeeklyResetPeriodConfigFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig { | ||
weeklyAccordingTo | ||
} | ||
`; | ||
exports.ResetPeriodConfigurationFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration { | ||
__typename | ||
... on MonthlyResetPeriodConfig { | ||
...MonthlyResetPeriodConfigFragment | ||
} | ||
... on WeeklyResetPeriodConfig { | ||
...WeeklyResetPeriodConfigFragment | ||
} | ||
} | ||
${exports.PriceFragmentDoc} | ||
${exports.TotalPriceFragmentDoc}`; | ||
${exports.MonthlyResetPeriodConfigFragmentDoc} | ||
${exports.WeeklyResetPeriodConfigFragmentDoc}`; | ||
exports.FeatureFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment FeatureFragment on EntitlementFeature { | ||
featureType | ||
meterType | ||
featureUnits | ||
featureUnitsPlural | ||
description | ||
displayName | ||
refId | ||
} | ||
`; | ||
exports.EntitlementFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment EntitlementFragment on Entitlement { | ||
isGranted | ||
accessDeniedReason | ||
customerId | ||
usageLimit | ||
hasUnlimitedUsage | ||
currentUsage | ||
requestedUsage | ||
entitlementUpdatedAt | ||
usageUpdatedAt | ||
nextResetDate | ||
resetPeriod | ||
resetPeriodConfiguration { | ||
...ResetPeriodConfigurationFragment | ||
} | ||
feature { | ||
...FeatureFragment | ||
} | ||
} | ||
${exports.ResetPeriodConfigurationFragmentDoc} | ||
${exports.FeatureFragmentDoc}`; | ||
exports.PaywallPackageEntitlementFragmentDoc = (0, graphql_tag_1.default) ` | ||
@@ -873,31 +1266,51 @@ fragment PaywallPackageEntitlementFragment on PackageEntitlement { | ||
feature { | ||
...FeatureFragment | ||
featureType | ||
meterType | ||
featureUnits | ||
featureUnitsPlural | ||
displayName | ||
description | ||
refId | ||
} | ||
} | ||
${exports.FeatureFragmentDoc}`; | ||
exports.PaywallPriceFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment PaywallPriceFragment on Price { | ||
billingModel | ||
billingPeriod | ||
price { | ||
amount | ||
currency | ||
`; | ||
exports.PaywallAddonFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment PaywallAddonFragment on Addon { | ||
id | ||
refId | ||
billingId | ||
displayName | ||
description | ||
entitlements { | ||
...PaywallPackageEntitlementFragment | ||
} | ||
feature { | ||
...FeatureFragment | ||
prices { | ||
...PriceFragment | ||
} | ||
additionalMetaData | ||
pricingType | ||
} | ||
${exports.FeatureFragmentDoc}`; | ||
${exports.PaywallPackageEntitlementFragmentDoc} | ||
${exports.PriceFragmentDoc}`; | ||
exports.PaywallPlanFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment PaywallPlanFragment on Plan { | ||
id: refId | ||
id | ||
refId | ||
description | ||
displayName | ||
billingId | ||
product { | ||
id: refId | ||
refId | ||
displayName | ||
description | ||
additionalMetaData | ||
productSettings { | ||
downgradePlan { | ||
refId | ||
displayName | ||
} | ||
} | ||
} | ||
basePlan { | ||
id: refId | ||
refId | ||
displayName | ||
@@ -908,3 +1321,3 @@ } | ||
} | ||
metadata: additionalMetaData | ||
additionalMetaData | ||
inheritedEntitlements { | ||
@@ -914,3 +1327,3 @@ ...PaywallPackageEntitlementFragment | ||
prices { | ||
...PaywallPriceFragment | ||
...PriceFragment | ||
} | ||
@@ -922,39 +1335,65 @@ pricingType | ||
} | ||
compatibleAddons { | ||
...PaywallAddonFragment | ||
} | ||
} | ||
${exports.PaywallPackageEntitlementFragmentDoc} | ||
${exports.PaywallPriceFragmentDoc}`; | ||
exports.PaywallAddonFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment PaywallAddonFragment on Addon { | ||
id: refId | ||
displayName | ||
description | ||
entitlements { | ||
...PaywallPackageEntitlementFragment | ||
${exports.PriceFragmentDoc} | ||
${exports.PaywallAddonFragmentDoc}`; | ||
exports.FontVariantFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment FontVariantFragment on FontVariant { | ||
fontSize | ||
fontWeight | ||
} | ||
`; | ||
exports.TypographyConfigurationFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment TypographyConfigurationFragment on TypographyConfiguration { | ||
fontFamily | ||
h1 { | ||
...FontVariantFragment | ||
} | ||
prices { | ||
...PaywallPriceFragment | ||
h2 { | ||
...FontVariantFragment | ||
} | ||
metadata: additionalMetaData | ||
pricingType | ||
h3 { | ||
...FontVariantFragment | ||
} | ||
body { | ||
...FontVariantFragment | ||
} | ||
} | ||
${exports.PaywallPackageEntitlementFragmentDoc} | ||
${exports.PaywallPriceFragmentDoc}`; | ||
exports.CreateCustomerDocument = (0, graphql_tag_1.default) ` | ||
mutation createCustomer($customerId: String!, $email: String, $name: String, $billingInfo: CustomerBillingInfo, $metadata: JSON, $couponId: String, $shouldSyncFree: Boolean) { | ||
createCustomer: createOneCustomer( | ||
input: {refId: $customerId, additionalMetaData: $metadata, billingInformation: $billingInfo, couponRefId: $couponId, email: $email, name: $name, shouldSyncFree: $shouldSyncFree} | ||
) { | ||
...CustomerFragment | ||
${exports.FontVariantFragmentDoc}`; | ||
exports.LayoutConfigurationFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment LayoutConfigurationFragment on PaywallLayoutConfiguration { | ||
alignment | ||
planWidth | ||
planMargin | ||
planPadding | ||
} | ||
`; | ||
exports.PaywallConfigurationFragmentDoc = (0, graphql_tag_1.default) ` | ||
fragment PaywallConfigurationFragment on PaywallConfiguration { | ||
palette { | ||
primary | ||
textColor | ||
backgroundColor | ||
borderColor | ||
currentPlanBackground | ||
} | ||
typography { | ||
...TypographyConfigurationFragment | ||
} | ||
layout { | ||
...LayoutConfigurationFragment | ||
} | ||
} | ||
${exports.CustomerFragmentDoc}`; | ||
${exports.TypographyConfigurationFragmentDoc} | ||
${exports.LayoutConfigurationFragmentDoc}`; | ||
exports.ProvisionCustomerDocument = (0, graphql_tag_1.default) ` | ||
mutation provisionCustomer($customerId: String!, $email: String, $name: String, $billingInfo: CustomerBillingInfo, $metadata: JSON, $couponId: String, $shouldSyncFree: Boolean, $subscriptionParams: SubscriptionBaseInput) { | ||
provisionCustomer( | ||
input: {refId: $customerId, additionalMetaData: $metadata, billingInformation: $billingInfo, couponRefId: $couponId, email: $email, name: $name, shouldSyncFree: $shouldSyncFree, subscriptionParams: $subscriptionParams} | ||
) { | ||
mutation provisionCustomer($input: ProvisionCustomerInput!) { | ||
provisionCustomer(input: $input) { | ||
customer { | ||
...CustomerFragment | ||
} | ||
subscriptionStrategyDecision | ||
subscriptionDecisionStrategy | ||
subscription { | ||
@@ -968,6 +1407,4 @@ ...SlimSubscriptionFragment | ||
exports.ImportCustomerDocument = (0, graphql_tag_1.default) ` | ||
mutation importCustomer($customerId: String!, $billingId: String!, $email: String, $name: String) { | ||
importCustomer: importOneCustomer( | ||
input: {refId: $customerId, billingId: $billingId, email: $email, name: $name} | ||
) { | ||
mutation importCustomer($input: ImportCustomerInput!) { | ||
importCustomer: importOneCustomer(input: $input) { | ||
...CustomerFragment | ||
@@ -978,6 +1415,4 @@ } | ||
exports.UpdateCustomerDocument = (0, graphql_tag_1.default) ` | ||
mutation updateCustomer($metadata: JSON, $billingInfo: CustomerBillingInfo, $couponId: String, $email: String, $name: String, $customerId: String!) { | ||
updateCustomer: updateOneCustomer( | ||
input: {refId: $customerId, name: $name, email: $email, couponRefId: $couponId, billingInformation: $billingInfo, additionalMetaData: $metadata} | ||
) { | ||
mutation updateCustomer($input: UpdateCustomerInput!) { | ||
updateCustomer: updateOneCustomer(input: $input) { | ||
...CustomerFragment | ||
@@ -987,16 +1422,16 @@ } | ||
${exports.CustomerFragmentDoc}`; | ||
exports.UpdateSubscriptionDocument = (0, graphql_tag_1.default) ` | ||
mutation updateSubscription($metadata: JSON, $subscriptionId: String!, $unitQuantity: Float) { | ||
updateSubscription: updateOneSubscription( | ||
input: {additionalMetaData: $metadata, refId: $subscriptionId, unitQuantity: $unitQuantity} | ||
) { | ||
...SlimSubscriptionFragment | ||
exports.ProvisionSubscriptionDocument = (0, graphql_tag_1.default) ` | ||
mutation provisionSubscription($input: ProvisionSubscriptionInput!) { | ||
provisionSubscriptionV2(input: $input) { | ||
checkoutUrl | ||
status | ||
subscription { | ||
...SlimSubscriptionFragment | ||
} | ||
} | ||
} | ||
${exports.SlimSubscriptionFragmentDoc}`; | ||
exports.CreateSubscriptionDocument = (0, graphql_tag_1.default) ` | ||
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) { | ||
createSubscription( | ||
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} | ||
) { | ||
exports.UpdateSubscriptionDocument = (0, graphql_tag_1.default) ` | ||
mutation updateSubscription($input: UpdateSubscriptionInput!) { | ||
updateSubscription: updateOneSubscription(input: $input) { | ||
...SlimSubscriptionFragment | ||
@@ -1007,6 +1442,4 @@ } | ||
exports.CancelSubscriptionDocument = (0, graphql_tag_1.default) ` | ||
mutation cancelSubscription($endDate: DateTime, $cancellationTime: SubscriptionCancellationTime, $subscriptionId: String!) { | ||
cancelSubscription( | ||
input: {subscriptionRefId: $subscriptionId, subscriptionCancellationTime: $cancellationTime, endDate: $endDate} | ||
) { | ||
mutation cancelSubscription($input: SubscriptionCancellationInput!) { | ||
cancelSubscription(input: $input) { | ||
...SlimSubscriptionFragment | ||
@@ -1017,7 +1450,4 @@ } | ||
exports.InitiateCheckoutDocument = (0, graphql_tag_1.default) ` | ||
mutation initiateCheckout($addons: [SubscriptionAddonInput!], $billingPeriod: BillingPeriod!, $cancelUrl: String!, $customerId: String!, $planId: String!, $successUrl: String!, $unitQuantity: Int) { | ||
initiateCheckout( | ||
input: {planId: $planId, billingPeriod: $billingPeriod, cancelUrl: $cancelUrl, customerId: $customerId, addons: $addons, unitQuantity: $unitQuantity, successUrl: $successUrl} | ||
) { | ||
id | ||
mutation initiateCheckout($input: InitiateCheckoutInput!) { | ||
initiateCheckout(input: $input) { | ||
checkoutUrl | ||
@@ -1028,10 +1458,27 @@ checkoutBillingId | ||
`; | ||
exports.EstimateSubscriptionDocument = (0, graphql_tag_1.default) ` | ||
mutation estimateSubscription($input: EstimateSubscriptionInput!) { | ||
estimateSubscription(input: $input) { | ||
...SubscriptionPreviewFragment | ||
} | ||
} | ||
${exports.SubscriptionPreviewFragmentDoc}`; | ||
exports.EstimateSubscriptionUpdateDocument = (0, graphql_tag_1.default) ` | ||
mutation estimateSubscriptionUpdate($input: EstimateSubscriptionUpdateInput!) { | ||
estimateSubscriptionUpdate(input: $input) { | ||
...SubscriptionPreviewFragment | ||
} | ||
} | ||
${exports.SubscriptionPreviewFragmentDoc}`; | ||
exports.ReportUsageDocument = (0, graphql_tag_1.default) ` | ||
mutation reportUsage($input: UsageMeasurementCreateInput!) { | ||
createUsageMeasurement(usageMeasurement: $input) { | ||
id | ||
} | ||
} | ||
`; | ||
exports.GetCustomerByIdDocument = (0, graphql_tag_1.default) ` | ||
query getCustomerById($customerId: String) { | ||
customers(filter: {refId: {eq: $customerId}}) { | ||
edges { | ||
node { | ||
...CustomerFragment | ||
} | ||
} | ||
query getCustomerById($input: GetCustomerByRefIdInput!) { | ||
getCustomerByRefId(input: $input) { | ||
...CustomerFragment | ||
} | ||
@@ -1051,8 +1498,36 @@ } | ||
${exports.CouponFragmentDoc}`; | ||
exports.GetPaywallDocument = (0, graphql_tag_1.default) ` | ||
query getPaywall($input: GetPaywallInput!) { | ||
paywall(input: $input) { | ||
plans { | ||
...PlanFragment | ||
} | ||
configuration { | ||
...PaywallConfigurationFragment | ||
} | ||
customer { | ||
...CustomerFragment | ||
} | ||
} | ||
} | ||
${exports.PlanFragmentDoc} | ||
${exports.PaywallConfigurationFragmentDoc} | ||
${exports.CustomerFragmentDoc}`; | ||
exports.GetEntitlementsDocument = (0, graphql_tag_1.default) ` | ||
query getEntitlements($query: FetchEntitlementsQuery!) { | ||
entitlements: cachedEntitlements(query: $query) { | ||
...EntitlementFragment | ||
} | ||
} | ||
${exports.EntitlementFragmentDoc}`; | ||
exports.GetEntitlementDocument = (0, graphql_tag_1.default) ` | ||
query getEntitlement($query: FetchEntitlementQuery!) { | ||
entitlement(query: $query) { | ||
...EntitlementFragment | ||
} | ||
} | ||
${exports.EntitlementFragmentDoc}`; | ||
const defaultWrapper = (action, _operationName, _operationType) => action(); | ||
function getSdk(client, withWrapper = defaultWrapper) { | ||
return { | ||
createCustomer(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.CreateCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createCustomer', 'mutation'); | ||
}, | ||
provisionCustomer(variables, requestHeaders) { | ||
@@ -1067,8 +1542,8 @@ return withWrapper((wrappedRequestHeaders) => client.request(exports.ProvisionCustomerDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'provisionCustomer', 'mutation'); | ||
}, | ||
provisionSubscription(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.ProvisionSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'provisionSubscription', 'mutation'); | ||
}, | ||
updateSubscription(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.UpdateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateSubscription', 'mutation'); | ||
}, | ||
createSubscription(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.CreateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createSubscription', 'mutation'); | ||
}, | ||
cancelSubscription(variables, requestHeaders) { | ||
@@ -1080,2 +1555,11 @@ return withWrapper((wrappedRequestHeaders) => client.request(exports.CancelSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'cancelSubscription', 'mutation'); | ||
}, | ||
estimateSubscription(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.EstimateSubscriptionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'estimateSubscription', 'mutation'); | ||
}, | ||
estimateSubscriptionUpdate(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.EstimateSubscriptionUpdateDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'estimateSubscriptionUpdate', 'mutation'); | ||
}, | ||
reportUsage(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.ReportUsageDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'reportUsage', 'mutation'); | ||
}, | ||
getCustomerById(variables, requestHeaders) { | ||
@@ -1086,2 +1570,11 @@ return withWrapper((wrappedRequestHeaders) => client.request(exports.GetCustomerByIdDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCustomerById', 'query'); | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetCouponsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCoupons', 'query'); | ||
}, | ||
getPaywall(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetPaywallDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getPaywall', 'query'); | ||
}, | ||
getEntitlements(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetEntitlementsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEntitlements', 'query'); | ||
}, | ||
getEntitlement(variables, requestHeaders) { | ||
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetEntitlementDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEntitlement', 'query'); | ||
} | ||
@@ -1088,0 +1581,0 @@ }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
222585
5091