@objectstack/plugin-approvals 11.1.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/plugin-approvals@11.1.0 build /home/runner/work/framework/framework/packages/plugins/plugin-approvals
2
+ > @objectstack/plugin-approvals@11.2.0 build /home/runner/work/framework/framework/packages/plugins/plugin-approvals
3
3
  > tsup --config ../../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.js 121.53 KB
14
- CJS dist/index.js.map 216.46 KB
15
- CJS ⚡️ Build success in 342ms
16
- ESM dist/index.mjs 119.86 KB
17
- ESM dist/index.mjs.map 215.25 KB
18
- ESM ⚡️ Build success in 344ms
13
+ ESM dist/index.mjs 120.29 KB
14
+ ESM dist/index.mjs.map 215.91 KB
15
+ ESM ⚡️ Build success in 304ms
16
+ CJS dist/index.js 121.96 KB
17
+ CJS dist/index.js.map 217.11 KB
18
+ CJS ⚡️ Build success in 325ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 23588ms
21
- DTS dist/index.d.mts 369.57 KB
22
- DTS dist/index.d.ts 369.57 KB
20
+ DTS ⚡️ Build success in 21982ms
21
+ DTS dist/index.d.mts 369.76 KB
22
+ DTS dist/index.d.ts 369.76 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @objectstack/plugin-approvals
2
2
 
3
+ ## 11.2.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d0f4b13]
8
+ - Updated dependencies [302bdab]
9
+ - @objectstack/spec@11.2.0
10
+ - @objectstack/core@11.2.0
11
+ - @objectstack/formula@11.2.0
12
+ - @objectstack/metadata-core@11.2.0
13
+ - @objectstack/platform-objects@11.2.0
14
+
3
15
  ## 11.1.0
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -336,6 +336,7 @@ declare const SysApprovalRequest: Omit<{
336
336
  summary: string;
337
337
  type?: string | undefined;
338
338
  }[] | undefined;
339
+ nameField?: string | undefined;
339
340
  displayNameField?: string | undefined;
340
341
  recordName?: {
341
342
  type: "text" | "autonumber";
@@ -811,6 +812,7 @@ declare const SysApprovalRequest: Omit<{
811
812
  readonly managedBy: "system";
812
813
  readonly description: "Live approval instance tracked per submission";
813
814
  readonly displayNameField: "id";
815
+ readonly nameField: "id";
814
816
  readonly titleFormat: "{process_name} · {record_id}";
815
817
  readonly compactLayout: ["process_name", "object_name", "record_id", "status", "current_step", "submitter_id", "updated_at"];
816
818
  readonly listViews: {
@@ -4374,6 +4376,7 @@ declare const SysApprovalAction: Omit<{
4374
4376
  summary: string;
4375
4377
  type?: string | undefined;
4376
4378
  }[] | undefined;
4379
+ nameField?: string | undefined;
4377
4380
  displayNameField?: string | undefined;
4378
4381
  recordName?: {
4379
4382
  type: "text" | "autonumber";
@@ -4849,6 +4852,7 @@ declare const SysApprovalAction: Omit<{
4849
4852
  readonly managedBy: "append-only";
4850
4853
  readonly description: "Append-only audit trail for approval actions";
4851
4854
  readonly displayNameField: "id";
4855
+ readonly nameField: "id";
4852
4856
  readonly titleFormat: "{action} · {step_name}";
4853
4857
  readonly compactLayout: ["request_id", "step_name", "action", "actor_id", "created_at"];
4854
4858
  readonly listViews: {
@@ -6827,6 +6831,7 @@ declare const SysApprovalApprover: Omit<{
6827
6831
  summary: string;
6828
6832
  type?: string | undefined;
6829
6833
  }[] | undefined;
6834
+ nameField?: string | undefined;
6830
6835
  displayNameField?: string | undefined;
6831
6836
  recordName?: {
6832
6837
  type: "text" | "autonumber";
@@ -7302,6 +7307,7 @@ declare const SysApprovalApprover: Omit<{
7302
7307
  readonly managedBy: "system";
7303
7308
  readonly description: "Normalized pending-approver rows for indexed inbox queries";
7304
7309
  readonly displayNameField: "id";
7310
+ readonly nameField: "id";
7305
7311
  readonly titleFormat: "{approver} · {request_id}";
7306
7312
  readonly compactLayout: ["request_id", "approver", "created_at"];
7307
7313
  readonly fields: {
package/dist/index.d.ts CHANGED
@@ -336,6 +336,7 @@ declare const SysApprovalRequest: Omit<{
336
336
  summary: string;
337
337
  type?: string | undefined;
338
338
  }[] | undefined;
339
+ nameField?: string | undefined;
339
340
  displayNameField?: string | undefined;
340
341
  recordName?: {
341
342
  type: "text" | "autonumber";
@@ -811,6 +812,7 @@ declare const SysApprovalRequest: Omit<{
811
812
  readonly managedBy: "system";
812
813
  readonly description: "Live approval instance tracked per submission";
813
814
  readonly displayNameField: "id";
815
+ readonly nameField: "id";
814
816
  readonly titleFormat: "{process_name} · {record_id}";
815
817
  readonly compactLayout: ["process_name", "object_name", "record_id", "status", "current_step", "submitter_id", "updated_at"];
816
818
  readonly listViews: {
@@ -4374,6 +4376,7 @@ declare const SysApprovalAction: Omit<{
4374
4376
  summary: string;
4375
4377
  type?: string | undefined;
4376
4378
  }[] | undefined;
4379
+ nameField?: string | undefined;
4377
4380
  displayNameField?: string | undefined;
4378
4381
  recordName?: {
4379
4382
  type: "text" | "autonumber";
@@ -4849,6 +4852,7 @@ declare const SysApprovalAction: Omit<{
4849
4852
  readonly managedBy: "append-only";
4850
4853
  readonly description: "Append-only audit trail for approval actions";
4851
4854
  readonly displayNameField: "id";
4855
+ readonly nameField: "id";
4852
4856
  readonly titleFormat: "{action} · {step_name}";
4853
4857
  readonly compactLayout: ["request_id", "step_name", "action", "actor_id", "created_at"];
4854
4858
  readonly listViews: {
@@ -6827,6 +6831,7 @@ declare const SysApprovalApprover: Omit<{
6827
6831
  summary: string;
6828
6832
  type?: string | undefined;
6829
6833
  }[] | undefined;
6834
+ nameField?: string | undefined;
6830
6835
  displayNameField?: string | undefined;
6831
6836
  recordName?: {
6832
6837
  type: "text" | "autonumber";
@@ -7302,6 +7307,7 @@ declare const SysApprovalApprover: Omit<{
7302
7307
  readonly managedBy: "system";
7303
7308
  readonly description: "Normalized pending-approver rows for indexed inbox queries";
7304
7309
  readonly displayNameField: "id";
7310
+ readonly nameField: "id";
7305
7311
  readonly titleFormat: "{approver} · {request_id}";
7306
7312
  readonly compactLayout: ["request_id", "approver", "created_at"];
7307
7313
  readonly fields: {
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", {