@stigg/js-client-sdk 1.10.0 → 1.13.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/CustomersApi.d.ts +3 -2
- package/dist/api/EdgeApiClient.d.ts +3 -1
- package/dist/api/EntitlementsApi.d.ts +4 -3
- package/dist/api/PaywallApi.d.ts +2 -1
- package/dist/api/SdkConfigurationApi.d.ts +5 -6
- package/dist/api/generated/types.d.ts +130 -377
- package/dist/index.js +625 -1
- package/dist/index.js.LICENSE.txt +15 -0
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +5 -2
- package/dist/services/entitlementsService.d.ts +1 -1
- package/dist/utils/ModelMapper.d.ts +2 -1
- package/package.json +2 -1
- package/dist/api/fragments/customerFragment.d.ts +0 -1
- package/dist/api/fragments/priceFragment.d.ts +0 -1
- package/dist/api/fragments/scheduledUpdateFragment.d.ts +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
-
import {
|
|
2
|
+
import { GetCustomerPortalByRefIdQuery } from './generated/types';
|
|
3
|
+
import { GetCustomerByIdQuery } from '@stigg/api-client-js/src/generated/sdk';
|
|
3
4
|
declare class CustomersApi {
|
|
4
5
|
private readonly client;
|
|
5
6
|
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
6
|
-
getCustomer(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<
|
|
7
|
+
getCustomer(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetCustomerByIdQuery>>;
|
|
7
8
|
getCustomerPortal(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetCustomerPortalByRefIdQuery>>;
|
|
8
9
|
}
|
|
9
10
|
export default CustomersApi;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
-
import {
|
|
2
|
+
import { SdkConfigurationQuery } from './generated/types';
|
|
3
|
+
import { GetEntitlementsQuery, GetPaywallQuery } from '@stigg/api-client-js/src/generated/sdk';
|
|
3
4
|
import { ObservablePoller } from '../utils/ObservablePoller';
|
|
4
5
|
declare type EdgeApiClientConfiguration = {
|
|
5
6
|
apiKey: string;
|
|
@@ -15,6 +16,7 @@ export declare class EdgeApiClient {
|
|
|
15
16
|
}): EdgeApiClient | null;
|
|
16
17
|
getPaywall(productId?: string): Promise<ApolloQueryResult<GetPaywallQuery>>;
|
|
17
18
|
getEntitlements(customerId: string): Promise<ApolloQueryResult<GetEntitlementsQuery>>;
|
|
19
|
+
getSdkConfiguration(): Promise<ApolloQueryResult<SdkConfigurationQuery>>;
|
|
18
20
|
watchEntitlements(customerId: string, interval: number): ObservablePoller<GetEntitlementsQuery>;
|
|
19
21
|
private get;
|
|
20
22
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
-
import {
|
|
2
|
+
import { EntitlementCheckResult } from './generated/types';
|
|
3
3
|
import { EdgeApiClient } from './EdgeApiClient';
|
|
4
|
+
import { GetEntitlementsQuery } from '@stigg/api-client-js/src/generated/sdk';
|
|
4
5
|
export declare const RESET_PERIOD_CONFIGURATION_FRAGMENT: import("graphql/language/ast").DocumentNode;
|
|
5
6
|
export declare const FEATURE_FRAGMENT: import("graphql/language/ast").DocumentNode;
|
|
6
7
|
declare class EntitlementsApi {
|
|
@@ -8,8 +9,8 @@ declare class EntitlementsApi {
|
|
|
8
9
|
private readonly edgeApiClient;
|
|
9
10
|
constructor(client: ApolloClient<NormalizedCacheObject>, edgeApiClient: EdgeApiClient | null);
|
|
10
11
|
getEntitlements(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetEntitlementsQuery>>;
|
|
11
|
-
pollEntitlements(customerId: string, interval: number): import("../utils/ObservablePoller").ObservablePoller<GetEntitlementsQuery> | import("@apollo/client/core").ObservableQuery<GetEntitlementsQuery, import("
|
|
12
|
-
query: import("
|
|
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
|
+
query: import("@stigg/api-client-js/src/generated/sdk").FetchEntitlementsQuery;
|
|
13
14
|
}>>;
|
|
14
15
|
reportEntitlementRequested(featureId: string, customerId: string, entitlementCheckResult: EntitlementCheckResult, requestedUsage?: number): Promise<void>;
|
|
15
16
|
}
|
package/dist/api/PaywallApi.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
-
import {
|
|
2
|
+
import { WidgetType } from './generated/types';
|
|
3
3
|
import { EdgeApiClient } from './EdgeApiClient';
|
|
4
|
+
import { GetPaywallQuery } from '@stigg/api-client-js/src/generated/sdk';
|
|
4
5
|
export declare const TYPOGRAPHY_CONFIGURATION: import("graphql/language/ast").DocumentNode;
|
|
5
6
|
export declare const PAYWALL_CONFIGURATION: import("graphql/language/ast").DocumentNode;
|
|
6
7
|
export declare type GetPaywallProps = {
|
|
@@ -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;
|