mblabs-roccato-backend-commons 1.0.8 → 1.1.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/bitbucket-pipelines.yml +6 -48
- package/dist/database/entities/account.d.ts +1 -2
- package/dist/database/entities/account.js +2 -7
- package/dist/database/entities/address.d.ts +2 -1
- package/dist/database/entities/address.js +6 -5
- package/dist/database/entities/company-address.d.ts +10 -0
- package/dist/database/entities/company-address.js +51 -0
- package/dist/database/entities/company.d.ts +13 -0
- package/dist/database/entities/company.js +68 -0
- package/dist/database/entities/index.d.ts +3 -1
- package/dist/database/entities/index.js +5 -1
- package/dist/database/migrations/1748448589934-CreateAccountsTable.js +1 -6
- package/dist/database/migrations/1750432386920-CreateAddressTable.js +0 -5
- package/dist/database/migrations/{1750691840822-CreateAccountDetailsTable.d.ts → 1750437883213-CreateCompanyTable.d.ts} +1 -1
- package/dist/database/migrations/{1750691840822-CreateAccountDetailsTable.js → 1750437883213-CreateCompanyTable.js} +35 -23
- package/dist/database/migrations/{1750690818577-CreateAccountAddressTable.d.ts → 1750440116105-CreateCompanyAddressTable.d.ts} +1 -1
- package/dist/database/migrations/{1750690818577-CreateAccountAddressTable.js → 1750440116105-CreateCompanyAddressTable.js} +14 -21
- package/dist/database/migrations/index.d.ts +1 -29
- package/dist/database/migrations/index.js +18 -18
- package/dist/interfaces/aws.d.ts +41 -67
- package/dist/interfaces/azure.d.ts +38 -61
- package/dist/interfaces/firebase.d.ts +3 -7
- package/dist/interfaces/gcp.d.ts +5 -11
- package/dist/interfaces/grafana.d.ts +2 -6
- package/dist/interfaces/keycloak.d.ts +4 -171
- package/dist/interfaces/nodemailer.d.ts +16 -20
- package/dist/interfaces/redis.d.ts +8 -49
- package/dist/interfaces/sendgrid.d.ts +13 -15
- package/dist/services/aws/cloudwatch.d.ts +1 -1
- package/dist/services/aws/cloudwatch.js +38 -38
- package/dist/services/aws/pinpoint.d.ts +3 -3
- package/dist/services/aws/pinpoint.js +29 -29
- package/dist/services/aws/s3.d.ts +5 -5
- package/dist/services/aws/s3.js +55 -59
- package/dist/services/aws/secret-manager.d.ts +1 -1
- package/dist/services/aws/secret-manager.js +5 -5
- package/dist/services/aws/sqs.d.ts +3 -3
- package/dist/services/aws/sqs.js +16 -16
- package/dist/services/azure/application-insights.d.ts +4 -4
- package/dist/services/azure/application-insights.js +12 -12
- package/dist/services/azure/communication.d.ts +3 -3
- package/dist/services/azure/communication.js +17 -17
- package/dist/services/azure/keyvault.d.ts +1 -1
- package/dist/services/azure/keyvault.js +3 -3
- package/dist/services/azure/storage-blob.d.ts +3 -3
- package/dist/services/azure/storage-blob.js +22 -22
- package/dist/services/firebase.d.ts +2 -2
- package/dist/services/firebase.js +10 -12
- package/dist/services/gcp/drive.d.ts +1 -1
- package/dist/services/gcp/drive.js +4 -4
- package/dist/services/gcp/secrets.d.ts +1 -1
- package/dist/services/gcp/secrets.js +8 -6
- package/dist/services/gcp/sheets.d.ts +1 -1
- package/dist/services/gcp/sheets.js +6 -6
- package/dist/services/grafana.d.ts +2 -2
- package/dist/services/grafana.js +12 -12
- package/dist/services/keycloak.d.ts +2 -14
- package/dist/services/keycloak.js +24 -300
- package/dist/services/nodemailer.d.ts +2 -2
- package/dist/services/nodemailer.js +109 -19
- package/dist/services/redis.d.ts +8 -6
- package/dist/services/redis.js +24 -53
- package/dist/services/sendgrid.d.ts +1 -1
- package/dist/services/sendgrid.js +10 -10
- package/package.json +1 -1
- package/src/database/entities/account.ts +3 -5
- package/src/database/entities/address.ts +7 -4
- package/src/database/entities/company-address.ts +27 -0
- package/src/database/entities/company.ts +36 -0
- package/src/database/entities/index.ts +4 -0
- package/src/database/migrations/1748448589934-CreateAccountsTable.ts +1 -6
- package/src/database/migrations/1750432386920-CreateAddressTable.ts +0 -5
- package/src/database/migrations/{1750691840822-CreateAccountDetailsTable.ts → 1750437883213-CreateCompanyTable.ts} +35 -21
- package/src/database/migrations/{1750690818577-CreateAccountAddressTable.ts → 1750440116105-CreateCompanyAddressTable.ts} +14 -24
- package/src/database/migrations/index.ts +6 -6
- package/src/interfaces/aws.ts +55 -81
- package/src/interfaces/azure.ts +50 -71
- package/src/interfaces/firebase.ts +6 -10
- package/src/interfaces/gcp.ts +8 -14
- package/src/interfaces/grafana.ts +5 -9
- package/src/interfaces/keycloak.ts +7 -190
- package/src/interfaces/nodemailer.ts +18 -22
- package/src/interfaces/redis.ts +8 -54
- package/src/interfaces/sendgrid.ts +14 -16
- package/src/services/aws/cloudwatch.ts +39 -39
- package/src/services/aws/pinpoint.ts +30 -30
- package/src/services/aws/s3.ts +55 -59
- package/src/services/aws/secret-manager.ts +7 -8
- package/src/services/aws/sqs.ts +17 -23
- package/src/services/azure/application-insights.ts +12 -12
- package/src/services/azure/communication.ts +18 -18
- package/src/services/azure/keyvault.ts +3 -3
- package/src/services/azure/storage-blob.ts +30 -34
- package/src/services/firebase.ts +11 -21
- package/src/services/gcp/drive.ts +5 -8
- package/src/services/gcp/secrets.ts +10 -9
- package/src/services/gcp/sheets.ts +7 -10
- package/src/services/grafana.ts +12 -18
- package/src/services/keycloak.ts +25 -381
- package/src/services/nodemailer.ts +110 -19
- package/src/services/redis.ts +22 -58
- package/src/services/sendgrid.ts +11 -11
package/dist/interfaces/aws.d.ts
CHANGED
|
@@ -16,12 +16,10 @@ interface UploadOptions {
|
|
|
16
16
|
export declare namespace AmazonCloudwatch {
|
|
17
17
|
namespace CreateLogEvent {
|
|
18
18
|
interface Request {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
events: InputLogEvent[];
|
|
24
|
-
};
|
|
19
|
+
application: string;
|
|
20
|
+
group: string;
|
|
21
|
+
stream: string;
|
|
22
|
+
events: InputLogEvent[];
|
|
25
23
|
credentials: Credentials;
|
|
26
24
|
}
|
|
27
25
|
}
|
|
@@ -29,39 +27,33 @@ export declare namespace AmazonCloudwatch {
|
|
|
29
27
|
export declare namespace AmazonPinpoint {
|
|
30
28
|
namespace SendMail {
|
|
31
29
|
interface Request {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
variables?: Record<string, string | number>;
|
|
39
|
-
};
|
|
30
|
+
applicationId: string;
|
|
31
|
+
subject: string;
|
|
32
|
+
text: string;
|
|
33
|
+
emails: string | string[];
|
|
34
|
+
from: string;
|
|
35
|
+
variables?: Record<string, string | number>;
|
|
40
36
|
credentials: Credentials;
|
|
41
37
|
}
|
|
42
38
|
}
|
|
43
39
|
namespace SendTemplateMail {
|
|
44
40
|
interface Request {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
variables?: Record<string, string | number>;
|
|
51
|
-
};
|
|
41
|
+
applicationId: string;
|
|
42
|
+
template: string;
|
|
43
|
+
emails: string | string[];
|
|
44
|
+
from: string;
|
|
45
|
+
variables?: Record<string, string | number>;
|
|
52
46
|
credentials: Credentials;
|
|
53
47
|
}
|
|
54
48
|
}
|
|
55
49
|
namespace SendSMS {
|
|
56
50
|
interface Request {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
variables?: Record<string, string | number>;
|
|
64
|
-
};
|
|
51
|
+
applicationId: string;
|
|
52
|
+
sender: string;
|
|
53
|
+
text: string;
|
|
54
|
+
phones: string | string[];
|
|
55
|
+
type?: 'PROMOTIONAL' | 'TRANSACTIONAL';
|
|
56
|
+
variables?: Record<string, string | number>;
|
|
65
57
|
credentials: Credentials;
|
|
66
58
|
}
|
|
67
59
|
}
|
|
@@ -69,12 +61,10 @@ export declare namespace AmazonPinpoint {
|
|
|
69
61
|
export declare namespace AmazonS3 {
|
|
70
62
|
namespace GetSignedUrl {
|
|
71
63
|
interface Request {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
isUpload?: boolean;
|
|
77
|
-
};
|
|
64
|
+
filename: string;
|
|
65
|
+
bucket: string;
|
|
66
|
+
folder?: string;
|
|
67
|
+
isUpload?: boolean;
|
|
78
68
|
credentials: Credentials;
|
|
79
69
|
}
|
|
80
70
|
interface Response {
|
|
@@ -83,11 +73,9 @@ export declare namespace AmazonS3 {
|
|
|
83
73
|
}
|
|
84
74
|
namespace UploadBase64 {
|
|
85
75
|
interface Request {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
options?: UploadOptions;
|
|
90
|
-
};
|
|
76
|
+
file: string;
|
|
77
|
+
bucket: string;
|
|
78
|
+
options?: UploadOptions;
|
|
91
79
|
credentials: Credentials;
|
|
92
80
|
}
|
|
93
81
|
interface Response {
|
|
@@ -98,11 +86,9 @@ export declare namespace AmazonS3 {
|
|
|
98
86
|
}
|
|
99
87
|
namespace UploadBuffer {
|
|
100
88
|
interface Request {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
options?: UploadOptions;
|
|
105
|
-
};
|
|
89
|
+
file: Buffer;
|
|
90
|
+
bucket: string;
|
|
91
|
+
options?: UploadOptions;
|
|
106
92
|
credentials: Credentials;
|
|
107
93
|
}
|
|
108
94
|
interface Response {
|
|
@@ -113,20 +99,16 @@ export declare namespace AmazonS3 {
|
|
|
113
99
|
}
|
|
114
100
|
namespace DeleteFile {
|
|
115
101
|
interface Request {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
folder?: string;
|
|
120
|
-
};
|
|
102
|
+
filename: string;
|
|
103
|
+
bucket: string;
|
|
104
|
+
folder?: string;
|
|
121
105
|
credentials: Credentials;
|
|
122
106
|
}
|
|
123
107
|
}
|
|
124
108
|
namespace ListFiles {
|
|
125
109
|
interface Request {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
folder?: string;
|
|
129
|
-
};
|
|
110
|
+
bucket: string;
|
|
111
|
+
folder?: string;
|
|
130
112
|
credentials: Credentials;
|
|
131
113
|
}
|
|
132
114
|
interface Response {
|
|
@@ -137,9 +119,7 @@ export declare namespace AmazonS3 {
|
|
|
137
119
|
export declare namespace AmazonSecretManager {
|
|
138
120
|
namespace GetSecret {
|
|
139
121
|
interface Request {
|
|
140
|
-
|
|
141
|
-
secret: string;
|
|
142
|
-
};
|
|
122
|
+
secretId: string;
|
|
143
123
|
credentials: Credentials;
|
|
144
124
|
}
|
|
145
125
|
interface Response<T> {
|
|
@@ -150,18 +130,14 @@ export declare namespace AmazonSecretManager {
|
|
|
150
130
|
export declare namespace AmazonSQS {
|
|
151
131
|
namespace PublishMessage {
|
|
152
132
|
interface Request {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
message: unknown;
|
|
156
|
-
};
|
|
133
|
+
queue: string;
|
|
134
|
+
message: unknown;
|
|
157
135
|
credentials: Credentials;
|
|
158
136
|
}
|
|
159
137
|
}
|
|
160
138
|
namespace ConsumeMessage {
|
|
161
139
|
interface Request {
|
|
162
|
-
|
|
163
|
-
queue: string;
|
|
164
|
-
};
|
|
140
|
+
queue: string;
|
|
165
141
|
credentials: Credentials;
|
|
166
142
|
}
|
|
167
143
|
interface Response<T> {
|
|
@@ -170,9 +146,7 @@ export declare namespace AmazonSQS {
|
|
|
170
146
|
}
|
|
171
147
|
namespace ConsumeMessages {
|
|
172
148
|
interface Request {
|
|
173
|
-
|
|
174
|
-
queue: string;
|
|
175
|
-
};
|
|
149
|
+
queue: string;
|
|
176
150
|
credentials: Credentials;
|
|
177
151
|
}
|
|
178
152
|
interface Response<T> {
|
|
@@ -6,38 +6,30 @@ interface Credentials {
|
|
|
6
6
|
export declare namespace AzureApplicationInsights {
|
|
7
7
|
namespace TrackTrace {
|
|
8
8
|
interface Request {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
severity: string;
|
|
12
|
-
};
|
|
9
|
+
message: string;
|
|
10
|
+
severity: string;
|
|
13
11
|
credentials: Credentials;
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
14
|
namespace TrackEvent {
|
|
17
15
|
interface Request {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[key: string]: string;
|
|
22
|
-
};
|
|
16
|
+
name: string;
|
|
17
|
+
properties?: {
|
|
18
|
+
[key: string]: string;
|
|
23
19
|
};
|
|
24
20
|
credentials: Credentials;
|
|
25
21
|
}
|
|
26
22
|
}
|
|
27
23
|
namespace TrackException {
|
|
28
24
|
interface Request {
|
|
29
|
-
|
|
30
|
-
error: Error;
|
|
31
|
-
};
|
|
25
|
+
error: Error;
|
|
32
26
|
credentials: Credentials;
|
|
33
27
|
}
|
|
34
28
|
}
|
|
35
29
|
namespace TrackMetric {
|
|
36
30
|
interface Request {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
value: number;
|
|
40
|
-
};
|
|
31
|
+
name: string;
|
|
32
|
+
value: number;
|
|
41
33
|
credentials: Credentials;
|
|
42
34
|
}
|
|
43
35
|
}
|
|
@@ -45,35 +37,29 @@ export declare namespace AzureApplicationInsights {
|
|
|
45
37
|
export declare namespace AzureCommunication {
|
|
46
38
|
namespace SendMail {
|
|
47
39
|
interface Request {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
variables?: Record<string, string | number>;
|
|
54
|
-
};
|
|
40
|
+
subject: string;
|
|
41
|
+
text: string;
|
|
42
|
+
emails: string | string[];
|
|
43
|
+
from: string;
|
|
44
|
+
variables?: Record<string, string | number>;
|
|
55
45
|
credentials: Credentials;
|
|
56
46
|
}
|
|
57
47
|
}
|
|
58
48
|
namespace SendTemplateMail {
|
|
59
49
|
interface Request {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
variables?: Record<string, string | number>;
|
|
66
|
-
};
|
|
50
|
+
subject: string;
|
|
51
|
+
template: string;
|
|
52
|
+
emails: string | string[];
|
|
53
|
+
from: string;
|
|
54
|
+
variables?: Record<string, string | number>;
|
|
67
55
|
credentials: Credentials;
|
|
68
56
|
}
|
|
69
57
|
}
|
|
70
58
|
namespace SendSMS {
|
|
71
59
|
interface Request {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
phones: string | string[];
|
|
76
|
-
};
|
|
60
|
+
sender: string;
|
|
61
|
+
text: string;
|
|
62
|
+
phones: string | string[];
|
|
77
63
|
credentials: Credentials;
|
|
78
64
|
}
|
|
79
65
|
}
|
|
@@ -81,11 +67,8 @@ export declare namespace AzureCommunication {
|
|
|
81
67
|
export declare namespace AzureKeyVault {
|
|
82
68
|
namespace GetSecret {
|
|
83
69
|
interface Request {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
secretName: string;
|
|
87
|
-
};
|
|
88
|
-
credentials: Credentials;
|
|
70
|
+
vault: string;
|
|
71
|
+
secretName: string;
|
|
89
72
|
}
|
|
90
73
|
interface Response<T> {
|
|
91
74
|
secret: T;
|
|
@@ -95,22 +78,18 @@ export declare namespace AzureKeyVault {
|
|
|
95
78
|
export declare namespace AzureStorageBlob {
|
|
96
79
|
namespace UploadBuffer {
|
|
97
80
|
interface Request {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
file: Buffer;
|
|
103
|
-
};
|
|
81
|
+
storageContainer: string;
|
|
82
|
+
storageUrl: string;
|
|
83
|
+
filename: string;
|
|
84
|
+
file: Buffer;
|
|
104
85
|
credentials: Credentials;
|
|
105
86
|
}
|
|
106
87
|
}
|
|
107
88
|
namespace DownloadBuffer {
|
|
108
89
|
interface Request {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
filename: string;
|
|
113
|
-
};
|
|
90
|
+
storageContainer: string;
|
|
91
|
+
storageUrl: string;
|
|
92
|
+
filename: string;
|
|
114
93
|
credentials: Credentials;
|
|
115
94
|
}
|
|
116
95
|
interface Response {
|
|
@@ -119,16 +98,14 @@ export declare namespace AzureStorageBlob {
|
|
|
119
98
|
}
|
|
120
99
|
namespace GetPreSignedUrl {
|
|
121
100
|
interface Request {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
contentEncoding?: string;
|
|
131
|
-
};
|
|
101
|
+
filename: string;
|
|
102
|
+
storageContainer: string;
|
|
103
|
+
storageUrl: string;
|
|
104
|
+
options?: {
|
|
105
|
+
version?: string;
|
|
106
|
+
hoursToExpire?: number;
|
|
107
|
+
contentType?: string;
|
|
108
|
+
contentEncoding?: string;
|
|
132
109
|
};
|
|
133
110
|
credentials: Credentials;
|
|
134
111
|
}
|
|
@@ -7,18 +7,14 @@ interface Credentials {
|
|
|
7
7
|
export declare namespace Firebase {
|
|
8
8
|
namespace SendNotification {
|
|
9
9
|
interface Request {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
isTest: boolean;
|
|
13
|
-
};
|
|
10
|
+
message: FirebaseAdmin.messaging.MulticastMessage;
|
|
11
|
+
isTest: boolean;
|
|
14
12
|
credentials: Credentials;
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
namespace PublishConfig {
|
|
18
16
|
interface Request {
|
|
19
|
-
|
|
20
|
-
template: string;
|
|
21
|
-
};
|
|
17
|
+
template: string;
|
|
22
18
|
credentials: Credentials;
|
|
23
19
|
}
|
|
24
20
|
}
|
package/dist/interfaces/gcp.d.ts
CHANGED
|
@@ -5,9 +5,7 @@ interface Credentials {
|
|
|
5
5
|
export declare namespace GoogleDrive {
|
|
6
6
|
namespace ReadFile {
|
|
7
7
|
interface Request {
|
|
8
|
-
|
|
9
|
-
file: string;
|
|
10
|
-
};
|
|
8
|
+
fileId: string;
|
|
11
9
|
credentials: Credentials;
|
|
12
10
|
}
|
|
13
11
|
interface Response {
|
|
@@ -18,10 +16,8 @@ export declare namespace GoogleDrive {
|
|
|
18
16
|
export declare namespace GoogleSheets {
|
|
19
17
|
namespace ReadSheet {
|
|
20
18
|
interface Request {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
tabs: string[];
|
|
24
|
-
};
|
|
19
|
+
spreadsheetId: string;
|
|
20
|
+
tabs: string[];
|
|
25
21
|
credentials: Credentials;
|
|
26
22
|
}
|
|
27
23
|
interface Response {
|
|
@@ -32,10 +28,8 @@ export declare namespace GoogleSheets {
|
|
|
32
28
|
export declare namespace GoogleSecrets {
|
|
33
29
|
namespace GetSecret {
|
|
34
30
|
interface Request {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
secret: string;
|
|
38
|
-
};
|
|
31
|
+
projectId: string;
|
|
32
|
+
secretId: string;
|
|
39
33
|
credentials: Credentials;
|
|
40
34
|
}
|
|
41
35
|
interface Response<T> {
|
|
@@ -5,9 +5,7 @@ interface Credentials {
|
|
|
5
5
|
export declare namespace Grafana {
|
|
6
6
|
namespace GetDashboard {
|
|
7
7
|
interface Request {
|
|
8
|
-
|
|
9
|
-
uid: string;
|
|
10
|
-
};
|
|
8
|
+
uid: string;
|
|
11
9
|
credentials: Credentials;
|
|
12
10
|
}
|
|
13
11
|
interface Response {
|
|
@@ -16,9 +14,7 @@ export declare namespace Grafana {
|
|
|
16
14
|
}
|
|
17
15
|
namespace SearchDashboard {
|
|
18
16
|
interface Request {
|
|
19
|
-
|
|
20
|
-
query: string;
|
|
21
|
-
};
|
|
17
|
+
query: string;
|
|
22
18
|
credentials: Credentials;
|
|
23
19
|
}
|
|
24
20
|
interface Response {
|
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
interface Credentials {
|
|
2
|
-
clientId: string;
|
|
3
2
|
realm: string;
|
|
3
|
+
clientId: string;
|
|
4
4
|
clientSecret: string;
|
|
5
5
|
grantType: string;
|
|
6
6
|
}
|
|
7
|
-
export interface Roles {
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
}
|
|
12
7
|
export declare namespace Keycloak {
|
|
13
8
|
namespace Authenticate {
|
|
14
9
|
interface Request {
|
|
15
10
|
url: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
password: string;
|
|
19
|
-
};
|
|
20
|
-
credentials: Credentials;
|
|
21
|
-
}
|
|
22
|
-
interface Response {
|
|
23
|
-
access_token: string;
|
|
24
|
-
expires_in: number;
|
|
25
|
-
refresh_expires_in: number;
|
|
26
|
-
refresh_token: string;
|
|
27
|
-
token_type: string;
|
|
28
|
-
profileType?: number;
|
|
29
|
-
active?: boolean;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
namespace AuthenticateServer {
|
|
33
|
-
interface Request {
|
|
34
|
-
url: string;
|
|
11
|
+
username: string;
|
|
12
|
+
password: string;
|
|
35
13
|
credentials: Credentials;
|
|
36
14
|
}
|
|
37
15
|
interface Response {
|
|
@@ -47,9 +25,7 @@ export declare namespace Keycloak {
|
|
|
47
25
|
namespace RefreshAccess {
|
|
48
26
|
interface Request {
|
|
49
27
|
url: string;
|
|
50
|
-
|
|
51
|
-
refreshToken: string;
|
|
52
|
-
};
|
|
28
|
+
refreshToken: string;
|
|
53
29
|
credentials: Credentials;
|
|
54
30
|
}
|
|
55
31
|
interface Response {
|
|
@@ -62,152 +38,9 @@ export declare namespace Keycloak {
|
|
|
62
38
|
active?: boolean;
|
|
63
39
|
}
|
|
64
40
|
}
|
|
65
|
-
namespace RevokeAccess {
|
|
66
|
-
interface Request {
|
|
67
|
-
url: string;
|
|
68
|
-
data: {
|
|
69
|
-
accessToken: string;
|
|
70
|
-
};
|
|
71
|
-
credentials: Credentials;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
namespace CreateUser {
|
|
75
|
-
interface Request {
|
|
76
|
-
url: string;
|
|
77
|
-
data: {
|
|
78
|
-
username: string;
|
|
79
|
-
firstName: string;
|
|
80
|
-
lastName?: string;
|
|
81
|
-
email: string;
|
|
82
|
-
password: string;
|
|
83
|
-
isTemporaryPassword?: boolean;
|
|
84
|
-
groups: string[];
|
|
85
|
-
};
|
|
86
|
-
credentials: Credentials;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
namespace UpdateUser {
|
|
90
|
-
interface Request {
|
|
91
|
-
url: string;
|
|
92
|
-
data: {
|
|
93
|
-
id: string;
|
|
94
|
-
username?: string;
|
|
95
|
-
firstName?: string;
|
|
96
|
-
lastName?: string;
|
|
97
|
-
email?: string;
|
|
98
|
-
password?: string;
|
|
99
|
-
isTemporaryPassword?: boolean;
|
|
100
|
-
groups?: string[];
|
|
101
|
-
};
|
|
102
|
-
credentials: Credentials;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
namespace GetUser {
|
|
106
|
-
interface Request {
|
|
107
|
-
url: string;
|
|
108
|
-
data: {
|
|
109
|
-
id: string;
|
|
110
|
-
};
|
|
111
|
-
credentials: Credentials;
|
|
112
|
-
}
|
|
113
|
-
interface Response {
|
|
114
|
-
id: string;
|
|
115
|
-
sub: string;
|
|
116
|
-
firstName: string;
|
|
117
|
-
lastName: string;
|
|
118
|
-
email: string;
|
|
119
|
-
enabled: boolean;
|
|
120
|
-
attributes: {
|
|
121
|
-
isFirstAccess: boolean;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
namespace DeleteUser {
|
|
126
|
-
interface Request {
|
|
127
|
-
url: string;
|
|
128
|
-
data: {
|
|
129
|
-
id: string;
|
|
130
|
-
};
|
|
131
|
-
credentials: Credentials;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
namespace ChangeUserPassword {
|
|
135
|
-
interface Request {
|
|
136
|
-
url: string;
|
|
137
|
-
data: {
|
|
138
|
-
id: string;
|
|
139
|
-
password: string;
|
|
140
|
-
isTemporaryPassword?: boolean;
|
|
141
|
-
};
|
|
142
|
-
credentials: Credentials;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
namespace AddRealm {
|
|
146
|
-
interface Request {
|
|
147
|
-
url: string;
|
|
148
|
-
data: {
|
|
149
|
-
name: string;
|
|
150
|
-
enabled: boolean;
|
|
151
|
-
};
|
|
152
|
-
credentials: Credentials;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
namespace AddRole {
|
|
156
|
-
interface Request {
|
|
157
|
-
url: string;
|
|
158
|
-
data: {
|
|
159
|
-
name: string;
|
|
160
|
-
description: string;
|
|
161
|
-
};
|
|
162
|
-
credentials: Credentials;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
namespace AssociateUserRole {
|
|
166
|
-
interface Request {
|
|
167
|
-
url: string;
|
|
168
|
-
data: {
|
|
169
|
-
user: string;
|
|
170
|
-
role: string;
|
|
171
|
-
};
|
|
172
|
-
credentials: Credentials;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
namespace GetRoles {
|
|
176
|
-
interface Request {
|
|
177
|
-
url: string;
|
|
178
|
-
data: {
|
|
179
|
-
search: string;
|
|
180
|
-
};
|
|
181
|
-
credentials: Credentials;
|
|
182
|
-
}
|
|
183
|
-
interface Response {
|
|
184
|
-
roles: Roles[];
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
namespace DeleteRole {
|
|
188
|
-
interface Request {
|
|
189
|
-
url: string;
|
|
190
|
-
data: {
|
|
191
|
-
id: string;
|
|
192
|
-
};
|
|
193
|
-
credentials: Credentials;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
41
|
}
|
|
197
42
|
export interface IKeycloakService {
|
|
198
43
|
authenticate(req: Keycloak.Authenticate.Request): Promise<Keycloak.Authenticate.Response>;
|
|
199
|
-
authenticateServer(req: Keycloak.AuthenticateServer.Request): Promise<Keycloak.AuthenticateServer.Response>;
|
|
200
44
|
refreshAccess(req: Keycloak.RefreshAccess.Request): Promise<Keycloak.RefreshAccess.Response>;
|
|
201
|
-
revokeAccess(req: Keycloak.RevokeAccess.Request): Promise<void>;
|
|
202
|
-
createUser(req: Keycloak.CreateUser.Request): Promise<void>;
|
|
203
|
-
updateUser(req: Keycloak.UpdateUser.Request): Promise<void>;
|
|
204
|
-
getUser(req: Keycloak.GetUser.Request): Promise<Keycloak.GetUser.Response>;
|
|
205
|
-
deleteUser(req: Keycloak.DeleteUser.Request): Promise<void>;
|
|
206
|
-
changeUserPassword(req: Keycloak.ChangeUserPassword.Request): Promise<void>;
|
|
207
|
-
addRealm(req: Keycloak.AddRealm.Request): Promise<void>;
|
|
208
|
-
addRole(req: Keycloak.AddRole.Request): Promise<void>;
|
|
209
|
-
associateUserRole(req: Keycloak.AssociateUserRole.Request): Promise<void>;
|
|
210
|
-
getRoles(req: Keycloak.GetRoles.Request): Promise<Keycloak.GetRoles.Response>;
|
|
211
|
-
deleteRole(req: Keycloak.DeleteRole.Request): Promise<void>;
|
|
212
45
|
}
|
|
213
46
|
export {};
|
|
@@ -10,33 +10,29 @@ interface Credentials {
|
|
|
10
10
|
export declare namespace NodeMailer {
|
|
11
11
|
namespace Send {
|
|
12
12
|
interface Request {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
address: string;
|
|
17
|
-
};
|
|
18
|
-
to: string;
|
|
19
|
-
subject: string;
|
|
20
|
-
text: string;
|
|
13
|
+
from: {
|
|
14
|
+
name: string;
|
|
15
|
+
address: string;
|
|
21
16
|
};
|
|
17
|
+
to: string;
|
|
18
|
+
subject: string;
|
|
19
|
+
text: string;
|
|
22
20
|
credentials: Credentials;
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
23
|
namespace SendWithTemplate {
|
|
26
24
|
interface Request {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
address: string;
|
|
31
|
-
};
|
|
32
|
-
to: string;
|
|
33
|
-
subject: string;
|
|
34
|
-
html: string;
|
|
35
|
-
attachments: {
|
|
36
|
-
filename: string;
|
|
37
|
-
content: Buffer;
|
|
38
|
-
}[];
|
|
25
|
+
from: {
|
|
26
|
+
name: string;
|
|
27
|
+
address: string;
|
|
39
28
|
};
|
|
29
|
+
to: string;
|
|
30
|
+
subject: string;
|
|
31
|
+
html: string;
|
|
32
|
+
attachments: {
|
|
33
|
+
filename: string;
|
|
34
|
+
content: Buffer;
|
|
35
|
+
}[];
|
|
40
36
|
credentials: Credentials;
|
|
41
37
|
}
|
|
42
38
|
}
|