@open-pencil/cloud 0.17.0-beta.2 → 0.17.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/bin/server.mjs +1 -1
- package/dist/bin/server.mjs.map +1 -1
- package/dist/bin/{ai-relay.mjs → services.mjs} +9 -9
- package/dist/bin/services.mjs.map +1 -0
- package/dist/client.d.ts +525 -66
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1257 -654
- package/dist/client.js.map +1 -1
- package/dist/contract.d.ts +2 -2
- package/dist/contract.js +2 -2
- package/dist/contract2.js +1028 -481
- package/dist/contract2.js.map +1 -1
- package/dist/email.d.ts +1780 -31
- package/dist/email.d.ts.map +1 -1
- package/dist/email.js +3556 -325
- package/dist/email.js.map +1 -1
- package/dist/errors.d.ts +2 -0
- package/dist/errors.js +48 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +929 -72
- package/dist/index.d.ts.map +1 -1
- package/dist/index2.d.ts +35 -0
- package/dist/index2.d.ts.map +1 -0
- package/dist/listen.mjs +802 -927
- package/dist/listen.mjs.map +1 -1
- package/dist/runtime-cloudflare.d.ts +89 -0
- package/dist/runtime-cloudflare.d.ts.map +1 -0
- package/dist/runtime-cloudflare.js +15667 -0
- package/dist/runtime-cloudflare.js.map +1 -0
- package/dist/runtime-node.d.mts +7166 -3101
- package/dist/runtime-node.d.mts.map +1 -1
- package/dist/runtime-node.mjs +6 -5
- package/dist/runtime-node.mjs.map +1 -1
- package/dist/server.d.ts +6525 -2205
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +12500 -7613
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +8625 -2878
- package/dist/server.mjs.map +1 -1
- package/dist/server2.mjs +101 -79
- package/dist/server2.mjs.map +1 -1
- package/package.json +27 -9
- package/src/admin/api/routes.ts +59 -0
- package/src/admin/audit/service.ts +27 -8
- package/src/admin/documents/service.ts +431 -0
- package/src/admin/errors.ts +9 -1
- package/src/admin/index.ts +6 -0
- package/src/admin/operations/service.ts +7 -0
- package/src/admin/reports/service.ts +153 -0
- package/src/admin/schema.ts +6 -0
- package/src/client/api.ts +28 -461
- package/src/client/auth/client.ts +22 -3
- package/src/client/auth/navigation.ts +6 -5
- package/src/client/billing.ts +80 -0
- package/src/client/community.ts +40 -0
- package/src/client/discovery.ts +35 -9
- package/src/client/documents.ts +160 -0
- package/src/client/index.ts +14 -7
- package/src/client/portal/account.ts +79 -2
- package/src/client/portal/administration.ts +56 -0
- package/src/client/portal/request.ts +2 -0
- package/src/client/response.ts +21 -0
- package/src/client/schema.ts +8 -0
- package/src/client/services.ts +118 -0
- package/src/client/sharing.ts +262 -0
- package/src/client/versions.ts +104 -0
- package/src/contract/account.ts +108 -2
- package/src/contract/admin/index.ts +67 -3
- package/src/contract/billing.ts +166 -0
- package/src/contract/collaboration.ts +11 -1
- package/src/contract/community.ts +60 -0
- package/src/contract/discovery.ts +83 -4
- package/src/contract/documents.ts +27 -0
- package/src/contract/entitlements.ts +12 -2
- package/src/contract/index.ts +114 -39
- package/src/contract/links.ts +57 -4
- package/src/contract/locale.ts +27 -0
- package/src/contract/portal.ts +12 -1
- package/src/contract/relay.ts +6 -0
- package/src/contract/reports.ts +42 -0
- package/src/contract/routes.ts +10 -0
- package/src/contract/services.ts +235 -0
- package/src/contract/sharing.ts +3 -9
- package/src/email/i18n.ts +174 -0
- package/src/email/index.ts +13 -2
- package/src/email/locales/ar.json +141 -0
- package/src/email/locales/de.json +141 -0
- package/src/email/locales/es.json +141 -0
- package/src/email/locales/fr.json +141 -0
- package/src/email/locales/it.json +141 -0
- package/src/email/locales/ja.json +141 -0
- package/src/email/locales/pl.json +141 -0
- package/src/email/locales/pt-br.json +141 -0
- package/src/email/locales/ru.json +141 -0
- package/src/email/locales/zh-cn.json +141 -0
- package/src/email/messages.ts +200 -0
- package/src/email/render.ts +138 -246
- package/src/email/samples.ts +115 -0
- package/src/email/schema.ts +79 -5
- package/src/email/templates/BrandEmail.vue +54 -0
- package/src/email/templates/DocumentBlocked.vue +45 -0
- package/src/email/templates/DocumentInvitation.vue +24 -0
- package/src/email/templates/DocumentReport.vue +32 -0
- package/src/email/templates/DocumentReportDecided.vue +36 -0
- package/src/email/templates/DocumentReportReceived.vue +18 -0
- package/src/email/templates/DocumentRestored.vue +24 -0
- package/src/email/templates/EmailChangeRequested.vue +24 -0
- package/src/email/templates/EmailRoot.vue +19 -0
- package/src/email/templates/EmailText.vue +9 -0
- package/src/email/templates/EmailVerification.vue +38 -0
- package/src/email/templates/EnrollmentNotification.vue +24 -0
- package/src/email/templates/EnrollmentUpdate.vue +52 -0
- package/src/email/templates/NewSignIn.vue +37 -0
- package/src/email/templates/PasswordChanged.vue +22 -0
- package/src/email/templates/PasswordReset.vue +23 -0
- package/src/email/templates/StorageLimitReached.vue +28 -0
- package/src/email/templates/TwoStepChanged.vue +32 -0
- package/src/email/templates/WaitlistConfirmation.vue +29 -0
- package/src/email/templates/WorkspaceInvitation.vue +28 -0
- package/src/email/templates/brand.ts +9 -61
- package/src/email/templates/localization.ts +17 -0
- package/src/errors/index.ts +6 -0
- package/src/errors/posthog.ts +80 -0
- package/src/global.d.ts +7 -0
- package/src/runtime/cloudflare/environment.ts +22 -11
- package/src/runtime/cloudflare/index.ts +1 -1
- package/src/runtime/cloudflare/logging.ts +15 -0
- package/src/runtime/cloudflare/maintenance.ts +31 -0
- package/src/runtime/cloudflare/relay/index.ts +69 -15
- package/src/runtime/cloudflare/tsconfig.json +2 -1
- package/src/runtime/cloudflare/worker.ts +46 -13
- package/src/runtime/node/application.ts +5 -3
- package/src/runtime/node/bootstrap.ts +15 -4
- package/src/runtime/node/cleanup.ts +20 -3
- package/src/runtime/node/email/transport.ts +13 -10
- package/src/runtime/node/entitlements/main.ts +14 -11
- package/src/runtime/node/index.ts +1 -1
- package/src/runtime/node/main.ts +1 -1
- package/src/runtime/node/migrate.ts +5 -1
- package/src/runtime/node/relay.ts +8 -2
- package/src/runtime/node/request-id.ts +13 -0
- package/src/runtime/node/server.ts +50 -16
- package/src/runtime/node/{ai-relay → services}/main.ts +7 -7
- package/src/runtime/node/{ai-relay → services}/server.ts +18 -18
- package/src/runtime/postgres/database.ts +20 -1
- package/src/runtime/posthog/errors.ts +15 -30
- package/src/runtime/s3/objects.ts +41 -1
- package/src/runtime/site/community.ts +101 -0
- package/src/runtime/site/server.ts +49 -6
- package/src/server/account/actions.ts +5 -0
- package/src/server/account/deletion.ts +304 -0
- package/src/server/account/routes.ts +281 -206
- package/src/server/account/terms.ts +42 -0
- package/src/server/account/tokens.ts +57 -0
- package/src/server/api/router.ts +32 -5
- package/src/server/api/types.ts +2 -0
- package/src/server/app/checks.ts +84 -0
- package/src/server/app/editors.ts +20 -0
- package/src/server/app/index.ts +128 -0
- package/src/server/app/indexing.ts +40 -0
- package/src/server/app/limiters.ts +53 -0
- package/src/server/app/routes.ts +114 -0
- package/src/server/app/services.ts +185 -0
- package/src/server/auth/access-control.ts +63 -0
- package/src/server/auth/access-tokens.ts +62 -0
- package/src/server/auth/adapter.ts +32 -1
- package/src/server/auth/email.ts +4 -1
- package/src/server/auth/endpoints.ts +5 -1
- package/src/server/auth/enrollment.ts +116 -0
- package/src/server/auth/factory.ts +116 -132
- package/src/server/auth/index.ts +10 -1
- package/src/server/auth/logger.ts +23 -0
- package/src/server/auth/mfa-assurance.ts +51 -0
- package/src/server/auth/passwords.ts +43 -0
- package/src/server/auth/session.ts +2 -0
- package/src/server/billing/index.ts +6 -0
- package/src/server/billing/routes.ts +27 -0
- package/src/server/billing/tokens.ts +37 -0
- package/src/server/cleanup/configured.ts +27 -7
- package/src/server/cleanup/documents.ts +165 -71
- package/src/server/cleanup/revisions.ts +16 -5
- package/src/server/cleanup/uploads.ts +8 -2
- package/src/server/cleanup/worker.ts +15 -3
- package/src/server/collaboration/relay/connection.ts +4 -3
- package/src/server/collaboration/relay/documents.ts +13 -10
- package/src/server/collaboration/relay/hub.ts +77 -122
- package/src/server/collaboration/relay/log.ts +5 -2
- package/src/server/collaboration/relay/room.ts +154 -0
- package/src/server/collaboration/service.ts +48 -33
- package/src/server/community/index.ts +2 -0
- package/src/server/community/routes.ts +93 -0
- package/src/server/community/service.ts +134 -0
- package/src/server/config/deployment.ts +41 -9
- package/src/server/config/index.ts +1 -1
- package/src/server/config/public.ts +11 -4
- package/src/server/config/schema.ts +91 -277
- package/src/server/config/toml/schema.ts +307 -0
- package/src/server/db/expressions.ts +15 -1
- package/src/server/db/index.ts +1 -0
- package/src/server/db/migrate.ts +46 -116
- package/src/server/db/migrations/001_accounts.ts +79 -0
- package/src/server/db/migrations/002_workspaces.ts +48 -0
- package/src/server/db/migrations/003_storage.ts +44 -0
- package/src/server/db/migrations/004_documents.ts +193 -0
- package/src/server/db/migrations/005_sharing.ts +95 -0
- package/src/server/db/migrations/006_operations.ts +110 -0
- package/src/server/db/migrations/007_trash.ts +33 -0
- package/src/server/db/migrations/008_terms.ts +18 -0
- package/src/server/db/migrations/009_access_tokens.ts +47 -0
- package/src/server/db/migrations/010_storage_limit_notices.ts +50 -0
- package/src/server/db/migrations/011_account_ids.ts +30 -0
- package/src/server/db/migrations/012_email_locales.ts +34 -0
- package/src/server/db/migrations/013_document_block_emails.ts +40 -0
- package/src/server/db/migrations/014_report_replies.ts +28 -0
- package/src/server/db/migrations/schema.ts +96 -0
- package/src/server/db/tables.ts +82 -4
- package/src/server/db/users.ts +22 -0
- package/src/server/documents/access.ts +66 -55
- package/src/server/documents/errors.ts +7 -0
- package/src/server/documents/images.ts +2 -1
- package/src/server/documents/index.ts +1 -1
- package/src/server/documents/limits.ts +14 -8
- package/src/server/documents/purge.ts +75 -0
- package/src/server/documents/repository.ts +2 -0
- package/src/server/documents/routes.ts +26 -0
- package/src/server/documents/service.ts +30 -406
- package/src/server/documents/summary.ts +1 -0
- package/src/server/documents/trash.ts +203 -0
- package/src/server/documents/uploads.ts +450 -0
- package/src/server/documents/versions/checkpoint.ts +2 -1
- package/src/server/documents/versions/history.ts +11 -7
- package/src/server/documents/versions/service.ts +94 -28
- package/src/server/email/invitations.ts +1 -0
- package/src/server/email/service.ts +31 -4
- package/src/server/email/types.ts +12 -0
- package/src/server/errors/index.ts +51 -16
- package/src/server/index.ts +52 -16
- package/src/server/internal/index.ts +3 -3
- package/src/server/internal/routes.ts +7 -10
- package/src/server/internal/schema.ts +1 -1
- package/src/server/internal/service.ts +17 -23
- package/src/server/invitations/budget.ts +66 -0
- package/src/server/invitations/index.ts +1 -0
- package/src/server/invitations/types.ts +5 -1
- package/src/server/logging.ts +76 -0
- package/src/server/objects/types.ts +5 -0
- package/src/server/pictures/service.ts +2 -1
- package/src/server/policy/configured.ts +9 -3
- package/src/server/policy/database.ts +52 -27
- package/src/server/policy/index.ts +2 -1
- package/src/server/policy/keys.ts +5 -2
- package/src/server/policy/policy.ts +40 -12
- package/src/server/policy/schema.ts +2 -2
- package/src/server/policy/service.ts +78 -56
- package/src/server/policy/static.ts +5 -5
- package/src/server/policy/storage.ts +33 -0
- package/src/server/policy/workspace.ts +41 -0
- package/src/server/quota/index.ts +6 -0
- package/src/server/quota/notices.ts +121 -0
- package/src/server/quota/reconcile.ts +2 -0
- package/src/server/quota/storage.ts +74 -31
- package/src/server/rate-limit/cleanup.ts +17 -5
- package/src/server/rate-limit/middleware.ts +6 -2
- package/src/server/reports/index.ts +9 -0
- package/src/server/reports/replies.ts +55 -0
- package/src/server/reports/routes.ts +39 -0
- package/src/server/reports/service.ts +145 -0
- package/src/server/services/errors.ts +7 -0
- package/src/server/services/index.ts +8 -0
- package/src/server/{ai → services}/keys.ts +11 -11
- package/src/server/services/routes.ts +47 -0
- package/src/server/{ai/service.ts → services/tokens.ts} +23 -20
- package/src/server/sharing/capabilities/service.ts +68 -23
- package/src/server/sharing/grants/service.ts +11 -18
- package/src/server/sharing/http.ts +4 -0
- package/src/server/sharing/invitations/service.ts +35 -15
- package/src/server/sharing/policy.ts +9 -14
- package/src/server/sharing/routes.ts +0 -16
- package/src/server/sharing/service.ts +1 -17
- package/src/server/validation.ts +4 -0
- package/src/server/workspaces/index.ts +1 -0
- package/src/server/workspaces/members.ts +91 -52
- package/src/server/workspaces/repository.ts +2 -1
- package/src/server/workspaces/routes.ts +4 -0
- package/src/{ai-relay → services}/app.ts +46 -44
- package/src/{ai-relay → services}/config.ts +26 -19
- package/src/services/db/index.ts +10 -0
- package/src/services/db/migrate.ts +37 -0
- package/src/{ai-relay/db/migrations/001_usage.ts → services/db/migrations/001_baseline.ts} +18 -7
- package/src/services/db/schema.ts +22 -0
- package/src/services/index.ts +18 -0
- package/src/{ai-relay → services}/metering.ts +2 -2
- package/src/{ai-relay → services}/usage.ts +35 -19
- package/dist/bin/ai-relay.mjs.map +0 -1
- package/src/ai-relay/db/index.ts +0 -10
- package/src/ai-relay/db/migrate.ts +0 -32
- package/src/ai-relay/db/schema.ts +0 -20
- package/src/ai-relay/index.ts +0 -18
- package/src/client/ai.ts +0 -96
- package/src/contract/ai.ts +0 -150
- package/src/email/templates/document-invitation.ts +0 -35
- package/src/email/templates/enrollment.ts +0 -27
- package/src/email/templates/layout.ts +0 -18
- package/src/server/ai/errors.ts +0 -7
- package/src/server/ai/index.ts +0 -4
- package/src/server/ai/routes.ts +0 -43
- package/src/server/app.ts +0 -379
- package/src/server/auth/workspace-access.ts +0 -23
- package/src/server/db/migrations/001_foundation.ts +0 -164
- package/src/server/db/migrations/002_upload_cleanup_claims.ts +0 -34
- package/src/server/db/migrations/003_document_cleanup_claims.ts +0 -23
- package/src/server/db/migrations/004_document_sharing.ts +0 -82
- package/src/server/db/migrations/005_document_collaboration_epoch.ts +0 -13
- package/src/server/db/migrations/006_invitation_continuation.ts +0 -27
- package/src/server/db/migrations/007_collaboration_state.ts +0 -25
- package/src/server/db/migrations/008_storage_reservations.ts +0 -37
- package/src/server/db/migrations/009_workspace_entitlements.ts +0 -22
- package/src/server/db/migrations/010_upload_finalization.ts +0 -22
- package/src/server/db/migrations/011_upload_finalization_lease.ts +0 -12
- package/src/server/db/migrations/012_transactional_email.ts +0 -48
- package/src/server/db/migrations/013_admin_enrollment.ts +0 -54
- package/src/server/db/migrations/014_enrollment_email_kinds.ts +0 -30
- package/src/server/db/migrations/015_cloud_rate_limit.ts +0 -22
- package/src/server/db/migrations/016_auth_schema.ts +0 -16
- package/src/server/db/migrations/017_authentication_email_kinds.ts +0 -32
- package/src/server/db/migrations/018_authentication_mfa.ts +0 -78
- package/src/server/db/migrations/019_better_auth_account_issuer.ts +0 -42
- package/src/server/db/migrations/020_workspace_invitations.ts +0 -57
- package/src/server/db/migrations/021_document_versions.ts +0 -66
- package/src/server/db/migrations/022_entitlement_external_version.ts +0 -17
- package/src/server/db/migrations/023_document_images.ts +0 -61
- package/src/server/db/migrations/024_account_activity.ts +0 -66
- package/src/server/db/migrations/025_table_names.ts +0 -58
- package/src/server/db/migrations/026_user_picture.ts +0 -30
- package/src/server/db/migrations/027_document_kind.ts +0 -19
- package/src/server/db/migrations/028_collaboration_updates.ts +0 -84
- package/src/server/db/migrations/helpers.ts +0 -78
- /package/dist/bin/{ai-relay.d.mts → services.d.mts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import * as Y from "yjs";
|
|
3
|
+
import { Hono, TypedResponse } from "hono";
|
|
4
|
+
import { BlankEnv, BlankInput, ToSchema } from "hono/types";
|
|
3
5
|
//#region src/contract/account.d.ts
|
|
4
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Where an account stands: it may use the server, waits for an administrator, was refused or had
|
|
8
|
+
* its access taken back, or has to accept the server's current terms first.
|
|
9
|
+
*/
|
|
10
|
+
declare const cloudAccountStateSchema: v.PicklistSchema<["active", "pending", "rejected", "revoked", "terms"], undefined>;
|
|
5
11
|
declare const cloudIdentitySchema: v.ObjectSchema<{
|
|
6
12
|
readonly userId: v.StringSchema<undefined>;
|
|
7
13
|
readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
|
|
@@ -19,7 +25,11 @@ declare const cloudAccountStatusResponseSchema: v.ObjectSchema<{
|
|
|
19
25
|
readonly image: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
20
26
|
readonly deploymentRole: v.OptionalSchema<v.PicklistSchema<["user", "admin"], undefined>, undefined>;
|
|
21
27
|
}, undefined>;
|
|
22
|
-
readonly state: v.PicklistSchema<["active", "pending", "rejected", "revoked"], undefined>;
|
|
28
|
+
readonly state: v.PicklistSchema<["active", "pending", "rejected", "revoked", "terms"], undefined>;
|
|
29
|
+
}, undefined>;
|
|
30
|
+
/** Accepting the server's terms: the version the person read, which must be the current one. */
|
|
31
|
+
declare const cloudTermsAcceptanceSchema: v.ObjectSchema<{
|
|
32
|
+
readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
23
33
|
}, undefined>;
|
|
24
34
|
declare const cloudAuthenticationProviderSchema: v.PicklistSchema<["credential", "google", "apple"], undefined>;
|
|
25
35
|
declare const cloudAuthenticationMethodSchema: v.ObjectSchema<{
|
|
@@ -51,10 +61,10 @@ declare const cloudSocialLinkResponseSchema: v.ObjectSchema<{
|
|
|
51
61
|
declare const cloudUnlinkAuthenticationMethodSchema: v.ObjectSchema<{
|
|
52
62
|
readonly methodId: v.StringSchema<undefined>;
|
|
53
63
|
}, undefined>;
|
|
54
|
-
declare const accountSecurityErrorCodeSchema: v.PicklistSchema<["current_password_invalid", "password_too_short", "password_too_long", "last_authentication_method", "session_not_fresh", "authentication_method_failed", "email_unchanged", "email_change_unavailable", "current_session", "picture_invalid"], undefined>;
|
|
64
|
+
declare const accountSecurityErrorCodeSchema: v.PicklistSchema<["current_password_invalid", "password_too_short", "password_too_long", "last_authentication_method", "session_not_fresh", "authentication_method_failed", "email_unchanged", "email_change_unavailable", "current_session", "picture_invalid", "account_sole_admin", "last_admin_required", "terms_changed"], undefined>;
|
|
55
65
|
declare const accountSecurityErrorResponseSchema: v.ObjectSchema<{
|
|
56
66
|
readonly error: v.ObjectSchema<{
|
|
57
|
-
readonly code: v.PicklistSchema<["current_password_invalid", "password_too_short", "password_too_long", "last_authentication_method", "session_not_fresh", "authentication_method_failed", "email_unchanged", "email_change_unavailable", "current_session", "picture_invalid"], undefined>;
|
|
67
|
+
readonly code: v.PicklistSchema<["current_password_invalid", "password_too_short", "password_too_long", "last_authentication_method", "session_not_fresh", "authentication_method_failed", "email_unchanged", "email_change_unavailable", "current_session", "picture_invalid", "account_sole_admin", "last_admin_required", "terms_changed"], undefined>;
|
|
58
68
|
}, undefined>;
|
|
59
69
|
}, undefined>;
|
|
60
70
|
declare const cloudMFAStatusSchema: v.ObjectSchema<{
|
|
@@ -108,6 +118,64 @@ declare const cloudPasskeysResponseSchema: v.ObjectSchema<{
|
|
|
108
118
|
declare const cloudPasskeyDeleteSchema: v.ObjectSchema<{
|
|
109
119
|
readonly id: v.StringSchema<undefined>;
|
|
110
120
|
}, undefined>;
|
|
121
|
+
/**
|
|
122
|
+
* Personal access tokens: an account's own credentials for scripts and CI, sent as
|
|
123
|
+
* `Authorization: Bearer <token>`. A token acts as its account on the document API only; it never
|
|
124
|
+
* changes how the account is reached, makes other tokens, or reaches administration.
|
|
125
|
+
*/
|
|
126
|
+
declare const CLOUD_ACCESS_TOKEN_PREFIX = "opc_";
|
|
127
|
+
declare const CLOUD_ACCESS_TOKEN_NAME_MAX_LENGTH = 64;
|
|
128
|
+
declare const CLOUD_ACCESS_TOKEN_MAX_DAYS = 365;
|
|
129
|
+
declare const cloudAccessTokenSchema: v.ObjectSchema<{
|
|
130
|
+
readonly id: v.StringSchema<undefined>;
|
|
131
|
+
readonly name: v.StringSchema<undefined>;
|
|
132
|
+
/** The token's first characters, prefix included, to tell tokens apart; never the whole token. */
|
|
133
|
+
readonly start: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
134
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
135
|
+
readonly expiresAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
136
|
+
readonly lastUsedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
137
|
+
}, undefined>;
|
|
138
|
+
declare const cloudAccessTokensResponseSchema: v.ObjectSchema<{
|
|
139
|
+
readonly tokens: v.ArraySchema<v.ObjectSchema<{
|
|
140
|
+
readonly id: v.StringSchema<undefined>;
|
|
141
|
+
readonly name: v.StringSchema<undefined>;
|
|
142
|
+
/** The token's first characters, prefix included, to tell tokens apart; never the whole token. */
|
|
143
|
+
readonly start: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
144
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
145
|
+
readonly expiresAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
146
|
+
readonly lastUsedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
147
|
+
}, undefined>, undefined>;
|
|
148
|
+
}, undefined>;
|
|
149
|
+
declare const cloudAccessTokenCreateSchema: v.ObjectSchema<{
|
|
150
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
151
|
+
readonly expiresInDays: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 365, undefined>]>;
|
|
152
|
+
}, undefined>;
|
|
153
|
+
/** A new token, the only time the whole of it is shown. */
|
|
154
|
+
declare const cloudAccessTokenCreatedResponseSchema: v.ObjectSchema<{
|
|
155
|
+
readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "opc_", undefined>]>;
|
|
156
|
+
readonly accessToken: v.ObjectSchema<{
|
|
157
|
+
readonly id: v.StringSchema<undefined>;
|
|
158
|
+
readonly name: v.StringSchema<undefined>;
|
|
159
|
+
/** The token's first characters, prefix included, to tell tokens apart; never the whole token. */
|
|
160
|
+
readonly start: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
161
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
162
|
+
readonly expiresAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
163
|
+
readonly lastUsedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
164
|
+
}, undefined>;
|
|
165
|
+
}, undefined>;
|
|
166
|
+
declare const cloudAccessTokenRevokeSchema: v.ObjectSchema<{
|
|
167
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
168
|
+
}, undefined>;
|
|
169
|
+
declare function parseCloudAccessTokenCreate(input: unknown): {
|
|
170
|
+
name: string;
|
|
171
|
+
expiresInDays: number;
|
|
172
|
+
};
|
|
173
|
+
declare function parseCloudAccessTokenRevoke(input: unknown): {
|
|
174
|
+
id: string;
|
|
175
|
+
};
|
|
176
|
+
declare function parseCloudTermsAcceptance(input: unknown): {
|
|
177
|
+
version: string;
|
|
178
|
+
};
|
|
111
179
|
declare function parseCloudMFAEnable(input: unknown): {
|
|
112
180
|
password?: string | undefined;
|
|
113
181
|
};
|
|
@@ -234,6 +302,71 @@ declare const cloudSignInsResponseSchema: v.ObjectSchema<{
|
|
|
234
302
|
readonly createdAt: v.StringSchema<undefined>;
|
|
235
303
|
}, undefined>, undefined>;
|
|
236
304
|
}, undefined>;
|
|
305
|
+
/** A workspace an account deletion reads: one it would delete, or one that stops it. */
|
|
306
|
+
declare const cloudAccountDeletionWorkspaceSchema: v.ObjectSchema<{
|
|
307
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
308
|
+
readonly name: v.StringSchema<undefined>;
|
|
309
|
+
}, undefined>;
|
|
310
|
+
/** A document the account would lose, which Download all saves first. */
|
|
311
|
+
declare const cloudAccountDeletionDocumentSchema: v.ObjectSchema<{
|
|
312
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
313
|
+
readonly name: v.StringSchema<undefined>;
|
|
314
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
315
|
+
}, undefined>;
|
|
316
|
+
/**
|
|
317
|
+
* What deleting the account takes: the workspaces only it belongs to, which go with their
|
|
318
|
+
* documents; the ones it leaves to their other members; the ones it alone administers for other
|
|
319
|
+
* members, which stop the deletion until it makes someone else an admin; and the documents it
|
|
320
|
+
* would lose, those workspaces' and the ones it created in workspaces it leaves.
|
|
321
|
+
*/
|
|
322
|
+
declare const cloudAccountDeletionSchema: v.ObjectSchema<{
|
|
323
|
+
/** The account is the deployment's only administrator, which also stops the deletion. */
|
|
324
|
+
readonly lastAdministrator: v.BooleanSchema<undefined>;
|
|
325
|
+
readonly blockedBy: v.ArraySchema<v.ObjectSchema<{
|
|
326
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
327
|
+
readonly name: v.StringSchema<undefined>;
|
|
328
|
+
}, undefined>, undefined>;
|
|
329
|
+
readonly deletes: v.ArraySchema<v.ObjectSchema<{
|
|
330
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
331
|
+
readonly name: v.StringSchema<undefined>;
|
|
332
|
+
}, undefined>, undefined>;
|
|
333
|
+
readonly leaves: v.ArraySchema<v.ObjectSchema<{
|
|
334
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
335
|
+
readonly name: v.StringSchema<undefined>;
|
|
336
|
+
}, undefined>, undefined>;
|
|
337
|
+
readonly documents: v.ArraySchema<v.ObjectSchema<{
|
|
338
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
339
|
+
readonly name: v.StringSchema<undefined>;
|
|
340
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
341
|
+
}, undefined>, undefined>;
|
|
342
|
+
}, undefined>;
|
|
343
|
+
declare const cloudAccountDeletionResponseSchema: v.ObjectSchema<{
|
|
344
|
+
readonly deletion: v.ObjectSchema<{
|
|
345
|
+
/** The account is the deployment's only administrator, which also stops the deletion. */
|
|
346
|
+
readonly lastAdministrator: v.BooleanSchema<undefined>;
|
|
347
|
+
readonly blockedBy: v.ArraySchema<v.ObjectSchema<{
|
|
348
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
349
|
+
readonly name: v.StringSchema<undefined>;
|
|
350
|
+
}, undefined>, undefined>;
|
|
351
|
+
readonly deletes: v.ArraySchema<v.ObjectSchema<{
|
|
352
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
353
|
+
readonly name: v.StringSchema<undefined>;
|
|
354
|
+
}, undefined>, undefined>;
|
|
355
|
+
readonly leaves: v.ArraySchema<v.ObjectSchema<{
|
|
356
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
357
|
+
readonly name: v.StringSchema<undefined>;
|
|
358
|
+
}, undefined>, undefined>;
|
|
359
|
+
readonly documents: v.ArraySchema<v.ObjectSchema<{
|
|
360
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
361
|
+
readonly name: v.StringSchema<undefined>;
|
|
362
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
363
|
+
}, undefined>, undefined>;
|
|
364
|
+
}, undefined>;
|
|
365
|
+
}, undefined>;
|
|
366
|
+
/** The password, for a session that signed in too long ago to delete the account on its own. */
|
|
367
|
+
declare const cloudAccountDeleteSchema: v.ObjectSchema<{
|
|
368
|
+
readonly password: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
369
|
+
}, undefined>;
|
|
237
370
|
declare function parseCloudProfileUpdate(input: unknown): {
|
|
238
371
|
name: string;
|
|
239
372
|
};
|
|
@@ -244,6 +377,9 @@ declare function parseCloudEmailChange(input: unknown): {
|
|
|
244
377
|
newEmail: string;
|
|
245
378
|
callbackURL: string;
|
|
246
379
|
};
|
|
380
|
+
declare function parseCloudAccountDelete(input: unknown): {
|
|
381
|
+
password?: string | undefined;
|
|
382
|
+
};
|
|
247
383
|
declare function parseCloudSessionRevoke(input: unknown): {
|
|
248
384
|
sessionId: string;
|
|
249
385
|
};
|
|
@@ -253,65 +389,89 @@ type CloudAuthenticationMethod = v.InferOutput<typeof cloudAuthenticationMethodS
|
|
|
253
389
|
type CloudAuthenticationMethods = v.InferOutput<typeof cloudAuthenticationMethodsResponseSchema>;
|
|
254
390
|
type CloudAccountStatus = v.InferOutput<typeof cloudAccountStatusResponseSchema>;
|
|
255
391
|
type CloudProfile = v.InferOutput<typeof cloudProfileSchema>;
|
|
392
|
+
type CloudAccessToken = v.InferOutput<typeof cloudAccessTokenSchema>;
|
|
393
|
+
type CloudAccessTokenCreate = v.InferOutput<typeof cloudAccessTokenCreateSchema>;
|
|
256
394
|
type CloudSignInMethod = v.InferOutput<typeof cloudSignInMethodSchema>;
|
|
257
395
|
type CloudAccountSession = v.InferOutput<typeof cloudAccountSessionSchema>;
|
|
258
396
|
type CloudSignIn = v.InferOutput<typeof cloudSignInSchema>;
|
|
397
|
+
type CloudAccountDeletion = v.InferOutput<typeof cloudAccountDeletionSchema>;
|
|
259
398
|
//#endregion
|
|
260
|
-
//#region src/contract/
|
|
399
|
+
//#region src/contract/locale.d.ts
|
|
261
400
|
/**
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
* the credit wallet. It is versioned apart from the Cloud protocol so a service can change without
|
|
265
|
-
* a Cloud release.
|
|
401
|
+
* A language as the app names it, which the server writes email in when it has that language, or
|
|
402
|
+
* the nearest it has, and otherwise in English.
|
|
266
403
|
*/
|
|
267
|
-
declare const
|
|
268
|
-
/** The
|
|
269
|
-
declare const
|
|
270
|
-
|
|
271
|
-
|
|
404
|
+
declare const cloudLanguageTagSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 35, undefined>, v.CheckAction<string, "Not a language tag">]>;
|
|
405
|
+
/** The language an account's email is written in, as the app last said it uses. */
|
|
406
|
+
declare const cloudLocaleUpdateSchema: v.ObjectSchema<{
|
|
407
|
+
readonly locale: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 35, undefined>, v.CheckAction<string, "Not a language tag">]>;
|
|
408
|
+
}, undefined>;
|
|
409
|
+
declare function parseCloudLocaleUpdate(input: unknown): {
|
|
410
|
+
locale: string;
|
|
411
|
+
};
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/contract/routes.d.ts
|
|
414
|
+
/** A route's input, and the JSON it answers with a 200, as a contract's typed Hono schema names it. */
|
|
415
|
+
type JSONRoute<Method extends string, Path extends string, Input extends BlankInput, Output> = ToSchema<Method, Path, Input, TypedResponse<Output, 200, 'json'>>;
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region src/contract/services.d.ts
|
|
418
|
+
/**
|
|
419
|
+
* The contract between editors, Cloud, and the services Cloud advertises: AI models today, and
|
|
420
|
+
* other paid capabilities such as image generation and search as they arrive. Cloud only
|
|
421
|
+
* advertises the service and signs short-lived tokens for it; the service, official or
|
|
422
|
+
* self-hosted, calls the providers and keeps the credit wallet. It is versioned apart from the
|
|
423
|
+
* Cloud protocol so a service can change without a Cloud release.
|
|
424
|
+
*/
|
|
425
|
+
declare const CLOUD_SERVICES_CONTRACT_VERSION: "1";
|
|
426
|
+
/** The `aud` of every token Cloud signs for its services. */
|
|
427
|
+
declare const CLOUD_SERVICES_TOKEN_AUDIENCE: "openpencil-services";
|
|
428
|
+
/** Where Cloud publishes the public keys a service verifies its tokens with. */
|
|
429
|
+
declare const CLOUD_SERVICES_JWKS_PATH: "/.well-known/jwks.json";
|
|
272
430
|
/**
|
|
273
431
|
* Where a service answers, below the discovered `endpoint`. Model requests follow the OpenAI chat
|
|
274
432
|
* completions API, so an OpenAI-compatible client takes `${endpoint}${base}` as its base URL.
|
|
275
433
|
*/
|
|
276
|
-
declare const
|
|
434
|
+
declare const CLOUD_SERVICES_API_PATHS: {
|
|
277
435
|
readonly base: "/v1";
|
|
278
436
|
readonly chatCompletions: "/v1/chat/completions";
|
|
279
437
|
readonly catalog: "/v1/catalog";
|
|
280
438
|
readonly wallet: "/v1/wallet";
|
|
281
439
|
readonly usage: "/v1/usage";
|
|
440
|
+
readonly search: "/v1/search";
|
|
282
441
|
};
|
|
283
|
-
declare const
|
|
442
|
+
declare const cloudServicesDiscoverySchema: v.ObjectSchema<{
|
|
284
443
|
readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
285
444
|
readonly contractVersion: v.LiteralSchema<"1", undefined>;
|
|
286
445
|
}, undefined>;
|
|
287
|
-
type
|
|
288
|
-
declare const
|
|
289
|
-
readonly portalURL: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
290
|
-
}, undefined>;
|
|
291
|
-
type CloudBillingDiscovery = v.InferOutput<typeof cloudBillingDiscoverySchema>;
|
|
292
|
-
declare const createAITokenSchema: v.ObjectSchema<{
|
|
446
|
+
type CloudServicesDiscovery = v.InferOutput<typeof cloudServicesDiscoverySchema>;
|
|
447
|
+
declare const createServicesTokenSchema: v.ObjectSchema<{
|
|
293
448
|
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
294
449
|
}, undefined>;
|
|
295
|
-
type
|
|
296
|
-
declare function
|
|
297
|
-
declare const
|
|
450
|
+
type CreateServicesTokenInput = v.InferOutput<typeof createServicesTokenSchema>;
|
|
451
|
+
declare function parseCreateServicesToken(input: unknown): CreateServicesTokenInput;
|
|
452
|
+
declare const servicesTokenSchema: v.ObjectSchema<{
|
|
298
453
|
readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
299
454
|
readonly expiresAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
300
455
|
}, undefined>;
|
|
301
|
-
type
|
|
302
|
-
/** What
|
|
303
|
-
declare const
|
|
456
|
+
type ServicesToken = v.InferOutput<typeof servicesTokenSchema>;
|
|
457
|
+
/** What a service may rely on once a token's signature, issuer, audience, and expiry check. */
|
|
458
|
+
declare const servicesTokenClaimsSchema: v.ObjectSchema<{
|
|
304
459
|
readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
305
|
-
readonly aud: v.LiteralSchema<"openpencil-
|
|
460
|
+
readonly aud: v.LiteralSchema<"openpencil-services", undefined>;
|
|
306
461
|
readonly sub: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
307
462
|
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
308
|
-
/**
|
|
463
|
+
/**
|
|
464
|
+
* The account whose credits the request spends: the workspace's owner, whose allowance every
|
|
465
|
+
* workspace they own shares.
|
|
466
|
+
*/
|
|
467
|
+
readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
468
|
+
/** Credits the owner's plan grants each month; `null` when Cloud sets no allowance. */
|
|
309
469
|
readonly monthlyCreditAllowance: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
310
470
|
readonly iat: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
311
471
|
readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
312
472
|
}, undefined>;
|
|
313
|
-
type
|
|
314
|
-
declare const
|
|
473
|
+
type ServicesTokenClaims = v.InferOutput<typeof servicesTokenClaimsSchema>;
|
|
474
|
+
declare const chatModelSchema: v.ObjectSchema<{
|
|
315
475
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
316
476
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
317
477
|
/** Credits per million input and output tokens. */
|
|
@@ -324,8 +484,13 @@ declare const aiModelSchema: v.ObjectSchema<{
|
|
|
324
484
|
readonly tools: v.BooleanSchema<undefined>;
|
|
325
485
|
}, undefined>;
|
|
326
486
|
}, undefined>;
|
|
327
|
-
type
|
|
328
|
-
|
|
487
|
+
type ChatModel = v.InferOutput<typeof chatModelSchema>;
|
|
488
|
+
/** What one web search costs; a service without search leaves it out of its catalog. */
|
|
489
|
+
declare const searchPricingSchema: v.ObjectSchema<{
|
|
490
|
+
readonly creditsPerRequest: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
491
|
+
}, undefined>;
|
|
492
|
+
type SearchPricing = v.InferOutput<typeof searchPricingSchema>;
|
|
493
|
+
declare const serviceCatalogSchema: v.ObjectSchema<{
|
|
329
494
|
readonly models: v.ArraySchema<v.ObjectSchema<{
|
|
330
495
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
331
496
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -340,19 +505,22 @@ declare const aiCatalogSchema: v.ObjectSchema<{
|
|
|
340
505
|
}, undefined>;
|
|
341
506
|
}, undefined>, undefined>;
|
|
342
507
|
readonly defaultModelID: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
508
|
+
readonly search: v.OptionalSchema<v.ObjectSchema<{
|
|
509
|
+
readonly creditsPerRequest: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
510
|
+
}, undefined>, undefined>;
|
|
343
511
|
}, undefined>;
|
|
344
|
-
type
|
|
345
|
-
declare const
|
|
512
|
+
type ServiceCatalog = v.InferOutput<typeof serviceCatalogSchema>;
|
|
513
|
+
declare const creditBucketSchema: v.ObjectSchema<{
|
|
346
514
|
readonly kind: v.PicklistSchema<["allowance", "purchased", "grant"], undefined>;
|
|
347
515
|
readonly remaining: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
348
516
|
readonly expiresAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
349
517
|
}, undefined>;
|
|
350
|
-
type
|
|
518
|
+
type CreditBucket = v.InferOutput<typeof creditBucketSchema>;
|
|
351
519
|
/**
|
|
352
520
|
* A service records a request's charge before the request's answer ends, so a wallet read after
|
|
353
521
|
* an answer includes what it cost.
|
|
354
522
|
*/
|
|
355
|
-
declare const
|
|
523
|
+
declare const creditWalletSchema: v.ObjectSchema<{
|
|
356
524
|
/** Credits left to spend; `null` when the service sets no limit. */
|
|
357
525
|
readonly balance: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
358
526
|
/** Spent first to last. */
|
|
@@ -362,8 +530,8 @@ declare const aiWalletSchema: v.ObjectSchema<{
|
|
|
362
530
|
readonly expiresAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
363
531
|
}, undefined>, undefined>;
|
|
364
532
|
}, undefined>;
|
|
365
|
-
type
|
|
366
|
-
declare const
|
|
533
|
+
type CreditWallet = v.InferOutput<typeof creditWalletSchema>;
|
|
534
|
+
declare const usageEntrySchema: v.ObjectSchema<{
|
|
367
535
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
368
536
|
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
369
537
|
readonly kind: v.PicklistSchema<["model", "image", "search"], undefined>;
|
|
@@ -371,13 +539,43 @@ declare const aiUsageEntrySchema: v.ObjectSchema<{
|
|
|
371
539
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
372
540
|
readonly credits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
373
541
|
}, undefined>;
|
|
374
|
-
type
|
|
375
|
-
|
|
542
|
+
type UsageEntry = v.InferOutput<typeof usageEntrySchema>;
|
|
543
|
+
/** The most results one search returns. */
|
|
544
|
+
declare const MAX_SEARCH_RESULTS = 10;
|
|
545
|
+
/** The longest query a search takes, in characters. */
|
|
546
|
+
declare const MAX_SEARCH_QUERY_LENGTH = 1000;
|
|
547
|
+
declare const searchRequestSchema: v.ObjectSchema<{
|
|
548
|
+
readonly query: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 1000, undefined>]>;
|
|
549
|
+
readonly numResults: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 10, undefined>]>, 5>;
|
|
550
|
+
}, undefined>;
|
|
551
|
+
type SearchRequestInput = v.InferInput<typeof searchRequestSchema>;
|
|
552
|
+
type SearchRequest = v.InferOutput<typeof searchRequestSchema>;
|
|
553
|
+
declare function parseSearchRequest(input: unknown): SearchRequest;
|
|
554
|
+
/** One page a search found, with the part of its text that answers the query. */
|
|
555
|
+
declare const searchResultSchema: v.ObjectSchema<{
|
|
556
|
+
readonly url: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, v.RegexAction<string, "A search result links to an HTTP(S) page">]>;
|
|
557
|
+
readonly title: v.StringSchema<undefined>;
|
|
558
|
+
readonly publishedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
559
|
+
readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
560
|
+
readonly text: v.StringSchema<undefined>;
|
|
561
|
+
}, undefined>;
|
|
562
|
+
type SearchResult = v.InferOutput<typeof searchResultSchema>;
|
|
563
|
+
declare const searchResponseSchema: v.ObjectSchema<{
|
|
564
|
+
readonly results: v.ArraySchema<v.ObjectSchema<{
|
|
565
|
+
readonly url: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, v.RegexAction<string, "A search result links to an HTTP(S) page">]>;
|
|
566
|
+
readonly title: v.StringSchema<undefined>;
|
|
567
|
+
readonly publishedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
568
|
+
readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
569
|
+
readonly text: v.StringSchema<undefined>;
|
|
570
|
+
}, undefined>, undefined>;
|
|
571
|
+
}, undefined>;
|
|
572
|
+
type SearchResponse = v.InferOutput<typeof searchResponseSchema>;
|
|
573
|
+
declare const usageQuerySchema: v.ObjectSchema<{
|
|
376
574
|
readonly cursor: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
377
575
|
}, undefined>;
|
|
378
|
-
type
|
|
379
|
-
declare function
|
|
380
|
-
declare const
|
|
576
|
+
type UsageQuery = v.InferOutput<typeof usageQuerySchema>;
|
|
577
|
+
declare function parseUsageQuery(input: unknown): UsageQuery;
|
|
578
|
+
declare const usagePageSchema: v.ObjectSchema<{
|
|
381
579
|
readonly entries: v.ArraySchema<v.ObjectSchema<{
|
|
382
580
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
383
581
|
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -388,31 +586,187 @@ declare const aiUsagePageSchema: v.ObjectSchema<{
|
|
|
388
586
|
}, undefined>, undefined>;
|
|
389
587
|
readonly next: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
390
588
|
}, undefined>;
|
|
391
|
-
type
|
|
392
|
-
/** Errors
|
|
393
|
-
declare const
|
|
394
|
-
type
|
|
395
|
-
declare const
|
|
589
|
+
type UsagePage = v.InferOutput<typeof usagePageSchema>;
|
|
590
|
+
/** Errors a service answers with, beside the upstream provider's own. */
|
|
591
|
+
declare const serviceErrorCodeSchema: v.PicklistSchema<["invalid_request", "unauthorized", "insufficient_credits", "model_not_allowed", "capability_unavailable", "rate_limited"], undefined>;
|
|
592
|
+
type ServiceErrorCode = v.InferOutput<typeof serviceErrorCodeSchema>;
|
|
593
|
+
declare const serviceErrorSchema: v.ObjectSchema<{
|
|
396
594
|
readonly error: v.ObjectSchema<{
|
|
397
|
-
readonly code: v.PicklistSchema<["unauthorized", "insufficient_credits", "model_not_allowed", "rate_limited"], undefined>;
|
|
595
|
+
readonly code: v.PicklistSchema<["invalid_request", "unauthorized", "insufficient_credits", "model_not_allowed", "capability_unavailable", "rate_limited"], undefined>;
|
|
398
596
|
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
399
597
|
/** With `insufficient_credits`: when the workspace's allowance renews, if the service knows. */
|
|
400
598
|
readonly resetsAt: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
401
599
|
}, undefined>;
|
|
402
600
|
}, undefined>;
|
|
403
|
-
type
|
|
404
|
-
declare const
|
|
601
|
+
type ServiceError = v.InferOutput<typeof serviceErrorSchema>;
|
|
602
|
+
declare const SERVICE_ERROR_STATUS: {
|
|
603
|
+
readonly invalid_request: 400;
|
|
405
604
|
readonly unauthorized: 401;
|
|
406
605
|
readonly insufficient_credits: 402;
|
|
407
606
|
readonly model_not_allowed: 403;
|
|
607
|
+
/** A capability, such as search, the service does not offer. */
|
|
608
|
+
readonly capability_unavailable: 404;
|
|
408
609
|
readonly rate_limited: 429;
|
|
409
610
|
};
|
|
611
|
+
/**
|
|
612
|
+
* Every route a service answers besides chat completions, which OpenAI-compatible clients call
|
|
613
|
+
* themselves. Editors build a typed client from it with Hono's `hc`; a service's own app must
|
|
614
|
+
* match it, so the two cannot drift apart.
|
|
615
|
+
*/
|
|
616
|
+
type CloudServicesSchema = JSONRoute<'get', typeof CLOUD_SERVICES_API_PATHS.catalog, BlankInput, ServiceCatalog> & JSONRoute<'get', typeof CLOUD_SERVICES_API_PATHS.wallet, BlankInput, CreditWallet> & JSONRoute<'get', typeof CLOUD_SERVICES_API_PATHS.usage, {
|
|
617
|
+
query: UsageQuery;
|
|
618
|
+
}, UsagePage> & JSONRoute<'post', typeof CLOUD_SERVICES_API_PATHS.search, {
|
|
619
|
+
json: SearchRequestInput;
|
|
620
|
+
}, SearchResponse>;
|
|
621
|
+
type CloudServicesAPI = Hono<BlankEnv, CloudServicesSchema>;
|
|
622
|
+
/**
|
|
623
|
+
* Whether a bearer token may travel to `url`: over HTTPS, or in the clear only to a loopback
|
|
624
|
+
* address, for development. Only literal addresses count, since a name such as `localhost` is
|
|
625
|
+
* whatever the resolver answers. Services and billing tokens act as the account until they expire.
|
|
626
|
+
*/
|
|
627
|
+
declare function sendsTokenSafely(url: string | URL): boolean;
|
|
628
|
+
//#endregion
|
|
629
|
+
//#region src/contract/billing.d.ts
|
|
630
|
+
/**
|
|
631
|
+
* The contract between Cloud, its editors, and the billing service a deployment advertises: what
|
|
632
|
+
* plans and credit packs it sells, and where an account buys them or manages what it has. Cloud
|
|
633
|
+
* only advertises the service and signs short-lived tokens for an account; the service talks to
|
|
634
|
+
* the payment provider, and sets the account's entitlements and credits as it is paid.
|
|
635
|
+
*/
|
|
636
|
+
declare const CLOUD_BILLING_CONTRACT_VERSION: "1";
|
|
637
|
+
/**
|
|
638
|
+
* The `aud` of the tokens Cloud signs for its billing service, with the services' signing key,
|
|
639
|
+
* whose public keys it publishes at `CLOUD_SERVICES_JWKS_PATH`.
|
|
640
|
+
*/
|
|
641
|
+
declare const CLOUD_BILLING_TOKEN_AUDIENCE: "openpencil-billing";
|
|
642
|
+
/**
|
|
643
|
+
* The page of a Cloud server where the signed-in person sees their plan, buys a plan or credits,
|
|
644
|
+
* and manages what they pay for; editors link to it whenever the server advertises billing.
|
|
645
|
+
*/
|
|
646
|
+
declare const CLOUD_ACCOUNT_PLAN_PATH: "/account/plan";
|
|
647
|
+
/** Where the billing service answers, below the discovered `endpoint`. */
|
|
648
|
+
declare const CLOUD_BILLING_API_PATHS: {
|
|
649
|
+
readonly base: "/v1";
|
|
650
|
+
readonly catalog: "/v1/catalog";
|
|
651
|
+
readonly account: "/v1/account";
|
|
652
|
+
readonly checkout: "/v1/checkout";
|
|
653
|
+
readonly portal: "/v1/portal";
|
|
654
|
+
};
|
|
655
|
+
declare const cloudBillingDiscoverySchema: v.ObjectSchema<{
|
|
656
|
+
readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
657
|
+
readonly contractVersion: v.LiteralSchema<"1", undefined>;
|
|
658
|
+
}, undefined>;
|
|
659
|
+
type CloudBillingDiscovery = v.InferOutput<typeof cloudBillingDiscoverySchema>;
|
|
660
|
+
declare const billingTokenSchema: v.ObjectSchema<{
|
|
661
|
+
readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
662
|
+
readonly expiresAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
663
|
+
}, undefined>;
|
|
664
|
+
type BillingToken = v.InferOutput<typeof billingTokenSchema>;
|
|
665
|
+
/**
|
|
666
|
+
* What the billing service may rely on once a token's signature, issuer, audience, and expiry
|
|
667
|
+
* check. The account is the signed-in user, who buys and manages only their own plan.
|
|
668
|
+
*/
|
|
669
|
+
declare const billingTokenClaimsSchema: v.ObjectSchema<{
|
|
670
|
+
readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
671
|
+
readonly aud: v.LiteralSchema<"openpencil-billing", undefined>;
|
|
672
|
+
/** The account: the Cloud user whose plan and credits these are. */
|
|
673
|
+
readonly sub: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
674
|
+
/** Where the payment provider sends receipts and invoices. */
|
|
675
|
+
readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
|
|
676
|
+
readonly iat: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
677
|
+
readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
678
|
+
}, undefined>;
|
|
679
|
+
type BillingTokenClaims = v.InferOutput<typeof billingTokenClaimsSchema>;
|
|
680
|
+
/** A plan an account subscribes to, billed every month in US dollars before tax. */
|
|
681
|
+
declare const billingPlanSchema: v.ObjectSchema<{
|
|
682
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
683
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
684
|
+
readonly monthlyPriceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
685
|
+
readonly storageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
686
|
+
readonly monthlyCredits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
687
|
+
}, undefined>;
|
|
688
|
+
type BillingPlan = v.InferOutput<typeof billingPlanSchema>;
|
|
689
|
+
/** Credits an account on a plan buys once, in US dollars before tax. */
|
|
690
|
+
declare const creditPackSchema: v.ObjectSchema<{
|
|
691
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
692
|
+
readonly credits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
693
|
+
readonly priceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
694
|
+
/** How long the credits last from purchase. */
|
|
695
|
+
readonly validDays: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
696
|
+
}, undefined>;
|
|
697
|
+
type CreditPack = v.InferOutput<typeof creditPackSchema>;
|
|
698
|
+
/** What the service sells; an account without a plan has its deployment's free entitlements. */
|
|
699
|
+
declare const billingCatalogSchema: v.ObjectSchema<{
|
|
700
|
+
readonly plans: v.ArraySchema<v.ObjectSchema<{
|
|
701
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
702
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
703
|
+
readonly monthlyPriceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
704
|
+
readonly storageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
705
|
+
readonly monthlyCredits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
706
|
+
}, undefined>, undefined>;
|
|
707
|
+
readonly creditPacks: v.ArraySchema<v.ObjectSchema<{
|
|
708
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
709
|
+
readonly credits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
710
|
+
readonly priceCents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
711
|
+
/** How long the credits last from purchase. */
|
|
712
|
+
readonly validDays: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
713
|
+
}, undefined>, undefined>;
|
|
714
|
+
}, undefined>;
|
|
715
|
+
type BillingCatalog = v.InferOutput<typeof billingCatalogSchema>;
|
|
716
|
+
/**
|
|
717
|
+
* The account's subscription as the payment provider holds it, or `null` without one. A
|
|
718
|
+
* `past_due` plan keeps its entitlements while payment is retried.
|
|
719
|
+
*/
|
|
720
|
+
declare const billingAccountSchema: v.ObjectSchema<{
|
|
721
|
+
readonly subscription: v.NullableSchema<v.ObjectSchema<{
|
|
722
|
+
readonly planId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
723
|
+
readonly status: v.PicklistSchema<["active", "past_due"], undefined>;
|
|
724
|
+
/** When the current period ends: the next charge, or the end of a cancelled plan. */
|
|
725
|
+
readonly currentPeriodEnd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
726
|
+
/** Whether the plan ends at `currentPeriodEnd` instead of renewing. */
|
|
727
|
+
readonly cancelsAtPeriodEnd: v.BooleanSchema<undefined>;
|
|
728
|
+
}, undefined>, undefined>;
|
|
729
|
+
}, undefined>;
|
|
730
|
+
type BillingAccount = v.InferOutput<typeof billingAccountSchema>;
|
|
731
|
+
/** What to buy: a plan to subscribe to, or a credit pack. */
|
|
732
|
+
declare const checkoutRequestSchema: v.UnionSchema<[v.ObjectSchema<{
|
|
733
|
+
readonly planId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
734
|
+
}, undefined>, v.ObjectSchema<{
|
|
735
|
+
readonly creditPackId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
736
|
+
}, undefined>], undefined>;
|
|
737
|
+
type CheckoutRequest = v.InferOutput<typeof checkoutRequestSchema>;
|
|
738
|
+
/** Where to send the person: the payment provider's checkout or account portal. */
|
|
739
|
+
declare const billingRedirectSchema: v.ObjectSchema<{
|
|
740
|
+
readonly url: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, v.RegexAction<string, "Billing sends people to an HTTPS page">]>;
|
|
741
|
+
}, undefined>;
|
|
742
|
+
type BillingRedirect = v.InferOutput<typeof billingRedirectSchema>;
|
|
743
|
+
declare const billingErrorCodeSchema: v.PicklistSchema<["invalid_request", "unauthorized", "not_allowed", "provider_unavailable"], undefined>;
|
|
744
|
+
type BillingErrorCode = v.InferOutput<typeof billingErrorCodeSchema>;
|
|
745
|
+
/** The HTTP status billing answers each error with. */
|
|
746
|
+
declare const BILLING_ERROR_STATUS: {
|
|
747
|
+
readonly invalid_request: 400;
|
|
748
|
+
readonly unauthorized: 401;
|
|
749
|
+
readonly not_allowed: 409;
|
|
750
|
+
readonly provider_unavailable: 502;
|
|
751
|
+
};
|
|
752
|
+
declare const billingErrorSchema: v.ObjectSchema<{
|
|
753
|
+
readonly error: v.ObjectSchema<{
|
|
754
|
+
readonly code: v.PicklistSchema<["invalid_request", "unauthorized", "not_allowed", "provider_unavailable"], undefined>;
|
|
755
|
+
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
756
|
+
}, undefined>;
|
|
757
|
+
}, undefined>;
|
|
758
|
+
type BillingError = v.InferOutput<typeof billingErrorSchema>;
|
|
759
|
+
/** The billing service's routes, for a typed Hono client (`hc<CloudBillingAPI>`). */
|
|
760
|
+
type CloudBillingSchema = JSONRoute<'get', typeof CLOUD_BILLING_API_PATHS.catalog, BlankInput, BillingCatalog> & JSONRoute<'get', typeof CLOUD_BILLING_API_PATHS.account, BlankInput, BillingAccount> & JSONRoute<'post', typeof CLOUD_BILLING_API_PATHS.checkout, {
|
|
761
|
+
json: CheckoutRequest;
|
|
762
|
+
}, BillingRedirect> & JSONRoute<'post', typeof CLOUD_BILLING_API_PATHS.portal, BlankInput, BillingRedirect>;
|
|
763
|
+
type CloudBillingAPI = Hono<BlankEnv, CloudBillingSchema>;
|
|
410
764
|
//#endregion
|
|
411
765
|
//#region src/contract/admin/index.d.ts
|
|
412
|
-
declare const adminErrorCodeSchema: v.PicklistSchema<["bad_request", "unauthorized", "forbidden", "not_found", "rate_limited", "invalid_enrollment_transition", "last_admin_required", "self_admin_action_forbidden", "email_regeneration_unavailable", "mfa_required"], undefined>;
|
|
766
|
+
declare const adminErrorCodeSchema: v.PicklistSchema<["bad_request", "unauthorized", "forbidden", "not_found", "rate_limited", "invalid_enrollment_transition", "last_admin_required", "self_admin_action_forbidden", "email_regeneration_unavailable", "mfa_required", "document_not_restorable", "workspace_gone"], undefined>;
|
|
413
767
|
declare const adminErrorResponseSchema: v.ObjectSchema<{
|
|
414
768
|
readonly error: v.ObjectSchema<{
|
|
415
|
-
readonly code: v.PicklistSchema<["bad_request", "unauthorized", "forbidden", "not_found", "rate_limited", "invalid_enrollment_transition", "last_admin_required", "self_admin_action_forbidden", "email_regeneration_unavailable", "mfa_required"], undefined>;
|
|
769
|
+
readonly code: v.PicklistSchema<["bad_request", "unauthorized", "forbidden", "not_found", "rate_limited", "invalid_enrollment_transition", "last_admin_required", "self_admin_action_forbidden", "email_regeneration_unavailable", "mfa_required", "document_not_restorable", "workspace_gone"], undefined>;
|
|
416
770
|
}, undefined>;
|
|
417
771
|
}, undefined>;
|
|
418
772
|
declare const enrollmentStatusSchema: v.PicklistSchema<["pending", "approved", "rejected", "revoked"], undefined>;
|
|
@@ -433,7 +787,7 @@ declare const enrollmentSchema: v.ObjectSchema<{
|
|
|
433
787
|
}, undefined>;
|
|
434
788
|
declare const enrollmentsResponseSchema: v.ObjectSchema<{
|
|
435
789
|
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
436
|
-
readonly counts: v.ObjectSchema<Record<"pending" | "
|
|
790
|
+
readonly counts: v.ObjectSchema<Record<"pending" | "rejected" | "revoked" | "approved", v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>, undefined>;
|
|
437
791
|
readonly enrollments: v.ArraySchema<v.ObjectSchema<{
|
|
438
792
|
readonly id: v.StringSchema<undefined>;
|
|
439
793
|
readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
|
|
@@ -606,7 +960,7 @@ declare const adminAuditEventSchema: v.ObjectSchema<{
|
|
|
606
960
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
607
961
|
}, undefined>;
|
|
608
962
|
readonly action: v.StringSchema<undefined>;
|
|
609
|
-
/** What the event is about: an account, an access request, or
|
|
963
|
+
/** What the event is about: an account, an access request, an email, or a document. */
|
|
610
964
|
readonly subject: v.ObjectSchema<{
|
|
611
965
|
readonly type: v.StringSchema<undefined>;
|
|
612
966
|
readonly id: v.StringSchema<undefined>;
|
|
@@ -616,10 +970,10 @@ declare const adminAuditEventSchema: v.ObjectSchema<{
|
|
|
616
970
|
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
617
971
|
}, undefined>;
|
|
618
972
|
/** Which events a list of activity shows, by what they are about. */
|
|
619
|
-
declare const cloudAdminAuditFilterSchema: v.PicklistSchema<["all", "accounts", "requests", "email"], undefined>;
|
|
973
|
+
declare const cloudAdminAuditFilterSchema: v.PicklistSchema<["all", "accounts", "requests", "email", "documents"], undefined>;
|
|
620
974
|
declare const adminAuditResponseSchema: v.ObjectSchema<{
|
|
621
975
|
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
622
|
-
readonly counts: v.ObjectSchema<Record<"email" | "all" | "accounts" | "requests", v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>, undefined>;
|
|
976
|
+
readonly counts: v.ObjectSchema<Record<"email" | "documents" | "all" | "accounts" | "requests", v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>, undefined>;
|
|
623
977
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
624
978
|
readonly id: v.StringSchema<undefined>;
|
|
625
979
|
readonly actor: v.ObjectSchema<{
|
|
@@ -627,7 +981,7 @@ declare const adminAuditResponseSchema: v.ObjectSchema<{
|
|
|
627
981
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
628
982
|
}, undefined>;
|
|
629
983
|
readonly action: v.StringSchema<undefined>;
|
|
630
|
-
/** What the event is about: an account, an access request, or
|
|
984
|
+
/** What the event is about: an account, an access request, an email, or a document. */
|
|
631
985
|
readonly subject: v.ObjectSchema<{
|
|
632
986
|
readonly type: v.StringSchema<undefined>;
|
|
633
987
|
readonly id: v.StringSchema<undefined>;
|
|
@@ -637,11 +991,168 @@ declare const adminAuditResponseSchema: v.ObjectSchema<{
|
|
|
637
991
|
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
638
992
|
}, undefined>, undefined>;
|
|
639
993
|
}, undefined>;
|
|
994
|
+
/** A document as the console shows it: where it lives, who made it, and whether it is taken down. */
|
|
995
|
+
declare const cloudAdminDocumentSchema: v.ObjectSchema<{
|
|
996
|
+
readonly id: v.StringSchema<undefined>;
|
|
997
|
+
readonly name: v.StringSchema<undefined>;
|
|
998
|
+
readonly workspace: v.ObjectSchema<{
|
|
999
|
+
readonly id: v.StringSchema<undefined>;
|
|
1000
|
+
readonly name: v.StringSchema<undefined>;
|
|
1001
|
+
}, undefined>;
|
|
1002
|
+
/** Who made it, while the server knows them. */
|
|
1003
|
+
readonly owner: v.NullableSchema<v.ObjectSchema<{
|
|
1004
|
+
readonly id: v.StringSchema<undefined>;
|
|
1005
|
+
readonly name: v.StringSchema<undefined>;
|
|
1006
|
+
readonly email: v.StringSchema<undefined>;
|
|
1007
|
+
}, undefined>, undefined>;
|
|
1008
|
+
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1009
|
+
readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1010
|
+
readonly disabledAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1011
|
+
readonly disabledReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1012
|
+
/** Reports about it still waiting for a decision. */
|
|
1013
|
+
readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1014
|
+
/**
|
|
1015
|
+
* When someone deleted it forever, and when cleanup destroys it; until then an administrator
|
|
1016
|
+
* can still restore it. Servers from before Trash send neither.
|
|
1017
|
+
*/
|
|
1018
|
+
readonly purgedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
|
|
1019
|
+
readonly destroyedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
|
|
1020
|
+
}, undefined>;
|
|
1021
|
+
/** Which documents a list shows: live ones, or those deleted forever an administrator can restore. */
|
|
1022
|
+
declare const cloudAdminDocumentFilterSchema: v.PicklistSchema<["all", "reported", "disabled", "purged"], undefined>;
|
|
1023
|
+
declare const cloudAdminDocumentsResponseSchema: v.ObjectSchema<{
|
|
1024
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1025
|
+
readonly counts: v.ObjectSchema<Record<"all" | "reported" | "disabled" | "purged", v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>, undefined>;
|
|
1026
|
+
readonly documents: v.ArraySchema<v.ObjectSchema<{
|
|
1027
|
+
readonly id: v.StringSchema<undefined>;
|
|
1028
|
+
readonly name: v.StringSchema<undefined>;
|
|
1029
|
+
readonly workspace: v.ObjectSchema<{
|
|
1030
|
+
readonly id: v.StringSchema<undefined>;
|
|
1031
|
+
readonly name: v.StringSchema<undefined>;
|
|
1032
|
+
}, undefined>;
|
|
1033
|
+
/** Who made it, while the server knows them. */
|
|
1034
|
+
readonly owner: v.NullableSchema<v.ObjectSchema<{
|
|
1035
|
+
readonly id: v.StringSchema<undefined>;
|
|
1036
|
+
readonly name: v.StringSchema<undefined>;
|
|
1037
|
+
readonly email: v.StringSchema<undefined>;
|
|
1038
|
+
}, undefined>, undefined>;
|
|
1039
|
+
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1040
|
+
readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1041
|
+
readonly disabledAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1042
|
+
readonly disabledReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1043
|
+
/** Reports about it still waiting for a decision. */
|
|
1044
|
+
readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1045
|
+
/**
|
|
1046
|
+
* When someone deleted it forever, and when cleanup destroys it; until then an administrator
|
|
1047
|
+
* can still restore it. Servers from before Trash send neither.
|
|
1048
|
+
*/
|
|
1049
|
+
readonly purgedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
|
|
1050
|
+
readonly destroyedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
|
|
1051
|
+
}, undefined>, undefined>;
|
|
1052
|
+
}, undefined>;
|
|
1053
|
+
declare const cloudAdminReportStatusSchema: v.PicklistSchema<["open", "dismissed", "actioned"], undefined>;
|
|
1054
|
+
declare const cloudAdminReportSchema: v.ObjectSchema<{
|
|
1055
|
+
readonly id: v.StringSchema<undefined>;
|
|
1056
|
+
readonly reason: v.PicklistSchema<["spam-phishing", "illegal", "copyright", "harassment", "other"], undefined>;
|
|
1057
|
+
readonly description: v.StringSchema<undefined>;
|
|
1058
|
+
readonly status: v.PicklistSchema<["open", "dismissed", "actioned"], undefined>;
|
|
1059
|
+
/** The account that filed it, or null for a guest. */
|
|
1060
|
+
readonly reporter: v.NullableSchema<v.ObjectSchema<{
|
|
1061
|
+
readonly id: v.StringSchema<undefined>;
|
|
1062
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1063
|
+
}, undefined>, undefined>;
|
|
1064
|
+
readonly replyEmail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1065
|
+
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1066
|
+
readonly resolvedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1067
|
+
readonly document: v.ObjectSchema<{
|
|
1068
|
+
readonly id: v.StringSchema<undefined>;
|
|
1069
|
+
readonly name: v.StringSchema<undefined>;
|
|
1070
|
+
readonly workspace: v.ObjectSchema<{
|
|
1071
|
+
readonly id: v.StringSchema<undefined>;
|
|
1072
|
+
readonly name: v.StringSchema<undefined>;
|
|
1073
|
+
}, undefined>;
|
|
1074
|
+
/** Who made it, while the server knows them. */
|
|
1075
|
+
readonly owner: v.NullableSchema<v.ObjectSchema<{
|
|
1076
|
+
readonly id: v.StringSchema<undefined>;
|
|
1077
|
+
readonly name: v.StringSchema<undefined>;
|
|
1078
|
+
readonly email: v.StringSchema<undefined>;
|
|
1079
|
+
}, undefined>, undefined>;
|
|
1080
|
+
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1081
|
+
readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1082
|
+
readonly disabledAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1083
|
+
readonly disabledReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1084
|
+
/** Reports about it still waiting for a decision. */
|
|
1085
|
+
readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1086
|
+
/**
|
|
1087
|
+
* When someone deleted it forever, and when cleanup destroys it; until then an administrator
|
|
1088
|
+
* can still restore it. Servers from before Trash send neither.
|
|
1089
|
+
*/
|
|
1090
|
+
readonly purgedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
|
|
1091
|
+
readonly destroyedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
|
|
1092
|
+
}, undefined>;
|
|
1093
|
+
/** The link it was opened from, and whether that link still works. */
|
|
1094
|
+
readonly share: v.NullableSchema<v.ObjectSchema<{
|
|
1095
|
+
readonly id: v.StringSchema<undefined>;
|
|
1096
|
+
readonly revoked: v.BooleanSchema<undefined>;
|
|
1097
|
+
}, undefined>, undefined>;
|
|
1098
|
+
}, undefined>;
|
|
1099
|
+
/** Which reports a list shows, by where they stand. */
|
|
1100
|
+
declare const cloudAdminReportFilterSchema: v.PicklistSchema<["open", "actioned", "dismissed", "all"], undefined>;
|
|
1101
|
+
declare const cloudAdminReportsResponseSchema: v.ObjectSchema<{
|
|
1102
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1103
|
+
readonly counts: v.ObjectSchema<Record<"all" | "open" | "dismissed" | "actioned", v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>, undefined>;
|
|
1104
|
+
readonly reports: v.ArraySchema<v.ObjectSchema<{
|
|
1105
|
+
readonly id: v.StringSchema<undefined>;
|
|
1106
|
+
readonly reason: v.PicklistSchema<["spam-phishing", "illegal", "copyright", "harassment", "other"], undefined>;
|
|
1107
|
+
readonly description: v.StringSchema<undefined>;
|
|
1108
|
+
readonly status: v.PicklistSchema<["open", "dismissed", "actioned"], undefined>;
|
|
1109
|
+
/** The account that filed it, or null for a guest. */
|
|
1110
|
+
readonly reporter: v.NullableSchema<v.ObjectSchema<{
|
|
1111
|
+
readonly id: v.StringSchema<undefined>;
|
|
1112
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1113
|
+
}, undefined>, undefined>;
|
|
1114
|
+
readonly replyEmail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1115
|
+
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1116
|
+
readonly resolvedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1117
|
+
readonly document: v.ObjectSchema<{
|
|
1118
|
+
readonly id: v.StringSchema<undefined>;
|
|
1119
|
+
readonly name: v.StringSchema<undefined>;
|
|
1120
|
+
readonly workspace: v.ObjectSchema<{
|
|
1121
|
+
readonly id: v.StringSchema<undefined>;
|
|
1122
|
+
readonly name: v.StringSchema<undefined>;
|
|
1123
|
+
}, undefined>;
|
|
1124
|
+
/** Who made it, while the server knows them. */
|
|
1125
|
+
readonly owner: v.NullableSchema<v.ObjectSchema<{
|
|
1126
|
+
readonly id: v.StringSchema<undefined>;
|
|
1127
|
+
readonly name: v.StringSchema<undefined>;
|
|
1128
|
+
readonly email: v.StringSchema<undefined>;
|
|
1129
|
+
}, undefined>, undefined>;
|
|
1130
|
+
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1131
|
+
readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1132
|
+
readonly disabledAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1133
|
+
readonly disabledReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1134
|
+
/** Reports about it still waiting for a decision. */
|
|
1135
|
+
readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1136
|
+
/**
|
|
1137
|
+
* When someone deleted it forever, and when cleanup destroys it; until then an administrator
|
|
1138
|
+
* can still restore it. Servers from before Trash send neither.
|
|
1139
|
+
*/
|
|
1140
|
+
readonly purgedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
|
|
1141
|
+
readonly destroyedAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
|
|
1142
|
+
}, undefined>;
|
|
1143
|
+
/** The link it was opened from, and whether that link still works. */
|
|
1144
|
+
readonly share: v.NullableSchema<v.ObjectSchema<{
|
|
1145
|
+
readonly id: v.StringSchema<undefined>;
|
|
1146
|
+
readonly revoked: v.BooleanSchema<undefined>;
|
|
1147
|
+
}, undefined>, undefined>;
|
|
1148
|
+
}, undefined>, undefined>;
|
|
1149
|
+
}, undefined>;
|
|
640
1150
|
declare const adminOperationsResponseSchema: v.ObjectSchema<{
|
|
641
1151
|
readonly deployment: v.PicklistSchema<["official", "self-hosted"], undefined>;
|
|
642
1152
|
readonly enrollmentMode: v.PicklistSchema<["open", "approval", "closed"], undefined>;
|
|
643
1153
|
readonly emailTransport: v.PicklistSchema<["none", "smtp", "cloudflare"], undefined>;
|
|
644
1154
|
readonly pendingEnrollment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1155
|
+
readonly openReports: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
645
1156
|
readonly pendingEmail: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
646
1157
|
readonly failedEmail: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
647
1158
|
readonly accounts: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -662,6 +1173,11 @@ type CloudAdminUserDetail = v.InferOutput<typeof cloudAdminUserDetailSchema>;
|
|
|
662
1173
|
type TransactionalEmailAdmin = v.InferOutput<typeof transactionalEmailAdminSchema>;
|
|
663
1174
|
type AdminAuditEvent = v.InferOutput<typeof adminAuditEventSchema>;
|
|
664
1175
|
type AdminOperations = v.InferOutput<typeof adminOperationsResponseSchema>;
|
|
1176
|
+
type CloudAdminDocument = v.InferOutput<typeof cloudAdminDocumentSchema>;
|
|
1177
|
+
type CloudAdminDocumentFilter = v.InferOutput<typeof cloudAdminDocumentFilterSchema>;
|
|
1178
|
+
type CloudAdminReport = v.InferOutput<typeof cloudAdminReportSchema>;
|
|
1179
|
+
type CloudAdminReportFilter = v.InferOutput<typeof cloudAdminReportFilterSchema>;
|
|
1180
|
+
type CloudAdminReportStatus = v.InferOutput<typeof cloudAdminReportStatusSchema>;
|
|
665
1181
|
//#endregion
|
|
666
1182
|
//#region src/contract/collaboration.d.ts
|
|
667
1183
|
declare const collaborationPrincipalSchema: v.VariantSchema<"kind", [v.ObjectSchema<{
|
|
@@ -704,9 +1220,19 @@ declare const collaborationTicketSchema: v.ObjectSchema<{
|
|
|
704
1220
|
readonly name: v.StringSchema<undefined>;
|
|
705
1221
|
}, undefined>], undefined>;
|
|
706
1222
|
readonly permission: v.PicklistSchema<["view", "edit"], undefined>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Why a peer whose access would let them edit may only view: `storage-limit` when the document's
|
|
1225
|
+
* owner holds their whole storage allowance, until they free space or their plan grows.
|
|
1226
|
+
*/
|
|
1227
|
+
readonly readOnly: v.OptionalSchema<v.PicklistSchema<["storage-limit"], undefined>, undefined>;
|
|
707
1228
|
readonly roomEpoch: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
708
1229
|
readonly expiresAt: v.StringSchema<undefined>;
|
|
709
1230
|
readonly serverEnforcedWrites: v.BooleanSchema<undefined>;
|
|
1231
|
+
/**
|
|
1232
|
+
* Whether the relay answers `RELAY_HEARTBEAT`. A relay from before it takes a ping for a
|
|
1233
|
+
* malformed frame and turns the peer away, so editors ask only a relay that says it answers.
|
|
1234
|
+
*/
|
|
1235
|
+
readonly relayHeartbeat: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
710
1236
|
}, undefined>;
|
|
711
1237
|
type CollaborationTicket = v.InferOutput<typeof collaborationTicketSchema>;
|
|
712
1238
|
//#endregion
|
|
@@ -773,6 +1299,14 @@ declare const RELAY_CLOSE: {
|
|
|
773
1299
|
/** The document was restored to a version, so its room started over under a new ID. */
|
|
774
1300
|
readonly restored: 4410;
|
|
775
1301
|
};
|
|
1302
|
+
/**
|
|
1303
|
+
* The text a peer sends to learn whether the relay still hears it, and the relay's answer. Relay
|
|
1304
|
+
* frames are binary, so neither is taken for one, and a Durable Object answers without waking.
|
|
1305
|
+
*/
|
|
1306
|
+
declare const RELAY_HEARTBEAT: {
|
|
1307
|
+
readonly ping: "ping";
|
|
1308
|
+
readonly pong: "pong";
|
|
1309
|
+
};
|
|
776
1310
|
/**
|
|
777
1311
|
* The most one WebSocket message carries. A frame past it travels as fragments of this size that
|
|
778
1312
|
* the receiver joins again, so a large paste or a room's first sync fits under any host's message
|
|
@@ -854,7 +1388,7 @@ declare const workspaceEntitlementsSchema: v.ObjectSchema<{
|
|
|
854
1388
|
readonly guestPresence: v.BooleanSchema<undefined>;
|
|
855
1389
|
readonly collaboration: v.BooleanSchema<undefined>;
|
|
856
1390
|
readonly revisionHistory: v.BooleanSchema<undefined>;
|
|
857
|
-
readonly
|
|
1391
|
+
readonly cloudServices: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
858
1392
|
}, undefined>;
|
|
859
1393
|
readonly limits: v.ObjectSchema<{
|
|
860
1394
|
readonly maximumFileBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
@@ -868,6 +1402,55 @@ declare const workspaceEntitlementsSchema: v.ObjectSchema<{
|
|
|
868
1402
|
}, undefined>;
|
|
869
1403
|
}, undefined>;
|
|
870
1404
|
type WorkspaceEntitlements = v.InferOutput<typeof workspaceEntitlementsSchema>;
|
|
1405
|
+
/**
|
|
1406
|
+
* An account's own plan and the storage its workspaces hold together. A workspace reports the
|
|
1407
|
+
* same for its owner, so the two read alike.
|
|
1408
|
+
*/
|
|
1409
|
+
declare const accountEntitlementsSchema: v.ObjectSchema<{
|
|
1410
|
+
readonly features: v.ObjectSchema<{
|
|
1411
|
+
readonly links: v.BooleanSchema<undefined>;
|
|
1412
|
+
readonly guestView: v.BooleanSchema<undefined>;
|
|
1413
|
+
readonly guestEdit: v.BooleanSchema<undefined>;
|
|
1414
|
+
readonly guestPresence: v.BooleanSchema<undefined>;
|
|
1415
|
+
readonly collaboration: v.BooleanSchema<undefined>;
|
|
1416
|
+
readonly revisionHistory: v.BooleanSchema<undefined>;
|
|
1417
|
+
readonly cloudServices: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
1418
|
+
}, undefined>;
|
|
1419
|
+
readonly limits: v.ObjectSchema<{
|
|
1420
|
+
readonly maximumFileBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
1421
|
+
readonly maximumStorageBytes: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
1422
|
+
readonly maximumParticipants: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
1423
|
+
readonly monthlyCreditAllowance: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, null>;
|
|
1424
|
+
}, undefined>;
|
|
1425
|
+
readonly usage: v.ObjectSchema<{
|
|
1426
|
+
readonly committedStorageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1427
|
+
readonly reservedStorageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1428
|
+
}, undefined>;
|
|
1429
|
+
}, undefined>;
|
|
1430
|
+
type AccountEntitlements = WorkspaceEntitlements;
|
|
1431
|
+
declare const accountEntitlementsResponseSchema: v.ObjectSchema<{
|
|
1432
|
+
readonly entitlements: v.ObjectSchema<{
|
|
1433
|
+
readonly features: v.ObjectSchema<{
|
|
1434
|
+
readonly links: v.BooleanSchema<undefined>;
|
|
1435
|
+
readonly guestView: v.BooleanSchema<undefined>;
|
|
1436
|
+
readonly guestEdit: v.BooleanSchema<undefined>;
|
|
1437
|
+
readonly guestPresence: v.BooleanSchema<undefined>;
|
|
1438
|
+
readonly collaboration: v.BooleanSchema<undefined>;
|
|
1439
|
+
readonly revisionHistory: v.BooleanSchema<undefined>;
|
|
1440
|
+
readonly cloudServices: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
1441
|
+
}, undefined>;
|
|
1442
|
+
readonly limits: v.ObjectSchema<{
|
|
1443
|
+
readonly maximumFileBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
1444
|
+
readonly maximumStorageBytes: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
1445
|
+
readonly maximumParticipants: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
1446
|
+
readonly monthlyCreditAllowance: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, null>;
|
|
1447
|
+
}, undefined>;
|
|
1448
|
+
readonly usage: v.ObjectSchema<{
|
|
1449
|
+
readonly committedStorageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1450
|
+
readonly reservedStorageBytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1451
|
+
}, undefined>;
|
|
1452
|
+
}, undefined>;
|
|
1453
|
+
}, undefined>;
|
|
871
1454
|
//#endregion
|
|
872
1455
|
//#region src/contract/discovery.d.ts
|
|
873
1456
|
declare const CLOUD_PROTOCOL_VERSION: "1";
|
|
@@ -903,6 +1486,17 @@ declare const cloudCapabilitiesSchema: v.ObjectSchema<{
|
|
|
903
1486
|
type CloudCapabilities = v.InferOutput<typeof cloudCapabilitiesSchema>;
|
|
904
1487
|
/** A released editor version, `major.minor.patch`. */
|
|
905
1488
|
declare const cloudEditorVersionSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1489
|
+
/**
|
|
1490
|
+
* The header desktop editors send with each request, naming their version, so a server can refuse
|
|
1491
|
+
* an editor older than its `minimumEditorVersion`. Browser editors leave it out: the server serves
|
|
1492
|
+
* them, and an older server's CORS rules would refuse a header they don't list.
|
|
1493
|
+
*/
|
|
1494
|
+
declare const CLOUD_EDITOR_VERSION_HEADER: "X-OpenPencil-Editor-Version";
|
|
1495
|
+
/**
|
|
1496
|
+
* Whether `version` is `minimum` or later, comparing `major.minor.patch` numerically; a prerelease
|
|
1497
|
+
* counts as its release. A version that isn't one, on either side, is not at least anything.
|
|
1498
|
+
*/
|
|
1499
|
+
declare function isEditorVersionAtLeast(version: string, minimum: string): boolean;
|
|
906
1500
|
/**
|
|
907
1501
|
* Whether editors offer this server to everyone, and from which editor version on. Only the
|
|
908
1502
|
* official server's listing is read: it turns the Cloud entry points on without an editor release,
|
|
@@ -912,6 +1506,38 @@ declare const cloudListingSchema: v.ObjectSchema<{
|
|
|
912
1506
|
readonly minimumEditorVersion: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
913
1507
|
}, undefined>;
|
|
914
1508
|
type CloudListing = v.InferOutput<typeof cloudListingSchema>;
|
|
1509
|
+
/**
|
|
1510
|
+
* The operator's legal links, which clients show at sign-up and in account pages. A server that
|
|
1511
|
+
* names none shows none; `requireAcceptance` means an account accepts `termsVersion` before it uses
|
|
1512
|
+
* the server.
|
|
1513
|
+
*/
|
|
1514
|
+
declare const cloudLegalDiscoverySchema: v.ObjectSchema<{
|
|
1515
|
+
readonly termsURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
|
|
1516
|
+
readonly privacyURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
|
|
1517
|
+
readonly termsVersion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1518
|
+
readonly requireAcceptance: v.BooleanSchema<undefined>;
|
|
1519
|
+
readonly abuseEmail: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
|
|
1520
|
+
readonly minimumAge: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
1521
|
+
}, undefined>;
|
|
1522
|
+
type CloudLegalDiscovery = v.InferOutput<typeof cloudLegalDiscoverySchema>;
|
|
1523
|
+
/**
|
|
1524
|
+
* How a self-hosted server names itself on its public pages: the operator's name and logo in the
|
|
1525
|
+
* bar, and where its people get help. The official server is OpenPencil's own and names none.
|
|
1526
|
+
*/
|
|
1527
|
+
declare const cloudBrandingSchema: v.ObjectSchema<{
|
|
1528
|
+
readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
|
|
1529
|
+
readonly logoURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
|
|
1530
|
+
readonly helpURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
|
|
1531
|
+
}, undefined>;
|
|
1532
|
+
type CloudBranding = v.InferOutput<typeof cloudBrandingSchema>;
|
|
1533
|
+
/**
|
|
1534
|
+
* The server's community gallery: the workspace whose documents anyone may open read-only.
|
|
1535
|
+
* Saving to it publishes, so editors never choose it for anyone and say so when it is chosen.
|
|
1536
|
+
*/
|
|
1537
|
+
declare const cloudCommunityDiscoverySchema: v.ObjectSchema<{
|
|
1538
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1539
|
+
}, undefined>;
|
|
1540
|
+
type CloudCommunityDiscovery = v.InferOutput<typeof cloudCommunityDiscoverySchema>;
|
|
915
1541
|
declare const cloudDiscoverySchema: v.ObjectSchema<{
|
|
916
1542
|
readonly protocolVersion: v.LiteralSchema<"1", undefined>;
|
|
917
1543
|
readonly deployment: v.PicklistSchema<["official", "self-hosted"], undefined>;
|
|
@@ -947,14 +1573,37 @@ declare const cloudDiscoverySchema: v.ObjectSchema<{
|
|
|
947
1573
|
readonly listing: v.OptionalSchema<v.ObjectSchema<{
|
|
948
1574
|
readonly minimumEditorVersion: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
949
1575
|
}, undefined>, undefined>;
|
|
950
|
-
/**
|
|
951
|
-
|
|
1576
|
+
/**
|
|
1577
|
+
* The oldest editor version the server works with. Older editors ask to be updated instead of
|
|
1578
|
+
* connecting, and the server refuses their requests.
|
|
1579
|
+
*/
|
|
1580
|
+
readonly minimumEditorVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1581
|
+
/** The services editors reach with Cloud-signed tokens; absent when the deployment has none. */
|
|
1582
|
+
readonly services: v.OptionalSchema<v.ObjectSchema<{
|
|
952
1583
|
readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
953
1584
|
readonly contractVersion: v.LiteralSchema<"1", undefined>;
|
|
954
1585
|
}, undefined>, undefined>;
|
|
955
1586
|
/** Where people manage their plan and buy credits; absent when the deployment does not bill. */
|
|
956
1587
|
readonly billing: v.OptionalSchema<v.ObjectSchema<{
|
|
957
|
-
readonly
|
|
1588
|
+
readonly endpoint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1589
|
+
readonly contractVersion: v.LiteralSchema<"1", undefined>;
|
|
1590
|
+
}, undefined>, undefined>;
|
|
1591
|
+
/** The community gallery; absent when the deployment has none. */
|
|
1592
|
+
readonly community: v.OptionalSchema<v.ObjectSchema<{
|
|
1593
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1594
|
+
}, undefined>, undefined>;
|
|
1595
|
+
readonly legal: v.OptionalSchema<v.ObjectSchema<{
|
|
1596
|
+
readonly termsURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
|
|
1597
|
+
readonly privacyURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
|
|
1598
|
+
readonly termsVersion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1599
|
+
readonly requireAcceptance: v.BooleanSchema<undefined>;
|
|
1600
|
+
readonly abuseEmail: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
|
|
1601
|
+
readonly minimumAge: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
1602
|
+
}, undefined>, undefined>;
|
|
1603
|
+
readonly branding: v.OptionalSchema<v.ObjectSchema<{
|
|
1604
|
+
readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
|
|
1605
|
+
readonly logoURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
|
|
1606
|
+
readonly helpURL: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
|
|
958
1607
|
}, undefined>, undefined>;
|
|
959
1608
|
}, undefined>;
|
|
960
1609
|
type CloudDiscovery = v.InferOutput<typeof cloudDiscoverySchema>;
|
|
@@ -968,6 +1617,13 @@ declare const CLOUD_PROTOCOL_MAX_UPLOAD_BYTES: number;
|
|
|
968
1617
|
declare function isCloudChecksum(value: string): boolean;
|
|
969
1618
|
/** The most images one revision, or one request for image uploads, may name. */
|
|
970
1619
|
declare const CLOUD_MAX_DOCUMENT_IMAGES = 10000;
|
|
1620
|
+
/**
|
|
1621
|
+
* The most a Cloud API request body may hold; a server refuses anything past it before reading
|
|
1622
|
+
* it. Files go to the object store, never through the API, so only lists grow large: a save's
|
|
1623
|
+
* images fit with room to spare, and a client commits image uploads, whose part lists can run
|
|
1624
|
+
* long, in batches under half of it.
|
|
1625
|
+
*/
|
|
1626
|
+
declare const CLOUD_API_MAX_BODY_BYTES: number;
|
|
971
1627
|
/**
|
|
972
1628
|
* An image's name inside a `.fig` file that Cloud stores apart from it: the SHA-1 Figma names it
|
|
973
1629
|
* by, or an older plain name. A client leaves images under other names inside the file.
|
|
@@ -1044,6 +1700,39 @@ declare const sharedDocumentSchema: v.ObjectSchema<{
|
|
|
1044
1700
|
readonly updatedAt: v.StringSchema<undefined>;
|
|
1045
1701
|
}, undefined>;
|
|
1046
1702
|
type SharedDocument = v.InferOutput<typeof sharedDocumentSchema>;
|
|
1703
|
+
/**
|
|
1704
|
+
* A document in Trash the person may restore: who deleted it and when, and when it goes for good.
|
|
1705
|
+
* `canPurge` says whether they may also delete it for good before then.
|
|
1706
|
+
*/
|
|
1707
|
+
declare const trashedDocumentSchema: v.ObjectSchema<{
|
|
1708
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1709
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1710
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
1711
|
+
readonly name: v.StringSchema<undefined>;
|
|
1712
|
+
readonly kind: v.OptionalSchema<v.PicklistSchema<["design", "board"], undefined>, "design">;
|
|
1713
|
+
readonly deletedAt: v.StringSchema<undefined>;
|
|
1714
|
+
readonly deletedBy: v.NullableSchema<v.ObjectSchema<{
|
|
1715
|
+
readonly name: v.StringSchema<undefined>;
|
|
1716
|
+
}, undefined>, undefined>;
|
|
1717
|
+
readonly purgeAt: v.StringSchema<undefined>;
|
|
1718
|
+
readonly canPurge: v.BooleanSchema<undefined>;
|
|
1719
|
+
}, undefined>;
|
|
1720
|
+
type TrashedDocument = v.InferOutput<typeof trashedDocumentSchema>;
|
|
1721
|
+
declare const trashSchema: v.ObjectSchema<{
|
|
1722
|
+
readonly documents: v.ArraySchema<v.ObjectSchema<{
|
|
1723
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1724
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1725
|
+
readonly workspaceName: v.StringSchema<undefined>;
|
|
1726
|
+
readonly name: v.StringSchema<undefined>;
|
|
1727
|
+
readonly kind: v.OptionalSchema<v.PicklistSchema<["design", "board"], undefined>, "design">;
|
|
1728
|
+
readonly deletedAt: v.StringSchema<undefined>;
|
|
1729
|
+
readonly deletedBy: v.NullableSchema<v.ObjectSchema<{
|
|
1730
|
+
readonly name: v.StringSchema<undefined>;
|
|
1731
|
+
}, undefined>, undefined>;
|
|
1732
|
+
readonly purgeAt: v.StringSchema<undefined>;
|
|
1733
|
+
readonly canPurge: v.BooleanSchema<undefined>;
|
|
1734
|
+
}, undefined>, undefined>;
|
|
1735
|
+
}, undefined>;
|
|
1047
1736
|
declare const documentDownloadSchema: v.ObjectSchema<{
|
|
1048
1737
|
readonly document: v.ObjectSchema<{
|
|
1049
1738
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -1307,7 +1996,10 @@ type RequestSharedImageLinksInput = v.InferOutput<typeof requestSharedImageLinks
|
|
|
1307
1996
|
declare function parseRequestSharedImageLinks(input: unknown): RequestSharedImageLinksInput;
|
|
1308
1997
|
declare const resolvedDocumentShareSchema: v.ObjectSchema<{
|
|
1309
1998
|
readonly documentId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1999
|
+
/** What this person may do; a guest on an edit link may only view where guests may not edit. */
|
|
1310
2000
|
readonly permission: v.PicklistSchema<["view", "edit"], undefined>;
|
|
2001
|
+
/** What the link lets someone signed in to the server do. */
|
|
2002
|
+
readonly linkPermission: v.PicklistSchema<["view", "edit"], undefined>;
|
|
1311
2003
|
readonly principal: v.VariantSchema<"kind", [v.ObjectSchema<{
|
|
1312
2004
|
readonly kind: v.LiteralSchema<"user", undefined>;
|
|
1313
2005
|
readonly userId: v.StringSchema<undefined>;
|
|
@@ -1356,10 +2048,6 @@ declare const acceptedInvitationSchema: v.VariantSchema<"kind", [v.ObjectSchema<
|
|
|
1356
2048
|
readonly role: v.PicklistSchema<["viewer", "editor", "admin"], undefined>;
|
|
1357
2049
|
}, undefined>], undefined>;
|
|
1358
2050
|
type AcceptedInvitation = v.InferOutput<typeof acceptedInvitationSchema>;
|
|
1359
|
-
declare const lookupCloudUserSchema: v.ObjectSchema<{
|
|
1360
|
-
readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.ToLowerCaseAction, v.EmailAction<string, undefined>]>;
|
|
1361
|
-
}, undefined>;
|
|
1362
|
-
type LookupCloudUserInput = v.InferOutput<typeof lookupCloudUserSchema>;
|
|
1363
2051
|
declare const putDocumentGrantSchema: v.ObjectSchema<{
|
|
1364
2052
|
readonly permission: v.PicklistSchema<["view", "edit"], undefined>;
|
|
1365
2053
|
}, undefined>;
|
|
@@ -1411,7 +2099,6 @@ declare const documentInvitationSchema: v.ObjectSchema<{
|
|
|
1411
2099
|
}, undefined>;
|
|
1412
2100
|
type DocumentInvitation = v.InferOutput<typeof documentInvitationSchema>;
|
|
1413
2101
|
declare function parseCreateInvitationContinuation(input: unknown): CreateInvitationContinuationInput;
|
|
1414
|
-
declare function parseLookupCloudUser(input: unknown): LookupCloudUserInput;
|
|
1415
2102
|
declare function parseCreateDocumentShare(input: unknown): CreateDocumentShareInput;
|
|
1416
2103
|
declare function parseUpdateDocumentShare(input: unknown): UpdateDocumentShareInput;
|
|
1417
2104
|
declare function parseResolveDocumentShare(input: unknown): ResolveDocumentShareInput;
|
|
@@ -1533,8 +2220,13 @@ declare function parseUpdateWorkspaceMember(input: unknown): UpdateWorkspaceMemb
|
|
|
1533
2220
|
//#region src/contract/links.d.ts
|
|
1534
2221
|
/** The two kinds of Cloud link that carry a secret: invitations and documents shared by link. */
|
|
1535
2222
|
type CloudLinkKind = 'invitations' | 'share';
|
|
1536
|
-
/**
|
|
1537
|
-
|
|
2223
|
+
/**
|
|
2224
|
+
* Every kind of Cloud link: those that carry a secret, a document's address for members, and a
|
|
2225
|
+
* document of the server's community gallery, which anyone may open.
|
|
2226
|
+
*/
|
|
2227
|
+
type CloudLinkPathKind = CloudLinkKind | 'documents' | 'community';
|
|
2228
|
+
/** The server's community gallery: every document in it, each with a page of its own. */
|
|
2229
|
+
declare const CLOUD_COMMUNITY_PATH = "/community";
|
|
1538
2230
|
/** An invitation to a document or a workspace, `/invitations/:id#token`. */
|
|
1539
2231
|
declare function cloudInvitationURL(serverURL: string, invitationId: string, token: string): string;
|
|
1540
2232
|
/** A document shared by link, `/share/:id#secret`. */
|
|
@@ -1545,6 +2237,14 @@ declare function cloudShareURL(serverURL: string, shareId: string, secret: strin
|
|
|
1545
2237
|
*/
|
|
1546
2238
|
declare function cloudDocumentURL(serverURL: string, documentId: string, versionId?: string | null): string;
|
|
1547
2239
|
declare function cloudDocumentPath(documentId: string): string;
|
|
2240
|
+
/**
|
|
2241
|
+
* A document of the server's community gallery opened in the editor, `/community/:id/open`, or
|
|
2242
|
+
* one of its named versions with `?version=…`, which anyone opens read-only without signing in.
|
|
2243
|
+
*/
|
|
2244
|
+
declare function cloudCommunityURL(serverURL: string, documentId: string, versionId?: string | null): string;
|
|
2245
|
+
declare function cloudCommunityPath(documentId: string): string;
|
|
2246
|
+
/** A community document's page on the server: its preview, versions, and ways to open it. */
|
|
2247
|
+
declare function cloudCommunityPagePath(documentId: string): string;
|
|
1548
2248
|
/**
|
|
1549
2249
|
* The kind and ID of a Cloud link's path, or null for any other path. The ID is decoded; a broken
|
|
1550
2250
|
* escape such as `%E0` is no link.
|
|
@@ -1559,6 +2259,11 @@ declare function parseCloudLinkPath(pathname: string): {
|
|
|
1559
2259
|
* `desktop/src/launch/links.rs` validates it before the editor sees it.
|
|
1560
2260
|
*/
|
|
1561
2261
|
declare function cloudDesktopLinkURL(kind: CloudLinkKind, id: string, serverURL: string, secret: string): string;
|
|
2262
|
+
/**
|
|
2263
|
+
* The desktop app's form of a community document's link, `openpencil://cloud?url=<link>`: the
|
|
2264
|
+
* editor's address for it, with the named version it asks for, if any. It carries no secret.
|
|
2265
|
+
*/
|
|
2266
|
+
declare function cloudCommunityDesktopLinkURL(documentId: string, serverURL: string, versionId?: string | null): string;
|
|
1562
2267
|
//#endregion
|
|
1563
2268
|
//#region src/contract/portal.d.ts
|
|
1564
2269
|
/**
|
|
@@ -1568,6 +2273,11 @@ declare function cloudDesktopLinkURL(kind: CloudLinkKind, id: string, serverURL:
|
|
|
1568
2273
|
* paths, and the editor's `index.html` at the root and at any other page the API does not answer.
|
|
1569
2274
|
*/
|
|
1570
2275
|
declare const CLOUD_PORTAL_PAGE_ROOTS: readonly ["/welcome", "/auth", "/account", "/admin"];
|
|
2276
|
+
/**
|
|
2277
|
+
* The community gallery's pages, which the portal serves too: the gallery at `/community` and a
|
|
2278
|
+
* document's page at `/community/:id`. The editor opens a document at `/community/:id/open`.
|
|
2279
|
+
*/
|
|
2280
|
+
declare const CLOUD_PORTAL_COMMUNITY_PAGES: readonly ["/community", "/community/:documentId"];
|
|
1571
2281
|
declare function isCloudPortalPage(path: string): boolean;
|
|
1572
2282
|
//#endregion
|
|
1573
2283
|
//#region src/contract/versions.d.ts
|
|
@@ -1751,5 +2461,152 @@ declare function parseSaveDocumentVersion(input: unknown): SaveDocumentVersionIn
|
|
|
1751
2461
|
declare function parseUpdateDocumentVersion(input: unknown): UpdateDocumentVersionInput;
|
|
1752
2462
|
declare function parseDuplicateDocumentVersion(input: unknown): DuplicateDocumentVersionInput;
|
|
1753
2463
|
//#endregion
|
|
1754
|
-
|
|
2464
|
+
//#region src/contract/community.d.ts
|
|
2465
|
+
/**
|
|
2466
|
+
* Where a community document's thumbnail is served, by its document and revision: the address
|
|
2467
|
+
* changes with each save, so a cached copy never shows an older state.
|
|
2468
|
+
*/
|
|
2469
|
+
declare const COMMUNITY_THUMBNAIL_PATH = "/api/community/thumbnails";
|
|
2470
|
+
declare function communityThumbnailPath(documentId: string, revisionId: string): string;
|
|
2471
|
+
/** A version of a community document someone named, such as the release it was published for. */
|
|
2472
|
+
declare const communityVersionSchema: v.ObjectSchema<{
|
|
2473
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2474
|
+
readonly name: v.StringSchema<undefined>;
|
|
2475
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2476
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
2477
|
+
/** Whether the document holds this version now, with nothing changed since it was named. */
|
|
2478
|
+
readonly current: v.BooleanSchema<undefined>;
|
|
2479
|
+
}, undefined>;
|
|
2480
|
+
type CommunityVersion = v.InferOutput<typeof communityVersionSchema>;
|
|
2481
|
+
/**
|
|
2482
|
+
* A document in the deployment's community workspace, which anyone may open read-only: its name,
|
|
2483
|
+
* when it last changed, its thumbnail's path on the server, and its named versions, newest first.
|
|
2484
|
+
*/
|
|
2485
|
+
declare const communityDocumentSchema: v.ObjectSchema<{
|
|
2486
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2487
|
+
readonly name: v.StringSchema<undefined>;
|
|
2488
|
+
readonly kind: v.PicklistSchema<["design", "board"], undefined>;
|
|
2489
|
+
readonly updatedAt: v.StringSchema<undefined>;
|
|
2490
|
+
readonly revisionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2491
|
+
readonly thumbnailPath: v.StringSchema<undefined>;
|
|
2492
|
+
readonly versions: v.ArraySchema<v.ObjectSchema<{
|
|
2493
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2494
|
+
readonly name: v.StringSchema<undefined>;
|
|
2495
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2496
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
2497
|
+
/** Whether the document holds this version now, with nothing changed since it was named. */
|
|
2498
|
+
readonly current: v.BooleanSchema<undefined>;
|
|
2499
|
+
}, undefined>, undefined>;
|
|
2500
|
+
}, undefined>;
|
|
2501
|
+
type CommunityDocument = v.InferOutput<typeof communityDocumentSchema>;
|
|
2502
|
+
/** The community workspace's documents, most recently changed first. */
|
|
2503
|
+
declare const communityDocumentsSchema: v.ObjectSchema<{
|
|
2504
|
+
readonly documents: v.ArraySchema<v.ObjectSchema<{
|
|
2505
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2506
|
+
readonly name: v.StringSchema<undefined>;
|
|
2507
|
+
readonly kind: v.PicklistSchema<["design", "board"], undefined>;
|
|
2508
|
+
readonly updatedAt: v.StringSchema<undefined>;
|
|
2509
|
+
readonly revisionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2510
|
+
readonly thumbnailPath: v.StringSchema<undefined>;
|
|
2511
|
+
readonly versions: v.ArraySchema<v.ObjectSchema<{
|
|
2512
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2513
|
+
readonly name: v.StringSchema<undefined>;
|
|
2514
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2515
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
2516
|
+
/** Whether the document holds this version now, with nothing changed since it was named. */
|
|
2517
|
+
readonly current: v.BooleanSchema<undefined>;
|
|
2518
|
+
}, undefined>, undefined>;
|
|
2519
|
+
}, undefined>, undefined>;
|
|
2520
|
+
}, undefined>;
|
|
2521
|
+
type CommunityDocuments = v.InferOutput<typeof communityDocumentsSchema>;
|
|
2522
|
+
/** Which state of a community document to open: a named version, or else the latest. */
|
|
2523
|
+
declare const communityDownloadQuerySchema: v.ObjectSchema<{
|
|
2524
|
+
readonly version: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
2525
|
+
}, undefined>;
|
|
2526
|
+
type CommunityDownloadQuery = v.InferOutput<typeof communityDownloadQuerySchema>;
|
|
2527
|
+
declare function parseCommunityDownloadQuery(input: unknown): CommunityDownloadQuery;
|
|
2528
|
+
/** A community document, or one of its named versions, with where to download it. */
|
|
2529
|
+
declare const communityDownloadSchema: v.ObjectSchema<{
|
|
2530
|
+
readonly document: v.ObjectSchema<{
|
|
2531
|
+
readonly document: v.ObjectSchema<{
|
|
2532
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2533
|
+
readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2534
|
+
readonly name: v.StringSchema<undefined>;
|
|
2535
|
+
readonly kind: v.OptionalSchema<v.PicklistSchema<["design", "board"], undefined>, "design">;
|
|
2536
|
+
readonly currentRevisionId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
2537
|
+
readonly version: v.NumberSchema<undefined>;
|
|
2538
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
2539
|
+
readonly updatedAt: v.StringSchema<undefined>;
|
|
2540
|
+
}, undefined>;
|
|
2541
|
+
readonly revisionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2542
|
+
readonly byteSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
2543
|
+
readonly checksum: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
2544
|
+
readonly contentType: v.StringSchema<undefined>;
|
|
2545
|
+
readonly download: v.ObjectSchema<{
|
|
2546
|
+
readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2547
|
+
readonly method: v.LiteralSchema<"GET", undefined>;
|
|
2548
|
+
readonly headers: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
2549
|
+
readonly expiresAt: v.StringSchema<undefined>;
|
|
2550
|
+
}, undefined>;
|
|
2551
|
+
readonly images: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
2552
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
2553
|
+
readonly checksum: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
2554
|
+
readonly byteSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
2555
|
+
readonly download: v.ObjectSchema<{
|
|
2556
|
+
readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2557
|
+
readonly method: v.LiteralSchema<"GET", undefined>;
|
|
2558
|
+
readonly headers: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
2559
|
+
readonly expiresAt: v.StringSchema<undefined>;
|
|
2560
|
+
}, undefined>;
|
|
2561
|
+
}, undefined>, undefined>, v.MaxLengthAction<{
|
|
2562
|
+
name: string;
|
|
2563
|
+
checksum: string;
|
|
2564
|
+
byteSize: number;
|
|
2565
|
+
download: {
|
|
2566
|
+
url: string;
|
|
2567
|
+
method: "GET";
|
|
2568
|
+
headers: {
|
|
2569
|
+
[x: string]: string;
|
|
2570
|
+
};
|
|
2571
|
+
expiresAt: string;
|
|
2572
|
+
};
|
|
2573
|
+
}[], 10000, undefined>]>;
|
|
2574
|
+
}, undefined>;
|
|
2575
|
+
readonly version: v.NullableSchema<v.ObjectSchema<{
|
|
2576
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2577
|
+
readonly name: v.StringSchema<undefined>;
|
|
2578
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2579
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
2580
|
+
/** Whether the document holds this version now, with nothing changed since it was named. */
|
|
2581
|
+
readonly current: v.BooleanSchema<undefined>;
|
|
2582
|
+
}, undefined>, undefined>;
|
|
2583
|
+
}, undefined>;
|
|
2584
|
+
type CommunityDownload = v.InferOutput<typeof communityDownloadSchema>;
|
|
2585
|
+
//#endregion
|
|
2586
|
+
//#region src/contract/reports.d.ts
|
|
2587
|
+
/** Why someone reports a document shared with them. */
|
|
2588
|
+
declare const documentReportReasonSchema: v.PicklistSchema<["spam-phishing", "illegal", "copyright", "harassment", "other"], undefined>;
|
|
2589
|
+
type DocumentReportReason = v.InferOutput<typeof documentReportReasonSchema>;
|
|
2590
|
+
/** How long a report's description may be. */
|
|
2591
|
+
declare const DOCUMENT_REPORT_DESCRIPTION_MAX = 2000;
|
|
2592
|
+
/**
|
|
2593
|
+
* A report about a document someone opened from a share link: the link's secret proves they can
|
|
2594
|
+
* see it, as resolving the link does, and a guest names themselves as they do there.
|
|
2595
|
+
*/
|
|
2596
|
+
declare const fileDocumentReportSchema: v.ObjectSchema<{
|
|
2597
|
+
readonly secret: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 32, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
|
|
2598
|
+
readonly guestId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 16, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
|
|
2599
|
+
readonly reason: v.PicklistSchema<["spam-phishing", "illegal", "copyright", "harassment", "other"], undefined>;
|
|
2600
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2601
|
+
/** Where an administrator may answer; optional, and never shown to the document's people. */
|
|
2602
|
+
readonly replyEmail: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.ToLowerCaseAction, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 254, undefined>]>, undefined>;
|
|
2603
|
+
}, undefined>;
|
|
2604
|
+
type FileDocumentReportInput = v.InferOutput<typeof fileDocumentReportSchema>;
|
|
2605
|
+
declare function parseFileDocumentReport(input: unknown): FileDocumentReportInput;
|
|
2606
|
+
/** What filing a report answers: that it arrived, and nothing about the document. */
|
|
2607
|
+
declare const fileDocumentReportResponseSchema: v.ObjectSchema<{
|
|
2608
|
+
readonly received: v.LiteralSchema<true, undefined>;
|
|
2609
|
+
}, undefined>;
|
|
2610
|
+
//#endregion
|
|
2611
|
+
export { AcceptDocumentInvitationInput, AcceptedInvitation, AccountEntitlements, AccountSecurityErrorCode, AdminAuditEvent, AdminErrorCode, AdminOperations, BILLING_ERROR_STATUS, BillingAccount, BillingCatalog, BillingError, BillingErrorCode, BillingPlan, BillingRedirect, BillingToken, BillingTokenClaims, CLOUD_ACCESS_TOKEN_MAX_DAYS, CLOUD_ACCESS_TOKEN_NAME_MAX_LENGTH, CLOUD_ACCESS_TOKEN_PREFIX, CLOUD_ACCOUNT_PLAN_PATH, CLOUD_API_MAX_BODY_BYTES, CLOUD_BILLING_API_PATHS, CLOUD_BILLING_CONTRACT_VERSION, CLOUD_BILLING_TOKEN_AUDIENCE, CLOUD_COMMUNITY_PATH, CLOUD_DISCOVERY_PATH, CLOUD_DOCUMENT_NAME_MAX_LENGTH, CLOUD_EDITOR_VERSION_HEADER, CLOUD_IMAGE_NAME_PATTERN, CLOUD_MAX_DOCUMENT_IMAGES, CLOUD_PICTURE_MAX_BYTES, CLOUD_PICTURE_SIZE, CLOUD_PORTAL_COMMUNITY_PAGES, CLOUD_PORTAL_PAGE_ROOTS, CLOUD_PROTOCOL_MAX_UPLOAD_BYTES, CLOUD_PROTOCOL_VERSION, CLOUD_SERVICES_API_PATHS, CLOUD_SERVICES_CONTRACT_VERSION, CLOUD_SERVICES_JWKS_PATH, CLOUD_SERVICES_TOKEN_AUDIENCE, COLLAB_ACTIONS, COMMUNITY_THUMBNAIL_PATH, ChatModel, CheckoutRequest, CloudAccessToken, CloudAccessTokenCreate, CloudAccountDeletion, CloudAccountSession, CloudAccountStatus, CloudActorContract, CloudAdminAuditFilter, CloudAdminDocument, CloudAdminDocumentFilter, CloudAdminEmailFilter, CloudAdminReport, CloudAdminReportFilter, CloudAdminReportStatus, CloudAdminSessionResponse, CloudAdminUser, CloudAdminUserDetail, CloudAdminUserFilter, CloudAdminUsers, CloudAuthentication, CloudAuthenticationMethod, CloudAuthenticationMethods, CloudAuthenticationProvider, CloudBillingAPI, CloudBillingDiscovery, CloudBillingSchema, CloudBranding, CloudCapabilities, CloudCommunityDiscovery, CloudDeployment, CloudDiscovery, CloudLegalDiscovery, CloudLinkKind, CloudLinkPathKind, CloudListing, CloudPresence, CloudProfile, CloudServicesAPI, CloudServicesDiscovery, CloudServicesSchema, CloudSession, CloudSignIn, CloudSignInMethod, CloudUserProfile, CollaborationPrincipal, CollaborationTicket, CommitImageUploadsInput, CommitUploadInput, CommitUploadRequest, CommunityDocument, CommunityDocuments, CommunityDownload, CommunityDownloadQuery, CommunityVersion, CreateDocumentInput, CreateDocumentInvitationInput, CreateDocumentRequest, CreateDocumentShareInput, CreateInvitationContinuationInput, CreateServicesTokenInput, CreateUploadInput, CreateWorkspaceInput, CreateWorkspaceInvitationInput, CreatedWorkspaceInvitation, CreditBucket, CreditPack, CreditWallet, DOCUMENT_REPORT_DESCRIPTION_MAX, DOCUMENT_VERSION_DESCRIPTION_MAX_LENGTH, DOCUMENT_VERSION_NAME_MAX_LENGTH, DocumentAccess, DocumentAccessSource, DocumentDownload, DocumentGrant, DocumentImageDownload, DocumentImageLink, DocumentInvitation, DocumentPermission, DocumentReportReason, DocumentShare, DocumentSummary, DocumentVersion, DocumentVersionDownload, DocumentVersionKind, DocumentVersions, DuplicateDocumentVersionInput, Enrollment, EnrollmentStatus, FileDocumentReportInput, ImageUploadOffer, InvitationContinuation, InvitationPreview, MAX_COLLAB_MESSAGE_BYTES, MAX_PRESENCE_NAME_LENGTH, MAX_SEARCH_QUERY_LENGTH, MAX_SEARCH_RESULTS, ObjectUploadTarget, PutDocumentGrantInput, RELAY_CLOSE, RELAY_DOCUMENT_PARAM, RELAY_FORWARDING_BYTES, RELAY_FRAGMENT_BYTES, RELAY_HEARTBEAT, RELAY_MINIMUM_MESSAGE_BYTES, RELAY_PATH, RELAY_SERVER_PEER, RelayAssembly, RelayClientFrame, RelayServerFrame, RequestImageLinksInput, RequestImageUploadsInput, RequestSharedImageLinksInput, ResolveDocumentShareInput, ResolvedDocumentShare, SERVICE_ERROR_STATUS, SaveDocumentVersionInput, SearchPricing, SearchRequest, SearchRequestInput, SearchResponse, SearchResult, ServiceCatalog, ServiceError, ServiceErrorCode, ServicesToken, ServicesTokenClaims, SharedDocument, TransactionalEmailAdmin, TrashedDocument, UpdateDocumentShareInput, UpdateDocumentVersionInput, UpdateWorkspaceInput, UpdateWorkspaceMemberInput, UsageEntry, UsagePage, UsageQuery, WorkspaceEntitlements, WorkspaceInvitation, WorkspaceList, WorkspaceMember, WorkspaceMembers, WorkspaceRole, WorkspaceSummary, WorkspaceUsage, acceptDocumentInvitationSchema, acceptedInvitationSchema, accountEntitlementsResponseSchema, accountEntitlementsSchema, accountSecurityErrorCodeSchema, accountSecurityErrorResponseSchema, adminAuditEventSchema, adminAuditResponseSchema, adminEmailResponseSchema, adminErrorCodeSchema, adminErrorResponseSchema, adminMutationResponseSchema, adminOperationsResponseSchema, billingAccountSchema, billingCatalogSchema, billingErrorCodeSchema, billingErrorSchema, billingPlanSchema, billingRedirectSchema, billingTokenClaimsSchema, billingTokenSchema, chatModelSchema, checkoutRequestSchema, cloudAccessTokenCreateSchema, cloudAccessTokenCreatedResponseSchema, cloudAccessTokenRevokeSchema, cloudAccessTokenSchema, cloudAccessTokensResponseSchema, cloudAccountDeleteSchema, cloudAccountDeletionDocumentSchema, cloudAccountDeletionResponseSchema, cloudAccountDeletionSchema, cloudAccountDeletionWorkspaceSchema, cloudAccountMutationResponseSchema, cloudAccountSessionSchema, cloudAccountSessionsResponseSchema, cloudAccountStateSchema, cloudAccountStatusResponseSchema, cloudActorSchema, cloudAdminAuditFilterSchema, cloudAdminDocumentFilterSchema, cloudAdminDocumentSchema, cloudAdminDocumentsResponseSchema, cloudAdminEmailFilterSchema, cloudAdminReportFilterSchema, cloudAdminReportSchema, cloudAdminReportStatusSchema, cloudAdminReportsResponseSchema, cloudAdminSessionResponseSchema, cloudAdminUserDetailSchema, cloudAdminUserFilterSchema, cloudAdminUserSchema, cloudAdminUsersResponseSchema, cloudAuthenticationMethodSchema, cloudAuthenticationMethodsResponseSchema, cloudAuthenticationProviderSchema, cloudAuthenticationSchema, cloudBillingDiscoverySchema, cloudBrandingSchema, cloudCapabilitiesSchema, cloudCommunityDesktopLinkURL, cloudCommunityDiscoverySchema, cloudCommunityPagePath, cloudCommunityPath, cloudCommunityURL, cloudDeploymentSchema, cloudDesktopLinkURL, cloudDiscoverySchema, cloudDocumentPath, cloudDocumentURL, cloudEditorVersionSchema, cloudEmailChangeSchema, cloudIdentitySchema, cloudInvitationURL, cloudLanguageTagSchema, cloudLegalDiscoverySchema, cloudListingSchema, cloudLocaleUpdateSchema, cloudMFAEnableResponseSchema, cloudMFAEnableSchema, cloudMFARecoveryCodesResponseSchema, cloudMFAStatusResponseSchema, cloudMFAStatusSchema, cloudMFAVerifyResponseSchema, cloudMFAVerifySchema, cloudPasskeyDeleteSchema, cloudPasskeySchema, cloudPasskeysResponseSchema, cloudPasswordChangeSchema, cloudPersonSchema, cloudPictureResponseSchema, cloudPictureUploadSchema, cloudPresenceSchema, cloudProfileResponseSchema, cloudProfileSchema, cloudProfileUpdateSchema, cloudServerOrigin, cloudServicesDiscoverySchema, cloudSessionRevokeSchema, cloudSessionSchema, cloudShareURL, cloudSignInMethodSchema, cloudSignInSchema, cloudSignInsResponseSchema, cloudSocialLinkResponseSchema, cloudSocialLinkSchema, cloudTermsAcceptanceSchema, cloudUnlinkAuthenticationMethodSchema, cloudUserProfileSchema, collaborationPrincipalSchema, collaborationTicketSchema, commitImageUploadsSchema, commitUploadSchema, communityDocumentSchema, communityDocumentsSchema, communityDownloadQuerySchema, communityDownloadSchema, communityThumbnailPath, communityVersionSchema, createDocumentInvitationSchema, createDocumentSchema, createDocumentShareSchema, createInvitationContinuationSchema, createRelayClientAssembler, createRelayServerAssembler, createServicesTokenSchema, createUploadSchema, createWorkspaceInvitationSchema, createWorkspaceSchema, createdWorkspaceInvitationSchema, creditBucketSchema, creditPackSchema, creditWalletSchema, decodeRelayClientFrame, decodeRelayServerFrame, decodeRoomUpdate, defaultRelayURL, documentAccessSchema, documentAccessSourceSchema, documentDownloadSchema, documentGrantSchema, documentImageDownloadSchema, documentImageLinkSchema, documentInvitationSchema, documentPermissionSchema, documentReportReasonSchema, documentShareSchema, documentSummarySchema, documentVersionDownloadSchema, documentVersionKindSchema, documentVersionResponseSchema, documentVersionSchema, documentVersionsSchema, duplicateDocumentVersionSchema, encodeRelayClientFrame, encodeRelayServerFrame, encodeSyncReply, enrollmentReviewResponseSchema, enrollmentSchema, enrollmentStatusSchema, enrollmentsResponseSchema, fileDocumentReportResponseSchema, fileDocumentReportSchema, imageUploadOfferSchema, invitationContinuationSchema, invitationPreviewSchema, isCloudChecksum, isCloudPortalPage, isEditorVersionAtLeast, objectUploadSchema, parseAcceptDocumentInvitation, parseCloudAccessTokenCreate, parseCloudAccessTokenRevoke, parseCloudAccountDelete, parseCloudDiscovery, parseCloudEmailChange, parseCloudLinkPath, parseCloudLocaleUpdate, parseCloudMFAEnable, parseCloudMFAVerify, parseCloudPasskeyDelete, parseCloudPasswordChange, parseCloudPictureUpload, parseCloudProfileUpdate, parseCloudSessionRevoke, parseCloudSocialLink, parseCloudTermsAcceptance, parseCloudUnlinkAuthenticationMethod, parseCommitImageUploads, parseCommitUpload, parseCommunityDownloadQuery, parseCreateDocument, parseCreateDocumentInvitation, parseCreateDocumentShare, parseCreateInvitationContinuation, parseCreateServicesToken, parseCreateUpload, parseCreateWorkspace, parseCreateWorkspaceInvitation, parseDuplicateDocumentVersion, parseFileDocumentReport, parsePutDocumentGrant, parseRequestImageLinks, parseRequestImageUploads, parseRequestSharedImageLinks, parseResolveDocumentShare, parseSaveDocumentVersion, parseSearchRequest, parseUpdateDocumentShare, parseUpdateDocumentVersion, parseUpdateWorkspace, parseUpdateWorkspaceMember, parseUsageQuery, presenceName, putDocumentGrantSchema, relayClientMessages, relayServerMessages, requestImageLinksSchema, requestImageUploadsSchema, requestSharedImageLinksSchema, resolveDocumentShareSchema, resolvedDocumentShareSchema, restoredDocumentSchema, saveDocumentVersionSchema, searchPricingSchema, searchRequestSchema, searchResponseSchema, searchResultSchema, sendsTokenSafely, serviceCatalogSchema, serviceErrorCodeSchema, serviceErrorSchema, servicesTokenClaimsSchema, servicesTokenSchema, sharedDocumentSchema, transactionalEmailAdminSchema, trashSchema, trashedDocumentSchema, updateDocumentShareSchema, updateDocumentVersionSchema, updateWorkspaceMemberSchema, updateWorkspaceSchema, usageEntrySchema, usagePageSchema, usageQuerySchema, workspaceEntitlementsSchema, workspaceInvitationSchema, workspaceListSchema, workspaceMemberSchema, workspaceMembersSchema, workspaceRoleSchema, workspaceSummarySchema, workspaceUsageSchema };
|
|
1755
2612
|
//# sourceMappingURL=index.d.ts.map
|