@c8y/client 1018.155.0 → 1018.158.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.
- package/NOTICES +2171 -3054
- package/lib/bundles/client.umd.js +55 -55
- 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/Client.js +55 -55
- package/lib/cjs/src/Client.js.map +1 -1
- package/lib/esm2015/src/Client.js +55 -55
- package/lib/esm2015/src/Client.js.map +1 -1
- package/lib/src/application/IApplicationInstanceDetails.d.ts +1 -1
- package/lib/src/application/IApplicationVersion.d.ts +1 -1
- package/lib/src/inventory/InventoryService.d.ts +1 -1
- package/package.json +2 -2
package/lib/cjs/src/Client.js
CHANGED
|
@@ -4,61 +4,6 @@ exports.Client = void 0;
|
|
|
4
4
|
const realtime_1 = require("./realtime");
|
|
5
5
|
const services_1 = require("./services");
|
|
6
6
|
class Client {
|
|
7
|
-
/**
|
|
8
|
-
* Initializes a new Client, which allows to request data from the API. Differently
|
|
9
|
-
* to Client.authenticate([...]) it needs a tenant given and does not verify if the
|
|
10
|
-
* login is correct.
|
|
11
|
-
*
|
|
12
|
-
* **Example**
|
|
13
|
-
* ```typescript
|
|
14
|
-
*
|
|
15
|
-
* const auth = new BasicAuth({
|
|
16
|
-
* user: 'youruser',
|
|
17
|
-
* password: 'yourpassword',
|
|
18
|
-
* tenant: 'acme'
|
|
19
|
-
* }); // use CookieAuth() if your platform uses oauth (only in browser!)
|
|
20
|
-
*
|
|
21
|
-
* const baseUrl = 'https://acme.cumulocity.com';
|
|
22
|
-
* const client = new Client(auth, baseUrl);
|
|
23
|
-
* (async () => {
|
|
24
|
-
* const { data, paging, res }); = await client.inventory.list({ pageSize: 100 });
|
|
25
|
-
* })();
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @param auth The Authentication strategy to use (e.g. new BasicAuth())
|
|
29
|
-
* @param baseUrl The URL to request (optional in browser, mandatory in node)
|
|
30
|
-
*/
|
|
31
|
-
constructor(auth, baseUrl) {
|
|
32
|
-
const client = new services_1.FetchClient(auth, baseUrl);
|
|
33
|
-
this.realtime = new realtime_1.Realtime(client);
|
|
34
|
-
this.alarm = new services_1.AlarmService(client, this.realtime);
|
|
35
|
-
this.application = new services_1.ApplicationService(client, this.realtime);
|
|
36
|
-
this.audit = new services_1.AuditService(client);
|
|
37
|
-
this.core = client;
|
|
38
|
-
this.deviceRegistration = new services_1.DeviceRegistrationService(client);
|
|
39
|
-
this.deviceRegistrationBulk = new services_1.DeviceRegistrationBulkService(client);
|
|
40
|
-
this.event = new services_1.EventService(client, this.realtime);
|
|
41
|
-
this.inventory = new services_1.InventoryService(client, this.realtime);
|
|
42
|
-
this.inventoryBinary = new services_1.InventoryBinaryService(client);
|
|
43
|
-
this.inventoryRole = new services_1.InventoryRoleService(client);
|
|
44
|
-
this.measurement = new services_1.MeasurementService(client, this.realtime);
|
|
45
|
-
this.operation = new services_1.OperationService(client);
|
|
46
|
-
this.operationBulk = new services_1.OperationBulkService(client);
|
|
47
|
-
this.options = {
|
|
48
|
-
security: new services_1.TenantSecurityOptionsService(client),
|
|
49
|
-
system: new services_1.SystemOptionsService(client),
|
|
50
|
-
login: new services_1.TenantLoginOptionsService(client),
|
|
51
|
-
tenant: new services_1.TenantOptionsService(client)
|
|
52
|
-
};
|
|
53
|
-
this.role = new services_1.InventoryRoleService(client);
|
|
54
|
-
this.tenant = new services_1.TenantService(client);
|
|
55
|
-
this.user = new services_1.UserService(client);
|
|
56
|
-
this.userGroup = new services_1.UserGroupService(client);
|
|
57
|
-
this.userRole = new services_1.UserRoleService(client);
|
|
58
|
-
this.identity = new services_1.IdentityService(client);
|
|
59
|
-
this.smartGroups = new services_1.SmartGroupsService(client);
|
|
60
|
-
this.smartRules = new services_1.SmartRulesService(client);
|
|
61
|
-
}
|
|
62
7
|
/**
|
|
63
8
|
* Authenticates the given user. Determines the tenant by itself via a call to tenant/currentTenant.
|
|
64
9
|
*
|
|
@@ -157,6 +102,61 @@ class Client {
|
|
|
157
102
|
};
|
|
158
103
|
});
|
|
159
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Initializes a new Client, which allows to request data from the API. Differently
|
|
107
|
+
* to Client.authenticate([...]) it needs a tenant given and does not verify if the
|
|
108
|
+
* login is correct.
|
|
109
|
+
*
|
|
110
|
+
* **Example**
|
|
111
|
+
* ```typescript
|
|
112
|
+
*
|
|
113
|
+
* const auth = new BasicAuth({
|
|
114
|
+
* user: 'youruser',
|
|
115
|
+
* password: 'yourpassword',
|
|
116
|
+
* tenant: 'acme'
|
|
117
|
+
* }); // use CookieAuth() if your platform uses oauth (only in browser!)
|
|
118
|
+
*
|
|
119
|
+
* const baseUrl = 'https://acme.cumulocity.com';
|
|
120
|
+
* const client = new Client(auth, baseUrl);
|
|
121
|
+
* (async () => {
|
|
122
|
+
* const { data, paging, res }); = await client.inventory.list({ pageSize: 100 });
|
|
123
|
+
* })();
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* @param auth The Authentication strategy to use (e.g. new BasicAuth())
|
|
127
|
+
* @param baseUrl The URL to request (optional in browser, mandatory in node)
|
|
128
|
+
*/
|
|
129
|
+
constructor(auth, baseUrl) {
|
|
130
|
+
const client = new services_1.FetchClient(auth, baseUrl);
|
|
131
|
+
this.realtime = new realtime_1.Realtime(client);
|
|
132
|
+
this.alarm = new services_1.AlarmService(client, this.realtime);
|
|
133
|
+
this.application = new services_1.ApplicationService(client, this.realtime);
|
|
134
|
+
this.audit = new services_1.AuditService(client);
|
|
135
|
+
this.core = client;
|
|
136
|
+
this.deviceRegistration = new services_1.DeviceRegistrationService(client);
|
|
137
|
+
this.deviceRegistrationBulk = new services_1.DeviceRegistrationBulkService(client);
|
|
138
|
+
this.event = new services_1.EventService(client, this.realtime);
|
|
139
|
+
this.inventory = new services_1.InventoryService(client, this.realtime);
|
|
140
|
+
this.inventoryBinary = new services_1.InventoryBinaryService(client);
|
|
141
|
+
this.inventoryRole = new services_1.InventoryRoleService(client);
|
|
142
|
+
this.measurement = new services_1.MeasurementService(client, this.realtime);
|
|
143
|
+
this.operation = new services_1.OperationService(client);
|
|
144
|
+
this.operationBulk = new services_1.OperationBulkService(client);
|
|
145
|
+
this.options = {
|
|
146
|
+
security: new services_1.TenantSecurityOptionsService(client),
|
|
147
|
+
system: new services_1.SystemOptionsService(client),
|
|
148
|
+
login: new services_1.TenantLoginOptionsService(client),
|
|
149
|
+
tenant: new services_1.TenantOptionsService(client)
|
|
150
|
+
};
|
|
151
|
+
this.role = new services_1.InventoryRoleService(client);
|
|
152
|
+
this.tenant = new services_1.TenantService(client);
|
|
153
|
+
this.user = new services_1.UserService(client);
|
|
154
|
+
this.userGroup = new services_1.UserGroupService(client);
|
|
155
|
+
this.userRole = new services_1.UserRoleService(client);
|
|
156
|
+
this.identity = new services_1.IdentityService(client);
|
|
157
|
+
this.smartGroups = new services_1.SmartGroupsService(client);
|
|
158
|
+
this.smartRules = new services_1.SmartRulesService(client);
|
|
159
|
+
}
|
|
160
160
|
/**
|
|
161
161
|
* Allows to change the current Authentication
|
|
162
162
|
* @param auth The new Authentication information.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/Client.ts"],"names":[],"mappings":";;;AACA,yCAAsC;AACtC,yCA0BoB;AAUpB,MAAa,MAAM;
|
|
1
|
+
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/Client.ts"],"names":[],"mappings":";;;AACA,yCAAsC;AACtC,yCA0BoB;AAUpB,MAAa,MAAM;IACjB;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,WAAyB,EAAE,OAAgB;QACnE,MAAM,IAAI,GAAG,IAAI,oBAAS,CAAC,WAAW,CAAC,CAAC;QACxC,MAAM,UAAU,GAAG,IAAI,sBAAW,CAAC,IAAI,EAAE,OAA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YACxC,KAAK,EAAE,IAAI,oCAAyB,CAAC,MAAM,CAAC;YAC5C,MAAM,EAAE,IAAI,+BAAoB,CAAC,MAAM,CAAC;SACzC,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,+BAAoB,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,IAAI,wBAAa,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,sBAAW,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,2BAAgB,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,0BAAe,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,IAAI,0BAAe,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,6BAAkB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,UAAU,GAAG,IAAI,4BAAiB,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,IAAqB;QAC3B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC;CACF;AAnMD,wBAmMC"}
|
|
@@ -10,61 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Realtime } from './realtime';
|
|
11
11
|
import { FetchClient, BasicAuth, AlarmService, ApplicationService, AuditService, DeviceRegistrationBulkService, DeviceRegistrationService, EventService, InventoryBinaryService, InventoryRoleService, InventoryService, MeasurementService, OperationBulkService, OperationService, SystemOptionsService, TenantOptionsService, TenantSecurityOptionsService, TenantLoginOptionsService, TenantService, UserGroupService, UserRoleService, UserService, IdentityService, SmartGroupsService, SmartRulesService } from './services';
|
|
12
12
|
export class Client {
|
|
13
|
-
/**
|
|
14
|
-
* Initializes a new Client, which allows to request data from the API. Differently
|
|
15
|
-
* to Client.authenticate([...]) it needs a tenant given and does not verify if the
|
|
16
|
-
* login is correct.
|
|
17
|
-
*
|
|
18
|
-
* **Example**
|
|
19
|
-
* ```typescript
|
|
20
|
-
*
|
|
21
|
-
* const auth = new BasicAuth({
|
|
22
|
-
* user: 'youruser',
|
|
23
|
-
* password: 'yourpassword',
|
|
24
|
-
* tenant: 'acme'
|
|
25
|
-
* }); // use CookieAuth() if your platform uses oauth (only in browser!)
|
|
26
|
-
*
|
|
27
|
-
* const baseUrl = 'https://acme.cumulocity.com';
|
|
28
|
-
* const client = new Client(auth, baseUrl);
|
|
29
|
-
* (async () => {
|
|
30
|
-
* const { data, paging, res }); = await client.inventory.list({ pageSize: 100 });
|
|
31
|
-
* })();
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* @param auth The Authentication strategy to use (e.g. new BasicAuth())
|
|
35
|
-
* @param baseUrl The URL to request (optional in browser, mandatory in node)
|
|
36
|
-
*/
|
|
37
|
-
constructor(auth, baseUrl) {
|
|
38
|
-
const client = new FetchClient(auth, baseUrl);
|
|
39
|
-
this.realtime = new Realtime(client);
|
|
40
|
-
this.alarm = new AlarmService(client, this.realtime);
|
|
41
|
-
this.application = new ApplicationService(client, this.realtime);
|
|
42
|
-
this.audit = new AuditService(client);
|
|
43
|
-
this.core = client;
|
|
44
|
-
this.deviceRegistration = new DeviceRegistrationService(client);
|
|
45
|
-
this.deviceRegistrationBulk = new DeviceRegistrationBulkService(client);
|
|
46
|
-
this.event = new EventService(client, this.realtime);
|
|
47
|
-
this.inventory = new InventoryService(client, this.realtime);
|
|
48
|
-
this.inventoryBinary = new InventoryBinaryService(client);
|
|
49
|
-
this.inventoryRole = new InventoryRoleService(client);
|
|
50
|
-
this.measurement = new MeasurementService(client, this.realtime);
|
|
51
|
-
this.operation = new OperationService(client);
|
|
52
|
-
this.operationBulk = new OperationBulkService(client);
|
|
53
|
-
this.options = {
|
|
54
|
-
security: new TenantSecurityOptionsService(client),
|
|
55
|
-
system: new SystemOptionsService(client),
|
|
56
|
-
login: new TenantLoginOptionsService(client),
|
|
57
|
-
tenant: new TenantOptionsService(client)
|
|
58
|
-
};
|
|
59
|
-
this.role = new InventoryRoleService(client);
|
|
60
|
-
this.tenant = new TenantService(client);
|
|
61
|
-
this.user = new UserService(client);
|
|
62
|
-
this.userGroup = new UserGroupService(client);
|
|
63
|
-
this.userRole = new UserRoleService(client);
|
|
64
|
-
this.identity = new IdentityService(client);
|
|
65
|
-
this.smartGroups = new SmartGroupsService(client);
|
|
66
|
-
this.smartRules = new SmartRulesService(client);
|
|
67
|
-
}
|
|
68
13
|
/**
|
|
69
14
|
* Authenticates the given user. Determines the tenant by itself via a call to tenant/currentTenant.
|
|
70
15
|
*
|
|
@@ -169,6 +114,61 @@ export class Client {
|
|
|
169
114
|
});
|
|
170
115
|
});
|
|
171
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Initializes a new Client, which allows to request data from the API. Differently
|
|
119
|
+
* to Client.authenticate([...]) it needs a tenant given and does not verify if the
|
|
120
|
+
* login is correct.
|
|
121
|
+
*
|
|
122
|
+
* **Example**
|
|
123
|
+
* ```typescript
|
|
124
|
+
*
|
|
125
|
+
* const auth = new BasicAuth({
|
|
126
|
+
* user: 'youruser',
|
|
127
|
+
* password: 'yourpassword',
|
|
128
|
+
* tenant: 'acme'
|
|
129
|
+
* }); // use CookieAuth() if your platform uses oauth (only in browser!)
|
|
130
|
+
*
|
|
131
|
+
* const baseUrl = 'https://acme.cumulocity.com';
|
|
132
|
+
* const client = new Client(auth, baseUrl);
|
|
133
|
+
* (async () => {
|
|
134
|
+
* const { data, paging, res }); = await client.inventory.list({ pageSize: 100 });
|
|
135
|
+
* })();
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
138
|
+
* @param auth The Authentication strategy to use (e.g. new BasicAuth())
|
|
139
|
+
* @param baseUrl The URL to request (optional in browser, mandatory in node)
|
|
140
|
+
*/
|
|
141
|
+
constructor(auth, baseUrl) {
|
|
142
|
+
const client = new FetchClient(auth, baseUrl);
|
|
143
|
+
this.realtime = new Realtime(client);
|
|
144
|
+
this.alarm = new AlarmService(client, this.realtime);
|
|
145
|
+
this.application = new ApplicationService(client, this.realtime);
|
|
146
|
+
this.audit = new AuditService(client);
|
|
147
|
+
this.core = client;
|
|
148
|
+
this.deviceRegistration = new DeviceRegistrationService(client);
|
|
149
|
+
this.deviceRegistrationBulk = new DeviceRegistrationBulkService(client);
|
|
150
|
+
this.event = new EventService(client, this.realtime);
|
|
151
|
+
this.inventory = new InventoryService(client, this.realtime);
|
|
152
|
+
this.inventoryBinary = new InventoryBinaryService(client);
|
|
153
|
+
this.inventoryRole = new InventoryRoleService(client);
|
|
154
|
+
this.measurement = new MeasurementService(client, this.realtime);
|
|
155
|
+
this.operation = new OperationService(client);
|
|
156
|
+
this.operationBulk = new OperationBulkService(client);
|
|
157
|
+
this.options = {
|
|
158
|
+
security: new TenantSecurityOptionsService(client),
|
|
159
|
+
system: new SystemOptionsService(client),
|
|
160
|
+
login: new TenantLoginOptionsService(client),
|
|
161
|
+
tenant: new TenantOptionsService(client)
|
|
162
|
+
};
|
|
163
|
+
this.role = new InventoryRoleService(client);
|
|
164
|
+
this.tenant = new TenantService(client);
|
|
165
|
+
this.user = new UserService(client);
|
|
166
|
+
this.userGroup = new UserGroupService(client);
|
|
167
|
+
this.userRole = new UserRoleService(client);
|
|
168
|
+
this.identity = new IdentityService(client);
|
|
169
|
+
this.smartGroups = new SmartGroupsService(client);
|
|
170
|
+
this.smartRules = new SmartRulesService(client);
|
|
171
|
+
}
|
|
172
172
|
/**
|
|
173
173
|
* Allows to change the current Authentication
|
|
174
174
|
* @param auth The new Authentication information.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/Client.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,WAAW,EACX,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,6BAA6B,EAC7B,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,EACzB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAUpB,MAAM,OAAO,MAAM;
|
|
1
|
+
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/Client.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,WAAW,EACX,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,6BAA6B,EAC7B,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,EACzB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAUpB,MAAM,OAAO,MAAM;IACjB;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAO,YAAY,CAAC,WAAyB,EAAE,OAAgB;;YACnE,MAAM,IAAI,GAAG,IAAI,SAAS,CAAC,WAAW,CAAC,CAAC;YACxC,MAAM,UAAU,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAClD,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,uBAAuB,EAAE,E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,CAAC,MAAM,CAAC;SACzC,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,UAAU,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,IAAqB;QAC3B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -48,7 +48,7 @@ export interface IApplicationManagedObjectAdditions {
|
|
|
48
48
|
c8y_SupportedLogs?: string[];
|
|
49
49
|
[key: string]: any;
|
|
50
50
|
}
|
|
51
|
-
export
|
|
51
|
+
export type IApplicationManagedObject = IManagedObject & IApplicationManagedObjectAdditions;
|
|
52
52
|
export interface IApplicationInstanceLog {
|
|
53
53
|
dateFrom: string;
|
|
54
54
|
dateTo: string;
|
|
@@ -13,7 +13,7 @@ export declare enum ChildType {
|
|
|
13
13
|
/**
|
|
14
14
|
* IdReference is only a combined type of string | number | IIdentified
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type IdReference = string | number | IIdentified;
|
|
17
17
|
/**
|
|
18
18
|
* This class allows for managing managed objects and different child types, see [[ChildType]].
|
|
19
19
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c8y/client",
|
|
3
|
-
"version": "1018.
|
|
3
|
+
"version": "1018.158.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Cumulocity",
|
|
6
6
|
"description": "Client application programming interface to access the Cumulocity IoT-Platform REST services.",
|
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
"ts-jest": "^28.0.7",
|
|
60
60
|
"tslint": "^5.9.1",
|
|
61
61
|
"typedoc": "0.24.7",
|
|
62
|
-
"typescript": "4.
|
|
62
|
+
"typescript": "4.9.5"
|
|
63
63
|
}
|
|
64
64
|
}
|