@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/client.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import * as v from "valibot";
|
|
|
2
2
|
import { hc } from "hono/client";
|
|
3
3
|
import { createAuthClient } from "better-auth/client";
|
|
4
4
|
//#region src/contract/account.d.ts
|
|
5
|
-
declare const
|
|
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>;
|
|
6
8
|
declare const cloudAccessTokenCreateSchema: v.ObjectSchema<{
|
|
7
9
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
8
10
|
readonly expiresInDays: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 365, undefined>]>;
|
|
@@ -16,7 +18,7 @@ declare const servicesTokenSchema: v.ObjectSchema<{
|
|
|
16
18
|
readonly expiresAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
17
19
|
}, undefined>;
|
|
18
20
|
type ServicesToken = v.InferOutput<typeof servicesTokenSchema>;
|
|
19
|
-
declare const serviceCatalogSchema: v.ObjectSchema<{
|
|
21
|
+
declare const serviceCatalogSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
20
22
|
readonly models: v.ArraySchema<v.ObjectSchema<{
|
|
21
23
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
22
24
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -31,10 +33,44 @@ declare const serviceCatalogSchema: v.ObjectSchema<{
|
|
|
31
33
|
}, undefined>;
|
|
32
34
|
}, undefined>, undefined>;
|
|
33
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>;
|
|
34
47
|
readonly search: v.OptionalSchema<v.ObjectSchema<{
|
|
35
48
|
readonly creditsPerRequest: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
36
49
|
}, undefined>, undefined>;
|
|
37
|
-
}, 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">]>;
|
|
38
74
|
type ServiceCatalog = v.InferOutput<typeof serviceCatalogSchema>;
|
|
39
75
|
/**
|
|
40
76
|
* A service records a request's charge before the request's answer ends, so a wallet read after
|
|
@@ -76,54 +112,14 @@ declare const billingTokenSchema: v.ObjectSchema<{
|
|
|
76
112
|
readonly expiresAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
77
113
|
}, undefined>;
|
|
78
114
|
type BillingToken = v.InferOutput<typeof billingTokenSchema>;
|
|
79
|
-
/** What the service sells; an account without a plan has its deployment's free entitlements. */
|
|
80
|
-
declare const billingCatalogSchema: v.ObjectSchema<{
|
|
81
|
-
readonly plans: v.ArraySchema<v.ObjectSchema<{
|
|
82
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
83
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
84
|
-
readonly monthlyPriceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
85
|
-
readonly storageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
86
|
-
readonly monthlyCredits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
87
|
-
}, undefined>, undefined>;
|
|
88
|
-
readonly creditPacks: v.ArraySchema<v.ObjectSchema<{
|
|
89
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
90
|
-
readonly credits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
91
|
-
readonly priceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
92
|
-
/** How long the credits last from purchase. */
|
|
93
|
-
readonly validDays: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
94
|
-
}, undefined>, undefined>;
|
|
95
|
-
}, undefined>;
|
|
96
|
-
type BillingCatalog = v.InferOutput<typeof billingCatalogSchema>;
|
|
97
|
-
/**
|
|
98
|
-
* The account's subscription as the payment provider holds it, or `null` without one. A
|
|
99
|
-
* `past_due` plan keeps its entitlements while payment is retried.
|
|
100
|
-
*/
|
|
101
|
-
declare const billingAccountSchema: v.ObjectSchema<{
|
|
102
|
-
readonly subscription: v.NullableSchema<v.ObjectSchema<{
|
|
103
|
-
readonly planId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
104
|
-
readonly status: v.PicklistSchema<["active", "past_due"], undefined>;
|
|
105
|
-
/** When the current period ends: the next charge, or the end of a cancelled plan. */
|
|
106
|
-
readonly currentPeriodEnd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
107
|
-
/** Whether the plan ends at `currentPeriodEnd` instead of renewing. */
|
|
108
|
-
readonly cancelsAtPeriodEnd: v.BooleanSchema<undefined>;
|
|
109
|
-
}, undefined>, undefined>;
|
|
110
|
-
}, undefined>;
|
|
111
|
-
type BillingAccount = v.InferOutput<typeof billingAccountSchema>;
|
|
112
|
-
/** What to buy: a plan to subscribe to, or a credit pack. */
|
|
113
|
-
declare const checkoutRequestSchema: v.UnionSchema<[v.ObjectSchema<{
|
|
114
|
-
readonly planId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
115
|
-
}, undefined>, v.ObjectSchema<{
|
|
116
|
-
readonly creditPackId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
117
|
-
}, undefined>], undefined>;
|
|
118
|
-
type CheckoutRequest = v.InferOutput<typeof checkoutRequestSchema>;
|
|
119
|
-
declare const billingErrorCodeSchema: v.PicklistSchema<["invalid_request", "unauthorized", "not_allowed", "provider_unavailable"], undefined>;
|
|
120
|
-
type BillingErrorCode = v.InferOutput<typeof billingErrorCodeSchema>;
|
|
121
115
|
//#endregion
|
|
122
116
|
//#region src/contract/admin/index.d.ts
|
|
123
|
-
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>;
|
|
124
118
|
declare const enrollmentStatusSchema: v.PicklistSchema<["pending", "approved", "rejected", "revoked"], undefined>;
|
|
125
119
|
/** Which accounts a list of people shows. */
|
|
126
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>;
|
|
127
123
|
/** Which messages a list of email shows, by how their delivery went. */
|
|
128
124
|
declare const cloudAdminEmailFilterSchema: v.PicklistSchema<["all", "sent", "waiting", "failed"], undefined>;
|
|
129
125
|
/** Which events a list of activity shows, by what they are about. */
|
|
@@ -134,6 +130,7 @@ declare const cloudAdminDocumentFilterSchema: v.PicklistSchema<["all", "reported
|
|
|
134
130
|
declare const cloudAdminReportFilterSchema: v.PicklistSchema<["open", "actioned", "dismissed", "all"], undefined>;
|
|
135
131
|
type AdminErrorCode = v.InferOutput<typeof adminErrorCodeSchema>;
|
|
136
132
|
type CloudAdminUserFilter = v.InferOutput<typeof cloudAdminUserFilterSchema>;
|
|
133
|
+
type CloudAdminUserMethod = v.InferOutput<typeof cloudAdminUserMethodSchema>;
|
|
137
134
|
type CloudAdminEmailFilter = v.InferOutput<typeof cloudAdminEmailFilterSchema>;
|
|
138
135
|
type CloudAdminAuditFilter = v.InferOutput<typeof cloudAdminAuditFilterSchema>;
|
|
139
136
|
type EnrollmentStatus = v.InferOutput<typeof enrollmentStatusSchema>;
|
|
@@ -218,7 +215,7 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
|
|
|
218
215
|
readonly siteKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
219
216
|
}, undefined>, undefined>;
|
|
220
217
|
}, undefined>, undefined>;
|
|
221
|
-
readonly socialProviders: v.ArraySchema<v.
|
|
218
|
+
readonly socialProviders: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.TransformAction<string[], ("google" | "apple" | "github")[]>]>;
|
|
222
219
|
readonly enterpriseSSO: v.BooleanSchema<undefined>;
|
|
223
220
|
readonly enrollmentMode: v.OptionalSchema<v.PicklistSchema<["open", "approval", "closed"], undefined>, "open">;
|
|
224
221
|
readonly mfa: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -234,13 +231,13 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
|
|
|
234
231
|
readonly collaboration: v.BooleanSchema<undefined>;
|
|
235
232
|
}, undefined>;
|
|
236
233
|
readonly listing: v.OptionalSchema<v.ObjectSchema<{
|
|
237
|
-
readonly minimumEditorVersion: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.
|
|
234
|
+
readonly minimumEditorVersion: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Expected a SemVer version">]>;
|
|
238
235
|
}, undefined>, undefined>;
|
|
239
236
|
/**
|
|
240
237
|
* The oldest editor version the server works with. Older editors ask to be updated instead of
|
|
241
238
|
* connecting, and the server refuses their requests.
|
|
242
239
|
*/
|
|
243
|
-
readonly minimumEditorVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.
|
|
240
|
+
readonly minimumEditorVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Expected a SemVer version">]>, undefined>;
|
|
244
241
|
/** The services editors reach with Cloud-signed tokens; absent when the deployment has none. */
|
|
245
242
|
readonly services: v.OptionalSchema<v.ObjectSchema<{
|
|
246
243
|
readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
@@ -250,10 +247,16 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
|
|
|
250
247
|
readonly billing: v.OptionalSchema<v.ObjectSchema<{
|
|
251
248
|
readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
252
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>;
|
|
253
255
|
}, undefined>, undefined>;
|
|
254
256
|
/** The community gallery; absent when the deployment has none. */
|
|
255
257
|
readonly community: v.OptionalSchema<v.ObjectSchema<{
|
|
256
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>;
|
|
257
260
|
}, undefined>, undefined>;
|
|
258
261
|
readonly legal: v.OptionalSchema<v.ObjectSchema<{
|
|
259
262
|
readonly termsURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
|
|
@@ -416,6 +419,26 @@ declare const createUploadSchema: v.ObjectSchema<{
|
|
|
416
419
|
readonly contentType: v.LiteralSchema<"application/octet-stream", undefined>;
|
|
417
420
|
}, undefined>;
|
|
418
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>;
|
|
419
442
|
/** An upload the server offers for an image the workspace lacks. */
|
|
420
443
|
declare const imageUploadOfferSchema: v.ObjectSchema<{
|
|
421
444
|
readonly checksum: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -650,6 +673,11 @@ declare const workspaceSummarySchema: v.ObjectSchema<{
|
|
|
650
673
|
readonly name: v.StringSchema<undefined>;
|
|
651
674
|
readonly slug: v.StringSchema<undefined>;
|
|
652
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>;
|
|
653
681
|
readonly createdAt: v.StringSchema<undefined>;
|
|
654
682
|
readonly updatedAt: v.StringSchema<undefined>;
|
|
655
683
|
}, undefined>;
|
|
@@ -660,6 +688,11 @@ declare const workspaceListSchema: v.ObjectSchema<{
|
|
|
660
688
|
readonly name: v.StringSchema<undefined>;
|
|
661
689
|
readonly slug: v.StringSchema<undefined>;
|
|
662
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>;
|
|
663
696
|
readonly createdAt: v.StringSchema<undefined>;
|
|
664
697
|
readonly updatedAt: v.StringSchema<undefined>;
|
|
665
698
|
}, undefined>, undefined>;
|
|
@@ -836,6 +869,220 @@ declare const documentVersionDownloadSchema: v.ObjectSchema<{
|
|
|
836
869
|
}, undefined>;
|
|
837
870
|
type DocumentVersionDownload = v.InferOutput<typeof documentVersionDownloadSchema>;
|
|
838
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
|
|
839
1086
|
//#region src/contract/community.d.ts
|
|
840
1087
|
/** The community workspace's documents, most recently changed first. */
|
|
841
1088
|
declare const communityDocumentsSchema: v.ObjectSchema<{
|
|
@@ -994,35 +1241,6 @@ declare function createCloudServicesClient(options: CloudServicesClientOptions):
|
|
|
994
1241
|
};
|
|
995
1242
|
type CloudServicesClient = ReturnType<typeof createCloudServicesClient>;
|
|
996
1243
|
//#endregion
|
|
997
|
-
//#region src/client/billing.d.ts
|
|
998
|
-
declare class CloudBillingError extends Error {
|
|
999
|
-
readonly status: number;
|
|
1000
|
-
readonly code?: BillingErrorCode | undefined;
|
|
1001
|
-
readonly name = "CloudBillingError";
|
|
1002
|
-
constructor(status: number, code?: BillingErrorCode | undefined);
|
|
1003
|
-
}
|
|
1004
|
-
type CloudBillingClientOptions = {
|
|
1005
|
-
/** The billing service's endpoint, as Cloud's discovery names it. */
|
|
1006
|
-
endpoint: string;
|
|
1007
|
-
/** Billing tokens for the signed-in person, from `requestBillingToken`. */
|
|
1008
|
-
tokens: CloudServicesTokenSource;
|
|
1009
|
-
fetch: CloudFetch;
|
|
1010
|
-
};
|
|
1011
|
-
/**
|
|
1012
|
-
* The billing a Cloud advertises: what it sells, the account's subscription, and where to buy or
|
|
1013
|
-
* manage it. Checkout and the portal answer with the payment provider's page to open, so a token
|
|
1014
|
-
* never travels in a URL.
|
|
1015
|
-
*/
|
|
1016
|
-
declare function createCloudBillingClient(options: CloudBillingClientOptions): {
|
|
1017
|
-
catalog(): Promise<BillingCatalog>;
|
|
1018
|
-
account(): Promise<BillingAccount>;
|
|
1019
|
-
/** The checkout page that buys `request` for the account. */
|
|
1020
|
-
checkout(request: CheckoutRequest): Promise<string>;
|
|
1021
|
-
/** The page where the account cancels, changes its card, and reads its invoices. */
|
|
1022
|
-
portal(): Promise<string>;
|
|
1023
|
-
};
|
|
1024
|
-
type CloudBillingClient = ReturnType<typeof createCloudBillingClient>;
|
|
1025
|
-
//#endregion
|
|
1026
1244
|
//#region src/client/auth/failure.d.ts
|
|
1027
1245
|
/** Why a sign-in step did not go through, in terms a page or dialog can explain. */
|
|
1028
1246
|
type CloudAuthFailure = 'invalid-credentials' | 'email-not-verified' | 'password-too-short' | 'password-too-long' | 'invalid-link' | 'invalid-code' | 'passkey-cancelled' | 'passkey-exists' | 'passkey-unavailable' | 'session-not-fresh' | 'rate-limited' | 'unavailable';
|
|
@@ -1195,6 +1413,28 @@ declare function cloudSignInURL(discovery: CloudDiscovery, returnURL: string, pr
|
|
|
1195
1413
|
/** Accept only same-origin application paths for post-authentication navigation. */
|
|
1196
1414
|
declare function cloudRedirectPath(value: unknown, fallback?: string): string;
|
|
1197
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
|
|
1198
1438
|
//#region src/client/response.d.ts
|
|
1199
1439
|
type CloudClientDiagnostic = (message: string, error: unknown) => void;
|
|
1200
1440
|
declare class CloudAPIError extends Error {
|
|
@@ -1204,6 +1444,24 @@ declare class CloudAPIError extends Error {
|
|
|
1204
1444
|
constructor(message: string, status: number, code?: string | undefined);
|
|
1205
1445
|
}
|
|
1206
1446
|
//#endregion
|
|
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
|
|
1207
1465
|
//#region src/client/documents.d.ts
|
|
1208
1466
|
declare const uploadResponseSchema: v.ObjectSchema<{
|
|
1209
1467
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -1368,6 +1626,12 @@ declare function createCloudAPIClient(baseURL: string, options?: CloudRequestOpt
|
|
|
1368
1626
|
};
|
|
1369
1627
|
}>;
|
|
1370
1628
|
getSharedCollaborationTicket(shareId: string, input: ResolveDocumentShareInput): Promise<CollaborationTicket>;
|
|
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>;
|
|
1371
1635
|
listDocumentVersions(documentId: string, page?: {
|
|
1372
1636
|
before?: string;
|
|
1373
1637
|
limit?: number;
|
|
@@ -1441,6 +1705,137 @@ declare function createCloudAPIClient(baseURL: string, options?: CloudRequestOpt
|
|
|
1441
1705
|
};
|
|
1442
1706
|
type CloudAPIClient = ReturnType<typeof createCloudAPIClient>;
|
|
1443
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
|
|
1444
1839
|
//#region src/client/device-authorization.d.ts
|
|
1445
1840
|
declare const deviceCodeSchema: v.ObjectSchema<{
|
|
1446
1841
|
readonly device_code: v.StringSchema<undefined>;
|
|
@@ -1550,7 +1945,12 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1550
1945
|
requestRevision: number;
|
|
1551
1946
|
};
|
|
1552
1947
|
}>;
|
|
1553
|
-
|
|
1948
|
+
inviteEnrollments(signal?: AbortSignal): Promise<{
|
|
1949
|
+
invited: number;
|
|
1950
|
+
}>;
|
|
1951
|
+
users(request: AdminListRequest<CloudAdminUserFilter> & {
|
|
1952
|
+
method?: CloudAdminUserMethod;
|
|
1953
|
+
}, signal?: AbortSignal): Promise<{
|
|
1554
1954
|
total: number;
|
|
1555
1955
|
counts: {
|
|
1556
1956
|
all: number;
|
|
@@ -1566,6 +1966,8 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1566
1966
|
twoStep: boolean;
|
|
1567
1967
|
lastActiveAt: string | null;
|
|
1568
1968
|
workspaceCount: number;
|
|
1969
|
+
methods: string[];
|
|
1970
|
+
request?: "pending" | "rejected" | "revoked" | "approved" | null | undefined;
|
|
1569
1971
|
id: string;
|
|
1570
1972
|
name: string;
|
|
1571
1973
|
email: string;
|
|
@@ -1582,21 +1984,25 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1582
1984
|
twoStep: boolean;
|
|
1583
1985
|
lastActiveAt: string | null;
|
|
1584
1986
|
workspaceCount: number;
|
|
1987
|
+
methods: string[];
|
|
1988
|
+
request?: "pending" | "rejected" | "revoked" | "approved" | null | undefined;
|
|
1585
1989
|
id: string;
|
|
1586
1990
|
name: string;
|
|
1587
1991
|
email: string;
|
|
1588
1992
|
image: string | null;
|
|
1589
1993
|
};
|
|
1590
1994
|
methods: {
|
|
1995
|
+
id: string;
|
|
1591
1996
|
provider: string;
|
|
1592
1997
|
createdAt: string;
|
|
1998
|
+
canRemove: boolean;
|
|
1593
1999
|
}[];
|
|
1594
2000
|
authenticator: boolean;
|
|
1595
2001
|
passkeyCount: number;
|
|
1596
2002
|
sessions: {
|
|
1597
2003
|
id: string;
|
|
1598
2004
|
current: boolean;
|
|
1599
|
-
method: "password" | "
|
|
2005
|
+
method: "other" | "password" | "passkey" | "two-step" | "google" | "apple" | "github" | "email-link" | "desktop" | null;
|
|
1600
2006
|
ipAddress: string | null;
|
|
1601
2007
|
browser: string | null;
|
|
1602
2008
|
system: string | null;
|
|
@@ -1606,7 +2012,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1606
2012
|
}[];
|
|
1607
2013
|
signIns: {
|
|
1608
2014
|
id: string;
|
|
1609
|
-
method: "password" | "
|
|
2015
|
+
method: "other" | "password" | "passkey" | "two-step" | "google" | "apple" | "github" | "email-link" | "desktop";
|
|
1610
2016
|
ipAddress: string | null;
|
|
1611
2017
|
browser: string | null;
|
|
1612
2018
|
system: string | null;
|
|
@@ -1615,12 +2021,15 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1615
2021
|
workspaces: {
|
|
1616
2022
|
id: string;
|
|
1617
2023
|
name: string;
|
|
1618
|
-
role: "
|
|
2024
|
+
role: "viewer" | "editor" | "admin";
|
|
1619
2025
|
memberCount: number;
|
|
1620
2026
|
joinedAt: string;
|
|
1621
2027
|
}[];
|
|
1622
2028
|
}>;
|
|
1623
|
-
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<{
|
|
1624
2033
|
ok: true;
|
|
1625
2034
|
}>;
|
|
1626
2035
|
setAdmin(userId: string, enabled: boolean, signal?: AbortSignal): Promise<{
|
|
@@ -1655,9 +2064,9 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1655
2064
|
audit(request: AdminListRequest<CloudAdminAuditFilter>, signal?: AbortSignal): Promise<{
|
|
1656
2065
|
total: number;
|
|
1657
2066
|
counts: {
|
|
2067
|
+
all: number;
|
|
1658
2068
|
email: number;
|
|
1659
2069
|
documents: number;
|
|
1660
|
-
all: number;
|
|
1661
2070
|
accounts: number;
|
|
1662
2071
|
requests: number;
|
|
1663
2072
|
};
|
|
@@ -1680,14 +2089,14 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1680
2089
|
reports(request: AdminListRequest<CloudAdminReportFilter>, signal?: AbortSignal): Promise<{
|
|
1681
2090
|
total: number;
|
|
1682
2091
|
counts: {
|
|
1683
|
-
open: number;
|
|
1684
2092
|
all: number;
|
|
2093
|
+
open: number;
|
|
1685
2094
|
dismissed: number;
|
|
1686
2095
|
actioned: number;
|
|
1687
2096
|
};
|
|
1688
2097
|
reports: {
|
|
1689
2098
|
id: string;
|
|
1690
|
-
reason: "
|
|
2099
|
+
reason: "spam-phishing" | "illegal" | "copyright" | "harassment" | "other";
|
|
1691
2100
|
description: string;
|
|
1692
2101
|
status: "open" | "dismissed" | "actioned";
|
|
1693
2102
|
reporter: {
|
|
@@ -1700,6 +2109,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1700
2109
|
document: {
|
|
1701
2110
|
id: string;
|
|
1702
2111
|
name: string;
|
|
2112
|
+
kind: "design" | "board";
|
|
1703
2113
|
workspace: {
|
|
1704
2114
|
id: string;
|
|
1705
2115
|
name: string;
|
|
@@ -1716,6 +2126,12 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1716
2126
|
openReports: number;
|
|
1717
2127
|
purgedAt: string | null;
|
|
1718
2128
|
destroyedAt: string | null;
|
|
2129
|
+
revisionId: string | null;
|
|
2130
|
+
exposure: {
|
|
2131
|
+
community: boolean;
|
|
2132
|
+
links: number;
|
|
2133
|
+
editLinks: number;
|
|
2134
|
+
};
|
|
1719
2135
|
};
|
|
1720
2136
|
share: {
|
|
1721
2137
|
id: string;
|
|
@@ -1737,6 +2153,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1737
2153
|
documents: {
|
|
1738
2154
|
id: string;
|
|
1739
2155
|
name: string;
|
|
2156
|
+
kind: "design" | "board";
|
|
1740
2157
|
workspace: {
|
|
1741
2158
|
id: string;
|
|
1742
2159
|
name: string;
|
|
@@ -1753,6 +2170,50 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1753
2170
|
openReports: number;
|
|
1754
2171
|
purgedAt: string | null;
|
|
1755
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
|
+
};
|
|
1756
2217
|
}[];
|
|
1757
2218
|
}>;
|
|
1758
2219
|
documentAction(id: string, action: "disable" | "enable" | "undelete", reason?: string, signal?: AbortSignal): Promise<{
|
|
@@ -1774,6 +2235,12 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1774
2235
|
documents: number;
|
|
1775
2236
|
storedBytes: number;
|
|
1776
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
|
+
}>;
|
|
1777
2244
|
entitlements(signal?: AbortSignal): Promise<{
|
|
1778
2245
|
entitlements: {
|
|
1779
2246
|
features: {
|
|
@@ -1809,7 +2276,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1809
2276
|
image?: string | null | undefined;
|
|
1810
2277
|
deploymentRole?: "user" | "admin" | undefined;
|
|
1811
2278
|
};
|
|
1812
|
-
state: "active" | "pending" | "rejected" | "revoked" | "terms";
|
|
2279
|
+
state: "active" | "pending" | "rejected" | "revoked" | "two-step" | "terms";
|
|
1813
2280
|
}>;
|
|
1814
2281
|
acceptTerms(version: string, signal?: AbortSignal): Promise<{
|
|
1815
2282
|
ok: true;
|
|
@@ -1817,11 +2284,11 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1817
2284
|
authenticationMethods(signal?: AbortSignal): Promise<{
|
|
1818
2285
|
methods: {
|
|
1819
2286
|
id: string;
|
|
1820
|
-
provider: "google" | "apple" | "
|
|
2287
|
+
provider: "credential" | "google" | "apple" | "github";
|
|
1821
2288
|
createdAt: string;
|
|
1822
2289
|
canUnlink: boolean;
|
|
1823
2290
|
}[];
|
|
1824
|
-
availableSocialProviders: ("google" | "apple")[];
|
|
2291
|
+
availableSocialProviders: ("google" | "apple" | "github")[];
|
|
1825
2292
|
}>;
|
|
1826
2293
|
mfaStatus(signal?: AbortSignal): Promise<{
|
|
1827
2294
|
mfa: {
|
|
@@ -1863,7 +2330,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1863
2330
|
changePassword(currentPassword: string, newPassword: string, signal?: AbortSignal): Promise<{
|
|
1864
2331
|
ok: true;
|
|
1865
2332
|
}>;
|
|
1866
|
-
linkSocial(provider:
|
|
2333
|
+
linkSocial(provider: CloudSocialProvider$1, callbackURL: string, signal?: AbortSignal): Promise<{
|
|
1867
2334
|
url: string;
|
|
1868
2335
|
}>;
|
|
1869
2336
|
profile(signal?: AbortSignal): Promise<{
|
|
@@ -1919,7 +2386,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1919
2386
|
sessions: {
|
|
1920
2387
|
id: string;
|
|
1921
2388
|
current: boolean;
|
|
1922
|
-
method: "password" | "
|
|
2389
|
+
method: "other" | "password" | "passkey" | "two-step" | "google" | "apple" | "github" | "email-link" | "desktop" | null;
|
|
1923
2390
|
ipAddress: string | null;
|
|
1924
2391
|
browser: string | null;
|
|
1925
2392
|
system: string | null;
|
|
@@ -1937,7 +2404,7 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1937
2404
|
signIns(signal?: AbortSignal): Promise<{
|
|
1938
2405
|
signIns: {
|
|
1939
2406
|
id: string;
|
|
1940
|
-
method: "password" | "
|
|
2407
|
+
method: "other" | "password" | "passkey" | "two-step" | "google" | "apple" | "github" | "email-link" | "desktop";
|
|
1941
2408
|
ipAddress: string | null;
|
|
1942
2409
|
browser: string | null;
|
|
1943
2410
|
system: string | null;
|
|
@@ -1975,5 +2442,5 @@ declare function createCloudPortalClient(options?: CloudPortalClientOptions): {
|
|
|
1975
2442
|
};
|
|
1976
2443
|
type CloudPortalClient = ReturnType<typeof createCloudPortalClient>;
|
|
1977
2444
|
//#endregion
|
|
1978
|
-
export { type CloudAPIClient, CloudAPIError, type CloudAuthClient, type CloudAuthClientOptions, type CloudAuthFailure, type CloudAuthResult,
|
|
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 };
|
|
1979
2446
|
//# sourceMappingURL=client.d.ts.map
|