@space-df/sdk 0.0.1-dev.38 → 0.0.1-dev.39
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/api.doc.md +37 -4
- package/dist/package.json +1 -1
- package/dist/resources/telemetry/geofences.d.ts +6 -12
- package/dist/resources/telemetry/geofences.d.ts.map +1 -1
- package/dist/resources/telemetry/geofences.js +8 -0
- package/dist/resources/telemetry/geofences.js.map +1 -1
- package/dist/resources/telemetry/geofences.mjs +8 -0
- package/dist/resources/telemetry/geofences.mjs.map +1 -1
- package/dist/src/resources/telemetry/geofences.ts +14 -15
- package/dist/src/version.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/src/resources/telemetry/geofences.ts +14 -15
- package/src/version.ts +1 -1
package/api.doc.md
CHANGED
|
@@ -3011,7 +3011,7 @@ await client.trip.delete('trip-uuid-456');
|
|
|
3011
3011
|
|
|
3012
3012
|
## Overview
|
|
3013
3013
|
|
|
3014
|
-
The `Telemetry` class provides methods for retrieving telemetry entities, alerts, and geofences. This class allows you to search and filter telemetry entities by display type and search terms, retrieve alerts, and manage geofences (list, create, retrieve, update, delete).
|
|
3014
|
+
The `Telemetry` class provides methods for retrieving telemetry entities, alerts, and geofences. This class allows you to search and filter telemetry entities by display type and search terms, retrieve alerts, and manage geofences (list, create, retrieve, update, delete, test).
|
|
3015
3015
|
|
|
3016
3016
|
## Methods
|
|
3017
3017
|
|
|
@@ -3180,7 +3180,7 @@ create(params: Omit<Geofence, 'id'>, options?: Core.RequestOptions): Core.APIPro
|
|
|
3180
3180
|
- `color` _(string)_: Display color for the geofence.
|
|
3181
3181
|
- `type_zone` _('safe' | 'danger')_: Zone type.
|
|
3182
3182
|
- `definition` _(object)_: Conditions (e.g. `conditions.and`).
|
|
3183
|
-
- `geometry` _(
|
|
3183
|
+
- `geometry` _(PolygonGeometry[])_: Polygon geometry for the geofence.
|
|
3184
3184
|
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
3185
3185
|
|
|
3186
3186
|
**Returns:** `Promise<Geofence>`
|
|
@@ -3193,7 +3193,7 @@ const newGeofence = await client.telemetry.geofences.create({
|
|
|
3193
3193
|
color: '#00ff00',
|
|
3194
3194
|
type_zone: 'safe',
|
|
3195
3195
|
definition: { conditions: { and: [] } },
|
|
3196
|
-
geometry: [/*
|
|
3196
|
+
geometry: [/* PolygonGeometry[] */],
|
|
3197
3197
|
});
|
|
3198
3198
|
console.log(newGeofence.id);
|
|
3199
3199
|
```
|
|
@@ -3254,7 +3254,40 @@ const updatedGeofence = await client.telemetry.geofences.update('123e4567-e89b-1
|
|
|
3254
3254
|
color: '#00ff00',
|
|
3255
3255
|
type_zone: 'safe',
|
|
3256
3256
|
definition: { conditions: { and: [] } },
|
|
3257
|
-
geometry: [/*
|
|
3257
|
+
geometry: [/* PolygonGeometry[] */],
|
|
3258
|
+
});
|
|
3259
|
+
```
|
|
3260
|
+
|
|
3261
|
+
</details>
|
|
3262
|
+
|
|
3263
|
+
<details>
|
|
3264
|
+
<summary><strong>geofences.test</strong></summary>
|
|
3265
|
+
|
|
3266
|
+
Validate a geofence payload (conditions/geometry) without creating or updating a saved geofence.
|
|
3267
|
+
|
|
3268
|
+
**Signature:**
|
|
3269
|
+
|
|
3270
|
+
```typescript
|
|
3271
|
+
test(params: Omit<Geofence, 'id' | 'name' | 'color'>, options?: Core.RequestOptions): Core.APIPromise<void>
|
|
3272
|
+
```
|
|
3273
|
+
|
|
3274
|
+
**Parameters:**
|
|
3275
|
+
|
|
3276
|
+
- `params` _(Omit<Geofence, 'id' | 'name' | 'color'>)_: Geofence data to test:
|
|
3277
|
+
- `type_zone` _('safe' | 'danger')_: Zone type.
|
|
3278
|
+
- `definition` _(object)_: Conditions (e.g. `conditions.and`).
|
|
3279
|
+
- `geometry` _(PolygonGeometry[])_: Polygon geometry for the geofence.
|
|
3280
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
3281
|
+
|
|
3282
|
+
**Returns:** `Promise<void>`
|
|
3283
|
+
|
|
3284
|
+
**Example:**
|
|
3285
|
+
|
|
3286
|
+
```typescript
|
|
3287
|
+
await client.telemetry.geofences.test({
|
|
3288
|
+
type_zone: 'safe',
|
|
3289
|
+
definition: { conditions: { and: [] } },
|
|
3290
|
+
geometry: [/* PolygonGeometry[] */],
|
|
3258
3291
|
});
|
|
3259
3292
|
```
|
|
3260
3293
|
|
package/dist/package.json
CHANGED
|
@@ -22,18 +22,11 @@ type Condition = {
|
|
|
22
22
|
type Coordinate = [number, number];
|
|
23
23
|
type PolygonGeometry = {
|
|
24
24
|
type: 'Polygon';
|
|
25
|
-
coordinates: Coordinate[][]
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
color: string;
|
|
25
|
+
coordinates: Coordinate[][];
|
|
26
|
+
properties: {
|
|
27
|
+
mode: 'rectangle' | 'angled-rectangle' | string;
|
|
28
|
+
};
|
|
30
29
|
};
|
|
31
|
-
interface Feature {
|
|
32
|
-
type: 'Feature';
|
|
33
|
-
geometry: PolygonGeometry;
|
|
34
|
-
properties: FeatureProperties;
|
|
35
|
-
id: string;
|
|
36
|
-
}
|
|
37
30
|
export interface Geofence {
|
|
38
31
|
id: string;
|
|
39
32
|
name: string;
|
|
@@ -44,7 +37,7 @@ export interface Geofence {
|
|
|
44
37
|
and: Condition[];
|
|
45
38
|
};
|
|
46
39
|
};
|
|
47
|
-
geometry:
|
|
40
|
+
geometry: PolygonGeometry[];
|
|
48
41
|
}
|
|
49
42
|
export type GeofencesListResponse = ListResponse<Geofence>;
|
|
50
43
|
export interface GeofencesListParams extends ListParamsResponse {
|
|
@@ -56,6 +49,7 @@ export declare class Geofences extends APIResource {
|
|
|
56
49
|
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Geofence>;
|
|
57
50
|
update(id: string, params: Omit<Geofence, 'id'>, options?: Core.RequestOptions): Core.APIPromise<Geofence>;
|
|
58
51
|
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
52
|
+
test(params: Omit<Geofence, 'id' | 'name' | 'color'>, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
59
53
|
}
|
|
60
54
|
export {};
|
|
61
55
|
//# sourceMappingURL=geofences.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geofences.d.ts","sourceRoot":"","sources":["../../src/resources/telemetry/geofences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnE,KAAK,SAAS,GACR;IAAE,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAChD;IAAE,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,GACxB;IAAE,yBAAyB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC9C;IAAE,GAAG,EAAE,SAAS,EAAE,CAAA;CAAE,GACpB;IAAE,EAAE,EAAE,SAAS,EAAE,CAAA;CAAE,GACnB;IAAE,GAAG,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC;AAE3B,KAAK,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnC,KAAK,eAAe,GAAG;IACnB,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,UAAU,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"geofences.d.ts","sourceRoot":"","sources":["../../src/resources/telemetry/geofences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,YAAY,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AAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQxG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;IAS9F,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;IAO9E,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;IAS1G,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAOxE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;CAQ9G"}
|
|
@@ -39,6 +39,14 @@ class Geofences extends resource_1.APIResource {
|
|
|
39
39
|
headers: { ...options?.headers },
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
+
test(params, options) {
|
|
43
|
+
const { ...body } = params;
|
|
44
|
+
return this._client.post(`/telemetry/v1/geofences/test`, {
|
|
45
|
+
body,
|
|
46
|
+
...options,
|
|
47
|
+
headers: { ...options?.headers },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
42
50
|
}
|
|
43
51
|
exports.Geofences = Geofences;
|
|
44
52
|
//# sourceMappingURL=geofences.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geofences.js","sourceRoot":"","sources":["../../src/resources/telemetry/geofences.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;
|
|
1
|
+
{"version":3,"file":"geofences.js","sourceRoot":"","sources":["../../src/resources/telemetry/geofences.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;AAwC7C,MAAa,SAAU,SAAQ,sBAAW;IACtC,IAAI,CAAC,MAA2B,EAAE,OAA6B;QAC3D,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE;YAC/C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;IACD,MAAM,CAAC,MAA4B,EAAE,OAA6B;QAC9D,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE;YAChD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,EAAE;YACrD,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,MAA4B,EAAE,OAA6B;QAC1E,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE,EAAE,EAAE;YACxD,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,CAAC,MAA+C,EAAE,OAA6B;QAC/E,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ;AAjDD,8BAiDC"}
|
|
@@ -36,5 +36,13 @@ export class Geofences extends APIResource {
|
|
|
36
36
|
headers: { ...options?.headers },
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
+
test(params, options) {
|
|
40
|
+
const { ...body } = params;
|
|
41
|
+
return this._client.post(`/telemetry/v1/geofences/test`, {
|
|
42
|
+
body,
|
|
43
|
+
...options,
|
|
44
|
+
headers: { ...options?.headers },
|
|
45
|
+
});
|
|
46
|
+
}
|
|
39
47
|
}
|
|
40
48
|
//# sourceMappingURL=geofences.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geofences.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/geofences.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"geofences.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/geofences.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;AAwCtB,MAAM,OAAO,SAAU,SAAQ,WAAW;IACtC,IAAI,CAAC,MAA2B,EAAE,OAA6B;QAC3D,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO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AM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -14,21 +14,12 @@ type Coordinate = [number, number];
|
|
|
14
14
|
|
|
15
15
|
type PolygonGeometry = {
|
|
16
16
|
type: 'Polygon';
|
|
17
|
-
coordinates: Coordinate[][]
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
mode: 'rectangle' | 'angled-rectangle' | string;
|
|
22
|
-
color: string;
|
|
17
|
+
coordinates: Coordinate[][];
|
|
18
|
+
properties: {
|
|
19
|
+
mode: 'rectangle' | 'angled-rectangle' | string;
|
|
20
|
+
};
|
|
23
21
|
};
|
|
24
22
|
|
|
25
|
-
interface Feature {
|
|
26
|
-
type: 'Feature';
|
|
27
|
-
geometry: PolygonGeometry;
|
|
28
|
-
properties: FeatureProperties;
|
|
29
|
-
id: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
23
|
export interface Geofence {
|
|
33
24
|
id: string;
|
|
34
25
|
name: string;
|
|
@@ -39,7 +30,7 @@ export interface Geofence {
|
|
|
39
30
|
and: Condition[];
|
|
40
31
|
};
|
|
41
32
|
};
|
|
42
|
-
geometry:
|
|
33
|
+
geometry: PolygonGeometry[];
|
|
43
34
|
}
|
|
44
35
|
|
|
45
36
|
export type GeofencesListResponse = ListResponse<Geofence>;
|
|
@@ -47,7 +38,6 @@ export type GeofencesListResponse = ListResponse<Geofence>;
|
|
|
47
38
|
export interface GeofencesListParams extends ListParamsResponse {
|
|
48
39
|
name?: string;
|
|
49
40
|
}
|
|
50
|
-
|
|
51
41
|
export class Geofences extends APIResource {
|
|
52
42
|
list(params: GeofencesListParams, options?: Core.RequestOptions): Core.APIPromise<GeofencesListResponse> {
|
|
53
43
|
const { ...query } = params;
|
|
@@ -88,4 +78,13 @@ export class Geofences extends APIResource {
|
|
|
88
78
|
headers: { ...options?.headers },
|
|
89
79
|
});
|
|
90
80
|
}
|
|
81
|
+
|
|
82
|
+
test(params: Omit<Geofence, 'id' | 'name' | 'color'>, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
83
|
+
const { ...body } = params;
|
|
84
|
+
return this._client.post(`/telemetry/v1/geofences/test`, {
|
|
85
|
+
body,
|
|
86
|
+
...options,
|
|
87
|
+
headers: { ...options?.headers },
|
|
88
|
+
});
|
|
89
|
+
}
|
|
91
90
|
}
|
package/dist/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.1-dev.
|
|
1
|
+
export const VERSION = '0.0.1-dev.39';
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.1-dev.
|
|
1
|
+
export declare const VERSION = "0.0.1-dev.39";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
package/dist/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.0.1-dev.
|
|
1
|
+
export const VERSION = '0.0.1-dev.39';
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
|
@@ -14,21 +14,12 @@ type Coordinate = [number, number];
|
|
|
14
14
|
|
|
15
15
|
type PolygonGeometry = {
|
|
16
16
|
type: 'Polygon';
|
|
17
|
-
coordinates: Coordinate[][]
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
mode: 'rectangle' | 'angled-rectangle' | string;
|
|
22
|
-
color: string;
|
|
17
|
+
coordinates: Coordinate[][];
|
|
18
|
+
properties: {
|
|
19
|
+
mode: 'rectangle' | 'angled-rectangle' | string;
|
|
20
|
+
};
|
|
23
21
|
};
|
|
24
22
|
|
|
25
|
-
interface Feature {
|
|
26
|
-
type: 'Feature';
|
|
27
|
-
geometry: PolygonGeometry;
|
|
28
|
-
properties: FeatureProperties;
|
|
29
|
-
id: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
23
|
export interface Geofence {
|
|
33
24
|
id: string;
|
|
34
25
|
name: string;
|
|
@@ -39,7 +30,7 @@ export interface Geofence {
|
|
|
39
30
|
and: Condition[];
|
|
40
31
|
};
|
|
41
32
|
};
|
|
42
|
-
geometry:
|
|
33
|
+
geometry: PolygonGeometry[];
|
|
43
34
|
}
|
|
44
35
|
|
|
45
36
|
export type GeofencesListResponse = ListResponse<Geofence>;
|
|
@@ -47,7 +38,6 @@ export type GeofencesListResponse = ListResponse<Geofence>;
|
|
|
47
38
|
export interface GeofencesListParams extends ListParamsResponse {
|
|
48
39
|
name?: string;
|
|
49
40
|
}
|
|
50
|
-
|
|
51
41
|
export class Geofences extends APIResource {
|
|
52
42
|
list(params: GeofencesListParams, options?: Core.RequestOptions): Core.APIPromise<GeofencesListResponse> {
|
|
53
43
|
const { ...query } = params;
|
|
@@ -88,4 +78,13 @@ export class Geofences extends APIResource {
|
|
|
88
78
|
headers: { ...options?.headers },
|
|
89
79
|
});
|
|
90
80
|
}
|
|
81
|
+
|
|
82
|
+
test(params: Omit<Geofence, 'id' | 'name' | 'color'>, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
83
|
+
const { ...body } = params;
|
|
84
|
+
return this._client.post(`/telemetry/v1/geofences/test`, {
|
|
85
|
+
body,
|
|
86
|
+
...options,
|
|
87
|
+
headers: { ...options?.headers },
|
|
88
|
+
});
|
|
89
|
+
}
|
|
91
90
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.1-dev.
|
|
1
|
+
export const VERSION = '0.0.1-dev.39';
|