@payfit/audit-log 1.0.5 → 1.0.6
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/CHANGELOG.md +7 -3
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/transport/generated/api/default-api.d.ts +4 -4
- package/dist/transport/generated/api/default-api.js +29 -16
- package/dist/transport/generated/api/default-api.js.map +1 -1
- package/dist/transport/generated/api.js +11 -4
- package/dist/transport/generated/api.js.map +1 -1
- package/dist/transport/generated/base.js +2 -1
- package/dist/transport/generated/base.js.map +1 -1
- package/dist/transport/generated/configuration.js +1 -0
- package/dist/transport/generated/configuration.js.map +1 -1
- package/dist/transport/generated/index.js +12 -5
- package/dist/transport/generated/index.js.map +1 -1
- package/dist/transport/generated/model/index.js +11 -0
- package/dist/transport/generated/model/index.js.map +1 -1
- package/dist/transport/implementation.js +2 -1
- package/dist/transport/implementation.js.map +1 -1
- package/openapitools.json +6 -0
- package/package.json +15 -14
- package/playground/index.ts +1 -1
- package/src/transport/generated/api/default-api.ts +9 -9
- package/src/transport/generated/base.ts +1 -1
- package/src/transport/implementation.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
## 1.0.5 (2020/06/03)
|
|
2
|
+
|
|
3
|
+
- Fix an error with audit log timestamp format (#37)
|
|
4
|
+
|
|
1
5
|
## 1.0.4 (2020/04/02)
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
- Better error handling (#18)
|
|
8
|
+
- Use TS 3.7 (#18)
|
|
9
|
+
- Add individualId to scope (#18)
|
|
6
10
|
|
|
7
11
|
## 1.0.3 (2020/04/01)
|
|
8
12
|
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.AuditLogger = void 0;
|
|
23
24
|
const uuid_1 = require("uuid");
|
|
24
25
|
const implementation_1 = require("./transport/implementation");
|
|
25
26
|
class AuditLogger {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAmC;AAEnC,+DAAsD;AAwGtD,MAAa,WAAW;IAGtB,YAAsB,MAAkC;QAAlC,WAAM,GAAN,MAAM,CAA4B;QACtD,IAAI,CAAC,SAAS,GAAG,IAAI,0BAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC/C,CAAC;IAEK,GAAG,CAAC,EAA0C;YAA1C,EAAE,KAAK,EAAE,OAAO,OAA0B,EAArB,IAAI,cAAzB,oBAA2B,CAAF;;YACjC,MAAM,IAAI,GAAG,SAAM,EAAE,CAAA;YACrB,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAA;YAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;YAE/C,MAAM,GAAG,+DACJ,IAAI,GACJ,OAAO,KACV,OAAO,EACP,EAAE,EAAE,IAAI,EACR,WAAW;gBACX,SAAS,KACN,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC,CACxB,CAAA;YAED,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;KACjC;CACF;AAxBD,kCAwBC"}
|
|
@@ -25,7 +25,7 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
|
|
|
25
25
|
* @param {*} [options] Override http request option.
|
|
26
26
|
* @throws {RequiredError}
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
logPost: (inlineObject: InlineObject, options?: any) => Promise<RequestArgs>;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* DefaultApi - functional programming interface
|
|
@@ -39,7 +39,7 @@ export declare const DefaultApiFp: (configuration?: Configuration | undefined) =
|
|
|
39
39
|
* @param {*} [options] Override http request option.
|
|
40
40
|
* @throws {RequiredError}
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
logPost(inlineObject: InlineObject, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<void>>;
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
45
|
* DefaultApi - factory interface
|
|
@@ -53,7 +53,7 @@ export declare const DefaultApiFactory: (configuration?: Configuration | undefin
|
|
|
53
53
|
* @param {*} [options] Override http request option.
|
|
54
54
|
* @throws {RequiredError}
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
logPost(inlineObject: InlineObject, options?: any): AxiosPromise<void>;
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
59
|
* DefaultApi - object-oriented interface
|
|
@@ -70,5 +70,5 @@ export declare class DefaultApi extends BaseAPI {
|
|
|
70
70
|
* @throws {RequiredError}
|
|
71
71
|
* @memberof DefaultApi
|
|
72
72
|
*/
|
|
73
|
-
|
|
73
|
+
logPost(inlineObject: InlineObject, options?: any): Promise<import("axios").AxiosResponse<void>>;
|
|
74
74
|
}
|
|
@@ -11,6 +11,25 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
14
33
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
34
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
35
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -20,17 +39,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
20
39
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
40
|
});
|
|
22
41
|
};
|
|
23
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
|
-
if (mod && mod.__esModule) return mod;
|
|
25
|
-
var result = {};
|
|
26
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
27
|
-
result["default"] = mod;
|
|
28
|
-
return result;
|
|
29
|
-
};
|
|
30
42
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
43
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
44
|
};
|
|
33
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = void 0;
|
|
34
47
|
const globalImportUrl = __importStar(require("url"));
|
|
35
48
|
const axios_1 = __importDefault(require("axios"));
|
|
36
49
|
// Some imports not used depending on template conditions
|
|
@@ -49,12 +62,12 @@ exports.DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
49
62
|
* @param {*} [options] Override http request option.
|
|
50
63
|
* @throws {RequiredError}
|
|
51
64
|
*/
|
|
52
|
-
|
|
65
|
+
logPost: (inlineObject, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
53
66
|
// verify required parameter 'inlineObject' is not null or undefined
|
|
54
67
|
if (inlineObject === null || inlineObject === undefined) {
|
|
55
|
-
throw new base_1.RequiredError('inlineObject', 'Required parameter inlineObject was null or undefined when calling
|
|
68
|
+
throw new base_1.RequiredError('inlineObject', 'Required parameter inlineObject was null or undefined when calling logPost.');
|
|
56
69
|
}
|
|
57
|
-
const localVarPath = `/
|
|
70
|
+
const localVarPath = `/log`;
|
|
58
71
|
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
59
72
|
let baseOptions;
|
|
60
73
|
if (configuration) {
|
|
@@ -91,9 +104,9 @@ exports.DefaultApiFp = function (configuration) {
|
|
|
91
104
|
* @param {*} [options] Override http request option.
|
|
92
105
|
* @throws {RequiredError}
|
|
93
106
|
*/
|
|
94
|
-
|
|
107
|
+
logPost(inlineObject, options) {
|
|
95
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
const localVarAxiosArgs = yield exports.DefaultApiAxiosParamCreator(configuration).
|
|
109
|
+
const localVarAxiosArgs = yield exports.DefaultApiAxiosParamCreator(configuration).logPost(inlineObject, options);
|
|
97
110
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
98
111
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
99
112
|
return axios.request(axiosRequestArgs);
|
|
@@ -115,8 +128,8 @@ exports.DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
115
128
|
* @param {*} [options] Override http request option.
|
|
116
129
|
* @throws {RequiredError}
|
|
117
130
|
*/
|
|
118
|
-
|
|
119
|
-
return exports.DefaultApiFp(configuration).
|
|
131
|
+
logPost(inlineObject, options) {
|
|
132
|
+
return exports.DefaultApiFp(configuration).logPost(inlineObject, options).then((request) => request(axios, basePath));
|
|
120
133
|
},
|
|
121
134
|
};
|
|
122
135
|
};
|
|
@@ -135,8 +148,8 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
135
148
|
* @throws {RequiredError}
|
|
136
149
|
* @memberof DefaultApi
|
|
137
150
|
*/
|
|
138
|
-
|
|
139
|
-
return exports.DefaultApiFp(this.configuration).
|
|
151
|
+
logPost(inlineObject, options) {
|
|
152
|
+
return exports.DefaultApiFp(this.configuration).logPost(inlineObject, options).then((request) => request(this.axios, this.basePath));
|
|
140
153
|
}
|
|
141
154
|
}
|
|
142
155
|
exports.DefaultApi = DefaultApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-api.js","sourceRoot":"","sources":["../../../../src/transport/generated/api/default-api.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG
|
|
1
|
+
{"version":3,"file":"default-api.js","sourceRoot":"","sources":["../../../../src/transport/generated/api/default-api.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,qDAAuC;AACvC,kDAAiE;AAEjE,yDAAyD;AACzD,aAAa;AACb,kCAA6F;AAG7F;;;GAGG;AACU,QAAA,2BAA2B,GAAG,UAAU,aAA6B;IAC9E,OAAO;QACH;;;;;;WAMG;QACH,OAAO,EAAE,CAAO,YAA0B,EAAE,UAAe,EAAE,EAAwB,EAAE;YACnF,oEAAoE;YACpE,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,SAAS,EAAE;gBACrD,MAAM,IAAI,oBAAa,CAAC,cAAc,EAAC,6EAA6E,CAAC,CAAC;aACzH;YACD,MAAM,YAAY,GAAG,MAAM,CAAC;YAC5B,MAAM,cAAc,GAA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bD,gCAaC"}
|
|
@@ -11,9 +11,16 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
}
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
23
|
+
};
|
|
17
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
25
|
+
__exportStar(require("./api/default-api"), exports);
|
|
19
26
|
//# sourceMappingURL=api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/transport/generated/api.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/transport/generated/api.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG;;;;;;;;;;;;AAIH,oDAAkC"}
|
|
@@ -15,10 +15,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
18
19
|
// Some imports not used depending on template conditions
|
|
19
20
|
// @ts-ignore
|
|
20
21
|
const axios_1 = __importDefault(require("axios"));
|
|
21
|
-
exports.BASE_PATH = "http://localhost:
|
|
22
|
+
exports.BASE_PATH = "http://localhost:8090/v1".replace(/\/+$/, "");
|
|
22
23
|
/**
|
|
23
24
|
*
|
|
24
25
|
* @export
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/transport/generated/base.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/transport/generated/base.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG;;;;;;AAIH,yDAAyD;AACzD,aAAa;AACb,kDAAiE;AAEpD,QAAA,SAAS,GAAG,0BAA0B,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAExE;;;GAGG;AACU,QAAA,kBAAkB,GAAG;IAC9B,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,GAAG;CACb,CAAC;AAYF;;;;GAIG;AACH,MAAa,OAAO;IAGhB,YAAY,aAA6B,EAAY,WAAmB,iBAAS,EAAY,QAAuB,eAAW;QAA1E,aAAQ,GAAR,QAAQ,CAAoB;QAAY,UAAK,GAAL,KAAK,CAA6B;QAC3H,IAAI,aAAa,EAAE;YACf,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;YACnC,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;SAC3D;IACL,CAAC;CACJ;AATD,0BASC;AAAA,CAAC;AAEF;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,KAAK;IAEpC,YAAmB,KAAa,EAAE,GAAY;QAC1C,KAAK,CAAC,GAAG,CAAC,CAAC;QADI,UAAK,GAAL,KAAK,CAAQ;QADhC,SAAI,GAAoB,eAAe,CAAC;IAGxC,CAAC;CACJ;AALD,sCAKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/transport/generated/configuration.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/transport/generated/configuration.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG;;;AAYH,MAAa,aAAa;IA2CtB,YAAY,QAAiC,EAAE;QAC3C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IACzC,CAAC;CACJ;AAnDD,sCAmDC"}
|
|
@@ -11,10 +11,17 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
}
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
23
|
+
};
|
|
17
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
__exportStar(require("./api"), exports);
|
|
26
|
+
__exportStar(require("./configuration"), exports);
|
|
20
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/transport/generated/index.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/transport/generated/index.ts"],"names":[],"mappings":";AAAA,iBAAiB;AACjB;;;;;;;;;;GAUG;;;;;;;;;;;;AAGH,wCAAsB;AACtB,kDAAgC"}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./inline-object"), exports);
|
|
3
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/transport/generated/model/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/transport/generated/model/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC"}
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Transport = void 0;
|
|
12
13
|
const generated_1 = require("./generated");
|
|
13
14
|
class Transport {
|
|
14
15
|
constructor(apiUrl) {
|
|
@@ -21,7 +22,7 @@ class Transport {
|
|
|
21
22
|
var _a;
|
|
22
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
24
|
try {
|
|
24
|
-
yield this.api.
|
|
25
|
+
yield this.api.logPost(auditLogData);
|
|
25
26
|
}
|
|
26
27
|
catch (err) {
|
|
27
28
|
if (!err.isAxiosError) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../src/transport/implementation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../src/transport/implementation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAwC;AAKxC,MAAa,SAAS;IAGpB,YAAsB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAClC,IAAI,CAAC,GAAG,GAAG,IAAI,sBAAU,CAAC;YACxB,QAAQ,EAAE,IAAI,CAAC,MAAM;SACtB,CAAC,CAAA;IACJ,CAAC;IAEK,MAAM,CAAC,YAA0B;;;YACrC,IAAI;gBACF,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;aACrC;YAAC,OAAO,GAAG,EAAE;gBACZ,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE;oBACrB,MAAM,GAAG,CAAA;iBACV;gBAED,MAAM,OAAO,GAAG,OAAA,GAAG,CAAC,QAAQ,0CAAE,IAAI,KAAI,GAAG,CAAC,OAAO,CAAA;gBACjD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAA;aACzB;;KACF;CACF;AArBD,8BAqBC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/audit-log",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Library to handle audit logs at Payfit",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
8
|
"type:check": "tsc --noEmit",
|
|
9
|
-
"codegen:sdk": "openapi-generator generate -i ../pkg/broker/v1/swagger/openapi.json -g typescript-axios -o src/transport/generated -c openapi-codegen-config.yml",
|
|
9
|
+
"codegen:sdk": "openapi-generator-cli generate -i ../pkg/broker/v1/swagger/openapi.json -g typescript-axios -o src/transport/generated -c openapi-codegen-config.yml",
|
|
10
10
|
"build": "npm run codegen:sdk && rimraf dist && tsc",
|
|
11
11
|
"prepublishOnly": "npm run build",
|
|
12
12
|
"start:playground": "ts-node playground/index.ts"
|
|
@@ -14,20 +14,21 @@
|
|
|
14
14
|
"author": "",
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "0.
|
|
18
|
-
"lodash": "4.17.
|
|
19
|
-
"uuid": "7.0.
|
|
17
|
+
"axios": "^0.21.1",
|
|
18
|
+
"lodash": "^4.17.20",
|
|
19
|
+
"uuid": "^7.0.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@
|
|
23
|
-
"@types/
|
|
24
|
-
"@types/
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"ts-node
|
|
29
|
-
"
|
|
22
|
+
"@openapitools/openapi-generator-cli": "2.1.19",
|
|
23
|
+
"@types/lodash": "4.14.168",
|
|
24
|
+
"@types/node": "14.14.22",
|
|
25
|
+
"@types/uuid": "3.4.9",
|
|
26
|
+
"prettier": "2.2.1",
|
|
27
|
+
"rimraf": "3.0.2",
|
|
28
|
+
"ts-node": "9.1.1",
|
|
29
|
+
"ts-node-dev": "1.1.1",
|
|
30
|
+
"tslint": "5.20.1",
|
|
30
31
|
"tslint-config-prettier": "1.18.0",
|
|
31
|
-
"typescript": "3.
|
|
32
|
+
"typescript": "3.9.7"
|
|
32
33
|
}
|
|
33
34
|
}
|
package/playground/index.ts
CHANGED
|
@@ -33,12 +33,12 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
33
33
|
* @param {*} [options] Override http request option.
|
|
34
34
|
* @throws {RequiredError}
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
logPost: async (inlineObject: InlineObject, options: any = {}): Promise<RequestArgs> => {
|
|
37
37
|
// verify required parameter 'inlineObject' is not null or undefined
|
|
38
38
|
if (inlineObject === null || inlineObject === undefined) {
|
|
39
|
-
throw new RequiredError('inlineObject','Required parameter inlineObject was null or undefined when calling
|
|
39
|
+
throw new RequiredError('inlineObject','Required parameter inlineObject was null or undefined when calling logPost.');
|
|
40
40
|
}
|
|
41
|
-
const localVarPath = `/
|
|
41
|
+
const localVarPath = `/log`;
|
|
42
42
|
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
43
43
|
let baseOptions;
|
|
44
44
|
if (configuration) {
|
|
@@ -81,8 +81,8 @@ export const DefaultApiFp = function(configuration?: Configuration) {
|
|
|
81
81
|
* @param {*} [options] Override http request option.
|
|
82
82
|
* @throws {RequiredError}
|
|
83
83
|
*/
|
|
84
|
-
async
|
|
85
|
-
const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).
|
|
84
|
+
async logPost(inlineObject: InlineObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
85
|
+
const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).logPost(inlineObject, options);
|
|
86
86
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
87
87
|
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
88
88
|
return axios.request(axiosRequestArgs);
|
|
@@ -104,8 +104,8 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
|
|
|
104
104
|
* @param {*} [options] Override http request option.
|
|
105
105
|
* @throws {RequiredError}
|
|
106
106
|
*/
|
|
107
|
-
|
|
108
|
-
return DefaultApiFp(configuration).
|
|
107
|
+
logPost(inlineObject: InlineObject, options?: any): AxiosPromise<void> {
|
|
108
|
+
return DefaultApiFp(configuration).logPost(inlineObject, options).then((request) => request(axios, basePath));
|
|
109
109
|
},
|
|
110
110
|
};
|
|
111
111
|
};
|
|
@@ -125,8 +125,8 @@ export class DefaultApi extends BaseAPI {
|
|
|
125
125
|
* @throws {RequiredError}
|
|
126
126
|
* @memberof DefaultApi
|
|
127
127
|
*/
|
|
128
|
-
public
|
|
129
|
-
return DefaultApiFp(this.configuration).
|
|
128
|
+
public logPost(inlineObject: InlineObject, options?: any) {
|
|
129
|
+
return DefaultApiFp(this.configuration).logPost(inlineObject, options).then((request) => request(this.axios, this.basePath));
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
}
|
|
@@ -17,7 +17,7 @@ import { Configuration } from "./configuration";
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
|
19
19
|
|
|
20
|
-
export const BASE_PATH = "http://localhost:
|
|
20
|
+
export const BASE_PATH = "http://localhost:8090/v1".replace(/\/+$/, "");
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
@@ -14,8 +14,8 @@ export class Transport implements IAuditLogTransport {
|
|
|
14
14
|
|
|
15
15
|
async create(auditLogData: InlineObject) {
|
|
16
16
|
try {
|
|
17
|
-
await this.api.
|
|
18
|
-
} catch(err) {
|
|
17
|
+
await this.api.logPost(auditLogData)
|
|
18
|
+
} catch (err) {
|
|
19
19
|
if (!err.isAxiosError) {
|
|
20
20
|
throw err
|
|
21
21
|
}
|