@cargo-ai/cli 1.0.1

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.
Files changed (218) hide show
  1. package/README.md +114 -0
  2. package/build/api.d.ts +4 -0
  3. package/build/api.d.ts.map +1 -0
  4. package/build/api.js +10 -0
  5. package/build/commands/ai/agent.d.ts +4 -0
  6. package/build/commands/ai/agent.d.ts.map +1 -0
  7. package/build/commands/ai/agent.js +83 -0
  8. package/build/commands/ai/chat.d.ts +4 -0
  9. package/build/commands/ai/chat.d.ts.map +1 -0
  10. package/build/commands/ai/chat.js +71 -0
  11. package/build/commands/ai/document.d.ts +4 -0
  12. package/build/commands/ai/document.d.ts.map +1 -0
  13. package/build/commands/ai/document.js +59 -0
  14. package/build/commands/ai/file.d.ts +4 -0
  15. package/build/commands/ai/file.d.ts.map +1 -0
  16. package/build/commands/ai/file.js +74 -0
  17. package/build/commands/ai/index.d.ts +4 -0
  18. package/build/commands/ai/index.d.ts.map +1 -0
  19. package/build/commands/ai/index.js +33 -0
  20. package/build/commands/ai/mcpClient.d.ts +4 -0
  21. package/build/commands/ai/mcpClient.d.ts.map +1 -0
  22. package/build/commands/ai/mcpClient.js +31 -0
  23. package/build/commands/ai/mcpServer.d.ts +4 -0
  24. package/build/commands/ai/mcpServer.d.ts.map +1 -0
  25. package/build/commands/ai/mcpServer.js +62 -0
  26. package/build/commands/ai/memory.d.ts +4 -0
  27. package/build/commands/ai/memory.d.ts.map +1 -0
  28. package/build/commands/ai/memory.js +50 -0
  29. package/build/commands/ai/message.d.ts +4 -0
  30. package/build/commands/ai/message.d.ts.map +1 -0
  31. package/build/commands/ai/message.js +86 -0
  32. package/build/commands/ai/prompt.d.ts +4 -0
  33. package/build/commands/ai/prompt.d.ts.map +1 -0
  34. package/build/commands/ai/prompt.js +34 -0
  35. package/build/commands/ai/release.d.ts +4 -0
  36. package/build/commands/ai/release.d.ts.map +1 -0
  37. package/build/commands/ai/release.js +150 -0
  38. package/build/commands/ai/skill.d.ts +4 -0
  39. package/build/commands/ai/skill.d.ts.map +1 -0
  40. package/build/commands/ai/skill.js +96 -0
  41. package/build/commands/ai/suggestedAction.d.ts +4 -0
  42. package/build/commands/ai/suggestedAction.d.ts.map +1 -0
  43. package/build/commands/ai/suggestedAction.js +37 -0
  44. package/build/commands/ai/template.d.ts +4 -0
  45. package/build/commands/ai/template.d.ts.map +1 -0
  46. package/build/commands/ai/template.js +14 -0
  47. package/build/commands/ai/vote.d.ts +4 -0
  48. package/build/commands/ai/vote.d.ts.map +1 -0
  49. package/build/commands/ai/vote.js +28 -0
  50. package/build/commands/auth.d.ts +3 -0
  51. package/build/commands/auth.d.ts.map +1 -0
  52. package/build/commands/auth.js +73 -0
  53. package/build/commands/billing/index.d.ts +4 -0
  54. package/build/commands/billing/index.d.ts.map +1 -0
  55. package/build/commands/billing/index.js +9 -0
  56. package/build/commands/billing/subscription.d.ts +4 -0
  57. package/build/commands/billing/subscription.d.ts.map +1 -0
  58. package/build/commands/billing/subscription.js +119 -0
  59. package/build/commands/billing/usage.d.ts +4 -0
  60. package/build/commands/billing/usage.d.ts.map +1 -0
  61. package/build/commands/billing/usage.js +33 -0
  62. package/build/commands/connection/connector.d.ts +4 -0
  63. package/build/commands/connection/connector.d.ts.map +1 -0
  64. package/build/commands/connection/connector.js +129 -0
  65. package/build/commands/connection/index.d.ts +4 -0
  66. package/build/commands/connection/index.d.ts.map +1 -0
  67. package/build/commands/connection/index.js +11 -0
  68. package/build/commands/connection/integration.d.ts +4 -0
  69. package/build/commands/connection/integration.d.ts.map +1 -0
  70. package/build/commands/connection/integration.js +35 -0
  71. package/build/commands/connection/nativeIntegration.d.ts +4 -0
  72. package/build/commands/connection/nativeIntegration.d.ts.map +1 -0
  73. package/build/commands/connection/nativeIntegration.js +14 -0
  74. package/build/commands/expression/expressionEval.d.ts +4 -0
  75. package/build/commands/expression/expressionEval.d.ts.map +1 -0
  76. package/build/commands/expression/expressionEval.js +32 -0
  77. package/build/commands/expression/favoriteRecipe.d.ts +4 -0
  78. package/build/commands/expression/favoriteRecipe.d.ts.map +1 -0
  79. package/build/commands/expression/favoriteRecipe.js +24 -0
  80. package/build/commands/expression/index.d.ts +4 -0
  81. package/build/commands/expression/index.d.ts.map +1 -0
  82. package/build/commands/expression/index.js +11 -0
  83. package/build/commands/expression/recipe.d.ts +4 -0
  84. package/build/commands/expression/recipe.d.ts.map +1 -0
  85. package/build/commands/expression/recipe.js +98 -0
  86. package/build/commands/init.d.ts +4 -0
  87. package/build/commands/init.d.ts.map +1 -0
  88. package/build/commands/init.js +11 -0
  89. package/build/commands/orchestration/batch.d.ts +4 -0
  90. package/build/commands/orchestration/batch.d.ts.map +1 -0
  91. package/build/commands/orchestration/batch.js +106 -0
  92. package/build/commands/orchestration/draftRelease.d.ts +4 -0
  93. package/build/commands/orchestration/draftRelease.d.ts.map +1 -0
  94. package/build/commands/orchestration/draftRelease.js +73 -0
  95. package/build/commands/orchestration/index.d.ts +4 -0
  96. package/build/commands/orchestration/index.d.ts.map +1 -0
  97. package/build/commands/orchestration/index.js +25 -0
  98. package/build/commands/orchestration/node.d.ts +4 -0
  99. package/build/commands/orchestration/node.d.ts.map +1 -0
  100. package/build/commands/orchestration/node.js +44 -0
  101. package/build/commands/orchestration/play.d.ts +4 -0
  102. package/build/commands/orchestration/play.d.ts.map +1 -0
  103. package/build/commands/orchestration/play.js +63 -0
  104. package/build/commands/orchestration/record.d.ts +4 -0
  105. package/build/commands/orchestration/record.d.ts.map +1 -0
  106. package/build/commands/orchestration/record.js +194 -0
  107. package/build/commands/orchestration/release.d.ts +4 -0
  108. package/build/commands/orchestration/release.d.ts.map +1 -0
  109. package/build/commands/orchestration/release.js +27 -0
  110. package/build/commands/orchestration/run.d.ts +4 -0
  111. package/build/commands/orchestration/run.d.ts.map +1 -0
  112. package/build/commands/orchestration/run.js +196 -0
  113. package/build/commands/orchestration/template.d.ts +4 -0
  114. package/build/commands/orchestration/template.d.ts.map +1 -0
  115. package/build/commands/orchestration/template.js +22 -0
  116. package/build/commands/orchestration/tool.d.ts +4 -0
  117. package/build/commands/orchestration/tool.d.ts.map +1 -0
  118. package/build/commands/orchestration/tool.js +72 -0
  119. package/build/commands/orchestration/workflow.d.ts +4 -0
  120. package/build/commands/orchestration/workflow.d.ts.map +1 -0
  121. package/build/commands/orchestration/workflow.js +14 -0
  122. package/build/commands/revenueOrganization/allocation.d.ts +4 -0
  123. package/build/commands/revenueOrganization/allocation.d.ts.map +1 -0
  124. package/build/commands/revenueOrganization/allocation.js +45 -0
  125. package/build/commands/revenueOrganization/capacity.d.ts +4 -0
  126. package/build/commands/revenueOrganization/capacity.d.ts.map +1 -0
  127. package/build/commands/revenueOrganization/capacity.js +94 -0
  128. package/build/commands/revenueOrganization/index.d.ts +4 -0
  129. package/build/commands/revenueOrganization/index.d.ts.map +1 -0
  130. package/build/commands/revenueOrganization/index.js +13 -0
  131. package/build/commands/revenueOrganization/member.d.ts +4 -0
  132. package/build/commands/revenueOrganization/member.d.ts.map +1 -0
  133. package/build/commands/revenueOrganization/member.js +62 -0
  134. package/build/commands/revenueOrganization/territory.d.ts +4 -0
  135. package/build/commands/revenueOrganization/territory.d.ts.map +1 -0
  136. package/build/commands/revenueOrganization/territory.js +72 -0
  137. package/build/commands/runHandler.d.ts +4 -0
  138. package/build/commands/runHandler.d.ts.map +1 -0
  139. package/build/commands/runHandler.js +33 -0
  140. package/build/commands/segmentation/change.d.ts +4 -0
  141. package/build/commands/segmentation/change.d.ts.map +1 -0
  142. package/build/commands/segmentation/change.js +61 -0
  143. package/build/commands/segmentation/index.d.ts +4 -0
  144. package/build/commands/segmentation/index.d.ts.map +1 -0
  145. package/build/commands/segmentation/index.js +11 -0
  146. package/build/commands/segmentation/record.d.ts +4 -0
  147. package/build/commands/segmentation/record.d.ts.map +1 -0
  148. package/build/commands/segmentation/record.js +21 -0
  149. package/build/commands/segmentation/segment.d.ts +4 -0
  150. package/build/commands/segmentation/segment.d.ts.map +1 -0
  151. package/build/commands/segmentation/segment.js +130 -0
  152. package/build/commands/storage/column.d.ts +4 -0
  153. package/build/commands/storage/column.d.ts.map +1 -0
  154. package/build/commands/storage/column.js +84 -0
  155. package/build/commands/storage/dataset.d.ts +4 -0
  156. package/build/commands/storage/dataset.d.ts.map +1 -0
  157. package/build/commands/storage/dataset.js +20 -0
  158. package/build/commands/storage/index.d.ts +4 -0
  159. package/build/commands/storage/index.d.ts.map +1 -0
  160. package/build/commands/storage/index.js +17 -0
  161. package/build/commands/storage/model.d.ts +4 -0
  162. package/build/commands/storage/model.d.ts.map +1 -0
  163. package/build/commands/storage/model.js +141 -0
  164. package/build/commands/storage/record.d.ts +4 -0
  165. package/build/commands/storage/record.d.ts.map +1 -0
  166. package/build/commands/storage/record.js +15 -0
  167. package/build/commands/storage/relationship.d.ts +4 -0
  168. package/build/commands/storage/relationship.d.ts.map +1 -0
  169. package/build/commands/storage/relationship.js +27 -0
  170. package/build/commands/storage/run.d.ts +4 -0
  171. package/build/commands/storage/run.d.ts.map +1 -0
  172. package/build/commands/storage/run.js +42 -0
  173. package/build/commands/systemOfRecordIntegration/client.d.ts +4 -0
  174. package/build/commands/systemOfRecordIntegration/client.d.ts.map +1 -0
  175. package/build/commands/systemOfRecordIntegration/client.js +46 -0
  176. package/build/commands/systemOfRecordIntegration/index.d.ts +4 -0
  177. package/build/commands/systemOfRecordIntegration/index.d.ts.map +1 -0
  178. package/build/commands/systemOfRecordIntegration/index.js +11 -0
  179. package/build/commands/systemOfRecordIntegration/log.d.ts +4 -0
  180. package/build/commands/systemOfRecordIntegration/log.d.ts.map +1 -0
  181. package/build/commands/systemOfRecordIntegration/log.js +36 -0
  182. package/build/commands/systemOfRecordIntegration/systemOfRecord.d.ts +4 -0
  183. package/build/commands/systemOfRecordIntegration/systemOfRecord.d.ts.map +1 -0
  184. package/build/commands/systemOfRecordIntegration/systemOfRecord.js +72 -0
  185. package/build/commands/userManagement/index.d.ts +4 -0
  186. package/build/commands/userManagement/index.d.ts.map +1 -0
  187. package/build/commands/userManagement/index.js +32 -0
  188. package/build/commands/workspace/file.d.ts +4 -0
  189. package/build/commands/workspace/file.d.ts.map +1 -0
  190. package/build/commands/workspace/file.js +44 -0
  191. package/build/commands/workspace/folder.d.ts +4 -0
  192. package/build/commands/workspace/folder.d.ts.map +1 -0
  193. package/build/commands/workspace/folder.js +64 -0
  194. package/build/commands/workspace/index.d.ts +4 -0
  195. package/build/commands/workspace/index.d.ts.map +1 -0
  196. package/build/commands/workspace/index.js +17 -0
  197. package/build/commands/workspace/role.d.ts +4 -0
  198. package/build/commands/workspace/role.d.ts.map +1 -0
  199. package/build/commands/workspace/role.js +12 -0
  200. package/build/commands/workspace/token.d.ts +4 -0
  201. package/build/commands/workspace/token.d.ts.map +1 -0
  202. package/build/commands/workspace/token.js +31 -0
  203. package/build/commands/workspace/user.d.ts +4 -0
  204. package/build/commands/workspace/user.d.ts.map +1 -0
  205. package/build/commands/workspace/user.js +105 -0
  206. package/build/commands/workspace/workspaces.d.ts +4 -0
  207. package/build/commands/workspace/workspaces.d.ts.map +1 -0
  208. package/build/commands/workspace/workspaces.js +74 -0
  209. package/build/config.d.ts +7 -0
  210. package/build/config.d.ts.map +1 -0
  211. package/build/config.js +45 -0
  212. package/build/credentials.d.ts +10 -0
  213. package/build/credentials.d.ts.map +1 -0
  214. package/build/credentials.js +31 -0
  215. package/build/index.d.ts +2 -0
  216. package/build/index.d.ts.map +1 -0
  217. package/build/index.js +37 -0
  218. package/package.json +44 -0
@@ -0,0 +1,84 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerColumnCommands(parent, getApi) {
3
+ const column = parent.command("column").description("Column operations");
4
+ column
5
+ .command("create")
6
+ .description("Create a column")
7
+ .requiredOption("--model-uuid <uuid>", "Model UUID")
8
+ .requiredOption("--column <json>", 'Column definition (JSON, e.g. {"slug":"name","type":"string","label":"Name","kind":"custom"})')
9
+ .action(async (opts) => {
10
+ const api = getApi();
11
+ await handleApiCall(() => api.storage.column.create({
12
+ modelUuid: opts.modelUuid,
13
+ column: parseJson(opts.column, "--column"),
14
+ }));
15
+ outputJson({ ok: true });
16
+ });
17
+ column
18
+ .command("update")
19
+ .description("Update a column")
20
+ .requiredOption("--model-uuid <uuid>", "Model UUID")
21
+ .requiredOption("--column <json>", 'Column definition (JSON, e.g. {"slug":"name","type":"string","label":"Name","kind":"custom"})')
22
+ .action(async (opts) => {
23
+ const api = getApi();
24
+ await handleApiCall(() => api.storage.column.update({
25
+ modelUuid: opts.modelUuid,
26
+ column: parseJson(opts.column, "--column"),
27
+ }));
28
+ outputJson({ ok: true });
29
+ });
30
+ column
31
+ .command("remove")
32
+ .description("Remove a column")
33
+ .requiredOption("--model-uuid <uuid>", "Model UUID")
34
+ .requiredOption("--column-slug <slug>", "Column slug")
35
+ .action(async (opts) => {
36
+ const api = getApi();
37
+ await handleApiCall(() => api.storage.column.remove({
38
+ modelUuid: opts.modelUuid,
39
+ columnSlug: opts.columnSlug,
40
+ }));
41
+ outputJson({ ok: true });
42
+ });
43
+ column
44
+ .command("reorder")
45
+ .description("Reorder columns")
46
+ .requiredOption("--model-uuid <uuid>", "Model UUID")
47
+ .requiredOption("--column-slug <slug>", "Column slug")
48
+ .requiredOption("--to-index <n>", "Target index")
49
+ .action(async (opts) => {
50
+ const api = getApi();
51
+ await handleApiCall(() => api.storage.column.reorder({
52
+ modelUuid: opts.modelUuid,
53
+ columnSlug: opts.columnSlug,
54
+ toIndex: parseInt(opts.toIndex, 10),
55
+ }));
56
+ outputJson({ ok: true });
57
+ });
58
+ column
59
+ .command("exists-by-slug")
60
+ .description("Check if a column exists by slug")
61
+ .requiredOption("--model-uuid <uuid>", "Model UUID")
62
+ .requiredOption("--column-slug <slug>", "Column slug")
63
+ .action(async (opts) => {
64
+ const api = getApi();
65
+ const result = await handleApiCall(() => api.storage.column.existsBySlug({
66
+ modelUuid: opts.modelUuid,
67
+ columnSlug: opts.columnSlug,
68
+ }));
69
+ outputJson(result);
70
+ });
71
+ column
72
+ .command("autocomplete")
73
+ .description("Autocomplete column values")
74
+ .requiredOption("--model-uuid <uuid>", "Model UUID")
75
+ .requiredOption("--column <json>", 'Column definition (JSON, e.g. {"slug":"name","type":"string","label":"Name","kind":"custom"})')
76
+ .action(async (opts) => {
77
+ const api = getApi();
78
+ const result = await handleApiCall(() => api.storage.column.autocomplete({
79
+ modelUuid: opts.modelUuid,
80
+ column: parseJson(opts.column, "--column"),
81
+ }));
82
+ outputJson(result);
83
+ });
84
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerDatasetCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=dataset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataset.d.ts","sourceRoot":"","sources":["../../../src/commands/storage/dataset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAoBN"}
@@ -0,0 +1,20 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerDatasetCommands(parent, getApi) {
3
+ const dataset = parent.command("dataset").description("Dataset operations");
4
+ dataset
5
+ .command("list")
6
+ .description("List all datasets")
7
+ .action(async () => {
8
+ const api = getApi();
9
+ const result = await handleApiCall(() => api.storage.dataset.all());
10
+ outputJson(result);
11
+ });
12
+ dataset
13
+ .command("get <uuid>")
14
+ .description("Get a dataset by UUID")
15
+ .action(async (uuid) => {
16
+ const api = getApi();
17
+ const result = await handleApiCall(() => api.storage.dataset.get(uuid));
18
+ outputJson(result);
19
+ });
20
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerStorageCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAQxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAWN"}
@@ -0,0 +1,17 @@
1
+ import { registerColumnCommands } from "./column.js";
2
+ import { registerDatasetCommands } from "./dataset.js";
3
+ import { registerModelCommands } from "./model.js";
4
+ import { registerRecordCommands } from "./record.js";
5
+ import { registerRelationshipCommands } from "./relationship.js";
6
+ import { registerRunCommands } from "./run.js";
7
+ export function registerStorageCommands(parent, getApi) {
8
+ const storage = parent
9
+ .command("storage")
10
+ .description("Datasets, models, relationships, runs, records");
11
+ registerDatasetCommands(storage, getApi);
12
+ registerModelCommands(storage, getApi);
13
+ registerRelationshipCommands(storage, getApi);
14
+ registerRunCommands(storage, getApi);
15
+ registerRecordCommands(storage, getApi);
16
+ registerColumnCommands(storage, getApi);
17
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerModelCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/commands/storage/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAoMN"}
@@ -0,0 +1,141 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerModelCommands(parent, getApi) {
3
+ const model = parent.command("model").description("Model operations");
4
+ model
5
+ .command("list")
6
+ .description("List all models")
7
+ .action(async () => {
8
+ const api = getApi();
9
+ const result = await handleApiCall(() => api.storage.model.all());
10
+ outputJson(result);
11
+ });
12
+ model
13
+ .command("get <uuid>")
14
+ .description("Get a model by UUID")
15
+ .action(async (uuid) => {
16
+ const api = getApi();
17
+ const result = await handleApiCall(() => api.storage.model.get(uuid));
18
+ outputJson(result);
19
+ });
20
+ model
21
+ .command("create")
22
+ .description("Create a model")
23
+ .requiredOption("--slug <slug>", "Model slug")
24
+ .requiredOption("--name <name>", "Model name")
25
+ .requiredOption("--dataset-uuid <uuid>", "Dataset UUID")
26
+ .requiredOption("--extractor-slug <slug>", "Extractor slug")
27
+ .requiredOption("--config <json>", "Extractor configuration (JSON object)")
28
+ .option("--schedule <json>", 'Schedule (JSON, e.g. {"type":"cron","cron":"0 0 * * *"})')
29
+ .action(async (opts) => {
30
+ const api = getApi();
31
+ const result = await handleApiCall(() => api.storage.model.create({
32
+ slug: opts.slug,
33
+ name: opts.name,
34
+ datasetUuid: opts.datasetUuid,
35
+ extractorSlug: opts.extractorSlug,
36
+ config: parseJson(opts.config, "--config"),
37
+ schedule: opts.schedule !== undefined
38
+ ? parseJson(opts.schedule, "--schedule")
39
+ : undefined,
40
+ }));
41
+ outputJson(result);
42
+ });
43
+ model
44
+ .command("remove <uuid>")
45
+ .description("Remove a model")
46
+ .action(async (uuid) => {
47
+ const api = getApi();
48
+ await handleApiCall(() => api.storage.model.remove(uuid));
49
+ outputJson({ ok: true });
50
+ });
51
+ model
52
+ .command("get-ddl <uuid>")
53
+ .description("Get DDL for a model")
54
+ .action(async (uuid) => {
55
+ const api = getApi();
56
+ const result = await handleApiCall(() => api.storage.model.getDdl(uuid));
57
+ outputJson(result);
58
+ });
59
+ model
60
+ .command("update")
61
+ .description("Update a model")
62
+ .requiredOption("--uuid <uuid>", "Model UUID")
63
+ .option("--name <name>", "Model name")
64
+ .option("--extractor-slug <slug>", "Extractor slug")
65
+ .option("--config <json>", "Extractor configuration (JSON object)")
66
+ .option("--position <json>", 'Position (JSON, e.g. {"x":0,"y":0})')
67
+ .option("--unification <json>", 'Unification (JSON, e.g. {"source":"integration"} or null)')
68
+ .option("--schedule <json>", 'Schedule (JSON, e.g. {"type":"cron","cron":"0 0 * * *"} or null)')
69
+ .action(async (opts) => {
70
+ const api = getApi();
71
+ const result = await handleApiCall(() => api.storage.model.update({
72
+ uuid: opts.uuid,
73
+ name: opts.name,
74
+ extractorSlug: opts.extractorSlug,
75
+ config: opts.config !== undefined
76
+ ? parseJson(opts.config, "--config")
77
+ : undefined,
78
+ position: opts.position !== undefined
79
+ ? parseJson(opts.position, "--position")
80
+ : undefined,
81
+ unification: opts.unification !== undefined
82
+ ? parseJson(opts.unification, "--unification")
83
+ : undefined,
84
+ schedule: opts.schedule !== undefined
85
+ ? parseJson(opts.schedule, "--schedule")
86
+ : undefined,
87
+ }));
88
+ outputJson(result);
89
+ });
90
+ model
91
+ .command("sync <uuid>")
92
+ .description("Sync a model")
93
+ .action(async (uuid) => {
94
+ const api = getApi();
95
+ const result = await handleApiCall(() => api.storage.model.sync(uuid));
96
+ outputJson(result);
97
+ });
98
+ model
99
+ .command("exists-by-slug")
100
+ .description("Check if a model exists by slug")
101
+ .requiredOption("--slug <slug>", "Model slug")
102
+ .requiredOption("--dataset-uuid <uuid>", "Dataset UUID")
103
+ .action(async (opts) => {
104
+ const api = getApi();
105
+ const result = await handleApiCall(() => api.storage.model.existsBySlug({
106
+ slug: opts.slug,
107
+ datasetUuid: opts.datasetUuid,
108
+ }));
109
+ outputJson(result);
110
+ });
111
+ model
112
+ .command("preview")
113
+ .description("Preview a model")
114
+ .requiredOption("--dataset-uuid <uuid>", "Dataset UUID")
115
+ .requiredOption("--slug <slug>", "Model slug")
116
+ .requiredOption("--config <json>", "Extractor configuration (JSON object)")
117
+ .action(async (opts) => {
118
+ const api = getApi();
119
+ const result = await handleApiCall(() => api.storage.model.preview({
120
+ datasetUuid: opts.datasetUuid,
121
+ slug: opts.slug,
122
+ config: parseJson(opts.config, "--config"),
123
+ }));
124
+ outputJson(result);
125
+ });
126
+ model
127
+ .command("preview-count")
128
+ .description("Preview count for a model")
129
+ .requiredOption("--dataset-uuid <uuid>", "Dataset UUID")
130
+ .requiredOption("--slug <slug>", "Model slug")
131
+ .requiredOption("--config <json>", "Extractor configuration (JSON object)")
132
+ .action(async (opts) => {
133
+ const api = getApi();
134
+ const result = await handleApiCall(() => api.storage.model.previewCount({
135
+ datasetUuid: opts.datasetUuid,
136
+ slug: opts.slug,
137
+ config: parseJson(opts.config, "--config"),
138
+ }));
139
+ outputJson(result);
140
+ });
141
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerRecordCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/commands/storage/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAgBN"}
@@ -0,0 +1,15 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerRecordCommands(parent, getApi) {
3
+ const record = parent
4
+ .command("record")
5
+ .description("Storage record operations");
6
+ record
7
+ .command("list")
8
+ .description("List storage records")
9
+ .requiredOption("--model-uuid <uuid>", "Model UUID")
10
+ .action(async (opts) => {
11
+ const api = getApi();
12
+ const result = await handleApiCall(() => api.storage.record.list({ modelUuid: opts.modelUuid }));
13
+ outputJson(result);
14
+ });
15
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerRelationshipCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=relationship.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationship.d.ts","sourceRoot":"","sources":["../../../src/commands/storage/relationship.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAgCN"}
@@ -0,0 +1,27 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerRelationshipCommands(parent, getApi) {
3
+ const relationship = parent
4
+ .command("relationship")
5
+ .description("Relationship operations");
6
+ relationship
7
+ .command("list")
8
+ .description("List all relationships")
9
+ .action(async () => {
10
+ const api = getApi();
11
+ const result = await handleApiCall(() => api.storage.relationship.all());
12
+ outputJson(result);
13
+ });
14
+ relationship
15
+ .command("set")
16
+ .description("Set relationships")
17
+ .requiredOption("--dataset-uuid <uuid>", "Dataset UUID")
18
+ .requiredOption("--relationships <json>", 'Relationships (JSON array, e.g. [{"fromModelUuid":"...","fromColumnSlug":"id","toModelUuid":"...","toColumnSlug":"company_id","relation":"manyToOne"}])')
19
+ .action(async (opts) => {
20
+ const api = getApi();
21
+ const result = await handleApiCall(() => api.storage.relationship.set({
22
+ datasetUuid: opts.datasetUuid,
23
+ relationships: parseJson(opts.relationships, "--relationships"),
24
+ }));
25
+ outputJson(result);
26
+ });
27
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerRunCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/storage/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CAyD5E"}
@@ -0,0 +1,42 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerRunCommands(parent, getApi) {
3
+ const run = parent.command("run").description("Storage run operations");
4
+ run
5
+ .command("list")
6
+ .description("List storage runs")
7
+ .option("--model-uuid <uuid>", "Model UUID")
8
+ .option("--limit <n>", "Limit", "20")
9
+ .option("--offset <n>", "Offset", "0")
10
+ .action(async (opts) => {
11
+ const api = getApi();
12
+ const result = await handleApiCall(() => api.storage.run.list({
13
+ modelUuid: opts.modelUuid,
14
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
15
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
16
+ }));
17
+ outputJson(result);
18
+ });
19
+ run
20
+ .command("create")
21
+ .description("Create a storage run")
22
+ .requiredOption("--model-uuid <uuid>", "Model UUID")
23
+ .option("--is-reset", "Reset the model before running")
24
+ .option("--is-force", "Force the run")
25
+ .action(async (opts) => {
26
+ const api = getApi();
27
+ const result = await handleApiCall(() => api.storage.run.create({
28
+ modelUuid: opts.modelUuid,
29
+ isReset: opts.isReset,
30
+ isForce: opts.isForce,
31
+ }));
32
+ outputJson(result);
33
+ });
34
+ run
35
+ .command("cancel <uuid>")
36
+ .description("Cancel a storage run")
37
+ .action(async (uuid) => {
38
+ const api = getApi();
39
+ await handleApiCall(() => api.storage.run.cancel(uuid));
40
+ outputJson({ ok: true });
41
+ });
42
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerClientCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/commands/systemOfRecordIntegration/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA4DN"}
@@ -0,0 +1,46 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerClientCommands(parent, getApi) {
3
+ const client = parent
4
+ .command("client")
5
+ .description("System of record client operations");
6
+ client
7
+ .command("get-documentation <slug>")
8
+ .description("Get client documentation by slug")
9
+ .action(async (slug) => {
10
+ const api = getApi();
11
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.client.getDocumentation(slug));
12
+ outputJson(result);
13
+ });
14
+ client
15
+ .command("query <query>")
16
+ .description("Execute a query against the system of record client")
17
+ .action(async (query) => {
18
+ const api = getApi();
19
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.client.query(query));
20
+ outputJson(result);
21
+ });
22
+ client
23
+ .command("download")
24
+ .description("Download from the system of record client")
25
+ .requiredOption("--query <query>", "SQL query")
26
+ .action(async (opts) => {
27
+ const api = getApi();
28
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.client.download({ query: opts.query }));
29
+ outputJson(result);
30
+ });
31
+ client
32
+ .command("fetch")
33
+ .description("Fetch from the system of record client")
34
+ .requiredOption("--query <query>", "SQL query")
35
+ .option("--limit <n>", "Limit")
36
+ .option("--offset <n>", "Offset")
37
+ .action(async (opts) => {
38
+ const api = getApi();
39
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.client.fetch({
40
+ query: opts.query,
41
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
42
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
43
+ }));
44
+ outputJson(result);
45
+ });
46
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerSystemOfRecordIntegrationCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/systemOfRecordIntegration/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAKxC,wBAAgB,yCAAyC,CACvD,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAQN"}
@@ -0,0 +1,11 @@
1
+ import { registerClientCommands } from "./client.js";
2
+ import { registerLogCommands } from "./log.js";
3
+ import { registerSystemOfRecordCommands } from "./systemOfRecord.js";
4
+ export function registerSystemOfRecordIntegrationCommands(parent, getApi) {
5
+ const sori = parent
6
+ .command("system-of-record")
7
+ .description("System of record, client, logs");
8
+ registerSystemOfRecordCommands(sori, getApi);
9
+ registerClientCommands(sori, getApi);
10
+ registerLogCommands(sori, getApi);
11
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerLogCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/commands/systemOfRecordIntegration/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CAoD5E"}
@@ -0,0 +1,36 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerLogCommands(parent, getApi) {
3
+ const log = parent.command("log").description("Log operations");
4
+ log
5
+ .command("list")
6
+ .description("List logs")
7
+ .option("--statuses <statuses>", "Statuses (comma-separated)")
8
+ .option("--query <query>", "Search query")
9
+ .option("--limit <n>", "Limit")
10
+ .option("--offset <n>", "Offset")
11
+ .action(async (opts) => {
12
+ const api = getApi();
13
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.log.list({
14
+ statuses: opts.statuses !== undefined
15
+ ? opts.statuses.split(",").map((s) => s.trim())
16
+ : undefined,
17
+ query: opts.query,
18
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
19
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
20
+ }));
21
+ outputJson(result);
22
+ });
23
+ log
24
+ .command("get-metrics")
25
+ .description("Get log metrics")
26
+ .requiredOption("--from <date>", "Start date")
27
+ .requiredOption("--to <date>", "End date")
28
+ .action(async (opts) => {
29
+ const api = getApi();
30
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.log.getMetrics({
31
+ from: opts.from,
32
+ to: opts.to,
33
+ }));
34
+ outputJson(result);
35
+ });
36
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerSystemOfRecordCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=systemOfRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systemOfRecord.d.ts","sourceRoot":"","sources":["../../../src/commands/systemOfRecordIntegration/systemOfRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA4FN"}
@@ -0,0 +1,72 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerSystemOfRecordCommands(parent, getApi) {
3
+ const sor = parent.command("sor").description("System of record operations");
4
+ sor
5
+ .command("list")
6
+ .description("List all system of records")
7
+ .action(async () => {
8
+ const api = getApi();
9
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.systemOfRecord.all());
10
+ outputJson(result);
11
+ });
12
+ sor
13
+ .command("get <uuid>")
14
+ .description("Get system of record by UUID")
15
+ .action(async (uuid) => {
16
+ const api = getApi();
17
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.systemOfRecord.get(uuid));
18
+ outputJson(result);
19
+ });
20
+ sor
21
+ .command("migrate <uuid>")
22
+ .description("Migrate a system of record")
23
+ .action(async (uuid) => {
24
+ const api = getApi();
25
+ await handleApiCall(() => api.systemOfRecordIntegration.systemOfRecord.migrate({ uuid }));
26
+ outputJson({ ok: true });
27
+ });
28
+ sor
29
+ .command("cutover <uuid>")
30
+ .description("Cutover a system of record")
31
+ .action(async (uuid) => {
32
+ const api = getApi();
33
+ await handleApiCall(() => api.systemOfRecordIntegration.systemOfRecord.cutover({ uuid }));
34
+ outputJson({ ok: true });
35
+ });
36
+ sor
37
+ .command("create")
38
+ .description("Create a system of record")
39
+ .requiredOption("--kind <kind>", "System of record kind")
40
+ .option("--config <json>", "Configuration (JSON object)")
41
+ .action(async (opts) => {
42
+ const api = getApi();
43
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.systemOfRecord.create({
44
+ kind: opts.kind,
45
+ config: opts.config !== undefined
46
+ ? parseJson(opts.config, "--config")
47
+ : undefined,
48
+ }));
49
+ outputJson(result);
50
+ });
51
+ sor
52
+ .command("update")
53
+ .description("Update a system of record")
54
+ .requiredOption("--uuid <uuid>", "System of record UUID")
55
+ .requiredOption("--config <json>", "Configuration (JSON object)")
56
+ .action(async (opts) => {
57
+ const api = getApi();
58
+ const result = await handleApiCall(() => api.systemOfRecordIntegration.systemOfRecord.update({
59
+ uuid: opts.uuid,
60
+ config: parseJson(opts.config, "--config"),
61
+ }));
62
+ outputJson(result);
63
+ });
64
+ sor
65
+ .command("remove <uuid>")
66
+ .description("Remove a system of record")
67
+ .action(async (uuid) => {
68
+ const api = getApi();
69
+ await handleApiCall(() => api.systemOfRecordIntegration.systemOfRecord.remove(uuid));
70
+ outputJson({ ok: true });
71
+ });
72
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerUserManagementCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/userManagement/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA+CN"}