@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
package/src/index.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { v4 as uuidV4 } from 'uuid'
|
|
2
|
-
import { IAuditLogTransport } from './transport/interface'
|
|
3
|
-
import { Transport } from './transport/implementation'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Data to audit log.
|
|
7
|
-
*/
|
|
8
|
-
export interface IAuditLogData {
|
|
9
|
-
/**
|
|
10
|
-
* The data specific to the audit log.
|
|
11
|
-
* For example, if we add a bonus to an employee, it could contain the amount, the impacted employeeId, etc...
|
|
12
|
-
*/
|
|
13
|
-
payload?: object
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* The buisness domain impacted.
|
|
17
|
-
* e.g documents, authentication, ...
|
|
18
|
-
*/
|
|
19
|
-
namespace: string
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* The name of the event.
|
|
23
|
-
* e.g. signIn, passwordUpdated, ...
|
|
24
|
-
*/
|
|
25
|
-
event: string
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* The target of event.
|
|
29
|
-
* e.g. user.settings, employee.bonuses, ...
|
|
30
|
-
*/
|
|
31
|
-
target: string
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* The data that describes who did perform the logged action.
|
|
35
|
-
*/
|
|
36
|
-
account: IAuditLogAuthData
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* The scope of the audit log
|
|
40
|
-
*/
|
|
41
|
-
scope: IAuditLogScope
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Data used to indentify who performed an action
|
|
46
|
-
*/
|
|
47
|
-
export type IAuditLogAuthData =
|
|
48
|
-
| {
|
|
49
|
-
/**
|
|
50
|
-
* The id of the payfiter that did the action if it has been made during a siginAs
|
|
51
|
-
*/
|
|
52
|
-
internalId?: string
|
|
53
|
-
|
|
54
|
-
// the "account" infos
|
|
55
|
-
holdingId?: string
|
|
56
|
-
companyId?: string
|
|
57
|
-
employeeId?: string
|
|
58
|
-
individualId?: string
|
|
59
|
-
roleId?: string
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
countryCode?: string
|
|
65
|
-
/**
|
|
66
|
-
* The IP address of the user
|
|
67
|
-
*/
|
|
68
|
-
userIp?: string
|
|
69
|
-
/**
|
|
70
|
-
* The email address of the user
|
|
71
|
-
*/
|
|
72
|
-
email?: string
|
|
73
|
-
}
|
|
74
|
-
| {
|
|
75
|
-
/* Indicates that the action has been performed by the system */
|
|
76
|
-
isSystem: true
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Data used to "scope" the audit log.
|
|
81
|
-
* Might be useful to retrieve all actions performed in a holding, a company, or on an employee.
|
|
82
|
-
*/
|
|
83
|
-
export type IAuditLogScope =
|
|
84
|
-
| {
|
|
85
|
-
holdingId: string
|
|
86
|
-
}
|
|
87
|
-
| {
|
|
88
|
-
companyId: string
|
|
89
|
-
employeeId?: string
|
|
90
|
-
}
|
|
91
|
-
| {
|
|
92
|
-
individualId: string
|
|
93
|
-
}
|
|
94
|
-
| null
|
|
95
|
-
|
|
96
|
-
// warning: modifying this interface means probably make a breaking change to the SDK
|
|
97
|
-
export interface IAuditLogger {
|
|
98
|
-
log: (data: IAuditLogData) => Promise<void>
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface IAuditLoggerInitialization {
|
|
102
|
-
apiUrl: string
|
|
103
|
-
environment: string
|
|
104
|
-
service: string
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export class AuditLogger implements IAuditLogger {
|
|
108
|
-
private transport: IAuditLogTransport
|
|
109
|
-
|
|
110
|
-
constructor(protected params: IAuditLoggerInitialization) {
|
|
111
|
-
this.transport = new Transport(params.apiUrl)
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
async log({ scope, account, ...data }: IAuditLogData) {
|
|
115
|
-
const uuid = uuidV4()
|
|
116
|
-
const { environment, service } = this.params
|
|
117
|
-
const timestamp = Math.floor(Date.now() / 1000)
|
|
118
|
-
|
|
119
|
-
const log = {
|
|
120
|
-
...data,
|
|
121
|
-
...account,
|
|
122
|
-
service,
|
|
123
|
-
id: uuid,
|
|
124
|
-
environment,
|
|
125
|
-
timestamp,
|
|
126
|
-
...(scope && { scope }),
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
await this.transport.create(log)
|
|
130
|
-
}
|
|
131
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4.3.1
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# OpenAPI Generator Ignore
|
|
2
|
-
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
-
|
|
4
|
-
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
-
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
-
|
|
7
|
-
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
-
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
-
#ApiClient.cs
|
|
10
|
-
|
|
11
|
-
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
-
#foo/*/qux
|
|
13
|
-
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
-
|
|
15
|
-
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
-
#foo/**/qux
|
|
17
|
-
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
-
|
|
19
|
-
# You can also negate patterns with an exclamation (!).
|
|
20
|
-
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
-
#docs/*.md
|
|
22
|
-
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
-
#!docs/README.md
|
|
@@ -1,132 +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
|
-
import * as globalImportUrl from 'url';
|
|
16
|
-
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
|
17
|
-
import { Configuration } from '../configuration';
|
|
18
|
-
// Some imports not used depending on template conditions
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
import { InlineObject } from '../model';
|
|
23
|
-
/**
|
|
24
|
-
* DefaultApi - axios parameter creator
|
|
25
|
-
* @export
|
|
26
|
-
*/
|
|
27
|
-
export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
28
|
-
return {
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @summary Creates Audit Log event
|
|
32
|
-
* @param {InlineObject} inlineObject
|
|
33
|
-
* @param {*} [options] Override http request option.
|
|
34
|
-
* @throws {RequiredError}
|
|
35
|
-
*/
|
|
36
|
-
v1LogPost: async (inlineObject: InlineObject, options: any = {}): Promise<RequestArgs> => {
|
|
37
|
-
// verify required parameter 'inlineObject' is not null or undefined
|
|
38
|
-
if (inlineObject === null || inlineObject === undefined) {
|
|
39
|
-
throw new RequiredError('inlineObject','Required parameter inlineObject was null or undefined when calling v1LogPost.');
|
|
40
|
-
}
|
|
41
|
-
const localVarPath = `/v1/log`;
|
|
42
|
-
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
43
|
-
let baseOptions;
|
|
44
|
-
if (configuration) {
|
|
45
|
-
baseOptions = configuration.baseOptions;
|
|
46
|
-
}
|
|
47
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
48
|
-
const localVarHeaderParameter = {} as any;
|
|
49
|
-
const localVarQueryParameter = {} as any;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
54
|
-
|
|
55
|
-
localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
|
|
56
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
57
|
-
delete localVarUrlObj.search;
|
|
58
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
59
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
60
|
-
const needsSerialization = (typeof inlineObject !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
61
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(inlineObject !== undefined ? inlineObject : {}) : (inlineObject || "");
|
|
62
|
-
|
|
63
|
-
return {
|
|
64
|
-
url: globalImportUrl.format(localVarUrlObj),
|
|
65
|
-
options: localVarRequestOptions,
|
|
66
|
-
};
|
|
67
|
-
},
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* DefaultApi - functional programming interface
|
|
73
|
-
* @export
|
|
74
|
-
*/
|
|
75
|
-
export const DefaultApiFp = function(configuration?: Configuration) {
|
|
76
|
-
return {
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
* @summary Creates Audit Log event
|
|
80
|
-
* @param {InlineObject} inlineObject
|
|
81
|
-
* @param {*} [options] Override http request option.
|
|
82
|
-
* @throws {RequiredError}
|
|
83
|
-
*/
|
|
84
|
-
async v1LogPost(inlineObject: InlineObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
85
|
-
const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).v1LogPost(inlineObject, options);
|
|
86
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
87
|
-
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
88
|
-
return axios.request(axiosRequestArgs);
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* DefaultApi - factory interface
|
|
96
|
-
* @export
|
|
97
|
-
*/
|
|
98
|
-
export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
99
|
-
return {
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* @summary Creates Audit Log event
|
|
103
|
-
* @param {InlineObject} inlineObject
|
|
104
|
-
* @param {*} [options] Override http request option.
|
|
105
|
-
* @throws {RequiredError}
|
|
106
|
-
*/
|
|
107
|
-
v1LogPost(inlineObject: InlineObject, options?: any): AxiosPromise<void> {
|
|
108
|
-
return DefaultApiFp(configuration).v1LogPost(inlineObject, options).then((request) => request(axios, basePath));
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* DefaultApi - object-oriented interface
|
|
115
|
-
* @export
|
|
116
|
-
* @class DefaultApi
|
|
117
|
-
* @extends {BaseAPI}
|
|
118
|
-
*/
|
|
119
|
-
export class DefaultApi extends BaseAPI {
|
|
120
|
-
/**
|
|
121
|
-
*
|
|
122
|
-
* @summary Creates Audit Log event
|
|
123
|
-
* @param {InlineObject} inlineObject
|
|
124
|
-
* @param {*} [options] Override http request option.
|
|
125
|
-
* @throws {RequiredError}
|
|
126
|
-
* @memberof DefaultApi
|
|
127
|
-
*/
|
|
128
|
-
public v1LogPost(inlineObject: InlineObject, options?: any) {
|
|
129
|
-
return DefaultApiFp(this.configuration).v1LogPost(inlineObject, options).then((request) => request(this.axios, this.basePath));
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
}
|
|
@@ -1,17 +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
|
-
export * from './api/default-api';
|
|
17
|
-
|
|
@@ -1,70 +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
|
-
import { Configuration } from "./configuration";
|
|
16
|
-
// Some imports not used depending on template conditions
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
|
19
|
-
|
|
20
|
-
export const BASE_PATH = "http://localhost:8090".replace(/\/+$/, "");
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @export
|
|
25
|
-
*/
|
|
26
|
-
export const COLLECTION_FORMATS = {
|
|
27
|
-
csv: ",",
|
|
28
|
-
ssv: " ",
|
|
29
|
-
tsv: "\t",
|
|
30
|
-
pipes: "|",
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* @export
|
|
36
|
-
* @interface RequestArgs
|
|
37
|
-
*/
|
|
38
|
-
export interface RequestArgs {
|
|
39
|
-
url: string;
|
|
40
|
-
options: any;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @export
|
|
46
|
-
* @class BaseAPI
|
|
47
|
-
*/
|
|
48
|
-
export class BaseAPI {
|
|
49
|
-
protected configuration: Configuration | undefined;
|
|
50
|
-
|
|
51
|
-
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
52
|
-
if (configuration) {
|
|
53
|
-
this.configuration = configuration;
|
|
54
|
-
this.basePath = configuration.basePath || this.basePath;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @export
|
|
62
|
-
* @class RequiredError
|
|
63
|
-
* @extends {Error}
|
|
64
|
-
*/
|
|
65
|
-
export class RequiredError extends Error {
|
|
66
|
-
name: "RequiredError" = "RequiredError";
|
|
67
|
-
constructor(public field: string, msg?: string) {
|
|
68
|
-
super(msg);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,75 +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 interface ConfigurationParameters {
|
|
16
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
17
|
-
username?: string;
|
|
18
|
-
password?: string;
|
|
19
|
-
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
|
20
|
-
basePath?: string;
|
|
21
|
-
baseOptions?: any;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class Configuration {
|
|
25
|
-
/**
|
|
26
|
-
* parameter for apiKey security
|
|
27
|
-
* @param name security name
|
|
28
|
-
* @memberof Configuration
|
|
29
|
-
*/
|
|
30
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
31
|
-
/**
|
|
32
|
-
* parameter for basic security
|
|
33
|
-
*
|
|
34
|
-
* @type {string}
|
|
35
|
-
* @memberof Configuration
|
|
36
|
-
*/
|
|
37
|
-
username?: string;
|
|
38
|
-
/**
|
|
39
|
-
* parameter for basic security
|
|
40
|
-
*
|
|
41
|
-
* @type {string}
|
|
42
|
-
* @memberof Configuration
|
|
43
|
-
*/
|
|
44
|
-
password?: string;
|
|
45
|
-
/**
|
|
46
|
-
* parameter for oauth2 security
|
|
47
|
-
* @param name security name
|
|
48
|
-
* @param scopes oauth2 scope
|
|
49
|
-
* @memberof Configuration
|
|
50
|
-
*/
|
|
51
|
-
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
|
52
|
-
/**
|
|
53
|
-
* override base path
|
|
54
|
-
*
|
|
55
|
-
* @type {string}
|
|
56
|
-
* @memberof Configuration
|
|
57
|
-
*/
|
|
58
|
-
basePath?: string;
|
|
59
|
-
/**
|
|
60
|
-
* base options for axios calls
|
|
61
|
-
*
|
|
62
|
-
* @type {any}
|
|
63
|
-
* @memberof Configuration
|
|
64
|
-
*/
|
|
65
|
-
baseOptions?: any;
|
|
66
|
-
|
|
67
|
-
constructor(param: ConfigurationParameters = {}) {
|
|
68
|
-
this.apiKey = param.apiKey;
|
|
69
|
-
this.username = param.username;
|
|
70
|
-
this.password = param.password;
|
|
71
|
-
this.accessToken = param.accessToken;
|
|
72
|
-
this.basePath = param.basePath;
|
|
73
|
-
this.baseOptions = param.baseOptions;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -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,144 +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
|
-
* id of the payfiter who performed the audit log action, if signed as.
|
|
42
|
-
* @type {string}
|
|
43
|
-
* @memberof InlineObject
|
|
44
|
-
*/
|
|
45
|
-
internalId?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Tells whether the logged action has been made by the system
|
|
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 target
|
|
72
|
-
* @type {string}
|
|
73
|
-
* @memberof InlineObject
|
|
74
|
-
*/
|
|
75
|
-
target: string;
|
|
76
|
-
/**
|
|
77
|
-
* Audit log event environment, only required when in todd context
|
|
78
|
-
* @type {string}
|
|
79
|
-
* @memberof InlineObject
|
|
80
|
-
*/
|
|
81
|
-
environment?: string;
|
|
82
|
-
/**
|
|
83
|
-
* holdingId of the account performing the event
|
|
84
|
-
* @type {string}
|
|
85
|
-
* @memberof InlineObject
|
|
86
|
-
*/
|
|
87
|
-
holdingId?: string;
|
|
88
|
-
/**
|
|
89
|
-
* companyId of the account performing the event
|
|
90
|
-
* @type {string}
|
|
91
|
-
* @memberof InlineObject
|
|
92
|
-
*/
|
|
93
|
-
companyId?: string;
|
|
94
|
-
/**
|
|
95
|
-
* employeeId of the account performing the event
|
|
96
|
-
* @type {string}
|
|
97
|
-
* @memberof InlineObject
|
|
98
|
-
*/
|
|
99
|
-
employeeId?: string;
|
|
100
|
-
/**
|
|
101
|
-
* individualId of the account performing the event
|
|
102
|
-
* @type {string}
|
|
103
|
-
* @memberof InlineObject
|
|
104
|
-
*/
|
|
105
|
-
individualId?: string;
|
|
106
|
-
/**
|
|
107
|
-
* roleId of the account performing the event
|
|
108
|
-
* @type {string}
|
|
109
|
-
* @memberof InlineObject
|
|
110
|
-
*/
|
|
111
|
-
roleId?: string;
|
|
112
|
-
/**
|
|
113
|
-
* userIp of the account performing the event
|
|
114
|
-
* @type {string}
|
|
115
|
-
* @memberof InlineObject
|
|
116
|
-
*/
|
|
117
|
-
userIp?: string;
|
|
118
|
-
/**
|
|
119
|
-
* specialRole of the account performing the event
|
|
120
|
-
* @type {string}
|
|
121
|
-
* @memberof InlineObject
|
|
122
|
-
*/
|
|
123
|
-
specialRole?: string;
|
|
124
|
-
/**
|
|
125
|
-
* email of the account performing the event
|
|
126
|
-
* @type {string}
|
|
127
|
-
* @memberof InlineObject
|
|
128
|
-
*/
|
|
129
|
-
email?: string;
|
|
130
|
-
/**
|
|
131
|
-
* Audit log event scope
|
|
132
|
-
* @type {object}
|
|
133
|
-
* @memberof InlineObject
|
|
134
|
-
*/
|
|
135
|
-
scope?: object;
|
|
136
|
-
/**
|
|
137
|
-
* Audit log event timestamp unix format
|
|
138
|
-
* @type {number}
|
|
139
|
-
* @memberof InlineObject
|
|
140
|
-
*/
|
|
141
|
-
timestamp: number;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|