@epilot/message-client 0.0.2 → 1.0.0
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.
- package/README.md +40 -40
- package/dist/client.d.ts +1 -1
- package/dist/client.js +13 -13
- package/dist/definition.d.ts +3 -3
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +13 -13
- package/dist/openapi.d.ts +318 -37
- package/dist/openapi.json +4861 -3942
- package/package.json +58 -58
- package/tsconfig.json +23 -23
- package/package-lock.json +0 -8340
package/README.md
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# `@epilot/message-client`
|
|
2
|
-
|
|
3
|
-
API Client for epilot Message API.
|
|
4
|
-
|
|
5
|
-
Uses [`openapi-client-axios`](https://github.com/anttiviljami/openapi-client-axios)
|
|
6
|
-
|
|
7
|
-
## Getting Started
|
|
8
|
-
|
|
9
|
-
Install the package:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install --save-dev @epilot/message-client
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Import the package:
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import { getClient } from '@epilot/message-client';
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Use the client:
|
|
22
|
-
```typescript
|
|
23
|
-
// get typed client
|
|
24
|
-
const client = await getClient();
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## BaseURL & Authorization
|
|
28
|
-
|
|
29
|
-
To pass an authorization header and set up the API url, you can use axios
|
|
30
|
-
defaults:
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
const client = getClient();
|
|
34
|
-
client.defaults.baseURL = config.ENTITY_API_URL;
|
|
35
|
-
client.defaults.headers['authorization'] = `Bearer ${token}`;
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## API Docs:
|
|
39
|
-
|
|
40
|
-
https://docs.api.epilot.io/
|
|
1
|
+
# `@epilot/message-client`
|
|
2
|
+
|
|
3
|
+
API Client for epilot Message API.
|
|
4
|
+
|
|
5
|
+
Uses [`openapi-client-axios`](https://github.com/anttiviljami/openapi-client-axios)
|
|
6
|
+
|
|
7
|
+
## Getting Started
|
|
8
|
+
|
|
9
|
+
Install the package:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install --save-dev @epilot/message-client
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Import the package:
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { getClient } from '@epilot/message-client';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Use the client:
|
|
22
|
+
```typescript
|
|
23
|
+
// get typed client
|
|
24
|
+
const client = await getClient();
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## BaseURL & Authorization
|
|
28
|
+
|
|
29
|
+
To pass an authorization header and set up the API url, you can use axios
|
|
30
|
+
defaults:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
const client = getClient();
|
|
34
|
+
client.defaults.baseURL = config.ENTITY_API_URL;
|
|
35
|
+
client.defaults.headers['authorization'] = `Bearer ${token}`;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## API Docs:
|
|
39
|
+
|
|
40
|
+
https://docs.api.epilot.io/
|
package/dist/client.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getClient: () => import("openapi-client-axios").OpenAPIClient<import("./openapi").OperationMethods, import("./openapi").PathsDictionary>;
|
|
1
|
+
export declare const getClient: () => import("openapi-client-axios").OpenAPIClient<import("./openapi").OperationMethods, import("./openapi").PathsDictionary>;
|
package/dist/client.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getClient = void 0;
|
|
7
|
-
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
|
|
8
|
-
var definition_1 = __importDefault(require("./definition"));
|
|
9
|
-
var getClient = function () {
|
|
10
|
-
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
|
|
11
|
-
return api.initSync();
|
|
12
|
-
};
|
|
13
|
-
exports.getClient = getClient;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getClient = void 0;
|
|
7
|
+
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
|
|
8
|
+
var definition_1 = __importDefault(require("./definition"));
|
|
9
|
+
var getClient = function () {
|
|
10
|
+
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
|
|
11
|
+
return api.initSync();
|
|
12
|
+
};
|
|
13
|
+
exports.getClient = getClient;
|
|
14
14
|
//# sourceMappingURL=client.js.map
|
package/dist/definition.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Document } from 'openapi-client-axios';
|
|
2
|
-
declare const _default: Document;
|
|
3
|
-
export default _default;
|
|
1
|
+
import type { Document } from 'openapi-client-axios';
|
|
2
|
+
declare const _default: Document;
|
|
3
|
+
export default _default;
|