@epilot/entity-client 4.7.5 → 4.7.7
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 +30 -30
- package/dist/client.d.ts +3 -3
- package/dist/client.js +36 -36
- package/dist/definition.d.ts +3 -3
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +14 -14
- package/dist/openapi.d.ts +5232 -5117
- package/dist/openapi.json +5247 -5108
- package/dist/schema-model.d.ts +11 -11
- package/dist/schema-model.js +12 -12
- package/package.json +2 -2
- package/tsconfig.json +23 -23
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# @epilot/entity-client
|
|
2
|
-
|
|
3
|
-
[](https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI)
|
|
4
|
-
[](https://www.npmjs.com/package/@epilot/entity-client)
|
|
5
|
-
[](https://bundlephobia.com/package/@epilot/entity-client)
|
|
6
|
-
[](https://github.com/epilot-dev/sdk-js/blob/main/LICENSE)
|
|
7
|
-
|
|
8
|
-
Client library for epilot [Entity API](https://docs.epilot.io/api/entity)
|
|
9
|
-
|
|
10
|
-
Uses [`openapi-client-axios`](https://github.com/anttiviljami/openapi-client-axios)
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install --save @epilot/entity-client
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
19
|
-
|
|
20
|
-
```typescript
|
|
21
|
-
import { getClient } from '@epilot/entity-client';
|
|
22
|
-
const entityClient = getClient();
|
|
23
|
-
|
|
24
|
-
const createResponse = await entityClient.createEntity({ slug: 'contact' }, { first_name: 'Example', last_name: 'Entity' });
|
|
25
|
-
const getResponse = await entityClient.getEntity({ slug: 'contact', id: createResponse.data._id });
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Documentation
|
|
29
|
-
|
|
30
|
-
https://docs.epilot.io/docs/entities/entity-api
|
|
1
|
+
# @epilot/entity-client
|
|
2
|
+
|
|
3
|
+
[](https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI)
|
|
4
|
+
[](https://www.npmjs.com/package/@epilot/entity-client)
|
|
5
|
+
[](https://bundlephobia.com/package/@epilot/entity-client)
|
|
6
|
+
[](https://github.com/epilot-dev/sdk-js/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
Client library for epilot [Entity API](https://docs.epilot.io/api/entity)
|
|
9
|
+
|
|
10
|
+
Uses [`openapi-client-axios`](https://github.com/anttiviljami/openapi-client-axios)
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install --save @epilot/entity-client
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { getClient } from '@epilot/entity-client';
|
|
22
|
+
const entityClient = getClient();
|
|
23
|
+
|
|
24
|
+
const createResponse = await entityClient.createEntity({ slug: 'contact' }, { first_name: 'Example', last_name: 'Entity' });
|
|
25
|
+
const getResponse = await entityClient.getEntity({ slug: 'contact', id: createResponse.data._id });
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Documentation
|
|
29
|
+
|
|
30
|
+
https://docs.epilot.io/docs/entities/entity-api
|
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Client } from './openapi';
|
|
2
|
-
export declare const getClient: () => Client;
|
|
3
|
-
export declare const createClient: () => Client;
|
|
1
|
+
import { Client } from './openapi';
|
|
2
|
+
export declare const getClient: () => Client;
|
|
3
|
+
export declare const createClient: () => Client;
|
package/dist/client.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createClient = exports.getClient = void 0;
|
|
18
|
-
var lambda_powertools_correlation_ids_1 = __importDefault(require("@dazn/lambda-powertools-correlation-ids"));
|
|
19
|
-
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
|
|
20
|
-
var definition_1 = __importDefault(require("./definition"));
|
|
21
|
-
var client;
|
|
22
|
-
var getClient = function () {
|
|
23
|
-
if (!client) {
|
|
24
|
-
client = (0, exports.createClient)();
|
|
25
|
-
}
|
|
26
|
-
return client;
|
|
27
|
-
};
|
|
28
|
-
exports.getClient = getClient;
|
|
29
|
-
var createClient = function () {
|
|
30
|
-
var _a;
|
|
31
|
-
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
|
|
32
|
-
var apiClient = api.initSync();
|
|
33
|
-
apiClient.defaults.headers.common = __assign(__assign({}, ((_a = apiClient.defaults.headers.common) !== null && _a !== void 0 ? _a : {})), (lambda_powertools_correlation_ids_1.default.get() || {}));
|
|
34
|
-
return apiClient;
|
|
35
|
-
};
|
|
36
|
-
exports.createClient = createClient;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.createClient = exports.getClient = void 0;
|
|
18
|
+
var lambda_powertools_correlation_ids_1 = __importDefault(require("@dazn/lambda-powertools-correlation-ids"));
|
|
19
|
+
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
|
|
20
|
+
var definition_1 = __importDefault(require("./definition"));
|
|
21
|
+
var client;
|
|
22
|
+
var getClient = function () {
|
|
23
|
+
if (!client) {
|
|
24
|
+
client = (0, exports.createClient)();
|
|
25
|
+
}
|
|
26
|
+
return client;
|
|
27
|
+
};
|
|
28
|
+
exports.getClient = getClient;
|
|
29
|
+
var createClient = function () {
|
|
30
|
+
var _a;
|
|
31
|
+
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
|
|
32
|
+
var apiClient = api.initSync();
|
|
33
|
+
apiClient.defaults.headers.common = __assign(__assign({}, ((_a = apiClient.defaults.headers.common) !== null && _a !== void 0 ? _a : {})), (lambda_powertools_correlation_ids_1.default.get() || {}));
|
|
34
|
+
return apiClient;
|
|
35
|
+
};
|
|
36
|
+
exports.createClient = createClient;
|
|
37
37
|
//# 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;
|