@taruvi/sdk 1.3.4 → 1.3.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taruvi/sdk",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "Taruvi SDK",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -19,15 +19,17 @@ export class Storage {
19
19
  private operation: HttpMethod | undefined
20
20
  private body: object | undefined
21
21
  private filters: StorageFilters | undefined
22
+ private queryParams: Record<string, string> | undefined
22
23
 
23
24
 
24
- constructor(client: Client, urlParams: BucketUrlParams = {} as BucketUrlParams, operation?: HttpMethod | undefined, body?: object, filters?: StorageFilters) {
25
+ constructor(client: Client, urlParams: BucketUrlParams = {} as BucketUrlParams, operation?: HttpMethod | undefined, body?: object, filters?: StorageFilters, queryParams?: Record<string, string>) {
25
26
  this.client = client
26
27
  this.urlParams = urlParams
27
28
  this.operation = operation
28
29
  this.config = this.client.getConfig()
29
30
  this.body = body
30
31
  this.filters = filters
32
+ this.queryParams = queryParams
31
33
  }
32
34
 
33
35
 
@@ -50,7 +52,7 @@ export class Storage {
50
52
  }
51
53
 
52
54
  download(path: string): Storage {
53
- return new Storage(this.client, { ...this.urlParams, path }, HttpMethod.GET)
55
+ return new Storage(this.client, { ...this.urlParams, path }, HttpMethod.GET, undefined, undefined, { metadata: 'true' })
54
56
  }
55
57
 
56
58
  upload(filesData: { files: File[], metadatas: object[], paths: string[] }): Storage {
@@ -86,7 +88,7 @@ export class Storage {
86
88
  return acc
87
89
  }, '') +
88
90
  '/' +
89
- buildQueryString(this.filters as Record<string, unknown>)
91
+ buildQueryString({ ...this.filters as Record<string, unknown>, ...this.queryParams })
90
92
  )
91
93
  }
92
94