diff --git a/components/apify_oauth/actions/get-dataset-items/get-dataset-items.mjs b/components/apify_oauth/actions/get-dataset-items/get-dataset-items.mjs index 512f3cf946627..1f977dd20e280 100644 --- a/components/apify_oauth/actions/get-dataset-items/get-dataset-items.mjs +++ b/components/apify_oauth/actions/get-dataset-items/get-dataset-items.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "apify_oauth-get-dataset-items", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/apify_oauth/actions/run-actor/run-actor.mjs b/components/apify_oauth/actions/run-actor/run-actor.mjs index d2185b8dd415e..9c9084efa8621 100644 --- a/components/apify_oauth/actions/run-actor/run-actor.mjs +++ b/components/apify_oauth/actions/run-actor/run-actor.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "apify_oauth-run-actor", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/apify_oauth/actions/run-task-synchronously/run-task-synchronously.mjs b/components/apify_oauth/actions/run-task-synchronously/run-task-synchronously.mjs index bc1148e71b47f..fd55b0049c612 100644 --- a/components/apify_oauth/actions/run-task-synchronously/run-task-synchronously.mjs +++ b/components/apify_oauth/actions/run-task-synchronously/run-task-synchronously.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "apify_oauth-run-task-synchronously", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/apify_oauth/actions/scrape-single-url/scrape-single-url.mjs b/components/apify_oauth/actions/scrape-single-url/scrape-single-url.mjs index 8f9fe7fb05813..cc45105f7036f 100644 --- a/components/apify_oauth/actions/scrape-single-url/scrape-single-url.mjs +++ b/components/apify_oauth/actions/scrape-single-url/scrape-single-url.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "apify_oauth-scrape-single-url", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/apify_oauth/actions/set-key-value-store-record/set-key-value-store-record.mjs b/components/apify_oauth/actions/set-key-value-store-record/set-key-value-store-record.mjs index 61b12378caeb1..933f43d549006 100644 --- a/components/apify_oauth/actions/set-key-value-store-record/set-key-value-store-record.mjs +++ b/components/apify_oauth/actions/set-key-value-store-record/set-key-value-store-record.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "apify_oauth-set-key-value-store-record", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/apify_oauth/apify_oauth.app.mjs b/components/apify_oauth/apify_oauth.app.mjs index 9764aaafbf77a..7cd7cf850f38d 100644 --- a/components/apify_oauth/apify_oauth.app.mjs +++ b/components/apify_oauth/apify_oauth.app.mjs @@ -1,4 +1,5 @@ import common from "@pipedream/apify"; +import { ApifyClient } from "apify-client"; export default { type: "app", @@ -8,12 +9,19 @@ export default { }, methods: { ...common.methods, - _headers() { - return { - "Content-Type": "application/json", - "Authorization": `Bearer ${this.$auth.oauth_access_token}`, - "x-apify-integration-platform": "pipedream", - }; + _client() { + return new ApifyClient({ + token: this.$auth.oauth_access_token, + requestInterceptors: [ + (config) => ({ + ...config, + headers: { + ...(config.headers || {}), + "x-apify-integration-platform": "pipedream", + }, + }), + ], + }); }, }, }; diff --git a/components/apify_oauth/package.json b/components/apify_oauth/package.json index 6184248d3fc36..19408524d6456 100644 --- a/components/apify_oauth/package.json +++ b/components/apify_oauth/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/apify_oauth", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Apify (OAuth) Components", "main": "apify_oauth.app.mjs", "keywords": [ @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/apify": "^0.3.0" + "@pipedream/apify": "^0.3.1", + "apify-client": "^2.17.0" } } diff --git a/components/apify_oauth/sources/new-finished-actor-run-instant/new-finished-actor-run-instant.mjs b/components/apify_oauth/sources/new-finished-actor-run-instant/new-finished-actor-run-instant.mjs index 48a61114c1ea6..63c5a3172230b 100644 --- a/components/apify_oauth/sources/new-finished-actor-run-instant/new-finished-actor-run-instant.mjs +++ b/components/apify_oauth/sources/new-finished-actor-run-instant/new-finished-actor-run-instant.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "apify_oauth-new-finished-actor-run-instant", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/apify_oauth/sources/new-finished-task-run-instant/new-finished-task-run-instant.mjs b/components/apify_oauth/sources/new-finished-task-run-instant/new-finished-task-run-instant.mjs index e4e604bc3c294..9ee6613386a3d 100644 --- a/components/apify_oauth/sources/new-finished-task-run-instant/new-finished-task-run-instant.mjs +++ b/components/apify_oauth/sources/new-finished-task-run-instant/new-finished-task-run-instant.mjs @@ -11,7 +11,7 @@ const props = adjustPropDefinitions(others.props, app); export default { ...others, key: "apify_oauth-new-finished-task-run-instant", - version: "0.0.1", + version: "0.0.2", name, description, type, diff --git a/components/beeminder/beeminder.app.mjs b/components/beeminder/beeminder.app.mjs index f7a6ad546b90b..f6929cf4de554 100644 --- a/components/beeminder/beeminder.app.mjs +++ b/components/beeminder/beeminder.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/lingvanex_translation_api/lingvanex_translation_api.app.mjs b/components/lingvanex_translation_api/lingvanex_translation_api.app.mjs index bf466d0d29fb4..f78544b3d1877 100644 --- a/components/lingvanex_translation_api/lingvanex_translation_api.app.mjs +++ b/components/lingvanex_translation_api/lingvanex_translation_api.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 00c8c360962ff..78e898974bc06 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -971,8 +971,11 @@ importers: components/apify_oauth: dependencies: '@pipedream/apify': - specifier: ^0.3.0 + specifier: ^0.3.1 version: 0.3.1 + apify-client: + specifier: ^2.17.0 + version: 2.17.0 components/apilio: {} @@ -25843,9 +25846,6 @@ packages: generate-function@2.3.1: resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==} - generative-bayesian-network@2.1.70: - resolution: {integrity: sha512-nP0CNiVs/QS5ppMsGiEYN3dgAe3UTT1mpDth0wTh9uEyEO4e7y1Yr5PGDcTJsU0Lm3YM21yNzhuPbUg7etKHbQ==} - generic-pool@3.9.0: resolution: {integrity: sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g==} engines: {node: '>= 4'} @@ -26292,10 +26292,6 @@ packages: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true - header-generator@2.1.70: - resolution: {integrity: sha512-s2/jN4hIr/pDRZhXA1D2T72eO4f8Gi1mwYEIFLbU+OR7cjo+Tayrw4RlTN3dXPahrU/MBdjk9gv//MwxLoCpGQ==} - engines: {node: '>=16.0.0'} - heap-js@2.5.0: resolution: {integrity: sha512-kUGoI3p7u6B41z/dp33G6OaL7J4DRqRYwVmeIlwLClx7yaaAy7hoDExnuejTKtuDwfcatGmddHDEOjf6EyIxtQ==} engines: {node: '>=10.0.0'} @@ -45401,11 +45397,6 @@ snapshots: dependencies: is-property: 1.0.2 - generative-bayesian-network@2.1.70: - dependencies: - adm-zip: 0.5.16 - tslib: 2.8.1 - generic-pool@3.9.0: {} gensync@1.0.0-beta.2: {} @@ -45854,16 +45845,6 @@ snapshots: gopd@1.2.0: {} - got-scraping@4.1.2: - dependencies: - got: 14.4.6 - header-generator: 2.1.70 - http2-wrapper: 2.2.1 - mimic-response: 4.0.0 - ow: 1.1.1 - quick-lru: 7.1.0 - tslib: 2.8.1 - got@11.8.6: dependencies: '@sindresorhus/is': 4.6.0 @@ -46108,13 +46089,6 @@ snapshots: he@1.2.0: {} - header-generator@2.1.70: - dependencies: - browserslist: 4.24.2 - generative-bayesian-network: 2.1.70 - ow: 0.28.2 - tslib: 2.8.1 - heap-js@2.5.0: {} help-me@3.0.0: