zinkee 0.1.39 → 0.1.40

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/dist/index.js CHANGED
@@ -1224,6 +1224,17 @@ function buildJsonSuccess(data, meta = {}) {
1224
1224
  function buildJsonError(error, meta = {}) {
1225
1225
  return { error, meta };
1226
1226
  }
1227
+ var FOLDER_TABLE_KEYS = ["folderId", "folderName", "folderIsRoot"];
1228
+ function folderColumns(folder) {
1229
+ if (!folder) {
1230
+ return { folderId: "", folderName: "", folderIsRoot: "" };
1231
+ }
1232
+ return {
1233
+ folderId: folder.id ?? "",
1234
+ folderName: folder.name ?? (folder.isRoot === true ? "(root)" : ""),
1235
+ folderIsRoot: folder.isRoot === void 0 ? "" : String(folder.isRoot)
1236
+ };
1237
+ }
1227
1238
  function getWriter(writer) {
1228
1239
  return writer ?? process.stdout;
1229
1240
  }
@@ -4963,21 +4974,36 @@ var specificExamples = {
4963
4974
  "name": "Executive Revenue",
4964
4975
  "layoutTemplate": "widget_row_tabs",
4965
4976
  "variableCount": 3,
4966
- "widgetCount": 6
4977
+ "widgetCount": 6,
4978
+ "folder": {
4979
+ "id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
4980
+ "name": "\u{1F4CA} Executive",
4981
+ "isRoot": false
4982
+ }
4967
4983
  },
4968
4984
  {
4969
4985
  "id": "6b7c8d9e-0f12-3456-789a-bcdef0123456",
4970
4986
  "name": "Sales Pipeline",
4971
4987
  "layoutTemplate": "freeform",
4972
4988
  "variableCount": 1,
4973
- "widgetCount": 3
4989
+ "widgetCount": 3,
4990
+ "folder": {
4991
+ "id": "a0b1c2d3-e4f5-4061-8273-8495a6b7c8d9",
4992
+ "name": null,
4993
+ "isRoot": true
4994
+ }
4974
4995
  },
4975
4996
  {
4976
4997
  "id": "ef012345-6789-4abc-8def-0123456789ab",
4977
4998
  "name": "Customer Detail",
4978
4999
  "layoutTemplate": "grid",
4979
5000
  "variableCount": 0,
4980
- "widgetCount": 2
5001
+ "widgetCount": 2,
5002
+ "folder": {
5003
+ "id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
5004
+ "name": "\u{1F4CA} Executive",
5005
+ "isRoot": false
5006
+ }
4981
5007
  }
4982
5008
  ]`
4983
5009
  }
@@ -5109,7 +5135,12 @@ var specificExamples = {
5109
5135
  "targetVariableId": "aaaaaaaa-1111-4111-a111-111111111111",
5110
5136
  "label": "Open customer"
5111
5137
  }
5112
- ]
5138
+ ],
5139
+ "folder": {
5140
+ "id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
5141
+ "name": "\u{1F4CA} Executive",
5142
+ "isRoot": false
5143
+ }
5113
5144
  }`
5114
5145
  }
5115
5146
  ]),
@@ -7612,9 +7643,9 @@ function automationRows(automations) {
7612
7643
  id: automation.id ?? "",
7613
7644
  name: automation.name ?? "",
7614
7645
  status: automation.status ?? "",
7615
- folderId: automation.folderId ?? "",
7616
7646
  triggerType: isJsonObject2(automation.trigger) && typeof automation.trigger.type === "string" ? automation.trigger.type : "",
7617
- actionCount: Array.isArray(automation.actions) ? automation.actions.length : ""
7647
+ actionCount: Array.isArray(automation.actions) ? automation.actions.length : "",
7648
+ ...folderColumns(automation.folder)
7618
7649
  }));
7619
7650
  }
7620
7651
  function actionRows(actions) {
@@ -8136,7 +8167,7 @@ function registerAutomationsCommands(program, options = {}) {
8136
8167
  }
8137
8168
  printTable(
8138
8169
  automationRows(data),
8139
- ["id", "name", "status", "folderId", "triggerType", "actionCount"],
8170
+ ["id", "name", "status", "triggerType", "actionCount", ...FOLDER_TABLE_KEYS],
8140
8171
  stdout
8141
8172
  );
8142
8173
  });
@@ -9247,7 +9278,8 @@ function displayRows(displays) {
9247
9278
  name: display.name ?? "",
9248
9279
  layoutTemplate: display.layoutTemplate ?? "",
9249
9280
  variableCount: display.variableCount ?? "",
9250
- widgetCount: display.widgetCount ?? ""
9281
+ widgetCount: display.widgetCount ?? "",
9282
+ ...folderColumns(display.folder)
9251
9283
  }));
9252
9284
  }
9253
9285
  function getDisplaySubresource(value) {
@@ -9497,7 +9529,11 @@ function registerDisplaysCommands(program, options = {}) {
9497
9529
  emitJson4(stdout, "displays list", data);
9498
9530
  return;
9499
9531
  }
9500
- printTable(displayRows(data), ["id", "name", "layoutTemplate", "variableCount", "widgetCount"], stdout);
9532
+ printTable(
9533
+ displayRows(data),
9534
+ ["id", "name", "layoutTemplate", "variableCount", "widgetCount", ...FOLDER_TABLE_KEYS],
9535
+ stdout
9536
+ );
9501
9537
  });
9502
9538
  displays.command("get").description("Get a display").argument("<display>", "display uuid or slug", parseUuidOrSlugSelector3).action(async function action(display) {
9503
9539
  const { api, json } = createDisplaysApi(this, filePath);
@@ -11888,9 +11924,10 @@ function emitSchemasTable(stdout, schemas) {
11888
11924
  name: schema.name ?? "",
11889
11925
  slug: schema.slug ?? "",
11890
11926
  auditable: schema.auditable ?? "",
11891
- commentable: schema.commentable ?? ""
11927
+ commentable: schema.commentable ?? "",
11928
+ ...folderColumns(schema.folder)
11892
11929
  })),
11893
- ["id", "name", "slug", "auditable", "commentable"],
11930
+ ["id", "name", "slug", "auditable", "commentable", ...FOLDER_TABLE_KEYS],
11894
11931
  stdout
11895
11932
  );
11896
11933
  }