@depup/uploadthing 7.7.4-depup.0

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.
Files changed (113) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +33 -0
  3. package/changes.json +18 -0
  4. package/client/index.cjs +331 -0
  5. package/client/index.d.cts +36 -0
  6. package/client/index.d.cts.map +1 -0
  7. package/client/index.d.ts +36 -0
  8. package/client/index.d.ts.map +1 -0
  9. package/client/index.js +286 -0
  10. package/client/index.js.map +1 -0
  11. package/client-future/index.cjs +426 -0
  12. package/client-future/index.d.cts +373 -0
  13. package/client-future/index.d.cts.map +1 -0
  14. package/client-future/index.d.ts +373 -0
  15. package/client-future/index.d.ts.map +1 -0
  16. package/client-future/index.js +383 -0
  17. package/client-future/index.js.map +1 -0
  18. package/dist/chunk-CUT6urMc.cjs +30 -0
  19. package/dist/deprecations-DPGpmqha.cjs +13 -0
  20. package/dist/deprecations-pLmw6Ytd.js +8 -0
  21. package/dist/deprecations-pLmw6Ytd.js.map +1 -0
  22. package/dist/package-BQ_k22T9.cjs +11 -0
  23. package/dist/package-DpScpvTA.js +6 -0
  24. package/dist/package-DpScpvTA.js.map +1 -0
  25. package/dist/shared-schemas-BmG5ARoX.js +82 -0
  26. package/dist/shared-schemas-BmG5ARoX.js.map +1 -0
  27. package/dist/shared-schemas-CG9VaBtT.cjs +129 -0
  28. package/dist/to-web-request-BQtxSXgE.cjs +98 -0
  29. package/dist/to-web-request-DhP0wXG-.js +87 -0
  30. package/dist/to-web-request-DhP0wXG-.js.map +1 -0
  31. package/dist/types-Bs3w2d_3.d.ts +627 -0
  32. package/dist/types-Bs3w2d_3.d.ts.map +1 -0
  33. package/dist/types-DiVC1t2V.d.cts +625 -0
  34. package/dist/types-DiVC1t2V.d.cts.map +1 -0
  35. package/dist/upload-builder-BUa7tovh.d.cts +32 -0
  36. package/dist/upload-builder-BUa7tovh.d.cts.map +1 -0
  37. package/dist/upload-builder-BcFawEj0.d.ts +32 -0
  38. package/dist/upload-builder-BcFawEj0.d.ts.map +1 -0
  39. package/dist/upload-builder-BlFOAnsv.js +699 -0
  40. package/dist/upload-builder-BlFOAnsv.js.map +1 -0
  41. package/dist/upload-builder-D6Ken9H0.cjs +794 -0
  42. package/dist/ut-reporter-BHoyNnzW.cjs +120 -0
  43. package/dist/ut-reporter-Dlppchbx.js +103 -0
  44. package/dist/ut-reporter-Dlppchbx.js.map +1 -0
  45. package/effect-platform/index.cjs +22 -0
  46. package/effect-platform/index.d.cts +54 -0
  47. package/effect-platform/index.d.cts.map +1 -0
  48. package/effect-platform/index.d.ts +54 -0
  49. package/effect-platform/index.d.ts.map +1 -0
  50. package/effect-platform/index.js +19 -0
  51. package/effect-platform/index.js.map +1 -0
  52. package/express/index.cjs +30 -0
  53. package/express/index.d.cts +28 -0
  54. package/express/index.d.cts.map +1 -0
  55. package/express/index.d.ts +28 -0
  56. package/express/index.d.ts.map +1 -0
  57. package/express/index.js +27 -0
  58. package/express/index.js.map +1 -0
  59. package/fastify/index.cjs +27 -0
  60. package/fastify/index.d.cts +28 -0
  61. package/fastify/index.d.cts.map +1 -0
  62. package/fastify/index.d.ts +28 -0
  63. package/fastify/index.d.ts.map +1 -0
  64. package/fastify/index.js +24 -0
  65. package/fastify/index.js.map +1 -0
  66. package/h3/index.cjs +20 -0
  67. package/h3/index.d.cts +28 -0
  68. package/h3/index.d.cts.map +1 -0
  69. package/h3/index.d.ts +28 -0
  70. package/h3/index.d.ts.map +1 -0
  71. package/h3/index.js +17 -0
  72. package/h3/index.js.map +1 -0
  73. package/next/index.cjs +22 -0
  74. package/next/index.d.cts +30 -0
  75. package/next/index.d.cts.map +1 -0
  76. package/next/index.d.ts +30 -0
  77. package/next/index.d.ts.map +1 -0
  78. package/next/index.js +19 -0
  79. package/next/index.js.map +1 -0
  80. package/next-legacy/index.cjs +28 -0
  81. package/next-legacy/index.d.cts +28 -0
  82. package/next-legacy/index.d.cts.map +1 -0
  83. package/next-legacy/index.d.ts +28 -0
  84. package/next-legacy/index.d.ts.map +1 -0
  85. package/next-legacy/index.js +25 -0
  86. package/next-legacy/index.js.map +1 -0
  87. package/package.json +210 -0
  88. package/remix/index.cjs +22 -0
  89. package/remix/index.d.cts +30 -0
  90. package/remix/index.d.cts.map +1 -0
  91. package/remix/index.d.ts +30 -0
  92. package/remix/index.d.ts.map +1 -0
  93. package/remix/index.js +19 -0
  94. package/remix/index.js.map +1 -0
  95. package/server/index.cjs +414 -0
  96. package/server/index.d.cts +211 -0
  97. package/server/index.d.cts.map +1 -0
  98. package/server/index.d.ts +213 -0
  99. package/server/index.d.ts.map +1 -0
  100. package/server/index.js +405 -0
  101. package/server/index.js.map +1 -0
  102. package/tw/index.cjs +70 -0
  103. package/tw/index.d.cts +29 -0
  104. package/tw/index.d.cts.map +1 -0
  105. package/tw/index.d.ts +29 -0
  106. package/tw/index.d.ts.map +1 -0
  107. package/tw/index.js +74 -0
  108. package/tw/index.js.map +1 -0
  109. package/tw/v4.css +11 -0
  110. package/types/index.cjs +3 -0
  111. package/types/index.d.cts +2 -0
  112. package/types/index.d.ts +2 -0
  113. package/types/index.js +3 -0
@@ -0,0 +1,627 @@
1
+ import { ACL, ContentDisposition, Either, EndpointMetadata, ErrorMessage, ExpandedRouteConfig as ExpandedRouteConfig$1, ExtendObjectIf, FetchEsque, FileRouterInputConfig, Json, JsonObject, MaybePromise, MaybeUrl, RouteOptions, SerializedUploadThingError, Simplify, Time, UploadThingError } from "@uploadthing/shared";
2
+ import "effect/Effect";
3
+ import "@effect/platform/HttpClientResponse";
4
+ import * as Config from "effect/Config";
5
+ import * as Schema$1 from "effect/Schema";
6
+ import { Schema } from "effect/Schema";
7
+ import "effect/Layer";
8
+ import * as LogLevel from "effect/LogLevel";
9
+ import * as Standard from "@standard-schema/spec";
10
+ import { Blob as Blob$1 } from "buffer";
11
+
12
+ //#region src/_internal/logger.d.ts
13
+ declare const LogFormat: Config.Config<"json" | "logFmt" | "structured" | "pretty">;
14
+ type LogFormat = Config.Config.Success<typeof LogFormat>;
15
+ //#endregion
16
+ //#region src/_internal/parser.d.ts
17
+ type ParseFn<TType> = (input: unknown) => Promise<TType>;
18
+ type ParserZodEsque<TInput extends Json, TParsedInput> = {
19
+ _input: TInput;
20
+ _output: TParsedInput;
21
+ parseAsync: ParseFn<TParsedInput>;
22
+ };
23
+ type JsonParser<In extends Json, Out = In> = ParserZodEsque<In, Out> | Standard.StandardSchemaV1<In, Out> | Schema$1.Schema<Out, In>;
24
+ //#endregion
25
+ //#region src/_internal/shared-schemas.d.ts
26
+ declare const UploadThingToken: Schema$1.transform<Schema$1.transform<Schema$1.Schema<Uint8Array<ArrayBufferLike>, string, never>, Schema$1.transform<typeof Schema$1.Uint8ArrayFromSelf, typeof Schema$1.String>>, Schema$1.transform<Schema$1.SchemaClass<unknown, string, never>, Schema$1.Struct<{
27
+ apiKey: Schema$1.Redacted<Schema$1.filter<typeof Schema$1.String>>;
28
+ appId: typeof Schema$1.String;
29
+ regions: Schema$1.NonEmptyArray<typeof Schema$1.String>;
30
+ ingestHost: Schema$1.optionalWith<typeof Schema$1.String, {
31
+ default: () => string;
32
+ }>;
33
+ }>>>;
34
+ declare const FileUploadData_base: Schema$1.Class<FileUploadData, {
35
+ name: typeof Schema$1.String;
36
+ size: typeof Schema$1.Number;
37
+ type: typeof Schema$1.String;
38
+ lastModified: Schema$1.optional<typeof Schema$1.Number>;
39
+ }, Schema$1.Struct.Encoded<{
40
+ name: typeof Schema$1.String;
41
+ size: typeof Schema$1.Number;
42
+ type: typeof Schema$1.String;
43
+ lastModified: Schema$1.optional<typeof Schema$1.Number>;
44
+ }>, never, {
45
+ readonly name: string;
46
+ } & {
47
+ readonly size: number;
48
+ } & {
49
+ readonly type: string;
50
+ } & {
51
+ readonly lastModified?: number | undefined;
52
+ }, {}, {}>;
53
+ /**
54
+ * =============================================================================
55
+ * ======================== File Type Hierarchy ===============================
56
+ * =============================================================================
57
+ */
58
+ /**
59
+ * Properties from the web File object, this is what the client sends when initiating an upload
60
+ */
61
+ declare class FileUploadData extends FileUploadData_base {}
62
+ declare const FileUploadDataWithCustomId_base: Schema$1.Class<FileUploadDataWithCustomId, {
63
+ name: typeof Schema$1.String;
64
+ size: typeof Schema$1.Number;
65
+ type: typeof Schema$1.String;
66
+ lastModified: Schema$1.optional<typeof Schema$1.Number>;
67
+ } & {
68
+ customId: Schema$1.NullOr<typeof Schema$1.String>;
69
+ }, {
70
+ readonly name: string;
71
+ readonly size: number;
72
+ readonly type: string;
73
+ } & {
74
+ readonly lastModified?: number | undefined;
75
+ } & {
76
+ readonly customId: string | null;
77
+ } & {}, never, {
78
+ readonly name: string;
79
+ } & {
80
+ readonly size: number;
81
+ } & {
82
+ readonly type: string;
83
+ } & {
84
+ readonly lastModified?: number | undefined;
85
+ } & {
86
+ readonly customId: string | null;
87
+ }, FileUploadData, {}>;
88
+ /**
89
+ * `.middleware()` can add a customId to the incoming file data
90
+ */
91
+ declare class FileUploadDataWithCustomId extends FileUploadDataWithCustomId_base {}
92
+ declare const UploadedFileData_base: Schema$1.Class<UploadedFileData, {
93
+ name: typeof Schema$1.String;
94
+ size: typeof Schema$1.Number;
95
+ type: typeof Schema$1.String;
96
+ lastModified: Schema$1.optional<typeof Schema$1.Number>;
97
+ } & {
98
+ customId: Schema$1.NullOr<typeof Schema$1.String>;
99
+ } & {
100
+ key: typeof Schema$1.String;
101
+ /**
102
+ * @deprecated
103
+ * This field will be removed in uploadthing v9. Use `ufsUrl` instead.
104
+ */
105
+ url: typeof Schema$1.String;
106
+ /**
107
+ * @deprecated
108
+ * This field will be removed in uploadthing v9. Use `ufsUrl` instead.
109
+ */
110
+ appUrl: typeof Schema$1.String;
111
+ ufsUrl: typeof Schema$1.String;
112
+ fileHash: typeof Schema$1.String;
113
+ }, {
114
+ readonly name: string;
115
+ readonly size: number;
116
+ readonly type: string;
117
+ } & {
118
+ readonly lastModified?: number | undefined;
119
+ } & {
120
+ readonly customId: string | null;
121
+ } & {} & {
122
+ readonly url: string;
123
+ readonly key: string;
124
+ readonly appUrl: string;
125
+ readonly ufsUrl: string;
126
+ readonly fileHash: string;
127
+ } & {}, never, {
128
+ readonly name: string;
129
+ } & {
130
+ readonly size: number;
131
+ } & {
132
+ readonly type: string;
133
+ } & {
134
+ readonly lastModified?: number | undefined;
135
+ } & {
136
+ readonly customId: string | null;
137
+ } & {
138
+ readonly url: string;
139
+ } & {
140
+ readonly key: string;
141
+ } & {
142
+ readonly appUrl: string;
143
+ } & {
144
+ readonly ufsUrl: string;
145
+ } & {
146
+ readonly fileHash: string;
147
+ }, FileUploadDataWithCustomId, {}>;
148
+ /**
149
+ * When files are uploaded, we get back
150
+ * - a key
151
+ * - URLs for the file
152
+ * - the hash (md5-hex) of the uploaded file's contents
153
+ */
154
+ declare class UploadedFileData extends UploadedFileData_base {}
155
+ /**
156
+ * When the client has uploaded a file and polled for data returned by `.onUploadComplete()`
157
+ */
158
+ interface ClientUploadedFileData<T> extends UploadedFileData {
159
+ /**
160
+ * Matches what's returned from the serverside `onUploadComplete` callback
161
+ */
162
+ readonly serverData: T;
163
+ }
164
+ declare const NewPresignedUrl_base: Schema$1.Class<NewPresignedUrl, {
165
+ url: typeof Schema$1.String;
166
+ key: typeof Schema$1.String;
167
+ customId: Schema$1.NullOr<typeof Schema$1.String>;
168
+ name: typeof Schema$1.String;
169
+ }, Schema$1.Struct.Encoded<{
170
+ url: typeof Schema$1.String;
171
+ key: typeof Schema$1.String;
172
+ customId: Schema$1.NullOr<typeof Schema$1.String>;
173
+ name: typeof Schema$1.String;
174
+ }>, never, {
175
+ readonly url: string;
176
+ } & {
177
+ readonly name: string;
178
+ } & {
179
+ readonly customId: string | null;
180
+ } & {
181
+ readonly key: string;
182
+ }, {}, {}>;
183
+ /**
184
+ * =============================================================================
185
+ * ======================== Server Response Schemas ============================
186
+ * =============================================================================
187
+ */
188
+ declare class NewPresignedUrl extends NewPresignedUrl_base {}
189
+ declare const UploadActionPayload_base: Schema$1.Class<UploadActionPayload, {
190
+ files: Schema$1.Array$<typeof FileUploadData>;
191
+ input: Schema$1.Schema<Json>;
192
+ }, Schema$1.Struct.Encoded<{
193
+ files: Schema$1.Array$<typeof FileUploadData>;
194
+ input: Schema$1.Schema<Json>;
195
+ }>, never, {
196
+ readonly input: Json;
197
+ } & {
198
+ readonly files: readonly FileUploadData[];
199
+ }, {}, {}>;
200
+ /**
201
+ * =============================================================================
202
+ * ======================== Client Action Payloads ============================
203
+ * =============================================================================
204
+ */
205
+ declare class UploadActionPayload extends UploadActionPayload_base {}
206
+ //#endregion
207
+ //#region src/_internal/types.d.ts
208
+ type UTRegionAlias = "bom1" | "icn1" | "syd1" | "can1" | "fra1" | "zrh1" | "dub1" | "cle1" | "sfo1" | "sea1";
209
+ /**
210
+ * Marker used to select the region based on the incoming request
211
+ */
212
+ declare const UTRegion: unique symbol;
213
+ /**
214
+ * Marker used to append a `customId` to the incoming file data in `.middleware()`
215
+ * @example
216
+ * ```ts
217
+ * .middleware((opts) => {
218
+ * return {
219
+ * [UTFiles]: opts.files.map((file) => ({
220
+ * ...file,
221
+ * customId: generateId(),
222
+ * }))
223
+ * };
224
+ * })
225
+ * ```
226
+ */
227
+ declare const UTFiles: unique symbol;
228
+ type UnsetMarker = "unsetMarker" & {
229
+ __brand: "unsetMarker";
230
+ };
231
+ type ValidMiddlewareObject = {
232
+ [UTRegion]?: UTRegionAlias;
233
+ [UTFiles]?: Partial<FileUploadDataWithCustomId>[];
234
+ [key: string]: unknown;
235
+ };
236
+ interface AnyParams {
237
+ _routeOptions: any;
238
+ _input: {
239
+ in: any;
240
+ out: any;
241
+ };
242
+ _metadata: any;
243
+ _adapterFnArgs: Record<string, unknown>;
244
+ _errorShape: any;
245
+ _errorFn: any;
246
+ _output: any;
247
+ }
248
+ type MiddlewareFn<TInput extends Json | UnsetMarker, TOutput extends ValidMiddlewareObject, TArgs extends Record<string, unknown>> = (opts: TArgs & {
249
+ files: Schema.Type<typeof UploadActionPayload>["files"];
250
+ input: TInput extends UnsetMarker ? undefined : TInput;
251
+ }) => MaybePromise<TOutput>;
252
+ type UploadCompleteFn<TMetadata, TOutput extends JsonObject | void, TArgs extends Record<string, unknown>> = (opts: TArgs & {
253
+ metadata: TMetadata;
254
+ file: UploadedFileData;
255
+ }) => MaybePromise<TOutput>;
256
+ type UploadErrorFn<TArgs extends Record<string, unknown>> = (input: TArgs & {
257
+ error: UploadThingError;
258
+ fileKey: string;
259
+ }) => MaybePromise<void>;
260
+ interface UploadBuilder<TParams extends AnyParams> {
261
+ input: <TIn extends Json, TOut>(parser: TParams["_input"]["in"] extends UnsetMarker ? JsonParser<TIn, TOut> : ErrorMessage<"input is already set">) => UploadBuilder<{
262
+ _routeOptions: TParams["_routeOptions"];
263
+ _input: {
264
+ in: TIn;
265
+ out: TOut;
266
+ };
267
+ _metadata: TParams["_metadata"];
268
+ _adapterFnArgs: TParams["_adapterFnArgs"];
269
+ _errorShape: TParams["_errorShape"];
270
+ _errorFn: TParams["_errorFn"];
271
+ _output: UnsetMarker;
272
+ }>;
273
+ middleware: <TOutput extends ValidMiddlewareObject>(fn: TParams["_metadata"] extends UnsetMarker ? MiddlewareFn<TParams["_input"]["out"], TOutput, TParams["_adapterFnArgs"]> : ErrorMessage<"middleware is already set">) => UploadBuilder<{
274
+ _routeOptions: TParams["_routeOptions"];
275
+ _input: TParams["_input"];
276
+ _metadata: TOutput;
277
+ _adapterFnArgs: TParams["_adapterFnArgs"];
278
+ _errorShape: TParams["_errorShape"];
279
+ _errorFn: TParams["_errorFn"];
280
+ _output: UnsetMarker;
281
+ }>;
282
+ onUploadError: (fn: TParams["_errorFn"] extends UnsetMarker ? UploadErrorFn<TParams["_adapterFnArgs"]> : ErrorMessage<"onUploadError is already set">) => UploadBuilder<{
283
+ _routeOptions: TParams["_routeOptions"];
284
+ _input: TParams["_input"];
285
+ _metadata: TParams["_metadata"];
286
+ _adapterFnArgs: TParams["_adapterFnArgs"];
287
+ _errorShape: TParams["_errorShape"];
288
+ _errorFn: UploadErrorFn<TParams["_adapterFnArgs"]>;
289
+ _output: UnsetMarker;
290
+ }>;
291
+ onUploadComplete: <TOutput extends JsonObject | void>(fn: UploadCompleteFn<Simplify<TParams["_metadata"] extends UnsetMarker ? undefined : Omit<TParams["_metadata"], typeof UTFiles | typeof UTRegion>>, TOutput, TParams["_adapterFnArgs"]>) => FileRoute<{
292
+ input: TParams["_input"]["in"] extends UnsetMarker ? undefined : TParams["_input"]["in"];
293
+ output: TParams["_routeOptions"]["awaitServerData"] extends false ? null : TOutput extends void | undefined ? null : TOutput;
294
+ errorShape: TParams["_errorShape"];
295
+ }>;
296
+ }
297
+ type AnyBuiltUploaderTypes = {
298
+ input: any;
299
+ output: any;
300
+ errorShape: any;
301
+ };
302
+ interface FileRoute<TTypes extends AnyBuiltUploaderTypes> {
303
+ $types: TTypes;
304
+ routerConfig: FileRouterInputConfig;
305
+ routeOptions: RouteOptions;
306
+ inputParser: JsonParser<any>;
307
+ middleware: MiddlewareFn<any, ValidMiddlewareObject, any>;
308
+ onUploadError: UploadErrorFn<any>;
309
+ errorFormatter: (err: UploadThingError) => any;
310
+ onUploadComplete: UploadCompleteFn<any, any, any>;
311
+ }
312
+ type AnyFileRoute = FileRoute<AnyBuiltUploaderTypes>;
313
+ /**
314
+ * Map actionType to the required payload for that action
315
+ * @todo Look into using @effect/rpc :thinking:
316
+ */
317
+ //#endregion
318
+ //#region src/sdk/types.d.ts
319
+ interface UTApiOptions {
320
+ /**
321
+ * Provide a custom fetch function.
322
+ * @default globalThis.fetch
323
+ */
324
+ fetch?: FetchEsque;
325
+ /**
326
+ * Provide a custom UploadThing token
327
+ * @default process.env.UPLOADTHING_TOKEN
328
+ */
329
+ token?: string;
330
+ /**
331
+ * @default "info"
332
+ */
333
+ logLevel?: LogLevel.Literal;
334
+ /**
335
+ * What format log entries should be in
336
+ * @default "pretty" in development, else "json"
337
+ * @see https://effect.website/docs/guides/observability/logging#built-in-loggers
338
+ */
339
+ logFormat?: Config.Config.Success<typeof LogFormat>;
340
+ /**
341
+ * Set the default key type for file operations. Allows you to set your preferred filter
342
+ * for file keys or custom identifiers without needing to specify it on every call.
343
+ * @default "fileKey"
344
+ */
345
+ defaultKeyType?: "fileKey" | "customId";
346
+ /**
347
+ * URL override for the API server
348
+ */
349
+ apiUrl?: string;
350
+ /**
351
+ * URL override for the ingest server
352
+ */
353
+ ingestUrl?: string;
354
+ /**
355
+ * Hostname override for the CDN hosting the files
356
+ * @default "ufs.sh"
357
+ */
358
+ ufsHost?: string;
359
+ /**
360
+ * Where to put the appId in the URL.
361
+ * @default "subdomain"
362
+ */
363
+ ufsAppIdLocation?: "subdomain" | "path";
364
+ }
365
+ type UrlWithOverrides = {
366
+ url: MaybeUrl;
367
+ name?: string;
368
+ customId?: string;
369
+ };
370
+ type BlobEsque = Blob$1 | Blob;
371
+ type FileEsque = BlobEsque & {
372
+ name: string;
373
+ lastModified?: number;
374
+ customId?: string | null | undefined;
375
+ };
376
+ interface UploadFilesOptions$1 {
377
+ contentDisposition?: ContentDisposition;
378
+ acl?: ACL;
379
+ /**
380
+ * AbortSignal that can be used to cancel the upload
381
+ */
382
+ signal?: AbortSignal;
383
+ /**
384
+ * The number of files to upload concurrently. Must be a positive integer between 1 and 25.
385
+ * @default 1
386
+ */
387
+ concurrency?: number;
388
+ }
389
+ type UploadFileResult = Either<UploadedFileData, SerializedUploadThingError>;
390
+ interface KeyTypeOptionsBase {
391
+ /**
392
+ * Whether the provided key is a fileKey or a custom identifier. fileKey is the
393
+ * identifier you get from UploadThing after uploading a file, customId is a
394
+ * custom identifier you provided when uploading a file.
395
+ * @default fileKey
396
+ */
397
+ keyType?: "fileKey" | "customId";
398
+ }
399
+ interface DeleteFilesOptions extends KeyTypeOptionsBase {}
400
+ interface GetFileUrlsOptions extends KeyTypeOptionsBase {}
401
+ interface ListFilesOptions {
402
+ limit?: number;
403
+ offset?: number;
404
+ }
405
+ type KeyRename = {
406
+ fileKey: string;
407
+ newName: string;
408
+ };
409
+ type CustomIdRename = {
410
+ customId: string;
411
+ newName: string;
412
+ };
413
+ type RenameFileUpdate = KeyRename | CustomIdRename;
414
+ interface GenerateSignedURLOptions {
415
+ /**
416
+ * How long the URL will be valid for.
417
+ * - Must be positive and less than 7 days (604800 seconds).
418
+ * @default 5min
419
+ */
420
+ expiresIn?: Time;
421
+ }
422
+ interface GetSignedURLOptions extends KeyTypeOptionsBase {
423
+ /**
424
+ * How long the URL will be valid for.
425
+ * - Must be positive and less than 7 days (604800 seconds).
426
+ * - You must accept overrides on the UploadThing dashboard for this option to be accepted.
427
+ * @default app default on UploadThing dashboard
428
+ */
429
+ expiresIn?: Time;
430
+ }
431
+ interface ACLUpdateOptions extends KeyTypeOptionsBase {}
432
+ //#endregion
433
+ //#region src/types.d.ts
434
+ type FileRouter = Record<string, AnyFileRoute>;
435
+ type inferEndpointInput<TFileRoute extends AnyFileRoute> = TFileRoute["$types"]["input"];
436
+ type inferEndpointOutput<TFileRoute extends AnyFileRoute> = TFileRoute["$types"]["output"];
437
+ type inferErrorShape<TFileRoute extends AnyFileRoute> = TFileRoute["$types"]["errorShape"];
438
+ type RouteHandlerConfig = {
439
+ logLevel?: LogLevel.Literal;
440
+ /**
441
+ * What format log entries should be in
442
+ * @default "pretty" in development, else "json"
443
+ * @see https://effect.website/docs/guides/observability/logging#built-in-loggers
444
+ */
445
+ logFormat?: LogFormat;
446
+ /**
447
+ * The full, absolute URL to where your route handler is hosted. UploadThing
448
+ * attempts to automatically detect this value based on the request URL and
449
+ * headers. You can override this if the automatic detection fails.
450
+ * @example URL { https://www.example.com/api/uploadthing }
451
+ */
452
+ callbackUrl?: string;
453
+ token?: string;
454
+ /**
455
+ * Used to determine whether to run dev hook or not
456
+ * @default `env.NODE_ENV === "development" || env.NODE_ENV === "dev"`
457
+ */
458
+ isDev?: boolean;
459
+ /**
460
+ * Used to override the fetch implementation
461
+ * @default `globalThis.fetch`
462
+ */
463
+ fetch?: FetchEsque;
464
+ /**
465
+ * Set how UploadThing should handle the daemon promise before returning a response to the client.
466
+ * You can also provide a synchronous function that will be called before returning a response to
467
+ * the client. This can be useful for things like:
468
+ * - [`@vercel/functions.waitUntil`](https://vercel.com/docs/functions/functions-api-reference#waituntil)
469
+ * - [`next/after`](https://nextjs.org/blog/next-15-rc#executing-code-after-a-response-with-nextafter-experimental)
470
+ * - or equivalent function from your serverless infrastructure provider that allows asynchronous streaming
471
+ * If deployed on a stateful server, you most likely want "void" to run the daemon in the background.
472
+ * @remarks - `"await"` is not allowed in development environments
473
+ * @default isDev === true ? "void" : "await"
474
+ */
475
+ handleDaemonPromise?: "void" | "await" | ((promise: Promise<unknown>) => void);
476
+ /**
477
+ * URL override for the ingest server
478
+ */
479
+ ingestUrl?: string;
480
+ };
481
+ type RouteHandlerOptions<TRouter extends FileRouter> = {
482
+ router: TRouter;
483
+ config?: RouteHandlerConfig;
484
+ };
485
+ type UploadFilesOptions<TFileRoute extends AnyFileRoute> = {
486
+ /**
487
+ * The files to upload
488
+ */
489
+ files: File[];
490
+ /**
491
+ * An AbortSignal to cancel the upload
492
+ * Calling `abort()` on the parent AbortController will
493
+ * cause this function to throw an `UploadAbortedError`
494
+ */
495
+ signal?: AbortSignal | undefined;
496
+ /**
497
+ * Called when presigned URLs have been retrieved and the file upload is about to begin
498
+ */
499
+ onUploadBegin?: ((opts: {
500
+ file: string;
501
+ }) => void) | undefined;
502
+ /**
503
+ * Called continuously as the file is uploaded to the storage provider
504
+ */
505
+ onUploadProgress?: ((opts: {
506
+ /** The file that triggered the progress event */
507
+ file: File;
508
+ /** Percentage of the file that has been uploaded */
509
+ progress: number;
510
+ /** Total bytes of the file that has been uploaded */
511
+ loaded: number;
512
+ /** How many bytes have been uploaded since the last progress event for this file */
513
+ delta: number;
514
+ /** Total bytes uploaded for all files in this upload */
515
+ totalLoaded: number;
516
+ /** Percentage of the total loaded bytes for the upload */
517
+ totalProgress: number;
518
+ }) => void) | undefined;
519
+ /**
520
+ * This option has been moved to your serverside route config.
521
+ * Please opt-in by setting `awaitServerData: false` in your route
522
+ * config instead.
523
+ * ### Example
524
+ * ```ts
525
+ * f(
526
+ * { image: { maxFileSize: "1MB" } },
527
+ * { awaitServerData: false }
528
+ * ).middleware(...)
529
+ * ```
530
+ * @deprecated
531
+ * @see https://docs.uploadthing.com/api-reference/server#route-options
532
+ */
533
+ skipPolling?: ErrorMessage<"This option has been moved to your serverside route config. Please use `awaitServerData` in your route config instead.">;
534
+ /**
535
+ * URL to the UploadThing API endpoint
536
+ * @example URL { http://localhost:3000/api/uploadthing }
537
+ * @example URL { https://www.example.com/api/uploadthing }
538
+ * @remarks This option is not required when `uploadFiles` has been generated with `genUploader`
539
+ */
540
+ url: URL;
541
+ /**
542
+ * Set custom headers that'll get sent with requests
543
+ * to your server
544
+ */
545
+ headers?: HeadersInit | (() => MaybePromise<HeadersInit>) | undefined;
546
+ /**
547
+ * The uploadthing package that is making this request, used to identify the client in the server logs
548
+ * @example "@uploadthing/react"
549
+ * @remarks This option is not required when `uploadFiles` has been generated with `genUploader`
550
+ */
551
+ package: string;
552
+ } & ExtendObjectIf<inferEndpointInput<TFileRoute>, {
553
+ input: inferEndpointInput<TFileRoute>;
554
+ }>;
555
+ type CreateUploadOptions<TFileRoute extends AnyFileRoute> = {
556
+ /**
557
+ * The files to upload
558
+ */
559
+ files: File[];
560
+ /**
561
+ * Called continuously as the file is uploaded to the storage provider
562
+ */
563
+ onUploadProgress?: ((opts: {
564
+ /** The file that triggered the progress event */
565
+ file: File;
566
+ /** Percentage of the file that has been uploaded */
567
+ progress: number;
568
+ /** Total bytes of the file that has been uploaded */
569
+ loaded: number;
570
+ /** How many bytes have been uploaded since the last progress event for this file */
571
+ delta: number;
572
+ /** Total bytes uploaded for all files in this upload */
573
+ totalLoaded: number;
574
+ /** Percentage of the total loaded bytes for the upload */
575
+ totalProgress: number;
576
+ }) => void) | undefined;
577
+ /**
578
+ * Set custom headers that'll get sent with requests
579
+ * to your server
580
+ */
581
+ headers?: HeadersInit | (() => MaybePromise<HeadersInit>) | undefined;
582
+ } & ExtendObjectIf<inferEndpointInput<TFileRoute>, {
583
+ input: inferEndpointInput<TFileRoute>;
584
+ }>;
585
+ type GenerateUploaderOptions = {
586
+ /**
587
+ * URL to the UploadThing API endpoint
588
+ * @example /api/uploadthing
589
+ * @example URL { https://www.example.com/api/uploadthing }
590
+ *
591
+ * If relative, host will be inferred from either the `VERCEL_URL` environment variable or `window.location.origin`
592
+ *
593
+ * @default (VERCEL_URL ?? window.location.origin) + "/api/uploadthing"
594
+ */
595
+ url?: string | URL;
596
+ /**
597
+ * Provide a custom fetch implementation.
598
+ * @default `globalThis.fetch`
599
+ * @example
600
+ * ```ts
601
+ * fetch: (input, init) => {
602
+ * if (input.toString().startsWith(MY_SERVER_URL)) {
603
+ * // Include cookies in the request to your API
604
+ * return fetch(input, {
605
+ * ...init,
606
+ * credentials: "include",
607
+ * });
608
+ * }
609
+ *
610
+ * return fetch(input, init);
611
+ * }
612
+ * ```
613
+ */
614
+ fetch?: FetchEsque | undefined;
615
+ /**
616
+ * The uploadthing package that is making this request
617
+ * @example "@uploadthing/react"
618
+ *
619
+ * This is used to identify the client in the server logs
620
+ */
621
+ package?: string;
622
+ };
623
+ type EndpointArg<TRouter extends FileRouter, TEndpoint extends keyof TRouter> = TEndpoint | ((_: RouteRegistry<TRouter>) => TEndpoint);
624
+ type RouteRegistry<TRouter extends FileRouter> = { [k in keyof TRouter]: k };
625
+ //#endregion
626
+ export { ACLUpdateOptions, type AnyFileRoute, type ClientUploadedFileData, CreateUploadOptions, DeleteFilesOptions, EndpointArg, type EndpointMetadata, type ExpandedRouteConfig$1 as ExpandedRouteConfig, FileEsque, type FileRoute, FileRouter, type FileUploadData, type FileUploadDataWithCustomId, GenerateSignedURLOptions, GenerateUploaderOptions, GetFileUrlsOptions, GetSignedURLOptions, ListFilesOptions, type NewPresignedUrl, RenameFileUpdate, RouteHandlerConfig, RouteHandlerOptions, RouteRegistry, UTApiOptions, UTFiles, UTRegion, type UTRegionAlias, UnsetMarker, UploadBuilder, UploadFileResult, UploadFilesOptions, UploadFilesOptions$1, UploadThingToken, type UploadedFileData, UrlWithOverrides, inferEndpointInput, inferEndpointOutput, inferErrorShape };
627
+ //# sourceMappingURL=types-Bs3w2d_3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-Bs3w2d_3.d.ts","names":[],"sources":["../src/_internal/logger.ts","../src/_internal/parser.ts","../src/_internal/shared-schemas.ts","../src/_internal/types.ts","../src/sdk/types.ts","../src/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAsDa,WAAS,MAAA,CAAA;AAAT,KAMD,SAAA,GAAY,MAAA,CAAO,MAAA,CAAO,OANhB,CAAA,OAM+B,SAN/B,CAAA;;;KC9CV,qCAAqC,QAAQ;KAE7C,8BAA8B;UAChC;WACC;cACG,QAAQ;;KAIV,sBAAsB,YAAY,MAC1C,eAAe,IAAI,OACnB,QAAA,CAAS,iBAAiB,IAAI,OAC9B,QAAA,CAAO,OAAO,KAAK;;;AAZX,cC8BC,gBD9BM,EC8BU,QAAA,CAAA,SD9BV,CC8BU,QAAA,CAAA,SD9BV,CC8BU,QAAA,CAAA,MD9BV,CC8BU,UD9BV,CC8BU,eD9BV,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,EC8BU,QAAA,CAAA,SD9BV,CAAA,OC8BU,QAAA,CAAA,kBD9BV,EAAA,OC8BU,QAAA,CAAA,MD9BV,CAAA,CAAA,EC8BU,QAAA,CAAA,SD9BV,CC8BU,QAAA,CAAA,WD9BV,CAAA,OAAA,EAAA,MAAA,EAAA,KAAA,CAAA,EC8BU,QAAA,CAAA,MD9BV,CAAA;EAAA,MAAA,mBAAA,gBAAA,CAAA,OC8BU,QAAA,CAAA,MD9BV,CAAA,CAAA;EAAA,KAAsC,EAAA,sBAAA;EAAK,OAAb,wBAAA,CAAA,sBAAA,CAAA;EAAO,UAAA,uBAAA,CAAA,sBAAA,EAAA;IAE5C,OAAA,EAAA,GAAA,GAAc,MAA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