@metabase/client 0.1.0 → 0.1.1

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 (204) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +6 -4
  3. package/dist/api-key-DJeN1-7G.d.ts +46 -0
  4. package/dist/{card-B6merEUN.d.ts → card-BxBzr5Uj.d.ts} +11 -11
  5. package/dist/{card-BZx4NSr-.d.ts → card-DN0sLkCG.d.ts} +4 -4
  6. package/dist/{client-DNRvXFRm.d.ts → client-DdXLlH1B.d.ts} +270 -166
  7. package/dist/client.d.ts +1 -1
  8. package/dist/client.js +4 -0
  9. package/dist/{collection-Bib61WiV.d.ts → collection-DGnTvD6R.d.ts} +20 -20
  10. package/dist/{collection-CqtGPi4W.d.ts → collection-fFahL-ub.d.ts} +18 -4
  11. package/dist/{dashboard-XTe46250.d.ts → dashboard-CM7RmNeE.d.ts} +2 -2
  12. package/dist/{dashboard-z9i1VUZC.d.ts → dashboard-DtLXVgtf.d.ts} +21 -13
  13. package/dist/{data-action-rS27f2Ji.d.ts → data-action-CkXVrOUH.d.ts} +7 -5
  14. package/dist/data-app-CqP5_fpB.d.ts +76 -0
  15. package/dist/{database-DqTespfa.d.ts → database-B0JNZjDN.d.ts} +3 -3
  16. package/dist/{database-BLUMlywE.d.ts → database-BxqDmfcj.d.ts} +9 -9
  17. package/dist/{dataset-C6lX1-cr.d.ts → dataset-BBNGPVec.d.ts} +22 -22
  18. package/dist/{dataset-Cj3XuKLe.d.ts → dataset-BUirJ1rO.d.ts} +3 -3
  19. package/dist/{dependency-fN5_7a22.d.ts → dependency-CzpXmeu7.d.ts} +26 -26
  20. package/dist/{dependency-D8Qs5Xdx.d.ts → dependency-arB8Cr2H.d.ts} +147 -95
  21. package/dist/{document-oZNDbDfx.d.ts → document-tLd6pYWe.d.ts} +2 -2
  22. package/dist/domain/api-key.d.ts +2 -0
  23. package/dist/domain/api-key.js +31 -0
  24. package/dist/domain/card.d.ts +1 -1
  25. package/dist/domain/collection.d.ts +1 -1
  26. package/dist/domain/dashboard.d.ts +2 -2
  27. package/dist/domain/dashboard.js +21 -4
  28. package/dist/domain/data-action.d.ts +2 -2
  29. package/dist/domain/data-action.js +8 -2
  30. package/dist/domain/data-app.d.ts +2 -0
  31. package/dist/domain/data-app.js +52 -0
  32. package/dist/domain/database.d.ts +1 -1
  33. package/dist/domain/dataset.d.ts +1 -1
  34. package/dist/domain/dependency.d.ts +1 -1
  35. package/dist/domain/dependency.js +6 -3
  36. package/dist/domain/document.d.ts +1 -1
  37. package/dist/domain/eid-translation.d.ts +1 -1
  38. package/dist/domain/embedding.d.ts +1 -1
  39. package/dist/domain/field.d.ts +2 -2
  40. package/dist/domain/field.js +8 -2
  41. package/dist/domain/git-sync.d.ts +1 -1
  42. package/dist/domain/library.d.ts +2 -2
  43. package/dist/domain/library.js +8 -2
  44. package/dist/domain/measure.d.ts +1 -1
  45. package/dist/domain/measure.js +3 -1
  46. package/dist/domain/metric.d.ts +1 -1
  47. package/dist/domain/notification.d.ts +2 -2
  48. package/dist/domain/notification.js +6 -1
  49. package/dist/domain/pulse.d.ts +2 -2
  50. package/dist/domain/pulse.js +10 -3
  51. package/dist/domain/replacement.d.ts +1 -1
  52. package/dist/domain/revision.d.ts +2 -2
  53. package/dist/domain/revision.js +29 -2
  54. package/dist/domain/search.d.ts +1 -1
  55. package/dist/domain/segment.d.ts +1 -1
  56. package/dist/domain/segment.js +3 -1
  57. package/dist/domain/setup.d.ts +1 -1
  58. package/dist/domain/setup.js +1 -1
  59. package/dist/domain/snippet.d.ts +1 -1
  60. package/dist/domain/table.d.ts +2 -2
  61. package/dist/domain/table.js +35 -4
  62. package/dist/domain/timeline.d.ts +1 -1
  63. package/dist/domain/transform-inspector.d.ts +1 -1
  64. package/dist/domain/transform-job.d.ts +2 -2
  65. package/dist/domain/transform-job.js +8 -2
  66. package/dist/domain/transform-python.d.ts +2 -2
  67. package/dist/domain/transform-python.js +15 -3
  68. package/dist/domain/transform-tag.d.ts +1 -1
  69. package/dist/domain/transform-test.d.ts +1 -1
  70. package/dist/domain/transform.d.ts +2 -2
  71. package/dist/domain/transform.js +76 -7
  72. package/dist/domain/user.d.ts +1 -1
  73. package/dist/domain/user.js +1 -1
  74. package/dist/{eid-translation-nuhr8St2.d.ts → eid-translation-CH6NPWd-.d.ts} +15 -15
  75. package/dist/{embedding-Cz3RUJYf.d.ts → embedding-oU3gqfgX.d.ts} +1 -1
  76. package/dist/{erd-BujD227Y.d.ts → erd-CbV7xvAc.d.ts} +1 -1
  77. package/dist/errors.d.ts +1 -1
  78. package/dist/{features-CnFkUCj2.d.ts → features-SMSfJhB6.d.ts} +36 -2
  79. package/dist/{field-Bqn10Fq_.d.ts → field-D1Pfk-0S.d.ts} +2 -2
  80. package/dist/{field-BCRO19mk.d.ts → field-p9Rme2zB.d.ts} +6 -4
  81. package/dist/{git-sync-gAMKsZgN.d.ts → git-sync-BTf1aYHr.d.ts} +3 -3
  82. package/dist/{git-sync-DNXrNVCW.d.ts → git-sync-C99SVdJ9.d.ts} +2 -2
  83. package/dist/{glossary-CqFlzW33.d.ts → glossary-DFvnz-E5.d.ts} +1 -1
  84. package/dist/http/errors.d.ts +1 -1
  85. package/dist/http/transport.d.ts +1 -1
  86. package/dist/index.d.ts +43 -41
  87. package/dist/index.js +7 -5
  88. package/dist/input-gate-registry-Dai7SfXb.js +14 -0
  89. package/dist/input-gates-DwKoTJVQ.d.ts +28 -0
  90. package/dist/{json-CZvjc3--.d.ts → json-BksZpXDC.d.ts} +1 -1
  91. package/dist/json-pointer.d.ts +2 -1
  92. package/dist/json-pointer.js +4 -1
  93. package/dist/json.d.ts +1 -1
  94. package/dist/{library-Cx9h_RkU.d.ts → library-B9pEq7qP.d.ts} +8 -6
  95. package/dist/{measure-KuXdjZYJ.d.ts → measure-CgH14YQZ.d.ts} +1 -1
  96. package/dist/{measure-CuMqPbQX.d.ts → measure-lPz8qnwz.d.ts} +1 -1
  97. package/dist/{metric-yvehaVCS.d.ts → metric-DcYloqOQ.d.ts} +2 -2
  98. package/dist/{notification-BiegPoSD.d.ts → notification-Cp5GJErS.d.ts} +3 -3
  99. package/dist/{notification-BT2TDAd_.d.ts → notification-D1MThyKE.d.ts} +66 -2
  100. package/dist/{paginate-DZWvWvbm.d.ts → paginate-COuL0Gzl.d.ts} +1 -1
  101. package/dist/paginate.d.ts +1 -1
  102. package/dist/{pulse-CMc1Rwdj.d.ts → pulse-0LG3K6qO.d.ts} +7 -5
  103. package/dist/{pulse-dylocLd9.d.ts → pulse-BzKmz3Yn.d.ts} +2 -2
  104. package/dist/{replacement-CyvtbxGg.d.ts → replacement-BGyggp-G.d.ts} +5 -5
  105. package/dist/{replacement-S9U3gApY.d.ts → replacement-CVebCuNp.d.ts} +5 -5
  106. package/dist/{requirement-check-CIA5IHC1.d.ts → requirement-check-glU7wqhQ.d.ts} +2 -2
  107. package/dist/{requirements-C0txASN8.d.ts → requirements-Dx_ZVzl7.d.ts} +11 -1
  108. package/dist/resources/api-key.d.ts +11 -0
  109. package/dist/resources/api-key.js +35 -0
  110. package/dist/resources/card.d.ts +1 -1
  111. package/dist/resources/collection.d.ts +1 -1
  112. package/dist/resources/collection.js +29 -5
  113. package/dist/resources/content-translation.d.ts +1 -1
  114. package/dist/resources/content-translation.js +1 -1
  115. package/dist/resources/dashboard.d.ts +1 -1
  116. package/dist/resources/dashboard.js +8 -5
  117. package/dist/resources/data-action.d.ts +3 -48
  118. package/dist/resources/data-action.js +9 -9
  119. package/dist/resources/data-app.d.ts +112 -0
  120. package/dist/resources/data-app.js +75 -0
  121. package/dist/resources/database.d.ts +1 -1
  122. package/dist/resources/dataset.d.ts +1 -1
  123. package/dist/resources/dependency.d.ts +1 -1
  124. package/dist/resources/dependency.js +13 -7
  125. package/dist/resources/document.d.ts +2 -2
  126. package/dist/resources/eid-translation.d.ts +2 -2
  127. package/dist/resources/erd.d.ts +1 -1
  128. package/dist/resources/field.d.ts +1 -1
  129. package/dist/resources/field.js +3 -2
  130. package/dist/resources/git-sync.d.ts +1 -1
  131. package/dist/resources/git-sync.js +1 -1
  132. package/dist/resources/glossary.d.ts +1 -1
  133. package/dist/resources/library.d.ts +4 -4
  134. package/dist/resources/library.js +2 -2
  135. package/dist/resources/measure.d.ts +1 -1
  136. package/dist/resources/metric.d.ts +1 -1
  137. package/dist/resources/moderation-review.d.ts +1 -1
  138. package/dist/resources/notification.d.ts +1 -1
  139. package/dist/resources/notification.js +2 -2
  140. package/dist/resources/optional-parsed.d.ts +1 -1
  141. package/dist/resources/permission.d.ts +1 -1
  142. package/dist/resources/pivot-export.d.ts +1 -1
  143. package/dist/resources/pulse.d.ts +1 -1
  144. package/dist/resources/pulse.js +3 -2
  145. package/dist/resources/replacement.d.ts +1 -1
  146. package/dist/resources/revision.d.ts +3 -3
  147. package/dist/resources/revision.js +5 -10
  148. package/dist/resources/search.d.ts +1 -1
  149. package/dist/resources/search.js +23 -2
  150. package/dist/resources/segment.d.ts +1 -1
  151. package/dist/resources/setting.d.ts +1 -1
  152. package/dist/resources/setup.d.ts +2 -2
  153. package/dist/resources/snippet.d.ts +1 -1
  154. package/dist/resources/table.d.ts +1 -1
  155. package/dist/resources/table.js +9 -10
  156. package/dist/resources/timeline-event.d.ts +2 -2
  157. package/dist/resources/timeline.d.ts +1 -1
  158. package/dist/resources/transform-dag-run.d.ts +1 -1
  159. package/dist/resources/transform-inspector.d.ts +2 -2
  160. package/dist/resources/transform-job.d.ts +1 -1
  161. package/dist/resources/transform-python.d.ts +11 -4
  162. package/dist/resources/transform-python.js +3 -2
  163. package/dist/resources/transform-tag.d.ts +1 -1
  164. package/dist/resources/transform-test.d.ts +1 -1
  165. package/dist/resources/transform.d.ts +1 -1
  166. package/dist/resources/transform.js +13 -3
  167. package/dist/resources/upload.d.ts +1 -1
  168. package/dist/resources/user.d.ts +2 -2
  169. package/dist/{revision-CQBPhohA.d.ts → revision-Dyl-8p7d.d.ts} +8 -6
  170. package/dist/{search-NZR6iRBs.d.ts → search-Cm5IxKss.d.ts} +8 -8
  171. package/dist/{search-BxJipLN6.d.ts → search-Cten2h0I.d.ts} +2 -2
  172. package/dist/{segment-pj3wklGe.d.ts → segment-CbAgVO-5.d.ts} +1 -1
  173. package/dist/{segment-D2i34X9l.d.ts → segment-DQLX6r1E.d.ts} +2 -2
  174. package/dist/{setup-Ez_U7GmM.d.ts → setup-JqcJ2unJ.d.ts} +1 -1
  175. package/dist/signal.d.ts +1 -1
  176. package/dist/{snippet-hEV429Pv.d.ts → snippet-C_Ilx7tR.d.ts} +2 -2
  177. package/dist/{snippet-RnnWa4TL.d.ts → snippet-Djn0rL21.d.ts} +2 -2
  178. package/dist/{table-B_lfuaHc.d.ts → table-CDZbLNow.d.ts} +6 -6
  179. package/dist/{table-B3-UaPHa.d.ts → table-Od6uvDVW.d.ts} +19 -14
  180. package/dist/{timeline-folD3mQ_.d.ts → timeline-BK45hy-h.d.ts} +31 -31
  181. package/dist/{timeline-C2IEcRlP.d.ts → timeline-BTs6fuRp.d.ts} +2 -2
  182. package/dist/{transform-CDurgE1D.d.ts → transform-C5thnJwW.d.ts} +139 -23
  183. package/dist/{transform-CXOT5kFe.d.ts → transform-WASQAXeA.d.ts} +39 -25
  184. package/dist/{transform-inspector-BUYBt6--.d.ts → transform-inspector-CMCh8WKV.d.ts} +4 -4
  185. package/dist/{transform-job-CTJImaOd.d.ts → transform-job-D8jTQtdX.d.ts} +5 -3
  186. package/dist/{transform-job-29P6BULe.d.ts → transform-job-DmTwKxhc.d.ts} +4 -4
  187. package/dist/{transform-python-DdDnW6yK.d.ts → transform-python-DtL3xxMj.d.ts} +49 -4
  188. package/dist/{transform-tag-DVUIZTEM.d.ts → transform-tag-C6j5EUkX.d.ts} +1 -1
  189. package/dist/{transform-test-A-CJYT6B.d.ts → transform-test-CR_i54IV.d.ts} +1 -1
  190. package/dist/{transform-test-BwuyrHpT.d.ts → transform-test-CeMzDpUC.d.ts} +1 -1
  191. package/dist/{transport-E0ZaPNWJ.d.ts → transport-BsXqRujn.d.ts} +17 -3
  192. package/dist/{upload-B7PG3ePk.d.ts → upload-B5YjVkSW.d.ts} +1 -1
  193. package/dist/{user-2r0OBoO6.d.ts → user-Sqqv7rqh.d.ts} +2 -2
  194. package/dist/version/capability-error.d.ts +1 -1
  195. package/dist/version/features.d.ts +2 -2
  196. package/dist/version/features.js +30 -2
  197. package/dist/version/input-gates.d.ts +2 -0
  198. package/dist/version/input-gates.js +13 -0
  199. package/dist/version/probe.d.ts +1 -1
  200. package/dist/version/profile.d.ts +1 -1
  201. package/dist/version/requirement-check.d.ts +1 -1
  202. package/dist/version/requirements.d.ts +1 -1
  203. package/dist/version/requirements.js +10 -0
  204. package/package.json +3 -2
@@ -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-BsXqRujn.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 {
@@ -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>;
@@ -1,6 +1,6 @@
1
1
  import { a as Credential, o as CredentialRefresher } from "./credential-6aOEGqMH.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
@@ -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";
@@ -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-BsXqRujn.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-BsXqRujn.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-BsXqRujn.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-BsXqRujn.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-glU7wqhQ.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.1",
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",