@oxy.so/contracts 4.14.0 → 4.15.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 +2 -1
- package/dist/cjs/products/billing.js +1 -0
- package/dist/cjs/products/checkout.js +14 -1
- package/dist/cjs/products/plans.js +18 -2
- package/dist/cjs/userResponse.js +8 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/products/billing.js +1 -0
- package/dist/esm/products/checkout.js +13 -0
- package/dist/esm/products/plans.js +17 -1
- package/dist/esm/userResponse.js +8 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/accountGraph.d.ts +22 -22
- package/dist/types/accountSubject.d.ts +4 -4
- package/dist/types/agency.d.ts +86 -86
- package/dist/types/deviceDirectory.d.ts +180 -180
- package/dist/types/email/messages.d.ts +78 -78
- package/dist/types/externalIdentity.d.ts +92 -59
- package/dist/types/index.d.ts +1 -1
- package/dist/types/inference/accountBilling.d.ts +36 -36
- package/dist/types/inference/catalogue.d.ts +12 -12
- package/dist/types/inference/decisions.d.ts +16 -16
- package/dist/types/inference/economics.d.ts +6 -6
- package/dist/types/inference/embeddings.d.ts +18 -18
- package/dist/types/inference/entitlement.d.ts +12 -12
- package/dist/types/inference/errors.d.ts +4 -4
- package/dist/types/inference/inbox.d.ts +17 -17
- package/dist/types/inference/priceVersion.d.ts +8 -8
- package/dist/types/inference/privateAutoExecution.d.ts +12 -12
- package/dist/types/inference/providerConnection.d.ts +24 -24
- package/dist/types/inference/realtime.d.ts +26 -26
- package/dist/types/inference/request.d.ts +26 -26
- package/dist/types/inference/routingPolicy.d.ts +4 -4
- package/dist/types/inference/scopedExecution.d.ts +8 -8
- package/dist/types/inference/streamEvents.d.ts +20 -20
- package/dist/types/inference/usage.d.ts +8 -8
- package/dist/types/keyRecovery.d.ts +4 -4
- package/dist/types/linkedAccounts.d.ts +16 -16
- package/dist/types/notifications.d.ts +4 -4
- package/dist/types/oauth.d.ts +40 -40
- package/dist/types/products/access.d.ts +18 -18
- package/dist/types/products/billing.d.ts +32 -24
- package/dist/types/products/checkout.d.ts +36 -0
- package/dist/types/products/plans.d.ts +108 -11
- package/dist/types/recommendations.d.ts +30 -30
- package/dist/types/safety.d.ts +2 -2
- package/dist/types/sessionStatus.d.ts +6 -6
- package/dist/types/stickers.d.ts +32 -32
- package/dist/types/userResponse.d.ts +247 -111
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -200,7 +200,7 @@ export { meteredGenerationSchema } from './inference/economics.js';
|
|
|
200
200
|
export { canonicalCapabilityJson, inputSatisfiesCapabilityLimits, isLoopbackOrigin, } from './capabilityBindings.js';
|
|
201
201
|
export * from './agentKeys.js';
|
|
202
202
|
export { productSubscriptionSummarySchema, productSubscriptionsResponseSchema, subscriptionCreditGrantSchema, subscriptionCreditGrantsResponseSchema, cancelProductSubscriptionSchema, productSubscriptionCancellationResultSchema, } from './products/billing.js';
|
|
203
|
-
export { personalPlanDisplayPriceSchema, personalPlanCatalogueSchema, } from './products/plans.js';
|
|
203
|
+
export { personalPlanDisplayPriceSchema, personalPlanCatalogueSchema, productPlanCatalogueSchema, } from './products/plans.js';
|
|
204
204
|
export * from './products/checkout.js';
|
|
205
205
|
export * from './organizations.js';
|
|
206
206
|
export * from './safety.js';
|
|
@@ -30,3 +30,16 @@ export const personalPlanCheckoutResultSchema = z.discriminatedUnion('state', [
|
|
|
30
30
|
z.object({ state: z.literal('closed'), intentId: z.string().min(1).max(160) }).strict(),
|
|
31
31
|
z.object({ state: z.literal('fulfilled'), intentId: z.string().min(1).max(160) }).strict(),
|
|
32
32
|
]);
|
|
33
|
+
/** Explicit individual product offer; still owned and paid through Oxy. */
|
|
34
|
+
export const productPlanCheckoutRequestSchema = personalPlanCheckoutRequestSchema
|
|
35
|
+
.extend({
|
|
36
|
+
productId: z.string().min(1).max(160),
|
|
37
|
+
})
|
|
38
|
+
.strict();
|
|
39
|
+
export const productSubscriptionRenewalRequestSchema = z
|
|
40
|
+
.object({
|
|
41
|
+
expectedSubjectAccountId: oxyAccountIdSchema,
|
|
42
|
+
sourceId: z.string().min(1).max(160),
|
|
43
|
+
idempotencyKey: personalPlanCheckoutRequestSchema.shape.idempotencyKey,
|
|
44
|
+
})
|
|
45
|
+
.strict();
|
|
@@ -16,7 +16,7 @@ export const personalPlanCatalogueSchema = z
|
|
|
16
16
|
.object({
|
|
17
17
|
schemaVersion: z.literal(1),
|
|
18
18
|
state: z.enum(['unconfigured', 'configured']),
|
|
19
|
-
purchase: z.
|
|
19
|
+
purchase: z.enum(['unavailable', 'available']),
|
|
20
20
|
plans: z.array(z
|
|
21
21
|
.object({
|
|
22
22
|
offerId: z.string().min(1).max(160),
|
|
@@ -33,3 +33,19 @@ export const personalPlanCatalogueSchema = z
|
|
|
33
33
|
})
|
|
34
34
|
.strict()
|
|
35
35
|
.refine((value) => (value.state === 'unconfigured') === (value.plans.length === 0), 'Catalogue state must match published plans');
|
|
36
|
+
export const productPlanCatalogueSchema = z
|
|
37
|
+
.object({
|
|
38
|
+
schemaVersion: z.literal(1),
|
|
39
|
+
productId: z.string().min(1).max(160),
|
|
40
|
+
purchase: z.enum(['unavailable', 'available']),
|
|
41
|
+
plans: z.array(z
|
|
42
|
+
.object({
|
|
43
|
+
productId: z.string().min(1).max(160),
|
|
44
|
+
offerId: z.string().min(1).max(160),
|
|
45
|
+
offerVersion: z.number().int().positive().safe(),
|
|
46
|
+
displayName: z.string().min(1).max(100),
|
|
47
|
+
price: personalPlanDisplayPriceSchema.extend({ interval: z.enum(['month', 'year']) }),
|
|
48
|
+
})
|
|
49
|
+
.strict()),
|
|
50
|
+
})
|
|
51
|
+
.strict();
|
package/dist/esm/userResponse.js
CHANGED
|
@@ -241,6 +241,10 @@ export const userResponseSchema = z
|
|
|
241
241
|
* so it is present on the current-user DTO (`GET /users/me`,
|
|
242
242
|
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
243
243
|
*/
|
|
244
|
+
userPreferences: z
|
|
245
|
+
.object({ displayCurrency: z.enum(['USD', 'EUR', 'FAIR']).optional() })
|
|
246
|
+
.catchall(z.unknown())
|
|
247
|
+
.optional(),
|
|
244
248
|
themePreference: themePreferenceSchema.optional(),
|
|
245
249
|
personalization: z
|
|
246
250
|
.object({
|
|
@@ -301,7 +305,10 @@ export const userProfileUpdateSchema = z
|
|
|
301
305
|
languages: z.array(z.string()).optional(),
|
|
302
306
|
accountExpiresAfterInactivityDays: z.number().nullable().optional(),
|
|
303
307
|
notificationPreferences: z.record(z.unknown()).optional(),
|
|
304
|
-
userPreferences: z
|
|
308
|
+
userPreferences: z
|
|
309
|
+
.object({ displayCurrency: z.enum(['USD', 'EUR', 'FAIR']).optional() })
|
|
310
|
+
.catchall(z.unknown())
|
|
311
|
+
.optional(),
|
|
305
312
|
privacySettings: z.record(z.unknown()).optional(),
|
|
306
313
|
/**
|
|
307
314
|
* Portable theme preference. Written through the same `PUT /users/me`
|