@robotbas/robotcloud-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.
@@ -1,2 +1,2 @@
1
- export { a7 as RobotCloudPermissionsHelper, a6 as robotCloudPermissionsHelper, a5 as tagsHelper } from '../index-9RfDay_a.mjs';
1
+ export { ab as RobotCloudPermissionsHelper, aa as robotCloudPermissionsHelper, a9 as tagsHelper } from '../index-B8PC1dr5.mjs';
2
2
  import 'axios';
@@ -1,2 +1,2 @@
1
- export { a7 as RobotCloudPermissionsHelper, a6 as robotCloudPermissionsHelper, a5 as tagsHelper } from '../index-9RfDay_a.js';
1
+ export { ab as RobotCloudPermissionsHelper, aa as robotCloudPermissionsHelper, a9 as tagsHelper } from '../index-B8PC1dr5.js';
2
2
  import 'axios';
@@ -309,6 +309,34 @@ type MeasurementStatus =
309
309
  interface ServiceDataMeasurement<T> extends ServiceInstanceRead<T> {
310
310
  status: MeasurementStatus;
311
311
  }
312
+ interface AirHandlingUnit1AlertEventValue {
313
+ alarm_1: boolean,
314
+ alarm_2: boolean,
315
+ alarm_3: boolean,
316
+ alarm_4: boolean,
317
+ alarm_general: boolean
318
+ }
319
+
320
+ interface AirHandlingUnit1DataEventValue {
321
+ cool_heat_state?: "COOL" | "HEAT" | "AUTO",
322
+ cool_heat_valve_state?: number,
323
+ heat_valve_state?: number,
324
+ impulsion_fan_speed?: number,
325
+ impulsion_fan_state?: boolean,
326
+ impulsion_flow?: number,
327
+ impulsion_set_point?: number,
328
+ impulsion_temperature?: number,
329
+ on?: boolean,
330
+ outdoor_air_damper_state?: number,
331
+ return_ambient_air_quality?: number,
332
+ return_ambient_co2?: number,
333
+ return_ambient_enthalpy?: number,
334
+ return_ambient_humidity?: number,
335
+ return_ambient_temperature?: number,
336
+ return_fan_speed?: number,
337
+ return_fan_state?: boolean,
338
+ return_flow?: number
339
+ }
312
340
 
313
341
  interface AirQuality1DataEventValue {
314
342
  co2: number;
@@ -318,6 +346,39 @@ interface AirQuality1AlertEventValue {
318
346
  high_co2: boolean;
319
347
  }
320
348
 
349
+ interface ChillerHeatingPump1DataEventValue {
350
+ COP?: number,
351
+ capacity?: number,
352
+ compressor_state?: number,
353
+ condenser_impulsion_temperature?: number,
354
+ condenser_return_temperature?: number,
355
+ expansion_valve_position?: number,
356
+ flow_state?: boolean,
357
+ impulsion_temperature?: number,
358
+ max_capacity?: number,
359
+ on?: boolean,
360
+ recovery_impulsion_temperature?: number,
361
+ recovery_return_temperature?: number,
362
+ recovery_state?: boolean,
363
+ regim?: "COOL" | "HEAT" | "AUTO" | "FROST",
364
+ remote_state?: boolean,
365
+ return_temperature?: number
366
+ }
367
+
368
+ interface ChillerHeatingPump1AlertEventValue {
369
+ alarm_1?: boolean;
370
+ alarm_2?: boolean;
371
+ alarm_3?: boolean;
372
+ alarm_4?: boolean;
373
+ alarm_5?: boolean;
374
+ alarm_6?: boolean;
375
+ alarm_7?: boolean;
376
+ alarm_8?: boolean;
377
+ alarm_9?: boolean;
378
+ alarm_10?: boolean;
379
+ alarm_general?: boolean;
380
+ }
381
+
321
382
  interface RoomGuestStatus1AlertEventValue {
322
383
  door_open_overtime: boolean;
323
384
  window_open_overtime: boolean;
@@ -344,30 +405,53 @@ type HistoricAggregateFunction =
344
405
  | "nmax"
345
406
  | "nmin";
346
407
 
347
-
408
+
348
409
  interface ServiceInstanceConfigClient<T> {
349
410
  get(project_id: string, instance_id: string): Promise<AxiosResponse<T>>;
350
411
  put(project_id: string, instance_id: string, configuration: T): Promise<AxiosResponse<T>>;
351
412
  }
352
413
 
353
- interface ServiceTypeClient<T_ALERTS, T_DATA> {
414
+ interface ServiceInstanceDataClient<T> {
354
415
 
355
- get configuration(): ServiceInstanceConfigClient<any>;
356
- getAlerts(
357
- prjId: string,
358
- params?: ServiceDataRequestParams
359
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_ALERTS>[]>>;
416
+ /**
417
+ * Get data for a given project and instance
418
+ * @param prjId - The project ID
419
+ * @param instanceId - The instance ID
420
+ * @param params - The request parameters
421
+ * @returns A promise that resolves to the data
422
+ */
423
+ get(prjId: string, instanceId: string, params?: ServiceInstanceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<T>>>;
360
424
 
361
- getData(
362
- prjId: string,
363
- params?: ServiceDataRequestParams
364
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
425
+ /**
426
+ * Get all data for a given project and service
427
+ * @param prjId - The project ID
428
+ * @param params - The request parameters
429
+ * @returns A promise that resolves to the data
430
+ */
431
+ getAll(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<T>[]>>;
432
+ }
365
433
 
366
- getInstanceData(
367
- prjId: string,
368
- instanceId: string,
369
- params?: ServiceInstanceDataRequestParams
370
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>>>;
434
+ interface ServiceInstanceAlertClient<T> {
435
+
436
+ /**
437
+ * Get Alert for a given project and instance
438
+ * @param prjId - The project ID
439
+ * @param instanceId - The instance ID
440
+ * @param params - The request parameters
441
+ * @returns A promise that resolves to the data
442
+ */
443
+ get(prjId: string, instanceId: string, params?: ServiceInstanceAlertRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<T>>>;
444
+
445
+ /**
446
+ * Get all alerts for a given project and service
447
+ * @param prjId - The project ID
448
+ * @param params - The request parameters
449
+ * @returns A promise that resolves to the data
450
+ */
451
+ getAll(prjId: string, params?: ServiceAlertRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<T>[]>>;
452
+ }
453
+
454
+ interface ServiceInstanceHistoricClient<T> {
371
455
 
372
456
  getInstanceHistoric(
373
457
  prjId: string,
@@ -375,7 +459,7 @@ interface ServiceTypeClient<T_ALERTS, T_DATA> {
375
459
  startTime: Date,
376
460
  endTime: Date,
377
461
  params: ServiceInstanceHistoricParams
378
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
462
+ ): Promise<AxiosResponse<ServiceDataMeasurement<T>[]>>;
379
463
 
380
464
  getInstanceHistoricAggregate(
381
465
  prjId: string,
@@ -385,110 +469,122 @@ interface ServiceTypeClient<T_ALERTS, T_DATA> {
385
469
  aggFunction: HistoricAggregateFunction,
386
470
  periode: string,
387
471
  params: ServiceInstanceHistoricAggregateParams
388
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
389
- }
390
-
391
- /**
392
- *
393
- */
394
-
395
-
396
-
397
- /*
398
- * GENERIC REQUEST PARAMS INTERFACES
399
- */
400
-
401
- interface SubsystemRequestParams {
402
- subsystem_id?: string;
403
- }
404
-
405
- interface PaginableRequestParams {
406
- startIndex?: number;
407
- maxSize?: number;
408
- }
409
- interface SortableListRequestParams {
410
- sort_by?: string; // Prefix the field name with '-' for descending order.
411
- }
412
-
413
- interface SubsystemTagsRequestParams extends SubsystemRequestParams {
414
- tag_id?: string | string[];
415
- }
416
-
417
- interface BaseFullPaginableRequestParams
418
- extends SubsystemTagsRequestParams,
419
- PaginableRequestParams { }
420
-
421
- /*
422
- * CONCRETE INTERFACES
423
- */
424
-
425
- interface ProjectClassifiersRequestParams
426
- extends PaginableRequestParams { }
427
-
428
- interface ProjectsRequestParams extends PaginableRequestParams {
429
- "organization-id": string;
430
- }
431
-
432
- interface ProjectDetailsRequestParams { }
433
-
434
- interface ProjectLocationsRequestParams
435
- extends BaseFullPaginableRequestParams { }
436
-
437
- interface ServiceInstanceDataRequestParams { }
438
-
439
- interface ProjectTagRequestParams extends PaginableRequestParams {
440
- parent_tag?: string;
441
- no_parent?: boolean;
442
- }
443
-
444
- interface LocationServiceInstancesRequestParams
445
- extends BaseFullPaginableRequestParams { }
446
-
447
- interface AlertLogsListRequestParams
448
- extends BaseFullPaginableRequestParams,
449
- SortableListRequestParams {
450
- location_id?: string;
451
- classifier_id?: string;
452
- service_name?: string;
453
- instance_id?: string;
454
- name?: string;
455
- active?: boolean;
456
- acknowledged?: boolean;
457
- ack_user?: string;
458
- active_time?: string;
459
- deactive_time?: string;
460
- ack_time?: string;
461
- }
462
- interface AlertsProjectStatsRequestParams extends SubsystemRequestParams { }
463
- interface AlertAggregatedLogsRequestParams extends SubsystemTagsRequestParams {
464
- location_id?: string;
465
- classifier_id?: string;
466
- service_name?: string;
467
- instance_id?: string;
468
- name?: string;
469
- periode: `${number}${'h' | 'd' | 'w' | 'm' | 'y'}`;
470
- offset?: string;
471
- time_range: string;
472
- }
473
- interface ServiceInstancesRequestParams
474
- extends BaseFullPaginableRequestParams {
475
- id?: string;
476
- name?: string;
477
- location_id?: string;
478
- device_id?: string;
479
- }
480
-
481
- interface ServiceDataRequestParams extends SubsystemTagsRequestParams { }
482
-
483
- interface ServiceInstanceHistoricAggregateParams {
484
- offset?: string;
485
- property?: any[];
486
- maxSize?: number;
487
- }
488
- interface ServiceInstanceHistoricParams {
489
- status?: MeasurementStatus;
490
- property?: any[];
491
- maxSize?: number;
472
+ ): Promise<AxiosResponse<ServiceDataMeasurement<T>[]>>;
473
+ }
474
+
475
+
476
+ interface ServiceTypeClient<T_DATA, T_ALERTS, T_CONFIG> {
477
+ get configuration(): ServiceInstanceConfigClient<T_CONFIG>;
478
+ get data(): ServiceInstanceDataClient<T_DATA>;
479
+ get alert(): ServiceInstanceAlertClient<T_ALERTS>;
480
+ get historic(): ServiceInstanceHistoricClient<T_DATA>;
481
+ }
482
+
483
+ /**
484
+ *
485
+ */
486
+
487
+
488
+
489
+ /*
490
+ * GENERIC REQUEST PARAMS INTERFACES
491
+ */
492
+
493
+ interface SubsystemRequestParams {
494
+ subsystem_id?: string;
495
+ }
496
+
497
+ interface PaginableRequestParams {
498
+ startIndex?: number;
499
+ maxSize?: number;
500
+ }
501
+ interface SortableListRequestParams {
502
+ sort_by?: string; // Prefix the field name with '-' for descending order.
503
+ }
504
+
505
+ interface SubsystemTagsRequestParams extends SubsystemRequestParams {
506
+ tag_id?: string | string[];
507
+ }
508
+
509
+ interface BaseFullPaginableRequestParams
510
+ extends SubsystemTagsRequestParams,
511
+ PaginableRequestParams { }
512
+
513
+ /*
514
+ * CONCRETE INTERFACES
515
+ */
516
+
517
+ interface ProjectClassifiersRequestParams
518
+ extends PaginableRequestParams { }
519
+
520
+ interface ProjectsRequestParams extends PaginableRequestParams {
521
+ "organization-id": string;
522
+ }
523
+
524
+ interface ProjectDetailsRequestParams { }
525
+
526
+ interface ProjectLocationsRequestParams
527
+ extends BaseFullPaginableRequestParams { }
528
+
529
+ interface ServiceInstanceDataRequestParams { }
530
+
531
+ interface ServiceInstanceAlertRequestParams { }
532
+
533
+ interface ProjectTagRequestParams extends PaginableRequestParams {
534
+ parent_tag?: string;
535
+ no_parent?: boolean;
536
+ }
537
+
538
+ interface LocationServiceInstancesRequestParams
539
+ extends BaseFullPaginableRequestParams { }
540
+
541
+ interface AlertLogsListRequestParams
542
+ extends BaseFullPaginableRequestParams,
543
+ SortableListRequestParams {
544
+ location_id?: string;
545
+ classifier_id?: string;
546
+ service_name?: string;
547
+ instance_id?: string;
548
+ name?: string;
549
+ active?: boolean;
550
+ acknowledged?: boolean;
551
+ ack_user?: string;
552
+ active_time?: string;
553
+ deactive_time?: string;
554
+ ack_time?: string;
555
+ }
556
+ interface AlertsProjectStatsRequestParams extends SubsystemRequestParams { }
557
+ interface AlertAggregatedLogsRequestParams extends SubsystemTagsRequestParams {
558
+ location_id?: string;
559
+ classifier_id?: string;
560
+ service_name?: string;
561
+ instance_id?: string;
562
+ name?: string;
563
+ periode: `${number}${'h' | 'd' | 'w' | 'm' | 'y'}`;
564
+ offset?: string;
565
+ time_range: string;
566
+ }
567
+ interface ServiceInstancesRequestParams
568
+ extends BaseFullPaginableRequestParams {
569
+ id?: string;
570
+ name?: string;
571
+ location_id?: string;
572
+ device_id?: string;
573
+ }
574
+
575
+ interface ServiceDataRequestParams extends SubsystemTagsRequestParams { }
576
+
577
+ interface ServiceAlertRequestParams extends SubsystemTagsRequestParams { }
578
+
579
+ interface ServiceInstanceHistoricAggregateParams {
580
+ offset?: string;
581
+ property?: any[];
582
+ maxSize?: number;
583
+ }
584
+ interface ServiceInstanceHistoricParams {
585
+ status?: MeasurementStatus;
586
+ property?: any[];
587
+ maxSize?: number;
492
588
  }
493
589
 
494
590
  interface ProjectTagTreeNode {
@@ -544,4 +640,4 @@ declare const robotCloudPermissionsHelper: RobotCloudPermissionsHelper;
544
640
 
545
641
  declare const tagsHelper: TagsHelper;
546
642
 
547
- export { type RobotCloudApplicationEnable as $, type AlertsProjectStatsRequestParams as A, type ServiceDataMeasurement as B, type ServiceInstanceDataRequestParams as C, type ServiceInstanceHistoricParams as D, type ServiceInstanceHistoricAggregateParams as E, type RoomGuestStatus1AlertEventValue as F, type AirQuality1AlertEventValue as G, type HistoricAggregateFunction as H, type AirQuality1DataEventValue as I, type RoomConsumes1AlertEventValue as J, type RobotCloudRobotCloudDeviceCreate as K, type RobotCloudDeviceDetails as L, type RobotCloudRobotCloudDeviceModify as M, type RobotCloudDeviceConfiguration as N, type ProjectLocationsRequestParams as O, type ProjectClassifiersRequestParams as P, type RobotCloudProject as Q, type RobotCloudOrganizations as R, type SubsystemRequestParams as S, type TemperatureUnit as T, type RobotCloudCreateProject as U, type ProjectsRequestParams as V, type ProjectDetailsRequestParams as W, type RobotCloudProjectDetails as X, type RobotCloudPutProject as Y, type RobotCloudProjectUsers as Z, type RobotCloudProjectApplications as _, type RobotCloudCreateOrganization as a, type ServiceInstancesRequestParams as a0, type RobotCloudServiceTypeDetails as a1, type LocationServiceInstancesRequestParams as a2, type ServiceInstanceRead as a3, tagsClient as a4, tagsHelper as a5, robotCloudPermissionsHelper as a6, type RobotCloudPermissionsHelper as a7, type ProjectTagTreeNode as a8, type ProjectTagsTree as a9, type ProjectTag as aa, type ProjectModifyTag as ab, type ProjectTagDetails as ac, type PaginableRequestParams as ad, type SortableListRequestParams as ae, type SubsystemTagsRequestParams as af, type BaseFullPaginableRequestParams as ag, type ProjectTagRequestParams as ah, type OrganizationAccessLevel as ai, type ProjectAccessLevel as aj, type AppAccessLevel as ak, type RobotCloudServiceType as al, type FancoilSpeedState as am, type RobotCloudUserAppAccess as an, type RobotCloudCreateUser as ao, type RobotCloudProjectInstances as ap, type MeasurementStatus as aq, type RobotCloudOrganizationDetails as b, type RobotCloudPutOrganization as c, type RobotCloudDelete as d, type RobotCloudOrganizationUsers as e, type RobotCloudOrganizationCreateUser as f, type RobotCloudUsers as g, type RobotCloudUserDetails as h, type RobotCloudPutUserDetails as i, type RobotCloudUserOrganization as j, type RobotCloudUserProject as k, type RobotCloudPostUserProject as l, type RobotCloudPutProjectUser as m, type AlertLogsListRequestParams as n, type RobotCloudNamedItem as o, type RobotCloudUserSimple as p, type AlertAggregatedLogsRequestParams as q, type RobotCloudDescribedItem as r, type RobotCloudCreateApplication as s, type RobotCloudGetApplication as t, type RobotCloudPutApplication as u, type RegimState as v, type ServiceInstanceConfigClient as w, type ServiceTypeClient as x, type RoomClime1AlertEventValue as y, type ServiceDataRequestParams as z };
643
+ export { type RobotCloudProjectDetails as $, type AlertsProjectStatsRequestParams as A, type ServiceDataRequestParams as B, type ServiceInstanceAlertClient as C, type ServiceInstanceAlertRequestParams as D, type ServiceAlertRequestParams as E, type ServiceInstanceHistoricClient as F, type ServiceInstanceHistoricParams as G, type HistoricAggregateFunction as H, type ServiceInstanceHistoricAggregateParams as I, type RoomClime1AlertEventValue as J, type ServiceTypeClient as K, type AirQuality1DataEventValue as L, type AirQuality1AlertEventValue as M, type RoomConsumes1AlertEventValue as N, type RobotCloudRobotCloudDeviceCreate as O, type ProjectClassifiersRequestParams as P, type RobotCloudDeviceDetails as Q, type RobotCloudOrganizations as R, type SubsystemRequestParams as S, type TemperatureUnit as T, type RobotCloudRobotCloudDeviceModify as U, type RobotCloudDeviceConfiguration as V, type ProjectLocationsRequestParams as W, type RobotCloudProject as X, type RobotCloudCreateProject as Y, type ProjectsRequestParams as Z, type ProjectDetailsRequestParams as _, type RobotCloudCreateOrganization as a, type RobotCloudPutProject as a0, type RobotCloudProjectUsers as a1, type RobotCloudProjectApplications as a2, type RobotCloudApplicationEnable as a3, type ServiceInstancesRequestParams as a4, type RobotCloudServiceTypeDetails as a5, type LocationServiceInstancesRequestParams as a6, type ServiceInstanceRead as a7, tagsClient as a8, tagsHelper as a9, robotCloudPermissionsHelper as aa, type RobotCloudPermissionsHelper as ab, type ProjectTagTreeNode as ac, type ProjectTagsTree as ad, type ProjectTag as ae, type ProjectModifyTag as af, type ProjectTagDetails as ag, type PaginableRequestParams as ah, type SortableListRequestParams as ai, type SubsystemTagsRequestParams as aj, type BaseFullPaginableRequestParams as ak, type ProjectTagRequestParams as al, type OrganizationAccessLevel as am, type ProjectAccessLevel as an, type AppAccessLevel as ao, type RobotCloudServiceType as ap, type FancoilSpeedState as aq, type RobotCloudUserAppAccess as ar, type RobotCloudCreateUser as as, type RobotCloudProjectInstances as at, type MeasurementStatus as au, type AirHandlingUnit1AlertEventValue as av, type AirHandlingUnit1DataEventValue as aw, type ChillerHeatingPump1DataEventValue as ax, type ChillerHeatingPump1AlertEventValue as ay, type RoomGuestStatus1AlertEventValue as az, type RobotCloudOrganizationDetails as b, type RobotCloudPutOrganization as c, type RobotCloudDelete as d, type RobotCloudOrganizationUsers as e, type RobotCloudOrganizationCreateUser as f, type RobotCloudUsers as g, type RobotCloudUserDetails as h, type RobotCloudPutUserDetails as i, type RobotCloudUserOrganization as j, type RobotCloudUserProject as k, type RobotCloudPostUserProject as l, type RobotCloudPutProjectUser as m, type AlertLogsListRequestParams as n, type RobotCloudNamedItem as o, type RobotCloudUserSimple as p, type AlertAggregatedLogsRequestParams as q, type RobotCloudDescribedItem as r, type RobotCloudCreateApplication as s, type RobotCloudGetApplication as t, type RobotCloudPutApplication as u, type RegimState as v, type ServiceInstanceConfigClient as w, type ServiceInstanceDataClient as x, type ServiceInstanceDataRequestParams as y, type ServiceDataMeasurement as z };