@metabase/client 0.1.0 → 0.1.2

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 (220) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +10 -6
  3. package/dist/api-key-DJeN1-7G.d.ts +46 -0
  4. package/dist/auth/credential.d.ts +1 -1
  5. package/dist/auth/oauth-login.d.ts +1 -1
  6. package/dist/auth/oauth-login.js +1 -1
  7. package/dist/auth/oauth-session.d.ts +1 -1
  8. package/dist/{card-BZx4NSr-.d.ts → card-CbV6hLYH.d.ts} +4 -4
  9. package/dist/{card-B6merEUN.d.ts → card-CrSywvOt.d.ts} +18 -18
  10. package/dist/{client-DNRvXFRm.d.ts → client-cBi6_RQs.d.ts} +289 -185
  11. package/dist/client.d.ts +1 -1
  12. package/dist/client.js +4 -0
  13. package/dist/{collection-Bib61WiV.d.ts → collection-Bmtisr3r.d.ts} +47 -47
  14. package/dist/{collection-CqtGPi4W.d.ts → collection-Q9FNMiRh.d.ts} +18 -4
  15. package/dist/{credential-6aOEGqMH.d.ts → credential-B6fKSvqp.d.ts} +1 -1
  16. package/dist/{dashboard-XTe46250.d.ts → dashboard-CknUcTp8.d.ts} +3 -3
  17. package/dist/{dashboard-z9i1VUZC.d.ts → dashboard-DBdEehA9.d.ts} +33 -25
  18. package/dist/{data-action-rS27f2Ji.d.ts → data-action-CqqZ0JYg.d.ts} +6 -4
  19. package/dist/data-app-MoMS9VUr.d.ts +76 -0
  20. package/dist/{database-DqTespfa.d.ts → database-Bs5WQOOZ.d.ts} +3 -3
  21. package/dist/{database-BLUMlywE.d.ts → database-CYNLJ8AZ.d.ts} +18 -18
  22. package/dist/{dataset-C6lX1-cr.d.ts → dataset-cg8ZZrOP.d.ts} +85 -85
  23. package/dist/{dataset-Cj3XuKLe.d.ts → dataset-dzWljE_C.d.ts} +3 -3
  24. package/dist/{dependency-fN5_7a22.d.ts → dependency-CL-YG9KH.d.ts} +26 -26
  25. package/dist/{dependency-D8Qs5Xdx.d.ts → dependency-VqvLTDAU.d.ts} +248 -196
  26. package/dist/{document-oZNDbDfx.d.ts → document-tLd6pYWe.d.ts} +2 -2
  27. package/dist/domain/api-key.d.ts +2 -0
  28. package/dist/domain/api-key.js +31 -0
  29. package/dist/domain/card.d.ts +1 -1
  30. package/dist/domain/collection.d.ts +1 -1
  31. package/dist/domain/dashboard.d.ts +2 -2
  32. package/dist/domain/dashboard.js +21 -4
  33. package/dist/domain/data-action.d.ts +2 -2
  34. package/dist/domain/data-action.js +8 -2
  35. package/dist/domain/data-app.d.ts +2 -0
  36. package/dist/domain/data-app.js +52 -0
  37. package/dist/domain/database.d.ts +1 -1
  38. package/dist/domain/dataset.d.ts +1 -1
  39. package/dist/domain/dependency.d.ts +1 -1
  40. package/dist/domain/dependency.js +6 -3
  41. package/dist/domain/document.d.ts +1 -1
  42. package/dist/domain/eid-translation.d.ts +1 -1
  43. package/dist/domain/field.d.ts +2 -2
  44. package/dist/domain/field.js +8 -2
  45. package/dist/domain/git-sync.d.ts +1 -1
  46. package/dist/domain/library.d.ts +2 -2
  47. package/dist/domain/library.js +8 -2
  48. package/dist/domain/measure.d.ts +1 -1
  49. package/dist/domain/measure.js +3 -1
  50. package/dist/domain/metric.d.ts +1 -1
  51. package/dist/domain/moderation-review.d.ts +1 -1
  52. package/dist/domain/notification.d.ts +2 -2
  53. package/dist/domain/notification.js +6 -1
  54. package/dist/domain/parameter.d.ts +1 -1
  55. package/dist/domain/pulse.d.ts +2 -2
  56. package/dist/domain/pulse.js +10 -3
  57. package/dist/domain/replacement.d.ts +1 -1
  58. package/dist/domain/revision.d.ts +2 -2
  59. package/dist/domain/revision.js +29 -2
  60. package/dist/domain/search.d.ts +1 -1
  61. package/dist/domain/segment.d.ts +1 -1
  62. package/dist/domain/segment.js +3 -1
  63. package/dist/domain/setup.d.ts +1 -1
  64. package/dist/domain/setup.js +1 -1
  65. package/dist/domain/snippet.d.ts +1 -1
  66. package/dist/domain/table.d.ts +2 -2
  67. package/dist/domain/table.js +35 -4
  68. package/dist/domain/timeline.d.ts +1 -1
  69. package/dist/domain/transform-dag-run.d.ts +1 -1
  70. package/dist/domain/transform-inspector.d.ts +1 -1
  71. package/dist/domain/transform-job.d.ts +2 -2
  72. package/dist/domain/transform-job.js +8 -2
  73. package/dist/domain/transform-python.d.ts +2 -2
  74. package/dist/domain/transform-python.js +15 -3
  75. package/dist/domain/transform-tag.d.ts +1 -1
  76. package/dist/domain/transform-test.d.ts +1 -1
  77. package/dist/domain/transform.d.ts +2 -2
  78. package/dist/domain/transform.js +76 -7
  79. package/dist/domain/user.d.ts +1 -1
  80. package/dist/domain/user.js +1 -1
  81. package/dist/{eid-translation-nuhr8St2.d.ts → eid-translation-aQSffx0o.d.ts} +40 -40
  82. package/dist/{erd-BujD227Y.d.ts → erd-DCgdEC2S.d.ts} +1 -1
  83. package/dist/errors.d.ts +1 -1
  84. package/dist/{features-CnFkUCj2.d.ts → features-SMSfJhB6.d.ts} +36 -2
  85. package/dist/{field-Bqn10Fq_.d.ts → field-ozrfbvUd.d.ts} +2 -2
  86. package/dist/{field-BCRO19mk.d.ts → field-tqQPtVuR.d.ts} +9 -7
  87. package/dist/{git-sync-gAMKsZgN.d.ts → git-sync-5lFWX1ds.d.ts} +3 -3
  88. package/dist/{git-sync-DNXrNVCW.d.ts → git-sync-QL9Nu6gP.d.ts} +10 -10
  89. package/dist/{glossary-CqFlzW33.d.ts → glossary-DwS7QVrl.d.ts} +1 -1
  90. package/dist/http/errors.d.ts +1 -1
  91. package/dist/http/oauth.d.ts +1 -1
  92. package/dist/http/oauth.js +47 -36
  93. package/dist/http/transport.d.ts +1 -1
  94. package/dist/index.d.ts +48 -46
  95. package/dist/index.js +8 -6
  96. package/dist/input-gate-registry-Dai7SfXb.js +14 -0
  97. package/dist/input-gates-DwKoTJVQ.d.ts +28 -0
  98. package/dist/{json-CZvjc3--.d.ts → json-DwGOvRtS.d.ts} +1 -1
  99. package/dist/json-pointer.d.ts +2 -1
  100. package/dist/json-pointer.js +4 -1
  101. package/dist/json.d.ts +1 -1
  102. package/dist/{library-Cx9h_RkU.d.ts → library-B9pEq7qP.d.ts} +8 -6
  103. package/dist/{measure-CuMqPbQX.d.ts → measure-CInoXeyH.d.ts} +1 -1
  104. package/dist/{measure-KuXdjZYJ.d.ts → measure-CgH14YQZ.d.ts} +1 -1
  105. package/dist/{metric-yvehaVCS.d.ts → metric-CYOmbcM5.d.ts} +10 -10
  106. package/dist/{moderation-review-B4RUTZ6_.d.ts → moderation-review-CWUQ3_HL.d.ts} +4 -4
  107. package/dist/{notification-BT2TDAd_.d.ts → notification-BY2JEjKp.d.ts} +68 -4
  108. package/dist/{notification-BiegPoSD.d.ts → notification-D-Hp82Pn.d.ts} +3 -3
  109. package/dist/{oauth-C4ordeoJ.d.ts → oauth-CVoZpuq8.d.ts} +4 -2
  110. package/dist/{oauth-login-D734Jvbq.js → oauth-login--tDagiZu.js} +29 -11
  111. package/dist/{oauth-login-CJsT_3EE.d.ts → oauth-login-SZ4Csai8.d.ts} +3 -2
  112. package/dist/{oauth-session-BlIlcd8Q.d.ts → oauth-session-COLH4puN.d.ts} +1 -1
  113. package/dist/{paginate-DZWvWvbm.d.ts → paginate-CaJ5usdp.d.ts} +1 -1
  114. package/dist/paginate.d.ts +1 -1
  115. package/dist/{parameter-ak-J-IOj.d.ts → parameter-BYo7uR-J.d.ts} +2 -2
  116. package/dist/{pulse-dylocLd9.d.ts → pulse-BTpSNxhT.d.ts} +2 -2
  117. package/dist/{pulse-CMc1Rwdj.d.ts → pulse-BUlfrJZH.d.ts} +23 -21
  118. package/dist/{replacement-CyvtbxGg.d.ts → replacement-BQian4vA.d.ts} +23 -23
  119. package/dist/{replacement-S9U3gApY.d.ts → replacement-Dbtvvrmz.d.ts} +11 -11
  120. package/dist/{requirement-check-CIA5IHC1.d.ts → requirement-check-CHHEHXcj.d.ts} +2 -2
  121. package/dist/{requirements-C0txASN8.d.ts → requirements-Dx_ZVzl7.d.ts} +11 -1
  122. package/dist/resources/api-key.d.ts +11 -0
  123. package/dist/resources/api-key.js +35 -0
  124. package/dist/resources/card.d.ts +1 -1
  125. package/dist/resources/collection.d.ts +1 -1
  126. package/dist/resources/collection.js +35 -6
  127. package/dist/resources/content-translation.d.ts +1 -1
  128. package/dist/resources/content-translation.js +1 -1
  129. package/dist/resources/dashboard.d.ts +1 -1
  130. package/dist/resources/dashboard.js +8 -5
  131. package/dist/resources/data-action.d.ts +3 -48
  132. package/dist/resources/data-action.js +9 -9
  133. package/dist/resources/data-app.d.ts +112 -0
  134. package/dist/resources/data-app.js +75 -0
  135. package/dist/resources/database.d.ts +1 -1
  136. package/dist/resources/dataset.d.ts +1 -1
  137. package/dist/resources/dependency.d.ts +1 -1
  138. package/dist/resources/dependency.js +13 -7
  139. package/dist/resources/document.d.ts +3 -10
  140. package/dist/resources/eid-translation.d.ts +2 -2
  141. package/dist/resources/erd.d.ts +1 -1
  142. package/dist/resources/field.d.ts +1 -1
  143. package/dist/resources/field.js +3 -2
  144. package/dist/resources/git-sync.d.ts +1 -1
  145. package/dist/resources/git-sync.js +1 -1
  146. package/dist/resources/glossary.d.ts +1 -1
  147. package/dist/resources/library.d.ts +4 -4
  148. package/dist/resources/library.js +2 -2
  149. package/dist/resources/measure.d.ts +1 -1
  150. package/dist/resources/metric.d.ts +1 -1
  151. package/dist/resources/moderation-review.d.ts +1 -1
  152. package/dist/resources/notification.d.ts +1 -1
  153. package/dist/resources/notification.js +2 -2
  154. package/dist/resources/optional-parsed.d.ts +1 -1
  155. package/dist/resources/permission.d.ts +1 -1
  156. package/dist/resources/pivot-export.d.ts +1 -1
  157. package/dist/resources/pulse.d.ts +1 -1
  158. package/dist/resources/pulse.js +3 -2
  159. package/dist/resources/replacement.d.ts +1 -1
  160. package/dist/resources/revision.d.ts +3 -3
  161. package/dist/resources/revision.js +5 -10
  162. package/dist/resources/search.d.ts +1 -1
  163. package/dist/resources/search.js +23 -2
  164. package/dist/resources/segment.d.ts +1 -1
  165. package/dist/resources/setting.d.ts +1 -1
  166. package/dist/resources/setup.d.ts +2 -2
  167. package/dist/resources/snippet.d.ts +1 -1
  168. package/dist/resources/table.d.ts +1 -1
  169. package/dist/resources/table.js +9 -10
  170. package/dist/resources/timeline-event.d.ts +2 -2
  171. package/dist/resources/timeline.d.ts +1 -1
  172. package/dist/resources/transform-dag-run.d.ts +2 -2
  173. package/dist/resources/transform-inspector.d.ts +4 -4
  174. package/dist/resources/transform-job.d.ts +1 -1
  175. package/dist/resources/transform-python.d.ts +11 -4
  176. package/dist/resources/transform-python.js +3 -2
  177. package/dist/resources/transform-tag.d.ts +1 -1
  178. package/dist/resources/transform-test.d.ts +1 -1
  179. package/dist/resources/transform.d.ts +1 -1
  180. package/dist/resources/transform.js +13 -3
  181. package/dist/resources/upload.d.ts +1 -1
  182. package/dist/resources/user.d.ts +2 -2
  183. package/dist/{revision-CQBPhohA.d.ts → revision-DNEw6S93.d.ts} +7 -5
  184. package/dist/{search-BxJipLN6.d.ts → search-BQWkdVg1.d.ts} +2 -2
  185. package/dist/{search-NZR6iRBs.d.ts → search-tK5lmRb8.d.ts} +23 -23
  186. package/dist/{segment-pj3wklGe.d.ts → segment-CbAgVO-5.d.ts} +1 -1
  187. package/dist/{segment-D2i34X9l.d.ts → segment-jyhBtOAZ.d.ts} +2 -2
  188. package/dist/{setup-Ez_U7GmM.d.ts → setup-JqcJ2unJ.d.ts} +1 -1
  189. package/dist/signal.d.ts +3 -2
  190. package/dist/signal.js +9 -4
  191. package/dist/{snippet-hEV429Pv.d.ts → snippet-C_Ilx7tR.d.ts} +2 -2
  192. package/dist/{snippet-RnnWa4TL.d.ts → snippet-DsgohpTV.d.ts} +2 -2
  193. package/dist/{table-B_lfuaHc.d.ts → table-B1pQSpTA.d.ts} +14 -14
  194. package/dist/{table-B3-UaPHa.d.ts → table-BAl8aPZZ.d.ts} +49 -44
  195. package/dist/{timeline-C2IEcRlP.d.ts → timeline-BdLvwRnl.d.ts} +2 -2
  196. package/dist/{timeline-folD3mQ_.d.ts → timeline-BfX1lMob.d.ts} +24 -24
  197. package/dist/{transform-CXOT5kFe.d.ts → transform-Ds74yPiY.d.ts} +48 -34
  198. package/dist/{transform-CDurgE1D.d.ts → transform-DwnIcpqV.d.ts} +153 -37
  199. package/dist/{transform-dag-run-BgZwv1yx.d.ts → transform-dag-run-BSrdrjaK.d.ts} +4 -4
  200. package/dist/{transform-inspector-BUYBt6--.d.ts → transform-inspector-BMaRqcRM.d.ts} +8 -8
  201. package/dist/{transform-job-29P6BULe.d.ts → transform-job-C85GxBHj.d.ts} +9 -9
  202. package/dist/{transform-job-CTJImaOd.d.ts → transform-job-Dfp9Ox0l.d.ts} +7 -5
  203. package/dist/{transform-python-DdDnW6yK.d.ts → transform-python-DtL3xxMj.d.ts} +49 -4
  204. package/dist/{transform-tag-DVUIZTEM.d.ts → transform-tag-C6j5EUkX.d.ts} +1 -1
  205. package/dist/{transform-test-A-CJYT6B.d.ts → transform-test-C3hiZ4AV.d.ts} +2 -2
  206. package/dist/{transform-test-BwuyrHpT.d.ts → transform-test-DROPvrkI.d.ts} +2 -2
  207. package/dist/{transport-E0ZaPNWJ.d.ts → transport-CS11mEqI.d.ts} +20 -6
  208. package/dist/{upload-B7PG3ePk.d.ts → upload-Bx1D7eNy.d.ts} +1 -1
  209. package/dist/{user-2r0OBoO6.d.ts → user-Sqqv7rqh.d.ts} +2 -2
  210. package/dist/version/capability-error.d.ts +1 -1
  211. package/dist/version/features.d.ts +2 -2
  212. package/dist/version/features.js +30 -2
  213. package/dist/version/input-gates.d.ts +2 -0
  214. package/dist/version/input-gates.js +13 -0
  215. package/dist/version/probe.d.ts +1 -1
  216. package/dist/version/profile.d.ts +1 -1
  217. package/dist/version/requirement-check.d.ts +1 -1
  218. package/dist/version/requirements.d.ts +1 -1
  219. package/dist/version/requirements.js +10 -0
  220. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- import { f as RequestOptions, h as Transport } from "./transport-E0ZaPNWJ.js";
1
+ import { f as RequestOptions, h as Transport } from "./transport-CS11mEqI.js";
2
2
  import { t as ListResult } from "./list-BT_bBm9Z.js";
3
3
  //#region src/resources/transform-job.d.ts
4
4
  interface TransformJobRunParams {
@@ -24,7 +24,7 @@ declare function transformJobResource(transport: Transport): {
24
24
  id: number;
25
25
  job_id: number;
26
26
  run_method: "manual" | "cron";
27
- status: "timeout" | "failed" | "started" | "succeeded" | "canceled";
27
+ status: "started" | "succeeded" | "failed" | "canceled" | "timeout";
28
28
  start_time: string;
29
29
  message: string | null;
30
30
  created_at: string;
@@ -54,7 +54,7 @@ declare function transformJobResource(transport: Transport): {
54
54
  id: number;
55
55
  job_id: number;
56
56
  run_method: "manual" | "cron";
57
- status: "timeout" | "failed" | "started" | "succeeded" | "canceled";
57
+ status: "started" | "succeeded" | "failed" | "canceled" | "timeout";
58
58
  start_time: string;
59
59
  message: string | null;
60
60
  created_at: string;
@@ -91,7 +91,7 @@ declare function transformJobResource(transport: Transport): {
91
91
  id: number;
92
92
  job_id: number;
93
93
  run_method: "manual" | "cron";
94
- status: "timeout" | "failed" | "started" | "succeeded" | "canceled";
94
+ status: "started" | "succeeded" | "failed" | "canceled" | "timeout";
95
95
  start_time: string;
96
96
  message: string | null;
97
97
  created_at: string;
@@ -129,7 +129,7 @@ declare function transformJobResource(transport: Transport): {
129
129
  id: number;
130
130
  job_id: number;
131
131
  run_method: "manual" | "cron";
132
- status: "timeout" | "failed" | "started" | "succeeded" | "canceled";
132
+ status: "started" | "succeeded" | "failed" | "canceled" | "timeout";
133
133
  start_time: string;
134
134
  message: string | null;
135
135
  created_at: string;
@@ -168,10 +168,10 @@ declare function transformJobResource(transport: Transport): {
168
168
  "source-tables": {
169
169
  [x: string]: unknown;
170
170
  alias: string;
171
- database_id: number;
172
- schema: string | null;
173
- table?: string | undefined;
174
171
  table_id?: number | null | undefined;
172
+ database_id?: number | null | undefined;
173
+ schema?: string | null | undefined;
174
+ table?: string | null | undefined;
175
175
  }[];
176
176
  "source-database"?: number | undefined;
177
177
  "source-incremental-strategy"?: {
@@ -220,7 +220,7 @@ declare function transformJobResource(transport: Transport): {
220
220
  id: number;
221
221
  transform_id: number;
222
222
  run_method: "manual" | "cron";
223
- status: "timeout" | "failed" | "started" | "succeeded" | "canceled" | "canceling";
223
+ status: "started" | "succeeded" | "failed" | "canceled" | "timeout" | "canceling";
224
224
  start_time: string;
225
225
  message: string | null;
226
226
  user_id: number | null;
@@ -1,4 +1,5 @@
1
- import { o as Features } from "./features-CnFkUCj2.js";
1
+ import { o as Features } from "./features-SMSfJhB6.js";
2
+ import { r as InputGate } from "./input-gates-DwKoTJVQ.js";
2
3
  import { z } from "zod";
3
4
  //#region src/domain/transform-job.d.ts
4
5
  declare const TransformJob: z.ZodObject<{
@@ -23,11 +24,11 @@ declare const TransformJob: z.ZodObject<{
23
24
  cron: "cron";
24
25
  }>;
25
26
  status: z.ZodEnum<{
26
- timeout: "timeout";
27
- failed: "failed";
28
27
  started: "started";
29
28
  succeeded: "succeeded";
29
+ failed: "failed";
30
30
  canceled: "canceled";
31
+ timeout: "timeout";
31
32
  }>;
32
33
  start_time: z.ZodString;
33
34
  end_time: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -44,8 +45,8 @@ type TransformJob = z.infer<typeof TransformJob>;
44
45
  /** The shape every transform-job endpoint answers on a server with `features`, read as `TransformJob`. */
45
46
  declare function transformJobSchema(features: Features): z.ZodType<TransformJob>;
46
47
  declare const TransformJobCompact: z.ZodObject<{
47
- name: z.ZodString;
48
48
  id: z.ZodNumber;
49
+ name: z.ZodString;
49
50
  description: z.ZodNullable<z.ZodString>;
50
51
  active: z.ZodNullable<z.ZodBoolean>;
51
52
  ui_display_type: z.ZodEnum<{
@@ -67,6 +68,7 @@ declare const TransformJobCreateInput: z.ZodObject<{
67
68
  tag_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
68
69
  }, z.core.$loose>;
69
70
  type TransformJobCreateInput = z.infer<typeof TransformJobCreateInput>;
71
+ declare const TRANSFORM_JOB_ACTIVE_GATE: InputGate;
70
72
  declare const TransformJobUpdateInput: z.ZodObject<{
71
73
  name: z.ZodOptional<z.ZodString>;
72
74
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -93,4 +95,4 @@ declare const TransformJobActiveResult: z.ZodObject<{
93
95
  }, z.core.$strip>;
94
96
  type TransformJobActiveResult = z.infer<typeof TransformJobActiveResult>;
95
97
  //#endregion
96
- export { TransformJobRunResult as a, transformJobSchema as c, TransformJobCreateInput as i, TransformJobActiveResult as n, TransformJobUpdateInput as o, TransformJobCompact as r, transformJobRunResultSchema as s, TransformJob as t };
98
+ export { TransformJobCreateInput as a, transformJobRunResultSchema as c, TransformJobCompact as i, transformJobSchema as l, TransformJob as n, TransformJobRunResult as o, TransformJobActiveResult as r, TransformJobUpdateInput as s, TRANSFORM_JOB_ACTIVE_GATE as t };
@@ -1,3 +1,4 @@
1
+ import { o as Features } from "./features-SMSfJhB6.js";
1
2
  import { z } from "zod";
2
3
  //#region src/domain/transform-python.d.ts
3
4
  declare const PythonLibrary: z.ZodObject<{
@@ -13,17 +14,61 @@ declare const PythonLibraryUpdateInput: z.ZodObject<{
13
14
  type PythonLibraryUpdateInput = z.infer<typeof PythonLibraryUpdateInput>;
14
15
  declare const PythonTestRunInput: z.ZodObject<{
15
16
  code: z.ZodString;
16
- source_tables: z.ZodArray<z.ZodObject<{
17
+ source_tables: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
17
18
  alias: z.ZodString;
18
19
  database_id: z.ZodNumber;
19
- schema: z.ZodNullable<z.ZodString>;
20
+ schema: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
21
  table: z.ZodOptional<z.ZodString>;
21
22
  table_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
22
- }, z.core.$loose>>;
23
+ }, z.core.$loose>, z.ZodObject<{
24
+ alias: z.ZodString;
25
+ table_id: z.ZodNumber;
26
+ database_id: z.ZodOptional<z.ZodNull>;
27
+ schema: z.ZodOptional<z.ZodNull>;
28
+ table: z.ZodOptional<z.ZodNull>;
29
+ }, z.core.$loose>]>>;
23
30
  output_row_limit: z.ZodOptional<z.ZodNumber>;
24
31
  per_input_row_limit: z.ZodOptional<z.ZodNumber>;
25
32
  }, z.core.$strict>;
26
33
  type PythonTestRunInput = z.infer<typeof PythonTestRunInput>;
34
+ /** A test run body as a server with `features` reads it. */
35
+ declare function pythonTestRunBody(params: PythonTestRunInput, features: Features): {
36
+ code: string;
37
+ source_tables: ({
38
+ [x: string]: unknown;
39
+ alias: string;
40
+ database_id: number;
41
+ schema?: string | null | undefined;
42
+ table?: string | undefined;
43
+ table_id?: number | null | undefined;
44
+ } | {
45
+ [x: string]: unknown;
46
+ alias: string;
47
+ table_id: number;
48
+ database_id?: null | undefined;
49
+ schema?: null | undefined;
50
+ table?: null | undefined;
51
+ })[];
52
+ output_row_limit?: number | undefined;
53
+ per_input_row_limit?: number | undefined;
54
+ } | {
55
+ source_tables: Record<string, number | {
56
+ [x: string]: unknown;
57
+ database_id: number;
58
+ schema?: string | null | undefined;
59
+ table?: string | undefined;
60
+ table_id?: number | null | undefined;
61
+ } | {
62
+ [x: string]: unknown;
63
+ table_id: number;
64
+ database_id?: null | undefined;
65
+ schema?: null | undefined;
66
+ table?: null | undefined;
67
+ }>;
68
+ code: string;
69
+ output_row_limit?: number | undefined;
70
+ per_input_row_limit?: number | undefined;
71
+ };
27
72
  declare const PythonTestRunOutput: z.ZodObject<{
28
73
  cols: z.ZodArray<z.ZodObject<{
29
74
  name: z.ZodString;
@@ -53,4 +98,4 @@ declare const PythonTestRunResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
53
98
  }, z.core.$strip>], "outcome">;
54
99
  type PythonTestRunResult = z.infer<typeof PythonTestRunResult>;
55
100
  //#endregion
56
- export { PythonTestRunOutput as a, PythonTestRunInput as i, PythonLibraryUpdateInput as n, PythonTestRunResult as o, PythonTestRunError as r, PythonLibrary as t };
101
+ export { PythonTestRunOutput as a, PythonTestRunInput as i, PythonLibraryUpdateInput as n, PythonTestRunResult as o, PythonTestRunError as r, pythonTestRunBody as s, PythonLibrary as t };
@@ -8,8 +8,8 @@ declare const TransformTag: z.ZodObject<{
8
8
  }, z.core.$loose>;
9
9
  type TransformTag = z.infer<typeof TransformTag>;
10
10
  declare const TransformTagCompact: z.ZodObject<{
11
- name: z.ZodString;
12
11
  id: z.ZodNumber;
12
+ name: z.ZodString;
13
13
  built_in_type: z.ZodNullable<z.ZodString>;
14
14
  }, z.core.$strip>;
15
15
  type TransformTagCompact = z.infer<typeof TransformTagCompact>;
@@ -1,4 +1,4 @@
1
- import { f as RequestOptions, h as Transport } from "./transport-E0ZaPNWJ.js";
1
+ import { f as RequestOptions, h as Transport } from "./transport-CS11mEqI.js";
2
2
  import { t as ListResult } from "./list-BT_bBm9Z.js";
3
3
  //#region src/resources/transform-test.d.ts
4
4
  interface TransformTestListParams {
@@ -342,7 +342,7 @@ declare function transformTestResource(transport: Transport): {
342
342
  delete: (id: number, options?: RequestOptions | undefined) => Promise<void>;
343
343
  run: (id: number, options?: RequestOptions | undefined) => Promise<{
344
344
  [x: string]: unknown;
345
- status: "failed" | "error" | "passed";
345
+ status: "error" | "failed" | "passed";
346
346
  expectations: ({
347
347
  [x: string]: unknown;
348
348
  name: string;
@@ -102,8 +102,8 @@ declare const TransformTest: z.ZodObject<{
102
102
  }, z.core.$loose>;
103
103
  type TransformTest = z.infer<typeof TransformTest>;
104
104
  declare const TransformTestCompact: z.ZodObject<{
105
- name: z.ZodString;
106
105
  id: z.ZodNumber;
106
+ name: z.ZodString;
107
107
  description: z.ZodNullable<z.ZodString>;
108
108
  transform_id: z.ZodNumber;
109
109
  }, z.core.$strip>;
@@ -264,8 +264,8 @@ declare const TransformTestExpectationResult: z.ZodDiscriminatedUnion<[z.ZodDisc
264
264
  type TransformTestExpectationResult = z.infer<typeof TransformTestExpectationResult>;
265
265
  declare const TransformTestRunResult: z.ZodObject<{
266
266
  status: z.ZodEnum<{
267
- failed: "failed";
268
267
  error: "error";
268
+ failed: "failed";
269
269
  passed: "passed";
270
270
  }>;
271
271
  expectations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1,6 +1,6 @@
1
- import { a as Credential, o as CredentialRefresher } from "./credential-6aOEGqMH.js";
1
+ import { a as Credential, o as CredentialRefresher } from "./credential-B6fKSvqp.js";
2
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";
3
+ import { i as FeatureName, r as FeatureGap } from "./features-SMSfJhB6.js";
4
4
  import { i as ServerVersion, n as Edition } from "./tag-qzjGGci8.js";
5
5
  import { ZodError, ZodType, z } from "zod";
6
6
  //#region src/version/probe.d.ts
@@ -29,10 +29,10 @@ declare function profileFromProperties(properties: SessionProperties): ServerPro
29
29
  //#endregion
30
30
  //#region src/version/profile.d.ts
31
31
  declare const Skew: z.ZodEnum<{
32
- development: "development";
33
32
  supported: "supported";
34
33
  "older-than-known": "older-than-known";
35
34
  "newer-than-known": "newer-than-known";
35
+ development: "development";
36
36
  }>;
37
37
  type Skew = z.infer<typeof Skew>;
38
38
  declare const ServerProfile: z.ZodObject<{
@@ -53,22 +53,28 @@ declare const ServerProfile: z.ZodObject<{
53
53
  }>;
54
54
  tokenFeatures: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
55
55
  features: z.ZodRecord<z.ZodEnum<{
56
- contentTranslation: "contentTranslation";
57
56
  dataActionCollections: "dataActionCollections";
58
57
  dataActionsWithoutModel: "dataActionsWithoutModel";
58
+ dataApps: "dataApps";
59
59
  transforms: "transforms";
60
60
  transformJobActivation: "transformJobActivation";
61
61
  measures: "measures";
62
+ collectionItemMeasures: "collectionItemMeasures";
63
+ explorations: "explorations";
64
+ tableFromDefinition: "tableFromDefinition";
62
65
  library: "library";
63
66
  libraryDashboards: "libraryDashboards";
67
+ tablePublishTargetCollection: "tablePublishTargetCollection";
64
68
  remoteSync: "remoteSync";
65
69
  remoteSyncRemoteChanges: "remoteSyncRemoteChanges";
66
70
  remoteSyncCollectionsOnlyUpdate: "remoteSyncCollectionsOnlyUpdate";
67
71
  remoteSyncExportPreflight: "remoteSyncExportPreflight";
68
72
  remoteSyncBranchGuard: "remoteSyncBranchGuard";
69
73
  remoteSyncMerge: "remoteSyncMerge";
74
+ contentTranslation: "contentTranslation";
70
75
  contentVerification: "contentVerification";
71
76
  transformTargetTableId: "transformTargetTableId";
77
+ transformSourceTablesAsList: "transformSourceTablesAsList";
72
78
  transformTargetTableLinkedOnCreate: "transformTargetTableLinkedOnCreate";
73
79
  transformJobRunIdIsNumeric: "transformJobRunIdIsNumeric";
74
80
  transformCheckpointReset: "transformCheckpointReset";
@@ -88,6 +94,7 @@ declare const ServerProfile: z.ZodObject<{
88
94
  dependencyItemListings: "dependencyItemListings";
89
95
  dependencyAsyncBackfill: "dependencyAsyncBackfill";
90
96
  measureDependencyGraph: "measureDependencyGraph";
97
+ actionDependencyGraph: "actionDependencyGraph";
91
98
  tableListAccessFilters: "tableListAccessFilters";
92
99
  tableListTransformTargets: "tableListTransformTargets";
93
100
  tableListPublishedFilter: "tableListPublishedFilter";
@@ -108,10 +115,10 @@ declare const ServerProfile: z.ZodObject<{
108
115
  exportCsvByteOrderMark: "exportCsvByteOrderMark";
109
116
  }>, z.ZodBoolean>;
110
117
  skew: z.ZodEnum<{
111
- development: "development";
112
118
  supported: "supported";
113
119
  "older-than-known": "older-than-known";
114
120
  "newer-than-known": "newer-than-known";
121
+ development: "development";
115
122
  }>;
116
123
  }, z.core.$strip>;
117
124
  type ServerProfile = z.infer<typeof ServerProfile>;
@@ -332,22 +339,28 @@ declare const RequirementFailure: z.ZodObject<{
332
339
  }>;
333
340
  detail: z.ZodString;
334
341
  feature: z.ZodEnum<{
335
- contentTranslation: "contentTranslation";
336
342
  dataActionCollections: "dataActionCollections";
337
343
  dataActionsWithoutModel: "dataActionsWithoutModel";
344
+ dataApps: "dataApps";
338
345
  transforms: "transforms";
339
346
  transformJobActivation: "transformJobActivation";
340
347
  measures: "measures";
348
+ collectionItemMeasures: "collectionItemMeasures";
349
+ explorations: "explorations";
350
+ tableFromDefinition: "tableFromDefinition";
341
351
  library: "library";
342
352
  libraryDashboards: "libraryDashboards";
353
+ tablePublishTargetCollection: "tablePublishTargetCollection";
343
354
  remoteSync: "remoteSync";
344
355
  remoteSyncRemoteChanges: "remoteSyncRemoteChanges";
345
356
  remoteSyncCollectionsOnlyUpdate: "remoteSyncCollectionsOnlyUpdate";
346
357
  remoteSyncExportPreflight: "remoteSyncExportPreflight";
347
358
  remoteSyncBranchGuard: "remoteSyncBranchGuard";
348
359
  remoteSyncMerge: "remoteSyncMerge";
360
+ contentTranslation: "contentTranslation";
349
361
  contentVerification: "contentVerification";
350
362
  transformTargetTableId: "transformTargetTableId";
363
+ transformSourceTablesAsList: "transformSourceTablesAsList";
351
364
  transformTargetTableLinkedOnCreate: "transformTargetTableLinkedOnCreate";
352
365
  transformJobRunIdIsNumeric: "transformJobRunIdIsNumeric";
353
366
  transformCheckpointReset: "transformCheckpointReset";
@@ -367,6 +380,7 @@ declare const RequirementFailure: z.ZodObject<{
367
380
  dependencyItemListings: "dependencyItemListings";
368
381
  dependencyAsyncBackfill: "dependencyAsyncBackfill";
369
382
  measureDependencyGraph: "measureDependencyGraph";
383
+ actionDependencyGraph: "actionDependencyGraph";
370
384
  tableListAccessFilters: "tableListAccessFilters";
371
385
  tableListTransformTargets: "tableListTransformTargets";
372
386
  tableListPublishedFilter: "tableListPublishedFilter";
@@ -1,4 +1,4 @@
1
- import { f as RequestOptions, h as Transport } from "./transport-E0ZaPNWJ.js";
1
+ import { f as RequestOptions, h as Transport } from "./transport-CS11mEqI.js";
2
2
  import { t as UploadResult } from "./upload-UPfZFdbH.js";
3
3
  import { t as CsvFile } from "./csv-upload--K35QedP.js";
4
4
  //#region src/resources/upload.d.ts
@@ -2,14 +2,14 @@ import { z } from "zod";
2
2
  //#region src/domain/user.d.ts
3
3
  declare const CurrentUser: z.ZodObject<{
4
4
  id: z.ZodNumber;
5
- email: z.ZodEmail;
5
+ email: z.ZodString;
6
6
  common_name: z.ZodString;
7
7
  is_superuser: z.ZodBoolean;
8
8
  }, z.core.$loose>;
9
9
  type CurrentUser = z.infer<typeof CurrentUser>;
10
10
  declare const CurrentUserCompact: z.ZodObject<{
11
11
  id: z.ZodNumber;
12
- email: z.ZodEmail;
12
+ email: z.ZodString;
13
13
  common_name: z.ZodString;
14
14
  is_superuser: z.ZodBoolean;
15
15
  }, z.core.$strip>;
@@ -1,2 +1,2 @@
1
- import { C as versionTooOldMessage, S as missingTokenFeatureMessage, b as RequirementFailure, x as RequirementReason, y as CapabilityError } from "../transport-E0ZaPNWJ.js";
1
+ import { C as versionTooOldMessage, S as missingTokenFeatureMessage, b as RequirementFailure, x as RequirementReason, y as CapabilityError } from "../transport-CS11mEqI.js";
2
2
  export { CapabilityError, RequirementFailure, RequirementReason, missingTokenFeatureMessage, versionTooOldMessage };
@@ -1,2 +1,2 @@
1
- import { a as FeatureRule, c as TokenGap, d as isFeatureName, f as ruleGap, i as FeatureName, l as VersionGap, n as FEATURE_RULES, o as Features, r as FeatureGap, s as RuleMajor, t as FEATURE_NAMES, u as evaluateFeatures } from "../features-CnFkUCj2.js";
2
- export { FEATURE_NAMES, FEATURE_RULES, FeatureGap, FeatureName, FeatureRule, Features, RuleMajor, TokenGap, VersionGap, evaluateFeatures, isFeatureName, ruleGap };
1
+ import { a as FeatureRule, c as TokenGap, d as featureAvailability, f as isFeatureName, i as FeatureName, l as VersionGap, n as FEATURE_RULES, o as Features, p as ruleGap, r as FeatureGap, s as RuleMajor, t as FEATURE_NAMES, u as evaluateFeatures } from "../features-SMSfJhB6.js";
2
+ export { FEATURE_NAMES, FEATURE_RULES, FeatureGap, FeatureName, FeatureRule, Features, RuleMajor, TokenGap, VersionGap, evaluateFeatures, featureAvailability, isFeatureName, ruleGap };
@@ -1,16 +1,25 @@
1
+ import { KNOWN_RANGE } from "./known-range.js";
1
2
  import { z } from "zod";
2
3
  //#region src/version/features.ts
3
4
  const FEATURE_RULES = {
4
5
  dataActionCollections: { since: 65 },
5
6
  dataActionsWithoutModel: { since: 65 },
7
+ dataApps: {
8
+ since: 65,
9
+ tokenFeature: "data-apps"
10
+ },
6
11
  transforms: { since: 59 },
7
12
  transformJobActivation: { since: 61 },
8
13
  measures: { since: 59 },
14
+ collectionItemMeasures: { since: 61 },
15
+ explorations: { since: 65 },
16
+ tableFromDefinition: { since: 64 },
9
17
  library: {
10
18
  since: 59,
11
19
  tokenFeature: "library"
12
20
  },
13
21
  libraryDashboards: { since: 65 },
22
+ tablePublishTargetCollection: { since: 62 },
14
23
  remoteSync: {
15
24
  since: 58,
16
25
  tokenFeature: "remote_sync"
@@ -38,6 +47,7 @@ const FEATURE_RULES = {
38
47
  tokenFeature: "content_verification"
39
48
  },
40
49
  transformTargetTableId: { since: 61 },
50
+ transformSourceTablesAsList: { since: 60 },
41
51
  transformTargetTableLinkedOnCreate: {
42
52
  since: 61,
43
53
  until: 61
@@ -78,6 +88,7 @@ const FEATURE_RULES = {
78
88
  tokenFeature: "dependencies"
79
89
  },
80
90
  measureDependencyGraph: { since: 59 },
91
+ actionDependencyGraph: { since: 65 },
81
92
  tableListAccessFilters: { since: 59 },
82
93
  tableListTransformTargets: { since: 60 },
83
94
  tableListPublishedFilter: { since: 63 },
@@ -103,7 +114,7 @@ const FEATURE_RULES = {
103
114
  tokenFeature: "transforms-python"
104
115
  },
105
116
  pythonTestRun: {
106
- since: 60,
117
+ since: 58,
107
118
  tokenFeature: "transforms-python"
108
119
  },
109
120
  sourceReplacement: {
@@ -120,6 +131,23 @@ function isFeatureName(name) {
120
131
  }
121
132
  const FEATURE_NAMES = Object.keys(FEATURE_RULES).filter(isFeatureName);
122
133
  const Features = z.record(z.enum(FEATURE_NAMES), z.boolean());
134
+ /**
135
+ * Which servers hold `feature`, as a reader says it: the majors its rule spans and the token
136
+ * feature it needs, each left out where every supported server meets it.
137
+ */
138
+ function featureAvailability(feature) {
139
+ const rule = FEATURE_RULES[feature];
140
+ const token = rule.tokenFeature === void 0 ? null : `token ${rule.tokenFeature}`;
141
+ const parts = [majorSpan(rule), token].filter((part) => part !== null);
142
+ if (parts.length === 0) throw new Error(`${feature} holds on every supported server, so it gates nothing`);
143
+ return parts.join(", ");
144
+ }
145
+ function majorSpan(rule) {
146
+ const floor = rule.since > KNOWN_RANGE.min ? `v${rule.since}` : null;
147
+ if (rule.until === void 0) return floor === null ? null : `${floor}+`;
148
+ if (floor === null) return `up to v${rule.until}`;
149
+ return rule.since === rule.until ? `${floor} only` : `${floor}-v${rule.until}`;
150
+ }
123
151
  function evaluateFeatures(major, tokenFeatures) {
124
152
  const entries = FEATURE_NAMES.map((name) => [name, ruleHolds(FEATURE_RULES[name], major, tokenFeatures)]);
125
153
  return Features.parse(Object.fromEntries(entries));
@@ -140,4 +168,4 @@ function versionHolds(rule, major) {
140
168
  return major >= rule.since && (rule.until === void 0 || major <= rule.until);
141
169
  }
142
170
  //#endregion
143
- export { FEATURE_NAMES, FEATURE_RULES, Features, evaluateFeatures, isFeatureName, ruleGap };
171
+ export { FEATURE_NAMES, FEATURE_RULES, Features, evaluateFeatures, featureAvailability, isFeatureName, ruleGap };
@@ -0,0 +1,2 @@
1
+ import { a as PresentTrigger, c as inputGatesOf, i as NonEmptyTrigger, n as GateTrigger, o as ValuesTrigger, r as InputGate, s as gateTriggered, t as GateEffect } from "../input-gates-DwKoTJVQ.js";
2
+ export { GateEffect, GateTrigger, InputGate, NonEmptyTrigger, PresentTrigger, ValuesTrigger, gateTriggered, inputGatesOf };
@@ -0,0 +1,13 @@
1
+ import { n as inputGatesOf } from "../input-gate-registry-Dai7SfXb.js";
2
+ //#region src/version/input-gates.ts
3
+ /** Whether `value`, as a caller passes it for the gated field, is one the gate applies to. */
4
+ function gateTriggered(gate, value) {
5
+ const { when } = gate;
6
+ switch (when.kind) {
7
+ case "present": return value !== void 0;
8
+ case "values": return when.values.some((gated) => gated === value);
9
+ case "nonEmpty": return Array.isArray(value) && value.length > 0;
10
+ }
11
+ }
12
+ //#endregion
13
+ export { gateTriggered, inputGatesOf };
@@ -1,2 +1,2 @@
1
- import { At as profileFromProperties, Ct as PROBE_PATH, Dt as ServerInfo, Et as ProbeOptions, Ot as probeBudget, Tt as ProbeBudget, jt as serverInfoFromProperties, kt as probeServer, wt as PROBE_TIMEOUT_MS } from "../transport-E0ZaPNWJ.js";
1
+ import { At as profileFromProperties, Ct as PROBE_PATH, Dt as ServerInfo, Et as ProbeOptions, Ot as probeBudget, Tt as ProbeBudget, jt as serverInfoFromProperties, kt as probeServer, wt as PROBE_TIMEOUT_MS } from "../transport-CS11mEqI.js";
2
2
  export { PROBE_PATH, PROBE_TIMEOUT_MS, ProbeBudget, ProbeOptions, ServerInfo, probeBudget, probeServer, profileFromProperties, serverInfoFromProperties };
@@ -1,2 +1,2 @@
1
- import { St as featureGap, bt as Skew, xt as createServerProfile, yt as ServerProfile } from "../transport-E0ZaPNWJ.js";
1
+ import { St as featureGap, bt as Skew, xt as createServerProfile, yt as ServerProfile } from "../transport-CS11mEqI.js";
2
2
  export { ServerProfile, Skew, createServerProfile, featureGap };
@@ -1,2 +1,2 @@
1
- import { n as featureFailures, r as supersedingFeature, t as checkFeatures } from "../requirement-check-CIA5IHC1.js";
1
+ import { n as featureFailures, r as supersedingFeature, t as checkFeatures } from "../requirement-check-CHHEHXcj.js";
2
2
  export { checkFeatures, featureFailures, supersedingFeature };
@@ -1,2 +1,2 @@
1
- import { a as methodRequirements, i as isMethodKey, n as METHOD_REQUIREMENTS, r as MethodKey, t as METHOD_KEYS } from "../requirements-C0txASN8.js";
1
+ import { a as methodRequirements, i as isMethodKey, n as METHOD_REQUIREMENTS, r as MethodKey, t as METHOD_KEYS } from "../requirements-Dx_ZVzl7.js";
2
2
  export { METHOD_KEYS, METHOD_REQUIREMENTS, MethodKey, isMethodKey, methodRequirements };
@@ -1,5 +1,8 @@
1
1
  //#region src/version/requirements.ts
2
2
  const METHOD_REQUIREMENTS = {
3
+ "apiKey.list": [],
4
+ "apiKey.create": [],
5
+ "apiKey.delete": [],
3
6
  "card.list": [],
4
7
  "card.get": [],
5
8
  "card.create": [],
@@ -34,6 +37,13 @@ const METHOD_REQUIREMENTS = {
34
37
  "dataAction.archive": [],
35
38
  "dataAction.delete": [],
36
39
  "dataAction.execute": [],
40
+ "dataApp.list": ["dataApps"],
41
+ "dataApp.get": ["dataApps"],
42
+ "dataApp.create": ["dataApps"],
43
+ "dataApp.update": ["dataApps"],
44
+ "dataApp.replaceBundle": ["dataApps"],
45
+ "dataApp.typedSchema": ["dataApps"],
46
+ "dataApp.delete": ["dataApps"],
37
47
  "database.list": [],
38
48
  "database.get": [],
39
49
  "database.update": [],
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@metabase/client",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Metabase API client",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/metabase/mb-cli.git",
8
+ "url": "git+https://github.com/metabase/metabase-cli.git",
9
9
  "directory": "packages/client"
10
10
  },
11
11
  "files": [
@@ -36,6 +36,7 @@
36
36
  "./http/retry": "./dist/http/retry.js",
37
37
  "./http/transport": "./dist/http/transport.js",
38
38
  "./version/features": "./dist/version/features.js",
39
+ "./version/input-gates": "./dist/version/input-gates.js",
39
40
  "./version/known-range": "./dist/version/known-range.js",
40
41
  "./version/profile": "./dist/version/profile.js",
41
42
  "./version/capability-error": "./dist/version/capability-error.js",