@metabase/client 0.0.0-stage → 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 +28 -0
- package/LICENSE +661 -0
- package/README.md +490 -2
- package/dist/api-key-DJeN1-7G.d.ts +46 -0
- 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-BxBzr5Uj.d.ts +1392 -0
- package/dist/card-DN0sLkCG.d.ts +33 -0
- package/dist/client-DdXLlH1B.d.ts +3380 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +99 -0
- package/dist/collection-DGnTvD6R.d.ts +294 -0
- package/dist/collection-fFahL-ub.d.ts +53 -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-CM7RmNeE.d.ts +38 -0
- package/dist/dashboard-DtLXVgtf.d.ts +978 -0
- package/dist/data-action-CkXVrOUH.d.ts +97 -0
- package/dist/data-app-CqP5_fpB.d.ts +76 -0
- package/dist/database-B0JNZjDN.d.ts +27 -0
- package/dist/database-BxqDmfcj.d.ts +997 -0
- package/dist/dataset-BBNGPVec.d.ts +4144 -0
- package/dist/dataset-BUirJ1rO.d.ts +23 -0
- package/dist/dependency-CzpXmeu7.d.ts +299 -0
- package/dist/dependency-arB8Cr2H.d.ts +879 -0
- package/dist/document-tLd6pYWe.d.ts +115 -0
- package/dist/domain/api-key.d.ts +2 -0
- package/dist/domain/api-key.js +31 -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 +211 -0
- package/dist/domain/data-action.d.ts +2 -0
- package/dist/domain/data-action.js +91 -0
- package/dist/domain/data-app.d.ts +2 -0
- package/dist/domain/data-app.js +52 -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 +168 -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 +274 -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 +89 -0
- package/dist/domain/measure.d.ts +2 -0
- package/dist/domain/measure.js +43 -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 +143 -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 +140 -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 +90 -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 +46 -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 +187 -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 +115 -0
- package/dist/domain/transform-python.d.ts +2 -0
- package/dist/domain/transform-python.js +51 -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 +304 -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-CH6NPWd-.d.ts +143 -0
- package/dist/embedding-oU3gqfgX.d.ts +10 -0
- package/dist/erd-BdeFEeSy.d.ts +842 -0
- package/dist/erd-CbV7xvAc.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-SMSfJhB6.d.ts +295 -0
- package/dist/field-D1Pfk-0S.d.ts +50 -0
- package/dist/field-p9Rme2zB.d.ts +2549 -0
- package/dist/git-sync-BTf1aYHr.d.ts +205 -0
- package/dist/git-sync-C99SVdJ9.d.ts +258 -0
- package/dist/glossary-CHK3elPj.d.ts +35 -0
- package/dist/glossary-DFvnz-E5.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 +62 -0
- package/dist/index.js +64 -0
- package/dist/input-gate-registry-Dai7SfXb.js +14 -0
- package/dist/input-gates-DwKoTJVQ.d.ts +28 -0
- package/dist/json-BksZpXDC.d.ts +19 -0
- package/dist/json-pointer.d.ts +5 -0
- package/dist/json-pointer.js +10 -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-B9pEq7qP.d.ts +230 -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-CgH14YQZ.d.ts +44 -0
- package/dist/measure-lPz8qnwz.d.ts +108 -0
- package/dist/metric-DcYloqOQ.d.ts +2655 -0
- package/dist/moderation-review-B4RUTZ6_.d.ts +56 -0
- package/dist/network-error-5g4U1iul.js +62 -0
- package/dist/notification-Cp5GJErS.d.ts +22 -0
- package/dist/notification-D1MThyKE.d.ts +443 -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-COuL0Gzl.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-0LG3K6qO.d.ts +598 -0
- package/dist/pulse-BzKmz3Yn.d.ts +18 -0
- package/dist/query-Xsin530u.d.ts +23 -0
- package/dist/refusal-B9aeHMc9.js +130 -0
- package/dist/replacement-BGyggp-G.d.ts +2467 -0
- package/dist/replacement-CVebCuNp.d.ts +128 -0
- package/dist/requirement-check-glU7wqhQ.d.ts +17 -0
- package/dist/requirements-Dx_ZVzl7.d.ts +227 -0
- package/dist/resources/api-key.d.ts +11 -0
- package/dist/resources/api-key.js +35 -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 +134 -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 +221 -0
- package/dist/resources/data-action.d.ts +60 -0
- package/dist/resources/data-action.js +79 -0
- package/dist/resources/data-app.d.ts +112 -0
- package/dist/resources/data-app.js +75 -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 +156 -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 +99 -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 +76 -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 +46 -0
- package/dist/resources/search.d.ts +2 -0
- package/dist/resources/search.js +78 -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 +274 -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 +59 -0
- package/dist/resources/transform-python.js +57 -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 +227 -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-Dyl-8p7d.d.ts +106 -0
- package/dist/search-Cm5IxKss.d.ts +92 -0
- package/dist/search-Cten2h0I.d.ts +26 -0
- package/dist/segment-CbAgVO-5.d.ts +47 -0
- package/dist/segment-DQLX6r1E.d.ts +16 -0
- package/dist/session-properties-COtlxAcK.d.ts +15 -0
- package/dist/setting-DXuQGXGF.d.ts +25 -0
- package/dist/setup-JqcJ2unJ.d.ts +26 -0
- package/dist/signal.d.ts +8 -0
- package/dist/signal.js +25 -0
- package/dist/snippet-C_Ilx7tR.d.ts +41 -0
- package/dist/snippet-Djn0rL21.d.ts +16 -0
- package/dist/table-CDZbLNow.d.ts +176 -0
- package/dist/table-Od6uvDVW.d.ts +3234 -0
- package/dist/tag-qzjGGci8.d.ts +48 -0
- package/dist/timeline-BK45hy-h.d.ts +218 -0
- package/dist/timeline-BTs6fuRp.d.ts +21 -0
- package/dist/transform-C5thnJwW.d.ts +559 -0
- package/dist/transform-WASQAXeA.d.ts +652 -0
- package/dist/transform-dag-run-BgZwv1yx.d.ts +49 -0
- package/dist/transform-inspector-CMCh8WKV.d.ts +374 -0
- package/dist/transform-job-D8jTQtdX.d.ts +98 -0
- package/dist/transform-job-DmTwKxhc.d.ts +237 -0
- package/dist/transform-python-DtL3xxMj.d.ts +101 -0
- package/dist/transform-tag-C6j5EUkX.d.ts +25 -0
- package/dist/transform-test-CR_i54IV.d.ts +412 -0
- package/dist/transform-test-CeMzDpUC.d.ts +346 -0
- package/dist/transport-BsXqRujn.d.ts +476 -0
- package/dist/transport-HP7cyo9N.js +397 -0
- package/dist/upload-B5YjVkSW.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-Sqqv7rqh.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 +171 -0
- package/dist/version/input-gates.d.ts +2 -0
- package/dist/version/input-gates.js +13 -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 +229 -0
- package/dist/version/tag.d.ts +2 -0
- package/dist/version/tag.js +52 -0
- package/package.json +66 -4
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { FieldBaseType, FieldSemanticType } from "./field.js";
|
|
2
|
+
import { TransformTarget } from "./transform.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/domain/replacement.ts
|
|
5
|
+
const ReplacementSourceType = z.enum(["card", "table"]);
|
|
6
|
+
const ReplacementEntityType = z.enum([...ReplacementSourceType.options, "transform"]);
|
|
7
|
+
const ReplacementRunStatus = z.enum([
|
|
8
|
+
"pending",
|
|
9
|
+
"started",
|
|
10
|
+
"succeeded",
|
|
11
|
+
"failed",
|
|
12
|
+
"canceled",
|
|
13
|
+
"timeout"
|
|
14
|
+
]);
|
|
15
|
+
const ReplacementRun = z.object({
|
|
16
|
+
id: z.number().int(),
|
|
17
|
+
status: ReplacementRunStatus,
|
|
18
|
+
is_active: z.literal(true).nullable(),
|
|
19
|
+
source_entity_type: ReplacementEntityType,
|
|
20
|
+
source_entity_id: z.number().int(),
|
|
21
|
+
target_entity_type: ReplacementEntityType,
|
|
22
|
+
target_entity_id: z.number().int(),
|
|
23
|
+
progress: z.number().min(0).max(1).nullable(),
|
|
24
|
+
message: z.string().nullable(),
|
|
25
|
+
user_id: z.number().int().nullable(),
|
|
26
|
+
start_time: z.string(),
|
|
27
|
+
end_time: z.string().nullable()
|
|
28
|
+
}).loose();
|
|
29
|
+
const ReplacementRunCompact = ReplacementRun.pick({
|
|
30
|
+
id: true,
|
|
31
|
+
status: true,
|
|
32
|
+
source_entity_type: true,
|
|
33
|
+
source_entity_id: true,
|
|
34
|
+
target_entity_type: true,
|
|
35
|
+
target_entity_id: true,
|
|
36
|
+
progress: true,
|
|
37
|
+
message: true,
|
|
38
|
+
start_time: true,
|
|
39
|
+
end_time: true
|
|
40
|
+
}).strip();
|
|
41
|
+
const ReplacementColumn = z.object({
|
|
42
|
+
id: z.number().int().nullable(),
|
|
43
|
+
name: z.string(),
|
|
44
|
+
display_name: z.string(),
|
|
45
|
+
base_type: FieldBaseType.nullable(),
|
|
46
|
+
effective_type: FieldBaseType.nullable(),
|
|
47
|
+
semantic_type: FieldSemanticType.nullable()
|
|
48
|
+
});
|
|
49
|
+
const ReplacementColumnError = z.enum([
|
|
50
|
+
"column-type-mismatch",
|
|
51
|
+
"missing-primary-key",
|
|
52
|
+
"missing-foreign-key",
|
|
53
|
+
"foreign-key-mismatch"
|
|
54
|
+
]);
|
|
55
|
+
const ReplacementColumnMatched = z.object({
|
|
56
|
+
source: ReplacementColumn,
|
|
57
|
+
target: ReplacementColumn,
|
|
58
|
+
errors: z.array(ReplacementColumnError).optional()
|
|
59
|
+
}).strict();
|
|
60
|
+
const ReplacementColumnMissingOnTarget = z.object({ source: ReplacementColumn }).strict();
|
|
61
|
+
const ReplacementColumnMissingOnSource = z.object({ target: ReplacementColumn }).strict();
|
|
62
|
+
const ReplacementColumnMapping = z.union([
|
|
63
|
+
ReplacementColumnMatched,
|
|
64
|
+
ReplacementColumnMissingOnTarget,
|
|
65
|
+
ReplacementColumnMissingOnSource
|
|
66
|
+
]);
|
|
67
|
+
const ReplacementError = z.enum([
|
|
68
|
+
"cycle-detected",
|
|
69
|
+
"database-mismatch",
|
|
70
|
+
"incompatible-implicit-joins",
|
|
71
|
+
"affects-gtap-policies"
|
|
72
|
+
]);
|
|
73
|
+
const ReplacementCheck = z.object({
|
|
74
|
+
success: z.boolean(),
|
|
75
|
+
errors: z.array(ReplacementError).optional(),
|
|
76
|
+
column_mappings: z.array(ReplacementColumnMapping).optional()
|
|
77
|
+
});
|
|
78
|
+
const ReplacementSourceInput = z.object({
|
|
79
|
+
source_entity_id: z.number().int().positive(),
|
|
80
|
+
source_entity_type: ReplacementSourceType,
|
|
81
|
+
target_entity_id: z.number().int().positive(),
|
|
82
|
+
target_entity_type: ReplacementSourceType
|
|
83
|
+
}).strict();
|
|
84
|
+
const ReplacementModelWithTransformInput = z.object({
|
|
85
|
+
card_id: z.number().int().positive(),
|
|
86
|
+
transform_name: z.string(),
|
|
87
|
+
transform_target: TransformTarget,
|
|
88
|
+
target_collection_id: z.number().int().positive().nullable().optional(),
|
|
89
|
+
transform_tag_ids: z.array(z.number().int().positive()).nullable().optional()
|
|
90
|
+
}).strict();
|
|
91
|
+
const ReplacementRunStarted = z.object({ run_id: z.number().int().positive() });
|
|
92
|
+
//#endregion
|
|
93
|
+
export { ReplacementCheck, ReplacementColumn, ReplacementColumnError, ReplacementColumnMapping, ReplacementEntityType, ReplacementError, ReplacementModelWithTransformInput, ReplacementRun, ReplacementRunCompact, ReplacementRunStarted, ReplacementRunStatus, ReplacementSourceInput, ReplacementSourceType };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as RevisionRevert, i as RevisionEntity, n as Revision, o as RevisionRevertInput, r as RevisionCompact, s as RevisionRow, t as REVISION_ENTITY_GATES } from "../revision-Dyl-8p7d.js";
|
|
2
|
+
export { REVISION_ENTITY_GATES, Revision, RevisionCompact, RevisionEntity, RevisionRevert, RevisionRevertInput, RevisionRow };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { t as gateInput } from "../input-gate-registry-Dai7SfXb.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/domain/revision.ts
|
|
4
|
+
const RevisionEntity = z.enum([
|
|
5
|
+
"card",
|
|
6
|
+
"dashboard",
|
|
7
|
+
"document",
|
|
8
|
+
"measure",
|
|
9
|
+
"segment",
|
|
10
|
+
"transform",
|
|
11
|
+
"transform-test"
|
|
12
|
+
]);
|
|
13
|
+
const RevisionUser = z.object({
|
|
14
|
+
id: z.number().int(),
|
|
15
|
+
first_name: z.string().nullable(),
|
|
16
|
+
last_name: z.string().nullable(),
|
|
17
|
+
common_name: z.string()
|
|
18
|
+
}).loose();
|
|
19
|
+
const Revision = z.object({
|
|
20
|
+
id: z.number().int(),
|
|
21
|
+
timestamp: z.string(),
|
|
22
|
+
is_creation: z.boolean(),
|
|
23
|
+
is_reversion: z.boolean(),
|
|
24
|
+
most_recent: z.boolean(),
|
|
25
|
+
diff: z.object({}).loose().nullable(),
|
|
26
|
+
description: z.string(),
|
|
27
|
+
has_multiple_changes: z.boolean(),
|
|
28
|
+
user: RevisionUser
|
|
29
|
+
}).loose();
|
|
30
|
+
const RevisionCompact = Revision.pick({
|
|
31
|
+
id: true,
|
|
32
|
+
timestamp: true,
|
|
33
|
+
is_creation: true,
|
|
34
|
+
is_reversion: true,
|
|
35
|
+
description: true,
|
|
36
|
+
user: true
|
|
37
|
+
}).strip();
|
|
38
|
+
const RevisionRow = z.object({
|
|
39
|
+
id: z.number().int(),
|
|
40
|
+
model: z.string(),
|
|
41
|
+
model_id: z.number().int(),
|
|
42
|
+
user_id: z.number().int(),
|
|
43
|
+
object: z.object({}).loose(),
|
|
44
|
+
timestamp: z.string(),
|
|
45
|
+
is_creation: z.boolean(),
|
|
46
|
+
is_reversion: z.boolean(),
|
|
47
|
+
most_recent: z.boolean()
|
|
48
|
+
}).loose();
|
|
49
|
+
const REVISION_ENTITY_GATES = [
|
|
50
|
+
{
|
|
51
|
+
feature: "measures",
|
|
52
|
+
effect: "needs",
|
|
53
|
+
when: {
|
|
54
|
+
kind: "values",
|
|
55
|
+
values: ["measure"]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
feature: "transforms",
|
|
60
|
+
effect: "needs",
|
|
61
|
+
when: {
|
|
62
|
+
kind: "values",
|
|
63
|
+
values: ["transform"]
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
feature: "transformTests",
|
|
68
|
+
effect: "needs",
|
|
69
|
+
when: {
|
|
70
|
+
kind: "values",
|
|
71
|
+
values: ["transform-test"]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
];
|
|
75
|
+
const RevisionRevertInput = z.object({
|
|
76
|
+
entity: gateInput(z.enum(RevisionEntity.options), ...REVISION_ENTITY_GATES),
|
|
77
|
+
id: z.number().int().positive(),
|
|
78
|
+
revision_id: z.number().int().positive()
|
|
79
|
+
}).strict();
|
|
80
|
+
const RevisionReverted = z.object({
|
|
81
|
+
outcome: z.literal("reverted"),
|
|
82
|
+
revision: Revision
|
|
83
|
+
});
|
|
84
|
+
const RevisionUnchanged = z.object({
|
|
85
|
+
outcome: z.literal("unchanged"),
|
|
86
|
+
revision: RevisionRow
|
|
87
|
+
});
|
|
88
|
+
const RevisionRevert = z.discriminatedUnion("outcome", [RevisionReverted, RevisionUnchanged]);
|
|
89
|
+
//#endregion
|
|
90
|
+
export { REVISION_ENTITY_GATES, Revision, RevisionCompact, RevisionEntity, RevisionRevert, RevisionRevertInput, RevisionRow };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ModerationStatus } from "./moderation-review.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/domain/search.ts
|
|
4
|
+
const SEARCH_MODELS = [
|
|
5
|
+
"card",
|
|
6
|
+
"dataset",
|
|
7
|
+
"metric",
|
|
8
|
+
"dashboard",
|
|
9
|
+
"collection",
|
|
10
|
+
"database",
|
|
11
|
+
"table",
|
|
12
|
+
"segment",
|
|
13
|
+
"measure",
|
|
14
|
+
"document",
|
|
15
|
+
"exploration",
|
|
16
|
+
"action",
|
|
17
|
+
"transform",
|
|
18
|
+
"indexed-entity"
|
|
19
|
+
];
|
|
20
|
+
const SearchModel = z.enum(SEARCH_MODELS);
|
|
21
|
+
const SearchResultCollection = z.object({
|
|
22
|
+
id: z.union([
|
|
23
|
+
z.number().int(),
|
|
24
|
+
z.string(),
|
|
25
|
+
z.null()
|
|
26
|
+
]),
|
|
27
|
+
name: z.string().nullable(),
|
|
28
|
+
authority_level: z.string().nullable(),
|
|
29
|
+
type: z.string().nullable()
|
|
30
|
+
}).loose();
|
|
31
|
+
const SearchResultDashboard = z.object({
|
|
32
|
+
id: z.number().int(),
|
|
33
|
+
name: z.string()
|
|
34
|
+
}).loose();
|
|
35
|
+
const SearchResult = z.object({
|
|
36
|
+
id: z.union([z.number().int(), z.string()]),
|
|
37
|
+
name: z.string(),
|
|
38
|
+
model: SearchModel,
|
|
39
|
+
description: z.string().nullable().optional(),
|
|
40
|
+
archived: z.boolean().nullable(),
|
|
41
|
+
collection: SearchResultCollection.nullable(),
|
|
42
|
+
result_metadata: z.array(z.unknown()).nullable().optional(),
|
|
43
|
+
database_id: z.number().int().nullable().optional(),
|
|
44
|
+
database_name: z.string().nullable().optional(),
|
|
45
|
+
table_schema: z.string().nullable().optional(),
|
|
46
|
+
table_name: z.string().nullable().optional(),
|
|
47
|
+
moderated_status: ModerationStatus.nullable().optional(),
|
|
48
|
+
dashboard: SearchResultDashboard.nullable().optional()
|
|
49
|
+
}).loose();
|
|
50
|
+
const SearchResultCompact = SearchResult.pick({
|
|
51
|
+
id: true,
|
|
52
|
+
name: true,
|
|
53
|
+
model: true,
|
|
54
|
+
description: true,
|
|
55
|
+
database_name: true,
|
|
56
|
+
table_schema: true,
|
|
57
|
+
table_name: true
|
|
58
|
+
}).strip().extend({ dashboard: SearchResultDashboard.pick({
|
|
59
|
+
id: true,
|
|
60
|
+
name: true
|
|
61
|
+
}).strip().nullable().optional() });
|
|
62
|
+
//#endregion
|
|
63
|
+
export { SEARCH_MODELS, SearchModel, SearchResult, SearchResultCompact };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { t as gateInput } from "../input-gate-registry-Dai7SfXb.js";
|
|
2
|
+
import { TABLE_FROM_DEFINITION_GATE } from "./table.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/domain/segment.ts
|
|
5
|
+
const Segment = z.object({
|
|
6
|
+
id: z.number().int(),
|
|
7
|
+
name: z.string(),
|
|
8
|
+
description: z.string().nullable(),
|
|
9
|
+
archived: z.boolean(),
|
|
10
|
+
table_id: z.number().int(),
|
|
11
|
+
definition: z.unknown(),
|
|
12
|
+
creator_id: z.number().int(),
|
|
13
|
+
entity_id: z.string().nullable(),
|
|
14
|
+
show_in_getting_started: z.boolean().nullable(),
|
|
15
|
+
caveats: z.string().nullable(),
|
|
16
|
+
points_of_interest: z.string().nullable(),
|
|
17
|
+
definition_description: z.string().nullable().optional(),
|
|
18
|
+
created_at: z.string(),
|
|
19
|
+
updated_at: z.string()
|
|
20
|
+
}).loose();
|
|
21
|
+
const SegmentCompact = Segment.pick({
|
|
22
|
+
id: true,
|
|
23
|
+
name: true,
|
|
24
|
+
description: true,
|
|
25
|
+
archived: true,
|
|
26
|
+
table_id: true
|
|
27
|
+
}).strip();
|
|
28
|
+
const SegmentDefinition = z.record(z.string(), z.unknown()).describe("MBQL query holding the filter");
|
|
29
|
+
const SegmentCreateInput = z.object({
|
|
30
|
+
name: z.string().min(1),
|
|
31
|
+
table_id: gateInput(z.number().int().positive(), TABLE_FROM_DEFINITION_GATE),
|
|
32
|
+
definition: SegmentDefinition,
|
|
33
|
+
description: z.string().nullable().optional()
|
|
34
|
+
}).loose();
|
|
35
|
+
const SegmentUpdateInput = z.object({
|
|
36
|
+
name: z.string().min(1).nullable().optional(),
|
|
37
|
+
definition: SegmentDefinition.nullable().optional(),
|
|
38
|
+
revision_message: z.string().min(1),
|
|
39
|
+
archived: z.boolean().nullable().optional(),
|
|
40
|
+
description: z.string().nullable().optional(),
|
|
41
|
+
caveats: z.string().nullable().optional(),
|
|
42
|
+
points_of_interest: z.string().nullable().optional(),
|
|
43
|
+
show_in_getting_started: z.boolean().nullable().optional()
|
|
44
|
+
}).loose();
|
|
45
|
+
//#endregion
|
|
46
|
+
export { Segment, SegmentCompact, SegmentCreateInput, SegmentUpdateInput };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/domain/session-properties.ts
|
|
3
|
+
const ServerVersion = z.object({
|
|
4
|
+
tag: z.string(),
|
|
5
|
+
date: z.string().optional(),
|
|
6
|
+
hash: z.string().optional()
|
|
7
|
+
}).loose();
|
|
8
|
+
const TokenFeatures = z.record(z.string(), z.boolean());
|
|
9
|
+
const SessionProperties = z.object({
|
|
10
|
+
version: ServerVersion,
|
|
11
|
+
"token-features": TokenFeatures.optional()
|
|
12
|
+
}).loose();
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SessionProperties, TokenFeatures };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/domain/setting.ts
|
|
3
|
+
const Setting = z.object({
|
|
4
|
+
key: z.string(),
|
|
5
|
+
value: z.unknown(),
|
|
6
|
+
is_env_setting: z.boolean(),
|
|
7
|
+
env_name: z.string(),
|
|
8
|
+
description: z.string(),
|
|
9
|
+
default: z.unknown()
|
|
10
|
+
}).loose();
|
|
11
|
+
const SettingCompact = Setting.pick({
|
|
12
|
+
key: true,
|
|
13
|
+
value: true,
|
|
14
|
+
is_env_setting: true,
|
|
15
|
+
env_name: true
|
|
16
|
+
}).strip();
|
|
17
|
+
const SettingValue = z.object({
|
|
18
|
+
key: z.string(),
|
|
19
|
+
value: z.unknown()
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Setting, SettingCompact, SettingValue };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/domain/setup.ts
|
|
3
|
+
const SetupUserInput = z.object({
|
|
4
|
+
first_name: z.string().min(1).nullable().optional(),
|
|
5
|
+
last_name: z.string().min(1).nullable().optional(),
|
|
6
|
+
email: z.string(),
|
|
7
|
+
password: z.string().min(1).describe("must satisfy the server's password complexity requirements")
|
|
8
|
+
}).loose();
|
|
9
|
+
const SetupPrefsInput = z.object({
|
|
10
|
+
site_name: z.string().min(1),
|
|
11
|
+
site_locale: z.string().min(1).nullable().optional()
|
|
12
|
+
}).loose();
|
|
13
|
+
const SetupInput = z.object({
|
|
14
|
+
token: z.string().min(1),
|
|
15
|
+
user: SetupUserInput,
|
|
16
|
+
prefs: SetupPrefsInput
|
|
17
|
+
}).loose();
|
|
18
|
+
const SetupResult = z.object({ id: z.string() }).loose();
|
|
19
|
+
const SetupResultCompact = SetupResult.pick({ id: true }).strip();
|
|
20
|
+
//#endregion
|
|
21
|
+
export { SetupInput, SetupResult, SetupResultCompact };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/domain/snippet.ts
|
|
3
|
+
const Snippet = z.object({
|
|
4
|
+
id: z.number().int(),
|
|
5
|
+
name: z.string(),
|
|
6
|
+
description: z.string().nullable(),
|
|
7
|
+
content: z.string(),
|
|
8
|
+
archived: z.boolean(),
|
|
9
|
+
collection_id: z.number().int().nullable(),
|
|
10
|
+
creator_id: z.number().int(),
|
|
11
|
+
entity_id: z.string().nullable(),
|
|
12
|
+
template_tags: z.record(z.string(), z.unknown()).nullable(),
|
|
13
|
+
created_at: z.string(),
|
|
14
|
+
updated_at: z.string()
|
|
15
|
+
}).loose();
|
|
16
|
+
const SnippetCompact = Snippet.pick({
|
|
17
|
+
id: true,
|
|
18
|
+
name: true,
|
|
19
|
+
description: true,
|
|
20
|
+
archived: true,
|
|
21
|
+
collection_id: true
|
|
22
|
+
}).strip();
|
|
23
|
+
const snippetName = z.string().regex(/^(?!\s)[^}]*$/, "snippet names cannot include '}' or start with spaces");
|
|
24
|
+
const SnippetCreateInput = z.object({
|
|
25
|
+
name: snippetName,
|
|
26
|
+
content: z.string(),
|
|
27
|
+
description: z.string().nullable().optional(),
|
|
28
|
+
collection_id: z.number().int().positive().nullable().optional()
|
|
29
|
+
}).loose();
|
|
30
|
+
const SnippetUpdateInput = z.object({
|
|
31
|
+
name: snippetName.nullable().optional(),
|
|
32
|
+
content: z.string().nullable().optional(),
|
|
33
|
+
description: z.string().nullable().optional(),
|
|
34
|
+
archived: z.boolean().nullable().optional(),
|
|
35
|
+
collection_id: z.number().int().positive().nullable().optional()
|
|
36
|
+
}).loose();
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Snippet, SnippetCompact, SnippetCreateInput, SnippetUpdateInput };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as TableSelectionResult, E as TableVisibilityType, S as TableSchemaSyncResult, T as TableUpdateInput, _ as TableForeignKeyCompact, a as Table, b as TableQueryMetadataCompact, c as TableBulkEditResult, d as TableDataLayerMedallion, f as TableDataLayerTier, g as TableForeignKey, h as TableFieldValuesResult, i as TABLE_FROM_DEFINITION_GATE, l as TableCompact, m as TableDatabase, n as DATA_LAYER_MEDALLION_GATE, o as TableBulkEditFields, p as TableDataSource, r as DATA_LAYER_TIER_GATE, s as TableBulkEditInput, t as DATA_AUTHORITY_WITHDRAWAL_GATE, u as TableDataLayer, v as TableGetInclude, w as TableSelectors, x as TableSchemaId, y as TableQueryMetadata } from "../table-Od6uvDVW.js";
|
|
2
|
+
export { DATA_AUTHORITY_WITHDRAWAL_GATE, DATA_LAYER_MEDALLION_GATE, DATA_LAYER_TIER_GATE, TABLE_FROM_DEFINITION_GATE, Table, TableBulkEditFields, TableBulkEditInput, TableBulkEditResult, TableCompact, TableDataLayer, TableDataLayerMedallion, TableDataLayerTier, TableDataSource, TableDatabase, TableFieldValuesResult, TableForeignKey, TableForeignKeyCompact, TableGetInclude, TableQueryMetadata, TableQueryMetadataCompact, TableSchemaId, TableSchemaSyncResult, TableSelectionResult, TableSelectors, TableUpdateInput, TableVisibilityType };
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { t as gateInput } from "../input-gate-registry-Dai7SfXb.js";
|
|
2
|
+
import { Field, FieldCompact, FieldWithTarget } from "./field.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/domain/table.ts
|
|
5
|
+
const TableEntityType = z.enum([
|
|
6
|
+
"entity/GenericTable",
|
|
7
|
+
"entity/UserTable",
|
|
8
|
+
"entity/CompanyTable",
|
|
9
|
+
"entity/TransactionTable",
|
|
10
|
+
"entity/ProductTable",
|
|
11
|
+
"entity/SubscriptionTable",
|
|
12
|
+
"entity/EventTable"
|
|
13
|
+
]);
|
|
14
|
+
const TableVisibilityType = z.enum([
|
|
15
|
+
"hidden",
|
|
16
|
+
"technical",
|
|
17
|
+
"cruft"
|
|
18
|
+
]);
|
|
19
|
+
const TableFieldOrder = z.enum([
|
|
20
|
+
"alphabetical",
|
|
21
|
+
"custom",
|
|
22
|
+
"database",
|
|
23
|
+
"smart"
|
|
24
|
+
]);
|
|
25
|
+
const TableDataAuthority = z.enum([
|
|
26
|
+
"unconfigured",
|
|
27
|
+
"authoritative",
|
|
28
|
+
"computed",
|
|
29
|
+
"ingested"
|
|
30
|
+
]);
|
|
31
|
+
const TableDataLayerTier = z.enum([
|
|
32
|
+
"final",
|
|
33
|
+
"internal",
|
|
34
|
+
"hidden"
|
|
35
|
+
]);
|
|
36
|
+
const TableDataLayerMedallion = z.enum([
|
|
37
|
+
"gold",
|
|
38
|
+
"silver",
|
|
39
|
+
"bronze",
|
|
40
|
+
"copper"
|
|
41
|
+
]);
|
|
42
|
+
const TableDataLayer = z.enum([...TableDataLayerTier.options, ...TableDataLayerMedallion.options]);
|
|
43
|
+
const Table = z.object({
|
|
44
|
+
id: z.number().int(),
|
|
45
|
+
name: z.string(),
|
|
46
|
+
display_name: z.string(),
|
|
47
|
+
description: z.string().nullable(),
|
|
48
|
+
caveats: z.string().nullable(),
|
|
49
|
+
db_id: z.number().int(),
|
|
50
|
+
schema: z.string().nullable(),
|
|
51
|
+
entity_type: TableEntityType.nullable(),
|
|
52
|
+
visibility_type: TableVisibilityType.nullable().optional(),
|
|
53
|
+
data_layer: TableDataLayer.nullable(),
|
|
54
|
+
estimated_row_count: z.number().int().nullable(),
|
|
55
|
+
active: z.boolean(),
|
|
56
|
+
is_published: z.boolean().optional(),
|
|
57
|
+
collection_id: z.number().int().nullable().optional(),
|
|
58
|
+
fields: z.array(Field).optional()
|
|
59
|
+
}).loose();
|
|
60
|
+
const TableDatabase = z.object({
|
|
61
|
+
id: z.number().int(),
|
|
62
|
+
name: z.string(),
|
|
63
|
+
engine: z.string(),
|
|
64
|
+
features: z.array(z.string()).optional()
|
|
65
|
+
}).loose();
|
|
66
|
+
const TableQueryMetadata = Table.extend({
|
|
67
|
+
fields: z.array(FieldWithTarget),
|
|
68
|
+
db: TableDatabase
|
|
69
|
+
});
|
|
70
|
+
const TableGetInclude = z.enum(["fields"]);
|
|
71
|
+
const TableCompact = Table.pick({
|
|
72
|
+
id: true,
|
|
73
|
+
name: true,
|
|
74
|
+
display_name: true,
|
|
75
|
+
description: true,
|
|
76
|
+
db_id: true,
|
|
77
|
+
schema: true,
|
|
78
|
+
entity_type: true,
|
|
79
|
+
visibility_type: true,
|
|
80
|
+
active: true,
|
|
81
|
+
is_published: true
|
|
82
|
+
}).strip().extend({ fields: z.array(FieldCompact).optional() });
|
|
83
|
+
const TableQueryMetadataCompact = TableCompact.extend({ fields: z.array(FieldCompact) });
|
|
84
|
+
const DATA_LAYER_TIER_GATE = {
|
|
85
|
+
feature: "tableDataLayerTiers",
|
|
86
|
+
effect: "needs",
|
|
87
|
+
when: {
|
|
88
|
+
kind: "values",
|
|
89
|
+
values: TableDataLayerTier.options
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const DATA_LAYER_MEDALLION_GATE = {
|
|
93
|
+
feature: "tableDataLayerTiers",
|
|
94
|
+
effect: "supersededBy",
|
|
95
|
+
when: {
|
|
96
|
+
kind: "values",
|
|
97
|
+
values: TableDataLayerMedallion.options
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const TABLE_FROM_DEFINITION_GATE = {
|
|
101
|
+
feature: "tableFromDefinition",
|
|
102
|
+
effect: "droppedBy",
|
|
103
|
+
when: { kind: "present" }
|
|
104
|
+
};
|
|
105
|
+
const DATA_AUTHORITY_WITHDRAWAL_GATE = {
|
|
106
|
+
feature: "tableUserValueWithdrawal",
|
|
107
|
+
effect: "needs",
|
|
108
|
+
when: {
|
|
109
|
+
kind: "values",
|
|
110
|
+
values: [null]
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const TableDataAuthorityInput = gateInput(TableDataAuthority.nullable().optional(), DATA_AUTHORITY_WITHDRAWAL_GATE);
|
|
114
|
+
const TableDataSource = z.enum([
|
|
115
|
+
"unknown",
|
|
116
|
+
"ingested",
|
|
117
|
+
"metabase-transform",
|
|
118
|
+
"transform",
|
|
119
|
+
"source-data",
|
|
120
|
+
"upload"
|
|
121
|
+
]);
|
|
122
|
+
const TableUpdateInput = z.object({
|
|
123
|
+
display_name: z.string().min(1).optional(),
|
|
124
|
+
entity_type: TableEntityType.optional(),
|
|
125
|
+
visibility_type: TableVisibilityType.nullable().optional(),
|
|
126
|
+
description: z.string().nullable().optional(),
|
|
127
|
+
caveats: z.string().nullable().optional(),
|
|
128
|
+
points_of_interest: z.string().nullable().optional(),
|
|
129
|
+
show_in_getting_started: z.boolean().optional(),
|
|
130
|
+
field_order: TableFieldOrder.optional(),
|
|
131
|
+
data_authority: TableDataAuthorityInput,
|
|
132
|
+
data_source: TableDataSource.nullable().optional(),
|
|
133
|
+
data_layer: gateInput(TableDataLayer.nullable().optional(), DATA_LAYER_TIER_GATE, DATA_LAYER_MEDALLION_GATE),
|
|
134
|
+
owner_email: z.string().nullable().optional(),
|
|
135
|
+
owner_user_id: z.number().int().nullable().optional(),
|
|
136
|
+
collection_id: z.number().int().positive().optional()
|
|
137
|
+
}).loose();
|
|
138
|
+
const TableSchemaId = z.string().regex(/^[1-9]\d{0,17}:[^:]*$/, { error: "expected a schema id \"<db-id>:<schema>\" with a positive database id" });
|
|
139
|
+
const TableSelectors = z.object({
|
|
140
|
+
database_ids: z.array(z.number().int().positive()).optional(),
|
|
141
|
+
schema_ids: z.array(TableSchemaId).optional(),
|
|
142
|
+
table_ids: z.array(z.number().int().positive()).optional()
|
|
143
|
+
}).strict();
|
|
144
|
+
const TableBulkEditFields = z.object({
|
|
145
|
+
data_authority: TableDataAuthorityInput,
|
|
146
|
+
data_source: TableDataSource.nullable().optional(),
|
|
147
|
+
data_layer: TableDataLayerTier.nullable().optional(),
|
|
148
|
+
entity_type: TableEntityType.nullable().optional(),
|
|
149
|
+
owner_email: z.string().nullable().optional(),
|
|
150
|
+
owner_user_id: z.number().int().positive().nullable().optional()
|
|
151
|
+
});
|
|
152
|
+
const TableBulkEditInput = TableSelectors.extend(TableBulkEditFields.shape).strict();
|
|
153
|
+
const TableSchemaSyncResult = z.object({
|
|
154
|
+
id: z.number().int(),
|
|
155
|
+
status: z.literal("ok")
|
|
156
|
+
});
|
|
157
|
+
const TableFieldValuesResult = z.object({
|
|
158
|
+
id: z.number().int(),
|
|
159
|
+
status: z.literal("success")
|
|
160
|
+
});
|
|
161
|
+
const TableSelectionResult = TableSelectors.extend({ accepted: z.literal(true) }).strict();
|
|
162
|
+
const TableBulkEditResult = TableBulkEditInput.extend({ accepted: z.literal(true) }).strict();
|
|
163
|
+
const TableForeignKeyEnd = Field.extend({ table: Table });
|
|
164
|
+
const TableForeignKey = z.object({
|
|
165
|
+
relationship: z.literal("Mt1"),
|
|
166
|
+
origin_id: z.number().int(),
|
|
167
|
+
origin: TableForeignKeyEnd,
|
|
168
|
+
destination_id: z.number().int(),
|
|
169
|
+
destination: TableForeignKeyEnd
|
|
170
|
+
}).loose();
|
|
171
|
+
const TableForeignKeyOriginCompact = FieldCompact.extend({ table: Table.pick({
|
|
172
|
+
id: true,
|
|
173
|
+
name: true,
|
|
174
|
+
display_name: true,
|
|
175
|
+
schema: true,
|
|
176
|
+
db_id: true
|
|
177
|
+
}).strip() });
|
|
178
|
+
const TableForeignKeyCompact = TableForeignKey.pick({
|
|
179
|
+
relationship: true,
|
|
180
|
+
origin_id: true,
|
|
181
|
+
destination_id: true
|
|
182
|
+
}).strip().extend({
|
|
183
|
+
origin: TableForeignKeyOriginCompact,
|
|
184
|
+
destination: FieldCompact
|
|
185
|
+
});
|
|
186
|
+
//#endregion
|
|
187
|
+
export { DATA_AUTHORITY_WITHDRAWAL_GATE, DATA_LAYER_MEDALLION_GATE, DATA_LAYER_TIER_GATE, TABLE_FROM_DEFINITION_GATE, Table, TableBulkEditFields, TableBulkEditInput, TableBulkEditResult, TableCompact, TableDataLayer, TableDataLayerMedallion, TableDataLayerTier, TableDataSource, TableDatabase, TableFieldValuesResult, TableForeignKey, TableForeignKeyCompact, TableGetInclude, TableQueryMetadata, TableQueryMetadataCompact, TableSchemaId, TableSchemaSyncResult, TableSelectionResult, TableSelectors, TableUpdateInput, TableVisibilityType };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as TimelineEventCompact, c as TimelineIcon, i as TimelineEvent, l as TimelineUpdateInput, n as TimelineCompact, o as TimelineEventCreateInput, r as TimelineCreateInput, s as TimelineEventUpdateInput, t as Timeline } from "../timeline-BK45hy-h.js";
|
|
2
|
+
export { Timeline, TimelineCompact, TimelineCreateInput, TimelineEvent, TimelineEventCompact, TimelineEventCreateInput, TimelineEventUpdateInput, TimelineIcon, TimelineUpdateInput };
|