@ogcio/building-blocks-sdk 0.2.84 → 0.2.85
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/messaging/index.d.ts +8 -0
- package/dist/client/clients/messaging/index.d.ts.map +1 -1
- package/dist/client/clients/messaging/index.js +7 -1
- package/dist/client/clients/messaging/index.js.map +1 -1
- package/dist/client/clients/messaging/schema.d.ts +154 -0
- package/dist/client/clients/messaging/schema.d.ts.map +1 -1
- package/dist/client/clients/messaging/support.d.ts +125 -0
- package/dist/client/clients/messaging/support.d.ts.map +1 -0
- package/dist/client/clients/messaging/support.js +20 -0
- package/dist/client/clients/messaging/support.js.map +1 -0
- package/dist/client/clients/profile/citizen.d.ts.map +1 -1
- package/dist/client/clients/profile/index.d.ts +7 -79
- package/dist/client/clients/profile/index.d.ts.map +1 -1
- package/dist/client/clients/profile/index.js +13 -20
- package/dist/client/clients/profile/index.js.map +1 -1
- package/dist/client/clients/profile/organisation.d.ts.map +1 -1
- package/dist/client/clients/profile/schema.d.ts +1 -89
- package/dist/client/clients/profile/schema.d.ts.map +1 -1
- package/dist/client/clients/upload/index.d.ts +8 -0
- package/dist/client/clients/upload/index.d.ts.map +1 -1
- package/dist/client/clients/upload/index.js +7 -1
- package/dist/client/clients/upload/index.js.map +1 -1
- package/dist/client/clients/upload/schema.d.ts +321 -0
- package/dist/client/clients/upload/schema.d.ts.map +1 -1
- package/dist/client/clients/upload/support.d.ts +224 -0
- package/dist/client/clients/upload/support.d.ts.map +1 -0
- package/dist/client/clients/upload/support.js +89 -0
- package/dist/client/clients/upload/support.js.map +1 -0
- package/package.json +1 -1
- package/src/client/clients/messaging/index.ts +20 -1
- package/src/client/clients/messaging/open-api-definition.json +355 -0
- package/src/client/clients/messaging/schema.ts +154 -0
- package/src/client/clients/messaging/support.ts +27 -0
- package/src/client/clients/profile/index.ts +33 -35
- package/src/client/clients/profile/open-api-definition.json +3 -163
- package/src/client/clients/profile/schema.ts +1 -89
- package/src/client/clients/upload/index.ts +21 -1
- package/src/client/clients/upload/open-api-definition.json +621 -41
- package/src/client/clients/upload/schema.ts +321 -0
- package/src/client/clients/upload/support.ts +128 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type createClient from "openapi-fetch";
|
|
2
|
+
import type { Logger } from "../../../types/index.js";
|
|
3
|
+
import { formatError, formatResponse } from "../../utils/client-utils.js";
|
|
4
|
+
import type { paths } from "./schema.js";
|
|
5
|
+
|
|
6
|
+
export class MessagingSupport {
|
|
7
|
+
constructor(
|
|
8
|
+
private readonly client: ReturnType<typeof createClient<paths>>,
|
|
9
|
+
private readonly serviceName: string,
|
|
10
|
+
private readonly logger: Logger | undefined,
|
|
11
|
+
) {}
|
|
12
|
+
|
|
13
|
+
async postMessagesSearch(
|
|
14
|
+
query: paths["/api/v1/support/messages/search"]["post"]["parameters"]["query"],
|
|
15
|
+
body: paths["/api/v1/support/messages/search"]["post"]["requestBody"]["content"]["application/json"],
|
|
16
|
+
) {
|
|
17
|
+
return this.client
|
|
18
|
+
.POST("/api/v1/support/messages/search", {
|
|
19
|
+
params: { query },
|
|
20
|
+
body,
|
|
21
|
+
})
|
|
22
|
+
.then(
|
|
23
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
24
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -337,12 +337,17 @@ export class Profile extends BaseClient<paths> {
|
|
|
337
337
|
"type"
|
|
338
338
|
>,
|
|
339
339
|
) {
|
|
340
|
-
return this.client
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
340
|
+
return this.client
|
|
341
|
+
.POST("/api/v1/lifecycle-tasks/", {
|
|
342
|
+
body: { ...params, type: "export_user_data" },
|
|
343
|
+
headers: {
|
|
344
|
+
"Content-Type": "application/json",
|
|
345
|
+
},
|
|
346
|
+
})
|
|
347
|
+
.then(
|
|
348
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
349
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
350
|
+
);
|
|
346
351
|
}
|
|
347
352
|
|
|
348
353
|
async createDeleteProfileLifecycleTask(
|
|
@@ -351,39 +356,32 @@ export class Profile extends BaseClient<paths> {
|
|
|
351
356
|
"type"
|
|
352
357
|
>,
|
|
353
358
|
) {
|
|
354
|
-
return this.client
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
359
|
+
return this.client
|
|
360
|
+
.POST("/api/v1/lifecycle-tasks/", {
|
|
361
|
+
body: { ...params, type: "delete_profile" },
|
|
362
|
+
headers: {
|
|
363
|
+
"Content-Type": "application/json",
|
|
364
|
+
},
|
|
365
|
+
})
|
|
366
|
+
.then(
|
|
367
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
368
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
369
|
+
);
|
|
360
370
|
}
|
|
361
371
|
|
|
362
372
|
async getLifecycleTasks(
|
|
363
|
-
params: paths["/api/v1/lifecycle-tasks/search"]["post"]["requestBody"]["content"]["application/json"]
|
|
373
|
+
params: paths["/api/v1/lifecycle-tasks/search"]["post"]["requestBody"]["content"]["application/json"],
|
|
364
374
|
) {
|
|
365
|
-
return this.client
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
async downloadLifecycleTaskContext(params: {
|
|
374
|
-
profileId: string;
|
|
375
|
-
lifecycleTaskId: string;
|
|
376
|
-
}) {
|
|
377
|
-
return this.client.GET("/api/v1/lifecycle-tasks/{id}/action", {
|
|
378
|
-
params: {
|
|
379
|
-
path: {
|
|
380
|
-
id: params.lifecycleTaskId,
|
|
381
|
-
},
|
|
382
|
-
query: {
|
|
383
|
-
profileId: params.profileId,
|
|
384
|
-
q: "download",
|
|
375
|
+
return this.client
|
|
376
|
+
.POST("/api/v1/lifecycle-tasks/search", {
|
|
377
|
+
body: params,
|
|
378
|
+
headers: {
|
|
379
|
+
"Content-Type": "application/json",
|
|
385
380
|
},
|
|
386
|
-
}
|
|
387
|
-
|
|
381
|
+
})
|
|
382
|
+
.then(
|
|
383
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
384
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
385
|
+
);
|
|
388
386
|
}
|
|
389
387
|
}
|
|
@@ -5379,6 +5379,9 @@
|
|
|
5379
5379
|
"expiresAt": {
|
|
5380
5380
|
"format": "date-time",
|
|
5381
5381
|
"type": "string"
|
|
5382
|
+
},
|
|
5383
|
+
"uploadId": {
|
|
5384
|
+
"type": "string"
|
|
5382
5385
|
}
|
|
5383
5386
|
}
|
|
5384
5387
|
},
|
|
@@ -5716,169 +5719,6 @@
|
|
|
5716
5719
|
}
|
|
5717
5720
|
}
|
|
5718
5721
|
},
|
|
5719
|
-
"/api/v1/lifecycle-tasks/{id}/action": {
|
|
5720
|
-
"get": {
|
|
5721
|
-
"operationId": "taskAction",
|
|
5722
|
-
"tags": [
|
|
5723
|
-
"Lifecycle Tasks"
|
|
5724
|
-
],
|
|
5725
|
-
"parameters": [
|
|
5726
|
-
{
|
|
5727
|
-
"schema": {
|
|
5728
|
-
"type": "string"
|
|
5729
|
-
},
|
|
5730
|
-
"in": "query",
|
|
5731
|
-
"name": "profileId",
|
|
5732
|
-
"required": true
|
|
5733
|
-
},
|
|
5734
|
-
{
|
|
5735
|
-
"schema": {
|
|
5736
|
-
"type": "string",
|
|
5737
|
-
"enum": [
|
|
5738
|
-
"download"
|
|
5739
|
-
]
|
|
5740
|
-
},
|
|
5741
|
-
"in": "query",
|
|
5742
|
-
"name": "q",
|
|
5743
|
-
"required": true
|
|
5744
|
-
},
|
|
5745
|
-
{
|
|
5746
|
-
"schema": {
|
|
5747
|
-
"format": "uuid",
|
|
5748
|
-
"type": "string"
|
|
5749
|
-
},
|
|
5750
|
-
"in": "path",
|
|
5751
|
-
"name": "id",
|
|
5752
|
-
"required": true
|
|
5753
|
-
}
|
|
5754
|
-
],
|
|
5755
|
-
"responses": {
|
|
5756
|
-
"302": {
|
|
5757
|
-
"description": "Default Response"
|
|
5758
|
-
},
|
|
5759
|
-
"4XX": {
|
|
5760
|
-
"description": "Default Response",
|
|
5761
|
-
"content": {
|
|
5762
|
-
"application/json": {
|
|
5763
|
-
"schema": {
|
|
5764
|
-
"type": "object",
|
|
5765
|
-
"required": [
|
|
5766
|
-
"code",
|
|
5767
|
-
"detail",
|
|
5768
|
-
"requestId",
|
|
5769
|
-
"name",
|
|
5770
|
-
"statusCode"
|
|
5771
|
-
],
|
|
5772
|
-
"properties": {
|
|
5773
|
-
"code": {
|
|
5774
|
-
"description": "Code used to categorize the error",
|
|
5775
|
-
"type": "string"
|
|
5776
|
-
},
|
|
5777
|
-
"detail": {
|
|
5778
|
-
"description": "Description of the error",
|
|
5779
|
-
"type": "string"
|
|
5780
|
-
},
|
|
5781
|
-
"requestId": {
|
|
5782
|
-
"description": "Unique request id. This one will be used to troubleshoot the problems",
|
|
5783
|
-
"type": "string"
|
|
5784
|
-
},
|
|
5785
|
-
"name": {
|
|
5786
|
-
"description": "Name of the error type",
|
|
5787
|
-
"type": "string"
|
|
5788
|
-
},
|
|
5789
|
-
"validation": {
|
|
5790
|
-
"description": "List of the validation errors",
|
|
5791
|
-
"type": "array",
|
|
5792
|
-
"items": {
|
|
5793
|
-
"type": "object",
|
|
5794
|
-
"required": [
|
|
5795
|
-
"fieldName",
|
|
5796
|
-
"message"
|
|
5797
|
-
],
|
|
5798
|
-
"properties": {
|
|
5799
|
-
"fieldName": {
|
|
5800
|
-
"type": "string"
|
|
5801
|
-
},
|
|
5802
|
-
"message": {
|
|
5803
|
-
"type": "string"
|
|
5804
|
-
}
|
|
5805
|
-
}
|
|
5806
|
-
}
|
|
5807
|
-
},
|
|
5808
|
-
"validationContext": {
|
|
5809
|
-
"type": "string"
|
|
5810
|
-
},
|
|
5811
|
-
"statusCode": {
|
|
5812
|
-
"type": "number"
|
|
5813
|
-
}
|
|
5814
|
-
}
|
|
5815
|
-
}
|
|
5816
|
-
}
|
|
5817
|
-
}
|
|
5818
|
-
},
|
|
5819
|
-
"5XX": {
|
|
5820
|
-
"description": "Default Response",
|
|
5821
|
-
"content": {
|
|
5822
|
-
"application/json": {
|
|
5823
|
-
"schema": {
|
|
5824
|
-
"type": "object",
|
|
5825
|
-
"required": [
|
|
5826
|
-
"code",
|
|
5827
|
-
"detail",
|
|
5828
|
-
"requestId",
|
|
5829
|
-
"name",
|
|
5830
|
-
"statusCode"
|
|
5831
|
-
],
|
|
5832
|
-
"properties": {
|
|
5833
|
-
"code": {
|
|
5834
|
-
"description": "Code used to categorize the error",
|
|
5835
|
-
"type": "string"
|
|
5836
|
-
},
|
|
5837
|
-
"detail": {
|
|
5838
|
-
"description": "Description of the error",
|
|
5839
|
-
"type": "string"
|
|
5840
|
-
},
|
|
5841
|
-
"requestId": {
|
|
5842
|
-
"description": "Unique request id. This one will be used to troubleshoot the problems",
|
|
5843
|
-
"type": "string"
|
|
5844
|
-
},
|
|
5845
|
-
"name": {
|
|
5846
|
-
"description": "Name of the error type",
|
|
5847
|
-
"type": "string"
|
|
5848
|
-
},
|
|
5849
|
-
"validation": {
|
|
5850
|
-
"description": "List of the validation errors",
|
|
5851
|
-
"type": "array",
|
|
5852
|
-
"items": {
|
|
5853
|
-
"type": "object",
|
|
5854
|
-
"required": [
|
|
5855
|
-
"fieldName",
|
|
5856
|
-
"message"
|
|
5857
|
-
],
|
|
5858
|
-
"properties": {
|
|
5859
|
-
"fieldName": {
|
|
5860
|
-
"type": "string"
|
|
5861
|
-
},
|
|
5862
|
-
"message": {
|
|
5863
|
-
"type": "string"
|
|
5864
|
-
}
|
|
5865
|
-
}
|
|
5866
|
-
}
|
|
5867
|
-
},
|
|
5868
|
-
"validationContext": {
|
|
5869
|
-
"type": "string"
|
|
5870
|
-
},
|
|
5871
|
-
"statusCode": {
|
|
5872
|
-
"type": "number"
|
|
5873
|
-
}
|
|
5874
|
-
}
|
|
5875
|
-
}
|
|
5876
|
-
}
|
|
5877
|
-
}
|
|
5878
|
-
}
|
|
5879
|
-
}
|
|
5880
|
-
}
|
|
5881
|
-
},
|
|
5882
5722
|
"/api/v1/organisations/profiles/{profileId}": {
|
|
5883
5723
|
"patch": {
|
|
5884
5724
|
"operationId": "adminProfilesPatch",
|
|
@@ -307,22 +307,6 @@ export interface paths {
|
|
|
307
307
|
patch?: never;
|
|
308
308
|
trace?: never;
|
|
309
309
|
};
|
|
310
|
-
"/api/v1/lifecycle-tasks/{id}/action": {
|
|
311
|
-
parameters: {
|
|
312
|
-
query?: never;
|
|
313
|
-
header?: never;
|
|
314
|
-
path?: never;
|
|
315
|
-
cookie?: never;
|
|
316
|
-
};
|
|
317
|
-
get: operations["taskAction"];
|
|
318
|
-
put?: never;
|
|
319
|
-
post?: never;
|
|
320
|
-
delete?: never;
|
|
321
|
-
options?: never;
|
|
322
|
-
head?: never;
|
|
323
|
-
patch?: never;
|
|
324
|
-
trace?: never;
|
|
325
|
-
};
|
|
326
310
|
"/api/v1/organisations/profiles/{profileId}": {
|
|
327
311
|
parameters: {
|
|
328
312
|
query?: never;
|
|
@@ -2300,6 +2284,7 @@ export interface operations {
|
|
|
2300
2284
|
metadata: {
|
|
2301
2285
|
/** Format: date-time */
|
|
2302
2286
|
expiresAt?: string;
|
|
2287
|
+
uploadId?: string;
|
|
2303
2288
|
} | null;
|
|
2304
2289
|
}[];
|
|
2305
2290
|
};
|
|
@@ -2441,79 +2426,6 @@ export interface operations {
|
|
|
2441
2426
|
};
|
|
2442
2427
|
};
|
|
2443
2428
|
};
|
|
2444
|
-
taskAction: {
|
|
2445
|
-
parameters: {
|
|
2446
|
-
query: {
|
|
2447
|
-
profileId: string;
|
|
2448
|
-
q: "download";
|
|
2449
|
-
};
|
|
2450
|
-
header?: never;
|
|
2451
|
-
path: {
|
|
2452
|
-
id: string;
|
|
2453
|
-
};
|
|
2454
|
-
cookie?: never;
|
|
2455
|
-
};
|
|
2456
|
-
requestBody?: never;
|
|
2457
|
-
responses: {
|
|
2458
|
-
/** @description Default Response */
|
|
2459
|
-
302: {
|
|
2460
|
-
headers: {
|
|
2461
|
-
[name: string]: unknown;
|
|
2462
|
-
};
|
|
2463
|
-
content?: never;
|
|
2464
|
-
};
|
|
2465
|
-
/** @description Default Response */
|
|
2466
|
-
"4XX": {
|
|
2467
|
-
headers: {
|
|
2468
|
-
[name: string]: unknown;
|
|
2469
|
-
};
|
|
2470
|
-
content: {
|
|
2471
|
-
"application/json": {
|
|
2472
|
-
/** @description Code used to categorize the error */
|
|
2473
|
-
code: string;
|
|
2474
|
-
/** @description Description of the error */
|
|
2475
|
-
detail: string;
|
|
2476
|
-
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
2477
|
-
requestId: string;
|
|
2478
|
-
/** @description Name of the error type */
|
|
2479
|
-
name: string;
|
|
2480
|
-
/** @description List of the validation errors */
|
|
2481
|
-
validation?: {
|
|
2482
|
-
fieldName: string;
|
|
2483
|
-
message: string;
|
|
2484
|
-
}[];
|
|
2485
|
-
validationContext?: string;
|
|
2486
|
-
statusCode: number;
|
|
2487
|
-
};
|
|
2488
|
-
};
|
|
2489
|
-
};
|
|
2490
|
-
/** @description Default Response */
|
|
2491
|
-
"5XX": {
|
|
2492
|
-
headers: {
|
|
2493
|
-
[name: string]: unknown;
|
|
2494
|
-
};
|
|
2495
|
-
content: {
|
|
2496
|
-
"application/json": {
|
|
2497
|
-
/** @description Code used to categorize the error */
|
|
2498
|
-
code: string;
|
|
2499
|
-
/** @description Description of the error */
|
|
2500
|
-
detail: string;
|
|
2501
|
-
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
2502
|
-
requestId: string;
|
|
2503
|
-
/** @description Name of the error type */
|
|
2504
|
-
name: string;
|
|
2505
|
-
/** @description List of the validation errors */
|
|
2506
|
-
validation?: {
|
|
2507
|
-
fieldName: string;
|
|
2508
|
-
message: string;
|
|
2509
|
-
}[];
|
|
2510
|
-
validationContext?: string;
|
|
2511
|
-
statusCode: number;
|
|
2512
|
-
};
|
|
2513
|
-
};
|
|
2514
|
-
};
|
|
2515
|
-
};
|
|
2516
|
-
};
|
|
2517
2429
|
adminProfilesPatch: {
|
|
2518
2430
|
parameters: {
|
|
2519
2431
|
query?: never;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type createClient from "openapi-fetch";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
type Logger,
|
|
4
|
+
type TokenFunction,
|
|
5
|
+
UPLOAD,
|
|
6
|
+
} from "../../../types/index.js";
|
|
3
7
|
import { BaseClient } from "../../base-client.js";
|
|
4
8
|
import {
|
|
5
9
|
formatError,
|
|
@@ -7,11 +11,27 @@ import {
|
|
|
7
11
|
throwIfEmpty,
|
|
8
12
|
} from "../../utils/client-utils.js";
|
|
9
13
|
import type { paths } from "./schema.js";
|
|
14
|
+
import { UploadSupport } from "./support.js";
|
|
10
15
|
|
|
11
16
|
export class Upload extends BaseClient<paths> {
|
|
12
17
|
protected declare client: ReturnType<typeof createClient<paths>>;
|
|
13
18
|
protected serviceName = UPLOAD;
|
|
14
19
|
|
|
20
|
+
public readonly support: UploadSupport;
|
|
21
|
+
|
|
22
|
+
constructor(params: {
|
|
23
|
+
baseUrl: string;
|
|
24
|
+
getTokenFn?: TokenFunction;
|
|
25
|
+
logger?: Logger;
|
|
26
|
+
}) {
|
|
27
|
+
super(params);
|
|
28
|
+
this.support = new UploadSupport(
|
|
29
|
+
this.client,
|
|
30
|
+
this.serviceName,
|
|
31
|
+
this.logger,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
15
35
|
getFilesMetadata({
|
|
16
36
|
organizationId,
|
|
17
37
|
userId,
|