@payfit/audit-log 1.0.0-rc.7 → 1.0.0-rc.71

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/dist/es/index.js CHANGED
@@ -20,7 +20,7 @@ PERFORMANCE OF THIS SOFTWARE.
20
20
  var extendStatics = function(d, b) {
21
21
  extendStatics = Object.setPrototypeOf ||
22
22
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
24
24
  return extendStatics(d, b);
25
25
  };
26
26
 
@@ -361,9 +361,9 @@ var Transport = /** @class */ (function () {
361
361
  switch (_b.label) {
362
362
  case 0:
363
363
  _b.trys.push([0, 2, , 3]);
364
- return [4 /*yield*/, this.api.v1LogPost(auditLogData)];
364
+ return [4 /*yield*/, this.api.v1LogPost(auditLogData, { timeout: 5000 })]; // timeout in milliseconds looking at https://axios-http.com/docs/req_config
365
365
  case 1:
366
- _b.sent();
366
+ _b.sent(); // timeout in milliseconds looking at https://axios-http.com/docs/req_config
367
367
  return [3 /*break*/, 3];
368
368
  case 2:
369
369
  err_1 = _b.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.js","../../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":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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\";\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)\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)\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 | 'advancePayment'\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\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.settings'\n | 'people.relation'\n | 'iban'\n\n/**\n * The allowed Events for the AuditLog\n */\nexport type AuditEvents =\n | 'create'\n | 'update'\n | 'delete'\n | 'view'\n | 'merge'\n | 'disable'\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\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":["uuidV4"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;AACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;AACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;AACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnF,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF;AACO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;AAChC,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxB,IA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C,IAAA,KAAK,WAAA,EAAE,OAAO,aAAA,EAAK,IAAI,cAAzB,oBAA2B,CAAF;;;;;;wBAClC,IAAI,GAAGA,EAAM,EAAE,CAAA;wBACf,KAA2B,IAAI,CAAC,MAAM,EAApC,WAAW,iBAAA,EAAE,OAAO,aAAA,CAAgB;wBACtC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;wBAEzC,GAAG,2CACJ,IAAI,GACJ,OAAO,KACV,OAAO,SAAA,EACP,EAAE,EAAE,IAAI,EACR,WAAW,aAAA,EACX,SAAS,WAAA,MACL,KAAK,IAAI,EAAE,KAAK,OAAA,EAAE,EACvB,CAAA;wBAED,qBAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAA;;wBAAhC,SAAgC,CAAA;;;;;KACjC;IACH,kBAAC;AAAD,CAAC;;;;"}
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\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\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":["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,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BAED,OAAM,CAAA,CAAA,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA,CAAA;;AAAhC,wBAAA,EAAA,CAAA,IAAA,EAAgC,CAAA;;;;;AACjC,KAAA,CAAA;IACH,OAAC,WAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * The allowed Namespaces for the AuditLog
3
3
  */
4
- type AuditNamespaces = 'employee' | 'company' | 'permissions' | 'absence' | 'expense' | 'advancePayment' | 'auth' | 'billing' | 'modules' | 'integrations' | 'partnerApi' | 'donation' | 'notificationSettings' | 'people' | 'subscriptions' | 'organization' | 'declarations' | 'pricing';
4
+ type AuditNamespaces = 'employee' | 'company' | 'permissions' | 'absence' | 'expense' | 'payments' | 'auth' | 'billing' | 'modules' | 'integrations' | 'partnerApi' | 'donation' | 'notificationSettings' | 'people' | 'subscriptions' | 'organization' | 'declarations' | 'pricing' | 'payroll' | 'jetlang';
5
5
  /**
6
6
  * The allowed targets for the AuditLog
7
7
  */
8
- type AuditTargets = 'reporting' | 'employee' | 'employee.settings' | 'employee-request' | 'company' | 'company.billings' | 'company.billing' | 'company.variables' | 'company.settings' | 'company.emails' | 'company.addons' | 'company.plans' | 'company.modules' | 'declaration.metadata' | 'user.role' | 'user.account' | 'user.primaryEmail' | 'user.secondaryEmail' | 'user.locale' | 'user.notificationSettings' | 'user.mfa' | 'role' | 'team' | 'department' | 'workflow' | 'integration' | 'apiAccess' | 'individual' | 'association' | 'association.archived' | 'donation' | 'donation.amount' | 'donation.auth.partner.portal' | 'donation.company.onboarding' | 'donation.taxReceipt' | 'donationPayment.status' | 'people.document.comments' | 'people.document.notifications' | 'people.document.reactions' | 'people.document.status' | 'people.document.answers' | 'people.settings' | 'people.relation' | 'iban';
8
+ type AuditTargets = 'reporting' | 'employee' | 'employee.settings' | 'employee-request' | 'company' | 'company.billings' | 'company.billing' | 'company.variables' | 'company.settings' | 'company.emails' | 'company.addons' | 'company.plans' | 'company.modules' | 'declaration.metadata' | 'user.role' | 'user.account' | 'user.primaryEmail' | 'user.secondaryEmail' | 'user.locale' | 'user.notificationSettings' | 'user.mfa' | 'role' | 'team' | 'department' | 'workflow' | 'integration' | 'apiAccess' | 'individual' | 'association' | 'association.archived' | 'donation' | 'donation.amount' | 'donation.auth.partner.portal' | 'donation.company.onboarding' | 'donation.taxReceipt' | 'donationPayment.status' | 'people.document.comments' | 'people.document.notifications' | 'people.document.reactions' | 'people.document.status' | 'people.document.answers' | 'people.oneOne' | 'people.campaign' | 'people.assessment' | 'people.assessment.360details' | 'people.assessment.managerRequests' | 'people.assessment.manager' | 'people.assessment.answers' | 'people.assessment.feedbacks' | 'iban' | 'salary-payments.connect' | 'salary-payments.pay.url' | 'advance-salary-payments.pay.url' | 'variable' | 'jetlang-data' | 'access-logs' | 'event' | 'topic';
9
9
  /**
10
10
  * The allowed Events for the AuditLog
11
11
  */
12
- type AuditEvents = 'create' | 'update' | 'delete' | 'view' | 'merge' | 'disable';
12
+ type AuditEvents = 'create' | 'update' | 'share' | 'delete' | 'view' | 'sign' | 'signin' | 'signinFail' | 'signinAs' | 'logout' | 'updateCurrentAccount' | 'merge' | 'disable' | 'sendResetPasswordLink' | 'enable' | 'verify' | 'read' | 'write' | 'subscribe' | 'consume' | 'setup';
13
13
  /**
14
14
  * Data to audit log.
15
15
  */
@@ -33,7 +33,7 @@ interface IAuditLogData {
33
33
  * The target of event.
34
34
  * e.g. user.settings, employee.bonuses, ...
35
35
  */
36
- target: AuditTargets;
36
+ target: AuditTargets | string;
37
37
  /**
38
38
  * The data that describes who did perform the logged action.
39
39
  */
@@ -1,13 +1,11 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var uuid = require('uuid');
6
4
  var globalAxios = require('axios');
7
5
 
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
9
7
 
10
- var globalAxios__default = /*#__PURE__*/_interopDefaultLegacy(globalAxios);
8
+ var globalAxios__default = /*#__PURE__*/_interopDefaultCompat(globalAxios);
11
9
 
12
10
  /*! *****************************************************************************
13
11
  Copyright (c) Microsoft Corporation.
@@ -28,7 +26,7 @@ PERFORMANCE OF THIS SOFTWARE.
28
26
  var extendStatics = function(d, b) {
29
27
  extendStatics = Object.setPrototypeOf ||
30
28
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
29
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
32
30
  return extendStatics(d, b);
33
31
  };
34
32
 
@@ -121,7 +119,7 @@ var BASE_PATH = "http://localhost:8090".replace(/\/+$/, "");
121
119
  var BaseAPI = /** @class */ (function () {
122
120
  function BaseAPI(configuration, basePath, axios) {
123
121
  if (basePath === void 0) { basePath = BASE_PATH; }
124
- if (axios === void 0) { axios = globalAxios__default["default"]; }
122
+ if (axios === void 0) { axios = globalAxios__default.default; }
125
123
  this.basePath = basePath;
126
124
  this.axios = axios;
127
125
  if (configuration) {
@@ -309,7 +307,7 @@ var DefaultApiFp = function (configuration) {
309
307
  case 0: return [4 /*yield*/, localVarAxiosParamCreator.v1LogPost(inlineObject, options)];
310
308
  case 1:
311
309
  localVarAxiosArgs = _a.sent();
312
- return [2 /*return*/, createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration)];
310
+ return [2 /*return*/, createRequestFunction(localVarAxiosArgs, globalAxios__default.default, BASE_PATH, configuration)];
313
311
  }
314
312
  });
315
313
  });
@@ -369,9 +367,9 @@ var Transport = /** @class */ (function () {
369
367
  switch (_b.label) {
370
368
  case 0:
371
369
  _b.trys.push([0, 2, , 3]);
372
- return [4 /*yield*/, this.api.v1LogPost(auditLogData)];
370
+ return [4 /*yield*/, this.api.v1LogPost(auditLogData, { timeout: 5000 })]; // timeout in milliseconds looking at https://axios-http.com/docs/req_config
373
371
  case 1:
374
- _b.sent();
372
+ _b.sent(); // timeout in milliseconds looking at https://axios-http.com/docs/req_config
375
373
  return [3 /*break*/, 3];
376
374
  case 2:
377
375
  err_1 = _b.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.js","../../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":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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\";\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)\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)\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 | 'advancePayment'\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\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.settings'\n | 'people.relation'\n | 'iban'\n\n/**\n * The allowed Events for the AuditLog\n */\nexport type AuditEvents =\n | 'create'\n | 'update'\n | 'delete'\n | 'view'\n | 'merge'\n | 'disable'\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\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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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ACH,kBAAC;AAAD,CAAC;;;;"}
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\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\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,EAAA,EAAA,KAAkC,GAAAA,4BAAA,CAAA,EAAA;QAA1E,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAoB;QAAY,IAAK,CAAA,KAAA,GAAL,KAAK,CAA6B;AAC3H,QAAA,IAAI,aAAa,EAAE;AACf,YAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;YACnC,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;AAC3D,SAAA;KACJ;IACL,OAAC,OAAA,CAAA;AAAD,CAAC,EAAA,CAAA,CAAA;AAED;;;;;AAKG;AACH,IAAA,aAAA,kBAAA,UAAA,MAAA,EAAA;IAAmC,SAAK,CAAA,aAAA,EAAA,MA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,GAAA,GAAhB,UAAiB,EAA0C,EAAA;QAAxC,IAAA,KAAK,WAAA,EAAE,OAAO,aAAA,EAAK,IAAI,GAAzB,MAAA,CAAA,EAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAA2B,CAAF,CAAA;;;;;;wBAClCC,MAAI,GAAGC,OAAM,EAAE,CAAA;wBACf,EAA2B,GAAA,IAAI,CAAC,MAAM,EAApC,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA,CAAgB;AACtC,wBAAA,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;wBAEzC,GAAG,GAAA,QAAA,CAAA,QAAA,CAAA,QAAA,CAAA,QAAA,CAAA,EAAA,EACJ,IAAI,CAAA,EACJ,OAAO,CAAA,EAAA,EACV,OAAO,EAAA,OAAA,EACP,EAAE,EAAED,MAAI,EACR,WAAW,EAAA,WAAA,EACX,SAAS,EAAA,SAAA,EACN,CAAA,GAAC,KAAK,IAAI,EAAE,KAAK,EAAA,KAAA,EAAE,EACvB,CAAA;wBAED,OAAM,CAAA,CAAA,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA,CAAA;;AAAhC,wBAAA,EAAA,CAAA,IAAA,EAAgC,CAAA;;;;;AACjC,KAAA,CAAA;IACH,OAAC,WAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/audit-log",
3
- "version": "1.0.0-rc.7",
3
+ "version": "1.0.0-rc.71",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PayFit/audit-logs.git",
@@ -23,26 +23,26 @@
23
23
  "author": "",
24
24
  "license": "ISC",
25
25
  "dependencies": {
26
- "axios": "^0.25.0",
26
+ "axios": "^0.27.0",
27
27
  "lodash": "^4.17.20",
28
- "uuid": "^8.3.2"
28
+ "uuid": "^9.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@openapitools/openapi-generator-cli": "2.4.25",
31
+ "@openapitools/openapi-generator-cli": "2.6.0",
32
32
  "@payfit/browserslist-config": "1.1.1",
33
- "@payfit/eslint-config": "0.11.0",
34
- "@payfit/rollup-config": "1.8.0",
35
- "@payfit/semantic-release-package-config": "6.7.0",
36
- "@payfit/tsconfig": "0.4.0",
37
- "@types/lodash": "4.14.178",
38
- "@types/node": "17.0.0",
39
- "@types/uuid": "8.3.4",
40
- "eslint": "8.7.0",
41
- "prettier": "2.5.1",
42
- "rimraf": "3.0.2",
43
- "semantic-release": "19.0.2",
44
- "ts-node": "10.4.0",
45
- "typescript": "4.5.4"
33
+ "@payfit/eslint-config": "0.16.1",
34
+ "@payfit/rollup-config": "2.4.1",
35
+ "@payfit/semantic-release-package-config": "6.11.0",
36
+ "@payfit/tsconfig": "0.5.0",
37
+ "@types/lodash": "4.14.194",
38
+ "@types/node": "18.16.1",
39
+ "@types/uuid": "9.0.1",
40
+ "eslint": "8.39.0",
41
+ "prettier": "2.8.8",
42
+ "rimraf": "4.4.1",
43
+ "semantic-release": "20.1.3",
44
+ "ts-node": "10.9.1",
45
+ "typescript": "4.9.5"
46
46
  },
47
47
  "publishConfig": {
48
48
  "registry": "https://registry.npmjs.org/"