@metabase/client 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +661 -0
  3. package/README.md +488 -2
  4. package/dist/auth/credential.d.ts +2 -0
  5. package/dist/auth/credential.js +61 -0
  6. package/dist/auth/oauth-login.d.ts +2 -0
  7. package/dist/auth/oauth-login.js +2 -0
  8. package/dist/auth/oauth-session.d.ts +2 -0
  9. package/dist/auth/oauth-session.js +31 -0
  10. package/dist/card-B6merEUN.d.ts +1392 -0
  11. package/dist/card-BZx4NSr-.d.ts +33 -0
  12. package/dist/client-DNRvXFRm.d.ts +3276 -0
  13. package/dist/client.d.ts +2 -0
  14. package/dist/client.js +95 -0
  15. package/dist/collection-Bib61WiV.d.ts +294 -0
  16. package/dist/collection-CqtGPi4W.d.ts +39 -0
  17. package/dist/content-translation-zfUkE_OG.d.ts +8 -0
  18. package/dist/credential-6aOEGqMH.d.ts +30 -0
  19. package/dist/cron-DThzerR6.d.ts +9 -0
  20. package/dist/csv-upload--K35QedP.d.ts +8 -0
  21. package/dist/dashboard-XTe46250.d.ts +38 -0
  22. package/dist/dashboard-z9i1VUZC.d.ts +970 -0
  23. package/dist/data-action-rS27f2Ji.d.ts +95 -0
  24. package/dist/database-BLUMlywE.d.ts +997 -0
  25. package/dist/database-DqTespfa.d.ts +27 -0
  26. package/dist/dataset-C6lX1-cr.d.ts +4144 -0
  27. package/dist/dataset-Cj3XuKLe.d.ts +23 -0
  28. package/dist/dependency-D8Qs5Xdx.d.ts +827 -0
  29. package/dist/dependency-fN5_7a22.d.ts +299 -0
  30. package/dist/document-oZNDbDfx.d.ts +115 -0
  31. package/dist/domain/card.d.ts +2 -0
  32. package/dist/domain/card.js +140 -0
  33. package/dist/domain/collection.d.ts +2 -0
  34. package/dist/domain/collection.js +137 -0
  35. package/dist/domain/content-translation.d.ts +2 -0
  36. package/dist/domain/content-translation.js +5 -0
  37. package/dist/domain/cron.d.ts +2 -0
  38. package/dist/domain/cron.js +5 -0
  39. package/dist/domain/dashboard.d.ts +2 -0
  40. package/dist/domain/dashboard.js +194 -0
  41. package/dist/domain/data-action.d.ts +2 -0
  42. package/dist/domain/data-action.js +85 -0
  43. package/dist/domain/database.d.ts +2 -0
  44. package/dist/domain/database.js +56 -0
  45. package/dist/domain/dataset.d.ts +2 -0
  46. package/dist/domain/dataset.js +56 -0
  47. package/dist/domain/dependency.d.ts +2 -0
  48. package/dist/domain/dependency.js +165 -0
  49. package/dist/domain/document.d.ts +2 -0
  50. package/dist/domain/document.js +94 -0
  51. package/dist/domain/eid-translation.d.ts +2 -0
  52. package/dist/domain/eid-translation.js +36 -0
  53. package/dist/domain/embedding.d.ts +2 -0
  54. package/dist/domain/embedding.js +9 -0
  55. package/dist/domain/erd.d.ts +2 -0
  56. package/dist/domain/erd.js +45 -0
  57. package/dist/domain/field.d.ts +2 -0
  58. package/dist/domain/field.js +268 -0
  59. package/dist/domain/git-sync.d.ts +2 -0
  60. package/dist/domain/git-sync.js +147 -0
  61. package/dist/domain/glossary.d.ts +2 -0
  62. package/dist/domain/glossary.js +30 -0
  63. package/dist/domain/library.d.ts +2 -0
  64. package/dist/domain/library.js +83 -0
  65. package/dist/domain/measure.d.ts +2 -0
  66. package/dist/domain/measure.js +41 -0
  67. package/dist/domain/metric.d.ts +2 -0
  68. package/dist/domain/metric.js +139 -0
  69. package/dist/domain/moderation-review.d.ts +2 -0
  70. package/dist/domain/moderation-review.js +31 -0
  71. package/dist/domain/notification.d.ts +2 -0
  72. package/dist/domain/notification.js +138 -0
  73. package/dist/domain/parameter.d.ts +2 -0
  74. package/dist/domain/parameter.js +109 -0
  75. package/dist/domain/permission.d.ts +2 -0
  76. package/dist/domain/permission.js +36 -0
  77. package/dist/domain/pulse.d.ts +2 -0
  78. package/dist/domain/pulse.js +133 -0
  79. package/dist/domain/query.d.ts +2 -0
  80. package/dist/domain/query.js +13 -0
  81. package/dist/domain/replacement.d.ts +2 -0
  82. package/dist/domain/replacement.js +93 -0
  83. package/dist/domain/revision.d.ts +2 -0
  84. package/dist/domain/revision.js +63 -0
  85. package/dist/domain/search.d.ts +2 -0
  86. package/dist/domain/search.js +63 -0
  87. package/dist/domain/segment.d.ts +2 -0
  88. package/dist/domain/segment.js +44 -0
  89. package/dist/domain/session-properties.d.ts +2 -0
  90. package/dist/domain/session-properties.js +14 -0
  91. package/dist/domain/setting.d.ts +2 -0
  92. package/dist/domain/setting.js +22 -0
  93. package/dist/domain/setup.d.ts +2 -0
  94. package/dist/domain/setup.js +21 -0
  95. package/dist/domain/snippet.d.ts +2 -0
  96. package/dist/domain/snippet.js +38 -0
  97. package/dist/domain/table.d.ts +2 -0
  98. package/dist/domain/table.js +156 -0
  99. package/dist/domain/text.d.ts +5 -0
  100. package/dist/domain/text.js +6 -0
  101. package/dist/domain/timeline.d.ts +2 -0
  102. package/dist/domain/timeline.js +97 -0
  103. package/dist/domain/transform-dag-run.d.ts +2 -0
  104. package/dist/domain/transform-dag-run.js +19 -0
  105. package/dist/domain/transform-inspector.d.ts +2 -0
  106. package/dist/domain/transform-inspector.js +142 -0
  107. package/dist/domain/transform-job.d.ts +2 -0
  108. package/dist/domain/transform-job.js +109 -0
  109. package/dist/domain/transform-python.d.ts +2 -0
  110. package/dist/domain/transform-python.js +39 -0
  111. package/dist/domain/transform-tag.d.ts +2 -0
  112. package/dist/domain/transform-tag.js +17 -0
  113. package/dist/domain/transform-test.d.ts +2 -0
  114. package/dist/domain/transform-test.js +176 -0
  115. package/dist/domain/transform.d.ts +2 -0
  116. package/dist/domain/transform.js +235 -0
  117. package/dist/domain/upload.d.ts +2 -0
  118. package/dist/domain/upload.js +13 -0
  119. package/dist/domain/user.d.ts +2 -0
  120. package/dist/domain/user.js +16 -0
  121. package/dist/eid-translation-nuhr8St2.d.ts +143 -0
  122. package/dist/embedding-Cz3RUJYf.d.ts +10 -0
  123. package/dist/erd-BdeFEeSy.d.ts +842 -0
  124. package/dist/erd-BujD227Y.d.ts +51 -0
  125. package/dist/errors-DdMlaXqq.js +330 -0
  126. package/dist/errors.d.ts +2 -0
  127. package/dist/errors.js +189 -0
  128. package/dist/features-CnFkUCj2.d.ts +261 -0
  129. package/dist/field-BCRO19mk.d.ts +2547 -0
  130. package/dist/field-Bqn10Fq_.d.ts +50 -0
  131. package/dist/git-sync-DNXrNVCW.d.ts +258 -0
  132. package/dist/git-sync-gAMKsZgN.d.ts +205 -0
  133. package/dist/glossary-CHK3elPj.d.ts +35 -0
  134. package/dist/glossary-CqFlzW33.d.ts +15 -0
  135. package/dist/http/errors.d.ts +2 -0
  136. package/dist/http/errors.js +2 -0
  137. package/dist/http/oauth.d.ts +2 -0
  138. package/dist/http/oauth.js +201 -0
  139. package/dist/http/retry.d.ts +19 -0
  140. package/dist/http/retry.js +33 -0
  141. package/dist/http/transport.d.ts +2 -0
  142. package/dist/http/transport.js +2 -0
  143. package/dist/index.d.ts +60 -0
  144. package/dist/index.js +62 -0
  145. package/dist/json-CZvjc3--.d.ts +19 -0
  146. package/dist/json-pointer.d.ts +4 -0
  147. package/dist/json-pointer.js +7 -0
  148. package/dist/json.d.ts +2 -0
  149. package/dist/json.js +44 -0
  150. package/dist/known-range-DTOBgTEC.d.ts +7 -0
  151. package/dist/library-Cx9h_RkU.d.ts +228 -0
  152. package/dist/list-BT_bBm9Z.d.ts +7 -0
  153. package/dist/list.d.ts +2 -0
  154. package/dist/list.js +1 -0
  155. package/dist/measure-CuMqPbQX.d.ts +108 -0
  156. package/dist/measure-KuXdjZYJ.d.ts +44 -0
  157. package/dist/metric-yvehaVCS.d.ts +2655 -0
  158. package/dist/moderation-review-B4RUTZ6_.d.ts +56 -0
  159. package/dist/network-error-5g4U1iul.js +62 -0
  160. package/dist/notification-BT2TDAd_.d.ts +379 -0
  161. package/dist/notification-BiegPoSD.d.ts +22 -0
  162. package/dist/oauth-C4ordeoJ.d.ts +59 -0
  163. package/dist/oauth-login-CJsT_3EE.d.ts +19 -0
  164. package/dist/oauth-login-D734Jvbq.js +179 -0
  165. package/dist/oauth-session-BlIlcd8Q.d.ts +6 -0
  166. package/dist/paginate-DZWvWvbm.d.ts +24 -0
  167. package/dist/paginate.d.ts +2 -0
  168. package/dist/paginate.js +49 -0
  169. package/dist/parameter-ak-J-IOj.d.ts +190 -0
  170. package/dist/permission-BnCQw5Kp.d.ts +149 -0
  171. package/dist/poll-CIwnee7h.d.ts +15 -0
  172. package/dist/poll.d.ts +2 -0
  173. package/dist/poll.js +47 -0
  174. package/dist/predicates.d.ts +10 -0
  175. package/dist/predicates.js +18 -0
  176. package/dist/pulse-CMc1Rwdj.d.ts +596 -0
  177. package/dist/pulse-dylocLd9.d.ts +18 -0
  178. package/dist/query-Xsin530u.d.ts +23 -0
  179. package/dist/refusal-B9aeHMc9.js +130 -0
  180. package/dist/replacement-CyvtbxGg.d.ts +2467 -0
  181. package/dist/replacement-S9U3gApY.d.ts +128 -0
  182. package/dist/requirement-check-CIA5IHC1.d.ts +17 -0
  183. package/dist/requirements-C0txASN8.d.ts +217 -0
  184. package/dist/resources/card.d.ts +2 -0
  185. package/dist/resources/card.js +103 -0
  186. package/dist/resources/collection.d.ts +2 -0
  187. package/dist/resources/collection.js +110 -0
  188. package/dist/resources/content-translation.d.ts +11 -0
  189. package/dist/resources/content-translation.js +27 -0
  190. package/dist/resources/csv-upload.d.ts +2 -0
  191. package/dist/resources/csv-upload.js +9 -0
  192. package/dist/resources/dashboard.d.ts +2 -0
  193. package/dist/resources/dashboard.js +218 -0
  194. package/dist/resources/data-action.d.ts +105 -0
  195. package/dist/resources/data-action.js +79 -0
  196. package/dist/resources/database.d.ts +2 -0
  197. package/dist/resources/database.js +103 -0
  198. package/dist/resources/dataset.d.ts +2 -0
  199. package/dist/resources/dataset.js +81 -0
  200. package/dist/resources/dependency.d.ts +2 -0
  201. package/dist/resources/dependency.js +150 -0
  202. package/dist/resources/document.d.ts +55 -0
  203. package/dist/resources/document.js +60 -0
  204. package/dist/resources/eid-translation.d.ts +8 -0
  205. package/dist/resources/eid-translation.js +19 -0
  206. package/dist/resources/erd.d.ts +2 -0
  207. package/dist/resources/erd.js +26 -0
  208. package/dist/resources/field.d.ts +2 -0
  209. package/dist/resources/field.js +98 -0
  210. package/dist/resources/git-sync.d.ts +2 -0
  211. package/dist/resources/git-sync.js +362 -0
  212. package/dist/resources/glossary.d.ts +2 -0
  213. package/dist/resources/glossary.js +51 -0
  214. package/dist/resources/library.d.ts +85 -0
  215. package/dist/resources/library.js +90 -0
  216. package/dist/resources/measure.d.ts +2 -0
  217. package/dist/resources/measure.js +57 -0
  218. package/dist/resources/metric.d.ts +2 -0
  219. package/dist/resources/metric.js +50 -0
  220. package/dist/resources/moderation-review.d.ts +23 -0
  221. package/dist/resources/moderation-review.js +24 -0
  222. package/dist/resources/notification.d.ts +2 -0
  223. package/dist/resources/notification.js +93 -0
  224. package/dist/resources/optional-parsed.d.ts +7 -0
  225. package/dist/resources/optional-parsed.js +14 -0
  226. package/dist/resources/permission.d.ts +10 -0
  227. package/dist/resources/permission.js +31 -0
  228. package/dist/resources/pivot-export.d.ts +10 -0
  229. package/dist/resources/pivot-export.js +16 -0
  230. package/dist/resources/pulse.d.ts +2 -0
  231. package/dist/resources/pulse.js +75 -0
  232. package/dist/resources/replacement.d.ts +2 -0
  233. package/dist/resources/replacement.js +82 -0
  234. package/dist/resources/request-body.d.ts +9 -0
  235. package/dist/resources/request-body.js +13 -0
  236. package/dist/resources/revision.d.ts +70 -0
  237. package/dist/resources/revision.js +51 -0
  238. package/dist/resources/search.d.ts +2 -0
  239. package/dist/resources/search.js +57 -0
  240. package/dist/resources/segment.d.ts +2 -0
  241. package/dist/resources/segment.js +55 -0
  242. package/dist/resources/setting.d.ts +11 -0
  243. package/dist/resources/setting.js +43 -0
  244. package/dist/resources/setup.d.ts +8 -0
  245. package/dist/resources/setup.js +18 -0
  246. package/dist/resources/snippet.d.ts +2 -0
  247. package/dist/resources/snippet.js +52 -0
  248. package/dist/resources/table.d.ts +2 -0
  249. package/dist/resources/table.js +275 -0
  250. package/dist/resources/timeline-event.d.ts +12 -0
  251. package/dist/resources/timeline-event.js +51 -0
  252. package/dist/resources/timeline.d.ts +2 -0
  253. package/dist/resources/timeline.js +82 -0
  254. package/dist/resources/transform-dag-run.d.ts +22 -0
  255. package/dist/resources/transform-dag-run.js +32 -0
  256. package/dist/resources/transform-inspector.d.ts +214 -0
  257. package/dist/resources/transform-inspector.js +47 -0
  258. package/dist/resources/transform-job.d.ts +2 -0
  259. package/dist/resources/transform-job.js +90 -0
  260. package/dist/resources/transform-python.d.ts +52 -0
  261. package/dist/resources/transform-python.js +56 -0
  262. package/dist/resources/transform-tag.d.ts +35 -0
  263. package/dist/resources/transform-tag.js +47 -0
  264. package/dist/resources/transform-test.d.ts +2 -0
  265. package/dist/resources/transform-test.js +75 -0
  266. package/dist/resources/transform.d.ts +2 -0
  267. package/dist/resources/transform.js +217 -0
  268. package/dist/resources/upload.d.ts +2 -0
  269. package/dist/resources/upload.js +48 -0
  270. package/dist/resources/user.d.ts +8 -0
  271. package/dist/resources/user.js +11 -0
  272. package/dist/revision-CQBPhohA.d.ts +104 -0
  273. package/dist/search-BxJipLN6.d.ts +26 -0
  274. package/dist/search-NZR6iRBs.d.ts +92 -0
  275. package/dist/segment-D2i34X9l.d.ts +16 -0
  276. package/dist/segment-pj3wklGe.d.ts +47 -0
  277. package/dist/session-properties-COtlxAcK.d.ts +15 -0
  278. package/dist/setting-DXuQGXGF.d.ts +25 -0
  279. package/dist/setup-Ez_U7GmM.d.ts +26 -0
  280. package/dist/signal.d.ts +8 -0
  281. package/dist/signal.js +25 -0
  282. package/dist/snippet-RnnWa4TL.d.ts +16 -0
  283. package/dist/snippet-hEV429Pv.d.ts +41 -0
  284. package/dist/table-B3-UaPHa.d.ts +3229 -0
  285. package/dist/table-B_lfuaHc.d.ts +176 -0
  286. package/dist/tag-qzjGGci8.d.ts +48 -0
  287. package/dist/timeline-C2IEcRlP.d.ts +21 -0
  288. package/dist/timeline-folD3mQ_.d.ts +218 -0
  289. package/dist/transform-CDurgE1D.d.ts +443 -0
  290. package/dist/transform-CXOT5kFe.d.ts +638 -0
  291. package/dist/transform-dag-run-BgZwv1yx.d.ts +49 -0
  292. package/dist/transform-inspector-BUYBt6--.d.ts +374 -0
  293. package/dist/transform-job-29P6BULe.d.ts +237 -0
  294. package/dist/transform-job-CTJImaOd.d.ts +96 -0
  295. package/dist/transform-python-DdDnW6yK.d.ts +56 -0
  296. package/dist/transform-tag-DVUIZTEM.d.ts +25 -0
  297. package/dist/transform-test-A-CJYT6B.d.ts +412 -0
  298. package/dist/transform-test-BwuyrHpT.d.ts +346 -0
  299. package/dist/transport-E0ZaPNWJ.d.ts +462 -0
  300. package/dist/transport-HP7cyo9N.js +397 -0
  301. package/dist/upload-B7PG3ePk.d.ts +12 -0
  302. package/dist/upload-UPfZFdbH.d.ts +22 -0
  303. package/dist/url-CI0pxHOc.d.ts +7 -0
  304. package/dist/url.d.ts +2 -0
  305. package/dist/url.js +34 -0
  306. package/dist/user-2r0OBoO6.d.ts +18 -0
  307. package/dist/version/capability-error.d.ts +2 -0
  308. package/dist/version/capability-error.js +42 -0
  309. package/dist/version/features.d.ts +2 -0
  310. package/dist/version/features.js +143 -0
  311. package/dist/version/known-range.d.ts +2 -0
  312. package/dist/version/known-range.js +7 -0
  313. package/dist/version/probe.d.ts +2 -0
  314. package/dist/version/probe.js +30 -0
  315. package/dist/version/profile.d.ts +2 -0
  316. package/dist/version/profile.js +64 -0
  317. package/dist/version/requirement-check.d.ts +2 -0
  318. package/dist/version/requirement-check.js +62 -0
  319. package/dist/version/requirements.d.ts +2 -0
  320. package/dist/version/requirements.js +219 -0
  321. package/dist/version/tag.d.ts +2 -0
  322. package/dist/version/tag.js +52 -0
  323. package/package.json +65 -4
@@ -0,0 +1,462 @@
1
+ import { a as Credential, o as CredentialRefresher } from "./credential-6aOEGqMH.js";
2
+ import { n as TokenFeatures, t as SessionProperties } from "./session-properties-COtlxAcK.js";
3
+ import { i as FeatureName, r as FeatureGap } from "./features-CnFkUCj2.js";
4
+ import { i as ServerVersion, n as Edition } from "./tag-qzjGGci8.js";
5
+ import { ZodError, ZodType, z } from "zod";
6
+ //#region src/version/probe.d.ts
7
+ declare const PROBE_PATH = "/api/session/properties";
8
+ declare const PROBE_TIMEOUT_MS = 10000;
9
+ interface ServerInfo {
10
+ readonly version: ServerVersion;
11
+ readonly edition: Edition | null;
12
+ readonly date: string | null;
13
+ readonly hash: string | null;
14
+ readonly tokenFeatures: Readonly<TokenFeatures> | null;
15
+ }
16
+ interface ProbeOptions {
17
+ timeoutMs?: number;
18
+ retries?: number;
19
+ }
20
+ interface ProbeBudget {
21
+ timeoutMs: number;
22
+ retries: number;
23
+ }
24
+ type ProbeTransport = Pick<Transport, "requestParsed">;
25
+ declare function probeServer(client: ProbeTransport, opts?: ProbeOptions): Promise<ServerInfo>;
26
+ declare function probeBudget(opts: ProbeOptions): ProbeBudget;
27
+ declare function serverInfoFromProperties(properties: SessionProperties): ServerInfo;
28
+ declare function profileFromProperties(properties: SessionProperties): ServerProfile;
29
+ //#endregion
30
+ //#region src/version/profile.d.ts
31
+ declare const Skew: z.ZodEnum<{
32
+ development: "development";
33
+ supported: "supported";
34
+ "older-than-known": "older-than-known";
35
+ "newer-than-known": "newer-than-known";
36
+ }>;
37
+ type Skew = z.infer<typeof Skew>;
38
+ declare const ServerProfile: z.ZodObject<{
39
+ version: z.ZodDiscriminatedUnion<[z.ZodObject<{
40
+ kind: z.ZodLiteral<"release">;
41
+ tag: z.ZodString;
42
+ major: z.ZodNumber;
43
+ patch: z.ZodNumber;
44
+ }, z.core.$strip>, z.ZodObject<{
45
+ kind: z.ZodLiteral<"development">;
46
+ tag: z.ZodString;
47
+ }, z.core.$strip>], "kind">;
48
+ buildDate: z.ZodNullable<z.ZodString>;
49
+ hash: z.ZodNullable<z.ZodString>;
50
+ edition: z.ZodEnum<{
51
+ oss: "oss";
52
+ ee: "ee";
53
+ }>;
54
+ tokenFeatures: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
55
+ features: z.ZodRecord<z.ZodEnum<{
56
+ contentTranslation: "contentTranslation";
57
+ dataActionCollections: "dataActionCollections";
58
+ dataActionsWithoutModel: "dataActionsWithoutModel";
59
+ transforms: "transforms";
60
+ transformJobActivation: "transformJobActivation";
61
+ measures: "measures";
62
+ library: "library";
63
+ libraryDashboards: "libraryDashboards";
64
+ remoteSync: "remoteSync";
65
+ remoteSyncRemoteChanges: "remoteSyncRemoteChanges";
66
+ remoteSyncCollectionsOnlyUpdate: "remoteSyncCollectionsOnlyUpdate";
67
+ remoteSyncExportPreflight: "remoteSyncExportPreflight";
68
+ remoteSyncBranchGuard: "remoteSyncBranchGuard";
69
+ remoteSyncMerge: "remoteSyncMerge";
70
+ contentVerification: "contentVerification";
71
+ transformTargetTableId: "transformTargetTableId";
72
+ transformTargetTableLinkedOnCreate: "transformTargetTableLinkedOnCreate";
73
+ transformJobRunIdIsNumeric: "transformJobRunIdIsNumeric";
74
+ transformCheckpointReset: "transformCheckpointReset";
75
+ fieldDataSensitivity: "fieldDataSensitivity";
76
+ fieldRemappingAppendsDisplayColumns: "fieldRemappingAppendsDisplayColumns";
77
+ transformDagRuns: "transformDagRuns";
78
+ unifiedTransformRuns: "unifiedTransformRuns";
79
+ transformTests: "transformTests";
80
+ libraryChildrenCarryType: "libraryChildrenCarryType";
81
+ collectionItemsTotalOnEmptyPage: "collectionItemsTotalOnEmptyPage";
82
+ invalidMbqlIsBadRequest: "invalidMbqlIsBadRequest";
83
+ boxplotDisplay: "boxplotDisplay";
84
+ nativeTableTemplateTag: "nativeTableTemplateTag";
85
+ smartLinkMeasureModel: "smartLinkMeasureModel";
86
+ dashboardSubscriptionFilters: "dashboardSubscriptionFilters";
87
+ dependencyGraph: "dependencyGraph";
88
+ dependencyItemListings: "dependencyItemListings";
89
+ dependencyAsyncBackfill: "dependencyAsyncBackfill";
90
+ measureDependencyGraph: "measureDependencyGraph";
91
+ tableListAccessFilters: "tableListAccessFilters";
92
+ tableListTransformTargets: "tableListTransformTargets";
93
+ tableListPublishedFilter: "tableListPublishedFilter";
94
+ tableUnusedFilter: "tableUnusedFilter";
95
+ tableDataLayerTiers: "tableDataLayerTiers";
96
+ bulkTableEdit: "bulkTableEdit";
97
+ tableUserValueWithdrawal: "tableUserValueWithdrawal";
98
+ bulkTableSync: "bulkTableSync";
99
+ erd: "erd";
100
+ documentCopy: "documentCopy";
101
+ transformInspector: "transformInspector";
102
+ pythonLibrary: "pythonLibrary";
103
+ pythonTestRun: "pythonTestRun";
104
+ sourceReplacement: "sourceReplacement";
105
+ metricDefinitionQuery: "metricDefinitionQuery";
106
+ metricDimensionListing: "metricDimensionListing";
107
+ oauthFullAccessScopeUnadvertised: "oauthFullAccessScopeUnadvertised";
108
+ exportCsvByteOrderMark: "exportCsvByteOrderMark";
109
+ }>, z.ZodBoolean>;
110
+ skew: z.ZodEnum<{
111
+ development: "development";
112
+ supported: "supported";
113
+ "older-than-known": "older-than-known";
114
+ "newer-than-known": "newer-than-known";
115
+ }>;
116
+ }, z.core.$strip>;
117
+ type ServerProfile = z.infer<typeof ServerProfile>;
118
+ declare function createServerProfile(info: ServerInfo): ServerProfile;
119
+ declare function featureGap(profile: ServerProfile, feature: FeatureName): FeatureGap | null;
120
+ //#endregion
121
+ //#region src/errors.d.ts
122
+ type ErrorCategory = "network" | "http" | "validation" | "response-shape" | "timeout" | "config" | "capability" | "partial-write" | "abort" | "internal" | "failed" | "unknown";
123
+ interface NetworkErrorDetail {
124
+ method: string;
125
+ url: string;
126
+ cause: string;
127
+ }
128
+ interface HttpTimeoutDetail {
129
+ kind: "http";
130
+ method: string;
131
+ url: string;
132
+ timeoutMs: number;
133
+ }
134
+ interface PollingTimeoutDetail {
135
+ kind: "polling";
136
+ timeoutMs: number;
137
+ attempts: number;
138
+ }
139
+ type TimeoutErrorDetail = HttpTimeoutDetail | PollingTimeoutDetail;
140
+ interface ValidationErrorDetail {
141
+ source: string;
142
+ zodIssues: ZodError["issues"];
143
+ }
144
+ interface ZodResponseShapeDetail {
145
+ kind: "zod";
146
+ method: string;
147
+ url: string;
148
+ status: number;
149
+ zodIssues: ZodError["issues"];
150
+ serverTag: string | null;
151
+ serverSkew: Skew | null;
152
+ }
153
+ interface DecodedResponseShapeDetail {
154
+ kind: "decoded";
155
+ source: string;
156
+ value: string | null;
157
+ }
158
+ type ResponseShapeErrorDetail = ZodResponseShapeDetail | DecodedResponseShapeDetail;
159
+ interface UnknownErrorDetail {
160
+ originalMessage: string;
161
+ stack: string | null;
162
+ }
163
+ declare abstract class MetabaseError extends Error {
164
+ abstract readonly category: ErrorCategory;
165
+ abstract readonly isRetryable: boolean;
166
+ abstract readonly developerDetail: unknown;
167
+ get userMessage(): string;
168
+ }
169
+ declare class NetworkError extends MetabaseError {
170
+ readonly category = "network";
171
+ readonly isRetryable = true;
172
+ readonly developerDetail: NetworkErrorDetail;
173
+ constructor(message: string, developerDetail: NetworkErrorDetail);
174
+ }
175
+ declare class TimeoutError extends MetabaseError {
176
+ readonly category = "timeout";
177
+ readonly isRetryable = true;
178
+ readonly developerDetail: TimeoutErrorDetail;
179
+ constructor(message: string, developerDetail: TimeoutErrorDetail);
180
+ }
181
+ declare class ValidationError extends MetabaseError {
182
+ readonly category = "validation";
183
+ readonly isRetryable = false;
184
+ readonly developerDetail: ValidationErrorDetail;
185
+ constructor(message: string, developerDetail: ValidationErrorDetail);
186
+ get userMessage(): string;
187
+ }
188
+ declare class ResponseShapeError extends MetabaseError {
189
+ readonly category = "response-shape";
190
+ readonly isRetryable = false;
191
+ readonly developerDetail: ResponseShapeErrorDetail;
192
+ constructor(message: string, developerDetail: ResponseShapeErrorDetail);
193
+ static fromZodIssues(developerDetail: ZodResponseShapeDetail): ResponseShapeError;
194
+ }
195
+ declare class ConfigError extends MetabaseError {
196
+ readonly category = "config";
197
+ readonly isRetryable = false;
198
+ readonly developerDetail: null;
199
+ constructor(message: string);
200
+ }
201
+ declare class InternalError extends MetabaseError {
202
+ readonly category = "internal";
203
+ readonly isRetryable = false;
204
+ readonly developerDetail: null;
205
+ constructor(message: string);
206
+ }
207
+ declare class FailedResultError extends MetabaseError {
208
+ readonly category = "failed";
209
+ readonly isRetryable = false;
210
+ readonly developerDetail: null;
211
+ constructor(message: string);
212
+ }
213
+ declare class AbortError extends MetabaseError {
214
+ readonly category = "abort";
215
+ readonly isRetryable = false;
216
+ readonly developerDetail: null;
217
+ constructor(message?: string);
218
+ }
219
+ declare function isNonInterruptFailure(error: unknown): error is MetabaseError;
220
+ declare class ChainedRequestError extends MetabaseError {
221
+ readonly cause: MetabaseError;
222
+ constructor(message: string, cause: MetabaseError);
223
+ get category(): ErrorCategory;
224
+ get isRetryable(): boolean;
225
+ get developerDetail(): unknown;
226
+ }
227
+ declare class UnknownError extends MetabaseError {
228
+ readonly category = "unknown";
229
+ readonly isRetryable = false;
230
+ readonly developerDetail: UnknownErrorDetail;
231
+ constructor(input: UnknownErrorDetail);
232
+ }
233
+ interface PartialWriteReported {
234
+ kind: "reported";
235
+ value: number | null;
236
+ }
237
+ interface PartialWriteUnreported {
238
+ kind: "unreported";
239
+ }
240
+ type PartialWriteAnswer = PartialWriteReported | PartialWriteUnreported;
241
+ interface PartialWriteDetail {
242
+ method: string;
243
+ path: string;
244
+ field: string;
245
+ requested: number;
246
+ answered: PartialWriteAnswer;
247
+ }
248
+ declare class PartialWriteError extends MetabaseError {
249
+ readonly category = "partial-write";
250
+ readonly isRetryable = false;
251
+ readonly developerDetail: PartialWriteDetail;
252
+ constructor(message: string, developerDetail: PartialWriteDetail);
253
+ }
254
+ declare function toMetabaseError(error: unknown): MetabaseError;
255
+ declare function formatZodIssue(issue: ZodError["issues"][number]): string;
256
+ declare function isFileNotFoundError(value: unknown): boolean;
257
+ declare function errorMessage(value: unknown): string;
258
+ //#endregion
259
+ //#region src/http/sanitize.d.ts
260
+ interface RedactionContext {
261
+ knownSecrets: ReadonlySet<string>;
262
+ }
263
+ //#endregion
264
+ //#region src/http/errors.d.ts
265
+ type HttpErrorKind = "route-missing" | "resource-missing" | "auth" | "forbidden" | "conflict" | "rate-limit" | "server-error" | "generic";
266
+ declare const BAD_REQUEST_STATUS = 400;
267
+ declare const UNAUTHORIZED_STATUS = 401;
268
+ declare const PAYMENT_REQUIRED_STATUS = 402;
269
+ declare const FORBIDDEN_STATUS = 403;
270
+ declare const NOT_FOUND_STATUS = 404;
271
+ declare const CONFLICT_STATUS = 409;
272
+ declare const TOO_MANY_REQUESTS_STATUS = 429;
273
+ declare const INTERNAL_SERVER_ERROR_STATUS = 500;
274
+ declare const RemoteSyncedDependent: z.ZodRecord<z.ZodString, z.ZodNumber>;
275
+ type RemoteSyncedDependent = z.infer<typeof RemoteSyncedDependent>;
276
+ type FieldErrors = Record<string, string>;
277
+ declare const FIELD_PATH_SEPARATOR = ".";
278
+ interface HttpErrorDetail {
279
+ status: number;
280
+ statusText: string;
281
+ method: string;
282
+ url: string;
283
+ responseHeaders: Record<string, string>;
284
+ body: string | null;
285
+ fieldErrors: FieldErrors | null;
286
+ specificFieldErrors: FieldErrors | null;
287
+ errorCode: string | null;
288
+ nonRemoteSyncedDependencies: number[] | null;
289
+ remoteSyncedDependents: RemoteSyncedDependent[] | null;
290
+ }
291
+ interface HttpErrorInput {
292
+ status: number;
293
+ statusText: string;
294
+ method: string;
295
+ url: string;
296
+ responseHeaders: Headers | Record<string, string>;
297
+ rawBody: string | null;
298
+ serverTag?: string | null;
299
+ overrideUserMessage?: string;
300
+ redactionContext?: RedactionContext;
301
+ }
302
+ declare class HttpError extends MetabaseError {
303
+ readonly category = "http";
304
+ readonly status: number;
305
+ readonly kind: HttpErrorKind;
306
+ readonly serverMessage: string | null;
307
+ readonly developerDetail: HttpErrorDetail;
308
+ constructor(input: HttpErrorInput);
309
+ get isRetryable(): boolean;
310
+ get fieldErrors(): FieldErrors | null;
311
+ get specificFieldErrors(): FieldErrors | null;
312
+ get errorCode(): string | null;
313
+ get nonRemoteSyncedDependencies(): number[] | null;
314
+ get remoteSyncedDependents(): RemoteSyncedDependent[] | null;
315
+ }
316
+ declare function isHttpNotFound(error: unknown): boolean;
317
+ declare function chainRequestFailure(cause: MetabaseError, message: string): MetabaseError;
318
+ declare function isRetryableStatus(status: number): boolean;
319
+ //#endregion
320
+ //#region src/version/capability-error.d.ts
321
+ declare const RequirementReason: z.ZodEnum<{
322
+ "version-too-old": "version-too-old";
323
+ "missing-token-feature": "missing-token-feature";
324
+ "superseded-by-feature": "superseded-by-feature";
325
+ }>;
326
+ type RequirementReason = z.infer<typeof RequirementReason>;
327
+ declare const RequirementFailure: z.ZodObject<{
328
+ reason: z.ZodEnum<{
329
+ "version-too-old": "version-too-old";
330
+ "missing-token-feature": "missing-token-feature";
331
+ "superseded-by-feature": "superseded-by-feature";
332
+ }>;
333
+ detail: z.ZodString;
334
+ feature: z.ZodEnum<{
335
+ contentTranslation: "contentTranslation";
336
+ dataActionCollections: "dataActionCollections";
337
+ dataActionsWithoutModel: "dataActionsWithoutModel";
338
+ transforms: "transforms";
339
+ transformJobActivation: "transformJobActivation";
340
+ measures: "measures";
341
+ library: "library";
342
+ libraryDashboards: "libraryDashboards";
343
+ remoteSync: "remoteSync";
344
+ remoteSyncRemoteChanges: "remoteSyncRemoteChanges";
345
+ remoteSyncCollectionsOnlyUpdate: "remoteSyncCollectionsOnlyUpdate";
346
+ remoteSyncExportPreflight: "remoteSyncExportPreflight";
347
+ remoteSyncBranchGuard: "remoteSyncBranchGuard";
348
+ remoteSyncMerge: "remoteSyncMerge";
349
+ contentVerification: "contentVerification";
350
+ transformTargetTableId: "transformTargetTableId";
351
+ transformTargetTableLinkedOnCreate: "transformTargetTableLinkedOnCreate";
352
+ transformJobRunIdIsNumeric: "transformJobRunIdIsNumeric";
353
+ transformCheckpointReset: "transformCheckpointReset";
354
+ fieldDataSensitivity: "fieldDataSensitivity";
355
+ fieldRemappingAppendsDisplayColumns: "fieldRemappingAppendsDisplayColumns";
356
+ transformDagRuns: "transformDagRuns";
357
+ unifiedTransformRuns: "unifiedTransformRuns";
358
+ transformTests: "transformTests";
359
+ libraryChildrenCarryType: "libraryChildrenCarryType";
360
+ collectionItemsTotalOnEmptyPage: "collectionItemsTotalOnEmptyPage";
361
+ invalidMbqlIsBadRequest: "invalidMbqlIsBadRequest";
362
+ boxplotDisplay: "boxplotDisplay";
363
+ nativeTableTemplateTag: "nativeTableTemplateTag";
364
+ smartLinkMeasureModel: "smartLinkMeasureModel";
365
+ dashboardSubscriptionFilters: "dashboardSubscriptionFilters";
366
+ dependencyGraph: "dependencyGraph";
367
+ dependencyItemListings: "dependencyItemListings";
368
+ dependencyAsyncBackfill: "dependencyAsyncBackfill";
369
+ measureDependencyGraph: "measureDependencyGraph";
370
+ tableListAccessFilters: "tableListAccessFilters";
371
+ tableListTransformTargets: "tableListTransformTargets";
372
+ tableListPublishedFilter: "tableListPublishedFilter";
373
+ tableUnusedFilter: "tableUnusedFilter";
374
+ tableDataLayerTiers: "tableDataLayerTiers";
375
+ bulkTableEdit: "bulkTableEdit";
376
+ tableUserValueWithdrawal: "tableUserValueWithdrawal";
377
+ bulkTableSync: "bulkTableSync";
378
+ erd: "erd";
379
+ documentCopy: "documentCopy";
380
+ transformInspector: "transformInspector";
381
+ pythonLibrary: "pythonLibrary";
382
+ pythonTestRun: "pythonTestRun";
383
+ sourceReplacement: "sourceReplacement";
384
+ metricDefinitionQuery: "metricDefinitionQuery";
385
+ metricDimensionListing: "metricDimensionListing";
386
+ oauthFullAccessScopeUnadvertised: "oauthFullAccessScopeUnadvertised";
387
+ exportCsvByteOrderMark: "exportCsvByteOrderMark";
388
+ }>;
389
+ since: z.ZodNumber;
390
+ tokenFeature: z.ZodNullable<z.ZodString>;
391
+ serverVersion: z.ZodString;
392
+ }, z.core.$strip>;
393
+ type RequirementFailure = z.infer<typeof RequirementFailure>;
394
+ declare function versionTooOldMessage(since: number, serverVersion: string): string;
395
+ declare function missingTokenFeatureMessage(tokenFeature: string): string;
396
+ declare class CapabilityError extends MetabaseError {
397
+ readonly category = "capability";
398
+ readonly isRetryable = false;
399
+ readonly developerDetail: RequirementFailure;
400
+ constructor(failure: RequirementFailure, refusal?: HttpError | null);
401
+ }
402
+ //#endregion
403
+ //#region src/http/transport.d.ts
404
+ type HttpMethod = "GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE";
405
+ type ExpectedContentType = "json" | "text" | "binary";
406
+ declare const DEFAULT_METHOD: HttpMethod;
407
+ declare const DEFAULT_TIMEOUT_MS = 30000;
408
+ type QueryPrimitive = string | number | boolean;
409
+ type QueryValue = QueryPrimitive | ReadonlyArray<QueryPrimitive> | undefined;
410
+ interface RequestOptions {
411
+ signal?: AbortSignal;
412
+ timeoutMs?: number;
413
+ retries?: number;
414
+ idempotent?: boolean;
415
+ }
416
+ interface TransportRequestOptions extends RequestOptions {
417
+ method?: HttpMethod;
418
+ query?: Record<string, QueryValue>;
419
+ body?: unknown;
420
+ expectContentType?: ExpectedContentType;
421
+ }
422
+ interface Transport {
423
+ requestParsed<T>(schema: ZodType<T>, path: string, opts?: TransportRequestOptions): Promise<T>;
424
+ requestRaw(path: string, opts?: TransportRequestOptions): Promise<Response>;
425
+ requestStream(path: string, opts?: TransportRequestOptions): Promise<ReadableStream<Uint8Array>>;
426
+ server(options?: WaitOptions): Promise<ServerProfile>;
427
+ verifiedServer(options?: WaitOptions): Promise<ServerProfile>;
428
+ probe<T extends SessionProperties>(reader: ZodType<T>, options?: ProbeReadOptions): Promise<T>;
429
+ requireFeatures(features: readonly FeatureName[], options?: WaitOptions): Promise<void>;
430
+ preflightServer(options?: WaitOptions): Promise<ServerProfile | null>;
431
+ refuseBeforeSending(refusal: CapabilityError): void;
432
+ probesSettled(): Promise<void>;
433
+ }
434
+ type WaitOptions = Pick<RequestOptions, "signal">;
435
+ type ProbeReadOptions = Pick<RequestOptions, "signal" | "timeoutMs" | "retries">;
436
+ interface PreflightRefused {
437
+ kind: "refused";
438
+ refusal: CapabilityError;
439
+ }
440
+ interface PreflightUnverified {
441
+ kind: "unverified";
442
+ failure: MetabaseError;
443
+ }
444
+ type SkippedPreflight = PreflightRefused | PreflightUnverified;
445
+ interface ClientCredentials {
446
+ url: string;
447
+ credential: Credential;
448
+ }
449
+ type ServerTagResolver = () => Promise<string | null>;
450
+ interface ClientOptions {
451
+ userAgent: string;
452
+ fetchImpl?: typeof fetch;
453
+ server?: ServerProfile;
454
+ getServerTag?: ServerTagResolver;
455
+ refreshCredential?: CredentialRefresher;
456
+ onServerProbed?: (info: ServerInfo, profile: ServerProfile) => void;
457
+ onPreflightSkipped?: (skipped: SkippedPreflight) => void;
458
+ signal?: AbortSignal;
459
+ }
460
+ declare function createTransport(config: ClientCredentials, options: ClientOptions): Transport;
461
+ //#endregion
462
+ export { PartialWriteAnswer as $, HttpErrorDetail as A, profileFromProperties as At, isHttpNotFound as B, versionTooOldMessage as C, PROBE_PATH as Ct, FORBIDDEN_STATUS as D, ServerInfo as Dt, FIELD_PATH_SEPARATOR as E, ProbeOptions as Et, PAYMENT_REQUIRED_STATUS as F, DecodedResponseShapeDetail as G, AbortError as H, RemoteSyncedDependent as I, HttpTimeoutDetail as J, ErrorCategory as K, TOO_MANY_REQUESTS_STATUS as L, HttpErrorKind as M, INTERNAL_SERVER_ERROR_STATUS as N, FieldErrors as O, probeBudget as Ot, NOT_FOUND_STATUS as P, NetworkErrorDetail as Q, UNAUTHORIZED_STATUS as R, missingTokenFeatureMessage as S, featureGap as St, CONFLICT_STATUS as T, ProbeBudget as Tt, ChainedRequestError as U, isRetryableStatus as V, ConfigError as W, MetabaseError as X, InternalError as Y, NetworkError as Z, WaitOptions as _, isNonInterruptFailure as _t, ExpectedContentType as a, ResponseShapeError as at, RequirementFailure as b, Skew as bt, PreflightUnverified as c, TimeoutErrorDetail as ct, QueryValue as d, ValidationError as dt, PartialWriteDetail as et, RequestOptions as f, ValidationErrorDetail as ft, TransportRequestOptions as g, isFileNotFoundError as gt, Transport as h, formatZodIssue as ht, DEFAULT_TIMEOUT_MS as i, PollingTimeoutDetail as it, HttpErrorInput as j, serverInfoFromProperties as jt, HttpError as k, probeServer as kt, ProbeReadOptions as l, UnknownError as lt, SkippedPreflight as m, errorMessage as mt, ClientOptions as n, PartialWriteReported as nt, HttpMethod as o, ResponseShapeErrorDetail as ot, ServerTagResolver as p, ZodResponseShapeDetail as pt, FailedResultError as q, DEFAULT_METHOD as r, PartialWriteUnreported as rt, PreflightRefused as s, TimeoutError as st, ClientCredentials as t, PartialWriteError as tt, QueryPrimitive as u, UnknownErrorDetail as ut, createTransport as v, toMetabaseError as vt, BAD_REQUEST_STATUS as w, PROBE_TIMEOUT_MS as wt, RequirementReason as x, createServerProfile as xt, CapabilityError as y, ServerProfile as yt, chainRequestFailure as z };