@flexprice/sdk 2.1.44-dev.7 → 2.1.44

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.
Files changed (66) hide show
  1. package/docs/sdk/models/create-entitlement-request.md +27 -24
  2. package/docs/sdk/models/create-subscription-request.md +0 -1
  3. package/docs/sdk/models/entitlement-filter.md +18 -19
  4. package/docs/sdk/models/entitlement-response.md +0 -1
  5. package/docs/sdk/models/grouped-invoicing-child-request.md +0 -1
  6. package/docs/sdk/models/subscription-entitlements-response.md +5 -41
  7. package/docs/sdks/entitlements/README.md +16 -4
  8. package/esm/lib/config.d.ts +3 -3
  9. package/esm/lib/config.js +3 -3
  10. package/esm/lib/config.js.map +1 -1
  11. package/esm/sdk/models/create-entitlement-request.d.ts +4 -7
  12. package/esm/sdk/models/create-entitlement-request.d.ts.map +1 -1
  13. package/esm/sdk/models/create-entitlement-request.js +2 -2
  14. package/esm/sdk/models/create-entitlement-request.js.map +1 -1
  15. package/esm/sdk/models/create-subscription-request.d.ts +0 -6
  16. package/esm/sdk/models/create-subscription-request.d.ts.map +1 -1
  17. package/esm/sdk/models/create-subscription-request.js +0 -3
  18. package/esm/sdk/models/create-subscription-request.js.map +1 -1
  19. package/esm/sdk/models/entitlement-filter.d.ts +0 -9
  20. package/esm/sdk/models/entitlement-filter.d.ts.map +1 -1
  21. package/esm/sdk/models/entitlement-filter.js +0 -3
  22. package/esm/sdk/models/entitlement-filter.js.map +1 -1
  23. package/esm/sdk/models/entitlement-response.d.ts +0 -2
  24. package/esm/sdk/models/entitlement-response.d.ts.map +1 -1
  25. package/esm/sdk/models/entitlement-response.js +0 -3
  26. package/esm/sdk/models/entitlement-response.js.map +1 -1
  27. package/esm/sdk/models/grouped-invoicing-child-request.d.ts +0 -6
  28. package/esm/sdk/models/grouped-invoicing-child-request.d.ts.map +1 -1
  29. package/esm/sdk/models/grouped-invoicing-child-request.js +0 -3
  30. package/esm/sdk/models/grouped-invoicing-child-request.js.map +1 -1
  31. package/esm/sdk/models/index.d.ts +0 -3
  32. package/esm/sdk/models/index.d.ts.map +1 -1
  33. package/esm/sdk/models/index.js +0 -3
  34. package/esm/sdk/models/index.js.map +1 -1
  35. package/esm/sdk/models/subscription-entitlements-response.d.ts +0 -2
  36. package/esm/sdk/models/subscription-entitlements-response.d.ts.map +1 -1
  37. package/esm/sdk/models/subscription-entitlements-response.js +0 -3
  38. package/esm/sdk/models/subscription-entitlements-response.js.map +1 -1
  39. package/jsr.json +1 -1
  40. package/package.json +1 -1
  41. package/src/lib/config.ts +3 -3
  42. package/src/sdk/models/create-entitlement-request.ts +6 -9
  43. package/src/sdk/models/create-subscription-request.ts +0 -18
  44. package/src/sdk/models/entitlement-filter.ts +0 -16
  45. package/src/sdk/models/entitlement-response.ts +0 -7
  46. package/src/sdk/models/grouped-invoicing-child-request.ts +0 -18
  47. package/src/sdk/models/index.ts +0 -3
  48. package/src/sdk/models/subscription-entitlements-response.ts +0 -11
  49. package/docs/sdk/models/create-subscription-entitlement-grant-request.md +0 -24
  50. package/docs/sdk/models/entitlement-grant-scope-entity-type.md +0 -17
  51. package/docs/sdk/models/subscription-entitlement-grants-response.md +0 -50
  52. package/esm/sdk/models/create-subscription-entitlement-grant-request.d.ts +0 -30
  53. package/esm/sdk/models/create-subscription-entitlement-grant-request.d.ts.map +0 -1
  54. package/esm/sdk/models/create-subscription-entitlement-grant-request.js +0 -32
  55. package/esm/sdk/models/create-subscription-entitlement-grant-request.js.map +0 -1
  56. package/esm/sdk/models/entitlement-grant-scope-entity-type.d.ts +0 -13
  57. package/esm/sdk/models/entitlement-grant-scope-entity-type.d.ts.map +0 -1
  58. package/esm/sdk/models/entitlement-grant-scope-entity-type.js +0 -14
  59. package/esm/sdk/models/entitlement-grant-scope-entity-type.js.map +0 -1
  60. package/esm/sdk/models/subscription-entitlement-grants-response.d.ts +0 -13
  61. package/esm/sdk/models/subscription-entitlement-grants-response.d.ts.map +0 -1
  62. package/esm/sdk/models/subscription-entitlement-grants-response.js +0 -22
  63. package/esm/sdk/models/subscription-entitlement-grants-response.js.map +0 -1
  64. package/src/sdk/models/create-subscription-entitlement-grant-request.ts +0 -85
  65. package/src/sdk/models/entitlement-grant-scope-entity-type.ts +0 -27
  66. package/src/sdk/models/subscription-entitlement-grants-response.ts +0 -47
@@ -33,11 +33,6 @@ import {
33
33
  CreateCreditGrantRequest$Outbound,
34
34
  CreateCreditGrantRequest$outboundSchema,
35
35
  } from "./create-credit-grant-request.js";
36
- import {
37
- CreateSubscriptionEntitlementGrantRequest,
38
- CreateSubscriptionEntitlementGrantRequest$Outbound,
39
- CreateSubscriptionEntitlementGrantRequest$outboundSchema,
40
- } from "./create-subscription-entitlement-grant-request.js";
41
36
  import {
42
37
  CreateSubscriptionLineItemRequest,
43
38
  CreateSubscriptionLineItemRequest$Outbound,
@@ -201,12 +196,6 @@ export type CreateSubscriptionRequest = {
201
196
  * Accepts coupon_code; optionally targets a line item via price_id.
202
197
  */
203
198
  subscriptionCoupons?: Array<SubscriptionCouponInput> | undefined;
204
- /**
205
- * SubscriptionEntitlementGrants are dollar entitlement grants shared by every usage line, created with the subscription.
206
- */
207
- subscriptionEntitlementGrants?:
208
- | Array<CreateSubscriptionEntitlementGrantRequest>
209
- | undefined;
210
199
  subscriptionStatus?: SubscriptionStatus | undefined;
211
200
  taxRateOverrides?: Array<TaxRateOverride> | undefined;
212
201
  timezone?: string | undefined;
@@ -260,9 +249,6 @@ export type CreateSubscriptionRequest$Outbound = {
260
249
  proration_behavior?: string | undefined;
261
250
  start_date?: string | undefined;
262
251
  subscription_coupons?: Array<SubscriptionCouponInput$Outbound> | undefined;
263
- subscription_entitlement_grants?:
264
- | Array<CreateSubscriptionEntitlementGrantRequest$Outbound>
265
- | undefined;
266
252
  subscription_status?: string | undefined;
267
253
  tax_rate_overrides?: Array<TaxRateOverride$Outbound> | undefined;
268
254
  timezone?: string | undefined;
@@ -325,9 +311,6 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodMiniType<
325
311
  subscriptionCoupons: z.optional(
326
312
  z.array(SubscriptionCouponInput$outboundSchema),
327
313
  ),
328
- subscriptionEntitlementGrants: z.optional(
329
- z.array(CreateSubscriptionEntitlementGrantRequest$outboundSchema),
330
- ),
331
314
  subscriptionStatus: z.optional(SubscriptionStatus$outboundSchema),
332
315
  taxRateOverrides: z.optional(z.array(TaxRateOverride$outboundSchema)),
333
316
  timezone: z.optional(z.string()),
@@ -365,7 +348,6 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodMiniType<
365
348
  prorationBehavior: "proration_behavior",
366
349
  startDate: "start_date",
367
350
  subscriptionCoupons: "subscription_coupons",
368
- subscriptionEntitlementGrants: "subscription_entitlement_grants",
369
351
  subscriptionStatus: "subscription_status",
370
352
  taxRateOverrides: "tax_rate_overrides",
371
353
  trialPeriodDays: "trial_period_days",
@@ -9,10 +9,6 @@ import {
9
9
  EntitlementEntityType,
10
10
  EntitlementEntityType$outboundSchema,
11
11
  } from "./entitlement-entity-type.js";
12
- import {
13
- EntitlementGrantScopeEntityType,
14
- EntitlementGrantScopeEntityType$outboundSchema,
15
- } from "./entitlement-grant-scope-entity-type.js";
16
12
  import { FeatureType, FeatureType$outboundSchema } from "./feature-type.js";
17
13
  import {
18
14
  FilterCondition,
@@ -43,13 +39,6 @@ export type EntitlementFilter = {
43
39
  * Specific filters for entitlements
44
40
  */
45
41
  filters?: Array<FilterCondition> | undefined;
46
- /**
47
- * GrantScopes selects entitlements by grant scope. Empty means feature only, so
48
- *
49
- * @remarks
50
- * subscription entitlement grants, which have no feature, never reach feature-based reads.
51
- */
52
- grantScopes?: Array<EntitlementGrantScopeEntityType> | undefined;
53
42
  /**
54
43
  * HasGrantConfig filters on grant-config presence (grant_quota set or not).
55
44
  */
@@ -78,7 +67,6 @@ export type EntitlementFilter$Outbound = {
78
67
  feature_ids?: Array<string> | undefined;
79
68
  feature_type?: string | undefined;
80
69
  filters?: Array<FilterCondition$Outbound> | undefined;
81
- grant_scopes?: Array<string> | undefined;
82
70
  has_grant_config?: boolean | undefined;
83
71
  is_enabled?: boolean | undefined;
84
72
  limit?: number | undefined;
@@ -103,9 +91,6 @@ export const EntitlementFilter$outboundSchema: z.ZodMiniType<
103
91
  featureIds: z.optional(z.array(z.string())),
104
92
  featureType: z.optional(FeatureType$outboundSchema),
105
93
  filters: z.optional(z.array(FilterCondition$outboundSchema)),
106
- grantScopes: z.optional(
107
- z.array(EntitlementGrantScopeEntityType$outboundSchema),
108
- ),
109
94
  hasGrantConfig: z.optional(z.boolean()),
110
95
  isEnabled: z.optional(z.boolean()),
111
96
  limit: z.optional(z.int()),
@@ -123,7 +108,6 @@ export const EntitlementFilter$outboundSchema: z.ZodMiniType<
123
108
  entityType: "entity_type",
124
109
  featureIds: "feature_ids",
125
110
  featureType: "feature_type",
126
- grantScopes: "grant_scopes",
127
111
  hasGrantConfig: "has_grant_config",
128
112
  isEnabled: "is_enabled",
129
113
  planIds: "plan_ids",
@@ -31,10 +31,6 @@ import {
31
31
  EntitlementGrantMeasure,
32
32
  EntitlementGrantMeasure$inboundSchema,
33
33
  } from "./entitlement-grant-measure.js";
34
- import {
35
- EntitlementGrantScopeEntityType,
36
- EntitlementGrantScopeEntityType$inboundSchema,
37
- } from "./entitlement-grant-scope-entity-type.js";
38
34
  import {
39
35
  EntitlementUsageResetPeriod,
40
36
  EntitlementUsageResetPeriod$inboundSchema,
@@ -67,7 +63,6 @@ export type EntitlementResponse = {
67
63
  grantDurationValue?: number | undefined;
68
64
  grantMeasure?: EntitlementGrantMeasure | undefined;
69
65
  grantQuota?: string | undefined;
70
- grantScope?: EntitlementGrantScopeEntityType | undefined;
71
66
  id?: string | undefined;
72
67
  isEnabled?: boolean | undefined;
73
68
  isSoftLimit?: boolean | undefined;
@@ -115,7 +110,6 @@ export const EntitlementResponse$inboundSchema: z.ZodMiniType<
115
110
  grant_duration_value: types.optional(types.number()),
116
111
  grant_measure: types.optional(EntitlementGrantMeasure$inboundSchema),
117
112
  grant_quota: types.optional(types.string()),
118
- grant_scope: types.optional(EntitlementGrantScopeEntityType$inboundSchema),
119
113
  id: types.optional(types.string()),
120
114
  is_enabled: types.optional(types.boolean()),
121
115
  is_soft_limit: types.optional(types.boolean()),
@@ -151,7 +145,6 @@ export const EntitlementResponse$inboundSchema: z.ZodMiniType<
151
145
  "grant_duration_value": "grantDurationValue",
152
146
  "grant_measure": "grantMeasure",
153
147
  "grant_quota": "grantQuota",
154
- "grant_scope": "grantScope",
155
148
  "is_enabled": "isEnabled",
156
149
  "is_soft_limit": "isSoftLimit",
157
150
  "parent_entitlement_id": "parentEntitlementId",
@@ -18,11 +18,6 @@ import {
18
18
  CreateCreditGrantRequest$Outbound,
19
19
  CreateCreditGrantRequest$outboundSchema,
20
20
  } from "./create-credit-grant-request.js";
21
- import {
22
- CreateSubscriptionEntitlementGrantRequest,
23
- CreateSubscriptionEntitlementGrantRequest$Outbound,
24
- CreateSubscriptionEntitlementGrantRequest$outboundSchema,
25
- } from "./create-subscription-entitlement-grant-request.js";
26
21
  import {
27
22
  CreateSubscriptionLineItemRequest,
28
23
  CreateSubscriptionLineItemRequest$Outbound,
@@ -97,12 +92,6 @@ export type GroupedInvoicingChildRequest = {
97
92
  * Accepts coupon_code; optionally targets a line item via price_id.
98
93
  */
99
94
  subscriptionCoupons?: Array<SubscriptionCouponInput> | undefined;
100
- /**
101
- * SubscriptionEntitlementGrants are dollar entitlement grants shared by every usage line, created with the subscription.
102
- */
103
- subscriptionEntitlementGrants?:
104
- | Array<CreateSubscriptionEntitlementGrantRequest>
105
- | undefined;
106
95
  taxRateOverrides?: Array<TaxRateOverride> | undefined;
107
96
  /**
108
97
  * TrialPeriodDays: nil = inherit from plan prices, 0 = no trial, >0 = override in days.
@@ -132,9 +121,6 @@ export type GroupedInvoicingChildRequest$Outbound = {
132
121
  phases?: Array<SubscriptionPhaseCreateRequest$Outbound> | undefined;
133
122
  plan_id: string;
134
123
  subscription_coupons?: Array<SubscriptionCouponInput$Outbound> | undefined;
135
- subscription_entitlement_grants?:
136
- | Array<CreateSubscriptionEntitlementGrantRequest$Outbound>
137
- | undefined;
138
124
  tax_rate_overrides?: Array<TaxRateOverride$Outbound> | undefined;
139
125
  trial_period_days?: number | undefined;
140
126
  };
@@ -171,9 +157,6 @@ export const GroupedInvoicingChildRequest$outboundSchema: z.ZodMiniType<
171
157
  subscriptionCoupons: z.optional(
172
158
  z.array(SubscriptionCouponInput$outboundSchema),
173
159
  ),
174
- subscriptionEntitlementGrants: z.optional(
175
- z.array(CreateSubscriptionEntitlementGrantRequest$outboundSchema),
176
- ),
177
160
  taxRateOverrides: z.optional(z.array(TaxRateOverride$outboundSchema)),
178
161
  trialPeriodDays: z.optional(z.int()),
179
162
  }),
@@ -192,7 +175,6 @@ export const GroupedInvoicingChildRequest$outboundSchema: z.ZodMiniType<
192
175
  overrideLineItems: "override_line_items",
193
176
  planId: "plan_id",
194
177
  subscriptionCoupons: "subscription_coupons",
195
- subscriptionEntitlementGrants: "subscription_entitlement_grants",
196
178
  taxRateOverrides: "tax_rate_overrides",
197
179
  trialPeriodDays: "trial_period_days",
198
180
  });
@@ -166,7 +166,6 @@ export * from "./create-price-tier.js";
166
166
  export * from "./create-price-unit-request.js";
167
167
  export * from "./create-price-unit-response.js";
168
168
  export * from "./create-scheduled-task-request.js";
169
- export * from "./create-subscription-entitlement-grant-request.js";
170
169
  export * from "./create-subscription-line-item-op.js";
171
170
  export * from "./create-subscription-line-item-request.js";
172
171
  export * from "./create-subscription-params.js";
@@ -245,7 +244,6 @@ export * from "./entitlement-filter.js";
245
244
  export * from "./entitlement-grant-allocation-behavior.js";
246
245
  export * from "./entitlement-grant-duration-unit.js";
247
246
  export * from "./entitlement-grant-measure.js";
248
- export * from "./entitlement-grant-scope-entity-type.js";
249
247
  export * from "./entitlement-grant-status.js";
250
248
  export * from "./entitlement-response.js";
251
249
  export * from "./entitlement-source-entity-type.js";
@@ -637,7 +635,6 @@ export * from "./subscription-change-type.js";
637
635
  export * from "./subscription-change-v2-request.js";
638
636
  export * from "./subscription-change-v2-response.js";
639
637
  export * from "./subscription-coupon-input.js";
640
- export * from "./subscription-entitlement-grants-response.js";
641
638
  export * from "./subscription-entitlements-response.js";
642
639
  export * from "./subscription-filter.js";
643
640
  export * from "./subscription-inheritance-config.js";
@@ -12,17 +12,10 @@ import {
12
12
  AggregatedFeature$inboundSchema,
13
13
  } from "./aggregated-feature.js";
14
14
  import { SDKValidationError } from "./sdk-validation-error.js";
15
- import {
16
- SubscriptionEntitlementGrantsResponse,
17
- SubscriptionEntitlementGrantsResponse$inboundSchema,
18
- } from "./subscription-entitlement-grants-response.js";
19
15
 
20
16
  export type SubscriptionEntitlementsResponse = {
21
17
  features?: Array<AggregatedFeature> | undefined;
22
18
  planId?: string | undefined;
23
- subscriptionEntitlementGrants?:
24
- | SubscriptionEntitlementGrantsResponse
25
- | undefined;
26
19
  subscriptionId?: string | undefined;
27
20
  };
28
21
 
@@ -34,15 +27,11 @@ export const SubscriptionEntitlementsResponse$inboundSchema: z.ZodMiniType<
34
27
  z.object({
35
28
  features: types.optional(z.array(AggregatedFeature$inboundSchema)),
36
29
  plan_id: types.optional(types.string()),
37
- subscription_entitlement_grants: types.optional(
38
- SubscriptionEntitlementGrantsResponse$inboundSchema,
39
- ),
40
30
  subscription_id: types.optional(types.string()),
41
31
  }),
42
32
  z.transform((v) => {
43
33
  return remap$(v, {
44
34
  "plan_id": "planId",
45
- "subscription_entitlement_grants": "subscriptionEntitlementGrants",
46
35
  "subscription_id": "subscriptionId",
47
36
  });
48
37
  }),
@@ -1,24 +0,0 @@
1
- # CreateSubscriptionEntitlementGrantRequest
2
-
3
- ## Example Usage
4
-
5
- ```typescript
6
- import { CreateSubscriptionEntitlementGrantRequest } from "@flexprice/sdk/sdk/models";
7
-
8
- let value: CreateSubscriptionEntitlementGrantRequest = {
9
- grantDurationUnit: "hour",
10
- grantQuota: "<value>",
11
- };
12
- ```
13
-
14
- ## Fields
15
-
16
- | Field | Type | Required | Description |
17
- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
18
- | `aggregationMode` | [models.EntitlementAggregationMode](../../sdk/models/entitlement-aggregation-mode.md) | :heavy_minus_sign: | N/A |
19
- | `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
20
- | `grantAllocationBehavior` | [models.EntitlementGrantAllocationBehavior](../../sdk/models/entitlement-grant-allocation-behavior.md) | :heavy_minus_sign: | N/A |
21
- | `grantDurationUnit` | [models.EntitlementGrantDurationUnit](../../sdk/models/entitlement-grant-duration-unit.md) | :heavy_check_mark: | N/A |
22
- | `grantDurationValue` | *number* | :heavy_minus_sign: | N/A |
23
- | `grantQuota` | *string* | :heavy_check_mark: | N/A |
24
- | `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | StartDate defaults to the subscription's start; EndDate leaves the grant open. |
@@ -1,17 +0,0 @@
1
- # EntitlementGrantScopeEntityType
2
-
3
- ## Example Usage
4
-
5
- ```typescript
6
- import { EntitlementGrantScopeEntityType } from "@flexprice/sdk/sdk/models";
7
-
8
- let value: EntitlementGrantScopeEntityType = "subscription";
9
-
10
- // Open enum: unrecognized values are captured as Unrecognized<string>
11
- ```
12
-
13
- ## Values
14
-
15
- ```typescript
16
- "feature" | "subscription" | "group" | Unrecognized<string>
17
- ```
@@ -1,50 +0,0 @@
1
- # SubscriptionEntitlementGrantsResponse
2
-
3
- ## Example Usage
4
-
5
- ```typescript
6
- import { SubscriptionEntitlementGrantsResponse } from "@flexprice/sdk/sdk/models";
7
-
8
- let value: SubscriptionEntitlementGrantsResponse = {
9
- entitlements: [
10
- {
11
- addon: {
12
- prices: [
13
- {
14
- addon: {},
15
- meter: {
16
- createdAt: new Date("2024-03-20T15:04:05Z"),
17
- eventName: "api_request",
18
- id: "550e8400-e29b-41d4-a716-446655440000",
19
- name: "API Usage Meter",
20
- status: "published",
21
- tenantId: "tenant123",
22
- updatedAt: new Date("2024-03-20T15:04:05Z"),
23
- },
24
- plan: {},
25
- },
26
- ],
27
- },
28
- feature: {
29
- meter: {
30
- createdAt: new Date("2024-03-20T15:04:05Z"),
31
- eventName: "api_request",
32
- id: "550e8400-e29b-41d4-a716-446655440000",
33
- name: "API Usage Meter",
34
- status: "published",
35
- tenantId: "tenant123",
36
- updatedAt: new Date("2024-03-20T15:04:05Z"),
37
- },
38
- },
39
- plan: {},
40
- },
41
- ],
42
- };
43
- ```
44
-
45
- ## Fields
46
-
47
- | Field | Type | Required | Description |
48
- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
49
- | `entitlements` | [models.EntitlementResponse](../../sdk/models/entitlement-response.md)[] | :heavy_minus_sign: | N/A |
50
- | `grantState` | [models.GrantState](../../sdk/models/grant-state.md) | :heavy_minus_sign: | N/A |
@@ -1,30 +0,0 @@
1
- import * as z from "zod/v4-mini";
2
- import { EntitlementAggregationMode } from "./entitlement-aggregation-mode.js";
3
- import { EntitlementGrantAllocationBehavior } from "./entitlement-grant-allocation-behavior.js";
4
- import { EntitlementGrantDurationUnit } from "./entitlement-grant-duration-unit.js";
5
- export type CreateSubscriptionEntitlementGrantRequest = {
6
- aggregationMode?: EntitlementAggregationMode | undefined;
7
- endDate?: Date | undefined;
8
- grantAllocationBehavior?: EntitlementGrantAllocationBehavior | undefined;
9
- grantDurationUnit: EntitlementGrantDurationUnit;
10
- grantDurationValue?: number | undefined;
11
- grantQuota: string;
12
- /**
13
- * StartDate defaults to the subscription's start; EndDate leaves the grant open.
14
- */
15
- startDate?: Date | undefined;
16
- };
17
- /** @internal */
18
- export type CreateSubscriptionEntitlementGrantRequest$Outbound = {
19
- aggregation_mode?: string | undefined;
20
- end_date?: string | undefined;
21
- grant_allocation_behavior?: string | undefined;
22
- grant_duration_unit: string;
23
- grant_duration_value?: number | undefined;
24
- grant_quota: string;
25
- start_date?: string | undefined;
26
- };
27
- /** @internal */
28
- export declare const CreateSubscriptionEntitlementGrantRequest$outboundSchema: z.ZodMiniType<CreateSubscriptionEntitlementGrantRequest$Outbound, CreateSubscriptionEntitlementGrantRequest>;
29
- export declare function createSubscriptionEntitlementGrantRequestToJSON(createSubscriptionEntitlementGrantRequest: CreateSubscriptionEntitlementGrantRequest): string;
30
- //# sourceMappingURL=create-subscription-entitlement-grant-request.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-subscription-entitlement-grant-request.d.ts","sourceRoot":"","sources":["../../../src/sdk/models/create-subscription-entitlement-grant-request.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EACL,0BAA0B,EAE3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,kCAAkC,EAEnC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,4BAA4B,EAE7B,MAAM,sCAAsC,CAAC;AAE9C,MAAM,MAAM,yCAAyC,GAAG;IACtD,eAAe,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;IACzD,OAAO,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC3B,uBAAuB,CAAC,EAAE,kCAAkC,GAAG,SAAS,CAAC;IACzE,iBAAiB,EAAE,4BAA4B,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kDAAkD,GAAG;IAC/D,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,yBAAyB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wDAAwD,EACnE,CAAC,CAAC,WAAW,CACX,kDAAkD,EAClD,yCAAyC,CA0B1C,CAAC;AAEJ,wBAAgB,+CAA+C,CAC7D,yCAAyC,EACvC,yCAAyC,GAC1C,MAAM,CAMR"}
@@ -1,32 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod/v4-mini";
5
- import { remap as remap$ } from "../../lib/primitives.js";
6
- import { EntitlementAggregationMode$outboundSchema, } from "./entitlement-aggregation-mode.js";
7
- import { EntitlementGrantAllocationBehavior$outboundSchema, } from "./entitlement-grant-allocation-behavior.js";
8
- import { EntitlementGrantDurationUnit$outboundSchema, } from "./entitlement-grant-duration-unit.js";
9
- /** @internal */
10
- export const CreateSubscriptionEntitlementGrantRequest$outboundSchema = z.pipe(z.object({
11
- aggregationMode: z.optional(EntitlementAggregationMode$outboundSchema),
12
- endDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
13
- grantAllocationBehavior: z.optional(EntitlementGrantAllocationBehavior$outboundSchema),
14
- grantDurationUnit: EntitlementGrantDurationUnit$outboundSchema,
15
- grantDurationValue: z.optional(z.int()),
16
- grantQuota: z.string(),
17
- startDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
18
- }), z.transform((v) => {
19
- return remap$(v, {
20
- aggregationMode: "aggregation_mode",
21
- endDate: "end_date",
22
- grantAllocationBehavior: "grant_allocation_behavior",
23
- grantDurationUnit: "grant_duration_unit",
24
- grantDurationValue: "grant_duration_value",
25
- grantQuota: "grant_quota",
26
- startDate: "start_date",
27
- });
28
- }));
29
- export function createSubscriptionEntitlementGrantRequestToJSON(createSubscriptionEntitlementGrantRequest) {
30
- return JSON.stringify(CreateSubscriptionEntitlementGrantRequest$outboundSchema.parse(createSubscriptionEntitlementGrantRequest));
31
- }
32
- //# sourceMappingURL=create-subscription-entitlement-grant-request.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-subscription-entitlement-grant-request.js","sourceRoot":"","sources":["../../../src/sdk/models/create-subscription-entitlement-grant-request.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAEL,yCAAyC,GAC1C,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,iDAAiD,GAClD,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAEL,2CAA2C,GAC5C,MAAM,sCAAsC,CAAC;AA0B9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,wDAAwD,GAI/D,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IACtE,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACxE,uBAAuB,EAAE,CAAC,CAAC,QAAQ,CACjC,iDAAiD,CAClD;IACD,iBAAiB,EAAE,2CAA2C;IAC9D,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,QAAQ,CACnB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CACpD;CACF,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,eAAe,EAAE,kBAAkB;QACnC,OAAO,EAAE,UAAU;QACnB,uBAAuB,EAAE,2BAA2B;QACpD,iBAAiB,EAAE,qBAAqB;QACxC,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,aAAa;QACzB,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AAAA,CACJ,CAAC,CACH,CAAC;AAEJ,MAAM,UAAU,+CAA+C,CAC7D,yCAC2C,EACnC;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,wDAAwD,CAAC,KAAK,CAC5D,yCAAyC,CAC1C,CACF,CAAC;AAAA,CACH"}
@@ -1,13 +0,0 @@
1
- import * as z from "zod/v4-mini";
2
- import { OpenEnum } from "../../types/enums.js";
3
- export declare const EntitlementGrantScopeEntityType: {
4
- readonly Feature: "feature";
5
- readonly Subscription: "subscription";
6
- readonly Group: "group";
7
- };
8
- export type EntitlementGrantScopeEntityType = OpenEnum<typeof EntitlementGrantScopeEntityType>;
9
- /** @internal */
10
- export declare const EntitlementGrantScopeEntityType$inboundSchema: z.ZodMiniType<EntitlementGrantScopeEntityType, unknown>;
11
- /** @internal */
12
- export declare const EntitlementGrantScopeEntityType$outboundSchema: z.ZodMiniType<string, EntitlementGrantScopeEntityType>;
13
- //# sourceMappingURL=entitlement-grant-scope-entity-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entitlement-grant-scope-entity-type.d.ts","sourceRoot":"","sources":["../../../src/sdk/models/entitlement-grant-scope-entity-type.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,eAAO,MAAM,+BAA+B;;;;CAIlC,CAAC;AACX,MAAM,MAAM,+BAA+B,GAAG,QAAQ,CACpD,OAAO,+BAA+B,CACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,WAAW,CACvE,+BAA+B,EAC/B,OAAO,CACmD,CAAC;AAC7D,gBAAgB;AAChB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,WAAW,CACxE,MAAM,EACN,+BAA+B,CAC4B,CAAC"}
@@ -1,14 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as openEnums from "../../types/enums.js";
5
- export const EntitlementGrantScopeEntityType = {
6
- Feature: "feature",
7
- Subscription: "subscription",
8
- Group: "group",
9
- };
10
- /** @internal */
11
- export const EntitlementGrantScopeEntityType$inboundSchema = openEnums.inboundSchema(EntitlementGrantScopeEntityType);
12
- /** @internal */
13
- export const EntitlementGrantScopeEntityType$outboundSchema = openEnums.outboundSchema(EntitlementGrantScopeEntityType);
14
- //# sourceMappingURL=entitlement-grant-scope-entity-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entitlement-grant-scope-entity-type.js","sourceRoot":"","sources":["../../../src/sdk/models/entitlement-grant-scope-entity-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAGlD,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,cAAc;IAC5B,KAAK,EAAE,OAAO;CACN,CAAC;AAKX,gBAAgB;AAChB,MAAM,CAAC,MAAM,6CAA6C,GAGtD,SAAS,CAAC,aAAa,CAAC,+BAA+B,CAAC,CAAC;AAC7D,gBAAgB;AAChB,MAAM,CAAC,MAAM,8CAA8C,GAGvD,SAAS,CAAC,cAAc,CAAC,+BAA+B,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- import * as z from "zod/v4-mini";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { EntitlementResponse } from "./entitlement-response.js";
4
- import { GrantState } from "./grant-state.js";
5
- import { SDKValidationError } from "./sdk-validation-error.js";
6
- export type SubscriptionEntitlementGrantsResponse = {
7
- entitlements?: Array<EntitlementResponse> | undefined;
8
- grantState?: GrantState | undefined;
9
- };
10
- /** @internal */
11
- export declare const SubscriptionEntitlementGrantsResponse$inboundSchema: z.ZodMiniType<SubscriptionEntitlementGrantsResponse, unknown>;
12
- export declare function subscriptionEntitlementGrantsResponseFromJSON(jsonString: string): SafeParseResult<SubscriptionEntitlementGrantsResponse, SDKValidationError>;
13
- //# sourceMappingURL=subscription-entitlement-grants-response.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subscription-entitlement-grants-response.d.ts","sourceRoot":"","sources":["../../../src/sdk/models/subscription-entitlement-grants-response.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EACL,mBAAmB,EAEpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAA4B,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,qCAAqC,GAAG;IAClD,YAAY,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;IACtD,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mDAAmD,EAAE,CAAC,CAAC,WAAW,CAC7E,qCAAqC,EACrC,OAAO,CAWR,CAAC;AAEF,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qCAAqC,EAAE,kBAAkB,CAAC,CAO5E"}
@@ -1,22 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod/v4-mini";
5
- import { remap as remap$ } from "../../lib/primitives.js";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import * as types from "../../types/primitives.js";
8
- import { EntitlementResponse$inboundSchema, } from "./entitlement-response.js";
9
- import { GrantState$inboundSchema } from "./grant-state.js";
10
- /** @internal */
11
- export const SubscriptionEntitlementGrantsResponse$inboundSchema = z.pipe(z.object({
12
- entitlements: types.optional(z.array(EntitlementResponse$inboundSchema)),
13
- grant_state: types.optional(GrantState$inboundSchema),
14
- }), z.transform((v) => {
15
- return remap$(v, {
16
- "grant_state": "grantState",
17
- });
18
- }));
19
- export function subscriptionEntitlementGrantsResponseFromJSON(jsonString) {
20
- return safeParse(jsonString, (x) => SubscriptionEntitlementGrantsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubscriptionEntitlementGrantsResponse' from JSON`);
21
- }
22
- //# sourceMappingURL=subscription-entitlement-grants-response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subscription-entitlement-grants-response.js","sourceRoot":"","sources":["../../../src/sdk/models/subscription-entitlement-grants-response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAEL,iCAAiC,GAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAc,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAQxE,gBAAgB;AAChB,MAAM,CAAC,MAAM,mDAAmD,GAG5D,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACxE,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,wBAAwB,CAAC;CACtD,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,aAAa,EAAE,YAAY;KAC5B,CAAC,CAAC;AAAA,CACJ,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,6CAA6C,CAC3D,UAAkB,EAC0D;IAC5E,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,mDAAmD,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1E,mEAAmE,CACpE,CAAC;AAAA,CACH"}
@@ -1,85 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import {
8
- EntitlementAggregationMode,
9
- EntitlementAggregationMode$outboundSchema,
10
- } from "./entitlement-aggregation-mode.js";
11
- import {
12
- EntitlementGrantAllocationBehavior,
13
- EntitlementGrantAllocationBehavior$outboundSchema,
14
- } from "./entitlement-grant-allocation-behavior.js";
15
- import {
16
- EntitlementGrantDurationUnit,
17
- EntitlementGrantDurationUnit$outboundSchema,
18
- } from "./entitlement-grant-duration-unit.js";
19
-
20
- export type CreateSubscriptionEntitlementGrantRequest = {
21
- aggregationMode?: EntitlementAggregationMode | undefined;
22
- endDate?: Date | undefined;
23
- grantAllocationBehavior?: EntitlementGrantAllocationBehavior | undefined;
24
- grantDurationUnit: EntitlementGrantDurationUnit;
25
- grantDurationValue?: number | undefined;
26
- grantQuota: string;
27
- /**
28
- * StartDate defaults to the subscription's start; EndDate leaves the grant open.
29
- */
30
- startDate?: Date | undefined;
31
- };
32
-
33
- /** @internal */
34
- export type CreateSubscriptionEntitlementGrantRequest$Outbound = {
35
- aggregation_mode?: string | undefined;
36
- end_date?: string | undefined;
37
- grant_allocation_behavior?: string | undefined;
38
- grant_duration_unit: string;
39
- grant_duration_value?: number | undefined;
40
- grant_quota: string;
41
- start_date?: string | undefined;
42
- };
43
-
44
- /** @internal */
45
- export const CreateSubscriptionEntitlementGrantRequest$outboundSchema:
46
- z.ZodMiniType<
47
- CreateSubscriptionEntitlementGrantRequest$Outbound,
48
- CreateSubscriptionEntitlementGrantRequest
49
- > = z.pipe(
50
- z.object({
51
- aggregationMode: z.optional(EntitlementAggregationMode$outboundSchema),
52
- endDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
53
- grantAllocationBehavior: z.optional(
54
- EntitlementGrantAllocationBehavior$outboundSchema,
55
- ),
56
- grantDurationUnit: EntitlementGrantDurationUnit$outboundSchema,
57
- grantDurationValue: z.optional(z.int()),
58
- grantQuota: z.string(),
59
- startDate: z.optional(
60
- z.pipe(z.date(), z.transform(v => v.toISOString())),
61
- ),
62
- }),
63
- z.transform((v) => {
64
- return remap$(v, {
65
- aggregationMode: "aggregation_mode",
66
- endDate: "end_date",
67
- grantAllocationBehavior: "grant_allocation_behavior",
68
- grantDurationUnit: "grant_duration_unit",
69
- grantDurationValue: "grant_duration_value",
70
- grantQuota: "grant_quota",
71
- startDate: "start_date",
72
- });
73
- }),
74
- );
75
-
76
- export function createSubscriptionEntitlementGrantRequestToJSON(
77
- createSubscriptionEntitlementGrantRequest:
78
- CreateSubscriptionEntitlementGrantRequest,
79
- ): string {
80
- return JSON.stringify(
81
- CreateSubscriptionEntitlementGrantRequest$outboundSchema.parse(
82
- createSubscriptionEntitlementGrantRequest,
83
- ),
84
- );
85
- }
@@ -1,27 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import * as openEnums from "../../types/enums.js";
7
- import { OpenEnum } from "../../types/enums.js";
8
-
9
- export const EntitlementGrantScopeEntityType = {
10
- Feature: "feature",
11
- Subscription: "subscription",
12
- Group: "group",
13
- } as const;
14
- export type EntitlementGrantScopeEntityType = OpenEnum<
15
- typeof EntitlementGrantScopeEntityType
16
- >;
17
-
18
- /** @internal */
19
- export const EntitlementGrantScopeEntityType$inboundSchema: z.ZodMiniType<
20
- EntitlementGrantScopeEntityType,
21
- unknown
22
- > = openEnums.inboundSchema(EntitlementGrantScopeEntityType);
23
- /** @internal */
24
- export const EntitlementGrantScopeEntityType$outboundSchema: z.ZodMiniType<
25
- string,
26
- EntitlementGrantScopeEntityType
27
- > = openEnums.outboundSchema(EntitlementGrantScopeEntityType);