@tunasand/sdk 0.7.0 → 0.11.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 +233 -88
- package/README.md +296 -273
- package/dist/analytics.js +657 -10
- package/dist/app.js +323 -96
- package/dist/apps-DIxAWBSZ.js +318 -0
- package/dist/astro-image.d.ts +1 -0
- package/dist/astro-image.js +33 -0
- package/dist/astro-server-Bwau8F6d.js +99 -0
- package/dist/astro-server.d.ts +1 -0
- package/dist/astro-server.js +1 -0
- package/dist/astro.d.ts +1 -0
- package/dist/astro.js +306 -0
- package/dist/bridge-Dv4NxGZ7.js +81 -0
- package/dist/bridge.js +2 -14
- package/dist/build-file-DNi0PHC5.js +31 -0
- package/dist/cli.js +6214 -9
- package/dist/{client-Derrexwr.js → client-C8STAw9T.js} +43 -24
- package/dist/code-N8pBUDbq.js +30 -0
- package/dist/code.d.ts +1 -0
- package/dist/code.js +1 -0
- package/dist/collection-nUz1RetA.js +264 -0
- package/dist/{declared-C_GvPiGF.js → declared-CE4a61qb.js} +124 -36
- package/dist/delivery.js +124 -132
- package/dist/dev-operations-Tutwi1On.js +46 -0
- package/dist/dev.js +9 -16
- package/dist/embeds-B-Dbn64k.js +29 -0
- package/dist/end-users.d.ts +1 -0
- package/dist/end-users.js +185 -0
- package/dist/{customers-C_vJY2_v.js → endUsers-DODfjnv1.js} +31 -38
- package/dist/{errorLabels-CPKiPabZ.js → errorLabels-aT2bnMsO.js} +593 -460
- package/dist/i18n.js +4 -4
- package/dist/ids-DmtIoqBX.js +109 -0
- package/dist/integrations.js +95 -49
- package/dist/{ja-C6lX0CeJ.js → ja-CrY_72Tn.js} +99 -54
- package/dist/{ja-C1HEWWTQ.js → ja-axQPxMJ-.js} +6 -6
- package/dist/operations-CIB99rIY.js +95 -0
- package/dist/operations.d.ts +1 -0
- package/dist/operations.js +1 -0
- package/dist/{page-E_cYgZx-.js → page-yo1cw1kW.js} +5 -5
- package/dist/preview.js +8 -1
- package/dist/{profile-D6t1QMQh.js → profile-DBsXLvvI.js} +52 -52
- package/dist/rich-text.d.ts +1 -0
- package/dist/{body.js → rich-text.js} +20 -21
- package/dist/schema-Dcg1ajnW.js +1267 -0
- package/dist/schema.js +324 -1
- package/dist/types/access/src/handoff.d.ts +22 -17
- package/dist/types/access/src/index.d.ts +2 -2
- package/dist/types/access/src/jws.d.ts +41 -0
- package/dist/types/access/src/jwt.d.ts +1 -1
- package/dist/types/access/src/oidc.d.ts +11 -3
- package/dist/types/access/src/signed.d.ts +0 -2
- package/dist/types/adapter-cloudflare/src/eventLog/viewSchema.d.ts +11 -0
- package/dist/types/contract/src/accountProfile.d.ts +7 -0
- package/dist/types/{cms-contract → contract}/src/apiKeys.d.ts +7 -3
- package/dist/types/contract/src/app.d.ts +38 -0
- package/dist/types/contract/src/appChannels.d.ts +114 -0
- package/dist/types/contract/src/appDefinition.d.ts +133 -0
- package/dist/types/{cms-contract → contract}/src/appDependencies.d.ts +91 -35
- package/dist/types/contract/src/appIdentities.d.ts +21 -0
- package/dist/types/contract/src/appInbound.d.ts +28 -0
- package/dist/types/contract/src/appMail.d.ts +106 -0
- package/dist/types/contract/src/appSecrets.d.ts +45 -0
- package/dist/types/contract/src/appServer.d.ts +501 -0
- package/dist/types/contract/src/approvalLabels.d.ts +26 -0
- package/dist/types/contract/src/approvals.d.ts +63 -0
- package/dist/types/contract/src/apps.d.ts +295 -0
- package/dist/types/contract/src/auditActions.d.ts +18 -0
- package/dist/types/contract/src/auditLabels.d.ts +223 -0
- package/dist/types/contract/src/authorize.d.ts +133 -0
- package/dist/types/{cms-contract → contract}/src/bridge.d.ts +39 -40
- package/dist/types/{cms-contract → contract}/src/consents.d.ts +32 -25
- package/dist/types/contract/src/deletion.d.ts +18 -0
- package/dist/types/contract/src/embeds.d.ts +105 -0
- package/dist/types/{cms-contract/src/customerLabels.d.ts → contract/src/endUserLabels.d.ts} +6 -9
- package/dist/types/contract/src/endUsers.d.ts +241 -0
- package/dist/types/{cms-contract → contract}/src/errorLabels.d.ts +76 -47
- package/dist/types/{cms-contract → contract}/src/errorLabelsEn.d.ts +52 -36
- package/dist/types/contract/src/errors.d.ts +117 -0
- package/dist/types/contract/src/eventSchemas.d.ts +70 -0
- package/dist/types/contract/src/eventTraces.d.ts +43 -0
- package/dist/types/{cms-contract → contract}/src/failureStatus.d.ts +16 -23
- 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/contract/src/formLabels.d.ts +3 -0
- package/dist/types/contract/src/forms.d.ts +4 -0
- package/dist/types/{cms-contract → contract}/src/functions.d.ts +3 -3
- package/dist/types/contract/src/grants.d.ts +26 -0
- package/dist/types/contract/src/headers.d.ts +5 -0
- package/dist/types/contract/src/hostingRpc.d.ts +149 -0
- package/dist/types/contract/src/hostnames.d.ts +30 -0
- package/dist/types/contract/src/identifiers.d.ts +148 -0
- package/dist/types/contract/src/ids.d.ts +112 -0
- package/dist/types/{cms-contract → contract}/src/import.d.ts +20 -19
- package/dist/types/contract/src/importLabels.d.ts +3 -0
- package/dist/types/contract/src/index.d.ts +92 -0
- package/dist/types/contract/src/integrationGraph.d.ts +83 -0
- package/dist/types/{cms-contract → contract}/src/issueLabels.d.ts +135 -99
- package/dist/types/{cms-contract → contract}/src/issueLabelsEn.d.ts +70 -52
- 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 +51 -0
- package/dist/types/contract/src/manageLabels.d.ts +11 -0
- package/dist/types/contract/src/manifestText.d.ts +66 -0
- package/dist/types/contract/src/mcpAuth.d.ts +139 -0
- package/dist/types/contract/src/mcpLabels.d.ts +5 -0
- package/dist/types/contract/src/messagePort.d.ts +208 -0
- package/dist/types/{cms-contract → contract}/src/migration.d.ts +3 -3
- package/dist/types/contract/src/notices.d.ts +38 -0
- package/dist/types/contract/src/operatorOperations.d.ts +640 -0
- package/dist/types/contract/src/operators.d.ts +33 -0
- package/dist/types/contract/src/outbound.d.ts +29 -0
- package/dist/types/contract/src/paths.d.ts +34 -0
- package/dist/types/contract/src/pending.d.ts +6 -0
- package/dist/types/{cms-contract → contract}/src/permissions.d.ts +9 -11
- package/dist/types/contract/src/perspective.d.ts +26 -0
- package/dist/types/contract/src/powers.d.ts +5 -0
- package/dist/types/contract/src/principal.d.ts +181 -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/contract/src/recordLabels.d.ts +6 -0
- package/dist/types/{cms-contract → contract}/src/roles.d.ts +10 -6
- package/dist/types/contract/src/ruleLabels.d.ts +16 -0
- package/dist/types/contract/src/ruleProblems.d.ts +16 -0
- package/dist/types/contract/src/schemaLabels.d.ts +8 -0
- package/dist/types/{cms-contract → contract}/src/settingProblems.d.ts +3 -3
- package/dist/types/{cms-contract → contract}/src/settings.d.ts +6 -8
- package/dist/types/contract/src/settingsLabels.d.ts +3 -0
- package/dist/types/{cms-contract → contract}/src/siteDeclaration.d.ts +7 -7
- package/dist/types/contract/src/siteIndex.d.ts +76 -0
- package/dist/types/contract/src/slugs.d.ts +6 -0
- package/dist/types/{cms-contract → contract}/src/transfer.d.ts +4 -4
- package/dist/types/contract/src/trial.d.ts +13 -0
- package/dist/types/contract/src/versions.d.ts +7 -0
- package/dist/types/{analytics/src/view.d.ts → contract/src/viewEvent.d.ts} +0 -9
- package/dist/types/contract/src/webhooks.d.ts +135 -0
- package/dist/types/contract/src/workflow.d.ts +43 -0
- package/dist/types/contract/src/workspaceItems.d.ts +87 -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/html.d.ts +1 -1
- package/dist/types/{body → rich-text}/src/index.d.ts +8 -7
- package/dist/types/{body → rich-text}/src/labels/en.d.ts +1 -1
- package/dist/types/{body → rich-text}/src/labels/ja.d.ts +4 -4
- package/dist/types/{body → rich-text}/src/library.d.ts +1 -1
- package/dist/types/rich-text/src/media.d.ts +2 -0
- package/dist/types/{body → rich-text}/src/normalize.d.ts +1 -1
- package/dist/types/{body → rich-text}/src/problems.d.ts +5 -5
- package/dist/types/{body → rich-text}/src/profile.d.ts +11 -11
- package/dist/types/{body → rich-text}/src/render.d.ts +1 -1
- package/dist/types/{body → rich-text}/src/schema.d.ts +2 -2
- package/dist/types/{body → rich-text}/src/standard.d.ts +4 -4
- package/dist/types/{body → rich-text}/src/types.d.ts +2 -2
- package/dist/types/schema/src/audience.d.ts +36 -0
- package/dist/types/schema/src/brand.d.ts +5 -0
- package/dist/types/schema/src/capabilities.d.ts +19 -0
- package/dist/types/{model → schema}/src/changes.d.ts +9 -7
- package/dist/types/{model → schema}/src/check.d.ts +2 -2
- package/dist/types/{model/src/model.d.ts → schema/src/collection.d.ts} +150 -121
- package/dist/types/schema/src/defaultSchema.d.ts +15 -0
- package/dist/types/schema/src/fieldIds.d.ts +18 -0
- package/dist/types/{model/src/asset.d.ts → schema/src/file.d.ts} +36 -25
- package/dist/types/schema/src/fileRefs.d.ts +14 -0
- package/dist/types/schema/src/fileSignature.d.ts +20 -0
- package/dist/types/schema/src/filesCollection.d.ts +7 -0
- package/dist/types/schema/src/forms.d.ts +43 -0
- package/dist/types/{model → schema}/src/image.d.ts +3 -3
- package/dist/types/schema/src/imageMetadata.d.ts +9 -0
- package/dist/types/schema/src/index.d.ts +35 -0
- package/dist/types/{model → schema}/src/input.d.ts +3 -3
- package/dist/types/{model → schema}/src/integrity.d.ts +9 -8
- package/dist/types/schema/src/kinds.d.ts +26 -0
- package/dist/types/{model → schema}/src/labels/en.d.ts +93 -51
- package/dist/types/{model → schema}/src/labels/ja.d.ts +97 -52
- package/dist/types/schema/src/mediaUrl.d.ts +60 -0
- package/dist/types/{model → schema}/src/page.d.ts +6 -6
- package/dist/types/{model → schema}/src/problems.d.ts +95 -53
- package/dist/types/{model → schema}/src/refs.d.ts +1 -10
- package/dist/types/{model → schema}/src/rules.d.ts +2 -2
- package/dist/types/{model → schema}/src/schema.d.ts +25 -20
- package/dist/types/schema/src/selfOps.d.ts +31 -0
- package/dist/types/{model/src/capabilities.d.ts → schema/src/traits.d.ts} +6 -6
- package/dist/types/schema/src/typesSource.d.ts +16 -0
- package/dist/types/{model → schema}/src/values.d.ts +7 -4
- package/dist/types/schema/src/widening.d.ts +3 -0
- package/dist/types/sdk/src/analytics.d.ts +3 -2
- package/dist/types/sdk/src/app.d.ts +70 -16
- package/dist/types/sdk/src/astro-image.d.ts +19 -0
- package/dist/types/sdk/src/astro-response.d.ts +6 -0
- package/dist/types/sdk/src/astro-server.d.ts +16 -0
- package/dist/types/sdk/src/astro.d.ts +19 -0
- package/dist/types/sdk/src/bridge.d.ts +13 -15
- package/dist/types/sdk/src/code.d.ts +61 -0
- package/dist/types/sdk/src/delegation.d.ts +49 -0
- package/dist/types/sdk/src/delivery/changes.d.ts +4 -4
- package/dist/types/sdk/src/delivery/client.d.ts +40 -28
- package/dist/types/sdk/src/delivery/fields.d.ts +5 -5
- package/dist/types/sdk/src/delivery/index.d.ts +3 -3
- package/dist/types/sdk/src/delivery/media.d.ts +8 -11
- package/dist/types/sdk/src/delivery/query.d.ts +16 -12
- package/dist/types/sdk/src/delivery/schema.d.ts +5 -5
- package/dist/types/sdk/src/delivery/values.d.ts +16 -20
- package/dist/types/sdk/src/delivery.d.ts +3 -3
- package/dist/types/sdk/src/dev-operations.d.ts +20 -0
- package/dist/types/sdk/src/dev.d.ts +6 -5
- package/dist/types/sdk/src/end-users.d.ts +190 -0
- package/dist/types/sdk/src/i18n.d.ts +11 -11
- package/dist/types/sdk/src/integrations.d.ts +20 -27
- package/dist/types/sdk/src/operations.d.ts +17 -0
- package/dist/types/sdk/src/preview.d.ts +2 -1
- package/dist/types/sdk/src/rich-text.d.ts +2 -0
- package/dist/types/sdk/src/schema.d.ts +5 -21
- package/dist/types/sdk/src/site/artifact.d.ts +64 -0
- package/dist/types/sdk/src/site/build-file.d.ts +30 -0
- package/dist/types/sdk/src/site/check-code.d.ts +14 -0
- package/dist/types/sdk/src/site/check-text.d.ts +19 -0
- package/dist/types/sdk/src/site/cli.d.ts +52 -0
- package/dist/types/sdk/src/site/content-type.d.ts +2 -0
- package/dist/types/sdk/src/site/labels.d.ts +14 -0
- package/dist/types/sdk/src/site.d.ts +1 -1
- package/dist/types/sdk/src/types.d.ts +21 -0
- package/dist/{schema-BPHL7Qr-.js → types-DkO2N7u2.js} +9 -9
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/dist/typesSource-VJIxtN9b.js +136 -0
- package/dist/workflow-CUpl6hO_.js +148 -0
- package/package.json +42 -16
- package/dist/apps-9u4XMi7E.js +0 -114
- package/dist/body.d.ts +0 -1
- package/dist/bridge-DYAYGV7t.js +0 -74
- package/dist/customers.d.ts +0 -1
- package/dist/customers.js +0 -185
- package/dist/embed-R-OvDYAw.js +0 -90
- package/dist/model-pmXzGX12.js +0 -152
- package/dist/model.d.ts +0 -1
- package/dist/model.js +0 -345
- package/dist/schema-UQJWRyfJ.js +0 -995
- package/dist/src-sazhzYui.js +0 -71
- 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/app.d.ts +0 -35
- package/dist/types/cms-contract/src/apps.d.ts +0 -195
- package/dist/types/cms-contract/src/authorize.d.ts +0 -146
- package/dist/types/cms-contract/src/customers.d.ts +0 -266
- package/dist/types/cms-contract/src/embeds.d.ts +0 -165
- package/dist/types/cms-contract/src/errors.d.ts +0 -105
- package/dist/types/cms-contract/src/identifiers.d.ts +0 -117
- package/dist/types/cms-contract/src/paths.d.ts +0 -23
- package/dist/types/cms-contract/src/urlLabel.d.ts +0 -13
- package/dist/types/cms-contract/src/webhooks.d.ts +0 -139
- package/dist/types/model/src/audience.d.ts +0 -38
- package/dist/types/model/src/brand.d.ts +0 -25
- package/dist/types/model/src/index.d.ts +0 -26
- package/dist/types/model/src/legacy.d.ts +0 -2
- package/dist/types/model/src/media.d.ts +0 -5
- package/dist/types/model/src/mediaUrl.d.ts +0 -67
- package/dist/types/model/src/selfOps.d.ts +0 -30
- package/dist/types/model/src/typesSource.d.ts +0 -8
- package/dist/types/platform/src/defaultModel.d.ts +0 -8
- package/dist/types/sdk/src/body.d.ts +0 -2
- package/dist/types/sdk/src/customers.d.ts +0 -190
- package/dist/types/sdk/src/model.d.ts +0 -5
- package/dist/typesSource-bO0jFw1I.js +0 -88
- /package/dist/types/{cms-contract → contract}/src/appProblems.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/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/inline.d.ts +0 -0
- /package/dist/types/{body → rich-text}/src/markdown.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
|
@@ -3,14 +3,14 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
3
3
|
readonly targets: {
|
|
4
4
|
readonly request: "creation request";
|
|
5
5
|
readonly role: "role";
|
|
6
|
-
readonly
|
|
6
|
+
readonly files: "file";
|
|
7
7
|
readonly record: "master";
|
|
8
|
-
readonly
|
|
8
|
+
readonly file: "image";
|
|
9
9
|
readonly mcp: "MCP";
|
|
10
10
|
readonly version: "version";
|
|
11
11
|
readonly profile: "profile";
|
|
12
12
|
readonly portrait: "portrait";
|
|
13
|
-
readonly
|
|
13
|
+
readonly standard_app: "standard feature";
|
|
14
14
|
readonly account: "account";
|
|
15
15
|
readonly comment: "comment";
|
|
16
16
|
readonly view: "view";
|
|
@@ -18,11 +18,14 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
18
18
|
readonly external_function: "external function";
|
|
19
19
|
readonly external_screen: "external screen";
|
|
20
20
|
readonly api_key: "API key";
|
|
21
|
-
readonly
|
|
21
|
+
readonly read_token: "read token";
|
|
22
|
+
readonly mail_domain: "sending domain";
|
|
23
|
+
readonly channel: "channel";
|
|
24
|
+
readonly channel_address: "channel address";
|
|
22
25
|
readonly trash: "trash";
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
+
readonly end_user: "end user";
|
|
27
|
+
readonly end_user_identity: "end user identity";
|
|
28
|
+
readonly entitlement: "end user entitlement";
|
|
26
29
|
readonly app: "app";
|
|
27
30
|
readonly installation: "installation";
|
|
28
31
|
readonly invitation: "invitation";
|
|
@@ -30,12 +33,13 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
30
33
|
};
|
|
31
34
|
readonly codes: {
|
|
32
35
|
readonly invalid_input: "The input is invalid.";
|
|
33
|
-
readonly
|
|
36
|
+
readonly uuid_not_accepted: "Specify the 26-character ID of lowercase letters and digits, not a UUID.";
|
|
37
|
+
readonly transition_unmet: "The submission requirements are not met.";
|
|
34
38
|
readonly publish_unmet: "The publishing requirements are not met.";
|
|
35
39
|
readonly save_unmet: "The saving requirements are not met.";
|
|
36
40
|
readonly version_required: "The base version (version) is required.";
|
|
37
41
|
readonly file_required: "Choose an image file.";
|
|
38
|
-
readonly file_too_large: "Images must be at most {
|
|
42
|
+
readonly file_too_large: "Images must be at most {fileMaxMB, number} MB.";
|
|
39
43
|
readonly unsupported_image: "Unsupported image format (PNG, JPEG, GIF, WebP).";
|
|
40
44
|
readonly unsupported_file: "Unsupported file format (PDF, ZIP, text, CSV, Word, Excel, PowerPoint).";
|
|
41
45
|
readonly invalid_dimensions: "The image dimensions are invalid.";
|
|
@@ -45,8 +49,8 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
45
49
|
readonly invalid_mcp_token: "The call from MCP is invalid.";
|
|
46
50
|
readonly mcp_signature_invalid: "Cannot verify the call from the MCP server. Contact the operator.";
|
|
47
51
|
readonly invalid_account_token: "The app account credential token is invalid. Replace it with the token shown on the screen.";
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
52
|
+
readonly read_token_required: "An API key, read token or perspective ticket that can read unpublished versions is required.";
|
|
53
|
+
readonly invalid_read_token: "The read token or ticket is invalid or expired.";
|
|
50
54
|
readonly api_key_required: "An API key is required (Authorization: Bearer).";
|
|
51
55
|
readonly invalid_api_key: "The API key is invalid.";
|
|
52
56
|
readonly invalid_id_token: "The ID token is invalid. Get a new one and send it again.";
|
|
@@ -59,28 +63,28 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
59
63
|
readonly operator_read_only: "The operator support access is read-only, so changes are not allowed.";
|
|
60
64
|
readonly not_trial: "This operation is only for projects with the trial flag.";
|
|
61
65
|
readonly not_live: "This operation is only available in the live environment. Use the admin screen of the live environment.";
|
|
62
|
-
readonly operator_closed: "This operation is outside what operator support access allows (accounts, roles, integrations, apps,
|
|
66
|
+
readonly operator_closed: "This operation is outside what operator support access allows (accounts, roles, integrations, apps, end user IDs, permissions and so on).";
|
|
63
67
|
readonly forbidden: "{target, select, none {You do not have permission for this operation.} other {You do not have permission for this operation on {target}.}}";
|
|
64
|
-
readonly
|
|
68
|
+
readonly create_requires_publish: "{target, select, none {This} other {The {target}}} can only be created by accounts with publishing permission.";
|
|
65
69
|
readonly no_linked_record: "Accounts without a linked {name} cannot do this.";
|
|
66
70
|
readonly own_only: "You can only operate on your own {target, select, none {items} other {{target}}}.";
|
|
67
71
|
readonly not_visible: "You cannot view unpublished {target, select, none {items} other {{target}}} of other people.";
|
|
68
|
-
readonly
|
|
72
|
+
readonly edit_requires_publish: "Editing published records requires publishing permission.";
|
|
69
73
|
readonly cannot_remove_self: "You cannot remove yourself from the link.";
|
|
70
74
|
readonly cannot_change_owner: "The owner cannot be changed.";
|
|
71
75
|
readonly not_found: "{target, select, none {The target} other {The {target}}} was not found.";
|
|
72
76
|
readonly method_not_allowed: "This path does not accept this method.";
|
|
73
|
-
readonly
|
|
74
|
-
readonly
|
|
75
|
-
readonly 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.}
|
|
77
|
+
readonly end_user_not_linked: "No end user is linked to this account.";
|
|
78
|
+
readonly end_user_pending: "The link of this account becomes usable after review by the operator.";
|
|
79
|
+
readonly 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.} end_users {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.}}";
|
|
76
80
|
readonly duplicate_name: "The same name already exists.";
|
|
77
81
|
readonly duplicate_email: "An account with the same email address already exists.";
|
|
78
82
|
readonly duplicate_id: "This ID is already in use.";
|
|
79
83
|
readonly duplicate_slug: "This slug is already in use.";
|
|
80
84
|
readonly version_conflict: "This conflicted with another update. Load the latest version and try again.";
|
|
81
|
-
readonly
|
|
85
|
+
readonly record_locked: "{name, select, none {Someone else} other {{name}}} is editing this in the CMS, so it cannot be saved. Saving becomes possible within 2 minutes after the editor is closed or another tab is selected.";
|
|
82
86
|
readonly invalid_state: "This operation is not possible in the current state.";
|
|
83
|
-
readonly
|
|
87
|
+
readonly still_published: "Unpublish published records before deleting them.";
|
|
84
88
|
readonly last_admin: "The last administrator cannot be removed or demoted from the administrator role.";
|
|
85
89
|
readonly exceeds_own: "You cannot grant permissions wider than your own role.";
|
|
86
90
|
readonly reauth_required: "Log in again before approving.";
|
|
@@ -88,7 +92,7 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
88
92
|
readonly stale: "The content changed after the request. Request again.";
|
|
89
93
|
readonly approval_closed: "This request can no longer be approved (applied, rejected, withdrawn or expired).";
|
|
90
94
|
readonly cursor_expired: "The change log retention period has passed. Get all items again without cursor.";
|
|
91
|
-
readonly already_linked: "{reason, select, identity {This account is already linked to another
|
|
95
|
+
readonly already_linked: "{reason, select, identity {This account is already linked to another end user.} record {This account is already linked to a record in this project.} other {This end user is already linked to an account of the same issuer.}}";
|
|
92
96
|
readonly run_done: "This import run is already complete. Start a new run.";
|
|
93
97
|
readonly invalid_invite: "{reason, select, expired {The invitation has expired.} used {The invitation has already been used.} other {The invitation was not found.}}";
|
|
94
98
|
readonly body_too_large: "The request body must be at most {bodyMaxMB, number} MB.";
|
|
@@ -107,33 +111,40 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
107
111
|
readonly no_draft: "There are no unpublished changes apart from the published version.";
|
|
108
112
|
readonly not_in_review: "Not in review.";
|
|
109
113
|
readonly request_handled: "This request has already been handled.";
|
|
114
|
+
readonly requester_unauthorized: "The requester no longer has permission to request this operation.";
|
|
110
115
|
readonly deleted: "Already deleted.";
|
|
111
116
|
readonly not_deleted: "Cannot restore because it is not deleted.";
|
|
112
117
|
readonly schema_confirm: "This includes changes with impact. Check the counts before saving.";
|
|
113
|
-
readonly
|
|
118
|
+
readonly no_publication: "This collection has no workflow.";
|
|
114
119
|
readonly no_review: "The workflow of this collection has no review.";
|
|
115
120
|
readonly not_published: "Not published or scheduled.";
|
|
116
121
|
readonly collection_rows: "Records remain. Check the counts before deleting.";
|
|
117
122
|
readonly restore_conflict: "Cannot restore because {name, select, none {the same content} other {{name}}} already exists.";
|
|
123
|
+
readonly restore_target_trashed: "Cannot restore because {name} is in the trash. Restore the referenced record first.";
|
|
118
124
|
readonly collection_exists: "Cannot restore because a collection with the same id already exists.";
|
|
119
125
|
readonly collection_missing: "Cannot restore because the collection is deleted. Restore the collection first.";
|
|
120
|
-
readonly not_restorable: "Cannot restore because it was deleted by a personal deletion request
|
|
126
|
+
readonly not_restorable: "Cannot restore because it was deleted by a personal deletion request.";
|
|
121
127
|
readonly installation_state: "This operation is not possible in the current installation state.";
|
|
122
128
|
readonly site_deploy: "The site cannot be uploaded now. Another upload is in progress, or the site is stopped or removed.";
|
|
123
|
-
readonly
|
|
124
|
-
readonly
|
|
129
|
+
readonly site_check_failed: "The placement was discarded because the check right after it failed. The published site is unchanged. Upload a fix.";
|
|
130
|
+
readonly deployment_stale: "The active deployment was changed by another operation. Reload and activate again.";
|
|
131
|
+
readonly deployment_not_ready: "This deployment cannot be activated. Its placement failed or no longer exists.";
|
|
132
|
+
readonly deployment_consent: "This deployment cannot be activated because consent for the capabilities it uses is missing.";
|
|
133
|
+
readonly required_app: "Required standard features cannot be stopped or uninstalled.";
|
|
125
134
|
readonly app_installed: "An app can be installed only once per project.";
|
|
126
135
|
readonly app_dependencies: "Cannot satisfy the app dependencies. Check the reasons in conflicts.";
|
|
136
|
+
readonly app_required_by: "Cannot uninstall because other installed apps depend on it: {name}.";
|
|
127
137
|
readonly app_reinstalled: "The data of the old installation cannot be deleted because the same app has been reinstalled.";
|
|
128
138
|
readonly app_managed: "This registration is managed by an app installation. Change it by consenting to a new app version.";
|
|
129
139
|
readonly request_key_reused: "A record with another person, channel or purpose already exists for the same deduplication key.";
|
|
130
|
-
readonly
|
|
140
|
+
readonly no_organization: "Cannot invite because the project does not belong to an organization. Ask the operator to add it to an organization.";
|
|
131
141
|
readonly schema_changed: "Could not save because the schema changed. Reload the screen.";
|
|
132
|
-
readonly
|
|
142
|
+
readonly end_user_inactive: "This end user is suspended or closed, so the operation is not possible.";
|
|
133
143
|
readonly self_limit: "The limit of records per person has been reached.";
|
|
134
144
|
readonly already_live: "This environment is already live.";
|
|
135
145
|
readonly target_live: "The live environment cannot be deleted. Switch to another environment first.";
|
|
136
146
|
readonly target_synthetic: "An environment with synthetic data cannot become live.";
|
|
147
|
+
readonly target_anonymized: "A copy with personal information replaced or excluded cannot become live. Ask the operator for a copy that retains the values. You can apply only its schema.";
|
|
137
148
|
readonly no_changes: "There are no differences from live.";
|
|
138
149
|
readonly schema_values: "Cannot apply because the changes remove fields with values. Move the values in live and try again.";
|
|
139
150
|
readonly environment_limit: "The number of environments has reached the plan limit.";
|
|
@@ -141,18 +152,23 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
141
152
|
readonly unregistered_table: "Cannot copy because some tables have no decided handling of personal information.";
|
|
142
153
|
readonly not_frozen: "Writes to live are not stopped.";
|
|
143
154
|
readonly approval_running: "An approved operation is running. Wait a moment and try again.";
|
|
155
|
+
readonly aggregate_read_only: "Aggregate collections are read-only. Only the rebuild writes their values.";
|
|
156
|
+
readonly not_aggregate: "This is not an aggregate collection.";
|
|
157
|
+
readonly condition_unmet: "The record given as the condition has changed or cannot be read.";
|
|
158
|
+
readonly app_state_keys_full: "The number of app state keys has reached the limit.";
|
|
144
159
|
};
|
|
145
160
|
readonly own: {
|
|
146
161
|
readonly profile: "You can only edit your own profile.";
|
|
147
162
|
readonly portrait: "You can only change your own portrait.";
|
|
148
163
|
};
|
|
149
|
-
readonly
|
|
164
|
+
readonly no_link: {
|
|
150
165
|
readonly mcp: "Accounts without a linked {name} cannot use MCP.";
|
|
151
166
|
};
|
|
152
167
|
readonly linkedRecord: "record";
|
|
153
168
|
readonly titles: {
|
|
154
169
|
readonly invalid_input: "Input error";
|
|
155
|
-
readonly
|
|
170
|
+
readonly uuid_not_accepted: "Input error";
|
|
171
|
+
readonly transition_unmet: "Cannot submit";
|
|
156
172
|
readonly publish_unmet: "Cannot publish";
|
|
157
173
|
readonly save_unmet: "Cannot save";
|
|
158
174
|
readonly version_required: "Input error";
|
|
@@ -167,8 +183,8 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
167
183
|
readonly invalid_mcp_token: "Login error";
|
|
168
184
|
readonly mcp_signature_invalid: "Login error";
|
|
169
185
|
readonly invalid_account_token: "Login error";
|
|
170
|
-
readonly
|
|
171
|
-
readonly
|
|
186
|
+
readonly read_token_required: "Login error";
|
|
187
|
+
readonly invalid_read_token: "Login error";
|
|
172
188
|
readonly api_key_required: "Login error";
|
|
173
189
|
readonly invalid_api_key: "Login error";
|
|
174
190
|
readonly invalid_id_token: "Login error";
|
|
@@ -183,26 +199,26 @@ export declare const ERROR_MESSAGES_EN: {
|
|
|
183
199
|
readonly not_trial: "Not allowed";
|
|
184
200
|
readonly not_live: "Live environment only";
|
|
185
201
|
readonly forbidden: "Not allowed";
|
|
186
|
-
readonly
|
|
202
|
+
readonly create_requires_publish: "Not allowed";
|
|
187
203
|
readonly no_linked_record: "Not allowed";
|
|
188
204
|
readonly own_only: "Not allowed";
|
|
189
205
|
readonly not_visible: "Not allowed";
|
|
190
|
-
readonly
|
|
206
|
+
readonly edit_requires_publish: "Not allowed";
|
|
191
207
|
readonly cannot_remove_self: "Not allowed";
|
|
192
208
|
readonly cannot_change_owner: "Not allowed";
|
|
193
209
|
readonly not_found: "Not found";
|
|
194
210
|
readonly method_not_allowed: "Not possible";
|
|
195
|
-
readonly
|
|
196
|
-
readonly
|
|
211
|
+
readonly end_user_not_linked: "Not found";
|
|
212
|
+
readonly end_user_pending: "Pending review";
|
|
197
213
|
readonly in_use: "Cannot delete";
|
|
198
214
|
readonly duplicate_name: "Duplicate";
|
|
199
215
|
readonly duplicate_email: "Duplicate";
|
|
200
216
|
readonly duplicate_id: "Duplicate";
|
|
201
217
|
readonly duplicate_slug: "Duplicate";
|
|
202
218
|
readonly version_conflict: "Update conflict";
|
|
203
|
-
readonly
|
|
219
|
+
readonly record_locked: "Being edited";
|
|
204
220
|
readonly invalid_state: "Not possible";
|
|
205
|
-
readonly
|
|
221
|
+
readonly still_published: "Cannot delete";
|
|
206
222
|
readonly last_admin: "Not possible";
|
|
207
223
|
readonly exceeds_own: "Not allowed";
|
|
208
224
|
readonly reauth_required: "Log in again";
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { ManagementOperation, Operation, OrganizationRole } from './authorize.js';
|
|
2
|
+
import { FAILURE_STATUS } from './failureStatus.js';
|
|
3
|
+
/** 変更の操作で受け付ける本文の大きさ(/api、バイト数、multipart のアップロードは FILE_SIZE_MAX) */
|
|
4
|
+
export declare const JSON_BODY_MAX: number;
|
|
5
|
+
/** 画面の側だけのコード(通信の失敗と JSON でない応答。HTTP の状態を持たない) */
|
|
6
|
+
declare const NETWORK_ERROR = "network_error";
|
|
7
|
+
/** CMS の API のエラーのコード(状態は failureStatus.ts の表) */
|
|
8
|
+
declare const ERROR_CODES: readonly ["invalid_input", "transition_unmet", "publish_unmet", "save_unmet", "version_required", "file_required", "file_too_large", "unsupported_image", "unsupported_file", "invalid_dimensions", "https_required", "invalid_style", "uuid_not_accepted", "login_required", "invalid_mcp_token", "mcp_signature_invalid", "invalid_account_token", "read_token_required", "api_key_required", "invalid_api_key", "invalid_id_token", "invalid_app_token", "account_not_found", "invalid_read_token", "api_key_forbidden", "mcp_not_allowed", "insufficient_scope", "admin_only", "operator_read_only", "operator_closed", "not_trial", "not_live", "forbidden", "create_requires_publish", "no_linked_record", "own_only", "not_visible", "edit_requires_publish", "cannot_remove_self", "cannot_change_owner", "not_found", "end_user_not_linked", "end_user_pending", "method_not_allowed", "in_use", "duplicate_name", "duplicate_email", "duplicate_id", "duplicate_slug", "version_conflict", "record_locked", "invalid_state", "still_published", "last_admin", "exceeds_own", "reauth_required", "approval_required", "stale", "approval_closed", "already_linked", "invalid_invite", "run_done", "cursor_expired", "body_too_large", "rate_limited", "upstream_failed", "not_configured", "unavailable", "writes_paused", "environment_frozen", "job_failed", "internal_error", "network_error"];
|
|
9
|
+
/** エラーのコード */
|
|
10
|
+
export type ErrorCode = (typeof ERROR_CODES)[number];
|
|
11
|
+
/** やり直せば通りうるエラー(画面はこれだけに再試行のボタンを出す) */
|
|
12
|
+
export declare const RETRYABLE_ERRORS: readonly ["rate_limited", "upstream_failed", "unavailable", "writes_paused", "job_failed", "internal_error", "network_error"];
|
|
13
|
+
/** サーバーが返すエラーのコード */
|
|
14
|
+
type ServerErrorCode = Exclude<ErrorCode, typeof NETWORK_ERROR>;
|
|
15
|
+
/** エラーのコードと HTTP の状態(failureStatus.ts の表の CMS の API の部分) */
|
|
16
|
+
export declare const ERROR_STATUS: { readonly [K in ServerErrorCode]: (typeof FAILURE_STATUS)[K]; };
|
|
17
|
+
/**
|
|
18
|
+
* コアの操作や表示の対象(not_found・own_only などの params.target)
|
|
19
|
+
* - コレクションの対象: コレクションの id、表示名はスキーマ
|
|
20
|
+
* - アプリの対象: AppManifest の targets
|
|
21
|
+
*/
|
|
22
|
+
export type ErrorTarget = 'request' | 'role' | 'files' | 'record' | 'file' | 'mcp' | 'version' | 'profile' | 'portrait' | 'standard_app' | 'account' | 'comment' | 'view' | 'webhook' | 'external_function' | 'external_screen' | 'api_key' | 'read_token' | 'mail_domain' | 'channel' | 'channel_address' | 'trash' | 'end_user' | 'end_user_identity' | 'entitlement' | 'app' | 'installation' | 'invitation' | 'environment';
|
|
23
|
+
/** 状態の不一致の理由(invalid_state) */
|
|
24
|
+
export type InvalidStateReason = 'not_draft' | 'no_draft' | 'not_in_review' | 'request_handled' | 'requester_unauthorized' | 'deleted' | 'not_deleted' | 'schema_confirm' | 'no_publication' | 'no_review' | 'not_published' | 'collection_rows' | 'restore_conflict' | 'restore_target_trashed' | 'collection_exists' | 'collection_missing' | 'not_restorable' | 'installation_state' | 'required_app' | 'app_installed' | 'app_dependencies' | 'app_required_by' | 'app_reinstalled' | 'app_managed' | 'request_key_reused' | 'no_organization' | 'schema_changed' | 'site_deploy' | 'site_check_failed' | 'deployment_stale' | 'deployment_not_ready' | 'deployment_consent' | 'end_user_inactive' | 'self_limit' | 'already_live' | 'target_live' | 'target_synthetic' | 'target_anonymized' | 'no_changes' | 'schema_values' | 'environment_limit' | 'environment_busy' | 'unregistered_table' | 'not_frozen' | 'approval_running' | 'aggregate_read_only' | 'not_aggregate' | 'condition_unmet' | 'app_state_keys_full';
|
|
25
|
+
/**
|
|
26
|
+
* 権限の拒否で足りないもの(403 forbidden の params.required)
|
|
27
|
+
* - operation: 拒んだ操作(Operation か、プロジェクトの管理の操作 ManagementOperation)
|
|
28
|
+
* - roles: その操作を持つロール(ロールで決まる操作だけ。管理の操作は組織のロール)
|
|
29
|
+
* - capability: 足りない能力(アプリ・インストールの能力の文字列、例 `op:<コレクション>:read_entitled`)
|
|
30
|
+
*/
|
|
31
|
+
export type ErrorRequired = Readonly<{
|
|
32
|
+
operation: Operation | ManagementOperation;
|
|
33
|
+
roles?: readonly (string | OrganizationRole)[];
|
|
34
|
+
capability?: string;
|
|
35
|
+
}>;
|
|
36
|
+
/** エラーの補足の値(コードごとに使用する項目だけ) */
|
|
37
|
+
export type ErrorParams = {
|
|
38
|
+
/**
|
|
39
|
+
* 対象: not_found・own_only・forbidden・not_visible・no_linked_record・create_requires_publish・
|
|
40
|
+
* api_key_forbidden
|
|
41
|
+
* - 文字列: アプリの対象・コレクションの id
|
|
42
|
+
*/
|
|
43
|
+
target?: ErrorTarget | (string & {});
|
|
44
|
+
/** 件数: in_use */
|
|
45
|
+
count?: number;
|
|
46
|
+
/** 使用先: in_use */
|
|
47
|
+
by?: 'uses' | 'places' | 'outputs' | 'record' | 'writers' | 'end_users' | 'accounts' | 'app';
|
|
48
|
+
/**
|
|
49
|
+
* 理由: invalid_state(InvalidStateReason)
|
|
50
|
+
* - already_linked: identity は相手の ID、endUser はエンドユーザー、record はアカウントの結び付くレコード
|
|
51
|
+
* - invalid_invite: not_found・expired・used
|
|
52
|
+
*/
|
|
53
|
+
reason?: InvalidStateReason | 'identity' | 'end_user' | 'record' | 'not_found' | 'expired' | 'used';
|
|
54
|
+
/** 取得の対象: upstream_failed */
|
|
55
|
+
resource?: 'page' | 'image' | 'webhook' | 'source' | 'file' | 'hosting';
|
|
56
|
+
/**
|
|
57
|
+
* 名前
|
|
58
|
+
* - no_linked_record: 結び付くコレクションの表示名、account_not_found: メールアドレス
|
|
59
|
+
* - not_configured: 設定の名前、job_failed: 失敗の理由、in_use の record: 参照するコレクションと項目、
|
|
60
|
+
* in_use の app: 参照するアプリの表の表示名
|
|
61
|
+
* - invalid_state の restore_conflict: 戻すレコードとぶつかるレコードの表示名
|
|
62
|
+
* - invalid_state の app_required_by: 依存元のアプリの表示名
|
|
63
|
+
* - invalid_state の restore_target_trashed: 戻すレコードが参照する、ゴミ箱にあるレコードの表示名
|
|
64
|
+
*/
|
|
65
|
+
name?: string;
|
|
66
|
+
/** 権限の拒否で足りないもの: forbidden */
|
|
67
|
+
required?: ErrorRequired;
|
|
68
|
+
/** MCP の接続に足りない範囲: insufficient_scope(MCP の Worker が403の WWW-Authenticate の scope に写す) */
|
|
69
|
+
scope?: string;
|
|
70
|
+
};
|
|
71
|
+
/** 検査の結果の重さ(error は保存・提出・取り込みを止め、warning は止めない) */
|
|
72
|
+
export declare const ISSUE_SEVERITIES: readonly ["error", "warning"];
|
|
73
|
+
export type IssueSeverity = (typeof ISSUE_SEVERITIES)[number];
|
|
74
|
+
/**
|
|
75
|
+
* 検査の結果の1件(エラーの応答の issues と、検査が目的の操作の200の issues で同じ形、path は項目の key をドットで連結)
|
|
76
|
+
* - code: 検査の問題のコード(コンテンツスキーマ、本文、編集)、入力の形の誤りは zod の issue の code、ほかは invalid
|
|
77
|
+
* - message: 英語の既定の文、params: 差し込み(画面は code と params を文言の表で引く)
|
|
78
|
+
*/
|
|
79
|
+
export type Issue = {
|
|
80
|
+
path: string;
|
|
81
|
+
code: string;
|
|
82
|
+
message: string;
|
|
83
|
+
params?: Readonly<Record<string, string | number>>;
|
|
84
|
+
severity: IssueSeverity;
|
|
85
|
+
};
|
|
86
|
+
/** 検査の結果を作るときの形(code と severity は省けて、応答の手前で決まる) */
|
|
87
|
+
export type IssueInput = Readonly<{
|
|
88
|
+
path: string;
|
|
89
|
+
message: string;
|
|
90
|
+
code?: string;
|
|
91
|
+
params?: Issue['params'];
|
|
92
|
+
severity?: IssueSeverity;
|
|
93
|
+
}>;
|
|
94
|
+
export declare const PROBLEM_CONTENT_TYPE = "application/problem+json";
|
|
95
|
+
/** problem+json の type の基点(コードを続ける。型は string: 公開の SDK の型の宣言にホスト名を出さない) */
|
|
96
|
+
export declare const PROBLEM_TYPE_BASE: string;
|
|
97
|
+
/**
|
|
98
|
+
* エラーの応答の本文(problem+json)
|
|
99
|
+
* - detail: 英語の定型の文(画面は code と params で引く)、request_id: 相関の ID(すべてのエラー)
|
|
100
|
+
* - login: ログインなしのとき、CMS 自身が受け持つログインの入り口
|
|
101
|
+
* - capability: アプリの主体の閲覧の拒否で、足りない能力(エンドユーザーだけの項目を持つコレクションの `op:<コレクション>:read_entitled`)
|
|
102
|
+
*/
|
|
103
|
+
export type ErrorBody = {
|
|
104
|
+
type: string;
|
|
105
|
+
title: string;
|
|
106
|
+
status: number;
|
|
107
|
+
detail: string;
|
|
108
|
+
code: ErrorCode;
|
|
109
|
+
request_id: string;
|
|
110
|
+
params?: ErrorParams;
|
|
111
|
+
issues?: Issue[];
|
|
112
|
+
login?: string;
|
|
113
|
+
capability?: string;
|
|
114
|
+
};
|
|
115
|
+
/** 本文に足せる項目(type・title・status・code・request_id は組み立てる側が決める。ほかの項目は problem+json の拡張の項目) */
|
|
116
|
+
export type ProblemFields = Partial<Pick<ErrorBody, 'detail' | 'params' | 'issues' | 'login' | 'capability'>> & Readonly<Record<string, unknown>>;
|
|
117
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** レコードのイベントの data(record.<操作> と form.submitted。説明は WebhookRecordData) */
|
|
3
|
+
export declare const RECORD_EVENT_DATA: z.ZodObject<{
|
|
4
|
+
environment: z.ZodString;
|
|
5
|
+
collection: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
record: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
slug: z.ZodString;
|
|
12
|
+
previous_slug: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/** アプリのイベントの data(説明は AppEventData) */
|
|
16
|
+
export declare const APP_EVENT_DATA: z.ZodObject<{
|
|
17
|
+
environment: z.ZodString;
|
|
18
|
+
collection: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
record: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
actor: z.ZodObject<{
|
|
25
|
+
kind: z.ZodEnum<{
|
|
26
|
+
account: "account";
|
|
27
|
+
system: "system";
|
|
28
|
+
installation: "installation";
|
|
29
|
+
operator: "operator";
|
|
30
|
+
on_behalf_of_account: "on_behalf_of_account";
|
|
31
|
+
on_behalf_of_end_user: "on_behalf_of_end_user";
|
|
32
|
+
}>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
/** エンドユーザーのイベントの data(from・to は前後の状態で、作成の前と削除の後は null) */
|
|
36
|
+
export declare const END_USER_EVENT_DATA: z.ZodObject<{
|
|
37
|
+
end_user_id: z.ZodString;
|
|
38
|
+
from: z.ZodNullable<z.ZodEnum<{
|
|
39
|
+
active: "active";
|
|
40
|
+
suspended: "suspended";
|
|
41
|
+
}>>;
|
|
42
|
+
to: z.ZodNullable<z.ZodEnum<{
|
|
43
|
+
active: "active";
|
|
44
|
+
suspended: "suspended";
|
|
45
|
+
}>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
/** 取り込みの完了のイベントの data(rows はコレクションの ID ごとの件数) */
|
|
48
|
+
export declare const IMPORT_COMPLETED_DATA: z.ZodObject<{
|
|
49
|
+
run_id: z.ZodString;
|
|
50
|
+
source: z.ZodString;
|
|
51
|
+
rows: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
/** アンインストールのイベントの data(旧い形のインストールの app_id は null) */
|
|
54
|
+
export declare const INSTALLATION_DELETED_DATA: z.ZodObject<{
|
|
55
|
+
installation_id: z.ZodString;
|
|
56
|
+
app_id: z.ZodNullable<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
/** アプリのイベントの JSON Schema の名前(アプリのイベントの種類は宣言ごとに違うので、data の形の1つを共有する) */
|
|
59
|
+
export declare const APP_EVENTS_SCHEMA_NAME = "apps";
|
|
60
|
+
/** 外へ送るイベントの短縮名と data の形(アプリのイベントは APP_EVENTS_SCHEMA_NAME の1つ) */
|
|
61
|
+
export declare const EVENT_DATA_SCHEMAS: Readonly<Record<string, z.ZodType>>;
|
|
62
|
+
/**
|
|
63
|
+
* イベントの data の JSON Schema の置き場所(CloudEvents の dataschema。バージョンを含めない不変の URL)
|
|
64
|
+
* - 型は string(公開の SDK の型の宣言にホスト名を出さない)
|
|
65
|
+
*/
|
|
66
|
+
export declare const EVENT_SCHEMA_BASE_URL: string;
|
|
67
|
+
/** イベントの短縮名から dataschema の URL(アプリのイベントは共有の1つ) */
|
|
68
|
+
export declare const eventDataSchemaUrl: (type: string) => string;
|
|
69
|
+
/** 公開する JSON Schema(キーはファイル名、index.json は短縮名と dataschema の一覧) */
|
|
70
|
+
export declare function eventJsonSchemaFiles(): Readonly<Record<string, unknown>>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { TraceResult } from './integrationGraph.js';
|
|
2
|
+
export declare const DELIVERY_SOURCE_KINDS: readonly ["workspace", "mcp", "apiKey", "endUser", "system", "installation"];
|
|
3
|
+
export type DeliverySourceKind = (typeof DELIVERY_SOURCE_KINDS)[number];
|
|
4
|
+
/** 発行の主体(installationId は kind が installation のときだけ) */
|
|
5
|
+
export type DeliverySource = Readonly<{
|
|
6
|
+
kind: DeliverySourceKind;
|
|
7
|
+
installationId?: string;
|
|
8
|
+
}>;
|
|
9
|
+
/** 受け手(Webhook の登録と、その持ち主のインストール) */
|
|
10
|
+
export type DeliveryReceiver = Readonly<{
|
|
11
|
+
webhookId: string;
|
|
12
|
+
installationId: string | null;
|
|
13
|
+
}>;
|
|
14
|
+
/** 1件の配信(受け手ごとの最後の試行。status は HTTP の状態で、未送信は0) */
|
|
15
|
+
export type TraceDelivery = Readonly<{
|
|
16
|
+
eventId: string;
|
|
17
|
+
type: string;
|
|
18
|
+
at: string;
|
|
19
|
+
source: DeliverySource;
|
|
20
|
+
receiver: DeliveryReceiver;
|
|
21
|
+
result: TraceResult;
|
|
22
|
+
status: number;
|
|
23
|
+
}>;
|
|
24
|
+
/** 同じ correlationid の連鎖(at は起点の時刻、deliveries は時刻の順) */
|
|
25
|
+
export type EventTrace = Readonly<{
|
|
26
|
+
correlationId: string;
|
|
27
|
+
at: string;
|
|
28
|
+
deliveries: readonly TraceDelivery[];
|
|
29
|
+
}>;
|
|
30
|
+
/** 配信の集計の1行(同じ主体・受け手・イベントの種類の件数) */
|
|
31
|
+
export type DeliverySummaryRow = Readonly<{
|
|
32
|
+
source: DeliverySource;
|
|
33
|
+
receiver: DeliveryReceiver;
|
|
34
|
+
type: string;
|
|
35
|
+
count: number;
|
|
36
|
+
failed: number;
|
|
37
|
+
undelivered: number;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const EVENT_TRACE_LIMITS: {
|
|
40
|
+
readonly periodDaysMax: 30;
|
|
41
|
+
readonly tracesMax: 50;
|
|
42
|
+
readonly tracesDefault: 20;
|
|
43
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** 失敗のコードと HTTP の状態 */
|
|
2
2
|
export declare const FAILURE_STATUS: {
|
|
3
3
|
readonly invalid_input: 400;
|
|
4
|
-
readonly
|
|
4
|
+
readonly transition_unmet: 400;
|
|
5
5
|
readonly publish_unmet: 400;
|
|
6
6
|
readonly save_unmet: 400;
|
|
7
7
|
readonly version_required: 400;
|
|
@@ -15,8 +15,9 @@ export declare const FAILURE_STATUS: {
|
|
|
15
15
|
readonly invalid_slug: 400;
|
|
16
16
|
readonly reserved_slug: 400;
|
|
17
17
|
readonly invalid_id: 400;
|
|
18
|
+
readonly uuid_not_accepted: 400;
|
|
18
19
|
readonly reserved_id: 400;
|
|
19
|
-
readonly
|
|
20
|
+
readonly organization_required: 400;
|
|
20
21
|
readonly same_environment: 400;
|
|
21
22
|
readonly ticket_required: 400;
|
|
22
23
|
readonly ticket_invalid: 400;
|
|
@@ -26,13 +27,13 @@ export declare const FAILURE_STATUS: {
|
|
|
26
27
|
readonly invalid_mcp_token: 401;
|
|
27
28
|
readonly mcp_signature_invalid: 401;
|
|
28
29
|
readonly invalid_account_token: 401;
|
|
29
|
-
readonly
|
|
30
|
+
readonly read_token_required: 401;
|
|
30
31
|
readonly api_key_required: 401;
|
|
31
32
|
readonly invalid_api_key: 401;
|
|
32
33
|
readonly invalid_id_token: 401;
|
|
33
34
|
readonly invalid_app_token: 401;
|
|
34
35
|
readonly account_not_found: 403;
|
|
35
|
-
readonly
|
|
36
|
+
readonly invalid_read_token: 401;
|
|
36
37
|
readonly api_key_forbidden: 403;
|
|
37
38
|
readonly mcp_not_allowed: 403;
|
|
38
39
|
readonly insufficient_scope: 403;
|
|
@@ -44,17 +45,17 @@ export declare const FAILURE_STATUS: {
|
|
|
44
45
|
readonly forbidden: 403;
|
|
45
46
|
readonly mfa_required: 403;
|
|
46
47
|
readonly cross_origin: 403;
|
|
47
|
-
readonly
|
|
48
|
+
readonly create_requires_publish: 403;
|
|
48
49
|
readonly no_linked_record: 403;
|
|
49
50
|
readonly own_only: 403;
|
|
50
51
|
readonly not_visible: 403;
|
|
51
|
-
readonly
|
|
52
|
+
readonly edit_requires_publish: 403;
|
|
52
53
|
readonly cannot_remove_self: 403;
|
|
53
54
|
readonly cannot_change_owner: 403;
|
|
54
55
|
readonly not_found: 404;
|
|
55
|
-
readonly
|
|
56
|
+
readonly end_user_not_linked: 404;
|
|
56
57
|
readonly method_not_allowed: 405;
|
|
57
|
-
readonly
|
|
58
|
+
readonly end_user_pending: 409;
|
|
58
59
|
readonly in_use: 409;
|
|
59
60
|
readonly conflict: 409;
|
|
60
61
|
readonly already_exists: 409;
|
|
@@ -64,9 +65,9 @@ export declare const FAILURE_STATUS: {
|
|
|
64
65
|
readonly duplicate_slug: 409;
|
|
65
66
|
readonly slug_taken: 409;
|
|
66
67
|
readonly version_conflict: 409;
|
|
67
|
-
readonly
|
|
68
|
+
readonly record_locked: 409;
|
|
68
69
|
readonly invalid_state: 409;
|
|
69
|
-
readonly
|
|
70
|
+
readonly still_published: 409;
|
|
70
71
|
readonly last_owner: 409;
|
|
71
72
|
readonly last_admin: 409;
|
|
72
73
|
readonly exceeds_own: 403;
|
|
@@ -77,7 +78,8 @@ export declare const FAILURE_STATUS: {
|
|
|
77
78
|
readonly already_live: 409;
|
|
78
79
|
readonly target_live: 409;
|
|
79
80
|
readonly target_synthetic: 409;
|
|
80
|
-
readonly
|
|
81
|
+
readonly target_anonymized: 409;
|
|
82
|
+
readonly cross_organization: 409;
|
|
81
83
|
readonly target_busy: 409;
|
|
82
84
|
readonly target_frozen: 409;
|
|
83
85
|
readonly not_frozen: 409;
|
|
@@ -87,7 +89,7 @@ export declare const FAILURE_STATUS: {
|
|
|
87
89
|
readonly still_frozen: 409;
|
|
88
90
|
readonly schema_values: 409;
|
|
89
91
|
readonly confirm_required: 409;
|
|
90
|
-
readonly
|
|
92
|
+
readonly unregistered_table: 409;
|
|
91
93
|
readonly environment_limit_exceeded: 409;
|
|
92
94
|
readonly cursor_expired: 410;
|
|
93
95
|
readonly body_too_large: 413;
|
|
@@ -97,7 +99,7 @@ export declare const FAILURE_STATUS: {
|
|
|
97
99
|
readonly unavailable: 503;
|
|
98
100
|
readonly writes_paused: 503;
|
|
99
101
|
readonly environment_frozen: 503;
|
|
100
|
-
readonly
|
|
102
|
+
readonly audit_pending: 503;
|
|
101
103
|
readonly grants_not_revoked: 503;
|
|
102
104
|
readonly notice_failed: 503;
|
|
103
105
|
readonly job_failed: 500;
|
|
@@ -109,16 +111,7 @@ export type FailureCode = keyof typeof FAILURE_STATUS;
|
|
|
109
111
|
/** 待てば通る失敗の Retry-After(秒) */
|
|
110
112
|
export declare const RETRY_AFTER_SEC: {
|
|
111
113
|
readonly environment_frozen: 60;
|
|
114
|
+
readonly unavailable: 1;
|
|
112
115
|
};
|
|
113
116
|
/** 失敗の応答の見出し(待てば通るコードだけ Retry-After) */
|
|
114
117
|
export declare const retryHeadersOf: (code: FailureCode) => Record<string, string>;
|
|
115
|
-
/**
|
|
116
|
-
* スキーマだけの本番に反映の失敗のコード(サーバーと manage の RPC で共通)
|
|
117
|
-
* - already_live は元が live の環境、invalid_input は保存の検査の誤りか禁止の変更か一意の組の重なり(issues、保存と同じ形)
|
|
118
|
-
* - schema_values は値を失うか補充の要る差か常に止める差(blocked に件数)、confirm_required は承認していない差(pending に ID)
|
|
119
|
-
* - stale は確認のステップの後に版か live の向きか止める差の件数が変わった、environment_frozen は live が切り替えの準備で止まっている(解除を待つ)
|
|
120
|
-
* - incomplete は確定の途中の例外
|
|
121
|
-
*/
|
|
122
|
-
export declare const SCHEMA_PROMOTION_ERRORS: readonly ["not_found", "forbidden", "invalid_input", "already_live", "not_configured", "reauth_required", "approval_required", "ticket_invalid", "schema_values", "confirm_required", "stale", "environment_frozen", "incomplete"];
|
|
123
|
-
/** スキーマだけの本番に反映の失敗のコード */
|
|
124
|
-
export type SchemaPromotionError = (typeof SCHEMA_PROMOTION_ERRORS)[number];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type SelfWrite, type EndUserProof, type Audience, type Collection, type FieldDef } from '../../schema/src/index.js';
|
|
2
|
+
import { type Subject } from './principal.js';
|
|
3
|
+
/** 項目の読み替えに要るコレクションの宣言 */
|
|
4
|
+
type FieldType = Pick<Collection, 'private' | 'fields'>;
|
|
5
|
+
/** 判定の対象のコレクション(id と、個人の情報を持つコレクションかと読み替えに要る宣言) */
|
|
6
|
+
export type AudienceCollection = Pick<Collection, 'id' | 'private' | 'fields'>;
|
|
7
|
+
/** 読む主体 */
|
|
8
|
+
export type FieldReader = Subject;
|
|
9
|
+
/** 配信 API に出せる見える範囲(公開とアクセス権、* の範囲) */
|
|
10
|
+
export declare const DELIVERED: ReadonlySet<Audience>;
|
|
11
|
+
/** 本人のレコードで見られる見える範囲(#712の read_self: 本人の項目まで、スタッフの項目は出さない。本人のレコードを返す層だけが使う) */
|
|
12
|
+
export declare const SELF_SEES: ReadonlySet<Audience>;
|
|
13
|
+
/** 公開だけ(配信の絞り込みと並べ替え: アクセス権の項目はキャッシュのキーに入らないため使わない) */
|
|
14
|
+
export declare const PUBLIC_ONLY: ReadonlySet<Audience>;
|
|
15
|
+
/** 主体がすべての項目を見られるか(値をそのまま返してよい) */
|
|
16
|
+
export declare const seesAll: (audiences: ReadonlySet<Audience>) => boolean;
|
|
17
|
+
/** 主体がコレクションのレコードで見られる見える範囲 */
|
|
18
|
+
export declare function audiencesFor(subject: FieldReader, collection: AudienceCollection): ReadonlySet<Audience>;
|
|
19
|
+
/** コレクションの最上位の項目を見られるか(読み替えは schema のパッケージの audienceOf) */
|
|
20
|
+
export declare const canReadField: (audiences: ReadonlySet<Audience>, field: FieldDef, collection: FieldType) => boolean;
|
|
21
|
+
/** 見られる最上位の項目 */
|
|
22
|
+
export declare const readableFields: (collection: FieldType, audiences: ReadonlySet<Audience>) => FieldDef[];
|
|
23
|
+
/**
|
|
24
|
+
* 主体に見せる値(見られない項目を除く、まとまりの中も)
|
|
25
|
+
* - 値は定義の項目の key だけを残し、値のない項目は null
|
|
26
|
+
*/
|
|
27
|
+
export declare function readableValues(collection: FieldType, values: Readonly<Record<string, unknown>>, audiences: ReadonlySet<Audience>): Record<string, unknown>;
|
|
28
|
+
/** レコードの題(題の項目を見られなければレコードの ID、題の項目がなければ ID) */
|
|
29
|
+
export declare function titleFor(audiences: ReadonlySet<Audience>, collection: FieldType, values: Readonly<Record<string, unknown>>, id: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* 主体が書けない項目の path(見られない最上位の項目、見られない項目を中に持つまとまりへの入力のうち見られない値を変えるもの)
|
|
32
|
+
* - 複数のまとまりは要素を保存済みと対応させられないため、見える形と違えば書けない
|
|
33
|
+
* - 入力にあれば保存で拒む(黙って捨てない)
|
|
34
|
+
*/
|
|
35
|
+
export declare function unwritableKeys(collection: FieldType, input: Readonly<Record<string, unknown>>, previous: Readonly<Record<string, unknown>>, audiences: ReadonlySet<Audience>): string[];
|
|
36
|
+
/**
|
|
37
|
+
* 人の代わりの書き込み(create は submit・create_self、update は update_self)で本人が書けない入力の key(#712)
|
|
38
|
+
* - 書けるのは schema の selfWritableKeysOf だけ
|
|
39
|
+
* (コレクションの宣言の印か、フォームの宣言の項目。update は一意の組の項目を除く)
|
|
40
|
+
* - 本人のエンドユーザーへの参照のフィールド、スタッフの項目、印のない項目、コレクションにない key は書けない。入力にあれば保存で拒む(黙って捨てない)
|
|
41
|
+
*/
|
|
42
|
+
export declare function selfUnwritableKeys(collection: Collection, input: Readonly<Record<string, unknown>>, proof: EndUserProof, write: SelfWrite): string[];
|
|
43
|
+
/** 保存する値に、主体が見られない項目の保存済みの値を重ねる(最上位の見られない項目と、単数のまとまりの中の見られない項目) */
|
|
44
|
+
export declare function withHiddenValues(collection: FieldType, values: Readonly<Record<string, unknown>>, previous: Readonly<Record<string, unknown>>, audiences: ReadonlySet<Audience>): Record<string, unknown>;
|
|
45
|
+
export {};
|