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

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 (206) hide show
  1. package/README.md +2 -1
  2. package/dist/bin/server.mjs +1 -1
  3. package/dist/bin/server.mjs.map +1 -1
  4. package/dist/bin/services.mjs +1 -1
  5. package/dist/bin/services.mjs.map +1 -1
  6. package/dist/client.d.ts +296 -27
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +649 -295
  9. package/dist/client.js.map +1 -1
  10. package/dist/contract.d.ts +2 -2
  11. package/dist/contract.js +2 -2
  12. package/dist/contract2.js +331 -21
  13. package/dist/contract2.js.map +1 -1
  14. package/dist/email.d.ts +1773 -32
  15. package/dist/email.d.ts.map +1 -1
  16. package/dist/email.js +3478 -288
  17. package/dist/email.js.map +1 -1
  18. package/dist/errors.d.ts +2 -0
  19. package/dist/errors.js +48 -0
  20. package/dist/errors.js.map +1 -0
  21. package/dist/index.d.ts +466 -13
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index2.d.ts +35 -0
  24. package/dist/index2.d.ts.map +1 -0
  25. package/dist/listen.mjs +447 -290
  26. package/dist/listen.mjs.map +1 -1
  27. package/dist/runtime-cloudflare.d.ts +89 -0
  28. package/dist/runtime-cloudflare.d.ts.map +1 -0
  29. package/dist/runtime-cloudflare.js +15667 -0
  30. package/dist/runtime-cloudflare.js.map +1 -0
  31. package/dist/runtime-node.d.mts +2963 -294
  32. package/dist/runtime-node.d.mts.map +1 -1
  33. package/dist/server.d.ts +3473 -842
  34. package/dist/server.d.ts.map +1 -1
  35. package/dist/server.js +12187 -8244
  36. package/dist/server.js.map +1 -1
  37. package/dist/server.mjs +7739 -3548
  38. package/dist/server.mjs.map +1 -1
  39. package/dist/server2.mjs +5 -5
  40. package/dist/server2.mjs.map +1 -1
  41. package/package.json +22 -5
  42. package/src/admin/audit/service.ts +2 -2
  43. package/src/admin/documents/service.ts +76 -6
  44. package/src/admin/reports/service.ts +7 -1
  45. package/src/client/api.ts +23 -471
  46. package/src/client/auth/client.ts +22 -3
  47. package/src/client/billing.ts +80 -0
  48. package/src/client/community.ts +40 -0
  49. package/src/client/discovery.ts +35 -9
  50. package/src/client/documents.ts +160 -0
  51. package/src/client/index.ts +7 -0
  52. package/src/client/portal/account.ts +54 -2
  53. package/src/client/portal/request.ts +2 -0
  54. package/src/client/response.ts +21 -0
  55. package/src/client/schema.ts +8 -0
  56. package/src/client/services.ts +23 -18
  57. package/src/client/sharing.ts +262 -0
  58. package/src/client/versions.ts +104 -0
  59. package/src/contract/account.ts +50 -0
  60. package/src/contract/billing.ts +166 -0
  61. package/src/contract/collaboration.ts +5 -0
  62. package/src/contract/community.ts +60 -0
  63. package/src/contract/discovery.ts +63 -2
  64. package/src/contract/entitlements.ts +10 -0
  65. package/src/contract/index.ts +54 -5
  66. package/src/contract/links.ts +57 -4
  67. package/src/contract/locale.ts +27 -0
  68. package/src/contract/portal.ts +12 -1
  69. package/src/contract/routes.ts +10 -0
  70. package/src/contract/services.ts +18 -16
  71. package/src/email/i18n.ts +174 -0
  72. package/src/email/index.ts +13 -2
  73. package/src/email/locales/ar.json +141 -0
  74. package/src/email/locales/de.json +141 -0
  75. package/src/email/locales/es.json +141 -0
  76. package/src/email/locales/fr.json +141 -0
  77. package/src/email/locales/it.json +141 -0
  78. package/src/email/locales/ja.json +141 -0
  79. package/src/email/locales/pl.json +141 -0
  80. package/src/email/locales/pt-br.json +141 -0
  81. package/src/email/locales/ru.json +141 -0
  82. package/src/email/locales/zh-cn.json +141 -0
  83. package/src/email/messages.ts +200 -0
  84. package/src/email/render.ts +142 -276
  85. package/src/email/samples.ts +115 -0
  86. package/src/email/schema.ts +70 -6
  87. package/src/email/templates/BrandEmail.vue +54 -0
  88. package/src/email/templates/DocumentBlocked.vue +45 -0
  89. package/src/email/templates/DocumentInvitation.vue +24 -0
  90. package/src/email/templates/DocumentReport.vue +32 -0
  91. package/src/email/templates/DocumentReportDecided.vue +36 -0
  92. package/src/email/templates/DocumentReportReceived.vue +18 -0
  93. package/src/email/templates/DocumentRestored.vue +24 -0
  94. package/src/email/templates/EmailChangeRequested.vue +24 -0
  95. package/src/email/templates/EmailRoot.vue +19 -0
  96. package/src/email/templates/EmailText.vue +9 -0
  97. package/src/email/templates/EmailVerification.vue +38 -0
  98. package/src/email/templates/EnrollmentNotification.vue +24 -0
  99. package/src/email/templates/EnrollmentUpdate.vue +52 -0
  100. package/src/email/templates/NewSignIn.vue +37 -0
  101. package/src/email/templates/PasswordChanged.vue +22 -0
  102. package/src/email/templates/PasswordReset.vue +23 -0
  103. package/src/email/templates/StorageLimitReached.vue +28 -0
  104. package/src/email/templates/TwoStepChanged.vue +32 -0
  105. package/src/email/templates/WaitlistConfirmation.vue +29 -0
  106. package/src/email/templates/WorkspaceInvitation.vue +28 -0
  107. package/src/email/templates/brand.ts +9 -61
  108. package/src/email/templates/localization.ts +17 -0
  109. package/src/errors/index.ts +6 -0
  110. package/src/global.d.ts +7 -0
  111. package/src/runtime/cloudflare/relay/index.ts +7 -1
  112. package/src/runtime/cloudflare/tsconfig.json +2 -1
  113. package/src/runtime/cloudflare/worker.ts +8 -1
  114. package/src/runtime/node/cleanup.ts +5 -1
  115. package/src/runtime/node/email/transport.ts +13 -10
  116. package/src/runtime/node/main.ts +1 -1
  117. package/src/runtime/node/server.ts +12 -2
  118. package/src/runtime/node/services/main.ts +1 -1
  119. package/src/runtime/posthog/errors.ts +2 -1
  120. package/src/runtime/s3/objects.ts +17 -0
  121. package/src/runtime/site/community.ts +101 -0
  122. package/src/runtime/site/server.ts +17 -1
  123. package/src/server/account/deletion.ts +2 -0
  124. package/src/server/account/routes.ts +271 -240
  125. package/src/server/account/tokens.ts +57 -0
  126. package/src/server/api/router.ts +23 -0
  127. package/src/server/app/checks.ts +84 -0
  128. package/src/server/app/editors.ts +20 -0
  129. package/src/server/app/index.ts +128 -0
  130. package/src/server/app/indexing.ts +40 -0
  131. package/src/server/app/limiters.ts +53 -0
  132. package/src/server/app/routes.ts +114 -0
  133. package/src/server/app/services.ts +185 -0
  134. package/src/server/auth/access-tokens.ts +62 -0
  135. package/src/server/auth/adapter.ts +21 -1
  136. package/src/server/auth/email.ts +4 -1
  137. package/src/server/auth/enrollment.ts +116 -0
  138. package/src/server/auth/factory.ts +88 -131
  139. package/src/server/auth/logger.ts +23 -0
  140. package/src/server/auth/mfa-assurance.ts +51 -0
  141. package/src/server/auth/passwords.ts +43 -0
  142. package/src/server/auth/session.ts +2 -0
  143. package/src/server/billing/index.ts +6 -0
  144. package/src/server/billing/routes.ts +27 -0
  145. package/src/server/billing/tokens.ts +37 -0
  146. package/src/server/cleanup/configured.ts +16 -3
  147. package/src/server/cleanup/worker.ts +10 -1
  148. package/src/server/collaboration/relay/hub.ts +25 -142
  149. package/src/server/collaboration/relay/room.ts +154 -0
  150. package/src/server/collaboration/service.ts +21 -2
  151. package/src/server/community/index.ts +2 -0
  152. package/src/server/community/routes.ts +93 -0
  153. package/src/server/community/service.ts +134 -0
  154. package/src/server/config/deployment.ts +17 -5
  155. package/src/server/config/index.ts +1 -1
  156. package/src/server/config/public.ts +7 -1
  157. package/src/server/config/schema.ts +40 -292
  158. package/src/server/config/toml/schema.ts +307 -0
  159. package/src/server/db/index.ts +1 -0
  160. package/src/server/db/migrate.ts +13 -1
  161. package/src/server/db/migrations/009_access_tokens.ts +47 -0
  162. package/src/server/db/migrations/010_storage_limit_notices.ts +50 -0
  163. package/src/server/db/migrations/011_account_ids.ts +30 -0
  164. package/src/server/db/migrations/012_email_locales.ts +34 -0
  165. package/src/server/db/migrations/013_document_block_emails.ts +40 -0
  166. package/src/server/db/migrations/014_report_replies.ts +28 -0
  167. package/src/server/db/migrations/schema.ts +26 -1
  168. package/src/server/db/tables.ts +30 -1
  169. package/src/server/db/users.ts +22 -0
  170. package/src/server/documents/index.ts +1 -1
  171. package/src/server/documents/limits.ts +7 -1
  172. package/src/server/documents/service.ts +12 -402
  173. package/src/server/documents/uploads.ts +450 -0
  174. package/src/server/documents/versions/service.ts +81 -24
  175. package/src/server/email/invitations.ts +1 -0
  176. package/src/server/email/service.ts +31 -4
  177. package/src/server/email/types.ts +12 -0
  178. package/src/server/errors/index.ts +1 -9
  179. package/src/server/index.ts +12 -5
  180. package/src/server/invitations/types.ts +5 -1
  181. package/src/server/objects/types.ts +5 -0
  182. package/src/server/policy/configured.ts +9 -3
  183. package/src/server/policy/database.ts +13 -2
  184. package/src/server/policy/policy.ts +39 -12
  185. package/src/server/policy/service.ts +71 -52
  186. package/src/server/policy/storage.ts +33 -0
  187. package/src/server/quota/index.ts +6 -0
  188. package/src/server/quota/notices.ts +121 -0
  189. package/src/server/quota/storage.ts +5 -0
  190. package/src/server/rate-limit/middleware.ts +4 -0
  191. package/src/server/reports/index.ts +1 -0
  192. package/src/server/reports/replies.ts +55 -0
  193. package/src/server/reports/routes.ts +3 -1
  194. package/src/server/reports/service.ts +24 -2
  195. package/src/server/sharing/capabilities/service.ts +2 -3
  196. package/src/server/sharing/invitations/service.ts +14 -4
  197. package/src/server/validation.ts +3 -0
  198. package/src/server/workspaces/members.ts +7 -19
  199. package/src/services/app.ts +1 -3
  200. package/src/services/config.ts +1 -0
  201. package/src/services/usage.ts +6 -14
  202. package/src/email/templates/document-invitation.ts +0 -35
  203. package/src/email/templates/enrollment.ts +0 -27
  204. package/src/email/templates/layout.ts +0 -18
  205. package/src/server/app.ts +0 -453
  206. /package/src/{server/errors → errors}/posthog.ts +0 -0
package/dist/index.d.ts CHANGED
@@ -118,6 +118,61 @@ declare const cloudPasskeysResponseSchema: v.ObjectSchema<{
118
118
  declare const cloudPasskeyDeleteSchema: v.ObjectSchema<{
119
119
  readonly id: v.StringSchema<undefined>;
120
120
  }, undefined>;
121
+ /**
122
+ * Personal access tokens: an account's own credentials for scripts and CI, sent as
123
+ * `Authorization: Bearer <token>`. A token acts as its account on the document API only; it never
124
+ * changes how the account is reached, makes other tokens, or reaches administration.
125
+ */
126
+ declare const CLOUD_ACCESS_TOKEN_PREFIX = "opc_";
127
+ declare const CLOUD_ACCESS_TOKEN_NAME_MAX_LENGTH = 64;
128
+ declare const CLOUD_ACCESS_TOKEN_MAX_DAYS = 365;
129
+ declare const cloudAccessTokenSchema: v.ObjectSchema<{
130
+ readonly id: v.StringSchema<undefined>;
131
+ readonly name: v.StringSchema<undefined>;
132
+ /** The token's first characters, prefix included, to tell tokens apart; never the whole token. */
133
+ readonly start: v.NullableSchema<v.StringSchema<undefined>, undefined>;
134
+ readonly createdAt: v.StringSchema<undefined>;
135
+ readonly expiresAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
136
+ readonly lastUsedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
137
+ }, undefined>;
138
+ declare const cloudAccessTokensResponseSchema: v.ObjectSchema<{
139
+ readonly tokens: v.ArraySchema<v.ObjectSchema<{
140
+ readonly id: v.StringSchema<undefined>;
141
+ readonly name: v.StringSchema<undefined>;
142
+ /** The token's first characters, prefix included, to tell tokens apart; never the whole token. */
143
+ readonly start: v.NullableSchema<v.StringSchema<undefined>, undefined>;
144
+ readonly createdAt: v.StringSchema<undefined>;
145
+ readonly expiresAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
146
+ readonly lastUsedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
147
+ }, undefined>, undefined>;
148
+ }, undefined>;
149
+ declare const cloudAccessTokenCreateSchema: v.ObjectSchema<{
150
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
151
+ readonly expiresInDays: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 365, undefined>]>;
152
+ }, undefined>;
153
+ /** A new token, the only time the whole of it is shown. */
154
+ declare const cloudAccessTokenCreatedResponseSchema: v.ObjectSchema<{
155
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "opc_", undefined>]>;
156
+ readonly accessToken: v.ObjectSchema<{
157
+ readonly id: v.StringSchema<undefined>;
158
+ readonly name: v.StringSchema<undefined>;
159
+ /** The token's first characters, prefix included, to tell tokens apart; never the whole token. */
160
+ readonly start: v.NullableSchema<v.StringSchema<undefined>, undefined>;
161
+ readonly createdAt: v.StringSchema<undefined>;
162
+ readonly expiresAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
163
+ readonly lastUsedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
164
+ }, undefined>;
165
+ }, undefined>;
166
+ declare const cloudAccessTokenRevokeSchema: v.ObjectSchema<{
167
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
168
+ }, undefined>;
169
+ declare function parseCloudAccessTokenCreate(input: unknown): {
170
+ name: string;
171
+ expiresInDays: number;
172
+ };
173
+ declare function parseCloudAccessTokenRevoke(input: unknown): {
174
+ id: string;
175
+ };
121
176
  declare function parseCloudTermsAcceptance(input: unknown): {
122
177
  version: string;
123
178
  };
@@ -334,11 +389,31 @@ type CloudAuthenticationMethod = v.InferOutput<typeof cloudAuthenticationMethodS
334
389
  type CloudAuthenticationMethods = v.InferOutput<typeof cloudAuthenticationMethodsResponseSchema>;
335
390
  type CloudAccountStatus = v.InferOutput<typeof cloudAccountStatusResponseSchema>;
336
391
  type CloudProfile = v.InferOutput<typeof cloudProfileSchema>;
392
+ type CloudAccessToken = v.InferOutput<typeof cloudAccessTokenSchema>;
393
+ type CloudAccessTokenCreate = v.InferOutput<typeof cloudAccessTokenCreateSchema>;
337
394
  type CloudSignInMethod = v.InferOutput<typeof cloudSignInMethodSchema>;
338
395
  type CloudAccountSession = v.InferOutput<typeof cloudAccountSessionSchema>;
339
396
  type CloudSignIn = v.InferOutput<typeof cloudSignInSchema>;
340
397
  type CloudAccountDeletion = v.InferOutput<typeof cloudAccountDeletionSchema>;
341
398
  //#endregion
399
+ //#region src/contract/locale.d.ts
400
+ /**
401
+ * A language as the app names it, which the server writes email in when it has that language, or
402
+ * the nearest it has, and otherwise in English.
403
+ */
404
+ declare const cloudLanguageTagSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 35, undefined>, v.CheckAction<string, "Not a language tag">]>;
405
+ /** The language an account's email is written in, as the app last said it uses. */
406
+ declare const cloudLocaleUpdateSchema: v.ObjectSchema<{
407
+ readonly locale: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 35, undefined>, v.CheckAction<string, "Not a language tag">]>;
408
+ }, undefined>;
409
+ declare function parseCloudLocaleUpdate(input: unknown): {
410
+ locale: string;
411
+ };
412
+ //#endregion
413
+ //#region src/contract/routes.d.ts
414
+ /** A route's input, and the JSON it answers with a 200, as a contract's typed Hono schema names it. */
415
+ type JSONRoute<Method extends string, Path extends string, Input extends BlankInput, Output> = ToSchema<Method, Path, Input, TypedResponse<Output, 200, 'json'>>;
416
+ //#endregion
342
417
  //#region src/contract/services.d.ts
343
418
  /**
344
419
  * The contract between editors, Cloud, and the services Cloud advertises: AI models today, and
@@ -369,10 +444,6 @@ declare const cloudServicesDiscoverySchema: v.ObjectSchema<{
369
444
  readonly contractVersion: v.LiteralSchema<"1", undefined>;
370
445
  }, undefined>;
371
446
  type CloudServicesDiscovery = v.InferOutput<typeof cloudServicesDiscoverySchema>;
372
- declare const cloudBillingDiscoverySchema: v.ObjectSchema<{
373
- readonly portalURL: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
374
- }, undefined>;
375
- type CloudBillingDiscovery = v.InferOutput<typeof cloudBillingDiscoverySchema>;
376
447
  declare const createServicesTokenSchema: v.ObjectSchema<{
377
448
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
378
449
  }, undefined>;
@@ -391,10 +462,9 @@ declare const servicesTokenClaimsSchema: v.ObjectSchema<{
391
462
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
392
463
  /**
393
464
  * 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.
465
+ * workspace they own shares.
396
466
  */
397
- readonly accountId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
467
+ readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
398
468
  /** Credits the owner's plan grants each month; `null` when Cloud sets no allowance. */
399
469
  readonly monthlyCreditAllowance: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
400
470
  readonly iat: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
@@ -538,8 +608,6 @@ declare const SERVICE_ERROR_STATUS: {
538
608
  readonly capability_unavailable: 404;
539
609
  readonly rate_limited: 429;
540
610
  };
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
611
  /**
544
612
  * Every route a service answers besides chat completions, which OpenAI-compatible clients call
545
613
  * themselves. Editors build a typed client from it with Hono's `hc`; a service's own app must
@@ -551,6 +619,148 @@ type CloudServicesSchema = JSONRoute<'get', typeof CLOUD_SERVICES_API_PATHS.cata
551
619
  json: SearchRequestInput;
552
620
  }, SearchResponse>;
553
621
  type CloudServicesAPI = Hono<BlankEnv, CloudServicesSchema>;
622
+ /**
623
+ * Whether a bearer token may travel to `url`: over HTTPS, or in the clear only to a loopback
624
+ * address, for development. Only literal addresses count, since a name such as `localhost` is
625
+ * whatever the resolver answers. Services and billing tokens act as the account until they expire.
626
+ */
627
+ declare function sendsTokenSafely(url: string | URL): boolean;
628
+ //#endregion
629
+ //#region src/contract/billing.d.ts
630
+ /**
631
+ * The contract between Cloud, its editors, and the billing service a deployment advertises: what
632
+ * plans and credit packs it sells, and where an account buys them or manages what it has. Cloud
633
+ * only advertises the service and signs short-lived tokens for an account; the service talks to
634
+ * the payment provider, and sets the account's entitlements and credits as it is paid.
635
+ */
636
+ declare const CLOUD_BILLING_CONTRACT_VERSION: "1";
637
+ /**
638
+ * The `aud` of the tokens Cloud signs for its billing service, with the services' signing key,
639
+ * whose public keys it publishes at `CLOUD_SERVICES_JWKS_PATH`.
640
+ */
641
+ declare const CLOUD_BILLING_TOKEN_AUDIENCE: "openpencil-billing";
642
+ /**
643
+ * The page of a Cloud server where the signed-in person sees their plan, buys a plan or credits,
644
+ * and manages what they pay for; editors link to it whenever the server advertises billing.
645
+ */
646
+ declare const CLOUD_ACCOUNT_PLAN_PATH: "/account/plan";
647
+ /** Where the billing service answers, below the discovered `endpoint`. */
648
+ declare const CLOUD_BILLING_API_PATHS: {
649
+ readonly base: "/v1";
650
+ readonly catalog: "/v1/catalog";
651
+ readonly account: "/v1/account";
652
+ readonly checkout: "/v1/checkout";
653
+ readonly portal: "/v1/portal";
654
+ };
655
+ declare const cloudBillingDiscoverySchema: v.ObjectSchema<{
656
+ readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
657
+ readonly contractVersion: v.LiteralSchema<"1", undefined>;
658
+ }, undefined>;
659
+ type CloudBillingDiscovery = v.InferOutput<typeof cloudBillingDiscoverySchema>;
660
+ declare const billingTokenSchema: v.ObjectSchema<{
661
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
662
+ readonly expiresAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
663
+ }, undefined>;
664
+ type BillingToken = v.InferOutput<typeof billingTokenSchema>;
665
+ /**
666
+ * What the billing service may rely on once a token's signature, issuer, audience, and expiry
667
+ * check. The account is the signed-in user, who buys and manages only their own plan.
668
+ */
669
+ declare const billingTokenClaimsSchema: v.ObjectSchema<{
670
+ readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
671
+ readonly aud: v.LiteralSchema<"openpencil-billing", undefined>;
672
+ /** The account: the Cloud user whose plan and credits these are. */
673
+ readonly sub: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
674
+ /** Where the payment provider sends receipts and invoices. */
675
+ readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
676
+ readonly iat: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
677
+ readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
678
+ }, undefined>;
679
+ type BillingTokenClaims = v.InferOutput<typeof billingTokenClaimsSchema>;
680
+ /** A plan an account subscribes to, billed every month in US dollars before tax. */
681
+ declare const billingPlanSchema: v.ObjectSchema<{
682
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
683
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
684
+ readonly monthlyPriceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
685
+ readonly storageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
686
+ readonly monthlyCredits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
687
+ }, undefined>;
688
+ type BillingPlan = v.InferOutput<typeof billingPlanSchema>;
689
+ /** Credits an account on a plan buys once, in US dollars before tax. */
690
+ declare const creditPackSchema: v.ObjectSchema<{
691
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
692
+ readonly credits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
693
+ readonly priceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
694
+ /** How long the credits last from purchase. */
695
+ readonly validDays: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
696
+ }, undefined>;
697
+ type CreditPack = v.InferOutput<typeof creditPackSchema>;
698
+ /** What the service sells; an account without a plan has its deployment's free entitlements. */
699
+ declare const billingCatalogSchema: v.ObjectSchema<{
700
+ readonly plans: v.ArraySchema<v.ObjectSchema<{
701
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
702
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
703
+ readonly monthlyPriceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
704
+ readonly storageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
705
+ readonly monthlyCredits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
706
+ }, undefined>, undefined>;
707
+ readonly creditPacks: v.ArraySchema<v.ObjectSchema<{
708
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
709
+ readonly credits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
710
+ readonly priceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
711
+ /** How long the credits last from purchase. */
712
+ readonly validDays: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
713
+ }, undefined>, undefined>;
714
+ }, undefined>;
715
+ type BillingCatalog = v.InferOutput<typeof billingCatalogSchema>;
716
+ /**
717
+ * The account's subscription as the payment provider holds it, or `null` without one. A
718
+ * `past_due` plan keeps its entitlements while payment is retried.
719
+ */
720
+ declare const billingAccountSchema: v.ObjectSchema<{
721
+ readonly subscription: v.NullableSchema<v.ObjectSchema<{
722
+ readonly planId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
723
+ readonly status: v.PicklistSchema<["active", "past_due"], undefined>;
724
+ /** When the current period ends: the next charge, or the end of a cancelled plan. */
725
+ readonly currentPeriodEnd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
726
+ /** Whether the plan ends at `currentPeriodEnd` instead of renewing. */
727
+ readonly cancelsAtPeriodEnd: v.BooleanSchema<undefined>;
728
+ }, undefined>, undefined>;
729
+ }, undefined>;
730
+ type BillingAccount = v.InferOutput<typeof billingAccountSchema>;
731
+ /** What to buy: a plan to subscribe to, or a credit pack. */
732
+ declare const checkoutRequestSchema: v.UnionSchema<[v.ObjectSchema<{
733
+ readonly planId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
734
+ }, undefined>, v.ObjectSchema<{
735
+ readonly creditPackId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
736
+ }, undefined>], undefined>;
737
+ type CheckoutRequest = v.InferOutput<typeof checkoutRequestSchema>;
738
+ /** Where to send the person: the payment provider's checkout or account portal. */
739
+ declare const billingRedirectSchema: v.ObjectSchema<{
740
+ readonly url: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, v.RegexAction<string, "Billing sends people to an HTTPS page">]>;
741
+ }, undefined>;
742
+ type BillingRedirect = v.InferOutput<typeof billingRedirectSchema>;
743
+ declare const billingErrorCodeSchema: v.PicklistSchema<["invalid_request", "unauthorized", "not_allowed", "provider_unavailable"], undefined>;
744
+ type BillingErrorCode = v.InferOutput<typeof billingErrorCodeSchema>;
745
+ /** The HTTP status billing answers each error with. */
746
+ declare const BILLING_ERROR_STATUS: {
747
+ readonly invalid_request: 400;
748
+ readonly unauthorized: 401;
749
+ readonly not_allowed: 409;
750
+ readonly provider_unavailable: 502;
751
+ };
752
+ declare const billingErrorSchema: v.ObjectSchema<{
753
+ readonly error: v.ObjectSchema<{
754
+ readonly code: v.PicklistSchema<["invalid_request", "unauthorized", "not_allowed", "provider_unavailable"], undefined>;
755
+ readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
756
+ }, undefined>;
757
+ }, undefined>;
758
+ type BillingError = v.InferOutput<typeof billingErrorSchema>;
759
+ /** The billing service's routes, for a typed Hono client (`hc<CloudBillingAPI>`). */
760
+ type CloudBillingSchema = JSONRoute<'get', typeof CLOUD_BILLING_API_PATHS.catalog, BlankInput, BillingCatalog> & JSONRoute<'get', typeof CLOUD_BILLING_API_PATHS.account, BlankInput, BillingAccount> & JSONRoute<'post', typeof CLOUD_BILLING_API_PATHS.checkout, {
761
+ json: CheckoutRequest;
762
+ }, BillingRedirect> & JSONRoute<'post', typeof CLOUD_BILLING_API_PATHS.portal, BlankInput, BillingRedirect>;
763
+ type CloudBillingAPI = Hono<BlankEnv, CloudBillingSchema>;
554
764
  //#endregion
555
765
  //#region src/contract/admin/index.d.ts
556
766
  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>;
@@ -1010,6 +1220,11 @@ declare const collaborationTicketSchema: v.ObjectSchema<{
1010
1220
  readonly name: v.StringSchema<undefined>;
1011
1221
  }, undefined>], undefined>;
1012
1222
  readonly permission: v.PicklistSchema<["view", "edit"], undefined>;
1223
+ /**
1224
+ * Why a peer whose access would let them edit may only view: `storage-limit` when the document's
1225
+ * owner holds their whole storage allowance, until they free space or their plan grows.
1226
+ */
1227
+ readonly readOnly: v.OptionalSchema<v.PicklistSchema<["storage-limit"], undefined>, undefined>;
1013
1228
  readonly roomEpoch: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1014
1229
  readonly expiresAt: v.StringSchema<undefined>;
1015
1230
  readonly serverEnforcedWrites: v.BooleanSchema<undefined>;
@@ -1187,6 +1402,55 @@ declare const workspaceEntitlementsSchema: v.ObjectSchema<{
1187
1402
  }, undefined>;
1188
1403
  }, undefined>;
1189
1404
  type WorkspaceEntitlements = v.InferOutput<typeof workspaceEntitlementsSchema>;
1405
+ /**
1406
+ * An account's own plan and the storage its workspaces hold together. A workspace reports the
1407
+ * same for its owner, so the two read alike.
1408
+ */
1409
+ declare const accountEntitlementsSchema: v.ObjectSchema<{
1410
+ readonly features: v.ObjectSchema<{
1411
+ readonly links: v.BooleanSchema<undefined>;
1412
+ readonly guestView: v.BooleanSchema<undefined>;
1413
+ readonly guestEdit: v.BooleanSchema<undefined>;
1414
+ readonly guestPresence: v.BooleanSchema<undefined>;
1415
+ readonly collaboration: v.BooleanSchema<undefined>;
1416
+ readonly revisionHistory: v.BooleanSchema<undefined>;
1417
+ readonly cloudServices: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
1418
+ }, undefined>;
1419
+ readonly limits: v.ObjectSchema<{
1420
+ readonly maximumFileBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
1421
+ readonly maximumStorageBytes: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
1422
+ readonly maximumParticipants: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
1423
+ readonly monthlyCreditAllowance: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, null>;
1424
+ }, undefined>;
1425
+ readonly usage: v.ObjectSchema<{
1426
+ readonly committedStorageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1427
+ readonly reservedStorageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1428
+ }, undefined>;
1429
+ }, undefined>;
1430
+ type AccountEntitlements = WorkspaceEntitlements;
1431
+ declare const accountEntitlementsResponseSchema: v.ObjectSchema<{
1432
+ readonly entitlements: v.ObjectSchema<{
1433
+ readonly features: v.ObjectSchema<{
1434
+ readonly links: v.BooleanSchema<undefined>;
1435
+ readonly guestView: v.BooleanSchema<undefined>;
1436
+ readonly guestEdit: v.BooleanSchema<undefined>;
1437
+ readonly guestPresence: v.BooleanSchema<undefined>;
1438
+ readonly collaboration: v.BooleanSchema<undefined>;
1439
+ readonly revisionHistory: v.BooleanSchema<undefined>;
1440
+ readonly cloudServices: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
1441
+ }, undefined>;
1442
+ readonly limits: v.ObjectSchema<{
1443
+ readonly maximumFileBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
1444
+ readonly maximumStorageBytes: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
1445
+ readonly maximumParticipants: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
1446
+ readonly monthlyCreditAllowance: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, null>;
1447
+ }, undefined>;
1448
+ readonly usage: v.ObjectSchema<{
1449
+ readonly committedStorageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1450
+ readonly reservedStorageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1451
+ }, undefined>;
1452
+ }, undefined>;
1453
+ }, undefined>;
1190
1454
  //#endregion
1191
1455
  //#region src/contract/discovery.d.ts
1192
1456
  declare const CLOUD_PROTOCOL_VERSION: "1";
@@ -1222,6 +1486,17 @@ declare const cloudCapabilitiesSchema: v.ObjectSchema<{
1222
1486
  type CloudCapabilities = v.InferOutput<typeof cloudCapabilitiesSchema>;
1223
1487
  /** A released editor version, `major.minor.patch`. */
1224
1488
  declare const cloudEditorVersionSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1489
+ /**
1490
+ * The header desktop editors send with each request, naming their version, so a server can refuse
1491
+ * an editor older than its `minimumEditorVersion`. Browser editors leave it out: the server serves
1492
+ * them, and an older server's CORS rules would refuse a header they don't list.
1493
+ */
1494
+ declare const CLOUD_EDITOR_VERSION_HEADER: "X-OpenPencil-Editor-Version";
1495
+ /**
1496
+ * Whether `version` is `minimum` or later, comparing `major.minor.patch` numerically; a prerelease
1497
+ * counts as its release. A version that isn't one, on either side, is not at least anything.
1498
+ */
1499
+ declare function isEditorVersionAtLeast(version: string, minimum: string): boolean;
1225
1500
  /**
1226
1501
  * Whether editors offer this server to everyone, and from which editor version on. Only the
1227
1502
  * official server's listing is read: it turns the Cloud entry points on without an editor release,
@@ -1245,6 +1520,24 @@ declare const cloudLegalDiscoverySchema: v.ObjectSchema<{
1245
1520
  readonly minimumAge: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1246
1521
  }, undefined>;
1247
1522
  type CloudLegalDiscovery = v.InferOutput<typeof cloudLegalDiscoverySchema>;
1523
+ /**
1524
+ * How a self-hosted server names itself on its public pages: the operator's name and logo in the
1525
+ * bar, and where its people get help. The official server is OpenPencil's own and names none.
1526
+ */
1527
+ declare const cloudBrandingSchema: v.ObjectSchema<{
1528
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
1529
+ readonly logoURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
1530
+ readonly helpURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
1531
+ }, undefined>;
1532
+ type CloudBranding = v.InferOutput<typeof cloudBrandingSchema>;
1533
+ /**
1534
+ * The server's community gallery: the workspace whose documents anyone may open read-only.
1535
+ * Saving to it publishes, so editors never choose it for anyone and say so when it is chosen.
1536
+ */
1537
+ declare const cloudCommunityDiscoverySchema: v.ObjectSchema<{
1538
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1539
+ }, undefined>;
1540
+ type CloudCommunityDiscovery = v.InferOutput<typeof cloudCommunityDiscoverySchema>;
1248
1541
  declare const cloudDiscoverySchema: v.ObjectSchema<{
1249
1542
  readonly protocolVersion: v.LiteralSchema<"1", undefined>;
1250
1543
  readonly deployment: v.PicklistSchema<["official", "self-hosted"], undefined>;
@@ -1280,6 +1573,11 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
1280
1573
  readonly listing: v.OptionalSchema<v.ObjectSchema<{
1281
1574
  readonly minimumEditorVersion: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1282
1575
  }, undefined>, undefined>;
1576
+ /**
1577
+ * The oldest editor version the server works with. Older editors ask to be updated instead of
1578
+ * connecting, and the server refuses their requests.
1579
+ */
1580
+ readonly minimumEditorVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1283
1581
  /** The services editors reach with Cloud-signed tokens; absent when the deployment has none. */
1284
1582
  readonly services: v.OptionalSchema<v.ObjectSchema<{
1285
1583
  readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
@@ -1287,7 +1585,12 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
1287
1585
  }, undefined>, undefined>;
1288
1586
  /** Where people manage their plan and buy credits; absent when the deployment does not bill. */
1289
1587
  readonly billing: v.OptionalSchema<v.ObjectSchema<{
1290
- readonly portalURL: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1588
+ readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1589
+ readonly contractVersion: v.LiteralSchema<"1", undefined>;
1590
+ }, undefined>, undefined>;
1591
+ /** The community gallery; absent when the deployment has none. */
1592
+ readonly community: v.OptionalSchema<v.ObjectSchema<{
1593
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1291
1594
  }, undefined>, undefined>;
1292
1595
  readonly legal: v.OptionalSchema<v.ObjectSchema<{
1293
1596
  readonly termsURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
@@ -1297,6 +1600,11 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
1297
1600
  readonly abuseEmail: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
1298
1601
  readonly minimumAge: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1299
1602
  }, undefined>, undefined>;
1603
+ readonly branding: v.OptionalSchema<v.ObjectSchema<{
1604
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
1605
+ readonly logoURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
1606
+ readonly helpURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
1607
+ }, undefined>, undefined>;
1300
1608
  }, undefined>;
1301
1609
  type CloudDiscovery = v.InferOutput<typeof cloudDiscoverySchema>;
1302
1610
  /** The server's own address, where its editor and pages are, from its auth API's. */
@@ -1912,8 +2220,13 @@ declare function parseUpdateWorkspaceMember(input: unknown): UpdateWorkspaceMemb
1912
2220
  //#region src/contract/links.d.ts
1913
2221
  /** The two kinds of Cloud link that carry a secret: invitations and documents shared by link. */
1914
2222
  type CloudLinkKind = 'invitations' | 'share';
1915
- /** Every kind of Cloud link: those that carry a secret, and a document's address for members. */
1916
- type CloudLinkPathKind = CloudLinkKind | 'documents';
2223
+ /**
2224
+ * Every kind of Cloud link: those that carry a secret, a document's address for members, and a
2225
+ * document of the server's community gallery, which anyone may open.
2226
+ */
2227
+ type CloudLinkPathKind = CloudLinkKind | 'documents' | 'community';
2228
+ /** The server's community gallery: every document in it, each with a page of its own. */
2229
+ declare const CLOUD_COMMUNITY_PATH = "/community";
1917
2230
  /** An invitation to a document or a workspace, `/invitations/:id#token`. */
1918
2231
  declare function cloudInvitationURL(serverURL: string, invitationId: string, token: string): string;
1919
2232
  /** A document shared by link, `/share/:id#secret`. */
@@ -1924,6 +2237,14 @@ declare function cloudShareURL(serverURL: string, shareId: string, secret: strin
1924
2237
  */
1925
2238
  declare function cloudDocumentURL(serverURL: string, documentId: string, versionId?: string | null): string;
1926
2239
  declare function cloudDocumentPath(documentId: string): string;
2240
+ /**
2241
+ * A document of the server's community gallery opened in the editor, `/community/:id/open`, or
2242
+ * one of its named versions with `?version=…`, which anyone opens read-only without signing in.
2243
+ */
2244
+ declare function cloudCommunityURL(serverURL: string, documentId: string, versionId?: string | null): string;
2245
+ declare function cloudCommunityPath(documentId: string): string;
2246
+ /** A community document's page on the server: its preview, versions, and ways to open it. */
2247
+ declare function cloudCommunityPagePath(documentId: string): string;
1927
2248
  /**
1928
2249
  * The kind and ID of a Cloud link's path, or null for any other path. The ID is decoded; a broken
1929
2250
  * escape such as `%E0` is no link.
@@ -1938,6 +2259,11 @@ declare function parseCloudLinkPath(pathname: string): {
1938
2259
  * `desktop/src/launch/links.rs` validates it before the editor sees it.
1939
2260
  */
1940
2261
  declare function cloudDesktopLinkURL(kind: CloudLinkKind, id: string, serverURL: string, secret: string): string;
2262
+ /**
2263
+ * The desktop app's form of a community document's link, `openpencil://cloud?url=<link>`: the
2264
+ * editor's address for it, with the named version it asks for, if any. It carries no secret.
2265
+ */
2266
+ declare function cloudCommunityDesktopLinkURL(documentId: string, serverURL: string, versionId?: string | null): string;
1941
2267
  //#endregion
1942
2268
  //#region src/contract/portal.d.ts
1943
2269
  /**
@@ -1947,6 +2273,11 @@ declare function cloudDesktopLinkURL(kind: CloudLinkKind, id: string, serverURL:
1947
2273
  * paths, and the editor's `index.html` at the root and at any other page the API does not answer.
1948
2274
  */
1949
2275
  declare const CLOUD_PORTAL_PAGE_ROOTS: readonly ["/welcome", "/auth", "/account", "/admin"];
2276
+ /**
2277
+ * The community gallery's pages, which the portal serves too: the gallery at `/community` and a
2278
+ * document's page at `/community/:id`. The editor opens a document at `/community/:id/open`.
2279
+ */
2280
+ declare const CLOUD_PORTAL_COMMUNITY_PAGES: readonly ["/community", "/community/:documentId"];
1950
2281
  declare function isCloudPortalPage(path: string): boolean;
1951
2282
  //#endregion
1952
2283
  //#region src/contract/versions.d.ts
@@ -2130,6 +2461,128 @@ declare function parseSaveDocumentVersion(input: unknown): SaveDocumentVersionIn
2130
2461
  declare function parseUpdateDocumentVersion(input: unknown): UpdateDocumentVersionInput;
2131
2462
  declare function parseDuplicateDocumentVersion(input: unknown): DuplicateDocumentVersionInput;
2132
2463
  //#endregion
2464
+ //#region src/contract/community.d.ts
2465
+ /**
2466
+ * Where a community document's thumbnail is served, by its document and revision: the address
2467
+ * changes with each save, so a cached copy never shows an older state.
2468
+ */
2469
+ declare const COMMUNITY_THUMBNAIL_PATH = "/api/community/thumbnails";
2470
+ declare function communityThumbnailPath(documentId: string, revisionId: string): string;
2471
+ /** A version of a community document someone named, such as the release it was published for. */
2472
+ declare const communityVersionSchema: v.ObjectSchema<{
2473
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2474
+ readonly name: v.StringSchema<undefined>;
2475
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2476
+ readonly createdAt: v.StringSchema<undefined>;
2477
+ /** Whether the document holds this version now, with nothing changed since it was named. */
2478
+ readonly current: v.BooleanSchema<undefined>;
2479
+ }, undefined>;
2480
+ type CommunityVersion = v.InferOutput<typeof communityVersionSchema>;
2481
+ /**
2482
+ * A document in the deployment's community workspace, which anyone may open read-only: its name,
2483
+ * when it last changed, its thumbnail's path on the server, and its named versions, newest first.
2484
+ */
2485
+ declare const communityDocumentSchema: v.ObjectSchema<{
2486
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2487
+ readonly name: v.StringSchema<undefined>;
2488
+ readonly kind: v.PicklistSchema<["design", "board"], undefined>;
2489
+ readonly updatedAt: v.StringSchema<undefined>;
2490
+ readonly revisionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2491
+ readonly thumbnailPath: v.StringSchema<undefined>;
2492
+ readonly versions: v.ArraySchema<v.ObjectSchema<{
2493
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2494
+ readonly name: v.StringSchema<undefined>;
2495
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2496
+ readonly createdAt: v.StringSchema<undefined>;
2497
+ /** Whether the document holds this version now, with nothing changed since it was named. */
2498
+ readonly current: v.BooleanSchema<undefined>;
2499
+ }, undefined>, undefined>;
2500
+ }, undefined>;
2501
+ type CommunityDocument = v.InferOutput<typeof communityDocumentSchema>;
2502
+ /** The community workspace's documents, most recently changed first. */
2503
+ declare const communityDocumentsSchema: v.ObjectSchema<{
2504
+ readonly documents: v.ArraySchema<v.ObjectSchema<{
2505
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2506
+ readonly name: v.StringSchema<undefined>;
2507
+ readonly kind: v.PicklistSchema<["design", "board"], undefined>;
2508
+ readonly updatedAt: v.StringSchema<undefined>;
2509
+ readonly revisionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2510
+ readonly thumbnailPath: v.StringSchema<undefined>;
2511
+ readonly versions: v.ArraySchema<v.ObjectSchema<{
2512
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2513
+ readonly name: v.StringSchema<undefined>;
2514
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2515
+ readonly createdAt: v.StringSchema<undefined>;
2516
+ /** Whether the document holds this version now, with nothing changed since it was named. */
2517
+ readonly current: v.BooleanSchema<undefined>;
2518
+ }, undefined>, undefined>;
2519
+ }, undefined>, undefined>;
2520
+ }, undefined>;
2521
+ type CommunityDocuments = v.InferOutput<typeof communityDocumentsSchema>;
2522
+ /** Which state of a community document to open: a named version, or else the latest. */
2523
+ declare const communityDownloadQuerySchema: v.ObjectSchema<{
2524
+ readonly version: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
2525
+ }, undefined>;
2526
+ type CommunityDownloadQuery = v.InferOutput<typeof communityDownloadQuerySchema>;
2527
+ declare function parseCommunityDownloadQuery(input: unknown): CommunityDownloadQuery;
2528
+ /** A community document, or one of its named versions, with where to download it. */
2529
+ declare const communityDownloadSchema: v.ObjectSchema<{
2530
+ readonly document: v.ObjectSchema<{
2531
+ readonly document: v.ObjectSchema<{
2532
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2533
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2534
+ readonly name: v.StringSchema<undefined>;
2535
+ readonly kind: v.OptionalSchema<v.PicklistSchema<["design", "board"], undefined>, "design">;
2536
+ readonly currentRevisionId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
2537
+ readonly version: v.NumberSchema<undefined>;
2538
+ readonly createdAt: v.StringSchema<undefined>;
2539
+ readonly updatedAt: v.StringSchema<undefined>;
2540
+ }, undefined>;
2541
+ readonly revisionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2542
+ readonly byteSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
2543
+ readonly checksum: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2544
+ readonly contentType: v.StringSchema<undefined>;
2545
+ readonly download: v.ObjectSchema<{
2546
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2547
+ readonly method: v.LiteralSchema<"GET", undefined>;
2548
+ readonly headers: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
2549
+ readonly expiresAt: v.StringSchema<undefined>;
2550
+ }, undefined>;
2551
+ readonly images: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
2552
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2553
+ readonly checksum: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2554
+ readonly byteSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
2555
+ readonly download: v.ObjectSchema<{
2556
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2557
+ readonly method: v.LiteralSchema<"GET", undefined>;
2558
+ readonly headers: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
2559
+ readonly expiresAt: v.StringSchema<undefined>;
2560
+ }, undefined>;
2561
+ }, undefined>, undefined>, v.MaxLengthAction<{
2562
+ name: string;
2563
+ checksum: string;
2564
+ byteSize: number;
2565
+ download: {
2566
+ url: string;
2567
+ method: "GET";
2568
+ headers: {
2569
+ [x: string]: string;
2570
+ };
2571
+ expiresAt: string;
2572
+ };
2573
+ }[], 10000, undefined>]>;
2574
+ }, undefined>;
2575
+ readonly version: v.NullableSchema<v.ObjectSchema<{
2576
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2577
+ readonly name: v.StringSchema<undefined>;
2578
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2579
+ readonly createdAt: v.StringSchema<undefined>;
2580
+ /** Whether the document holds this version now, with nothing changed since it was named. */
2581
+ readonly current: v.BooleanSchema<undefined>;
2582
+ }, undefined>, undefined>;
2583
+ }, undefined>;
2584
+ type CommunityDownload = v.InferOutput<typeof communityDownloadSchema>;
2585
+ //#endregion
2133
2586
  //#region src/contract/reports.d.ts
2134
2587
  /** Why someone reports a document shared with them. */
2135
2588
  declare const documentReportReasonSchema: v.PicklistSchema<["spam-phishing", "illegal", "copyright", "harassment", "other"], undefined>;
@@ -2155,5 +2608,5 @@ declare const fileDocumentReportResponseSchema: v.ObjectSchema<{
2155
2608
  readonly received: v.LiteralSchema<true, undefined>;
2156
2609
  }, undefined>;
2157
2610
  //#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 };
2611
+ export { AcceptDocumentInvitationInput, AcceptedInvitation, AccountEntitlements, AccountSecurityErrorCode, AdminAuditEvent, AdminErrorCode, AdminOperations, BILLING_ERROR_STATUS, BillingAccount, BillingCatalog, BillingError, BillingErrorCode, BillingPlan, BillingRedirect, BillingToken, BillingTokenClaims, CLOUD_ACCESS_TOKEN_MAX_DAYS, CLOUD_ACCESS_TOKEN_NAME_MAX_LENGTH, CLOUD_ACCESS_TOKEN_PREFIX, CLOUD_ACCOUNT_PLAN_PATH, CLOUD_API_MAX_BODY_BYTES, CLOUD_BILLING_API_PATHS, CLOUD_BILLING_CONTRACT_VERSION, CLOUD_BILLING_TOKEN_AUDIENCE, CLOUD_COMMUNITY_PATH, CLOUD_DISCOVERY_PATH, CLOUD_DOCUMENT_NAME_MAX_LENGTH, CLOUD_EDITOR_VERSION_HEADER, CLOUD_IMAGE_NAME_PATTERN, CLOUD_MAX_DOCUMENT_IMAGES, CLOUD_PICTURE_MAX_BYTES, CLOUD_PICTURE_SIZE, CLOUD_PORTAL_COMMUNITY_PAGES, 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, COMMUNITY_THUMBNAIL_PATH, ChatModel, CheckoutRequest, CloudAccessToken, CloudAccessTokenCreate, CloudAccountDeletion, CloudAccountSession, CloudAccountStatus, CloudActorContract, CloudAdminAuditFilter, CloudAdminDocument, CloudAdminDocumentFilter, CloudAdminEmailFilter, CloudAdminReport, CloudAdminReportFilter, CloudAdminReportStatus, CloudAdminSessionResponse, CloudAdminUser, CloudAdminUserDetail, CloudAdminUserFilter, CloudAdminUsers, CloudAuthentication, CloudAuthenticationMethod, CloudAuthenticationMethods, CloudAuthenticationProvider, CloudBillingAPI, CloudBillingDiscovery, CloudBillingSchema, CloudBranding, CloudCapabilities, CloudCommunityDiscovery, CloudDeployment, CloudDiscovery, CloudLegalDiscovery, CloudLinkKind, CloudLinkPathKind, CloudListing, CloudPresence, CloudProfile, CloudServicesAPI, CloudServicesDiscovery, CloudServicesSchema, CloudSession, CloudSignIn, CloudSignInMethod, CloudUserProfile, CollaborationPrincipal, CollaborationTicket, CommitImageUploadsInput, CommitUploadInput, CommitUploadRequest, CommunityDocument, CommunityDocuments, CommunityDownload, CommunityDownloadQuery, CommunityVersion, CreateDocumentInput, CreateDocumentInvitationInput, CreateDocumentRequest, CreateDocumentShareInput, CreateInvitationContinuationInput, CreateServicesTokenInput, CreateUploadInput, CreateWorkspaceInput, CreateWorkspaceInvitationInput, CreatedWorkspaceInvitation, CreditBucket, CreditPack, 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, accountEntitlementsResponseSchema, accountEntitlementsSchema, accountSecurityErrorCodeSchema, accountSecurityErrorResponseSchema, adminAuditEventSchema, adminAuditResponseSchema, adminEmailResponseSchema, adminErrorCodeSchema, adminErrorResponseSchema, adminMutationResponseSchema, adminOperationsResponseSchema, billingAccountSchema, billingCatalogSchema, billingErrorCodeSchema, billingErrorSchema, billingPlanSchema, billingRedirectSchema, billingTokenClaimsSchema, billingTokenSchema, chatModelSchema, checkoutRequestSchema, cloudAccessTokenCreateSchema, cloudAccessTokenCreatedResponseSchema, cloudAccessTokenRevokeSchema, cloudAccessTokenSchema, cloudAccessTokensResponseSchema, 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, cloudBrandingSchema, cloudCapabilitiesSchema, cloudCommunityDesktopLinkURL, cloudCommunityDiscoverySchema, cloudCommunityPagePath, cloudCommunityPath, cloudCommunityURL, cloudDeploymentSchema, cloudDesktopLinkURL, cloudDiscoverySchema, cloudDocumentPath, cloudDocumentURL, cloudEditorVersionSchema, cloudEmailChangeSchema, cloudIdentitySchema, cloudInvitationURL, cloudLanguageTagSchema, cloudLegalDiscoverySchema, cloudListingSchema, cloudLocaleUpdateSchema, 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, communityDocumentSchema, communityDocumentsSchema, communityDownloadQuerySchema, communityDownloadSchema, communityThumbnailPath, communityVersionSchema, createDocumentInvitationSchema, createDocumentSchema, createDocumentShareSchema, createInvitationContinuationSchema, createRelayClientAssembler, createRelayServerAssembler, createServicesTokenSchema, createUploadSchema, createWorkspaceInvitationSchema, createWorkspaceSchema, createdWorkspaceInvitationSchema, creditBucketSchema, creditPackSchema, 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, isEditorVersionAtLeast, objectUploadSchema, parseAcceptDocumentInvitation, parseCloudAccessTokenCreate, parseCloudAccessTokenRevoke, parseCloudAccountDelete, parseCloudDiscovery, parseCloudEmailChange, parseCloudLinkPath, parseCloudLocaleUpdate, parseCloudMFAEnable, parseCloudMFAVerify, parseCloudPasskeyDelete, parseCloudPasswordChange, parseCloudPictureUpload, parseCloudProfileUpdate, parseCloudSessionRevoke, parseCloudSocialLink, parseCloudTermsAcceptance, parseCloudUnlinkAuthenticationMethod, parseCommitImageUploads, parseCommitUpload, parseCommunityDownloadQuery, 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, sendsTokenSafely, serviceCatalogSchema, serviceErrorCodeSchema, serviceErrorSchema, servicesTokenClaimsSchema, servicesTokenSchema, sharedDocumentSchema, transactionalEmailAdminSchema, trashSchema, trashedDocumentSchema, updateDocumentShareSchema, updateDocumentVersionSchema, updateWorkspaceMemberSchema, updateWorkspaceSchema, usageEntrySchema, usagePageSchema, usageQuerySchema, workspaceEntitlementsSchema, workspaceInvitationSchema, workspaceListSchema, workspaceMemberSchema, workspaceMembersSchema, workspaceRoleSchema, workspaceSummarySchema, workspaceUsageSchema };
2159
2612
  //# sourceMappingURL=index.d.ts.map