@payfit/audit-log 2.11.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/node/index.js.map +1 -1
- package/package.json +11 -11
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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\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\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\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,QAA4B,GAAA,SAAA,CAAA,EAAA;AAAY,QAAA,IAAA,KAAA,KAAA,KAAA,CAAA,EAAA,EAAA,KAAkC,GAAA,WAAA,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;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IAAI,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;KAC9C;IAEY,WAAG,CAAA,SAAA,CAAA,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;;;;;;wBAClC,IAAI,GAAGA,EAAM,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,EAAE,IAAI,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;;;;"}
|
|
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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AAE,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,EAAE,IAAI,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/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' | 'payments' | 'auth' | 'billing' | 'modules' | 'integrations' | 'partnerApi' | 'donation' | 'notificationSettings' | 'people' | 'subscriptions' | 'organization' | 'declarations' | 'pricing' | 'payroll';
|
|
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.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';
|
|
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' | 'share' | 'delete' | 'view' | 'sign' | 'signin' | 'signinFail' | 'signinAs' | 'logout' | 'updateCurrentAccount' | 'merge' | 'disable' | 'sendResetPasswordLink' | 'enable' | 'verify';
|
|
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
|
*/
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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\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\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\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;QAA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OAAC,WAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
|
|
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,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AG,CAAA,SAAA,CAAA,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": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PayFit/audit-logs.git",
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
"uuid": "^9.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@openapitools/openapi-generator-cli": "2.
|
|
31
|
+
"@openapitools/openapi-generator-cli": "2.6.0",
|
|
32
32
|
"@payfit/browserslist-config": "1.1.1",
|
|
33
33
|
"@payfit/eslint-config": "0.16.1",
|
|
34
34
|
"@payfit/rollup-config": "2.4.1",
|
|
35
|
-
"@payfit/semantic-release-package-config": "6.
|
|
35
|
+
"@payfit/semantic-release-package-config": "6.11.0",
|
|
36
36
|
"@payfit/tsconfig": "0.5.0",
|
|
37
|
-
"@types/lodash": "4.14.
|
|
38
|
-
"@types/node": "18.11
|
|
39
|
-
"@types/uuid": "9.0.
|
|
40
|
-
"eslint": "8.
|
|
41
|
-
"prettier": "2.8.
|
|
42
|
-
"rimraf": "4.
|
|
43
|
-
"semantic-release": "20.
|
|
37
|
+
"@types/lodash": "4.14.192",
|
|
38
|
+
"@types/node": "18.15.11",
|
|
39
|
+
"@types/uuid": "9.0.1",
|
|
40
|
+
"eslint": "8.38.0",
|
|
41
|
+
"prettier": "2.8.7",
|
|
42
|
+
"rimraf": "4.4.1",
|
|
43
|
+
"semantic-release": "20.1.3",
|
|
44
44
|
"ts-node": "10.9.1",
|
|
45
|
-
"typescript": "4.9.
|
|
45
|
+
"typescript": "4.9.5"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"registry": "https://registry.npmjs.org/"
|