@objectstack/plugin-approvals 11.0.0 → 11.2.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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +36 -0
- package/dist/index.d.mts +12 -94
- package/dist/index.d.ts +12 -94
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/approval-service.ts +3 -1
- package/src/sys-approval-action.object.ts +1 -0
- package/src/sys-approval-approver.object.ts +1 -0
- package/src/sys-approval-request.object.ts +1 -0
- package/src/sys-approval-token.object.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -686,6 +686,8 @@ var SysApprovalRequest = import_data.ObjectSchema.create({
|
|
|
686
686
|
managedBy: "system",
|
|
687
687
|
description: "Live approval instance tracked per submission",
|
|
688
688
|
displayNameField: "id",
|
|
689
|
+
nameField: "id",
|
|
690
|
+
// [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
|
|
689
691
|
titleFormat: "{process_name} \xB7 {record_id}",
|
|
690
692
|
compactLayout: ["process_name", "object_name", "record_id", "status", "current_step", "submitter_id", "updated_at"],
|
|
691
693
|
// Curated built-in list views — render as segmented tabs in the console.
|
|
@@ -876,6 +878,8 @@ var SysApprovalAction = import_data2.ObjectSchema.create({
|
|
|
876
878
|
managedBy: "append-only",
|
|
877
879
|
description: "Append-only audit trail for approval actions",
|
|
878
880
|
displayNameField: "id",
|
|
881
|
+
nameField: "id",
|
|
882
|
+
// [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
|
|
879
883
|
titleFormat: "{action} \xB7 {step_name}",
|
|
880
884
|
compactLayout: ["request_id", "step_name", "action", "actor_id", "created_at"],
|
|
881
885
|
listViews: {
|
|
@@ -977,6 +981,8 @@ var SysApprovalApprover = import_data3.ObjectSchema.create({
|
|
|
977
981
|
managedBy: "system",
|
|
978
982
|
description: "Normalized pending-approver rows for indexed inbox queries",
|
|
979
983
|
displayNameField: "id",
|
|
984
|
+
nameField: "id",
|
|
985
|
+
// [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
|
|
980
986
|
titleFormat: "{approver} \xB7 {request_id}",
|
|
981
987
|
compactLayout: ["request_id", "approver", "created_at"],
|
|
982
988
|
fields: {
|
|
@@ -2265,7 +2271,7 @@ var _ApprovalService = class _ApprovalService {
|
|
|
2265
2271
|
try {
|
|
2266
2272
|
const schema = this.engine.getSchema?.(object);
|
|
2267
2273
|
const fields = schema?.fields ?? {};
|
|
2268
|
-
const declared = schema?.displayNameField;
|
|
2274
|
+
const declared = schema?.nameField ?? schema?.displayNameField;
|
|
2269
2275
|
if (declared && declared !== "id" && fields[declared]) return declared;
|
|
2270
2276
|
for (const cand of ["name", "title", "subject", "label"]) {
|
|
2271
2277
|
if (fields[cand]) return cand;
|
|
@@ -2741,6 +2747,8 @@ var SysApprovalToken = import_data4.ObjectSchema.create({
|
|
|
2741
2747
|
managedBy: "system",
|
|
2742
2748
|
description: "Single-use tokens behind actionable approval links",
|
|
2743
2749
|
displayNameField: "id",
|
|
2750
|
+
nameField: "id",
|
|
2751
|
+
// [ADR-0079] canonical primary-title pointer (mirrors deprecated displayNameField)
|
|
2744
2752
|
fields: {
|
|
2745
2753
|
id: import_data4.Field.text({ label: "Token ID", required: true, readonly: true, group: "System" }),
|
|
2746
2754
|
organization_id: import_data4.Field.lookup("sys_organization", {
|