@eide/foir-cli 0.30.1 → 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 +137 -132
- 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 {
|
|
@@ -1673,8 +1673,8 @@ function createRecordsMethods(client) {
|
|
|
1673
1673
|
const resp = await client.listRecordVersions(
|
|
1674
1674
|
create4(ListRecordVersionsRequestSchema, {
|
|
1675
1675
|
parentId,
|
|
1676
|
-
|
|
1677
|
-
|
|
1676
|
+
first: params?.first ?? 50,
|
|
1677
|
+
after: params?.after
|
|
1678
1678
|
})
|
|
1679
1679
|
);
|
|
1680
1680
|
return {
|
|
@@ -1718,8 +1718,8 @@ function createRecordsMethods(client) {
|
|
|
1718
1718
|
const resp = await client.listRecordVariants(
|
|
1719
1719
|
create4(ListRecordVariantsRequestSchema, {
|
|
1720
1720
|
recordId,
|
|
1721
|
-
|
|
1722
|
-
|
|
1721
|
+
first: params?.first ?? 50,
|
|
1722
|
+
after: params?.after
|
|
1723
1723
|
})
|
|
1724
1724
|
);
|
|
1725
1725
|
return {
|
|
@@ -1762,8 +1762,8 @@ function createRecordsMethods(client) {
|
|
|
1762
1762
|
nanos: 0
|
|
1763
1763
|
} : void 0,
|
|
1764
1764
|
modelKey: params?.modelKey,
|
|
1765
|
-
|
|
1766
|
-
|
|
1765
|
+
first: params?.first ?? 50,
|
|
1766
|
+
after: params?.after
|
|
1767
1767
|
})
|
|
1768
1768
|
);
|
|
1769
1769
|
return {
|
|
@@ -1776,8 +1776,8 @@ function createRecordsMethods(client) {
|
|
|
1776
1776
|
create4(ListDraftVersionsRequestSchema, {
|
|
1777
1777
|
modelKey: params?.modelKey,
|
|
1778
1778
|
search: params?.search,
|
|
1779
|
-
|
|
1780
|
-
|
|
1779
|
+
first: params?.first ?? 50,
|
|
1780
|
+
after: params?.after
|
|
1781
1781
|
})
|
|
1782
1782
|
);
|
|
1783
1783
|
return {
|
|
@@ -1801,7 +1801,8 @@ function createRecordsMethods(client) {
|
|
|
1801
1801
|
create4(GlobalSearchRequestSchema, {
|
|
1802
1802
|
query: params.query,
|
|
1803
1803
|
modelKeys: params.modelKeys ?? [],
|
|
1804
|
-
|
|
1804
|
+
first: params.first ?? 20,
|
|
1805
|
+
after: params?.after
|
|
1805
1806
|
})
|
|
1806
1807
|
);
|
|
1807
1808
|
return {
|
|
@@ -1828,7 +1829,8 @@ function createRecordsMethods(client) {
|
|
|
1828
1829
|
create4(FindSimilarRecordsRequestSchema, {
|
|
1829
1830
|
recordId: params.recordId,
|
|
1830
1831
|
modelKey: params.modelKey,
|
|
1831
|
-
|
|
1832
|
+
first: params.first ?? 10,
|
|
1833
|
+
after: params?.after
|
|
1832
1834
|
})
|
|
1833
1835
|
);
|
|
1834
1836
|
return resp.records ?? [];
|
|
@@ -1856,7 +1858,8 @@ function createRecordsMethods(client) {
|
|
|
1856
1858
|
create4(SearchEmbeddingsRequestSchema, {
|
|
1857
1859
|
queryVector: params.queryVector,
|
|
1858
1860
|
modelKey: params.modelKey,
|
|
1859
|
-
|
|
1861
|
+
first: params.first ?? 10,
|
|
1862
|
+
after: params?.after
|
|
1860
1863
|
})
|
|
1861
1864
|
);
|
|
1862
1865
|
return resp.results ?? [];
|
|
@@ -1894,8 +1897,8 @@ function createConfigsMethods(client) {
|
|
|
1894
1897
|
category: params.category,
|
|
1895
1898
|
isActive: params.isActive,
|
|
1896
1899
|
search: params.search,
|
|
1897
|
-
|
|
1898
|
-
|
|
1900
|
+
first: params.first ?? 50,
|
|
1901
|
+
after: params?.after
|
|
1899
1902
|
})
|
|
1900
1903
|
);
|
|
1901
1904
|
},
|
|
@@ -1917,8 +1920,8 @@ function createConfigsMethods(client) {
|
|
|
1917
1920
|
create5(ListConfigsRequestSchema, {
|
|
1918
1921
|
configType: params.configType,
|
|
1919
1922
|
enabled: params.enabled,
|
|
1920
|
-
|
|
1921
|
-
|
|
1923
|
+
first: params.first ?? 50,
|
|
1924
|
+
after: params?.after
|
|
1922
1925
|
})
|
|
1923
1926
|
);
|
|
1924
1927
|
},
|
|
@@ -2055,8 +2058,8 @@ function createSegmentsMethods(client) {
|
|
|
2055
2058
|
create6(ListSegmentsRequestSchema, {
|
|
2056
2059
|
isActive: params.isActive,
|
|
2057
2060
|
configId: params.configId,
|
|
2058
|
-
|
|
2059
|
-
|
|
2061
|
+
first: params.first ?? 50,
|
|
2062
|
+
after: params?.after
|
|
2060
2063
|
})
|
|
2061
2064
|
);
|
|
2062
2065
|
},
|
|
@@ -2224,8 +2227,8 @@ function createSettingsMethods(client) {
|
|
|
2224
2227
|
create7(ListMyMentionsRequestSchema, {
|
|
2225
2228
|
status: params.status ?? [],
|
|
2226
2229
|
entityType: params.entityType,
|
|
2227
|
-
|
|
2228
|
-
|
|
2230
|
+
first: params.first ?? 50,
|
|
2231
|
+
after: params?.after
|
|
2229
2232
|
})
|
|
2230
2233
|
);
|
|
2231
2234
|
},
|
|
@@ -2259,8 +2262,8 @@ function createSettingsMethods(client) {
|
|
|
2259
2262
|
create7(ListNotesRequestSchema, {
|
|
2260
2263
|
entityType: params.entityType,
|
|
2261
2264
|
entityId: params.entityId,
|
|
2262
|
-
|
|
2263
|
-
|
|
2265
|
+
first: params.first ?? 50,
|
|
2266
|
+
after: params?.after
|
|
2264
2267
|
})
|
|
2265
2268
|
);
|
|
2266
2269
|
},
|
|
@@ -2285,8 +2288,8 @@ function createSettingsMethods(client) {
|
|
|
2285
2288
|
return client.listContextDimensions(
|
|
2286
2289
|
create7(ListContextDimensionsRequestSchema, {
|
|
2287
2290
|
search: params.search,
|
|
2288
|
-
|
|
2289
|
-
|
|
2291
|
+
first: params.first ?? 50,
|
|
2292
|
+
after: params?.after
|
|
2290
2293
|
})
|
|
2291
2294
|
);
|
|
2292
2295
|
},
|
|
@@ -2319,8 +2322,8 @@ function createSettingsMethods(client) {
|
|
|
2319
2322
|
create7(GetContextDimensionValuesRequestSchema, {
|
|
2320
2323
|
dimensionKey,
|
|
2321
2324
|
search: params.search,
|
|
2322
|
-
|
|
2323
|
-
|
|
2325
|
+
first: params.first ?? 50,
|
|
2326
|
+
after: params?.after
|
|
2324
2327
|
})
|
|
2325
2328
|
);
|
|
2326
2329
|
},
|
|
@@ -2419,8 +2422,8 @@ function createSettingsMethods(client) {
|
|
|
2419
2422
|
return client.listVariantCatalog(
|
|
2420
2423
|
create7(ListVariantCatalogRequestSchema, {
|
|
2421
2424
|
isActive: params.isActive,
|
|
2422
|
-
|
|
2423
|
-
|
|
2425
|
+
first: params.first ?? 50,
|
|
2426
|
+
after: params?.after
|
|
2424
2427
|
})
|
|
2425
2428
|
);
|
|
2426
2429
|
},
|
|
@@ -2469,8 +2472,8 @@ function createSettingsMethods(client) {
|
|
|
2469
2472
|
return client.listLocales(
|
|
2470
2473
|
create7(ListLocalesRequestSchema, {
|
|
2471
2474
|
includeInactive: params.includeInactive,
|
|
2472
|
-
|
|
2473
|
-
|
|
2475
|
+
first: params.first ?? 50,
|
|
2476
|
+
after: params?.after
|
|
2474
2477
|
})
|
|
2475
2478
|
);
|
|
2476
2479
|
},
|
|
@@ -2549,10 +2552,10 @@ function createSettingsMethods(client) {
|
|
|
2549
2552
|
return resp.preferences ?? null;
|
|
2550
2553
|
},
|
|
2551
2554
|
// ── Recently Opened ─────────────────────────────────────
|
|
2552
|
-
async listRecentlyOpened(
|
|
2555
|
+
async listRecentlyOpened(first) {
|
|
2553
2556
|
const resp = await client.listRecentlyOpened(
|
|
2554
2557
|
create7(ListRecentlyOpenedRequestSchema, {
|
|
2555
|
-
|
|
2558
|
+
first: first ?? 20
|
|
2556
2559
|
})
|
|
2557
2560
|
);
|
|
2558
2561
|
return resp.items ?? [];
|
|
@@ -2632,8 +2635,8 @@ function createStorageMethods(client) {
|
|
|
2632
2635
|
mimeType: params.mimeType,
|
|
2633
2636
|
search: params.search,
|
|
2634
2637
|
includeDeleted: params.includeDeleted ?? false,
|
|
2635
|
-
|
|
2636
|
-
|
|
2638
|
+
first: params.first ?? 50,
|
|
2639
|
+
after: params?.after
|
|
2637
2640
|
})
|
|
2638
2641
|
);
|
|
2639
2642
|
},
|
|
@@ -2695,6 +2698,8 @@ function createStorageMethods(client) {
|
|
|
2695
2698
|
);
|
|
2696
2699
|
return resp.success;
|
|
2697
2700
|
},
|
|
2701
|
+
// Documented Stage-9 exception: CleanupOrphanedFiles is a write-batch
|
|
2702
|
+
// ceiling, not list pagination, so it keeps `limit` rather than `first`.
|
|
2698
2703
|
async cleanupOrphanedFiles(params) {
|
|
2699
2704
|
return client.cleanupOrphanedFiles(
|
|
2700
2705
|
create8(CleanupOrphanedFilesRequestSchema, {
|
|
@@ -2732,8 +2737,8 @@ function createOperationsMethods(client) {
|
|
|
2732
2737
|
category: params.category,
|
|
2733
2738
|
isActive: params.isActive,
|
|
2734
2739
|
search: params.search,
|
|
2735
|
-
|
|
2736
|
-
|
|
2740
|
+
first: params.first ?? 50,
|
|
2741
|
+
after: params?.after
|
|
2737
2742
|
})
|
|
2738
2743
|
);
|
|
2739
2744
|
},
|
|
@@ -2821,8 +2826,8 @@ function createOperationsMethods(client) {
|
|
|
2821
2826
|
return client.listDeadLetterEntries(
|
|
2822
2827
|
create9(ListDeadLetterEntriesRequestSchema, {
|
|
2823
2828
|
operationKey: params.operationKey,
|
|
2824
|
-
|
|
2825
|
-
|
|
2829
|
+
first: params.first ?? 50,
|
|
2830
|
+
after: params?.after
|
|
2826
2831
|
})
|
|
2827
2832
|
);
|
|
2828
2833
|
},
|
|
@@ -2869,8 +2874,8 @@ function createHooksMethods(client) {
|
|
|
2869
2874
|
event: params.event,
|
|
2870
2875
|
isActive: params.isActive,
|
|
2871
2876
|
configId: params.configId,
|
|
2872
|
-
|
|
2873
|
-
|
|
2877
|
+
first: params.first ?? 50,
|
|
2878
|
+
after: params?.after
|
|
2874
2879
|
})
|
|
2875
2880
|
);
|
|
2876
2881
|
},
|
|
@@ -2928,8 +2933,8 @@ function createHooksMethods(client) {
|
|
|
2928
2933
|
create10(ListHookDeliveriesRequestSchema, {
|
|
2929
2934
|
hookId: params.hookId,
|
|
2930
2935
|
status: params.status,
|
|
2931
|
-
|
|
2932
|
-
|
|
2936
|
+
first: params.first ?? 50,
|
|
2937
|
+
after: params?.after
|
|
2933
2938
|
})
|
|
2934
2939
|
);
|
|
2935
2940
|
},
|
|
@@ -2968,8 +2973,8 @@ function createNotificationsMethods(client) {
|
|
|
2968
2973
|
return client.listNotifications(
|
|
2969
2974
|
create11(ListNotificationsRequestSchema, {
|
|
2970
2975
|
isRead: params.unreadOnly ? false : void 0,
|
|
2971
|
-
|
|
2972
|
-
|
|
2976
|
+
first: params.first ?? 20,
|
|
2977
|
+
after: params?.after
|
|
2973
2978
|
})
|
|
2974
2979
|
);
|
|
2975
2980
|
},
|
|
@@ -3009,8 +3014,8 @@ function createCronSchedulesMethods(client) {
|
|
|
3009
3014
|
create12(ListCronSchedulesRequestSchema, {
|
|
3010
3015
|
configId: params.configId,
|
|
3011
3016
|
isActive: params.isActive,
|
|
3012
|
-
|
|
3013
|
-
|
|
3017
|
+
first: params.first ?? 50,
|
|
3018
|
+
after: params?.after
|
|
3014
3019
|
})
|
|
3015
3020
|
);
|
|
3016
3021
|
},
|
|
@@ -3106,8 +3111,8 @@ function createPublishBatchesMethods(client) {
|
|
|
3106
3111
|
const resp = await client.listPublishBatches(
|
|
3107
3112
|
create13(ListPublishBatchesRequestSchema, {
|
|
3108
3113
|
status: params.status,
|
|
3109
|
-
|
|
3110
|
-
|
|
3114
|
+
first: params.first ?? 50,
|
|
3115
|
+
after: params?.after
|
|
3111
3116
|
})
|
|
3112
3117
|
);
|
|
3113
3118
|
return { batches: resp.batches ?? [], total: resp.total };
|
|
@@ -3480,7 +3485,7 @@ function registerSelectProjectCommand(program2, globalOpts) {
|
|
|
3480
3485
|
tenantId: tenant.id,
|
|
3481
3486
|
status: 1,
|
|
3482
3487
|
// PROJECT_STATUS_ACTIVE
|
|
3483
|
-
|
|
3488
|
+
first: 100
|
|
3484
3489
|
});
|
|
3485
3490
|
for (const p of items) {
|
|
3486
3491
|
projects.push({ id: p.id, name: p.name, tenantId: p.tenantId });
|
|
@@ -3565,7 +3570,7 @@ function registerSelectProjectCommand(program2, globalOpts) {
|
|
|
3565
3570
|
);
|
|
3566
3571
|
}
|
|
3567
3572
|
async function provisionApiKey(client) {
|
|
3568
|
-
const { items: apiKeys } = await client.identity.listApiKeys({
|
|
3573
|
+
const { items: apiKeys } = await client.identity.listApiKeys({ first: 100 });
|
|
3569
3574
|
const existing = apiKeys.find(
|
|
3570
3575
|
(k) => k.name === CLI_API_KEY_NAME && k.isActive
|
|
3571
3576
|
);
|
|
@@ -3969,7 +3974,7 @@ function registerMediaCommands(program2, globalOpts) {
|
|
|
3969
3974
|
}
|
|
3970
3975
|
)
|
|
3971
3976
|
);
|
|
3972
|
-
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(
|
|
3973
3978
|
withErrorHandler(
|
|
3974
3979
|
globalOpts,
|
|
3975
3980
|
async (flags) => {
|
|
@@ -3981,8 +3986,8 @@ function registerMediaCommands(program2, globalOpts) {
|
|
|
3981
3986
|
mimeType: flags["mime-type"] ?? flags.mimeType,
|
|
3982
3987
|
search: flags.search,
|
|
3983
3988
|
includeDeleted: !!flags.includeDeleted,
|
|
3984
|
-
|
|
3985
|
-
|
|
3989
|
+
first: Number(flags.first) || 50,
|
|
3990
|
+
after: flags.after
|
|
3986
3991
|
});
|
|
3987
3992
|
formatListProto(FileSchema, result.items, opts, {
|
|
3988
3993
|
columns: [
|
|
@@ -4678,7 +4683,7 @@ function registerSearchCommands(program2, globalOpts) {
|
|
|
4678
4683
|
program2.command("search <query>").description("Search across all records").option(
|
|
4679
4684
|
"--models <keys>",
|
|
4680
4685
|
"Filter to specific model keys (comma-separated)"
|
|
4681
|
-
).option("--
|
|
4686
|
+
).option("--first <n>", "Max results", "20").action(
|
|
4682
4687
|
withErrorHandler(
|
|
4683
4688
|
globalOpts,
|
|
4684
4689
|
async (query, cmdOpts) => {
|
|
@@ -4687,7 +4692,7 @@ function registerSearchCommands(program2, globalOpts) {
|
|
|
4687
4692
|
const modelKeys = typeof cmdOpts.models === "string" ? cmdOpts.models.split(",").map((k) => k.trim()) : void 0;
|
|
4688
4693
|
const result = await client.records.globalSearch({
|
|
4689
4694
|
query,
|
|
4690
|
-
|
|
4695
|
+
first: parseInt(String(cmdOpts.first ?? "20"), 10),
|
|
4691
4696
|
modelKeys
|
|
4692
4697
|
});
|
|
4693
4698
|
if (opts.json || opts.jsonl) {
|
|
@@ -4861,7 +4866,7 @@ Edit the file, then run:
|
|
|
4861
4866
|
async (opts) => {
|
|
4862
4867
|
const globalFlags = globalOpts();
|
|
4863
4868
|
const client = await createPlatformClient(globalFlags);
|
|
4864
|
-
const result = await client.models.listModels({
|
|
4869
|
+
const result = await client.models.listModels({ first: 100 });
|
|
4865
4870
|
const models = result.items.map((m) => ({
|
|
4866
4871
|
key: m.key,
|
|
4867
4872
|
name: m.name,
|
|
@@ -5129,7 +5134,7 @@ async function reconcileConfig(client, configId, manifest, options = {}) {
|
|
|
5129
5134
|
return summary;
|
|
5130
5135
|
}
|
|
5131
5136
|
async function reconcileModels(client, configId, models, summary, force, allowLookupRebuild, conflictOut) {
|
|
5132
|
-
const existing = await client.models.listModels({
|
|
5137
|
+
const existing = await client.models.listModels({ first: 200 });
|
|
5133
5138
|
const allByKey = new Map(
|
|
5134
5139
|
existing.items.map((m) => [m.key, m])
|
|
5135
5140
|
);
|
|
@@ -5231,7 +5236,7 @@ function resolveEndpoint(endpoint, baseUrl) {
|
|
|
5231
5236
|
return baseUrl ? `${baseUrl.replace(/\/+$/, "")}${endpoint.startsWith("/") ? "" : "/"}${endpoint}` : endpoint;
|
|
5232
5237
|
}
|
|
5233
5238
|
async function reconcileOperations(client, configId, operations, operationBaseUrl, summary) {
|
|
5234
|
-
const existing = await client.operations.listOperations({ configId,
|
|
5239
|
+
const existing = await client.operations.listOperations({ configId, first: 200 });
|
|
5235
5240
|
const existingByKey = new Map(
|
|
5236
5241
|
(existing.operations ?? []).map((o) => [o.key, o])
|
|
5237
5242
|
);
|
|
@@ -5311,7 +5316,7 @@ async function reconcileOperations(client, configId, operations, operationBaseUr
|
|
|
5311
5316
|
}
|
|
5312
5317
|
}
|
|
5313
5318
|
async function reconcileHooks(client, configId, hooks, summary) {
|
|
5314
|
-
const existing = await client.hooks.listHooks({ configId,
|
|
5319
|
+
const existing = await client.hooks.listHooks({ configId, first: 200 });
|
|
5315
5320
|
const existingByKey = new Map(
|
|
5316
5321
|
(existing.hooks ?? []).map((h) => [h.key, h])
|
|
5317
5322
|
);
|
|
@@ -5359,8 +5364,8 @@ async function reconcileHooks(client, configId, hooks, summary) {
|
|
|
5359
5364
|
}
|
|
5360
5365
|
async function reconcileSegments(client, configId, segments, summary) {
|
|
5361
5366
|
const [scoped, all] = await Promise.all([
|
|
5362
|
-
client.segments.listSegments({ configId,
|
|
5363
|
-
client.segments.listSegments({
|
|
5367
|
+
client.segments.listSegments({ configId, first: 200 }),
|
|
5368
|
+
client.segments.listSegments({ first: 200 })
|
|
5364
5369
|
]);
|
|
5365
5370
|
const existingByKey = /* @__PURE__ */ new Map();
|
|
5366
5371
|
for (const s of all.segments ?? []) {
|
|
@@ -5408,7 +5413,7 @@ async function reconcileSegments(client, configId, segments, summary) {
|
|
|
5408
5413
|
}
|
|
5409
5414
|
}
|
|
5410
5415
|
async function reconcileCronSchedules(client, configId, schedules, summary) {
|
|
5411
|
-
const existing = await client.cronSchedules.listCronSchedules({ configId,
|
|
5416
|
+
const existing = await client.cronSchedules.listCronSchedules({ configId, first: 200 });
|
|
5412
5417
|
const schedulesList = existing.schedules ?? [];
|
|
5413
5418
|
const existingByKey = new Map(
|
|
5414
5419
|
schedulesList.map((s) => [s.key, s])
|
|
@@ -5457,7 +5462,7 @@ async function reconcileCronSchedules(client, configId, schedules, summary) {
|
|
|
5457
5462
|
}
|
|
5458
5463
|
}
|
|
5459
5464
|
async function reconcileAuthProviders(client, providers, summary) {
|
|
5460
|
-
const existing = await client.identity.listAuthProviders({
|
|
5465
|
+
const existing = await client.identity.listAuthProviders({ first: 200 });
|
|
5461
5466
|
const existingByKey = new Map(
|
|
5462
5467
|
existing.items.map((p) => [p.key, p])
|
|
5463
5468
|
);
|
|
@@ -5537,7 +5542,7 @@ async function reconcileDesignTokens(client, manifest, summary, publishAfterAppl
|
|
|
5537
5542
|
}
|
|
5538
5543
|
async function reconcileApiKeys(client, configKey, apiKeys, summary, rotateKeys) {
|
|
5539
5544
|
if (apiKeys.length === 0) return;
|
|
5540
|
-
const existing = await client.identity.listApiKeys({
|
|
5545
|
+
const existing = await client.identity.listApiKeys({ first: 200 });
|
|
5541
5546
|
const existingByName = new Map(
|
|
5542
5547
|
existing.items.map((k) => [k.name, k])
|
|
5543
5548
|
);
|
|
@@ -6084,7 +6089,7 @@ function registerPullCommand(program2, globalOpts) {
|
|
|
6084
6089
|
const client = await createPlatformClient(globalOpts());
|
|
6085
6090
|
let configKey = opts.key;
|
|
6086
6091
|
if (!configKey) {
|
|
6087
|
-
const { configs } = await client.configs.listConfigs({
|
|
6092
|
+
const { configs } = await client.configs.listConfigs({ first: 50 });
|
|
6088
6093
|
if (!configs || configs.length === 0) {
|
|
6089
6094
|
throw new Error(
|
|
6090
6095
|
"No configs found in this project. Push one first with `foir push`."
|
|
@@ -6193,7 +6198,7 @@ export default defineConfig(${jsonContent});
|
|
|
6193
6198
|
writeFileSync3(outPath, formatted, "utf-8");
|
|
6194
6199
|
console.log(chalk7.green(`\u2713 Exported to ${outPath}`));
|
|
6195
6200
|
try {
|
|
6196
|
-
const { items: platformModels } = await client.models.listModels({
|
|
6201
|
+
const { items: platformModels } = await client.models.listModels({ first: 200 });
|
|
6197
6202
|
for (const pm of platformModels) {
|
|
6198
6203
|
await client.models.updateModel({
|
|
6199
6204
|
id: pm.id,
|
|
@@ -6580,15 +6585,15 @@ import {
|
|
|
6580
6585
|
} from "@eide/foir-proto-ts/models/v1/models_pb";
|
|
6581
6586
|
function registerModelsCommands(program2, globalOpts) {
|
|
6582
6587
|
const models = program2.command("models").description("Manage models");
|
|
6583
|
-
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(
|
|
6584
6589
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
6585
6590
|
const opts = globalOpts();
|
|
6586
6591
|
const client = await createPlatformClient(opts);
|
|
6587
6592
|
const result = await client.models.listModels({
|
|
6588
6593
|
search: cmdOpts.search,
|
|
6589
6594
|
category: cmdOpts.category,
|
|
6590
|
-
|
|
6591
|
-
|
|
6595
|
+
first: parseInt(cmdOpts.first ?? "50", 10),
|
|
6596
|
+
after: cmdOpts.after
|
|
6592
6597
|
});
|
|
6593
6598
|
formatListProto(ModelSchema, result.items, opts, {
|
|
6594
6599
|
columns: [
|
|
@@ -6677,7 +6682,7 @@ function registerModelsCommands(program2, globalOpts) {
|
|
|
6677
6682
|
}
|
|
6678
6683
|
)
|
|
6679
6684
|
);
|
|
6680
|
-
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(
|
|
6681
6686
|
withErrorHandler(
|
|
6682
6687
|
globalOpts,
|
|
6683
6688
|
async (key, cmdOpts) => {
|
|
@@ -6688,7 +6693,7 @@ function registerModelsCommands(program2, globalOpts) {
|
|
|
6688
6693
|
throw new Error(`Model "${key}" not found.`);
|
|
6689
6694
|
}
|
|
6690
6695
|
const result = await client.models.listModelVersions(existing.id, {
|
|
6691
|
-
|
|
6696
|
+
first: parseInt(cmdOpts.first ?? "20", 10)
|
|
6692
6697
|
});
|
|
6693
6698
|
formatListProto(ModelVersionSchema, result.items, opts, {
|
|
6694
6699
|
columns: [
|
|
@@ -6889,14 +6894,14 @@ function registerRecordsCommands(program2, globalOpts) {
|
|
|
6889
6894
|
}
|
|
6890
6895
|
)
|
|
6891
6896
|
);
|
|
6892
|
-
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(
|
|
6893
6898
|
withErrorHandler(
|
|
6894
6899
|
globalOpts,
|
|
6895
6900
|
async (parentId, cmdOpts) => {
|
|
6896
6901
|
const opts = globalOpts();
|
|
6897
6902
|
const client = await createPlatformClient(opts);
|
|
6898
6903
|
const result = await client.records.listRecordVersions(parentId, {
|
|
6899
|
-
|
|
6904
|
+
first: parseInt(cmdOpts.first ?? "20", 10)
|
|
6900
6905
|
});
|
|
6901
6906
|
formatListProto(RecordSchema, result.items, opts, {
|
|
6902
6907
|
columns: [
|
|
@@ -6986,15 +6991,15 @@ function registerCustomersCommands(program2, globalOpts) {
|
|
|
6986
6991
|
customers.command("list").description("List customers").option(
|
|
6987
6992
|
"--status <status>",
|
|
6988
6993
|
"Filter by status (ACTIVE, PENDING, SUSPENDED)"
|
|
6989
|
-
).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(
|
|
6990
6995
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
6991
6996
|
const opts = globalOpts();
|
|
6992
6997
|
const client = await createPlatformClient(opts);
|
|
6993
6998
|
const result = await client.identity.listCustomers({
|
|
6994
6999
|
status: cmdOpts.status ? statusMap[cmdOpts.status.toUpperCase()] : void 0,
|
|
6995
7000
|
search: cmdOpts.search,
|
|
6996
|
-
|
|
6997
|
-
|
|
7001
|
+
first: parseInt(cmdOpts.first ?? "20", 10),
|
|
7002
|
+
after: cmdOpts.after
|
|
6998
7003
|
});
|
|
6999
7004
|
formatListProto(CustomerSchema, result.items, opts, {
|
|
7000
7005
|
columns: [
|
|
@@ -7026,7 +7031,7 @@ function registerCustomersCommands(program2, globalOpts) {
|
|
|
7026
7031
|
if (idOrEmail.includes("@")) {
|
|
7027
7032
|
const list = await client.identity.listCustomers({
|
|
7028
7033
|
search: idOrEmail,
|
|
7029
|
-
|
|
7034
|
+
first: 1
|
|
7030
7035
|
});
|
|
7031
7036
|
customer = list.items[0] ?? null;
|
|
7032
7037
|
} else {
|
|
@@ -7179,14 +7184,14 @@ import {
|
|
|
7179
7184
|
} from "@eide/foir-proto-ts/operations/v1/operations_pb";
|
|
7180
7185
|
function registerOperationsCommands(program2, globalOpts) {
|
|
7181
7186
|
const operations = program2.command("operations").description("Manage operations");
|
|
7182
|
-
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(
|
|
7183
7188
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7184
7189
|
const opts = globalOpts();
|
|
7185
7190
|
const client = await createPlatformClient(opts);
|
|
7186
7191
|
const data = await client.operations.listOperations({
|
|
7187
7192
|
category: cmdOpts.category,
|
|
7188
7193
|
isActive: cmdOpts.active ? true : void 0,
|
|
7189
|
-
|
|
7194
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
7190
7195
|
});
|
|
7191
7196
|
formatListProto(OperationSchema, data.operations, opts, {
|
|
7192
7197
|
columns: [
|
|
@@ -7253,13 +7258,13 @@ function registerOperationsCommands(program2, globalOpts) {
|
|
|
7253
7258
|
}
|
|
7254
7259
|
)
|
|
7255
7260
|
);
|
|
7256
|
-
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(
|
|
7257
7262
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7258
7263
|
const opts = globalOpts();
|
|
7259
7264
|
const client = await createPlatformClient(opts);
|
|
7260
7265
|
const data = await client.operations.listDeadLetterEntries({
|
|
7261
7266
|
operationKey: cmdOpts.operation,
|
|
7262
|
-
|
|
7267
|
+
first: parseInt(cmdOpts.first ?? "20", 10)
|
|
7263
7268
|
});
|
|
7264
7269
|
formatListProto(DeadLetterEntrySchema, data.entries, opts, {
|
|
7265
7270
|
columns: [
|
|
@@ -7315,14 +7320,14 @@ import {
|
|
|
7315
7320
|
} from "@eide/foir-proto-ts/segments/v1/segments_pb";
|
|
7316
7321
|
function registerSegmentsCommands(program2, globalOpts) {
|
|
7317
7322
|
const segments = program2.command("segments").description("Manage segments");
|
|
7318
|
-
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(
|
|
7319
7324
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7320
7325
|
const opts = globalOpts();
|
|
7321
7326
|
const client = await createPlatformClient(opts);
|
|
7322
7327
|
const data = await client.segments.listSegments({
|
|
7323
7328
|
isActive: cmdOpts.active ? true : void 0,
|
|
7324
|
-
|
|
7325
|
-
|
|
7329
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10),
|
|
7330
|
+
after: cmdOpts.after
|
|
7326
7331
|
});
|
|
7327
7332
|
formatListProto(SegmentSchema, data.segments, opts, {
|
|
7328
7333
|
columns: [
|
|
@@ -7443,13 +7448,13 @@ function registerSegmentsCommands(program2, globalOpts) {
|
|
|
7443
7448
|
import { CronScheduleSchema } from "@eide/foir-proto-ts/schedules/v1/schedules_pb";
|
|
7444
7449
|
function registerSchedulesCommands(program2, globalOpts) {
|
|
7445
7450
|
const schedules = program2.command("schedules").description("Manage schedules");
|
|
7446
|
-
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(
|
|
7447
7452
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7448
7453
|
const opts = globalOpts();
|
|
7449
7454
|
const client = await createPlatformClient(opts);
|
|
7450
7455
|
const data = await client.cronSchedules.listCronSchedules({
|
|
7451
7456
|
isActive: cmdOpts.active ? true : void 0,
|
|
7452
|
-
|
|
7457
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
7453
7458
|
});
|
|
7454
7459
|
formatListProto(CronScheduleSchema, data.schedules, opts, {
|
|
7455
7460
|
columns: [
|
|
@@ -7595,12 +7600,12 @@ import { toJson as toJson4 } from "@bufbuild/protobuf";
|
|
|
7595
7600
|
import { ApiKeySchema } from "@eide/foir-proto-ts/identity/v1/identity_pb";
|
|
7596
7601
|
function registerApiKeysCommands(program2, globalOpts) {
|
|
7597
7602
|
const apiKeys = program2.command("api-keys").description("Manage API keys");
|
|
7598
|
-
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(
|
|
7599
7604
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7600
7605
|
const opts = globalOpts();
|
|
7601
7606
|
const client = await createPlatformClient(opts);
|
|
7602
7607
|
const result = await client.identity.listApiKeys({
|
|
7603
|
-
|
|
7608
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
7604
7609
|
});
|
|
7605
7610
|
formatListProto(ApiKeySchema, result.items, opts, {
|
|
7606
7611
|
columns: [
|
|
@@ -8019,7 +8024,7 @@ function registerEmbeddingsCommands(program2, globalOpts) {
|
|
|
8019
8024
|
);
|
|
8020
8025
|
embeddings.command("search").description("Search by vector similarity").requiredOption(
|
|
8021
8026
|
"-d, --data <json>",
|
|
8022
|
-
'Search input as JSON: {"queryVector":[\u2026],"modelKey":"\u2026","
|
|
8027
|
+
'Search input as JSON: {"queryVector":[\u2026],"modelKey":"\u2026","first":10}'
|
|
8023
8028
|
).action(
|
|
8024
8029
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8025
8030
|
const opts = globalOpts();
|
|
@@ -8035,7 +8040,7 @@ function registerEmbeddingsCommands(program2, globalOpts) {
|
|
|
8035
8040
|
const results = await client.records.searchEmbeddings({
|
|
8036
8041
|
queryVector: input.queryVector,
|
|
8037
8042
|
modelKey: input.modelKey,
|
|
8038
|
-
|
|
8043
|
+
first: input.first
|
|
8039
8044
|
});
|
|
8040
8045
|
if (opts.json || opts.jsonl) {
|
|
8041
8046
|
formatOutput(results, opts);
|
|
@@ -8081,7 +8086,7 @@ function registerEmbeddingsCommands(program2, globalOpts) {
|
|
|
8081
8086
|
}
|
|
8082
8087
|
})
|
|
8083
8088
|
);
|
|
8084
|
-
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(
|
|
8085
8090
|
withErrorHandler(
|
|
8086
8091
|
globalOpts,
|
|
8087
8092
|
async (recordId, cmdOpts) => {
|
|
@@ -8090,7 +8095,7 @@ function registerEmbeddingsCommands(program2, globalOpts) {
|
|
|
8090
8095
|
const results = await client.records.findSimilarRecords({
|
|
8091
8096
|
recordId,
|
|
8092
8097
|
modelKey: cmdOpts.modelKey,
|
|
8093
|
-
|
|
8098
|
+
first: cmdOpts.first ? parseInt(String(cmdOpts.first), 10) : void 0
|
|
8094
8099
|
});
|
|
8095
8100
|
if (opts.json || opts.jsonl) {
|
|
8096
8101
|
formatOutput(results, opts);
|
|
@@ -8118,7 +8123,7 @@ import {
|
|
|
8118
8123
|
} from "@eide/foir-proto-ts/hooks/v1/hooks_pb";
|
|
8119
8124
|
function registerHooksCommands(program2, globalOpts) {
|
|
8120
8125
|
const hooks = program2.command("hooks").description("Manage lifecycle hooks (event-driven webhooks)");
|
|
8121
|
-
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(
|
|
8122
8127
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8123
8128
|
const opts = globalOpts();
|
|
8124
8129
|
const client = await createPlatformClient(opts);
|
|
@@ -8128,8 +8133,8 @@ function registerHooksCommands(program2, globalOpts) {
|
|
|
8128
8133
|
const resp = await client.hooks.listHooks({
|
|
8129
8134
|
event: cmdOpts.event,
|
|
8130
8135
|
isActive,
|
|
8131
|
-
|
|
8132
|
-
|
|
8136
|
+
first: cmdOpts.first ? parseInt(String(cmdOpts.first), 10) : void 0,
|
|
8137
|
+
after: cmdOpts.after
|
|
8133
8138
|
});
|
|
8134
8139
|
formatListProto(HookSchema, resp.hooks ?? [], opts, {
|
|
8135
8140
|
columns: [
|
|
@@ -8243,7 +8248,7 @@ function registerHooksCommands(program2, globalOpts) {
|
|
|
8243
8248
|
}
|
|
8244
8249
|
)
|
|
8245
8250
|
);
|
|
8246
|
-
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(
|
|
8247
8252
|
withErrorHandler(
|
|
8248
8253
|
globalOpts,
|
|
8249
8254
|
async (hookId, cmdOpts) => {
|
|
@@ -8252,8 +8257,8 @@ function registerHooksCommands(program2, globalOpts) {
|
|
|
8252
8257
|
const resp = await client.hooks.listHookDeliveries({
|
|
8253
8258
|
hookId,
|
|
8254
8259
|
status: cmdOpts.status,
|
|
8255
|
-
|
|
8256
|
-
|
|
8260
|
+
first: cmdOpts.first ? parseInt(String(cmdOpts.first), 10) : void 0,
|
|
8261
|
+
after: cmdOpts.after
|
|
8257
8262
|
});
|
|
8258
8263
|
formatListProto(HookDeliverySchema, resp.deliveries ?? [], opts, {
|
|
8259
8264
|
columns: [
|
|
@@ -8326,14 +8331,14 @@ function parseScheduledAt(value) {
|
|
|
8326
8331
|
}
|
|
8327
8332
|
function registerRolloutsCommands(program2, globalOpts) {
|
|
8328
8333
|
const rollouts = program2.command("rollouts").description("Manage bulk scheduled publishing rollouts");
|
|
8329
|
-
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(
|
|
8330
8335
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8331
8336
|
const opts = globalOpts();
|
|
8332
8337
|
const client = await createPlatformClient(opts);
|
|
8333
8338
|
const { batches } = await client.publishBatches.listPublishBatches({
|
|
8334
8339
|
status: cmdOpts.status,
|
|
8335
|
-
|
|
8336
|
-
|
|
8340
|
+
first: cmdOpts.first ? parseInt(String(cmdOpts.first), 10) : void 0,
|
|
8341
|
+
after: cmdOpts.after
|
|
8337
8342
|
});
|
|
8338
8343
|
formatListProto(PublishBatchSchema, batches, opts, {
|
|
8339
8344
|
columns: [
|
|
@@ -8590,13 +8595,13 @@ function registerRolloutsCommands(program2, globalOpts) {
|
|
|
8590
8595
|
import { LocaleSchema } from "@eide/foir-proto-ts/settings/v1/settings_pb";
|
|
8591
8596
|
function registerLocalesCommands(program2, globalOpts) {
|
|
8592
8597
|
const locales = program2.command("locales").description("Manage locales");
|
|
8593
|
-
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(
|
|
8594
8599
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8595
8600
|
const opts = globalOpts();
|
|
8596
8601
|
const client = await createPlatformClient(opts);
|
|
8597
8602
|
const result = await client.settings.listLocales({
|
|
8598
8603
|
includeInactive: !!cmdOpts.includeInactive,
|
|
8599
|
-
|
|
8604
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
8600
8605
|
});
|
|
8601
8606
|
formatListProto(LocaleSchema, result.locales, opts, {
|
|
8602
8607
|
columns: [
|
|
@@ -8897,13 +8902,13 @@ function registerDesignTokensCommands(program2, globalOpts) {
|
|
|
8897
8902
|
import { VariantCatalogEntrySchema } from "@eide/foir-proto-ts/settings/v1/settings_pb";
|
|
8898
8903
|
function registerVariantCatalogCommands(program2, globalOpts) {
|
|
8899
8904
|
const catalog = program2.command("variant-catalog").description("Manage variant catalog entries (markets, devices, locales)");
|
|
8900
|
-
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(
|
|
8901
8906
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
8902
8907
|
const opts = globalOpts();
|
|
8903
8908
|
const client = await createPlatformClient(opts);
|
|
8904
8909
|
const result = await client.settings.listVariantCatalog({
|
|
8905
8910
|
isActive: cmdOpts.active ? true : void 0,
|
|
8906
|
-
|
|
8911
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
8907
8912
|
});
|
|
8908
8913
|
formatListProto(VariantCatalogEntrySchema, result.entries, opts, {
|
|
8909
8914
|
columns: [
|
|
@@ -8933,7 +8938,7 @@ function registerVariantCatalogCommands(program2, globalOpts) {
|
|
|
8933
8938
|
if (isUUID(idOrKey)) {
|
|
8934
8939
|
result = await client.settings.getVariantCatalogEntry(idOrKey);
|
|
8935
8940
|
} else {
|
|
8936
|
-
const list = await client.settings.listVariantCatalog({
|
|
8941
|
+
const list = await client.settings.listVariantCatalog({ first: 200 });
|
|
8937
8942
|
result = list.entries.find(
|
|
8938
8943
|
(e) => e.key === idOrKey
|
|
8939
8944
|
) ?? null;
|
|
@@ -9003,7 +9008,7 @@ import {
|
|
|
9003
9008
|
} from "@eide/foir-proto-ts/storage/v1/storage_pb";
|
|
9004
9009
|
function registerFilesCommands(program2, globalOpts) {
|
|
9005
9010
|
const files = program2.command("files").description("Manage files (for upload, use `foir media upload`)");
|
|
9006
|
-
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(
|
|
9007
9012
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
9008
9013
|
const opts = globalOpts();
|
|
9009
9014
|
const client = await createPlatformClient(opts);
|
|
@@ -9011,8 +9016,8 @@ function registerFilesCommands(program2, globalOpts) {
|
|
|
9011
9016
|
folder: cmdOpts.folder,
|
|
9012
9017
|
mimeType: cmdOpts.mimeType,
|
|
9013
9018
|
search: cmdOpts.search,
|
|
9014
|
-
|
|
9015
|
-
|
|
9019
|
+
first: parseInt(cmdOpts.first ?? "50", 10),
|
|
9020
|
+
after: cmdOpts.after
|
|
9016
9021
|
});
|
|
9017
9022
|
formatListProto(FileSchema2, data.items, opts, {
|
|
9018
9023
|
columns: [
|
|
@@ -9125,14 +9130,14 @@ function formatBytes(bytes) {
|
|
|
9125
9130
|
import { NoteSchema } from "@eide/foir-proto-ts/settings/v1/settings_pb";
|
|
9126
9131
|
function registerNotesCommands(program2, globalOpts) {
|
|
9127
9132
|
const notes = program2.command("notes").description("Manage notes and comments");
|
|
9128
|
-
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(
|
|
9129
9134
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
9130
9135
|
const opts = globalOpts();
|
|
9131
9136
|
const client = await createPlatformClient(opts);
|
|
9132
9137
|
const data = await client.settings.listNotes({
|
|
9133
9138
|
entityType: cmdOpts.entityType,
|
|
9134
9139
|
entityId: cmdOpts.entityId,
|
|
9135
|
-
|
|
9140
|
+
first: parseInt(String(cmdOpts.first ?? "20"), 10)
|
|
9136
9141
|
});
|
|
9137
9142
|
formatListProto(NoteSchema, data.notes, opts, {
|
|
9138
9143
|
columns: [
|
|
@@ -9224,13 +9229,13 @@ function registerNotesCommands(program2, globalOpts) {
|
|
|
9224
9229
|
import { NotificationSchema } from "@eide/foir-proto-ts/notifications/v1/notifications_pb";
|
|
9225
9230
|
function registerNotificationsCommands(program2, globalOpts) {
|
|
9226
9231
|
const notifications = program2.command("notifications").description("Manage notifications");
|
|
9227
|
-
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(
|
|
9228
9233
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
9229
9234
|
const opts = globalOpts();
|
|
9230
9235
|
const client = await createPlatformClient(opts);
|
|
9231
9236
|
const data = await client.notifications.listNotifications({
|
|
9232
9237
|
unreadOnly: !!cmdOpts.unread,
|
|
9233
|
-
|
|
9238
|
+
first: parseInt(String(cmdOpts.first ?? "20"), 10)
|
|
9234
9239
|
});
|
|
9235
9240
|
if (!(opts.json || opts.jsonl || opts.quiet)) {
|
|
9236
9241
|
console.log(`Unread: ${data.unreadCount}
|
|
@@ -9288,14 +9293,14 @@ function registerNotificationsCommands(program2, globalOpts) {
|
|
|
9288
9293
|
import { ConfigSchema } from "@eide/foir-proto-ts/configs/v1/configs_pb";
|
|
9289
9294
|
function registerConfigsCommands(program2, globalOpts) {
|
|
9290
9295
|
const configs = program2.command("configs").description("Manage configs (apps, webhooks)");
|
|
9291
|
-
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(
|
|
9292
9297
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
9293
9298
|
const opts = globalOpts();
|
|
9294
9299
|
const client = await createPlatformClient(opts);
|
|
9295
9300
|
const data = await client.configs.listConfigs({
|
|
9296
9301
|
configType: cmdOpts.type,
|
|
9297
9302
|
enabled: cmdOpts.enabled ? true : void 0,
|
|
9298
|
-
|
|
9303
|
+
first: parseInt(String(cmdOpts.first ?? "50"), 10)
|
|
9299
9304
|
});
|
|
9300
9305
|
formatListProto(ConfigSchema, data.configs, opts, {
|
|
9301
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",
|