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

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 (280) 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 +783 -47
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +1651 -382
  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 +701 -45
  13. package/dist/contract2.js.map +1 -1
  14. package/dist/email.d.ts +2138 -34
  15. package/dist/email.d.ts.map +1 -1
  16. package/dist/email.js +4343 -306
  17. package/dist/email.js.map +1 -1
  18. package/dist/errors.d.ts +2 -0
  19. package/dist/errors.js +61 -0
  20. package/dist/errors.js.map +1 -0
  21. package/dist/index.d.ts +1338 -44
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index2.d.ts +45 -0
  24. package/dist/index2.d.ts.map +1 -0
  25. package/dist/listen.mjs +958 -340
  26. package/dist/listen.mjs.map +1 -1
  27. package/dist/runtime-cloudflare.d.ts +93 -0
  28. package/dist/runtime-cloudflare.d.ts.map +1 -0
  29. package/dist/runtime-cloudflare.js +18032 -0
  30. package/dist/runtime-cloudflare.js.map +1 -0
  31. package/dist/runtime-node.d.mts +12615 -5249
  32. package/dist/runtime-node.d.mts.map +1 -1
  33. package/dist/server.d.ts +17367 -8567
  34. package/dist/server.d.ts.map +1 -1
  35. package/dist/server.js +13587 -7333
  36. package/dist/server.js.map +1 -1
  37. package/dist/server.mjs +11601 -5401
  38. package/dist/server.mjs.map +1 -1
  39. package/dist/server2.mjs +84 -62
  40. package/dist/server2.mjs.map +1 -1
  41. package/package.json +31 -5
  42. package/src/admin/api/routes.ts +263 -190
  43. package/src/admin/audit/service.ts +11 -3
  44. package/src/admin/bootstrap.ts +86 -0
  45. package/src/admin/documents/service.ts +195 -10
  46. package/src/admin/email/service.ts +2 -1
  47. package/src/admin/enrollment/email.ts +17 -3
  48. package/src/admin/enrollment/service.ts +71 -10
  49. package/src/admin/errors.ts +5 -0
  50. package/src/admin/index.ts +1 -0
  51. package/src/admin/reports/service.ts +15 -3
  52. package/src/admin/schema.ts +6 -5
  53. package/src/admin/users/service.ts +173 -16
  54. package/src/client/api.ts +52 -473
  55. package/src/client/auth/client.ts +22 -3
  56. package/src/client/comments.ts +205 -0
  57. package/src/client/community.ts +40 -0
  58. package/src/client/device-authorization.ts +4 -20
  59. package/src/client/discovery.ts +39 -11
  60. package/src/client/documents.ts +160 -0
  61. package/src/client/files/archive.ts +60 -0
  62. package/src/client/files/checksum.ts +7 -0
  63. package/src/client/files/download.ts +122 -0
  64. package/src/client/files/images.ts +89 -0
  65. package/src/client/files/index.ts +15 -0
  66. package/src/client/files/objects.ts +173 -0
  67. package/src/client/files/save.ts +79 -0
  68. package/src/client/index.ts +4 -0
  69. package/src/client/portal/account.ts +73 -3
  70. package/src/client/portal/administration.ts +52 -5
  71. package/src/client/portal/request.ts +6 -2
  72. package/src/client/response.ts +21 -0
  73. package/src/client/schema.ts +8 -0
  74. package/src/client/services.ts +23 -18
  75. package/src/client/sharing.ts +262 -0
  76. package/src/client/tour.ts +44 -0
  77. package/src/client/versions.ts +110 -0
  78. package/src/contract/account.ts +111 -11
  79. package/src/contract/admin/index.ts +48 -3
  80. package/src/contract/billing.ts +235 -0
  81. package/src/contract/collaboration.ts +5 -0
  82. package/src/contract/comments.ts +223 -0
  83. package/src/contract/community.ts +60 -0
  84. package/src/contract/discovery.ts +94 -5
  85. package/src/contract/entitlements.ts +10 -0
  86. package/src/contract/index.ts +64 -5
  87. package/src/contract/links.ts +62 -4
  88. package/src/contract/locale.ts +27 -0
  89. package/src/contract/portal.ts +12 -1
  90. package/src/contract/relay.ts +3 -1
  91. package/src/contract/routes.ts +10 -0
  92. package/src/contract/services.ts +62 -20
  93. package/src/contract/workspaces.ts +5 -0
  94. package/src/email/i18n.ts +174 -0
  95. package/src/email/index.ts +13 -2
  96. package/src/email/locales/ar.json +169 -0
  97. package/src/email/locales/de.json +169 -0
  98. package/src/email/locales/es.json +169 -0
  99. package/src/email/locales/fr.json +169 -0
  100. package/src/email/locales/it.json +169 -0
  101. package/src/email/locales/ja.json +169 -0
  102. package/src/email/locales/pl.json +169 -0
  103. package/src/email/locales/pt-br.json +169 -0
  104. package/src/email/locales/ru.json +169 -0
  105. package/src/email/locales/zh-cn.json +169 -0
  106. package/src/email/messages.ts +235 -0
  107. package/src/email/render.ts +160 -276
  108. package/src/email/samples.ts +142 -0
  109. package/src/email/schema.ts +98 -8
  110. package/src/email/templates/BrandEmail.vue +56 -0
  111. package/src/email/templates/CommentNotification.vue +39 -0
  112. package/src/email/templates/DocumentBlocked.vue +45 -0
  113. package/src/email/templates/DocumentInvitation.vue +24 -0
  114. package/src/email/templates/DocumentReport.vue +32 -0
  115. package/src/email/templates/DocumentReportDecided.vue +36 -0
  116. package/src/email/templates/DocumentReportReceived.vue +18 -0
  117. package/src/email/templates/DocumentRestored.vue +24 -0
  118. package/src/email/templates/EmailChangeRequested.vue +24 -0
  119. package/src/email/templates/EmailRoot.vue +19 -0
  120. package/src/email/templates/EmailText.vue +9 -0
  121. package/src/email/templates/EmailVerification.vue +38 -0
  122. package/src/email/templates/EnrollmentInvitation.vue +53 -0
  123. package/src/email/templates/EnrollmentNotification.vue +24 -0
  124. package/src/email/templates/EnrollmentUpdate.vue +52 -0
  125. package/src/email/templates/NewSignIn.vue +37 -0
  126. package/src/email/templates/PasswordChanged.vue +22 -0
  127. package/src/email/templates/PasswordReset.vue +23 -0
  128. package/src/email/templates/StorageLimitReached.vue +28 -0
  129. package/src/email/templates/TwoStepChanged.vue +47 -0
  130. package/src/email/templates/WaitlistConfirmation.vue +29 -0
  131. package/src/email/templates/WorkspaceInvitation.vue +28 -0
  132. package/src/email/templates/brand.ts +15 -61
  133. package/src/email/templates/localization.ts +17 -0
  134. package/src/errors/index.ts +6 -0
  135. package/src/{server/errors → errors}/posthog.ts +28 -4
  136. package/src/global.d.ts +7 -0
  137. package/src/runtime/cloudflare/email.ts +2 -0
  138. package/src/runtime/cloudflare/relay/index.ts +28 -7
  139. package/src/runtime/cloudflare/tsconfig.json +2 -1
  140. package/src/runtime/cloudflare/worker.ts +14 -1
  141. package/src/runtime/cloudflare/xml.ts +12 -0
  142. package/src/runtime/node/admin.ts +51 -47
  143. package/src/runtime/node/cleanup.ts +5 -1
  144. package/src/runtime/node/email/runtime.ts +1 -0
  145. package/src/runtime/node/email/transport.ts +14 -10
  146. package/src/runtime/node/main.ts +1 -1
  147. package/src/runtime/node/server.ts +20 -4
  148. package/src/runtime/node/services/main.ts +1 -1
  149. package/src/runtime/posthog/errors.ts +5 -2
  150. package/src/runtime/s3/objects.ts +17 -0
  151. package/src/runtime/site/community.ts +101 -0
  152. package/src/runtime/site/server.ts +17 -1
  153. package/src/server/account/actions.ts +3 -1
  154. package/src/server/account/deletion.ts +40 -4
  155. package/src/server/account/routes.ts +305 -253
  156. package/src/server/account/tokens.ts +57 -0
  157. package/src/server/api/router.ts +44 -6
  158. package/src/server/app/checks.ts +89 -0
  159. package/src/server/app/cors.ts +44 -0
  160. package/src/server/app/editors.ts +20 -0
  161. package/src/server/app/index.ts +128 -0
  162. package/src/server/app/indexing.ts +40 -0
  163. package/src/server/app/limiters.ts +53 -0
  164. package/src/server/app/routes.ts +123 -0
  165. package/src/server/app/services.ts +219 -0
  166. package/src/server/auth/access-control.ts +13 -8
  167. package/src/server/auth/access-tokens.ts +62 -0
  168. package/src/server/auth/account.ts +13 -12
  169. package/src/server/auth/activity.ts +7 -2
  170. package/src/server/auth/adapter.ts +36 -3
  171. package/src/server/auth/email.ts +33 -18
  172. package/src/server/auth/endpoints.ts +4 -0
  173. package/src/server/auth/enrollment.ts +116 -0
  174. package/src/server/auth/factory.ts +165 -189
  175. package/src/server/auth/index.ts +1 -1
  176. package/src/server/auth/logger.ts +23 -0
  177. package/src/server/auth/methods.ts +162 -0
  178. package/src/server/auth/mfa-assurance.ts +190 -2
  179. package/src/server/auth/passwords.ts +43 -0
  180. package/src/server/auth/rate-limit.ts +31 -0
  181. package/src/server/auth/runtime.ts +19 -5
  182. package/src/server/auth/session.ts +2 -0
  183. package/src/server/auth/social-providers.ts +70 -24
  184. package/src/server/billing/index.ts +8 -0
  185. package/src/server/billing/notify.ts +55 -0
  186. package/src/server/billing/routes.ts +27 -0
  187. package/src/server/billing/seats.ts +17 -0
  188. package/src/server/billing/tokens.ts +37 -0
  189. package/src/server/cleanup/configured.ts +16 -3
  190. package/src/server/cleanup/documents.ts +5 -2
  191. package/src/server/cleanup/revisions.ts +6 -3
  192. package/src/server/cleanup/uploads.ts +2 -1
  193. package/src/server/cleanup/worker.ts +10 -1
  194. package/src/server/collaboration/relay/connection.ts +7 -2
  195. package/src/server/collaboration/relay/hub.ts +80 -166
  196. package/src/server/collaboration/relay/room.ts +154 -0
  197. package/src/server/collaboration/routes.ts +8 -5
  198. package/src/server/collaboration/service.ts +21 -2
  199. package/src/server/comments/index.ts +9 -0
  200. package/src/server/comments/notify.ts +277 -0
  201. package/src/server/comments/routes.ts +352 -0
  202. package/src/server/comments/rows.ts +249 -0
  203. package/src/server/comments/service.ts +570 -0
  204. package/src/server/community/index.ts +2 -0
  205. package/src/server/community/routes.ts +93 -0
  206. package/src/server/community/service.ts +134 -0
  207. package/src/server/config/deployment.ts +35 -10
  208. package/src/server/config/index.ts +2 -2
  209. package/src/server/config/public.ts +25 -6
  210. package/src/server/config/schema.ts +53 -293
  211. package/src/server/config/toml/schema.ts +330 -0
  212. package/src/server/db/index.ts +3 -1
  213. package/src/server/db/migrate.ts +33 -1
  214. package/src/server/db/migrations/009_access_tokens.ts +47 -0
  215. package/src/server/db/migrations/010_storage_limit_notices.ts +50 -0
  216. package/src/server/db/migrations/011_account_ids.ts +30 -0
  217. package/src/server/db/migrations/012_email_locales.ts +34 -0
  218. package/src/server/db/migrations/013_document_block_emails.ts +40 -0
  219. package/src/server/db/migrations/014_report_replies.ts +28 -0
  220. package/src/server/db/migrations/015_comments.ts +57 -0
  221. package/src/server/db/migrations/016_comment_notifications.ts +76 -0
  222. package/src/server/db/migrations/017_invitation_emails.ts +19 -0
  223. package/src/server/db/migrations/018_enrollment_source.ts +17 -0
  224. package/src/server/db/migrations/schema.ts +26 -1
  225. package/src/server/db/tables.ts +122 -3
  226. package/src/server/db/users.ts +22 -0
  227. package/src/server/documents/access.ts +17 -0
  228. package/src/server/documents/images.ts +6 -1
  229. package/src/server/documents/index.ts +1 -1
  230. package/src/server/documents/limits.ts +7 -1
  231. package/src/server/documents/routes.ts +12 -12
  232. package/src/server/documents/service.ts +31 -407
  233. package/src/server/documents/summary.ts +15 -0
  234. package/src/server/documents/uploads.ts +450 -0
  235. package/src/server/documents/versions/routes.ts +7 -8
  236. package/src/server/documents/versions/service.ts +86 -26
  237. package/src/server/email/invitations.ts +1 -0
  238. package/src/server/email/service.ts +39 -6
  239. package/src/server/email/types.ts +13 -0
  240. package/src/server/errors/index.ts +49 -12
  241. package/src/server/index.ts +27 -6
  242. package/src/server/internal/routes.ts +8 -2
  243. package/src/server/internal/service.ts +10 -0
  244. package/src/server/invitations/budget.ts +3 -1
  245. package/src/server/invitations/index.ts +1 -0
  246. package/src/server/invitations/links.ts +6 -0
  247. package/src/server/invitations/types.ts +5 -1
  248. package/src/server/objects/types.ts +5 -0
  249. package/src/server/pictures/service.ts +3 -1
  250. package/src/server/policy/configured.ts +9 -3
  251. package/src/server/policy/database.ts +13 -2
  252. package/src/server/policy/policy.ts +39 -12
  253. package/src/server/policy/service.ts +71 -52
  254. package/src/server/policy/storage.ts +33 -0
  255. package/src/server/policy/workspace.ts +5 -2
  256. package/src/server/quota/index.ts +6 -0
  257. package/src/server/quota/notices.ts +121 -0
  258. package/src/server/quota/storage.ts +5 -0
  259. package/src/server/rate-limit/middleware.ts +4 -0
  260. package/src/server/reports/index.ts +1 -0
  261. package/src/server/reports/replies.ts +55 -0
  262. package/src/server/reports/routes.ts +5 -3
  263. package/src/server/reports/service.ts +27 -3
  264. package/src/server/services/routes.ts +2 -2
  265. package/src/server/sharing/capabilities/service.ts +3 -4
  266. package/src/server/sharing/document-routes.ts +3 -3
  267. package/src/server/sharing/invitations/service.ts +17 -8
  268. package/src/server/sharing/routes.ts +15 -15
  269. package/src/server/validation.ts +35 -24
  270. package/src/server/workspaces/members.ts +57 -31
  271. package/src/server/workspaces/repository.ts +23 -12
  272. package/src/server/workspaces/routes.ts +8 -8
  273. package/src/services/app.ts +31 -22
  274. package/src/services/config.ts +48 -8
  275. package/src/services/metering.ts +15 -27
  276. package/src/services/usage.ts +6 -14
  277. package/src/email/templates/document-invitation.ts +0 -35
  278. package/src/email/templates/enrollment.ts +0 -27
  279. package/src/email/templates/layout.ts +0 -18
  280. package/src/server/app.ts +0 -453
package/dist/client.d.ts CHANGED
@@ -1,8 +1,16 @@
1
1
  import * as v from "valibot";
2
+ import { hc } from "hono/client";
2
3
  import { createAuthClient } from "better-auth/client";
3
4
  //#region src/contract/account.d.ts
4
- 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>;
5
+ declare const cloudSocialProviderSchema: v.PicklistSchema<readonly ["google", "apple", "github"], undefined>;
6
+ type CloudSocialProvider$1 = v.InferOutput<typeof cloudSocialProviderSchema>;
7
+ declare const accountSecurityErrorCodeSchema: v.PicklistSchema<["current_password_invalid", "password_too_short", "password_too_long", "last_authentication_method", "session_not_fresh", "authentication_method_failed", "code_invalid", "email_unchanged", "email_change_unavailable", "current_session", "picture_invalid", "account_sole_admin", "last_admin_required", "terms_changed"], undefined>;
8
+ declare const cloudAccessTokenCreateSchema: v.ObjectSchema<{
9
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
10
+ readonly expiresInDays: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 365, undefined>]>;
11
+ }, undefined>;
5
12
  type AccountSecurityErrorCode = v.InferOutput<typeof accountSecurityErrorCodeSchema>;
13
+ type CloudAccessTokenCreate = v.InferOutput<typeof cloudAccessTokenCreateSchema>;
6
14
  //#endregion
7
15
  //#region src/contract/services.d.ts
8
16
  declare const servicesTokenSchema: v.ObjectSchema<{
@@ -10,7 +18,7 @@ declare const servicesTokenSchema: v.ObjectSchema<{
10
18
  readonly expiresAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
11
19
  }, undefined>;
12
20
  type ServicesToken = v.InferOutput<typeof servicesTokenSchema>;
13
- declare const serviceCatalogSchema: v.ObjectSchema<{
21
+ declare const serviceCatalogSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
14
22
  readonly models: v.ArraySchema<v.ObjectSchema<{
15
23
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
16
24
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -25,10 +33,44 @@ declare const serviceCatalogSchema: v.ObjectSchema<{
25
33
  }, undefined>;
26
34
  }, undefined>, undefined>;
27
35
  readonly defaultModelID: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
36
+ /**
37
+ * Absent from a service that predates it, or whose default model can't run the chat. Editors
38
+ * then use `defaultModelID` for every role, except Vision when that model reads no images,
39
+ * and set nothing up when it calls no tools.
40
+ */
41
+ readonly roleModels: v.OptionalSchema<v.ObjectSchema<{
42
+ readonly design: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
43
+ readonly review: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
44
+ readonly fast: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
45
+ readonly vision: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
46
+ }, undefined>, undefined>;
28
47
  readonly search: v.OptionalSchema<v.ObjectSchema<{
29
48
  readonly creditsPerRequest: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
30
49
  }, undefined>, undefined>;
31
- }, undefined>;
50
+ }, undefined>, v.CheckAction<{
51
+ models: {
52
+ id: string;
53
+ label: string;
54
+ creditsPerMillionInputTokens: number;
55
+ creditsPerMillionOutputTokens: number;
56
+ contextTokens: number;
57
+ capabilities: {
58
+ reasoning: boolean;
59
+ vision: boolean;
60
+ tools: boolean;
61
+ };
62
+ }[];
63
+ defaultModelID: string;
64
+ roleModels?: {
65
+ design: string;
66
+ review: string;
67
+ fast: string;
68
+ vision: string | null;
69
+ } | undefined;
70
+ search?: {
71
+ creditsPerRequest: number;
72
+ } | undefined;
73
+ }, "A recommended model is not in the catalog or cannot do its role">]>;
32
74
  type ServiceCatalog = v.InferOutput<typeof serviceCatalogSchema>;
33
75
  /**
34
76
  * A service records a request's charge before the request's answer ends, so a wallet read after
@@ -64,11 +106,20 @@ type SearchResponse = v.InferOutput<typeof searchResponseSchema>;
64
106
  declare const serviceErrorCodeSchema: v.PicklistSchema<["invalid_request", "unauthorized", "insufficient_credits", "model_not_allowed", "capability_unavailable", "rate_limited"], undefined>;
65
107
  type ServiceErrorCode = v.InferOutput<typeof serviceErrorCodeSchema>;
66
108
  //#endregion
109
+ //#region src/contract/billing.d.ts
110
+ declare const billingTokenSchema: v.ObjectSchema<{
111
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
112
+ readonly expiresAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
113
+ }, undefined>;
114
+ type BillingToken = v.InferOutput<typeof billingTokenSchema>;
115
+ //#endregion
67
116
  //#region src/contract/admin/index.d.ts
68
- 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>;
117
+ declare const adminErrorCodeSchema: v.PicklistSchema<["bad_request", "unauthorized", "forbidden", "not_found", "rate_limited", "invalid_enrollment_transition", "last_admin_required", "self_admin_action_forbidden", "last_authentication_method", "account_approved", "email_regeneration_unavailable", "mfa_required", "two_step_unconfirmed", "document_not_restorable", "workspace_gone"], undefined>;
69
118
  declare const enrollmentStatusSchema: v.PicklistSchema<["pending", "approved", "rejected", "revoked"], undefined>;
70
119
  /** Which accounts a list of people shows. */
71
120
  declare const cloudAdminUserFilterSchema: v.PicklistSchema<["all", "administrators", "suspended", "without-two-step"], undefined>;
121
+ /** Narrows a list of people, under any filter, to those who sign in a given way. */
122
+ declare const cloudAdminUserMethodSchema: v.PicklistSchema<["password", "google", "apple", "github"], undefined>;
72
123
  /** Which messages a list of email shows, by how their delivery went. */
73
124
  declare const cloudAdminEmailFilterSchema: v.PicklistSchema<["all", "sent", "waiting", "failed"], undefined>;
74
125
  /** Which events a list of activity shows, by what they are about. */
@@ -79,6 +130,7 @@ declare const cloudAdminDocumentFilterSchema: v.PicklistSchema<["all", "reported
79
130
  declare const cloudAdminReportFilterSchema: v.PicklistSchema<["open", "actioned", "dismissed", "all"], undefined>;
80
131
  type AdminErrorCode = v.InferOutput<typeof adminErrorCodeSchema>;
81
132
  type CloudAdminUserFilter = v.InferOutput<typeof cloudAdminUserFilterSchema>;
133
+ type CloudAdminUserMethod = v.InferOutput<typeof cloudAdminUserMethodSchema>;
82
134
  type CloudAdminEmailFilter = v.InferOutput<typeof cloudAdminEmailFilterSchema>;
83
135
  type CloudAdminAuditFilter = v.InferOutput<typeof cloudAdminAuditFilterSchema>;
84
136
  type EnrollmentStatus = v.InferOutput<typeof enrollmentStatusSchema>;
@@ -104,6 +156,11 @@ declare const collaborationTicketSchema: v.ObjectSchema<{
104
156
  readonly name: v.StringSchema<undefined>;
105
157
  }, undefined>], undefined>;
106
158
  readonly permission: v.PicklistSchema<["view", "edit"], undefined>;
159
+ /**
160
+ * Why a peer whose access would let them edit may only view: `storage-limit` when the document's
161
+ * owner holds their whole storage allowance, until they free space or their plan grows.
162
+ */
163
+ readonly readOnly: v.OptionalSchema<v.PicklistSchema<["storage-limit"], undefined>, undefined>;
107
164
  readonly roomEpoch: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
108
165
  readonly expiresAt: v.StringSchema<undefined>;
109
166
  readonly serverEnforcedWrites: v.BooleanSchema<undefined>;
@@ -138,6 +195,7 @@ declare const workspaceEntitlementsSchema: v.ObjectSchema<{
138
195
  }, undefined>;
139
196
  }, undefined>;
140
197
  type WorkspaceEntitlements = v.InferOutput<typeof workspaceEntitlementsSchema>;
198
+ type AccountEntitlements = WorkspaceEntitlements;
141
199
  //#endregion
142
200
  //#region src/contract/discovery.d.ts
143
201
  declare const cloudDiscoverySchema: v.ObjectSchema<{
@@ -157,7 +215,7 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
157
215
  readonly siteKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
158
216
  }, undefined>, undefined>;
159
217
  }, undefined>, undefined>;
160
- readonly socialProviders: v.ArraySchema<v.PicklistSchema<["apple", "google"], undefined>, undefined>;
218
+ readonly socialProviders: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.TransformAction<string[], ("google" | "apple" | "github")[]>]>;
161
219
  readonly enterpriseSSO: v.BooleanSchema<undefined>;
162
220
  readonly enrollmentMode: v.OptionalSchema<v.PicklistSchema<["open", "approval", "closed"], undefined>, "open">;
163
221
  readonly mfa: v.OptionalSchema<v.ObjectSchema<{
@@ -173,8 +231,13 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
173
231
  readonly collaboration: v.BooleanSchema<undefined>;
174
232
  }, undefined>;
175
233
  readonly listing: v.OptionalSchema<v.ObjectSchema<{
176
- readonly minimumEditorVersion: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
234
+ readonly minimumEditorVersion: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Expected a SemVer version">]>;
177
235
  }, undefined>, undefined>;
236
+ /**
237
+ * The oldest editor version the server works with. Older editors ask to be updated instead of
238
+ * connecting, and the server refuses their requests.
239
+ */
240
+ readonly minimumEditorVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Expected a SemVer version">]>, undefined>;
178
241
  /** The services editors reach with Cloud-signed tokens; absent when the deployment has none. */
179
242
  readonly services: v.OptionalSchema<v.ObjectSchema<{
180
243
  readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
@@ -182,7 +245,18 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
182
245
  }, undefined>, undefined>;
183
246
  /** Where people manage their plan and buy credits; absent when the deployment does not bill. */
184
247
  readonly billing: v.OptionalSchema<v.ObjectSchema<{
185
- readonly portalURL: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
248
+ readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
249
+ readonly contractVersion: v.LiteralSchema<"1", undefined>;
250
+ readonly freePlan: v.OptionalSchema<v.ObjectSchema<{
251
+ readonly storageBytes: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
252
+ readonly services: v.BooleanSchema<undefined>;
253
+ readonly monthlyCredits: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
254
+ }, undefined>, undefined>;
255
+ }, undefined>, undefined>;
256
+ /** The community gallery; absent when the deployment has none. */
257
+ readonly community: v.OptionalSchema<v.ObjectSchema<{
258
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
259
+ readonly tourDocumentId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
186
260
  }, undefined>, undefined>;
187
261
  readonly legal: v.OptionalSchema<v.ObjectSchema<{
188
262
  readonly termsURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
@@ -192,6 +266,11 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
192
266
  readonly abuseEmail: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
193
267
  readonly minimumAge: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
194
268
  }, undefined>, undefined>;
269
+ readonly branding: v.OptionalSchema<v.ObjectSchema<{
270
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
271
+ readonly logoURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
272
+ readonly helpURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
273
+ }, undefined>, undefined>;
195
274
  }, undefined>;
196
275
  type CloudDiscovery = v.InferOutput<typeof cloudDiscoverySchema>;
197
276
  //#endregion
@@ -340,6 +419,26 @@ declare const createUploadSchema: v.ObjectSchema<{
340
419
  readonly contentType: v.LiteralSchema<"application/octet-stream", undefined>;
341
420
  }, undefined>;
342
421
  type CreateUploadInput = v.InferOutput<typeof createUploadSchema>;
422
+ /** Where a client puts an object: one presigned PUT, or the parts of a multipart upload. */
423
+ declare const objectUploadSchema: v.VariantSchema<"kind", [v.ObjectSchema<{
424
+ readonly kind: v.LiteralSchema<"single", undefined>;
425
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
426
+ readonly method: v.LiteralSchema<"PUT", undefined>;
427
+ readonly headers: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
428
+ readonly expiresAt: v.StringSchema<undefined>;
429
+ }, undefined>, v.ObjectSchema<{
430
+ readonly kind: v.LiteralSchema<"multipart", undefined>;
431
+ readonly uploadId: v.StringSchema<undefined>;
432
+ readonly partSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
433
+ readonly parts: v.ArraySchema<v.ObjectSchema<{
434
+ readonly partNumber: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
435
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
436
+ readonly method: v.LiteralSchema<"PUT", undefined>;
437
+ readonly headers: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
438
+ }, undefined>, undefined>;
439
+ readonly expiresAt: v.StringSchema<undefined>;
440
+ }, undefined>], undefined>;
441
+ type ObjectUploadTarget = v.InferOutput<typeof objectUploadSchema>;
343
442
  /** An upload the server offers for an image the workspace lacks. */
344
443
  declare const imageUploadOfferSchema: v.ObjectSchema<{
345
444
  readonly checksum: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -574,6 +673,11 @@ declare const workspaceSummarySchema: v.ObjectSchema<{
574
673
  readonly name: v.StringSchema<undefined>;
575
674
  readonly slug: v.StringSchema<undefined>;
576
675
  readonly role: v.PicklistSchema<["viewer", "editor", "admin"], undefined>;
676
+ /**
677
+ * Whether the signed-in account owns the workspace, and so pays for its plan and AI credits.
678
+ * Absent from servers released before it.
679
+ */
680
+ readonly owner: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
577
681
  readonly createdAt: v.StringSchema<undefined>;
578
682
  readonly updatedAt: v.StringSchema<undefined>;
579
683
  }, undefined>;
@@ -584,6 +688,11 @@ declare const workspaceListSchema: v.ObjectSchema<{
584
688
  readonly name: v.StringSchema<undefined>;
585
689
  readonly slug: v.StringSchema<undefined>;
586
690
  readonly role: v.PicklistSchema<["viewer", "editor", "admin"], undefined>;
691
+ /**
692
+ * Whether the signed-in account owns the workspace, and so pays for its plan and AI credits.
693
+ * Absent from servers released before it.
694
+ */
695
+ readonly owner: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
587
696
  readonly createdAt: v.StringSchema<undefined>;
588
697
  readonly updatedAt: v.StringSchema<undefined>;
589
698
  }, undefined>, undefined>;
@@ -760,6 +869,299 @@ declare const documentVersionDownloadSchema: v.ObjectSchema<{
760
869
  }, undefined>;
761
870
  type DocumentVersionDownload = v.InferOutput<typeof documentVersionDownloadSchema>;
762
871
  //#endregion
872
+ //#region src/contract/comments.d.ts
873
+ declare const cloudCommentThreadSchema: v.ObjectSchema<{
874
+ readonly createdAt: v.StringSchema<undefined>;
875
+ /** When anything in the thread last changed: a comment, the pin, or whether it is resolved. */
876
+ readonly updatedAt: v.StringSchema<undefined>;
877
+ readonly resolvedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
878
+ readonly resolvedBy: v.NullableSchema<v.StringSchema<undefined>, undefined>;
879
+ /** Who started it, or brought it in from a file: they may move its pin and delete it. */
880
+ readonly createdBy: v.StringSchema<undefined>;
881
+ /** Whether someone else wrote in it since the asker last read it; false for a guest. */
882
+ readonly unread: v.BooleanSchema<undefined>;
883
+ /** Oldest first; the first is what started the thread. */
884
+ readonly comments: v.ArraySchema<v.ObjectSchema<{
885
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
886
+ readonly author: v.VariantSchema<"kind", [v.ObjectSchema<{
887
+ readonly kind: v.LiteralSchema<"user", undefined>;
888
+ readonly id: v.StringSchema<undefined>;
889
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
890
+ }, undefined>, v.ObjectSchema<{
891
+ readonly kind: v.LiteralSchema<"imported", undefined>;
892
+ readonly name: v.StringSchema<undefined>;
893
+ }, undefined>], undefined>;
894
+ /** The agent that wrote it on its author's behalf. */
895
+ readonly agent: v.NullableSchema<v.StringSchema<undefined>, undefined>;
896
+ /** Markdown, as the editor writes it. */
897
+ readonly body: v.StringSchema<undefined>;
898
+ /** The accounts it names, which hear about it. */
899
+ readonly mentions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
900
+ readonly createdAt: v.StringSchema<undefined>;
901
+ readonly editedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
902
+ }, undefined>, undefined>;
903
+ readonly pageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
904
+ readonly pageName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
905
+ readonly nodeId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
906
+ readonly nodeName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
907
+ readonly offsetX: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
908
+ readonly offsetY: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
909
+ readonly x: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
910
+ readonly y: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
911
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
912
+ }, undefined>;
913
+ type CloudCommentThread = v.InferOutput<typeof cloudCommentThreadSchema>;
914
+ declare const commentThreadsSchema: v.ObjectSchema<{
915
+ readonly threads: v.ArraySchema<v.ObjectSchema<{
916
+ readonly createdAt: v.StringSchema<undefined>;
917
+ /** When anything in the thread last changed: a comment, the pin, or whether it is resolved. */
918
+ readonly updatedAt: v.StringSchema<undefined>;
919
+ readonly resolvedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
920
+ readonly resolvedBy: v.NullableSchema<v.StringSchema<undefined>, undefined>;
921
+ /** Who started it, or brought it in from a file: they may move its pin and delete it. */
922
+ readonly createdBy: v.StringSchema<undefined>;
923
+ /** Whether someone else wrote in it since the asker last read it; false for a guest. */
924
+ readonly unread: v.BooleanSchema<undefined>;
925
+ /** Oldest first; the first is what started the thread. */
926
+ readonly comments: v.ArraySchema<v.ObjectSchema<{
927
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
928
+ readonly author: v.VariantSchema<"kind", [v.ObjectSchema<{
929
+ readonly kind: v.LiteralSchema<"user", undefined>;
930
+ readonly id: v.StringSchema<undefined>;
931
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
932
+ }, undefined>, v.ObjectSchema<{
933
+ readonly kind: v.LiteralSchema<"imported", undefined>;
934
+ readonly name: v.StringSchema<undefined>;
935
+ }, undefined>], undefined>;
936
+ /** The agent that wrote it on its author's behalf. */
937
+ readonly agent: v.NullableSchema<v.StringSchema<undefined>, undefined>;
938
+ /** Markdown, as the editor writes it. */
939
+ readonly body: v.StringSchema<undefined>;
940
+ /** The accounts it names, which hear about it. */
941
+ readonly mentions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
942
+ readonly createdAt: v.StringSchema<undefined>;
943
+ readonly editedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
944
+ }, undefined>, undefined>;
945
+ readonly pageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
946
+ readonly pageName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
947
+ readonly nodeId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
948
+ readonly nodeName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
949
+ readonly offsetX: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
950
+ readonly offsetY: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
951
+ readonly x: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
952
+ readonly y: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
953
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
954
+ }, undefined>, undefined>;
955
+ readonly access: v.ObjectSchema<{
956
+ /** Start threads, reply, and change their own comments; anyone signed in who can view. */
957
+ readonly canComment: v.BooleanSchema<undefined>;
958
+ /** Delete anyone's comments; editors. */
959
+ readonly canModerate: v.BooleanSchema<undefined>;
960
+ /** The asker's account, which their own comments name; null for a guest. */
961
+ readonly accountId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
962
+ }, undefined>;
963
+ }, undefined>;
964
+ type CommentThreads = v.InferOutput<typeof commentThreadsSchema>;
965
+ declare const createCommentThreadSchema: v.ObjectSchema<{
966
+ readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 10000, undefined>]>;
967
+ readonly mentions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, v.MaxLengthAction<string[], 50, undefined>]>, readonly []>;
968
+ readonly agent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
969
+ readonly pageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
970
+ readonly pageName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
971
+ readonly nodeId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
972
+ readonly nodeName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
973
+ readonly offsetX: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
974
+ readonly offsetY: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
975
+ readonly x: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
976
+ readonly y: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
977
+ readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
978
+ }, undefined>;
979
+ type CreateCommentThreadInput = v.InferOutput<typeof createCommentThreadSchema>;
980
+ /** Resolves or reopens a thread, or moves its pin; what is left out stays as it is. */
981
+ declare const updateCommentThreadSchema: v.ObjectSchema<{
982
+ readonly resolved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
983
+ readonly anchor: v.OptionalSchema<v.ObjectSchema<{
984
+ pageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
985
+ pageName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
986
+ /** The top-level layer the pin follows, if any. */
987
+ nodeId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
988
+ nodeName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
989
+ /** The pin's offset from the layer's top-left corner. */
990
+ offsetX: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
991
+ offsetY: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
992
+ /** The pin's canvas position, used once the layer is gone. */
993
+ x: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
994
+ y: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
995
+ }, undefined>, undefined>;
996
+ }, undefined>;
997
+ type UpdateCommentThreadInput = v.InferOutput<typeof updateCommentThreadSchema>;
998
+ declare const createCommentSchema: v.ObjectSchema<{
999
+ readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
1000
+ readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 10000, undefined>]>;
1001
+ readonly mentions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, v.MaxLengthAction<string[], 50, undefined>]>, readonly []>;
1002
+ readonly agent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
1003
+ }, undefined>;
1004
+ type CreateCommentInput = v.InferOutput<typeof createCommentSchema>;
1005
+ declare const updateCommentSchema: v.ObjectSchema<{
1006
+ readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 10000, undefined>]>;
1007
+ readonly mentions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, v.MaxLengthAction<string[], 50, undefined>]>, readonly []>;
1008
+ }, undefined>;
1009
+ type UpdateCommentInput = v.InferOutput<typeof updateCommentSchema>;
1010
+ /** Someone a comment may name: an account that can open the document. */
1011
+ declare const commentPersonSchema: v.ObjectSchema<{
1012
+ readonly id: v.StringSchema<undefined>;
1013
+ readonly name: v.StringSchema<undefined>;
1014
+ readonly image: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1015
+ }, undefined>;
1016
+ type CommentPerson = v.InferOutput<typeof commentPersonSchema>;
1017
+ declare const notificationSettingsSchema: v.ObjectSchema<{
1018
+ readonly commentEmails: v.PicklistSchema<["all", "mentions", "off"], undefined>;
1019
+ }, undefined>;
1020
+ type NotificationSettings = v.InferOutput<typeof notificationSettingsSchema>;
1021
+ /**
1022
+ * Threads a file held when it moved to Cloud. Their authors are names the file gave, which the
1023
+ * server keeps as such; their times are the file's.
1024
+ */
1025
+ declare const importCommentThreadsSchema: v.ObjectSchema<{
1026
+ readonly threads: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1027
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1028
+ readonly resolved: v.BooleanSchema<undefined>;
1029
+ readonly comments: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1030
+ readonly authorName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, undefined>]>;
1031
+ readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 10000, undefined>]>;
1032
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1033
+ }, undefined>, undefined>, v.MinLengthAction<{
1034
+ authorName: string;
1035
+ body: string;
1036
+ createdAt: string;
1037
+ }[], 1, undefined>, v.MaxLengthAction<{
1038
+ authorName: string;
1039
+ body: string;
1040
+ createdAt: string;
1041
+ }[], 10000, undefined>]>;
1042
+ readonly pageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
1043
+ readonly pageName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
1044
+ readonly nodeId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
1045
+ readonly nodeName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
1046
+ readonly offsetX: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
1047
+ readonly offsetY: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
1048
+ readonly x: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
1049
+ readonly y: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
1050
+ }, undefined>, undefined>, v.MaxLengthAction<{
1051
+ createdAt: string;
1052
+ resolved: boolean;
1053
+ comments: {
1054
+ authorName: string;
1055
+ body: string;
1056
+ createdAt: string;
1057
+ }[];
1058
+ pageId: string;
1059
+ pageName: string | null;
1060
+ nodeId: string | null;
1061
+ nodeName: string | null;
1062
+ offsetX: number | null;
1063
+ offsetY: number | null;
1064
+ x: number;
1065
+ y: number;
1066
+ }[], 1000, undefined>, v.CheckAction<{
1067
+ createdAt: string;
1068
+ resolved: boolean;
1069
+ comments: {
1070
+ authorName: string;
1071
+ body: string;
1072
+ createdAt: string;
1073
+ }[];
1074
+ pageId: string;
1075
+ pageName: string | null;
1076
+ nodeId: string | null;
1077
+ nodeName: string | null;
1078
+ offsetX: number | null;
1079
+ offsetY: number | null;
1080
+ x: number;
1081
+ y: number;
1082
+ }[], "An import brings in at most 10000 comments">]>;
1083
+ }, undefined>;
1084
+ type ImportCommentThreadsInput = v.InferOutput<typeof importCommentThreadsSchema>;
1085
+ //#endregion
1086
+ //#region src/contract/community.d.ts
1087
+ /** The community workspace's documents, most recently changed first. */
1088
+ declare const communityDocumentsSchema: v.ObjectSchema<{
1089
+ readonly documents: v.ArraySchema<v.ObjectSchema<{
1090
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1091
+ readonly name: v.StringSchema<undefined>;
1092
+ readonly kind: v.PicklistSchema<["design", "board"], undefined>;
1093
+ readonly updatedAt: v.StringSchema<undefined>;
1094
+ readonly revisionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1095
+ readonly thumbnailPath: v.StringSchema<undefined>;
1096
+ readonly versions: v.ArraySchema<v.ObjectSchema<{
1097
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1098
+ readonly name: v.StringSchema<undefined>;
1099
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1100
+ readonly createdAt: v.StringSchema<undefined>;
1101
+ /** Whether the document holds this version now, with nothing changed since it was named. */
1102
+ readonly current: v.BooleanSchema<undefined>;
1103
+ }, undefined>, undefined>;
1104
+ }, undefined>, undefined>;
1105
+ }, undefined>;
1106
+ type CommunityDocuments = v.InferOutput<typeof communityDocumentsSchema>;
1107
+ /** A community document, or one of its named versions, with where to download it. */
1108
+ declare const communityDownloadSchema: v.ObjectSchema<{
1109
+ readonly document: v.ObjectSchema<{
1110
+ readonly document: v.ObjectSchema<{
1111
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1112
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1113
+ readonly name: v.StringSchema<undefined>;
1114
+ readonly kind: v.OptionalSchema<v.PicklistSchema<["design", "board"], undefined>, "design">;
1115
+ readonly currentRevisionId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
1116
+ readonly version: v.NumberSchema<undefined>;
1117
+ readonly createdAt: v.StringSchema<undefined>;
1118
+ readonly updatedAt: v.StringSchema<undefined>;
1119
+ }, undefined>;
1120
+ readonly revisionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1121
+ readonly byteSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
1122
+ readonly checksum: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1123
+ readonly contentType: v.StringSchema<undefined>;
1124
+ readonly download: v.ObjectSchema<{
1125
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1126
+ readonly method: v.LiteralSchema<"GET", undefined>;
1127
+ readonly headers: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
1128
+ readonly expiresAt: v.StringSchema<undefined>;
1129
+ }, undefined>;
1130
+ readonly images: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1131
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1132
+ readonly checksum: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1133
+ readonly byteSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
1134
+ readonly download: v.ObjectSchema<{
1135
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1136
+ readonly method: v.LiteralSchema<"GET", undefined>;
1137
+ readonly headers: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
1138
+ readonly expiresAt: v.StringSchema<undefined>;
1139
+ }, undefined>;
1140
+ }, undefined>, undefined>, v.MaxLengthAction<{
1141
+ name: string;
1142
+ checksum: string;
1143
+ byteSize: number;
1144
+ download: {
1145
+ url: string;
1146
+ method: "GET";
1147
+ headers: {
1148
+ [x: string]: string;
1149
+ };
1150
+ expiresAt: string;
1151
+ };
1152
+ }[], 10000, undefined>]>;
1153
+ }, undefined>;
1154
+ readonly version: v.NullableSchema<v.ObjectSchema<{
1155
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1156
+ readonly name: v.StringSchema<undefined>;
1157
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1158
+ readonly createdAt: v.StringSchema<undefined>;
1159
+ /** Whether the document holds this version now, with nothing changed since it was named. */
1160
+ readonly current: v.BooleanSchema<undefined>;
1161
+ }, undefined>, undefined>;
1162
+ }, undefined>;
1163
+ type CommunityDownload = v.InferOutput<typeof communityDownloadSchema>;
1164
+ //#endregion
763
1165
  //#region src/contract/reports.d.ts
764
1166
  /**
765
1167
  * A report about a document someone opened from a share link: the link's secret proves they can
@@ -780,12 +1182,15 @@ type CloudFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Resp
780
1182
  type DiscoverCloudOptions = {
781
1183
  fetch?: CloudFetch;
782
1184
  signal?: AbortSignal;
1185
+ /** The editor's own version, checked against the server's minimum. */
1186
+ editorVersion?: string;
783
1187
  };
784
1188
  /**
785
1189
  * Why a server could not be used: the address is not a web address, nothing answered, something
786
- * answered but not as OpenPencil Cloud, or it speaks another protocol version.
1190
+ * answered but not as OpenPencil Cloud, the server is older than this editor supports, or this
1191
+ * editor is older than the server supports.
787
1192
  */
788
- type CloudDiscoveryFailure = 'invalid-address' | 'unreachable' | 'not-cloud' | 'outdated';
1193
+ type CloudDiscoveryFailure = 'invalid-address' | 'unreachable' | 'not-cloud' | 'server-outdated' | 'editor-outdated';
789
1194
  declare class CloudClientError extends Error {
790
1195
  readonly cause?: unknown | undefined;
791
1196
  readonly reason: CloudDiscoveryFailure;
@@ -806,6 +1211,12 @@ declare class CloudServiceError extends Error {
806
1211
  readonly name = "CloudServiceError";
807
1212
  constructor(status: number, code?: ServiceErrorCode | undefined);
808
1213
  }
1214
+ /** A service endpoint a token would reach in the clear, which no request is sent to. */
1215
+ declare class CloudServiceInsecureEndpointError extends Error {
1216
+ readonly url: string;
1217
+ readonly name = "CloudServiceInsecureEndpointError";
1218
+ constructor(url: string);
1219
+ }
809
1220
  /**
810
1221
  * Sends each request with a current token. A token the service refuses, for instance one signed
811
1222
  * by a key Cloud has since replaced, is dropped and a request that can be replayed is sent once
@@ -860,7 +1271,23 @@ type DeviceActionResult = Promise<{
860
1271
  error_description: string;
861
1272
  };
862
1273
  }>;
863
- type CloudAuthClient = Pick<ReturnType<typeof createAuthClient>, 'getSession' | 'signIn' | 'signOut' | 'signUp' | 'sendVerificationEmail' | 'requestPasswordReset' | 'resetPassword'> & {
1274
+ type CloudAuthClient = Pick<ReturnType<typeof createAuthClient>, 'getSession' | 'signIn' | 'signOut' | 'sendVerificationEmail' | 'requestPasswordReset' | 'resetPassword'> & {
1275
+ signUp: {
1276
+ /** Also takes the language the server writes to the account in, a field Cloud adds. */
1277
+ email(input: {
1278
+ name: string;
1279
+ email: string;
1280
+ password: string;
1281
+ locale: string;
1282
+ callbackURL?: string;
1283
+ }): Promise<{
1284
+ data: unknown;
1285
+ error: {
1286
+ code?: string;
1287
+ status: number;
1288
+ } | null;
1289
+ }>;
1290
+ };
864
1291
  signIn: ReturnType<typeof createAuthClient>['signIn'] & {
865
1292
  passkey(): Promise<{
866
1293
  data: unknown;
@@ -958,12 +1385,16 @@ declare function signInToCloudWithEmail(discovery: CloudDiscovery, input: {
958
1385
  email: string;
959
1386
  password: string;
960
1387
  }, options?: CloudEmailAuthOptions): Promise<CloudAuthResult<CloudEmailSignIn>>;
961
- /** Creates an account; the server emails a link that opens `verifiedURL` once it is confirmed. */
1388
+ /**
1389
+ * Creates an account; the server emails a link that opens `verifiedURL` once it is confirmed,
1390
+ * written in `locale`, the app's language.
1391
+ */
962
1392
  declare function signUpToCloudWithEmail(discovery: CloudDiscovery, input: {
963
1393
  name: string;
964
1394
  email: string;
965
1395
  password: string;
966
1396
  verifiedURL: string;
1397
+ locale: string;
967
1398
  }, options?: CloudEmailAuthOptions): Promise<CloudAuthResult>;
968
1399
  declare function resendCloudVerification(discovery: CloudDiscovery, input: {
969
1400
  email: string;
@@ -982,6 +1413,28 @@ declare function cloudSignInURL(discovery: CloudDiscovery, returnURL: string, pr
982
1413
  /** Accept only same-origin application paths for post-authentication navigation. */
983
1414
  declare function cloudRedirectPath(value: unknown, fallback?: string): string;
984
1415
  //#endregion
1416
+ //#region src/client/files/archive.d.ts
1417
+ /** An image a `.fig` archive holds, as Cloud stores it apart from the file. */
1418
+ type CloudDocumentImage = {
1419
+ name: string;
1420
+ bytes: Uint8Array;
1421
+ };
1422
+ /**
1423
+ * The archive without its images, and the images, as views of `bytes`. A file that is not a zip
1424
+ * archive, or holds no images, comes back whole; an image under a name Cloud does not store
1425
+ * apart stays inside.
1426
+ */
1427
+ declare function splitCloudDocument(bytes: Uint8Array): Promise<{
1428
+ lean: Uint8Array;
1429
+ images: CloudDocumentImage[];
1430
+ }>;
1431
+ /** The archive with its images put back under their names; the lean archive when there are none. */
1432
+ declare function assembleCloudDocument(lean: Uint8Array, images: CloudDocumentImage[]): Promise<Uint8Array>;
1433
+ //#endregion
1434
+ //#region src/client/files/checksum.d.ts
1435
+ /** The SHA-256 of `bytes`, in Base64, as Cloud checks an upload against it. */
1436
+ declare function cloudChecksum(bytes: Uint8Array): Promise<string>;
1437
+ //#endregion
985
1438
  //#region src/client/response.d.ts
986
1439
  type CloudClientDiagnostic = (message: string, error: unknown) => void;
987
1440
  declare class CloudAPIError extends Error {
@@ -991,7 +1444,25 @@ declare class CloudAPIError extends Error {
991
1444
  constructor(message: string, status: number, code?: string | undefined);
992
1445
  }
993
1446
  //#endregion
994
- //#region src/client/api.d.ts
1447
+ //#region src/client/comments.d.ts
1448
+ /**
1449
+ * What every way of reaching a document's comments does, through membership or a link: the app
1450
+ * talks to one without asking which it is.
1451
+ */
1452
+ type CloudCommentRequests = {
1453
+ list(): Promise<CommentThreads>;
1454
+ get(threadId: string): Promise<CloudCommentThread>;
1455
+ createThread(input: CreateCommentThreadInput): Promise<CloudCommentThread>;
1456
+ updateThread(threadId: string, input: UpdateCommentThreadInput): Promise<CloudCommentThread>;
1457
+ deleteThread(threadId: string): Promise<void>;
1458
+ reply(threadId: string, input: CreateCommentInput): Promise<CloudCommentThread>;
1459
+ updateComment(threadId: string, commentId: string, input: UpdateCommentInput): Promise<CloudCommentThread>;
1460
+ deleteComment(threadId: string, commentId: string): Promise<CloudCommentThread | null>;
1461
+ /** Records that the signed-in account read the thread as it is now. */
1462
+ markRead(threadId: string): Promise<void>;
1463
+ };
1464
+ //#endregion
1465
+ //#region src/client/documents.d.ts
995
1466
  declare const uploadResponseSchema: v.ObjectSchema<{
996
1467
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
997
1468
  readonly upload: v.VariantSchema<"kind", [v.ObjectSchema<{
@@ -1013,26 +1484,18 @@ declare const uploadResponseSchema: v.ObjectSchema<{
1013
1484
  readonly expiresAt: v.StringSchema<undefined>;
1014
1485
  }, undefined>], undefined>;
1015
1486
  }, undefined>;
1487
+ type CloudUpload = v.InferOutput<typeof uploadResponseSchema>;
1488
+ //#endregion
1489
+ //#region src/client/api.d.ts
1016
1490
  type CloudRequestOptions = {
1017
1491
  fetch?: CloudFetch;
1018
1492
  signal?: AbortSignal;
1019
1493
  accessToken?: string;
1020
1494
  onDiagnostic?: CloudClientDiagnostic;
1021
1495
  };
1022
- type CloudUpload = v.InferOutput<typeof uploadResponseSchema>;
1023
1496
  declare function createCloudAPIClient(baseURL: string, options?: CloudRequestOptions): {
1024
- /** Documents shared with the person directly, outside their workspaces. */
1025
- listSharedDocuments(): Promise<SharedDocument[]>;
1026
- listDocuments(workspaceId: string): Promise<DocumentSummary[]>;
1027
- createDocument(workspaceId: string, input: CreateDocumentRequest): Promise<DocumentSummary>;
1028
- /** Documents in Trash the person may restore, across their workspaces, newest first. */
1029
- listTrash(): Promise<TrashedDocument[]>;
1030
- restoreDocument(documentId: string): Promise<void>;
1031
- /** Deletes a document in Trash for good. */
1032
- purgeDocument(documentId: string): Promise<void>;
1033
- deleteDocument(documentId: string): Promise<void>;
1034
- getDocument(documentId: string): Promise<DocumentDownload>;
1035
- getDocumentAccess(documentId: string): Promise<DocumentAccess>;
1497
+ listCommunityDocuments(): Promise<CommunityDocuments>;
1498
+ getCommunityDocument(documentId: string, versionId?: string | null): Promise<CommunityDownload>;
1036
1499
  listDocumentShares(documentId: string): Promise<DocumentShare[]>;
1037
1500
  createDocumentShare(documentId: string, input: CreateDocumentShareInput): Promise<{
1038
1501
  share: {
@@ -1088,10 +1551,8 @@ declare function createCloudAPIClient(baseURL: string, options?: CloudRequestOpt
1088
1551
  createInvitationContinuation(input: CreateInvitationContinuationInput): Promise<InvitationContinuation>;
1089
1552
  consumeInvitationContinuation(id: string): Promise<CreateInvitationContinuationInput>;
1090
1553
  previewInvitation(invitationId: string, input: AcceptDocumentInvitationInput): Promise<InvitationPreview>;
1091
- /** Accepts a document or workspace invitation, and says which it was. */
1092
1554
  acceptInvitation(invitationId: string, input: AcceptDocumentInvitationInput): Promise<AcceptedInvitation>;
1093
1555
  revokeDocumentInvitation(documentId: string, invitationId: string): Promise<void>;
1094
- /** Reports the document a share link opens to the server's administrators. */
1095
1556
  fileDocumentReport(shareId: string, input: FileDocumentReportInput): Promise<void>;
1096
1557
  resolveDocumentShare(shareId: string, input: ResolveDocumentShareInput): Promise<{
1097
1558
  documentId: string;
@@ -1165,10 +1626,12 @@ declare function createCloudAPIClient(baseURL: string, options?: CloudRequestOpt
1165
1626
  };
1166
1627
  }>;
1167
1628
  getSharedCollaborationTicket(shareId: string, input: ResolveDocumentShareInput): Promise<CollaborationTicket>;
1168
- getCollaborationTicket(documentId: string): Promise<CollaborationTicket>;
1169
- createUpload(documentId: string, input: CreateUploadInput): Promise<CloudUpload>;
1170
- commitUpload(uploadId: string, input: CommitUploadRequest): Promise<DocumentSummary>;
1171
- /** A page of the document's version history, newest first. */
1629
+ sharedComments(shareId: string, secret: string): CloudCommentRequests;
1630
+ documentComments(documentId: string): CloudCommentRequests;
1631
+ commentPeople(documentId: string): Promise<CommentPerson[]>;
1632
+ notificationSettings(): Promise<NotificationSettings>;
1633
+ setNotificationSettings(json: NotificationSettings): Promise<NotificationSettings>;
1634
+ importCommentThreads(documentId: string, json: ImportCommentThreadsInput): Promise<CommentThreads>;
1172
1635
  listDocumentVersions(documentId: string, page?: {
1173
1636
  before?: string;
1174
1637
  limit?: number;
@@ -1203,6 +1666,19 @@ declare function createCloudAPIClient(baseURL: string, options?: CloudRequestOpt
1203
1666
  };
1204
1667
  }>;
1205
1668
  duplicateDocumentVersion(documentId: string, versionId: string, input: DuplicateDocumentVersionInput): Promise<DocumentSummary>;
1669
+ getUserProfile(documentId: string, userId: string): Promise<CloudUserProfile | null>;
1670
+ listSharedDocuments(): Promise<SharedDocument[]>;
1671
+ listDocuments(workspaceId: string): Promise<DocumentSummary[]>;
1672
+ createDocument(workspaceId: string, input: CreateDocumentRequest): Promise<DocumentSummary>;
1673
+ listTrash(): Promise<TrashedDocument[]>;
1674
+ restoreDocument(documentId: string): Promise<void>;
1675
+ purgeDocument(documentId: string): Promise<void>;
1676
+ deleteDocument(documentId: string): Promise<void>;
1677
+ getDocument(documentId: string): Promise<DocumentDownload>;
1678
+ getDocumentAccess(documentId: string): Promise<DocumentAccess>;
1679
+ getCollaborationTicket(documentId: string): Promise<CollaborationTicket>;
1680
+ createUpload(documentId: string, input: CreateUploadInput): Promise<CloudUpload>;
1681
+ commitUpload(uploadId: string, input: CommitUploadRequest): Promise<DocumentSummary>;
1206
1682
  requestImageUploads(documentId: string, input: RequestImageUploadsInput): Promise<ImageUploadOffer[]>;
1207
1683
  commitImageUploads(documentId: string, uploads: CommitImageUploadsInput["uploads"]): Promise<void>;
1208
1684
  getImageLinks(documentId: string, checksums: string[]): Promise<DocumentImageLink[]>;
@@ -1222,10 +1698,144 @@ declare function createCloudAPIClient(baseURL: string, options?: CloudRequestOpt
1222
1698
  getSession(): Promise<CloudSession | null>;
1223
1699
  /** A short-lived token for the deployment's services, on the workspace's behalf. */
1224
1700
  requestServicesToken(workspaceId: string): Promise<ServicesToken>;
1225
- getUserProfile(documentId: string, userId: string): Promise<CloudUserProfile | null>;
1701
+ /** A short-lived token for the deployment's billing, for the signed-in person's own account. */
1702
+ requestBillingToken(): Promise<BillingToken>;
1703
+ /** The signed-in account's plan, and the storage its workspaces hold together. */
1704
+ getAccountEntitlements(): Promise<AccountEntitlements>;
1226
1705
  };
1227
1706
  type CloudAPIClient = ReturnType<typeof createCloudAPIClient>;
1228
1707
  //#endregion
1708
+ //#region src/client/files/objects.d.ts
1709
+ /** How bytes reach the object store, which carries no Cloud session: `fetch` or a native one. */
1710
+ type CloudObjectFetch = (input: string, init: RequestInit) => Promise<Response>;
1711
+ /** How much of a transfer is done; the total is unknown until the server says. */
1712
+ type CloudTransferProgress = {
1713
+ transferredBytes: number;
1714
+ totalBytes: number | null;
1715
+ };
1716
+ /** Bytes on their way to the object store, and how to report and stop the transfer. */
1717
+ type CloudObjectTransfer = {
1718
+ bytes: Uint8Array;
1719
+ objectFetch: CloudObjectFetch;
1720
+ onProgress?: (progress: CloudTransferProgress) => void;
1721
+ signal?: AbortSignal;
1722
+ };
1723
+ type CloudObjectUpload = CloudObjectTransfer & {
1724
+ cloud: Pick<CloudAPIClient, 'createUpload'>;
1725
+ documentId: string;
1726
+ checksum: string;
1727
+ baseRevision: string | null;
1728
+ };
1729
+ /** The parts a multipart upload's commit names. */
1730
+ type CloudMultipartCommit = {
1731
+ uploadId: string;
1732
+ parts: {
1733
+ partNumber: number;
1734
+ etag: string;
1735
+ }[];
1736
+ };
1737
+ type CloudObjectUploadResult = {
1738
+ uploadId: string;
1739
+ multipart?: CloudMultipartCommit;
1740
+ };
1741
+ /**
1742
+ * Puts bytes where the server said, in parallel parts for a multipart upload. What a commit names
1743
+ * of a multipart upload, or nothing for a single one.
1744
+ */
1745
+ declare function putCloudObject(target: ObjectUploadTarget, upload: CloudObjectTransfer): Promise<CloudMultipartCommit | undefined>;
1746
+ /**
1747
+ * Sends a document's bytes straight to the server's object store through presigned URLs, in
1748
+ * parallel parts for large files, starting once more if the URLs expired on the way.
1749
+ */
1750
+ declare function uploadCloudObject(upload: CloudObjectUpload): Promise<CloudObjectUploadResult>;
1751
+ //#endregion
1752
+ //#region src/client/files/download.d.ts
1753
+ /** An image a live room names, from where the server linked it, checked against its record. */
1754
+ declare function downloadCloudImage(link: DocumentImageLink, objectFetch: CloudObjectFetch, signal?: AbortSignal): Promise<Uint8Array>;
1755
+ /** A revision as the editor opens it: its stored file with every image put back under its name. */
1756
+ declare function downloadCloudDocument(download: DocumentDownload, objectFetch: CloudObjectFetch, options?: {
1757
+ signal?: AbortSignal;
1758
+ onProgress?: (progress: CloudTransferProgress) => void;
1759
+ }): Promise<Uint8Array>;
1760
+ /**
1761
+ * Bytes `start` to `endExclusive` of a revision, for reading its preview without the rest. Only
1762
+ * a partial response of exactly that range counts: a store that ignores the range, or answers
1763
+ * another one, is stopped rather than left sending the file. `Content-Range` is checked when the
1764
+ * store's CORS rules let the browser read it.
1765
+ */
1766
+ declare function readCloudRevisionRange(download: DocumentDownload, objectFetch: (input: string, init: RequestInit) => Promise<Response>, start: number, endExclusive: number): Promise<Uint8Array>;
1767
+ //#endregion
1768
+ //#region src/client/files/images.d.ts
1769
+ type ImageCommitUpload = CommitImageUploadsInput['uploads'][number];
1770
+ /** Uploads in commits that each stay under `IMAGE_COMMIT_BYTES` once sent. */
1771
+ declare function imageCommitBatches<T extends ImageCommitUpload>(uploads: readonly T[]): T[][];
1772
+ /**
1773
+ * Uploads the images the document's workspace lacks: the server answers with uploads for those
1774
+ * only, and they are committed together once their bytes are in place.
1775
+ */
1776
+ declare function uploadCloudImages(input: {
1777
+ cloud: Pick<CloudAPIClient, 'requestImageUploads' | 'commitImageUploads'>;
1778
+ documentId: string;
1779
+ images: {
1780
+ checksum: string;
1781
+ bytes: Uint8Array;
1782
+ }[];
1783
+ objectFetch: CloudObjectFetch;
1784
+ signal?: AbortSignal;
1785
+ }): Promise<void>;
1786
+ //#endregion
1787
+ //#region src/client/files/save.d.ts
1788
+ /**
1789
+ * A `.fig` as Cloud stores it: the file without its images, which the workspace keeps once, with
1790
+ * the checksum of each. The lean file's checksum is the revision's, so an unchanged file is known
1791
+ * before anything is sent.
1792
+ */
1793
+ type PreparedCloudDocument = {
1794
+ lean: Uint8Array;
1795
+ checksum: string;
1796
+ images: {
1797
+ name: string;
1798
+ bytes: Uint8Array;
1799
+ checksum: string;
1800
+ }[];
1801
+ };
1802
+ declare function prepareCloudDocument(bytes: Uint8Array): Promise<PreparedCloudDocument>;
1803
+ /**
1804
+ * Saves a document as a new revision on top of `baseRevision`, or as its first: the images the
1805
+ * workspace lacks, then the file, committed together. An image released between asking and
1806
+ * committing is uploaded again by a second try. A save on top of a revision that is no longer the
1807
+ * latest fails with a `revision_conflict` `CloudAPIError`.
1808
+ */
1809
+ declare function saveCloudDocument(input: {
1810
+ cloud: Pick<CloudAPIClient, 'requestImageUploads' | 'commitImageUploads' | 'createUpload' | 'commitUpload'>;
1811
+ documentId: string;
1812
+ document: PreparedCloudDocument;
1813
+ name: string;
1814
+ kind: DocumentSummary['kind'];
1815
+ baseRevision: string | null;
1816
+ objectFetch: CloudObjectFetch;
1817
+ onProgress?: (progress: CloudTransferProgress) => void;
1818
+ }): Promise<DocumentSummary>;
1819
+ //#endregion
1820
+ //#region src/client/tour.d.ts
1821
+ /** The tour a server's gallery names, as one file, and the release it was named for. */
1822
+ type CommunityTour = {
1823
+ name: string;
1824
+ version: string | null;
1825
+ bytes: Uint8Array;
1826
+ };
1827
+ /**
1828
+ * The tour a Cloud server's community gallery names (`[community] tour`), with its images, as
1829
+ * the named version for `version` when the gallery has one, such as the release an older editor
1830
+ * is, else as it is now. Null when the server names no tour or its gallery no longer holds it.
1831
+ * Requests carry no account, so any page may make them, as the documentation site's landing does.
1832
+ */
1833
+ declare function fetchCommunityTour(serverURL: string, options?: {
1834
+ version?: string | null;
1835
+ fetch?: CloudFetch;
1836
+ signal?: AbortSignal;
1837
+ }): Promise<CommunityTour | null>;
1838
+ //#endregion
1229
1839
  //#region src/client/device-authorization.d.ts
1230
1840
  declare const deviceCodeSchema: v.ObjectSchema<{
1231
1841
  readonly device_code: v.StringSchema<undefined>;
@@ -1335,7 +1945,12 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1335
1945
  requestRevision: number;
1336
1946
  };
1337
1947
  }>;
1338
- users(request: AdminListRequest<CloudAdminUserFilter>, signal?: AbortSignal): Promise<{
1948
+ inviteEnrollments(signal?: AbortSignal): Promise<{
1949
+ invited: number;
1950
+ }>;
1951
+ users(request: AdminListRequest<CloudAdminUserFilter> & {
1952
+ method?: CloudAdminUserMethod;
1953
+ }, signal?: AbortSignal): Promise<{
1339
1954
  total: number;
1340
1955
  counts: {
1341
1956
  all: number;
@@ -1351,6 +1966,8 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1351
1966
  twoStep: boolean;
1352
1967
  lastActiveAt: string | null;
1353
1968
  workspaceCount: number;
1969
+ methods: string[];
1970
+ request?: "pending" | "rejected" | "revoked" | "approved" | null | undefined;
1354
1971
  id: string;
1355
1972
  name: string;
1356
1973
  email: string;
@@ -1367,21 +1984,25 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1367
1984
  twoStep: boolean;
1368
1985
  lastActiveAt: string | null;
1369
1986
  workspaceCount: number;
1987
+ methods: string[];
1988
+ request?: "pending" | "rejected" | "revoked" | "approved" | null | undefined;
1370
1989
  id: string;
1371
1990
  name: string;
1372
1991
  email: string;
1373
1992
  image: string | null;
1374
1993
  };
1375
1994
  methods: {
1995
+ id: string;
1376
1996
  provider: string;
1377
1997
  createdAt: string;
1998
+ canRemove: boolean;
1378
1999
  }[];
1379
2000
  authenticator: boolean;
1380
2001
  passkeyCount: number;
1381
2002
  sessions: {
1382
2003
  id: string;
1383
2004
  current: boolean;
1384
- method: "password" | "google" | "apple" | "passkey" | "two-step" | "email-link" | "desktop" | "other" | null;
2005
+ method: "other" | "password" | "passkey" | "two-step" | "google" | "apple" | "github" | "email-link" | "desktop" | null;
1385
2006
  ipAddress: string | null;
1386
2007
  browser: string | null;
1387
2008
  system: string | null;
@@ -1391,7 +2012,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1391
2012
  }[];
1392
2013
  signIns: {
1393
2014
  id: string;
1394
- method: "password" | "google" | "apple" | "passkey" | "two-step" | "email-link" | "desktop" | "other";
2015
+ method: "other" | "password" | "passkey" | "two-step" | "google" | "apple" | "github" | "email-link" | "desktop";
1395
2016
  ipAddress: string | null;
1396
2017
  browser: string | null;
1397
2018
  system: string | null;
@@ -1400,12 +2021,15 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1400
2021
  workspaces: {
1401
2022
  id: string;
1402
2023
  name: string;
1403
- role: "admin" | "viewer" | "editor";
2024
+ role: "viewer" | "editor" | "admin";
1404
2025
  memberCount: number;
1405
2026
  joinedAt: string;
1406
2027
  }[];
1407
2028
  }>;
1408
- userAction(action: "ban" | "unban" | "revoke-sessions" | "reset-two-step" | "remove-picture", userId: string, reason?: string, signal?: AbortSignal): Promise<{
2029
+ userAction(action: "ban" | "unban" | "revoke-sessions" | "reset-two-step" | "remove-picture" | "delete", userId: string, reason?: string, signal?: AbortSignal): Promise<{
2030
+ ok: true;
2031
+ }>;
2032
+ removeSignInMethod(userId: string, methodId: string, signal?: AbortSignal): Promise<{
1409
2033
  ok: true;
1410
2034
  }>;
1411
2035
  setAdmin(userId: string, enabled: boolean, signal?: AbortSignal): Promise<{
@@ -1440,9 +2064,9 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1440
2064
  audit(request: AdminListRequest<CloudAdminAuditFilter>, signal?: AbortSignal): Promise<{
1441
2065
  total: number;
1442
2066
  counts: {
2067
+ all: number;
1443
2068
  email: number;
1444
2069
  documents: number;
1445
- all: number;
1446
2070
  accounts: number;
1447
2071
  requests: number;
1448
2072
  };
@@ -1465,14 +2089,14 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1465
2089
  reports(request: AdminListRequest<CloudAdminReportFilter>, signal?: AbortSignal): Promise<{
1466
2090
  total: number;
1467
2091
  counts: {
1468
- open: number;
1469
2092
  all: number;
2093
+ open: number;
1470
2094
  dismissed: number;
1471
2095
  actioned: number;
1472
2096
  };
1473
2097
  reports: {
1474
2098
  id: string;
1475
- reason: "other" | "spam-phishing" | "illegal" | "copyright" | "harassment";
2099
+ reason: "spam-phishing" | "illegal" | "copyright" | "harassment" | "other";
1476
2100
  description: string;
1477
2101
  status: "open" | "dismissed" | "actioned";
1478
2102
  reporter: {
@@ -1485,6 +2109,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1485
2109
  document: {
1486
2110
  id: string;
1487
2111
  name: string;
2112
+ kind: "design" | "board";
1488
2113
  workspace: {
1489
2114
  id: string;
1490
2115
  name: string;
@@ -1501,6 +2126,12 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1501
2126
  openReports: number;
1502
2127
  purgedAt: string | null;
1503
2128
  destroyedAt: string | null;
2129
+ revisionId: string | null;
2130
+ exposure: {
2131
+ community: boolean;
2132
+ links: number;
2133
+ editLinks: number;
2134
+ };
1504
2135
  };
1505
2136
  share: {
1506
2137
  id: string;
@@ -1522,6 +2153,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1522
2153
  documents: {
1523
2154
  id: string;
1524
2155
  name: string;
2156
+ kind: "design" | "board";
1525
2157
  workspace: {
1526
2158
  id: string;
1527
2159
  name: string;
@@ -1538,6 +2170,50 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1538
2170
  openReports: number;
1539
2171
  purgedAt: string | null;
1540
2172
  destroyedAt: string | null;
2173
+ revisionId: string | null;
2174
+ exposure: {
2175
+ community: boolean;
2176
+ links: number;
2177
+ editLinks: number;
2178
+ };
2179
+ }[];
2180
+ }>;
2181
+ documentThumbnailURL(documentId: string, revisionId: string): string;
2182
+ downloadDocument(id: string, signal?: AbortSignal): Promise<{
2183
+ document: {
2184
+ id: string;
2185
+ workspaceId: string;
2186
+ name: string;
2187
+ kind: "design" | "board";
2188
+ currentRevisionId: string | null;
2189
+ version: number;
2190
+ createdAt: string;
2191
+ updatedAt: string;
2192
+ };
2193
+ revisionId: string;
2194
+ byteSize: number;
2195
+ checksum: string;
2196
+ contentType: string;
2197
+ download: {
2198
+ url: string;
2199
+ method: "GET";
2200
+ headers: {
2201
+ [x: string]: string;
2202
+ };
2203
+ expiresAt: string;
2204
+ };
2205
+ images: {
2206
+ name: string;
2207
+ checksum: string;
2208
+ byteSize: number;
2209
+ download: {
2210
+ url: string;
2211
+ method: "GET";
2212
+ headers: {
2213
+ [x: string]: string;
2214
+ };
2215
+ expiresAt: string;
2216
+ };
1541
2217
  }[];
1542
2218
  }>;
1543
2219
  documentAction(id: string, action: "disable" | "enable" | "undelete", reason?: string, signal?: AbortSignal): Promise<{
@@ -1559,6 +2235,39 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1559
2235
  documents: number;
1560
2236
  storedBytes: number;
1561
2237
  }>;
2238
+ notificationSettings(signal?: AbortSignal): Promise<{
2239
+ commentEmails: "all" | "mentions" | "off";
2240
+ }>;
2241
+ setNotificationSettings(settings: NotificationSettings, signal?: AbortSignal): Promise<{
2242
+ commentEmails: "all" | "mentions" | "off";
2243
+ }>;
2244
+ entitlements(signal?: AbortSignal): Promise<{
2245
+ entitlements: {
2246
+ features: {
2247
+ links: boolean;
2248
+ guestView: boolean;
2249
+ guestEdit: boolean;
2250
+ guestPresence: boolean;
2251
+ collaboration: boolean;
2252
+ revisionHistory: boolean;
2253
+ cloudServices: boolean;
2254
+ };
2255
+ limits: {
2256
+ maximumFileBytes: number;
2257
+ maximumStorageBytes: number | null;
2258
+ maximumParticipants: number | null;
2259
+ monthlyCreditAllowance: number | null;
2260
+ };
2261
+ usage: {
2262
+ committedStorageBytes: number;
2263
+ reservedStorageBytes: number;
2264
+ };
2265
+ };
2266
+ }>;
2267
+ billingToken(signal?: AbortSignal): Promise<{
2268
+ token: string;
2269
+ expiresAt: string;
2270
+ }>;
1562
2271
  accountStatus(signal?: AbortSignal): Promise<{
1563
2272
  user: {
1564
2273
  userId: string;
@@ -1567,7 +2276,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1567
2276
  image?: string | null | undefined;
1568
2277
  deploymentRole?: "user" | "admin" | undefined;
1569
2278
  };
1570
- state: "active" | "pending" | "rejected" | "revoked" | "terms";
2279
+ state: "active" | "pending" | "rejected" | "revoked" | "two-step" | "terms";
1571
2280
  }>;
1572
2281
  acceptTerms(version: string, signal?: AbortSignal): Promise<{
1573
2282
  ok: true;
@@ -1575,11 +2284,11 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1575
2284
  authenticationMethods(signal?: AbortSignal): Promise<{
1576
2285
  methods: {
1577
2286
  id: string;
1578
- provider: "google" | "apple" | "credential";
2287
+ provider: "credential" | "google" | "apple" | "github";
1579
2288
  createdAt: string;
1580
2289
  canUnlink: boolean;
1581
2290
  }[];
1582
- availableSocialProviders: ("google" | "apple")[];
2291
+ availableSocialProviders: ("google" | "apple" | "github")[];
1583
2292
  }>;
1584
2293
  mfaStatus(signal?: AbortSignal): Promise<{
1585
2294
  mfa: {
@@ -1621,7 +2330,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1621
2330
  changePassword(currentPassword: string, newPassword: string, signal?: AbortSignal): Promise<{
1622
2331
  ok: true;
1623
2332
  }>;
1624
- linkSocial(provider: "google" | "apple", callbackURL: string, signal?: AbortSignal): Promise<{
2333
+ linkSocial(provider: CloudSocialProvider$1, callbackURL: string, signal?: AbortSignal): Promise<{
1625
2334
  url: string;
1626
2335
  }>;
1627
2336
  profile(signal?: AbortSignal): Promise<{
@@ -1634,6 +2343,9 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1634
2343
  image: string | null;
1635
2344
  };
1636
2345
  }>;
2346
+ setLocale(locale: string, signal?: AbortSignal): Promise<{
2347
+ ok: true;
2348
+ }>;
1637
2349
  updateProfile(name: string, signal?: AbortSignal): Promise<{
1638
2350
  ok: true;
1639
2351
  }>;
@@ -1646,11 +2358,35 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1646
2358
  changeEmail(newEmail: string, callbackURL: string, signal?: AbortSignal): Promise<{
1647
2359
  ok: true;
1648
2360
  }>;
2361
+ accessTokens(signal?: AbortSignal): Promise<{
2362
+ tokens: {
2363
+ id: string;
2364
+ name: string;
2365
+ start: string | null;
2366
+ createdAt: string;
2367
+ expiresAt: string | null;
2368
+ lastUsedAt: string | null;
2369
+ }[];
2370
+ }>;
2371
+ createAccessToken(input: CloudAccessTokenCreate, signal?: AbortSignal): Promise<{
2372
+ token: string;
2373
+ accessToken: {
2374
+ id: string;
2375
+ name: string;
2376
+ start: string | null;
2377
+ createdAt: string;
2378
+ expiresAt: string | null;
2379
+ lastUsedAt: string | null;
2380
+ };
2381
+ }>;
2382
+ revokeAccessToken(id: string, signal?: AbortSignal): Promise<{
2383
+ ok: true;
2384
+ }>;
1649
2385
  sessions(signal?: AbortSignal): Promise<{
1650
2386
  sessions: {
1651
2387
  id: string;
1652
2388
  current: boolean;
1653
- method: "password" | "google" | "apple" | "passkey" | "two-step" | "email-link" | "desktop" | "other" | null;
2389
+ method: "other" | "password" | "passkey" | "two-step" | "google" | "apple" | "github" | "email-link" | "desktop" | null;
1654
2390
  ipAddress: string | null;
1655
2391
  browser: string | null;
1656
2392
  system: string | null;
@@ -1668,7 +2404,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1668
2404
  signIns(signal?: AbortSignal): Promise<{
1669
2405
  signIns: {
1670
2406
  id: string;
1671
- method: "password" | "google" | "apple" | "passkey" | "two-step" | "email-link" | "desktop" | "other";
2407
+ method: "other" | "password" | "passkey" | "two-step" | "google" | "apple" | "github" | "email-link" | "desktop";
1672
2408
  ipAddress: string | null;
1673
2409
  browser: string | null;
1674
2410
  system: string | null;
@@ -1706,5 +2442,5 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
1706
2442
  };
1707
2443
  type CloudPortalClient = ReturnType<typeof createCloudPortalClient>;
1708
2444
  //#endregion
1709
- export { type CloudAPIClient, CloudAPIError, type CloudAuthClient, type CloudAuthClientOptions, type CloudAuthFailure, type CloudAuthResult, CloudClientError, type CloudDeviceAuthorization, CloudDeviceAuthorizationError, type CloudDeviceAuthorizationOptions, type CloudDeviceErrorCode, type CloudDeviceToken, type CloudDiscoveryFailure, type CloudEmailSignIn, type CloudFetch, CloudPortalAPIError, type CloudPortalAPIErrorKind, type CloudPortalClient, type CloudPortalClientOptions, type CloudRequestOptions, CloudServiceError, type CloudServicesClient, type CloudServicesClientOptions, type CloudServicesTokenSource, type CloudSignInOptions, type CloudSocialProvider, type CloudUpload, type DiscoverCloudOptions, cloudAuthFailure, cloudEditorReturnURL, cloudRedirectPath, cloudServicesFetch, cloudSignInURL, createCloudAPIClient, createCloudAuthClient, createCloudPortalClient, createCloudServicesClient, discoverCloud, pollCloudDeviceToken, requestCloudDeviceAuthorization, resendCloudVerification, signInToCloud, signInToCloudWithEmail, signOutFromCloud, signUpToCloudWithEmail };
2445
+ export { type CloudAPIClient, CloudAPIError, type CloudAuthClient, type CloudAuthClientOptions, type CloudAuthFailure, type CloudAuthResult, CloudClientError, type CloudCommentRequests, type CloudDeviceAuthorization, CloudDeviceAuthorizationError, type CloudDeviceAuthorizationOptions, type CloudDeviceErrorCode, type CloudDeviceToken, type CloudDiscoveryFailure, type CloudDocumentImage, type CloudEmailSignIn, type CloudFetch, type CloudMultipartCommit, type CloudObjectFetch, type CloudObjectTransfer, type CloudObjectUpload, type CloudObjectUploadResult, CloudPortalAPIError, type CloudPortalAPIErrorKind, type CloudPortalClient, type CloudPortalClientOptions, type CloudRequestOptions, CloudServiceError, CloudServiceInsecureEndpointError, type CloudServicesClient, type CloudServicesClientOptions, type CloudServicesTokenSource, type CloudSignInOptions, type CloudSocialProvider, type CloudTransferProgress, type CloudUpload, type CommunityTour, type DiscoverCloudOptions, type PreparedCloudDocument, assembleCloudDocument, cloudAuthFailure, cloudChecksum, cloudEditorReturnURL, cloudRedirectPath, cloudServicesFetch, cloudSignInURL, createCloudAPIClient, createCloudAuthClient, createCloudPortalClient, createCloudServicesClient, discoverCloud, downloadCloudDocument, downloadCloudImage, fetchCommunityTour, imageCommitBatches, pollCloudDeviceToken, prepareCloudDocument, putCloudObject, readCloudRevisionRange, requestCloudDeviceAuthorization, resendCloudVerification, saveCloudDocument, signInToCloud, signInToCloudWithEmail, signOutFromCloud, signUpToCloudWithEmail, splitCloudDocument, uploadCloudImages, uploadCloudObject };
1710
2446
  //# sourceMappingURL=client.d.ts.map