@open-pencil/cloud 0.17.0-beta.1 → 0.17.0-beta.4

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 (235) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/{ai-relay.mjs → services.mjs} +8 -8
  3. package/dist/bin/services.mjs.map +1 -0
  4. package/dist/client.d.ts +236 -46
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/client.js +649 -400
  7. package/dist/client.js.map +1 -1
  8. package/dist/contract.d.ts +2 -2
  9. package/dist/contract.js +2 -2
  10. package/dist/contract2.js +680 -443
  11. package/dist/contract2.js.map +1 -1
  12. package/dist/email.d.ts +9 -1
  13. package/dist/email.d.ts.map +1 -1
  14. package/dist/email.js +99 -58
  15. package/dist/email.js.map +1 -1
  16. package/dist/index.d.ts +468 -64
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/listen.mjs +575 -738
  19. package/dist/listen.mjs.map +1 -1
  20. package/dist/runtime-node.d.mts +6564 -2934
  21. package/dist/runtime-node.d.mts.map +1 -1
  22. package/dist/runtime-node.mjs +6 -5
  23. package/dist/runtime-node.mjs.map +1 -1
  24. package/dist/server.d.ts +8931 -4198
  25. package/dist/server.d.ts.map +1 -1
  26. package/dist/server.js +5260 -3859
  27. package/dist/server.js.map +1 -1
  28. package/dist/server.mjs +5686 -3736
  29. package/dist/server.mjs.map +1 -1
  30. package/dist/server2.mjs +101 -79
  31. package/dist/server2.mjs.map +1 -1
  32. package/package.json +9 -6
  33. package/src/admin/api/routes.ts +103 -33
  34. package/src/admin/audit/service.ts +25 -6
  35. package/src/admin/documents/service.ts +361 -0
  36. package/src/admin/errors.ts +9 -1
  37. package/src/admin/index.ts +6 -0
  38. package/src/admin/operations/service.ts +7 -0
  39. package/src/admin/reports/service.ts +147 -0
  40. package/src/admin/schema.ts +6 -0
  41. package/src/client/api.ts +36 -21
  42. package/src/client/auth/navigation.ts +6 -5
  43. package/src/client/index.ts +7 -7
  44. package/src/client/portal/account.ts +25 -0
  45. package/src/client/portal/administration.ts +56 -0
  46. package/src/client/{ai.ts → services.ts} +44 -27
  47. package/src/contract/account.ts +58 -2
  48. package/src/contract/admin/index.ts +67 -3
  49. package/src/contract/collaboration.ts +6 -1
  50. package/src/contract/discovery.ts +22 -4
  51. package/src/contract/documents.ts +27 -0
  52. package/src/contract/entitlements.ts +2 -2
  53. package/src/contract/index.ts +63 -37
  54. package/src/contract/relay.ts +6 -0
  55. package/src/contract/reports.ts +42 -0
  56. package/src/contract/services.ts +233 -0
  57. package/src/contract/sharing.ts +3 -9
  58. package/src/email/render.ts +26 -0
  59. package/src/email/schema.ts +11 -1
  60. package/src/email/templates/brand.ts +1 -1
  61. package/src/runtime/cloudflare/environment.ts +31 -6
  62. package/src/runtime/cloudflare/index.ts +1 -1
  63. package/src/runtime/cloudflare/logging.ts +15 -0
  64. package/src/runtime/cloudflare/maintenance.ts +31 -0
  65. package/src/runtime/cloudflare/relay/index.ts +176 -0
  66. package/src/runtime/cloudflare/relay/sockets.ts +112 -0
  67. package/src/runtime/cloudflare/worker.ts +89 -26
  68. package/src/runtime/node/application.ts +5 -3
  69. package/src/runtime/node/bootstrap.ts +20 -4
  70. package/src/runtime/node/cleanup.ts +16 -3
  71. package/src/runtime/node/entitlements/main.ts +14 -11
  72. package/src/runtime/node/index.ts +1 -1
  73. package/src/runtime/node/migrate.ts +5 -1
  74. package/src/runtime/node/relay.ts +8 -2
  75. package/src/runtime/node/request-id.ts +13 -0
  76. package/src/runtime/node/server.ts +71 -15
  77. package/src/runtime/node/{ai-relay → services}/main.ts +6 -6
  78. package/src/runtime/node/{ai-relay → services}/server.ts +18 -18
  79. package/src/runtime/postgres/database.ts +20 -1
  80. package/src/runtime/posthog/errors.ts +32 -0
  81. package/src/runtime/s3/objects.ts +50 -1
  82. package/src/runtime/site/server.ts +33 -4
  83. package/src/server/account/actions.ts +5 -0
  84. package/src/server/account/deletion.ts +302 -0
  85. package/src/server/account/routes.ts +47 -3
  86. package/src/server/account/terms.ts +42 -0
  87. package/src/server/api/router.ts +12 -7
  88. package/src/server/api/types.ts +9 -0
  89. package/src/server/app.ts +93 -15
  90. package/src/server/auth/access-control.ts +63 -0
  91. package/src/server/auth/adapter.ts +11 -0
  92. package/src/server/auth/endpoints.ts +5 -1
  93. package/src/server/auth/factory.ts +30 -3
  94. package/src/server/auth/index.ts +10 -1
  95. package/src/server/cleanup/configured.ts +12 -5
  96. package/src/server/cleanup/documents.ts +165 -71
  97. package/src/server/cleanup/objects.ts +10 -2
  98. package/src/server/cleanup/revisions.ts +24 -7
  99. package/src/server/cleanup/uploads.ts +8 -2
  100. package/src/server/cleanup/worker.ts +5 -2
  101. package/src/server/collaboration/index.ts +3 -0
  102. package/src/server/collaboration/relay/connection.ts +196 -0
  103. package/src/server/collaboration/relay/documents.ts +13 -10
  104. package/src/server/collaboration/relay/hub.ts +279 -195
  105. package/src/server/collaboration/relay/index.ts +3 -1
  106. package/src/server/collaboration/relay/log.ts +79 -0
  107. package/src/server/collaboration/relay/persistence.ts +147 -22
  108. package/src/server/collaboration/relay/resume.ts +28 -0
  109. package/src/server/collaboration/routes.ts +27 -16
  110. package/src/server/collaboration/service.ts +27 -31
  111. package/src/server/config/deployment.ts +35 -4
  112. package/src/server/config/public.ts +5 -4
  113. package/src/server/config/schema.ts +104 -16
  114. package/src/server/db/expressions.ts +15 -1
  115. package/src/server/db/migrate.ts +34 -114
  116. package/src/server/db/migrations/001_accounts.ts +79 -0
  117. package/src/server/db/migrations/002_workspaces.ts +48 -0
  118. package/src/server/db/migrations/003_storage.ts +44 -0
  119. package/src/server/db/migrations/004_documents.ts +193 -0
  120. package/src/server/db/migrations/005_sharing.ts +95 -0
  121. package/src/server/db/migrations/006_operations.ts +110 -0
  122. package/src/server/db/migrations/007_trash.ts +33 -0
  123. package/src/server/db/migrations/008_terms.ts +18 -0
  124. package/src/server/db/migrations/schema.ts +71 -0
  125. package/src/server/db/tables.ts +70 -7
  126. package/src/server/documents/access.ts +66 -55
  127. package/src/server/documents/errors.ts +7 -0
  128. package/src/server/documents/images.ts +2 -1
  129. package/src/server/documents/limits.ts +9 -9
  130. package/src/server/documents/purge.ts +75 -0
  131. package/src/server/documents/repository.ts +2 -0
  132. package/src/server/documents/routes.ts +132 -80
  133. package/src/server/documents/service.ts +18 -4
  134. package/src/server/documents/summary.ts +1 -0
  135. package/src/server/documents/trash.ts +203 -0
  136. package/src/server/documents/versions/checkpoint.ts +2 -1
  137. package/src/server/documents/versions/history.ts +11 -7
  138. package/src/server/documents/versions/routes.ts +36 -25
  139. package/src/server/documents/versions/service.ts +22 -4
  140. package/src/server/errors/index.ts +99 -0
  141. package/src/server/errors/posthog.ts +80 -0
  142. package/src/server/index.ts +56 -16
  143. package/src/server/internal/index.ts +3 -3
  144. package/src/server/internal/routes.ts +7 -15
  145. package/src/server/internal/schema.ts +1 -1
  146. package/src/server/internal/service.ts +17 -23
  147. package/src/server/invitations/budget.ts +66 -0
  148. package/src/server/invitations/index.ts +1 -0
  149. package/src/server/logging.ts +76 -0
  150. package/src/server/objects/types.ts +12 -0
  151. package/src/server/pictures/routes.ts +4 -2
  152. package/src/server/pictures/service.ts +2 -1
  153. package/src/server/policy/database.ts +39 -25
  154. package/src/server/policy/index.ts +2 -1
  155. package/src/server/policy/keys.ts +5 -2
  156. package/src/server/policy/policy.ts +1 -0
  157. package/src/server/policy/schema.ts +2 -2
  158. package/src/server/policy/service.ts +12 -9
  159. package/src/server/policy/static.ts +5 -5
  160. package/src/server/policy/workspace.ts +41 -0
  161. package/src/server/quota/reconcile.ts +2 -0
  162. package/src/server/quota/storage.ts +69 -31
  163. package/src/server/rate-limit/cleanup.ts +17 -5
  164. package/src/server/rate-limit/index.ts +4 -1
  165. package/src/server/rate-limit/middleware.ts +100 -12
  166. package/src/server/reports/index.ts +8 -0
  167. package/src/server/reports/routes.ts +37 -0
  168. package/src/server/reports/service.ts +123 -0
  169. package/src/server/services/errors.ts +7 -0
  170. package/src/server/services/index.ts +8 -0
  171. package/src/server/{ai → services}/keys.ts +11 -11
  172. package/src/server/services/routes.ts +47 -0
  173. package/src/server/{ai/service.ts → services/tokens.ts} +23 -20
  174. package/src/server/sharing/capabilities/service.ts +68 -22
  175. package/src/server/sharing/document-routes.ts +30 -22
  176. package/src/server/sharing/grants/service.ts +11 -18
  177. package/src/server/sharing/http.ts +4 -0
  178. package/src/server/sharing/invitations/service.ts +21 -11
  179. package/src/server/sharing/policy.ts +9 -14
  180. package/src/server/sharing/routes.ts +108 -85
  181. package/src/server/sharing/service.ts +1 -17
  182. package/src/server/validation.ts +59 -2
  183. package/src/server/workspaces/index.ts +1 -0
  184. package/src/server/workspaces/members.ts +89 -38
  185. package/src/server/workspaces/repository.ts +2 -1
  186. package/src/server/workspaces/routes.ts +67 -45
  187. package/src/{ai-relay → services}/app.ts +48 -44
  188. package/src/{ai-relay → services}/config.ts +25 -19
  189. package/src/services/db/index.ts +10 -0
  190. package/src/services/db/migrate.ts +37 -0
  191. package/src/{ai-relay/db/migrations/001_usage.ts → services/db/migrations/001_baseline.ts} +18 -7
  192. package/src/services/db/schema.ts +22 -0
  193. package/src/services/index.ts +18 -0
  194. package/src/{ai-relay → services}/metering.ts +2 -2
  195. package/src/{ai-relay → services}/usage.ts +43 -19
  196. package/dist/bin/ai-relay.mjs.map +0 -1
  197. package/src/ai-relay/db/index.ts +0 -10
  198. package/src/ai-relay/db/migrate.ts +0 -32
  199. package/src/ai-relay/db/schema.ts +0 -20
  200. package/src/ai-relay/index.ts +0 -18
  201. package/src/contract/ai.ts +0 -150
  202. package/src/runtime/cloudflare/relay.ts +0 -136
  203. package/src/server/ai/errors.ts +0 -7
  204. package/src/server/ai/index.ts +0 -4
  205. package/src/server/ai/routes.ts +0 -43
  206. package/src/server/auth/workspace-access.ts +0 -23
  207. package/src/server/db/migrations/001_foundation.ts +0 -164
  208. package/src/server/db/migrations/002_upload_cleanup_claims.ts +0 -34
  209. package/src/server/db/migrations/003_document_cleanup_claims.ts +0 -23
  210. package/src/server/db/migrations/004_document_sharing.ts +0 -82
  211. package/src/server/db/migrations/005_document_collaboration_epoch.ts +0 -13
  212. package/src/server/db/migrations/006_invitation_continuation.ts +0 -27
  213. package/src/server/db/migrations/007_collaboration_state.ts +0 -25
  214. package/src/server/db/migrations/008_storage_reservations.ts +0 -37
  215. package/src/server/db/migrations/009_workspace_entitlements.ts +0 -22
  216. package/src/server/db/migrations/010_upload_finalization.ts +0 -22
  217. package/src/server/db/migrations/011_upload_finalization_lease.ts +0 -12
  218. package/src/server/db/migrations/012_transactional_email.ts +0 -48
  219. package/src/server/db/migrations/013_admin_enrollment.ts +0 -54
  220. package/src/server/db/migrations/014_enrollment_email_kinds.ts +0 -30
  221. package/src/server/db/migrations/015_cloud_rate_limit.ts +0 -22
  222. package/src/server/db/migrations/016_auth_schema.ts +0 -16
  223. package/src/server/db/migrations/017_authentication_email_kinds.ts +0 -32
  224. package/src/server/db/migrations/018_authentication_mfa.ts +0 -78
  225. package/src/server/db/migrations/019_better_auth_account_issuer.ts +0 -42
  226. package/src/server/db/migrations/020_workspace_invitations.ts +0 -57
  227. package/src/server/db/migrations/021_document_versions.ts +0 -66
  228. package/src/server/db/migrations/022_entitlement_external_version.ts +0 -17
  229. package/src/server/db/migrations/023_document_images.ts +0 -61
  230. package/src/server/db/migrations/024_account_activity.ts +0 -66
  231. package/src/server/db/migrations/025_table_names.ts +0 -58
  232. package/src/server/db/migrations/026_user_picture.ts +0 -30
  233. package/src/server/db/migrations/027_document_kind.ts +0 -19
  234. package/src/server/db/migrations/helpers.ts +0 -78
  235. /package/dist/bin/{ai-relay.d.mts → services.d.mts} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,7 +1,13 @@
1
1
  import * as v from "valibot";
2
2
  import * as Y from "yjs";
3
+ import { Hono, TypedResponse } from "hono";
4
+ import { BlankEnv, BlankInput, ToSchema } from "hono/types";
3
5
  //#region src/contract/account.d.ts
4
- declare const cloudAccountStateSchema: v.PicklistSchema<["active", "pending", "rejected", "revoked"], undefined>;
6
+ /**
7
+ * Where an account stands: it may use the server, waits for an administrator, was refused or had
8
+ * its access taken back, or has to accept the server's current terms first.
9
+ */
10
+ declare const cloudAccountStateSchema: v.PicklistSchema<["active", "pending", "rejected", "revoked", "terms"], undefined>;
5
11
  declare const cloudIdentitySchema: v.ObjectSchema<{
6
12
  readonly userId: v.StringSchema<undefined>;
7
13
  readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
@@ -19,7 +25,11 @@ declare const cloudAccountStatusResponseSchema: v.ObjectSchema<{
19
25
  readonly image: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
20
26
  readonly deploymentRole: v.OptionalSchema<v.PicklistSchema<["user", "admin"], undefined>, undefined>;
21
27
  }, undefined>;
22
- readonly state: v.PicklistSchema<["active", "pending", "rejected", "revoked"], undefined>;
28
+ readonly state: v.PicklistSchema<["active", "pending", "rejected", "revoked", "terms"], undefined>;
29
+ }, undefined>;
30
+ /** Accepting the server's terms: the version the person read, which must be the current one. */
31
+ declare const cloudTermsAcceptanceSchema: v.ObjectSchema<{
32
+ readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
23
33
  }, undefined>;
24
34
  declare const cloudAuthenticationProviderSchema: v.PicklistSchema<["credential", "google", "apple"], undefined>;
25
35
  declare const cloudAuthenticationMethodSchema: v.ObjectSchema<{
@@ -51,10 +61,10 @@ declare const cloudSocialLinkResponseSchema: v.ObjectSchema<{
51
61
  declare const cloudUnlinkAuthenticationMethodSchema: v.ObjectSchema<{
52
62
  readonly methodId: v.StringSchema<undefined>;
53
63
  }, undefined>;
54
- declare const accountSecurityErrorCodeSchema: v.PicklistSchema<["current_password_invalid", "password_too_short", "password_too_long", "last_authentication_method", "session_not_fresh", "authentication_method_failed", "email_unchanged", "email_change_unavailable", "current_session", "picture_invalid"], undefined>;
64
+ declare const accountSecurityErrorCodeSchema: v.PicklistSchema<["current_password_invalid", "password_too_short", "password_too_long", "last_authentication_method", "session_not_fresh", "authentication_method_failed", "email_unchanged", "email_change_unavailable", "current_session", "picture_invalid", "account_sole_admin", "last_admin_required", "terms_changed"], undefined>;
55
65
  declare const accountSecurityErrorResponseSchema: v.ObjectSchema<{
56
66
  readonly error: v.ObjectSchema<{
57
- readonly code: v.PicklistSchema<["current_password_invalid", "password_too_short", "password_too_long", "last_authentication_method", "session_not_fresh", "authentication_method_failed", "email_unchanged", "email_change_unavailable", "current_session", "picture_invalid"], undefined>;
67
+ readonly code: v.PicklistSchema<["current_password_invalid", "password_too_short", "password_too_long", "last_authentication_method", "session_not_fresh", "authentication_method_failed", "email_unchanged", "email_change_unavailable", "current_session", "picture_invalid", "account_sole_admin", "last_admin_required", "terms_changed"], undefined>;
58
68
  }, undefined>;
59
69
  }, undefined>;
60
70
  declare const cloudMFAStatusSchema: v.ObjectSchema<{
@@ -108,6 +118,9 @@ declare const cloudPasskeysResponseSchema: v.ObjectSchema<{
108
118
  declare const cloudPasskeyDeleteSchema: v.ObjectSchema<{
109
119
  readonly id: v.StringSchema<undefined>;
110
120
  }, undefined>;
121
+ declare function parseCloudTermsAcceptance(input: unknown): {
122
+ version: string;
123
+ };
111
124
  declare function parseCloudMFAEnable(input: unknown): {
112
125
  password?: string | undefined;
113
126
  };
@@ -234,6 +247,71 @@ declare const cloudSignInsResponseSchema: v.ObjectSchema<{
234
247
  readonly createdAt: v.StringSchema<undefined>;
235
248
  }, undefined>, undefined>;
236
249
  }, undefined>;
250
+ /** A workspace an account deletion reads: one it would delete, or one that stops it. */
251
+ declare const cloudAccountDeletionWorkspaceSchema: v.ObjectSchema<{
252
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
253
+ readonly name: v.StringSchema<undefined>;
254
+ }, undefined>;
255
+ /** A document the account would lose, which Download all saves first. */
256
+ declare const cloudAccountDeletionDocumentSchema: v.ObjectSchema<{
257
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
258
+ readonly name: v.StringSchema<undefined>;
259
+ readonly workspaceName: v.StringSchema<undefined>;
260
+ }, undefined>;
261
+ /**
262
+ * What deleting the account takes: the workspaces only it belongs to, which go with their
263
+ * documents; the ones it leaves to their other members; the ones it alone administers for other
264
+ * members, which stop the deletion until it makes someone else an admin; and the documents it
265
+ * would lose, those workspaces' and the ones it created in workspaces it leaves.
266
+ */
267
+ declare const cloudAccountDeletionSchema: v.ObjectSchema<{
268
+ /** The account is the deployment's only administrator, which also stops the deletion. */
269
+ readonly lastAdministrator: v.BooleanSchema<undefined>;
270
+ readonly blockedBy: v.ArraySchema<v.ObjectSchema<{
271
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
272
+ readonly name: v.StringSchema<undefined>;
273
+ }, undefined>, undefined>;
274
+ readonly deletes: v.ArraySchema<v.ObjectSchema<{
275
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
276
+ readonly name: v.StringSchema<undefined>;
277
+ }, undefined>, undefined>;
278
+ readonly leaves: v.ArraySchema<v.ObjectSchema<{
279
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
280
+ readonly name: v.StringSchema<undefined>;
281
+ }, undefined>, undefined>;
282
+ readonly documents: v.ArraySchema<v.ObjectSchema<{
283
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
284
+ readonly name: v.StringSchema<undefined>;
285
+ readonly workspaceName: v.StringSchema<undefined>;
286
+ }, undefined>, undefined>;
287
+ }, undefined>;
288
+ declare const cloudAccountDeletionResponseSchema: v.ObjectSchema<{
289
+ readonly deletion: v.ObjectSchema<{
290
+ /** The account is the deployment's only administrator, which also stops the deletion. */
291
+ readonly lastAdministrator: v.BooleanSchema<undefined>;
292
+ readonly blockedBy: v.ArraySchema<v.ObjectSchema<{
293
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
294
+ readonly name: v.StringSchema<undefined>;
295
+ }, undefined>, undefined>;
296
+ readonly deletes: v.ArraySchema<v.ObjectSchema<{
297
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
298
+ readonly name: v.StringSchema<undefined>;
299
+ }, undefined>, undefined>;
300
+ readonly leaves: v.ArraySchema<v.ObjectSchema<{
301
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
302
+ readonly name: v.StringSchema<undefined>;
303
+ }, undefined>, undefined>;
304
+ readonly documents: v.ArraySchema<v.ObjectSchema<{
305
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
306
+ readonly name: v.StringSchema<undefined>;
307
+ readonly workspaceName: v.StringSchema<undefined>;
308
+ }, undefined>, undefined>;
309
+ }, undefined>;
310
+ }, undefined>;
311
+ /** The password, for a session that signed in too long ago to delete the account on its own. */
312
+ declare const cloudAccountDeleteSchema: v.ObjectSchema<{
313
+ readonly password: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
314
+ }, undefined>;
237
315
  declare function parseCloudProfileUpdate(input: unknown): {
238
316
  name: string;
239
317
  };
@@ -244,6 +322,9 @@ declare function parseCloudEmailChange(input: unknown): {
244
322
  newEmail: string;
245
323
  callbackURL: string;
246
324
  };
325
+ declare function parseCloudAccountDelete(input: unknown): {
326
+ password?: string | undefined;
327
+ };
247
328
  declare function parseCloudSessionRevoke(input: unknown): {
248
329
  sessionId: string;
249
330
  };
@@ -256,62 +337,71 @@ type CloudProfile = v.InferOutput<typeof cloudProfileSchema>;
256
337
  type CloudSignInMethod = v.InferOutput<typeof cloudSignInMethodSchema>;
257
338
  type CloudAccountSession = v.InferOutput<typeof cloudAccountSessionSchema>;
258
339
  type CloudSignIn = v.InferOutput<typeof cloudSignInSchema>;
340
+ type CloudAccountDeletion = v.InferOutput<typeof cloudAccountDeletionSchema>;
259
341
  //#endregion
260
- //#region src/contract/ai.d.ts
342
+ //#region src/contract/services.d.ts
261
343
  /**
262
- * The contract between editors, Cloud, and an AI service. Cloud only advertises the service and
263
- * signs short-lived tokens for it; the service, official or self-hosted, proxies models and keeps
264
- * the credit wallet. It is versioned apart from the Cloud protocol so a service can change without
265
- * a Cloud release.
344
+ * The contract between editors, Cloud, and the services Cloud advertises: AI models today, and
345
+ * other paid capabilities such as image generation and search as they arrive. Cloud only
346
+ * advertises the service and signs short-lived tokens for it; the service, official or
347
+ * self-hosted, calls the providers and keeps the credit wallet. It is versioned apart from the
348
+ * Cloud protocol so a service can change without a Cloud release.
266
349
  */
267
- declare const CLOUD_AI_CONTRACT_VERSION: "1";
268
- /** The `aud` of every token Cloud signs for an AI service. */
269
- declare const CLOUD_AI_TOKEN_AUDIENCE: "openpencil-ai";
270
- /** Where Cloud publishes the public keys an AI service verifies its tokens with. */
271
- declare const CLOUD_AI_JWKS_PATH: "/.well-known/jwks.json";
350
+ declare const CLOUD_SERVICES_CONTRACT_VERSION: "1";
351
+ /** The `aud` of every token Cloud signs for its services. */
352
+ declare const CLOUD_SERVICES_TOKEN_AUDIENCE: "openpencil-services";
353
+ /** Where Cloud publishes the public keys a service verifies its tokens with. */
354
+ declare const CLOUD_SERVICES_JWKS_PATH: "/.well-known/jwks.json";
272
355
  /**
273
356
  * Where a service answers, below the discovered `endpoint`. Model requests follow the OpenAI chat
274
357
  * completions API, so an OpenAI-compatible client takes `${endpoint}${base}` as its base URL.
275
358
  */
276
- declare const CLOUD_AI_API_PATHS: {
359
+ declare const CLOUD_SERVICES_API_PATHS: {
277
360
  readonly base: "/v1";
278
361
  readonly chatCompletions: "/v1/chat/completions";
279
362
  readonly catalog: "/v1/catalog";
280
363
  readonly wallet: "/v1/wallet";
281
364
  readonly usage: "/v1/usage";
365
+ readonly search: "/v1/search";
282
366
  };
283
- declare const cloudAIDiscoverySchema: v.ObjectSchema<{
367
+ declare const cloudServicesDiscoverySchema: v.ObjectSchema<{
284
368
  readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
285
369
  readonly contractVersion: v.LiteralSchema<"1", undefined>;
286
370
  }, undefined>;
287
- type CloudAIDiscovery = v.InferOutput<typeof cloudAIDiscoverySchema>;
371
+ type CloudServicesDiscovery = v.InferOutput<typeof cloudServicesDiscoverySchema>;
288
372
  declare const cloudBillingDiscoverySchema: v.ObjectSchema<{
289
373
  readonly portalURL: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
290
374
  }, undefined>;
291
375
  type CloudBillingDiscovery = v.InferOutput<typeof cloudBillingDiscoverySchema>;
292
- declare const createAITokenSchema: v.ObjectSchema<{
376
+ declare const createServicesTokenSchema: v.ObjectSchema<{
293
377
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
294
378
  }, undefined>;
295
- type CreateAITokenInput = v.InferOutput<typeof createAITokenSchema>;
296
- declare function parseCreateAIToken(input: unknown): CreateAITokenInput;
297
- declare const aiTokenSchema: v.ObjectSchema<{
379
+ type CreateServicesTokenInput = v.InferOutput<typeof createServicesTokenSchema>;
380
+ declare function parseCreateServicesToken(input: unknown): CreateServicesTokenInput;
381
+ declare const servicesTokenSchema: v.ObjectSchema<{
298
382
  readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
299
383
  readonly expiresAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
300
384
  }, undefined>;
301
- type AIToken = v.InferOutput<typeof aiTokenSchema>;
302
- /** What an AI service may rely on once a token's signature, issuer, audience, and expiry check. */
303
- declare const aiTokenClaimsSchema: v.ObjectSchema<{
385
+ type ServicesToken = v.InferOutput<typeof servicesTokenSchema>;
386
+ /** What a service may rely on once a token's signature, issuer, audience, and expiry check. */
387
+ declare const servicesTokenClaimsSchema: v.ObjectSchema<{
304
388
  readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
305
- readonly aud: v.LiteralSchema<"openpencil-ai", undefined>;
389
+ readonly aud: v.LiteralSchema<"openpencil-services", undefined>;
306
390
  readonly sub: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
307
391
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
308
- /** Credits the workspace's plan grants each month; `null` when Cloud sets no allowance. */
392
+ /**
393
+ * The account whose credits the request spends: the workspace's owner, whose allowance every
394
+ * workspace they own shares. Absent from tokens a Cloud from before account plans issued, which
395
+ * a relay takes as the workspace's own allowance, as such a Cloud meant.
396
+ */
397
+ readonly accountId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
398
+ /** Credits the owner's plan grants each month; `null` when Cloud sets no allowance. */
309
399
  readonly monthlyCreditAllowance: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
310
400
  readonly iat: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
311
401
  readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
312
402
  }, undefined>;
313
- type AITokenClaims = v.InferOutput<typeof aiTokenClaimsSchema>;
314
- declare const aiModelSchema: v.ObjectSchema<{
403
+ type ServicesTokenClaims = v.InferOutput<typeof servicesTokenClaimsSchema>;
404
+ declare const chatModelSchema: v.ObjectSchema<{
315
405
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
316
406
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
317
407
  /** Credits per million input and output tokens. */
@@ -324,8 +414,13 @@ declare const aiModelSchema: v.ObjectSchema<{
324
414
  readonly tools: v.BooleanSchema<undefined>;
325
415
  }, undefined>;
326
416
  }, undefined>;
327
- type AIModel = v.InferOutput<typeof aiModelSchema>;
328
- declare const aiCatalogSchema: v.ObjectSchema<{
417
+ type ChatModel = v.InferOutput<typeof chatModelSchema>;
418
+ /** What one web search costs; a service without search leaves it out of its catalog. */
419
+ declare const searchPricingSchema: v.ObjectSchema<{
420
+ readonly creditsPerRequest: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
421
+ }, undefined>;
422
+ type SearchPricing = v.InferOutput<typeof searchPricingSchema>;
423
+ declare const serviceCatalogSchema: v.ObjectSchema<{
329
424
  readonly models: v.ArraySchema<v.ObjectSchema<{
330
425
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
331
426
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -340,19 +435,22 @@ declare const aiCatalogSchema: v.ObjectSchema<{
340
435
  }, undefined>;
341
436
  }, undefined>, undefined>;
342
437
  readonly defaultModelID: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
438
+ readonly search: v.OptionalSchema<v.ObjectSchema<{
439
+ readonly creditsPerRequest: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
440
+ }, undefined>, undefined>;
343
441
  }, undefined>;
344
- type AICatalog = v.InferOutput<typeof aiCatalogSchema>;
345
- declare const aiCreditBucketSchema: v.ObjectSchema<{
442
+ type ServiceCatalog = v.InferOutput<typeof serviceCatalogSchema>;
443
+ declare const creditBucketSchema: v.ObjectSchema<{
346
444
  readonly kind: v.PicklistSchema<["allowance", "purchased", "grant"], undefined>;
347
445
  readonly remaining: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
348
446
  readonly expiresAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
349
447
  }, undefined>;
350
- type AICreditBucket = v.InferOutput<typeof aiCreditBucketSchema>;
448
+ type CreditBucket = v.InferOutput<typeof creditBucketSchema>;
351
449
  /**
352
450
  * A service records a request's charge before the request's answer ends, so a wallet read after
353
451
  * an answer includes what it cost.
354
452
  */
355
- declare const aiWalletSchema: v.ObjectSchema<{
453
+ declare const creditWalletSchema: v.ObjectSchema<{
356
454
  /** Credits left to spend; `null` when the service sets no limit. */
357
455
  readonly balance: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
358
456
  /** Spent first to last. */
@@ -362,8 +460,8 @@ declare const aiWalletSchema: v.ObjectSchema<{
362
460
  readonly expiresAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
363
461
  }, undefined>, undefined>;
364
462
  }, undefined>;
365
- type AIWallet = v.InferOutput<typeof aiWalletSchema>;
366
- declare const aiUsageEntrySchema: v.ObjectSchema<{
463
+ type CreditWallet = v.InferOutput<typeof creditWalletSchema>;
464
+ declare const usageEntrySchema: v.ObjectSchema<{
367
465
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
368
466
  readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
369
467
  readonly kind: v.PicklistSchema<["model", "image", "search"], undefined>;
@@ -371,13 +469,43 @@ declare const aiUsageEntrySchema: v.ObjectSchema<{
371
469
  readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
372
470
  readonly credits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
373
471
  }, undefined>;
374
- type AIUsageEntry = v.InferOutput<typeof aiUsageEntrySchema>;
375
- declare const aiUsageQuerySchema: v.ObjectSchema<{
472
+ type UsageEntry = v.InferOutput<typeof usageEntrySchema>;
473
+ /** The most results one search returns. */
474
+ declare const MAX_SEARCH_RESULTS = 10;
475
+ /** The longest query a search takes, in characters. */
476
+ declare const MAX_SEARCH_QUERY_LENGTH = 1000;
477
+ declare const searchRequestSchema: v.ObjectSchema<{
478
+ readonly query: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 1000, undefined>]>;
479
+ readonly numResults: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 10, undefined>]>, 5>;
480
+ }, undefined>;
481
+ type SearchRequestInput = v.InferInput<typeof searchRequestSchema>;
482
+ type SearchRequest = v.InferOutput<typeof searchRequestSchema>;
483
+ declare function parseSearchRequest(input: unknown): SearchRequest;
484
+ /** One page a search found, with the part of its text that answers the query. */
485
+ declare const searchResultSchema: v.ObjectSchema<{
486
+ readonly url: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, v.RegexAction<string, "A search result links to an HTTP(S) page">]>;
487
+ readonly title: v.StringSchema<undefined>;
488
+ readonly publishedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
489
+ readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
490
+ readonly text: v.StringSchema<undefined>;
491
+ }, undefined>;
492
+ type SearchResult = v.InferOutput<typeof searchResultSchema>;
493
+ declare const searchResponseSchema: v.ObjectSchema<{
494
+ readonly results: v.ArraySchema<v.ObjectSchema<{
495
+ readonly url: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, v.RegexAction<string, "A search result links to an HTTP(S) page">]>;
496
+ readonly title: v.StringSchema<undefined>;
497
+ readonly publishedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
498
+ readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
499
+ readonly text: v.StringSchema<undefined>;
500
+ }, undefined>, undefined>;
501
+ }, undefined>;
502
+ type SearchResponse = v.InferOutput<typeof searchResponseSchema>;
503
+ declare const usageQuerySchema: v.ObjectSchema<{
376
504
  readonly cursor: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
377
505
  }, undefined>;
378
- type AIUsageQuery = v.InferOutput<typeof aiUsageQuerySchema>;
379
- declare function parseAIUsageQuery(input: unknown): AIUsageQuery;
380
- declare const aiUsagePageSchema: v.ObjectSchema<{
506
+ type UsageQuery = v.InferOutput<typeof usageQuerySchema>;
507
+ declare function parseUsageQuery(input: unknown): UsageQuery;
508
+ declare const usagePageSchema: v.ObjectSchema<{
381
509
  readonly entries: v.ArraySchema<v.ObjectSchema<{
382
510
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
383
511
  readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -388,31 +516,47 @@ declare const aiUsagePageSchema: v.ObjectSchema<{
388
516
  }, undefined>, undefined>;
389
517
  readonly next: v.NullableSchema<v.StringSchema<undefined>, undefined>;
390
518
  }, undefined>;
391
- type AIUsagePage = v.InferOutput<typeof aiUsagePageSchema>;
392
- /** Errors an AI service answers with, beside the upstream model's own. */
393
- declare const aiErrorCodeSchema: v.PicklistSchema<["unauthorized", "insufficient_credits", "model_not_allowed", "rate_limited"], undefined>;
394
- type AIErrorCode = v.InferOutput<typeof aiErrorCodeSchema>;
395
- declare const aiErrorSchema: v.ObjectSchema<{
519
+ type UsagePage = v.InferOutput<typeof usagePageSchema>;
520
+ /** Errors a service answers with, beside the upstream provider's own. */
521
+ declare const serviceErrorCodeSchema: v.PicklistSchema<["invalid_request", "unauthorized", "insufficient_credits", "model_not_allowed", "capability_unavailable", "rate_limited"], undefined>;
522
+ type ServiceErrorCode = v.InferOutput<typeof serviceErrorCodeSchema>;
523
+ declare const serviceErrorSchema: v.ObjectSchema<{
396
524
  readonly error: v.ObjectSchema<{
397
- readonly code: v.PicklistSchema<["unauthorized", "insufficient_credits", "model_not_allowed", "rate_limited"], undefined>;
525
+ readonly code: v.PicklistSchema<["invalid_request", "unauthorized", "insufficient_credits", "model_not_allowed", "capability_unavailable", "rate_limited"], undefined>;
398
526
  readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
399
527
  /** With `insufficient_credits`: when the workspace's allowance renews, if the service knows. */
400
528
  readonly resetsAt: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
401
529
  }, undefined>;
402
530
  }, undefined>;
403
- type AIError = v.InferOutput<typeof aiErrorSchema>;
404
- declare const AI_ERROR_STATUS: {
531
+ type ServiceError = v.InferOutput<typeof serviceErrorSchema>;
532
+ declare const SERVICE_ERROR_STATUS: {
533
+ readonly invalid_request: 400;
405
534
  readonly unauthorized: 401;
406
535
  readonly insufficient_credits: 402;
407
536
  readonly model_not_allowed: 403;
537
+ /** A capability, such as search, the service does not offer. */
538
+ readonly capability_unavailable: 404;
408
539
  readonly rate_limited: 429;
409
540
  };
541
+ /** A route's input, and the JSON it answers with a 200. */
542
+ type JSONRoute<Method extends string, Path extends string, Input extends BlankInput, Output> = ToSchema<Method, Path, Input, TypedResponse<Output, 200, 'json'>>;
543
+ /**
544
+ * Every route a service answers besides chat completions, which OpenAI-compatible clients call
545
+ * themselves. Editors build a typed client from it with Hono's `hc`; a service's own app must
546
+ * match it, so the two cannot drift apart.
547
+ */
548
+ type CloudServicesSchema = JSONRoute<'get', typeof CLOUD_SERVICES_API_PATHS.catalog, BlankInput, ServiceCatalog> & JSONRoute<'get', typeof CLOUD_SERVICES_API_PATHS.wallet, BlankInput, CreditWallet> & JSONRoute<'get', typeof CLOUD_SERVICES_API_PATHS.usage, {
549
+ query: UsageQuery;
550
+ }, UsagePage> & JSONRoute<'post', typeof CLOUD_SERVICES_API_PATHS.search, {
551
+ json: SearchRequestInput;
552
+ }, SearchResponse>;
553
+ type CloudServicesAPI = Hono<BlankEnv, CloudServicesSchema>;
410
554
  //#endregion
411
555
  //#region src/contract/admin/index.d.ts
412
- declare const adminErrorCodeSchema: v.PicklistSchema<["bad_request", "unauthorized", "forbidden", "not_found", "rate_limited", "invalid_enrollment_transition", "last_admin_required", "self_admin_action_forbidden", "email_regeneration_unavailable", "mfa_required"], undefined>;
556
+ declare const adminErrorCodeSchema: v.PicklistSchema<["bad_request", "unauthorized", "forbidden", "not_found", "rate_limited", "invalid_enrollment_transition", "last_admin_required", "self_admin_action_forbidden", "email_regeneration_unavailable", "mfa_required", "document_not_restorable", "workspace_gone"], undefined>;
413
557
  declare const adminErrorResponseSchema: v.ObjectSchema<{
414
558
  readonly error: v.ObjectSchema<{
415
- readonly code: v.PicklistSchema<["bad_request", "unauthorized", "forbidden", "not_found", "rate_limited", "invalid_enrollment_transition", "last_admin_required", "self_admin_action_forbidden", "email_regeneration_unavailable", "mfa_required"], undefined>;
559
+ readonly code: v.PicklistSchema<["bad_request", "unauthorized", "forbidden", "not_found", "rate_limited", "invalid_enrollment_transition", "last_admin_required", "self_admin_action_forbidden", "email_regeneration_unavailable", "mfa_required", "document_not_restorable", "workspace_gone"], undefined>;
416
560
  }, undefined>;
417
561
  }, undefined>;
418
562
  declare const enrollmentStatusSchema: v.PicklistSchema<["pending", "approved", "rejected", "revoked"], undefined>;
@@ -606,7 +750,7 @@ declare const adminAuditEventSchema: v.ObjectSchema<{
606
750
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
607
751
  }, undefined>;
608
752
  readonly action: v.StringSchema<undefined>;
609
- /** What the event is about: an account, an access request, or an email. */
753
+ /** What the event is about: an account, an access request, an email, or a document. */
610
754
  readonly subject: v.ObjectSchema<{
611
755
  readonly type: v.StringSchema<undefined>;
612
756
  readonly id: v.StringSchema<undefined>;
@@ -616,10 +760,10 @@ declare const adminAuditEventSchema: v.ObjectSchema<{
616
760
  readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
617
761
  }, undefined>;
618
762
  /** Which events a list of activity shows, by what they are about. */
619
- declare const cloudAdminAuditFilterSchema: v.PicklistSchema<["all", "accounts", "requests", "email"], undefined>;
763
+ declare const cloudAdminAuditFilterSchema: v.PicklistSchema<["all", "accounts", "requests", "email", "documents"], undefined>;
620
764
  declare const adminAuditResponseSchema: v.ObjectSchema<{
621
765
  readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
622
- readonly counts: v.ObjectSchema<Record<"email" | "all" | "accounts" | "requests", v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>, undefined>;
766
+ readonly counts: v.ObjectSchema<Record<"email" | "documents" | "all" | "accounts" | "requests", v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>, undefined>;
623
767
  readonly events: v.ArraySchema<v.ObjectSchema<{
624
768
  readonly id: v.StringSchema<undefined>;
625
769
  readonly actor: v.ObjectSchema<{
@@ -627,7 +771,7 @@ declare const adminAuditResponseSchema: v.ObjectSchema<{
627
771
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
628
772
  }, undefined>;
629
773
  readonly action: v.StringSchema<undefined>;
630
- /** What the event is about: an account, an access request, or an email. */
774
+ /** What the event is about: an account, an access request, an email, or a document. */
631
775
  readonly subject: v.ObjectSchema<{
632
776
  readonly type: v.StringSchema<undefined>;
633
777
  readonly id: v.StringSchema<undefined>;
@@ -637,11 +781,168 @@ declare const adminAuditResponseSchema: v.ObjectSchema<{
637
781
  readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
638
782
  }, undefined>, undefined>;
639
783
  }, undefined>;
784
+ /** A document as the console shows it: where it lives, who made it, and whether it is taken down. */
785
+ declare const cloudAdminDocumentSchema: v.ObjectSchema<{
786
+ readonly id: v.StringSchema<undefined>;
787
+ readonly name: v.StringSchema<undefined>;
788
+ readonly workspace: v.ObjectSchema<{
789
+ readonly id: v.StringSchema<undefined>;
790
+ readonly name: v.StringSchema<undefined>;
791
+ }, undefined>;
792
+ /** Who made it, while the server knows them. */
793
+ readonly owner: v.NullableSchema<v.ObjectSchema<{
794
+ readonly id: v.StringSchema<undefined>;
795
+ readonly name: v.StringSchema<undefined>;
796
+ readonly email: v.StringSchema<undefined>;
797
+ }, undefined>, undefined>;
798
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
799
+ readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
800
+ readonly disabledAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
801
+ readonly disabledReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
802
+ /** Reports about it still waiting for a decision. */
803
+ readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
804
+ /**
805
+ * When someone deleted it forever, and when cleanup destroys it; until then an administrator
806
+ * can still restore it. Servers from before Trash send neither.
807
+ */
808
+ readonly purgedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
809
+ readonly destroyedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
810
+ }, undefined>;
811
+ /** Which documents a list shows: live ones, or those deleted forever an administrator can restore. */
812
+ declare const cloudAdminDocumentFilterSchema: v.PicklistSchema<["all", "reported", "disabled", "purged"], undefined>;
813
+ declare const cloudAdminDocumentsResponseSchema: v.ObjectSchema<{
814
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
815
+ readonly counts: v.ObjectSchema<Record<"all" | "reported" | "disabled" | "purged", v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>, undefined>;
816
+ readonly documents: v.ArraySchema<v.ObjectSchema<{
817
+ readonly id: v.StringSchema<undefined>;
818
+ readonly name: v.StringSchema<undefined>;
819
+ readonly workspace: v.ObjectSchema<{
820
+ readonly id: v.StringSchema<undefined>;
821
+ readonly name: v.StringSchema<undefined>;
822
+ }, undefined>;
823
+ /** Who made it, while the server knows them. */
824
+ readonly owner: v.NullableSchema<v.ObjectSchema<{
825
+ readonly id: v.StringSchema<undefined>;
826
+ readonly name: v.StringSchema<undefined>;
827
+ readonly email: v.StringSchema<undefined>;
828
+ }, undefined>, undefined>;
829
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
830
+ readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
831
+ readonly disabledAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
832
+ readonly disabledReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
833
+ /** Reports about it still waiting for a decision. */
834
+ readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
835
+ /**
836
+ * When someone deleted it forever, and when cleanup destroys it; until then an administrator
837
+ * can still restore it. Servers from before Trash send neither.
838
+ */
839
+ readonly purgedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
840
+ readonly destroyedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
841
+ }, undefined>, undefined>;
842
+ }, undefined>;
843
+ declare const cloudAdminReportStatusSchema: v.PicklistSchema<["open", "dismissed", "actioned"], undefined>;
844
+ declare const cloudAdminReportSchema: v.ObjectSchema<{
845
+ readonly id: v.StringSchema<undefined>;
846
+ readonly reason: v.PicklistSchema<["spam-phishing", "illegal", "copyright", "harassment", "other"], undefined>;
847
+ readonly description: v.StringSchema<undefined>;
848
+ readonly status: v.PicklistSchema<["open", "dismissed", "actioned"], undefined>;
849
+ /** The account that filed it, or null for a guest. */
850
+ readonly reporter: v.NullableSchema<v.ObjectSchema<{
851
+ readonly id: v.StringSchema<undefined>;
852
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
853
+ }, undefined>, undefined>;
854
+ readonly replyEmail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
855
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
856
+ readonly resolvedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
857
+ readonly document: v.ObjectSchema<{
858
+ readonly id: v.StringSchema<undefined>;
859
+ readonly name: v.StringSchema<undefined>;
860
+ readonly workspace: v.ObjectSchema<{
861
+ readonly id: v.StringSchema<undefined>;
862
+ readonly name: v.StringSchema<undefined>;
863
+ }, undefined>;
864
+ /** Who made it, while the server knows them. */
865
+ readonly owner: v.NullableSchema<v.ObjectSchema<{
866
+ readonly id: v.StringSchema<undefined>;
867
+ readonly name: v.StringSchema<undefined>;
868
+ readonly email: v.StringSchema<undefined>;
869
+ }, undefined>, undefined>;
870
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
871
+ readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
872
+ readonly disabledAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
873
+ readonly disabledReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
874
+ /** Reports about it still waiting for a decision. */
875
+ readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
876
+ /**
877
+ * When someone deleted it forever, and when cleanup destroys it; until then an administrator
878
+ * can still restore it. Servers from before Trash send neither.
879
+ */
880
+ readonly purgedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
881
+ readonly destroyedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
882
+ }, undefined>;
883
+ /** The link it was opened from, and whether that link still works. */
884
+ readonly share: v.NullableSchema<v.ObjectSchema<{
885
+ readonly id: v.StringSchema<undefined>;
886
+ readonly revoked: v.BooleanSchema<undefined>;
887
+ }, undefined>, undefined>;
888
+ }, undefined>;
889
+ /** Which reports a list shows, by where they stand. */
890
+ declare const cloudAdminReportFilterSchema: v.PicklistSchema<["open", "actioned", "dismissed", "all"], undefined>;
891
+ declare const cloudAdminReportsResponseSchema: v.ObjectSchema<{
892
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
893
+ readonly counts: v.ObjectSchema<Record<"all" | "open" | "dismissed" | "actioned", v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>, undefined>;
894
+ readonly reports: v.ArraySchema<v.ObjectSchema<{
895
+ readonly id: v.StringSchema<undefined>;
896
+ readonly reason: v.PicklistSchema<["spam-phishing", "illegal", "copyright", "harassment", "other"], undefined>;
897
+ readonly description: v.StringSchema<undefined>;
898
+ readonly status: v.PicklistSchema<["open", "dismissed", "actioned"], undefined>;
899
+ /** The account that filed it, or null for a guest. */
900
+ readonly reporter: v.NullableSchema<v.ObjectSchema<{
901
+ readonly id: v.StringSchema<undefined>;
902
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
903
+ }, undefined>, undefined>;
904
+ readonly replyEmail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
905
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
906
+ readonly resolvedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
907
+ readonly document: v.ObjectSchema<{
908
+ readonly id: v.StringSchema<undefined>;
909
+ readonly name: v.StringSchema<undefined>;
910
+ readonly workspace: v.ObjectSchema<{
911
+ readonly id: v.StringSchema<undefined>;
912
+ readonly name: v.StringSchema<undefined>;
913
+ }, undefined>;
914
+ /** Who made it, while the server knows them. */
915
+ readonly owner: v.NullableSchema<v.ObjectSchema<{
916
+ readonly id: v.StringSchema<undefined>;
917
+ readonly name: v.StringSchema<undefined>;
918
+ readonly email: v.StringSchema<undefined>;
919
+ }, undefined>, undefined>;
920
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
921
+ readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
922
+ readonly disabledAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
923
+ readonly disabledReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
924
+ /** Reports about it still waiting for a decision. */
925
+ readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
926
+ /**
927
+ * When someone deleted it forever, and when cleanup destroys it; until then an administrator
928
+ * can still restore it. Servers from before Trash send neither.
929
+ */
930
+ readonly purgedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
931
+ readonly destroyedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
932
+ }, undefined>;
933
+ /** The link it was opened from, and whether that link still works. */
934
+ readonly share: v.NullableSchema<v.ObjectSchema<{
935
+ readonly id: v.StringSchema<undefined>;
936
+ readonly revoked: v.BooleanSchema<undefined>;
937
+ }, undefined>, undefined>;
938
+ }, undefined>, undefined>;
939
+ }, undefined>;
640
940
  declare const adminOperationsResponseSchema: v.ObjectSchema<{
641
941
  readonly deployment: v.PicklistSchema<["official", "self-hosted"], undefined>;
642
942
  readonly enrollmentMode: v.PicklistSchema<["open", "approval", "closed"], undefined>;
643
943
  readonly emailTransport: v.PicklistSchema<["none", "smtp", "cloudflare"], undefined>;
644
944
  readonly pendingEnrollment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
945
+ readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
645
946
  readonly pendingEmail: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
646
947
  readonly failedEmail: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
647
948
  readonly accounts: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -662,6 +963,11 @@ type CloudAdminUserDetail = v.InferOutput<typeof cloudAdminUserDetailSchema>;
662
963
  type TransactionalEmailAdmin = v.InferOutput<typeof transactionalEmailAdminSchema>;
663
964
  type AdminAuditEvent = v.InferOutput<typeof adminAuditEventSchema>;
664
965
  type AdminOperations = v.InferOutput<typeof adminOperationsResponseSchema>;
966
+ type CloudAdminDocument = v.InferOutput<typeof cloudAdminDocumentSchema>;
967
+ type CloudAdminDocumentFilter = v.InferOutput<typeof cloudAdminDocumentFilterSchema>;
968
+ type CloudAdminReport = v.InferOutput<typeof cloudAdminReportSchema>;
969
+ type CloudAdminReportFilter = v.InferOutput<typeof cloudAdminReportFilterSchema>;
970
+ type CloudAdminReportStatus = v.InferOutput<typeof cloudAdminReportStatusSchema>;
665
971
  //#endregion
666
972
  //#region src/contract/collaboration.d.ts
667
973
  declare const collaborationPrincipalSchema: v.VariantSchema<"kind", [v.ObjectSchema<{
@@ -707,6 +1013,11 @@ declare const collaborationTicketSchema: v.ObjectSchema<{
707
1013
  readonly roomEpoch: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
708
1014
  readonly expiresAt: v.StringSchema<undefined>;
709
1015
  readonly serverEnforcedWrites: v.BooleanSchema<undefined>;
1016
+ /**
1017
+ * Whether the relay answers `RELAY_HEARTBEAT`. A relay from before it takes a ping for a
1018
+ * malformed frame and turns the peer away, so editors ask only a relay that says it answers.
1019
+ */
1020
+ readonly relayHeartbeat: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
710
1021
  }, undefined>;
711
1022
  type CollaborationTicket = v.InferOutput<typeof collaborationTicketSchema>;
712
1023
  //#endregion
@@ -773,6 +1084,14 @@ declare const RELAY_CLOSE: {
773
1084
  /** The document was restored to a version, so its room started over under a new ID. */
774
1085
  readonly restored: 4410;
775
1086
  };
1087
+ /**
1088
+ * The text a peer sends to learn whether the relay still hears it, and the relay's answer. Relay
1089
+ * frames are binary, so neither is taken for one, and a Durable Object answers without waking.
1090
+ */
1091
+ declare const RELAY_HEARTBEAT: {
1092
+ readonly ping: "ping";
1093
+ readonly pong: "pong";
1094
+ };
776
1095
  /**
777
1096
  * The most one WebSocket message carries. A frame past it travels as fragments of this size that
778
1097
  * the receiver joins again, so a large paste or a room's first sync fits under any host's message
@@ -854,7 +1173,7 @@ declare const workspaceEntitlementsSchema: v.ObjectSchema<{
854
1173
  readonly guestPresence: v.BooleanSchema<undefined>;
855
1174
  readonly collaboration: v.BooleanSchema<undefined>;
856
1175
  readonly revisionHistory: v.BooleanSchema<undefined>;
857
- readonly cloudAI: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
1176
+ readonly cloudServices: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
858
1177
  }, undefined>;
859
1178
  readonly limits: v.ObjectSchema<{
860
1179
  readonly maximumFileBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
@@ -912,6 +1231,20 @@ declare const cloudListingSchema: v.ObjectSchema<{
912
1231
  readonly minimumEditorVersion: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
913
1232
  }, undefined>;
914
1233
  type CloudListing = v.InferOutput<typeof cloudListingSchema>;
1234
+ /**
1235
+ * The operator's legal links, which clients show at sign-up and in account pages. A server that
1236
+ * names none shows none; `requireAcceptance` means an account accepts `termsVersion` before it uses
1237
+ * the server.
1238
+ */
1239
+ declare const cloudLegalDiscoverySchema: v.ObjectSchema<{
1240
+ readonly termsURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
1241
+ readonly privacyURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
1242
+ readonly termsVersion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1243
+ readonly requireAcceptance: v.BooleanSchema<undefined>;
1244
+ readonly abuseEmail: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
1245
+ readonly minimumAge: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1246
+ }, undefined>;
1247
+ type CloudLegalDiscovery = v.InferOutput<typeof cloudLegalDiscoverySchema>;
915
1248
  declare const cloudDiscoverySchema: v.ObjectSchema<{
916
1249
  readonly protocolVersion: v.LiteralSchema<"1", undefined>;
917
1250
  readonly deployment: v.PicklistSchema<["official", "self-hosted"], undefined>;
@@ -947,8 +1280,8 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
947
1280
  readonly listing: v.OptionalSchema<v.ObjectSchema<{
948
1281
  readonly minimumEditorVersion: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
949
1282
  }, undefined>, undefined>;
950
- /** The AI service editors reach with Cloud-signed tokens; absent when the deployment has none. */
951
- readonly ai: v.OptionalSchema<v.ObjectSchema<{
1283
+ /** The services editors reach with Cloud-signed tokens; absent when the deployment has none. */
1284
+ readonly services: v.OptionalSchema<v.ObjectSchema<{
952
1285
  readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
953
1286
  readonly contractVersion: v.LiteralSchema<"1", undefined>;
954
1287
  }, undefined>, undefined>;
@@ -956,6 +1289,14 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
956
1289
  readonly billing: v.OptionalSchema<v.ObjectSchema<{
957
1290
  readonly portalURL: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
958
1291
  }, undefined>, undefined>;
1292
+ readonly legal: v.OptionalSchema<v.ObjectSchema<{
1293
+ readonly termsURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
1294
+ readonly privacyURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
1295
+ readonly termsVersion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1296
+ readonly requireAcceptance: v.BooleanSchema<undefined>;
1297
+ readonly abuseEmail: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
1298
+ readonly minimumAge: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1299
+ }, undefined>, undefined>;
959
1300
  }, undefined>;
960
1301
  type CloudDiscovery = v.InferOutput<typeof cloudDiscoverySchema>;
961
1302
  /** The server's own address, where its editor and pages are, from its auth API's. */
@@ -968,6 +1309,13 @@ declare const CLOUD_PROTOCOL_MAX_UPLOAD_BYTES: number;
968
1309
  declare function isCloudChecksum(value: string): boolean;
969
1310
  /** The most images one revision, or one request for image uploads, may name. */
970
1311
  declare const CLOUD_MAX_DOCUMENT_IMAGES = 10000;
1312
+ /**
1313
+ * The most a Cloud API request body may hold; a server refuses anything past it before reading
1314
+ * it. Files go to the object store, never through the API, so only lists grow large: a save's
1315
+ * images fit with room to spare, and a client commits image uploads, whose part lists can run
1316
+ * long, in batches under half of it.
1317
+ */
1318
+ declare const CLOUD_API_MAX_BODY_BYTES: number;
971
1319
  /**
972
1320
  * An image's name inside a `.fig` file that Cloud stores apart from it: the SHA-1 Figma names it
973
1321
  * by, or an older plain name. A client leaves images under other names inside the file.
@@ -1044,6 +1392,39 @@ declare const sharedDocumentSchema: v.ObjectSchema<{
1044
1392
  readonly updatedAt: v.StringSchema<undefined>;
1045
1393
  }, undefined>;
1046
1394
  type SharedDocument = v.InferOutput<typeof sharedDocumentSchema>;
1395
+ /**
1396
+ * A document in Trash the person may restore: who deleted it and when, and when it goes for good.
1397
+ * `canPurge` says whether they may also delete it for good before then.
1398
+ */
1399
+ declare const trashedDocumentSchema: v.ObjectSchema<{
1400
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1401
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1402
+ readonly workspaceName: v.StringSchema<undefined>;
1403
+ readonly name: v.StringSchema<undefined>;
1404
+ readonly kind: v.OptionalSchema<v.PicklistSchema<["design", "board"], undefined>, "design">;
1405
+ readonly deletedAt: v.StringSchema<undefined>;
1406
+ readonly deletedBy: v.NullableSchema<v.ObjectSchema<{
1407
+ readonly name: v.StringSchema<undefined>;
1408
+ }, undefined>, undefined>;
1409
+ readonly purgeAt: v.StringSchema<undefined>;
1410
+ readonly canPurge: v.BooleanSchema<undefined>;
1411
+ }, undefined>;
1412
+ type TrashedDocument = v.InferOutput<typeof trashedDocumentSchema>;
1413
+ declare const trashSchema: v.ObjectSchema<{
1414
+ readonly documents: v.ArraySchema<v.ObjectSchema<{
1415
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1416
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1417
+ readonly workspaceName: v.StringSchema<undefined>;
1418
+ readonly name: v.StringSchema<undefined>;
1419
+ readonly kind: v.OptionalSchema<v.PicklistSchema<["design", "board"], undefined>, "design">;
1420
+ readonly deletedAt: v.StringSchema<undefined>;
1421
+ readonly deletedBy: v.NullableSchema<v.ObjectSchema<{
1422
+ readonly name: v.StringSchema<undefined>;
1423
+ }, undefined>, undefined>;
1424
+ readonly purgeAt: v.StringSchema<undefined>;
1425
+ readonly canPurge: v.BooleanSchema<undefined>;
1426
+ }, undefined>, undefined>;
1427
+ }, undefined>;
1047
1428
  declare const documentDownloadSchema: v.ObjectSchema<{
1048
1429
  readonly document: v.ObjectSchema<{
1049
1430
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
@@ -1307,7 +1688,10 @@ type RequestSharedImageLinksInput = v.InferOutput<typeof requestSharedImageLinks
1307
1688
  declare function parseRequestSharedImageLinks(input: unknown): RequestSharedImageLinksInput;
1308
1689
  declare const resolvedDocumentShareSchema: v.ObjectSchema<{
1309
1690
  readonly documentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1691
+ /** What this person may do; a guest on an edit link may only view where guests may not edit. */
1310
1692
  readonly permission: v.PicklistSchema<["view", "edit"], undefined>;
1693
+ /** What the link lets someone signed in to the server do. */
1694
+ readonly linkPermission: v.PicklistSchema<["view", "edit"], undefined>;
1311
1695
  readonly principal: v.VariantSchema<"kind", [v.ObjectSchema<{
1312
1696
  readonly kind: v.LiteralSchema<"user", undefined>;
1313
1697
  readonly userId: v.StringSchema<undefined>;
@@ -1356,10 +1740,6 @@ declare const acceptedInvitationSchema: v.VariantSchema<"kind", [v.ObjectSchema<
1356
1740
  readonly role: v.PicklistSchema<["viewer", "editor", "admin"], undefined>;
1357
1741
  }, undefined>], undefined>;
1358
1742
  type AcceptedInvitation = v.InferOutput<typeof acceptedInvitationSchema>;
1359
- declare const lookupCloudUserSchema: v.ObjectSchema<{
1360
- readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.ToLowerCaseAction, v.EmailAction<string, undefined>]>;
1361
- }, undefined>;
1362
- type LookupCloudUserInput = v.InferOutput<typeof lookupCloudUserSchema>;
1363
1743
  declare const putDocumentGrantSchema: v.ObjectSchema<{
1364
1744
  readonly permission: v.PicklistSchema<["view", "edit"], undefined>;
1365
1745
  }, undefined>;
@@ -1411,7 +1791,6 @@ declare const documentInvitationSchema: v.ObjectSchema<{
1411
1791
  }, undefined>;
1412
1792
  type DocumentInvitation = v.InferOutput<typeof documentInvitationSchema>;
1413
1793
  declare function parseCreateInvitationContinuation(input: unknown): CreateInvitationContinuationInput;
1414
- declare function parseLookupCloudUser(input: unknown): LookupCloudUserInput;
1415
1794
  declare function parseCreateDocumentShare(input: unknown): CreateDocumentShareInput;
1416
1795
  declare function parseUpdateDocumentShare(input: unknown): UpdateDocumentShareInput;
1417
1796
  declare function parseResolveDocumentShare(input: unknown): ResolveDocumentShareInput;
@@ -1751,5 +2130,30 @@ declare function parseSaveDocumentVersion(input: unknown): SaveDocumentVersionIn
1751
2130
  declare function parseUpdateDocumentVersion(input: unknown): UpdateDocumentVersionInput;
1752
2131
  declare function parseDuplicateDocumentVersion(input: unknown): DuplicateDocumentVersionInput;
1753
2132
  //#endregion
1754
- export { AICatalog, AICreditBucket, AIError, AIErrorCode, AIModel, AIToken, AITokenClaims, AIUsageEntry, AIUsagePage, AIUsageQuery, AIWallet, AI_ERROR_STATUS, AcceptDocumentInvitationInput, AcceptedInvitation, AccountSecurityErrorCode, AdminAuditEvent, AdminErrorCode, AdminOperations, CLOUD_AI_API_PATHS, CLOUD_AI_CONTRACT_VERSION, CLOUD_AI_JWKS_PATH, CLOUD_AI_TOKEN_AUDIENCE, CLOUD_DISCOVERY_PATH, CLOUD_DOCUMENT_NAME_MAX_LENGTH, CLOUD_IMAGE_NAME_PATTERN, CLOUD_MAX_DOCUMENT_IMAGES, CLOUD_PICTURE_MAX_BYTES, CLOUD_PICTURE_SIZE, CLOUD_PORTAL_PAGE_ROOTS, CLOUD_PROTOCOL_MAX_UPLOAD_BYTES, CLOUD_PROTOCOL_VERSION, COLLAB_ACTIONS, CloudAIDiscovery, CloudAccountSession, CloudAccountStatus, CloudActorContract, CloudAdminAuditFilter, CloudAdminEmailFilter, CloudAdminSessionResponse, CloudAdminUser, CloudAdminUserDetail, CloudAdminUserFilter, CloudAdminUsers, CloudAuthentication, CloudAuthenticationMethod, CloudAuthenticationMethods, CloudAuthenticationProvider, CloudBillingDiscovery, CloudCapabilities, CloudDeployment, CloudDiscovery, CloudLinkKind, CloudLinkPathKind, CloudListing, CloudPresence, CloudProfile, CloudSession, CloudSignIn, CloudSignInMethod, CloudUserProfile, CollaborationPrincipal, CollaborationTicket, CommitImageUploadsInput, CommitUploadInput, CommitUploadRequest, CreateAITokenInput, CreateDocumentInput, CreateDocumentInvitationInput, CreateDocumentRequest, CreateDocumentShareInput, CreateInvitationContinuationInput, CreateUploadInput, CreateWorkspaceInput, CreateWorkspaceInvitationInput, CreatedWorkspaceInvitation, DOCUMENT_VERSION_DESCRIPTION_MAX_LENGTH, DOCUMENT_VERSION_NAME_MAX_LENGTH, DocumentAccess, DocumentAccessSource, DocumentDownload, DocumentGrant, DocumentImageDownload, DocumentImageLink, DocumentInvitation, DocumentPermission, DocumentShare, DocumentSummary, DocumentVersion, DocumentVersionDownload, DocumentVersionKind, DocumentVersions, DuplicateDocumentVersionInput, Enrollment, EnrollmentStatus, ImageUploadOffer, InvitationContinuation, InvitationPreview, LookupCloudUserInput, MAX_COLLAB_MESSAGE_BYTES, MAX_PRESENCE_NAME_LENGTH, ObjectUploadTarget, PutDocumentGrantInput, RELAY_CLOSE, RELAY_DOCUMENT_PARAM, RELAY_FORWARDING_BYTES, RELAY_FRAGMENT_BYTES, RELAY_MINIMUM_MESSAGE_BYTES, RELAY_PATH, RELAY_SERVER_PEER, RelayAssembly, RelayClientFrame, RelayServerFrame, RequestImageLinksInput, RequestImageUploadsInput, RequestSharedImageLinksInput, ResolveDocumentShareInput, ResolvedDocumentShare, SaveDocumentVersionInput, SharedDocument, TransactionalEmailAdmin, UpdateDocumentShareInput, UpdateDocumentVersionInput, UpdateWorkspaceInput, UpdateWorkspaceMemberInput, WorkspaceEntitlements, WorkspaceInvitation, WorkspaceList, WorkspaceMember, WorkspaceMembers, WorkspaceRole, WorkspaceSummary, WorkspaceUsage, acceptDocumentInvitationSchema, acceptedInvitationSchema, accountSecurityErrorCodeSchema, accountSecurityErrorResponseSchema, adminAuditEventSchema, adminAuditResponseSchema, adminEmailResponseSchema, adminErrorCodeSchema, adminErrorResponseSchema, adminMutationResponseSchema, adminOperationsResponseSchema, aiCatalogSchema, aiCreditBucketSchema, aiErrorCodeSchema, aiErrorSchema, aiModelSchema, aiTokenClaimsSchema, aiTokenSchema, aiUsageEntrySchema, aiUsagePageSchema, aiUsageQuerySchema, aiWalletSchema, cloudAIDiscoverySchema, cloudAccountMutationResponseSchema, cloudAccountSessionSchema, cloudAccountSessionsResponseSchema, cloudAccountStateSchema, cloudAccountStatusResponseSchema, cloudActorSchema, cloudAdminAuditFilterSchema, cloudAdminEmailFilterSchema, cloudAdminSessionResponseSchema, cloudAdminUserDetailSchema, cloudAdminUserFilterSchema, cloudAdminUserSchema, cloudAdminUsersResponseSchema, cloudAuthenticationMethodSchema, cloudAuthenticationMethodsResponseSchema, cloudAuthenticationProviderSchema, cloudAuthenticationSchema, cloudBillingDiscoverySchema, cloudCapabilitiesSchema, cloudDeploymentSchema, cloudDesktopLinkURL, cloudDiscoverySchema, cloudDocumentPath, cloudDocumentURL, cloudEditorVersionSchema, cloudEmailChangeSchema, cloudIdentitySchema, cloudInvitationURL, cloudListingSchema, cloudMFAEnableResponseSchema, cloudMFAEnableSchema, cloudMFARecoveryCodesResponseSchema, cloudMFAStatusResponseSchema, cloudMFAStatusSchema, cloudMFAVerifyResponseSchema, cloudMFAVerifySchema, cloudPasskeyDeleteSchema, cloudPasskeySchema, cloudPasskeysResponseSchema, cloudPasswordChangeSchema, cloudPersonSchema, cloudPictureResponseSchema, cloudPictureUploadSchema, cloudPresenceSchema, cloudProfileResponseSchema, cloudProfileSchema, cloudProfileUpdateSchema, cloudServerOrigin, cloudSessionRevokeSchema, cloudSessionSchema, cloudShareURL, cloudSignInMethodSchema, cloudSignInSchema, cloudSignInsResponseSchema, cloudSocialLinkResponseSchema, cloudSocialLinkSchema, cloudUnlinkAuthenticationMethodSchema, cloudUserProfileSchema, collaborationPrincipalSchema, collaborationTicketSchema, commitImageUploadsSchema, commitUploadSchema, createAITokenSchema, createDocumentInvitationSchema, createDocumentSchema, createDocumentShareSchema, createInvitationContinuationSchema, createRelayClientAssembler, createRelayServerAssembler, createUploadSchema, createWorkspaceInvitationSchema, createWorkspaceSchema, createdWorkspaceInvitationSchema, decodeRelayClientFrame, decodeRelayServerFrame, decodeRoomUpdate, defaultRelayURL, documentAccessSchema, documentAccessSourceSchema, documentDownloadSchema, documentGrantSchema, documentImageDownloadSchema, documentImageLinkSchema, documentInvitationSchema, documentPermissionSchema, documentShareSchema, documentSummarySchema, documentVersionDownloadSchema, documentVersionKindSchema, documentVersionResponseSchema, documentVersionSchema, documentVersionsSchema, duplicateDocumentVersionSchema, encodeRelayClientFrame, encodeRelayServerFrame, encodeSyncReply, enrollmentReviewResponseSchema, enrollmentSchema, enrollmentStatusSchema, enrollmentsResponseSchema, imageUploadOfferSchema, invitationContinuationSchema, invitationPreviewSchema, isCloudChecksum, isCloudPortalPage, lookupCloudUserSchema, objectUploadSchema, parseAIUsageQuery, parseAcceptDocumentInvitation, parseCloudDiscovery, parseCloudEmailChange, parseCloudLinkPath, parseCloudMFAEnable, parseCloudMFAVerify, parseCloudPasskeyDelete, parseCloudPasswordChange, parseCloudPictureUpload, parseCloudProfileUpdate, parseCloudSessionRevoke, parseCloudSocialLink, parseCloudUnlinkAuthenticationMethod, parseCommitImageUploads, parseCommitUpload, parseCreateAIToken, parseCreateDocument, parseCreateDocumentInvitation, parseCreateDocumentShare, parseCreateInvitationContinuation, parseCreateUpload, parseCreateWorkspace, parseCreateWorkspaceInvitation, parseDuplicateDocumentVersion, parseLookupCloudUser, parsePutDocumentGrant, parseRequestImageLinks, parseRequestImageUploads, parseRequestSharedImageLinks, parseResolveDocumentShare, parseSaveDocumentVersion, parseUpdateDocumentShare, parseUpdateDocumentVersion, parseUpdateWorkspace, parseUpdateWorkspaceMember, presenceName, putDocumentGrantSchema, relayClientMessages, relayServerMessages, requestImageLinksSchema, requestImageUploadsSchema, requestSharedImageLinksSchema, resolveDocumentShareSchema, resolvedDocumentShareSchema, restoredDocumentSchema, saveDocumentVersionSchema, sharedDocumentSchema, transactionalEmailAdminSchema, updateDocumentShareSchema, updateDocumentVersionSchema, updateWorkspaceMemberSchema, updateWorkspaceSchema, workspaceEntitlementsSchema, workspaceInvitationSchema, workspaceListSchema, workspaceMemberSchema, workspaceMembersSchema, workspaceRoleSchema, workspaceSummarySchema, workspaceUsageSchema };
2133
+ //#region src/contract/reports.d.ts
2134
+ /** Why someone reports a document shared with them. */
2135
+ declare const documentReportReasonSchema: v.PicklistSchema<["spam-phishing", "illegal", "copyright", "harassment", "other"], undefined>;
2136
+ type DocumentReportReason = v.InferOutput<typeof documentReportReasonSchema>;
2137
+ /** How long a report's description may be. */
2138
+ declare const DOCUMENT_REPORT_DESCRIPTION_MAX = 2000;
2139
+ /**
2140
+ * A report about a document someone opened from a share link: the link's secret proves they can
2141
+ * see it, as resolving the link does, and a guest names themselves as they do there.
2142
+ */
2143
+ declare const fileDocumentReportSchema: v.ObjectSchema<{
2144
+ readonly secret: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 32, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
2145
+ readonly guestId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 16, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
2146
+ readonly reason: v.PicklistSchema<["spam-phishing", "illegal", "copyright", "harassment", "other"], undefined>;
2147
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
2148
+ /** Where an administrator may answer; optional, and never shown to the document's people. */
2149
+ readonly replyEmail: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.ToLowerCaseAction, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 254, undefined>]>, undefined>;
2150
+ }, undefined>;
2151
+ type FileDocumentReportInput = v.InferOutput<typeof fileDocumentReportSchema>;
2152
+ declare function parseFileDocumentReport(input: unknown): FileDocumentReportInput;
2153
+ /** What filing a report answers: that it arrived, and nothing about the document. */
2154
+ declare const fileDocumentReportResponseSchema: v.ObjectSchema<{
2155
+ readonly received: v.LiteralSchema<true, undefined>;
2156
+ }, undefined>;
2157
+ //#endregion
2158
+ export { AcceptDocumentInvitationInput, AcceptedInvitation, AccountSecurityErrorCode, AdminAuditEvent, AdminErrorCode, AdminOperations, CLOUD_API_MAX_BODY_BYTES, CLOUD_DISCOVERY_PATH, CLOUD_DOCUMENT_NAME_MAX_LENGTH, CLOUD_IMAGE_NAME_PATTERN, CLOUD_MAX_DOCUMENT_IMAGES, CLOUD_PICTURE_MAX_BYTES, CLOUD_PICTURE_SIZE, CLOUD_PORTAL_PAGE_ROOTS, CLOUD_PROTOCOL_MAX_UPLOAD_BYTES, CLOUD_PROTOCOL_VERSION, CLOUD_SERVICES_API_PATHS, CLOUD_SERVICES_CONTRACT_VERSION, CLOUD_SERVICES_JWKS_PATH, CLOUD_SERVICES_TOKEN_AUDIENCE, COLLAB_ACTIONS, ChatModel, CloudAccountDeletion, CloudAccountSession, CloudAccountStatus, CloudActorContract, CloudAdminAuditFilter, CloudAdminDocument, CloudAdminDocumentFilter, CloudAdminEmailFilter, CloudAdminReport, CloudAdminReportFilter, CloudAdminReportStatus, CloudAdminSessionResponse, CloudAdminUser, CloudAdminUserDetail, CloudAdminUserFilter, CloudAdminUsers, CloudAuthentication, CloudAuthenticationMethod, CloudAuthenticationMethods, CloudAuthenticationProvider, CloudBillingDiscovery, CloudCapabilities, CloudDeployment, CloudDiscovery, CloudLegalDiscovery, CloudLinkKind, CloudLinkPathKind, CloudListing, CloudPresence, CloudProfile, CloudServicesAPI, CloudServicesDiscovery, CloudServicesSchema, CloudSession, CloudSignIn, CloudSignInMethod, CloudUserProfile, CollaborationPrincipal, CollaborationTicket, CommitImageUploadsInput, CommitUploadInput, CommitUploadRequest, CreateDocumentInput, CreateDocumentInvitationInput, CreateDocumentRequest, CreateDocumentShareInput, CreateInvitationContinuationInput, CreateServicesTokenInput, CreateUploadInput, CreateWorkspaceInput, CreateWorkspaceInvitationInput, CreatedWorkspaceInvitation, CreditBucket, CreditWallet, DOCUMENT_REPORT_DESCRIPTION_MAX, DOCUMENT_VERSION_DESCRIPTION_MAX_LENGTH, DOCUMENT_VERSION_NAME_MAX_LENGTH, DocumentAccess, DocumentAccessSource, DocumentDownload, DocumentGrant, DocumentImageDownload, DocumentImageLink, DocumentInvitation, DocumentPermission, DocumentReportReason, DocumentShare, DocumentSummary, DocumentVersion, DocumentVersionDownload, DocumentVersionKind, DocumentVersions, DuplicateDocumentVersionInput, Enrollment, EnrollmentStatus, FileDocumentReportInput, ImageUploadOffer, InvitationContinuation, InvitationPreview, MAX_COLLAB_MESSAGE_BYTES, MAX_PRESENCE_NAME_LENGTH, MAX_SEARCH_QUERY_LENGTH, MAX_SEARCH_RESULTS, ObjectUploadTarget, PutDocumentGrantInput, RELAY_CLOSE, RELAY_DOCUMENT_PARAM, RELAY_FORWARDING_BYTES, RELAY_FRAGMENT_BYTES, RELAY_HEARTBEAT, RELAY_MINIMUM_MESSAGE_BYTES, RELAY_PATH, RELAY_SERVER_PEER, RelayAssembly, RelayClientFrame, RelayServerFrame, RequestImageLinksInput, RequestImageUploadsInput, RequestSharedImageLinksInput, ResolveDocumentShareInput, ResolvedDocumentShare, SERVICE_ERROR_STATUS, SaveDocumentVersionInput, SearchPricing, SearchRequest, SearchRequestInput, SearchResponse, SearchResult, ServiceCatalog, ServiceError, ServiceErrorCode, ServicesToken, ServicesTokenClaims, SharedDocument, TransactionalEmailAdmin, TrashedDocument, UpdateDocumentShareInput, UpdateDocumentVersionInput, UpdateWorkspaceInput, UpdateWorkspaceMemberInput, UsageEntry, UsagePage, UsageQuery, WorkspaceEntitlements, WorkspaceInvitation, WorkspaceList, WorkspaceMember, WorkspaceMembers, WorkspaceRole, WorkspaceSummary, WorkspaceUsage, acceptDocumentInvitationSchema, acceptedInvitationSchema, accountSecurityErrorCodeSchema, accountSecurityErrorResponseSchema, adminAuditEventSchema, adminAuditResponseSchema, adminEmailResponseSchema, adminErrorCodeSchema, adminErrorResponseSchema, adminMutationResponseSchema, adminOperationsResponseSchema, chatModelSchema, cloudAccountDeleteSchema, cloudAccountDeletionDocumentSchema, cloudAccountDeletionResponseSchema, cloudAccountDeletionSchema, cloudAccountDeletionWorkspaceSchema, cloudAccountMutationResponseSchema, cloudAccountSessionSchema, cloudAccountSessionsResponseSchema, cloudAccountStateSchema, cloudAccountStatusResponseSchema, cloudActorSchema, cloudAdminAuditFilterSchema, cloudAdminDocumentFilterSchema, cloudAdminDocumentSchema, cloudAdminDocumentsResponseSchema, cloudAdminEmailFilterSchema, cloudAdminReportFilterSchema, cloudAdminReportSchema, cloudAdminReportStatusSchema, cloudAdminReportsResponseSchema, cloudAdminSessionResponseSchema, cloudAdminUserDetailSchema, cloudAdminUserFilterSchema, cloudAdminUserSchema, cloudAdminUsersResponseSchema, cloudAuthenticationMethodSchema, cloudAuthenticationMethodsResponseSchema, cloudAuthenticationProviderSchema, cloudAuthenticationSchema, cloudBillingDiscoverySchema, cloudCapabilitiesSchema, cloudDeploymentSchema, cloudDesktopLinkURL, cloudDiscoverySchema, cloudDocumentPath, cloudDocumentURL, cloudEditorVersionSchema, cloudEmailChangeSchema, cloudIdentitySchema, cloudInvitationURL, cloudLegalDiscoverySchema, cloudListingSchema, cloudMFAEnableResponseSchema, cloudMFAEnableSchema, cloudMFARecoveryCodesResponseSchema, cloudMFAStatusResponseSchema, cloudMFAStatusSchema, cloudMFAVerifyResponseSchema, cloudMFAVerifySchema, cloudPasskeyDeleteSchema, cloudPasskeySchema, cloudPasskeysResponseSchema, cloudPasswordChangeSchema, cloudPersonSchema, cloudPictureResponseSchema, cloudPictureUploadSchema, cloudPresenceSchema, cloudProfileResponseSchema, cloudProfileSchema, cloudProfileUpdateSchema, cloudServerOrigin, cloudServicesDiscoverySchema, cloudSessionRevokeSchema, cloudSessionSchema, cloudShareURL, cloudSignInMethodSchema, cloudSignInSchema, cloudSignInsResponseSchema, cloudSocialLinkResponseSchema, cloudSocialLinkSchema, cloudTermsAcceptanceSchema, cloudUnlinkAuthenticationMethodSchema, cloudUserProfileSchema, collaborationPrincipalSchema, collaborationTicketSchema, commitImageUploadsSchema, commitUploadSchema, createDocumentInvitationSchema, createDocumentSchema, createDocumentShareSchema, createInvitationContinuationSchema, createRelayClientAssembler, createRelayServerAssembler, createServicesTokenSchema, createUploadSchema, createWorkspaceInvitationSchema, createWorkspaceSchema, createdWorkspaceInvitationSchema, creditBucketSchema, creditWalletSchema, decodeRelayClientFrame, decodeRelayServerFrame, decodeRoomUpdate, defaultRelayURL, documentAccessSchema, documentAccessSourceSchema, documentDownloadSchema, documentGrantSchema, documentImageDownloadSchema, documentImageLinkSchema, documentInvitationSchema, documentPermissionSchema, documentReportReasonSchema, documentShareSchema, documentSummarySchema, documentVersionDownloadSchema, documentVersionKindSchema, documentVersionResponseSchema, documentVersionSchema, documentVersionsSchema, duplicateDocumentVersionSchema, encodeRelayClientFrame, encodeRelayServerFrame, encodeSyncReply, enrollmentReviewResponseSchema, enrollmentSchema, enrollmentStatusSchema, enrollmentsResponseSchema, fileDocumentReportResponseSchema, fileDocumentReportSchema, imageUploadOfferSchema, invitationContinuationSchema, invitationPreviewSchema, isCloudChecksum, isCloudPortalPage, objectUploadSchema, parseAcceptDocumentInvitation, parseCloudAccountDelete, parseCloudDiscovery, parseCloudEmailChange, parseCloudLinkPath, parseCloudMFAEnable, parseCloudMFAVerify, parseCloudPasskeyDelete, parseCloudPasswordChange, parseCloudPictureUpload, parseCloudProfileUpdate, parseCloudSessionRevoke, parseCloudSocialLink, parseCloudTermsAcceptance, parseCloudUnlinkAuthenticationMethod, parseCommitImageUploads, parseCommitUpload, parseCreateDocument, parseCreateDocumentInvitation, parseCreateDocumentShare, parseCreateInvitationContinuation, parseCreateServicesToken, parseCreateUpload, parseCreateWorkspace, parseCreateWorkspaceInvitation, parseDuplicateDocumentVersion, parseFileDocumentReport, parsePutDocumentGrant, parseRequestImageLinks, parseRequestImageUploads, parseRequestSharedImageLinks, parseResolveDocumentShare, parseSaveDocumentVersion, parseSearchRequest, parseUpdateDocumentShare, parseUpdateDocumentVersion, parseUpdateWorkspace, parseUpdateWorkspaceMember, parseUsageQuery, presenceName, putDocumentGrantSchema, relayClientMessages, relayServerMessages, requestImageLinksSchema, requestImageUploadsSchema, requestSharedImageLinksSchema, resolveDocumentShareSchema, resolvedDocumentShareSchema, restoredDocumentSchema, saveDocumentVersionSchema, searchPricingSchema, searchRequestSchema, searchResponseSchema, searchResultSchema, serviceCatalogSchema, serviceErrorCodeSchema, serviceErrorSchema, servicesTokenClaimsSchema, servicesTokenSchema, sharedDocumentSchema, transactionalEmailAdminSchema, trashSchema, trashedDocumentSchema, updateDocumentShareSchema, updateDocumentVersionSchema, updateWorkspaceMemberSchema, updateWorkspaceSchema, usageEntrySchema, usagePageSchema, usageQuerySchema, workspaceEntitlementsSchema, workspaceInvitationSchema, workspaceListSchema, workspaceMemberSchema, workspaceMembersSchema, workspaceRoleSchema, workspaceSummarySchema, workspaceUsageSchema };
1755
2159
  //# sourceMappingURL=index.d.ts.map