@open-pencil/cloud 0.17.0-beta.4 → 0.17.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/bin/server.mjs +1 -1
- package/dist/bin/server.mjs.map +1 -1
- package/dist/bin/services.mjs +1 -1
- package/dist/bin/services.mjs.map +1 -1
- package/dist/client.d.ts +783 -47
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1651 -382
- package/dist/client.js.map +1 -1
- package/dist/contract.d.ts +2 -2
- package/dist/contract.js +2 -2
- package/dist/contract2.js +701 -45
- package/dist/contract2.js.map +1 -1
- package/dist/email.d.ts +2138 -34
- package/dist/email.d.ts.map +1 -1
- package/dist/email.js +4343 -306
- package/dist/email.js.map +1 -1
- package/dist/errors.d.ts +2 -0
- package/dist/errors.js +61 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +1338 -44
- package/dist/index.d.ts.map +1 -1
- package/dist/index2.d.ts +45 -0
- package/dist/index2.d.ts.map +1 -0
- package/dist/listen.mjs +958 -340
- package/dist/listen.mjs.map +1 -1
- package/dist/runtime-cloudflare.d.ts +93 -0
- package/dist/runtime-cloudflare.d.ts.map +1 -0
- package/dist/runtime-cloudflare.js +18032 -0
- package/dist/runtime-cloudflare.js.map +1 -0
- package/dist/runtime-node.d.mts +12615 -5249
- package/dist/runtime-node.d.mts.map +1 -1
- package/dist/server.d.ts +17367 -8567
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13587 -7333
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +11601 -5401
- package/dist/server.mjs.map +1 -1
- package/dist/server2.mjs +84 -62
- package/dist/server2.mjs.map +1 -1
- package/package.json +31 -5
- package/src/admin/api/routes.ts +263 -190
- package/src/admin/audit/service.ts +11 -3
- package/src/admin/bootstrap.ts +86 -0
- package/src/admin/documents/service.ts +195 -10
- package/src/admin/email/service.ts +2 -1
- package/src/admin/enrollment/email.ts +17 -3
- package/src/admin/enrollment/service.ts +71 -10
- package/src/admin/errors.ts +5 -0
- package/src/admin/index.ts +1 -0
- package/src/admin/reports/service.ts +15 -3
- package/src/admin/schema.ts +6 -5
- package/src/admin/users/service.ts +173 -16
- package/src/client/api.ts +52 -473
- package/src/client/auth/client.ts +22 -3
- package/src/client/comments.ts +205 -0
- package/src/client/community.ts +40 -0
- package/src/client/device-authorization.ts +4 -20
- package/src/client/discovery.ts +39 -11
- package/src/client/documents.ts +160 -0
- package/src/client/files/archive.ts +60 -0
- package/src/client/files/checksum.ts +7 -0
- package/src/client/files/download.ts +122 -0
- package/src/client/files/images.ts +89 -0
- package/src/client/files/index.ts +15 -0
- package/src/client/files/objects.ts +173 -0
- package/src/client/files/save.ts +79 -0
- package/src/client/index.ts +4 -0
- package/src/client/portal/account.ts +73 -3
- package/src/client/portal/administration.ts +52 -5
- package/src/client/portal/request.ts +6 -2
- package/src/client/response.ts +21 -0
- package/src/client/schema.ts +8 -0
- package/src/client/services.ts +23 -18
- package/src/client/sharing.ts +262 -0
- package/src/client/tour.ts +44 -0
- package/src/client/versions.ts +110 -0
- package/src/contract/account.ts +111 -11
- package/src/contract/admin/index.ts +48 -3
- package/src/contract/billing.ts +235 -0
- package/src/contract/collaboration.ts +5 -0
- package/src/contract/comments.ts +223 -0
- package/src/contract/community.ts +60 -0
- package/src/contract/discovery.ts +94 -5
- package/src/contract/entitlements.ts +10 -0
- package/src/contract/index.ts +64 -5
- package/src/contract/links.ts +62 -4
- package/src/contract/locale.ts +27 -0
- package/src/contract/portal.ts +12 -1
- package/src/contract/relay.ts +3 -1
- package/src/contract/routes.ts +10 -0
- package/src/contract/services.ts +62 -20
- package/src/contract/workspaces.ts +5 -0
- package/src/email/i18n.ts +174 -0
- package/src/email/index.ts +13 -2
- package/src/email/locales/ar.json +169 -0
- package/src/email/locales/de.json +169 -0
- package/src/email/locales/es.json +169 -0
- package/src/email/locales/fr.json +169 -0
- package/src/email/locales/it.json +169 -0
- package/src/email/locales/ja.json +169 -0
- package/src/email/locales/pl.json +169 -0
- package/src/email/locales/pt-br.json +169 -0
- package/src/email/locales/ru.json +169 -0
- package/src/email/locales/zh-cn.json +169 -0
- package/src/email/messages.ts +235 -0
- package/src/email/render.ts +160 -276
- package/src/email/samples.ts +142 -0
- package/src/email/schema.ts +98 -8
- package/src/email/templates/BrandEmail.vue +56 -0
- package/src/email/templates/CommentNotification.vue +39 -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/EnrollmentInvitation.vue +53 -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 +47 -0
- package/src/email/templates/WaitlistConfirmation.vue +29 -0
- package/src/email/templates/WorkspaceInvitation.vue +28 -0
- package/src/email/templates/brand.ts +15 -61
- package/src/email/templates/localization.ts +17 -0
- package/src/errors/index.ts +6 -0
- package/src/{server/errors → errors}/posthog.ts +28 -4
- package/src/global.d.ts +7 -0
- package/src/runtime/cloudflare/email.ts +2 -0
- package/src/runtime/cloudflare/relay/index.ts +28 -7
- package/src/runtime/cloudflare/tsconfig.json +2 -1
- package/src/runtime/cloudflare/worker.ts +14 -1
- package/src/runtime/cloudflare/xml.ts +12 -0
- package/src/runtime/node/admin.ts +51 -47
- package/src/runtime/node/cleanup.ts +5 -1
- package/src/runtime/node/email/runtime.ts +1 -0
- package/src/runtime/node/email/transport.ts +14 -10
- package/src/runtime/node/main.ts +1 -1
- package/src/runtime/node/server.ts +20 -4
- package/src/runtime/node/services/main.ts +1 -1
- package/src/runtime/posthog/errors.ts +5 -2
- package/src/runtime/s3/objects.ts +17 -0
- package/src/runtime/site/community.ts +101 -0
- package/src/runtime/site/server.ts +17 -1
- package/src/server/account/actions.ts +3 -1
- package/src/server/account/deletion.ts +40 -4
- package/src/server/account/routes.ts +305 -253
- package/src/server/account/tokens.ts +57 -0
- package/src/server/api/router.ts +44 -6
- package/src/server/app/checks.ts +89 -0
- package/src/server/app/cors.ts +44 -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 +123 -0
- package/src/server/app/services.ts +219 -0
- package/src/server/auth/access-control.ts +13 -8
- package/src/server/auth/access-tokens.ts +62 -0
- package/src/server/auth/account.ts +13 -12
- package/src/server/auth/activity.ts +7 -2
- package/src/server/auth/adapter.ts +36 -3
- package/src/server/auth/email.ts +33 -18
- package/src/server/auth/endpoints.ts +4 -0
- package/src/server/auth/enrollment.ts +116 -0
- package/src/server/auth/factory.ts +165 -189
- package/src/server/auth/index.ts +1 -1
- package/src/server/auth/logger.ts +23 -0
- package/src/server/auth/methods.ts +162 -0
- package/src/server/auth/mfa-assurance.ts +190 -2
- package/src/server/auth/passwords.ts +43 -0
- package/src/server/auth/rate-limit.ts +31 -0
- package/src/server/auth/runtime.ts +19 -5
- package/src/server/auth/session.ts +2 -0
- package/src/server/auth/social-providers.ts +70 -24
- package/src/server/billing/index.ts +8 -0
- package/src/server/billing/notify.ts +55 -0
- package/src/server/billing/routes.ts +27 -0
- package/src/server/billing/seats.ts +17 -0
- package/src/server/billing/tokens.ts +37 -0
- package/src/server/cleanup/configured.ts +16 -3
- package/src/server/cleanup/documents.ts +5 -2
- package/src/server/cleanup/revisions.ts +6 -3
- package/src/server/cleanup/uploads.ts +2 -1
- package/src/server/cleanup/worker.ts +10 -1
- package/src/server/collaboration/relay/connection.ts +7 -2
- package/src/server/collaboration/relay/hub.ts +80 -166
- package/src/server/collaboration/relay/room.ts +154 -0
- package/src/server/collaboration/routes.ts +8 -5
- package/src/server/collaboration/service.ts +21 -2
- package/src/server/comments/index.ts +9 -0
- package/src/server/comments/notify.ts +277 -0
- package/src/server/comments/routes.ts +352 -0
- package/src/server/comments/rows.ts +249 -0
- package/src/server/comments/service.ts +570 -0
- package/src/server/community/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 +35 -10
- package/src/server/config/index.ts +2 -2
- package/src/server/config/public.ts +25 -6
- package/src/server/config/schema.ts +53 -293
- package/src/server/config/toml/schema.ts +330 -0
- package/src/server/db/index.ts +3 -1
- package/src/server/db/migrate.ts +33 -1
- 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/015_comments.ts +57 -0
- package/src/server/db/migrations/016_comment_notifications.ts +76 -0
- package/src/server/db/migrations/017_invitation_emails.ts +19 -0
- package/src/server/db/migrations/018_enrollment_source.ts +17 -0
- package/src/server/db/migrations/schema.ts +26 -1
- package/src/server/db/tables.ts +122 -3
- package/src/server/db/users.ts +22 -0
- package/src/server/documents/access.ts +17 -0
- package/src/server/documents/images.ts +6 -1
- package/src/server/documents/index.ts +1 -1
- package/src/server/documents/limits.ts +7 -1
- package/src/server/documents/routes.ts +12 -12
- package/src/server/documents/service.ts +31 -407
- package/src/server/documents/summary.ts +15 -0
- package/src/server/documents/uploads.ts +450 -0
- package/src/server/documents/versions/routes.ts +7 -8
- package/src/server/documents/versions/service.ts +86 -26
- package/src/server/email/invitations.ts +1 -0
- package/src/server/email/service.ts +39 -6
- package/src/server/email/types.ts +13 -0
- package/src/server/errors/index.ts +49 -12
- package/src/server/index.ts +27 -6
- package/src/server/internal/routes.ts +8 -2
- package/src/server/internal/service.ts +10 -0
- package/src/server/invitations/budget.ts +3 -1
- package/src/server/invitations/index.ts +1 -0
- package/src/server/invitations/links.ts +6 -0
- package/src/server/invitations/types.ts +5 -1
- package/src/server/objects/types.ts +5 -0
- package/src/server/pictures/service.ts +3 -1
- package/src/server/policy/configured.ts +9 -3
- package/src/server/policy/database.ts +13 -2
- package/src/server/policy/policy.ts +39 -12
- package/src/server/policy/service.ts +71 -52
- package/src/server/policy/storage.ts +33 -0
- package/src/server/policy/workspace.ts +5 -2
- package/src/server/quota/index.ts +6 -0
- package/src/server/quota/notices.ts +121 -0
- package/src/server/quota/storage.ts +5 -0
- package/src/server/rate-limit/middleware.ts +4 -0
- package/src/server/reports/index.ts +1 -0
- package/src/server/reports/replies.ts +55 -0
- package/src/server/reports/routes.ts +5 -3
- package/src/server/reports/service.ts +27 -3
- package/src/server/services/routes.ts +2 -2
- package/src/server/sharing/capabilities/service.ts +3 -4
- package/src/server/sharing/document-routes.ts +3 -3
- package/src/server/sharing/invitations/service.ts +17 -8
- package/src/server/sharing/routes.ts +15 -15
- package/src/server/validation.ts +35 -24
- package/src/server/workspaces/members.ts +57 -31
- package/src/server/workspaces/repository.ts +23 -12
- package/src/server/workspaces/routes.ts +8 -8
- package/src/services/app.ts +31 -22
- package/src/services/config.ts +48 -8
- package/src/services/metering.ts +15 -27
- package/src/services/usage.ts +6 -14
- 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/app.ts +0 -453
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as v from 'valibot'
|
|
2
|
+
|
|
3
|
+
/** Whether `tag` is a well-formed BCP 47 language tag: `de`, `pt-BR`, `zh-Hant-TW`. */
|
|
4
|
+
function isLanguageTag(tag: string): boolean {
|
|
5
|
+
try {
|
|
6
|
+
return Intl.getCanonicalLocales(tag).length === 1
|
|
7
|
+
} catch {
|
|
8
|
+
return false
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A language as the app names it, which the server writes email in when it has that language, or
|
|
14
|
+
* the nearest it has, and otherwise in English.
|
|
15
|
+
*/
|
|
16
|
+
export const cloudLanguageTagSchema = v.pipe(
|
|
17
|
+
v.string(),
|
|
18
|
+
v.maxLength(35),
|
|
19
|
+
v.check(isLanguageTag, 'Not a language tag')
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
/** The language an account's email is written in, as the app last said it uses. */
|
|
23
|
+
export const cloudLocaleUpdateSchema = v.object({ locale: cloudLanguageTagSchema })
|
|
24
|
+
|
|
25
|
+
export function parseCloudLocaleUpdate(input: unknown) {
|
|
26
|
+
return v.parse(cloudLocaleUpdateSchema, input)
|
|
27
|
+
}
|
package/src/contract/portal.ts
CHANGED
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export const CLOUD_PORTAL_PAGE_ROOTS = ['/welcome', '/auth', '/account', '/admin'] as const
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* The community gallery's pages, which the portal serves too: the gallery at `/community` and a
|
|
11
|
+
* document's page at `/community/:id`. The editor opens a document at `/community/:id/open`.
|
|
12
|
+
*/
|
|
13
|
+
export const CLOUD_PORTAL_COMMUNITY_PAGES = ['/community', '/community/:documentId'] as const
|
|
14
|
+
|
|
15
|
+
const COMMUNITY_PAGE = /^\/community(?:\/[^/]+)?\/?$/
|
|
16
|
+
|
|
9
17
|
export function isCloudPortalPage(path: string): boolean {
|
|
10
|
-
return
|
|
18
|
+
return (
|
|
19
|
+
COMMUNITY_PAGE.test(path) ||
|
|
20
|
+
CLOUD_PORTAL_PAGE_ROOTS.some((root) => path === root || path.startsWith(`${root}/`))
|
|
21
|
+
)
|
|
11
22
|
}
|
package/src/contract/relay.ts
CHANGED
|
@@ -31,7 +31,9 @@ export const COLLAB_ACTIONS = {
|
|
|
31
31
|
agentPreview: 'agent-preview',
|
|
32
32
|
upload: 'upload',
|
|
33
33
|
/** From the server only: the document's version history changed, so open lists load it again. */
|
|
34
|
-
versions: 'versions'
|
|
34
|
+
versions: 'versions',
|
|
35
|
+
/** From the server only: a comment thread changed; the payload is its ID as UTF-8. */
|
|
36
|
+
comments: 'comments'
|
|
35
37
|
} as const
|
|
36
38
|
|
|
37
39
|
/**
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TypedResponse } from 'hono'
|
|
2
|
+
import type { BlankInput, ToSchema } from 'hono/types'
|
|
3
|
+
|
|
4
|
+
/** A route's input, and the JSON it answers with a 200, as a contract's typed Hono schema names it. */
|
|
5
|
+
export type JSONRoute<
|
|
6
|
+
Method extends string,
|
|
7
|
+
Path extends string,
|
|
8
|
+
Input extends BlankInput,
|
|
9
|
+
Output
|
|
10
|
+
> = ToSchema<Method, Path, Input, TypedResponse<Output, 200, 'json'>>
|
package/src/contract/services.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Hono
|
|
2
|
-
import type { BlankEnv, BlankInput
|
|
1
|
+
import type { Hono } from 'hono'
|
|
2
|
+
import type { BlankEnv, BlankInput } from 'hono/types'
|
|
3
3
|
import * as v from 'valibot'
|
|
4
4
|
|
|
5
|
+
import type { JSONRoute } from './routes'
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* The contract between editors, Cloud, and the services Cloud advertises: AI models today, and
|
|
7
9
|
* other paid capabilities such as image generation and search as they arrive. Cloud only
|
|
@@ -37,9 +39,6 @@ export const cloudServicesDiscoverySchema = v.object({
|
|
|
37
39
|
})
|
|
38
40
|
export type CloudServicesDiscovery = v.InferOutput<typeof cloudServicesDiscoverySchema>
|
|
39
41
|
|
|
40
|
-
export const cloudBillingDiscoverySchema = v.object({ portalURL: urlSchema })
|
|
41
|
-
export type CloudBillingDiscovery = v.InferOutput<typeof cloudBillingDiscoverySchema>
|
|
42
|
-
|
|
43
42
|
export const createServicesTokenSchema = v.object({ workspaceId: v.pipe(v.string(), v.uuid()) })
|
|
44
43
|
export type CreateServicesTokenInput = v.InferOutput<typeof createServicesTokenSchema>
|
|
45
44
|
|
|
@@ -61,10 +60,9 @@ export const servicesTokenClaimsSchema = v.object({
|
|
|
61
60
|
workspaceId: v.pipe(v.string(), v.uuid()),
|
|
62
61
|
/**
|
|
63
62
|
* The account whose credits the request spends: the workspace's owner, whose allowance every
|
|
64
|
-
* workspace they own shares.
|
|
65
|
-
* a relay takes as the workspace's own allowance, as such a Cloud meant.
|
|
63
|
+
* workspace they own shares.
|
|
66
64
|
*/
|
|
67
|
-
accountId: v.
|
|
65
|
+
accountId: v.pipe(v.string(), v.minLength(1)),
|
|
68
66
|
/** Credits the owner's plan grants each month; `null` when Cloud sets no allowance. */
|
|
69
67
|
monthlyCreditAllowance: v.nullable(creditsSchema),
|
|
70
68
|
iat: v.pipe(v.number(), v.integer()),
|
|
@@ -87,11 +85,51 @@ export type ChatModel = v.InferOutput<typeof chatModelSchema>
|
|
|
87
85
|
export const searchPricingSchema = v.object({ creditsPerRequest: creditsSchema })
|
|
88
86
|
export type SearchPricing = v.InferOutput<typeof searchPricingSchema>
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
const modelIDSchema = v.pipe(v.string(), v.minLength(1))
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The model the service recommends for each of the editor's roles: Design runs the chat, Review
|
|
92
|
+
* critiques designs, Fast does quick tasks such as naming conversations, and Vision reads images.
|
|
93
|
+
* An editor signed in to the service with no model of its own yet sets itself up with them, so
|
|
94
|
+
* nobody has to choose one. Vision `null` recommends none, and the editor leaves it unassigned.
|
|
95
|
+
*/
|
|
96
|
+
export const roleModelsSchema = v.object({
|
|
97
|
+
design: modelIDSchema,
|
|
98
|
+
review: modelIDSchema,
|
|
99
|
+
fast: modelIDSchema,
|
|
100
|
+
vision: v.nullable(modelIDSchema)
|
|
94
101
|
})
|
|
102
|
+
export type RoleModels = v.InferOutput<typeof roleModelsSchema>
|
|
103
|
+
|
|
104
|
+
export const serviceCatalogSchema = v.pipe(
|
|
105
|
+
v.object({
|
|
106
|
+
models: v.array(chatModelSchema),
|
|
107
|
+
defaultModelID: modelIDSchema,
|
|
108
|
+
/**
|
|
109
|
+
* Absent from a service that predates it, or whose default model can't run the chat. Editors
|
|
110
|
+
* then use `defaultModelID` for every role, except Vision when that model reads no images,
|
|
111
|
+
* and set nothing up when it calls no tools.
|
|
112
|
+
*/
|
|
113
|
+
roleModels: v.optional(roleModelsSchema),
|
|
114
|
+
search: v.optional(searchPricingSchema)
|
|
115
|
+
}),
|
|
116
|
+
// Every recommendation names a model the catalog lists and can do its role: Design and Fast
|
|
117
|
+
// call tools, and Vision reads images. An editor then never sets up a role it can't run.
|
|
118
|
+
v.check(({ models, roleModels }) => {
|
|
119
|
+
if (!roleModels) return true
|
|
120
|
+
const can = (id: string | null, capability: 'tools' | 'vision' | null) => {
|
|
121
|
+
if (id === null) return true
|
|
122
|
+
const model = models.find((candidate) => candidate.id === id)
|
|
123
|
+
return model !== undefined && (capability === null || model.capabilities[capability])
|
|
124
|
+
}
|
|
125
|
+
return (
|
|
126
|
+
can(roleModels.design, 'tools') &&
|
|
127
|
+
can(roleModels.review, null) &&
|
|
128
|
+
can(roleModels.fast, 'tools') &&
|
|
129
|
+
can(roleModels.vision, 'vision')
|
|
130
|
+
)
|
|
131
|
+
}, 'A recommended model is not in the catalog or cannot do its role')
|
|
132
|
+
)
|
|
95
133
|
export type ServiceCatalog = v.InferOutput<typeof serviceCatalogSchema>
|
|
96
134
|
|
|
97
135
|
export const creditBucketSchema = v.object({
|
|
@@ -202,14 +240,6 @@ export const SERVICE_ERROR_STATUS = {
|
|
|
202
240
|
rate_limited: 429
|
|
203
241
|
} as const satisfies Record<ServiceErrorCode, number>
|
|
204
242
|
|
|
205
|
-
/** A route's input, and the JSON it answers with a 200. */
|
|
206
|
-
type JSONRoute<
|
|
207
|
-
Method extends string,
|
|
208
|
-
Path extends string,
|
|
209
|
-
Input extends BlankInput,
|
|
210
|
-
Output
|
|
211
|
-
> = ToSchema<Method, Path, Input, TypedResponse<Output, 200, 'json'>>
|
|
212
|
-
|
|
213
243
|
/**
|
|
214
244
|
* Every route a service answers besides chat completions, which OpenAI-compatible clients call
|
|
215
245
|
* themselves. Editors build a typed client from it with Hono's `hc`; a service's own app must
|
|
@@ -231,3 +261,15 @@ export type CloudServicesSchema = JSONRoute<
|
|
|
231
261
|
>
|
|
232
262
|
|
|
233
263
|
export type CloudServicesAPI = Hono<BlankEnv, CloudServicesSchema>
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Whether a bearer token may travel to `url`: over HTTPS, or in the clear only to a loopback
|
|
267
|
+
* address, for development. Only literal addresses count, since a name such as `localhost` is
|
|
268
|
+
* whatever the resolver answers. Services and billing tokens act as the account until they expire.
|
|
269
|
+
*/
|
|
270
|
+
export function sendsTokenSafely(url: string | URL): boolean {
|
|
271
|
+
const { protocol, hostname } = new URL(url)
|
|
272
|
+
if (protocol === 'https:') return true
|
|
273
|
+
if (protocol !== 'http:') return false
|
|
274
|
+
return hostname === '[::1]' || /^127(\.\d{1,3}){3}$/.test(hostname)
|
|
275
|
+
}
|
|
@@ -8,6 +8,11 @@ export const workspaceSummarySchema = v.object({
|
|
|
8
8
|
name: v.string(),
|
|
9
9
|
slug: v.string(),
|
|
10
10
|
role: workspaceRoleSchema,
|
|
11
|
+
/**
|
|
12
|
+
* Whether the signed-in account owns the workspace, and so pays for its plan and AI credits.
|
|
13
|
+
* Absent from servers released before it.
|
|
14
|
+
*/
|
|
15
|
+
owner: v.optional(v.boolean()),
|
|
11
16
|
createdAt: v.string(),
|
|
12
17
|
updatedAt: v.string()
|
|
13
18
|
})
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { createI18n, type Components, type Messages } from '@nanostores/i18n'
|
|
2
|
+
import { mapValues } from 'es-toolkit'
|
|
3
|
+
import { parseAccept } from 'hono/utils/accept'
|
|
4
|
+
import { atom, type StoreValue } from 'nanostores'
|
|
5
|
+
|
|
6
|
+
import ar from './locales/ar.json'
|
|
7
|
+
import de from './locales/de.json'
|
|
8
|
+
import es from './locales/es.json'
|
|
9
|
+
import fr from './locales/fr.json'
|
|
10
|
+
import it from './locales/it.json'
|
|
11
|
+
import ja from './locales/ja.json'
|
|
12
|
+
import pl from './locales/pl.json'
|
|
13
|
+
import ptBR from './locales/pt-br.json'
|
|
14
|
+
import ru from './locales/ru.json'
|
|
15
|
+
import zhCN from './locales/zh-cn.json'
|
|
16
|
+
import { emailMessageDefaults } from './messages'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Each language's translations of `emailMessageDefaults`, bundled so a Worker reads no files. They
|
|
20
|
+
* are what Cloud writes in: a language is supported once its file is here.
|
|
21
|
+
*/
|
|
22
|
+
const TRANSLATIONS = {
|
|
23
|
+
ar,
|
|
24
|
+
de,
|
|
25
|
+
es,
|
|
26
|
+
fr,
|
|
27
|
+
it,
|
|
28
|
+
ja,
|
|
29
|
+
pl,
|
|
30
|
+
'pt-BR': ptBR,
|
|
31
|
+
ru,
|
|
32
|
+
'zh-CN': zhCN
|
|
33
|
+
} satisfies Record<string, Record<string, string>>
|
|
34
|
+
|
|
35
|
+
/** A language Cloud writes email in: English, or one it has translations for. */
|
|
36
|
+
export type EmailLocale = 'en' | keyof typeof TRANSLATIONS
|
|
37
|
+
|
|
38
|
+
/** Every language Cloud writes email in, English first. */
|
|
39
|
+
export const EMAIL_LOCALES: readonly EmailLocale[] = ['en', ...typedKeys(TRANSLATIONS)]
|
|
40
|
+
|
|
41
|
+
function typedKeys<Value extends object>(value: Value): Array<keyof Value & string> {
|
|
42
|
+
return Object.keys(value).filter((key): key is keyof Value & string => key in value)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function isEmailLocale(value: unknown): value is EmailLocale {
|
|
46
|
+
return EMAIL_LOCALES.some((code) => code === value)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** A tag's language and script, as Unicode's likely subtags fill them in: `zh-TW` is `zh-Hant`. */
|
|
50
|
+
function languageScript(tag: string): string | null {
|
|
51
|
+
try {
|
|
52
|
+
const { language, script } = new Intl.Locale(tag).maximize()
|
|
53
|
+
return `${language}-${script ?? ''}`
|
|
54
|
+
} catch {
|
|
55
|
+
return null
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The first of someone's languages Cloud writes in: the same tag, or the same language in the same
|
|
61
|
+
* script, so `de-AT` reads German and `zh-TW`, written in Traditional, doesn't read Simplified.
|
|
62
|
+
*/
|
|
63
|
+
export function emailLocale(languages: readonly string[]): EmailLocale | null {
|
|
64
|
+
const byTag = new Map(EMAIL_LOCALES.map((code) => [code.toLowerCase(), code]))
|
|
65
|
+
const byScript = new Map(EMAIL_LOCALES.map((code) => [languageScript(code), code]))
|
|
66
|
+
for (const language of languages) {
|
|
67
|
+
const match = byTag.get(language.toLowerCase()) ?? byScript.get(languageScript(language))
|
|
68
|
+
if (match) return match
|
|
69
|
+
}
|
|
70
|
+
return null
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Locales written right to left. */
|
|
74
|
+
const RIGHT_TO_LEFT: ReadonlySet<EmailLocale> = new Set<EmailLocale>(['ar'])
|
|
75
|
+
|
|
76
|
+
const RIGHT_TO_LEFT_MARK = String.fromCodePoint(0x200f)
|
|
77
|
+
const FIRST_STRONG_ISOLATE = String.fromCodePoint(0x2068)
|
|
78
|
+
const POP_DIRECTIONAL_ISOLATE = String.fromCodePoint(0x2069)
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Right-to-left messages as the app shows them: each between right-to-left marks, so punctuation
|
|
82
|
+
* after a Latin name ends the sentence on its left, and each placeholder isolated, so a name or
|
|
83
|
+
* address put into it keeps its own order: `report.pdf`, not `pdf.report`.
|
|
84
|
+
*/
|
|
85
|
+
function directed(messages: Record<string, string>): Record<string, string> {
|
|
86
|
+
return mapValues(messages, (message) => {
|
|
87
|
+
const isolated = message.replaceAll(
|
|
88
|
+
/\{\w+\}/g,
|
|
89
|
+
(placeholder) => `${FIRST_STRONG_ISOLATE}${placeholder}${POP_DIRECTIONAL_ISOLATE}`
|
|
90
|
+
)
|
|
91
|
+
return `${RIGHT_TO_LEFT_MARK}${isolated}${RIGHT_TO_LEFT_MARK}`
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type EmailMessages = StoreValue<Messages<typeof emailMessageDefaults>>
|
|
96
|
+
|
|
97
|
+
/** The words, formats, and direction of email written in one locale. */
|
|
98
|
+
export type EmailLocalization = {
|
|
99
|
+
locale: EmailLocale
|
|
100
|
+
dir: 'ltr' | 'rtl'
|
|
101
|
+
t: EmailMessages
|
|
102
|
+
/** A moment in UTC, as Cloud doesn't know the reader's time zone: 13 November 2026, 10:00 UTC. */
|
|
103
|
+
dateTime: (iso: string) => string
|
|
104
|
+
/** Bytes in binary units, as the portal shows them: 300 MB, 10 GB. */
|
|
105
|
+
storage: (bytes: number) => string
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const STORAGE_UNITS = [
|
|
109
|
+
{ unit: 'gigabyte', bytes: 1024 ** 3 },
|
|
110
|
+
{ unit: 'megabyte', bytes: 1024 ** 2 },
|
|
111
|
+
{ unit: 'kilobyte', bytes: 1024 }
|
|
112
|
+
] as const
|
|
113
|
+
|
|
114
|
+
function messages(locale: EmailLocale): EmailMessages {
|
|
115
|
+
const translations: Record<string, Components> =
|
|
116
|
+
locale === 'en'
|
|
117
|
+
? {}
|
|
118
|
+
: {
|
|
119
|
+
[locale]: {
|
|
120
|
+
email: RIGHT_TO_LEFT.has(locale) ? directed(TRANSLATIONS[locale]) : TRANSLATIONS[locale]
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// Every translation is in the cache, so nothing is ever fetched.
|
|
124
|
+
const i18n = createI18n(atom(locale), {
|
|
125
|
+
baseLocale: 'en',
|
|
126
|
+
cache: translations,
|
|
127
|
+
get: async () => ({})
|
|
128
|
+
})
|
|
129
|
+
return i18n('email', emailMessageDefaults).get()
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const localizations = new Map<EmailLocale, EmailLocalization>()
|
|
133
|
+
|
|
134
|
+
export function emailLocalization(locale: EmailLocale): EmailLocalization {
|
|
135
|
+
const cached = localizations.get(locale)
|
|
136
|
+
if (cached) return cached
|
|
137
|
+
const dateTime = new Intl.DateTimeFormat(locale, {
|
|
138
|
+
year: 'numeric',
|
|
139
|
+
month: 'long',
|
|
140
|
+
day: 'numeric',
|
|
141
|
+
hour: 'numeric',
|
|
142
|
+
minute: '2-digit',
|
|
143
|
+
timeZone: 'UTC',
|
|
144
|
+
timeZoneName: 'short'
|
|
145
|
+
})
|
|
146
|
+
const localization: EmailLocalization = {
|
|
147
|
+
locale,
|
|
148
|
+
dir: RIGHT_TO_LEFT.has(locale) ? 'rtl' : 'ltr',
|
|
149
|
+
t: messages(locale),
|
|
150
|
+
dateTime: (iso) => dateTime.format(new Date(iso)),
|
|
151
|
+
storage: (bytes) => {
|
|
152
|
+
const { unit, bytes: size } = STORAGE_UNITS.find((step) => bytes >= step.bytes) ?? {
|
|
153
|
+
unit: 'byte',
|
|
154
|
+
bytes: 1
|
|
155
|
+
}
|
|
156
|
+
return new Intl.NumberFormat(locale, {
|
|
157
|
+
style: 'unit',
|
|
158
|
+
unit,
|
|
159
|
+
unitDisplay: 'short',
|
|
160
|
+
maximumFractionDigits: 1
|
|
161
|
+
}).format(bytes / size)
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
localizations.set(locale, localization)
|
|
165
|
+
return localization
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** The language an `Accept-Language` header prefers among Cloud's, or null when it names none. */
|
|
169
|
+
export function acceptedLocale(header: string | null | undefined): EmailLocale | null {
|
|
170
|
+
const languages = parseAccept(header ?? '')
|
|
171
|
+
.filter((language) => language.q > 0)
|
|
172
|
+
.map((language) => language.type)
|
|
173
|
+
return emailLocale(languages)
|
|
174
|
+
}
|
package/src/email/index.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export {
|
|
2
|
+
acceptedLocale,
|
|
3
|
+
EMAIL_LOCALES,
|
|
4
|
+
emailLocale,
|
|
5
|
+
emailLocalization,
|
|
6
|
+
isEmailLocale,
|
|
7
|
+
type EmailLocale,
|
|
8
|
+
type EmailLocalization,
|
|
9
|
+
type EmailMessages
|
|
10
|
+
} from './i18n'
|
|
11
|
+
export { emailMessageDefaults } from './messages'
|
|
12
|
+
export { renderTransactionalEmail, renderWaitlistConfirmation } from './render'
|
|
13
|
+
export { EMAIL_SAMPLE_URL, EMAIL_SAMPLES } from './samples'
|
|
3
14
|
export { transactionalEmailContentSchema } from './schema'
|
|
4
15
|
export type {
|
|
5
16
|
AdminEnrollmentNotificationPayload,
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
{
|
|
2
|
+
"greeting": "مرحبًا {name}،",
|
|
3
|
+
"greetingWithoutName": "مرحبًا،",
|
|
4
|
+
"someone": "شخص ما",
|
|
5
|
+
"openCloud": "فتح OpenPencil Cloud",
|
|
6
|
+
"footer": "OpenPencil، محرّر التصميم مفتوح المصدر",
|
|
7
|
+
"invitationExpires": "تنتهي صلاحية هذه الدعوة في {date}.",
|
|
8
|
+
"documentInvitationHeading": "لديك دعوة إلى مستند",
|
|
9
|
+
"documentInvitationViewSubject": "دعاك {inviter} إلى عرض «{document}»",
|
|
10
|
+
"documentInvitationEditSubject": "دعاك {inviter} إلى تعديل «{document}»",
|
|
11
|
+
"documentInvitationView": "دعاك {inviter} إلى عرض «{document}» على OpenPencil Cloud.",
|
|
12
|
+
"documentInvitationEdit": "دعاك {inviter} إلى تعديل «{document}» على OpenPencil Cloud.",
|
|
13
|
+
"documentInvitationAction": "فتح المستند",
|
|
14
|
+
"workspaceInvitationSubject": "دعاك {inviter} إلى {workspace}",
|
|
15
|
+
"workspaceInvitationHeading": "انضم إلى {workspace}",
|
|
16
|
+
"workspaceInvitationAdmin": "دعاك {inviter} إلى إدارة مساحة العمل «{workspace}» على OpenPencil Cloud.",
|
|
17
|
+
"workspaceInvitationEditor": "دعاك {inviter} إلى التعديل في مساحة العمل «{workspace}» على OpenPencil Cloud.",
|
|
18
|
+
"workspaceInvitationViewer": "دعاك {inviter} إلى عرض مساحة العمل «{workspace}» على OpenPencil Cloud.",
|
|
19
|
+
"workspaceInvitationHome": "بعد انضمامك، ستجد مستنداتها في الصفحة الرئيسية.",
|
|
20
|
+
"workspaceInvitationAction": "الانضمام إلى مساحة العمل",
|
|
21
|
+
"enrollmentRequestedSubject": "استلمنا طلبك للوصول إلى OpenPencil Cloud",
|
|
22
|
+
"enrollmentRequestedHeading": "تم استلام الطلب",
|
|
23
|
+
"enrollmentRequestedPreview": "طلبك للوصول إلى OpenPencil Cloud بانتظار المراجعة.",
|
|
24
|
+
"enrollmentRequested": "طلبك بانتظار المراجعة. سنراسلك مجددًا عند البتّ فيه.",
|
|
25
|
+
"enrollmentApprovedSubject": "وصولك إلى OpenPencil Cloud جاهز",
|
|
26
|
+
"enrollmentApprovedHeading": "تمت الموافقة على الوصول",
|
|
27
|
+
"enrollmentApprovedPreview": "يمكنك الآن تسجيل الدخول إلى OpenPencil Cloud.",
|
|
28
|
+
"enrollmentApproved": "تمت الموافقة على طلب الوصول، فيمكنك تسجيل الدخول الآن.",
|
|
29
|
+
"enrollmentApprovedAction": "تسجيل الدخول",
|
|
30
|
+
"enrollmentRejectedSubject": "تمت مراجعة طلبك للوصول إلى OpenPencil Cloud",
|
|
31
|
+
"enrollmentRejectedHeading": "تمت مراجعة الطلب",
|
|
32
|
+
"enrollmentRejectedPreview": "لم تتم الموافقة على طلب الوصول.",
|
|
33
|
+
"enrollmentRejected": "لم تتم الموافقة على طلب الوصول هذه المرة.",
|
|
34
|
+
"enrollmentRejectedAction": "طلب الوصول مجددًا",
|
|
35
|
+
"enrollmentRevokedSubject": "تغيّر وصولك إلى OpenPencil Cloud",
|
|
36
|
+
"enrollmentRevokedHeading": "تغيّر الوصول",
|
|
37
|
+
"enrollmentRevokedPreview": "لم يعد وصولك إلى OpenPencil Cloud نشطًا.",
|
|
38
|
+
"enrollmentRevoked": "لم يعد وصولك إلى OpenPencil Cloud نشطًا.",
|
|
39
|
+
"enrollmentRevokedAction": "فتح OpenPencil",
|
|
40
|
+
"invitationSubject": "يمكنك تجربة OpenPencil Cloud الآن",
|
|
41
|
+
"invitationHeading": "Cloud مفتوح",
|
|
42
|
+
"invitationPreview": "OpenPencil Cloud مفتوح الآن، ويمكنك تسجيل الدخول.",
|
|
43
|
+
"invitationWaitlistSubject": "OpenPencil Cloud جاهز",
|
|
44
|
+
"invitationWaitlistPreview": "انضممت إلى قائمة الانتظار؛ وقد فُتح Cloud الآن.",
|
|
45
|
+
"invitationWaitlistBeta": "لا يزال إصدارًا تجريبيًا: بعض الميزات معطّلة، وستتعطل بعض الأشياء. حين يحدث ذلك، ردّ على هذه الرسالة وأخبرني، أو {link} إن كان ذلك مريحًا لك. أقرأ الاثنين.",
|
|
46
|
+
"invitationWaitlistThanks": "شكرًا لانضمامك إلى قائمة انتظار OpenPencil Cloud. هذه هي الرسالة الوحيدة التي وعدناك بها: فُتح Cloud، ويمكنك تسجيل الدخول الآن.",
|
|
47
|
+
"invitationThanks": "وصلنا طلبك قبل مدة لتجربة OpenPencil Cloud. شكرًا على اهتمامك وعلى صبرك. كنا لا نزال نختبره حينها، ولم نكن مستعدين لفتحه لأحد.",
|
|
48
|
+
"invitationBeta": "إنه مفتوح الآن، ويمكنك تسجيل الدخول. لا يزال إصدارًا تجريبيًا: بعض الميزات معطّلة، وستتعطل بعض الأشياء. حين يحدث ذلك، ردّ على هذه الرسالة وأخبرني، أو {link} إن كان ذلك مريحًا لك. أقرأ الاثنين.",
|
|
49
|
+
"invitationIssueLink": "افتح مشكلة على GitHub",
|
|
50
|
+
"invitationDesktop": "لاستخدام Cloud في تطبيق سطح المكتب، تحتاج إلى الإصدار التجريبي من {link}.",
|
|
51
|
+
"invitationDownloadLink": "صفحة التنزيل",
|
|
52
|
+
"invitationAction": "افتح Cloud",
|
|
53
|
+
"invitationSignatureName": "دانيلا",
|
|
54
|
+
"invitationSignatureRole": "مؤسس OpenPencil",
|
|
55
|
+
"enrollmentNotificationSubject": "طلب وصول جديد إلى OpenPencil Cloud",
|
|
56
|
+
"enrollmentNotificationHeading": "طلب وصول جديد",
|
|
57
|
+
"enrollmentNotificationPreview": "طلب {email} الوصول إلى OpenPencil Cloud.",
|
|
58
|
+
"enrollmentNotification": "طلب {name} ({email}) الوصول وكتب:",
|
|
59
|
+
"enrollmentNotificationAction": "مراجعة الطلب",
|
|
60
|
+
"documentReportSubject": "تم الإبلاغ عن مستند مُشارك على OpenPencil Cloud",
|
|
61
|
+
"documentReportHeading": "تم الإبلاغ عن مستند مُشارك",
|
|
62
|
+
"documentReportPreview": "تم الإبلاغ عن «{document}» بسبب {reason}.",
|
|
63
|
+
"documentReport": "فتح شخص «{document}» من رابط مشاركة وأبلغ عنه بسبب {reason}، وكتب:",
|
|
64
|
+
"documentReportAction": "مراجعة البلاغ",
|
|
65
|
+
"reportReasonSpamPhishing": "رسائل مزعجة أو تصيّد احتيالي",
|
|
66
|
+
"reportReasonIllegal": "محتوى غير قانوني",
|
|
67
|
+
"reportReasonCopyright": "انتهاك حقوق النشر",
|
|
68
|
+
"reportReasonHarassment": "التحرّش",
|
|
69
|
+
"reportReasonOther": "أمر آخر",
|
|
70
|
+
"verifyAccountSubject": "أكّد بريدك الإلكتروني على OpenPencil Cloud",
|
|
71
|
+
"verifyAccountHeading": "أكّد بريدك الإلكتروني",
|
|
72
|
+
"verifyAccountPreview": "نقرة واحدة لإكمال إنشاء حسابك على OpenPencil Cloud.",
|
|
73
|
+
"verifyAccount": "أكّد هذا العنوان لإكمال إنشاء حسابك على OpenPencil Cloud. ثم عُد إلى OpenPencil، وسيُسجَّل دخولك تلقائيًا.",
|
|
74
|
+
"verifyAccountNote": "لم تُنشئ حسابًا؟ تجاهل هذه الرسالة ولن يحدث شيء.",
|
|
75
|
+
"verifyChangeSubject": "أكّد بريدك الإلكتروني الجديد على OpenPencil Cloud",
|
|
76
|
+
"verifyChangeHeading": "أكّد بريدك الإلكتروني الجديد",
|
|
77
|
+
"verifyChangePreview": "نقرة واحدة لنقل حسابك على OpenPencil Cloud إلى هذا العنوان.",
|
|
78
|
+
"verifyChange": "أكّد هذا العنوان ليصبح البريد الإلكتروني لحسابك على OpenPencil Cloud. يبقى عنوانك القديم مُستخدمًا إلى أن تفعل ذلك.",
|
|
79
|
+
"verifyChangeNote": "لم تطلب ذلك؟ تجاهل هذه الرسالة ولن يتغيّر شيء.",
|
|
80
|
+
"verifyAction": "تأكيد البريد الإلكتروني",
|
|
81
|
+
"passwordResetSubject": "أعد تعيين كلمة مرورك على OpenPencil Cloud",
|
|
82
|
+
"passwordResetHeading": "إعادة تعيين كلمة المرور",
|
|
83
|
+
"passwordResetPreview": "استخدم هذا الرابط الآمن لاختيار كلمة مرور جديدة.",
|
|
84
|
+
"passwordReset": "استخدم الرابط أدناه لاختيار كلمة مرور جديدة.",
|
|
85
|
+
"passwordResetNote": "لم تطلب ذلك؟ تجاهل هذه الرسالة وستبقى كلمة مرورك كما هي.",
|
|
86
|
+
"passwordResetAction": "إعادة تعيين كلمة المرور",
|
|
87
|
+
"passwordChangedSubject": "تم تغيير كلمة مرورك على OpenPencil Cloud",
|
|
88
|
+
"passwordChangedHeading": "تم تغيير كلمة المرور",
|
|
89
|
+
"passwordChangedPreview": "تم تغيير كلمة مرورك على OpenPencil Cloud.",
|
|
90
|
+
"passwordChanged": "تم تغيير كلمة مرورك. إن لم تكن أنت من فعل ذلك، فتواصل مع المسؤول.",
|
|
91
|
+
"emailChangeSubject": "بريدك الإلكتروني على OpenPencil Cloud سيتغيّر",
|
|
92
|
+
"emailChangeHeading": "بريدك الإلكتروني سيتغيّر",
|
|
93
|
+
"emailChangePreview": "سيتغيّر بريدك الإلكتروني على OpenPencil Cloud إلى {email}.",
|
|
94
|
+
"emailChange": "طلب شخص مسجّل الدخول إلى حسابك تغيير بريده الإلكتروني إلى {email}. سيتم التغيير بمجرد أن يؤكّده ذلك العنوان.",
|
|
95
|
+
"emailChangeNotYou": "إن لم تكن أنت، فغيّر كلمة مرورك وسجّل الخروج من جلساتك الأخرى.",
|
|
96
|
+
"reviewAccount": "مراجعة حسابك",
|
|
97
|
+
"newSignInSubject": "تسجيل دخول جديد إلى حسابك على OpenPencil Cloud",
|
|
98
|
+
"newSignInHeading": "تسجيل دخول جديد إلى حسابك",
|
|
99
|
+
"newSignInPreview": "تم تسجيل الدخول إلى حسابك على OpenPencil Cloud باستخدام {device}.",
|
|
100
|
+
"newSignIn": "تم تسجيل الدخول إلى حسابك باستخدام {device} في {date}.",
|
|
101
|
+
"newSignInFrom": "تم تسجيل الدخول إلى حسابك باستخدام {device} من {address} في {date}.",
|
|
102
|
+
"newSignInNotYou": "إن كنت أنت، فلا داعي لفعل شيء. وإن لم تكن، فسجّل الخروج من تلك الجلسة وغيّر كلمة مرورك.",
|
|
103
|
+
"newSignInApp": "تطبيق OpenPencil",
|
|
104
|
+
"newSignInBrowser": "{browser} على {system}",
|
|
105
|
+
"newSignInUnknownBrowser": "متصفح غير معروف",
|
|
106
|
+
"reviewSessions": "مراجعة الجلسات",
|
|
107
|
+
"twoStepSubject": "تغيّرت طريقة تسجيل دخولك إلى OpenPencil Cloud",
|
|
108
|
+
"authenticatorOnHeading": "تم تشغيل تطبيق المصادقة",
|
|
109
|
+
"authenticatorOn": "أصبح تطبيق مصادقة يؤكّد عمليات تسجيل دخولك.",
|
|
110
|
+
"authenticatorOffHeading": "تم إيقاف تطبيق المصادقة",
|
|
111
|
+
"authenticatorOff": "لم يعد تسجيل الدخول يطلب رمزًا من تطبيق مصادقة.",
|
|
112
|
+
"passkeyAddedHeading": "تمت إضافة مفتاح مرور",
|
|
113
|
+
"passkeyAdded": "تمت إضافة مفتاح مرور إلى حسابك.",
|
|
114
|
+
"passkeyRemovedHeading": "تمت إزالة مفتاح مرور",
|
|
115
|
+
"passkeyRemoved": "تمت إزالة مفتاح مرور من حسابك.",
|
|
116
|
+
"twoStepResetHeading": "تمت إعادة تعيين تسجيل الدخول بخطوتين",
|
|
117
|
+
"twoStepReset": "أزال أحد المسؤولين تطبيق المصادقة ورموز الاستعادة ومفاتيح المرور الخاصة بك، لتتمكن من إعدادها مجددًا.",
|
|
118
|
+
"signInMethodRemovedHeading": "تمت إزالة طريقة لتسجيل الدخول",
|
|
119
|
+
"signInMethodRemoved": "أزال أحد المسؤولين طريقة لتسجيل الدخول إلى حسابك: {method}.",
|
|
120
|
+
"signInMethodPassword": "كلمة المرور",
|
|
121
|
+
"twoStepNotYou": "إن لم تكن أنت، فغيّر كلمة مرورك وتواصل مع المسؤول.",
|
|
122
|
+
"reviewSecurity": "مراجعة الأمان",
|
|
123
|
+
"storageFullSubject": "ملفاتك على OpenPencil Cloud للقراءة فقط",
|
|
124
|
+
"storageFullHeading": "مساحة التخزين ممتلئة",
|
|
125
|
+
"storageFullPreview": "تستخدم ملفاتك على OpenPencil Cloud مساحة {used} من أصل {limit}، لذا أصبحت للقراءة فقط.",
|
|
126
|
+
"storageFull": "تشغل مساحات عملك {used}، وتتضمن خطتك {limit}. وإلى أن يقل ما تشغله، يمكن فتح مستنداتك وتنزيلها، لكن لا يمكن تعديلها أو إضافة ملفات جديدة إليها.",
|
|
127
|
+
"storageFullUpgrade": "احصل على مزيد من التخزين، أو احذف مستندات وأفرغ سلة المهملات، لتتمكن من التعديل مجددًا.",
|
|
128
|
+
"storageFullFreeSpace": "احذف مستندات وأفرغ سلة المهملات لتتمكن من التعديل مجددًا.",
|
|
129
|
+
"storageFullAction": "الحصول على مزيد من التخزين",
|
|
130
|
+
"documentBlockedSubject": "تم حظر مستندك «{document}»",
|
|
131
|
+
"documentBlockedHeading": "تم حظر أحد مستنداتك",
|
|
132
|
+
"documentBlocked": "حظر أحد مسؤولي OpenPencil Cloud مستندك «{document}». لا يمكن لأحد فتحه، بما في ذلك أنت، حتى تتم استعادته. لم يُحذف أي شيء من محتواه.",
|
|
133
|
+
"documentBlockedReason": "السبب المذكور: {reason}",
|
|
134
|
+
"documentBlockedContest": "إذا كنت تعتقد أن هذا خطأ، فراسل {email} لإعادة النظر فيه.",
|
|
135
|
+
"documentBlockedContestAdministrators": "إذا كنت تعتقد أن هذا خطأ، فاطلب من مسؤولي الخادم إعادة النظر فيه.",
|
|
136
|
+
"documentRestoredSubject": "مستندك «{document}» متاح مجددًا",
|
|
137
|
+
"documentRestoredHeading": "مستندك متاح مجددًا",
|
|
138
|
+
"documentRestored": "استعاد أحد المسؤولين مستندك «{document}». يمكنك أنت وكل من شاركته معه فتحه مجددًا.",
|
|
139
|
+
"openHome": "فتح الصفحة الرئيسية",
|
|
140
|
+
"reportReceivedSubject": "تلقّينا بلاغك بشأن «{document}»",
|
|
141
|
+
"reportReceivedHeading": "تم استلام البلاغ",
|
|
142
|
+
"reportReceived": "شكرًا لإبلاغك عن «{document}». يراجع مسؤولو الخادم كل بلاغ ويقرّرون ما إذا كان يخالف القواعد. سنراسلك مجددًا عندما يتخذون قرارهم.",
|
|
143
|
+
"reportDecidedSubject": "بلاغك بشأن «{document}»",
|
|
144
|
+
"reportBlockedHeading": "تم حظر المستند",
|
|
145
|
+
"reportBlocked": "راجع المسؤولون بلاغك وحظروا «{document}»، فلا يمكن لأحد فتحه حتى تتم استعادته.",
|
|
146
|
+
"reportActionedHeading": "تم اتخاذ إجراء بشأن بلاغك",
|
|
147
|
+
"reportActioned": "راجع المسؤولون بلاغك بشأن «{document}» واتخذوا إجراءً بشأنه.",
|
|
148
|
+
"reportDismissedHeading": "يبقى المستند متاحًا",
|
|
149
|
+
"reportDismissed": "راجع المسؤولون بلاغك بشأن «{document}» ووجدوا أنه لا يخالف القواعد، لذا سيبقى كما هو.",
|
|
150
|
+
"reportDisagree": "إذا كنت لا توافق على ذلك، فراسل {email}.",
|
|
151
|
+
"reportDisagreeAdministrators": "إذا كنت لا توافق على ذلك، فاطلب من مسؤولي الخادم إعادة النظر فيه.",
|
|
152
|
+
"commentMentionSubject": "أشار إليك {author} في «{document}»",
|
|
153
|
+
"commentReplySubject": "ردّ {author} في «{document}»",
|
|
154
|
+
"commentMentionHeading": "تمت الإشارة إليك",
|
|
155
|
+
"commentReplyHeading": "رد جديد",
|
|
156
|
+
"commentMention": "أشار إليك {author} في تعليق على «{document}»:",
|
|
157
|
+
"commentReply": "ردّ {author} في نقاش تشارك فيه على «{document}»:",
|
|
158
|
+
"commentSomeone": "شخص ما",
|
|
159
|
+
"openComment": "افتح التعليق",
|
|
160
|
+
"commentSettings": "تصلك هذه الرسائل وفق إعدادات الإشعارات لديك. غيّرها في {link}.",
|
|
161
|
+
"commentSettingsLink": "إعدادات حسابك",
|
|
162
|
+
"waitlistSubject": "أكّد مكانك في قائمة انتظار OpenPencil Cloud",
|
|
163
|
+
"waitlistHeading": "أكّد بريدك الإلكتروني",
|
|
164
|
+
"waitlistPreview": "نقرة واحدة للانضمام إلى قائمة انتظار OpenPencil Cloud.",
|
|
165
|
+
"waitlist": "شكرًا لاهتمامك بـOpenPencil Cloud. أكّد هذا العنوان للانضمام إلى قائمة الانتظار، وسنراسلك مرة واحدة فقط، عندما يصبح Cloud جاهزًا لك.",
|
|
166
|
+
"waitlistAction": "الانضمام إلى قائمة الانتظار",
|
|
167
|
+
"waitlistNote": "لم تسجّل؟ تجاهل هذه الرسالة وسيُحذف العنوان خلال سبعة أيام، أو {link}.",
|
|
168
|
+
"waitlistLeave": "احذفه الآن"
|
|
169
|
+
}
|