@epilot/entity-client 3.0.11 → 3.0.14

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/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "@epilot/entity-client",
3
- "version": "3.0.11",
4
- "description": "JavaScript client library for the epilot Core Entity API",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "test": "jest",
9
- "typescript": "tsc",
10
- "bundle-definition": "webpack",
11
- "openapi": "openapi read --json ../lambda/ApiHandlerFunction/openapi.yml > src/openapi.json",
12
- "typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ../lambda/ApiHandlerFunction/openapi.yml >> src/openapi.d.ts",
13
- "build": "npm run openapi && npm run typegen && npm run typescript && npm run bundle-definition",
14
- "eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml",
15
- "prepublishOnly": "npm run build",
16
- "release-alpha": "npm version prerelease --preid alpha"
17
- },
18
- "files": [
19
- "*.js",
20
- "*.d.ts",
21
- "**/*.json",
22
- "**/*.js",
23
- "**/*.d.ts",
24
- "!*.test.*",
25
- "!**/*.test.*",
26
- "!node_modules",
27
- "!src",
28
- "!src/**",
29
- "!*.config.js"
30
- ],
31
- "keywords": [],
32
- "author": "epilot GmbH",
33
- "license": "UNLICENSED",
34
- "peerDependencies": {
35
- "axios": "^0.25.0"
36
- },
37
- "dependencies": {
38
- "@dazn/lambda-powertools-correlation-ids": "^1.28.1",
39
- "buffer": "^6.0.3",
40
- "https-browserify": "^1.0.0",
41
- "openapi-client-axios": "^5.1.1",
42
- "stream-http": "^3.1.1",
43
- "url": "^0.11.0",
44
- "util": "^0.12.3"
45
- },
46
- "devDependencies": {
47
- "@types/jest": "^26.0.20",
48
- "axios": "^0.25.0",
49
- "copy-webpack-plugin": "^7.0.0",
50
- "jest": "^26.6.3",
51
- "json-loader": "^0.5.7",
52
- "openapi-client-axios-typegen": "^5.0.1",
53
- "openapicmd": "^1.13.3",
54
- "ts-jest": "^26.5.0",
55
- "ts-loader": "^8.0.14",
56
- "ts-node": "^9.1.1",
57
- "typescript": "^4.1.3",
58
- "webpack": "^5.18.0",
59
- "webpack-cli": "^4.4.0"
60
- }
61
- }
1
+ {
2
+ "name": "@epilot/entity-client",
3
+ "version": "3.0.14",
4
+ "description": "JavaScript client library for the epilot Core Entity API",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "test": "jest",
9
+ "typescript": "tsc",
10
+ "bundle-definition": "webpack",
11
+ "openapi": "openapi read --json ../lambda/ApiHandlerFunction/openapi.yml > src/openapi.json",
12
+ "typegen": "echo /* eslint-disable */ > src/openapi.d.ts && typegen ../lambda/ApiHandlerFunction/openapi.yml >> src/openapi.d.ts",
13
+ "build": "npm run openapi && npm run typegen && npm run typescript && npm run bundle-definition",
14
+ "eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml",
15
+ "prepublishOnly": "npm run build",
16
+ "release-alpha": "npm version prerelease --preid alpha"
17
+ },
18
+ "files": [
19
+ "*.js",
20
+ "*.d.ts",
21
+ "**/*.json",
22
+ "**/*.js",
23
+ "**/*.d.ts",
24
+ "!*.test.*",
25
+ "!**/*.test.*",
26
+ "!node_modules",
27
+ "!src",
28
+ "!src/**",
29
+ "!*.config.js"
30
+ ],
31
+ "keywords": [],
32
+ "author": "epilot GmbH",
33
+ "license": "UNLICENSED",
34
+ "peerDependencies": {
35
+ "axios": "^0.25.0"
36
+ },
37
+ "dependencies": {
38
+ "@dazn/lambda-powertools-correlation-ids": "^1.28.1",
39
+ "buffer": "^6.0.3",
40
+ "https-browserify": "^1.0.0",
41
+ "openapi-client-axios": "^5.1.1",
42
+ "stream-http": "^3.1.1",
43
+ "url": "^0.11.0",
44
+ "util": "^0.12.3"
45
+ },
46
+ "devDependencies": {
47
+ "@types/jest": "^26.0.20",
48
+ "axios": "^0.25.0",
49
+ "copy-webpack-plugin": "^7.0.0",
50
+ "jest": "^26.6.3",
51
+ "json-loader": "^0.5.7",
52
+ "openapi-client-axios-typegen": "^5.0.1",
53
+ "openapicmd": "^1.13.3",
54
+ "ts-jest": "^26.5.0",
55
+ "ts-loader": "^8.0.14",
56
+ "ts-node": "^9.1.1",
57
+ "typescript": "^4.1.3",
58
+ "webpack": "^5.18.0",
59
+ "webpack-cli": "^4.4.0"
60
+ }
61
+ }
package/tsconfig.json CHANGED
@@ -1,23 +1,23 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- "target": "es5",
5
- "module": "commonjs",
6
- "moduleResolution": "node",
7
- "lib": ["esnext", "dom"],
8
- "experimentalDecorators": true,
9
- "emitDecoratorMetadata": true,
10
- "esModuleInterop": true,
11
- "noImplicitAny": true,
12
- "strictPropertyInitialization": false,
13
- "strictNullChecks": false,
14
- "resolveJsonModule": true,
15
- "baseUrl": ".",
16
- "rootDir": "src",
17
- "outDir": "dist",
18
- "sourceMap": true,
19
- "declaration": true
20
- },
21
- "include": ["src/**/*"],
22
- "exclude": ["**/*.test.ts"]
23
- }
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "target": "es5",
5
+ "module": "commonjs",
6
+ "moduleResolution": "node",
7
+ "lib": ["esnext", "dom"],
8
+ "experimentalDecorators": true,
9
+ "emitDecoratorMetadata": true,
10
+ "esModuleInterop": true,
11
+ "noImplicitAny": true,
12
+ "strictPropertyInitialization": false,
13
+ "strictNullChecks": false,
14
+ "resolveJsonModule": true,
15
+ "baseUrl": ".",
16
+ "rootDir": "src",
17
+ "outDir": "dist",
18
+ "sourceMap": true,
19
+ "declaration": true
20
+ },
21
+ "include": ["src/**/*"],
22
+ "exclude": ["**/*.test.ts"]
23
+ }
package/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- *.js
2
- !webpack.config.js
3
- src/openapi.json
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8GAAqE;AACrE,8EAAsD;AAEtD,4DAAsC;AAG/B,IAAM,SAAS,GAAG;IACvB,IAAM,GAAG,GAAG,IAAI,8BAAkB,CAAC,EAAE,UAAU,sBAAA,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,IAAM,SAAS,GAAG,GAAG,CAAC,QAAQ,EAAU,CAAC;IACzC,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM;QACxC,IAAM,kBAAkB,GAAG,2CAAc,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;QACtD,MAAM,CAAC,OAAO,yBACT,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,GACtB,kBAAkB,CACtB,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAdW,QAAA,SAAS,aAcpB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../src/definition.ts"],"names":[],"mappings":";;;;;AAEA,gEAAwC;AAExC,kBAAe,sBAAsB,CAAC"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,iDAA+B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-model.js","sourceRoot":"","sources":["../src/schema-model.ts"],"names":[],"mappings":";;;AAEA,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B;;;OAGG;IACH,qCAAa,CAAA;IACb,yCAAiB,CAAA;AACnB,CAAC,EAPW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAO/B"}
package/jest.config.ts DELETED
@@ -1,13 +0,0 @@
1
- import type { Config } from '@jest/types';
2
-
3
- const config: Config.InitialOptions = {
4
- preset: 'ts-jest',
5
- testEnvironment: 'node',
6
- testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
7
- testPathIgnorePatterns: ['node_modules'],
8
- coveragePathIgnorePatterns: ['__tests__', 'node_modules'],
9
- verbose: true,
10
- silent: true,
11
- };
12
-
13
- export default config;
@@ -1,19 +0,0 @@
1
- import { getClient } from './client';
2
-
3
- describe('client', () => {
4
- describe('getClient', () => {
5
- it('should inititalise and return client', async () => {
6
- const client = getClient();
7
-
8
- expect(client.api.initialized).toBe(true);
9
- });
10
-
11
- it('should have operations', async () => {
12
- const client = getClient();
13
-
14
- const operations = client.api.getOperations();
15
-
16
- expect(operations.length).toBeGreaterThan(0);
17
- });
18
- });
19
- });
package/src/client.ts DELETED
@@ -1,21 +0,0 @@
1
- import CorrelationIds from '@dazn/lambda-powertools-correlation-ids';
2
- import OpenAPIClientAxios from 'openapi-client-axios';
3
-
4
- import definition from './definition';
5
- import { Client } from './openapi';
6
-
7
- export const getClient = () => {
8
- const api = new OpenAPIClientAxios({ definition, quick: true });
9
- const apiClient = api.initSync<Client>();
10
- apiClient.interceptors.request.use((config) => {
11
- const correlationHeaders = CorrelationIds.get() || {};
12
- config.headers = {
13
- ...(config.headers || {}),
14
- ...correlationHeaders,
15
- };
16
-
17
- return config;
18
- });
19
-
20
- return apiClient;
21
- };
package/src/definition.ts DELETED
@@ -1,5 +0,0 @@
1
- import type { Document } from 'openapi-client-axios';
2
-
3
- import definition from './openapi.json';
4
-
5
- export default definition as Document;
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './client';
2
- export * from './schema-model';
3
- export type { Client, Components, Paths, PathsDictionary, OperationMethods } from './openapi';
4
- export type { OpenAPIClient, OpenAPIClientAxios, Document } from 'openapi-client-axios';