@ogcio/building-blocks-sdk 0.2.89 → 0.2.90
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/biome.jsonc +1 -1
- package/dist/client/clients/messaging/index.d.ts +86 -2
- package/dist/client/clients/messaging/index.d.ts.map +1 -1
- package/dist/client/clients/messaging/index.js +25 -2
- package/dist/client/clients/messaging/index.js.map +1 -1
- package/dist/client/clients/messaging/schema.d.ts +877 -2
- package/dist/client/clients/messaging/schema.d.ts.map +1 -1
- package/dist/client/clients/messaging/support.d.ts +2 -0
- package/dist/client/clients/messaging/support.d.ts.map +1 -1
- package/dist/client/clients/messaging/tags.d.ts +587 -0
- package/dist/client/clients/messaging/tags.d.ts.map +1 -0
- package/dist/client/clients/messaging/tags.js +49 -0
- package/dist/client/clients/messaging/tags.js.map +1 -0
- package/dist/client/clients/profile/index.d.ts.map +1 -1
- package/dist/client/clients/profile/index.js +1 -1
- package/dist/client/clients/profile/index.js.map +1 -1
- package/dist/client/clients/scheduler/schema.d.ts +1 -1
- package/dist/client/clients/scheduler/schema.d.ts.map +1 -1
- package/dist/client/clients/upload/index.d.ts +1 -1
- package/dist/client/clients/upload/index.d.ts.map +1 -1
- package/dist/client/clients/upload/schema.d.ts +4 -4
- package/dist/client/clients/upload/schema.d.ts.map +1 -1
- package/dist/client/clients/upload/support.d.ts +1 -1
- package/dist/client/clients/upload/support.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/client/clients/messaging/index.ts +39 -2
- package/src/client/clients/messaging/open-api-definition.json +3113 -1242
- package/src/client/clients/messaging/schema.ts +877 -2
- package/src/client/clients/messaging/tags.ts +86 -0
- package/src/client/clients/profile/index.ts +1 -1
- package/src/client/clients/profile/open-api-definition.json +49 -0
- package/src/client/clients/scheduler/open-api-definition.json +33 -32
- package/src/client/clients/scheduler/schema.ts +1 -1
- package/src/client/clients/upload/open-api-definition.json +10 -6
- package/src/client/clients/upload/schema.ts +4 -4
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type createClient from "openapi-fetch";
|
|
2
|
+
import type { Logger } from "../../../types/index.js";
|
|
3
|
+
import {
|
|
4
|
+
formatError,
|
|
5
|
+
formatResponse,
|
|
6
|
+
throwIfEmpty,
|
|
7
|
+
} from "../../utils/client-utils.js";
|
|
8
|
+
import type { paths } from "./schema.js";
|
|
9
|
+
|
|
10
|
+
export class MessagingTags {
|
|
11
|
+
constructor(
|
|
12
|
+
private readonly client: ReturnType<typeof createClient<paths>>,
|
|
13
|
+
private readonly serviceName: string,
|
|
14
|
+
private readonly logger: Logger | undefined,
|
|
15
|
+
) {}
|
|
16
|
+
|
|
17
|
+
async assignToMessages(
|
|
18
|
+
body: paths["/api/v1/messages/tags"]["post"]["requestBody"]["content"]["application/json"],
|
|
19
|
+
) {
|
|
20
|
+
return this.client
|
|
21
|
+
.POST("/api/v1/messages/tags", {
|
|
22
|
+
body,
|
|
23
|
+
})
|
|
24
|
+
.then(
|
|
25
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
26
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async getAll() {
|
|
31
|
+
return this.client.GET("/api/v1/tags/", {}).then(
|
|
32
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
33
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async getTree() {
|
|
38
|
+
return this.client.GET("/api/v1/tags/tree", {}).then(
|
|
39
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
40
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async create(
|
|
45
|
+
body: paths["/api/v1/tags/"]["post"]["requestBody"]["content"]["application/json"],
|
|
46
|
+
) {
|
|
47
|
+
return this.client
|
|
48
|
+
.POST("/api/v1/tags/", {
|
|
49
|
+
body,
|
|
50
|
+
})
|
|
51
|
+
.then(
|
|
52
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
53
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async update(
|
|
58
|
+
tagId: paths["/api/v1/tags/{tagId}"]["patch"]["parameters"]["path"]["tagId"],
|
|
59
|
+
body: paths["/api/v1/tags/{tagId}"]["patch"]["requestBody"]["content"]["application/json"],
|
|
60
|
+
) {
|
|
61
|
+
throwIfEmpty(tagId);
|
|
62
|
+
return this.client
|
|
63
|
+
.PATCH("/api/v1/tags/{tagId}", {
|
|
64
|
+
params: { path: { tagId } },
|
|
65
|
+
body,
|
|
66
|
+
})
|
|
67
|
+
.then(
|
|
68
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
69
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async delete(
|
|
74
|
+
tagId: paths["/api/v1/tags/{tagId}"]["delete"]["parameters"]["path"]["tagId"],
|
|
75
|
+
) {
|
|
76
|
+
throwIfEmpty(tagId);
|
|
77
|
+
return this.client
|
|
78
|
+
.DELETE("/api/v1/tags/{tagId}", {
|
|
79
|
+
params: { path: { tagId } },
|
|
80
|
+
})
|
|
81
|
+
.then(
|
|
82
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
83
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -238,7 +238,7 @@ export class Profile extends BaseClient<paths> {
|
|
|
238
238
|
params: { query },
|
|
239
239
|
bodySerializer: (body: unknown) => {
|
|
240
240
|
const parsed = body as { file?: File } | undefined;
|
|
241
|
-
if (!parsed
|
|
241
|
+
if (!parsed?.file) {
|
|
242
242
|
throw createError.BadRequest("File is missing!");
|
|
243
243
|
}
|
|
244
244
|
const formData = new FormData();
|
|
@@ -5719,6 +5719,55 @@
|
|
|
5719
5719
|
}
|
|
5720
5720
|
}
|
|
5721
5721
|
},
|
|
5722
|
+
"/api/v1/onboarding/": {
|
|
5723
|
+
"post": {
|
|
5724
|
+
"tags": [
|
|
5725
|
+
"Onboarding"
|
|
5726
|
+
],
|
|
5727
|
+
"description": "Check SAFE level and assign the onboarded-citizen role to the authenticated user",
|
|
5728
|
+
"responses": {
|
|
5729
|
+
"200": {
|
|
5730
|
+
"description": "Default Response",
|
|
5731
|
+
"content": {
|
|
5732
|
+
"application/json": {
|
|
5733
|
+
"schema": {
|
|
5734
|
+
"type": "object",
|
|
5735
|
+
"properties": {
|
|
5736
|
+
"success": {
|
|
5737
|
+
"type": "boolean"
|
|
5738
|
+
},
|
|
5739
|
+
"safeLevel": {
|
|
5740
|
+
"type": "number"
|
|
5741
|
+
}
|
|
5742
|
+
}
|
|
5743
|
+
}
|
|
5744
|
+
}
|
|
5745
|
+
}
|
|
5746
|
+
},
|
|
5747
|
+
"403": {
|
|
5748
|
+
"description": "Default Response",
|
|
5749
|
+
"content": {
|
|
5750
|
+
"application/json": {
|
|
5751
|
+
"schema": {
|
|
5752
|
+
"type": "object",
|
|
5753
|
+
"properties": {
|
|
5754
|
+
"error": {
|
|
5755
|
+
"type": "string"
|
|
5756
|
+
},
|
|
5757
|
+
"safeLevel": {
|
|
5758
|
+
"type": "number"
|
|
5759
|
+
},
|
|
5760
|
+
"required": {
|
|
5761
|
+
"type": "number"
|
|
5762
|
+
}
|
|
5763
|
+
}
|
|
5764
|
+
}
|
|
5765
|
+
}
|
|
5766
|
+
}
|
|
5767
|
+
}
|
|
5768
|
+
}
|
|
5769
|
+
}
|
|
5770
|
+
},
|
|
5722
5771
|
"/api/v1/organisations/profiles/{profileId}": {
|
|
5723
5772
|
"patch": {
|
|
5724
5773
|
"operationId": "adminProfilesPatch",
|
|
@@ -24,30 +24,31 @@
|
|
|
24
24
|
"Tasks"
|
|
25
25
|
],
|
|
26
26
|
"requestBody": {
|
|
27
|
+
"required": true,
|
|
27
28
|
"content": {
|
|
28
29
|
"application/json": {
|
|
29
30
|
"schema": {
|
|
30
31
|
"type": "array",
|
|
31
32
|
"items": {
|
|
32
33
|
"type": "object",
|
|
34
|
+
"required": [
|
|
35
|
+
"webhookUrl",
|
|
36
|
+
"webhookAuth",
|
|
37
|
+
"executeAt"
|
|
38
|
+
],
|
|
33
39
|
"properties": {
|
|
34
40
|
"webhookUrl": {
|
|
35
|
-
"
|
|
36
|
-
"
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": "uri"
|
|
37
43
|
},
|
|
38
44
|
"webhookAuth": {
|
|
39
45
|
"type": "string"
|
|
40
46
|
},
|
|
41
47
|
"executeAt": {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
48
|
+
"type": "string",
|
|
49
|
+
"format": "date-time"
|
|
44
50
|
}
|
|
45
|
-
}
|
|
46
|
-
"required": [
|
|
47
|
-
"webhookUrl",
|
|
48
|
-
"webhookAuth",
|
|
49
|
-
"executeAt"
|
|
50
|
-
]
|
|
51
|
+
}
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -63,28 +64,37 @@
|
|
|
63
64
|
"application/json": {
|
|
64
65
|
"schema": {
|
|
65
66
|
"type": "object",
|
|
67
|
+
"required": [
|
|
68
|
+
"code",
|
|
69
|
+
"detail",
|
|
70
|
+
"requestId",
|
|
71
|
+
"name"
|
|
72
|
+
],
|
|
66
73
|
"properties": {
|
|
67
74
|
"code": {
|
|
68
|
-
"
|
|
69
|
-
"
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "Code used to categorize the error"
|
|
70
77
|
},
|
|
71
78
|
"detail": {
|
|
72
|
-
"
|
|
73
|
-
"
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "Description of the error"
|
|
74
81
|
},
|
|
75
82
|
"requestId": {
|
|
76
|
-
"
|
|
77
|
-
"
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "Unique request id. This one will be used to troubleshoot the problems"
|
|
78
85
|
},
|
|
79
86
|
"name": {
|
|
80
|
-
"
|
|
81
|
-
"
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "Name of the error type"
|
|
82
89
|
},
|
|
83
90
|
"validation": {
|
|
84
|
-
"description": "List of the validation errors",
|
|
85
91
|
"type": "array",
|
|
86
92
|
"items": {
|
|
87
93
|
"type": "object",
|
|
94
|
+
"required": [
|
|
95
|
+
"fieldName",
|
|
96
|
+
"message"
|
|
97
|
+
],
|
|
88
98
|
"properties": {
|
|
89
99
|
"fieldName": {
|
|
90
100
|
"type": "string"
|
|
@@ -92,23 +102,14 @@
|
|
|
92
102
|
"message": {
|
|
93
103
|
"type": "string"
|
|
94
104
|
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"message"
|
|
99
|
-
]
|
|
100
|
-
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"description": "List of the validation errors"
|
|
101
108
|
},
|
|
102
109
|
"validationContext": {
|
|
103
110
|
"type": "string"
|
|
104
111
|
}
|
|
105
|
-
}
|
|
106
|
-
"required": [
|
|
107
|
-
"code",
|
|
108
|
-
"detail",
|
|
109
|
-
"requestId",
|
|
110
|
-
"name"
|
|
111
|
-
]
|
|
112
|
+
}
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"Files"
|
|
16
16
|
],
|
|
17
17
|
"requestBody": {
|
|
18
|
+
"required": true,
|
|
18
19
|
"content": {
|
|
19
20
|
"multipart/form-data": {
|
|
20
21
|
"schema": {
|
|
@@ -227,6 +228,7 @@
|
|
|
227
228
|
"SupportFiles"
|
|
228
229
|
],
|
|
229
230
|
"requestBody": {
|
|
231
|
+
"required": true,
|
|
230
232
|
"content": {
|
|
231
233
|
"multipart/form-data": {
|
|
232
234
|
"schema": {
|
|
@@ -342,6 +344,7 @@
|
|
|
342
344
|
"SupportFiles"
|
|
343
345
|
],
|
|
344
346
|
"requestBody": {
|
|
347
|
+
"required": true,
|
|
345
348
|
"content": {
|
|
346
349
|
"application/json": {
|
|
347
350
|
"schema": {
|
|
@@ -365,8 +368,7 @@
|
|
|
365
368
|
}
|
|
366
369
|
}
|
|
367
370
|
}
|
|
368
|
-
}
|
|
369
|
-
"required": true
|
|
371
|
+
}
|
|
370
372
|
},
|
|
371
373
|
"responses": {
|
|
372
374
|
"200": {
|
|
@@ -623,6 +625,7 @@
|
|
|
623
625
|
"Metadata"
|
|
624
626
|
],
|
|
625
627
|
"requestBody": {
|
|
628
|
+
"required": true,
|
|
626
629
|
"content": {
|
|
627
630
|
"application/json": {
|
|
628
631
|
"schema": {
|
|
@@ -637,8 +640,7 @@
|
|
|
637
640
|
}
|
|
638
641
|
}
|
|
639
642
|
}
|
|
640
|
-
}
|
|
641
|
-
"required": true
|
|
643
|
+
}
|
|
642
644
|
},
|
|
643
645
|
"responses": {
|
|
644
646
|
"200": {
|
|
@@ -1069,6 +1071,7 @@
|
|
|
1069
1071
|
"Permissions"
|
|
1070
1072
|
],
|
|
1071
1073
|
"requestBody": {
|
|
1074
|
+
"required": true,
|
|
1072
1075
|
"content": {
|
|
1073
1076
|
"application/json": {
|
|
1074
1077
|
"schema": {
|
|
@@ -1245,6 +1248,7 @@
|
|
|
1245
1248
|
"Permissions"
|
|
1246
1249
|
],
|
|
1247
1250
|
"requestBody": {
|
|
1251
|
+
"required": true,
|
|
1248
1252
|
"content": {
|
|
1249
1253
|
"application/json": {
|
|
1250
1254
|
"schema": {
|
|
@@ -1263,8 +1267,7 @@
|
|
|
1263
1267
|
}
|
|
1264
1268
|
}
|
|
1265
1269
|
}
|
|
1266
|
-
}
|
|
1267
|
-
"required": true
|
|
1270
|
+
}
|
|
1268
1271
|
},
|
|
1269
1272
|
"responses": {
|
|
1270
1273
|
"4XX": {
|
|
@@ -1462,6 +1465,7 @@
|
|
|
1462
1465
|
"SupportPermissions"
|
|
1463
1466
|
],
|
|
1464
1467
|
"requestBody": {
|
|
1468
|
+
"required": true,
|
|
1465
1469
|
"content": {
|
|
1466
1470
|
"application/json": {
|
|
1467
1471
|
"schema": {
|
|
@@ -15,7 +15,7 @@ export interface paths {
|
|
|
15
15
|
path?: never;
|
|
16
16
|
cookie?: never;
|
|
17
17
|
};
|
|
18
|
-
requestBody
|
|
18
|
+
requestBody: {
|
|
19
19
|
content: {
|
|
20
20
|
"multipart/form-data": unknown | unknown;
|
|
21
21
|
};
|
|
@@ -159,7 +159,7 @@ export interface paths {
|
|
|
159
159
|
path?: never;
|
|
160
160
|
cookie?: never;
|
|
161
161
|
};
|
|
162
|
-
requestBody
|
|
162
|
+
requestBody: {
|
|
163
163
|
content: {
|
|
164
164
|
"multipart/form-data": unknown | unknown;
|
|
165
165
|
};
|
|
@@ -687,7 +687,7 @@ export interface paths {
|
|
|
687
687
|
path?: never;
|
|
688
688
|
cookie?: never;
|
|
689
689
|
};
|
|
690
|
-
requestBody
|
|
690
|
+
requestBody: {
|
|
691
691
|
content: {
|
|
692
692
|
"application/json": {
|
|
693
693
|
fileId: string;
|
|
@@ -821,7 +821,7 @@ export interface paths {
|
|
|
821
821
|
path?: never;
|
|
822
822
|
cookie?: never;
|
|
823
823
|
};
|
|
824
|
-
requestBody
|
|
824
|
+
requestBody: {
|
|
825
825
|
content: {
|
|
826
826
|
"application/json": {
|
|
827
827
|
fileId: string;
|