@payfit/audit-log 1.0.0-alpha7 → 1.0.0-rc.10
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 +92 -0
- package/dist/es/index.js +411 -0
- package/dist/es/index.js.map +1 -0
- package/dist/index.d.ts +34 -18
- package/dist/node/index.js +419 -0
- package/dist/node/index.js.map +1 -0
- package/package.json +42 -19
- package/.prettierrc +0 -5
- package/dist/index.js +0 -30
- package/dist/index.js.map +0 -1
- package/dist/transport/generated/api/default-api.d.ts +0 -74
- package/dist/transport/generated/api/default-api.js +0 -131
- package/dist/transport/generated/api/default-api.js.map +0 -1
- package/dist/transport/generated/api.d.ts +0 -12
- package/dist/transport/generated/api.js +0 -19
- package/dist/transport/generated/api.js.map +0 -1
- package/dist/transport/generated/base.d.ts +0 -55
- package/dist/transport/generated/base.js +0 -63
- package/dist/transport/generated/base.js.map +0 -1
- package/dist/transport/generated/configuration.d.ts +0 -63
- package/dist/transport/generated/configuration.js +0 -26
- package/dist/transport/generated/configuration.js.map +0 -1
- package/dist/transport/generated/index.d.ts +0 -13
- package/dist/transport/generated/index.js +0 -20
- package/dist/transport/generated/index.js.map +0 -1
- package/dist/transport/generated/model/index.d.ts +0 -1
- package/dist/transport/generated/model/index.js +0 -3
- package/dist/transport/generated/model/index.js.map +0 -1
- package/dist/transport/generated/model/inline-object.d.ts +0 -120
- 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.d.ts +0 -8
- package/dist/transport/implementation.js +0 -40
- package/dist/transport/implementation.js.map +0 -1
- package/dist/transport/interface.d.ts +0 -9
- package/dist/transport/interface.js +0 -3
- package/dist/transport/interface.js.map +0 -1
- package/openapi-codegen-config.yml +0 -6
- package/playground/index.ts +0 -25
- package/src/index.ts +0 -124
- 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 -131
- 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 -126
- package/src/transport/implementation.ts +0 -25
- package/src/transport/interface.ts +0 -11
- package/tsconfig.json +0 -25
- package/tslint.json +0 -12
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
3
|
-
#
|
|
4
|
-
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
|
5
|
-
|
|
6
|
-
git_user_id=$1
|
|
7
|
-
git_repo_id=$2
|
|
8
|
-
release_note=$3
|
|
9
|
-
git_host=$4
|
|
10
|
-
|
|
11
|
-
if [ "$git_host" = "" ]; then
|
|
12
|
-
git_host="github.com"
|
|
13
|
-
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
if [ "$git_user_id" = "" ]; then
|
|
17
|
-
git_user_id="GIT_USER_ID"
|
|
18
|
-
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
if [ "$git_repo_id" = "" ]; then
|
|
22
|
-
git_repo_id="GIT_REPO_ID"
|
|
23
|
-
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
24
|
-
fi
|
|
25
|
-
|
|
26
|
-
if [ "$release_note" = "" ]; then
|
|
27
|
-
release_note="Minor update"
|
|
28
|
-
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# Initialize the local directory as a Git repository
|
|
32
|
-
git init
|
|
33
|
-
|
|
34
|
-
# Adds the files in the local repository and stages them for commit.
|
|
35
|
-
git add .
|
|
36
|
-
|
|
37
|
-
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
38
|
-
git commit -m "$release_note"
|
|
39
|
-
|
|
40
|
-
# Sets the new remote
|
|
41
|
-
git_remote=`git remote`
|
|
42
|
-
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
43
|
-
|
|
44
|
-
if [ "$GIT_TOKEN" = "" ]; then
|
|
45
|
-
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
46
|
-
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
47
|
-
else
|
|
48
|
-
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
git pull origin master
|
|
54
|
-
|
|
55
|
-
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
56
|
-
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
57
|
-
git push origin master 2>&1 | grep -v 'To https'
|
|
58
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// tslint:disable
|
|
2
|
-
/**
|
|
3
|
-
* Audit Logs
|
|
4
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 1.0.0
|
|
7
|
-
* Contact: damian.bursztyn@payfit.com
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export * from "./api";
|
|
16
|
-
export * from "./configuration";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './inline-object';
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
// tslint:disable
|
|
2
|
-
/**
|
|
3
|
-
* Audit Logs
|
|
4
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 1.0.0
|
|
7
|
-
* Contact: damian.bursztyn@payfit.com
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface InlineObject
|
|
20
|
-
*/
|
|
21
|
-
export interface InlineObject {
|
|
22
|
-
/**
|
|
23
|
-
* Audit log event unique identifier
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof InlineObject
|
|
26
|
-
*/
|
|
27
|
-
id: string;
|
|
28
|
-
/**
|
|
29
|
-
* Audit log event country code
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof InlineObject
|
|
32
|
-
*/
|
|
33
|
-
countryCode?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Audit log event payload
|
|
36
|
-
* @type {object}
|
|
37
|
-
* @memberof InlineObject
|
|
38
|
-
*/
|
|
39
|
-
payload?: object;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {boolean}
|
|
43
|
-
* @memberof InlineObject
|
|
44
|
-
*/
|
|
45
|
-
isImpersonated?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* @type {boolean}
|
|
49
|
-
* @memberof InlineObject
|
|
50
|
-
*/
|
|
51
|
-
isSystem?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Audit log event namespace (business related)
|
|
54
|
-
* @type {string}
|
|
55
|
-
* @memberof InlineObject
|
|
56
|
-
*/
|
|
57
|
-
namespace: string;
|
|
58
|
-
/**
|
|
59
|
-
* Audit log event namespace (technical related)
|
|
60
|
-
* @type {string}
|
|
61
|
-
* @memberof InlineObject
|
|
62
|
-
*/
|
|
63
|
-
service: string;
|
|
64
|
-
/**
|
|
65
|
-
* Audit log event type
|
|
66
|
-
* @type {string}
|
|
67
|
-
* @memberof InlineObject
|
|
68
|
-
*/
|
|
69
|
-
event?: string;
|
|
70
|
-
/**
|
|
71
|
-
* Audit log event environment
|
|
72
|
-
* @type {string}
|
|
73
|
-
* @memberof InlineObject
|
|
74
|
-
*/
|
|
75
|
-
environment?: string;
|
|
76
|
-
/**
|
|
77
|
-
* Audit log event holdingId
|
|
78
|
-
* @type {string}
|
|
79
|
-
* @memberof InlineObject
|
|
80
|
-
*/
|
|
81
|
-
holdingId?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Audit log event companyId
|
|
84
|
-
* @type {string}
|
|
85
|
-
* @memberof InlineObject
|
|
86
|
-
*/
|
|
87
|
-
companyId?: string;
|
|
88
|
-
/**
|
|
89
|
-
* Audit log event employeeId
|
|
90
|
-
* @type {string}
|
|
91
|
-
* @memberof InlineObject
|
|
92
|
-
*/
|
|
93
|
-
employeeId?: string;
|
|
94
|
-
/**
|
|
95
|
-
* Audit log event individualId
|
|
96
|
-
* @type {string}
|
|
97
|
-
* @memberof InlineObject
|
|
98
|
-
*/
|
|
99
|
-
individualId?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Audit log event roleId
|
|
102
|
-
* @type {string}
|
|
103
|
-
* @memberof InlineObject
|
|
104
|
-
*/
|
|
105
|
-
roleId?: string;
|
|
106
|
-
/**
|
|
107
|
-
* Audit log event userIp
|
|
108
|
-
* @type {string}
|
|
109
|
-
* @memberof InlineObject
|
|
110
|
-
*/
|
|
111
|
-
userIp?: string;
|
|
112
|
-
/**
|
|
113
|
-
* Audit log event specialRole
|
|
114
|
-
* @type {string}
|
|
115
|
-
* @memberof InlineObject
|
|
116
|
-
*/
|
|
117
|
-
specialRole?: string;
|
|
118
|
-
/**
|
|
119
|
-
* Audit log event email
|
|
120
|
-
* @type {string}
|
|
121
|
-
* @memberof InlineObject
|
|
122
|
-
*/
|
|
123
|
-
email?: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { DefaultApi } from './generated'
|
|
2
|
-
import { IAuditLogTransport, IAuditLogCreationData } from './interface'
|
|
3
|
-
|
|
4
|
-
export class Transport implements IAuditLogTransport {
|
|
5
|
-
api: DefaultApi
|
|
6
|
-
|
|
7
|
-
constructor(protected apiUrl: string) {
|
|
8
|
-
this.api = new DefaultApi({
|
|
9
|
-
basePath: this.apiUrl,
|
|
10
|
-
})
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async create(auditLogData: IAuditLogCreationData) {
|
|
14
|
-
const { account, ...logDataWithoutAccount } = auditLogData
|
|
15
|
-
|
|
16
|
-
const dataToSend = {
|
|
17
|
-
...logDataWithoutAccount,
|
|
18
|
-
...account,
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
console.log(dataToSend)
|
|
22
|
-
|
|
23
|
-
await this.api.v1LogPost(dataToSend)
|
|
24
|
-
}
|
|
25
|
-
}
|
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
|
-
}
|