@lotics/cli 0.37.0 → 0.39.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/client.d.ts +25 -1
- package/dist/client.js +3 -2
- package/dist/dev/rpc_handler.js +4 -1
- package/dist/src/cli.js +11 -6
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/** One sort key forwarded to the app query RPC (wire shape of a `TableRecordSort` entry). */
|
|
2
|
+
export interface AppQuerySortKey {
|
|
3
|
+
field_key: string;
|
|
4
|
+
order: "asc" | "desc";
|
|
5
|
+
}
|
|
6
|
+
/** A filter condition over one output column (wire shape of a `TableRecordFilters` node). */
|
|
7
|
+
export interface AppQueryFilterCondition {
|
|
8
|
+
node_type: "condition";
|
|
9
|
+
field_key: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
operator: string;
|
|
12
|
+
value?: unknown;
|
|
13
|
+
}
|
|
14
|
+
/** A boolean group of filter nodes (wire shape — recursive). */
|
|
15
|
+
export interface AppQueryFilterGroup {
|
|
16
|
+
node_type: "group";
|
|
17
|
+
logic: "and" | "or";
|
|
18
|
+
children: Array<AppQueryFilterCondition | AppQueryFilterGroup>;
|
|
19
|
+
}
|
|
20
|
+
/** Runtime filter/sort the app query RPC applies AFTER the named query, bounded to its output columns. */
|
|
21
|
+
export type AppQueryFilter = AppQueryFilterCondition | AppQueryFilterGroup;
|
|
1
22
|
export interface LoticsClientOptions {
|
|
2
23
|
apiKey: string;
|
|
3
24
|
workspaceId?: string;
|
|
@@ -132,14 +153,17 @@ export declare class LoticsClient {
|
|
|
132
153
|
params?: Record<string, unknown>;
|
|
133
154
|
limit?: number;
|
|
134
155
|
offset?: number;
|
|
156
|
+
sort?: AppQuerySortKey[];
|
|
157
|
+
filter?: AppQueryFilter;
|
|
135
158
|
}): Promise<{
|
|
136
159
|
rows: unknown[];
|
|
137
160
|
}>;
|
|
138
|
-
appMembers(app_id: string): Promise<{
|
|
161
|
+
appMembers(app_id: string, group_id?: string): Promise<{
|
|
139
162
|
members: Array<{
|
|
140
163
|
id: string;
|
|
141
164
|
name: string | null;
|
|
142
165
|
email: string | null;
|
|
166
|
+
image: string | null;
|
|
143
167
|
}>;
|
|
144
168
|
}>;
|
|
145
169
|
/**
|
package/dist/client.js
CHANGED
|
@@ -176,8 +176,9 @@ export class LoticsClient {
|
|
|
176
176
|
async appQuery(app_id, body) {
|
|
177
177
|
return this.request("POST", `/v1/apps/${encodeURIComponent(app_id)}/query`, body);
|
|
178
178
|
}
|
|
179
|
-
async appMembers(app_id) {
|
|
180
|
-
|
|
179
|
+
async appMembers(app_id, group_id) {
|
|
180
|
+
const qs = group_id ? `?group_id=${encodeURIComponent(group_id)}` : "";
|
|
181
|
+
return this.request("GET", `/v1/apps/${encodeURIComponent(app_id)}/members${qs}`);
|
|
181
182
|
}
|
|
182
183
|
/**
|
|
183
184
|
* Execute a workflow by alias declared in package.json#lotics.workflows.
|
package/dist/dev/rpc_handler.js
CHANGED
|
@@ -30,6 +30,8 @@ export async function dispatchRpc(client, body) {
|
|
|
30
30
|
params: p.params,
|
|
31
31
|
limit: p.limit,
|
|
32
32
|
offset: p.offset,
|
|
33
|
+
sort: p.sort,
|
|
34
|
+
filter: p.filter,
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
37
|
case "workflow": {
|
|
@@ -40,7 +42,8 @@ export async function dispatchRpc(client, body) {
|
|
|
40
42
|
return client.appWorkflow(body.app_id, p.alias, p.inputs);
|
|
41
43
|
}
|
|
42
44
|
case "members": {
|
|
43
|
-
|
|
45
|
+
const p = body.payload;
|
|
46
|
+
return client.appMembers(body.app_id, p?.group);
|
|
44
47
|
}
|
|
45
48
|
case "upload_url": {
|
|
46
49
|
const p = body.payload;
|
package/dist/src/cli.js
CHANGED
|
@@ -31841,8 +31841,9 @@ var LoticsClient = class {
|
|
|
31841
31841
|
async appQuery(app_id, body) {
|
|
31842
31842
|
return this.request("POST", `/v1/apps/${encodeURIComponent(app_id)}/query`, body);
|
|
31843
31843
|
}
|
|
31844
|
-
async appMembers(app_id) {
|
|
31845
|
-
|
|
31844
|
+
async appMembers(app_id, group_id) {
|
|
31845
|
+
const qs = group_id ? `?group_id=${encodeURIComponent(group_id)}` : "";
|
|
31846
|
+
return this.request("GET", `/v1/apps/${encodeURIComponent(app_id)}/members${qs}`);
|
|
31846
31847
|
}
|
|
31847
31848
|
/**
|
|
31848
31849
|
* Execute a workflow by alias declared in package.json#lotics.workflows.
|
|
@@ -32744,7 +32745,9 @@ async function dispatchRpc(client, body) {
|
|
|
32744
32745
|
alias: p.alias,
|
|
32745
32746
|
params: p.params,
|
|
32746
32747
|
limit: p.limit,
|
|
32747
|
-
offset: p.offset
|
|
32748
|
+
offset: p.offset,
|
|
32749
|
+
sort: p.sort,
|
|
32750
|
+
filter: p.filter
|
|
32748
32751
|
});
|
|
32749
32752
|
}
|
|
32750
32753
|
case "workflow": {
|
|
@@ -32755,7 +32758,8 @@ async function dispatchRpc(client, body) {
|
|
|
32755
32758
|
return client.appWorkflow(body.app_id, p.alias, p.inputs);
|
|
32756
32759
|
}
|
|
32757
32760
|
case "members": {
|
|
32758
|
-
|
|
32761
|
+
const p = body.payload;
|
|
32762
|
+
return client.appMembers(body.app_id, p?.group);
|
|
32759
32763
|
}
|
|
32760
32764
|
case "upload_url": {
|
|
32761
32765
|
const p = body.payload;
|
|
@@ -42398,7 +42402,7 @@ function parseExcelFromZip(zip) {
|
|
|
42398
42402
|
let visibleIndex = 0;
|
|
42399
42403
|
for (let i = 0; i < workbookInfo.sheets.length; i++) {
|
|
42400
42404
|
const sheetInfo = workbookInfo.sheets[i];
|
|
42401
|
-
|
|
42405
|
+
const isHidden = sheetInfo.state === "hidden" || sheetInfo.state === "veryHidden";
|
|
42402
42406
|
const relTarget = wbRels.get(sheetInfo.rId);
|
|
42403
42407
|
if (!relTarget) continue;
|
|
42404
42408
|
const sheetPath = relTarget.startsWith("/") ? relTarget.slice(1) : `xl/${relTarget}`;
|
|
@@ -42418,6 +42422,7 @@ function parseExcelFromZip(zip) {
|
|
|
42418
42422
|
workbookInfo.date1904
|
|
42419
42423
|
);
|
|
42420
42424
|
parsed.name = sheetInfo.name;
|
|
42425
|
+
if (isHidden) parsed.hidden = true;
|
|
42421
42426
|
const printTitlesRaw = workbookInfo.printTitlesBySheet.get(i);
|
|
42422
42427
|
if (printTitlesRaw) {
|
|
42423
42428
|
const pt = parsePrintTitlesRef(printTitlesRaw);
|
|
@@ -46244,7 +46249,7 @@ import fs6 from "node:fs";
|
|
|
46244
46249
|
// ../docx/src/parse/parser.ts
|
|
46245
46250
|
var import_jszip = __toESM(require_lib3(), 1);
|
|
46246
46251
|
|
|
46247
|
-
// ../
|
|
46252
|
+
// ../ooxml/src/xml.ts
|
|
46248
46253
|
var import_fast_xml_parser6 = __toESM(require_fxp(), 1);
|
|
46249
46254
|
var parserOptions = {
|
|
46250
46255
|
preserveOrder: true,
|