@stigg/js-client-sdk 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/MockPaywallApi.d.ts +3 -1
- package/dist/api/PaywallApi.d.ts +7 -2
- package/dist/api/fragments/customerFragment.d.ts +1 -0
- package/dist/api/generated/types.d.ts +257 -179
- package/dist/client.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +9 -1
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
2
|
import { GetMockPaywallQuery } from './generated/types';
|
|
3
|
+
import { GetPaywallProps } from './PaywallApi';
|
|
4
|
+
declare type GetMockPaywallProps = GetPaywallProps;
|
|
3
5
|
declare class MockPaywallApi {
|
|
4
6
|
private readonly client;
|
|
5
7
|
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
6
|
-
getMockPaywall(productId
|
|
8
|
+
getMockPaywall({ productId, customerId, context }: GetMockPaywallProps): Promise<import("@apollo/client/core").ApolloQueryResult<GetMockPaywallQuery>>;
|
|
7
9
|
}
|
|
8
10
|
export default MockPaywallApi;
|
package/dist/api/PaywallApi.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
-
import { GetPaywallQuery } from './generated/types';
|
|
2
|
+
import { GetPaywallQuery, WidgetType } from './generated/types';
|
|
3
3
|
export declare const TYPOGRAPHY_CONFIGURATION: import("graphql/language/ast").DocumentNode;
|
|
4
4
|
export declare const PAYWALL_CONFIGURATION: import("graphql/language/ast").DocumentNode;
|
|
5
|
+
export declare type GetPaywallProps = {
|
|
6
|
+
productId?: string;
|
|
7
|
+
customerId?: string | null;
|
|
8
|
+
context?: WidgetType;
|
|
9
|
+
};
|
|
5
10
|
declare class PaywallApi {
|
|
6
11
|
private readonly client;
|
|
7
12
|
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
8
|
-
getPaywall(productId
|
|
13
|
+
getPaywall({ productId, customerId, context }: GetPaywallProps): Promise<import("@apollo/client/core").ApolloQueryResult<GetPaywallQuery>>;
|
|
9
14
|
}
|
|
10
15
|
export default PaywallApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CUSTOMER_FRAGMENT: import("graphql/language/ast").DocumentNode;
|
|
@@ -315,6 +315,7 @@ export declare type CreateEnvironment = {
|
|
|
315
315
|
createdAt?: InputMaybe<Scalars['DateTime']>;
|
|
316
316
|
description?: InputMaybe<Scalars['String']>;
|
|
317
317
|
displayName?: InputMaybe<Scalars['String']>;
|
|
318
|
+
hardenClientAccessEnabled?: InputMaybe<Scalars['Boolean']>;
|
|
318
319
|
id?: InputMaybe<Scalars['String']>;
|
|
319
320
|
provisionStatus?: InputMaybe<EnvironmentProvisionStatus>;
|
|
320
321
|
slug?: InputMaybe<Scalars['String']>;
|
|
@@ -432,6 +433,7 @@ export declare type CustomerFilterCustomerSubscriptionFilter = {
|
|
|
432
433
|
endDate?: InputMaybe<DateFieldComparison>;
|
|
433
434
|
environmentId?: InputMaybe<StringFieldComparison>;
|
|
434
435
|
id?: InputMaybe<StringFieldComparison>;
|
|
436
|
+
oldBillingId?: InputMaybe<StringFieldComparison>;
|
|
435
437
|
or?: InputMaybe<Array<CustomerFilterCustomerSubscriptionFilter>>;
|
|
436
438
|
pricingType?: InputMaybe<PricingTypeFilterComparison>;
|
|
437
439
|
refId?: InputMaybe<StringFieldComparison>;
|
|
@@ -512,6 +514,7 @@ export declare type CustomerSubscriptionFilter = {
|
|
|
512
514
|
endDate?: InputMaybe<DateFieldComparison>;
|
|
513
515
|
environmentId?: InputMaybe<StringFieldComparison>;
|
|
514
516
|
id?: InputMaybe<StringFieldComparison>;
|
|
517
|
+
oldBillingId?: InputMaybe<StringFieldComparison>;
|
|
515
518
|
or?: InputMaybe<Array<CustomerSubscriptionFilter>>;
|
|
516
519
|
prices?: InputMaybe<CustomerSubscriptionFilterSubscriptionPriceFilter>;
|
|
517
520
|
pricingType?: InputMaybe<PricingTypeFilterComparison>;
|
|
@@ -569,6 +572,7 @@ export declare enum CustomerSubscriptionSortFields {
|
|
|
569
572
|
EndDate = "endDate",
|
|
570
573
|
EnvironmentId = "environmentId",
|
|
571
574
|
Id = "id",
|
|
575
|
+
OldBillingId = "oldBillingId",
|
|
572
576
|
PricingType = "pricingType",
|
|
573
577
|
RefId = "refId",
|
|
574
578
|
StartDate = "startDate",
|
|
@@ -708,6 +712,7 @@ export declare enum ErrorCode {
|
|
|
708
712
|
AddonHasToHavePriceError = "AddonHasToHavePriceError",
|
|
709
713
|
AddonNotFound = "AddonNotFound",
|
|
710
714
|
ArchivedCouponCantBeApplied = "ArchivedCouponCantBeApplied",
|
|
715
|
+
AuthCustomerMismatch = "AuthCustomerMismatch",
|
|
711
716
|
BadUserInput = "BadUserInput",
|
|
712
717
|
BillingPeriodMissingError = "BillingPeriodMissingError",
|
|
713
718
|
CannotDeleteCustomerError = "CannotDeleteCustomerError",
|
|
@@ -721,6 +726,7 @@ export declare enum ErrorCode {
|
|
|
721
726
|
CustomerHasNoPaymentMethod = "CustomerHasNoPaymentMethod",
|
|
722
727
|
CustomerNoBillingId = "CustomerNoBillingId",
|
|
723
728
|
CustomerNotFound = "CustomerNotFound",
|
|
729
|
+
DowngradeBillingPeriodNotSupportedError = "DowngradeBillingPeriodNotSupportedError",
|
|
724
730
|
DraftPlanCantBeArchived = "DraftPlanCantBeArchived",
|
|
725
731
|
DuplicatedEntityNotAllowed = "DuplicatedEntityNotAllowed",
|
|
726
732
|
EditAllowedOnDraftPackageOnlyError = "EditAllowedOnDraftPackageOnlyError",
|
|
@@ -730,6 +736,7 @@ export declare enum ErrorCode {
|
|
|
730
736
|
ExperimentAlreadyRunning = "ExperimentAlreadyRunning",
|
|
731
737
|
ExperimentNotFoundError = "ExperimentNotFoundError",
|
|
732
738
|
ExperimentStatusError = "ExperimentStatusError",
|
|
739
|
+
FailedToCreateCheckoutSessionError = "FailedToCreateCheckoutSessionError",
|
|
733
740
|
FailedToImportCustomer = "FailedToImportCustomer",
|
|
734
741
|
FeatureNotFound = "FeatureNotFound",
|
|
735
742
|
IdentityForbidden = "IdentityForbidden",
|
|
@@ -755,6 +762,7 @@ export declare enum ErrorCode {
|
|
|
755
762
|
PackageAlreadyPublished = "PackageAlreadyPublished",
|
|
756
763
|
PackagePricingTypeNotSet = "PackagePricingTypeNotSet",
|
|
757
764
|
PlanAlreadyExtended = "PlanAlreadyExtended",
|
|
765
|
+
PlanCannotBePublishWhenBasePlanIsDraft = "PlanCannotBePublishWhenBasePlanIsDraft",
|
|
758
766
|
PlanIsUsedAsDefaultStartPlan = "PlanIsUsedAsDefaultStartPlan",
|
|
759
767
|
PlanIsUsedAsDowngradePlan = "PlanIsUsedAsDowngradePlan",
|
|
760
768
|
PlanNotFound = "PlanNotFound",
|
|
@@ -1081,6 +1089,7 @@ export declare type HubspotCredentialsInput = {
|
|
|
1081
1089
|
refreshToken?: InputMaybe<Scalars['String']>;
|
|
1082
1090
|
};
|
|
1083
1091
|
export declare type ImportCustomerInput = {
|
|
1092
|
+
additionalMetaData?: InputMaybe<Scalars['JSON']>;
|
|
1084
1093
|
billingId: Scalars['String'];
|
|
1085
1094
|
customerId?: InputMaybe<Scalars['String']>;
|
|
1086
1095
|
email?: InputMaybe<Scalars['String']>;
|
|
@@ -1334,9 +1343,12 @@ export declare type PackageEntitlementFilterPackageDtoFilter = {
|
|
|
1334
1343
|
};
|
|
1335
1344
|
export declare type PackageEntitlementInput = {
|
|
1336
1345
|
description?: InputMaybe<Scalars['String']>;
|
|
1346
|
+
displayNameOverride?: InputMaybe<Scalars['String']>;
|
|
1337
1347
|
environmentId: Scalars['String'];
|
|
1338
1348
|
featureId: Scalars['String'];
|
|
1339
1349
|
hasUnlimitedUsage?: InputMaybe<Scalars['Boolean']>;
|
|
1350
|
+
hiddenFromWidgets?: InputMaybe<Array<WidgetType>>;
|
|
1351
|
+
isCustom?: InputMaybe<Scalars['Boolean']>;
|
|
1340
1352
|
monthlyResetPeriodConfiguration?: InputMaybe<MonthlyResetPeriodConfigInput>;
|
|
1341
1353
|
order?: InputMaybe<Scalars['Float']>;
|
|
1342
1354
|
packageId: Scalars['String'];
|
|
@@ -1361,6 +1373,7 @@ export declare type PackageEntitlementUpdateInput = {
|
|
|
1361
1373
|
displayNameOverride?: InputMaybe<Scalars['String']>;
|
|
1362
1374
|
hasUnlimitedUsage?: InputMaybe<Scalars['Boolean']>;
|
|
1363
1375
|
hiddenFromWidgets?: InputMaybe<Array<WidgetType>>;
|
|
1376
|
+
isCustom?: InputMaybe<Scalars['Boolean']>;
|
|
1364
1377
|
monthlyResetPeriodConfiguration?: InputMaybe<MonthlyResetPeriodConfigInput>;
|
|
1365
1378
|
order?: InputMaybe<Scalars['Float']>;
|
|
1366
1379
|
resetPeriod?: InputMaybe<EntitlementResetPeriod>;
|
|
@@ -1603,6 +1616,7 @@ export declare type ProductFilter = {
|
|
|
1603
1616
|
updatedAt?: InputMaybe<DateFieldComparison>;
|
|
1604
1617
|
};
|
|
1605
1618
|
export declare type ProductSettingsInput = {
|
|
1619
|
+
downgradeAtEndOfBillingPeriod?: InputMaybe<Scalars['String']>;
|
|
1606
1620
|
downgradePlanId?: InputMaybe<Scalars['String']>;
|
|
1607
1621
|
subscriptionCancellationTime: SubscriptionCancellationTime;
|
|
1608
1622
|
subscriptionEndSetup: SubscriptionEndSetup;
|
|
@@ -1955,6 +1969,7 @@ export declare type SubscriptionAddonFilterCustomerSubscriptionFilter = {
|
|
|
1955
1969
|
endDate?: InputMaybe<DateFieldComparison>;
|
|
1956
1970
|
environmentId?: InputMaybe<StringFieldComparison>;
|
|
1957
1971
|
id?: InputMaybe<StringFieldComparison>;
|
|
1972
|
+
oldBillingId?: InputMaybe<StringFieldComparison>;
|
|
1958
1973
|
or?: InputMaybe<Array<SubscriptionAddonFilterCustomerSubscriptionFilter>>;
|
|
1959
1974
|
pricingType?: InputMaybe<PricingTypeFilterComparison>;
|
|
1960
1975
|
refId?: InputMaybe<StringFieldComparison>;
|
|
@@ -2106,6 +2121,7 @@ export declare type SubscriptionPriceFilterCustomerSubscriptionFilter = {
|
|
|
2106
2121
|
endDate?: InputMaybe<DateFieldComparison>;
|
|
2107
2122
|
environmentId?: InputMaybe<StringFieldComparison>;
|
|
2108
2123
|
id?: InputMaybe<StringFieldComparison>;
|
|
2124
|
+
oldBillingId?: InputMaybe<StringFieldComparison>;
|
|
2109
2125
|
or?: InputMaybe<Array<SubscriptionPriceFilterCustomerSubscriptionFilter>>;
|
|
2110
2126
|
pricingType?: InputMaybe<PricingTypeFilterComparison>;
|
|
2111
2127
|
refId?: InputMaybe<StringFieldComparison>;
|
|
@@ -2133,6 +2149,56 @@ export declare enum SubscriptionPriceSortFields {
|
|
|
2133
2149
|
UpdatedAt = "updatedAt",
|
|
2134
2150
|
UsageLimit = "usageLimit"
|
|
2135
2151
|
}
|
|
2152
|
+
/** Subscription scheduled schedule status */
|
|
2153
|
+
export declare enum SubscriptionScheduleStatus {
|
|
2154
|
+
Canceled = "Canceled",
|
|
2155
|
+
Done = "Done",
|
|
2156
|
+
Failed = "Failed",
|
|
2157
|
+
Scheduled = "Scheduled"
|
|
2158
|
+
}
|
|
2159
|
+
/** Subscription scheduled schedule type */
|
|
2160
|
+
export declare enum SubscriptionScheduleType {
|
|
2161
|
+
BillingPeriod = "BillingPeriod",
|
|
2162
|
+
Downgrade = "Downgrade",
|
|
2163
|
+
UnitAmount = "UnitAmount"
|
|
2164
|
+
}
|
|
2165
|
+
export declare type SubscriptionScheduledUpdateFilter = {
|
|
2166
|
+
and?: InputMaybe<Array<SubscriptionScheduledUpdateFilter>>;
|
|
2167
|
+
createdAt?: InputMaybe<DateFieldComparison>;
|
|
2168
|
+
or?: InputMaybe<Array<SubscriptionScheduledUpdateFilter>>;
|
|
2169
|
+
scheduledExecutionTime?: InputMaybe<DateFieldComparison>;
|
|
2170
|
+
subscription?: InputMaybe<SubscriptionScheduledUpdateFilterCustomerSubscriptionFilter>;
|
|
2171
|
+
};
|
|
2172
|
+
export declare type SubscriptionScheduledUpdateFilterCustomerSubscriptionFilter = {
|
|
2173
|
+
and?: InputMaybe<Array<SubscriptionScheduledUpdateFilterCustomerSubscriptionFilter>>;
|
|
2174
|
+
billingId?: InputMaybe<StringFieldComparison>;
|
|
2175
|
+
cancelReason?: InputMaybe<SubscriptionCancelReasonFilterComparison>;
|
|
2176
|
+
cancellationDate?: InputMaybe<DateFieldComparison>;
|
|
2177
|
+
createdAt?: InputMaybe<DateFieldComparison>;
|
|
2178
|
+
crmId?: InputMaybe<StringFieldComparison>;
|
|
2179
|
+
crmLinkUrl?: InputMaybe<StringFieldComparison>;
|
|
2180
|
+
effectiveEndDate?: InputMaybe<DateFieldComparison>;
|
|
2181
|
+
endDate?: InputMaybe<DateFieldComparison>;
|
|
2182
|
+
environmentId?: InputMaybe<StringFieldComparison>;
|
|
2183
|
+
id?: InputMaybe<StringFieldComparison>;
|
|
2184
|
+
oldBillingId?: InputMaybe<StringFieldComparison>;
|
|
2185
|
+
or?: InputMaybe<Array<SubscriptionScheduledUpdateFilterCustomerSubscriptionFilter>>;
|
|
2186
|
+
pricingType?: InputMaybe<PricingTypeFilterComparison>;
|
|
2187
|
+
refId?: InputMaybe<StringFieldComparison>;
|
|
2188
|
+
startDate?: InputMaybe<DateFieldComparison>;
|
|
2189
|
+
status?: InputMaybe<SubscriptionStatusFilterComparison>;
|
|
2190
|
+
subscriptionId?: InputMaybe<StringFieldComparison>;
|
|
2191
|
+
trialEndDate?: InputMaybe<DateFieldComparison>;
|
|
2192
|
+
};
|
|
2193
|
+
export declare type SubscriptionScheduledUpdateSort = {
|
|
2194
|
+
direction: SortDirection;
|
|
2195
|
+
field: SubscriptionScheduledUpdateSortFields;
|
|
2196
|
+
nulls?: InputMaybe<SortNulls>;
|
|
2197
|
+
};
|
|
2198
|
+
export declare enum SubscriptionScheduledUpdateSortFields {
|
|
2199
|
+
CreatedAt = "createdAt",
|
|
2200
|
+
ScheduledExecutionTime = "scheduledExecutionTime"
|
|
2201
|
+
}
|
|
2136
2202
|
export declare enum SubscriptionStartSetup {
|
|
2137
2203
|
FreePlan = "FREE_PLAN",
|
|
2138
2204
|
PlanSelection = "PLAN_SELECTION",
|
|
@@ -2266,8 +2332,10 @@ export declare type UpdateEnvironment = {
|
|
|
2266
2332
|
createdAt?: InputMaybe<Scalars['DateTime']>;
|
|
2267
2333
|
description?: InputMaybe<Scalars['String']>;
|
|
2268
2334
|
displayName?: InputMaybe<Scalars['String']>;
|
|
2335
|
+
hardenClientAccessEnabled?: InputMaybe<Scalars['Boolean']>;
|
|
2269
2336
|
id?: InputMaybe<Scalars['String']>;
|
|
2270
2337
|
provisionStatus?: InputMaybe<EnvironmentProvisionStatus>;
|
|
2338
|
+
signingToken?: InputMaybe<Scalars['String']>;
|
|
2271
2339
|
slug?: InputMaybe<Scalars['String']>;
|
|
2272
2340
|
};
|
|
2273
2341
|
export declare type UpdateExperimentInput = {
|
|
@@ -2372,6 +2440,7 @@ export declare type UpdatePackageEntitlementOrderItemInput = {
|
|
|
2372
2440
|
export declare type UpdateSubscriptionInput = {
|
|
2373
2441
|
additionalMetaData?: InputMaybe<Scalars['JSON']>;
|
|
2374
2442
|
addons?: InputMaybe<Array<SubscriptionAddonInput>>;
|
|
2443
|
+
billingPeriod?: InputMaybe<BillingPeriod>;
|
|
2375
2444
|
environmentId?: InputMaybe<Scalars['String']>;
|
|
2376
2445
|
promotionCode?: InputMaybe<Scalars['String']>;
|
|
2377
2446
|
refId?: InputMaybe<Scalars['String']>;
|
|
@@ -2541,185 +2610,6 @@ export declare type FetchCouponsQuery = {
|
|
|
2541
2610
|
}>;
|
|
2542
2611
|
};
|
|
2543
2612
|
};
|
|
2544
|
-
export declare type TotalPriceFragment = {
|
|
2545
|
-
__typename?: 'CustomerSubscriptionTotalPrice';
|
|
2546
|
-
subTotal: {
|
|
2547
|
-
__typename?: 'Money';
|
|
2548
|
-
amount: number;
|
|
2549
|
-
currency: Currency;
|
|
2550
|
-
};
|
|
2551
|
-
total: {
|
|
2552
|
-
__typename?: 'Money';
|
|
2553
|
-
amount: number;
|
|
2554
|
-
currency: Currency;
|
|
2555
|
-
};
|
|
2556
|
-
};
|
|
2557
|
-
export declare type SubscriptionFragment = {
|
|
2558
|
-
__typename?: 'CustomerSubscription';
|
|
2559
|
-
id: string;
|
|
2560
|
-
startDate: any;
|
|
2561
|
-
endDate?: any | null | undefined;
|
|
2562
|
-
trialEndDate?: any | null | undefined;
|
|
2563
|
-
cancellationDate?: any | null | undefined;
|
|
2564
|
-
effectiveEndDate?: any | null | undefined;
|
|
2565
|
-
status: SubscriptionStatus;
|
|
2566
|
-
refId: string;
|
|
2567
|
-
currentBillingPeriodEnd?: any | null | undefined;
|
|
2568
|
-
additionalMetaData?: any | null | undefined;
|
|
2569
|
-
pricingType: PricingType;
|
|
2570
|
-
experimentInfo?: {
|
|
2571
|
-
__typename?: 'experimentInfo';
|
|
2572
|
-
name: string;
|
|
2573
|
-
groupName: string;
|
|
2574
|
-
groupType: ExperimentGroupType;
|
|
2575
|
-
id: string;
|
|
2576
|
-
} | null | undefined;
|
|
2577
|
-
prices?: Array<{
|
|
2578
|
-
__typename?: 'SubscriptionPrice';
|
|
2579
|
-
usageLimit?: number | null | undefined;
|
|
2580
|
-
price?: ({
|
|
2581
|
-
__typename?: 'Price';
|
|
2582
|
-
} & PriceFragment) | null | undefined;
|
|
2583
|
-
}> | null | undefined;
|
|
2584
|
-
totalPrice?: ({
|
|
2585
|
-
__typename?: 'CustomerSubscriptionTotalPrice';
|
|
2586
|
-
} & TotalPriceFragment) | null | undefined;
|
|
2587
|
-
plan: {
|
|
2588
|
-
__typename?: 'Plan';
|
|
2589
|
-
id: string;
|
|
2590
|
-
refId: string;
|
|
2591
|
-
displayName: string;
|
|
2592
|
-
description?: string | null | undefined;
|
|
2593
|
-
additionalMetaData?: any | null | undefined;
|
|
2594
|
-
product: {
|
|
2595
|
-
__typename?: 'Product';
|
|
2596
|
-
refId: string;
|
|
2597
|
-
displayName?: string | null | undefined;
|
|
2598
|
-
};
|
|
2599
|
-
entitlements?: Array<{
|
|
2600
|
-
__typename?: 'PackageEntitlement';
|
|
2601
|
-
usageLimit?: number | null | undefined;
|
|
2602
|
-
featureId: string;
|
|
2603
|
-
hasUnlimitedUsage?: boolean | null | undefined;
|
|
2604
|
-
packageId: string;
|
|
2605
|
-
resetPeriod?: EntitlementResetPeriod | null | undefined;
|
|
2606
|
-
feature: {
|
|
2607
|
-
__typename?: 'Feature';
|
|
2608
|
-
featureType: FeatureType;
|
|
2609
|
-
meterType?: MeterType | null | undefined;
|
|
2610
|
-
featureUnits?: string | null | undefined;
|
|
2611
|
-
featureUnitsPlural?: string | null | undefined;
|
|
2612
|
-
displayName: string;
|
|
2613
|
-
description?: string | null | undefined;
|
|
2614
|
-
refId: string;
|
|
2615
|
-
};
|
|
2616
|
-
}> | null | undefined;
|
|
2617
|
-
inheritedEntitlements?: Array<{
|
|
2618
|
-
__typename?: 'PackageEntitlement';
|
|
2619
|
-
usageLimit?: number | null | undefined;
|
|
2620
|
-
featureId: string;
|
|
2621
|
-
hasUnlimitedUsage?: boolean | null | undefined;
|
|
2622
|
-
packageId: string;
|
|
2623
|
-
resetPeriod?: EntitlementResetPeriod | null | undefined;
|
|
2624
|
-
feature: {
|
|
2625
|
-
__typename?: 'Feature';
|
|
2626
|
-
featureType: FeatureType;
|
|
2627
|
-
meterType?: MeterType | null | undefined;
|
|
2628
|
-
featureUnits?: string | null | undefined;
|
|
2629
|
-
featureUnitsPlural?: string | null | undefined;
|
|
2630
|
-
displayName: string;
|
|
2631
|
-
description?: string | null | undefined;
|
|
2632
|
-
refId: string;
|
|
2633
|
-
};
|
|
2634
|
-
}> | null | undefined;
|
|
2635
|
-
prices?: Array<{
|
|
2636
|
-
__typename?: 'Price';
|
|
2637
|
-
} & PriceFragment> | null | undefined;
|
|
2638
|
-
};
|
|
2639
|
-
addons?: Array<{
|
|
2640
|
-
__typename?: 'SubscriptionAddon';
|
|
2641
|
-
id: string;
|
|
2642
|
-
quantity: number;
|
|
2643
|
-
addon: {
|
|
2644
|
-
__typename?: 'Addon';
|
|
2645
|
-
id: string;
|
|
2646
|
-
refId: string;
|
|
2647
|
-
displayName: string;
|
|
2648
|
-
description?: string | null | undefined;
|
|
2649
|
-
additionalMetaData?: any | null | undefined;
|
|
2650
|
-
entitlements?: Array<{
|
|
2651
|
-
__typename?: 'PackageEntitlement';
|
|
2652
|
-
usageLimit?: number | null | undefined;
|
|
2653
|
-
hasUnlimitedUsage?: boolean | null | undefined;
|
|
2654
|
-
featureId: string;
|
|
2655
|
-
feature: {
|
|
2656
|
-
__typename?: 'Feature';
|
|
2657
|
-
featureType: FeatureType;
|
|
2658
|
-
meterType?: MeterType | null | undefined;
|
|
2659
|
-
featureUnits?: string | null | undefined;
|
|
2660
|
-
featureUnitsPlural?: string | null | undefined;
|
|
2661
|
-
displayName: string;
|
|
2662
|
-
description?: string | null | undefined;
|
|
2663
|
-
refId: string;
|
|
2664
|
-
};
|
|
2665
|
-
}> | null | undefined;
|
|
2666
|
-
};
|
|
2667
|
-
}> | null | undefined;
|
|
2668
|
-
};
|
|
2669
|
-
export declare type PromotionalEntitlementFragment = {
|
|
2670
|
-
__typename?: 'PromotionalEntitlement';
|
|
2671
|
-
status: PromotionalEntitlementStatus;
|
|
2672
|
-
usageLimit?: number | null | undefined;
|
|
2673
|
-
featureId: string;
|
|
2674
|
-
hasUnlimitedUsage?: boolean | null | undefined;
|
|
2675
|
-
resetPeriod?: EntitlementResetPeriod | null | undefined;
|
|
2676
|
-
endDate?: any | null | undefined;
|
|
2677
|
-
isVisible: boolean;
|
|
2678
|
-
feature: {
|
|
2679
|
-
__typename?: 'Feature';
|
|
2680
|
-
featureType: FeatureType;
|
|
2681
|
-
meterType?: MeterType | null | undefined;
|
|
2682
|
-
featureUnits?: string | null | undefined;
|
|
2683
|
-
featureUnitsPlural?: string | null | undefined;
|
|
2684
|
-
displayName: string;
|
|
2685
|
-
description?: string | null | undefined;
|
|
2686
|
-
refId: string;
|
|
2687
|
-
};
|
|
2688
|
-
};
|
|
2689
|
-
export declare type CustomerFragment = {
|
|
2690
|
-
__typename?: 'Customer';
|
|
2691
|
-
id: string;
|
|
2692
|
-
name?: string | null | undefined;
|
|
2693
|
-
email?: string | null | undefined;
|
|
2694
|
-
createdAt?: any | null | undefined;
|
|
2695
|
-
updatedAt: any;
|
|
2696
|
-
hasPaymentMethod: boolean;
|
|
2697
|
-
refId: string;
|
|
2698
|
-
additionalMetaData?: any | null | undefined;
|
|
2699
|
-
defaultPaymentExpirationMonth?: number | null | undefined;
|
|
2700
|
-
defaultPaymentExpirationYear?: number | null | undefined;
|
|
2701
|
-
defaultPaymentMethodLast4Digits?: string | null | undefined;
|
|
2702
|
-
experimentInfo?: {
|
|
2703
|
-
__typename?: 'experimentInfo';
|
|
2704
|
-
name: string;
|
|
2705
|
-
groupType: ExperimentGroupType;
|
|
2706
|
-
groupName: string;
|
|
2707
|
-
id: string;
|
|
2708
|
-
} | null | undefined;
|
|
2709
|
-
trialedPlans?: Array<{
|
|
2710
|
-
__typename?: 'TrialedPlan';
|
|
2711
|
-
productId?: string | null | undefined;
|
|
2712
|
-
productRefId?: string | null | undefined;
|
|
2713
|
-
planRefId?: string | null | undefined;
|
|
2714
|
-
planId?: string | null | undefined;
|
|
2715
|
-
}> | null | undefined;
|
|
2716
|
-
promotionalEntitlements: Array<{
|
|
2717
|
-
__typename?: 'PromotionalEntitlement';
|
|
2718
|
-
} & PromotionalEntitlementFragment>;
|
|
2719
|
-
subscriptions?: Array<{
|
|
2720
|
-
__typename?: 'CustomerSubscription';
|
|
2721
|
-
} & SubscriptionFragment> | null | undefined;
|
|
2722
|
-
};
|
|
2723
2613
|
export declare type CustomerPortalEntitlementFragment = {
|
|
2724
2614
|
__typename?: 'Entitlement';
|
|
2725
2615
|
isGranted: boolean;
|
|
@@ -3156,6 +3046,9 @@ export declare type GetPaywallQuery = {
|
|
|
3156
3046
|
configuration?: ({
|
|
3157
3047
|
__typename?: 'PaywallConfiguration';
|
|
3158
3048
|
} & PaywallConfigurationFragment) | null | undefined;
|
|
3049
|
+
customer?: ({
|
|
3050
|
+
__typename?: 'Customer';
|
|
3051
|
+
} & CustomerFragment) | null | undefined;
|
|
3159
3052
|
};
|
|
3160
3053
|
};
|
|
3161
3054
|
export declare type SdkConfigurationQueryVariables = Exact<{
|
|
@@ -3169,6 +3062,191 @@ export declare type SdkConfigurationQuery = {
|
|
|
3169
3062
|
isWidgetWatermarkEnabled?: boolean | null | undefined;
|
|
3170
3063
|
} | null | undefined;
|
|
3171
3064
|
};
|
|
3065
|
+
export declare type TotalPriceFragment = {
|
|
3066
|
+
__typename?: 'CustomerSubscriptionTotalPrice';
|
|
3067
|
+
subTotal: {
|
|
3068
|
+
__typename?: 'Money';
|
|
3069
|
+
amount: number;
|
|
3070
|
+
currency: Currency;
|
|
3071
|
+
};
|
|
3072
|
+
total: {
|
|
3073
|
+
__typename?: 'Money';
|
|
3074
|
+
amount: number;
|
|
3075
|
+
currency: Currency;
|
|
3076
|
+
};
|
|
3077
|
+
};
|
|
3078
|
+
export declare type SubscriptionFragment = {
|
|
3079
|
+
__typename?: 'CustomerSubscription';
|
|
3080
|
+
id: string;
|
|
3081
|
+
startDate: any;
|
|
3082
|
+
endDate?: any | null | undefined;
|
|
3083
|
+
trialEndDate?: any | null | undefined;
|
|
3084
|
+
cancellationDate?: any | null | undefined;
|
|
3085
|
+
effectiveEndDate?: any | null | undefined;
|
|
3086
|
+
status: SubscriptionStatus;
|
|
3087
|
+
refId: string;
|
|
3088
|
+
currentBillingPeriodEnd?: any | null | undefined;
|
|
3089
|
+
additionalMetaData?: any | null | undefined;
|
|
3090
|
+
pricingType: PricingType;
|
|
3091
|
+
experimentInfo?: {
|
|
3092
|
+
__typename?: 'experimentInfo';
|
|
3093
|
+
name: string;
|
|
3094
|
+
groupName: string;
|
|
3095
|
+
groupType: ExperimentGroupType;
|
|
3096
|
+
id: string;
|
|
3097
|
+
} | null | undefined;
|
|
3098
|
+
prices?: Array<{
|
|
3099
|
+
__typename?: 'SubscriptionPrice';
|
|
3100
|
+
usageLimit?: number | null | undefined;
|
|
3101
|
+
price?: ({
|
|
3102
|
+
__typename?: 'Price';
|
|
3103
|
+
} & PriceFragment) | null | undefined;
|
|
3104
|
+
}> | null | undefined;
|
|
3105
|
+
totalPrice?: ({
|
|
3106
|
+
__typename?: 'CustomerSubscriptionTotalPrice';
|
|
3107
|
+
} & TotalPriceFragment) | null | undefined;
|
|
3108
|
+
plan: {
|
|
3109
|
+
__typename?: 'Plan';
|
|
3110
|
+
id: string;
|
|
3111
|
+
refId: string;
|
|
3112
|
+
displayName: string;
|
|
3113
|
+
description?: string | null | undefined;
|
|
3114
|
+
additionalMetaData?: any | null | undefined;
|
|
3115
|
+
product: {
|
|
3116
|
+
__typename?: 'Product';
|
|
3117
|
+
refId: string;
|
|
3118
|
+
displayName?: string | null | undefined;
|
|
3119
|
+
};
|
|
3120
|
+
entitlements?: Array<{
|
|
3121
|
+
__typename?: 'PackageEntitlement';
|
|
3122
|
+
usageLimit?: number | null | undefined;
|
|
3123
|
+
featureId: string;
|
|
3124
|
+
hasUnlimitedUsage?: boolean | null | undefined;
|
|
3125
|
+
packageId: string;
|
|
3126
|
+
resetPeriod?: EntitlementResetPeriod | null | undefined;
|
|
3127
|
+
feature: {
|
|
3128
|
+
__typename?: 'Feature';
|
|
3129
|
+
featureType: FeatureType;
|
|
3130
|
+
meterType?: MeterType | null | undefined;
|
|
3131
|
+
featureUnits?: string | null | undefined;
|
|
3132
|
+
featureUnitsPlural?: string | null | undefined;
|
|
3133
|
+
displayName: string;
|
|
3134
|
+
description?: string | null | undefined;
|
|
3135
|
+
refId: string;
|
|
3136
|
+
};
|
|
3137
|
+
}> | null | undefined;
|
|
3138
|
+
inheritedEntitlements?: Array<{
|
|
3139
|
+
__typename?: 'PackageEntitlement';
|
|
3140
|
+
usageLimit?: number | null | undefined;
|
|
3141
|
+
featureId: string;
|
|
3142
|
+
hasUnlimitedUsage?: boolean | null | undefined;
|
|
3143
|
+
packageId: string;
|
|
3144
|
+
resetPeriod?: EntitlementResetPeriod | null | undefined;
|
|
3145
|
+
feature: {
|
|
3146
|
+
__typename?: 'Feature';
|
|
3147
|
+
featureType: FeatureType;
|
|
3148
|
+
meterType?: MeterType | null | undefined;
|
|
3149
|
+
featureUnits?: string | null | undefined;
|
|
3150
|
+
featureUnitsPlural?: string | null | undefined;
|
|
3151
|
+
displayName: string;
|
|
3152
|
+
description?: string | null | undefined;
|
|
3153
|
+
refId: string;
|
|
3154
|
+
};
|
|
3155
|
+
}> | null | undefined;
|
|
3156
|
+
prices?: Array<{
|
|
3157
|
+
__typename?: 'Price';
|
|
3158
|
+
} & PriceFragment> | null | undefined;
|
|
3159
|
+
};
|
|
3160
|
+
addons?: Array<{
|
|
3161
|
+
__typename?: 'SubscriptionAddon';
|
|
3162
|
+
id: string;
|
|
3163
|
+
quantity: number;
|
|
3164
|
+
addon: {
|
|
3165
|
+
__typename?: 'Addon';
|
|
3166
|
+
id: string;
|
|
3167
|
+
refId: string;
|
|
3168
|
+
displayName: string;
|
|
3169
|
+
description?: string | null | undefined;
|
|
3170
|
+
additionalMetaData?: any | null | undefined;
|
|
3171
|
+
entitlements?: Array<{
|
|
3172
|
+
__typename?: 'PackageEntitlement';
|
|
3173
|
+
usageLimit?: number | null | undefined;
|
|
3174
|
+
hasUnlimitedUsage?: boolean | null | undefined;
|
|
3175
|
+
featureId: string;
|
|
3176
|
+
feature: {
|
|
3177
|
+
__typename?: 'Feature';
|
|
3178
|
+
featureType: FeatureType;
|
|
3179
|
+
meterType?: MeterType | null | undefined;
|
|
3180
|
+
featureUnits?: string | null | undefined;
|
|
3181
|
+
featureUnitsPlural?: string | null | undefined;
|
|
3182
|
+
displayName: string;
|
|
3183
|
+
description?: string | null | undefined;
|
|
3184
|
+
refId: string;
|
|
3185
|
+
};
|
|
3186
|
+
}> | null | undefined;
|
|
3187
|
+
};
|
|
3188
|
+
}> | null | undefined;
|
|
3189
|
+
};
|
|
3190
|
+
export declare type PromotionalEntitlementFragment = {
|
|
3191
|
+
__typename?: 'PromotionalEntitlement';
|
|
3192
|
+
status: PromotionalEntitlementStatus;
|
|
3193
|
+
usageLimit?: number | null | undefined;
|
|
3194
|
+
featureId: string;
|
|
3195
|
+
hasUnlimitedUsage?: boolean | null | undefined;
|
|
3196
|
+
resetPeriod?: EntitlementResetPeriod | null | undefined;
|
|
3197
|
+
endDate?: any | null | undefined;
|
|
3198
|
+
isVisible: boolean;
|
|
3199
|
+
feature: {
|
|
3200
|
+
__typename?: 'Feature';
|
|
3201
|
+
featureType: FeatureType;
|
|
3202
|
+
meterType?: MeterType | null | undefined;
|
|
3203
|
+
featureUnits?: string | null | undefined;
|
|
3204
|
+
featureUnitsPlural?: string | null | undefined;
|
|
3205
|
+
displayName: string;
|
|
3206
|
+
description?: string | null | undefined;
|
|
3207
|
+
refId: string;
|
|
3208
|
+
};
|
|
3209
|
+
};
|
|
3210
|
+
export declare type CustomerFragment = {
|
|
3211
|
+
__typename?: 'Customer';
|
|
3212
|
+
id: string;
|
|
3213
|
+
name?: string | null | undefined;
|
|
3214
|
+
email?: string | null | undefined;
|
|
3215
|
+
createdAt?: any | null | undefined;
|
|
3216
|
+
updatedAt: any;
|
|
3217
|
+
hasPaymentMethod: boolean;
|
|
3218
|
+
refId: string;
|
|
3219
|
+
additionalMetaData?: any | null | undefined;
|
|
3220
|
+
defaultPaymentExpirationMonth?: number | null | undefined;
|
|
3221
|
+
defaultPaymentExpirationYear?: number | null | undefined;
|
|
3222
|
+
defaultPaymentMethodLast4Digits?: string | null | undefined;
|
|
3223
|
+
experimentInfo?: {
|
|
3224
|
+
__typename?: 'experimentInfo';
|
|
3225
|
+
name: string;
|
|
3226
|
+
groupType: ExperimentGroupType;
|
|
3227
|
+
groupName: string;
|
|
3228
|
+
id: string;
|
|
3229
|
+
} | null | undefined;
|
|
3230
|
+
trialedPlans?: Array<{
|
|
3231
|
+
__typename?: 'TrialedPlan';
|
|
3232
|
+
productId?: string | null | undefined;
|
|
3233
|
+
productRefId?: string | null | undefined;
|
|
3234
|
+
planRefId?: string | null | undefined;
|
|
3235
|
+
planId?: string | null | undefined;
|
|
3236
|
+
}> | null | undefined;
|
|
3237
|
+
eligibleForTrial?: Array<{
|
|
3238
|
+
__typename?: 'EligibleForTrial';
|
|
3239
|
+
productId?: string | null | undefined;
|
|
3240
|
+
productRefId?: string | null | undefined;
|
|
3241
|
+
eligible: boolean;
|
|
3242
|
+
}> | null | undefined;
|
|
3243
|
+
promotionalEntitlements: Array<{
|
|
3244
|
+
__typename?: 'PromotionalEntitlement';
|
|
3245
|
+
} & PromotionalEntitlementFragment>;
|
|
3246
|
+
subscriptions?: Array<{
|
|
3247
|
+
__typename?: 'CustomerSubscription';
|
|
3248
|
+
} & SubscriptionFragment> | null | undefined;
|
|
3249
|
+
};
|
|
3172
3250
|
export declare type PriceFragment = {
|
|
3173
3251
|
__typename?: 'Price';
|
|
3174
3252
|
billingModel: BillingModel;
|
package/dist/client.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ export declare class Stigg implements StiggClient {
|
|
|
101
101
|
*
|
|
102
102
|
* @returns {Promise<Paywall>}
|
|
103
103
|
*/
|
|
104
|
-
getPaywall({ productId }?: GetPaywall): Promise<Paywall>;
|
|
104
|
+
getPaywall({ productId, context }?: GetPaywall): Promise<Paywall>;
|
|
105
105
|
/**
|
|
106
106
|
* Get a list of coupons
|
|
107
107
|
*
|