@oxy.so/contracts 4.24.0 → 4.25.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.
@@ -15,6 +15,20 @@
15
15
  * behaviour by `__tests__/clientChecks.parity.test.ts`. Types are not repeated
16
16
  * here; import them from `@oxy.so/contracts` with `import type`.
17
17
  */
18
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ var desc = Object.getOwnPropertyDescriptor(m, k);
21
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
22
+ desc = { enumerable: true, get: function() { return m[k]; } };
23
+ }
24
+ Object.defineProperty(o, k2, desc);
25
+ }) : (function(o, m, k, k2) {
26
+ if (k2 === undefined) k2 = k;
27
+ o[k2] = m[k];
28
+ }));
29
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
30
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
31
+ };
18
32
  Object.defineProperty(exports, "__esModule", { value: true });
19
33
  exports.deviceJoinCodeResponseCheck = exports.deviceBackgroundCredentialResponseCheck = exports.activeTokenCheck = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceDirectorySyncCheck = exports.deviceDirectoryCheck = exports.deviceActivateResponseCheck = exports.signedRecordEnvelopeCheck = exports.externalIdentityReferenceCheck = exports.loginResultCheck = exports.isLoopbackOrigin = exports.executeAgentKeyOperationCheck = exports.agentVerifyRequestCheck = exports.agentProofClaimsCheck = exports.agentKeyOperationResultCheck = exports.agentKeyOperationCheck = exports.agentKeyOperationChallengeCheck = exports.agentKeyListResponseCheck = exports.agentChallengeRequestCheck = exports.AGENT_PROOF_TTL_MS = exports.AGENT_PROOF_AUDIENCE = exports.AGENT_PROOF_ACTIONS = exports.ACCOUNT_AUTH_METHODS = exports.emailVerificationStartResponseCheck = exports.emailVerificationConfirmResponseCheck = exports.emailTicketCheck = exports.emailAddressCheck = exports.EMAIL_VERIFICATION_PURPOSES = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_LENGTH = exports.newlyAddedRetiredCategories = exports.kindAcceptsAccountCategories = exports.isSelectableAccountCategoryId = exports.isOperatorSwitchTargetKind = exports.isDelegatedActAsEligibleKind = exports.isAccountKind = exports.SELECTABLE_ACCOUNT_CATEGORY_IDS = exports.RETIRED_ACCOUNT_CATEGORY_IDS = exports.MAX_ACCOUNT_CATEGORIES = exports.CHILD_ACCOUNT_KINDS = exports.ACCOUNT_KINDS = exports.ACCOUNT_CATEGORY_KINDS = exports.ACCOUNT_CATEGORY_IDS = exports.parseContract = exports.formatCheckPath = exports.checkContract = exports.ContractCheckError = void 0;
20
34
  exports.productSubscriptionCancellationResultCheck = exports.productPlanCheckoutRequestCheck = exports.productPlanCatalogueCheck = exports.personalPlanCheckoutResultCheck = exports.personalPlanCheckoutRequestCheck = exports.personalPlanCatalogueCheck = exports.cancelProductSubscriptionCheck = exports.updateOrganizationCheck = exports.organizationNameCheck = exports.organizationListCheck = exports.organizationImportBatchResultCheck = exports.organizationExternalResolutionCheck = exports.organizationExternalCheck = exports.organizationCurationResultCheck = exports.organizationClaimReviewCheck = exports.organizationClaimListCheck = exports.organizationClaimInputCheck = exports.organizationClaimDetailCheck = exports.organizationClaimCheck = exports.organizationCheck = exports.organizationBatchCheck = exports.createOrganizationCheck = exports.ORGANIZATION_TYPES = exports.ORGANIZATION_STATUSES = exports.ORGANIZATION_NAME_MAX_LENGTH = exports.ORGANIZATION_ERROR_CODES = exports.ORGANIZATION_CLAIM_STATUSES = exports.ORGANIZATION_CLAIM_DECISIONS = exports.ORGANIZATION_ALIAS_KINDS = exports.canonicalJson = exports.buildIdentityProofMessage = exports.IDENTITY_PROOF_VERSION = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_ERROR_CODES = exports.parseIdentityLinkQrPayload = exports.identityLinkStateCheck = exports.identityLinkCreateResponseCheck = exports.buildIdentityLinkQrPayload = exports.IDENTITY_LINK_STATUSES = exports.IDENTITY_LINK_QR_PREFIX = exports.sessionAccountsChangedEventCheck = exports.deviceTokenMintResponseCheck = exports.deviceSessionSyncCheck = exports.deviceSessionStateCheck = exports.deviceRegisterResponseCheck = exports.deviceJoinResponseCheck = void 0;
@@ -238,3 +252,4 @@ Object.defineProperty(exports, "OXY_APP_ASSERTION_TYPE", { enumerable: true, get
238
252
  Object.defineProperty(exports, "appAssertionChallengeResponseCheck", { enumerable: true, get: function () { return appAssertions_1.appAssertionChallengeResponseCheck; } });
239
253
  Object.defineProperty(exports, "appAssertionResponseCheck", { enumerable: true, get: function () { return appAssertions_1.appAssertionResponseCheck; } });
240
254
  Object.defineProperty(exports, "appAttestKeyResponseCheck", { enumerable: true, get: function () { return appAssertions_1.appAttestKeyResponseCheck; } });
255
+ __exportStar(require("../products/one"), exports);
package/dist/cjs/index.js CHANGED
@@ -907,3 +907,4 @@ Object.defineProperty(exports, "serviceTokenOptionsSchema", { enumerable: true,
907
907
  __exportStar(require("./applicationRoles"), exports);
908
908
  __exportStar(require("./contentClaims"), exports);
909
909
  __exportStar(require("./appAssertions"), exports);
910
+ __exportStar(require("./products/one"), exports);
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OXY_ONE_APP_SUBSCRIPTIONS = exports.OXY_ONE_CREATOR_PLANS = exports.OXY_ONE_BUSINESS_PLANS = exports.OXY_ONE_FAMILY_PLANS = exports.OXY_ONE_PERSONAL_PLANS = exports.OXY_ONE_AUDIENCE_THEMES = exports.OXY_ONE_FAMILY_MEMBERS = exports.OXY_ONE_ANNUAL_DISCOUNT = void 0;
4
+ exports.getOnePlans = getOnePlans;
5
+ exports.onePlanQuote = onePlanQuote;
6
+ exports.OXY_ONE_ANNUAL_DISCOUNT = 20;
7
+ exports.OXY_ONE_FAMILY_MEMBERS = 6;
8
+ exports.OXY_ONE_AUDIENCE_THEMES = {
9
+ personal: 'one-plans-theme',
10
+ creator: 'one-creator-theme',
11
+ business: 'one-professional-theme',
12
+ };
13
+ /** Approved prices and credits; proposed storage capacities for the bundle design.
14
+ * USD minor units; credits renew monthly even on annual plans. Free 2 GB and Go 20 GB follow
15
+ * the new product direction; existing backend quotas are not changed here. */
16
+ exports.OXY_ONE_PERSONAL_PLANS = {
17
+ Free: { monthlyPrice: 0, monthlyCredits: 0, creditDiscount: 0, storageGB: 2 },
18
+ Go: { monthlyPrice: 1500, monthlyCredits: 4000, creditDiscount: 5, storageGB: 20 },
19
+ Pro: { monthlyPrice: 2999, monthlyCredits: 10000, creditDiscount: 10, storageGB: 100 },
20
+ Max: { monthlyPrice: 9900, monthlyCredits: 50000, creditDiscount: 15, storageGB: 500 },
21
+ Ultra: { monthlyPrice: 40000, monthlyCredits: 200000, creditDiscount: 20, storageGB: 2000 },
22
+ };
23
+ /** A family quota belongs to the whole group, never multiplied by member count. */
24
+ exports.OXY_ONE_FAMILY_PLANS = {
25
+ Go: { monthlyPrice: 2500, monthlyCredits: 8000, creditDiscount: 5, storageGB: 40 },
26
+ Pro: { monthlyPrice: 4900, monthlyCredits: 20000, creditDiscount: 10, storageGB: 200 },
27
+ Max: { monthlyPrice: 16900, monthlyCredits: 100000, creditDiscount: 15, storageGB: 1000 },
28
+ Ultra: { monthlyPrice: 59900, monthlyCredits: 300000, creditDiscount: 20, storageGB: 4000 },
29
+ };
30
+ exports.OXY_ONE_BUSINESS_PLANS = {
31
+ Go: {
32
+ monthlyPrice: 3900,
33
+ monthlySeatPrice: 900,
34
+ monthlyCredits: 8000,
35
+ creditsPerSeat: 2000,
36
+ creditDiscount: 15,
37
+ storageGB: 20,
38
+ storagePerSeatGB: 5,
39
+ },
40
+ Pro: {
41
+ monthlyPrice: 9999,
42
+ monthlySeatPrice: 1900,
43
+ monthlyCredits: 25000,
44
+ creditsPerSeat: 5000,
45
+ creditDiscount: 25,
46
+ storageGB: 100,
47
+ storagePerSeatGB: 10,
48
+ },
49
+ Max: {
50
+ monthlyPrice: 19900,
51
+ monthlySeatPrice: 2900,
52
+ monthlyCredits: 60000,
53
+ creditsPerSeat: 8000,
54
+ creditDiscount: 30,
55
+ storageGB: 500,
56
+ storagePerSeatGB: 25,
57
+ },
58
+ Ultra: {
59
+ monthlyPrice: 59900,
60
+ monthlySeatPrice: 4900,
61
+ monthlyCredits: 200000,
62
+ creditsPerSeat: 15000,
63
+ creditDiscount: 35,
64
+ storageGB: 2000,
65
+ storagePerSeatGB: 50,
66
+ },
67
+ };
68
+ /** Verification, basic app access and model access are not subscription gates. */
69
+ exports.OXY_ONE_CREATOR_PLANS = {
70
+ Go: { monthlyPrice: 2900, monthlyCredits: 10000, creditDiscount: 10, storageGB: 20 },
71
+ Pro: { monthlyPrice: 6900, monthlyCredits: 25000, creditDiscount: 15, storageGB: 100 },
72
+ Max: { monthlyPrice: 14900, monthlyCredits: 60000, creditDiscount: 20, storageGB: 500 },
73
+ Ultra: { monthlyPrice: 49900, monthlyCredits: 250000, creditDiscount: 25, storageGB: 2000 },
74
+ };
75
+ function getOnePlans(audience, mode = 'individual') {
76
+ const plans = audience === 'business'
77
+ ? exports.OXY_ONE_BUSINESS_PLANS
78
+ : audience === 'creator'
79
+ ? exports.OXY_ONE_CREATOR_PLANS
80
+ : mode === 'family'
81
+ ? exports.OXY_ONE_FAMILY_PLANS
82
+ : exports.OXY_ONE_PERSONAL_PLANS;
83
+ return Object.entries(plans).map(([name, plan]) => ({ name, ...plan }));
84
+ }
85
+ /** Each product owns its tier names; an Oxy One level selects an app subscription.
86
+ * Bundle inclusion is a proposal and does not activate product entitlements. */
87
+ exports.OXY_ONE_APP_SUBSCRIPTIONS = {
88
+ alia: { name: 'Alia', tiers: { Free: null, Go: 'Go', Pro: 'Pro', Max: 'Max', Ultra: 'Ultra' } },
89
+ // Product-owned names; these bundle mappings remain a proposal.
90
+ mention: {
91
+ name: 'Mention',
92
+ tiers: { Free: null, Go: 'Plus', Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
93
+ },
94
+ mercaria: {
95
+ name: 'Mercaria',
96
+ tiers: { Free: null, Go: 'Go', Pro: 'Plus', Max: 'Plus', Ultra: 'Ultra' },
97
+ creatorTiers: { Free: null, Go: 'Creator', Pro: 'Creator', Max: 'Creator', Ultra: 'Creator' },
98
+ },
99
+ noted: { name: 'Noted', tiers: { Free: null, Go: '+', Pro: '+', Max: '+', Ultra: '+' } },
100
+ clarity: {
101
+ name: 'Clarity',
102
+ tiers: { Free: null, Go: null, Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
103
+ },
104
+ schedio: {
105
+ name: 'Schedio',
106
+ tiers: { Free: null, Go: null, Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
107
+ },
108
+ inbox: {
109
+ name: 'Inbox',
110
+ tiers: { Free: null, Go: null, Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
111
+ },
112
+ homiio: {
113
+ name: 'Homiio',
114
+ tiers: { Free: null, Go: 'Plus', Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
115
+ },
116
+ };
117
+ /** Annual rounding follows the billable base and per-seat line items. */
118
+ function onePlanQuote(plan, period, seats) {
119
+ const annual = (value) => Math.round(value * 12 * (1 - exports.OXY_ONE_ANNUAL_DISCOUNT / 100));
120
+ const baseAnnual = annual(plan.monthlyPrice);
121
+ const seatAnnual = plan.monthlySeatPrice === undefined ? undefined : annual(plan.monthlySeatPrice);
122
+ const known = plan.monthlySeatPrice === undefined || seats !== undefined;
123
+ const totalAnnual = known ? baseAnnual + (seatAnnual ?? 0) * (seats ?? 0) : undefined;
124
+ return {
125
+ baseMonthly: period === 'annual' ? Math.round(baseAnnual / 12) : plan.monthlyPrice,
126
+ seatMonthly: seatAnnual === undefined
127
+ ? undefined
128
+ : period === 'annual'
129
+ ? Math.round(seatAnnual / 12)
130
+ : plan.monthlySeatPrice,
131
+ totalMonthly: totalAnnual === undefined
132
+ ? undefined
133
+ : period === 'annual'
134
+ ? Math.round(totalAnnual / 12)
135
+ : plan.monthlyPrice + (plan.monthlySeatPrice ?? 0) * (seats ?? 0),
136
+ totalAnnual,
137
+ storageGB: known ? plan.storageGB + (plan.storagePerSeatGB ?? 0) * (seats ?? 0) : undefined,
138
+ monthlyCredits: known
139
+ ? plan.monthlyCredits + (plan.creditsPerSeat ?? 0) * (seats ?? 0)
140
+ : undefined,
141
+ };
142
+ }
@@ -37,3 +37,4 @@ export { BOT_USERNAME_INVALID_MESSAGE, BOT_USERNAME_SUFFIX, NUMERIC_USERNAME_MES
37
37
  export { userNameCheck } from './userResponse.js';
38
38
  export { CLAIMANT_RELATIONSHIPS, CLOSED_CONTENT_CLAIM_STATES, CONTENT_CLAIM_COUNTER_NOTICE_LIMITS, CONTENT_CLAIM_ERROR_CODES, CONTENT_CLAIM_KINDS, CONTENT_CLAIM_LIMITS, CONTENT_CLAIM_REFERENCE_PATTERN, CONTENT_CLAIM_STATES, COUNTER_NOTICE_STATEMENT_VERSION, COUNTER_NOTICE_STATEMENTS, ERASURE_REQUEST_DEADLINE_DAYS, OPEN_CONTENT_CLAIM_STATES, isErasureRequest, isRightsClaim, } from './contentClaims.js';
39
39
  export { APP_ASSERTION_CHALLENGE_PURPOSES, APP_ASSERTION_ERROR_CODES, APP_ASSERTION_PLATFORMS, OXY_APP_ASSERTION_AUDIENCE, OXY_APP_ASSERTION_HEADER, OXY_APP_ASSERTION_TTL_SECONDS, OXY_APP_ASSERTION_TYPE, appAssertionChallengeResponseCheck, appAssertionResponseCheck, appAttestKeyResponseCheck, } from './appAssertions.js';
40
+ export * from '../products/one.js';
package/dist/esm/index.js CHANGED
@@ -209,3 +209,4 @@ export { serviceTokenScopesSchema, serviceTokenOptionsSchema, } from './serviceT
209
209
  export * from './applicationRoles.js';
210
210
  export * from './contentClaims.js';
211
211
  export * from './appAssertions.js';
212
+ export * from './products/one.js';
@@ -0,0 +1,137 @@
1
+ export const OXY_ONE_ANNUAL_DISCOUNT = 20;
2
+ export const OXY_ONE_FAMILY_MEMBERS = 6;
3
+ export const OXY_ONE_AUDIENCE_THEMES = {
4
+ personal: 'one-plans-theme',
5
+ creator: 'one-creator-theme',
6
+ business: 'one-professional-theme',
7
+ };
8
+ /** Approved prices and credits; proposed storage capacities for the bundle design.
9
+ * USD minor units; credits renew monthly even on annual plans. Free 2 GB and Go 20 GB follow
10
+ * the new product direction; existing backend quotas are not changed here. */
11
+ export const OXY_ONE_PERSONAL_PLANS = {
12
+ Free: { monthlyPrice: 0, monthlyCredits: 0, creditDiscount: 0, storageGB: 2 },
13
+ Go: { monthlyPrice: 1500, monthlyCredits: 4000, creditDiscount: 5, storageGB: 20 },
14
+ Pro: { monthlyPrice: 2999, monthlyCredits: 10000, creditDiscount: 10, storageGB: 100 },
15
+ Max: { monthlyPrice: 9900, monthlyCredits: 50000, creditDiscount: 15, storageGB: 500 },
16
+ Ultra: { monthlyPrice: 40000, monthlyCredits: 200000, creditDiscount: 20, storageGB: 2000 },
17
+ };
18
+ /** A family quota belongs to the whole group, never multiplied by member count. */
19
+ export const OXY_ONE_FAMILY_PLANS = {
20
+ Go: { monthlyPrice: 2500, monthlyCredits: 8000, creditDiscount: 5, storageGB: 40 },
21
+ Pro: { monthlyPrice: 4900, monthlyCredits: 20000, creditDiscount: 10, storageGB: 200 },
22
+ Max: { monthlyPrice: 16900, monthlyCredits: 100000, creditDiscount: 15, storageGB: 1000 },
23
+ Ultra: { monthlyPrice: 59900, monthlyCredits: 300000, creditDiscount: 20, storageGB: 4000 },
24
+ };
25
+ export const OXY_ONE_BUSINESS_PLANS = {
26
+ Go: {
27
+ monthlyPrice: 3900,
28
+ monthlySeatPrice: 900,
29
+ monthlyCredits: 8000,
30
+ creditsPerSeat: 2000,
31
+ creditDiscount: 15,
32
+ storageGB: 20,
33
+ storagePerSeatGB: 5,
34
+ },
35
+ Pro: {
36
+ monthlyPrice: 9999,
37
+ monthlySeatPrice: 1900,
38
+ monthlyCredits: 25000,
39
+ creditsPerSeat: 5000,
40
+ creditDiscount: 25,
41
+ storageGB: 100,
42
+ storagePerSeatGB: 10,
43
+ },
44
+ Max: {
45
+ monthlyPrice: 19900,
46
+ monthlySeatPrice: 2900,
47
+ monthlyCredits: 60000,
48
+ creditsPerSeat: 8000,
49
+ creditDiscount: 30,
50
+ storageGB: 500,
51
+ storagePerSeatGB: 25,
52
+ },
53
+ Ultra: {
54
+ monthlyPrice: 59900,
55
+ monthlySeatPrice: 4900,
56
+ monthlyCredits: 200000,
57
+ creditsPerSeat: 15000,
58
+ creditDiscount: 35,
59
+ storageGB: 2000,
60
+ storagePerSeatGB: 50,
61
+ },
62
+ };
63
+ /** Verification, basic app access and model access are not subscription gates. */
64
+ export const OXY_ONE_CREATOR_PLANS = {
65
+ Go: { monthlyPrice: 2900, monthlyCredits: 10000, creditDiscount: 10, storageGB: 20 },
66
+ Pro: { monthlyPrice: 6900, monthlyCredits: 25000, creditDiscount: 15, storageGB: 100 },
67
+ Max: { monthlyPrice: 14900, monthlyCredits: 60000, creditDiscount: 20, storageGB: 500 },
68
+ Ultra: { monthlyPrice: 49900, monthlyCredits: 250000, creditDiscount: 25, storageGB: 2000 },
69
+ };
70
+ export function getOnePlans(audience, mode = 'individual') {
71
+ const plans = audience === 'business'
72
+ ? OXY_ONE_BUSINESS_PLANS
73
+ : audience === 'creator'
74
+ ? OXY_ONE_CREATOR_PLANS
75
+ : mode === 'family'
76
+ ? OXY_ONE_FAMILY_PLANS
77
+ : OXY_ONE_PERSONAL_PLANS;
78
+ return Object.entries(plans).map(([name, plan]) => ({ name, ...plan }));
79
+ }
80
+ /** Each product owns its tier names; an Oxy One level selects an app subscription.
81
+ * Bundle inclusion is a proposal and does not activate product entitlements. */
82
+ export const OXY_ONE_APP_SUBSCRIPTIONS = {
83
+ alia: { name: 'Alia', tiers: { Free: null, Go: 'Go', Pro: 'Pro', Max: 'Max', Ultra: 'Ultra' } },
84
+ // Product-owned names; these bundle mappings remain a proposal.
85
+ mention: {
86
+ name: 'Mention',
87
+ tiers: { Free: null, Go: 'Plus', Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
88
+ },
89
+ mercaria: {
90
+ name: 'Mercaria',
91
+ tiers: { Free: null, Go: 'Go', Pro: 'Plus', Max: 'Plus', Ultra: 'Ultra' },
92
+ creatorTiers: { Free: null, Go: 'Creator', Pro: 'Creator', Max: 'Creator', Ultra: 'Creator' },
93
+ },
94
+ noted: { name: 'Noted', tiers: { Free: null, Go: '+', Pro: '+', Max: '+', Ultra: '+' } },
95
+ clarity: {
96
+ name: 'Clarity',
97
+ tiers: { Free: null, Go: null, Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
98
+ },
99
+ schedio: {
100
+ name: 'Schedio',
101
+ tiers: { Free: null, Go: null, Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
102
+ },
103
+ inbox: {
104
+ name: 'Inbox',
105
+ tiers: { Free: null, Go: null, Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
106
+ },
107
+ homiio: {
108
+ name: 'Homiio',
109
+ tiers: { Free: null, Go: 'Plus', Pro: 'Plus', Max: 'Plus', Ultra: 'Plus' },
110
+ },
111
+ };
112
+ /** Annual rounding follows the billable base and per-seat line items. */
113
+ export function onePlanQuote(plan, period, seats) {
114
+ const annual = (value) => Math.round(value * 12 * (1 - OXY_ONE_ANNUAL_DISCOUNT / 100));
115
+ const baseAnnual = annual(plan.monthlyPrice);
116
+ const seatAnnual = plan.monthlySeatPrice === undefined ? undefined : annual(plan.monthlySeatPrice);
117
+ const known = plan.monthlySeatPrice === undefined || seats !== undefined;
118
+ const totalAnnual = known ? baseAnnual + (seatAnnual ?? 0) * (seats ?? 0) : undefined;
119
+ return {
120
+ baseMonthly: period === 'annual' ? Math.round(baseAnnual / 12) : plan.monthlyPrice,
121
+ seatMonthly: seatAnnual === undefined
122
+ ? undefined
123
+ : period === 'annual'
124
+ ? Math.round(seatAnnual / 12)
125
+ : plan.monthlySeatPrice,
126
+ totalMonthly: totalAnnual === undefined
127
+ ? undefined
128
+ : period === 'annual'
129
+ ? Math.round(totalAnnual / 12)
130
+ : plan.monthlyPrice + (plan.monthlySeatPrice ?? 0) * (seats ?? 0),
131
+ totalAnnual,
132
+ storageGB: known ? plan.storageGB + (plan.storagePerSeatGB ?? 0) * (seats ?? 0) : undefined,
133
+ monthlyCredits: known
134
+ ? plan.monthlyCredits + (plan.creditsPerSeat ?? 0) * (seats ?? 0)
135
+ : undefined,
136
+ };
137
+ }
@@ -37,3 +37,4 @@ export { BOT_USERNAME_INVALID_MESSAGE, BOT_USERNAME_SUFFIX, NUMERIC_USERNAME_MES
37
37
  export { userNameCheck } from './userResponse';
38
38
  export { CLAIMANT_RELATIONSHIPS, CLOSED_CONTENT_CLAIM_STATES, CONTENT_CLAIM_COUNTER_NOTICE_LIMITS, CONTENT_CLAIM_ERROR_CODES, CONTENT_CLAIM_KINDS, CONTENT_CLAIM_LIMITS, CONTENT_CLAIM_REFERENCE_PATTERN, CONTENT_CLAIM_STATES, COUNTER_NOTICE_STATEMENT_VERSION, COUNTER_NOTICE_STATEMENTS, ERASURE_REQUEST_DEADLINE_DAYS, OPEN_CONTENT_CLAIM_STATES, isErasureRequest, isRightsClaim, } from './contentClaims';
39
39
  export { APP_ASSERTION_CHALLENGE_PURPOSES, APP_ASSERTION_ERROR_CODES, APP_ASSERTION_PLATFORMS, OXY_APP_ASSERTION_AUDIENCE, OXY_APP_ASSERTION_HEADER, OXY_APP_ASSERTION_TTL_SECONDS, OXY_APP_ASSERTION_TYPE, appAssertionChallengeResponseCheck, appAssertionResponseCheck, appAttestKeyResponseCheck, } from './appAssertions';
40
+ export * from '../products/one';
@@ -141,3 +141,4 @@ export { serviceTokenScopesSchema, serviceTokenOptionsSchema, type ServiceTokenO
141
141
  export * from './applicationRoles';
142
142
  export * from './contentClaims';
143
143
  export * from './appAssertions';
144
+ export * from './products/one';
@@ -0,0 +1,250 @@
1
+ /** Oxy One commercial catalogue. Source: website /one, approved by Nate 2026-10-17.
2
+ * Display terms do not grant access: fulfillment requires verified provider evidence. */
3
+ export type PersonalPlanMode = 'individual' | 'family';
4
+ export type OneAudience = 'personal' | 'creator' | 'business';
5
+ export interface OnePlan {
6
+ name: string;
7
+ monthlyPrice: number;
8
+ monthlyCredits: number;
9
+ creditDiscount: number;
10
+ /** Proposed shared storage in GB; does not provision a backend quota. */
11
+ storageGB: number;
12
+ storagePerSeatGB?: number;
13
+ monthlySeatPrice?: number;
14
+ creditsPerSeat?: number;
15
+ }
16
+ export declare const OXY_ONE_ANNUAL_DISCOUNT = 20;
17
+ export declare const OXY_ONE_FAMILY_MEMBERS = 6;
18
+ export declare const OXY_ONE_AUDIENCE_THEMES: {
19
+ readonly personal: "one-plans-theme";
20
+ readonly creator: "one-creator-theme";
21
+ readonly business: "one-professional-theme";
22
+ };
23
+ /** Approved prices and credits; proposed storage capacities for the bundle design.
24
+ * USD minor units; credits renew monthly even on annual plans. Free 2 GB and Go 20 GB follow
25
+ * the new product direction; existing backend quotas are not changed here. */
26
+ export declare const OXY_ONE_PERSONAL_PLANS: {
27
+ readonly Free: {
28
+ readonly monthlyPrice: 0;
29
+ readonly monthlyCredits: 0;
30
+ readonly creditDiscount: 0;
31
+ readonly storageGB: 2;
32
+ };
33
+ readonly Go: {
34
+ readonly monthlyPrice: 1500;
35
+ readonly monthlyCredits: 4000;
36
+ readonly creditDiscount: 5;
37
+ readonly storageGB: 20;
38
+ };
39
+ readonly Pro: {
40
+ readonly monthlyPrice: 2999;
41
+ readonly monthlyCredits: 10000;
42
+ readonly creditDiscount: 10;
43
+ readonly storageGB: 100;
44
+ };
45
+ readonly Max: {
46
+ readonly monthlyPrice: 9900;
47
+ readonly monthlyCredits: 50000;
48
+ readonly creditDiscount: 15;
49
+ readonly storageGB: 500;
50
+ };
51
+ readonly Ultra: {
52
+ readonly monthlyPrice: 40000;
53
+ readonly monthlyCredits: 200000;
54
+ readonly creditDiscount: 20;
55
+ readonly storageGB: 2000;
56
+ };
57
+ };
58
+ /** A family quota belongs to the whole group, never multiplied by member count. */
59
+ export declare const OXY_ONE_FAMILY_PLANS: {
60
+ readonly Go: {
61
+ readonly monthlyPrice: 2500;
62
+ readonly monthlyCredits: 8000;
63
+ readonly creditDiscount: 5;
64
+ readonly storageGB: 40;
65
+ };
66
+ readonly Pro: {
67
+ readonly monthlyPrice: 4900;
68
+ readonly monthlyCredits: 20000;
69
+ readonly creditDiscount: 10;
70
+ readonly storageGB: 200;
71
+ };
72
+ readonly Max: {
73
+ readonly monthlyPrice: 16900;
74
+ readonly monthlyCredits: 100000;
75
+ readonly creditDiscount: 15;
76
+ readonly storageGB: 1000;
77
+ };
78
+ readonly Ultra: {
79
+ readonly monthlyPrice: 59900;
80
+ readonly monthlyCredits: 300000;
81
+ readonly creditDiscount: 20;
82
+ readonly storageGB: 4000;
83
+ };
84
+ };
85
+ export declare const OXY_ONE_BUSINESS_PLANS: {
86
+ readonly Go: {
87
+ readonly monthlyPrice: 3900;
88
+ readonly monthlySeatPrice: 900;
89
+ readonly monthlyCredits: 8000;
90
+ readonly creditsPerSeat: 2000;
91
+ readonly creditDiscount: 15;
92
+ readonly storageGB: 20;
93
+ readonly storagePerSeatGB: 5;
94
+ };
95
+ readonly Pro: {
96
+ readonly monthlyPrice: 9999;
97
+ readonly monthlySeatPrice: 1900;
98
+ readonly monthlyCredits: 25000;
99
+ readonly creditsPerSeat: 5000;
100
+ readonly creditDiscount: 25;
101
+ readonly storageGB: 100;
102
+ readonly storagePerSeatGB: 10;
103
+ };
104
+ readonly Max: {
105
+ readonly monthlyPrice: 19900;
106
+ readonly monthlySeatPrice: 2900;
107
+ readonly monthlyCredits: 60000;
108
+ readonly creditsPerSeat: 8000;
109
+ readonly creditDiscount: 30;
110
+ readonly storageGB: 500;
111
+ readonly storagePerSeatGB: 25;
112
+ };
113
+ readonly Ultra: {
114
+ readonly monthlyPrice: 59900;
115
+ readonly monthlySeatPrice: 4900;
116
+ readonly monthlyCredits: 200000;
117
+ readonly creditsPerSeat: 15000;
118
+ readonly creditDiscount: 35;
119
+ readonly storageGB: 2000;
120
+ readonly storagePerSeatGB: 50;
121
+ };
122
+ };
123
+ /** Verification, basic app access and model access are not subscription gates. */
124
+ export declare const OXY_ONE_CREATOR_PLANS: {
125
+ readonly Go: {
126
+ readonly monthlyPrice: 2900;
127
+ readonly monthlyCredits: 10000;
128
+ readonly creditDiscount: 10;
129
+ readonly storageGB: 20;
130
+ };
131
+ readonly Pro: {
132
+ readonly monthlyPrice: 6900;
133
+ readonly monthlyCredits: 25000;
134
+ readonly creditDiscount: 15;
135
+ readonly storageGB: 100;
136
+ };
137
+ readonly Max: {
138
+ readonly monthlyPrice: 14900;
139
+ readonly monthlyCredits: 60000;
140
+ readonly creditDiscount: 20;
141
+ readonly storageGB: 500;
142
+ };
143
+ readonly Ultra: {
144
+ readonly monthlyPrice: 49900;
145
+ readonly monthlyCredits: 250000;
146
+ readonly creditDiscount: 25;
147
+ readonly storageGB: 2000;
148
+ };
149
+ };
150
+ export declare function getOnePlans(audience: OneAudience, mode?: PersonalPlanMode): OnePlan[];
151
+ /** Each product owns its tier names; an Oxy One level selects an app subscription.
152
+ * Bundle inclusion is a proposal and does not activate product entitlements. */
153
+ export declare const OXY_ONE_APP_SUBSCRIPTIONS: {
154
+ readonly alia: {
155
+ readonly name: "Alia";
156
+ readonly tiers: {
157
+ readonly Free: null;
158
+ readonly Go: "Go";
159
+ readonly Pro: "Pro";
160
+ readonly Max: "Max";
161
+ readonly Ultra: "Ultra";
162
+ };
163
+ };
164
+ readonly mention: {
165
+ readonly name: "Mention";
166
+ readonly tiers: {
167
+ readonly Free: null;
168
+ readonly Go: "Plus";
169
+ readonly Pro: "Plus";
170
+ readonly Max: "Plus";
171
+ readonly Ultra: "Plus";
172
+ };
173
+ };
174
+ readonly mercaria: {
175
+ readonly name: "Mercaria";
176
+ readonly tiers: {
177
+ readonly Free: null;
178
+ readonly Go: "Go";
179
+ readonly Pro: "Plus";
180
+ readonly Max: "Plus";
181
+ readonly Ultra: "Ultra";
182
+ };
183
+ readonly creatorTiers: {
184
+ readonly Free: null;
185
+ readonly Go: "Creator";
186
+ readonly Pro: "Creator";
187
+ readonly Max: "Creator";
188
+ readonly Ultra: "Creator";
189
+ };
190
+ };
191
+ readonly noted: {
192
+ readonly name: "Noted";
193
+ readonly tiers: {
194
+ readonly Free: null;
195
+ readonly Go: "+";
196
+ readonly Pro: "+";
197
+ readonly Max: "+";
198
+ readonly Ultra: "+";
199
+ };
200
+ };
201
+ readonly clarity: {
202
+ readonly name: "Clarity";
203
+ readonly tiers: {
204
+ readonly Free: null;
205
+ readonly Go: null;
206
+ readonly Pro: "Plus";
207
+ readonly Max: "Plus";
208
+ readonly Ultra: "Plus";
209
+ };
210
+ };
211
+ readonly schedio: {
212
+ readonly name: "Schedio";
213
+ readonly tiers: {
214
+ readonly Free: null;
215
+ readonly Go: null;
216
+ readonly Pro: "Plus";
217
+ readonly Max: "Plus";
218
+ readonly Ultra: "Plus";
219
+ };
220
+ };
221
+ readonly inbox: {
222
+ readonly name: "Inbox";
223
+ readonly tiers: {
224
+ readonly Free: null;
225
+ readonly Go: null;
226
+ readonly Pro: "Plus";
227
+ readonly Max: "Plus";
228
+ readonly Ultra: "Plus";
229
+ };
230
+ };
231
+ readonly homiio: {
232
+ readonly name: "Homiio";
233
+ readonly tiers: {
234
+ readonly Free: null;
235
+ readonly Go: "Plus";
236
+ readonly Pro: "Plus";
237
+ readonly Max: "Plus";
238
+ readonly Ultra: "Plus";
239
+ };
240
+ };
241
+ };
242
+ /** Annual rounding follows the billable base and per-seat line items. */
243
+ export declare function onePlanQuote(plan: OnePlan, period: 'monthly' | 'annual', seats: number | undefined): {
244
+ baseMonthly: number;
245
+ seatMonthly: number | undefined;
246
+ totalMonthly: number | undefined;
247
+ totalAnnual: number | undefined;
248
+ storageGB: number | undefined;
249
+ monthlyCredits: number | undefined;
250
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/contracts",
3
- "version": "4.24.0",
3
+ "version": "4.25.0",
4
4
  "description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",