@tunasand/sdk 0.8.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +137 -0
- package/README.md +165 -144
- package/dist/analytics.js +183 -109
- package/dist/app.js +276 -166
- package/dist/apps-BysPfMuR.js +408 -0
- package/dist/astro-image.d.ts +1 -0
- package/dist/astro-image.js +33 -0
- package/dist/astro-server-Bwau8F6d.js +99 -0
- package/dist/astro-server.d.ts +1 -0
- package/dist/astro-server.js +1 -0
- package/dist/astro.d.ts +1 -0
- package/dist/astro.js +306 -0
- package/dist/bridge-C2Bl-OAF.js +80 -0
- package/dist/bridge.js +1 -13
- package/dist/build-file-DNi0PHC5.js +31 -0
- package/dist/cli.js +6212 -8
- package/dist/{client-Derrexwr.js → client-C8STAw9T.js} +43 -24
- package/dist/code-N8pBUDbq.js +30 -0
- package/dist/code.d.ts +1 -0
- package/dist/code.js +1 -0
- package/dist/collection-26aglrg6.js +282 -0
- package/dist/{declared-DuNMsdXw.js → declared-CE4a61qb.js} +35 -35
- package/dist/delivery.js +121 -114
- package/dist/dev-operations-Tutwi1On.js +46 -0
- package/dist/dev.js +9 -16
- package/dist/embeds-DY6O5TrJ.js +29 -0
- package/dist/end-users.d.ts +1 -0
- package/dist/end-users.js +189 -0
- package/dist/endUsers-DODfjnv1.js +77 -0
- package/dist/{errorLabels-BgtQ_zUn.js → errorLabels-BK1NJ6Wz.js} +374 -238
- package/dist/i18n.js +4 -4
- package/dist/ids-DmtIoqBX.js +109 -0
- package/dist/integrations.js +95 -24
- package/dist/{ja-Du6ooL6i.js → ja-B3lAaOhZ.js} +91 -45
- package/dist/{ja-CeHU0EaY.js → ja-axQPxMJ-.js} +3 -3
- package/dist/operations-CIB99rIY.js +95 -0
- package/dist/operations.d.ts +1 -0
- package/dist/operations.js +1 -0
- package/dist/{page-Bzrj24sJ.js → page-yo1cw1kW.js} +1 -1
- package/dist/paymentPort-p1jV44Zz.js +203 -0
- package/dist/preview.js +8 -1
- package/dist/{profile-1em_lcxq.js → profile-DBsXLvvI.js} +48 -48
- package/dist/rich-text.js +16 -16
- package/dist/{schema-WnobuwLg.js → schema-Bs_BUUNv.js} +526 -265
- package/dist/schema.js +66 -88
- package/dist/types/access/src/handoff.d.ts +19 -14
- package/dist/types/access/src/index.d.ts +2 -2
- package/dist/types/access/src/jws.d.ts +41 -0
- package/dist/types/access/src/oidc.d.ts +12 -2
- package/dist/types/access/src/signed.d.ts +0 -2
- package/dist/types/adapter-cloudflare/src/eventLog/viewSchema.d.ts +11 -0
- package/dist/types/contract/src/accountProfile.d.ts +7 -0
- package/dist/types/contract/src/api/define.d.ts +165 -0
- package/dist/types/contract/src/apiKeys.d.ts +6 -2
- package/dist/types/contract/src/app.d.ts +32 -7
- package/dist/types/contract/src/appChannels.d.ts +152 -0
- package/dist/types/contract/src/appDefinition.d.ts +11 -5
- package/dist/types/contract/src/appDependencies.d.ts +107 -24
- package/dist/types/contract/src/appIdentities.d.ts +21 -0
- package/dist/types/contract/src/appInbound.d.ts +53 -0
- package/dist/types/contract/src/appMail.d.ts +106 -0
- package/dist/types/contract/src/appSecrets.d.ts +63 -0
- package/dist/types/contract/src/appServer.d.ts +460 -45
- package/dist/types/contract/src/approvals.d.ts +1 -1
- package/dist/types/contract/src/apps.d.ts +126 -60
- package/dist/types/contract/src/auditActions.d.ts +2 -2
- package/dist/types/contract/src/auditLabels.d.ts +120 -15
- package/dist/types/contract/src/authorize.d.ts +42 -14
- package/dist/types/contract/src/bridge.d.ts +35 -36
- package/dist/types/contract/src/consents.d.ts +29 -27
- package/dist/types/contract/src/deletion.d.ts +18 -0
- package/dist/types/contract/src/embeds.d.ts +26 -90
- package/dist/types/contract/src/{customerLabels.d.ts → endUserLabels.d.ts} +6 -9
- package/dist/types/contract/src/endUsers.d.ts +244 -0
- package/dist/types/contract/src/errorLabels.d.ts +67 -37
- package/dist/types/contract/src/errorLabelsEn.d.ts +50 -33
- package/dist/types/contract/src/errors.d.ts +28 -16
- package/dist/types/contract/src/eventSchemas.d.ts +70 -0
- package/dist/types/contract/src/eventTraces.d.ts +41 -0
- package/dist/types/contract/src/failureStatus.d.ts +14 -22
- package/dist/types/contract/src/fieldAccess.d.ts +8 -8
- package/dist/types/contract/src/formLabels.d.ts +3 -0
- package/dist/types/contract/src/forms.d.ts +4 -0
- package/dist/types/contract/src/grants.d.ts +26 -0
- package/dist/types/contract/src/headers.d.ts +5 -0
- package/dist/types/contract/src/hostingRpc.d.ts +44 -19
- package/dist/types/contract/src/identifiers.d.ts +45 -17
- package/dist/types/contract/src/ids.d.ts +18 -10
- package/dist/types/contract/src/import.d.ts +17 -16
- package/dist/types/contract/src/index.d.ts +57 -29
- package/dist/types/contract/src/integrationGraph.d.ts +83 -0
- package/dist/types/contract/src/issueLabels.d.ts +121 -81
- package/dist/types/contract/src/issueLabelsEn.d.ts +61 -41
- package/dist/types/contract/src/manage.d.ts +16 -7
- package/dist/types/contract/src/manageLabels.d.ts +2 -0
- package/dist/types/contract/src/manifestText.d.ts +66 -0
- package/dist/types/contract/src/messagePort.d.ts +208 -0
- package/dist/types/contract/src/migration.d.ts +2 -2
- package/dist/types/contract/src/notices.d.ts +37 -0
- package/dist/types/contract/src/operationEffects.d.ts +39 -0
- package/dist/types/contract/src/operatorOperations.d.ts +104 -110
- package/dist/types/contract/src/outbound.d.ts +29 -0
- package/dist/types/contract/src/paths.d.ts +13 -0
- package/dist/types/contract/src/paymentPort.d.ts +129 -0
- package/dist/types/contract/src/pending.d.ts +2 -0
- package/dist/types/contract/src/permissions.d.ts +7 -11
- package/dist/types/contract/src/perspective.d.ts +26 -0
- package/dist/types/contract/src/powers.d.ts +5 -0
- package/dist/types/contract/src/principal.d.ts +127 -56
- package/dist/types/contract/src/readPages.d.ts +92 -0
- package/dist/types/contract/src/recordLabels.d.ts +6 -0
- package/dist/types/contract/src/roles.d.ts +7 -4
- package/dist/types/contract/src/ruleLabels.d.ts +16 -0
- package/dist/types/contract/src/ruleProblems.d.ts +16 -0
- package/dist/types/contract/src/schemaLabels.d.ts +8 -0
- package/dist/types/contract/src/settingProblems.d.ts +18 -1
- package/dist/types/contract/src/settings.d.ts +5 -7
- package/dist/types/contract/src/siteDeclaration.d.ts +7 -7
- package/dist/types/contract/src/siteIndex.d.ts +76 -0
- package/dist/types/contract/src/transfer.d.ts +1 -1
- package/dist/types/contract/src/trial.d.ts +4 -1
- package/dist/types/contract/src/versions.d.ts +1 -3
- package/dist/types/contract/src/viewEvent.d.ts +0 -9
- package/dist/types/contract/src/webhooks.d.ts +24 -3
- package/dist/types/contract/src/workflow.d.ts +16 -19
- package/dist/types/contract/src/workspaceItems.d.ts +23 -7
- package/dist/types/contract/src/workspacePaths.d.ts +1 -1
- package/dist/types/rich-text/src/html.d.ts +1 -1
- package/dist/types/rich-text/src/index.d.ts +8 -7
- package/dist/types/rich-text/src/labels/en.d.ts +1 -1
- package/dist/types/rich-text/src/labels/ja.d.ts +2 -2
- package/dist/types/rich-text/src/library.d.ts +1 -1
- package/dist/types/rich-text/src/media.d.ts +2 -0
- package/dist/types/rich-text/src/normalize.d.ts +1 -1
- package/dist/types/rich-text/src/problems.d.ts +5 -5
- package/dist/types/rich-text/src/profile.d.ts +10 -10
- package/dist/types/rich-text/src/render.d.ts +1 -1
- package/dist/types/rich-text/src/schema.d.ts +2 -2
- package/dist/types/rich-text/src/standard.d.ts +4 -4
- package/dist/types/rich-text/src/types.d.ts +2 -2
- package/dist/types/schema/src/audience.d.ts +1 -3
- package/dist/types/schema/src/capabilities.d.ts +18 -27
- package/dist/types/schema/src/changes.d.ts +3 -1
- package/dist/types/schema/src/collection.d.ts +142 -111
- package/dist/types/schema/src/defaultSchema.d.ts +8 -2
- package/dist/types/schema/src/fieldIds.d.ts +18 -0
- package/dist/types/schema/src/file.d.ts +24 -11
- package/dist/types/schema/src/fileRefs.d.ts +14 -0
- package/dist/types/schema/src/fileSignature.d.ts +20 -0
- package/dist/types/schema/src/filesCollection.d.ts +7 -0
- package/dist/types/schema/src/forms.d.ts +43 -0
- package/dist/types/schema/src/imageMetadata.d.ts +9 -0
- package/dist/types/schema/src/index.d.ts +19 -10
- package/dist/types/schema/src/indexes.d.ts +11 -0
- package/dist/types/schema/src/input.d.ts +1 -1
- package/dist/types/schema/src/integrity.d.ts +8 -7
- package/dist/types/schema/src/kinds.d.ts +26 -0
- package/dist/types/schema/src/labels/en.d.ts +89 -46
- package/dist/types/schema/src/labels/ja.d.ts +92 -46
- package/dist/types/schema/src/mediaUrl.d.ts +26 -33
- package/dist/types/schema/src/page.d.ts +4 -4
- package/dist/types/schema/src/problems.d.ts +85 -42
- package/dist/types/schema/src/refs.d.ts +0 -9
- package/dist/types/schema/src/schema.d.ts +17 -12
- package/dist/types/schema/src/selfOps.d.ts +20 -19
- package/dist/types/schema/src/traits.d.ts +28 -0
- package/dist/types/schema/src/typesSource.d.ts +1 -1
- package/dist/types/schema/src/values.d.ts +5 -2
- package/dist/types/schema/src/widening.d.ts +3 -0
- package/dist/types/sdk/src/analytics.d.ts +2 -1
- package/dist/types/sdk/src/app.d.ts +43 -14
- package/dist/types/sdk/src/astro-image.d.ts +19 -0
- package/dist/types/sdk/src/astro-response.d.ts +6 -0
- package/dist/types/sdk/src/astro-server.d.ts +16 -0
- package/dist/types/sdk/src/astro.d.ts +19 -0
- package/dist/types/sdk/src/bridge.d.ts +2 -4
- package/dist/types/sdk/src/code.d.ts +61 -0
- package/dist/types/sdk/src/delegation.d.ts +13 -3
- package/dist/types/sdk/src/delivery/changes.d.ts +4 -4
- package/dist/types/sdk/src/delivery/client.d.ts +33 -22
- package/dist/types/sdk/src/delivery/fields.d.ts +3 -3
- package/dist/types/sdk/src/delivery/index.d.ts +3 -3
- package/dist/types/sdk/src/delivery/media.d.ts +5 -8
- package/dist/types/sdk/src/delivery/query.d.ts +15 -11
- package/dist/types/sdk/src/delivery/schema.d.ts +1 -1
- package/dist/types/sdk/src/delivery/values.d.ts +10 -14
- package/dist/types/sdk/src/delivery.d.ts +2 -2
- package/dist/types/sdk/src/dev-operations.d.ts +20 -0
- package/dist/types/sdk/src/dev.d.ts +6 -5
- package/dist/types/sdk/src/end-users.d.ts +187 -0
- package/dist/types/sdk/src/i18n.d.ts +2 -2
- package/dist/types/sdk/src/integrations.d.ts +14 -21
- package/dist/types/sdk/src/operations.d.ts +17 -0
- package/dist/types/sdk/src/preview.d.ts +2 -1
- package/dist/types/sdk/src/rich-text.d.ts +2 -2
- package/dist/types/sdk/src/schema.d.ts +1 -1
- package/dist/types/sdk/src/site/artifact.d.ts +64 -0
- package/dist/types/sdk/src/site/build-file.d.ts +30 -0
- package/dist/types/sdk/src/site/check-code.d.ts +14 -0
- package/dist/types/sdk/src/site/check-text.d.ts +19 -0
- package/dist/types/sdk/src/site/cli.d.ts +52 -0
- package/dist/types/sdk/src/site/content-type.d.ts +2 -0
- package/dist/types/sdk/src/site/labels.d.ts +14 -0
- package/dist/types/sdk/src/types.d.ts +1 -1
- package/dist/{types-B77qvqPJ.js → types-CYnY-63C.js} +5 -6
- package/dist/types.js +1 -1
- package/dist/{typesSource-CWybQYus.js → typesSource-BTA9-rcB.js} +17 -15
- package/package.json +32 -6
- package/dist/apps-BxnJ1RlU.js +0 -435
- package/dist/bridge-DtHw9hS6.js +0 -74
- package/dist/collection-BEOxeISR.js +0 -189
- package/dist/customers-DTbL0qn6.js +0 -86
- package/dist/customers.d.ts +0 -1
- package/dist/customers.js +0 -185
- package/dist/embeds-B5V54Zur.js +0 -34
- package/dist/ids--RF7hGyC.js +0 -36
- package/dist/src-sazhzYui.js +0 -71
- package/dist/types/contract/src/customers.d.ts +0 -266
- package/dist/types/schema/src/legacy.d.ts +0 -2
- package/dist/types/schema/src/media.d.ts +0 -5
- package/dist/types/sdk/src/customers.d.ts +0 -184
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { AppPortResult, AppScope } from './appServer.js';
|
|
2
|
+
/** マニフェストのメールの宣言 */
|
|
3
|
+
export type AppMailDeclaration = Readonly<{
|
|
4
|
+
send?: boolean;
|
|
5
|
+
inbound?: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
/** 能力の要素(送信、受信) */
|
|
8
|
+
export declare const MAIL_CAPABILITIES: {
|
|
9
|
+
readonly send: "mail:send";
|
|
10
|
+
readonly inbound: "mail:inbound";
|
|
11
|
+
};
|
|
12
|
+
/** マニフェストの mail の誤りの箇所 */
|
|
13
|
+
export declare function appMailProblems(mail: unknown): string[];
|
|
14
|
+
/** マニフェストの mail の能力の要素 */
|
|
15
|
+
export declare const mailCapabilitiesOf: (mail: AppMailDeclaration | undefined) => string[];
|
|
16
|
+
/** 認証の結果(RFC 8601の結果の語) */
|
|
17
|
+
export declare const MAIL_AUTH_RESULTS: readonly ["pass", "fail", "softfail", "neutral", "none", "temperror", "permerror", "policy"];
|
|
18
|
+
export type MailAuthResult = (typeof MAIL_AUTH_RESULTS)[number];
|
|
19
|
+
/** 受信の基盤が評価した認証の結果(dkim は署名ごとの d= のドメインと結果) */
|
|
20
|
+
export type MailAuthentication = Readonly<{
|
|
21
|
+
spf: MailAuthResult;
|
|
22
|
+
dkim: readonly Readonly<{
|
|
23
|
+
domain: string;
|
|
24
|
+
result: MailAuthResult;
|
|
25
|
+
}>[];
|
|
26
|
+
dmarc: MailAuthResult;
|
|
27
|
+
arc: MailAuthResult;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* メールの送信の依頼(テキストだけ)
|
|
31
|
+
* - from: 差出人、replyTo: 返信先(どちらもドメインはプロジェクトの検証済みのドメイン)
|
|
32
|
+
* - inReplyTo、references: 返信の元の Message-ID と、スレッドの Message-ID の連なり(山括弧つき)
|
|
33
|
+
* - purpose: 同意の目的(宛先の抑止の一覧と同意をコアが確かめる)、key: 依頼を見分ける鍵(ログに残す。重複を除くのは呼ぶアプリ)
|
|
34
|
+
*/
|
|
35
|
+
export type AppMailSendRequest = Readonly<{
|
|
36
|
+
to: string;
|
|
37
|
+
from: Readonly<{
|
|
38
|
+
address: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
}>;
|
|
41
|
+
replyTo?: string;
|
|
42
|
+
subject: string;
|
|
43
|
+
text: string;
|
|
44
|
+
inReplyTo?: string;
|
|
45
|
+
references?: readonly string[];
|
|
46
|
+
purpose: string;
|
|
47
|
+
key: string;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* 送らなかった理由
|
|
51
|
+
* - suppressed: 抑止の一覧、no_consent: 同意の目的で送れない
|
|
52
|
+
* - domain_unverified: 差出人のドメインが検証されていない、test_environment: live 以外の環境
|
|
53
|
+
*/
|
|
54
|
+
export declare const APP_MAIL_SKIP_REASONS: readonly ["suppressed", "no_consent", "domain_unverified", "test_environment"];
|
|
55
|
+
export type AppMailSkipReason = (typeof APP_MAIL_SKIP_REASONS)[number];
|
|
56
|
+
/**
|
|
57
|
+
* 送信の結果(基盤の一時的な失敗は例外)
|
|
58
|
+
* - sent: messageId は送ったメールの Message-ID(山括弧つき、基盤が返さなければ null)
|
|
59
|
+
* - rejected: 依頼の形の誤り(path は誤りの位置)
|
|
60
|
+
*/
|
|
61
|
+
export type AppMailSendResult = Readonly<{
|
|
62
|
+
status: 'sent';
|
|
63
|
+
messageId: string | null;
|
|
64
|
+
}> | Readonly<{
|
|
65
|
+
status: 'skipped';
|
|
66
|
+
reason: AppMailSkipReason;
|
|
67
|
+
}> | Readonly<{
|
|
68
|
+
status: 'rejected';
|
|
69
|
+
path: string;
|
|
70
|
+
}>;
|
|
71
|
+
/** プロジェクトのドメイン(送信と受信に使う。records は DNS に置くレコード) */
|
|
72
|
+
export type AppMailDomain = Readonly<{
|
|
73
|
+
domain: string;
|
|
74
|
+
status: 'pending' | 'verified' | 'failed';
|
|
75
|
+
records: readonly Readonly<{
|
|
76
|
+
purpose: string;
|
|
77
|
+
type: string;
|
|
78
|
+
name: string;
|
|
79
|
+
value: string;
|
|
80
|
+
priority?: number;
|
|
81
|
+
}>[];
|
|
82
|
+
}>;
|
|
83
|
+
/**
|
|
84
|
+
* 受けたメール
|
|
85
|
+
* - channelId: 受けたチャネル(アプリのチャネルで、受信の能力を持つ)
|
|
86
|
+
* - recipient: 受けた宛先、tag: 宛先のローカル部の `+` の後ろ(なければ null。返信先にスレッドの ID を載せる用途)
|
|
87
|
+
* - envelopeFrom: 封筒の送り主(不達の通知は空)、raw: 生のメッセージ、auth: 受信の基盤が評価した認証の結果
|
|
88
|
+
*/
|
|
89
|
+
export type AppInboundMail = Readonly<{
|
|
90
|
+
channelId: string;
|
|
91
|
+
recipient: string;
|
|
92
|
+
tag: string | null;
|
|
93
|
+
envelopeFrom: string;
|
|
94
|
+
raw: Uint8Array;
|
|
95
|
+
auth: MailAuthentication;
|
|
96
|
+
}>;
|
|
97
|
+
/**
|
|
98
|
+
* メールの口(マニフェストの mail の宣言の範囲だけ。宣言がなければ app_mail_undeclared の UsageError)
|
|
99
|
+
* - send: 送信(mail.send)。コアの関門を通し、例外にしない結果で返す。送信のモードを決められない実行は unavailable(送り直す)
|
|
100
|
+
* - domains: プロジェクトのドメインと検証の状態(mail.send か mail.inbound)
|
|
101
|
+
* - 送信の部品のない配置は not_configured
|
|
102
|
+
*/
|
|
103
|
+
export type AppMailPort = Readonly<{
|
|
104
|
+
send: (scope: AppScope, request: AppMailSendRequest) => Promise<AppPortResult<AppMailSendResult>>;
|
|
105
|
+
domains: (scope: AppScope) => Promise<AppPortResult<readonly AppMailDomain[]>>;
|
|
106
|
+
}>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ChannelMode } from './appChannels.js';
|
|
2
|
+
/** 秘密値の宣言(key は outbound の auth.secret で指す名前) */
|
|
3
|
+
export type AppSecretDeclaration = Readonly<{
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}>;
|
|
7
|
+
/**
|
|
8
|
+
* 運営の秘密値(マニフェストの operator_secrets。同梱のアプリだけが使える)
|
|
9
|
+
* - 値はインスタンスの運営者が環境の変数で渡し、すべてのプロジェクトで同じ。アプリには値を返さず、外への要求の auth と署名の検証にだけ使う
|
|
10
|
+
* - 値はモード(live と sandbox)ごとの2組。外への要求は環境の方針で組を選ぶ(live の環境は live、ほかは sandbox)
|
|
11
|
+
* - キーは secrets とチャネルの種類の secrets のキーと重ねない
|
|
12
|
+
*/
|
|
13
|
+
export type AppOperatorSecrets = Readonly<{
|
|
14
|
+
/** 署名の検証(mode は使う組。キーが未宣言か値がなければ false) */
|
|
15
|
+
verifyHmac: (key: string, check: AppHmacCheck, mode: ChannelMode) => Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* 運営の秘密値を載せる読み取りの外への要求(mode は載せる組)
|
|
18
|
+
* GET だけで、マニフェストの outbound の宣言のうち auth が operator_secrets のキーを指すものに当たる要求だけ。ほかは送らずに例外(EgressDenied)
|
|
19
|
+
*/
|
|
20
|
+
egress: (mode: ChannelMode, input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
21
|
+
}>;
|
|
22
|
+
/** 入力した秘密値の状態(tail は末尾、値が短ければ null) */
|
|
23
|
+
export type AppSecretState = Readonly<{
|
|
24
|
+
key: string;
|
|
25
|
+
label: string;
|
|
26
|
+
configured: boolean;
|
|
27
|
+
tail: string | null;
|
|
28
|
+
updatedAt: string | null;
|
|
29
|
+
}>;
|
|
30
|
+
/** 秘密値の上限(値の字数、末尾の字数、末尾を返す値の最小の字数) */
|
|
31
|
+
export declare const APP_SECRET_LIMITS: {
|
|
32
|
+
readonly valueMaxChars: 4096;
|
|
33
|
+
readonly tailChars: 4;
|
|
34
|
+
readonly tailMinChars: 8;
|
|
35
|
+
};
|
|
36
|
+
/** 秘密値のキーの形 */
|
|
37
|
+
export declare const APP_SECRET_KEY: RegExp;
|
|
38
|
+
/** 署名の検証のハッシュと、署名の表記 */
|
|
39
|
+
export declare const APP_HMAC_HASHES: readonly ["SHA-256", "SHA-512"];
|
|
40
|
+
export type AppHmacHash = (typeof APP_HMAC_HASHES)[number];
|
|
41
|
+
export declare const APP_SIGNATURE_ENCODINGS: readonly ["base64", "hex"];
|
|
42
|
+
export type AppSignatureEncoding = (typeof APP_SIGNATURE_ENCODINGS)[number];
|
|
43
|
+
/** 署名の検証の指定(body はパースの前の本文、signature は表記 encoding の署名。既定は SHA-256 と base64) */
|
|
44
|
+
export type AppHmacCheck = Readonly<{
|
|
45
|
+
body: string | Uint8Array;
|
|
46
|
+
signature: string;
|
|
47
|
+
hash?: AppHmacHash;
|
|
48
|
+
encoding?: AppSignatureEncoding;
|
|
49
|
+
}>;
|
|
50
|
+
/** 画面と API に出す末尾(値が tailMinChars 未満なら null) */
|
|
51
|
+
export declare const secretTailOf: (value: string) => string | null;
|
|
52
|
+
/** 宣言の上限(件数、見出しの字数) */
|
|
53
|
+
export declare const APP_SECRET_DECLARATION_LIMITS: {
|
|
54
|
+
readonly entriesMax: 20;
|
|
55
|
+
readonly labelMaxChars: 80;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* マニフェストの secrets と、outbound の auth が指す秘密値の誤りの箇所(マニフェストの道)
|
|
59
|
+
* - outbound の auth.secret は secrets で宣言したキーか、channelKeys(チャネルの種類の秘密値のキー)でなければならない
|
|
60
|
+
*/
|
|
61
|
+
export declare function appSecretsProblems(secrets: unknown, outbound: unknown, channelKeys?: readonly string[]): string[];
|
|
62
|
+
/** 秘密値の宣言のキー(形の壊れた要素は除く) */
|
|
63
|
+
export declare const appSecretKeysOf: (secrets: unknown) => string[];
|