@activepieces/piece-metabase 0.1.5 → 0.1.8
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/package.json +9 -7
- package/src/index.d.ts +8 -0
- package/src/index.js +27 -14
- package/src/index.js.map +1 -1
- package/src/lib/actions/get-dashboard.d.ts +4 -0
- package/src/lib/actions/get-graph-question.d.ts +12 -0
- package/src/lib/actions/get-graph-question.js +101 -0
- package/src/lib/actions/get-graph-question.js.map +1 -0
- package/src/lib/actions/get-png-rendering.d.ts +4 -0
- package/src/lib/actions/get-question.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-metabase",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@anthropic-ai/sdk": "0.
|
|
5
|
+
"@anthropic-ai/sdk": "0.39.0",
|
|
6
6
|
"@sinclair/typebox": "0.34.11",
|
|
7
|
-
"axios": "1.8.
|
|
7
|
+
"axios": "1.8.3",
|
|
8
8
|
"axios-retry": "4.4.1",
|
|
9
9
|
"deepmerge-ts": "7.1.0",
|
|
10
|
+
"jsonwebtoken": "9.0.1",
|
|
10
11
|
"mime-types": "2.1.35",
|
|
11
12
|
"nanoid": "3.3.8",
|
|
12
13
|
"openai": "4.67.1",
|
|
14
|
+
"playwright": "1.52.0",
|
|
13
15
|
"replicate": "0.34.1",
|
|
14
16
|
"semver": "7.6.0",
|
|
15
|
-
"zod": "3.
|
|
16
|
-
"@activepieces/pieces-common": "0.4.
|
|
17
|
-
"@activepieces/pieces-framework": "0.
|
|
18
|
-
"@activepieces/shared": "0.10.
|
|
17
|
+
"zod": "3.24.2",
|
|
18
|
+
"@activepieces/pieces-common": "0.4.5",
|
|
19
|
+
"@activepieces/pieces-framework": "0.8.1",
|
|
20
|
+
"@activepieces/shared": "0.10.178",
|
|
19
21
|
"tslib": "1.14.1"
|
|
20
22
|
},
|
|
21
23
|
"overrides": {
|
package/src/index.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
export declare const metabaseAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
} | {
|
|
5
|
+
embeddingKey: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
8
|
}>;
|
|
5
9
|
export declare const metabase: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
10
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
11
|
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
12
|
+
} | {
|
|
13
|
+
embeddingKey: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
15
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
16
|
}>>;
|
package/src/index.js
CHANGED
|
@@ -8,20 +8,28 @@ const get_png_rendering_1 = require("./lib/actions/get-png-rendering");
|
|
|
8
8
|
const get_dashboard_1 = require("./lib/actions/get-dashboard");
|
|
9
9
|
const common_1 = require("./lib/common");
|
|
10
10
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
11
|
+
const get_graph_question_1 = require("./lib/actions/get-graph-question");
|
|
12
|
+
const baseProps = {
|
|
13
|
+
baseUrl: pieces_framework_1.Property.ShortText({
|
|
14
|
+
displayName: 'Metabase API base URL',
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
apiKey: pieces_framework_1.PieceAuth.SecretText({
|
|
18
|
+
displayName: 'API key',
|
|
19
|
+
description: 'Generate one on your Metabase instance (settings -> authentication -> API keys)',
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
};
|
|
23
|
+
const authProps = (0, pieces_common_1.is_chromium_installed)()
|
|
24
|
+
? Object.assign(Object.assign({}, baseProps), { embeddingKey: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Embedding key',
|
|
26
|
+
description: 'Needed if you want to generate a graph of a question (settings -> embedding -> static embedding).',
|
|
27
|
+
required: false,
|
|
28
|
+
}) }) : baseProps;
|
|
11
29
|
exports.metabaseAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
12
|
-
description: 'Metabase authentication requires a
|
|
30
|
+
description: 'Metabase authentication requires a baseUrl and a password.',
|
|
13
31
|
required: true,
|
|
14
|
-
props:
|
|
15
|
-
baseUrl: pieces_framework_1.Property.ShortText({
|
|
16
|
-
displayName: 'Metabase API base URL',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
apiKey: pieces_framework_1.PieceAuth.SecretText({
|
|
20
|
-
displayName: 'API key',
|
|
21
|
-
description: 'Generate one on your Metabase instance (settings -> authentication -> API keys)',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
32
|
+
props: authProps,
|
|
25
33
|
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
26
34
|
try {
|
|
27
35
|
yield (0, common_1.queryMetabaseApi)({
|
|
@@ -46,8 +54,13 @@ exports.metabase = (0, pieces_framework_1.createPiece)({
|
|
|
46
54
|
auth: exports.metabaseAuth,
|
|
47
55
|
minimumSupportedRelease: '0.30.0',
|
|
48
56
|
logoUrl: 'https://cdn.activepieces.com/pieces/metabase.png',
|
|
49
|
-
authors: ['AdamSelene', 'abuaboud', 'valentin-mourtialon'],
|
|
50
|
-
actions: [
|
|
57
|
+
authors: ['AdamSelene', 'abuaboud', 'valentin-mourtialon', 'Kevinyu-alan'],
|
|
58
|
+
actions: [
|
|
59
|
+
get_question_1.getQuestion,
|
|
60
|
+
get_png_rendering_1.getQuestionPngPreview,
|
|
61
|
+
get_dashboard_1.getDashboardQuestions,
|
|
62
|
+
...((0, pieces_common_1.is_chromium_installed)() ? [get_graph_question_1.getGraphQuestion] : []),
|
|
63
|
+
],
|
|
51
64
|
triggers: [],
|
|
52
65
|
});
|
|
53
66
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/metabase/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,6DAAyD;AACzD,uEAAwE;AACxE,+DAAoE;AACpE,yCAAgD;AAChD,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/metabase/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,6DAAyD;AACzD,uEAAwE;AACxE,+DAAoE;AACpE,yCAAgD;AAChD,+DAAgF;AAChF,yEAAoE;AAEpE,MAAM,SAAS,GAAG;IAChB,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;QAC1B,WAAW,EAAE,uBAAuB;QACpC,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,MAAM,EAAE,4BAAS,CAAC,UAAU,CAAC;QAC3B,WAAW,EAAE,SAAS;QACtB,WAAW,EACT,iFAAiF;QACnF,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;AAEF,MAAM,SAAS,GAAG,IAAA,qCAAqB,GAAE;IACvC,CAAC,iCACM,SAAS,KACZ,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,eAAe;YAC5B,WAAW,EACT,mGAAmG;YACrG,QAAQ,EAAE,KAAK;SAChB,CAAC,IAEN,CAAC,CAAC,SAAS,CAAC;AAED,QAAA,YAAY,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC/C,WAAW,EAAE,4DAA4D;IACzE,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,SAAS;IAEhB,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,IAAA,yBAAgB,EACpB;gBACE,QAAQ,EAAE,uBAAuB;gBACjC,MAAM,EAAE,0BAAU,CAAC,GAAG;aACvB,EACD,IAAI,CACL,CAAC;YACF,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,6BAA6B;aACrC,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,uDAAuD;IAEpE,IAAI,EAAE,oBAAY;IAClB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,kDAAkD;IAC3D,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAE,cAAc,CAAC;IAC1E,OAAO,EAAE;QACP,0BAAW;QACX,yCAAqB;QACrB,qCAAqB;QACrB,GAAG,CAAC,IAAA,qCAAqB,GAAE,CAAC,CAAC,CAAC,CAAC,qCAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACvD;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare const getDashboardQuestions: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
} | {
|
|
5
|
+
embeddingKey: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
8
|
}>, {
|
|
5
9
|
dashboardId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
10
|
parameters: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const getGraphQuestion: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
} | {
|
|
5
|
+
embeddingKey: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
+
}>, {
|
|
9
|
+
questionId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
parameters: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
11
|
+
graphName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGraphQuestion = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const __1 = require("../..");
|
|
7
|
+
const jsonwebtoken_1 = tslib_1.__importDefault(require("jsonwebtoken"));
|
|
8
|
+
const playwright_1 = require("playwright");
|
|
9
|
+
exports.getGraphQuestion = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'getGraphQuestion',
|
|
11
|
+
auth: __1.metabaseAuth,
|
|
12
|
+
requireAuth: true,
|
|
13
|
+
displayName: 'Get the graph of the question',
|
|
14
|
+
description: 'Get the graph of a Metabase question and save it as a png',
|
|
15
|
+
props: {
|
|
16
|
+
questionId: pieces_framework_1.Property.ShortText({
|
|
17
|
+
displayName: 'Metabase question ID',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
parameters: pieces_framework_1.Property.Object({
|
|
21
|
+
displayName: 'Parameters (slug name -> value)',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
graphName: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'The name of the graph (without the extension)',
|
|
26
|
+
required: false,
|
|
27
|
+
}),
|
|
28
|
+
},
|
|
29
|
+
run(_a) {
|
|
30
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue, files }) {
|
|
31
|
+
if ('embeddingKey' in auth && !auth.embeddingKey)
|
|
32
|
+
return 'An embedding key is needed.';
|
|
33
|
+
const questionId = propsValue.questionId.split('-')[0];
|
|
34
|
+
const numericQuestionId = parseInt(questionId);
|
|
35
|
+
const payload = {
|
|
36
|
+
resource: { question: numericQuestionId },
|
|
37
|
+
params: propsValue.parameters,
|
|
38
|
+
exp: Math.round(Date.now() / 1000) + 10 * 60,
|
|
39
|
+
};
|
|
40
|
+
// @ts-expect-error we expect an embedding key if the user can use this action.
|
|
41
|
+
const token = jsonwebtoken_1.default.sign(payload, auth.embeddingKey);
|
|
42
|
+
const graphName = propsValue.graphName
|
|
43
|
+
? propsValue.graphName + '.png'
|
|
44
|
+
: `metabase_question_${questionId}.png`;
|
|
45
|
+
const iframeUrl = auth.baseUrl + '/embed/question/' + token + '#bordered=true&titled=true';
|
|
46
|
+
const browser = yield playwright_1.chromium.launch({
|
|
47
|
+
headless: true,
|
|
48
|
+
chromiumSandbox: false,
|
|
49
|
+
executablePath: '/usr/bin/chromium',
|
|
50
|
+
});
|
|
51
|
+
try {
|
|
52
|
+
const context = yield browser.newContext({
|
|
53
|
+
viewport: {
|
|
54
|
+
width: 1600,
|
|
55
|
+
height: 1200,
|
|
56
|
+
},
|
|
57
|
+
deviceScaleFactor: 2,
|
|
58
|
+
});
|
|
59
|
+
const page = yield context.newPage();
|
|
60
|
+
const response = yield page.goto(iframeUrl, {
|
|
61
|
+
waitUntil: 'networkidle',
|
|
62
|
+
timeout: 30000,
|
|
63
|
+
});
|
|
64
|
+
if (!response || !response.ok()) {
|
|
65
|
+
throw new Error(`Page load failed with status: ${response ? response.status() : 400}`);
|
|
66
|
+
}
|
|
67
|
+
const screenshotBuffer = yield page.screenshot({
|
|
68
|
+
path: graphName,
|
|
69
|
+
type: 'png',
|
|
70
|
+
clip: {
|
|
71
|
+
x: 0,
|
|
72
|
+
y: 0,
|
|
73
|
+
width: 1600,
|
|
74
|
+
height: 1120, // so it screenshots only the graph
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
const fileUrl = yield files.write({
|
|
78
|
+
fileName: graphName,
|
|
79
|
+
data: screenshotBuffer,
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
file: {
|
|
83
|
+
filename: graphName,
|
|
84
|
+
base64Content: screenshotBuffer.toString('base64'),
|
|
85
|
+
download: fileUrl,
|
|
86
|
+
},
|
|
87
|
+
iframeUrl,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
console.error('Please verify that either your embedding key and question id are valid or that the question is embedded and published.');
|
|
92
|
+
console.error('Error capturing Metabase chart:', error);
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
finally {
|
|
96
|
+
yield browser.close();
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
//# sourceMappingURL=get-graph-question.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-graph-question.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/metabase/src/lib/actions/get-graph-question.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,EAAE,IAAI,EAAE,mCAAmC;qBAClD;iBACF,CAAC,CAAC;gBAEH,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC;oBAChC,QAAQ,EAAE,SAAS;oBACnB,IAAI,EAAE,gBAAgB;iBACvB,CAAC,CAAC;gBAEH,OAAO;oBACL,IAAI,EAAE;wBACJ,QAAQ,EAAE,SAAS;wBACnB,aAAa,EAAE,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC;wBAClD,QAAQ,EAAE,OAAO;qBAClB;oBACD,SAAS;iBACV,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CACX,wHAAwH,CACzH,CAAC;gBACF,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;gBACxD,MAAM,KAAK,CAAC;YACd,CAAC;oBAAS,CAAC;gBACT,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;YACxB,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare const getQuestionPngPreview: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
} | {
|
|
5
|
+
embeddingKey: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
8
|
}>, {
|
|
5
9
|
questionId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
10
|
}>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare const getQuestion: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
} | {
|
|
5
|
+
embeddingKey: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
8
|
}>, {
|
|
5
9
|
questionId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
10
|
parameters: import("@activepieces/pieces-framework").ObjectProperty<false>;
|