diff --git a/packages/docs/pages/build-integrations/actions.md b/packages/docs/pages/build-integrations/actions.md index 69e7dc94..7e8a081b 100644 --- a/packages/docs/pages/build-integrations/actions.md +++ b/packages/docs/pages/build-integrations/actions.md @@ -68,7 +68,7 @@ export default defineAction({ { label: 'Image ID', key: 'imageId', - type: 'string' as const, + type: 'string', required: true, description: 'The ID of the cat image you want to mark as favorite.', variables: true, @@ -104,7 +104,7 @@ export default defineAction({ const imageId = $.step.parameters.imageId; const headers = { - 'x-api-key': $.auth.data.apiKey as string, + 'x-api-key': $.auth.data.apiKey, }; const response = await $.http.post( diff --git a/packages/docs/pages/build-integrations/auth.md b/packages/docs/pages/build-integrations/auth.md index 19ca217a..5f297f83 100644 --- a/packages/docs/pages/build-integrations/auth.md +++ b/packages/docs/pages/build-integrations/auth.md @@ -60,7 +60,7 @@ export default { { key: 'screenName', label: 'Screen Name', - type: 'string' as const, + type: 'string', required: true, readOnly: false, value: null, @@ -72,7 +72,7 @@ export default { { key: 'apiKey', label: 'API Key', - type: 'string' as const, + type: 'string', required: true, readOnly: false, value: null, @@ -118,7 +118,7 @@ export default { Let's create the `verify-credentials.js` file inside the `auth` folder. ```javascript -const verifyCredentials = async ($: IGlobalVariable) => { +const verifyCredentials = async ($) => { // TODO: Implement verification of the credentials }; @@ -130,7 +130,7 @@ We generally use the `users/me` endpoint or any other endpoint that we can valid Let's implement the authentication logic that we mentioned above in the `verify-credentials.js` file. ```javascript -const verifyCredentials = async ($: IGlobalVariable) => { +const verifyCredentials = async ($) => { await $.http.get('/v1/images/search'); await $.auth.set({ @@ -172,7 +172,7 @@ Let's create the `is-still-verified.js` file inside the `auth` folder. ```javascript import verifyCredentials from './verify-credentials.js'; -const isStillVerified = async ($: IGlobalVariable) => { +const isStillVerified = async ($) => { await verifyCredentials($); return true; }; diff --git a/packages/docs/pages/build-integrations/triggers.md b/packages/docs/pages/build-integrations/triggers.md index e2660965..38f8a30f 100644 --- a/packages/docs/pages/build-integrations/triggers.md +++ b/packages/docs/pages/build-integrations/triggers.md @@ -103,18 +103,18 @@ export default defineTrigger({ let response; const headers = { - 'x-api-key': $.auth.data.apiKey as string, + 'x-api-key': $.auth.data.apiKey, }; do { let requestPath = `/v1/images/search?page=${page}&limit=10&order=DESC`; response = await $.http.get(requestPath, { headers }); - response.data.forEach((image: IJSONObject) => { + response.data.forEach((image) => { const dataItem = { raw: image, meta: { - internalId: image.id as string + internalId: image.id }, };