@payfit/audit-log 3.16.3 → 3.17.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Audit logs SDK
2
2
 
3
- The SDK is an npm package that makes it easier to call the Audit Log API.
3
+ The SDK is an npm package that sends audit-log records to the durable SQS ingest queue.
4
4
 
5
5
  ## Using the SDK in your project
6
6
 
@@ -47,15 +47,15 @@ logger.log({
47
47
 
48
48
  ### Building the SDK
49
49
 
50
- In order to keep synced with the actual API, the API calls from the SDK are autogenerated by [openapi-generator](https://github.com/OpenAPITools/openapi-generator). It uses the [openapi.json](../pkg/broker/v1/swagger/openapi.json) file and builds an axios client that sends the correct requests accordingly to that file.
50
+ The SDK's transport is maintained TypeScript code. It publishes records to SQS and retains the public `AuditLogger` contract while the consumer persists records directly to Aurora.
51
51
 
52
52
  To build it, simply run
53
53
 
54
54
  ```sh
55
- npm run build
55
+ corepack yarn nx run sdk:build
56
56
  ```
57
57
 
58
- from the sdk folder (where the `package.json` is located).
58
+ from the repository root (where the workspace `package.json` is located).
59
59
 
60
60
  ### Testing
61
61
 
@@ -67,25 +67,8 @@ Could it be for testing some changes you made, or just to discover how to use th
67
67
 
68
68
  It uses the current code in the repository, not the published one, so you don't have to `npm publish` or `npm link` to make it work 🙂
69
69
 
70
- To run it, simply run from the `sdk` folder:
70
+ To run it, run from the repository root:
71
71
 
72
72
  ```sh
73
- npm run start:playground
73
+ corepack yarn workspace @payfit/audit-log start:playground
74
74
  ```
75
-
76
- ### Publishing
77
-
78
- For now, there is no automated publishing from CI, so you have to publish it manually.
79
-
80
- To do so, simply bump the `version` field in the `package.json` file, and run
81
-
82
- ```
83
- npm publish
84
- ```
85
-
86
- ## Code organisation
87
-
88
- The code is mainly split into 2 parts:
89
-
90
- - The transport part, whose only goal is to tell how to communicate with the API, i.e it abstracts the communication layer.
91
- - The logic part, which tells how to build an audit log.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var f=Object.defineProperty;var w=(s,e,t)=>e in s?f(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>(w(s,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("uuid"),o=require("winston"),S=require("hot-shots"),h=require("@aws-sdk/client-sqs"),y=require("zlib"),E="audit-logs",_="@payfit/audit-log",q=()=>{const s=process.env.LOG_LEVEL;return s&&s.trim()!==""?s.trim():"info"},L=(s,e)=>o.createLogger({level:q(),silent:process.env.NODE_ENV==="test",exitOnError:!1,defaultMeta:{namespace:E,sdk:_,service:s,environment:e},format:o.format.combine(o.format.timestamp(),o.format.errors({stack:!0}),o.format.json()),transports:[new o.transports.Console]}),M="payfit.audit_logs.",p=s=>Object.entries(s).filter(([,e])=>e!==void 0&&e!=="").map(([e,t])=>`${e}:${String(t)}`);class b{constructor(){i(this,"client");this.client=new S.StatsD({prefix:M,errorHandler:()=>{},cacheDns:!0})}increment(e,t){this.client.increment(e,1,p(t))}histogram(e,t,n){this.client.histogram(e,t,p(n))}async close(){await new Promise(e=>{this.client.close(()=>e())})}}const A=()=>new b;function U(s){return y.brotliCompressSync(Buffer.from(s,"utf8")).toString("base64")}function C(s){return s instanceof Error&&s.message.includes("Message must be shorter than")}const O="eu-west-3",z={dev:"https://sqs.eu-west-3.amazonaws.com/533547282673/audit-logs-ingest",staging:"https://sqs.eu-west-3.amazonaws.com/589883667243/audit-logs-ingest",prod:"https://sqs.eu-west-3.amazonaws.com/614948436281/audit-logs-ingest"},D={working:"staging",production:"prod",development:"dev"};class N{constructor(e,t){i(this,"environment");i(this,"logger");i(this,"client");i(this,"queueUrl");this.environment=e,this.logger=t;const n=D[e]??e;if(this.queueUrl=z[n],!this.queueUrl){t==null||t.warn("audit-logs SDK: no SQS queue URL configured for this environment, audit logs are disabled",{environment:e});return}this.client=new h.SQSClient({region:O})}async create(e){var n;if(!this.client||!this.queueUrl)return{compressed:!1};const t=JSON.stringify(e);try{return await this.send(t),{compressed:!1}}catch(c){if(!C(c))throw c;return(n=this.logger)==null||n.info("audit-log payload exceeds the SQS size limit, retrying with Brotli compression",{id:e.id,namespace:e.namespace}),await this.send(U(t)),{compressed:!0}}}async send(e){await this.client.send(new h.SendMessageCommand({QueueUrl:this.queueUrl,MessageBody:e}))}}class Q{constructor(e,t={}){i(this,"params");i(this,"transport");i(this,"logger");i(this,"metrics");this.params=e,this.logger=t.logger??L(e.service,e.environment),this.transport=t.transport??new N(e.environment,this.logger),this.metrics=t.metrics??A()}async log({scope:e,account:t,...n}){const c=v.v4(),{environment:g,service:u}=this.params,r={...n,...t,service:u,id:c,environment:g,...e&&{scope:e}},a={service:u,environment:g,namespace:r.namespace,event:r.event,target:r.target},m=Date.now();try{const{compressed:l}=await this.transport.create(r);this.metrics.increment("sent",{...a,compressed:String(l)}),this.metrics.histogram("send_duration_ms",Date.now()-m,a),this.logger.debug("audit-log sent",{id:r.id,event:r.event,target:r.target})}catch(l){this.metrics.increment("send_failed",a),this.metrics.histogram("send_duration_ms",Date.now()-m,a);const d=l.message;try{this.logger.error("audit-log write failed",{audit_log:r,error:d})}catch{this.metrics.increment("serialization_failed",a);try{this.logger.error("audit-log write failed (serialization failed)",{audit_log_meta:{id:r.id,service:r.service,environment:r.environment,namespace:r.namespace,event:r.event,target:r.target},error:d})}catch{}}}}}exports.AuditLogger=Q;
1
+ "use strict";var f=Object.defineProperty;var w=(s,e,t)=>e in s?f(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>w(s,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("uuid"),o=require("winston"),S=require("hot-shots"),h=require("@aws-sdk/client-sqs"),y=require("zlib"),E="audit-logs",_="@payfit/audit-log",q=()=>{const s=process.env.LOG_LEVEL;return s&&s.trim()!==""?s.trim():"info"},L=(s,e)=>o.createLogger({level:q(),silent:process.env.NODE_ENV==="test",exitOnError:!1,defaultMeta:{namespace:E,sdk:_,service:s,environment:e},format:o.format.combine(o.format.timestamp(),o.format.errors({stack:!0}),o.format.json()),transports:[new o.transports.Console]}),M="payfit.audit_logs.",p=s=>Object.entries(s).filter(([,e])=>e!==void 0&&e!=="").map(([e,t])=>`${e}:${String(t)}`);class b{constructor(){i(this,"client");this.client=new S.StatsD({prefix:M,errorHandler:()=>{},cacheDns:!0})}increment(e,t){this.client.increment(e,1,p(t))}histogram(e,t,n){this.client.histogram(e,t,p(n))}async close(){await new Promise(e=>{this.client.close(()=>e())})}}const A=()=>new b;function U(s){return y.brotliCompressSync(Buffer.from(s,"utf8")).toString("base64")}function C(s){return s instanceof Error&&s.message.includes("Message must be shorter than")}const O="eu-west-3",z={dev:"https://sqs.eu-west-3.amazonaws.com/533547282673/audit-logs-ingest",staging:"https://sqs.eu-west-3.amazonaws.com/589883667243/audit-logs-ingest",prod:"https://sqs.eu-west-3.amazonaws.com/614948436281/audit-logs-ingest"},D={working:"staging",production:"prod",development:"dev"};class N{constructor(e,t){i(this,"environment");i(this,"logger");i(this,"client");i(this,"queueUrl");this.environment=e,this.logger=t;const n=D[e]??e;if(this.queueUrl=z[n],!this.queueUrl){t==null||t.warn("audit-logs SDK: no SQS queue URL configured for this environment, audit logs are disabled",{environment:e});return}this.client=new h.SQSClient({region:O})}async create(e){var n;if(!this.client||!this.queueUrl)return{compressed:!1};const t=JSON.stringify(e);try{return await this.send(t),{compressed:!1}}catch(c){if(!C(c))throw c;return(n=this.logger)==null||n.info("audit-log payload exceeds the SQS size limit, retrying with Brotli compression",{id:e.id,namespace:e.namespace}),await this.send(U(t)),{compressed:!0}}}async send(e){await this.client.send(new h.SendMessageCommand({QueueUrl:this.queueUrl,MessageBody:e}))}}class Q{constructor(e,t={}){i(this,"params");i(this,"transport");i(this,"logger");i(this,"metrics");this.params=e,this.logger=t.logger??L(e.service,e.environment),this.transport=t.transport??new N(e.environment,this.logger),this.metrics=t.metrics??A()}async log({scope:e,account:t,...n}){const c=v.v4(),{environment:g,service:u}=this.params,r={...n,...t,service:u,id:c,environment:g,...e&&{scope:e}},a={service:u,environment:g,namespace:r.namespace,event:r.event,target:r.target},m=Date.now();try{const{compressed:l}=await this.transport.create(r);this.metrics.increment("sent",{...a,compressed:String(l)}),this.metrics.histogram("send_duration_ms",Date.now()-m,a),this.logger.debug("audit-log sent",{id:r.id,event:r.event,target:r.target})}catch(l){this.metrics.increment("send_failed",a),this.metrics.histogram("send_duration_ms",Date.now()-m,a);const d=l.message;try{this.logger.error("audit-log write failed",{audit_log:r,error:d})}catch{this.metrics.increment("serialization_failed",a);try{this.logger.error("audit-log write failed (serialization failed)",{audit_log_meta:{id:r.id,service:r.service,environment:r.environment,namespace:r.namespace,event:r.event,target:r.target},error:d})}catch{}}}}}exports.AuditLogger=Q;
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  var p = Object.defineProperty;
2
2
  var f = (s, e, t) => e in s ? p(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var i = (s, e, t) => (f(s, typeof e != "symbol" ? e + "" : e, t), t);
3
+ var i = (s, e, t) => f(s, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { v4 as w } from "uuid";
5
- import { createLogger as v, format as c, transports as S } from "winston";
5
+ import { createLogger as v, transports as S, format as c } from "winston";
6
6
  import { StatsD as E } from "hot-shots";
7
7
  import { SQSClient as _, SendMessageCommand as y } from "@aws-sdk/client-sqs";
8
8
  import { brotliCompressSync as L } from "zlib";
package/package.json CHANGED
@@ -1,42 +1,36 @@
1
1
  {
2
2
  "name": "@payfit/audit-log",
3
- "version": "3.16.3",
3
+ "version": "3.17.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PayFit/audit-logs.git",
7
- "directory": "sdk"
7
+ "directory": "packages/sdk"
8
8
  },
9
9
  "description": "Library to handle audit logs at Payfit",
10
10
  "main": "dist/index.js",
11
11
  "module": "dist/index.mjs",
12
12
  "types": "dist/index.d.ts",
13
13
  "scripts": {
14
- "generate": "openapi-generator-cli generate -i ../pkg/broker/v1/swagger/openapi.json -g typescript-axios -o src/transport/generated -c openapi-codegen-config.yml",
15
- "build": "rimraf dist && vite build",
14
+ "build": "rimraf dist && vite build && tsc --build tsconfig.app.json --emitDeclarationOnly --force",
16
15
  "prepack": "npm run build",
17
- "lint": "eslint .",
16
+ "lint": "ESLINT_USE_FLAT_CONFIG=true eslint .",
18
17
  "test": "vitest run",
19
18
  "test:watch": "vitest",
20
19
  "start:playground": "ts-node src/playground.ts",
21
20
  "format:check": "prettier --check .",
22
- "format:fix": "prettier --write .",
23
- "release": "semantic-release --noCi"
21
+ "format:fix": "prettier --write ."
24
22
  },
25
23
  "author": "",
26
24
  "license": "ISC",
27
25
  "dependencies": {
28
26
  "@aws-sdk/client-sqs": "^3.600.0",
29
- "axios": "^1.0.0",
30
27
  "hot-shots": "^11.0.0",
31
28
  "lodash": "^4.17.20",
32
29
  "uuid": "^9.0.0",
33
30
  "winston": "^3.13.0"
34
31
  },
35
32
  "devDependencies": {
36
- "@openapitools/openapi-generator-cli": "2.7.0",
37
- "@payfit/browserslist-config": "1.1.1",
38
33
  "@payfit/eslint-config-node": "1.1.0",
39
- "@payfit/semantic-release-package-config": "6.13.0",
40
34
  "@rollup/plugin-typescript": "11.1.5",
41
35
  "@tsconfig/node18": "18.2.2",
42
36
  "@tsconfig/strictest": "2.0.2",
@@ -44,21 +38,21 @@
44
38
  "@types/node": "20.10.6",
45
39
  "@types/uuid": "9.0.7",
46
40
  "@typescript-eslint/eslint-plugin": "6.17.0",
41
+ "@typescript-eslint/parser": "6.17.0",
47
42
  "builtin-modules": "3.3.0",
48
43
  "eslint": "8.56.0",
49
44
  "prettier": "3.1.1",
50
45
  "rimraf": "5.0.5",
51
- "semantic-release": "22.0.12",
52
46
  "ts-node": "10.9.2",
53
47
  "typescript": "5.3.3",
54
- "vite": "4.5.1",
48
+ "vite": "^6.0.0",
55
49
  "vitest": "4.1.4"
56
50
  },
57
51
  "publishConfig": {
58
- "registry": "https://registry.npmjs.org/"
52
+ "registry": "https://registry.npmjs.org/",
53
+ "access": "public"
59
54
  },
60
55
  "files": [
61
56
  "dist"
62
- ],
63
- "packageManager": "yarn@4.14.1+sha512.64df448055b2d37ba269d7db535a469b8da93f8ef1140c25fd7a83c00a8fbaacb214ca0e02553b92a2c54cef78bb67d0b4817fab02001df0e24fac0faccc3b42"
57
+ ]
64
58
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,74 +0,0 @@
1
- /**
2
- * Audit Logs
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: damian.bursztyn@payfit.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
- import { Configuration } from '../configuration';
14
- import { RequestArgs, BaseAPI } from '../base';
15
- import { InlineObject } from '../model';
16
- /**
17
- * DefaultApi - axios parameter creator
18
- * @export
19
- */
20
- export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
21
- /**
22
- *
23
- * @summary Creates Audit Log event
24
- * @param {InlineObject} inlineObject
25
- * @param {*} [options] Override http request option.
26
- * @throws {RequiredError}
27
- */
28
- v1LogPost: (inlineObject: InlineObject, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
- };
30
- /**
31
- * DefaultApi - functional programming interface
32
- * @export
33
- */
34
- export declare const DefaultApiFp: (configuration?: Configuration) => {
35
- /**
36
- *
37
- * @summary Creates Audit Log event
38
- * @param {InlineObject} inlineObject
39
- * @param {*} [options] Override http request option.
40
- * @throws {RequiredError}
41
- */
42
- v1LogPost(inlineObject: InlineObject, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
43
- };
44
- /**
45
- * DefaultApi - factory interface
46
- * @export
47
- */
48
- export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
49
- /**
50
- *
51
- * @summary Creates Audit Log event
52
- * @param {InlineObject} inlineObject
53
- * @param {*} [options] Override http request option.
54
- * @throws {RequiredError}
55
- */
56
- v1LogPost(inlineObject: InlineObject, options?: any): AxiosPromise<void>;
57
- };
58
- /**
59
- * DefaultApi - object-oriented interface
60
- * @export
61
- * @class DefaultApi
62
- * @extends {BaseAPI}
63
- */
64
- export declare class DefaultApi extends BaseAPI {
65
- /**
66
- *
67
- * @summary Creates Audit Log event
68
- * @param {InlineObject} inlineObject
69
- * @param {*} [options] Override http request option.
70
- * @throws {RequiredError}
71
- * @memberof DefaultApi
72
- */
73
- v1LogPost(inlineObject: InlineObject, options?: AxiosRequestConfig): Promise<globalAxios.AxiosResponse<void, any>>;
74
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * Audit Logs
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: damian.bursztyn@payfit.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export * from './api/default-api';
@@ -1,55 +0,0 @@
1
- /**
2
- * Audit Logs
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: damian.bursztyn@payfit.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import { Configuration } from "./configuration";
13
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
14
- export declare const BASE_PATH: string;
15
- /**
16
- *
17
- * @export
18
- */
19
- export declare const COLLECTION_FORMATS: {
20
- csv: string;
21
- ssv: string;
22
- tsv: string;
23
- pipes: string;
24
- };
25
- /**
26
- *
27
- * @export
28
- * @interface RequestArgs
29
- */
30
- export interface RequestArgs {
31
- url: string;
32
- options: AxiosRequestConfig;
33
- }
34
- /**
35
- *
36
- * @export
37
- * @class BaseAPI
38
- */
39
- export declare class BaseAPI {
40
- protected basePath: string;
41
- protected axios: AxiosInstance;
42
- protected configuration: Configuration | undefined;
43
- constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
- }
45
- /**
46
- *
47
- * @export
48
- * @class RequiredError
49
- * @extends {Error}
50
- */
51
- export declare class RequiredError extends Error {
52
- field: string;
53
- name: "RequiredError";
54
- constructor(field: string, msg?: string);
55
- }
@@ -1,65 +0,0 @@
1
- /**
2
- * Audit Logs
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: damian.bursztyn@payfit.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import { Configuration } from "./configuration";
13
- import { RequestArgs } from "./base";
14
- import { AxiosInstance, AxiosResponse } from 'axios';
15
- /**
16
- *
17
- * @export
18
- */
19
- export declare const DUMMY_BASE_URL = "https://example.com";
20
- /**
21
- *
22
- * @throws {RequiredError}
23
- * @export
24
- */
25
- export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
26
- /**
27
- *
28
- * @export
29
- */
30
- export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
31
- /**
32
- *
33
- * @export
34
- */
35
- export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
36
- /**
37
- *
38
- * @export
39
- */
40
- export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
41
- /**
42
- *
43
- * @export
44
- */
45
- export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
46
- /**
47
- *
48
- * @export
49
- */
50
- export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
51
- /**
52
- *
53
- * @export
54
- */
55
- export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
56
- /**
57
- *
58
- * @export
59
- */
60
- export declare const toPathString: (url: URL) => string;
61
- /**
62
- *
63
- * @export
64
- */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -1,83 +0,0 @@
1
- /**
2
- * Audit Logs
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: damian.bursztyn@payfit.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export interface ConfigurationParameters {
13
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
- username?: string;
15
- password?: string;
16
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
17
- basePath?: string;
18
- baseOptions?: any;
19
- formDataCtor?: new () => any;
20
- }
21
- export declare class Configuration {
22
- /**
23
- * parameter for apiKey security
24
- * @param name security name
25
- * @memberof Configuration
26
- */
27
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
28
- /**
29
- * parameter for basic security
30
- *
31
- * @type {string}
32
- * @memberof Configuration
33
- */
34
- username?: string;
35
- /**
36
- * parameter for basic security
37
- *
38
- * @type {string}
39
- * @memberof Configuration
40
- */
41
- password?: string;
42
- /**
43
- * parameter for oauth2 security
44
- * @param name security name
45
- * @param scopes oauth2 scope
46
- * @memberof Configuration
47
- */
48
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
49
- /**
50
- * override base path
51
- *
52
- * @type {string}
53
- * @memberof Configuration
54
- */
55
- basePath?: string;
56
- /**
57
- * base options for axios calls
58
- *
59
- * @type {any}
60
- * @memberof Configuration
61
- */
62
- baseOptions?: any;
63
- /**
64
- * The FormData constructor that will be used to create multipart form data
65
- * requests. You can inject this here so that execution environments that
66
- * do not support the FormData class can still run the generated client.
67
- *
68
- * @type {new () => FormData}
69
- */
70
- formDataCtor?: new () => any;
71
- constructor(param?: ConfigurationParameters);
72
- /**
73
- * Check if the given MIME is a JSON MIME.
74
- * JSON MIME examples:
75
- * application/json
76
- * application/json; charset=UTF8
77
- * APPLICATION/JSON
78
- * application/vnd.company+json
79
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
80
- * @return True if the given MIME is JSON, false otherwise.
81
- */
82
- isJsonMime(mime: string): boolean;
83
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Audit Logs
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: damian.bursztyn@payfit.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export * from "./api";
13
- export * from "./configuration";
14
- export * from "./model";
@@ -1 +0,0 @@
1
- export * from './inline-object';
@@ -1,144 +0,0 @@
1
- /**
2
- * Audit Logs
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: damian.bursztyn@payfit.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface InlineObject
16
- */
17
- export interface InlineObject {
18
- /**
19
- * Audit log event unique identifier
20
- * @type {string}
21
- * @memberof InlineObject
22
- */
23
- 'id': string;
24
- /**
25
- * Audit log event country code
26
- * @type {string}
27
- * @memberof InlineObject
28
- */
29
- 'countryCode'?: string;
30
- /**
31
- * Audit log event payload
32
- * @type {object}
33
- * @memberof InlineObject
34
- */
35
- 'payload'?: object;
36
- /**
37
- * Datadog payload
38
- * @type {object}
39
- * @memberof InlineObject
40
- */
41
- 'datadogPayload'?: object;
42
- /**
43
- * id of the payfiter who performed the audit log action, if signed as.
44
- * @type {string}
45
- * @memberof InlineObject
46
- */
47
- 'internalId'?: string;
48
- /**
49
- * Tells whether the logged action has been made by the system
50
- * @type {boolean}
51
- * @memberof InlineObject
52
- */
53
- 'isSystem'?: boolean;
54
- /**
55
- * Audit log event namespace (business related)
56
- * @type {string}
57
- * @memberof InlineObject
58
- */
59
- 'namespace': string;
60
- /**
61
- * Audit log event namespace (technical related)
62
- * @type {string}
63
- * @memberof InlineObject
64
- */
65
- 'service': string;
66
- /**
67
- * Audit log event type
68
- * @type {string}
69
- * @memberof InlineObject
70
- */
71
- 'event': string;
72
- /**
73
- * Audit log target
74
- * @type {string}
75
- * @memberof InlineObject
76
- */
77
- 'target': string;
78
- /**
79
- * Audit log event environment, only required when in todd context
80
- * @type {string}
81
- * @memberof InlineObject
82
- */
83
- 'environment'?: string;
84
- /**
85
- * holdingId of the account performing the event
86
- * @type {string}
87
- * @memberof InlineObject
88
- */
89
- 'holdingId'?: string;
90
- /**
91
- * companyId of the account performing the event
92
- * @type {string}
93
- * @memberof InlineObject
94
- */
95
- 'companyId'?: string;
96
- /**
97
- * employeeId of the account performing the event
98
- * @type {string}
99
- * @memberof InlineObject
100
- */
101
- 'employeeId'?: string;
102
- /**
103
- * individualId of the account performing the event
104
- * @type {string}
105
- * @memberof InlineObject
106
- */
107
- 'individualId'?: string;
108
- /**
109
- * roleId of the account performing the event
110
- * @type {string}
111
- * @memberof InlineObject
112
- */
113
- 'roleId'?: string;
114
- /**
115
- * userIp of the account performing the event
116
- * @type {string}
117
- * @memberof InlineObject
118
- */
119
- 'userIp'?: string;
120
- /**
121
- * specialRole of the account performing the event
122
- * @type {string}
123
- * @memberof InlineObject
124
- */
125
- 'specialRole'?: string;
126
- /**
127
- * email of the account performing the event
128
- * @type {string}
129
- * @memberof InlineObject
130
- */
131
- 'email'?: string;
132
- /**
133
- * Audit log event scope
134
- * @type {object}
135
- * @memberof InlineObject
136
- */
137
- 'scope'?: object;
138
- /**
139
- * Audit log event timestamp unix format
140
- * @type {number}
141
- * @memberof InlineObject
142
- */
143
- 'timestamp': number;
144
- }
@@ -1 +0,0 @@
1
- export {};