@placeos/ts-client 4.3.1 → 4.4.0

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.
@@ -0,0 +1,17 @@
1
+ import { PlaceResource } from '../resources/resource';
2
+ import { TriggerConditions } from '../triggers/interfaces';
3
+ import { PlaceAlertDashboard } from './dashboard';
4
+ export type AlertSeverity = 'low' | 'medium' | 'high' | 'critical';
5
+ export type AlertType = 'threshold' | 'status' | 'custom';
6
+ export declare class PlaceAlert extends PlaceResource {
7
+ readonly alert_dashboard_id: string;
8
+ readonly alert_dashboard_details: PlaceAlertDashboard | undefined;
9
+ readonly authority_id: string;
10
+ readonly description: string;
11
+ readonly enabled: boolean;
12
+ readonly conditions: TriggerConditions;
13
+ readonly severity: AlertSeverity;
14
+ readonly alert_type: AlertType;
15
+ readonly debounce_period: number;
16
+ constructor(data: Partial<PlaceAlert>);
17
+ }
@@ -0,0 +1,7 @@
1
+ import { PlaceResource } from '../resources/resource';
2
+ export declare class PlaceAlertDashboard extends PlaceResource {
3
+ readonly authority_id: string;
4
+ readonly description: string;
5
+ readonly enabled: boolean;
6
+ constructor(data: Partial<PlaceAlertDashboard>);
7
+ }
@@ -0,0 +1,70 @@
1
+ import { PlaceResourceQueryOptions } from '../resources/interface';
2
+ import { PlaceAlert } from './alert';
3
+ import { PlaceAlertDashboard } from './dashboard';
4
+ /**
5
+ * Query the available alert dashboards
6
+ * @param query_params Query parameters to add the to request URL
7
+ */
8
+ export declare function queryAlertDashboards(query_params?: PlaceResourceQueryOptions): import('..').QueryResponse<PlaceAlertDashboard>;
9
+ /**
10
+ * Get the data for an alert dashboard
11
+ * @param id ID of the alert dashboard to retrieve
12
+ * @param query_params Query parameters to add the to request URL
13
+ */
14
+ export declare function showAlertDashboard(id: string, query_params?: Record<string, any>): import('rxjs').Observable<PlaceAlertDashboard>;
15
+ /**
16
+ * Update the alert dashboard in the database
17
+ * @param id ID of the alert dashboard
18
+ * @param form_data New values for the alert dashboard
19
+ * @param query_params Query parameters to add the to request URL
20
+ * @param method HTTP verb to use on request. Defaults to `patch`
21
+ */
22
+ export declare function updateAlertDashboard(id: string, form_data: Partial<PlaceAlertDashboard>, method?: 'put' | 'patch'): import('rxjs').Observable<PlaceAlertDashboard>;
23
+ /**
24
+ * Add a new alert dashboard to the database
25
+ * @param form_data Application data
26
+ * @param query_params Query parameters to add the to request URL
27
+ */
28
+ export declare function addAlertDashboard(form_data: Partial<PlaceAlertDashboard>): import('rxjs').Observable<PlaceAlertDashboard>;
29
+ /**
30
+ * Remove an alert dashboard from the database
31
+ * @param id ID of the alert dashboard
32
+ * @param query_params Query parameters to add the to request URL
33
+ */
34
+ export declare function removeAlertDashboard(id: string, query_params?: Record<string, any>): import('rxjs').Observable<import('../utilities/types').HashMap<any>>;
35
+ /**
36
+ * Get list of alerts for dashbaord
37
+ * @param id Alert dashboard ID
38
+ */
39
+ export declare function listDashboardAlerts(id: string): import('..').QueryResponse<PlaceAlert>;
40
+ /**
41
+ * Query the available alerts
42
+ * @param query_params Query parameters to add the to request URL
43
+ */
44
+ export declare function queryAlerts(query_params?: PlaceResourceQueryOptions): import('..').QueryResponse<PlaceAlert>;
45
+ /**
46
+ * Get the data for an alert
47
+ * @param id ID of the alert to retrieve
48
+ * @param query_params Query parameters to add the to request URL
49
+ */
50
+ export declare function showAlert(id: string, query_params?: Record<string, any>): import('rxjs').Observable<PlaceAlert>;
51
+ /**
52
+ * Update the alert in the database
53
+ * @param id ID of the alert
54
+ * @param form_data New values for the alert
55
+ * @param query_params Query parameters to add the to request URL
56
+ * @param method HTTP verb to use on request. Defaults to `patch`
57
+ */
58
+ export declare function updateAlert(id: string, form_data: Partial<PlaceAlert>, method?: 'put' | 'patch'): import('rxjs').Observable<PlaceAlert>;
59
+ /**
60
+ * Add a new alert to the database
61
+ * @param form_data Application data
62
+ * @param query_params Query parameters to add the to request URL
63
+ */
64
+ export declare function addAlert(form_data: Partial<PlaceAlert>): import('rxjs').Observable<PlaceAlert>;
65
+ /**
66
+ * Remove an alert from the database
67
+ * @param id ID of the alert
68
+ * @param query_params Query parameters to add the to request URL
69
+ */
70
+ export declare function removeAlert(id: string, query_params?: Record<string, any>): import('rxjs').Observable<import('../utilities/types').HashMap<any>>;
package/dist/api.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  export { del, get, patch, post, put, responseHeaders } from './http/functions';
2
2
  export type { HttpError, HttpJsonOptions, HttpOptions, HttpResponse, HttpResponseType, MockHttpRequest, MockHttpRequestHandler, MockHttpRequestHandlerOptions, } from './http/interfaces';
3
3
  export { deregisterMockEndpoint, registerMockEndpoint, setMockNotFoundHandler, } from './http/mock';
4
+ export { PlaceAlert } from './alerts/alert';
5
+ export { PlaceAlertDashboard } from './alerts/dashboard';
6
+ export { addAlert, addAlertDashboard, listDashboardAlerts, queryAlertDashboards, queryAlerts, removeAlert, removeAlertDashboard, showAlert, showAlertDashboard, updateAlert, updateAlertDashboard, } from './alerts/functions';
4
7
  export { PlaceApplication } from './applications/application';
5
8
  export { addApplication, queryApplications, removeApplication, showApplication, updateApplication, } from './applications/functions';
6
9
  export type { PlaceApplicationQueryOptions } from './applications/interfaces';
@@ -48,7 +51,8 @@ export type { PlaceModuleFunction, PlaceModuleFunctionMap, PlaceSystemShowOption
48
51
  export { PlaceSystem } from './systems/system';
49
52
  export { addTrigger, listTriggerInstances, queryTriggers, removeTrigger, showTrigger, updateTrigger, } from './triggers/functions';
50
53
  export { TriggerConditionOperator, TriggerTimeConditionType, TriggerWebhookType, } from './triggers/interfaces';
51
- export type { ExecuteArgs, TriggerActions, TriggerAtTimeCondition, TriggerComparison, TriggerConditionConstant, TriggerConditionValue, TriggerConditions, TriggerCronTimeCondition, TriggerFunction, TriggerMailer, TriggerStatusVariable, TriggerTimeCondition, TriggerWebhook, } from './triggers/interfaces';
54
+ export type { ExecuteArgs, TriggerActions, TriggerAtTimeCondition, TriggerComparison, TriggerConditionConstant, TriggerConditionValue, TriggerCronTimeCondition, TriggerFunction, TriggerMailer, TriggerStatusVariable, TriggerTimeCondition, TriggerWebhook, } from './triggers/interfaces';
55
+ export type { TriggerConditions } from './triggers/interfaces';
52
56
  export { PlaceTrigger } from './triggers/trigger';
53
57
  export { addUser, currentUser, queryUsers, removeUser, showUser, updateUser, } from './users/functions';
54
58
  export type { PlaceUserQueryOptions } from './users/interfaces';