@stigg/js-client-sdk 1.14.0 → 1.16.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/EdgeApiClient.d.ts +1 -1
- package/dist/api/EntitlementsApi.d.ts +1 -1
- package/dist/api/PaywallApi.d.ts +2 -1
- package/dist/api/generated/types.d.ts +11 -39
- package/dist/client.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +2 -0
- package/dist/services/cacheService.d.ts +3 -2
- package/dist/services/entitlementsService.d.ts +2 -1
- package/dist/services/inMemoryCacheService.d.ts +4 -2
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ export declare class EdgeApiClient {
|
|
|
14
14
|
static create(config: EdgeApiClientConfiguration, dynamicData: {
|
|
15
15
|
customerToken?: string | null;
|
|
16
16
|
}): EdgeApiClient | null;
|
|
17
|
-
getPaywall(productId?: string): Promise<ApolloQueryResult<GetPaywallQuery>>;
|
|
17
|
+
getPaywall(productId?: string, billingCountryCode?: string): Promise<ApolloQueryResult<GetPaywallQuery>>;
|
|
18
18
|
getEntitlements(customerId: string): Promise<ApolloQueryResult<GetEntitlementsQuery>>;
|
|
19
19
|
getSdkConfiguration(): Promise<ApolloQueryResult<SdkConfigurationQuery>>;
|
|
20
20
|
watchEntitlements(customerId: string, interval: number): ObservablePoller<GetEntitlementsQuery>;
|
|
@@ -8,7 +8,7 @@ declare class EntitlementsApi {
|
|
|
8
8
|
private readonly client;
|
|
9
9
|
private readonly edgeApiClient;
|
|
10
10
|
constructor(client: ApolloClient<NormalizedCacheObject>, edgeApiClient: EdgeApiClient | null);
|
|
11
|
-
getEntitlements(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetEntitlementsQuery>>;
|
|
11
|
+
getEntitlements(customerId: string, skipEdge?: boolean): Promise<import("@apollo/client/core").ApolloQueryResult<GetEntitlementsQuery>>;
|
|
12
12
|
pollEntitlements(customerId: string, interval: number): import("../utils/ObservablePoller").ObservablePoller<GetEntitlementsQuery> | import("@apollo/client/core").ObservableQuery<GetEntitlementsQuery, import("@stigg/api-client-js/src/generated/sdk").Exact<{
|
|
13
13
|
query: import("@stigg/api-client-js/src/generated/sdk").FetchEntitlementsQuery;
|
|
14
14
|
}>>;
|
package/dist/api/PaywallApi.d.ts
CHANGED
|
@@ -8,11 +8,12 @@ export declare type GetPaywallProps = {
|
|
|
8
8
|
productId?: string;
|
|
9
9
|
customerId?: string | null;
|
|
10
10
|
context?: WidgetType;
|
|
11
|
+
billingCountryCode?: string;
|
|
11
12
|
};
|
|
12
13
|
declare class PaywallApi {
|
|
13
14
|
private readonly client;
|
|
14
15
|
private readonly edgeApiClient;
|
|
15
16
|
constructor(client: ApolloClient<NormalizedCacheObject>, edgeApiClient: EdgeApiClient | null);
|
|
16
|
-
getPaywall({ productId, customerId, context }: GetPaywallProps): Promise<import("@apollo/client/core").ApolloQueryResult<GetPaywallQuery>>;
|
|
17
|
+
getPaywall({ productId, customerId, context, billingCountryCode }: GetPaywallProps): Promise<import("@apollo/client/core").ApolloQueryResult<GetPaywallQuery>>;
|
|
17
18
|
}
|
|
18
19
|
export default PaywallApi;
|
|
@@ -213,6 +213,10 @@ export declare type CheckoutOptions = {
|
|
|
213
213
|
referenceId?: InputMaybe<Scalars['String']>;
|
|
214
214
|
successUrl: Scalars['String'];
|
|
215
215
|
};
|
|
216
|
+
export declare type ClearCustomerPersistentCacheInput = {
|
|
217
|
+
customerId: Scalars['String'];
|
|
218
|
+
environmentId?: InputMaybe<Scalars['String']>;
|
|
219
|
+
};
|
|
216
220
|
export declare type CouponFilter = {
|
|
217
221
|
and?: InputMaybe<Array<CouponFilter>>;
|
|
218
222
|
billingId?: InputMaybe<StringFieldComparison>;
|
|
@@ -874,6 +878,7 @@ export declare enum ErrorCode {
|
|
|
874
878
|
FailedToCreateCheckoutSessionError = "FailedToCreateCheckoutSessionError",
|
|
875
879
|
FailedToImportCustomer = "FailedToImportCustomer",
|
|
876
880
|
FeatureNotFound = "FeatureNotFound",
|
|
881
|
+
FetchAllCountriesPricesNotAllowed = "FetchAllCountriesPricesNotAllowed",
|
|
877
882
|
IdentityForbidden = "IdentityForbidden",
|
|
878
883
|
ImportAlreadyInProgress = "ImportAlreadyInProgress",
|
|
879
884
|
InitStripePaymentMethodError = "InitStripePaymentMethodError",
|
|
@@ -937,6 +942,7 @@ export declare type EstimateSubscriptionInput = {
|
|
|
937
942
|
planId: Scalars['String'];
|
|
938
943
|
priceUnitAmount?: InputMaybe<Scalars['Float']>;
|
|
939
944
|
promotionCode?: InputMaybe<Scalars['String']>;
|
|
945
|
+
resourceId?: InputMaybe<Scalars['String']>;
|
|
940
946
|
startDate?: InputMaybe<Scalars['DateTime']>;
|
|
941
947
|
};
|
|
942
948
|
export declare type EstimateSubscriptionUpdateInput = {
|
|
@@ -1158,6 +1164,7 @@ export declare type FetchEntitlementQuery = {
|
|
|
1158
1164
|
export declare type FetchEntitlementsQuery = {
|
|
1159
1165
|
customerId: Scalars['String'];
|
|
1160
1166
|
environmentId?: InputMaybe<Scalars['String']>;
|
|
1167
|
+
resourceId?: InputMaybe<Scalars['String']>;
|
|
1161
1168
|
};
|
|
1162
1169
|
export declare type FontVariantInput = {
|
|
1163
1170
|
fontSize?: InputMaybe<Scalars['Float']>;
|
|
@@ -1178,9 +1185,11 @@ export declare type GetPackageByRefIdInput = {
|
|
|
1178
1185
|
versionNumber?: InputMaybe<Scalars['Float']>;
|
|
1179
1186
|
};
|
|
1180
1187
|
export declare type GetPaywallInput = {
|
|
1188
|
+
billingCountryCode?: InputMaybe<Scalars['String']>;
|
|
1181
1189
|
context?: InputMaybe<WidgetType>;
|
|
1182
1190
|
customerId?: InputMaybe<Scalars['String']>;
|
|
1183
1191
|
environmentId?: InputMaybe<Scalars['String']>;
|
|
1192
|
+
fetchAllCountriesPrices?: InputMaybe<Scalars['Boolean']>;
|
|
1184
1193
|
productId?: InputMaybe<Scalars['String']>;
|
|
1185
1194
|
};
|
|
1186
1195
|
export declare type GetWidgetConfigurationInput = {
|
|
@@ -1296,6 +1305,7 @@ export declare type InitiateCheckoutInput = {
|
|
|
1296
1305
|
collectBillingAddress?: InputMaybe<Scalars['Boolean']>;
|
|
1297
1306
|
customerId: Scalars['String'];
|
|
1298
1307
|
planId: Scalars['String'];
|
|
1308
|
+
resourceId?: InputMaybe<Scalars['String']>;
|
|
1299
1309
|
successUrl: Scalars['String'];
|
|
1300
1310
|
unitQuantity?: InputMaybe<Scalars['Int']>;
|
|
1301
1311
|
};
|
|
@@ -1672,50 +1682,11 @@ export declare type PlanUpdateInput = {
|
|
|
1672
1682
|
parentPlanId?: InputMaybe<Scalars['String']>;
|
|
1673
1683
|
status?: InputMaybe<PackageStatus>;
|
|
1674
1684
|
};
|
|
1675
|
-
export declare type PriceFilter = {
|
|
1676
|
-
and?: InputMaybe<Array<PriceFilter>>;
|
|
1677
|
-
billingId?: InputMaybe<StringFieldComparison>;
|
|
1678
|
-
billingModel?: InputMaybe<BillingModelFilterComparison>;
|
|
1679
|
-
billingPeriod?: InputMaybe<BillingPeriodFilterComparison>;
|
|
1680
|
-
createdAt?: InputMaybe<DateFieldComparison>;
|
|
1681
|
-
id?: InputMaybe<StringFieldComparison>;
|
|
1682
|
-
or?: InputMaybe<Array<PriceFilter>>;
|
|
1683
|
-
package?: InputMaybe<PriceFilterPackageDtoFilter>;
|
|
1684
|
-
};
|
|
1685
|
-
export declare type PriceFilterPackageDtoFilter = {
|
|
1686
|
-
and?: InputMaybe<Array<PriceFilterPackageDtoFilter>>;
|
|
1687
|
-
billingId?: InputMaybe<StringFieldComparison>;
|
|
1688
|
-
createdAt?: InputMaybe<DateFieldComparison>;
|
|
1689
|
-
description?: InputMaybe<StringFieldComparison>;
|
|
1690
|
-
displayName?: InputMaybe<StringFieldComparison>;
|
|
1691
|
-
environmentId?: InputMaybe<StringFieldComparison>;
|
|
1692
|
-
id?: InputMaybe<StringFieldComparison>;
|
|
1693
|
-
isLatest?: InputMaybe<BooleanFieldComparison>;
|
|
1694
|
-
or?: InputMaybe<Array<PriceFilterPackageDtoFilter>>;
|
|
1695
|
-
pricingType?: InputMaybe<PricingTypeFilterComparison>;
|
|
1696
|
-
productId?: InputMaybe<StringFieldComparison>;
|
|
1697
|
-
refId?: InputMaybe<StringFieldComparison>;
|
|
1698
|
-
status?: InputMaybe<PackageStatusFilterComparison>;
|
|
1699
|
-
updatedAt?: InputMaybe<DateFieldComparison>;
|
|
1700
|
-
versionNumber?: InputMaybe<IntFieldComparison>;
|
|
1701
|
-
};
|
|
1702
1685
|
export declare type PricePeriodInput = {
|
|
1703
1686
|
billingCountryCode?: InputMaybe<Scalars['String']>;
|
|
1704
1687
|
billingPeriod: BillingPeriod;
|
|
1705
1688
|
price: MoneyInputDto;
|
|
1706
1689
|
};
|
|
1707
|
-
export declare type PriceSort = {
|
|
1708
|
-
direction: SortDirection;
|
|
1709
|
-
field: PriceSortFields;
|
|
1710
|
-
nulls?: InputMaybe<SortNulls>;
|
|
1711
|
-
};
|
|
1712
|
-
export declare enum PriceSortFields {
|
|
1713
|
-
BillingId = "billingId",
|
|
1714
|
-
BillingModel = "billingModel",
|
|
1715
|
-
BillingPeriod = "billingPeriod",
|
|
1716
|
-
CreatedAt = "createdAt",
|
|
1717
|
-
Id = "id"
|
|
1718
|
-
}
|
|
1719
1690
|
export declare type PricingModelCreateInput = {
|
|
1720
1691
|
billingModel: BillingModel;
|
|
1721
1692
|
featureId?: InputMaybe<Scalars['String']>;
|
|
@@ -3053,6 +3024,7 @@ export declare type MockPaywallPriceFragment = {
|
|
|
3053
3024
|
billingId?: string | null | undefined;
|
|
3054
3025
|
minUnitQuantity?: number | null | undefined;
|
|
3055
3026
|
maxUnitQuantity?: number | null | undefined;
|
|
3027
|
+
billingCountryCode?: string | null | undefined;
|
|
3056
3028
|
price: {
|
|
3057
3029
|
__typename?: 'Money';
|
|
3058
3030
|
amount: number;
|
package/dist/client.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export declare class Stigg implements StiggClient {
|
|
|
104
104
|
*
|
|
105
105
|
* @returns {Promise<Paywall>}
|
|
106
106
|
*/
|
|
107
|
-
getPaywall({ productId, context }?: GetPaywall): Promise<Paywall>;
|
|
107
|
+
getPaywall({ productId, context, billingCountryCode }?: GetPaywall): Promise<Paywall>;
|
|
108
108
|
/**
|
|
109
109
|
* Get a list of coupons
|
|
110
110
|
*
|