@ogcio/building-blocks-sdk 0.2.88 → 0.2.89
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/profile/citizen.d.ts.map +1 -1
- package/dist/client/clients/profile/index.d.ts.map +1 -1
- package/dist/client/clients/profile/organisation.d.ts.map +1 -1
- package/dist/client/clients/profile/schema.d.ts +298 -0
- package/dist/client/clients/profile/schema.d.ts.map +1 -1
- package/dist/client/clients/profile/support.d.ts +187 -0
- package/dist/client/clients/profile/support.d.ts.map +1 -1
- package/dist/client/clients/profile/support.js +14 -0
- package/dist/client/clients/profile/support.js.map +1 -1
- package/dist/clients-configurations/clients-configuration.json +7 -7
- package/package.json +2 -2
- package/renovate.json +1 -0
- package/src/client/clients/profile/schema.ts +298 -0
- package/src/client/clients/profile/support.ts +26 -0
- package/src/clients-configurations/clients-configuration.json +7 -7
|
@@ -142,5 +142,192 @@ export declare class ProfileSupport {
|
|
|
142
142
|
limit?: string;
|
|
143
143
|
};
|
|
144
144
|
}>>;
|
|
145
|
+
getLatestConsents(query: paths["/api/v1/support/consents/latest"]["get"]["parameters"]["query"]): Promise<import("../../utils/client-utils.js").DataResponseValue<{
|
|
146
|
+
parameters: {
|
|
147
|
+
query: {
|
|
148
|
+
profileId: string;
|
|
149
|
+
};
|
|
150
|
+
header?: never;
|
|
151
|
+
path?: never;
|
|
152
|
+
cookie?: never;
|
|
153
|
+
};
|
|
154
|
+
requestBody?: never;
|
|
155
|
+
responses: {
|
|
156
|
+
200: {
|
|
157
|
+
headers: {
|
|
158
|
+
[name: string]: unknown;
|
|
159
|
+
};
|
|
160
|
+
content: {
|
|
161
|
+
"application/json": {
|
|
162
|
+
data: {
|
|
163
|
+
availableSubjects: string[];
|
|
164
|
+
consents: {
|
|
165
|
+
id: string;
|
|
166
|
+
profileId: string;
|
|
167
|
+
status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
|
|
168
|
+
subject: string;
|
|
169
|
+
createdAt: string;
|
|
170
|
+
consentStatementId: string;
|
|
171
|
+
}[];
|
|
172
|
+
};
|
|
173
|
+
metadata?: {
|
|
174
|
+
links?: {
|
|
175
|
+
self: {
|
|
176
|
+
href?: string;
|
|
177
|
+
};
|
|
178
|
+
next?: {
|
|
179
|
+
href?: string;
|
|
180
|
+
};
|
|
181
|
+
prev?: {
|
|
182
|
+
href?: string;
|
|
183
|
+
};
|
|
184
|
+
first: {
|
|
185
|
+
href?: string;
|
|
186
|
+
};
|
|
187
|
+
last: {
|
|
188
|
+
href?: string;
|
|
189
|
+
};
|
|
190
|
+
pages: {
|
|
191
|
+
[key: string]: {
|
|
192
|
+
href?: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
totalCount?: number;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
"4XX": {
|
|
202
|
+
headers: {
|
|
203
|
+
[name: string]: unknown;
|
|
204
|
+
};
|
|
205
|
+
content: {
|
|
206
|
+
"application/json": {
|
|
207
|
+
code: string;
|
|
208
|
+
detail: string;
|
|
209
|
+
requestId: string;
|
|
210
|
+
name: string;
|
|
211
|
+
validation?: {
|
|
212
|
+
fieldName: string;
|
|
213
|
+
message: string;
|
|
214
|
+
}[];
|
|
215
|
+
validationContext?: string;
|
|
216
|
+
statusCode: number;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
"5XX": {
|
|
221
|
+
headers: {
|
|
222
|
+
[name: string]: unknown;
|
|
223
|
+
};
|
|
224
|
+
content: {
|
|
225
|
+
"application/json": {
|
|
226
|
+
code: string;
|
|
227
|
+
detail: string;
|
|
228
|
+
requestId: string;
|
|
229
|
+
name: string;
|
|
230
|
+
validation?: {
|
|
231
|
+
fieldName: string;
|
|
232
|
+
message: string;
|
|
233
|
+
}[];
|
|
234
|
+
validationContext?: string;
|
|
235
|
+
statusCode: number;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
}, {
|
|
241
|
+
params: {
|
|
242
|
+
query: {
|
|
243
|
+
profileId: string;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
}>>;
|
|
247
|
+
submitConsents(body: paths["/api/v1/support/consents/"]["post"]["requestBody"]["content"]["application/json"]): Promise<import("../../utils/client-utils.js").DataResponseValue<{
|
|
248
|
+
parameters: {
|
|
249
|
+
query?: never;
|
|
250
|
+
header?: never;
|
|
251
|
+
path?: never;
|
|
252
|
+
cookie?: never;
|
|
253
|
+
};
|
|
254
|
+
requestBody: {
|
|
255
|
+
content: {
|
|
256
|
+
"application/json": {
|
|
257
|
+
profileId: string;
|
|
258
|
+
consents: {
|
|
259
|
+
subject: string;
|
|
260
|
+
status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
|
|
261
|
+
}[];
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
responses: {
|
|
266
|
+
201: {
|
|
267
|
+
headers: {
|
|
268
|
+
[name: string]: unknown;
|
|
269
|
+
};
|
|
270
|
+
content: {
|
|
271
|
+
"application/json": {
|
|
272
|
+
data: {
|
|
273
|
+
id: string;
|
|
274
|
+
subject: string;
|
|
275
|
+
status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
|
|
276
|
+
submittedAt: string;
|
|
277
|
+
consentStatementId: string;
|
|
278
|
+
statementVersion: number;
|
|
279
|
+
isLatestStatement: boolean;
|
|
280
|
+
}[];
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
"4XX": {
|
|
285
|
+
headers: {
|
|
286
|
+
[name: string]: unknown;
|
|
287
|
+
};
|
|
288
|
+
content: {
|
|
289
|
+
"application/json": {
|
|
290
|
+
code: string;
|
|
291
|
+
detail: string;
|
|
292
|
+
requestId: string;
|
|
293
|
+
name: string;
|
|
294
|
+
validation?: {
|
|
295
|
+
fieldName: string;
|
|
296
|
+
message: string;
|
|
297
|
+
}[];
|
|
298
|
+
validationContext?: string;
|
|
299
|
+
statusCode: number;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
"5XX": {
|
|
304
|
+
headers: {
|
|
305
|
+
[name: string]: unknown;
|
|
306
|
+
};
|
|
307
|
+
content: {
|
|
308
|
+
"application/json": {
|
|
309
|
+
code: string;
|
|
310
|
+
detail: string;
|
|
311
|
+
requestId: string;
|
|
312
|
+
name: string;
|
|
313
|
+
validation?: {
|
|
314
|
+
fieldName: string;
|
|
315
|
+
message: string;
|
|
316
|
+
}[];
|
|
317
|
+
validationContext?: string;
|
|
318
|
+
statusCode: number;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
}, {
|
|
324
|
+
body: {
|
|
325
|
+
profileId: string;
|
|
326
|
+
consents: {
|
|
327
|
+
subject: string;
|
|
328
|
+
status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
|
|
329
|
+
}[];
|
|
330
|
+
};
|
|
331
|
+
}>>;
|
|
145
332
|
}
|
|
146
333
|
//# sourceMappingURL=support.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support.d.ts","sourceRoot":"","sources":["../../../../src/client/clients/profile/support.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,qBAAa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFN,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,KAA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wCAAuP,CAAC;;;;4CAAkU,CAAC;;;;sCAAiQ,CAAC;;;;;;;;;;;;;;;kCAAu5B,CAAC;;;;yCAAsK,CAAC;;;;;;;;;;;;;;;kCAAw6B,CAAC;;;;yCAAsK,CAAC;;;;;;;;;;;;oBAA/7N,CAAC;kBAAoQ,CAAC;;;;;;;;IA1B5w2M,iBAAiB,CACrB,KAAK,EAAE,KAAK,CAAC,iCAAiC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;;;;;kBAyB419F,CAAC;gBAAyB,CAAC;kBAA2B,CAAC;;;;;;;;;;;;;;;;;;;;;gCAA29B,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;;;;;;;;;;;;;IAb9hoG,cAAc,CAClB,IAAI,EAAE,KAAK,CAAC,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC;;iBAYyooG,CAAC;kBAA2B,CAAC;gBAAyB,CAAC;kBAA2B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAAqlE,CAAC;;;;yCAAsK,CAAC;;;;;;;;;;;;;;;kCAAw6B,CAAC;;;;yCAAsK,CAAC;;;;;;;;;;;;;;;CAD1ovG"}
|
|
@@ -15,5 +15,19 @@ export class ProfileSupport {
|
|
|
15
15
|
})
|
|
16
16
|
.then((response) => formatResponse(response, this.serviceName, this.logger), (reason) => formatError(reason, this.serviceName, this.logger));
|
|
17
17
|
}
|
|
18
|
+
async getLatestConsents(query) {
|
|
19
|
+
return this.client
|
|
20
|
+
.GET("/api/v1/support/consents/latest", {
|
|
21
|
+
params: { query },
|
|
22
|
+
})
|
|
23
|
+
.then((response) => formatResponse(response, this.serviceName, this.logger), (reason) => formatError(reason, this.serviceName, this.logger));
|
|
24
|
+
}
|
|
25
|
+
async submitConsents(body) {
|
|
26
|
+
return this.client
|
|
27
|
+
.POST("/api/v1/support/consents/", {
|
|
28
|
+
body,
|
|
29
|
+
})
|
|
30
|
+
.then((response) => formatResponse(response, this.serviceName, this.logger), (reason) => formatError(reason, this.serviceName, this.logger));
|
|
31
|
+
}
|
|
18
32
|
}
|
|
19
33
|
//# sourceMappingURL=support.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support.js","sourceRoot":"","sources":["../../../../src/client/clients/profile/support.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG1E,MAAM,OAAO,cAAc;IAEN;IACA;IACA;IAHnB,YACmB,MAA8C,EAC9C,WAAmB,EACnB,MAA0B;QAF1B,WAAM,GAAN,MAAM,CAAwC;QAC9C,gBAAW,GAAX,WAAW,CAAQ;QACnB,WAAM,GAAN,MAAM,CAAoB;IAC1C,CAAC;IAEJ,KAAK,CAAC,iBAAiB,CACrB,IAAoG;QAEpG,OAAO,IAAI,CAAC,MAAM;aACf,IAAI,CAAC,iCAAiC,EAAE;YACvC,IAAI;SACL,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"}
|
|
1
|
+
{"version":3,"file":"support.js","sourceRoot":"","sources":["../../../../src/client/clients/profile/support.ts"],"names":[],"mappings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,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"}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"messaging:template:*",
|
|
23
23
|
"messaging:event:read"
|
|
24
24
|
],
|
|
25
|
-
"updateDefinitions":
|
|
25
|
+
"updateDefinitions": false
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"name": "upload",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"openApiDefinitionFormat": "yaml",
|
|
31
31
|
"citizenPermissions": ["upload:file.self:write", "upload:file.self:read"],
|
|
32
32
|
"publicServantPermissions": ["upload:file:*", "profile:user:read"],
|
|
33
|
-
"updateDefinitions":
|
|
33
|
+
"updateDefinitions": false
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"name": "payments",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"openApiDefinitionFormat": "yaml",
|
|
57
57
|
"citizenPermissions": ["scheduler:jobs:write"],
|
|
58
58
|
"publicServantPermissions": ["scheduler:jobs:write"],
|
|
59
|
-
"updateDefinitions":
|
|
59
|
+
"updateDefinitions": false
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"name": "profile",
|
|
63
|
-
"openApiDefinitionUrl": "
|
|
63
|
+
"openApiDefinitionUrl": "http://localhost:8003/docs/yaml",
|
|
64
64
|
"openApiDefinitionFormat": "yaml",
|
|
65
65
|
"citizenPermissions": [
|
|
66
66
|
"profile:user.self:read",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"openApiDefinitionFormat": "json",
|
|
76
76
|
"citizenPermissions": [],
|
|
77
77
|
"publicServantPermissions": [],
|
|
78
|
-
"updateDefinitions":
|
|
78
|
+
"updateDefinitions": false
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"name": "journey",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"integrator:step:*",
|
|
92
92
|
"integrator:run:read"
|
|
93
93
|
],
|
|
94
|
-
"updateDefinitions":
|
|
94
|
+
"updateDefinitions": false
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"name": "auditCollector",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"openApiDefinitionFormat": "yaml",
|
|
100
100
|
"citizenPermissions": [],
|
|
101
101
|
"publicServantPermissions": [],
|
|
102
|
-
"updateDefinitions":
|
|
102
|
+
"updateDefinitions": false
|
|
103
103
|
}
|
|
104
104
|
]
|
|
105
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogcio/building-blocks-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.89",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"yaml": "^2.8.3"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@biomejs/biome": "2.4.
|
|
19
|
+
"@biomejs/biome": "2.4.11",
|
|
20
20
|
"@commitlint/config-conventional": "^20.5.0",
|
|
21
21
|
"@types/http-errors": "^2.0.5",
|
|
22
22
|
"@types/node": "^25.5.0",
|
package/renovate.json
CHANGED
|
@@ -172,6 +172,40 @@ export interface paths {
|
|
|
172
172
|
patch?: never;
|
|
173
173
|
trace?: never;
|
|
174
174
|
};
|
|
175
|
+
"/api/v1/support/consents/latest": {
|
|
176
|
+
parameters: {
|
|
177
|
+
query?: never;
|
|
178
|
+
header?: never;
|
|
179
|
+
path?: never;
|
|
180
|
+
cookie?: never;
|
|
181
|
+
};
|
|
182
|
+
/** @description Get the latest consent for all available subjects for a user */
|
|
183
|
+
get: operations["supportLatestConsent"];
|
|
184
|
+
put?: never;
|
|
185
|
+
post?: never;
|
|
186
|
+
delete?: never;
|
|
187
|
+
options?: never;
|
|
188
|
+
head?: never;
|
|
189
|
+
patch?: never;
|
|
190
|
+
trace?: never;
|
|
191
|
+
};
|
|
192
|
+
"/api/v1/support/consents/": {
|
|
193
|
+
parameters: {
|
|
194
|
+
query?: never;
|
|
195
|
+
header?: never;
|
|
196
|
+
path?: never;
|
|
197
|
+
cookie?: never;
|
|
198
|
+
};
|
|
199
|
+
get?: never;
|
|
200
|
+
put?: never;
|
|
201
|
+
/** @description Submit consents for the logged in user */
|
|
202
|
+
post: operations["supportSubmitConsents"];
|
|
203
|
+
delete?: never;
|
|
204
|
+
options?: never;
|
|
205
|
+
head?: never;
|
|
206
|
+
patch?: never;
|
|
207
|
+
trace?: never;
|
|
208
|
+
};
|
|
175
209
|
"/api/v1/jobs/import-profiles/{profileImportId}": {
|
|
176
210
|
parameters: {
|
|
177
211
|
query?: never;
|
|
@@ -307,6 +341,58 @@ export interface paths {
|
|
|
307
341
|
patch?: never;
|
|
308
342
|
trace?: never;
|
|
309
343
|
};
|
|
344
|
+
"/api/v1/onboarding/": {
|
|
345
|
+
parameters: {
|
|
346
|
+
query?: never;
|
|
347
|
+
header?: never;
|
|
348
|
+
path?: never;
|
|
349
|
+
cookie?: never;
|
|
350
|
+
};
|
|
351
|
+
get?: never;
|
|
352
|
+
put?: never;
|
|
353
|
+
/** @description Check SAFE level and assign the onboarded-citizen role to the authenticated user */
|
|
354
|
+
post: {
|
|
355
|
+
parameters: {
|
|
356
|
+
query?: never;
|
|
357
|
+
header?: never;
|
|
358
|
+
path?: never;
|
|
359
|
+
cookie?: never;
|
|
360
|
+
};
|
|
361
|
+
requestBody?: never;
|
|
362
|
+
responses: {
|
|
363
|
+
/** @description Default Response */
|
|
364
|
+
200: {
|
|
365
|
+
headers: {
|
|
366
|
+
[name: string]: unknown;
|
|
367
|
+
};
|
|
368
|
+
content: {
|
|
369
|
+
"application/json": {
|
|
370
|
+
success?: boolean;
|
|
371
|
+
safeLevel?: number;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
/** @description Default Response */
|
|
376
|
+
403: {
|
|
377
|
+
headers: {
|
|
378
|
+
[name: string]: unknown;
|
|
379
|
+
};
|
|
380
|
+
content: {
|
|
381
|
+
"application/json": {
|
|
382
|
+
error?: string;
|
|
383
|
+
safeLevel?: number;
|
|
384
|
+
required?: number;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
delete?: never;
|
|
391
|
+
options?: never;
|
|
392
|
+
head?: never;
|
|
393
|
+
patch?: never;
|
|
394
|
+
trace?: never;
|
|
395
|
+
};
|
|
310
396
|
"/api/v1/organisations/profiles/{profileId}": {
|
|
311
397
|
parameters: {
|
|
312
398
|
query?: never;
|
|
@@ -2268,6 +2354,218 @@ export interface operations {
|
|
|
2268
2354
|
};
|
|
2269
2355
|
};
|
|
2270
2356
|
};
|
|
2357
|
+
supportLatestConsent: {
|
|
2358
|
+
parameters: {
|
|
2359
|
+
query: {
|
|
2360
|
+
profileId: string;
|
|
2361
|
+
};
|
|
2362
|
+
header?: never;
|
|
2363
|
+
path?: never;
|
|
2364
|
+
cookie?: never;
|
|
2365
|
+
};
|
|
2366
|
+
requestBody?: never;
|
|
2367
|
+
responses: {
|
|
2368
|
+
/** @description Default Response */
|
|
2369
|
+
200: {
|
|
2370
|
+
headers: {
|
|
2371
|
+
[name: string]: unknown;
|
|
2372
|
+
};
|
|
2373
|
+
content: {
|
|
2374
|
+
"application/json": {
|
|
2375
|
+
data: {
|
|
2376
|
+
availableSubjects: string[];
|
|
2377
|
+
consents: {
|
|
2378
|
+
/** Format: uuid */
|
|
2379
|
+
id: string;
|
|
2380
|
+
profileId: string;
|
|
2381
|
+
status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
|
|
2382
|
+
subject: string;
|
|
2383
|
+
createdAt: string;
|
|
2384
|
+
/** Format: uuid */
|
|
2385
|
+
consentStatementId: string;
|
|
2386
|
+
}[];
|
|
2387
|
+
};
|
|
2388
|
+
metadata?: {
|
|
2389
|
+
/** @description Object containing the links to the related endpoints */
|
|
2390
|
+
links?: {
|
|
2391
|
+
self: {
|
|
2392
|
+
/** @description URL pointing to the request itself */
|
|
2393
|
+
href?: string;
|
|
2394
|
+
};
|
|
2395
|
+
next?: {
|
|
2396
|
+
/** @description URL pointing to the next page of results in a paginated response. If there are no more results, this field may be omitted */
|
|
2397
|
+
href?: string;
|
|
2398
|
+
};
|
|
2399
|
+
prev?: {
|
|
2400
|
+
/** @description URL pointing to the previous page of results in a paginated response. If there are no more results, this field may be omitted */
|
|
2401
|
+
href?: string;
|
|
2402
|
+
};
|
|
2403
|
+
first: {
|
|
2404
|
+
/** @description URL pointing to the first page of results in a paginated response */
|
|
2405
|
+
href?: string;
|
|
2406
|
+
};
|
|
2407
|
+
last: {
|
|
2408
|
+
/** @description URL pointing to the first page of results in a paginated response */
|
|
2409
|
+
href?: string;
|
|
2410
|
+
};
|
|
2411
|
+
/** @description It may contain a list of other useful URLs, e.g. one entry for page:'page 1', 'page 2' */
|
|
2412
|
+
pages: {
|
|
2413
|
+
[key: string]: {
|
|
2414
|
+
href?: string;
|
|
2415
|
+
};
|
|
2416
|
+
};
|
|
2417
|
+
};
|
|
2418
|
+
/** @description Number representing the total number of available items */
|
|
2419
|
+
totalCount?: number;
|
|
2420
|
+
};
|
|
2421
|
+
};
|
|
2422
|
+
};
|
|
2423
|
+
};
|
|
2424
|
+
/** @description Default Response */
|
|
2425
|
+
"4XX": {
|
|
2426
|
+
headers: {
|
|
2427
|
+
[name: string]: unknown;
|
|
2428
|
+
};
|
|
2429
|
+
content: {
|
|
2430
|
+
"application/json": {
|
|
2431
|
+
/** @description Code used to categorize the error */
|
|
2432
|
+
code: string;
|
|
2433
|
+
/** @description Description of the error */
|
|
2434
|
+
detail: string;
|
|
2435
|
+
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
2436
|
+
requestId: string;
|
|
2437
|
+
/** @description Name of the error type */
|
|
2438
|
+
name: string;
|
|
2439
|
+
/** @description List of the validation errors */
|
|
2440
|
+
validation?: {
|
|
2441
|
+
fieldName: string;
|
|
2442
|
+
message: string;
|
|
2443
|
+
}[];
|
|
2444
|
+
validationContext?: string;
|
|
2445
|
+
statusCode: number;
|
|
2446
|
+
};
|
|
2447
|
+
};
|
|
2448
|
+
};
|
|
2449
|
+
/** @description Default Response */
|
|
2450
|
+
"5XX": {
|
|
2451
|
+
headers: {
|
|
2452
|
+
[name: string]: unknown;
|
|
2453
|
+
};
|
|
2454
|
+
content: {
|
|
2455
|
+
"application/json": {
|
|
2456
|
+
/** @description Code used to categorize the error */
|
|
2457
|
+
code: string;
|
|
2458
|
+
/** @description Description of the error */
|
|
2459
|
+
detail: string;
|
|
2460
|
+
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
2461
|
+
requestId: string;
|
|
2462
|
+
/** @description Name of the error type */
|
|
2463
|
+
name: string;
|
|
2464
|
+
/** @description List of the validation errors */
|
|
2465
|
+
validation?: {
|
|
2466
|
+
fieldName: string;
|
|
2467
|
+
message: string;
|
|
2468
|
+
}[];
|
|
2469
|
+
validationContext?: string;
|
|
2470
|
+
statusCode: number;
|
|
2471
|
+
};
|
|
2472
|
+
};
|
|
2473
|
+
};
|
|
2474
|
+
};
|
|
2475
|
+
};
|
|
2476
|
+
supportSubmitConsents: {
|
|
2477
|
+
parameters: {
|
|
2478
|
+
query?: never;
|
|
2479
|
+
header?: never;
|
|
2480
|
+
path?: never;
|
|
2481
|
+
cookie?: never;
|
|
2482
|
+
};
|
|
2483
|
+
requestBody: {
|
|
2484
|
+
content: {
|
|
2485
|
+
"application/json": {
|
|
2486
|
+
profileId: string;
|
|
2487
|
+
consents: {
|
|
2488
|
+
subject: string;
|
|
2489
|
+
status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
|
|
2490
|
+
}[];
|
|
2491
|
+
};
|
|
2492
|
+
};
|
|
2493
|
+
};
|
|
2494
|
+
responses: {
|
|
2495
|
+
/** @description Default Response */
|
|
2496
|
+
201: {
|
|
2497
|
+
headers: {
|
|
2498
|
+
[name: string]: unknown;
|
|
2499
|
+
};
|
|
2500
|
+
content: {
|
|
2501
|
+
"application/json": {
|
|
2502
|
+
data: {
|
|
2503
|
+
/** Format: uuid */
|
|
2504
|
+
id: string;
|
|
2505
|
+
subject: string;
|
|
2506
|
+
status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
|
|
2507
|
+
/** Format: date-time */
|
|
2508
|
+
submittedAt: string;
|
|
2509
|
+
/** Format: uuid */
|
|
2510
|
+
consentStatementId: string;
|
|
2511
|
+
statementVersion: number;
|
|
2512
|
+
isLatestStatement: boolean;
|
|
2513
|
+
}[];
|
|
2514
|
+
};
|
|
2515
|
+
};
|
|
2516
|
+
};
|
|
2517
|
+
/** @description Default Response */
|
|
2518
|
+
"4XX": {
|
|
2519
|
+
headers: {
|
|
2520
|
+
[name: string]: unknown;
|
|
2521
|
+
};
|
|
2522
|
+
content: {
|
|
2523
|
+
"application/json": {
|
|
2524
|
+
/** @description Code used to categorize the error */
|
|
2525
|
+
code: string;
|
|
2526
|
+
/** @description Description of the error */
|
|
2527
|
+
detail: string;
|
|
2528
|
+
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
2529
|
+
requestId: string;
|
|
2530
|
+
/** @description Name of the error type */
|
|
2531
|
+
name: string;
|
|
2532
|
+
/** @description List of the validation errors */
|
|
2533
|
+
validation?: {
|
|
2534
|
+
fieldName: string;
|
|
2535
|
+
message: string;
|
|
2536
|
+
}[];
|
|
2537
|
+
validationContext?: string;
|
|
2538
|
+
statusCode: number;
|
|
2539
|
+
};
|
|
2540
|
+
};
|
|
2541
|
+
};
|
|
2542
|
+
/** @description Default Response */
|
|
2543
|
+
"5XX": {
|
|
2544
|
+
headers: {
|
|
2545
|
+
[name: string]: unknown;
|
|
2546
|
+
};
|
|
2547
|
+
content: {
|
|
2548
|
+
"application/json": {
|
|
2549
|
+
/** @description Code used to categorize the error */
|
|
2550
|
+
code: string;
|
|
2551
|
+
/** @description Description of the error */
|
|
2552
|
+
detail: string;
|
|
2553
|
+
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
2554
|
+
requestId: string;
|
|
2555
|
+
/** @description Name of the error type */
|
|
2556
|
+
name: string;
|
|
2557
|
+
/** @description List of the validation errors */
|
|
2558
|
+
validation?: {
|
|
2559
|
+
fieldName: string;
|
|
2560
|
+
message: string;
|
|
2561
|
+
}[];
|
|
2562
|
+
validationContext?: string;
|
|
2563
|
+
statusCode: number;
|
|
2564
|
+
};
|
|
2565
|
+
};
|
|
2566
|
+
};
|
|
2567
|
+
};
|
|
2568
|
+
};
|
|
2271
2569
|
getLifecycleTasks: {
|
|
2272
2570
|
parameters: {
|
|
2273
2571
|
query?: never;
|
|
@@ -22,4 +22,30 @@ export class ProfileSupport {
|
|
|
22
22
|
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
async getLatestConsents(
|
|
27
|
+
query: paths["/api/v1/support/consents/latest"]["get"]["parameters"]["query"],
|
|
28
|
+
) {
|
|
29
|
+
return this.client
|
|
30
|
+
.GET("/api/v1/support/consents/latest", {
|
|
31
|
+
params: { query },
|
|
32
|
+
})
|
|
33
|
+
.then(
|
|
34
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
35
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async submitConsents(
|
|
40
|
+
body: paths["/api/v1/support/consents/"]["post"]["requestBody"]["content"]["application/json"],
|
|
41
|
+
) {
|
|
42
|
+
return this.client
|
|
43
|
+
.POST("/api/v1/support/consents/", {
|
|
44
|
+
body,
|
|
45
|
+
})
|
|
46
|
+
.then(
|
|
47
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
48
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
49
|
+
);
|
|
50
|
+
}
|
|
25
51
|
}
|