Zapier CLI TypeScript integration development guide
How to build Zapier CLI integrations with TypeScript v17.4.0+. Covers defineApp, defineTrigger, defineCreate helpers, ESM module structure, and type inference.
TypeScript is the recommended way to build integrations with the Zapier CLI.
Support for TypeScript was significantly expanded in early 2025 when v17 of the
Zapier Developer Platform and CLI was released. This document covers how to create, use,
and test TypeScript integrations.
The TypeScript+ESM templates generated with zapier-platform init (or the deprecated zapier init) provide the
configuration needed to get started with TypeScript integrations. If you
are adding TypeScript support to an existing app, you can check the
Structure of a TS Integration section
below for more details information about compiler settings, using the
zapier-platform-core library, and how to compose Triggers, Creates,
and Searches together with TypeScript.As of the 17.4.0 Platform release, all authentication templates support the --language
flag on the zapier-platform init command (or deprecated zapier init), which can be set to typescript or javascript.
Note that all TypeScript templates now default to ESM.For example, for Basic Auth:
# (deprecated) $ zapier init my-app --template basic-auth --language typescript$ zapier-platform init my-app --template basic-auth --language typescript$ cd my-app$ npm install # or you can use pnpm, yarn, or bun
This will create a new app in ./my-app with the following structure,
and install the dependencies.
To add triggers, creates, and searches, you can then run zapier-platform scaffold (or deprecated zapier scaffold) as needed.
The scaffold command will automatically detect you’re using TypeScript, and create the
correct code accordingly:
The defineInputFields helper function should be used to define the
inputs for all of Triggers, Creates, and Searches. This helper will
automatically infer the types of all of the input fields specified.This looks like:
import { defineInputFields, defineXyz, // i.e. defineTrigger, defineCreate, defineSearch. type XyzPerform, // Different per action+perform type.} from "zapier-platform-core";const inputFields = defineInputFields([ // Input fields definition here.]);const perform = (async (z, bundle) => { // Bundle.inputData typed from inputFields. // perform requests & app logic here.}) satisfies XyzPerform<typeof inputFields>;export default defineXyz({ // ... Other details: key, display, noun, etc. operations: { inputFields, perform }, // Composed here.});
This is a departure from the previous approach of typically defining the
inputs and sometimes perform functions inside of the top-level exported
action.
Input Fields are frequently reused across triggers, creates, and
searches. To make this easier, there is also a singular
defineInputField helper that can be used to define an input field.
These can be put somewhere in the src/ directory, and then imported by
the actions that need them.
Inputs fields can be dynamic, meaning they are functions that get
executed and can return zero, one, or more input fields determined at
runtime. This is useful when the input fields are dependent on the
values of other input fields, or input field definitions are fetched and
prepared from your API, like is the case for CRM and Database APIs.The example below shows a dynamic input field that is used to optionally
include a custom subject field when a prior boolean input field is set
to true.
import { defineInputField, defineInputFields } from "zapier-platform-core";const customSubjectField = defineInputField((z, bundle) => { if (bundle.inputData.useCustomSubject as boolean) { return defineInputFields([ { key: "customSubject", type: "string", required: true }, ]); } return defineInputFields([]); // IMPORTANT: All returns must be typed.});const inputFields = defineInputFields([ { key: "useCustomSubject", type: "boolean", required: true }, customSubjectField,]);// bundle.inputData: { useCustomSubject: boolean; customSubject?: string }
Inside of dynamic input field functions, bundle.inputData will not have type
information for its sibling input fields. We recommend casting referenced
fields to their known types. For example above, note
inputData.useCustomSubject as boolean.
The example above shows a known dynamic input field, where the key and
type are known ahead of time, and the function’s logic is used to
include it or not, based on other fields. These sorts of input fields
can be captured by the type system and included in the
bundle.inputData property. Input fields returned from input functions
are always considered optional, even if they have required: true in
their definition, as they cannot be guaranteed to be present.When fields cannot be known ahead of time, the input function can return
completely unknown input fields. This is useful when the input fields
are derived from data returned from an API. In this case, known inputs
are preserved, but the bundle.inputData property will consider any
other properties as unknown.
There are now dedicated types for all of the different types of Perform
Action. These should be imported with type qualified imports. The
relevant operation sections inside the define helpers will inform
and enforce the correct type for the different perform functions. They
are:
Polling Triggers:
PollingTriggerPerform
Webhook Triggers:
WebhookTriggerPerform
WebhookTriggerPerformList
WebhookTriggerPerformSubscribe
WebhookTriggerPerformUnsubscribe
Creates:
CreatePerform
CreatePerformResume
Searches:
SearchPerform
SearchPerformResume
They all take at least one type parameter, which is the shape of the the
bundle’s inputData property. These Perform types should use
satisfies XyzPerform<typeof inputFields> to enforce the correct types but
preserve the return type information.
In most cases though, input data is derived from the array of input fields,
which can be passed directly to the perform functions to be automatically
inferred:
TypeScript integrations follow the same structure and underlying
schema as any
JavaScript integration. The important difference is that TypeScript apps
require important components of integrations to be wrapped with the
relevant define helper functions to provide deep type inference about
the application. These are:
defineApp() – Main function for the top-level app.
defineTrigger()/defineCreate()/defineSearch() – For the
relevant actions in an integration.
defineInputFields() – Wraps an array of input field definitions to
simplify handling full typing information about the input fields.
The main entry point of the app becomes src/index.ts. It should import
its dependencies, and the default export remains as the Application
object. Wrapping it with defineApp will help to check its structure.Otherwise it’s a normal integration, and you register Auth, middleware,
hydrators, Triggers, Creates, and Searches all the same way!
import { defineApp, version as platformVersion } from "zapier-platform-core";import packageJson from "../package.json" with { type: "json" };import authentication from "./authentication";import someCreate from "./creates/some-create";import someSearch from "./searches/some-search";import someTrigger from "./triggers/some-trigger";export default defineApp({ // IMPORTANT: Note the use of `defineApp` version: packageJson.version, platformVersion, authentication, creates: { [someCreate.key]: someCreate, }, searches: { [someSearch.key]: someSearch, }, triggers: { [someTrigger.key]: someTrigger, },});
Authentication is defined as a normal object and exported from a file
named src/authentication.ts. It uses a satisfies Authentication
constraint to check its structure, and does not use a define
helper.
Middleware functions are functions exported from src/middleware.ts,
that are typed as BeforeRequestMiddleware or
AfterResponseMiddleware types. They are registered in the same way as
in JavaScript integrations in /src/index.ts.
Triggers, Creates, and Searches are now recommended to define their
inputs and perform functions as separate objects, and composed together
in the define helper that is default export from the file.
// ./src/triggers/pollingTrigger.tsimport { defineInputFields, defineTrigger, type PollingTriggerPerform,} from "zapier-platform-core";import { API_URL } from "../constants.js";const inputFields = defineInputFields([ // IMPORTANT: Note `defineInputFields` { key: "country", type: "string", required: false, },]);const perform = (async (z, bundle) => { // `bundle.inputData` typed as `{ country?: string }` const response = await z.request(`${API_URL}/movies`); return response.data;}) satisfies PollingTriggerPerform<typeof inputFields>; // IMPORTANT: Note `satisfies`export default defineTrigger({ key: "movie", noun: "Movie", display: { label: "New Movie", description: "Triggers when a new movie is created.", }, operation: { type: "polling", inputFields, perform, sample: { id: "1", title: "example", }, },});
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Zapier","colors":{"primary":"#FF4F00","light":"#FE6C2A","dark":"#FF4F00"},"logo":{"light":"https://mintcdn.com/zapier-82f0e938/uPbDC0jSuXgHCaWD/logo/light.svg?fit=max\u0026auto=format\u0026n=uPbDC0jSuXgHCaWD\u0026q=85\u0026s=b6a37289cb22ac1a9681572651874765","dark":"https://mintcdn.com/zapier-82f0e938/b1yEJJDZ7v1EncmE/logo/dark.svg?fit=max\u0026auto=format\u0026n=b1yEJJDZ7v1EncmE\u0026q=85\u0026s=2c393c141bc7fbb0051aaa46b103f5e8","href":"https://zapier.com"},"favicon":"https://mintcdn.com/zapier-82f0e938/1jtyk4mqAs_J-p30/favicon.png?fit=max\u0026auto=format\u0026n=1jtyk4mqAs_J-p30\u0026q=85\u0026s=a26d7c83b71f1cdec48ae963245f407f","api":{"openapi":["https://api.zapier.com/schema","api-reference/specs/trigger-inbox.yaml","api-reference/specs/actions.yaml","api-reference/specs/connections.yaml","api-reference/specs/agentic-management.yaml"]},"background":{"color":{"light":"#FFFEFB"}},"navbar":{"primary":{"type":"button","label":"Sign Up","href":"https://zapier.com/sign-up"}},"footer":{},"seo":{"indexing":"all"},"integrations":{"gtm":{"tagId":"GTM-K7GFJTV"}},"contextual":{"options":["copy","view",{"title":"Open in ChatGPT","description":"Ask ChatGPT about this page","icon":"/images/logos/branded/openai.svg","href":{"base":"https://chatgpt.com/","query":[{"key":"q","value":"Read https://docs.zapier.com$path.md and help me apply it. Ask what I am building before giving steps."}]}},{"title":"Open in Claude","description":"Ask Claude about this page","icon":"/images/logos/branded/claude.svg","href":{"base":"https://claude.ai/new","query":[{"key":"q","value":"Read https://docs.zapier.com$path.md and help me apply it. Ask what I am building before giving steps."}]}},{"title":"Open in Perplexity","description":"Ask Perplexity about this page","icon":"/images/logos/branded/perplexity.svg","href":{"base":"https://www.perplexity.ai/search","query":[{"key":"q","value":"Read https://docs.zapier.com$path.md and help me apply it. Ask what I am building before giving steps."}]}},{"title":"Open in Claude Code","description":"Use this page in Claude Code","icon":"/images/logos/branded/claude.svg","href":{"base":"claude://code/new","query":[{"key":"q","value":"Read https://docs.zapier.com$path.md and help me apply it to this project. Check what is already here before giving steps."}]}},{"title":"Open in Codex","description":"Use this page in Codex","icon":"/images/logos/branded/openai.svg","href":{"base":"codex://new","query":[{"key":"prompt","value":"Read https://docs.zapier.com$path.md and help me apply it to this project. Check what is already here before giving steps."}]}},{"title":"Open in Cursor","description":"Use this page in Cursor","icon":"/images/logos/branded/cursor.svg","href":{"base":"cursor://anysphere.cursor-deeplink/prompt","query":[{"key":"text","value":"Read https://docs.zapier.com$path.md and help me apply it to this project. Check what is already here before giving steps."}]}}],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"users","href":"https://community.zapier.com/"},{"anchor":"Changelog","icon":"rss","href":"/white-label/changelog"},{"anchor":"Contact Us","icon":"envelope","href":"https://developer.zapier.com/contact"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"zapier-82f0e938","hasAudioNarration":false,"actualSubdomain":"zapier-82f0e938","customDomains":["docs.zapier.com"],"gitSource":{"type":"gitlab","owner":"zapier/public-api","repo":"public-api-docs","projectId":56036607,"deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af4be157e3af22d78e5aa8b","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Build a Zapier integration","count":149},{"language":"default","tag":"Developer Platform","count":149},{"language":"default","tag":"Embed Zapier","count":105},{"language":"default","tag":"Powered by Zapier","count":86},{"language":"default","tag":"Use Zapier in your tools","count":80},{"language":"default","tag":"Zapier MCP","count":69},{"language":"default","tag":"API reference","count":60},{"language":"default","tag":"Build with UI","count":52},{"language":"default","tag":"API specification","count":50},{"language":"default","tag":"Get started","count":47}]},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"6ac8f1f2b9b3f8640f05a146","deploymentId":"67001931f47db52dbf2b872a","questionText":"How do I build a public Zapier integration?","status":"active","generatedBy":"manual","createdAt":"2026-10-09T13:53:54.782Z","updatedAt":"2026-10-09T13:53:54.782Z","__v":0},{"_id":"6ac8f1e5b9b3f8640f05a0d1","deploymentId":"67001931f47db52dbf2b872a","questionText":"What's the difference between the SDK and Platform CLI?","status":"active","generatedBy":"manual","createdAt":"2026-10-09T13:53:41.586Z","updatedAt":"2026-10-09T13:53:41.586Z","__v":0},{"_id":"6ac8f1d4b9b3f8640f05a051","deploymentId":"67001931f47db52dbf2b872a","questionText":"How do I connect Zapier MCP to my MCP client?","status":"active","generatedBy":"manual","createdAt":"2026-10-09T13:53:24.465Z","updatedAt":"2026-10-09T13:53:24.465Z","__v":0}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"@font-face{font-family:\"Degular Display - Semibold\";src:url('https://fonts.zapier.com/Degular/DegularDisplay-Semibold.woff2');font-display:fallback;font-weight:400}@font-face{font-family:\"Serrif\";src:url('/fonts/serrif-300.woff2') format('woff2');font-display:swap;font-weight:300;font-style:normal}@font-face{font-family:\"Degular Display\";src:url('/fonts/degular-display-500.woff2') format('woff2');font-display:swap;font-weight:500;font-style:normal}@font-face{font-family:\"Degular Display\";src:url('/fonts/degular-display-600.woff2') format('woff2');font-display:swap;font-weight:600;font-style:normal}header h1,h2,h3,h4{font-family:\"Degular Display - Semibold\";font-weight:normal!important;letter-spacing:0.08rem!important}#chat-assistant-floating-input,.chat-assistant-floating-input,[data-component-part=\"chat-assistant-floating-input\"]{display:none!important}.card h2{font-size:1.2rem}.card code{text-decoration:none}:root:not(.dark) .card,:root:not(.dark) .code-block,:root:not(.dark) .code-block-background,:root:not(.dark) .code-group,:root:not(.dark) .shiki,:root:not(.dark) .code-block pre,:root:not(.dark) .code-group pre{background-color:#FFFEFB!important}.cta-button{display:inline-flex;align-items:center;gap:8px;padding:12px 24px;width:fit-content;background:#FF4F00;color:#FFFFFF!important;font-weight:600;font-size:15px;letter-spacing:0.01em;text-decoration:none!important;border:none;border-radius:8px;box-shadow:0 2px 8px rgba(255, 79, 0, 0.25);transition:all 0.2s ease;margin:1em 0}.cta-button:hover{background:#E64600;color:#FFFFFF!important;text-decoration:none!important;box-shadow:0 4px 12px rgba(255, 79, 0, 0.35);transform:translateY(-1px)}.cta-button:active{transform:translateY(0);box-shadow:0 1px 4px rgba(255, 79, 0, 0.3)}blockquote.sr-only+h2{margin-top:0}#navbar a[href=\"https://zapier.com\"],#navbar a[href=\"https://zapier.com\"] img{padding-right:0!important;margin-right:0!important}.docs-nav-label{color:#201515!important;font-family:\"Degular Display - Medium\", ui-sans-serif, system-ui, sans-serif;font-weight:400;font-size:1.5rem;letter-spacing:0.01em;margin-left:-0.6rem;text-decoration:none!important;transition:color 0.15s ease;vertical-align:middle;cursor:pointer}.docs-nav-label:hover{color:#939084!important;text-decoration:none!important}.dark .docs-nav-label{color:#FFFEFB!important}.dark .docs-nav-label:hover{color:#C5C0B1!important}[role=\"menu\"]:focus,[role=\"menu\"]:focus-visible{outline-width:1px}footer:not(#zapier-universal-footer){display:none!important}#zapier-universal-footer{display:block!important;background-color:#fffdf9;font-family:'Inter', Helvetica, arial, sans-serif;font-size:14px;line-height:24px;color:#201515;-webkit-font-smoothing:antialiased;width:100%;margin-top:2rem}.dark #zapier-universal-footer{background-color:#2d2e2e;color:#fffdf9}.zuf{max-width:1200px;margin:0 auto;padding:30px;display:grid;grid-template-rows:auto;grid-template-columns:100%;grid-template-areas:'links' 'socials' 'logo' 'meta';justify-items:center;align-items:center;gap:30px}@media (min-width: 650px){.zuf{grid-template-columns:max-content 1fr;grid-template-areas:'links links'\n 'socials socials'\n 'logo meta'}}@media (min-width: 980px){.zuf{grid-template-columns:max-content 1fr;grid-template-areas:'socials links'\n 'logo meta'}}.zuf-row--top,.zuf-row--bottom{display:contents}.zuf-socials{grid-area:socials;display:inline-flex;flex-wrap:wrap;align-items:center;gap:10px}@media (min-width: 980px){.zuf-socials{justify-self:start}}.zuf-follow{font-size:14px;line-height:20px;font-weight:400;color:#574e4c;white-space:nowrap}.dark .zuf-follow{color:#a8a5a0}.zuf-icon{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:100%;background-color:#a8a5a0;text-decoration:none!important;transition:background-color 0.15s ease}.zuf-icon svg,.zuf-icon img{width:16px;height:16px;fill:#fffdf9}.dark .zuf-icon{background-color:#403f3e}.dark .zuf-icon svg{fill:#fffdf9}.zuf-icon[aria-label*=\"Facebook\"]:hover,.zuf-icon[aria-label*=\"Facebook\"]:focus{background-color:#3b5998;outline:none}.zuf-icon[aria-label*=\"LinkedIn\"]:hover,.zuf-icon[aria-label*=\"LinkedIn\"]:focus{background-color:#0976b4;outline:none}.zuf-icon[aria-label*=\"X\"]:hover,.zuf-icon[aria-label*=\"X\"]:focus{background-color:#00aced;outline:none}.zuf-icon[aria-label*=\"YouTube\"]:hover,.zuf-icon[aria-label*=\"YouTube\"]:focus{background-color:#e52d27;outline:none}.zuf-icon[aria-label*=\"blog\"]:hover,.zuf-icon[aria-label*=\"blog\"]:focus{background-color:#ff4f00;outline:none}.zuf-links{grid-area:links;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;column-gap:12.5px;row-gap:10px;width:100%}@media (min-width: 980px){.zuf-links{justify-content:flex-end}}.zuf-links a{font-family:'Inter', Helvetica, arial, sans-serif;font-size:14px;line-height:24px;font-weight:500;color:#201515!important;padding:0 5px;white-space:nowrap;text-decoration:none!important}.zuf-links a:hover,.zuf-links a:focus{color:#3d4592!important;outline:none}.dark .zuf-links a{color:#fffdf9!important}.dark .zuf-links a:hover,.dark .zuf-links a:focus{color:#90a1ed!important}.zuf-logo{grid-area:logo;display:inline-flex;align-items:center;text-decoration:none!important}.zuf-logo svg{display:block}.zuf-logo path{fill:#201515}.dark .zuf-logo path{fill:#fffdf9}.zuf-logo path[fill=\"#FF4F00\"]{fill:#FF4F00!important}@media (min-width: 650px){.zuf-logo{justify-self:start}}.zuf-meta{grid-area:meta;font-size:14px;line-height:24px;font-weight:400;color:#574e4c;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;row-gap:10px}.dark .zuf-meta{color:#a8a5a0}.zuf-meta a{padding:5px 10px;color:#574e4c!important;text-decoration:none!important}.zuf-meta a:hover,.zuf-meta a:focus{color:#3d4592!important;outline:none}.dark .zuf-meta a{color:#a8a5a0!important}.dark .zuf-meta a:hover,.dark .zuf-meta a:focus{color:#90a1ed!important}@media (min-width: 650px){.zuf-meta{justify-self:end;justify-content:flex-end}}.zuf-meta span{margin-right:10px}@media (max-width: 979px){.zuf{padding:20px}}"},{"filePath":"index.css","content":".docs-landing{width:100%;margin:0 auto}#navbar{background:#fffef8!important;backdrop-filter:none!important}.dark #navbar{background:#18181b!important}.docs-landing-hero-bg{background:#201515}.docs-landing-hero-bg .dl-hero-title{color:#ffffff}.docs-landing-hero-bg .docs-landing-lead{color:rgba(255, 255, 255, 0.6)}.dark .docs-landing-hero-bg{background:#26201f;border-bottom:1px solid rgba(255, 255, 255, 0.08)}.docs-landing-hero{display:grid;grid-template-columns:minmax(0, 1fr);gap:clamp(1.5rem, 3.5vw, 2.5rem);align-items:center;max-width:1180px;margin:0 auto;padding:48px clamp(1.25rem, 4vw, 2rem) clamp(1.25rem, 2.5vw, 1.75rem)}.docs-landing-hero-inner{text-align:center}.dl-hero-copy{text-align:center;max-width:640px;margin:0 auto}.docs-landing-eyebrow{font-family:\"Inter\", ui-sans-serif, system-ui, sans-serif;font-size:0.75rem;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;color:#605d52;margin:0 0 1.25rem}.docs-landing-title{font-family:\"Degular Display - Semibold\", ui-sans-serif, system-ui, sans-serif;font-size:clamp(2.25rem, 4.5vw, 3.25rem);line-height:1.08;font-weight:400!important;margin:0 0 1rem;letter-spacing:0.08rem!important}.docs-landing-lead{font-family:\"Inter\", ui-sans-serif, system-ui, sans-serif;font-size:1rem;line-height:1.5;color:#201515;margin:0 auto;max-width:62ch}.dark .docs-landing-lead{color:var(--muted-foreground, #a1a1aa)}.docs-landing-media{border-radius:14px;overflow:hidden;box-shadow:0 1px 2px rgba(15, 23, 42, 0.06),\n 0 12px 40px rgba(15, 23, 42, 0.12);border:1px solid rgba(255, 79, 0, 0.12);background:rgba(255, 79, 0, 0.04)}.docs-landing-video{display:block;width:100%;height:auto;vertical-align:middle}.docs-landing-products{max-width:1180px;margin:0 auto;padding:clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 2rem) clamp(3rem, 6vw, 5rem)}.docs-landing-section-title{font-family:\"Degular Display - Semibold\", ui-sans-serif, system-ui, sans-serif;font-size:clamp(1.5rem, 2.5vw, 1.875rem);font-weight:400!important;text-align:left;margin:0 0 2.25rem;letter-spacing:0.08rem!important}.dl-hero-title{font-family:\"Degular Display\", ui-sans-serif, system-ui, sans-serif;font-size:clamp(2.5rem, 4.8vw, 3.5rem);line-height:1.1;font-weight:500;letter-spacing:-0.03em!important;color:var(--foreground, #18181b);margin:0 0 0.6875rem}.dark .dl-hero-title{color:var(--foreground, #fafafa)}.dl-hero-title-accent{color:#ff4f00}.dark .dl-hero-title-accent{color:#ff8a5c}.dl-hero-demo{display:flex;align-items:center;justify-content:center;aspect-ratio:1 / 1;min-height:fit-content;padding:clamp(1rem, 3vw, 1.75rem);border:1px solid rgba(9, 9, 11, 0.1);border-radius:10px;background-image:url('/images/pattern-abstract.jpg');background-size:cover;background-position:center;background-repeat:no-repeat;overflow:hidden}.dark .dl-hero-demo{border-color:rgba(255, 255, 255, 0.12)}.dl-demo-panel{width:100%;border:1px solid rgba(9, 9, 11, 0.1);border-radius:12px;background:#ffffff;box-shadow:0 1px 2px rgba(15, 23, 42, 0.06),\n 0 12px 40px rgba(15, 23, 42, 0.14);overflow:hidden}.dark .dl-demo-panel{background:#18181b;border-color:rgba(255, 255, 255, 0.12)}.dl-demo-clients{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;padding:0.5rem 0.75rem;border-bottom:1px solid rgba(9, 9, 11, 0.08)}.dark .dl-demo-clients{border-bottom-color:rgba(255, 255, 255, 0.1)}.dl-demo-chip{width:36px;height:36px;border-radius:8px;border:1px solid rgba(9, 9, 11, 0.1);background:#ffffff;flex:none;margin:0!important}.dark .dl-demo-chip{border-color:rgba(255, 255, 255, 0.14)}.dl-demo-chip--padded{padding:6px}.dl-demo-arch-agents{display:flex;gap:0.625rem;padding:1rem 1rem 0.75rem}.dl-demo-arch-col{flex:1;display:flex;flex-direction:column;gap:0.375rem}.dl-demo-arch-label{font-size:0.6875rem;font-weight:500;color:var(--muted-foreground, #71717a);margin:0 0 0.125rem;letter-spacing:0.01em}.dl-demo-arch-label--spacer{visibility:hidden;pointer-events:none;user-select:none}.dl-demo-arch-chip{display:flex;align-items:center;gap:0.4375rem;padding:0.3125rem 0.5625rem;border-radius:7px;border:1px solid rgba(9, 9, 11, 0.1);background:#ffffff;font-size:0.75rem;font-weight:500;color:#09090b;line-height:1;white-space:nowrap}.dl-demo-arch-chip--muted{background:transparent;border-style:dashed;color:var(--muted-foreground, #71717a)}.dl-demo-arch-chip--logo{justify-content:center;padding:0.375rem;width:36px;height:36px}.dl-demo-arch-icon{width:22px;height:22px;border-radius:4px;flex:none}.dl-demo-arch-chip--icon-pad .dl-demo-arch-icon{padding:3px}.dl-demo-arch-merge{position:relative;height:28px;margin:0 1rem}.dl-demo-arch-merge::before{content:'';position:absolute;left:25%;right:25%;top:0;height:14px;border-left:1px solid rgba(9, 9, 11, 0.1);border-right:1px solid rgba(9, 9, 11, 0.1);border-bottom:1px solid rgba(9, 9, 11, 0.1);border-bottom-left-radius:4px;border-bottom-right-radius:4px}.dl-demo-arch-merge::after{content:'';position:absolute;left:50%;transform:translateX(-50%);top:14px;bottom:0;width:1px;background:rgba(9, 9, 11, 0.1)}.dl-demo-arch-zapier{display:flex;align-items:center;justify-content:center;gap:0.5rem;margin:0 1rem;padding:0.625rem 1rem;border:1px solid rgba(9, 9, 11, 0.1);border-radius:10px;background:#ffffff}.dl-demo-arch-stem{display:flex;justify-content:center;height:20px}.dl-demo-arch-stem::after{content:'';width:1px;height:100%;background:rgba(9, 9, 11, 0.1)}.dl-demo-arch-apps{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0.375rem;padding:0 1rem 0.875rem}.dl-demo-arch-app{display:inline-flex;align-items:center;padding:0.25rem 0.625rem;border-radius:6px;border:1px solid rgba(9, 9, 11, 0.1);background:#ffffff;font-size:0.6875rem;font-weight:500;color:#09090b;white-space:nowrap}.dl-demo-arch-app--more{background:transparent;border-color:#e06c2c;color:#e06c2c;font-weight:600;text-decoration:none}.dl-demo-arch-app--more:hover{background:rgba(224, 108, 44, 0.06)}.dark .dl-demo-arch-stem::after{background:rgba(255, 255, 255, 0.1)}.dark .dl-demo-arch-app{background:rgba(255, 255, 255, 0.06);border-color:rgba(255, 255, 255, 0.12);color:#fafafa}.dl-demo-arch-zapier-badge{font-size:0.8125rem;font-weight:600;color:#09090b;letter-spacing:-0.01em}.dl-demo-arch-zapier-plus{font-size:0.8125rem;font-weight:600;color:#e06c2c}.dark .dl-demo-arch-chip{background:rgba(255, 255, 255, 0.06);border-color:rgba(255, 255, 255, 0.12);color:#fafafa}.dark .dl-demo-arch-chip--muted{background:transparent;border-color:rgba(255, 255, 255, 0.15);color:var(--muted-foreground, #a1a1aa)}.dark .dl-demo-arch-merge::before{border-color:rgba(255, 255, 255, 0.1)}.dark .dl-demo-arch-merge::after{background:rgba(255, 255, 255, 0.1)}.dark .dl-demo-arch-zapier{background:rgba(255, 255, 255, 0.04);border-color:rgba(255, 255, 255, 0.1)}.dark .dl-demo-arch-zapier-badge{color:#fafafa}.dl-demo-more{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:8px;border:1px dashed rgba(9, 9, 11, 0.22);font-size:0.9375rem;font-weight:500;line-height:1;color:var(--muted-foreground, #52525b);flex:none}.dark .dl-demo-more{border-color:rgba(255, 255, 255, 0.2);color:var(--muted-foreground, #a1a1aa)}.dl-demo-body{display:flex;flex-direction:column;gap:0.375rem;padding:0.5625rem 0.75rem 0.625rem}.dl-demo-prompt{padding:0.4375rem 0.625rem;border:1px solid rgba(9, 9, 11, 0.1);border-radius:7px;font-size:0.75rem;color:var(--muted-foreground, #52525b)}.dl-demo-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0.4375rem 0.625rem;border:1px solid rgba(9, 9, 11, 0.1);border-radius:7px}.dark .dl-demo-prompt,.dark .dl-demo-row{border-color:rgba(255, 255, 255, 0.12)}.dl-demo-status{font-size:0.6875rem;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:#ff4f00}.dl-demo-action{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.375rem 0.625rem;border-left:2px solid #ff4f00;border-radius:0 7px 7px 0;background:rgba(9, 9, 11, 0.03)}.dark .dl-demo-action{background:rgba(255, 255, 255, 0.04)}.dl-demo-action span{font-size:0.75rem;text-align:right;color:var(--muted-foreground, #52525b)}.dl-demo-foot{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-top:0.25rem;font-size:0.75rem;color:var(--muted-foreground, #52525b)}.dl-hero-demo code{font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-size:0.75rem;background:none;border:none;padding:0;color:var(--foreground, #18181b)}.dark .dl-hero-demo code{color:var(--foreground, #fafafa)}.dl-section{max-width:1180px;margin:0 auto;padding:clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 4vw, 2rem)}.dl-eyebrow{font-size:0.6875rem;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:#ff4f00;margin:0 0 0.4375rem}.dl-heading{font-size:clamp(1.375rem, 2.4vw, 1.75rem);line-height:1.2;font-weight:600;letter-spacing:-0.01em!important;color:var(--foreground, #18181b);margin:0 0 0.5rem;max-width:40ch}.dark .dl-heading{color:var(--foreground, #fafafa)}.dl-lead{font-size:0.9375rem;line-height:1.55;color:var(--muted-foreground, #52525b);margin:0 0 1.25rem;max-width:68ch}.dark .dl-lead{color:var(--muted-foreground, #a1a1aa)}.dl-grid{display:grid;gap:0.75rem;align-items:stretch}.dl-grid--2{grid-template-columns:repeat(2, minmax(0, 1fr))}.dl-grid--3{grid-template-columns:repeat(3, minmax(0, 1fr))}.dl-grid--4{grid-template-columns:repeat(4, minmax(0, 1fr))}.dl-card{display:flex;flex-direction:column;gap:0.5rem;padding:1.125rem 1.25rem 1.25rem;border:1px solid rgba(9, 9, 11, 0.1);background:#f8f4f0}.dark .dl-card{border-color:rgba(255, 255, 255, 0.12);background:rgba(255, 255, 255, 0.02)}.dl-card-mark{align-self:flex-start;margin-bottom:0.25rem;color:#ff4f00}.dl-card-eyebrow{font-size:0.6875rem;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:#ff4f00;margin:0}.dl-card-title{font-family:\"Serrif\", ui-serif, serif;font-size:1.5rem;font-weight:300;line-height:1.1;letter-spacing:-0.03em;color:var(--foreground, #18181b);margin:0}.dark .dl-card-title{color:var(--foreground, #fafafa)}.dl-card-desc{font-family:\"Inter\", ui-sans-serif, system-ui, sans-serif;font-size:0.9375rem;line-height:1.55;color:var(--muted-foreground, #52525b);margin:0}.dark .dl-card-desc{color:var(--muted-foreground, #a1a1aa)}.dl-pills{display:flex;flex-wrap:wrap;gap:0.375rem;margin:0.125rem 0 0}.dl-pill{font-size:0.75rem;line-height:1;padding:0.375rem 0.625rem;border-radius:999px;border:1px solid rgba(9, 9, 11, 0.14);color:var(--muted-foreground, #52525b);white-space:nowrap}.dark .dl-pill{border-color:rgba(255, 255, 255, 0.16);color:var(--muted-foreground, #a1a1aa)}.dl-pill>a{color:inherit!important;text-decoration:none!important}.dl-pill:has(>a):hover{border-color:rgba(9, 9, 11, 0.34)}.dark .dl-pill:has(>a):hover{border-color:rgba(255, 255, 255, 0.34)}.dl-pill--accent{border-color:rgba(255, 79, 0, 0.35);background:rgba(255, 79, 0, 0.06);color:#ff4f00}.dark .dl-pill--accent{border-color:rgba(255, 79, 0, 0.45);color:#ff8a5c}.dl-code{font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-size:0.8125rem;line-height:1.7;background:rgba(9, 9, 11, 0.04);border-radius:8px;padding:0.75rem 0.875rem;margin:0.125rem 0;overflow-x:auto;color:var(--foreground, #18181b)}.dl-code span{display:block;white-space:pre}.dl-code--shell span::before{content:\"\\276F \";color:#ff4f00}.dark .dl-code{background:rgba(255, 255, 255, 0.05);color:var(--foreground, #fafafa)}.dl-cta{margin-top:auto;padding-top:0.5rem;font-size:0.875rem;font-weight:600;color:#ff4f00!important;text-decoration:none!important}.dl-cta:hover{text-decoration:underline!important}@media screen and (max-width: 1024px){.dl-grid--3,.dl-grid--4{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media screen and (max-width: 640px){.dl-grid--2,.dl-grid--3,.dl-grid--4{grid-template-columns:1fr}}.docs-landing-next{max-width:1180px;margin:0 auto;padding:clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 4vw, 2rem) clamp(2.25rem, 4vw, 3.25rem)}.docs-landing-next-title{font-size:2rem;line-height:1.2;font-weight:600;letter-spacing:-0.01em!important;color:var(--foreground, #18181b);margin:0 0 1.25rem}.dark .docs-landing-next-title{color:var(--foreground, #fafafa)}.docs-landing-next-grid{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));column-gap:clamp(1.5rem, 4vw, 3rem)}.docs-landing-next-item{position:relative;display:block;padding:0.875rem 0 1.25rem;border-top:1px solid rgba(9, 9, 11, 0.12);text-decoration:none!important;transition:border-top-color 0.2s ease}.docs-landing-next-item:hover{border-top-color:#ff4f00}.dark .docs-landing-next-item{border-top-color:rgba(255, 255, 255, 0.14)}.docs-landing-next-item-title{display:block;font-size:1rem;font-weight:600;color:var(--foreground, #18181b);margin-bottom:0.25rem}.docs-landing-next-item-title::after{content:\" \\2192\";color:#ff4f00}.dark .docs-landing-next-item-title{color:var(--foreground, #fafafa)}.docs-landing-next-item:hover .docs-landing-next-item-title{text-decoration:underline}.docs-landing-next-item-desc{display:block;font-size:0.9375rem;line-height:1.55;color:var(--muted-foreground, #52525b)}.dark .docs-landing-next-item-desc{color:var(--muted-foreground, #a1a1aa)}@media screen and (max-width: 768px){.docs-landing-next-grid{grid-template-columns:1fr}}.hero-container{display:flex;flex-direction:row;align-items:center;justify-content:center;text-align:left;padding:6rem 2rem;width:80%;border-bottom:2px solid #ff4f00;margin:0 auto}.hero-text{width:600px;margin-right:2rem}@media screen and (max-width: 1024px){.docs-landing-hero{grid-template-columns:1fr}.docs-landing-media{max-width:640px;margin:0 auto}}@media screen and (max-width: 1300px){.hero-container{flex-direction:column;text-align:center}.hero-text{margin-right:0rem;margin-bottom:2rem}.hero-video{max-width:600px}}.dl-section-heading{font-size:2rem;line-height:1.2;font-weight:600;letter-spacing:-0.01em!important;color:var(--foreground, #18181b);margin:0 0 1.25rem}.dark .dl-section-heading{color:var(--foreground, #fafafa)}.dl-bands{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:0.75rem}.dl-band{display:flex;flex-direction:column;border:1px solid rgba(9, 9, 11, 0.1);overflow:hidden;background:#f8f4f0}.dark .dl-band{border-color:rgba(255, 255, 255, 0.12);background:rgba(255, 255, 255, 0.02)}.dl-band-main{display:flex;flex-direction:column;gap:0.5rem;padding:1.125rem 1.25rem 1.25rem;border-bottom:1px solid rgba(9, 9, 11, 0.1)}.dark .dl-band-main{background:rgba(255, 255, 255, 0.02);border-bottom-color:rgba(255, 255, 255, 0.12)}.dl-band-badge{align-self:flex-start;margin:0;padding:0.1875rem 0.4375rem;border:1px solid rgba(255, 79, 0, 0.4);border-radius:5px;font-size:0.625rem;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:#ff4f00}.dl-band-title{font-family:\"Serrif\", ui-serif, serif;font-size:1.5rem;font-weight:300!important;line-height:1.1;letter-spacing:-0.03em!important;color:var(--foreground, #18181b);margin:0.125rem 0 0!important}.dark .dl-band-title{color:var(--foreground, #fafafa)}.dl-band-title-mark{align-self:flex-start;margin-bottom:16px;color:#ff4f00}.dl-band-icon{align-self:flex-start;margin-bottom:8px;color:#ff4f00}.dl-band-desc{font-family:\"Inter\", ui-sans-serif, system-ui, sans-serif;font-size:0.9375rem;line-height:1.55;color:var(--muted-foreground, #52525b);margin:0;max-width:none}.dark .dl-band-desc{color:var(--muted-foreground, #a1a1aa)}.dl-band-main .dl-hero-demo{box-shadow:none;margin-top:0.375rem}.dl-band-media{display:block;width:100%;height:auto;border:1px solid rgba(9, 9, 11, 0.1);border-radius:10px;margin:0.375rem 0 0!important}.dark .dl-band-media{border-color:rgba(255, 255, 255, 0.12)}.dl-band-list{display:flex;flex:1;flex-direction:column}.dl-band-row{position:relative;display:grid;grid-template-columns:28px 1fr;grid-template-rows:auto auto;column-gap:0.625rem;row-gap:0.1875rem;align-items:center;flex:1;padding:0.8125rem 2.25rem 0.8125rem 1.25rem;border-bottom:1px solid rgba(9, 9, 11, 0.08);text-decoration:none!important;transition:background 0.15s ease}.dl-band-row .dl-band-row-icon{grid-row:1 / -1;align-self:center}.dl-band-row .dl-band-row-title{grid-column:2}.dl-band-row .dl-band-row-desc{grid-column:2}.dl-band-row:not(:has(.dl-band-row-icon)){grid-template-columns:1fr}.dl-band-row:not(:has(.dl-band-row-icon)) .dl-band-row-title,.dl-band-row:not(:has(.dl-band-row-icon)) .dl-band-row-desc{grid-column:1}.dark .dl-band-row{border-bottom-color:rgba(255, 255, 255, 0.1)}.dl-band-row:last-child{border-bottom:none}.dl-band-row:hover{background:rgba(255, 79, 0, 0.04)}.dl-band-row::after{content:\"\\2192\";position:absolute;top:50%;right:1rem;transform:translateY(-50%);font-size:1rem;color:#ff4f00;transition:transform 0.15s ease}.dl-band-row:hover::after{transform:translateY(-50%) translateX(2px)}.dl-band-row>a,.docs-landing-next-item>a{position:absolute;inset:0;z-index:1}.dl-band-row>a:focus-visible,.docs-landing-next-item>a:focus-visible{outline:2px solid #ff4f00;outline-offset:-2px}.dl-band-row-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;color:#ff4f00}.dark .dl-band-row-icon{color:#ff8a5c}.dl-band-row-icon svg{width:16px;height:16px}.dl-band-row-title{font-size:0.9375rem;font-weight:600;color:var(--foreground, #18181b)}.dark .dl-band-row-title{color:var(--foreground, #fafafa)}.dl-band-row:hover .dl-band-row-title{text-decoration:underline}.dl-band-row-desc{font-size:0.875rem;line-height:1.5;color:var(--muted-foreground, #52525b)}.dark .dl-band-row-desc{color:var(--muted-foreground, #a1a1aa)}@media screen and (max-width: 900px){.dl-bands{grid-template-columns:1fr}}"}],"page":{"pagePath":"integrations/build-cli/typescript-integrations","slug":"/integrations/build-cli/typescript-integrations","pageMetadata":{"title":"Zapier CLI TypeScript integration development guide","sidebarTitle":"TypeScript integrations","description":"How to build Zapier CLI integrations with TypeScript v17.4.0+. Covers defineApp, defineTrigger, defineCreate helpers, ESM module structure, and type inference.","og:title":"Zapier CLI TypeScript integration development guide","twitter:title":"Zapier CLI TypeScript integration development guide","href":"/integrations/build-cli/typescript-integrations"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How to build Zapier CLI integrations with TypeScript v17.4.0+. Covers defineApp, defineTrigger, defineCreate helpers, ESM module structure, and type inference.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`TypeScript is the recommended way to build integrations with the Zapier CLI.\nSupport for TypeScript was significantly expanded in early 2025 when v17 of the\nZapier Developer Platform and CLI was released. This document covers how to create, use,\nand test TypeScript integrations.`}),`\n`,_jsx(Heading,{level:`2`,id:`getting-started`,children:`Getting started`}),`\n`,_jsxs(_components.p,{children:[`The TypeScript+ESM templates generated with `,_jsx(_components.code,{children:`zapier-platform init`}),` (or the deprecated `,_jsx(_components.code,{children:`zapier init`}),`) provide the\nconfiguration needed to get started with TypeScript integrations. If you\nare adding TypeScript support to an existing app, you can check the\n`,_jsx(_components.a,{href:`#structure-of-a-ts-integration`,children:`Structure of a TS Integration`}),` section\nbelow for more details information about compiler settings, using the\n`,_jsx(_components.code,{children:`zapier-platform-core`}),` library, and how to compose Triggers, Creates,\nand Searches together with TypeScript.`]}),`\n`,_jsxs(_components.p,{children:[`As of the 17.4.0 Platform release, all authentication templates support the `,_jsx(_components.code,{children:`--language`}),`\nflag on the `,_jsx(_components.code,{children:`zapier-platform init`}),` command (or deprecated `,_jsx(_components.code,{children:`zapier init`}),`), which can be set to `,_jsx(_components.code,{children:`typescript`}),` or `,_jsx(_components.code,{children:`javascript`}),`.\nNote that all TypeScript templates now default to ESM.`]}),`\n`,_jsx(_components.p,{children:`For example, for Basic Auth:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# (deprecated) $ zapier init my-app --template basic-auth --language typescript`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` zapier-platform`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` init`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-app`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --template`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` basic-auth`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --language`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` typescript`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` cd`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-app`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # or you can use pnpm, yarn, or bun`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This will create a new app in `,_jsx(_components.code,{children:`./my-app`}),` with the following structure,\nand install the dependencies.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`7`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`my-app/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── src/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ ├── authentication.ts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ ├── index.ts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── package.json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`└── tsconfig.json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`To add triggers, creates, and searches, you can then run `,_jsx(_components.code,{children:`zapier-platform scaffold`}),` (or deprecated `,_jsx(_components.code,{children:`zapier scaffold`}),`) as needed.\nThe scaffold command will automatically detect you’re using TypeScript, and create the\ncorrect code accordingly:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# (deprecated) $ zapier scaffold trigger contact`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# (deprecated) $ zapier scaffold create contact`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` zapier-platform`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` scaffold`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` trigger`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` contact`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` zapier-platform`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` scaffold`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` contact`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`differences-from-js-integrations`,children:`Differences from JS integrations`}),`\n`,_jsx(_components.p,{children:`There are a few important differences between how TypeScript and\nJavaScript integrations are implemented that are worth noting.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`define`}),` helper functions are important to wrap your App,\nTriggers, Creates, Searches, and Input Field definitions.`]}),`\n`,_jsxs(_components.li,{children:[`Code is kept in the `,_jsx(_components.code,{children:`src/`}),` directory and compiled to `,_jsx(_components.code,{children:`dist/`}),`. The\nroot of the integration now becomes `,_jsx(_components.code,{children:`./src/index.ts`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Modern `,_jsx(_components.code,{children:`import`}),`/`,_jsx(_components.code,{children:`export`}),` syntax is used instead of Node’s\n`,_jsx(_components.code,{children:`require`}),`/`,_jsx(_components.code,{children:`module.exports`}),` assignments.`]}),`\n`,_jsxs(_components.li,{children:[`We recommend testing with `,_jsx(_components.a,{href:`https://vitest.dev/`,children:`Vitest`}),`, a drop-in\nreplacement for Jest that is faster and has better ESM+TypeScript\nsupport.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`input-fields`,children:`Input fields`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`defineInputFields`}),` helper function should be used to define the\ninputs for all of Triggers, Creates, and Searches. This helper will\nautomatically infer the types of all of the input fields specified.`]}),`\n`,_jsx(_components.p,{children:`This looks like:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` defineXyz`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// i.e. defineTrigger, defineCreate, defineSearch.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` XyzPerform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Different per action+perform type.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Input fields definition here.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` perform`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bundle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Bundle.inputData typed from inputFields.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // perform requests \u0026 app logic here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`satisfies`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` XyzPerform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineXyz`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // ... Other details: key, display, noun, etc.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` operations:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`inputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`perform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Composed here.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`})`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This is a departure from the previous approach of typically defining the\ninputs and sometimes perform functions inside of the top-level exported\naction.`}),`\n`,_jsx(Heading,{level:`3`,id:`reusing-input-fields`,children:`Reusing input fields`}),`\n`,_jsxs(_components.p,{children:[`Input Fields are frequently reused across triggers, creates, and\nsearches. To make this easier, there is also a singular\n`,_jsx(_components.code,{children:`defineInputField`}),` helper that can be used to define an input field.\nThese can be put somewhere in the `,_jsx(_components.code,{children:`src/`}),` directory, and then imported by\nthe actions that need them.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ./src/inputFields.ts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`defineInputField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` SOME_COMMON_FIELD`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"someKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"boolean\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` required:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ./src/triggers/someTrigger.ts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SOME_COMMON_FIELD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"../inputFields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` SOME_COMMON_FIELD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"someOtherKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`required:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// bundle.inputData: { someKey: boolean; someOtherKey: string }`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`dynamic-input-fields`,children:`Dynamic input fields`}),`\n`,_jsx(_components.p,{children:`Inputs fields can be dynamic, meaning they are functions that get\nexecuted and can return zero, one, or more input fields determined at\nruntime. This is useful when the input fields are dependent on the\nvalues of other input fields, or input field definitions are fetched and\nprepared from your API, like is the case for CRM and Database APIs.`}),`\n`,_jsxs(_components.p,{children:[`The example below shows a dynamic input field that is used to optionally\ninclude a custom subject field when a prior boolean input field is set\nto `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`defineInputField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` customSubjectField`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bundle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bundle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`inputData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useCustomSubject`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` boolean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customSubject\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`required:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([]); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// IMPORTANT: All returns must be typed.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"useCustomSubject\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"boolean\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`required:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customSubjectField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// bundle.inputData: { useCustomSubject: boolean; customSubject?: string }`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Inside of dynamic input field functions, `,_jsx(_components.code,{children:`bundle.inputData`}),` will not have type\ninformation for its sibling input fields. We recommend casting referenced\nfields to their known types. For example above, note\n`,_jsx(_components.code,{children:`inputData.useCustomSubject as boolean`}),`.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`known-vs-unknown-fields`,children:`Known vs unknown fields`}),`\n`,_jsxs(_components.p,{children:[`The example above shows a `,_jsx(_components.em,{children:`known`}),` dynamic input field, where the key and\ntype are known ahead of time, and the function’s logic is used to\ninclude it or not, based on other fields. These sorts of input fields\ncan be captured by the type system and included in the\n`,_jsx(_components.code,{children:`bundle.inputData`}),` property. Input fields returned from input functions\nare `,_jsx(_components.em,{children:`always`}),` considered optional, even if they have `,_jsx(_components.code,{children:`required: true`}),` in\ntheir definition, as they cannot be guaranteed to be present.`]}),`\n`,_jsxs(_components.p,{children:[`When fields cannot be known ahead of time, the input function can return\ncompletely `,_jsx(_components.em,{children:`unknown`}),` input fields. This is useful when the input fields\nare derived from data returned from an API. In this case, known inputs\nare preserved, but the `,_jsx(_components.code,{children:`bundle.inputData`}),` property will consider any\nother properties as `,_jsx(_components.code,{children:`unknown`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`31`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`31`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Unknown dynamic input fields example`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`defineInputField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/** Example API field type, differs from Zapier Fields */`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ApiField`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Text\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Number\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Boolean\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/** Fetch and prepare multiple input fields from an API. */`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` getItemFields`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`inputData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ApiField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[]>(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`API_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/item/`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`inputData`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`itemId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"/fields`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` key:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toLowerCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"number\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"boolean\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"itemId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`required:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dynamic:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"item.id.label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` getItemFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// bundle.inputData: { itemId: string; [x: string]: unknown; }`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`perform-function-types`,children:`Perform function types`}),`\n`,_jsxs(_components.p,{children:[`There are now dedicated types for all of the different types of Perform\nAction. These should be imported with `,_jsx(_components.code,{children:`type`}),` qualified imports. The\nrelevant `,_jsx(_components.code,{children:`operation`}),` sections inside the `,_jsx(_components.code,{children:`define`}),` helpers will inform\nand enforce the correct type for the different perform functions. They\nare:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Polling Triggers:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`PollingTriggerPerform`})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Webhook Triggers:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`WebhookTriggerPerform`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`WebhookTriggerPerformList`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`WebhookTriggerPerformSubscribe`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`WebhookTriggerPerformUnsubscribe`})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Creates:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`CreatePerform`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`CreatePerformResume`})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Searches:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`SearchPerform`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`SearchPerformResume`})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`They all take at least one type parameter, which is the shape of the the\nbundle’s `,_jsx(_components.code,{children:`inputData`}),` property. These Perform types should use\n`,_jsx(_components.code,{children:`satisfies XyzPerform\u003ctypeof inputFields>`}),` to enforce the correct types but\npreserve the return type information.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PollingTriggerPerform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` perform`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bundle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // bundle.inputData: { a: number; b?: string }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`satisfies`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PollingTriggerPerform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c{ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`a`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`b`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }>;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`In most cases though, input data is derived from the array of input fields,\nwhich can be passed directly to the perform functions to be automatically\ninferred:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PollingTriggerPerform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"a\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`required:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`required:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` perform`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bundle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // bundle.inputData: { a: number; b?: string }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`satisfies`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PollingTriggerPerform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`bundle.inputData`}),` property is now typed as the inferred input data\nfrom the `,_jsx(_components.code,{children:`inputFields`}),` array.`]}),`\n`,_jsx(Heading,{level:`2`,id:`structure-of-a-ts-integration`,children:`Structure of a TS integration`}),`\n`,_jsxs(_components.p,{children:[`TypeScript integrations follow the same structure and `,_jsx(_components.a,{href:`/integrations/build-cli/overview#zapier-platform-schema`,children:`underlying\nschema`}),` as any\nJavaScript integration. The important difference is that TypeScript apps\nrequire important components of integrations to be wrapped with the\nrelevant `,_jsx(_components.code,{children:`define`}),` helper functions to provide deep type inference about\nthe application. These are:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`defineApp()`}),` – Main function for the top-level app.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`defineTrigger()`}),`/`,_jsx(_components.code,{children:`defineCreate()`}),`/`,_jsx(_components.code,{children:`defineSearch()`}),` – For the\nrelevant actions in an integration.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`defineInputFields()`}),` – Wraps an array of input field definitions to\nsimplify handling full typing information about the input fields.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`src/index-ts`,children:_jsx(_components.code,{children:`src/index.ts`})}),`\n`,_jsxs(_components.p,{children:[`The main entry point of the app becomes `,_jsx(_components.code,{children:`src/index.ts`}),`. It should import\nits dependencies, and the default export remains as the Application\nobject. Wrapping it with `,_jsx(_components.code,{children:`defineApp`}),` will help to check its structure.`]}),`\n`,_jsx(_components.p,{children:`Otherwise it’s a normal integration, and you register Auth, middleware,\nhydrators, Triggers, Creates, and Searches all the same way!`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`defineApp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`version`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` platformVersion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` packageJson`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"../package.json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` authentication`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"./authentication\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` someCreate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"./creates/some-create\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` someSearch`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"./searches/some-search\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` someTrigger`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"./triggers/some-trigger\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineApp`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\" // IMPORTANT: Note the use of `defineApp`\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` version:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` packageJson`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`version`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` platformVersion`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` authentication`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` creates:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` [someCreate.key]:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` someCreate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` searches:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` [someSearch.key]:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` someSearch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` triggers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` [someTrigger.key]:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` someTrigger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`})`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`src/authentication-ts`,children:_jsx(_components.code,{children:`src/authentication.ts`})}),`\n`,_jsxs(_components.p,{children:[`Authentication is defined as a normal object and exported from a file\nnamed `,_jsx(_components.code,{children:`src/authentication.ts`}),`. It uses a `,_jsx(_components.code,{children:`satisfies Authentication`}),`\nconstraint to check its structure, and does `,_jsx(_components.strong,{children:`not`}),` use a `,_jsx(_components.code,{children:`define`}),`\nhelper.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`34`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`34`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ./src/authentication.ts`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authentication`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SCOPES`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"./constants\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"oauth2\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` test:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.webflow.com/v2/token/authorized_by\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connectionLabel:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{email}}\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` oauth2Config:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` authorizeUrl:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://webflow.com/oauth/authorize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` params:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{process.env.CLIENT_ID}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response_type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` scope:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` SCOPES`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`join`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` redirect_uri:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{bundle.inputData.redirect_uri}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` state:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{bundle.inputData.state}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` getAccessToken:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.webflow.com/oauth/access_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` params:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{process.env.CLIENT_ID}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client_secret:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{process.env.CLIENT_SECRET}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` code:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{bundle.inputData.code}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` grant_type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"authorization_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` redirect_uri:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{bundle.inputData.redirect_uri}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`satisfies`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Authentication`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"// IMPORTANT: Note the use of `satisfies`\"})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`src/middleware-ts`,children:_jsx(_components.code,{children:`src/middleware.ts`})}),`\n`,_jsxs(_components.p,{children:[`Middleware functions are functions exported from `,_jsx(_components.code,{children:`src/middleware.ts`}),`,\nthat are typed as `,_jsx(_components.code,{children:`BeforeRequestMiddleware`}),` or\n`,_jsx(_components.code,{children:`AfterResponseMiddleware`}),` types. They are registered in the same way as\nin JavaScript integrations in `,_jsx(_components.code,{children:`/src/index.ts`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ./src/middleware.ts`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BeforeRequestMiddleware`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` addBearerHeader`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` BeforeRequestMiddleware`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` bundle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bundle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`authData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`access_token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bundle`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`authData`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`access_token`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`src/triggers/pollingtrigger-ts`,children:_jsx(_components.code,{children:`src/triggers/pollingTrigger.ts`})}),`\n`,_jsxs(_components.p,{children:[`Triggers, Creates, and Searches are now recommended to define their\ninputs and perform functions as separate objects, and composed together\nin the `,_jsx(_components.code,{children:`define`}),` helper that is default export from the file.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`43`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`43`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ./src/triggers/pollingTrigger.ts`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` defineTrigger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PollingTriggerPerform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zapier-platform-core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`API_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"../constants.js\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineInputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\" // IMPORTANT: Note `defineInputFields`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` required:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` perform`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bundle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\" // `bundle.inputData` typed as `{ country?: string }`\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`API_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"/movies`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`satisfies`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PollingTriggerPerform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"// IMPORTANT: Note `satisfies`\"})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defineTrigger`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"movie\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` noun:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Movie\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` display:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` label:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"New Movie\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` description:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Triggers when a new movie is created.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` operation:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"polling\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` inputFields`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` perform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sample:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`})`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`src/tsconfig-json`,children:_jsx(_components.code,{children:`src/tsconfig.json`})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`tsconfig.json`}),` file configures the TypeScript compiler. Below are\nsettings that are recommended for developing TypeScript integrations.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"compilerOptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ESNext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"module\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"NodeNext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"moduleResolution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"NodeNext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolveJsonModule\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"esModuleInterop\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"noUncheckedIndexedAccess\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"isolatedModules\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"skipLibCheck\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"outDir\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"./dist\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"rootDir\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"./src\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"strict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"include\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./src/**/*.ts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Zapier CLI TypeScript integration development guide","sidebarTitle":"TypeScript integrations","description":"How to build Zapier CLI integrations with TypeScript v17.4.0+. Covers defineApp, defineTrigger, defineCreate helpers, ESM module structure, and type inference.","og:title":"Zapier CLI TypeScript integration development guide","twitter:title":"Zapier CLI TypeScript integration development guide","href":"/integrations/build-cli/typescript-integrations"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Getting started","slug":"getting-started","depth":2,"children":[]},{"title":"Differences from JS integrations","slug":"differences-from-js-integrations","depth":2,"children":[]},{"title":"Input fields","slug":"input-fields","depth":2,"children":[{"title":"Reusing input fields","slug":"reusing-input-fields","depth":3,"children":[]},{"title":"Dynamic input fields","slug":"dynamic-input-fields","depth":3,"children":[]},{"title":"Known vs unknown fields","slug":"known-vs-unknown-fields","depth":4,"children":[]}]},{"title":"Perform function types","slug":"perform-function-types","depth":2,"children":[]},{"title":"Structure of a TS integration","slug":"structure-of-a-ts-integration","depth":2,"children":[{"title":"src/index.ts","slug":"src/index-ts","depth":3,"children":[]},{"title":"src/authentication.ts","slug":"src/authentication-ts","depth":3,"children":[]},{"title":"src/middleware.ts","slug":"src/middleware-ts","depth":3,"children":[]},{"title":"src/triggers/pollingTrigger.ts","slug":"src/triggers/pollingtrigger-ts","depth":3,"children":[]},{"title":"src/tsconfig.json","slug":"src/tsconfig-json","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/zapier-82f0e938/f426fe1f80e04ec5/content/welcome.js","/_mintlify/custom/zapier-82f0e938/8e22ee5176c0f2d3/content/page-view.js","/_mintlify/custom/zapier-82f0e938/ba23268896a334a3/content/events-core.js","/_mintlify/custom/zapier-82f0e938/4309c68d24e0365b/content/webmcp.js","/_mintlify/custom/zapier-82f0e938/00b5c2b78afe2715/logo-nav.js","/_mintlify/custom/zapier-82f0e938/4312bb950916a05a/universal-footer.js"],"subdomain":"zapier-82f0e938","siteName":"Zapier","title":"Zapier CLI TypeScript integration development guide","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-20T19:15:32.442Z","gitLastModified":"2026-10-20T19:15:01.000Z","originalFileLocation":"integrations/build-cli/typescript-integrations.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How to build Zapier CLI integrations with TypeScript v17.4.0+. Covers defineApp, defineTrigger, defineCreate helpers, ESM module structure, and type inference.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Zapier\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Zapier CLI TypeScript integration development guide\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to build Zapier CLI integrations with TypeScript v17.4.0+. Covers defineApp, defineTrigger, defineCreate helpers, ESM module structure, and type inference.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Zapier\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.zapier.com/integrations/build-cli/typescript-integrations\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://zapier-82f0e938.mintlify.site/_mintlify/api/og/v2?division=Build+with+CLI\u0026amp;title=Zapier+CLI+TypeScript+integration+development+guide\u0026amp;description=How+to+build+Zapier+CLI+integrations+with+TypeScript+v17.4.0%2B.+Covers+defineApp%2C+defineTrigger%2C+defineCreate+helpers%2C+ESM+module+structure%2C+and+type+inference.\u0026amp;theme=f38249568906c3b8e9c7c960\u0026amp;signature=be58ec1f1d7e9ff859ab93a33b5050d0452e09aa77ae88e53366a8ee905635d3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Zapier CLI TypeScript integration development guide\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to build Zapier CLI integrations with TypeScript v17.4.0+. Covers defineApp, defineTrigger, defineCreate helpers, ESM module structure, and type inference.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://zapier-82f0e938.mintlify.site/_mintlify/api/og/v2?division=Build+with+CLI\u0026amp;title=Zapier+CLI+TypeScript+integration+development+guide\u0026amp;description=How+to+build+Zapier+CLI+integrations+with+TypeScript+v17.4.0%2B.+Covers+defineApp%2C+defineTrigger%2C+defineCreate+helpers%2C+ESM+module+structure%2C+and+type+inference.\u0026amp;theme=f38249568906c3b8e9c7c960\u0026amp;signature=be58ec1f1d7e9ff859ab93a33b5050d0452e09aa77ae88e53366a8ee905635d3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/zapier-82f0e938/YBlPOOl2M7kSqqiA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Zapier\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF4F00\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.zapier.com/integrations/build-cli/typescript-integrations\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/integrations/build-cli/typescript-integrations.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.zapier.com/#organization\",\"name\":\"Zapier\",\"url\":\"https://docs.zapier.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/zapier-82f0e938/uPbDC0jSuXgHCaWD/logo/light.svg?fit=max\u0026auto=format\u0026n=uPbDC0jSuXgHCaWD\u0026q=85\u0026s=b6a37289cb22ac1a9681572651874765\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.zapier.com#website\",\"name\":\"Zapier\",\"url\":\"https://docs.zapier.com\",\"publisher\":{\"@id\":\"https://docs.zapier.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.zapier.com/integrations/build-cli/typescript-integrations#webpage\",\"url\":\"https://docs.zapier.com/integrations/build-cli/typescript-integrations\",\"name\":\"Zapier CLI TypeScript integration development guide\",\"description\":\"How to build Zapier CLI integrations with TypeScript v17.4.0+. Covers defineApp, defineTrigger, defineCreate helpers, ESM module structure, and type inference.\",\"dateModified\":\"2026-10-20T19:15:01.000Z\",\"isPartOf\":{\"@id\":\"https://docs.zapier.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.zapier.com/integrations/build-cli/typescript-integrations#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.zapier.com/integrations/build-cli/typescript-integrations#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Build with CLI\",\"item\":\"https://docs.zapier.com/integrations/quickstart/cli-tutorial\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Zapier CLI TypeScript integration development guide\",\"item\":\"https://docs.zapier.com/integrations/build-cli/typescript-integrations\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.zapier.com/integrations/build-cli/typescript-integrations#article\",\"headline\":\"Zapier CLI TypeScript integration development guide\",\"name\":\"Zapier CLI TypeScript integration development guide\",\"description\":\"How to build Zapier CLI integrations with TypeScript v17.4.0+. Covers defineApp, defineTrigger, defineCreate helpers, ESM module structure, and type inference.\",\"url\":\"https://docs.zapier.com/integrations/build-cli/typescript-integrations\",\"mainEntityOfPage\":{\"@id\":\"https://docs.zapier.com/integrations/build-cli/typescript-integrations#webpage\"},\"dateModified\":\"2026-10-20T19:15:01.000Z\",\"publisher\":{\"@id\":\"https://docs.zapier.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.zapier.com#website\"}}]}\u003c/script>","agentPointerHref":"/integrations/build-cli/typescript-integrations.md","siteName":"Zapier","nav":{"global":{"anchors":[{"anchor":"Community","icon":"users","href":"https://community.zapier.com/"},{"anchor":"Changelog","icon":"rss","href":"/white-label/changelog"},{"anchor":"Contact Us","icon":"envelope","href":"https://developer.zapier.com/contact"}]},"tabs":[{"tab":"Home","hidden":true,"searchable":true,"pages":[{"title":"Home","href":""}]},{"tab":"Use Zapier in your tools","menu":[{"item":"Install Zapier","description":"Gets you to a first action. Zapier MCP by default, with the SDK and CLI as alternatives.","pages":[{"title":"Install Zapier","href":"/install"}]},{"item":"Zapier MCP","description":"Connect from inside your AI client. Your agent runs actions across 9,000+ apps.","pages":[{"title":"Zapier MCP","href":"/mcp/home"}]},{"item":"Zapier SDK","description":"TypeScript for code projects, with OAuth and retries handled. Open beta.","pages":[{"title":"Zapier SDK","href":"/sdk"}]},{"item":"Proxy API","description":"Make authenticated HTTP requests to any app API through Zapier.","pages":[{"title":"Proxy API","href":"/proxy-api/overview"}]}],"pages":[{"title":"Use Zapier in your tools","href":"/install"}]},{"tab":"Build a Zapier integration","menu":[{"item":"Developer Platform","description":"Build a private integration for your own team, or a public one for the App Directory.","groups":[{"group":" ","pages":[{"title":"Zapier integration builder: developer documentation and guides","sidebarTitle":"Welcome","icon":"party-horn","href":"/integrations"},{"title":"Integration platform login","url":"https://zapier.com/platform/login","icon":"user","href":"/integrations/dev-platform-login"},{"title":"Platform News","icon":"rss","href":"/integrations/news"}]},{"group":"Quick start","pages":[{"title":"Zapier Developer Platform integration guide: build with UI or CLI","sidebarTitle":"Introduction","href":"/integrations/quickstart/build-integration"},{"group":"Developer tools","pages":[{"title":"Platform UI vs Platform CLI","href":"/integrations/quickstart/ui-vs-cli"},{"title":"Zapier Developer Platform UI quickstart tutorial","sidebarTitle":"Platform UI tutorial","href":"/integrations/quickstart/ui-tutorial"},{"title":"Zapier Platform CLI tutorial: authentication, triggers, deployment","sidebarTitle":"Platform CLI tutorial","href":"/integrations/quickstart/cli-tutorial"},{"title":"Get help with the Zapier Developer Platform","href":"/integrations/quickstart/get-help"}]},{"group":"Glossary","pages":[{"title":"Zapier Glossary","mode":"wide","href":"/integrations/quickstart/glossary"}]},{"group":"How it works","pages":[{"title":"How Zapier integrations work: authentication, triggers, actions","sidebarTitle":"How Zapier works","href":"/integrations/quickstart/how-zapier-works"},{"title":"Zapier Developer Platform: Integration structure reference","sidebarTitle":"Integration structure","href":"/integrations/quickstart/zapier-integration-structure"},{"title":"Zapier integration types: private vs public developer guide","sidebarTitle":"Private vs public integrations","href":"/integrations/quickstart/private-vs-public-integrations"}]},{"title":"Zapier integration triggers and actions reference guide","sidebarTitle":"Recommended triggers and actions","href":"/integrations/quickstart/recommended-triggers-and-actions"},{"title":"App Developer Services","href":"/integrations/quickstart/app-developer-services"}]},{"group":"Build with UI","pages":[{"title":"Zapier Developer Platform UI quickstart tutorial","sidebarTitle":"Platform UI tutorial","href":"/integrations/quickstart/ui-tutorial"},{"group":"Actions","pages":[{"title":"Zapier actions: Create, search, delete API implementation","sidebarTitle":"Action","href":"/integrations/build/action"},{"title":"Add a create action","href":"/integrations/build/create"},{"title":"Add a search action","href":"/integrations/build/search"},{"title":"Reorder or remove action","href":"/integrations/build/reorder-action"},{"title":"Add a search or create action","href":"/integrations/build/search-or-create"}]},{"group":"Advanced features","pages":[{"title":"Zapier environment variables: OAuth and API key management","sidebarTitle":"Use environment variables in your API call","href":"/integrations/build/env"},{"title":"Add error response handling","href":"/integrations/build/errors"},{"title":"Reference user-entered details with data bundles","href":"/integrations/build/bundle"},{"title":"Use Code Mode to refine your API call","href":"/integrations/build/code-mode"},{"title":"Static IP address configuration for Zapier integrations","sidebarTitle":"Enable static IP address connection for customers","href":"/integrations/build/static-ip"}]},{"group":"Authentication","pages":[{"title":"Zapier integration authentication: OAuth v2, API key, session auth","sidebarTitle":"Overview","href":"/integrations/build/auth"},{"title":"Zapier API key authentication: implementation guide","sidebarTitle":"Add authentication with API key","href":"/integrations/build/apikeyauth"},{"title":"Basic authentication configuration in Zapier visual builder","sidebarTitle":"Basic authentication","href":"/integrations/build/basicauth"},{"title":"Add authentication with Digest Authentication","href":"/integrations/build/digestauth"},{"title":"OAuth v2 authentication configuration: Zapier Platform UI guide","sidebarTitle":"Add authentication with OAuth v2","href":"/integrations/build/oauth"},{"title":"Session auth implementation guide for Zapier integrations","sidebarTitle":"Session authentication","href":"/integrations/build/sessionauth"},{"title":"Add a connection label","href":"/integrations/build/connection-label"},{"title":"Use computed fields in OAuth or Session Authentication","href":"/integrations/build/computed-fields"},{"title":"Compute a field from the data of the Test API call","href":"/integrations/build/computed-test-field"},{"title":"Add authentication fields to Request Template","href":"/integrations/build/requesttemplate"},{"title":"Validate domain and subdomain input fields during authentication","href":"/integrations/build/subdomain-validation"}]},{"group":"Input fields","pages":[{"title":"Zapier Developer Platform input field types and definitions","sidebarTitle":"Field types","href":"/integrations/build/field-definitions"},{"title":"Zapier Platform UI: add input fields to triggers and actions","sidebarTitle":"Add input fields to triggers and actions","href":"/integrations/build/add-fields"},{"title":"Dynamic fields: Fetch API fields in Zapier integrations","sidebarTitle":"Dynamic fields","href":"/integrations/build/dynamic-field"},{"title":"Line item groups in Zapier actions: Developer documentation","sidebarTitle":"Line item groups","href":"/integrations/build/line-items"}]},{"group":"Output fields","pages":[{"title":"Sample data and output fields in Zapier integration triggers","sidebarTitle":"Output data, defining sample data and output fields","href":"/integrations/build/sample-data"},{"title":"Response types Zapier expects","href":"/integrations/build/response-types"}]},{"group":"Testing","pages":[{"title":"Test authentication","href":"/integrations/build/test-auth"},{"title":"Test triggers and actions - Zapier integration builder docs","sidebarTitle":"Test triggers or actions","href":"/integrations/build/test-triggers-actions"},{"title":"Zapier CLI canary testing: integration version validation","sidebarTitle":"Testing tools","href":"/integrations/build/test-tools"},{"title":"Test and monitor Zapier integrations: Zapier Developer Platform UI","sidebarTitle":"Test and monitor","href":"/integrations/build/test-monitoring"}]},{"group":"Triggers","pages":[{"title":"Zapier integration triggers: polling and REST Hook implementation","sidebarTitle":"Trigger","href":"/integrations/build/trigger"},{"title":"Add a polling trigger","href":"/integrations/build/polling-trigger"},{"title":"REST Hook trigger implementation guide: Zapier Platform UI","sidebarTitle":"Add a REST Hook trigger","href":"/integrations/build/hook-trigger"},{"title":"Reorder or remove triggers","href":"/integrations/build/reorder-trigger"},{"title":"Zapier polling trigger deduplication: Implementation guide","sidebarTitle":"Deduplication","href":"/integrations/build/deduplication"},{"title":"Use pagination in triggers","href":"/integrations/build/pagination-trigger"},{"title":"REST hook triggers: Zapier CLI webhook subscription guide","sidebarTitle":"REST Hook triggers","href":"/integrations/build/cli-hook-trigger"}]},{"group":"Troubleshooting","pages":[{"title":"Zapier operating constraints","href":"/integrations/build/operating-constraints"},{"title":"Troubleshoot trigger timeouts","href":"/integrations/build/troubleshoot-trigger-timeouts"},{"title":"Troubleshoot trigger request or response payload sizes","href":"/integrations/build/troubleshoot-trigger-payload"},{"title":"Zapier action timeouts: handling the 30-second limit","sidebarTitle":"Troubleshoot action timeouts","href":"/integrations/build/troubleshoot-action-timeouts"},{"title":"Troubleshoot Zapier action payload: 20MB response, 6MB request","sidebarTitle":"Troubleshoot payload size","href":"/integrations/build/troubleshoot-action-payload"},{"title":"Troubleshoot custom fields","href":"/integrations/build/troubleshoot-custom-fields"},{"title":"Reduce requests to your API","href":"/integrations/build/reduce-api-requests"},{"title":"Zapier throttle types: API, webhook, and polling limits","sidebarTitle":"Troubleshoot throttles","href":"/integrations/build/troubleshoot-throttles"},{"title":"Hydration/dehydration limits","href":"/integrations/build/hydration-limits"},{"title":"Error: An array is expected","href":"/integrations/build/error-array-expected"},{"title":"Error: Got a non-object result, expected an object from create","href":"/integrations/build/error-non-object"},{"title":"Error: Got a non-object result in the array, expected only objects","href":"/integrations/build/error-non-object-array"},{"title":"Error: Cannot retrieve App******CLIAPI@*** app","href":"/integrations/build/error-cannot-retrieve-app"}]},{"title":"Use form mode to setup your API calls","href":"/integrations/build/form-mode"}]},{"group":"Build with CLI","pages":[{"title":"Zapier Platform CLI tutorial: authentication, triggers, deployment","sidebarTitle":"Platform CLI tutorial","href":"/integrations/quickstart/cli-tutorial"},{"title":"Zapier Platform CLI: Node.js integration development framework","sidebarTitle":"Overview","href":"/integrations/build-cli/overview"},{"group":"Input fields","pages":[{"title":"Zapier CLI field types: Input, dynamic, line items","sidebarTitle":"Configuration","href":"/integrations/build-cli/input-fields"},{"title":"Zapier Developer Platform input field types and definitions","sidebarTitle":"Field types","href":"/integrations/build/field-definitions"},{"title":"Dynamic dropdowns: Zapier CLI API integration implementation","sidebarTitle":"Dynamic dropdowns","href":"/integrations/build-cli/dynamic-dropdowns"}]},{"title":"Zapier CLI: making HTTP requests with z.request","sidebarTitle":"Making HTTP requests","href":"/integrations/build-cli/making-http-requests"},{"title":"Testing and debugging","href":"/integrations/build-cli/testing-and-debugging"},{"title":"Zapier CLI: Dehydration and hydration for API optimization","sidebarTitle":"Hydration","description":"Zapier CLI dehydration defers API calls and file downloads in triggers and actions using z.dehydrate() and z.dehydrateFile() within 30-second timeouts.","href":"/integrations/build-cli/hydration"},{"title":"Zapier CLI TypeScript integration development guide","sidebarTitle":"TypeScript integrations","href":"/integrations/build-cli/typescript-integrations"},{"group":"Advanced topics","pages":[{"title":"Download the source code of a CLI integration","description":"If at any point you do not have the source code for your CLI integration and need it to make changes, you can download a zip file of the source code directly from the Platform UI.","href":"/integrations/build-cli/download-source-code"},{"title":"Empty values in input data","sidebarTitle":"Empty values in input data","href":"/integrations/build-cli/empty-values-in-input-data"}]},{"title":"Zapier CLI FAQs: Node.js, XML/SOAP, pagination, and more","sidebarTitle":"FAQs","href":"/integrations/build-cli/faqs"},{"title":"Zapier CLI core reference: z object and bundle object","sidebarTitle":"Core reference","href":"/integrations/build-cli/core"},{"title":"CLI command reference","url":"https://github.com/zapier/zapier-platform/blob/main/packages/cli/docs/cli.md","href":"/integrations/reference/cli"},{"title":"Schema reference","url":"https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md","href":"/integrations/reference/schema"}]},{"group":"Manage","pages":[{"group":"Account and team","pages":[{"title":"Zapier integration teams: admin and collaborator roles","sidebarTitle":"Add team members to integration","href":"/integrations/manage/add-team"}]},{"group":"Integration changes","pages":[{"title":"Planning and implementing integration changes","href":"/integrations/manage/planning-changes"},{"title":"Change OAuth scope","href":"/integrations/manage/auth-scope"},{"title":"Change authentication type","href":"/integrations/manage/auth-scheme"},{"title":"Add required authentication field","href":"/integrations/manage/auth-required"},{"title":"Change authentication field keys","href":"/integrations/manage/auth-keys"},{"title":"Change trigger or action key","href":"/integrations/manage/change-keys"},{"title":"Add new required input field","href":"/integrations/manage/required-input"},{"title":"Change input form field key","href":"/integrations/manage/input-key"},{"title":"Change output field key","href":"/integrations/manage/output-key"},{"title":"Change output data response","href":"/integrations/manage/output"},{"title":"Change trigger from polling to REST Hook","href":"/integrations/manage/change-trigger"},{"title":"Update perform method for polling trigger","href":"/integrations/manage/change-perform"},{"title":"Changes to your API can impact your integration","href":"/integrations/manage/change-api"},{"title":"Zapier Developer Platform: Export UI integration to CLI","sidebarTitle":"Export to CLI","href":"/integrations/manage/export-cli"},{"title":"Export integration to Platform UI","href":"/integrations/manage/export-ui"},{"title":"Essential tips for integrating quality health practices","href":"/integrations/manage/essential-tips-iq"}]},{"group":"Integration performance","pages":[{"title":"Zapier integration API outage error handling reference","sidebarTitle":"API outage","href":"/integrations/manage/api-outage"},{"title":"Embed insights definitions","href":"/integrations/manage/embed-insights"},{"title":"Zapier integration issue tracker and user feedback","sidebarTitle":"User feedback and bugs","href":"/integrations/manage/user-feedback"},{"title":"Zapier error handling: HTTP status codes \u0026 API responses","sidebarTitle":"Error response handling","href":"/integrations/manage/error-handling"},{"title":"Active users retention","href":"/integrations/manage/active-users"},{"title":"Integration insights definitions","href":"/integrations/manage/integration-insights"},{"title":"Zap activation rates","href":"/integrations/manage/zap-activation"},{"title":"Embed activation rates","href":"/integrations/manage/embed-activation"}]},{"group":"Sharing","pages":[{"title":"Zapier integration sharing: public links and email invites","sidebarTitle":"Share your integration","href":"/integrations/manage/sharing"}]},{"group":"Versions","pages":[{"title":"Zapier integration versioning: semantic versioning implementation","sidebarTitle":"Versions","href":"/integrations/manage/versions"},{"title":"Work with labeled versions","href":"/integrations/manage/labeled-versions"},{"title":"Clone a version","href":"/integrations/manage/clone"},{"title":"Zapier integration version promotion: UI and CLI","sidebarTitle":"Promote a version","href":"/integrations/manage/promote"},{"title":"Zapier Developer Platform: Integration version migration","sidebarTitle":"Migrate users","href":"/integrations/manage/migrate"},{"title":"Automatic migrations between versions","href":"/integrations/manage/automatic-migrations"},{"title":"Version lifecycle states","href":"/integrations/manage/version-lifecycle-states"},{"title":"Zapier integration version deprecation and deletion process","sidebarTitle":"Deprecate a version","href":"/integrations/manage/deprecate"},{"title":"Manage a legacy integration","href":"/integrations/manage/versions-legacy"},{"title":"Integration CI Pipelines using Changesets and Snapshot Versions","href":"/integrations/manage/changeset-workflow"}]},{"title":"Manage integration maintenance preferences","href":"/integrations/manage/manage-integration-maintenance-preference"}]},{"group":"Publish","pages":[{"group":"Branding","pages":[{"title":"Zapier integration branding guidelines: logo, naming, and directory","sidebarTitle":"Integration branding guidelines","href":"/integrations/publish/branding-guidelines"},{"title":"Zapier integration branding: UI and CLI configuration","sidebarTitle":"Integration branding","href":"/integrations/publish/add-or-modify-branding"},{"title":"Add integration branding in Platform CLI","href":"/integrations/publish/branding-cli"}]},{"group":"Launch process","pages":[{"title":"Zapier public integration publishing: Developer Platform guide","sidebarTitle":"Build your first public integration on Zapier","href":"/integrations/publish/public-integration"},{"title":"Zapier integration guidelines: OAuth, webhooks, REST APIs","sidebarTitle":"Build guidelines","href":"/integrations/publish/integration-build-guidelines"},{"title":"Zapier integration publishing requirements documentation","sidebarTitle":"Publishing requirements","href":"/integrations/publish/integration-publishing-requirements"},{"title":"Zap templates: developer documentation for publishing workflows","sidebarTitle":"Zap templates","href":"/integrations/publish/zap-templates"},{"title":"Create help documentation for your users","href":"/integrations/publish/user-help"},{"title":"Best practices for showcasing your integration","href":"/integrations/publish/best-practices"},{"title":"Zapier Partner Sandbox: free developer workspace","sidebarTitle":"Zapier Partner Sandbox","href":"/integrations/publish/zps"}]},{"group":"Partner program","pages":[{"title":"Zapier Partner Program: 4-tier system for integration partners","sidebarTitle":"Partner Program","href":"/integrations/publish/partner-program"},{"title":"Integration success strategies","href":"/integrations/publish/partner-faq"},{"title":"Zapier partner program benefits by tier level","sidebarTitle":"Partner program benefits","href":"/integrations/publish/benefits-guide"}]},{"group":"Validation checks","pages":[{"title":"Zapier integration validation checks: error code reference","sidebarTitle":"Integration check reference","href":"/integrations/publish/integration-checks-reference"}]}]},{"group":"Embed","pages":[{"title":"Powered by Zapier: Embed guide for published integrations","sidebarTitle":"Powered by Zapier","href":"/integrations/embed/powered-by-zapier"}]},{"group":"Reference","pages":[{"group":"Use cases","pages":[{"title":"Zapier integration structure for a forms app","href":"/integrations/reference/forms-app"},{"title":"Zapier integration structure for a CRM app","href":"/integrations/reference/crm-app"},{"title":"Zapier integration structure for a project management app","href":"/integrations/reference/project-app"},{"title":"Zapier integration structure for an AI app","href":"/integrations/reference/ai-app"}]},{"group":"Video tutorials","pages":[{"title":"Creating dynamic dropdown fields","href":"/integrations/reference/dynamic-dropdown-tutorial"},{"title":"Managing integration team members","href":"/integrations/reference/managing-team-tutorial"},{"title":"Cloning a version","href":"/integrations/reference/cloning-a-version-tutorial"},{"title":"Promoting a version","href":"/integrations/reference/promoting-a-version-tutorial"},{"title":"Zapier integration OAuth v2 authentication tutorial","sidebarTitle":"OAuth v2 tutorial","href":"/integrations/reference/implementing-oauth-tutorial"},{"title":"Zapier environment variables: OAuth credential management tutorial","sidebarTitle":"Using environment variables","href":"/integrations/reference/using-environment-variables-tutorial"},{"title":"Utilizing Request Template","href":"/integrations/reference/request-template-tutorial"},{"title":"Embedding the Zapier Workflow Element","href":"/integrations/reference/zapier-workflow-element-tutorial"},{"title":"Implementing REST Hook triggers","href":"/integrations/reference/rest-hook-trigger-tutorial"},{"title":"Utilizing the Monitoring Tool","href":"/integrations/reference/monitoring-tool-tutorial"},{"title":"Zapier integration error handling: API response control","sidebarTitle":"Error handling tutorial","href":"/integrations/reference/error-handling-tutorial"},{"title":"Using Dictionary Fields","href":"/integrations/reference/dictionary-fields-tutorial"}]},{"title":"Zapier Custom Actions and API requests: Support policy","sidebarTitle":"Custom Actions and API requests","href":"/integrations/reference/custom-actions-api-requests"},{"title":"Scripting in converted legacy Web Builder integrations","href":"/integrations/reference/legacy-scripting"},{"title":"CLI command reference","url":"https://github.com/zapier/zapier-platform/blob/main/packages/cli/docs/cli.md","href":"/integrations/reference/cli"},{"title":"Schema reference","url":"https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md","href":"/integrations/reference/schema"}]}]}]},{"tab":"Embed Zapier","menu":[{"item":"Powered by Zapier","description":"Embed Zapier. Users pay Zapier directly.","pages":[{"title":"Powered by Zapier","href":"/powered-by-zapier"}]},{"item":"White Label","description":"Native automation. No user Zapier account; your product pays Zapier.","pages":[{"title":"White Label","href":"/white-label/getting-started"}]}],"pages":[{"title":"Embed Zapier","href":"/powered-by-zapier"}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/overview"}]}]},"basePath":"","title":"Zapier CLI TypeScript integration development guide","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":[],"chunks":[]}