@activepieces/piece-posthog 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -23
- package/src/index.d.ts +19 -2
- package/src/index.d.ts.map +1 -0
- package/src/index.js +66 -10
- package/src/index.js.map +1 -1
- package/src/lib/actions/create-event.d.ts +7 -5
- package/src/lib/actions/create-event.d.ts.map +1 -0
- package/src/lib/actions/create-event.js +27 -57
- package/src/lib/actions/create-event.js.map +1 -1
- package/src/lib/actions/create-project.d.ts +14 -4
- package/src/lib/actions/create-project.d.ts.map +1 -0
- package/src/lib/actions/create-project.js +60 -26
- package/src/lib/actions/create-project.js.map +1 -1
- package/src/lib/actions/get-feature-flags.d.ts +9 -0
- package/src/lib/actions/get-feature-flags.d.ts.map +1 -0
- package/src/lib/actions/get-feature-flags.js +57 -0
- package/src/lib/actions/get-feature-flags.js.map +1 -0
- package/src/lib/actions/list-persons.d.ts +10 -0
- package/src/lib/actions/list-persons.d.ts.map +1 -0
- package/src/lib/actions/list-persons.js +61 -0
- package/src/lib/actions/list-persons.js.map +1 -0
- package/src/lib/triggers/new-event.d.ts +31 -0
- package/src/lib/triggers/new-event.d.ts.map +1 -0
- package/src/lib/triggers/new-event.js +78 -0
- package/src/lib/triggers/new-event.js.map +1 -0
- package/README.md +0 -7
- package/src/lib/common/models.d.ts +0 -62
- package/src/lib/common/models.js +0 -3
- package/src/lib/common/models.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-posthog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"main": "./src/index.js",
|
|
5
|
+
"types": "./src/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
8
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
9
|
+
},
|
|
4
10
|
"dependencies": {
|
|
5
|
-
"@
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"axios-retry": "4.4.1",
|
|
9
|
-
"deepmerge-ts": "7.1.0",
|
|
10
|
-
"form-data": "4.0.4",
|
|
11
|
-
"i18next": "23.13.0",
|
|
12
|
-
"mime-types": "2.1.35",
|
|
13
|
-
"nanoid": "3.3.8",
|
|
14
|
-
"semver": "7.6.0",
|
|
15
|
-
"socket.io-client": "4.8.1",
|
|
16
|
-
"zod": "4.1.13",
|
|
17
|
-
"@activepieces/pieces-common": "0.11.5",
|
|
18
|
-
"@activepieces/pieces-framework": "0.25.2",
|
|
19
|
-
"@activepieces/shared": "0.34.0",
|
|
11
|
+
"@activepieces/pieces-common": "0.12.3",
|
|
12
|
+
"@activepieces/pieces-framework": "0.28.2",
|
|
13
|
+
"@activepieces/shared": "0.78.1",
|
|
20
14
|
"tslib": "2.6.2"
|
|
21
|
-
}
|
|
22
|
-
"resolutions": {
|
|
23
|
-
"rollup": "npm:@rollup/wasm-node"
|
|
24
|
-
},
|
|
25
|
-
"types": "./src/index.d.ts",
|
|
26
|
-
"main": "./src/index.js",
|
|
27
|
-
"type": "commonjs"
|
|
15
|
+
}
|
|
28
16
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
export declare const posthogAuth: import("@activepieces/pieces-framework").
|
|
2
|
-
|
|
1
|
+
export declare const posthogAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const posthog: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
8
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
9
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
+
}>>;
|
|
13
|
+
export type PostHogAuth = {
|
|
14
|
+
personal_api_key: string;
|
|
15
|
+
project_id: string;
|
|
16
|
+
api_host?: string;
|
|
17
|
+
ingestion_host?: string;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,WAAW;;;;;EAyDtB,CAAC;AAEH,eAAO,MAAM,OAAO;;;;;GAsBlB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -7,13 +7,67 @@ const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
|
7
7
|
const shared_1 = require("@activepieces/shared");
|
|
8
8
|
const create_event_1 = require("./lib/actions/create-event");
|
|
9
9
|
const create_project_1 = require("./lib/actions/create-project");
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.posthogAuth = pieces_framework_1.PieceAuth.
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
const get_feature_flags_1 = require("./lib/actions/get-feature-flags");
|
|
11
|
+
const list_persons_1 = require("./lib/actions/list-persons");
|
|
12
|
+
const new_event_1 = require("./lib/triggers/new-event");
|
|
13
|
+
exports.posthogAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
14
|
+
description: `Connect your PostHog account.
|
|
15
|
+
|
|
16
|
+
**Personal API Key**: Go to PostHog → Settings → Personal API Keys → Create personal API key.
|
|
17
|
+
|
|
18
|
+
**Project ID**: Found in the URL when viewing your project: \`/project/{id}/\`
|
|
19
|
+
|
|
20
|
+
**API Host**: The base URL for private API calls.
|
|
21
|
+
- US Cloud (default): \`https://us.posthog.com\`
|
|
22
|
+
- EU Cloud: \`https://eu.posthog.com\`
|
|
23
|
+
- Self-hosted: your instance URL (e.g. \`https://posthog.mycompany.com\`)
|
|
24
|
+
|
|
25
|
+
**Ingestion Host**: The base URL for event capture.
|
|
26
|
+
- US Cloud (default): \`https://us.i.posthog.com\`
|
|
27
|
+
- EU Cloud: \`https://eu.i.posthog.com\`
|
|
28
|
+
- Self-hosted: same as your API Host`,
|
|
16
29
|
required: true,
|
|
30
|
+
props: {
|
|
31
|
+
personal_api_key: pieces_framework_1.PieceAuth.SecretText({
|
|
32
|
+
displayName: 'Personal API Key',
|
|
33
|
+
description: 'Your PostHog personal API key',
|
|
34
|
+
required: true,
|
|
35
|
+
}),
|
|
36
|
+
project_id: pieces_framework_1.Property.ShortText({
|
|
37
|
+
displayName: 'Project ID',
|
|
38
|
+
description: 'Your PostHog project ID (found in project settings URL)',
|
|
39
|
+
required: true,
|
|
40
|
+
}),
|
|
41
|
+
api_host: pieces_framework_1.Property.ShortText({
|
|
42
|
+
displayName: 'API Host',
|
|
43
|
+
description: 'Base URL for private API calls (default: https://us.posthog.com)',
|
|
44
|
+
required: false,
|
|
45
|
+
defaultValue: 'https://us.posthog.com',
|
|
46
|
+
}),
|
|
47
|
+
ingestion_host: pieces_framework_1.Property.ShortText({
|
|
48
|
+
displayName: 'Ingestion Host',
|
|
49
|
+
description: 'Base URL for event capture (default: https://us.i.posthog.com)',
|
|
50
|
+
required: false,
|
|
51
|
+
defaultValue: 'https://us.i.posthog.com',
|
|
52
|
+
}),
|
|
53
|
+
},
|
|
54
|
+
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
55
|
+
try {
|
|
56
|
+
const apiHost = auth.api_host || 'https://us.posthog.com';
|
|
57
|
+
yield pieces_common_1.httpClient.sendRequest({
|
|
58
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
59
|
+
url: `${apiHost}/api/projects/${auth.project_id}/`,
|
|
60
|
+
authentication: {
|
|
61
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
62
|
+
token: auth.personal_api_key,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
return { valid: true };
|
|
66
|
+
}
|
|
67
|
+
catch (_b) {
|
|
68
|
+
return { valid: false, error: 'Invalid credentials. Check your Personal API Key and Project ID.' };
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
17
71
|
});
|
|
18
72
|
exports.posthog = (0, pieces_framework_1.createPiece)({
|
|
19
73
|
displayName: 'PostHog',
|
|
@@ -25,17 +79,19 @@ exports.posthog = (0, pieces_framework_1.createPiece)({
|
|
|
25
79
|
actions: [
|
|
26
80
|
create_event_1.posthogCreateEvent,
|
|
27
81
|
create_project_1.posthogCreateProject,
|
|
82
|
+
get_feature_flags_1.posthogGetFeatureFlags,
|
|
83
|
+
list_persons_1.posthogListPersons,
|
|
28
84
|
(0, pieces_common_1.createCustomApiCallAction)({
|
|
29
|
-
baseUrl: () => 'https://
|
|
85
|
+
baseUrl: (auth) => auth.props.api_host || 'https://us.posthog.com',
|
|
30
86
|
auth: exports.posthogAuth,
|
|
31
87
|
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
32
88
|
return ({
|
|
33
|
-
Authorization: `Bearer ${auth}`,
|
|
89
|
+
Authorization: `Bearer ${auth.props.personal_api_key}`,
|
|
34
90
|
});
|
|
35
91
|
}),
|
|
36
92
|
}),
|
|
37
93
|
],
|
|
38
|
-
authors: [
|
|
39
|
-
triggers: [],
|
|
94
|
+
authors: ['kishanprmr', 'MoShizzle', 'khaledmashaly', 'abuaboud', 'Tosh94'],
|
|
95
|
+
triggers: [new_event_1.posthogNewEvent],
|
|
40
96
|
});
|
|
41
97
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAKqC;AACrC,qEAAkF;AAClF,iDAAqD;AACrD,6DAAgE;AAChE,iEAAoE;AACpE,uEAAyE;AACzE,6DAAgE;AAChE,wDAA2D;AAE9C,QAAA,WAAW,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC9C,WAAW,EAAE;;;;;;;;;;;;;;qCAcsB;IACnC,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,gBAAgB,EAAE,4BAAS,CAAC,UAAU,CAAC;YACrC,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,wBAAwB;SACvC,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACjC,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,gEAAgE;YAC7E,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,0BAA0B;SACzC,CAAC;KACH;IACD,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,IAAI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CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export declare const posthogCreateEvent: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").
|
|
1
|
+
export declare const posthogCreateEvent: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
}>, {
|
|
2
7
|
event: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
event_type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
4
8
|
distinct_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
9
|
properties: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
6
|
-
context: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
7
|
-
message_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
10
|
}>;
|
|
11
|
+
//# sourceMappingURL=create-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-event.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;;;;;;;;;EAkD7B,CAAC"}
|
|
@@ -8,80 +8,50 @@ const __1 = require("../..");
|
|
|
8
8
|
exports.posthogCreateEvent = (0, pieces_framework_1.createAction)({
|
|
9
9
|
auth: __1.posthogAuth,
|
|
10
10
|
name: 'create_event',
|
|
11
|
-
displayName: '
|
|
12
|
-
description: '
|
|
11
|
+
displayName: 'Capture Event',
|
|
12
|
+
description: 'Capture a custom event in PostHog',
|
|
13
13
|
props: {
|
|
14
14
|
event: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Event
|
|
16
|
-
description: 'The event
|
|
15
|
+
displayName: 'Event Name',
|
|
16
|
+
description: 'The name of the event to capture',
|
|
17
17
|
required: true,
|
|
18
18
|
}),
|
|
19
|
-
event_type: pieces_framework_1.Property.StaticDropdown({
|
|
20
|
-
displayName: 'Event type',
|
|
21
|
-
required: true,
|
|
22
|
-
options: {
|
|
23
|
-
options: [
|
|
24
|
-
{ label: 'Alias', value: 'alias' },
|
|
25
|
-
{ label: 'Capture', value: 'capture' },
|
|
26
|
-
{ label: 'Identify', value: 'screen' },
|
|
27
|
-
{ label: 'Page', value: 'page' },
|
|
28
|
-
{ label: 'Screen', value: 'screen' },
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
}),
|
|
32
19
|
distinct_id: pieces_framework_1.Property.ShortText({
|
|
33
|
-
displayName: 'Distinct
|
|
34
|
-
description:
|
|
20
|
+
displayName: 'Distinct ID',
|
|
21
|
+
description: 'Unique identifier for the user performing the action (e.g. user ID or email address)',
|
|
35
22
|
required: true,
|
|
36
23
|
}),
|
|
37
24
|
properties: pieces_framework_1.Property.Object({
|
|
38
25
|
displayName: 'Properties',
|
|
39
|
-
description: '
|
|
40
|
-
required: false,
|
|
41
|
-
}),
|
|
42
|
-
context: pieces_framework_1.Property.Object({
|
|
43
|
-
displayName: 'Context',
|
|
44
|
-
description: 'The event context,',
|
|
45
|
-
required: false,
|
|
46
|
-
}),
|
|
47
|
-
message_id: pieces_framework_1.Property.ShortText({
|
|
48
|
-
displayName: 'Message ID',
|
|
49
|
-
description: 'The message id,',
|
|
50
|
-
required: false,
|
|
51
|
-
}),
|
|
52
|
-
category: pieces_framework_1.Property.ShortText({
|
|
53
|
-
displayName: 'Category',
|
|
54
|
-
description: 'The event category.',
|
|
26
|
+
description: 'Additional event properties as key/value pairs',
|
|
55
27
|
required: false,
|
|
56
28
|
}),
|
|
57
29
|
},
|
|
58
30
|
run(context) {
|
|
59
31
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
distinct_id: context.propsValue.distinct_id,
|
|
68
|
-
category: context.propsValue.category,
|
|
69
|
-
};
|
|
70
|
-
const request = {
|
|
71
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
72
|
-
url: `https://app.posthog.com/capture/`,
|
|
73
|
-
body,
|
|
32
|
+
var _a;
|
|
33
|
+
const { personal_api_key, project_id, api_host, ingestion_host } = context.auth.props;
|
|
34
|
+
const apiBase = api_host || 'https://us.posthog.com';
|
|
35
|
+
const ingestionBase = ingestion_host || 'https://us.i.posthog.com';
|
|
36
|
+
const projectResult = yield pieces_common_1.httpClient.sendRequest({
|
|
37
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
38
|
+
url: `${apiBase}/api/projects/${project_id}/`,
|
|
74
39
|
authentication: {
|
|
75
40
|
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
76
|
-
token:
|
|
41
|
+
token: personal_api_key,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
const result = yield pieces_common_1.httpClient.sendRequest({
|
|
45
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
46
|
+
url: `${ingestionBase}/i/v0/e/`,
|
|
47
|
+
body: {
|
|
48
|
+
api_key: projectResult.body.api_token,
|
|
49
|
+
distinct_id: context.propsValue.distinct_id,
|
|
50
|
+
event: context.propsValue.event,
|
|
51
|
+
properties: (_a = context.propsValue.properties) !== null && _a !== void 0 ? _a : {},
|
|
77
52
|
},
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
console.debug('Event creation response', result);
|
|
81
|
-
if (result.status === 200) {
|
|
82
|
-
return result.body;
|
|
83
|
-
}
|
|
84
|
-
return result;
|
|
53
|
+
});
|
|
54
|
+
return result.body;
|
|
85
55
|
});
|
|
86
56
|
},
|
|
87
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-event.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"create-event.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-event.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,6BAAoC;AAEvB,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,mCAAmC;IAChD,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EACT,sFAAsF;YACxF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC1B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YACtF,MAAM,OAAO,GAAG,QAAQ,IAAI,wBAAwB,CAAC;YACrD,MAAM,aAAa,GAAG,cAAc,IAAI,0BAA0B,CAAC;YAEnE,MAAM,aAAa,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAwB;gBACxE,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,OAAO,iBAAiB,UAAU,GAAG;gBAC7C,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,gBAAgB;iBACxB;aACF,CAAC,CAAC;YAEH,MAAM,MAAM,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAqB;gBAC9D,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,aAAa,UAAU;gBAC/B,IAAI,EAAE;oBACJ,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,SAAS;oBACrC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW;oBAC3C,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;oBAC/B,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,CAAC,UAAU,mCAAI,EAAE;iBAChD;aACF,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
export declare const posthogCreateProject: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare const posthogCreateProject: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
}>, {
|
|
7
|
+
organization_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
8
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
9
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
+
}>>;
|
|
13
|
+
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
14
|
anonymize_ips: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
5
|
-
is_demo: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
6
15
|
}>;
|
|
16
|
+
//# sourceMappingURL=create-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-project.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-project.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;EA8E/B,CAAC"}
|
|
@@ -9,47 +9,81 @@ exports.posthogCreateProject = (0, pieces_framework_1.createAction)({
|
|
|
9
9
|
auth: __1.posthogAuth,
|
|
10
10
|
name: 'create_project',
|
|
11
11
|
displayName: 'Create Project',
|
|
12
|
-
description: 'Create a
|
|
12
|
+
description: 'Create a new PostHog project in your organization',
|
|
13
13
|
props: {
|
|
14
|
-
|
|
15
|
-
displayName: '
|
|
16
|
-
description: '
|
|
17
|
-
required:
|
|
14
|
+
organization_id: pieces_framework_1.Property.Dropdown({
|
|
15
|
+
displayName: 'Organization',
|
|
16
|
+
description: 'The organization to create the project in',
|
|
17
|
+
required: true,
|
|
18
|
+
refreshers: [],
|
|
19
|
+
auth: __1.posthogAuth,
|
|
20
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
21
|
+
var _b;
|
|
22
|
+
if (!auth) {
|
|
23
|
+
return { disabled: true, options: [], placeholder: 'Connect your account first' };
|
|
24
|
+
}
|
|
25
|
+
const { personal_api_key, api_host } = auth.props;
|
|
26
|
+
const apiBase = api_host || 'https://us.posthog.com';
|
|
27
|
+
try {
|
|
28
|
+
const result = yield pieces_common_1.httpClient.sendRequest({
|
|
29
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
30
|
+
url: `${apiBase}/api/organizations/`,
|
|
31
|
+
authentication: {
|
|
32
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
33
|
+
token: personal_api_key,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
disabled: false,
|
|
38
|
+
options: ((_b = result.body.results) !== null && _b !== void 0 ? _b : []).map((org) => ({
|
|
39
|
+
label: org.name,
|
|
40
|
+
value: org.id,
|
|
41
|
+
})),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
catch (_c) {
|
|
45
|
+
return { disabled: true, options: [], placeholder: 'Failed to load organizations. Check your connection.' };
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
18
48
|
}),
|
|
19
|
-
|
|
20
|
-
displayName: '
|
|
21
|
-
description: '
|
|
22
|
-
required:
|
|
49
|
+
name: pieces_framework_1.Property.ShortText({
|
|
50
|
+
displayName: 'Project Name',
|
|
51
|
+
description: 'The name of the new project',
|
|
52
|
+
required: true,
|
|
23
53
|
}),
|
|
24
54
|
anonymize_ips: pieces_framework_1.Property.Checkbox({
|
|
25
55
|
displayName: 'Anonymize IPs',
|
|
26
|
-
description: 'Whether to anonymize incoming IP addresses
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
is_demo: pieces_framework_1.Property.Checkbox({
|
|
30
|
-
displayName: 'Is demo project',
|
|
31
|
-
description: 'If this is a demo project',
|
|
56
|
+
description: 'Whether to anonymize incoming IP addresses',
|
|
32
57
|
required: false,
|
|
33
58
|
}),
|
|
34
59
|
},
|
|
35
60
|
run(context) {
|
|
36
61
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
|
|
38
|
-
const
|
|
62
|
+
var _a, _b;
|
|
63
|
+
const { personal_api_key, api_host } = context.auth.props;
|
|
64
|
+
const apiBase = api_host || 'https://us.posthog.com';
|
|
65
|
+
const { organization_id, name, anonymize_ips } = context.propsValue;
|
|
66
|
+
const result = yield pieces_common_1.httpClient.sendRequest({
|
|
39
67
|
method: pieces_common_1.HttpMethod.POST,
|
|
40
|
-
url:
|
|
41
|
-
body,
|
|
68
|
+
url: `${apiBase}/api/organizations/${organization_id}/projects/`,
|
|
42
69
|
authentication: {
|
|
43
70
|
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
44
|
-
token:
|
|
71
|
+
token: personal_api_key,
|
|
45
72
|
},
|
|
73
|
+
body: { name, anonymize_ips },
|
|
74
|
+
});
|
|
75
|
+
const p = result.body;
|
|
76
|
+
return {
|
|
77
|
+
id: p.id,
|
|
78
|
+
uuid: p.uuid,
|
|
79
|
+
name: p.name,
|
|
80
|
+
api_token: p.api_token,
|
|
81
|
+
organization: p.organization,
|
|
82
|
+
timezone: (_a = p.timezone) !== null && _a !== void 0 ? _a : null,
|
|
83
|
+
anonymize_ips: (_b = p.anonymize_ips) !== null && _b !== void 0 ? _b : false,
|
|
84
|
+
created_at: p.created_at,
|
|
85
|
+
updated_at: p.updated_at,
|
|
46
86
|
};
|
|
47
|
-
const result = yield pieces_common_1.httpClient.sendRequest(request);
|
|
48
|
-
console.debug('Project creation response', result);
|
|
49
|
-
if (result.status === 200) {
|
|
50
|
-
return result.body;
|
|
51
|
-
}
|
|
52
|
-
return result;
|
|
53
87
|
});
|
|
54
88
|
},
|
|
55
89
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-project.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"create-project.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-project.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,6BAAiD;AAEpC,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,mDAAmD;IAChE,KAAK,EAAE;QACL,eAAe,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACjC,WAAW,EAAE,cAAc;YAC3B,W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@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const posthogGetFeatureFlags: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
}>, {
|
|
7
|
+
limit: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=get-feature-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-feature-flags.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-feature-flags.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB;;;;;;;EA4CjC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.posthogGetFeatureFlags = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const __1 = require("../..");
|
|
8
|
+
exports.posthogGetFeatureFlags = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: __1.posthogAuth,
|
|
10
|
+
name: 'get_feature_flags',
|
|
11
|
+
displayName: 'Get Feature Flags',
|
|
12
|
+
description: 'List all feature flags in your PostHog project',
|
|
13
|
+
props: {
|
|
14
|
+
limit: pieces_framework_1.Property.Number({
|
|
15
|
+
displayName: 'Limit',
|
|
16
|
+
description: 'Maximum number of feature flags to return (default: 100)',
|
|
17
|
+
required: false,
|
|
18
|
+
defaultValue: 100,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const { personal_api_key, project_id, api_host } = context.auth.props;
|
|
25
|
+
const apiBase = api_host || 'https://us.posthog.com';
|
|
26
|
+
const result = yield pieces_common_1.httpClient.sendRequest({
|
|
27
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
28
|
+
url: `${apiBase}/api/projects/${project_id}/feature_flags/`,
|
|
29
|
+
authentication: {
|
|
30
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
31
|
+
token: personal_api_key,
|
|
32
|
+
},
|
|
33
|
+
queryParams: {
|
|
34
|
+
limit: String((_a = context.propsValue.limit) !== null && _a !== void 0 ? _a : 100),
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
return ((_b = result.body.results) !== null && _b !== void 0 ? _b : []).map((flag) => {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
return ({
|
|
40
|
+
id: flag.id,
|
|
41
|
+
name: flag.name,
|
|
42
|
+
key: flag.key,
|
|
43
|
+
active: flag.active,
|
|
44
|
+
deleted: flag.deleted,
|
|
45
|
+
created_at: flag.created_at,
|
|
46
|
+
updated_at: flag.updated_at,
|
|
47
|
+
tags: Array.isArray(flag.tags) ? flag.tags.join(', ') : null,
|
|
48
|
+
created_by_email: (_b = (_a = flag.created_by) === null || _a === void 0 ? void 0 : _a.email) !== null && _b !== void 0 ? _b : null,
|
|
49
|
+
created_by_name: flag.created_by
|
|
50
|
+
? `${flag.created_by.first_name} ${flag.created_by.last_name}`.trim()
|
|
51
|
+
: null,
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=get-feature-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-feature-flags.js","sourceRoot":"","sources":["../../../../src/lib/actions/get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BACnB,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,UAAU,EAAE,IAAI,CAAC,UAAU;oBAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;oBAC3B,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC5D,gBAAgB,EAAE,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,KAAK,mCAAI,IAAI;oBAChD,eAAe,EAAE,IAAI,CAAC,UAAU;wBAC9B,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE;wBACrE,CAAC,CAAC,IAAI;iBACT,CAAC,CAAA;aAAA,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const posthogListPersons: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
}>, {
|
|
7
|
+
limit: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
8
|
+
search: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=list-persons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-persons.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-persons.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;;;;;;;;EAiD7B,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.posthogListPersons = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const __1 = require("../..");
|
|
8
|
+
exports.posthogListPersons = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: __1.posthogAuth,
|
|
10
|
+
name: 'list_persons',
|
|
11
|
+
displayName: 'List Persons',
|
|
12
|
+
description: 'Get a list of identified users in your PostHog project',
|
|
13
|
+
props: {
|
|
14
|
+
limit: pieces_framework_1.Property.Number({
|
|
15
|
+
displayName: 'Limit',
|
|
16
|
+
description: 'Maximum number of persons to return (default: 100)',
|
|
17
|
+
required: false,
|
|
18
|
+
defaultValue: 100,
|
|
19
|
+
}),
|
|
20
|
+
search: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Search',
|
|
22
|
+
description: 'Filter persons by email or name',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
run(context) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const { personal_api_key, project_id, api_host } = context.auth.props;
|
|
30
|
+
const apiBase = api_host || 'https://us.posthog.com';
|
|
31
|
+
const queryParams = {
|
|
32
|
+
limit: String((_a = context.propsValue.limit) !== null && _a !== void 0 ? _a : 100),
|
|
33
|
+
};
|
|
34
|
+
if (context.propsValue.search) {
|
|
35
|
+
queryParams['search'] = context.propsValue.search;
|
|
36
|
+
}
|
|
37
|
+
const result = yield pieces_common_1.httpClient.sendRequest({
|
|
38
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
39
|
+
url: `${apiBase}/api/projects/${project_id}/persons/`,
|
|
40
|
+
authentication: {
|
|
41
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
42
|
+
token: personal_api_key,
|
|
43
|
+
},
|
|
44
|
+
queryParams,
|
|
45
|
+
});
|
|
46
|
+
return ((_b = result.body.results) !== null && _b !== void 0 ? _b : []).map((person) => {
|
|
47
|
+
var _a, _b, _c, _d;
|
|
48
|
+
return ({
|
|
49
|
+
id: person.id,
|
|
50
|
+
uuid: person.uuid,
|
|
51
|
+
distinct_ids: Array.isArray(person.distinct_ids) ? person.distinct_ids.join(', ') : null,
|
|
52
|
+
name: (_a = person.name) !== null && _a !== void 0 ? _a : null,
|
|
53
|
+
email: (_c = (_b = person.properties) === null || _b === void 0 ? void 0 : _b['email']) !== null && _c !== void 0 ? _c : null,
|
|
54
|
+
created_at: person.created_at,
|
|
55
|
+
updated_at: (_d = person.updated_at) !== null && _d !== void 0 ? _d : null,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=list-persons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-persons.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-persons.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,6BAAoC;AAEvB,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,wDAAwD;IACrE,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,oDAAoD;YACjE,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,GAAG;SAClB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,iCAA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0CAAG,OAAO,CAAY,mCAAI,IAAI;oBACvD,UAAU,EAAE,MAAM,CAAC,UAAU;oBAC7B,UAAU,EAAE,MAAA,MAAM,CAAC,UAAU,mCAAI,IAAI;iBACtC,CAAC,CAAA;aAAA,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const posthogNewEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
}>, {
|
|
8
|
+
event_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
10
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
11
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
12
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
+
}>, {
|
|
15
|
+
event_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
17
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
18
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
19
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
20
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
21
|
+
}>, {
|
|
22
|
+
event_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
23
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
24
|
+
personal_api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
25
|
+
project_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
26
|
+
api_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
27
|
+
ingestion_host: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
28
|
+
}>, {
|
|
29
|
+
event_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
30
|
+
}>;
|
|
31
|
+
//# sourceMappingURL=new-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAIhB,MAAM,gCAAgC,CAAC;AAqDxC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B1B,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.posthogNewEvent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const __1 = require("../..");
|
|
8
|
+
const props = {
|
|
9
|
+
event_name: pieces_framework_1.Property.ShortText({
|
|
10
|
+
displayName: 'Event Name Filter',
|
|
11
|
+
description: 'Filter by specific event name (leave empty for all events)',
|
|
12
|
+
required: false,
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
const polling = {
|
|
16
|
+
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
17
|
+
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue, lastFetchEpochMS }) {
|
|
18
|
+
var _b;
|
|
19
|
+
const { personal_api_key, project_id, api_host } = auth.props;
|
|
20
|
+
const apiBase = api_host || 'https://us.posthog.com';
|
|
21
|
+
const queryParams = { limit: '100' };
|
|
22
|
+
if (lastFetchEpochMS) {
|
|
23
|
+
queryParams['after'] = new Date(lastFetchEpochMS).toISOString();
|
|
24
|
+
}
|
|
25
|
+
if (propsValue.event_name) {
|
|
26
|
+
queryParams['event'] = propsValue.event_name;
|
|
27
|
+
}
|
|
28
|
+
const result = yield pieces_common_1.httpClient.sendRequest({
|
|
29
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
30
|
+
url: `${apiBase}/api/projects/${project_id}/events/`,
|
|
31
|
+
authentication: {
|
|
32
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
33
|
+
token: personal_api_key,
|
|
34
|
+
},
|
|
35
|
+
queryParams,
|
|
36
|
+
});
|
|
37
|
+
return ((_b = result.body.results) !== null && _b !== void 0 ? _b : []).map((event) => ({
|
|
38
|
+
epochMilliSeconds: new Date(event.timestamp).getTime(),
|
|
39
|
+
data: event,
|
|
40
|
+
}));
|
|
41
|
+
}),
|
|
42
|
+
};
|
|
43
|
+
exports.posthogNewEvent = (0, pieces_framework_1.createTrigger)({
|
|
44
|
+
auth: __1.posthogAuth,
|
|
45
|
+
name: 'new_event',
|
|
46
|
+
displayName: 'New Event',
|
|
47
|
+
description: 'Triggers when a new event is captured in PostHog',
|
|
48
|
+
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
49
|
+
props,
|
|
50
|
+
sampleData: {
|
|
51
|
+
id: '1',
|
|
52
|
+
event: 'pageview',
|
|
53
|
+
distinct_id: 'user_123',
|
|
54
|
+
timestamp: '2024-01-01T00:00:00Z',
|
|
55
|
+
properties: { $current_url: 'https://example.com' },
|
|
56
|
+
},
|
|
57
|
+
test(context) {
|
|
58
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return yield pieces_common_1.pollingHelper.test(polling, context);
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
onEnable(context) {
|
|
63
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
yield pieces_common_1.pollingHelper.onEnable(polling, context);
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
onDisable(context) {
|
|
68
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
yield pieces_common_1.pollingHelper.onDisable(polling, context);
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
run(context) {
|
|
73
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
return yield pieces_common_1.pollingHelper.poll(polling, context);
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=new-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event.ts"],"names":[],"mappings":";;;;AAAA,qEAMwC;AACxC,+DAOqC;AACrC,6BAAiD;AAEjD,MAAM,KAAK,GAAG;IACZ,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;QAC7B,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE,4DAA4D;QACzE,QAAQ,EAAE,KAAK;KAChB,CAAC;CACH,CAAC;AAEF,MAAM,OAAO,GAGT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAE;;QAClD,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,GAA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AAS,EAAE,sBAAsB;QACjC,UAAU,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE;KACpD;IACK,IAAI,CAAC,OAAO;;YAChB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;KAAA;IACK,QAAQ,CAAC,OAAO;;YACpB,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;KAAA;CACF,CAAC,CAAC"}
|
package/README.md
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { HttpMessageBody } from '@activepieces/pieces-common';
|
|
2
|
-
export interface EventBody extends HttpMessageBody {
|
|
3
|
-
api_key?: string;
|
|
4
|
-
timestamp?: string;
|
|
5
|
-
category?: string;
|
|
6
|
-
distinct_id?: string;
|
|
7
|
-
context?: Record<string, unknown>;
|
|
8
|
-
properties?: Record<string, unknown>;
|
|
9
|
-
type: string;
|
|
10
|
-
event: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
messageId?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface EventCaptureResponse {
|
|
15
|
-
status?: number;
|
|
16
|
-
type?: string;
|
|
17
|
-
code?: string;
|
|
18
|
-
detail?: string;
|
|
19
|
-
attr?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface ProjectCreateRequest {
|
|
22
|
-
name?: string;
|
|
23
|
-
api_key?: string;
|
|
24
|
-
project_id?: string;
|
|
25
|
-
slack_incoming_webhook?: string;
|
|
26
|
-
anonymize_ips?: boolean;
|
|
27
|
-
is_demo?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface ProjectCreateResponse {
|
|
30
|
-
id: 0;
|
|
31
|
-
uuid: string;
|
|
32
|
-
organization: string;
|
|
33
|
-
api_token: string;
|
|
34
|
-
app_urls: string[];
|
|
35
|
-
name: string;
|
|
36
|
-
slack_incoming_webhook: string;
|
|
37
|
-
created_at: string;
|
|
38
|
-
updated_at: string;
|
|
39
|
-
anonymize_ips: boolean;
|
|
40
|
-
completed_snippet_onboarding: boolean;
|
|
41
|
-
ingested_event: boolean;
|
|
42
|
-
test_account_filters: Record<string, never>;
|
|
43
|
-
test_account_filters_default_checked: boolean;
|
|
44
|
-
path_cleaning_filters: Record<string, never>;
|
|
45
|
-
is_demo: boolean;
|
|
46
|
-
timezone: string;
|
|
47
|
-
data_attributes: Record<string, never>;
|
|
48
|
-
person_display_name_properties: string[];
|
|
49
|
-
correlation_config: Record<string, never>;
|
|
50
|
-
session_recording_opt_in: boolean;
|
|
51
|
-
capture_console_log_opt_in: boolean;
|
|
52
|
-
capture_performance_opt_in: boolean;
|
|
53
|
-
effective_membership_level: number;
|
|
54
|
-
access_control: boolean;
|
|
55
|
-
has_group_types: boolean;
|
|
56
|
-
primary_dashboard: number;
|
|
57
|
-
live_events_columns: string[];
|
|
58
|
-
recording_domains: string[];
|
|
59
|
-
person_on_events_querying_enabled: boolean;
|
|
60
|
-
groups_on_events_querying_enabled: boolean;
|
|
61
|
-
inject_web_apps: boolean;
|
|
62
|
-
}
|
package/src/lib/common/models.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/posthog/src/lib/common/models.ts"],"names":[],"mappings":""}
|