flex-plugins-api-client
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "flex-plugins-api-client", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Flex Plugins API Client", | ||
@@ -54,3 +54,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "7b5ef71a5953deae4234abc8ebf2c0e6bf86c6a4" | ||
"gitHead": "faa7450cf2a545f6f5db61ba722f3c8b59e4752f" | ||
} |
104
README.md
@@ -7,3 +7,3 @@ [![Version](https://img.shields.io/npm/v/flex-plugins-api-client.svg?style=square)](https://www.npmjs.com/package/flex-plugins-api-client) | ||
This package provides a NodeJS client for using the [Public API endpoints](https://www.twilio.com/docs/flex/plugins/api). | ||
This package provides a NodeJS HTTP client for using the [Public API endpoints](https://www.twilio.com/docs/flex/plugins/api). | ||
@@ -15,5 +15,6 @@ ## Installation | ||
```bash | ||
# Using npm | ||
npm i -S flex-plugins-api-client | ||
# Or use yarn | ||
# Using yarn | ||
yarn add flex-plugins-api-client | ||
@@ -24,3 +25,3 @@ ``` | ||
Instantiate a `PluginServiceHttp` client by providing username/password (which can be AccountSid/AuthToken or API Key/Secret). Then instantiate each required client by passing this HTTP client to it: | ||
Instantiate a `PluginServiceHttpClient` client by providing username/password (AccountSid/AuthToken, API Key/Secret, or JWE token). Then instantiate each client (corresponding to different resources) by passing this HTTP client to it: | ||
@@ -41,1 +42,98 @@ ```js | ||
``` | ||
## Clients | ||
The available clients are listed below. All endpoints return a promise. | ||
**Note**: If you are using the JWE token for authentication, then _all_ identifiers (such as `pluginId`, `versionId`, etc) _must_ be the sid of the resource only. | ||
### PluginsClient | ||
This is the HTTP client for [plugins](https://www.twilio.com/docs/flex/plugins/api/plugin) endpoints. Available endpoints are: | ||
#### list() | ||
This endpoint lists all plugins. | ||
#### get(pluginId) | ||
This endpoint fetches the provided plugin. The `pluginId` can either be the unique name or the plugin sid. | ||
#### create(requestObject) | ||
This endpoint creates a new plugin. | ||
#### update(pluginId, updateObject) | ||
This endpoint updates a plugin. The `pluginId` can either be the unique name or the plugin sid. | ||
#### upsert(upsertObject) | ||
This endpoint tries to find the plugin by uniqueName. If it is found, then it updates the plugin; otherwise, it creates a new plugin. | ||
### PluginVersionsClient | ||
This is the HTTP client for [plugin versions](https://www.twilio.com/docs/flex/plugins/api/plugin-version) endpoints. Available endpoints are: | ||
#### list(pluginId) | ||
This endpoint lists all plugin versions of the given plugin. The `pluginId` can either be the unique name or the plugin sid. | ||
#### latest(pluginId) | ||
This endpoint returns the latest plugin version (by the date created) of the given plugin. The `pluginId` can either be the unique name or the plugin sid. | ||
#### get(pluginId, versionId) | ||
This endpoint fetches the provided plugin version. The `pluginId` can either be the unique name or the plugin sid and the `versionId` can either be the version or the plugin version sid. | ||
#### create(pluginId, requestObject) | ||
This endpoint creates a new plugin version. The `pluginId` can either be the unique name or the plugin sid. | ||
### ConfigurationsClient | ||
This is the HTTP client for [configurations](https://www.twilio.com/docs/flex/plugins/api/plugin-configuration) endpoints. Available endpoints are: | ||
#### list() | ||
This endpoint lists all configurations. | ||
#### get(configId) | ||
This endpoint fetches the provided configuration. The `configId` can either be version of the configuration sid. | ||
#### create(requestObject) | ||
This endpoint creates a new configuration. | ||
### ConfiguredPluginsClient | ||
This is the HTTP client for [configured plugins](https://www.twilio.com/docs/flex/plugins/api/plugin-configuration) endpoints. Available endpoints are: | ||
#### list(configId) | ||
This endpoint lists all configured plugins. The `configId` can either be version of the configuration sid. | ||
#### get(configId, pluginId) | ||
This endpoint fetches the provided configured plugins. The `configId` can either be version of the configuration sid and the `pluginId` can either be the unique name or the plugin sid. | ||
### ReleasesClient | ||
This is the HTTP client for [releases](https://www.twilio.com/docs/flex/plugins/api/release) endpoints. Available endpoints are: | ||
#### list() | ||
This endpoint lists all releases. | ||
#### active() | ||
This endpoint returns the currently active release. | ||
#### get(releaseId) | ||
This endpoint fetches the provided release. The `releaseId` is the release sid. | ||
#### create(requestObject) | ||
This endpoint creates a new release. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42784
136