@metabase/client 0.0.0-stage → 0.1.0
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 +7 -0
- package/LICENSE +661 -0
- package/README.md +488 -2
- package/dist/auth/credential.d.ts +2 -0
- package/dist/auth/credential.js +61 -0
- package/dist/auth/oauth-login.d.ts +2 -0
- package/dist/auth/oauth-login.js +2 -0
- package/dist/auth/oauth-session.d.ts +2 -0
- package/dist/auth/oauth-session.js +31 -0
- package/dist/card-B6merEUN.d.ts +1392 -0
- package/dist/card-BZx4NSr-.d.ts +33 -0
- package/dist/client-DNRvXFRm.d.ts +3276 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +95 -0
- package/dist/collection-Bib61WiV.d.ts +294 -0
- package/dist/collection-CqtGPi4W.d.ts +39 -0
- package/dist/content-translation-zfUkE_OG.d.ts +8 -0
- package/dist/credential-6aOEGqMH.d.ts +30 -0
- package/dist/cron-DThzerR6.d.ts +9 -0
- package/dist/csv-upload--K35QedP.d.ts +8 -0
- package/dist/dashboard-XTe46250.d.ts +38 -0
- package/dist/dashboard-z9i1VUZC.d.ts +970 -0
- package/dist/data-action-rS27f2Ji.d.ts +95 -0
- package/dist/database-BLUMlywE.d.ts +997 -0
- package/dist/database-DqTespfa.d.ts +27 -0
- package/dist/dataset-C6lX1-cr.d.ts +4144 -0
- package/dist/dataset-Cj3XuKLe.d.ts +23 -0
- package/dist/dependency-D8Qs5Xdx.d.ts +827 -0
- package/dist/dependency-fN5_7a22.d.ts +299 -0
- package/dist/document-oZNDbDfx.d.ts +115 -0
- package/dist/domain/card.d.ts +2 -0
- package/dist/domain/card.js +140 -0
- package/dist/domain/collection.d.ts +2 -0
- package/dist/domain/collection.js +137 -0
- package/dist/domain/content-translation.d.ts +2 -0
- package/dist/domain/content-translation.js +5 -0
- package/dist/domain/cron.d.ts +2 -0
- package/dist/domain/cron.js +5 -0
- package/dist/domain/dashboard.d.ts +2 -0
- package/dist/domain/dashboard.js +194 -0
- package/dist/domain/data-action.d.ts +2 -0
- package/dist/domain/data-action.js +85 -0
- package/dist/domain/database.d.ts +2 -0
- package/dist/domain/database.js +56 -0
- package/dist/domain/dataset.d.ts +2 -0
- package/dist/domain/dataset.js +56 -0
- package/dist/domain/dependency.d.ts +2 -0
- package/dist/domain/dependency.js +165 -0
- package/dist/domain/document.d.ts +2 -0
- package/dist/domain/document.js +94 -0
- package/dist/domain/eid-translation.d.ts +2 -0
- package/dist/domain/eid-translation.js +36 -0
- package/dist/domain/embedding.d.ts +2 -0
- package/dist/domain/embedding.js +9 -0
- package/dist/domain/erd.d.ts +2 -0
- package/dist/domain/erd.js +45 -0
- package/dist/domain/field.d.ts +2 -0
- package/dist/domain/field.js +268 -0
- package/dist/domain/git-sync.d.ts +2 -0
- package/dist/domain/git-sync.js +147 -0
- package/dist/domain/glossary.d.ts +2 -0
- package/dist/domain/glossary.js +30 -0
- package/dist/domain/library.d.ts +2 -0
- package/dist/domain/library.js +83 -0
- package/dist/domain/measure.d.ts +2 -0
- package/dist/domain/measure.js +41 -0
- package/dist/domain/metric.d.ts +2 -0
- package/dist/domain/metric.js +139 -0
- package/dist/domain/moderation-review.d.ts +2 -0
- package/dist/domain/moderation-review.js +31 -0
- package/dist/domain/notification.d.ts +2 -0
- package/dist/domain/notification.js +138 -0
- package/dist/domain/parameter.d.ts +2 -0
- package/dist/domain/parameter.js +109 -0
- package/dist/domain/permission.d.ts +2 -0
- package/dist/domain/permission.js +36 -0
- package/dist/domain/pulse.d.ts +2 -0
- package/dist/domain/pulse.js +133 -0
- package/dist/domain/query.d.ts +2 -0
- package/dist/domain/query.js +13 -0
- package/dist/domain/replacement.d.ts +2 -0
- package/dist/domain/replacement.js +93 -0
- package/dist/domain/revision.d.ts +2 -0
- package/dist/domain/revision.js +63 -0
- package/dist/domain/search.d.ts +2 -0
- package/dist/domain/search.js +63 -0
- package/dist/domain/segment.d.ts +2 -0
- package/dist/domain/segment.js +44 -0
- package/dist/domain/session-properties.d.ts +2 -0
- package/dist/domain/session-properties.js +14 -0
- package/dist/domain/setting.d.ts +2 -0
- package/dist/domain/setting.js +22 -0
- package/dist/domain/setup.d.ts +2 -0
- package/dist/domain/setup.js +21 -0
- package/dist/domain/snippet.d.ts +2 -0
- package/dist/domain/snippet.js +38 -0
- package/dist/domain/table.d.ts +2 -0
- package/dist/domain/table.js +156 -0
- package/dist/domain/text.d.ts +5 -0
- package/dist/domain/text.js +6 -0
- package/dist/domain/timeline.d.ts +2 -0
- package/dist/domain/timeline.js +97 -0
- package/dist/domain/transform-dag-run.d.ts +2 -0
- package/dist/domain/transform-dag-run.js +19 -0
- package/dist/domain/transform-inspector.d.ts +2 -0
- package/dist/domain/transform-inspector.js +142 -0
- package/dist/domain/transform-job.d.ts +2 -0
- package/dist/domain/transform-job.js +109 -0
- package/dist/domain/transform-python.d.ts +2 -0
- package/dist/domain/transform-python.js +39 -0
- package/dist/domain/transform-tag.d.ts +2 -0
- package/dist/domain/transform-tag.js +17 -0
- package/dist/domain/transform-test.d.ts +2 -0
- package/dist/domain/transform-test.js +176 -0
- package/dist/domain/transform.d.ts +2 -0
- package/dist/domain/transform.js +235 -0
- package/dist/domain/upload.d.ts +2 -0
- package/dist/domain/upload.js +13 -0
- package/dist/domain/user.d.ts +2 -0
- package/dist/domain/user.js +16 -0
- package/dist/eid-translation-nuhr8St2.d.ts +143 -0
- package/dist/embedding-Cz3RUJYf.d.ts +10 -0
- package/dist/erd-BdeFEeSy.d.ts +842 -0
- package/dist/erd-BujD227Y.d.ts +51 -0
- package/dist/errors-DdMlaXqq.js +330 -0
- package/dist/errors.d.ts +2 -0
- package/dist/errors.js +189 -0
- package/dist/features-CnFkUCj2.d.ts +261 -0
- package/dist/field-BCRO19mk.d.ts +2547 -0
- package/dist/field-Bqn10Fq_.d.ts +50 -0
- package/dist/git-sync-DNXrNVCW.d.ts +258 -0
- package/dist/git-sync-gAMKsZgN.d.ts +205 -0
- package/dist/glossary-CHK3elPj.d.ts +35 -0
- package/dist/glossary-CqFlzW33.d.ts +15 -0
- package/dist/http/errors.d.ts +2 -0
- package/dist/http/errors.js +2 -0
- package/dist/http/oauth.d.ts +2 -0
- package/dist/http/oauth.js +201 -0
- package/dist/http/retry.d.ts +19 -0
- package/dist/http/retry.js +33 -0
- package/dist/http/transport.d.ts +2 -0
- package/dist/http/transport.js +2 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.js +62 -0
- package/dist/json-CZvjc3--.d.ts +19 -0
- package/dist/json-pointer.d.ts +4 -0
- package/dist/json-pointer.js +7 -0
- package/dist/json.d.ts +2 -0
- package/dist/json.js +44 -0
- package/dist/known-range-DTOBgTEC.d.ts +7 -0
- package/dist/library-Cx9h_RkU.d.ts +228 -0
- package/dist/list-BT_bBm9Z.d.ts +7 -0
- package/dist/list.d.ts +2 -0
- package/dist/list.js +1 -0
- package/dist/measure-CuMqPbQX.d.ts +108 -0
- package/dist/measure-KuXdjZYJ.d.ts +44 -0
- package/dist/metric-yvehaVCS.d.ts +2655 -0
- package/dist/moderation-review-B4RUTZ6_.d.ts +56 -0
- package/dist/network-error-5g4U1iul.js +62 -0
- package/dist/notification-BT2TDAd_.d.ts +379 -0
- package/dist/notification-BiegPoSD.d.ts +22 -0
- package/dist/oauth-C4ordeoJ.d.ts +59 -0
- package/dist/oauth-login-CJsT_3EE.d.ts +19 -0
- package/dist/oauth-login-D734Jvbq.js +179 -0
- package/dist/oauth-session-BlIlcd8Q.d.ts +6 -0
- package/dist/paginate-DZWvWvbm.d.ts +24 -0
- package/dist/paginate.d.ts +2 -0
- package/dist/paginate.js +49 -0
- package/dist/parameter-ak-J-IOj.d.ts +190 -0
- package/dist/permission-BnCQw5Kp.d.ts +149 -0
- package/dist/poll-CIwnee7h.d.ts +15 -0
- package/dist/poll.d.ts +2 -0
- package/dist/poll.js +47 -0
- package/dist/predicates.d.ts +10 -0
- package/dist/predicates.js +18 -0
- package/dist/pulse-CMc1Rwdj.d.ts +596 -0
- package/dist/pulse-dylocLd9.d.ts +18 -0
- package/dist/query-Xsin530u.d.ts +23 -0
- package/dist/refusal-B9aeHMc9.js +130 -0
- package/dist/replacement-CyvtbxGg.d.ts +2467 -0
- package/dist/replacement-S9U3gApY.d.ts +128 -0
- package/dist/requirement-check-CIA5IHC1.d.ts +17 -0
- package/dist/requirements-C0txASN8.d.ts +217 -0
- package/dist/resources/card.d.ts +2 -0
- package/dist/resources/card.js +103 -0
- package/dist/resources/collection.d.ts +2 -0
- package/dist/resources/collection.js +110 -0
- package/dist/resources/content-translation.d.ts +11 -0
- package/dist/resources/content-translation.js +27 -0
- package/dist/resources/csv-upload.d.ts +2 -0
- package/dist/resources/csv-upload.js +9 -0
- package/dist/resources/dashboard.d.ts +2 -0
- package/dist/resources/dashboard.js +218 -0
- package/dist/resources/data-action.d.ts +105 -0
- package/dist/resources/data-action.js +79 -0
- package/dist/resources/database.d.ts +2 -0
- package/dist/resources/database.js +103 -0
- package/dist/resources/dataset.d.ts +2 -0
- package/dist/resources/dataset.js +81 -0
- package/dist/resources/dependency.d.ts +2 -0
- package/dist/resources/dependency.js +150 -0
- package/dist/resources/document.d.ts +55 -0
- package/dist/resources/document.js +60 -0
- package/dist/resources/eid-translation.d.ts +8 -0
- package/dist/resources/eid-translation.js +19 -0
- package/dist/resources/erd.d.ts +2 -0
- package/dist/resources/erd.js +26 -0
- package/dist/resources/field.d.ts +2 -0
- package/dist/resources/field.js +98 -0
- package/dist/resources/git-sync.d.ts +2 -0
- package/dist/resources/git-sync.js +362 -0
- package/dist/resources/glossary.d.ts +2 -0
- package/dist/resources/glossary.js +51 -0
- package/dist/resources/library.d.ts +85 -0
- package/dist/resources/library.js +90 -0
- package/dist/resources/measure.d.ts +2 -0
- package/dist/resources/measure.js +57 -0
- package/dist/resources/metric.d.ts +2 -0
- package/dist/resources/metric.js +50 -0
- package/dist/resources/moderation-review.d.ts +23 -0
- package/dist/resources/moderation-review.js +24 -0
- package/dist/resources/notification.d.ts +2 -0
- package/dist/resources/notification.js +93 -0
- package/dist/resources/optional-parsed.d.ts +7 -0
- package/dist/resources/optional-parsed.js +14 -0
- package/dist/resources/permission.d.ts +10 -0
- package/dist/resources/permission.js +31 -0
- package/dist/resources/pivot-export.d.ts +10 -0
- package/dist/resources/pivot-export.js +16 -0
- package/dist/resources/pulse.d.ts +2 -0
- package/dist/resources/pulse.js +75 -0
- package/dist/resources/replacement.d.ts +2 -0
- package/dist/resources/replacement.js +82 -0
- package/dist/resources/request-body.d.ts +9 -0
- package/dist/resources/request-body.js +13 -0
- package/dist/resources/revision.d.ts +70 -0
- package/dist/resources/revision.js +51 -0
- package/dist/resources/search.d.ts +2 -0
- package/dist/resources/search.js +57 -0
- package/dist/resources/segment.d.ts +2 -0
- package/dist/resources/segment.js +55 -0
- package/dist/resources/setting.d.ts +11 -0
- package/dist/resources/setting.js +43 -0
- package/dist/resources/setup.d.ts +8 -0
- package/dist/resources/setup.js +18 -0
- package/dist/resources/snippet.d.ts +2 -0
- package/dist/resources/snippet.js +52 -0
- package/dist/resources/table.d.ts +2 -0
- package/dist/resources/table.js +275 -0
- package/dist/resources/timeline-event.d.ts +12 -0
- package/dist/resources/timeline-event.js +51 -0
- package/dist/resources/timeline.d.ts +2 -0
- package/dist/resources/timeline.js +82 -0
- package/dist/resources/transform-dag-run.d.ts +22 -0
- package/dist/resources/transform-dag-run.js +32 -0
- package/dist/resources/transform-inspector.d.ts +214 -0
- package/dist/resources/transform-inspector.js +47 -0
- package/dist/resources/transform-job.d.ts +2 -0
- package/dist/resources/transform-job.js +90 -0
- package/dist/resources/transform-python.d.ts +52 -0
- package/dist/resources/transform-python.js +56 -0
- package/dist/resources/transform-tag.d.ts +35 -0
- package/dist/resources/transform-tag.js +47 -0
- package/dist/resources/transform-test.d.ts +2 -0
- package/dist/resources/transform-test.js +75 -0
- package/dist/resources/transform.d.ts +2 -0
- package/dist/resources/transform.js +217 -0
- package/dist/resources/upload.d.ts +2 -0
- package/dist/resources/upload.js +48 -0
- package/dist/resources/user.d.ts +8 -0
- package/dist/resources/user.js +11 -0
- package/dist/revision-CQBPhohA.d.ts +104 -0
- package/dist/search-BxJipLN6.d.ts +26 -0
- package/dist/search-NZR6iRBs.d.ts +92 -0
- package/dist/segment-D2i34X9l.d.ts +16 -0
- package/dist/segment-pj3wklGe.d.ts +47 -0
- package/dist/session-properties-COtlxAcK.d.ts +15 -0
- package/dist/setting-DXuQGXGF.d.ts +25 -0
- package/dist/setup-Ez_U7GmM.d.ts +26 -0
- package/dist/signal.d.ts +8 -0
- package/dist/signal.js +25 -0
- package/dist/snippet-RnnWa4TL.d.ts +16 -0
- package/dist/snippet-hEV429Pv.d.ts +41 -0
- package/dist/table-B3-UaPHa.d.ts +3229 -0
- package/dist/table-B_lfuaHc.d.ts +176 -0
- package/dist/tag-qzjGGci8.d.ts +48 -0
- package/dist/timeline-C2IEcRlP.d.ts +21 -0
- package/dist/timeline-folD3mQ_.d.ts +218 -0
- package/dist/transform-CDurgE1D.d.ts +443 -0
- package/dist/transform-CXOT5kFe.d.ts +638 -0
- package/dist/transform-dag-run-BgZwv1yx.d.ts +49 -0
- package/dist/transform-inspector-BUYBt6--.d.ts +374 -0
- package/dist/transform-job-29P6BULe.d.ts +237 -0
- package/dist/transform-job-CTJImaOd.d.ts +96 -0
- package/dist/transform-python-DdDnW6yK.d.ts +56 -0
- package/dist/transform-tag-DVUIZTEM.d.ts +25 -0
- package/dist/transform-test-A-CJYT6B.d.ts +412 -0
- package/dist/transform-test-BwuyrHpT.d.ts +346 -0
- package/dist/transport-E0ZaPNWJ.d.ts +462 -0
- package/dist/transport-HP7cyo9N.js +397 -0
- package/dist/upload-B7PG3ePk.d.ts +12 -0
- package/dist/upload-UPfZFdbH.d.ts +22 -0
- package/dist/url-CI0pxHOc.d.ts +7 -0
- package/dist/url.d.ts +2 -0
- package/dist/url.js +34 -0
- package/dist/user-2r0OBoO6.d.ts +18 -0
- package/dist/version/capability-error.d.ts +2 -0
- package/dist/version/capability-error.js +42 -0
- package/dist/version/features.d.ts +2 -0
- package/dist/version/features.js +143 -0
- package/dist/version/known-range.d.ts +2 -0
- package/dist/version/known-range.js +7 -0
- package/dist/version/probe.d.ts +2 -0
- package/dist/version/probe.js +30 -0
- package/dist/version/profile.d.ts +2 -0
- package/dist/version/profile.js +64 -0
- package/dist/version/requirement-check.d.ts +2 -0
- package/dist/version/requirement-check.js +62 -0
- package/dist/version/requirements.d.ts +2 -0
- package/dist/version/requirements.js +219 -0
- package/dist/version/tag.d.ts +2 -0
- package/dist/version/tag.js +52 -0
- package/package.json +65 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
2
|
+
import { TransformMemberRun } from "../domain/transform-dag-run.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/resources/transform-dag-run.ts
|
|
5
|
+
const TransformMemberRunList = z.array(TransformMemberRun);
|
|
6
|
+
function transformDagRunResource(transport) {
|
|
7
|
+
const { explain } = explainer(transport, "transformDagRun");
|
|
8
|
+
/**
|
|
9
|
+
* List the transform runs a DAG run coordinated so far. A member run is inserted when its
|
|
10
|
+
* transform starts, so the list grows while the DAG run is in progress.
|
|
11
|
+
*/
|
|
12
|
+
async function transformRuns(runId, options = {}) {
|
|
13
|
+
return {
|
|
14
|
+
data: await transport.requestParsed(TransformMemberRunList, `/api/transform-dag-run/${runId}/transform-runs`, { ...options }),
|
|
15
|
+
total: null
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** Cancel an in-progress DAG run and request cancellation of its still-running transforms. */
|
|
19
|
+
async function cancel(runId, options = {}) {
|
|
20
|
+
await transport.requestRaw(`/api/transform-dag-run/${runId}/cancel`, {
|
|
21
|
+
...options,
|
|
22
|
+
method: "POST",
|
|
23
|
+
expectContentType: "binary"
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
transformRuns: explain("transformRuns", transformRuns),
|
|
28
|
+
cancel: explain("cancel", cancel)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { transformDagRunResource };
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-E0ZaPNWJ.js";
|
|
2
|
+
//#region src/resources/transform-inspector.d.ts
|
|
3
|
+
declare function transformInspectorResource(transport: Transport): {
|
|
4
|
+
discover: (id: number, options?: RequestOptions | undefined) => Promise<{
|
|
5
|
+
[x: string]: unknown;
|
|
6
|
+
name: string;
|
|
7
|
+
status: "not-run" | "ready";
|
|
8
|
+
sources: {
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
table_id: number;
|
|
11
|
+
table_name: string;
|
|
12
|
+
db_id: number;
|
|
13
|
+
column_count: number;
|
|
14
|
+
fields: {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
id: number;
|
|
17
|
+
name: string;
|
|
18
|
+
base_type: string;
|
|
19
|
+
display_name?: string | null | undefined;
|
|
20
|
+
semantic_type?: string | null | undefined;
|
|
21
|
+
stats?: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
distinct_count?: number | undefined;
|
|
24
|
+
nil_percent?: number | undefined;
|
|
25
|
+
min?: number | undefined;
|
|
26
|
+
max?: number | undefined;
|
|
27
|
+
avg?: number | undefined;
|
|
28
|
+
q1?: number | undefined;
|
|
29
|
+
q3?: number | undefined;
|
|
30
|
+
earliest?: string | undefined;
|
|
31
|
+
latest?: string | undefined;
|
|
32
|
+
} | null | undefined;
|
|
33
|
+
}[];
|
|
34
|
+
schema?: string | null | undefined;
|
|
35
|
+
}[];
|
|
36
|
+
available_lenses: {
|
|
37
|
+
[x: string]: unknown;
|
|
38
|
+
id: string;
|
|
39
|
+
display_name: string;
|
|
40
|
+
description?: string | null | undefined;
|
|
41
|
+
complexity?: {
|
|
42
|
+
[x: string]: unknown;
|
|
43
|
+
level: "fast" | "slow" | "very-slow";
|
|
44
|
+
score?: number | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
}[];
|
|
47
|
+
description?: string | null | undefined;
|
|
48
|
+
target?: {
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
table_id: number;
|
|
51
|
+
table_name: string;
|
|
52
|
+
db_id: number;
|
|
53
|
+
column_count: number;
|
|
54
|
+
fields: {
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
id: number;
|
|
57
|
+
name: string;
|
|
58
|
+
base_type: string;
|
|
59
|
+
display_name?: string | null | undefined;
|
|
60
|
+
semantic_type?: string | null | undefined;
|
|
61
|
+
stats?: {
|
|
62
|
+
[x: string]: unknown;
|
|
63
|
+
distinct_count?: number | undefined;
|
|
64
|
+
nil_percent?: number | undefined;
|
|
65
|
+
min?: number | undefined;
|
|
66
|
+
max?: number | undefined;
|
|
67
|
+
avg?: number | undefined;
|
|
68
|
+
q1?: number | undefined;
|
|
69
|
+
q3?: number | undefined;
|
|
70
|
+
earliest?: string | undefined;
|
|
71
|
+
latest?: string | undefined;
|
|
72
|
+
} | null | undefined;
|
|
73
|
+
}[];
|
|
74
|
+
schema?: string | null | undefined;
|
|
75
|
+
} | null | undefined;
|
|
76
|
+
visited_fields?: {
|
|
77
|
+
[x: string]: unknown;
|
|
78
|
+
all?: number[] | undefined;
|
|
79
|
+
} | null | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
lens: (id: number, lensId: string, params?: {
|
|
82
|
+
join_step?: number | undefined;
|
|
83
|
+
} | undefined, options?: RequestOptions | undefined) => Promise<{
|
|
84
|
+
[x: string]: unknown;
|
|
85
|
+
id: string;
|
|
86
|
+
display_name: string;
|
|
87
|
+
sections: {
|
|
88
|
+
[x: string]: unknown;
|
|
89
|
+
id: string;
|
|
90
|
+
title: string;
|
|
91
|
+
description?: string | null | undefined;
|
|
92
|
+
layout?: "flat" | "comparison" | undefined;
|
|
93
|
+
}[];
|
|
94
|
+
cards: {
|
|
95
|
+
[x: string]: unknown;
|
|
96
|
+
id: string;
|
|
97
|
+
title: string;
|
|
98
|
+
display: "table" | "hidden" | "progress" | "bar" | "row" | "line" | "area" | "pie" | "scalar" | "gauge";
|
|
99
|
+
dataset_query: {
|
|
100
|
+
[x: string]: unknown;
|
|
101
|
+
};
|
|
102
|
+
section_id?: string | null | undefined;
|
|
103
|
+
metadata?: {
|
|
104
|
+
[x: string]: unknown;
|
|
105
|
+
join_step?: number | undefined;
|
|
106
|
+
join_alias?: string | undefined;
|
|
107
|
+
join_strategy?: string | undefined;
|
|
108
|
+
dedup_key?: unknown[] | undefined;
|
|
109
|
+
depends_on_cards?: string[] | undefined;
|
|
110
|
+
group_id?: string | undefined;
|
|
111
|
+
group_role?: "output" | "input" | undefined;
|
|
112
|
+
group_order?: number | undefined;
|
|
113
|
+
card_type?: string | undefined;
|
|
114
|
+
} | undefined;
|
|
115
|
+
}[];
|
|
116
|
+
complexity?: {
|
|
117
|
+
[x: string]: unknown;
|
|
118
|
+
level: "fast" | "slow" | "very-slow";
|
|
119
|
+
score?: number | undefined;
|
|
120
|
+
} | undefined;
|
|
121
|
+
summary?: {
|
|
122
|
+
[x: string]: unknown;
|
|
123
|
+
text?: string | null | undefined;
|
|
124
|
+
highlights?: {
|
|
125
|
+
[x: string]: unknown;
|
|
126
|
+
label: string;
|
|
127
|
+
value?: unknown;
|
|
128
|
+
card_id?: string | undefined;
|
|
129
|
+
}[] | undefined;
|
|
130
|
+
alerts?: {
|
|
131
|
+
[x: string]: unknown;
|
|
132
|
+
}[] | undefined;
|
|
133
|
+
} | undefined;
|
|
134
|
+
drill_lenses?: {
|
|
135
|
+
[x: string]: unknown;
|
|
136
|
+
id: string;
|
|
137
|
+
display_name: string;
|
|
138
|
+
description?: string | null | undefined;
|
|
139
|
+
complexity?: {
|
|
140
|
+
[x: string]: unknown;
|
|
141
|
+
level: "fast" | "slow" | "very-slow";
|
|
142
|
+
score?: number | undefined;
|
|
143
|
+
} | undefined;
|
|
144
|
+
}[] | undefined;
|
|
145
|
+
alert_triggers?: {
|
|
146
|
+
[x: string]: unknown;
|
|
147
|
+
id: string;
|
|
148
|
+
condition: {
|
|
149
|
+
[x: string]: unknown;
|
|
150
|
+
name: string;
|
|
151
|
+
};
|
|
152
|
+
severity: "error" | "info" | "warning";
|
|
153
|
+
message: string;
|
|
154
|
+
metadata?: {
|
|
155
|
+
[x: string]: unknown;
|
|
156
|
+
join_step?: number | undefined;
|
|
157
|
+
join_alias?: string | undefined;
|
|
158
|
+
join_strategy?: string | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
}[] | undefined;
|
|
161
|
+
drill_lens_triggers?: {
|
|
162
|
+
[x: string]: unknown;
|
|
163
|
+
lens_id: string;
|
|
164
|
+
condition: {
|
|
165
|
+
[x: string]: unknown;
|
|
166
|
+
name: string;
|
|
167
|
+
};
|
|
168
|
+
params?: {
|
|
169
|
+
[x: string]: unknown;
|
|
170
|
+
join_step?: number | undefined;
|
|
171
|
+
} | undefined;
|
|
172
|
+
reason?: string | undefined;
|
|
173
|
+
metadata?: {
|
|
174
|
+
[x: string]: unknown;
|
|
175
|
+
join_step?: number | undefined;
|
|
176
|
+
join_alias?: string | undefined;
|
|
177
|
+
join_strategy?: string | undefined;
|
|
178
|
+
} | undefined;
|
|
179
|
+
}[] | undefined;
|
|
180
|
+
}>;
|
|
181
|
+
query: (id: number, lensId: string, params: {
|
|
182
|
+
query: {
|
|
183
|
+
[x: string]: unknown;
|
|
184
|
+
};
|
|
185
|
+
lens_params?: {
|
|
186
|
+
join_step?: number | undefined;
|
|
187
|
+
} | null | undefined;
|
|
188
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
189
|
+
[x: string]: unknown;
|
|
190
|
+
status: string;
|
|
191
|
+
row_count?: number | undefined;
|
|
192
|
+
data?: {
|
|
193
|
+
[x: string]: unknown;
|
|
194
|
+
rows: unknown[][];
|
|
195
|
+
cols: {
|
|
196
|
+
[x: string]: unknown;
|
|
197
|
+
name: string;
|
|
198
|
+
display_name?: string | null | undefined;
|
|
199
|
+
base_type?: "type/*" | "type/field-values-unsupported" | "type/fingerprint-unsupported" | "type/Large" | "type/Number" | "type/Integer" | "type/BigInteger" | "type/Float" | "type/Double" | "type/Decimal" | "type/Text" | "type/UUID" | "type/OracleCLOB" | "type/Temporal" | "type/HasDate" | "type/HasTime" | "type/Date" | "type/Time" | "type/TimeWithTZ" | "type/TimeWithLocalTZ" | "type/TimeWithZoneOffset" | "type/DateTime" | "type/DateTimeWithTZ" | "type/DateTimeWithLocalTZ" | "type/DateTimeWithZoneOffset" | "type/DateTimeWithZoneID" | "type/Instant" | "type/Interval" | "type/Boolean" | "type/DruidHyperUnique" | "type/SnowflakeVariant" | "type/TextLike" | "type/MongoBSONID" | "type/MongoBinData" | "type/MySQLEnum" | "type/PostgresEnum" | "type/PostgresBitString" | "type/IPAddress" | "type/Collection" | "type/Dictionary" | "type/Array" | "type/Structured" | "type/JSON" | "type/DruidJSON" | "type/XML" | "type/AvatarURL" | "type/Birthdate" | "type/CancelationDate" | "type/CancelationTime" | "type/CancelationTimestamp" | "type/City" | "type/Comment" | "type/Coordinate" | "type/Cost" | "type/Country" | "type/CreationDate" | "type/CreationTime" | "type/CreationTimestamp" | "type/Currency" | "type/DeletionDate" | "type/DeletionTime" | "type/DeletionTimestamp" | "type/Description" | "type/Discount" | "type/Duration" | "type/Email" | "type/GrossMargin" | "type/ImageURL" | "type/Income" | "type/JoinDate" | "type/JoinTime" | "type/JoinTimestamp" | "type/Latitude" | "type/Longitude" | "type/Name" | "type/Percentage" | "type/Price" | "type/Quantity" | "type/Score" | "type/SerializedJSON" | "type/Share" | "type/State" | "type/Title" | "type/URL" | "type/UpdatedDate" | "type/UpdatedTime" | "type/UpdatedTimestamp" | "type/ZipCode" | undefined;
|
|
200
|
+
effective_type?: "type/*" | "type/field-values-unsupported" | "type/fingerprint-unsupported" | "type/Large" | "type/Number" | "type/Integer" | "type/BigInteger" | "type/Float" | "type/Double" | "type/Decimal" | "type/Text" | "type/UUID" | "type/OracleCLOB" | "type/Temporal" | "type/HasDate" | "type/HasTime" | "type/Date" | "type/Time" | "type/TimeWithTZ" | "type/TimeWithLocalTZ" | "type/TimeWithZoneOffset" | "type/DateTime" | "type/DateTimeWithTZ" | "type/DateTimeWithLocalTZ" | "type/DateTimeWithZoneOffset" | "type/DateTimeWithZoneID" | "type/Instant" | "type/Interval" | "type/Boolean" | "type/DruidHyperUnique" | "type/SnowflakeVariant" | "type/TextLike" | "type/MongoBSONID" | "type/MongoBinData" | "type/MySQLEnum" | "type/PostgresEnum" | "type/PostgresBitString" | "type/IPAddress" | "type/Collection" | "type/Dictionary" | "type/Array" | "type/Structured" | "type/JSON" | "type/DruidJSON" | "type/XML" | "type/AvatarURL" | "type/Birthdate" | "type/CancelationDate" | "type/CancelationTime" | "type/CancelationTimestamp" | "type/City" | "type/Comment" | "type/Coordinate" | "type/Cost" | "type/Country" | "type/CreationDate" | "type/CreationTime" | "type/CreationTimestamp" | "type/Currency" | "type/DeletionDate" | "type/DeletionTime" | "type/DeletionTimestamp" | "type/Description" | "type/Discount" | "type/Duration" | "type/Email" | "type/GrossMargin" | "type/ImageURL" | "type/Income" | "type/JoinDate" | "type/JoinTime" | "type/JoinTimestamp" | "type/Latitude" | "type/Longitude" | "type/Name" | "type/Percentage" | "type/Price" | "type/Quantity" | "type/Score" | "type/SerializedJSON" | "type/Share" | "type/State" | "type/Title" | "type/URL" | "type/UpdatedDate" | "type/UpdatedTime" | "type/UpdatedTimestamp" | "type/ZipCode" | null | undefined;
|
|
201
|
+
semantic_type?: "type/IPAddress" | "type/Structured" | "type/JSON" | "type/DruidJSON" | "type/XML" | "type/AvatarURL" | "type/Birthdate" | "type/CancelationDate" | "type/CancelationTime" | "type/CancelationTimestamp" | "type/City" | "type/Comment" | "type/Coordinate" | "type/Cost" | "type/Country" | "type/CreationDate" | "type/CreationTime" | "type/CreationTimestamp" | "type/Currency" | "type/DeletionDate" | "type/DeletionTime" | "type/DeletionTimestamp" | "type/Description" | "type/Discount" | "type/Duration" | "type/Email" | "type/GrossMargin" | "type/ImageURL" | "type/Income" | "type/JoinDate" | "type/JoinTime" | "type/JoinTimestamp" | "type/Latitude" | "type/Longitude" | "type/Name" | "type/Percentage" | "type/Price" | "type/Quantity" | "type/Score" | "type/SerializedJSON" | "type/Share" | "type/State" | "type/Title" | "type/URL" | "type/UpdatedDate" | "type/UpdatedTime" | "type/UpdatedTimestamp" | "type/ZipCode" | "Semantic/*" | "Relation/*" | "type/Location" | "type/Address" | "type/Category" | "type/Enum" | "type/Product" | "type/Company" | "type/Subscription" | "type/Source" | "type/CreationTemporal" | "type/JoinTemporal" | "type/CancelationTemporal" | "type/DeletionTemporal" | "type/UpdatedTemporal" | "type/User" | "type/Author" | "type/Owner" | "type/FK" | "type/PK" | null | undefined;
|
|
202
|
+
database_type?: string | null | undefined;
|
|
203
|
+
id?: number | null | undefined;
|
|
204
|
+
}[];
|
|
205
|
+
rows_truncated?: number | undefined;
|
|
206
|
+
pivot_rows_truncated?: number | undefined;
|
|
207
|
+
} | undefined;
|
|
208
|
+
cached?: string | null | undefined;
|
|
209
|
+
error?: string | null | undefined;
|
|
210
|
+
error_type?: string | null | undefined;
|
|
211
|
+
}>;
|
|
212
|
+
};
|
|
213
|
+
//#endregion
|
|
214
|
+
export { transformInspectorResource };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CardQueryResult } from "../domain/card.js";
|
|
2
|
+
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
3
|
+
import { TransformInspection, TransformLens } from "../domain/transform-inspector.js";
|
|
4
|
+
//#region src/resources/transform-inspector.ts
|
|
5
|
+
function lensPath(id, lensId) {
|
|
6
|
+
return `/api/ee/transforms/${id}/inspect/${encodeURIComponent(lensId)}`;
|
|
7
|
+
}
|
|
8
|
+
function transformInspectorResource(transport) {
|
|
9
|
+
const { explain } = explainer(transport, "transformInspector");
|
|
10
|
+
/**
|
|
11
|
+
* Discover what the inspector can show for a transform: its source and target tables with field
|
|
12
|
+
* statistics, the fields its query touches, and the lenses available on it.
|
|
13
|
+
*/
|
|
14
|
+
async function discover(id, options = {}) {
|
|
15
|
+
return transport.requestParsed(TransformInspection, `/api/ee/transforms/${id}/inspect`, { ...options });
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Open one lens on a transform: its sections, the cards with the queries that fill them, and
|
|
19
|
+
* the alert and drill-lens triggers to evaluate against the card results. A drill lens takes
|
|
20
|
+
* the `params` its trigger emitted.
|
|
21
|
+
*/
|
|
22
|
+
async function lens(id, lensId, params = {}, options = {}) {
|
|
23
|
+
return transport.requestParsed(TransformLens, lensPath(id, lensId), {
|
|
24
|
+
...options,
|
|
25
|
+
query: { join_step: params.join_step }
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Run a lens card's query in the context of the lens, so the execution is attributed to the
|
|
30
|
+
* inspector. The body is the card's `dataset_query`, and the same `lens_params` the lens was
|
|
31
|
+
* opened with.
|
|
32
|
+
*/
|
|
33
|
+
async function query(id, lensId, params, options = {}) {
|
|
34
|
+
return transport.requestParsed(CardQueryResult, `${lensPath(id, lensId)}/query`, {
|
|
35
|
+
...options,
|
|
36
|
+
method: "POST",
|
|
37
|
+
body: params
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
discover: explain("discover", discover),
|
|
42
|
+
lens: explain("lens", lens),
|
|
43
|
+
query: explain("query", query)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { transformInspectorResource };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
2
|
+
import { transformRowSchema } from "../domain/transform.js";
|
|
3
|
+
import { TransformJobActiveResult, transformJobRunResultSchema, transformJobSchema } from "../domain/transform-job.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/resources/transform-job.ts
|
|
6
|
+
function transformJobResource(transport) {
|
|
7
|
+
const { explain } = explainer(transport, "transformJob");
|
|
8
|
+
/** List every transform job the caller can see. */
|
|
9
|
+
async function list(options = {}) {
|
|
10
|
+
const { features } = await transport.server(options);
|
|
11
|
+
return {
|
|
12
|
+
data: await transport.requestParsed(z.array(transformJobSchema(features)), "/api/transform-job", { ...options }),
|
|
13
|
+
total: null
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** Get one transform job by id. */
|
|
17
|
+
async function get(id, options = {}) {
|
|
18
|
+
const { features } = await transport.server(options);
|
|
19
|
+
return transport.requestParsed(transformJobSchema(features), `/api/transform-job/${id}`, { ...options });
|
|
20
|
+
}
|
|
21
|
+
/** Create a transform job — a schedule plus the tags it runs — from a full body. */
|
|
22
|
+
async function create(params, options = {}) {
|
|
23
|
+
const { features } = await transport.server(options);
|
|
24
|
+
return transport.requestParsed(transformJobSchema(features), "/api/transform-job", {
|
|
25
|
+
...options,
|
|
26
|
+
method: "POST",
|
|
27
|
+
body: params
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** Update a transform job by id, patching only the fields the body carries. */
|
|
31
|
+
async function update(id, params, options = {}) {
|
|
32
|
+
const { features } = await transport.server(options);
|
|
33
|
+
return transport.requestParsed(transformJobSchema(features), `/api/transform-job/${id}`, {
|
|
34
|
+
...options,
|
|
35
|
+
method: "PUT",
|
|
36
|
+
body: params
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/** Delete a transform job by id, leaving the transforms it ran untouched. */
|
|
40
|
+
async function remove(id, options = {}) {
|
|
41
|
+
await transport.requestRaw(`/api/transform-job/${id}`, {
|
|
42
|
+
...options,
|
|
43
|
+
method: "DELETE",
|
|
44
|
+
expectContentType: "binary"
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Start a run of a transform job by id. The job runs every transform carrying one of its tags,
|
|
49
|
+
* plus those transforms' dependencies; `run_all` re-runs dependencies that are already fresh.
|
|
50
|
+
*/
|
|
51
|
+
async function run(id, params = {}, options = {}) {
|
|
52
|
+
const { features } = await transport.server(options);
|
|
53
|
+
return transport.requestParsed(transformJobRunResultSchema(features), `/api/transform-job/${id}/run`, {
|
|
54
|
+
...options,
|
|
55
|
+
method: "POST",
|
|
56
|
+
body: { run_all: params.run_all }
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/** List the transforms a job would execute, resolved from the job's tags. */
|
|
60
|
+
async function transforms(id, options = {}) {
|
|
61
|
+
const { features } = await transport.server(options);
|
|
62
|
+
return {
|
|
63
|
+
data: await transport.requestParsed(z.array(transformRowSchema(features)), `/api/transform-job/${id}/transforms`, { ...options }),
|
|
64
|
+
total: null
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Flip the active flag on every transform job at once. Inactive jobs do not run on schedule;
|
|
69
|
+
* manual runs ignore the flag. The path carries no id and is a different endpoint from `update`.
|
|
70
|
+
*/
|
|
71
|
+
async function setActive(active, options = {}) {
|
|
72
|
+
return transport.requestParsed(TransformJobActiveResult, "/api/transform-job/active", {
|
|
73
|
+
...options,
|
|
74
|
+
method: "PUT",
|
|
75
|
+
body: { active }
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
list: explain("list", list),
|
|
80
|
+
get: explain("get", get),
|
|
81
|
+
create: explain("create", create),
|
|
82
|
+
update: explain("update", update),
|
|
83
|
+
delete: explain("delete", remove),
|
|
84
|
+
run: explain("run", run),
|
|
85
|
+
transforms: explain("transforms", transforms),
|
|
86
|
+
setActive: explain("setActive", setActive)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { transformJobResource };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-E0ZaPNWJ.js";
|
|
2
|
+
//#region src/resources/transform-python.d.ts
|
|
3
|
+
declare function transformPythonResource(transport: Transport): {
|
|
4
|
+
getLibrary: (path: string, options?: RequestOptions | undefined) => Promise<{
|
|
5
|
+
[x: string]: unknown;
|
|
6
|
+
path: string;
|
|
7
|
+
source: string | null;
|
|
8
|
+
created_at: string;
|
|
9
|
+
updated_at: string;
|
|
10
|
+
}>;
|
|
11
|
+
updateLibrary: (path: string, params: {
|
|
12
|
+
source: string;
|
|
13
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
path: string;
|
|
16
|
+
source: string | null;
|
|
17
|
+
created_at: string;
|
|
18
|
+
updated_at: string;
|
|
19
|
+
}>;
|
|
20
|
+
testRun: (params: {
|
|
21
|
+
code: string;
|
|
22
|
+
source_tables: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
alias: string;
|
|
25
|
+
database_id: number;
|
|
26
|
+
schema: string | null;
|
|
27
|
+
table?: string | undefined;
|
|
28
|
+
table_id?: number | null | undefined;
|
|
29
|
+
}[];
|
|
30
|
+
output_row_limit?: number | undefined;
|
|
31
|
+
per_input_row_limit?: number | undefined;
|
|
32
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
33
|
+
outcome: "succeeded";
|
|
34
|
+
logs: string;
|
|
35
|
+
output: {
|
|
36
|
+
cols: {
|
|
37
|
+
[x: string]: unknown;
|
|
38
|
+
name: string;
|
|
39
|
+
}[];
|
|
40
|
+
rows: unknown[];
|
|
41
|
+
};
|
|
42
|
+
} | {
|
|
43
|
+
outcome: "failed";
|
|
44
|
+
logs: string;
|
|
45
|
+
error: {
|
|
46
|
+
[x: string]: unknown;
|
|
47
|
+
message: string;
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { transformPythonResource };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
2
|
+
import { PythonLibrary, PythonTestRunError, PythonTestRunOutput } from "../domain/transform-python.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/resources/transform-python.ts
|
|
5
|
+
const PythonApiTestRun = z.union([z.object({
|
|
6
|
+
logs: z.string(),
|
|
7
|
+
output: PythonTestRunOutput
|
|
8
|
+
}).transform(({ logs, output }) => ({
|
|
9
|
+
outcome: "succeeded",
|
|
10
|
+
logs,
|
|
11
|
+
output
|
|
12
|
+
})), z.object({
|
|
13
|
+
logs: z.string(),
|
|
14
|
+
error: PythonTestRunError
|
|
15
|
+
}).transform(({ logs, error }) => ({
|
|
16
|
+
outcome: "failed",
|
|
17
|
+
logs,
|
|
18
|
+
error
|
|
19
|
+
}))]);
|
|
20
|
+
function libraryPath(path) {
|
|
21
|
+
return `/api/ee/transforms-python/library/${encodeURIComponent(path)}`;
|
|
22
|
+
}
|
|
23
|
+
function transformPythonResource(transport) {
|
|
24
|
+
const { explain } = explainer(transport, "transformPython");
|
|
25
|
+
/** Get the Python library at a path, the user module every Python transform can import. */
|
|
26
|
+
async function getLibrary(path, options = {}) {
|
|
27
|
+
return transport.requestParsed(PythonLibrary, libraryPath(path), { ...options });
|
|
28
|
+
}
|
|
29
|
+
/** Replace the source of the Python library at a path, creating the library when none exists. */
|
|
30
|
+
async function updateLibrary(path, params, options = {}) {
|
|
31
|
+
return transport.requestParsed(PythonLibrary, libraryPath(path), {
|
|
32
|
+
...options,
|
|
33
|
+
method: "PUT",
|
|
34
|
+
body: params
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Evaluate an ad-hoc Python transform on a sample of its source tables, without a target table.
|
|
39
|
+
* Meant for early feedback on short runs: input, output and time limits apply, and the sample
|
|
40
|
+
* sizes are capped at 100 rows.
|
|
41
|
+
*/
|
|
42
|
+
async function testRun(params, options = {}) {
|
|
43
|
+
return transport.requestParsed(PythonApiTestRun, "/api/ee/transforms-python/test-run", {
|
|
44
|
+
...options,
|
|
45
|
+
method: "POST",
|
|
46
|
+
body: params
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
getLibrary: explain("getLibrary", getLibrary),
|
|
51
|
+
updateLibrary: explain("updateLibrary", updateLibrary),
|
|
52
|
+
testRun: explain("testRun", testRun)
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { transformPythonResource };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-E0ZaPNWJ.js";
|
|
2
|
+
import { t as ListResult } from "../list-BT_bBm9Z.js";
|
|
3
|
+
//#region src/resources/transform-tag.d.ts
|
|
4
|
+
declare function transformTagResource(transport: Transport): {
|
|
5
|
+
list: (options?: RequestOptions | undefined) => Promise<ListResult<{
|
|
6
|
+
[x: string]: unknown;
|
|
7
|
+
id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
entity_id: string | null;
|
|
10
|
+
built_in_type: string | null;
|
|
11
|
+
}>>;
|
|
12
|
+
create: (params: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
name: string;
|
|
15
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
entity_id: string | null;
|
|
20
|
+
built_in_type: string | null;
|
|
21
|
+
}>;
|
|
22
|
+
update: (id: number, params: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
name: string;
|
|
25
|
+
}, options?: RequestOptions | undefined) => Promise<{
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
id: number;
|
|
28
|
+
name: string;
|
|
29
|
+
entity_id: string | null;
|
|
30
|
+
built_in_type: string | null;
|
|
31
|
+
}>;
|
|
32
|
+
delete: (id: number, options?: RequestOptions | undefined) => Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { transformTagResource };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
2
|
+
import { TransformTag } from "../domain/transform-tag.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/resources/transform-tag.ts
|
|
5
|
+
const TransformTagApiList = z.array(TransformTag);
|
|
6
|
+
function transformTagResource(transport) {
|
|
7
|
+
const { explain } = explainer(transport, "transformTag");
|
|
8
|
+
/** List every transform tag the caller can see, built-in tags included. */
|
|
9
|
+
async function list(options = {}) {
|
|
10
|
+
return {
|
|
11
|
+
data: await transport.requestParsed(TransformTagApiList, "/api/transform-tag", { ...options }),
|
|
12
|
+
total: null
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/** Create a transform tag, the label a transform job matches transforms on. */
|
|
16
|
+
async function create(params, options = {}) {
|
|
17
|
+
return transport.requestParsed(TransformTag, "/api/transform-tag", {
|
|
18
|
+
...options,
|
|
19
|
+
method: "POST",
|
|
20
|
+
body: params
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/** Rename a transform tag by id. */
|
|
24
|
+
async function update(id, params, options = {}) {
|
|
25
|
+
return transport.requestParsed(TransformTag, `/api/transform-tag/${id}`, {
|
|
26
|
+
...options,
|
|
27
|
+
method: "PUT",
|
|
28
|
+
body: params
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** Delete a transform tag by id, detaching it from every transform and job carrying it. */
|
|
32
|
+
async function remove(id, options = {}) {
|
|
33
|
+
await transport.requestRaw(`/api/transform-tag/${id}`, {
|
|
34
|
+
...options,
|
|
35
|
+
method: "DELETE",
|
|
36
|
+
expectContentType: "binary"
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
list: explain("list", list),
|
|
41
|
+
create: explain("create", create),
|
|
42
|
+
update: explain("update", update),
|
|
43
|
+
delete: explain("delete", remove)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { transformTagResource };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
2
|
+
import { TransformTest, TransformTestRunResult } from "../domain/transform-test.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/resources/transform-test.ts
|
|
5
|
+
const TransformTestApiList = z.array(TransformTest);
|
|
6
|
+
function transformTestResource(transport) {
|
|
7
|
+
const { explain } = explainer(transport, "transformTest");
|
|
8
|
+
/** List the transform tests, optionally only those of one transform. */
|
|
9
|
+
async function list(params = {}, options = {}) {
|
|
10
|
+
return {
|
|
11
|
+
data: await transport.requestParsed(TransformTestApiList, "/api/ee/transform-test", {
|
|
12
|
+
...options,
|
|
13
|
+
query: { "transform-id": params["transform-id"] }
|
|
14
|
+
}),
|
|
15
|
+
total: null
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** Get a transform test by id. */
|
|
19
|
+
async function get(id, options = {}) {
|
|
20
|
+
return transport.requestParsed(TransformTest, `/api/ee/transform-test/${id}`, { ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Create a transform test. The server validates the inputs and expectations against the
|
|
24
|
+
* transform before saving, and refuses with an `HttpError` whose `errorCode` is a
|
|
25
|
+
* `TransformTestRefusalCode` when they cannot run.
|
|
26
|
+
*/
|
|
27
|
+
async function create(params, options = {}) {
|
|
28
|
+
return transport.requestParsed(TransformTest, "/api/ee/transform-test", {
|
|
29
|
+
...options,
|
|
30
|
+
method: "POST",
|
|
31
|
+
body: params
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Update a transform test by id, leaving omitted fields unchanged. A body that touches the
|
|
36
|
+
* transform, inputs or expectations is validated as on create, with the same refusal.
|
|
37
|
+
*/
|
|
38
|
+
async function update(id, params, options = {}) {
|
|
39
|
+
return transport.requestParsed(TransformTest, `/api/ee/transform-test/${id}`, {
|
|
40
|
+
...options,
|
|
41
|
+
method: "PUT",
|
|
42
|
+
body: params
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** Delete a transform test by id. */
|
|
46
|
+
async function remove(id, options = {}) {
|
|
47
|
+
await transport.requestRaw(`/api/ee/transform-test/${id}`, {
|
|
48
|
+
...options,
|
|
49
|
+
method: "DELETE",
|
|
50
|
+
expectContentType: "binary"
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Run a transform test by id. A result means the run happened: `status` is `passed` or `failed`
|
|
55
|
+
* and every expectation reports what it found, one that could not be evaluated as its own
|
|
56
|
+
* `error`. An `HttpError` whose `errorCode` is a `TransformTestRefusalCode` means the run was
|
|
57
|
+
* refused and nothing meaningful ran.
|
|
58
|
+
*/
|
|
59
|
+
async function run(id, options = {}) {
|
|
60
|
+
return transport.requestParsed(TransformTestRunResult, `/api/ee/transform-test/${id}/run`, {
|
|
61
|
+
...options,
|
|
62
|
+
method: "POST"
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
list: explain("list", list),
|
|
67
|
+
get: explain("get", get),
|
|
68
|
+
create: explain("create", create),
|
|
69
|
+
update: explain("update", update),
|
|
70
|
+
delete: explain("delete", remove),
|
|
71
|
+
run: explain("run", run)
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { transformTestResource };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as TransformRunSummaryPageParams, i as TransformRunParams, n as TransformRunPageOptions, o as transformResource, r as TransformRunPageParams, t as TransformDagParams } from "../transform-CXOT5kFe.js";
|
|
2
|
+
export { TransformDagParams, TransformRunPageOptions, TransformRunPageParams, TransformRunParams, TransformRunSummaryPageParams, transformResource };
|