@epilot/automation-client
Advanced tools
Comparing version
@@ -1,3 +0,3 @@ | ||
export * from './client'; | ||
export type { Client, Components, Paths, PathsDictionary, OperationMethods } from './openapi'; | ||
export type { OpenAPIClient, OpenAPIClientAxios, Document } from 'openapi-client-axios'; | ||
export * from './client'; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
@@ -10,0 +6,0 @@ if (k2 === undefined) k2 = k; |
{ | ||
"name": "@epilot/automation-client", | ||
"version": "1.9.2", | ||
"description": "API Client for epilot automation API", | ||
"version": "1.9.3", | ||
"description": "Client library for epilot automation API", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"author": "epilot GmbH", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/epilot-dev/sdk-js.git", | ||
"directory": "clients/automation-client" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/epilot-dev/sdk-js/issues" | ||
}, | ||
"homepage": "https://github.com/epilot-dev/sdk-js/tree/main/clients/automation-client#readme", | ||
"keywords": [ | ||
"epilot", | ||
"sdk", | ||
"automation" | ||
], | ||
"scripts": { | ||
"test": "jest --clearCache", | ||
"test": "jest", | ||
"typescript": "tsc", | ||
"bundle-definition": "webpack", | ||
"openapi": "openapi read --json --dereference --bundle ../lambda/ApiHandlerFunction/openapi.yml > src/openapi.json", | ||
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ../lambda/ApiHandlerFunction/openapi.yml >> src/openapi.d.ts", | ||
"build": "npm run openapi && npm run typegen && npm run typescript && npm run bundle-definition", | ||
"eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml", | ||
"prepublishOnly": "npm run build" | ||
"openapi": "../../scripts/update-openapi.sh https://docs.api.epilot.io/automation.yaml", | ||
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts", | ||
"build": "tsc && npm run bundle-definition", | ||
"build:watch": "npm run build && tsc -w", | ||
"prepublishOnly": "npm run typegen && npm run build", | ||
"lint": "../../node_modules/eslint/bin/eslint.js src" | ||
}, | ||
@@ -22,2 +39,3 @@ "files": [ | ||
"**/*.d.ts", | ||
"**/*.json", | ||
"!*.test.*", | ||
@@ -27,7 +45,5 @@ "!**/*.test.*", | ||
"!src", | ||
"!src/**", | ||
"!*.config.js" | ||
], | ||
"keywords": [], | ||
"author": "epilot GmbH", | ||
"license": "UNLICENSED", | ||
"peerDependencies": { | ||
@@ -39,3 +55,3 @@ "axios": "^0.25.0" | ||
"https-browserify": "^1.0.0", | ||
"openapi-client-axios": "^5.1.2", | ||
"openapi-client-axios": "^5.1.1", | ||
"stream-http": "^3.1.1", | ||
@@ -46,10 +62,10 @@ "url": "^0.11.0", | ||
"devDependencies": { | ||
"@types/jest": "^28.1.1", | ||
"@types/jest": "^26.0.20", | ||
"axios": "^0.25.0", | ||
"copy-webpack-plugin": "^7.0.0", | ||
"jest": "^28.1.1", | ||
"jest": "^26.6.3", | ||
"json-loader": "^0.5.7", | ||
"openapi-client-axios-typegen": "^5.0.2", | ||
"openapicmd": "^1.6.2", | ||
"ts-jest": "^28.0.4", | ||
"openapi-client-axios-typegen": "^5.0.1", | ||
"openapicmd": "^1.13.3", | ||
"ts-jest": "^26.5.0", | ||
"ts-loader": "^8.0.14", | ||
@@ -56,0 +72,0 @@ "ts-node": "^9.1.1", |
@@ -1,43 +0,31 @@ | ||
# `@epilot/automation-client` | ||
# @epilot/automation-client | ||
API Client for epilot automation API. | ||
[](https://github.com/epilot-dev/sdk-js/actions?query=automation%3ACI) | ||
[](https://www.npmjs.com/package/@epilot/automation-client) | ||
[](https://bundlephobia.com/package/@epilot/automation-client) | ||
[](https://github.com/epilot-dev/sdk-js/blob/main/LICENSE) | ||
Client library for epilot [Workflow API](https://docs.epilot.io/api/automation) | ||
Uses [`openapi-client-axios`](https://github.com/anttiviljami/openapi-client-axios) | ||
## Getting Started | ||
## Installation | ||
Install the package: | ||
```bash | ||
npm install --save-dev @epilot/automation-client | ||
npm install --save @epilot/automation-client | ||
``` | ||
Import the package: | ||
## Usage | ||
```typescript | ||
import { getClient } from '@epilot/automation-client'; | ||
``` | ||
import { getClient } from "@epilot/automation-client"; | ||
Use the client: | ||
```typescript | ||
// get typed client | ||
const client = await getClient(); | ||
// call an operation | ||
const res = await client.testS3(); | ||
const automationClient = getClient(); | ||
const res = await automationClient.searchFlows(null, { | ||
schema: "mySchema", | ||
}); | ||
``` | ||
## BaseURL & Authorization | ||
## Documentation | ||
To pass an authorization header and set up the API url, you can use axios | ||
defaults: | ||
```typescript | ||
const client = getClient(); | ||
client.defaults.baseURL = config.API_URL; | ||
client.defaults.headers['authorization'] = `Bearer ${token}`; | ||
``` | ||
## API Docs: | ||
https://docs.api.epilot.io/ | ||
https://docs.epilot.io/docs/automation/intro |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
11
10%0
-100%0
-100%3819
7.15%0
-100%0
-100%0
-100%169953
-75.23%32
-27.27%1
Infinity%Updated