@vercel/blob
Advanced tools
Comparing version 0.16.1 to 0.16.2
@@ -10,3 +10,3 @@ import * as stream from 'stream'; | ||
} | ||
declare const put: (pathname: string, body: string | stream.Readable | Blob | ArrayBuffer | FormData | ReadableStream<any> | File, options?: ClientPutCommandOptions | undefined) => Promise<PutBlobResult>; | ||
declare const put: <TPath extends string>(pathname: TPath, bodyOrOptions: TPath extends `${string}/` ? ClientPutCommandOptions : string | stream.Readable | Blob | ArrayBuffer | FormData | ReadableStream<any> | File, optionsInput?: ClientPutCommandOptions | undefined) => Promise<PutBlobResult>; | ||
interface UploadOptions { | ||
@@ -40,3 +40,3 @@ /** | ||
*/ | ||
declare const upload: (pathname: string, body: string | stream.Readable | Blob | ArrayBuffer | FormData | ReadableStream<any> | File, options?: UploadOptions | undefined) => Promise<PutBlobResult>; | ||
declare const upload: <TPath extends string>(pathname: TPath, bodyOrOptions: TPath extends `${string}/` ? UploadOptions : string | stream.Readable | Blob | ArrayBuffer | FormData | ReadableStream<any> | File, optionsInput?: UploadOptions | undefined) => Promise<PutBlobResult>; | ||
type DecodedClientTokenPayload = Omit<GenerateClientTokenOptions, 'token'> & { | ||
@@ -43,0 +43,0 @@ validUntil: number; |
@@ -5,3 +5,3 @@ import { | ||
getTokenFromOptionsOrEnv | ||
} from "./chunk-TNXTKW4D.js"; | ||
} from "./chunk-WKFHZNPG.js"; | ||
@@ -8,0 +8,0 @@ // src/client.ts |
@@ -102,8 +102,8 @@ import { B as BlobCommandOptions, C as CreateBlobCommandOptions, P as PutCommandOptions, a as PutBlobResult } from './put-FLtdezzu.js'; | ||
* | ||
* @param pathname - The pathname to upload the blob to. This includes the filename. | ||
* @param body - The contents of your blob. This has to be a supported fetch body type https://developer.mozilla.org/en-US/docs/Web/API/fetch#body. | ||
* @param options - Additional options like `token` or `contentType`. | ||
* @param pathname - The pathname to upload the blob to. For file upload this includes the filename. Pathnames that end with a slash are treated as folder creations. | ||
* @param bodyOrOptions - Either the contents of your blob or the options object. For file uploads this has to be a supported fetch body type https://developer.mozilla.org/en-US/docs/Web/API/fetch#body. For folder creations this is the options object since no body is required. | ||
* @param options - Additional options like `token` or `contentType` for file uploads. For folder creations this argument can be ommited. | ||
*/ | ||
declare const put: (pathname: string, body: string | stream.Readable | Blob | ArrayBuffer | FormData | ReadableStream<any> | File, options?: PutCommandOptions | undefined) => Promise<PutBlobResult>; | ||
declare const put: <TPath extends string>(pathname: TPath, bodyOrOptions: TPath extends `${string}/` ? PutCommandOptions : string | stream.Readable | Blob | ArrayBuffer | FormData | ReadableStream<any> | File, optionsInput?: PutCommandOptions | undefined) => Promise<PutBlobResult>; | ||
export { type CopyBlobResult, type CopyCommandOptions, type HeadBlobResult, type ListBlobResult, type ListBlobResultBlob, type ListCommandOptions, type ListFoldedBlobResult, PutBlobResult, PutCommandOptions, copy, del, head, list, put }; |
@@ -14,3 +14,3 @@ import { | ||
validateBlobApiResponse | ||
} from "./chunk-TNXTKW4D.js"; | ||
} from "./chunk-WKFHZNPG.js"; | ||
@@ -17,0 +17,0 @@ // src/del.ts |
{ | ||
"name": "@vercel/blob", | ||
"version": "0.16.1", | ||
"version": "0.16.2", | ||
"description": "The Vercel Blob JavaScript API client", | ||
@@ -5,0 +5,0 @@ "homepage": "https://vercel.com/storage/blob", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
164682
1340