@stigg/js-client-sdk 0.20.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/CHANGELOG.md +45 -0
- package/README.md +4 -0
- package/dist/api/ApiGateway.d.ts +9 -0
- package/dist/api/CustomersApi.d.ts +8 -0
- package/dist/api/EntitlementsApi.d.ts +10 -0
- package/dist/api/PaywallApi.d.ts +8 -0
- package/dist/api/fragments/priceFragment.d.ts +1 -0
- package/dist/api/generated/types.d.ts +2598 -0
- package/dist/api/initApolloClient.d.ts +7 -0
- package/dist/client.d.ts +24 -0
- package/dist/configuration.d.ts +8 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/index.js.LICENSE.txt +8 -0
- package/dist/index.js.map +1 -0
- package/dist/models.d.ts +171 -0
- package/dist/services/cacheService.d.ts +9 -0
- package/dist/services/cachedEntitlement.d.ts +24 -0
- package/dist/services/entitlementDecisionService.d.ts +9 -0
- package/dist/services/entitlementsService.d.ts +21 -0
- package/dist/services/inMemoryCacheService.d.ts +13 -0
- package/dist/utils/ModelMapper.d.ts +21 -0
- package/package.json +68 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# [0.20.0](https://github.com/stiggio/js-client-sdk/compare/0.19.0...0.20.0) (2022-03-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* html paywall example ([9d0c59e](https://github.com/stiggio/js-client-sdk/commit/9d0c59e75926bd5cf9bf13396f243746027edb85))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# [0.19.0](https://github.com/stiggio/js-client-sdk/compare/0.18.2...0.19.0) (2022-03-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* fetch latest plans for paywall ([0a42890](https://github.com/stiggio/js-client-sdk/commit/0a428905b32d46a7ac051863e1a30e10410f5ead))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [0.18.2](https://github.com/stiggio/js-client-sdk/compare/0.18.1...0.18.2) (2022-03-15)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* map plans default trial ([097d8d9](https://github.com/stiggio/js-client-sdk/commit/097d8d95dc0e8423f25b0e7887d0ab07dfcf5be7))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [0.18.1](https://github.com/stiggio/js-client-sdk/compare/0.18.0...0.18.1) (2022-03-14)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* pipe trial subscriptions ([d5fd5a4](https://github.com/stiggio/js-client-sdk/commit/d5fd5a47b169e20660acd9bcf274fe0eeaae181f))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# [0.18.0](https://github.com/stiggio/js-client-sdk/compare/0.17.1...0.18.0) (2022-03-14)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
* pipe trial subscriptions ([9fb9e6b](https://github.com/stiggio/js-client-sdk/commit/9fb9e6bca2095fce31b4325ff86fa9f8ac4d3f4d))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
+
import PaywallApi from './PaywallApi';
|
|
3
|
+
import CustomersApi from './CustomersApi';
|
|
4
|
+
declare class ApiGateway {
|
|
5
|
+
paywall: PaywallApi;
|
|
6
|
+
customers: CustomersApi;
|
|
7
|
+
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
8
|
+
}
|
|
9
|
+
export default ApiGateway;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
+
import { GetCustomerByRefIdQuery } from './generated/types';
|
|
3
|
+
declare class CustomersApi {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
6
|
+
getCustomer(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetCustomerByRefIdQuery>>;
|
|
7
|
+
}
|
|
8
|
+
export default CustomersApi;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
+
import { EntitlementQuery, GetEntitlementsQuery } from './generated/types';
|
|
3
|
+
import { FetchEntitlement } from '../models';
|
|
4
|
+
declare class EntitlementsApi {
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
7
|
+
getEntitlement(query: FetchEntitlement): Promise<import("@apollo/client/core").ApolloQueryResult<EntitlementQuery>>;
|
|
8
|
+
getEntitlements(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetEntitlementsQuery>>;
|
|
9
|
+
}
|
|
10
|
+
export default EntitlementsApi;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
+
import { GetPlansQuery } from './generated/types';
|
|
3
|
+
declare class PaywallApi {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
6
|
+
getPlans(): Promise<import("@apollo/client/core").ApolloQueryResult<GetPlansQuery>>;
|
|
7
|
+
}
|
|
8
|
+
export default PaywallApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PRICE_FRAGMENT: import("graphql/language/ast").DocumentNode;
|