@wakata-dev/api-client 0.3.1 → 0.3.3

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/dist/index.js CHANGED
@@ -439,6 +439,594 @@ var publicConfigControllerCreateConfigItem = (options) => {
439
439
  }
440
440
  });
441
441
  };
442
+ var assetClassPropertyControllerRemove = (options) => {
443
+ return (options.client ?? client).delete({
444
+ security: [
445
+ {
446
+ scheme: "bearer",
447
+ type: "http"
448
+ }
449
+ ],
450
+ url: "/asset-class-property/{id}",
451
+ ...options
452
+ });
453
+ };
454
+ var assetClassPropertyControllerUpdate = (options) => {
455
+ return (options.client ?? client).patch({
456
+ security: [
457
+ {
458
+ scheme: "bearer",
459
+ type: "http"
460
+ }
461
+ ],
462
+ url: "/asset-class-property/{id}",
463
+ ...options,
464
+ headers: {
465
+ "Content-Type": "application/json",
466
+ ...options?.headers
467
+ }
468
+ });
469
+ };
470
+ var documentUploadControllerUploadUrl = (options) => {
471
+ return (options.client ?? client).post({
472
+ security: [
473
+ {
474
+ scheme: "bearer",
475
+ type: "http"
476
+ }
477
+ ],
478
+ url: "/document/upload-url",
479
+ ...options,
480
+ headers: {
481
+ "Content-Type": "application/json",
482
+ ...options?.headers
483
+ }
484
+ });
485
+ };
486
+ var assetDocumentControllerList = (options) => {
487
+ return (options?.client ?? client).get({
488
+ security: [
489
+ {
490
+ scheme: "bearer",
491
+ type: "http"
492
+ }
493
+ ],
494
+ url: "/asset-document/list",
495
+ ...options
496
+ });
497
+ };
498
+ var assetDocumentControllerRemove = (options) => {
499
+ return (options.client ?? client).delete({
500
+ security: [
501
+ {
502
+ scheme: "bearer",
503
+ type: "http"
504
+ }
505
+ ],
506
+ url: "/asset-document/{id}",
507
+ ...options
508
+ });
509
+ };
510
+ var assetDocumentControllerGet = (options) => {
511
+ return (options.client ?? client).get({
512
+ security: [
513
+ {
514
+ scheme: "bearer",
515
+ type: "http"
516
+ }
517
+ ],
518
+ url: "/asset-document/{id}",
519
+ ...options
520
+ });
521
+ };
522
+ var assetDocumentControllerUpdate = (options) => {
523
+ return (options.client ?? client).patch({
524
+ security: [
525
+ {
526
+ scheme: "bearer",
527
+ type: "http"
528
+ }
529
+ ],
530
+ url: "/asset-document/{id}",
531
+ ...options,
532
+ headers: {
533
+ "Content-Type": "application/json",
534
+ ...options?.headers
535
+ }
536
+ });
537
+ };
538
+ var assetDocumentControllerCreate = (options) => {
539
+ return (options.client ?? client).post({
540
+ security: [
541
+ {
542
+ scheme: "bearer",
543
+ type: "http"
544
+ }
545
+ ],
546
+ url: "/asset-document",
547
+ ...options,
548
+ headers: {
549
+ "Content-Type": "application/json",
550
+ ...options?.headers
551
+ }
552
+ });
553
+ };
554
+ var assetClassDocumentControllerList = (options) => {
555
+ return (options?.client ?? client).get({
556
+ security: [
557
+ {
558
+ scheme: "bearer",
559
+ type: "http"
560
+ }
561
+ ],
562
+ url: "/asset-class-document/list",
563
+ ...options
564
+ });
565
+ };
566
+ var assetClassDocumentControllerRemove = (options) => {
567
+ return (options.client ?? client).delete({
568
+ security: [
569
+ {
570
+ scheme: "bearer",
571
+ type: "http"
572
+ }
573
+ ],
574
+ url: "/asset-class-document/{id}",
575
+ ...options
576
+ });
577
+ };
578
+ var assetClassDocumentControllerGet = (options) => {
579
+ return (options.client ?? client).get({
580
+ security: [
581
+ {
582
+ scheme: "bearer",
583
+ type: "http"
584
+ }
585
+ ],
586
+ url: "/asset-class-document/{id}",
587
+ ...options
588
+ });
589
+ };
590
+ var assetClassDocumentControllerUpdate = (options) => {
591
+ return (options.client ?? client).patch({
592
+ security: [
593
+ {
594
+ scheme: "bearer",
595
+ type: "http"
596
+ }
597
+ ],
598
+ url: "/asset-class-document/{id}",
599
+ ...options,
600
+ headers: {
601
+ "Content-Type": "application/json",
602
+ ...options?.headers
603
+ }
604
+ });
605
+ };
606
+ var assetClassDocumentControllerCreate = (options) => {
607
+ return (options.client ?? client).post({
608
+ security: [
609
+ {
610
+ scheme: "bearer",
611
+ type: "http"
612
+ }
613
+ ],
614
+ url: "/asset-class-document",
615
+ ...options,
616
+ headers: {
617
+ "Content-Type": "application/json",
618
+ ...options?.headers
619
+ }
620
+ });
621
+ };
622
+ var userDocumentControllerList = (options) => {
623
+ return (options?.client ?? client).get({
624
+ security: [
625
+ {
626
+ scheme: "bearer",
627
+ type: "http"
628
+ }
629
+ ],
630
+ url: "/user-document/list",
631
+ ...options
632
+ });
633
+ };
634
+ var userDocumentControllerRemove = (options) => {
635
+ return (options.client ?? client).delete({
636
+ security: [
637
+ {
638
+ scheme: "bearer",
639
+ type: "http"
640
+ }
641
+ ],
642
+ url: "/user-document/{id}",
643
+ ...options
644
+ });
645
+ };
646
+ var userDocumentControllerGet = (options) => {
647
+ return (options.client ?? client).get({
648
+ security: [
649
+ {
650
+ scheme: "bearer",
651
+ type: "http"
652
+ }
653
+ ],
654
+ url: "/user-document/{id}",
655
+ ...options
656
+ });
657
+ };
658
+ var userDocumentControllerUpdate = (options) => {
659
+ return (options.client ?? client).patch({
660
+ security: [
661
+ {
662
+ scheme: "bearer",
663
+ type: "http"
664
+ }
665
+ ],
666
+ url: "/user-document/{id}",
667
+ ...options,
668
+ headers: {
669
+ "Content-Type": "application/json",
670
+ ...options?.headers
671
+ }
672
+ });
673
+ };
674
+ var userDocumentControllerCreate = (options) => {
675
+ return (options.client ?? client).post({
676
+ security: [
677
+ {
678
+ scheme: "bearer",
679
+ type: "http"
680
+ }
681
+ ],
682
+ url: "/user-document",
683
+ ...options,
684
+ headers: {
685
+ "Content-Type": "application/json",
686
+ ...options?.headers
687
+ }
688
+ });
689
+ };
690
+ var siteDocumentControllerList = (options) => {
691
+ return (options?.client ?? client).get({
692
+ security: [
693
+ {
694
+ scheme: "bearer",
695
+ type: "http"
696
+ }
697
+ ],
698
+ url: "/site-document/list",
699
+ ...options
700
+ });
701
+ };
702
+ var siteDocumentControllerRemove = (options) => {
703
+ return (options.client ?? client).delete({
704
+ security: [
705
+ {
706
+ scheme: "bearer",
707
+ type: "http"
708
+ }
709
+ ],
710
+ url: "/site-document/{id}",
711
+ ...options
712
+ });
713
+ };
714
+ var siteDocumentControllerGet = (options) => {
715
+ return (options.client ?? client).get({
716
+ security: [
717
+ {
718
+ scheme: "bearer",
719
+ type: "http"
720
+ }
721
+ ],
722
+ url: "/site-document/{id}",
723
+ ...options
724
+ });
725
+ };
726
+ var siteDocumentControllerUpdate = (options) => {
727
+ return (options.client ?? client).patch({
728
+ security: [
729
+ {
730
+ scheme: "bearer",
731
+ type: "http"
732
+ }
733
+ ],
734
+ url: "/site-document/{id}",
735
+ ...options,
736
+ headers: {
737
+ "Content-Type": "application/json",
738
+ ...options?.headers
739
+ }
740
+ });
741
+ };
742
+ var siteDocumentControllerCreate = (options) => {
743
+ return (options.client ?? client).post({
744
+ security: [
745
+ {
746
+ scheme: "bearer",
747
+ type: "http"
748
+ }
749
+ ],
750
+ url: "/site-document",
751
+ ...options,
752
+ headers: {
753
+ "Content-Type": "application/json",
754
+ ...options?.headers
755
+ }
756
+ });
757
+ };
758
+ var customerDocumentControllerList = (options) => {
759
+ return (options?.client ?? client).get({
760
+ security: [
761
+ {
762
+ scheme: "bearer",
763
+ type: "http"
764
+ }
765
+ ],
766
+ url: "/customer-document/list",
767
+ ...options
768
+ });
769
+ };
770
+ var customerDocumentControllerRemove = (options) => {
771
+ return (options.client ?? client).delete({
772
+ security: [
773
+ {
774
+ scheme: "bearer",
775
+ type: "http"
776
+ }
777
+ ],
778
+ url: "/customer-document/{id}",
779
+ ...options
780
+ });
781
+ };
782
+ var customerDocumentControllerGet = (options) => {
783
+ return (options.client ?? client).get({
784
+ security: [
785
+ {
786
+ scheme: "bearer",
787
+ type: "http"
788
+ }
789
+ ],
790
+ url: "/customer-document/{id}",
791
+ ...options
792
+ });
793
+ };
794
+ var customerDocumentControllerUpdate = (options) => {
795
+ return (options.client ?? client).patch({
796
+ security: [
797
+ {
798
+ scheme: "bearer",
799
+ type: "http"
800
+ }
801
+ ],
802
+ url: "/customer-document/{id}",
803
+ ...options,
804
+ headers: {
805
+ "Content-Type": "application/json",
806
+ ...options?.headers
807
+ }
808
+ });
809
+ };
810
+ var customerDocumentControllerCreate = (options) => {
811
+ return (options.client ?? client).post({
812
+ security: [
813
+ {
814
+ scheme: "bearer",
815
+ type: "http"
816
+ }
817
+ ],
818
+ url: "/customer-document",
819
+ ...options,
820
+ headers: {
821
+ "Content-Type": "application/json",
822
+ ...options?.headers
823
+ }
824
+ });
825
+ };
826
+ var projectDocumentControllerList = (options) => {
827
+ return (options?.client ?? client).get({
828
+ security: [
829
+ {
830
+ scheme: "bearer",
831
+ type: "http"
832
+ }
833
+ ],
834
+ url: "/project-document/list",
835
+ ...options
836
+ });
837
+ };
838
+ var projectDocumentControllerRemove = (options) => {
839
+ return (options.client ?? client).delete({
840
+ security: [
841
+ {
842
+ scheme: "bearer",
843
+ type: "http"
844
+ }
845
+ ],
846
+ url: "/project-document/{id}",
847
+ ...options
848
+ });
849
+ };
850
+ var projectDocumentControllerGet = (options) => {
851
+ return (options.client ?? client).get({
852
+ security: [
853
+ {
854
+ scheme: "bearer",
855
+ type: "http"
856
+ }
857
+ ],
858
+ url: "/project-document/{id}",
859
+ ...options
860
+ });
861
+ };
862
+ var projectDocumentControllerUpdate = (options) => {
863
+ return (options.client ?? client).patch({
864
+ security: [
865
+ {
866
+ scheme: "bearer",
867
+ type: "http"
868
+ }
869
+ ],
870
+ url: "/project-document/{id}",
871
+ ...options,
872
+ headers: {
873
+ "Content-Type": "application/json",
874
+ ...options?.headers
875
+ }
876
+ });
877
+ };
878
+ var projectDocumentControllerCreate = (options) => {
879
+ return (options.client ?? client).post({
880
+ security: [
881
+ {
882
+ scheme: "bearer",
883
+ type: "http"
884
+ }
885
+ ],
886
+ url: "/project-document",
887
+ ...options,
888
+ headers: {
889
+ "Content-Type": "application/json",
890
+ ...options?.headers
891
+ }
892
+ });
893
+ };
894
+ var jobDocumentControllerList = (options) => {
895
+ return (options?.client ?? client).get({
896
+ security: [
897
+ {
898
+ scheme: "bearer",
899
+ type: "http"
900
+ }
901
+ ],
902
+ url: "/job-document/list",
903
+ ...options
904
+ });
905
+ };
906
+ var jobDocumentControllerRemove = (options) => {
907
+ return (options.client ?? client).delete({
908
+ security: [
909
+ {
910
+ scheme: "bearer",
911
+ type: "http"
912
+ }
913
+ ],
914
+ url: "/job-document/{id}",
915
+ ...options
916
+ });
917
+ };
918
+ var jobDocumentControllerGet = (options) => {
919
+ return (options.client ?? client).get({
920
+ security: [
921
+ {
922
+ scheme: "bearer",
923
+ type: "http"
924
+ }
925
+ ],
926
+ url: "/job-document/{id}",
927
+ ...options
928
+ });
929
+ };
930
+ var jobDocumentControllerUpdate = (options) => {
931
+ return (options.client ?? client).patch({
932
+ security: [
933
+ {
934
+ scheme: "bearer",
935
+ type: "http"
936
+ }
937
+ ],
938
+ url: "/job-document/{id}",
939
+ ...options,
940
+ headers: {
941
+ "Content-Type": "application/json",
942
+ ...options?.headers
943
+ }
944
+ });
945
+ };
946
+ var jobDocumentControllerCreate = (options) => {
947
+ return (options.client ?? client).post({
948
+ security: [
949
+ {
950
+ scheme: "bearer",
951
+ type: "http"
952
+ }
953
+ ],
954
+ url: "/job-document",
955
+ ...options,
956
+ headers: {
957
+ "Content-Type": "application/json",
958
+ ...options?.headers
959
+ }
960
+ });
961
+ };
962
+ var companyDocumentControllerList = (options) => {
963
+ return (options?.client ?? client).get({
964
+ security: [
965
+ {
966
+ scheme: "bearer",
967
+ type: "http"
968
+ }
969
+ ],
970
+ url: "/company-document/list",
971
+ ...options
972
+ });
973
+ };
974
+ var companyDocumentControllerRemove = (options) => {
975
+ return (options.client ?? client).delete({
976
+ security: [
977
+ {
978
+ scheme: "bearer",
979
+ type: "http"
980
+ }
981
+ ],
982
+ url: "/company-document/{id}",
983
+ ...options
984
+ });
985
+ };
986
+ var companyDocumentControllerGet = (options) => {
987
+ return (options.client ?? client).get({
988
+ security: [
989
+ {
990
+ scheme: "bearer",
991
+ type: "http"
992
+ }
993
+ ],
994
+ url: "/company-document/{id}",
995
+ ...options
996
+ });
997
+ };
998
+ var companyDocumentControllerUpdate = (options) => {
999
+ return (options.client ?? client).patch({
1000
+ security: [
1001
+ {
1002
+ scheme: "bearer",
1003
+ type: "http"
1004
+ }
1005
+ ],
1006
+ url: "/company-document/{id}",
1007
+ ...options,
1008
+ headers: {
1009
+ "Content-Type": "application/json",
1010
+ ...options?.headers
1011
+ }
1012
+ });
1013
+ };
1014
+ var companyDocumentControllerCreate = (options) => {
1015
+ return (options.client ?? client).post({
1016
+ security: [
1017
+ {
1018
+ scheme: "bearer",
1019
+ type: "http"
1020
+ }
1021
+ ],
1022
+ url: "/company-document",
1023
+ ...options,
1024
+ headers: {
1025
+ "Content-Type": "application/json",
1026
+ ...options?.headers
1027
+ }
1028
+ });
1029
+ };
442
1030
  var siteControllerListSites = (options) => {
443
1031
  return (options?.client ?? client).get({
444
1032
  security: [
@@ -498,7 +1086,7 @@ var siteControllerUpdateSite = (options) => {
498
1086
 
499
1087
  // src/client.ts
500
1088
  var DEFAULT_BASE_URL = "https://api.wakata.ai/api/v1";
501
- var PACKAGE_VERSION = "0.3.1";
1089
+ var PACKAGE_VERSION = "0.3.3";
502
1090
  function unwrap(result) {
503
1091
  if (result.data === void 0) {
504
1092
  throw new WakataApiError({
@@ -652,12 +1240,82 @@ var WakataClient = class {
652
1240
  await publicConfigControllerDeleteConfigItem({ ...opts, client: client2 })
653
1241
  )
654
1242
  };
1243
+ this.assetClassProperties = {
1244
+ update: async (opts) => unwrap(await assetClassPropertyControllerUpdate({ ...opts, client: client2 })),
1245
+ delete: async (opts) => unwrap(await assetClassPropertyControllerRemove({ ...opts, client: client2 }))
1246
+ };
1247
+ const docResource = (fns) => ({
1248
+ list: async (opts) => unwrap(await fns.list({ ...opts ?? {}, client: client2 })),
1249
+ get: async (opts) => unwrap(await fns.get({ ...opts, client: client2 })),
1250
+ create: async (opts) => unwrap(await fns.create({ ...opts, client: client2 })),
1251
+ update: async (opts) => unwrap(await fns.update({ ...opts, client: client2 })),
1252
+ delete: async (opts) => unwrap(await fns.remove({ ...opts, client: client2 }))
1253
+ });
1254
+ this.documents = {
1255
+ uploadUrl: async (opts) => unwrap(await documentUploadControllerUploadUrl({ ...opts, client: client2 })),
1256
+ asset: docResource({
1257
+ list: assetDocumentControllerList,
1258
+ get: assetDocumentControllerGet,
1259
+ create: assetDocumentControllerCreate,
1260
+ update: assetDocumentControllerUpdate,
1261
+ remove: assetDocumentControllerRemove
1262
+ }),
1263
+ assetClass: docResource({
1264
+ list: assetClassDocumentControllerList,
1265
+ get: assetClassDocumentControllerGet,
1266
+ create: assetClassDocumentControllerCreate,
1267
+ update: assetClassDocumentControllerUpdate,
1268
+ remove: assetClassDocumentControllerRemove
1269
+ }),
1270
+ user: docResource({
1271
+ list: userDocumentControllerList,
1272
+ get: userDocumentControllerGet,
1273
+ create: userDocumentControllerCreate,
1274
+ update: userDocumentControllerUpdate,
1275
+ remove: userDocumentControllerRemove
1276
+ }),
1277
+ site: docResource({
1278
+ list: siteDocumentControllerList,
1279
+ get: siteDocumentControllerGet,
1280
+ create: siteDocumentControllerCreate,
1281
+ update: siteDocumentControllerUpdate,
1282
+ remove: siteDocumentControllerRemove
1283
+ }),
1284
+ customer: docResource({
1285
+ list: customerDocumentControllerList,
1286
+ get: customerDocumentControllerGet,
1287
+ create: customerDocumentControllerCreate,
1288
+ update: customerDocumentControllerUpdate,
1289
+ remove: customerDocumentControllerRemove
1290
+ }),
1291
+ project: docResource({
1292
+ list: projectDocumentControllerList,
1293
+ get: projectDocumentControllerGet,
1294
+ create: projectDocumentControllerCreate,
1295
+ update: projectDocumentControllerUpdate,
1296
+ remove: projectDocumentControllerRemove
1297
+ }),
1298
+ job: docResource({
1299
+ list: jobDocumentControllerList,
1300
+ get: jobDocumentControllerGet,
1301
+ create: jobDocumentControllerCreate,
1302
+ update: jobDocumentControllerUpdate,
1303
+ remove: jobDocumentControllerRemove
1304
+ }),
1305
+ company: docResource({
1306
+ list: companyDocumentControllerList,
1307
+ get: companyDocumentControllerGet,
1308
+ create: companyDocumentControllerCreate,
1309
+ update: companyDocumentControllerUpdate,
1310
+ remove: companyDocumentControllerRemove
1311
+ })
1312
+ };
655
1313
  }
656
1314
  };
657
1315
 
658
1316
  // src/index.ts
659
1317
  var PACKAGE_NAME = "@wakata-dev/api-client";
660
- var PACKAGE_VERSION2 = "0.3.1";
1318
+ var PACKAGE_VERSION2 = "0.3.3";
661
1319
  var DEFAULT_BASE_URL2 = "https://api.wakata.ai/api/v1";
662
1320
 
663
1321
  export { DEFAULT_BASE_URL2 as DEFAULT_BASE_URL, PACKAGE_NAME, PACKAGE_VERSION2 as PACKAGE_VERSION, WakataApiError, WakataAuthError, WakataClient, WakataConflictError, WakataNotFoundError, WakataPermissionError, WakataRateLimitError, WakataServerError, WakataValidationError, generateIdempotencyKey, mapApiError };