@tunasand/sdk 0.8.0 → 0.12.0
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/CHANGELOG.md +137 -0
- package/README.md +165 -144
- package/dist/analytics.js +183 -109
- package/dist/app.js +276 -166
- package/dist/apps-BysPfMuR.js +408 -0
- package/dist/astro-image.d.ts +1 -0
- package/dist/astro-image.js +33 -0
- package/dist/astro-server-Bwau8F6d.js +99 -0
- package/dist/astro-server.d.ts +1 -0
- package/dist/astro-server.js +1 -0
- package/dist/astro.d.ts +1 -0
- package/dist/astro.js +306 -0
- package/dist/bridge-C2Bl-OAF.js +80 -0
- package/dist/bridge.js +1 -13
- package/dist/build-file-DNi0PHC5.js +31 -0
- package/dist/cli.js +6212 -8
- package/dist/{client-Derrexwr.js → client-C8STAw9T.js} +43 -24
- package/dist/code-N8pBUDbq.js +30 -0
- package/dist/code.d.ts +1 -0
- package/dist/code.js +1 -0
- package/dist/collection-26aglrg6.js +282 -0
- package/dist/{declared-DuNMsdXw.js → declared-CE4a61qb.js} +35 -35
- package/dist/delivery.js +121 -114
- package/dist/dev-operations-Tutwi1On.js +46 -0
- package/dist/dev.js +9 -16
- package/dist/embeds-DY6O5TrJ.js +29 -0
- package/dist/end-users.d.ts +1 -0
- package/dist/end-users.js +189 -0
- package/dist/endUsers-DODfjnv1.js +77 -0
- package/dist/{errorLabels-BgtQ_zUn.js → errorLabels-BK1NJ6Wz.js} +374 -238
- package/dist/i18n.js +4 -4
- package/dist/ids-DmtIoqBX.js +109 -0
- package/dist/integrations.js +95 -24
- package/dist/{ja-Du6ooL6i.js → ja-B3lAaOhZ.js} +91 -45
- package/dist/{ja-CeHU0EaY.js → ja-axQPxMJ-.js} +3 -3
- package/dist/operations-CIB99rIY.js +95 -0
- package/dist/operations.d.ts +1 -0
- package/dist/operations.js +1 -0
- package/dist/{page-Bzrj24sJ.js → page-yo1cw1kW.js} +1 -1
- package/dist/paymentPort-p1jV44Zz.js +203 -0
- package/dist/preview.js +8 -1
- package/dist/{profile-1em_lcxq.js → profile-DBsXLvvI.js} +48 -48
- package/dist/rich-text.js +16 -16
- package/dist/{schema-WnobuwLg.js → schema-Bs_BUUNv.js} +526 -265
- package/dist/schema.js +66 -88
- package/dist/types/access/src/handoff.d.ts +19 -14
- package/dist/types/access/src/index.d.ts +2 -2
- package/dist/types/access/src/jws.d.ts +41 -0
- package/dist/types/access/src/oidc.d.ts +12 -2
- package/dist/types/access/src/signed.d.ts +0 -2
- package/dist/types/adapter-cloudflare/src/eventLog/viewSchema.d.ts +11 -0
- package/dist/types/contract/src/accountProfile.d.ts +7 -0
- package/dist/types/contract/src/api/define.d.ts +165 -0
- package/dist/types/contract/src/apiKeys.d.ts +6 -2
- package/dist/types/contract/src/app.d.ts +32 -7
- package/dist/types/contract/src/appChannels.d.ts +152 -0
- package/dist/types/contract/src/appDefinition.d.ts +11 -5
- package/dist/types/contract/src/appDependencies.d.ts +107 -24
- package/dist/types/contract/src/appIdentities.d.ts +21 -0
- package/dist/types/contract/src/appInbound.d.ts +53 -0
- package/dist/types/contract/src/appMail.d.ts +106 -0
- package/dist/types/contract/src/appSecrets.d.ts +63 -0
- package/dist/types/contract/src/appServer.d.ts +460 -45
- package/dist/types/contract/src/approvals.d.ts +1 -1
- package/dist/types/contract/src/apps.d.ts +126 -60
- package/dist/types/contract/src/auditActions.d.ts +2 -2
- package/dist/types/contract/src/auditLabels.d.ts +120 -15
- package/dist/types/contract/src/authorize.d.ts +42 -14
- package/dist/types/contract/src/bridge.d.ts +35 -36
- package/dist/types/contract/src/consents.d.ts +29 -27
- package/dist/types/contract/src/deletion.d.ts +18 -0
- package/dist/types/contract/src/embeds.d.ts +26 -90
- package/dist/types/contract/src/{customerLabels.d.ts → endUserLabels.d.ts} +6 -9
- package/dist/types/contract/src/endUsers.d.ts +244 -0
- package/dist/types/contract/src/errorLabels.d.ts +67 -37
- package/dist/types/contract/src/errorLabelsEn.d.ts +50 -33
- package/dist/types/contract/src/errors.d.ts +28 -16
- package/dist/types/contract/src/eventSchemas.d.ts +70 -0
- package/dist/types/contract/src/eventTraces.d.ts +41 -0
- package/dist/types/contract/src/failureStatus.d.ts +14 -22
- package/dist/types/contract/src/fieldAccess.d.ts +8 -8
- package/dist/types/contract/src/formLabels.d.ts +3 -0
- package/dist/types/contract/src/forms.d.ts +4 -0
- package/dist/types/contract/src/grants.d.ts +26 -0
- package/dist/types/contract/src/headers.d.ts +5 -0
- package/dist/types/contract/src/hostingRpc.d.ts +44 -19
- package/dist/types/contract/src/identifiers.d.ts +45 -17
- package/dist/types/contract/src/ids.d.ts +18 -10
- package/dist/types/contract/src/import.d.ts +17 -16
- package/dist/types/contract/src/index.d.ts +57 -29
- package/dist/types/contract/src/integrationGraph.d.ts +83 -0
- package/dist/types/contract/src/issueLabels.d.ts +121 -81
- package/dist/types/contract/src/issueLabelsEn.d.ts +61 -41
- package/dist/types/contract/src/manage.d.ts +16 -7
- package/dist/types/contract/src/manageLabels.d.ts +2 -0
- package/dist/types/contract/src/manifestText.d.ts +66 -0
- package/dist/types/contract/src/messagePort.d.ts +208 -0
- package/dist/types/contract/src/migration.d.ts +2 -2
- package/dist/types/contract/src/notices.d.ts +37 -0
- package/dist/types/contract/src/operationEffects.d.ts +39 -0
- package/dist/types/contract/src/operatorOperations.d.ts +104 -110
- package/dist/types/contract/src/outbound.d.ts +29 -0
- package/dist/types/contract/src/paths.d.ts +13 -0
- package/dist/types/contract/src/paymentPort.d.ts +129 -0
- package/dist/types/contract/src/pending.d.ts +2 -0
- package/dist/types/contract/src/permissions.d.ts +7 -11
- package/dist/types/contract/src/perspective.d.ts +26 -0
- package/dist/types/contract/src/powers.d.ts +5 -0
- package/dist/types/contract/src/principal.d.ts +127 -56
- package/dist/types/contract/src/readPages.d.ts +92 -0
- package/dist/types/contract/src/recordLabels.d.ts +6 -0
- package/dist/types/contract/src/roles.d.ts +7 -4
- package/dist/types/contract/src/ruleLabels.d.ts +16 -0
- package/dist/types/contract/src/ruleProblems.d.ts +16 -0
- package/dist/types/contract/src/schemaLabels.d.ts +8 -0
- package/dist/types/contract/src/settingProblems.d.ts +18 -1
- package/dist/types/contract/src/settings.d.ts +5 -7
- package/dist/types/contract/src/siteDeclaration.d.ts +7 -7
- package/dist/types/contract/src/siteIndex.d.ts +76 -0
- package/dist/types/contract/src/transfer.d.ts +1 -1
- package/dist/types/contract/src/trial.d.ts +4 -1
- package/dist/types/contract/src/versions.d.ts +1 -3
- package/dist/types/contract/src/viewEvent.d.ts +0 -9
- package/dist/types/contract/src/webhooks.d.ts +24 -3
- package/dist/types/contract/src/workflow.d.ts +16 -19
- package/dist/types/contract/src/workspaceItems.d.ts +23 -7
- package/dist/types/contract/src/workspacePaths.d.ts +1 -1
- package/dist/types/rich-text/src/html.d.ts +1 -1
- package/dist/types/rich-text/src/index.d.ts +8 -7
- package/dist/types/rich-text/src/labels/en.d.ts +1 -1
- package/dist/types/rich-text/src/labels/ja.d.ts +2 -2
- package/dist/types/rich-text/src/library.d.ts +1 -1
- package/dist/types/rich-text/src/media.d.ts +2 -0
- package/dist/types/rich-text/src/normalize.d.ts +1 -1
- package/dist/types/rich-text/src/problems.d.ts +5 -5
- package/dist/types/rich-text/src/profile.d.ts +10 -10
- package/dist/types/rich-text/src/render.d.ts +1 -1
- package/dist/types/rich-text/src/schema.d.ts +2 -2
- package/dist/types/rich-text/src/standard.d.ts +4 -4
- package/dist/types/rich-text/src/types.d.ts +2 -2
- package/dist/types/schema/src/audience.d.ts +1 -3
- package/dist/types/schema/src/capabilities.d.ts +18 -27
- package/dist/types/schema/src/changes.d.ts +3 -1
- package/dist/types/schema/src/collection.d.ts +142 -111
- package/dist/types/schema/src/defaultSchema.d.ts +8 -2
- package/dist/types/schema/src/fieldIds.d.ts +18 -0
- package/dist/types/schema/src/file.d.ts +24 -11
- package/dist/types/schema/src/fileRefs.d.ts +14 -0
- package/dist/types/schema/src/fileSignature.d.ts +20 -0
- package/dist/types/schema/src/filesCollection.d.ts +7 -0
- package/dist/types/schema/src/forms.d.ts +43 -0
- package/dist/types/schema/src/imageMetadata.d.ts +9 -0
- package/dist/types/schema/src/index.d.ts +19 -10
- package/dist/types/schema/src/indexes.d.ts +11 -0
- package/dist/types/schema/src/input.d.ts +1 -1
- package/dist/types/schema/src/integrity.d.ts +8 -7
- package/dist/types/schema/src/kinds.d.ts +26 -0
- package/dist/types/schema/src/labels/en.d.ts +89 -46
- package/dist/types/schema/src/labels/ja.d.ts +92 -46
- package/dist/types/schema/src/mediaUrl.d.ts +26 -33
- package/dist/types/schema/src/page.d.ts +4 -4
- package/dist/types/schema/src/problems.d.ts +85 -42
- package/dist/types/schema/src/refs.d.ts +0 -9
- package/dist/types/schema/src/schema.d.ts +17 -12
- package/dist/types/schema/src/selfOps.d.ts +20 -19
- package/dist/types/schema/src/traits.d.ts +28 -0
- package/dist/types/schema/src/typesSource.d.ts +1 -1
- package/dist/types/schema/src/values.d.ts +5 -2
- package/dist/types/schema/src/widening.d.ts +3 -0
- package/dist/types/sdk/src/analytics.d.ts +2 -1
- package/dist/types/sdk/src/app.d.ts +43 -14
- package/dist/types/sdk/src/astro-image.d.ts +19 -0
- package/dist/types/sdk/src/astro-response.d.ts +6 -0
- package/dist/types/sdk/src/astro-server.d.ts +16 -0
- package/dist/types/sdk/src/astro.d.ts +19 -0
- package/dist/types/sdk/src/bridge.d.ts +2 -4
- package/dist/types/sdk/src/code.d.ts +61 -0
- package/dist/types/sdk/src/delegation.d.ts +13 -3
- package/dist/types/sdk/src/delivery/changes.d.ts +4 -4
- package/dist/types/sdk/src/delivery/client.d.ts +33 -22
- package/dist/types/sdk/src/delivery/fields.d.ts +3 -3
- package/dist/types/sdk/src/delivery/index.d.ts +3 -3
- package/dist/types/sdk/src/delivery/media.d.ts +5 -8
- package/dist/types/sdk/src/delivery/query.d.ts +15 -11
- package/dist/types/sdk/src/delivery/schema.d.ts +1 -1
- package/dist/types/sdk/src/delivery/values.d.ts +10 -14
- package/dist/types/sdk/src/delivery.d.ts +2 -2
- package/dist/types/sdk/src/dev-operations.d.ts +20 -0
- package/dist/types/sdk/src/dev.d.ts +6 -5
- package/dist/types/sdk/src/end-users.d.ts +187 -0
- package/dist/types/sdk/src/i18n.d.ts +2 -2
- package/dist/types/sdk/src/integrations.d.ts +14 -21
- package/dist/types/sdk/src/operations.d.ts +17 -0
- package/dist/types/sdk/src/preview.d.ts +2 -1
- package/dist/types/sdk/src/rich-text.d.ts +2 -2
- package/dist/types/sdk/src/schema.d.ts +1 -1
- package/dist/types/sdk/src/site/artifact.d.ts +64 -0
- package/dist/types/sdk/src/site/build-file.d.ts +30 -0
- package/dist/types/sdk/src/site/check-code.d.ts +14 -0
- package/dist/types/sdk/src/site/check-text.d.ts +19 -0
- package/dist/types/sdk/src/site/cli.d.ts +52 -0
- package/dist/types/sdk/src/site/content-type.d.ts +2 -0
- package/dist/types/sdk/src/site/labels.d.ts +14 -0
- package/dist/types/sdk/src/types.d.ts +1 -1
- package/dist/{types-B77qvqPJ.js → types-CYnY-63C.js} +5 -6
- package/dist/types.js +1 -1
- package/dist/{typesSource-CWybQYus.js → typesSource-BTA9-rcB.js} +17 -15
- package/package.json +32 -6
- package/dist/apps-BxnJ1RlU.js +0 -435
- package/dist/bridge-DtHw9hS6.js +0 -74
- package/dist/collection-BEOxeISR.js +0 -189
- package/dist/customers-DTbL0qn6.js +0 -86
- package/dist/customers.d.ts +0 -1
- package/dist/customers.js +0 -185
- package/dist/embeds-B5V54Zur.js +0 -34
- package/dist/ids--RF7hGyC.js +0 -36
- package/dist/src-sazhzYui.js +0 -71
- package/dist/types/contract/src/customers.d.ts +0 -266
- package/dist/types/schema/src/legacy.d.ts +0 -2
- package/dist/types/schema/src/media.d.ts +0 -5
- package/dist/types/sdk/src/customers.d.ts +0 -184
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Collection } from './collection.js';
|
|
2
|
+
/** files のコレクションの id(`uuidV5Of('collection:files')`、contract の ids.test.ts で照合) */
|
|
3
|
+
export declare const FILES_COLLECTION_ID = "380c5450-9f5e-5b10-8273-c3e1d86aa266";
|
|
4
|
+
/** files のコレクション */
|
|
5
|
+
export declare const FILES_COLLECTION: Collection;
|
|
6
|
+
/** files のコレクションか(レコードは表 files で、一覧・作成・配信の対象外) */
|
|
7
|
+
export declare const isFilesCollection: (collection: Collection) => boolean;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type Collection, type EndUserField, type FieldDef } from './collection.js';
|
|
2
|
+
export declare const FORM_SUBMITTERS: readonly ["anyone", "end_user"];
|
|
3
|
+
export type FormSubmitter = (typeof FORM_SUBMITTERS)[number];
|
|
4
|
+
export type FormHosts = Readonly<{
|
|
5
|
+
site?: boolean;
|
|
6
|
+
exact?: readonly string[];
|
|
7
|
+
subdomains_of?: readonly string[];
|
|
8
|
+
}>;
|
|
9
|
+
export type FormFieldDef = Readonly<{
|
|
10
|
+
key: string;
|
|
11
|
+
required_when?: Readonly<{
|
|
12
|
+
key: string;
|
|
13
|
+
in: readonly string[];
|
|
14
|
+
}>;
|
|
15
|
+
hosts?: FormHosts;
|
|
16
|
+
}>;
|
|
17
|
+
export type FormDef = Readonly<{
|
|
18
|
+
submitter: FormSubmitter;
|
|
19
|
+
fields: readonly FormFieldDef[];
|
|
20
|
+
handled?: Readonly<{
|
|
21
|
+
field: string;
|
|
22
|
+
done: readonly string[];
|
|
23
|
+
retention_days?: number;
|
|
24
|
+
}>;
|
|
25
|
+
}>;
|
|
26
|
+
/** 版の指定のない送信の設問の版 */
|
|
27
|
+
export declare const FORM_DEFAULT_VERSION = "default";
|
|
28
|
+
export declare const MANAGED_FIELDS: readonly ["form_version", "form_handled_at"];
|
|
29
|
+
export type ManagedField = (typeof MANAGED_FIELDS)[number];
|
|
30
|
+
export declare const managedFieldOf: (collection: Pick<Collection, "fields">, managed: ManagedField) => FieldDef | undefined;
|
|
31
|
+
/** 送信者が書けるフィールドの種類か(1つの値の文字、連絡先、選択肢) */
|
|
32
|
+
export declare function isFormInputField(f: FieldDef): boolean;
|
|
33
|
+
/** 送信者が書けるフィールドの key */
|
|
34
|
+
export declare const formFieldKeysOf: (collection: Pick<Collection, "form">) => string[];
|
|
35
|
+
/** ID トークンの本人の送信を受けるフォームで、本人を入れるフィールド(ほかは null) */
|
|
36
|
+
export declare const formOwnerOf: (collection: Collection) => EndUserField | null;
|
|
37
|
+
/**
|
|
38
|
+
* 仕組みが決める値(previous は保存済みの値で作成は空、now は ISO 8601)
|
|
39
|
+
* - 設問の版は保存済みのまま(書くのは受付だけ)。対応日時は対応済みになった保存の時刻で、対応済みでなくなれば空
|
|
40
|
+
*/
|
|
41
|
+
export declare function managedValues(collection: Collection, previous: Readonly<Record<string, unknown>>, next: Readonly<Record<string, unknown>>, now: string): Record<string, unknown>;
|
|
42
|
+
/** フォームの宣言の誤り */
|
|
43
|
+
export declare function formProblems(collection: Collection): string[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** 配る項目のまとまりの既定(向きと色のプロファイルは常に残し、ほかのまとまりは配らない) */
|
|
2
|
+
export declare const DELIVERED_METADATA_DEFAULT: readonly ["copyright", "creator"];
|
|
3
|
+
/** マスクした画像(parts は並べると1つのファイル、元のバイト列の部分参照を含む) */
|
|
4
|
+
export type MaskedImage = Readonly<{
|
|
5
|
+
parts: readonly Uint8Array[];
|
|
6
|
+
size: number;
|
|
7
|
+
}>;
|
|
8
|
+
/** メタ情報をマスクした画像(形式と中身が違う・読めない・上限を超える画像は null。マスクなしで返さない) */
|
|
9
|
+
export declare function maskedImage(bytes: Uint8Array, mimeType: string): Promise<MaskedImage | null>;
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
export { BRAND_NAME } from './brand.js';
|
|
2
2
|
export { fieldZod, jsonSchemaOf, normalizeValues, zodOf, type ValueOptions } from './input.js';
|
|
3
|
-
export { fileRefSchema, cropSchema, hotspotSchema, mediaSchema, type File, type FileRef, type Crop, type DeliveredFile, type Hotspot, type LocalImage, type Media } from './file.js';
|
|
3
|
+
export { FILE_AUDIENCES, type FileAudience, isRestrictedFile, fileRefSchema, cropSchema, hotspotSchema, mediaSchema, type File, type FileRef, fileIdsIn, type Crop, type DeliveredFile, type Hotspot, type LocalImage, type Media } from './file.js';
|
|
4
|
+
export { deliveredFileIds, mapFileRefs } from './fileRefs.js';
|
|
4
5
|
export { coverPosition, coverStart, cropRect, croppedHotspot, objectPosition, stillOf, type CropRect } from './image.js';
|
|
5
|
-
export {
|
|
6
|
-
export { IMAGE_SIZE_MAX, imageParamsOf, isMediaId, MEDIA_SIGNING_KEY_BLOB, MEDIA_SIGNING_KEY_SPOT, fileBlobKeyOf, mediaExtOf, mediaKindOf,
|
|
6
|
+
export { FILES_COLLECTION, FILES_COLLECTION_ID, isFilesCollection } from './filesCollection.js';
|
|
7
|
+
export { DELIVERED_TYPES, IMAGE_SIZE_MAX, imageParamsKey, imageParamsOf, isMediaId, MEDIA_SIGNING_KEY_BLOB, MEDIA_SIGNING_KEY_SPOT, FILE_PUBLISHED_PREFIX, fileBlobKeyOf, filePublishedKeyOf, mediaExtOf, mediaKindOf, mediaOriginOf, mediaPathOf, mediaUrlAt, mediaUrlIn, parseMediaPath, withImageParams, type ImageParams, type FileKind, type MediaPath } from './mediaUrl.js';
|
|
8
|
+
export { SIGNATURE_MAX_TTL_SEC, SIGNATURE_PARAM, signatureScopeOf, signMediaUrl, verifyMediaUrl, type SignatureScope } from './fileSignature.js';
|
|
9
|
+
export { DELIVERED_METADATA_DEFAULT, maskedImage, type MaskedImage } from './imageMetadata.js';
|
|
7
10
|
export { diffSchema, type ChangeKind, type ChangeLevel, type DiffOptions, type SchemaChange } from './changes.js';
|
|
8
|
-
export {
|
|
11
|
+
export { isWidening } from './widening.js';
|
|
12
|
+
export { dateRoleFieldsOf, primaryCollectionOf, requiredPrimaryCollectionOf, SOURCES_FIELD, sourceIdsOf, sourcesFieldOf, sourceCollectionOf, type SourcesField } from './traits.js';
|
|
13
|
+
export { capabilitiesOf, COLLECTION_CAPABILITIES, hasCapability, missingCapabilities, requiredCapabilities, type CapabilityNeed, type CollectionCapability, type MissingCapability } from './capabilities.js';
|
|
14
|
+
export { AGGREGATE_BUCKETS, AGGREGATE_OPS, DECLARED_COLLECTION_KINDS, kindOf, type AggregateBucket, type AggregateMeasure, type AggregateOp, type CollectionKind, type DeclaredCollectionKind } from './kinds.js';
|
|
9
15
|
export { appliesTo, checkFields, fieldsFor, shapeProblems } from './check.js';
|
|
10
16
|
export { deliveredFields, emptyValues, pickValues, referencedIds, referencesOf, valueFieldsOf } from './values.js';
|
|
11
17
|
export { typesSourceOf, UnknownFieldTypeError } from './typesSource.js';
|
|
12
|
-
export { mapReferences,
|
|
18
|
+
export { mapReferences, referencedIdsOf, referenceInputOf, type ReferenceValue, renameRecordRefs } from './refs.js';
|
|
13
19
|
export { sameJson } from './json.js';
|
|
14
|
-
export { isSelfField, isSelfRow, ownerFieldOf, type SelfWrite, selfFieldsOf, selfWritableKeysOf, selfWritableOf, selfWritableProblems, type
|
|
20
|
+
export { isSelfField, isSelfRow, ownerFieldOf, type SelfWrite, selfFieldsOf, selfWritableKeysOf, selfWritableOf, selfWritableProblems, type EndUserOperation, selfOpsOf, selfOpsProblems, type EndUserProof } from './selfOps.js';
|
|
21
|
+
export { FORM_DEFAULT_VERSION, FORM_SUBMITTERS, formFieldKeysOf, formOwnerOf, formProblems, isFormInputField, MANAGED_FIELDS, managedFieldOf, managedValues, type FormDef, type FormFieldDef, type FormHosts, type FormSubmitter, type ManagedField } from './forms.js';
|
|
15
22
|
export { audienceAdditions, resolvedSchema, type AudienceHistoryEntry } from './audience.js';
|
|
16
|
-
export {
|
|
23
|
+
export { COLLECTION_INDEX_LIMITS, indexedFieldsOf, isIndexableField } from './indexes.js';
|
|
24
|
+
export { acceptsRole, addedFieldAudienceOf, defaultPiiOf, fieldPiiOf, isPiiCollection, isEndUserLinkedCollection, PII_CLASSES, PII_STRENGTH, type PiiClass, anonymizedKeysOf, audienceOf, withoutAudience, declaredAudienceOf, innerAudienceOf, AUDIENCES, type Audience, richTextFieldsOf, cascadeDepths, type CascadeCollection, ON_DELETE, onDeleteOf, type OnDelete, type EndUserOnDelete, entitledKeysOf, isDeliveredAudience, computedFieldsOf, FIELD_ROLES, hasEndUserRules, editsSlug, SLUG_MODES, type SlugMode, initialValueOf, isPublishable, isInputField, isSequenceField, isListCollection, isDeliveredCollection, isPrivateCollection, isSingleton, isStoredCollection, isUndeliveredField, END_USER_FIELD_TYPE, SELF_OPS, type SelfOp, endUserFieldsOf, type EndUserField, type ReferenceField, optionLabelOf, optionsOf, isOptionField, type OptionField, hasPublication, hasPublishedFlag, requestReferencesOf, resolvedRolesOf, roleFieldOf, toneOf, collectionOf, collectionByRef, isUuidShape, type ComputedKind, type FieldRole, type FieldRoles, type FieldComputed, type ContentFormat, type CollectionSchema, type Collection, type ResolvedSchema, type FieldCondition, type FieldDef, type FieldDerive, type FieldFixedBy, type CountDef, type FieldProblem, type MediaKind, type OptionTone, type ReferenceRules, type SelectOption, STATUS_CATEGORIES, type StatusCategory, type StatusOption } from './collection.js';
|
|
25
|
+
export { FIELD_ID_PATTERN, fieldIdOf, fieldIdProblems, type NewFieldId, withFieldIds } from './fieldIds.js';
|
|
17
26
|
export { hasPublicPage, imageFrameOf, pagePathOf, publicPathOf, withPagesFrom, type ImageFrame, type ImageFrameDef, type PageDef, type PageRecord, type PageRule } from './page.js';
|
|
18
27
|
export { schemaRulesOf, type SchemaRule } from './rules.js';
|
|
19
|
-
export { acceptsUnique, hasTransitions, integrityProblems, transitionAllowed, transitionFieldsOf, transitionProblems, transitionTargets, type Transition, type TransitionActor, type TransitionActors, type TransitionField, sequenceFieldsOf, UNIQUE_FIELDS_MAX,
|
|
20
|
-
export { fieldDefSchema, MAX_CASCADE_DEPTH, parseSchema, RESERVED_FIELD_KEYS, RETENTION_DAYS_MAX, retentionProblems, ruleIssues, undeclaredDeleteProblems, validateSchemaForSave } from './schema.js';
|
|
28
|
+
export { acceptsUnique, hasTransitions, integrityProblems, transitionAllowed, transitionFieldsOf, transitionProblems, transitionTargets, type Transition, type TransitionActor, type TransitionActors, type TransitionField, sequenceFieldsOf, UNIQUE_FIELDS_MAX, uniqueDefsOf, uniquePartOf, uniqueDuplicatesOf, uniquesColumnOf, uniqueValueOf, type UniqueDef, type UniqueDuplicate } from './integrity.js';
|
|
29
|
+
export { COLLECTION_SLUG_PATTERN, fieldDefSchema, MAX_CASCADE_DEPTH, parseSchema, RESERVED_FIELD_KEYS, RETENTION_DAYS_MAX, retentionProblems, ruleIssues, undeclaredDeleteProblems, validateSchemaForSave } from './schema.js';
|
|
21
30
|
export { MENU_GROUP_ID, menuItemsOf, parseScreens, placedItemsOf, resolveLayout, resolveMenu, embedItem, collectionItem, collectionOfItem, viewItem, viewOfItem, type EditorLayout, type EditorSection, type MenuEntry, type MenuGroup, type ResolvedMenuEntry, type ScreenSettings } from './screens.js';
|
|
22
31
|
export { createClock, isDateOnly, isDateTimeText, type Clock, type DateString } from './time.js';
|
|
23
32
|
export { phoneNationalOf, type PhoneRegion, type UrlScheme } from './contact.js';
|
|
24
33
|
export { AUDIENCE_LABELS, SCHEMA_PROBLEM_MESSAGES } from './labels/ja.js';
|
|
25
34
|
export { SCHEMA_PROBLEM_MESSAGES_EN } from './labels/en.js';
|
|
26
35
|
export { type SchemaProblemCode, schemaProblemText } from './problems.js';
|
|
27
|
-
export {
|
|
36
|
+
export { DEFAULT_RICH_TEXT_PROFILE, DEFAULT_COLLECTION_IDS, DEFAULT_SCHEMA, DEFAULT_SCREENS } from './defaultSchema.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Collection, type FieldDef } from './collection.js';
|
|
2
|
+
/** 1つのコレクションの索引の上限(仕組みの列と外部キーの列を除く。docs/specs/limits.md の「一覧と索引の上限」) */
|
|
3
|
+
export declare const COLLECTION_INDEX_LIMITS: {
|
|
4
|
+
readonly indexesMax: 8;
|
|
5
|
+
};
|
|
6
|
+
/** 索引を宣言できるフィールドか */
|
|
7
|
+
export declare const isIndexableField: (collection: Collection, f: FieldDef) => boolean;
|
|
8
|
+
/** 索引を持つフィールド(宣言の true、続いて既定。上限まで) */
|
|
9
|
+
export declare function indexedFieldsOf(collection: Collection): FieldDef[];
|
|
10
|
+
/** 索引の宣言の誤り(宣言できないフィールドの true と、宣言の true の上限の超過。スキーマの保存で拒む) */
|
|
11
|
+
export declare function indexProblems(collection: Collection): string[];
|
|
@@ -16,7 +16,7 @@ export declare function fieldZod(field: FieldDef, stage: Stage, options?: ValueO
|
|
|
16
16
|
export declare const zodOf: (fields: readonly FieldDef[], stage: Stage, options?: ValueOptions) => z.ZodObject<Record<string, z.ZodType>>;
|
|
17
17
|
/**
|
|
18
18
|
* 値を保存の形に整形(すべての格納先で共通、まとまりの中も)
|
|
19
|
-
* - 日時: `ISO 8601` の UTC(options の toDateTime)、本文: 注の記法の変換と未知のキーの除去、ファイル: {
|
|
19
|
+
* - 日時: `ISO 8601` の UTC(options の toDateTime)、本文: 注の記法の変換と未知のキーの除去、ファイル: { id } だけ
|
|
20
20
|
* - 形の誤りのある値: そのまま(checkFields が検出)
|
|
21
21
|
* - 定義にないキー・項目を定義しないまとまり: そのまま
|
|
22
22
|
*/
|
|
@@ -9,15 +9,16 @@ export type UniqueDef = Readonly<{
|
|
|
9
9
|
export declare const UNIQUE_FIELDS_MAX = 3;
|
|
10
10
|
/** 一意の組に含められる項目か(最上位・単数・入力する項目で、値を文字にできる種類) */
|
|
11
11
|
export declare function acceptsUnique(f: FieldDef): boolean;
|
|
12
|
-
/** コレクションの一意の組(宣言 unique と、unique
|
|
12
|
+
/** コレクションの一意の組(宣言 unique と、unique を付けたエンドユーザーへの参照のフィールドと、連番の項目) */
|
|
13
13
|
export declare const uniqueDefsOf: (collection: Collection) => UniqueDef[];
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
/**
|
|
15
|
+
* 一意の比較に使う値(空は null、exact は文字を表記の揺れで揃えない、日時は UTC の ISO に揃える)
|
|
16
|
+
* - 規則を変えるときは、保存済みの列 uniques を書き直す関数の migration を足す
|
|
17
|
+
*/
|
|
17
18
|
export declare function uniquePartOf(f: FieldDef, v: unknown, exact?: boolean): string | null;
|
|
18
19
|
/** 組の値(項目の1つでも空なら null、複数の項目は JSON の配列) */
|
|
19
20
|
export declare function uniqueValueOf(collection: Collection, def: UniqueDef, values: Readonly<Record<string, unknown>>): string | null;
|
|
20
|
-
/**
|
|
21
|
+
/** コレクションの表の列 uniques の値(組の名前と値の JSON、一意の組がないか値がすべて空なら null) */
|
|
21
22
|
export declare function uniquesColumnOf(collection: Collection, values: Readonly<Record<string, unknown>>): string | null;
|
|
22
23
|
/** コレクションの連番の項目(最上位) */
|
|
23
24
|
export declare const sequenceFieldsOf: (collection: Collection) => FieldDef[];
|
|
@@ -44,7 +45,7 @@ export type TransitionActors = Readonly<{
|
|
|
44
45
|
export type Transition = Readonly<{
|
|
45
46
|
from: readonly (string | null)[];
|
|
46
47
|
to: string;
|
|
47
|
-
by
|
|
48
|
+
by?: TransitionActors;
|
|
48
49
|
}>;
|
|
49
50
|
/** 遷移を求める主体(self は保存するレコードの本人の人、app は登録簿のアプリの ID) */
|
|
50
51
|
export type TransitionActor = Readonly<{
|
|
@@ -60,7 +61,7 @@ export type TransitionActor = Readonly<{
|
|
|
60
61
|
}>;
|
|
61
62
|
/** 遷移の宣言を持つ項目 */
|
|
62
63
|
export type TransitionField = Extract<FieldDef, {
|
|
63
|
-
type: 'select';
|
|
64
|
+
type: 'select' | 'status';
|
|
64
65
|
}> & Readonly<{
|
|
65
66
|
transitions: readonly Transition[];
|
|
66
67
|
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Collection } from './collection.js';
|
|
2
|
+
export declare const COLLECTION_KINDS: readonly ["standard", "files", "timeseries", "aggregate"];
|
|
3
|
+
export type CollectionKind = (typeof COLLECTION_KINDS)[number];
|
|
4
|
+
/** 宣言できる種類 */
|
|
5
|
+
export declare const DECLARED_COLLECTION_KINDS: readonly ["standard", "timeseries", "aggregate"];
|
|
6
|
+
export type DeclaredCollectionKind = (typeof DECLARED_COLLECTION_KINDS)[number];
|
|
7
|
+
/** 集計の時間の区切り */
|
|
8
|
+
export declare const AGGREGATE_BUCKETS: readonly ["hour", "day", "month"];
|
|
9
|
+
export type AggregateBucket = (typeof AGGREGATE_BUCKETS)[number];
|
|
10
|
+
/** 集計の値の求め方 */
|
|
11
|
+
export declare const AGGREGATE_OPS: readonly ["count", "sum", "min", "max"];
|
|
12
|
+
export type AggregateOp = (typeof AGGREGATE_OPS)[number];
|
|
13
|
+
/** 集計の値(field は数値のフィールドの key) */
|
|
14
|
+
export type AggregateMeasure = Readonly<{
|
|
15
|
+
field: string;
|
|
16
|
+
op: AggregateOp;
|
|
17
|
+
}>;
|
|
18
|
+
/** 集計の次元の数の上限 */
|
|
19
|
+
export declare const AGGREGATE_LIMITS: {
|
|
20
|
+
readonly dimensionsMax: 8;
|
|
21
|
+
};
|
|
22
|
+
export declare const kindOf: (collection: Collection) => CollectionKind;
|
|
23
|
+
/** 種類の宣言の誤り(文) */
|
|
24
|
+
export declare function kindProblems(collection: Collection): string[];
|
|
25
|
+
/** 置き場や作り直しの仕組みがまだない宣言(時系列と、source のある集計)。スキーマの保存とアプリのインストールで作成を拒む */
|
|
26
|
+
export declare const unavailableKindProblems: (collections: readonly Collection[]) => string[];
|
|
@@ -3,87 +3,123 @@ export declare const SCHEMA_PROBLEM_MESSAGES_EN: {
|
|
|
3
3
|
readonly schema_unreadable_input: "Cannot read the collection list types (each collection needs an id and an array of fields, groups also need an array of fields)";
|
|
4
4
|
readonly invalid_collection_id: "id must start with a lowercase letter and contain only lowercase letters, digits and underscores";
|
|
5
5
|
readonly invalid_field_key: "key must start with a lowercase letter and contain only letters, digits, underscores and hyphens";
|
|
6
|
+
readonly field_id_invalid: "internal field id must be a lowercase UUID v7";
|
|
7
|
+
readonly field_id_duplicate: "internal field id is duplicated within the collection";
|
|
6
8
|
readonly page_path_slash: "The page template must start with /";
|
|
7
9
|
readonly og_path_slash: "The OG image template must start with /";
|
|
8
10
|
readonly invalid_pattern: "The pattern is not a valid regular expression";
|
|
9
11
|
readonly initial_not_option: "The initial value is not one of the options";
|
|
10
12
|
readonly derive_not_option: "The derived value is not one of the options";
|
|
11
13
|
readonly fixed_not_option: "The fixed value is not one of the options";
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
+
readonly end_user_restrict: "End user fields cannot use restrict (it would block deletion requests from people)";
|
|
15
|
+
readonly requests_single: "Requests can only be enabled on multiple reference fields";
|
|
16
|
+
readonly grant_renamed: "The required entitlement of a collection was renamed to entitlement (grant is no longer accepted)";
|
|
17
|
+
readonly publishing_renamed: "The old name publishing is not accepted (use publication; review is the content setting reviewCollections)";
|
|
14
18
|
readonly duplicate_field_key: "Duplicate field key";
|
|
15
19
|
readonly condition_invalid: "The field condition does not point to an option field and value at the same level";
|
|
16
20
|
readonly page_condition_invalid: "The page condition does not point to an option field and value of the collection";
|
|
17
21
|
readonly duplicate_collection_id: "Duplicate collection id";
|
|
22
|
+
readonly collection_id_invalid: "Collection id must be a lowercase UUID";
|
|
23
|
+
readonly reference_to_files: "Collection {collection}: a reference cannot point to the files collection (use a file field with accept)";
|
|
18
24
|
readonly duplicate_collection_slug: "Duplicate collection slug";
|
|
19
25
|
readonly reserved_key: "Collection {collection}: key {key} is the same as a system value (use another key)";
|
|
20
26
|
readonly reserved_query_key: "Collection {collection}: key {key} is reserved for Delivery API filters (use another key)";
|
|
21
|
-
readonly nested_rule: "Collection {collection}, field {field}: fields inside a group cannot have derive or
|
|
27
|
+
readonly nested_rule: "Collection {collection}, field {field}: fields inside a group cannot have derive or fixed_by";
|
|
22
28
|
readonly computed_nested: "Collection {collection}, field {field}: fields inside a group cannot be computed";
|
|
23
29
|
readonly computed_from_not_body: "Collection {collection}, field {field}: the computed source {from} is not a body field of the same collection";
|
|
24
30
|
readonly computed_type_mismatch: "Collection {collection}, field {field}: field type {type} does not match computed kind {kind}";
|
|
25
31
|
readonly role_field_not_top: "Collection {collection}, role {role}: field {field} is not at the top level";
|
|
26
32
|
readonly role_field_mismatch: "Collection {collection}, role {role}: field {field} ({type}) does not fit the role";
|
|
27
|
-
readonly audience_nested_wider: "Collection {collection}, field {field}: the audience inside a group must be the same as the outer field or
|
|
28
|
-
readonly
|
|
29
|
-
readonly audience_self_without_marker: "Collection {collection}: fields with the self audience need
|
|
30
|
-
readonly
|
|
33
|
+
readonly audience_nested_wider: "Collection {collection}, field {field}: the audience inside a group must be the same as the outer field or none";
|
|
34
|
+
readonly audience_end_user_field: "Collection {collection}, field {field}: the audience of an end user field must be self or none";
|
|
35
|
+
readonly audience_self_without_marker: "Collection {collection}: fields with the self audience need an end user field marked self";
|
|
36
|
+
readonly entitlement_not_reference: "Collection {collection}, required entitlement {entitlement}: not a top-level public access reference field";
|
|
31
37
|
readonly audience_wider_than_source: "Collection {collection}, field {field}: the audience cannot be wider than its {source, select, computed {computed} derive {derive} other {condition}} source {from} (the source value would leak)";
|
|
32
38
|
readonly template_id_placeholder: "Collection {collection}, template {template}: '{id}' is not allowed (use '{slug}')";
|
|
33
39
|
readonly template_private_placeholder: "Collection {collection}, template {template}, '{'{key}'}': only public fields (the value appears in delivery and page paths)";
|
|
34
|
-
readonly fixed_by_wider: "Collection {collection}, field {field}: the audience cannot be wider than the
|
|
40
|
+
readonly fixed_by_wider: "Collection {collection}, field {field}: the audience cannot be wider than the fixed_by source (the source value would leak)";
|
|
35
41
|
readonly count_reference_private: "Collection {collection}, reference count {key}: reference field {field} of collection {fromCollection} is not public (the count would leak values)";
|
|
36
42
|
readonly count_reference_mismatch: "Collection {collection}, reference count {key}: reference field {field} of collection {fromCollection} does not point to this collection";
|
|
37
43
|
readonly count_key_duplicate: "Collection {collection}: reference count {key} duplicates a field key";
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
40
|
-
readonly
|
|
41
|
-
readonly
|
|
42
|
-
readonly anonymize_without_on_delete: "Collection {collection}, field {field}: anonymize fields require onDelete anonymize";
|
|
44
|
+
readonly end_user_field_nested: "Collection {collection}, field {field}: end user fields cannot be inside a group";
|
|
45
|
+
readonly on_delete_required: "Collection {collection}, field {field}: required fields cannot use on_delete {on_delete}";
|
|
46
|
+
readonly on_delete_min_items: "Collection {collection}, field {field}: references with a minimum count cannot use on_delete {on_delete}";
|
|
47
|
+
readonly anonymize_without_on_delete: "Collection {collection}, field {field}: anonymize fields require on_delete anonymize";
|
|
43
48
|
readonly anonymize_field_missing: "Collection {collection}, field {field}: anonymize field {target} is not at the top level of the same collection";
|
|
44
49
|
readonly anonymize_field_unclearable: "Collection {collection}, field {field}: anonymize field {target} ({type}) cannot be cleared";
|
|
45
50
|
readonly anonymize_field_required: "Collection {collection}, field {field}: anonymize field {target} is required";
|
|
46
|
-
readonly cascade_cycle: "
|
|
47
|
-
readonly cascade_too_deep: "Collection {collection}:
|
|
48
|
-
readonly
|
|
51
|
+
readonly cascade_cycle: "on_delete cascade forms a cycle: {cycle}";
|
|
52
|
+
readonly cascade_too_deep: "Collection {collection}: on_delete cascade depth from people {depth, number} exceeds the limit {max, number}";
|
|
53
|
+
readonly cascade_self_end_user: "Collection {collection}, field {field}: collections reached by a reference cascade cannot have a self end user field (it would delete other people's records)";
|
|
49
54
|
readonly restrict_reachable: "Collection {collection}, field {field}: cannot restrict collection {to}, which is reachable from people by cascade (it would block deletion requests)";
|
|
50
|
-
readonly on_delete_undeclared_reference: "Collection {collection}, field {field}: references to collection {to}, which is reachable from people by cascade, must declare
|
|
55
|
+
readonly on_delete_undeclared_reference: "Collection {collection}, field {field}: references to collection {to}, which is reachable from people by cascade, must declare on_delete";
|
|
56
|
+
readonly capability_required: "Collection {collection}: {declaration} needs the {capability} capability";
|
|
51
57
|
readonly private_object: "Collection {collection} is private: it cannot use the object format";
|
|
52
|
-
readonly
|
|
58
|
+
readonly private_publication: "Collection {collection} is private: turn off publishing";
|
|
53
59
|
readonly private_pages: "Collection {collection} is private: it cannot have pages";
|
|
54
|
-
readonly
|
|
60
|
+
readonly private_entitlement: "Collection {collection} is private: it cannot require an entitlement";
|
|
55
61
|
readonly reference_target_missing: "Collection {collection}: reference target {to} is not in the schema";
|
|
56
62
|
readonly component_unknown: "Collection {collection}, body field {field}: component {name} is neither a core component nor declared in components";
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly retention_days_undeclared: "Collection {collection}: collections with
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
+
readonly end_user_on_delete_undeclared: "Collection {collection}, field {field}: end user fields must declare on_delete (cascade, anonymize or clear)";
|
|
64
|
+
readonly end_user_in_object_collection: "Collection {collection}, field {field}: object collections cannot have end user fields (version history cannot be handled by deletion requests)";
|
|
65
|
+
readonly retention_days_undeclared: "Collection {collection}: collections with self_ops must declare retention_days";
|
|
66
|
+
readonly kind_declaration_invalid: "Collection {collection}: {kind} collections cannot declare {declaration}";
|
|
67
|
+
readonly kind_declaration_required: "Collection {collection}: {kind} collections must declare {declaration}";
|
|
68
|
+
readonly kind_field_missing: "Collection {collection}: field {field} in {declaration} does not exist";
|
|
69
|
+
readonly kind_time_invalid: "Collection {collection}: time field {field} must be a date or datetime field";
|
|
70
|
+
readonly kind_subject_invalid: "Collection {collection}: subject field {field} must be an end user field";
|
|
71
|
+
readonly index_field_invalid: "Collection {collection}: field {field} cannot have an index (only single text, select, status, checkbox, number, date, and datetime values that are not sensitive)";
|
|
72
|
+
readonly indexes_too_many: "Collection {collection}: up to {max} indexes";
|
|
73
|
+
readonly aggregate_dimensions_too_many: "Collection {collection}: aggregates can have up to {max} dimensions";
|
|
74
|
+
readonly aggregate_dimension_person: "Collection {collection}: field {field} points to a person and cannot be an aggregate dimension";
|
|
75
|
+
readonly aggregate_bucket_pair: "Collection {collection}: declare both time and bucket for an aggregate, or neither";
|
|
76
|
+
readonly aggregate_measure_invalid: "Collection {collection}: measure field {field} must be a number field";
|
|
77
|
+
readonly aggregate_field_undeclared: "Collection {collection}: aggregate field {field} must be the time, a dimension or a measure";
|
|
78
|
+
readonly collection_kind_unavailable: "Collection {collection}: this {kind} declaration cannot be created yet";
|
|
79
|
+
readonly audience_invalid: "Collection {collection}, field {field}: invalid audience (public, entitled, self or none)";
|
|
80
|
+
readonly audience_undeclared: "Collection {collection}, field {field}: declare audience for added or changed fields (public, entitled, self or none)";
|
|
81
|
+
readonly audience_undeclared_personal: "Collection {collection}, field {field}: fields added to a collection with end user fields must declare audience (public, entitled, self or none; none for personal data)";
|
|
63
82
|
readonly unique_list_only: "Collection {collection}: unique constraints are only for list collections";
|
|
64
|
-
readonly unique_name_duplicate: "Collection {collection}: duplicate unique constraint name {key} (unique
|
|
83
|
+
readonly unique_name_duplicate: "Collection {collection}: duplicate unique constraint name {key} (unique end user fields and sequences are named by the field key)";
|
|
65
84
|
readonly unique_field_count: "Collection {collection}, unique constraint {key}: 1 to {max, number} fields";
|
|
66
85
|
readonly unique_field_duplicate: "Collection {collection}, unique constraint {key}: duplicate field";
|
|
67
86
|
readonly unique_field_not_top: "Collection {collection}, unique constraint {key}: field {field} is not at the top level";
|
|
68
|
-
readonly unique_field_unsupported: "Collection {collection}, unique constraint {key}: field {field} ({type}) cannot be unique (single text, number, option, reference, date and
|
|
87
|
+
readonly unique_field_unsupported: "Collection {collection}, unique constraint {key}: field {field} ({type}) cannot be unique (single text, number, option, reference, date and end user fields only)";
|
|
69
88
|
readonly sequence_nested: "Collection {collection}, field {field}: sequences cannot be inside a group";
|
|
70
89
|
readonly sequence_list_only: "Collection {collection}, field {field}: sequences are only for list collections";
|
|
71
90
|
readonly sequence_plain: "Collection {collection}, field {field}: sequences cannot be required, computed or conditional (assigned on creation)";
|
|
72
91
|
readonly transition_nested: "Collection {collection}, field {field}: transitions cannot be inside a group";
|
|
73
|
-
readonly transition_field_kind: "Collection {collection}, field {field}: transitions are only for single option fields without derive or
|
|
92
|
+
readonly transition_field_kind: "Collection {collection}, field {field}: transitions are only for single option fields without derive or fixed_by";
|
|
74
93
|
readonly transition_to_not_option: "Collection {collection}, field {field}, transition {index, number}: target {to} is not one of the options";
|
|
75
94
|
readonly transition_from_empty: "Collection {collection}, field {field}, transition {index, number}: no source values";
|
|
76
95
|
readonly transition_from_not_option: "Collection {collection}, field {field}, transition {index, number}: source value {value} is not one of the options";
|
|
77
96
|
readonly transition_no_actor: "Collection {collection}, field {field}, transition {index, number}: no one can make the transition";
|
|
78
|
-
readonly
|
|
79
|
-
readonly
|
|
80
|
-
readonly
|
|
81
|
-
readonly
|
|
82
|
-
readonly
|
|
83
|
-
readonly
|
|
84
|
-
readonly
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
97
|
+
readonly form_private_list_only: "Collection {collection}: forms are only for private list collections (submissions are not delivered)";
|
|
98
|
+
readonly form_with_self_ops: "Collection {collection}: a form and self_ops cannot be declared together";
|
|
99
|
+
readonly form_delivered_field: "Collection {collection}, field {field}: a form collection cannot have delivered audiences (public, entitled)";
|
|
100
|
+
readonly form_one_end_user: "Collection {collection}: a form submitted by end_user requires exactly one end user field";
|
|
101
|
+
readonly form_required_missing: "Collection {collection}, field {field}: a field required on save is missing from the form";
|
|
102
|
+
readonly form_field_unsupported: "Collection {collection}, form field {field}: submitters can write only top-level single-value text, contact, and select fields (no conditional, admin-only, or managed fields)";
|
|
103
|
+
readonly form_field_duplicate: "Collection {collection}, form field {field}: duplicate";
|
|
104
|
+
readonly form_required_when: "Collection {collection}, form field {field}: required_when must point to another select field of the form and its options";
|
|
105
|
+
readonly form_hosts: "Collection {collection}, form field {field}: hosts are only for URL fields and need lowercase host names or site";
|
|
106
|
+
readonly form_handled_field: "Collection {collection}, handled field {field}: must be a single-value select field";
|
|
107
|
+
readonly form_handled_done: "Collection {collection}, handled field {field}: done values must be options other than the initial value";
|
|
108
|
+
readonly form_handled_at_missing: "Collection {collection}, handled field {field}: a datetime field managed by form_handled_at is required";
|
|
109
|
+
readonly form_handled_writable: "Collection {collection}, handled field {field}: submitters cannot write it";
|
|
110
|
+
readonly form_managed_nested: "Collection {collection}, field {field}: managed cannot be inside a group";
|
|
111
|
+
readonly form_managed_shape: "Collection {collection}, field {field}: {managed} must be a single-value {type} field without required or conditions";
|
|
112
|
+
readonly form_managed_undeclared: "Collection {collection}, field {field}: no form declaration for {managed}";
|
|
113
|
+
readonly form_managed_duplicate: "Collection {collection}, field {field}: only one field can be {managed}";
|
|
114
|
+
readonly self_ops_private_only: "Collection {collection}: self_ops are only for private collections (values written by people and self values are not delivered)";
|
|
115
|
+
readonly self_ops_list_only: "Collection {collection}: self_ops are only for list collections (object collections have a single record)";
|
|
116
|
+
readonly self_ops_unpublished: "Collection {collection}: collections with self_ops cannot have publishing or a published field (self records are shown regardless of publishing)";
|
|
117
|
+
readonly self_ops_one_self: "Collection {collection}: self_ops require exactly one self end user field";
|
|
118
|
+
readonly self_ops_on_delete: "Collection {collection}: the self end user field {field} of a self_ops collection must use on_delete cascade or anonymize (deletion requests must not keep self records)";
|
|
119
|
+
readonly self_ops_unique: "Collection {collection}: unique constraint {key} of a self_ops collection must include the self end user field {field} (to avoid conflicts with other people's values)";
|
|
120
|
+
readonly self_writable_nested: "Collection {collection}, field {field}: self_writable cannot be set inside a group";
|
|
121
|
+
readonly self_writable_blocked: "Collection {collection}, field {field}: self_writable cannot be set on {block, select, end_user {end user reference fields} object {groups} file {file fields} rich_text {body fields} staff {staff fields} admin_only {admin-only fields} computed {computed fields} other {sequence fields}}";
|
|
122
|
+
readonly self_writable_without_ops: "Collection {collection}, field {field}: self_writable requires a collection that accepts create_self or update_self";
|
|
87
123
|
readonly field_key_reused: "Field \"{label}\": key {key} was a {type} field in a past version (values remain in records, use another key)";
|
|
88
124
|
readonly field_removed: "Remove field \"{label}\" (values are kept and hidden)";
|
|
89
125
|
readonly field_added: "Add field \"{label}\"";
|
|
@@ -91,29 +127,38 @@ export declare const SCHEMA_PROBLEM_MESSAGES_EN: {
|
|
|
91
127
|
readonly field_type_changed: "Change the type of field \"{label}\" from {from} to {to} (incompatible, create a new field and move the values)";
|
|
92
128
|
readonly field_required: "Make field \"{label}\" required";
|
|
93
129
|
readonly field_pii_narrowed: "Weaken the personal data class of field \"{label}\" (values remain in environment copies)";
|
|
130
|
+
readonly field_managed_changed: "Change whether field \"{label}\" is managed (affects one submission per person and retention)";
|
|
94
131
|
readonly field_tightened: "Tighten the value rules of field \"{label}\" (values that do not match must be fixed on the next save)";
|
|
95
132
|
readonly option_removed: "Remove option \"{option}\" from field \"{label}\"";
|
|
96
133
|
readonly option_added: "Add option \"{option}\" to field \"{label}\"";
|
|
97
134
|
readonly field_changed: "Change the settings or order of field \"{label}\"";
|
|
135
|
+
readonly field_key_changed: "Change the key of field \"{label}\" from {from} to {to} (the key in delivery responses changes)";
|
|
98
136
|
readonly collection_label_changed: "Change the name or description of collection \"{label}\"";
|
|
99
137
|
readonly collection_format_changed: "Change the format of collection \"{label}\" (create a new collection and move the records)";
|
|
100
|
-
readonly
|
|
101
|
-
readonly
|
|
138
|
+
readonly collection_kind_changed: "Change the kind of collection \"{label}\" (create a new collection and move the records)";
|
|
139
|
+
readonly collection_kind_declaration_changed: "Change the timeseries or aggregate declaration of collection \"{label}\"";
|
|
140
|
+
readonly collection_publication_removed: "Turn off publishing for collection \"{label}\" (draft records also become public)";
|
|
141
|
+
readonly collection_publication_added: "Turn on publishing for collection \"{label}\"";
|
|
102
142
|
readonly collection_slug_mode: "Record slugs in collection \"{label}\" become {mode, select, editor {chosen by editors} other {automatic}}";
|
|
103
|
-
readonly collection_slug_changed: "Change the slug of collection \"{label}\" from {from} to {to} (the delivery path becomes /
|
|
143
|
+
readonly collection_slug_changed: "Change the slug of collection \"{label}\" from {from} to {to} (the delivery path becomes /v1/collections/{to}/records, the old slug path returns 404)";
|
|
104
144
|
readonly collection_roles_changed: "Change the field roles of collection \"{label}\"";
|
|
105
145
|
readonly collection_private_changed: "Make collection \"{label}\" {private, select, yes {private} other {delivered}}";
|
|
106
146
|
readonly collection_unlinked: "Collection \"{label}\" is no longer linked to people (records remain when excluded from environment copies)";
|
|
107
|
-
readonly
|
|
147
|
+
readonly collection_entitlement_changed: "Change the required entitlement field of collection \"{label}\"";
|
|
108
148
|
readonly collection_unique_added: "Add or change unique constraints of collection \"{label}\" (cannot save while duplicates remain)";
|
|
109
149
|
readonly collection_unique_removed: "Remove unique constraints of collection \"{label}\"";
|
|
110
150
|
readonly collection_pages_changed: "Change the page templates of collection \"{label}\"";
|
|
111
151
|
readonly collection_counts_changed: "Change the reference counts of collection \"{label}\"";
|
|
112
152
|
readonly collection_og_changed: "Change the OG image template of collection \"{label}\"";
|
|
113
|
-
readonly collection_self_ops_added: "Add
|
|
114
|
-
readonly collection_self_ops_removed: "Remove
|
|
153
|
+
readonly collection_self_ops_added: "Add self_ops to collection \"{label}\" (consented installations can read and write on behalf of the end user)";
|
|
154
|
+
readonly collection_self_ops_removed: "Remove self_ops from collection \"{label}\"";
|
|
155
|
+
readonly collection_form_opened: "Add or widen the form of collection \"{label}\" (API keys with the submit permission can write)";
|
|
156
|
+
readonly collection_form_retention_shortened: "Delete handled records of collection \"{label}\" after {days, number} days (removed by the daily cleanup; with trash enabled they move to the trash and personal data is erased after the trash period)";
|
|
157
|
+
readonly collection_form_changed: "Change the form of collection \"{label}\"";
|
|
115
158
|
readonly collection_retention_shortened: "Set the retention of collection \"{label}\" to {days, number} days (expired records are deleted by the daily cleanup)";
|
|
116
159
|
readonly collection_retention_changed: "Change the retention of collection \"{label}\"";
|
|
160
|
+
readonly collection_trash_enabled: "Turn on the trash of collection \"{label}\"";
|
|
161
|
+
readonly collection_trash_disabled: "Turn off the trash of collection \"{label}\"";
|
|
117
162
|
readonly collection_publish_checks_changed: "Change the publish checks of collection \"{label}\"";
|
|
118
163
|
readonly file_fixed: "The fields, format and publishing of collection \"{label}\" are fixed by the product (name and description can be changed)";
|
|
119
164
|
readonly file_not_removable: "Collection \"{label}\" is fixed by the product and cannot be deleted";
|
|
@@ -121,7 +166,7 @@ export declare const SCHEMA_PROBLEM_MESSAGES_EN: {
|
|
|
121
166
|
readonly file_defined: "The fields and format of collection \"{label}\" are defined by the product";
|
|
122
167
|
readonly collection_added: "Add collection \"{label}\"";
|
|
123
168
|
readonly confidential_key_reused: "The key of field {field} was a confidential field ({type}) (values remain in records, use another key)";
|
|
124
|
-
readonly audience_widened: "Widen the audience of field {field} from {from, select, public {public}
|
|
169
|
+
readonly audience_widened: "Widen the audience of field {field} from {from, select, public {public} entitled {entitled end users} self {self} other {none}} to {to, select, public {public} entitled {entitled end users} self {self} other {none}} (recorded in the registry)";
|
|
125
170
|
readonly component_removed: "Remove the declaration of body component \"{label}\" (bodies using it are rejected on the next save)";
|
|
126
171
|
readonly component_added: "Declare body component \"{label}\"";
|
|
127
172
|
readonly component_changed: "Change the declaration of body component \"{label}\"";
|
|
@@ -165,6 +210,4 @@ export declare const SCHEMA_PROBLEM_MESSAGES_EN: {
|
|
|
165
210
|
readonly fixed_value: "For this {target}, set {field} of {collection} to {option}";
|
|
166
211
|
readonly body_field_missing: "Collection {collection} has no body field {field}";
|
|
167
212
|
readonly date_time_invalid: "Invalid date and time format";
|
|
168
|
-
readonly comment_required: "Comment is required";
|
|
169
|
-
readonly reject_note_required: "Reason for returning is required";
|
|
170
213
|
};
|