@ogcio/building-blocks-sdk 0.2.46 → 0.2.48
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/.gitleaksignore +3 -1
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/client/clients/featureFlags/schema.d.ts +3693 -4712
- package/dist/client/clients/featureFlags/schema.d.ts.map +1 -1
- package/dist/client/clients/journey/index.d.ts +0 -2
- package/dist/client/clients/journey/index.d.ts.map +1 -1
- package/dist/client/clients/journey/schema.d.ts +0 -1
- package/dist/client/clients/journey/schema.d.ts.map +1 -1
- package/dist/client/clients/messaging/index.d.ts +6 -6
- package/dist/client/clients/messaging/index.d.ts.map +1 -1
- package/dist/client/clients/messaging/schema.d.ts +6 -11
- package/dist/client/clients/messaging/schema.d.ts.map +1 -1
- package/dist/client/clients/profile/citizen.d.ts +280 -0
- package/dist/client/clients/profile/citizen.d.ts.map +1 -0
- package/dist/client/clients/profile/citizen.js +22 -0
- package/dist/client/clients/profile/citizen.js.map +1 -0
- package/dist/client/clients/profile/index.d.ts +29 -0
- package/dist/client/clients/profile/index.d.ts.map +1 -1
- package/dist/client/clients/profile/index.js +7 -1
- package/dist/client/clients/profile/index.js.map +1 -1
- package/dist/client/clients/profile/schema.d.ts +508 -0
- package/dist/client/clients/profile/schema.d.ts.map +1 -1
- package/dist/clients-configurations/clients-configuration.json +1 -1
- package/package.json +1 -1
- package/src/client/clients/featureFlags/open-api-definition.json +4912 -5964
- package/src/client/clients/featureFlags/schema.ts +3693 -4712
- package/src/client/clients/journey/open-api-definition.json +1 -5
- package/src/client/clients/journey/schema.ts +0 -1
- package/src/client/clients/messaging/open-api-definition.json +47 -11
- package/src/client/clients/messaging/schema.ts +6 -11
- package/src/client/clients/profile/citizen.ts +34 -0
- package/src/client/clients/profile/index.ts +16 -1
- package/src/client/clients/profile/open-api-definition.json +1499 -0
- package/src/client/clients/profile/schema.ts +508 -0
- package/src/clients-configurations/clients-configuration.json +1 -1
|
@@ -6043,14 +6043,10 @@
|
|
|
6043
6043
|
"properties": {
|
|
6044
6044
|
"journeyId": {
|
|
6045
6045
|
"type": "string"
|
|
6046
|
-
},
|
|
6047
|
-
"choosenAuthMethod": {
|
|
6048
|
-
"type": "string"
|
|
6049
6046
|
}
|
|
6050
6047
|
},
|
|
6051
6048
|
"required": [
|
|
6052
|
-
"journeyId"
|
|
6053
|
-
"choosenAuthMethod"
|
|
6049
|
+
"journeyId"
|
|
6054
6050
|
]
|
|
6055
6051
|
}
|
|
6056
6052
|
}
|
|
@@ -124,8 +124,15 @@
|
|
|
124
124
|
"type": "string"
|
|
125
125
|
},
|
|
126
126
|
"threadName": {
|
|
127
|
-
"
|
|
128
|
-
|
|
127
|
+
"anyOf": [
|
|
128
|
+
{
|
|
129
|
+
"description": "Thread Name used to group messages",
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"type": "null"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
129
136
|
},
|
|
130
137
|
"organisationId": {
|
|
131
138
|
"description": "Organisation sender id",
|
|
@@ -773,8 +780,15 @@
|
|
|
773
780
|
"type": "string"
|
|
774
781
|
},
|
|
775
782
|
"threadName": {
|
|
776
|
-
"
|
|
777
|
-
|
|
783
|
+
"anyOf": [
|
|
784
|
+
{
|
|
785
|
+
"description": "Thread Name used to group messages",
|
|
786
|
+
"type": "string"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"type": "null"
|
|
790
|
+
}
|
|
791
|
+
]
|
|
778
792
|
},
|
|
779
793
|
"organisationId": {
|
|
780
794
|
"description": "Organisation sender id",
|
|
@@ -1050,8 +1064,15 @@
|
|
|
1050
1064
|
"type": "string"
|
|
1051
1065
|
},
|
|
1052
1066
|
"threadName": {
|
|
1053
|
-
"
|
|
1054
|
-
|
|
1067
|
+
"anyOf": [
|
|
1068
|
+
{
|
|
1069
|
+
"description": "Thread Name used to group messages",
|
|
1070
|
+
"type": "string"
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"type": "null"
|
|
1074
|
+
}
|
|
1075
|
+
]
|
|
1055
1076
|
},
|
|
1056
1077
|
"organisationId": {
|
|
1057
1078
|
"description": "Organisation sender id",
|
|
@@ -1062,16 +1083,30 @@
|
|
|
1062
1083
|
"type": "string"
|
|
1063
1084
|
},
|
|
1064
1085
|
"excerpt": {
|
|
1065
|
-
"
|
|
1066
|
-
|
|
1086
|
+
"anyOf": [
|
|
1087
|
+
{
|
|
1088
|
+
"description": "Brief description of the message",
|
|
1089
|
+
"type": "string"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"type": "null"
|
|
1093
|
+
}
|
|
1094
|
+
]
|
|
1067
1095
|
},
|
|
1068
1096
|
"plainText": {
|
|
1069
1097
|
"description": "Plain text version of the message",
|
|
1070
1098
|
"type": "string"
|
|
1071
1099
|
},
|
|
1072
1100
|
"richText": {
|
|
1073
|
-
"
|
|
1074
|
-
|
|
1101
|
+
"anyOf": [
|
|
1102
|
+
{
|
|
1103
|
+
"description": "Rich text version of the message",
|
|
1104
|
+
"type": "string"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"type": "null"
|
|
1108
|
+
}
|
|
1109
|
+
]
|
|
1075
1110
|
},
|
|
1076
1111
|
"isSeen": {
|
|
1077
1112
|
"description": "True if the message has already been seen by the recipient",
|
|
@@ -1100,7 +1135,9 @@
|
|
|
1100
1135
|
"threadName",
|
|
1101
1136
|
"organisationId",
|
|
1102
1137
|
"recipientUserId",
|
|
1138
|
+
"excerpt",
|
|
1103
1139
|
"plainText",
|
|
1140
|
+
"richText",
|
|
1104
1141
|
"isSeen",
|
|
1105
1142
|
"security",
|
|
1106
1143
|
"attachments"
|
|
@@ -4896,7 +4933,6 @@
|
|
|
4896
4933
|
"subject",
|
|
4897
4934
|
"language",
|
|
4898
4935
|
"plainText",
|
|
4899
|
-
"threadName",
|
|
4900
4936
|
"transports",
|
|
4901
4937
|
"scheduledAt",
|
|
4902
4938
|
"organisationName",
|
|
@@ -470,7 +470,7 @@ export interface paths {
|
|
|
470
470
|
/** @description Plain text context of the related message */
|
|
471
471
|
plainText: string;
|
|
472
472
|
/** @description Thread name of the related message */
|
|
473
|
-
threadName
|
|
473
|
+
threadName?: string;
|
|
474
474
|
/** @description Selected transports to send the message */
|
|
475
475
|
transports: string[];
|
|
476
476
|
/**
|
|
@@ -804,8 +804,7 @@ export interface operations {
|
|
|
804
804
|
subject: string;
|
|
805
805
|
/** @description Creation date time */
|
|
806
806
|
createdAt: string;
|
|
807
|
-
|
|
808
|
-
threadName: string;
|
|
807
|
+
threadName: string | null;
|
|
809
808
|
/** @description Organisation sender id */
|
|
810
809
|
organisationId: string;
|
|
811
810
|
/** @description Unique id of the recipient */
|
|
@@ -1096,8 +1095,7 @@ export interface operations {
|
|
|
1096
1095
|
subject: string;
|
|
1097
1096
|
/** @description Creation date time */
|
|
1098
1097
|
createdAt: string;
|
|
1099
|
-
|
|
1100
|
-
threadName: string;
|
|
1098
|
+
threadName: string | null;
|
|
1101
1099
|
/** @description Organisation sender id */
|
|
1102
1100
|
organisationId: string;
|
|
1103
1101
|
/** @description Unique id of the recipient */
|
|
@@ -1217,18 +1215,15 @@ export interface operations {
|
|
|
1217
1215
|
subject: string;
|
|
1218
1216
|
/** @description Creation date time */
|
|
1219
1217
|
createdAt: string;
|
|
1220
|
-
|
|
1221
|
-
threadName: string;
|
|
1218
|
+
threadName: string | null;
|
|
1222
1219
|
/** @description Organisation sender id */
|
|
1223
1220
|
organisationId: string;
|
|
1224
1221
|
/** @description Unique id of the recipient */
|
|
1225
1222
|
recipientUserId: string;
|
|
1226
|
-
|
|
1227
|
-
excerpt?: string;
|
|
1223
|
+
excerpt: string | null;
|
|
1228
1224
|
/** @description Plain text version of the message */
|
|
1229
1225
|
plainText: string;
|
|
1230
|
-
|
|
1231
|
-
richText?: string;
|
|
1226
|
+
richText: string | null;
|
|
1232
1227
|
/** @description True if the message has already been seen by the recipient */
|
|
1233
1228
|
isSeen: boolean;
|
|
1234
1229
|
/**
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type createClient from "openapi-fetch";
|
|
2
|
+
import type { paths } from "./schema.js";
|
|
3
|
+
|
|
4
|
+
export class ProfileCitizen {
|
|
5
|
+
constructor(
|
|
6
|
+
private readonly client: ReturnType<typeof createClient<paths>>,
|
|
7
|
+
) {}
|
|
8
|
+
|
|
9
|
+
async getLatestConsent(
|
|
10
|
+
query: paths["/api/v1/citizens/consents/latest"]["get"]["parameters"]["query"],
|
|
11
|
+
) {
|
|
12
|
+
return this.client.GET("/api/v1/citizens/consents/latest", {
|
|
13
|
+
params: { query },
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async submitConsent(
|
|
18
|
+
body: NonNullable<
|
|
19
|
+
paths["/api/v1/citizens/consents/"]["post"]["requestBody"]
|
|
20
|
+
>["content"]["application/json"],
|
|
21
|
+
) {
|
|
22
|
+
return this.client.POST("/api/v1/citizens/consents/", {
|
|
23
|
+
body,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async listConsents(
|
|
28
|
+
query: paths["/api/v1/citizens/consents/"]["get"]["parameters"]["query"],
|
|
29
|
+
) {
|
|
30
|
+
return this.client.GET("/api/v1/citizens/consents/", {
|
|
31
|
+
params: { query },
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
import createError from "http-errors";
|
|
2
2
|
import type createClient from "openapi-fetch";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
type Logger,
|
|
5
|
+
PROFILE,
|
|
6
|
+
type TokenFunction,
|
|
7
|
+
} from "../../../types/index.js";
|
|
4
8
|
import { BaseClient } from "../../base-client.js";
|
|
5
9
|
import {
|
|
6
10
|
formatError,
|
|
7
11
|
formatResponse,
|
|
8
12
|
throwIfEmpty,
|
|
9
13
|
} from "../../utils/client-utils.js";
|
|
14
|
+
import { ProfileCitizen } from "./citizen.js";
|
|
10
15
|
import type { paths } from "./schema.js";
|
|
11
16
|
export class Profile extends BaseClient<paths> {
|
|
12
17
|
protected declare client: ReturnType<typeof createClient<paths>>;
|
|
13
18
|
protected serviceName = PROFILE;
|
|
19
|
+
public readonly citizen: ProfileCitizen;
|
|
20
|
+
|
|
21
|
+
constructor(params: {
|
|
22
|
+
baseUrl: string;
|
|
23
|
+
getTokenFn?: TokenFunction;
|
|
24
|
+
logger?: Logger;
|
|
25
|
+
}) {
|
|
26
|
+
super(params);
|
|
27
|
+
this.citizen = new ProfileCitizen(this.client);
|
|
28
|
+
}
|
|
14
29
|
|
|
15
30
|
async getProfile(profileId: string, privateDetails = false) {
|
|
16
31
|
throwIfEmpty(profileId);
|