@open-pencil/cloud 0.17.0-beta.5 → 0.17.0-beta.7
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.
- package/dist/client.d.ts +560 -93
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1101 -186
- package/dist/client.js.map +1 -1
- package/dist/contract.d.ts +2 -2
- package/dist/contract.js +2 -2
- package/dist/contract2.js +390 -44
- package/dist/contract2.js.map +1 -1
- package/dist/email.d.ts +366 -3
- package/dist/email.d.ts.map +1 -1
- package/dist/email.js +1403 -556
- package/dist/email.js.map +1 -1
- package/dist/errors.js +16 -3
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +878 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/index2.d.ts +12 -2
- package/dist/index2.d.ts.map +1 -1
- package/dist/listen.mjs +589 -128
- package/dist/listen.mjs.map +1 -1
- package/dist/runtime-cloudflare.d.ts +4 -0
- package/dist/runtime-cloudflare.d.ts.map +1 -1
- package/dist/runtime-cloudflare.js +8690 -6325
- package/dist/runtime-cloudflare.js.map +1 -1
- package/dist/runtime-node.d.mts +10098 -5401
- package/dist/runtime-node.d.mts.map +1 -1
- package/dist/server.d.ts +13807 -7638
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +11723 -9412
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +10659 -8650
- package/dist/server.mjs.map +1 -1
- package/dist/server2.mjs +79 -57
- package/dist/server2.mjs.map +1 -1
- package/package.json +13 -4
- package/src/admin/api/routes.ts +263 -190
- package/src/admin/audit/service.ts +9 -1
- package/src/admin/bootstrap.ts +86 -0
- package/src/admin/documents/service.ts +119 -4
- package/src/admin/email/service.ts +2 -1
- package/src/admin/enrollment/email.ts +17 -3
- package/src/admin/enrollment/service.ts +71 -10
- package/src/admin/errors.ts +5 -0
- package/src/admin/index.ts +1 -0
- package/src/admin/reports/service.ts +9 -3
- package/src/admin/schema.ts +6 -5
- package/src/admin/users/service.ts +173 -16
- package/src/client/api.ts +29 -2
- package/src/client/comments.ts +205 -0
- package/src/client/device-authorization.ts +4 -20
- package/src/client/discovery.ts +4 -2
- package/src/client/files/archive.ts +60 -0
- package/src/client/files/checksum.ts +7 -0
- package/src/client/files/download.ts +122 -0
- package/src/client/files/images.ts +89 -0
- package/src/client/files/index.ts +15 -0
- package/src/client/files/objects.ts +173 -0
- package/src/client/files/save.ts +79 -0
- package/src/client/index.ts +3 -6
- package/src/client/portal/account.ts +20 -2
- package/src/client/portal/administration.ts +52 -5
- package/src/client/portal/request.ts +4 -2
- package/src/client/tour.ts +44 -0
- package/src/client/versions.ts +7 -1
- package/src/contract/account.ts +61 -11
- package/src/contract/admin/index.ts +48 -3
- package/src/contract/billing.ts +73 -4
- package/src/contract/comments.ts +223 -0
- package/src/contract/discovery.ts +47 -19
- package/src/contract/index.ts +10 -0
- package/src/contract/links.ts +5 -0
- package/src/contract/relay.ts +3 -1
- package/src/contract/services.ts +44 -4
- package/src/contract/workspaces.ts +5 -0
- package/src/email/locales/ar.json +28 -0
- package/src/email/locales/de.json +28 -0
- package/src/email/locales/es.json +28 -0
- package/src/email/locales/fr.json +28 -0
- package/src/email/locales/it.json +28 -0
- package/src/email/locales/ja.json +28 -0
- package/src/email/locales/pl.json +28 -0
- package/src/email/locales/pt-br.json +28 -0
- package/src/email/locales/ru.json +28 -0
- package/src/email/locales/zh-cn.json +28 -0
- package/src/email/messages.ts +35 -0
- package/src/email/render.ts +18 -0
- package/src/email/samples.ts +28 -1
- package/src/email/schema.ts +29 -3
- package/src/email/templates/BrandEmail.vue +3 -1
- package/src/email/templates/CommentNotification.vue +39 -0
- package/src/email/templates/EnrollmentInvitation.vue +53 -0
- package/src/email/templates/TwoStepChanged.vue +17 -2
- package/src/email/templates/brand.ts +6 -0
- package/src/errors/posthog.ts +28 -4
- package/src/runtime/cloudflare/email.ts +2 -0
- package/src/runtime/cloudflare/relay/index.ts +21 -6
- package/src/runtime/cloudflare/worker.ts +6 -0
- package/src/runtime/cloudflare/xml.ts +12 -0
- package/src/runtime/node/admin.ts +51 -47
- package/src/runtime/node/email/runtime.ts +1 -0
- package/src/runtime/node/email/transport.ts +1 -0
- package/src/runtime/node/server.ts +8 -2
- package/src/runtime/posthog/errors.ts +3 -1
- package/src/runtime/site/server.ts +4 -1
- package/src/server/account/actions.ts +3 -1
- package/src/server/account/deletion.ts +38 -4
- package/src/server/account/routes.ts +67 -46
- package/src/server/account/tokens.ts +3 -3
- package/src/server/api/router.ts +22 -7
- package/src/server/app/checks.ts +6 -1
- package/src/server/app/cors.ts +44 -0
- package/src/server/app/index.ts +76 -76
- package/src/server/app/routes.ts +14 -5
- package/src/server/app/services.ts +49 -15
- package/src/server/auth/access-control.ts +13 -8
- package/src/server/auth/account.ts +13 -12
- package/src/server/auth/activity.ts +7 -2
- package/src/server/auth/adapter.ts +16 -3
- package/src/server/auth/email.ts +29 -17
- package/src/server/auth/endpoints.ts +4 -0
- package/src/server/auth/factory.ts +83 -64
- package/src/server/auth/index.ts +1 -1
- package/src/server/auth/methods.ts +162 -0
- package/src/server/auth/mfa-assurance.ts +147 -10
- package/src/server/auth/rate-limit.ts +31 -0
- package/src/server/auth/runtime.ts +19 -5
- package/src/server/auth/social-providers.ts +70 -24
- package/src/server/billing/index.ts +2 -0
- package/src/server/billing/notify.ts +55 -0
- package/src/server/billing/seats.ts +17 -0
- package/src/server/billing/tokens.ts +1 -1
- package/src/server/cleanup/documents.ts +5 -2
- package/src/server/cleanup/revisions.ts +6 -3
- package/src/server/cleanup/uploads.ts +2 -1
- package/src/server/collaboration/relay/connection.ts +7 -2
- package/src/server/collaboration/relay/hub.ts +55 -24
- package/src/server/collaboration/routes.ts +8 -5
- package/src/server/comments/index.ts +9 -0
- package/src/server/comments/notify.ts +277 -0
- package/src/server/comments/routes.ts +352 -0
- package/src/server/comments/rows.ts +249 -0
- package/src/server/comments/service.ts +570 -0
- package/src/server/community/routes.ts +6 -6
- package/src/server/config/deployment.ts +19 -6
- package/src/server/config/index.ts +1 -1
- package/src/server/config/public.ts +19 -6
- package/src/server/config/schema.ts +14 -2
- package/src/server/config/toml/schema.ts +27 -4
- package/src/server/db/index.ts +2 -1
- package/src/server/db/migrate.ts +21 -1
- package/src/server/db/migrations/015_comments.ts +57 -0
- package/src/server/db/migrations/016_comment_notifications.ts +76 -0
- package/src/server/db/migrations/017_invitation_emails.ts +19 -0
- package/src/server/db/migrations/018_enrollment_source.ts +17 -0
- package/src/server/db/tables.ts +92 -2
- package/src/server/documents/access.ts +17 -0
- package/src/server/documents/images.ts +6 -1
- package/src/server/documents/routes.ts +12 -12
- package/src/server/documents/service.ts +19 -5
- package/src/server/documents/summary.ts +15 -0
- package/src/server/documents/versions/routes.ts +7 -8
- package/src/server/documents/versions/service.ts +5 -2
- package/src/server/email/service.ts +8 -2
- package/src/server/email/types.ts +1 -0
- package/src/server/errors/index.ts +48 -3
- package/src/server/index.ts +15 -1
- package/src/server/internal/routes.ts +8 -2
- package/src/server/internal/service.ts +10 -0
- package/src/server/invitations/budget.ts +3 -1
- package/src/server/invitations/index.ts +1 -0
- package/src/server/invitations/links.ts +6 -0
- package/src/server/pictures/service.ts +3 -1
- package/src/server/policy/workspace.ts +5 -2
- package/src/server/reports/routes.ts +2 -2
- package/src/server/reports/service.ts +3 -1
- package/src/server/services/routes.ts +2 -2
- package/src/server/sharing/capabilities/service.ts +1 -1
- package/src/server/sharing/document-routes.ts +3 -3
- package/src/server/sharing/invitations/service.ts +3 -4
- package/src/server/sharing/routes.ts +15 -15
- package/src/server/validation.ts +33 -25
- package/src/server/workspaces/members.ts +50 -12
- package/src/server/workspaces/repository.ts +23 -12
- package/src/server/workspaces/routes.ts +8 -8
- package/src/services/app.ts +30 -19
- package/src/services/config.ts +47 -8
- package/src/services/metering.ts +15 -27
- package/src/client/billing.ts +0 -80
package/dist/contract2.js
CHANGED
|
@@ -5,17 +5,21 @@ import { Inflate, deflateSync } from "fflate";
|
|
|
5
5
|
import * as decoding from "lib0/decoding";
|
|
6
6
|
import * as encoding from "lib0/encoding";
|
|
7
7
|
import * as Y from "yjs";
|
|
8
|
+
import compareVersions from "semver/functions/compare.js";
|
|
9
|
+
import parseVersion from "semver/functions/parse.js";
|
|
8
10
|
import { encodeParam, parseURL, withFragment, withQuery } from "ufo";
|
|
9
11
|
//#region src/contract/account.ts
|
|
10
12
|
/**
|
|
11
13
|
* Where an account stands: it may use the server, waits for an administrator, was refused or had
|
|
12
|
-
* its access taken back,
|
|
14
|
+
* its access taken back, has to prove its second step in this session, as after signing in through
|
|
15
|
+
* a linked account such as Google, or has to accept the server's current terms first.
|
|
13
16
|
*/
|
|
14
17
|
const cloudAccountStateSchema = v.picklist([
|
|
15
18
|
"active",
|
|
16
19
|
"pending",
|
|
17
20
|
"rejected",
|
|
18
21
|
"revoked",
|
|
22
|
+
"two-step",
|
|
19
23
|
"terms"
|
|
20
24
|
]);
|
|
21
25
|
const cloudIdentitySchema = v.object({
|
|
@@ -32,27 +36,51 @@ const cloudAccountStatusResponseSchema = v.object({
|
|
|
32
36
|
});
|
|
33
37
|
/** Accepting the server's terms: the version the person read, which must be the current one. */
|
|
34
38
|
const cloudTermsAcceptanceSchema = v.object({ version: v.pipe(v.string(), v.minLength(1)) });
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
/**
|
|
40
|
+
* The providers a person can sign in with besides a password, which this editor has buttons for,
|
|
41
|
+
* in the order it shows them. Every list of providers in Cloud derives from this one.
|
|
42
|
+
*/
|
|
43
|
+
const CLOUD_SOCIAL_PROVIDERS = [
|
|
37
44
|
"google",
|
|
38
|
-
"apple"
|
|
39
|
-
|
|
45
|
+
"apple",
|
|
46
|
+
"github"
|
|
47
|
+
];
|
|
48
|
+
const cloudSocialProviderSchema = v.picklist(CLOUD_SOCIAL_PROVIDERS);
|
|
49
|
+
/** Each provider's name, as its owner writes it in every language. */
|
|
50
|
+
const CLOUD_SOCIAL_PROVIDER_NAMES = {
|
|
51
|
+
google: "Google",
|
|
52
|
+
apple: "Apple",
|
|
53
|
+
github: "GitHub"
|
|
54
|
+
};
|
|
55
|
+
const cloudAuthenticationProviderSchema = v.picklist(["credential", ...CLOUD_SOCIAL_PROVIDERS]);
|
|
40
56
|
const cloudAuthenticationMethodSchema = v.object({
|
|
41
57
|
id: v.string(),
|
|
42
58
|
provider: cloudAuthenticationProviderSchema,
|
|
43
59
|
createdAt: v.string(),
|
|
44
60
|
canUnlink: v.boolean()
|
|
45
61
|
});
|
|
62
|
+
/** Whether this editor knows `provider`, so a newer server's other providers can be left out. */
|
|
63
|
+
function isKnownSocialProvider(provider) {
|
|
64
|
+
return CLOUD_SOCIAL_PROVIDERS.includes(provider);
|
|
65
|
+
}
|
|
66
|
+
/** Whether `provider` is a way to sign in this editor knows: a password or a known provider. */
|
|
67
|
+
function isKnownAuthenticationProvider(provider) {
|
|
68
|
+
return provider === "credential" || isKnownSocialProvider(provider);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A newer server may list a provider this editor has no words or button for: those entries are
|
|
72
|
+
* left out rather than failing the whole response, and anything else malformed still fails.
|
|
73
|
+
*/
|
|
46
74
|
const cloudAuthenticationMethodsResponseSchema = v.object({
|
|
47
|
-
methods: v.array(cloudAuthenticationMethodSchema),
|
|
48
|
-
availableSocialProviders: v.array(v.
|
|
75
|
+
methods: v.pipe(v.array(v.looseObject({ provider: v.string() })), v.filterItems((method) => isKnownAuthenticationProvider(method.provider)), v.array(cloudAuthenticationMethodSchema)),
|
|
76
|
+
availableSocialProviders: v.pipe(v.array(v.string()), v.filterItems(isKnownSocialProvider), v.array(cloudSocialProviderSchema))
|
|
49
77
|
});
|
|
50
78
|
const cloudPasswordChangeSchema = v.object({
|
|
51
79
|
currentPassword: v.string(),
|
|
52
80
|
newPassword: v.string()
|
|
53
81
|
});
|
|
54
82
|
const cloudSocialLinkSchema = v.object({
|
|
55
|
-
provider:
|
|
83
|
+
provider: cloudSocialProviderSchema,
|
|
56
84
|
callbackURL: v.pipe(v.string(), v.url())
|
|
57
85
|
});
|
|
58
86
|
const cloudSocialLinkResponseSchema = v.object({ url: v.pipe(v.string(), v.url()) });
|
|
@@ -64,6 +92,7 @@ const accountSecurityErrorCodeSchema = v.picklist([
|
|
|
64
92
|
"last_authentication_method",
|
|
65
93
|
"session_not_fresh",
|
|
66
94
|
"authentication_method_failed",
|
|
95
|
+
"code_invalid",
|
|
67
96
|
"email_unchanged",
|
|
68
97
|
"email_change_unavailable",
|
|
69
98
|
"current_session",
|
|
@@ -185,21 +214,24 @@ const cloudEmailChangeSchema = v.object({
|
|
|
185
214
|
callbackURL: v.pipe(v.string(), v.url())
|
|
186
215
|
});
|
|
187
216
|
/** How a sign-in was made: the method it used, or the desktop app's approved code. */
|
|
188
|
-
const
|
|
217
|
+
const SIGN_IN_METHODS = [
|
|
189
218
|
"password",
|
|
190
|
-
|
|
191
|
-
"apple",
|
|
219
|
+
...CLOUD_SOCIAL_PROVIDERS,
|
|
192
220
|
"passkey",
|
|
193
221
|
"two-step",
|
|
194
222
|
"email-link",
|
|
195
223
|
"desktop",
|
|
196
224
|
"other"
|
|
197
|
-
]
|
|
225
|
+
];
|
|
226
|
+
const cloudSignInMethodSchema = v.picklist(SIGN_IN_METHODS);
|
|
227
|
+
/** A method a newer server names that this editor does not know reads as `other`; a value that is
|
|
228
|
+
* not a method name at all still fails. */
|
|
229
|
+
const signInMethodResponseSchema = v.pipe(v.string(), v.transform((method) => v.is(cloudSignInMethodSchema, method) ? method : "other"));
|
|
198
230
|
const cloudAccountSessionSchema = v.object({
|
|
199
231
|
id: v.string(),
|
|
200
232
|
/** The session this request was made with. */
|
|
201
233
|
current: v.boolean(),
|
|
202
|
-
method: v.nullable(
|
|
234
|
+
method: v.nullable(signInMethodResponseSchema),
|
|
203
235
|
ipAddress: v.nullable(v.string()),
|
|
204
236
|
/** The browser and system the server read from the client's user agent, such as `Chrome 141`. */
|
|
205
237
|
browser: v.nullable(v.string()),
|
|
@@ -212,7 +244,7 @@ const cloudAccountSessionsResponseSchema = v.object({ sessions: v.array(cloudAcc
|
|
|
212
244
|
const cloudSessionRevokeSchema = v.object({ sessionId: v.pipe(v.string(), v.minLength(1)) });
|
|
213
245
|
const cloudSignInSchema = v.object({
|
|
214
246
|
id: v.string(),
|
|
215
|
-
method:
|
|
247
|
+
method: signInMethodResponseSchema,
|
|
216
248
|
ipAddress: v.nullable(v.string()),
|
|
217
249
|
/** The browser and system the server read from the client's user agent, such as `Chrome 141`. */
|
|
218
250
|
browser: v.nullable(v.string()),
|
|
@@ -354,11 +386,38 @@ const chatModelSchema = v.object({
|
|
|
354
386
|
});
|
|
355
387
|
/** What one web search costs; a service without search leaves it out of its catalog. */
|
|
356
388
|
const searchPricingSchema = v.object({ creditsPerRequest: creditsSchema$1 });
|
|
357
|
-
const
|
|
389
|
+
const modelIDSchema = v.pipe(v.string(), v.minLength(1));
|
|
390
|
+
/**
|
|
391
|
+
* The model the service recommends for each of the editor's roles: Design runs the chat, Review
|
|
392
|
+
* critiques designs, Fast does quick tasks such as naming conversations, and Vision reads images.
|
|
393
|
+
* An editor signed in to the service with no model of its own yet sets itself up with them, so
|
|
394
|
+
* nobody has to choose one. Vision `null` recommends none, and the editor leaves it unassigned.
|
|
395
|
+
*/
|
|
396
|
+
const roleModelsSchema = v.object({
|
|
397
|
+
design: modelIDSchema,
|
|
398
|
+
review: modelIDSchema,
|
|
399
|
+
fast: modelIDSchema,
|
|
400
|
+
vision: v.nullable(modelIDSchema)
|
|
401
|
+
});
|
|
402
|
+
const serviceCatalogSchema = v.pipe(v.object({
|
|
358
403
|
models: v.array(chatModelSchema),
|
|
359
|
-
defaultModelID:
|
|
404
|
+
defaultModelID: modelIDSchema,
|
|
405
|
+
/**
|
|
406
|
+
* Absent from a service that predates it, or whose default model can't run the chat. Editors
|
|
407
|
+
* then use `defaultModelID` for every role, except Vision when that model reads no images,
|
|
408
|
+
* and set nothing up when it calls no tools.
|
|
409
|
+
*/
|
|
410
|
+
roleModels: v.optional(roleModelsSchema),
|
|
360
411
|
search: v.optional(searchPricingSchema)
|
|
361
|
-
})
|
|
412
|
+
}), v.check(({ models, roleModels }) => {
|
|
413
|
+
if (!roleModels) return true;
|
|
414
|
+
const can = (id, capability) => {
|
|
415
|
+
if (id === null) return true;
|
|
416
|
+
const model = models.find((candidate) => candidate.id === id);
|
|
417
|
+
return model !== void 0 && (capability === null || model.capabilities[capability]);
|
|
418
|
+
};
|
|
419
|
+
return can(roleModels.design, "tools") && can(roleModels.review, null) && can(roleModels.fast, "tools") && can(roleModels.vision, "vision");
|
|
420
|
+
}, "A recommended model is not in the catalog or cannot do its role"));
|
|
362
421
|
const creditBucketSchema = v.object({
|
|
363
422
|
kind: v.picklist([
|
|
364
423
|
"allowance",
|
|
@@ -472,10 +531,30 @@ const CLOUD_BILLING_TOKEN_AUDIENCE = "openpencil-billing";
|
|
|
472
531
|
* and manages what they pay for; editors link to it whenever the server advertises billing.
|
|
473
532
|
*/
|
|
474
533
|
const CLOUD_ACCOUNT_PLAN_PATH = "/account/plan";
|
|
475
|
-
/**
|
|
534
|
+
/**
|
|
535
|
+
* The plan page with billing's own pages opening at once: where billing sends someone whose
|
|
536
|
+
* session there ended, so Cloud signs them in to billing again.
|
|
537
|
+
*/
|
|
538
|
+
const CLOUD_ACCOUNT_BILLING_PATH = `${CLOUD_ACCOUNT_PLAN_PATH}?open=billing`;
|
|
539
|
+
/**
|
|
540
|
+
* The billing service's own pages, below the discovered `endpoint`: where Cloud's plan page sends
|
|
541
|
+
* the signed-in person, posting a billing token as the form field `token` to `session`, and the
|
|
542
|
+
* public pricing page. The service answers that post with `303 See Other`, never `307` or `308`,
|
|
543
|
+
* which a browser follows by posting the same body, the token, again to wherever they point.
|
|
544
|
+
*/
|
|
545
|
+
const CLOUD_BILLING_PAGE_PATHS = {
|
|
546
|
+
session: "/session",
|
|
547
|
+
pricing: "/pricing"
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* Where the billing service answers, below the discovered `endpoint`. Cloud posts to `seats`,
|
|
551
|
+
* with a billing token for the account as its bearer, whenever the people who can edit in that
|
|
552
|
+
* account's workspaces change; the service reads the count from Cloud's internal API.
|
|
553
|
+
*/
|
|
476
554
|
const CLOUD_BILLING_API_PATHS = {
|
|
477
555
|
base: "/v1",
|
|
478
556
|
catalog: "/v1/catalog",
|
|
557
|
+
seats: "/v1/seats",
|
|
479
558
|
account: "/v1/account",
|
|
480
559
|
checkout: "/v1/checkout",
|
|
481
560
|
portal: "/v1/portal"
|
|
@@ -485,9 +564,22 @@ const idSchema = v.pipe(v.string(), v.regex(/^[a-z0-9][a-z0-9-]{0,62}$/));
|
|
|
485
564
|
const centsSchema = v.pipe(v.number(), v.integer(), v.minValue(0));
|
|
486
565
|
const bytesSchema = v.pipe(v.number(), v.integer(), v.minValue(0));
|
|
487
566
|
const creditsSchema = v.pipe(v.number(), v.integer(), v.minValue(0));
|
|
567
|
+
/**
|
|
568
|
+
* What an account without a plan has: the deployment's free plan, which a pricing page compares
|
|
569
|
+
* the plans with.
|
|
570
|
+
*/
|
|
571
|
+
const billingFreePlanSchema = v.object({
|
|
572
|
+
/** The storage an account may use, or `null` for no limit. */
|
|
573
|
+
storageBytes: v.nullable(bytesSchema),
|
|
574
|
+
/** Whether the free plan includes services, such as AI and search. */
|
|
575
|
+
services: v.boolean(),
|
|
576
|
+
/** Credits granted each month with services, or `null` for no monthly limit. */
|
|
577
|
+
monthlyCredits: v.nullable(creditsSchema)
|
|
578
|
+
});
|
|
488
579
|
const cloudBillingDiscoverySchema = v.object({
|
|
489
580
|
endpoint: urlSchema,
|
|
490
|
-
contractVersion: v.literal("1")
|
|
581
|
+
contractVersion: v.literal("1"),
|
|
582
|
+
freePlan: v.optional(billingFreePlanSchema)
|
|
491
583
|
});
|
|
492
584
|
const billingTokenSchema = v.object({
|
|
493
585
|
token: v.pipe(v.string(), v.minLength(1)),
|
|
@@ -507,13 +599,34 @@ const billingTokenClaimsSchema = v.object({
|
|
|
507
599
|
iat: v.pipe(v.number(), v.integer()),
|
|
508
600
|
exp: v.pipe(v.number(), v.integer())
|
|
509
601
|
});
|
|
510
|
-
|
|
602
|
+
const seatCountSchema = v.pipe(v.number(), v.integer(), v.minValue(1));
|
|
603
|
+
/**
|
|
604
|
+
* A plan priced by the seat: everyone who can edit in the account's workspaces takes one, and the
|
|
605
|
+
* account pays for at least `minimum`. Every seat costs the price of the tier its count reaches,
|
|
606
|
+
* and adds its storage and credits to what the account shares.
|
|
607
|
+
*/
|
|
608
|
+
const billingSeatPricingSchema = v.object({
|
|
609
|
+
minimum: seatCountSchema,
|
|
610
|
+
/** From the fewest seats up: the first from 1, each later one from more seats. */
|
|
611
|
+
tiers: v.pipe(v.array(v.object({
|
|
612
|
+
fromSeats: seatCountSchema,
|
|
613
|
+
unitPriceCents: centsSchema
|
|
614
|
+
})), v.minLength(1), v.check((tiers) => tiers[0]?.fromSeats === 1, "The first seat tier starts at one seat"), v.check((tiers) => tiers.every((tier, index) => index === 0 || tier.fromSeats > (tiers[index - 1]?.fromSeats ?? 0)), "Seat tiers start at more seats each")),
|
|
615
|
+
storageBytesPerSeat: bytesSchema,
|
|
616
|
+
monthlyCreditsPerSeat: creditsSchema
|
|
617
|
+
});
|
|
618
|
+
/**
|
|
619
|
+
* A plan an account subscribes to, billed every month in US dollars before tax. A plan priced by
|
|
620
|
+
* the seat states its price, storage, and credits at its minimum, so an editor that reads no
|
|
621
|
+
* `seats` still shows what it starts at.
|
|
622
|
+
*/
|
|
511
623
|
const billingPlanSchema = v.object({
|
|
512
624
|
id: idSchema,
|
|
513
625
|
name: v.pipe(v.string(), v.minLength(1)),
|
|
514
626
|
monthlyPriceCents: centsSchema,
|
|
515
627
|
storageBytes: bytesSchema,
|
|
516
|
-
monthlyCredits: creditsSchema
|
|
628
|
+
monthlyCredits: creditsSchema,
|
|
629
|
+
seats: v.optional(billingSeatPricingSchema)
|
|
517
630
|
});
|
|
518
631
|
/** Credits an account on a plan buys once, in US dollars before tax. */
|
|
519
632
|
const creditPackSchema = v.object({
|
|
@@ -819,6 +932,11 @@ const workspaceSummarySchema = v.object({
|
|
|
819
932
|
name: v.string(),
|
|
820
933
|
slug: v.string(),
|
|
821
934
|
role: workspaceRoleSchema,
|
|
935
|
+
/**
|
|
936
|
+
* Whether the signed-in account owns the workspace, and so pays for its plan and AI credits.
|
|
937
|
+
* Absent from servers released before it.
|
|
938
|
+
*/
|
|
939
|
+
owner: v.optional(v.boolean()),
|
|
822
940
|
createdAt: v.string(),
|
|
823
941
|
updatedAt: v.string()
|
|
824
942
|
});
|
|
@@ -1059,8 +1177,11 @@ const adminErrorCodeSchema = v.picklist([
|
|
|
1059
1177
|
"invalid_enrollment_transition",
|
|
1060
1178
|
"last_admin_required",
|
|
1061
1179
|
"self_admin_action_forbidden",
|
|
1180
|
+
"last_authentication_method",
|
|
1181
|
+
"account_approved",
|
|
1062
1182
|
"email_regeneration_unavailable",
|
|
1063
1183
|
"mfa_required",
|
|
1184
|
+
"two_step_unconfirmed",
|
|
1064
1185
|
"document_not_restorable",
|
|
1065
1186
|
"workspace_gone"
|
|
1066
1187
|
]);
|
|
@@ -1091,6 +1212,8 @@ const enrollmentsResponseSchema = v.object({
|
|
|
1091
1212
|
...listTotals(enrollmentStatusSchema.options)
|
|
1092
1213
|
});
|
|
1093
1214
|
const enrollmentReviewResponseSchema = v.object({ enrollment: enrollmentSchema });
|
|
1215
|
+
/** How many waiting requests were approved with the official deployment's invitation letter. */
|
|
1216
|
+
const enrollmentInviteResponseSchema = v.object({ invited: v.pipe(v.number(), v.integer(), v.minValue(0)) });
|
|
1094
1217
|
const cloudAdminSessionResponseSchema = v.object({ user: cloudIdentitySchema });
|
|
1095
1218
|
const cloudAdminUserSchema = v.object({
|
|
1096
1219
|
...cloudPersonSchema.entries,
|
|
@@ -1102,7 +1225,14 @@ const cloudAdminUserSchema = v.object({
|
|
|
1102
1225
|
twoStep: v.boolean(),
|
|
1103
1226
|
/** When one of the account's sessions was last used, or null when none is left. */
|
|
1104
1227
|
lastActiveAt: nullableTimestampSchema,
|
|
1105
|
-
workspaceCount: countSchema
|
|
1228
|
+
workspaceCount: countSchema,
|
|
1229
|
+
/** How the account signs in: `credential` for a password, or a provider such as `google`. */
|
|
1230
|
+
methods: v.array(v.string()),
|
|
1231
|
+
/**
|
|
1232
|
+
* On a server that approves people, where this account's request to join stands: an account
|
|
1233
|
+
* exists from its first sign-in, before anyone approved it. Absent where everyone may join.
|
|
1234
|
+
*/
|
|
1235
|
+
request: v.optional(v.nullable(enrollmentStatusSchema))
|
|
1106
1236
|
});
|
|
1107
1237
|
/** Which accounts a list of people shows. */
|
|
1108
1238
|
const cloudAdminUserFilterSchema = v.picklist([
|
|
@@ -1111,6 +1241,8 @@ const cloudAdminUserFilterSchema = v.picklist([
|
|
|
1111
1241
|
"suspended",
|
|
1112
1242
|
"without-two-step"
|
|
1113
1243
|
]);
|
|
1244
|
+
/** Narrows a list of people, under any filter, to those who sign in a given way. */
|
|
1245
|
+
const cloudAdminUserMethodSchema = v.picklist(["password", ...CLOUD_SOCIAL_PROVIDERS]);
|
|
1114
1246
|
const cloudAdminUsersResponseSchema = v.object({
|
|
1115
1247
|
users: v.array(cloudAdminUserSchema),
|
|
1116
1248
|
...listTotals(cloudAdminUserFilterSchema.options)
|
|
@@ -1120,9 +1252,12 @@ const cloudAdminUserDetailSchema = v.object({
|
|
|
1120
1252
|
...cloudAdminUserSchema.entries,
|
|
1121
1253
|
emailVerified: v.boolean()
|
|
1122
1254
|
}),
|
|
1255
|
+
/** `canRemove`: the account keeps a way in that still works without it. */
|
|
1123
1256
|
methods: v.array(v.object({
|
|
1257
|
+
id: v.string(),
|
|
1124
1258
|
provider: v.string(),
|
|
1125
|
-
createdAt: timestampSchema
|
|
1259
|
+
createdAt: timestampSchema,
|
|
1260
|
+
canRemove: v.boolean()
|
|
1126
1261
|
})),
|
|
1127
1262
|
authenticator: v.boolean(),
|
|
1128
1263
|
passkeyCount: countSchema,
|
|
@@ -1195,6 +1330,8 @@ const adminAuditResponseSchema = v.object({
|
|
|
1195
1330
|
const cloudAdminDocumentSchema = v.object({
|
|
1196
1331
|
id: v.string(),
|
|
1197
1332
|
name: v.string(),
|
|
1333
|
+
/** A design or a board. Servers from before send none, and had only designs. */
|
|
1334
|
+
kind: v.optional(documentKindSchema, "design"),
|
|
1198
1335
|
workspace: v.object({
|
|
1199
1336
|
id: v.string(),
|
|
1200
1337
|
name: v.string()
|
|
@@ -1216,7 +1353,25 @@ const cloudAdminDocumentSchema = v.object({
|
|
|
1216
1353
|
* can still restore it. Servers from before Trash send neither.
|
|
1217
1354
|
*/
|
|
1218
1355
|
purgedAt: v.optional(nullableTimestampSchema, null),
|
|
1219
|
-
destroyedAt: v.optional(nullableTimestampSchema, null)
|
|
1356
|
+
destroyedAt: v.optional(nullableTimestampSchema, null),
|
|
1357
|
+
/**
|
|
1358
|
+
* The saved revision whose thumbnail previews it; null before its first save. Servers from
|
|
1359
|
+
* before previews send none.
|
|
1360
|
+
*/
|
|
1361
|
+
revisionId: v.optional(v.nullable(v.string()), null),
|
|
1362
|
+
/**
|
|
1363
|
+
* Who beyond its workspace can open it: anyone, in the community gallery, and whoever holds one
|
|
1364
|
+
* of its live share links, `editLinks` of which let them edit. Servers from before send none.
|
|
1365
|
+
*/
|
|
1366
|
+
exposure: v.optional(v.object({
|
|
1367
|
+
community: v.boolean(),
|
|
1368
|
+
links: countSchema,
|
|
1369
|
+
editLinks: countSchema
|
|
1370
|
+
}), {
|
|
1371
|
+
community: false,
|
|
1372
|
+
links: 0,
|
|
1373
|
+
editLinks: 0
|
|
1374
|
+
})
|
|
1220
1375
|
});
|
|
1221
1376
|
/** Which documents a list shows: live ones, or those deleted forever an administrator can restore. */
|
|
1222
1377
|
const cloudAdminDocumentFilterSchema = v.picklist([
|
|
@@ -1313,7 +1468,9 @@ const COLLAB_ACTIONS = {
|
|
|
1313
1468
|
agentPreview: "agent-preview",
|
|
1314
1469
|
upload: "upload",
|
|
1315
1470
|
/** From the server only: the document's version history changed, so open lists load it again. */
|
|
1316
|
-
versions: "versions"
|
|
1471
|
+
versions: "versions",
|
|
1472
|
+
/** From the server only: a comment thread changed; the payload is its ID as UTF-8. */
|
|
1473
|
+
comments: "comments"
|
|
1317
1474
|
};
|
|
1318
1475
|
/**
|
|
1319
1476
|
* The most a room message may decode to, compressed or not. A peer's update past it is dropped
|
|
@@ -1657,6 +1814,11 @@ const accountEntitlementsResponseSchema = v.object({ entitlements: accountEntitl
|
|
|
1657
1814
|
const CLOUD_PROTOCOL_VERSION = "1";
|
|
1658
1815
|
const CLOUD_DISCOVERY_PATH = "/.well-known/openpencil";
|
|
1659
1816
|
const cloudDeploymentSchema = v.picklist(["official", "self-hosted"]);
|
|
1817
|
+
/**
|
|
1818
|
+
* The server's sign-in providers that this editor knows. A newer server may offer one this editor
|
|
1819
|
+
* has no button for; it is left out rather than failing discovery, so the editor still connects.
|
|
1820
|
+
*/
|
|
1821
|
+
const socialProvidersSchema = v.pipe(v.array(v.string()), v.transform((providers) => providers.filter(isKnownSocialProvider)));
|
|
1660
1822
|
const cloudAuthenticationSchema = v.object({
|
|
1661
1823
|
emailPassword: v.optional(v.object({
|
|
1662
1824
|
signIn: v.boolean(),
|
|
@@ -1667,7 +1829,7 @@ const cloudAuthenticationSchema = v.object({
|
|
|
1667
1829
|
siteKey: v.pipe(v.string(), v.trim(), v.minLength(1))
|
|
1668
1830
|
}))
|
|
1669
1831
|
})),
|
|
1670
|
-
socialProviders:
|
|
1832
|
+
socialProviders: socialProvidersSchema,
|
|
1671
1833
|
enterpriseSSO: v.boolean(),
|
|
1672
1834
|
enrollmentMode: v.optional(v.picklist([
|
|
1673
1835
|
"open",
|
|
@@ -1686,31 +1848,40 @@ const cloudCapabilitiesSchema = v.object({
|
|
|
1686
1848
|
workspaces: v.boolean(),
|
|
1687
1849
|
collaboration: v.boolean()
|
|
1688
1850
|
});
|
|
1689
|
-
/**
|
|
1690
|
-
|
|
1851
|
+
/**
|
|
1852
|
+
* An editor version, as SemVer: a release such as `0.18.0`, or a pre-release such as
|
|
1853
|
+
* `0.18.0-beta.2` or a nightly's `0.18.0-nightly.20261116`.
|
|
1854
|
+
*
|
|
1855
|
+
* Editors before 0.18.0 accept only `major.minor.patch` here and fail discovery on anything else,
|
|
1856
|
+
* so a server names a pre-release minimum only once its minimum is already 0.18.0 or later.
|
|
1857
|
+
*/
|
|
1858
|
+
const cloudEditorVersionSchema = v.pipe(v.string(), v.check(isSemVer, "Expected a SemVer version"));
|
|
1859
|
+
/**
|
|
1860
|
+
* Whether the text is exactly a SemVer version, build metadata included: semver's own parse also
|
|
1861
|
+
* takes a `v` prefix or spaces, which a version here never has.
|
|
1862
|
+
*/
|
|
1863
|
+
function isSemVer(value) {
|
|
1864
|
+
const parsed = parseVersion(value);
|
|
1865
|
+
if (!parsed) return false;
|
|
1866
|
+
const build = parsed.build.length > 0 ? `+${parsed.build.join(".")}` : "";
|
|
1867
|
+
return `${parsed.version}${build}` === value;
|
|
1868
|
+
}
|
|
1691
1869
|
/**
|
|
1692
1870
|
* The header desktop editors send with each request, naming their version, so a server can refuse
|
|
1693
1871
|
* an editor older than its `minimumEditorVersion`. Browser editors leave it out: the server serves
|
|
1694
1872
|
* them, and an older server's CORS rules would refuse a header they don't list.
|
|
1695
1873
|
*/
|
|
1696
1874
|
const CLOUD_EDITOR_VERSION_HEADER = "X-OpenPencil-Editor-Version";
|
|
1697
|
-
function editorVersionParts(version) {
|
|
1698
|
-
const match = /^(\d+)\.(\d+)\.(\d+)/.exec(version);
|
|
1699
|
-
return match ? match.slice(1).map(Number) : null;
|
|
1700
|
-
}
|
|
1701
1875
|
/**
|
|
1702
|
-
* Whether `version` is `minimum` or later,
|
|
1703
|
-
*
|
|
1876
|
+
* Whether `version` is `minimum` or later, in SemVer order: a pre-release comes before its
|
|
1877
|
+
* release, so `0.18.0-beta.2` is not at least `0.18.0`; a release's nightlies come after its
|
|
1878
|
+
* betas and order by date. To admit a release's pre-releases, name the earliest one, such as
|
|
1879
|
+
* `0.18.0-beta.1`, or `0.18.0-nightly.20261116` for nightlies from that day on. A
|
|
1880
|
+
* version that isn't SemVer, on either side, is not at least anything.
|
|
1704
1881
|
*/
|
|
1705
1882
|
function isEditorVersionAtLeast(version, minimum) {
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
if (!have || !need) return false;
|
|
1709
|
-
for (let index = 0; index < need.length; index++) {
|
|
1710
|
-
const difference = (have[index] ?? 0) - (need[index] ?? 0);
|
|
1711
|
-
if (difference !== 0) return difference > 0;
|
|
1712
|
-
}
|
|
1713
|
-
return true;
|
|
1883
|
+
if (!isSemVer(version) || !isSemVer(minimum)) return false;
|
|
1884
|
+
return compareVersions(version, minimum) >= 0;
|
|
1714
1885
|
}
|
|
1715
1886
|
/**
|
|
1716
1887
|
* Whether editors offer this server to everyone, and from which editor version on. Only the
|
|
@@ -1746,8 +1917,12 @@ const cloudBrandingSchema = v.object({
|
|
|
1746
1917
|
/**
|
|
1747
1918
|
* The server's community gallery: the workspace whose documents anyone may open read-only.
|
|
1748
1919
|
* Saving to it publishes, so editors never choose it for anyone and say so when it is chosen.
|
|
1920
|
+
* `tourDocumentId` is the gallery document editors open as their tour.
|
|
1749
1921
|
*/
|
|
1750
|
-
const cloudCommunityDiscoverySchema = v.object({
|
|
1922
|
+
const cloudCommunityDiscoverySchema = v.object({
|
|
1923
|
+
workspaceId: v.pipe(v.string(), v.uuid()),
|
|
1924
|
+
tourDocumentId: v.optional(v.pipe(v.string(), v.uuid()))
|
|
1925
|
+
});
|
|
1751
1926
|
const cloudDiscoverySchema = v.object({
|
|
1752
1927
|
protocolVersion: v.literal("1"),
|
|
1753
1928
|
deployment: cloudDeploymentSchema,
|
|
@@ -1866,6 +2041,10 @@ function cloudDesktopLinkURL(kind, id, serverURL, secret) {
|
|
|
1866
2041
|
function cloudCommunityDesktopLinkURL(documentId, serverURL, versionId = null) {
|
|
1867
2042
|
return withQuery("openpencil://cloud", { url: cloudCommunityURL(serverURL, documentId, versionId) });
|
|
1868
2043
|
}
|
|
2044
|
+
/** A comment thread on a document, `/documents/:id?comment=…`, which opens it. */
|
|
2045
|
+
function cloudCommentURL(serverURL, documentId, threadId) {
|
|
2046
|
+
return serverLink(serverURL, cloudDocumentPath(documentId), { comment: threadId });
|
|
2047
|
+
}
|
|
1869
2048
|
//#endregion
|
|
1870
2049
|
//#region src/contract/portal.ts
|
|
1871
2050
|
/**
|
|
@@ -1951,6 +2130,173 @@ function parseDuplicateDocumentVersion(input) {
|
|
|
1951
2130
|
return v.parse(duplicateDocumentVersionSchema, input);
|
|
1952
2131
|
}
|
|
1953
2132
|
//#endregion
|
|
2133
|
+
//#region src/contract/comments.ts
|
|
2134
|
+
/** The most a comment may say, in characters. */
|
|
2135
|
+
const COMMENT_BODY_MAX_LENGTH = 1e4;
|
|
2136
|
+
/** The most threads one document may hold, resolved ones included. */
|
|
2137
|
+
const MAX_COMMENT_THREADS_PER_DOCUMENT = 5e3;
|
|
2138
|
+
/** The most comments one thread may hold, its first one included. */
|
|
2139
|
+
const MAX_COMMENTS_PER_THREAD = 500;
|
|
2140
|
+
/** The most a page, layer or author name in a comment may hold, in characters. */
|
|
2141
|
+
const COMMENT_NAME_MAX_LENGTH = 255;
|
|
2142
|
+
const ID_MAX_LENGTH = 200;
|
|
2143
|
+
/**
|
|
2144
|
+
* Who wrote a comment: an account, whose name is null once it is deleted, or a name a file gave
|
|
2145
|
+
* when the comment came in with it, which no account vouches for.
|
|
2146
|
+
*/
|
|
2147
|
+
const commentAuthorSchema = v.variant("kind", [v.object({
|
|
2148
|
+
kind: v.literal("user"),
|
|
2149
|
+
id: v.string(),
|
|
2150
|
+
name: v.nullable(v.string())
|
|
2151
|
+
}), v.object({
|
|
2152
|
+
kind: v.literal("imported"),
|
|
2153
|
+
name: v.string()
|
|
2154
|
+
})]);
|
|
2155
|
+
const cloudCommentSchema = v.object({
|
|
2156
|
+
id: v.pipe(v.string(), v.uuid()),
|
|
2157
|
+
author: commentAuthorSchema,
|
|
2158
|
+
/** The agent that wrote it on its author's behalf. */
|
|
2159
|
+
agent: v.nullable(v.string()),
|
|
2160
|
+
/** Markdown, as the editor writes it. */
|
|
2161
|
+
body: v.string(),
|
|
2162
|
+
/** The accounts it names, which hear about it. */
|
|
2163
|
+
mentions: v.array(v.string()),
|
|
2164
|
+
createdAt: v.string(),
|
|
2165
|
+
editedAt: v.nullable(v.string())
|
|
2166
|
+
});
|
|
2167
|
+
/** Where a pin sits, as the editor places it. */
|
|
2168
|
+
const commentAnchorEntries = {
|
|
2169
|
+
pageId: v.pipe(v.string(), v.minLength(1), v.maxLength(ID_MAX_LENGTH)),
|
|
2170
|
+
pageName: v.nullable(v.pipe(v.string(), v.maxLength(255))),
|
|
2171
|
+
/** The top-level layer the pin follows, if any. */
|
|
2172
|
+
nodeId: v.nullable(v.pipe(v.string(), v.minLength(1), v.maxLength(ID_MAX_LENGTH))),
|
|
2173
|
+
nodeName: v.nullable(v.pipe(v.string(), v.maxLength(255))),
|
|
2174
|
+
/** The pin's offset from the layer's top-left corner. */
|
|
2175
|
+
offsetX: v.nullable(v.pipe(v.number(), v.finite())),
|
|
2176
|
+
offsetY: v.nullable(v.pipe(v.number(), v.finite())),
|
|
2177
|
+
/** The pin's canvas position, used once the layer is gone. */
|
|
2178
|
+
x: v.pipe(v.number(), v.finite()),
|
|
2179
|
+
y: v.pipe(v.number(), v.finite())
|
|
2180
|
+
};
|
|
2181
|
+
const commentAnchorSchema = v.object(commentAnchorEntries);
|
|
2182
|
+
const cloudCommentThreadSchema = v.object({
|
|
2183
|
+
id: v.pipe(v.string(), v.uuid()),
|
|
2184
|
+
...commentAnchorEntries,
|
|
2185
|
+
createdAt: v.string(),
|
|
2186
|
+
/** When anything in the thread last changed: a comment, the pin, or whether it is resolved. */
|
|
2187
|
+
updatedAt: v.string(),
|
|
2188
|
+
resolvedAt: v.nullable(v.string()),
|
|
2189
|
+
resolvedBy: v.nullable(v.string()),
|
|
2190
|
+
/** Who started it, or brought it in from a file: they may move its pin and delete it. */
|
|
2191
|
+
createdBy: v.string(),
|
|
2192
|
+
/** Whether someone else wrote in it since the asker last read it; false for a guest. */
|
|
2193
|
+
unread: v.boolean(),
|
|
2194
|
+
/** Oldest first; the first is what started the thread. */
|
|
2195
|
+
comments: v.array(cloudCommentSchema)
|
|
2196
|
+
});
|
|
2197
|
+
/** What the person asking may do with the document's comments. */
|
|
2198
|
+
const commentAccessSchema = v.object({
|
|
2199
|
+
/** Start threads, reply, and change their own comments; anyone signed in who can view. */
|
|
2200
|
+
canComment: v.boolean(),
|
|
2201
|
+
/** Delete anyone's comments; editors. */
|
|
2202
|
+
canModerate: v.boolean(),
|
|
2203
|
+
/** The asker's account, which their own comments name; null for a guest. */
|
|
2204
|
+
accountId: v.nullable(v.string())
|
|
2205
|
+
});
|
|
2206
|
+
const commentThreadsSchema = v.object({
|
|
2207
|
+
threads: v.array(cloudCommentThreadSchema),
|
|
2208
|
+
access: commentAccessSchema
|
|
2209
|
+
});
|
|
2210
|
+
const commentThreadResponseSchema = v.object({ thread: cloudCommentThreadSchema });
|
|
2211
|
+
const bodySchema = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(COMMENT_BODY_MAX_LENGTH));
|
|
2212
|
+
/** The most accounts one comment names. */
|
|
2213
|
+
const MAX_COMMENT_MENTIONS = 50;
|
|
2214
|
+
/** The accounts a comment names; the server keeps those who can read the document. */
|
|
2215
|
+
const mentionsSchema = v.optional(v.pipe(v.array(v.pipe(v.string(), v.minLength(1), v.maxLength(200))), v.maxLength(50)), []);
|
|
2216
|
+
/** The longest agent name a comment keeps. */
|
|
2217
|
+
const MAX_COMMENT_AGENT_LENGTH = 100;
|
|
2218
|
+
const agentSchema = v.optional(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(100)));
|
|
2219
|
+
/**
|
|
2220
|
+
* The ID the editor gave a new thread or comment, so it keeps showing it as the server's, and a
|
|
2221
|
+
* request sent again finds what the first one made.
|
|
2222
|
+
*/
|
|
2223
|
+
const clientIdSchema = v.optional(v.pipe(v.string(), v.uuid()));
|
|
2224
|
+
const createCommentThreadSchema = v.object({
|
|
2225
|
+
id: clientIdSchema,
|
|
2226
|
+
...commentAnchorEntries,
|
|
2227
|
+
body: bodySchema,
|
|
2228
|
+
mentions: mentionsSchema,
|
|
2229
|
+
agent: agentSchema
|
|
2230
|
+
});
|
|
2231
|
+
/** Resolves or reopens a thread, or moves its pin; what is left out stays as it is. */
|
|
2232
|
+
const updateCommentThreadSchema = v.object({
|
|
2233
|
+
resolved: v.optional(v.boolean()),
|
|
2234
|
+
anchor: v.optional(commentAnchorSchema)
|
|
2235
|
+
});
|
|
2236
|
+
const createCommentSchema = v.object({
|
|
2237
|
+
id: clientIdSchema,
|
|
2238
|
+
body: bodySchema,
|
|
2239
|
+
mentions: mentionsSchema,
|
|
2240
|
+
agent: agentSchema
|
|
2241
|
+
});
|
|
2242
|
+
const updateCommentSchema = v.object({
|
|
2243
|
+
body: bodySchema,
|
|
2244
|
+
mentions: mentionsSchema
|
|
2245
|
+
});
|
|
2246
|
+
/** Someone a comment may name: an account that can open the document. */
|
|
2247
|
+
const commentPersonSchema = v.object({
|
|
2248
|
+
id: v.string(),
|
|
2249
|
+
name: v.string(),
|
|
2250
|
+
image: v.nullable(v.string())
|
|
2251
|
+
});
|
|
2252
|
+
const commentPeopleSchema = v.object({ people: v.array(commentPersonSchema) });
|
|
2253
|
+
/** Which comments an account hears about by email. */
|
|
2254
|
+
const commentEmailSettingSchema = v.picklist([
|
|
2255
|
+
"all",
|
|
2256
|
+
"mentions",
|
|
2257
|
+
"off"
|
|
2258
|
+
]);
|
|
2259
|
+
const notificationSettingsSchema = v.object({ commentEmails: commentEmailSettingSchema });
|
|
2260
|
+
/** The most threads, and comments in all, one import brings in. */
|
|
2261
|
+
const MAX_IMPORTED_COMMENT_THREADS = 1e3;
|
|
2262
|
+
const MAX_IMPORTED_COMMENTS = 1e4;
|
|
2263
|
+
/**
|
|
2264
|
+
* Threads a file held when it moved to Cloud. Their authors are names the file gave, which the
|
|
2265
|
+
* server keeps as such; their times are the file's.
|
|
2266
|
+
*/
|
|
2267
|
+
const importCommentThreadsSchema = v.object({ threads: v.pipe(v.array(v.object({
|
|
2268
|
+
...commentAnchorEntries,
|
|
2269
|
+
createdAt: v.pipe(v.string(), v.isoTimestamp()),
|
|
2270
|
+
resolved: v.boolean(),
|
|
2271
|
+
comments: v.pipe(v.array(v.object({
|
|
2272
|
+
authorName: v.pipe(v.string(), v.trim(), v.maxLength(255)),
|
|
2273
|
+
body: bodySchema,
|
|
2274
|
+
createdAt: v.pipe(v.string(), v.isoTimestamp())
|
|
2275
|
+
})), v.minLength(1), v.maxLength(MAX_IMPORTED_COMMENTS))
|
|
2276
|
+
})), v.maxLength(MAX_IMPORTED_COMMENT_THREADS), v.check((threads) => threads.reduce((total, thread) => total + thread.comments.length, 0) <= MAX_IMPORTED_COMMENTS, `An import brings in at most ${MAX_IMPORTED_COMMENTS} comments`)) });
|
|
2277
|
+
/**
|
|
2278
|
+
* The same requests made through a share link: the link's secret rides in the body, as it does
|
|
2279
|
+
* for opening the document, since it must stay out of the address.
|
|
2280
|
+
*/
|
|
2281
|
+
const shareEntries = { share: v.pick(resolveDocumentShareSchema, ["secret"]) };
|
|
2282
|
+
const sharedCommentsRequestSchema = v.object(shareEntries);
|
|
2283
|
+
const sharedCreateCommentThreadSchema = v.object({
|
|
2284
|
+
...shareEntries,
|
|
2285
|
+
...createCommentThreadSchema.entries
|
|
2286
|
+
});
|
|
2287
|
+
const sharedUpdateCommentThreadSchema = v.object({
|
|
2288
|
+
...shareEntries,
|
|
2289
|
+
...updateCommentThreadSchema.entries
|
|
2290
|
+
});
|
|
2291
|
+
const sharedCreateCommentSchema = v.object({
|
|
2292
|
+
...shareEntries,
|
|
2293
|
+
...createCommentSchema.entries
|
|
2294
|
+
});
|
|
2295
|
+
const sharedUpdateCommentSchema = v.object({
|
|
2296
|
+
...shareEntries,
|
|
2297
|
+
...updateCommentSchema.entries
|
|
2298
|
+
});
|
|
2299
|
+
//#endregion
|
|
1954
2300
|
//#region src/contract/community.ts
|
|
1955
2301
|
/**
|
|
1956
2302
|
* Where a community document's thumbnail is served, by its document and revision: the address
|
|
@@ -1995,6 +2341,6 @@ const communityDownloadSchema = v.object({
|
|
|
1995
2341
|
version: v.nullable(communityVersionSchema)
|
|
1996
2342
|
});
|
|
1997
2343
|
//#endregion
|
|
1998
|
-
export { BILLING_ERROR_STATUS, 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, DOCUMENT_REPORT_DESCRIPTION_MAX, DOCUMENT_VERSION_DESCRIPTION_MAX_LENGTH, DOCUMENT_VERSION_NAME_MAX_LENGTH, MAX_COLLAB_MESSAGE_BYTES, MAX_PRESENCE_NAME_LENGTH, MAX_SEARCH_QUERY_LENGTH, MAX_SEARCH_RESULTS, RELAY_CLOSE, RELAY_DOCUMENT_PARAM, RELAY_FORWARDING_BYTES, RELAY_FRAGMENT_BYTES, RELAY_HEARTBEAT, RELAY_MINIMUM_MESSAGE_BYTES, RELAY_PATH, RELAY_SERVER_PEER, SERVICE_ERROR_STATUS, 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 };
|
|
2344
|
+
export { BILLING_ERROR_STATUS, CLOUD_ACCESS_TOKEN_MAX_DAYS, CLOUD_ACCESS_TOKEN_NAME_MAX_LENGTH, CLOUD_ACCESS_TOKEN_PREFIX, CLOUD_ACCOUNT_BILLING_PATH, CLOUD_ACCOUNT_PLAN_PATH, CLOUD_API_MAX_BODY_BYTES, CLOUD_BILLING_API_PATHS, CLOUD_BILLING_CONTRACT_VERSION, CLOUD_BILLING_PAGE_PATHS, 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, CLOUD_SOCIAL_PROVIDERS, CLOUD_SOCIAL_PROVIDER_NAMES, COLLAB_ACTIONS, COMMENT_BODY_MAX_LENGTH, COMMENT_NAME_MAX_LENGTH, COMMUNITY_THUMBNAIL_PATH, DOCUMENT_REPORT_DESCRIPTION_MAX, DOCUMENT_VERSION_DESCRIPTION_MAX_LENGTH, DOCUMENT_VERSION_NAME_MAX_LENGTH, MAX_COLLAB_MESSAGE_BYTES, MAX_COMMENTS_PER_THREAD, MAX_COMMENT_AGENT_LENGTH, MAX_COMMENT_MENTIONS, MAX_COMMENT_THREADS_PER_DOCUMENT, MAX_IMPORTED_COMMENTS, MAX_IMPORTED_COMMENT_THREADS, MAX_PRESENCE_NAME_LENGTH, MAX_SEARCH_QUERY_LENGTH, MAX_SEARCH_RESULTS, RELAY_CLOSE, RELAY_DOCUMENT_PARAM, RELAY_FORWARDING_BYTES, RELAY_FRAGMENT_BYTES, RELAY_HEARTBEAT, RELAY_MINIMUM_MESSAGE_BYTES, RELAY_PATH, RELAY_SERVER_PEER, SERVICE_ERROR_STATUS, acceptDocumentInvitationSchema, acceptedInvitationSchema, accountEntitlementsResponseSchema, accountEntitlementsSchema, accountSecurityErrorCodeSchema, accountSecurityErrorResponseSchema, adminAuditEventSchema, adminAuditResponseSchema, adminEmailResponseSchema, adminErrorCodeSchema, adminErrorResponseSchema, adminMutationResponseSchema, adminOperationsResponseSchema, billingAccountSchema, billingCatalogSchema, billingErrorCodeSchema, billingErrorSchema, billingFreePlanSchema, billingPlanSchema, billingRedirectSchema, billingSeatPricingSchema, 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, cloudAdminUserMethodSchema, cloudAdminUserSchema, cloudAdminUsersResponseSchema, cloudAuthenticationMethodSchema, cloudAuthenticationMethodsResponseSchema, cloudAuthenticationProviderSchema, cloudAuthenticationSchema, cloudBillingDiscoverySchema, cloudBrandingSchema, cloudCapabilitiesSchema, cloudCommentSchema, cloudCommentThreadSchema, cloudCommentURL, 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, cloudSocialProviderSchema, cloudTermsAcceptanceSchema, cloudUnlinkAuthenticationMethodSchema, cloudUserProfileSchema, collaborationPrincipalSchema, collaborationTicketSchema, commentAccessSchema, commentAnchorSchema, commentAuthorSchema, commentEmailSettingSchema, commentPeopleSchema, commentPersonSchema, commentThreadResponseSchema, commentThreadsSchema, commitImageUploadsSchema, commitUploadSchema, communityDocumentSchema, communityDocumentsSchema, communityDownloadQuerySchema, communityDownloadSchema, communityThumbnailPath, communityVersionSchema, createCommentSchema, createCommentThreadSchema, 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, enrollmentInviteResponseSchema, enrollmentReviewResponseSchema, enrollmentSchema, enrollmentStatusSchema, enrollmentsResponseSchema, fileDocumentReportResponseSchema, fileDocumentReportSchema, imageUploadOfferSchema, importCommentThreadsSchema, invitationContinuationSchema, invitationPreviewSchema, isCloudChecksum, isCloudPortalPage, isEditorVersionAtLeast, isKnownAuthenticationProvider, isKnownSocialProvider, notificationSettingsSchema, 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, roleModelsSchema, saveDocumentVersionSchema, searchPricingSchema, searchRequestSchema, searchResponseSchema, searchResultSchema, sendsTokenSafely, serviceCatalogSchema, serviceErrorCodeSchema, serviceErrorSchema, servicesTokenClaimsSchema, servicesTokenSchema, sharedCommentsRequestSchema, sharedCreateCommentSchema, sharedCreateCommentThreadSchema, sharedDocumentSchema, sharedUpdateCommentSchema, sharedUpdateCommentThreadSchema, transactionalEmailAdminSchema, trashSchema, trashedDocumentSchema, updateCommentSchema, updateCommentThreadSchema, updateDocumentShareSchema, updateDocumentVersionSchema, updateWorkspaceMemberSchema, updateWorkspaceSchema, usageEntrySchema, usagePageSchema, usageQuerySchema, workspaceEntitlementsSchema, workspaceInvitationSchema, workspaceListSchema, workspaceMemberSchema, workspaceMembersSchema, workspaceRoleSchema, workspaceSummarySchema, workspaceUsageSchema };
|
|
1999
2345
|
|
|
2000
2346
|
//# sourceMappingURL=contract2.js.map
|