@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
@@ -7,7 +7,7 @@ declare const NotificationPayloadType: z.ZodEnum<{
7
7
  "notification/testing": "notification/testing";
8
8
  }>;
9
9
  type NotificationPayloadType = z.infer<typeof NotificationPayloadType>;
10
- declare const CARD_PAYLOAD_TYPE: NotificationPayloadType;
10
+ declare const CARD_PAYLOAD_TYPE = "notification/card";
11
11
  declare const NotificationSendCondition: z.ZodEnum<{
12
12
  has_result: "has_result";
13
13
  goal_above: "goal_above";
@@ -223,6 +223,70 @@ declare const Notification: z.ZodObject<{
223
223
  }, z.core.$loose>>;
224
224
  }, z.core.$loose>;
225
225
  type Notification = z.infer<typeof Notification>;
226
+ declare const AnyNotification: z.ZodDiscriminatedUnion<[z.ZodObject<{
227
+ id: z.ZodNumber;
228
+ payload_id: z.ZodNullable<z.ZodNumber>;
229
+ payload: z.ZodNullable<z.ZodObject<{
230
+ id: z.ZodOptional<z.ZodNumber>;
231
+ card_id: z.ZodNumber;
232
+ send_condition: z.ZodEnum<{
233
+ has_result: "has_result";
234
+ goal_above: "goal_above";
235
+ goal_below: "goal_below";
236
+ }>;
237
+ send_once: z.ZodBoolean;
238
+ }, z.core.$loose>>;
239
+ active: z.ZodBoolean;
240
+ creator_id: z.ZodNullable<z.ZodNumber>;
241
+ subscriptions: z.ZodArray<z.ZodObject<{
242
+ id: z.ZodOptional<z.ZodNumber>;
243
+ type: z.ZodEnum<{
244
+ "notification-subscription/cron": "notification-subscription/cron";
245
+ "notification-subscription/system-event": "notification-subscription/system-event";
246
+ }>;
247
+ cron_schedule: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
+ event_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
249
+ ui_display_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
250
+ "cron/raw": "cron/raw";
251
+ "cron/builder": "cron/builder";
252
+ }>>>;
253
+ }, z.core.$loose>>;
254
+ handlers: z.ZodArray<z.ZodObject<{
255
+ id: z.ZodOptional<z.ZodNumber>;
256
+ channel_type: z.ZodEnum<{
257
+ "channel/email": "channel/email";
258
+ "channel/slack": "channel/slack";
259
+ "channel/http": "channel/http";
260
+ }>;
261
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
262
+ template_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
263
+ active: z.ZodOptional<z.ZodBoolean>;
264
+ recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
265
+ id: z.ZodOptional<z.ZodNumber>;
266
+ type: z.ZodEnum<{
267
+ "notification-recipient/user": "notification-recipient/user";
268
+ "notification-recipient/group": "notification-recipient/group";
269
+ "notification-recipient/raw-value": "notification-recipient/raw-value";
270
+ "notification-recipient/template": "notification-recipient/template";
271
+ }>;
272
+ user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
273
+ permissions_group_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
274
+ details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
275
+ value: z.ZodOptional<z.ZodString>;
276
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
277
+ }, z.core.$loose>>>;
278
+ }, z.core.$loose>>>;
279
+ }, z.core.$loose>>;
280
+ payload_type: z.ZodLiteral<"notification/card">;
281
+ }, z.core.$loose>, z.ZodObject<{
282
+ id: z.ZodNumber;
283
+ payload_type: z.ZodEnum<{
284
+ "notification/dashboard": "notification/dashboard";
285
+ "notification/system-event": "notification/system-event";
286
+ "notification/testing": "notification/testing";
287
+ }>;
288
+ }, z.core.$loose>], "payload_type">;
289
+ type AnyNotification = z.infer<typeof AnyNotification>;
226
290
  declare const NotificationCompact: z.ZodObject<{
227
291
  id: z.ZodNumber;
228
292
  creator_id: z.ZodNullable<z.ZodNumber>;
@@ -376,4 +440,4 @@ declare const NotificationUpdateInput: z.ZodObject<{
376
440
  }, z.core.$loose>;
377
441
  type NotificationUpdateInput = z.infer<typeof NotificationUpdateInput>;
378
442
  //#endregion
379
- export { NotificationSubscription as _, NotificationCardPayloadPatch as a, NotificationUpdateInput as b, NotificationCreateInput as c, NotificationPayloadType as d, NotificationRecipient as f, NotificationSendCondition as g, NotificationRecipientType as h, NotificationCardPayloadCompact as i, NotificationHandler as l, NotificationRecipientDetails as m, Notification as n, NotificationChannelType as o, NotificationRecipientCompact as p, NotificationCardPayload as r, NotificationCompact as s, CARD_PAYLOAD_TYPE as t, NotificationHandlerCompact as u, NotificationSubscriptionCompact as v, NotificationSubscriptionType as y };
443
+ export { NotificationSendCondition as _, NotificationCardPayloadCompact as a, NotificationSubscriptionType as b, NotificationCompact as c, NotificationHandlerCompact as d, NotificationPayloadType as f, NotificationRecipientType as g, NotificationRecipientDetails as h, NotificationCardPayload as i, NotificationCreateInput as l, NotificationRecipientCompact as m, CARD_PAYLOAD_TYPE as n, NotificationCardPayloadPatch as o, NotificationRecipient as p, Notification as r, NotificationChannelType as s, AnyNotification as t, NotificationHandler as u, NotificationSubscription as v, NotificationUpdateInput as x, NotificationSubscriptionCompact as y };
@@ -1,4 +1,4 @@
1
- import { d as QueryValue, h as Transport } from "./transport-E0ZaPNWJ.js";
1
+ import { d as QueryValue, h as Transport } from "./transport-BsXqRujn.js";
2
2
  import { ZodType } from "zod";
3
3
  //#region src/paginate.d.ts
4
4
  declare const DEFAULT_PAGE_SIZE = 50;
@@ -1,2 +1,2 @@
1
- import { a as paginatePages, i as PaginatedEnvelope, n as Page, r as PaginateOptions, t as DEFAULT_PAGE_SIZE } from "./paginate-DZWvWvbm.js";
1
+ import { a as paginatePages, i as PaginatedEnvelope, n as Page, r as PaginateOptions, t as DEFAULT_PAGE_SIZE } from "./paginate-COuL0Gzl.js";
2
2
  export { DEFAULT_PAGE_SIZE, Page, PaginateOptions, PaginatedEnvelope, paginatePages };
@@ -1,3 +1,4 @@
1
+ import { r as InputGate } from "./input-gates-DwKoTJVQ.js";
1
2
  import { z } from "zod";
2
3
  //#region src/domain/pulse.d.ts
3
4
  declare const PulseChannelType: z.ZodEnum<{
@@ -128,8 +129,8 @@ declare const PulseCard: z.ZodObject<{
128
129
  }, z.core.$loose>;
129
130
  type PulseCard = z.infer<typeof PulseCard>;
130
131
  declare const PulseCardCompact: z.ZodObject<{
131
- name: z.ZodString;
132
132
  id: z.ZodNumber;
133
+ name: z.ZodString;
133
134
  dashboard_card_id: z.ZodNullable<z.ZodNumber>;
134
135
  include_csv: z.ZodBoolean;
135
136
  include_xls: z.ZodBoolean;
@@ -273,15 +274,15 @@ declare const Pulse: z.ZodObject<{
273
274
  }, z.core.$loose>;
274
275
  type Pulse = z.infer<typeof Pulse>;
275
276
  declare const PulseCompact: z.ZodObject<{
276
- name: z.ZodNullable<z.ZodString>;
277
277
  id: z.ZodNumber;
278
- collection_id: z.ZodNullable<z.ZodNumber>;
278
+ name: z.ZodNullable<z.ZodString>;
279
279
  archived: z.ZodBoolean;
280
+ collection_id: z.ZodNullable<z.ZodNumber>;
280
281
  dashboard_id: z.ZodNullable<z.ZodNumber>;
281
282
  skip_if_empty: z.ZodBoolean;
282
283
  cards: z.ZodArray<z.ZodObject<{
283
- name: z.ZodString;
284
284
  id: z.ZodNumber;
285
+ name: z.ZodString;
285
286
  dashboard_card_id: z.ZodNullable<z.ZodNumber>;
286
287
  include_csv: z.ZodBoolean;
287
288
  include_xls: z.ZodBoolean;
@@ -324,6 +325,7 @@ declare const PulseCompact: z.ZodObject<{
324
325
  }, z.core.$strip>>;
325
326
  }, z.core.$strip>;
326
327
  type PulseCompact = z.infer<typeof PulseCompact>;
328
+ declare const SUBSCRIPTION_FILTERS_GATE: InputGate;
327
329
  declare const PulseCreateInput: z.ZodObject<{
328
330
  name: z.ZodString;
329
331
  dashboard_id: z.ZodNumber;
@@ -593,4 +595,4 @@ declare const PulseUpdateInput: z.ZodObject<{
593
595
  }, z.core.$loose>;
594
596
  type PulseUpdateInput = z.infer<typeof PulseUpdateInput>;
595
597
  //#endregion
596
- export { PulseChannelCompact as a, PulseCompact as c, PulseRecipientCompact as d, PulseScheduleDay as f, PulseUpdateInput as h, PulseChannel as i, PulseCreateInput as l, PulseScheduleType as m, PulseCard as n, PulseChannelDetails as o, PulseScheduleFrame as p, PulseCardCompact as r, PulseChannelType as s, Pulse as t, PulseRecipient as u };
598
+ export { PulseChannelCompact as a, PulseCompact as c, PulseRecipientCompact as d, PulseScheduleDay as f, SUBSCRIPTION_FILTERS_GATE as g, PulseUpdateInput as h, PulseChannel as i, PulseCreateInput as l, PulseScheduleType as m, PulseCard as n, PulseChannelDetails as o, PulseScheduleFrame as p, PulseCardCompact as r, PulseChannelType as s, Pulse as t, PulseRecipient as u };
@@ -1,6 +1,6 @@
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
- import { h as PulseUpdateInput, l as PulseCreateInput, t as Pulse } from "./pulse-CMc1Rwdj.js";
3
+ import { h as PulseUpdateInput, l as PulseCreateInput, t as Pulse } from "./pulse-0LG3K6qO.js";
4
4
  //#region src/resources/pulse.d.ts
5
5
  interface PulseListParams {
6
6
  dashboard_id?: number | undefined;
@@ -6,9 +6,9 @@ declare const ReplacementSourceType: z.ZodEnum<{
6
6
  }>;
7
7
  type ReplacementSourceType = z.infer<typeof ReplacementSourceType>;
8
8
  declare const ReplacementEntityType: z.ZodEnum<{
9
+ transform: "transform";
9
10
  card: "card";
10
11
  table: "table";
11
- transform: "transform";
12
12
  }>;
13
13
  type ReplacementEntityType = z.infer<typeof ReplacementEntityType>;
14
14
  declare const ReplacementRunStatus: z.ZodEnum<{
@@ -32,15 +32,15 @@ declare const ReplacementRun: z.ZodObject<{
32
32
  }>;
33
33
  is_active: z.ZodNullable<z.ZodLiteral<true>>;
34
34
  source_entity_type: z.ZodEnum<{
35
+ transform: "transform";
35
36
  card: "card";
36
37
  table: "table";
37
- transform: "transform";
38
38
  }>;
39
39
  source_entity_id: z.ZodNumber;
40
40
  target_entity_type: z.ZodEnum<{
41
+ transform: "transform";
41
42
  card: "card";
42
43
  table: "table";
43
- transform: "transform";
44
44
  }>;
45
45
  target_entity_id: z.ZodNumber;
46
46
  progress: z.ZodNullable<z.ZodNumber>;
@@ -54,9 +54,9 @@ declare const ReplacementRunCompact: z.ZodObject<{
54
54
  message: z.ZodNullable<z.ZodString>;
55
55
  id: z.ZodNumber;
56
56
  source_entity_type: z.ZodEnum<{
57
+ transform: "transform";
57
58
  card: "card";
58
59
  table: "table";
59
- transform: "transform";
60
60
  }>;
61
61
  source_entity_id: z.ZodNumber;
62
62
  status: z.ZodEnum<{
@@ -69,9 +69,9 @@ declare const ReplacementRunCompact: z.ZodObject<{
69
69
  }>;
70
70
  progress: z.ZodNullable<z.ZodNumber>;
71
71
  target_entity_type: z.ZodEnum<{
72
+ transform: "transform";
72
73
  card: "card";
73
74
  table: "table";
74
- transform: "transform";
75
75
  }>;
76
76
  target_entity_id: z.ZodNumber;
77
77
  start_time: z.ZodString;
@@ -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/replacement.d.ts
4
4
  interface ReplacementRunListParams {
@@ -97,9 +97,9 @@ declare function replacementResource(transport: Transport): {
97
97
  id: number;
98
98
  status: "timeout" | "failed" | "pending" | "started" | "succeeded" | "canceled";
99
99
  is_active: true | null;
100
- source_entity_type: "card" | "table" | "transform";
100
+ source_entity_type: "transform" | "card" | "table";
101
101
  source_entity_id: number;
102
- target_entity_type: "card" | "table" | "transform";
102
+ target_entity_type: "transform" | "card" | "table";
103
103
  target_entity_id: number;
104
104
  progress: number | null;
105
105
  message: string | null;
@@ -112,9 +112,9 @@ declare function replacementResource(transport: Transport): {
112
112
  id: number;
113
113
  status: "timeout" | "failed" | "pending" | "started" | "succeeded" | "canceled";
114
114
  is_active: true | null;
115
- source_entity_type: "card" | "table" | "transform";
115
+ source_entity_type: "transform" | "card" | "table";
116
116
  source_entity_id: number;
117
- target_entity_type: "card" | "table" | "transform";
117
+ target_entity_type: "transform" | "card" | "table";
118
118
  target_entity_id: number;
119
119
  progress: number | null;
120
120
  message: string | null;
@@ -1,5 +1,5 @@
1
- import { i as FeatureName } from "./features-CnFkUCj2.js";
2
- import { b as RequirementFailure, yt as ServerProfile } from "./transport-E0ZaPNWJ.js";
1
+ import { i as FeatureName } from "./features-SMSfJhB6.js";
2
+ import { b as RequirementFailure, yt as ServerProfile } from "./transport-BsXqRujn.js";
3
3
  //#region src/version/requirement-check.d.ts
4
4
  /** The first of `features` the profile lacks, or `null` when it has every one. */
5
5
  declare function checkFeatures(features: readonly FeatureName[], profile: ServerProfile): RequirementFailure | null;
@@ -1,6 +1,9 @@
1
- import { i as FeatureName } from "./features-CnFkUCj2.js";
1
+ import { i as FeatureName } from "./features-SMSfJhB6.js";
2
2
  //#region src/version/requirements.d.ts
3
3
  declare const METHOD_REQUIREMENTS: {
4
+ "apiKey.list": never[];
5
+ "apiKey.create": never[];
6
+ "apiKey.delete": never[];
4
7
  "card.list": never[];
5
8
  "card.get": never[];
6
9
  "card.create": never[];
@@ -35,6 +38,13 @@ declare const METHOD_REQUIREMENTS: {
35
38
  "dataAction.archive": never[];
36
39
  "dataAction.delete": never[];
37
40
  "dataAction.execute": never[];
41
+ "dataApp.list": "dataApps"[];
42
+ "dataApp.get": "dataApps"[];
43
+ "dataApp.create": "dataApps"[];
44
+ "dataApp.update": "dataApps"[];
45
+ "dataApp.replaceBundle": "dataApps"[];
46
+ "dataApp.typedSchema": "dataApps"[];
47
+ "dataApp.delete": "dataApps"[];
38
48
  "database.list": never[];
39
49
  "database.get": never[];
40
50
  "database.update": never[];
@@ -0,0 +1,11 @@
1
+ import { f as RequestOptions, h as Transport } from "../transport-BsXqRujn.js";
2
+ import { t as ListResult } from "../list-BT_bBm9Z.js";
3
+ import { i as CreatedApiKey, r as ApiKeyCreateInput, t as ApiKey } from "../api-key-DJeN1-7G.js";
4
+ //#region src/resources/api-key.d.ts
5
+ declare function apiKeyResource(transport: Transport): {
6
+ list: (options?: RequestOptions) => Promise<ListResult<ApiKey>>;
7
+ create: (params: ApiKeyCreateInput, options?: RequestOptions) => Promise<CreatedApiKey>;
8
+ delete: (id: number, options?: RequestOptions) => Promise<void>;
9
+ };
10
+ //#endregion
11
+ export { apiKeyResource };
@@ -0,0 +1,35 @@
1
+ import { ApiKey, CreatedApiKey } from "../domain/api-key.js";
2
+ import { z } from "zod";
3
+ //#region src/resources/api-key.ts
4
+ function apiKeyResource(transport) {
5
+ /** List the API keys, each with its masked key and the group it acts as. `GET /api/api-key` answers a bare array. */
6
+ async function list(options = {}) {
7
+ return {
8
+ data: await transport.requestParsed(z.array(ApiKey), "/api/api-key", { ...options }),
9
+ total: null
10
+ };
11
+ }
12
+ /** Create an API key acting as a member of the group; the answer carries the key itself, which no later read returns. */
13
+ async function create(params, options = {}) {
14
+ return transport.requestParsed(CreatedApiKey, "/api/api-key", {
15
+ ...options,
16
+ method: "POST",
17
+ body: params
18
+ });
19
+ }
20
+ /** Delete an API key by id; requests made with it fail from then on. */
21
+ async function remove(id, options = {}) {
22
+ await transport.requestRaw(`/api/api-key/${id}`, {
23
+ ...options,
24
+ method: "DELETE",
25
+ expectContentType: "binary"
26
+ });
27
+ }
28
+ return {
29
+ list,
30
+ create,
31
+ delete: remove
32
+ };
33
+ }
34
+ //#endregion
35
+ export { apiKeyResource };
@@ -1,2 +1,2 @@
1
- import { i as cardResource, n as CardListParams, r as CardQueryParams, t as CardExportParams } from "../card-BZx4NSr-.js";
1
+ import { i as cardResource, n as CardListParams, r as CardQueryParams, t as CardExportParams } from "../card-DN0sLkCG.js";
2
2
  export { CardExportParams, CardListParams, CardQueryParams, cardResource };
@@ -1,2 +1,2 @@
1
- import { a as collectionResource, i as CollectionTreeParams, n as CollectionItemPageOptions, o as listCollectionsAs, r as CollectionListParams, t as CollectionItemListParams } from "../collection-CqtGPi4W.js";
1
+ import { a as collectionResource, i as CollectionTreeParams, n as CollectionItemPageOptions, o as listCollectionsAs, r as CollectionListParams, t as CollectionItemListParams } from "../collection-fFahL-ub.js";
2
2
  export { CollectionItemListParams, CollectionItemPageOptions, CollectionListParams, CollectionTreeParams, collectionResource, listCollectionsAs };
@@ -1,5 +1,6 @@
1
1
  import { Collection, CollectionItem, CollectionTreeNode } from "../domain/collection.js";
2
2
  import { paginatePages } from "../paginate.js";
3
+ import { t as explainer } from "../refusal-B9aeHMc9.js";
3
4
  import { z } from "zod";
4
5
  //#region src/resources/collection.ts
5
6
  const CollectionApiList = z.array(Collection);
@@ -10,6 +11,23 @@ const COLLECTION_LIST_QUERY = {
10
11
  personal: { "personal-only": true }
11
12
  };
12
13
  const DEFAULT_LIST_FILTER = "all";
14
+ const TRASH_ALIAS = "trash";
15
+ const MODELS_FIELDS = ["models"];
16
+ const ITEM_MODEL_FEATURES = {
17
+ transform: "transforms",
18
+ measure: "collectionItemMeasures",
19
+ exploration: "explorations"
20
+ };
21
+ function itemModelFeatures(_ref, params = {}) {
22
+ if (params.models === void 0) return [];
23
+ return params.models.flatMap((model) => {
24
+ const feature = ITEM_MODEL_FEATURES[model];
25
+ return feature === void 0 ? [] : [{
26
+ feature,
27
+ fields: MODELS_FIELDS
28
+ }];
29
+ });
30
+ }
13
31
  function refPath(ref) {
14
32
  return encodeURIComponent(ref);
15
33
  }
@@ -24,6 +42,7 @@ async function listCollectionsAs(transport, schema, options = {}) {
24
42
  return transport.requestParsed(z.array(schema), "/api/collection", { ...options });
25
43
  }
26
44
  function collectionResource(transport) {
45
+ const { explainWalk } = explainer(transport, "collection");
27
46
  /**
28
47
  * List collections. `filter` picks a server-side preset: everything, archived, or personal. Every
29
48
  * preset includes the Library collections that match it. `namespace` lists that namespace's
@@ -71,19 +90,24 @@ function collectionResource(transport) {
71
90
  }
72
91
  /**
73
92
  * Walk the items inside a collection one page at a time. This endpoint pages on the server, so
74
- * the caller consumes pages rather than a single list and decides how far to pull.
93
+ * the caller consumes pages rather than a single list and decides how far to pull. The `trash`
94
+ * alias costs one more request, which reads the trash collection's id. A `models` filter takes
95
+ * `transform` only with `transforms`, `measure` only with `collectionItemMeasures`, and
96
+ * `exploration` only with `explorations`.
75
97
  */
76
98
  async function* itemPages(ref, params = {}, options = {}) {
77
- yield* paginatePages(transport, `/api/collection/${refPath(ref)}/items`, CollectionItem, {
99
+ const withSignal = options.signal !== void 0 && { signal: options.signal };
100
+ yield* paginatePages(transport, `/api/collection/${refPath(ref === TRASH_ALIAS ? (await get(TRASH_ALIAS, { ...withSignal })).id : ref)}/items`, CollectionItem, {
78
101
  query: {
79
102
  models: params.models,
80
103
  archived: params.archived,
81
- pinned_state: params.pinned_state
104
+ pinned_state: params.pinned_state,
105
+ "pinned-state": params.pinned_state
82
106
  },
83
107
  ...options.offset !== void 0 && { offset: options.offset },
84
108
  ...options.max !== void 0 && { max: options.max },
85
109
  ...options.pageSize !== void 0 && { pageSize: options.pageSize },
86
- ...options.signal !== void 0 && { signal: options.signal }
110
+ ...withSignal
87
111
  });
88
112
  }
89
113
  /** Fetch the collection hierarchy as a forest of nested nodes. */
@@ -102,7 +126,7 @@ function collectionResource(transport) {
102
126
  create,
103
127
  update,
104
128
  archive,
105
- itemPages,
129
+ itemPages: explainWalk("itemPages", itemPages, itemModelFeatures),
106
130
  tree
107
131
  };
108
132
  }
@@ -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 CsvFile } from "../csv-upload--K35QedP.js";
3
3
  //#region src/resources/content-translation.d.ts
4
4
  declare function contentTranslationResource(transport: Transport): {
@@ -1,5 +1,5 @@
1
- import { ContentTranslationUploadResult } from "../domain/content-translation.js";
2
1
  import { t as explainer } from "../refusal-B9aeHMc9.js";
2
+ import { ContentTranslationUploadResult } from "../domain/content-translation.js";
3
3
  import { buildCsvFormData } from "./csv-upload.js";
4
4
  //#region src/resources/content-translation.ts
5
5
  const CONTENT_TRANSLATION_PATH = "/api/ee/content-translation";
@@ -1,2 +1,2 @@
1
- import { a as DashcardCardProblem, i as DashcardCardMissing, n as DashcardCardArchived, o as DashcardCardUnreadable, r as DashcardCardIssue, s as dashboardResource, t as DashboardListParams } from "../dashboard-XTe46250.js";
1
+ import { a as DashcardCardProblem, i as DashcardCardMissing, n as DashcardCardArchived, o as DashcardCardUnreadable, r as DashcardCardIssue, s as dashboardResource, t as DashboardListParams } from "../dashboard-CM7RmNeE.js";
2
2
  export { DashboardListParams, DashcardCardArchived, DashcardCardIssue, DashcardCardMissing, DashcardCardProblem, DashcardCardUnreadable, dashboardResource };
@@ -2,7 +2,8 @@ import { ConfigError } from "../errors.js";
2
2
  import { a as HttpError } from "../errors-DdMlaXqq.js";
3
3
  import { ParameterValues } from "../domain/parameter.js";
4
4
  import { cardResource } from "./card.js";
5
- import { Dashboard, DashboardCopy, DashboardDetail, Dashcard } from "../domain/dashboard.js";
5
+ import { Dashboard, DashboardCopy, DashboardCreateInput, Dashcard, dashboardDetailSchema } from "../domain/dashboard.js";
6
+ import { parseRequestBody } from "./request-body.js";
6
7
  import { z } from "zod";
7
8
  //#region src/resources/dashboard.ts
8
9
  const DashboardApiList = z.array(Dashboard);
@@ -21,17 +22,19 @@ function dashboardResource(transport) {
21
22
  }
22
23
  /** Get one dashboard by id, with its dashcards, tabs and parameters. */
23
24
  async function get(id, options = {}) {
24
- return transport.requestParsed(DashboardDetail, `/api/dashboard/${id}`, { ...options });
25
+ return transport.requestParsed(dashboardDetailSchema, `/api/dashboard/${id}`, { ...options });
25
26
  }
26
27
  /**
27
28
  * Create a dashboard. The endpoint accepts no dashcards or tabs — a follow-up `update` is what
28
- * puts content on a fresh dashboard.
29
+ * puts content on a fresh dashboard. A key `DashboardCreateInput` does not declare is dropped
30
+ * before the request, as the server drops it.
29
31
  */
30
32
  async function create(params, options = {}) {
33
+ const body = parseRequestBody(DashboardCreateInput, params, "dashboard");
31
34
  return transport.requestParsed(Dashboard, "/api/dashboard", {
32
35
  ...options,
33
36
  method: "POST",
34
- body: params
37
+ body
35
38
  });
36
39
  }
37
40
  /**
@@ -42,7 +45,7 @@ function dashboardResource(transport) {
42
45
  */
43
46
  async function update(id, params, options = {}) {
44
47
  const body = await withCurrentTabs(id, params, options);
45
- return transport.requestParsed(DashboardDetail, `/api/dashboard/${id}`, {
48
+ return transport.requestParsed(dashboardDetailSchema, `/api/dashboard/${id}`, {
46
49
  ...options,
47
50
  method: "PUT",
48
51
  body
@@ -1,6 +1,6 @@
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
- import { a as DataActionExecuteResult, i as DataActionExecuteInput, t as DataAction } from "../data-action-rS27f2Ji.js";
3
+ import { a as DataActionExecuteInput, c as DataActionUpdateInput, n as DataAction, o as DataActionExecuteResult } from "../data-action-CkXVrOUH.js";
4
4
  //#region src/resources/data-action.d.ts
5
5
  declare function dataActionResource(transport: Transport): {
6
6
  list: (options?: RequestOptions) => Promise<ListResult<DataAction>>;
@@ -51,52 +51,7 @@ declare function dataActionResource(transport: Transport): {
51
51
  database_id?: number | null | undefined;
52
52
  dataset_query?: unknown;
53
53
  }>;
54
- update: (id: number, params: {
55
- name?: string | undefined;
56
- database_id?: number | undefined;
57
- dataset_query?: {
58
- [x: string]: unknown;
59
- } | undefined;
60
- parameters?: {
61
- [x: string]: unknown;
62
- id: string;
63
- type: string;
64
- target: unknown;
65
- name?: string | undefined;
66
- slug?: string | undefined;
67
- required?: boolean | undefined;
68
- }[] | undefined;
69
- collection_id?: number | null | undefined;
70
- description?: string | null | undefined;
71
- visualization_settings?: unknown;
72
- archived?: boolean | undefined;
73
- }, options?: RequestOptions | undefined) => Promise<{
74
- [x: string]: unknown;
75
- id: number;
76
- name: string;
77
- description: string | null;
78
- type: string;
79
- model_id: number | null;
80
- parameters: {
81
- [x: string]: unknown;
82
- id: string;
83
- type: string;
84
- name?: string | undefined;
85
- slug?: string | undefined;
86
- target?: unknown;
87
- required?: boolean | undefined;
88
- }[] | null;
89
- visualization_settings: unknown;
90
- archived: boolean;
91
- public_uuid: string | null;
92
- entity_id: string | null;
93
- creator_id: number;
94
- created_at: string;
95
- updated_at: string;
96
- collection_id: number | null;
97
- database_id?: number | null | undefined;
98
- dataset_query?: unknown;
99
- }>;
54
+ update: (id: number, params: DataActionUpdateInput, options?: RequestOptions) => Promise<DataAction>;
100
55
  archive: (id: number, options?: RequestOptions) => Promise<DataAction>;
101
56
  delete: (id: number, options?: RequestOptions) => Promise<void>;
102
57
  execute: (id: number, params: DataActionExecuteInput, options?: RequestOptions) => Promise<DataActionExecuteResult>;
@@ -1,13 +1,8 @@
1
1
  import { t as explainer } from "../refusal-B9aeHMc9.js";
2
- import { DataActionExecuteResult, dataActionSchema } from "../domain/data-action.js";
2
+ import { DATA_ACTION_COLLECTION_GATE, DataActionExecuteResult, dataActionSchema } from "../domain/data-action.js";
3
+ import { gateTriggered } from "../version/input-gates.js";
3
4
  import { z } from "zod";
4
5
  //#region src/resources/data-action.ts
5
- function collectionFeatures(params) {
6
- return params.collection_id === void 0 ? [] : [{
7
- feature: "dataActionCollections",
8
- fields: ["collection_id"]
9
- }];
10
- }
11
6
  function dataActionResource(transport) {
12
7
  const { explain } = explainer(transport, "dataAction");
13
8
  async function readSchema(options) {
@@ -36,8 +31,13 @@ function dataActionResource(transport) {
36
31
  body: params
37
32
  });
38
33
  }
39
- /** Update a data action by id, patching only the fields the body carries. */
34
+ /**
35
+ * Update a data action by id, patching only the fields the body carries. A server whose data
36
+ * actions have no collection never moves the action, and from 58.31 it strips the undeclared key and
37
+ * answers as if it had. So the field is refused there before the wire.
38
+ */
40
39
  async function update(id, params, options = {}) {
40
+ await transport.requireFeatures(gateTriggered(DATA_ACTION_COLLECTION_GATE, params.collection_id) ? [DATA_ACTION_COLLECTION_GATE.feature] : [], options);
41
41
  const schema = await readSchema(options);
42
42
  return transport.requestParsed(schema, `/api/action/${id}`, {
43
43
  ...options,
@@ -69,7 +69,7 @@ function dataActionResource(transport) {
69
69
  list,
70
70
  get,
71
71
  create: explain("create", create),
72
- update: explain("update", update, (_id, params) => collectionFeatures(params)),
72
+ update,
73
73
  archive,
74
74
  delete: remove,
75
75
  execute