@oxy.so/contracts 5.8.0 → 6.1.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/accountAccess.js +6 -5
- package/dist/cjs/accountEmail.js +13 -5
- package/dist/cjs/accountGraph.js +10 -9
- package/dist/cjs/accountName.js +3 -2
- package/dist/cjs/agency.js +91 -34
- package/dist/cjs/agentKeys.js +21 -17
- package/dist/cjs/appAssertions.js +14 -13
- package/dist/cjs/applicationRoles.js +19 -12
- package/dist/cjs/campaignAttribution.js +28 -0
- package/dist/cjs/civic.js +10 -9
- package/dist/cjs/client/campaignAttribution.js +14 -0
- package/dist/cjs/client/check.js +61 -53
- package/dist/cjs/client/index.js +7 -1
- package/dist/cjs/client/language.js +7 -0
- package/dist/cjs/consoleOnboarding.js +9 -4
- package/dist/cjs/contentClaims.js +23 -14
- package/dist/cjs/deviceDirectory.js +11 -9
- package/dist/cjs/deviceSession.js +27 -25
- package/dist/cjs/email/messages.js +20 -18
- package/dist/cjs/emailAgentContext.js +11 -9
- package/dist/cjs/externalIdentity.js +15 -11
- package/dist/cjs/federationInstanceFetch.js +12 -7
- package/dist/cjs/identity.js +19 -17
- package/dist/cjs/identityLink.js +6 -4
- package/dist/cjs/identityProof.js +6 -4
- package/dist/cjs/inboxPush.js +5 -4
- package/dist/cjs/index.js +17 -6
- package/dist/cjs/inference/accountBilling.js +35 -33
- package/dist/cjs/inference/aliaModelRelease.js +9 -7
- package/dist/cjs/inference/attribution.js +14 -12
- package/dist/cjs/inference/catalogue.js +35 -29
- package/dist/cjs/inference/economics.js +24 -19
- package/dist/cjs/inference/embeddings.js +9 -7
- package/dist/cjs/inference/entitlement.js +17 -15
- package/dist/cjs/inference/errors.js +15 -8
- package/dist/cjs/inference/identifiers.js +33 -21
- package/dist/cjs/inference/inbox.js +37 -35
- package/dist/cjs/inference/modelDocumentation.js +16 -14
- package/dist/cjs/inference/money.js +5 -4
- package/dist/cjs/inference/priceVersion.js +10 -5
- package/dist/cjs/inference/providerConnection.js +21 -14
- package/dist/cjs/inference/realtime.js +88 -47
- package/dist/cjs/inference/request.js +27 -25
- package/dist/cjs/inference/routingPolicy.js +12 -10
- package/dist/cjs/inference/streamEvents.js +22 -16
- package/dist/cjs/inference/usage.js +32 -15
- package/dist/cjs/keyRecovery.js +8 -6
- package/dist/cjs/keyRotation.js +5 -4
- package/dist/cjs/linkedAccounts.js +22 -18
- package/dist/cjs/moderationReputation.js +29 -27
- package/dist/cjs/notifications.js +25 -9
- package/dist/cjs/numberChecks.js +45 -0
- package/dist/cjs/oauth.js +14 -12
- package/dist/cjs/organizations.js +23 -21
- package/dist/cjs/products/access.js +10 -8
- package/dist/cjs/products/billing.js +10 -8
- package/dist/cjs/products/checkout.js +22 -10
- package/dist/cjs/products/plans.js +15 -10
- package/dist/cjs/protocol.js +6 -5
- package/dist/cjs/recommendations.js +27 -19
- package/dist/cjs/reputation.js +15 -13
- package/dist/cjs/safety.js +43 -27
- package/dist/cjs/serviceToken.js +81 -2
- package/dist/cjs/sessionRevocation.js +8 -6
- package/dist/cjs/signIn.js +50 -24
- package/dist/cjs/stickers.js +19 -15
- package/dist/cjs/stringChecks.js +70 -0
- package/dist/cjs/transparency.js +14 -12
- package/dist/cjs/updates.js +24 -22
- package/dist/cjs/userInvalidation.js +7 -5
- package/dist/cjs/userResponse.js +8 -7
- package/dist/cjs/username.js +7 -6
- package/dist/esm/accountAccess.js +4 -3
- package/dist/esm/accountEmail.js +13 -5
- package/dist/esm/accountGraph.js +8 -7
- package/dist/esm/accountName.js +3 -2
- package/dist/esm/agency.js +90 -33
- package/dist/esm/agentKeys.js +21 -17
- package/dist/esm/appAssertions.js +11 -10
- package/dist/esm/applicationRoles.js +16 -9
- package/dist/esm/campaignAttribution.js +25 -0
- package/dist/esm/civic.js +8 -7
- package/dist/esm/client/campaignAttribution.js +10 -0
- package/dist/esm/client/check.js +61 -53
- package/dist/esm/client/index.js +2 -0
- package/dist/esm/client/language.js +4 -0
- package/dist/esm/consoleOnboarding.js +7 -2
- package/dist/esm/contentClaims.js +23 -14
- package/dist/esm/deviceDirectory.js +11 -9
- package/dist/esm/deviceSession.js +27 -25
- package/dist/esm/email/messages.js +18 -16
- package/dist/esm/emailAgentContext.js +11 -9
- package/dist/esm/externalIdentity.js +15 -11
- package/dist/esm/federationInstanceFetch.js +10 -5
- package/dist/esm/identity.js +17 -15
- package/dist/esm/identityLink.js +6 -4
- package/dist/esm/identityProof.js +6 -4
- package/dist/esm/inboxPush.js +3 -2
- package/dist/esm/index.js +5 -2
- package/dist/esm/inference/accountBilling.js +33 -31
- package/dist/esm/inference/aliaModelRelease.js +7 -5
- package/dist/esm/inference/attribution.js +14 -12
- package/dist/esm/inference/catalogue.js +33 -27
- package/dist/esm/inference/economics.js +22 -17
- package/dist/esm/inference/embeddings.js +9 -7
- package/dist/esm/inference/entitlement.js +15 -13
- package/dist/esm/inference/errors.js +13 -6
- package/dist/esm/inference/identifiers.js +31 -19
- package/dist/esm/inference/inbox.js +37 -35
- package/dist/esm/inference/modelDocumentation.js +14 -12
- package/dist/esm/inference/money.js +3 -2
- package/dist/esm/inference/priceVersion.js +8 -3
- package/dist/esm/inference/providerConnection.js +19 -12
- package/dist/esm/inference/realtime.js +85 -44
- package/dist/esm/inference/request.js +25 -23
- package/dist/esm/inference/routingPolicy.js +9 -7
- package/dist/esm/inference/streamEvents.js +20 -14
- package/dist/esm/inference/usage.js +30 -13
- package/dist/esm/keyRecovery.js +8 -6
- package/dist/esm/keyRotation.js +5 -4
- package/dist/esm/linkedAccounts.js +20 -16
- package/dist/esm/moderationReputation.js +27 -25
- package/dist/esm/notifications.js +23 -7
- package/dist/esm/numberChecks.js +41 -0
- package/dist/esm/oauth.js +14 -12
- package/dist/esm/organizations.js +23 -21
- package/dist/esm/products/access.js +10 -8
- package/dist/esm/products/billing.js +10 -8
- package/dist/esm/products/checkout.js +22 -10
- package/dist/esm/products/plans.js +15 -10
- package/dist/esm/protocol.js +4 -3
- package/dist/esm/recommendations.js +25 -17
- package/dist/esm/reputation.js +13 -11
- package/dist/esm/safety.js +43 -27
- package/dist/esm/serviceToken.js +80 -1
- package/dist/esm/sessionRevocation.js +6 -4
- package/dist/esm/signIn.js +50 -24
- package/dist/esm/stickers.js +17 -13
- package/dist/esm/stringChecks.js +63 -0
- package/dist/esm/transparency.js +14 -12
- package/dist/esm/updates.js +22 -20
- package/dist/esm/userInvalidation.js +4 -2
- package/dist/esm/userResponse.js +4 -3
- package/dist/esm/username.js +3 -2
- package/dist/types/accountAccess.d.ts +29 -70
- package/dist/types/accountEmail.d.ts +2 -14
- package/dist/types/accountGraph.d.ts +179 -171
- package/dist/types/accountName.d.ts +1 -1
- package/dist/types/accountSubject.d.ts +20 -93
- package/dist/types/agency.d.ts +528 -2924
- package/dist/types/agentKeys.d.ts +48 -421
- package/dist/types/appAssertions.d.ts +56 -210
- package/dist/types/applicationRoles.d.ts +30 -276
- package/dist/types/avatarCharacter.d.ts +1 -1
- package/dist/types/campaignAttribution.d.ts +10 -0
- package/dist/types/civic.d.ts +1 -13
- package/dist/types/client/agentKeys.d.ts +18 -18
- package/dist/types/client/appAssertions.d.ts +3 -3
- package/dist/types/client/campaignAttribution.d.ts +12 -0
- package/dist/types/client/check.d.ts +13 -13
- package/dist/types/client/deviceDirectory.d.ts +51 -51
- package/dist/types/client/deviceSession.d.ts +14 -14
- package/dist/types/client/index.d.ts +3 -0
- package/dist/types/client/language.d.ts +2 -0
- package/dist/types/client/organizations.d.ts +25 -25
- package/dist/types/client/products.d.ts +33 -33
- package/dist/types/client/recommendations.d.ts +2 -2
- package/dist/types/client/safety.d.ts +45 -45
- package/dist/types/client/sessionStatus.d.ts +4 -4
- package/dist/types/client/signIn.d.ts +1 -1
- package/dist/types/commonsSignIn.d.ts +4 -1
- package/dist/types/consoleOnboarding.d.ts +24 -44
- package/dist/types/contentClaims.d.ts +24 -180
- package/dist/types/deviceDirectory.d.ts +109 -1040
- package/dist/types/deviceSession.d.ts +36 -298
- package/dist/types/email/messages.d.ts +212 -1793
- package/dist/types/emailAgentContext.d.ts +10 -194
- package/dist/types/externalIdentity.d.ts +121 -615
- package/dist/types/federationInstanceFetch.d.ts +3 -32
- package/dist/types/identity.d.ts +15 -92
- package/dist/types/identityLink.d.ts +6 -84
- package/dist/types/identityProof.d.ts +5 -17
- package/dist/types/inboxPush.d.ts +1 -9
- package/dist/types/index.d.ts +7 -3
- package/dist/types/inference/accountBilling.d.ts +151 -488
- package/dist/types/inference/aliaModelRelease.d.ts +42 -439
- package/dist/types/inference/attribution.d.ts +75 -104
- package/dist/types/inference/catalogue.d.ts +417 -1599
- package/dist/types/inference/economics.d.ts +69 -276
- package/dist/types/inference/embeddings.d.ts +110 -406
- package/dist/types/inference/entitlement.d.ts +80 -335
- package/dist/types/inference/errors.d.ts +90 -102
- package/dist/types/inference/identifiers.d.ts +12 -4
- package/dist/types/inference/inbox.d.ts +105 -420
- package/dist/types/inference/modelDocumentation.d.ts +201 -1390
- package/dist/types/inference/money.d.ts +65 -32
- package/dist/types/inference/priceVersion.d.ts +53 -120
- package/dist/types/inference/providerConnection.d.ts +253 -710
- package/dist/types/inference/realtime.d.ts +954 -6825
- package/dist/types/inference/request.d.ts +300 -2572
- package/dist/types/inference/routingPolicy.d.ts +95 -503
- package/dist/types/inference/streamEvents.d.ts +253 -721
- package/dist/types/inference/usage.d.ts +317 -950
- package/dist/types/keyRecovery.d.ts +3 -51
- package/dist/types/keyRotation.d.ts +3 -38
- package/dist/types/linkedAccounts.d.ts +50 -236
- package/dist/types/moderationReputation.d.ts +81 -14
- package/dist/types/notifications.d.ts +19 -51
- package/dist/types/numberChecks.d.ts +9 -0
- package/dist/types/oauth.d.ts +101 -809
- package/dist/types/organizations.d.ts +268 -921
- package/dist/types/oxyRecordTypes.d.ts +11 -1
- package/dist/types/products/access.d.ts +125 -775
- package/dist/types/products/billing.d.ts +67 -503
- package/dist/types/products/checkout.d.ts +16 -69
- package/dist/types/products/plans.d.ts +33 -366
- package/dist/types/recommendations.d.ts +76 -389
- package/dist/types/reputation.d.ts +37 -5
- package/dist/types/safety.d.ts +408 -2048
- package/dist/types/serviceToken.d.ts +247 -7
- package/dist/types/sessionRevocation.d.ts +2 -17
- package/dist/types/sessionStatus.d.ts +27 -115
- package/dist/types/signIn.d.ts +62 -553
- package/dist/types/stickers.d.ts +67 -819
- package/dist/types/stringChecks.d.ts +16 -0
- package/dist/types/transparency.d.ts +14 -302
- package/dist/types/updates.d.ts +60 -316
- package/dist/types/userInvalidation.d.ts +4 -13
- package/dist/types/userResponse.d.ts +302 -2400
- package/dist/types/username.d.ts +3 -3
- package/package.json +6 -4
package/dist/cjs/identity.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.exportBundleSchema = exports.exportFinancialSectionSchema = exports.exportUsageReservationSchema = exports.exportLedgerEntrySchema = exports.exportUsageReceiptSchema = exports.exportAttestationSchema = exports.authMethodsResponseSchema = exports.authMethodEntrySchema = exports.domainVerificationInstructionsSchema = exports.resourceDomainOwnershipResponseSchema = exports.resourceDomainOwnershipRequestSchema = exports.domainVerificationRequestSchema = exports.verifiedDomainSchema = exports.signedRecordEnvelopeSchema = exports.didDocumentSchema = exports.didServiceSchema = exports.verificationMethodSchema = void 0;
|
|
4
|
+
const numberChecks_1 = require("./numberChecks");
|
|
5
|
+
const stringChecks_1 = require("./stringChecks");
|
|
2
6
|
/**
|
|
3
7
|
* Self-sovereign identity API contracts.
|
|
4
8
|
*
|
|
@@ -39,8 +43,6 @@
|
|
|
39
43
|
* Platform-agnostic — zod only, no react/react-native/expo. ESM-safe (no
|
|
40
44
|
* `require()`).
|
|
41
45
|
*/
|
|
42
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.exportBundleSchema = exports.exportFinancialSectionSchema = exports.exportUsageReservationSchema = exports.exportLedgerEntrySchema = exports.exportUsageReceiptSchema = exports.exportAttestationSchema = exports.authMethodsResponseSchema = exports.authMethodEntrySchema = exports.domainVerificationInstructionsSchema = exports.resourceDomainOwnershipResponseSchema = exports.resourceDomainOwnershipRequestSchema = exports.domainVerificationRequestSchema = exports.verifiedDomainSchema = exports.signedRecordEnvelopeSchema = exports.didDocumentSchema = exports.didServiceSchema = exports.verificationMethodSchema = void 0;
|
|
44
46
|
const zod_1 = require("zod");
|
|
45
47
|
// The option schemas are left UN-annotated so they keep their concrete
|
|
46
48
|
// `ZodObject` type — `z.discriminatedUnion` requires object options and an
|
|
@@ -83,15 +85,15 @@ exports.signedRecordEnvelopeSchema = zod_1.z
|
|
|
83
85
|
version: zod_1.z.union([zod_1.z.literal(1), zod_1.z.literal(2)]),
|
|
84
86
|
// Open, app-defined category (see the `type` doc above). The Oxy STORE
|
|
85
87
|
// re-narrows to `oxySignedRecordTypeSchema`; an app to its own constant.
|
|
86
|
-
type: zod_1.z.string().
|
|
88
|
+
type: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
87
89
|
subject: zod_1.z.string(),
|
|
88
90
|
issuer: zod_1.z.string(),
|
|
89
|
-
record: zod_1.z.record(zod_1.z.unknown()),
|
|
91
|
+
record: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
90
92
|
issuedAt: zod_1.z.number(),
|
|
91
|
-
seq: zod_1.z.number().
|
|
93
|
+
seq: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).nonnegative().optional(),
|
|
92
94
|
prev: zod_1.z.string().nullable().optional(),
|
|
93
|
-
collection: zod_1.z.string().
|
|
94
|
-
rkey: zod_1.z.string().
|
|
95
|
+
collection: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).optional(),
|
|
96
|
+
rkey: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).optional(),
|
|
95
97
|
publicKey: zod_1.z.string(),
|
|
96
98
|
alg: zod_1.z.literal('ES256K-DER-SHA256'),
|
|
97
99
|
signature: zod_1.z.string(),
|
|
@@ -170,7 +172,7 @@ exports.verifiedDomainSchema = zod_1.z.object({
|
|
|
170
172
|
});
|
|
171
173
|
/** Request body for `POST /identity/domains` — the domain to start verifying. */
|
|
172
174
|
exports.domainVerificationRequestSchema = zod_1.z.object({
|
|
173
|
-
domain: zod_1.z.string().trim().
|
|
175
|
+
domain: zod_1.z.string().trim().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
174
176
|
});
|
|
175
177
|
const resourceOriginHostSchema = zod_1.z
|
|
176
178
|
.string()
|
|
@@ -178,24 +180,24 @@ const resourceOriginHostSchema = zod_1.z
|
|
|
178
180
|
.toLowerCase()
|
|
179
181
|
.pipe(zod_1.z
|
|
180
182
|
.string()
|
|
181
|
-
.
|
|
182
|
-
.
|
|
183
|
+
.check((0, stringChecks_1.utf16MinLength)(1))
|
|
184
|
+
.check((0, stringChecks_1.utf16MaxLength)(253))
|
|
183
185
|
.regex(/^(?!-)[a-z0-9-]{1,63}(?<!-)(?:\.(?!-)[a-z0-9-]{1,63}(?<!-))+$/, 'originHost must be a public DNS hostname without scheme, port or path'));
|
|
184
186
|
/** Clarity resource-server request to bind a site to Oxy domain authority. */
|
|
185
187
|
exports.resourceDomainOwnershipRequestSchema = zod_1.z
|
|
186
188
|
.object({
|
|
187
|
-
accountId: zod_1.z.string().
|
|
188
|
-
verifiedDomainId: zod_1.z.string().
|
|
189
|
+
accountId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(128)),
|
|
190
|
+
verifiedDomainId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(128)),
|
|
189
191
|
originHost: resourceOriginHostSchema,
|
|
190
192
|
})
|
|
191
193
|
.strict();
|
|
192
194
|
exports.resourceDomainOwnershipResponseSchema = zod_1.z
|
|
193
195
|
.object({
|
|
194
196
|
verified: zod_1.z.boolean(),
|
|
195
|
-
accountId: zod_1.z.string().
|
|
196
|
-
verifiedDomainId: zod_1.z.string().
|
|
197
|
+
accountId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(128)),
|
|
198
|
+
verifiedDomainId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(128)),
|
|
197
199
|
originHost: resourceOriginHostSchema,
|
|
198
|
-
verifiedAt: zod_1.z.string().
|
|
200
|
+
verifiedAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()).optional(),
|
|
199
201
|
method: zod_1.z.enum(['dns-txt', 'well-known']).optional(),
|
|
200
202
|
})
|
|
201
203
|
.strict();
|
|
@@ -269,11 +271,11 @@ exports.exportBundleSchema = zod_1.z.object({
|
|
|
269
271
|
exportedAt: zod_1.z.string(),
|
|
270
272
|
did: zod_1.z.string(),
|
|
271
273
|
didDocument: exports.didDocumentSchema,
|
|
272
|
-
profile: zod_1.z.record(zod_1.z.unknown()),
|
|
274
|
+
profile: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
273
275
|
verifiedDomains: zod_1.z.array(exports.verifiedDomainSchema),
|
|
274
276
|
authMethods: zod_1.z.array(exports.authMethodEntrySchema),
|
|
275
277
|
signedRecords: zod_1.z.array(exports.signedRecordEnvelopeSchema),
|
|
276
|
-
appData: zod_1.z.array(zod_1.z.record(zod_1.z.unknown())),
|
|
278
|
+
appData: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())),
|
|
277
279
|
social: zod_1.z.object({
|
|
278
280
|
following: zod_1.z.array(zod_1.z.string()),
|
|
279
281
|
followers: zod_1.z.array(zod_1.z.string()),
|
package/dist/cjs/identityLink.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.identityLinkIdSchema = exports.parseIdentityLinkQrPayload = exports.buildIdentityLinkQrPayload = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = void 0;
|
|
4
|
+
const numberChecks_1 = require("./numberChecks");
|
|
5
|
+
const stringChecks_1 = require("./stringChecks");
|
|
4
6
|
/**
|
|
5
7
|
* Linking Commons to an account without a key (ADR 0029 D3) — the two-device
|
|
6
8
|
* relay.
|
|
@@ -44,16 +46,16 @@ exports.identityLinkIdSchema = zod_1.z
|
|
|
44
46
|
exports.identityLinkCreateResponseSchema = zod_1.z.object({
|
|
45
47
|
linkId: exports.identityLinkIdSchema,
|
|
46
48
|
challenge: zod_1.z.string().regex(identityLink_1.CHALLENGE),
|
|
47
|
-
expiresAt: zod_1.z.number().
|
|
49
|
+
expiresAt: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).positive(),
|
|
48
50
|
qrPayload: zod_1.z.string().startsWith(identityLink_1.IDENTITY_LINK_QR_PREFIX),
|
|
49
51
|
});
|
|
50
52
|
exports.identityLinkStateSchema = zod_1.z.object({
|
|
51
53
|
status: zod_1.z.enum(identityLink_1.IDENTITY_LINK_STATUSES),
|
|
52
|
-
userId: zod_1.z.string().
|
|
54
|
+
userId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
53
55
|
username: zod_1.z.string().nullable(),
|
|
54
56
|
publicKey: zod_1.z.string().nullable(),
|
|
55
|
-
audience: zod_1.z.string().
|
|
56
|
-
expiresAt: zod_1.z.number().
|
|
57
|
+
audience: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
58
|
+
expiresAt: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).positive(),
|
|
57
59
|
});
|
|
58
60
|
/** `POST /identity/link/:linkId/proof` — from Commons, no bearer. */
|
|
59
61
|
exports.identityLinkProofRequestSchema = zod_1.z
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.identityRootStatusSchema = exports.identityProofChallengeResponseSchema = exports.identityProofChallengeRequestSchema = exports.identityProofSchema = exports.IDENTITY_ERROR_CODES = exports.buildIdentityProofMessage = exports.canonicalJson = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_VERSION = void 0;
|
|
4
|
+
const numberChecks_1 = require("./numberChecks");
|
|
5
|
+
const stringChecks_1 = require("./stringChecks");
|
|
4
6
|
/**
|
|
5
7
|
* Identity proof contract — the ONE signed format for operations on a personal root.
|
|
6
8
|
*
|
|
@@ -36,8 +38,8 @@ Object.defineProperty(exports, "IDENTITY_ERROR_CODES", { enumerable: true, get:
|
|
|
36
38
|
exports.identityProofSchema = zod_1.z.object({
|
|
37
39
|
v: zod_1.z.literal(identityProof_1.IDENTITY_PROOF_VERSION),
|
|
38
40
|
challenge: zod_1.z.string().trim().regex(identityProof_1.CHALLENGE, 'challenge must be 64 lowercase hex characters'),
|
|
39
|
-
expiresAt: zod_1.z.number().
|
|
40
|
-
signature: zod_1.z.string().trim().
|
|
41
|
+
expiresAt: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).positive(),
|
|
42
|
+
signature: zod_1.z.string().trim().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(512)),
|
|
41
43
|
});
|
|
42
44
|
/** `POST /identity/proof-challenge` */
|
|
43
45
|
exports.identityProofChallengeRequestSchema = zod_1.z.object({
|
|
@@ -45,8 +47,8 @@ exports.identityProofChallengeRequestSchema = zod_1.z.object({
|
|
|
45
47
|
});
|
|
46
48
|
exports.identityProofChallengeResponseSchema = zod_1.z.object({
|
|
47
49
|
challenge: zod_1.z.string().regex(identityProof_1.CHALLENGE),
|
|
48
|
-
expiresAt: zod_1.z.number().
|
|
49
|
-
audience: zod_1.z.string().
|
|
50
|
+
expiresAt: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).positive(),
|
|
51
|
+
audience: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
50
52
|
});
|
|
51
53
|
exports.identityRootStatusSchema = zod_1.z.object({
|
|
52
54
|
rootLinked: zod_1.z.boolean(),
|
package/dist/cjs/inboxPush.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inboxEmailPushDataSchema = exports.INBOX_EMAIL_PUSH_TYPE = exports.INBOX_EMAIL_PUSH_CHANNEL = void 0;
|
|
4
|
+
const stringChecks_1 = require("./stringChecks");
|
|
2
5
|
/**
|
|
3
6
|
* Canonical contract for Inbox new-mail push notifications.
|
|
4
7
|
*
|
|
@@ -10,8 +13,6 @@
|
|
|
10
13
|
*
|
|
11
14
|
* Platform-agnostic — zod only, no react/react-native/expo.
|
|
12
15
|
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.inboxEmailPushDataSchema = exports.INBOX_EMAIL_PUSH_TYPE = exports.INBOX_EMAIL_PUSH_CHANNEL = void 0;
|
|
15
16
|
const zod_1 = require("zod");
|
|
16
17
|
/** Android notification channel id the new-mail push is sent on. */
|
|
17
18
|
exports.INBOX_EMAIL_PUSH_CHANNEL = 'email';
|
|
@@ -19,6 +20,6 @@ exports.INBOX_EMAIL_PUSH_CHANNEL = 'email';
|
|
|
19
20
|
exports.INBOX_EMAIL_PUSH_TYPE = 'oxy_inbox_new_message';
|
|
20
21
|
exports.inboxEmailPushDataSchema = zod_1.z.object({
|
|
21
22
|
type: zod_1.z.literal(exports.INBOX_EMAIL_PUSH_TYPE),
|
|
22
|
-
messageId: zod_1.z.string().
|
|
23
|
-
mailboxId: zod_1.z.string().
|
|
23
|
+
messageId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
24
|
+
mailboxId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
24
25
|
});
|
package/dist/cjs/index.js
CHANGED
|
@@ -37,9 +37,9 @@ exports.authorizedRouteSchema = exports.effectiveSameModelDeployment = exports.r
|
|
|
37
37
|
exports.realtimeAudioFormatSchema = exports.realtimeResponseIdSchema = exports.realtimeItemIdSchema = exports.realtimeCommandIdSchema = exports.MAX_REALTIME_RESUME_WINDOW_MS = exports.MAX_REALTIME_SESSION_AUDIO_BYTES = exports.MAX_REALTIME_SESSION_DURATION_MS = exports.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH = exports.inferenceStreamEventSchema = exports.inferenceStreamDoneEventSchema = exports.inferenceFinishReasonSchema = exports.inferenceStreamErrorEventSchema = exports.inferenceStreamRouteSwitchEventSchema = exports.inferenceRouteSwitchReasonSchema = exports.inferenceRouteSwitchDetailSchema = exports.inferenceStreamUsageEventSchema = exports.inferenceStreamToolCallEventSchema = exports.inferenceStreamAudioEventSchema = exports.MAX_INFERENCE_AUDIO_BYTES = exports.inferenceAudioMediaTypeSchema = exports.inferenceStreamDeltaEventSchema = exports.inferenceStreamStartEventSchema = exports.inferenceAudioOutputParametersSchema = exports.inferenceSpeechParametersSchema = exports.inferenceRequestSchema = exports.clientRequestMetadataSchema = exports.responseFormatSchema = exports.toolChoiceSchema = exports.toolDefinitionSchema = exports.inferenceReasoningSchema = exports.samplingParametersSchema = exports.inferenceInputSchema = exports.inferenceMessageSchema = exports.inferenceMessageRoleSchema = exports.inferenceToolCallSchema = exports.inferenceContentPartSchema = exports.inferenceContentSourceSchema = exports.modelDocumentationSchema = exports.modelReleaseIngestionResultSchema = exports.modelReleaseIngestionRequestSchema = exports.modelLineDeclarationSchema = exports.modelGpaiDocumentationSchema = exports.modelDownstreamDocumentationSchema = exports.SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS = exports.trainingComputeFlopsSchema = exports.modelSystemicRiskTierSchema = exports.modelDistributionMethodSchema = exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = void 0;
|
|
38
38
|
exports.realtimeServerEventSchema = exports.realtimeSessionClosedEventSchema = exports.realtimeSessionCloseReasonSchema = exports.realtimeErrorEventSchema = exports.realtimeResponseDoneEventSchema = exports.realtimeResponseStatusSchema = exports.realtimeToolCallEventSchema = exports.realtimeTextDeltaEventSchema = exports.realtimeTranscriptDoneEventSchema = exports.realtimeTranscriptDeltaEventSchema = exports.realtimeTranscriptSourceSchema = exports.realtimeOutputAudioDoneEventSchema = exports.realtimeOutputAudioDeltaEventSchema = exports.realtimeResponseCreatedEventSchema = exports.realtimeInputAudioClearedEventSchema = exports.realtimeInputAudioCommittedEventSchema = exports.realtimeSpeechStoppedEventSchema = exports.realtimeSpeechStartedEventSchema = exports.realtimeItemTruncatedEventSchema = exports.realtimeItemDeletedEventSchema = exports.realtimeItemDoneEventSchema = exports.realtimeItemAddedEventSchema = exports.realtimeCommandAcceptedEventSchema = exports.realtimeSessionResumedEventSchema = exports.realtimeSessionUpdatedEventSchema = exports.realtimeSessionCreatedEventSchema = exports.realtimeClientCommandSchema = exports.realtimeSessionCloseCommandSchema = exports.realtimeSessionResumeCommandSchema = exports.realtimeResponseCancelCommandSchema = exports.realtimeResponseCreateCommandSchema = exports.realtimeInputAudioClearCommandSchema = exports.realtimeInputAudioCommitCommandSchema = exports.realtimeInputAudioAppendCommandSchema = exports.realtimeItemTruncateCommandSchema = exports.realtimeItemDeleteCommandSchema = exports.realtimeItemCreateCommandSchema = exports.realtimeSessionUpdateCommandSchema = exports.realtimeResponseParametersSchema = exports.realtimeConversationItemSchema = exports.realtimeContentPartSchema = exports.realtimeSessionRequestSchema = exports.realtimeClientMetadataSchema = exports.realtimeSessionLimitsSchema = exports.realtimeSessionConfigUpdateSchema = exports.realtimeSessionConfigSchema = exports.realtimeTranslationSchema = exports.realtimeInputTranscriptionSchema = exports.realtimeTurnDetectionSchema = exports.realtimeOutputModalitySchema = void 0;
|
|
39
39
|
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 = exports.kaanaCredentialOutcomeRequestSchema = exports.kaanaCredentialRevokeOutcomeRequestSchema = exports.kaanaCredentialRotateOutcomeRequestSchema = exports.kaanaCredentialCreateOutcomeRequestSchema = exports.kaanaCredentialMutationSchema = exports.kaanaCredentialRevokeMutationSchema = exports.kaanaCredentialRotateMutationSchema = exports.kaanaCredentialCreateMutationSchema = exports.kaanaCredentialIdentitySchema = exports.kaanaCredentialOperationActionSchema = exports.kaanaCredentialOperationIdSchema = exports.kaanaCredentialHandleSchema = exports.providerConnectionScopeSchema = exports.usageRefundSchema = exports.usageRefundReasonSchema = exports.usageRefundSubjectSchema = exports.usageReceiptSchema = exports.normalizedUsageReportSchema = exports.inferenceRequestOutcomeSchema = exports.usageReservationSchema = exports.usageReservationStatusSchema = exports.usageReservationRequestSchema = void 0;
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
40
|
+
exports.applicationAgentSchema = exports.applicationAgentWriteSchema = exports.applicationAgentAvailabilitySchema = exports.APPLICATION_AGENT_AVAILABILITIES = exports.agentRequesterCeilingSchema = exports.agentRequesterCeilingWriteSchema = exports.AGENT_REQUESTER_CEILING_AUTONOMY = exports.delegationGrantSchema = exports.capabilityTicketRequestSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.firstPartyTaskInputSchema = exports.firstPartyExecutionAuthorizationInputSchema = 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 = 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 = void 0;
|
|
41
|
+
exports.subjectProductGrantSnapshotSchema = exports.productAccessGrantSchema = exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = 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.CATALOG_INTERNAL_TRANSPORTS = exports.catalogFeatureSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.catalogToolAllowsActor = exports.catalogToolActors = exports.catalogToolActorTypeSchema = exports.CATALOG_TOOL_DEFAULT_ACTORS = exports.CATALOG_TOOL_ACTOR_TYPES = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.invocationPrincipalSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.agentAvailabilitySchema = void 0;
|
|
42
|
+
exports.campaignAttributionSchema = exports.safeNumberCheck = exports.integerCheck = exports.urlCheck = exports.isoDateTime = exports.utf16Length = exports.utf16MaxLength = exports.utf16MinLength = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = exports.productPlanCatalogueSchema = exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = exports.isLoopbackOrigin = exports.inputSatisfiesCapabilityLimits = exports.canonicalCapabilityJson = exports.meteredGenerationSchema = exports.subjectProductAccessSchema = exports.productOfferSegmentSchema = 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; } });
|
|
@@ -792,6 +792,8 @@ Object.defineProperty(exports, "capabilityPackageSchema", { enumerable: true, ge
|
|
|
792
792
|
Object.defineProperty(exports, "actorRefSchema", { enumerable: true, get: function () { return agency_1.actorRefSchema; } });
|
|
793
793
|
Object.defineProperty(exports, "executionActorRefSchema", { enumerable: true, get: function () { return agency_1.executionActorRefSchema; } });
|
|
794
794
|
Object.defineProperty(exports, "foregroundExecutionAuthorizationInputSchema", { enumerable: true, get: function () { return agency_1.foregroundExecutionAuthorizationInputSchema; } });
|
|
795
|
+
Object.defineProperty(exports, "firstPartyExecutionAuthorizationInputSchema", { enumerable: true, get: function () { return agency_1.firstPartyExecutionAuthorizationInputSchema; } });
|
|
796
|
+
Object.defineProperty(exports, "firstPartyTaskInputSchema", { enumerable: true, get: function () { return agency_1.firstPartyTaskInputSchema; } });
|
|
795
797
|
Object.defineProperty(exports, "resourceRefSchema", { enumerable: true, get: function () { return agency_1.resourceRefSchema; } });
|
|
796
798
|
Object.defineProperty(exports, "toolGrantOverrideSchema", { enumerable: true, get: function () { return agency_1.toolGrantOverrideSchema; } });
|
|
797
799
|
Object.defineProperty(exports, "grantLimitSchema", { enumerable: true, get: function () { return agency_1.grantLimitSchema; } });
|
|
@@ -892,9 +894,7 @@ Object.defineProperty(exports, "productPlanCatalogueSchema", { enumerable: true,
|
|
|
892
894
|
__exportStar(require("./products/checkout"), exports);
|
|
893
895
|
__exportStar(require("./organizations"), exports);
|
|
894
896
|
__exportStar(require("./safety"), exports);
|
|
895
|
-
|
|
896
|
-
Object.defineProperty(exports, "serviceTokenScopesSchema", { enumerable: true, get: function () { return serviceToken_1.serviceTokenScopesSchema; } });
|
|
897
|
-
Object.defineProperty(exports, "serviceTokenOptionsSchema", { enumerable: true, get: function () { return serviceToken_1.serviceTokenOptionsSchema; } });
|
|
897
|
+
__exportStar(require("./serviceToken"), exports);
|
|
898
898
|
__exportStar(require("./applicationRoles"), exports);
|
|
899
899
|
__exportStar(require("./contentClaims"), exports);
|
|
900
900
|
__exportStar(require("./appAssertions"), exports);
|
|
@@ -903,3 +903,14 @@ var profileColors_generated_1 = require("./profileColors.generated");
|
|
|
903
903
|
Object.defineProperty(exports, "USER_PROFILE_COLORS", { enumerable: true, get: function () { return profileColors_generated_1.USER_PROFILE_COLORS; } });
|
|
904
904
|
Object.defineProperty(exports, "USER_PROFILE_COLOR_PRESETS", { enumerable: true, get: function () { return profileColors_generated_1.USER_PROFILE_COLOR_PRESETS; } });
|
|
905
905
|
Object.defineProperty(exports, "FREE_USER_PROFILE_COLOR_PRESETS", { enumerable: true, get: function () { return profileColors_generated_1.FREE_USER_PROFILE_COLOR_PRESETS; } });
|
|
906
|
+
var stringChecks_1 = require("./stringChecks");
|
|
907
|
+
Object.defineProperty(exports, "utf16MinLength", { enumerable: true, get: function () { return stringChecks_1.utf16MinLength; } });
|
|
908
|
+
Object.defineProperty(exports, "utf16MaxLength", { enumerable: true, get: function () { return stringChecks_1.utf16MaxLength; } });
|
|
909
|
+
Object.defineProperty(exports, "utf16Length", { enumerable: true, get: function () { return stringChecks_1.utf16Length; } });
|
|
910
|
+
Object.defineProperty(exports, "isoDateTime", { enumerable: true, get: function () { return stringChecks_1.isoDateTime; } });
|
|
911
|
+
Object.defineProperty(exports, "urlCheck", { enumerable: true, get: function () { return stringChecks_1.urlCheck; } });
|
|
912
|
+
var numberChecks_1 = require("./numberChecks");
|
|
913
|
+
Object.defineProperty(exports, "integerCheck", { enumerable: true, get: function () { return numberChecks_1.integerCheck; } });
|
|
914
|
+
Object.defineProperty(exports, "safeNumberCheck", { enumerable: true, get: function () { return numberChecks_1.safeNumberCheck; } });
|
|
915
|
+
var campaignAttribution_1 = require("./campaignAttribution");
|
|
916
|
+
Object.defineProperty(exports, "campaignAttributionSchema", { enumerable: true, get: function () { return campaignAttribution_1.campaignAttributionSchema; } });
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
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 = void 0;
|
|
4
|
+
const numberChecks_1 = require("../numberChecks");
|
|
5
|
+
const stringChecks_1 = require("../stringChecks");
|
|
2
6
|
/**
|
|
3
7
|
* The account-scoped billing surface: who pays, what they hold, what bounds
|
|
4
8
|
* them, and how it reconciles against the payment processor.
|
|
@@ -42,8 +46,6 @@
|
|
|
42
46
|
* Decided in: docs/adr/0014-account-billing-and-entitlements.md,
|
|
43
47
|
* docs/adr/0009-usage-reservation-and-settlement.md.
|
|
44
48
|
*/
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
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 = void 0;
|
|
47
49
|
const zod_1 = require("zod");
|
|
48
50
|
const identifiers_1 = require("./identifiers");
|
|
49
51
|
const money_1 = require("./money");
|
|
@@ -103,8 +105,8 @@ exports.billingProfileSchema = zod_1.z
|
|
|
103
105
|
*/
|
|
104
106
|
creditLimit: money_1.exactDecimalSchema,
|
|
105
107
|
autoRecharge: exports.autoRechargeSchema,
|
|
106
|
-
createdAt: zod_1.z.string().
|
|
107
|
-
updatedAt: zod_1.z.string().
|
|
108
|
+
createdAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
109
|
+
updatedAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
108
110
|
})
|
|
109
111
|
.strict();
|
|
110
112
|
/* -------------------------------------------------------------------------- */
|
|
@@ -169,20 +171,20 @@ exports.billingInvoiceSchema = zod_1.z
|
|
|
169
171
|
.object({
|
|
170
172
|
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
171
173
|
schemaVersion: zod_1.z.literal(1),
|
|
172
|
-
id: zod_1.z.string().
|
|
174
|
+
id: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(64)),
|
|
173
175
|
accountId: identifiers_1.oxyAccountIdSchema,
|
|
174
176
|
currency: money_1.currencyCodeSchema,
|
|
175
|
-
periodStart: zod_1.z.string().
|
|
176
|
-
periodEnd: zod_1.z.string().
|
|
177
|
+
periodStart: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
178
|
+
periodEnd: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
177
179
|
status: exports.billingInvoiceStatusSchema,
|
|
178
180
|
subtotalAmount: money_1.exactDecimalSchema,
|
|
179
181
|
totalAmount: money_1.exactDecimalSchema,
|
|
180
|
-
minorUnitExponent: zod_1.z.number().
|
|
182
|
+
minorUnitExponent: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).min(0).max(4),
|
|
181
183
|
/** The processor's own invoice id, for reconciliation. Never an authority. */
|
|
182
|
-
externalInvoiceRef: zod_1.z.string().
|
|
183
|
-
issuedAt: zod_1.z.string().
|
|
184
|
-
paidAt: zod_1.z.string().
|
|
185
|
-
receiptCount: zod_1.z.number().
|
|
184
|
+
externalInvoiceRef: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(255)).optional(),
|
|
185
|
+
issuedAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()).optional(),
|
|
186
|
+
paidAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()).optional(),
|
|
187
|
+
receiptCount: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).nonnegative().check((0, numberChecks_1.safeNumberCheck)()),
|
|
186
188
|
})
|
|
187
189
|
.strict();
|
|
188
190
|
/* -------------------------------------------------------------------------- */
|
|
@@ -210,16 +212,16 @@ exports.externalPaymentKindSchema = zod_1.z.enum(exports.EXTERNAL_PAYMENT_KINDS)
|
|
|
210
212
|
*/
|
|
211
213
|
exports.externalPaymentSchema = zod_1.z
|
|
212
214
|
.object({
|
|
213
|
-
id: zod_1.z.string().
|
|
215
|
+
id: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(64)),
|
|
214
216
|
accountId: identifiers_1.oxyAccountIdSchema,
|
|
215
217
|
provider: exports.externalPaymentProviderSchema,
|
|
216
218
|
externalKind: exports.externalPaymentKindSchema,
|
|
217
|
-
externalRef: zod_1.z.string().
|
|
219
|
+
externalRef: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(255)),
|
|
218
220
|
amount: money_1.exactDecimalSchema,
|
|
219
221
|
currency: money_1.currencyCodeSchema,
|
|
220
|
-
ledgerEntryId: zod_1.z.string().
|
|
221
|
-
occurredAt: zod_1.z.string().
|
|
222
|
-
createdAt: zod_1.z.string().
|
|
222
|
+
ledgerEntryId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(64)),
|
|
223
|
+
occurredAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
224
|
+
createdAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
223
225
|
})
|
|
224
226
|
.strict();
|
|
225
227
|
/** Lifecycle of one automatic top-up. */
|
|
@@ -237,18 +239,18 @@ exports.autoRechargeAttemptSchema = zod_1.z
|
|
|
237
239
|
.object({
|
|
238
240
|
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
239
241
|
schemaVersion: zod_1.z.literal(1),
|
|
240
|
-
id: zod_1.z.string().
|
|
242
|
+
id: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(64)),
|
|
241
243
|
accountId: identifiers_1.oxyAccountIdSchema,
|
|
242
244
|
currency: money_1.currencyCodeSchema,
|
|
243
245
|
requestedAmount: money_1.exactDecimalSchema,
|
|
244
246
|
/** The spendable balance that triggered it — why this attempt exists. */
|
|
245
247
|
balanceAtTrigger: money_1.exactDecimalSchema,
|
|
246
248
|
status: exports.autoRechargeStatusSchema,
|
|
247
|
-
externalRef: zod_1.z.string().
|
|
249
|
+
externalRef: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(255)).optional(),
|
|
248
250
|
/** The processor's own decline code. Never a free-form message. */
|
|
249
|
-
failureCode: zod_1.z.string().
|
|
250
|
-
createdAt: zod_1.z.string().
|
|
251
|
-
updatedAt: zod_1.z.string().
|
|
251
|
+
failureCode: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(64)).optional(),
|
|
252
|
+
createdAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
253
|
+
updatedAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
252
254
|
})
|
|
253
255
|
.strict();
|
|
254
256
|
/* -------------------------------------------------------------------------- */
|
|
@@ -283,18 +285,18 @@ exports.reconciliationDiscrepancySchema = zod_1.z
|
|
|
283
285
|
.object({
|
|
284
286
|
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
285
287
|
schemaVersion: zod_1.z.literal(1),
|
|
286
|
-
id: zod_1.z.string().
|
|
287
|
-
runId: zod_1.z.string().
|
|
288
|
+
id: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(64)),
|
|
289
|
+
runId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(64)),
|
|
288
290
|
kind: exports.reconciliationDiscrepancyKindSchema,
|
|
289
291
|
accountId: identifiers_1.oxyAccountIdSchema.optional(),
|
|
290
|
-
externalRef: zod_1.z.string().
|
|
291
|
-
ledgerEntryId: zod_1.z.string().
|
|
292
|
+
externalRef: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(255)).optional(),
|
|
293
|
+
ledgerEntryId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(64)).optional(),
|
|
292
294
|
/** What Oxy recorded. Absent for `missing_in_ledger`. */
|
|
293
295
|
ledgerAmount: money_1.exactDecimalSchema.optional(),
|
|
294
296
|
/** What the processor recorded. Absent for `missing_in_external`. */
|
|
295
297
|
externalAmount: money_1.exactDecimalSchema.optional(),
|
|
296
298
|
currency: money_1.currencyCodeSchema,
|
|
297
|
-
createdAt: zod_1.z.string().
|
|
299
|
+
createdAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
298
300
|
})
|
|
299
301
|
.strict();
|
|
300
302
|
/**
|
|
@@ -309,19 +311,19 @@ exports.reconciliationRunSchema = zod_1.z
|
|
|
309
311
|
.object({
|
|
310
312
|
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
311
313
|
schemaVersion: zod_1.z.literal(1),
|
|
312
|
-
id: zod_1.z.string().
|
|
314
|
+
id: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(64)),
|
|
313
315
|
provider: exports.externalPaymentProviderSchema,
|
|
314
316
|
/** Absent for a platform-wide pass. */
|
|
315
317
|
accountId: identifiers_1.oxyAccountIdSchema.optional(),
|
|
316
318
|
currency: money_1.currencyCodeSchema,
|
|
317
|
-
periodStart: zod_1.z.string().
|
|
318
|
-
periodEnd: zod_1.z.string().
|
|
319
|
+
periodStart: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
320
|
+
periodEnd: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
319
321
|
status: exports.reconciliationRunStatusSchema,
|
|
320
322
|
ledgerTotal: money_1.exactDecimalSchema,
|
|
321
323
|
externalTotal: money_1.exactDecimalSchema,
|
|
322
|
-
discrepancyCount: zod_1.z.number().
|
|
323
|
-
startedAt: zod_1.z.string().
|
|
324
|
-
completedAt: zod_1.z.string().
|
|
324
|
+
discrepancyCount: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).nonnegative().check((0, numberChecks_1.safeNumberCheck)()),
|
|
325
|
+
startedAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()),
|
|
326
|
+
completedAt: zod_1.z.string().check((0, stringChecks_1.isoDateTime)()).optional(),
|
|
325
327
|
})
|
|
326
328
|
.strict();
|
|
327
329
|
exports.reconciliationReportSchema = zod_1.z
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = void 0;
|
|
4
|
+
const numberChecks_1 = require("../numberChecks");
|
|
5
|
+
const stringChecks_1 = require("../stringChecks");
|
|
2
6
|
/**
|
|
3
7
|
* The signed Alia model release manifest — the ingestion contract for a
|
|
4
8
|
* first-party model release.
|
|
@@ -82,8 +86,6 @@
|
|
|
82
86
|
* Decided in: docs/adr/0008-catalogue-concept-separation.md,
|
|
83
87
|
* docs/adr/0017-authorized-routes-in-the-envelope.md, issue #972 §12.
|
|
84
88
|
*/
|
|
85
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
86
|
-
exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = void 0;
|
|
87
89
|
const zod_1 = require("zod");
|
|
88
90
|
const catalogue_1 = require("./catalogue");
|
|
89
91
|
const identifiers_1 = require("./identifiers");
|
|
@@ -96,10 +98,10 @@ const identifiers_1 = require("./identifiers");
|
|
|
96
98
|
exports.aliaReleaseArtifactSchema = zod_1.z
|
|
97
99
|
.object({
|
|
98
100
|
/** Path within the release, e.g. `model-00001-of-00004.safetensors`. */
|
|
99
|
-
path: zod_1.z.string().
|
|
101
|
+
path: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(512)),
|
|
100
102
|
digest: identifiers_1.sha256DigestSchema,
|
|
101
|
-
sizeBytes: zod_1.z.number().
|
|
102
|
-
mediaType: zod_1.z.string().
|
|
103
|
+
sizeBytes: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).positive().check((0, numberChecks_1.safeNumberCheck)()),
|
|
104
|
+
mediaType: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(255)).optional(),
|
|
103
105
|
})
|
|
104
106
|
.strict();
|
|
105
107
|
/**
|
|
@@ -128,7 +130,7 @@ exports.aliaReleaseSignatureSchema = zod_1.z
|
|
|
128
130
|
algorithm: zod_1.z.enum(['ed25519']),
|
|
129
131
|
canonicalization: zod_1.z.enum(['jcs']),
|
|
130
132
|
/** Opaque identifier of the public key. Resolving it is undecided. */
|
|
131
|
-
keyId: zod_1.z.string().
|
|
133
|
+
keyId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(256)),
|
|
132
134
|
/**
|
|
133
135
|
* Unpadded base64url. Exactly 86 characters, which is a 64-byte Ed25519
|
|
134
136
|
* signature — the one algorithm above. A second algorithm moves this length
|
|
@@ -153,7 +155,7 @@ exports.aliaModelReleaseManifestSchema = zod_1.z
|
|
|
153
155
|
/** See `version.ts`: an ingestion payload is a whole message on the wire. */
|
|
154
156
|
schemaVersion: zod_1.z.literal(1),
|
|
155
157
|
/** The release's own identity, so ingestion is idempotent on it. */
|
|
156
|
-
releaseId: zod_1.z.string().
|
|
158
|
+
releaseId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(128)),
|
|
157
159
|
issuedAt: identifiers_1.inferenceTimestampSchema,
|
|
158
160
|
/**
|
|
159
161
|
* The revision being released. Carries its OWN `schemaVersion`, like
|
|
@@ -30,15 +30,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
30
30
|
exports.inferenceAttributionSchema = exports.authenticatedPrincipalSchema = exports.billingPrincipalSchema = exports.inferenceScopeSchema = exports.INFERENCE_SCOPES = void 0;
|
|
31
31
|
const zod_1 = require("zod");
|
|
32
32
|
const identifiers_1 = require("./identifiers");
|
|
33
|
-
/**
|
|
34
|
-
* The inference capability scopes the data plane needs to know about.
|
|
35
|
-
*
|
|
36
|
-
* A credential may carry many other Oxy scopes; only these cross the boundary,
|
|
37
|
-
* because the data plane's authorization questions are exactly "may this caller
|
|
38
|
-
* invoke", "may it read the catalogue", "may it read usage", "may it read or
|
|
39
|
-
* write routing", "may it read or write provider connections". Everything else
|
|
40
|
-
* is the control plane's business and is not the data plane's to hold.
|
|
41
|
-
*/
|
|
33
|
+
/** External caller limits recorded by Oxy. First-party instructions carry no scopes. */
|
|
42
34
|
exports.INFERENCE_SCOPES = [
|
|
43
35
|
'inference:invoke',
|
|
44
36
|
'inference:models:read',
|
|
@@ -73,13 +65,23 @@ exports.billingPrincipalSchema = zod_1.z
|
|
|
73
65
|
* envelope; it does not re-derive access from its own database, because it has
|
|
74
66
|
* no account graph to re-derive it from.
|
|
75
67
|
*/
|
|
76
|
-
|
|
68
|
+
const principalIdentity = {
|
|
77
69
|
billing: exports.billingPrincipalSchema,
|
|
78
70
|
applicationId: identifiers_1.oxyApplicationIdSchema,
|
|
79
71
|
credentialId: identifiers_1.oxyCredentialIdSchema,
|
|
80
72
|
environment: identifiers_1.inferenceEnvironmentSchema,
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
};
|
|
74
|
+
/** Oxy has authorized this instruction; the discriminator never grants customer access in Kaana. */
|
|
75
|
+
exports.authenticatedPrincipalSchema = zod_1.z.discriminatedUnion('authority', [
|
|
76
|
+
zod_1.z.object({ ...principalIdentity, authority: zod_1.z.literal('first_party') }).strict(),
|
|
77
|
+
zod_1.z
|
|
78
|
+
.object({
|
|
79
|
+
...principalIdentity,
|
|
80
|
+
authority: zod_1.z.literal('external').optional(),
|
|
81
|
+
inferenceScopes: zod_1.z.array(exports.inferenceScopeSchema),
|
|
82
|
+
})
|
|
83
|
+
.strict(),
|
|
84
|
+
]);
|
|
83
85
|
/**
|
|
84
86
|
* The attribution block carried by every request, receipt and ledger record.
|
|
85
87
|
*
|