@ogcio/building-blocks-sdk 0.2.87 → 0.2.88
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/.azure/pipeline.yaml +1 -1
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/biome.jsonc +1 -1
- package/dist/client/clients/profile/citizen.d.ts.map +1 -1
- package/dist/client/clients/profile/index.d.ts +2 -0
- package/dist/client/clients/profile/index.d.ts.map +1 -1
- package/dist/client/clients/profile/index.js +3 -0
- 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 +187 -0
- package/dist/client/clients/profile/schema.d.ts.map +1 -1
- package/dist/client/clients/profile/support.d.ts +146 -0
- package/dist/client/clients/profile/support.d.ts.map +1 -0
- package/dist/client/clients/profile/support.js +19 -0
- package/dist/client/clients/profile/support.js.map +1 -0
- package/dist/clients-configurations/read-configuration-file.js +1 -1
- package/dist/clients-configurations/read-configuration-file.js.map +1 -1
- package/package.json +11 -11
- package/renovate.json +51 -0
- package/src/client/clients/profile/index.ts +7 -0
- package/src/client/clients/profile/open-api-definition.json +486 -0
- package/src/client/clients/profile/schema.ts +187 -0
- package/src/client/clients/profile/support.ts +25 -0
- package/src/clients-configurations/read-configuration-file.ts +1 -1
|
@@ -470,6 +470,22 @@ export interface paths {
|
|
|
470
470
|
patch?: never;
|
|
471
471
|
trace?: never;
|
|
472
472
|
};
|
|
473
|
+
"/api/v1/support/profiles/search": {
|
|
474
|
+
parameters: {
|
|
475
|
+
query?: never;
|
|
476
|
+
header?: never;
|
|
477
|
+
path?: never;
|
|
478
|
+
cookie?: never;
|
|
479
|
+
};
|
|
480
|
+
get?: never;
|
|
481
|
+
put?: never;
|
|
482
|
+
post: operations["searchSupportProfiles"];
|
|
483
|
+
delete?: never;
|
|
484
|
+
options?: never;
|
|
485
|
+
head?: never;
|
|
486
|
+
patch?: never;
|
|
487
|
+
trace?: never;
|
|
488
|
+
};
|
|
473
489
|
"/user-login-wh": {
|
|
474
490
|
parameters: {
|
|
475
491
|
query?: never;
|
|
@@ -4485,6 +4501,177 @@ export interface operations {
|
|
|
4485
4501
|
};
|
|
4486
4502
|
};
|
|
4487
4503
|
};
|
|
4504
|
+
searchSupportProfiles: {
|
|
4505
|
+
parameters: {
|
|
4506
|
+
query?: never;
|
|
4507
|
+
header?: never;
|
|
4508
|
+
path?: never;
|
|
4509
|
+
cookie?: never;
|
|
4510
|
+
};
|
|
4511
|
+
requestBody: {
|
|
4512
|
+
content: {
|
|
4513
|
+
"application/json": {
|
|
4514
|
+
/** @default [] */
|
|
4515
|
+
name?: string[];
|
|
4516
|
+
/** @default [] */
|
|
4517
|
+
email?: string[];
|
|
4518
|
+
/** @default [] */
|
|
4519
|
+
ppsn?: string[];
|
|
4520
|
+
/** @default [] */
|
|
4521
|
+
dateOfBirth?: {
|
|
4522
|
+
/**
|
|
4523
|
+
* Format: date
|
|
4524
|
+
* @description If set, the endpoint searches for users whose date of birth is from this date (inclusive)
|
|
4525
|
+
*/
|
|
4526
|
+
from?: string;
|
|
4527
|
+
/**
|
|
4528
|
+
* Format: date
|
|
4529
|
+
* @description If set, the endpoint searches for users whose date of birth is to this date (inclusive)
|
|
4530
|
+
*/
|
|
4531
|
+
to?: string;
|
|
4532
|
+
}[];
|
|
4533
|
+
/** @default [] */
|
|
4534
|
+
id?: string[];
|
|
4535
|
+
/** @default and */
|
|
4536
|
+
logicalOperator?: "and" | "or";
|
|
4537
|
+
/**
|
|
4538
|
+
* @description Indicates where to start fetching data or how many records to skip, defining the initial position within the list
|
|
4539
|
+
* @default 0
|
|
4540
|
+
*/
|
|
4541
|
+
offset?: string;
|
|
4542
|
+
/**
|
|
4543
|
+
* @description Indicates the maximum number (100) of items that will be returned in a single request
|
|
4544
|
+
* @default 20
|
|
4545
|
+
*/
|
|
4546
|
+
limit?: string;
|
|
4547
|
+
};
|
|
4548
|
+
};
|
|
4549
|
+
};
|
|
4550
|
+
responses: {
|
|
4551
|
+
/** @description Default Response */
|
|
4552
|
+
200: {
|
|
4553
|
+
headers: {
|
|
4554
|
+
[name: string]: unknown;
|
|
4555
|
+
};
|
|
4556
|
+
content: {
|
|
4557
|
+
"application/json": {
|
|
4558
|
+
data: {
|
|
4559
|
+
id: string;
|
|
4560
|
+
publicName: string;
|
|
4561
|
+
email: string;
|
|
4562
|
+
organisationId: string | null;
|
|
4563
|
+
ppsn: string | null;
|
|
4564
|
+
dateOfBirth: string | null;
|
|
4565
|
+
primaryUserId: string;
|
|
4566
|
+
/** Format: date-time */
|
|
4567
|
+
createdAt: string;
|
|
4568
|
+
/** Format: date-time */
|
|
4569
|
+
updatedAt: string;
|
|
4570
|
+
deletedAt: string | null;
|
|
4571
|
+
/** @description The preferred language of the user, in ISO 639-1 format */
|
|
4572
|
+
preferredLanguage: string;
|
|
4573
|
+
/** @description The status of the user, either 'active' or 'disabled' or 'deleted' */
|
|
4574
|
+
status: string;
|
|
4575
|
+
/** @description The safe level of the user */
|
|
4576
|
+
safeLevel: number;
|
|
4577
|
+
consentStatuses: {
|
|
4578
|
+
[key: string]: {
|
|
4579
|
+
status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
|
|
4580
|
+
/** Format: uuid */
|
|
4581
|
+
consent_statement_id: string;
|
|
4582
|
+
};
|
|
4583
|
+
};
|
|
4584
|
+
firstName: string | null;
|
|
4585
|
+
lastName: string | null;
|
|
4586
|
+
}[];
|
|
4587
|
+
metadata?: {
|
|
4588
|
+
/** @description Object containing the links to the related endpoints */
|
|
4589
|
+
links?: {
|
|
4590
|
+
self: {
|
|
4591
|
+
/** @description URL pointing to the request itself */
|
|
4592
|
+
href?: string;
|
|
4593
|
+
};
|
|
4594
|
+
next?: {
|
|
4595
|
+
/** @description URL pointing to the next page of results in a paginated response. If there are no more results, this field may be omitted */
|
|
4596
|
+
href?: string;
|
|
4597
|
+
};
|
|
4598
|
+
prev?: {
|
|
4599
|
+
/** @description URL pointing to the previous page of results in a paginated response. If there are no more results, this field may be omitted */
|
|
4600
|
+
href?: string;
|
|
4601
|
+
};
|
|
4602
|
+
first: {
|
|
4603
|
+
/** @description URL pointing to the first page of results in a paginated response */
|
|
4604
|
+
href?: string;
|
|
4605
|
+
};
|
|
4606
|
+
last: {
|
|
4607
|
+
/** @description URL pointing to the first page of results in a paginated response */
|
|
4608
|
+
href?: string;
|
|
4609
|
+
};
|
|
4610
|
+
/** @description It may contain a list of other useful URLs, e.g. one entry for page:'page 1', 'page 2' */
|
|
4611
|
+
pages: {
|
|
4612
|
+
[key: string]: {
|
|
4613
|
+
href?: string;
|
|
4614
|
+
};
|
|
4615
|
+
};
|
|
4616
|
+
};
|
|
4617
|
+
/** @description Number representing the total number of available items */
|
|
4618
|
+
totalCount?: number;
|
|
4619
|
+
};
|
|
4620
|
+
};
|
|
4621
|
+
};
|
|
4622
|
+
};
|
|
4623
|
+
/** @description Default Response */
|
|
4624
|
+
"4XX": {
|
|
4625
|
+
headers: {
|
|
4626
|
+
[name: string]: unknown;
|
|
4627
|
+
};
|
|
4628
|
+
content: {
|
|
4629
|
+
"application/json": {
|
|
4630
|
+
/** @description Code used to categorize the error */
|
|
4631
|
+
code: string;
|
|
4632
|
+
/** @description Description of the error */
|
|
4633
|
+
detail: string;
|
|
4634
|
+
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
4635
|
+
requestId: string;
|
|
4636
|
+
/** @description Name of the error type */
|
|
4637
|
+
name: string;
|
|
4638
|
+
/** @description List of the validation errors */
|
|
4639
|
+
validation?: {
|
|
4640
|
+
fieldName: string;
|
|
4641
|
+
message: string;
|
|
4642
|
+
}[];
|
|
4643
|
+
validationContext?: string;
|
|
4644
|
+
statusCode: number;
|
|
4645
|
+
};
|
|
4646
|
+
};
|
|
4647
|
+
};
|
|
4648
|
+
/** @description Default Response */
|
|
4649
|
+
"5XX": {
|
|
4650
|
+
headers: {
|
|
4651
|
+
[name: string]: unknown;
|
|
4652
|
+
};
|
|
4653
|
+
content: {
|
|
4654
|
+
"application/json": {
|
|
4655
|
+
/** @description Code used to categorize the error */
|
|
4656
|
+
code: string;
|
|
4657
|
+
/** @description Description of the error */
|
|
4658
|
+
detail: string;
|
|
4659
|
+
/** @description Unique request id. This one will be used to troubleshoot the problems */
|
|
4660
|
+
requestId: string;
|
|
4661
|
+
/** @description Name of the error type */
|
|
4662
|
+
name: string;
|
|
4663
|
+
/** @description List of the validation errors */
|
|
4664
|
+
validation?: {
|
|
4665
|
+
fieldName: string;
|
|
4666
|
+
message: string;
|
|
4667
|
+
}[];
|
|
4668
|
+
validationContext?: string;
|
|
4669
|
+
statusCode: number;
|
|
4670
|
+
};
|
|
4671
|
+
};
|
|
4672
|
+
};
|
|
4673
|
+
};
|
|
4674
|
+
};
|
|
4488
4675
|
logtoUserCreated: {
|
|
4489
4676
|
parameters: {
|
|
4490
4677
|
query?: never;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 ProfileSupport {
|
|
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 postProfileSearch(
|
|
14
|
+
body: paths["/api/v1/support/profiles/search"]["post"]["requestBody"]["content"]["application/json"],
|
|
15
|
+
) {
|
|
16
|
+
return this.client
|
|
17
|
+
.POST("/api/v1/support/profiles/search", {
|
|
18
|
+
body,
|
|
19
|
+
})
|
|
20
|
+
.then(
|
|
21
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
22
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|