@oxy.so/contracts 5.8.0 → 6.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 (219) hide show
  1. package/dist/cjs/accountAccess.js +6 -5
  2. package/dist/cjs/accountEmail.js +13 -5
  3. package/dist/cjs/accountGraph.js +10 -9
  4. package/dist/cjs/accountName.js +3 -2
  5. package/dist/cjs/agency.js +91 -34
  6. package/dist/cjs/agentKeys.js +21 -17
  7. package/dist/cjs/appAssertions.js +14 -13
  8. package/dist/cjs/applicationRoles.js +19 -12
  9. package/dist/cjs/civic.js +10 -9
  10. package/dist/cjs/client/check.js +61 -53
  11. package/dist/cjs/consoleOnboarding.js +9 -4
  12. package/dist/cjs/contentClaims.js +23 -14
  13. package/dist/cjs/deviceDirectory.js +11 -9
  14. package/dist/cjs/deviceSession.js +27 -25
  15. package/dist/cjs/email/messages.js +20 -18
  16. package/dist/cjs/emailAgentContext.js +11 -9
  17. package/dist/cjs/externalIdentity.js +15 -11
  18. package/dist/cjs/federationInstanceFetch.js +12 -7
  19. package/dist/cjs/identity.js +19 -17
  20. package/dist/cjs/identityLink.js +6 -4
  21. package/dist/cjs/identityProof.js +6 -4
  22. package/dist/cjs/inboxPush.js +5 -4
  23. package/dist/cjs/index.js +15 -6
  24. package/dist/cjs/inference/accountBilling.js +35 -33
  25. package/dist/cjs/inference/aliaModelRelease.js +9 -7
  26. package/dist/cjs/inference/attribution.js +14 -12
  27. package/dist/cjs/inference/catalogue.js +35 -29
  28. package/dist/cjs/inference/economics.js +24 -19
  29. package/dist/cjs/inference/embeddings.js +9 -7
  30. package/dist/cjs/inference/entitlement.js +17 -15
  31. package/dist/cjs/inference/errors.js +15 -8
  32. package/dist/cjs/inference/identifiers.js +33 -21
  33. package/dist/cjs/inference/inbox.js +37 -35
  34. package/dist/cjs/inference/modelDocumentation.js +16 -14
  35. package/dist/cjs/inference/money.js +5 -4
  36. package/dist/cjs/inference/priceVersion.js +10 -5
  37. package/dist/cjs/inference/providerConnection.js +21 -14
  38. package/dist/cjs/inference/realtime.js +88 -47
  39. package/dist/cjs/inference/request.js +27 -25
  40. package/dist/cjs/inference/routingPolicy.js +12 -10
  41. package/dist/cjs/inference/streamEvents.js +22 -16
  42. package/dist/cjs/inference/usage.js +32 -15
  43. package/dist/cjs/keyRecovery.js +8 -6
  44. package/dist/cjs/keyRotation.js +5 -4
  45. package/dist/cjs/linkedAccounts.js +22 -18
  46. package/dist/cjs/moderationReputation.js +29 -27
  47. package/dist/cjs/notifications.js +25 -9
  48. package/dist/cjs/numberChecks.js +45 -0
  49. package/dist/cjs/oauth.js +14 -12
  50. package/dist/cjs/organizations.js +23 -21
  51. package/dist/cjs/products/access.js +10 -8
  52. package/dist/cjs/products/billing.js +10 -8
  53. package/dist/cjs/products/checkout.js +22 -10
  54. package/dist/cjs/products/plans.js +15 -10
  55. package/dist/cjs/protocol.js +6 -5
  56. package/dist/cjs/recommendations.js +27 -19
  57. package/dist/cjs/reputation.js +15 -13
  58. package/dist/cjs/safety.js +43 -27
  59. package/dist/cjs/serviceToken.js +81 -2
  60. package/dist/cjs/sessionRevocation.js +8 -6
  61. package/dist/cjs/signIn.js +42 -24
  62. package/dist/cjs/stickers.js +19 -15
  63. package/dist/cjs/stringChecks.js +70 -0
  64. package/dist/cjs/transparency.js +14 -12
  65. package/dist/cjs/updates.js +24 -22
  66. package/dist/cjs/userInvalidation.js +7 -5
  67. package/dist/cjs/userResponse.js +8 -7
  68. package/dist/cjs/username.js +7 -6
  69. package/dist/esm/accountAccess.js +4 -3
  70. package/dist/esm/accountEmail.js +13 -5
  71. package/dist/esm/accountGraph.js +8 -7
  72. package/dist/esm/accountName.js +3 -2
  73. package/dist/esm/agency.js +90 -33
  74. package/dist/esm/agentKeys.js +21 -17
  75. package/dist/esm/appAssertions.js +11 -10
  76. package/dist/esm/applicationRoles.js +16 -9
  77. package/dist/esm/civic.js +8 -7
  78. package/dist/esm/client/check.js +61 -53
  79. package/dist/esm/consoleOnboarding.js +7 -2
  80. package/dist/esm/contentClaims.js +23 -14
  81. package/dist/esm/deviceDirectory.js +11 -9
  82. package/dist/esm/deviceSession.js +27 -25
  83. package/dist/esm/email/messages.js +18 -16
  84. package/dist/esm/emailAgentContext.js +11 -9
  85. package/dist/esm/externalIdentity.js +15 -11
  86. package/dist/esm/federationInstanceFetch.js +10 -5
  87. package/dist/esm/identity.js +17 -15
  88. package/dist/esm/identityLink.js +6 -4
  89. package/dist/esm/identityProof.js +6 -4
  90. package/dist/esm/inboxPush.js +3 -2
  91. package/dist/esm/index.js +4 -2
  92. package/dist/esm/inference/accountBilling.js +33 -31
  93. package/dist/esm/inference/aliaModelRelease.js +7 -5
  94. package/dist/esm/inference/attribution.js +14 -12
  95. package/dist/esm/inference/catalogue.js +33 -27
  96. package/dist/esm/inference/economics.js +22 -17
  97. package/dist/esm/inference/embeddings.js +9 -7
  98. package/dist/esm/inference/entitlement.js +15 -13
  99. package/dist/esm/inference/errors.js +13 -6
  100. package/dist/esm/inference/identifiers.js +31 -19
  101. package/dist/esm/inference/inbox.js +37 -35
  102. package/dist/esm/inference/modelDocumentation.js +14 -12
  103. package/dist/esm/inference/money.js +3 -2
  104. package/dist/esm/inference/priceVersion.js +8 -3
  105. package/dist/esm/inference/providerConnection.js +19 -12
  106. package/dist/esm/inference/realtime.js +85 -44
  107. package/dist/esm/inference/request.js +25 -23
  108. package/dist/esm/inference/routingPolicy.js +9 -7
  109. package/dist/esm/inference/streamEvents.js +20 -14
  110. package/dist/esm/inference/usage.js +30 -13
  111. package/dist/esm/keyRecovery.js +8 -6
  112. package/dist/esm/keyRotation.js +5 -4
  113. package/dist/esm/linkedAccounts.js +20 -16
  114. package/dist/esm/moderationReputation.js +27 -25
  115. package/dist/esm/notifications.js +23 -7
  116. package/dist/esm/numberChecks.js +41 -0
  117. package/dist/esm/oauth.js +14 -12
  118. package/dist/esm/organizations.js +23 -21
  119. package/dist/esm/products/access.js +10 -8
  120. package/dist/esm/products/billing.js +10 -8
  121. package/dist/esm/products/checkout.js +22 -10
  122. package/dist/esm/products/plans.js +15 -10
  123. package/dist/esm/protocol.js +4 -3
  124. package/dist/esm/recommendations.js +25 -17
  125. package/dist/esm/reputation.js +13 -11
  126. package/dist/esm/safety.js +43 -27
  127. package/dist/esm/serviceToken.js +80 -1
  128. package/dist/esm/sessionRevocation.js +6 -4
  129. package/dist/esm/signIn.js +42 -24
  130. package/dist/esm/stickers.js +17 -13
  131. package/dist/esm/stringChecks.js +63 -0
  132. package/dist/esm/transparency.js +14 -12
  133. package/dist/esm/updates.js +22 -20
  134. package/dist/esm/userInvalidation.js +4 -2
  135. package/dist/esm/userResponse.js +4 -3
  136. package/dist/esm/username.js +3 -2
  137. package/dist/types/accountAccess.d.ts +29 -70
  138. package/dist/types/accountEmail.d.ts +2 -14
  139. package/dist/types/accountGraph.d.ts +179 -171
  140. package/dist/types/accountName.d.ts +1 -1
  141. package/dist/types/accountSubject.d.ts +20 -93
  142. package/dist/types/agency.d.ts +528 -2924
  143. package/dist/types/agentKeys.d.ts +48 -421
  144. package/dist/types/appAssertions.d.ts +56 -210
  145. package/dist/types/applicationRoles.d.ts +30 -276
  146. package/dist/types/avatarCharacter.d.ts +1 -1
  147. package/dist/types/civic.d.ts +1 -13
  148. package/dist/types/client/agentKeys.d.ts +18 -18
  149. package/dist/types/client/appAssertions.d.ts +3 -3
  150. package/dist/types/client/check.d.ts +13 -13
  151. package/dist/types/client/deviceDirectory.d.ts +51 -51
  152. package/dist/types/client/deviceSession.d.ts +14 -14
  153. package/dist/types/client/organizations.d.ts +25 -25
  154. package/dist/types/client/products.d.ts +33 -33
  155. package/dist/types/client/recommendations.d.ts +2 -2
  156. package/dist/types/client/safety.d.ts +45 -45
  157. package/dist/types/client/sessionStatus.d.ts +4 -4
  158. package/dist/types/client/signIn.d.ts +1 -1
  159. package/dist/types/commonsSignIn.d.ts +4 -1
  160. package/dist/types/consoleOnboarding.d.ts +24 -44
  161. package/dist/types/contentClaims.d.ts +24 -180
  162. package/dist/types/deviceDirectory.d.ts +109 -1040
  163. package/dist/types/deviceSession.d.ts +36 -298
  164. package/dist/types/email/messages.d.ts +212 -1793
  165. package/dist/types/emailAgentContext.d.ts +10 -194
  166. package/dist/types/externalIdentity.d.ts +121 -615
  167. package/dist/types/federationInstanceFetch.d.ts +3 -32
  168. package/dist/types/identity.d.ts +15 -92
  169. package/dist/types/identityLink.d.ts +6 -84
  170. package/dist/types/identityProof.d.ts +5 -17
  171. package/dist/types/inboxPush.d.ts +1 -9
  172. package/dist/types/index.d.ts +5 -3
  173. package/dist/types/inference/accountBilling.d.ts +151 -488
  174. package/dist/types/inference/aliaModelRelease.d.ts +42 -439
  175. package/dist/types/inference/attribution.d.ts +75 -104
  176. package/dist/types/inference/catalogue.d.ts +417 -1599
  177. package/dist/types/inference/economics.d.ts +69 -276
  178. package/dist/types/inference/embeddings.d.ts +110 -406
  179. package/dist/types/inference/entitlement.d.ts +80 -335
  180. package/dist/types/inference/errors.d.ts +90 -102
  181. package/dist/types/inference/identifiers.d.ts +12 -4
  182. package/dist/types/inference/inbox.d.ts +105 -420
  183. package/dist/types/inference/modelDocumentation.d.ts +201 -1390
  184. package/dist/types/inference/money.d.ts +65 -32
  185. package/dist/types/inference/priceVersion.d.ts +53 -120
  186. package/dist/types/inference/providerConnection.d.ts +253 -710
  187. package/dist/types/inference/realtime.d.ts +954 -6825
  188. package/dist/types/inference/request.d.ts +300 -2572
  189. package/dist/types/inference/routingPolicy.d.ts +95 -503
  190. package/dist/types/inference/streamEvents.d.ts +253 -721
  191. package/dist/types/inference/usage.d.ts +317 -950
  192. package/dist/types/keyRecovery.d.ts +3 -51
  193. package/dist/types/keyRotation.d.ts +3 -38
  194. package/dist/types/linkedAccounts.d.ts +50 -236
  195. package/dist/types/moderationReputation.d.ts +81 -14
  196. package/dist/types/notifications.d.ts +19 -51
  197. package/dist/types/numberChecks.d.ts +9 -0
  198. package/dist/types/oauth.d.ts +101 -809
  199. package/dist/types/organizations.d.ts +268 -921
  200. package/dist/types/oxyRecordTypes.d.ts +11 -1
  201. package/dist/types/products/access.d.ts +125 -775
  202. package/dist/types/products/billing.d.ts +67 -503
  203. package/dist/types/products/checkout.d.ts +16 -69
  204. package/dist/types/products/plans.d.ts +33 -366
  205. package/dist/types/recommendations.d.ts +76 -389
  206. package/dist/types/reputation.d.ts +37 -5
  207. package/dist/types/safety.d.ts +408 -2048
  208. package/dist/types/serviceToken.d.ts +247 -7
  209. package/dist/types/sessionRevocation.d.ts +2 -17
  210. package/dist/types/sessionStatus.d.ts +27 -115
  211. package/dist/types/signIn.d.ts +53 -553
  212. package/dist/types/stickers.d.ts +67 -819
  213. package/dist/types/stringChecks.d.ts +16 -0
  214. package/dist/types/transparency.d.ts +14 -302
  215. package/dist/types/updates.d.ts +60 -316
  216. package/dist/types/userInvalidation.d.ts +4 -13
  217. package/dist/types/userResponse.d.ts +302 -2400
  218. package/dist/types/username.d.ts +3 -3
  219. package/package.json +2 -2
@@ -67,14 +67,8 @@ export declare const applicationPermissionKeySchema: z.ZodString;
67
67
  /** One key as the application's owners declare it. */
68
68
  export declare const applicationPermissionDeclarationSchema: z.ZodObject<{
69
69
  key: z.ZodString;
70
- description: z.ZodEffects<z.ZodString, string, string>;
71
- }, "strict", z.ZodTypeAny, {
72
- description: string;
73
- key: string;
74
- }, {
75
- description: string;
76
- key: string;
77
- }>;
70
+ description: z.ZodString;
71
+ }, z.core.$strict>;
78
72
  /**
79
73
  * `PUT /applications/:appId/roles/permissions` — the WHOLE vocabulary.
80
74
  *
@@ -83,38 +77,12 @@ export declare const applicationPermissionDeclarationSchema: z.ZodObject<{
83
77
  * keeps its identity and takes the new description. Sending the same body twice
84
78
  * changes nothing.
85
79
  */
86
- export declare const declareApplicationPermissionsRequestSchema: z.ZodEffects<z.ZodObject<{
80
+ export declare const declareApplicationPermissionsRequestSchema: z.ZodObject<{
87
81
  permissions: z.ZodArray<z.ZodObject<{
88
82
  key: z.ZodString;
89
- description: z.ZodEffects<z.ZodString, string, string>;
90
- }, "strict", z.ZodTypeAny, {
91
- description: string;
92
- key: string;
93
- }, {
94
- description: string;
95
- key: string;
96
- }>, "many">;
97
- }, "strict", z.ZodTypeAny, {
98
- permissions: {
99
- description: string;
100
- key: string;
101
- }[];
102
- }, {
103
- permissions: {
104
- description: string;
105
- key: string;
106
- }[];
107
- }>, {
108
- permissions: {
109
- description: string;
110
- key: string;
111
- }[];
112
- }, {
113
- permissions: {
114
- description: string;
115
- key: string;
116
- }[];
117
- }>;
83
+ description: z.ZodString;
84
+ }, z.core.$strict>>;
85
+ }, z.core.$strict>;
118
86
  /** A declared key. Retired keys are history: they confer nothing. */
119
87
  export declare const applicationPermissionSchema: z.ZodObject<{
120
88
  key: z.ZodString;
@@ -123,21 +91,7 @@ export declare const applicationPermissionSchema: z.ZodObject<{
123
91
  declaredByUserId: z.ZodNullable<z.ZodString>;
124
92
  retiredAt: z.ZodNullable<z.ZodString>;
125
93
  retiredByUserId: z.ZodNullable<z.ZodString>;
126
- }, "strip", z.ZodTypeAny, {
127
- description: string;
128
- key: string;
129
- declaredAt: string;
130
- declaredByUserId: string | null;
131
- retiredAt: string | null;
132
- retiredByUserId: string | null;
133
- }, {
134
- description: string;
135
- key: string;
136
- declaredAt: string;
137
- declaredByUserId: string | null;
138
- retiredAt: string | null;
139
- retiredByUserId: string | null;
140
- }>;
94
+ }, z.core.$strip>;
141
95
  export declare const applicationPermissionListSchema: z.ZodObject<{
142
96
  items: z.ZodArray<z.ZodObject<{
143
97
  key: z.ZodString;
@@ -146,40 +100,8 @@ export declare const applicationPermissionListSchema: z.ZodObject<{
146
100
  declaredByUserId: z.ZodNullable<z.ZodString>;
147
101
  retiredAt: z.ZodNullable<z.ZodString>;
148
102
  retiredByUserId: z.ZodNullable<z.ZodString>;
149
- }, "strip", z.ZodTypeAny, {
150
- description: string;
151
- key: string;
152
- declaredAt: string;
153
- declaredByUserId: string | null;
154
- retiredAt: string | null;
155
- retiredByUserId: string | null;
156
- }, {
157
- description: string;
158
- key: string;
159
- declaredAt: string;
160
- declaredByUserId: string | null;
161
- retiredAt: string | null;
162
- retiredByUserId: string | null;
163
- }>, "many">;
164
- }, "strip", z.ZodTypeAny, {
165
- items: {
166
- description: string;
167
- key: string;
168
- declaredAt: string;
169
- declaredByUserId: string | null;
170
- retiredAt: string | null;
171
- retiredByUserId: string | null;
172
- }[];
173
- }, {
174
- items: {
175
- description: string;
176
- key: string;
177
- declaredAt: string;
178
- declaredByUserId: string | null;
179
- retiredAt: string | null;
180
- retiredByUserId: string | null;
181
- }[];
182
- }>;
103
+ }, z.core.$strip>>;
104
+ }, z.core.$strip>;
183
105
  export declare const declareApplicationPermissionsResponseSchema: z.ZodObject<{
184
106
  items: z.ZodArray<z.ZodObject<{
185
107
  key: z.ZodString;
@@ -188,224 +110,64 @@ export declare const declareApplicationPermissionsResponseSchema: z.ZodObject<{
188
110
  declaredByUserId: z.ZodNullable<z.ZodString>;
189
111
  retiredAt: z.ZodNullable<z.ZodString>;
190
112
  retiredByUserId: z.ZodNullable<z.ZodString>;
191
- }, "strip", z.ZodTypeAny, {
192
- description: string;
193
- key: string;
194
- declaredAt: string;
195
- declaredByUserId: string | null;
196
- retiredAt: string | null;
197
- retiredByUserId: string | null;
198
- }, {
199
- description: string;
200
- key: string;
201
- declaredAt: string;
202
- declaredByUserId: string | null;
203
- retiredAt: string | null;
204
- retiredByUserId: string | null;
205
- }>, "many">;
206
- } & {
207
- /** Keys that became live with this declaration. */
208
- added: z.ZodArray<z.ZodString, "many">;
209
- /** Keys this declaration retired. */
210
- retired: z.ZodArray<z.ZodString, "many">;
211
- /** Live keys whose description changed. */
212
- described: z.ZodArray<z.ZodString, "many">;
213
- /** Live grants revoked because their key was retired. */
113
+ }, z.core.$strip>>;
114
+ added: z.ZodArray<z.ZodString>;
115
+ retired: z.ZodArray<z.ZodString>;
116
+ described: z.ZodArray<z.ZodString>;
214
117
  revokedGrants: z.ZodNumber;
215
- }, "strip", z.ZodTypeAny, {
216
- items: {
217
- description: string;
218
- key: string;
219
- declaredAt: string;
220
- declaredByUserId: string | null;
221
- retiredAt: string | null;
222
- retiredByUserId: string | null;
223
- }[];
224
- added: string[];
225
- retired: string[];
226
- described: string[];
227
- revokedGrants: number;
228
- }, {
229
- items: {
230
- description: string;
231
- key: string;
232
- declaredAt: string;
233
- declaredByUserId: string | null;
234
- retiredAt: string | null;
235
- retiredByUserId: string | null;
236
- }[];
237
- added: string[];
238
- retired: string[];
239
- described: string[];
240
- revokedGrants: number;
241
- }>;
118
+ }, z.core.$strip>;
242
119
  /** One grant of one key to one Oxy user. Revocation is a stamp, never a delete. */
243
120
  export declare const applicationRoleGrantSchema: z.ZodObject<{
244
121
  id: z.ZodString;
245
122
  applicationId: z.ZodString;
246
123
  permission: z.ZodString;
247
124
  userId: z.ZodString;
248
- /** The grantee's handle, for display. */
249
125
  username: z.ZodNullable<z.ZodString>;
250
- /** The HUMAN who granted it; null once that account was erased. */
251
126
  grantedByUserId: z.ZodNullable<z.ZodString>;
252
127
  grantedAt: z.ZodString;
253
128
  grantReason: z.ZodNullable<z.ZodString>;
254
129
  revokedAt: z.ZodNullable<z.ZodString>;
255
130
  revokedByUserId: z.ZodNullable<z.ZodString>;
256
131
  revokeReason: z.ZodNullable<z.ZodString>;
257
- }, "strip", z.ZodTypeAny, {
258
- username: string | null;
259
- id: string;
260
- applicationId: string;
261
- revokedAt: string | null;
262
- userId: string;
263
- permission: string;
264
- grantedByUserId: string | null;
265
- grantedAt: string;
266
- grantReason: string | null;
267
- revokedByUserId: string | null;
268
- revokeReason: string | null;
269
- }, {
270
- username: string | null;
271
- id: string;
272
- applicationId: string;
273
- revokedAt: string | null;
274
- userId: string;
275
- permission: string;
276
- grantedByUserId: string | null;
277
- grantedAt: string;
278
- grantReason: string | null;
279
- revokedByUserId: string | null;
280
- revokeReason: string | null;
281
- }>;
132
+ }, z.core.$strip>;
282
133
  export declare const applicationRoleGrantListSchema: z.ZodObject<{
283
134
  items: z.ZodArray<z.ZodObject<{
284
135
  id: z.ZodString;
285
136
  applicationId: z.ZodString;
286
137
  permission: z.ZodString;
287
138
  userId: z.ZodString;
288
- /** The grantee's handle, for display. */
289
139
  username: z.ZodNullable<z.ZodString>;
290
- /** The HUMAN who granted it; null once that account was erased. */
291
140
  grantedByUserId: z.ZodNullable<z.ZodString>;
292
141
  grantedAt: z.ZodString;
293
142
  grantReason: z.ZodNullable<z.ZodString>;
294
143
  revokedAt: z.ZodNullable<z.ZodString>;
295
144
  revokedByUserId: z.ZodNullable<z.ZodString>;
296
145
  revokeReason: z.ZodNullable<z.ZodString>;
297
- }, "strip", z.ZodTypeAny, {
298
- username: string | null;
299
- id: string;
300
- applicationId: string;
301
- revokedAt: string | null;
302
- userId: string;
303
- permission: string;
304
- grantedByUserId: string | null;
305
- grantedAt: string;
306
- grantReason: string | null;
307
- revokedByUserId: string | null;
308
- revokeReason: string | null;
309
- }, {
310
- username: string | null;
311
- id: string;
312
- applicationId: string;
313
- revokedAt: string | null;
314
- userId: string;
315
- permission: string;
316
- grantedByUserId: string | null;
317
- grantedAt: string;
318
- grantReason: string | null;
319
- revokedByUserId: string | null;
320
- revokeReason: string | null;
321
- }>, "many">;
146
+ }, z.core.$strip>>;
322
147
  nextCursor: z.ZodNullable<z.ZodString>;
323
- }, "strip", z.ZodTypeAny, {
324
- items: {
325
- username: string | null;
326
- id: string;
327
- applicationId: string;
328
- revokedAt: string | null;
329
- userId: string;
330
- permission: string;
331
- grantedByUserId: string | null;
332
- grantedAt: string;
333
- grantReason: string | null;
334
- revokedByUserId: string | null;
335
- revokeReason: string | null;
336
- }[];
337
- nextCursor: string | null;
338
- }, {
339
- items: {
340
- username: string | null;
341
- id: string;
342
- applicationId: string;
343
- revokedAt: string | null;
344
- userId: string;
345
- permission: string;
346
- grantedByUserId: string | null;
347
- grantedAt: string;
348
- grantReason: string | null;
349
- revokedByUserId: string | null;
350
- revokeReason: string | null;
351
- }[];
352
- nextCursor: string | null;
353
- }>;
148
+ }, z.core.$strip>;
354
149
  /** `POST /applications/:appId/roles/grants` — name the grantee by id OR handle. */
355
- export declare const createApplicationRoleGrantRequestSchema: z.ZodEffects<z.ZodObject<{
150
+ export declare const createApplicationRoleGrantRequestSchema: z.ZodObject<{
356
151
  userId: z.ZodOptional<z.ZodString>;
357
152
  username: z.ZodOptional<z.ZodString>;
358
153
  permission: z.ZodString;
359
- reason: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
360
- }, "strict", z.ZodTypeAny, {
361
- permission: string;
362
- username?: string | undefined;
363
- reason?: string | undefined;
364
- userId?: string | undefined;
365
- }, {
366
- permission: string;
367
- username?: string | undefined;
368
- reason?: string | undefined;
369
- userId?: string | undefined;
370
- }>, {
371
- permission: string;
372
- username?: string | undefined;
373
- reason?: string | undefined;
374
- userId?: string | undefined;
375
- }, {
376
- permission: string;
377
- username?: string | undefined;
378
- reason?: string | undefined;
379
- userId?: string | undefined;
380
- }>;
154
+ reason: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strict>;
381
156
  /** `POST /applications/:appId/roles/grants/:grantId/revoke`. */
382
157
  export declare const revokeApplicationRoleGrantRequestSchema: z.ZodObject<{
383
- reason: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
384
- }, "strict", z.ZodTypeAny, {
385
- reason?: string | undefined;
386
- }, {
387
- reason?: string | undefined;
388
- }>;
158
+ reason: z.ZodOptional<z.ZodString>;
159
+ }, z.core.$strict>;
389
160
  /** `GET /applications/:appId/roles/grants` query. */
390
161
  export declare const listApplicationRoleGrantsQuerySchema: z.ZodObject<{
391
162
  permission: z.ZodOptional<z.ZodString>;
392
163
  userId: z.ZodOptional<z.ZodString>;
393
- includeRevoked: z.ZodOptional<z.ZodEffects<z.ZodEnum<["true", "false"]>, boolean, "true" | "false">>;
394
- limit: z.ZodOptional<z.ZodNumber>;
164
+ includeRevoked: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
165
+ true: "true";
166
+ false: "false";
167
+ }>, z.ZodTransform<boolean, "true" | "false">>>;
168
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
395
169
  cursor: z.ZodOptional<z.ZodString>;
396
- }, "strict", z.ZodTypeAny, {
397
- limit?: number | undefined;
398
- cursor?: string | undefined;
399
- userId?: string | undefined;
400
- permission?: string | undefined;
401
- includeRevoked?: boolean | undefined;
402
- }, {
403
- limit?: number | undefined;
404
- cursor?: string | undefined;
405
- userId?: string | undefined;
406
- permission?: string | undefined;
407
- includeRevoked?: "true" | "false" | undefined;
408
- }>;
170
+ }, z.core.$strict>;
409
171
  /**
410
172
  * `GET /applications/:appId/roles/me` — the keys the HUMAN behind the bearer
411
173
  * holds for this application, in no particular order. `userId` is that human
@@ -415,16 +177,8 @@ export declare const listApplicationRoleGrantsQuerySchema: z.ZodObject<{
415
177
  export declare const applicationRolesMeSchema: z.ZodObject<{
416
178
  applicationId: z.ZodString;
417
179
  userId: z.ZodString;
418
- permissions: z.ZodArray<z.ZodString, "many">;
419
- }, "strip", z.ZodTypeAny, {
420
- permissions: string[];
421
- applicationId: string;
422
- userId: string;
423
- }, {
424
- permissions: string[];
425
- applicationId: string;
426
- userId: string;
427
- }>;
180
+ permissions: z.ZodArray<z.ZodString>;
181
+ }, z.core.$strip>;
428
182
  export type ApplicationPermissionDeclaration = z.infer<typeof applicationPermissionDeclarationSchema>;
429
183
  export type DeclareApplicationPermissionsRequest = z.infer<typeof declareApplicationPermissionsRequestSchema>;
430
184
  export type ApplicationPermissionDefinition = z.infer<typeof applicationPermissionSchema>;
@@ -42,7 +42,7 @@ export declare const AVATAR_EYE_SPACING: {
42
42
  * now rather than a look that never takes effect. A character with nothing in
43
43
  * it draws nothing: it needs a preset, or a shape and a paint.
44
44
  */
45
- export declare const avatarCharacterSchema: z.ZodType<AvatarCharacter, z.ZodTypeDef, unknown>;
45
+ export declare const avatarCharacterSchema: z.ZodType<AvatarCharacter, unknown>;
46
46
  /** The validated character, or `null` for anything that is not one. */
47
47
  export declare function parseAvatarCharacter(value: unknown): AvatarCharacter | null;
48
48
  /** The parts a new bot's look is picked from: the plain, friendly shapes, in the editor's order. */
@@ -144,19 +144,7 @@ export declare const validationOpenRequestSchema: z.ZodObject<{
144
144
  sourceActionId: z.ZodString;
145
145
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
146
146
  highValue: z.ZodOptional<z.ZodBoolean>;
147
- }, "strip", z.ZodTypeAny, {
148
- subjectUserId: string;
149
- actionType: string;
150
- sourceActionId: string;
151
- payload: Record<string, unknown>;
152
- highValue?: boolean | undefined;
153
- }, {
154
- subjectUserId: string;
155
- actionType: string;
156
- sourceActionId: string;
157
- payload: Record<string, unknown>;
158
- highValue?: boolean | undefined;
159
- }>;
147
+ }, z.core.$strip>;
160
148
  export type ValidationOpenRequest = z.infer<typeof validationOpenRequestSchema>;
161
149
  /** The result of opening a validation request (`POST /civic/validations`). */
162
150
  export interface ValidationOpenResult {
@@ -10,38 +10,38 @@ export type AgentProofAction = (typeof AGENT_PROOF_ACTIONS)[number];
10
10
  export declare const ACCOUNT_AUTH_METHODS: readonly ["identity", "agent_key"];
11
11
  export type AccountAuthMethod = (typeof ACCOUNT_AUTH_METHODS)[number];
12
12
  export declare const agentProofClaimsCheck: import("./check").Check<{
13
- accountId: string;
14
- expiresAt: number;
15
13
  version: 1;
16
14
  audience: "oxy-api/agent";
17
15
  action: "agent_signin" | "agent_enroll" | "agent_rotate" | "agent_recover" | "agent_governance";
18
- challenge: string;
16
+ accountId: string;
19
17
  actorId: string;
20
18
  authMethodId: string | null;
21
19
  publicKey: string;
22
20
  payloadDigest: string;
21
+ challenge: string;
22
+ expiresAt: number;
23
23
  }>;
24
24
  export declare const agentChallengeRequestCheck: import("./check").Check<{
25
25
  publicKey: string;
26
26
  }>;
27
27
  export declare const agentVerifyRequestCheck: import("./check").Check<{
28
- signature: string;
29
28
  challenge: string;
30
- publicKey: string;
29
+ signature: string;
31
30
  timestamp: number;
31
+ publicKey: string;
32
32
  }>;
33
33
  export declare const agentKeyOperationCheck: import("./check").Check<{
34
34
  publicKey: string;
35
- operation: "enroll";
36
35
  label: string;
36
+ operation: "enroll";
37
37
  } | {
38
38
  publicKey: string;
39
- operation: "recover";
40
39
  label: string;
40
+ operation: "recover";
41
41
  } | {
42
42
  publicKey: string;
43
- operation: "rotate";
44
43
  label: string;
44
+ operation: "rotate";
45
45
  retireCurrent?: boolean | undefined;
46
46
  } | {
47
47
  operation: "revoke";
@@ -50,16 +50,16 @@ export declare const agentKeyOperationCheck: import("./check").Check<{
50
50
  export declare const executeAgentKeyOperationCheck: import("./check").Check<{
51
51
  operation: {
52
52
  publicKey: string;
53
- operation: "enroll";
54
53
  label: string;
54
+ operation: "enroll";
55
55
  } | {
56
56
  publicKey: string;
57
- operation: "recover";
58
57
  label: string;
58
+ operation: "recover";
59
59
  } | {
60
60
  publicKey: string;
61
- operation: "rotate";
62
61
  label: string;
62
+ operation: "rotate";
63
63
  retireCurrent?: boolean | undefined;
64
64
  } | {
65
65
  operation: "revoke";
@@ -68,30 +68,30 @@ export declare const executeAgentKeyOperationCheck: import("./check").Check<{
68
68
  proof: {
69
69
  challenge: string;
70
70
  timestamp: number;
71
+ keySignature?: string | undefined;
72
+ governorSignature?: string | undefined;
71
73
  reauth?: {
72
74
  password?: string | undefined;
73
75
  emailCode?: {
74
- code: string;
75
76
  verificationId: string;
77
+ code: string;
76
78
  } | undefined;
77
79
  totpCode?: string | undefined;
78
80
  } | undefined;
79
- keySignature?: string | undefined;
80
- governorSignature?: string | undefined;
81
81
  };
82
82
  }>;
83
83
  export declare const agentKeyOperationChallengeCheck: import("./check").Check<{
84
84
  claims: {
85
- accountId: string;
86
- expiresAt: number;
87
85
  version: 1;
88
86
  audience: "oxy-api/agent";
89
87
  action: "agent_signin" | "agent_enroll" | "agent_rotate" | "agent_recover" | "agent_governance";
90
- challenge: string;
88
+ accountId: string;
91
89
  actorId: string;
92
90
  authMethodId: string | null;
93
91
  publicKey: string;
94
92
  payloadDigest: string;
93
+ challenge: string;
94
+ expiresAt: number;
95
95
  };
96
96
  governorPublicKey: string | null;
97
97
  }>;
@@ -102,12 +102,12 @@ export declare const agentKeyOperationResultCheck: import("./check").Check<{
102
102
  export declare const agentKeyListResponseCheck: import("./check").Check<{
103
103
  keys: {
104
104
  id: string;
105
- revokedAt: string | null;
106
105
  publicKey: string;
107
106
  label: string;
108
107
  enrolledByUserId: string | null;
109
108
  enrollmentMethod: "governor" | "rotation" | "recovery";
110
109
  linkedAt: string;
111
110
  lastUsedAt: string | null;
111
+ revokedAt: string | null;
112
112
  }[];
113
113
  }>;
@@ -44,17 +44,17 @@ export declare const OXY_APP_ASSERTION_TTL_SECONDS = 300;
44
44
  */
45
45
  export declare const APP_ASSERTION_ERROR_CODES: readonly ["application_unavailable", "session_other_application", "platform_not_registered", "origin_not_registered", "challenge_invalid", "integrity_refused", "integrity_unconfigured", "integrity_unavailable", "attest_key_unknown", "attest_key_exists", "attestation_invalid", "assertion_invalid", "signing_unavailable"];
46
46
  export declare const appAssertionChallengeResponseCheck: import("./check").Check<{
47
- expiresAt: string;
48
47
  challenge: string;
49
48
  requestHash: string;
49
+ expiresAt: string;
50
50
  cloudProjectNumber?: string | undefined;
51
51
  }>;
52
52
  export declare const appAttestKeyResponseCheck: import("./check").Check<{
53
53
  keyId: string;
54
54
  }>;
55
55
  export declare const appAssertionResponseCheck: import("./check").Check<{
56
- expiresAt: string;
57
- applicationId: string;
58
56
  assertion: string;
57
+ applicationId: string;
59
58
  platform: "web" | "android" | "ios";
59
+ expiresAt: string;
60
60
  }>;
@@ -7,25 +7,25 @@
7
7
  * that bundles the SDK (~120 KB before compression, evaluated at startup). The
8
8
  * checks here give the client the same answers in plain TypeScript.
9
9
  *
10
- * Every check mirrors one Zod 3 schema in this package, and
10
+ * Every check mirrors one Zod 4 schema in this package, and
11
11
  * `__tests__/clientChecks.parity.test.ts` runs both over the same inputs and
12
12
  * requires the same verdict, the same output and the same failing path. The
13
- * rules follow Zod 3 exactly:
13
+ * rules follow Zod 4 exactly:
14
14
  *
15
15
  * string(...rules) a string; `trim`/`toLowerCase` rewrite it, the other
16
16
  * rules test it, in the order given
17
- * number(...rules) a number that is not NaN (Infinity passes, as in Zod)
17
+ * number(...rules) a finite number
18
18
  * literal(v) / oneOf `===` one value / one of a fixed set of strings
19
19
  * optional(c) `undefined` (or an absent key) passes; `null` does not
20
20
  * nullable(c) `null` passes and is kept
21
21
  * withDefault(c, v) `undefined` becomes `v`, which is then checked
22
- * array(c, ...rules) the size rules first, then every element in order
22
+ * array(c, ...rules) upper bounds before elements, lower bounds afterwards
23
23
  * object(shape) unknown keys are DROPPED (Zod's default "strip")
24
24
  * strictObject(shape) unknown keys FAIL (`.strict()`)
25
25
  * looseObject(shape) unknown keys are KEPT (`.passthrough()`)
26
26
  * refine(c, test) a further condition, run once `c` passes
27
27
  * transform(c, f) `f` rewrites the value once `c` passes
28
- * union / discriminatedUnion as Zod 3 reports them
28
+ * union / discriminatedUnion as Zod 4 reports them
29
29
  *
30
30
  * A failure carries the first issue Zod would report and whether Zod would have
31
31
  * stopped there (`fatal`: the type was wrong) or kept checking (`fatal: false`:
@@ -37,8 +37,8 @@
37
37
  */
38
38
  /** Where in the value a check failed. */
39
39
  export type CheckPath = (string | number)[];
40
- /** Zod 3's issue codes, for the ones these checks can report. */
41
- export type CheckIssueCode = 'invalid_type' | 'invalid_literal' | 'invalid_enum_value' | 'invalid_string' | 'too_small' | 'too_big' | 'unrecognized_keys' | 'invalid_union' | 'invalid_union_discriminator' | 'custom';
40
+ /** Zod 4's issue codes, for the ones these checks can report. */
41
+ export type CheckIssueCode = 'invalid_type' | 'invalid_value' | 'invalid_format' | 'too_small' | 'too_big' | 'unrecognized_keys' | 'invalid_union' | 'custom';
42
42
  /**
43
43
  * The first problem found, in the order Zod reports its issues, with Zod's
44
44
  * code and message. `expected`/`received` name TYPES (`'number'`, `'string'`)
@@ -80,13 +80,13 @@ export declare function maxLength(max: number, message?: string): StringRule;
80
80
  export declare function pattern(regex: RegExp, message?: string): StringRule;
81
81
  export declare function startsWith(prefix: string): StringRule;
82
82
  export declare const email: StringRule;
83
- /** Zod 3's `.url()`: anything `new URL()` accepts. */
83
+ /** The contract's URL check validates with `new URL()` and preserves the original value. */
84
84
  export declare const url: StringRule;
85
85
  export declare const datetime: StringRule;
86
86
  export declare function string(...rules: StringRule[]): Check<string>;
87
87
  /** A test on a number; `undefined` when it passes, else Zod's issue. */
88
88
  export type NumberRule = (value: number) => Problem | undefined;
89
- /** Zod's `.int()` — reported, as Zod does, as an `invalid_type` that does not stop the parse. */
89
+ /** Integer validation, separate from the contract's optional safe bounds. */
90
90
  export declare const int: NumberRule;
91
91
  export declare function atLeast(min: number): NumberRule;
92
92
  export declare function atMost(max: number): NumberRule;
@@ -94,7 +94,7 @@ export declare function atMost(max: number): NumberRule;
94
94
  export declare const positive: NumberRule;
95
95
  /** Zod's `.nonnegative()` (and `.min(0)`). */
96
96
  export declare const nonnegative: NumberRule;
97
- /** Zod's `.safe()`: both bounds, low first. */
97
+ /** The contract's explicit safe-number bounds. */
98
98
  export declare const safe: NumberRule;
99
99
  export declare function number(...rules: NumberRule[]): Check<number>;
100
100
  export declare const boolean: Check<boolean>;
@@ -137,7 +137,7 @@ type OptionalKeys<S extends Shape> = {
137
137
  [K in keyof S]: undefined extends CheckOutput<S[K]> ? K : never;
138
138
  }[keyof S];
139
139
  type RequiredKeys<S extends Shape> = Exclude<keyof S, OptionalKeys<S>>;
140
- /** What Zod 3 infers for `z.object(shape)`: keys that admit `undefined` become optional. */
140
+ /** What Zod 4 infers for `z.object(shape)`: keys that admit `undefined` become optional. */
141
141
  export type ShapeOutput<S extends Shape> = Flatten<{
142
142
  [K in RequiredKeys<S>]: CheckOutput<S[K]>;
143
143
  } & {
@@ -153,9 +153,9 @@ export declare function looseObject<S extends Shape>(shape: S): Check<Flatten<Sh
153
153
  }>>;
154
154
  /** Any object, every value kept — Zod's `z.record(z.unknown())`. */
155
155
  export declare const unknownRecord: Check<Record<string, unknown>>;
156
- /** The first option that passes; else Zod 3's report (the first option that only failed a rule). */
156
+ /** The first passing option, or the sole non-aborted option's issue; otherwise a union issue. */
157
157
  export declare function union<const C extends readonly Check<unknown>[]>(...options: C): Check<CheckOutput<C[number]>>;
158
- /** Zod 3's `z.discriminatedUnion(key, options)`, with the options keyed by their tag. */
158
+ /** Zod 4's `z.discriminatedUnion(key, options)`, with the options keyed by their tag. */
159
159
  export declare function discriminatedUnion<K extends string, M extends Record<string, Check<unknown>>>(key: K, options: M): Check<CheckOutput<M[keyof M]>>;
160
160
  /** `a.b[0].c` — for messages. */
161
161
  export declare function formatCheckPath(path: CheckPath): string;