primitive-admin 1.2.0-alpha.4 → 1.2.0-alpha.5

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.
Files changed (114) hide show
  1. package/assets/skill/skills/primitive-platform/SKILL.md +17 -0
  2. package/dist/src/commands/auth.js +7 -4
  3. package/dist/src/commands/auth.js.map +1 -1
  4. package/dist/src/commands/connections.js +11 -12
  5. package/dist/src/commands/connections.js.map +1 -1
  6. package/dist/src/commands/database-type-configs.js +2 -76
  7. package/dist/src/commands/database-type-configs.js.map +1 -1
  8. package/dist/src/commands/database-types.js +313 -13
  9. package/dist/src/commands/database-types.js.map +1 -1
  10. package/dist/src/commands/databases.d.ts +9 -0
  11. package/dist/src/commands/databases.js +67 -367
  12. package/dist/src/commands/databases.js.map +1 -1
  13. package/dist/src/commands/documents.d.ts +32 -2
  14. package/dist/src/commands/documents.js +281 -685
  15. package/dist/src/commands/documents.js.map +1 -1
  16. package/dist/src/commands/functions.js +2 -2
  17. package/dist/src/commands/functions.js.map +1 -1
  18. package/dist/src/commands/llm.js +6 -9
  19. package/dist/src/commands/llm.js.map +1 -1
  20. package/dist/src/commands/settings.d.ts +9 -12
  21. package/dist/src/commands/settings.js +79 -31
  22. package/dist/src/commands/settings.js.map +1 -1
  23. package/dist/src/commands/sync.d.ts +31 -81
  24. package/dist/src/commands/sync.js +228 -1113
  25. package/dist/src/commands/sync.js.map +1 -1
  26. package/dist/src/lib/api-client.d.ts +30 -199
  27. package/dist/src/lib/api-client.js +31 -297
  28. package/dist/src/lib/api-client.js.map +1 -1
  29. package/dist/src/lib/codegen-shared/generatedFiles.d.ts +6 -7
  30. package/dist/src/lib/codegen-shared/generatedFiles.js +2 -2
  31. package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -1
  32. package/dist/src/lib/codegen-shared/prettierStable.d.ts +1 -1
  33. package/dist/src/lib/codegen-shared/prettierStable.js +1 -1
  34. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +2 -2
  35. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +2 -2
  36. package/dist/src/lib/config-object-descriptor.js +1 -5
  37. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  38. package/dist/src/lib/config-surface.d.ts +2 -1
  39. package/dist/src/lib/config-surface.js +4 -1
  40. package/dist/src/lib/config-surface.js.map +1 -1
  41. package/dist/src/lib/connections-list.d.ts +10 -0
  42. package/dist/src/lib/connections-list.js +18 -0
  43. package/dist/src/lib/connections-list.js.map +1 -0
  44. package/dist/src/lib/csv.d.ts +8 -9
  45. package/dist/src/lib/csv.js +3 -4
  46. package/dist/src/lib/csv.js.map +1 -1
  47. package/dist/src/lib/db-codegen/dbNaming.d.ts +2 -1
  48. package/dist/src/lib/db-codegen/dbNaming.js +2 -1
  49. package/dist/src/lib/db-codegen/dbNaming.js.map +1 -1
  50. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +2 -2
  51. package/dist/src/lib/db-codegen/dbTsTypes.js +2 -2
  52. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +59 -1
  53. package/dist/src/lib/db-codegen/dbTypeIR.js +12 -1
  54. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
  55. package/dist/src/lib/document-export-record-log.d.ts +57 -0
  56. package/dist/src/lib/document-export-record-log.js +215 -0
  57. package/dist/src/lib/document-export-record-log.js.map +1 -0
  58. package/dist/src/lib/document-ingest-artifact.d.ts +13 -2
  59. package/dist/src/lib/document-ingest-artifact.js +7 -3
  60. package/dist/src/lib/document-ingest-artifact.js.map +1 -1
  61. package/dist/src/lib/document-ingest-rows.d.ts +16 -0
  62. package/dist/src/lib/document-ingest-rows.js +17 -0
  63. package/dist/src/lib/document-ingest-rows.js.map +1 -1
  64. package/dist/src/lib/document-ingest.d.ts +22 -0
  65. package/dist/src/lib/document-ingest.js +33 -0
  66. package/dist/src/lib/document-ingest.js.map +1 -1
  67. package/dist/src/lib/function-triggers.d.ts +3 -15
  68. package/dist/src/lib/function-triggers.js +10 -72
  69. package/dist/src/lib/function-triggers.js.map +1 -1
  70. package/dist/src/lib/generated-allowlist.js +0 -20
  71. package/dist/src/lib/generated-allowlist.js.map +1 -1
  72. package/dist/src/lib/generated-config-surfaces.d.ts +40 -2
  73. package/dist/src/lib/generated-config-surfaces.js +160 -94
  74. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  75. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  76. package/dist/src/lib/generated-sdk-types.js +1 -1
  77. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  78. package/dist/src/lib/login-scope-lines.d.ts +15 -0
  79. package/dist/src/lib/login-scope-lines.js +22 -0
  80. package/dist/src/lib/login-scope-lines.js.map +1 -0
  81. package/dist/src/lib/paginate.d.ts +0 -5
  82. package/dist/src/lib/paginate.js +0 -5
  83. package/dist/src/lib/paginate.js.map +1 -1
  84. package/dist/src/lib/refresh-admin-credentials.d.ts +7 -0
  85. package/dist/src/lib/refresh-admin-credentials.js +16 -4
  86. package/dist/src/lib/refresh-admin-credentials.js.map +1 -1
  87. package/dist/src/lib/root-import-decision.d.ts +15 -14
  88. package/dist/src/lib/root-import-decision.js +44 -51
  89. package/dist/src/lib/root-import-decision.js.map +1 -1
  90. package/dist/src/lib/snapshot-build-rows.d.ts +21 -0
  91. package/dist/src/lib/snapshot-build-rows.js +22 -0
  92. package/dist/src/lib/snapshot-build-rows.js.map +1 -1
  93. package/dist/src/lib/snapshot-build.js +8 -3
  94. package/dist/src/lib/snapshot-build.js.map +1 -1
  95. package/dist/src/lib/swift-codegen/banners.d.ts +34 -7
  96. package/dist/src/lib/swift-codegen/banners.js +37 -7
  97. package/dist/src/lib/swift-codegen/banners.js.map +1 -1
  98. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +3 -3
  99. package/dist/src/lib/swift-codegen/functionGenerator.js +22 -17
  100. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
  101. package/dist/src/lib/swift-codegen/generator.js +27 -27
  102. package/dist/src/lib/swift-codegen/generator.js.map +1 -1
  103. package/dist/src/lib/toml-database-config.d.ts +14 -75
  104. package/dist/src/lib/toml-database-config.js +14 -305
  105. package/dist/src/lib/toml-database-config.js.map +1 -1
  106. package/dist/src/lib/workflow-toml-validator.js +15 -1
  107. package/dist/src/lib/workflow-toml-validator.js.map +1 -1
  108. package/package.json +3 -5
  109. package/dist/src/lib/generated-workflow-model-fields.d.ts +0 -20
  110. package/dist/src/lib/generated-workflow-model-fields.js +0 -53
  111. package/dist/src/lib/generated-workflow-model-fields.js.map +0 -1
  112. package/dist/src/lib/workflow-field-descriptor.d.ts +0 -91
  113. package/dist/src/lib/workflow-field-descriptor.js +0 -153
  114. package/dist/src/lib/workflow-field-descriptor.js.map +0 -1
@@ -134,51 +134,11 @@ export interface ParsedErrorResponse {
134
134
  export declare function parseErrorResponse(response: {
135
135
  status: number;
136
136
  }, text: string, path?: string): ParsedErrorResponse;
137
- /**
138
- * Typed exception classes for the database-schema feature (issue #666).
139
- * Each maps 1:1 to a server `code` value emitted from the op-edit or
140
- * schema-edit gate. They all extend ApiError so existing catch-all paths
141
- * continue to work; specialized catch blocks can branch on `instanceof`.
142
- *
143
- * Per round-2 addendum A1, `details` is always preserved so callers can
144
- * extract structured offender lists (refs[], operations[], etc.).
145
- */
146
- export declare class SchemaRequiredError extends ApiError {
147
- constructor(message: string, details?: Record<string, any>);
148
- }
149
- export declare class OperationRefError extends ApiError {
150
- constructor(message: string, details?: Record<string, any>);
151
- get refs(): Array<{
152
- ref: string;
153
- location: string;
154
- }>;
155
- }
156
- export declare class SchemaBreaksOpsError extends ApiError {
157
- constructor(message: string, details?: Record<string, any>);
158
- get operations(): Array<{
159
- operation: string;
160
- refs: Array<{
161
- ref: string;
162
- location: string;
163
- }>;
164
- }>;
165
- }
166
- export declare class SchemaHasUncheckableOpsError extends ApiError {
167
- constructor(message: string, details?: Record<string, any>);
168
- get operations(): Array<{
169
- operation: string;
170
- locations: string[];
171
- }>;
172
- }
173
137
  export declare class TomlParseError extends ApiError {
174
138
  constructor(message: string, details?: Record<string, any>);
175
139
  get line(): number | undefined;
176
140
  get column(): number | undefined;
177
141
  }
178
- export declare class OpsExistError extends ApiError {
179
- constructor(message: string, details?: Record<string, any>);
180
- get opCount(): number;
181
- }
182
142
  interface EmailTemplateSummary {
183
143
  emailType: string;
184
144
  label: string;
@@ -515,35 +475,6 @@ export interface DatabaseBatchOperation {
515
475
  */
516
476
  condition?: Record<string, any>;
517
477
  }
518
- /**
519
- * Normalize a `databases operations execute` result to the CLI's one list
520
- * envelope — but only when the result is a Durable Object query page
521
- * (issue #2440).
522
- *
523
- * A registered operation is a list only sometimes. Of the shapes the server's
524
- * operation dispatch can return, exactly two carry a top-level `data` array: a
525
- * bare `query` and a `pipeline` whose `returnField` names a query step. A
526
- * `count` (`{ count }`), an `aggregate` (`{ result }`), a mutation
527
- * (`{ results }`), an `applyToQuery` (`{ matched, affected, failed, … }`) and a
528
- * `returnField: "all"` pipeline (`{ steps: { … } }`) do not, so blanket
529
- * normalization would corrupt them. This helper therefore tests the shape
530
- * first and passes everything else through byte-for-byte — including the
531
- * nested steps of a `returnField: "all"` pipeline, which are operation-defined
532
- * objects the CLI must not reach into.
533
- *
534
- * Deliberately narrow, not a general-purpose predicate: the contract is
535
- * specifically "an operations-execute result may be a DO query page".
536
- * `executeDatabaseOperation()` is the only caller.
537
- *
538
- * The conversion itself is delegated to `normalizeCliListEnvelope()` so cursor
539
- * handling, `prevCursor` dropping and `hasMore` derivation have exactly one
540
- * implementation. That helper throws on an unrecognized shape — correct when
541
- * the payload is supposed to be a list, wrong here, where the payload is the
542
- * caller's own result — which is why the shape test has to run first. `_timing`
543
- * (`--timing`) is re-attached afterwards, since it rides alongside the envelope
544
- * rather than inside it.
545
- */
546
- export declare function normalizeDatabaseOperationResult(raw: unknown): unknown;
547
478
  export declare class ApiClient {
548
479
  /**
549
480
  * Loaded on first use (`ensureAuthenticated`), never in a constructor.
@@ -1092,15 +1023,13 @@ export declare class ApiClient {
1092
1023
  }>;
1093
1024
  /**
1094
1025
  * List the live connections the server believes exist for exactly one of a
1095
- * document, user, or database. Read-only inspection over admin-api. Rows are
1026
+ * document or user. Read-only inspection over admin-api. Rows are
1096
1027
  * per-connection-×-subscription bindings, so `connectionId` is not unique
1097
- * across rows. `params` on a database-subscription row is caller-defined
1098
- * bound CEL input — typed `unknown`.
1028
+ * across rows.
1099
1029
  */
1100
1030
  listConnections(appId: string, selector: {
1101
1031
  documentId?: string;
1102
1032
  userId?: string;
1103
- databaseId?: string;
1104
1033
  }, params?: {
1105
1034
  limit?: number;
1106
1035
  cursor?: string;
@@ -1860,39 +1789,6 @@ export declare class ApiClient {
1860
1789
  * `{ success, id, appliedFields }`.
1861
1790
  */
1862
1791
  patchDatabaseRecord(appId: string, databaseId: string, modelName: string, id: string, data: any): Promise<any>;
1863
- listDatabaseOperations(appId: string, databaseId: string): Promise<any[]>;
1864
- /**
1865
- * Execute a registered operation and, when the result is a query page,
1866
- * normalize it to the CLI's one list envelope (issue #2440).
1867
- *
1868
- * The registered operation decides the response shape, so the normalization
1869
- * is conditional — see {@link normalizeDatabaseOperationResult}. Everything
1870
- * else (a `count`, an `aggregate`, a mutation, a `returnField: "all"`
1871
- * pipeline) is returned exactly as the server sent it.
1872
- */
1873
- executeDatabaseOperation(appId: string, databaseId: string, operationName: string, data?: {
1874
- params?: Record<string, any>;
1875
- limit?: number;
1876
- cursor?: string;
1877
- direction?: number;
1878
- }, options?: {
1879
- timing?: boolean;
1880
- }): Promise<any>;
1881
- /**
1882
- * Execute a registered batch (bulk) database operation. Posts a chunk of
1883
- * items to the canonical `operations/:name/batch` endpoint (the same one the
1884
- * client library's `executeBatch` uses — NOT the deprecated `import-bulk`
1885
- * alias). Used by `databases import-csv`.
1886
- *
1887
- * @returns `{ imported, failed }` — DO-level write outcome counts. Per-item
1888
- * validation/access failures abort the whole chunk with a 4xx (thrown).
1889
- */
1890
- executeBatch(appId: string, databaseId: string, operationName: string, batch: Array<{
1891
- params: Record<string, any>;
1892
- }>): Promise<{
1893
- imported: number;
1894
- failed: number;
1895
- }>;
1896
1792
  listDatabaseIndexes(appId: string, databaseId: string, modelName?: string): Promise<any>;
1897
1793
  registerDatabaseIndex(appId: string, databaseId: string, data: {
1898
1794
  modelName: string;
@@ -1922,12 +1818,6 @@ export declare class ApiClient {
1922
1818
  databaseType: string;
1923
1819
  ruleSetId?: string | null;
1924
1820
  triggers?: Record<string, any> | null;
1925
- /**
1926
- * @deprecated The TOML `type.celContextAccess` expression. Use resource
1927
- * metadata categories instead (#1420, #1815).
1928
- */
1929
- metadataAccess?: string | null;
1930
- defaultAccess?: string | null;
1931
1821
  autoPopulatedFields?: Record<string, any> | null;
1932
1822
  timestamps?: Record<string, any> | null;
1933
1823
  schema?: string | null;
@@ -1938,24 +1828,10 @@ export declare class ApiClient {
1938
1828
  updateDatabaseTypeConfig(appId: string, databaseType: string, data: {
1939
1829
  ruleSetId?: string | null;
1940
1830
  triggers?: Record<string, any> | null;
1941
- /**
1942
- * @deprecated The TOML `type.celContextAccess` expression. Use resource
1943
- * metadata categories instead (#1420, #1815).
1944
- */
1945
- metadataAccess?: string | null;
1946
- defaultAccess?: string | null;
1947
1831
  autoPopulatedFields?: Record<string, any> | null;
1948
1832
  timestamps?: Record<string, any> | null;
1949
1833
  schema?: string | null;
1950
- pendingOpDeletes?: string[];
1951
- finalOpNames?: string[];
1952
1834
  metadataManifest?: any;
1953
- pendingOpUpdates?: Array<{
1954
- name: string;
1955
- access?: string | null;
1956
- params?: Record<string, any> | null;
1957
- }>;
1958
- pendingOpUpserts?: Array<Record<string, any>>;
1959
1835
  }, expectedModifiedAt?: string, options?: {
1960
1836
  dryRun?: boolean;
1961
1837
  acceptWarnings?: boolean;
@@ -1964,49 +1840,13 @@ export declare class ApiClient {
1964
1840
  force?: boolean;
1965
1841
  }): Promise<any>;
1966
1842
  /**
1967
- * Issue #666 Phase 3: ask the server to scaffold a TOML schema from
1968
- * existing ops + DO field introspection. Read-only — does NOT persist.
1843
+ * Issue #666 Phase 3: ask the server to scaffold a TOML schema from the
1844
+ * type's databases (the models each holds, and their fields). Read-only —
1845
+ * does NOT persist.
1969
1846
  */
1970
1847
  scaffoldDatabaseTypeSchema(appId: string, databaseType: string): Promise<{
1971
1848
  schema: string;
1972
1849
  }>;
1973
- listDatabaseTypeOperations(appId: string, databaseType: string): Promise<any[]>;
1974
- getDatabaseTypeOperation(appId: string, databaseType: string, name: string): Promise<any>;
1975
- createDatabaseTypeOperation(appId: string, databaseType: string, data: {
1976
- name: string;
1977
- type: string;
1978
- modelName: string;
1979
- access?: string | null;
1980
- definition: Record<string, any>;
1981
- params?: Record<string, any> | null;
1982
- }, options?: {
1983
- dryRun?: boolean;
1984
- schemaOverride?: string | null;
1985
- defaultAccess?: string | null;
1986
- metadataManifestOverride?: Record<string, any> | null;
1987
- }): Promise<any>;
1988
- updateDatabaseTypeOperation(appId: string, databaseType: string, name: string, data: Record<string, any>, expectedModifiedAt?: string, options?: {
1989
- dryRun?: boolean;
1990
- schemaOverride?: string | null;
1991
- metadataManifestOverride?: Record<string, any> | null;
1992
- }): Promise<any>;
1993
- deleteDatabaseTypeOperation(appId: string, databaseType: string, name: string): Promise<any>;
1994
- listDatabaseTypeSubscriptions(appId: string, databaseType: string): Promise<any[]>;
1995
- getDatabaseTypeSubscription(appId: string, databaseType: string, subscriptionKey: string): Promise<any>;
1996
- createDatabaseTypeSubscription(appId: string, databaseType: string, data: {
1997
- subscriptionKey: string;
1998
- displayName: string;
1999
- modelName: string;
2000
- filter: string;
2001
- access: string;
2002
- description?: string | null;
2003
- select?: string[] | null;
2004
- emit?: string[] | null;
2005
- params?: Record<string, any> | null;
2006
- status?: string;
2007
- }): Promise<any>;
2008
- updateDatabaseTypeSubscription(appId: string, databaseType: string, subscriptionKey: string, data: Record<string, any>, expectedModifiedAt?: string): Promise<any>;
2009
- deleteDatabaseTypeSubscription(appId: string, databaseType: string, subscriptionKey: string): Promise<any>;
2010
1850
  listGroups(appId: string, params?: {
2011
1851
  type?: string;
2012
1852
  limit?: number;
@@ -2233,28 +2073,6 @@ export declare class ApiClient {
2233
2073
  */
2234
2074
  downloadDocumentArtifact(_appId: string, grantedPath: string): Promise<Buffer>;
2235
2075
  importDocumentState(appId: string, documentId: string, stateBase64: string): Promise<any>;
2236
- /**
2237
- * Upload one artifact of a large document's import chain (#2816,
2238
- * behavior 20).
2239
- *
2240
- * The bytes travel raw and unmodified: the manifest's digest is over the
2241
- * STORED bytes, so re-encoding a chunk here would fail its own verification
2242
- * on install. The query says which artifact it is — the server derives the
2243
- * key from the document it belongs to, so nothing here composes one.
2244
- */
2245
- uploadDocumentChainArtifact(appId: string, documentId: string, query: Record<string, string | number>, body: Buffer): Promise<any>;
2246
- /** Start installing an uploaded chain (#2816, behavior 20). */
2247
- installDocumentChain(appId: string, documentId: string, plan: {
2248
- installId?: string;
2249
- base: {
2250
- epoch: number;
2251
- buildId: string;
2252
- } | null;
2253
- overlays: number[];
2254
- currentEpoch: number;
2255
- }): Promise<any>;
2256
- /** How far a document's chain install has got (#2816, behavior 20). */
2257
- getDocumentChainInstall(appId: string, documentId: string): Promise<any>;
2258
2076
  getDocument(appId: string, documentId: string): Promise<any>;
2259
2077
  /**
2260
2078
  * Delete a document and everything hanging off it (#2756). The server route
@@ -2292,14 +2110,14 @@ export declare class ApiClient {
2292
2110
  limit?: number;
2293
2111
  cursor?: string;
2294
2112
  /** #3764 — the format the caller believes this document has. */
2295
- documentFormat?: 1 | 2 | 3;
2113
+ documentFormat?: 1 | 3;
2296
2114
  }): Promise<ListEnvelope>;
2297
2115
  /**
2298
2116
  * Count records in a document model (issue #1964 Phase 3). Returns `{ count }`.
2299
2117
  */
2300
2118
  countDocumentRecords(appId: string, documentId: string, modelName: string, queryOptions?: {
2301
2119
  filter?: Record<string, any>;
2302
- documentFormat?: 1 | 2 | 3;
2120
+ documentFormat?: 1 | 3;
2303
2121
  }): Promise<{
2304
2122
  count: number;
2305
2123
  }>;
@@ -2321,7 +2139,7 @@ export declare class ApiClient {
2321
2139
  groupBy?: string[];
2322
2140
  filter?: Record<string, any>;
2323
2141
  }, extra?: {
2324
- documentFormat?: 1 | 2 | 3;
2142
+ documentFormat?: 1 | 3;
2325
2143
  }): Promise<{
2326
2144
  result: unknown;
2327
2145
  }>;
@@ -2333,9 +2151,14 @@ export declare class ApiClient {
2333
2151
  /**
2334
2152
  * A record-log document's room (#4306): `GET documents/:id/room` →
2335
2153
  * `{ ok, appId, documentId, documentFormat, room }`, `room` null for a
2336
- * format that has no record room. App admins only.
2154
+ * format that has no record room. With `refused` (#4310), the answer also
2155
+ * carries a page of that bulk load's refused rows. App admins only.
2337
2156
  */
2338
- getDocumentRoom(appId: string, documentId: string): Promise<any>;
2157
+ getDocumentRoom(appId: string, documentId: string, query?: {
2158
+ refused?: string;
2159
+ limit?: number;
2160
+ cursor?: string;
2161
+ }): Promise<any>;
2339
2162
  /**
2340
2163
  * A large document's snapshot builds, newest first, one page (#3432).
2341
2164
  * `GET documents/:id/snapshots` → `{ items, hasMore, nextCursor? }`.
@@ -2365,8 +2188,16 @@ export declare class ApiClient {
2365
2188
  }>;
2366
2189
  /** One bulk-load session's status (#3434). */
2367
2190
  getDocumentIngest(appId: string, documentId: string, sessionId: string): Promise<any>;
2368
- /** Open a bulk-load session on a large document (#3435, criterion 9). */
2369
- createDocumentIngest(appId: string, documentId: string): Promise<any>;
2191
+ /**
2192
+ * Open a bulk-load session on a large document (#3435, criterion 9). A
2193
+ * record-log (format 3) document's load takes `reserveEpoch`, `mode` and a
2194
+ * refresh's `models` (#4310); `{}` keeps every format's defaults.
2195
+ */
2196
+ createDocumentIngest(appId: string, documentId: string, options?: {
2197
+ reserveEpoch?: "open" | "commit";
2198
+ mode?: "merge" | "refresh";
2199
+ models?: string[];
2200
+ }): Promise<any>;
2370
2201
  /**
2371
2202
  * Upload one chunk of a bulk-load session's artifact (#3435).
2372
2203
  *
@@ -2412,7 +2243,7 @@ export declare class ApiClient {
2412
2243
  data: Record<string, unknown>;
2413
2244
  options?: Record<string, unknown>;
2414
2245
  }, extra?: {
2415
- documentFormat?: 1 | 2 | 3;
2246
+ documentFormat?: 1 | 3;
2416
2247
  }): Promise<{
2417
2248
  record: unknown;
2418
2249
  }>;
@@ -2425,7 +2256,7 @@ export declare class ApiClient {
2425
2256
  data: Record<string, unknown>;
2426
2257
  options?: Record<string, unknown>;
2427
2258
  }, extra?: {
2428
- documentFormat?: 1 | 2 | 3;
2259
+ documentFormat?: 1 | 3;
2429
2260
  }): Promise<{
2430
2261
  record: unknown;
2431
2262
  }>;
@@ -2435,7 +2266,7 @@ export declare class ApiClient {
2435
2266
  * a silent no-op per the facade contract. Returns `{ deleted: true }`.
2436
2267
  */
2437
2268
  deleteDocumentRecord(appId: string, documentId: string, modelName: string, recordId: string, extra?: {
2438
- documentFormat?: 1 | 2 | 3;
2269
+ documentFormat?: 1 | 3;
2439
2270
  }): Promise<{
2440
2271
  deleted: boolean;
2441
2272
  }>;
@@ -2446,7 +2277,7 @@ export declare class ApiClient {
2446
2277
  * `{ applied, added, updated, deleted }`.
2447
2278
  */
2448
2279
  bulkDocumentRecords(appId: string, documentId: string, operations: Array<Record<string, unknown>>, extra?: {
2449
- documentFormat?: 1 | 2 | 3;
2280
+ documentFormat?: 1 | 3;
2450
2281
  }): Promise<{
2451
2282
  applied: number;
2452
2283
  added: Array<{
@@ -2470,7 +2301,7 @@ export declare class ApiClient {
2470
2301
  documentId?: string;
2471
2302
  tags?: string[];
2472
2303
  createdBy?: string;
2473
- documentFormat?: 1 | 2 | 3;
2304
+ documentFormat?: 1 | 3;
2474
2305
  }): Promise<any>;
2475
2306
  listDocumentPermissions(appId: string, documentId: string): Promise<any[]>;
2476
2307
  grantDocumentPermission(appId: string, documentId: string, permissions: Array<{