@oxy.so/contracts 1.0.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 (147) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +16 -0
  3. package/dist/cjs/.tsbuildinfo +1 -0
  4. package/dist/cjs/accountGraph.js +489 -0
  5. package/dist/cjs/agency.js +439 -0
  6. package/dist/cjs/browserHub.js +215 -0
  7. package/dist/cjs/civic.js +163 -0
  8. package/dist/cjs/commonsSignIn.js +59 -0
  9. package/dist/cjs/deviceBoot.js +50 -0
  10. package/dist/cjs/deviceDirectory.js +189 -0
  11. package/dist/cjs/devicePairing.js +138 -0
  12. package/dist/cjs/deviceSession.js +164 -0
  13. package/dist/cjs/emailAgentContext.js +32 -0
  14. package/dist/cjs/followGraph.js +28 -0
  15. package/dist/cjs/identity.js +258 -0
  16. package/dist/cjs/inboxPush.js +24 -0
  17. package/dist/cjs/index.js +618 -0
  18. package/dist/cjs/inference/accountBilling.js +334 -0
  19. package/dist/cjs/inference/aliaModelRelease.js +262 -0
  20. package/dist/cjs/inference/attribution.js +106 -0
  21. package/dist/cjs/inference/catalogue.js +487 -0
  22. package/dist/cjs/inference/entitlement.js +217 -0
  23. package/dist/cjs/inference/errors.js +309 -0
  24. package/dist/cjs/inference/identifiers.js +224 -0
  25. package/dist/cjs/inference/inbox.js +105 -0
  26. package/dist/cjs/inference/modelDocumentation.js +433 -0
  27. package/dist/cjs/inference/money.js +188 -0
  28. package/dist/cjs/inference/priceVersion.js +110 -0
  29. package/dist/cjs/inference/providerConnection.js +455 -0
  30. package/dist/cjs/inference/request.js +477 -0
  31. package/dist/cjs/inference/routingPolicy.js +318 -0
  32. package/dist/cjs/inference/streamEvents.js +258 -0
  33. package/dist/cjs/inference/usage.js +329 -0
  34. package/dist/cjs/inference/version.js +105 -0
  35. package/dist/cjs/keyRecovery.js +91 -0
  36. package/dist/cjs/keyRotation.js +75 -0
  37. package/dist/cjs/links.js +68 -0
  38. package/dist/cjs/moderationReputation.js +298 -0
  39. package/dist/cjs/oauth.js +66 -0
  40. package/dist/cjs/oxyRecordTypes.js +71 -0
  41. package/dist/cjs/protocol.js +53 -0
  42. package/dist/cjs/recommendations.js +168 -0
  43. package/dist/cjs/reputation.js +297 -0
  44. package/dist/cjs/sessionStatus.js +121 -0
  45. package/dist/cjs/transparency.js +89 -0
  46. package/dist/cjs/updates.js +252 -0
  47. package/dist/cjs/userInvalidation.js +89 -0
  48. package/dist/cjs/userResponse.js +245 -0
  49. package/dist/cjs/username.js +290 -0
  50. package/dist/cjs/webauthn.js +71 -0
  51. package/dist/esm/.tsbuildinfo +1 -0
  52. package/dist/esm/accountGraph.js +480 -0
  53. package/dist/esm/agency.js +436 -0
  54. package/dist/esm/browserHub.js +212 -0
  55. package/dist/esm/civic.js +160 -0
  56. package/dist/esm/commonsSignIn.js +56 -0
  57. package/dist/esm/deviceBoot.js +47 -0
  58. package/dist/esm/deviceDirectory.js +186 -0
  59. package/dist/esm/devicePairing.js +135 -0
  60. package/dist/esm/deviceSession.js +161 -0
  61. package/dist/esm/emailAgentContext.js +29 -0
  62. package/dist/esm/followGraph.js +27 -0
  63. package/dist/esm/identity.js +255 -0
  64. package/dist/esm/inboxPush.js +21 -0
  65. package/dist/esm/index.js +172 -0
  66. package/dist/esm/inference/accountBilling.js +331 -0
  67. package/dist/esm/inference/aliaModelRelease.js +259 -0
  68. package/dist/esm/inference/attribution.js +103 -0
  69. package/dist/esm/inference/catalogue.js +484 -0
  70. package/dist/esm/inference/entitlement.js +214 -0
  71. package/dist/esm/inference/errors.js +306 -0
  72. package/dist/esm/inference/identifiers.js +221 -0
  73. package/dist/esm/inference/inbox.js +102 -0
  74. package/dist/esm/inference/modelDocumentation.js +430 -0
  75. package/dist/esm/inference/money.js +185 -0
  76. package/dist/esm/inference/priceVersion.js +107 -0
  77. package/dist/esm/inference/providerConnection.js +452 -0
  78. package/dist/esm/inference/request.js +474 -0
  79. package/dist/esm/inference/routingPolicy.js +315 -0
  80. package/dist/esm/inference/streamEvents.js +255 -0
  81. package/dist/esm/inference/usage.js +326 -0
  82. package/dist/esm/inference/version.js +102 -0
  83. package/dist/esm/keyRecovery.js +88 -0
  84. package/dist/esm/keyRotation.js +72 -0
  85. package/dist/esm/links.js +65 -0
  86. package/dist/esm/moderationReputation.js +295 -0
  87. package/dist/esm/oauth.js +63 -0
  88. package/dist/esm/oxyRecordTypes.js +68 -0
  89. package/dist/esm/protocol.js +50 -0
  90. package/dist/esm/recommendations.js +165 -0
  91. package/dist/esm/reputation.js +293 -0
  92. package/dist/esm/sessionStatus.js +118 -0
  93. package/dist/esm/transparency.js +86 -0
  94. package/dist/esm/updates.js +249 -0
  95. package/dist/esm/userInvalidation.js +85 -0
  96. package/dist/esm/userResponse.js +240 -0
  97. package/dist/esm/username.js +283 -0
  98. package/dist/esm/webauthn.js +68 -0
  99. package/dist/types/.tsbuildinfo +1 -0
  100. package/dist/types/accountGraph.d.ts +378 -0
  101. package/dist/types/agency.d.ts +2162 -0
  102. package/dist/types/browserHub.d.ts +856 -0
  103. package/dist/types/civic.d.ts +338 -0
  104. package/dist/types/commonsSignIn.d.ts +58 -0
  105. package/dist/types/deviceBoot.d.ts +74 -0
  106. package/dist/types/deviceDirectory.d.ts +1317 -0
  107. package/dist/types/devicePairing.d.ts +130 -0
  108. package/dist/types/deviceSession.d.ts +411 -0
  109. package/dist/types/emailAgentContext.d.ts +248 -0
  110. package/dist/types/followGraph.d.ts +150 -0
  111. package/dist/types/identity.d.ts +402 -0
  112. package/dist/types/inboxPush.d.ts +30 -0
  113. package/dist/types/index.d.ts +100 -0
  114. package/dist/types/inference/accountBilling.d.ts +738 -0
  115. package/dist/types/inference/aliaModelRelease.d.ts +609 -0
  116. package/dist/types/inference/attribution.d.ts +176 -0
  117. package/dist/types/inference/catalogue.d.ts +1618 -0
  118. package/dist/types/inference/entitlement.d.ts +519 -0
  119. package/dist/types/inference/errors.d.ts +242 -0
  120. package/dist/types/inference/identifiers.d.ts +182 -0
  121. package/dist/types/inference/inbox.d.ts +374 -0
  122. package/dist/types/inference/modelDocumentation.d.ts +1603 -0
  123. package/dist/types/inference/money.d.ts +185 -0
  124. package/dist/types/inference/priceVersion.d.ts +182 -0
  125. package/dist/types/inference/providerConnection.d.ts +968 -0
  126. package/dist/types/inference/request.d.ts +2800 -0
  127. package/dist/types/inference/routingPolicy.d.ts +616 -0
  128. package/dist/types/inference/streamEvents.d.ts +950 -0
  129. package/dist/types/inference/usage.d.ts +1164 -0
  130. package/dist/types/inference/version.d.ts +102 -0
  131. package/dist/types/keyRecovery.d.ts +138 -0
  132. package/dist/types/keyRotation.d.ts +103 -0
  133. package/dist/types/links.d.ts +96 -0
  134. package/dist/types/moderationReputation.d.ts +487 -0
  135. package/dist/types/oauth.d.ts +86 -0
  136. package/dist/types/oxyRecordTypes.d.ts +62 -0
  137. package/dist/types/protocol.d.ts +86 -0
  138. package/dist/types/recommendations.d.ts +542 -0
  139. package/dist/types/reputation.d.ts +457 -0
  140. package/dist/types/sessionStatus.d.ts +231 -0
  141. package/dist/types/transparency.d.ts +392 -0
  142. package/dist/types/updates.d.ts +545 -0
  143. package/dist/types/userInvalidation.d.ts +94 -0
  144. package/dist/types/userResponse.d.ts +1706 -0
  145. package/dist/types/username.d.ts +265 -0
  146. package/dist/types/webauthn.d.ts +77 -0
  147. package/package.json +87 -0
@@ -0,0 +1,402 @@
1
+ /**
2
+ * Self-sovereign identity API contracts.
3
+ *
4
+ * SINGLE SOURCE OF TRUTH for the wire shape of Oxy's AtProto/Bluesky-flavoured
5
+ * identity & portability layer: the W3C DID document the API derives on demand,
6
+ * the signed-record envelope clients sign with their cryptographic key (and the
7
+ * server verifies), the verified-domain badge, the auth-method ↔ DID
8
+ * verification-method mapping, and the signed data-export ("credible exit")
9
+ * bundle. The API validates its OUTPUT against these schemas; every consumer
10
+ * (the Commons vault app, `@oxy.so/core`'s identity mixin) validates its INPUT
11
+ * against the same definitions, so producer and consumers cannot drift.
12
+ *
13
+ * Design anchors (from the identity-layer plan):
14
+ * - DID = `did:web:oxy.so:u:<userId>` — anchored on the stable account id, NOT
15
+ * the keypair. The keypair is a *verification method* that maps 1:1 to the
16
+ * existing `authMethods[]`. Custodial (password-only) users get a DID
17
+ * controlled solely by Oxy (`OXY_DID`); creating a Commons key upgrades them
18
+ * to self-sovereign (`controller = [userDid, OXY_DID]`); fully reversible.
19
+ * - Verification methods use the secp256k1 `EcdsaSecp256k1VerificationKey2019`
20
+ * type with `publicKeyHex` for now (a `Multikey`/`publicKeyMultibase` form may
21
+ * be added later — see the plan's open risks).
22
+ * - Signed records carry an envelope whose signing input is the canonical-JSON
23
+ * of every field EXCEPT `publicKey` and `signature`; `alg` is
24
+ * `ES256K-DER-SHA256` (secp256k1 over the SHA-256 of the canonical bytes,
25
+ * DER-encoded signature) — the same scheme `SignatureService` uses.
26
+ *
27
+ * Explicit-`interface` exports (DidDocument, SignedRecordEnvelope, ExportBundle,
28
+ * VerifiedDomain, AuthMethodsResponse and their sub-parts) follow the same
29
+ * rationale as `UserNameResponse` in `./userResponse`: a `z.infer<>` of a nested
30
+ * object schema can degrade under a consumer's `moduleResolution: "node"`
31
+ * (node10) resolution, so the load-bearing response shapes are declared as
32
+ * literal interfaces and the runtime schemas are annotated `z.ZodType<Interface>`
33
+ * — the emitted `.d.ts` then states the field types verbatim and survives BOTH
34
+ * `node` and `bundler` resolution. Request schemas (no nested-object hazard) are
35
+ * inferred via `z.infer<>`.
36
+ *
37
+ * Platform-agnostic — zod only, no react/react-native/expo. ESM-safe (no
38
+ * `require()`).
39
+ */
40
+ import { z } from 'zod';
41
+ /**
42
+ * A `EcdsaSecp256k1VerificationKey2019` verification method — the canonical Oxy
43
+ * key form. Mirrors the secp256k1 key entries the API derives from
44
+ * `User.publicKey` + each `authMethods[]` of type `identity`. `id` is a fragment
45
+ * reference within the DID document (e.g. `did:web:oxy.so:u:<id>#key-1`);
46
+ * `controller` is the controlling DID; `publicKeyHex` is the (uncompressed)
47
+ * secp256k1 public key in hex.
48
+ */
49
+ export interface Secp256k1VerificationMethod {
50
+ id: string;
51
+ type: 'EcdsaSecp256k1VerificationKey2019';
52
+ controller: string;
53
+ publicKeyHex: string;
54
+ }
55
+ /**
56
+ * A `Multikey` verification method — the AtProto/Bluesky key form. The SAME
57
+ * secp256k1 key as an account's {@link Secp256k1VerificationMethod}, re-encoded
58
+ * the way atproto expects: `publicKeyMultibase` is the `did:key`-style multibase
59
+ * (`base58btc`, leading `z`) of the multicodec-prefixed (`0xe7 0x01`, secp256k1)
60
+ * COMPRESSED public key. This is the verification method a foreign Bluesky
61
+ * AppView reads when it routes to the user's bridge PDS; it is additive and only
62
+ * present for atproto-bridged self-sovereign accounts.
63
+ */
64
+ export interface MultikeyVerificationMethod {
65
+ id: string;
66
+ type: 'Multikey';
67
+ controller: string;
68
+ publicKeyMultibase: string;
69
+ }
70
+ /**
71
+ * A single DID verification method — either the canonical Oxy secp256k1 form
72
+ * ({@link Secp256k1VerificationMethod}) or the atproto `Multikey` form
73
+ * ({@link MultikeyVerificationMethod}). Discriminated on `type`, so an
74
+ * `EcdsaSecp256k1VerificationKey2019` entry keeps its exact `publicKeyHex` shape
75
+ * (every document already served verifies byte-identically) and the `Multikey`
76
+ * entry carries `publicKeyMultibase`.
77
+ */
78
+ export type VerificationMethod = Secp256k1VerificationMethod | MultikeyVerificationMethod;
79
+ export declare const verificationMethodSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
80
+ id: z.ZodString;
81
+ type: z.ZodLiteral<"EcdsaSecp256k1VerificationKey2019">;
82
+ controller: z.ZodString;
83
+ publicKeyHex: z.ZodString;
84
+ }, "strip", z.ZodTypeAny, {
85
+ type: "EcdsaSecp256k1VerificationKey2019";
86
+ id: string;
87
+ controller: string;
88
+ publicKeyHex: string;
89
+ }, {
90
+ type: "EcdsaSecp256k1VerificationKey2019";
91
+ id: string;
92
+ controller: string;
93
+ publicKeyHex: string;
94
+ }>, z.ZodObject<{
95
+ id: z.ZodString;
96
+ type: z.ZodLiteral<"Multikey">;
97
+ controller: z.ZodString;
98
+ publicKeyMultibase: z.ZodString;
99
+ }, "strip", z.ZodTypeAny, {
100
+ type: "Multikey";
101
+ id: string;
102
+ controller: string;
103
+ publicKeyMultibase: string;
104
+ }, {
105
+ type: "Multikey";
106
+ id: string;
107
+ controller: string;
108
+ publicKeyMultibase: string;
109
+ }>]>;
110
+ /**
111
+ * A DID service entry (the `service[]` array). Oxy publishes its API root and
112
+ * profile endpoints here so a resolver can discover where to fetch the user's
113
+ * data. `serviceEndpoint` is a URL string.
114
+ */
115
+ export interface DidService {
116
+ id: string;
117
+ type: string;
118
+ serviceEndpoint: string;
119
+ }
120
+ export declare const didServiceSchema: z.ZodType<DidService>;
121
+ /**
122
+ * A W3C DID document derived on demand by the API (no stored document).
123
+ *
124
+ * - `controller` is `[userDid, OXY_DID]` for a self-sovereign account (it holds
125
+ * at least one `identity` verification method) or `[OXY_DID]` for a custodial
126
+ * (password-only) account.
127
+ * - `verificationMethod[]` is composed from the account's secp256k1 keys.
128
+ * - `authentication` / `assertionMethod` reference verification-method ids.
129
+ * - `alsoKnownAs[]` carries the account's other identifiers (`acct:` handle,
130
+ * profile URL, any verified-domain URLs).
131
+ */
132
+ export interface DidDocument {
133
+ '@context': string[];
134
+ id: string;
135
+ controller: string[];
136
+ verificationMethod: VerificationMethod[];
137
+ authentication: string[];
138
+ assertionMethod: string[];
139
+ alsoKnownAs: string[];
140
+ service: DidService[];
141
+ }
142
+ export declare const didDocumentSchema: z.ZodType<DidDocument>;
143
+ /**
144
+ * A signed record envelope. `record` is the arbitrary payload; the signing
145
+ * input is the canonical-JSON of every envelope field EXCEPT `publicKey` and
146
+ * `signature`. `subject` and `issuer` are DIDs (the subject the record is about
147
+ * and the signer's DID — equal for self-issued records, `OXY_DID` for a
148
+ * custodial provenance attestation). `issuedAt` is epoch milliseconds.
149
+ *
150
+ * ## `type` — open by design
151
+ *
152
+ * `type` is an OPEN, non-empty string: it is the application-defined category of
153
+ * the record (e.g. Oxy's `identity`/`profile`/civic types, or `app.mention.*`'s
154
+ * `app_record`). The base envelope is app-agnostic, so it cannot enumerate every
155
+ * app's record categories — each app re-narrows `type` to its own closed set on
156
+ * the way INTO its own store (Oxy via {@link OxySignedRecordType}; an app via
157
+ * its own constant). Widening `type` from a closed enum to a string is
158
+ * canonical-bytes-safe: {@link signedRecordSigningInput} serializes `type` as the
159
+ * same JSON string either way, so every record already signed in production
160
+ * verifies byte-for-byte.
161
+ *
162
+ * ## Versioning
163
+ *
164
+ * - **v1** is the original shape (`{version, type, subject, issuer, record,
165
+ * issuedAt}` + `publicKey/alg/signature`). It carries NONE of the v2 chain
166
+ * fields and remains accepted unchanged — every `identity`/`profile` record
167
+ * already in production verifies byte-identically.
168
+ * - **v2** adds a per-subject hash-chain (an append-only "personal blockchain"
169
+ * of a single signer, no consensus/mining). The four chain fields are part of
170
+ * the signed bytes (so the chain cannot be forged):
171
+ * - `seq` — strictly-increasing sequence number per subject.
172
+ * - `prev` — the `recordId` (content address) of the previous record in this
173
+ * subject's chain, or `null` at genesis.
174
+ * - `collection` + `rkey` — an AtProto-style record key (e.g.
175
+ * `collection: 'app.oxy.identity'`, `rkey: 'self'`) used for
176
+ * materialization and last-writer-wins reconciliation.
177
+ *
178
+ * The chain fields are OPTIONAL on the interface so v1 envelopes (which omit
179
+ * them) still type-check; the schema enforces "present iff version === 2".
180
+ */
181
+ export interface SignedRecordEnvelope {
182
+ version: 1 | 2;
183
+ /** App-defined record category (open string); each store re-narrows it. */
184
+ type: string;
185
+ subject: string;
186
+ issuer: string;
187
+ record: Record<string, unknown>;
188
+ issuedAt: number;
189
+ /** v2 only: strictly-increasing sequence number for this subject's chain. */
190
+ seq?: number;
191
+ /** v2 only: `recordId` of the previous record in the chain, `null` at genesis. */
192
+ prev?: string | null;
193
+ /** v2 only: AtProto-style collection namespace (e.g. `app.oxy.identity`). */
194
+ collection?: string;
195
+ /** v2 only: AtProto-style record key within the collection (e.g. `self`). */
196
+ rkey?: string;
197
+ publicKey: string;
198
+ alg: 'ES256K-DER-SHA256';
199
+ signature: string;
200
+ }
201
+ export declare const signedRecordEnvelopeSchema: z.ZodType<SignedRecordEnvelope>;
202
+ /**
203
+ * A proven domain ownership badge. `method` records how ownership was proven —
204
+ * a DNS-TXT record (`_oxy-identity.<domain>`) or a `/.well-known/oxy-domain`
205
+ * HTTP file. `verifiedAt` is a string on the wire (ISO timestamp) but accepts a
206
+ * `Date` so the API can validate its own pre-serialization model objects.
207
+ */
208
+ export interface VerifiedDomain {
209
+ domain: string;
210
+ verifiedAt: string | Date;
211
+ method: 'dns-txt' | 'well-known';
212
+ }
213
+ export declare const verifiedDomainSchema: z.ZodType<VerifiedDomain>;
214
+ /** Request body for `POST /identity/domains` — the domain to start verifying. */
215
+ export declare const domainVerificationRequestSchema: z.ZodObject<{
216
+ domain: z.ZodString;
217
+ }, "strip", z.ZodTypeAny, {
218
+ domain: string;
219
+ }, {
220
+ domain: string;
221
+ }>;
222
+ export type DomainVerificationRequest = z.infer<typeof domainVerificationRequestSchema>;
223
+ /**
224
+ * The instructions the API returns when a domain verification is requested. The
225
+ * caller may prove ownership EITHER by publishing the `dns` TXT record OR by
226
+ * serving the `wellKnown` file; either path then satisfies
227
+ * `POST /identity/domains/:domain/verify`.
228
+ */
229
+ export declare const domainVerificationInstructionsSchema: z.ZodObject<{
230
+ domain: z.ZodString;
231
+ token: z.ZodString;
232
+ dns: z.ZodObject<{
233
+ name: z.ZodString;
234
+ value: z.ZodString;
235
+ }, "strip", z.ZodTypeAny, {
236
+ value: string;
237
+ name: string;
238
+ }, {
239
+ value: string;
240
+ name: string;
241
+ }>;
242
+ wellKnown: z.ZodObject<{
243
+ url: z.ZodString;
244
+ body: z.ZodString;
245
+ }, "strip", z.ZodTypeAny, {
246
+ url: string;
247
+ body: string;
248
+ }, {
249
+ url: string;
250
+ body: string;
251
+ }>;
252
+ }, "strip", z.ZodTypeAny, {
253
+ domain: string;
254
+ token: string;
255
+ dns: {
256
+ value: string;
257
+ name: string;
258
+ };
259
+ wellKnown: {
260
+ url: string;
261
+ body: string;
262
+ };
263
+ }, {
264
+ domain: string;
265
+ token: string;
266
+ dns: {
267
+ value: string;
268
+ name: string;
269
+ };
270
+ wellKnown: {
271
+ url: string;
272
+ body: string;
273
+ };
274
+ }>;
275
+ export type DomainVerificationInstructions = z.infer<typeof domainVerificationInstructionsSchema>;
276
+ /**
277
+ * One linked authentication method. Mirrors a `User.authMethods[]` entry.
278
+ * `verificationMethodId` is present for `identity` methods (a key), linking the
279
+ * auth method to its DID verification-method fragment. For `webauthn` methods
280
+ * `credentialId` identifies the specific passkey (one entry per registered
281
+ * credential) and `name` is its user-facing label; a passkey is NOT a DID
282
+ * verification method, so it carries no `verificationMethodId` (a passkey-only
283
+ * account stays custodial).
284
+ */
285
+ export interface AuthMethodEntry {
286
+ type: 'identity' | 'webauthn';
287
+ linkedAt: string | Date;
288
+ verificationMethodId?: string;
289
+ credentialId?: string;
290
+ name?: string;
291
+ }
292
+ export declare const authMethodEntrySchema: z.ZodType<AuthMethodEntry>;
293
+ /**
294
+ * Wire shape of `GET /auth/methods` — the account's DID plus every linked
295
+ * authentication method.
296
+ */
297
+ export interface AuthMethodsResponse {
298
+ did: string;
299
+ methods: AuthMethodEntry[];
300
+ }
301
+ export declare const authMethodsResponseSchema: z.ZodType<AuthMethodsResponse>;
302
+ /**
303
+ * A cryptographic attestation over the canonical-JSON of an export bundle.
304
+ * Reused for both the mandatory Oxy provenance `attestation` (signed with the
305
+ * Oxy custodial key) and the optional client `proof` (signed with the user's
306
+ * own key when they hold one). `signedAt` is epoch milliseconds.
307
+ */
308
+ export interface ExportAttestation {
309
+ issuer: string;
310
+ publicKey: string;
311
+ alg: 'ES256K-DER-SHA256';
312
+ signature: string;
313
+ signedAt: number;
314
+ }
315
+ export declare const exportAttestationSchema: z.ZodType<ExportAttestation>;
316
+ /**
317
+ * One settled charge, as the account it was charged to may take it away.
318
+ *
319
+ * Amounts are EXACT DECIMAL STRINGS, never numbers — the same rule the ledger
320
+ * itself follows. A JSON number cannot represent `0.000000700000` and a bill a
321
+ * customer re-adds must reproduce the figure Oxy charged.
322
+ */
323
+ export interface ExportUsageReceipt {
324
+ receiptId: string;
325
+ requestId: string;
326
+ settledAt: string;
327
+ billedAmount: string;
328
+ currency: string;
329
+ outcome: string;
330
+ resolvedModelReference: string;
331
+ servingProvider: string;
332
+ /** True when the charge is Oxy's fee on a BYOK request, not the model cost. */
333
+ platformFeeOnly: boolean;
334
+ }
335
+ export declare const exportUsageReceiptSchema: z.ZodType<ExportUsageReceipt>;
336
+ /** One entry in the account's own journal. */
337
+ export interface ExportLedgerEntry {
338
+ entryId: string;
339
+ kind: string;
340
+ currency: string;
341
+ createdAt: string;
342
+ }
343
+ export declare const exportLedgerEntrySchema: z.ZodType<ExportLedgerEntry>;
344
+ /** One hold: money that was neither spent nor returned at the time it was taken. */
345
+ export interface ExportUsageReservation {
346
+ reservationId: string;
347
+ requestId: string;
348
+ status: string;
349
+ reservedAmount: string;
350
+ currency: string;
351
+ createdAt: string;
352
+ expiresAt: string;
353
+ }
354
+ export declare const exportUsageReservationSchema: z.ZodType<ExportUsageReservation>;
355
+ /**
356
+ * What the account was charged, in the subject-access export (#972 section 12).
357
+ *
358
+ * Scoped to the CALLING user's own account and read-only. It exists because a
359
+ * person exercising a subject-access request previously learned nothing about
360
+ * what they had been charged unless they also happened to be an account
361
+ * administrator hitting the enterprise reporting route — the deletion side of
362
+ * that checkbox preserved financial records the export then never disclosed.
363
+ *
364
+ * Empty arrays are the normal answer, and mean the account has no ledger history
365
+ * rather than that anything was withheld.
366
+ */
367
+ export interface ExportFinancialSection {
368
+ receipts: ExportUsageReceipt[];
369
+ ledgerEntries: ExportLedgerEntry[];
370
+ reservations: ExportUsageReservation[];
371
+ }
372
+ export declare const exportFinancialSectionSchema: z.ZodType<ExportFinancialSection>;
373
+ /**
374
+ * The signed, open-format data-export bundle from `GET /users/me/export`. A
375
+ * portable snapshot of the account: its DID document, profile, verified
376
+ * domains, auth methods (no secrets), published signed records, per-app data,
377
+ * social graph, and what the account was charged.
378
+ *
379
+ * `attestation` is the Oxy custodial provenance signature. It is `null` only
380
+ * when the Oxy custodial signing key (`OXY_PRIVATE_KEY`) is unset (dev /
381
+ * pre-prod); in production it is always present. Carries an optional client
382
+ * `proof` when the user signed the bundle with their own key.
383
+ */
384
+ export interface ExportBundle {
385
+ '$schema': string;
386
+ exportedAt: string;
387
+ did: string;
388
+ didDocument: DidDocument;
389
+ profile: Record<string, unknown>;
390
+ verifiedDomains: VerifiedDomain[];
391
+ authMethods: AuthMethodEntry[];
392
+ signedRecords: SignedRecordEnvelope[];
393
+ appData: Record<string, unknown>[];
394
+ social: {
395
+ following: string[];
396
+ followers: string[];
397
+ };
398
+ financial: ExportFinancialSection;
399
+ attestation: ExportAttestation | null;
400
+ proof?: ExportAttestation;
401
+ }
402
+ export declare const exportBundleSchema: z.ZodType<ExportBundle>;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Canonical contract for Inbox new-mail push notifications.
3
+ *
4
+ * The Android channel id and payload `type` are wire contracts: Android 8+
5
+ * drops a notification whose channel the app has not created, and the client
6
+ * only routes taps it recognises. Two hand-typed copies of either string fail as
7
+ * "the notification never arrived" or "tapping does nothing" — the hardest push
8
+ * symptoms to diagnose.
9
+ *
10
+ * Platform-agnostic — zod only, no react/react-native/expo.
11
+ */
12
+ import { z } from 'zod';
13
+ /** Android notification channel id the new-mail push is sent on. */
14
+ export declare const INBOX_EMAIL_PUSH_CHANNEL = "email";
15
+ /** Runtime type discriminator of the new-mail push payload. */
16
+ export declare const INBOX_EMAIL_PUSH_TYPE = "oxy_inbox_new_message";
17
+ export declare const inboxEmailPushDataSchema: z.ZodObject<{
18
+ type: z.ZodLiteral<"oxy_inbox_new_message">;
19
+ messageId: z.ZodString;
20
+ mailboxId: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ type: "oxy_inbox_new_message";
23
+ mailboxId: string;
24
+ messageId: string;
25
+ }, {
26
+ type: "oxy_inbox_new_message";
27
+ mailboxId: string;
28
+ messageId: string;
29
+ }>;
30
+ export type InboxEmailPushData = z.infer<typeof inboxEmailPushDataSchema>;
@@ -0,0 +1,100 @@
1
+ /**
2
+ * @oxy.so/contracts — single source of truth for API request/response contracts.
3
+ *
4
+ * Zod schemas plus their inferred types, shared by the backend (`@oxy.so/api`)
5
+ * and the client SDKs (`@oxy.so/core`, `@oxy.so/services`). The
6
+ * producer validates its output and every consumer validates its input against
7
+ * exactly the same definitions, so the wire shape cannot drift.
8
+ *
9
+ * Platform-agnostic — zod is the only runtime dependency. No react/react-native/
10
+ * expo, no `require()` in the ESM build.
11
+ */
12
+ export { ACCOUNT_KINDS, accountKindSchema, CHILD_ACCOUNT_KINDS, childAccountKindSchema, isAccountKind, isDelegatedActAsEligibleKind, isOperatorSwitchTargetKind, ACCOUNT_CATEGORY_IDS, ACCOUNT_CATEGORY_KINDS, accountCategoriesSchema, accountCategoryIdSchema, isSelectableAccountCategoryId, kindAcceptsAccountCategories, MAX_ACCOUNT_CATEGORIES, newlyAddedRetiredCategories, RETIRED_ACCOUNT_CATEGORY_IDS, SELECTABLE_ACCOUNT_CATEGORY_IDS, createAccountRequestSchema, } from './accountGraph';
13
+ export type { AccountKind, AccountCategoryId, AccountCategoryKind, ChildAccountKind, CreateAccountRequest, } from './accountGraph';
14
+ export { usernameSchema, usernameSchemaForAccountKind, isValidUsername, stripDisallowedUsernameCharacters, applyBotUsernameSuffix, USERNAME_MIN_LENGTH, USERNAME_MAX_LENGTH, USERNAME_INVALID_MESSAGE, BOT_USERNAME_INVALID_MESSAGE, } from './username';
15
+ export { userNameSchema, userRelationshipSchema, themePreferenceSchema, userResponseSchema, userProfileUpdateSchema, currentUserResponseSchema, deviceLinkedSessionSchema, deviceLinkedSessionsResponseSchema, resolveUserId, safeParseContract, } from './userResponse';
16
+ export type { UserNameResponse, UserRelationship, ThemePreference, UserResponse, UserProfileUpdate, CurrentUserResponseContract, DeviceLinkedSessionResponse, DeviceLinkedSessionsResponseContract, } from './userResponse';
17
+ export { applicationTypeSchema, publicApplicationSchema, sessionStatusSchema, } from './sessionStatus';
18
+ export type { ApplicationTypeContract, PublicApplicationResponse, SessionStatusResponse, } from './sessionStatus';
19
+ export { COMMONS_DENY_REASONS, commonsDenyReasonSchema, IDENTITY_APPROVAL_PUSH_CHANNEL, } from './commonsSignIn';
20
+ export type { CommonsDenyReason } from './commonsSignIn';
21
+ export { INBOX_EMAIL_PUSH_CHANNEL, INBOX_EMAIL_PUSH_TYPE, inboxEmailPushDataSchema, } from './inboxPush';
22
+ export type { InboxEmailPushData } from './inboxPush';
23
+ export { OXY_USER_INVALIDATION_CHANNEL, OXY_USER_CHANGE_REASONS, OXY_PUBLISHED_USER_CHANGE_REASONS, isPublishedOxyUserChangeReason, oxyUserInvalidationEventSchema, } from './userInvalidation';
24
+ export type { OxyUserChangeReason, PublishedOxyUserChangeReason, OxyUserInvalidationEvent, } from './userInvalidation';
25
+ export { recommendationExcludeTypeSchema, recommendationBoostSchema, recommendationSignalWeightsSchema, recommendationRequestSchema, recommendationCountSchema, recommendationItemSchema, recommendationResponseSchema, appEndorsementInputSchema, appInterestInputSchema, appUserSignalIngestSchema, appAffinityEventTypeSchema, appAffinityEventSchema, appAffinityEventsIngestSchema, } from './recommendations';
26
+ export type { RecommendationExcludeType, RecommendationBoost, RecommendationSignalWeights, RecommendationRequest, RecommendationCount, RecommendationItem, RecommendationResponse, AppEndorsementInput, AppInterestInput, AppUserSignalIngest, AppAffinityEventType, AppAffinityEvent, AppAffinityEventsIngest, } from './recommendations';
27
+ export { verificationMethodSchema, didServiceSchema, didDocumentSchema, signedRecordEnvelopeSchema, verifiedDomainSchema, domainVerificationRequestSchema, domainVerificationInstructionsSchema, authMethodEntrySchema, authMethodsResponseSchema, exportAttestationSchema, exportUsageReceiptSchema, exportLedgerEntrySchema, exportUsageReservationSchema, exportFinancialSectionSchema, exportBundleSchema, } from './identity';
28
+ export type { VerificationMethod, Secp256k1VerificationMethod, MultikeyVerificationMethod, DidService, DidDocument, SignedRecordEnvelope, VerifiedDomain, DomainVerificationRequest, DomainVerificationInstructions, AuthMethodEntry, AuthMethodsResponse, ExportAttestation, ExportUsageReceipt, ExportLedgerEntry, ExportUsageReservation, ExportFinancialSection, ExportBundle, } from './identity';
29
+ export { oxySignedRecordTypeSchema, } from './oxyRecordTypes';
30
+ export type { OxySignedRecordType } from './oxyRecordTypes';
31
+ export { chainHeadResponseSchema, logPageResponseSchema, } from './protocol';
32
+ export type { LexiconRecord, ChainHeadResponse, LogPageResponse } from './protocol';
33
+ export { publicCardSchema, signedPublicCardSchema, realLifeAttestationRecordSchema, realLifeAttestationResultSchema, validationVerdictRecordSchema, validationOpenRequestSchema, validationOpenResultSchema, validationRequestSummarySchema, validationVoteResultSchema, personhoodVouchRecordSchema, personhoodBreakdownSchema, personhoodStatusResultSchema, vouchResultSchema, credentialRecordSchema, verifiableCredentialResponseSchema, credentialIssueResultSchema, credentialListResultSchema, credentialVerifyResultSchema, } from './civic';
34
+ export type { CardTrustTier, PersonhoodStatus, PublicCard, SignedPublicCard, RealLifeAttestationRecord, RealLifeAttestationResult, ValidationVerdict, ValidationRequestStatus, ValidationVerdictRecord, ValidationOpenRequest, ValidationOpenResult, ValidationRequestSummary, ValidationVoteResult, PersonhoodVouchRecord, PersonhoodBreakdown, PersonhoodStatusResult, VouchResult, CredentialStatus, CredentialRecord, VerifiableCredentialResponse, CredentialIssueResult, CredentialListResult, CredentialVerifyResult, } from './civic';
35
+ export { REPUTATION_CATEGORIES, REPUTATION_TRANSACTION_STATUSES, TRUST_TIERS, REPUTATION_TARGET_ENTITY_TYPES, REPUTATION_DISPUTE_STATUSES, REPUTATION_INFLUENCE_CONTEXTS, reputationCategorySchema, reputationTransactionStatusSchema, trustTierSchema, reputationTargetEntityTypeSchema, reputationDisputeStatusSchema, reputationInfluenceContextSchema, reputationTransactionSchema, reputationBalanceBreakdownSchema, reputationInfluenceSchema, reputationReliabilitySchema, reputationBalanceSummarySchema, reputationBalanceSchema, reputationDisputeSchema, reputationRuleSchema, reputationLeaderboardUserSchema, reputationLeaderboardEntrySchema, reputationInfluenceResultSchema, reverseReputationTransactionResultSchema, awardReputationSchema, createReputationDisputeSchema, resolveReputationDisputeSchema, upsertReputationRuleSchema, reverseReputationTransactionSchema, isFullReputationBalance, } from './reputation';
36
+ export type { ReputationCategory, ReputationTransactionStatus, TrustTier, ReputationTargetEntityType, ReputationDisputeStatus, ReputationInfluenceContext, ReputationTransaction, ReputationBalanceBreakdown, ReputationInfluence, ReputationReliability, ReputationBalanceSummary, ReputationBalance, ReputationBalanceView, ReputationDispute, ReputationRule, ReputationLeaderboardUser, ReputationLeaderboardEntry, ReputationInfluenceResult, ReverseReputationTransactionResult, AwardReputationInput, CreateReputationDisputeInput, ResolveReputationDisputeInput, UpsertReputationRuleInput, UpsertReputationRuleRequest, ReverseReputationTransactionInput, } from './reputation';
37
+ export { MODERATION_SEVERITIES, MODERATION_FINDING_SCOPES, MODERATION_ATTRIBUTIONS, MODERATION_DECISION_STATUSES, MODERATION_EFFECT_TYPES, MODERATION_EFFECT_STATUSES, MODERATION_EFFECT_SKIP_REASONS, CONDUCT_STRIKE_STATUSES, CONDUCT_STANDINGS, CONTRIBUTION_TIERS, PERSONHOOD_STATUSES, IDENTITY_BINDING_TYPES, IDENTITY_BINDING_STATUSES, APPLICATION_MODERATION_STANDINGS, moderationSeveritySchema, moderationFindingScopeSchema, moderationAttributionSchema, moderationDecisionStatusSchema, moderationEffectTypeSchema, moderationEffectStatusSchema, moderationEffectSkipReasonSchema, conductStrikeStatusSchema, conductStandingSchema, contributionTierSchema, personhoodStatusSchema, identityBindingTypeSchema, identityBindingStatusSchema, applicationModerationStandingSchema, moderationFindingSchema, moderationDecisionEventSubjectSchema, moderationPolicyVersionsSchema, moderationDecisionEventSchema, finalizeModerationDecisionSchema, reverseModerationEffectSchema, moderationEffectSchema, applyModerationDecisionResultSchema, reverseModerationEffectResultSchema, registerIdentityBindingSchema, identityBindingSchema, reputationPersonhoodSchema, reputationContributionSchema, reputationConductSchema, reputationReportingSchema, reputationReviewingSchema, reputationContextualInfluenceSchema, applicationModerationTrustSchema, } from './moderationReputation';
38
+ export type { ModerationSeverity, ModerationFindingScope, ModerationAttribution, ModerationDecisionStatus, ModerationEffectType, ModerationEffectStatus, ModerationEffectSkipReason, ConductStrikeStatus, ConductStanding, ContributionTier, PersonhoodStatusValue, IdentityBindingType, IdentityBindingStatus, ApplicationModerationStanding, ModerationFinding, ModerationDecisionEventSubject, ModerationPolicyVersions, ModerationDecisionEvent, FinalizeModerationDecisionInput, ReverseModerationEffectInput, ModerationEffect, ApplyModerationDecisionResult, ReverseModerationEffectResult, RegisterIdentityBindingInput, IdentityBinding, ReputationPersonhood, ReputationContribution, ReputationConduct, ReputationReporting, ReputationReviewing, ReputationContextualInfluence, ApplicationModerationTrust, } from './moderationReputation';
39
+ export { linkPreviewSchema, linkPreviewBatchRequestSchema, linkPreviewBatchResponseSchema, linkPreviewResponseSchema, } from './links';
40
+ export type { LinkPreviewStatus, LinkPreview, LinkPreviewBatchRequest, LinkPreviewBatchResponse, } from './links';
41
+ export type { FollowTargetKind, FollowState, FollowEffectiveState, FollowApplicationMode, FollowTarget, FollowRecord, FollowStatus, FollowMutation, UnfollowMutation, FollowListPage, FollowOptions, } from './followGraph';
42
+ export { sessionAccountSchema, deviceSessionStateSchema, activeTokenSchema, deviceSessionSyncSchema, deviceTokenMintRequestSchema, deviceTokenMintResponseSchema, deviceBackgroundCredentialResponseSchema, deviceBackgroundTokenRequestSchema, deviceBackgroundTokenResponseSchema, SESSION_ACCOUNTS_CHANGED_EVENT, sessionAccountsChangedReasonSchema, sessionAccountsChangedEventSchema, } from './deviceSession';
43
+ export type { SessionAccount, DeviceSessionState, ActiveToken, DeviceSessionSync, DeviceTokenMintRequest, DeviceTokenMintResponse, DeviceBackgroundCredentialResponse, DeviceBackgroundTokenRequest, DeviceBackgroundTokenResponse, SessionAccountsChangedReason, SessionAccountsChangedEvent, } from './deviceSession';
44
+ export { deviceContextRelationshipSchema, deviceDirectoryProfileSchema, deviceAccountContextSchema, devicePrincipalSchema, deviceDirectorySchema, deviceActivateRequestSchema, deviceActivateResponseSchema, deviceDirectorySyncSchema, } from './deviceDirectory';
45
+ export type { DeviceContextRelationship, DeviceDirectoryProfile, DeviceAccountContext, DevicePrincipal, DeviceDirectory, DeviceActivateRequest, DeviceActivateResponse, DeviceDirectorySync, } from './deviceDirectory';
46
+ export { oauthConsentDecisionSchema, oauthAuthorizeCodeResponseSchema } from './oauth';
47
+ export type { OauthConsentDecision, OauthAuthorizeCodeResponse } from './oauth';
48
+ export { BROWSER_HUB_COOKIE_NAME, BROWSER_HUB_COOKIE_ATTRIBUTES, BROWSER_HUB_HANDLE_TTL_MS, browserHubHandleSchema, browserHubHandleRequestSchema, browserHubHandleResponseSchema, browserHubResolveResponseSchema, browserHubErrorSchema, browserHubRevokeResponseSchema, hubSessionSchema, hubClaimRequestSchema, hubActivateRequestSchema, hubAuthorizeRequestSchema, hubAuthorizeResultSchema, } from './browserHub';
49
+ export type { BrowserHubHandleRequest, BrowserHubHandleResponse, BrowserHubResolveResponse, BrowserHubError, BrowserHubRevokeResponse, HubSession, HubClaimRequest, HubActivateRequest, HubAuthorizeRequest, HubAuthorizeResult, } from './browserHub';
50
+ export { loginResultSchema, } from './deviceBoot';
51
+ export type { LoginSessionResult, LoginResult, SecurityAlert, SecurityAlertAnomaly, } from './deviceBoot';
52
+ export { rotateKeyChallengeResponseSchema, rotateKeyCompleteRequestSchema, rotateKeyCompleteResponseSchema, } from './keyRotation';
53
+ export type { RotateKeyChallengeResponse, RotateKeyCompleteRequest, RotateKeyCompleteResponse, } from './keyRotation';
54
+ export { backupLookupIdSchema, encryptedBackupEnvelopeSchema, backupUploadRequestSchema, backupStatusResponseSchema, } from './keyRecovery';
55
+ export type { EncryptedBackupEnvelope, BackupUploadRequest, BackupStatusResponse, } from './keyRecovery';
56
+ export { updatePlatformSchema, updateStatusSchema, updateAssetStatusSchema, sha256HexSchema, channelNameSchema, runtimeVersionSchema, rolloutPercentSchema, assetInitItemSchema, assetInitRequestSchema, assetUploadTicketSchema, assetInitResponseSchema, assetCompleteRequestSchema, assetCompleteResultItemSchema, assetCompleteResponseSchema, updateAssetRefSchema, createUpdateRequestSchema, updateSchema, createUpdateResponseSchema, rollbackToEmbeddedEntrySchema, channelSchema, channelListResponseSchema, updateListResponseSchema, rollbackRequestSchema, rollbackToEmbeddedRequestSchema, promoteRequestSchema, updateRolloutPatchSchema, } from './updates';
57
+ export type { UpdatePlatform, UpdateStatus, UpdateAssetStatus, AssetInitItem, AssetInitRequest, AssetUploadTicket, AssetInitResponse, AssetCompleteRequest, AssetCompleteResultItem, AssetCompleteResponse, UpdateAssetRef, CreateUpdateRequest, Update, CreateUpdateResponse, RollbackToEmbeddedEntry, Channel, ChannelListResponse, UpdateListResponse, RollbackRequest, RollbackToEmbeddedRequest, PromoteRequest, UpdateRolloutPatch, } from './updates';
58
+ export { webauthnRegisterOptionsRequestSchema, webauthnLoginOptionsRequestSchema, webauthnRegisterVerifyRequestSchema, webauthnLoginVerifyRequestSchema, } from './webauthn';
59
+ export type { WebauthnRegisterOptionsRequest, WebauthnLoginOptionsRequest, WebauthnRegisterVerifyRequest, WebauthnLoginVerifyRequest, } from './webauthn';
60
+ export { devicePairingStatusSchema, deviceTransferInitRequestSchema, deviceTransferInitResponseSchema, deviceTransferInfoResponseSchema, deviceTransferApproveRequestSchema, deviceTransferApproveResponseSchema, deviceTransferDenyResponseSchema, } from './devicePairing';
61
+ export type { DevicePairingStatus, DeviceTransferInitRequest, DeviceTransferInitResponse, DeviceTransferInfoResponse, DeviceTransferApproveRequest, DeviceTransferApproveResponse, DeviceTransferDenyResponse, } from './devicePairing';
62
+ export { transparencyCheckpointSignatureSchema, transparencyAnchorSchema, transparencyCheckpointSchema, transparencyInclusionProofSchema, transparencyCheckpointListSchema, } from './transparency';
63
+ export type { TransparencyCheckpointSignature, TransparencyAnchor, TransparencyCheckpoint, TransparencyInclusionProof, TransparencyCheckpointList, } from './transparency';
64
+ export { INFERENCE_CONTRACT_VERSION, } from './inference/version';
65
+ export { oxyAccountIdSchema, delegatedUserIdSchema, oxyApplicationIdSchema, oxyCredentialIdSchema, requestIdSchema, generationIdSchema, idempotencyKeySchema, inferenceEnvironmentSchema, inferenceTimestampSchema, inferenceDateSchema, inferenceHttpsUrlSchema, sha256DigestSchema, publisherSlugSchema, modelSlugSchema, modelIdSchema, modelRevisionLabelSchema, modelReferenceSchema, routingProfileIdSchema, routingProfileSlugSchema, inferenceProviderSlugSchema, deploymentIdSchema, inferenceRegionSchema, RESERVED_ALIA_PUBLISHER, } from './inference/identifiers';
66
+ export type { OxyAccountId, DelegatedUserId, InferenceEnvironment, ModelReference, ModelId, } from './inference/identifiers';
67
+ export { currencyCodeSchema, INFERENCE_MONEY_SCALE, exactDecimalSchema, moneySchema, USAGE_UNITS, usageUnitSchema, USAGE_SOURCES, usageSourceSchema, usageQuantitySchema, unitPriceSchema, } from './inference/money';
68
+ export type { CurrencyCode, ExactDecimal, Money, UsageUnit, UsageSource, UsageQuantity, UnitPrice, } from './inference/money';
69
+ export { INFERENCE_SCOPES, inferenceScopeSchema, billingPrincipalSchema, authenticatedPrincipalSchema, inferenceAttributionSchema, } from './inference/attribution';
70
+ export type { InferenceScope, BillingPrincipal, AuthenticatedPrincipal, InferenceAttribution, } from './inference/attribution';
71
+ export { INFERENCE_ERROR_CODES, NON_RETRYABLE_INFERENCE_ERROR_CODES, inferenceErrorCodeSchema, upstreamErrorCategorySchema, safeErrorTextSchema, providerErrorPassthroughSchema, inferenceErrorSchema, } from './inference/errors';
72
+ export type { InferenceErrorCode, UpstreamErrorCategory, ProviderErrorPassthrough, InferenceError, } from './inference/errors';
73
+ export { priceVersionStatusSchema, priceVersionSchema, priceSnapshotSchema, } from './inference/priceVersion';
74
+ export type { PriceVersionStatus, PriceVersion, PriceSnapshot } from './inference/priceVersion';
75
+ export { inferenceModalitySchema, modelCapabilitiesSchema, modelLicenseSchema, modelProvenanceSchema, inferenceDataPolicySchema, availabilityScopeSchema, commercialPermissionSchema, modelDeprecationSchema, modelEvaluationResultSchema, modelSafetyMetadataSchema, modelPublisherSchema, catalogueModelSchema, modelRevisionSchema, inferenceProviderSchema, modelDeploymentSchema, routingProfileCandidateSchema, routingProfileSchema, cataloguePublisherSummarySchema, catalogueServingProviderSummarySchema, modelCatalogueEntrySchema, } from './inference/catalogue';
76
+ export type { InferenceModality, ModelCapabilities, ModelLicense, ModelProvenance, InferenceDataPolicy, AvailabilityScope, CommercialPermission, ModelDeprecation, ModelEvaluationResult, ModelSafetyMetadata, ModelPublisher, CatalogueModel, ModelRevision, InferenceProvider, ModelDeployment, RoutingProfileCandidate, RoutingProfile, CataloguePublisherSummary, CatalogueServingProviderSummary, ModelCatalogueEntry, } from './inference/catalogue';
77
+ export { routingTargetSchema, routingPolicyScopeSchema, routingFallbackPolicySchema, routingPolicySchema, routingPolicyReferenceSchema, authorizedRouteSchema, } from './inference/routingPolicy';
78
+ export type { RoutingTarget, RoutingPolicyScope, RoutingFallbackPolicy, RoutingPolicy, RoutingPolicyReference, AuthorizedRoute, } from './inference/routingPolicy';
79
+ export { aliaReleaseArtifactSchema, aliaReleaseSignatureSchema, aliaModelReleaseManifestSchema, } from './inference/aliaModelRelease';
80
+ export type { AliaReleaseArtifact, AliaReleaseSignature, AliaModelReleaseManifest, } from './inference/aliaModelRelease';
81
+ export { modelDistributionMethodSchema, modelSystemicRiskTierSchema, trainingComputeFlopsSchema, SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS, modelDownstreamDocumentationSchema, modelGpaiDocumentationSchema, modelLineDeclarationSchema, modelReleaseIngestionRequestSchema, modelReleaseIngestionResultSchema, modelDocumentationSchema, } from './inference/modelDocumentation';
82
+ export type { ModelDistributionMethod, ModelSystemicRiskTier, ModelDownstreamDocumentation, ModelGpaiDocumentation, ModelLineDeclaration, ModelReleaseIngestionRequest, ModelReleaseIngestionResult, ModelDocumentation, } from './inference/modelDocumentation';
83
+ export { inferenceContentSourceSchema, inferenceContentPartSchema, inferenceToolCallSchema, inferenceMessageRoleSchema, inferenceMessageSchema, inferenceInputSchema, samplingParametersSchema, toolDefinitionSchema, toolChoiceSchema, responseFormatSchema, clientRequestMetadataSchema, inferenceRequestSchema, } from './inference/request';
84
+ export type { InferenceContentSource, InferenceContentPart, InferenceToolCall, InferenceMessageRole, InferenceMessage, InferenceInput, SamplingParameters, ToolDefinition, ToolChoice, ResponseFormat, ClientRequestMetadata, InferenceRequest, } from './inference/request';
85
+ export { inferenceStreamStartEventSchema, inferenceStreamDeltaEventSchema, inferenceStreamToolCallEventSchema, inferenceStreamUsageEventSchema, inferenceRouteSwitchDetailSchema, inferenceRouteSwitchReasonSchema, inferenceStreamRouteSwitchEventSchema, inferenceStreamErrorEventSchema, inferenceFinishReasonSchema, inferenceStreamDoneEventSchema, inferenceStreamEventSchema, } from './inference/streamEvents';
86
+ export type { InferenceStreamStartEvent, InferenceStreamDeltaEvent, InferenceStreamToolCallEvent, InferenceStreamUsageEvent, InferenceRouteSwitchDetail, InferenceRouteSwitchReason, InferenceStreamRouteSwitchEvent, InferenceStreamErrorEvent, InferenceFinishReason, InferenceStreamDoneEvent, InferenceStreamEvent, } from './inference/streamEvents';
87
+ export { usageReservationRequestSchema, usageReservationStatusSchema, usageReservationSchema, inferenceRequestOutcomeSchema, normalizedUsageReportSchema, usageReceiptSchema, usageRefundSubjectSchema, usageRefundReasonSchema, usageRefundSchema, } from './inference/usage';
88
+ export type { UsageReservationRequest, UsageReservationStatus, UsageReservation, InferenceRequestOutcome, NormalizedUsageReport, UsageReceipt, UsageRefundSubject, UsageRefundReason, UsageRefund, } from './inference/usage';
89
+ export { providerConnectionScopeSchema, kaanaCredentialHandleSchema, kaanaCredentialOperationIdSchema, kaanaCredentialOperationActionSchema, kaanaCredentialIdentitySchema, kaanaCredentialCreateMutationSchema, kaanaCredentialRotateMutationSchema, kaanaCredentialRevokeMutationSchema, kaanaCredentialMutationSchema, kaanaCredentialCreateOutcomeRequestSchema, kaanaCredentialRotateOutcomeRequestSchema, kaanaCredentialRevokeOutcomeRequestSchema, kaanaCredentialOutcomeRequestSchema, kaanaCredentialAppliedOutcomeSchema, kaanaCredentialConflictOutcomeSchema, kaanaCredentialOutcomeSchema, kaanaCredentialValidationTaskSchema, kaanaCredentialValidationOutcomeStateSchema, kaanaCredentialValidationFailureCodeSchema, kaanaCredentialValidationOutcomeSchema, providerCredentialValidationOperationSchema, providerCredentialValidationDeploymentSchema, providerCredentialCustodyStateSchema, providerConnectionValidationSchema, providerConnectionStatusSchema, providerConnectionSchema, } from './inference/providerConnection';
90
+ export type { ProviderConnectionScope, KaanaCredentialOperationAction, KaanaCredentialIdentity, KaanaCredentialMutation, KaanaCredentialOutcomeRequest, KaanaCredentialOutcome, KaanaCredentialValidationTask, KaanaCredentialValidationOutcome, ProviderCredentialValidationOperation, ProviderCredentialValidationDeployment, ProviderConnectionValidation, ProviderConnectionStatus, ProviderCredentialCustodyState, ProviderConnection, } from './inference/providerConnection';
91
+ export { BILLING_MODES, billingModeSchema, BILLING_PROFILE_STATUSES, billingProfileStatusSchema, autoRechargeSchema, billingProfileSchema, accountBillingStateSchema, BILLING_INVOICE_STATUSES, billingInvoiceStatusSchema, billingInvoiceSchema, EXTERNAL_PAYMENT_PROVIDERS, externalPaymentProviderSchema, EXTERNAL_PAYMENT_KINDS, externalPaymentKindSchema, externalPaymentSchema, AUTO_RECHARGE_STATUSES, autoRechargeStatusSchema, autoRechargeAttemptSchema, RECONCILIATION_DISCREPANCY_KINDS, reconciliationDiscrepancyKindSchema, RECONCILIATION_RUN_STATUSES, reconciliationRunStatusSchema, reconciliationDiscrepancySchema, reconciliationRunSchema, reconciliationReportSchema, } from './inference/accountBilling';
92
+ export type { BillingMode, BillingProfileStatus, AutoRecharge, BillingProfile, AccountBillingState, BillingInvoiceStatus, BillingInvoice, ExternalPaymentProvider, ExternalPaymentKind, ExternalPayment, AutoRechargeStatus, AutoRechargeAttempt, ReconciliationDiscrepancyKind, ReconciliationRunStatus, ReconciliationDiscrepancy, ReconciliationRun, ReconciliationReport, } from './inference/accountBilling';
93
+ export { PRODUCT_PLAN_STATUSES, productPlanStatusSchema, LIVE_PRODUCT_PLAN_STATUSES, planAllowanceSchema, productPlanSchema, payAsYouGoEntitlementSchema, COST_CENTER_STATUSES, costCenterStatusSchema, costCenterSchema, costCenterSpendSchema, productEntitlementSchema, } from './inference/entitlement';
94
+ export type { ProductPlanStatus, PlanAllowance, ProductPlan, PayAsYouGoEntitlement, CostCenterStatus, CostCenter, CostCenterSpend, ProductEntitlement, } from './inference/entitlement';
95
+ export { AUTONOMY_LEVELS, CAPABILITY_PACKAGES, autonomyLevelSchema, capabilityPackageSchema, actorRefSchema, resourceRefSchema, toolGrantOverrideSchema, grantLimitSchema, executionAuthorizationRefSchema, capabilityCoordinatorSchema, delegationGrantSchema, automationTriggerSchema, automationActorSelectionSchema, automationDataFlowSchema, automationDefinitionSchema, capabilityTicketClaimsSchema, policyDecisionSchema, auditResultSchema, auditEventSchema, catalogToolSchema, catalogEventSchema, appCapabilityCatalogSchema, catalogRegistrationSchema, normalizedAppEventSchema, } from './agency';
96
+ export type { AutonomyLevel, CapabilityPackage, ActorRef, ResourceRef, ToolGrantOverride, GrantLimit, ExecutionAuthorizationRef, CapabilityCoordinator, DelegationGrant, AutomationTrigger, AutomationActorSelection, AutomationDefinition, CapabilityTicketClaims, PolicyDecision, AuditEvent, CatalogTool, CatalogEvent, AppCapabilityCatalog, CatalogRegistration, NormalizedAppEvent, } from './agency';
97
+ export { emailContextAddressSchema, emailContextMailboxSchema, emailContextMessageSchema, emailAgentContextSchema, } from './emailAgentContext';
98
+ export type { EmailContextAddress, EmailContextMailbox, EmailContextMessage, EmailAgentContext, } from './emailAgentContext';
99
+ export { inboxComposeRequestSchema, inboxDailyBriefRequestSchema, inboxNaturalSearchRequestSchema, inboxMessageInferenceParamsSchema, inboxInferenceTextResponseSchema, inboxNaturalSearchResponseSchema, inboxSmartRepliesResponseSchema, inboxThreadSummaryResponseSchema, inboxInferenceStreamEventSchema, } from './inference/inbox';
100
+ export type { InboxComposeRequest, InboxDailyBriefRequest, InboxInferenceTextResponse, InboxNaturalSearchResponse, InboxSmartRepliesResponse, InboxThreadSummaryResponse, InboxInferenceStreamEvent, } from './inference/inbox';