@zapier/zapier-sdk-cli 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +298 -0
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @zapier/zapier-sdk-cli
2
2
 
3
+ ## 0.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - c662f79: Add proper README with dynamically-listed methods
8
+ - Updated dependencies [c662f79]
9
+ - @zapier/zapier-sdk-mcp@0.1.3
10
+ - @zapier/zapier-sdk@0.5.1
11
+
3
12
  ## 0.4.3
4
13
 
5
14
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,298 @@
1
+ # @zapier/zapier-sdk-cli
2
+
3
+ <!-- Generated CLI Reference -->
4
+
5
+ ## Table of Contents
6
+
7
+ - [Installation](#installation)
8
+ - [Quick Start](#quick-start)
9
+ - [Available Commands](#available-commands)
10
+ - [Actions](#actions)
11
+ - [`listActions`](#listactions)
12
+ - [`getAction`](#getaction)
13
+ - [`listInputFields`](#listinputfields)
14
+ - [`runAction`](#runaction)
15
+ - [Apps](#apps)
16
+ - [`listApps`](#listapps)
17
+ - [`getApp`](#getapp)
18
+ - [Authentication](#authentication)
19
+ - [`listAuthentications`](#listauthentications)
20
+ - [`getAuthentication`](#getauthentication)
21
+ - [`findFirstAuthentication`](#findfirstauthentication)
22
+ - [`findUniqueAuthentication`](#finduniqueauthentication)
23
+ - [HTTP Requests](#http-requests)
24
+ - [`request`](#request)
25
+ - [User & Profile](#user--profile)
26
+ - [`getProfile`](#getprofile)
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ npm install -D @zapier/zapier-sdk-cli
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ```bash
37
+ # See all available commands
38
+ npx zapier-sdk --help
39
+
40
+ # Login to Zapier
41
+ npx zapier-sdk login
42
+
43
+ # List all available apps
44
+ npx zapier-sdk list-apps
45
+
46
+ # Generate TypeScript types for an app
47
+ npx zapier-sdk generate-types slack --output ./types/slack.ts
48
+ ```
49
+
50
+ ## Available Commands
51
+
52
+ The CLI automatically generates commands from the SDK registry. All SDK functions are available as CLI commands using kebab-case naming.
53
+
54
+ ### Actions
55
+
56
+ #### `list-actions`
57
+
58
+ List all actions for a specific app
59
+
60
+ **Options:**
61
+
62
+ | Option | Type | Required | Default | Possible Values | Description |
63
+ | --------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------ |
64
+ | `<appKey>` | `string` | ✅ | — | — | App key of actions to list (e.g., 'SlackCLIAPI') |
65
+ | `--action-type` | `string` | ❌ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Filter actions by type |
66
+ | `--page-size` | `number` | ❌ | — | — | Number of actions per page |
67
+ | `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
68
+
69
+ **Usage:**
70
+
71
+ ```bash
72
+ npx zapier-sdk list-actions <appKey> [--action-type] [--page-size] [--max-items]
73
+ ```
74
+
75
+ #### `get-action`
76
+
77
+ Get detailed information about a specific action
78
+
79
+ **Options:**
80
+
81
+ | Option | Type | Required | Default | Possible Values | Description |
82
+ | -------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------- |
83
+ | `<appKey>` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI') |
84
+ | `<actionType>` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
85
+ | `<actionKey>` | `string` | ✅ | — | — | Action key to execute |
86
+
87
+ **Usage:**
88
+
89
+ ```bash
90
+ npx zapier-sdk get-action <appKey> <actionType> <actionKey>
91
+ ```
92
+
93
+ #### `list-input-fields`
94
+
95
+ Get the input fields required for a specific action
96
+
97
+ **Options:**
98
+
99
+ | Option | Type | Required | Default | Possible Values | Description |
100
+ | --------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
101
+ | `<appKey>` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI') |
102
+ | `<actionType>` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
103
+ | `<actionKey>` | `string` | ✅ | — | — | Action key to execute |
104
+ | `--authentication-id` | `string` | ❌ | — | — | Authentication ID to use for this action |
105
+ | `--inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
106
+ | `--page-size` | `number` | ❌ | — | — | Number of input fields per page |
107
+ | `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
108
+
109
+ **Usage:**
110
+
111
+ ```bash
112
+ npx zapier-sdk list-input-fields <appKey> <actionType> <actionKey> [--authentication-id] [--inputs] [--page-size] [--max-items]
113
+ ```
114
+
115
+ #### `run-action`
116
+
117
+ Execute an action with the given inputs
118
+
119
+ **Options:**
120
+
121
+ | Option | Type | Required | Default | Possible Values | Description |
122
+ | --------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------- |
123
+ | `<appKey>` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI') |
124
+ | `<actionType>` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
125
+ | `<actionKey>` | `string` | ✅ | — | — | Action key to execute |
126
+ | `--authentication-id` | `string` | ❌ | — | — | Authentication ID to use for this action |
127
+ | `--inputs` | `object` | ❌ | — | — | Input parameters for the action |
128
+ | `--page-size` | `number` | ❌ | — | — | Number of results per page |
129
+ | `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
130
+
131
+ **Usage:**
132
+
133
+ ```bash
134
+ npx zapier-sdk run-action <appKey> <actionType> <actionKey> [--authentication-id] [--inputs] [--page-size] [--max-items]
135
+ ```
136
+
137
+ ### Apps
138
+
139
+ #### `list-apps`
140
+
141
+ List all available apps with optional filtering
142
+
143
+ **Options:**
144
+
145
+ | Option | Type | Required | Default | Possible Values | Description |
146
+ | ------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------- |
147
+ | `--app-keys` | `array` | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github') |
148
+ | `--search` | `string` | ❌ | — | — | Search for apps by name |
149
+ | `--page-size` | `number` | ❌ | — | — | Number of apps per page |
150
+ | `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
151
+
152
+ **Usage:**
153
+
154
+ ```bash
155
+ npx zapier-sdk list-apps [--app-keys] [--search] [--page-size] [--max-items]
156
+ ```
157
+
158
+ #### `get-app`
159
+
160
+ Get detailed information about a specific app
161
+
162
+ **Options:**
163
+
164
+ | Option | Type | Required | Default | Possible Values | Description |
165
+ | ---------- | -------- | -------- | ------- | --------------- | --------------------------------------------- |
166
+ | `<appKey>` | `string` | ✅ | — | — | App key of app to fetch (e.g., 'SlackCLIAPI') |
167
+
168
+ **Usage:**
169
+
170
+ ```bash
171
+ npx zapier-sdk get-app <appKey>
172
+ ```
173
+
174
+ ### Authentication
175
+
176
+ #### `list-authentications`
177
+
178
+ List available authentications with optional filtering
179
+
180
+ **Options:**
181
+
182
+ | Option | Type | Required | Default | Possible Values | Description |
183
+ | -------------- | -------- | -------- | ------- | --------------- | -------------------------------------------------------- |
184
+ | `--app-key` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI') |
185
+ | `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
186
+ | `--title` | `string` | ❌ | — | — | Filter authentications by exact title match |
187
+ | `--account_id` | `string` | ❌ | — | — | Filter by account ID |
188
+ | `--owner` | `string` | ❌ | — | — | Filter by owner |
189
+ | `--page-size` | `number` | ❌ | — | — | Number of authentications per page |
190
+ | `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
191
+
192
+ **Usage:**
193
+
194
+ ```bash
195
+ npx zapier-sdk list-authentications [--app-key] [--search] [--title] [--account_id] [--owner] [--page-size] [--max-items]
196
+ ```
197
+
198
+ #### `get-authentication`
199
+
200
+ Get a specific authentication by ID
201
+
202
+ **Options:**
203
+
204
+ | Option | Type | Required | Default | Possible Values | Description |
205
+ | -------------------- | -------- | -------- | ------- | --------------- | ----------------------------- |
206
+ | `<authenticationId>` | `number` | ✅ | — | — | Authentication ID to retrieve |
207
+
208
+ **Usage:**
209
+
210
+ ```bash
211
+ npx zapier-sdk get-authentication <authenticationId>
212
+ ```
213
+
214
+ #### `find-first-authentication`
215
+
216
+ Find the first authentication matching the criteria
217
+
218
+ **Options:**
219
+
220
+ | Option | Type | Required | Default | Possible Values | Description |
221
+ | -------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------- |
222
+ | `--app-key` | `string` | ❌ | — | — | App key of authentication to find (e.g., 'SlackCLIAPI') |
223
+ | `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
224
+ | `--title` | `string` | ❌ | — | — | Filter authentications by exact title match |
225
+ | `--account_id` | `string` | ❌ | — | — | Filter by account ID |
226
+ | `--owner` | `string` | ❌ | — | — | Filter by owner |
227
+
228
+ **Usage:**
229
+
230
+ ```bash
231
+ npx zapier-sdk find-first-authentication [--app-key] [--search] [--title] [--account_id] [--owner]
232
+ ```
233
+
234
+ #### `find-unique-authentication`
235
+
236
+ Find a unique authentication matching the criteria
237
+
238
+ **Options:**
239
+
240
+ | Option | Type | Required | Default | Possible Values | Description |
241
+ | -------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------- |
242
+ | `--app-key` | `string` | ❌ | — | — | App key of authentication to find (e.g., 'SlackCLIAPI') |
243
+ | `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
244
+ | `--title` | `string` | ❌ | — | — | Filter authentications by exact title match |
245
+ | `--account_id` | `string` | ❌ | — | — | Filter by account ID |
246
+ | `--owner` | `string` | ❌ | — | — | Filter by owner |
247
+
248
+ **Usage:**
249
+
250
+ ```bash
251
+ npx zapier-sdk find-unique-authentication [--app-key] [--search] [--title] [--account_id] [--owner]
252
+ ```
253
+
254
+ ### HTTP Requests
255
+
256
+ #### `request`
257
+
258
+ Make authenticated HTTP requests through Zapier's Relay service
259
+
260
+ **Options:**
261
+
262
+ | Option | Type | Required | Default | Possible Values | Description |
263
+ | --------------------------- | -------- | -------- | ------- | ---------------------------------------------------------- | -------------------------------------------------------------------- |
264
+ | `<url>` | `string` | ✅ | — | — | The URL to request (will be proxied through Relay) |
265
+ | `--method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method |
266
+ | `--body` | `string` | ❌ | — | — | Request body as a string |
267
+ | `--authentication-id` | `number` | ❌ | — | — | Zapier authentication ID to use for the request |
268
+ | `--callback-url` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
269
+ | `--authentication-template` | `string` | ❌ | — | — | Optional JSON string authentication template to bypass Notary lookup |
270
+ | `--headers` | `string` | ❌ | — | — | Request headers |
271
+ | `--relay-base-url` | `string` | ❌ | — | — | Base URL for Relay service |
272
+
273
+ **Usage:**
274
+
275
+ ```bash
276
+ npx zapier-sdk request <url> [--method] [--body] [--authentication-id] [--callback-url] [--authentication-template] [--headers] [--relay-base-url]
277
+ ```
278
+
279
+ ### User & Profile
280
+
281
+ #### `get-profile`
282
+
283
+ Get current user's profile information
284
+
285
+ **Usage:**
286
+
287
+ ```bash
288
+ npx zapier-sdk get-profile
289
+ ```
290
+
291
+ ### Additional CLI Commands
292
+
293
+ - `login` - Authenticate with Zapier
294
+ - `logout` - Clear authentication
295
+ - `generate-types <app-key>` - Generate TypeScript types for an app
296
+ - `mcp` - Start MCP server
297
+
298
+ <!-- End Generated CLI Reference -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-cli",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Command line interface for Zapier SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,8 +31,8 @@
31
31
  "ora": "^8.2.0",
32
32
  "pkce-challenge": "^5.0.0",
33
33
  "zod": "^3.25.67",
34
- "@zapier/zapier-sdk": "0.5.0",
35
- "@zapier/zapier-sdk-mcp": "0.1.2",
34
+ "@zapier/zapier-sdk": "0.5.1",
35
+ "@zapier/zapier-sdk-mcp": "0.1.3",
36
36
  "@zapier/zapier-sdk-cli-login": "0.3.1"
37
37
  },
38
38
  "devDependencies": {