primitive-admin 1.1.0-alpha.84 → 1.1.0-alpha.86
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/README.md +77 -1
- package/assets/skill/skills/primitive-platform/SKILL.md +8 -0
- package/dist/src/commands/admins.js +29 -32
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/analytics.js +15 -2
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps.js +12 -5
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/blob-buckets.js +2 -1
- package/dist/src/commands/blob-buckets.js.map +1 -1
- package/dist/src/commands/catalog.js +26 -10
- package/dist/src/commands/catalog.js.map +1 -1
- package/dist/src/commands/collection-type-configs.js +2 -1
- package/dist/src/commands/collection-type-configs.js.map +1 -1
- package/dist/src/commands/collections.js +675 -19
- package/dist/src/commands/collections.js.map +1 -1
- package/dist/src/commands/connections.js +8 -9
- package/dist/src/commands/connections.js.map +1 -1
- package/dist/src/commands/cron-triggers.js +2 -1
- package/dist/src/commands/cron-triggers.js.map +1 -1
- package/dist/src/commands/database-type-configs.js +4 -3
- package/dist/src/commands/database-type-configs.js.map +1 -1
- package/dist/src/commands/databases.js +27 -10
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.d.ts +20 -0
- package/dist/src/commands/documents.js +236 -28
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.js +2 -1
- package/dist/src/commands/email-templates.js.map +1 -1
- package/dist/src/commands/env.js +11 -1
- package/dist/src/commands/env.js.map +1 -1
- package/dist/src/commands/feature-flags.js +2 -1
- package/dist/src/commands/feature-flags.js.map +1 -1
- package/dist/src/commands/functions.js +58 -6
- package/dist/src/commands/functions.js.map +1 -1
- package/dist/src/commands/group-type-configs.js +2 -1
- package/dist/src/commands/group-type-configs.js.map +1 -1
- package/dist/src/commands/groups.js +29 -8
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/guides.js +17 -11
- package/dist/src/commands/guides.js.map +1 -1
- package/dist/src/commands/integrations.js +30 -9
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/locks.js +2 -1
- package/dist/src/commands/locks.js.map +1 -1
- package/dist/src/commands/metadata-category-configs.js +2 -1
- package/dist/src/commands/metadata-category-configs.js.map +1 -1
- package/dist/src/commands/metadata.js +8 -1
- package/dist/src/commands/metadata.js.map +1 -1
- package/dist/src/commands/prompts.js +28 -11
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rule-sets.js +2 -1
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/scripts.js +15 -6
- package/dist/src/commands/scripts.js.map +1 -1
- package/dist/src/commands/secrets.js +2 -1
- package/dist/src/commands/secrets.js.map +1 -1
- package/dist/src/commands/sessions.js +10 -9
- package/dist/src/commands/sessions.js.map +1 -1
- package/dist/src/commands/sync.d.ts +125 -29
- package/dist/src/commands/sync.js +865 -88
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.js +2 -1
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/users.js +19 -10
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/vars.js +2 -1
- package/dist/src/commands/vars.js.map +1 -1
- package/dist/src/commands/waitlist.js +2 -1
- package/dist/src/commands/waitlist.js.map +1 -1
- package/dist/src/commands/webhooks.js +17 -10
- package/dist/src/commands/webhooks.js.map +1 -1
- package/dist/src/commands/workflows.js +36 -18
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/api-client.d.ts +176 -8
- package/dist/src/lib/api-client.js +205 -68
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/collection-export.d.ts +184 -0
- package/dist/src/lib/collection-export.js +252 -0
- package/dist/src/lib/collection-export.js.map +1 -0
- package/dist/src/lib/config-object-descriptor.js +44 -8
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config-payload.d.ts +8 -1
- package/dist/src/lib/config-payload.js +49 -4
- package/dist/src/lib/config-payload.js.map +1 -1
- package/dist/src/lib/config-surface.d.ts +2 -1
- package/dist/src/lib/config-surface.js +54 -3
- package/dist/src/lib/config-surface.js.map +1 -1
- package/dist/src/lib/deprecation.d.ts +22 -0
- package/dist/src/lib/deprecation.js +43 -0
- package/dist/src/lib/deprecation.js.map +1 -0
- package/dist/src/lib/function-db-types.d.ts +14 -3
- package/dist/src/lib/function-db-types.js +55 -11
- package/dist/src/lib/function-db-types.js.map +1 -1
- package/dist/src/lib/function-trigger-listing.d.ts +27 -0
- package/dist/src/lib/function-trigger-listing.js +70 -0
- package/dist/src/lib/function-trigger-listing.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +715 -4
- package/dist/src/lib/generated-config-surfaces.js +2424 -226
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/list-options.d.ts +68 -0
- package/dist/src/lib/list-options.js +89 -0
- package/dist/src/lib/list-options.js.map +1 -0
- package/dist/src/lib/log-inspection.d.ts +34 -1
- package/dist/src/lib/log-inspection.js +28 -0
- package/dist/src/lib/log-inspection.js.map +1 -1
- package/dist/src/lib/paginate.d.ts +15 -0
- package/dist/src/lib/paginate.js +17 -0
- package/dist/src/lib/paginate.js.map +1 -1
- package/dist/src/lib/prompt-cost-format.d.ts +11 -0
- package/dist/src/lib/prompt-cost-format.js +41 -0
- package/dist/src/lib/prompt-cost-format.js.map +1 -0
- package/dist/src/lib/prompt-schema-codegen.d.ts +53 -0
- package/dist/src/lib/prompt-schema-codegen.js +253 -3
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/swift-codegen/agentGenerator.d.ts +42 -0
- package/dist/src/lib/swift-codegen/agentGenerator.js +118 -0
- package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/banners.d.ts +6 -0
- package/dist/src/lib/swift-codegen/banners.js +6 -0
- package/dist/src/lib/swift-codegen/banners.js.map +1 -1
- package/dist/src/lib/swift-codegen/dbGenerator.js +11 -3
- package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/functionGenerator.d.ts +7 -0
- package/dist/src/lib/swift-codegen/functionGenerator.js +41 -3
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/generator.js +8 -2
- package/dist/src/lib/swift-codegen/generator.js.map +1 -1
- package/package.json +2 -2
|
@@ -432,6 +432,15 @@ interface PromptAnalyticsSummary {
|
|
|
432
432
|
medianDurationMs: number;
|
|
433
433
|
p95DurationMs: number;
|
|
434
434
|
totalTokens: number;
|
|
435
|
+
/**
|
|
436
|
+
* #3787 — how many of the window's executions reported a cost, and what they
|
|
437
|
+
* spent. `totalCost` / `avgCost` are `null` (never `0`) when none did, and
|
|
438
|
+
* `executionsWithCost < executions` means the figures cover part of the
|
|
439
|
+
* window.
|
|
440
|
+
*/
|
|
441
|
+
executionsWithCost?: number;
|
|
442
|
+
totalCost?: number | null;
|
|
443
|
+
avgCost?: number | null;
|
|
435
444
|
}
|
|
436
445
|
interface TopPromptsResponse {
|
|
437
446
|
windowDays: number;
|
|
@@ -518,6 +527,34 @@ export declare class ApiClient {
|
|
|
518
527
|
put<T = any>(path: string, body?: any): Promise<T>;
|
|
519
528
|
patch<T = any>(path: string, body?: any): Promise<T>;
|
|
520
529
|
delete<T = any>(path: string): Promise<T>;
|
|
530
|
+
/**
|
|
531
|
+
* One page of the apps the caller can reach.
|
|
532
|
+
*
|
|
533
|
+
* The route paginates cursor-style (default pageSize=25, cap=100). This
|
|
534
|
+
* method used to walk the whole chain so `primitive apps list` could not
|
|
535
|
+
* truncate at 25 (#436); since #3646 the page boundary belongs to the
|
|
536
|
+
* caller instead — `apps list` declares `--limit`/`--cursor` and prints the
|
|
537
|
+
* `hasMore`/`nextCursor` the server reported, and the aggregate readers that
|
|
538
|
+
* really do mean "every app" call `listAllApps()`.
|
|
539
|
+
*/
|
|
540
|
+
listAppsPage(params?: {
|
|
541
|
+
limit?: number;
|
|
542
|
+
cursor?: string;
|
|
543
|
+
}): Promise<{
|
|
544
|
+
items: Array<{
|
|
545
|
+
id: string;
|
|
546
|
+
name: string;
|
|
547
|
+
role?: string;
|
|
548
|
+
}>;
|
|
549
|
+
hasMore?: boolean;
|
|
550
|
+
nextCursor?: string | null;
|
|
551
|
+
}>;
|
|
552
|
+
/**
|
|
553
|
+
* Every app the caller can reach, cursor chain walked (#436).
|
|
554
|
+
*
|
|
555
|
+
* For readers that genuinely need the whole set — an app picker, a sweep —
|
|
556
|
+
* rather than the one page `apps list` prints.
|
|
557
|
+
*/
|
|
521
558
|
listApps(): Promise<{
|
|
522
559
|
apps: Array<{
|
|
523
560
|
id: string;
|
|
@@ -568,8 +605,13 @@ export declare class ApiClient {
|
|
|
568
605
|
cursor?: string;
|
|
569
606
|
}): Promise<{
|
|
570
607
|
items: any[];
|
|
608
|
+
hasMore?: boolean;
|
|
571
609
|
nextCursor?: string | null;
|
|
572
610
|
}>;
|
|
611
|
+
/**
|
|
612
|
+
* @deprecated Use {@link setUserAvailability} with `"disable"`
|
|
613
|
+
* (`PUT /admin/api/apps/:appId/users/:userId/disable`) instead (#518).
|
|
614
|
+
*/
|
|
573
615
|
removeUser(appId: string, userId: string): Promise<void>;
|
|
574
616
|
/**
|
|
575
617
|
* #2803 — take a user's access away, or give it back. Distinct from
|
|
@@ -642,6 +684,8 @@ export declare class ApiClient {
|
|
|
642
684
|
limit?: number;
|
|
643
685
|
cursor?: string;
|
|
644
686
|
}): Promise<{
|
|
687
|
+
items: any[];
|
|
688
|
+
/** @deprecated Read `items`; `grants` is a legacy alias of it (#1982). */
|
|
645
689
|
grants: any[];
|
|
646
690
|
nextCursor?: string | null;
|
|
647
691
|
hasMore?: boolean;
|
|
@@ -653,6 +697,7 @@ export declare class ApiClient {
|
|
|
653
697
|
limit?: number;
|
|
654
698
|
}): Promise<{
|
|
655
699
|
items: any[];
|
|
700
|
+
hasMore?: boolean;
|
|
656
701
|
nextCursor?: string | null;
|
|
657
702
|
}>;
|
|
658
703
|
/** Integration detail (#2631: `accessRule` is on the detail, not the list summary). */
|
|
@@ -682,7 +727,9 @@ export declare class ApiClient {
|
|
|
682
727
|
status?: string;
|
|
683
728
|
from?: string;
|
|
684
729
|
to?: string;
|
|
685
|
-
source?: "user" | "admin" | "test" | "workflow";
|
|
730
|
+
source?: "user" | "admin" | "test" | "workflow" | "function";
|
|
731
|
+
/** #3691 — only the calls this run made, workflow run or function run. */
|
|
732
|
+
runId?: string;
|
|
686
733
|
}): Promise<any[]>;
|
|
687
734
|
listWorkflowRunIntegrationLogs(appId: string, runId: string, params?: {
|
|
688
735
|
limit?: number;
|
|
@@ -716,6 +763,7 @@ export declare class ApiClient {
|
|
|
716
763
|
limit?: number;
|
|
717
764
|
}): Promise<{
|
|
718
765
|
items: any[];
|
|
766
|
+
hasMore?: boolean;
|
|
719
767
|
nextCursor?: string | null;
|
|
720
768
|
}>;
|
|
721
769
|
getWebhook(appId: string, webhookId: string): Promise<any>;
|
|
@@ -939,6 +987,7 @@ export declare class ApiClient {
|
|
|
939
987
|
cursor?: string;
|
|
940
988
|
}): Promise<{
|
|
941
989
|
items: unknown[];
|
|
990
|
+
hasMore?: boolean;
|
|
942
991
|
nextCursor?: string | null;
|
|
943
992
|
}>;
|
|
944
993
|
listSessions(appId: string, userId: string, params?: {
|
|
@@ -946,6 +995,7 @@ export declare class ApiClient {
|
|
|
946
995
|
cursor?: string;
|
|
947
996
|
}): Promise<{
|
|
948
997
|
items: unknown[];
|
|
998
|
+
hasMore?: boolean;
|
|
949
999
|
nextCursor?: string | null;
|
|
950
1000
|
}>;
|
|
951
1001
|
testWebhook(appId: string, webhookId: string, payload?: any): Promise<any>;
|
|
@@ -1045,6 +1095,7 @@ export declare class ApiClient {
|
|
|
1045
1095
|
cursor?: string;
|
|
1046
1096
|
}): Promise<{
|
|
1047
1097
|
items: any[];
|
|
1098
|
+
hasMore?: boolean;
|
|
1048
1099
|
nextCursor?: string | null;
|
|
1049
1100
|
}>;
|
|
1050
1101
|
getPrompt(appId: string, promptId: string): Promise<any>;
|
|
@@ -1144,6 +1195,7 @@ export declare class ApiClient {
|
|
|
1144
1195
|
cursor?: string;
|
|
1145
1196
|
}): Promise<{
|
|
1146
1197
|
items: any[];
|
|
1198
|
+
hasMore?: boolean;
|
|
1147
1199
|
nextCursor?: string;
|
|
1148
1200
|
}>;
|
|
1149
1201
|
getTestCase(appId: string, blockType: "prompt" | "integration" | "workflow" | "script", blockId: string, testCaseId: string): Promise<any>;
|
|
@@ -1222,6 +1274,7 @@ export declare class ApiClient {
|
|
|
1222
1274
|
cursor?: string;
|
|
1223
1275
|
}): Promise<{
|
|
1224
1276
|
items: any[];
|
|
1277
|
+
hasMore?: boolean;
|
|
1225
1278
|
nextCursor?: string | null;
|
|
1226
1279
|
}>;
|
|
1227
1280
|
getWorkflow(appId: string, workflowId: string): Promise<any>;
|
|
@@ -1417,7 +1470,15 @@ export declare class ApiClient {
|
|
|
1417
1470
|
listAllAdmins(params?: {
|
|
1418
1471
|
limit?: number;
|
|
1419
1472
|
cursor?: string;
|
|
1420
|
-
}): Promise<
|
|
1473
|
+
}): Promise<{
|
|
1474
|
+
items: any[];
|
|
1475
|
+
/** @deprecated Read `items`; `admins` is a legacy alias of it (#1982). */
|
|
1476
|
+
admins: any[];
|
|
1477
|
+
hasMore?: boolean;
|
|
1478
|
+
nextCursor: string | null;
|
|
1479
|
+
/** @deprecated Read `nextCursor`; `cursor` is a legacy alias of it (#1316, #1982). */
|
|
1480
|
+
cursor: string | null;
|
|
1481
|
+
}>;
|
|
1421
1482
|
searchAdminByEmail(email: string): Promise<any>;
|
|
1422
1483
|
getAdminApps(email: string): Promise<any>;
|
|
1423
1484
|
updateAdminSettings(adminId: string, data: {
|
|
@@ -1566,9 +1627,22 @@ export declare class ApiClient {
|
|
|
1566
1627
|
* `options.owner` narrows the result to the databases that user created; the
|
|
1567
1628
|
* server resolves it through the `databasesByCreator` index (#1965).
|
|
1568
1629
|
*/
|
|
1630
|
+
/**
|
|
1631
|
+
* One page of an app's databases (#3646).
|
|
1632
|
+
*
|
|
1633
|
+
* `databases list` used to walk the chain here. The route pages, so the page
|
|
1634
|
+
* boundary belongs to the caller: the verb declares `--limit`/`--cursor` and
|
|
1635
|
+
* prints what came back.
|
|
1636
|
+
*/
|
|
1569
1637
|
listDatabases(appId: string, options?: {
|
|
1570
1638
|
owner?: string;
|
|
1571
|
-
|
|
1639
|
+
limit?: number;
|
|
1640
|
+
cursor?: string;
|
|
1641
|
+
}): Promise<{
|
|
1642
|
+
items: any[];
|
|
1643
|
+
hasMore?: boolean;
|
|
1644
|
+
nextCursor?: string | null;
|
|
1645
|
+
}>;
|
|
1572
1646
|
createDatabase(appId: string, data: {
|
|
1573
1647
|
title: string;
|
|
1574
1648
|
databaseType?: string;
|
|
@@ -1583,13 +1657,29 @@ export declare class ApiClient {
|
|
|
1583
1657
|
*
|
|
1584
1658
|
* The HTTP path stays `/metadata` because the wire field name is still
|
|
1585
1659
|
* `metadata`; only the client/CLI-facing helper names were reframed.
|
|
1660
|
+
*
|
|
1661
|
+
* @deprecated Use resource metadata categories instead (`primitive metadata
|
|
1662
|
+
* get database <id> <category>`, #1420, #1815).
|
|
1586
1663
|
*/
|
|
1587
1664
|
getDatabaseCelContext(appId: string, databaseId: string): Promise<any>;
|
|
1588
|
-
/**
|
|
1665
|
+
/**
|
|
1666
|
+
* Update a database's CEL context dict (merge with existing).
|
|
1667
|
+
*
|
|
1668
|
+
* @deprecated Use resource metadata categories instead (`primitive metadata
|
|
1669
|
+
* set database <id> <category>`, #1420, #1815).
|
|
1670
|
+
*/
|
|
1589
1671
|
updateDatabaseCelContext(appId: string, databaseId: string, celContext: Record<string, any>): Promise<any>;
|
|
1590
|
-
/**
|
|
1672
|
+
/**
|
|
1673
|
+
* @deprecated Database CEL context is deprecated; use resource metadata
|
|
1674
|
+
* categories instead (`primitive metadata get database <id> <category>`,
|
|
1675
|
+
* #1420, #1815).
|
|
1676
|
+
*/
|
|
1591
1677
|
getDatabaseMetadata(appId: string, databaseId: string): Promise<any>;
|
|
1592
|
-
/**
|
|
1678
|
+
/**
|
|
1679
|
+
* @deprecated Database CEL context is deprecated; use resource metadata
|
|
1680
|
+
* categories instead (`primitive metadata set database <id> <category>`,
|
|
1681
|
+
* #1420, #1815).
|
|
1682
|
+
*/
|
|
1593
1683
|
updateDatabaseMetadata(appId: string, databaseId: string, metadata: Record<string, any>): Promise<any>;
|
|
1594
1684
|
listDatabasePermissions(appId: string, databaseId: string): Promise<any[]>;
|
|
1595
1685
|
addDatabaseManager(appId: string, databaseId: string, userId: string): Promise<any>;
|
|
@@ -1723,6 +1813,10 @@ export declare class ApiClient {
|
|
|
1723
1813
|
databaseType: string;
|
|
1724
1814
|
ruleSetId?: string | null;
|
|
1725
1815
|
triggers?: Record<string, any> | null;
|
|
1816
|
+
/**
|
|
1817
|
+
* @deprecated The TOML `type.celContextAccess` expression. Use resource
|
|
1818
|
+
* metadata categories instead (#1420, #1815).
|
|
1819
|
+
*/
|
|
1726
1820
|
metadataAccess?: string | null;
|
|
1727
1821
|
defaultAccess?: string | null;
|
|
1728
1822
|
autoPopulatedFields?: Record<string, any> | null;
|
|
@@ -1735,6 +1829,10 @@ export declare class ApiClient {
|
|
|
1735
1829
|
updateDatabaseTypeConfig(appId: string, databaseType: string, data: {
|
|
1736
1830
|
ruleSetId?: string | null;
|
|
1737
1831
|
triggers?: Record<string, any> | null;
|
|
1832
|
+
/**
|
|
1833
|
+
* @deprecated The TOML `type.celContextAccess` expression. Use resource
|
|
1834
|
+
* metadata categories instead (#1420, #1815).
|
|
1835
|
+
*/
|
|
1738
1836
|
metadataAccess?: string | null;
|
|
1739
1837
|
defaultAccess?: string | null;
|
|
1740
1838
|
autoPopulatedFields?: Record<string, any> | null;
|
|
@@ -1823,8 +1921,18 @@ export declare class ApiClient {
|
|
|
1823
1921
|
description?: string;
|
|
1824
1922
|
}): Promise<any>;
|
|
1825
1923
|
deleteGroup(appId: string, groupType: string, groupId: string): Promise<any>;
|
|
1924
|
+
/**
|
|
1925
|
+
* One page of a group's members.
|
|
1926
|
+
*
|
|
1927
|
+
* The route paginates cursor-style (no default limit, cap 200) and reports
|
|
1928
|
+
* the boundary, so `groups members list` carries `--limit`/`--cursor` and
|
|
1929
|
+
* forwards them (#3646) rather than printing a first page that claims to be
|
|
1930
|
+
* the whole membership.
|
|
1931
|
+
*/
|
|
1826
1932
|
listGroupMembers(appId: string, groupType: string, groupId: string, options?: {
|
|
1827
1933
|
include?: "profiles";
|
|
1934
|
+
limit?: number;
|
|
1935
|
+
cursor?: string;
|
|
1828
1936
|
}): Promise<{
|
|
1829
1937
|
items: any[];
|
|
1830
1938
|
nextCursor?: string;
|
|
@@ -1850,6 +1958,7 @@ export declare class ApiClient {
|
|
|
1850
1958
|
cursor?: string;
|
|
1851
1959
|
}): Promise<{
|
|
1852
1960
|
items: any[];
|
|
1961
|
+
hasMore?: boolean;
|
|
1853
1962
|
nextCursor?: string | null;
|
|
1854
1963
|
}>;
|
|
1855
1964
|
listAllCollections(appId: string, params?: {
|
|
@@ -1857,11 +1966,19 @@ export declare class ApiClient {
|
|
|
1857
1966
|
cursor?: string;
|
|
1858
1967
|
}): Promise<{
|
|
1859
1968
|
items: any[];
|
|
1969
|
+
hasMore?: boolean;
|
|
1860
1970
|
nextCursor?: string | null;
|
|
1861
1971
|
}>;
|
|
1862
1972
|
createCollection(appId: string, data: {
|
|
1863
1973
|
name: string;
|
|
1864
1974
|
description?: string;
|
|
1975
|
+
/**
|
|
1976
|
+
* Which rule set governs the collection, and which context it belongs
|
|
1977
|
+
* to. Both are immutable after creation, so a migration has to send them
|
|
1978
|
+
* with the create or never (#3643).
|
|
1979
|
+
*/
|
|
1980
|
+
collectionType?: string;
|
|
1981
|
+
contextId?: string;
|
|
1865
1982
|
initialMetadata?: Record<string, Record<string, unknown>>;
|
|
1866
1983
|
/**
|
|
1867
1984
|
* The app user to create the collection FOR (#3641). Honored only for
|
|
@@ -1881,6 +1998,7 @@ export declare class ApiClient {
|
|
|
1881
1998
|
cursor?: string;
|
|
1882
1999
|
}): Promise<{
|
|
1883
2000
|
items: any[];
|
|
2001
|
+
hasMore?: boolean;
|
|
1884
2002
|
nextCursor?: string | null;
|
|
1885
2003
|
}>;
|
|
1886
2004
|
addCollectionDocument(appId: string, collectionId: string, data: {
|
|
@@ -2048,6 +2166,16 @@ export declare class ApiClient {
|
|
|
2048
2166
|
* describe`. Reuses the existing `GET documents/:id/schema` endpoint.
|
|
2049
2167
|
*/
|
|
2050
2168
|
getDocumentSchema(appId: string, documentId: string): Promise<any>;
|
|
2169
|
+
/**
|
|
2170
|
+
* The `documentFormat` a records call states, as a query string to APPEND to
|
|
2171
|
+
* a path (#3764).
|
|
2172
|
+
*
|
|
2173
|
+
* `post`, `patch` and `delete` take no params object — only `get` does — so
|
|
2174
|
+
* for every verb but the reads the parameter rides the path. Empty when the
|
|
2175
|
+
* caller states nothing, so an unparameterised call's URL is byte-identical
|
|
2176
|
+
* to what it was.
|
|
2177
|
+
*/
|
|
2178
|
+
private documentFormatQuery;
|
|
2051
2179
|
/**
|
|
2052
2180
|
* Query records in a document model (issue #1964 Phase 3). Reuses the
|
|
2053
2181
|
* server-side `GET documents/:id/records/:model` endpoint, which runs
|
|
@@ -2062,12 +2190,15 @@ export declare class ApiClient {
|
|
|
2062
2190
|
filter?: Record<string, any>;
|
|
2063
2191
|
limit?: number;
|
|
2064
2192
|
cursor?: string;
|
|
2193
|
+
/** #3764 — the format the caller believes this document has. */
|
|
2194
|
+
documentFormat?: 1 | 2;
|
|
2065
2195
|
}): Promise<ListEnvelope>;
|
|
2066
2196
|
/**
|
|
2067
2197
|
* Count records in a document model (issue #1964 Phase 3). Returns `{ count }`.
|
|
2068
2198
|
*/
|
|
2069
2199
|
countDocumentRecords(appId: string, documentId: string, modelName: string, queryOptions?: {
|
|
2070
2200
|
filter?: Record<string, any>;
|
|
2201
|
+
documentFormat?: 1 | 2;
|
|
2071
2202
|
}): Promise<{
|
|
2072
2203
|
count: number;
|
|
2073
2204
|
}>;
|
|
@@ -2088,6 +2219,8 @@ export declare class ApiClient {
|
|
|
2088
2219
|
}[];
|
|
2089
2220
|
groupBy?: string[];
|
|
2090
2221
|
filter?: Record<string, any>;
|
|
2222
|
+
}, extra?: {
|
|
2223
|
+
documentFormat?: 1 | 2;
|
|
2091
2224
|
}): Promise<{
|
|
2092
2225
|
result: unknown;
|
|
2093
2226
|
}>;
|
|
@@ -2171,6 +2304,8 @@ export declare class ApiClient {
|
|
|
2171
2304
|
id: string;
|
|
2172
2305
|
data: Record<string, unknown>;
|
|
2173
2306
|
options?: Record<string, unknown>;
|
|
2307
|
+
}, extra?: {
|
|
2308
|
+
documentFormat?: 1 | 2;
|
|
2174
2309
|
}): Promise<{
|
|
2175
2310
|
record: unknown;
|
|
2176
2311
|
}>;
|
|
@@ -2182,6 +2317,8 @@ export declare class ApiClient {
|
|
|
2182
2317
|
patchDocumentRecord(appId: string, documentId: string, modelName: string, recordId: string, body: {
|
|
2183
2318
|
data: Record<string, unknown>;
|
|
2184
2319
|
options?: Record<string, unknown>;
|
|
2320
|
+
}, extra?: {
|
|
2321
|
+
documentFormat?: 1 | 2;
|
|
2185
2322
|
}): Promise<{
|
|
2186
2323
|
record: unknown;
|
|
2187
2324
|
}>;
|
|
@@ -2190,7 +2327,9 @@ export declare class ApiClient {
|
|
|
2190
2327
|
* `DELETE documents/:id/records/:model/:recordId`. A missing record id is
|
|
2191
2328
|
* a silent no-op per the facade contract. Returns `{ deleted: true }`.
|
|
2192
2329
|
*/
|
|
2193
|
-
deleteDocumentRecord(appId: string, documentId: string, modelName: string, recordId: string
|
|
2330
|
+
deleteDocumentRecord(appId: string, documentId: string, modelName: string, recordId: string, extra?: {
|
|
2331
|
+
documentFormat?: 1 | 2;
|
|
2332
|
+
}): Promise<{
|
|
2194
2333
|
deleted: boolean;
|
|
2195
2334
|
}>;
|
|
2196
2335
|
/**
|
|
@@ -2199,7 +2338,9 @@ export declare class ApiClient {
|
|
|
2199
2338
|
* a validation failure commits nothing. Returns the facade's
|
|
2200
2339
|
* `{ applied, added, updated, deleted }`.
|
|
2201
2340
|
*/
|
|
2202
|
-
bulkDocumentRecords(appId: string, documentId: string, operations: Array<Record<string, unknown
|
|
2341
|
+
bulkDocumentRecords(appId: string, documentId: string, operations: Array<Record<string, unknown>>, extra?: {
|
|
2342
|
+
documentFormat?: 1 | 2;
|
|
2343
|
+
}): Promise<{
|
|
2203
2344
|
applied: number;
|
|
2204
2345
|
added: Array<{
|
|
2205
2346
|
model: string;
|
|
@@ -2236,6 +2377,14 @@ export declare class ApiClient {
|
|
|
2236
2377
|
userId?: string;
|
|
2237
2378
|
email?: string;
|
|
2238
2379
|
}): Promise<any>;
|
|
2380
|
+
/**
|
|
2381
|
+
* Resolve a NAMED user's effective access to a document (#3658).
|
|
2382
|
+
*
|
|
2383
|
+
* The admin token is admitted to name a subject (it can already read every
|
|
2384
|
+
* grant, group permission and membership the answer derives from), which is
|
|
2385
|
+
* what makes this an operator read rather than a per-user one.
|
|
2386
|
+
*/
|
|
2387
|
+
validateDocumentAccessForUser(appId: string, documentId: string, userId: string): Promise<any>;
|
|
2239
2388
|
getDocumentLinkAccess(appId: string, documentId: string): Promise<any>;
|
|
2240
2389
|
setDocumentLinkAccess(appId: string, documentId: string, level: "reader" | "read-write"): Promise<any>;
|
|
2241
2390
|
clearDocumentLinkAccess(appId: string, documentId: string): Promise<any>;
|
|
@@ -2287,6 +2436,25 @@ export declare class ApiClient {
|
|
|
2287
2436
|
* `{ documents }` array and no cursor: that reads as a single page.
|
|
2288
2437
|
*/
|
|
2289
2438
|
listAdminDocuments(appId: string, userId: string): Promise<any[]>;
|
|
2439
|
+
/**
|
|
2440
|
+
* One page of the admin inventory of a user's documents (#3646).
|
|
2441
|
+
*
|
|
2442
|
+
* `documents list --user-id` prints exactly this — the page the caller's
|
|
2443
|
+
* `--limit`/`--cursor` asked for, with the server's own page boundary
|
|
2444
|
+
* beside it. `documents export-all`, which really does mean every document,
|
|
2445
|
+
* keeps the walking `listAdminDocuments()` above.
|
|
2446
|
+
*
|
|
2447
|
+
* Tolerant of a pre-contract server, which answers with a bare
|
|
2448
|
+
* `{ documents }` array and no cursor: that reads as a single page.
|
|
2449
|
+
*/
|
|
2450
|
+
listAdminDocumentsPage(appId: string, userId: string, options?: {
|
|
2451
|
+
limit?: number;
|
|
2452
|
+
cursor?: string;
|
|
2453
|
+
}): Promise<{
|
|
2454
|
+
items: any[];
|
|
2455
|
+
hasMore?: boolean;
|
|
2456
|
+
nextCursor?: string | null;
|
|
2457
|
+
}>;
|
|
2290
2458
|
/**
|
|
2291
2459
|
* The document `AppUser.rootDocId` points at, or null when the user has none
|
|
2292
2460
|
* yet (#3135). A user who is not a member of the app is a 404, which
|