@metabase/client 0.1.2 → 0.1.4
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.
- package/CHANGELOG.md +13 -0
- package/README.md +2 -2
- package/dist/{card-CrSywvOt.d.ts → card-CAOxi3ZU.d.ts} +26 -26
- package/dist/{card-CbV6hLYH.d.ts → card-Ik580mDC.d.ts} +3 -3
- package/dist/{client-cBi6_RQs.d.ts → client-CQkS1030.d.ts} +117 -116
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/{collection-Q9FNMiRh.d.ts → collection-B31DGW6J.d.ts} +4 -4
- package/dist/{collection-Bmtisr3r.d.ts → collection-kN2oYenF.d.ts} +43 -43
- package/dist/{dashboard-DBdEehA9.d.ts → dashboard-Bkl_vs7L.d.ts} +23 -23
- package/dist/{dashboard-CknUcTp8.d.ts → dashboard-ClJ5XHXJ.d.ts} +3 -3
- package/dist/{data-action-CqqZ0JYg.d.ts → data-action-CCU3lzoY.d.ts} +64 -13
- package/dist/data-app-DAEPU9W5.d.ts +111 -0
- package/dist/{database-CYNLJ8AZ.d.ts → database-B54owh7H.d.ts} +16 -16
- package/dist/{database-Bs5WQOOZ.d.ts → database-DNQLCRBJ.d.ts} +3 -3
- package/dist/{dataset-cg8ZZrOP.d.ts → dataset-Bj3bNqjm.d.ts} +71 -71
- package/dist/{dataset-dzWljE_C.d.ts → dataset-C05pNRjH.d.ts} +3 -3
- package/dist/{dependency-VqvLTDAU.d.ts → dependency-B8aPt_IM.d.ts} +163 -163
- package/dist/{dependency-CL-YG9KH.d.ts → dependency-NbXbo_fE.d.ts} +25 -25
- package/dist/{document-tLd6pYWe.d.ts → document-rqUlE_OE.d.ts} +1 -1
- package/dist/domain/card.d.ts +1 -1
- package/dist/domain/collection.d.ts +1 -1
- package/dist/domain/dashboard.d.ts +1 -1
- package/dist/domain/data-action.d.ts +2 -2
- package/dist/domain/data-action.js +43 -10
- package/dist/domain/data-app.d.ts +2 -2
- package/dist/domain/data-app.js +27 -14
- package/dist/domain/database.d.ts +1 -1
- package/dist/domain/dataset.d.ts +1 -1
- package/dist/domain/dependency.d.ts +1 -1
- package/dist/domain/document.d.ts +1 -1
- package/dist/domain/eid-translation.d.ts +1 -1
- package/dist/domain/embedding.d.ts +1 -1
- package/dist/domain/field.d.ts +1 -1
- package/dist/domain/git-sync.d.ts +1 -1
- package/dist/domain/library.d.ts +1 -1
- package/dist/domain/metric.d.ts +1 -1
- package/dist/domain/moderation-review.d.ts +1 -1
- package/dist/domain/notification.d.ts +1 -1
- package/dist/domain/parameter.d.ts +1 -1
- package/dist/domain/pulse.d.ts +1 -1
- package/dist/domain/replacement.d.ts +1 -1
- package/dist/domain/revision.d.ts +1 -1
- package/dist/domain/search.d.ts +1 -1
- package/dist/domain/table.d.ts +1 -1
- package/dist/domain/timeline.d.ts +1 -1
- package/dist/domain/transform-inspector.d.ts +1 -1
- package/dist/domain/transform-job.d.ts +1 -1
- package/dist/domain/transform-python.d.ts +1 -1
- package/dist/domain/transform-test.d.ts +2 -2
- package/dist/domain/transform-test.js +5 -1
- package/dist/domain/transform.d.ts +1 -1
- package/dist/{eid-translation-aQSffx0o.d.ts → eid-translation-CP79Tz71.d.ts} +40 -40
- package/dist/{embedding-Cz3RUJYf.d.ts → embedding-oU3gqfgX.d.ts} +1 -1
- package/dist/{erd-DCgdEC2S.d.ts → erd-BJ3OjckY.d.ts} +1 -1
- package/dist/{errors-DdMlaXqq.js → errors-D5mjCJCW.js} +12 -4
- package/dist/errors.d.ts +1 -1
- package/dist/{features-SMSfJhB6.d.ts → features-BwC2QUQB.d.ts} +4 -0
- package/dist/{field-ozrfbvUd.d.ts → field-Be27Kzlx.d.ts} +2 -2
- package/dist/{field-tqQPtVuR.d.ts → field-CCp65II7.d.ts} +3 -3
- package/dist/{git-sync-5lFWX1ds.d.ts → git-sync-CBplEGj0.d.ts} +1 -1
- package/dist/{git-sync-QL9Nu6gP.d.ts → git-sync-D1gts9j5.d.ts} +8 -8
- package/dist/{glossary-DwS7QVrl.d.ts → glossary-yuKOTBXb.d.ts} +1 -1
- package/dist/http/errors.d.ts +1 -1
- package/dist/http/errors.js +1 -1
- package/dist/http/oauth.js +1 -1
- package/dist/http/transport.d.ts +1 -1
- package/dist/http/transport.js +1 -1
- package/dist/index.d.ts +37 -37
- package/dist/index.js +6 -6
- package/dist/{input-gates-DwKoTJVQ.d.ts → input-gates-DLCSnwRf.d.ts} +1 -1
- package/dist/{json-DwGOvRtS.d.ts → json-DK8ntK_m.d.ts} +1 -1
- package/dist/json.d.ts +1 -1
- package/dist/{library-B9pEq7qP.d.ts → library-DZpIRTeG.d.ts} +2 -2
- package/dist/{measure-CInoXeyH.d.ts → measure-DZ7RmNPs.d.ts} +1 -1
- package/dist/{metric-CYOmbcM5.d.ts → metric-CKhTot_B.d.ts} +9 -9
- package/dist/{moderation-review-CWUQ3_HL.d.ts → moderation-review-B4RUTZ6_.d.ts} +4 -4
- package/dist/{notification-D-Hp82Pn.d.ts → notification-BwLEwNk9.d.ts} +2 -2
- package/dist/{notification-BY2JEjKp.d.ts → notification-D1MThyKE.d.ts} +2 -2
- package/dist/{paginate-CaJ5usdp.d.ts → paginate-CPjKDJ2m.d.ts} +1 -1
- package/dist/paginate.d.ts +1 -1
- package/dist/{parameter-BYo7uR-J.d.ts → parameter-CvyXRH6F.d.ts} +4 -4
- package/dist/{pulse-BUlfrJZH.d.ts → pulse-BgS7Y3MU.d.ts} +20 -20
- package/dist/{pulse-BTpSNxhT.d.ts → pulse-DEKvyd8u.d.ts} +2 -2
- package/dist/{refusal-B9aeHMc9.js → refusal-CvN0pxPR.js} +1 -1
- package/dist/{replacement-BQian4vA.d.ts → replacement-Bu4qxOua.d.ts} +17 -17
- package/dist/{replacement-Dbtvvrmz.d.ts → replacement-WU_rk924.d.ts} +9 -9
- package/dist/{requirement-check-CHHEHXcj.d.ts → requirement-check-B5tsY6Z_.d.ts} +2 -2
- package/dist/{requirements-Dx_ZVzl7.d.ts → requirements-CW0DsGzZ.d.ts} +4 -5
- package/dist/resources/api-key.d.ts +1 -1
- package/dist/resources/card.d.ts +1 -1
- package/dist/resources/collection.d.ts +1 -1
- package/dist/resources/collection.js +1 -1
- package/dist/resources/content-translation.d.ts +1 -1
- package/dist/resources/content-translation.js +1 -1
- package/dist/resources/dashboard.d.ts +1 -1
- package/dist/resources/dashboard.js +1 -1
- package/dist/resources/data-action.d.ts +22 -4
- package/dist/resources/data-action.js +11 -6
- package/dist/resources/data-app.d.ts +35 -52
- package/dist/resources/data-app.js +23 -38
- package/dist/resources/database.d.ts +1 -1
- package/dist/resources/dataset.d.ts +1 -1
- package/dist/resources/dependency.d.ts +1 -1
- package/dist/resources/dependency.js +1 -1
- package/dist/resources/document.d.ts +10 -3
- package/dist/resources/document.js +1 -1
- package/dist/resources/eid-translation.d.ts +2 -2
- package/dist/resources/erd.d.ts +1 -1
- package/dist/resources/erd.js +1 -1
- package/dist/resources/field.d.ts +1 -1
- package/dist/resources/field.js +1 -1
- package/dist/resources/git-sync.d.ts +1 -1
- package/dist/resources/git-sync.js +2 -2
- package/dist/resources/glossary.d.ts +1 -1
- package/dist/resources/library.d.ts +1 -1
- package/dist/resources/library.js +1 -1
- package/dist/resources/measure.d.ts +1 -1
- package/dist/resources/measure.js +1 -1
- package/dist/resources/metric.d.ts +1 -1
- package/dist/resources/metric.js +1 -1
- package/dist/resources/moderation-review.d.ts +1 -1
- package/dist/resources/moderation-review.js +1 -1
- package/dist/resources/notification.d.ts +1 -1
- package/dist/resources/optional-parsed.d.ts +1 -1
- package/dist/resources/permission.d.ts +1 -1
- package/dist/resources/pivot-export.d.ts +1 -1
- package/dist/resources/pulse.d.ts +1 -1
- package/dist/resources/replacement.d.ts +1 -1
- package/dist/resources/replacement.js +1 -1
- package/dist/resources/revision.d.ts +3 -3
- package/dist/resources/revision.js +1 -1
- package/dist/resources/search.d.ts +1 -1
- package/dist/resources/search.js +1 -1
- package/dist/resources/segment.d.ts +1 -1
- package/dist/resources/setting.d.ts +1 -1
- package/dist/resources/setup.d.ts +1 -1
- package/dist/resources/snippet.d.ts +1 -1
- package/dist/resources/table.d.ts +1 -1
- package/dist/resources/table.js +1 -1
- package/dist/resources/timeline-event.d.ts +2 -2
- package/dist/resources/timeline.d.ts +1 -1
- package/dist/resources/transform-dag-run.d.ts +1 -1
- package/dist/resources/transform-dag-run.js +1 -1
- package/dist/resources/transform-inspector.d.ts +4 -4
- package/dist/resources/transform-inspector.js +1 -1
- package/dist/resources/transform-job.d.ts +1 -1
- package/dist/resources/transform-job.js +1 -1
- package/dist/resources/transform-python.d.ts +1 -1
- package/dist/resources/transform-python.js +1 -1
- package/dist/resources/transform-tag.d.ts +1 -1
- package/dist/resources/transform-tag.js +1 -1
- package/dist/resources/transform-test.d.ts +1 -1
- package/dist/resources/transform-test.js +1 -1
- package/dist/resources/transform.d.ts +1 -1
- package/dist/resources/transform.js +1 -1
- package/dist/resources/upload.d.ts +1 -1
- package/dist/resources/user.d.ts +1 -1
- package/dist/{revision-DNEw6S93.d.ts → revision-CwP4-eqv.d.ts} +5 -5
- package/dist/{search-tK5lmRb8.d.ts → search-C0PiFw8c.d.ts} +24 -24
- package/dist/{search-BQWkdVg1.d.ts → search-DjJ_lu_o.d.ts} +2 -2
- package/dist/{segment-jyhBtOAZ.d.ts → segment-BR0OAdWN.d.ts} +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/{snippet-DsgohpTV.d.ts → snippet-C5naeVEd.d.ts} +1 -1
- package/dist/{table-BAl8aPZZ.d.ts → table-B3lazUvH.d.ts} +28 -28
- package/dist/{table-B1pQSpTA.d.ts → table-DT3kO7JU.d.ts} +9 -9
- package/dist/{timeline-BfX1lMob.d.ts → timeline-Bnn28jC7.d.ts} +21 -21
- package/dist/{timeline-BdLvwRnl.d.ts → timeline-vJHDIuDJ.d.ts} +2 -2
- package/dist/{transform-DwnIcpqV.d.ts → transform-B0mugBQQ.d.ts} +1 -1
- package/dist/{transform-Ds74yPiY.d.ts → transform-Buv3VvTt.d.ts} +3 -3
- package/dist/{transform-inspector-BMaRqcRM.d.ts → transform-inspector-BUYBt6--.d.ts} +8 -8
- package/dist/{transform-job-C85GxBHj.d.ts → transform-job-BFLbsf5-.d.ts} +1 -1
- package/dist/{transform-job-Dfp9Ox0l.d.ts → transform-job-DV28hc1A.d.ts} +2 -2
- package/dist/{transform-python-DtL3xxMj.d.ts → transform-python-B-jBoeVa.d.ts} +1 -1
- package/dist/{transform-test-C3hiZ4AV.d.ts → transform-test-3uuvuwyQ.d.ts} +1 -1
- package/dist/{transform-test-DROPvrkI.d.ts → transform-test-DpTJm7H7.d.ts} +2 -1
- package/dist/{transport-CS11mEqI.d.ts → transport-CM-eJat3.d.ts} +7 -3
- package/dist/{transport-HP7cyo9N.js → transport-D52WFGBR.js} +1 -1
- package/dist/{upload-Bx1D7eNy.d.ts → upload-BxRCvpJo.d.ts} +1 -1
- package/dist/version/capability-error.d.ts +1 -1
- package/dist/version/capability-error.js +1 -1
- package/dist/version/features.d.ts +1 -1
- package/dist/version/features.js +1 -0
- package/dist/version/input-gates.d.ts +1 -1
- package/dist/version/probe.d.ts +1 -1
- package/dist/version/profile.d.ts +1 -1
- package/dist/version/requirement-check.d.ts +1 -1
- package/dist/version/requirements.d.ts +1 -1
- package/dist/version/requirements.js +3 -4
- package/package.json +1 -1
- package/dist/data-app-MoMS9VUr.d.ts +0 -76
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to `@metabase/client`.
|
|
4
4
|
|
|
5
|
+
## 0.1.4
|
|
6
|
+
|
|
7
|
+
- A data app changes in Metabase only through a repository import, so `dataApp.create`, `dataApp.replaceBundle`, `dataApp.typedSchema` and `dataApp.remove` are gone, with `DataAppCreateInput`. `dataApp.update` takes only `enabled` (`DataAppUpdateInput`).
|
|
8
|
+
- `dataApp.list` takes no filter, and `DataAppListFilter` is gone.
|
|
9
|
+
- `dataApp.generateSchema`, `dataApp.generateQueries` and `dataApp.generateActions` return the files of an app's repository as `DataAppGeneratedFiles`: its `src/metabase.schema.ts`, and the YAML of the questions and implicit actions its `defineQuery` and `defineAction` exports define (`DataAppGenerateQueriesInput`, `DataAppGenerateActionsInput`, `DataAppQueryDefinition`, `DataAppActionDefinition`).
|
|
10
|
+
|
|
11
|
+
## 0.1.3
|
|
12
|
+
|
|
13
|
+
- `dataAction.create` creates an implicit action on a table as well as a query action. `DataActionCreateInput` is a union on `type`: a `"query"` body takes `dataset_query`, an `"implicit"` one takes `kind` (`ImplicitActionKind`, on the barrel) and `table_id`. Neither takes `database_id`, which the server derives from the query.
|
|
14
|
+
- `DataActionUpdateInput` patches a query action's `dataset_query` or an implicit action's `kind` and `table_id`, never both, and takes no `database_id`. `dataAction.update` refuses a `table_id` before the request on a server without `dataActionsWithoutModel`, which would drop it unread; `DATA_ACTION_TABLE_GATE` records the gate.
|
|
15
|
+
- `DataAction` and `DataActionCompact` read an implicit action's `kind` and `table_id`.
|
|
16
|
+
- `DataActionExecuteResult` reads an implicit action's `rows-updated`, `rows-deleted` or `created-row`, and `rows-affected` is optional.
|
|
17
|
+
|
|
5
18
|
## 0.1.2
|
|
6
19
|
|
|
7
20
|
- `oauthLogin` takes an optional `signal`. Aborting it, before or during the flow, rejects with the signal's reason when that is a `MetabaseError`, else with an `AbortError` carrying its message, frees the loopback callback port at once, and cancels discovery, client registration or the token exchange in flight. `tryDiscoverMetadata`, `discoverLoginMetadata`, `registerClient` and `exchangeCode` on `@metabase/client/http/oauth` take a signal too, and `@metabase/client/signal` exports `whenAborted`.
|
package/README.md
CHANGED
|
@@ -405,7 +405,7 @@ An `HttpError`'s `serverMessage` is what the server itself said about the failur
|
|
|
405
405
|
|
|
406
406
|
`PartialWriteError` (category `partial-write`, not retryable) is a write the server answered as a success having applied all but one field: neither a failure nor a success, and repeating it rewrites what landed while leaving that field as it was. Its `PartialWriteDetail` names the `method`, `path` and `field`, the value `requested`, and in `answered` a `PartialWriteAnswer`: `PartialWriteReported` (`{ kind: "reported", value: number | null }`, the value the server's answer reported, `null` when it reported the field empty) or `PartialWriteUnreported` (`{ kind: "unreported" }`, an answer that left the field out).
|
|
407
407
|
|
|
408
|
-
An `HttpError` also carries `errorCode`, the envelope's `error-code` when the throw site published a machine-readable name for the answer, else `null`. A transform test's `create`, `update` and `run` refuse that way when the server declines to run the test at all, and `isTransformTestRefusalCode(code)` narrows the code to the closed `TransformTestRefusalCode` vocabulary. `create` and `update` answer the authoring refusals at 400 (`transform-test.missing-inputs`, `unused-inputs`, `duplicate-input-table`, `unparseable-source`, `unremapped-reference`) and the environment ones at 422 (`unsupported-transform`, `unsupported-driver`); `run` adds `setup-failed` and `transform-failed`, also 422. The remaining names in the vocabulary (`unknown-column`, `ambiguous-column`, `unsupported-format`, `expectation-failed`) never refuse a run: they arrive as one expectation's own `error`, whose `type` is the server's internal name for the same code. A failing expectation is a result, not a refusal: `run` answers a `TransformTestRunResult` whose `status` is `failed` and whose expectations report what they found.
|
|
408
|
+
An `HttpError` also carries `errorCode`, the envelope's `error-code` when the throw site published a machine-readable name for the answer, else `null`. A transform test's `create`, `update` and `run` refuse that way when the server declines to run the test at all, and `isTransformTestRefusalCode(code)` narrows the code to the closed `TransformTestRefusalCode` vocabulary, while `isTransformTestCode(code)` accepts any `transform-test.*` code, including one newer than this client. A refusal that names tables (`missing-inputs`, `unused-inputs`, `duplicate-input-table`) carries them on `HttpError.tables`. `create` and `update` answer the authoring refusals at 400 (`transform-test.missing-inputs`, `unused-inputs`, `duplicate-input-table`, `unparseable-source`, `unremapped-reference`) and the environment ones at 422 (`unsupported-transform`, `unsupported-driver`); `run` adds `setup-failed` and `transform-failed`, also 422. The remaining names in the vocabulary (`unknown-column`, `ambiguous-column`, `unsupported-format`, `expectation-failed`) never refuse a run: they arrive as one expectation's own `error`, whose `type` is the server's internal name for the same code. A failing expectation is a result, not a refusal: `run` answers a `TransformTestRunResult` whose `status` is `failed` and whose expectations report what they found.
|
|
409
409
|
|
|
410
410
|
Two helpers read raw thrown values away from the HTTP boundary. `isFileNotFoundError(value)` reports a
|
|
411
411
|
Node `ENOENT` filesystem error — a missing file on disk, never an HTTP 404, which arrives as an
|
|
@@ -437,7 +437,7 @@ Unless the caller passes `metadata` from `tryDiscoverMetadata`, which makes the
|
|
|
437
437
|
|
|
438
438
|
`METHOD_REQUIREMENTS` names, per client method (`"transform.get"`, `"gitSync.branches"` — the `MethodKey` as the method is reached on the client), the features it needs, strictest first; `methodRequirements(key)` reads one entry, `METHOD_KEYS` lists the keys, and `isMethodKey` narrows a string to one. When a gated method's request fails the way a server rejects what it lacks (a 402 premium refusal, an unrouted 404, or a 400 on a value outside an older enum or a body an older route reads in another shape), the client probes the server and throws a `CapabilityError` when that profile lacks a feature the method needs — a version gate reads `This operation requires Metabase v59+ (this server is v0.58.0). Upgrade Metabase to use it.`, a token gate `This operation requires the 'remote_sync' premium feature (not enabled on this server).` — and the error's `developerDetail` is a `RequirementFailure` carrying `reason`, `detail`, `feature`, `since`, `tokenFeature` and `serverVersion` — a Zod schema as well as a type (with `RequirementReason` for its `reason` enum), so a consumer that reports the refusal in its own output can describe it. A server that turns out to have every feature failed for another reason, and its own error stands. A 400 is also an ordinary validation failure, so it stands as the server's own `HttpError` when its field errors (`fieldErrors`, `specificFieldErrors`) name a field the missing parameter feature does not gate: a `mb.table.update` carrying a tier-named `data_layer` to a server that speaks medallions, alongside another field that server rejects, throws that field's rejection rather than the tier floor. A 400 that names no field, or one from a server lacking a feature the method itself needs, is the refusal. A method that needs nothing never consults the server; a newer release or a development build is placed past the newest known major, so only a token can explain a refusal there. `checkFeatures(features, profile)` is the check itself, over any feature list (`methodRequirements(key)` gives a method's), answering the first feature the profile lacks, and `featureFailures(features, profile)` answers every one, `featureGap(profile, feature)` says which half of a rule the profile fails (`FeatureGap`: `{ kind: "version" }` or `{ kind: "token", tokenFeature }`), and `ruleGap` is the same question asked of a bare rule. `featureAvailability(feature)` says which servers hold a feature, from its rule: `v64+`, or `token dashboard_subscription_filters` when every supported server meets the version floor. A consumer that describes what a server can do — gating a test lane, or filtering prose by the server it targets — reads the same check.
|
|
439
439
|
|
|
440
|
-
Some input fields take a value only some servers accept. `@metabase/client/version/input-gates` records each such field on the input schema that holds it, in a registry of the client's own rather than Zod's global one. `inputGatesOf(schema)` answers the `InputGate` entries recorded on a property node, or `null` when every server takes all its values. A gate names a `feature`, an `effect` (`"needs"`: the server must hold the feature; `"supersededBy"`: a server holding it reads the value as something else; `"droppedBy"`: a server holding it drops the value unread), and the `when` that triggers it (`GateTrigger`: the field `present`, one of `values`, or a `nonEmpty` array). `gateTriggered(gate, value)` says whether a value passed for the field triggers the gate. A `droppedBy` gate is a note and nothing enforces it: `TABLE_FROM_DEFINITION_GATE` on `table_id` of `MeasureCreateInput` and `SegmentCreateInput`, which a server holding `tableFromDefinition` drops, and every server is sent because one without the feature requires it. The domain modules export every other gate as a const the resource enforces it by: `DATA_SENSITIVITY_GATE` on `FieldUpdateInput.data_sensitivity`, `DATA_LAYER_TIER_GATE` and `DATA_LAYER_MEDALLION_GATE` on `TableUpdateInput.data_layer`, `DATA_AUTHORITY_WITHDRAWAL_GATE` on `data_authority` of `TableUpdateInput` and `TableBulkEditInput`, `DATA_ACTION_COLLECTION_GATE` on `DataActionUpdateInput.collection_id`, `SUBSCRIPTION_FILTERS_GATE` on `parameters` of `PulseCreateInput` and `PulseUpdateInput`, and `REVISION_ENTITY_GATES` (`measure`, `transform`, `transform-test`) on `RevisionRevertInput.entity`. A server lacking the feature is refused or explained the way its method's own requirement is.
|
|
440
|
+
Some input fields take a value only some servers accept. `@metabase/client/version/input-gates` records each such field on the input schema that holds it, in a registry of the client's own rather than Zod's global one. `inputGatesOf(schema)` answers the `InputGate` entries recorded on a property node, or `null` when every server takes all its values. A gate names a `feature`, an `effect` (`"needs"`: the server must hold the feature; `"supersededBy"`: a server holding it reads the value as something else; `"droppedBy"`: a server holding it drops the value unread), and the `when` that triggers it (`GateTrigger`: the field `present`, one of `values`, or a `nonEmpty` array). `gateTriggered(gate, value)` says whether a value passed for the field triggers the gate. A `droppedBy` gate is a note and nothing enforces it: `TABLE_FROM_DEFINITION_GATE` on `table_id` of `MeasureCreateInput` and `SegmentCreateInput`, which a server holding `tableFromDefinition` drops, and every server is sent because one without the feature requires it. The domain modules export every other gate as a const the resource enforces it by: `DATA_SENSITIVITY_GATE` on `FieldUpdateInput.data_sensitivity`, `DATA_LAYER_TIER_GATE` and `DATA_LAYER_MEDALLION_GATE` on `TableUpdateInput.data_layer`, `DATA_AUTHORITY_WITHDRAWAL_GATE` on `data_authority` of `TableUpdateInput` and `TableBulkEditInput`, `DATA_ACTION_COLLECTION_GATE` on `DataActionUpdateInput.collection_id`, `DATA_ACTION_TABLE_GATE` on `DataActionUpdateInput.table_id`, `SUBSCRIPTION_FILTERS_GATE` on `parameters` of `PulseCreateInput` and `PulseUpdateInput`, and `REVISION_ENTITY_GATES` (`measure`, `transform`, `transform-test`) on `RevisionRevertInput.entity`. A server lacking the feature is refused or explained the way its method's own requirement is.
|
|
441
441
|
|
|
442
442
|
A resource whose wire shape differs between generations exports from its `@metabase/client/domain/<r>` module, beside the canonical schema, a reader that picks the exact schema for a `Features` and converts forward: `transformDetailSchema(features)` and `transformRowSchema(features)` read a `Transform` (the older generations' hydrated `table` on the detail endpoint, and no link on the rest, become `target_table_id`, and a Python source's `source-tables` keyed by alias becomes the list of `TransformSourceTableEntry`, whose `database_id`, `schema` and `table` are `null` for a table named by id alone; `transform.create`, `transform.update` and `transformPython.testRun` send the list back keyed by alias to such a server, `transformSourceBody(source, features)` and `pythonTestRunBody(params, features)` being the writers), `fieldDetailSchema(features)` reads a `FieldDetail`, which is a `FieldWithDataSensitivity` (its `data_sensitivity` `null` for an unlabelled field) on a generation with the label and a plain `Field` without the key elsewhere, told apart by `hasDataSensitivity`, `fieldRemappedValueSchema(features, sameField)` reads a `FieldRemappedValue` from the first cells of a row a generation pads with display columns, `transformJobSchema(features)` reads a `TransformJob` whose `active` is `null` on a generation that cannot switch jobs off, `transformJobRunResultSchema(features)` reads a `TransformJobRunResult` (`{ message, started, run_id }` — a stub id is `started: null, run_id: null`, the request accepted and the outcome unsaid; a numeric or null id is `started: id !== null, run_id: id`), and `libraryWireSchema(features)` with `toLibrary(wire, listing)` reads a `Library` whose `LibraryChild` entries carry `type` from the wire where the generation sends it and `is_remote_synced` from the collection listing on every generation (`LibraryCollectionInfo`, `LibraryListing`). Each `null` in a canonical field means "this server cannot say". `ResponseShapeError.developerDetail.serverSkew` carries the profile's `skew`, and a `newer-than-known` server is named as such in the message's lead line.
|
|
443
443
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/domain/card.d.ts
|
|
3
3
|
declare const CardType: z.ZodEnum<{
|
|
4
|
-
question: "question";
|
|
5
|
-
model: "model";
|
|
6
4
|
metric: "metric";
|
|
5
|
+
model: "model";
|
|
6
|
+
question: "question";
|
|
7
7
|
}>;
|
|
8
8
|
type CardType = z.infer<typeof CardType>;
|
|
9
9
|
declare const CardListFilter: z.ZodEnum<{
|
|
10
|
+
database: "database";
|
|
11
|
+
table: "table";
|
|
10
12
|
archived: "archived";
|
|
11
13
|
all: "all";
|
|
12
14
|
mine: "mine";
|
|
13
15
|
bookmarked: "bookmarked";
|
|
14
|
-
database: "database";
|
|
15
|
-
table: "table";
|
|
16
16
|
using_model: "using_model";
|
|
17
17
|
using_segment: "using_segment";
|
|
18
18
|
}>;
|
|
@@ -278,16 +278,16 @@ declare const Card: z.ZodObject<{
|
|
|
278
278
|
id: z.ZodNumber;
|
|
279
279
|
name: z.ZodString;
|
|
280
280
|
type: z.ZodEnum<{
|
|
281
|
-
question: "question";
|
|
282
|
-
model: "model";
|
|
283
281
|
metric: "metric";
|
|
282
|
+
model: "model";
|
|
283
|
+
question: "question";
|
|
284
284
|
}>;
|
|
285
285
|
display: z.ZodString;
|
|
286
286
|
description: z.ZodNullable<z.ZodString>;
|
|
287
287
|
archived: z.ZodBoolean;
|
|
288
288
|
query_type: z.ZodNullable<z.ZodEnum<{
|
|
289
|
-
native: "native";
|
|
290
289
|
query: "query";
|
|
290
|
+
native: "native";
|
|
291
291
|
}>>;
|
|
292
292
|
database_id: z.ZodNullable<z.ZodNumber>;
|
|
293
293
|
table_id: z.ZodNullable<z.ZodNumber>;
|
|
@@ -320,16 +320,16 @@ declare const CardDetail: z.ZodObject<{
|
|
|
320
320
|
id: z.ZodNumber;
|
|
321
321
|
name: z.ZodString;
|
|
322
322
|
type: z.ZodEnum<{
|
|
323
|
-
question: "question";
|
|
324
|
-
model: "model";
|
|
325
323
|
metric: "metric";
|
|
324
|
+
model: "model";
|
|
325
|
+
question: "question";
|
|
326
326
|
}>;
|
|
327
327
|
display: z.ZodString;
|
|
328
328
|
description: z.ZodNullable<z.ZodString>;
|
|
329
329
|
archived: z.ZodBoolean;
|
|
330
330
|
query_type: z.ZodNullable<z.ZodEnum<{
|
|
331
|
-
native: "native";
|
|
332
331
|
query: "query";
|
|
332
|
+
native: "native";
|
|
333
333
|
}>>;
|
|
334
334
|
database_id: z.ZodNullable<z.ZodNumber>;
|
|
335
335
|
table_id: z.ZodNullable<z.ZodNumber>;
|
|
@@ -361,9 +361,10 @@ declare const CardDetail: z.ZodObject<{
|
|
|
361
361
|
type: z.ZodEnum<{
|
|
362
362
|
number: "number";
|
|
363
363
|
boolean: "boolean";
|
|
364
|
-
id: "id";
|
|
365
364
|
date: "date";
|
|
365
|
+
id: "id";
|
|
366
366
|
text: "text";
|
|
367
|
+
"temporal-unit": "temporal-unit";
|
|
367
368
|
"date/single": "date/single";
|
|
368
369
|
category: "category";
|
|
369
370
|
"location/city": "location/city";
|
|
@@ -375,7 +376,6 @@ declare const CardDetail: z.ZodObject<{
|
|
|
375
376
|
"date/quarter-year": "date/quarter-year";
|
|
376
377
|
"date/relative": "date/relative";
|
|
377
378
|
"date/all-options": "date/all-options";
|
|
378
|
-
"temporal-unit": "temporal-unit";
|
|
379
379
|
"number/!=": "number/!=";
|
|
380
380
|
"number/<=": "number/<=";
|
|
381
381
|
"number/=": "number/=";
|
|
@@ -698,26 +698,26 @@ declare const CardDetail: z.ZodObject<{
|
|
|
698
698
|
type CardDetail = z.infer<typeof CardDetail>;
|
|
699
699
|
declare const CardCompact: z.ZodObject<{
|
|
700
700
|
type: z.ZodEnum<{
|
|
701
|
-
question: "question";
|
|
702
|
-
model: "model";
|
|
703
701
|
metric: "metric";
|
|
702
|
+
model: "model";
|
|
703
|
+
question: "question";
|
|
704
704
|
}>;
|
|
705
705
|
id: z.ZodNumber;
|
|
706
706
|
name: z.ZodString;
|
|
707
707
|
description: z.ZodNullable<z.ZodString>;
|
|
708
708
|
archived: z.ZodBoolean;
|
|
709
|
+
collection_id: z.ZodNullable<z.ZodNumber>;
|
|
709
710
|
display: z.ZodString;
|
|
710
711
|
database_id: z.ZodNullable<z.ZodNumber>;
|
|
711
|
-
collection_id: z.ZodNullable<z.ZodNumber>;
|
|
712
712
|
dashboard_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
713
713
|
}, z.core.$strip>;
|
|
714
714
|
type CardCompact = z.infer<typeof CardCompact>;
|
|
715
715
|
declare const CardCreateInput: z.ZodObject<{
|
|
716
716
|
name: z.ZodString;
|
|
717
717
|
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
718
|
-
question: "question";
|
|
719
|
-
model: "model";
|
|
720
718
|
metric: "metric";
|
|
719
|
+
model: "model";
|
|
720
|
+
question: "question";
|
|
721
721
|
}>>>;
|
|
722
722
|
dataset_query: z.ZodObject<{}, z.core.$loose>;
|
|
723
723
|
display: z.ZodString;
|
|
@@ -734,9 +734,10 @@ declare const CardCreateInput: z.ZodObject<{
|
|
|
734
734
|
type: z.ZodEnum<{
|
|
735
735
|
number: "number";
|
|
736
736
|
boolean: "boolean";
|
|
737
|
-
id: "id";
|
|
738
737
|
date: "date";
|
|
738
|
+
id: "id";
|
|
739
739
|
text: "text";
|
|
740
|
+
"temporal-unit": "temporal-unit";
|
|
740
741
|
"date/single": "date/single";
|
|
741
742
|
category: "category";
|
|
742
743
|
"location/city": "location/city";
|
|
@@ -748,7 +749,6 @@ declare const CardCreateInput: z.ZodObject<{
|
|
|
748
749
|
"date/quarter-year": "date/quarter-year";
|
|
749
750
|
"date/relative": "date/relative";
|
|
750
751
|
"date/all-options": "date/all-options";
|
|
751
|
-
"temporal-unit": "temporal-unit";
|
|
752
752
|
"number/!=": "number/!=";
|
|
753
753
|
"number/<=": "number/<=";
|
|
754
754
|
"number/=": "number/=";
|
|
@@ -826,9 +826,9 @@ type CardCreateInput = z.infer<typeof CardCreateInput>;
|
|
|
826
826
|
declare const CardUpdateInput: z.ZodObject<{
|
|
827
827
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
828
828
|
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
829
|
-
question: "question";
|
|
830
|
-
model: "model";
|
|
831
829
|
metric: "metric";
|
|
830
|
+
model: "model";
|
|
831
|
+
question: "question";
|
|
832
832
|
}>>>;
|
|
833
833
|
dataset_query: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
834
834
|
display: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -838,8 +838,8 @@ declare const CardUpdateInput: z.ZodObject<{
|
|
|
838
838
|
enable_embedding: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
839
839
|
embedding_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
840
840
|
embedding_params: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
841
|
-
disabled: "disabled";
|
|
842
841
|
enabled: "enabled";
|
|
842
|
+
disabled: "disabled";
|
|
843
843
|
locked: "locked";
|
|
844
844
|
}>>>>;
|
|
845
845
|
collection_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -853,9 +853,10 @@ declare const CardUpdateInput: z.ZodObject<{
|
|
|
853
853
|
type: z.ZodEnum<{
|
|
854
854
|
number: "number";
|
|
855
855
|
boolean: "boolean";
|
|
856
|
-
id: "id";
|
|
857
856
|
date: "date";
|
|
857
|
+
id: "id";
|
|
858
858
|
text: "text";
|
|
859
|
+
"temporal-unit": "temporal-unit";
|
|
859
860
|
"date/single": "date/single";
|
|
860
861
|
category: "category";
|
|
861
862
|
"location/city": "location/city";
|
|
@@ -867,7 +868,6 @@ declare const CardUpdateInput: z.ZodObject<{
|
|
|
867
868
|
"date/quarter-year": "date/quarter-year";
|
|
868
869
|
"date/relative": "date/relative";
|
|
869
870
|
"date/all-options": "date/all-options";
|
|
870
|
-
"temporal-unit": "temporal-unit";
|
|
871
871
|
"number/!=": "number/!=";
|
|
872
872
|
"number/<=": "number/<=";
|
|
873
873
|
"number/=": "number/=";
|
|
@@ -1213,10 +1213,10 @@ declare const CardQueryResult: z.ZodObject<{
|
|
|
1213
1213
|
type CardQueryResult = z.infer<typeof CardQueryResult>;
|
|
1214
1214
|
declare const CardQueryResultCompact: z.ZodObject<{
|
|
1215
1215
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1216
|
+
error_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1216
1217
|
status: z.ZodString;
|
|
1217
|
-
row_count: z.ZodOptional<z.ZodNumber>;
|
|
1218
1218
|
cached: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1219
|
-
|
|
1219
|
+
row_count: z.ZodOptional<z.ZodNumber>;
|
|
1220
1220
|
data: z.ZodOptional<z.ZodObject<{
|
|
1221
1221
|
rows: z.ZodArray<z.ZodArray<z.ZodUnknown>>;
|
|
1222
1222
|
cols: z.ZodArray<z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "./transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "./transport-CM-eJat3.js";
|
|
2
2
|
import { t as ListResult } from "./list-BT_bBm9Z.js";
|
|
3
|
-
import { a as CardListFilter, i as CardDetail, l as CardUpdateInput, o as CardQueryResult, r as CardCreateInput, t as Card } from "./card-
|
|
4
|
-
import { r as QueryMetadata } from "./dataset-
|
|
3
|
+
import { a as CardListFilter, i as CardDetail, l as CardUpdateInput, o as CardQueryResult, r as CardCreateInput, t as Card } from "./card-CAOxi3ZU.js";
|
|
4
|
+
import { r as QueryMetadata } from "./dataset-Bj3bNqjm.js";
|
|
5
5
|
import { n as ExportFormat } from "./query-Xsin530u.js";
|
|
6
6
|
//#region src/resources/card.d.ts
|
|
7
7
|
interface CardListParams {
|
|
@@ -2,84 +2,84 @@ import "./credential-B6fKSvqp.js";
|
|
|
2
2
|
import "./oauth-login-SZ4Csai8.js";
|
|
3
3
|
import "./oauth-session-COLH4puN.js";
|
|
4
4
|
import "./session-properties-COtlxAcK.js";
|
|
5
|
-
import "./features-
|
|
5
|
+
import "./features-BwC2QUQB.js";
|
|
6
6
|
import "./tag-qzjGGci8.js";
|
|
7
|
-
import { _ as WaitOptions, f as RequestOptions, g as TransportRequestOptions, h as Transport, n as ClientOptions, t as ClientCredentials, yt as ServerProfile } from "./transport-
|
|
7
|
+
import { _ as WaitOptions, f as RequestOptions, g as TransportRequestOptions, h as Transport, n as ClientOptions, t as ClientCredentials, yt as ServerProfile } from "./transport-CM-eJat3.js";
|
|
8
8
|
import { t as ListResult } from "./list-BT_bBm9Z.js";
|
|
9
|
-
import "./requirements-
|
|
10
|
-
import "./requirement-check-
|
|
11
|
-
import { n as Page } from "./paginate-
|
|
9
|
+
import "./requirements-CW0DsGzZ.js";
|
|
10
|
+
import "./requirement-check-B5tsY6Z_.js";
|
|
11
|
+
import { n as Page } from "./paginate-CPjKDJ2m.js";
|
|
12
12
|
import { a as PollOptions } from "./poll-CIwnee7h.js";
|
|
13
|
-
import "./json-
|
|
13
|
+
import "./json-DK8ntK_m.js";
|
|
14
14
|
import { i as CreatedApiKey, r as ApiKeyCreateInput, t as ApiKey } from "./api-key-DJeN1-7G.js";
|
|
15
|
-
import { i as CardDetail, l as CardUpdateInput, o as CardQueryResult, r as CardCreateInput, t as Card } from "./card-
|
|
16
|
-
import { c as CollectionId, g as CollectionTreeNode, i as Collection, s as CollectionCreateInput, v as CollectionUpdateInput } from "./collection-
|
|
15
|
+
import { i as CardDetail, l as CardUpdateInput, o as CardQueryResult, r as CardCreateInput, t as Card } from "./card-CAOxi3ZU.js";
|
|
16
|
+
import { c as CollectionId, g as CollectionTreeNode, i as Collection, s as CollectionCreateInput, v as CollectionUpdateInput } from "./collection-kN2oYenF.js";
|
|
17
17
|
import "./content-translation-zfUkE_OG.js";
|
|
18
18
|
import "./cron-DThzerR6.js";
|
|
19
|
-
import { _ as DashcardDetail, a as DashboardCopyInput, m as DashboardUpdateInput, o as DashboardCreateInput, r as DashboardCopy, s as DashboardDetail, t as Dashboard, u as DashboardParameterConstraints, v as DashcardPatchInput } from "./dashboard-
|
|
20
|
-
import {
|
|
21
|
-
import "./data-app-
|
|
22
|
-
import { o as DatabaseSyncResult, s as DatabaseUpdateInput, t as Database, u as DatabaseWithSettings } from "./database-
|
|
23
|
-
import { r as QueryMetadata, t as CompiledQuery } from "./dataset-
|
|
24
|
-
import "./dependency-
|
|
25
|
-
import { a as DocumentUpdateInput, i as DocumentCreateInput, t as Document } from "./document-
|
|
26
|
-
import { a as EidTranslateResult, i as EidTranslateInput } from "./eid-translation-
|
|
27
|
-
import "./embedding-
|
|
19
|
+
import { _ as DashcardDetail, a as DashboardCopyInput, m as DashboardUpdateInput, o as DashboardCreateInput, r as DashboardCopy, s as DashboardDetail, t as Dashboard, u as DashboardParameterConstraints, v as DashcardPatchInput } from "./dashboard-Bkl_vs7L.js";
|
|
20
|
+
import { l as DataActionUpdateInput, o as DataActionExecuteInput, r as DataAction, s as DataActionExecuteResult } from "./data-action-CCU3lzoY.js";
|
|
21
|
+
import "./data-app-DAEPU9W5.js";
|
|
22
|
+
import { o as DatabaseSyncResult, s as DatabaseUpdateInput, t as Database, u as DatabaseWithSettings } from "./database-B54owh7H.js";
|
|
23
|
+
import { r as QueryMetadata, t as CompiledQuery } from "./dataset-Bj3bNqjm.js";
|
|
24
|
+
import "./dependency-B8aPt_IM.js";
|
|
25
|
+
import { a as DocumentUpdateInput, i as DocumentCreateInput, t as Document } from "./document-rqUlE_OE.js";
|
|
26
|
+
import { a as EidTranslateResult, i as EidTranslateInput } from "./eid-translation-CP79Tz71.js";
|
|
27
|
+
import "./embedding-oU3gqfgX.js";
|
|
28
28
|
import "./erd-BdeFEeSy.js";
|
|
29
|
-
import { c as FieldRemappedValue, d as FieldSummary, f as FieldUpdateInput, l as FieldSearchMatches, p as FieldValues, s as FieldDetail } from "./field-
|
|
30
|
-
import "./git-sync-
|
|
29
|
+
import { c as FieldRemappedValue, d as FieldSummary, f as FieldUpdateInput, l as FieldSearchMatches, p as FieldValues, s as FieldDetail } from "./field-CCp65II7.js";
|
|
30
|
+
import "./git-sync-D1gts9j5.js";
|
|
31
31
|
import { i as GlossaryUpdateInput, r as GlossaryCreateInput, t as Glossary } from "./glossary-CHK3elPj.js";
|
|
32
|
-
import "./library-
|
|
32
|
+
import "./library-DZpIRTeG.js";
|
|
33
33
|
import "./measure-CgH14YQZ.js";
|
|
34
|
-
import { g as MetricFilterClause, x as MetricMathExpression } from "./metric-
|
|
35
|
-
import "./moderation-review-
|
|
36
|
-
import { l as NotificationCreateInput, r as Notification, x as NotificationUpdateInput } from "./notification-
|
|
37
|
-
import { s as ParameterValues } from "./parameter-
|
|
34
|
+
import { g as MetricFilterClause, x as MetricMathExpression } from "./metric-CKhTot_B.js";
|
|
35
|
+
import "./moderation-review-B4RUTZ6_.js";
|
|
36
|
+
import { l as NotificationCreateInput, r as Notification, x as NotificationUpdateInput } from "./notification-D1MThyKE.js";
|
|
37
|
+
import { s as ParameterValues } from "./parameter-CvyXRH6F.js";
|
|
38
38
|
import { a as PermissionsGraph } from "./permission-BnCQw5Kp.js";
|
|
39
|
-
import { h as PulseUpdateInput, l as PulseCreateInput, t as Pulse } from "./pulse-
|
|
39
|
+
import { h as PulseUpdateInput, l as PulseCreateInput, t as Pulse } from "./pulse-BgS7Y3MU.js";
|
|
40
40
|
import { n as ExportFormat, t as DatasetQuery } from "./query-Xsin530u.js";
|
|
41
|
-
import "./replacement-
|
|
42
|
-
import "./search-
|
|
41
|
+
import "./replacement-Bu4qxOua.js";
|
|
42
|
+
import "./search-C0PiFw8c.js";
|
|
43
43
|
import { i as SegmentUpdateInput, r as SegmentCreateInput, t as Segment } from "./segment-CbAgVO-5.js";
|
|
44
|
-
import "./revision-
|
|
44
|
+
import "./revision-CwP4-eqv.js";
|
|
45
45
|
import { t as Setting } from "./setting-DXuQGXGF.js";
|
|
46
46
|
import { n as SetupResult, t as SetupInput } from "./setup-JqcJ2unJ.js";
|
|
47
47
|
import { i as SnippetUpdateInput, r as SnippetCreateInput, t as Snippet } from "./snippet-C_Ilx7tR.js";
|
|
48
|
-
import { S as TableSchemaSyncResult, a as Table, g as TableForeignKey, h as TableFieldValuesResult, y as TableQueryMetadata } from "./table-
|
|
49
|
-
import { i as TimelineEvent, l as TimelineUpdateInput, o as TimelineEventCreateInput, r as TimelineCreateInput, s as TimelineEventUpdateInput, t as Timeline } from "./timeline-
|
|
50
|
-
import "./transform-
|
|
48
|
+
import { S as TableSchemaSyncResult, a as Table, g as TableForeignKey, h as TableFieldValuesResult, y as TableQueryMetadata } from "./table-B3lazUvH.js";
|
|
49
|
+
import { i as TimelineEvent, l as TimelineUpdateInput, o as TimelineEventCreateInput, r as TimelineCreateInput, s as TimelineEventUpdateInput, t as Timeline } from "./timeline-Bnn28jC7.js";
|
|
50
|
+
import "./transform-B0mugBQQ.js";
|
|
51
51
|
import "./transform-dag-run-BSrdrjaK.js";
|
|
52
|
-
import "./transform-inspector-
|
|
53
|
-
import "./transform-job-
|
|
54
|
-
import "./transform-python-
|
|
52
|
+
import "./transform-inspector-BUYBt6--.js";
|
|
53
|
+
import "./transform-job-DV28hc1A.js";
|
|
54
|
+
import "./transform-python-B-jBoeVa.js";
|
|
55
55
|
import "./transform-tag-C6j5EUkX.js";
|
|
56
|
-
import "./transform-test-
|
|
56
|
+
import "./transform-test-DpTJm7H7.js";
|
|
57
57
|
import { r as UploadUpdateResult, t as UploadResult } from "./upload-UPfZFdbH.js";
|
|
58
58
|
import { t as CurrentUser } from "./user-Sqqv7rqh.js";
|
|
59
|
-
import { n as CardListParams, r as CardQueryParams, t as CardExportParams } from "./card-
|
|
60
|
-
import { i as CollectionTreeParams, n as CollectionItemPageOptions, r as CollectionListParams, t as CollectionItemListParams } from "./collection-
|
|
59
|
+
import { n as CardListParams, r as CardQueryParams, t as CardExportParams } from "./card-Ik580mDC.js";
|
|
60
|
+
import { i as CollectionTreeParams, n as CollectionItemPageOptions, r as CollectionListParams, t as CollectionItemListParams } from "./collection-B31DGW6J.js";
|
|
61
61
|
import { t as CsvFile } from "./csv-upload--K35QedP.js";
|
|
62
|
-
import { r as DashcardCardIssue, t as DashboardListParams } from "./dashboard-
|
|
63
|
-
import { n as DatabaseListParams, r as DatabaseSyncSchemaParams, t as DatabaseGetParams } from "./database-
|
|
64
|
-
import { n as DatasetNativeParams, t as DatasetExportParams } from "./dataset-
|
|
65
|
-
import { i as DependencyItemPageOptions, n as DependencyDependentsParams, r as DependencyItemListParams, t as DependencyBrokenParams } from "./dependency-
|
|
66
|
-
import { t as ErdParams } from "./erd-
|
|
67
|
-
import { a as FieldSetDataSensitivityParams, i as FieldSearchParams, t as FieldRemappingParams } from "./field-
|
|
68
|
-
import { a as SyncRemoteChangesParams, i as SyncImportParams, n as SyncExportParams, r as SyncExportPreflightParams, s as SyncStashParams, t as SyncCreateBranchParams } from "./git-sync-
|
|
69
|
-
import { t as GlossaryListParams } from "./glossary-
|
|
70
|
-
import { t as MeasureArchiveParams } from "./measure-
|
|
71
|
-
import { t as NotificationListParams } from "./notification-
|
|
72
|
-
import { t as PulseListParams } from "./pulse-
|
|
73
|
-
import { t as ReplacementRunListParams } from "./replacement-
|
|
74
|
-
import { n as SearchParams, t as SearchPage } from "./search-
|
|
75
|
-
import { t as SegmentArchiveParams } from "./segment-
|
|
76
|
-
import { t as SnippetListParams } from "./snippet-
|
|
77
|
-
import { t as TableListParams } from "./table-
|
|
78
|
-
import { n as TimelineListParams, t as TimelineEventsParams } from "./timeline-
|
|
79
|
-
import { a as TransformRunSummaryPageParams, i as TransformRunParams, n as TransformRunPageOptions, r as TransformRunPageParams, t as TransformDagParams } from "./transform-
|
|
80
|
-
import { t as TransformJobRunParams } from "./transform-job-
|
|
81
|
-
import { t as TransformTestListParams } from "./transform-test-
|
|
82
|
-
import { t as UploadCsvParams } from "./upload-
|
|
62
|
+
import { r as DashcardCardIssue, t as DashboardListParams } from "./dashboard-ClJ5XHXJ.js";
|
|
63
|
+
import { n as DatabaseListParams, r as DatabaseSyncSchemaParams, t as DatabaseGetParams } from "./database-DNQLCRBJ.js";
|
|
64
|
+
import { n as DatasetNativeParams, t as DatasetExportParams } from "./dataset-C05pNRjH.js";
|
|
65
|
+
import { i as DependencyItemPageOptions, n as DependencyDependentsParams, r as DependencyItemListParams, t as DependencyBrokenParams } from "./dependency-NbXbo_fE.js";
|
|
66
|
+
import { t as ErdParams } from "./erd-BJ3OjckY.js";
|
|
67
|
+
import { a as FieldSetDataSensitivityParams, i as FieldSearchParams, t as FieldRemappingParams } from "./field-Be27Kzlx.js";
|
|
68
|
+
import { a as SyncRemoteChangesParams, i as SyncImportParams, n as SyncExportParams, r as SyncExportPreflightParams, s as SyncStashParams, t as SyncCreateBranchParams } from "./git-sync-CBplEGj0.js";
|
|
69
|
+
import { t as GlossaryListParams } from "./glossary-yuKOTBXb.js";
|
|
70
|
+
import { t as MeasureArchiveParams } from "./measure-DZ7RmNPs.js";
|
|
71
|
+
import { t as NotificationListParams } from "./notification-BwLEwNk9.js";
|
|
72
|
+
import { t as PulseListParams } from "./pulse-DEKvyd8u.js";
|
|
73
|
+
import { t as ReplacementRunListParams } from "./replacement-WU_rk924.js";
|
|
74
|
+
import { n as SearchParams, t as SearchPage } from "./search-DjJ_lu_o.js";
|
|
75
|
+
import { t as SegmentArchiveParams } from "./segment-BR0OAdWN.js";
|
|
76
|
+
import { t as SnippetListParams } from "./snippet-C5naeVEd.js";
|
|
77
|
+
import { t as TableListParams } from "./table-DT3kO7JU.js";
|
|
78
|
+
import { n as TimelineListParams, t as TimelineEventsParams } from "./timeline-vJHDIuDJ.js";
|
|
79
|
+
import { a as TransformRunSummaryPageParams, i as TransformRunParams, n as TransformRunPageOptions, r as TransformRunPageParams, t as TransformDagParams } from "./transform-Buv3VvTt.js";
|
|
80
|
+
import { t as TransformJobRunParams } from "./transform-job-BFLbsf5-.js";
|
|
81
|
+
import { t as TransformTestListParams } from "./transform-test-3uuvuwyQ.js";
|
|
82
|
+
import { t as UploadCsvParams } from "./upload-BxRCvpJo.js";
|
|
83
83
|
//#region src/resources/metric.d.ts
|
|
84
84
|
interface MetricDimensionListParams {
|
|
85
85
|
query?: string | undefined;
|
|
@@ -308,12 +308,28 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
308
308
|
list: (options?: RequestOptions) => Promise<ListResult<DataAction>>;
|
|
309
309
|
get: (id: number, options?: RequestOptions) => Promise<DataAction>;
|
|
310
310
|
create: (params: {
|
|
311
|
-
name: string;
|
|
312
311
|
type: "query";
|
|
313
|
-
database_id: number;
|
|
314
312
|
dataset_query: {
|
|
315
313
|
[x: string]: unknown;
|
|
316
314
|
};
|
|
315
|
+
name: string;
|
|
316
|
+
parameters?: {
|
|
317
|
+
[x: string]: unknown;
|
|
318
|
+
id: string;
|
|
319
|
+
type: string;
|
|
320
|
+
target: unknown;
|
|
321
|
+
name?: string | undefined;
|
|
322
|
+
slug?: string | undefined;
|
|
323
|
+
required?: boolean | undefined;
|
|
324
|
+
}[] | undefined;
|
|
325
|
+
collection_id?: number | null | undefined;
|
|
326
|
+
description?: string | null | undefined;
|
|
327
|
+
visualization_settings?: unknown;
|
|
328
|
+
} | {
|
|
329
|
+
type: "implicit";
|
|
330
|
+
kind: "row/create" | "row/update" | "row/delete";
|
|
331
|
+
table_id: number;
|
|
332
|
+
name: string;
|
|
317
333
|
parameters?: {
|
|
318
334
|
[x: string]: unknown;
|
|
319
335
|
id: string;
|
|
@@ -352,6 +368,8 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
352
368
|
collection_id: number | null;
|
|
353
369
|
database_id?: number | null | undefined;
|
|
354
370
|
dataset_query?: unknown;
|
|
371
|
+
kind?: string | undefined;
|
|
372
|
+
table_id?: number | null | undefined;
|
|
355
373
|
}>;
|
|
356
374
|
update: (id: number, params: DataActionUpdateInput, options?: RequestOptions) => Promise<DataAction>;
|
|
357
375
|
archive: (id: number, options?: RequestOptions) => Promise<DataAction>;
|
|
@@ -359,9 +377,7 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
359
377
|
execute: (id: number, params: DataActionExecuteInput, options?: RequestOptions) => Promise<DataActionExecuteResult>;
|
|
360
378
|
};
|
|
361
379
|
dataApp: {
|
|
362
|
-
list: (
|
|
363
|
-
available?: boolean | undefined;
|
|
364
|
-
} | undefined, options?: RequestOptions | undefined) => Promise<ListResult<{
|
|
380
|
+
list: (options?: RequestOptions | undefined) => Promise<ListResult<{
|
|
365
381
|
[x: string]: unknown;
|
|
366
382
|
id: number;
|
|
367
383
|
name: string;
|
|
@@ -399,54 +415,9 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
399
415
|
name: string;
|
|
400
416
|
display_name: string;
|
|
401
417
|
}>;
|
|
402
|
-
create: (params: {
|
|
403
|
-
name: string;
|
|
404
|
-
display_name?: string | undefined;
|
|
405
|
-
description?: string | null | undefined;
|
|
406
|
-
version?: number | undefined;
|
|
407
|
-
bundle_path?: string | undefined;
|
|
408
|
-
allowed_hosts?: string[] | undefined;
|
|
409
|
-
enabled?: boolean | undefined;
|
|
410
|
-
}, options?: RequestOptions | undefined) => Promise<{
|
|
411
|
-
[x: string]: unknown;
|
|
412
|
-
id: number;
|
|
413
|
-
name: string;
|
|
414
|
-
display_name: string;
|
|
415
|
-
description: string | null;
|
|
416
|
-
version: number;
|
|
417
|
-
outdated: boolean;
|
|
418
|
-
bundle_path: string;
|
|
419
|
-
enabled: boolean;
|
|
420
|
-
allowed_hosts: string[];
|
|
421
|
-
resource_collection_id: number;
|
|
422
|
-
bundle_hash: string | null;
|
|
423
|
-
created_at: string;
|
|
424
|
-
updated_at: string;
|
|
425
|
-
}>;
|
|
426
418
|
update: (slug: string, params: {
|
|
427
|
-
display_name?: string | undefined;
|
|
428
|
-
description?: string | null | undefined;
|
|
429
|
-
version?: number | undefined;
|
|
430
|
-
bundle_path?: string | undefined;
|
|
431
|
-
allowed_hosts?: string[] | undefined;
|
|
432
|
-
enabled?: boolean | undefined;
|
|
433
|
-
}, options?: RequestOptions | undefined) => Promise<{
|
|
434
|
-
[x: string]: unknown;
|
|
435
|
-
id: number;
|
|
436
|
-
name: string;
|
|
437
|
-
display_name: string;
|
|
438
|
-
description: string | null;
|
|
439
|
-
version: number;
|
|
440
|
-
outdated: boolean;
|
|
441
|
-
bundle_path: string;
|
|
442
419
|
enabled: boolean;
|
|
443
|
-
|
|
444
|
-
resource_collection_id: number;
|
|
445
|
-
bundle_hash: string | null;
|
|
446
|
-
created_at: string;
|
|
447
|
-
updated_at: string;
|
|
448
|
-
}>;
|
|
449
|
-
replaceBundle: (slug: string, bundle: string, options?: RequestOptions | undefined) => Promise<{
|
|
420
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
450
421
|
[x: string]: unknown;
|
|
451
422
|
id: number;
|
|
452
423
|
name: string;
|
|
@@ -462,8 +433,38 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
462
433
|
created_at: string;
|
|
463
434
|
updated_at: string;
|
|
464
435
|
}>;
|
|
465
|
-
|
|
466
|
-
|
|
436
|
+
generateSchema: (options?: RequestOptions | undefined) => Promise<{
|
|
437
|
+
path: string;
|
|
438
|
+
contents: string;
|
|
439
|
+
}[]>;
|
|
440
|
+
generateQueries: (params: {
|
|
441
|
+
collection: string;
|
|
442
|
+
queries: Record<string, {
|
|
443
|
+
entityId: string;
|
|
444
|
+
query: {
|
|
445
|
+
stages: [{
|
|
446
|
+
[x: string]: unknown;
|
|
447
|
+
}];
|
|
448
|
+
};
|
|
449
|
+
}>;
|
|
450
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
451
|
+
path: string;
|
|
452
|
+
contents: string;
|
|
453
|
+
}[]>;
|
|
454
|
+
generateActions: (params: {
|
|
455
|
+
collection: string;
|
|
456
|
+
actions: Record<string, {
|
|
457
|
+
entityId: string;
|
|
458
|
+
kind: "row/create" | "row/update" | "row/delete";
|
|
459
|
+
table: {
|
|
460
|
+
[x: string]: unknown;
|
|
461
|
+
id: number;
|
|
462
|
+
};
|
|
463
|
+
}>;
|
|
464
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
465
|
+
path: string;
|
|
466
|
+
contents: string;
|
|
467
|
+
}[]>;
|
|
467
468
|
};
|
|
468
469
|
database: {
|
|
469
470
|
list: (params?: DatabaseListParams, options?: RequestOptions) => Promise<ListResult<Database>>;
|
|
@@ -492,7 +493,7 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
492
493
|
name?: string | null | undefined;
|
|
493
494
|
display_name?: string | null | undefined;
|
|
494
495
|
description?: string | null | undefined;
|
|
495
|
-
type?: "query" | "metric" | "model" | "
|
|
496
|
+
type?: "query" | "metric" | "model" | "implicit" | "question" | null | undefined;
|
|
496
497
|
display?: string | null | undefined;
|
|
497
498
|
database_id?: number | null | undefined;
|
|
498
499
|
db_id?: number | null | undefined;
|
|
@@ -550,7 +551,7 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
550
551
|
name?: string | null | undefined;
|
|
551
552
|
display_name?: string | null | undefined;
|
|
552
553
|
description?: string | null | undefined;
|
|
553
|
-
type?: "query" | "metric" | "model" | "
|
|
554
|
+
type?: "query" | "metric" | "model" | "implicit" | "question" | null | undefined;
|
|
554
555
|
display?: string | null | undefined;
|
|
555
556
|
database_id?: number | null | undefined;
|
|
556
557
|
db_id?: number | null | undefined;
|
|
@@ -600,7 +601,7 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
600
601
|
name?: string | null | undefined;
|
|
601
602
|
display_name?: string | null | undefined;
|
|
602
603
|
description?: string | null | undefined;
|
|
603
|
-
type?: "query" | "metric" | "model" | "
|
|
604
|
+
type?: "query" | "metric" | "model" | "implicit" | "question" | null | undefined;
|
|
604
605
|
display?: string | null | undefined;
|
|
605
606
|
database_id?: number | null | undefined;
|
|
606
607
|
db_id?: number | null | undefined;
|
|
@@ -649,7 +650,7 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
649
650
|
name?: string | null | undefined;
|
|
650
651
|
display_name?: string | null | undefined;
|
|
651
652
|
description?: string | null | undefined;
|
|
652
|
-
type?: "query" | "metric" | "model" | "
|
|
653
|
+
type?: "query" | "metric" | "model" | "implicit" | "question" | null | undefined;
|
|
653
654
|
display?: string | null | undefined;
|
|
654
655
|
database_id?: number | null | undefined;
|
|
655
656
|
db_id?: number | null | undefined;
|
|
@@ -699,7 +700,7 @@ declare function createClient(config: ClientCredentials, options: ClientOptions)
|
|
|
699
700
|
name?: string | null | undefined;
|
|
700
701
|
display_name?: string | null | undefined;
|
|
701
702
|
description?: string | null | undefined;
|
|
702
|
-
type?: "query" | "metric" | "model" | "
|
|
703
|
+
type?: "query" | "metric" | "model" | "implicit" | "question" | null | undefined;
|
|
703
704
|
display?: string | null | undefined;
|
|
704
705
|
database_id?: number | null | undefined;
|
|
705
706
|
db_id?: number | null | undefined;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createClient, t as MetabaseClient } from "./client-
|
|
1
|
+
import { n as createClient, t as MetabaseClient } from "./client-CQkS1030.js";
|
|
2
2
|
export { MetabaseClient, createClient };
|
package/dist/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as createTransport } from "./transport-
|
|
1
|
+
import { r as createTransport } from "./transport-D52WFGBR.js";
|
|
2
2
|
import { apiKeyResource } from "./resources/api-key.js";
|
|
3
3
|
import { cardResource } from "./resources/card.js";
|
|
4
4
|
import { collectionResource } from "./resources/collection.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "./transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "./transport-CM-eJat3.js";
|
|
2
2
|
import { t as ListResult } from "./list-BT_bBm9Z.js";
|
|
3
|
-
import { n as Page, r as PaginateOptions } from "./paginate-
|
|
4
|
-
import { c as CollectionId, d as CollectionItemFilterModel, g as CollectionTreeNode, h as CollectionPinnedState, i as Collection, m as CollectionNamespace, p as CollectionListFilter, s as CollectionCreateInput, v as CollectionUpdateInput } from "./collection-
|
|
3
|
+
import { n as Page, r as PaginateOptions } from "./paginate-CPjKDJ2m.js";
|
|
4
|
+
import { c as CollectionId, d as CollectionItemFilterModel, g as CollectionTreeNode, h as CollectionPinnedState, i as Collection, m as CollectionNamespace, p as CollectionListFilter, s as CollectionCreateInput, v as CollectionUpdateInput } from "./collection-kN2oYenF.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/resources/collection.d.ts
|
|
7
7
|
interface CollectionListParams {
|
|
@@ -35,7 +35,7 @@ declare function collectionResource(transport: Transport): {
|
|
|
35
35
|
itemPages: (ref: string | number, params?: CollectionItemListParams | undefined, options?: CollectionItemPageOptions | undefined) => AsyncIterable<Page<{
|
|
36
36
|
[x: string]: unknown;
|
|
37
37
|
id: number;
|
|
38
|
-
model: "
|
|
38
|
+
model: "collection" | "card" | "dashboard" | "dataset" | "document" | "metric" | "measure" | "pulse" | "snippet" | "table" | "timeline" | "transform" | "exploration" | "no_models" | "indexed-entity" | "action";
|
|
39
39
|
name: string;
|
|
40
40
|
archived: boolean | null;
|
|
41
41
|
description?: string | null | undefined;
|