@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
|
@@ -15,8 +15,6 @@ export declare const schemaProblem: import("../../i18n/src/index.js").ProblemFac
|
|
|
15
15
|
readonly fixed_value: "この{target}の{collection}は、{field}を{option}にしてください";
|
|
16
16
|
readonly body_field_missing: "コレクション {collection} に本文のフィールド {field} がない";
|
|
17
17
|
readonly date_time_invalid: "日時の形式が不正";
|
|
18
|
-
readonly comment_required: "コメントが未入力";
|
|
19
|
-
readonly reject_note_required: "差し戻しの理由が未入力";
|
|
20
18
|
readonly invalid_screen_id: "id は英小文字で始まり、英小文字・数字・アンダーライン・コロン・ハイフンだけ";
|
|
21
19
|
readonly duplicate_section_id: "セクションの id が重複";
|
|
22
20
|
readonly duplicate_placement: "同じフィールドを2か所に配置";
|
|
@@ -53,20 +51,24 @@ export declare const schemaProblem: import("../../i18n/src/index.js").ProblemFac
|
|
|
53
51
|
readonly field_type_changed: "フィールド「{label}」の種類を {from} から {to} に変更(互換なし、新しいフィールドを作って移す)";
|
|
54
52
|
readonly field_required: "フィールド「{label}」を必須に";
|
|
55
53
|
readonly field_pii_narrowed: "フィールド「{label}」の個人の情報の分類を弱める(環境のコピーで値が残る)";
|
|
54
|
+
readonly field_managed_changed: "フィールド「{label}」の仕組みが決める値のフラグを変更(同じ人の送信を1回だけにする判定と、残す日数の基準が変わる)";
|
|
56
55
|
readonly field_tightened: "フィールド「{label}」の値の条件を厳しく(合わない値は次の保存で修正)";
|
|
57
56
|
readonly option_removed: "フィールド「{label}」の選択肢「{option}」を削除";
|
|
58
57
|
readonly option_added: "フィールド「{label}」に選択肢「{option}」を追加";
|
|
59
58
|
readonly field_changed: "フィールド「{label}」の設定・並びを変更";
|
|
59
|
+
readonly field_key_changed: "フィールド「{label}」のフィールド ID を {from} から {to} に変更(配信の応答の key が変わる)";
|
|
60
60
|
readonly collection_label_changed: "コレクション「{label}」の表示名・説明を変更";
|
|
61
61
|
readonly collection_format_changed: "コレクション「{label}」の形式の変更(新しいコレクションを作って移す)";
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
62
|
+
readonly collection_kind_changed: "コレクション「{label}」の種類の変更(新しいコレクションを作って移す)";
|
|
63
|
+
readonly collection_kind_declaration_changed: "コレクション「{label}」の時系列か集計の宣言の変更";
|
|
64
|
+
readonly collection_publication_removed: "コレクション「{label}」の公開の管理を外す(下書きのレコードも公開)";
|
|
65
|
+
readonly collection_publication_added: "コレクション「{label}」の公開の管理を付ける";
|
|
64
66
|
readonly collection_slug_mode: "コレクション「{label}」のレコードのスラッグを{mode, select, editor {編集者が決める形} other {自動}}に";
|
|
65
|
-
readonly collection_slug_changed: "コレクション「{label}」のスラッグを {from} から {to} に変更(配信の経路は /
|
|
67
|
+
readonly collection_slug_changed: "コレクション「{label}」のスラッグを {from} から {to} に変更(配信の経路は /v1/collections/{to}/records に変わり、旧いスラッグの経路は404)";
|
|
66
68
|
readonly collection_roles_changed: "コレクション「{label}」のフィールドの役割を変更";
|
|
67
69
|
readonly collection_private_changed: "コレクション「{label}」を{private, select, yes {非公開のコレクション} other {配信するコレクション}}に";
|
|
68
70
|
readonly collection_unlinked: "コレクション「{label}」が人に結び付かなくなる(環境のコピーの除外でレコードが残る)";
|
|
69
|
-
readonly
|
|
71
|
+
readonly collection_entitlement_changed: "コレクション「{label}」の必要な権利のフィールドを変更";
|
|
70
72
|
readonly collection_unique_added: "コレクション「{label}」の一意の組を追加・変更(重複が残るうちは保存できない)";
|
|
71
73
|
readonly collection_unique_removed: "コレクション「{label}」の一意の組を外す";
|
|
72
74
|
readonly collection_pages_changed: "コレクション「{label}」のページの雛形を変更";
|
|
@@ -74,8 +76,13 @@ export declare const schemaProblem: import("../../i18n/src/index.js").ProblemFac
|
|
|
74
76
|
readonly collection_og_changed: "コレクション「{label}」の OG 画像の雛形を変更";
|
|
75
77
|
readonly collection_self_ops_added: "コレクション「{label}」の人の操作を追加(同意したインストールが本人の代わりに読み書きできる)";
|
|
76
78
|
readonly collection_self_ops_removed: "コレクション「{label}」の人の操作を外す";
|
|
77
|
-
readonly
|
|
79
|
+
readonly collection_form_opened: "コレクション「{label}」で受け付けるフォームを追加・変更(送信の権限を持つ API キーから書けるようになる)";
|
|
80
|
+
readonly collection_form_retention_shortened: "コレクション「{label}」の対応済みから残す日数を {days, number} 日に(過ぎたレコードは毎日のクリーンアップで削除。ゴミ箱のあるコレクションではゴミ箱に移り、個人の情報が消えるのはゴミ箱の期間の後)";
|
|
81
|
+
readonly collection_form_changed: "コレクション「{label}」のフォームの設定を変更";
|
|
82
|
+
readonly collection_retention_shortened: "コレクション「{label}」の保持の日数を {days, number} 日に(過ぎたレコードは毎日のクリーンアップで消える)";
|
|
78
83
|
readonly collection_retention_changed: "コレクション「{label}」の保持の日数を変更";
|
|
84
|
+
readonly collection_trash_enabled: "コレクション「{label}」のゴミ箱を有効にする";
|
|
85
|
+
readonly collection_trash_disabled: "コレクション「{label}」のゴミ箱を無効にする";
|
|
79
86
|
readonly collection_publish_checks_changed: "コレクション「{label}」の公開の前の検査を変更";
|
|
80
87
|
readonly file_fixed: "コレクション「{label}」のフィールド・形式・公開の管理は製品で固定(表示名・説明は変更可)";
|
|
81
88
|
readonly file_not_removable: "コレクション「{label}」は製品で固定のため削除できない";
|
|
@@ -83,38 +90,44 @@ export declare const schemaProblem: import("../../i18n/src/index.js").ProblemFac
|
|
|
83
90
|
readonly file_defined: "コレクション「{label}」のフィールド・形式は製品で定義";
|
|
84
91
|
readonly collection_added: "コレクション「{label}」を追加";
|
|
85
92
|
readonly confidential_key_reused: "フィールド {field} の key は機密のフィールド(種類 {type})だった(値がレコードに残るため、別の key で作成)";
|
|
86
|
-
readonly audience_widened: "フィールド {field} のアクセスを{from, select, public {全員}
|
|
93
|
+
readonly audience_widened: "フィールド {field} のアクセスを{from, select, public {全員} entitled {条件付き} self {本人のみ} other {内部のみ}}から{to, select, public {全員} entitled {条件付き} self {本人のみ} other {内部のみ}}に広げる";
|
|
87
94
|
readonly component_removed: "本文の部品「{label}」の宣言を削除(使用中の本文は次の保存で拒否)";
|
|
88
95
|
readonly component_added: "本文の部品「{label}」を宣言";
|
|
89
96
|
readonly component_changed: "本文の部品「{label}」の宣言を変更";
|
|
90
97
|
readonly schema_unreadable_input: "コレクションの一覧 types として読めない(コレクションごとに id とフィールドの配列、まとまりの中もフィールドの配列)";
|
|
91
98
|
readonly invalid_collection_id: "id は英小文字で始まり、英小文字・数字・アンダーラインだけ";
|
|
92
99
|
readonly invalid_field_key: "key は英小文字で始まり、英字・数字・アンダーライン・ハイフンだけ";
|
|
100
|
+
readonly field_id_invalid: "フィールドの内部の id は小文字の UUID v7";
|
|
101
|
+
readonly field_id_duplicate: "フィールドの内部の id がコレクションの中で重なっています";
|
|
93
102
|
readonly page_path_slash: "ページの雛形は / で始まる";
|
|
94
103
|
readonly og_path_slash: "OG 画像の雛形は / で始まる";
|
|
95
104
|
readonly invalid_pattern: "形式の正規表現が不正";
|
|
96
105
|
readonly initial_not_option: "初期値が選択肢にない";
|
|
97
106
|
readonly derive_not_option: "決まる値が選択肢にない";
|
|
98
107
|
readonly fixed_not_option: "固定する値が選択肢にない";
|
|
99
|
-
readonly
|
|
100
|
-
readonly
|
|
108
|
+
readonly end_user_restrict: "エンドユーザーへの参照のフィールドに restrict は使えない(人の削除の求めを止めないため)";
|
|
109
|
+
readonly requests_single: "追加の依頼は複数の参照の項目だけに付けられる";
|
|
110
|
+
readonly grant_renamed: "コレクションの要る権利は entitlement に改名した(grant は使えない)";
|
|
111
|
+
readonly publishing_renamed: "旧い名前 publishing は使えない(publication に改める。レビューは content の設定 reviewCollections)";
|
|
101
112
|
readonly duplicate_field_key: "フィールド ID が重複";
|
|
102
113
|
readonly condition_invalid: "フィールドの条件が同じ階層の選択肢のフィールドと値を指していない";
|
|
103
114
|
readonly page_condition_invalid: "ページの条件がコレクションの選択肢のフィールドと値を指していない";
|
|
104
115
|
readonly duplicate_collection_id: "コレクションの id が重複";
|
|
116
|
+
readonly collection_id_invalid: "コレクションの id は小文字の UUID";
|
|
117
|
+
readonly reference_to_files: "コレクション {collection} の参照の先が files のコレクション(ファイルはフィールドの種類 file と accept で指定)";
|
|
105
118
|
readonly duplicate_collection_slug: "コレクションのスラッグが重複";
|
|
106
119
|
readonly reserved_key: "コレクション {collection} のフィールド ID {key} はシステムの値と同じ名前(別の key に)";
|
|
107
120
|
readonly reserved_query_key: "コレクション {collection} のフィールド ID {key} は配信 API の絞り込みの予約の語(別の key に)";
|
|
108
|
-
readonly nested_rule: "コレクション {collection} のフィールド {field}: まとまりの中のフィールドは決まる値 derive・参照先で固定
|
|
121
|
+
readonly nested_rule: "コレクション {collection} のフィールド {field}: まとまりの中のフィールドは決まる値 derive・参照先で固定 fixed_by なし";
|
|
109
122
|
readonly computed_nested: "コレクション {collection} のフィールド {field}: まとまりの中のフィールドは計算のフィールドなし";
|
|
110
123
|
readonly computed_from_not_body: "コレクション {collection} のフィールド {field}: 計算の元 {from} が同じコレクションの本文のフィールドでない";
|
|
111
124
|
readonly computed_type_mismatch: "コレクション {collection} のフィールド {field}: 計算の種類 {kind} に合わないフィールドの種類 {type}";
|
|
112
125
|
readonly role_field_not_top: "コレクション {collection} の役割 {role}: フィールド {field} が最上位にない";
|
|
113
126
|
readonly role_field_mismatch: "コレクション {collection} の役割 {role}: フィールド {field}({type})は役割に合わない";
|
|
114
127
|
readonly audience_nested_wider: "コレクション {collection} のフィールド {field}: まとまりの中の見える範囲は外側と同じかスタッフ";
|
|
115
|
-
readonly
|
|
116
|
-
readonly audience_self_without_marker: "コレクション {collection}
|
|
117
|
-
readonly
|
|
128
|
+
readonly audience_end_user_field: "コレクション {collection} のフィールド {field}: エンドユーザーへの参照のフィールドの見える範囲は本人かスタッフ";
|
|
129
|
+
readonly audience_self_without_marker: "コレクション {collection} の見える範囲が本人のフィールドには、本人のフラグ self を付けたエンドユーザーへの参照のフィールドが要る";
|
|
130
|
+
readonly entitlement_not_reference: "コレクション {collection} の必要な権利 {entitlement}: 最上位の公開かアクセス権の参照のフィールドでない";
|
|
118
131
|
readonly audience_wider_than_source: "コレクション {collection} のフィールド {field}: {source, select, computed {計算} derive {決まる値} other {条件}}の元 {from} より広い見える範囲にできない(元の値が漏れる)";
|
|
119
132
|
readonly template_id_placeholder: "コレクション {collection} の雛形 {template}: '{id}' は使えない('{slug}' にする)";
|
|
120
133
|
readonly template_private_placeholder: "コレクション {collection} の雛形 {template} の '{'{key}'}': 公開のフィールドだけ(配信とページのパスに値が出る)";
|
|
@@ -122,37 +135,50 @@ export declare const schemaProblem: import("../../i18n/src/index.js").ProblemFac
|
|
|
122
135
|
readonly count_reference_private: "コレクション {collection} の被参照の件数 {key}: コレクション {fromCollection} の参照のフィールド {field} が公開でない(件数で値が漏れる)";
|
|
123
136
|
readonly count_reference_mismatch: "コレクション {collection} の被参照の件数 {key}: コレクション {fromCollection} の参照のフィールド {field} がこのコレクションを指していない";
|
|
124
137
|
readonly count_key_duplicate: "コレクション {collection} の被参照の件数 {key} がフィールド ID と重複";
|
|
125
|
-
readonly
|
|
126
|
-
readonly
|
|
127
|
-
readonly
|
|
128
|
-
readonly
|
|
129
|
-
readonly anonymize_without_on_delete: "コレクション {collection} のフィールド {field}: anonymize のフィールドは onDelete が anonymize のときだけ";
|
|
138
|
+
readonly end_user_field_nested: "コレクション {collection} のフィールド {field}: エンドユーザーへの参照のフィールドはまとまりの中に置かない";
|
|
139
|
+
readonly on_delete_required: "コレクション {collection} のフィールド {field}: 必須項目に on_delete {on_delete} は使えない";
|
|
140
|
+
readonly on_delete_min_items: "コレクション {collection} のフィールド {field}: 件数の下限のある参照に on_delete {on_delete} は使えない";
|
|
141
|
+
readonly anonymize_without_on_delete: "コレクション {collection} のフィールド {field}: anonymize のフィールドは on_delete が anonymize のときだけ";
|
|
130
142
|
readonly anonymize_field_missing: "コレクション {collection} のフィールド {field}: anonymize のフィールド {target} が同じコレクションの最上位にない";
|
|
131
143
|
readonly anonymize_field_unclearable: "コレクション {collection} のフィールド {field}: anonymize のフィールド {target}({type})は空にできない種類";
|
|
132
144
|
readonly anonymize_field_required: "コレクション {collection} のフィールド {field}: anonymize のフィールド {target} は必須項目";
|
|
133
|
-
readonly cascade_cycle: "
|
|
134
|
-
readonly cascade_too_deep: "コレクション {collection}: 人からの
|
|
135
|
-
readonly
|
|
145
|
+
readonly cascade_cycle: "on_delete cascade が循環: {cycle}";
|
|
146
|
+
readonly cascade_too_deep: "コレクション {collection}: 人からの on_delete cascade の深さ {depth, number} が上限 {max, number} を超える";
|
|
147
|
+
readonly cascade_self_end_user: "コレクション {collection} のフィールド {field}: 参照の cascade でたどるコレクションに本人のエンドユーザーへの参照のフィールドは置けない(ほかの人の記録を連鎖で消すため)";
|
|
136
148
|
readonly restrict_reachable: "コレクション {collection} のフィールド {field}: 人から cascade でたどれるコレクション {to} を restrict で指せない(人の削除の求めを止めないため)";
|
|
137
|
-
readonly on_delete_undeclared_reference: "コレクション {collection} のフィールド {field}: 人から cascade でたどれるコレクション {to} を指す参照は
|
|
149
|
+
readonly on_delete_undeclared_reference: "コレクション {collection} のフィールド {field}: 人から cascade でたどれるコレクション {to} を指す参照は on_delete を宣言する";
|
|
150
|
+
readonly capability_required: "コレクション {collection}: {declaration} には能力 {capability} が要る";
|
|
138
151
|
readonly private_object: "コレクション {collection} は非公開のコレクション: オブジェクト形式にしない";
|
|
139
|
-
readonly
|
|
152
|
+
readonly private_publication: "コレクション {collection} は非公開のコレクション: 公開の管理なしにする";
|
|
140
153
|
readonly private_pages: "コレクション {collection} は非公開のコレクション: ページを持たない";
|
|
141
|
-
readonly
|
|
154
|
+
readonly private_entitlement: "コレクション {collection} は非公開のコレクション: 必要な権利を付けない";
|
|
142
155
|
readonly reference_target_missing: "コレクション {collection} の参照先 {to} がスキーマにない";
|
|
143
156
|
readonly component_unknown: "コレクション {collection} の本文のフィールド {field} の部品 {name} がコアの部品にも宣言 components にもない";
|
|
144
|
-
readonly
|
|
145
|
-
readonly
|
|
146
|
-
readonly retention_days_undeclared: "コレクション {collection}: 人の操作
|
|
147
|
-
readonly
|
|
148
|
-
readonly
|
|
149
|
-
readonly
|
|
157
|
+
readonly end_user_on_delete_undeclared: "コレクション {collection} のフィールド {field}: エンドユーザーへの参照のフィールドは on_delete(cascade・anonymize・clear)を宣言する";
|
|
158
|
+
readonly end_user_in_object_collection: "コレクション {collection} のフィールド {field}: オブジェクト形式のコレクションにエンドユーザーへの参照のフィールドを置かない(バージョン履歴を人の削除で扱えないため)";
|
|
159
|
+
readonly retention_days_undeclared: "コレクション {collection}: 人の操作 self_ops を持つコレクションは保持の日数 retention_days を宣言する";
|
|
160
|
+
readonly kind_declaration_invalid: "コレクション {collection}: 種類 {kind} は {declaration} を宣言できない";
|
|
161
|
+
readonly kind_declaration_required: "コレクション {collection}: 種類 {kind} は {declaration} を宣言する";
|
|
162
|
+
readonly kind_field_missing: "コレクション {collection}: {declaration} のフィールド {field} がない";
|
|
163
|
+
readonly kind_time_invalid: "コレクション {collection}: 時刻のフィールド {field} は日付か日時のフィールドにする";
|
|
164
|
+
readonly kind_subject_invalid: "コレクション {collection}: 本人を指すフィールド {field} はエンドユーザーへの参照のフィールドにする";
|
|
165
|
+
readonly index_field_invalid: "コレクション {collection}: フィールド {field} には索引を宣言できない(テキスト、選択、ステータス、チェックボックス、数値、日付、日時の単数の値で、要配慮個人情報でないものだけ)";
|
|
166
|
+
readonly indexes_too_many: "コレクション {collection}: 索引は {max} 個まで";
|
|
167
|
+
readonly aggregate_dimensions_too_many: "コレクション {collection}: 集計の次元は {max} 個まで";
|
|
168
|
+
readonly aggregate_dimension_person: "コレクション {collection}: 本人を指すフィールド {field} を集計の次元にできない";
|
|
169
|
+
readonly aggregate_bucket_pair: "コレクション {collection}: 集計の時刻のフィールド time と時間の区切り bucket は両方を宣言するか、どちらも宣言しない";
|
|
170
|
+
readonly aggregate_measure_invalid: "コレクション {collection}: 集計の値のフィールド {field} は数値のフィールドにする";
|
|
171
|
+
readonly aggregate_field_undeclared: "コレクション {collection}: 集計のフィールド {field} は時刻・次元・値のいずれかに宣言する";
|
|
172
|
+
readonly collection_kind_unavailable: "コレクション {collection}: 種類 {kind} のこの宣言はまだ作成できない";
|
|
173
|
+
readonly audience_invalid: "コレクション {collection} のフィールド {field}: 見える範囲 audience の値が不正(public・entitled・self・none)";
|
|
174
|
+
readonly audience_undeclared: "コレクション {collection} のフィールド {field}: 見える範囲 audience を書く(足す・変えるフィールド、public・entitled・self・none)";
|
|
175
|
+
readonly audience_undeclared_personal: "コレクション {collection} のフィールド {field}: エンドユーザーへの参照のフィールドを持つコレクションに足すフィールドは見える範囲 audience を書く(public・entitled・self・none、個人の情報なら none)";
|
|
150
176
|
readonly unique_list_only: "コレクション {collection} の一意の組は一覧のコレクションだけ";
|
|
151
|
-
readonly unique_name_duplicate: "コレクション {collection} の一意の組 {key}
|
|
177
|
+
readonly unique_name_duplicate: "コレクション {collection} の一意の組 {key} の名前が重複(エンドユーザーへの参照のフィールドの unique と連番はフィールド ID が名前)";
|
|
152
178
|
readonly unique_field_count: "コレクション {collection} の一意の組 {key}: フィールドは1つから{max, number}つ";
|
|
153
179
|
readonly unique_field_duplicate: "コレクション {collection} の一意の組 {key}: フィールドが重複";
|
|
154
180
|
readonly unique_field_not_top: "コレクション {collection} の一意の組 {key}: フィールド {field} が最上位にない";
|
|
155
|
-
readonly unique_field_unsupported: "コレクション {collection} の一意の組 {key}: フィールド {field}({type}
|
|
181
|
+
readonly unique_field_unsupported: "コレクション {collection} の一意の組 {key}: フィールド {field}({type})は一意にできない(単数の文字・数値・選択肢・参照・日付・エンドユーザーへの参照のフィールドだけ)";
|
|
156
182
|
readonly sequence_nested: "コレクション {collection} のフィールド {field}: 連番はまとまりの中に置かない";
|
|
157
183
|
readonly sequence_list_only: "コレクション {collection} のフィールド {field}: 連番は一覧のコレクションだけ";
|
|
158
184
|
readonly sequence_plain: "コレクション {collection} のフィールド {field}: 連番は必須・計算・条件を持たない(作成のときに振る)";
|
|
@@ -162,15 +188,32 @@ export declare const schemaProblem: import("../../i18n/src/index.js").ProblemFac
|
|
|
162
188
|
readonly transition_from_empty: "コレクション {collection} のフィールド {field} の遷移 {index, number}: 移る前の値がない";
|
|
163
189
|
readonly transition_from_not_option: "コレクション {collection} のフィールド {field} の遷移 {index, number}: 移る前の値 {value} が選択肢にない";
|
|
164
190
|
readonly transition_no_actor: "コレクション {collection} のフィールド {field} の遷移 {index, number}: 移せる者がない";
|
|
165
|
-
readonly
|
|
166
|
-
readonly
|
|
167
|
-
readonly
|
|
168
|
-
readonly
|
|
169
|
-
readonly
|
|
170
|
-
readonly
|
|
171
|
-
readonly
|
|
172
|
-
readonly
|
|
173
|
-
readonly
|
|
191
|
+
readonly form_private_list_only: "コレクション {collection}: フォームは非公開の一覧のコレクションだけ(送信の内容を配信しない)";
|
|
192
|
+
readonly form_with_self_ops: "コレクション {collection}: フォームと人の操作 self_ops は同時に宣言できない";
|
|
193
|
+
readonly form_delivered_field: "コレクション {collection} のフィールド {field}: フォームのコレクションに配信する見える範囲(public・entitled)を付けられない";
|
|
194
|
+
readonly form_one_end_user: "コレクション {collection}: 送信者が end_user のフォームには、エンドユーザーへの参照のフィールドがちょうど1つ要る";
|
|
195
|
+
readonly form_required_missing: "コレクション {collection} のフィールド {field}: 保存で必須のフィールドがフォームにない";
|
|
196
|
+
readonly form_field_unsupported: "コレクション {collection} のフォームのフィールド {field}: 送信者が書けるのは、最上位の1つの値のテキスト・連絡先・選択肢だけ(条件つき・管理者だけ・仕組みが決める値を除く)";
|
|
197
|
+
readonly form_field_duplicate: "コレクション {collection} のフォームのフィールド {field} が重複";
|
|
198
|
+
readonly form_required_when: "コレクション {collection} のフォームのフィールド {field}: required_when は、フォームのほかの選択肢のフィールドとその値を指す";
|
|
199
|
+
readonly form_hosts: "コレクション {collection} のフォームのフィールド {field}: hosts は URL のフィールドだけで、小文字のホスト名か site を挙げる";
|
|
200
|
+
readonly form_handled_field: "コレクション {collection} の対応の状態 {field}: 1つの値の選択肢のフィールドを指す";
|
|
201
|
+
readonly form_handled_done: "コレクション {collection} の対応の状態 {field}: 対応済みの値は選択肢の値で、初期値を含めない";
|
|
202
|
+
readonly form_handled_at_missing: "コレクション {collection} の対応の状態 {field}: 対応日時のフィールド(managed が form_handled_at)が要る";
|
|
203
|
+
readonly form_handled_writable: "コレクション {collection} の対応の状態 {field}: 送信者が書けるフィールドにしない";
|
|
204
|
+
readonly form_managed_nested: "コレクション {collection} のフィールド {field}: フラグ managed はまとまりの中に付けない";
|
|
205
|
+
readonly form_managed_shape: "コレクション {collection} のフィールド {field}: フラグ {managed} は種類 {type} の、必須でも条件つきでもない1つの値のフィールドだけ";
|
|
206
|
+
readonly form_managed_undeclared: "コレクション {collection} のフィールド {field}: フラグ {managed} に対応するフォームの宣言がない";
|
|
207
|
+
readonly form_managed_duplicate: "コレクション {collection} のフィールド {field}: フラグ {managed} は1つだけ";
|
|
208
|
+
readonly self_ops_private_only: "コレクション {collection} の人の操作 self_ops は非公開のコレクションだけ(人が書いた値と本人の値を配信に出さない)";
|
|
209
|
+
readonly self_ops_list_only: "コレクション {collection} の人の操作 self_ops は一覧のコレクションだけ(オブジェクト形式のコレクションはレコードが1つ)";
|
|
210
|
+
readonly self_ops_unpublished: "コレクション {collection} の人の操作 self_ops のコレクションは公開の管理と公開のフィールド published を持たない(本人のレコードは公開の状態によらず本人に見せる)";
|
|
211
|
+
readonly self_ops_one_self: "コレクション {collection} の人の操作 self_ops は本人のエンドユーザーへの参照のフィールドがちょうど1つのコレクションだけ";
|
|
212
|
+
readonly self_ops_on_delete: "コレクション {collection} の人の操作 self_ops のコレクションの本人のエンドユーザーへの参照のフィールド {field} は on_delete を cascade か anonymize にする(人の削除で本人のレコードを残さない)";
|
|
213
|
+
readonly self_ops_unique: "コレクション {collection} の人の操作 self_ops のコレクションの一意の組 {key} は本人のエンドユーザーへの参照のフィールド {field} を含む(ほかの人の値とぶつけない)";
|
|
214
|
+
readonly self_writable_nested: "コレクション {collection} のフィールド {field}: 本人の書き込みのフラグ self_writable はまとまりの中に付けない";
|
|
215
|
+
readonly self_writable_blocked: "コレクション {collection} のフィールド {field}: {block, select, end_user {エンドユーザーへの参照のフィールド} object {まとまり} file {ファイルのフィールド} rich_text {本文のフィールド} staff {スタッフのフィールド} admin_only {管理者だけのフィールド} computed {計算のフィールド} other {連番のフィールド}}に本人の書き込みのフラグ self_writable は付けられない";
|
|
216
|
+
readonly self_writable_without_ops: "コレクション {collection} のフィールド {field}: 本人の書き込みのフラグ self_writable は人の操作 create_self か update_self を受けるコレクションだけ";
|
|
174
217
|
}>;
|
|
175
218
|
/** 問題の英語の文(表の外のコードは既定の形) */
|
|
176
219
|
export declare const schemaProblemEnglish: (p: Problem) => string;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import type { FieldDef } from './collection.js';
|
|
2
|
-
/** 参照の逆引きの1行(toCollection は参照先のコレクション、toId は参照先の ID) */
|
|
3
|
-
export type RecordRef = Readonly<{
|
|
4
|
-
key: string;
|
|
5
|
-
position: number;
|
|
6
|
-
toCollection: string;
|
|
7
|
-
toId: string;
|
|
8
|
-
}>;
|
|
9
|
-
/** レコードの値の参照(fields はコレクションの項目、values はレコードの値) */
|
|
10
|
-
export declare function recordRefsOf(fields: readonly FieldDef[], values: unknown): RecordRef[];
|
|
11
2
|
/** 応答の参照の値(id はレコードの id、slug はレコードのスラッグ) */
|
|
12
3
|
export type ReferenceValue = Readonly<{
|
|
13
4
|
id: string;
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type CollectionSchema, type Collection } from './collection.js';
|
|
3
|
+
import { type NewFieldId } from './fieldIds.js';
|
|
3
4
|
/** 保持の日数の上限(100年) */
|
|
4
5
|
export declare const RETENTION_DAYS_MAX = 36500;
|
|
6
|
+
/** コレクションのスラッグの形 */
|
|
7
|
+
export declare const COLLECTION_SLUG_PATTERN: RegExp;
|
|
5
8
|
/** 項目の宣言の形(アプリのマニフェストのコレクションの項目の検査に使う) */
|
|
6
9
|
export declare const fieldDefSchema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
7
10
|
/** 項目の key に使えない名前の全部(公開の管理の有無によらない。アプリのマニフェストの検査) */
|
|
8
11
|
export declare const RESERVED_FIELD_KEYS: readonly string[];
|
|
9
|
-
/** 人から cascade
|
|
12
|
+
/** 人から cascade でたどれる深さの上限(エンドユーザーへの参照のフィールドの cascade のコレクションを1とする) */
|
|
10
13
|
export declare const MAX_CASCADE_DEPTH = 4;
|
|
11
14
|
/**
|
|
12
15
|
* 宣言の必須の誤り(スキーマの保存の経路だけ、schema は保存する parseSchema の結果、prev は今の版)
|
|
13
|
-
* -
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
16
|
+
* - 足したか変えたエンドユーザーへの参照のフィールドの on_delete の宣言なし(今のスキーマと同じ宣言なしは通す。on_delete のない旧い保存を読めるよう、
|
|
17
|
+
* parseSchema では拒まない)
|
|
18
|
+
* - 足したか変えたオブジェクト形式のコレクションのエンドユーザーへの参照のフィールド(版の履歴を人の削除で扱えないため。今のスキーマにあるものは人の削除を止める)
|
|
19
|
+
* コレクションの形式 format を変えたコレクションのエンドユーザーへの参照のフィールドは変えたとみなす
|
|
20
|
+
* - 人から cascade でたどれるコレクションを指す、on_delete の宣言のない参照の項目
|
|
17
21
|
*/
|
|
18
22
|
export declare function undeclaredDeleteProblems(schema: CollectionSchema, prev: CollectionSchema): string[];
|
|
19
23
|
/**
|
|
20
24
|
* 保持の日数の宣言の必須の誤り(スキーマの保存の経路だけ、#683の5)
|
|
21
|
-
* - 人の操作
|
|
22
|
-
* -
|
|
25
|
+
* - 人の操作 self_ops を足すか変える保存に retention_days を求める
|
|
26
|
+
* - 本人のエンドユーザーへの参照のフィールドを持つコレクションの全部に広げるのは、画面で日数を入れられるマイルストーン(#712の P4)。それまでは画面で作るアンケートの保存を止めない
|
|
23
27
|
*/
|
|
24
28
|
export declare function retentionProblems(schema: CollectionSchema, prev: CollectionSchema): string[];
|
|
25
29
|
/**
|
|
@@ -47,12 +51,13 @@ export type SaveCheck = Readonly<{
|
|
|
47
51
|
* スキーマの保存の検査(すべての保存の経路が通る、prev は今の版の読み込んだ形)
|
|
48
52
|
* - 入力は旧い語を今の名前にした形のまま保存する(既定を書き込まない)。規則は audienceOf で読み替えた形に当てる
|
|
49
53
|
* - 規則の問題: 今の版にもある問題は止めない(変えていない項目には形だけ、無関係の変更で既存の保存を止めない)
|
|
50
|
-
* - 見える範囲:
|
|
51
|
-
*
|
|
52
|
-
* -
|
|
53
|
-
* - restoring:
|
|
54
|
+
* - 見える範囲: 足す・変える最上位の項目に明示を求める(audienceIssues)
|
|
55
|
+
* - エンドユーザーへの参照のフィールドの on_delete とたどれるコレクションの参照の宣言: undeclaredDeleteProblems
|
|
56
|
+
* - newFieldId: id のない新しいフィールドの内部の id の払い出し(UUID v7)
|
|
57
|
+
* - restoring: ゴミ箱から戻すコレクション(削除のときの定義、コレクションの中の差はなし)
|
|
54
58
|
* - 禁止の変更・確認の変更は changes.ts の diffSchema(呼び出し元が過去の版と合わせて求める)
|
|
55
59
|
*/
|
|
56
|
-
export declare function validateSchemaForSave(prev: CollectionSchema, input: unknown, { restoring }
|
|
60
|
+
export declare function validateSchemaForSave(prev: CollectionSchema, input: unknown, { newFieldId, restoring }: Readonly<{
|
|
61
|
+
newFieldId: NewFieldId;
|
|
57
62
|
restoring?: Collection;
|
|
58
63
|
}>): SaveCheck;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { type Collection, type FieldDef, type
|
|
1
|
+
import { type Collection, type FieldDef, type EndUserField, type SelfOp } from './collection.js';
|
|
2
2
|
/** 本人の確認の方法(id_token は Tunasand が ID トークンで確認した、site はサイトが名乗った) */
|
|
3
|
-
export type
|
|
4
|
-
/**
|
|
5
|
-
export type
|
|
3
|
+
export type EndUserProof = 'id_token' | 'site';
|
|
4
|
+
/** コレクションごとに受けるかが決まる人の操作(宣言の操作と、フォームの submit) */
|
|
5
|
+
export type EndUserOperation = SelfOp | 'submit';
|
|
6
6
|
/** 人の書き込みの種類(create は create_self と submit、update は update_self) */
|
|
7
7
|
export type SelfWrite = 'create' | 'update';
|
|
8
|
-
/**
|
|
9
|
-
export declare const isSelfField: (f: FieldDef, collection: Pick<Collection, "private" | "fields">) => f is
|
|
10
|
-
/**
|
|
11
|
-
export declare const selfFieldsOf: (collection: Pick<Collection, "private" | "fields">) =>
|
|
12
|
-
/**
|
|
13
|
-
export declare const isSelfRow: (collection: Pick<Collection, "private" | "fields">, values: Readonly<Record<string, unknown>>,
|
|
8
|
+
/** 本人のエンドユーザーへの参照のフィールドか(コレクションの最上位の項目) */
|
|
9
|
+
export declare const isSelfField: (f: FieldDef, collection: Pick<Collection, "private" | "fields">) => f is EndUserField;
|
|
10
|
+
/** コレクションの本人のエンドユーザーへの参照のフィールド */
|
|
11
|
+
export declare const selfFieldsOf: (collection: Pick<Collection, "private" | "fields">) => EndUserField[];
|
|
12
|
+
/** レコードの値で、本人がそのレコードの本人か(本人のエンドユーザーへの参照のフィールドのどれかが本人を指す。DM のように複数でも同じ) */
|
|
13
|
+
export declare const isSelfRow: (collection: Pick<Collection, "private" | "fields">, values: Readonly<Record<string, unknown>>, endUserId: string) => boolean;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* 人の操作の宣言の誤り(配信しない一覧のコレクション、本人のエンドユーザーへの参照のフィールドがちょうど1つで on_delete は cascade か anonymize、
|
|
16
|
+
* 一意の組はすべて本人のエンドユーザーへの参照のフィールドを含む)
|
|
17
17
|
*/
|
|
18
|
-
export declare function surveyInputField(f: FieldDef, collection: Pick<Collection, 'private' | 'fields'>): boolean;
|
|
19
|
-
/** 人の操作の宣言の誤り(配信しない一覧のコレクション、本人の顧客フィールドがちょうど1つで onDelete は cascade か anonymize、一意の組はすべて本人の顧客フィールドを含む) */
|
|
20
18
|
export declare function selfOpsProblems(collection: Collection): string[];
|
|
21
19
|
/** 本人が書ける印の誤り(付けられない項目、まとまりの中、create_self か update_self を受けないコレクション) */
|
|
22
20
|
export declare function selfWritableProblems(collection: Collection): string[];
|
|
23
21
|
/** コレクションが本人の確認の方法 proof で受ける人の操作 */
|
|
24
|
-
export declare function selfOpsOf(collection: Collection, proof:
|
|
25
|
-
/**
|
|
26
|
-
|
|
22
|
+
export declare function selfOpsOf(collection: Collection, proof: EndUserProof): EndUserOperation[];
|
|
23
|
+
/**
|
|
24
|
+
* 作成で本人を入れるエンドユーザーへの参照のフィールド(site は本人のエンドユーザーへの参照のフィールド、
|
|
25
|
+
* id_token のフォームは formOwnerOf。受けないコレクションは null)
|
|
26
|
+
*/
|
|
27
|
+
export declare function ownerFieldOf(collection: Collection, proof: EndUserProof): EndUserField | null;
|
|
27
28
|
/** 本人が書ける最上位の項目か(本人の確認の方法 proof と書き込みの種類 write で読み替える) */
|
|
28
|
-
export declare function selfWritableOf(f: FieldDef, collection: Collection, proof:
|
|
29
|
+
export declare function selfWritableOf(f: FieldDef, collection: Collection, proof: EndUserProof, write: SelfWrite): boolean;
|
|
29
30
|
/** 本人が書ける最上位の項目の key */
|
|
30
|
-
export declare const selfWritableKeysOf: (collection: Collection, proof:
|
|
31
|
+
export declare const selfWritableKeysOf: (collection: Collection, proof: EndUserProof, write: SelfWrite) => string[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type CollectionSchema, type Collection, type FieldDef } from './collection.js';
|
|
2
|
+
/** 出典の項目と、内側の項目の key */
|
|
3
|
+
export declare const SOURCES_FIELD: {
|
|
4
|
+
readonly key: "sources";
|
|
5
|
+
readonly source: "source";
|
|
6
|
+
readonly note: "note";
|
|
7
|
+
};
|
|
8
|
+
/** 出典の項目の定義(参照の項目 source の参照先 to) */
|
|
9
|
+
export type SourcesField = Extract<FieldDef, {
|
|
10
|
+
type: 'object';
|
|
11
|
+
}> & Readonly<{
|
|
12
|
+
to: string;
|
|
13
|
+
}>;
|
|
14
|
+
/** 主のコレクション(スキーマの順で先頭、なければ null) */
|
|
15
|
+
export declare const primaryCollectionOf: (schema: CollectionSchema) => Collection | null;
|
|
16
|
+
/** 主のコレクション(なければ例外: そのコレクションを前提にする画面・処理だけが使用) */
|
|
17
|
+
export declare function requiredPrimaryCollectionOf(collectionSchema: CollectionSchema): Collection;
|
|
18
|
+
/** 暦の日付(日付の役割の項目を持つ一覧のコレクションと項目の key、スキーマの順、役割は宣言だけで推測なし) */
|
|
19
|
+
export declare const dateRoleFieldsOf: (schema: CollectionSchema) => {
|
|
20
|
+
collection: string;
|
|
21
|
+
field: string;
|
|
22
|
+
}[];
|
|
23
|
+
/** コレクションの出典の項目(なければ null) */
|
|
24
|
+
export declare function sourcesFieldOf(collection: Pick<Collection, 'fields'>): SourcesField | null;
|
|
25
|
+
/** 出典のコレクション(出典の項目の参照先でスキーマの順で先頭、なければ null) */
|
|
26
|
+
export declare function sourceCollectionOf(schema: CollectionSchema): Collection | null;
|
|
27
|
+
/** 出典の値にある参照の ID(注の順、空と形の誤りは除外) */
|
|
28
|
+
export declare const sourceIdsOf: (value: unknown) => string[];
|
|
@@ -10,7 +10,7 @@ export declare class UnknownFieldTypeError extends Error {
|
|
|
10
10
|
* スキーマから配信 API の値の型の定義(TypeScript のアプリの文)
|
|
11
11
|
* - コレクションごとに `export type <PascalCase のコレクションのスラッグ>`
|
|
12
12
|
* - 全体の対応 `CmsTypes`(キーはスラッグ)とスラッグの一覧 `COLLECTION_SLUGS`
|
|
13
|
-
* - types:
|
|
13
|
+
* - types: 配信するコレクションだけ(files のコレクションを除いた一覧、配信 API の `/collections` の値)。非公開のコレクションは渡されても除く
|
|
14
14
|
* - 例外: 生成できない項目の型(CMS が SDK より新しい型を返した)は UnknownFieldTypeError
|
|
15
15
|
*/
|
|
16
16
|
export declare function typesSourceOf(collectionSchema: Pick<CollectionSchema, 'collections'>): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Collection, type FieldDef } from './collection.js';
|
|
2
|
-
/**
|
|
2
|
+
/** 配信する項目(本人とスタッフの項目とエンドユーザーへの参照のフィールドを除く、まとまりの中も) */
|
|
3
3
|
export declare const deliveredFields: (collection: Pick<Collection, "private" | "fields">) => FieldDef[];
|
|
4
4
|
/** 空の値(複数の値は空の配列、まとまりは項目ごとに空の値、ほかは null) */
|
|
5
5
|
export declare const emptyValues: (fields: readonly FieldDef[]) => Record<string, unknown>;
|
|
@@ -11,10 +11,13 @@ export declare const emptyValues: (fields: readonly FieldDef[]) => Record<string
|
|
|
11
11
|
* - 項目を定義しないまとまり: 値をそのまま(形はアプリが保存前に検査、例: データセットのグラフ)
|
|
12
12
|
*/
|
|
13
13
|
export declare function pickValues(fields: readonly FieldDef[], input: unknown): Record<string, unknown>;
|
|
14
|
-
/** 値の中で参照している ID(to のコレクションへの参照だけ、まとまりの中も含む、labels
|
|
14
|
+
/** 値の中で参照している ID(to のコレクションへの参照だけ、まとまりの中も含む、labels は外側のまとまりから参照の項目までの表示名、field は参照の項目の定義) */
|
|
15
15
|
export declare function referencedIds(fields: readonly FieldDef[], values: unknown, to: string): {
|
|
16
16
|
labels: string[];
|
|
17
17
|
id: string;
|
|
18
|
+
field: Extract<FieldDef, {
|
|
19
|
+
type: 'reference';
|
|
20
|
+
}>;
|
|
18
21
|
}[];
|
|
19
22
|
/** コレクションの参照の項目(to を指定すると、そのコレクションへの参照だけ) */
|
|
20
23
|
export declare const referencesOf: (collection: Collection, to?: string) => Extract<FieldDef, {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { VIEW_COLUMNS,
|
|
1
|
+
export { VIEW_COLUMNS, viewOf } from '../../contract/src/index.js';
|
|
2
|
+
export { VIEW_SCHEMA } from '../../adapter-cloudflare/src/eventLog/viewSchema.js';
|
|
2
3
|
export type { Classify, ViewEvent, ViewOptions } from '../../contract/src/index.js';
|
|
@@ -1,33 +1,51 @@
|
|
|
1
1
|
import type { AppContext } from '../../contract/src/app.js';
|
|
2
|
+
import type { AppPortFailure, AppPortResult } from '../../contract/src/appServer.js';
|
|
2
3
|
import type { User } from '../../contract/src/roles.js';
|
|
3
4
|
import type { ErrorCode, ErrorParams, Issue, IssueInput } from '../../contract/src/errors.js';
|
|
4
5
|
import { newUuidV7 } from '../../contract/src/ids.js';
|
|
5
6
|
export { newUuidV7 };
|
|
6
7
|
import type { z } from 'zod';
|
|
7
8
|
export { egressAllows } from '../../contract/src/app.js';
|
|
8
|
-
export { appAssertion, type AppSigningKey, bearerClient, type DelegationExchange, type DelegationExchangeResult, exchangeDelegation } from './delegation.js';
|
|
9
|
+
export { appAssertion, type AppSigningKey, bearerClient, type DelegationExchange, type DelegationExchangeResult, exchangeDelegation, exchangeSessionToken, type SessionTokenExchange } from './delegation.js';
|
|
9
10
|
export { type AppProblem, appProblems } from '../../contract/src/appProblems.js';
|
|
10
|
-
export type { AppDeliveryContext, AppDeliveryRoute, AppJob,
|
|
11
|
-
export type { AppContext, AppRoute,
|
|
11
|
+
export type { AggregateExtent, AggregateRange, AggregateRebuild, AggregateRollup, AggregateValues, AppChannelConsent, AppConnections, AppEndUserIdentity, AppEndUserIssuer, AppEndUsersPort, AppEventsPort, AppFilesPort, AppDeliveryContext, AppDeliveryRoute, AppJob, AppNoticeKind, AppNotifyPort, AppNotifyRequest, AppNotifyResult, AppRecord, AppRecordCondition, AppRecordQuery, AppRecordsPort, AppRow, AppMessageProvider, AppNoticesProvider, AppPaymentProvider, AppPaymentsPort, AppMessagesPort, AppSavedContext, AppScope, AppSecretsPort, AppServer, AppServerContext, AppServerParts, AppCollectionTarget, AppStatePort, DailyViews, ResolvedSlugs, VisibleRecords, CollectionRule, Problem, RecordRuleContext, Rule, RuleStage, SaveCheck, SaveCheckContext, SaveCheckResult, AppPageRequest, AppRecordPage, AppPortErrorCode, AppPortFailure, AppPortResult } from '../../contract/src/appServer.js';
|
|
12
|
+
export type { AppContext, AppRoute, AppRouteArea, AppRouteCredentials, AppRouteMethod, CmsClient } from '../../contract/src/app.js';
|
|
13
|
+
export { cmsListAll } from '../../contract/src/app.js';
|
|
14
|
+
export { appRecordList, boundedList, DELEGABLE, pageOf, PERSON } from '../../contract/src/api/define.js';
|
|
15
|
+
export type { ListIndex, ListSpec } from '../../contract/src/api/define.js';
|
|
12
16
|
export type { ErrorBody, ErrorCode, ErrorParams, Issue, IssueInput, IssueSeverity } from '../../contract/src/errors.js';
|
|
13
17
|
export { JSON_BODY_MAX } from '../../contract/src/errors.js';
|
|
18
|
+
export { type AppNotice, type AppNotices, NOTICES_PORT } from '../../contract/src/notices.js';
|
|
19
|
+
export { type AppSettingDef, type AppSettingRowField, BUNDLED_APP_IDS } from '../../contract/src/appDependencies.js';
|
|
20
|
+
export { aggregateJobIdOf, APP_FILE_LIMITS, APP_NOTICE_KINDS, APP_NOTIFY_LIMITS, APP_USAGE_ERRORS, APP_STATE_LIMITS, allRecordPages } from '../../contract/src/appServer.js';
|
|
14
21
|
export { type AppDefinition, type AppSettings, NO_SETTINGS } from '../../contract/src/appDefinition.js';
|
|
15
|
-
export type { AppManifest,
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
22
|
+
export type { AppManifest, AppUi, AppUiIcon } from '../../contract/src/apps.js';
|
|
23
|
+
export { appToolPrefixOf } from '../../contract/src/apps.js';
|
|
24
|
+
export { type AppManifestDocument, type AppManifestText, manifestDocumentOf } from '../../contract/src/manifestText.js';
|
|
25
|
+
export type { AppOutbound, AppOutboundAuth, AppOutboundMethod } from '../../contract/src/outbound.js';
|
|
26
|
+
export type { AppHmacCheck, AppHmacHash, AppOperatorSecrets, AppSecretDeclaration, AppSecretState, AppSignatureEncoding } from '../../contract/src/appSecrets.js';
|
|
27
|
+
export type { AppIdentityDeclaration } from '../../contract/src/appIdentities.js';
|
|
28
|
+
export type { AppDispatched, AppDispatchRequest, AppInboundDeclaration, AppInboundOutcome, AppInboundRequest } from '../../contract/src/appInbound.js';
|
|
29
|
+
export { APP_CHANNEL_KIND_LIMITS, APP_CHANNEL_LIMITS, CHANNEL_ADDRESS_KINDS, CHANNEL_CAPABILITIES, CHANNEL_MODES, channelSettingPattern } from '../../contract/src/appChannels.js';
|
|
30
|
+
export type { AppChannel, AppChannelKind, AppChannelSettingDef, ChannelCreateBody, ChannelPatch, ChannelSecretStatus, ChannelView, AppChannelsPort, ChannelAddress, ChannelAddressKind, ChannelCapability, ChannelExternalKeys, ChannelMode } from '../../contract/src/appChannels.js';
|
|
31
|
+
export { APP_MAIL_SKIP_REASONS, MAIL_CAPABILITIES } from '../../contract/src/appMail.js';
|
|
32
|
+
export type { AppInboundMail, AppMailDeclaration, AppMailDomain, AppMailPort, AppMailSendRequest, AppMailSendResult, AppMailSkipReason, MailAuthentication, MailAuthResult } from '../../contract/src/appMail.js';
|
|
33
|
+
export { MESSAGE_LIMITS, MESSAGE_PORT, MESSAGE_RECEIVED, MESSAGE_SKIP_REASONS } from '../../contract/src/messagePort.js';
|
|
34
|
+
export { PAYMENT_LIMITS, PAYMENT_PORT, priceLookupKeyOf, PRICE_CURRENCIES, PRICE_INTERVALS, PRICE_KINDS, PURCHASE_STATUSES, SUBSCRIPTION_STATUSES, type OfferView, type PaymentCheckout, type PaymentCheckoutRequest, type PaymentPortalRequest, type PriceView, type PurchaseReflection, type ReflectionResult, type SubscriptionReflection, type SubscriptionStatus } from '../../contract/src/paymentPort.js';
|
|
35
|
+
export type { MessageProblem, MessageProviderResult, MessageReceived, MessageAddress, MessageReceivedInput, MessageRecipient, MessageSender, MessageSendRequest, MessageSendResult, MessageSkipReason, PortMessage, ReceivedItem } from '../../contract/src/messagePort.js';
|
|
36
|
+
export { SettingProblem, settingProblemText, type SettingRow, settingRowsOf } from '../../contract/src/settingProblems.js';
|
|
37
|
+
export { ADMIN_AREA_OPERATION } from '../../contract/src/roles.js';
|
|
18
38
|
export { calendarFieldSource, type CalendarField, type CalendarItem } from '../../contract/src/workspaceItems.js';
|
|
19
|
-
export { allows, ownsRow } from '../../contract/src/permissions.js';
|
|
20
39
|
export { workspaceRecordPath } from '../../contract/src/workspacePaths.js';
|
|
40
|
+
export { isLiveState, type RecordRow, recordStateOf } from '../../contract/src/workflow.js';
|
|
21
41
|
export type { CallApi, McpApp, McpParts, McpProjectContext, McpPrompt, McpTool } from '../../contract/src/appDefinition.js';
|
|
22
|
-
export { audiencesFor, canReadField, titleFor } from '../../contract/src/fieldAccess.js';
|
|
23
|
-
export { principalOfUser } from '../../contract/src/principal.js';
|
|
24
42
|
export type { User };
|
|
25
|
-
export { IMPORT_ITEMS_MAX, importIdOf, importItemOfRow, cyclicCollections, ORIGIN_REF,
|
|
26
|
-
export {
|
|
43
|
+
export { IMPORT_ITEMS_MAX, importIdOf, importItemOfRow, cyclicCollections, ORIGIN_REF, END_USER_REF } from '../../contract/src/import.js';
|
|
44
|
+
export { END_USER_STATUSES, END_USERS_KEY_TARGET } from '../../contract/src/endUsers.js';
|
|
27
45
|
export type { ImportItem, ImportItemReport, ImportProblem, ImportReport, ImportRowLine, SourceContentResult, SourceDropped, SourceDroppedRow, SourceLinesResult, SourceNote, SourceVerifyResult } from '../../contract/src/import.js';
|
|
28
46
|
export type { ReadbackReport } from '../../contract/src/migration.js';
|
|
29
|
-
export {
|
|
30
|
-
export type { Body,
|
|
47
|
+
export { richTextFromHtml } from '../../rich-text/src/index.js';
|
|
48
|
+
export type { Body, RichTextProfile, Dropped } from '../../rich-text/src/index.js';
|
|
31
49
|
export { AUDIENCES, isPublishable } from '../../schema/src/index.js';
|
|
32
50
|
export type { Audience, CollectionSchema, Collection, FieldDef } from '../../schema/src/index.js';
|
|
33
51
|
/** 検査の結果の形にそろえる(code の既定は invalid、severity の既定は error) */
|
|
@@ -40,9 +58,20 @@ export declare const appFailure: (request: Request, code: Exclude<ErrorCode, "ne
|
|
|
40
58
|
export declare function appFailureOf(targets: Readonly<Record<string, string>>): (request: Request, code: Exclude<ErrorCode, "network_error">, params?: ErrorParams, extra?: Readonly<{
|
|
41
59
|
issues?: readonly Issue[];
|
|
42
60
|
}> & Readonly<Record<string, unknown>>) => Response;
|
|
61
|
+
/** アプリの口の拒否の応答(CMS の API と同じ problem+json。状態はコードから) */
|
|
62
|
+
export declare const appPortResponse: (request: Request, failure: AppPortFailure) => Response;
|
|
63
|
+
/** 値のない成功の結果 */
|
|
64
|
+
export declare const PORT_DONE: AppPortResult<void>;
|
|
65
|
+
/**
|
|
66
|
+
* 結果の値(拒否は app_port_refused: <コード> の Error で投げる)
|
|
67
|
+
* - 拒否を想定しない処理(定期の処理が自分のコレクションを読むなど)だけで使う。利用者の操作の拒否は appPortResponse で返す
|
|
68
|
+
*/
|
|
69
|
+
export declare function portValue<T>(result: AppPortResult<T>): T;
|
|
43
70
|
/** 本文の JSON(空の本文は empty、壊れた JSON は400の応答) */
|
|
44
71
|
export declare function appJson(request: Request, empty?: unknown): Promise<unknown>;
|
|
45
72
|
/** 入力の誤りの応答(zod の問題を CMS の API と同じ issues の形に。problems はアプリの英語の問題の文、キーは問題のコード) */
|
|
46
73
|
export declare function appInvalid(request: Request, error: z.ZodError, problems?: Readonly<Record<string, string>>): Response;
|
|
47
|
-
/**
|
|
74
|
+
/** 呼んだ人がコレクションに行える操作の ID(管理の API の /api/schema の viewer_can。record.list、record.create など、失敗は例外) */
|
|
75
|
+
export declare function appCollectionCan(ctx: Pick<AppContext, 'cms'>, collection: string): Promise<readonly string[]>;
|
|
76
|
+
/** 呼んだ人のアカウント(管理の API の /api/me、can は操作の ID ごとの可否。失敗は例外) */
|
|
48
77
|
export declare function appUser(ctx: Pick<AppContext, 'cms'>): Promise<User>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type Imported = Readonly<{
|
|
2
|
+
src: string;
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
format: string;
|
|
6
|
+
}>;
|
|
7
|
+
type Options = Readonly<{
|
|
8
|
+
src: string | Imported;
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}>;
|
|
13
|
+
declare const service: {
|
|
14
|
+
getURL: ({ src }: Options) => string;
|
|
15
|
+
getHTMLAttributes: (options: Options) => Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
export default service;
|
|
18
|
+
/** 画像の変換の経路(持たない) */
|
|
19
|
+
export declare const GET: () => Response;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** 終わりまで受ける本文の上限(これを超えるものは流したまま) */
|
|
2
|
+
export declare const BUFFERED_MAX: number;
|
|
3
|
+
/** 保存を許す応答か(s-maxage の明示があり、保存を拒む指定と Set-Cookie がない、200の応答) */
|
|
4
|
+
export declare function isStorable(method: string, { status, headers }: Response): boolean;
|
|
5
|
+
/** 長さを宣言した応答 */
|
|
6
|
+
export declare function withLength(method: string, response: Response, max?: number): Promise<Response>;
|