@oxy.so/contracts 4.10.0 → 4.11.0-oxy-one.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/index.js +20 -14
- package/dist/cjs/products/access.js +32 -1
- package/dist/cjs/products/billing.js +1 -1
- package/dist/cjs/products/checkout.js +17 -0
- package/dist/cjs/products/plans.js +23 -0
- package/dist/cjs/userResponse.js +7 -4
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/index.js +4 -2
- package/dist/esm/products/access.js +31 -0
- package/dist/esm/products/billing.js +1 -1
- package/dist/esm/products/checkout.js +14 -0
- package/dist/esm/products/plans.js +20 -0
- package/dist/esm/userResponse.js +3 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/externalIdentity.d.ts +90 -0
- package/dist/types/index.d.ts +5 -3
- package/dist/types/products/access.d.ts +459 -54
- package/dist/types/products/billing.d.ts +3 -0
- package/dist/types/products/checkout.d.ts +60 -0
- package/dist/types/products/plans.d.ts +319 -0
- package/dist/types/userResponse.d.ts +366 -0
- package/package.json +1 -1
|
@@ -530,12 +530,15 @@ export declare const subscriptionCreditGrantsResponseSchema: z.ZodObject<{
|
|
|
530
530
|
}>;
|
|
531
531
|
export declare const cancelProductSubscriptionSchema: z.ZodObject<{
|
|
532
532
|
sourceId: z.ZodString;
|
|
533
|
+
actionId: z.ZodOptional<z.ZodString>;
|
|
533
534
|
expectedSubjectAccountId: z.ZodOptional<z.ZodBranded<z.ZodString, "OxyAccountId">>;
|
|
534
535
|
}, "strict", z.ZodTypeAny, {
|
|
535
536
|
sourceId: string;
|
|
537
|
+
actionId?: string | undefined;
|
|
536
538
|
expectedSubjectAccountId?: (string & z.BRAND<"OxyAccountId">) | undefined;
|
|
537
539
|
}, {
|
|
538
540
|
sourceId: string;
|
|
541
|
+
actionId?: string | undefined;
|
|
539
542
|
expectedSubjectAccountId?: string | undefined;
|
|
540
543
|
}>;
|
|
541
544
|
export type ProductSubscriptionSummary = z.infer<typeof productSubscriptionSummarySchema>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const personalPlanCheckoutRequestSchema: z.ZodObject<{
|
|
3
|
+
expectedSubjectAccountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
4
|
+
offerId: z.ZodString;
|
|
5
|
+
offerVersion: z.ZodNumber;
|
|
6
|
+
idempotencyKey: z.ZodString;
|
|
7
|
+
}, "strict", z.ZodTypeAny, {
|
|
8
|
+
idempotencyKey: string;
|
|
9
|
+
offerId: string;
|
|
10
|
+
offerVersion: number;
|
|
11
|
+
expectedSubjectAccountId: string & z.BRAND<"OxyAccountId">;
|
|
12
|
+
}, {
|
|
13
|
+
idempotencyKey: string;
|
|
14
|
+
offerId: string;
|
|
15
|
+
offerVersion: number;
|
|
16
|
+
expectedSubjectAccountId: string;
|
|
17
|
+
}>;
|
|
18
|
+
/** No grant or subscription is created by checkout completion in the browser. */
|
|
19
|
+
export declare const personalPlanCheckoutResultSchema: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
|
|
20
|
+
state: z.ZodLiteral<"unconfigured">;
|
|
21
|
+
reason: z.ZodEnum<["provider_unconfigured", "offer_unconfigured", "price_unconfigured"]>;
|
|
22
|
+
}, "strict", z.ZodTypeAny, {
|
|
23
|
+
reason: "provider_unconfigured" | "offer_unconfigured" | "price_unconfigured";
|
|
24
|
+
state: "unconfigured";
|
|
25
|
+
}, {
|
|
26
|
+
reason: "provider_unconfigured" | "offer_unconfigured" | "price_unconfigured";
|
|
27
|
+
state: "unconfigured";
|
|
28
|
+
}>, z.ZodObject<{
|
|
29
|
+
state: z.ZodLiteral<"pending">;
|
|
30
|
+
intentId: z.ZodString;
|
|
31
|
+
checkoutUrl: z.ZodString;
|
|
32
|
+
}, "strict", z.ZodTypeAny, {
|
|
33
|
+
state: "pending";
|
|
34
|
+
intentId: string;
|
|
35
|
+
checkoutUrl: string;
|
|
36
|
+
}, {
|
|
37
|
+
state: "pending";
|
|
38
|
+
intentId: string;
|
|
39
|
+
checkoutUrl: string;
|
|
40
|
+
}>, z.ZodObject<{
|
|
41
|
+
state: z.ZodLiteral<"closed">;
|
|
42
|
+
intentId: z.ZodString;
|
|
43
|
+
}, "strict", z.ZodTypeAny, {
|
|
44
|
+
state: "closed";
|
|
45
|
+
intentId: string;
|
|
46
|
+
}, {
|
|
47
|
+
state: "closed";
|
|
48
|
+
intentId: string;
|
|
49
|
+
}>, z.ZodObject<{
|
|
50
|
+
state: z.ZodLiteral<"fulfilled">;
|
|
51
|
+
intentId: z.ZodString;
|
|
52
|
+
}, "strict", z.ZodTypeAny, {
|
|
53
|
+
state: "fulfilled";
|
|
54
|
+
intentId: string;
|
|
55
|
+
}, {
|
|
56
|
+
state: "fulfilled";
|
|
57
|
+
intentId: string;
|
|
58
|
+
}>]>;
|
|
59
|
+
export type PersonalPlanCheckoutRequest = z.infer<typeof personalPlanCheckoutRequestSchema>;
|
|
60
|
+
export type PersonalPlanCheckoutResult = z.infer<typeof personalPlanCheckoutResultSchema>;
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Approved display terms never identify or activate a billing-provider price. */
|
|
3
|
+
export declare const personalPlanDisplayPriceSchema: z.ZodObject<{
|
|
4
|
+
currency: z.ZodString;
|
|
5
|
+
amountMinorUnits: z.ZodNumber;
|
|
6
|
+
interval: z.ZodLiteral<"month">;
|
|
7
|
+
trial: z.ZodLiteral<"none">;
|
|
8
|
+
taxTreatment: z.ZodLiteral<"inclusive">;
|
|
9
|
+
merchantTotal: z.ZodLiteral<"final">;
|
|
10
|
+
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
currency: string;
|
|
12
|
+
amountMinorUnits: number;
|
|
13
|
+
interval: "month";
|
|
14
|
+
trial: "none";
|
|
15
|
+
taxTreatment: "inclusive";
|
|
16
|
+
merchantTotal: "final";
|
|
17
|
+
}, {
|
|
18
|
+
currency: string;
|
|
19
|
+
amountMinorUnits: number;
|
|
20
|
+
interval: "month";
|
|
21
|
+
trial: "none";
|
|
22
|
+
taxTreatment: "inclusive";
|
|
23
|
+
merchantTotal: "final";
|
|
24
|
+
}>;
|
|
25
|
+
/** Public discovery is separate from customer access. No provider or owner IDs. */
|
|
26
|
+
export declare const personalPlanCatalogueSchema: z.ZodEffects<z.ZodObject<{
|
|
27
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
28
|
+
state: z.ZodEnum<["unconfigured", "configured"]>;
|
|
29
|
+
purchase: z.ZodLiteral<"unavailable">;
|
|
30
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
31
|
+
offerId: z.ZodString;
|
|
32
|
+
offerVersion: z.ZodNumber;
|
|
33
|
+
displayName: z.ZodString;
|
|
34
|
+
audience: z.ZodLiteral<"personal">;
|
|
35
|
+
kind: z.ZodLiteral<"oxy_one">;
|
|
36
|
+
price: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
currency: z.ZodString;
|
|
38
|
+
amountMinorUnits: z.ZodNumber;
|
|
39
|
+
interval: z.ZodLiteral<"month">;
|
|
40
|
+
trial: z.ZodLiteral<"none">;
|
|
41
|
+
taxTreatment: z.ZodLiteral<"inclusive">;
|
|
42
|
+
merchantTotal: z.ZodLiteral<"final">;
|
|
43
|
+
}, "strict", z.ZodTypeAny, {
|
|
44
|
+
currency: string;
|
|
45
|
+
amountMinorUnits: number;
|
|
46
|
+
interval: "month";
|
|
47
|
+
trial: "none";
|
|
48
|
+
taxTreatment: "inclusive";
|
|
49
|
+
merchantTotal: "final";
|
|
50
|
+
}, {
|
|
51
|
+
currency: string;
|
|
52
|
+
amountMinorUnits: number;
|
|
53
|
+
interval: "month";
|
|
54
|
+
trial: "none";
|
|
55
|
+
taxTreatment: "inclusive";
|
|
56
|
+
merchantTotal: "final";
|
|
57
|
+
}>>;
|
|
58
|
+
benefits: z.ZodArray<z.ZodObject<{
|
|
59
|
+
displayName: z.ZodString;
|
|
60
|
+
benefit: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"capability">;
|
|
62
|
+
productId: z.ZodString;
|
|
63
|
+
key: z.ZodString;
|
|
64
|
+
}, "strict", z.ZodTypeAny, {
|
|
65
|
+
productId: string;
|
|
66
|
+
kind: "capability";
|
|
67
|
+
key: string;
|
|
68
|
+
}, {
|
|
69
|
+
productId: string;
|
|
70
|
+
kind: "capability";
|
|
71
|
+
key: string;
|
|
72
|
+
}>, z.ZodObject<{
|
|
73
|
+
kind: z.ZodLiteral<"quota">;
|
|
74
|
+
productId: z.ZodString;
|
|
75
|
+
key: z.ZodString;
|
|
76
|
+
unit: z.ZodString;
|
|
77
|
+
included: z.ZodNumber;
|
|
78
|
+
combination: z.ZodEnum<["maximum", "sum", "exclusive"]>;
|
|
79
|
+
}, "strict", z.ZodTypeAny, {
|
|
80
|
+
productId: string;
|
|
81
|
+
kind: "quota";
|
|
82
|
+
key: string;
|
|
83
|
+
unit: string;
|
|
84
|
+
included: number;
|
|
85
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
86
|
+
}, {
|
|
87
|
+
productId: string;
|
|
88
|
+
kind: "quota";
|
|
89
|
+
key: string;
|
|
90
|
+
unit: string;
|
|
91
|
+
included: number;
|
|
92
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
93
|
+
}>]>;
|
|
94
|
+
}, "strict", z.ZodTypeAny, {
|
|
95
|
+
benefit: {
|
|
96
|
+
productId: string;
|
|
97
|
+
kind: "capability";
|
|
98
|
+
key: string;
|
|
99
|
+
} | {
|
|
100
|
+
productId: string;
|
|
101
|
+
kind: "quota";
|
|
102
|
+
key: string;
|
|
103
|
+
unit: string;
|
|
104
|
+
included: number;
|
|
105
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
106
|
+
};
|
|
107
|
+
displayName: string;
|
|
108
|
+
}, {
|
|
109
|
+
benefit: {
|
|
110
|
+
productId: string;
|
|
111
|
+
kind: "capability";
|
|
112
|
+
key: string;
|
|
113
|
+
} | {
|
|
114
|
+
productId: string;
|
|
115
|
+
kind: "quota";
|
|
116
|
+
key: string;
|
|
117
|
+
unit: string;
|
|
118
|
+
included: number;
|
|
119
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
120
|
+
};
|
|
121
|
+
displayName: string;
|
|
122
|
+
}>, "many">;
|
|
123
|
+
}, "strict", z.ZodTypeAny, {
|
|
124
|
+
kind: "oxy_one";
|
|
125
|
+
benefits: {
|
|
126
|
+
benefit: {
|
|
127
|
+
productId: string;
|
|
128
|
+
kind: "capability";
|
|
129
|
+
key: string;
|
|
130
|
+
} | {
|
|
131
|
+
productId: string;
|
|
132
|
+
kind: "quota";
|
|
133
|
+
key: string;
|
|
134
|
+
unit: string;
|
|
135
|
+
included: number;
|
|
136
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
137
|
+
};
|
|
138
|
+
displayName: string;
|
|
139
|
+
}[];
|
|
140
|
+
offerId: string;
|
|
141
|
+
offerVersion: number;
|
|
142
|
+
displayName: string;
|
|
143
|
+
audience: "personal";
|
|
144
|
+
price?: {
|
|
145
|
+
currency: string;
|
|
146
|
+
amountMinorUnits: number;
|
|
147
|
+
interval: "month";
|
|
148
|
+
trial: "none";
|
|
149
|
+
taxTreatment: "inclusive";
|
|
150
|
+
merchantTotal: "final";
|
|
151
|
+
} | undefined;
|
|
152
|
+
}, {
|
|
153
|
+
kind: "oxy_one";
|
|
154
|
+
benefits: {
|
|
155
|
+
benefit: {
|
|
156
|
+
productId: string;
|
|
157
|
+
kind: "capability";
|
|
158
|
+
key: string;
|
|
159
|
+
} | {
|
|
160
|
+
productId: string;
|
|
161
|
+
kind: "quota";
|
|
162
|
+
key: string;
|
|
163
|
+
unit: string;
|
|
164
|
+
included: number;
|
|
165
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
166
|
+
};
|
|
167
|
+
displayName: string;
|
|
168
|
+
}[];
|
|
169
|
+
offerId: string;
|
|
170
|
+
offerVersion: number;
|
|
171
|
+
displayName: string;
|
|
172
|
+
audience: "personal";
|
|
173
|
+
price?: {
|
|
174
|
+
currency: string;
|
|
175
|
+
amountMinorUnits: number;
|
|
176
|
+
interval: "month";
|
|
177
|
+
trial: "none";
|
|
178
|
+
taxTreatment: "inclusive";
|
|
179
|
+
merchantTotal: "final";
|
|
180
|
+
} | undefined;
|
|
181
|
+
}>, "many">;
|
|
182
|
+
}, "strict", z.ZodTypeAny, {
|
|
183
|
+
schemaVersion: 1;
|
|
184
|
+
state: "unconfigured" | "configured";
|
|
185
|
+
purchase: "unavailable";
|
|
186
|
+
plans: {
|
|
187
|
+
kind: "oxy_one";
|
|
188
|
+
benefits: {
|
|
189
|
+
benefit: {
|
|
190
|
+
productId: string;
|
|
191
|
+
kind: "capability";
|
|
192
|
+
key: string;
|
|
193
|
+
} | {
|
|
194
|
+
productId: string;
|
|
195
|
+
kind: "quota";
|
|
196
|
+
key: string;
|
|
197
|
+
unit: string;
|
|
198
|
+
included: number;
|
|
199
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
200
|
+
};
|
|
201
|
+
displayName: string;
|
|
202
|
+
}[];
|
|
203
|
+
offerId: string;
|
|
204
|
+
offerVersion: number;
|
|
205
|
+
displayName: string;
|
|
206
|
+
audience: "personal";
|
|
207
|
+
price?: {
|
|
208
|
+
currency: string;
|
|
209
|
+
amountMinorUnits: number;
|
|
210
|
+
interval: "month";
|
|
211
|
+
trial: "none";
|
|
212
|
+
taxTreatment: "inclusive";
|
|
213
|
+
merchantTotal: "final";
|
|
214
|
+
} | undefined;
|
|
215
|
+
}[];
|
|
216
|
+
}, {
|
|
217
|
+
schemaVersion: 1;
|
|
218
|
+
state: "unconfigured" | "configured";
|
|
219
|
+
purchase: "unavailable";
|
|
220
|
+
plans: {
|
|
221
|
+
kind: "oxy_one";
|
|
222
|
+
benefits: {
|
|
223
|
+
benefit: {
|
|
224
|
+
productId: string;
|
|
225
|
+
kind: "capability";
|
|
226
|
+
key: string;
|
|
227
|
+
} | {
|
|
228
|
+
productId: string;
|
|
229
|
+
kind: "quota";
|
|
230
|
+
key: string;
|
|
231
|
+
unit: string;
|
|
232
|
+
included: number;
|
|
233
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
234
|
+
};
|
|
235
|
+
displayName: string;
|
|
236
|
+
}[];
|
|
237
|
+
offerId: string;
|
|
238
|
+
offerVersion: number;
|
|
239
|
+
displayName: string;
|
|
240
|
+
audience: "personal";
|
|
241
|
+
price?: {
|
|
242
|
+
currency: string;
|
|
243
|
+
amountMinorUnits: number;
|
|
244
|
+
interval: "month";
|
|
245
|
+
trial: "none";
|
|
246
|
+
taxTreatment: "inclusive";
|
|
247
|
+
merchantTotal: "final";
|
|
248
|
+
} | undefined;
|
|
249
|
+
}[];
|
|
250
|
+
}>, {
|
|
251
|
+
schemaVersion: 1;
|
|
252
|
+
state: "unconfigured" | "configured";
|
|
253
|
+
purchase: "unavailable";
|
|
254
|
+
plans: {
|
|
255
|
+
kind: "oxy_one";
|
|
256
|
+
benefits: {
|
|
257
|
+
benefit: {
|
|
258
|
+
productId: string;
|
|
259
|
+
kind: "capability";
|
|
260
|
+
key: string;
|
|
261
|
+
} | {
|
|
262
|
+
productId: string;
|
|
263
|
+
kind: "quota";
|
|
264
|
+
key: string;
|
|
265
|
+
unit: string;
|
|
266
|
+
included: number;
|
|
267
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
268
|
+
};
|
|
269
|
+
displayName: string;
|
|
270
|
+
}[];
|
|
271
|
+
offerId: string;
|
|
272
|
+
offerVersion: number;
|
|
273
|
+
displayName: string;
|
|
274
|
+
audience: "personal";
|
|
275
|
+
price?: {
|
|
276
|
+
currency: string;
|
|
277
|
+
amountMinorUnits: number;
|
|
278
|
+
interval: "month";
|
|
279
|
+
trial: "none";
|
|
280
|
+
taxTreatment: "inclusive";
|
|
281
|
+
merchantTotal: "final";
|
|
282
|
+
} | undefined;
|
|
283
|
+
}[];
|
|
284
|
+
}, {
|
|
285
|
+
schemaVersion: 1;
|
|
286
|
+
state: "unconfigured" | "configured";
|
|
287
|
+
purchase: "unavailable";
|
|
288
|
+
plans: {
|
|
289
|
+
kind: "oxy_one";
|
|
290
|
+
benefits: {
|
|
291
|
+
benefit: {
|
|
292
|
+
productId: string;
|
|
293
|
+
kind: "capability";
|
|
294
|
+
key: string;
|
|
295
|
+
} | {
|
|
296
|
+
productId: string;
|
|
297
|
+
kind: "quota";
|
|
298
|
+
key: string;
|
|
299
|
+
unit: string;
|
|
300
|
+
included: number;
|
|
301
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
302
|
+
};
|
|
303
|
+
displayName: string;
|
|
304
|
+
}[];
|
|
305
|
+
offerId: string;
|
|
306
|
+
offerVersion: number;
|
|
307
|
+
displayName: string;
|
|
308
|
+
audience: "personal";
|
|
309
|
+
price?: {
|
|
310
|
+
currency: string;
|
|
311
|
+
amountMinorUnits: number;
|
|
312
|
+
interval: "month";
|
|
313
|
+
trial: "none";
|
|
314
|
+
taxTreatment: "inclusive";
|
|
315
|
+
merchantTotal: "final";
|
|
316
|
+
} | undefined;
|
|
317
|
+
}[];
|
|
318
|
+
}>;
|
|
319
|
+
export type PersonalPlanCatalogue = z.infer<typeof personalPlanCatalogueSchema>;
|