@space-df/sdk 0.0.1-dev.17 → 0.0.1-dev.19

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 CHANGED
@@ -2618,6 +2618,46 @@ await client.deviceSpaces.delete('789e0123-e89b-12d3-a456-426614174002');
2618
2618
 
2619
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
2620
 
2621
+ ## Types
2622
+
2623
+ ### TripParams
2624
+
2625
+ ```typescript
2626
+ interface TripParams {
2627
+ space_device: string; // The unique identifier of the device associated with this trip
2628
+ start_at: string; // The start timestamp of the trip (ISO 8601 format)
2629
+ ended_at: string; // The end timestamp of the trip (ISO 8601 format)
2630
+ }
2631
+ ```
2632
+
2633
+ ### TripListParams
2634
+
2635
+ ```typescript
2636
+ interface TripListParams extends ListParamsResponse {
2637
+ include_checkpoints?: boolean; // Whether to include checkpoints in the response
2638
+ }
2639
+ ```
2640
+
2641
+ This interface extends `ListParamsResponse` which includes:
2642
+
2643
+ - `limit?: number` - Number of results to return per page
2644
+ - `offset?: number` - The initial index from which to return the results
2645
+ - `ordering?: string` - Which field to use when ordering the results
2646
+ - `search?: string` - A search term to filter results
2647
+
2648
+ ### TripListResponse
2649
+
2650
+ ```typescript
2651
+ type TripListResponse = ListResponse<TripParams>;
2652
+ ```
2653
+
2654
+ Where `ListResponse<T>` includes:
2655
+
2656
+ - `count: number` - Total number of trips matching the query
2657
+ - `results: TripParams[]` - Array of trip objects
2658
+ - `next?: string | null` - URL to the next page of results, or null
2659
+ - `previous?: string | null` - URL to the previous page of results, or null
2660
+
2621
2661
  <details>
2622
2662
  <summary><strong>create</strong></summary>
2623
2663
 
@@ -2659,14 +2699,18 @@ Retrieve details of a trip by its ID.
2659
2699
  **Signature:**
2660
2700
 
2661
2701
  ```typescript
2662
- retrieve(id: string, params: { include_transformed_data?: boolean }, options?: Core.RequestOptions): Core.APIPromise<TripParams>
2702
+ retrieve(id: string, params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripParams>
2663
2703
  ```
2664
2704
 
2665
2705
  **Parameters:**
2666
2706
 
2667
2707
  - `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.
2708
+ - `params` _(TripListParams)_: Query parameters for the request.
2709
+ - `include_checkpoints` _(boolean, optional)_: Whether to include checkpoints in the response.
2710
+ - `ordering` _(string, optional)_: Which field to use when ordering the results.
2711
+ - `search` _(string, optional)_: A search term to filter results.
2712
+ - `limit` _(integer, optional)_: Number of results to return per page.
2713
+ - `offset` _(integer, optional)_: The initial index from which to return the results.
2670
2714
  - `options` _(Core.RequestOptions)_: Additional request options.
2671
2715
 
2672
2716
  **Returns:** `Promise<TripParams>`
@@ -2675,7 +2719,7 @@ retrieve(id: string, params: { include_transformed_data?: boolean }, options?: C
2675
2719
 
2676
2720
  ```typescript
2677
2721
  const trip = await client.trip.retrieve('trip-uuid-456', {
2678
- include_transformed_data: true,
2722
+ include_checkpoints: true,
2679
2723
  });
2680
2724
  console.log(trip.space_device);
2681
2725
  ```
@@ -2690,17 +2734,18 @@ List trips with optional filtering, ordering, and pagination.
2690
2734
  **Signature:**
2691
2735
 
2692
2736
  ```typescript
2693
- list(params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripListResponse>
2737
+ list(params: TripListParams & { space_device__device_id: string }, options?: Core.RequestOptions): Core.APIPromise<TripListResponse>
2694
2738
  ```
2695
2739
 
2696
2740
  **Parameters:**
2697
2741
 
2698
- - `params` _(TripListParams)_: Query parameters for filtering, ordering, and pagination:
2742
+ - `params` _(TripListParams & { space_device\_\_device_id: string })_: Query parameters for filtering, ordering, and pagination:
2743
+ - `space_device__device_id` _(string)_: **Required.** The device ID to filter trips by.
2699
2744
  - `ordering` _(string, optional)_: Which field to use when ordering the results.
2700
2745
  - `search` _(string, optional)_: A search term to filter results.
2701
2746
  - `limit` _(integer, optional)_: Number of results to return per page.
2702
2747
  - `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.
2748
+ - `include_checkpoints` _(boolean, optional)_: Whether to include checkpoints in the response.
2704
2749
  - `options` _(Core.RequestOptions)_: Additional request options.
2705
2750
 
2706
2751
  **Returns:** `Promise<TripListResponse>`
@@ -2716,10 +2761,11 @@ list(params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<Tri
2716
2761
 
2717
2762
  ```typescript
2718
2763
  const listResponse = await client.trip.list({
2764
+ space_device__device_id: 'device-uuid-123',
2719
2765
  ordering: 'start_at',
2720
2766
  limit: 20,
2721
2767
  offset: 0,
2722
- include_transformed_data: false,
2768
+ include_checkpoints: false,
2723
2769
  });
2724
2770
  console.log(listResponse.results);
2725
2771
  ```
@@ -2768,16 +2814,16 @@ Partially update an existing trip by its ID.
2768
2814
  **Signature:**
2769
2815
 
2770
2816
  ```typescript
2771
- partialUpdate(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams>
2817
+ partialUpdate(id: string, params: Partial<TripParams>, options?: Core.RequestOptions): Core.APIPromise<TripParams>
2772
2818
  ```
2773
2819
 
2774
2820
  **Parameters:**
2775
2821
 
2776
2822
  - `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).
2823
+ - `params` _(Partial<TripParams>)_: Parameters for partially updating the trip. Only provided fields will be updated.
2824
+ - `space_device` _(string, optional)_: The unique identifier of the device associated with this trip.
2825
+ - `start_at` _(string, optional)_: The start timestamp of the trip (ISO 8601 format).
2826
+ - `ended_at` _(string, optional)_: The end timestamp of the trip (ISO 8601 format).
2781
2827
  - `options` _(Core.RequestOptions)_: Additional request options.
2782
2828
 
2783
2829
  **Returns:** `Promise<TripParams>`
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@space-df/sdk",
3
- "version": "0.0.1-dev.17",
3
+ "version": "0.0.1-dev.19",
4
4
  "description": "The official TypeScript library for the Spacedf SDK API",
5
5
  "author": "Spacedf SDK <support@digitalfortress.dev>",
6
6
  "types": "./index.d.ts",
@@ -5,7 +5,7 @@ const resource_1 = require("../../resource.js");
5
5
  class DeviceSpaces extends resource_1.APIResource {
6
6
  create(params, options) {
7
7
  const { ...body } = params;
8
- return this._client.post(`/device-spaces/`, {
8
+ return this._client.post(`/device-spaces`, {
9
9
  body,
10
10
  ...options,
11
11
  headers: { ...options?.headers },
@@ -13,14 +13,14 @@ class DeviceSpaces extends resource_1.APIResource {
13
13
  }
14
14
  list(params, options) {
15
15
  const { ...query } = params;
16
- return this._client.get(`/device-spaces/`, {
16
+ return this._client.get(`/device-spaces`, {
17
17
  query,
18
18
  ...options,
19
19
  headers: { ...options?.headers },
20
20
  });
21
21
  }
22
22
  delete(id, options) {
23
- return this._client.delete(`/device-spaces/${id}/`, {
23
+ return this._client.delete(`/device-spaces/${id}`, {
24
24
  ...options,
25
25
  headers: { Accept: '*/*', ...options?.headers },
26
26
  });
@@ -1 +1 @@
1
- {"version":3,"file":"device-spaces.js","sourceRoot":"","sources":["../../src/resources/device/device-spaces.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;AAI7C,MAAa,YAAa,SAAQ,sBAAW;IACzC,MAAM,CAAC,MAA0B,EAAE,OAA6B;QAC5D,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,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,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,EAAE,EAAE;YAC/C,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAClD,CAAC,CAAC;IACP,CAAC;CACJ;AAzBD,oCAyBC"}
@@ -2,7 +2,7 @@ import { APIResource } from "../../resource.mjs";
2
2
  export class DeviceSpaces extends APIResource {
3
3
  create(params, options) {
4
4
  const { ...body } = params;
5
- return this._client.post(`/device-spaces/`, {
5
+ return this._client.post(`/device-spaces`, {
6
6
  body,
7
7
  ...options,
8
8
  headers: { ...options?.headers },
@@ -10,14 +10,14 @@ export class DeviceSpaces extends APIResource {
10
10
  }
11
11
  list(params, options) {
12
12
  const { ...query } = params;
13
- return this._client.get(`/device-spaces/`, {
13
+ return this._client.get(`/device-spaces`, {
14
14
  query,
15
15
  ...options,
16
16
  headers: { ...options?.headers },
17
17
  });
18
18
  }
19
19
  delete(id, options) {
20
- return this._client.delete(`/device-spaces/${id}/`, {
20
+ return this._client.delete(`/device-spaces/${id}`, {
21
21
  ...options,
22
22
  headers: { Accept: '*/*', ...options?.headers },
23
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"device-spaces.mjs","sourceRoot":"","sources":["../../src/resources/device/device-spaces.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,YAAa,SAAQ,WAAW;IACzC,MAAM,CAAC,MAA0B,EAAE,OAA6B;QAC5D,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;IAED,IAA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AAI,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,EAAE,EAAE;YAC/C,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAClD,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -2,14 +2,14 @@ import { APIResource } from "../../resource.js";
2
2
  import { ListParamsResponse, ListResponse } from "../../types/api.js";
3
3
  import * as Core from "../../core.js";
4
4
  interface TripListParams extends ListParamsResponse {
5
- include_transformed_data?: boolean;
5
+ include_checkpoints?: boolean;
6
6
  }
7
7
  export declare class Trip extends APIResource {
8
8
  create(params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams>;
9
- retrieve(id: string, params: {
10
- include_transformed_data?: boolean;
11
- }, options?: Core.RequestOptions): Core.APIPromise<TripParams>;
12
- list(params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripListResponse>;
9
+ retrieve(id: string, params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripParams>;
10
+ list(params: TripListParams & {
11
+ space_device__device_id: string;
12
+ }, options?: Core.RequestOptions): Core.APIPromise<TripListResponse>;
13
13
  delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void>;
14
14
  partialUpdate(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams>;
15
15
  update(id: string, params: TripParams, options?: Core.RequestOptions): Core.APIPromise<TripParams>;
@@ -1 +1 @@
1
- {"version":3,"file":"trip.d.ts","sourceRoot":"","sources":["../../src/resources/device/trip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,UAAU,cAAe,SAAQ,kBAAkB;IAC/C,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,qBAAa,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{ ListParamsResponse, ListResponse } from '../../types/api';
5
5
  export class DeviceSpaces extends APIResource {
6
6
  create(params: DeviceSpacesParams, options?: Core.RequestOptions): Core.APIPromise<DeviceSpacesParams> {
7
7
  const { ...body } = params;
8
- return this._client.post(`/device-spaces/`, {
8
+ return this._client.post(`/device-spaces`, {
9
9
  body,
10
10
  ...options,
11
11
  headers: { ...options?.headers },
@@ -14,7 +14,7 @@ export class DeviceSpaces extends APIResource {
14
14
 
15
15
  list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<DeviceSpacesListResponse> {
16
16
  const { ...query } = params;
17
- return this._client.get(`/device-spaces/`, {
17
+ return this._client.get(`/device-spaces`, {
18
18
  query,
19
19
  ...options,
20
20
  headers: { ...options?.headers },
@@ -22,7 +22,7 @@ export class DeviceSpaces extends APIResource {
22
22
  }
23
23
 
24
24
  delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
25
- return this._client.delete(`/device-spaces/${id}/`, {
25
+ return this._client.delete(`/device-spaces/${id}`, {
26
26
  ...options,
27
27
  headers: { Accept: '*/*', ...options?.headers },
28
28
  });
@@ -3,7 +3,7 @@ import { ListParamsResponse, ListResponse } from '../../types/api';
3
3
  import * as Core from '../../core';
4
4
 
5
5
  interface TripListParams extends ListParamsResponse {
6
- include_transformed_data?: boolean;
6
+ include_checkpoints?: boolean;
7
7
  }
8
8
 
9
9
  export class Trip extends APIResource {
@@ -15,7 +15,7 @@ export class Trip extends APIResource {
15
15
  });
16
16
  }
17
17
 
18
- retrieve(id: string, params: { include_transformed_data?: boolean }, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
18
+ retrieve(id: string, params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
19
19
  return this._client.get(`/trips/${id}/`, {
20
20
  query: params,
21
21
  ...options,
@@ -23,7 +23,12 @@ export class Trip extends APIResource {
23
23
  });
24
24
  }
25
25
 
26
- list(params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripListResponse> {
26
+ list(
27
+ params: TripListParams & {
28
+ space_device__device_id: string;
29
+ },
30
+ options?: Core.RequestOptions,
31
+ ): Core.APIPromise<TripListResponse> {
27
32
  return this._client.get(`/trips/`, {
28
33
  query: params,
29
34
  ...options,
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.17';
1
+ export const VERSION = '0.0.1-dev.19';
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.1-dev.17";
1
+ export declare const VERSION = "0.0.1-dev.19";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.0.1-dev.17';
4
+ exports.VERSION = '0.0.1-dev.19';
5
5
  //# sourceMappingURL=version.js.map
package/dist/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.0.1-dev.17';
1
+ export const VERSION = '0.0.1-dev.19';
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@space-df/sdk",
3
- "version": "0.0.1-dev.17",
3
+ "version": "0.0.1-dev.19",
4
4
  "description": "The official TypeScript library for the Spacedf SDK API",
5
5
  "author": "Spacedf SDK <support@digitalfortress.dev>",
6
6
  "types": "dist/index.d.ts",
@@ -5,7 +5,7 @@ import { ListParamsResponse, ListResponse } from '../../types/api';
5
5
  export class DeviceSpaces extends APIResource {
6
6
  create(params: DeviceSpacesParams, options?: Core.RequestOptions): Core.APIPromise<DeviceSpacesParams> {
7
7
  const { ...body } = params;
8
- return this._client.post(`/device-spaces/`, {
8
+ return this._client.post(`/device-spaces`, {
9
9
  body,
10
10
  ...options,
11
11
  headers: { ...options?.headers },
@@ -14,7 +14,7 @@ export class DeviceSpaces extends APIResource {
14
14
 
15
15
  list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<DeviceSpacesListResponse> {
16
16
  const { ...query } = params;
17
- return this._client.get(`/device-spaces/`, {
17
+ return this._client.get(`/device-spaces`, {
18
18
  query,
19
19
  ...options,
20
20
  headers: { ...options?.headers },
@@ -22,7 +22,7 @@ export class DeviceSpaces extends APIResource {
22
22
  }
23
23
 
24
24
  delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
25
- return this._client.delete(`/device-spaces/${id}/`, {
25
+ return this._client.delete(`/device-spaces/${id}`, {
26
26
  ...options,
27
27
  headers: { Accept: '*/*', ...options?.headers },
28
28
  });
@@ -3,7 +3,7 @@ import { ListParamsResponse, ListResponse } from '../../types/api';
3
3
  import * as Core from '../../core';
4
4
 
5
5
  interface TripListParams extends ListParamsResponse {
6
- include_transformed_data?: boolean;
6
+ include_checkpoints?: boolean;
7
7
  }
8
8
 
9
9
  export class Trip extends APIResource {
@@ -15,7 +15,7 @@ export class Trip extends APIResource {
15
15
  });
16
16
  }
17
17
 
18
- retrieve(id: string, params: { include_transformed_data?: boolean }, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
18
+ retrieve(id: string, params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripParams> {
19
19
  return this._client.get(`/trips/${id}/`, {
20
20
  query: params,
21
21
  ...options,
@@ -23,7 +23,12 @@ export class Trip extends APIResource {
23
23
  });
24
24
  }
25
25
 
26
- list(params: TripListParams, options?: Core.RequestOptions): Core.APIPromise<TripListResponse> {
26
+ list(
27
+ params: TripListParams & {
28
+ space_device__device_id: string;
29
+ },
30
+ options?: Core.RequestOptions,
31
+ ): Core.APIPromise<TripListResponse> {
27
32
  return this._client.get(`/trips/`, {
28
33
  query: params,
29
34
  ...options,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.17';
1
+ export const VERSION = '0.0.1-dev.19';