@tunasand/sdk 0.7.0 → 0.8.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 +112 -88
- package/README.md +202 -198
- package/dist/analytics.js +638 -2
- package/dist/app.js +230 -24
- package/dist/apps-BxnJ1RlU.js +435 -0
- package/dist/{bridge-DYAYGV7t.js → bridge-DtHw9hS6.js} +3 -3
- package/dist/bridge.js +2 -2
- package/dist/cli.js +5 -4
- package/dist/{model-pmXzGX12.js → collection-BEOxeISR.js} +49 -12
- package/dist/{customers-C_vJY2_v.js → customers-DTbL0qn6.js} +5 -3
- package/dist/customers.js +2 -2
- package/dist/{declared-C_GvPiGF.js → declared-DuNMsdXw.js} +93 -5
- package/dist/delivery.js +15 -30
- package/dist/embeds-B5V54Zur.js +34 -0
- package/dist/{errorLabels-CPKiPabZ.js → errorLabels-BgtQ_zUn.js} +276 -263
- package/dist/i18n.js +4 -4
- package/dist/ids--RF7hGyC.js +36 -0
- package/dist/integrations.js +4 -29
- package/dist/{ja-C1HEWWTQ.js → ja-CeHU0EaY.js} +3 -3
- package/dist/{ja-C6lX0CeJ.js → ja-Du6ooL6i.js} +12 -11
- package/dist/{page-E_cYgZx-.js → page-Bzrj24sJ.js} +4 -4
- package/dist/{profile-D6t1QMQh.js → profile-1em_lcxq.js} +5 -5
- package/dist/rich-text.d.ts +1 -0
- package/dist/{body.js → rich-text.js} +6 -7
- package/dist/{schema-UQJWRyfJ.js → schema-WnobuwLg.js} +136 -97
- package/dist/schema.js +346 -1
- package/dist/types/access/src/handoff.d.ts +3 -3
- package/dist/types/access/src/jwt.d.ts +1 -1
- package/dist/types/access/src/oidc.d.ts +1 -1
- package/dist/types/{cms-contract → contract}/src/apiKeys.d.ts +1 -1
- package/dist/types/{cms-contract → contract}/src/app.d.ts +8 -15
- package/dist/types/contract/src/appDefinition.d.ts +127 -0
- package/dist/types/{cms-contract → contract}/src/appDependencies.d.ts +6 -13
- package/dist/types/contract/src/appServer.d.ts +136 -0
- package/dist/types/contract/src/approvalLabels.d.ts +26 -0
- package/dist/types/contract/src/approvals.d.ts +63 -0
- package/dist/types/{cms-contract → contract}/src/apps.d.ts +72 -29
- package/dist/types/contract/src/auditActions.d.ts +18 -0
- package/dist/types/contract/src/auditLabels.d.ts +127 -0
- package/dist/types/{cms-contract → contract}/src/authorize.d.ts +22 -63
- package/dist/types/{cms-contract → contract}/src/bridge.d.ts +6 -6
- package/dist/types/{cms-contract → contract}/src/customers.d.ts +6 -6
- package/dist/types/{cms-contract → contract}/src/embeds.d.ts +13 -7
- package/dist/types/{cms-contract → contract}/src/errorLabels.d.ts +17 -15
- package/dist/types/{cms-contract → contract}/src/errorLabelsEn.d.ts +9 -7
- package/dist/types/{cms-contract → contract}/src/errors.d.ts +11 -11
- package/dist/types/{cms-contract → contract}/src/failureStatus.d.ts +4 -3
- package/dist/types/contract/src/fieldAccess.d.ts +45 -0
- package/dist/types/contract/src/fieldRules.d.ts +41 -0
- package/dist/types/{cms-contract/src/assets.d.ts → contract/src/files.d.ts} +5 -5
- package/dist/types/{cms-contract → contract}/src/functions.d.ts +3 -3
- package/dist/types/contract/src/hostingRpc.d.ts +143 -0
- package/dist/types/contract/src/hostnames.d.ts +30 -0
- package/dist/types/{cms-contract → contract}/src/identifiers.d.ts +31 -28
- package/dist/types/contract/src/ids.d.ts +104 -0
- package/dist/types/{cms-contract → contract}/src/import.d.ts +3 -3
- package/dist/types/contract/src/importLabels.d.ts +3 -0
- package/dist/types/contract/src/index.d.ts +67 -0
- package/dist/types/{cms-contract → contract}/src/issueLabels.d.ts +27 -23
- package/dist/types/{cms-contract → contract}/src/issueLabelsEn.d.ts +15 -13
- package/dist/types/contract/src/labels.d.ts +11 -0
- package/dist/types/contract/src/legacyAuditLabels.d.ts +10 -0
- package/dist/types/contract/src/livePeriods.d.ts +18 -0
- package/dist/types/contract/src/manage.d.ts +47 -0
- package/dist/types/contract/src/manageLabels.d.ts +9 -0
- package/dist/types/contract/src/mcpAuth.d.ts +139 -0
- package/dist/types/contract/src/mcpLabels.d.ts +5 -0
- package/dist/types/{cms-contract → contract}/src/migration.d.ts +1 -1
- package/dist/types/contract/src/operatorOperations.d.ts +703 -0
- package/dist/types/contract/src/operators.d.ts +33 -0
- package/dist/types/{cms-contract → contract}/src/paths.d.ts +6 -8
- package/dist/types/contract/src/pending.d.ts +4 -0
- package/dist/types/{cms-contract → contract}/src/permissions.d.ts +2 -0
- package/dist/types/contract/src/principal.d.ts +110 -0
- package/dist/types/{cms-contract → contract}/src/problems.d.ts +4 -4
- package/dist/types/contract/src/projectRole.d.ts +6 -0
- package/dist/types/{cms-contract → contract}/src/roles.d.ts +4 -3
- package/dist/types/{cms-contract → contract}/src/settingProblems.d.ts +2 -2
- package/dist/types/{cms-contract → contract}/src/settings.d.ts +2 -2
- package/dist/types/contract/src/settingsLabels.d.ts +3 -0
- package/dist/types/contract/src/slugs.d.ts +6 -0
- package/dist/types/{cms-contract → contract}/src/transfer.d.ts +3 -3
- package/dist/types/contract/src/trial.d.ts +10 -0
- package/dist/types/contract/src/versions.d.ts +9 -0
- package/dist/types/{cms-contract → contract}/src/webhooks.d.ts +33 -58
- package/dist/types/contract/src/workflow.d.ts +49 -0
- package/dist/types/contract/src/workspaceItems.d.ts +73 -0
- package/dist/types/contract/src/workspacePaths.d.ts +4 -0
- package/dist/types/{body → rich-text}/src/declared.d.ts +2 -2
- package/dist/types/{body → rich-text}/src/embed.d.ts +1 -1
- package/dist/types/{body → rich-text}/src/labels/ja.d.ts +2 -2
- package/dist/types/{body → rich-text}/src/profile.d.ts +1 -1
- package/dist/types/{model → schema}/src/audience.d.ts +11 -11
- package/dist/types/schema/src/brand.d.ts +5 -0
- package/dist/types/{model → schema}/src/capabilities.d.ts +5 -5
- package/dist/types/{model → schema}/src/changes.d.ts +6 -6
- package/dist/types/{model → schema}/src/check.d.ts +2 -2
- package/dist/types/{model/src/model.d.ts → schema/src/collection.d.ts} +25 -23
- package/dist/types/{platform/src/defaultModel.d.ts → schema/src/defaultSchema.d.ts} +4 -3
- package/dist/types/{model/src/asset.d.ts → schema/src/file.d.ts} +16 -16
- package/dist/types/{model → schema}/src/image.d.ts +3 -3
- package/dist/types/{model → schema}/src/index.d.ts +11 -10
- package/dist/types/{model → schema}/src/input.d.ts +3 -3
- package/dist/types/{model → schema}/src/integrity.d.ts +1 -1
- package/dist/types/{model → schema}/src/labels/en.d.ts +8 -7
- package/dist/types/{model → schema}/src/labels/ja.d.ts +9 -8
- package/dist/types/schema/src/legacy.d.ts +2 -0
- package/dist/types/{model → schema}/src/media.d.ts +1 -1
- package/dist/types/{model → schema}/src/mediaUrl.d.ts +5 -5
- package/dist/types/{model → schema}/src/page.d.ts +2 -2
- package/dist/types/{model → schema}/src/problems.d.ts +14 -13
- package/dist/types/{model → schema}/src/refs.d.ts +1 -1
- package/dist/types/{model → schema}/src/rules.d.ts +2 -2
- package/dist/types/{model → schema}/src/schema.d.ts +10 -10
- package/dist/types/{model → schema}/src/selfOps.d.ts +1 -1
- package/dist/types/schema/src/typesSource.d.ts +16 -0
- package/dist/types/{model → schema}/src/values.d.ts +2 -2
- package/dist/types/sdk/src/analytics.d.ts +2 -2
- package/dist/types/sdk/src/app.d.ts +44 -16
- package/dist/types/sdk/src/bridge.d.ts +12 -12
- package/dist/types/sdk/src/customers.d.ts +14 -20
- package/dist/types/sdk/src/delegation.d.ts +39 -0
- package/dist/types/sdk/src/delivery/client.d.ts +11 -10
- package/dist/types/sdk/src/delivery/fields.d.ts +2 -2
- package/dist/types/sdk/src/delivery/index.d.ts +1 -1
- package/dist/types/sdk/src/delivery/media.d.ts +6 -6
- package/dist/types/sdk/src/delivery/query.d.ts +1 -1
- package/dist/types/sdk/src/delivery/schema.d.ts +4 -4
- package/dist/types/sdk/src/delivery/values.d.ts +6 -6
- package/dist/types/sdk/src/delivery.d.ts +2 -2
- package/dist/types/sdk/src/i18n.d.ts +11 -11
- package/dist/types/sdk/src/integrations.d.ts +10 -10
- package/dist/types/sdk/src/{body.d.ts → rich-text.d.ts} +2 -2
- package/dist/types/sdk/src/schema.d.ts +5 -21
- package/dist/types/sdk/src/site.d.ts +1 -1
- package/dist/types/sdk/src/types.d.ts +21 -0
- package/dist/{schema-BPHL7Qr-.js → types-B77qvqPJ.js} +5 -4
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/dist/{typesSource-bO0jFw1I.js → typesSource-CWybQYus.js} +58 -12
- package/package.json +12 -12
- package/dist/apps-9u4XMi7E.js +0 -114
- package/dist/body.d.ts +0 -1
- package/dist/embed-R-OvDYAw.js +0 -90
- package/dist/model.d.ts +0 -1
- package/dist/model.js +0 -345
- package/dist/types/analytics/src/index.d.ts +0 -5
- package/dist/types/analytics/src/schedule.d.ts +0 -2
- package/dist/types/analytics/src/shared.d.ts +0 -21
- package/dist/types/analytics/src/source.d.ts +0 -19
- package/dist/types/analytics/src/store.d.ts +0 -24
- package/dist/types/cms-contract/src/urlLabel.d.ts +0 -13
- package/dist/types/model/src/brand.d.ts +0 -25
- package/dist/types/model/src/legacy.d.ts +0 -2
- package/dist/types/model/src/typesSource.d.ts +0 -8
- package/dist/types/sdk/src/model.d.ts +0 -5
- /package/dist/types/{cms-contract → contract}/src/appProblems.d.ts +0 -0
- /package/dist/types/{cms-contract → contract}/src/consents.d.ts +0 -0
- /package/dist/types/{cms-contract → contract}/src/customerLabels.d.ts +0 -0
- /package/dist/types/{analytics → contract}/src/day.d.ts +0 -0
- /package/dist/types/{cms-contract → contract}/src/functionLabels.d.ts +0 -0
- /package/dist/types/{cms-contract → contract}/src/permissionLabels.d.ts +0 -0
- /package/dist/types/{cms-contract → contract}/src/siteArtifact.d.ts +0 -0
- /package/dist/types/{cms-contract → contract}/src/siteDeclaration.d.ts +0 -0
- /package/dist/types/{analytics/src/view.d.ts → contract/src/viewEvent.d.ts} +0 -0
- /package/dist/types/{cms-contract → contract}/src/views.d.ts +0 -0
- /package/dist/types/{cms-contract → contract}/src/webhookLabels.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/components.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/derive.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/description.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/href.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/html.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/index.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/inline.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/labels/en.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/library.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/markdown.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/normalize.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/problems.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/render.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/schema.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/standard.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/types.d.ts +0 -0
- /package/dist/types/{model → schema}/src/contact.d.ts +0 -0
- /package/dist/types/{model → schema}/src/json.d.ts +0 -0
- /package/dist/types/{model → schema}/src/screens.d.ts +0 -0
- /package/dist/types/{model → schema}/src/time.d.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as formatMessage, f as problemText, n as BODY_PROBLEM_MESSAGES, p as problemTextFactory, u as problemMessage } from "./ja-
|
|
2
|
-
import {
|
|
3
|
-
// ../
|
|
1
|
+
import { c as formatMessage, f as problemText, n as BODY_PROBLEM_MESSAGES, p as problemTextFactory, u as problemMessage } from "./ja-CeHU0EaY.js";
|
|
2
|
+
import { n as SCHEMA_PROBLEM_MESSAGES } from "./ja-Du6ooL6i.js";
|
|
3
|
+
// ../schema/src/labels/en.ts
|
|
4
4
|
/** コンテンツスキーマの検査の問題の英語の文 */
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const SCHEMA_PROBLEM_MESSAGES_EN = {
|
|
6
|
+
schema_unreadable_input: "Cannot read the collection list types (each collection needs an id and an array of fields, groups also need an array of fields)",
|
|
7
7
|
invalid_collection_id: "id must start with a lowercase letter and contain only lowercase letters, digits and underscores",
|
|
8
8
|
invalid_field_key: "key must start with a lowercase letter and contain only letters, digits, underscores and hyphens",
|
|
9
9
|
page_path_slash: "The page template must start with /",
|
|
@@ -85,7 +85,7 @@ const MODEL_PROBLEM_MESSAGES_EN = {
|
|
|
85
85
|
self_ops_on_delete: "Collection {collection}: the self customer field {field} of a selfOps collection must use onDelete cascade or anonymize (deletion requests must not keep self records)",
|
|
86
86
|
self_ops_unique: "Collection {collection}: unique constraint {key} of a selfOps collection must include the self customer field {field} (to avoid conflicts with other people's values)",
|
|
87
87
|
self_writable_nested: "Collection {collection}, field {field}: selfWritable cannot be set inside a group",
|
|
88
|
-
self_writable_blocked: "Collection {collection}, field {field}: selfWritable cannot be set on {block, select, customer {customer fields} group {groups}
|
|
88
|
+
self_writable_blocked: "Collection {collection}, field {field}: selfWritable cannot be set on {block, select, customer {customer fields} group {groups} file {file fields} rich_text {body fields} staff {staff fields} admin_only {admin-only fields} computed {computed fields} other {sequence fields}}",
|
|
89
89
|
self_writable_without_ops: "Collection {collection}, field {field}: selfWritable requires a collection that accepts create_self or update_self",
|
|
90
90
|
field_key_reused: "Field \"{label}\": key {key} was a {type} field in a past version (values remain in records, use another key)",
|
|
91
91
|
field_removed: "Remove field \"{label}\" (values are kept and hidden)",
|
|
@@ -117,13 +117,14 @@ const MODEL_PROBLEM_MESSAGES_EN = {
|
|
|
117
117
|
collection_self_ops_removed: "Remove selfOps from collection \"{label}\"",
|
|
118
118
|
collection_retention_shortened: "Set the retention of collection \"{label}\" to {days, number} days (expired records are deleted by the daily cleanup)",
|
|
119
119
|
collection_retention_changed: "Change the retention of collection \"{label}\"",
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
collection_publish_checks_changed: "Change the publish checks of collection \"{label}\"",
|
|
121
|
+
file_fixed: "The fields, format and publishing of collection \"{label}\" are fixed by the product (name and description can be changed)",
|
|
122
|
+
file_not_removable: "Collection \"{label}\" is fixed by the product and cannot be deleted",
|
|
122
123
|
collection_removed: "Delete collection \"{label}\" (records are kept and hidden)",
|
|
123
|
-
|
|
124
|
+
file_defined: "The fields and format of collection \"{label}\" are defined by the product",
|
|
124
125
|
collection_added: "Add collection \"{label}\"",
|
|
125
126
|
confidential_key_reused: "The key of field {field} was a confidential field ({type}) (values remain in records, use another key)",
|
|
126
|
-
audience_widened: "Widen the audience of field {field} from {from, select, public {public} granted {granted customers} self {self} other {staff}} to {to, select, public {public} granted {granted customers} self {self} other {staff}} (recorded in the
|
|
127
|
+
audience_widened: "Widen the audience of field {field} from {from, select, public {public} granted {granted customers} self {self} other {staff}} to {to, select, public {public} granted {granted customers} self {self} other {staff}} (recorded in the registry)",
|
|
127
128
|
component_removed: "Remove the declaration of body component \"{label}\" (bodies using it are rejected on the next save)",
|
|
128
129
|
component_added: "Declare body component \"{label}\"",
|
|
129
130
|
component_changed: "Change the declaration of body component \"{label}\"",
|
|
@@ -170,7 +171,7 @@ const MODEL_PROBLEM_MESSAGES_EN = {
|
|
|
170
171
|
comment_required: "Comment is required",
|
|
171
172
|
reject_note_required: "Reason for returning is required"
|
|
172
173
|
};
|
|
173
|
-
// ../
|
|
174
|
+
// ../rich-text/src/labels/en.ts
|
|
174
175
|
const MARK = "{mark, select, strong {Bold} em {Italic} code {Code} strike {Strikethrough} mark {Highlight} sup {Superscript} sub {Subscript} other {Underline}}";
|
|
175
176
|
const STYLE = "{kind, select, color {Text color} background {Background color} other {Font size}}";
|
|
176
177
|
const WHERE = "{where, select, paragraph {paragraph} heading {heading} list {list} quote {quote} figure {figure} caption {caption} other {cell}}";
|
|
@@ -264,210 +265,23 @@ const BODY_PROBLEM_MESSAGES_EN = {
|
|
|
264
265
|
drop_extra_nested_list: "second and later nested lists in a list item (joined)",
|
|
265
266
|
drop_table_element: "element {name} inside a table"
|
|
266
267
|
};
|
|
267
|
-
// ../
|
|
268
|
-
/** 失敗のコードと HTTP の状態 */
|
|
269
|
-
const FAILURE_STATUS = {
|
|
270
|
-
invalid_input: 400,
|
|
271
|
-
submit_unmet: 400,
|
|
272
|
-
publish_unmet: 400,
|
|
273
|
-
save_unmet: 400,
|
|
274
|
-
version_required: 400,
|
|
275
|
-
file_required: 400,
|
|
276
|
-
file_too_large: 400,
|
|
277
|
-
unsupported_image: 400,
|
|
278
|
-
unsupported_file: 400,
|
|
279
|
-
invalid_dimensions: 400,
|
|
280
|
-
https_required: 400,
|
|
281
|
-
invalid_style: 400,
|
|
282
|
-
invalid_slug: 400,
|
|
283
|
-
reserved_slug: 400,
|
|
284
|
-
invalid_id: 400,
|
|
285
|
-
reserved_id: 400,
|
|
286
|
-
tenant_required: 400,
|
|
287
|
-
same_environment: 400,
|
|
288
|
-
ticket_required: 400,
|
|
289
|
-
ticket_invalid: 400,
|
|
290
|
-
login_required: 401,
|
|
291
|
-
unauthorized: 401,
|
|
292
|
-
reauth_required: 401,
|
|
293
|
-
invalid_mcp_token: 401,
|
|
294
|
-
mcp_signature_invalid: 401,
|
|
295
|
-
invalid_account_token: 401,
|
|
296
|
-
preview_token_required: 401,
|
|
297
|
-
api_key_required: 401,
|
|
298
|
-
invalid_api_key: 401,
|
|
299
|
-
invalid_id_token: 401,
|
|
300
|
-
invalid_app_token: 401,
|
|
301
|
-
account_not_found: 403,
|
|
302
|
-
invalid_preview_token: 403,
|
|
303
|
-
api_key_forbidden: 403,
|
|
304
|
-
mcp_not_allowed: 403,
|
|
305
|
-
insufficient_scope: 403,
|
|
306
|
-
admin_only: 403,
|
|
307
|
-
operator_read_only: 403,
|
|
308
|
-
operator_closed: 403,
|
|
309
|
-
not_trial: 403,
|
|
310
|
-
not_live: 403,
|
|
311
|
-
forbidden: 403,
|
|
312
|
-
mfa_required: 403,
|
|
313
|
-
cross_origin: 403,
|
|
314
|
-
editorial_only: 403,
|
|
315
|
-
no_linked_record: 403,
|
|
316
|
-
own_only: 403,
|
|
317
|
-
not_visible: 403,
|
|
318
|
-
published_admin_only: 403,
|
|
319
|
-
cannot_remove_self: 403,
|
|
320
|
-
cannot_change_owner: 403,
|
|
321
|
-
not_found: 404,
|
|
322
|
-
customer_not_linked: 404,
|
|
323
|
-
method_not_allowed: 405,
|
|
324
|
-
customer_pending: 409,
|
|
325
|
-
in_use: 409,
|
|
326
|
-
conflict: 409,
|
|
327
|
-
already_exists: 409,
|
|
328
|
-
duplicate_name: 409,
|
|
329
|
-
duplicate_email: 409,
|
|
330
|
-
duplicate_id: 409,
|
|
331
|
-
duplicate_slug: 409,
|
|
332
|
-
slug_taken: 409,
|
|
333
|
-
version_conflict: 409,
|
|
334
|
-
article_editing: 409,
|
|
335
|
-
invalid_state: 409,
|
|
336
|
-
unpublish_first: 409,
|
|
337
|
-
last_owner: 409,
|
|
338
|
-
last_admin: 409,
|
|
339
|
-
exceeds_own: 403,
|
|
340
|
-
already_linked: 409,
|
|
341
|
-
invalid_invite: 409,
|
|
342
|
-
run_done: 409,
|
|
343
|
-
live_audience: 409,
|
|
344
|
-
already_live: 409,
|
|
345
|
-
target_live: 409,
|
|
346
|
-
target_synthetic: 409,
|
|
347
|
-
cross_tenant: 409,
|
|
348
|
-
target_busy: 409,
|
|
349
|
-
target_frozen: 409,
|
|
350
|
-
not_frozen: 409,
|
|
351
|
-
stale: 409,
|
|
352
|
-
approval_required: 403,
|
|
353
|
-
approval_closed: 409,
|
|
354
|
-
still_frozen: 409,
|
|
355
|
-
schema_values: 409,
|
|
356
|
-
confirm_required: 409,
|
|
357
|
-
pii_unregistered_table: 409,
|
|
358
|
-
environment_limit_exceeded: 409,
|
|
359
|
-
cursor_expired: 410,
|
|
360
|
-
body_too_large: 413,
|
|
361
|
-
rate_limited: 429,
|
|
362
|
-
upstream_failed: 502,
|
|
363
|
-
not_configured: 503,
|
|
364
|
-
unavailable: 503,
|
|
365
|
-
writes_paused: 503,
|
|
366
|
-
environment_frozen: 503,
|
|
367
|
-
audit_unshipped: 503,
|
|
368
|
-
grants_not_revoked: 503,
|
|
369
|
-
notice_failed: 503,
|
|
370
|
-
job_failed: 500,
|
|
371
|
-
internal_error: 500,
|
|
372
|
-
incomplete: 500
|
|
373
|
-
};
|
|
374
|
-
// ../cms-contract/src/errors.ts
|
|
375
|
-
/** 変更の操作で受け付ける本文の大きさ(/api、バイト数、multipart のアップロードは ASSET_SIZE_MAX) */
|
|
376
|
-
const JSON_BODY_MAX = 1048576;
|
|
377
|
-
/** 画面の側だけのコード(通信の失敗と JSON でない応答。HTTP の状態を持たない) */
|
|
378
|
-
const NETWORK_ERROR = "network_error";
|
|
379
|
-
/** エラーのコードと HTTP の状態(failureStatus.ts の表の CMS の API の部分) */
|
|
380
|
-
const ERROR_STATUS = Object.fromEntries([
|
|
381
|
-
"invalid_input",
|
|
382
|
-
"submit_unmet",
|
|
383
|
-
"publish_unmet",
|
|
384
|
-
"save_unmet",
|
|
385
|
-
"version_required",
|
|
386
|
-
"file_required",
|
|
387
|
-
"file_too_large",
|
|
388
|
-
"unsupported_image",
|
|
389
|
-
"unsupported_file",
|
|
390
|
-
"invalid_dimensions",
|
|
391
|
-
"https_required",
|
|
392
|
-
"invalid_style",
|
|
393
|
-
"login_required",
|
|
394
|
-
"invalid_mcp_token",
|
|
395
|
-
"mcp_signature_invalid",
|
|
396
|
-
"invalid_account_token",
|
|
397
|
-
"preview_token_required",
|
|
398
|
-
"api_key_required",
|
|
399
|
-
"invalid_api_key",
|
|
400
|
-
"invalid_id_token",
|
|
401
|
-
"invalid_app_token",
|
|
402
|
-
"account_not_found",
|
|
403
|
-
"invalid_preview_token",
|
|
404
|
-
"api_key_forbidden",
|
|
405
|
-
"mcp_not_allowed",
|
|
406
|
-
"insufficient_scope",
|
|
407
|
-
"admin_only",
|
|
408
|
-
"operator_read_only",
|
|
409
|
-
"operator_closed",
|
|
410
|
-
"not_trial",
|
|
411
|
-
"not_live",
|
|
412
|
-
"forbidden",
|
|
413
|
-
"editorial_only",
|
|
414
|
-
"no_linked_record",
|
|
415
|
-
"own_only",
|
|
416
|
-
"not_visible",
|
|
417
|
-
"published_admin_only",
|
|
418
|
-
"cannot_remove_self",
|
|
419
|
-
"cannot_change_owner",
|
|
420
|
-
"not_found",
|
|
421
|
-
"customer_not_linked",
|
|
422
|
-
"customer_pending",
|
|
423
|
-
"method_not_allowed",
|
|
424
|
-
"in_use",
|
|
425
|
-
"duplicate_name",
|
|
426
|
-
"duplicate_email",
|
|
427
|
-
"duplicate_id",
|
|
428
|
-
"duplicate_slug",
|
|
429
|
-
"version_conflict",
|
|
430
|
-
"article_editing",
|
|
431
|
-
"invalid_state",
|
|
432
|
-
"unpublish_first",
|
|
433
|
-
"last_admin",
|
|
434
|
-
"exceeds_own",
|
|
435
|
-
"reauth_required",
|
|
436
|
-
"approval_required",
|
|
437
|
-
"stale",
|
|
438
|
-
"approval_closed",
|
|
439
|
-
"already_linked",
|
|
440
|
-
"invalid_invite",
|
|
441
|
-
"run_done",
|
|
442
|
-
"cursor_expired",
|
|
443
|
-
"body_too_large",
|
|
444
|
-
"rate_limited",
|
|
445
|
-
"upstream_failed",
|
|
446
|
-
"not_configured",
|
|
447
|
-
"unavailable",
|
|
448
|
-
"writes_paused",
|
|
449
|
-
"environment_frozen",
|
|
450
|
-
"job_failed",
|
|
451
|
-
"internal_error",
|
|
452
|
-
NETWORK_ERROR
|
|
453
|
-
].flatMap((code) => code === NETWORK_ERROR ? [] : [[code, FAILURE_STATUS[code]]]));
|
|
454
|
-
// ../cms-contract/src/assets.ts
|
|
268
|
+
// ../contract/src/files.ts
|
|
455
269
|
/** 画像1枚の大きさの上限(バイト、アップロード・取り込みで共通) */
|
|
456
|
-
const
|
|
457
|
-
// ../
|
|
270
|
+
const FILE_SIZE_MAX = 10485760;
|
|
271
|
+
// ../contract/src/errorLabelsEn.ts
|
|
458
272
|
/** エラーの英語のカタログ */
|
|
459
273
|
const ERROR_MESSAGES_EN = {
|
|
460
274
|
targets: {
|
|
461
275
|
request: "creation request",
|
|
462
276
|
role: "role",
|
|
463
|
-
|
|
277
|
+
files: "file",
|
|
464
278
|
record: "master",
|
|
465
|
-
|
|
279
|
+
file: "image",
|
|
466
280
|
mcp: "MCP",
|
|
467
281
|
version: "version",
|
|
468
282
|
profile: "profile",
|
|
469
283
|
portrait: "portrait",
|
|
470
|
-
|
|
284
|
+
standard_app: "standard feature",
|
|
471
285
|
account: "account",
|
|
472
286
|
comment: "comment",
|
|
473
287
|
view: "view",
|
|
@@ -487,12 +301,13 @@ const ERROR_MESSAGES_EN = {
|
|
|
487
301
|
},
|
|
488
302
|
codes: {
|
|
489
303
|
invalid_input: "The input is invalid.",
|
|
304
|
+
infra_id_uuid: "Specify the 26-character ID of lowercase letters and digits, not a UUID.",
|
|
490
305
|
submit_unmet: "The submission requirements are not met.",
|
|
491
306
|
publish_unmet: "The publishing requirements are not met.",
|
|
492
307
|
save_unmet: "The saving requirements are not met.",
|
|
493
308
|
version_required: "The base version (version) is required.",
|
|
494
309
|
file_required: "Choose an image file.",
|
|
495
|
-
file_too_large: "Images must be at most {
|
|
310
|
+
file_too_large: "Images must be at most {fileMaxMB, number} MB.",
|
|
496
311
|
unsupported_image: "Unsupported image format (PNG, JPEG, GIF, WebP).",
|
|
497
312
|
unsupported_file: "Unsupported file format (PDF, ZIP, text, CSV, Word, Excel, PowerPoint).",
|
|
498
313
|
invalid_dimensions: "The image dimensions are invalid.",
|
|
@@ -529,7 +344,7 @@ const ERROR_MESSAGES_EN = {
|
|
|
529
344
|
method_not_allowed: "This path does not accept this method.",
|
|
530
345
|
customer_not_linked: "No customer is linked to this account.",
|
|
531
346
|
customer_pending: "The link of this account becomes usable after review by the operator.",
|
|
532
|
-
in_use: "{by, select, uses {Cannot delete because it is used in {count, number} items.} places {Cannot delete because it is used in {count, number} places.} outputs {Cannot delete because it is used by {count, number} planning outputs.} record {Cannot delete because it is used by {name, select, none {other content} other {{name}}}.} writers {Cannot delete because it is linked to {count, number} records.} customers {Cannot delete because {count, number} records belong to it.} accounts {Cannot delete because {count, number} accounts have this role.}
|
|
347
|
+
in_use: "{by, select, uses {Cannot delete because it is used in {count, number} items.} places {Cannot delete because it is used in {count, number} places.} outputs {Cannot delete because it is used by {count, number} planning outputs.} record {Cannot delete because it is used by {name, select, none {other content} other {{name}}}.} writers {Cannot delete because it is linked to {count, number} records.} customers {Cannot delete because {count, number} records belong to it.} accounts {Cannot delete because {count, number} accounts have this role.} app {Cannot delete because it is referenced by {count, number} {name, select, none {extension records} other {{name}}}.} other {Cannot delete because it is in use.}}",
|
|
533
348
|
duplicate_name: "The same name already exists.",
|
|
534
349
|
duplicate_email: "An account with the same email address already exists.",
|
|
535
350
|
duplicate_id: "This ID is already in use.",
|
|
@@ -578,13 +393,13 @@ const ERROR_MESSAGES_EN = {
|
|
|
578
393
|
installation_state: "This operation is not possible in the current installation state.",
|
|
579
394
|
site_deploy: "The site cannot be uploaded now. Another upload is in progress, or the site is stopped or removed.",
|
|
580
395
|
site_stopped_by_check: "The site was stopped because the check right after the upload failed. Upload a fix and ask the operator to restore it.",
|
|
581
|
-
|
|
396
|
+
required_app: "Required standard features cannot be stopped or uninstalled.",
|
|
582
397
|
app_installed: "An app can be installed only once per project.",
|
|
583
398
|
app_dependencies: "Cannot satisfy the app dependencies. Check the reasons in conflicts.",
|
|
584
399
|
app_reinstalled: "The data of the old installation cannot be deleted because the same app has been reinstalled.",
|
|
585
400
|
app_managed: "This registration is managed by an app installation. Change it by consenting to a new app version.",
|
|
586
401
|
request_key_reused: "A record with another person, channel or purpose already exists for the same deduplication key.",
|
|
587
|
-
|
|
402
|
+
no_organization: "Cannot invite because the project does not belong to an organization. Ask the operator to add it to an organization.",
|
|
588
403
|
schema_changed: "Could not save because the schema changed. Reload the screen.",
|
|
589
404
|
customer_inactive: "This customer is suspended or closed, so the operation is not possible.",
|
|
590
405
|
self_limit: "The limit of records per person has been reached.",
|
|
@@ -607,6 +422,7 @@ const ERROR_MESSAGES_EN = {
|
|
|
607
422
|
linkedRecord: "record",
|
|
608
423
|
titles: {
|
|
609
424
|
invalid_input: "Input error",
|
|
425
|
+
infra_id_uuid: "Input error",
|
|
610
426
|
submit_unmet: "Cannot submit",
|
|
611
427
|
publish_unmet: "Cannot publish",
|
|
612
428
|
save_unmet: "Cannot save",
|
|
@@ -681,7 +497,196 @@ const ERROR_MESSAGES_EN = {
|
|
|
681
497
|
},
|
|
682
498
|
requiredTitle: "Required fields missing"
|
|
683
499
|
};
|
|
684
|
-
// ../
|
|
500
|
+
// ../contract/src/failureStatus.ts
|
|
501
|
+
/** 失敗のコードと HTTP の状態 */
|
|
502
|
+
const FAILURE_STATUS = {
|
|
503
|
+
invalid_input: 400,
|
|
504
|
+
submit_unmet: 400,
|
|
505
|
+
publish_unmet: 400,
|
|
506
|
+
save_unmet: 400,
|
|
507
|
+
version_required: 400,
|
|
508
|
+
file_required: 400,
|
|
509
|
+
file_too_large: 400,
|
|
510
|
+
unsupported_image: 400,
|
|
511
|
+
unsupported_file: 400,
|
|
512
|
+
invalid_dimensions: 400,
|
|
513
|
+
https_required: 400,
|
|
514
|
+
invalid_style: 400,
|
|
515
|
+
invalid_slug: 400,
|
|
516
|
+
reserved_slug: 400,
|
|
517
|
+
invalid_id: 400,
|
|
518
|
+
infra_id_uuid: 400,
|
|
519
|
+
reserved_id: 400,
|
|
520
|
+
organization_required: 400,
|
|
521
|
+
same_environment: 400,
|
|
522
|
+
ticket_required: 400,
|
|
523
|
+
ticket_invalid: 400,
|
|
524
|
+
login_required: 401,
|
|
525
|
+
unauthorized: 401,
|
|
526
|
+
reauth_required: 401,
|
|
527
|
+
invalid_mcp_token: 401,
|
|
528
|
+
mcp_signature_invalid: 401,
|
|
529
|
+
invalid_account_token: 401,
|
|
530
|
+
preview_token_required: 401,
|
|
531
|
+
api_key_required: 401,
|
|
532
|
+
invalid_api_key: 401,
|
|
533
|
+
invalid_id_token: 401,
|
|
534
|
+
invalid_app_token: 401,
|
|
535
|
+
account_not_found: 403,
|
|
536
|
+
invalid_preview_token: 403,
|
|
537
|
+
api_key_forbidden: 403,
|
|
538
|
+
mcp_not_allowed: 403,
|
|
539
|
+
insufficient_scope: 403,
|
|
540
|
+
admin_only: 403,
|
|
541
|
+
operator_read_only: 403,
|
|
542
|
+
operator_closed: 403,
|
|
543
|
+
not_trial: 403,
|
|
544
|
+
not_live: 403,
|
|
545
|
+
forbidden: 403,
|
|
546
|
+
mfa_required: 403,
|
|
547
|
+
cross_origin: 403,
|
|
548
|
+
editorial_only: 403,
|
|
549
|
+
no_linked_record: 403,
|
|
550
|
+
own_only: 403,
|
|
551
|
+
not_visible: 403,
|
|
552
|
+
published_admin_only: 403,
|
|
553
|
+
cannot_remove_self: 403,
|
|
554
|
+
cannot_change_owner: 403,
|
|
555
|
+
not_found: 404,
|
|
556
|
+
customer_not_linked: 404,
|
|
557
|
+
method_not_allowed: 405,
|
|
558
|
+
customer_pending: 409,
|
|
559
|
+
in_use: 409,
|
|
560
|
+
conflict: 409,
|
|
561
|
+
already_exists: 409,
|
|
562
|
+
duplicate_name: 409,
|
|
563
|
+
duplicate_email: 409,
|
|
564
|
+
duplicate_id: 409,
|
|
565
|
+
duplicate_slug: 409,
|
|
566
|
+
slug_taken: 409,
|
|
567
|
+
version_conflict: 409,
|
|
568
|
+
article_editing: 409,
|
|
569
|
+
invalid_state: 409,
|
|
570
|
+
unpublish_first: 409,
|
|
571
|
+
last_owner: 409,
|
|
572
|
+
last_admin: 409,
|
|
573
|
+
exceeds_own: 403,
|
|
574
|
+
already_linked: 409,
|
|
575
|
+
invalid_invite: 409,
|
|
576
|
+
run_done: 409,
|
|
577
|
+
live_audience: 409,
|
|
578
|
+
already_live: 409,
|
|
579
|
+
target_live: 409,
|
|
580
|
+
target_synthetic: 409,
|
|
581
|
+
cross_organization: 409,
|
|
582
|
+
target_busy: 409,
|
|
583
|
+
target_frozen: 409,
|
|
584
|
+
not_frozen: 409,
|
|
585
|
+
stale: 409,
|
|
586
|
+
approval_required: 403,
|
|
587
|
+
approval_closed: 409,
|
|
588
|
+
still_frozen: 409,
|
|
589
|
+
schema_values: 409,
|
|
590
|
+
confirm_required: 409,
|
|
591
|
+
pii_unregistered_table: 409,
|
|
592
|
+
environment_limit_exceeded: 409,
|
|
593
|
+
cursor_expired: 410,
|
|
594
|
+
body_too_large: 413,
|
|
595
|
+
rate_limited: 429,
|
|
596
|
+
upstream_failed: 502,
|
|
597
|
+
not_configured: 503,
|
|
598
|
+
unavailable: 503,
|
|
599
|
+
writes_paused: 503,
|
|
600
|
+
environment_frozen: 503,
|
|
601
|
+
audit_unshipped: 503,
|
|
602
|
+
grants_not_revoked: 503,
|
|
603
|
+
notice_failed: 503,
|
|
604
|
+
job_failed: 500,
|
|
605
|
+
internal_error: 500,
|
|
606
|
+
incomplete: 500
|
|
607
|
+
};
|
|
608
|
+
// ../contract/src/errors.ts
|
|
609
|
+
/** 変更の操作で受け付ける本文の大きさ(/api、バイト数、multipart のアップロードは FILE_SIZE_MAX) */
|
|
610
|
+
const JSON_BODY_MAX = 1048576;
|
|
611
|
+
/** 画面の側だけのコード(通信の失敗と JSON でない応答。HTTP の状態を持たない) */
|
|
612
|
+
const NETWORK_ERROR = "network_error";
|
|
613
|
+
/** エラーのコードと HTTP の状態(failureStatus.ts の表の CMS の API の部分) */
|
|
614
|
+
const ERROR_STATUS = Object.fromEntries([
|
|
615
|
+
"invalid_input",
|
|
616
|
+
"submit_unmet",
|
|
617
|
+
"publish_unmet",
|
|
618
|
+
"save_unmet",
|
|
619
|
+
"version_required",
|
|
620
|
+
"file_required",
|
|
621
|
+
"file_too_large",
|
|
622
|
+
"unsupported_image",
|
|
623
|
+
"unsupported_file",
|
|
624
|
+
"invalid_dimensions",
|
|
625
|
+
"https_required",
|
|
626
|
+
"invalid_style",
|
|
627
|
+
"infra_id_uuid",
|
|
628
|
+
"login_required",
|
|
629
|
+
"invalid_mcp_token",
|
|
630
|
+
"mcp_signature_invalid",
|
|
631
|
+
"invalid_account_token",
|
|
632
|
+
"preview_token_required",
|
|
633
|
+
"api_key_required",
|
|
634
|
+
"invalid_api_key",
|
|
635
|
+
"invalid_id_token",
|
|
636
|
+
"invalid_app_token",
|
|
637
|
+
"account_not_found",
|
|
638
|
+
"invalid_preview_token",
|
|
639
|
+
"api_key_forbidden",
|
|
640
|
+
"mcp_not_allowed",
|
|
641
|
+
"insufficient_scope",
|
|
642
|
+
"admin_only",
|
|
643
|
+
"operator_read_only",
|
|
644
|
+
"operator_closed",
|
|
645
|
+
"not_trial",
|
|
646
|
+
"not_live",
|
|
647
|
+
"forbidden",
|
|
648
|
+
"editorial_only",
|
|
649
|
+
"no_linked_record",
|
|
650
|
+
"own_only",
|
|
651
|
+
"not_visible",
|
|
652
|
+
"published_admin_only",
|
|
653
|
+
"cannot_remove_self",
|
|
654
|
+
"cannot_change_owner",
|
|
655
|
+
"not_found",
|
|
656
|
+
"customer_not_linked",
|
|
657
|
+
"customer_pending",
|
|
658
|
+
"method_not_allowed",
|
|
659
|
+
"in_use",
|
|
660
|
+
"duplicate_name",
|
|
661
|
+
"duplicate_email",
|
|
662
|
+
"duplicate_id",
|
|
663
|
+
"duplicate_slug",
|
|
664
|
+
"version_conflict",
|
|
665
|
+
"article_editing",
|
|
666
|
+
"invalid_state",
|
|
667
|
+
"unpublish_first",
|
|
668
|
+
"last_admin",
|
|
669
|
+
"exceeds_own",
|
|
670
|
+
"reauth_required",
|
|
671
|
+
"approval_required",
|
|
672
|
+
"stale",
|
|
673
|
+
"approval_closed",
|
|
674
|
+
"already_linked",
|
|
675
|
+
"invalid_invite",
|
|
676
|
+
"run_done",
|
|
677
|
+
"cursor_expired",
|
|
678
|
+
"body_too_large",
|
|
679
|
+
"rate_limited",
|
|
680
|
+
"upstream_failed",
|
|
681
|
+
"not_configured",
|
|
682
|
+
"unavailable",
|
|
683
|
+
"writes_paused",
|
|
684
|
+
"environment_frozen",
|
|
685
|
+
"job_failed",
|
|
686
|
+
"internal_error",
|
|
687
|
+
NETWORK_ERROR
|
|
688
|
+
].flatMap((code) => code === NETWORK_ERROR ? [] : [[code, FAILURE_STATUS[code]]]));
|
|
689
|
+
// ../contract/src/issueLabels.ts
|
|
685
690
|
/** 機能をまたいで共通の入力 */
|
|
686
691
|
const INPUT = {
|
|
687
692
|
name_required: "名前が未入力",
|
|
@@ -690,6 +695,8 @@ const INPUT = {
|
|
|
690
695
|
slug_chars: "スラッグは英小文字・数字・ハイフン・アンダーラインだけ",
|
|
691
696
|
slug_uuid: "スラッグに UUID の形は使えない",
|
|
692
697
|
url_format: "URL の形が不正",
|
|
698
|
+
infra_id: "ID の形が不正(英小文字と数字の26文字)",
|
|
699
|
+
infra_id_uuid: "UUID の形の ID は受け付けない(英小文字と数字の26文字)",
|
|
693
700
|
https_only: "https の URL だけ",
|
|
694
701
|
body_not_json: "本文が JSON の形でない",
|
|
695
702
|
email_format: "メールアドレスの形式が不正"
|
|
@@ -708,10 +715,10 @@ const APPS = {
|
|
|
708
715
|
app_manifest_detail: "マニフェストの形が正しくありません({detail})",
|
|
709
716
|
app_namespace: "名前空間は英小文字で始まる英小文字と数字の3〜32文字です",
|
|
710
717
|
app_namespace_taken: "この名前空間はすでに使われています(再利用できません)",
|
|
711
|
-
|
|
718
|
+
app_no_organization: "コンソールで管理していないプロジェクトでは、アプリを登録できません。必要なときは、管理者が運営に相談してください。",
|
|
712
719
|
app_slots: "埋め込み先のコレクションを選んでください(本文を求める埋め込み先は本文の項目を持つコレクション)",
|
|
713
720
|
app_not_installable: "このアプリはインストールできません(自分の組織のアプリと確認済みのアプリだけ)。アプリの一覧から選び直してください。",
|
|
714
|
-
|
|
721
|
+
app_no_registration: "このプロジェクトでは、アプリを追加できません。必要なときは、管理者が運営に相談してください。",
|
|
715
722
|
app_changed: "確認した後にアプリのバージョンか能力が変わりました。もう一度確認してください。",
|
|
716
723
|
app_dependency: "依存先のアプリが登録簿にないか、アプリの種類でないか、指した設定が依存先にありません",
|
|
717
724
|
app_incompatible: "同じ世代の中で互換のない変更です。世代(major)を上げるか、変更を戻してください。",
|
|
@@ -730,7 +737,7 @@ const APPS = {
|
|
|
730
737
|
artifact_too_large: "成果物が大きさの上限を超えています",
|
|
731
738
|
artifact_format: "成果物の形ではありません(tunasand site で組んでください)",
|
|
732
739
|
artifact_header: "成果物の見出しの欄か値が正しくありません",
|
|
733
|
-
artifact_main: "入口(main)が ESM か CommonJS
|
|
740
|
+
artifact_main: "入口(main)が ESM か CommonJS のアプリにありません",
|
|
734
741
|
artifact_module: "モジュールの名前か種類が正しくありません(拡張子つきの名前だけ)",
|
|
735
742
|
artifact_asset: "資産の道か大きさが正しくありません",
|
|
736
743
|
artifact_size_mismatch: "成果物の見出しの大きさと中身が合いません",
|
|
@@ -781,8 +788,10 @@ const RECORDS = {
|
|
|
781
788
|
generated_slug: "このコレクションのスラッグは CMS が振るため指定できない",
|
|
782
789
|
unique_taken: "{labels}が同じレコードがすでにある",
|
|
783
790
|
unique_duplicates: "{collection}に{labels}が同じレコードが{count, number}件ある(重複を直してから一意にする)",
|
|
791
|
+
publish_check_unavailable: "公開の前の検査 {check} を提供するアプリがオンでない",
|
|
792
|
+
capability_missing: "{collection}の宣言に要る能力 {capability} を置き場所が持たない",
|
|
784
793
|
use_at: "{collection}の{field}{rest, select, none {} other {({rest})}}",
|
|
785
|
-
public_in_private_field: "
|
|
794
|
+
public_in_private_field: "非公開のファイルだけの項目に公開の画像やファイルがある(この項目からアップロードし直す)"
|
|
786
795
|
};
|
|
787
796
|
/** ゴミ箱から戻せない理由の名前(reason は問題) */
|
|
788
797
|
const TRASH = {
|
|
@@ -790,7 +799,7 @@ const TRASH = {
|
|
|
790
799
|
trash_unique_holder: "{collection}のレコード({reason})",
|
|
791
800
|
trash_customer_missing: "{collection}の{field}が指す顧客 {id}(顧客がない)"
|
|
792
801
|
};
|
|
793
|
-
/**
|
|
802
|
+
/** スキーマ・設定・アプリ(parts は設定の部分の id: general・body・schema) */
|
|
794
803
|
const SETTINGS = {
|
|
795
804
|
renamed_replacement: "id を変更するコレクションの選択肢の置き換えは、id の変更と別に保存してください",
|
|
796
805
|
project_name_required: "プロジェクトの名前が未入力",
|
|
@@ -798,14 +807,13 @@ const SETTINGS = {
|
|
|
798
807
|
project_slug_reserved: "このスラッグは予約されているため使えません",
|
|
799
808
|
project_slug_taken: "このスラッグは組織のほかのプロジェクトが使っています",
|
|
800
809
|
time_zone_invalid: "タイムゾーンの名前が不正(例: Asia/Tokyo)",
|
|
801
|
-
|
|
810
|
+
required_app: "止められない標準の機能",
|
|
802
811
|
unknown_setting_field: "設定のページにない項目",
|
|
803
|
-
|
|
804
|
-
module_invalid_settings: "設定値が正しくありません。",
|
|
812
|
+
app_invalid_settings: "設定値が正しくありません。",
|
|
805
813
|
config_corrupt: "プロジェクト {id} の DB の設定の値が壊れています({parts}、値の修復が必要)。",
|
|
806
814
|
config_missing: "プロジェクト {id} の DB に設定がありません({parts}、プロジェクトのテンプレートの適用が必要)。"
|
|
807
815
|
};
|
|
808
|
-
/**
|
|
816
|
+
/** アプリの設定値(settingProblems.ts の SettingProblem、field は設定のページの項目名、なければ設定値のキー) */
|
|
809
817
|
const SETTING_VALUES = {
|
|
810
818
|
setting_text: "「{field}」に文字列を入力してください。",
|
|
811
819
|
setting_integer_min: "「{field}」は{min, number}以上の整数にしてください。",
|
|
@@ -828,7 +836,7 @@ const TRANSFER = {
|
|
|
828
836
|
import_publish_failed: "公開できず下書きのまま: {problem}",
|
|
829
837
|
import_image_not_url: "{src}: 画像の参照が URL でない",
|
|
830
838
|
import_ogp_failed: "{href}: リンク先の OGP を取得できない(題名は URL のまま)",
|
|
831
|
-
|
|
839
|
+
import_file_value: "画像は URL の文字列か '{' url, alt '}' か '{' file '}'",
|
|
832
840
|
import_origin_required: "対応表を持つ取り込みでは origin_id が必要",
|
|
833
841
|
import_origin_unresolved: "{path}: 元の ID のレコードが対応表にない(参照先を先に取り込む)",
|
|
834
842
|
import_map_changed: "取り込みの後にレコードが変わった(バージョンが対応表と違う)",
|
|
@@ -844,8 +852,8 @@ const TRANSFER = {
|
|
|
844
852
|
import_closes_in_conflict: "取り出し元の退会だけを当てる予定(ほかは衝突で書かない)",
|
|
845
853
|
import_overwritten: "取り込みの後の変更を、取り出し元の値で上書きした",
|
|
846
854
|
import_overwrite_note: "上書き(overwrite)の顧客がいるときは理由 note が必要",
|
|
847
|
-
|
|
848
|
-
|
|
855
|
+
import_file_not_stored: "同じ内容の画像かファイルが保存されていない",
|
|
856
|
+
import_file_failed: "{reason, select, forbidden {画像とファイルを作成する権限がない} https_required {https の URL だけ} upstream_failed {取得できない} unsupported_image {対応していない画像の形式(PNG・JPEG・GIF・WebP)} unsupported_file {対応していないファイルの形式} file_too_large {大きさの上限を超える} other {取り込めない}}",
|
|
849
857
|
import_phase_unpublishable: "コレクションどうしの循環のステップは編集機能を持つコレクションだけ(1段目を下書きで作るため)"
|
|
850
858
|
};
|
|
851
859
|
/** 取り込みの問題の種類の名前(ImportProblem の code) */
|
|
@@ -932,8 +940,7 @@ const INTEGRATIONS = {
|
|
|
932
940
|
function_budget_exceeded: "操作1回の合計の時間({sec, number}秒)を超過",
|
|
933
941
|
function_not_json: "レスポンスが JSON ではありません",
|
|
934
942
|
function_invalid_shape: "レスポンスの形が不正です",
|
|
935
|
-
function_list_column_failed: "一覧の列のレスポンスを受け取れません(送信の記録に理由)"
|
|
936
|
-
og_missing_chars: "タイトルに OG 画像の書体にない文字: {chars}"
|
|
943
|
+
function_list_column_failed: "一覧の列のレスポンスを受け取れません(送信の記録に理由)"
|
|
937
944
|
};
|
|
938
945
|
/** CMS の API の検査の問題の文 */
|
|
939
946
|
const API_ISSUE_MESSAGES = {
|
|
@@ -951,8 +958,9 @@ const API_ISSUE_MESSAGES = {
|
|
|
951
958
|
...FORMS,
|
|
952
959
|
...INTEGRATIONS
|
|
953
960
|
};
|
|
954
|
-
|
|
955
|
-
|
|
961
|
+
/** CMS の API の検査の問題の既定の形(応答の手前で英語の文になる) */
|
|
962
|
+
const apiIssueText = problemTextFactory(API_ISSUE_MESSAGES);
|
|
963
|
+
// ../contract/src/issueLabelsEn.ts
|
|
956
964
|
/** CMS の API の検査の問題の英語の文 */
|
|
957
965
|
const API_ISSUE_MESSAGES_EN = {
|
|
958
966
|
name_required: "Name is required",
|
|
@@ -961,6 +969,8 @@ const API_ISSUE_MESSAGES_EN = {
|
|
|
961
969
|
slug_chars: "Slug may contain only lowercase letters, digits, hyphens and underscores",
|
|
962
970
|
slug_uuid: "Slug must not be in UUID form",
|
|
963
971
|
url_format: "Invalid URL",
|
|
972
|
+
infra_id: "Invalid ID (26 lowercase letters and digits)",
|
|
973
|
+
infra_id_uuid: "UUID-form IDs are not accepted (26 lowercase letters and digits)",
|
|
964
974
|
https_only: "Only https URLs are allowed",
|
|
965
975
|
body_not_json: "The request body is not JSON",
|
|
966
976
|
email_format: "Invalid email address",
|
|
@@ -968,17 +978,17 @@ const API_ISSUE_MESSAGES_EN = {
|
|
|
968
978
|
link_collection_missing: "Collection {collection} does not exist",
|
|
969
979
|
unknown_environment: "Environment {id} does not exist in this project",
|
|
970
980
|
not_operator: "Not an operator email address",
|
|
971
|
-
invitations_unavailable: "This runtime has no invitation
|
|
981
|
+
invitations_unavailable: "This runtime has no invitation registry",
|
|
972
982
|
app_manifest: "The manifest is malformed",
|
|
973
983
|
app_manifest_detail: "The manifest is malformed ({detail})",
|
|
974
984
|
app_namespace: "The namespace must be 3 to 32 lowercase letters and digits, starting with a letter",
|
|
975
985
|
app_namespace_taken: "This namespace is already taken (namespaces cannot be reused)",
|
|
976
|
-
|
|
986
|
+
app_no_organization: "Apps cannot be registered in a project that is not linked to a organization",
|
|
977
987
|
app_slots: "Choose the collections to embed into (embeds that need a body require a collection with a body field)",
|
|
978
|
-
app_not_installable: "This app cannot be installed (only apps of your own
|
|
979
|
-
|
|
988
|
+
app_not_installable: "This app cannot be installed (only apps of your own organization and reviewed apps)",
|
|
989
|
+
app_no_registration: "Apps cannot be added to this project",
|
|
980
990
|
app_changed: "The app version or capabilities changed after you reviewed them. Review them again",
|
|
981
|
-
app_dependency: "A dependency is
|
|
991
|
+
app_dependency: "A dependency is not a registered app, is not an app, or does not have the referenced setting",
|
|
982
992
|
app_incompatible: "Incompatible change within the same major version. Bump the major version or revert the change",
|
|
983
993
|
app_incompatible_detail: "Incompatible change within the same major version. Bump the major version or revert the change ({detail})",
|
|
984
994
|
app_key_private: "Keys with private parts (such as d) cannot be registered. Send only the public key",
|
|
@@ -1040,6 +1050,8 @@ const API_ISSUE_MESSAGES_EN = {
|
|
|
1040
1050
|
generated_slug: "Slugs in this collection are assigned by the CMS and cannot be specified",
|
|
1041
1051
|
unique_taken: "A record with the same {labels} already exists",
|
|
1042
1052
|
unique_duplicates: "{count, number} records in {collection} share the same {labels} (fix the duplicates before making it unique)",
|
|
1053
|
+
publish_check_unavailable: "No enabled app provides the publish check {check}",
|
|
1054
|
+
capability_missing: "The storage of {collection} lacks the capability {capability} that its declaration needs",
|
|
1043
1055
|
use_at: "{field}{rest, select, none {} other { ({rest})}} of {collection}",
|
|
1044
1056
|
public_in_private_field: "A field for private media only contains public images or files (upload them again from this field)",
|
|
1045
1057
|
trash_record: "record {id} of {collection}",
|
|
@@ -1051,10 +1063,9 @@ const API_ISSUE_MESSAGES_EN = {
|
|
|
1051
1063
|
project_slug_reserved: "This slug is reserved",
|
|
1052
1064
|
project_slug_taken: "Another project in this organization uses this slug",
|
|
1053
1065
|
time_zone_invalid: "Invalid time zone name (e.g. Asia/Tokyo)",
|
|
1054
|
-
|
|
1066
|
+
required_app: "This standard feature cannot be stopped",
|
|
1055
1067
|
unknown_setting_field: "Not a field of the settings page",
|
|
1056
|
-
|
|
1057
|
-
module_invalid_settings: "The settings are invalid.",
|
|
1068
|
+
app_invalid_settings: "The settings are invalid.",
|
|
1058
1069
|
config_corrupt: "Settings in the DB of project {id} are corrupt ({parts}; the values need repair).",
|
|
1059
1070
|
config_missing: "Settings are missing from the DB of project {id} ({parts}; apply the project template).",
|
|
1060
1071
|
setting_text: "Enter text for \"{field}\".",
|
|
@@ -1075,7 +1086,7 @@ const API_ISSUE_MESSAGES_EN = {
|
|
|
1075
1086
|
import_publish_failed: "Left as a draft because it could not be published: {problem}",
|
|
1076
1087
|
import_image_not_url: "{src}: the image reference is not a URL",
|
|
1077
1088
|
import_ogp_failed: "{href}: could not fetch the OGP of the link (the title stays the URL)",
|
|
1078
|
-
|
|
1089
|
+
import_file_value: "Images must be a URL string, '{' url, alt '}' or '{' file '}'",
|
|
1079
1090
|
import_origin_required: "origin_id is required for imports with an import map",
|
|
1080
1091
|
import_origin_unresolved: "{path}: the record of the original ID is not in the import map (import the referenced records first)",
|
|
1081
1092
|
import_map_changed: "The record changed after the import (the version differs from the import map)",
|
|
@@ -1091,12 +1102,12 @@ const API_ISSUE_MESSAGES_EN = {
|
|
|
1091
1102
|
import_closes_in_conflict: "Will apply only the closure from the source (other changes are not written because of the conflict)",
|
|
1092
1103
|
import_overwritten: "Changes after the import were overwritten with the source values",
|
|
1093
1104
|
import_overwrite_note: "A reason note is required when customers are overwritten (overwrite)",
|
|
1094
|
-
|
|
1095
|
-
|
|
1105
|
+
import_file_not_stored: "No stored image or file has the same content",
|
|
1106
|
+
import_file_failed: "{reason, select, forbidden {No permission to create images and files} https_required {Only https URLs are allowed} upstream_failed {Could not fetch it} unsupported_image {Unsupported image format (PNG, JPEG, GIF, WebP)} unsupported_file {Unsupported file format} file_too_large {Exceeds the size limit} other {Cannot be imported}}",
|
|
1096
1107
|
import_phase_unpublishable: "Steps of a cycle between collections require collections with editing (the first step creates drafts)",
|
|
1097
1108
|
integration_event_name: "Invalid event name",
|
|
1098
1109
|
integration_collections_max: "Up to {max, number} collections",
|
|
1099
|
-
api_keys_unavailable: "API key
|
|
1110
|
+
api_keys_unavailable: "API key registry",
|
|
1100
1111
|
hosting_unavailable: "site hosting",
|
|
1101
1112
|
page_has_no_collection: "Menu pages, dashboards, and screens outside app settings have no collection",
|
|
1102
1113
|
only_field_has_field: "Only screens outside field inputs have a field",
|
|
@@ -1113,7 +1124,6 @@ const API_ISSUE_MESSAGES_EN = {
|
|
|
1113
1124
|
function_not_json: "The response is not JSON",
|
|
1114
1125
|
function_invalid_shape: "The response has an invalid shape",
|
|
1115
1126
|
function_list_column_failed: "Could not receive the list column response (see the delivery log for the reason)",
|
|
1116
|
-
og_missing_chars: "The title has characters missing from the OG image font: {chars}",
|
|
1117
1127
|
import_kind_unknown_collection: "Collection cannot be imported",
|
|
1118
1128
|
import_kind_forbidden: "No permission to create",
|
|
1119
1129
|
import_kind_invalid_id: "Invalid ID",
|
|
@@ -1170,23 +1180,23 @@ const API_ISSUE_MESSAGES_EN = {
|
|
|
1170
1180
|
form_too_few: "At least {min, number} choices",
|
|
1171
1181
|
form_unknown_form: "Unknown form name"
|
|
1172
1182
|
};
|
|
1173
|
-
// ../
|
|
1183
|
+
// ../contract/src/problems.ts
|
|
1174
1184
|
const PROBLEM_MESSAGES = {
|
|
1175
1185
|
...BODY_PROBLEM_MESSAGES,
|
|
1176
|
-
...
|
|
1186
|
+
...SCHEMA_PROBLEM_MESSAGES,
|
|
1177
1187
|
...API_ISSUE_MESSAGES
|
|
1178
1188
|
};
|
|
1179
1189
|
const PROBLEM_MESSAGES_EN = {
|
|
1180
1190
|
...BODY_PROBLEM_MESSAGES_EN,
|
|
1181
|
-
...
|
|
1191
|
+
...SCHEMA_PROBLEM_MESSAGES_EN,
|
|
1182
1192
|
...API_ISSUE_MESSAGES_EN
|
|
1183
1193
|
};
|
|
1184
|
-
/** 既定の形を日本語の文に(問題でない文はそのまま、差し込みの中の問題も文に。extra
|
|
1194
|
+
/** 既定の形を日本語の文に(問題でない文はそのまま、差し込みの中の問題も文に。extra はアプリの表) */
|
|
1185
1195
|
const problemLabel = (text, extra = {}) => problemMessage(text, {
|
|
1186
1196
|
...extra,
|
|
1187
1197
|
...PROBLEM_MESSAGES
|
|
1188
1198
|
});
|
|
1189
|
-
/** 既定の形を英語の文に(問題でない文はそのまま。extra
|
|
1199
|
+
/** 既定の形を英語の文に(問題でない文はそのまま。extra はアプリの英語の表) */
|
|
1190
1200
|
const problemEnglish = (text, extra = {}) => problemMessage(text, {
|
|
1191
1201
|
...extra,
|
|
1192
1202
|
...PROBLEM_MESSAGES_EN
|
|
@@ -1197,7 +1207,7 @@ const hasParams = (message, params = {}) => [...message.matchAll(ARGUMENT)].ever
|
|
|
1197
1207
|
/**
|
|
1198
1208
|
* コードと差し込みを持つ結果の画面の文(issues、スキーマの変更、取り込みの問題)
|
|
1199
1209
|
* - コードが表にあり差し込みがそろえば表の文、ほかは message(既定の形なら表の文)
|
|
1200
|
-
* - extra:
|
|
1210
|
+
* - extra: アプリの表(コードは `<id>_` で始まり、コアの表と重ならない)
|
|
1201
1211
|
*/
|
|
1202
1212
|
function issueLabel(issue, extra = {}) {
|
|
1203
1213
|
const messages = {
|
|
@@ -1215,31 +1225,32 @@ const importProblemLabel = (p, extra = {}) => issueLabel({
|
|
|
1215
1225
|
...p.problem !== void 0 && { code: p.problem },
|
|
1216
1226
|
...p.params && { params: p.params }
|
|
1217
1227
|
}, extra);
|
|
1218
|
-
/**
|
|
1228
|
+
/** アプリの文言の表の誤り(問題のコードの接頭辞 `<id>_`(id の `-` は `_`)、コアの問題の表との重なり、英語の表のキーの過不足) */
|
|
1219
1229
|
function labelTableProblems(tables) {
|
|
1220
1230
|
const keys = (table) => Object.keys(table ?? {}).sort().join(",");
|
|
1221
1231
|
const codes = Object.keys(tables.problems ?? {});
|
|
1232
|
+
const prefix = `${tables.id.replaceAll("-", "_")}_`;
|
|
1222
1233
|
return [
|
|
1223
|
-
...codes.filter((code) => !code.startsWith(
|
|
1234
|
+
...codes.filter((code) => !code.startsWith(prefix)).map((code) => `problem ${code} must start with ${prefix}`),
|
|
1224
1235
|
...codes.filter((code) => Object.hasOwn(PROBLEM_MESSAGES, code)).map((code) => `problem ${code} conflicts with a core problem`),
|
|
1225
1236
|
...keys(tables.targets) === keys(tables.en?.targets) ? [] : ["en.targets keys differ from targets"],
|
|
1226
1237
|
...keys(tables.problems) === keys(tables.en?.problems) ? [] : ["en.problems keys differ from problems"]
|
|
1227
1238
|
];
|
|
1228
1239
|
}
|
|
1229
|
-
// ../
|
|
1240
|
+
// ../contract/src/errorLabels.ts
|
|
1230
1241
|
const ERROR_MESSAGES = {
|
|
1231
|
-
/**
|
|
1242
|
+
/** コアの対象の表示名(エラーの文と操作の履歴で共通、アプリの対象は AppDefinition の targets) */
|
|
1232
1243
|
targets: {
|
|
1233
1244
|
request: "作成の依頼",
|
|
1234
1245
|
role: "ロール",
|
|
1235
|
-
|
|
1246
|
+
files: "ファイル",
|
|
1236
1247
|
record: "マスタ",
|
|
1237
|
-
|
|
1248
|
+
file: "画像",
|
|
1238
1249
|
mcp: "MCP",
|
|
1239
1250
|
version: "バージョン",
|
|
1240
1251
|
profile: "プロフィール",
|
|
1241
1252
|
portrait: "顔の画像",
|
|
1242
|
-
|
|
1253
|
+
standard_app: "標準の機能",
|
|
1243
1254
|
account: "アカウント",
|
|
1244
1255
|
comment: "コメント",
|
|
1245
1256
|
view: "ビュー",
|
|
@@ -1260,12 +1271,13 @@ const ERROR_MESSAGES = {
|
|
|
1260
1271
|
/** コードごとの文 */
|
|
1261
1272
|
codes: {
|
|
1262
1273
|
invalid_input: "入力に誤りがあります。内容を確かめて直してください。",
|
|
1274
|
+
infra_id_uuid: "ID の形が違います。UUID ではなく、英小文字と数字の26文字の ID を指定してください。",
|
|
1263
1275
|
submit_unmet: "レビューを依頼する条件を満たしていません。各フィールドの理由を確かめて直してください。",
|
|
1264
1276
|
publish_unmet: "公開の条件を満たしていません。各フィールドの理由を確かめて直してください。",
|
|
1265
1277
|
save_unmet: "保存の条件を満たしていません。各フィールドの理由を確かめて直してください。",
|
|
1266
1278
|
version_required: "元にしたバージョン(version)が必要です。画面を読み込み直してから、もう一度保存してください。",
|
|
1267
1279
|
file_required: "画像のファイルを選んでください。",
|
|
1268
|
-
file_too_large: "画像は{
|
|
1280
|
+
file_too_large: "画像は{fileMaxMB, number}MBまでです。",
|
|
1269
1281
|
unsupported_image: "対応していない画像の形式です(PNG・JPEG・GIF・WebP)。",
|
|
1270
1282
|
unsupported_file: "対応していないファイルの形式です(PDF・ZIP・テキスト・CSV・Word・Excel・PowerPoint)。",
|
|
1271
1283
|
invalid_dimensions: "画像の寸法を読み取れません。別の画像を選んでください。",
|
|
@@ -1288,7 +1300,7 @@ const ERROR_MESSAGES = {
|
|
|
1288
1300
|
admin_only: "管理者だけの操作です。必要なときは、管理者に依頼してください。",
|
|
1289
1301
|
operator_read_only: "サポートのアクセスの許可が閲覧だけのため、変更できません。変更が要るときは、プロジェクトの管理者に許可の範囲の変更を依頼してください。",
|
|
1290
1302
|
not_trial: "検証用のフラグのプロジェクトだけの操作です。",
|
|
1291
|
-
not_live: "
|
|
1303
|
+
not_live: "本番の環境だけでできる操作です。本番の環境のワークスペースから操作してください。",
|
|
1292
1304
|
operator_closed: "サポートのアクセスでは変更できない操作です(アカウント、ロール、連携、アプリ、顧客の ID、許可など)。プロジェクトの管理者に依頼してください。",
|
|
1293
1305
|
forbidden: "{target, select, none {この操作の権限がありません。} other {{target}のこの操作の権限がありません。}}必要なときは、管理者にロールの見直しを依頼してください。",
|
|
1294
1306
|
editorial_only: "{target, select, none {対象} other {{target}}}は、公開の権限があるアカウントだけが作成できます。公開の権限があるメンバーに作成を依頼してください。",
|
|
@@ -1302,7 +1314,7 @@ const ERROR_MESSAGES = {
|
|
|
1302
1314
|
method_not_allowed: "この経路はこのメソッドを受け付けません。",
|
|
1303
1315
|
customer_not_linked: "このアカウントに結び付く顧客がいません。管理者に、顧客とアカウントの結び付けを依頼してください。",
|
|
1304
1316
|
customer_pending: "このアカウントの結び付けは、運営の確認の後に使えます。確認が終わるまでお待ちください。",
|
|
1305
|
-
in_use: "{by, select, uses {{count, number}件で使用中のため、削除できません。} places {{count, number}か所で使用中のため、削除できません。} outputs {{count, number}件の企画の成果物で使用中のため、削除できません。} record {{name, select, none {ほかの内容} other {{name}}}で使用中のため、削除できません。} writers {{count, number}件のレコードに結び付いているため、削除できません。} customers {{count, number}件のレコードが所属しているため、削除できません。} accounts {{count, number}件のアカウントがこのロールのため、削除できません。}
|
|
1317
|
+
in_use: "{by, select, uses {{count, number}件で使用中のため、削除できません。} places {{count, number}か所で使用中のため、削除できません。} outputs {{count, number}件の企画の成果物で使用中のため、削除できません。} record {{name, select, none {ほかの内容} other {{name}}}で使用中のため、削除できません。} writers {{count, number}件のレコードに結び付いているため、削除できません。} customers {{count, number}件のレコードが所属しているため、削除できません。} accounts {{count, number}件のアカウントがこのロールのため、削除できません。} app {{count, number}件の{name, select, none {アプリのデータ} other {{name}}}から参照されているため、削除できません。} other {使用中のため、削除できません。}}使っている所から外してから、もう一度削除してください。",
|
|
1306
1318
|
duplicate_name: "同じ名前がすでにあります。別の名前を付けてください。",
|
|
1307
1319
|
duplicate_email: "同じメールアドレスのアカウントがすでにあります。一覧のそのアカウントを編集してください。",
|
|
1308
1320
|
duplicate_id: "この ID はすでに使用されています。別の ID を指定してください。",
|
|
@@ -1352,13 +1364,13 @@ const ERROR_MESSAGES = {
|
|
|
1352
1364
|
installation_state: "今のインストールの状態ではこの操作はできません。画面を読み込み直して、状態を確かめてください。",
|
|
1353
1365
|
site_deploy: "今はサイトを上げられません。ほかのアップロードの最中か、サイトが止められているか外されています。少し待ってから上げ直し、続くときは運営者に連絡してください。",
|
|
1354
1366
|
site_stopped_by_check: "上げた直後の確認で外れたため、サイトを止めました。直したものを上げた後、運営者に戻してもらってください。",
|
|
1355
|
-
|
|
1367
|
+
required_app: "止められない標準の機能は、停止もアンインストールもできません。",
|
|
1356
1368
|
app_installed: "アプリは1つのプロジェクトに1つだけインストールできます。",
|
|
1357
1369
|
app_dependencies: "依存のアプリをそろえられません。アプリの詳細で、足りないアプリと合わないアプリを確かめてください。",
|
|
1358
1370
|
app_reinstalled: "同じアプリを入れ直したインストールがあるため、古いインストールのデータは消せません。",
|
|
1359
1371
|
app_managed: "アプリのインストールが管理する登録です。変更はアプリの新しいバージョンの同意で行います。",
|
|
1360
1372
|
request_key_reused: "同じ重複を除くキーで、別の人かチャネルか目的の記録がすでにあります。別のキーで送ってください。",
|
|
1361
|
-
|
|
1373
|
+
no_organization: "組織に属していないプロジェクトのため、招待できません。運営者に組織への所属を頼んでください。",
|
|
1362
1374
|
schema_changed: "スキーマが変更されたため、保存できませんでした。画面を読み込み直してください。",
|
|
1363
1375
|
customer_inactive: "この顧客は停止中か退会済みのため、操作できません。顧客の画面で状態を確かめてください。",
|
|
1364
1376
|
self_limit: "1人あたりのレコードの数の上限に達しています。不要なレコードを削除してから作成してください。",
|
|
@@ -1373,7 +1385,7 @@ const ERROR_MESSAGES = {
|
|
|
1373
1385
|
not_frozen: "本番の書き込みは止まっていません。",
|
|
1374
1386
|
approval_running: "承認した操作の実行中です。少し待ってからやり直してください。"
|
|
1375
1387
|
},
|
|
1376
|
-
/** own_only
|
|
1388
|
+
/** own_only の対象ごとの文(アプリの文は manifest の messages) */
|
|
1377
1389
|
own: {
|
|
1378
1390
|
profile: "自分のプロフィールだけを編集できます。",
|
|
1379
1391
|
portrait: "自分の顔の画像だけを変更できます。"
|
|
@@ -1385,6 +1397,7 @@ const ERROR_MESSAGES = {
|
|
|
1385
1397
|
/** コードごとの見出し */
|
|
1386
1398
|
titles: {
|
|
1387
1399
|
invalid_input: "入力エラー",
|
|
1400
|
+
infra_id_uuid: "入力エラー",
|
|
1388
1401
|
submit_unmet: "レビューを依頼できません",
|
|
1389
1402
|
publish_unmet: "公開できません",
|
|
1390
1403
|
save_unmet: "保存できません",
|
|
@@ -1474,31 +1487,31 @@ function argsOf(code, p, targets, problems, locale) {
|
|
|
1474
1487
|
reason: p.reason ?? NONE,
|
|
1475
1488
|
resource: p.resource ?? NONE,
|
|
1476
1489
|
scope: p.scope?.replaceAll(/\W/g, "_") ?? NONE,
|
|
1477
|
-
|
|
1490
|
+
fileMaxMB: FILE_SIZE_MAX / 1024 / 1024,
|
|
1478
1491
|
bodyMaxMB: JSON_BODY_MAX / 1024 / 1024
|
|
1479
1492
|
};
|
|
1480
1493
|
}
|
|
1481
|
-
/**
|
|
1494
|
+
/** コードと値から使う文(アプリの文、対象ごとの文、理由ごとの文、コードの文の順) */
|
|
1482
1495
|
function messageOf(code, p, messages, catalog) {
|
|
1483
1496
|
if (code === "own_only") return p.target && messages.own?.[p.target] || (has(catalog.own, p.target) ? catalog.own[p.target] : catalog.codes.own_only);
|
|
1484
1497
|
if (code === "no_linked_record") return p.target && messages.noLink?.[p.target] || (has(catalog.noLink, p.target) ? catalog.noLink[p.target] : catalog.codes.no_linked_record);
|
|
1485
1498
|
if (code === "invalid_state" && has(catalog.states, p.reason)) return catalog.states[p.reason];
|
|
1486
1499
|
return catalog.codes[code];
|
|
1487
1500
|
}
|
|
1488
|
-
/** エラーの画面の文(targets は対象の表示名、messages
|
|
1501
|
+
/** エラーの画面の文(targets は対象の表示名、messages は対象ごとの文の追加、画面はアプリの対象と文とコレクションの表示名を含めた表。problems は name に入る問題の文) */
|
|
1489
1502
|
function errorLabel(code, params = {}, targets = TARGET_LABELS, messages = {}, catalog = ERROR_MESSAGES, problems = PROBLEM_MESSAGES, locale) {
|
|
1490
1503
|
const args = argsOf(code, params, targets, problems, locale);
|
|
1491
1504
|
if (code === "no_linked_record" && params.name === void 0) args.name = catalog.linkedRecord;
|
|
1492
1505
|
return formatMessage(messageOf(code, params, messages, catalog), args, locale);
|
|
1493
1506
|
}
|
|
1494
|
-
/** 応答のエラーの英語の文(targets
|
|
1507
|
+
/** 応答のエラーの英語の文(targets はコレクションの表示名、コアの対象は英語の表、アプリの対象と文は使わない) */
|
|
1495
1508
|
const errorText = (code, params = {}, targets = {}) => errorLabel(code, params, {
|
|
1496
1509
|
...targets,
|
|
1497
1510
|
...ERROR_MESSAGES_EN.targets
|
|
1498
1511
|
}, {}, ERROR_MESSAGES_EN, PROBLEM_MESSAGES_EN, "en");
|
|
1499
1512
|
/** 応答のエラーの文をカタログから作る(対象の表示名はカタログの表、ほかの言語の画面とアプリ向け) */
|
|
1500
1513
|
const errorMessageOf = (error, catalog = ERROR_MESSAGES) => errorLabel(error.code, error.params, catalog.targets, {}, catalog);
|
|
1501
|
-
/** プロジェクトの文脈の外(受け皿の Worker
|
|
1514
|
+
/** プロジェクトの文脈の外(受け皿の Worker・レジストリ・アプリ)のエラーの本文(requestId は要求の x-request-id、message は英語の文) */
|
|
1502
1515
|
const errorBodyFor = (code, requestId, params) => ({
|
|
1503
1516
|
code,
|
|
1504
1517
|
message: errorText(code, params),
|
|
@@ -1507,4 +1520,4 @@ const errorBodyFor = (code, requestId, params) => ({
|
|
|
1507
1520
|
});
|
|
1508
1521
|
/** エラーのトーストの見出し(項目ごとの理由がすべて未入力なら必須項目のエラー、スキーマの文は「〜が未入力」で統一) */
|
|
1509
1522
|
const errorTitle = (code, issues = [], catalog = ERROR_MESSAGES) => code === "invalid_input" && issues.length > 0 && issues.every((i) => i.message.endsWith("未入力")) ? catalog.requiredTitle : catalog.titles[code];
|
|
1510
|
-
export {
|
|
1523
|
+
export { JSON_BODY_MAX as _, errorTitle as a, SCHEMA_PROBLEM_MESSAGES_EN as b, importProblemLabel as c, problemEnglish as d, problemLabel as f, ERROR_STATUS as g, apiIssueText as h, errorText as i, issueLabel as l, API_ISSUE_MESSAGES as m, errorBodyFor as n, PROBLEM_MESSAGES as o, API_ISSUE_MESSAGES_EN as p, errorMessageOf as r, PROBLEM_MESSAGES_EN as s, ERROR_MESSAGES as t, labelTableProblems as u, ERROR_MESSAGES_EN as v, BODY_PROBLEM_MESSAGES_EN as y };
|