Skip to content

Commit

Permalink
fix(storage-client): serviceRequest type
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Mar 18, 2023
1 parent 074ef38 commit 66758e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/storage-client/src/storage-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {type FetchOptions, serviceRequest} from '@alwatr/fetch';
import {createLogger, globalAlwatr} from '@alwatr/logger';

import type {AlwatrStorageClientConfig} from './type.js';
import type {AlwatrDocumentObject, AlwatrDocumentStorage} from '@alwatr/type';
import type {AlwatrDocumentObject, AlwatrDocumentStorage, AlwatrServiceResponseSuccessWithMeta} from '@alwatr/type';

export {type AlwatrStorageClientConfig};

Expand Down Expand Up @@ -113,7 +113,7 @@ export class AlwatrStorageClient<DocumentType extends AlwatrDocumentObject = Alw
this._logger.logMethodArgs('get', {storage, documentId});
if (storage == null) throw new Error('storage_not_defined');

const responseJson = await serviceRequest<T>({
const responseJson = await serviceRequest<AlwatrServiceResponseSuccessWithMeta<T>>({
...this.fetchOption,
queryParameters: {
storage,
Expand Down Expand Up @@ -185,7 +185,7 @@ export class AlwatrStorageClient<DocumentType extends AlwatrDocumentObject = Alw
this._logger.logMethodArgs('set', {documentId: documentObject.id});
if (storage == null) throw new Error('storage_not_defined');

const responseJson = await serviceRequest<T>({
const responseJson = await serviceRequest<AlwatrServiceResponseSuccessWithMeta<T>>({
...this.fetchOption,
method: 'PATCH',
queryParameters: {
Expand Down

0 comments on commit 66758e1

Please sign in to comment.