@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
|
@@ -11068,61 +11068,6 @@
|
|
|
11068
11068
|
});
|
|
11069
11069
|
};
|
|
11070
11070
|
class Client {
|
|
11071
|
-
/**
|
|
11072
|
-
* Initializes a new Client, which allows to request data from the API. Differently
|
|
11073
|
-
* to Client.authenticate([...]) it needs a tenant given and does not verify if the
|
|
11074
|
-
* login is correct.
|
|
11075
|
-
*
|
|
11076
|
-
* **Example**
|
|
11077
|
-
* ```typescript
|
|
11078
|
-
*
|
|
11079
|
-
* const auth = new BasicAuth({
|
|
11080
|
-
* user: 'youruser',
|
|
11081
|
-
* password: 'yourpassword',
|
|
11082
|
-
* tenant: 'acme'
|
|
11083
|
-
* }); // use CookieAuth() if your platform uses oauth (only in browser!)
|
|
11084
|
-
*
|
|
11085
|
-
* const baseUrl = 'https://acme.cumulocity.com';
|
|
11086
|
-
* const client = new Client(auth, baseUrl);
|
|
11087
|
-
* (async () => {
|
|
11088
|
-
* const { data, paging, res }); = await client.inventory.list({ pageSize: 100 });
|
|
11089
|
-
* })();
|
|
11090
|
-
* ```
|
|
11091
|
-
*
|
|
11092
|
-
* @param auth The Authentication strategy to use (e.g. new BasicAuth())
|
|
11093
|
-
* @param baseUrl The URL to request (optional in browser, mandatory in node)
|
|
11094
|
-
*/
|
|
11095
|
-
constructor(auth, baseUrl) {
|
|
11096
|
-
const client = new FetchClient(auth, baseUrl);
|
|
11097
|
-
this.realtime = new Realtime(client);
|
|
11098
|
-
this.alarm = new AlarmService(client, this.realtime);
|
|
11099
|
-
this.application = new ApplicationService(client, this.realtime);
|
|
11100
|
-
this.audit = new AuditService(client);
|
|
11101
|
-
this.core = client;
|
|
11102
|
-
this.deviceRegistration = new DeviceRegistrationService(client);
|
|
11103
|
-
this.deviceRegistrationBulk = new DeviceRegistrationBulkService(client);
|
|
11104
|
-
this.event = new EventService(client, this.realtime);
|
|
11105
|
-
this.inventory = new InventoryService(client, this.realtime);
|
|
11106
|
-
this.inventoryBinary = new InventoryBinaryService(client);
|
|
11107
|
-
this.inventoryRole = new InventoryRoleService(client);
|
|
11108
|
-
this.measurement = new MeasurementService(client, this.realtime);
|
|
11109
|
-
this.operation = new OperationService(client);
|
|
11110
|
-
this.operationBulk = new OperationBulkService(client);
|
|
11111
|
-
this.options = {
|
|
11112
|
-
security: new TenantSecurityOptionsService(client),
|
|
11113
|
-
system: new SystemOptionsService(client),
|
|
11114
|
-
login: new TenantLoginOptionsService(client),
|
|
11115
|
-
tenant: new TenantOptionsService(client)
|
|
11116
|
-
};
|
|
11117
|
-
this.role = new InventoryRoleService(client);
|
|
11118
|
-
this.tenant = new TenantService(client);
|
|
11119
|
-
this.user = new UserService(client);
|
|
11120
|
-
this.userGroup = new UserGroupService(client);
|
|
11121
|
-
this.userRole = new UserRoleService(client);
|
|
11122
|
-
this.identity = new IdentityService(client);
|
|
11123
|
-
this.smartGroups = new SmartGroupsService(client);
|
|
11124
|
-
this.smartRules = new SmartRulesService(client);
|
|
11125
|
-
}
|
|
11126
11071
|
/**
|
|
11127
11072
|
* Authenticates the given user. Determines the tenant by itself via a call to tenant/currentTenant.
|
|
11128
11073
|
*
|
|
@@ -11227,6 +11172,61 @@
|
|
|
11227
11172
|
});
|
|
11228
11173
|
});
|
|
11229
11174
|
}
|
|
11175
|
+
/**
|
|
11176
|
+
* Initializes a new Client, which allows to request data from the API. Differently
|
|
11177
|
+
* to Client.authenticate([...]) it needs a tenant given and does not verify if the
|
|
11178
|
+
* login is correct.
|
|
11179
|
+
*
|
|
11180
|
+
* **Example**
|
|
11181
|
+
* ```typescript
|
|
11182
|
+
*
|
|
11183
|
+
* const auth = new BasicAuth({
|
|
11184
|
+
* user: 'youruser',
|
|
11185
|
+
* password: 'yourpassword',
|
|
11186
|
+
* tenant: 'acme'
|
|
11187
|
+
* }); // use CookieAuth() if your platform uses oauth (only in browser!)
|
|
11188
|
+
*
|
|
11189
|
+
* const baseUrl = 'https://acme.cumulocity.com';
|
|
11190
|
+
* const client = new Client(auth, baseUrl);
|
|
11191
|
+
* (async () => {
|
|
11192
|
+
* const { data, paging, res }); = await client.inventory.list({ pageSize: 100 });
|
|
11193
|
+
* })();
|
|
11194
|
+
* ```
|
|
11195
|
+
*
|
|
11196
|
+
* @param auth The Authentication strategy to use (e.g. new BasicAuth())
|
|
11197
|
+
* @param baseUrl The URL to request (optional in browser, mandatory in node)
|
|
11198
|
+
*/
|
|
11199
|
+
constructor(auth, baseUrl) {
|
|
11200
|
+
const client = new FetchClient(auth, baseUrl);
|
|
11201
|
+
this.realtime = new Realtime(client);
|
|
11202
|
+
this.alarm = new AlarmService(client, this.realtime);
|
|
11203
|
+
this.application = new ApplicationService(client, this.realtime);
|
|
11204
|
+
this.audit = new AuditService(client);
|
|
11205
|
+
this.core = client;
|
|
11206
|
+
this.deviceRegistration = new DeviceRegistrationService(client);
|
|
11207
|
+
this.deviceRegistrationBulk = new DeviceRegistrationBulkService(client);
|
|
11208
|
+
this.event = new EventService(client, this.realtime);
|
|
11209
|
+
this.inventory = new InventoryService(client, this.realtime);
|
|
11210
|
+
this.inventoryBinary = new InventoryBinaryService(client);
|
|
11211
|
+
this.inventoryRole = new InventoryRoleService(client);
|
|
11212
|
+
this.measurement = new MeasurementService(client, this.realtime);
|
|
11213
|
+
this.operation = new OperationService(client);
|
|
11214
|
+
this.operationBulk = new OperationBulkService(client);
|
|
11215
|
+
this.options = {
|
|
11216
|
+
security: new TenantSecurityOptionsService(client),
|
|
11217
|
+
system: new SystemOptionsService(client),
|
|
11218
|
+
login: new TenantLoginOptionsService(client),
|
|
11219
|
+
tenant: new TenantOptionsService(client)
|
|
11220
|
+
};
|
|
11221
|
+
this.role = new InventoryRoleService(client);
|
|
11222
|
+
this.tenant = new TenantService(client);
|
|
11223
|
+
this.user = new UserService(client);
|
|
11224
|
+
this.userGroup = new UserGroupService(client);
|
|
11225
|
+
this.userRole = new UserRoleService(client);
|
|
11226
|
+
this.identity = new IdentityService(client);
|
|
11227
|
+
this.smartGroups = new SmartGroupsService(client);
|
|
11228
|
+
this.smartRules = new SmartRulesService(client);
|
|
11229
|
+
}
|
|
11230
11230
|
/**
|
|
11231
11231
|
* Allows to change the current Authentication
|
|
11232
11232
|
* @param auth The new Authentication information.
|