@ogcio/building-blocks-sdk 0.2.70 → 0.2.71
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/client/clients/audit/index.d.ts +132 -0
- package/dist/client/clients/audit/index.d.ts.map +1 -0
- package/dist/client/clients/audit/index.js +14 -0
- package/dist/client/clients/audit/index.js.map +1 -0
- package/dist/client/clients/audit/schema.d.ts +246 -0
- package/dist/client/clients/audit/schema.d.ts.map +1 -0
- package/dist/client/clients/audit/schema.js +2 -0
- package/dist/client/clients/audit/schema.js.map +1 -0
- package/dist/clients-configurations/clients-configuration.json +9 -1
- package/dist/types/index.d.ts +9 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client/clients/audit/index.ts +25 -0
- package/src/client/clients/audit/open-api-definition.json +433 -0
- package/src/client/clients/audit/schema.ts +245 -0
- package/src/clients-configurations/clients-configuration.json +9 -1
- package/src/types/index.ts +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.71](https://github.com/ogcio/building-blocks-sdk/compare/@ogcio/building-blocks-sdk@v0.2.70...@ogcio/building-blocks-sdk@v0.2.71) (2026-01-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **audit-collector:** AB[#33619](https://github.com/ogcio/building-blocks-sdk/issues/33619) add audit collector ([#305](https://github.com/ogcio/building-blocks-sdk/issues/305)) ([19fad02](https://github.com/ogcio/building-blocks-sdk/commit/19fad02e725fdba50dd187a9bd9569cf60d3c42a))
|
|
9
|
+
|
|
3
10
|
## [0.2.70](https://github.com/ogcio/building-blocks-sdk/compare/@ogcio/building-blocks-sdk@v0.2.69...@ogcio/building-blocks-sdk@v0.2.70) (2025-12-17)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type createClient from "openapi-fetch";
|
|
2
|
+
import { BaseClient } from "../../base-client.js";
|
|
3
|
+
import type { paths } from "./schema.js";
|
|
4
|
+
export declare class AuditCollector extends BaseClient<paths> {
|
|
5
|
+
protected client: ReturnType<typeof createClient<paths>>;
|
|
6
|
+
protected serviceName: "auditCollector";
|
|
7
|
+
sendLogs(logs: NonNullable<paths["/api/v1/audit-logs/"]["post"]["requestBody"]>["content"]["application/json"]): Promise<import("../../utils/client-utils.js").DataResponseValue<{
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
requestBody?: {
|
|
15
|
+
content: {
|
|
16
|
+
"application/json": {
|
|
17
|
+
application_id: string;
|
|
18
|
+
application_version?: string;
|
|
19
|
+
user_id?: string;
|
|
20
|
+
user_email_address?: string;
|
|
21
|
+
action_type: "read" | "create" | "update" | "delete" | "list";
|
|
22
|
+
resource_type: string;
|
|
23
|
+
resource_id?: string;
|
|
24
|
+
client_timestamp: string;
|
|
25
|
+
successful?: boolean | null;
|
|
26
|
+
failure_reason?: string | null;
|
|
27
|
+
server_id?: string | null;
|
|
28
|
+
metadata: {
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
parent_log_entry_id?: string | null;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
responses: {
|
|
36
|
+
200: {
|
|
37
|
+
headers: {
|
|
38
|
+
[name: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
content: {
|
|
41
|
+
"application/json": {
|
|
42
|
+
data: {
|
|
43
|
+
id: string;
|
|
44
|
+
}[];
|
|
45
|
+
metadata?: {
|
|
46
|
+
links?: {
|
|
47
|
+
self: {
|
|
48
|
+
href?: string;
|
|
49
|
+
};
|
|
50
|
+
next?: {
|
|
51
|
+
href?: string;
|
|
52
|
+
};
|
|
53
|
+
prev?: {
|
|
54
|
+
href?: string;
|
|
55
|
+
};
|
|
56
|
+
first: {
|
|
57
|
+
href?: string;
|
|
58
|
+
};
|
|
59
|
+
last: {
|
|
60
|
+
href?: string;
|
|
61
|
+
};
|
|
62
|
+
pages: {
|
|
63
|
+
[key: string]: {
|
|
64
|
+
href?: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
totalCount?: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
"4XX": {
|
|
74
|
+
headers: {
|
|
75
|
+
[name: string]: unknown;
|
|
76
|
+
};
|
|
77
|
+
content: {
|
|
78
|
+
"application/json": {
|
|
79
|
+
code: string;
|
|
80
|
+
detail: string;
|
|
81
|
+
requestId: string;
|
|
82
|
+
name: string;
|
|
83
|
+
validation?: {
|
|
84
|
+
fieldName: string;
|
|
85
|
+
message: string;
|
|
86
|
+
}[];
|
|
87
|
+
validationContext?: string;
|
|
88
|
+
statusCode: number;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
"5XX": {
|
|
93
|
+
headers: {
|
|
94
|
+
[name: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
content: {
|
|
97
|
+
"application/json": {
|
|
98
|
+
code: string;
|
|
99
|
+
detail: string;
|
|
100
|
+
requestId: string;
|
|
101
|
+
name: string;
|
|
102
|
+
validation?: {
|
|
103
|
+
fieldName: string;
|
|
104
|
+
message: string;
|
|
105
|
+
}[];
|
|
106
|
+
validationContext?: string;
|
|
107
|
+
statusCode: number;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
}, {
|
|
113
|
+
body: {
|
|
114
|
+
application_id: string;
|
|
115
|
+
application_version?: string;
|
|
116
|
+
user_id?: string;
|
|
117
|
+
user_email_address?: string;
|
|
118
|
+
action_type: "read" | "create" | "update" | "delete" | "list";
|
|
119
|
+
resource_type: string;
|
|
120
|
+
resource_id?: string;
|
|
121
|
+
client_timestamp: string;
|
|
122
|
+
successful?: boolean | null;
|
|
123
|
+
failure_reason?: string | null;
|
|
124
|
+
server_id?: string | null;
|
|
125
|
+
metadata: {
|
|
126
|
+
[key: string]: unknown;
|
|
127
|
+
};
|
|
128
|
+
parent_log_entry_id?: string | null;
|
|
129
|
+
}[];
|
|
130
|
+
}>>;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/clients/audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,qBAAa,cAAe,SAAQ,UAAU,CAAC,KAAK,CAAC;IACnD,UAAkB,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACjE,SAAS,CAAC,WAAW,mBAAmB;IAElC,QAAQ,CACZ,IAAI,EAAE,WAAW,CACf,KAAK,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CACpD,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC;;iBAY4xB,CAAC;kBAA2B,CAAC;gBAAyB,CAAC;kBAA2B,CAAC;;;;;;uCAA4gB,CAAC;2BAAyM,CAAC;sCAAgQ,CAAC;;;+BAA8sB,CAAC;;8BAA2S,CAAC;kCAAoD,CAAC;6BAA8C,CAAC;;;;uCAAub,CAAC;;;;;;;;;;;;;;gCAAq+B,CAAC;iCAA0I,CAAC;;wCAA+K,CAAC;;oCAAiF,CAAC;wCAA8N,CAAC;;oCAAiF,CAAC;wCAAkO,CAAC;;;wCAAwP,CAAC;;;wCAAuP,CAAC;;;;4CAAkU,CAAC;;;;sCAAiQ,CAAC;;;;;;;;;;;;;;;kCAAu5B,CAAC;;;;yCAAsK,CAAC;;;;;;;;;;;;;;;kCAAw6B,CAAC;;;;yCAAsK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAD78Q"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AUDIT_COLLECTOR } from "../../../types/index.js";
|
|
2
|
+
import { BaseClient } from "../../base-client.js";
|
|
3
|
+
import { formatError, formatResponse } from "../../utils/client-utils.js";
|
|
4
|
+
export class AuditCollector extends BaseClient {
|
|
5
|
+
serviceName = AUDIT_COLLECTOR;
|
|
6
|
+
async sendLogs(logs) {
|
|
7
|
+
return this.client
|
|
8
|
+
.POST("/api/v1/audit-logs/", {
|
|
9
|
+
body: logs,
|
|
10
|
+
})
|
|
11
|
+
.then((response) => formatResponse(response, this.serviceName, this.logger), (reason) => formatError(reason, this.serviceName, this.logger));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/clients/audit/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG1E,MAAM,OAAO,cAAe,SAAQ,UAAiB;IAEzC,WAAW,GAAG,eAAe,CAAC;IAExC,KAAK,CAAC,QAAQ,CACZ,IAEgC;QAEhC,OAAO,IAAI,CAAC,MAAM;aACf,IAAI,CAAC,qBAAqB,EAAE;YAC3B,IAAI,EAAE,IAAI;SACX,CAAC;aACD,IAAI,CACH,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,EACrE,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAC/D,CAAC;IACN,CAAC;CACF"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
export interface paths {
|
|
2
|
+
"/health": {
|
|
3
|
+
parameters: {
|
|
4
|
+
query?: never;
|
|
5
|
+
header?: never;
|
|
6
|
+
path?: never;
|
|
7
|
+
cookie?: never;
|
|
8
|
+
};
|
|
9
|
+
/** @description It checks the current health status of the APIs, pinging all the related items */
|
|
10
|
+
get: {
|
|
11
|
+
parameters: {
|
|
12
|
+
query?: never;
|
|
13
|
+
header?: never;
|
|
14
|
+
path?: never;
|
|
15
|
+
cookie?: never;
|
|
16
|
+
};
|
|
17
|
+
requestBody?: never;
|
|
18
|
+
responses: {
|
|
19
|
+
/** @description Default Response */
|
|
20
|
+
200: {
|
|
21
|
+
headers: {
|
|
22
|
+
[name: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
content?: never;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
put?: never;
|
|
29
|
+
post?: never;
|
|
30
|
+
delete?: never;
|
|
31
|
+
options?: never;
|
|
32
|
+
head?: never;
|
|
33
|
+
patch?: never;
|
|
34
|
+
trace?: never;
|
|
35
|
+
};
|
|
36
|
+
"/api/v1/audit-logs/": {
|
|
37
|
+
parameters: {
|
|
38
|
+
query?: never;
|
|
39
|
+
header?: never;
|
|
40
|
+
path?: never;
|
|
41
|
+
cookie?: never;
|
|
42
|
+
};
|
|
43
|
+
get?: never;
|
|
44
|
+
put?: never;
|
|
45
|
+
post: operations["createAuditLog"];
|
|
46
|
+
delete?: never;
|
|
47
|
+
options?: never;
|
|
48
|
+
head?: never;
|
|
49
|
+
patch?: never;
|
|
50
|
+
trace?: never;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export type webhooks = Record<string, never>;
|
|
54
|
+
export interface components {
|
|
55
|
+
schemas: never;
|
|
56
|
+
responses: never;
|
|
57
|
+
parameters: never;
|
|
58
|
+
requestBodies: never;
|
|
59
|
+
headers: never;
|
|
60
|
+
pathItems: never;
|
|
61
|
+
}
|
|
62
|
+
export type $defs = Record<string, never>;
|
|
63
|
+
export interface operations {
|
|
64
|
+
createAuditLog: {
|
|
65
|
+
parameters: {
|
|
66
|
+
query?: never;
|
|
67
|
+
header?: never;
|
|
68
|
+
path?: never;
|
|
69
|
+
cookie?: never;
|
|
70
|
+
};
|
|
71
|
+
requestBody?: {
|
|
72
|
+
content: {
|
|
73
|
+
"application/json": {
|
|
74
|
+
/**
|
|
75
|
+
* @description Identifies the client application/service
|
|
76
|
+
* @example my-app
|
|
77
|
+
*/
|
|
78
|
+
application_id: string;
|
|
79
|
+
/**
|
|
80
|
+
* @description Optional application version for schema tracking
|
|
81
|
+
* @example 1.4.3
|
|
82
|
+
*/
|
|
83
|
+
application_version?: string;
|
|
84
|
+
/**
|
|
85
|
+
* @description JWT subject; null indicates M2M action
|
|
86
|
+
* @example user-123
|
|
87
|
+
*/
|
|
88
|
+
user_id?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Format: email
|
|
91
|
+
* @description User email for human-readable context
|
|
92
|
+
* @example user@example.com
|
|
93
|
+
*/
|
|
94
|
+
user_email_address?: string;
|
|
95
|
+
/**
|
|
96
|
+
* @description Operation: Read, Create, Update, Delete, etc.
|
|
97
|
+
* @example create
|
|
98
|
+
* @enum {unknown}
|
|
99
|
+
*/
|
|
100
|
+
action_type: "read" | "create" | "update" | "delete" | "list";
|
|
101
|
+
/**
|
|
102
|
+
* @description Entity type affected: user, message, etc.
|
|
103
|
+
* @example user
|
|
104
|
+
*/
|
|
105
|
+
resource_type: string;
|
|
106
|
+
/**
|
|
107
|
+
* @description Specific resource identifier; null for list operations
|
|
108
|
+
* @example user-123
|
|
109
|
+
*/
|
|
110
|
+
resource_id?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Format: date-time
|
|
113
|
+
* @description ISO 8601 client-reported timestamp
|
|
114
|
+
* @example 2025-12-19T10:30:00Z
|
|
115
|
+
*/
|
|
116
|
+
client_timestamp: string;
|
|
117
|
+
successful?: boolean | null;
|
|
118
|
+
failure_reason?: string | null;
|
|
119
|
+
server_id?: string | null;
|
|
120
|
+
/**
|
|
121
|
+
* @description Extensible JSON context for event
|
|
122
|
+
* @example {
|
|
123
|
+
* "request_id": "req-123",
|
|
124
|
+
* "source": "web"
|
|
125
|
+
* }
|
|
126
|
+
*/
|
|
127
|
+
metadata: {
|
|
128
|
+
[key: string]: unknown;
|
|
129
|
+
};
|
|
130
|
+
parent_log_entry_id?: string | null;
|
|
131
|
+
}[];
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
responses: {
|
|
135
|
+
/** @description Default Response */
|
|
136
|
+
200: {
|
|
137
|
+
headers: {
|
|
138
|
+
[name: string]: unknown;
|
|
139
|
+
};
|
|
140
|
+
content: {
|
|
141
|
+
"application/json": {
|
|
142
|
+
/**
|
|
143
|
+
* @description Multiple audit log entries created
|
|
144
|
+
* @example [
|
|
145
|
+
* {
|
|
146
|
+
* "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
|
|
147
|
+
* },
|
|
148
|
+
* {
|
|
149
|
+
* "id": "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
150
|
+
* }
|
|
151
|
+
* ]
|
|
152
|
+
*/
|
|
153
|
+
data: {
|
|
154
|
+
/** Format: uuid */
|
|
155
|
+
id: string;
|
|
156
|
+
}[];
|
|
157
|
+
metadata?: {
|
|
158
|
+
/** @description Object containing the links to the related endpoints */
|
|
159
|
+
links?: {
|
|
160
|
+
self: {
|
|
161
|
+
/** @description URL pointing to the request itself */
|
|
162
|
+
href?: string;
|
|
163
|
+
};
|
|
164
|
+
next?: {
|
|
165
|
+
/** @description URL pointing to the next page of results in a paginated response. If there are no more results, this field may be omitted */
|
|
166
|
+
href?: string;
|
|
167
|
+
};
|
|
168
|
+
prev?: {
|
|
169
|
+
/** @description URL pointing to the previous page of results in a paginated response. If there are no more results, this field may be omitted */
|
|
170
|
+
href?: string;
|
|
171
|
+
};
|
|
172
|
+
first: {
|
|
173
|
+
/** @description URL pointing to the first page of results in a paginated response */
|
|
174
|
+
href?: string;
|
|
175
|
+
};
|
|
176
|
+
last: {
|
|
177
|
+
/** @description URL pointing to the first page of results in a paginated response */
|
|
178
|
+
href?: string;
|
|
179
|
+
};
|
|
180
|
+
/** @description It may contain a list of other useful URLs, e.g. one entry for page:'page 1', 'page 2' */
|
|
181
|
+
pages: {
|
|
182
|
+
[key: string]: {
|
|
183
|
+
href?: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
/** @description Number representing the total number of available items */
|
|
188
|
+
totalCount?: number;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
/** @description Default Response */
|
|
194
|
+
"4XX": {
|
|
195
|
+
headers: {
|
|
196
|
+
[name: string]: unknown;
|
|
197
|
+
};
|
|
198
|
+
content: {
|
|
199
|
+
"application/json": {
|
|
200
|
+
/** @description Code used to categorize the error */
|
|
201
|
+
code: string;
|
|
202
|
+
/** @description Description of the error */
|
|
203
|
+
detail: string;
|
|
204
|
+
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
205
|
+
requestId: string;
|
|
206
|
+
/** @description Name of the error type */
|
|
207
|
+
name: string;
|
|
208
|
+
/** @description List of the validation errors */
|
|
209
|
+
validation?: {
|
|
210
|
+
fieldName: string;
|
|
211
|
+
message: string;
|
|
212
|
+
}[];
|
|
213
|
+
validationContext?: string;
|
|
214
|
+
statusCode: number;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
/** @description Default Response */
|
|
219
|
+
"5XX": {
|
|
220
|
+
headers: {
|
|
221
|
+
[name: string]: unknown;
|
|
222
|
+
};
|
|
223
|
+
content: {
|
|
224
|
+
"application/json": {
|
|
225
|
+
/** @description Code used to categorize the error */
|
|
226
|
+
code: string;
|
|
227
|
+
/** @description Description of the error */
|
|
228
|
+
detail: string;
|
|
229
|
+
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
230
|
+
requestId: string;
|
|
231
|
+
/** @description Name of the error type */
|
|
232
|
+
name: string;
|
|
233
|
+
/** @description List of the validation errors */
|
|
234
|
+
validation?: {
|
|
235
|
+
fieldName: string;
|
|
236
|
+
message: string;
|
|
237
|
+
}[];
|
|
238
|
+
validationContext?: string;
|
|
239
|
+
statusCode: number;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/client/clients/audit/schema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IAClB,SAAS,EAAE;QACP,UAAU,EAAE;YACR,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,MAAM,CAAC,EAAE,KAAK,CAAC;YACf,IAAI,CAAC,EAAE,KAAK,CAAC;YACb,MAAM,CAAC,EAAE,KAAK,CAAC;SAClB,CAAC;QACF,kGAAkG;QAClG,GAAG,EAAE;YACD,UAAU,EAAE;gBACR,KAAK,CAAC,EAAE,KAAK,CAAC;gBACd,MAAM,CAAC,EAAE,KAAK,CAAC;gBACf,IAAI,CAAC,EAAE,KAAK,CAAC;gBACb,MAAM,CAAC,EAAE,KAAK,CAAC;aAClB,CAAC;YACF,WAAW,CAAC,EAAE,KAAK,CAAC;YACpB,SAAS,EAAE;gBACP,oCAAoC;gBACpC,GAAG,EAAE;oBACD,OAAO,EAAE;wBACL,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;qBAC3B,CAAC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;4BAClB,OAAO,EAAE,MAAM,CAAC;yBACnB,EAAE,CAAC;wBACJ,iBAAiB,CAAC,EAAE,MAAM,CAAC;wBAC3B,UAAU,EAAE,MAAM,CAAC;qBACtB,CAAC;iBACL,CAAC;aACL,CAAC;YACF,oCAAoC;YACpC,KAAK,EAAE;gBACH,OAAO,EAAE;oBACL,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;iBAC3B,CAAC;gBACF,OAAO,EAAE;oBACL,kBAAkB,EAAE;wBAChB,qDAAqD;wBACrD,IAAI,EAAE,MAAM,CAAC;wBACb,4CAA4C;wBAC5C,MAAM,EAAE,MAAM,CAAC;wBACf,yFAAyF;wBACzF,SAAS,EAAE,MAAM,CAAC;wBAClB,0CAA0C;wBAC1C,IAAI,EAAE,MAAM,CAAC;wBACb,iDAAiD;wBACjD,UAAU,CAAC,EAAE;4BACT,SAAS,EAAE,MAAM,CAAC;4BAClB,OAAO,EAAE,MAAM,CAAC;yBACnB,EAAE,CAAC;wBACJ,iBAAiB,CAAC,EAAE,MAAM,CAAC;wBAC3B,UAAU,EAAE,MAAM,CAAC;qBACtB,CAAC;iBACL,CAAC;aACL,CAAC;SACL,CAAC;KACL,CAAC;CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/client/clients/audit/schema.ts"],"names":[],"mappings":""}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"payments:payment_request.public:read",
|
|
49
49
|
"payments:transaction:*"
|
|
50
50
|
],
|
|
51
|
-
"updateDefinitions":
|
|
51
|
+
"updateDefinitions": false
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"name": "scheduler",
|
|
@@ -92,6 +92,14 @@
|
|
|
92
92
|
"integrator:run:read"
|
|
93
93
|
],
|
|
94
94
|
"updateDefinitions": true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "audit",
|
|
98
|
+
"openApiDefinitionUrl": "https://raw.githubusercontent.com/ogcio/govie-services-audit-collector/refs/heads/dev/openapi-definition.yml",
|
|
99
|
+
"openApiDefinitionFormat": "yaml",
|
|
100
|
+
"citizenPermissions": [],
|
|
101
|
+
"publicServantPermissions": [],
|
|
102
|
+
"updateDefinitions": true
|
|
95
103
|
}
|
|
96
104
|
]
|
|
97
105
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Analytics, AnalyticsOptions } from "@ogcio/analytics-sdk";
|
|
2
|
+
import type { AuditCollector } from "../client/clients/audit/index.js";
|
|
2
3
|
import type { FeatureFlags } from "../client/clients/featureFlags/index.js";
|
|
3
4
|
import type { Journey } from "../client/clients/journey/index.js";
|
|
4
5
|
import type { Messaging } from "../client/clients/messaging/index.js";
|
|
@@ -14,7 +15,8 @@ declare const SCHEDULER: "scheduler";
|
|
|
14
15
|
declare const UPLOAD: "upload";
|
|
15
16
|
declare const FEATURE_FLAGS: "featureFlags";
|
|
16
17
|
declare const JOURNEY: "journey";
|
|
17
|
-
|
|
18
|
+
declare const AUDIT_COLLECTOR: "auditCollector";
|
|
19
|
+
type SERVICE_NAME = typeof ANALYTICS | typeof MESSAGING | typeof PAYMENTS | typeof PROFILE | typeof SCHEDULER | typeof UPLOAD | typeof FEATURE_FLAGS | typeof JOURNEY | typeof AUDIT_COLLECTOR;
|
|
18
20
|
interface AnalyticsConfig extends AnalyticsOptions {
|
|
19
21
|
}
|
|
20
22
|
interface ServiceBaseConfig {
|
|
@@ -34,6 +36,8 @@ interface FeatureFlagsConfig extends ServiceBaseConfig {
|
|
|
34
36
|
}
|
|
35
37
|
interface JourneyConfig extends ServiceBaseConfig {
|
|
36
38
|
}
|
|
39
|
+
interface AuditCollectorConfig extends ServiceBaseConfig {
|
|
40
|
+
}
|
|
37
41
|
interface Services {
|
|
38
42
|
analytics?: AnalyticsConfig;
|
|
39
43
|
messaging?: MessagingConfig;
|
|
@@ -43,6 +47,7 @@ interface Services {
|
|
|
43
47
|
upload?: UploadConfig;
|
|
44
48
|
featureFlags?: FeatureFlagsConfig;
|
|
45
49
|
journey?: JourneyConfig;
|
|
50
|
+
auditCollector?: AuditCollectorConfig;
|
|
46
51
|
}
|
|
47
52
|
type TokenFunction = (serviceName: SERVICE_NAME) => Promise<string>;
|
|
48
53
|
interface TokenResponseBody {
|
|
@@ -100,9 +105,10 @@ interface BuildingBlocksSDK {
|
|
|
100
105
|
upload: Upload;
|
|
101
106
|
featureFlags: FeatureFlags;
|
|
102
107
|
journey: Journey;
|
|
108
|
+
auditCollector: AuditCollector;
|
|
103
109
|
}
|
|
104
|
-
export { ANALYTICS, MESSAGING, PAYMENTS, PROFILE, SCHEDULER, UPLOAD, FEATURE_FLAGS, JOURNEY, };
|
|
105
|
-
export type { BuildingBlockSDKParams, BuildingBlocksSDK, Analytics, AnalyticsConfig, Messaging, MessagingConfig, Payments, PaymentsConfig, Profile, ProfileConfig, Scheduler, SchedulerConfig, Upload, UploadConfig, FeatureFlags, FeatureFlagsConfig, Journey, JourneyConfig, Services, TokenFunction, SERVICE_NAME, TokenResponseBody, GetTokenBaseParams, GetAccessTokenParams, GetOrganizationTokenParams, M2MParams, M2MTokenFnConfig, };
|
|
110
|
+
export { ANALYTICS, MESSAGING, PAYMENTS, PROFILE, SCHEDULER, UPLOAD, FEATURE_FLAGS, JOURNEY, AUDIT_COLLECTOR, };
|
|
111
|
+
export type { BuildingBlockSDKParams, BuildingBlocksSDK, Analytics, AnalyticsConfig, Messaging, MessagingConfig, Payments, PaymentsConfig, Profile, ProfileConfig, Scheduler, SchedulerConfig, Upload, UploadConfig, FeatureFlags, FeatureFlagsConfig, Journey, JourneyConfig, Services, TokenFunction, SERVICE_NAME, TokenResponseBody, GetTokenBaseParams, GetAccessTokenParams, GetOrganizationTokenParams, M2MParams, M2MTokenFnConfig, AuditCollectorConfig, AuditCollector, };
|
|
106
112
|
export type GenericError = {
|
|
107
113
|
name: string;
|
|
108
114
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAEhE,QAAA,MAAM,SAAS,EAAG,WAAoB,CAAC;AACvC,QAAA,MAAM,SAAS,EAAG,WAAoB,CAAC;AACvC,QAAA,MAAM,QAAQ,EAAG,UAAmB,CAAC;AACrC,QAAA,MAAM,OAAO,EAAG,SAAkB,CAAC;AACnC,QAAA,MAAM,SAAS,EAAG,WAAoB,CAAC;AACvC,QAAA,MAAM,MAAM,EAAG,QAAiB,CAAC;AACjC,QAAA,MAAM,aAAa,EAAG,cAAuB,CAAC;AAC9C,QAAA,MAAM,OAAO,EAAG,SAAkB,CAAC;AACnC,QAAA,MAAM,eAAe,EAAG,gBAAyB,CAAC;AAElD,KAAK,YAAY,GACb,OAAO,SAAS,GAChB,OAAO,SAAS,GAChB,OAAO,QAAQ,GACf,O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S,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;CAChC;AAED,OAAO,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,MAAM,EACN,aAAa,EACb,OAAO,EACP,eAAe,GAChB,CAAC;AAEF,YAAY,EACV,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,SAAS,EACT,eAAe,EACf,QAAQ,EACR,cAAc,EACd,OAAO,EACP,aAAa,EACb,SAAS,EACT,eAAe,EACf,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,GACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,SAAyB;CAI7C"}
|
package/dist/types/index.js
CHANGED
|
@@ -6,7 +6,8 @@ const SCHEDULER = "scheduler";
|
|
|
6
6
|
const UPLOAD = "upload";
|
|
7
7
|
const FEATURE_FLAGS = "featureFlags";
|
|
8
8
|
const JOURNEY = "journey";
|
|
9
|
-
|
|
9
|
+
const AUDIT_COLLECTOR = "auditCollector";
|
|
10
|
+
export { ANALYTICS, MESSAGING, PAYMENTS, PROFILE, SCHEDULER, UPLOAD, FEATURE_FLAGS, JOURNEY, AUDIT_COLLECTOR, };
|
|
10
11
|
export class AccessTokenError extends Error {
|
|
11
12
|
constructor(message = "Invalid access token") {
|
|
12
13
|
super(message);
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAUA,MAAM,SAAS,GAAG,WAAoB,CAAC;AACvC,MAAM,SAAS,GAAG,WAAoB,CAAC;AACvC,MAAM,QAAQ,GAAG,UAAmB,CAAC;AACrC,MAAM,OAAO,GAAG,SAAkB,CAAC;AACnC,MAAM,SAAS,GAAG,WAAoB,CAAC;AACvC,MAAM,MAAM,GAAG,QAAiB,CAAC;AACjC,MAAM,aAAa,GAAG,cAAuB,CAAC;AAC9C,MAAM,OAAO,GAAG,SAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAUA,MAAM,SAAS,GAAG,WAAoB,CAAC;AACvC,MAAM,SAAS,GAAG,WAAoB,CAAC;AACvC,MAAM,QAAQ,GAAG,UAAmB,CAAC;AACrC,MAAM,OAAO,GAAG,SAAkB,CAAC;AACnC,MAAM,SAAS,GAAG,WAAoB,CAAC;AACvC,MAAM,MAAM,GAAG,QAAiB,CAAC;AACjC,MAAM,aAAa,GAAG,cAAuB,CAAC;AAC9C,MAAM,OAAO,GAAG,SAAkB,CAAC;AACnC,MAAM,eAAe,GAAG,gBAAyB,CAAC;AA6GlD,OAAO,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,MAAM,EACN,aAAa,EACb,OAAO,EACP,eAAe,GAChB,CAAC;AAsCF,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAO,GAAG,sBAAsB;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type createClient from "openapi-fetch";
|
|
2
|
+
import { AUDIT_COLLECTOR } from "../../../types/index.js";
|
|
3
|
+
import { BaseClient } from "../../base-client.js";
|
|
4
|
+
import { formatError, formatResponse } from "../../utils/client-utils.js";
|
|
5
|
+
import type { paths } from "./schema.js";
|
|
6
|
+
|
|
7
|
+
export class AuditCollector extends BaseClient<paths> {
|
|
8
|
+
protected declare client: ReturnType<typeof createClient<paths>>;
|
|
9
|
+
protected serviceName = AUDIT_COLLECTOR;
|
|
10
|
+
|
|
11
|
+
async sendLogs(
|
|
12
|
+
logs: NonNullable<
|
|
13
|
+
paths["/api/v1/audit-logs/"]["post"]["requestBody"]
|
|
14
|
+
>["content"]["application/json"],
|
|
15
|
+
) {
|
|
16
|
+
return this.client
|
|
17
|
+
.POST("/api/v1/audit-logs/", {
|
|
18
|
+
body: logs,
|
|
19
|
+
})
|
|
20
|
+
.then(
|
|
21
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
22
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|