diff --git a/components/posthog/actions/capture-event/capture-event.mjs b/components/posthog/actions/capture-event/capture-event.mjs index fabe53d998fd0..28a557be82696 100644 --- a/components/posthog/actions/capture-event/capture-event.mjs +++ b/components/posthog/actions/capture-event/capture-event.mjs @@ -4,7 +4,7 @@ export default { key: "posthog-capture-event", name: "Capture Event", description: "Captures a given event within the PostHog system. [See the documentation](https://posthog.com/docs/api/post-only-endpoints#single-event)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { posthog, diff --git a/components/posthog/actions/create-query/create-query.mjs b/components/posthog/actions/create-query/create-query.mjs index 17be8c4574d02..6d629599e7978 100644 --- a/components/posthog/actions/create-query/create-query.mjs +++ b/components/posthog/actions/create-query/create-query.mjs @@ -4,7 +4,7 @@ export default { key: "posthog-create-query", name: "Create Query", description: "Create a HogQLQuery and return the results. [See the documentation](https://posthog.com/docs/api/queries#creating-a-query)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { posthog, diff --git a/components/posthog/actions/get-cohorts/get-cohorts.mjs b/components/posthog/actions/get-cohorts/get-cohorts.mjs index 3e3f29d39112d..a30c73219ace9 100644 --- a/components/posthog/actions/get-cohorts/get-cohorts.mjs +++ b/components/posthog/actions/get-cohorts/get-cohorts.mjs @@ -4,7 +4,7 @@ export default { key: "posthog-get-cohorts", name: "Get Cohorts", description: "Retrieve a list of cohorts. [See the documentation](https://posthog.com/docs/api/cohorts#get-api-projects-project_id-cohorts)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { posthog, diff --git a/components/posthog/actions/get-persons/get-persons.mjs b/components/posthog/actions/get-persons/get-persons.mjs index 561f8bffab6ba..c373d0b811ea1 100644 --- a/components/posthog/actions/get-persons/get-persons.mjs +++ b/components/posthog/actions/get-persons/get-persons.mjs @@ -4,7 +4,7 @@ export default { key: "posthog-get-persons", name: "Get Persons", description: "Retrieve a list of persons. [See the documentation](https://posthog.com/docs/api/persons#get-api-projects-project_id-persons)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { posthog, diff --git a/components/posthog/actions/get-surveys/get-surveys.mjs b/components/posthog/actions/get-surveys/get-surveys.mjs index f1a9badeb2fc9..ead80c57913e6 100644 --- a/components/posthog/actions/get-surveys/get-surveys.mjs +++ b/components/posthog/actions/get-surveys/get-surveys.mjs @@ -4,7 +4,7 @@ export default { key: "posthog-get-surveys", name: "Get Surveys", description: "Retrieve a list of surveys. [See the documentation](https://posthog.com/docs/api/surveys#get-api-projects-project_id-surveys)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { posthog, diff --git a/components/posthog/package.json b/components/posthog/package.json index 29b8f11fa722a..d293bcbdca3c0 100644 --- a/components/posthog/package.json +++ b/components/posthog/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/posthog", - "version": "0.2.0", + "version": "0.2.1", "description": "Pipedream PostHog Components", "main": "posthog.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.3" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/posthog/posthog.app.mjs b/components/posthog/posthog.app.mjs index 721e75f929491..cc4f207e8c48a 100644 --- a/components/posthog/posthog.app.mjs +++ b/components/posthog/posthog.app.mjs @@ -69,18 +69,24 @@ export default { }, }, methods: { - _baseUrl() { - return "https://app.posthog.com"; + _baseUrl(publicUrl = false) { + const url = this.$auth.instance_url; + if (publicUrl) { + return `https://${url.substring(0, 2)}.i.${url.slice(3)}`; + } + return `https://${this.$auth.instance_url}`; }, _makeRequest(opts = {}) { const { $ = this, path, + publicUrl, ...otherOpts } = opts; + return axios($, { ...otherOpts, - url: `${this._baseUrl()}${path}`, + url: `${this._baseUrl(publicUrl)}${path}`, headers: { Authorization: `Bearer ${this.$auth.api_key}`, }, @@ -138,6 +144,7 @@ export default { return this._makeRequest({ method: "POST", path: `/api/projects/${projectId}/query`, + publicUrl: true, ...opts, }); }, @@ -145,6 +152,7 @@ export default { return this._makeRequest({ method: "POST", path: "/capture", + publicUrl: true, ...opts, }); }, diff --git a/components/posthog/sources/new-action-performed/new-action-performed.mjs b/components/posthog/sources/new-action-performed/new-action-performed.mjs index e3427082820e1..aa4dca4d86bcd 100644 --- a/components/posthog/sources/new-action-performed/new-action-performed.mjs +++ b/components/posthog/sources/new-action-performed/new-action-performed.mjs @@ -5,7 +5,7 @@ export default { key: "posthog-new-action-performed", name: "New Action Performed", description: "Emit new event when an action is performed in a project. [See the documentation](https://posthog.com/docs/api/query#post-api-projects-project_id-query)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", props: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95f81c178a589..ed5721898cfe2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6793,8 +6793,7 @@ importers: components/humanloop: {} - components/humantic_ai: - specifiers: {} + components/humantic_ai: {} components/humor_api: dependencies: @@ -11113,8 +11112,8 @@ importers: components/posthog: dependencies: '@pipedream/platform': - specifier: ^3.0.3 - version: 3.0.3 + specifier: ^3.1.0 + version: 3.1.0 components/postman: dependencies: @@ -12642,8 +12641,7 @@ importers: specifier: ^4.0.0 version: 4.0.1 - components/securityscorecard: - specifiers: {} + components/securityscorecard: {} components/securitytrails: dependencies: @@ -30982,22 +30980,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net supports-color@10.0.0: resolution: {integrity: sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ==}