@space-df/sdk 0.0.1-dev.15 → 0.0.1-dev.17
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 +658 -331
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/resources/device/device-spaces.d.ts +15 -0
- package/dist/resources/device/device-spaces.d.ts.map +1 -0
- package/dist/resources/device/device-spaces.js +30 -0
- package/dist/resources/device/device-spaces.js.map +1 -0
- package/dist/resources/device/device-spaces.mjs +26 -0
- package/dist/resources/device/device-spaces.mjs.map +1 -0
- package/dist/resources/device/index.d.ts +2 -0
- package/dist/resources/device/index.d.ts.map +1 -1
- package/dist/resources/device/index.js +2 -0
- package/dist/resources/device/index.js.map +1 -1
- package/dist/resources/device/index.mjs +2 -0
- package/dist/resources/device/trip.d.ts +24 -0
- package/dist/resources/device/trip.d.ts.map +1 -0
- package/dist/resources/device/trip.js +49 -0
- package/dist/resources/device/trip.js.map +1 -0
- package/dist/resources/device/trip.mjs +45 -0
- package/dist/resources/device/trip.mjs.map +1 -0
- package/dist/src/index.ts +2 -0
- package/dist/src/resources/device/device-spaces.ts +38 -0
- package/dist/src/resources/device/index.ts +2 -0
- package/dist/src/resources/device/trip.ts +64 -0
- 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/index.ts +2 -0
- package/src/resources/device/device-spaces.ts +38 -0
- package/src/resources/device/index.ts +2 -0
- package/src/resources/device/trip.ts +64 -0
- package/src/version.ts +1 -1
package/api.doc.md
CHANGED
|
@@ -9,16 +9,18 @@
|
|
|
9
9
|
|
|
10
10
|
# Table of Contents
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
12
|
+
- [Auth](#Auth)
|
|
13
|
+
- [Credentials](#credentials)
|
|
14
|
+
- [Space Policies](#space-policies)
|
|
15
|
+
- [Space Role Users](#space-role-users)
|
|
16
|
+
- [Space Roles](#space-roles)
|
|
17
|
+
- [Spaces](#spaces)
|
|
18
|
+
- [Oauth2](#oauth2)
|
|
19
|
+
- [Dashboards](#dashboards)
|
|
20
|
+
- [Device States](#deviceStates)
|
|
21
|
+
- [Device Spaces](#device-spaces)
|
|
22
|
+
- [Users](#users)
|
|
23
|
+
- [Trip](#trip)
|
|
22
24
|
|
|
23
25
|
# Auth
|
|
24
26
|
|
|
@@ -41,10 +43,10 @@ login(body: AuthLoginParams, options?: Core.RequestOptions): Core.APIPromise<Tok
|
|
|
41
43
|
|
|
42
44
|
**Parameters:**
|
|
43
45
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
46
|
+
- `body` _(AuthLoginParams)_: Object containing user credentials.
|
|
47
|
+
- `email` _(string)_: User's email address.
|
|
48
|
+
- `password` _(string)_: User's password.
|
|
49
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
48
50
|
|
|
49
51
|
**Returns:** `Promise<TokenPair>`
|
|
50
52
|
|
|
@@ -72,9 +74,9 @@ oauth2Google(body: AuthOauth2GoogleParams, options?: Core.RequestOptions): Core.
|
|
|
72
74
|
|
|
73
75
|
**Parameters:**
|
|
74
76
|
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
77
|
+
- `body` _(AuthOauth2GoogleParams)_: Object containing OAuth2 parameters.
|
|
78
|
+
- `authorization_code` _(string)_: The authorization code obtained from Google.
|
|
79
|
+
- `code_verifier` _(string)_: The code verifier for PKCE.
|
|
78
80
|
|
|
79
81
|
**Returns:** `Promise<OAuthLogin>`
|
|
80
82
|
|
|
@@ -102,8 +104,8 @@ googleLogin(body: GoogleLogin, options?: Core.RequestOptions): Core.APIPromise<A
|
|
|
102
104
|
|
|
103
105
|
**Parameters:**
|
|
104
106
|
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
+
- `body` _(GoogleLogin)_: Object containing the Google authorization code.
|
|
108
|
+
- `authorization_code` _(string)_: The authorization code received from Google OAuth2.
|
|
107
109
|
|
|
108
110
|
**Returns:** `Promise<AuthTokenPair>`
|
|
109
111
|
|
|
@@ -130,9 +132,9 @@ oauthSendOtp(body: OAuthSendOtp, options?: Core.RequestOptions): Core.APIPromise
|
|
|
130
132
|
|
|
131
133
|
**Parameters:**
|
|
132
134
|
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
135
|
+
- `body` _(OAuthSendOtp)_: Object containing user email.
|
|
136
|
+
- `email` _(string)_: The email address to send the OTP to.
|
|
137
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
136
138
|
|
|
137
139
|
**Returns:** `Promise<OAuthSendOtp>`
|
|
138
140
|
|
|
@@ -159,10 +161,10 @@ forgetPassword(body: ForgetPasswordParams, options?: Core.RequestOptions): Core.
|
|
|
159
161
|
|
|
160
162
|
**Parameters:**
|
|
161
163
|
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
164
|
+
- `body` _(ForgetPasswordParams)_: Object containing user credentials.
|
|
165
|
+
- `token` _(string)_: The token associated with the user's account.
|
|
166
|
+
- `password` _(string)_: The new password to set for the account.
|
|
167
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
166
168
|
|
|
167
169
|
**Returns:** `Promise<ForgetPasswordParams>`
|
|
168
170
|
|
|
@@ -190,9 +192,9 @@ sendEmailConfirm(body: OAuthSendEmail, options?: Core.RequestOptions): Core.APIP
|
|
|
190
192
|
|
|
191
193
|
**Parameters:**
|
|
192
194
|
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
195
|
+
- `body` _(OAuthSendEmail)_: Object containing user email.
|
|
196
|
+
- `email` _(string)_: The email address to send the confirmation link to.
|
|
197
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
196
198
|
|
|
197
199
|
**Returns:** `Promise<OAuthSendEmail>`
|
|
198
200
|
|
|
@@ -219,8 +221,8 @@ refreshToken(body: AuthRefreshTokenParams, options?: Core.RequestOptions): Core.
|
|
|
219
221
|
|
|
220
222
|
**Parameters:**
|
|
221
223
|
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
+
- `body` _(AuthRefreshTokenParams)_: Object containing the refresh token.
|
|
225
|
+
- `refresh` _(string)_: Refresh token.
|
|
224
226
|
|
|
225
227
|
**Returns:** `Promise<CustomTokenRefresh>`
|
|
226
228
|
|
|
@@ -248,12 +250,12 @@ register(body: AuthRegisterParams, options?: Core.RequestOptions): Core.APIPromi
|
|
|
248
250
|
|
|
249
251
|
**Parameters:**
|
|
250
252
|
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
256
|
-
-
|
|
253
|
+
- `body` _(AuthRegisterParams)_: Object containing user registration details.
|
|
254
|
+
- `email` _(string)_: User's email address.
|
|
255
|
+
- `password` _(string)_: User's chosen password.
|
|
256
|
+
- `first_name` _(string)_: User's first name (optional).
|
|
257
|
+
- `last_name` _(string)_: User's last name (optional).
|
|
258
|
+
- `otp` _(string)_: User's OTP code (optional).
|
|
257
259
|
|
|
258
260
|
**Returns:** `Promise<Registration>`
|
|
259
261
|
|
|
@@ -283,11 +285,11 @@ oauth2SpaceDF(body: OAuthSpaceDF, options?: Core.RequestOptions): Core.APIPromis
|
|
|
283
285
|
|
|
284
286
|
**Parameters:**
|
|
285
287
|
|
|
286
|
-
-
|
|
287
|
-
-
|
|
288
|
-
-
|
|
289
|
-
-
|
|
290
|
-
-
|
|
288
|
+
- `body` _(OAuthSpaceDF)_: Object containing OAuth2 parameters.
|
|
289
|
+
- `code_verifier` _(string)_: The code verifier for PKCE.
|
|
290
|
+
- `code` _(string)_: The authorization code obtained from SpaceDF Console.
|
|
291
|
+
- `client_id` _(string)_: The client ID of the application.
|
|
292
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
291
293
|
|
|
292
294
|
**Returns:** `Promise<OAuthSpaceDF>`
|
|
293
295
|
|
|
@@ -316,10 +318,10 @@ switchSpaces(body: AuthRefreshTokenParams, options?: Core.RequestOptions): Core.
|
|
|
316
318
|
|
|
317
319
|
**Parameters:**
|
|
318
320
|
|
|
319
|
-
-
|
|
320
|
-
-
|
|
321
|
-
-
|
|
322
|
-
-
|
|
321
|
+
- `body` _(AuthRefreshTokenParams)_: Object containing the refresh token and target space.
|
|
322
|
+
- `refresh` _(string)_: Refresh token.
|
|
323
|
+
- `space` _(string)_: Target space to switch to.
|
|
324
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
323
325
|
|
|
324
326
|
**Returns:** `Promise<CustomTokenRefresh>`
|
|
325
327
|
|
|
@@ -357,8 +359,8 @@ retrieve(id: number, options?: Core.RequestOptions): Core.APIPromise<SpacePolicy
|
|
|
357
359
|
|
|
358
360
|
**Parameters:**
|
|
359
361
|
|
|
360
|
-
-
|
|
361
|
-
-
|
|
362
|
+
- `id` _(number)_: The ID of the space policy to retrieve.
|
|
363
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
362
364
|
|
|
363
365
|
**Returns:** `Promise<SpacePolicy>`
|
|
364
366
|
|
|
@@ -385,9 +387,9 @@ list(spaceName: string, query: SpacePolicyListParams | Core.RequestOptions = {},
|
|
|
385
387
|
|
|
386
388
|
**Parameters:**
|
|
387
389
|
|
|
388
|
-
-
|
|
389
|
-
-
|
|
390
|
-
-
|
|
390
|
+
- `spaceName` _string_: The space slug name.
|
|
391
|
+
- `query` _(SpacePolicyListParams)_: (optional) Filters to apply when listing policies.
|
|
392
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
391
393
|
|
|
392
394
|
**Returns:** `Promise<SpacePolicyListResponse>`
|
|
393
395
|
|
|
@@ -422,10 +424,10 @@ retrieve(id: number, params: SpaceRoleUsersParams, options?: Core.RequestOptions
|
|
|
422
424
|
|
|
423
425
|
**Parameters:**
|
|
424
426
|
|
|
425
|
-
-
|
|
426
|
-
-
|
|
427
|
-
-
|
|
428
|
-
-
|
|
427
|
+
- `id` _(number)_: The ID of the space role user to retrieve.
|
|
428
|
+
- `params` _(SpaceRoleUsersParams)_: Parameters containing the space slug.
|
|
429
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
430
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
429
431
|
|
|
430
432
|
**Returns:** `Promise<SpaceRoleUser>`
|
|
431
433
|
|
|
@@ -450,9 +452,9 @@ list(spaceName: string, params: ListParamsResponse, options?: Core.RequestOption
|
|
|
450
452
|
|
|
451
453
|
**Parameters:**
|
|
452
454
|
|
|
453
|
-
-
|
|
454
|
-
-
|
|
455
|
-
-
|
|
455
|
+
- `spaceName`: _(string)_: Header param for space slug name.
|
|
456
|
+
- `params` _(SpaceRoleUserListParams)_: Parameters containing any additional filters.
|
|
457
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
456
458
|
|
|
457
459
|
**Returns:** `Promise<SpaceRoleUserListResponse>`
|
|
458
460
|
|
|
@@ -478,11 +480,11 @@ update(id: number, params: SpaceRoleParams, options?: Core.RequestOptions): Core
|
|
|
478
480
|
|
|
479
481
|
**Parameters:**
|
|
480
482
|
|
|
481
|
-
-
|
|
482
|
-
-
|
|
483
|
-
-
|
|
484
|
-
-
|
|
485
|
-
-
|
|
483
|
+
- `id` _(number)_: The ID of the space role user to update.
|
|
484
|
+
- `params` _(SpaceRoleParams)_: Parameters containing updated space role details.
|
|
485
|
+
- `space_role`: _(string)_: The updated space role for the user.
|
|
486
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
487
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
486
488
|
|
|
487
489
|
**Returns:** `Promise<SpaceRoleParams>`
|
|
488
490
|
|
|
@@ -508,11 +510,11 @@ partialUpdate(id: number, params: SpaceRoleParams, options?: Core.RequestOptions
|
|
|
508
510
|
|
|
509
511
|
**Parameters:**
|
|
510
512
|
|
|
511
|
-
-
|
|
512
|
-
-
|
|
513
|
-
-
|
|
514
|
-
-
|
|
515
|
-
-
|
|
513
|
+
- `id` _(number)_: The ID of the space role user to partially update.
|
|
514
|
+
- `params` _(SpaceRoleParams)_: Parameters containing updated space role details.
|
|
515
|
+
- `space_role`: _(string)_: The updated space role for the user.
|
|
516
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
517
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
516
518
|
|
|
517
519
|
**Returns:** `Promise<SpaceRoleParams>`
|
|
518
520
|
|
|
@@ -538,10 +540,10 @@ setSpaceDefault(id: String, params: SpaceRoleUsersParams, options?: Core.Request
|
|
|
538
540
|
|
|
539
541
|
**Parameters:**
|
|
540
542
|
|
|
541
|
-
-
|
|
542
|
-
-
|
|
543
|
-
-
|
|
544
|
-
-
|
|
543
|
+
- `id` _(string)_: The ID of the space role user to set as default.
|
|
544
|
+
- `params` _(SpaceRoleUsersParams)_: Parameters containing the space slug.
|
|
545
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
546
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
545
547
|
|
|
546
548
|
**Returns:** `Promise<void>`
|
|
547
549
|
|
|
@@ -567,10 +569,10 @@ delete(id: number, params: SpaceRoleUsersParams, options?: Core.RequestOptions):
|
|
|
567
569
|
|
|
568
570
|
**Parameters:**
|
|
569
571
|
|
|
570
|
-
-
|
|
571
|
-
-
|
|
572
|
-
-
|
|
573
|
-
-
|
|
572
|
+
- `id` _(number)_: The ID of the space role user to delete.
|
|
573
|
+
- `params` _(SpaceRoleUsersParams)_: Parameters containing the space slug.
|
|
574
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
575
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
574
576
|
|
|
575
577
|
**Returns:** `Promise<void>`
|
|
576
578
|
|
|
@@ -605,7 +607,7 @@ retrieve(options?: Core.RequestOptions): Core.APIPromise<OAuthCredentials>
|
|
|
605
607
|
|
|
606
608
|
**Parameters:**
|
|
607
609
|
|
|
608
|
-
-
|
|
610
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
609
611
|
|
|
610
612
|
**Returns:** `Promise<OAuthCredentials>`
|
|
611
613
|
|
|
@@ -641,11 +643,11 @@ create(params: SpaceRoleCreateParams, options?: Core.RequestOptions): Core.APIPr
|
|
|
641
643
|
|
|
642
644
|
**Parameters:**
|
|
643
645
|
|
|
644
|
-
-
|
|
645
|
-
-
|
|
646
|
-
-
|
|
647
|
-
-
|
|
648
|
-
-
|
|
646
|
+
- `params` _(SpaceRoleCreateParams)_: Parameters for creating a new space role.
|
|
647
|
+
- `name`: _(string)_: The name of the space role.
|
|
648
|
+
- `policies`: _(Array<number>)_: An array of policy IDs associated with the space role.
|
|
649
|
+
- `X-Space`: _(string)_: Header param for space slug name.
|
|
650
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
649
651
|
|
|
650
652
|
**Returns:** `Promise<SpaceRole>`
|
|
651
653
|
|
|
@@ -674,10 +676,10 @@ retrieve(id: number, params: SpaceRolesParams, options?: Core.RequestOptions): C
|
|
|
674
676
|
|
|
675
677
|
**Parameters:**
|
|
676
678
|
|
|
677
|
-
-
|
|
678
|
-
-
|
|
679
|
-
-
|
|
680
|
-
-
|
|
679
|
+
- `id` _(number)_: The ID of the space role to retrieve.
|
|
680
|
+
- `params` _(SpaceRolesParams)_: Parameters containing the space slug.
|
|
681
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
682
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
681
683
|
|
|
682
684
|
**Returns:** `Promise<SpaceRole>`
|
|
683
685
|
|
|
@@ -702,12 +704,12 @@ update(id: number, params: SpaceRoleUpdateParams, options?: Core.RequestOptions)
|
|
|
702
704
|
|
|
703
705
|
**Parameters:**
|
|
704
706
|
|
|
705
|
-
-
|
|
706
|
-
-
|
|
707
|
-
-
|
|
708
|
-
-
|
|
709
|
-
-
|
|
710
|
-
-
|
|
707
|
+
- `id` _(number)_: The ID of the space role to update.
|
|
708
|
+
- `params` _(SpaceRoleUpdateParams)_: Parameters for updating the space role.
|
|
709
|
+
- `name`: _(string)_: The new name of the space role.
|
|
710
|
+
- `policies`: _(Array<number>)_: An updated array of policy IDs associated with the space role.
|
|
711
|
+
- `X-Space`: _(string)_: Header param for space slug name.
|
|
712
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
711
713
|
|
|
712
714
|
**Returns:** `Promise<SpaceRole>`
|
|
713
715
|
|
|
@@ -736,9 +738,9 @@ list(spaceName: string, params: ListParamsResponse, options?: Core.RequestOption
|
|
|
736
738
|
|
|
737
739
|
**Parameters:**
|
|
738
740
|
|
|
739
|
-
-
|
|
740
|
-
-
|
|
741
|
-
-
|
|
741
|
+
- `spaceName`: _(string)_: Header param for space slug name.
|
|
742
|
+
- `params` _(ListParamsResponse)_: Parameters containing the additional filters.
|
|
743
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
742
744
|
|
|
743
745
|
**Returns:** `Promise<SpaceRoleListResponse>`
|
|
744
746
|
|
|
@@ -763,10 +765,10 @@ delete(id: number, params: SpaceRoleDeleteParams, options?: Core.RequestOptions)
|
|
|
763
765
|
|
|
764
766
|
**Parameters:**
|
|
765
767
|
|
|
766
|
-
-
|
|
767
|
-
-
|
|
768
|
-
-
|
|
769
|
-
-
|
|
768
|
+
- `id` _(number)_: The ID of the space role to delete.
|
|
769
|
+
- `params` _(SpaceRoleDeleteParams)_: Parameters containing the space slug.
|
|
770
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
771
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
770
772
|
|
|
771
773
|
**Returns:** `Promise<void>`
|
|
772
774
|
|
|
@@ -801,12 +803,12 @@ create(body: SpaceCreateParams, options?: Core.RequestOptions): Core.APIPromise<
|
|
|
801
803
|
|
|
802
804
|
**Parameters:**
|
|
803
805
|
|
|
804
|
-
-
|
|
805
|
-
-
|
|
806
|
-
-
|
|
807
|
-
-
|
|
808
|
-
-
|
|
809
|
-
-
|
|
806
|
+
- `body` _(SpaceCreateParams)_: Parameters for creating a new space.
|
|
807
|
+
- `logo`: _(string)_: URL of the space logo.
|
|
808
|
+
- `name`: _(string)_: The name of the space.
|
|
809
|
+
- `slug_name`: _(string)_: Slug name for the space.
|
|
810
|
+
- `is_active` _(boolean)_: (Optional) Whether the space is active.
|
|
811
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
810
812
|
|
|
811
813
|
**Returns:** `Promise<Space>`
|
|
812
814
|
|
|
@@ -836,13 +838,13 @@ update(params: SpaceUpdateParams, options?: Core.RequestOptions): Core.APIPromis
|
|
|
836
838
|
|
|
837
839
|
**Parameters:**
|
|
838
840
|
|
|
839
|
-
-
|
|
840
|
-
-
|
|
841
|
-
-
|
|
842
|
-
-
|
|
843
|
-
-
|
|
844
|
-
-
|
|
845
|
-
-
|
|
841
|
+
- `params` _(SpaceUpdateParams)_: Parameters for updating the space.
|
|
842
|
+
- `logo`: _(string)_: URL of the new space logo.
|
|
843
|
+
- `name`: _(string)_: The new name of the space.
|
|
844
|
+
- `slug_name`: _(string)_: The new slug name for the space.
|
|
845
|
+
- `X-Space`: _(string)_: Header param for space slug name.
|
|
846
|
+
- `is_active` _(boolean)_: (Optional) Whether the space is active.
|
|
847
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
846
848
|
|
|
847
849
|
**Returns:** `Promise<Space>`
|
|
848
850
|
|
|
@@ -873,9 +875,9 @@ list(params?: SpaceListParams, options?: Core.RequestOptions): Core.APIPromise<S
|
|
|
873
875
|
|
|
874
876
|
**Parameters:**
|
|
875
877
|
|
|
876
|
-
-
|
|
877
|
-
-
|
|
878
|
-
-
|
|
878
|
+
- `params` _(SpaceListParams)_: (Optional) Parameters containing the space slug and any additional filters.
|
|
879
|
+
- `X-Space`: _(string)_: Header param for space slug name (optional).
|
|
880
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
879
881
|
|
|
880
882
|
**Returns:** `Promise<SpaceListResponse>`
|
|
881
883
|
|
|
@@ -900,9 +902,9 @@ delete(params: SpaceParams, options?: Core.RequestOptions): Core.APIPromise<void
|
|
|
900
902
|
|
|
901
903
|
**Parameters:**
|
|
902
904
|
|
|
903
|
-
-
|
|
904
|
-
-
|
|
905
|
-
-
|
|
905
|
+
- `params` _(SpaceParams)_: Parameters containing the space slug.
|
|
906
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
907
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
906
908
|
|
|
907
909
|
**Returns:** `Promise<void>`
|
|
908
910
|
|
|
@@ -927,12 +929,12 @@ invitation(params: OAuthInvitationParams, options?: Core.RequestOptions): Core.A
|
|
|
927
929
|
|
|
928
930
|
**Parameters:**
|
|
929
931
|
|
|
930
|
-
-
|
|
931
|
-
-
|
|
932
|
-
-
|
|
933
|
-
-
|
|
934
|
-
-
|
|
935
|
-
-
|
|
932
|
+
- `params` _(OAuthInvitationParams)_: Contains a list of receivers with emails and role IDs.
|
|
933
|
+
- `receiver_list`: _(Receiver[])_: A list of invitation targets.
|
|
934
|
+
- `email` _(string)_: Email address of the user to invite.
|
|
935
|
+
- `space_role_id` _(string)_: Role ID assigned to the user in the space.
|
|
936
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
937
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
936
938
|
|
|
937
939
|
**Returns:** `Promise<OAuthInvitationParams>`
|
|
938
940
|
|
|
@@ -969,8 +971,8 @@ joinSpace(token: string, options?: Core.RequestOptions): Core.APIPromise<JoinSpa
|
|
|
969
971
|
|
|
970
972
|
**Parameters:**
|
|
971
973
|
|
|
972
|
-
-
|
|
973
|
-
-
|
|
974
|
+
- `token` _(string)_: The unique token received in the invitation link.
|
|
975
|
+
- `options` _(Core.RequestOptions)_: Additional request options (e.g., headers).
|
|
974
976
|
|
|
975
977
|
**Returns:** `Promise<JoinSpaceResponse>`
|
|
976
978
|
|
|
@@ -1020,11 +1022,11 @@ async authorize(body: OAuth2AuthorizeParams, options?: Core.RequestOptions): Pro
|
|
|
1020
1022
|
|
|
1021
1023
|
**Parameters:**
|
|
1022
1024
|
|
|
1023
|
-
-
|
|
1024
|
-
-
|
|
1025
|
-
-
|
|
1026
|
-
-
|
|
1027
|
-
-
|
|
1025
|
+
- `body` _(OAuth2AuthorizeParams)_: Parameters required for authorization.
|
|
1026
|
+
- `client_id`: _(string)_: The client ID of the application.
|
|
1027
|
+
- `redirect_uri`: _(string)_: The URI to redirect to after authorization.
|
|
1028
|
+
- `scopes`: _(Array<'organization'>)_: Scopes for the authorization request.
|
|
1029
|
+
- `options` _(Core.RequestOptions)_: (Optional) Additional request options.
|
|
1028
1030
|
|
|
1029
1031
|
**Returns:** `Promise<OAuth2Authorize>`
|
|
1030
1032
|
|
|
@@ -1054,13 +1056,13 @@ token(body: OAuth2Token, options?: Core.RequestOptions): Core.APIPromise<OAuth2T
|
|
|
1054
1056
|
|
|
1055
1057
|
**Parameters:**
|
|
1056
1058
|
|
|
1057
|
-
-
|
|
1058
|
-
-
|
|
1059
|
-
-
|
|
1060
|
-
-
|
|
1061
|
-
-
|
|
1062
|
-
-
|
|
1063
|
-
-
|
|
1059
|
+
- `body` _(OAuth2Token)_: Parameters required to obtain an access token.
|
|
1060
|
+
- `client_id`: _(string)_: The client ID of the application.
|
|
1061
|
+
- `client_secret`: _(string)_: The client secret of the application.
|
|
1062
|
+
- `code`: _(string)_: The authorization code received from the authorization server.
|
|
1063
|
+
- `code_verifier`: _(string)_: The code verifier used in the authorization request.
|
|
1064
|
+
- `scopes`: _(Array<'organization'>)_: (Optional) Scopes for the token request.
|
|
1065
|
+
- `id_token`: _(string)_: (Optional) ID token if available.
|
|
1064
1066
|
|
|
1065
1067
|
**Returns:** `Promise<OAuth2Token>`
|
|
1066
1068
|
|
|
@@ -1101,9 +1103,9 @@ create(params: DashboardCreateParams, options?: Core.RequestOptions): Core.APIPr
|
|
|
1101
1103
|
|
|
1102
1104
|
**Parameters:**
|
|
1103
1105
|
|
|
1104
|
-
-
|
|
1105
|
-
-
|
|
1106
|
-
-
|
|
1106
|
+
- `params` _(DashboardCreateParams)_: Parameters required for creating a dashboard.
|
|
1107
|
+
- `name`: _(string)_: The name of the dashboard.
|
|
1108
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1107
1109
|
|
|
1108
1110
|
**Returns:** `Promise<Dashboard>`
|
|
1109
1111
|
|
|
@@ -1132,9 +1134,9 @@ retrieve(id: number, params: DashboardRetrieveParams, options?: Core.RequestOpti
|
|
|
1132
1134
|
|
|
1133
1135
|
**Parameters:**
|
|
1134
1136
|
|
|
1135
|
-
-
|
|
1136
|
-
-
|
|
1137
|
-
-
|
|
1137
|
+
- `id` _(number)_: The ID of the dashboard to retrieve.
|
|
1138
|
+
- `params` _(DashboardRetrieveParams)_: Parameters required for retrieving a dashboard.
|
|
1139
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1138
1140
|
|
|
1139
1141
|
**Returns:** `Promise<Dashboard>`
|
|
1140
1142
|
|
|
@@ -1160,10 +1162,10 @@ update(id: number, params: DashboardUpdateParams, options?: Core.RequestOptions)
|
|
|
1160
1162
|
|
|
1161
1163
|
**Parameters:**
|
|
1162
1164
|
|
|
1163
|
-
-
|
|
1164
|
-
-
|
|
1165
|
-
-
|
|
1166
|
-
-
|
|
1165
|
+
- `id` _(number)_: The ID of the dashboard to update.
|
|
1166
|
+
- `params` _(DashboardUpdateParams)_: Parameters required for updating a dashboard.
|
|
1167
|
+
- `name`: _(string)_: The new name of the dashboard.
|
|
1168
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1167
1169
|
|
|
1168
1170
|
**Returns:** `Promise<Dashboard>`
|
|
1169
1171
|
|
|
@@ -1192,8 +1194,8 @@ list(params: DashboardListParams, options?: Core.RequestOptions): Core.APIPromis
|
|
|
1192
1194
|
|
|
1193
1195
|
**Parameters:**
|
|
1194
1196
|
|
|
1195
|
-
-
|
|
1196
|
-
-
|
|
1197
|
+
- `params` _(DashboardListParams)_: Parameters for listing dashboards.
|
|
1198
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1197
1199
|
|
|
1198
1200
|
**Returns:** `Promise<DashboardListResponse>`
|
|
1199
1201
|
|
|
@@ -1218,9 +1220,9 @@ delete(id: number, params: DashboardDeleteParams, options?: Core.RequestOptions)
|
|
|
1218
1220
|
|
|
1219
1221
|
**Parameters:**
|
|
1220
1222
|
|
|
1221
|
-
-
|
|
1222
|
-
-
|
|
1223
|
-
-
|
|
1223
|
+
- `id` _(number)_: The ID of the dashboard to delete.
|
|
1224
|
+
- `params` _(DashboardDeleteParams)_: Parameters required for deleting a dashboard.
|
|
1225
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1224
1226
|
|
|
1225
1227
|
**Returns:** `Promise<void>`
|
|
1226
1228
|
|
|
@@ -1245,10 +1247,10 @@ createWidget(dashboardId: string, params: WidgetCreateParams, options?: Core.Req
|
|
|
1245
1247
|
|
|
1246
1248
|
**Parameters:**
|
|
1247
1249
|
|
|
1248
|
-
-
|
|
1249
|
-
-
|
|
1250
|
-
-
|
|
1251
|
-
-
|
|
1250
|
+
- `dashboardId` _(string)_: The ID of the dashboard to create the widget in.
|
|
1251
|
+
- `params` _(WidgetCreateParams)_: Parameters required for creating a widget.
|
|
1252
|
+
- `configuration`: _(any)_: Configuration settings for the widget.
|
|
1253
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1252
1254
|
|
|
1253
1255
|
**Returns:** `Promise<Widget>`
|
|
1254
1256
|
|
|
@@ -1277,10 +1279,10 @@ retrieveWidget(dashboardId: string, id: number, params: WidgetRetrieveParams, op
|
|
|
1277
1279
|
|
|
1278
1280
|
**Parameters:**
|
|
1279
1281
|
|
|
1280
|
-
-
|
|
1281
|
-
-
|
|
1282
|
-
-
|
|
1283
|
-
-
|
|
1282
|
+
- `dashboardId` _(string)_: The ID of the dashboard containing the widget.
|
|
1283
|
+
- `id` _(number)_: The ID of the widget to retrieve.
|
|
1284
|
+
- `params` _(WidgetRetrieveParams)_: Parameters required for retrieving a widget.
|
|
1285
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1284
1286
|
|
|
1285
1287
|
**Returns:** `Promise<Widget>`
|
|
1286
1288
|
|
|
@@ -1305,11 +1307,11 @@ updateWidget(dashboardId: string, id: number, params: WidgetUpdateParams, option
|
|
|
1305
1307
|
|
|
1306
1308
|
**Parameters:**
|
|
1307
1309
|
|
|
1308
|
-
-
|
|
1309
|
-
-
|
|
1310
|
-
-
|
|
1311
|
-
-
|
|
1312
|
-
-
|
|
1310
|
+
- `dashboardId` _(string)_: The ID of the dashboard containing the widget.
|
|
1311
|
+
- `id` _(number)_: The ID of the widget to update.
|
|
1312
|
+
- `params` _(WidgetUpdateParams)_: Parameters required for updating a widget.
|
|
1313
|
+
- `configuration`: _(any)_: New configuration settings for the widget.
|
|
1314
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1313
1315
|
|
|
1314
1316
|
**Returns:** `Promise<Widget>`
|
|
1315
1317
|
|
|
@@ -1338,10 +1340,10 @@ listWidgets(dashboardId: string, params: WidgetListParams, options?: Core.Reques
|
|
|
1338
1340
|
|
|
1339
1341
|
**Parameters:**
|
|
1340
1342
|
|
|
1341
|
-
-
|
|
1342
|
-
-
|
|
1343
|
-
-
|
|
1344
|
-
-
|
|
1343
|
+
- `dashboardId` _(string)_: The ID of the dashboard to list widgets from.
|
|
1344
|
+
- `params` _(WidgetListParams)_: Parameters for listing widgets.
|
|
1345
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1346
|
+
- `ordering`: _(string)_: (Optional) Field to use when ordering the results.
|
|
1345
1347
|
|
|
1346
1348
|
**Returns:** `Promise<WidgetListResponse>`
|
|
1347
1349
|
|
|
@@ -1366,10 +1368,10 @@ deleteWidget(dashboardId: string, id: number, params: WidgetDeleteParams, option
|
|
|
1366
1368
|
|
|
1367
1369
|
**Parameters:**
|
|
1368
1370
|
|
|
1369
|
-
-
|
|
1370
|
-
-
|
|
1371
|
-
-
|
|
1372
|
-
-
|
|
1371
|
+
- `dashboardId` _(string)_: The ID of the dashboard containing the widget.
|
|
1372
|
+
- `id` _(number)_: The ID of the widget to delete.
|
|
1373
|
+
- `params` _(WidgetDeleteParams)_: Parameters required for deleting a widget.
|
|
1374
|
+
- `X-Space`: _(string)_: The space slug name.
|
|
1373
1375
|
|
|
1374
1376
|
**Returns:** `Promise<void>`
|
|
1375
1377
|
|
|
@@ -1402,9 +1404,9 @@ retrieveDaily(params: DailyRetrieveParams, options?: Core.RequestOptions): Core.
|
|
|
1402
1404
|
|
|
1403
1405
|
**Parameters:**
|
|
1404
1406
|
|
|
1405
|
-
-
|
|
1406
|
-
-
|
|
1407
|
-
-
|
|
1407
|
+
- `params` _(DailyRetrieveParams)_: Parameters for retrieving daily device states.
|
|
1408
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
1409
|
+
- Other query parameters specific to daily retrieval.
|
|
1408
1410
|
|
|
1409
1411
|
**Returns:** `Promise<DailyRetrieveResponse>`
|
|
1410
1412
|
|
|
@@ -1433,9 +1435,9 @@ retrieveHourly(params: HourlyRetrieveParams, options?: Core.RequestOptions): Cor
|
|
|
1433
1435
|
|
|
1434
1436
|
**Parameters:**
|
|
1435
1437
|
|
|
1436
|
-
-
|
|
1437
|
-
-
|
|
1438
|
-
-
|
|
1438
|
+
- `params` _(HourlyRetrieveParams)_: Parameters for retrieving hourly device states.
|
|
1439
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
1440
|
+
- Other query parameters specific to hourly retrieval.
|
|
1439
1441
|
|
|
1440
1442
|
**Returns:** `Promise<HourlyRetrieveResponse>`
|
|
1441
1443
|
|
|
@@ -1464,9 +1466,9 @@ retrieveMinutely(params: MinutelyRetrieveParams, options?: Core.RequestOptions):
|
|
|
1464
1466
|
|
|
1465
1467
|
**Parameters:**
|
|
1466
1468
|
|
|
1467
|
-
-
|
|
1468
|
-
-
|
|
1469
|
-
-
|
|
1469
|
+
- `params` _(MinutelyRetrieveParams)_: Parameters for retrieving minutely device states.
|
|
1470
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
1471
|
+
- Other query parameters specific to minutely retrieval.
|
|
1470
1472
|
|
|
1471
1473
|
**Returns:** `Promise<MinutelyRetrieveResponse>`
|
|
1472
1474
|
|
|
@@ -1495,9 +1497,9 @@ retrieveMonthly(params: MonthlyRetrieveParams, options?: Core.RequestOptions): C
|
|
|
1495
1497
|
|
|
1496
1498
|
**Parameters:**
|
|
1497
1499
|
|
|
1498
|
-
-
|
|
1499
|
-
-
|
|
1500
|
-
-
|
|
1500
|
+
- `params` _(MonthlyRetrieveParams)_: Parameters for retrieving monthly device states.
|
|
1501
|
+
- `X-Space`: _(string)_: Space slug name.
|
|
1502
|
+
- Other query parameters specific to monthly retrieval.
|
|
1501
1503
|
|
|
1502
1504
|
**Returns:** `Promise<MonthlyRetrieveResponse>`
|
|
1503
1505
|
|
|
@@ -1536,7 +1538,7 @@ getMe(options?: Core.RequestOptions): Core.APIPromise<Profile>
|
|
|
1536
1538
|
|
|
1537
1539
|
**Parameters:**
|
|
1538
1540
|
|
|
1539
|
-
-
|
|
1541
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
1540
1542
|
|
|
1541
1543
|
**Returns:** `Promise<Profile>`
|
|
1542
1544
|
|
|
@@ -1562,15 +1564,15 @@ updateMe(body: Profile, options?: Core.RequestOptions): Core.APIPromise<Profile>
|
|
|
1562
1564
|
|
|
1563
1565
|
**Parameters:**
|
|
1564
1566
|
|
|
1565
|
-
-
|
|
1566
|
-
-
|
|
1567
|
-
-
|
|
1568
|
-
-
|
|
1569
|
-
-
|
|
1570
|
-
-
|
|
1571
|
-
-
|
|
1572
|
-
-
|
|
1573
|
-
-
|
|
1567
|
+
- `body` _(Profile)_: Object containing updated user profile details.
|
|
1568
|
+
- `first_name` _(string)_: User's first name.
|
|
1569
|
+
- `last_name` _(string)_: User's last name.
|
|
1570
|
+
- `email` _(string)_: User's email address.
|
|
1571
|
+
- `location` _(string)_: User's location.
|
|
1572
|
+
- `avatar` _(string)_: URL of the user's avatar.
|
|
1573
|
+
- `company_name` _(string)_: User's company name.
|
|
1574
|
+
- `title` _(string)_: User's title.
|
|
1575
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
1574
1576
|
|
|
1575
1577
|
**Returns:** `Promise<Profile>`
|
|
1576
1578
|
|
|
@@ -1600,7 +1602,7 @@ deleteMe(options?: Core.RequestOptions): Core.APIPromise<void>
|
|
|
1600
1602
|
|
|
1601
1603
|
**Parameters:**
|
|
1602
1604
|
|
|
1603
|
-
-
|
|
1605
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
1604
1606
|
|
|
1605
1607
|
**Returns:** `Promise<void>`
|
|
1606
1608
|
|
|
@@ -1636,7 +1638,7 @@ get(options?: Core.RequestOptions): Core.APIPromise<PresignedUrlResponse>
|
|
|
1636
1638
|
|
|
1637
1639
|
**Parameters:**
|
|
1638
1640
|
|
|
1639
|
-
-
|
|
1641
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
1640
1642
|
|
|
1641
1643
|
**Returns:** `Promise<PresignedUrlResponse>`
|
|
1642
1644
|
|
|
@@ -1671,19 +1673,19 @@ create(params: DeviceConnectorParams, options?: Core.RequestOptions): Core.APIPr
|
|
|
1671
1673
|
|
|
1672
1674
|
**Parameters:**
|
|
1673
1675
|
|
|
1674
|
-
-
|
|
1675
|
-
-
|
|
1676
|
-
-
|
|
1677
|
-
-
|
|
1678
|
-
-
|
|
1679
|
-
-
|
|
1680
|
-
-
|
|
1681
|
-
-
|
|
1682
|
-
-
|
|
1683
|
-
-
|
|
1684
|
-
-
|
|
1685
|
-
-
|
|
1686
|
-
-
|
|
1676
|
+
- params (DeviceConnectorParams): Parameters for creating a device connector:
|
|
1677
|
+
- network_server (string): The URL or address of the network server.
|
|
1678
|
+
- name (string): The name of the device connector.
|
|
1679
|
+
- connector_type (string): The type of the connector (e.g., mqtt, http).
|
|
1680
|
+
- status? (string): Optional status of the connector.
|
|
1681
|
+
- deviceHttpConfig? (DeviceHttpConfig): Optional HTTP-specific configuration:
|
|
1682
|
+
- api_token (string): Token used to authenticate HTTP requests.
|
|
1683
|
+
- address_url (string): Base URL of the HTTP endpoint.
|
|
1684
|
+
- deviceMqttConfig? (DeviceMqttConfig): Optional MQTT-specific configuration:
|
|
1685
|
+
- mqtt_broker (string): Address of the MQTT broker.
|
|
1686
|
+
- username (string): Username for broker authentication.
|
|
1687
|
+
- password (string): Password for broker authentication.
|
|
1688
|
+
- options (Core.RequestOptions): Additional request options.
|
|
1687
1689
|
|
|
1688
1690
|
**Returns:** Promise `<DeviceConnectorParams>`
|
|
1689
1691
|
|
|
@@ -1727,19 +1729,19 @@ testConnectionPreview(params: DeviceConnectorParams, options?: Core.RequestOptio
|
|
|
1727
1729
|
|
|
1728
1730
|
**Parameters:**
|
|
1729
1731
|
|
|
1730
|
-
-
|
|
1731
|
-
-
|
|
1732
|
-
-
|
|
1733
|
-
-
|
|
1734
|
-
-
|
|
1735
|
-
-
|
|
1736
|
-
-
|
|
1737
|
-
-
|
|
1738
|
-
-
|
|
1739
|
-
-
|
|
1740
|
-
-
|
|
1741
|
-
-
|
|
1742
|
-
-
|
|
1732
|
+
- params (DeviceConnectorParams): Parameters for testing a device connector connection:
|
|
1733
|
+
- network_server (string): The URL or address of the network server.
|
|
1734
|
+
- name (string): The name of the device connector.
|
|
1735
|
+
- connector_type (string): The type of the connector (e.g., mqtt, http).
|
|
1736
|
+
- status? (string): Optional status of the connector.
|
|
1737
|
+
- deviceHttpConfig? (DeviceHttpConfig): Optional HTTP-specific configuration:
|
|
1738
|
+
- api_token (string): Token used to authenticate HTTP requests.
|
|
1739
|
+
- address_url (string): Base URL of the HTTP endpoint.
|
|
1740
|
+
- deviceMqttConfig? (DeviceMqttConfig): Optional MQTT-specific configuration:
|
|
1741
|
+
- mqtt_broker (string): Address of the MQTT broker.
|
|
1742
|
+
- username (string): Username for broker authentication.
|
|
1743
|
+
- password (string): Password for broker authentication.
|
|
1744
|
+
- options (Core.RequestOptions): Additional request options.
|
|
1743
1745
|
|
|
1744
1746
|
**Returns:** Promise `<void>`
|
|
1745
1747
|
|
|
@@ -1783,8 +1785,8 @@ testConnection(id: string, options?: Core.RequestOptions): Core.APIPromise<void>
|
|
|
1783
1785
|
|
|
1784
1786
|
**Parameters:**
|
|
1785
1787
|
|
|
1786
|
-
-
|
|
1787
|
-
-
|
|
1788
|
+
- `id` (string): A UUID string identifying the device connector to test.
|
|
1789
|
+
- `options`? (Core.RequestOptions): Additional request options such as custom headers.
|
|
1788
1790
|
|
|
1789
1791
|
**Returns:** `Promise <void>`
|
|
1790
1792
|
|
|
@@ -1819,13 +1821,13 @@ create(params: DeviceModelParams, options?: Core.RequestOptions): Core.APIPromis
|
|
|
1819
1821
|
|
|
1820
1822
|
**Parameters:**
|
|
1821
1823
|
|
|
1822
|
-
-
|
|
1823
|
-
-
|
|
1824
|
-
-
|
|
1825
|
-
-
|
|
1826
|
-
-
|
|
1827
|
-
-
|
|
1828
|
-
-
|
|
1824
|
+
- params (DeviceModelParams): Parameters for creating a device model:
|
|
1825
|
+
- name (string): The name of the device model.
|
|
1826
|
+
- alias (string): The alias of the device model.
|
|
1827
|
+
- image_url (string): The image URL of the device model.
|
|
1828
|
+
- default_config (object): The default configuration object.
|
|
1829
|
+
- manufacture (string): The manufacturer of the device model.
|
|
1830
|
+
- options (Core.RequestOptions): Additional request options.
|
|
1829
1831
|
|
|
1830
1832
|
**Returns:** Promise<DeviceModelParams>
|
|
1831
1833
|
|
|
@@ -1856,8 +1858,8 @@ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<DeviceModel
|
|
|
1856
1858
|
|
|
1857
1859
|
**Parameters:**
|
|
1858
1860
|
|
|
1859
|
-
-
|
|
1860
|
-
-
|
|
1861
|
+
- `id` (string): The unique identifier of the device model to retrieve.
|
|
1862
|
+
- `options` (Core.RequestOptions): Additional request options.
|
|
1861
1863
|
|
|
1862
1864
|
**Returns:** `Promise<DeviceModelParams>`
|
|
1863
1865
|
|
|
@@ -1883,14 +1885,14 @@ update(id: string, params: DeviceModelParams, options?: Core.RequestOptions): Co
|
|
|
1883
1885
|
|
|
1884
1886
|
**Parameters:**
|
|
1885
1887
|
|
|
1886
|
-
-
|
|
1887
|
-
-
|
|
1888
|
-
-
|
|
1889
|
-
-
|
|
1890
|
-
-
|
|
1891
|
-
-
|
|
1892
|
-
-
|
|
1893
|
-
-
|
|
1888
|
+
- `id` (string): The unique identifier of the device model to update.
|
|
1889
|
+
- `params` (DeviceModelParams): The data to update the device model with:
|
|
1890
|
+
- `name` (string): The name of the device model.
|
|
1891
|
+
- `alias` (string): The alias of the device model.
|
|
1892
|
+
- `image_url` (string): The image URL of the device model.
|
|
1893
|
+
- `default_config` (object): The default configuration object.
|
|
1894
|
+
- `manufacture` (string): The manufacturer of the device model.
|
|
1895
|
+
- `options` (Core.RequestOptions): Additional request options.
|
|
1894
1896
|
|
|
1895
1897
|
**Returns:** `Promise<DeviceModelParams>`
|
|
1896
1898
|
|
|
@@ -1922,12 +1924,12 @@ list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise
|
|
|
1922
1924
|
|
|
1923
1925
|
**Parameters:**
|
|
1924
1926
|
|
|
1925
|
-
-
|
|
1926
|
-
-
|
|
1927
|
-
-
|
|
1928
|
-
-
|
|
1929
|
-
-
|
|
1930
|
-
-
|
|
1927
|
+
- `params` (ListParamsResponse): Query parameters to filter and paginate the results:
|
|
1928
|
+
- `ordering` (string, optional): Which field to use when ordering the results.
|
|
1929
|
+
- `search` (string, optional): A search term.
|
|
1930
|
+
- `limit` (integer, optional): Number of results to return per page.
|
|
1931
|
+
- `offset` (integer, optional): The initial index from which to return the results.
|
|
1932
|
+
- `options` (Core.RequestOptions): Additional request options.
|
|
1931
1933
|
|
|
1932
1934
|
**Returns:** `Promise<DeviceModelListResponse>`
|
|
1933
1935
|
|
|
@@ -1958,8 +1960,8 @@ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void>
|
|
|
1958
1960
|
|
|
1959
1961
|
**Parameters:**
|
|
1960
1962
|
|
|
1961
|
-
-
|
|
1962
|
-
-
|
|
1963
|
+
- `id` _(string)_: A UUID string identifying this device models.
|
|
1964
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
1963
1965
|
|
|
1964
1966
|
**Returns:** `Promise<void>`
|
|
1965
1967
|
|
|
@@ -1994,11 +1996,11 @@ create(params: DeviceParams, options?: Core.RequestOptions): Core.APIPromise<Dev
|
|
|
1994
1996
|
|
|
1995
1997
|
**Parameters:**
|
|
1996
1998
|
|
|
1997
|
-
-
|
|
1998
|
-
-
|
|
1999
|
-
-
|
|
2000
|
-
-
|
|
2001
|
-
-
|
|
1999
|
+
- `params` _(DeviceParams)_: Parameters for creating a device:
|
|
2000
|
+
- `status` _(string, optional)_: The status of the device.
|
|
2001
|
+
- `device_connector` _(string)_: The connector type or identifier for the device.
|
|
2002
|
+
- `device_model` _(string)_: The model identifier of the device.
|
|
2003
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2002
2004
|
|
|
2003
2005
|
**Returns:** `Promise<DeviceParams>`
|
|
2004
2006
|
|
|
@@ -2027,8 +2029,8 @@ Retrieve details of a device by its ID.
|
|
|
2027
2029
|
|
|
2028
2030
|
**Parameters:**
|
|
2029
2031
|
|
|
2030
|
-
-
|
|
2031
|
-
-
|
|
2032
|
+
- `id` _(string)_: The unique identifier of the device to retrieve.
|
|
2033
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2032
2034
|
|
|
2033
2035
|
**Returns:** `Promise<DeviceParams>`
|
|
2034
2036
|
|
|
@@ -2054,12 +2056,12 @@ Update an existing device by its ID.
|
|
|
2054
2056
|
|
|
2055
2057
|
**Parameters:**
|
|
2056
2058
|
|
|
2057
|
-
-
|
|
2058
|
-
-
|
|
2059
|
-
-
|
|
2060
|
-
-
|
|
2061
|
-
-
|
|
2062
|
-
-
|
|
2059
|
+
- `id` _(string)_: The unique identifier of the device to update.
|
|
2060
|
+
- `params` _(DeviceParams)_: Parameters to update the device with:
|
|
2061
|
+
- `status` _(string, optional)_: The status of the device.
|
|
2062
|
+
- `device_connector` _(string)_: The connector type or identifier for the device.
|
|
2063
|
+
- `device_model` _(string)_: The model identifier of the device.
|
|
2064
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2063
2065
|
|
|
2064
2066
|
**Returns:** `Promise<DeviceParams>`
|
|
2065
2067
|
|
|
@@ -2088,10 +2090,10 @@ List devices with optional pagination.
|
|
|
2088
2090
|
|
|
2089
2091
|
**Parameters:**
|
|
2090
2092
|
|
|
2091
|
-
-
|
|
2092
|
-
-
|
|
2093
|
-
-
|
|
2094
|
-
-
|
|
2093
|
+
- `params` _(ListParamsResponse)_: Query parameters for listing devices:
|
|
2094
|
+
- `limit` _(integer, optional)_: Number of results to return per page.
|
|
2095
|
+
- `offset` _(integer, optional)_: The initial index from which to return the results.
|
|
2096
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2095
2097
|
|
|
2096
2098
|
**Returns:** `Promise<DeviceListResponse>`
|
|
2097
2099
|
|
|
@@ -2117,8 +2119,8 @@ Delete a device by its ID.
|
|
|
2117
2119
|
|
|
2118
2120
|
**Parameters:**
|
|
2119
2121
|
|
|
2120
|
-
-
|
|
2121
|
-
-
|
|
2122
|
+
- `id` _(number)_: The unique identifier of the device to delete.
|
|
2123
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2122
2124
|
|
|
2123
2125
|
**Returns:** `Promise<void>`
|
|
2124
2126
|
|
|
@@ -2154,13 +2156,13 @@ Create a new manufacturer.
|
|
|
2154
2156
|
|
|
2155
2157
|
**Parameters:**
|
|
2156
2158
|
|
|
2157
|
-
-
|
|
2158
|
-
-
|
|
2159
|
-
-
|
|
2160
|
-
-
|
|
2161
|
-
-
|
|
2162
|
-
-
|
|
2163
|
-
-
|
|
2159
|
+
- `params` _(ManufacturersParams)_: Parameters for creating a manufacturer:
|
|
2160
|
+
- `name` _(string)_: The name of the manufacturer.
|
|
2161
|
+
- `location` _(string)_: The location of the manufacturer.
|
|
2162
|
+
- `description` _(string)_: A description of the manufacturer.
|
|
2163
|
+
- `portal_url` _(string)_: The portal URL information of the manufacturer.
|
|
2164
|
+
- `national` _(string)_: The nationality or country of the manufacturer.
|
|
2165
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2164
2166
|
|
|
2165
2167
|
**Returns:** `Promise<ManufacturersParams>`
|
|
2166
2168
|
|
|
@@ -2189,8 +2191,8 @@ Retrieve details of a manufacturer by its ID.
|
|
|
2189
2191
|
|
|
2190
2192
|
**Parameters:**
|
|
2191
2193
|
|
|
2192
|
-
-
|
|
2193
|
-
-
|
|
2194
|
+
- `id` _(string)_: The unique identifier of the manufacturer to retrieve.
|
|
2195
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2194
2196
|
|
|
2195
2197
|
**Returns:** `Promise<ManufacturersParams>`
|
|
2196
2198
|
|
|
@@ -2216,14 +2218,14 @@ Update an existing manufacturer by its ID.
|
|
|
2216
2218
|
|
|
2217
2219
|
**Parameters:**
|
|
2218
2220
|
|
|
2219
|
-
-
|
|
2220
|
-
-
|
|
2221
|
-
-
|
|
2222
|
-
-
|
|
2223
|
-
-
|
|
2224
|
-
-
|
|
2225
|
-
-
|
|
2226
|
-
-
|
|
2221
|
+
- `id` _(string)_: The unique identifier of the manufacturer to update.
|
|
2222
|
+
- `params` _(ManufacturersParams)_: Parameters for updating the manufacturer:
|
|
2223
|
+
- `name` _(string)_: The name of the manufacturer.
|
|
2224
|
+
- `location` _(string)_: The location of the manufacturer.
|
|
2225
|
+
- `description` _(string)_: A description of the manufacturer.
|
|
2226
|
+
- `portal_url` _(string)_: The portal URL information of the manufacturer.
|
|
2227
|
+
- `national` _(string)_: The nationality or country of the manufacturer.
|
|
2228
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2227
2229
|
|
|
2228
2230
|
**Returns:** `Promise<ManufacturersParams>`
|
|
2229
2231
|
|
|
@@ -2254,21 +2256,21 @@ List manufacturers with optional filtering, ordering, and pagination.
|
|
|
2254
2256
|
|
|
2255
2257
|
**Parameters:**
|
|
2256
2258
|
|
|
2257
|
-
-
|
|
2258
|
-
-
|
|
2259
|
-
-
|
|
2260
|
-
-
|
|
2261
|
-
-
|
|
2262
|
-
-
|
|
2259
|
+
- `params` _(ListParamsResponse)_: Query parameters for filtering, ordering, and pagination:
|
|
2260
|
+
- `ordering` _(string, optional)_: Which field to use when ordering the results.
|
|
2261
|
+
- `search` _(string, optional)_: A search term to filter results.
|
|
2262
|
+
- `limit` _(integer, optional)_: Number of results to return per page.
|
|
2263
|
+
- `offset` _(integer, optional)_: The initial index from which to return the results.
|
|
2264
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2263
2265
|
|
|
2264
2266
|
**Returns:** `Promise<ManufacturersListResponse>`
|
|
2265
2267
|
|
|
2266
2268
|
**Response shape:**
|
|
2267
2269
|
|
|
2268
|
-
-
|
|
2269
|
-
-
|
|
2270
|
-
-
|
|
2271
|
-
-
|
|
2270
|
+
- `count` _(integer)_: Total number of manufacturers matching the query.
|
|
2271
|
+
- `next` _(string | null)_: URL to the next page of results, or `null`.
|
|
2272
|
+
- `previous` _(string | null)_: URL to the previous page of results, or `null`.
|
|
2273
|
+
- `results` _(ManufacturersParams[])_: Array of manufacturer objects.
|
|
2272
2274
|
|
|
2273
2275
|
**Example:**
|
|
2274
2276
|
|
|
@@ -2297,8 +2299,8 @@ Delete a manufacturer by its ID.
|
|
|
2297
2299
|
|
|
2298
2300
|
**Parameters:**
|
|
2299
2301
|
|
|
2300
|
-
-
|
|
2301
|
-
-
|
|
2302
|
+
- `id` _(number)_: A UUID string identifying this manufacturer. (Note: Type is `number` in code but described as UUID string)
|
|
2303
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2302
2304
|
|
|
2303
2305
|
**Returns:** `Promise<void>` (No content on success)
|
|
2304
2306
|
|
|
@@ -2333,15 +2335,15 @@ reate(params: NetworkServerParams, options?: Core.RequestOptions): Core.APIPromi
|
|
|
2333
2335
|
|
|
2334
2336
|
**Parameters:**
|
|
2335
2337
|
|
|
2336
|
-
-
|
|
2337
|
-
-
|
|
2338
|
-
-
|
|
2339
|
-
-
|
|
2340
|
-
-
|
|
2341
|
-
|
|
2342
|
-
-
|
|
2343
|
-
-
|
|
2344
|
-
-
|
|
2338
|
+
- `params` _(NetworkServerParams)_: Parameters for creating a new network server.
|
|
2339
|
+
- `name`: _(string)_: The name of the network server.
|
|
2340
|
+
- `logo`: _(string)_: The logo of the network server.
|
|
2341
|
+
- `description`: _(string)_: The description of the network server.
|
|
2342
|
+
- `type_connect`: _(string[])_: An array of connection types supported by the network server.
|
|
2343
|
+
Possible values may include:
|
|
2344
|
+
- `"mqtt_broker"`: The server connects using MQTT protocol.
|
|
2345
|
+
- `"http_server"`: The server exposes HTTP endpoints.
|
|
2346
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2345
2347
|
|
|
2346
2348
|
**Returns:** `Promise<NetworkServerParams>`
|
|
2347
2349
|
|
|
@@ -2370,8 +2372,8 @@ Retrieve details of a network server by its ID.
|
|
|
2370
2372
|
|
|
2371
2373
|
**Parameters:**
|
|
2372
2374
|
|
|
2373
|
-
-
|
|
2374
|
-
-
|
|
2375
|
+
- `id` _(string)_: The unique identifier of the network server to retrieve.
|
|
2376
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2375
2377
|
|
|
2376
2378
|
**Returns:** `Promise<NetworkServerParams>`
|
|
2377
2379
|
|
|
@@ -2397,15 +2399,15 @@ update(id: string, params: NetworkServerParams, options?: Core.RequestOptions):
|
|
|
2397
2399
|
|
|
2398
2400
|
**Parameters:**
|
|
2399
2401
|
|
|
2400
|
-
-
|
|
2401
|
-
-
|
|
2402
|
-
-
|
|
2403
|
-
-
|
|
2404
|
-
-
|
|
2405
|
-
-
|
|
2406
|
-
-
|
|
2407
|
-
-
|
|
2408
|
-
-
|
|
2402
|
+
- `id` _(string)_: The unique identifier of the network server to update.
|
|
2403
|
+
- `params` _(NetworkServerParams)_: Parameters for updating the network server.
|
|
2404
|
+
- `name`: _(string)_: The name of the network server.
|
|
2405
|
+
- `logo`: _(string)_: The logo of the network server.
|
|
2406
|
+
- `description`: _(string)_: The description of the network server.
|
|
2407
|
+
- `type_connect`: _(string[])_: An array of connection types supported by the network server. Possible values include:
|
|
2408
|
+
- `"mqtt_broker"`: The server connects using MQTT protocol.
|
|
2409
|
+
- `"http_server"`: The server exposes HTTP endpoints.
|
|
2410
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2409
2411
|
|
|
2410
2412
|
**Returns:** `Promise<NetworkServerParams>`
|
|
2411
2413
|
|
|
@@ -2435,21 +2437,21 @@ list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise
|
|
|
2435
2437
|
|
|
2436
2438
|
**Parameters:**
|
|
2437
2439
|
|
|
2438
|
-
-
|
|
2439
|
-
-
|
|
2440
|
-
-
|
|
2441
|
-
-
|
|
2442
|
-
-
|
|
2443
|
-
-
|
|
2440
|
+
- `params` _(ListParamsResponse)_: Query parameters for filtering, ordering, and pagination:
|
|
2441
|
+
- `ordering` _(string, optional)_: Which field to use when ordering the results.
|
|
2442
|
+
- `search` _(string, optional)_: A search term to filter results.
|
|
2443
|
+
- `limit` _(integer, optional)_: Number of results to return per page.
|
|
2444
|
+
- `offset` _(integer, optional)_: The initial index from which to return the results.
|
|
2445
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2444
2446
|
|
|
2445
2447
|
**Returns:** `Promise<NetworkServerListResponse>`
|
|
2446
2448
|
|
|
2447
2449
|
**Response shape:**
|
|
2448
2450
|
|
|
2449
|
-
-
|
|
2450
|
-
-
|
|
2451
|
-
-
|
|
2452
|
-
-
|
|
2451
|
+
- `count` _(integer)_: Total number of network servers matching the query.
|
|
2452
|
+
- `next` _(string | null)_: URL to the next page of results, or `null`.
|
|
2453
|
+
- `previous` _(string | null)_: URL to the previous page of results, or `null`.
|
|
2454
|
+
- `results` _(NetworkServer[])_: Array of network server objects.
|
|
2453
2455
|
|
|
2454
2456
|
**Example:**
|
|
2455
2457
|
|
|
@@ -2478,8 +2480,8 @@ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void>
|
|
|
2478
2480
|
|
|
2479
2481
|
**Parameters:**
|
|
2480
2482
|
|
|
2481
|
-
-
|
|
2482
|
-
-
|
|
2483
|
+
- `id` _(string)_: A UUID string identifying this network server.
|
|
2484
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2483
2485
|
|
|
2484
2486
|
**Returns:** `Promise<void>`
|
|
2485
2487
|
|
|
@@ -2490,3 +2492,328 @@ await client.networkServer.delete('a557d013-f6...');
|
|
|
2490
2492
|
```
|
|
2491
2493
|
|
|
2492
2494
|
</details>
|
|
2495
|
+
|
|
2496
|
+
---
|
|
2497
|
+
|
|
2498
|
+
# Device Spaces
|
|
2499
|
+
|
|
2500
|
+
## Overview
|
|
2501
|
+
|
|
2502
|
+
The `DeviceSpaces` class provides methods for managing device spaces within an application. Device spaces allow for grouping and organizing devices within specific spaces. Below are the details for each method, including parameters, return types, and example usage.
|
|
2503
|
+
|
|
2504
|
+
## Methods
|
|
2505
|
+
|
|
2506
|
+
<details>
|
|
2507
|
+
<summary><strong>create</strong></summary>
|
|
2508
|
+
|
|
2509
|
+
Create a new device space.
|
|
2510
|
+
|
|
2511
|
+
**Signature:**
|
|
2512
|
+
|
|
2513
|
+
```typescript
|
|
2514
|
+
create(params: DeviceSpacesParams, options?: Core.RequestOptions): Core.APIPromise<DeviceSpacesParams>
|
|
2515
|
+
```
|
|
2516
|
+
|
|
2517
|
+
**Parameters:**
|
|
2518
|
+
|
|
2519
|
+
- `params` _(DeviceSpacesParams)_: Parameters for creating a new device space.
|
|
2520
|
+
- `name` _(string)_: The name of the device space.
|
|
2521
|
+
- `description` _(string)_: A description of the device space.
|
|
2522
|
+
- `dev_eui` _(string)_: A dev_eui of device space.
|
|
2523
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2524
|
+
|
|
2525
|
+
**Returns:** `Promise<DeviceSpacesParams>`
|
|
2526
|
+
|
|
2527
|
+
**Example:**
|
|
2528
|
+
|
|
2529
|
+
```typescript
|
|
2530
|
+
const newDeviceSpace = await client.deviceSpaces.create({
|
|
2531
|
+
name: 'Sensor Network A',
|
|
2532
|
+
description: 'Device space for temperature and humidity sensors',
|
|
2533
|
+
dev_eui: '8437687685476895',
|
|
2534
|
+
});
|
|
2535
|
+
```
|
|
2536
|
+
|
|
2537
|
+
</details>
|
|
2538
|
+
|
|
2539
|
+
<details>
|
|
2540
|
+
<summary><strong>list</strong></summary>
|
|
2541
|
+
|
|
2542
|
+
List device spaces with optional filtering, ordering, and pagination.
|
|
2543
|
+
|
|
2544
|
+
**Signature:**
|
|
2545
|
+
|
|
2546
|
+
```typescript
|
|
2547
|
+
list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<DeviceSpacesListResponse>
|
|
2548
|
+
```
|
|
2549
|
+
|
|
2550
|
+
**Parameters:**
|
|
2551
|
+
|
|
2552
|
+
- `params` _(ListParamsResponse)_: Query parameters for filtering, ordering, and pagination:
|
|
2553
|
+
- `ordering` _(string, optional)_: Which field to use when ordering the results.
|
|
2554
|
+
- `search` _(string, optional)_: A search term to filter results.
|
|
2555
|
+
- `limit` _(integer, optional)_: Number of results to return per page.
|
|
2556
|
+
- `offset` _(integer, optional)_: The initial index from which to return the results.
|
|
2557
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2558
|
+
|
|
2559
|
+
**Returns:** `Promise<DeviceSpacesListResponse>`
|
|
2560
|
+
|
|
2561
|
+
**Response shape:**
|
|
2562
|
+
|
|
2563
|
+
- `count` _(integer)_: Total number of device spaces matching the query.
|
|
2564
|
+
- `next` _(string | null)_: URL to the next page of results, or `null`.
|
|
2565
|
+
- `previous` _(string | null)_: URL to the previous page of results, or `null`.
|
|
2566
|
+
- `results` _(DeviceSpacesParams[])_: Array of device space objects.
|
|
2567
|
+
|
|
2568
|
+
**Example:**
|
|
2569
|
+
|
|
2570
|
+
```typescript
|
|
2571
|
+
const listResponse = await client.deviceSpaces.list(
|
|
2572
|
+
{
|
|
2573
|
+
ordering: 'name',
|
|
2574
|
+
search: 'sensor',
|
|
2575
|
+
limit: 10,
|
|
2576
|
+
offset: 0,
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
'X-Space': 'space-slug-name',
|
|
2580
|
+
},
|
|
2581
|
+
);
|
|
2582
|
+
console.log(listResponse.results);
|
|
2583
|
+
```
|
|
2584
|
+
|
|
2585
|
+
</details>
|
|
2586
|
+
|
|
2587
|
+
<details>
|
|
2588
|
+
<summary><strong>delete</strong></summary>
|
|
2589
|
+
|
|
2590
|
+
Delete a device space by its ID.
|
|
2591
|
+
|
|
2592
|
+
**Signature:**
|
|
2593
|
+
|
|
2594
|
+
```typescript
|
|
2595
|
+
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void>
|
|
2596
|
+
```
|
|
2597
|
+
|
|
2598
|
+
**Parameters:**
|
|
2599
|
+
|
|
2600
|
+
- `id` _(string)_: A UUID string identifying this device space.
|
|
2601
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2602
|
+
|
|
2603
|
+
**Returns:** `Promise<void>`
|
|
2604
|
+
|
|
2605
|
+
**Example:**
|
|
2606
|
+
|
|
2607
|
+
```typescript
|
|
2608
|
+
await client.deviceSpaces.delete('789e0123-e89b-12d3-a456-426614174002');
|
|
2609
|
+
```
|
|
2610
|
+
|
|
2611
|
+
</details>
|
|
2612
|
+
|
|
2613
|
+
---
|
|
2614
|
+
|
|
2615
|
+
# Trip
|
|
2616
|
+
|
|
2617
|
+
## Overview
|
|
2618
|
+
|
|
2619
|
+
The `Trip` class provides methods for managing device trips, including creating, retrieving, updating, listing, and deleting trip records. Trips represent journeys or data collection periods for devices. Below are the details for each method, including parameters, return types, and example usage.
|
|
2620
|
+
|
|
2621
|
+
<details>
|
|
2622
|
+
<summary><strong>create</strong></summary>
|
|
2623
|
+
|
|
2624
|
+
Create a new trip record.
|
|
2625
|
+
|
|
2626
|
+
**Signature:**
|
|
2627
|
+
|
|
2628
|
+
```typescript
|
|
2629
|
+
create(params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams>
|
|
2630
|
+
```
|
|
2631
|
+
|
|
2632
|
+
**Parameters:**
|
|
2633
|
+
|
|
2634
|
+
- `params` _(TripParams)_: Parameters for creating a new trip.
|
|
2635
|
+
- `space_device`: _(string)_: The unique identifier of the device associated with this trip.
|
|
2636
|
+
- `start_at`: _(string)_: The start timestamp of the trip (ISO 8601 format).
|
|
2637
|
+
- `ended_at`: _(string)_: The end timestamp of the trip (ISO 8601 format).
|
|
2638
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2639
|
+
|
|
2640
|
+
**Returns:** `Promise<TripParams>`
|
|
2641
|
+
|
|
2642
|
+
**Example:**
|
|
2643
|
+
|
|
2644
|
+
```typescript
|
|
2645
|
+
const newTrip = await client.trip.create({
|
|
2646
|
+
space_device: 'device-uuid-123',
|
|
2647
|
+
start_at: '2024-01-15T08:00:00Z',
|
|
2648
|
+
ended_at: '2024-01-15T18:30:00Z',
|
|
2649
|
+
});
|
|
2650
|
+
```
|
|
2651
|
+
|
|
2652
|
+
</details>
|
|
2653
|
+
|
|
2654
|
+
<details>
|
|
2655
|
+
<summary><strong>retrieve</strong></summary>
|
|
2656
|
+
|
|
2657
|
+
Retrieve details of a trip by its ID.
|
|
2658
|
+
|
|
2659
|
+
**Signature:**
|
|
2660
|
+
|
|
2661
|
+
```typescript
|
|
2662
|
+
retrieve(id: string, params: { include_transformed_data?: boolean }, options?: Core.RequestOptions): Core.APIPromise<TripParams>
|
|
2663
|
+
```
|
|
2664
|
+
|
|
2665
|
+
**Parameters:**
|
|
2666
|
+
|
|
2667
|
+
- `id` _(string)_: The unique identifier of the trip to retrieve.
|
|
2668
|
+
- `params` _(object)_: Query parameters for the request.
|
|
2669
|
+
- `include_transformed_data` _(boolean, optional)_: Whether to include transformed data in the response.
|
|
2670
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2671
|
+
|
|
2672
|
+
**Returns:** `Promise<TripParams>`
|
|
2673
|
+
|
|
2674
|
+
**Example:**
|
|
2675
|
+
|
|
2676
|
+
```typescript
|
|
2677
|
+
const trip = await client.trip.retrieve('trip-uuid-456', {
|
|
2678
|
+
include_transformed_data: true,
|
|
2679
|
+
});
|
|
2680
|
+
console.log(trip.space_device);
|
|
2681
|
+
```
|
|
2682
|
+
|
|
2683
|
+
</details>
|
|
2684
|
+
|
|
2685
|
+
<details>
|
|
2686
|
+
<summary><strong>list</strong></summary>
|
|
2687
|
+
|
|
2688
|
+
List trips with optional filtering, ordering, and pagination.
|
|
2689
|
+
|
|
2690
|
+
**Signature:**
|
|
2691
|
+
|
|
2692
|
+
```typescript
|
|
2693
|
+
list(params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripListResponse>
|
|
2694
|
+
```
|
|
2695
|
+
|
|
2696
|
+
**Parameters:**
|
|
2697
|
+
|
|
2698
|
+
- `params` _(TripListParams)_: Query parameters for filtering, ordering, and pagination:
|
|
2699
|
+
- `ordering` _(string, optional)_: Which field to use when ordering the results.
|
|
2700
|
+
- `search` _(string, optional)_: A search term to filter results.
|
|
2701
|
+
- `limit` _(integer, optional)_: Number of results to return per page.
|
|
2702
|
+
- `offset` _(integer, optional)_: The initial index from which to return the results.
|
|
2703
|
+
- `include_transformed_data` _(boolean, optional)_: Whether to include transformed data in the response.
|
|
2704
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2705
|
+
|
|
2706
|
+
**Returns:** `Promise<TripListResponse>`
|
|
2707
|
+
|
|
2708
|
+
**Response shape:**
|
|
2709
|
+
|
|
2710
|
+
- `count` _(integer)_: Total number of trips matching the query.
|
|
2711
|
+
- `next` _(string | null)_: URL to the next page of results, or `null`.
|
|
2712
|
+
- `previous` _(string | null)_: URL to the previous page of results, or `null`.
|
|
2713
|
+
- `results` _(TripParams[])_: Array of trip objects.
|
|
2714
|
+
|
|
2715
|
+
**Example:**
|
|
2716
|
+
|
|
2717
|
+
```typescript
|
|
2718
|
+
const listResponse = await client.trip.list({
|
|
2719
|
+
ordering: 'start_at',
|
|
2720
|
+
limit: 20,
|
|
2721
|
+
offset: 0,
|
|
2722
|
+
include_transformed_data: false,
|
|
2723
|
+
});
|
|
2724
|
+
console.log(listResponse.results);
|
|
2725
|
+
```
|
|
2726
|
+
|
|
2727
|
+
</details>
|
|
2728
|
+
|
|
2729
|
+
<details>
|
|
2730
|
+
<summary><strong>update</strong></summary>
|
|
2731
|
+
|
|
2732
|
+
Update an existing trip by its ID (full update).
|
|
2733
|
+
|
|
2734
|
+
**Signature:**
|
|
2735
|
+
|
|
2736
|
+
```typescript
|
|
2737
|
+
update(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams>
|
|
2738
|
+
```
|
|
2739
|
+
|
|
2740
|
+
**Parameters:**
|
|
2741
|
+
|
|
2742
|
+
- `id` _(string)_: The unique identifier of the trip to update.
|
|
2743
|
+
- `params` _(TripParams)_: Parameters for updating the trip.
|
|
2744
|
+
- `space_device`: _(string)_: The unique identifier of the device associated with this trip.
|
|
2745
|
+
- `start_at`: _(string)_: The start timestamp of the trip (ISO 8601 format).
|
|
2746
|
+
- `ended_at`: _(string)_: The end timestamp of the trip (ISO 8601 format).
|
|
2747
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2748
|
+
|
|
2749
|
+
**Returns:** `Promise<TripParams>`
|
|
2750
|
+
|
|
2751
|
+
**Example:**
|
|
2752
|
+
|
|
2753
|
+
```typescript
|
|
2754
|
+
const updatedTrip = await client.trip.update('trip-uuid-456', {
|
|
2755
|
+
space_device: 'device-uuid-123',
|
|
2756
|
+
start_at: '2024-01-15T09:00:00Z',
|
|
2757
|
+
ended_at: '2024-01-15T19:00:00Z',
|
|
2758
|
+
});
|
|
2759
|
+
```
|
|
2760
|
+
|
|
2761
|
+
</details>
|
|
2762
|
+
|
|
2763
|
+
<details>
|
|
2764
|
+
<summary><strong>partialUpdate</strong></summary>
|
|
2765
|
+
|
|
2766
|
+
Partially update an existing trip by its ID.
|
|
2767
|
+
|
|
2768
|
+
**Signature:**
|
|
2769
|
+
|
|
2770
|
+
```typescript
|
|
2771
|
+
partialUpdate(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams>
|
|
2772
|
+
```
|
|
2773
|
+
|
|
2774
|
+
**Parameters:**
|
|
2775
|
+
|
|
2776
|
+
- `id` _(string)_: The unique identifier of the trip to update.
|
|
2777
|
+
- `params` _(TripParams)_: Parameters for partially updating the trip. Only provided fields will be updated.
|
|
2778
|
+
- `space_device`: _(string, optional)_: The unique identifier of the device associated with this trip.
|
|
2779
|
+
- `start_at`: _(string, optional)_: The start timestamp of the trip (ISO 8601 format).
|
|
2780
|
+
- `ended_at`: _(string, optional)_: The end timestamp of the trip (ISO 8601 format).
|
|
2781
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2782
|
+
|
|
2783
|
+
**Returns:** `Promise<TripParams>`
|
|
2784
|
+
|
|
2785
|
+
**Example:**
|
|
2786
|
+
|
|
2787
|
+
```typescript
|
|
2788
|
+
const partiallyUpdatedTrip = await client.trip.partialUpdate('trip-uuid-456', {
|
|
2789
|
+
ended_at: '2024-01-15T20:00:00Z',
|
|
2790
|
+
});
|
|
2791
|
+
```
|
|
2792
|
+
|
|
2793
|
+
</details>
|
|
2794
|
+
|
|
2795
|
+
<details>
|
|
2796
|
+
<summary><strong>delete</strong></summary>
|
|
2797
|
+
|
|
2798
|
+
Delete a trip by its ID.
|
|
2799
|
+
|
|
2800
|
+
**Signature:**
|
|
2801
|
+
|
|
2802
|
+
```typescript
|
|
2803
|
+
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void>
|
|
2804
|
+
```
|
|
2805
|
+
|
|
2806
|
+
**Parameters:**
|
|
2807
|
+
|
|
2808
|
+
- `id` _(string)_: The unique identifier of the trip to delete.
|
|
2809
|
+
- `options` _(Core.RequestOptions)_: Additional request options.
|
|
2810
|
+
|
|
2811
|
+
**Returns:** `Promise<void>`
|
|
2812
|
+
|
|
2813
|
+
**Example:**
|
|
2814
|
+
|
|
2815
|
+
```typescript
|
|
2816
|
+
await client.trip.delete('trip-uuid-456');
|
|
2817
|
+
```
|
|
2818
|
+
|
|
2819
|
+
</details>
|