@paygentic/sdk 0.7.10 → 0.7.11
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/commonjs/funcs/entitlementsIssue.d.ts +1 -1
- package/dist/commonjs/funcs/entitlementsIssue.d.ts.map +1 -1
- package/dist/commonjs/funcs/entitlementsIssue.js +1 -1
- package/dist/commonjs/funcs/entitlementsIssue.js.map +1 -1
- package/dist/commonjs/funcs/entitlementsList.d.ts +4 -0
- package/dist/commonjs/funcs/entitlementsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/entitlementsList.js +4 -0
- package/dist/commonjs/funcs/entitlementsList.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/booleanentitlementdetail.d.ts +16 -19
- package/dist/commonjs/models/booleanentitlementdetail.d.ts.map +1 -1
- package/dist/commonjs/models/booleanentitlementdetail.js +8 -15
- package/dist/commonjs/models/booleanentitlementdetail.js.map +1 -1
- package/dist/commonjs/models/booleanentitlementlistitem.d.ts +66 -0
- package/dist/commonjs/models/booleanentitlementlistitem.d.ts.map +1 -0
- package/dist/commonjs/models/{entitlement.js → booleanentitlementlistitem.js} +16 -27
- package/dist/commonjs/models/booleanentitlementlistitem.js.map +1 -0
- package/dist/commonjs/models/entitlementlistitem.d.ts +14 -0
- package/dist/commonjs/models/entitlementlistitem.d.ts.map +1 -0
- package/dist/commonjs/models/entitlementlistitem.js +55 -0
- package/dist/commonjs/models/entitlementlistitem.js.map +1 -0
- package/dist/commonjs/models/entitlementstatus.d.ts +17 -0
- package/dist/commonjs/models/entitlementstatus.d.ts.map +1 -0
- package/dist/commonjs/models/entitlementstatus.js +51 -0
- package/dist/commonjs/models/entitlementstatus.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +5 -2
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +5 -2
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoice.d.ts +4 -0
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +1 -0
- package/dist/commonjs/models/invoice.js.map +1 -1
- package/dist/commonjs/models/meteredentitlementdetail.d.ts +20 -23
- package/dist/commonjs/models/meteredentitlementdetail.d.ts.map +1 -1
- package/dist/commonjs/models/meteredentitlementdetail.js +10 -17
- package/dist/commonjs/models/meteredentitlementdetail.js.map +1 -1
- package/dist/commonjs/models/meteredentitlementlistitem.d.ts +90 -0
- package/dist/commonjs/models/meteredentitlementlistitem.d.ts.map +1 -0
- package/dist/commonjs/models/{entitlementaccessresult.js → meteredentitlementlistitem.js} +23 -37
- package/dist/commonjs/models/meteredentitlementlistitem.js.map +1 -0
- package/dist/commonjs/models/operations/listentitlements.d.ts +2 -2
- package/dist/commonjs/models/operations/listentitlements.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listentitlements.js +1 -1
- package/dist/commonjs/models/operations/listentitlements.js.map +1 -1
- package/dist/commonjs/models/operations/updatesubscription.d.ts +3 -0
- package/dist/commonjs/models/operations/updatesubscription.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatesubscription.js.map +1 -1
- package/dist/commonjs/models/staticentitlementdetail.d.ts +12 -21
- package/dist/commonjs/models/staticentitlementdetail.d.ts.map +1 -1
- package/dist/commonjs/models/staticentitlementdetail.js +8 -16
- package/dist/commonjs/models/staticentitlementdetail.js.map +1 -1
- package/dist/commonjs/models/staticentitlementlistitem.d.ts +66 -0
- package/dist/commonjs/models/staticentitlementlistitem.d.ts.map +1 -0
- package/dist/commonjs/models/staticentitlementlistitem.js +63 -0
- package/dist/commonjs/models/staticentitlementlistitem.js.map +1 -0
- package/dist/commonjs/sdk/entitlements.d.ts +5 -1
- package/dist/commonjs/sdk/entitlements.d.ts.map +1 -1
- package/dist/commonjs/sdk/entitlements.js +4 -0
- package/dist/commonjs/sdk/entitlements.js.map +1 -1
- package/dist/esm/funcs/entitlementsIssue.d.ts +1 -1
- package/dist/esm/funcs/entitlementsIssue.d.ts.map +1 -1
- package/dist/esm/funcs/entitlementsIssue.js +1 -1
- package/dist/esm/funcs/entitlementsIssue.js.map +1 -1
- package/dist/esm/funcs/entitlementsList.d.ts +4 -0
- package/dist/esm/funcs/entitlementsList.d.ts.map +1 -1
- package/dist/esm/funcs/entitlementsList.js +4 -0
- package/dist/esm/funcs/entitlementsList.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/booleanentitlementdetail.d.ts +16 -19
- package/dist/esm/models/booleanentitlementdetail.d.ts.map +1 -1
- package/dist/esm/models/booleanentitlementdetail.js +7 -14
- package/dist/esm/models/booleanentitlementdetail.js.map +1 -1
- package/dist/esm/models/booleanentitlementlistitem.d.ts +66 -0
- package/dist/esm/models/booleanentitlementlistitem.d.ts.map +1 -0
- package/dist/esm/models/booleanentitlementlistitem.js +26 -0
- package/dist/esm/models/booleanentitlementlistitem.js.map +1 -0
- package/dist/esm/models/entitlementlistitem.d.ts +14 -0
- package/dist/esm/models/entitlementlistitem.d.ts.map +1 -0
- package/dist/esm/models/entitlementlistitem.js +18 -0
- package/dist/esm/models/entitlementlistitem.js.map +1 -0
- package/dist/esm/models/entitlementstatus.d.ts +17 -0
- package/dist/esm/models/entitlementstatus.d.ts.map +1 -0
- package/dist/esm/models/entitlementstatus.js +15 -0
- package/dist/esm/models/entitlementstatus.js.map +1 -0
- package/dist/esm/models/index.d.ts +5 -2
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +5 -2
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoice.d.ts +4 -0
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +1 -0
- package/dist/esm/models/invoice.js.map +1 -1
- package/dist/esm/models/meteredentitlementdetail.d.ts +20 -23
- package/dist/esm/models/meteredentitlementdetail.d.ts.map +1 -1
- package/dist/esm/models/meteredentitlementdetail.js +9 -16
- package/dist/esm/models/meteredentitlementdetail.js.map +1 -1
- package/dist/esm/models/meteredentitlementlistitem.d.ts +90 -0
- package/dist/esm/models/meteredentitlementlistitem.d.ts.map +1 -0
- package/dist/esm/models/meteredentitlementlistitem.js +32 -0
- package/dist/esm/models/meteredentitlementlistitem.js.map +1 -0
- package/dist/esm/models/operations/listentitlements.d.ts +2 -2
- package/dist/esm/models/operations/listentitlements.d.ts.map +1 -1
- package/dist/esm/models/operations/listentitlements.js +1 -1
- package/dist/esm/models/operations/listentitlements.js.map +1 -1
- package/dist/esm/models/operations/updatesubscription.d.ts +3 -0
- package/dist/esm/models/operations/updatesubscription.d.ts.map +1 -1
- package/dist/esm/models/operations/updatesubscription.js.map +1 -1
- package/dist/esm/models/staticentitlementdetail.d.ts +12 -21
- package/dist/esm/models/staticentitlementdetail.d.ts.map +1 -1
- package/dist/esm/models/staticentitlementdetail.js +7 -15
- package/dist/esm/models/staticentitlementdetail.js.map +1 -1
- package/dist/esm/models/staticentitlementlistitem.d.ts +66 -0
- package/dist/esm/models/staticentitlementlistitem.d.ts.map +1 -0
- package/dist/esm/models/staticentitlementlistitem.js +26 -0
- package/dist/esm/models/staticentitlementlistitem.js.map +1 -0
- package/dist/esm/sdk/entitlements.d.ts +5 -1
- package/dist/esm/sdk/entitlements.d.ts.map +1 -1
- package/dist/esm/sdk/entitlements.js +4 -0
- package/dist/esm/sdk/entitlements.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/entitlementsIssue.ts +4 -4
- package/src/funcs/entitlementsList.ts +4 -0
- package/src/lib/config.ts +2 -2
- package/src/models/booleanentitlementdetail.ts +22 -28
- package/src/models/booleanentitlementlistitem.ts +100 -0
- package/src/models/entitlementlistitem.ts +49 -0
- package/src/models/entitlementstatus.ts +24 -0
- package/src/models/index.ts +5 -2
- package/src/models/invoice.ts +5 -0
- package/src/models/meteredentitlementdetail.ts +28 -34
- package/src/models/meteredentitlementlistitem.ts +134 -0
- package/src/models/operations/listentitlements.ts +3 -3
- package/src/models/operations/updatesubscription.ts +3 -0
- package/src/models/staticentitlementdetail.ts +19 -30
- package/src/models/staticentitlementlistitem.ts +100 -0
- package/src/sdk/entitlements.ts +5 -1
- package/dist/commonjs/models/entitlement.d.ts +0 -71
- package/dist/commonjs/models/entitlement.d.ts.map +0 -1
- package/dist/commonjs/models/entitlement.js.map +0 -1
- package/dist/commonjs/models/entitlementaccessresult.d.ts +0 -99
- package/dist/commonjs/models/entitlementaccessresult.d.ts.map +0 -1
- package/dist/commonjs/models/entitlementaccessresult.js.map +0 -1
- package/dist/esm/models/entitlement.d.ts +0 -71
- package/dist/esm/models/entitlement.d.ts.map +0 -1
- package/dist/esm/models/entitlement.js +0 -37
- package/dist/esm/models/entitlement.js.map +0 -1
- package/dist/esm/models/entitlementaccessresult.d.ts +0 -99
- package/dist/esm/models/entitlementaccessresult.d.ts.map +0 -1
- package/dist/esm/models/entitlementaccessresult.js +0 -46
- package/dist/esm/models/entitlementaccessresult.js.map +0 -1
- package/src/models/entitlement.ts +0 -107
- package/src/models/entitlementaccessresult.ts +0 -147
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listentitlements.js","sourceRoot":"","sources":["../../../../src/models/operations/listentitlements.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAiCtC,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,MAAM;CACJ,CAAC;AA6BX,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,SAAS,E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AI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
|
|
@@ -8,6 +8,9 @@ export type UpdateSubscriptionStatus = ClosedEnum<typeof UpdateSubscriptionStatu
|
|
|
8
8
|
export type UpdateSubscriptionRequestBody = {
|
|
9
9
|
endingAt?: Date | undefined;
|
|
10
10
|
status?: UpdateSubscriptionStatus | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Effective termination timestamp. Capped at the current effective time (future values are clamped). Must be strictly after the subscription's start date — values at or before startedAt are rejected with 400.
|
|
13
|
+
*/
|
|
11
14
|
terminatedAt?: Date | undefined;
|
|
12
15
|
/**
|
|
13
16
|
* Identifier of entity that cancelled the subscription. Sample values: 'cust_abc123' for customer-initiated cancellation, 'org_xyz789' for merchant-initiated cancellation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatesubscription.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/updatesubscription.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AACX,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,wBAAwB,CAChC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC9C,YAAY,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,SAAS,CAA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C,CAAC,CAAC,UAAU,EACZ,6BAA6B,CAa7B,CAAC;AAEH,wBAAgB,mCAAmC,CACjD,6BAA6B,EAAE,6BAA6B,GAC3D,MAAM,CAMR;AAED,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,sCAAsC,CAAC;CACrD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,kCAAkC,EAClC,CAAC,CAAC,UAAU,EACZ,yBAAyB,CAQzB,CAAC;AAEH,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
|
|
1
|
+
{"version":3,"file":"updatesubscription.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/updatesubscription.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AACX,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,wBAAwB,CAChC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,G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BAA6B,EAAE,6BAA6B,GAC3D,MAAM,CAMR;AAED,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,sCAAsC,CAAC;CACrD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,kCAAkC,EAClC,CAAC,CAAC,UAAU,EACZ,yBAAyB,CAQzB,CAAC;AAEH,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatesubscription.js","sourceRoot":"","sources":["../../../../src/models/operations/updatesubscription.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG1D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"updatesubscription.js","sourceRoot":"","sources":["../../../../src/models/operations/updatesubscription.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG1D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;CAChB,CAAC;AAmDX,gBAAgB;AAChB,MAAM,CAAC,MAAM,uCAAuC,GAEhD,CAAC,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;AAiB3C,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,IAAI,EA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C;CACxE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,aAAa;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { EntitlementStatus } from "./entitlementstatus.js";
|
|
4
5
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
6
|
export declare const StaticEntitlementDetailObject: {
|
|
6
7
|
readonly Entitlement: "entitlement";
|
|
7
8
|
};
|
|
8
9
|
export type StaticEntitlementDetailObject = ClosedEnum<typeof StaticEntitlementDetailObject>;
|
|
9
|
-
/**
|
|
10
|
-
* Current status of the entitlement.
|
|
11
|
-
*/
|
|
12
|
-
export declare const StaticEntitlementDetailStatus: {
|
|
13
|
-
readonly Active: "active";
|
|
14
|
-
readonly Canceled: "canceled";
|
|
15
|
-
readonly Expired: "expired";
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Current status of the entitlement.
|
|
19
|
-
*/
|
|
20
|
-
export type StaticEntitlementDetailStatus = ClosedEnum<typeof StaticEntitlementDetailStatus>;
|
|
21
10
|
/**
|
|
22
11
|
* Common fields shared by all entitlement types.
|
|
23
12
|
*/
|
|
@@ -40,14 +29,18 @@ export type StaticEntitlementDetail = {
|
|
|
40
29
|
*/
|
|
41
30
|
featureKey: string;
|
|
42
31
|
featureType: "static";
|
|
32
|
+
/**
|
|
33
|
+
* Unique identifier for a product
|
|
34
|
+
*/
|
|
35
|
+
productId: string;
|
|
43
36
|
/**
|
|
44
37
|
* The subscription this entitlement is associated with, if any.
|
|
45
38
|
*/
|
|
46
|
-
subscriptionId
|
|
39
|
+
subscriptionId: string | null;
|
|
47
40
|
/**
|
|
48
41
|
* Current status of the entitlement.
|
|
49
42
|
*/
|
|
50
|
-
status:
|
|
43
|
+
status: EntitlementStatus;
|
|
51
44
|
/**
|
|
52
45
|
* When the entitlement becomes active.
|
|
53
46
|
*/
|
|
@@ -55,7 +48,7 @@ export type StaticEntitlementDetail = {
|
|
|
55
48
|
/**
|
|
56
49
|
* When the entitlement expires. Null means no expiration.
|
|
57
50
|
*/
|
|
58
|
-
activeTo
|
|
51
|
+
activeTo: Date | null;
|
|
59
52
|
/**
|
|
60
53
|
* Whether the customer currently has active access to this entitlement.
|
|
61
54
|
*/
|
|
@@ -63,21 +56,19 @@ export type StaticEntitlementDetail = {
|
|
|
63
56
|
/**
|
|
64
57
|
* Additional metadata for the entitlement.
|
|
65
58
|
*/
|
|
66
|
-
metadata
|
|
59
|
+
metadata: {
|
|
67
60
|
[k: string]: string;
|
|
68
|
-
}
|
|
61
|
+
};
|
|
69
62
|
/**
|
|
70
63
|
* Configuration values for this entitlement.
|
|
71
64
|
*/
|
|
72
|
-
config
|
|
65
|
+
config: {
|
|
73
66
|
[k: string]: any;
|
|
74
|
-
}
|
|
67
|
+
};
|
|
75
68
|
};
|
|
76
69
|
/** @internal */
|
|
77
70
|
export declare const StaticEntitlementDetailObject$inboundSchema: z.ZodNativeEnum<typeof StaticEntitlementDetailObject>;
|
|
78
71
|
/** @internal */
|
|
79
|
-
export declare const StaticEntitlementDetailStatus$inboundSchema: z.ZodNativeEnum<typeof StaticEntitlementDetailStatus>;
|
|
80
|
-
/** @internal */
|
|
81
72
|
export declare const StaticEntitlementDetail$inboundSchema: z.ZodType<StaticEntitlementDetail, z.ZodTypeDef, unknown>;
|
|
82
73
|
export declare function staticEntitlementDetailFromJSON(jsonString: string): SafeParseResult<StaticEntitlementDetail, SDKValidationError>;
|
|
83
74
|
//# sourceMappingURL=staticentitlementdetail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticentitlementdetail.d.ts","sourceRoot":"","sources":["../../../src/models/staticentitlementdetail.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"staticentitlementdetail.d.ts","sourceRoot":"","sources":["../../../src/models/staticentitlementdetail.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,eAAO,MAAM,6BAA6B;;CAEhC,CAAC;AACX,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,6BAA6B,CACrC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,6BAA6B,CAAC;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,QAAQ,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;OAEG;IACH,UAAU,EAAE,IAAI,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClC;;OAEG;IACH,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,aAAa,CACvE,OAAO,6BAA6B,CACS,CAAC;AAEhD,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAC3D,uBAAuB,EACvB,CAAC,CAAC,UAAU,EACZ,OAAO,CAkBP,CAAC;AAEH,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAM9D"}
|
|
@@ -3,22 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import { EntitlementStatus$inboundSchema, } from "./entitlementstatus.js";
|
|
6
7
|
export const StaticEntitlementDetailObject = {
|
|
7
8
|
Entitlement: "entitlement",
|
|
8
9
|
};
|
|
9
|
-
/**
|
|
10
|
-
* Current status of the entitlement.
|
|
11
|
-
*/
|
|
12
|
-
export const StaticEntitlementDetailStatus = {
|
|
13
|
-
Active: "active",
|
|
14
|
-
Canceled: "canceled",
|
|
15
|
-
Expired: "expired",
|
|
16
|
-
};
|
|
17
10
|
/** @internal */
|
|
18
11
|
export const StaticEntitlementDetailObject$inboundSchema = z.nativeEnum(StaticEntitlementDetailObject);
|
|
19
12
|
/** @internal */
|
|
20
|
-
export const StaticEntitlementDetailStatus$inboundSchema = z.nativeEnum(StaticEntitlementDetailStatus);
|
|
21
|
-
/** @internal */
|
|
22
13
|
export const StaticEntitlementDetail$inboundSchema = z.object({
|
|
23
14
|
object: StaticEntitlementDetailObject$inboundSchema.default("entitlement"),
|
|
24
15
|
id: z.string(),
|
|
@@ -26,13 +17,14 @@ export const StaticEntitlementDetail$inboundSchema = z.object({
|
|
|
26
17
|
featureId: z.string(),
|
|
27
18
|
featureKey: z.string(),
|
|
28
19
|
featureType: z.literal("static"),
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
productId: z.string(),
|
|
21
|
+
subscriptionId: z.nullable(z.string()),
|
|
22
|
+
status: EntitlementStatus$inboundSchema,
|
|
31
23
|
activeFrom: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
32
|
-
activeTo: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v)))
|
|
24
|
+
activeTo: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))),
|
|
33
25
|
hasAccess: z.boolean(),
|
|
34
|
-
metadata: z.record(z.string())
|
|
35
|
-
config: z.record(z.any())
|
|
26
|
+
metadata: z.record(z.string()),
|
|
27
|
+
config: z.record(z.any()),
|
|
36
28
|
});
|
|
37
29
|
export function staticEntitlementDetailFromJSON(jsonString) {
|
|
38
30
|
return safeParse(jsonString, (x) => StaticEntitlementDetail$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StaticEntitlementDetail' from JSON`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticentitlementdetail.js","sourceRoot":"","sources":["../../../src/models/staticentitlementdetail.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"staticentitlementdetail.js","sourceRoot":"","sources":["../../../src/models/staticentitlementdetail.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,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Q,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;CAC1B,CAAC,CAAC;AAEH,MAAM,UAAU,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { EntitlementStatus } from "./entitlementstatus.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Common fields shared by all entitlement list items. List items use `entitlementId` (not `id`) to preserve the original public field name on `/v1/entitlements`. The get-by-id endpoint returns the same object with a top-level `id` and `object: "entitlement"` instead.
|
|
7
|
+
*/
|
|
8
|
+
export type StaticEntitlementListItem = {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier for the entitlement.
|
|
11
|
+
*/
|
|
12
|
+
entitlementId: string;
|
|
13
|
+
/**
|
|
14
|
+
* Unique identifier for a customer
|
|
15
|
+
*/
|
|
16
|
+
customerId: string;
|
|
17
|
+
/**
|
|
18
|
+
* The feature this entitlement grants access to.
|
|
19
|
+
*/
|
|
20
|
+
featureId: string;
|
|
21
|
+
/**
|
|
22
|
+
* The unique key identifying the feature.
|
|
23
|
+
*/
|
|
24
|
+
featureKey: string;
|
|
25
|
+
featureType: "static";
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier for a product
|
|
28
|
+
*/
|
|
29
|
+
productId: string;
|
|
30
|
+
/**
|
|
31
|
+
* The subscription this entitlement is associated with, if any.
|
|
32
|
+
*/
|
|
33
|
+
subscriptionId: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Current status of the entitlement.
|
|
36
|
+
*/
|
|
37
|
+
status: EntitlementStatus;
|
|
38
|
+
/**
|
|
39
|
+
* When the entitlement becomes active.
|
|
40
|
+
*/
|
|
41
|
+
activeFrom: Date;
|
|
42
|
+
/**
|
|
43
|
+
* When the entitlement expires. Null means no expiration.
|
|
44
|
+
*/
|
|
45
|
+
activeTo: Date | null;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the customer currently has active access to this entitlement.
|
|
48
|
+
*/
|
|
49
|
+
hasAccess: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Additional metadata for the entitlement.
|
|
52
|
+
*/
|
|
53
|
+
metadata: {
|
|
54
|
+
[k: string]: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Configuration values for this entitlement.
|
|
58
|
+
*/
|
|
59
|
+
config: {
|
|
60
|
+
[k: string]: any;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
/** @internal */
|
|
64
|
+
export declare const StaticEntitlementListItem$inboundSchema: z.ZodType<StaticEntitlementListItem, z.ZodTypeDef, unknown>;
|
|
65
|
+
export declare function staticEntitlementListItemFromJSON(jsonString: string): SafeParseResult<StaticEntitlementListItem, SDKValidationError>;
|
|
66
|
+
//# sourceMappingURL=staticentitlementlistitem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staticentitlementlistitem.d.ts","sourceRoot":"","sources":["../../../src/models/staticentitlementlistitem.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,QAAQ,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;OAEG;IACH,UAAU,EAAE,IAAI,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClC;;OAEG;IACH,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,yBAAyB,EACzB,CAAC,CAAC,UAAU,EACZ,OAAO,CAiBP,CAAC;AAEH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAMhE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import { EntitlementStatus$inboundSchema, } from "./entitlementstatus.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const StaticEntitlementListItem$inboundSchema = z.object({
|
|
9
|
+
entitlementId: z.string(),
|
|
10
|
+
customerId: z.string(),
|
|
11
|
+
featureId: z.string(),
|
|
12
|
+
featureKey: z.string(),
|
|
13
|
+
featureType: z.literal("static"),
|
|
14
|
+
productId: z.string(),
|
|
15
|
+
subscriptionId: z.nullable(z.string()),
|
|
16
|
+
status: EntitlementStatus$inboundSchema,
|
|
17
|
+
activeFrom: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
18
|
+
activeTo: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))),
|
|
19
|
+
hasAccess: z.boolean(),
|
|
20
|
+
metadata: z.record(z.string()),
|
|
21
|
+
config: z.record(z.any()),
|
|
22
|
+
});
|
|
23
|
+
export function staticEntitlementListItemFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => StaticEntitlementListItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StaticEntitlementListItem' from JSON`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=staticentitlementlistitem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staticentitlementlistitem.js","sourceRoot":"","sources":["../../../src/models/staticentitlementlistitem.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAEL,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AA0DhC,gBAAgB;AAChB,MAAM,CAAC,MAAM,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,MAAM,EAAE,+BAA+B;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7E,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAClB,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAClE;IACD,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;CAC1B,CAAC,CAAC;AAEH,MAAM,UAAU,iCAAiC,CAC/C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAAuC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACnE,uDAAuD,CACxD,CAAC;AACJ,CAAC"}
|
|
@@ -10,6 +10,10 @@ export declare class Entitlements extends ClientSDK {
|
|
|
10
10
|
*
|
|
11
11
|
* @remarks
|
|
12
12
|
* Retrieve all entitlements for a customer, optionally filtered by feature or product.
|
|
13
|
+
*
|
|
14
|
+
* List items identify the entitlement with `entitlementId` (the original list contract). The get-by-id endpoint (`GET /v1/entitlements/{entitlementId}`) returns the same object but with a top-level `id` and `object: "entitlement"` instead — so use `item.entitlementId`, not `item.id`, when chaining a list result into a get-by-id call.
|
|
15
|
+
*
|
|
16
|
+
* For metered entitlements, each item carries live balance/usage fields, which the API resolves with one grant-engine balance lookup per metered item (bounded concurrency, up to `limit` items per page).
|
|
13
17
|
*/
|
|
14
18
|
list(request: operations.ListEntitlementsRequest, options?: RequestOptions): Promise<operations.ListEntitlementsResponse>;
|
|
15
19
|
/**
|
|
@@ -18,7 +22,7 @@ export declare class Entitlements extends ClientSDK {
|
|
|
18
22
|
* @remarks
|
|
19
23
|
* Issue a new entitlement to a customer, granting them access to a specific feature. The feature must exist and belong to the same merchant as the customer.
|
|
20
24
|
*/
|
|
21
|
-
issue(request: models.IssueEntitlementRequest, options?: RequestOptions): Promise<models.
|
|
25
|
+
issue(request: models.IssueEntitlementRequest, options?: RequestOptions): Promise<models.EntitlementDetail>;
|
|
22
26
|
/**
|
|
23
27
|
* Get Entitlement
|
|
24
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitlements.d.ts","sourceRoot":"","sources":["../../../src/sdk/entitlements.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,qBAAa,YAAa,SAAQ,SAAS;IACzC,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED
|
|
1
|
+
{"version":3,"file":"entitlements.d.ts","sourceRoot":"","sources":["../../../src/sdk/entitlements.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,qBAAa,YAAa,SAAQ,SAAS;IACzC,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED;;;;;;;;;OASG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC;IAQ/C;;;;;OAKG;IACG,KAAK,CACT,OAAO,EAAE,MAAM,CAAC,uBAAuB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC;IAQpC;;;;;OAKG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC;CAOrC"}
|
|
@@ -16,6 +16,10 @@ export class Entitlements extends ClientSDK {
|
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
18
|
* Retrieve all entitlements for a customer, optionally filtered by feature or product.
|
|
19
|
+
*
|
|
20
|
+
* List items identify the entitlement with `entitlementId` (the original list contract). The get-by-id endpoint (`GET /v1/entitlements/{entitlementId}`) returns the same object but with a top-level `id` and `object: "entitlement"` instead — so use `item.entitlementId`, not `item.id`, when chaining a list result into a get-by-id call.
|
|
21
|
+
*
|
|
22
|
+
* For metered entitlements, each item carries live balance/usage fields, which the API resolves with one grant-engine balance lookup per metered item (bounded concurrency, up to `limit` items per page).
|
|
19
23
|
*/
|
|
20
24
|
async list(request, options) {
|
|
21
25
|
return unwrapAsync(entitlementsList(this, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../src/sdk/entitlements.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAA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,OAAO,WAAW,CAAC,iBAAiB,CAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAyC,EACzC,OAAwB;QAExB,OAAO,WAAW,CAAC,eAAe,CAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@ export function entitlementsIssue(
|
|
|
37
37
|
options?: RequestOptions,
|
|
38
38
|
): APIPromise<
|
|
39
39
|
Result<
|
|
40
|
-
models.
|
|
40
|
+
models.EntitlementDetail,
|
|
41
41
|
| errors.BadRequest
|
|
42
42
|
| errors.ErrorT
|
|
43
43
|
| PaygenticError
|
|
@@ -64,7 +64,7 @@ async function $do(
|
|
|
64
64
|
): Promise<
|
|
65
65
|
[
|
|
66
66
|
Result<
|
|
67
|
-
models.
|
|
67
|
+
models.EntitlementDetail,
|
|
68
68
|
| errors.BadRequest
|
|
69
69
|
| errors.ErrorT
|
|
70
70
|
| PaygenticError
|
|
@@ -147,7 +147,7 @@ async function $do(
|
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
const [result] = await M.match<
|
|
150
|
-
models.
|
|
150
|
+
models.EntitlementDetail,
|
|
151
151
|
| errors.BadRequest
|
|
152
152
|
| errors.ErrorT
|
|
153
153
|
| PaygenticError
|
|
@@ -159,7 +159,7 @@ async function $do(
|
|
|
159
159
|
| UnexpectedClientError
|
|
160
160
|
| SDKValidationError
|
|
161
161
|
>(
|
|
162
|
-
M.json(201, models.
|
|
162
|
+
M.json(201, models.EntitlementDetail$inboundSchema),
|
|
163
163
|
M.jsonErr(400, errors.BadRequest$inboundSchema),
|
|
164
164
|
M.jsonErr([403, 404, 409], errors.ErrorT$inboundSchema),
|
|
165
165
|
M.jsonErr(500, errors.ErrorT$inboundSchema),
|
|
@@ -30,6 +30,10 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Retrieve all entitlements for a customer, optionally filtered by feature or product.
|
|
33
|
+
*
|
|
34
|
+
* List items identify the entitlement with `entitlementId` (the original list contract). The get-by-id endpoint (`GET /v1/entitlements/{entitlementId}`) returns the same object but with a top-level `id` and `object: "entitlement"` instead — so use `item.entitlementId`, not `item.id`, when chaining a list result into a get-by-id call.
|
|
35
|
+
*
|
|
36
|
+
* For metered entitlements, each item carries live balance/usage fields, which the API resolves with one grant-engine balance lookup per metered item (bounded concurrency, up to `limit` items per page).
|
|
33
37
|
*/
|
|
34
38
|
export function entitlementsList(
|
|
35
39
|
client: PaygenticCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "0.1.0",
|
|
68
|
-
sdkVersion: "0.7.
|
|
68
|
+
sdkVersion: "0.7.11",
|
|
69
69
|
genVersion: "2.879.13",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.7.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.7.11 2.879.13 0.1.0 @paygentic/sdk",
|
|
71
71
|
} as const;
|
|
@@ -6,6 +6,10 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { ClosedEnum } from "../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import {
|
|
10
|
+
EntitlementStatus,
|
|
11
|
+
EntitlementStatus$inboundSchema,
|
|
12
|
+
} from "./entitlementstatus.js";
|
|
9
13
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
14
|
|
|
11
15
|
export const BooleanEntitlementDetailObject = {
|
|
@@ -15,21 +19,6 @@ export type BooleanEntitlementDetailObject = ClosedEnum<
|
|
|
15
19
|
typeof BooleanEntitlementDetailObject
|
|
16
20
|
>;
|
|
17
21
|
|
|
18
|
-
/**
|
|
19
|
-
* Current status of the entitlement.
|
|
20
|
-
*/
|
|
21
|
-
export const BooleanEntitlementDetailStatus = {
|
|
22
|
-
Active: "active",
|
|
23
|
-
Canceled: "canceled",
|
|
24
|
-
Expired: "expired",
|
|
25
|
-
} as const;
|
|
26
|
-
/**
|
|
27
|
-
* Current status of the entitlement.
|
|
28
|
-
*/
|
|
29
|
-
export type BooleanEntitlementDetailStatus = ClosedEnum<
|
|
30
|
-
typeof BooleanEntitlementDetailStatus
|
|
31
|
-
>;
|
|
32
|
-
|
|
33
22
|
/**
|
|
34
23
|
* Common fields shared by all entitlement types.
|
|
35
24
|
*/
|
|
@@ -52,14 +41,18 @@ export type BooleanEntitlementDetail = {
|
|
|
52
41
|
*/
|
|
53
42
|
featureKey: string;
|
|
54
43
|
featureType: "boolean";
|
|
44
|
+
/**
|
|
45
|
+
* Unique identifier for a product
|
|
46
|
+
*/
|
|
47
|
+
productId: string;
|
|
55
48
|
/**
|
|
56
49
|
* The subscription this entitlement is associated with, if any.
|
|
57
50
|
*/
|
|
58
|
-
subscriptionId
|
|
51
|
+
subscriptionId: string | null;
|
|
59
52
|
/**
|
|
60
53
|
* Current status of the entitlement.
|
|
61
54
|
*/
|
|
62
|
-
status:
|
|
55
|
+
status: EntitlementStatus;
|
|
63
56
|
/**
|
|
64
57
|
* When the entitlement becomes active.
|
|
65
58
|
*/
|
|
@@ -67,7 +60,7 @@ export type BooleanEntitlementDetail = {
|
|
|
67
60
|
/**
|
|
68
61
|
* When the entitlement expires. Null means no expiration.
|
|
69
62
|
*/
|
|
70
|
-
activeTo
|
|
63
|
+
activeTo: Date | null;
|
|
71
64
|
/**
|
|
72
65
|
* Whether the customer currently has active access to this entitlement.
|
|
73
66
|
*/
|
|
@@ -75,7 +68,11 @@ export type BooleanEntitlementDetail = {
|
|
|
75
68
|
/**
|
|
76
69
|
* Additional metadata for the entitlement.
|
|
77
70
|
*/
|
|
78
|
-
metadata
|
|
71
|
+
metadata: { [k: string]: string };
|
|
72
|
+
/**
|
|
73
|
+
* Always `null` for boolean entitlements. Surfaced on every entitlement so clients can read `config` without first switching on `featureType`.
|
|
74
|
+
*/
|
|
75
|
+
config: { [k: string]: any } | null;
|
|
79
76
|
};
|
|
80
77
|
|
|
81
78
|
/** @internal */
|
|
@@ -83,11 +80,6 @@ export const BooleanEntitlementDetailObject$inboundSchema: z.ZodNativeEnum<
|
|
|
83
80
|
typeof BooleanEntitlementDetailObject
|
|
84
81
|
> = z.nativeEnum(BooleanEntitlementDetailObject);
|
|
85
82
|
|
|
86
|
-
/** @internal */
|
|
87
|
-
export const BooleanEntitlementDetailStatus$inboundSchema: z.ZodNativeEnum<
|
|
88
|
-
typeof BooleanEntitlementDetailStatus
|
|
89
|
-
> = z.nativeEnum(BooleanEntitlementDetailStatus);
|
|
90
|
-
|
|
91
83
|
/** @internal */
|
|
92
84
|
export const BooleanEntitlementDetail$inboundSchema: z.ZodType<
|
|
93
85
|
BooleanEntitlementDetail,
|
|
@@ -100,14 +92,16 @@ export const BooleanEntitlementDetail$inboundSchema: z.ZodType<
|
|
|
100
92
|
featureId: z.string(),
|
|
101
93
|
featureKey: z.string(),
|
|
102
94
|
featureType: z.literal("boolean"),
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
productId: z.string(),
|
|
96
|
+
subscriptionId: z.nullable(z.string()),
|
|
97
|
+
status: EntitlementStatus$inboundSchema,
|
|
105
98
|
activeFrom: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
106
99
|
activeTo: z.nullable(
|
|
107
100
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
108
|
-
)
|
|
101
|
+
),
|
|
109
102
|
hasAccess: z.boolean(),
|
|
110
|
-
metadata: z.record(z.string())
|
|
103
|
+
metadata: z.record(z.string()),
|
|
104
|
+
config: z.nullable(z.record(z.any())),
|
|
111
105
|
});
|
|
112
106
|
|
|
113
107
|
export function booleanEntitlementDetailFromJSON(
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import {
|
|
9
|
+
EntitlementStatus,
|
|
10
|
+
EntitlementStatus$inboundSchema,
|
|
11
|
+
} from "./entitlementstatus.js";
|
|
12
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Common fields shared by all entitlement list items. List items use `entitlementId` (not `id`) to preserve the original public field name on `/v1/entitlements`. The get-by-id endpoint returns the same object with a top-level `id` and `object: "entitlement"` instead.
|
|
16
|
+
*/
|
|
17
|
+
export type BooleanEntitlementListItem = {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for the entitlement.
|
|
20
|
+
*/
|
|
21
|
+
entitlementId: string;
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for a customer
|
|
24
|
+
*/
|
|
25
|
+
customerId: string;
|
|
26
|
+
/**
|
|
27
|
+
* The feature this entitlement grants access to.
|
|
28
|
+
*/
|
|
29
|
+
featureId: string;
|
|
30
|
+
/**
|
|
31
|
+
* The unique key identifying the feature.
|
|
32
|
+
*/
|
|
33
|
+
featureKey: string;
|
|
34
|
+
featureType: "boolean";
|
|
35
|
+
/**
|
|
36
|
+
* Unique identifier for a product
|
|
37
|
+
*/
|
|
38
|
+
productId: string;
|
|
39
|
+
/**
|
|
40
|
+
* The subscription this entitlement is associated with, if any.
|
|
41
|
+
*/
|
|
42
|
+
subscriptionId: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Current status of the entitlement.
|
|
45
|
+
*/
|
|
46
|
+
status: EntitlementStatus;
|
|
47
|
+
/**
|
|
48
|
+
* When the entitlement becomes active.
|
|
49
|
+
*/
|
|
50
|
+
activeFrom: Date;
|
|
51
|
+
/**
|
|
52
|
+
* When the entitlement expires. Null means no expiration.
|
|
53
|
+
*/
|
|
54
|
+
activeTo: Date | null;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the customer currently has active access to this entitlement.
|
|
57
|
+
*/
|
|
58
|
+
hasAccess: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Additional metadata for the entitlement.
|
|
61
|
+
*/
|
|
62
|
+
metadata: { [k: string]: string };
|
|
63
|
+
/**
|
|
64
|
+
* Always `null` for boolean entitlements. Surfaced on every list item so clients can read `item.config` without first switching on `featureType`.
|
|
65
|
+
*/
|
|
66
|
+
config: { [k: string]: any } | null;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const BooleanEntitlementListItem$inboundSchema: z.ZodType<
|
|
71
|
+
BooleanEntitlementListItem,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
unknown
|
|
74
|
+
> = z.object({
|
|
75
|
+
entitlementId: z.string(),
|
|
76
|
+
customerId: z.string(),
|
|
77
|
+
featureId: z.string(),
|
|
78
|
+
featureKey: z.string(),
|
|
79
|
+
featureType: z.literal("boolean"),
|
|
80
|
+
productId: z.string(),
|
|
81
|
+
subscriptionId: z.nullable(z.string()),
|
|
82
|
+
status: EntitlementStatus$inboundSchema,
|
|
83
|
+
activeFrom: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
84
|
+
activeTo: z.nullable(
|
|
85
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
86
|
+
),
|
|
87
|
+
hasAccess: z.boolean(),
|
|
88
|
+
metadata: z.record(z.string()),
|
|
89
|
+
config: z.nullable(z.record(z.any())),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export function booleanEntitlementListItemFromJSON(
|
|
93
|
+
jsonString: string,
|
|
94
|
+
): SafeParseResult<BooleanEntitlementListItem, SDKValidationError> {
|
|
95
|
+
return safeParse(
|
|
96
|
+
jsonString,
|
|
97
|
+
(x) => BooleanEntitlementListItem$inboundSchema.parse(JSON.parse(x)),
|
|
98
|
+
`Failed to parse 'BooleanEntitlementListItem' from JSON`,
|
|
99
|
+
);
|
|
100
|
+
}
|