@metabase/client 0.1.1 → 0.1.3
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 +11 -0
- package/README.md +5 -3
- 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-BxBzr5Uj.d.ts → card-BBLDmhtp.d.ts} +1 -1
- package/dist/{card-DN0sLkCG.d.ts → card-DkHtPMK4.d.ts} +3 -3
- package/dist/{client-DdXLlH1B.d.ts → client-eOkt3tTd.d.ts} +100 -82
- package/dist/client.d.ts +1 -1
- package/dist/{collection-DGnTvD6R.d.ts → collection-BtjnSckn.d.ts} +10 -10
- package/dist/{collection-fFahL-ub.d.ts → collection-DWjkDrln.d.ts} +4 -4
- package/dist/{credential-6aOEGqMH.d.ts → credential-B6fKSvqp.d.ts} +1 -1
- package/dist/{dashboard-CM7RmNeE.d.ts → dashboard-B4qWeR10.d.ts} +1 -1
- package/dist/{data-action-CkXVrOUH.d.ts → data-action-DqwcRA7B.d.ts} +61 -10
- package/dist/{database-B0JNZjDN.d.ts → database-Cw8ICtQi.d.ts} +3 -3
- package/dist/{database-BxqDmfcj.d.ts → database-DULVEXki.d.ts} +1 -1
- package/dist/{dataset-BUirJ1rO.d.ts → dataset-26H-dH4N.d.ts} +3 -3
- package/dist/{dataset-BBNGPVec.d.ts → dataset-Du1GRHhd.d.ts} +6 -6
- package/dist/{dependency-arB8Cr2H.d.ts → dependency-B8aPt_IM.d.ts} +33 -33
- package/dist/{dependency-CzpXmeu7.d.ts → dependency-elYkHuk5.d.ts} +25 -25
- package/dist/{document-tLd6pYWe.d.ts → document-rqUlE_OE.d.ts} +1 -1
- package/dist/domain/card.d.ts +1 -1
- package/dist/domain/collection.d.ts +1 -1
- package/dist/domain/data-action.d.ts +2 -2
- package/dist/domain/data-action.js +43 -10
- package/dist/domain/database.d.ts +1 -1
- package/dist/domain/dataset.d.ts +1 -1
- package/dist/domain/dependency.d.ts +1 -1
- package/dist/domain/document.d.ts +1 -1
- package/dist/domain/eid-translation.d.ts +1 -1
- package/dist/domain/field.d.ts +1 -1
- package/dist/domain/git-sync.d.ts +1 -1
- package/dist/domain/metric.d.ts +1 -1
- package/dist/domain/replacement.d.ts +1 -1
- package/dist/domain/revision.d.ts +1 -1
- package/dist/domain/search.d.ts +1 -1
- package/dist/domain/table.d.ts +1 -1
- package/dist/domain/timeline.d.ts +1 -1
- package/dist/domain/transform-inspector.d.ts +1 -1
- package/dist/{eid-translation-CH6NPWd-.d.ts → eid-translation-CP79Tz71.d.ts} +5 -5
- package/dist/{erd-CbV7xvAc.d.ts → erd-D2fpjDTj.d.ts} +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/{field-p9Rme2zB.d.ts → field-D-kF3G7v.d.ts} +2 -2
- package/dist/{field-D1Pfk-0S.d.ts → field-awM3Y7IP.d.ts} +2 -2
- package/dist/{git-sync-BTf1aYHr.d.ts → git-sync-8Tk8TirZ.d.ts} +1 -1
- package/dist/{git-sync-C99SVdJ9.d.ts → git-sync-nvbSaNfS.d.ts} +1 -1
- package/dist/{glossary-DFvnz-E5.d.ts → glossary-CQMSJmIx.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 +26 -26
- package/dist/index.js +3 -3
- package/dist/{json-BksZpXDC.d.ts → json-DvOVLFVY.d.ts} +1 -1
- package/dist/json.d.ts +1 -1
- package/dist/{measure-lPz8qnwz.d.ts → measure-D4ArCbsa.d.ts} +1 -1
- package/dist/{metric-DcYloqOQ.d.ts → metric-BtEVH_Yp.d.ts} +1 -1
- package/dist/{notification-Cp5GJErS.d.ts → notification-BsuPAfMW.d.ts} +1 -1
- 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-COuL0Gzl.d.ts → paginate-Du9kUbXZ.d.ts} +1 -1
- package/dist/paginate.d.ts +1 -1
- package/dist/{pulse-BzKmz3Yn.d.ts → pulse-drQKS_pg.d.ts} +1 -1
- package/dist/{replacement-BGyggp-G.d.ts → replacement-CyvtbxGg.d.ts} +5 -5
- package/dist/{replacement-CVebCuNp.d.ts → replacement-g3IKzPPj.d.ts} +5 -5
- package/dist/{requirement-check-glU7wqhQ.d.ts → requirement-check-Nv0trVbp.d.ts} +1 -1
- package/dist/resources/api-key.d.ts +1 -1
- package/dist/resources/card.d.ts +1 -1
- package/dist/resources/collection.d.ts +1 -1
- package/dist/resources/collection.js +6 -1
- package/dist/resources/content-translation.d.ts +1 -1
- package/dist/resources/dashboard.d.ts +1 -1
- package/dist/resources/data-action.d.ts +22 -4
- package/dist/resources/data-action.js +10 -5
- package/dist/resources/data-app.d.ts +1 -1
- 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/document.d.ts +2 -2
- package/dist/resources/eid-translation.d.ts +2 -2
- package/dist/resources/erd.d.ts +1 -1
- package/dist/resources/field.d.ts +1 -1
- package/dist/resources/git-sync.d.ts +1 -1
- package/dist/resources/glossary.d.ts +1 -1
- package/dist/resources/library.d.ts +1 -1
- 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/optional-parsed.d.ts +1 -1
- package/dist/resources/permission.d.ts +1 -1
- package/dist/resources/pivot-export.d.ts +1 -1
- package/dist/resources/pulse.d.ts +1 -1
- package/dist/resources/replacement.d.ts +1 -1
- package/dist/resources/revision.d.ts +3 -3
- package/dist/resources/search.d.ts +1 -1
- package/dist/resources/segment.d.ts +1 -1
- package/dist/resources/setting.d.ts +1 -1
- package/dist/resources/setup.d.ts +1 -1
- package/dist/resources/snippet.d.ts +1 -1
- package/dist/resources/table.d.ts +1 -1
- package/dist/resources/timeline-event.d.ts +2 -2
- package/dist/resources/timeline.d.ts +1 -1
- package/dist/resources/transform-dag-run.d.ts +1 -1
- package/dist/resources/transform-inspector.d.ts +2 -2
- package/dist/resources/transform-job.d.ts +1 -1
- package/dist/resources/transform-python.d.ts +1 -1
- 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/upload.d.ts +1 -1
- package/dist/resources/user.d.ts +1 -1
- package/dist/{revision-Dyl-8p7d.d.ts → revision-Cft5Lcev.d.ts} +4 -4
- package/dist/{search-Cm5IxKss.d.ts → search-BUr4r7d2.d.ts} +5 -5
- package/dist/{search-Cten2h0I.d.ts → search-DX1IVRRC.d.ts} +2 -2
- package/dist/{segment-DQLX6r1E.d.ts → segment-c2EDEJNd.d.ts} +1 -1
- package/dist/signal.d.ts +3 -2
- package/dist/signal.js +9 -4
- package/dist/{snippet-Djn0rL21.d.ts → snippet-CSt-f812.d.ts} +1 -1
- package/dist/{table-CDZbLNow.d.ts → table-BA-k8Zgt.d.ts} +6 -6
- package/dist/{table-Od6uvDVW.d.ts → table-R-q8w__K.d.ts} +10 -10
- package/dist/{timeline-BK45hy-h.d.ts → timeline-B35sx1FM.d.ts} +31 -31
- package/dist/{timeline-BTs6fuRp.d.ts → timeline-D3Clk0_n.d.ts} +2 -2
- package/dist/{transform-WASQAXeA.d.ts → transform-DzgPup_a.d.ts} +2 -2
- package/dist/{transform-inspector-CMCh8WKV.d.ts → transform-inspector-BUYBt6--.d.ts} +4 -4
- package/dist/{transform-job-DmTwKxhc.d.ts → transform-job-DtLWrsyH.d.ts} +1 -1
- package/dist/{transform-test-CR_i54IV.d.ts → transform-test-B_HR-yKA.d.ts} +1 -1
- package/dist/{transport-BsXqRujn.d.ts → transport-CyHAGDqx.d.ts} +1 -1
- package/dist/{upload-B5YjVkSW.d.ts → upload-BSixoElJ.d.ts} +1 -1
- package/dist/version/capability-error.d.ts +1 -1
- package/dist/version/probe.d.ts +1 -1
- package/dist/version/profile.d.ts +1 -1
- package/dist/version/requirement-check.d.ts +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@ const DataActionBase = z.object({
|
|
|
18
18
|
model_id: z.number().int().nullable(),
|
|
19
19
|
database_id: z.number().int().nullable().optional(),
|
|
20
20
|
dataset_query: z.unknown().optional(),
|
|
21
|
+
kind: z.string().optional(),
|
|
22
|
+
table_id: z.number().int().nullable().optional(),
|
|
21
23
|
parameters: z.array(DataActionParameter).nullable(),
|
|
22
24
|
visualization_settings: z.unknown(),
|
|
23
25
|
archived: z.boolean(),
|
|
@@ -44,6 +46,7 @@ const DataActionCompact = DataAction.pick({
|
|
|
44
46
|
type: true,
|
|
45
47
|
collection_id: true,
|
|
46
48
|
database_id: true,
|
|
49
|
+
table_id: true,
|
|
47
50
|
archived: true
|
|
48
51
|
}).strip();
|
|
49
52
|
const DataActionParameterInput = z.object({
|
|
@@ -54,31 +57,56 @@ const DataActionParameterInput = z.object({
|
|
|
54
57
|
target: z.unknown(),
|
|
55
58
|
required: z.boolean().optional()
|
|
56
59
|
}).loose();
|
|
57
|
-
const
|
|
60
|
+
const ImplicitActionKind = z.enum([
|
|
61
|
+
"row/create",
|
|
62
|
+
"row/update",
|
|
63
|
+
"row/delete"
|
|
64
|
+
]);
|
|
65
|
+
const DataActionCreateCommon = {
|
|
58
66
|
name: z.string().min(1),
|
|
59
|
-
type: z.literal("query"),
|
|
60
|
-
database_id: z.number().int().positive(),
|
|
61
|
-
dataset_query: DatasetQuery,
|
|
62
67
|
parameters: z.array(DataActionParameterInput).optional(),
|
|
63
68
|
collection_id: z.number().int().positive().nullable().optional(),
|
|
64
69
|
description: z.string().nullable().optional(),
|
|
65
70
|
visualization_settings: z.unknown().optional()
|
|
71
|
+
};
|
|
72
|
+
const DataActionQueryCreateInput = z.object({
|
|
73
|
+
...DataActionCreateCommon,
|
|
74
|
+
type: z.literal("query"),
|
|
75
|
+
dataset_query: DatasetQuery
|
|
76
|
+
}).strict();
|
|
77
|
+
const DataActionImplicitCreateInput = z.object({
|
|
78
|
+
...DataActionCreateCommon,
|
|
79
|
+
type: z.literal("implicit"),
|
|
80
|
+
kind: ImplicitActionKind,
|
|
81
|
+
table_id: z.number().int().positive()
|
|
66
82
|
}).strict();
|
|
83
|
+
const DataActionCreateInput = z.discriminatedUnion("type", [DataActionQueryCreateInput, DataActionImplicitCreateInput]);
|
|
67
84
|
const DATA_ACTION_COLLECTION_GATE = {
|
|
68
85
|
feature: "dataActionCollections",
|
|
69
86
|
effect: "needs",
|
|
70
87
|
when: { kind: "present" }
|
|
71
88
|
};
|
|
72
|
-
const
|
|
89
|
+
const DATA_ACTION_TABLE_GATE = {
|
|
90
|
+
feature: "dataActionsWithoutModel",
|
|
91
|
+
effect: "needs",
|
|
92
|
+
when: { kind: "present" }
|
|
93
|
+
};
|
|
94
|
+
const DataActionUpdateCommon = {
|
|
73
95
|
name: z.string().min(1).optional(),
|
|
74
|
-
database_id: z.number().int().positive().optional(),
|
|
75
|
-
dataset_query: DatasetQuery.optional(),
|
|
76
96
|
parameters: z.array(DataActionParameterInput).optional(),
|
|
77
97
|
collection_id: gateInput(z.number().int().positive().nullable().optional(), DATA_ACTION_COLLECTION_GATE),
|
|
78
98
|
description: z.string().nullable().optional(),
|
|
79
99
|
visualization_settings: z.unknown().optional(),
|
|
80
100
|
archived: z.boolean().optional()
|
|
81
|
-
}
|
|
101
|
+
};
|
|
102
|
+
const DataActionUpdateInput = z.union([z.object({
|
|
103
|
+
...DataActionUpdateCommon,
|
|
104
|
+
dataset_query: DatasetQuery.optional()
|
|
105
|
+
}).strict(), z.object({
|
|
106
|
+
...DataActionUpdateCommon,
|
|
107
|
+
kind: ImplicitActionKind.optional(),
|
|
108
|
+
table_id: gateInput(z.number().int().positive().optional(), DATA_ACTION_TABLE_GATE)
|
|
109
|
+
}).strict()]);
|
|
82
110
|
const DataActionParameterValue = z.union([
|
|
83
111
|
z.string(),
|
|
84
112
|
z.number(),
|
|
@@ -86,6 +114,11 @@ const DataActionParameterValue = z.union([
|
|
|
86
114
|
z.null()
|
|
87
115
|
]);
|
|
88
116
|
const DataActionExecuteInput = z.object({ parameters: z.record(z.string(), DataActionParameterValue) }).strict();
|
|
89
|
-
const DataActionExecuteResult = z.object({
|
|
117
|
+
const DataActionExecuteResult = z.object({
|
|
118
|
+
"rows-affected": z.number().int().optional(),
|
|
119
|
+
"rows-updated": z.number().int().optional(),
|
|
120
|
+
"rows-deleted": z.number().int().optional(),
|
|
121
|
+
"created-row": z.record(z.string(), z.unknown()).optional()
|
|
122
|
+
}).loose();
|
|
90
123
|
//#endregion
|
|
91
|
-
export { DATA_ACTION_COLLECTION_GATE, DataAction, DataActionCompact, DataActionCreateInput, DataActionExecuteInput, DataActionExecuteResult, DataActionParameter, DataActionUpdateInput, dataActionSchema };
|
|
124
|
+
export { DATA_ACTION_COLLECTION_GATE, DATA_ACTION_TABLE_GATE, DataAction, DataActionCompact, DataActionCreateInput, DataActionExecuteInput, DataActionExecuteResult, DataActionParameter, DataActionUpdateInput, ImplicitActionKind, dataActionSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DatabaseSettings, c as DatabaseVirtualTable, d as DatabaseWithSettingsCompact, i as DatabaseListInclude, l as DatabaseVirtualTableCompact, n as DatabaseCompact, o as DatabaseSyncResult, r as DatabaseGetInclude, s as DatabaseUpdateInput, t as Database, u as DatabaseWithSettings } from "../database-
|
|
1
|
+
import { a as DatabaseSettings, c as DatabaseVirtualTable, d as DatabaseWithSettingsCompact, i as DatabaseListInclude, l as DatabaseVirtualTableCompact, n as DatabaseCompact, o as DatabaseSyncResult, r as DatabaseGetInclude, s as DatabaseUpdateInput, t as Database, u as DatabaseWithSettings } from "../database-DULVEXki.js";
|
|
2
2
|
export { Database, DatabaseCompact, DatabaseGetInclude, DatabaseListInclude, DatabaseSettings, DatabaseSyncResult, DatabaseUpdateInput, DatabaseVirtualTable, DatabaseVirtualTableCompact, DatabaseWithSettings, DatabaseWithSettingsCompact };
|
package/dist/domain/dataset.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as QueryMetadataTable, c as VirtualTable, i as QueryMetadataCompact, l as VirtualTableCompact, n as CompiledQueryCompact, o as VirtualField, r as QueryMetadata, s as VirtualFieldCompact, t as CompiledQuery } from "../dataset-
|
|
1
|
+
import { a as QueryMetadataTable, c as VirtualTable, i as QueryMetadataCompact, l as VirtualTableCompact, n as CompiledQueryCompact, o as VirtualField, r as QueryMetadata, s as VirtualFieldCompact, t as CompiledQuery } from "../dataset-Du1GRHhd.js";
|
|
2
2
|
export { CompiledQuery, CompiledQueryCompact, QueryMetadata, QueryMetadataCompact, QueryMetadataTable, VirtualField, VirtualFieldCompact, VirtualTable, VirtualTableCompact };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as DependentsSortColumn, a as DependencyEntityCompact, c as DependencyFindingError, d as DependencyGraphCompact, f as DependencyItemsSortColumn, g as DependencyUsageType, h as DependencyType, i as DependencyEntity, l as DependencyFindingErrorType, m as DependencyNodeCompact, n as BreakingSourceCompact, o as DependencyEntityData, p as DependencyNode, r as DependencyEdge, s as DependencyErrorSourceType, t as BreakingSource, u as DependencyGraph } from "../dependency-
|
|
1
|
+
import { _ as DependentsSortColumn, a as DependencyEntityCompact, c as DependencyFindingError, d as DependencyGraphCompact, f as DependencyItemsSortColumn, g as DependencyUsageType, h as DependencyType, i as DependencyEntity, l as DependencyFindingErrorType, m as DependencyNodeCompact, n as BreakingSourceCompact, o as DependencyEntityData, p as DependencyNode, r as DependencyEdge, s as DependencyErrorSourceType, t as BreakingSource, u as DependencyGraph } from "../dependency-B8aPt_IM.js";
|
|
2
2
|
export { BreakingSource, BreakingSourceCompact, DependencyEdge, DependencyEntity, DependencyEntityCompact, DependencyEntityData, DependencyErrorSourceType, DependencyFindingError, DependencyFindingErrorType, DependencyGraph, DependencyGraphCompact, DependencyItemsSortColumn, DependencyNode, DependencyNodeCompact, DependencyType, DependencyUsageType, DependentsSortColumn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DocumentUpdateInput, i as DocumentCreateInput, n as DocumentCompact, o as TipTapNode, r as DocumentCopyInput, s as TipTapNodeInput, t as Document } from "../document-
|
|
1
|
+
import { a as DocumentUpdateInput, i as DocumentCreateInput, n as DocumentCompact, o as TipTapNode, r as DocumentCopyInput, s as TipTapNodeInput, t as Document } from "../document-rqUlE_OE.js";
|
|
2
2
|
export { Document, DocumentCompact, DocumentCopyInput, DocumentCreateInput, DocumentUpdateInput, TipTapNode, TipTapNodeInput };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as EidTranslateResult, i as EidTranslateInput, n as EidModel, o as EidTranslateResultCompact, r as EidTranslateEntry, t as EID_MODELS } from "../eid-translation-
|
|
1
|
+
import { a as EidTranslateResult, i as EidTranslateInput, n as EidModel, o as EidTranslateResultCompact, r as EidTranslateEntry, t as EID_MODELS } from "../eid-translation-CP79Tz71.js";
|
|
2
2
|
export { EID_MODELS, EidModel, EidTranslateEntry, EidTranslateInput, EidTranslateResult, EidTranslateResultCompact };
|
package/dist/domain/field.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as FieldWithTarget, a as FieldCompact, b as hasDataSensitivity, c as FieldRemappedValue, d as FieldSummary, f as FieldUpdateInput, g as FieldWithDataSensitivityCompact, h as FieldWithDataSensitivity, i as FieldCoercionStrategy, l as FieldSearchMatches, m as FieldValuesCompact, n as Field, o as FieldDataSensitivity, p as FieldValues, r as FieldBaseType, s as FieldDetail, t as DATA_SENSITIVITY_GATE, u as FieldSemanticType, v as fieldDetailSchema, y as fieldRemappedValueSchema } from "../field-
|
|
1
|
+
import { _ as FieldWithTarget, a as FieldCompact, b as hasDataSensitivity, c as FieldRemappedValue, d as FieldSummary, f as FieldUpdateInput, g as FieldWithDataSensitivityCompact, h as FieldWithDataSensitivity, i as FieldCoercionStrategy, l as FieldSearchMatches, m as FieldValuesCompact, n as Field, o as FieldDataSensitivity, p as FieldValues, r as FieldBaseType, s as FieldDetail, t as DATA_SENSITIVITY_GATE, u as FieldSemanticType, v as fieldDetailSchema, y as fieldRemappedValueSchema } from "../field-D-kF3G7v.js";
|
|
2
2
|
export { DATA_SENSITIVITY_GATE, Field, FieldBaseType, FieldCoercionStrategy, FieldCompact, FieldDataSensitivity, FieldDetail, FieldRemappedValue, FieldSearchMatches, FieldSemanticType, FieldSummary, FieldUpdateInput, FieldValues, FieldValuesCompact, FieldWithDataSensitivity, FieldWithDataSensitivityCompact, FieldWithTarget, fieldDetailSchema, fieldRemappedValueSchema, hasDataSensitivity };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SyncTaskType, a as SyncExportPreflight, b as isSyncTaskTerminal, c as SyncForcePushCasualties, d as SyncRemoteChanges, f as SyncSettingsUpdateResult, g as SyncTaskStatus, h as SyncTaskCompact, i as SyncDirtyItemCompact, l as SyncImportResult, m as SyncTask, n as SyncBranchCreated, o as SyncExportPreflightCompact, p as SyncStashResult, r as SyncDirtyItem, s as SyncExportResult, t as RemoteSyncState, u as SyncMergeSummary, v as SyncType, y as isSyncTaskFailed } from "../git-sync-
|
|
1
|
+
import { _ as SyncTaskType, a as SyncExportPreflight, b as isSyncTaskTerminal, c as SyncForcePushCasualties, d as SyncRemoteChanges, f as SyncSettingsUpdateResult, g as SyncTaskStatus, h as SyncTaskCompact, i as SyncDirtyItemCompact, l as SyncImportResult, m as SyncTask, n as SyncBranchCreated, o as SyncExportPreflightCompact, p as SyncStashResult, r as SyncDirtyItem, s as SyncExportResult, t as RemoteSyncState, u as SyncMergeSummary, v as SyncType, y as isSyncTaskFailed } from "../git-sync-nvbSaNfS.js";
|
|
2
2
|
export { RemoteSyncState, SyncBranchCreated, SyncDirtyItem, SyncDirtyItemCompact, SyncExportPreflight, SyncExportPreflightCompact, SyncExportResult, SyncForcePushCasualties, SyncImportResult, SyncMergeSummary, SyncRemoteChanges, SyncSettingsUpdateResult, SyncStashResult, SyncTask, SyncTaskCompact, SyncTaskStatus, SyncTaskType, SyncType, isSyncTaskFailed, isSyncTaskTerminal };
|
package/dist/domain/metric.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as MetricProjection, S as MetricMathOperator, _ as MetricInstanceFilter, a as MetricBreakoutValues, b as MetricMappingTarget, c as MetricDimensionCompact, d as MetricDimensionRef, f as MetricDimensionRefOptions, g as MetricFilterClause, h as MetricFilterArgument, i as MetricBreakoutColumn, l as MetricDimensionGroup, m as MetricDimensionStatus, n as MetricAddableGroup, o as MetricDefinition, p as MetricDimensionSource, r as MetricBinning, s as MetricDimension, t as MetricAddableDimension, u as MetricDimensionListing, v as MetricLeafRef, x as MetricMathExpression, y as MetricLeafType } from "../metric-
|
|
1
|
+
import { C as MetricProjection, S as MetricMathOperator, _ as MetricInstanceFilter, a as MetricBreakoutValues, b as MetricMappingTarget, c as MetricDimensionCompact, d as MetricDimensionRef, f as MetricDimensionRefOptions, g as MetricFilterClause, h as MetricFilterArgument, i as MetricBreakoutColumn, l as MetricDimensionGroup, m as MetricDimensionStatus, n as MetricAddableGroup, o as MetricDefinition, p as MetricDimensionSource, r as MetricBinning, s as MetricDimension, t as MetricAddableDimension, u as MetricDimensionListing, v as MetricLeafRef, x as MetricMathExpression, y as MetricLeafType } from "../metric-BtEVH_Yp.js";
|
|
2
2
|
export { MetricAddableDimension, MetricAddableGroup, MetricBinning, MetricBreakoutColumn, MetricBreakoutValues, MetricDefinition, MetricDimension, MetricDimensionCompact, MetricDimensionGroup, MetricDimensionListing, MetricDimensionRef, MetricDimensionRefOptions, MetricDimensionSource, MetricDimensionStatus, MetricFilterArgument, MetricFilterClause, MetricInstanceFilter, MetricLeafRef, MetricLeafType, MetricMappingTarget, MetricMathExpression, MetricMathOperator, MetricProjection };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ReplacementEntityType, c as ReplacementRun, d as ReplacementRunStatus, f as ReplacementSourceInput, i as ReplacementColumnMapping, l as ReplacementRunCompact, n as ReplacementColumn, o as ReplacementError, p as ReplacementSourceType, r as ReplacementColumnError, s as ReplacementModelWithTransformInput, t as ReplacementCheck, u as ReplacementRunStarted } from "../replacement-
|
|
1
|
+
import { a as ReplacementEntityType, c as ReplacementRun, d as ReplacementRunStatus, f as ReplacementSourceInput, i as ReplacementColumnMapping, l as ReplacementRunCompact, n as ReplacementColumn, o as ReplacementError, p as ReplacementSourceType, r as ReplacementColumnError, s as ReplacementModelWithTransformInput, t as ReplacementCheck, u as ReplacementRunStarted } from "../replacement-CyvtbxGg.js";
|
|
2
2
|
export { ReplacementCheck, ReplacementColumn, ReplacementColumnError, ReplacementColumnMapping, ReplacementEntityType, ReplacementError, ReplacementModelWithTransformInput, ReplacementRun, ReplacementRunCompact, ReplacementRunStarted, ReplacementRunStatus, ReplacementSourceInput, ReplacementSourceType };
|
|
@@ -1,2 +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-
|
|
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-Cft5Lcev.js";
|
|
2
2
|
export { REVISION_ENTITY_GATES, Revision, RevisionCompact, RevisionEntity, RevisionRevert, RevisionRevertInput, RevisionRow };
|
package/dist/domain/search.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as SearchResultCompact, n as SearchModel, r as SearchResult, t as SEARCH_MODELS } from "../search-
|
|
1
|
+
import { i as SearchResultCompact, n as SearchModel, r as SearchResult, t as SEARCH_MODELS } from "../search-BUr4r7d2.js";
|
|
2
2
|
export { SEARCH_MODELS, SearchModel, SearchResult, SearchResultCompact };
|
package/dist/domain/table.d.ts
CHANGED
|
@@ -1,2 +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-
|
|
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-R-q8w__K.js";
|
|
2
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 };
|
|
@@ -1,2 +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-
|
|
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-B35sx1FM.js";
|
|
2
2
|
export { Timeline, TimelineCompact, TimelineCreateInput, TimelineEvent, TimelineEventCompact, TimelineEventCreateInput, TimelineEventUpdateInput, TimelineIcon, TimelineUpdateInput };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as LensCardDisplay, c as LensDrillTrigger, d as LensSection, f as TransformInspection, h as TransformLensQueryInput, i as LensCard, l as LensMetadata, m as TransformLens, n as InspectorTable, o as LensCardMetadata, p as TransformInspectionStatus, r as LensAlertTrigger, s as LensComplexityLevel, t as InspectorField, u as LensParams } from "../transform-inspector-
|
|
1
|
+
import { a as LensCardDisplay, c as LensDrillTrigger, d as LensSection, f as TransformInspection, h as TransformLensQueryInput, i as LensCard, l as LensMetadata, m as TransformLens, n as InspectorTable, o as LensCardMetadata, p as TransformInspectionStatus, r as LensAlertTrigger, s as LensComplexityLevel, t as InspectorField, u as LensParams } from "../transform-inspector-BUYBt6--.js";
|
|
2
2
|
export { InspectorField, InspectorTable, LensAlertTrigger, LensCard, LensCardDisplay, LensCardMetadata, LensComplexityLevel, LensDrillTrigger, LensMetadata, LensParams, LensSection, TransformInspection, TransformInspectionStatus, TransformLens, TransformLensQueryInput };
|
|
@@ -2,7 +2,6 @@ import { z } from "zod";
|
|
|
2
2
|
//#region src/domain/eid-translation.d.ts
|
|
3
3
|
declare const EID_MODELS: readonly ["action", "card", "collection", "dashboard", "dashboard-card", "dashboard-tab", "dataset", "dimension", "document", "exploration", "measure", "metric", "permissions-group", "pulse", "pulse-card", "pulse-channel", "segment", "snippet", "timeline", "transform", "user"];
|
|
4
4
|
declare const EidModel: z.ZodEnum<{
|
|
5
|
-
transform: "transform";
|
|
6
5
|
collection: "collection";
|
|
7
6
|
card: "card";
|
|
8
7
|
dashboard: "dashboard";
|
|
@@ -14,6 +13,7 @@ declare const EidModel: z.ZodEnum<{
|
|
|
14
13
|
segment: "segment";
|
|
15
14
|
snippet: "snippet";
|
|
16
15
|
timeline: "timeline";
|
|
16
|
+
transform: "transform";
|
|
17
17
|
user: "user";
|
|
18
18
|
exploration: "exploration";
|
|
19
19
|
action: "action";
|
|
@@ -27,7 +27,6 @@ declare const EidModel: z.ZodEnum<{
|
|
|
27
27
|
type EidModel = z.infer<typeof EidModel>;
|
|
28
28
|
declare const EidTranslateInput: z.ZodObject<{
|
|
29
29
|
entity_ids: z.ZodRecord<z.ZodEnum<{
|
|
30
|
-
transform: "transform";
|
|
31
30
|
collection: "collection";
|
|
32
31
|
card: "card";
|
|
33
32
|
dashboard: "dashboard";
|
|
@@ -39,6 +38,7 @@ declare const EidTranslateInput: z.ZodObject<{
|
|
|
39
38
|
segment: "segment";
|
|
40
39
|
snippet: "snippet";
|
|
41
40
|
timeline: "timeline";
|
|
41
|
+
transform: "transform";
|
|
42
42
|
user: "user";
|
|
43
43
|
exploration: "exploration";
|
|
44
44
|
action: "action";
|
|
@@ -54,7 +54,6 @@ type EidTranslateInput = z.infer<typeof EidTranslateInput>;
|
|
|
54
54
|
declare const EidTranslateEntry: z.ZodObject<{
|
|
55
55
|
status: z.ZodString;
|
|
56
56
|
type: z.ZodEnum<{
|
|
57
|
-
transform: "transform";
|
|
58
57
|
collection: "collection";
|
|
59
58
|
card: "card";
|
|
60
59
|
dashboard: "dashboard";
|
|
@@ -66,6 +65,7 @@ declare const EidTranslateEntry: z.ZodObject<{
|
|
|
66
65
|
segment: "segment";
|
|
67
66
|
snippet: "snippet";
|
|
68
67
|
timeline: "timeline";
|
|
68
|
+
transform: "transform";
|
|
69
69
|
user: "user";
|
|
70
70
|
exploration: "exploration";
|
|
71
71
|
action: "action";
|
|
@@ -83,7 +83,6 @@ declare const EidTranslateResult: z.ZodObject<{
|
|
|
83
83
|
entity_ids: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
84
84
|
status: z.ZodString;
|
|
85
85
|
type: z.ZodEnum<{
|
|
86
|
-
transform: "transform";
|
|
87
86
|
collection: "collection";
|
|
88
87
|
card: "card";
|
|
89
88
|
dashboard: "dashboard";
|
|
@@ -95,6 +94,7 @@ declare const EidTranslateResult: z.ZodObject<{
|
|
|
95
94
|
segment: "segment";
|
|
96
95
|
snippet: "snippet";
|
|
97
96
|
timeline: "timeline";
|
|
97
|
+
transform: "transform";
|
|
98
98
|
user: "user";
|
|
99
99
|
exploration: "exploration";
|
|
100
100
|
action: "action";
|
|
@@ -113,7 +113,6 @@ declare const EidTranslateResultCompact: z.ZodObject<{
|
|
|
113
113
|
entity_ids: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
114
114
|
status: z.ZodString;
|
|
115
115
|
type: z.ZodEnum<{
|
|
116
|
-
transform: "transform";
|
|
117
116
|
collection: "collection";
|
|
118
117
|
card: "card";
|
|
119
118
|
dashboard: "dashboard";
|
|
@@ -125,6 +124,7 @@ declare const EidTranslateResultCompact: z.ZodObject<{
|
|
|
125
124
|
segment: "segment";
|
|
126
125
|
snippet: "snippet";
|
|
127
126
|
timeline: "timeline";
|
|
127
|
+
transform: "transform";
|
|
128
128
|
user: "user";
|
|
129
129
|
exploration: "exploration";
|
|
130
130
|
action: "action";
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as PartialWriteAnswer, G as DecodedResponseShapeDetail, H as AbortError, J as HttpTimeoutDetail, K as ErrorCategory, Q as NetworkErrorDetail, U as ChainedRequestError, W as ConfigError, X as MetabaseError, Y as InternalError, Z as NetworkError, _t as isNonInterruptFailure, at as ResponseShapeError, ct as TimeoutErrorDetail, dt as ValidationError, et as PartialWriteDetail, ft as ValidationErrorDetail, gt as isFileNotFoundError, ht as formatZodIssue, it as PollingTimeoutDetail, lt as UnknownError, mt as errorMessage, nt as PartialWriteReported, ot as ResponseShapeErrorDetail, pt as ZodResponseShapeDetail, q as FailedResultError, rt as PartialWriteUnreported, st as TimeoutError, tt as PartialWriteError, ut as UnknownErrorDetail, vt as toMetabaseError } from "./transport-
|
|
1
|
+
import { $ as PartialWriteAnswer, G as DecodedResponseShapeDetail, H as AbortError, J as HttpTimeoutDetail, K as ErrorCategory, Q as NetworkErrorDetail, U as ChainedRequestError, W as ConfigError, X as MetabaseError, Y as InternalError, Z as NetworkError, _t as isNonInterruptFailure, at as ResponseShapeError, ct as TimeoutErrorDetail, dt as ValidationError, et as PartialWriteDetail, ft as ValidationErrorDetail, gt as isFileNotFoundError, ht as formatZodIssue, it as PollingTimeoutDetail, lt as UnknownError, mt as errorMessage, nt as PartialWriteReported, ot as ResponseShapeErrorDetail, pt as ZodResponseShapeDetail, q as FailedResultError, rt as PartialWriteUnreported, st as TimeoutError, tt as PartialWriteError, ut as UnknownErrorDetail, vt as toMetabaseError } from "./transport-CyHAGDqx.js";
|
|
2
2
|
export { AbortError, ChainedRequestError, ConfigError, DecodedResponseShapeDetail, ErrorCategory, FailedResultError, HttpTimeoutDetail, InternalError, MetabaseError, NetworkError, NetworkErrorDetail, PartialWriteAnswer, PartialWriteDetail, PartialWriteError, PartialWriteReported, PartialWriteUnreported, PollingTimeoutDetail, ResponseShapeError, ResponseShapeErrorDetail, TimeoutError, TimeoutErrorDetail, UnknownError, UnknownErrorDetail, ValidationError, ValidationErrorDetail, ZodResponseShapeDetail, errorMessage, formatZodIssue, isFileNotFoundError, isNonInterruptFailure, toMetabaseError };
|
|
@@ -506,8 +506,8 @@ declare const FieldCompact: z.ZodObject<{
|
|
|
506
506
|
id: z.ZodNumber;
|
|
507
507
|
name: z.ZodString;
|
|
508
508
|
description: z.ZodNullable<z.ZodString>;
|
|
509
|
-
display_name: z.ZodString;
|
|
510
509
|
table_id: z.ZodNumber;
|
|
510
|
+
display_name: z.ZodString;
|
|
511
511
|
base_type: z.ZodEnum<{
|
|
512
512
|
"type/*": "type/*";
|
|
513
513
|
"type/field-values-unsupported": "type/field-values-unsupported";
|
|
@@ -2205,8 +2205,8 @@ declare const FieldWithDataSensitivityCompact: z.ZodObject<{
|
|
|
2205
2205
|
id: z.ZodNumber;
|
|
2206
2206
|
name: z.ZodString;
|
|
2207
2207
|
description: z.ZodNullable<z.ZodString>;
|
|
2208
|
-
display_name: z.ZodString;
|
|
2209
2208
|
table_id: z.ZodNumber;
|
|
2209
|
+
display_name: z.ZodString;
|
|
2210
2210
|
base_type: z.ZodEnum<{
|
|
2211
2211
|
"type/*": "type/*";
|
|
2212
2212
|
"type/field-values-unsupported": "type/field-values-unsupported";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "./transport-
|
|
2
|
-
import { c as FieldRemappedValue, d as FieldSummary, f as FieldUpdateInput, l as FieldSearchMatches, o as FieldDataSensitivity, p as FieldValues, s as FieldDetail } from "./field-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "./transport-CyHAGDqx.js";
|
|
2
|
+
import { c as FieldRemappedValue, d as FieldSummary, f as FieldUpdateInput, l as FieldSearchMatches, o as FieldDataSensitivity, p as FieldValues, s as FieldDetail } from "./field-D-kF3G7v.js";
|
|
3
3
|
//#region src/resources/field.d.ts
|
|
4
4
|
interface FieldSearchByValue {
|
|
5
5
|
value: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "./transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "./transport-CyHAGDqx.js";
|
|
2
2
|
import { t as ListResult } from "./list-BT_bBm9Z.js";
|
|
3
3
|
import { a as PollOptions } from "./poll-CIwnee7h.js";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -99,9 +99,9 @@ declare const SyncDirtyItem: z.ZodObject<{
|
|
|
99
99
|
type SyncDirtyItem = z.infer<typeof SyncDirtyItem>;
|
|
100
100
|
declare const SyncDirtyItemCompact: z.ZodObject<{
|
|
101
101
|
id: z.ZodNumber;
|
|
102
|
+
model: z.ZodString;
|
|
102
103
|
name: z.ZodNullable<z.ZodString>;
|
|
103
104
|
collection_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
104
|
-
model: z.ZodString;
|
|
105
105
|
sync_status: z.ZodString;
|
|
106
106
|
}, z.core.$strip>;
|
|
107
107
|
type SyncDirtyItemCompact = z.infer<typeof SyncDirtyItemCompact>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "./transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "./transport-CyHAGDqx.js";
|
|
2
2
|
import { t as ListResult } from "./list-BT_bBm9Z.js";
|
|
3
3
|
import { i as GlossaryUpdateInput, r as GlossaryCreateInput, t as Glossary } from "./glossary-CHK3elPj.js";
|
|
4
4
|
//#region src/resources/glossary.d.ts
|
package/dist/http/errors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as HttpErrorDetail, B as isHttpNotFound, D as FORBIDDEN_STATUS, E as FIELD_PATH_SEPARATOR, F as PAYMENT_REQUIRED_STATUS, I as RemoteSyncedDependent, L as TOO_MANY_REQUESTS_STATUS, M as HttpErrorKind, N as INTERNAL_SERVER_ERROR_STATUS, O as FieldErrors, P as NOT_FOUND_STATUS, R as UNAUTHORIZED_STATUS, T as CONFLICT_STATUS, V as isRetryableStatus, j as HttpErrorInput, k as HttpError, w as BAD_REQUEST_STATUS, z as chainRequestFailure } from "../transport-
|
|
1
|
+
import { A as HttpErrorDetail, B as isHttpNotFound, D as FORBIDDEN_STATUS, E as FIELD_PATH_SEPARATOR, F as PAYMENT_REQUIRED_STATUS, I as RemoteSyncedDependent, L as TOO_MANY_REQUESTS_STATUS, M as HttpErrorKind, N as INTERNAL_SERVER_ERROR_STATUS, O as FieldErrors, P as NOT_FOUND_STATUS, R as UNAUTHORIZED_STATUS, T as CONFLICT_STATUS, V as isRetryableStatus, j as HttpErrorInput, k as HttpError, w as BAD_REQUEST_STATUS, z as chainRequestFailure } from "../transport-CyHAGDqx.js";
|
|
2
2
|
export { BAD_REQUEST_STATUS, CONFLICT_STATUS, FIELD_PATH_SEPARATOR, FORBIDDEN_STATUS, FieldErrors, HttpError, HttpErrorDetail, HttpErrorInput, HttpErrorKind, INTERNAL_SERVER_ERROR_STATUS, NOT_FOUND_STATUS, PAYMENT_REQUIRED_STATUS, RemoteSyncedDependent, TOO_MANY_REQUESTS_STATUS, UNAUTHORIZED_STATUS, chainRequestFailure, isHttpNotFound, isRetryableStatus };
|
package/dist/http/oauth.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as OAuthServerMetadata, c as TokenRefresh, d as discoverMetadata, f as exchangeCode, g as tryDiscoverMetadata, h as revokeToken, i as OAUTH_UNSUPPORTED_MESSAGE, l as TokenRevocation, m as registerClient, n as CodeExchange, o as OAuthTokens, p as refreshTokens, r as OAUTH_SCOPE, s as RegisteredClient, t as ClientRegistration, u as discoverLoginMetadata } from "../oauth-
|
|
1
|
+
import { a as OAuthServerMetadata, c as TokenRefresh, d as discoverMetadata, f as exchangeCode, g as tryDiscoverMetadata, h as revokeToken, i as OAUTH_UNSUPPORTED_MESSAGE, l as TokenRevocation, m as registerClient, n as CodeExchange, o as OAuthTokens, p as refreshTokens, r as OAUTH_SCOPE, s as RegisteredClient, t as ClientRegistration, u as discoverLoginMetadata } from "../oauth-CVoZpuq8.js";
|
|
2
2
|
export { ClientRegistration, CodeExchange, OAUTH_SCOPE, OAUTH_UNSUPPORTED_MESSAGE, OAuthServerMetadata, OAuthTokens, RegisteredClient, TokenRefresh, TokenRevocation, discoverLoginMetadata, discoverMetadata, exchangeCode, refreshTokens, registerClient, revokeToken, tryDiscoverMetadata };
|
package/dist/http/oauth.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SessionProperties } from "../domain/session-properties.js";
|
|
2
2
|
import { ConfigError, TimeoutError, errorMessage } from "../errors.js";
|
|
3
3
|
import { JSON_CONTENT_TYPE, parseJsonResult } from "../json.js";
|
|
4
|
+
import { combineAborts, throwIfAborted } from "../signal.js";
|
|
4
5
|
import { assertEndpointOrigin } from "../url.js";
|
|
5
6
|
import { a as HttpError, p as isRetryableStatus } from "../errors-DdMlaXqq.js";
|
|
6
7
|
import { createServerProfile } from "../version/profile.js";
|
|
@@ -21,9 +22,10 @@ async function oauthFetch(request) {
|
|
|
21
22
|
"user-agent": request.userAgent
|
|
22
23
|
},
|
|
23
24
|
...request.body !== void 0 ? { body: request.body } : {},
|
|
24
|
-
signal: timeoutSignal
|
|
25
|
+
signal: combineAborts(timeoutSignal, request.signal)
|
|
25
26
|
});
|
|
26
27
|
} catch (error) {
|
|
28
|
+
throwIfAborted(request.signal);
|
|
27
29
|
if (timeoutSignal.aborted) throw new TimeoutError(`OAuth request timed out after ${OAUTH_TIMEOUT_MS}ms`, {
|
|
28
30
|
kind: "http",
|
|
29
31
|
method: request.method,
|
|
@@ -53,24 +55,26 @@ const OAuthErrorBody = z.object({
|
|
|
53
55
|
error: z.string(),
|
|
54
56
|
error_description: z.string().optional()
|
|
55
57
|
}).loose();
|
|
56
|
-
async function readJson(response, schema, source) {
|
|
58
|
+
async function readJson(response, schema, source, signal) {
|
|
57
59
|
let raw;
|
|
58
60
|
try {
|
|
59
61
|
raw = await response.json();
|
|
60
62
|
} catch (error) {
|
|
63
|
+
throwIfAborted(signal);
|
|
61
64
|
throw new ConfigError(`${source}: invalid JSON response (${errorMessage(error)})`);
|
|
62
65
|
}
|
|
63
66
|
const parsed = schema.safeParse(raw);
|
|
64
67
|
if (!parsed.success) throw new ConfigError(`${source}: unexpected response shape`);
|
|
65
68
|
return parsed.data;
|
|
66
69
|
}
|
|
67
|
-
async function failure(response, source,
|
|
70
|
+
async function failure(response, source, request) {
|
|
68
71
|
const rawBody = await response.text().catch(() => "");
|
|
72
|
+
throwIfAborted(request.signal);
|
|
69
73
|
if (isRetryableStatus(response.status)) return new HttpError({
|
|
70
74
|
status: response.status,
|
|
71
75
|
statusText: response.statusText,
|
|
72
|
-
method,
|
|
73
|
-
url,
|
|
76
|
+
method: request.method,
|
|
77
|
+
url: request.url,
|
|
74
78
|
responseHeaders: response.headers,
|
|
75
79
|
rawBody
|
|
76
80
|
});
|
|
@@ -81,8 +85,8 @@ async function failure(response, source, method, url) {
|
|
|
81
85
|
}
|
|
82
86
|
return new ConfigError(`${source} failed (${response.status})`);
|
|
83
87
|
}
|
|
84
|
-
async function postForm(url, userAgent, params, schema, source) {
|
|
85
|
-
const
|
|
88
|
+
async function postForm(url, userAgent, params, schema, source, signal) {
|
|
89
|
+
const request = {
|
|
86
90
|
url,
|
|
87
91
|
method: "POST",
|
|
88
92
|
userAgent,
|
|
@@ -90,25 +94,28 @@ async function postForm(url, userAgent, params, schema, source) {
|
|
|
90
94
|
"content-type": FORM_CONTENT_TYPE,
|
|
91
95
|
accept: JSON_CONTENT_TYPE
|
|
92
96
|
},
|
|
93
|
-
body: new URLSearchParams(params)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
body: new URLSearchParams(params),
|
|
98
|
+
signal
|
|
99
|
+
};
|
|
100
|
+
const response = await oauthFetch(request);
|
|
101
|
+
if (!response.ok) throw await failure(response, source, request);
|
|
102
|
+
return readJson(response, schema, source, signal);
|
|
97
103
|
}
|
|
98
104
|
const OAUTH_UNSUPPORTED_MESSAGE = "this Metabase does not support OAuth login (requires Metabase v63 or newer)";
|
|
99
|
-
async function fetchMetadata(baseUrl, userAgent) {
|
|
105
|
+
async function fetchMetadata(baseUrl, userAgent, signal) {
|
|
100
106
|
const response = await oauthFetch({
|
|
101
107
|
url: `${baseUrl}${DISCOVERY_PATH}`,
|
|
102
108
|
method: "GET",
|
|
103
109
|
userAgent,
|
|
104
|
-
headers: { accept: JSON_CONTENT_TYPE }
|
|
110
|
+
headers: { accept: JSON_CONTENT_TYPE },
|
|
111
|
+
signal
|
|
105
112
|
});
|
|
106
113
|
const contentType = response.headers.get("content-type") ?? "";
|
|
107
114
|
if (!response.ok || !contentType.includes("json")) {
|
|
108
115
|
await response.body?.cancel().catch(() => void 0);
|
|
109
116
|
return null;
|
|
110
117
|
}
|
|
111
|
-
return readJson(response, OAuthServerMetadata, "OAuth discovery");
|
|
118
|
+
return readJson(response, OAuthServerMetadata, "OAuth discovery", signal);
|
|
112
119
|
}
|
|
113
120
|
function pinEndpoints(metadata, baseUrl) {
|
|
114
121
|
assertEndpointOrigin(metadata.issuer, baseUrl, "issuer");
|
|
@@ -118,25 +125,26 @@ function pinEndpoints(metadata, baseUrl) {
|
|
|
118
125
|
if (metadata.revocation_endpoint !== void 0) assertEndpointOrigin(metadata.revocation_endpoint, baseUrl, "revocation endpoint");
|
|
119
126
|
return metadata;
|
|
120
127
|
}
|
|
121
|
-
async function grantsFullAccessScope(metadata, baseUrl, userAgent) {
|
|
128
|
+
async function grantsFullAccessScope(metadata, baseUrl, userAgent, signal) {
|
|
122
129
|
if (metadata.scopes_supported?.includes("mb:full") === true) return true;
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
url,
|
|
130
|
+
const request = {
|
|
131
|
+
url: `${baseUrl}${PROBE_PATH}`,
|
|
126
132
|
method: "GET",
|
|
127
133
|
userAgent,
|
|
128
|
-
headers: { accept: JSON_CONTENT_TYPE }
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
134
|
+
headers: { accept: JSON_CONTENT_TYPE },
|
|
135
|
+
signal
|
|
136
|
+
};
|
|
137
|
+
const response = await oauthFetch(request);
|
|
138
|
+
if (!response.ok) throw await failure(response, "Server properties", request);
|
|
139
|
+
return createServerProfile(serverInfoFromProperties(await readJson(response, SessionProperties, "Server properties", signal))).features.oauthFullAccessScopeUnadvertised;
|
|
132
140
|
}
|
|
133
|
-
async function tryDiscoverMetadata(baseUrl, userAgent) {
|
|
134
|
-
const metadata = await fetchMetadata(baseUrl, userAgent);
|
|
135
|
-
if (metadata === null || !await grantsFullAccessScope(metadata, baseUrl, userAgent)) return null;
|
|
141
|
+
async function tryDiscoverMetadata(baseUrl, userAgent, signal) {
|
|
142
|
+
const metadata = await fetchMetadata(baseUrl, userAgent, signal);
|
|
143
|
+
if (metadata === null || !await grantsFullAccessScope(metadata, baseUrl, userAgent, signal)) return null;
|
|
136
144
|
return pinEndpoints(metadata, baseUrl);
|
|
137
145
|
}
|
|
138
|
-
async function discoverLoginMetadata(baseUrl, userAgent) {
|
|
139
|
-
const metadata = await tryDiscoverMetadata(baseUrl, userAgent);
|
|
146
|
+
async function discoverLoginMetadata(baseUrl, userAgent, signal) {
|
|
147
|
+
const metadata = await tryDiscoverMetadata(baseUrl, userAgent, signal);
|
|
140
148
|
if (metadata === null) throw new ConfigError(OAUTH_UNSUPPORTED_MESSAGE);
|
|
141
149
|
return metadata;
|
|
142
150
|
}
|
|
@@ -146,7 +154,7 @@ async function discoverMetadata(baseUrl, userAgent) {
|
|
|
146
154
|
return pinEndpoints(metadata, baseUrl);
|
|
147
155
|
}
|
|
148
156
|
async function registerClient(input) {
|
|
149
|
-
const
|
|
157
|
+
const request = {
|
|
150
158
|
url: input.registrationEndpoint,
|
|
151
159
|
method: "POST",
|
|
152
160
|
userAgent: input.userAgent,
|
|
@@ -162,10 +170,12 @@ async function registerClient(input) {
|
|
|
162
170
|
response_types: ["code"],
|
|
163
171
|
token_endpoint_auth_method: "none",
|
|
164
172
|
scope: OAUTH_SCOPE
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
173
|
+
}),
|
|
174
|
+
signal: input.signal
|
|
175
|
+
};
|
|
176
|
+
const response = await oauthFetch(request);
|
|
177
|
+
if (!response.ok) throw await failure(response, "OAuth client registration", request);
|
|
178
|
+
return readJson(response, RegisteredClient, "OAuth client registration", input.signal);
|
|
169
179
|
}
|
|
170
180
|
function exchangeCode(input) {
|
|
171
181
|
return postForm(input.tokenEndpoint, input.userAgent, {
|
|
@@ -174,7 +184,7 @@ function exchangeCode(input) {
|
|
|
174
184
|
redirect_uri: input.redirectUri,
|
|
175
185
|
client_id: input.clientId,
|
|
176
186
|
code_verifier: input.codeVerifier
|
|
177
|
-
}, OAuthTokens, "OAuth token exchange");
|
|
187
|
+
}, OAuthTokens, "OAuth token exchange", input.signal);
|
|
178
188
|
}
|
|
179
189
|
function refreshTokens(input) {
|
|
180
190
|
return postForm(input.tokenEndpoint, input.userAgent, {
|
|
@@ -184,7 +194,7 @@ function refreshTokens(input) {
|
|
|
184
194
|
}, OAuthTokens, "OAuth token refresh");
|
|
185
195
|
}
|
|
186
196
|
async function revokeToken(input) {
|
|
187
|
-
const
|
|
197
|
+
const request = {
|
|
188
198
|
url: input.revocationEndpoint,
|
|
189
199
|
method: "POST",
|
|
190
200
|
userAgent: input.userAgent,
|
|
@@ -193,8 +203,9 @@ async function revokeToken(input) {
|
|
|
193
203
|
token: input.token,
|
|
194
204
|
client_id: input.clientId
|
|
195
205
|
})
|
|
196
|
-
}
|
|
197
|
-
|
|
206
|
+
};
|
|
207
|
+
const response = await oauthFetch(request);
|
|
208
|
+
if (!response.ok) throw await failure(response, "OAuth token revocation", request);
|
|
198
209
|
await response.body?.cancel().catch(() => void 0);
|
|
199
210
|
}
|
|
200
211
|
//#endregion
|
package/dist/http/transport.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as WaitOptions, a as ExpectedContentType, c as PreflightUnverified, d as QueryValue, f as RequestOptions, g as TransportRequestOptions, h as Transport, i as DEFAULT_TIMEOUT_MS, l as ProbeReadOptions, m as SkippedPreflight, n as ClientOptions, o as HttpMethod, p as ServerTagResolver, r as DEFAULT_METHOD, s as PreflightRefused, t as ClientCredentials, u as QueryPrimitive, v as createTransport } from "../transport-
|
|
1
|
+
import { _ as WaitOptions, a as ExpectedContentType, c as PreflightUnverified, d as QueryValue, f as RequestOptions, g as TransportRequestOptions, h as Transport, i as DEFAULT_TIMEOUT_MS, l as ProbeReadOptions, m as SkippedPreflight, n as ClientOptions, o as HttpMethod, p as ServerTagResolver, r as DEFAULT_METHOD, s as PreflightRefused, t as ClientCredentials, u as QueryPrimitive, v as createTransport } from "../transport-CyHAGDqx.js";
|
|
2
2
|
export { ClientCredentials, ClientOptions, DEFAULT_METHOD, DEFAULT_TIMEOUT_MS, ExpectedContentType, HttpMethod, PreflightRefused, PreflightUnverified, ProbeReadOptions, QueryPrimitive, QueryValue, RequestOptions, ServerTagResolver, SkippedPreflight, Transport, TransportRequestOptions, WaitOptions, createTransport };
|