@paygentic/sdk 0.8.3 → 0.8.5

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 (148) hide show
  1. package/README.md +3 -3
  2. package/dist/commonjs/funcs/{feesGetPrice.d.ts → plansListPlanVersions.d.ts} +4 -5
  3. package/dist/commonjs/funcs/plansListPlanVersions.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/{feesGetPrice.js → plansListPlanVersions.js} +15 -15
  5. package/dist/commonjs/funcs/plansListPlanVersions.js.map +1 -0
  6. package/dist/commonjs/lib/config.d.ts +2 -2
  7. package/dist/commonjs/lib/config.js +2 -2
  8. package/dist/commonjs/models/index.d.ts +1 -1
  9. package/dist/commonjs/models/index.d.ts.map +1 -1
  10. package/dist/commonjs/models/index.js +1 -1
  11. package/dist/commonjs/models/index.js.map +1 -1
  12. package/dist/commonjs/models/operations/createprice.d.ts +3 -4
  13. package/dist/commonjs/models/operations/createprice.d.ts.map +1 -1
  14. package/dist/commonjs/models/operations/createprice.js +1 -2
  15. package/dist/commonjs/models/operations/createprice.js.map +1 -1
  16. package/dist/commonjs/models/operations/index.d.ts +1 -1
  17. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  18. package/dist/commonjs/models/operations/index.js +1 -1
  19. package/dist/commonjs/models/operations/index.js.map +1 -1
  20. package/dist/commonjs/models/operations/listplanversions.d.ts +46 -0
  21. package/dist/commonjs/models/operations/listplanversions.d.ts.map +1 -0
  22. package/dist/commonjs/models/operations/{getfeeprice.js → listplanversions.js} +25 -7
  23. package/dist/commonjs/models/operations/listplanversions.js.map +1 -0
  24. package/dist/commonjs/models/operations/updateprice.d.ts +3 -4
  25. package/dist/commonjs/models/operations/updateprice.d.ts.map +1 -1
  26. package/dist/commonjs/models/operations/updateprice.js +1 -2
  27. package/dist/commonjs/models/operations/updateprice.js.map +1 -1
  28. package/dist/commonjs/models/plan.d.ts +5 -1
  29. package/dist/commonjs/models/plan.d.ts.map +1 -1
  30. package/dist/commonjs/models/plan.js +3 -1
  31. package/dist/commonjs/models/plan.js.map +1 -1
  32. package/dist/commonjs/models/planversionsummary.d.ts +55 -0
  33. package/dist/commonjs/models/planversionsummary.d.ts.map +1 -0
  34. package/dist/commonjs/models/{feeprice.js → planversionsummary.js} +22 -32
  35. package/dist/commonjs/models/planversionsummary.js.map +1 -0
  36. package/dist/commonjs/models/price.d.ts +4 -5
  37. package/dist/commonjs/models/price.d.ts.map +1 -1
  38. package/dist/commonjs/models/price.js +4 -6
  39. package/dist/commonjs/models/price.js.map +1 -1
  40. package/dist/commonjs/models/reconciledfeatureadded.d.ts +1 -1
  41. package/dist/commonjs/models/schemasprice.d.ts +0 -1
  42. package/dist/commonjs/models/schemasprice.d.ts.map +1 -1
  43. package/dist/commonjs/models/schemasprice.js +0 -1
  44. package/dist/commonjs/models/schemasprice.js.map +1 -1
  45. package/dist/commonjs/models/subscription.d.ts +8 -0
  46. package/dist/commonjs/models/subscription.d.ts.map +1 -1
  47. package/dist/commonjs/models/subscription.js +2 -0
  48. package/dist/commonjs/models/subscription.js.map +1 -1
  49. package/dist/commonjs/sdk/fees.d.ts +0 -7
  50. package/dist/commonjs/sdk/fees.d.ts.map +1 -1
  51. package/dist/commonjs/sdk/fees.js +0 -10
  52. package/dist/commonjs/sdk/fees.js.map +1 -1
  53. package/dist/commonjs/sdk/plans.d.ts +7 -0
  54. package/dist/commonjs/sdk/plans.d.ts.map +1 -1
  55. package/dist/commonjs/sdk/plans.js +10 -0
  56. package/dist/commonjs/sdk/plans.js.map +1 -1
  57. package/dist/esm/funcs/{feesGetPrice.d.ts → plansListPlanVersions.d.ts} +4 -5
  58. package/dist/esm/funcs/plansListPlanVersions.d.ts.map +1 -0
  59. package/dist/esm/funcs/{feesGetPrice.js → plansListPlanVersions.js} +15 -15
  60. package/dist/esm/funcs/plansListPlanVersions.js.map +1 -0
  61. package/dist/esm/lib/config.d.ts +2 -2
  62. package/dist/esm/lib/config.js +2 -2
  63. package/dist/esm/models/index.d.ts +1 -1
  64. package/dist/esm/models/index.d.ts.map +1 -1
  65. package/dist/esm/models/index.js +1 -1
  66. package/dist/esm/models/index.js.map +1 -1
  67. package/dist/esm/models/operations/createprice.d.ts +3 -4
  68. package/dist/esm/models/operations/createprice.d.ts.map +1 -1
  69. package/dist/esm/models/operations/createprice.js +1 -2
  70. package/dist/esm/models/operations/createprice.js.map +1 -1
  71. package/dist/esm/models/operations/index.d.ts +1 -1
  72. package/dist/esm/models/operations/index.d.ts.map +1 -1
  73. package/dist/esm/models/operations/index.js +1 -1
  74. package/dist/esm/models/operations/index.js.map +1 -1
  75. package/dist/esm/models/operations/listplanversions.d.ts +46 -0
  76. package/dist/esm/models/operations/listplanversions.d.ts.map +1 -0
  77. package/dist/esm/models/operations/listplanversions.js +30 -0
  78. package/dist/esm/models/operations/listplanversions.js.map +1 -0
  79. package/dist/esm/models/operations/updateprice.d.ts +3 -4
  80. package/dist/esm/models/operations/updateprice.d.ts.map +1 -1
  81. package/dist/esm/models/operations/updateprice.js +1 -2
  82. package/dist/esm/models/operations/updateprice.js.map +1 -1
  83. package/dist/esm/models/plan.d.ts +5 -1
  84. package/dist/esm/models/plan.d.ts.map +1 -1
  85. package/dist/esm/models/plan.js +3 -1
  86. package/dist/esm/models/plan.js.map +1 -1
  87. package/dist/esm/models/planversionsummary.d.ts +55 -0
  88. package/dist/esm/models/planversionsummary.d.ts.map +1 -0
  89. package/dist/esm/models/planversionsummary.js +35 -0
  90. package/dist/esm/models/planversionsummary.js.map +1 -0
  91. package/dist/esm/models/price.d.ts +4 -5
  92. package/dist/esm/models/price.d.ts.map +1 -1
  93. package/dist/esm/models/price.js +3 -5
  94. package/dist/esm/models/price.js.map +1 -1
  95. package/dist/esm/models/reconciledfeatureadded.d.ts +1 -1
  96. package/dist/esm/models/schemasprice.d.ts +0 -1
  97. package/dist/esm/models/schemasprice.d.ts.map +1 -1
  98. package/dist/esm/models/schemasprice.js +0 -1
  99. package/dist/esm/models/schemasprice.js.map +1 -1
  100. package/dist/esm/models/subscription.d.ts +8 -0
  101. package/dist/esm/models/subscription.d.ts.map +1 -1
  102. package/dist/esm/models/subscription.js +2 -0
  103. package/dist/esm/models/subscription.js.map +1 -1
  104. package/dist/esm/sdk/fees.d.ts +0 -7
  105. package/dist/esm/sdk/fees.d.ts.map +1 -1
  106. package/dist/esm/sdk/fees.js +0 -10
  107. package/dist/esm/sdk/fees.js.map +1 -1
  108. package/dist/esm/sdk/plans.d.ts +7 -0
  109. package/dist/esm/sdk/plans.d.ts.map +1 -1
  110. package/dist/esm/sdk/plans.js +10 -0
  111. package/dist/esm/sdk/plans.js.map +1 -1
  112. package/jsr.json +1 -1
  113. package/package.json +1 -1
  114. package/src/funcs/{feesGetPrice.ts → plansListPlanVersions.ts} +25 -20
  115. package/src/lib/config.ts +2 -2
  116. package/src/models/index.ts +1 -1
  117. package/src/models/operations/createprice.ts +3 -4
  118. package/src/models/operations/index.ts +1 -1
  119. package/src/models/operations/listplanversions.ts +91 -0
  120. package/src/models/operations/updateprice.ts +3 -4
  121. package/src/models/plan.ts +8 -2
  122. package/src/models/planversionsummary.ts +95 -0
  123. package/src/models/price.ts +7 -7
  124. package/src/models/reconciledfeatureadded.ts +1 -1
  125. package/src/models/schemasprice.ts +0 -1
  126. package/src/models/subscription.ts +10 -0
  127. package/src/sdk/fees.ts +0 -18
  128. package/src/sdk/plans.ts +18 -0
  129. package/dist/commonjs/funcs/feesGetPrice.d.ts.map +0 -1
  130. package/dist/commonjs/funcs/feesGetPrice.js.map +0 -1
  131. package/dist/commonjs/models/feeprice.d.ts +0 -76
  132. package/dist/commonjs/models/feeprice.d.ts.map +0 -1
  133. package/dist/commonjs/models/feeprice.js.map +0 -1
  134. package/dist/commonjs/models/operations/getfeeprice.d.ts +0 -20
  135. package/dist/commonjs/models/operations/getfeeprice.d.ts.map +0 -1
  136. package/dist/commonjs/models/operations/getfeeprice.js.map +0 -1
  137. package/dist/esm/funcs/feesGetPrice.d.ts.map +0 -1
  138. package/dist/esm/funcs/feesGetPrice.js.map +0 -1
  139. package/dist/esm/models/feeprice.d.ts +0 -76
  140. package/dist/esm/models/feeprice.d.ts.map +0 -1
  141. package/dist/esm/models/feeprice.js +0 -44
  142. package/dist/esm/models/feeprice.js.map +0 -1
  143. package/dist/esm/models/operations/getfeeprice.d.ts +0 -20
  144. package/dist/esm/models/operations/getfeeprice.d.ts.map +0 -1
  145. package/dist/esm/models/operations/getfeeprice.js +0 -13
  146. package/dist/esm/models/operations/getfeeprice.js.map +0 -1
  147. package/src/models/feeprice.ts +0 -129
  148. package/src/models/operations/getfeeprice.ts +0 -40
@@ -0,0 +1,91 @@
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 { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import * as models from "../index.js";
11
+
12
+ export type ListPlanVersionsRequest = {
13
+ id: string;
14
+ /**
15
+ * Maximum number of versions to return
16
+ */
17
+ limit?: number | undefined;
18
+ /**
19
+ * Number of versions to skip
20
+ */
21
+ offset?: number | undefined;
22
+ };
23
+
24
+ export const ListPlanVersionsObject = {
25
+ List: "list",
26
+ } as const;
27
+ export type ListPlanVersionsObject = ClosedEnum<typeof ListPlanVersionsObject>;
28
+
29
+ /**
30
+ * List of plan versions
31
+ */
32
+ export type ListPlanVersionsResponse = {
33
+ object: ListPlanVersionsObject;
34
+ data: Array<models.PlanVersionSummary>;
35
+ /**
36
+ * Offset-based pagination response.
37
+ */
38
+ pagination: models.OffsetPagination;
39
+ };
40
+
41
+ /** @internal */
42
+ export type ListPlanVersionsRequest$Outbound = {
43
+ id: string;
44
+ limit: number;
45
+ offset: number;
46
+ };
47
+
48
+ /** @internal */
49
+ export const ListPlanVersionsRequest$outboundSchema: z.ZodType<
50
+ ListPlanVersionsRequest$Outbound,
51
+ z.ZodTypeDef,
52
+ ListPlanVersionsRequest
53
+ > = z.object({
54
+ id: z.string(),
55
+ limit: z.number().int().default(10),
56
+ offset: z.number().int().default(0),
57
+ });
58
+
59
+ export function listPlanVersionsRequestToJSON(
60
+ listPlanVersionsRequest: ListPlanVersionsRequest,
61
+ ): string {
62
+ return JSON.stringify(
63
+ ListPlanVersionsRequest$outboundSchema.parse(listPlanVersionsRequest),
64
+ );
65
+ }
66
+
67
+ /** @internal */
68
+ export const ListPlanVersionsObject$inboundSchema: z.ZodNativeEnum<
69
+ typeof ListPlanVersionsObject
70
+ > = z.nativeEnum(ListPlanVersionsObject);
71
+
72
+ /** @internal */
73
+ export const ListPlanVersionsResponse$inboundSchema: z.ZodType<
74
+ ListPlanVersionsResponse,
75
+ z.ZodTypeDef,
76
+ unknown
77
+ > = z.object({
78
+ object: ListPlanVersionsObject$inboundSchema,
79
+ data: z.array(models.PlanVersionSummary$inboundSchema),
80
+ pagination: models.OffsetPagination$inboundSchema,
81
+ });
82
+
83
+ export function listPlanVersionsResponseFromJSON(
84
+ jsonString: string,
85
+ ): SafeParseResult<ListPlanVersionsResponse, SDKValidationError> {
86
+ return safeParse(
87
+ jsonString,
88
+ (x) => ListPlanVersionsResponse$inboundSchema.parse(JSON.parse(x)),
89
+ `Failed to parse 'ListPlanVersionsResponse' from JSON`,
90
+ );
91
+ }
@@ -8,15 +8,14 @@ import { ClosedEnum } from "../../types/enums.js";
8
8
  import * as models from "../index.js";
9
9
 
10
10
  /**
11
- * Billing timing preference. For billable metrics: 'instant' (charges immediately) or 'in_arrears' (charges at period end). For fees: 'in_advance' (charges upfront) or 'in_arrears' (charges at period end).
11
+ * Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
12
12
  */
13
13
  export const UpdatePricePaymentTerm = {
14
- Instant: "instant",
15
14
  InArrears: "in_arrears",
16
15
  InAdvance: "in_advance",
17
16
  } as const;
18
17
  /**
19
- * Billing timing preference. For billable metrics: 'instant' (charges immediately) or 'in_arrears' (charges at period end). For fees: 'in_advance' (charges upfront) or 'in_arrears' (charges at period end).
18
+ * Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
20
19
  */
21
20
  export type UpdatePricePaymentTerm = ClosedEnum<typeof UpdatePricePaymentTerm>;
22
21
 
@@ -39,7 +38,7 @@ export type UpdatePriceRequestBody = {
39
38
  model?: models.PriceModelInput | undefined;
40
39
  properties?: models.PricePropertiesUnion | undefined;
41
40
  /**
42
- * Billing timing preference. For billable metrics: 'instant' (charges immediately) or 'in_arrears' (charges at period end). For fees: 'in_advance' (charges upfront) or 'in_arrears' (charges at period end).
41
+ * Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
43
42
  */
44
43
  paymentTerm?: UpdatePricePaymentTerm | undefined;
45
44
  /**
@@ -34,7 +34,7 @@ export type BillingCadence = ClosedEnum<typeof BillingCadence>;
34
34
 
35
35
  export type PlanPaymentTerm = {
36
36
  inArrears?: boolean | undefined;
37
- instant?: boolean | undefined;
37
+ inAdvance?: boolean | undefined;
38
38
  };
39
39
 
40
40
  /**
@@ -118,6 +118,10 @@ export type Plan = {
118
118
  * Credit-pool funding declarations for this plan. Each entry funds a distinct pricing unit's credit pool when a subscription to this plan activates: the allocated amount is minted as a credit grant on the customer's pool for that pricing unit, once at activation, or on a recurring basis only when that allocation explicitly sets recurrencePeriod. A plan may declare zero or more allocations; no two allocations on the same plan target the same pricingUnitId.
119
119
  */
120
120
  creditAllocations?: Array<PlanCreditAllocation> | undefined;
121
+ /**
122
+ * Unique identifier for a plan version
123
+ */
124
+ defaultVersionId?: string | undefined;
121
125
  };
122
126
 
123
127
  /** @internal */
@@ -136,10 +140,11 @@ export const PlanPaymentTerm$inboundSchema: z.ZodType<
136
140
  unknown
137
141
  > = z.object({
138
142
  in_arrears: z.boolean().optional(),
139
- instant: z.boolean().optional(),
143
+ in_advance: z.boolean().optional(),
140
144
  }).transform((v) => {
141
145
  return remap$(v, {
142
146
  "in_arrears": "inArrears",
147
+ "in_advance": "inAdvance",
143
148
  });
144
149
  });
145
150
 
@@ -191,6 +196,7 @@ export const Plan$inboundSchema: z.ZodType<Plan, z.ZodTypeDef, unknown> = z
191
196
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
192
197
  ).optional(),
193
198
  creditAllocations: z.array(PlanCreditAllocation$inboundSchema).optional(),
199
+ defaultVersionId: z.string().optional(),
194
200
  });
195
201
 
196
202
  export function planFromJSON(
@@ -0,0 +1,95 @@
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 { ClosedEnum } from "../types/enums.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
+
11
+ export const PlanVersionSummaryObject = {
12
+ PlanVersion: "plan_version",
13
+ } as const;
14
+ export type PlanVersionSummaryObject = ClosedEnum<
15
+ typeof PlanVersionSummaryObject
16
+ >;
17
+
18
+ /**
19
+ * Lifecycle status of the version.
20
+ */
21
+ export const PlanVersionSummaryStatus = {
22
+ Draft: "draft",
23
+ Published: "published",
24
+ Archived: "archived",
25
+ } as const;
26
+ /**
27
+ * Lifecycle status of the version.
28
+ */
29
+ export type PlanVersionSummaryStatus = ClosedEnum<
30
+ typeof PlanVersionSummaryStatus
31
+ >;
32
+
33
+ export type PlanVersionSummary = {
34
+ /**
35
+ * Unique identifier for a plan version
36
+ */
37
+ id: string;
38
+ object: PlanVersionSummaryObject;
39
+ /**
40
+ * Monotonic version number within the plan, starting at 1.
41
+ */
42
+ versionNumber: number;
43
+ /**
44
+ * Lifecycle status of the version.
45
+ */
46
+ status: PlanVersionSummaryStatus;
47
+ /**
48
+ * When this version was published. Absent for draft versions.
49
+ */
50
+ publishedAt?: Date | undefined;
51
+ /**
52
+ * Whether this version is the plan's current default (live) version.
53
+ */
54
+ isDefault: boolean;
55
+ /**
56
+ * Number of committed-status subscriptions (active or pending payment) pinned to this version at creation time. This is a count of pins recorded when each subscription was created, not a live-billing cohort: for billing, subscriptions follow the plan's current default version regardless of the version they were pinned to.
57
+ */
58
+ subscriptionCount: number;
59
+ };
60
+
61
+ /** @internal */
62
+ export const PlanVersionSummaryObject$inboundSchema: z.ZodNativeEnum<
63
+ typeof PlanVersionSummaryObject
64
+ > = z.nativeEnum(PlanVersionSummaryObject);
65
+
66
+ /** @internal */
67
+ export const PlanVersionSummaryStatus$inboundSchema: z.ZodNativeEnum<
68
+ typeof PlanVersionSummaryStatus
69
+ > = z.nativeEnum(PlanVersionSummaryStatus);
70
+
71
+ /** @internal */
72
+ export const PlanVersionSummary$inboundSchema: z.ZodType<
73
+ PlanVersionSummary,
74
+ z.ZodTypeDef,
75
+ unknown
76
+ > = z.object({
77
+ id: z.string(),
78
+ object: PlanVersionSummaryObject$inboundSchema,
79
+ versionNumber: z.number().int(),
80
+ status: PlanVersionSummaryStatus$inboundSchema,
81
+ publishedAt: z.string().datetime({ offset: true }).transform(v => new Date(v))
82
+ .optional(),
83
+ isDefault: z.boolean(),
84
+ subscriptionCount: z.number().int(),
85
+ });
86
+
87
+ export function planVersionSummaryFromJSON(
88
+ jsonString: string,
89
+ ): SafeParseResult<PlanVersionSummary, SDKValidationError> {
90
+ return safeParse(
91
+ jsonString,
92
+ (x) => PlanVersionSummary$inboundSchema.parse(JSON.parse(x)),
93
+ `Failed to parse 'PlanVersionSummary' from JSON`,
94
+ );
95
+ }
@@ -14,16 +14,15 @@ export const PriceObject = {
14
14
  } as const;
15
15
  export type PriceObject = ClosedEnum<typeof PriceObject>;
16
16
 
17
- export const PriceModel1 = {
17
+ export const Model = {
18
18
  Standard: "standard",
19
19
  Dynamic: "dynamic",
20
20
  Volume: "volume",
21
21
  Percentage: "percentage",
22
22
  } as const;
23
- export type PriceModel1 = ClosedEnum<typeof PriceModel1>;
23
+ export type Model = ClosedEnum<typeof Model>;
24
24
 
25
25
  export const PricePaymentTerm = {
26
- Instant: "instant",
27
26
  InArrears: "in_arrears",
28
27
  InAdvance: "in_advance",
29
28
  } as const;
@@ -52,7 +51,7 @@ export type Price = {
52
51
  currency?: string | undefined;
53
52
  description?: string | undefined;
54
53
  invoiceDisplayName: string;
55
- model: PriceModel1;
54
+ model: Model;
56
55
  paymentTerm: PricePaymentTerm;
57
56
  properties: { [k: string]: any };
58
57
  unitAmount?: string | undefined;
@@ -76,8 +75,9 @@ export const PriceObject$inboundSchema: z.ZodNativeEnum<typeof PriceObject> = z
76
75
  .nativeEnum(PriceObject);
77
76
 
78
77
  /** @internal */
79
- export const PriceModel1$inboundSchema: z.ZodNativeEnum<typeof PriceModel1> = z
80
- .nativeEnum(PriceModel1);
78
+ export const Model$inboundSchema: z.ZodNativeEnum<typeof Model> = z.nativeEnum(
79
+ Model,
80
+ );
81
81
 
82
82
  /** @internal */
83
83
  export const PricePaymentTerm$inboundSchema: z.ZodNativeEnum<
@@ -99,7 +99,7 @@ export const Price$inboundSchema: z.ZodType<Price, z.ZodTypeDef, unknown> = z
99
99
  currency: z.string().optional(),
100
100
  description: z.string().optional(),
101
101
  invoiceDisplayName: z.string(),
102
- model: PriceModel1$inboundSchema,
102
+ model: Model$inboundSchema,
103
103
  paymentTerm: PricePaymentTerm$inboundSchema,
104
104
  properties: z.record(z.any()),
105
105
  unitAmount: z.string().optional(),
@@ -11,7 +11,7 @@ export type ReconciledFeatureAdded = {
11
11
  featureId: string;
12
12
  featureKey: string;
13
13
  /**
14
- * False when this feature's price never produces a recurring line item (an instant price, a credit-denominated price, or an already-elapsed one-time charge) — the feature is entitled but not billed by this reconciliation.
14
+ * False when this feature's price never produces a recurring line item (a credit-denominated price, or an already-elapsed one-time charge) — the feature is entitled but not billed by this reconciliation.
15
15
  */
16
16
  billed: boolean;
17
17
  };
@@ -20,7 +20,6 @@ export const SchemasPriceObject = {
20
20
  export type SchemasPriceObject = ClosedEnum<typeof SchemasPriceObject>;
21
21
 
22
22
  export const SchemasPricePaymentTerm = {
23
- Instant: "instant",
24
23
  InArrears: "in_arrears",
25
24
  InAdvance: "in_advance",
26
25
  } as const;
@@ -165,6 +165,14 @@ export type Subscription = {
165
165
  */
166
166
  payment?: PaymentPending | PaymentPaid | PaymentAwaitingApproval | undefined;
167
167
  planId: string;
168
+ /**
169
+ * The plan version pinned to this subscription at creation.
170
+ */
171
+ planVersionId?: string | undefined;
172
+ /**
173
+ * The version number of the plan version referenced by planVersionId, as of subscription creation.
174
+ */
175
+ versionNumber?: number | undefined;
168
176
  /**
169
177
  * @deprecated Use minimumAccountBalance instead. Minimum required wallet balance in atomic units. Sample values: '200000000000' equals $200.00 minimum, '1000000000000' equals $1000.00 minimum
170
178
  */
@@ -423,6 +431,8 @@ export const Subscription$inboundSchema: z.ZodType<
423
431
  z.lazy(() => PaymentAwaitingApproval$inboundSchema),
424
432
  ]).optional(),
425
433
  planId: z.string(),
434
+ planVersionId: z.string().optional(),
435
+ versionNumber: z.number().int().optional(),
426
436
  prefundAmount: z.string().optional(),
427
437
  minimumAccountBalance: z.string().optional(),
428
438
  startedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
package/src/sdk/fees.ts CHANGED
@@ -5,7 +5,6 @@
5
5
  import { feesCreate } from "../funcs/feesCreate.js";
6
6
  import { feesDelete } from "../funcs/feesDelete.js";
7
7
  import { feesGet } from "../funcs/feesGet.js";
8
- import { feesGetPrice } from "../funcs/feesGetPrice.js";
9
8
  import { feesList } from "../funcs/feesList.js";
10
9
  import { feesUpdate } from "../funcs/feesUpdate.js";
11
10
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
@@ -86,21 +85,4 @@ export class Fees extends ClientSDK {
86
85
  options,
87
86
  ));
88
87
  }
89
-
90
- /**
91
- * Get Fee Price
92
- *
93
- * @remarks
94
- * Get the price for a fee in the context of a subscription. This returns the price configured for the fee in the subscription's plan, including the tax rate.
95
- */
96
- async getPrice(
97
- request: operations.GetFeePriceRequest,
98
- options?: RequestOptions,
99
- ): Promise<models.FeePrice> {
100
- return unwrapAsync(feesGetPrice(
101
- this,
102
- request,
103
- options,
104
- ));
105
- }
106
88
  }
package/src/sdk/plans.ts CHANGED
@@ -6,6 +6,7 @@ import { plansCreate } from "../funcs/plansCreate.js";
6
6
  import { plansGet } from "../funcs/plansGet.js";
7
7
  import { plansList } from "../funcs/plansList.js";
8
8
  import { plansListAvailable } from "../funcs/plansListAvailable.js";
9
+ import { plansListPlanVersions } from "../funcs/plansListPlanVersions.js";
9
10
  import { plansUpdate } from "../funcs/plansUpdate.js";
10
11
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
11
12
  import * as models from "../models/index.js";
@@ -85,4 +86,21 @@ export class Plans extends ClientSDK {
85
86
  options,
86
87
  ));
87
88
  }
89
+
90
+ /**
91
+ * List versions
92
+ *
93
+ * @remarks
94
+ * List the versions of a plan, newest first. Only accounts that can manage this plan may list its versions; versions can expose in-progress pricing, so read-only access is not sufficient.
95
+ */
96
+ async listPlanVersions(
97
+ request: operations.ListPlanVersionsRequest,
98
+ options?: RequestOptions,
99
+ ): Promise<operations.ListPlanVersionsResponse> {
100
+ return unwrapAsync(plansListPlanVersions(
101
+ this,
102
+ request,
103
+ options,
104
+ ));
105
+ }
88
106
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"feesGetPrice.d.ts","sourceRoot":"","sources":["../../../src/funcs/feesGetPrice.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,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I,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,sBAAsB,CAAC,EAC1C,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAClD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAC3C,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -1,76 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { ClosedEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- /**
6
- * The pricing model. Fees only support standard pricing.
7
- */
8
- export declare const FeePriceModel: {
9
- readonly Standard: "standard";
10
- };
11
- /**
12
- * The pricing model. Fees only support standard pricing.
13
- */
14
- export type FeePriceModel = ClosedEnum<typeof FeePriceModel>;
15
- /**
16
- * When the fee is charged relative to the billing period.
17
- */
18
- export declare const FeePricePaymentTerm: {
19
- readonly InAdvance: "in_advance";
20
- readonly InArrears: "in_arrears";
21
- };
22
- /**
23
- * When the fee is charged relative to the billing period.
24
- */
25
- export type FeePricePaymentTerm = ClosedEnum<typeof FeePricePaymentTerm>;
26
- export type Properties = {
27
- /**
28
- * The unit price in dollars (e.g., '10.00'). Per unit. Total per period = quantity × unitPrice; see the `quantity` field.
29
- */
30
- unitPrice: string;
31
- };
32
- /**
33
- * The price configuration for a fee within a subscription context.
34
- */
35
- export type FeePrice = {
36
- /**
37
- * The unique identifier of the price.
38
- */
39
- id: string;
40
- /**
41
- * The unique identifier of the fee.
42
- */
43
- feeId: string;
44
- /**
45
- * The pricing model. Fees only support standard pricing.
46
- */
47
- model: FeePriceModel;
48
- /**
49
- * When the fee is charged relative to the billing period.
50
- */
51
- paymentTerm: FeePricePaymentTerm;
52
- /**
53
- * The name to display on invoices for this fee.
54
- */
55
- invoiceDisplayName: string;
56
- properties: Properties;
57
- /**
58
- * Quantity for invoice line items. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
59
- */
60
- quantity: number;
61
- /**
62
- * The tax rate as a percentage (e.g., 10 for 10%).
63
- */
64
- taxRate?: number | undefined;
65
- };
66
- /** @internal */
67
- export declare const FeePriceModel$inboundSchema: z.ZodNativeEnum<typeof FeePriceModel>;
68
- /** @internal */
69
- export declare const FeePricePaymentTerm$inboundSchema: z.ZodNativeEnum<typeof FeePricePaymentTerm>;
70
- /** @internal */
71
- export declare const Properties$inboundSchema: z.ZodType<Properties, z.ZodTypeDef, unknown>;
72
- export declare function propertiesFromJSON(jsonString: string): SafeParseResult<Properties, SDKValidationError>;
73
- /** @internal */
74
- export declare const FeePrice$inboundSchema: z.ZodType<FeePrice, z.ZodTypeDef, unknown>;
75
- export declare function feePriceFromJSON(jsonString: string): SafeParseResult<FeePrice, SDKValidationError>;
76
- //# sourceMappingURL=feeprice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feeprice.d.ts","sourceRoot":"","sources":["../../../src/models/feeprice.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,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,aAAa;;CAEhB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEzE,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;OAEG;IACH,WAAW,EAAE,mBAAmB,CAAC;IACjC;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,M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C;IACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAEH,SAAgB,kBAAkB,CAChC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpD,wCAAwC,CACzC,CAAC;AACJ,CAAC;AAED,gBAAgB;AACH,QAAA,sBAAsB,GAI/B,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,mCAA2B;IAClC,WAAW,EAAE,yCAAiC;IAC9C,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,gCAAwB,CAAC;IAClD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC1B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAEH,SAAgB,gBAAgB,CAC9B,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8BAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClD,sCAAsC,CACvC,CAAC;AACJ,CAAC"}
@@ -1,20 +0,0 @@
1
- import * as z from "zod/v3";
2
- export type GetFeePriceRequest = {
3
- /**
4
- * The unique identifier of the fee.
5
- */
6
- id: string;
7
- /**
8
- * The unique identifier of the subscription.
9
- */
10
- subscriptionId: string;
11
- };
12
- /** @internal */
13
- export type GetFeePriceRequest$Outbound = {
14
- id: string;
15
- subscriptionId: string;
16
- };
17
- /** @internal */
18
- export declare const GetFeePriceRequest$outboundSchema: z.ZodType<GetFeePriceRequest$Outbound, z.ZodTypeDef, GetFeePriceRequest>;
19
- export declare function getFeePriceRequestToJSON(getFeePriceRequest: GetFeePriceRequest): string;
20
- //# sourceMappingURL=getfeeprice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getfeeprice.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/getfeeprice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAIlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getfeeprice.js","sourceRoot":"","sources":["../../../../src/models/operations/getfeeprice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BH,4DAMC;AAnCD,0CAA4B;AAmB5B,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAEH,SAAgB,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"feesGetPrice.d.ts","sourceRoot":"","sources":["../../../src/funcs/feesGetPrice.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,QAAQ,EACb,MAAM,CAAC,MAAM,GACb,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"feesGetPrice.js","sourceRoot":"","sources":["../../../src/funcs/feesGetPrice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,CAAC,MAAM,oBAAoB,C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AAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -1,76 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { ClosedEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- /**
6
- * The pricing model. Fees only support standard pricing.
7
- */
8
- export declare const FeePriceModel: {
9
- readonly Standard: "standard";
10
- };
11
- /**
12
- * The pricing model. Fees only support standard pricing.
13
- */
14
- export type FeePriceModel = ClosedEnum<typeof FeePriceModel>;
15
- /**
16
- * When the fee is charged relative to the billing period.
17
- */
18
- export declare const FeePricePaymentTerm: {
19
- readonly InAdvance: "in_advance";
20
- readonly InArrears: "in_arrears";
21
- };
22
- /**
23
- * When the fee is charged relative to the billing period.
24
- */
25
- export type FeePricePaymentTerm = ClosedEnum<typeof FeePricePaymentTerm>;
26
- export type Properties = {
27
- /**
28
- * The unit price in dollars (e.g., '10.00'). Per unit. Total per period = quantity × unitPrice; see the `quantity` field.
29
- */
30
- unitPrice: string;
31
- };
32
- /**
33
- * The price configuration for a fee within a subscription context.
34
- */
35
- export type FeePrice = {
36
- /**
37
- * The unique identifier of the price.
38
- */
39
- id: string;
40
- /**
41
- * The unique identifier of the fee.
42
- */
43
- feeId: string;
44
- /**
45
- * The pricing model. Fees only support standard pricing.
46
- */
47
- model: FeePriceModel;
48
- /**
49
- * When the fee is charged relative to the billing period.
50
- */
51
- paymentTerm: FeePricePaymentTerm;
52
- /**
53
- * The name to display on invoices for this fee.
54
- */
55
- invoiceDisplayName: string;
56
- properties: Properties;
57
- /**
58
- * Quantity for invoice line items. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
59
- */
60
- quantity: number;
61
- /**
62
- * The tax rate as a percentage (e.g., 10 for 10%).
63
- */
64
- taxRate?: number | undefined;
65
- };
66
- /** @internal */
67
- export declare const FeePriceModel$inboundSchema: z.ZodNativeEnum<typeof FeePriceModel>;
68
- /** @internal */
69
- export declare const FeePricePaymentTerm$inboundSchema: z.ZodNativeEnum<typeof FeePricePaymentTerm>;
70
- /** @internal */
71
- export declare const Properties$inboundSchema: z.ZodType<Properties, z.ZodTypeDef, unknown>;
72
- export declare function propertiesFromJSON(jsonString: string): SafeParseResult<Properties, SDKValidationError>;
73
- /** @internal */
74
- export declare const FeePrice$inboundSchema: z.ZodType<FeePrice, z.ZodTypeDef, unknown>;
75
- export declare function feePriceFromJSON(jsonString: string): SafeParseResult<FeePrice, SDKValidationError>;
76
- //# sourceMappingURL=feeprice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feeprice.d.ts","sourceRoot":"","sources":["../../../src/models/feeprice.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,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,aAAa;;CAEhB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,mBAAm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