@lotics/cli 0.148.2 → 0.150.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/dist/src/cli.js +31 -0
- package/dist/src/client.d.ts +8 -0
- package/dist/src/client.js +5 -0
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -44381,6 +44381,11 @@ var LoticsClient = class {
|
|
|
44381
44381
|
async createWorkspace(body) {
|
|
44382
44382
|
return this.request("POST", "/v1/workspaces", body);
|
|
44383
44383
|
}
|
|
44384
|
+
/** Renames (and re-settings) the CURRENT workspace — the endpoint reads the
|
|
44385
|
+
* target from the request's workspace, never a path id. */
|
|
44386
|
+
async updateWorkspace(body) {
|
|
44387
|
+
return this.request("PATCH", "/v1/workspace", body);
|
|
44388
|
+
}
|
|
44384
44389
|
async deleteWorkspace(id) {
|
|
44385
44390
|
return this.request("DELETE", `/v1/workspaces/${encodeURIComponent(id)}`);
|
|
44386
44391
|
}
|
|
@@ -45789,6 +45794,7 @@ var COMMANDS = [
|
|
|
45789
45794
|
" lotics workspace List workspaces in the active org (marks current)",
|
|
45790
45795
|
" lotics workspace select <id> Switch to a different workspace",
|
|
45791
45796
|
" lotics workspace create <name> Create a new workspace (admin only)",
|
|
45797
|
+
" lotics workspace rename <name> Rename the current workspace (admin only)",
|
|
45792
45798
|
" lotics workspace delete <id> --yes Delete a workspace (admin only; soft delete, recoverable)",
|
|
45793
45799
|
" lotics workspace doctor Report dangling schema references (admin only)"
|
|
45794
45800
|
]
|
|
@@ -46957,6 +46963,7 @@ async function dispatchRpc(client, body, opts) {
|
|
|
46957
46963
|
}
|
|
46958
46964
|
const comment = await client.appUpdateRecordComment(body.app_id, p.record_id, p.comment_id, {
|
|
46959
46965
|
content: p.content,
|
|
46966
|
+
file_ids: p.file_ids,
|
|
46960
46967
|
files: p.files
|
|
46961
46968
|
});
|
|
46962
46969
|
return { comment };
|
|
@@ -103431,6 +103438,30 @@ Available workspaces:`);
|
|
|
103431
103438
|
}
|
|
103432
103439
|
return;
|
|
103433
103440
|
}
|
|
103441
|
+
if (subcommand === "rename") {
|
|
103442
|
+
const name2 = toolArgs;
|
|
103443
|
+
if (!name2) {
|
|
103444
|
+
console.error("Usage: lotics workspace rename <new name>");
|
|
103445
|
+
console.error('Renames the CURRENT workspace. Switch first with "lotics workspace select <id>".');
|
|
103446
|
+
process.exit(1);
|
|
103447
|
+
}
|
|
103448
|
+
const current = workspaces.find((ws) => ws.id === currentWorkspaceId);
|
|
103449
|
+
if (!current) {
|
|
103450
|
+
console.error('No workspace selected. Choose one with "lotics workspace select <id>".');
|
|
103451
|
+
process.exit(1);
|
|
103452
|
+
}
|
|
103453
|
+
const renamed = await client.updateWorkspace({
|
|
103454
|
+
name: name2,
|
|
103455
|
+
default_currency: current.default_currency,
|
|
103456
|
+
timezone: current.timezone
|
|
103457
|
+
});
|
|
103458
|
+
if (flags.json) {
|
|
103459
|
+
console.log(JSON.stringify(renamed, null, 2));
|
|
103460
|
+
} else {
|
|
103461
|
+
console.error(`Renamed "${current.name}" to "${renamed.name}" (${renamed.id})`);
|
|
103462
|
+
}
|
|
103463
|
+
return;
|
|
103464
|
+
}
|
|
103434
103465
|
if (subcommand === "delete") {
|
|
103435
103466
|
const targetId = toolArgs;
|
|
103436
103467
|
if (!targetId) {
|
package/dist/src/client.d.ts
CHANGED
|
@@ -195,6 +195,13 @@ export declare class LoticsClient {
|
|
|
195
195
|
name: string;
|
|
196
196
|
timezone?: string;
|
|
197
197
|
}): Promise<WorkspaceInfo>;
|
|
198
|
+
/** Renames (and re-settings) the CURRENT workspace — the endpoint reads the
|
|
199
|
+
* target from the request's workspace, never a path id. */
|
|
200
|
+
updateWorkspace(body: {
|
|
201
|
+
name: string;
|
|
202
|
+
default_currency: string;
|
|
203
|
+
timezone: string;
|
|
204
|
+
}): Promise<WorkspaceInfo>;
|
|
198
205
|
deleteWorkspace(id: string): Promise<{
|
|
199
206
|
id: string;
|
|
200
207
|
deleted: boolean;
|
|
@@ -1043,6 +1050,7 @@ export declare class LoticsClient {
|
|
|
1043
1050
|
}): Promise<unknown>;
|
|
1044
1051
|
appUpdateRecordComment(app_id: string, record_id: string, comment_id: string, body: {
|
|
1045
1052
|
content: string;
|
|
1053
|
+
file_ids?: string[];
|
|
1046
1054
|
files?: unknown[];
|
|
1047
1055
|
}): Promise<unknown>;
|
|
1048
1056
|
appDeleteRecordComment(app_id: string, record_id: string, comment_id: string): Promise<void>;
|
package/dist/src/client.js
CHANGED
|
@@ -143,6 +143,11 @@ export class LoticsClient {
|
|
|
143
143
|
async createWorkspace(body) {
|
|
144
144
|
return this.request("POST", "/v1/workspaces", body);
|
|
145
145
|
}
|
|
146
|
+
/** Renames (and re-settings) the CURRENT workspace — the endpoint reads the
|
|
147
|
+
* target from the request's workspace, never a path id. */
|
|
148
|
+
async updateWorkspace(body) {
|
|
149
|
+
return this.request("PATCH", "/v1/workspace", body);
|
|
150
|
+
}
|
|
146
151
|
async deleteWorkspace(id) {
|
|
147
152
|
return this.request("DELETE", `/v1/workspaces/${encodeURIComponent(id)}`);
|
|
148
153
|
}
|