@robotbas/robotcloud-client 0.3.0 → 0.3.2

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.mjs CHANGED
@@ -82,7 +82,7 @@ import axios3 from "axios";
82
82
  import axios2 from "axios";
83
83
  var LoginClientImpl = class {
84
84
  constructor(robotcloudApi2) {
85
- this.logger = useLogger("AlertsClientImpl");
85
+ this.logger = useLogger("LoginClientImpl");
86
86
  this.robotcloudApi = robotcloudApi2;
87
87
  }
88
88
  async login(username, password, apiKey) {
@@ -220,16 +220,14 @@ var OrganizationsClient = class {
220
220
  `organizations/${organizationId}`
221
221
  );
222
222
  };
223
- this.getOrganizationProjects = (organizationId) => {
224
- return this.robotcloudApi.get(
225
- `organizations/${organizationId}/projects`
226
- );
227
- };
228
- this.postOrganizationProjects = (organizationId) => {
229
- return this.robotcloudApi.post(
230
- `organizations/${organizationId}/projects`
231
- );
232
- };
223
+ this.robotcloudApi = robotcloudApi2;
224
+ }
225
+ };
226
+
227
+ // src/client/users.ts
228
+ var UsersClient = class {
229
+ constructor(robotcloudApi2) {
230
+ this.logger = useLogger("UsersClient");
233
231
  this.getOrganizationUsers = (organizationId) => {
234
232
  return this.robotcloudApi.get(
235
233
  `organizations/${organizationId}/users`
@@ -240,14 +238,6 @@ var OrganizationsClient = class {
240
238
  `organizations/${organizationId}/users`
241
239
  );
242
240
  };
243
- this.robotcloudApi = robotcloudApi2;
244
- }
245
- };
246
-
247
- // src/client/users.ts
248
- var UsersClient = class {
249
- constructor(robotcloudApi2) {
250
- this.logger = useLogger("UsersClient");
251
241
  this.getUsers = () => {
252
242
  return this.robotcloudApi.get(`users`);
253
243
  };
@@ -261,7 +251,7 @@ var UsersClient = class {
261
251
  return this.robotcloudApi.delete(`users/${username}`);
262
252
  };
263
253
  this.getUserOrganizations = (username) => {
264
- return this.robotcloudApi.get(`users/${username}`);
254
+ return this.robotcloudApi.get(`users/${username}/organizations`);
265
255
  };
266
256
  this.getUserProjects = (username) => {
267
257
  return this.robotcloudApi.get(
@@ -306,10 +296,10 @@ var ApplicationsClient = class {
306
296
  return this.robotcloudApi.get(`application/register/${applicationId}`);
307
297
  };
308
298
  this.putApplication = (applicationId) => {
309
- return this.robotcloudApi.get(`application/register/${applicationId}`);
299
+ return this.robotcloudApi.put(`application/register/${applicationId}`);
310
300
  };
311
301
  this.deleteApplication = (applicationId) => {
312
- return this.robotcloudApi.get(`application/register/${applicationId}`);
302
+ return this.robotcloudApi.delete(`application/register/${applicationId}`);
313
303
  };
314
304
  this.robotcloudApi = robotcloudApi2;
315
305
  }
@@ -604,6 +594,50 @@ var RoomConsumesClient = class {
604
594
  };
605
595
  var roomConsumesClient = new RoomConsumesClient();
606
596
 
597
+ // src/client/services/room-grouping-1.ts
598
+ var RoomGroupingConfigClient = class extends GenericInstanceConfigClient {
599
+ constructor() {
600
+ super("RoomGrouping_1");
601
+ }
602
+ };
603
+ var RoomGroupingClient = class {
604
+ constructor() {
605
+ this.getInstanceData = (prjId, instanceId, params) => {
606
+ return robotCloudApi_default.get(
607
+ `/projects/${prjId}/services/RoomConsumes_1/instances/${instanceId}/data`,
608
+ {
609
+ params,
610
+ headers: {
611
+ Accept: "application/json"
612
+ }
613
+ }
614
+ );
615
+ };
616
+ this._configurationClient = new RoomGroupingConfigClient();
617
+ }
618
+ get configuration() {
619
+ return this._configurationClient;
620
+ }
621
+ getAlerts(prjId, params) {
622
+ throw Error("Not implemented method");
623
+ }
624
+ getData(prjId, params) {
625
+ return robotCloudApi_default.get(`/projects/${prjId}/services/RoomGrouping_1/data`, {
626
+ params,
627
+ headers: {
628
+ Accept: "application/json"
629
+ }
630
+ });
631
+ }
632
+ getInstanceHistoric(prjId, instanceId, startTime, endTime, params) {
633
+ throw Error("Not implemented method");
634
+ }
635
+ getInstanceHistoricAggregate(prjId, instanceId, startTime, endTime, aggFunction, periode, params) {
636
+ throw Error("Not implemented method");
637
+ }
638
+ };
639
+ var roomGroupingClient = new RoomGroupingClient();
640
+
607
641
  // src/client/projects/classifiers.ts
608
642
  var logger2 = useLogger("classifiers-client");
609
643
  var ClassifiersClient = class {
@@ -674,22 +708,6 @@ var devicesClient = new DevicesClient();
674
708
  // src/client/projects/locations.ts
675
709
  var LocationsClient = class {
676
710
  constructor() {
677
- this.getLocationServiceInstances = (prjId, locId, service_type, params) => {
678
- return robotCloudApi_default.get(
679
- `projects/${prjId}/locations/${locId}/services/${service_type}/instances`,
680
- {
681
- params
682
- }
683
- );
684
- };
685
- this.postLocationServiceInstances = (prjId, locId, service_type, params) => {
686
- return robotCloudApi_default.post(
687
- `projects/${prjId}/locations/${locId}/services/${service_type}/instances`,
688
- {
689
- params
690
- }
691
- );
692
- };
693
711
  this.getLocations = (prjId, params) => {
694
712
  return robotCloudApi_default.get(
695
713
  `projects/${prjId}/locations`,
@@ -731,6 +749,16 @@ var locationsClient = new LocationsClient();
731
749
  // src/client/projects/projects.ts
732
750
  var ProjectsClient = class {
733
751
  constructor() {
752
+ this.getOrganizationProjects = (organizationId) => {
753
+ return robotCloudApi_default.get(
754
+ `organizations/${organizationId}/projects`
755
+ );
756
+ };
757
+ this.postOrganizationProjects = (organizationId) => {
758
+ return robotCloudApi_default.post(
759
+ `organizations/${organizationId}/projects`
760
+ );
761
+ };
734
762
  this.getProjects = (params) => {
735
763
  return robotCloudApi_default.get("projects", {
736
764
  params
@@ -756,22 +784,6 @@ var ProjectsClient = class {
756
784
  params
757
785
  });
758
786
  };
759
- this.getProjectInstances = (prjId, params) => {
760
- return robotCloudApi_default.get(
761
- `projects/${prjId}/instances`,
762
- {
763
- params
764
- }
765
- );
766
- };
767
- this.getProjectServiceTypes = (prjId, params) => {
768
- return robotCloudApi_default.get(
769
- `projects/${prjId}/services`,
770
- {
771
- params
772
- }
773
- );
774
- };
775
787
  this.getProjectApplications = (prjId, params) => {
776
788
  return robotCloudApi_default.get(`projects/${prjId}/applications`, {
777
789
  params
@@ -813,23 +825,93 @@ var ServiceInstancesClient = class {
813
825
  }
814
826
  );
815
827
  };
816
- this.getServiceInstance = (prjId, service_type, service_id) => {
828
+ this.getProjectServiceTypes = (prjId, params) => {
817
829
  return robotCloudApi_default.get(
818
- `projects/${prjId}/services/${service_type}/instances/${service_id}`
830
+ `projects/${prjId}/services`,
831
+ {
832
+ params
833
+ }
819
834
  );
820
835
  };
821
- this.getServiceInstanceDevicesInfo = (prjId, service_type, service_id) => {
822
- return robotCloudApi_default.get(`projects/${prjId}/services/${service_type}/instances/${service_id}/deviceconf`);
836
+ this.getLocationServiceInstances = (prjId, locId, service_type, params) => {
837
+ return robotCloudApi_default.get(
838
+ `projects/${prjId}/locations/${locId}/services/${service_type}/instances`,
839
+ {
840
+ params
841
+ }
842
+ );
843
+ };
844
+ this.postLocationServiceInstances = (prjId, locId, service_type, params) => {
845
+ return robotCloudApi_default.post(
846
+ `projects/${prjId}/locations/${locId}/services/${service_type}/instances`,
847
+ {
848
+ params
849
+ }
850
+ );
851
+ };
852
+ this.getServiceInstance = (prjId, service_type, instance_id) => {
853
+ return robotCloudApi_default.get(
854
+ `projects/${prjId}/services/${service_type}/instances/${instance_id}`
855
+ );
856
+ };
857
+ this.putServiceInstance = (prjId, service_type, instance_id) => {
858
+ return robotCloudApi_default.put(
859
+ `projects/${prjId}/services/${service_type}/instances/${instance_id}`
860
+ );
861
+ };
862
+ this.deleteServiceInstance = (prjId, service_type, instance_id) => {
863
+ return robotCloudApi_default.delete(
864
+ `projects/${prjId}/services/${service_type}/instances/${instance_id}`
865
+ );
866
+ };
867
+ this.getServiceInstanceDevicesInfo = (prjId, service_type, instance_id) => {
868
+ return robotCloudApi_default.get(`projects/${prjId}/services/${service_type}/instances/${instance_id}/deviceconf`);
869
+ };
870
+ this.putServiceInstanceDevicesInfo = (prjId, service_type, instance_id) => {
871
+ return robotCloudApi_default.put(`projects/${prjId}/services/${service_type}/instances/${instance_id}/deviceconf`);
823
872
  };
824
873
  }
825
874
  getServiceAllInstancesData(prjId, service_type) {
826
875
  return robotCloudApi_default.get(`projects/${prjId}/services/${service_type}/data`);
827
876
  }
877
+ getServiceInstancesData(prjId, service_type, instance_id) {
878
+ return robotCloudApi_default.get(`projects/${prjId}/services/${service_type}/instances/${instance_id}/data`);
879
+ }
828
880
  getServiceAllInstancesAlerts(prjId, service_type) {
829
881
  return robotCloudApi_default.get(
830
882
  `projects/${prjId}/services/${service_type}/alert`
831
883
  );
832
884
  }
885
+ getServiceInstancesAlerts(prjId, service_type, instance_id) {
886
+ return robotCloudApi_default.get(`projects/${prjId}/services/${service_type}/instances/${instance_id}/alert`);
887
+ }
888
+ getServiceInstancesConfiguration(prjId, service_type, instance_id) {
889
+ return robotCloudApi_default.get(`projects/${prjId}/services/${service_type}/instances/${instance_id}/configuration`);
890
+ }
891
+ putServiceInstancesConfiguration(prjId, service_type, instance_id) {
892
+ return robotCloudApi_default.put(`projects/${prjId}/services/${service_type}/instances/${instance_id}/configuration`);
893
+ }
894
+ getServiceInstancesHistoricData(prjId, service_type, instance_id) {
895
+ return robotCloudApi_default.get(`projects/${prjId}/services/${service_type}/instances/${instance_id}/historic/data`);
896
+ }
897
+ getServiceInstancesHistoricDataAggregate(prjId, service_type, instance_id) {
898
+ return robotCloudApi_default.get(`projects/${prjId}/services/${service_type}/instances/${instance_id}/historic/data/aggregate`);
899
+ }
900
+ getServiceLocation(prjId, locationId) {
901
+ return robotCloudApi_default.get(
902
+ `projects/${prjId}/locations/${locationId}/services`
903
+ );
904
+ }
905
+ getSizeProjectInstances(prjId) {
906
+ return robotCloudApi_default.get(
907
+ `size/projects/${prjId}/instances`
908
+ );
909
+ }
910
+ getSizeProjectServicesInstances(prjId, service_type) {
911
+ return robotCloudApi_default.get(
912
+ `size/projects/${prjId}/services/${service_type}/instances`
913
+ );
914
+ }
833
915
  };
834
916
  var serviceInstancesClient = new ServiceInstancesClient();
835
917
 
@@ -1096,6 +1178,7 @@ export {
1096
1178
  robotCloudApi_default as robotcloudApi,
1097
1179
  roomClimeClient,
1098
1180
  roomConsumesClient,
1181
+ roomGroupingClient,
1099
1182
  roomGuestStatusClient,
1100
1183
  serviceInstancesClient,
1101
1184
  subsystemsClient,