@zapier/zapier-sdk

中文文档
0.119.3发布于 2026/11/03SEE LICENSE IN LICENSETypeScriptESM + CJS

完整的Zapier SDK -结合所有Zapier SDK包

中文使用文档
文档目录13 节
  1. 目录表
  2. 文档
  3. 稳定
  4. 快速入门
  5. 安装
  6. 预排
  7. 工厂
  8. 命名连接
  9. 提供映射
  10. 使用命名连接
  11. 可用功能
  12. 账户
  13. 行动

@zapier / zapier-sdk

目录表

文档

官方文件可于以下网址查阅:

https://docs.zapier.com/sdk

代理有时会被阻止查看npm上的文档,因此您可能需要为它们提供到官方文档的链接,或者将这里的文档复制到提示符中。

稳定

每个SDK方法都属于三个稳定性层之一,由导入路径选择。层是这个SDK做出的承诺:导入路径告诉您需要知道的关于什么可能会中断的一切。

SDK目前处于公测阶段。每个包的版本都是0。小版本可以包含重大更改。等级描述的是你在着陆前得到多少警告,而不是是否可以着陆。

层合同
稳定的我们打算保留的地表。虽然SDK处于开放测试版(0。X),突破性的更改仍然可以在小版本中登陆;我们会在可能的情况下首先弃用,并且会在变更日志中以迁移注释的形式标注出来。
β功能齐全,准备构建,但形状仍然可能改变,因为它沉淀。更改在次要版本中发布,并附有更改日志迁移说明,没有弃用期。
实验仍在设计中;可能在任何释放中改变形状或消失,恕不另行通知。
  • 稳定的 - - - - - - import { createZapierSdk } from "@zapier/zapier-sdk"
  • β - - - - - - import { createZapierSdk } from "@zapier/zapier-sdk/beta"
  • 实验 - - - - - - import { createZapierSdk } from "@zapier/zapier-sdk/experimental"

每个子路径都是它上面的子路径的超集 /beta 包括所有稳定的东西, /experimental 包括所有测试版——所以选择更宽的层永远不会带走方法。非稳定方法宣布自己:对每个方法的第一次调用都会记录一个每进程一次的警告,并且下面引用的每个非稳定部分都以其层的契约开头。

快速入门

对于新项目。

下面将从头开始创建一个新项目,设置SDK和SDK CLI,并为您提供一个工作启动器示例:

# Create a new Zapier SDK project (scaffolds files, installs deps, and logs you in).
npx @zapier/zapier-sdk-cli init my-zapier-app

# Or skip the interactive prompts and accept all defaults.
npx @zapier/zapier-sdk-cli init my-zapier-app --non-interactive

安装

对于现有的项目。

运行向导式设置来添加未声明的Zapier SDK依赖项,验证和检查连接的应用:

npx @zapier/zapier-sdk-cli setup

如果你已经有了一个项目,想要开始通过Zapier使用SDK集成应用程序:

npm install @zapier/zapier-sdk
npm install -D @zapier/zapier-sdk-cli @types/node typescript

预排

假设您已经将CLI包安装到您的项目中(请参阅上面的说明),您(或代理)可以立即开始使用它。这对于内省你想在代码中使用的动作、连接等非常有用,但你也可以直接使用它来使用集成。

# See all available commands
npx zapier-sdk --help

# Login to Zapier.
npx zapier-sdk login

# Search from thousands of supported apps.
npx zapier-sdk list-apps --search "gmail"
# The output will show you the valid keys next to the app title like this:
# 1. Gmail (GoogleMailV2CLIAPI, gmail)

# Run any action for the app, using one of the app keys.
npx zapier-sdk run-action gmail
# This will ask you for the type of action you want to run.
# `search` or `write` are typically great for testing.
# Note that you usually need a connection to the app to run
# the action. If you don't already have one, you can create a new one at:
# https://zapier.com/app/assets/connections

# List connections for an app.
npx zapier-sdk list-connections gmail
# Or only list the ones you own.
npx zapier-sdk list-connections gmail --owner me
# Or just grab the first one.
npx zapier-sdk find-first-connection gmail --owner me

# Make any API request to an app using your connection.
npx zapier-sdk curl "https://gmail.googleapis.com/gmail/v1/users/me/labels" --connection 123

下面是可选的,但如果你想从代码中调用我们的动作,为这些动作安装TypeScript类型会很有帮助。你也可以直接用 fetch 发出任意的API请求。在这种情况下,您实际上并不需要这个,相反,您可能需要查找第三方API文档的类型或良好的代理。

# Search for apps that you want to use.
npx zapier-sdk list-apps --search "slack"
npx zapier-sdk list-apps --search "google sheets"
# The output will show you the valid keys next to the app title like this:
# 1. Slack (SlackCLIAPI, slack)
# 1. Google Sheets (GoogleSheetsV2CLIAPI, google-sheets, google_sheets)

# Generate TypeScript types for actions and fields of any apps you want to use.
npx zapier-sdk add slack google-sheets

# By default, types will be generated inside your `src` or `lib` folder if you
# have one or otherwise the root folder. Make sure your `tsconfig.json` file
# includes the generated type files.

# Alternatively, you can specify a custom output directory.
npx zapier-sdk add slack google-sheets --types-output ./types

现在让我们编写一些代码!

import { createZapierSdk } from "@zapier/zapier-sdk";

// ######## Initialize Zapier SDK ########
// Option 1: Running `zapier-sdk login` authenticates through your browser and
// stores a token on your local machine. As long as you have the CLI package
// installed as a development dependency, the SDK will automatically use it.
const zapier = createZapierSdk();

// Option 2: Provide a client ID and client secret.
// You can get these by running `zapier-sdk create-client-credentials`.
// This allows you to run the SDK in a server/serverless environment.
// const zapier = createZapierSdk({
//   credentials: {
//     clientId: "your_client_id_here", // or use ZAPIER_CREDENTIALS_CLIENT_ID env var
//     clientSecret: "your_client_secret_here", // or use ZAPIER_CREDENTIALS_CLIENT_SECRET env var
//   },
// });

// Option 3: Provide a valid Zapier token.
// This is for partner OAuth or internal Zapier use.
// const zapier = createZapierSdk({
//   credentials: "your_zapier_token_here", // or use ZAPIER_CREDENTIALS env var
// });

// ######## Access Apps ########
// List methods return a promise for a page with {data, nextCursor}.
const { data: firstPageApps, nextCursor } = await zapier.listApps();
// Use the cursor to get the next page:
const { data: secondPageApps } = await zapier.listApps({ cursor: nextCursor });

console.log({
  firstPageApps,
  secondPageApps,
});

// Use `.pages()` to iterate over all pages.
// Be careful with lots of pages, note the `search` to filter.
for await (const page of zapier.listApps({ search: "slack" }).pages()) {
  const { data: apps } = page;
  console.log({
    apps,
  });
}

// Use `.items()` to iterate over all items of all pages:
// Again, be careful with lots of items. Note the `maxItems` to limit the total items.
for await (const app of zapier.listApps({ maxItems: 100 }).items()) {
  console.log({
    app,
  });
}

// You can collect all results, but this could take a while for long lists!
const allApps = await Array.fromAsync(
  zapier.listApps({ maxItems: 100 }).items(),
);

console.log({
  allApps,
});

// The item methods return a promise for a single item, wrapped with {data}.
// This is just to give us room to add metadata in the future.
const { data: app } = await zapier.getApp({ app: "slack" });

console.log({
  app,
});

// ######## Connection Usage ########
const { data: myConnections } = await zapier.listConnections({
  app: "slack",
  owner: "me",
});

console.log({
  myConnections,
});

// ######## Find Actions ########
// Option 1: List actions
// Remember, this is just the first page which may not include them all!
// See `.items()` usage above, which can be used to make sure you get all actions.
const { data: actions } = await zapier.listActions({ app: "slack" });

console.log({
  actions,
});

const singleAction = await zapier.getAction({
  app: "slack",
  actionType: actions[0].action_type,
  action: actions[0].key,
});

console.log({
  singleAction,
});

// Option 2: Access actions via the `apps` proxy
// If you've generated TS types for an app using `zapier-sdk add`, you can
// access the app's actions like this:

// await zapier.apps.slack.read.channles({});
// await zapier.apps.slack.write.send_message({})

// ######## Run Actions ########
// Option 1:
const { data: channels } = await zapier.runAction({
  app: "slack",
  actionType: "read",
  action: "channels",
  connection: myConnections[0].id,
});

console.log({
  channels,
});

const { data: profile } = await zapier.getProfile();

// Option 2:
// Create an app binding to your connection.
const mySlack = zapier.apps.slack({
  connection: myConnections[0].id,
});

// Use your app binding to run the action.
const { data: users } = await mySlack.search.user_by_email({
  inputs: {
    email: profile.email,
  },
});

console.log({
  users,
});

// You can also skip the app binding and pass the connection into the action.
const { data: sameUsers } = await zapier.apps.slack.search.user_by_email({
  inputs: {
    email: profile.email,
  },
  connection: myConnections[0].id,
});

console.log({
  sameUsers,
});

// If the slug for an app has dashes, you can also use a snake_cased app key.
// For example, either of the following are valid:
// zapier.apps["google-sheets"]
// zapier.apps.google_sheets

// We have tens of thousands of actions across thousands of apps, but you're
// still not limited to those. You can make any arbitrary API request to an app
// using the same connections with `.fetch`! This returns a response just
// like a normal `fetch` call in JavaScript.
const emojiResponse = await zapier.fetch("https://slack.com/api/emoji.list", {
  connection: myConnections[0].id,
});

const emojiData = await emojiResponse.json();

console.log(emojiData.emoji);

工厂

这个 createZapierSdk(...) factory函数是SDK的主要入口点。它提供了管理连接、列出应用程序、运行操作等方法。

名字类型要求默认的可能的值描述
credentialsstring, object, function❌- - - - - -- - - - - -身份验证凭据。可以是字符串(令牌或API密钥)、客户端凭证对象({cliententid, clientSecret})、PKCE对象({cliententid})或返回其中任何一个的函数。
debugboolean❌- - - - - -- - - - - -启用调试日志。
baseUrlstring❌- - - - - -- - - - - -Zapier API端点的基础URL。
trackingBaseUrlstring❌- - - - - -- - - - - -Zapier跟踪端点的基础URL。
maxNetworkRetriesnumber❌- - - - - -- - - - - -速率限制和服务器错误响应的最大重试次数(默认:3)。
maxNetworkRetryDelaySecondsnumber❌- - - - - -- - - - - -网络重试之间的最大延迟(以秒为单位)(默认:60)。
maxConcurrentRequestsnumber, literal❌- - - - - -- - - - - -最大并发HTTP请求数(默认:200,最大值:10000)。
approvalTimeoutSecondsnumber❌- - - - - -- - - - - -批准轮询超时(以秒为单位)。默认值:600(10分钟)。
maxApprovalRetriesnumber❌- - - - - -- - - - - -在放弃之前,每个请求的最大顺序审批轮数(每个门控策略一个)。默认值:2。
approvalModestring❌- - - - - -disabled, poll, throw手动审批的审批流程行为。“poll”创建批准,在浏览器中打开它,轮询直到解决,然后重试原始请求。“throw”创建手动审批,并抛出带有审批URL的ZapierApprovalError,以便调用者可以处理它。服务器创建的自动模式审批总是轮询,直到它们到达终端状态,并在审批时重试原始请求,即使该选项为“throw”。 “disabled”在不创建审批的情况下,对需要审批的响应抛出ZapierApprovalError。解析顺序是:显式选项,然后是ZAPIER_APPROVAL_MODE,然后是默认行为(轮询交互式TTY,否则抛出)。
openAutoModeApprovalsInBrowserboolean❌- - - - - -- - - - - -默认情况下,自动模式审批不会在浏览器中打开。启用此选项以打开审批URL并查看审批过程。解析顺序是:explicit option,然后是ZAPIER_OPEN_AUTO_MODE_APPROVALS_IN_BROWSER,然后是false。
correlationIdstring❌- - - - - -- - - - - -请求跟踪的关联ID。设置时,作为 zapier-correlation-id 每个出站请求的头。返回到ZAPIER_CORRELATION_ID环境变量。
causationIdstring❌- - - - - -- - - - - -请求跟踪的原因ID。设置时,作为 zapier-causation-id 每个出站请求的头。返回到ZAPIER_CAUSATION_ID环境变量。
canIncludeSharedConnectionsboolean❌- - - - - -- - - - - -允许列出共享连接。
canIncludeSharedTablesboolean❌- - - - - -- - - - - -允许列出共享表。
canDeleteTablesboolean❌- - - - - -- - - - - -允许删除表。

命名连接

命名连接允许您将工作流代码与特定连接id分离。不是硬编码ID,而是通过名称引用连接,SDK从映射中解析它。

当执行引擎或部署系统管理工作流应该使用哪些连接时,这很有用。

提供映射

连接配置在 .zapierrc 旁边的应用程序版本pin,或内联通过 manifest 选择:

const zapier = createZapierSdk({
  manifest: {
    apps: { slack: { implementationName: "SlackCLIAPI", version: "1.21.1" } },
    connections: {
      slack_work: { connectionId: "01234567-89ab-cdef-0123-456789abcdef" },
      google_sheets: { connectionId: 67890 },
    },
  },
});

每个连接项将一个名称映射到 connectionId。Zapier连接API返回uuid格式的id id 条目的字段 listConnections); 来自旧连接的正整数也被接受。应用程序版本解析通过 apps 的部分 .zapierrc.

使用命名连接

的引用连接 connection 参数。传递要从连接映射中解析的连接名称,或要直接使用的连接ID。

// Per-call with alias
await zapier.apps.slack.read.channels({ connection: "slack_work" });

// Factory binding
const slack = zapier.apps.slack({ connection: "slack_work" });
await slack.read.channels({});

// Lower-level runAction
await zapier.runAction({
  app: "slack",
  actionType: "read",
  action: "channels",
  connection: "slack_work",
});

// Authenticated fetch
await zapier.fetch("https://slack.com/api/auth.test", {
  connection: "slack_work",
});

// Direct connection ID also works (UUID or legacy positive integer)
await zapier.apps.slack.read.channels({
  connection: "01234567-89ab-cdef-0123-456789abcdef",
});

可用功能

账户

您的Zapier用户帐户,即SDK登录时使用的帐户。用这个来确认是谁。

getProfile

获取当前用户的配置文件信息

参数:

名字类型要求默认的可能的值描述
optionsobject❌- - - - - -- - - - - -

返回: Promise<ProfileItem>

名字类型要求可能的值描述
dataobject✅- - - - - -
↳ idstring✅- - - - - -
↳ first_namestring✅- - - - - -
↳ last_namestring✅- - - - - -
↳ full_namestring✅- - - - - -
↳ emailstring✅- - - - - -
↳ email_confirmedboolean✅- - - - - -
↳ timezonestring✅- - - - - -

例子:

const { data: profile } = await zapier.getProfile();

行动

动作是应用程序可以做的事情,比如发送电子邮件或创建联系人。使用这些工具来查找应用程序的操作,查看它们需要什么输入,并直接在Zap之外运行它们。

createActionRun

启动操作运行并返回其ID,而无需等待结果。操作的运行是异步的:这将立即返回一个运行ID,并且 getActionRun 获取结果。当您想要开始工作并稍后收集它时,请使用这一对(多次运行,将ID交给另一个进程,在重新启动时幸存下来)。 runAction 是启动运行并等待其结果的单调用形式。

参数:

名字类型要求默认的可能的值描述
optionsobject✅- - - - - -- - - - - -
↳ appstring✅- - - - - -- - - - - -应用程序代码段(例如,‘github’),实现名称(例如,‘SlackCLIAPI’),或版本号(例如,‘[email protected]’)
↳ actionTypestring✅- - - - - -read, read_bulk, write, run, search, search_or_write, search_and_write, filter与动作定义的类型匹配的动作类型
↳ actionstring✅- - - - - -- - - - - -操作键(例如,send_message或find_row)
↳ connectionstring, number❌- - - - - -- - - - - -连接别名或连接ID (UUID或正整数)。如果操作需要连接进行身份验证并与服务交互,则需要。与连接映射中的键匹配的字符串将根据它进行解析;否则直接作为连接ID使用。
↳ inputsobject❌- - - - - -- - - - - -输入操作的参数
↳ pagestring❌- - - - - -- - - - - -要为批量读取操作获取的页。通过 next_page 返回之前的运行以获取以下页面。
↳ callbackUrlstring❌- - - - - -- - - - - -URL Zapier张贴完成运行,所以你不需要投票。必须使用HTTPS并解析到公共主机,因此本地接收方需要隧道。身体匹配什么? getActionRun 的回报。验证 Zapier-Callback-Signature 头,并期望相同的运行到达不止一次。
↳ idempotencyKeystring❌- - - - - -- - - - - -使重试运行安全的键。在72小时内使用相同键的另一次运行返回原始运行,而不是开始一个新的运行,即使它的输入不同,所以每次不同的运行使用一个新的键。经过分页的运行伴随着从该密钥和该页派生的密钥发送,因此一个密钥覆盖每个页面,重新尝试一个页面会重播该页的运行。

返回: Promise<StartedActionRunItem>

名字类型要求可能的值描述
dataobject✅- - - - - -
↳ idstring✅- - - - - -动作运行ID。将其作为 run 用于 getActionRun 获取运行结果。
↳ implementation_idstring✅- - - - - -运行开始时的版本实现ID(例如:“[email protected]”)。的前部分是无版本应用程序密钥 @.

例子:

const { data: startedActionRun } = await zapier.createActionRun({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

getAction

获取有关特定操作的详细信息

参数:

名字类型要求默认的可能的值描述
optionsobject✅- - - - - -- - - - - -
↳ appstring✅- - - - - -- - - - - -应用程序代码段(例如,‘github’),实现名称(例如,‘SlackCLIAPI’),或版本号(例如,‘[email protected]’)
↳ actionTypestring✅- - - - - -read, read_bulk, write, run, search, search_or_write, search_and_write, filter与动作定义的类型匹配的动作类型
↳ actionstring✅- - - - - -- - - - - -操作键(例如,send_message或find_row)

返回: Promise<ActionItem>

名字类型要求可能的值描述
dataobject✅- - - - - -
↳ idstring❌- - - - - -
↳ keystring✅- - - - - -
↳ descriptionstring✅- - - - - -
↳ is_importantboolean❌- - - - - -
↳ is_hiddenboolean❌- - - - - -
↳ permissionsobject❌- - - - - -
↳ app_keystring✅- - - - - -
↳ app_versionstring❌- - - - - -
↳ action_typestring✅filter, read, read_bulk, run, search, search_and_write, search_or_write, write
↳ titlestring✅- - - - - -
↳ typestring✅action

例子:

const { data: action } = await zapier.getAction({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

getActionInputFieldsSchema

获取操作输入字段的JSON Schema表示形式。返回一个JSON Schema对象,该对象描述操作输入参数的结构、类型和验证规则。

参数:

名字类型要求默认的可能的值描述
optionsobject✅- - - - - -- - - - - -
↳ appstring✅- - - - - -- - - - - -应用程序键(例如,‘SlackCLIAPI’或‘github’之类的蛞蝓)以获取输入模式
↳ actionTypestring✅- - - - - -read, read_bulk, write, run, search, search_or_write, search_and_write, filter与动作定义的类型匹配的动作类型
↳ actionstring✅- - - - - -- - - - - -获取输入模式的操作键
↳ connectionstring, number❌- - - - - -- - - - - -连接别名或连接ID (UUID或正整数)。与连接映射中的键匹配的字符串将根据它进行解析;否则直接作为连接ID使用。与connectionId互斥。
↳ inputsobject❌- - - - - -- - - - - -可能影响模式的当前输入值(例如,当字段依赖于其他字段值时)

返回: Promise<InputSchemaItem>

例子:

const { data: inputSchema } = await zapier.getActionInputFieldsSchema({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

getActionRun

开始运行的操作的当前状态 createActionRun。这是一个立即返回的时间点读取:Zapier尚未完成执行的运行返回状态 waiting,因此再次调用以检查结果。 runAction 开始运行并在一次调用中等待其结果。结果将在创建运行后存储7天。

参数:

名字类型要求默认的可能的值描述
optionsobject✅- - - - - -- - - - - -
↳ runstring✅- - - - - -- - - - - -返回的操作运行ID createActionRun

返回: Promise<ActionRunItem>

名字类型要求可能的值描述
dataobject✅- - - - - -
↳ idstring✅- - - - - -动作运行ID
↳ statusstring✅waiting, success, error, unknown运行在生命周期的哪个阶段。 waiting 意味着Zapier还在执行; error 表示应用程序返回了一个失败(详细信息见 errors)。 unknown 意味着回应没有地位,因此结果无法确定——将其视为不确定而不是成功。
↳ resultsarray✅- - - - - -记录所产生的操作。即使成功运行,也可能是空的。
↳ next_pagestring❌- - - - - -对于批量读取操作,请参阅下一页。把它作为 page 用于 createActionRun 取那一页。
↳ errors[]object[]✅- - - - - -运行操作时应用返回的错误
↳ codestring❌- - - - - -机器可读错误类别
↳ titlestring❌- - - - - -短误差标签
↳ detailstring❌- - - - - -人类可读的错误细节

例子:

const { data: actionRun } = await zapier.getActionRun({
  run: "example-run",
});

listActionInputFieldChoices

获取动态下拉输入字段的可用选项

参数:

名字类型要求默认的可能的值描述
optionsobject✅- - - - - -- - - - - -
↳ appstring✅- - - - - -- - - - - -应用程序代码段(例如,‘github’),实现名称(例如,‘SlackCLIAPI’),或版本号(例如,‘[email protected]’)
↳ actionTypestring✅- - - - - -read, read_bulk, write, run, search, search_or_write, search_and_write, filter与动作定义的类型匹配的动作类型
↳ actionstring✅- - - - - -- - - - - -操作键(例如,send_message或find_row)
↳ inputFieldstring✅- - - - - -- - - - - -获取选项的输入字段键
↳ connectionstring, number❌- - - - - -- - - - - -连接别名或连接ID (UUID或正整数)。与连接映射中的键匹配的字符串将根据它进行解析;否则直接作为连接ID使用。与connectionId互斥。
↳ inputsobject❌- - - - - -- - - - - -可能影响可用选项的当前输入值
↳ pagenumber❌- - - - - -- - - - - -分页结果的页码
↳ pageSizenumber❌- - - - - -- - - - - -每页的选择数
↳ maxItemsnumber❌- - - - - -- - - - - -在所有页面中返回的最大项目总数
↳ cursorstring❌- - - - - -- - - - - -起始光标

返回: Promise<PaginatedResult<InputFieldChoiceItem>>

名字类型要求可能的值描述
data[]object[]✅- - - - - -
↳ keystring❌- - - - - -
↳ labelstring❌- - - - - -
↳ samplestring❌- - - - - -
↳ valuestring❌- - - - - -
nextCursorstring❌- - - - - -下一页的光标;当没有更多的页面时省略

例子:

// Get first page and a cursor for the second page
const { data: inputFieldChoices, nextCursor } =
  await zapier.listActionInputFieldChoices({
    app: "example-app",
    actionType: "read",
    action: "example-action",
    inputField: "example-input-field",
  });

// Or iterate over all pages
for await (const page of zapier
  .listActionInputFieldChoices({
    app: "example-app",
    actionType: "read",
    action: "example-action",
    inputField: "example-input-field",
  })
  .pages()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const inputFieldChoice of zapier
  .listActionInputFieldChoices({
    app: "example-app",
    actionType: "read",
    action: "example-action",
    inputField: "example-input-field",
  })
  .items()) {
  // Do something with each inputFieldChoice
}

listActionInputFields

获取特定操作所需的输入字段

参数:

名字类型要求默认的可能的值描述
optionsobject✅- - - - - -- - - - - -
↳ appstring✅- - - - - -- - - - - -应用程序代码段(例如,‘github’),实现名称(例如,‘SlackCLIAPI’),或版本号(例如,‘[email protected]’)
↳ actionTypestring✅- - - - - -read, read_bulk, write, run, search, search_or_write, search_and_write, filter与动作定义的类型匹配的动作类型
↳ actionstring✅- - - - - -- - - - - -操作键(例如,send_message或find_row)
↳ connectionstring, number❌- - - - - -- - - - - -连接别名或连接ID (UUID或正整数)。与连接映射中的键匹配的字符串将根据它进行解析;否则直接作为连接ID使用。与connectionId互斥。
↳ inputsobject❌- - - - - -- - - - - -可能影响可用字段的当前输入值
↳ pageSizenumber❌- - - - - -- - - - - -每页输入字段的数量
↳ maxItemsnumber❌- - - - - -- - - - - -在所有页面中返回的最大项目总数
↳ cursorstring❌- - - - - -- - - - - -起始光标

返回: Promise<PaginatedResult<RootFieldItem>>

|名字| Ty

版本与发布记录

@zapier/zapier-sdk 共发布 272 个版本,首次发布于 2025/07/09;过去 12 个月发布了 232 个版本。

版本发布日期距今
0.119.3latest2026/11/03今天
0.119.22026/11/03今天
0.119.12026/11/03今天
0.119.02026/10/313 天前
0.118.02026/10/295 天前
0.117.02026/10/2212 天前

关于 @zapier/zapier-sdk 的常见问题

@zapier/zapier-sdk 是什么?

完整的Zapier SDK -结合所有Zapier SDK包

如何安装 @zapier/zapier-sdk?

在项目目录运行 npm install @zapier/zapier-sdk,或使用 pnpm add / yarn add / bun add。

@zapier/zapier-sdk 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@zapier/zapier-sdk 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@zapier/zapier-sdk 可以商用吗?

@zapier/zapier-sdk 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@zapier/zapier-sdk 还在维护吗?

最新版本 0.119.3 发布于 2026/11/03(今天);至今共发布 272 个版本,其中过去 12 个月发布了 232 个;首次发布于 2025/07/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。