Skip to content

Commit c0716ed

Browse files
feat(spec, platform-objects): Studio action form rows for texts and refusals (#35636)
<!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu19ctjaTjyM4gmWfgBPNRmc)_ Fixes #35096 Fixes #34823 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:在 Studio 里编辑脚本类操作时,表单在正文下面多了两行「拒绝目录」和「文本」,可以直接增删改操作抛出的拒绝提示和操作写进记录的句子,十一种界面语言都有说明。 - 为什么做:操作按调用方语言拒绝、按组织语言写句子的能力已经上线,但界面里写不了,只能改元数据或源码(替在 Studio 里编辑操作的管理员补上这两行,照钩子表单的做法)。 - 出错会怎样:最坏是这两行的说明或某种语言的译文措辞不准;操作运行不受影响,可以直接撤回。 - 要你做什么:无。 ## What changes **Studio action form, `texts` (#35096).** `action.form.ts` gains a `texts` row in the Behavior section, right after the script `body`: `type: 'record'`, `widget: 'key-only-record'`, entry fields `message` (textarea, required) and `params` (tags). Those are the two keys of the served entry (`ActionTextSchema = declaredTextEntrySchema('action')`, `{ message, params? }`), the same factory as the hook's, so this is the hook form's `texts` row (PR #35510) with the help text worded for an action's body. The `action` / `texts` omit row is deleted from `metadata-form-zod-reconciliation.test.ts`. **Studio action form, `refusals` (#34823).** A `refusals` row sits between `body` and `texts`: the hook form's `refusals` row, entry fields `message` (textarea, required), `status` (number), `reasons` (key-only record of `{ message }`) and `params` (tags). Those are the four keys of `ActionRefusalSchema = declaredRefusalEntrySchema('action')`, the hook entry's factory, so the action entry does have `params`. The `action` / `refusals` omit row is deleted. **Where and why.** Both rows sit in Behavior, directly under `body`, because they are read by the `js` body's code (`throw { code }`, `ctx.text(key)`) and the retired omit rows describe them as declared "beside the body". Both carry `visibleWhen: "data.type == 'script'"`, the `body` row's gate: the parse refuses both keys on any other action type, and the help text names the expression-body refusal (the form's predicates do not read into `body.language`). The key-only face is generic and `refusals` already exercises the same entry controls on the hook form, so no renderer change. **Packs.** `en` regenerated by `node scripts/check-i18n-bundles.mjs --write`; the ten translated locales hand-written. The five refusal entry fields have en sources byte-identical to the hook's, so each locale reuses its own hook translation. The two top rows and the `texts` entries are adapted from the hook wording (action, body, `script`). The `*.source-hashes.generated.ts` echo entries match the hook rows' (de/pt-BR `Status`, fr `Message`). Read first, by risk: 1. `packages/spec/src/ui/action.form.ts`: the two rows and their gate. 2. One translated pack, e.g. `packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts`, the nine new entries under `action.fields`. 3. `packages/spec/src/system/metadata-form-declared-rows.pin.test.ts`: the new pin. ## Tests - New top-level describe in `metadata-form-declared-rows.pin.test.ts` (the shared declared-rows harness): each row is offered once, as `record` + `key-only-record`; its entry controls are exactly `message:textarea!`, `params:tags` (texts) and `message:textarea!`, `status:number`, `reasons:record:key-only-record`, `params:tags` (refusals, with `reasons` holding `message:textarea!`); the entry field names equal `Object.keys(ActionTextSchema.shape)` / `Object.keys(ActionRefusalSchema.shape)`; the gate equals `body`'s; the order is `body`, `refusals`, `texts`. Controls: the same probe reads the hook rows (lit) and a key no form offers (dark). - `metadata-form-zod-reconciliation.test.ts` passes with both omit rows gone. - Count pins in `packages/platform-objects/src/apps/translations/`: action enumerated unwalked children 7 to 14 (`action-body-panel-echo-decisions.test.ts`, with the new parents `refusals`, `refusals.reasons`, `texts`), translated row labels 744 to 753 (`object-lifecycle-panel-echo-decisions.test.ts`). <details><summary>Readings (head 52a32ad)</summary> - `pnpm --filter @objectstack/spec test`: Test Files 857 passed (857); Tests 27399 passed, 1 todo (27400). - `pnpm --filter @objectstack/platform-objects test`: Test Files 124 passed (124); Tests 2061 passed (2061). - `pnpm --filter @objectstack/spec typecheck && pnpm --filter @objectstack/platform-objects typecheck` (after the build, under the verify lock): VERDICT command-exit 0 (`check:test-typecheck: OK`, spec 240 ledgered errors held, platform-objects 3). - `pnpm --filter @objectstack/spec check:generated`: exit 0, all 14 artifacts up to date. - `pnpm check:i18n`: exit 0, all bundles in sync. `pnpm check:i18n-coverage`: exit 0, none new. `node scripts/check-cli-command-ids.mjs`: exit 0. - Check Changeset logic: `check-empty-changeset.mjs`, `check-adr-0087-registration.mjs` exit 0; `check-changeset-no-major.mjs --event` (this body) exit 0, level axis `no` / `none` at `patch`. - `node scripts/pm/dispatch-gates.mjs --commands`: 87 families; `--ran`: 85 run with exit 0, 2 NOT MEASURED (exit 3): `check-plugin-teardown-shape.mjs --self-test` (its fixture commit is outside this shallow clone) and `check:dual-build-cjs-loads` (needs a full workspace build; CI runs it). - `node scripts/pm/overlap-check.mjs --branch=HEAD`: main merges cleanly; #35583 conflicts in one count pin (see Acceptance notes). </details> ## Acceptance notes - Clause-② and kind, measured: `pnpm --filter @objectstack/spec check:generated` reports all 14 artifacts up to date after the change (the `authorable-surface` / `api-surface` shards do not move: a form row is not a schema member), and `check-changeset-no-major.mjs --event` on this body passes the level axis with `Metadata-protocol: none` / `patch`. The claim's `no` / `none` stands. - Overlap: `overlap-check.mjs --branch=HEAD` reports a textual conflict with open #35583 in `object-lifecycle-panel-echo-decisions.test.ts` (both PRs move the same count pin); main merges cleanly, and #35581 merges cleanly. Whichever lands second re-reads the count. - Two commits per card (form + pin, then packs + count pins), in card order; the branch takes no force push, so the WIP split stays. ## Verification Two minutes: `pnpm --filter @objectstack/spec exec vitest run src/system/metadata-form-declared-rows.pin.test.ts src/system/metadata-form-zod-reconciliation.test.ts`. Expected: both files pass, and `git grep -n "type: 'action'" -A3 packages/spec/src/system/metadata-form-zod-reconciliation.test.ts | grep -E "key: '(texts|refusals)'"` prints nothing. --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgX6mQpVU8yUysiRAFC)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent d96c878 commit c0716ed

21 files changed

Lines changed: 575 additions & 30 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/platform-objects': patch
4+
---
5+
6+
feat(spec): the Studio action form offers an action's declared `refusals` and `texts`
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- **Studio action form.** `actionForm` gains two rows in the Behavior section, right after the script `body`, each shown only on a `type: 'script'` action as the body is: `refusals`, a key-only record keyed by the SCREAMING_SNAKE code the body throws, each entry editing its `message`, `status`, `reasons` (a key-only record of `{ message }`) and `params`; and `texts`, a key-only record keyed by the snake_case key the body asks for with `ctx.text`, each entry editing its `message` and `params`. They are the hook form's two rows, because the action entries are the hook entries. An author editing an action in the Studio can now write the `refusals` and `texts` the schema already accepts, instead of going through the metadata API or the package source. Nothing about what an action may declare changes.
12+
- **Locale packs.** The rows' labels and help text ship in all eleven metadata-forms locale packs of `@objectstack/platform-objects`.

‎packages/lint/src/validate-predicate-path-refs.test.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,10 @@ describe('#7010 corpus — shipped METADATA_FORM_REGISTRY', () => {
699699
// It is 91 today, an ADDITION of ONE: #29462 offered the field form's
700700
// `referenceNameVisible` row, gated on `data.type in ['lookup','user']`. It
701701
// is an in-list, so it does not reach the literal-comparison census below.
702-
expect(predicates, 'the shipped metadata forms carry no predicates at all').toBe(91);
702+
// It is 93 today, an ADDITION of TWO: #35096 and #34823 offered the action
703+
// form's `texts` and `refusals` rows, each gated like `body` on
704+
// `data.type == 'script'`. They reach the literal-comparison census below.
705+
expect(predicates, 'the shipped metadata forms carry no predicates at all').toBe(93);
703706

704707
const findings = validatePredicatePathRefs(corrupted);
705708
expect(findings).toHaveLength(predicates);
@@ -827,7 +830,10 @@ describe('#7010 corpus — shipped METADATA_FORM_REGISTRY', () => {
827830
// It is 65 today: #35047's `field :: percentDisplay` gate also opens for a
828831
// percent formula, `data.type == 'formula' && data.returnType == 'percent'`,
829832
// two more single-quoted literal comparisons.
830-
expect(comparisons, 'no shipped predicate carries an `==`/`!=` literal comparison').toBe(65);
833+
// It is 67 today: #35096's `action :: texts` and #34823's
834+
// `action :: refusals` rows are each gated on `data.type == 'script'`, two
835+
// single-quoted literal comparisons.
836+
expect(comparisons, 'no shipped predicate carries an `==`/`!=` literal comparison').toBe(67);
831837

832838
const rhsFindings = validatePredicatePathRefs(corrupted)
833839
.filter((f) => f.rule === PREDICATE_RHS_PATH_SHAPED);

‎packages/platform-objects/src/apps/translations/action-body-panel-echo-decisions.test.ts‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -661,8 +661,16 @@ describe('#19403 round 5 — the blind spot, FIFTH shape: one schema, two forms,
661661
// `type === 'repeater'`, and `body` is a `composite`. All five echoed in
662662
// all three locales, and they are five of the six keys this round decides.
663663
// 7 since the action form offers the `onSuccess` composite — its two
664-
// children, `navigate` and `openIn`, authored in all three locales.
665-
expect(ACTION_ENUMERATED.skipped.length).toBe(7);
664+
// children, `navigate` and `openIn`, authored in all three locales. 9
665+
// since #35096: the form offers the `texts` record, whose entry fields
666+
// (`message`, `params`) are enumerated the same way. 14 since #34823: the
667+
// form offers the `refusals` record, the hook row's five entry fields.
668+
expect(ACTION_ENUMERATED.skipped.length).toBe(14);
669+
expect(ACTION_ENUMERATED.skipped).toContain('texts.message');
670+
expect(ACTION_ENUMERATED.skipped).toContain('texts.params');
671+
for (const child of ['message', 'status', 'reasons', 'reasons.message', 'params']) {
672+
expect(ACTION_ENUMERATED.skipped).toContain(`refusals.${child}`);
673+
}
666674
for (const child of SHARED_BODY_CHILDREN) {
667675
expect(ACTION_ENUMERATED.skipped).toContain(`body.${child}`);
668676
expect(
@@ -728,8 +736,10 @@ describe('#19403 round 5 — the blind spot, FIFTH shape: one schema, two forms,
728736
const coveredParents = new Set(ACTION_ENUMERATED.covered.map((k) => k.replace(/\.[^.]+$/, '')));
729737
const skippedParents = new Set(ACTION_ENUMERATED.skipped.map((k) => k.replace(/\.[^.]+$/, '')));
730738
expect([...coveredParents]).toEqual(['params']);
731-
// `onSuccess` since the action form offers it as a composite beside `body`.
732-
expect([...skippedParents]).toEqual(['body', 'onSuccess']);
739+
// `onSuccess` since the action form offers it as a composite beside `body`,
740+
// `texts` since #35096 and `refusals` (with its nested `reasons`) since
741+
// #34823, the two record rows after `body`.
742+
expect([...skippedParents]).toEqual(['body', 'refusals', 'refusals.reasons', 'texts', 'onSuccess']);
733743
for (const parent of ['params', 'body']) {
734744
expect(ACTION_ENUMERATED.covered.includes(parent), `${parent} is not itself a row property`).toBe(false);
735745
expect(ACTION_ENUMERATED.skipped.includes(parent), `${parent} is not itself an unwalked child`).toBe(false);

‎packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,6 +1897,42 @@ export const arMetadataForms: NonNullable<TranslationData['metadataForms']> = {
18971897
label: "الذاكرة (ميغابايت)",
18981898
helpText: "حد الذاكرة لكل استدعاء (ميغابايت، بحد أقصى 256)"
18991899
},
1900+
refusals: {
1901+
label: "حالات الرفض",
1902+
helpText: "فهرس حالات الرفض، مفهرس برمز SCREAMING_SNAKE الذي يرميه متن الإجراء (مثل SIGN_IN_REQUIRED). يقرأ المستدعي الرسالة المُعلنة، مترجمة إلى لغته، مع الحالة المُعلنة. لمتن JavaScript ‏(L2) في إجراء script؛ ويُرفض في متن التعبير"
1903+
},
1904+
"refusals.message": {
1905+
label: "الرسالة",
1906+
helpText: "الجملة التي يقرؤها المستخدم عندما يرمي المتن هذا الرمز. نص عادي، ما لم يُعلن الإدخال params: عندها يملأ العنصر النائب {{ name }} معاملًا مُعلنًا"
1907+
},
1908+
"refusals.status": {
1909+
label: "الحالة",
1910+
helpText: "حالة HTTP للرفض (400–499). عند الغياب: 400"
1911+
},
1912+
"refusals.reasons": {
1913+
label: "الأسباب",
1914+
helpText: "جمل إضافية تحت الرمز نفسه، مفهرسة بالسبب بصيغة snake_case الذي يرميه المتن بجانب الرمز ({ code, reason }). يبقى الرمز والحالة المُرسَلان لهذا الإدخال؛ ويُرفض سبب غير مُعلن هنا. عند الغياب: لا يُقرأ السبب المرمي"
1915+
},
1916+
"refusals.reasons.message": {
1917+
label: "الرسالة",
1918+
helpText: "الجملة التي يقرؤها المستخدم عندما يرمي المتن هذا السبب تحت الرمز. تتبع عناصرها النائبة {{ }} معاملات params للإدخال"
1919+
},
1920+
"refusals.params": {
1921+
label: "المعاملات",
1922+
helpText: "الأسماء التي يمكن للجمل ملؤها (مثل state): يرمي المتن { code, params: { state } } ويعرض العنصر النائب {{ state }} قيمتها. عند الغياب: الجمل نص عادي"
1923+
},
1924+
texts: {
1925+
label: "النصوص",
1926+
helpText: "الجمل التي يكتبها الإجراء في السجلات، مفهرسة بالمفتاح بصيغة snake_case الذي يطلبه متنه عبر ctx.text (مثل email_subject). يتلقى المتن الرسالة المُعلنة بلغة المؤسسة، مترجمة، مع الرسالة المُعلنة بديلًا عند غياب الترجمة. لمتن JavaScript ‏(L2) في إجراء script؛ ويُرفض في متن التعبير"
1927+
},
1928+
"texts.message": {
1929+
label: "الرسالة",
1930+
helpText: "الجملة التي يكتبها الإجراء عندما يطلب متنه هذا المفتاح. نص عادي، ما لم يُعلن الإدخال params: عندها يملأ العنصر النائب {{ name }} معاملًا مُعلنًا"
1931+
},
1932+
"texts.params": {
1933+
label: "المعاملات",
1934+
helpText: "الأسماء التي يمكن للجملة ملؤها (مثل subject): يطلب المتن ctx.text(key, { subject }) ويعرض العنصر النائب {{ subject }} قيمتها. عند الغياب: الجملة نص عادي"
1935+
},
19001936
params: {
19011937
label: "المعلمات",
19021938
helpText: "معلمات إدخال المستخدم (إظهار نموذج قبل التنفيذ)"

‎packages/platform-objects/src/apps/translations/de.metadata-forms.generated.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,6 +1897,42 @@ export const deMetadataForms: NonNullable<TranslationData['metadataForms']> = {
18971897
label: "Speicher (MB)",
18981898
helpText: "Speicherobergrenze pro Aufruf (MB, max. 256)"
18991899
},
1900+
refusals: {
1901+
label: "Ablehnungen",
1902+
helpText: "Katalog der Ablehnungen, nach dem SCREAMING_SNAKE-Code, den der Rumpf der Aktion wirft (z. B. SIGN_IN_REQUIRED). Der Aufrufer liest die deklarierte Meldung, übersetzt in seine Sprache, mit dem deklarierten Status. Für den JavaScript-Rumpf (L2) einer script-Aktion; bei einem Ausdrucksrumpf abgelehnt"
1903+
},
1904+
"refusals.message": {
1905+
label: "Meldung",
1906+
helpText: "Der Satz, den der Benutzer liest, wenn der Rumpf diesen Code wirft. Einfacher Text, außer der Eintrag deklariert params: dann füllt ein Platzhalter {{ name }} einen deklarierten Parameter"
1907+
},
1908+
"refusals.status": {
1909+
label: "Status",
1910+
helpText: "HTTP-Status der Ablehnung (400–499). Fehlt er: 400"
1911+
},
1912+
"refusals.reasons": {
1913+
label: "Gründe",
1914+
helpText: "Weitere Sätze unter demselben Code, nach dem snake_case-Grund, den der Rumpf neben dem Code wirft ({ code, reason }). Gesendeter Code und Status bleiben die dieses Eintrags; ein hier nicht deklarierter Grund wird abgelehnt. Fehlt er: Ein geworfener Grund wird nicht gelesen"
1915+
},
1916+
"refusals.reasons.message": {
1917+
label: "Meldung",
1918+
helpText: "Der Satz, den der Benutzer liest, wenn der Rumpf diesen Grund unter dem Code wirft. Seine {{ }}-Platzhalter folgen den params des Eintrags"
1919+
},
1920+
"refusals.params": {
1921+
label: "Parameter",
1922+
helpText: "Namen, die die Sätze füllen dürfen (z. B. state): Der Rumpf wirft { code, params: { state } }, und ein Platzhalter {{ state }} zeigt den Wert. Fehlt er: Die Sätze sind einfacher Text"
1923+
},
1924+
texts: {
1925+
label: "Texte",
1926+
helpText: "Sätze, die die Aktion in Datensätze schreibt, nach dem snake_case-Schlüssel, den ihr Rumpf mit ctx.text anfragt (z. B. email_subject). Der Rumpf erhält die deklarierte Meldung in der Sprache der Organisation, übersetzt, mit der deklarierten Meldung als Rückfall. Für den JavaScript-Rumpf (L2) einer script-Aktion; bei einem Ausdrucksrumpf abgelehnt"
1927+
},
1928+
"texts.message": {
1929+
label: "Meldung",
1930+
helpText: "Der Satz, den die Aktion schreibt, wenn ihr Rumpf diesen Schlüssel anfragt. Einfacher Text, außer der Eintrag deklariert params: dann füllt ein Platzhalter {{ name }} einen deklarierten Parameter"
1931+
},
1932+
"texts.params": {
1933+
label: "Parameter",
1934+
helpText: "Namen, die der Satz füllen darf (z. B. subject): Der Rumpf fragt ctx.text(key, { subject }) an, und ein Platzhalter {{ subject }} zeigt den Wert. Fehlt er: Der Satz ist einfacher Text"
1935+
},
19001936
params: {
19011937
label: "Parameter",
19021938
helpText: "Benutzereingabeparameter (Formular vor der Ausführung anzeigen)"

‎packages/platform-objects/src/apps/translations/de.source-hashes.generated.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
export const deGeneratedSourceHashes: Readonly<Record<string, string>> = {
2121
"metadataForms.action.fields.name.label": "5274417ff1ccaf01",
2222
"metadataForms.action.fields.patch.label": "815f68570a78eba1",
23+
"metadataForms.action.fields.refusals.status.label": "64a420165247654b",
2324
"metadataForms.agent.fields.avatar.label": "0f06369995b69b8b",
2425
"metadataForms.agent.fields.name.label": "5274417ff1ccaf01",
2526
"metadataForms.app.fields.branding.label": "ec6e391065514b64",

‎packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,6 +1897,42 @@ export const enMetadataForms: NonNullable<TranslationData['metadataForms']> = {
18971897
label: "Memory Mb",
18981898
helpText: "Per-invocation memory cap (MB, max 256)"
18991899
},
1900+
refusals: {
1901+
label: "Refusals",
1902+
helpText: "Refusal catalogue, keyed by the SCREAMING_SNAKE code the action's body throws (e.g. SIGN_IN_REQUIRED). The caller reads the declared message, translated into their language, with the declared status. For a script action's JavaScript (L2) body; refused on an expression body"
1903+
},
1904+
"refusals.message": {
1905+
label: "Message",
1906+
helpText: "The sentence the user reads when the body throws this code. Plain text, unless the entry declares params: then a {{ name }} hole fills a declared param"
1907+
},
1908+
"refusals.status": {
1909+
label: "Status",
1910+
helpText: "HTTP status of the refusal (400–499). Absent: 400"
1911+
},
1912+
"refusals.reasons": {
1913+
label: "Reasons",
1914+
helpText: "Further sentences under this same code, keyed by the snake_case reason the body throws beside the code ({ code, reason }). The wire code and status stay this entry's; a reason not declared here is refused. Absent: a thrown reason is not read"
1915+
},
1916+
"refusals.reasons.message": {
1917+
label: "Message",
1918+
helpText: "The sentence the user reads when the body throws this reason under the code. Its {{ }} holes follow the entry's params"
1919+
},
1920+
"refusals.params": {
1921+
label: "Params",
1922+
helpText: "Names the sentences may fill (e.g. state): the body throws { code, params: { state } }, and a {{ state }} hole renders it. Absent: the sentences are plain text"
1923+
},
1924+
texts: {
1925+
label: "Texts",
1926+
helpText: "Sentences the action writes into records, keyed by the snake_case key its body asks for with ctx.text (e.g. email_subject). The body gets the declared message in the organization's language, translated, with the declared message as the fallback. For a script action's JavaScript (L2) body; refused on an expression body"
1927+
},
1928+
"texts.message": {
1929+
label: "Message",
1930+
helpText: "The sentence the action writes when its body asks for this key. Plain text, unless the entry declares params: then a {{ name }} hole fills a declared param"
1931+
},
1932+
"texts.params": {
1933+
label: "Params",
1934+
helpText: "Names the sentence may fill (e.g. subject): the body asks for ctx.text(key, { subject }), and a {{ subject }} hole renders it. Absent: the sentence is plain text"
1935+
},
19001936
params: {
19011937
label: "Params",
19021938
helpText: "User input parameters (show form before executing)"

‎packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,6 +1897,42 @@ export const esESMetadataForms: NonNullable<TranslationData['metadataForms']> =
18971897
label: "Memoria (MB)",
18981898
helpText: "Límite de memoria por invocación (MB, máx. 256)"
18991899
},
1900+
refusals: {
1901+
label: "Rechazos",
1902+
helpText: "Catálogo de rechazos, indexado por el código SCREAMING_SNAKE que lanza el cuerpo de la acción (p. ej. SIGN_IN_REQUIRED). Quien llama recibe el mensaje declarado, traducido a su idioma, con el estado declarado. Para el cuerpo JavaScript (L2) de una acción script; se rechaza en un cuerpo de expresión"
1903+
},
1904+
"refusals.message": {
1905+
label: "Mensaje",
1906+
helpText: "La frase que lee el usuario cuando el cuerpo lanza este código. Texto plano, salvo que la entrada declare params: entonces un marcador {{ name }} se rellena con un parámetro declarado"
1907+
},
1908+
"refusals.status": {
1909+
label: "Estado",
1910+
helpText: "Estado HTTP del rechazo (400–499). Si se omite: 400"
1911+
},
1912+
"refusals.reasons": {
1913+
label: "Motivos",
1914+
helpText: "Más frases bajo este mismo código, indexadas por el motivo snake_case que el cuerpo lanza junto al código ({ code, reason }). El código y el estado que se envían siguen siendo los de esta entrada; se rechaza un motivo no declarado aquí. Si se omite: no se lee un motivo lanzado"
1915+
},
1916+
"refusals.reasons.message": {
1917+
label: "Mensaje",
1918+
helpText: "La frase que lee el usuario cuando el cuerpo lanza este motivo bajo el código. Sus marcadores {{ }} siguen los params de la entrada"
1919+
},
1920+
"refusals.params": {
1921+
label: "Parámetros",
1922+
helpText: "Nombres que las frases pueden rellenar (p. ej. state): el cuerpo lanza { code, params: { state } } y un marcador {{ state }} muestra su valor. Si se omite: las frases son texto plano"
1923+
},
1924+
texts: {
1925+
label: "Textos",
1926+
helpText: "Frases que la acción escribe en los registros, indexadas por la clave snake_case que su cuerpo pide con ctx.text (p. ej. email_subject). El cuerpo recibe el mensaje declarado en el idioma de la organización, traducido, con el mensaje declarado como respaldo. Para el cuerpo JavaScript (L2) de una acción script; se rechaza en un cuerpo de expresión"
1927+
},
1928+
"texts.message": {
1929+
label: "Mensaje",
1930+
helpText: "La frase que escribe la acción cuando su cuerpo pide esta clave. Texto plano, salvo que la entrada declare params: entonces un marcador {{ name }} se rellena con un parámetro declarado"
1931+
},
1932+
"texts.params": {
1933+
label: "Parámetros",
1934+
helpText: "Nombres que la frase puede rellenar (p. ej. subject): el cuerpo pide ctx.text(key, { subject }) y un marcador {{ subject }} muestra su valor. Si se omite: la frase es texto plano"
1935+
},
19001936
params: {
19011937
label: "Parámetros",
19021938
helpText: "Parámetros de entrada de usuario (muestra el formulario antes de ejecutar)"

0 commit comments

Comments
 (0)