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