@metabase/client 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +10 -6
- package/dist/api-key-DJeN1-7G.d.ts +46 -0
- package/dist/auth/credential.d.ts +1 -1
- package/dist/auth/oauth-login.d.ts +1 -1
- package/dist/auth/oauth-login.js +1 -1
- package/dist/auth/oauth-session.d.ts +1 -1
- package/dist/{card-BZx4NSr-.d.ts → card-CbV6hLYH.d.ts} +4 -4
- package/dist/{card-B6merEUN.d.ts → card-CrSywvOt.d.ts} +18 -18
- package/dist/{client-DNRvXFRm.d.ts → client-cBi6_RQs.d.ts} +289 -185
- package/dist/client.d.ts +1 -1
- package/dist/client.js +4 -0
- package/dist/{collection-Bib61WiV.d.ts → collection-Bmtisr3r.d.ts} +47 -47
- package/dist/{collection-CqtGPi4W.d.ts → collection-Q9FNMiRh.d.ts} +18 -4
- package/dist/{credential-6aOEGqMH.d.ts → credential-B6fKSvqp.d.ts} +1 -1
- package/dist/{dashboard-XTe46250.d.ts → dashboard-CknUcTp8.d.ts} +3 -3
- package/dist/{dashboard-z9i1VUZC.d.ts → dashboard-DBdEehA9.d.ts} +33 -25
- package/dist/{data-action-rS27f2Ji.d.ts → data-action-CqqZ0JYg.d.ts} +6 -4
- package/dist/data-app-MoMS9VUr.d.ts +76 -0
- package/dist/{database-DqTespfa.d.ts → database-Bs5WQOOZ.d.ts} +3 -3
- package/dist/{database-BLUMlywE.d.ts → database-CYNLJ8AZ.d.ts} +18 -18
- package/dist/{dataset-C6lX1-cr.d.ts → dataset-cg8ZZrOP.d.ts} +85 -85
- package/dist/{dataset-Cj3XuKLe.d.ts → dataset-dzWljE_C.d.ts} +3 -3
- package/dist/{dependency-fN5_7a22.d.ts → dependency-CL-YG9KH.d.ts} +26 -26
- package/dist/{dependency-D8Qs5Xdx.d.ts → dependency-VqvLTDAU.d.ts} +248 -196
- 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/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/moderation-review.d.ts +1 -1
- package/dist/domain/notification.d.ts +2 -2
- package/dist/domain/notification.js +6 -1
- package/dist/domain/parameter.d.ts +1 -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-dag-run.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-aQSffx0o.d.ts} +40 -40
- package/dist/{erd-BujD227Y.d.ts → erd-DCgdEC2S.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-ozrfbvUd.d.ts} +2 -2
- package/dist/{field-BCRO19mk.d.ts → field-tqQPtVuR.d.ts} +9 -7
- package/dist/{git-sync-gAMKsZgN.d.ts → git-sync-5lFWX1ds.d.ts} +3 -3
- package/dist/{git-sync-DNXrNVCW.d.ts → git-sync-QL9Nu6gP.d.ts} +10 -10
- package/dist/{glossary-CqFlzW33.d.ts → glossary-DwS7QVrl.d.ts} +1 -1
- package/dist/http/errors.d.ts +1 -1
- package/dist/http/oauth.d.ts +1 -1
- package/dist/http/oauth.js +47 -36
- package/dist/http/transport.d.ts +1 -1
- package/dist/index.d.ts +48 -46
- package/dist/index.js +8 -6
- 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-DwGOvRtS.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-CuMqPbQX.d.ts → measure-CInoXeyH.d.ts} +1 -1
- package/dist/{measure-KuXdjZYJ.d.ts → measure-CgH14YQZ.d.ts} +1 -1
- package/dist/{metric-yvehaVCS.d.ts → metric-CYOmbcM5.d.ts} +10 -10
- package/dist/{moderation-review-B4RUTZ6_.d.ts → moderation-review-CWUQ3_HL.d.ts} +4 -4
- package/dist/{notification-BT2TDAd_.d.ts → notification-BY2JEjKp.d.ts} +68 -4
- package/dist/{notification-BiegPoSD.d.ts → notification-D-Hp82Pn.d.ts} +3 -3
- package/dist/{oauth-C4ordeoJ.d.ts → oauth-CVoZpuq8.d.ts} +4 -2
- package/dist/{oauth-login-D734Jvbq.js → oauth-login--tDagiZu.js} +29 -11
- package/dist/{oauth-login-CJsT_3EE.d.ts → oauth-login-SZ4Csai8.d.ts} +3 -2
- package/dist/{oauth-session-BlIlcd8Q.d.ts → oauth-session-COLH4puN.d.ts} +1 -1
- package/dist/{paginate-DZWvWvbm.d.ts → paginate-CaJ5usdp.d.ts} +1 -1
- package/dist/paginate.d.ts +1 -1
- package/dist/{parameter-ak-J-IOj.d.ts → parameter-BYo7uR-J.d.ts} +2 -2
- package/dist/{pulse-dylocLd9.d.ts → pulse-BTpSNxhT.d.ts} +2 -2
- package/dist/{pulse-CMc1Rwdj.d.ts → pulse-BUlfrJZH.d.ts} +23 -21
- package/dist/{replacement-CyvtbxGg.d.ts → replacement-BQian4vA.d.ts} +23 -23
- package/dist/{replacement-S9U3gApY.d.ts → replacement-Dbtvvrmz.d.ts} +11 -11
- package/dist/{requirement-check-CIA5IHC1.d.ts → requirement-check-CHHEHXcj.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 +35 -6
- 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 +3 -10
- 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 +2 -2
- package/dist/resources/transform-inspector.d.ts +4 -4
- 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-DNEw6S93.d.ts} +7 -5
- package/dist/{search-BxJipLN6.d.ts → search-BQWkdVg1.d.ts} +2 -2
- package/dist/{search-NZR6iRBs.d.ts → search-tK5lmRb8.d.ts} +23 -23
- package/dist/{segment-pj3wklGe.d.ts → segment-CbAgVO-5.d.ts} +1 -1
- package/dist/{segment-D2i34X9l.d.ts → segment-jyhBtOAZ.d.ts} +2 -2
- package/dist/{setup-Ez_U7GmM.d.ts → setup-JqcJ2unJ.d.ts} +1 -1
- package/dist/signal.d.ts +3 -2
- package/dist/signal.js +9 -4
- package/dist/{snippet-hEV429Pv.d.ts → snippet-C_Ilx7tR.d.ts} +2 -2
- package/dist/{snippet-RnnWa4TL.d.ts → snippet-DsgohpTV.d.ts} +2 -2
- package/dist/{table-B_lfuaHc.d.ts → table-B1pQSpTA.d.ts} +14 -14
- package/dist/{table-B3-UaPHa.d.ts → table-BAl8aPZZ.d.ts} +49 -44
- package/dist/{timeline-C2IEcRlP.d.ts → timeline-BdLvwRnl.d.ts} +2 -2
- package/dist/{timeline-folD3mQ_.d.ts → timeline-BfX1lMob.d.ts} +24 -24
- package/dist/{transform-CXOT5kFe.d.ts → transform-Ds74yPiY.d.ts} +48 -34
- package/dist/{transform-CDurgE1D.d.ts → transform-DwnIcpqV.d.ts} +153 -37
- package/dist/{transform-dag-run-BgZwv1yx.d.ts → transform-dag-run-BSrdrjaK.d.ts} +4 -4
- package/dist/{transform-inspector-BUYBt6--.d.ts → transform-inspector-BMaRqcRM.d.ts} +8 -8
- package/dist/{transform-job-29P6BULe.d.ts → transform-job-C85GxBHj.d.ts} +9 -9
- package/dist/{transform-job-CTJImaOd.d.ts → transform-job-Dfp9Ox0l.d.ts} +7 -5
- 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-C3hiZ4AV.d.ts} +2 -2
- package/dist/{transform-test-BwuyrHpT.d.ts → transform-test-DROPvrkI.d.ts} +2 -2
- package/dist/{transport-E0ZaPNWJ.d.ts → transport-CS11mEqI.d.ts} +20 -6
- package/dist/{upload-B7PG3ePk.d.ts → upload-Bx1D7eNy.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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-CS11mEqI.js";
|
|
2
2
|
import { t as ListResult } from "../list-BT_bBm9Z.js";
|
|
3
|
-
import { a as
|
|
3
|
+
import { a as DataActionExecuteInput, c as DataActionUpdateInput, n as DataAction, o as DataActionExecuteResult } from "../data-action-CqqZ0JYg.js";
|
|
4
4
|
//#region src/resources/data-action.d.ts
|
|
5
5
|
declare function dataActionResource(transport: Transport): {
|
|
6
6
|
list: (options?: RequestOptions) => Promise<ListResult<DataAction>>;
|
|
@@ -51,52 +51,7 @@ declare function dataActionResource(transport: Transport): {
|
|
|
51
51
|
database_id?: number | null | undefined;
|
|
52
52
|
dataset_query?: unknown;
|
|
53
53
|
}>;
|
|
54
|
-
update: (id: number, params:
|
|
55
|
-
name?: string | undefined;
|
|
56
|
-
database_id?: number | undefined;
|
|
57
|
-
dataset_query?: {
|
|
58
|
-
[x: string]: unknown;
|
|
59
|
-
} | undefined;
|
|
60
|
-
parameters?: {
|
|
61
|
-
[x: string]: unknown;
|
|
62
|
-
id: string;
|
|
63
|
-
type: string;
|
|
64
|
-
target: unknown;
|
|
65
|
-
name?: string | undefined;
|
|
66
|
-
slug?: string | undefined;
|
|
67
|
-
required?: boolean | undefined;
|
|
68
|
-
}[] | undefined;
|
|
69
|
-
collection_id?: number | null | undefined;
|
|
70
|
-
description?: string | null | undefined;
|
|
71
|
-
visualization_settings?: unknown;
|
|
72
|
-
archived?: boolean | undefined;
|
|
73
|
-
}, options?: RequestOptions | undefined) => Promise<{
|
|
74
|
-
[x: string]: unknown;
|
|
75
|
-
id: number;
|
|
76
|
-
name: string;
|
|
77
|
-
description: string | null;
|
|
78
|
-
type: string;
|
|
79
|
-
model_id: number | null;
|
|
80
|
-
parameters: {
|
|
81
|
-
[x: string]: unknown;
|
|
82
|
-
id: string;
|
|
83
|
-
type: string;
|
|
84
|
-
name?: string | undefined;
|
|
85
|
-
slug?: string | undefined;
|
|
86
|
-
target?: unknown;
|
|
87
|
-
required?: boolean | undefined;
|
|
88
|
-
}[] | null;
|
|
89
|
-
visualization_settings: unknown;
|
|
90
|
-
archived: boolean;
|
|
91
|
-
public_uuid: string | null;
|
|
92
|
-
entity_id: string | null;
|
|
93
|
-
creator_id: number;
|
|
94
|
-
created_at: string;
|
|
95
|
-
updated_at: string;
|
|
96
|
-
collection_id: number | null;
|
|
97
|
-
database_id?: number | null | undefined;
|
|
98
|
-
dataset_query?: unknown;
|
|
99
|
-
}>;
|
|
54
|
+
update: (id: number, params: DataActionUpdateInput, options?: RequestOptions) => Promise<DataAction>;
|
|
100
55
|
archive: (id: number, options?: RequestOptions) => Promise<DataAction>;
|
|
101
56
|
delete: (id: number, options?: RequestOptions) => Promise<void>;
|
|
102
57
|
execute: (id: number, params: DataActionExecuteInput, options?: RequestOptions) => Promise<DataActionExecuteResult>;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
2
|
-
import { DataActionExecuteResult, dataActionSchema } from "../domain/data-action.js";
|
|
2
|
+
import { DATA_ACTION_COLLECTION_GATE, DataActionExecuteResult, dataActionSchema } from "../domain/data-action.js";
|
|
3
|
+
import { gateTriggered } from "../version/input-gates.js";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
//#region src/resources/data-action.ts
|
|
5
|
-
function collectionFeatures(params) {
|
|
6
|
-
return params.collection_id === void 0 ? [] : [{
|
|
7
|
-
feature: "dataActionCollections",
|
|
8
|
-
fields: ["collection_id"]
|
|
9
|
-
}];
|
|
10
|
-
}
|
|
11
6
|
function dataActionResource(transport) {
|
|
12
7
|
const { explain } = explainer(transport, "dataAction");
|
|
13
8
|
async function readSchema(options) {
|
|
@@ -36,8 +31,13 @@ function dataActionResource(transport) {
|
|
|
36
31
|
body: params
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Update a data action by id, patching only the fields the body carries. A server whose data
|
|
36
|
+
* actions have no collection never moves the action, and from 58.31 it strips the undeclared key and
|
|
37
|
+
* answers as if it had. So the field is refused there before the wire.
|
|
38
|
+
*/
|
|
40
39
|
async function update(id, params, options = {}) {
|
|
40
|
+
await transport.requireFeatures(gateTriggered(DATA_ACTION_COLLECTION_GATE, params.collection_id) ? [DATA_ACTION_COLLECTION_GATE.feature] : [], options);
|
|
41
41
|
const schema = await readSchema(options);
|
|
42
42
|
return transport.requestParsed(schema, `/api/action/${id}`, {
|
|
43
43
|
...options,
|
|
@@ -69,7 +69,7 @@ function dataActionResource(transport) {
|
|
|
69
69
|
list,
|
|
70
70
|
get,
|
|
71
71
|
create: explain("create", create),
|
|
72
|
-
update
|
|
72
|
+
update,
|
|
73
73
|
archive,
|
|
74
74
|
delete: remove,
|
|
75
75
|
execute
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-CS11mEqI.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-Bs5WQOOZ.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-dzWljE_C.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-CL-YG9KH.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-CS11mEqI.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>>;
|
|
@@ -22,14 +22,7 @@ declare function documentResource(transport: Transport): {
|
|
|
22
22
|
text?: string | undefined;
|
|
23
23
|
attrs?: Record<string, unknown> | undefined;
|
|
24
24
|
marks?: Record<string, unknown>[] | undefined;
|
|
25
|
-
content?:
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
type: string;
|
|
28
|
-
text?: string | undefined;
|
|
29
|
-
attrs?: Record<string, unknown> | undefined;
|
|
30
|
-
marks?: Record<string, unknown>[] | undefined;
|
|
31
|
-
content?: /*elided*/ any[] | undefined;
|
|
32
|
-
}[] | undefined;
|
|
25
|
+
content?: /*elided*/ any[] | undefined;
|
|
33
26
|
} | null;
|
|
34
27
|
entity_id: string | null;
|
|
35
28
|
collection_id: number | null;
|
|
@@ -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-CS11mEqI.js";
|
|
2
|
+
import { a as EidTranslateResult, i as EidTranslateInput } from "../eid-translation-aQSffx0o.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-DCgdEC2S.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-ozrfbvUd.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-5lFWX1ds.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-DwS7QVrl.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-CS11mEqI.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-CInoXeyH.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-cBi6_RQs.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-CS11mEqI.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-D-Hp82Pn.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-CS11mEqI.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-CS11mEqI.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-CS11mEqI.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-BTpSNxhT.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-Dbtvvrmz.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-CS11mEqI.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-BQWkdVg1.js";
|
|
2
2
|
export { SearchPage, SearchParams, searchResource };
|