primitive-admin 1.2.0-alpha.14 → 1.2.0-alpha.15

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 (318) hide show
  1. package/README.md +102 -78
  2. package/assets/skill/skills/primitive-platform/SKILL.md +87 -23
  3. package/dist/bin/primitive.js +11 -82
  4. package/dist/bin/primitive.js.map +1 -1
  5. package/dist/src/commands/admins.js +79 -17
  6. package/dist/src/commands/admins.js.map +1 -1
  7. package/dist/src/commands/agent-sessions.js +2 -0
  8. package/dist/src/commands/agent-sessions.js.map +1 -1
  9. package/dist/src/commands/analytics.js +183 -12
  10. package/dist/src/commands/analytics.js.map +1 -1
  11. package/dist/src/commands/apps-children.js +2 -0
  12. package/dist/src/commands/apps-children.js.map +1 -1
  13. package/dist/src/commands/apps.js +19 -2
  14. package/dist/src/commands/apps.js.map +1 -1
  15. package/dist/src/commands/auth.js +11 -1
  16. package/dist/src/commands/auth.js.map +1 -1
  17. package/dist/src/commands/collections.js +13 -0
  18. package/dist/src/commands/collections.js.map +1 -1
  19. package/dist/src/commands/config.d.ts +1 -1
  20. package/dist/src/commands/config.js +40 -9
  21. package/dist/src/commands/config.js.map +1 -1
  22. package/dist/src/commands/connections.js +2 -0
  23. package/dist/src/commands/connections.js.map +1 -1
  24. package/dist/src/commands/database-type-configs.js +5 -3
  25. package/dist/src/commands/database-type-configs.js.map +1 -1
  26. package/dist/src/commands/databases.js +6 -4
  27. package/dist/src/commands/databases.js.map +1 -1
  28. package/dist/src/commands/db3-types.js +2 -0
  29. package/dist/src/commands/db3-types.js.map +1 -1
  30. package/dist/src/commands/db3.d.ts +12 -0
  31. package/dist/src/commands/db3.js +343 -24
  32. package/dist/src/commands/db3.js.map +1 -1
  33. package/dist/src/commands/documents.d.ts +52 -12
  34. package/dist/src/commands/documents.js +120 -29
  35. package/dist/src/commands/documents.js.map +1 -1
  36. package/dist/src/commands/email-templates.js +72 -0
  37. package/dist/src/commands/email-templates.js.map +1 -1
  38. package/dist/src/commands/functions.js +47 -10
  39. package/dist/src/commands/functions.js.map +1 -1
  40. package/dist/src/commands/groups.js +18 -3
  41. package/dist/src/commands/groups.js.map +1 -1
  42. package/dist/src/commands/init.js +7 -1
  43. package/dist/src/commands/init.js.map +1 -1
  44. package/dist/src/commands/integrations.js +80 -47
  45. package/dist/src/commands/integrations.js.map +1 -1
  46. package/dist/src/commands/metadata-category-configs.js +2 -0
  47. package/dist/src/commands/metadata-category-configs.js.map +1 -1
  48. package/dist/src/commands/metadata.js +41 -0
  49. package/dist/src/commands/metadata.js.map +1 -1
  50. package/dist/src/commands/prompts.js +73 -47
  51. package/dist/src/commands/prompts.js.map +1 -1
  52. package/dist/src/commands/rule-sets.js +2 -0
  53. package/dist/src/commands/rule-sets.js.map +1 -1
  54. package/dist/src/commands/schemas.d.ts +15 -0
  55. package/dist/src/commands/schemas.js +122 -0
  56. package/dist/src/commands/schemas.js.map +1 -0
  57. package/dist/src/commands/secrets.js +45 -3
  58. package/dist/src/commands/secrets.js.map +1 -1
  59. package/dist/src/commands/sessions.js +2 -0
  60. package/dist/src/commands/sessions.js.map +1 -1
  61. package/dist/src/commands/sync-schemas.d.ts +202 -0
  62. package/dist/src/commands/sync-schemas.js +629 -0
  63. package/dist/src/commands/sync-schemas.js.map +1 -0
  64. package/dist/src/commands/sync-user-properties.d.ts +118 -0
  65. package/dist/src/commands/sync-user-properties.js +276 -0
  66. package/dist/src/commands/sync-user-properties.js.map +1 -0
  67. package/dist/src/commands/sync.d.ts +243 -12
  68. package/dist/src/commands/sync.js +1474 -314
  69. package/dist/src/commands/sync.js.map +1 -1
  70. package/dist/src/commands/user-properties.d.ts +14 -0
  71. package/dist/src/commands/user-properties.js +79 -0
  72. package/dist/src/commands/user-properties.js.map +1 -0
  73. package/dist/src/commands/users.js +879 -16
  74. package/dist/src/commands/users.js.map +1 -1
  75. package/dist/src/commands/waitlist.js +39 -4
  76. package/dist/src/commands/waitlist.js.map +1 -1
  77. package/dist/src/lib/analytics-query.d.ts +58 -0
  78. package/dist/src/lib/analytics-query.js +134 -0
  79. package/dist/src/lib/analytics-query.js.map +1 -0
  80. package/dist/src/lib/api-client.d.ts +748 -95
  81. package/dist/src/lib/api-client.js +356 -158
  82. package/dist/src/lib/api-client.js.map +1 -1
  83. package/dist/src/lib/block-selector.d.ts +9 -15
  84. package/dist/src/lib/block-selector.js +9 -20
  85. package/dist/src/lib/block-selector.js.map +1 -1
  86. package/dist/src/lib/cli-manifest.d.ts +8 -0
  87. package/dist/src/lib/cli-manifest.js +10 -1
  88. package/dist/src/lib/cli-manifest.js.map +1 -1
  89. package/dist/src/lib/cli-version.d.ts +14 -0
  90. package/dist/src/lib/cli-version.js +38 -0
  91. package/dist/src/lib/cli-version.js.map +1 -0
  92. package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
  93. package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
  94. package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
  95. package/dist/src/lib/command-status.d.ts +110 -0
  96. package/dist/src/lib/command-status.js +184 -0
  97. package/dist/src/lib/command-status.js.map +1 -0
  98. package/dist/src/lib/config-object-descriptor.d.ts +6 -0
  99. package/dist/src/lib/config-object-descriptor.js +71 -0
  100. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  101. package/dist/src/lib/config-toml.d.ts +11 -2
  102. package/dist/src/lib/config-toml.js +25 -2
  103. package/dist/src/lib/config-toml.js.map +1 -1
  104. package/dist/src/lib/data-input.d.ts +1 -1
  105. package/dist/src/lib/data-input.js +1 -1
  106. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
  107. package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
  108. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
  109. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +11 -1
  110. package/dist/src/lib/db-codegen/dbTypeIR.js +11 -5
  111. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
  112. package/dist/src/lib/db-type-records.d.ts +95 -0
  113. package/dist/src/lib/db-type-records.js +219 -0
  114. package/dist/src/lib/db-type-records.js.map +1 -0
  115. package/dist/src/lib/db3-export.d.ts +51 -14
  116. package/dist/src/lib/db3-export.js +135 -27
  117. package/dist/src/lib/db3-export.js.map +1 -1
  118. package/dist/src/lib/db3-index-output.d.ts +68 -3
  119. package/dist/src/lib/db3-index-output.js +139 -3
  120. package/dist/src/lib/db3-index-output.js.map +1 -1
  121. package/dist/src/lib/db3-type-models.d.ts +39 -7
  122. package/dist/src/lib/db3-type-models.js +138 -27
  123. package/dist/src/lib/db3-type-models.js.map +1 -1
  124. package/dist/src/lib/deprecation.d.ts +2 -2
  125. package/dist/src/lib/deprecation.js +2 -2
  126. package/dist/src/lib/experimental-apis.d.ts +36 -0
  127. package/dist/src/lib/experimental-apis.js +46 -0
  128. package/dist/src/lib/experimental-apis.js.map +1 -0
  129. package/dist/src/lib/file-attachment.d.ts +24 -0
  130. package/dist/src/lib/file-attachment.js +31 -0
  131. package/dist/src/lib/file-attachment.js.map +1 -0
  132. package/dist/src/lib/function-authorize-check.d.ts +1 -1
  133. package/dist/src/lib/function-authorize-check.js +2 -1
  134. package/dist/src/lib/function-authorize-check.js.map +1 -1
  135. package/dist/src/lib/function-authorize-view.js +4 -0
  136. package/dist/src/lib/function-authorize-view.js.map +1 -1
  137. package/dist/src/lib/function-bundle.d.ts +27 -5
  138. package/dist/src/lib/function-bundle.js +106 -7
  139. package/dist/src/lib/function-bundle.js.map +1 -1
  140. package/dist/src/lib/function-collect.d.ts +2 -0
  141. package/dist/src/lib/function-collect.js +36 -7
  142. package/dist/src/lib/function-collect.js.map +1 -1
  143. package/dist/src/lib/function-db-types.d.ts +57 -40
  144. package/dist/src/lib/function-db-types.js +246 -285
  145. package/dist/src/lib/function-db-types.js.map +1 -1
  146. package/dist/src/lib/function-document-types.d.ts +19 -7
  147. package/dist/src/lib/function-document-types.js +24 -12
  148. package/dist/src/lib/function-document-types.js.map +1 -1
  149. package/dist/src/lib/function-run.d.ts +1 -1
  150. package/dist/src/lib/function-run.js +1 -1
  151. package/dist/src/lib/function-run.js.map +1 -1
  152. package/dist/src/lib/function-schema-codegen.d.ts +58 -18
  153. package/dist/src/lib/function-schema-codegen.js +85 -74
  154. package/dist/src/lib/function-schema-codegen.js.map +1 -1
  155. package/dist/src/lib/function-schema-refs.d.ts +98 -0
  156. package/dist/src/lib/function-schema-refs.js +177 -0
  157. package/dist/src/lib/function-schema-refs.js.map +1 -0
  158. package/dist/src/lib/function-sync.d.ts +38 -4
  159. package/dist/src/lib/function-sync.js +83 -14
  160. package/dist/src/lib/function-sync.js.map +1 -1
  161. package/dist/src/lib/function-typecheck.d.ts +52 -0
  162. package/dist/src/lib/function-typecheck.js +171 -54
  163. package/dist/src/lib/function-typecheck.js.map +1 -1
  164. package/dist/src/lib/generated-build-flags.d.ts +13 -0
  165. package/dist/src/lib/generated-build-flags.js +14 -0
  166. package/dist/src/lib/generated-build-flags.js.map +1 -0
  167. package/dist/src/lib/generated-config-surfaces.d.ts +211 -11
  168. package/dist/src/lib/generated-config-surfaces.js +579 -69
  169. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  170. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  171. package/dist/src/lib/generated-sdk-types.js +1 -1
  172. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  173. package/dist/src/lib/integration-test-request.d.ts +54 -0
  174. package/dist/src/lib/integration-test-request.js +207 -0
  175. package/dist/src/lib/integration-test-request.js.map +1 -0
  176. package/dist/src/lib/metadata-report.d.ts +85 -0
  177. package/dist/src/lib/metadata-report.js +81 -0
  178. package/dist/src/lib/metadata-report.js.map +1 -0
  179. package/dist/src/lib/output.d.ts +1 -1
  180. package/dist/src/lib/output.js +1 -1
  181. package/dist/src/lib/platform-owned.js +5 -0
  182. package/dist/src/lib/platform-owned.js.map +1 -1
  183. package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
  184. package/dist/src/lib/primitive-declaration-names.js +22 -0
  185. package/dist/src/lib/primitive-declaration-names.js.map +1 -0
  186. package/dist/src/lib/primitive-declaration.d.ts +143 -0
  187. package/dist/src/lib/primitive-declaration.js +658 -0
  188. package/dist/src/lib/primitive-declaration.js.map +1 -0
  189. package/dist/src/lib/prompt-schema-codegen.d.ts +36 -12
  190. package/dist/src/lib/prompt-schema-codegen.js +82 -98
  191. package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
  192. package/dist/src/lib/prompt-schema-document.d.ts +35 -0
  193. package/dist/src/lib/prompt-schema-document.js +92 -0
  194. package/dist/src/lib/prompt-schema-document.js.map +1 -0
  195. package/dist/src/lib/prompt-schema-refs.d.ts +164 -0
  196. package/dist/src/lib/prompt-schema-refs.js +452 -0
  197. package/dist/src/lib/prompt-schema-refs.js.map +1 -0
  198. package/dist/src/lib/records-verbs.d.ts +12 -2
  199. package/dist/src/lib/records-verbs.js +7 -2
  200. package/dist/src/lib/records-verbs.js.map +1 -1
  201. package/dist/src/lib/register-commands.d.ts +28 -0
  202. package/dist/src/lib/register-commands.js +101 -0
  203. package/dist/src/lib/register-commands.js.map +1 -0
  204. package/dist/src/lib/retired-imports.d.ts +53 -0
  205. package/dist/src/lib/retired-imports.js +120 -0
  206. package/dist/src/lib/retired-imports.js.map +1 -0
  207. package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
  208. package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
  209. package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
  210. package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
  211. package/dist/src/lib/schema-codegen/generated-db3-bridge.js +221 -0
  212. package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
  213. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
  214. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
  215. package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
  216. package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +209 -0
  217. package/dist/src/lib/schema-codegen/generated-field-grammar.js +379 -0
  218. package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
  219. package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
  220. package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
  221. package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
  222. package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
  223. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
  224. package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
  225. package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +129 -0
  226. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +154 -1
  227. package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -1
  228. package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
  229. package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
  230. package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
  231. package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
  232. package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
  233. package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
  234. package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
  235. package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
  236. package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
  237. package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
  238. package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
  239. package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
  240. package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
  241. package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
  242. package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
  243. package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
  244. package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
  245. package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
  246. package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
  247. package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
  248. package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
  249. package/dist/src/lib/schema-codegen/schemaToTs.d.ts +40 -13
  250. package/dist/src/lib/schema-codegen/schemaToTs.js +124 -160
  251. package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -1
  252. package/dist/src/lib/schema-codegen/valuesLists.d.ts +35 -0
  253. package/dist/src/lib/schema-codegen/valuesLists.js +128 -0
  254. package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
  255. package/dist/src/lib/schema-family-index.d.ts +228 -0
  256. package/dist/src/lib/schema-family-index.js +813 -0
  257. package/dist/src/lib/schema-family-index.js.map +1 -0
  258. package/dist/src/lib/schema-pins.d.ts +82 -0
  259. package/dist/src/lib/schema-pins.js +198 -0
  260. package/dist/src/lib/schema-pins.js.map +1 -0
  261. package/dist/src/lib/schema-preview.d.ts +244 -0
  262. package/dist/src/lib/schema-preview.js +498 -0
  263. package/dist/src/lib/schema-preview.js.map +1 -0
  264. package/dist/src/lib/skill-installer.d.ts +2 -2
  265. package/dist/src/lib/skill-installer.js +2 -21
  266. package/dist/src/lib/skill-installer.js.map +1 -1
  267. package/dist/src/lib/step-run-table.d.ts +1 -2
  268. package/dist/src/lib/step-run-table.js +1 -2
  269. package/dist/src/lib/step-run-table.js.map +1 -1
  270. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +2 -1
  271. package/dist/src/lib/swift-codegen/agentGenerator.js +24 -22
  272. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
  273. package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
  274. package/dist/src/lib/swift-codegen/banners.js +12 -0
  275. package/dist/src/lib/swift-codegen/banners.js.map +1 -1
  276. package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
  277. package/dist/src/lib/swift-codegen/functionGenerator.js +167 -50
  278. package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
  279. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +31 -7
  280. package/dist/src/lib/swift-codegen/schemaToSwift.js +213 -177
  281. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
  282. package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +45 -0
  283. package/dist/src/lib/swift-codegen/sharedGenerator.js +120 -0
  284. package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
  285. package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
  286. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
  287. package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
  288. package/dist/src/lib/sync-resource-types.d.ts +37 -5
  289. package/dist/src/lib/sync-resource-types.js +53 -5
  290. package/dist/src/lib/sync-resource-types.js.map +1 -1
  291. package/dist/src/lib/sync-selectors.d.ts +7 -0
  292. package/dist/src/lib/sync-selectors.js +22 -2
  293. package/dist/src/lib/sync-selectors.js.map +1 -1
  294. package/dist/src/lib/test-runs.d.ts +45 -0
  295. package/dist/src/lib/test-runs.js +150 -0
  296. package/dist/src/lib/test-runs.js.map +1 -0
  297. package/dist/src/lib/toml-database-config.d.ts +2 -1
  298. package/dist/src/lib/toml-database-config.js +4 -3
  299. package/dist/src/lib/toml-database-config.js.map +1 -1
  300. package/dist/src/lib/toml-scalar-edit.js +6 -4
  301. package/dist/src/lib/toml-scalar-edit.js.map +1 -1
  302. package/dist/src/lib/user-index.d.ts +80 -0
  303. package/dist/src/lib/user-index.js +166 -0
  304. package/dist/src/lib/user-index.js.map +1 -0
  305. package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
  306. package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
  307. package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
  308. package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
  309. package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
  310. package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
  311. package/dist/src/lib/user-walk.d.ts +31 -0
  312. package/dist/src/lib/user-walk.js +102 -0
  313. package/dist/src/lib/user-walk.js.map +1 -0
  314. package/dist/src/lib/worker-perf-format.d.ts +22 -0
  315. package/dist/src/lib/worker-perf-format.js +27 -0
  316. package/dist/src/lib/worker-perf-format.js.map +1 -0
  317. package/dist/src/types/index.d.ts +13 -34
  318. package/package.json +5 -3
@@ -28,6 +28,32 @@ export interface BlobInfo {
28
28
  uploaded?: string | null;
29
29
  etag?: string | null;
30
30
  }
31
+ /**
32
+ * An app as `GET /admin/api/apps/{appId}` serializes it. Dates are ISO-8601
33
+ * strings. The lineage fields are null on an app with no parent, and
34
+ * `ownerAdminId`, `branch`, `idleDays` and `expiresAt` appear only on a child.
35
+ */
36
+ export interface AdminApp {
37
+ appId: string;
38
+ name: string;
39
+ mode: string;
40
+ baseUrl: string | null;
41
+ createdBy: string | null;
42
+ /** The format new root documents are minted in, or null when the app never chose. */
43
+ rootDocumentFormat: string | null;
44
+ protection: string;
45
+ parentAppId: string | null;
46
+ childSlug: string | null;
47
+ lastActivityAt: string | null;
48
+ ownerAdminId?: string | null;
49
+ branch?: string | null;
50
+ idleDays?: number | null;
51
+ expiresAt?: string | null;
52
+ createdAt: string;
53
+ modifiedAt: string;
54
+ /** The app's remaining settings (auth, CORS, passkeys, invitations, …). */
55
+ [setting: string]: unknown;
56
+ }
31
57
  /**
32
58
  * One child app as `GET /admin/api/apps/{appId}/children` lists it. Dates
33
59
  * are ISO-8601 strings.
@@ -61,6 +87,20 @@ export interface ChildPreviewOrigins {
61
87
  previewOrigins: string[];
62
88
  }
63
89
  /** One row of a db3's index registry, as `db3/:id/indexes` answers it. */
90
+ /** What a db3 index is (#5220). */
91
+ export type Db3IndexKind = "scalar" | "members" | "text" | "vector";
92
+ /** Where a db3 index lives (#5220). */
93
+ export type Db3IndexPlacement = "server" | "device" | "both";
94
+ /** A `vector` index's options on its registration (#5225): how devices search the field. */
95
+ export interface Db3VectorIndexOptions {
96
+ distance?: "cos" | "l2";
97
+ index?: "exact" | {
98
+ mode: "ann";
99
+ nbucket?: number;
100
+ codesize?: number;
101
+ quantizer?: "pq" | "opq" | "bq";
102
+ };
103
+ }
64
104
  export interface Db3IndexRow {
65
105
  name: string;
66
106
  model: string;
@@ -72,6 +112,258 @@ export interface Db3IndexRow {
72
112
  kind: "declaration" | "named";
73
113
  unique: boolean;
74
114
  }>;
115
+ /** What the index is; a server from before #5220 lists none. */
116
+ kind?: Db3IndexKind;
117
+ /** Where the index lives; a server from before #5220 lists none. */
118
+ on?: Db3IndexPlacement;
119
+ /** A text index's options, every one filled in (#5222); absent on any other kind. */
120
+ text?: Db3TextIndexOptions;
121
+ /** A vector index's options filled in, with its field's `dims` and `element` (#5229); absent on any other kind. */
122
+ vector?: Db3VectorIndexOptions & {
123
+ dims?: number;
124
+ element?: "f32" | "f16" | "i8";
125
+ };
126
+ /** A vector index's generation: new at every registration (#5229). */
127
+ generation?: number;
128
+ /** A vector index's model revision: moved on when its model is deleted (#5229). */
129
+ revision?: number;
130
+ /** An `ann` vector index's shared model, once a device uploaded one (#5229). */
131
+ annModel?: Db3IndexAnnModel;
132
+ }
133
+ /** An `ann` vector index's shared model as `GET db3/:id/indexes` lists it (#5229). */
134
+ export interface Db3IndexAnnModel {
135
+ revision: number;
136
+ trainedAt: string;
137
+ rows: number;
138
+ bytes: number;
139
+ format: string;
140
+ }
141
+ /** What `db3/:id/records/:model/explain` takes (#5240): the read, as its records route takes it, and an optional force. */
142
+ export interface Db3ExplainRequest {
143
+ op: "query" | "count" | "aggregate";
144
+ filter?: Record<string, any>;
145
+ options?: {
146
+ sort?: unknown;
147
+ limit?: number | string;
148
+ cursor?: string;
149
+ include?: unknown;
150
+ };
151
+ aggregate?: Record<string, unknown>;
152
+ /** An index of the model to force the read onto, or `"none"`. */
153
+ index?: string;
154
+ }
155
+ /** One statement an explained read ran (#5240). */
156
+ export interface Db3ExplainedStatement {
157
+ model: string;
158
+ sql: string;
159
+ runs: number;
160
+ plan: string[] | null;
161
+ planError?: string;
162
+ indexes: string[];
163
+ scan: boolean;
164
+ }
165
+ /** What `db3/:id/records/:model/explain` answers (#5240). */
166
+ export interface Db3ExplainAnswer {
167
+ op: "query" | "count" | "aggregate";
168
+ model: string;
169
+ index: string | null;
170
+ indexes: string[];
171
+ scanned: string[];
172
+ statements: Db3ExplainedStatement[];
173
+ answered: number;
174
+ cost: {
175
+ rowsRead: number | null;
176
+ rowsWritten: number | null;
177
+ };
178
+ stats: boolean;
179
+ sqlite: string;
180
+ }
181
+ /** A text index's tokenizer (#5222). */
182
+ export type Db3TextTokenizer = "unicode61" | "porter";
183
+ /** A text index's options (#5222): as `list` answers them every one is filled in; a registration gives any. */
184
+ export interface Db3TextIndexOptions {
185
+ tokenizer: Db3TextTokenizer;
186
+ prefix: number[];
187
+ weights: Record<string, number>;
188
+ }
189
+ /** `GET`/`PATCH users/index/limits`: the shard limit overrides and effective limits, and the property caps. */
190
+ export interface UserIndexLimitsAnswer {
191
+ overrides: Record<string, number | null> | null;
192
+ effective: Record<string, unknown>;
193
+ caps?: {
194
+ effective: Record<string, number>;
195
+ overrides: Record<string, number | null> | null;
196
+ };
197
+ }
198
+ /** One revalidation slice of an app's user index: when it ran, what started it, and its counts. */
199
+ export type UserIndexSlice = {
200
+ at: string;
201
+ startedAt: string;
202
+ durationMs: number;
203
+ trigger: "alarm" | "demand";
204
+ intervalMs: number;
205
+ nextAt: string;
206
+ batches: number;
207
+ continuations: number;
208
+ behind: boolean;
209
+ hinted: number;
210
+ verified: number;
211
+ stamped: number;
212
+ reprojected: number;
213
+ deleted: number;
214
+ applied: number;
215
+ misplaced: number;
216
+ failed: number;
217
+ sourcePages: number;
218
+ swept: number;
219
+ invitationClaims: number;
220
+ };
221
+ /**
222
+ * `POST users/index/reconcile`: 202 once one slice ran, or 200 with no slice
223
+ * while the app is being deleted.
224
+ */
225
+ export type UserIndexReconcileAnswer = {
226
+ ok: boolean;
227
+ started: true;
228
+ mode: "slice";
229
+ slice: UserIndexSlice;
230
+ reason?: undefined;
231
+ } | {
232
+ ok: boolean;
233
+ started: false;
234
+ reason: "closed";
235
+ };
236
+ /** The body of `POST users/walks` (#5393): the batch function, the walk's key, which users in what batches. */
237
+ export interface UserWalkStartBody {
238
+ function: string;
239
+ key: string;
240
+ filter?: Record<string, unknown>;
241
+ sort?: Record<string, 1 | -1>;
242
+ input?: unknown;
243
+ batchSize?: number;
244
+ concurrency?: number;
245
+ snapshot?: boolean;
246
+ }
247
+ /** A started (or found) users walk. */
248
+ export interface UserWalkStartAnswer {
249
+ runId: string;
250
+ walkId: string;
251
+ key: string;
252
+ status: string;
253
+ existing: boolean;
254
+ }
255
+ /** A users walk read: the coordinator's view (null when it holds no state) and the walk's run row. */
256
+ export interface UserWalkAnswer {
257
+ status: {
258
+ status: string;
259
+ walk: Record<string, any> | null;
260
+ };
261
+ run: Record<string, any>;
262
+ /** On a terminate only: whether this call ended the walk. */
263
+ terminated?: boolean;
264
+ }
265
+ /** The active user properties schema, as `GET users/properties` answers it. */
266
+ export interface UserPropertiesActive {
267
+ version: number;
268
+ hash: string;
269
+ fields: Record<string, any>;
270
+ uniqueConstraints: Array<{
271
+ name: string;
272
+ fields: string[];
273
+ }>;
274
+ modifiedAt: string | null;
275
+ }
276
+ /** `GET users/properties`. */
277
+ export interface UserPropertiesState {
278
+ appId: string;
279
+ active: UserPropertiesActive | null;
280
+ /** Always null: a push publishes or is refused at once. */
281
+ staged: null;
282
+ removedFields: Record<string, {
283
+ type: string;
284
+ removedAt: string;
285
+ }>;
286
+ caps: {
287
+ effective: Record<string, number>;
288
+ overrides: Record<string, number | null> | null;
289
+ };
290
+ }
291
+ /** One member with their properties, as `GET users/{userId}`, `POST users/get-by` and a property write answer it (#5386). */
292
+ export interface AppUserWithProperties {
293
+ userId: string;
294
+ email: string | null;
295
+ name: string | null;
296
+ avatarUrl: string | null;
297
+ role: string | null;
298
+ status: string;
299
+ disabledAt?: string;
300
+ addedAt: string | null;
301
+ testUser: boolean;
302
+ properties: Record<string, unknown>;
303
+ }
304
+ /** A property write's body (#5386): a merge-patch (null clears), set additions and removals, and a condition checked inside the write. */
305
+ export interface AppUserPropertiesWrite {
306
+ patch?: Record<string, unknown>;
307
+ addToSet?: Record<string, string[]>;
308
+ removeFromSet?: Record<string, string[]>;
309
+ condition?: Record<string, unknown>;
310
+ }
311
+ /** `PUT users/properties`. */
312
+ export interface UserPropertiesPushAnswer {
313
+ outcome: "published" | "unchanged" | "would-publish";
314
+ active?: UserPropertiesActive | null;
315
+ removedFields?: Record<string, {
316
+ type: string;
317
+ removedAt: string;
318
+ }>;
319
+ checks?: Array<Record<string, unknown>>;
320
+ }
321
+ /** One version of a `schemas/` file, as `GET …/schemas` lists it (#5532). */
322
+ export interface SchemaFileMeta {
323
+ file: string;
324
+ version: number;
325
+ tombstone: boolean;
326
+ /** sha256 hex of the source; null on a tombstone. */
327
+ sourceHash: string | null;
328
+ /** The file's def names, in file order; empty on a tombstone. */
329
+ defs: string[];
330
+ createdAt: string;
331
+ }
332
+ /** One version of a `schemas/` file with its source and compiled defs (`GET …/schemas/:file`). */
333
+ export interface SchemaFileVersion extends SchemaFileMeta {
334
+ /** Whether this is the file's current version. */
335
+ current: boolean;
336
+ createdBy: string;
337
+ source: string | null;
338
+ /**
339
+ * The compiled defs and, for a version stored since #5533, each def's
340
+ * provenance: where it inlined refs and the hash of each def it inlined.
341
+ */
342
+ compiled: {
343
+ defs: Record<string, unknown>;
344
+ provenance?: Record<string, SchemaFileProvenance>;
345
+ } | null;
346
+ }
347
+ /** One def's provenance: inlined pointer → the chain of refs inlined there, each with its def's hash (#5533). */
348
+ export type SchemaFileProvenance = Record<string, {
349
+ chain: Array<{
350
+ ref: string;
351
+ hash: string;
352
+ }>;
353
+ }>;
354
+ /** What a `schemas/` push answers (`PUT …/schemas/:file`). */
355
+ export interface SchemaPushAnswer extends SchemaFileMeta {
356
+ outcome: "created" | "unchanged" | "tombstoned";
357
+ warnings: string[];
358
+ }
359
+ /** One live file's source, as `POST …/schemas/pull` answers it. */
360
+ export interface SchemaPullItem {
361
+ file: string;
362
+ version: number;
363
+ sourceHash: string;
364
+ defs: string[];
365
+ createdAt: string;
366
+ source: string;
75
367
  }
76
368
  export declare class ApiError extends Error {
77
369
  statusCode: number;
@@ -184,6 +476,14 @@ interface EmailTemplateDetail {
184
476
  description: string;
185
477
  }[];
186
478
  }
479
+ /** The server's rendering of an email template, from the preview route. */
480
+ export interface EmailTemplatePreview {
481
+ renderedSubject: string;
482
+ renderedHtml: string;
483
+ renderedText: string;
484
+ /** The variable values that were rendered: the type's samples, overridden by the caller's. */
485
+ sampleVariables: Record<string, string>;
486
+ }
187
487
  interface EmailTemplateUpsertResult {
188
488
  emailType: string;
189
489
  templateId: string;
@@ -203,6 +503,23 @@ type AnalyticsTestUsersMode = "include" | "exclude" | "only";
203
503
  interface AnalyticsTestUsersParam {
204
504
  testUsers?: AnalyticsTestUsersMode;
205
505
  }
506
+ /**
507
+ * #5251 — `_bust=1`: the analytics read recomputes instead of answering from
508
+ * the server's cache.
509
+ */
510
+ interface AnalyticsFreshParam {
511
+ _bust?: "1";
512
+ }
513
+ /**
514
+ * #5251 — one `filter[<field>][<operator>]` entry of an events or errors
515
+ * query, with the server's operator name (`is`, `is not`, `contains`,
516
+ * `starts with`).
517
+ */
518
+ export interface AnalyticsFilterParam {
519
+ field: string;
520
+ operator: string;
521
+ value: string;
522
+ }
206
523
  interface AnalyticsTiming {
207
524
  total_ms: number;
208
525
  wae_queries: number[];
@@ -394,6 +711,54 @@ interface AnalyticsErrorsGroupsResponse {
394
711
  rows: AnalyticsErrorGroupRow[];
395
712
  _timing: AnalyticsTiming;
396
713
  }
714
+ /** One db3 query shape's cost over the window, per endpoint and function (#5244). */
715
+ interface AnalyticsDb3QueryRow {
716
+ shape_id: string;
717
+ type: string;
718
+ model: string;
719
+ op: string;
720
+ filter: string;
721
+ sort: string;
722
+ include: string;
723
+ endpoint: string;
724
+ function_id: string | null;
725
+ function_key: string | null;
726
+ calls: number;
727
+ rows_read: number;
728
+ rows_returned: number;
729
+ rows_read_per_call: number;
730
+ /** `null` when the calls returned nothing. */
731
+ rows_read_per_returned: number | null;
732
+ scanned_calls: number;
733
+ counters_known_calls: number;
734
+ }
735
+ /** What `GET analytics/db3/queries` answers (#5244). */
736
+ interface AnalyticsDb3QueriesResponse {
737
+ window_days: number;
738
+ order_by: "rowsRead" | "rowsPerReturned";
739
+ rows: AnalyticsDb3QueryRow[];
740
+ _timing: AnalyticsTiming;
741
+ }
742
+ /** One endpoint's (and function's) requests over the window (#5244). */
743
+ interface AnalyticsRequestRow {
744
+ method: string;
745
+ path: string;
746
+ function_id: string | null;
747
+ function_key: string | null;
748
+ requests: number;
749
+ wall_ms_avg: number;
750
+ wall_ms_p50: number;
751
+ wall_ms_p95: number;
752
+ dynamo_calls_per_request: number;
753
+ dynamo_ms_per_request: number;
754
+ cold_starts: number;
755
+ }
756
+ /** What `GET analytics/requests` answers (#5244). */
757
+ interface AnalyticsRequestsResponse {
758
+ window_days: number;
759
+ rows: AnalyticsRequestRow[];
760
+ _timing: AnalyticsTiming;
761
+ }
397
762
  /**
398
763
  * What a `DELETE` on a status-carrying object answers (#2887, #2907).
399
764
  *
@@ -420,6 +785,34 @@ export interface IntegrationWritePayload {
420
785
  timeoutMs?: number;
421
786
  status?: string;
422
787
  }
788
+ /** A multipart part sent with an integration test request. */
789
+ export interface IntegrationTestMultipartField {
790
+ fieldName: string;
791
+ /** `value` sends `value` as a text part; `attachment` sends the attachment at `attachmentIndex`. */
792
+ type: "value" | "attachment";
793
+ value?: string;
794
+ attachmentIndex?: number;
795
+ }
796
+ /** Body accepted by `POST …/integrations/{id}/test`: the request under test. */
797
+ export interface IntegrationTestPayload {
798
+ method?: string;
799
+ path?: string;
800
+ query?: unknown;
801
+ /** A JSON body. */
802
+ body?: unknown;
803
+ headers?: Record<string, string>;
804
+ /** A url-encoded body; a name with an array value is sent as a repeated key. */
805
+ form?: Record<string, string | string[]>;
806
+ /** How the body is built; absent means JSON (or `form` when given). */
807
+ bodyMode?: "raw" | "multipart";
808
+ /** Files, each `{ name, type, data }` with `data` in base64. */
809
+ attachments?: Array<{
810
+ name: string;
811
+ type: string;
812
+ data: string;
813
+ }>;
814
+ multipartFields?: IntegrationTestMultipartField[];
815
+ }
423
816
  /**
424
817
  * Integration detail response. `requestConfig` is only on the detail — the
425
818
  * list summary does not carry it.
@@ -630,10 +1023,7 @@ export declare class ApiClient {
630
1023
  */
631
1024
  removeChildPreviewOrigin(parentAppId: string, slug: string, origin: string): Promise<ChildPreviewOrigins>;
632
1025
  private childPreviewOriginsPath;
633
- getApp(appId: string): Promise<{
634
- id: string;
635
- name: string;
636
- }>;
1026
+ getApp(appId: string): Promise<AdminApp>;
637
1027
  deleteApp(appId: string): Promise<void>;
638
1028
  getAppSettings(appId: string): Promise<any>;
639
1029
  updateAppSettings(appId: string, settings: any): Promise<any>;
@@ -642,6 +1032,22 @@ export declare class ApiClient {
642
1032
  role?: string;
643
1033
  name?: string;
644
1034
  avatarUrl?: string | null;
1035
+ initialProperties?: Record<string, unknown>;
1036
+ }): Promise<any>;
1037
+ /**
1038
+ * Invite an email to the app as a console admin
1039
+ * (`POST /admin/api/apps/:appId/users/invite`): the invitation, with its
1040
+ * `inviteToken` and the `initialProperties` it gives the invitee at
1041
+ * acceptance (filling only what they have not set).
1042
+ */
1043
+ inviteUser(appId: string, data: {
1044
+ email: string;
1045
+ role?: "admin" | "member";
1046
+ expiresAt?: string;
1047
+ sendEmail?: boolean;
1048
+ note?: string;
1049
+ source?: string;
1050
+ initialProperties?: Record<string, unknown>;
645
1051
  }): Promise<any>;
646
1052
  /**
647
1053
  * Set a member's display name and/or avatar URL
@@ -661,6 +1067,193 @@ export declare class ApiClient {
661
1067
  rebuildUserSearchText(appId: string): Promise<{
662
1068
  count: number;
663
1069
  }>;
1070
+ /**
1071
+ * One page of an app's users from the user index
1072
+ * (`POST /admin/api/apps/:appId/users/query`): the records-query filter and
1073
+ * sort over base fields and `properties.<name>`, at most 1,000 per page.
1074
+ */
1075
+ queryUsers(appId: string, body: {
1076
+ filter?: Record<string, unknown>;
1077
+ sort?: unknown;
1078
+ limit?: number;
1079
+ cursor?: string;
1080
+ }): Promise<{
1081
+ items: any[];
1082
+ hasMore: boolean;
1083
+ nextCursor?: string;
1084
+ prevCursor?: string;
1085
+ meta: any;
1086
+ }>;
1087
+ /** How many of an app's users match (`POST /admin/api/apps/:appId/users/count`). */
1088
+ countUsers(appId: string, body: {
1089
+ filter?: Record<string, unknown>;
1090
+ }): Promise<{
1091
+ count: number;
1092
+ meta: any;
1093
+ }>;
1094
+ /**
1095
+ * The state of an app's user index (`GET /admin/api/apps/:appId/users/index`):
1096
+ * the generation, each shard with its bound and counts, superseded
1097
+ * generations, a rebuild in progress, queued applies, the last apply and
1098
+ * reconciliation, the limits and whether the shard ceiling is reached.
1099
+ */
1100
+ getUserIndexStatus(appId: string): Promise<any>;
1101
+ /**
1102
+ * Start a report of which user metadata categories still hold rows on the
1103
+ * app's current members (`POST /admin/api/apps/:appId/users/metadata-report`).
1104
+ */
1105
+ startUserMetadataReport(appId: string): Promise<{
1106
+ ok: boolean;
1107
+ runId: string;
1108
+ resourceType: string;
1109
+ status: string;
1110
+ statusUrl: string;
1111
+ }>;
1112
+ /**
1113
+ * Read a user metadata report run, or the app's newest when `runId` is
1114
+ * absent (`GET /admin/api/apps/:appId/users/metadata-report`).
1115
+ */
1116
+ getUserMetadataReport(appId: string, runId?: string): Promise<any>;
1117
+ /** Start building the next generation of an app's user index (`POST /admin/api/apps/:appId/users/index/rebuild`). */
1118
+ rebuildUserIndex(appId: string): Promise<{
1119
+ ok: boolean;
1120
+ generation: number;
1121
+ build: any;
1122
+ }>;
1123
+ /**
1124
+ * Run one revalidation slice of an app's user index now
1125
+ * (`POST /admin/api/apps/:appId/users/index/reconcile`), answered when it is
1126
+ * done; `started: false` while the app is being deleted.
1127
+ */
1128
+ reconcileUserIndex(appId: string): Promise<UserIndexReconcileAnswer>;
1129
+ /**
1130
+ * Start (or find) a walk over an app's users with the admin as its starter
1131
+ * (`POST /admin/api/apps/:appId/users/walks`); `existing` says the key named
1132
+ * a walk that already existed.
1133
+ */
1134
+ startUserWalk(appId: string, body: UserWalkStartBody): Promise<UserWalkStartAnswer>;
1135
+ /** A users walk by its run id (`GET /admin/api/apps/:appId/users/walks/:runId`). */
1136
+ getUserWalk(appId: string, runId: string): Promise<UserWalkAnswer>;
1137
+ /** Stop a users walk (`POST /admin/api/apps/:appId/users/walks/:runId/terminate`); batches in flight finish. */
1138
+ terminateUserWalk(appId: string, runId: string): Promise<UserWalkAnswer & {
1139
+ terminated: boolean;
1140
+ }>;
1141
+ /**
1142
+ * An app's user index limit overrides and the limits in effect, with the
1143
+ * property caps beside them (`GET /admin/api/apps/:appId/users/index/limits`).
1144
+ */
1145
+ getUserIndexLimits(appId: string): Promise<UserIndexLimitsAnswer>;
1146
+ /**
1147
+ * Set (a positive integer) or clear (`null`) an app's user index limit
1148
+ * overrides (`PATCH /admin/api/apps/:appId/users/index/limits`).
1149
+ */
1150
+ patchUserIndexLimits(appId: string, body: {
1151
+ shardThreshold?: number | null;
1152
+ shardBytes?: number | null;
1153
+ shardCeiling?: number | null;
1154
+ maxFields?: number | null;
1155
+ maxUnique?: number | null;
1156
+ maxIndexed?: number | null;
1157
+ maxBytes?: number | null;
1158
+ }): Promise<UserIndexLimitsAnswer>;
1159
+ /**
1160
+ * An app's user properties schema (`GET /admin/api/apps/:appId/users/properties`):
1161
+ * the active version, a push being validated, the removed fields and the caps.
1162
+ * While a push validates, this read also resumes its walk.
1163
+ */
1164
+ getUserProperties(appId: string): Promise<UserPropertiesState>;
1165
+ /**
1166
+ * Push the text of `user-properties.toml` (`PUT /admin/api/apps/:appId/users/properties`):
1167
+ * 200 `published` or `unchanged`, 400 when refused; `dryRun` judges it and
1168
+ * writes nothing.
1169
+ */
1170
+ pushUserProperties(appId: string, body: {
1171
+ schema: string;
1172
+ expectedModifiedAt?: string | null;
1173
+ }, options?: {
1174
+ dryRun?: boolean;
1175
+ }): Promise<UserPropertiesPushAnswer>;
1176
+ /**
1177
+ * The current version of each of an app's `schemas/` files
1178
+ * (`GET /admin/api/apps/:appId/schemas`); a tombstoned file only with
1179
+ * `includeTombstoned`.
1180
+ */
1181
+ listSchemaFiles(appId: string, options?: {
1182
+ includeTombstoned?: boolean;
1183
+ }): Promise<{
1184
+ items: SchemaFileMeta[];
1185
+ hasMore: boolean;
1186
+ }>;
1187
+ /**
1188
+ * One version of a `schemas/` file, the current one unless `version` names
1189
+ * another (`GET /admin/api/apps/:appId/schemas/:file`); 404
1190
+ * `SCHEMA_FILE_NOT_FOUND` or `SCHEMA_VERSION_NOT_FOUND`.
1191
+ */
1192
+ getSchemaFile(appId: string, file: string, options?: {
1193
+ version?: number;
1194
+ }): Promise<SchemaFileVersion>;
1195
+ /**
1196
+ * Push the text of `schemas/<file>.toml` with its compiled defs
1197
+ * (`PUT /admin/api/apps/:appId/schemas/:file`): `created` or `unchanged`;
1198
+ * 409 `CONFLICT` when the current version is not `expectedVersion`.
1199
+ */
1200
+ pushSchemaFile(appId: string, file: string, body: {
1201
+ source: string;
1202
+ compiled?: {
1203
+ defs: Record<string, unknown>;
1204
+ provenance?: Record<string, SchemaFileProvenance>;
1205
+ };
1206
+ expectedVersion?: number;
1207
+ }): Promise<SchemaPushAnswer>;
1208
+ /**
1209
+ * Write a tombstone version of a `schemas/` file (`PUT
1210
+ * /admin/api/apps/:appId/schemas/:file` with `{ tombstone: true }`), pinned
1211
+ * to `expectedVersion` when given.
1212
+ */
1213
+ tombstoneSchemaFile(appId: string, file: string, expectedVersion?: number): Promise<SchemaPushAnswer>;
1214
+ /**
1215
+ * The source of every live `schemas/` file, or of `files` only
1216
+ * (`POST /admin/api/apps/:appId/schemas/pull`); a named file with no live
1217
+ * version is listed under `missing`.
1218
+ */
1219
+ pullSchemaFiles(appId: string, files?: string[]): Promise<{
1220
+ items: SchemaPullItem[];
1221
+ missing: string[];
1222
+ }>;
1223
+ /** One member with their properties (`GET /admin/api/apps/:appId/users/:userId`); 404 `USER_NOT_FOUND` for a user who is no member. */
1224
+ getAppUser(appId: string, userId: string): Promise<AppUserWithProperties>;
1225
+ /**
1226
+ * The member who holds a unique property value or a unique constraint's
1227
+ * values (`POST /admin/api/apps/:appId/users/get-by`): `{ user }`, null when
1228
+ * no member holds it.
1229
+ */
1230
+ getAppUserBy(appId: string, selector: {
1231
+ field: string;
1232
+ value: unknown;
1233
+ } | {
1234
+ constraint: string;
1235
+ values: unknown[];
1236
+ }): Promise<{
1237
+ user: AppUserWithProperties | null;
1238
+ }>;
1239
+ /** Apply a property write to one member (`PATCH /admin/api/apps/:appId/users/:userId/properties`); answers the member after it. */
1240
+ setAppUserProperties(appId: string, userId: string, body: AppUserPropertiesWrite): Promise<AppUserWithProperties>;
1241
+ /** An aggregate over an app's users (`POST /admin/api/apps/:appId/users/aggregate`). */
1242
+ aggregateUsers(appId: string, body: {
1243
+ options: {
1244
+ operations: Array<{
1245
+ type: string;
1246
+ field?: string;
1247
+ }>;
1248
+ groupBy?: unknown[];
1249
+ filter?: Record<string, unknown>;
1250
+ sort?: unknown;
1251
+ limit?: number;
1252
+ };
1253
+ }): Promise<{
1254
+ result: any[];
1255
+ meta: any;
1256
+ }>;
664
1257
  listUsers(appId: string, params?: {
665
1258
  name?: string;
666
1259
  email?: string;
@@ -686,21 +1279,13 @@ export declare class ApiClient {
686
1279
  * routes already existed; nothing on the CLI reached them.
687
1280
  */
688
1281
  setUserAvailability(appId: string, userId: string, action: "enable" | "disable"): Promise<void>;
1282
+ updateUserRole(appId: string, userId: string, role: "admin" | "member"): Promise<any>;
689
1283
  /**
690
- * #2803 — the platform's feature flags. A server-owned admin toggle with a
691
- * console but, until now, no CLI: the same "one control, both surfaces" rule
692
- * the carrying types get.
693
- */
694
- listFeatureFlags(): Promise<any>;
695
- /**
696
- * The flag itself, not the `{ flag }` envelope the route answers with —
697
- * `feature-flags get` prints the key, the enabled state and the per-app
698
- * overrides, and reading them off the envelope printed a blank row.
1284
+ * Make the app user with `newOwnerEmail` the app's owner; the previous
1285
+ * owner becomes an admin. The email resolves to a userId through
1286
+ * {@link lookupUserByEmail}, and an email no user of the app has rejects
1287
+ * with a message naming it.
699
1288
  */
700
- getFeatureFlag(flagKey: string): Promise<any>;
701
- /** Same envelope, same unwrap: `enable`/`disable` print the updated flag. */
702
- setFeatureFlagEnabled(flagKey: string, enabled: boolean): Promise<any>;
703
- updateUserRole(appId: string, userId: string, role: "admin" | "member"): Promise<any>;
704
1289
  transferOwnership(appId: string, newOwnerEmail: string): Promise<void>;
705
1290
  transferAdminOwnership(appId: string, adminId: string): Promise<any>;
706
1291
  listAppAdmins(appId: string): Promise<any[]>;
@@ -722,6 +1307,19 @@ export declare class ApiClient {
722
1307
  nextCursor?: string;
723
1308
  hasMore?: boolean;
724
1309
  }>;
1310
+ /**
1311
+ * `GET /app/{appId}/api/invitations/{invitationId}` — one invitation with
1312
+ * its `inviteToken` (the bearer credential an accept link carries) and its
1313
+ * `status`. Readable by an app admin/owner or the inviter.
1314
+ */
1315
+ getInvitation(appId: string, invitationId: string): Promise<{
1316
+ invitationId: string;
1317
+ email: string;
1318
+ role: string;
1319
+ inviteToken: string | null;
1320
+ status: "pending" | "expired" | "accepted";
1321
+ [key: string]: any;
1322
+ }>;
725
1323
  createInvitation(appId: string, data: {
726
1324
  email: string;
727
1325
  role: "admin" | "member";
@@ -767,7 +1365,7 @@ export declare class ApiClient {
767
1365
  /**
768
1366
  * An integration's named configs. Test cases pin a config by NAME so the
769
1367
  * sidecar is portable across apps (#2769); this is the map pull and push
770
- * resolve that name through, the same way prompts/workflows/scripts do.
1368
+ * resolve that name through, the same way prompts do.
771
1369
  */
772
1370
  listIntegrationConfigs(appId: string, integrationId: string): Promise<{
773
1371
  items: any[];
@@ -783,7 +1381,7 @@ export declare class ApiClient {
783
1381
  deleteIntegration(appId: string, integrationId: string, hard?: boolean | {
784
1382
  hard?: boolean;
785
1383
  }): Promise<ArchiveEnvelope>;
786
- testIntegration(appId: string, integrationId: string, payload: any): Promise<any>;
1384
+ testIntegration(appId: string, integrationId: string, payload: IntegrationTestPayload): Promise<any>;
787
1385
  listIntegrationLogs(appId: string, integrationId: string, params?: {
788
1386
  limit?: number;
789
1387
  status?: string;
@@ -803,7 +1401,7 @@ export declare class ApiClient {
803
1401
  }): Promise<any>;
804
1402
  updateAppSecret(appId: string, secretId: string, payload: {
805
1403
  value?: string;
806
- summary?: string;
1404
+ summary?: string | null;
807
1405
  }): Promise<any>;
808
1406
  upsertAppSecret(appId: string, key: string, payload: {
809
1407
  value: string;
@@ -1198,25 +1796,6 @@ export declare class ApiClient {
1198
1796
  configName?: string;
1199
1797
  description?: string;
1200
1798
  }): Promise<any>;
1201
- listScripts(appId: string): Promise<{
1202
- items: any[];
1203
- }>;
1204
- getScript(appId: string, scriptId: string): Promise<any>;
1205
- /**
1206
- * List a script's versioned configs (the `ScriptConfig` rows). Each config
1207
- * is a distinct block version: `configId` is the stable version selector,
1208
- * `contentHash` is its content identity, and `status` reports whether it is
1209
- * `active`/`draft`/`archived`. The script header's `activeConfigId` names
1210
- * the version that was live. Used by `scripts configs list`.
1211
- */
1212
- listScriptConfigs(appId: string, scriptId: string): Promise<{
1213
- items: any[];
1214
- }>;
1215
- /**
1216
- * One version of a script, body included. A body the server cannot load
1217
- * answers a 404 naming the version rather than an empty body.
1218
- */
1219
- getScriptConfig(appId: string, scriptId: string, configId: string): Promise<any>;
1220
1799
  getPromptSchema(appId: string, promptId: string): Promise<{
1221
1800
  promptId: string;
1222
1801
  promptKey: string;
@@ -1304,46 +1883,44 @@ export declare class ApiClient {
1304
1883
  comparisonGroup?: string;
1305
1884
  testCaseIds?: string[];
1306
1885
  }): Promise<any>;
1886
+ /**
1887
+ * One page of a block's test runs, newest first. The endpoint paginates
1888
+ * (default 50, cap 100) and reports `nextCursor`.
1889
+ */
1307
1890
  listTestRuns(appId: string, blockType: "prompt" | "integration", blockId: string, params?: {
1308
- limit?: number;
1309
- comparisonGroup?: string;
1310
- }): Promise<{
1311
- items: any[];
1312
- }>;
1313
- listWorkflows(appId: string, params?: {
1314
- status?: string;
1315
1891
  limit?: number;
1316
1892
  cursor?: string;
1317
1893
  }): Promise<{
1318
1894
  items: any[];
1319
1895
  hasMore?: boolean;
1320
- nextCursor?: string | null;
1321
- }>;
1322
- getWorkflow(appId: string, workflowId: string): Promise<any>;
1323
- listWorkflowConfigs(appId: string, workflowId: string): Promise<{
1324
- items: any[];
1896
+ nextCursor?: string;
1325
1897
  }>;
1326
- getWorkflowConfig(appId: string, workflowId: string, configId: string): Promise<any>;
1898
+ /**
1899
+ * One of a block's test runs: the object `listTestRuns` lists for it. The
1900
+ * run id travels as one path segment, so a `/`, `?` or `#` in it can never
1901
+ * reach the listing or the query.
1902
+ */
1903
+ getTestRun(appId: string, blockType: "prompt" | "integration", blockId: string, runId: string): Promise<any>;
1327
1904
  getAnalyticsTopUsers(appId: string, params?: {
1328
1905
  windowDays?: number;
1329
1906
  limit?: number;
1330
- } & AnalyticsTestUsersParam): Promise<AnalyticsTopUsersResponse>;
1907
+ } & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsTopUsersResponse>;
1331
1908
  getAnalyticsIntegrationMetrics(appId: string, params?: {
1332
1909
  windowDays?: number;
1333
- }): Promise<AnalyticsIntegrationMetricsResponse>;
1334
- getAnalyticsOverviewDau(appId: string, params?: AnalyticsTestUsersParam): Promise<AnalyticsMetricResponse>;
1335
- getAnalyticsOverviewWau(appId: string, params?: AnalyticsTestUsersParam): Promise<AnalyticsMetricResponse>;
1336
- getAnalyticsOverviewMau(appId: string, params?: AnalyticsTestUsersParam): Promise<AnalyticsMetricResponse>;
1910
+ } & AnalyticsFreshParam): Promise<AnalyticsIntegrationMetricsResponse>;
1911
+ getAnalyticsOverviewDau(appId: string, params?: AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsMetricResponse>;
1912
+ getAnalyticsOverviewWau(appId: string, params?: AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsMetricResponse>;
1913
+ getAnalyticsOverviewMau(appId: string, params?: AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsMetricResponse>;
1337
1914
  getAnalyticsOverviewGrowth(appId: string, params?: {
1338
1915
  windowDays?: number;
1339
- } & AnalyticsTestUsersParam): Promise<AnalyticsGrowthResponse>;
1916
+ } & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsGrowthResponse>;
1340
1917
  getAnalyticsDailyActive(appId: string, params?: {
1341
1918
  windowDays?: number;
1342
- } & AnalyticsTestUsersParam): Promise<AnalyticsDailyActiveResponse>;
1919
+ } & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsDailyActiveResponse>;
1343
1920
  getAnalyticsRollingActive(appId: string, params?: {
1344
1921
  windowDays?: number;
1345
- } & AnalyticsTestUsersParam): Promise<AnalyticsDailyActiveResponse>;
1346
- getAnalyticsCohortRetention(appId: string, params?: AnalyticsTestUsersParam): Promise<AnalyticsCohortResponse>;
1922
+ } & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsDailyActiveResponse>;
1923
+ getAnalyticsCohortRetention(appId: string, params?: AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsCohortResponse>;
1347
1924
  getAnalyticsUserSearch(appId: string, params: {
1348
1925
  q?: string;
1349
1926
  limit?: number;
@@ -1354,28 +1931,45 @@ export declare class ApiClient {
1354
1931
  signupEndDay?: string;
1355
1932
  /** #3127 — row offset, accepted only with a signup filter. */
1356
1933
  offset?: number;
1357
- } & AnalyticsTestUsersParam): Promise<AnalyticsUserSearchResponse>;
1358
- getAnalyticsUserDetail(appId: string, userUlid: string): Promise<AnalyticsUserDetailResponse>;
1359
- getAnalyticsUserSnapshot(appId: string, userUlid: string): Promise<AnalyticsUserSnapshotResponse>;
1934
+ } & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsUserSearchResponse>;
1935
+ getAnalyticsUserDetail(appId: string, userUlid: string, params?: AnalyticsFreshParam): Promise<AnalyticsUserDetailResponse>;
1936
+ getAnalyticsUserSnapshot(appId: string, userUlid: string, params?: AnalyticsFreshParam): Promise<AnalyticsUserSnapshotResponse>;
1937
+ /**
1938
+ * #5251 — `path` with `params` set as `get` sets them, then one appended
1939
+ * `filter[<field>][<operator>]` entry per filter, in order. `get`'s record
1940
+ * cannot hold two entries under one key; the server ANDs them all.
1941
+ */
1942
+ private analyticsFilteredGet;
1360
1943
  getAnalyticsEvents(appId: string, params?: {
1361
1944
  windowDays?: number;
1362
1945
  page?: number;
1363
1946
  [key: string]: any;
1364
- } & AnalyticsTestUsersParam): Promise<AnalyticsEventsResponse>;
1947
+ } & AnalyticsTestUsersParam & AnalyticsFreshParam, filters?: AnalyticsFilterParam[]): Promise<AnalyticsEventsResponse>;
1365
1948
  getAnalyticsEventsGrouped(appId: string, params?: {
1366
1949
  groupBy?: string;
1367
1950
  windowDays?: number;
1368
1951
  [key: string]: any;
1369
- } & AnalyticsTestUsersParam): Promise<AnalyticsEventsGroupedResponse>;
1952
+ } & AnalyticsTestUsersParam & AnalyticsFreshParam, filters?: AnalyticsFilterParam[]): Promise<AnalyticsEventsGroupedResponse>;
1370
1953
  getAnalyticsErrorsGroups(appId: string, params?: {
1371
1954
  windowDays?: number;
1372
1955
  limit?: number;
1373
1956
  [key: string]: any;
1374
- }): Promise<AnalyticsErrorsGroupsResponse>;
1957
+ } & AnalyticsFreshParam, filters?: AnalyticsFilterParam[]): Promise<AnalyticsErrorsGroupsResponse>;
1958
+ /** The app's db3 query shapes that read the most rows (#5244). */
1959
+ getAnalyticsDb3Queries(appId: string, params?: {
1960
+ windowDays?: number;
1961
+ limit?: number;
1962
+ orderBy?: "rowsRead" | "rowsPerReturned";
1963
+ } & AnalyticsFreshParam): Promise<AnalyticsDb3QueriesResponse>;
1964
+ /** The app's request wall time and DynamoDB round trips per endpoint and function (#5244). */
1965
+ getAnalyticsRequests(appId: string, params?: {
1966
+ windowDays?: number;
1967
+ limit?: number;
1968
+ } & AnalyticsFreshParam): Promise<AnalyticsRequestsResponse>;
1375
1969
  getAnalyticsTopPrompts(appId: string, params?: {
1376
1970
  windowDays?: number;
1377
1971
  limit?: number;
1378
- }): Promise<TopPromptsResponse>;
1972
+ } & AnalyticsFreshParam): Promise<TopPromptsResponse>;
1379
1973
  /**
1380
1974
  * The signed-in admin's own profile, `role` included.
1381
1975
  *
@@ -1406,31 +2000,20 @@ export declare class ApiClient {
1406
2000
  role?: "admin" | "super-admin";
1407
2001
  }): Promise<any>;
1408
2002
  reindexAdmin(adminId: string): Promise<void>;
1409
- listAllAdminInvitations(): Promise<any[]>;
2003
+ /** `reindexAdmin` with the route's answer, for callers that print it. */
2004
+ reindexAdminWithResult(adminId: string): Promise<{
2005
+ success: boolean;
2006
+ adminId: string;
2007
+ reindexedAt: string;
2008
+ }>;
2009
+ /** One address's pending admin invitations; the route requires the address. */
2010
+ listAllAdminInvitations(email: string): Promise<any[]>;
1410
2011
  createGlobalAdminInvitation(data: {
1411
2012
  email: string;
1412
2013
  appCreationLimit?: number;
1413
2014
  expiresInDays?: number;
1414
2015
  }): Promise<any>;
1415
2016
  deleteGlobalAdminInvitation(invitationId: string): Promise<void>;
1416
- listPromptCatalog(params?: {
1417
- status?: string;
1418
- limit?: number;
1419
- cursor?: string;
1420
- }): Promise<any>;
1421
- getPromptCatalogItem(catalogId: string): Promise<any>;
1422
- createPromptCatalogItem(payload: any): Promise<any>;
1423
- updatePromptCatalogItem(catalogId: string, payload: any): Promise<any>;
1424
- deletePromptCatalogItem(catalogId: string): Promise<void>;
1425
- listIntegrationCatalog(params?: {
1426
- status?: string;
1427
- limit?: number;
1428
- cursor?: string;
1429
- }): Promise<any>;
1430
- getIntegrationCatalogItem(catalogId: string): Promise<any>;
1431
- createIntegrationCatalogItem(payload: any): Promise<any>;
1432
- updateIntegrationCatalogItem(catalogId: string, payload: any): Promise<any>;
1433
- deleteIntegrationCatalogItem(catalogId: string): Promise<void>;
1434
2017
  startBatchTests(appId: string, blockType: "prompt" | "integration", blockId: string, payload?: {
1435
2018
  comparisonGroup?: string;
1436
2019
  overrideConfigId?: string;
@@ -1497,6 +2080,15 @@ export declare class ApiClient {
1497
2080
  sentTo: string;
1498
2081
  error?: string;
1499
2082
  }>;
2083
+ /**
2084
+ * Render the saved template (or the built-in default) for an email type
2085
+ * without sending it. `variables` override the type's sample values. The
2086
+ * app id and the type are each encoded as one path segment, so no value of
2087
+ * either can select another route.
2088
+ */
2089
+ previewEmailTemplate(appId: string, emailType: string, payload?: {
2090
+ variables?: Record<string, string | number | boolean | null>;
2091
+ }): Promise<EmailTemplatePreview>;
1500
2092
  createToken(appId: string, data: {
1501
2093
  name: string;
1502
2094
  ttl?: string;
@@ -2181,11 +2773,12 @@ export declare class ApiClient {
2181
2773
  }>;
2182
2774
  /**
2183
2775
  * Apply an ordered multi-model create/patch/delete blob atomically (issue
2184
- * #1964 Phase 4, wrapping the #1517 `bulkUpdate` facade). All-or-nothing:
2185
- * a validation failure commits nothing. Returns the facade's
2186
- * `{ applied, added, updated, deleted }`.
2776
+ * #1964 Phase 4, wrapping the #1517 `bulkUpdate` facade): `POST
2777
+ * records/batch`, at most 100 operations. All-or-nothing: a validation
2778
+ * failure commits nothing. Returns the facade's `{ applied, added,
2779
+ * updated, deleted }`, and on a db3 `reads` when the batch carried reads.
2187
2780
  */
2188
- bulkDocumentRecords(appId: string, documentId: string, operations: Array<Record<string, unknown>>, extra?: {
2781
+ batchDocumentRecords(appId: string, documentId: string, operations: Array<Record<string, unknown>>, extra?: {
2189
2782
  documentFormat?: 1 | 3;
2190
2783
  }): Promise<{
2191
2784
  applied: number;
@@ -2204,6 +2797,7 @@ export declare class ApiClient {
2204
2797
  id: string;
2205
2798
  created: boolean;
2206
2799
  }>;
2800
+ reads?: Array<Record<string, any>>;
2207
2801
  }>;
2208
2802
  /** `/app/<app>/api/db3/<id>`, the id encoded: every `db3.*` route's prefix. */
2209
2803
  private db3Path;
@@ -2213,8 +2807,9 @@ export declare class ApiClient {
2213
2807
  }>;
2214
2808
  /**
2215
2809
  * `POST db3/:id/indexes` with `{ model, field | fields, unique?, name? }`,
2216
- * or `{ model, field, members: true }` for a member index → `{ index }`.
2217
- * The route applies the registration rules.
2810
+ * `{ model, field, members: true }` for a member index, or `{ model, field
2811
+ * | fields, kind: "text", on, text? }` for a text index → `{ index }`. The
2812
+ * route applies the registration rules.
2218
2813
  */
2219
2814
  registerDb3Index(appId: string, db3Id: string, body: {
2220
2815
  model: string;
@@ -2223,6 +2818,11 @@ export declare class ApiClient {
2223
2818
  unique?: boolean;
2224
2819
  name?: string;
2225
2820
  members?: boolean;
2821
+ kind?: Db3IndexKind;
2822
+ on?: Db3IndexPlacement;
2823
+ text?: Partial<Db3TextIndexOptions>;
2824
+ /** A `vector` index's options (#5225). */
2825
+ vector?: Db3VectorIndexOptions;
2226
2826
  }): Promise<{
2227
2827
  index: Db3IndexRow;
2228
2828
  }>;
@@ -2231,6 +2831,28 @@ export declare class ApiClient {
2231
2831
  ok: boolean;
2232
2832
  name: string;
2233
2833
  }>;
2834
+ /**
2835
+ * `GET db3/:id/indexes/:name/model` (#5229): a vector index's shared model,
2836
+ * its bytes as uploaded and the `X-Index-Model-*` headers it was uploaded
2837
+ * with.
2838
+ */
2839
+ fetchDb3IndexModel(appId: string, db3Id: string, name: string): Promise<{
2840
+ data: Buffer;
2841
+ generation: number;
2842
+ revision: number;
2843
+ rows: number;
2844
+ trainedAt: string;
2845
+ format: string;
2846
+ }>;
2847
+ /**
2848
+ * `DELETE db3/:id/indexes/:name/model` (#5229) → `{ ok, name, revision }`:
2849
+ * the model (or an upload under way) gone, `revision` the index's new one.
2850
+ */
2851
+ deleteDb3IndexModel(appId: string, db3Id: string, name: string): Promise<{
2852
+ ok: boolean;
2853
+ name: string;
2854
+ revision: number;
2855
+ }>;
2234
2856
  /** The db3 mount of {@link queryDocumentRecords}: `GET db3/:id/records/:model`. */
2235
2857
  queryDb3Records(appId: string, db3Id: string, modelName: string, queryOptions?: {
2236
2858
  filter?: Record<string, any>;
@@ -2249,6 +2871,12 @@ export declare class ApiClient {
2249
2871
  aggregateDb3Records(appId: string, db3Id: string, modelName: string, options: Parameters<ApiClient["aggregateDocumentRecords"]>[3]): Promise<{
2250
2872
  result: unknown;
2251
2873
  }>;
2874
+ /**
2875
+ * `POST db3/:id/records/:model/explain` (#5240): run a query, count or
2876
+ * aggregate on the server, forced onto `index` (or off indexes, `"none"`)
2877
+ * when given, and answer how it read.
2878
+ */
2879
+ explainDb3Read(appId: string, db3Id: string, modelName: string, body: Db3ExplainRequest): Promise<Db3ExplainAnswer>;
2252
2880
  /** The db3 mount of {@link saveDocumentRecord}: `POST db3/:id/records/:model`. */
2253
2881
  saveDb3Record(appId: string, db3Id: string, modelName: string, body: {
2254
2882
  id: string;
@@ -2268,8 +2896,19 @@ export declare class ApiClient {
2268
2896
  deleteDb3Record(appId: string, db3Id: string, modelName: string, recordId: string): Promise<{
2269
2897
  deleted: boolean;
2270
2898
  }>;
2271
- /** The db3 mount of {@link bulkDocumentRecords}: `POST db3/:id/records/bulk`. */
2272
- bulkDb3Records(appId: string, db3Id: string, operations: Array<Record<string, unknown>>): ReturnType<ApiClient["bulkDocumentRecords"]>;
2899
+ /** The db3 mount of {@link batchDocumentRecords}: `POST db3/:id/records/batch`. */
2900
+ batchDb3Records(appId: string, db3Id: string, operations: Array<Record<string, unknown>>): ReturnType<ApiClient["batchDocumentRecords"]>;
2901
+ /**
2902
+ * Several reads of a db3 in one request (#5243): `POST db3/:id/records/batch-read`,
2903
+ * each answered at its index from one state of the db3. `atomic: false`
2904
+ * answers a refused read in its place rather than refusing the request.
2905
+ */
2906
+ batchReadDb3Records(appId: string, db3Id: string, operations: Array<Record<string, unknown>>, options?: {
2907
+ atomic?: boolean;
2908
+ }): Promise<{
2909
+ results: Array<Record<string, any>>;
2910
+ cost?: Record<string, unknown>;
2911
+ }>;
2273
2912
  /** The db3 mount of {@link getDocumentSchema}: `GET db3/:id/schema`. */
2274
2913
  getDb3Schema(appId: string, db3Id: string): Promise<any>;
2275
2914
  /** `?limit=&cursor=` for a listing. */
@@ -2392,6 +3031,20 @@ export declare class ApiClient {
2392
3031
  nextCursor?: string;
2393
3032
  hasMore?: boolean;
2394
3033
  }>;
3034
+ /**
3035
+ * Every db3 a member reaches through the admin API (#5253): held, shared
3036
+ * with them, then app access, each row with its `via`; `via` narrows to
3037
+ * some of the three ways.
3038
+ */
3039
+ listDb3ForUser(appId: string, userId: string, params?: {
3040
+ via?: string[];
3041
+ limit?: number;
3042
+ cursor?: string;
3043
+ }): Promise<{
3044
+ items: any[];
3045
+ nextCursor?: string;
3046
+ hasMore?: boolean;
3047
+ }>;
2395
3048
  /** Transfer a db3 to `to` (`app` or `user:<userId>`) through the admin API (#4804). */
2396
3049
  transferDb3(appId: string, db3Id: string, to: string): Promise<any>;
2397
3050
  /** Remove or restore a db3's owner row through the admin API (#4804): `{ id, custodian, ownerRow, changed }`. */