harvester_sdk 1.0.32 → 1.0.34

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/README.md CHANGED
@@ -13,4 +13,6 @@ yarn add asfur
13
13
  ## Usage
14
14
 
15
15
  ```typescript
16
- import { SourceType, TextType, QueryType } from 'asfur';
16
+ import { SourceType, TextType, QueryType } from 'asfur';
17
+
18
+ 449e23ff02a38b4cfe852a41014d51badff248c6
package/dist/sdk.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { RegionType, GeoType, DataType, platformsList } from './types';
2
+ import { RegionType, DataType, platformsList, GeoSelectionType } from './types';
3
3
  export interface HarvesterSDKConfig {
4
4
  baseUrl: string;
5
5
  apiKey?: string;
@@ -76,6 +76,12 @@ export interface TokenCountResult {
76
76
  data_url_tokens: number;
77
77
  documents_count: number;
78
78
  }
79
+ export interface GeoSelectionWithRegion extends GeoSelectionType {
80
+ region?: {
81
+ _id: string;
82
+ name: string;
83
+ };
84
+ }
79
85
  /**
80
86
  * Harvester SDK - Client for interacting with the Harvester API
81
87
  *
@@ -136,7 +142,7 @@ export declare class HarvesterSDK {
136
142
  * const geos = await harvester.getGeosByRegion('region-id', { limit: 50 });
137
143
  * ```
138
144
  */
139
- getGeosByRegion(regionId: string, params?: PaginationParams): Promise<PaginatedResponse<GeoType>>;
145
+ getGeosByRegions(regionIds: string, params?: PaginationParams): Promise<PaginatedResponse<GeoSelectionWithRegion>>;
140
146
  /**
141
147
  * Get data with filters
142
148
  *
package/dist/sdk.js CHANGED
@@ -97,8 +97,8 @@ class HarvesterSDK {
97
97
  * const geos = await harvester.getGeosByRegion('region-id', { limit: 50 });
98
98
  * ```
99
99
  */
100
- async getGeosByRegion(regionId, params) {
101
- const response = await this.client.get(`/geo-selections/${regionId}`, {
100
+ async getGeosByRegions(regionIds, params) {
101
+ const response = await this.client.get(`/geo-selections/${regionIds}`, {
102
102
  params: this.buildQueryParams(params),
103
103
  });
104
104
  return response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harvester_sdk",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "SDK for interacting with the Harvester API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/sdk.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
2
- import { RegionType, GeoType, DataType, platformsList } from './types';
2
+ import { RegionType, GeoType, DataType, platformsList, GeoSelectionType } from './types';
3
3
 
4
4
  // SDK Configuration
5
5
  export interface HarvesterSDKConfig {
@@ -108,6 +108,10 @@ export interface TokenCountResult {
108
108
  documents_count: number;
109
109
  }
110
110
 
111
+ export interface GeoSelectionWithRegion extends GeoSelectionType {
112
+ region?: { _id: string; name: string };
113
+ }
114
+
111
115
  /**
112
116
  * Harvester SDK - Client for interacting with the Harvester API
113
117
  *
@@ -221,12 +225,14 @@ export class HarvesterSDK {
221
225
  * const geos = await harvester.getGeosByRegion('region-id', { limit: 50 });
222
226
  * ```
223
227
  */
224
- async getGeosByRegion(
225
- regionId: string,
228
+
229
+
230
+ async getGeosByRegions(
231
+ regionIds: string,
226
232
  params?: PaginationParams
227
- ): Promise<PaginatedResponse<GeoType>> {
228
- const response = await this.client.get<PaginatedResponse<GeoType>>(
229
- `/geo-selections/${regionId}`,
233
+ ): Promise<PaginatedResponse<GeoSelectionWithRegion>> {
234
+ const response = await this.client.get<PaginatedResponse<GeoSelectionWithRegion>>(
235
+ `/geo-selections/${regionIds}`,
230
236
  {
231
237
  params: this.buildQueryParams(params),
232
238
  }