@objectstack/plugin-approvals 17.0.0-rc.5 → 17.0.0-rc.6
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 +432 -0
- package/dist/index.d.mts +879 -1218
- package/dist/index.d.ts +879 -1218
- package/dist/index.js +42 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -63,11 +63,11 @@ var init_en_objects_generated = __esm({
|
|
|
63
63
|
label: "Status",
|
|
64
64
|
help: "Lifecycle state of the request",
|
|
65
65
|
options: {
|
|
66
|
-
pending: "
|
|
67
|
-
approved: "
|
|
68
|
-
rejected: "
|
|
69
|
-
recalled: "
|
|
70
|
-
returned: "
|
|
66
|
+
pending: "Pending",
|
|
67
|
+
approved: "Approved",
|
|
68
|
+
rejected: "Rejected",
|
|
69
|
+
recalled: "Recalled",
|
|
70
|
+
returned: "Returned"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
current_step: {
|
|
@@ -384,7 +384,7 @@ var init_zh_CN_objects_generated = __esm({
|
|
|
384
384
|
label: "\u72B6\u6001",
|
|
385
385
|
help: "\u8BF7\u6C42\u7684\u751F\u547D\u5468\u671F\u72B6\u6001",
|
|
386
386
|
options: {
|
|
387
|
-
pending: "\u5F85\
|
|
387
|
+
pending: "\u5F85\u5BA1\u6279",
|
|
388
388
|
approved: "\u5DF2\u6279\u51C6",
|
|
389
389
|
rejected: "\u5DF2\u62D2\u7EDD",
|
|
390
390
|
recalled: "\u5DF2\u64A4\u56DE",
|
|
@@ -430,9 +430,9 @@ var init_zh_CN_objects_generated = __esm({
|
|
|
430
430
|
},
|
|
431
431
|
_views: {
|
|
432
432
|
my_pending: {
|
|
433
|
-
label: "\u6211\
|
|
433
|
+
label: "\u5F85\u6211\u5BA1\u6279",
|
|
434
434
|
emptyState: {
|
|
435
|
-
title: "\u6682\u65E0\u5F85\
|
|
435
|
+
title: "\u6682\u65E0\u5F85\u5BA1\u6279\u7684\u8BF7\u6C42",
|
|
436
436
|
message: "\u5168\u90E8\u5904\u7406\u5B8C\u6BD5\uFF0C\u6CA1\u6709\u7B49\u5F85\u4F60\u5BA1\u6279\u7684\u8BF7\u6C42\u3002"
|
|
437
437
|
}
|
|
438
438
|
},
|
|
@@ -751,7 +751,7 @@ var init_ja_JP_objects_generated = __esm({
|
|
|
751
751
|
},
|
|
752
752
|
_views: {
|
|
753
753
|
my_pending: {
|
|
754
|
-
label: "\
|
|
754
|
+
label: "\u627F\u8A8D\u5F85\u3061",
|
|
755
755
|
emptyState: {
|
|
756
756
|
title: "\u627F\u8A8D\u5F85\u3061\u306F\u3042\u308A\u307E\u305B\u3093",
|
|
757
757
|
message: "\u3059\u3079\u3066\u51E6\u7406\u6E08\u307F\u3067\u3059\u3002\u3042\u306A\u305F\u306E\u627F\u8A8D\u3092\u5F85\u3064\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u3042\u308A\u307E\u305B\u3093\u3002"
|
|
@@ -1072,7 +1072,7 @@ var init_es_ES_objects_generated = __esm({
|
|
|
1072
1072
|
},
|
|
1073
1073
|
_views: {
|
|
1074
1074
|
my_pending: {
|
|
1075
|
-
label: "
|
|
1075
|
+
label: "Aprobaciones pendientes",
|
|
1076
1076
|
emptyState: {
|
|
1077
1077
|
title: "Sin aprobaciones pendientes",
|
|
1078
1078
|
message: "Est\xE1s al d\xEDa: nada espera tu aprobaci\xF3n."
|
|
@@ -5756,7 +5756,7 @@ function registerApprovalReviseNode(automation, logger) {
|
|
|
5756
5756
|
paradigms: ["flow"],
|
|
5757
5757
|
source: "plugin",
|
|
5758
5758
|
supportsPause: true,
|
|
5759
|
-
isAsync:
|
|
5759
|
+
// (`isAsync` stood here — retired in #6748, ADR-0049: nothing read it)
|
|
5760
5760
|
// #3823 / amended ADR-0044: THE point of this node type. The revise
|
|
5761
5761
|
// window is a service-owned continuation, so the #3801 gate must refuse
|
|
5762
5762
|
// a raw resume of it — which it does for any node type declaring this.
|
|
@@ -5808,7 +5808,7 @@ function registerApprovalNode(automation, service, logger) {
|
|
|
5808
5808
|
source: "plugin",
|
|
5809
5809
|
// Human decision: the run suspends here awaiting an external reply.
|
|
5810
5810
|
supportsPause: true,
|
|
5811
|
-
isAsync:
|
|
5811
|
+
// (`isAsync` stood here — retired in #6748, ADR-0049: nothing read it)
|
|
5812
5812
|
// #3801: this pause is NOT resumable through the generic run-resume
|
|
5813
5813
|
// route. Continuing an approval is a side effect of a DECISION, and the
|
|
5814
5814
|
// decision is the thing that must be authorized (the approver slate),
|
|
@@ -5859,6 +5859,17 @@ function registerApprovalNode(automation, service, logger) {
|
|
|
5859
5859
|
}, {
|
|
5860
5860
|
...SYSTEM_CTX4,
|
|
5861
5861
|
userId: context?.userId,
|
|
5862
|
+
// [#7135] ⚠️ This assertion SURVIVES the annotation widening, and it
|
|
5863
|
+
// is `as ExecutionContext` rather than the `as unknown as
|
|
5864
|
+
// SharingExecutionContext` double cast it replaces. The sole reason
|
|
5865
|
+
// a cast is still needed is `organizationId`, which is not a field
|
|
5866
|
+
// of the envelope at ALL — that spelling has its own history (#5858
|
|
5867
|
+
// / `check:org-identifier`) and was explicitly held out of this
|
|
5868
|
+
// change (#7070), so removing the key here would be a RUNTIME change
|
|
5869
|
+
// belonging to that card. Dropping the second hop matters: `as
|
|
5870
|
+
// unknown as` erases the value entirely, while a single assertion
|
|
5871
|
+
// still requires the literal to be comparable to the envelope, so a
|
|
5872
|
+
// `userId: 42` here is once again a compile error.
|
|
5862
5873
|
organizationId: context?.organizationId,
|
|
5863
5874
|
tenantId: context?.tenantId
|
|
5864
5875
|
});
|
|
@@ -5910,12 +5921,23 @@ var ApprovalsServicePlugin = class {
|
|
|
5910
5921
|
// ADR-0029 D7 — contribute the Approvals entries into the Setup app's
|
|
5911
5922
|
// `group_approvals` slot. This plugin owns these objects (K2.b), so it
|
|
5912
5923
|
// ships their menu too; when the plugin isn't installed the slot is empty.
|
|
5924
|
+
//
|
|
5925
|
+
// #7234 — order inside the slot is ARRAY ORDER: `applyNavContributions`
|
|
5926
|
+
// does `group.children.push(...c.items)` per contribution (sorted by
|
|
5927
|
+
// `priority`), so the inbox being first in this array is what puts it
|
|
5928
|
+
// above the raw tables. Do not reorder without meaning to.
|
|
5929
|
+
//
|
|
5930
|
+
// The inbox entry is the working surface (decision actions, node
|
|
5931
|
+
// progress, drawer); the three object entries below stay as the
|
|
5932
|
+
// admin/diagnostic view of the engine's own tables — reachable only here,
|
|
5933
|
+
// behind `group_approvals`' `manage_platform_settings` gate.
|
|
5913
5934
|
navigationContributions: [
|
|
5914
5935
|
{
|
|
5915
5936
|
app: "setup",
|
|
5916
5937
|
group: "group_approvals",
|
|
5917
5938
|
priority: 100,
|
|
5918
5939
|
items: [
|
|
5940
|
+
{ id: "nav_approvals_inbox", type: "component", label: "Approvals Inbox", componentRef: "approvals:inbox", icon: "list-checks" },
|
|
5919
5941
|
{ id: "nav_approval_requests", type: "object", label: "Requests", objectName: "sys_approval_request", icon: "inbox", requiresObject: "sys_approval_request" },
|
|
5920
5942
|
{ id: "nav_approval_actions", type: "object", label: "Action History", objectName: "sys_approval_action", icon: "history", requiresObject: "sys_approval_action" },
|
|
5921
5943
|
{ id: "nav_approval_delegations", type: "object", label: "Delegations (OOO)", objectName: "sys_approval_delegation", icon: "user-clock", requiresObject: "sys_approval_delegation" }
|
|
@@ -6028,7 +6050,14 @@ var ApprovalsServicePlugin = class {
|
|
|
6028
6050
|
};
|
|
6029
6051
|
const mountActionPages = async () => {
|
|
6030
6052
|
try {
|
|
6031
|
-
const
|
|
6053
|
+
const readServer = (name) => {
|
|
6054
|
+
try {
|
|
6055
|
+
return ctx.getService(name);
|
|
6056
|
+
} catch {
|
|
6057
|
+
return void 0;
|
|
6058
|
+
}
|
|
6059
|
+
};
|
|
6060
|
+
const http = readServer("http.server") ?? readServer("http-server");
|
|
6032
6061
|
const rawApp = http && typeof http.getRawApp === "function" ? http.getRawApp() : null;
|
|
6033
6062
|
if (!rawApp || !this.service) return;
|
|
6034
6063
|
const svc = this.service;
|