11import { StorageVectorsApiError , StorageVectorsUnknownError } from './errors'
22import { isPlainObject , resolveResponse } from './helpers'
3- import { FetchParameters } from './types'
3+ import { VectorFetchParameters } from './types'
44
55export type Fetch = typeof fetch
66
@@ -69,7 +69,7 @@ const handleError = async (
6969const _getRequestParams = (
7070 method : RequestMethodType ,
7171 options ?: FetchOptions ,
72- parameters ?: FetchParameters ,
72+ parameters ?: VectorFetchParameters ,
7373 body ?: object
7474) => {
7575 const params : { [ k : string ] : any } = { method, headers : options ?. headers || { } }
@@ -103,7 +103,7 @@ async function _handleRequest(
103103 method : RequestMethodType ,
104104 url : string ,
105105 options ?: FetchOptions ,
106- parameters ?: FetchParameters ,
106+ parameters ?: VectorFetchParameters ,
107107 body ?: object
108108) : Promise < any > {
109109 return new Promise ( ( resolve , reject ) => {
@@ -135,7 +135,7 @@ export async function get(
135135 fetcher : Fetch ,
136136 url : string ,
137137 options ?: FetchOptions ,
138- parameters ?: FetchParameters
138+ parameters ?: VectorFetchParameters
139139) : Promise < any > {
140140 return _handleRequest ( fetcher , 'GET' , url , options , parameters )
141141}
@@ -154,7 +154,7 @@ export async function post(
154154 url : string ,
155155 body : object ,
156156 options ?: FetchOptions ,
157- parameters ?: FetchParameters
157+ parameters ?: VectorFetchParameters
158158) : Promise < any > {
159159 return _handleRequest ( fetcher , 'POST' , url , options , parameters , body )
160160}
@@ -173,7 +173,7 @@ export async function put(
173173 url : string ,
174174 body : object ,
175175 options ?: FetchOptions ,
176- parameters ?: FetchParameters
176+ parameters ?: VectorFetchParameters
177177) : Promise < any > {
178178 return _handleRequest ( fetcher , 'PUT' , url , options , parameters , body )
179179}
@@ -192,7 +192,7 @@ export async function remove(
192192 url : string ,
193193 body : object ,
194194 options ?: FetchOptions ,
195- parameters ?: FetchParameters
195+ parameters ?: VectorFetchParameters
196196) : Promise < any > {
197197 return _handleRequest ( fetcher , 'DELETE' , url , options , parameters , body )
198198}
0 commit comments