@ivotoby/postgram-cli 1.19.0 → 1.21.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.js +6 -0
- package/dist/pgm.js +9 -3
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -91,6 +91,9 @@ export function createPgmClient(options) {
|
|
|
91
91
|
if (input.offset !== undefined) {
|
|
92
92
|
params.set('offset', String(input.offset));
|
|
93
93
|
}
|
|
94
|
+
if (input.include_archived) {
|
|
95
|
+
params.set('include_archived', 'true');
|
|
96
|
+
}
|
|
94
97
|
const query = params.toString();
|
|
95
98
|
return request(options, `/api/entities${query ? `?${query}` : ''}`);
|
|
96
99
|
},
|
|
@@ -114,6 +117,9 @@ export function createPgmClient(options) {
|
|
|
114
117
|
if (input.offset !== undefined) {
|
|
115
118
|
params.set('offset', String(input.offset));
|
|
116
119
|
}
|
|
120
|
+
if (input.include_archived) {
|
|
121
|
+
params.set('include_archived', 'true');
|
|
122
|
+
}
|
|
117
123
|
return request(options, `/api/tasks?${params.toString()}`);
|
|
118
124
|
},
|
|
119
125
|
updateTask(id, input) {
|
package/dist/pgm.js
CHANGED
|
@@ -245,6 +245,7 @@ program
|
|
|
245
245
|
.option('--threshold <threshold>', 'similarity threshold', '0.35')
|
|
246
246
|
.option('--recency-weight <recencyWeight>', 'recency weight', '0.1')
|
|
247
247
|
.option('--expand-graph', 'include graph-connected entities in results')
|
|
248
|
+
.option('--include-archived', 'include archived entities in results')
|
|
248
249
|
.action(async (query, options, command) => {
|
|
249
250
|
await runWithClient(command, async (client, json) => {
|
|
250
251
|
const body = await client.searchEntities({
|
|
@@ -256,7 +257,8 @@ program
|
|
|
256
257
|
limit: Number(options.limit),
|
|
257
258
|
threshold: Number(options.threshold),
|
|
258
259
|
recency_weight: Number(options.recencyWeight),
|
|
259
|
-
expand_graph: options.expandGraph === true ? true : undefined
|
|
260
|
+
expand_graph: options.expandGraph === true ? true : undefined,
|
|
261
|
+
include_archived: options.includeArchived === true ? true : undefined
|
|
260
262
|
});
|
|
261
263
|
return json ? body : formatSearchResults(body.results);
|
|
262
264
|
});
|
|
@@ -284,6 +286,7 @@ program
|
|
|
284
286
|
.option('--tags <tags>', 'comma-separated tags')
|
|
285
287
|
.option('--limit <limit>', 'result limit', '50')
|
|
286
288
|
.option('--offset <offset>', 'result offset', '0')
|
|
289
|
+
.option('--include-archived', 'include archived entities')
|
|
287
290
|
.action(async (options, command) => {
|
|
288
291
|
await runWithClient(command, async (client, json) => {
|
|
289
292
|
const body = await client.listEntities({
|
|
@@ -293,7 +296,8 @@ program
|
|
|
293
296
|
owner: options.owner,
|
|
294
297
|
tags: parseCommaList(options.tags),
|
|
295
298
|
limit: Number(options.limit),
|
|
296
|
-
offset: Number(options.offset)
|
|
299
|
+
offset: Number(options.offset),
|
|
300
|
+
include_archived: options.includeArchived === true ? true : undefined
|
|
297
301
|
});
|
|
298
302
|
if (json) {
|
|
299
303
|
return body;
|
|
@@ -410,13 +414,15 @@ taskCommand
|
|
|
410
414
|
.option('--context <context>', 'filter by context')
|
|
411
415
|
.option('--limit <limit>', 'result limit', '50')
|
|
412
416
|
.option('--offset <offset>', 'result offset', '0')
|
|
417
|
+
.option('--include-archived', 'include archived tasks')
|
|
413
418
|
.action(async (options, command) => {
|
|
414
419
|
await runWithClient(command, async (client, json) => {
|
|
415
420
|
const body = await client.listTasks({
|
|
416
421
|
status: options.status,
|
|
417
422
|
context: options.context,
|
|
418
423
|
limit: Number(options.limit),
|
|
419
|
-
offset: Number(options.offset)
|
|
424
|
+
offset: Number(options.offset),
|
|
425
|
+
include_archived: options.includeArchived === true ? true : undefined
|
|
420
426
|
});
|
|
421
427
|
return json ? body : formatTaskList(body.items);
|
|
422
428
|
});
|