@chrt-inc/typescript-sdk 1.254.0 → 1.258.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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +3 -5
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +12 -9
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesGetRequest.d.ts +3 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +3 -5
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +12 -9
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesGetRequest.d.mts +3 -4
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +2 -4
package/dist/cjs/Client.js
CHANGED
|
@@ -68,8 +68,8 @@ class ChrtClient {
|
|
|
68
68
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
69
69
|
"X-Fern-Language": "JavaScript",
|
|
70
70
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
71
|
-
"X-Fern-SDK-Version": "1.
|
|
72
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
71
|
+
"X-Fern-SDK-Version": "1.258.0",
|
|
72
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.258.0",
|
|
73
73
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
74
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
75
75
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -44,7 +44,7 @@ export declare class Devices {
|
|
|
44
44
|
registerToOrg(request: Chrt.tracking.DevicesRegisterToOrgRequest, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<string>;
|
|
45
45
|
private __registerToOrg;
|
|
46
46
|
/**
|
|
47
|
-
* Get a device by device_mac_address.
|
|
47
|
+
* Get a device by device_mac_address or device_id.
|
|
48
48
|
*
|
|
49
49
|
* @param {Chrt.tracking.DevicesGetRequest} request
|
|
50
50
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -52,11 +52,9 @@ export declare class Devices {
|
|
|
52
52
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
|
-
* await client.tracking.devices.get(
|
|
56
|
-
* device_mac_address: "device_mac_address"
|
|
57
|
-
* })
|
|
55
|
+
* await client.tracking.devices.get()
|
|
58
56
|
*/
|
|
59
|
-
get(request
|
|
57
|
+
get(request?: Chrt.tracking.DevicesGetRequest, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<Chrt.Device1>;
|
|
60
58
|
private __get;
|
|
61
59
|
/**
|
|
62
60
|
* List all devices registered to the caller's org.
|
|
@@ -119,7 +119,7 @@ class Devices {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
-
* Get a device by device_mac_address.
|
|
122
|
+
* Get a device by device_mac_address or device_id.
|
|
123
123
|
*
|
|
124
124
|
* @param {Chrt.tracking.DevicesGetRequest} request
|
|
125
125
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -127,19 +127,22 @@ class Devices {
|
|
|
127
127
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
128
128
|
*
|
|
129
129
|
* @example
|
|
130
|
-
* await client.tracking.devices.get(
|
|
131
|
-
* device_mac_address: "device_mac_address"
|
|
132
|
-
* })
|
|
130
|
+
* await client.tracking.devices.get()
|
|
133
131
|
*/
|
|
134
|
-
get(request, requestOptions) {
|
|
132
|
+
get(request = {}, requestOptions) {
|
|
135
133
|
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
136
134
|
}
|
|
137
|
-
__get(
|
|
138
|
-
return __awaiter(this,
|
|
135
|
+
__get() {
|
|
136
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
139
137
|
var _a, _b, _c, _d;
|
|
140
|
-
const { device_mac_address: deviceMacAddress } = request;
|
|
138
|
+
const { device_mac_address: deviceMacAddress, device_id: deviceId } = request;
|
|
141
139
|
const _queryParams = {};
|
|
142
|
-
|
|
140
|
+
if (deviceMacAddress !== undefined) {
|
|
141
|
+
_queryParams["device_mac_address"] = deviceMacAddress;
|
|
142
|
+
}
|
|
143
|
+
if (deviceId !== undefined) {
|
|
144
|
+
_queryParams["device_id"] = deviceId;
|
|
145
|
+
}
|
|
143
146
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
144
147
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "tracking/devices"),
|
|
145
148
|
method: "GET",
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.258.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -32,8 +32,8 @@ export class ChrtClient {
|
|
|
32
32
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
33
33
|
"X-Fern-Language": "JavaScript",
|
|
34
34
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
35
|
-
"X-Fern-SDK-Version": "1.
|
|
36
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
35
|
+
"X-Fern-SDK-Version": "1.258.0",
|
|
36
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.258.0",
|
|
37
37
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
38
38
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
39
39
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -44,7 +44,7 @@ export declare class Devices {
|
|
|
44
44
|
registerToOrg(request: Chrt.tracking.DevicesRegisterToOrgRequest, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<string>;
|
|
45
45
|
private __registerToOrg;
|
|
46
46
|
/**
|
|
47
|
-
* Get a device by device_mac_address.
|
|
47
|
+
* Get a device by device_mac_address or device_id.
|
|
48
48
|
*
|
|
49
49
|
* @param {Chrt.tracking.DevicesGetRequest} request
|
|
50
50
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -52,11 +52,9 @@ export declare class Devices {
|
|
|
52
52
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
|
-
* await client.tracking.devices.get(
|
|
56
|
-
* device_mac_address: "device_mac_address"
|
|
57
|
-
* })
|
|
55
|
+
* await client.tracking.devices.get()
|
|
58
56
|
*/
|
|
59
|
-
get(request
|
|
57
|
+
get(request?: Chrt.tracking.DevicesGetRequest, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<Chrt.Device1>;
|
|
60
58
|
private __get;
|
|
61
59
|
/**
|
|
62
60
|
* List all devices registered to the caller's org.
|
|
@@ -83,7 +83,7 @@ export class Devices {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
|
-
* Get a device by device_mac_address.
|
|
86
|
+
* Get a device by device_mac_address or device_id.
|
|
87
87
|
*
|
|
88
88
|
* @param {Chrt.tracking.DevicesGetRequest} request
|
|
89
89
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -91,19 +91,22 @@ export class Devices {
|
|
|
91
91
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
94
|
-
* await client.tracking.devices.get(
|
|
95
|
-
* device_mac_address: "device_mac_address"
|
|
96
|
-
* })
|
|
94
|
+
* await client.tracking.devices.get()
|
|
97
95
|
*/
|
|
98
|
-
get(request, requestOptions) {
|
|
96
|
+
get(request = {}, requestOptions) {
|
|
99
97
|
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
100
98
|
}
|
|
101
|
-
__get(
|
|
102
|
-
return __awaiter(this,
|
|
99
|
+
__get() {
|
|
100
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
103
101
|
var _a, _b, _c, _d;
|
|
104
|
-
const { device_mac_address: deviceMacAddress } = request;
|
|
102
|
+
const { device_mac_address: deviceMacAddress, device_id: deviceId } = request;
|
|
105
103
|
const _queryParams = {};
|
|
106
|
-
|
|
104
|
+
if (deviceMacAddress !== undefined) {
|
|
105
|
+
_queryParams["device_mac_address"] = deviceMacAddress;
|
|
106
|
+
}
|
|
107
|
+
if (deviceId !== undefined) {
|
|
108
|
+
_queryParams["device_id"] = deviceId;
|
|
109
|
+
}
|
|
107
110
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
108
111
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "tracking/devices"),
|
|
109
112
|
method: "GET",
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.258.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.258.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -8460,7 +8460,7 @@ await client.tracking.devices.registerToOrg({
|
|
|
8460
8460
|
<dl>
|
|
8461
8461
|
<dd>
|
|
8462
8462
|
|
|
8463
|
-
Get a device by device_mac_address.
|
|
8463
|
+
Get a device by device_mac_address or device_id.
|
|
8464
8464
|
|
|
8465
8465
|
</dd>
|
|
8466
8466
|
</dl>
|
|
@@ -8476,9 +8476,7 @@ Get a device by device_mac_address.
|
|
|
8476
8476
|
<dd>
|
|
8477
8477
|
|
|
8478
8478
|
```typescript
|
|
8479
|
-
await client.tracking.devices.get(
|
|
8480
|
-
device_mac_address: "device_mac_address",
|
|
8481
|
-
});
|
|
8479
|
+
await client.tracking.devices.get();
|
|
8482
8480
|
```
|
|
8483
8481
|
|
|
8484
8482
|
</dd>
|