@stigg/js-client-sdk 1.9.0 → 1.12.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 +2 -1
- package/dist/api/SdkConfigurationApi.d.ts +5 -6
- package/dist/api/fragments/scheduledUpdateFragment.d.ts +1 -0
- package/dist/api/generated/types.d.ts +38 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +15 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
-
import { GetEntitlementsQuery, GetPaywallQuery } from './generated/types';
|
|
2
|
+
import { GetEntitlementsQuery, GetPaywallQuery, SdkConfigurationQuery } from './generated/types';
|
|
3
3
|
import { ObservablePoller } from '../utils/ObservablePoller';
|
|
4
4
|
declare type EdgeApiClientConfiguration = {
|
|
5
5
|
apiKey: string;
|
|
@@ -15,6 +15,7 @@ export declare class EdgeApiClient {
|
|
|
15
15
|
}): EdgeApiClient | null;
|
|
16
16
|
getPaywall(productId?: string): Promise<ApolloQueryResult<GetPaywallQuery>>;
|
|
17
17
|
getEntitlements(customerId: string): Promise<ApolloQueryResult<GetEntitlementsQuery>>;
|
|
18
|
+
getSdkConfiguration(): Promise<ApolloQueryResult<SdkConfigurationQuery>>;
|
|
18
19
|
watchEntitlements(customerId: string, interval: number): ObservablePoller<GetEntitlementsQuery>;
|
|
19
20
|
private get;
|
|
20
21
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
+
import { EdgeApiClient } from './EdgeApiClient';
|
|
3
|
+
import { SdkConfigurationQuery } from './generated/types';
|
|
2
4
|
declare class SdkConfigurationApi {
|
|
3
5
|
private readonly client;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
sentryDsn?: string | null | undefined;
|
|
8
|
-
isWidgetWatermarkEnabled?: boolean | null | undefined;
|
|
9
|
-
} | null | undefined>;
|
|
6
|
+
private readonly edgeApiClient;
|
|
7
|
+
constructor(client: ApolloClient<NormalizedCacheObject>, edgeApiClient: EdgeApiClient | null);
|
|
8
|
+
getSdkConfiguration(): Promise<import("@apollo/client/core").ApolloQueryResult<SdkConfigurationQuery>>;
|
|
10
9
|
}
|
|
11
10
|
export default SdkConfigurationApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SCHEDULED_UPDATES_FRAGMENT: import("graphql/language/ast").DocumentNode;
|
|
@@ -207,6 +207,7 @@ export declare enum ChangeType {
|
|
|
207
207
|
}
|
|
208
208
|
export declare type CheckoutOptions = {
|
|
209
209
|
allowPromoCodes?: InputMaybe<Scalars['Boolean']>;
|
|
210
|
+
allowTaxIdCollection?: InputMaybe<Scalars['Boolean']>;
|
|
210
211
|
cancelUrl: Scalars['String'];
|
|
211
212
|
collectBillingAddress?: InputMaybe<Scalars['Boolean']>;
|
|
212
213
|
referenceId?: InputMaybe<Scalars['String']>;
|
|
@@ -953,6 +954,7 @@ export declare type FeatureFilter = {
|
|
|
953
954
|
updatedAt?: InputMaybe<DateFieldComparison>;
|
|
954
955
|
};
|
|
955
956
|
export declare type FeatureInput = {
|
|
957
|
+
additionalMetaData?: InputMaybe<Scalars['JSON']>;
|
|
956
958
|
description?: InputMaybe<Scalars['String']>;
|
|
957
959
|
displayName: Scalars['String'];
|
|
958
960
|
environmentId: Scalars['String'];
|
|
@@ -1163,6 +1165,7 @@ export declare type InitAddStripeCustomerPaymentMethodInput = {
|
|
|
1163
1165
|
export declare type InitiateCheckoutInput = {
|
|
1164
1166
|
addons?: InputMaybe<Array<SubscriptionAddonInput>>;
|
|
1165
1167
|
allowPromoCodes?: InputMaybe<Scalars['Boolean']>;
|
|
1168
|
+
allowTaxIdCollection?: InputMaybe<Scalars['Boolean']>;
|
|
1166
1169
|
billingPeriod: BillingPeriod;
|
|
1167
1170
|
cancelUrl: Scalars['String'];
|
|
1168
1171
|
collectBillingAddress?: InputMaybe<Scalars['Boolean']>;
|
|
@@ -2408,6 +2411,7 @@ export declare type UpdateExperimentInput = {
|
|
|
2408
2411
|
variantPercentage?: InputMaybe<Scalars['Float']>;
|
|
2409
2412
|
};
|
|
2410
2413
|
export declare type UpdateFeature = {
|
|
2414
|
+
additionalMetaData?: InputMaybe<Scalars['JSON']>;
|
|
2411
2415
|
createdAt?: InputMaybe<Scalars['DateTime']>;
|
|
2412
2416
|
description?: InputMaybe<Scalars['String']>;
|
|
2413
2417
|
displayName?: InputMaybe<Scalars['String']>;
|
|
@@ -2422,6 +2426,7 @@ export declare type UpdateFeature = {
|
|
|
2422
2426
|
updatedAt?: InputMaybe<Scalars['DateTime']>;
|
|
2423
2427
|
};
|
|
2424
2428
|
export declare type UpdateFeatureInput = {
|
|
2429
|
+
additionalMetaData?: InputMaybe<Scalars['JSON']>;
|
|
2425
2430
|
description?: InputMaybe<Scalars['String']>;
|
|
2426
2431
|
displayName?: InputMaybe<Scalars['String']>;
|
|
2427
2432
|
environmentId: Scalars['String'];
|
|
@@ -2766,6 +2771,9 @@ export declare type CustomerPortalSubscriptionFragment = {
|
|
|
2766
2771
|
addons: Array<{
|
|
2767
2772
|
__typename?: 'CustomerPortalAddon';
|
|
2768
2773
|
} & CustomerPortalSubscriptionAddonFragment>;
|
|
2774
|
+
scheduledUpdates?: Array<{
|
|
2775
|
+
__typename?: 'SubscriptionScheduledUpdate';
|
|
2776
|
+
} & SubscriptionScheduledUpdateDataFragment> | null | undefined;
|
|
2769
2777
|
};
|
|
2770
2778
|
export declare type CustomerPortalConfigurationFragment = {
|
|
2771
2779
|
__typename?: 'CustomerPortalConfiguration';
|
|
@@ -2899,6 +2907,7 @@ export declare type PaywallPackageEntitlementFragment = {
|
|
|
2899
2907
|
displayName: string;
|
|
2900
2908
|
description?: string | null | undefined;
|
|
2901
2909
|
refId: string;
|
|
2910
|
+
additionalMetaData?: any | null | undefined;
|
|
2902
2911
|
} | null | undefined;
|
|
2903
2912
|
};
|
|
2904
2913
|
export declare type PaywallAddonFragment = {
|
|
@@ -3006,6 +3015,7 @@ export declare type PackageEntitlementFragment = {
|
|
|
3006
3015
|
displayName: string;
|
|
3007
3016
|
description?: string | null | undefined;
|
|
3008
3017
|
refId: string;
|
|
3018
|
+
additionalMetaData?: any | null | undefined;
|
|
3009
3019
|
};
|
|
3010
3020
|
};
|
|
3011
3021
|
export declare type AddonFragment = {
|
|
@@ -3261,6 +3271,9 @@ export declare type SubscriptionFragment = {
|
|
|
3261
3271
|
}> | null | undefined;
|
|
3262
3272
|
};
|
|
3263
3273
|
}> | null | undefined;
|
|
3274
|
+
scheduledUpdates?: Array<{
|
|
3275
|
+
__typename?: 'SubscriptionScheduledUpdate';
|
|
3276
|
+
} & SubscriptionScheduledUpdateDataFragment> | null | undefined;
|
|
3264
3277
|
};
|
|
3265
3278
|
export declare type PromotionalEntitlementFragment = {
|
|
3266
3279
|
__typename?: 'PromotionalEntitlement';
|
|
@@ -3280,6 +3293,7 @@ export declare type PromotionalEntitlementFragment = {
|
|
|
3280
3293
|
displayName: string;
|
|
3281
3294
|
description?: string | null | undefined;
|
|
3282
3295
|
refId: string;
|
|
3296
|
+
additionalMetaData?: any | null | undefined;
|
|
3283
3297
|
};
|
|
3284
3298
|
};
|
|
3285
3299
|
export declare type CustomerFragment = {
|
|
@@ -3341,4 +3355,28 @@ export declare type PriceFragment = {
|
|
|
3341
3355
|
displayName: string;
|
|
3342
3356
|
} | null | undefined;
|
|
3343
3357
|
};
|
|
3358
|
+
export declare type SubscriptionScheduledUpdateDataFragment = {
|
|
3359
|
+
__typename?: 'SubscriptionScheduledUpdate';
|
|
3360
|
+
subscriptionScheduleType: SubscriptionScheduleType;
|
|
3361
|
+
scheduleStatus: SubscriptionScheduleStatus;
|
|
3362
|
+
scheduledExecutionTime: any;
|
|
3363
|
+
targetPackage?: {
|
|
3364
|
+
__typename?: 'Plan';
|
|
3365
|
+
id: string;
|
|
3366
|
+
refId: string;
|
|
3367
|
+
displayName: string;
|
|
3368
|
+
} | null | undefined;
|
|
3369
|
+
scheduleVariables?: {
|
|
3370
|
+
__typename?: 'BillingPeriodChangeVariables';
|
|
3371
|
+
billingPeriod?: BillingPeriod | null | undefined;
|
|
3372
|
+
} | {
|
|
3373
|
+
__typename?: 'DowngradeChangeVariables';
|
|
3374
|
+
addonRefIds?: string | null | undefined;
|
|
3375
|
+
billingPeriod?: BillingPeriod | null | undefined;
|
|
3376
|
+
downgradePlanRefId: string;
|
|
3377
|
+
} | {
|
|
3378
|
+
__typename?: 'UnitAmountChangeVariables';
|
|
3379
|
+
newUnitAmount?: number | null | undefined;
|
|
3380
|
+
} | null | undefined;
|
|
3381
|
+
};
|
|
3344
3382
|
export {};
|