@payfit/audit-log 1.0.8 → 1.1.0-rc.1
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/index.d.ts +18 -6
- package/dist/index.js +1 -44
- package/dist/index.mjs +149 -0
- package/dist/playground.d.ts +1 -0
- package/dist/transport/generated/api/default-api.d.ts +7 -7
- package/dist/transport/generated/base.d.ts +2 -2
- package/dist/transport/generated/common.d.ts +65 -0
- package/dist/transport/generated/configuration.d.ts +22 -2
- package/dist/transport/generated/index.d.ts +1 -0
- package/dist/transport/generated/model/inline-object.d.ts +20 -20
- package/dist/transport/implementation.d.ts +1 -2
- package/dist/transport/interface.d.ts +4 -4
- package/package.json +45 -21
- package/.prettierrc +0 -5
- package/CHANGELOG.md +0 -13
- package/dist/index.js.map +0 -1
- package/dist/transport/generated/api/default-api.js +0 -156
- package/dist/transport/generated/api/default-api.js.map +0 -1
- package/dist/transport/generated/api.js +0 -26
- package/dist/transport/generated/api.js.map +0 -1
- package/dist/transport/generated/base.js +0 -64
- package/dist/transport/generated/base.js.map +0 -1
- package/dist/transport/generated/configuration.js +0 -27
- package/dist/transport/generated/configuration.js.map +0 -1
- package/dist/transport/generated/index.js +0 -27
- package/dist/transport/generated/index.js.map +0 -1
- package/dist/transport/generated/model/index.js +0 -14
- package/dist/transport/generated/model/index.js.map +0 -1
- package/dist/transport/generated/model/inline-object.js +0 -15
- package/dist/transport/generated/model/inline-object.js.map +0 -1
- package/dist/transport/implementation.js +0 -38
- package/dist/transport/implementation.js.map +0 -1
- package/dist/transport/interface.js +0 -3
- package/dist/transport/interface.js.map +0 -1
- package/openapi-codegen-config.yml +0 -6
- package/openapitools.json +0 -6
- package/playground/index.ts +0 -37
- package/src/index.ts +0 -131
- package/src/transport/generated/.openapi-generator/VERSION +0 -1
- package/src/transport/generated/.openapi-generator-ignore +0 -23
- package/src/transport/generated/api/default-api.ts +0 -132
- package/src/transport/generated/api.ts +0 -17
- package/src/transport/generated/base.ts +0 -70
- package/src/transport/generated/configuration.ts +0 -75
- package/src/transport/generated/git_push.sh +0 -58
- package/src/transport/generated/index.ts +0 -16
- package/src/transport/generated/model/index.ts +0 -1
- package/src/transport/generated/model/inline-object.ts +0 -144
- package/src/transport/implementation.ts +0 -27
- package/src/transport/interface.ts +0 -28
- package/tsconfig.json +0 -25
- package/tslint.json +0 -12
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { DefaultApi } from './generated'
|
|
2
|
-
import { InlineObject } from './generated/model'
|
|
3
|
-
|
|
4
|
-
import { IAuditLogTransport } from './interface'
|
|
5
|
-
|
|
6
|
-
export class Transport implements IAuditLogTransport {
|
|
7
|
-
api: DefaultApi
|
|
8
|
-
|
|
9
|
-
constructor(protected apiUrl: string) {
|
|
10
|
-
this.api = new DefaultApi({
|
|
11
|
-
basePath: this.apiUrl,
|
|
12
|
-
})
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
async create(auditLogData: InlineObject) {
|
|
16
|
-
try {
|
|
17
|
-
await this.api.v1LogPost(auditLogData)
|
|
18
|
-
} catch (err) {
|
|
19
|
-
if (!err.isAxiosError) {
|
|
20
|
-
throw err
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const message = err.response?.data || err.message
|
|
24
|
-
throw new Error(message)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IAuditLogData } from '..'
|
|
2
|
-
|
|
3
|
-
export type IAuditLogCreationData = {
|
|
4
|
-
id: string
|
|
5
|
-
timestamp: number
|
|
6
|
-
environment: string
|
|
7
|
-
service: string
|
|
8
|
-
scope?: object
|
|
9
|
-
countryCode?: string
|
|
10
|
-
payload?: object
|
|
11
|
-
internalId?: string
|
|
12
|
-
isSystem?: boolean
|
|
13
|
-
namespace: string
|
|
14
|
-
event: string
|
|
15
|
-
target: string
|
|
16
|
-
holdingId?: string
|
|
17
|
-
companyId?: string
|
|
18
|
-
employeeId?: string
|
|
19
|
-
individualId?: string
|
|
20
|
-
roleId?: string
|
|
21
|
-
userIp?: string
|
|
22
|
-
specialRole?: string
|
|
23
|
-
email?: string
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface IAuditLogTransport {
|
|
27
|
-
create: (data: IAuditLogCreationData) => Promise<void>
|
|
28
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"target": "es6",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"lib": ["es7", "esnext.asynciterable", "es2017"],
|
|
7
|
-
"sourceMap": true,
|
|
8
|
-
"outDir": "./dist",
|
|
9
|
-
"strict": true,
|
|
10
|
-
"noImplicitAny": true,
|
|
11
|
-
"strictNullChecks": true,
|
|
12
|
-
"noImplicitThis": true,
|
|
13
|
-
"alwaysStrict": true,
|
|
14
|
-
"noImplicitReturns": true,
|
|
15
|
-
"noFallthroughCasesInSwitch": true,
|
|
16
|
-
"moduleResolution": "node",
|
|
17
|
-
"baseUrl": "src",
|
|
18
|
-
"paths": {
|
|
19
|
-
"*": ["*"]
|
|
20
|
-
},
|
|
21
|
-
"esModuleInterop": true
|
|
22
|
-
},
|
|
23
|
-
"include": ["./src/**/*"],
|
|
24
|
-
"exclude": ["node_modules", "./src/__tests__/**/*"]
|
|
25
|
-
}
|
package/tslint.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"defaultSeverity": "error",
|
|
3
|
-
"extends": ["tslint:recommended", "tslint-config-prettier"],
|
|
4
|
-
"jsRules": {
|
|
5
|
-
"object-literal-sort-keys": false
|
|
6
|
-
},
|
|
7
|
-
"rules": {
|
|
8
|
-
"one-variable-per-declaration": false,
|
|
9
|
-
"interface-name": false
|
|
10
|
-
},
|
|
11
|
-
"rulesDirectory": []
|
|
12
|
-
}
|