-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
120 additions
and
293 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,17 +33,11 @@ $ npm install -g zapier-platform-cli | |
This command does the following: | ||
|
||
* Creates a temporary folder | ||
|
||
* Copies all code into the temporary folder | ||
|
||
* Adds an entry point: `zapierwrapper.js` | ||
|
||
* Generates and validates app definition. | ||
|
||
* Detects dependencies via browserify (optional, on by default) | ||
|
||
* Zips up all needed `.js` files. If you want to include more files, add a "includeInBuild" property (array with strings of regexp paths) to your `.zapierapprc`. | ||
|
||
* Moves the zip to `build/build.zip` and `build/source.zip` and deletes the temp folder | ||
|
||
This command is typically followed by `zapier upload`. | ||
|
@@ -190,17 +184,12 @@ Do not use this if you have non-breaking changes, such as fixing help text. | |
**Usage**: `zapier describe` | ||
|
||
This command prints a human readable enumeration of your integrations's | ||
|
||
triggers, searches, and creates as seen by Zapier. Useful to understand how your | ||
|
||
resources convert and relate to different actions. | ||
|
||
* **Noun**: your action's noun | ||
|
||
* **Label**: your action's label | ||
|
||
* **Resource**: the resource (if any) this action is tied to | ||
|
||
* **Available Methods**: testable methods for this action | ||
|
||
**Flags** | ||
|
@@ -325,41 +314,31 @@ The `zapier invoke auth start` subcommand will prompt you for the necessary auth | |
Each line in the `.env` file should follow one of these formats: | ||
|
||
* `VAR_NAME=VALUE` for environment variables | ||
|
||
* `authData_FIELD_KEY=VALUE` for auth data fields | ||
|
||
For example, a `.env` file for an OAuth2 integration might look like this: | ||
|
||
``` | ||
CLIENT_ID='your_client_id' | ||
CLIENT_SECRET='your_client_secret' | ||
authData_access_token='1234567890' | ||
authData_refresh_token='abcdefg' | ||
authData_account_name='zapier' | ||
``` | ||
|
||
To test if the auth data is correct, run either one of these: | ||
|
||
``` | ||
zapier invoke auth test # invokes authentication.test method | ||
zapier invoke auth label # invokes authentication.test and renders connection label | ||
``` | ||
|
||
To refresh stale auth data for OAuth2 or session auth, run `zapier invoke auth refresh`. | ||
|
||
Once you have the correct auth data, you can test an trigger, a search, or a create action. For example, here's how you invoke a trigger with the key `new_recipe`: | ||
|
||
``` | ||
zapier invoke trigger new_recipe | ||
``` | ||
|
||
To add input data, use the `--inputData` flag. The input data can come from the command directly, a file, or stdin. See **EXAMPLES** below. | ||
|
@@ -370,33 +349,22 @@ The `--debug` flag will show you the HTTP request logs and any console logs you | |
|
||
The following is a non-exhaustive list of current limitations and may be supported in the future: | ||
|
||
- `zapier invoke auth refresh` to refresh the auth data in `.env` | ||
|
||
- Hook triggers, including REST hook subscribe/unsubscribe | ||
|
||
- Line items | ||
|
||
- Output hydration | ||
|
||
- File upload | ||
|
||
- Dynamic dropdown pagination | ||
|
||
- Function-based connection label | ||
|
||
- Buffered create actions | ||
|
||
- Search-or-create actions | ||
|
||
- Search-powered fields | ||
|
||
- Field choices | ||
|
||
- autoRefresh for OAuth2 and session auth | ||
|
||
|
||
**Arguments** | ||
* `actionType` | The action type you want to invoke. | ||
* `actionKey` | The trigger/action key you want to invoke. If ACTIONTYPE is "auth", this can be "label", "start", or "test". | ||
* `actionKey` | The trigger/action key you want to invoke. If ACTIONTYPE is "auth", this can be "label", "refresh", "start", or "test". | ||
|
||
**Flags** | ||
* `-i, --inputData` | The input data to pass to the action. Must be a JSON-encoded object. The data can be passed from the command directly like '{"key": "value"}', read from a file like @file.json, or read from stdin like @-. | ||
|
@@ -413,6 +381,7 @@ The following is a non-exhaustive list of current limitations and may be support | |
**Examples** | ||
* `zapier invoke` | ||
* `zapier invoke auth start` | ||
* `zapier invoke auth refresh` | ||
* `zapier invoke auth test` | ||
* `zapier invoke auth label` | ||
* `zapier invoke trigger new_recipe` | ||
|
@@ -437,6 +406,7 @@ Job times will vary as it depends on the size of the queue and how many users yo | |
|
||
Jobs are returned from oldest to newest. | ||
|
||
|
||
**Flags** | ||
* `-f, --format` | Change the way structured data is presented. If "json" or "raw", you can pipe the output of the command into other tools, such as jq. One of `[plain | json | raw | row | table]`. Defaults to `table`. | ||
* `-d, --debug` | Show extra debugging output. | ||
|
@@ -520,9 +490,7 @@ We recommend migrating a small subset of users first, via the percent argument, | |
You can migrate a specific user's Zaps by using `--user` (i.e. `zapier migrate 1.0.0 1.0.1 [email protected]`). This will migrate Zaps that are private for that user. Zaps that are | ||
|
||
- [shared across the team](https://help.zapier.com/hc/en-us/articles/8496277647629), | ||
|
||
- [shared app connections](https://help.zapier.com/hc/en-us/articles/8496326497037-Share-app-connections-with-your-team), or | ||
|
||
- in a [team/company account](https://help.zapier.com/hc/en-us/articles/22330977078157-Collaborate-with-members-of-your-Team-or-Company-account) | ||
|
||
will **not** be migrated. | ||
|
@@ -561,11 +529,8 @@ You cannot pass both `--user` and `--account`. | |
Promote an integration version into production (non-private) rotation, which means new users can use this integration version. | ||
|
||
* This **does** mark the version as the official public version - all other versions & users are grandfathered. | ||
|
||
* This does **NOT** build/upload or deploy a version to Zapier - you should `zapier push` first. | ||
|
||
* This does **NOT** move old users over to this version - `zapier migrate 1.0.0 1.0.1` does that. | ||
|
||
* This does **NOT** recommend old users stop using this version - `zapier deprecate 1.0.0 2017-01-01` does that. | ||
|
||
Promotes are an inherently safe operation for all existing users of your integration. | ||
|
@@ -642,7 +607,6 @@ The first argument should be one of `trigger|search|create|resource` followed by | |
The scaffold command does two general things: | ||
|
||
* Creates a new file (such as `triggers/contact.js`) | ||
|
||
* Imports and registers it inside your `index.js` | ||
|
||
You can mix and match several options to customize the created scaffold for your project. | ||
|
@@ -675,9 +639,7 @@ You can mix and match several options to customize the created scaffold for your | |
These users come in three levels: | ||
|
||
* `admin`, who can edit everything about the integration | ||
|
||
* `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more. | ||
|
||
* `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more. | ||
|
||
Team members can be freely added and removed. | ||
|
@@ -708,13 +670,12 @@ Team members can be freely added and removed. | |
These users come in three levels: | ||
|
||
* `admin`, who can edit everything about the integration | ||
|
||
* `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more. | ||
|
||
* `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more. | ||
|
||
Use the `zapier team:add` and `zapier team:remove` commands to modify your team. | ||
|
||
|
||
**Flags** | ||
* `-f, --format` | Change the way structured data is presented. If "json" or "raw", you can pipe the output of the command into other tools, such as jq. One of `[plain | json | raw | row | table]`. Defaults to `table`. | ||
* `-d, --debug` | Show extra debugging output. | ||
|
@@ -730,9 +691,7 @@ Use the `zapier team:add` and `zapier team:remove` commands to modify your team. | |
**Usage**: `zapier team:remove` | ||
|
||
Admins will immediately lose write access to the integration. | ||
|
||
Collaborators will immediately lose read access to the integration. | ||
|
||
Subscribers won't receive future email updates. | ||
|
||
**Flags** | ||
|
@@ -774,6 +733,7 @@ This command sends both build/build.zip and build/source.zip to Zapier for use. | |
|
||
Typically we recommend using `zapier push`, which does a build and upload, rather than `upload` by itself. | ||
|
||
|
||
**Flags** | ||
* `-d, --debug` | Show extra debugging output. | ||
|
||
|
Oops, something went wrong.