@tunasand/sdk 0.11.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +6 -4
  3. package/dist/analytics.js +113 -50
  4. package/dist/app.js +98 -9
  5. package/dist/{apps-DIxAWBSZ.js → apps-BysPfMuR.js} +102 -12
  6. package/dist/{bridge-Dv4NxGZ7.js → bridge-C2Bl-OAF.js} +1 -2
  7. package/dist/bridge.js +1 -1
  8. package/dist/cli.js +2 -2
  9. package/dist/{collection-nUz1RetA.js → collection-26aglrg6.js} +20 -2
  10. package/dist/delivery.js +1 -1
  11. package/dist/{embeds-B-Dbn64k.js → embeds-DY6O5TrJ.js} +2 -2
  12. package/dist/end-users.js +29 -25
  13. package/dist/{errorLabels-aT2bnMsO.js → errorLabels-BK1NJ6Wz.js} +21 -5
  14. package/dist/i18n.js +2 -2
  15. package/dist/integrations.js +2 -2
  16. package/dist/{ja-CrY_72Tn.js → ja-B3lAaOhZ.js} +13 -11
  17. package/dist/{workflow-CUpl6hO_.js → paymentPort-p1jV44Zz.js} +57 -2
  18. package/dist/{schema-Dcg1ajnW.js → schema-Bs_BUUNv.js} +35 -7
  19. package/dist/schema.js +4 -4
  20. package/dist/types/access/src/handoff.d.ts +1 -1
  21. package/dist/types/access/src/oidc.d.ts +2 -0
  22. package/dist/types/contract/src/api/define.d.ts +165 -0
  23. package/dist/types/contract/src/app.d.ts +22 -7
  24. package/dist/types/contract/src/appChannels.d.ts +65 -27
  25. package/dist/types/contract/src/appDependencies.d.ts +22 -2
  26. package/dist/types/contract/src/appInbound.d.ts +26 -1
  27. package/dist/types/contract/src/appSecrets.d.ts +18 -0
  28. package/dist/types/contract/src/appServer.d.ts +57 -7
  29. package/dist/types/contract/src/apps.d.ts +15 -6
  30. package/dist/types/contract/src/auditActions.d.ts +2 -2
  31. package/dist/types/contract/src/auditLabels.d.ts +10 -1
  32. package/dist/types/contract/src/authorize.d.ts +1 -1
  33. package/dist/types/contract/src/bridge.d.ts +1 -1
  34. package/dist/types/contract/src/consents.d.ts +1 -6
  35. package/dist/types/contract/src/embeds.d.ts +11 -9
  36. package/dist/types/contract/src/endUsers.d.ts +3 -0
  37. package/dist/types/contract/src/errorLabels.d.ts +4 -1
  38. package/dist/types/contract/src/errorLabelsEn.d.ts +4 -1
  39. package/dist/types/contract/src/errors.d.ts +2 -2
  40. package/dist/types/contract/src/eventTraces.d.ts +0 -2
  41. package/dist/types/contract/src/hostingRpc.d.ts +21 -2
  42. package/dist/types/contract/src/import.d.ts +3 -3
  43. package/dist/types/contract/src/index.d.ts +16 -13
  44. package/dist/types/contract/src/issueLabels.d.ts +11 -3
  45. package/dist/types/contract/src/issueLabelsEn.d.ts +4 -0
  46. package/dist/types/contract/src/manage.d.ts +5 -0
  47. package/dist/types/contract/src/notices.d.ts +2 -3
  48. package/dist/types/contract/src/operationEffects.d.ts +39 -0
  49. package/dist/types/contract/src/operatorOperations.d.ts +104 -47
  50. package/dist/types/contract/src/paymentPort.d.ts +129 -0
  51. package/dist/types/contract/src/readPages.d.ts +92 -0
  52. package/dist/types/contract/src/roles.d.ts +2 -2
  53. package/dist/types/contract/src/settingProblems.d.ts +18 -1
  54. package/dist/types/contract/src/workflow.d.ts +5 -2
  55. package/dist/types/contract/src/workspaceItems.d.ts +3 -1
  56. package/dist/types/contract/src/workspacePaths.d.ts +1 -1
  57. package/dist/types/schema/src/collection.d.ts +4 -0
  58. package/dist/types/schema/src/file.d.ts +2 -0
  59. package/dist/types/schema/src/index.d.ts +3 -2
  60. package/dist/types/schema/src/indexes.d.ts +11 -0
  61. package/dist/types/schema/src/labels/en.d.ts +2 -0
  62. package/dist/types/schema/src/labels/ja.d.ts +13 -11
  63. package/dist/types/schema/src/problems.d.ts +13 -11
  64. package/dist/types/sdk/src/app.d.ts +11 -8
  65. package/dist/types/sdk/src/end-users.d.ts +12 -15
  66. package/dist/types/sdk/src/schema.d.ts +1 -1
  67. package/dist/{types-DkO2N7u2.js → types-CYnY-63C.js} +1 -1
  68. package/dist/types.js +1 -1
  69. package/dist/{typesSource-VJIxtN9b.js → typesSource-BTA9-rcB.js} +1 -1
  70. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { a as AGGREGATE_BUCKETS, n as RESERVED_FIELD_KEYS, o as AGGREGATE_OPS, r as fieldDefSchema, s as DECLARED_COLLECTION_KINDS, t as COLLECTION_SLUG_PATTERN } from "./schema-Dcg1ajnW.js";
1
+ import { c as DECLARED_COLLECTION_KINDS, n as RESERVED_FIELD_KEYS, o as AGGREGATE_BUCKETS, r as fieldDefSchema, s as AGGREGATE_OPS, t as COLLECTION_SLUG_PATTERN } from "./schema-Bs_BUUNv.js";
2
2
  import { s as ADDRESS_CHANNELS } from "./endUsers-DODfjnv1.js";
3
3
  import { n as infraIdOfUuid, t as SECRET_TOKEN_PREFIXES } from "./ids-DmtIoqBX.js";
4
4
  import { z } from "zod";
@@ -108,6 +108,12 @@ const dependencySchema = z.strictObject({
108
108
  defaults: z.record(settingKey, settingValue).optional(),
109
109
  expose: list(settingKey).optional()
110
110
  });
111
+ const rowFieldSchema = z.strictObject({
112
+ key: z.string().regex(/^[a-z][a-zA-Z0-9_]{0,63}$/),
113
+ label,
114
+ type: z.enum(["text", "long_text"]),
115
+ required: z.boolean().optional()
116
+ });
111
117
  const settingSchema = z.strictObject({
112
118
  key: settingKey,
113
119
  label,
@@ -118,14 +124,17 @@ const settingSchema = z.strictObject({
118
124
  "select",
119
125
  "collection",
120
126
  "collections",
121
- "channels"
127
+ "channels",
128
+ "accounts",
129
+ "repeater"
122
130
  ]),
123
131
  options: list(z.string().min(1).max(80)).min(1).optional(),
132
+ fields: z.array(rowFieldSchema).min(1).max(20).optional(),
124
133
  default: settingValue.optional(),
125
134
  requires: z.string().min(1).max(64).optional(),
126
135
  min: z.number().optional(),
127
136
  unit: z.string().min(1).max(20).optional()
128
- }).refine((s) => s.type === "select" === (s.options !== void 0), { path: ["options"] }).refine((s) => s.default === void 0 || (s.type === "select" ? s.options?.includes(String(s.default)) : s.type === "collections" || s.type === "channels" ? Array.isArray(s.default) : typeof s.default === (s.type === "text" || s.type === "collection" ? "string" : s.type)), { path: ["default"] });
137
+ }).refine((s) => s.type === "select" === (s.options !== void 0), { path: ["options"] }).refine((s) => s.type === "repeater" === (s.fields !== void 0), { path: ["fields"] }).refine((s) => new Set(s.fields?.map((f) => f.key)).size === (s.fields?.length ?? 0), { path: ["fields"] }).refine((s) => s.default === void 0 || (s.type === "select" ? s.options?.includes(String(s.default)) : s.type === "collections" || s.type === "channels" || s.type === "accounts" ? Array.isArray(s.default) : typeof s.default === (s.type === "text" || s.type === "collection" ? "string" : s.type)), { path: ["default"] });
129
138
  const uniqueSchema = z.strictObject({
130
139
  key: z.string().min(1).max(64),
131
140
  fields: z.array(z.string().min(1)).min(1).max(3),
@@ -200,6 +209,7 @@ const OPERATIONS = [
200
209
  "check_consent",
201
210
  "write_consents",
202
211
  "write_suppression",
212
+ "purchase",
203
213
  "read_self",
204
214
  "create_self",
205
215
  "update_self",
@@ -243,30 +253,109 @@ const PREFIX$1 = "settings:";
243
253
  /** 権限の表での設定の領域の id */
244
254
  const settingsTarget = (area) => `${PREFIX$1}${area}`;
245
255
  Object.fromEntries(ACTIONS.map((a) => [a, "all"]));
246
- /** 管理の領域 admin だけを条件にする操作の ID(/api/me の can でこの操作を見て、管理の領域を扱えるかを決める) */
247
- const ADMIN_AREA_OPERATION = "job.run";
256
+ /** 管理の領域 admin を扱えるかの可否の ID(/api/me の can。操作の宣言の ID と重ならない専用の ID) */
257
+ const ADMIN_AREA_OPERATION = "area.admin";
248
258
  // ../contract/src/manage.ts
249
259
  const PREFIX = "manage:";
250
260
  /** 権限の表での管理の権限の id */
251
261
  const manageTarget = (check) => `${PREFIX}${check}`;
252
262
  manageTarget("request_production");
263
+ // ../contract/src/readPages.ts
264
+ /**
265
+ * 資源の集合ごとの件数の上限(作成で超える分を拒み、一覧は上限内の全件を1ページで返す。上限は1ページの件数の最大以下)
266
+ * - 一覧の宣言の boundedList はこのキーを必須にする。キーのない一覧は索引と keyset で読む(docs/specs/http-api.md の「一覧」)
267
+ * - コードとアプリの宣言から導く一覧は、宣言の数の想定の上限(超えた分は次のページ)
268
+ */
269
+ const COLLECTION_SIZE_LIMITS = {
270
+ /** 保存したビュー(コレクションごとの、個人とチームのビューの合計) */
271
+ views: 50,
272
+ /** プロジェクトのチャネル(動いているチャネルの全部の種類の合計) */
273
+ channels: 50,
274
+ /** プロジェクトのロール */
275
+ roles: 50,
276
+ /** 保留中の招待 */
277
+ invitations: 100,
278
+ /** 運営者のサポートのアクセスの付与(取り消していないもの) */
279
+ supportAccess: 20,
280
+ /** 運営者 */
281
+ operators: 50,
282
+ /** プロジェクトのアプリのインストール(サイトとデプロイを含む) */
283
+ installations: 100,
284
+ /** 登録したアプリ(基盤の全体) */
285
+ apps: 100,
286
+ /** コードのアプリ(標準アプリとその候補) */
287
+ codeApps: 50,
288
+ /** インストールしたアプリの埋め込みの宣言(場所ごと) */
289
+ embeds: 100,
290
+ /** アプリが宣言する秘密値(インストールごと、アプリの宣言の上限と同じ) */
291
+ installationSecrets: 20,
292
+ /** ジョブの宣言 */
293
+ jobs: 50,
294
+ /** ロールの表の対象(コレクションとアプリ) */
295
+ permissionTargets: 100,
296
+ /** 通知の1つの提供元の件数 */
297
+ notices: 100,
298
+ /** Webhook */
299
+ webhooks: 50,
300
+ /** 外部の関数 */
301
+ functions: 50,
302
+ /** 外部の画面 */
303
+ screens: 50,
304
+ /** 読み取りのトークン */
305
+ readTokens: 50,
306
+ /** API キー */
307
+ apiKeys: 50,
308
+ /** 送信のドメイン */
309
+ mailDomains: 10,
310
+ /** MCP の接続(プロジェクトの全アカウントの合計) */
311
+ mcpConnections: 100,
312
+ /** プロジェクトの環境 */
313
+ environments: 20,
314
+ /** 定期の書き出し(対象ごと。daily の30日と monthly の365日の保持の期間で決まる、terraform/main.tf のライフサイクル) */
315
+ backups: 50,
316
+ /** 組織のメンバー(招待中を含む。正は platform で、platform の一覧にページ送りがない) */
317
+ organizationMembers: 100,
318
+ /** 記事の作成の絵のタッチ(標準アプリ writing) */
319
+ artStyles: 50,
320
+ /** エンドユーザーのチャネルのブロック(人ごと。プロジェクトのチャネルと、宛先の email と sms) */
321
+ consentChannels: 60,
322
+ /** 閲覧数の順位の件数(標準アプリ content-views の順位の limit の最大) */
323
+ rankingRecords: 100
324
+ };
325
+ COLLECTION_SIZE_LIMITS.installationSecrets;
253
326
  // ../contract/src/appChannels.ts
254
- /** チャネルの能力(送信、受信) */
255
- const CHANNEL_CAPABILITIES = ["send", "receive"];
327
+ /** チャネルの能力(送信、受信、決済) */
328
+ const CHANNEL_CAPABILITIES = [
329
+ "send",
330
+ "receive",
331
+ "payment"
332
+ ];
256
333
  /** チャネルのアドレスの形(registered_domain: プロジェクトの登録したドメインの上のローカル部) */
257
334
  const CHANNEL_ADDRESS_KINDS = ["registered_domain"];
258
- /** 宣言の上限(種類の数、見出しの字数、種類ごとの設定の数) */
335
+ /** 宣言の上限(種類の数、見出しの字数、種類ごとの設定の数、設定の形の正規表現の字数) */
259
336
  const APP_CHANNEL_KIND_LIMITS = {
260
337
  kindsMax: 10,
261
338
  labelMaxChars: 80,
262
- settingsMax: 30
339
+ settingsMax: 30,
340
+ patternMaxChars: 500
263
341
  };
264
- /** チャネルの値の上限(名前の字数、文字の設定の値の字数、アドレスのローカル部の字数) */
342
+ /** 設定の形の正規表現(宣言の pattern の全体の一致。誤った宣言は null) */
343
+ function channelSettingPattern(pattern) {
344
+ try {
345
+ return new RegExp(`^(?:${pattern})$`, "u");
346
+ } catch {
347
+ return null;
348
+ }
349
+ }
350
+ /** チャネルの値の上限(名前の字数、文字の設定の値の字数、アドレスのローカル部の字数、外部のキーの字数) */
265
351
  const APP_CHANNEL_LIMITS = {
266
352
  nameMaxChars: 80,
267
353
  textSettingMaxChars: 2e3,
268
- localMaxChars: 64
354
+ localMaxChars: 64,
355
+ externalKeyMaxChars: 255
269
356
  };
357
+ /** 外部のアカウントのモード(live は本番のアカウント、sandbox は live 以外の環境が繋ぐサンドボックスのアカウント) */
358
+ const CHANNEL_MODES = ["live", "sandbox"];
270
359
  /** アプリの MCP のツールとプロンプトの名前の接頭辞(名前空間の `.` と `-` を `_` にする。クライアントのツールの名前は英数字、`_`、`-` だけを受ける) */
271
360
  const appToolPrefixOf = (namespace) => `${namespace.replace(/[.-]/g, "_")}_`;
272
361
  /**
@@ -298,6 +387,7 @@ const APP_MANIFEST_KEYS = [
298
387
  "destinations",
299
388
  "outbound",
300
389
  "secrets",
390
+ "operator_secrets",
301
391
  "channel_kinds",
302
392
  "events",
303
393
  "mail",
@@ -315,4 +405,4 @@ const APP_MANIFEST_KEYS = [
315
405
  "price"
316
406
  ];
317
407
  new Set(APP_MANIFEST_KEYS);
318
- export { APP_CHANNEL_LIMITS as a, ADMIN_AREA_OPERATION as c, BUNDLED_APP_IDS as d, MESSAGE_LIMITS as f, MESSAGE_SKIP_REASONS as h, APP_CHANNEL_KIND_LIMITS as i, ACTOR_KINDS as l, MESSAGE_RECEIVED as m, APP_MANIFEST_KEYS as n, CHANNEL_ADDRESS_KINDS as o, MESSAGE_PORT as p, appToolPrefixOf as r, CHANNEL_CAPABILITIES as s, APP_KEY_USES as t, INSTALLATION_TOKEN as u };
408
+ export { MESSAGE_RECEIVED as _, APP_CHANNEL_LIMITS as a, CHANNEL_MODES as c, ADMIN_AREA_OPERATION as d, ACTOR_KINDS as f, MESSAGE_PORT as g, MESSAGE_LIMITS as h, APP_CHANNEL_KIND_LIMITS as i, channelSettingPattern as l, BUNDLED_APP_IDS as m, APP_MANIFEST_KEYS as n, CHANNEL_ADDRESS_KINDS as o, INSTALLATION_TOKEN as p, appToolPrefixOf as r, CHANNEL_CAPABILITIES as s, APP_KEY_USES as t, COLLECTION_SIZE_LIMITS as u, MESSAGE_SKIP_REASONS as v };
@@ -1,4 +1,4 @@
1
- import { n as EMBED_UI_SLOTS } from "./embeds-B-Dbn64k.js";
1
+ import { n as EMBED_UI_SLOTS } from "./embeds-DY6O5TrJ.js";
2
2
  // ../contract/src/bridge.ts
3
3
  /** メッセージの名前の頭(外に見える識別子、改名はここだけ) */
4
4
  const BRIDGE_NAMESPACE = "tunasand.bridge";
@@ -47,7 +47,6 @@ function sessionTokenClaimsOf(claims, { clientId, issuer }, nowSec) {
47
47
  const BRIDGE_API_METHODS = [
48
48
  "GET",
49
49
  "POST",
50
- "PUT",
51
50
  "PATCH",
52
51
  "DELETE"
53
52
  ];
package/dist/bridge.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as BRIDGE_THEME_VAR_PREFIX, c as isBridgeMessage, i as BRIDGE_THEME_TOKENS, n as BRIDGE_ERRORS, o as BRIDGE_VERSION, r as BRIDGE_NAMESPACE, t as BRIDGE_API_METHODS } from "./bridge-Dv4NxGZ7.js";
1
+ import { a as BRIDGE_THEME_VAR_PREFIX, c as isBridgeMessage, i as BRIDGE_THEME_TOKENS, n as BRIDGE_ERRORS, o as BRIDGE_VERSION, r as BRIDGE_NAMESPACE, t as BRIDGE_API_METHODS } from "./bridge-C2Bl-OAF.js";
2
2
  // src/bridge.ts
3
3
  /** 依頼の失敗(code は理由) */
4
4
  var BridgeRequestError = class extends Error {
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { r as runTypesCli } from "./types-DkO2N7u2.js";
3
- import { t as APP_KEY_USES } from "./apps-DIxAWBSZ.js";
2
+ import { r as runTypesCli } from "./types-CYnY-63C.js";
3
+ import { t as APP_KEY_USES } from "./apps-BysPfMuR.js";
4
4
  import { i as newUuidV7, o as secretTokenKindOf, t as SECRET_TOKEN_PREFIXES } from "./ids-DmtIoqBX.js";
5
5
  import { t as STATIC_FILE_OPERATION } from "./astro-server-Bwau8F6d.js";
6
6
  import { r as operationFixtures, t as fixtureOperations } from "./dev-operations-Tutwi1On.js";
@@ -1,4 +1,4 @@
1
- import { t as PRODUCT_FIELD_LABELS } from "./ja-CrY_72Tn.js";
1
+ import { t as PRODUCT_FIELD_LABELS } from "./ja-B3lAaOhZ.js";
2
2
  // ../schema/src/filesCollection.ts
3
3
  /** files のコレクションの id(`uuidV5Of('collection:files')`、contract の ids.test.ts で照合) */
4
4
  const FILES_COLLECTION_ID = "380c5450-9f5e-5b10-8273-c3e1d86aa266";
@@ -161,6 +161,24 @@ function audienceOf(f, collection) {
161
161
  const innerAudienceOf = (f, outer) => narrower(selfAudienceOf(f) ?? outer, outer);
162
162
  /** 個人の情報を持つコレクションか(エンドユーザーへの参照のフィールドを持つコレクション、送信者が end_user のフォームもこの形): 足す項目に見える範囲の明示を求め、既定は狭い側 */
163
163
  const isPiiCollection = (collection) => collection.fields.some((f) => f.type === END_USER_FIELD_TYPE);
164
+ /**
165
+ * 項目の個人の情報の分類(宣言 pii、なければ外の値 outer、なければ項目の種類の既定)
166
+ * - 組織の項目は既定で PII として扱う(決定)
167
+ * - 既定: text・url は identifier、email・phone は contact
168
+ * - 既定の freetext(値を空にする): ほかの値(long_text、本文、日付、数値、選択、チェック、ファイル)
169
+ * - 既定の none: 値でない項目(人と参照はレコードの結び付き、まとまりは中の項目ごと、連番はシステムが振る番号)。それ以外の none は宣言だけで付く
170
+ */
171
+ function fieldPiiOf(_type, f, outer) {
172
+ if (f.pii) return f.pii;
173
+ if (outer) return outer;
174
+ return defaultPiiOf(f);
175
+ }
176
+ /** 項目の種類の既定の分類(宣言と外の値を見ない) */
177
+ function defaultPiiOf(f) {
178
+ if (f.type === "end_user" || f.type === "reference" || f.type === "object" || isSequenceField(f) || f.managed) return "none";
179
+ if (f.type === "email" || f.type === "phone") return "contact";
180
+ return f.type === "text" || f.type === "url" ? "identifier" : "freetext";
181
+ }
164
182
  /** 足す項目の既定の見える範囲(非公開のコレクションは宣言なしの読み、個人の情報を持つコレクションは none、ほかは public。ワークスペースの既定と保存の規則が共有) */
165
183
  function addedFieldAudienceOf(collection) {
166
184
  if (collection.private) return isSurveyShape(collection) ? "self" : "none";
@@ -261,4 +279,4 @@ function roleFieldOf(collection, role) {
261
279
  const guess = ROLE_GUESSES[role];
262
280
  return guess ? collection.fields.find(guess) ?? null : null;
263
281
  }
264
- export { isUuidShape as A, isListCollection as C, isSingleton as D, isSequenceField as E, FILES_COLLECTION as F, FILES_COLLECTION_ID as I, isFilesCollection as L, optionLabelOf as M, optionsOf as N, isStoredCollection as O, roleFieldOf as P, isInputField as S, isPublishable as T, entitledKeysOf as _, PII_CLASSES as a, innerAudienceOf as b, STATUS_CATEGORIES as c, cascadeDepths as d, cascadeTargetsOf as f, endUserFieldsOf as g, declaredAudienceOf as h, ON_DELETE as i, narrower as j, isSurveyShape as k, acceptsRole as l, collectionOf as m, END_USER_FIELD_TYPE as n, SELF_OPS as o, collectionByRef as p, FIELD_ROLES as r, SLUG_MODES as s, AUDIENCES as t, audienceOf as u, hasPublication as v, isPrivateCollection as w, isDeliveredAudience as x, initialValueOf as y };
282
+ export { isSurveyShape as A, isInputField as C, isSequenceField as D, isPublishable as E, roleFieldOf as F, FILES_COLLECTION as I, FILES_COLLECTION_ID as L, narrower as M, optionLabelOf as N, isSingleton as O, optionsOf as P, isFilesCollection as R, isDeliveredAudience as S, isPrivateCollection as T, entitledKeysOf as _, PII_CLASSES as a, initialValueOf as b, STATUS_CATEGORIES as c, cascadeDepths as d, cascadeTargetsOf as f, endUserFieldsOf as g, declaredAudienceOf as h, ON_DELETE as i, isUuidShape as j, isStoredCollection as k, acceptsRole as l, collectionOf as m, END_USER_FIELD_TYPE as n, SELF_OPS as o, collectionByRef as p, FIELD_ROLES as r, SLUG_MODES as s, AUDIENCES as t, audienceOf as u, fieldPiiOf as v, isListCollection as w, innerAudienceOf as x, hasPublication as y };
package/dist/delivery.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as listParams, i as subPath, n as createDeliveryClient, o as PERSPECTIVE_QUERY, r as recordsPath, s as DELIVERY_MARK_HEADERS, t as DeliveryError } from "./client-C8STAw9T.js";
2
2
  import { a as parseInfraId, r as isUuid, t as SECRET_TOKEN_PREFIXES } from "./ids-DmtIoqBX.js";
3
3
  import { a as cropRect, l as createClock, o as croppedHotspot, t as pagePathOf } from "./page-yo1cw1kW.js";
4
- import { N as optionsOf, p as collectionByRef } from "./collection-nUz1RetA.js";
4
+ import { P as optionsOf, p as collectionByRef } from "./collection-26aglrg6.js";
5
5
  // src/delivery/cache.ts
6
6
  /** 公開中以外の版のクエリか */
7
7
  const asksUnpublished = (params) => params.has(PERSPECTIVE_QUERY.perspective) && params.get(PERSPECTIVE_QUERY.perspective) !== "published" || params.has(PERSPECTIVE_QUERY.revision) || params.has(PERSPECTIVE_QUERY.at);
@@ -1,4 +1,4 @@
1
- import "./apps-DIxAWBSZ.js";
1
+ import "./apps-BysPfMuR.js";
2
2
  // ../contract/src/embeds.ts
3
3
  /** 外の画面を表示する位置(置き場所の意味はこのファイルの先頭) */
4
4
  const EMBED_PLACEMENTS = [
@@ -24,6 +24,6 @@ const TOKEN_EXCHANGE = {
24
24
  subjectTokenType: "urn:ietf:params:oauth:token-type:jwt",
25
25
  issuedTokenType: "urn:ietf:params:oauth:token-type:access_token",
26
26
  clientAssertionType: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
27
- path: "/api/embeds/token"
27
+ path: "/v1/embeds/token"
28
28
  };
29
29
  export { EMBED_UI_SLOTS as n, TOKEN_EXCHANGE as r, EMBED_PLACEMENTS as t };
package/dist/end-users.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as END_USER_STATUSES, i as END_USER_EVENTS, n as END_USERS_LIMITS, o as SELF_API_ERRORS, r as END_USER_API_ERRORS } from "./endUsers-DODfjnv1.js";
2
2
  import { t as DeliveryError } from "./client-C8STAw9T.js";
3
- import { _ as entitledKeysOf } from "./collection-nUz1RetA.js";
3
+ import { _ as entitledKeysOf } from "./collection-26aglrg6.js";
4
4
  // src/end-users.ts
5
5
  /** エラーの応答の本文を読む(JSON でなければ空) */
6
6
  const failureOf = (text) => {
@@ -19,7 +19,7 @@ const detailOf = (f) => ({
19
19
  const isEndUserApiError = (code) => END_USER_API_ERRORS.includes(code);
20
20
  /** エンドユーザーの API の呼び出し(delivery は配信 API への接続、外のサイトは鍵を付けた fetch) */
21
21
  function createEndUsersClient(delivery) {
22
- const post = async (path, body) => {
22
+ const post = async (path, body, valueOf = (json) => json) => {
23
23
  const res = await delivery(path, {
24
24
  method: "POST",
25
25
  headers: { "content-type": "application/json" },
@@ -27,7 +27,7 @@ function createEndUsersClient(delivery) {
27
27
  });
28
28
  if (res.ok) return {
29
29
  ok: true,
30
- value: await res.json()
30
+ value: valueOf(await res.json(), res.status)
31
31
  };
32
32
  const text = await res.text();
33
33
  const failure = failureOf(text);
@@ -49,23 +49,31 @@ function createEndUsersClient(delivery) {
49
49
  invite_code: inviteCode
50
50
  }),
51
51
  /** 登録した発行者の外部 ID のエンドユーザー(紐付けがなければ作る。登録していない発行者は not_found) */
52
- ensure: (identity) => post("/end-users:ensure", identity),
52
+ ensure: (identity) => post("/end-users:ensure", identity, (json, status) => ({
53
+ end_user: json,
54
+ created: status === 201
55
+ })),
53
56
  /** ID トークンの人がフォーム(コレクション、設問の版 version)に回答済みか */
54
57
  checkSubmission: (collection, idToken, version = "") => post(`/forms/${encodeURIComponent(collection)}/submissions:check${version ? `?version=${encodeURIComponent(version)}` : ""}`, { id_token: idToken })
55
58
  };
56
59
  }
57
60
  const isSelfApiError = (code) => SELF_API_ERRORS.includes(code);
61
+ /** 本人のレコードの経路で、サイトが確かめた本人の ID を渡すヘッダー */
62
+ const END_USER_HEADER = "tunasand-end-user";
58
63
  /**
59
64
  * 本人のレコードのエンドポイントの呼び出し(#712、<基点>/end-users/me/<コレクション>)
60
- * - delivery はインストールのトークンを付けた接続(配信 API の鍵では呼べない)。endUserId はサイトが自分で確認した本人
65
+ * - delivery はインストールのトークンを付けた接続(配信 API の鍵では呼べない)。endUserId はサイトが自分で確認した本人で、ヘッダーで送る
61
66
  * - query は配信 API の一覧の文法(filter[key]・order・ids・limit・cursor)で、絞れるのは本人が見られる項目だけ
62
67
  */
63
68
  function createSelfClient(delivery) {
64
- const post = async (path, body) => {
69
+ const call = async (method, path, endUserId, body) => {
65
70
  const res = await delivery(`/end-users/me${path}`, {
66
- method: "POST",
67
- headers: { "content-type": "application/json" },
68
- body: JSON.stringify(body)
71
+ method,
72
+ headers: {
73
+ [END_USER_HEADER]: endUserId,
74
+ ...body !== void 0 && { "content-type": "application/json" }
75
+ },
76
+ ...body !== void 0 && { body: JSON.stringify(body) }
69
77
  });
70
78
  if (res.ok) return {
71
79
  ok: true,
@@ -84,23 +92,19 @@ function createSelfClient(delivery) {
84
92
  const at = (collection, id) => `/${encodeURIComponent(collection)}${id === void 0 ? "" : `/${encodeURIComponent(id)}`}`;
85
93
  return {
86
94
  /** 本人のレコードの一覧(コレクション type、本人 endUserId) */
87
- list: (collection, endUserId, query = {}) => post(`${at(collection)}:query`, {
88
- end_user_id: endUserId,
89
- query
90
- }),
91
- /** 作成(同じ組のレコードがあれば作らずに created: false でそのレコードの id) */
92
- create: (collection, endUserId, values) => post(at(collection), {
93
- end_user_id: endUserId,
94
- values
95
- }),
96
- /** 更新(version は一覧の _meta.version、古ければ version_conflict) */
97
- update: (collection, id, endUserId, version, values) => post(`${at(collection, id)}:update`, {
98
- end_user_id: endUserId,
99
- version,
100
- values
95
+ list: (collection, endUserId, query = {}) => call("GET", `${at(collection)}${Object.keys(query).length ? `?${new URLSearchParams(query)}` : ""}`, endUserId),
96
+ /** 作成(作ったレコード。同じ組のレコードがあれば作らずにそのレコード) */
97
+ create: (collection, endUserId, values) => call("POST", at(collection), endUserId, values),
98
+ /**
99
+ * 更新(values を JSON Merge Patch で重ね、null は値を空に。更新後のレコード)
100
+ * - version: 一覧の _meta.version。古ければ version_conflict
101
+ */
102
+ update: (collection, id, endUserId, version, values) => call("PATCH", at(collection, id), endUserId, {
103
+ ...values,
104
+ version
101
105
  }),
102
- /** 削除(ゴミ箱へ) */
103
- delete: (collection, id, endUserId) => post(`${at(collection, id)}:delete`, { end_user_id: endUserId })
106
+ /** 削除(ゴミ箱へ。_meta.deleted_at つきのレコード) */
107
+ delete: (collection, id, endUserId) => call("DELETE", at(collection, id), endUserId)
104
108
  };
105
109
  }
106
110
  /** 権利の時期 */
@@ -1,5 +1,5 @@
1
1
  import { c as formatMessage, f as problemText, p as problemTextFactory, r as RICH_TEXT_PROBLEM_MESSAGES, u as problemMessage } from "./ja-axQPxMJ-.js";
2
- import { n as SCHEMA_PROBLEM_MESSAGES } from "./ja-CrY_72Tn.js";
2
+ import { n as SCHEMA_PROBLEM_MESSAGES } from "./ja-B3lAaOhZ.js";
3
3
  // ../schema/src/labels/en.ts
4
4
  /** コンテンツスキーマの検査の問題の英語の文 */
5
5
  const SCHEMA_PROBLEM_MESSAGES_EN = {
@@ -71,6 +71,8 @@ const SCHEMA_PROBLEM_MESSAGES_EN = {
71
71
  kind_field_missing: "Collection {collection}: field {field} in {declaration} does not exist",
72
72
  kind_time_invalid: "Collection {collection}: time field {field} must be a date or datetime field",
73
73
  kind_subject_invalid: "Collection {collection}: subject field {field} must be an end user field",
74
+ 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)",
75
+ indexes_too_many: "Collection {collection}: up to {max} indexes",
74
76
  aggregate_dimensions_too_many: "Collection {collection}: aggregates can have up to {max} dimensions",
75
77
  aggregate_dimension_person: "Collection {collection}: field {field} points to a person and cannot be an aggregate dimension",
76
78
  aggregate_bucket_pair: "Collection {collection}: declare both time and bucket for an aggregate, or neither",
@@ -338,6 +340,8 @@ const ERROR_MESSAGES_EN = {
338
340
  end_user: "end user",
339
341
  end_user_identity: "end user identity",
340
342
  entitlement: "end user entitlement",
343
+ offer: "offer",
344
+ price: "price",
341
345
  app: "app",
342
346
  installation: "installation",
343
347
  invitation: "invitation",
@@ -399,7 +403,7 @@ const ERROR_MESSAGES_EN = {
399
403
  still_published: "Unpublish published records before deleting them.",
400
404
  last_admin: "The last administrator cannot be removed or demoted from the administrator role.",
401
405
  exceeds_own: "You cannot grant permissions wider than your own role.",
402
- reauth_required: "Log in again before approving.",
406
+ reauth_required: "Log in again before this operation.",
403
407
  approval_required: "This change reaches production, so it needs a request and approval.",
404
408
  stale: "The content changed after the request. Request again.",
405
409
  approval_closed: "This request can no longer be approved (applied, rejected, withdrawn or expired).",
@@ -460,6 +464,7 @@ const ERROR_MESSAGES_EN = {
460
464
  no_changes: "There are no differences from live.",
461
465
  schema_values: "Cannot apply because the changes remove fields with values. Move the values in live and try again.",
462
466
  environment_limit: "The number of environments has reached the plan limit.",
467
+ collection_size_limit: "The number of items has reached the limit.",
463
468
  environment_busy: "This environment is in the middle of another operation. Wait a moment and try again.",
464
469
  unregistered_table: "Cannot copy because some tables have no decided handling of personal information.",
465
470
  not_frozen: "Writes to live are not stopped.",
@@ -773,7 +778,7 @@ const APPS = {
773
778
  app_namespace: "名前空間は英小文字で始まる英小文字と数字の3〜32文字です",
774
779
  app_namespace_taken: "この名前空間はすでに使われています(再利用できません)",
775
780
  app_no_organization: "コンソールで管理していないプロジェクトでは、アプリを登録できません。必要なときは、管理者が運営に相談してください。",
776
- app_collections: "既存のコレクションに当てるコレクションの当て先と、当てるフィールドを選んでください(フィールドは同じ型。当てないフィールドはインストールが足すので、同じキーのフィールドがあれば当ててください)",
781
+ app_collections: "既存のコレクションを使うときは、使うコレクションと対応するフィールドを選択してください(フィールドは同じ型。対応させないフィールドはインストールが追加するので、同じキーのフィールドがあれば対応させてください)",
777
782
  app_slugs: "アプリのコレクションのスラッグがほかのコレクションと重なるか使えない形です。スラッグを指定してください",
778
783
  app_not_installable: "このアプリはインストールできません(自分の組織のアプリと確認済みのアプリだけ)。アプリの一覧から選び直してください。",
779
784
  app_no_registration: "このプロジェクトでは、アプリを追加できません。必要なときは、管理者が運営に相談してください。",
@@ -789,6 +794,7 @@ const APPS = {
789
794
  channel_capabilities: "チャネルの能力は、種類の宣言の能力から1つ以上を選んでください",
790
795
  channel_address: "アドレスは英小文字、数字、「.」「_」「-」のローカル部と、このプロジェクトで検証済みのドメインにしてください(アドレスを持つ種類だけ)",
791
796
  channel_setting: "{key} はこの種類の設定にないか、値の形が合いません",
797
+ channel_kind: "チャネルの種類は、インストールしたアプリが宣言した種類にしてください(同じ種類を宣言したアプリが複数あれば installationId でアプリを選びます)",
792
798
  app_key_duplicate_key: "同じ鍵が複数あります(交換の鍵とアップロードの鍵には別の鍵を使ってください)",
793
799
  deploy_artifact: "成果物の形が正しくありません",
794
800
  deploy_artifact_required: "成果物(artifact)を送ってください",
@@ -812,6 +818,8 @@ const END_USERS = {
812
818
  end_user_invalid_date: "日付は YYYY-MM-DD の実在する日",
813
819
  end_user_no_target_collection: "権利の対象のコレクションがない(コレクションの「要る権利」の参照の項目が指すコレクション)",
814
820
  end_user_no_target: "権利の対象のレコードがない",
821
+ payment_reflection_mismatch: "決済の反映の値が、反映済みの購入か購読、または価格の種類と合わない",
822
+ payment_url_host: "戻り先の URL は、プロジェクトのサイトのホストにしてください",
815
823
  end_user_ends_before_start: "終了日が開始日より前",
816
824
  end_user_ends_required: "終了日の指定が要る(対象のコレクションに期間(月)の設定がないか、対象のレコードの値が空)",
817
825
  end_user_months_invalid: "対象のレコードの期間(月)が1から1200の整数でない(直すか終了日を指定する)",
@@ -887,7 +895,8 @@ const SETTING_VALUES = {
887
895
  setting_choice: "「{field}」は次から選んでください: {choices}",
888
896
  setting_duplicate: "「{field}」の「{value}」が重なっています。",
889
897
  setting_required: "「{field}」を1つ以上指定してください。",
890
- setting_shape: "「{field}」の形が正しくありません。"
898
+ setting_shape: "「{field}」の形が正しくありません。",
899
+ setting_row_text: "「{field}」の{row, number}行目の「{sub}」を入力してください。"
891
900
  };
892
901
  /** コンテンツとエンドユーザーの取り込み(problem は値の問題、ids は ID の並び) */
893
902
  const TRANSFER = {
@@ -1061,6 +1070,7 @@ const API_ISSUE_MESSAGES_EN = {
1061
1070
  channel_capabilities: "Choose one or more channel capabilities from the kind declaration",
1062
1071
  channel_address: "Use a local part of lowercase letters, digits, \".\", \"_\" and \"-\" on a domain verified in this project (only for kinds with addresses)",
1063
1072
  channel_setting: "{key} is not a setting of this kind or has an invalid value",
1073
+ channel_kind: "Use a channel kind declared by an installed app (choose the app with installationId when several apps declare the kind)",
1064
1074
  app_slugs: "A collection slug of the app is taken or invalid. Specify the slugs",
1065
1075
  app_not_installable: "This app cannot be installed (only apps of your own organization and reviewed apps)",
1066
1076
  app_no_registration: "Apps cannot be added to this project",
@@ -1093,6 +1103,8 @@ const API_ISSUE_MESSAGES_EN = {
1093
1103
  end_user_invalid_date: "The date must be a real day in YYYY-MM-DD",
1094
1104
  end_user_no_target_collection: "The entitlement target collection does not exist (the collection referenced by a collection’s required entitlement field)",
1095
1105
  end_user_no_target: "The entitlement target record does not exist",
1106
+ payment_reflection_mismatch: "The payment reflection does not match the reflected purchase or subscription, or the price kind",
1107
+ payment_url_host: "The return URL must be on a host of the project site",
1096
1108
  end_user_ends_before_start: "The end date is before the start date",
1097
1109
  end_user_ends_required: "An end date is required (the target collection has no period in months, or the target record has no value)",
1098
1110
  end_user_months_invalid: "The target record’s period in months is not an integer from 1 to 1200 (fix it or specify an end date)",
@@ -1157,6 +1169,7 @@ const API_ISSUE_MESSAGES_EN = {
1157
1169
  setting_duplicate: "\"{value}\" in \"{field}\" is duplicated.",
1158
1170
  setting_required: "Specify at least one \"{field}\".",
1159
1171
  setting_shape: "\"{field}\" is malformed.",
1172
+ setting_row_text: "Enter \"{sub}\" in row {row, number} of \"{field}\".",
1160
1173
  unmapped_rows: "Collection {collection} has records with the same IDs imported before the import map ({ids}{more, plural, =0 {} other { and # more}}), so they cannot be imported (projects imported before the map are not reimported)",
1161
1174
  screens_shape: "The screen settings are malformed",
1162
1175
  reimport_unknown: "This environment has no import map for source {source}, so it is not reimported (reimport only into environments moved from the same source)",
@@ -1355,6 +1368,8 @@ const ERROR_MESSAGES = {
1355
1368
  end_user: "エンドユーザー",
1356
1369
  end_user_identity: "エンドユーザーの結び付け",
1357
1370
  entitlement: "エンドユーザーの権利",
1371
+ offer: "オファー",
1372
+ price: "価格",
1358
1373
  app: "アプリ",
1359
1374
  installation: "インストール",
1360
1375
  invitation: "招待",
@@ -1417,7 +1432,7 @@ const ERROR_MESSAGES = {
1417
1432
  still_published: "公開中のレコードは、非公開にしてから削除してください。",
1418
1433
  last_admin: "最後の管理者は、外すことも管理者のロールから降ろすこともできません。先にほかの人を管理者にしてください。",
1419
1434
  exceeds_own: "自分のロールより広い権限は付けられません。広い権限が要るときは、管理者に依頼してください。",
1420
- reauth_required: "承認の前に、もう一度ログインしてください。",
1435
+ reauth_required: "この操作の前に、もう一度ログインしてください。",
1421
1436
  approval_required: "本番に届く変更のため、申請と承認が必要です。申請を出し、組織の管理者の承認を待ってください。",
1422
1437
  stale: "申請の後に内容が変わりました。もう一度申請してください。",
1423
1438
  approval_closed: "この申請はもう承認できません(反映済み、却下、取り下げ、期限切れのいずれか)。必要なときは、もう一度申請してください。",
@@ -1479,6 +1494,7 @@ const ERROR_MESSAGES = {
1479
1494
  no_changes: "本番との差がありません。",
1480
1495
  schema_values: "値のある項目を消す変更を含むため、反映できません。本番で値を移してからやり直してください。",
1481
1496
  environment_limit: "環境の数がプランの上限に達しています。不要な環境を削除してから作成してください。",
1497
+ collection_size_limit: "件数が上限に達しています。不要なものを削除してから作成してください。",
1482
1498
  environment_busy: "この環境はほかの操作の途中です。少し待ってからやり直してください。",
1483
1499
  unregistered_table: "個人の情報の扱いが決まっていない表があるため、コピーできません。運営者に連絡してください。",
1484
1500
  not_frozen: "本番の書き込みは止まっていません。",
package/dist/i18n.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { a as LOCALES, c as formatMessage, d as problemOf, f as problemText, i as BASE_LOCALE, o as chooseLocale, p as problemTextFactory, r as RICH_TEXT_PROBLEM_MESSAGES, s as createTranslator, u as problemMessage } from "./ja-axQPxMJ-.js";
2
- import { b as SCHEMA_PROBLEM_MESSAGES_EN, c as PROBLEM_MESSAGES_EN, d as labelTableProblems, f as problemEnglish, h as API_ISSUE_MESSAGES, i as errorTitle, l as importProblemLabel, m as API_ISSUE_MESSAGES_EN, n as errorMessageOf, p as problemLabel, s as PROBLEM_MESSAGES, t as ERROR_MESSAGES, u as issueLabel, v as ERROR_MESSAGES_EN, y as RICH_TEXT_PROBLEM_MESSAGES_EN } from "./errorLabels-aT2bnMsO.js";
3
- import { n as SCHEMA_PROBLEM_MESSAGES } from "./ja-CrY_72Tn.js";
2
+ import { b as SCHEMA_PROBLEM_MESSAGES_EN, c as PROBLEM_MESSAGES_EN, d as labelTableProblems, f as problemEnglish, h as API_ISSUE_MESSAGES, i as errorTitle, l as importProblemLabel, m as API_ISSUE_MESSAGES_EN, n as errorMessageOf, p as problemLabel, s as PROBLEM_MESSAGES, t as ERROR_MESSAGES, u as issueLabel, v as ERROR_MESSAGES_EN, y as RICH_TEXT_PROBLEM_MESSAGES_EN } from "./errorLabels-BK1NJ6Wz.js";
3
+ import { n as SCHEMA_PROBLEM_MESSAGES } from "./ja-B3lAaOhZ.js";
4
4
  export { API_ISSUE_MESSAGES, API_ISSUE_MESSAGES_EN, BASE_LOCALE, ERROR_MESSAGES, ERROR_MESSAGES_EN, LOCALES, PROBLEM_MESSAGES, PROBLEM_MESSAGES_EN, RICH_TEXT_PROBLEM_MESSAGES, RICH_TEXT_PROBLEM_MESSAGES_EN, SCHEMA_PROBLEM_MESSAGES, SCHEMA_PROBLEM_MESSAGES_EN, chooseLocale, createTranslator, errorMessageOf, errorTitle, formatMessage, importProblemLabel, issueLabel, labelTableProblems, problemEnglish, problemLabel, problemMessage, problemOf, problemText, problemTextFactory };
@@ -1,6 +1,6 @@
1
- import { l as sessionTokenClaimsOf, s as SESSION_TOKEN } from "./bridge-Dv4NxGZ7.js";
1
+ import { l as sessionTokenClaimsOf, s as SESSION_TOKEN } from "./bridge-C2Bl-OAF.js";
2
2
  import { t as SECRET_TOKEN_PREFIXES } from "./ids-DmtIoqBX.js";
3
- import { t as EMBED_PLACEMENTS } from "./embeds-B-Dbn64k.js";
3
+ import { t as EMBED_PLACEMENTS } from "./embeds-DY6O5TrJ.js";
4
4
  new TextEncoder();
5
5
  // ../access/src/jws.ts
6
6
  const enc = new TextEncoder();
@@ -33,7 +33,7 @@ const DEFINITION = {
33
33
  role_field_mismatch: "コレクション {collection} の役割 {role}: フィールド {field}({type})は役割に合わない",
34
34
  audience_nested_wider: "コレクション {collection} のフィールド {field}: まとまりの中の見える範囲は外側と同じかスタッフ",
35
35
  audience_end_user_field: "コレクション {collection} のフィールド {field}: エンドユーザーへの参照のフィールドの見える範囲は本人かスタッフ",
36
- audience_self_without_marker: "コレクション {collection} の見える範囲が本人のフィールドには、本人の印 self を付けたエンドユーザーへの参照のフィールドが要る",
36
+ audience_self_without_marker: "コレクション {collection} の見える範囲が本人のフィールドには、本人のフラグ self を付けたエンドユーザーへの参照のフィールドが要る",
37
37
  entitlement_not_reference: "コレクション {collection} の必要な権利 {entitlement}: 最上位の公開かアクセス権の参照のフィールドでない",
38
38
  audience_wider_than_source: "コレクション {collection} のフィールド {field}: {source, select, computed {計算} derive {決まる値} other {条件}}の元 {from} より広い見える範囲にできない(元の値が漏れる)",
39
39
  template_id_placeholder: "コレクション {collection} の雛形 {template}: '{id}' は使えない('{slug}' にする)",
@@ -69,6 +69,8 @@ const DEFINITION = {
69
69
  kind_field_missing: "コレクション {collection}: {declaration} のフィールド {field} がない",
70
70
  kind_time_invalid: "コレクション {collection}: 時刻のフィールド {field} は日付か日時のフィールドにする",
71
71
  kind_subject_invalid: "コレクション {collection}: 本人を指すフィールド {field} はエンドユーザーへの参照のフィールドにする",
72
+ index_field_invalid: "コレクション {collection}: フィールド {field} には索引を宣言できない(テキスト、選択、ステータス、チェックボックス、数値、日付、日時の単数の値で、要配慮個人情報でないものだけ)",
73
+ indexes_too_many: "コレクション {collection}: 索引は {max} 個まで",
72
74
  aggregate_dimensions_too_many: "コレクション {collection}: 集計の次元は {max} 個まで",
73
75
  aggregate_dimension_person: "コレクション {collection}: 本人を指すフィールド {field} を集計の次元にできない",
74
76
  aggregate_bucket_pair: "コレクション {collection}: 集計の時刻のフィールド time と時間の区切り bucket は両方を宣言するか、どちらも宣言しない",
@@ -106,19 +108,19 @@ const DEFINITION = {
106
108
  form_handled_done: "コレクション {collection} の対応の状態 {field}: 対応済みの値は選択肢の値で、初期値を含めない",
107
109
  form_handled_at_missing: "コレクション {collection} の対応の状態 {field}: 対応日時のフィールド(managed が form_handled_at)が要る",
108
110
  form_handled_writable: "コレクション {collection} の対応の状態 {field}: 送信者が書けるフィールドにしない",
109
- form_managed_nested: "コレクション {collection} のフィールド {field}: 印 managed はまとまりの中に付けない",
110
- form_managed_shape: "コレクション {collection} のフィールド {field}: 印 {managed} は種類 {type} の、必須でも条件つきでもない1つの値のフィールドだけ",
111
- form_managed_undeclared: "コレクション {collection} のフィールド {field}: 印 {managed} に対応するフォームの宣言がない",
112
- form_managed_duplicate: "コレクション {collection} のフィールド {field}: 印 {managed} は1つだけ",
111
+ form_managed_nested: "コレクション {collection} のフィールド {field}: フラグ managed はまとまりの中に付けない",
112
+ form_managed_shape: "コレクション {collection} のフィールド {field}: フラグ {managed} は種類 {type} の、必須でも条件つきでもない1つの値のフィールドだけ",
113
+ form_managed_undeclared: "コレクション {collection} のフィールド {field}: フラグ {managed} に対応するフォームの宣言がない",
114
+ form_managed_duplicate: "コレクション {collection} のフィールド {field}: フラグ {managed} は1つだけ",
113
115
  self_ops_private_only: "コレクション {collection} の人の操作 self_ops は非公開のコレクションだけ(人が書いた値と本人の値を配信に出さない)",
114
116
  self_ops_list_only: "コレクション {collection} の人の操作 self_ops は一覧のコレクションだけ(オブジェクト形式のコレクションはレコードが1つ)",
115
117
  self_ops_unpublished: "コレクション {collection} の人の操作 self_ops のコレクションは公開の管理と公開のフィールド published を持たない(本人のレコードは公開の状態によらず本人に見せる)",
116
118
  self_ops_one_self: "コレクション {collection} の人の操作 self_ops は本人のエンドユーザーへの参照のフィールドがちょうど1つのコレクションだけ",
117
119
  self_ops_on_delete: "コレクション {collection} の人の操作 self_ops のコレクションの本人のエンドユーザーへの参照のフィールド {field} は on_delete を cascade か anonymize にする(人の削除で本人のレコードを残さない)",
118
120
  self_ops_unique: "コレクション {collection} の人の操作 self_ops のコレクションの一意の組 {key} は本人のエンドユーザーへの参照のフィールド {field} を含む(ほかの人の値とぶつけない)",
119
- self_writable_nested: "コレクション {collection} のフィールド {field}: 本人が書ける印 self_writable はまとまりの中に付けない",
120
- self_writable_blocked: "コレクション {collection} のフィールド {field}: {block, select, end_user {エンドユーザーへの参照のフィールド} object {まとまり} file {ファイルのフィールド} rich_text {本文のフィールド} staff {スタッフのフィールド} admin_only {管理者だけのフィールド} computed {計算のフィールド} other {連番のフィールド}}に本人が書ける印 self_writable は付けられない",
121
- self_writable_without_ops: "コレクション {collection} のフィールド {field}: 本人が書ける印 self_writable は人の操作 create_self か update_self を受けるコレクションだけ"
121
+ self_writable_nested: "コレクション {collection} のフィールド {field}: 本人の書き込みのフラグ self_writable はまとまりの中に付けない",
122
+ self_writable_blocked: "コレクション {collection} のフィールド {field}: {block, select, end_user {エンドユーザーへの参照のフィールド} object {まとまり} file {ファイルのフィールド} rich_text {本文のフィールド} staff {スタッフのフィールド} admin_only {管理者だけのフィールド} computed {計算のフィールド} other {連番のフィールド}}に本人の書き込みのフラグ self_writable は付けられない",
123
+ self_writable_without_ops: "コレクション {collection} のフィールド {field}: 本人の書き込みのフラグ self_writable は人の操作 create_self か update_self を受けるコレクションだけ"
122
124
  };
123
125
  /** スキーマの変更の一覧(changes.ts、SchemaChange の message) */
124
126
  const CHANGE = {
@@ -129,7 +131,7 @@ const CHANGE = {
129
131
  field_type_changed: "フィールド「{label}」の種類を {from} から {to} に変更(互換なし、新しいフィールドを作って移す)",
130
132
  field_required: "フィールド「{label}」を必須に",
131
133
  field_pii_narrowed: "フィールド「{label}」の個人の情報の分類を弱める(環境のコピーで値が残る)",
132
- field_managed_changed: "フィールド「{label}」の仕組みが決める値の印を変更(同じ人の送信を1回だけにする判定と、残す日数の基準が変わる)",
134
+ field_managed_changed: "フィールド「{label}」の仕組みが決める値のフラグを変更(同じ人の送信を1回だけにする判定と、残す日数の基準が変わる)",
133
135
  field_tightened: "フィールド「{label}」の値の条件を厳しく(合わない値は次の保存で修正)",
134
136
  option_removed: "フィールド「{label}」の選択肢「{option}」を削除",
135
137
  option_added: "フィールド「{label}」に選択肢「{option}」を追加",
@@ -155,9 +157,9 @@ const CHANGE = {
155
157
  collection_self_ops_added: "コレクション「{label}」の人の操作を追加(同意したインストールが本人の代わりに読み書きできる)",
156
158
  collection_self_ops_removed: "コレクション「{label}」の人の操作を外す",
157
159
  collection_form_opened: "コレクション「{label}」で受け付けるフォームを追加・変更(送信の権限を持つ API キーから書けるようになる)",
158
- collection_form_retention_shortened: "コレクション「{label}」の対応済みから残す日数を {days, number} 日に(過ぎたレコードは毎日の整理で削除。ゴミ箱のあるコレクションではゴミ箱に移り、個人の情報が消えるのはゴミ箱の期間の後)",
160
+ collection_form_retention_shortened: "コレクション「{label}」の対応済みから残す日数を {days, number} 日に(過ぎたレコードは毎日のクリーンアップで削除。ゴミ箱のあるコレクションではゴミ箱に移り、個人の情報が消えるのはゴミ箱の期間の後)",
159
161
  collection_form_changed: "コレクション「{label}」のフォームの設定を変更",
160
- collection_retention_shortened: "コレクション「{label}」の保持の日数を {days, number} 日に(過ぎたレコードは毎日の整理で消える)",
162
+ collection_retention_shortened: "コレクション「{label}」の保持の日数を {days, number} 日に(過ぎたレコードは毎日のクリーンアップで消える)",
161
163
  collection_retention_changed: "コレクション「{label}」の保持の日数を変更",
162
164
  collection_trash_enabled: "コレクション「{label}」のゴミ箱を有効にする",
163
165
  collection_trash_disabled: "コレクション「{label}」のゴミ箱を無効にする",