@ogcio/building-blocks-sdk 0.2.90 → 0.2.92

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,6 +1,19 @@
1
1
  import type createClient from "openapi-fetch";
2
2
  import type { Logger } from "../../../types/index.js";
3
3
  import type { paths } from "./schema.js";
4
+ type ListAnnouncementsQuery = paths["/api/v1/support/announcements/"]["get"]["parameters"]["query"];
5
+ type BooleanListAnnouncementsQuery = Omit<ListAnnouncementsQuery, "isEnabled"> & {
6
+ isEnabled: boolean;
7
+ };
8
+ type CreateAnnouncementBody = paths["/api/v1/support/announcements/"]["post"]["requestBody"]["content"]["application/json"];
9
+ type TypedCreateAnnouncementBody = Omit<CreateAnnouncementBody, "isEnabled" | "publishDate"> & {
10
+ isEnabled: boolean;
11
+ publishDate: Date;
12
+ };
13
+ type ToggleEnabledBody = paths["/api/v1/support/announcements/{id}/enabled"]["patch"]["requestBody"]["content"]["application/json"];
14
+ type TypedToggleEnabledBody = Omit<ToggleEnabledBody, "isEnabled"> & {
15
+ isEnabled: boolean;
16
+ };
4
17
  export declare class ProfileSupport {
5
18
  private readonly client;
6
19
  private readonly serviceName;
@@ -329,5 +342,670 @@ export declare class ProfileSupport {
329
342
  }[];
330
343
  };
331
344
  }>>;
345
+ readonly announcements: {
346
+ list: (queryParams: BooleanListAnnouncementsQuery) => Promise<import("../../utils/client-utils.js").DataResponseValue<{
347
+ parameters: {
348
+ query?: {
349
+ applicationId?: "profile" | "dashboard" | "messaging";
350
+ isEnabled?: "true" | "false" | "0" | "1";
351
+ offset?: string;
352
+ limit?: string;
353
+ };
354
+ header?: never;
355
+ path?: never;
356
+ cookie?: never;
357
+ };
358
+ requestBody?: never;
359
+ responses: {
360
+ 200: {
361
+ headers: {
362
+ [name: string]: unknown;
363
+ };
364
+ content: {
365
+ "application/json": {
366
+ data: {
367
+ id: string;
368
+ applicationId: string;
369
+ isEnabled: boolean;
370
+ publishDate: string;
371
+ createdAt: string;
372
+ createdBy: string | null;
373
+ }[];
374
+ metadata?: {
375
+ links?: {
376
+ self: {
377
+ href?: string;
378
+ };
379
+ next?: {
380
+ href?: string;
381
+ };
382
+ prev?: {
383
+ href?: string;
384
+ };
385
+ first: {
386
+ href?: string;
387
+ };
388
+ last: {
389
+ href?: string;
390
+ };
391
+ pages: {
392
+ [key: string]: {
393
+ href?: string;
394
+ };
395
+ };
396
+ };
397
+ totalCount?: number;
398
+ };
399
+ };
400
+ };
401
+ };
402
+ "4XX": {
403
+ headers: {
404
+ [name: string]: unknown;
405
+ };
406
+ content: {
407
+ "application/json": {
408
+ code: string;
409
+ detail: string;
410
+ requestId: string;
411
+ name: string;
412
+ validation?: {
413
+ fieldName: string;
414
+ message: string;
415
+ }[];
416
+ validationContext?: string;
417
+ statusCode: number;
418
+ };
419
+ };
420
+ };
421
+ "5XX": {
422
+ headers: {
423
+ [name: string]: unknown;
424
+ };
425
+ content: {
426
+ "application/json": {
427
+ code: string;
428
+ detail: string;
429
+ requestId: string;
430
+ name: string;
431
+ validation?: {
432
+ fieldName: string;
433
+ message: string;
434
+ }[];
435
+ validationContext?: string;
436
+ statusCode: number;
437
+ };
438
+ };
439
+ };
440
+ };
441
+ }, {
442
+ params: {
443
+ query: {
444
+ isEnabled: "true" | "false" | undefined;
445
+ };
446
+ };
447
+ }>>;
448
+ create: (body: TypedCreateAnnouncementBody) => Promise<import("../../utils/client-utils.js").DataResponseValue<{
449
+ parameters: {
450
+ query?: never;
451
+ header?: never;
452
+ path?: never;
453
+ cookie?: never;
454
+ };
455
+ requestBody: {
456
+ content: {
457
+ "application/json": {
458
+ applicationId: "profile" | "dashboard" | "messaging";
459
+ isEnabled: "true" | "false" | "0" | "1";
460
+ publishDate: string;
461
+ translations: {
462
+ en: {
463
+ title: string;
464
+ description: string;
465
+ };
466
+ ga: {
467
+ title: string;
468
+ description: string;
469
+ };
470
+ };
471
+ };
472
+ };
473
+ };
474
+ responses: {
475
+ 200: {
476
+ headers: {
477
+ [name: string]: unknown;
478
+ };
479
+ content: {
480
+ "application/json": {
481
+ data: {
482
+ id: string;
483
+ };
484
+ metadata?: {
485
+ links?: {
486
+ self: {
487
+ href?: string;
488
+ };
489
+ next?: {
490
+ href?: string;
491
+ };
492
+ prev?: {
493
+ href?: string;
494
+ };
495
+ first: {
496
+ href?: string;
497
+ };
498
+ last: {
499
+ href?: string;
500
+ };
501
+ pages: {
502
+ [key: string]: {
503
+ href?: string;
504
+ };
505
+ };
506
+ };
507
+ totalCount?: number;
508
+ };
509
+ };
510
+ };
511
+ };
512
+ "4XX": {
513
+ headers: {
514
+ [name: string]: unknown;
515
+ };
516
+ content: {
517
+ "application/json": {
518
+ code: string;
519
+ detail: string;
520
+ requestId: string;
521
+ name: string;
522
+ validation?: {
523
+ fieldName: string;
524
+ message: string;
525
+ }[];
526
+ validationContext?: string;
527
+ statusCode: number;
528
+ };
529
+ };
530
+ };
531
+ "5XX": {
532
+ headers: {
533
+ [name: string]: unknown;
534
+ };
535
+ content: {
536
+ "application/json": {
537
+ code: string;
538
+ detail: string;
539
+ requestId: string;
540
+ name: string;
541
+ validation?: {
542
+ fieldName: string;
543
+ message: string;
544
+ }[];
545
+ validationContext?: string;
546
+ statusCode: number;
547
+ };
548
+ };
549
+ };
550
+ };
551
+ }, import("openapi-fetch").FetchOptions<{
552
+ parameters: {
553
+ query?: never;
554
+ header?: never;
555
+ path?: never;
556
+ cookie?: never;
557
+ };
558
+ requestBody: {
559
+ content: {
560
+ "application/json": {
561
+ applicationId: "profile" | "dashboard" | "messaging";
562
+ isEnabled: "true" | "false" | "0" | "1";
563
+ publishDate: string;
564
+ translations: {
565
+ en: {
566
+ title: string;
567
+ description: string;
568
+ };
569
+ ga: {
570
+ title: string;
571
+ description: string;
572
+ };
573
+ };
574
+ };
575
+ };
576
+ };
577
+ responses: {
578
+ 200: {
579
+ headers: {
580
+ [name: string]: unknown;
581
+ };
582
+ content: {
583
+ "application/json": {
584
+ data: {
585
+ id: string;
586
+ };
587
+ metadata?: {
588
+ links?: {
589
+ self: {
590
+ href?: string;
591
+ };
592
+ next?: {
593
+ href?: string;
594
+ };
595
+ prev?: {
596
+ href?: string;
597
+ };
598
+ first: {
599
+ href?: string;
600
+ };
601
+ last: {
602
+ href?: string;
603
+ };
604
+ pages: {
605
+ [key: string]: {
606
+ href?: string;
607
+ };
608
+ };
609
+ };
610
+ totalCount?: number;
611
+ };
612
+ };
613
+ };
614
+ };
615
+ "4XX": {
616
+ headers: {
617
+ [name: string]: unknown;
618
+ };
619
+ content: {
620
+ "application/json": {
621
+ code: string;
622
+ detail: string;
623
+ requestId: string;
624
+ name: string;
625
+ validation?: {
626
+ fieldName: string;
627
+ message: string;
628
+ }[];
629
+ validationContext?: string;
630
+ statusCode: number;
631
+ };
632
+ };
633
+ };
634
+ "5XX": {
635
+ headers: {
636
+ [name: string]: unknown;
637
+ };
638
+ content: {
639
+ "application/json": {
640
+ code: string;
641
+ detail: string;
642
+ requestId: string;
643
+ name: string;
644
+ validation?: {
645
+ fieldName: string;
646
+ message: string;
647
+ }[];
648
+ validationContext?: string;
649
+ statusCode: number;
650
+ };
651
+ };
652
+ };
653
+ };
654
+ }>>>;
655
+ toggleEnabled: (id: string, body: TypedToggleEnabledBody) => Promise<import("../../utils/client-utils.js").DataResponseValue<{
656
+ parameters: {
657
+ query?: never;
658
+ header?: never;
659
+ path: {
660
+ id: string;
661
+ };
662
+ cookie?: never;
663
+ };
664
+ requestBody: {
665
+ content: {
666
+ "application/json": {
667
+ isEnabled: "true" | "false" | "0" | "1";
668
+ };
669
+ };
670
+ };
671
+ responses: {
672
+ 200: {
673
+ headers: {
674
+ [name: string]: unknown;
675
+ };
676
+ content: {
677
+ "application/json": {
678
+ data: {
679
+ id: string;
680
+ applicationId: string;
681
+ isEnabled: boolean;
682
+ publishDate: string;
683
+ createdAt: string;
684
+ createdBy: string | null;
685
+ } & {
686
+ translations: {
687
+ en: {
688
+ id: string;
689
+ announcementId: string;
690
+ language: "en" | "ga";
691
+ title: string;
692
+ description: string;
693
+ createdAt: string;
694
+ };
695
+ ga: {
696
+ id: string;
697
+ announcementId: string;
698
+ language: "en" | "ga";
699
+ title: string;
700
+ description: string;
701
+ createdAt: string;
702
+ };
703
+ };
704
+ };
705
+ metadata?: {
706
+ links?: {
707
+ self: {
708
+ href?: string;
709
+ };
710
+ next?: {
711
+ href?: string;
712
+ };
713
+ prev?: {
714
+ href?: string;
715
+ };
716
+ first: {
717
+ href?: string;
718
+ };
719
+ last: {
720
+ href?: string;
721
+ };
722
+ pages: {
723
+ [key: string]: {
724
+ href?: string;
725
+ };
726
+ };
727
+ };
728
+ totalCount?: number;
729
+ };
730
+ };
731
+ };
732
+ };
733
+ "4XX": {
734
+ headers: {
735
+ [name: string]: unknown;
736
+ };
737
+ content: {
738
+ "application/json": {
739
+ code: string;
740
+ detail: string;
741
+ requestId: string;
742
+ name: string;
743
+ validation?: {
744
+ fieldName: string;
745
+ message: string;
746
+ }[];
747
+ validationContext?: string;
748
+ statusCode: number;
749
+ };
750
+ };
751
+ };
752
+ "5XX": {
753
+ headers: {
754
+ [name: string]: unknown;
755
+ };
756
+ content: {
757
+ "application/json": {
758
+ code: string;
759
+ detail: string;
760
+ requestId: string;
761
+ name: string;
762
+ validation?: {
763
+ fieldName: string;
764
+ message: string;
765
+ }[];
766
+ validationContext?: string;
767
+ statusCode: number;
768
+ };
769
+ };
770
+ };
771
+ };
772
+ }, import("openapi-fetch").FetchOptions<{
773
+ parameters: {
774
+ query?: never;
775
+ header?: never;
776
+ path: {
777
+ id: string;
778
+ };
779
+ cookie?: never;
780
+ };
781
+ requestBody: {
782
+ content: {
783
+ "application/json": {
784
+ isEnabled: "true" | "false" | "0" | "1";
785
+ };
786
+ };
787
+ };
788
+ responses: {
789
+ 200: {
790
+ headers: {
791
+ [name: string]: unknown;
792
+ };
793
+ content: {
794
+ "application/json": {
795
+ data: {
796
+ id: string;
797
+ applicationId: string;
798
+ isEnabled: boolean;
799
+ publishDate: string;
800
+ createdAt: string;
801
+ createdBy: string | null;
802
+ } & {
803
+ translations: {
804
+ en: {
805
+ id: string;
806
+ announcementId: string;
807
+ language: "en" | "ga";
808
+ title: string;
809
+ description: string;
810
+ createdAt: string;
811
+ };
812
+ ga: {
813
+ id: string;
814
+ announcementId: string;
815
+ language: "en" | "ga";
816
+ title: string;
817
+ description: string;
818
+ createdAt: string;
819
+ };
820
+ };
821
+ };
822
+ metadata?: {
823
+ links?: {
824
+ self: {
825
+ href?: string;
826
+ };
827
+ next?: {
828
+ href?: string;
829
+ };
830
+ prev?: {
831
+ href?: string;
832
+ };
833
+ first: {
834
+ href?: string;
835
+ };
836
+ last: {
837
+ href?: string;
838
+ };
839
+ pages: {
840
+ [key: string]: {
841
+ href?: string;
842
+ };
843
+ };
844
+ };
845
+ totalCount?: number;
846
+ };
847
+ };
848
+ };
849
+ };
850
+ "4XX": {
851
+ headers: {
852
+ [name: string]: unknown;
853
+ };
854
+ content: {
855
+ "application/json": {
856
+ code: string;
857
+ detail: string;
858
+ requestId: string;
859
+ name: string;
860
+ validation?: {
861
+ fieldName: string;
862
+ message: string;
863
+ }[];
864
+ validationContext?: string;
865
+ statusCode: number;
866
+ };
867
+ };
868
+ };
869
+ "5XX": {
870
+ headers: {
871
+ [name: string]: unknown;
872
+ };
873
+ content: {
874
+ "application/json": {
875
+ code: string;
876
+ detail: string;
877
+ requestId: string;
878
+ name: string;
879
+ validation?: {
880
+ fieldName: string;
881
+ message: string;
882
+ }[];
883
+ validationContext?: string;
884
+ statusCode: number;
885
+ };
886
+ };
887
+ };
888
+ };
889
+ }>>>;
890
+ get: (id: string) => Promise<import("../../utils/client-utils.js").DataResponseValue<{
891
+ parameters: {
892
+ query?: never;
893
+ header?: never;
894
+ path: {
895
+ id: string;
896
+ };
897
+ cookie?: never;
898
+ };
899
+ requestBody?: never;
900
+ responses: {
901
+ 200: {
902
+ headers: {
903
+ [name: string]: unknown;
904
+ };
905
+ content: {
906
+ "application/json": {
907
+ data: {
908
+ id: string;
909
+ applicationId: string;
910
+ isEnabled: boolean;
911
+ publishDate: string;
912
+ createdAt: string;
913
+ createdBy: string | null;
914
+ } & {
915
+ translations: {
916
+ en: {
917
+ id: string;
918
+ announcementId: string;
919
+ language: "en" | "ga";
920
+ title: string;
921
+ description: string;
922
+ createdAt: string;
923
+ };
924
+ ga: {
925
+ id: string;
926
+ announcementId: string;
927
+ language: "en" | "ga";
928
+ title: string;
929
+ description: string;
930
+ createdAt: string;
931
+ };
932
+ };
933
+ };
934
+ metadata?: {
935
+ links?: {
936
+ self: {
937
+ href?: string;
938
+ };
939
+ next?: {
940
+ href?: string;
941
+ };
942
+ prev?: {
943
+ href?: string;
944
+ };
945
+ first: {
946
+ href?: string;
947
+ };
948
+ last: {
949
+ href?: string;
950
+ };
951
+ pages: {
952
+ [key: string]: {
953
+ href?: string;
954
+ };
955
+ };
956
+ };
957
+ totalCount?: number;
958
+ };
959
+ };
960
+ };
961
+ };
962
+ "4XX": {
963
+ headers: {
964
+ [name: string]: unknown;
965
+ };
966
+ content: {
967
+ "application/json": {
968
+ code: string;
969
+ detail: string;
970
+ requestId: string;
971
+ name: string;
972
+ validation?: {
973
+ fieldName: string;
974
+ message: string;
975
+ }[];
976
+ validationContext?: string;
977
+ statusCode: number;
978
+ };
979
+ };
980
+ };
981
+ "5XX": {
982
+ headers: {
983
+ [name: string]: unknown;
984
+ };
985
+ content: {
986
+ "application/json": {
987
+ code: string;
988
+ detail: string;
989
+ requestId: string;
990
+ name: string;
991
+ validation?: {
992
+ fieldName: string;
993
+ message: string;
994
+ }[];
995
+ validationContext?: string;
996
+ statusCode: number;
997
+ };
998
+ };
999
+ };
1000
+ };
1001
+ }, {
1002
+ params: {
1003
+ path: {
1004
+ id: string;
1005
+ };
1006
+ };
1007
+ }>>;
1008
+ };
332
1009
  }
1010
+ export {};
333
1011
  //# sourceMappingURL=support.d.ts.map