@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.
Files changed (51) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/index.js +2 -1
  3. package/dist/cjs/products/billing.js +1 -0
  4. package/dist/cjs/products/checkout.js +14 -1
  5. package/dist/cjs/products/plans.js +18 -2
  6. package/dist/cjs/userResponse.js +8 -1
  7. package/dist/esm/.tsbuildinfo +1 -1
  8. package/dist/esm/index.js +1 -1
  9. package/dist/esm/products/billing.js +1 -0
  10. package/dist/esm/products/checkout.js +13 -0
  11. package/dist/esm/products/plans.js +17 -1
  12. package/dist/esm/userResponse.js +8 -1
  13. package/dist/types/.tsbuildinfo +1 -1
  14. package/dist/types/accountGraph.d.ts +22 -22
  15. package/dist/types/accountSubject.d.ts +4 -4
  16. package/dist/types/agency.d.ts +86 -86
  17. package/dist/types/deviceDirectory.d.ts +180 -180
  18. package/dist/types/email/messages.d.ts +78 -78
  19. package/dist/types/externalIdentity.d.ts +92 -59
  20. package/dist/types/index.d.ts +1 -1
  21. package/dist/types/inference/accountBilling.d.ts +36 -36
  22. package/dist/types/inference/catalogue.d.ts +12 -12
  23. package/dist/types/inference/decisions.d.ts +16 -16
  24. package/dist/types/inference/economics.d.ts +6 -6
  25. package/dist/types/inference/embeddings.d.ts +18 -18
  26. package/dist/types/inference/entitlement.d.ts +12 -12
  27. package/dist/types/inference/errors.d.ts +4 -4
  28. package/dist/types/inference/inbox.d.ts +17 -17
  29. package/dist/types/inference/priceVersion.d.ts +8 -8
  30. package/dist/types/inference/privateAutoExecution.d.ts +12 -12
  31. package/dist/types/inference/providerConnection.d.ts +24 -24
  32. package/dist/types/inference/realtime.d.ts +26 -26
  33. package/dist/types/inference/request.d.ts +26 -26
  34. package/dist/types/inference/routingPolicy.d.ts +4 -4
  35. package/dist/types/inference/scopedExecution.d.ts +8 -8
  36. package/dist/types/inference/streamEvents.d.ts +20 -20
  37. package/dist/types/inference/usage.d.ts +8 -8
  38. package/dist/types/keyRecovery.d.ts +4 -4
  39. package/dist/types/linkedAccounts.d.ts +16 -16
  40. package/dist/types/notifications.d.ts +4 -4
  41. package/dist/types/oauth.d.ts +40 -40
  42. package/dist/types/products/access.d.ts +18 -18
  43. package/dist/types/products/billing.d.ts +32 -24
  44. package/dist/types/products/checkout.d.ts +36 -0
  45. package/dist/types/products/plans.d.ts +108 -11
  46. package/dist/types/recommendations.d.ts +30 -30
  47. package/dist/types/safety.d.ts +2 -2
  48. package/dist/types/sessionStatus.d.ts +6 -6
  49. package/dist/types/stickers.d.ts +32 -32
  50. package/dist/types/userResponse.d.ts +247 -111
  51. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -39,7 +39,7 @@ exports.kaanaCredentialOutcomeRequestSchema = exports.kaanaCredentialRevokeOutco
39
39
  exports.INFERENCE_ECONOMIC_TREATMENTS = exports.productEntitlementSchema = exports.costCenterSpendSchema = exports.costCenterSchema = exports.costCenterStatusSchema = exports.COST_CENTER_STATUSES = exports.payAsYouGoEntitlementSchema = exports.productPlanSchema = exports.planAllowanceSchema = exports.LIVE_PRODUCT_PLAN_STATUSES = exports.productPlanStatusSchema = exports.PRODUCT_PLAN_STATUSES = exports.reconciliationReportSchema = exports.reconciliationRunSchema = exports.reconciliationDiscrepancySchema = exports.reconciliationRunStatusSchema = exports.RECONCILIATION_RUN_STATUSES = exports.reconciliationDiscrepancyKindSchema = exports.RECONCILIATION_DISCREPANCY_KINDS = exports.autoRechargeAttemptSchema = exports.autoRechargeStatusSchema = exports.AUTO_RECHARGE_STATUSES = exports.externalPaymentSchema = exports.externalPaymentKindSchema = exports.EXTERNAL_PAYMENT_KINDS = exports.externalPaymentProviderSchema = exports.EXTERNAL_PAYMENT_PROVIDERS = exports.billingInvoiceSchema = exports.billingInvoiceStatusSchema = exports.BILLING_INVOICE_STATUSES = exports.accountBillingStateSchema = exports.billingProfileSchema = exports.autoRechargeSchema = exports.billingProfileStatusSchema = exports.BILLING_PROFILE_STATUSES = exports.billingModeSchema = exports.BILLING_MODES = exports.providerConnectionSchema = exports.providerConnectionStatusSchema = exports.providerConnectionValidationSchema = exports.providerCredentialCustodyStateSchema = exports.providerCredentialValidationDeploymentSchema = exports.providerCredentialValidationOperationSchema = exports.kaanaCredentialValidationOutcomeSchema = exports.kaanaCredentialValidationFailureCodeSchema = exports.kaanaCredentialValidationOutcomeStateSchema = exports.kaanaCredentialValidationTaskSchema = exports.kaanaCredentialOutcomeSchema = exports.kaanaCredentialConflictOutcomeSchema = exports.kaanaCredentialAppliedOutcomeSchema = void 0;
40
40
  exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.INBOX_DAILY_BRIEF_SECTIONS = exports.inboxDailyBriefResponseSchema = exports.inboxDailyBriefRequestSchema = exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = exports.resolveCatalogInvocation = exports.matchCatalogInvocation = exports.findOverlappingCatalogInvocations = exports.catalogInvocationTemplatesEquivalent = exports.catalogInvocationsOverlap = exports.catalogInvocationPathParameters = exports.normalizedAppEventSchema = exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.invocationPrincipalSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.delegationGrantSchema = exports.capabilityTicketRequestSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.foregroundExecutionAuthorizationInputSchema = exports.executionActorRefSchema = exports.actorRefSchema = exports.capabilityPackageSchema = exports.autonomyLevelSchema = exports.CAPABILITY_PACKAGES = exports.AUTONOMY_LEVELS = exports.costCenterUsageSchema = exports.providerCostSourceSchema = exports.PROVIDER_COST_SOURCES = exports.inferenceEconomicTreatmentSchema = void 0;
41
41
  exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = exports.isLoopbackOrigin = exports.inputSatisfiesCapabilityLimits = exports.canonicalCapabilityJson = exports.meteredGenerationSchema = exports.subjectProductAccessSchema = exports.productOfferSegmentSchema = exports.subjectProductGrantSnapshotSchema = exports.productAccessGrantSchema = exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = exports.privateAutoInferenceRequestSchema = exports.privateAutoOperationId = exports.privateAutoInputSchema = exports.privateAutoExecutionSchema = exports.privateAutoSourceApprovalSchema = exports.privateAutoPrincipalSchema = exports.PRIVATE_AUTO_QUESTION = exports.PRIVATE_AUTO_INSTRUCTIONS = exports.PRIVATE_AUTO_LIMITS = exports.PRIVATE_AUTO_REQUEST_ENVELOPE_VERSION = exports.PRIVATE_AUTO_EXECUTION_CONTRACT_VERSION = exports.scopedInferenceRequestSchema = exports.canonicalScopedExecutionJson = exports.scopedExecutionSchema = exports.scopedExecutionAudienceSchema = exports.SCOPED_REQUEST_ENVELOPE_VERSION = exports.SCOPED_EXECUTION_CONTRACT_VERSION = exports.decisionAnswersMatch = exports.decisionFitsGateway = exports.decisionInputBudget = exports.decisionFailureSchema = exports.decisionSuccessSchema = exports.decisionResultSchema = exports.decisionAnswerSchema = exports.decisionRequestSchema = exports.decisionInputSchema = exports.decisionQuestionSchema = exports.decisionEffortSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = void 0;
42
- exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = void 0;
42
+ exports.productPlanCatalogueSchema = exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = void 0;
43
43
  var accountGraph_1 = require("./accountGraph");
44
44
  Object.defineProperty(exports, "ACCOUNT_KINDS", { enumerable: true, get: function () { return accountGraph_1.ACCOUNT_KINDS; } });
45
45
  Object.defineProperty(exports, "accountKindSchema", { enumerable: true, get: function () { return accountGraph_1.accountKindSchema; } });
@@ -880,6 +880,7 @@ Object.defineProperty(exports, "productSubscriptionCancellationResultSchema", {
880
880
  var plans_1 = require("./products/plans");
881
881
  Object.defineProperty(exports, "personalPlanDisplayPriceSchema", { enumerable: true, get: function () { return plans_1.personalPlanDisplayPriceSchema; } });
882
882
  Object.defineProperty(exports, "personalPlanCatalogueSchema", { enumerable: true, get: function () { return plans_1.personalPlanCatalogueSchema; } });
883
+ Object.defineProperty(exports, "productPlanCatalogueSchema", { enumerable: true, get: function () { return plans_1.productPlanCatalogueSchema; } });
883
884
  __exportStar(require("./products/checkout"), exports);
884
885
  __exportStar(require("./organizations"), exports);
885
886
  __exportStar(require("./safety"), exports);
@@ -27,6 +27,7 @@ exports.productSubscriptionSummarySchema = zod_1.z
27
27
  period,
28
28
  cancelAtPeriodEnd: zod_1.z.boolean(),
29
29
  canCancel: zod_1.z.boolean(),
30
+ canRenew: zod_1.z.boolean().optional(),
30
31
  offers: zod_1.z.array(zod_1.z
31
32
  .object({
32
33
  segmentId: id,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.personalPlanCheckoutResultSchema = exports.personalPlanCheckoutRequestSchema = void 0;
3
+ exports.productSubscriptionRenewalRequestSchema = exports.productPlanCheckoutRequestSchema = exports.personalPlanCheckoutResultSchema = exports.personalPlanCheckoutRequestSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const identifiers_1 = require("../inference/identifiers");
6
6
  exports.personalPlanCheckoutRequestSchema = zod_1.z
@@ -33,3 +33,16 @@ exports.personalPlanCheckoutResultSchema = zod_1.z.discriminatedUnion('state', [
33
33
  zod_1.z.object({ state: zod_1.z.literal('closed'), intentId: zod_1.z.string().min(1).max(160) }).strict(),
34
34
  zod_1.z.object({ state: zod_1.z.literal('fulfilled'), intentId: zod_1.z.string().min(1).max(160) }).strict(),
35
35
  ]);
36
+ /** Explicit individual product offer; still owned and paid through Oxy. */
37
+ exports.productPlanCheckoutRequestSchema = exports.personalPlanCheckoutRequestSchema
38
+ .extend({
39
+ productId: zod_1.z.string().min(1).max(160),
40
+ })
41
+ .strict();
42
+ exports.productSubscriptionRenewalRequestSchema = zod_1.z
43
+ .object({
44
+ expectedSubjectAccountId: identifiers_1.oxyAccountIdSchema,
45
+ sourceId: zod_1.z.string().min(1).max(160),
46
+ idempotencyKey: exports.personalPlanCheckoutRequestSchema.shape.idempotencyKey,
47
+ })
48
+ .strict();
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = void 0;
3
+ exports.productPlanCatalogueSchema = exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const access_1 = require("./access");
6
6
  /** Approved display terms never identify or activate a billing-provider price. */
@@ -19,7 +19,7 @@ exports.personalPlanCatalogueSchema = zod_1.z
19
19
  .object({
20
20
  schemaVersion: zod_1.z.literal(1),
21
21
  state: zod_1.z.enum(['unconfigured', 'configured']),
22
- purchase: zod_1.z.literal('unavailable'),
22
+ purchase: zod_1.z.enum(['unavailable', 'available']),
23
23
  plans: zod_1.z.array(zod_1.z
24
24
  .object({
25
25
  offerId: zod_1.z.string().min(1).max(160),
@@ -36,3 +36,19 @@ exports.personalPlanCatalogueSchema = zod_1.z
36
36
  })
37
37
  .strict()
38
38
  .refine((value) => (value.state === 'unconfigured') === (value.plans.length === 0), 'Catalogue state must match published plans');
39
+ exports.productPlanCatalogueSchema = zod_1.z
40
+ .object({
41
+ schemaVersion: zod_1.z.literal(1),
42
+ productId: zod_1.z.string().min(1).max(160),
43
+ purchase: zod_1.z.enum(['unavailable', 'available']),
44
+ plans: zod_1.z.array(zod_1.z
45
+ .object({
46
+ productId: zod_1.z.string().min(1).max(160),
47
+ offerId: zod_1.z.string().min(1).max(160),
48
+ offerVersion: zod_1.z.number().int().positive().safe(),
49
+ displayName: zod_1.z.string().min(1).max(100),
50
+ price: exports.personalPlanDisplayPriceSchema.extend({ interval: zod_1.z.enum(['month', 'year']) }),
51
+ })
52
+ .strict()),
53
+ })
54
+ .strict();
@@ -246,6 +246,10 @@ exports.userResponseSchema = zod_1.z
246
246
  * so it is present on the current-user DTO (`GET /users/me`,
247
247
  * `GET /session/user/:sessionId`) and absent until the user sets it.
248
248
  */
249
+ userPreferences: zod_1.z
250
+ .object({ displayCurrency: zod_1.z.enum(['USD', 'EUR', 'FAIR']).optional() })
251
+ .catchall(zod_1.z.unknown())
252
+ .optional(),
249
253
  themePreference: exports.themePreferenceSchema.optional(),
250
254
  personalization: zod_1.z
251
255
  .object({
@@ -306,7 +310,10 @@ exports.userProfileUpdateSchema = zod_1.z
306
310
  languages: zod_1.z.array(zod_1.z.string()).optional(),
307
311
  accountExpiresAfterInactivityDays: zod_1.z.number().nullable().optional(),
308
312
  notificationPreferences: zod_1.z.record(zod_1.z.unknown()).optional(),
309
- userPreferences: zod_1.z.record(zod_1.z.unknown()).optional(),
313
+ userPreferences: zod_1.z
314
+ .object({ displayCurrency: zod_1.z.enum(['USD', 'EUR', 'FAIR']).optional() })
315
+ .catchall(zod_1.z.unknown())
316
+ .optional(),
310
317
  privacySettings: zod_1.z.record(zod_1.z.unknown()).optional(),
311
318
  /**
312
319
  * Portable theme preference. Written through the same `PUT /users/me`