@eide/foir-cli 0.29.0 → 0.31.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/cli.js +207 -208
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -704,8 +704,8 @@ function createIdentityMethods(client) {
|
|
|
704
704
|
search: params.search,
|
|
705
705
|
status: params.status,
|
|
706
706
|
role: params.role,
|
|
707
|
-
|
|
708
|
-
|
|
707
|
+
first: params.first ?? 50,
|
|
708
|
+
after: params?.after
|
|
709
709
|
})
|
|
710
710
|
);
|
|
711
711
|
return {
|
|
@@ -768,8 +768,8 @@ function createIdentityMethods(client) {
|
|
|
768
768
|
create(ListCustomersRequestSchema, {
|
|
769
769
|
search: params.search,
|
|
770
770
|
status: params.status,
|
|
771
|
-
|
|
772
|
-
|
|
771
|
+
first: params.first ?? 50,
|
|
772
|
+
after: params?.after
|
|
773
773
|
})
|
|
774
774
|
);
|
|
775
775
|
return {
|
|
@@ -812,8 +812,8 @@ function createIdentityMethods(client) {
|
|
|
812
812
|
const resp = await client.listTenants(
|
|
813
813
|
create(ListTenantsRequestSchema, {
|
|
814
814
|
status: params.status,
|
|
815
|
-
|
|
816
|
-
|
|
815
|
+
first: params.first ?? 50,
|
|
816
|
+
after: params?.after
|
|
817
817
|
})
|
|
818
818
|
);
|
|
819
819
|
return {
|
|
@@ -868,8 +868,8 @@ function createIdentityMethods(client) {
|
|
|
868
868
|
create(ListProjectsRequestSchema, {
|
|
869
869
|
tenantId: params.tenantId,
|
|
870
870
|
status: params.status,
|
|
871
|
-
|
|
872
|
-
|
|
871
|
+
first: params.first ?? 50,
|
|
872
|
+
after: params?.after
|
|
873
873
|
})
|
|
874
874
|
);
|
|
875
875
|
return {
|
|
@@ -918,8 +918,8 @@ function createIdentityMethods(client) {
|
|
|
918
918
|
create(ListInvitationsRequestSchema, {
|
|
919
919
|
tenantId: params.tenantId,
|
|
920
920
|
status: params.status,
|
|
921
|
-
|
|
922
|
-
|
|
921
|
+
first: params.first ?? 50,
|
|
922
|
+
after: params?.after
|
|
923
923
|
})
|
|
924
924
|
);
|
|
925
925
|
return {
|
|
@@ -976,8 +976,8 @@ function createIdentityMethods(client) {
|
|
|
976
976
|
async listApiKeys(params = {}) {
|
|
977
977
|
const resp = await client.listApiKeys(
|
|
978
978
|
create(ListApiKeysRequestSchema, {
|
|
979
|
-
|
|
980
|
-
|
|
979
|
+
first: params.first ?? 50,
|
|
980
|
+
after: params?.after
|
|
981
981
|
})
|
|
982
982
|
);
|
|
983
983
|
return {
|
|
@@ -1026,8 +1026,8 @@ function createIdentityMethods(client) {
|
|
|
1026
1026
|
const resp = await client.listAuthProviders(
|
|
1027
1027
|
create(ListAuthProvidersRequestSchema, {
|
|
1028
1028
|
enabled: params.enabled,
|
|
1029
|
-
|
|
1030
|
-
|
|
1029
|
+
first: params.first ?? 50,
|
|
1030
|
+
after: params?.after
|
|
1031
1031
|
})
|
|
1032
1032
|
);
|
|
1033
1033
|
return {
|
|
@@ -1377,8 +1377,8 @@ function createModelsMethods(client) {
|
|
|
1377
1377
|
search: params.search,
|
|
1378
1378
|
category: params.category,
|
|
1379
1379
|
configId: params.configId,
|
|
1380
|
-
|
|
1381
|
-
|
|
1380
|
+
first: params.first ?? 50,
|
|
1381
|
+
after: params?.after
|
|
1382
1382
|
})
|
|
1383
1383
|
);
|
|
1384
1384
|
return {
|
|
@@ -1433,8 +1433,8 @@ function createModelsMethods(client) {
|
|
|
1433
1433
|
const resp = await client.listModelVersions(
|
|
1434
1434
|
create3(ListModelVersionsRequestSchema, {
|
|
1435
1435
|
modelId,
|
|
1436
|
-
|
|
1437
|
-
|
|
1436
|
+
first: params.first ?? 50,
|
|
1437
|
+
after: params?.after
|
|
1438
1438
|
})
|
|
1439
1439
|
);
|
|
1440
1440
|
return {
|
|
@@ -1471,14 +1471,11 @@ import {
|
|
|
1471
1471
|
DuplicateRecordsBulkRequestSchema,
|
|
1472
1472
|
BatchRecordOperationsRequestSchema,
|
|
1473
1473
|
BatchOperationSchema,
|
|
1474
|
-
RecordFilterSchema,
|
|
1475
1474
|
BulkUpdateRecordsRequestSchema,
|
|
1476
|
-
CreateVersionRequestSchema,
|
|
1477
1475
|
PublishVersionRequestSchema,
|
|
1478
1476
|
UnpublishRecordRequestSchema,
|
|
1479
1477
|
RevertToVersionRequestSchema,
|
|
1480
1478
|
ListRecordVersionsRequestSchema,
|
|
1481
|
-
SaveContentRequestSchema,
|
|
1482
1479
|
CreateVariantRequestSchema,
|
|
1483
1480
|
UpdateVariantRequestSchema,
|
|
1484
1481
|
DeleteVariantRequestSchema,
|
|
@@ -1560,32 +1557,42 @@ function createRecordsMethods(client) {
|
|
|
1560
1557
|
const resp = await client.listRecords(
|
|
1561
1558
|
create4(ListRecordsRequestSchema, {
|
|
1562
1559
|
modelKey: params.modelKey,
|
|
1563
|
-
limit: params.limit ?? 50,
|
|
1564
|
-
offset: params.offset ?? 0,
|
|
1565
1560
|
customerId: params.customerId,
|
|
1566
1561
|
search: params.search,
|
|
1567
1562
|
// CLI is admin-equivalent and must see drafts; without preview the
|
|
1568
1563
|
// platform now hides unpublished records on publishable models.
|
|
1569
1564
|
preview: true,
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
)
|
|
1565
|
+
where: params.where ? sanitizeData(params.where) : void 0,
|
|
1566
|
+
first: params.first,
|
|
1567
|
+
after: params.after,
|
|
1568
|
+
last: params.last,
|
|
1569
|
+
before: params.before
|
|
1576
1570
|
})
|
|
1577
1571
|
);
|
|
1572
|
+
const pi = resp.pageInfo;
|
|
1578
1573
|
return {
|
|
1579
1574
|
items: resp.records ?? [],
|
|
1580
|
-
total: resp.total
|
|
1575
|
+
total: resp.total,
|
|
1576
|
+
hasNextPage: pi?.hasNextPage ?? false,
|
|
1577
|
+
hasPreviousPage: pi?.hasPreviousPage ?? false,
|
|
1578
|
+
startCursor: pi?.startCursor ?? "",
|
|
1579
|
+
endCursor: pi?.endCursor ?? ""
|
|
1581
1580
|
};
|
|
1582
1581
|
},
|
|
1583
1582
|
async updateRecord(params) {
|
|
1583
|
+
if (params.update === void 0 && params.replaceData === void 0 || params.update !== void 0 && params.replaceData !== void 0) {
|
|
1584
|
+
throw new Error(
|
|
1585
|
+
"updateRecord: exactly one of `update` or `replaceData` is required"
|
|
1586
|
+
);
|
|
1587
|
+
}
|
|
1584
1588
|
const resp = await client.updateRecord(
|
|
1585
1589
|
create4(UpdateRecordRequestSchema, {
|
|
1586
1590
|
id: params.id,
|
|
1587
|
-
|
|
1588
|
-
|
|
1591
|
+
update: params.update ? sanitizeData(params.update) : void 0,
|
|
1592
|
+
replaceData: params.replaceData ? sanitizeData(params.replaceData) : void 0,
|
|
1593
|
+
naturalKey: params.naturalKey,
|
|
1594
|
+
variantKey: params.variantKey,
|
|
1595
|
+
changeDescription: params.changeDescription
|
|
1589
1596
|
})
|
|
1590
1597
|
);
|
|
1591
1598
|
return resp.record ?? null;
|
|
@@ -1639,16 +1646,11 @@ function createRecordsMethods(client) {
|
|
|
1639
1646
|
return { count: resp.count, ids: resp.ids };
|
|
1640
1647
|
},
|
|
1641
1648
|
// ── Versioning ────────────────────────────────────────────
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
changeDescription
|
|
1648
|
-
})
|
|
1649
|
-
);
|
|
1650
|
-
return resp.version ?? null;
|
|
1651
|
-
},
|
|
1649
|
+
//
|
|
1650
|
+
// "Save the whole content blob as a new version" flows go through
|
|
1651
|
+
// updateRecord with replaceData (+ optional variantKey /
|
|
1652
|
+
// changeDescription) — that one RPC subsumes the prior
|
|
1653
|
+
// createVersion + saveContent surface.
|
|
1652
1654
|
async publishVersion(versionId) {
|
|
1653
1655
|
const resp = await client.publishVersion(
|
|
1654
1656
|
create4(PublishVersionRequestSchema, { versionId })
|
|
@@ -1671,8 +1673,8 @@ function createRecordsMethods(client) {
|
|
|
1671
1673
|
const resp = await client.listRecordVersions(
|
|
1672
1674
|
create4(ListRecordVersionsRequestSchema, {
|
|
1673
1675
|
parentId,
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
+
first: params?.first ?? 50,
|
|
1677
|
+
after: params?.after
|
|
1676
1678
|
})
|
|
1677
1679
|
);
|
|
1678
1680
|
return {
|
|
@@ -1680,20 +1682,6 @@ function createRecordsMethods(client) {
|
|
|
1680
1682
|
total: resp.total
|
|
1681
1683
|
};
|
|
1682
1684
|
},
|
|
1683
|
-
async saveContent(params) {
|
|
1684
|
-
const resp = await client.saveContent(
|
|
1685
|
-
create4(SaveContentRequestSchema, {
|
|
1686
|
-
recordId: params.recordId,
|
|
1687
|
-
data: sanitizeData(params.data),
|
|
1688
|
-
variantKey: params.variantKey,
|
|
1689
|
-
changeDescription: params.changeDescription
|
|
1690
|
-
})
|
|
1691
|
-
);
|
|
1692
|
-
return {
|
|
1693
|
-
record: resp.record ?? null,
|
|
1694
|
-
version: resp.version ?? null
|
|
1695
|
-
};
|
|
1696
|
-
},
|
|
1697
1685
|
// ── Variants ──────────────────────────────────────────────
|
|
1698
1686
|
async createVariant(recordId, variantKey, data) {
|
|
1699
1687
|
const resp = await client.createVariant(
|
|
@@ -1730,8 +1718,8 @@ function createRecordsMethods(client) {
|
|
|
1730
1718
|
const resp = await client.listRecordVariants(
|
|
1731
1719
|
create4(ListRecordVariantsRequestSchema, {
|
|
1732
1720
|
recordId,
|
|
1733
|
-
|
|
1734
|
-
|
|
1721
|
+
first: params?.first ?? 50,
|
|
1722
|
+
after: params?.after
|
|
1735
1723
|
})
|
|
1736
1724
|
);
|
|
1737
1725
|
return {
|
|
@@ -1774,8 +1762,8 @@ function createRecordsMethods(client) {
|
|
|
1774
1762
|
nanos: 0
|
|
1775
1763
|
} : void 0,
|
|
1776
1764
|
modelKey: params?.modelKey,
|
|
1777
|
-
|
|
1778
|
-
|
|
1765
|
+
first: params?.first ?? 50,
|
|
1766
|
+
after: params?.after
|
|
1779
1767
|
})
|
|
1780
1768
|
);
|
|
1781
1769
|
return {
|
|
@@ -1788,8 +1776,8 @@ function createRecordsMethods(client) {
|
|
|
1788
1776
|
create4(ListDraftVersionsRequestSchema, {
|
|
1789
1777
|
modelKey: params?.modelKey,
|
|
1790
1778
|
search: params?.search,
|
|
1791
|
-
|
|
1792
|
-
|
|
1779
|
+
first: params?.first ?? 50,
|
|
1780
|
+
after: params?.after
|
|
1793
1781
|
})
|
|
1794
1782
|
);
|
|
1795
1783
|
return {
|
|
@@ -1813,7 +1801,8 @@ function createRecordsMethods(client) {
|
|
|
1813
1801
|
create4(GlobalSearchRequestSchema, {
|
|
1814
1802
|
query: params.query,
|
|
1815
1803
|
modelKeys: params.modelKeys ?? [],
|
|
1816
|
-
|
|
1804
|
+
first: params.first ?? 20,
|
|
1805
|
+
after: params?.after
|
|
1817
1806
|
})
|
|
1818
1807
|
);
|
|
1819
1808
|
return {
|
|
@@ -1840,7 +1829,8 @@ function createRecordsMethods(client) {
|
|
|
1840
1829
|
create4(FindSimilarRecordsRequestSchema, {
|
|
1841
1830
|
recordId: params.recordId,
|
|
1842
1831
|
modelKey: params.modelKey,
|
|
1843
|
-
|
|
1832
|
+
first: params.first ?? 10,
|
|
1833
|
+
after: params?.after
|
|
1844
1834
|
})
|
|
1845
1835
|
);
|
|
1846
1836
|
return resp.records ?? [];
|
|
@@ -1868,7 +1858,8 @@ function createRecordsMethods(client) {
|
|
|
1868
1858
|
create4(SearchEmbeddingsRequestSchema, {
|
|
1869
1859
|
queryVector: params.queryVector,
|
|
1870
1860
|
modelKey: params.modelKey,
|
|
1871
|
-
|
|
1861
|
+
first: params.first ?? 10,
|
|
1862
|
+
after: params?.after
|
|
1872
1863
|
})
|
|
1873
1864
|
);
|
|
1874
1865
|
return resp.results ?? [];
|
|
@@ -1906,8 +1897,8 @@ function createConfigsMethods(client) {
|
|
|
1906
1897
|
category: params.category,
|
|
1907
1898
|
isActive: params.isActive,
|
|
1908
1899
|
search: params.search,
|
|
1909
|
-
|
|
1910
|
-
|
|
1900
|
+
first: params.first ?? 50,
|
|
1901
|
+
after: params?.after
|
|
1911
1902
|
})
|
|
1912
1903
|
);
|
|
1913
1904
|
},
|
|
@@ -1929,8 +1920,8 @@ function createConfigsMethods(client) {
|
|
|
1929
1920
|
create5(ListConfigsRequestSchema, {
|
|
1930
1921
|
configType: params.configType,
|
|
1931
1922
|
enabled: params.enabled,
|
|
1932
|
-
|
|
1933
|
-
|
|
1923
|
+
first: params.first ?? 50,
|
|
1924
|
+
after: params?.after
|
|
1934
1925
|
})
|
|
1935
1926
|
);
|
|
1936
1927
|
},
|
|
@@ -2067,8 +2058,8 @@ function createSegmentsMethods(client) {
|
|
|
2067
2058
|
create6(ListSegmentsRequestSchema, {
|
|
2068
2059
|
isActive: params.isActive,
|
|
2069
2060
|
configId: params.configId,
|
|
2070
|
-
|
|
2071
|
-
|
|
2061
|
+
first: params.first ?? 50,
|
|
2062
|
+
after: params?.after
|
|
2072
2063
|
})
|
|
2073
2064
|
);
|
|
2074
2065
|
},
|
|
@@ -2236,8 +2227,8 @@ function createSettingsMethods(client) {
|
|
|
2236
2227
|
create7(ListMyMentionsRequestSchema, {
|
|
2237
2228
|
status: params.status ?? [],
|
|
2238
2229
|
entityType: params.entityType,
|
|
2239
|
-
|
|
2240
|
-
|
|
2230
|
+
first: params.first ?? 50,
|
|
2231
|
+
after: params?.after
|
|
2241
2232
|
})
|
|
2242
2233
|
);
|
|
2243
2234
|
},
|
|
@@ -2271,8 +2262,8 @@ function createSettingsMethods(client) {
|
|
|
2271
2262
|
create7(ListNotesRequestSchema, {
|
|
2272
2263
|
entityType: params.entityType,
|
|
2273
2264
|
entityId: params.entityId,
|
|
2274
|
-
|
|
2275
|
-
|
|
2265
|
+
first: params.first ?? 50,
|
|
2266
|
+
after: params?.after
|
|
2276
2267
|
})
|
|
2277
2268
|
);
|
|
2278
2269
|
},
|
|
@@ -2297,8 +2288,8 @@ function createSettingsMethods(client) {
|
|
|
2297
2288
|
return client.listContextDimensions(
|
|
2298
2289
|
create7(ListContextDimensionsRequestSchema, {
|
|
2299
2290
|
search: params.search,
|
|
2300
|
-
|
|
2301
|
-
|
|
2291
|
+
first: params.first ?? 50,
|
|
2292
|
+
after: params?.after
|
|
2302
2293
|
})
|
|
2303
2294
|
);
|
|
2304
2295
|
},
|
|
@@ -2331,8 +2322,8 @@ function createSettingsMethods(client) {
|
|
|
2331
2322
|
create7(GetContextDimensionValuesRequestSchema, {
|
|
2332
2323
|
dimensionKey,
|
|
2333
2324
|
search: params.search,
|
|
2334
|
-
|
|
2335
|
-
|
|
2325
|
+
first: params.first ?? 50,
|
|
2326
|
+
after: params?.after
|
|
2336
2327
|
})
|
|
2337
2328
|
);
|
|
2338
2329
|
},
|
|
@@ -2431,8 +2422,8 @@ function createSettingsMethods(client) {
|
|
|
2431
2422
|
return client.listVariantCatalog(
|
|
2432
2423
|
create7(ListVariantCatalogRequestSchema, {
|
|
2433
2424
|
isActive: params.isActive,
|
|
2434
|
-
|
|
2435
|
-
|
|
2425
|
+
first: params.first ?? 50,
|
|
2426
|
+
after: params?.after
|
|
2436
2427
|
})
|
|
2437
2428
|
);
|
|
2438
2429
|
},
|
|
@@ -2481,8 +2472,8 @@ function createSettingsMethods(client) {
|
|
|
2481
2472
|
return client.listLocales(
|
|
2482
2473
|
create7(ListLocalesRequestSchema, {
|
|
2483
2474
|
includeInactive: params.includeInactive,
|
|
2484
|
-
|
|
2485
|
-
|
|
2475
|
+
first: params.first ?? 50,
|
|
2476
|
+
after: params?.after
|
|
2486
2477
|
})
|
|
2487
2478
|
);
|
|
2488
2479
|
},
|
|
@@ -2561,10 +2552,10 @@ function createSettingsMethods(client) {
|
|
|
2561
2552
|
return resp.preferences ?? null;
|
|
2562
2553
|
},
|
|
2563
2554
|
// ── Recently Opened ─────────────────────────────────────
|
|
2564
|
-
async listRecentlyOpened(
|
|
2555
|
+
async listRecentlyOpened(first) {
|
|
2565
2556
|
const resp = await client.listRecentlyOpened(
|
|
2566
2557
|
create7(ListRecentlyOpenedRequestSchema, {
|
|
2567
|
-
|
|
2558
|
+
first: first ?? 20
|
|
2568
2559
|
})
|
|
2569
2560
|
);
|
|
2570
2561
|
return resp.items ?? [];
|
|
@@ -2644,8 +2635,8 @@ function createStorageMethods(client) {
|
|
|
2644
2635
|
mimeType: params.mimeType,
|
|
2645
2636
|
search: params.search,
|
|
2646
2637
|
includeDeleted: params.includeDeleted ?? false,
|
|
2647
|
-
|
|
2648
|
-
|
|
2638
|
+
first: params.first ?? 50,
|
|
2639
|
+
after: params?.after
|
|
2649
2640
|
})
|
|
2650
2641
|
);
|
|
2651
2642
|
},
|
|
@@ -2707,6 +2698,8 @@ function createStorageMethods(client) {
|
|
|
2707
2698
|
);
|
|
2708
2699
|
return resp.success;
|
|
2709
2700
|
},
|
|
2701
|
+
// Documented Stage-9 exception: CleanupOrphanedFiles is a write-batch
|
|
2702
|
+
// ceiling, not list pagination, so it keeps `limit` rather than `first`.
|
|
2710
2703
|
async cleanupOrphanedFiles(params) {
|
|
2711
2704
|
return client.cleanupOrphanedFiles(
|
|
2712
2705
|
create8(CleanupOrphanedFilesRequestSchema, {
|
|
@@ -2744,8 +2737,8 @@ function createOperationsMethods(client) {
|
|
|
2744
2737
|
category: params.category,
|
|
2745
2738
|
isActive: params.isActive,
|
|
2746
2739
|
search: params.search,
|
|
2747
|
-
|
|
2748
|
-
|
|
2740
|
+
first: params.first ?? 50,
|
|
2741
|
+
after: params?.after
|
|
2749
2742
|
})
|
|
2750
2743
|
);
|
|
2751
2744
|
},
|
|
@@ -2833,8 +2826,8 @@ function createOperationsMethods(client) {
|
|
|
2833
2826
|
return client.listDeadLetterEntries(
|
|
2834
2827
|
create9(ListDeadLetterEntriesRequestSchema, {
|
|
2835
2828
|
operationKey: params.operationKey,
|
|
2836
|
-
|
|
2837
|
-
|
|
2829
|
+
first: params.first ?? 50,
|
|
2830
|
+
after: params?.after
|
|
2838
2831
|
})
|
|
2839
2832
|
);
|
|
2840
2833
|
},
|
|
@@ -2881,8 +2874,8 @@ function createHooksMethods(client) {
|
|
|
2881
2874
|
event: params.event,
|
|
2882
2875
|
isActive: params.isActive,
|
|
2883
2876
|
configId: params.configId,
|
|
2884
|
-
|
|
2885
|
-
|
|
2877
|
+
first: params.first ?? 50,
|
|
2878
|
+
after: params?.after
|
|
2886
2879
|
})
|
|
2887
2880
|
);
|
|
2888
2881
|
},
|
|
@@ -2940,8 +2933,8 @@ function createHooksMethods(client) {
|
|
|
2940
2933
|
create10(ListHookDeliveriesRequestSchema, {
|
|
2941
2934
|
hookId: params.hookId,
|
|
2942
2935
|
status: params.status,
|
|
2943
|
-
|
|
2944
|
-
|
|
2936
|
+
first: params.first ?? 50,
|
|
2937
|
+
after: params?.after
|
|
2945
2938
|
})
|
|
2946
2939
|
);
|
|
2947
2940
|
},
|
|
@@ -2980,8 +2973,8 @@ function createNotificationsMethods(client) {
|
|
|
2980
2973
|
return client.listNotifications(
|
|
2981
2974
|
create11(ListNotificationsRequestSchema, {
|
|
2982
2975
|
isRead: params.unreadOnly ? false : void 0,
|
|
2983
|
-
|
|
2984
|
-
|
|
2976
|
+
first: params.first ?? 20,
|
|
2977
|
+
after: params?.after
|
|
2985
2978
|
})
|
|
2986
2979
|
);
|
|
2987
2980
|
},
|
|
@@ -3021,8 +3014,8 @@ function createCronSchedulesMethods(client) {
|
|
|
3021
3014
|
create12(ListCronSchedulesRequestSchema, {
|
|
3022
3015
|
configId: params.configId,
|
|
3023
3016
|
isActive: params.isActive,
|
|
3024
|
-
|
|
3025
|
-
|
|
3017
|
+
first: params.first ?? 50,
|
|
3018
|
+
after: params?.after
|
|
3026
3019
|
})
|
|
3027
3020
|
);
|
|
3028
3021
|
},
|
|
@@ -3118,8 +3111,8 @@ function createPublishBatchesMethods(client) {
|
|
|
3118
3111
|
const resp = await client.listPublishBatches(
|
|
3119
3112
|
create13(ListPublishBatchesRequestSchema, {
|
|
3120
3113
|
status: params.status,
|
|
3121
|
-
|
|
3122
|
-
|
|
3114
|
+
first: params.first ?? 50,
|
|
3115
|
+
after: params?.after
|
|
3123
3116
|
})
|
|
3124
3117
|
);
|
|
3125
3118
|
return { batches: resp.batches ?? [], total: resp.total };
|
|
@@ -3492,7 +3485,7 @@ function registerSelectProjectCommand(program2, globalOpts) {
|
|
|
3492
3485
|
tenantId: tenant.id,
|
|
3493
3486
|
status: 1,
|
|
3494
3487
|
// PROJECT_STATUS_ACTIVE
|
|
3495
|
-
|
|
3488
|
+
first: 100
|
|
3496
3489
|
});
|
|
3497
3490
|
for (const p of items) {
|
|
3498
3491
|
projects.push({ id: p.id, name: p.name, tenantId: p.tenantId });
|
|
@@ -3577,7 +3570,7 @@ function registerSelectProjectCommand(program2, globalOpts) {
|
|
|
3577
3570
|
);
|
|
3578
3571
|
}
|
|
3579
3572
|
async function provisionApiKey(client) {
|
|
3580
|
-
const { items: apiKeys } = await client.identity.listApiKeys({
|
|
3573
|
+
const { items: apiKeys } = await client.identity.listApiKeys({ first: 100 });
|
|
3581
3574
|
const existing = apiKeys.find(
|
|
3582
3575
|
(k) => k.name === CLI_API_KEY_NAME && k.isActive
|
|
3583
3576
|
);
|
|
@@ -3844,31 +3837,38 @@ function isUUID(value) {
|
|
|
3844
3837
|
) || /^[a-z][a-z0-9]{23,31}$/.test(value);
|
|
3845
3838
|
}
|
|
3846
3839
|
function parseFilters(filterStr) {
|
|
3847
|
-
if (!filterStr) return
|
|
3848
|
-
|
|
3840
|
+
if (!filterStr) return {};
|
|
3841
|
+
const where = {};
|
|
3842
|
+
for (const part of filterStr.split(",")) {
|
|
3849
3843
|
const trimmed = part.trim();
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
["
|
|
3853
|
-
["
|
|
3854
|
-
["
|
|
3855
|
-
["
|
|
3856
|
-
["
|
|
3857
|
-
["
|
|
3844
|
+
let matched = false;
|
|
3845
|
+
for (const [op, whereOp] of [
|
|
3846
|
+
["!=", "ne"],
|
|
3847
|
+
[">=", "gte"],
|
|
3848
|
+
["<=", "lte"],
|
|
3849
|
+
[">", "gt"],
|
|
3850
|
+
["<", "lt"],
|
|
3851
|
+
["~", "contains"],
|
|
3852
|
+
["=", "eq"]
|
|
3858
3853
|
]) {
|
|
3859
3854
|
const idx = trimmed.indexOf(op);
|
|
3860
3855
|
if (idx > 0) {
|
|
3861
3856
|
const field = trimmed.slice(0, idx);
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3857
|
+
let rawValue = trimmed.slice(idx + op.length);
|
|
3858
|
+
if (whereOp === "contains") {
|
|
3859
|
+
rawValue = rawValue.replace(/^%/, "").replace(/%$/, "");
|
|
3860
|
+
}
|
|
3861
|
+
if (!where[field]) where[field] = {};
|
|
3862
|
+
where[field][whereOp] = parseFilterValue(rawValue);
|
|
3863
|
+
matched = true;
|
|
3864
|
+
break;
|
|
3868
3865
|
}
|
|
3869
3866
|
}
|
|
3870
|
-
|
|
3871
|
-
|
|
3867
|
+
if (!matched) {
|
|
3868
|
+
throw new Error(`Invalid filter expression: "${trimmed}"`);
|
|
3869
|
+
}
|
|
3870
|
+
}
|
|
3871
|
+
return where;
|
|
3872
3872
|
}
|
|
3873
3873
|
function parseFilterValue(raw) {
|
|
3874
3874
|
if (raw === "true") return true;
|
|
@@ -3974,7 +3974,7 @@ function registerMediaCommands(program2, globalOpts) {
|
|
|
3974
3974
|
}
|
|
3975
3975
|
)
|
|
3976
3976
|
);
|
|
3977
|
-
media.command("list").description("List files").option("--folder <folder>", "Filter by folder").option("--mime-type <type>", "Filter by MIME type").option("--search <query>", "Search files").option("--include-deleted", "Include soft-deleted files").option("--
|
|
3977
|
+
media.command("list").description("List files").option("--folder <folder>", "Filter by folder").option("--mime-type <type>", "Filter by MIME type").option("--search <query>", "Search files").option("--include-deleted", "Include soft-deleted files").option("--first <n>", "Max results", "50").option("--after <cursor>", "Offset", "0").action(
|
|
3978
3978
|
withErrorHandler(
|
|
3979
3979
|
globalOpts,
|
|
3980
3980
|
async (flags) => {
|
|
@@ -3986,8 +3986,8 @@ function registerMediaCommands(program2, globalOpts) {
|
|
|
3986
3986
|
mimeType: flags["mime-type"] ?? flags.mimeType,
|
|
3987
3987
|
search: flags.search,
|
|
3988
3988
|
includeDeleted: !!flags.includeDeleted,
|
|
3989
|
-
|
|
3990
|
-
|
|
3989
|
+
first: Number(flags.first) || 50,
|
|
3990
|
+
after: flags.after
|
|
3991
3991
|
});
|
|
3992
3992
|
formatListProto(FileSchema, result.items, opts, {
|
|
3993
3993
|
columns: [
|
|
@@ -4683,7 +4683,7 @@ function registerSearchCommands(program2, globalOpts) {
|
|
|
4683
4683
|
program2.command("search <query>").description("Search across all records").option(
|
|
4684
4684
|
"--models <keys>",
|
|
4685
4685
|
"Filter to specific model keys (comma-separated)"
|
|
4686
|
-
).option("--
|
|
4686
|
+
).option("--first <n>", "Max results", "20").action(
|
|
4687
4687
|
withErrorHandler(
|
|
4688
4688
|
globalOpts,
|
|
4689
4689
|
async (query, cmdOpts) => {
|
|
@@ -4692,7 +4692,7 @@ function registerSearchCommands(program2, globalOpts) {
|
|
|
4692
4692
|
const modelKeys = typeof cmdOpts.models === "string" ? cmdOpts.models.split(",").map((k) => k.trim()) : void 0;
|
|
4693
4693
|
const result = await client.records.globalSearch({
|
|
4694
4694
|
query,
|
|
4695
|
-
|
|
4695
|
+
first: parseInt(String(cmdOpts.first ?? "20"), 10),
|
|
4696
4696
|
modelKeys
|
|
4697
4697
|
});
|
|
4698
4698
|
if (opts.json || opts.jsonl) {
|
|
@@ -4866,7 +4866,7 @@ Edit the file, then run:
|
|
|
4866
4866
|
async (opts) => {
|
|
4867
4867
|
const globalFlags = globalOpts();
|
|
4868
4868
|
const client = await createPlatformClient(globalFlags);
|
|
4869
|
-
const result = await client.models.listModels({
|
|
4869
|
+
const result = await client.models.listModels({ first: 100 });
|
|
4870
4870
|
const models = result.items.map((m) => ({
|
|
4871
4871
|
key: m.key,
|
|
4872
4872
|
name: m.name,
|
|
@@ -5134,7 +5134,7 @@ async function reconcileConfig(client, configId, manifest, options = {}) {
|
|
|
5134
5134
|
return summary;
|
|
5135
5135
|
}
|
|
5136
5136
|
async function reconcileModels(client, configId, models, summary, force, allowLookupRebuild, conflictOut) {
|
|
5137
|
-
const existing = await client.models.listModels({
|
|
5137
|
+
const existing = await client.models.listModels({ first: 200 });
|
|
5138
5138
|
const allByKey = new Map(
|
|
5139
5139
|
existing.items.map((m) => [m.key, m])
|
|
5140
5140
|
);
|
|
@@ -5236,7 +5236,7 @@ function resolveEndpoint(endpoint, baseUrl) {
|
|
|
5236
5236
|
return baseUrl ? `${baseUrl.replace(/\/+$/, "")}${endpoint.startsWith("/") ? "" : "/"}${endpoint}` : endpoint;
|
|
5237
5237
|
}
|
|
5238
5238
|
async function reconcileOperations(client, configId, operations, operationBaseUrl, summary) {
|
|
5239
|
-
const existing = await client.operations.listOperations({ configId,
|
|
5239
|
+
const existing = await client.operations.listOperations({ configId, first: 200 });
|
|
5240
5240
|
const existingByKey = new Map(
|
|
5241
5241
|
(existing.operations ?? []).map((o) => [o.key, o])
|
|
5242
5242
|
);
|
|
@@ -5316,7 +5316,7 @@ async function reconcileOperations(client, configId, operations, operationBaseUr
|
|
|
5316
5316
|
}
|
|
5317
5317
|
}
|
|
5318
5318
|
async function reconcileHooks(client, configId, hooks, summary) {
|
|
5319
|
-
const existing = await client.hooks.listHooks({ configId,
|
|
5319
|
+
const existing = await client.hooks.listHooks({ configId, first: 200 });
|
|
5320
5320
|
const existingByKey = new Map(
|
|
5321
5321
|
(existing.hooks ?? []).map((h) => [h.key, h])
|
|
5322
5322
|
);
|
|
@@ -5364,8 +5364,8 @@ async function reconcileHooks(client, configId, hooks, summary) {
|
|
|
5364
5364
|
}
|
|
5365
5365
|
async function reconcileSegments(client, configId, segments, summary) {
|
|
5366
5366
|
const [scoped, all] = await Promise.all([
|
|
5367
|
-
client.segments.listSegments({ configId,
|
|
5368
|
-
client.segments.listSegments({
|
|
5367
|
+
client.segments.listSegments({ configId, first: 200 }),
|
|
5368
|
+
client.segments.listSegments({ first: 200 })
|
|
5369
5369
|
]);
|
|
5370
5370
|
const existingByKey = /* @__PURE__ */ new Map();
|
|
5371
5371
|
for (const s of all.segments ?? []) {
|
|
@@ -5413,7 +5413,7 @@ async function reconcileSegments(client, configId, segments, summary) {
|
|
|
5413
5413
|
}
|
|
5414
5414
|
}
|
|
5415
5415
|
async function reconcileCronSchedules(client, configId, schedules, summary) {
|
|
5416
|
-
const existing = await client.cronSchedules.listCronSchedules({ configId,
|
|
5416
|
+
const existing = await client.cronSchedules.listCronSchedules({ configId, first: 200 });
|
|
5417
5417
|
const schedulesList = existing.schedules ?? [];
|
|
5418
5418
|
const existingByKey = new Map(
|
|
5419
5419
|
schedulesList.map((s) => [s.key, s])
|
|
@@ -5462,7 +5462,7 @@ async function reconcileCronSchedules(client, configId, schedules, summary) {
|
|
|
5462
5462
|
}
|
|
5463
5463
|
}
|
|
5464
5464
|
async function reconcileAuthProviders(client, providers, summary) {
|
|
5465
|
-
const existing = await client.identity.listAuthProviders({
|
|
5465
|
+
const existing = await client.identity.listAuthProviders({ first: 200 });
|
|
5466
5466
|
const existingByKey = new Map(
|
|
5467
5467
|
existing.items.map((p) => [p.key, p])
|
|
5468
5468
|
);
|
|
@@ -5542,7 +5542,7 @@ async function reconcileDesignTokens(client, manifest, summary, publishAfterAppl
|
|
|
5542
5542
|
}
|
|
5543
5543
|
async function reconcileApiKeys(client, configKey, apiKeys, summary, rotateKeys) {
|
|
5544
5544
|
if (apiKeys.length === 0) return;
|
|
5545
|
-
const existing = await client.identity.listApiKeys({
|
|
5545
|
+
const existing = await client.identity.listApiKeys({ first: 200 });
|
|
5546
5546
|
const existingByName = new Map(
|
|
5547
5547
|
existing.items.map((k) => [k.name, k])
|
|
5548
5548
|
);
|
|
@@ -6089,7 +6089,7 @@ function registerPullCommand(program2, globalOpts) {
|
|
|
6089
6089
|
const client = await createPlatformClient(globalOpts());
|
|
6090
6090
|
let configKey = opts.key;
|
|
6091
6091
|
if (!configKey) {
|
|
6092
|
-
const { configs } = await client.configs.listConfigs({
|
|
6092
|
+
const { configs } = await client.configs.listConfigs({ first: 50 });
|
|
6093
6093
|
if (!configs || configs.length === 0) {
|
|
6094
6094
|
throw new Error(
|
|
6095
6095
|
"No configs found in this project. Push one first with `foir push`."
|
|
@@ -6198,7 +6198,7 @@ export default defineConfig(${jsonContent});
|
|
|
6198
6198
|
writeFileSync3(outPath, formatted, "utf-8");
|
|
6199
6199
|
console.log(chalk7.green(`\u2713 Exported to ${outPath}`));
|
|
6200
6200
|
try {
|
|
6201
|
-
const { items: platformModels } = await client.models.listModels({
|
|
6201
|
+
const { items: platformModels } = await client.models.listModels({ first: 200 });
|
|
6202
6202
|
for (const pm of platformModels) {
|
|
6203
6203
|
await client.models.updateModel({
|
|
6204
6204
|
id: pm.id,
|
|
@@ -6585,15 +6585,15 @@ import {
|
|
|
6585
6585
|
} from "@eide/foir-proto-ts/models/v1/models_pb";
|
|
6586
6586
|
function registerModelsCommands(program2, globalOpts) {
|
|
6587
6587
|
const models = program2.command("models").description("Manage models");
|
|
6588
|
-
models.command("list").description("List all models").option("--category <cat>", "Filter by category").option("--search <term>", "Search by name").option("--
|
|
6588
|
+
models.command("list").description("List all models").option("--category <cat>", "Filter by category").option("--search <term>", "Search by name").option("--first <n>", "Max results", "50").option("--after <cursor>", "Opaque cursor from previous page", "0").action(
|
|
6589
6589
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
6590
6590
|
const opts = globalOpts();
|
|
6591
6591
|
const client = await createPlatformClient(opts);
|
|
6592
6592
|
const result = await client.models.listModels({
|
|
6593
6593
|
search: cmdOpts.search,
|
|
6594
6594
|
category: cmdOpts.category,
|
|
6595
|
-
|
|
6596
|
-
|
|
6595
|
+
first: parseInt(cmdOpts.first ?? "50", 10),
|
|
6596
|
+
after: cmdOpts.after
|
|
6597
6597
|
});
|
|
6598
6598
|
formatListProto(ModelSchema, result.items, opts, {
|
|
6599
6599
|
columns: [
|
|
@@ -6682,7 +6682,7 @@ function registerModelsCommands(program2, globalOpts) {
|
|
|
6682
6682
|
}
|
|
6683
6683
|
)
|
|
6684
6684
|
);
|
|
6685
|
-
models.command("versions <key>").description("List schema versions for a model").option("--
|
|
6685
|
+
models.command("versions <key>").description("List schema versions for a model").option("--first <n>", "Max results", "20").action(
|
|
6686
6686
|
withErrorHandler(
|
|
6687
6687
|
globalOpts,
|
|
6688
6688
|
async (key, cmdOpts) => {
|
|
@@ -6693,7 +6693,7 @@ function registerModelsCommands(program2, globalOpts) {
|
|
|
6693
6693
|
throw new Error(`Model "${key}" not found.`);
|
|
6694
6694
|
}
|
|
6695
6695
|
const result = await client.models.listModelVersions(existing.id, {
|
|
6696
|
-
|
|
6696
|
+
first: parseInt(cmdOpts.first ?? "20", 10)
|
|
6697
6697
|
});
|
|
6698
6698
|
formatListProto(ModelVersionSchema, result.items, opts, {
|
|
6699
6699
|
columns: [
|
|
@@ -6719,19 +6719,19 @@ import { toJson as toJson3 } from "@bufbuild/protobuf";
|
|
|
6719
6719
|
import { RecordSchema } from "@eide/foir-proto-ts/records/v1/records_pb";
|
|
6720
6720
|
function registerRecordsCommands(program2, globalOpts) {
|
|
6721
6721
|
const records = program2.command("records").description("Manage records");
|
|
6722
|
-
records.command("list <modelKey>").description("List records for a model").option("--filter <expr>", "Filter expression (e.g. status=active)").option("--
|
|
6722
|
+
records.command("list <modelKey>").description("List records for a model").option("--filter <expr>", "Filter expression (e.g. status=active)").option("--first <n>", "Page size", "20").option("--after <cursor>", "Cursor for next page (from prior pageInfo)").action(
|
|
6723
6723
|
withErrorHandler(
|
|
6724
6724
|
globalOpts,
|
|
6725
6725
|
async (modelKey, cmdOpts) => {
|
|
6726
6726
|
const opts = globalOpts();
|
|
6727
6727
|
const client = await createPlatformClient(opts);
|
|
6728
|
-
const
|
|
6728
|
+
const where = cmdOpts.filter ? parseFilters(cmdOpts.filter) : void 0;
|
|
6729
|
+
const result = await client.records.listRecords({
|
|
6729
6730
|
modelKey,
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
const result = await client.records.listRecords(params);
|
|
6731
|
+
first: parseInt(cmdOpts.first ?? "20", 10),
|
|
6732
|
+
after: cmdOpts.after || void 0,
|
|
6733
|
+
where
|
|
6734
|
+
});
|
|
6735
6735
|
formatListProto(RecordSchema, result.items, opts, {
|
|
6736
6736
|
columns: [
|
|
6737
6737
|
{ key: "id", header: "ID", width: 28 },
|
|
@@ -6815,21 +6815,20 @@ function registerRecordsCommands(program2, globalOpts) {
|
|
|
6815
6815
|
const opts = globalOpts();
|
|
6816
6816
|
const client = await createPlatformClient(opts);
|
|
6817
6817
|
const inputData = await parseInputData(cmdOpts);
|
|
6818
|
-
const result = await client.records.
|
|
6819
|
-
|
|
6820
|
-
|
|
6818
|
+
const result = await client.records.updateRecord({
|
|
6819
|
+
id,
|
|
6820
|
+
replaceData: inputData,
|
|
6821
6821
|
variantKey: cmdOpts.variant,
|
|
6822
6822
|
changeDescription: cmdOpts.message
|
|
6823
6823
|
});
|
|
6824
6824
|
formatOutput(
|
|
6825
6825
|
{
|
|
6826
|
-
record: result
|
|
6827
|
-
version: result.version ? toJson3(RecordSchema, result.version) : null
|
|
6826
|
+
record: result ? toJson3(RecordSchema, result) : null
|
|
6828
6827
|
},
|
|
6829
6828
|
opts
|
|
6830
6829
|
);
|
|
6831
6830
|
if (!(opts.json || opts.jsonl || opts.quiet)) {
|
|
6832
|
-
success(`Saved record ${id}
|
|
6831
|
+
success(`Saved record ${id}`);
|
|
6833
6832
|
}
|
|
6834
6833
|
}
|
|
6835
6834
|
)
|
|
@@ -6895,14 +6894,14 @@ function registerRecordsCommands(program2, globalOpts) {
|
|
|
6895
6894
|
}
|
|
6896
6895
|
)
|
|
6897
6896
|
);
|
|
6898
|
-
records.command("versions <id>").description("List versions for a record").option("--
|
|
6897
|
+
records.command("versions <id>").description("List versions for a record").option("--first <n>", "Max results", "20").action(
|
|
6899
6898
|
withErrorHandler(
|
|
6900
6899
|
globalOpts,
|
|
6901
6900
|
async (parentId, cmdOpts) => {
|
|
6902
6901
|
const opts = globalOpts();
|
|
6903
6902
|
const client = await createPlatformClient(opts);
|
|
6904
6903
|
const result = await client.records.listRecordVersions(parentId, {
|
|
6905
|
-
|
|
6904
|
+
first: parseInt(cmdOpts.first ?? "20", 10)
|
|
6906
6905
|
});
|
|
6907
6906
|
formatListProto(RecordSchema, result.items, opts, {
|
|
6908
6907
|
columns: [
|
|
@@ -6949,14 +6948,14 @@ function registerRecordsCommands(program2, globalOpts) {
|
|
|
6949
6948
|
const opts = globalOpts();
|
|
6950
6949
|
const client = await createPlatformClient(opts);
|
|
6951
6950
|
const inputData = await parseInputData(cmdOpts);
|
|
6952
|
-
const
|
|
6953
|
-
parentId,
|
|
6954
|
-
inputData,
|
|
6955
|
-
cmdOpts.message
|
|
6956
|
-
);
|
|
6957
|
-
formatOutputProto(RecordSchema,
|
|
6951
|
+
const record = await client.records.updateRecord({
|
|
6952
|
+
id: parentId,
|
|
6953
|
+
replaceData: inputData,
|
|
6954
|
+
changeDescription: cmdOpts.message
|
|
6955
|
+
});
|
|
6956
|
+
formatOutputProto(RecordSchema, record, opts);
|
|
6958
6957
|
if (!(opts.json || opts.jsonl || opts.quiet)) {
|
|
6959
|
-
success(`Created version ${
|
|
6958
|
+
success(`Created version on ${parentId}`);
|
|
6960
6959
|
}
|
|
6961
6960
|
}
|
|
6962
6961
|
)
|
|
@@ -6992,15 +6991,15 @@ function registerCustomersCommands(program2, globalOpts) {
|
|
|
6992
6991
|
customers.command("list").description("List customers").option(
|
|
6993
6992
|
"--status <status>",
|
|
6994
6993
|
"Filter by status (ACTIVE, PENDING, SUSPENDED)"
|
|
6995
|
-
).option("--search <term>", "Search by email").option("--
|
|
6994
|
+
).option("--search <term>", "Search by email").option("--first <n>", "Max results", "20").option("--after <cursor>", "Opaque cursor from previous page", "0").action(
|
|
6996
6995
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
6997
6996
|
const opts = globalOpts();
|
|
6998
6997
|
const client = await createPlatformClient(opts);
|
|
6999
6998
|
const result = await client.identity.listCustomers({
|
|
7000
6999
|
status: cmdOpts.status ? statusMap[cmdOpts.status.toUpperCase()] : void 0,
|
|
7001
7000
|
search: cmdOpts.search,
|
|
7002
|
-
|
|
7003
|
-
|
|
7001
|
+
first: parseInt(cmdOpts.first ?? "20", 10),
|
|
7002
|
+
after: cmdOpts.after
|
|
7004
7003
|
});
|
|
7005
7004
|
formatListProto(CustomerSchema, result.items, opts, {
|
|
7006
7005
|
columns: [
|
|
@@ -7032,7 +7031,7 @@ function registerCustomersCommands(program2, globalOpts) {
|
|
|
7032
7031
|
if (idOrEmail.includes("@")) {
|
|
7033
7032
|
const list = await client.identity.listCustomers({
|
|
7034
7033
|
search: idOrEmail,
|
|
7035
|
-
|
|
7034
|
+
first: 1
|
|
7036
7035
|
});
|
|
7037
7036
|
customer = list.items[0] ?? null;
|
|
7038
7037
|
} else {
|
|
@@ -7185,14 +7184,14 @@ import {
|
|
|
7185
7184
|
} from "@eide/foir-proto-ts/operations/v1/operations_pb";
|
|
7186
7185
|
function registerOperationsCommands(program2, globalOpts) {
|
|
7187
7186
|
const operations = program2.command("operations").description("Manage operations");
|
|
7188
|
-
operations.command("list").description("List operations").option("--category <cat>", "Filter by category").option("--active", "Only active operations").option("--
|
|
7187
|
+
operations.command("list").description("List operations").option("--category <cat>", "Filter by category").option("--active", "Only active operations").option("--first <n>", "Max results", "50").action(
|
|
7189
7188
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7190
7189
|
const opts = globalOpts();
|
|
7191
7190
|
const client = await createPlatformClient(opts);
|
|
7192
7191
|
const data = await client.operations.listOperations({
|
|
7193
7192
|
category: cmdOpts.category,
|
|
7194
7193
|
isActive: cmdOpts.active ? true : void 0,
|
|
7195
|
-
|
|
7194
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
7196
7195
|
});
|
|
7197
7196
|
formatListProto(OperationSchema, data.operations, opts, {
|
|
7198
7197
|
columns: [
|
|
@@ -7259,13 +7258,13 @@ function registerOperationsCommands(program2, globalOpts) {
|
|
|
7259
7258
|
}
|
|
7260
7259
|
)
|
|
7261
7260
|
);
|
|
7262
|
-
operations.command("dead-letters").description("List failed operations in the dead letter queue").option("--operation <key>", "Filter by operation key").option("--
|
|
7261
|
+
operations.command("dead-letters").description("List failed operations in the dead letter queue").option("--operation <key>", "Filter by operation key").option("--first <n>", "Max results", "20").action(
|
|
7263
7262
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7264
7263
|
const opts = globalOpts();
|
|
7265
7264
|
const client = await createPlatformClient(opts);
|
|
7266
7265
|
const data = await client.operations.listDeadLetterEntries({
|
|
7267
7266
|
operationKey: cmdOpts.operation,
|
|
7268
|
-
|
|
7267
|
+
first: parseInt(cmdOpts.first ?? "20", 10)
|
|
7269
7268
|
});
|
|
7270
7269
|
formatListProto(DeadLetterEntrySchema, data.entries, opts, {
|
|
7271
7270
|
columns: [
|
|
@@ -7321,14 +7320,14 @@ import {
|
|
|
7321
7320
|
} from "@eide/foir-proto-ts/segments/v1/segments_pb";
|
|
7322
7321
|
function registerSegmentsCommands(program2, globalOpts) {
|
|
7323
7322
|
const segments = program2.command("segments").description("Manage segments");
|
|
7324
|
-
segments.command("list").description("List segments").option("--active", "Only active segments").option("--
|
|
7323
|
+
segments.command("list").description("List segments").option("--active", "Only active segments").option("--first <n>", "Page size", "50").option("--after <cursor>", "Opaque cursor from previous page").action(
|
|
7325
7324
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7326
7325
|
const opts = globalOpts();
|
|
7327
7326
|
const client = await createPlatformClient(opts);
|
|
7328
7327
|
const data = await client.segments.listSegments({
|
|
7329
7328
|
isActive: cmdOpts.active ? true : void 0,
|
|
7330
|
-
|
|
7331
|
-
|
|
7329
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10),
|
|
7330
|
+
after: cmdOpts.after
|
|
7332
7331
|
});
|
|
7333
7332
|
formatListProto(SegmentSchema, data.segments, opts, {
|
|
7334
7333
|
columns: [
|
|
@@ -7449,13 +7448,13 @@ function registerSegmentsCommands(program2, globalOpts) {
|
|
|
7449
7448
|
import { CronScheduleSchema } from "@eide/foir-proto-ts/schedules/v1/schedules_pb";
|
|
7450
7449
|
function registerSchedulesCommands(program2, globalOpts) {
|
|
7451
7450
|
const schedules = program2.command("schedules").description("Manage schedules");
|
|
7452
|
-
schedules.command("list").description("List schedules").option("--active", "Only active schedules").option("--
|
|
7451
|
+
schedules.command("list").description("List schedules").option("--active", "Only active schedules").option("--first <n>", "Max results", "50").action(
|
|
7453
7452
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7454
7453
|
const opts = globalOpts();
|
|
7455
7454
|
const client = await createPlatformClient(opts);
|
|
7456
7455
|
const data = await client.cronSchedules.listCronSchedules({
|
|
7457
7456
|
isActive: cmdOpts.active ? true : void 0,
|
|
7458
|
-
|
|
7457
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
7459
7458
|
});
|
|
7460
7459
|
formatListProto(CronScheduleSchema, data.schedules, opts, {
|
|
7461
7460
|
columns: [
|
|
@@ -7601,12 +7600,12 @@ import { toJson as toJson4 } from "@bufbuild/protobuf";
|
|
|
7601
7600
|
import { ApiKeySchema } from "@eide/foir-proto-ts/identity/v1/identity_pb";
|
|
7602
7601
|
function registerApiKeysCommands(program2, globalOpts) {
|
|
7603
7602
|
const apiKeys = program2.command("api-keys").description("Manage API keys");
|
|
7604
|
-
apiKeys.command("list").description("List API keys").option("--include-inactive", "Include revoked/inactive keys").option("--search <term>", "Search by name").option("--
|
|
7603
|
+
apiKeys.command("list").description("List API keys").option("--include-inactive", "Include revoked/inactive keys").option("--search <term>", "Search by name").option("--first <n>", "Max results", "50").action(
|
|
7605
7604
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7606
7605
|
const opts = globalOpts();
|
|
7607
7606
|
const client = await createPlatformClient(opts);
|
|
7608
7607
|
const result = await client.identity.listApiKeys({
|
|
7609
|
-
|
|
7608
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
7610
7609
|
});
|
|
7611
7610
|
formatListProto(ApiKeySchema, result.items, opts, {
|
|
7612
7611
|
columns: [
|
|
@@ -8025,7 +8024,7 @@ function registerEmbeddingsCommands(program2, globalOpts) {
|
|
|
8025
8024
|
);
|
|
8026
8025
|
embeddings.command("search").description("Search by vector similarity").requiredOption(
|
|
8027
8026
|
"-d, --data <json>",
|
|
8028
|
-
'Search input as JSON: {"queryVector":[\u2026],"modelKey":"\u2026","
|
|
8027
|
+
'Search input as JSON: {"queryVector":[\u2026],"modelKey":"\u2026","first":10}'
|
|
8029
8028
|
).action(
|
|
8030
8029
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8031
8030
|
const opts = globalOpts();
|
|
@@ -8041,7 +8040,7 @@ function registerEmbeddingsCommands(program2, globalOpts) {
|
|
|
8041
8040
|
const results = await client.records.searchEmbeddings({
|
|
8042
8041
|
queryVector: input.queryVector,
|
|
8043
8042
|
modelKey: input.modelKey,
|
|
8044
|
-
|
|
8043
|
+
first: input.first
|
|
8045
8044
|
});
|
|
8046
8045
|
if (opts.json || opts.jsonl) {
|
|
8047
8046
|
formatOutput(results, opts);
|
|
@@ -8087,7 +8086,7 @@ function registerEmbeddingsCommands(program2, globalOpts) {
|
|
|
8087
8086
|
}
|
|
8088
8087
|
})
|
|
8089
8088
|
);
|
|
8090
|
-
embeddings.command("similar <recordId>").description("Find records similar to the given record").option("--model-key <key>", "Limit matches to a specific model").option("--
|
|
8089
|
+
embeddings.command("similar <recordId>").description("Find records similar to the given record").option("--model-key <key>", "Limit matches to a specific model").option("--first <n>", "Page size").action(
|
|
8091
8090
|
withErrorHandler(
|
|
8092
8091
|
globalOpts,
|
|
8093
8092
|
async (recordId, cmdOpts) => {
|
|
@@ -8096,7 +8095,7 @@ function registerEmbeddingsCommands(program2, globalOpts) {
|
|
|
8096
8095
|
const results = await client.records.findSimilarRecords({
|
|
8097
8096
|
recordId,
|
|
8098
8097
|
modelKey: cmdOpts.modelKey,
|
|
8099
|
-
|
|
8098
|
+
first: cmdOpts.first ? parseInt(String(cmdOpts.first), 10) : void 0
|
|
8100
8099
|
});
|
|
8101
8100
|
if (opts.json || opts.jsonl) {
|
|
8102
8101
|
formatOutput(results, opts);
|
|
@@ -8124,7 +8123,7 @@ import {
|
|
|
8124
8123
|
} from "@eide/foir-proto-ts/hooks/v1/hooks_pb";
|
|
8125
8124
|
function registerHooksCommands(program2, globalOpts) {
|
|
8126
8125
|
const hooks = program2.command("hooks").description("Manage lifecycle hooks (event-driven webhooks)");
|
|
8127
|
-
hooks.command("list").description("List hooks").option("--event <event>", "Filter by event name").option("--active", "Show only active hooks").option("--inactive", "Show only inactive hooks").option("--
|
|
8126
|
+
hooks.command("list").description("List hooks").option("--event <event>", "Filter by event name").option("--active", "Show only active hooks").option("--inactive", "Show only inactive hooks").option("--first <n>", "Page size").option("--after <cursor>", "Opaque cursor from previous page").action(
|
|
8128
8127
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8129
8128
|
const opts = globalOpts();
|
|
8130
8129
|
const client = await createPlatformClient(opts);
|
|
@@ -8134,8 +8133,8 @@ function registerHooksCommands(program2, globalOpts) {
|
|
|
8134
8133
|
const resp = await client.hooks.listHooks({
|
|
8135
8134
|
event: cmdOpts.event,
|
|
8136
8135
|
isActive,
|
|
8137
|
-
|
|
8138
|
-
|
|
8136
|
+
first: cmdOpts.first ? parseInt(String(cmdOpts.first), 10) : void 0,
|
|
8137
|
+
after: cmdOpts.after
|
|
8139
8138
|
});
|
|
8140
8139
|
formatListProto(HookSchema, resp.hooks ?? [], opts, {
|
|
8141
8140
|
columns: [
|
|
@@ -8249,7 +8248,7 @@ function registerHooksCommands(program2, globalOpts) {
|
|
|
8249
8248
|
}
|
|
8250
8249
|
)
|
|
8251
8250
|
);
|
|
8252
|
-
hooks.command("deliveries <hookId>").description("List recent deliveries for a hook").option("--status <status>", "Filter by status (success / failed / pending)").option("--
|
|
8251
|
+
hooks.command("deliveries <hookId>").description("List recent deliveries for a hook").option("--status <status>", "Filter by status (success / failed / pending)").option("--first <n>", "Page size").option("--after <cursor>", "Opaque cursor from previous page").action(
|
|
8253
8252
|
withErrorHandler(
|
|
8254
8253
|
globalOpts,
|
|
8255
8254
|
async (hookId, cmdOpts) => {
|
|
@@ -8258,8 +8257,8 @@ function registerHooksCommands(program2, globalOpts) {
|
|
|
8258
8257
|
const resp = await client.hooks.listHookDeliveries({
|
|
8259
8258
|
hookId,
|
|
8260
8259
|
status: cmdOpts.status,
|
|
8261
|
-
|
|
8262
|
-
|
|
8260
|
+
first: cmdOpts.first ? parseInt(String(cmdOpts.first), 10) : void 0,
|
|
8261
|
+
after: cmdOpts.after
|
|
8263
8262
|
});
|
|
8264
8263
|
formatListProto(HookDeliverySchema, resp.deliveries ?? [], opts, {
|
|
8265
8264
|
columns: [
|
|
@@ -8332,14 +8331,14 @@ function parseScheduledAt(value) {
|
|
|
8332
8331
|
}
|
|
8333
8332
|
function registerRolloutsCommands(program2, globalOpts) {
|
|
8334
8333
|
const rollouts = program2.command("rollouts").description("Manage bulk scheduled publishing rollouts");
|
|
8335
|
-
rollouts.command("list").description("List rollouts").option("--status <status>", "Filter by status").option("--
|
|
8334
|
+
rollouts.command("list").description("List rollouts").option("--status <status>", "Filter by status").option("--first <n>", "Page size").option("--after <cursor>", "Opaque cursor from previous page").action(
|
|
8336
8335
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8337
8336
|
const opts = globalOpts();
|
|
8338
8337
|
const client = await createPlatformClient(opts);
|
|
8339
8338
|
const { batches } = await client.publishBatches.listPublishBatches({
|
|
8340
8339
|
status: cmdOpts.status,
|
|
8341
|
-
|
|
8342
|
-
|
|
8340
|
+
first: cmdOpts.first ? parseInt(String(cmdOpts.first), 10) : void 0,
|
|
8341
|
+
after: cmdOpts.after
|
|
8343
8342
|
});
|
|
8344
8343
|
formatListProto(PublishBatchSchema, batches, opts, {
|
|
8345
8344
|
columns: [
|
|
@@ -8596,13 +8595,13 @@ function registerRolloutsCommands(program2, globalOpts) {
|
|
|
8596
8595
|
import { LocaleSchema } from "@eide/foir-proto-ts/settings/v1/settings_pb";
|
|
8597
8596
|
function registerLocalesCommands(program2, globalOpts) {
|
|
8598
8597
|
const locales = program2.command("locales").description("Manage locales");
|
|
8599
|
-
locales.command("list").description("List locales").option("--include-inactive", "Include inactive locales").option("--
|
|
8598
|
+
locales.command("list").description("List locales").option("--include-inactive", "Include inactive locales").option("--first <n>", "Max results", "50").action(
|
|
8600
8599
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8601
8600
|
const opts = globalOpts();
|
|
8602
8601
|
const client = await createPlatformClient(opts);
|
|
8603
8602
|
const result = await client.settings.listLocales({
|
|
8604
8603
|
includeInactive: !!cmdOpts.includeInactive,
|
|
8605
|
-
|
|
8604
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
8606
8605
|
});
|
|
8607
8606
|
formatListProto(LocaleSchema, result.locales, opts, {
|
|
8608
8607
|
columns: [
|
|
@@ -8903,13 +8902,13 @@ function registerDesignTokensCommands(program2, globalOpts) {
|
|
|
8903
8902
|
import { VariantCatalogEntrySchema } from "@eide/foir-proto-ts/settings/v1/settings_pb";
|
|
8904
8903
|
function registerVariantCatalogCommands(program2, globalOpts) {
|
|
8905
8904
|
const catalog = program2.command("variant-catalog").description("Manage variant catalog entries (markets, devices, locales)");
|
|
8906
|
-
catalog.command("list").description("List variant catalog entries").option("--active", "Only active entries").option("--
|
|
8905
|
+
catalog.command("list").description("List variant catalog entries").option("--active", "Only active entries").option("--first <n>", "Max results", "50").action(
|
|
8907
8906
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8908
8907
|
const opts = globalOpts();
|
|
8909
8908
|
const client = await createPlatformClient(opts);
|
|
8910
8909
|
const result = await client.settings.listVariantCatalog({
|
|
8911
8910
|
isActive: cmdOpts.active ? true : void 0,
|
|
8912
|
-
|
|
8911
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
8913
8912
|
});
|
|
8914
8913
|
formatListProto(VariantCatalogEntrySchema, result.entries, opts, {
|
|
8915
8914
|
columns: [
|
|
@@ -8939,7 +8938,7 @@ function registerVariantCatalogCommands(program2, globalOpts) {
|
|
|
8939
8938
|
if (isUUID(idOrKey)) {
|
|
8940
8939
|
result = await client.settings.getVariantCatalogEntry(idOrKey);
|
|
8941
8940
|
} else {
|
|
8942
|
-
const list = await client.settings.listVariantCatalog({
|
|
8941
|
+
const list = await client.settings.listVariantCatalog({ first: 200 });
|
|
8943
8942
|
result = list.entries.find(
|
|
8944
8943
|
(e) => e.key === idOrKey
|
|
8945
8944
|
) ?? null;
|
|
@@ -9009,7 +9008,7 @@ import {
|
|
|
9009
9008
|
} from "@eide/foir-proto-ts/storage/v1/storage_pb";
|
|
9010
9009
|
function registerFilesCommands(program2, globalOpts) {
|
|
9011
9010
|
const files = program2.command("files").description("Manage files (for upload, use `foir media upload`)");
|
|
9012
|
-
files.command("list").description("List files").option("--folder <folder>", "Filter by folder").option("--mime-type <type>", "Filter by MIME type").option("--search <term>", "Search by filename").option("--
|
|
9011
|
+
files.command("list").description("List files").option("--folder <folder>", "Filter by folder").option("--mime-type <type>", "Filter by MIME type").option("--search <term>", "Search by filename").option("--first <n>", "Max results", "50").option("--after <cursor>", "Opaque cursor from previous page", "0").action(
|
|
9013
9012
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
9014
9013
|
const opts = globalOpts();
|
|
9015
9014
|
const client = await createPlatformClient(opts);
|
|
@@ -9017,8 +9016,8 @@ function registerFilesCommands(program2, globalOpts) {
|
|
|
9017
9016
|
folder: cmdOpts.folder,
|
|
9018
9017
|
mimeType: cmdOpts.mimeType,
|
|
9019
9018
|
search: cmdOpts.search,
|
|
9020
|
-
|
|
9021
|
-
|
|
9019
|
+
first: parseInt(cmdOpts.first ?? "50", 10),
|
|
9020
|
+
after: cmdOpts.after
|
|
9022
9021
|
});
|
|
9023
9022
|
formatListProto(FileSchema2, data.items, opts, {
|
|
9024
9023
|
columns: [
|
|
@@ -9131,14 +9130,14 @@ function formatBytes(bytes) {
|
|
|
9131
9130
|
import { NoteSchema } from "@eide/foir-proto-ts/settings/v1/settings_pb";
|
|
9132
9131
|
function registerNotesCommands(program2, globalOpts) {
|
|
9133
9132
|
const notes = program2.command("notes").description("Manage notes and comments");
|
|
9134
|
-
notes.command("list").description("List notes for an entity").requiredOption("--entity-type <type>", "Entity type (e.g. record, model)").requiredOption("--entity-id <id>", "Entity ID").option("--include-resolved", "Include resolved notes").option("--
|
|
9133
|
+
notes.command("list").description("List notes for an entity").requiredOption("--entity-type <type>", "Entity type (e.g. record, model)").requiredOption("--entity-id <id>", "Entity ID").option("--include-resolved", "Include resolved notes").option("--first <n>", "Max results", "20").action(
|
|
9135
9134
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
9136
9135
|
const opts = globalOpts();
|
|
9137
9136
|
const client = await createPlatformClient(opts);
|
|
9138
9137
|
const data = await client.settings.listNotes({
|
|
9139
9138
|
entityType: cmdOpts.entityType,
|
|
9140
9139
|
entityId: cmdOpts.entityId,
|
|
9141
|
-
|
|
9140
|
+
first: parseInt(String(cmdOpts.first ?? "20"), 10)
|
|
9142
9141
|
});
|
|
9143
9142
|
formatListProto(NoteSchema, data.notes, opts, {
|
|
9144
9143
|
columns: [
|
|
@@ -9230,13 +9229,13 @@ function registerNotesCommands(program2, globalOpts) {
|
|
|
9230
9229
|
import { NotificationSchema } from "@eide/foir-proto-ts/notifications/v1/notifications_pb";
|
|
9231
9230
|
function registerNotificationsCommands(program2, globalOpts) {
|
|
9232
9231
|
const notifications = program2.command("notifications").description("Manage notifications");
|
|
9233
|
-
notifications.command("list").description("List notifications").option("--unread", "Only unread notifications").option("--
|
|
9232
|
+
notifications.command("list").description("List notifications").option("--unread", "Only unread notifications").option("--first <n>", "Max results", "20").action(
|
|
9234
9233
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
9235
9234
|
const opts = globalOpts();
|
|
9236
9235
|
const client = await createPlatformClient(opts);
|
|
9237
9236
|
const data = await client.notifications.listNotifications({
|
|
9238
9237
|
unreadOnly: !!cmdOpts.unread,
|
|
9239
|
-
|
|
9238
|
+
first: parseInt(String(cmdOpts.first ?? "20"), 10)
|
|
9240
9239
|
});
|
|
9241
9240
|
if (!(opts.json || opts.jsonl || opts.quiet)) {
|
|
9242
9241
|
console.log(`Unread: ${data.unreadCount}
|
|
@@ -9294,14 +9293,14 @@ function registerNotificationsCommands(program2, globalOpts) {
|
|
|
9294
9293
|
import { ConfigSchema } from "@eide/foir-proto-ts/configs/v1/configs_pb";
|
|
9295
9294
|
function registerConfigsCommands(program2, globalOpts) {
|
|
9296
9295
|
const configs = program2.command("configs").description("Manage configs (apps, webhooks)");
|
|
9297
|
-
configs.command("list").description("List configs").option("--type <type>", "Filter by config type").option("--enabled", "Only enabled configs").option("--
|
|
9296
|
+
configs.command("list").description("List configs").option("--type <type>", "Filter by config type").option("--enabled", "Only enabled configs").option("--first <n>", "Max results", "50").action(
|
|
9298
9297
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
9299
9298
|
const opts = globalOpts();
|
|
9300
9299
|
const client = await createPlatformClient(opts);
|
|
9301
9300
|
const data = await client.configs.listConfigs({
|
|
9302
9301
|
configType: cmdOpts.type,
|
|
9303
9302
|
enabled: cmdOpts.enabled ? true : void 0,
|
|
9304
|
-
|
|
9303
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
9305
9304
|
});
|
|
9306
9305
|
formatListProto(ConfigSchema, data.configs, opts, {
|
|
9307
9306
|
columns: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eide/foir-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Universal platform CLI for Foir platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@bufbuild/protovalidate": "^1.1.1",
|
|
51
51
|
"@connectrpc/connect": "^2.0.0",
|
|
52
52
|
"@connectrpc/connect-node": "^2.0.0",
|
|
53
|
-
"@eide/foir-proto-ts": "^0.
|
|
53
|
+
"@eide/foir-proto-ts": "^0.78.0",
|
|
54
54
|
"chalk": "^5.3.0",
|
|
55
55
|
"commander": "^12.1.0",
|
|
56
56
|
"dotenv": "^16.4.5",
|