@c8y/client 1018.505.8 → 1018.509.6
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/lib/bundles/client.umd.js +5 -152
- package/lib/bundles/client.umd.js.map +1 -1
- package/lib/bundles/client.umd.min.js +1 -1
- package/lib/bundles/client.umd.min.js.map +1 -1
- package/lib/cjs/src/smart-groups/SmartGroupsService.d.ts +2 -80
- package/lib/cjs/src/smart-groups/SmartGroupsService.js +5 -136
- package/lib/cjs/src/smart-groups/SmartGroupsService.js.map +1 -1
- package/lib/esm2015/src/smart-groups/SmartGroupsService.d.ts +2 -80
- package/lib/esm2015/src/smart-groups/SmartGroupsService.js +5 -153
- package/lib/esm2015/src/smart-groups/SmartGroupsService.js.map +1 -1
- package/lib/src/smart-groups/SmartGroupsService.d.ts +2 -80
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartGroupsService.js","sourceRoot":"","sources":["../../../../src/smart-groups/SmartGroupsService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SmartGroupsService.js","sourceRoot":"","sources":["../../../../src/smart-groups/SmartGroupsService.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,OAAO,kBAAmB,SAAQ,OAAuB;IAS7D,YAAY,MAAoB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAC;QATN,YAAO,GAAG,WAAW,CAAC;QACtB,YAAO,GAAG,gBAAgB,CAAC;QACpB,qBAAgB,GAAG,kBAAkB,CAAC;QACtC,8BAAyB,GAAG,oBAAoB,CAAC;QACjD,4BAAuB,GAAG,yBAAyB,CAAC;QACpD,2BAAsB,GAAG,wBAAwB,CAAC;QAClD,0BAAqB,GAAG,uBAAuB,CAAC;IAIjE,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACG,MAAM,CAAC,UAAuB,EAAE,SAAiB,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AC,GAAG,GAAG,EAAE;QACvB,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAEjD,OAAO,GAAG,OAAO,IAAI,UAAU,EAAE,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import { IFetchClient, IResult } from '../core';
|
|
2
2
|
import { Service } from '../core/Service';
|
|
3
|
-
import {
|
|
3
|
+
import { IManagedObject, IdReference } from '../inventory';
|
|
4
4
|
export declare class SmartGroupsService extends Service<IManagedObject> {
|
|
5
5
|
protected baseUrl: string;
|
|
6
6
|
protected listUrl: string;
|
|
7
|
-
private applicationService;
|
|
8
7
|
private readonly SMART_GROUP_TYPE;
|
|
9
8
|
private readonly SMART_GROUP_FRAGMENT_TYPE;
|
|
10
|
-
private readonly DEVICE_GROUP_FRAGMENT_TYPE;
|
|
11
|
-
private readonly DEVICE_GROUP_TYPE;
|
|
12
|
-
private readonly DEVICE_SUBGROUP_TYPE;
|
|
13
9
|
private readonly COLUMNS_CONFIG_FRAGMENT;
|
|
14
10
|
private readonly FILTER_CONFIG_FRAGMENT;
|
|
15
11
|
private readonly QUERY_STRING_FRAGMENT;
|
|
16
|
-
private readonly SMART_GROUPS_V2_MICROSERVICE_APP_NAME;
|
|
17
|
-
private readonly SMART_GROUPS_V2_MICROSERVICE_BASE_PATH;
|
|
18
|
-
private readonly SMART_GROUPS_V2_MICROSERVICE_ENDPOINT_PATH;
|
|
19
12
|
constructor(client: IFetchClient);
|
|
20
13
|
/**
|
|
21
14
|
* Gets the details of managed object
|
|
@@ -73,7 +66,6 @@ export declare class SmartGroupsService extends Service<IManagedObject> {
|
|
|
73
66
|
* Updates smart group managed object with given id.
|
|
74
67
|
*
|
|
75
68
|
* @param {Partial<IManagedObject>} mo Partial managed object of the smart group.
|
|
76
|
-
* @param {object} filter Filter object.
|
|
77
69
|
*
|
|
78
70
|
* @returns Response wrapped in [[IResult]]
|
|
79
71
|
*
|
|
@@ -87,26 +79,7 @@ export declare class SmartGroupsService extends Service<IManagedObject> {
|
|
|
87
79
|
* })();
|
|
88
80
|
* ```
|
|
89
81
|
*/
|
|
90
|
-
update(mo: Partial<IManagedObject
|
|
91
|
-
/**
|
|
92
|
-
* Updates smart group v2 managed object with given id.
|
|
93
|
-
*
|
|
94
|
-
* @param {Partial<IManagedObject>} mo Partial managed object of the smart group v2.
|
|
95
|
-
* @param {object} filter Filter object.
|
|
96
|
-
*
|
|
97
|
-
* @returns Response wrapped in [[IResult]]
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* ```typescript
|
|
101
|
-
*
|
|
102
|
-
* const smartGroupV2 = { id: '1', name: 'newName' };
|
|
103
|
-
*
|
|
104
|
-
* (async () => {
|
|
105
|
-
* await smartGroupsService.updateSmartGroupV2(smartGroupV2);
|
|
106
|
-
* })();
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
updateSmartGroupV2(mo: Partial<IManagedObject>, filter?: object): Promise<IResult<IManagedObject>>;
|
|
82
|
+
update(mo: Partial<IManagedObject>): Promise<IResult<IManagedObject>>;
|
|
110
83
|
/**
|
|
111
84
|
* Removes managed object with given id.
|
|
112
85
|
*
|
|
@@ -129,20 +102,6 @@ export declare class SmartGroupsService extends Service<IManagedObject> {
|
|
|
129
102
|
* ```
|
|
130
103
|
*/
|
|
131
104
|
delete(entityOrId: IdReference, params?: any): Promise<IResult<null>>;
|
|
132
|
-
/**
|
|
133
|
-
* Checks if the smart groups v2 microservice is installed.
|
|
134
|
-
*
|
|
135
|
-
* @returns Response wrapped in [[IResult]]
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* ```typescript
|
|
139
|
-
*
|
|
140
|
-
* (async () => {
|
|
141
|
-
* const {data, res} = await smartGroupsService.isSmartGroupsV2MicroserviceInstalled();
|
|
142
|
-
* })();
|
|
143
|
-
* ```
|
|
144
|
-
*/
|
|
145
|
-
isSmartGroupsV2MicroserviceInstalled(): Promise<IResult<boolean>>;
|
|
146
105
|
/**
|
|
147
106
|
* Checks whether a given managed object is a smart group
|
|
148
107
|
*
|
|
@@ -161,43 +120,6 @@ export declare class SmartGroupsService extends Service<IManagedObject> {
|
|
|
161
120
|
* ```
|
|
162
121
|
*/
|
|
163
122
|
isSmartGroup(mo: Partial<IManagedObject>): boolean;
|
|
164
|
-
/**
|
|
165
|
-
* Checks whether a given managed object is a smart group v2
|
|
166
|
-
*
|
|
167
|
-
* @param {IManagedObject} mo Managed object to check.
|
|
168
|
-
*
|
|
169
|
-
* @returns boolean
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* ```typescript
|
|
173
|
-
*
|
|
174
|
-
* const mo: IManagedObject = {id: 1, type: "c8y_DeviceGroup", c8y_IsDeviceGroup: {}} as IManagedObject;
|
|
175
|
-
*
|
|
176
|
-
* (() => {
|
|
177
|
-
* const isSmartGroup = smartGroupsService.isSmartGroupV2(mo);
|
|
178
|
-
* })();
|
|
179
|
-
* ```
|
|
180
|
-
*/
|
|
181
|
-
isSmartGroupV2(mo: Partial<IManagedObject>): boolean;
|
|
182
|
-
/**
|
|
183
|
-
* Removes smart group v2 managed object with given id.
|
|
184
|
-
*
|
|
185
|
-
* @param {IdReference} entityOrId entity or Id of the ManagedObject.
|
|
186
|
-
*
|
|
187
|
-
* @returns Response wrapped in [[IResult]]
|
|
188
|
-
*
|
|
189
|
-
* @example
|
|
190
|
-
* ```typescript
|
|
191
|
-
*
|
|
192
|
-
* const id: string = '1';
|
|
193
|
-
*
|
|
194
|
-
* (async () => {
|
|
195
|
-
* await smartGroupsService.removeSmartGroupV2(id);
|
|
196
|
-
* })();
|
|
197
|
-
* ```
|
|
198
|
-
*/
|
|
199
|
-
removeSmartGroupV2(entityOrId: IdReference): Promise<IResult<null>>;
|
|
200
123
|
protected getUrl(url?: string): string;
|
|
201
|
-
private createSmartGroupV2;
|
|
202
124
|
}
|
|
203
125
|
//# sourceMappingURL=SmartGroupsService.d.ts.map
|
package/package.json
CHANGED