@ogcio/building-blocks-sdk 0.2.50 → 0.2.52

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.
@@ -1,9 +1,12 @@
1
1
  import type createClient from "openapi-fetch";
2
+ import type { Logger } from "../../../types/index.js";
2
3
  import type { paths } from "./schema.js";
3
4
  export declare class ProfileOrganisation {
4
5
  private readonly client;
5
- constructor(client: ReturnType<typeof createClient<paths>>);
6
- getLatestConsentStatement(query: paths["/api/v1/organisations/consent-statements/latest"]["get"]["parameters"]["query"]): Promise<import("openapi-fetch").FetchResponse<{
6
+ private readonly serviceName;
7
+ private readonly logger;
8
+ constructor(client: ReturnType<typeof createClient<paths>>, serviceName: string, logger: Logger | undefined);
9
+ getCurrentConsentStatement(query: paths["/api/v1/organisations/consent-statements/current"]["get"]["parameters"]["query"]): Promise<import("../../utils/client-utils.js").DataResponseValue<{
7
10
  parameters: {
8
11
  query: {
9
12
  subject: string;
@@ -13,6 +16,609 @@ export declare class ProfileOrganisation {
13
16
  cookie?: never;
14
17
  };
15
18
  requestBody?: never;
19
+ responses: {
20
+ 200: {
21
+ headers: {
22
+ [name: string]: unknown;
23
+ };
24
+ content: {
25
+ "application/json": {
26
+ data: ({
27
+ id: string;
28
+ subject: string;
29
+ version: number;
30
+ createdAt: string;
31
+ publishDate: string;
32
+ isEnabled: boolean;
33
+ createdBy: string;
34
+ } & {
35
+ translations: {
36
+ en: {
37
+ id: string;
38
+ consentStatementId: string;
39
+ description: string | null;
40
+ disclaimer: string | null;
41
+ title: string;
42
+ language: "en" | "ga";
43
+ createdAt: string;
44
+ };
45
+ ga: {
46
+ id: string;
47
+ consentStatementId: string;
48
+ description: string | null;
49
+ disclaimer: string | null;
50
+ title: string;
51
+ language: "en" | "ga";
52
+ createdAt: string;
53
+ };
54
+ };
55
+ })[];
56
+ metadata?: {
57
+ links?: {
58
+ self: {
59
+ href?: string;
60
+ };
61
+ next?: {
62
+ href?: string;
63
+ };
64
+ prev?: {
65
+ href?: string;
66
+ };
67
+ first: {
68
+ href?: string;
69
+ };
70
+ last: {
71
+ href?: string;
72
+ };
73
+ pages: {
74
+ [key: string]: {
75
+ href?: string;
76
+ };
77
+ };
78
+ };
79
+ totalCount?: number;
80
+ };
81
+ };
82
+ };
83
+ };
84
+ "4XX": {
85
+ headers: {
86
+ [name: string]: unknown;
87
+ };
88
+ content: {
89
+ "application/json": {
90
+ code: string;
91
+ detail: string;
92
+ requestId: string;
93
+ name: string;
94
+ validation?: {
95
+ fieldName: string;
96
+ message: string;
97
+ }[];
98
+ validationContext?: string;
99
+ statusCode: number;
100
+ };
101
+ };
102
+ };
103
+ "5XX": {
104
+ headers: {
105
+ [name: string]: unknown;
106
+ };
107
+ content: {
108
+ "application/json": {
109
+ code: string;
110
+ detail: string;
111
+ requestId: string;
112
+ name: string;
113
+ validation?: {
114
+ fieldName: string;
115
+ message: string;
116
+ }[];
117
+ validationContext?: string;
118
+ statusCode: number;
119
+ };
120
+ };
121
+ };
122
+ };
123
+ }, {
124
+ params: {
125
+ query: {
126
+ subject: string;
127
+ };
128
+ };
129
+ }>>;
130
+ createConsentStatement(data: NonNullable<paths["/api/v1/organisations/consent-statements/"]["post"]["requestBody"]>["content"]["application/json"]): Promise<import("../../utils/client-utils.js").DataResponseValue<{
131
+ parameters: {
132
+ query?: never;
133
+ header?: never;
134
+ path?: never;
135
+ cookie?: never;
136
+ };
137
+ requestBody: {
138
+ content: {
139
+ "application/json": {
140
+ subject: string;
141
+ publishDate: string;
142
+ isEnabled: "true" | "false" | "0" | "1";
143
+ translations: {
144
+ en: {
145
+ description: string | null;
146
+ disclaimer: string | null;
147
+ title: string;
148
+ };
149
+ ga: {
150
+ description: string | null;
151
+ disclaimer: string | null;
152
+ title: string;
153
+ };
154
+ };
155
+ };
156
+ };
157
+ };
158
+ responses: {
159
+ 200: {
160
+ headers: {
161
+ [name: string]: unknown;
162
+ };
163
+ content: {
164
+ "application/json": {
165
+ data: {
166
+ id: string;
167
+ };
168
+ metadata?: {
169
+ links?: {
170
+ self: {
171
+ href?: string;
172
+ };
173
+ next?: {
174
+ href?: string;
175
+ };
176
+ prev?: {
177
+ href?: string;
178
+ };
179
+ first: {
180
+ href?: string;
181
+ };
182
+ last: {
183
+ href?: string;
184
+ };
185
+ pages: {
186
+ [key: string]: {
187
+ href?: string;
188
+ };
189
+ };
190
+ };
191
+ totalCount?: number;
192
+ };
193
+ };
194
+ };
195
+ };
196
+ "4XX": {
197
+ headers: {
198
+ [name: string]: unknown;
199
+ };
200
+ content: {
201
+ "application/json": {
202
+ code: string;
203
+ detail: string;
204
+ requestId: string;
205
+ name: string;
206
+ validation?: {
207
+ fieldName: string;
208
+ message: string;
209
+ }[];
210
+ validationContext?: string;
211
+ statusCode: number;
212
+ };
213
+ };
214
+ };
215
+ "5XX": {
216
+ headers: {
217
+ [name: string]: unknown;
218
+ };
219
+ content: {
220
+ "application/json": {
221
+ code: string;
222
+ detail: string;
223
+ requestId: string;
224
+ name: string;
225
+ validation?: {
226
+ fieldName: string;
227
+ message: string;
228
+ }[];
229
+ validationContext?: string;
230
+ statusCode: number;
231
+ };
232
+ };
233
+ };
234
+ };
235
+ }, {
236
+ body: {
237
+ subject: string;
238
+ publishDate: string;
239
+ isEnabled: "true" | "false" | "0" | "1";
240
+ translations: {
241
+ en: {
242
+ description: string | null;
243
+ disclaimer: string | null;
244
+ title: string;
245
+ };
246
+ ga: {
247
+ description: string | null;
248
+ disclaimer: string | null;
249
+ title: string;
250
+ };
251
+ };
252
+ };
253
+ }>>;
254
+ updateConsentStatement(id: string, data: NonNullable<paths["/api/v1/organisations/consent-statements/{id}"]["put"]["requestBody"]>["content"]["application/json"]): Promise<import("../../utils/client-utils.js").DataResponseValue<{
255
+ parameters: {
256
+ query?: never;
257
+ header?: never;
258
+ path: {
259
+ id: string;
260
+ };
261
+ cookie?: never;
262
+ };
263
+ requestBody: {
264
+ content: {
265
+ "application/json": {
266
+ subject: string;
267
+ publishDate: string;
268
+ isEnabled: "true" | "false" | "0" | "1";
269
+ translations: {
270
+ en: {
271
+ description: string | null;
272
+ disclaimer: string | null;
273
+ title: string;
274
+ };
275
+ ga: {
276
+ description: string | null;
277
+ disclaimer: string | null;
278
+ title: string;
279
+ };
280
+ };
281
+ };
282
+ };
283
+ };
284
+ responses: {
285
+ 200: {
286
+ headers: {
287
+ [name: string]: unknown;
288
+ };
289
+ content: {
290
+ "application/json": {
291
+ data: {
292
+ id: string;
293
+ };
294
+ metadata?: {
295
+ links?: {
296
+ self: {
297
+ href?: string;
298
+ };
299
+ next?: {
300
+ href?: string;
301
+ };
302
+ prev?: {
303
+ href?: string;
304
+ };
305
+ first: {
306
+ href?: string;
307
+ };
308
+ last: {
309
+ href?: string;
310
+ };
311
+ pages: {
312
+ [key: string]: {
313
+ href?: string;
314
+ };
315
+ };
316
+ };
317
+ totalCount?: number;
318
+ };
319
+ };
320
+ };
321
+ };
322
+ "4XX": {
323
+ headers: {
324
+ [name: string]: unknown;
325
+ };
326
+ content: {
327
+ "application/json": {
328
+ code: string;
329
+ detail: string;
330
+ requestId: string;
331
+ name: string;
332
+ validation?: {
333
+ fieldName: string;
334
+ message: string;
335
+ }[];
336
+ validationContext?: string;
337
+ statusCode: number;
338
+ };
339
+ };
340
+ };
341
+ "5XX": {
342
+ headers: {
343
+ [name: string]: unknown;
344
+ };
345
+ content: {
346
+ "application/json": {
347
+ code: string;
348
+ detail: string;
349
+ requestId: string;
350
+ name: string;
351
+ validation?: {
352
+ fieldName: string;
353
+ message: string;
354
+ }[];
355
+ validationContext?: string;
356
+ statusCode: number;
357
+ };
358
+ };
359
+ };
360
+ };
361
+ }, {
362
+ params: {
363
+ path: {
364
+ id: string;
365
+ };
366
+ };
367
+ body: {
368
+ subject: string;
369
+ publishDate: string;
370
+ isEnabled: "true" | "false" | "0" | "1";
371
+ translations: {
372
+ en: {
373
+ description: string | null;
374
+ disclaimer: string | null;
375
+ title: string;
376
+ };
377
+ ga: {
378
+ description: string | null;
379
+ disclaimer: string | null;
380
+ title: string;
381
+ };
382
+ };
383
+ };
384
+ }>>;
385
+ listConsentStatements(query: paths["/api/v1/organisations/consent-statements/"]["get"]["parameters"]["query"]): Promise<import("../../utils/client-utils.js").DataResponseValue<{
386
+ parameters: {
387
+ query?: {
388
+ subject?: string;
389
+ isEnabled?: "true" | "false" | "0" | "1";
390
+ offset?: string;
391
+ limit?: string;
392
+ };
393
+ header?: never;
394
+ path?: never;
395
+ cookie?: never;
396
+ };
397
+ requestBody?: never;
398
+ responses: {
399
+ 200: {
400
+ headers: {
401
+ [name: string]: unknown;
402
+ };
403
+ content: {
404
+ "application/json": {
405
+ data: {
406
+ id: string;
407
+ subject: string;
408
+ version: number;
409
+ createdAt: string;
410
+ publishDate: string;
411
+ isEnabled: boolean;
412
+ createdBy: string;
413
+ }[];
414
+ metadata?: {
415
+ links?: {
416
+ self: {
417
+ href?: string;
418
+ };
419
+ next?: {
420
+ href?: string;
421
+ };
422
+ prev?: {
423
+ href?: string;
424
+ };
425
+ first: {
426
+ href?: string;
427
+ };
428
+ last: {
429
+ href?: string;
430
+ };
431
+ pages: {
432
+ [key: string]: {
433
+ href?: string;
434
+ };
435
+ };
436
+ };
437
+ totalCount?: number;
438
+ };
439
+ };
440
+ };
441
+ };
442
+ "4XX": {
443
+ headers: {
444
+ [name: string]: unknown;
445
+ };
446
+ content: {
447
+ "application/json": {
448
+ code: string;
449
+ detail: string;
450
+ requestId: string;
451
+ name: string;
452
+ validation?: {
453
+ fieldName: string;
454
+ message: string;
455
+ }[];
456
+ validationContext?: string;
457
+ statusCode: number;
458
+ };
459
+ };
460
+ };
461
+ "5XX": {
462
+ headers: {
463
+ [name: string]: unknown;
464
+ };
465
+ content: {
466
+ "application/json": {
467
+ code: string;
468
+ detail: string;
469
+ requestId: string;
470
+ name: string;
471
+ validation?: {
472
+ fieldName: string;
473
+ message: string;
474
+ }[];
475
+ validationContext?: string;
476
+ statusCode: number;
477
+ };
478
+ };
479
+ };
480
+ };
481
+ }, {
482
+ params: {
483
+ query: {
484
+ subject?: string;
485
+ isEnabled?: "true" | "false" | "0" | "1";
486
+ offset?: string;
487
+ limit?: string;
488
+ } | undefined;
489
+ };
490
+ }>>;
491
+ getConsentStatement(id: string): Promise<import("../../utils/client-utils.js").DataResponseValue<{
492
+ parameters: {
493
+ query?: never;
494
+ header?: never;
495
+ path: {
496
+ id: string;
497
+ };
498
+ cookie?: never;
499
+ };
500
+ requestBody?: never;
501
+ responses: {
502
+ 200: {
503
+ headers: {
504
+ [name: string]: unknown;
505
+ };
506
+ content: {
507
+ "application/json": {
508
+ data: {
509
+ id: string;
510
+ subject: string;
511
+ version: number;
512
+ createdAt: string;
513
+ publishDate: string;
514
+ isEnabled: boolean;
515
+ createdBy: string;
516
+ } & {
517
+ translations: {
518
+ en: {
519
+ id: string;
520
+ consentStatementId: string;
521
+ description: string | null;
522
+ disclaimer: string | null;
523
+ title: string;
524
+ language: "en" | "ga";
525
+ createdAt: string;
526
+ };
527
+ ga: {
528
+ id: string;
529
+ consentStatementId: string;
530
+ description: string | null;
531
+ disclaimer: string | null;
532
+ title: string;
533
+ language: "en" | "ga";
534
+ createdAt: string;
535
+ };
536
+ };
537
+ };
538
+ metadata?: {
539
+ links?: {
540
+ self: {
541
+ href?: string;
542
+ };
543
+ next?: {
544
+ href?: string;
545
+ };
546
+ prev?: {
547
+ href?: string;
548
+ };
549
+ first: {
550
+ href?: string;
551
+ };
552
+ last: {
553
+ href?: string;
554
+ };
555
+ pages: {
556
+ [key: string]: {
557
+ href?: string;
558
+ };
559
+ };
560
+ };
561
+ totalCount?: number;
562
+ };
563
+ };
564
+ };
565
+ };
566
+ "4XX": {
567
+ headers: {
568
+ [name: string]: unknown;
569
+ };
570
+ content: {
571
+ "application/json": {
572
+ code: string;
573
+ detail: string;
574
+ requestId: string;
575
+ name: string;
576
+ validation?: {
577
+ fieldName: string;
578
+ message: string;
579
+ }[];
580
+ validationContext?: string;
581
+ statusCode: number;
582
+ };
583
+ };
584
+ };
585
+ "5XX": {
586
+ headers: {
587
+ [name: string]: unknown;
588
+ };
589
+ content: {
590
+ "application/json": {
591
+ code: string;
592
+ detail: string;
593
+ requestId: string;
594
+ name: string;
595
+ validation?: {
596
+ fieldName: string;
597
+ message: string;
598
+ }[];
599
+ validationContext?: string;
600
+ statusCode: number;
601
+ };
602
+ };
603
+ };
604
+ };
605
+ }, {
606
+ params: {
607
+ path: {
608
+ id: string;
609
+ };
610
+ };
611
+ }>>;
612
+ disableConsentStatement(id: string): Promise<import("../../utils/client-utils.js").DataResponseValue<{
613
+ parameters: {
614
+ query?: never;
615
+ header?: never;
616
+ path: {
617
+ id: string;
618
+ };
619
+ cookie?: never;
620
+ };
621
+ requestBody?: never;
16
622
  responses: {
17
623
  200: {
18
624
  headers: {
@@ -25,36 +631,27 @@ export declare class ProfileOrganisation {
25
631
  subject: string;
26
632
  version: number;
27
633
  createdAt: string;
634
+ publishDate: string;
635
+ isEnabled: boolean;
636
+ createdBy: string;
28
637
  } & {
29
638
  translations: {
30
639
  en: {
31
640
  id: string;
32
641
  consentStatementId: string;
33
- language: "en" | "ga";
34
- bodyTop: string[];
35
- bodyList: string[];
36
- bodyBottom: string[];
37
- bodySmall: string[];
38
- bodyLinks: {
39
- [key: string]: string;
40
- };
41
- bodyFooter: string | null;
642
+ description: string | null;
643
+ disclaimer: string | null;
42
644
  title: string;
645
+ language: "en" | "ga";
43
646
  createdAt: string;
44
647
  };
45
648
  ga: {
46
649
  id: string;
47
650
  consentStatementId: string;
48
- language: "en" | "ga";
49
- bodyTop: string[];
50
- bodyList: string[];
51
- bodyBottom: string[];
52
- bodySmall: string[];
53
- bodyLinks: {
54
- [key: string]: string;
55
- };
56
- bodyFooter: string | null;
651
+ description: string | null;
652
+ disclaimer: string | null;
57
653
  title: string;
654
+ language: "en" | "ga";
58
655
  createdAt: string;
59
656
  };
60
657
  };
@@ -87,6 +684,246 @@ export declare class ProfileOrganisation {
87
684
  };
88
685
  };
89
686
  };
687
+ 403: {
688
+ headers: {
689
+ [name: string]: unknown;
690
+ };
691
+ content: {
692
+ "application/json": {
693
+ code: string;
694
+ detail: string;
695
+ requestId: string;
696
+ name: string;
697
+ validation?: {
698
+ fieldName: string;
699
+ message: string;
700
+ }[];
701
+ validationContext?: string;
702
+ statusCode: number;
703
+ };
704
+ };
705
+ };
706
+ 404: {
707
+ headers: {
708
+ [name: string]: unknown;
709
+ };
710
+ content: {
711
+ "application/json": {
712
+ code: string;
713
+ detail: string;
714
+ requestId: string;
715
+ name: string;
716
+ validation?: {
717
+ fieldName: string;
718
+ message: string;
719
+ }[];
720
+ validationContext?: string;
721
+ statusCode: number;
722
+ };
723
+ };
724
+ };
725
+ "5XX": {
726
+ headers: {
727
+ [name: string]: unknown;
728
+ };
729
+ content: {
730
+ "application/json": {
731
+ code: string;
732
+ detail: string;
733
+ requestId: string;
734
+ name: string;
735
+ validation?: {
736
+ fieldName: string;
737
+ message: string;
738
+ }[];
739
+ validationContext?: string;
740
+ statusCode: number;
741
+ };
742
+ };
743
+ };
744
+ };
745
+ }, {
746
+ params: {
747
+ path: {
748
+ id: string;
749
+ };
750
+ };
751
+ }>>;
752
+ listConsents(query: paths["/api/v1/organisations/consents/"]["get"]["parameters"]["query"]): Promise<import("../../utils/client-utils.js").DataResponseValue<{
753
+ parameters: {
754
+ query: {
755
+ subject: string;
756
+ profileId: string;
757
+ offset?: string;
758
+ limit?: string;
759
+ };
760
+ header?: never;
761
+ path?: never;
762
+ cookie?: never;
763
+ };
764
+ requestBody?: never;
765
+ responses: {
766
+ 200: {
767
+ headers: {
768
+ [name: string]: unknown;
769
+ };
770
+ content: {
771
+ "application/json": {
772
+ data: {
773
+ id: string;
774
+ profileId: string;
775
+ status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
776
+ subject: string;
777
+ createdAt: string;
778
+ consentStatementId: string;
779
+ consentStatement: {
780
+ version: number;
781
+ };
782
+ cascadeReason?: string | null;
783
+ cascadeSourceProfileId?: string | null;
784
+ sourceProfileEmail?: string | null;
785
+ targetProfileEmail?: string | null;
786
+ }[];
787
+ metadata?: {
788
+ links?: {
789
+ self: {
790
+ href?: string;
791
+ };
792
+ next?: {
793
+ href?: string;
794
+ };
795
+ prev?: {
796
+ href?: string;
797
+ };
798
+ first: {
799
+ href?: string;
800
+ };
801
+ last: {
802
+ href?: string;
803
+ };
804
+ pages: {
805
+ [key: string]: {
806
+ href?: string;
807
+ };
808
+ };
809
+ };
810
+ totalCount?: number;
811
+ };
812
+ };
813
+ };
814
+ };
815
+ "4XX": {
816
+ headers: {
817
+ [name: string]: unknown;
818
+ };
819
+ content: {
820
+ "application/json": {
821
+ code: string;
822
+ detail: string;
823
+ requestId: string;
824
+ name: string;
825
+ validation?: {
826
+ fieldName: string;
827
+ message: string;
828
+ }[];
829
+ validationContext?: string;
830
+ statusCode: number;
831
+ };
832
+ };
833
+ };
834
+ "5XX": {
835
+ headers: {
836
+ [name: string]: unknown;
837
+ };
838
+ content: {
839
+ "application/json": {
840
+ code: string;
841
+ detail: string;
842
+ requestId: string;
843
+ name: string;
844
+ validation?: {
845
+ fieldName: string;
846
+ message: string;
847
+ }[];
848
+ validationContext?: string;
849
+ statusCode: number;
850
+ };
851
+ };
852
+ };
853
+ };
854
+ }, {
855
+ params: {
856
+ query: {
857
+ subject: string;
858
+ profileId: string;
859
+ offset?: string;
860
+ limit?: string;
861
+ };
862
+ };
863
+ }>>;
864
+ listLatestConsents(query: paths["/api/v1/organisations/consents/latest"]["get"]["parameters"]["query"]): Promise<import("../../utils/client-utils.js").DataResponseValue<{
865
+ parameters: {
866
+ query: {
867
+ subject: string;
868
+ profileId?: string;
869
+ offset?: string;
870
+ limit?: string;
871
+ };
872
+ header?: never;
873
+ path?: never;
874
+ cookie?: never;
875
+ };
876
+ requestBody?: never;
877
+ responses: {
878
+ 200: {
879
+ headers: {
880
+ [name: string]: unknown;
881
+ };
882
+ content: {
883
+ "application/json": {
884
+ data: {
885
+ id: string;
886
+ profileId: string;
887
+ status: "pending" | "undefined" | "pre-approved" | "opted-out" | "opted-in";
888
+ subject: string;
889
+ createdAt: string;
890
+ consentStatementId: string;
891
+ consentStatement: {
892
+ version: number;
893
+ };
894
+ cascadeReason?: string | null;
895
+ cascadeSourceProfileId?: string | null;
896
+ sourceProfileEmail?: string | null;
897
+ targetProfileEmail?: string | null;
898
+ }[];
899
+ metadata?: {
900
+ links?: {
901
+ self: {
902
+ href?: string;
903
+ };
904
+ next?: {
905
+ href?: string;
906
+ };
907
+ prev?: {
908
+ href?: string;
909
+ };
910
+ first: {
911
+ href?: string;
912
+ };
913
+ last: {
914
+ href?: string;
915
+ };
916
+ pages: {
917
+ [key: string]: {
918
+ href?: string;
919
+ };
920
+ };
921
+ };
922
+ totalCount?: number;
923
+ };
924
+ };
925
+ };
926
+ };
90
927
  "4XX": {
91
928
  headers: {
92
929
  [name: string]: unknown;
@@ -130,8 +967,11 @@ export declare class ProfileOrganisation {
130
967
  params: {
131
968
  query: {
132
969
  subject: string;
970
+ profileId?: string;
971
+ offset?: string;
972
+ limit?: string;
133
973
  };
134
974
  };
135
- }, `${string}/${string}`>>;
975
+ }>>;
136
976
  }
137
977
  //# sourceMappingURL=organisation.d.ts.map