@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.
- package/CHANGELOG.md +21 -0
- package/README.md +6 -4
- package/dist/api-key-DJeN1-7G.d.ts +46 -0
- package/dist/{card-B6merEUN.d.ts → card-BxBzr5Uj.d.ts} +11 -11
- package/dist/{card-BZx4NSr-.d.ts → card-DN0sLkCG.d.ts} +4 -4
- package/dist/{client-DNRvXFRm.d.ts → client-DdXLlH1B.d.ts} +270 -166
- package/dist/client.d.ts +1 -1
- package/dist/client.js +4 -0
- package/dist/{collection-Bib61WiV.d.ts → collection-DGnTvD6R.d.ts} +20 -20
- package/dist/{collection-CqtGPi4W.d.ts → collection-fFahL-ub.d.ts} +18 -4
- package/dist/{dashboard-XTe46250.d.ts → dashboard-CM7RmNeE.d.ts} +2 -2
- package/dist/{dashboard-z9i1VUZC.d.ts → dashboard-DtLXVgtf.d.ts} +21 -13
- package/dist/{data-action-rS27f2Ji.d.ts → data-action-CkXVrOUH.d.ts} +7 -5
- package/dist/data-app-CqP5_fpB.d.ts +76 -0
- package/dist/{database-DqTespfa.d.ts → database-B0JNZjDN.d.ts} +3 -3
- package/dist/{database-BLUMlywE.d.ts → database-BxqDmfcj.d.ts} +9 -9
- package/dist/{dataset-C6lX1-cr.d.ts → dataset-BBNGPVec.d.ts} +22 -22
- package/dist/{dataset-Cj3XuKLe.d.ts → dataset-BUirJ1rO.d.ts} +3 -3
- package/dist/{dependency-fN5_7a22.d.ts → dependency-CzpXmeu7.d.ts} +26 -26
- package/dist/{dependency-D8Qs5Xdx.d.ts → dependency-arB8Cr2H.d.ts} +147 -95
- package/dist/{document-oZNDbDfx.d.ts → document-tLd6pYWe.d.ts} +2 -2
- package/dist/domain/api-key.d.ts +2 -0
- package/dist/domain/api-key.js +31 -0
- package/dist/domain/card.d.ts +1 -1
- package/dist/domain/collection.d.ts +1 -1
- package/dist/domain/dashboard.d.ts +2 -2
- package/dist/domain/dashboard.js +21 -4
- package/dist/domain/data-action.d.ts +2 -2
- package/dist/domain/data-action.js +8 -2
- package/dist/domain/data-app.d.ts +2 -0
- package/dist/domain/data-app.js +52 -0
- 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/dependency.js +6 -3
- 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 +2 -2
- package/dist/domain/field.js +8 -2
- package/dist/domain/git-sync.d.ts +1 -1
- package/dist/domain/library.d.ts +2 -2
- package/dist/domain/library.js +8 -2
- package/dist/domain/measure.d.ts +1 -1
- package/dist/domain/measure.js +3 -1
- package/dist/domain/metric.d.ts +1 -1
- package/dist/domain/notification.d.ts +2 -2
- package/dist/domain/notification.js +6 -1
- package/dist/domain/pulse.d.ts +2 -2
- package/dist/domain/pulse.js +10 -3
- package/dist/domain/replacement.d.ts +1 -1
- package/dist/domain/revision.d.ts +2 -2
- package/dist/domain/revision.js +29 -2
- package/dist/domain/search.d.ts +1 -1
- package/dist/domain/segment.d.ts +1 -1
- package/dist/domain/segment.js +3 -1
- package/dist/domain/setup.d.ts +1 -1
- package/dist/domain/setup.js +1 -1
- package/dist/domain/snippet.d.ts +1 -1
- package/dist/domain/table.d.ts +2 -2
- package/dist/domain/table.js +35 -4
- package/dist/domain/timeline.d.ts +1 -1
- package/dist/domain/transform-inspector.d.ts +1 -1
- package/dist/domain/transform-job.d.ts +2 -2
- package/dist/domain/transform-job.js +8 -2
- package/dist/domain/transform-python.d.ts +2 -2
- package/dist/domain/transform-python.js +15 -3
- package/dist/domain/transform-tag.d.ts +1 -1
- package/dist/domain/transform-test.d.ts +1 -1
- package/dist/domain/transform.d.ts +2 -2
- package/dist/domain/transform.js +76 -7
- package/dist/domain/user.d.ts +1 -1
- package/dist/domain/user.js +1 -1
- package/dist/{eid-translation-nuhr8St2.d.ts → eid-translation-CH6NPWd-.d.ts} +15 -15
- package/dist/{embedding-Cz3RUJYf.d.ts → embedding-oU3gqfgX.d.ts} +1 -1
- package/dist/{erd-BujD227Y.d.ts → erd-CbV7xvAc.d.ts} +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/{features-CnFkUCj2.d.ts → features-SMSfJhB6.d.ts} +36 -2
- package/dist/{field-Bqn10Fq_.d.ts → field-D1Pfk-0S.d.ts} +2 -2
- package/dist/{field-BCRO19mk.d.ts → field-p9Rme2zB.d.ts} +6 -4
- package/dist/{git-sync-gAMKsZgN.d.ts → git-sync-BTf1aYHr.d.ts} +3 -3
- package/dist/{git-sync-DNXrNVCW.d.ts → git-sync-C99SVdJ9.d.ts} +2 -2
- package/dist/{glossary-CqFlzW33.d.ts → glossary-DFvnz-E5.d.ts} +1 -1
- package/dist/http/errors.d.ts +1 -1
- package/dist/http/transport.d.ts +1 -1
- package/dist/index.d.ts +43 -41
- package/dist/index.js +7 -5
- package/dist/input-gate-registry-Dai7SfXb.js +14 -0
- package/dist/input-gates-DwKoTJVQ.d.ts +28 -0
- package/dist/{json-CZvjc3--.d.ts → json-BksZpXDC.d.ts} +1 -1
- package/dist/json-pointer.d.ts +2 -1
- package/dist/json-pointer.js +4 -1
- package/dist/json.d.ts +1 -1
- package/dist/{library-Cx9h_RkU.d.ts → library-B9pEq7qP.d.ts} +8 -6
- package/dist/{measure-KuXdjZYJ.d.ts → measure-CgH14YQZ.d.ts} +1 -1
- package/dist/{measure-CuMqPbQX.d.ts → measure-lPz8qnwz.d.ts} +1 -1
- package/dist/{metric-yvehaVCS.d.ts → metric-DcYloqOQ.d.ts} +2 -2
- package/dist/{notification-BiegPoSD.d.ts → notification-Cp5GJErS.d.ts} +3 -3
- package/dist/{notification-BT2TDAd_.d.ts → notification-D1MThyKE.d.ts} +66 -2
- package/dist/{paginate-DZWvWvbm.d.ts → paginate-COuL0Gzl.d.ts} +1 -1
- package/dist/paginate.d.ts +1 -1
- package/dist/{pulse-CMc1Rwdj.d.ts → pulse-0LG3K6qO.d.ts} +7 -5
- package/dist/{pulse-dylocLd9.d.ts → pulse-BzKmz3Yn.d.ts} +2 -2
- package/dist/{replacement-CyvtbxGg.d.ts → replacement-BGyggp-G.d.ts} +5 -5
- package/dist/{replacement-S9U3gApY.d.ts → replacement-CVebCuNp.d.ts} +5 -5
- package/dist/{requirement-check-CIA5IHC1.d.ts → requirement-check-glU7wqhQ.d.ts} +2 -2
- package/dist/{requirements-C0txASN8.d.ts → requirements-Dx_ZVzl7.d.ts} +11 -1
- package/dist/resources/api-key.d.ts +11 -0
- package/dist/resources/api-key.js +35 -0
- package/dist/resources/card.d.ts +1 -1
- package/dist/resources/collection.d.ts +1 -1
- package/dist/resources/collection.js +29 -5
- 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 +8 -5
- package/dist/resources/data-action.d.ts +3 -48
- package/dist/resources/data-action.js +9 -9
- package/dist/resources/data-app.d.ts +112 -0
- package/dist/resources/data-app.js +75 -0
- 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 +13 -7
- package/dist/resources/document.d.ts +2 -2
- package/dist/resources/eid-translation.d.ts +2 -2
- package/dist/resources/erd.d.ts +1 -1
- package/dist/resources/field.d.ts +1 -1
- package/dist/resources/field.js +3 -2
- package/dist/resources/git-sync.d.ts +1 -1
- package/dist/resources/git-sync.js +1 -1
- package/dist/resources/glossary.d.ts +1 -1
- package/dist/resources/library.d.ts +4 -4
- package/dist/resources/library.js +2 -2
- package/dist/resources/measure.d.ts +1 -1
- package/dist/resources/metric.d.ts +1 -1
- package/dist/resources/moderation-review.d.ts +1 -1
- package/dist/resources/notification.d.ts +1 -1
- package/dist/resources/notification.js +2 -2
- 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/pulse.js +3 -2
- package/dist/resources/replacement.d.ts +1 -1
- package/dist/resources/revision.d.ts +3 -3
- package/dist/resources/revision.js +5 -10
- package/dist/resources/search.d.ts +1 -1
- package/dist/resources/search.js +23 -2
- package/dist/resources/segment.d.ts +1 -1
- package/dist/resources/setting.d.ts +1 -1
- package/dist/resources/setup.d.ts +2 -2
- package/dist/resources/snippet.d.ts +1 -1
- package/dist/resources/table.d.ts +1 -1
- package/dist/resources/table.js +9 -10
- 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-inspector.d.ts +2 -2
- package/dist/resources/transform-job.d.ts +1 -1
- package/dist/resources/transform-python.d.ts +11 -4
- package/dist/resources/transform-python.js +3 -2
- package/dist/resources/transform-tag.d.ts +1 -1
- package/dist/resources/transform-test.d.ts +1 -1
- package/dist/resources/transform.d.ts +1 -1
- package/dist/resources/transform.js +13 -3
- package/dist/resources/upload.d.ts +1 -1
- package/dist/resources/user.d.ts +2 -2
- package/dist/{revision-CQBPhohA.d.ts → revision-Dyl-8p7d.d.ts} +8 -6
- package/dist/{search-NZR6iRBs.d.ts → search-Cm5IxKss.d.ts} +8 -8
- package/dist/{search-BxJipLN6.d.ts → search-Cten2h0I.d.ts} +2 -2
- package/dist/{segment-pj3wklGe.d.ts → segment-CbAgVO-5.d.ts} +1 -1
- package/dist/{segment-D2i34X9l.d.ts → segment-DQLX6r1E.d.ts} +2 -2
- package/dist/{setup-Ez_U7GmM.d.ts → setup-JqcJ2unJ.d.ts} +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/{snippet-hEV429Pv.d.ts → snippet-C_Ilx7tR.d.ts} +2 -2
- package/dist/{snippet-RnnWa4TL.d.ts → snippet-Djn0rL21.d.ts} +2 -2
- package/dist/{table-B_lfuaHc.d.ts → table-CDZbLNow.d.ts} +6 -6
- package/dist/{table-B3-UaPHa.d.ts → table-Od6uvDVW.d.ts} +19 -14
- package/dist/{timeline-folD3mQ_.d.ts → timeline-BK45hy-h.d.ts} +31 -31
- package/dist/{timeline-C2IEcRlP.d.ts → timeline-BTs6fuRp.d.ts} +2 -2
- package/dist/{transform-CDurgE1D.d.ts → transform-C5thnJwW.d.ts} +139 -23
- package/dist/{transform-CXOT5kFe.d.ts → transform-WASQAXeA.d.ts} +39 -25
- package/dist/{transform-inspector-BUYBt6--.d.ts → transform-inspector-CMCh8WKV.d.ts} +4 -4
- package/dist/{transform-job-CTJImaOd.d.ts → transform-job-D8jTQtdX.d.ts} +5 -3
- package/dist/{transform-job-29P6BULe.d.ts → transform-job-DmTwKxhc.d.ts} +4 -4
- package/dist/{transform-python-DdDnW6yK.d.ts → transform-python-DtL3xxMj.d.ts} +49 -4
- package/dist/{transform-tag-DVUIZTEM.d.ts → transform-tag-C6j5EUkX.d.ts} +1 -1
- package/dist/{transform-test-A-CJYT6B.d.ts → transform-test-CR_i54IV.d.ts} +1 -1
- package/dist/{transform-test-BwuyrHpT.d.ts → transform-test-CeMzDpUC.d.ts} +1 -1
- package/dist/{transport-E0ZaPNWJ.d.ts → transport-BsXqRujn.d.ts} +17 -3
- package/dist/{upload-B7PG3ePk.d.ts → upload-B5YjVkSW.d.ts} +1 -1
- package/dist/{user-2r0OBoO6.d.ts → user-Sqqv7rqh.d.ts} +2 -2
- package/dist/version/capability-error.d.ts +1 -1
- package/dist/version/features.d.ts +2 -2
- package/dist/version/features.js +30 -2
- package/dist/version/input-gates.d.ts +2 -0
- package/dist/version/input-gates.js +13 -0
- 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 +10 -0
- package/package.json +3 -2
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-BsXqRujn.js";
|
|
2
|
+
import { t as ListResult } from "../list-BT_bBm9Z.js";
|
|
3
|
+
//#region src/resources/data-app.d.ts
|
|
4
|
+
declare function dataAppResource(transport: Transport): {
|
|
5
|
+
list: (filter?: {
|
|
6
|
+
available?: boolean | undefined;
|
|
7
|
+
} | undefined, options?: RequestOptions | undefined) => Promise<ListResult<{
|
|
8
|
+
[x: string]: unknown;
|
|
9
|
+
id: number;
|
|
10
|
+
name: string;
|
|
11
|
+
display_name: string;
|
|
12
|
+
description: string | null;
|
|
13
|
+
version: number;
|
|
14
|
+
outdated: boolean;
|
|
15
|
+
bundle_path: string;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
allowed_hosts: string[];
|
|
18
|
+
resource_collection_id: number;
|
|
19
|
+
bundle_hash: string | null;
|
|
20
|
+
created_at: string;
|
|
21
|
+
updated_at: string;
|
|
22
|
+
} | {
|
|
23
|
+
name: string;
|
|
24
|
+
display_name: string;
|
|
25
|
+
}>>;
|
|
26
|
+
get: (slug: string, options?: RequestOptions | undefined) => Promise<{
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
id: number;
|
|
29
|
+
name: string;
|
|
30
|
+
display_name: string;
|
|
31
|
+
description: string | null;
|
|
32
|
+
version: number;
|
|
33
|
+
outdated: boolean;
|
|
34
|
+
bundle_path: string;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
allowed_hosts: string[];
|
|
37
|
+
resource_collection_id: number;
|
|
38
|
+
bundle_hash: string | null;
|
|
39
|
+
created_at: string;
|
|
40
|
+
updated_at: string;
|
|
41
|
+
} | {
|
|
42
|
+
name: string;
|
|
43
|
+
display_name: string;
|
|
44
|
+
}>;
|
|
45
|
+
create: (params: {
|
|
46
|
+
name: string;
|
|
47
|
+
display_name?: string | undefined;
|
|
48
|
+
description?: string | null | undefined;
|
|
49
|
+
version?: number | undefined;
|
|
50
|
+
bundle_path?: string | undefined;
|
|
51
|
+
allowed_hosts?: string[] | undefined;
|
|
52
|
+
enabled?: boolean | undefined;
|
|
53
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
54
|
+
[x: string]: unknown;
|
|
55
|
+
id: number;
|
|
56
|
+
name: string;
|
|
57
|
+
display_name: string;
|
|
58
|
+
description: string | null;
|
|
59
|
+
version: number;
|
|
60
|
+
outdated: boolean;
|
|
61
|
+
bundle_path: string;
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
allowed_hosts: string[];
|
|
64
|
+
resource_collection_id: number;
|
|
65
|
+
bundle_hash: string | null;
|
|
66
|
+
created_at: string;
|
|
67
|
+
updated_at: string;
|
|
68
|
+
}>;
|
|
69
|
+
update: (slug: string, params: {
|
|
70
|
+
display_name?: string | undefined;
|
|
71
|
+
description?: string | null | undefined;
|
|
72
|
+
version?: number | undefined;
|
|
73
|
+
bundle_path?: string | undefined;
|
|
74
|
+
allowed_hosts?: string[] | undefined;
|
|
75
|
+
enabled?: boolean | undefined;
|
|
76
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
77
|
+
[x: string]: unknown;
|
|
78
|
+
id: number;
|
|
79
|
+
name: string;
|
|
80
|
+
display_name: string;
|
|
81
|
+
description: string | null;
|
|
82
|
+
version: number;
|
|
83
|
+
outdated: boolean;
|
|
84
|
+
bundle_path: string;
|
|
85
|
+
enabled: boolean;
|
|
86
|
+
allowed_hosts: string[];
|
|
87
|
+
resource_collection_id: number;
|
|
88
|
+
bundle_hash: string | null;
|
|
89
|
+
created_at: string;
|
|
90
|
+
updated_at: string;
|
|
91
|
+
}>;
|
|
92
|
+
replaceBundle: (slug: string, bundle: string, options?: RequestOptions | undefined) => Promise<{
|
|
93
|
+
[x: string]: unknown;
|
|
94
|
+
id: number;
|
|
95
|
+
name: string;
|
|
96
|
+
display_name: string;
|
|
97
|
+
description: string | null;
|
|
98
|
+
version: number;
|
|
99
|
+
outdated: boolean;
|
|
100
|
+
bundle_path: string;
|
|
101
|
+
enabled: boolean;
|
|
102
|
+
allowed_hosts: string[];
|
|
103
|
+
resource_collection_id: number;
|
|
104
|
+
bundle_hash: string | null;
|
|
105
|
+
created_at: string;
|
|
106
|
+
updated_at: string;
|
|
107
|
+
}>;
|
|
108
|
+
typedSchema: (slug: string, options?: RequestOptions | undefined) => Promise<string>;
|
|
109
|
+
delete: (slug: string, options?: RequestOptions | undefined) => Promise<void>;
|
|
110
|
+
};
|
|
111
|
+
//#endregion
|
|
112
|
+
export { dataAppResource };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
2
|
+
import { DataApp, DataAppEntry } from "../domain/data-app.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/resources/data-app.ts
|
|
5
|
+
const DATA_APPS_PATH = "/api/ee/apps";
|
|
6
|
+
function appPath(slug) {
|
|
7
|
+
return `${DATA_APPS_PATH}/${encodeURIComponent(slug)}`;
|
|
8
|
+
}
|
|
9
|
+
function dataAppResource(transport) {
|
|
10
|
+
const { explain } = explainer(transport, "dataApp");
|
|
11
|
+
/** List the data apps; `available` keeps only the enabled ones that aren't outdated. `GET /api/ee/apps` answers a bare array. */
|
|
12
|
+
async function list(filter = {}, options = {}) {
|
|
13
|
+
return {
|
|
14
|
+
data: await transport.requestParsed(z.array(DataAppEntry), DATA_APPS_PATH, {
|
|
15
|
+
...options,
|
|
16
|
+
query: { available: filter.available }
|
|
17
|
+
}),
|
|
18
|
+
total: null
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Get one data app by slug; admins read disabled apps too. */
|
|
22
|
+
async function get(slug, options = {}) {
|
|
23
|
+
return transport.requestParsed(DataAppEntry, appPath(slug), { ...options });
|
|
24
|
+
}
|
|
25
|
+
/** Create a data app with its resource collection and an empty bundle; it is disabled unless the body says otherwise. */
|
|
26
|
+
async function create(params, options = {}) {
|
|
27
|
+
return transport.requestParsed(DataApp, DATA_APPS_PATH, {
|
|
28
|
+
...options,
|
|
29
|
+
method: "POST",
|
|
30
|
+
body: params
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/** Update a data app's fields, or enable or disable it. */
|
|
34
|
+
async function update(slug, params, options = {}) {
|
|
35
|
+
return transport.requestParsed(DataApp, appPath(slug), {
|
|
36
|
+
...options,
|
|
37
|
+
method: "PUT",
|
|
38
|
+
body: params
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/** Replace a data app's bundle with the text of a built bundle. */
|
|
42
|
+
async function replaceBundle(slug, bundle, options = {}) {
|
|
43
|
+
return transport.requestParsed(DataApp, `${appPath(slug)}/bundle`, {
|
|
44
|
+
...options,
|
|
45
|
+
method: "PUT",
|
|
46
|
+
body: { bundle }
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/** The TypeScript module of the app's queries and actions: a `defineQuery` or `defineAction` call per question and action in its collection. */
|
|
50
|
+
async function typedSchema(slug, options = {}) {
|
|
51
|
+
return (await transport.requestRaw(`${appPath(slug)}/typed-schema`, {
|
|
52
|
+
...options,
|
|
53
|
+
expectContentType: "text"
|
|
54
|
+
})).text();
|
|
55
|
+
}
|
|
56
|
+
/** Delete a data app with its bundle, its collection and its group assignments. */
|
|
57
|
+
async function remove(slug, options = {}) {
|
|
58
|
+
await transport.requestRaw(appPath(slug), {
|
|
59
|
+
...options,
|
|
60
|
+
method: "DELETE",
|
|
61
|
+
expectContentType: "binary"
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
list: explain("list", list),
|
|
66
|
+
get: explain("get", get),
|
|
67
|
+
create: explain("create", create),
|
|
68
|
+
update: explain("update", update),
|
|
69
|
+
replaceBundle: explain("replaceBundle", replaceBundle),
|
|
70
|
+
typedSchema: explain("typedSchema", typedSchema),
|
|
71
|
+
delete: explain("delete", remove)
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { dataAppResource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as databaseResource, n as DatabaseListParams, r as DatabaseSyncSchemaParams, t as DatabaseGetParams } from "../database-
|
|
1
|
+
import { i as databaseResource, n as DatabaseListParams, r as DatabaseSyncSchemaParams, t as DatabaseGetParams } from "../database-B0JNZjDN.js";
|
|
2
2
|
export { DatabaseGetParams, DatabaseListParams, DatabaseSyncSchemaParams, databaseResource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as DatasetNativeParams, r as datasetResource, t as DatasetExportParams } from "../dataset-
|
|
1
|
+
import { n as DatasetNativeParams, r as datasetResource, t as DatasetExportParams } from "../dataset-BUirJ1rO.js";
|
|
2
2
|
export { DatasetExportParams, DatasetNativeParams, datasetResource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as dependencyResource, i as DependencyItemPageOptions, n as DependencyDependentsParams, r as DependencyItemListParams, t as DependencyBrokenParams } from "../dependency-
|
|
1
|
+
import { a as dependencyResource, i as DependencyItemPageOptions, n as DependencyDependentsParams, r as DependencyItemListParams, t as DependencyBrokenParams } from "../dependency-CzpXmeu7.js";
|
|
2
2
|
export { DependencyBrokenParams, DependencyDependentsParams, DependencyItemListParams, DependencyItemPageOptions, dependencyResource };
|
|
@@ -5,18 +5,24 @@ import { z } from "zod";
|
|
|
5
5
|
//#region src/resources/dependency.ts
|
|
6
6
|
const DependencyNodeApiList = z.array(DependencyNode);
|
|
7
7
|
const DependencyEntityApiList = z.array(DependencyEntity);
|
|
8
|
-
function
|
|
9
|
-
|
|
8
|
+
function entityTypeFeatures(type) {
|
|
9
|
+
if (type === "measure") return [{
|
|
10
10
|
feature: "measureDependencyGraph",
|
|
11
11
|
fields: ["type"]
|
|
12
|
-
}]
|
|
12
|
+
}];
|
|
13
|
+
if (type === "action") return [{
|
|
14
|
+
feature: "actionDependencyGraph",
|
|
15
|
+
fields: ["type"]
|
|
16
|
+
}];
|
|
17
|
+
return [];
|
|
13
18
|
}
|
|
14
19
|
function dependencyResource(transport) {
|
|
15
20
|
const { explain, explainWalk } = explainer(transport, "dependency");
|
|
16
21
|
/**
|
|
17
22
|
* The upstream dependency graph of one entity. `nodes` holds the starting entity plus every
|
|
18
23
|
* entity it depends on, directly or transitively; each edge runs from the dependent to what it
|
|
19
|
-
* depends on. A measure starts a graph only on a server with `measureDependencyGraph
|
|
24
|
+
* depends on. A measure starts a graph only on a server with `measureDependencyGraph`, and an
|
|
25
|
+
* action only on one with `actionDependencyGraph`.
|
|
20
26
|
*/
|
|
21
27
|
async function graph(type, id, options = {}) {
|
|
22
28
|
return transport.requestParsed(DependencyGraph, "/api/ee/dependencies/graph", {
|
|
@@ -124,9 +130,9 @@ function dependencyResource(transport) {
|
|
|
124
130
|
});
|
|
125
131
|
}
|
|
126
132
|
return {
|
|
127
|
-
graph: explain("graph", graph,
|
|
128
|
-
dependents: explain("dependents", dependents),
|
|
129
|
-
broken: explain("broken", broken),
|
|
133
|
+
graph: explain("graph", graph, entityTypeFeatures),
|
|
134
|
+
dependents: explain("dependents", dependents, entityTypeFeatures),
|
|
135
|
+
broken: explain("broken", broken, entityTypeFeatures),
|
|
130
136
|
unreferencedPages: explainWalk("unreferencedPages", unreferencedPages),
|
|
131
137
|
breakingPages: explainWalk("breakingPages", breakingPages)
|
|
132
138
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
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 DocumentUpdateInput, i as DocumentCreateInput, t as Document } from "../document-
|
|
3
|
+
import { a as DocumentUpdateInput, i as DocumentCreateInput, t as Document } from "../document-tLd6pYWe.js";
|
|
4
4
|
//#region src/resources/document.d.ts
|
|
5
5
|
declare function documentResource(transport: Transport): {
|
|
6
6
|
list: (options?: RequestOptions) => Promise<ListResult<Document>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
2
|
-
import { a as EidTranslateResult, i as EidTranslateInput } from "../eid-translation-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-BsXqRujn.js";
|
|
2
|
+
import { a as EidTranslateResult, i as EidTranslateInput } from "../eid-translation-CH6NPWd-.js";
|
|
3
3
|
//#region src/resources/eid-translation.d.ts
|
|
4
4
|
declare function eidTranslationResource(transport: Transport): {
|
|
5
5
|
translate: (params: EidTranslateInput, options?: RequestOptions) => Promise<EidTranslateResult>;
|
package/dist/resources/erd.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as erdResource, t as ErdParams } from "../erd-
|
|
1
|
+
import { n as erdResource, t as ErdParams } from "../erd-CbV7xvAc.js";
|
|
2
2
|
export { ErdParams, erdResource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FieldSetDataSensitivityParams, i as FieldSearchParams, n as FieldSearchBounded, o as fieldResource, r as FieldSearchByValue, t as FieldRemappingParams } from "../field-
|
|
1
|
+
import { a as FieldSetDataSensitivityParams, i as FieldSearchParams, n as FieldSearchBounded, o as fieldResource, r as FieldSearchByValue, t as FieldRemappingParams } from "../field-D1Pfk-0S.js";
|
|
2
2
|
export { FieldRemappingParams, FieldSearchBounded, FieldSearchByValue, FieldSearchParams, FieldSetDataSensitivityParams, fieldResource };
|
package/dist/resources/field.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FieldSearchMatches, FieldValues, FieldWithDataSensitivity, fieldDetailSchema, fieldRemappedValueSchema } from "../domain/field.js";
|
|
1
|
+
import { DATA_SENSITIVITY_GATE, FieldSearchMatches, FieldValues, FieldWithDataSensitivity, fieldDetailSchema, fieldRemappedValueSchema } from "../domain/field.js";
|
|
2
2
|
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
3
|
+
import { gateTriggered } from "../version/input-gates.js";
|
|
3
4
|
import { fetchOptionalParsed } from "./optional-parsed.js";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
//#region src/resources/field.ts
|
|
@@ -21,7 +22,7 @@ function fieldResource(transport) {
|
|
|
21
22
|
* the label is refused there before the wire. Answers the field the way `get` does.
|
|
22
23
|
*/
|
|
23
24
|
async function update(id, params, options = {}) {
|
|
24
|
-
await transport.requireFeatures(params.data_sensitivity
|
|
25
|
+
await transport.requireFeatures(gateTriggered(DATA_SENSITIVITY_GATE, params.data_sensitivity) ? [DATA_SENSITIVITY_GATE.feature] : [], options);
|
|
25
26
|
const { features } = await transport.server(options);
|
|
26
27
|
return transport.requestParsed(fieldDetailSchema(features), `/api/field/${id}`, {
|
|
27
28
|
...options,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SyncRemoteChangesParams, c as SyncWaitParams, i as SyncImportParams, l as gitSyncResource, n as SyncExportParams, o as SyncScopeCollection, r as SyncExportPreflightParams, s as SyncStashParams, t as SyncCreateBranchParams } from "../git-sync-
|
|
1
|
+
import { a as SyncRemoteChangesParams, c as SyncWaitParams, i as SyncImportParams, l as gitSyncResource, n as SyncExportParams, o as SyncScopeCollection, r as SyncExportPreflightParams, s as SyncStashParams, t as SyncCreateBranchParams } from "../git-sync-BTf1aYHr.js";
|
|
2
2
|
export { SyncCreateBranchParams, SyncExportParams, SyncExportPreflightParams, SyncImportParams, SyncRemoteChangesParams, SyncScopeCollection, SyncStashParams, SyncWaitParams, gitSyncResource };
|
|
@@ -3,8 +3,8 @@ import { ConfigError } from "../errors.js";
|
|
|
3
3
|
import { a as HttpError } from "../errors-DdMlaXqq.js";
|
|
4
4
|
import { profileFromProperties } from "../version/probe.js";
|
|
5
5
|
import { Collection } from "../domain/collection.js";
|
|
6
|
-
import { listCollectionsAs } from "./collection.js";
|
|
7
6
|
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
7
|
+
import { listCollectionsAs } from "./collection.js";
|
|
8
8
|
import { pollUntil } from "../poll.js";
|
|
9
9
|
import { fetchOptionalParsed } from "./optional-parsed.js";
|
|
10
10
|
import { RemoteSyncState, SyncBranchCreated, SyncDirtyItem, SyncExportPreflight, SyncRemoteChanges, SyncSettingsUpdateResult, SyncTask, isSyncTaskTerminal } from "../domain/git-sync.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as glossaryResource, t as GlossaryListParams } from "../glossary-
|
|
1
|
+
import { n as glossaryResource, t as GlossaryListParams } from "../glossary-DFvnz-E5.js";
|
|
2
2
|
export { GlossaryListParams, glossaryResource };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-BsXqRujn.js";
|
|
2
2
|
//#region src/resources/library.d.ts
|
|
3
3
|
declare function libraryResource(transport: Transport): {
|
|
4
4
|
get: (options?: RequestOptions | undefined) => Promise<{
|
|
@@ -20,7 +20,7 @@ declare function libraryResource(transport: Transport): {
|
|
|
20
20
|
is_personal?: boolean | undefined;
|
|
21
21
|
authority_level?: "official" | null | undefined;
|
|
22
22
|
type?: "library" | "instance-analytics" | "trash" | "library-data" | "library-metrics" | "library-dashboards" | "tenant-specific-root-collection" | null | undefined;
|
|
23
|
-
namespace?: "transforms" | "snippets" | "analytics" | "shared-tenant-collection" | "tenant-specific" | "data-
|
|
23
|
+
namespace?: "data-apps" | "transforms" | "snippets" | "analytics" | "shared-tenant-collection" | "tenant-specific" | "data-actions" | null | undefined;
|
|
24
24
|
entity_id?: string | null | undefined;
|
|
25
25
|
slug?: string | undefined;
|
|
26
26
|
can_write?: boolean | undefined;
|
|
@@ -45,7 +45,7 @@ declare function libraryResource(transport: Transport): {
|
|
|
45
45
|
is_personal?: boolean | undefined;
|
|
46
46
|
authority_level?: "official" | null | undefined;
|
|
47
47
|
type?: "library" | "instance-analytics" | "trash" | "library-data" | "library-metrics" | "library-dashboards" | "tenant-specific-root-collection" | null | undefined;
|
|
48
|
-
namespace?: "transforms" | "snippets" | "analytics" | "shared-tenant-collection" | "tenant-specific" | "data-
|
|
48
|
+
namespace?: "data-apps" | "transforms" | "snippets" | "analytics" | "shared-tenant-collection" | "tenant-specific" | "data-actions" | null | undefined;
|
|
49
49
|
entity_id?: string | null | undefined;
|
|
50
50
|
slug?: string | undefined;
|
|
51
51
|
can_write?: boolean | undefined;
|
|
@@ -69,7 +69,7 @@ declare function libraryResource(transport: Transport): {
|
|
|
69
69
|
is_personal?: boolean | undefined;
|
|
70
70
|
authority_level?: "official" | null | undefined;
|
|
71
71
|
type?: "library" | "instance-analytics" | "trash" | "library-data" | "library-metrics" | "library-dashboards" | "tenant-specific-root-collection" | null | undefined;
|
|
72
|
-
namespace?: "transforms" | "snippets" | "analytics" | "shared-tenant-collection" | "tenant-specific" | "data-
|
|
72
|
+
namespace?: "data-apps" | "transforms" | "snippets" | "analytics" | "shared-tenant-collection" | "tenant-specific" | "data-actions" | null | undefined;
|
|
73
73
|
entity_id?: string | null | undefined;
|
|
74
74
|
slug?: string | undefined;
|
|
75
75
|
can_write?: boolean | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TableSelectors } from "../domain/table.js";
|
|
2
2
|
import { Collection } from "../domain/collection.js";
|
|
3
|
-
import { listCollectionsAs } from "./collection.js";
|
|
4
3
|
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
5
|
-
import {
|
|
4
|
+
import { listCollectionsAs } from "./collection.js";
|
|
6
5
|
import { parseRequestBody } from "./request-body.js";
|
|
6
|
+
import { LibraryCollectionInfo, LibraryPublishTablesInput, libraryWireSchema, toLibrary } from "../domain/library.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region src/resources/library.ts
|
|
9
9
|
const LIBRARY_ROOT_PATH = "/api/ee/library/";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as measureResource, t as MeasureArchiveParams } from "../measure-
|
|
1
|
+
import { n as measureResource, t as MeasureArchiveParams } from "../measure-lPz8qnwz.js";
|
|
2
2
|
export { MeasureArchiveParams, measureResource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as metricResource, r as MetricDimensionListParams } from "../client-
|
|
1
|
+
import { i as metricResource, r as MetricDimensionListParams } from "../client-DdXLlH1B.js";
|
|
2
2
|
export { MetricDimensionListParams, metricResource };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-BsXqRujn.js";
|
|
2
2
|
//#region src/resources/moderation-review.d.ts
|
|
3
3
|
declare function moderationReviewResource(transport: Transport): {
|
|
4
4
|
create: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as notificationResource, n as assertCardAlert, r as mergeAlertUpdate, t as NotificationListParams } from "../notification-
|
|
1
|
+
import { i as notificationResource, n as assertCardAlert, r as mergeAlertUpdate, t as NotificationListParams } from "../notification-Cp5GJErS.js";
|
|
2
2
|
export { NotificationListParams, assertCardAlert, mergeAlertUpdate, notificationResource };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError } from "../errors.js";
|
|
2
|
-
import { CARD_PAYLOAD_TYPE, Notification, NotificationCardPayload } from "../domain/notification.js";
|
|
2
|
+
import { AnyNotification, CARD_PAYLOAD_TYPE, Notification, NotificationCardPayload } from "../domain/notification.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/resources/notification.ts
|
|
5
5
|
const NotificationApiList = z.array(Notification);
|
|
@@ -45,7 +45,7 @@ function notificationResource(transport) {
|
|
|
45
45
|
}
|
|
46
46
|
/** Get one question alert by id, refusing an id that names a system-event notification. */
|
|
47
47
|
async function get(id, options = {}) {
|
|
48
|
-
return assertCardAlert(await transport.requestParsed(
|
|
48
|
+
return assertCardAlert(await transport.requestParsed(AnyNotification, `/api/notification/${id}`, { ...options }));
|
|
49
49
|
}
|
|
50
50
|
/** Create a question alert — its card payload, schedules and handlers — from a full body. */
|
|
51
51
|
async function create(params, options = {}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as RequestOptions, g as TransportRequestOptions, h as Transport } from "../transport-
|
|
1
|
+
import { f as RequestOptions, g as TransportRequestOptions, h as Transport } from "../transport-BsXqRujn.js";
|
|
2
2
|
import { ZodType } from "zod";
|
|
3
3
|
//#region src/resources/optional-parsed.d.ts
|
|
4
4
|
type OptionalParsedOptions = RequestOptions & Pick<TransportRequestOptions, "query">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-BsXqRujn.js";
|
|
2
2
|
import { a as PermissionsGraph } from "../permission-BnCQw5Kp.js";
|
|
3
3
|
//#region src/resources/permission.d.ts
|
|
4
4
|
declare function permissionResource(transport: Transport): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-BsXqRujn.js";
|
|
1
2
|
import { n as ExportFormat } from "../query-Xsin530u.js";
|
|
2
|
-
import { f as RequestOptions, h as Transport } from "../transport-E0ZaPNWJ.js";
|
|
3
3
|
//#region src/resources/pivot-export.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Refuse a pivoted export the server would answer with plain rows: a JSON export keeps only the
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mergePulseUpdate, r as pulseResource, t as PulseListParams } from "../pulse-
|
|
1
|
+
import { n as mergePulseUpdate, r as pulseResource, t as PulseListParams } from "../pulse-BzKmz3Yn.js";
|
|
2
2
|
export { PulseListParams, mergePulseUpdate, pulseResource };
|
package/dist/resources/pulse.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { gateTriggered } from "../version/input-gates.js";
|
|
2
|
+
import { Pulse, SUBSCRIPTION_FILTERS_GATE } from "../domain/pulse.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
//#region src/resources/pulse.ts
|
|
4
5
|
const PulseApiList = z.array(Pulse);
|
|
@@ -61,7 +62,7 @@ function pulseResource(transport) {
|
|
|
61
62
|
return update(id, { archived: true }, options);
|
|
62
63
|
}
|
|
63
64
|
async function requireSubscriptionFilters(parameters, options) {
|
|
64
|
-
if (
|
|
65
|
+
if (gateTriggered(SUBSCRIPTION_FILTERS_GATE, parameters)) await transport.requireFeatures([SUBSCRIPTION_FILTERS_GATE.feature], options);
|
|
65
66
|
}
|
|
66
67
|
return {
|
|
67
68
|
list,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as replacementResource, t as ReplacementRunListParams } from "../replacement-
|
|
1
|
+
import { n as replacementResource, t as ReplacementRunListParams } from "../replacement-CVebCuNp.js";
|
|
2
2
|
export { ReplacementRunListParams, replacementResource };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
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/revision.d.ts
|
|
4
4
|
declare function revisionResource(transport: Transport): {
|
|
5
|
-
list: (entity: "card" | "dashboard" | "document" | "measure" | "segment" | "transform
|
|
5
|
+
list: (entity: "transform" | "card" | "dashboard" | "document" | "measure" | "segment" | "transform-test", id: number, options?: RequestOptions | undefined) => Promise<ListResult<{
|
|
6
6
|
[x: string]: unknown;
|
|
7
7
|
id: number;
|
|
8
8
|
timestamp: string;
|
|
@@ -23,7 +23,7 @@ declare function revisionResource(transport: Transport): {
|
|
|
23
23
|
};
|
|
24
24
|
}>>;
|
|
25
25
|
revert: (params: {
|
|
26
|
-
entity: "card" | "dashboard" | "document" | "measure" | "segment" | "transform
|
|
26
|
+
entity: "transform" | "card" | "dashboard" | "document" | "measure" | "segment" | "transform-test";
|
|
27
27
|
id: number;
|
|
28
28
|
revision_id: number;
|
|
29
29
|
}, options?: RequestOptions | undefined) => Promise<{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
2
|
-
import {
|
|
2
|
+
import { gateTriggered } from "../version/input-gates.js";
|
|
3
|
+
import { REVISION_ENTITY_GATES, Revision, RevisionRow } from "../domain/revision.js";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
//#region src/resources/revision.ts
|
|
5
6
|
const RevisionApiList = z.array(Revision);
|
|
@@ -10,17 +11,11 @@ const RevisionApiRevert = z.union([Revision.transform((revision) => ({
|
|
|
10
11
|
outcome: "unchanged",
|
|
11
12
|
revision
|
|
12
13
|
}))]);
|
|
13
|
-
const ENTITY_FEATURES = {
|
|
14
|
-
measure: "measures",
|
|
15
|
-
transform: "transforms",
|
|
16
|
-
"transform-test": "transformTests"
|
|
17
|
-
};
|
|
18
14
|
function entityFeatures(entity) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
feature,
|
|
15
|
+
return REVISION_ENTITY_GATES.filter((gate) => gateTriggered(gate, entity)).map((gate) => ({
|
|
16
|
+
feature: gate.feature,
|
|
22
17
|
fields: ["entity"]
|
|
23
|
-
}
|
|
18
|
+
}));
|
|
24
19
|
}
|
|
25
20
|
function revisionResource(transport) {
|
|
26
21
|
const { explain } = explainer(transport, "revision");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SearchParams, r as searchResource, t as SearchPage } from "../search-
|
|
1
|
+
import { n as SearchParams, r as searchResource, t as SearchPage } from "../search-Cten2h0I.js";
|
|
2
2
|
export { SearchPage, SearchParams, searchResource };
|
package/dist/resources/search.js
CHANGED
|
@@ -12,6 +12,25 @@ function verifiedFeatures(params = {}) {
|
|
|
12
12
|
fields: ["verified"]
|
|
13
13
|
}] : [];
|
|
14
14
|
}
|
|
15
|
+
const MODELS_FIELDS = ["models"];
|
|
16
|
+
const SEARCH_MODEL_FEATURES = {
|
|
17
|
+
measure: "measures",
|
|
18
|
+
transform: "transforms",
|
|
19
|
+
exploration: "explorations"
|
|
20
|
+
};
|
|
21
|
+
function modelFeatures(params) {
|
|
22
|
+
if (params.models === void 0) return [];
|
|
23
|
+
return params.models.flatMap((model) => {
|
|
24
|
+
const feature = SEARCH_MODEL_FEATURES[model];
|
|
25
|
+
return feature === void 0 ? [] : [{
|
|
26
|
+
feature,
|
|
27
|
+
fields: MODELS_FIELDS
|
|
28
|
+
}];
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function queryFeatures(params = {}) {
|
|
32
|
+
return [...verifiedFeatures(params), ...modelFeatures(params)];
|
|
33
|
+
}
|
|
15
34
|
function searchResource(transport) {
|
|
16
35
|
const { explain } = explainer(transport, "search");
|
|
17
36
|
/**
|
|
@@ -25,7 +44,9 @@ function searchResource(transport) {
|
|
|
25
44
|
* default), and `limit`/`offset` are the window the server applies before ranking hydration.
|
|
26
45
|
* `verified` needs the `content_verification` premium feature, and is refused before the wire
|
|
27
46
|
* without it: a server granting neither it nor `official_collections` refuses the filter, and one
|
|
28
|
-
* granting `official_collections` alone takes it without applying it.
|
|
47
|
+
* granting `official_collections` alone takes it without applying it. `models` takes `measure`
|
|
48
|
+
* only with `measures`, `transform` with `transforms` or on a Metabase 58 enterprise build, and
|
|
49
|
+
* `exploration` only with `explorations`.
|
|
29
50
|
*/
|
|
30
51
|
async function query(params = {}, options = {}) {
|
|
31
52
|
await transport.requireFeatures(verifiedFeatures(params).map((requirement) => requirement.feature), options);
|
|
@@ -51,7 +72,7 @@ function searchResource(transport) {
|
|
|
51
72
|
total: response.total
|
|
52
73
|
};
|
|
53
74
|
}
|
|
54
|
-
return { query: explain("query", query,
|
|
75
|
+
return { query: explain("query", query, queryFeatures) };
|
|
55
76
|
}
|
|
56
77
|
//#endregion
|
|
57
78
|
export { searchResource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as segmentResource, t as SegmentArchiveParams } from "../segment-
|
|
1
|
+
import { n as segmentResource, t as SegmentArchiveParams } from "../segment-DQLX6r1E.js";
|
|
2
2
|
export { SegmentArchiveParams, segmentResource };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
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
|
import { t as Setting } from "../setting-DXuQGXGF.js";
|
|
4
4
|
//#region src/resources/setting.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
2
|
-
import { n as SetupResult, t as SetupInput } from "../setup-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-BsXqRujn.js";
|
|
2
|
+
import { n as SetupResult, t as SetupInput } from "../setup-JqcJ2unJ.js";
|
|
3
3
|
//#region src/resources/setup.d.ts
|
|
4
4
|
declare function setupResource(transport: Transport): {
|
|
5
5
|
create: (params: SetupInput, options?: RequestOptions) => Promise<SetupResult>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as snippetResource, t as SnippetListParams } from "../snippet-
|
|
1
|
+
import { n as snippetResource, t as SnippetListParams } from "../snippet-Djn0rL21.js";
|
|
2
2
|
export { SnippetListParams, snippetResource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as tableResource, t as TableListParams } from "../table-
|
|
1
|
+
import { n as tableResource, t as TableListParams } from "../table-CDZbLNow.js";
|
|
2
2
|
export { TableListParams, tableResource };
|