@objectstack/plugin-approvals 17.0.0-rc.6 → 17.0.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 +2712 -0
- package/dist/index.d.mts +938 -673
- package/dist/index.d.ts +938 -673
- package/dist/index.js +52 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -11
package/dist/index.js
CHANGED
|
@@ -140,7 +140,7 @@ var init_en_objects_generated = __esm({
|
|
|
140
140
|
},
|
|
141
141
|
approval_reject: {
|
|
142
142
|
label: "Reject",
|
|
143
|
-
|
|
143
|
+
description: "Reject this request? A rejection is final for every approver.",
|
|
144
144
|
successMessage: "Rejected.",
|
|
145
145
|
params: {
|
|
146
146
|
comment: {
|
|
@@ -193,7 +193,7 @@ var init_en_objects_generated = __esm({
|
|
|
193
193
|
},
|
|
194
194
|
approval_recall: {
|
|
195
195
|
label: "Recall",
|
|
196
|
-
|
|
196
|
+
description: "Recall this request? Approvers can no longer act on it and the record is unlocked.",
|
|
197
197
|
successMessage: "Recalled.",
|
|
198
198
|
params: {
|
|
199
199
|
comment: {
|
|
@@ -237,18 +237,18 @@ var init_en_objects_generated = __esm({
|
|
|
237
237
|
action: {
|
|
238
238
|
label: "Action",
|
|
239
239
|
options: {
|
|
240
|
-
submit: "
|
|
241
|
-
approve: "
|
|
242
|
-
reject: "
|
|
243
|
-
recall: "
|
|
244
|
-
escalate: "
|
|
245
|
-
reassign: "
|
|
246
|
-
remind: "
|
|
247
|
-
request_info: "
|
|
248
|
-
comment: "
|
|
249
|
-
revise: "
|
|
250
|
-
resubmit: "
|
|
251
|
-
ooo_substitute: "
|
|
240
|
+
submit: "Submit",
|
|
241
|
+
approve: "Approve",
|
|
242
|
+
reject: "Reject",
|
|
243
|
+
recall: "Recall",
|
|
244
|
+
escalate: "Escalate",
|
|
245
|
+
reassign: "Reassign",
|
|
246
|
+
remind: "Remind",
|
|
247
|
+
request_info: "Request Info",
|
|
248
|
+
comment: "Comment",
|
|
249
|
+
revise: "Revise",
|
|
250
|
+
resubmit: "Resubmit",
|
|
251
|
+
ooo_substitute: "Out-of-Office Substitution"
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
actor_id: {
|
|
@@ -461,7 +461,7 @@ var init_zh_CN_objects_generated = __esm({
|
|
|
461
461
|
},
|
|
462
462
|
approval_reject: {
|
|
463
463
|
label: "\u62D2\u7EDD",
|
|
464
|
-
|
|
464
|
+
description: "\u62D2\u7EDD\u8BE5\u8BF7\u6C42\uFF1F\u62D2\u7EDD\u5BF9\u6240\u6709\u5BA1\u6279\u4EBA\u7ACB\u5373\u751F\u6548\u3002",
|
|
465
465
|
successMessage: "\u5DF2\u62D2\u7EDD\u3002",
|
|
466
466
|
params: {
|
|
467
467
|
comment: {
|
|
@@ -514,7 +514,7 @@ var init_zh_CN_objects_generated = __esm({
|
|
|
514
514
|
},
|
|
515
515
|
approval_recall: {
|
|
516
516
|
label: "\u64A4\u56DE",
|
|
517
|
-
|
|
517
|
+
description: "\u64A4\u56DE\u8BE5\u8BF7\u6C42\uFF1F\u64A4\u56DE\u540E\u5BA1\u6279\u4EBA\u5C06\u65E0\u6CD5\u7EE7\u7EED\u5904\u7406\uFF0C\u8BB0\u5F55\u968F\u5373\u89E3\u9501\u3002",
|
|
518
518
|
successMessage: "\u5DF2\u64A4\u56DE\u3002",
|
|
519
519
|
params: {
|
|
520
520
|
comment: {
|
|
@@ -782,7 +782,7 @@ var init_ja_JP_objects_generated = __esm({
|
|
|
782
782
|
},
|
|
783
783
|
approval_reject: {
|
|
784
784
|
label: "\u5374\u4E0B",
|
|
785
|
-
|
|
785
|
+
description: "\u3053\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u5374\u4E0B\u3057\u307E\u3059\u304B\uFF1F\u5374\u4E0B\u306F\u3059\u3079\u3066\u306E\u627F\u8A8D\u8005\u306B\u5BFE\u3057\u3066\u6700\u7D42\u6C7A\u5B9A\u306B\u306A\u308A\u307E\u3059\u3002",
|
|
786
786
|
successMessage: "\u5374\u4E0B\u3057\u307E\u3057\u305F\u3002",
|
|
787
787
|
params: {
|
|
788
788
|
comment: {
|
|
@@ -835,7 +835,7 @@ var init_ja_JP_objects_generated = __esm({
|
|
|
835
835
|
},
|
|
836
836
|
approval_recall: {
|
|
837
837
|
label: "\u53D6\u308A\u4E0B\u3052",
|
|
838
|
-
|
|
838
|
+
description: "\u3053\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u53D6\u308A\u4E0B\u3052\u307E\u3059\u304B\uFF1F\u627F\u8A8D\u8005\u306F\u64CD\u4F5C\u3067\u304D\u306A\u304F\u306A\u308A\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u30ED\u30C3\u30AF\u304C\u89E3\u9664\u3055\u308C\u307E\u3059\u3002",
|
|
839
839
|
successMessage: "\u53D6\u308A\u4E0B\u3052\u307E\u3057\u305F\u3002",
|
|
840
840
|
params: {
|
|
841
841
|
comment: {
|
|
@@ -1103,7 +1103,7 @@ var init_es_ES_objects_generated = __esm({
|
|
|
1103
1103
|
},
|
|
1104
1104
|
approval_reject: {
|
|
1105
1105
|
label: "Rechazar",
|
|
1106
|
-
|
|
1106
|
+
description: "\xBFRechazar esta solicitud? Un rechazo es definitivo para todos los aprobadores.",
|
|
1107
1107
|
successMessage: "Rechazada.",
|
|
1108
1108
|
params: {
|
|
1109
1109
|
comment: {
|
|
@@ -1156,7 +1156,7 @@ var init_es_ES_objects_generated = __esm({
|
|
|
1156
1156
|
},
|
|
1157
1157
|
approval_recall: {
|
|
1158
1158
|
label: "Retirar",
|
|
1159
|
-
|
|
1159
|
+
description: "\xBFRetirar esta solicitud? Los aprobadores ya no podr\xE1n actuar sobre ella y el registro se desbloquear\xE1.",
|
|
1160
1160
|
successMessage: "Retirada.",
|
|
1161
1161
|
params: {
|
|
1162
1162
|
comment: {
|
|
@@ -1447,10 +1447,13 @@ var SysApprovalRequest = import_data.ObjectSchema.create({
|
|
|
1447
1447
|
group: "Target"
|
|
1448
1448
|
}),
|
|
1449
1449
|
status: import_data.Field.select(
|
|
1450
|
-
//
|
|
1450
|
+
// Derived from the contract, not re-typed (#3786). `APPROVAL_STATUSES` is
|
|
1451
1451
|
// where the list and the reason for each entry live; `ApprovalStatus` is
|
|
1452
|
-
// derived from it, so this column and the contract cannot disagree.
|
|
1453
|
-
|
|
1452
|
+
// derived from it, so this column and the contract cannot disagree. The
|
|
1453
|
+
// authored English label per entry lives beside it in
|
|
1454
|
+
// `APPROVAL_STATUS_LABELS` (#8543) — mapped here, never re-typed, so the
|
|
1455
|
+
// `en` bundle regenerates from the contract's own text.
|
|
1456
|
+
import_contracts.APPROVAL_STATUSES.map((value) => ({ value, label: import_contracts.APPROVAL_STATUS_LABELS[value] })),
|
|
1454
1457
|
{
|
|
1455
1458
|
label: "Status",
|
|
1456
1459
|
required: true,
|
|
@@ -1582,6 +1585,15 @@ var SysApprovalRequest = import_data.ObjectSchema.create({
|
|
|
1582
1585
|
{
|
|
1583
1586
|
name: "approval_reject",
|
|
1584
1587
|
label: "Reject",
|
|
1588
|
+
// The confirm question lives HERE, not in `confirmText`: this action
|
|
1589
|
+
// collects params, so the console would otherwise chain a confirm dialog
|
|
1590
|
+
// and then the param dialog for one decision — and the first one already
|
|
1591
|
+
// reads as "the action ran" (#7278, maintainer ruling 2026-08-10). The
|
|
1592
|
+
// param dialog renders this as its description, and nothing is POSTed
|
|
1593
|
+
// until its own Confirm: one condition, one wording, one dialog.
|
|
1594
|
+
// NB: the top-level action `description` (#7367), never `ai.description`
|
|
1595
|
+
// — that one is the LLM-facing tool contract and is not shown to anyone.
|
|
1596
|
+
description: "Reject this request? A rejection is final for every approver.",
|
|
1585
1597
|
icon: "x-circle",
|
|
1586
1598
|
// Destructive decision — rendered in the console's danger styling so it
|
|
1587
1599
|
// reads as the irreversible action it is (objectui#2762 P1-5).
|
|
@@ -1594,7 +1606,6 @@ var SysApprovalRequest = import_data.ObjectSchema.create({
|
|
|
1594
1606
|
{ name: "attachments", label: "Attachments", type: "file", multiple: true, required: false }
|
|
1595
1607
|
],
|
|
1596
1608
|
visible: "record.viewer.can_act || record.viewer.can_override",
|
|
1597
|
-
confirmText: "Reject this request? A rejection is final for every approver.",
|
|
1598
1609
|
locations: ["record_section", "list_item"],
|
|
1599
1610
|
successMessage: "Rejected.",
|
|
1600
1611
|
refreshAfter: true
|
|
@@ -1678,6 +1689,9 @@ var SysApprovalRequest = import_data.ObjectSchema.create({
|
|
|
1678
1689
|
{
|
|
1679
1690
|
name: "approval_recall",
|
|
1680
1691
|
label: "Recall",
|
|
1692
|
+
// Confirm question as the param dialog's description, not `confirmText`
|
|
1693
|
+
// — same one-decision-one-dialog rule as `approval_reject` above (#7278).
|
|
1694
|
+
description: "Recall this request? Approvers can no longer act on it and the record is unlocked.",
|
|
1681
1695
|
icon: "undo-2",
|
|
1682
1696
|
type: "api",
|
|
1683
1697
|
method: "POST",
|
|
@@ -1688,7 +1702,6 @@ var SysApprovalRequest = import_data.ObjectSchema.create({
|
|
|
1688
1702
|
// Recall applies while the request is live for the submitter — pending
|
|
1689
1703
|
// (withdraw) or returned (abandon the revision instead of resubmitting).
|
|
1690
1704
|
visible: '(record.status == "pending" || record.status == "returned") && record.viewer.is_submitter',
|
|
1691
|
-
confirmText: "Recall this request? Approvers can no longer act on it and the record is unlocked.",
|
|
1692
1705
|
locations: ["record_section"],
|
|
1693
1706
|
successMessage: "Recalled.",
|
|
1694
1707
|
refreshAfter: true
|
|
@@ -1798,11 +1811,14 @@ var SysApprovalAction = import_data2.ObjectSchema.create({
|
|
|
1798
1811
|
group: "Target"
|
|
1799
1812
|
}),
|
|
1800
1813
|
action: import_data2.Field.select(
|
|
1801
|
-
//
|
|
1814
|
+
// Derived from the contract, not re-typed (#3786). `APPROVAL_ACTION_KINDS`
|
|
1802
1815
|
// is where the list and the per-kind notes live (which kinds move the flow
|
|
1803
1816
|
// and which are thread-only); `ApprovalActionKind` is derived from it, so
|
|
1804
|
-
// this column and the contract cannot disagree.
|
|
1805
|
-
|
|
1817
|
+
// this column and the contract cannot disagree. The authored English label
|
|
1818
|
+
// per kind lives beside it in `APPROVAL_ACTION_KIND_LABELS` (#8580 — the
|
|
1819
|
+
// #7232 humanization pass missed this field) — mapped here, never
|
|
1820
|
+
// re-typed, so the `en` bundle regenerates from the contract's own text.
|
|
1821
|
+
import_contracts2.APPROVAL_ACTION_KINDS.map((value) => ({ value, label: import_contracts2.APPROVAL_ACTION_KIND_LABELS[value] })),
|
|
1806
1822
|
{
|
|
1807
1823
|
label: "Action",
|
|
1808
1824
|
required: true,
|
|
@@ -4401,10 +4417,14 @@ var _ApprovalService = class _ApprovalService {
|
|
|
4401
4417
|
* class of failure stayed silent.
|
|
4402
4418
|
*
|
|
4403
4419
|
* It also could not have answered the question even if it looked: its
|
|
4404
|
-
* liveness oracle is `getRun`, which
|
|
4405
|
-
*
|
|
4406
|
-
*
|
|
4407
|
-
*
|
|
4420
|
+
* liveness oracle is `getRun`, which treats both `null` and `paused` as alive
|
|
4421
|
+
* (conservative, correct) — so it has no way to say "this run is really
|
|
4422
|
+
* gone". (Until #8050 that oracle was weaker still: after a restart it
|
|
4423
|
+
* returned `null` for a perfectly ALIVE suspended run, so "alive" and
|
|
4424
|
+
* "unknown" were the same answer. It now reports such a run as `paused`,
|
|
4425
|
+
* which does not change any branch here — both already meant "leave alone" —
|
|
4426
|
+
* but it is why the sweep below needs `hasSuspendedRun` as a second oracle
|
|
4427
|
+
* rather than a sharper reading of the first.)
|
|
4408
4428
|
*
|
|
4409
4429
|
* So this uses BOTH oracles, and a row must fail both to be reported:
|
|
4410
4430
|
*
|