@payfit/audit-log 2.15.1 → 2.16.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.
@@ -1,417 +0,0 @@
1
- 'use strict';
2
-
3
- var uuid = require('uuid');
4
- var globalAxios = require('axios');
5
-
6
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
-
8
- var globalAxios__default = /*#__PURE__*/_interopDefaultCompat(globalAxios);
9
-
10
- /*! *****************************************************************************
11
- Copyright (c) Microsoft Corporation.
12
-
13
- Permission to use, copy, modify, and/or distribute this software for any
14
- purpose with or without fee is hereby granted.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
17
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
19
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
20
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
21
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
- PERFORMANCE OF THIS SOFTWARE.
23
- ***************************************************************************** */
24
- /* global Reflect, Promise */
25
-
26
- var extendStatics = function(d, b) {
27
- extendStatics = Object.setPrototypeOf ||
28
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
30
- return extendStatics(d, b);
31
- };
32
-
33
- function __extends(d, b) {
34
- extendStatics(d, b);
35
- function __() { this.constructor = d; }
36
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37
- }
38
-
39
- var __assign = function() {
40
- __assign = Object.assign || function __assign(t) {
41
- for (var s, i = 1, n = arguments.length; i < n; i++) {
42
- s = arguments[i];
43
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
44
- }
45
- return t;
46
- };
47
- return __assign.apply(this, arguments);
48
- };
49
-
50
- function __rest(s, e) {
51
- var t = {};
52
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
53
- t[p] = s[p];
54
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
55
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
56
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
57
- t[p[i]] = s[p[i]];
58
- }
59
- return t;
60
- }
61
-
62
- function __awaiter(thisArg, _arguments, P, generator) {
63
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
64
- return new (P || (P = Promise))(function (resolve, reject) {
65
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
66
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
67
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
68
- step((generator = generator.apply(thisArg, _arguments || [])).next());
69
- });
70
- }
71
-
72
- function __generator(thisArg, body) {
73
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
74
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
75
- function verb(n) { return function (v) { return step([n, v]); }; }
76
- function step(op) {
77
- if (f) throw new TypeError("Generator is already executing.");
78
- while (_) try {
79
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
80
- if (y = 0, t) op = [op[0] & 2, t.value];
81
- switch (op[0]) {
82
- case 0: case 1: t = op; break;
83
- case 4: _.label++; return { value: op[1], done: false };
84
- case 5: _.label++; y = op[1]; op = [0]; continue;
85
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
86
- default:
87
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
88
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
89
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
90
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
91
- if (t[2]) _.ops.pop();
92
- _.trys.pop(); continue;
93
- }
94
- op = body.call(thisArg, _);
95
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
96
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
97
- }
98
- }
99
-
100
- function __values(o) {
101
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
102
- if (m) return m.call(o);
103
- if (o && typeof o.length === "number") return {
104
- next: function () {
105
- if (o && i >= o.length) o = void 0;
106
- return { value: o && o[i++], done: !o };
107
- }
108
- };
109
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
110
- }
111
-
112
- /* tslint:disable */
113
- var BASE_PATH = "http://localhost:8090".replace(/\/+$/, "");
114
- /**
115
- *
116
- * @export
117
- * @class BaseAPI
118
- */
119
- var BaseAPI = /** @class */ (function () {
120
- function BaseAPI(configuration, basePath, axios) {
121
- if (basePath === void 0) { basePath = BASE_PATH; }
122
- if (axios === void 0) { axios = globalAxios__default.default; }
123
- this.basePath = basePath;
124
- this.axios = axios;
125
- if (configuration) {
126
- this.configuration = configuration;
127
- this.basePath = configuration.basePath || this.basePath;
128
- }
129
- }
130
- return BaseAPI;
131
- }());
132
- /**
133
- *
134
- * @export
135
- * @class RequiredError
136
- * @extends {Error}
137
- */
138
- var RequiredError = /** @class */ (function (_super) {
139
- __extends(RequiredError, _super);
140
- function RequiredError(field, msg) {
141
- var _this = _super.call(this, msg) || this;
142
- _this.field = field;
143
- _this.name = "RequiredError";
144
- return _this;
145
- }
146
- return RequiredError;
147
- }(Error));
148
-
149
- /* tslint:disable */
150
- /**
151
- *
152
- * @export
153
- */
154
- var DUMMY_BASE_URL = 'https://example.com';
155
- /**
156
- *
157
- * @throws {RequiredError}
158
- * @export
159
- */
160
- var assertParamExists = function (functionName, paramName, paramValue) {
161
- if (paramValue === null || paramValue === undefined) {
162
- throw new RequiredError(paramName, "Required parameter ".concat(paramName, " was null or undefined when calling ").concat(functionName, "."));
163
- }
164
- };
165
- /**
166
- *
167
- * @export
168
- */
169
- var setSearchParams = function (url) {
170
- var e_1, _a, e_2, _b;
171
- var objects = [];
172
- for (var _i = 1; _i < arguments.length; _i++) {
173
- objects[_i - 1] = arguments[_i];
174
- }
175
- var searchParams = new URLSearchParams(url.search);
176
- try {
177
- for (var objects_1 = __values(objects), objects_1_1 = objects_1.next(); !objects_1_1.done; objects_1_1 = objects_1.next()) {
178
- var object = objects_1_1.value;
179
- for (var key in object) {
180
- if (Array.isArray(object[key])) {
181
- searchParams["delete"](key);
182
- try {
183
- for (var _c = (e_2 = void 0, __values(object[key])), _d = _c.next(); !_d.done; _d = _c.next()) {
184
- var item = _d.value;
185
- searchParams.append(key, item);
186
- }
187
- }
188
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
189
- finally {
190
- try {
191
- if (_d && !_d.done && (_b = _c["return"])) _b.call(_c);
192
- }
193
- finally { if (e_2) throw e_2.error; }
194
- }
195
- }
196
- else {
197
- searchParams.set(key, object[key]);
198
- }
199
- }
200
- }
201
- }
202
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
203
- finally {
204
- try {
205
- if (objects_1_1 && !objects_1_1.done && (_a = objects_1["return"])) _a.call(objects_1);
206
- }
207
- finally { if (e_1) throw e_1.error; }
208
- }
209
- url.search = searchParams.toString();
210
- };
211
- /**
212
- *
213
- * @export
214
- */
215
- var serializeDataIfNeeded = function (value, requestOptions, configuration) {
216
- var nonString = typeof value !== 'string';
217
- var needsSerialization = nonString && configuration && configuration.isJsonMime
218
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
219
- : nonString;
220
- return needsSerialization
221
- ? JSON.stringify(value !== undefined ? value : {})
222
- : (value || "");
223
- };
224
- /**
225
- *
226
- * @export
227
- */
228
- var toPathString = function (url) {
229
- return url.pathname + url.search + url.hash;
230
- };
231
- /**
232
- *
233
- * @export
234
- */
235
- var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
236
- return function (axios, basePath) {
237
- if (axios === void 0) { axios = globalAxios; }
238
- if (basePath === void 0) { basePath = BASE_PATH; }
239
- var axiosRequestArgs = __assign(__assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
240
- return axios.request(axiosRequestArgs);
241
- };
242
- };
243
-
244
- /* tslint:disable */
245
- /**
246
- * DefaultApi - axios parameter creator
247
- * @export
248
- */
249
- var DefaultApiAxiosParamCreator = function (configuration) {
250
- var _this = this;
251
- return {
252
- /**
253
- *
254
- * @summary Creates Audit Log event
255
- * @param {InlineObject} inlineObject
256
- * @param {*} [options] Override http request option.
257
- * @throws {RequiredError}
258
- */
259
- v1LogPost: function (inlineObject, options) {
260
- if (options === void 0) { options = {}; }
261
- return __awaiter(_this, void 0, void 0, function () {
262
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
263
- return __generator(this, function (_a) {
264
- // verify required parameter 'inlineObject' is not null or undefined
265
- assertParamExists('v1LogPost', 'inlineObject', inlineObject);
266
- localVarPath = "/v1/log";
267
- localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
268
- if (configuration) {
269
- baseOptions = configuration.baseOptions;
270
- }
271
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
272
- localVarHeaderParameter = {};
273
- localVarQueryParameter = {};
274
- localVarHeaderParameter['Content-Type'] = 'application/json';
275
- setSearchParams(localVarUrlObj, localVarQueryParameter);
276
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
277
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
278
- localVarRequestOptions.data = serializeDataIfNeeded(inlineObject, localVarRequestOptions, configuration);
279
- return [2 /*return*/, {
280
- url: toPathString(localVarUrlObj),
281
- options: localVarRequestOptions
282
- }];
283
- });
284
- });
285
- }
286
- };
287
- };
288
- /**
289
- * DefaultApi - functional programming interface
290
- * @export
291
- */
292
- var DefaultApiFp = function (configuration) {
293
- var localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration);
294
- return {
295
- /**
296
- *
297
- * @summary Creates Audit Log event
298
- * @param {InlineObject} inlineObject
299
- * @param {*} [options] Override http request option.
300
- * @throws {RequiredError}
301
- */
302
- v1LogPost: function (inlineObject, options) {
303
- return __awaiter(this, void 0, void 0, function () {
304
- var localVarAxiosArgs;
305
- return __generator(this, function (_a) {
306
- switch (_a.label) {
307
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.v1LogPost(inlineObject, options)];
308
- case 1:
309
- localVarAxiosArgs = _a.sent();
310
- return [2 /*return*/, createRequestFunction(localVarAxiosArgs, globalAxios__default.default, BASE_PATH, configuration)];
311
- }
312
- });
313
- });
314
- }
315
- };
316
- };
317
- /**
318
- * DefaultApi - object-oriented interface
319
- * @export
320
- * @class DefaultApi
321
- * @extends {BaseAPI}
322
- */
323
- var DefaultApi = /** @class */ (function (_super) {
324
- __extends(DefaultApi, _super);
325
- function DefaultApi() {
326
- return _super !== null && _super.apply(this, arguments) || this;
327
- }
328
- /**
329
- *
330
- * @summary Creates Audit Log event
331
- * @param {InlineObject} inlineObject
332
- * @param {*} [options] Override http request option.
333
- * @throws {RequiredError}
334
- * @memberof DefaultApi
335
- */
336
- DefaultApi.prototype.v1LogPost = function (inlineObject, options) {
337
- var _this = this;
338
- return DefaultApiFp(this.configuration).v1LogPost(inlineObject, options).then(function (request) { return request(_this.axios, _this.basePath); });
339
- };
340
- return DefaultApi;
341
- }(BaseAPI));
342
-
343
- var isAxiosError = function (err) {
344
- return 'isAxiosError' in err && err.isAxiosError && err instanceof Error;
345
- };
346
- var Transport = /** @class */ (function () {
347
- function Transport(apiUrl) {
348
- this.apiUrl = apiUrl;
349
- this.api = new DefaultApi({
350
- basePath: this.apiUrl,
351
- isJsonMime: function (mime) {
352
- // eslint-disable-next-line security/detect-unsafe-regex
353
- var jsonMime = new RegExp(
354
- // eslint-disable-next-line no-control-regex
355
- '^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
356
- return (mime !== null &&
357
- (jsonMime.test(mime) ||
358
- mime.toLowerCase() === 'application/json-patch+json'));
359
- }
360
- });
361
- }
362
- Transport.prototype.create = function (auditLogData) {
363
- var _a;
364
- return __awaiter(this, void 0, void 0, function () {
365
- var err_1, message;
366
- return __generator(this, function (_b) {
367
- switch (_b.label) {
368
- case 0:
369
- _b.trys.push([0, 2, , 3]);
370
- return [4 /*yield*/, this.api.v1LogPost(auditLogData, { timeout: 5000 })]; // timeout in milliseconds looking at https://axios-http.com/docs/req_config
371
- case 1:
372
- _b.sent(); // timeout in milliseconds looking at https://axios-http.com/docs/req_config
373
- return [3 /*break*/, 3];
374
- case 2:
375
- err_1 = _b.sent();
376
- if (!isAxiosError(err_1)) {
377
- throw err_1;
378
- }
379
- message = ((_a = err_1.response) === null || _a === void 0 ? void 0 : _a.data) || err_1.message;
380
- throw new Error(message);
381
- case 3: return [2 /*return*/];
382
- }
383
- });
384
- });
385
- };
386
- return Transport;
387
- }());
388
-
389
- var AuditLogger = /** @class */ (function () {
390
- function AuditLogger(params) {
391
- this.params = params;
392
- this.transport = new Transport(params.apiUrl);
393
- }
394
- AuditLogger.prototype.log = function (_a) {
395
- var scope = _a.scope, account = _a.account, data = __rest(_a, ["scope", "account"]);
396
- return __awaiter(this, void 0, void 0, function () {
397
- var uuid$1, _b, environment, service, timestamp, log;
398
- return __generator(this, function (_c) {
399
- switch (_c.label) {
400
- case 0:
401
- uuid$1 = uuid.v4();
402
- _b = this.params, environment = _b.environment, service = _b.service;
403
- timestamp = Math.floor(Date.now() / 1000);
404
- log = __assign(__assign(__assign(__assign({}, data), account), { service: service, id: uuid$1, environment: environment, timestamp: timestamp }), (scope && { scope: scope }));
405
- return [4 /*yield*/, this.transport.create(log)];
406
- case 1:
407
- _c.sent();
408
- return [2 /*return*/];
409
- }
410
- });
411
- });
412
- };
413
- return AuditLogger;
414
- }());
415
-
416
- exports.AuditLogger = AuditLogger;
417
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../src/transport/generated/base.ts","../../src/transport/generated/common.ts","../../src/transport/generated/api/default-api.ts","../../src/transport/implementation.ts","../../src/index.ts"],"sourcesContent":["/* tslint:disable */\n/* eslint-disable */\n/**\n * Audit Logs\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0.0\n * Contact: damian.bursztyn@payfit.com\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport { Configuration } from \"./configuration\";\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';\n\nexport const BASE_PATH = \"http://localhost:8090\".replace(/\\/+$/, \"\");\n\n/**\n *\n * @export\n */\nexport const COLLECTION_FORMATS = {\n csv: \",\",\n ssv: \" \",\n tsv: \"\\t\",\n pipes: \"|\",\n};\n\n/**\n *\n * @export\n * @interface RequestArgs\n */\nexport interface RequestArgs {\n url: string;\n options: AxiosRequestConfig;\n}\n\n/**\n *\n * @export\n * @class BaseAPI\n */\nexport class BaseAPI {\n protected configuration: Configuration | undefined;\n\n constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {\n if (configuration) {\n this.configuration = configuration;\n this.basePath = configuration.basePath || this.basePath;\n }\n }\n};\n\n/**\n *\n * @export\n * @class RequiredError\n * @extends {Error}\n */\nexport class RequiredError extends Error {\n name: \"RequiredError\" = \"RequiredError\";\n constructor(public field: string, msg?: string) {\n super(msg);\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Audit Logs\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0.0\n * Contact: damian.bursztyn@payfit.com\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport { Configuration } from \"./configuration\";\nimport { RequiredError, RequestArgs } from \"./base\";\nimport { AxiosInstance, AxiosResponse } from 'axios';\n\n/**\n *\n * @export\n */\nexport const DUMMY_BASE_URL = 'https://example.com'\n\n/**\n *\n * @throws {RequiredError}\n * @export\n */\nexport const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {\n if (paramValue === null || paramValue === undefined) {\n throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);\n }\n}\n\n/**\n *\n * @export\n */\nexport const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {\n if (configuration && configuration.apiKey) {\n const localVarApiKeyValue = typeof configuration.apiKey === 'function'\n ? await configuration.apiKey(keyParamName)\n : await configuration.apiKey;\n object[keyParamName] = localVarApiKeyValue;\n }\n}\n\n/**\n *\n * @export\n */\nexport const setBasicAuthToObject = function (object: any, configuration?: Configuration) {\n if (configuration && (configuration.username || configuration.password)) {\n object[\"auth\"] = { username: configuration.username, password: configuration.password };\n }\n}\n\n/**\n *\n * @export\n */\nexport const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const accessToken = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken()\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + accessToken;\n }\n}\n\n/**\n *\n * @export\n */\nexport const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const localVarAccessTokenValue = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken(name, scopes)\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + localVarAccessTokenValue;\n }\n}\n\n/**\n *\n * @export\n */\nexport const setSearchParams = function (url: URL, ...objects: any[]) {\n const searchParams = new URLSearchParams(url.search);\n for (const object of objects) {\n for (const key in object) {\n if (Array.isArray(object[key])) {\n searchParams.delete(key);\n for (const item of object[key]) {\n searchParams.append(key, item);\n }\n } else {\n searchParams.set(key, object[key]);\n }\n }\n }\n url.search = searchParams.toString();\n}\n\n/**\n *\n * @export\n */\nexport const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {\n const nonString = typeof value !== 'string';\n const needsSerialization = nonString && configuration && configuration.isJsonMime\n ? configuration.isJsonMime(requestOptions.headers['Content-Type'])\n : nonString;\n return needsSerialization\n ? JSON.stringify(value !== undefined ? value : {})\n : (value || \"\");\n}\n\n/**\n *\n * @export\n */\nexport const toPathString = function (url: URL) {\n return url.pathname + url.search + url.hash\n}\n\n/**\n *\n * @export\n */\nexport const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {\n return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\n const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};\n return axios.request<T, R>(axiosRequestArgs);\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Audit Logs\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0.0\n * Contact: damian.bursztyn@payfit.com\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';\nimport { Configuration } from '../configuration';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';\n// @ts-ignore\nimport { InlineObject } from '../model';\n/**\n * DefaultApi - axios parameter creator\n * @export\n */\nexport const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {\n return {\n /**\n * \n * @summary Creates Audit Log event\n * @param {InlineObject} inlineObject \n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n v1LogPost: async (inlineObject: InlineObject, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {\n // verify required parameter 'inlineObject' is not null or undefined\n assertParamExists('v1LogPost', 'inlineObject', inlineObject)\n const localVarPath = `/v1/log`;\n // use dummy base URL string because the URL constructor only accepts absolute URLs.\n const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);\n let baseOptions;\n if (configuration) {\n baseOptions = configuration.baseOptions;\n }\n\n const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};\n const localVarHeaderParameter = {} as any;\n const localVarQueryParameter = {} as any;\n\n\n \n localVarHeaderParameter['Content-Type'] = 'application/json';\n\n setSearchParams(localVarUrlObj, localVarQueryParameter);\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\n localVarRequestOptions.data = serializeDataIfNeeded(inlineObject, localVarRequestOptions, configuration)\n\n return {\n url: toPathString(localVarUrlObj),\n options: localVarRequestOptions,\n };\n },\n }\n};\n\n/**\n * DefaultApi - functional programming interface\n * @export\n */\nexport const DefaultApiFp = function(configuration?: Configuration) {\n const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)\n return {\n /**\n * \n * @summary Creates Audit Log event\n * @param {InlineObject} inlineObject \n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n async v1LogPost(inlineObject: InlineObject, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {\n const localVarAxiosArgs = await localVarAxiosParamCreator.v1LogPost(inlineObject, options);\n return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);\n },\n }\n};\n\n/**\n * DefaultApi - factory interface\n * @export\n */\nexport const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {\n const localVarFp = DefaultApiFp(configuration)\n return {\n /**\n * \n * @summary Creates Audit Log event\n * @param {InlineObject} inlineObject \n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n v1LogPost(inlineObject: InlineObject, options?: any): AxiosPromise<void> {\n return localVarFp.v1LogPost(inlineObject, options).then((request) => request(axios, basePath));\n },\n };\n};\n\n/**\n * DefaultApi - object-oriented interface\n * @export\n * @class DefaultApi\n * @extends {BaseAPI}\n */\nexport class DefaultApi extends BaseAPI {\n /**\n * \n * @summary Creates Audit Log event\n * @param {InlineObject} inlineObject \n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n * @memberof DefaultApi\n */\n public v1LogPost(inlineObject: InlineObject, options?: AxiosRequestConfig) {\n return DefaultApiFp(this.configuration).v1LogPost(inlineObject, options).then((request) => request(this.axios, this.basePath));\n }\n}\n","import { AxiosError } from 'axios'\n\nimport { DefaultApi } from './generated'\nimport { InlineObject } from './generated/model'\nimport { IAuditLogTransport } from './interface'\n\nconst isAxiosError = (err: any): err is AxiosError =>\n 'isAxiosError' in err && err.isAxiosError && err instanceof Error\n\nexport class Transport implements IAuditLogTransport {\n private api: DefaultApi\n\n constructor(protected apiUrl: string) {\n this.api = new DefaultApi({\n basePath: this.apiUrl,\n isJsonMime(mime: string): boolean {\n // eslint-disable-next-line security/detect-unsafe-regex\n const jsonMime = new RegExp(\n // eslint-disable-next-line no-control-regex\n '^(application/json|[^;/ \\t]+/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$',\n 'i'\n )\n return (\n mime !== null &&\n (jsonMime.test(mime) ||\n mime.toLowerCase() === 'application/json-patch+json')\n )\n },\n })\n }\n\n public async create(auditLogData: InlineObject) {\n try {\n await this.api.v1LogPost(auditLogData, { timeout: 5000 }) // timeout in milliseconds looking at https://axios-http.com/docs/req_config\n } catch (err) {\n if (!isAxiosError(err)) {\n throw err\n }\n\n const message = err.response?.data || err.message\n throw new Error(message as string)\n }\n }\n}\n","import { v4 as uuidV4 } from 'uuid'\n\nimport { IAuditLogTransport } from './transport/interface'\nimport { Transport } from './transport/implementation'\n\n/**\n * The allowed Namespaces for the AuditLog\n */\nexport type AuditNamespaces =\n | 'employee'\n | 'company'\n | 'permissions'\n | 'absence'\n | 'expense'\n | 'payments'\n | 'auth'\n | 'billing'\n | 'modules'\n | 'integrations'\n | 'partnerApi'\n | 'donation'\n | 'notificationSettings'\n | 'people'\n | 'subscriptions'\n | 'organization'\n | 'declarations'\n | 'pricing'\n | 'payroll'\n | 'jetlang'\n | 'files'\n\n/**\n * The allowed targets for the AuditLog\n */\nexport type AuditTargets =\n | 'reporting'\n | 'employee'\n | 'employee.settings'\n | 'employee-request'\n | 'company'\n | 'company.billings'\n | 'company.billing'\n | 'company.variables'\n | 'company.settings'\n | 'company.emails'\n | 'company.addons'\n | 'company.plans'\n | 'company.modules'\n | 'declaration.metadata'\n | 'user.role'\n | 'user.account'\n | 'user.primaryEmail'\n | 'user.secondaryEmail'\n | 'user.locale'\n | 'user.notificationSettings'\n | 'user.mfa'\n | 'role'\n | 'team'\n | 'department'\n | 'workflow'\n | 'integration'\n | 'apiAccess'\n | 'individual'\n | 'association'\n | 'association.archived'\n | 'donation'\n | 'donation.amount'\n | 'donation.auth.partner.portal'\n | 'donation.company.onboarding'\n | 'donation.taxReceipt'\n | 'donationPayment.status'\n | 'people.document.comments'\n | 'people.document.notifications'\n | 'people.document.reactions'\n | 'people.document.status'\n | 'people.document.answers'\n | 'people.oneOne'\n | 'people.campaign'\n | 'people.assessment'\n | 'people.assessment.360details'\n | 'people.assessment.managerRequests'\n | 'people.assessment.manager'\n | 'people.assessment.answers'\n | 'people.assessment.feedbacks'\n | 'iban'\n | 'salary-payments.connect'\n | 'salary-payments.pay.url'\n | 'advance-salary-payments.pay.url'\n | 'variable'\n | 'jetlang-data'\n | 'access-logs'\n | 'event'\n | 'topic'\n | 'file'\n | 'file.presigned-url'\n | 'archive'\n | 'payslip.merge'\n\n/**\n * The allowed Events for the AuditLog\n */\nexport type AuditEvents =\n | 'create'\n | 'update'\n | 'share'\n | 'delete'\n | 'view'\n | 'sign'\n | 'signin'\n | 'signinFail'\n | 'signinAs'\n | 'logout'\n | 'updateCurrentAccount'\n | 'merge'\n | 'disable'\n | 'sendResetPasswordLink'\n | 'enable'\n | 'verify'\n | 'read'\n | 'write'\n | 'subscribe'\n | 'consume'\n | 'setup'\n\n/**\n * Data to audit log.\n */\nexport interface IAuditLogData {\n /**\n * The data specific to the audit log.\n * For example, if we add a bonus to an employee, it could contain the amount, the impacted employeeId, etc...\n */\n payload?: Record<string, unknown>\n\n /**\n * The buisness domain impacted.\n * e.g documents, authentication, ...\n */\n namespace: AuditNamespaces\n\n /**\n * The name of the event.\n * e.g. signIn, passwordUpdated, ...\n */\n event: AuditEvents\n\n /**\n * The target of event.\n * e.g. user.settings, employee.bonuses, ...\n */\n target: AuditTargets | string\n\n /**\n * The data that describes who did perform the logged action.\n */\n account: IAuditLogAuthData\n\n /**\n * The scope of the audit log\n */\n scope: IAuditLogScope\n}\n\n/**\n * Data used to indentify who performed an action\n */\nexport type IAuditLogAuthData =\n | {\n /**\n * The id of the payfiter that did the action if it has been made during a siginAs\n */\n internalId?: string\n\n // the \"account\" infos\n holdingId?: string\n companyId?: string\n employeeId?: string\n individualId?: string\n roleId?: string\n\n /**\n *\n */\n countryCode?: string\n /**\n * The IP address of the user\n */\n userIp?: string\n /**\n * The email address of the user\n */\n email?: string\n }\n | {\n /* Indicates that the action has been performed by the system */\n isSystem: true\n }\n\n/**\n * Data used to \"scope\" the audit log.\n * Might be useful to retrieve all actions performed in a holding, a company, or on an employee.\n */\nexport type IAuditLogScope =\n | {\n holdingId: string\n }\n | {\n companyId: string\n employeeId?: string\n }\n | {\n individualId: string\n }\n | null\n\n// warning: modifying this interface means probably make a breaking change to the SDK\nexport interface IAuditLogger {\n log: (data: IAuditLogData) => Promise<void>\n}\n\nexport interface IAuditLoggerInitialization {\n apiUrl: string\n environment: string\n service: string\n}\n\nexport class AuditLogger implements IAuditLogger {\n private transport: IAuditLogTransport\n\n constructor(protected params: IAuditLoggerInitialization) {\n this.transport = new Transport(params.apiUrl)\n }\n\n public async log({ scope, account, ...data }: IAuditLogData) {\n const uuid = uuidV4()\n const { environment, service } = this.params\n const timestamp = Math.floor(Date.now() / 1000)\n\n const log = {\n ...data,\n ...account,\n service,\n id: uuid,\n environment,\n timestamp,\n ...(scope && { scope }),\n }\n\n await this.transport.create(log)\n }\n}\n"],"names":["globalAxios","uuid","uuidV4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAoBO,IAAM,SAAS,GAAG,uBAAuB,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAuBrE;;;;AAIG;AACH,IAAA,OAAA,kBAAA,YAAA;AAGI,IAAA,SAAA,OAAA,CAAY,aAA6B,EAAY,QAA4B,EAAY,KAAkC,EAAA;AAA1E,QAAA,IAAA,QAAA,KAAA,KAAA,CAAA,EAAA,EAAA,QAA4B,GAAA,SAAA,CAAA,EAAA;AAAY,QAAA,IAAA,KAAA,KAAA,KAAA,CAAA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