@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
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { type AppDependencyManifest } from './appDependencies.js';
|
|
2
|
+
import { type Operation } from './authorize.js';
|
|
3
|
+
import type { InfraId } from './ids.js';
|
|
4
|
+
import type { FieldDef } from '../../schema/src/index.js';
|
|
5
|
+
import { type SiteHostingManifest } from './siteDeclaration.js';
|
|
6
|
+
import { type Action } from './permissions.js';
|
|
7
|
+
import { type SettingsArea } from './settings.js';
|
|
8
|
+
import { type AppOutbound } from './outbound.js';
|
|
9
|
+
import { type AppMailDeclaration } from './appMail.js';
|
|
10
|
+
import { type AppChannelKind } from './appChannels.js';
|
|
11
|
+
import { type AppSecretDeclaration } from './appSecrets.js';
|
|
12
|
+
import type { TargetMessages } from './errorLabels.js';
|
|
13
|
+
/** アプリの種類(画面で分けて出す) */
|
|
14
|
+
export declare const APP_KINDS: readonly ["app", "site", "theme"];
|
|
15
|
+
/** アプリの種類 */
|
|
16
|
+
export type AppKind = (typeof APP_KINDS)[number];
|
|
17
|
+
/** インストール済みアプリの種類(アプリの種類と、鍵だけで動く公開のクライアント) */
|
|
18
|
+
export declare const INSTALLATION_KINDS: readonly ["app", "site", "theme", "public_client"];
|
|
19
|
+
/** インストール済みアプリの種類 */
|
|
20
|
+
export type InstallationKind = (typeof INSTALLATION_KINDS)[number];
|
|
21
|
+
/** 1つのプロジェクトに1つだけインストールできる種類か */
|
|
22
|
+
export declare const isExclusiveAppKind: (kind: string) => boolean;
|
|
23
|
+
/** インストールの状態 */
|
|
24
|
+
export declare const INSTALLATION_STATES: readonly ["active", "stopped", "uninstalled"];
|
|
25
|
+
/** インストールの状態 */
|
|
26
|
+
export type InstallationState = (typeof INSTALLATION_STATES)[number];
|
|
27
|
+
/** 画面のスロット(docs/design/apps.md の「アプリの画面」) */
|
|
28
|
+
export declare const APP_UI_SLOTS: readonly ["record.panel", "record.field", "list.column", "list.action", "page", "dashboard", "settings", "dialog"];
|
|
29
|
+
/** 画面のスロット */
|
|
30
|
+
export type AppUiSlot = (typeof APP_UI_SLOTS)[number];
|
|
31
|
+
/** マニフェストの上限(capabilitiesMax は能力の集合の要素の数。同意の画面がそのまま送り返すので、受け付けるマニフェストもこの数まで) */
|
|
32
|
+
export declare const APP_MANIFEST_LIMITS: {
|
|
33
|
+
readonly labelMax: 80;
|
|
34
|
+
readonly entriesMax: 100;
|
|
35
|
+
readonly descriptionMax: 500;
|
|
36
|
+
readonly urlMax: 2048;
|
|
37
|
+
readonly keysMax: 5;
|
|
38
|
+
readonly capabilitiesMax: 1000;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* 既存のコレクションへの当て先(collection はコレクションの id、fields はマニフェストのフィールドの key → 当てたフィールドの内部の id)
|
|
42
|
+
* - 当てないフィールドは、インストールが当て先のコレクションに足す(collectionMappingProblem)
|
|
43
|
+
*/
|
|
44
|
+
export type CollectionMapping = Readonly<{
|
|
45
|
+
collection: string;
|
|
46
|
+
fields: Readonly<Record<string, string>>;
|
|
47
|
+
}>;
|
|
48
|
+
/** マニフェストのコレクションの名前 → 当て先(当てるものだけ。ないものはインストールが作る) */
|
|
49
|
+
export type CollectionMappings = Readonly<Record<string, CollectionMapping>>;
|
|
50
|
+
/** マニフェストのコレクションの名前 → コレクションの id(作ったものと当てたもの) */
|
|
51
|
+
export type CollectionIds = Readonly<Record<string, string>>;
|
|
52
|
+
/** 当てるフィールドの型が宣言の型に合うか(同じ型。text と long_text は互いに当てられる) */
|
|
53
|
+
export declare const fieldTypeFits: (declared: FieldDef["type"], actual: FieldDef["type"]) => boolean;
|
|
54
|
+
/** 画面のアイコン(ワークスペースが名前から描く) */
|
|
55
|
+
export declare const APP_UI_ICONS: readonly ["contact", "user-check", "inbox", "palette", "calendar", "globe"];
|
|
56
|
+
/** 画面のアイコン */
|
|
57
|
+
export type AppUiIcon = (typeof APP_UI_ICONS)[number];
|
|
58
|
+
/** 画面の表示に要る権限で、宣言を持つコレクションのどれか1つに要る操作(form はフォームの宣言) */
|
|
59
|
+
export declare const APP_UI_DECLARATIONS: readonly ["form"];
|
|
60
|
+
/**
|
|
61
|
+
* 画面の表示に要る権限
|
|
62
|
+
* - admin は管理者だけ。対象と操作はロールの * を当てず、管理者は常に可
|
|
63
|
+
* - declared は、その宣言を持つコレクションのどれかに操作の権限があること(そのコレクションがなければ管理者にも出さない)
|
|
64
|
+
*/
|
|
65
|
+
export type AppUiRequires = 'admin' | Readonly<{
|
|
66
|
+
target: string;
|
|
67
|
+
action: Action;
|
|
68
|
+
}> | Readonly<{
|
|
69
|
+
declared: (typeof APP_UI_DECLARATIONS)[number];
|
|
70
|
+
action: Action;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* アプリの画面
|
|
74
|
+
* - url: 独自の画面(iframe)の URL。なしは本体が部品で描く画面で、key が要る。描く部品のない画面は外枠が出さない
|
|
75
|
+
* - key: 部品で描く画面の名前(page は経路 /<key>、settings は /settings/<key>)
|
|
76
|
+
* - collection: コレクションを持つスロット(COLLECTION_UI_SLOTS)の、マニフェストのコレクション(collections)の名前
|
|
77
|
+
* 能力の要素 `screen:<置き場所>:<オリジン>` はコレクションを持たないので、画面のコレクションは同意を通る当て先の選択かアプリが作るコレクションだけで決まる
|
|
78
|
+
* - field: `record.field` の項目の key
|
|
79
|
+
* - label: ワークスペースの見出し(一覧の列の見出しなど、なしはマニフェストの label)。APP_UI_LABEL_MAX 文字まで
|
|
80
|
+
* key が要る(表示の文字列の塊の項目は `<slot>:<key>`)
|
|
81
|
+
* - page だけ: requires は表示に要る権限、badge はメニューの件数を返すアプリの経路(GET で `{ count }`、要求者の権限で判定)、
|
|
82
|
+
* menu が false はメニューに出さない経路だけの画面、rail は ID つきの経路でメニューを縮める編集の画面
|
|
83
|
+
* - settings だけ: area はページを開ける設定の領域
|
|
84
|
+
*/
|
|
85
|
+
export type AppUi = Readonly<{
|
|
86
|
+
slot: AppUiSlot;
|
|
87
|
+
url?: string;
|
|
88
|
+
key?: string;
|
|
89
|
+
collection?: string;
|
|
90
|
+
field?: string;
|
|
91
|
+
label?: string;
|
|
92
|
+
icon?: AppUiIcon;
|
|
93
|
+
requires?: AppUiRequires;
|
|
94
|
+
badge?: Readonly<{
|
|
95
|
+
route: `/api/${string}`;
|
|
96
|
+
}>;
|
|
97
|
+
menu?: boolean;
|
|
98
|
+
rail?: boolean;
|
|
99
|
+
area?: SettingsArea;
|
|
100
|
+
}>;
|
|
101
|
+
/** 権限の対象(id は役割の表の識別子) */
|
|
102
|
+
export type PermissionTarget = Readonly<{
|
|
103
|
+
id: string;
|
|
104
|
+
label: string;
|
|
105
|
+
}>;
|
|
106
|
+
/** アプリが必要とする外部の接続(接続の状態はサーバーの側の connections で判定) */
|
|
107
|
+
export type ConnectionPoint = Readonly<{
|
|
108
|
+
id: string;
|
|
109
|
+
label: string;
|
|
110
|
+
}>;
|
|
111
|
+
/** コレクションを持つ画面のスロット(マニフェストの画面に collection が要る) */
|
|
112
|
+
export declare const COLLECTION_UI_SLOTS: readonly ["record.panel", "record.field", "list.action", "list.column"];
|
|
113
|
+
/** 画面の見出しの文字数の上限(外の画面と外部関数の登録の名前と同じ) */
|
|
114
|
+
export declare const APP_UI_LABEL_MAX = 40;
|
|
115
|
+
/** MCP の道具(名前と説明の両方が能力。説明が変わった版も同意まで止める) */
|
|
116
|
+
export type AppTool = Readonly<{
|
|
117
|
+
name: string;
|
|
118
|
+
description: string;
|
|
119
|
+
}>;
|
|
120
|
+
/** アプリの MCP のツールとプロンプトの名前の接頭辞(名前空間の `.` と `-` を `_` にする。クライアントのツールの名前は英数字、`_`、`-` だけを受ける) */
|
|
121
|
+
export declare const appToolPrefixOf: (namespace: string) => string;
|
|
122
|
+
/**
|
|
123
|
+
* アプリのマニフェスト(バージョンごと)
|
|
124
|
+
* - manifest_version: 形のバージョン(必須、APP_MANIFEST_VERSION)。登録は知らない項目を拒否し、保存済みの読み取りは拒否しない
|
|
125
|
+
* - capabilities: 対象から操作の配列
|
|
126
|
+
* 対象はコレクションのスラッグ、`*`、`@end_users`、`files`、マニフェストのコレクションの名前、APP_SETTINGS_TARGETS
|
|
127
|
+
* マニフェストのコレクションの名前の対象は、当てたコレクションだけに効く(作ったコレクションはアプリが全部の操作を持つ)
|
|
128
|
+
* - 依存の宣言(major、requires、uses、provides、collections、settings、price): appDependencies.ts
|
|
129
|
+
* - destinations: Tunasand からアプリへの送信の宛先のオリジン(https)
|
|
130
|
+
* - outbound: アプリのサーバーの側からの外への要求の宣言(outbound.ts)
|
|
131
|
+
* - secrets: 管理者が入力する秘密値の宣言(appSecrets.ts)。outbound の auth はここで宣言したキーだけを指す
|
|
132
|
+
* - events: 受ける Webhook のイベントの名前
|
|
133
|
+
* - mail: メールの送信と受信(appMail.ts。能力の要素は mail:send と mail:inbound)
|
|
134
|
+
* - channel_kinds: アプリが定義するチャネルの種類(能力、アドレスの形、チャネルごとの設定と秘密値、外のサービスから受ける経路、
|
|
135
|
+
* 本人の証明の発行者。appChannels.ts)
|
|
136
|
+
* - own_site: サイトの「自分のサイト」の能力(エンドユーザーだけの内容の全文とエンドユーザーの照合を扱う)
|
|
137
|
+
* - hosting: サイトを Tunasand のホスティングに上げる能力(`deploy_site`)。上げるのはアプリのアップロードの鍵(APP_KEY_USES.deploy)だけ
|
|
138
|
+
* 宣言の形では、サイトの D1 と R2 の bind の名前と Cron の式も求める(要素ごとに同意を通る)
|
|
139
|
+
* - deletion_url: 削除のエンドポイント(アンインストールのイベントとエンドユーザーの削除のイベントを受ける https の URL)。個人の
|
|
140
|
+
* 情報の能力を求めるアプリは必須(piiCapabilities)
|
|
141
|
+
* - targets: エラーの文と操作の記録の対象(キーは対象の id、値は表示名)、audit_actions: 操作の記録の操作の文言(キーは <アプリ>.<操作>)
|
|
142
|
+
* - messages: 対象ごとのエラーの文、problems: 検査の問題の文(キーは `<アプリ>_` で始まる問題のコード)、en: 英語の対象の名前と問題の文
|
|
143
|
+
* - permissions: 権限の対象の拡張、connections: 必要な外部の接続、emits: アプリが出すイベント(キーは名前で、外には apps.<名前空間>.<名前>。値は表示名)
|
|
144
|
+
*/
|
|
145
|
+
export type AppManifest = Readonly<{
|
|
146
|
+
manifest_version: typeof APP_MANIFEST_VERSION;
|
|
147
|
+
label: string;
|
|
148
|
+
kind: AppKind;
|
|
149
|
+
description?: string;
|
|
150
|
+
targets?: Readonly<Record<string, string>>;
|
|
151
|
+
audit_actions?: Readonly<Record<string, string>>;
|
|
152
|
+
messages?: TargetMessages;
|
|
153
|
+
problems?: Readonly<Record<string, string>>;
|
|
154
|
+
en?: Readonly<{
|
|
155
|
+
targets?: Readonly<Record<string, string>>;
|
|
156
|
+
problems?: Readonly<Record<string, string>>;
|
|
157
|
+
}>;
|
|
158
|
+
permissions?: readonly PermissionTarget[];
|
|
159
|
+
connections?: readonly ConnectionPoint[];
|
|
160
|
+
emits?: Readonly<Record<string, string>>;
|
|
161
|
+
capabilities?: Readonly<Record<string, readonly Operation[]>>;
|
|
162
|
+
destinations?: readonly string[];
|
|
163
|
+
outbound?: readonly AppOutbound[];
|
|
164
|
+
secrets?: readonly AppSecretDeclaration[];
|
|
165
|
+
events?: readonly string[];
|
|
166
|
+
mail?: AppMailDeclaration;
|
|
167
|
+
channel_kinds?: readonly AppChannelKind[];
|
|
168
|
+
ui?: readonly AppUi[];
|
|
169
|
+
tools?: readonly AppTool[];
|
|
170
|
+
own_site?: boolean;
|
|
171
|
+
hosting?: boolean | SiteHostingManifest;
|
|
172
|
+
deletion_url?: string;
|
|
173
|
+
}> & AppDependencyManifest;
|
|
174
|
+
/**
|
|
175
|
+
* アプリの鍵の用途(登録する公開鍵の JWK の use)
|
|
176
|
+
* - runtime: アプリの JWT をインストールのトークンに交換する鍵(サイトの実行時に持つ。use なしか sig)
|
|
177
|
+
* - deploy: ホスティングするサイトへのアップロードだけに使う鍵(サイトの実行時に持たせない。交換には使えない)
|
|
178
|
+
*/
|
|
179
|
+
export declare const APP_KEY_USES: {
|
|
180
|
+
readonly runtime: "sig";
|
|
181
|
+
readonly deploy: "tunasand-deploy";
|
|
182
|
+
};
|
|
183
|
+
/** 能力の要素: ホスティングするサイトへのアップロード */
|
|
184
|
+
export declare const DEPLOY_SITE_CAPABILITY = "deploy_site";
|
|
185
|
+
/** 登録簿のアプリ(namespace はアプリが持つコレクションの名前空間、なしはコレクションを持たない。verified は RYUSENKEI が開発者の身元を確認したか) */
|
|
186
|
+
export type RegisteredApp = Readonly<{
|
|
187
|
+
id: InfraId<'app'>;
|
|
188
|
+
organizationId: InfraId<'organization'> | null;
|
|
189
|
+
kind: AppKind;
|
|
190
|
+
namespace: string | null;
|
|
191
|
+
label: string;
|
|
192
|
+
verified: boolean;
|
|
193
|
+
latestVersion: number;
|
|
194
|
+
createdAt: string;
|
|
195
|
+
}>;
|
|
196
|
+
/** 依存の相手(この環境に入っているアプリ。active は止まっていない) */
|
|
197
|
+
export type AppRelation = Readonly<{
|
|
198
|
+
id: InfraId<'installation'>;
|
|
199
|
+
label: string;
|
|
200
|
+
active: boolean;
|
|
201
|
+
}>;
|
|
202
|
+
/** 必須の依存の依存先と依存元 */
|
|
203
|
+
export type InstallationRelations = Readonly<{
|
|
204
|
+
requires: readonly AppRelation[];
|
|
205
|
+
requiredBy: readonly AppRelation[];
|
|
206
|
+
}>;
|
|
207
|
+
/**
|
|
208
|
+
* ワークスペースの一覧のインストール(app はなしで旧い形のインストール)
|
|
209
|
+
* - pendingVersion は更新できる版、pending は同意を待つ能力、autoUpdate は定期の処理で新しいバージョンに上げるか
|
|
210
|
+
*/
|
|
211
|
+
export type Installation = InstallationRelations & Readonly<{
|
|
212
|
+
id: InfraId<'installation'>;
|
|
213
|
+
appId: InfraId<'app'> | null;
|
|
214
|
+
kind: InstallationKind;
|
|
215
|
+
label: string;
|
|
216
|
+
state: InstallationState;
|
|
217
|
+
version: number | null;
|
|
218
|
+
pendingVersion: number | null;
|
|
219
|
+
autoUpdate: boolean;
|
|
220
|
+
consented: readonly string[];
|
|
221
|
+
pending: readonly string[];
|
|
222
|
+
parts: readonly InstallationPart[];
|
|
223
|
+
/** 導入先が既存のコレクションに当てた記録 */
|
|
224
|
+
mapped: CollectionMappings;
|
|
225
|
+
createdAt: string;
|
|
226
|
+
dataDeletedAt: string | null;
|
|
227
|
+
/** 発行するイベントの種類(マニフェストの emits、名前空間つき) */
|
|
228
|
+
emits: readonly string[];
|
|
229
|
+
}>;
|
|
230
|
+
/** インストールが持つ部品(今の Webhook、外部関数、外の画面の行と、同梱のアプリの id に結ぶ。API の鍵はレジストリでインストール済みアプリに属する) */
|
|
231
|
+
export declare const INSTALLATION_PART_KINDS: readonly ["webhook", "function", "embed", "bundled"];
|
|
232
|
+
/** インストールが持つ部品の種類 */
|
|
233
|
+
export type InstallationPartKind = (typeof INSTALLATION_PART_KINDS)[number];
|
|
234
|
+
/** インストールが持つ部品 */
|
|
235
|
+
export type InstallationPart = Readonly<{
|
|
236
|
+
kind: InstallationPartKind;
|
|
237
|
+
ref: string;
|
|
238
|
+
}>;
|
|
239
|
+
/** マニフェストの問題(path は値の場所、code は理由) */
|
|
240
|
+
export type AppManifestProblem = Readonly<{
|
|
241
|
+
path: string;
|
|
242
|
+
code: 'required' | 'invalid' | 'too_long' | 'too_many' | 'namespace' | 'duplicate' | 'reserved' | 'unknown';
|
|
243
|
+
}>;
|
|
244
|
+
/** URL のオリジン(https のホスト名と任意のポート。手元の開発の http://localhost も許す。ほかの形と認証の情報つきは null) */
|
|
245
|
+
export declare function originOf(url: string): string | null;
|
|
246
|
+
/**
|
|
247
|
+
* アプリに委ねられる設定の領域と管理の権限(人の代理のときだけ効き、人が持ち、かつ同意にある操作だけを通す。操作は read と update)
|
|
248
|
+
* - 取り込みのデータの領域、人の取り込みのエンドユーザーの領域(管理者だけの経路)、スキーマの変更
|
|
249
|
+
*/
|
|
250
|
+
export declare const APP_SETTINGS_TARGETS: readonly [string, string, string];
|
|
251
|
+
/**
|
|
252
|
+
* マニフェストの検査(namespace は登録簿のアプリの名前空間、なしはコレクションを持てない)
|
|
253
|
+
* - 依存の宣言は appDependencyProblems
|
|
254
|
+
* - 値の形が壊れていれば問題を返し、正しければ空
|
|
255
|
+
*/
|
|
256
|
+
export declare function appManifestProblems(input: unknown, namespace: string | null): AppManifestProblem[];
|
|
257
|
+
export declare const APP_MANIFEST_VERSION = 1;
|
|
258
|
+
/** マニフェストの項目(登録はこれ以外の項目を拒否する) */
|
|
259
|
+
export declare const APP_MANIFEST_KEYS: readonly ["manifest_version", "label", "kind", "description", "targets", "audit_actions", "messages", "problems", "en", "permissions", "connections", "emits", "capabilities", "destinations", "outbound", "secrets", "channel_kinds", "events", "mail", "ui", "tools", "own_site", "hosting", "deletion_url", "major", "requires", "uses", "provides", "collections", "settings", "price"];
|
|
260
|
+
/**
|
|
261
|
+
* 登録するバージョンのマニフェストの検査(appManifestProblems に、登録のときだけの決まりを足す)
|
|
262
|
+
* - 個人の情報の能力を求めるのに削除のエンドポイントがなければ deletion_url の required(登録済みのバージョンは読むときに拒まない)
|
|
263
|
+
*/
|
|
264
|
+
export declare function registeringManifestProblems(input: unknown, namespace: string | null): AppManifestProblem[];
|
|
265
|
+
/**
|
|
266
|
+
* 画面の宣言のコレクション(マニフェストのコレクションの名前を、作ったか当てたコレクションの id に解く)
|
|
267
|
+
* - collections: マニフェストの名前 → コレクションの id
|
|
268
|
+
* - コレクションを持たないスロットは null
|
|
269
|
+
* - コレクションを持つスロットでコレクションが解けなければ undefined(当てていないコレクション、コレクションのない宣言、マニフェストにない名前)
|
|
270
|
+
*/
|
|
271
|
+
export declare function uiCollectionOf(manifest: AppManifest, screen: AppUi, collections: CollectionIds): string | null | undefined;
|
|
272
|
+
/** コレクションの名前空間の形か(登録のとき) */
|
|
273
|
+
export declare const isAppNamespace: (value: string) => boolean;
|
|
274
|
+
/** 当て先の選び残し(既存のコレクションに当てる宣言 existing で、当てていない名前) */
|
|
275
|
+
export declare const unmappedCollections: (manifest: AppManifest, mappings: CollectionMappings) => string[];
|
|
276
|
+
/**
|
|
277
|
+
* マニフェストと当て先から能力の集合(並びは辞書の順、重複なし)
|
|
278
|
+
* - マニフェストのコレクションの名前の対象は、当てたコレクションの id に解く。作るか当てていないコレクションの能力は集合に入れない
|
|
279
|
+
* - ほかのコレクションはスラッグで書き、collectionIdOf でコレクションの id に解く。解けないスラッグの能力は集合に入れない
|
|
280
|
+
*/
|
|
281
|
+
export declare function capabilitySetOf(manifest: AppManifest, mappings?: CollectionMappings, collectionIdOf?: (slug: string) => string | undefined): string[];
|
|
282
|
+
/** 前の同意にない能力(再同意で求める分) */
|
|
283
|
+
export declare const addedCapabilities: (consented: readonly string[], next: readonly string[]) => string[];
|
|
284
|
+
/** 同意した能力の集合から、判定の関数に渡す能力(対象から操作の配列) */
|
|
285
|
+
export declare function capabilitiesOf(consented: readonly string[]): Readonly<Record<string, readonly string[]>>;
|
|
286
|
+
/** 能力の集合のうち、外への送信の宛先のオリジン */
|
|
287
|
+
export declare const destinationsOf: (consented: readonly string[]) => string[];
|
|
288
|
+
/** 能力の分類(同意の画面で目立たせる順: 秘密に近いものから) */
|
|
289
|
+
export declare const CAPABILITY_CLASSES: readonly ["hosting", "confidential", "outbound", "write", "internal", "public"];
|
|
290
|
+
/** 能力の分類 */
|
|
291
|
+
export type CapabilityClass = (typeof CAPABILITY_CLASSES)[number];
|
|
292
|
+
/** 能力の要素の分類(同意の画面のまとまり。機密、外への送信、`*` の書き込みを目立たせる) */
|
|
293
|
+
export declare function capabilityClassOf(capability: string): CapabilityClass;
|
|
294
|
+
/** 能力の集合のうち個人の情報の能力(機密の分類とエンドユーザーの対象 `@end_users`。求めるアプリは削除のエンドポイントが必須) */
|
|
295
|
+
export declare const piiCapabilities: (capabilities: readonly string[]) => string[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const AUDIT_ACTION_CODES: readonly ["record.create", "record.update", "record.patch", "record.delete", "record.deleteLinked", "record.submit", "record.reject", "record.publish", "record.unpublish", "record.setVisibility", "record.publishScheduled", "record.discardSchedule", "record.discardDraft", "record.setSources", "record.setRefs", "source.create", "source.update", "source.delete", "record.changeStatus", "record.hold", "record.releaseHold", "record.read", "record.clearHolds", "form.submit", "endUserRecord.create", "endUserRecord.update", "endUserRecord.delete", "master.create", "master.update", "master.delete", "singleton.update", "integration.create", "integration.update", "integration.delete", "integration.rotateSecret", "integration.revokePreviousSecret", "account.changeLogin", "account.changePortrait", "account.removePortrait", "account.changeRole", "account.updateProfile", "account.linkRecord", "accountLink.update", "request.create", "request.approve", "request.reject", "role.create", "role.update", "role.delete", "invitation.create", "invitation.cancel", "member.ownerJoined", "member.ownerAdded", "member.ownerChanged", "member.ownerRemoved", "supportAccess.grant", "supportAccess.enter", "supportAccess.revoke", "project.create", "project.revokeAccess", "project.rename", "general.update", "project.changeSlug", "environment.create", "environment.copy", "environment.copyRetainStarted", "environment.delete", "environment.promote", "environment.promoteSchema", "environment.freeze", "environment.unfreeze", "mcpConnection.approve", "mcpConnection.remove", "mcpConnection.removeAll", "mcpConnection.drop", "mcpConnection.revokeAll", "mcpConnection.prune", "mcpConnection.adopt", "mcpRequest.create", "mcpRequest.open", "mcpRequest.deny", "mcpCode.use", "mcpToken.issue", "mcpToken.refresh", "mcpGrace.use", "mcpGrant.touch", "mcpClient.register", "secrets.reseal", "mcpInternalFields.update", "schema.update", "screens.update", "view.create", "view.update", "view.delete", "view.import", "collection.delete", "file.upload", "file.import", "file.edit", "file.delete", "file.deleteMany", "file.restoreMany", "file.publishMany", "file.publishReferenced", "file.unpublishMany", "trash.restore", "trash.restoreCollection", "trash.restoreBundle", "trash.pruneBundles", "trash.pruneRecords", "job.run", "standardApp.update", "appState.set", "appState.delete", "standardApp.install", "standardApp.mapCollections", "standardApp.revertInstall", "content.import", "transferPlan.update", "preview.rotateSecret", "preview.revokePreviousSecret", "mediaSigning.create", "apiKey.create", "apiKey.update", "apiKey.revoke", "apiKey.rotate", "apiKey.delete", "readToken.issue", "readToken.revoke", "mailDomain.add", "mailDomain.check", "mailDomain.remove", "app.register", "app.publish", "app.updateKeys", "app.install", "app.consent", "app.updateVersion", "app.setAutoUpdate", "app.changeState", "app.uninstall", "app.deleteData", "app.emitEvent", "files.alignMarkers", "app.setSecret", "app.deleteSecret", "channel.create", "channel.update", "channel.remove", "channel.setSecret", "channel.deleteSecret", "channel.pruneSecrets", "site.deployStart", "site.deployResult", "deployment.place", "deployment.activate", "end_user.create", "end_user.changeStatus", "end_user.delete", "end_user.erase", "end_user.link", "end_user.linkByInvite", "end_user.ensure", "end_user.purgeInvites", "inbox.markRead", "standardApp.provision", "readToken.prune", "webhook.recordDeliveries", "webhook.queueDeliveries", "webhook.claimRetries", "webhook.pruneDeliveries", "import.createOriginKey", "domain.request", "domain.verify", "domain.remove", "domain.set_slug", "approval.request", "approval.cancel", "approval.approve", "approval.reject", "approval.settle", "app.planInstall", "import.pruneOriginals", "import.saveOriginals", "import.recordRun", "end_user.confirmLink", "end_user.unlink", "entitlement.create", "entitlement.change", "entitlement.end", "end_user.import", "end_user.importOne", "end_user.invite", "end_user.updateSettings", "end_user.recordConsent", "end_user.recordBlock", "suppression.add", "operator.restore", "operator.import", "operator.prune", "operator.emergency", "operator.trialSession", "operator.deleteTrial", "operator.deleteProject", "operator.trialHostname", "operator.importApiKeys", "operator.copyMembers", "operator.createApiKey", "operator.resealSecrets", "operator.registerApp", "operator.publishApp", "operator.setAppKeys", "operator.setStandardApp", "operator.removeStandardApp"];
|
|
2
|
+
export type AuditActionCode = (typeof AUDIT_ACTION_CODES)[number];
|
|
3
|
+
/** 旧い文の接尾辞で移さない対象の種類(コレクションの id でない対象。連携の登録は表で移す) */
|
|
4
|
+
export declare const NON_COLLECTION_TARGETS: readonly ["request", "role", "account", "invitation", "support_access", "project", "environment", "mcp_connection", "schema", "screens", "record", "file", "singleton", "job", "standard_app", "trash", "calendar", "settings", "preview", "media_signing", "api_key", "read_token", "mail_domain", "app", "installation", "end_user", "end_user_identity", "entitlement", "end_user_import", "suppression", "webhook", "external_function", "external_screen", "contact", "art-guide"];
|
|
5
|
+
/** 操作の履歴の行の、操作と対象の部分 */
|
|
6
|
+
export type AuditActionRow = Readonly<{
|
|
7
|
+
action: string;
|
|
8
|
+
target_type: string;
|
|
9
|
+
detail: string | null;
|
|
10
|
+
}>;
|
|
11
|
+
/** 旧い文の行をコードの行にする(target_label は文から外した対象の表示名。コードの行と知らない文はそのまま) */
|
|
12
|
+
export declare function normalizeAuditAction<R extends AuditActionRow>(row: R): R;
|
|
13
|
+
/** 照会に使う action の値(コードと、同じ操作の旧い文。旧い文の行が消えたらコードだけにする) */
|
|
14
|
+
export declare const auditActionValues: (code: AuditActionCode) => string[];
|
|
15
|
+
/** 要点の JSON に対象の表示名を足す(要点が JSON のオブジェクトでなければそのまま) */
|
|
16
|
+
export declare function withTargetLabel(detail: string | null, label: string): string | null;
|
|
17
|
+
/** 要点の JSON の対象の表示名(なければ undefined) */
|
|
18
|
+
export declare function targetLabelOf(detail: string | null): string | undefined;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { type AuditActionRow } from './auditActions.js';
|
|
2
|
+
export declare const AUDIT_ACTION_MESSAGES: {
|
|
3
|
+
readonly 'record.create': "{target}を作成";
|
|
4
|
+
readonly 'record.update': "{target}を更新";
|
|
5
|
+
readonly 'record.patch': "{target}を更新";
|
|
6
|
+
readonly 'record.delete': "{target}を削除";
|
|
7
|
+
readonly 'record.deleteLinked': "{target}とアカウントを削除";
|
|
8
|
+
readonly 'record.submit': "{target}のレビューを依頼";
|
|
9
|
+
readonly 'record.reject': "{target}を差し戻し";
|
|
10
|
+
readonly 'record.publish': "{target}を公開";
|
|
11
|
+
readonly 'record.unpublish': "{target}を下書きに戻す";
|
|
12
|
+
readonly 'record.publishScheduled': "予約した{target}を公開";
|
|
13
|
+
readonly 'record.discardSchedule': "{target}の公開の予約を取り消し(検査の不一致)";
|
|
14
|
+
readonly 'record.discardDraft': "{target}の編集中の版を破棄";
|
|
15
|
+
readonly 'record.setVisibility': "{target}の公開の範囲を変更";
|
|
16
|
+
readonly 'record.setSources': "{target}の参考資料を変更";
|
|
17
|
+
readonly 'source.create': "{target}を作成";
|
|
18
|
+
readonly 'source.update': "{target}を更新";
|
|
19
|
+
readonly 'source.delete': "{target}を削除";
|
|
20
|
+
readonly 'record.setRefs': "{target}の参照を変更";
|
|
21
|
+
readonly 'record.changeStatus': "ステータスを変更";
|
|
22
|
+
readonly 'record.hold': "{target}をアプリで占有";
|
|
23
|
+
readonly 'record.releaseHold': "{target}のアプリの占有を解放";
|
|
24
|
+
readonly 'record.read': "{target}を閲覧";
|
|
25
|
+
readonly 'record.clearHolds': "{target}のアプリの占有をすべて解除";
|
|
26
|
+
readonly 'form.submit': "{target}にフォームから送信";
|
|
27
|
+
readonly 'endUserRecord.create': "{target}を本人が作成";
|
|
28
|
+
readonly 'endUserRecord.update': "{target}を本人が更新";
|
|
29
|
+
readonly 'endUserRecord.delete': "{target}を本人が削除";
|
|
30
|
+
readonly 'master.create': "マスタを作成";
|
|
31
|
+
readonly 'master.update': "マスタを更新";
|
|
32
|
+
readonly 'master.delete': "マスタを削除";
|
|
33
|
+
readonly 'singleton.update': "内容を更新";
|
|
34
|
+
readonly 'integration.create': "{target}を追加";
|
|
35
|
+
readonly 'integration.update': "{target}を変更";
|
|
36
|
+
readonly 'integration.delete': "{target}を削除";
|
|
37
|
+
readonly 'integration.rotateSecret': "{target}の署名シークレットを再発行";
|
|
38
|
+
readonly 'integration.revokePreviousSecret': "{target}の古い署名シークレットを失効";
|
|
39
|
+
readonly 'account.changeLogin': "ログインのアカウントを変更";
|
|
40
|
+
readonly 'account.changePortrait': "顔の画像を変更";
|
|
41
|
+
readonly 'account.removePortrait': "顔の画像を外す";
|
|
42
|
+
readonly 'accountLink.update': "アカウントの結び付きを変更";
|
|
43
|
+
readonly 'account.changeRole': "アカウントのロールを変更";
|
|
44
|
+
readonly 'account.updateProfile': "アカウントのプロフィールを変更";
|
|
45
|
+
readonly 'account.linkRecord': "アカウントにレコードを結び付け";
|
|
46
|
+
readonly 'request.create': "作成を依頼";
|
|
47
|
+
readonly 'request.approve': "作成の依頼を承認";
|
|
48
|
+
readonly 'request.reject': "作成の依頼を却下";
|
|
49
|
+
readonly 'role.create': "ロールを作成";
|
|
50
|
+
readonly 'role.update': "ロールを更新";
|
|
51
|
+
readonly 'role.delete': "ロールを削除";
|
|
52
|
+
readonly 'invitation.create': "メンバーを招待";
|
|
53
|
+
readonly 'invitation.cancel': "招待を取り消し";
|
|
54
|
+
readonly 'member.ownerJoined': "組織のオーナーが自分をメンバーに追加";
|
|
55
|
+
readonly 'member.ownerAdded': "組織のオーナーがメンバーを追加";
|
|
56
|
+
readonly 'member.ownerChanged': "組織のオーナーがメンバーのロールを変更";
|
|
57
|
+
readonly 'member.ownerRemoved': "組織のオーナーがメンバーを削除";
|
|
58
|
+
readonly 'supportAccess.grant': "運営者のサポートのアクセスを許可";
|
|
59
|
+
readonly 'supportAccess.enter': "運営者がサポートのアクセスの許可でワークスペースに入った";
|
|
60
|
+
readonly 'supportAccess.revoke': "運営者のサポートのアクセスの許可を取り消し";
|
|
61
|
+
readonly 'project.create': "プロジェクトを作成";
|
|
62
|
+
readonly 'project.revokeAccess': "セッションと接続を一括で取り消し";
|
|
63
|
+
readonly 'project.rename': "プロジェクトの名前を変更";
|
|
64
|
+
readonly 'general.update': "一般の設定を変更";
|
|
65
|
+
readonly 'project.changeSlug': "プロジェクトのスラッグを変更";
|
|
66
|
+
readonly 'environment.create': "環境を作成";
|
|
67
|
+
readonly 'environment.copy': "環境をコピー";
|
|
68
|
+
readonly 'environment.copyRetainStarted': "本番の値を保つ環境のコピーを開始";
|
|
69
|
+
readonly 'environment.delete': "環境を削除";
|
|
70
|
+
readonly 'environment.promote': "本番の環境を切り替え";
|
|
71
|
+
readonly 'environment.promoteSchema': "環境のスキーマを本番に反映";
|
|
72
|
+
readonly 'environment.freeze': "本番の環境の書き込みを停止";
|
|
73
|
+
readonly 'environment.unfreeze': "本番の環境の書き込みを再開";
|
|
74
|
+
readonly 'mcpConnection.approve': "AI の接続を許可";
|
|
75
|
+
readonly 'mcpConnection.remove': "AI の接続を外す";
|
|
76
|
+
readonly 'mcpConnection.removeAll': "AI の接続をすべて外す";
|
|
77
|
+
readonly 'mcpConnection.drop': "AI の接続を止める";
|
|
78
|
+
readonly 'mcpConnection.revokeAll': "AI の接続を一括で取り消し";
|
|
79
|
+
readonly 'mcpConnection.prune': "メンバーでない人の AI の接続を外す";
|
|
80
|
+
readonly 'mcpConnection.adopt': "AI の接続を取り込む";
|
|
81
|
+
readonly 'mcpRequest.create': "AI の接続の要求を作成";
|
|
82
|
+
readonly 'mcpRequest.open': "AI の接続の要求を開く";
|
|
83
|
+
readonly 'mcpRequest.deny': "AI の接続を拒否";
|
|
84
|
+
readonly 'mcpCode.use': "AI の接続の認可のコードを使用";
|
|
85
|
+
readonly 'mcpToken.issue': "AI の接続のトークンを発行";
|
|
86
|
+
readonly 'mcpToken.refresh': "AI の接続のトークンを更新";
|
|
87
|
+
readonly 'mcpGrace.use': "AI の接続のトークンの猶予を使用";
|
|
88
|
+
readonly 'mcpGrant.touch': "AI の接続を使用";
|
|
89
|
+
readonly 'mcpClient.register': "AI のクライアントを登録";
|
|
90
|
+
readonly 'secrets.reseal': "秘密値を今の鍵で封印し直し";
|
|
91
|
+
readonly 'app.emitEvent': "アプリのイベントを送信";
|
|
92
|
+
readonly 'files.alignMarkers': "ファイルの公開の印の照らし合わせを依頼";
|
|
93
|
+
readonly 'mcpInternalFields.update': "MCP に渡す内部のみのフィールドを変更";
|
|
94
|
+
readonly 'schema.update': "スキーマを変更";
|
|
95
|
+
readonly 'screens.update': "画面の設定を変更";
|
|
96
|
+
readonly 'view.create': "ビューを作成";
|
|
97
|
+
readonly 'view.update': "ビューを変更";
|
|
98
|
+
readonly 'view.delete': "ビューを削除";
|
|
99
|
+
readonly 'view.import': "チームのビューを取り込み";
|
|
100
|
+
readonly 'collection.delete': "コレクションを削除";
|
|
101
|
+
readonly 'file.upload': "画像をアップロード";
|
|
102
|
+
readonly 'file.import': "画像を URL から取り込み";
|
|
103
|
+
readonly 'file.edit': "画像を編集";
|
|
104
|
+
readonly 'file.delete': "画像を削除";
|
|
105
|
+
readonly 'file.deleteMany': "画像をまとめて削除";
|
|
106
|
+
readonly 'file.restoreMany': "画像をまとめて元に戻す";
|
|
107
|
+
readonly 'file.publishMany': "画像を公開";
|
|
108
|
+
readonly 'file.publishReferenced': "参照された画像を公開";
|
|
109
|
+
readonly 'file.unpublishMany': "画像の公開を終了";
|
|
110
|
+
readonly 'trash.restore': "ゴミ箱から元に戻す";
|
|
111
|
+
readonly 'trash.restoreCollection': "ゴミ箱からコレクションを元に戻す";
|
|
112
|
+
readonly 'trash.restoreBundle': "ゴミ箱のまとまりを元に戻す";
|
|
113
|
+
readonly 'trash.pruneBundles': "期間を過ぎたゴミ箱のまとまりを削除";
|
|
114
|
+
readonly 'trash.pruneRecords': "期間を過ぎたゴミ箱のレコードを削除";
|
|
115
|
+
readonly 'job.run': "バッチを実行";
|
|
116
|
+
readonly 'standardApp.update': "標準の機能を変更";
|
|
117
|
+
readonly 'appState.set': "アプリ用の状態を保存";
|
|
118
|
+
readonly 'appState.delete': "アプリ用の状態を削除";
|
|
119
|
+
readonly 'standardApp.install': "標準の機能をインストール";
|
|
120
|
+
readonly 'standardApp.mapCollections': "標準の機能のコレクションの当て先を選択";
|
|
121
|
+
readonly 'standardApp.revertInstall': "標準の機能のインストールを取り消し";
|
|
122
|
+
readonly 'content.import': "コンテンツを一括でインポート";
|
|
123
|
+
readonly 'transferPlan.update': "移行の計画を更新";
|
|
124
|
+
readonly 'preview.rotateSecret': "プレビューの署名シークレットを再発行";
|
|
125
|
+
readonly 'preview.revokePreviousSecret': "プレビューの古い署名シークレットを失効";
|
|
126
|
+
readonly 'mediaSigning.create': "署名付き URL のキーを作成";
|
|
127
|
+
readonly 'apiKey.create': "API キーを作成";
|
|
128
|
+
readonly 'apiKey.update': "API キーの権限を変更";
|
|
129
|
+
readonly 'apiKey.revoke': "API キーを失効";
|
|
130
|
+
readonly 'apiKey.rotate': "API キーを再発行";
|
|
131
|
+
readonly 'apiKey.delete': "API キーを削除";
|
|
132
|
+
readonly 'readToken.issue': "読み取りのトークンを発行";
|
|
133
|
+
readonly 'readToken.revoke': "読み取りのトークンを失効";
|
|
134
|
+
readonly 'mailDomain.add': "送信のドメインを登録";
|
|
135
|
+
readonly 'mailDomain.check': "送信のドメインの状態を確認";
|
|
136
|
+
readonly 'mailDomain.remove': "送信のドメインを削除";
|
|
137
|
+
readonly 'app.register': "アプリを登録";
|
|
138
|
+
readonly 'app.publish': "アプリの新しいバージョンを公開";
|
|
139
|
+
readonly 'app.updateKeys': "アプリのキーを更新";
|
|
140
|
+
readonly 'app.install': "アプリをインストール";
|
|
141
|
+
readonly 'app.consent': "アプリの能力に同意";
|
|
142
|
+
readonly 'app.updateVersion': "アプリを新しいバージョンに更新";
|
|
143
|
+
readonly 'app.setAutoUpdate': "アプリの自動の更新を切り替え";
|
|
144
|
+
readonly 'app.changeState': "アプリの有効と無効を変更";
|
|
145
|
+
readonly 'app.uninstall': "アプリをアンインストール";
|
|
146
|
+
readonly 'app.deleteData': "アプリのデータを削除";
|
|
147
|
+
readonly 'app.setSecret': "アプリの秘密値を入力";
|
|
148
|
+
readonly 'app.deleteSecret': "アプリの秘密値を削除";
|
|
149
|
+
readonly 'channel.create': "チャネルを作成";
|
|
150
|
+
readonly 'channel.update': "チャネルを変更";
|
|
151
|
+
readonly 'channel.remove': "チャネルを削除";
|
|
152
|
+
readonly 'channel.setSecret': "チャネルの秘密値を入力";
|
|
153
|
+
readonly 'channel.deleteSecret': "チャネルの秘密値を削除";
|
|
154
|
+
readonly 'channel.pruneSecrets': "削除したチャネルの秘密値を整理";
|
|
155
|
+
readonly 'site.deployStart': "アプリがサイトのアップロードを開始";
|
|
156
|
+
readonly 'site.deployResult': "アプリのサイトのアップロードの結果";
|
|
157
|
+
readonly 'deployment.place': "サイトを配置";
|
|
158
|
+
readonly 'deployment.activate': "サイトのデプロイを有効化";
|
|
159
|
+
readonly 'end_user.create': "エンドユーザーを作成";
|
|
160
|
+
readonly 'end_user.changeStatus': "エンドユーザーの状態を変更";
|
|
161
|
+
readonly 'end_user.delete': "エンドユーザーを削除";
|
|
162
|
+
readonly 'end_user.erase': "エンドユーザーの削除の求めを実行(戻せない)";
|
|
163
|
+
readonly 'end_user.link': "エンドユーザーを紐付け";
|
|
164
|
+
readonly 'end_user.linkByInvite': "エンドユーザーを招待で紐付け";
|
|
165
|
+
readonly 'end_user.ensure': "エンドユーザーをログインで作成";
|
|
166
|
+
readonly 'end_user.purgeInvites': "期限の過ぎた招待を削除";
|
|
167
|
+
readonly 'inbox.markRead': "通知を既読にする";
|
|
168
|
+
readonly 'standardApp.provision': "同梱のアプリを作成の処理で導入";
|
|
169
|
+
readonly 'readToken.prune': "期限の過ぎた読み取りのトークンを削除";
|
|
170
|
+
readonly 'webhook.recordDeliveries': "Webhook・外部関数の送信を記録";
|
|
171
|
+
readonly 'webhook.queueDeliveries': "Webhook の送信を予定";
|
|
172
|
+
readonly 'webhook.claimRetries': "Webhook の再送を引き取り";
|
|
173
|
+
readonly 'webhook.pruneDeliveries': "期間の過ぎた送信記録を削除";
|
|
174
|
+
readonly 'import.createOriginKey': "取り込みの元の ID の鍵を作成";
|
|
175
|
+
readonly 'domain.request': "ドメインを申請";
|
|
176
|
+
readonly 'domain.verify': "ドメインを確認";
|
|
177
|
+
readonly 'domain.remove': "ドメインを削除";
|
|
178
|
+
readonly 'domain.set_slug': "検証用のホスト名を設定";
|
|
179
|
+
readonly 'approval.request': "本番への反映を申請";
|
|
180
|
+
readonly 'approval.cancel': "本番への反映の申請を取り下げ";
|
|
181
|
+
readonly 'approval.approve': "本番への反映の申請を承認";
|
|
182
|
+
readonly 'approval.reject': "本番への反映の申請を却下";
|
|
183
|
+
readonly 'approval.settle': "承認した申請の実行の結果を記録";
|
|
184
|
+
readonly 'app.planInstall': "アプリのインストールの計画を保存";
|
|
185
|
+
readonly 'import.pruneOriginals': "期間を過ぎた取り込みの元の HTML を削除";
|
|
186
|
+
readonly 'import.saveOriginals': "取り込みの元の HTML を保存";
|
|
187
|
+
readonly 'import.recordRun': "取り込みの実行の完了を記録";
|
|
188
|
+
readonly 'end_user.confirmLink': "エンドユーザーの紐付けを確認して有効に";
|
|
189
|
+
readonly 'end_user.unlink': "エンドユーザーの紐付けを解除";
|
|
190
|
+
readonly 'entitlement.create': "エンドユーザーの権利を付与";
|
|
191
|
+
readonly 'entitlement.change': "エンドユーザーの権利の期間を変更";
|
|
192
|
+
readonly 'entitlement.end': "エンドユーザーの権利を終了";
|
|
193
|
+
readonly 'end_user.import': "エンドユーザーをインポート";
|
|
194
|
+
readonly 'end_user.importOne': "エンドユーザーを1人インポート";
|
|
195
|
+
readonly 'end_user.invite': "エンドユーザーの招待を発行";
|
|
196
|
+
readonly 'end_user.updateSettings': "エンドユーザーの設定を変更";
|
|
197
|
+
readonly 'end_user.recordConsent': "エンドユーザーの同意を記録";
|
|
198
|
+
readonly 'end_user.recordBlock': "エンドユーザーのチャネルのブロックを記録";
|
|
199
|
+
readonly 'suppression.add': "抑止の一覧に記録";
|
|
200
|
+
readonly 'operator.restore': "運営者がプロジェクトを時点の復元で戻した";
|
|
201
|
+
readonly 'operator.import': "運営者がプロジェクトのデータをエクスポートで置き換えた";
|
|
202
|
+
readonly 'operator.prune': "運営者がインストールしていないアプリのデータを削除した";
|
|
203
|
+
readonly 'operator.emergency': "運営者が非常の手順でサポートのアクセスを申請した";
|
|
204
|
+
readonly 'operator.trialSession': "運営者が検証用のプロジェクトで試験用のセッションを出した";
|
|
205
|
+
readonly 'operator.deleteTrial': "運営者が検証用のプロジェクトを削除した";
|
|
206
|
+
readonly 'operator.deleteProject': "運営者がプロジェクトを削除した";
|
|
207
|
+
readonly 'operator.trialHostname': "運営者が検証用のプロジェクトのサイトに検証用のホスト名を結んだ";
|
|
208
|
+
readonly 'operator.importApiKeys': "運営者が環境の API キーをプロジェクトへコピーした";
|
|
209
|
+
readonly 'operator.copyMembers': "運営者が別のプロジェクトのメンバーとロールをコピーした";
|
|
210
|
+
readonly 'operator.createApiKey': "運営者が配信用の API キーを作成した";
|
|
211
|
+
readonly 'operator.resealSecrets': "運営者が改名の前の形の秘密の値を封印し直した";
|
|
212
|
+
readonly 'operator.registerApp': "運営者がアプリを登録した";
|
|
213
|
+
readonly 'operator.publishApp': "運営者がアプリの新しいバージョンを公開した";
|
|
214
|
+
readonly 'operator.setAppKeys': "運営者がアプリの公開鍵を設定した";
|
|
215
|
+
readonly 'operator.setStandardApp': "運営者が標準アプリを指定した";
|
|
216
|
+
readonly 'operator.removeStandardApp': "運営者が標準アプリの指定を外した";
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* 操作の履歴の行の操作の文(旧い文の行はコードにしてから引く。知らないコードと文はそのまま)
|
|
220
|
+
* targetLabel は対象の種類の表示名(今のスキーマのコレクションの表示名と、アプリの対象)。なければ要点の target_label、なければ TARGET_LABELS、なければ種類の値
|
|
221
|
+
* apps はアプリの操作のコードの文言(manifest の auditActions)
|
|
222
|
+
*/
|
|
223
|
+
export declare function auditActionLabel(row: AuditActionRow, targetLabel?: (type: string) => string | undefined, apps?: Readonly<Record<string, string>>): string;
|