@visulima/storage 1.0.9 → 1.0.10
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/CHANGELOG.md +7 -0
- package/dist/adapter/nuxt/module.d.ts +8 -8
- package/dist/ai/ai-sdk/index.d.ts +51 -59
- package/dist/ai/claude/index.d.ts +104 -119
- package/dist/ai/openai/index.d.ts +86 -99
- package/dist/ai/tanstack/index.d.ts +53 -61
- package/dist/handler/http/fetch/index.d.ts +201 -201
- package/dist/handler/http/hono/index.d.ts +59 -59
- package/dist/handler/http/nextjs/index.d.ts +54 -54
- package/dist/handler/http/node/index.d.ts +233 -246
- package/dist/handler/http/solid-start/index.d.ts +54 -54
- package/dist/index.d.ts +70 -70
- package/dist/index.js +1 -1
- package/dist/packem_shared/{AwsLightStorage-BK-WPL0h.js → AwsLightStorage-EsqkAtU5.js} +1 -1
- package/dist/packem_shared/{AzureStorage-1UvDIQZd.js → AzureStorage-DL-U7qFG.js} +1 -1
- package/dist/packem_shared/BoxMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{BoxStorage-DbGqBLux.js → BoxStorage-B8_oCz27.js} +1 -1
- package/dist/packem_shared/BunS3MetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{BunS3Storage-DNvimm9e.js → BunS3Storage-_PVXu_na.js} +1 -1
- package/dist/packem_shared/BunnyMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{BunnyStorage-C7d0opLL.js → BunnyStorage-BsoWjScH.js} +1 -1
- package/dist/packem_shared/CloudinaryMetaStorage-BI9YXcwU.js +1 -0
- package/dist/packem_shared/{CloudinaryStorage-Dc3XA2lP.js → CloudinaryStorage-BNwiLF9V.js} +1 -1
- package/dist/packem_shared/{DiskStorage-CI07TVNu.js → DiskStorage-D-NtQDms.js} +1 -1
- package/dist/packem_shared/{DiskStorageWithChecksum-vFCubS6K.js → DiskStorageWithChecksum-UnCtyEvs.js} +1 -1
- package/dist/packem_shared/DropboxMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{DropboxStorage-CY9Ggu3m.js → DropboxStorage-BS9kj0nH.js} +1 -1
- package/dist/packem_shared/FirebaseMetaStorage-BI9YXcwU.js +1 -0
- package/dist/packem_shared/{FirebaseStorage-D6O9CJXN.js → FirebaseStorage-DNquii2p.js} +1 -1
- package/dist/packem_shared/FtpMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{FtpStorage-DbEjbq8z.js → FtpStorage-Bd004--s.js} +1 -1
- package/dist/packem_shared/{GCSMetaStorage-DT8K6zdm.js → GCSMetaStorage-Bf4qDFB1.js} +1 -1
- package/dist/packem_shared/{GCStorage-6BHkFlEs.js → GCStorage-ChqEpgqR.js} +1 -1
- package/dist/packem_shared/GoogleDriveMetaStorage-xlHfKwmR.js +1 -0
- package/dist/packem_shared/{GoogleDriveStorage-Bklsz7Bh.js → GoogleDriveStorage-v1glykjd.js} +1 -1
- package/dist/packem_shared/{LocalMetaStorage-BhicZnNl.js → LocalMetaStorage-YWPBYEe7.js} +1 -1
- package/dist/packem_shared/NetlifyBlobMetaStorage-BI9YXcwU.js +1 -0
- package/dist/packem_shared/{NetlifyBlobStorage-CkpCCoN1.js → NetlifyBlobStorage-BPyEWSnx.js} +1 -1
- package/dist/packem_shared/OneDriveMetaStorage-xlHfKwmR.js +1 -0
- package/dist/packem_shared/{OneDriveStorage-CP6MvGAa.js → OneDriveStorage-BJ3Kzxc5.js} +1 -1
- package/dist/packem_shared/PocketBaseMetaStorage-DnrxOQhO.js +1 -0
- package/dist/packem_shared/{PocketBaseStorage-2qhbI2PW.js → PocketBaseStorage-DqKHbbvn.js} +1 -1
- package/dist/packem_shared/{S3Storage-YGeNk3Tt.js → S3Storage-BiI2k6d1.js} +1 -1
- package/dist/packem_shared/SftpMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{SftpStorage-2Hz396Xr.js → SftpStorage-w8XdtZtw.js} +1 -1
- package/dist/packem_shared/SharePointMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{SharePointStorage-CrX2Pk6C.js → SharePointStorage-DpDpI7Ln.js} +1 -1
- package/dist/packem_shared/SupabaseMetaStorage-xlHfKwmR.js +1 -0
- package/dist/packem_shared/{SupabaseStorage-Dc_DBX29.js → SupabaseStorage-B_ugUCs7.js} +1 -1
- package/dist/packem_shared/UploadThingMetaStorage-BI9YXcwU.js +1 -0
- package/dist/packem_shared/{UploadThingStorage-BChykYSe.js → UploadThingStorage-_H45IVqX.js} +1 -1
- package/dist/packem_shared/VercelBlobMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{VercelBlobStorage-CsRyPfw3.js → VercelBlobStorage-U1YMKeHs.js} +1 -1
- package/dist/packem_shared/{approval.d-CMAYH9GF.d.ts → approval.d-C-d-t94D.d.ts} +6 -6
- package/dist/packem_shared/disk-storage-BwPk2IRa.js +1 -0
- package/dist/packem_shared/disk-storage-with-checksum.d-CQucFacO.d.ts +146 -0
- package/dist/packem_shared/{executors.d-BZP2rWo3.d.ts → executors.d-DeDH3Ilt.d.ts} +2 -2
- package/dist/packem_shared/files.d-D8H_ge9Y.d.ts +655 -0
- package/dist/packem_shared/{gcs-meta-storage-B7BnctnV.js → gcs-meta-storage-DQGu_cHq.js} +1 -1
- package/dist/packem_shared/local-meta-storage-DJDcuxf1.js +11 -0
- package/dist/packem_shared/{local-meta-storage.d-D9PBfkn6.d.ts → local-meta-storage.d-DuTEzyii.d.ts} +7 -7
- package/dist/packem_shared/media-transformer.d-CvMFjINm.d.ts +331 -0
- package/dist/packem_shared/{memory-storage.d-4EU1cMt1.d.ts → memory-storage.d-BRdTiY8y.d.ts} +32 -40
- package/dist/packem_shared/{s3-base-storage-BoTyhuzO.js → s3-base-storage-CMUui93V.js} +1 -1
- package/dist/packem_shared/{s3-base-storage.d-BQgP5B-t.d.ts → s3-base-storage.d-Cg7m4FuH.d.ts} +64 -70
- package/dist/packem_shared/storage.d-DIav_lF1.d.ts +1163 -0
- package/dist/packem_shared/tus-base.d-BiEg5t4t.d.ts +102 -0
- package/dist/packem_shared/{types.d-CrUWY4On.d.ts → types.d-CAAzKiI6.d.ts} +134 -134
- package/dist/packem_shared/types.d-DgHhkCAl.d.ts +104 -0
- package/dist/packem_shared/{types.d-CggTCgXr.d.ts → types.d-jAs_Rp_v.d.ts} +3 -3
- package/dist/storage/aws/clients/index.d.ts +388 -388
- package/dist/storage/aws/index.d.ts +109 -113
- package/dist/storage/aws/index.js +1 -1
- package/dist/storage/aws-light/index.d.ts +63 -67
- package/dist/storage/aws-light/index.js +1 -1
- package/dist/storage/azure/index.d.ts +133 -139
- package/dist/storage/azure/index.js +1 -1
- package/dist/storage/box/index.d.ts +88 -92
- package/dist/storage/box/index.js +1 -1
- package/dist/storage/bun-s3/index.d.ts +70 -76
- package/dist/storage/bun-s3/index.js +1 -1
- package/dist/storage/bunny/index.d.ts +51 -55
- package/dist/storage/bunny/index.js +1 -1
- package/dist/storage/cloudinary/index.d.ts +53 -59
- package/dist/storage/cloudinary/index.js +1 -1
- package/dist/storage/dropbox/index.d.ts +58 -62
- package/dist/storage/dropbox/index.js +1 -1
- package/dist/storage/firebase/index.d.ts +73 -79
- package/dist/storage/firebase/index.js +1 -1
- package/dist/storage/ftp/index.d.ts +37 -43
- package/dist/storage/ftp/index.js +1 -1
- package/dist/storage/gcs/index.d.ts +89 -95
- package/dist/storage/gcs/index.js +1 -1
- package/dist/storage/google-drive/index.d.ts +68 -72
- package/dist/storage/google-drive/index.js +1 -1
- package/dist/storage/local/index.d.ts +3 -3
- package/dist/storage/local/index.js +1 -1
- package/dist/storage/memory/index.d.ts +2 -2
- package/dist/storage/netlify-blob/index.d.ts +85 -93
- package/dist/storage/netlify-blob/index.js +1 -1
- package/dist/storage/onedrive/index.d.ts +43 -53
- package/dist/storage/onedrive/index.js +1 -1
- package/dist/storage/pocketbase/index.d.ts +66 -72
- package/dist/storage/pocketbase/index.js +1 -1
- package/dist/storage/sftp/index.d.ts +39 -45
- package/dist/storage/sftp/index.js +1 -1
- package/dist/storage/sharepoint/index.d.ts +95 -95
- package/dist/storage/sharepoint/index.js +1 -1
- package/dist/storage/supabase/index.d.ts +49 -55
- package/dist/storage/supabase/index.js +1 -1
- package/dist/storage/uploadthing/index.d.ts +33 -37
- package/dist/storage/uploadthing/index.js +1 -1
- package/dist/storage/vercel-blob/index.d.ts +109 -115
- package/dist/storage/vercel-blob/index.js +1 -1
- package/dist/transformer/audio-transformer.d.ts +96 -96
- package/dist/transformer/image-transformer.d.ts +422 -422
- package/dist/transformer/index.d.ts +34 -34
- package/dist/transformer/video-transformer.d.ts +111 -111
- package/package.json +1 -1
- package/dist/packem_shared/BoxMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/BunS3MetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/BunnyMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/CloudinaryMetaStorage-DPVnmNe5.js +0 -1
- package/dist/packem_shared/DropboxMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/FirebaseMetaStorage-DPVnmNe5.js +0 -1
- package/dist/packem_shared/FtpMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/GoogleDriveMetaStorage-Cbwa1CHV.js +0 -1
- package/dist/packem_shared/NetlifyBlobMetaStorage-DPVnmNe5.js +0 -1
- package/dist/packem_shared/OneDriveMetaStorage-Cbwa1CHV.js +0 -1
- package/dist/packem_shared/PocketBaseMetaStorage-DOTLwVE7.js +0 -1
- package/dist/packem_shared/SftpMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/SharePointMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/SupabaseMetaStorage-Cbwa1CHV.js +0 -1
- package/dist/packem_shared/UploadThingMetaStorage-DPVnmNe5.js +0 -1
- package/dist/packem_shared/VercelBlobMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/disk-storage-CsQcYW3s.js +0 -1
- package/dist/packem_shared/disk-storage-with-checksum.d-B-VGEsfl.d.ts +0 -156
- package/dist/packem_shared/files.d-CH0iLBNC.d.ts +0 -655
- package/dist/packem_shared/local-meta-storage-iuJnu90B.js +0 -11
- package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +0 -331
- package/dist/packem_shared/storage.d-CEM1upWM.d.ts +0 -1176
- package/dist/packem_shared/tus-base.d-DLzKE54M.d.ts +0 -106
- package/dist/packem_shared/types.d-Bon9GVVe.d.ts +0 -104
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Cache, F as File, g as FileReturn, B as BaseStorage } from "./storage.d-
|
|
1
|
+
import { C as Cache, F as File, g as FileReturn, B as BaseStorage } from "./storage.d-DIav_lF1.js";
|
|
2
2
|
import { Readable } from 'node:stream';
|
|
3
3
|
/**
|
|
4
|
-
* Base transformer configuration with common properties
|
|
5
|
-
*/
|
|
4
|
+
* Base transformer configuration with common properties
|
|
5
|
+
*/
|
|
6
6
|
interface BaseTransformerConfig {
|
|
7
7
|
/** Cache instance to use for caching */
|
|
8
8
|
cache?: Cache;
|
|
@@ -16,73 +16,73 @@ interface BaseTransformerConfig {
|
|
|
16
16
|
supportedFormats?: string[] | undefined;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Abstract base class for all media transformers.
|
|
20
|
-
*
|
|
21
|
-
* Provides a common interface and shared functionality for image, video, and audio transformers.
|
|
22
|
-
* All transformers must implement the abstract methods defined here.
|
|
23
|
-
*/
|
|
19
|
+
* Abstract base class for all media transformers.
|
|
20
|
+
*
|
|
21
|
+
* Provides a common interface and shared functionality for image, video, and audio transformers.
|
|
22
|
+
* All transformers must implement the abstract methods defined here.
|
|
23
|
+
*/
|
|
24
24
|
declare abstract class BaseTransformer<Config extends BaseTransformerConfig, CacheValue extends object, TFile extends File = File, TFileReturn extends FileReturn = FileReturn> {
|
|
25
25
|
protected readonly storage: BaseStorage<TFile, TFileReturn>;
|
|
26
26
|
protected config: Config;
|
|
27
27
|
protected logger?: Console;
|
|
28
28
|
protected cache?: Cache<string, CacheValue>;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
* Creates a new BaseTransformer instance with common functionality.
|
|
31
|
+
* @param storage The storage backend for retrieving and storing files.
|
|
32
|
+
* @param config Configuration options for the transformer.
|
|
33
|
+
* @param logger Optional logger instance for logging operations.
|
|
34
|
+
* @protected
|
|
35
|
+
*/
|
|
36
36
|
protected constructor(storage: BaseStorage<TFile, TFileReturn>, config: Config, logger?: Console);
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
* Transforms a file with the given steps.
|
|
39
|
+
* @param fileId Unique identifier of the file to transform.
|
|
40
|
+
* @param steps Array of transformation steps to apply.
|
|
41
|
+
* @returns Promise resolving to transformation result.
|
|
42
|
+
*/
|
|
43
43
|
abstract transform(fileId: string, steps: any[]): Promise<any>;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
* Streams transform of a file with the given steps (for large files).
|
|
46
|
+
* @param fileId Unique identifier of the file to transform.
|
|
47
|
+
* @param steps Array of transformation steps to apply.
|
|
48
|
+
* @returns Promise resolving to streaming result with headers, size, and stream.
|
|
49
|
+
*/
|
|
50
50
|
transformStream?(fileId: string, steps: any[]): Promise<{
|
|
51
51
|
headers?: Record<string, string>;
|
|
52
52
|
size?: number;
|
|
53
53
|
stream: Readable;
|
|
54
54
|
}>;
|
|
55
55
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
* Clears cache for a specific file or all files.
|
|
57
|
+
*
|
|
58
|
+
* Cache keys are `${fileId}:${stepsHash}` (see `generateCacheKey` in subclasses),
|
|
59
|
+
* so per-file invalidation must iterate keys to find every transform of `fileId`.
|
|
60
|
+
* Falls back to a full `clear()` when the underlying cache doesn't expose `keys()`.
|
|
61
|
+
* @param fileId Optional file identifier to clear cache for specific file.
|
|
62
|
+
*/
|
|
63
63
|
clearCache(fileId?: string): void;
|
|
64
64
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
* Gets cache statistics.
|
|
66
|
+
* @returns Cache statistics including max size and current size.
|
|
67
|
+
*/
|
|
68
68
|
getCacheStats(): {
|
|
69
69
|
maxSize: number;
|
|
70
70
|
size: number;
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
* Gets content type from transformation result based on format.
|
|
74
|
+
* @param result Transformation result object containing format information.
|
|
75
|
+
* @returns Content type string (MIME type).
|
|
76
|
+
*/
|
|
77
77
|
protected getContentTypeFromResult(result: any): string;
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
|
-
* Supported image formats for transformation
|
|
81
|
-
*/
|
|
80
|
+
* Supported image formats for transformation
|
|
81
|
+
*/
|
|
82
82
|
type ImageFormat = "jpeg" | "png" | "webp" | "avif" | "tiff" | "gif";
|
|
83
83
|
/**
|
|
84
|
-
* Image transformation options
|
|
85
|
-
*/
|
|
84
|
+
* Image transformation options
|
|
85
|
+
*/
|
|
86
86
|
interface TransformOptions {
|
|
87
87
|
/** Quality of alpha layer for WebP (0-100) */
|
|
88
88
|
alphaQuality?: number;
|
|
@@ -104,8 +104,8 @@ interface TransformOptions {
|
|
|
104
104
|
quality?: number;
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
|
-
* Sharpen transformation options
|
|
108
|
-
*/
|
|
107
|
+
* Sharpen transformation options
|
|
108
|
+
*/
|
|
109
109
|
interface SharpenOptions extends TransformOptions {
|
|
110
110
|
/** M1 for sharpen formula */
|
|
111
111
|
m1?: number;
|
|
@@ -121,8 +121,8 @@ interface SharpenOptions extends TransformOptions {
|
|
|
121
121
|
y3?: number;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
|
-
* Blur transformation options
|
|
125
|
-
*/
|
|
124
|
+
* Blur transformation options
|
|
125
|
+
*/
|
|
126
126
|
interface BlurOptions extends TransformOptions {
|
|
127
127
|
/** M1 for blur formula */
|
|
128
128
|
m1?: number;
|
|
@@ -138,15 +138,15 @@ interface BlurOptions extends TransformOptions {
|
|
|
138
138
|
y3?: number;
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
|
-
* Median transformation options
|
|
142
|
-
*/
|
|
141
|
+
* Median transformation options
|
|
142
|
+
*/
|
|
143
143
|
interface MedianOptions extends TransformOptions {
|
|
144
144
|
/** Size of the median filter */
|
|
145
145
|
size?: number;
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
|
-
* CLAHE (Contrast Limited Adaptive Histogram Equalization) options
|
|
149
|
-
*/
|
|
148
|
+
* CLAHE (Contrast Limited Adaptive Histogram Equalization) options
|
|
149
|
+
*/
|
|
150
150
|
interface CLAHEOptions extends TransformOptions {
|
|
151
151
|
/** Height of the tile grid */
|
|
152
152
|
height?: number;
|
|
@@ -156,8 +156,8 @@ interface CLAHEOptions extends TransformOptions {
|
|
|
156
156
|
width?: number;
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
|
-
* Convolve transformation options
|
|
160
|
-
*/
|
|
159
|
+
* Convolve transformation options
|
|
160
|
+
*/
|
|
161
161
|
interface ConvolveOptions extends TransformOptions {
|
|
162
162
|
/** Height of the kernel in pixels */
|
|
163
163
|
height?: number;
|
|
@@ -171,8 +171,8 @@ interface ConvolveOptions extends TransformOptions {
|
|
|
171
171
|
width?: number;
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
174
|
-
* Threshold transformation options
|
|
175
|
-
*/
|
|
174
|
+
* Threshold transformation options
|
|
175
|
+
*/
|
|
176
176
|
interface ThresholdOptions extends TransformOptions {
|
|
177
177
|
/** Alternative spelling for greyscale */
|
|
178
178
|
grayscale?: boolean;
|
|
@@ -182,8 +182,8 @@ interface ThresholdOptions extends TransformOptions {
|
|
|
182
182
|
threshold?: number;
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
185
|
-
* Boolean operation options
|
|
186
|
-
*/
|
|
185
|
+
* Boolean operation options
|
|
186
|
+
*/
|
|
187
187
|
interface BooleanOptions extends TransformOptions {
|
|
188
188
|
/** Operand image buffer or path */
|
|
189
189
|
operand: Buffer | string;
|
|
@@ -197,8 +197,8 @@ interface BooleanOptions extends TransformOptions {
|
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
-
* Linear transformation options
|
|
201
|
-
*/
|
|
200
|
+
* Linear transformation options
|
|
201
|
+
*/
|
|
202
202
|
interface LinearOptions extends TransformOptions {
|
|
203
203
|
/** Multiplier values (per channel or single value) */
|
|
204
204
|
a?: number | number[];
|
|
@@ -206,15 +206,15 @@ interface LinearOptions extends TransformOptions {
|
|
|
206
206
|
b?: number | number[];
|
|
207
207
|
}
|
|
208
208
|
/**
|
|
209
|
-
* Recombine transformation options
|
|
210
|
-
*/
|
|
209
|
+
* Recombine transformation options
|
|
210
|
+
*/
|
|
211
211
|
interface RecombineOptions extends TransformOptions {
|
|
212
212
|
/** 3x3 or 4x4 recombination matrix */
|
|
213
213
|
matrix: number[][];
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
|
-
* Modulate transformation options
|
|
217
|
-
*/
|
|
216
|
+
* Modulate transformation options
|
|
217
|
+
*/
|
|
218
218
|
interface ModulateOptions extends TransformOptions {
|
|
219
219
|
/** Brightness multiplier */
|
|
220
220
|
brightness?: number;
|
|
@@ -226,15 +226,15 @@ interface ModulateOptions extends TransformOptions {
|
|
|
226
226
|
saturation?: number;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
|
-
* Tint transformation options
|
|
230
|
-
*/
|
|
229
|
+
* Tint transformation options
|
|
230
|
+
*/
|
|
231
231
|
interface TintOptions extends TransformOptions {
|
|
232
232
|
/** RGB tint values */
|
|
233
233
|
rgb: [number, number, number] | string;
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
|
-
* Greyscale transformation options
|
|
237
|
-
*/
|
|
236
|
+
* Greyscale transformation options
|
|
237
|
+
*/
|
|
238
238
|
interface GreyscaleOptions extends TransformOptions {
|
|
239
239
|
/** Alternative spelling */
|
|
240
240
|
grayscale?: boolean;
|
|
@@ -242,36 +242,36 @@ interface GreyscaleOptions extends TransformOptions {
|
|
|
242
242
|
greyscale?: boolean;
|
|
243
243
|
}
|
|
244
244
|
/**
|
|
245
|
-
* Colourspace transformation options
|
|
246
|
-
*/
|
|
245
|
+
* Colourspace transformation options
|
|
246
|
+
*/
|
|
247
247
|
interface ColourspaceOptions extends TransformOptions {
|
|
248
248
|
/** Target colourspace */
|
|
249
249
|
colourspace: "srgb" | "rgb" | "cmyk" | "lab" | "b-w";
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
|
-
* Channel extraction options
|
|
253
|
-
*/
|
|
252
|
+
* Channel extraction options
|
|
253
|
+
*/
|
|
254
254
|
interface ExtractChannelOptions extends TransformOptions {
|
|
255
255
|
/** Channel to extract (0-3 for RGBA) */
|
|
256
256
|
channel: number;
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
|
-
* Options for joining multiple images as color channels into a single image.
|
|
260
|
-
*/
|
|
259
|
+
* Options for joining multiple images as color channels into a single image.
|
|
260
|
+
*/
|
|
261
261
|
interface JoinChannelOptions extends TransformOptions {
|
|
262
262
|
/** Images to join as channels */
|
|
263
263
|
images: (Buffer | string)[];
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
|
-
* Options for performing boolean operations on image bands.
|
|
267
|
-
*/
|
|
266
|
+
* Options for performing boolean operations on image bands.
|
|
267
|
+
*/
|
|
268
268
|
interface BandboolOptions extends TransformOptions {
|
|
269
269
|
/** Boolean operation: and, or, eor */
|
|
270
270
|
operator: "and" | "or" | "eor";
|
|
271
271
|
}
|
|
272
272
|
/**
|
|
273
|
-
* Options for applying affine transformations (rotation, scaling, shearing, translation) to images.
|
|
274
|
-
*/
|
|
273
|
+
* Options for applying affine transformations (rotation, scaling, shearing, translation) to images.
|
|
274
|
+
*/
|
|
275
275
|
interface AffineOptions extends TransformOptions {
|
|
276
276
|
/** Background color for areas outside the transformed image */
|
|
277
277
|
background?: string;
|
|
@@ -281,50 +281,50 @@ interface AffineOptions extends TransformOptions {
|
|
|
281
281
|
matrix: [number, number, number, number, number, number];
|
|
282
282
|
}
|
|
283
283
|
/**
|
|
284
|
-
* Options for applying morphological dilation operation to images.
|
|
285
|
-
*/
|
|
284
|
+
* Options for applying morphological dilation operation to images.
|
|
285
|
+
*/
|
|
286
286
|
interface DilateOptions extends TransformOptions {
|
|
287
287
|
/** Kernel size for dilation */
|
|
288
288
|
kernelSize?: number;
|
|
289
289
|
}
|
|
290
290
|
/**
|
|
291
|
-
* Options for applying morphological erosion operation to images.
|
|
292
|
-
*/
|
|
291
|
+
* Options for applying morphological erosion operation to images.
|
|
292
|
+
*/
|
|
293
293
|
interface ErodeOptions extends TransformOptions {
|
|
294
294
|
/** Kernel size for erosion */
|
|
295
295
|
kernelSize?: number;
|
|
296
296
|
}
|
|
297
297
|
/**
|
|
298
|
-
* Options for setting the colourspace used for internal processing pipeline operations.
|
|
299
|
-
*/
|
|
298
|
+
* Options for setting the colourspace used for internal processing pipeline operations.
|
|
299
|
+
*/
|
|
300
300
|
interface PipelineColourspaceOptions extends TransformOptions {
|
|
301
301
|
/** Colourspace for internal operations */
|
|
302
302
|
colourspace: "rgb" | "srgb" | "cmyk" | "lab" | "b-w";
|
|
303
303
|
}
|
|
304
304
|
/**
|
|
305
|
-
* Options for converting images to a target colourspace.
|
|
306
|
-
*/
|
|
305
|
+
* Options for converting images to a target colourspace.
|
|
306
|
+
*/
|
|
307
307
|
interface ToColourspaceOptions extends TransformOptions {
|
|
308
308
|
/** Target colourspace */
|
|
309
309
|
colourspace: "srgb" | "rgb" | "cmyk" | "lab" | "b-w";
|
|
310
310
|
}
|
|
311
311
|
/**
|
|
312
|
-
* Remove alpha channel options
|
|
313
|
-
*/
|
|
312
|
+
* Remove alpha channel options
|
|
313
|
+
*/
|
|
314
314
|
interface RemoveAlphaOptions extends TransformOptions {
|
|
315
315
|
/** Background color to composite over alpha channel */
|
|
316
316
|
background?: string;
|
|
317
317
|
}
|
|
318
318
|
/**
|
|
319
|
-
* Ensure alpha channel options
|
|
320
|
-
*/
|
|
319
|
+
* Ensure alpha channel options
|
|
320
|
+
*/
|
|
321
321
|
interface EnsureAlphaOptions extends TransformOptions {
|
|
322
322
|
/** Alpha channel value to add */
|
|
323
323
|
alpha?: number;
|
|
324
324
|
}
|
|
325
325
|
/**
|
|
326
|
-
* Resize transformation options
|
|
327
|
-
*/
|
|
326
|
+
* Resize transformation options
|
|
327
|
+
*/
|
|
328
328
|
interface ResizeOptions extends TransformOptions {
|
|
329
329
|
/** Background color for fill fit */
|
|
330
330
|
background?: string;
|
|
@@ -346,8 +346,8 @@ interface ResizeOptions extends TransformOptions {
|
|
|
346
346
|
withoutReduction?: boolean;
|
|
347
347
|
}
|
|
348
348
|
/**
|
|
349
|
-
* Crop transformation options
|
|
350
|
-
*/
|
|
349
|
+
* Crop transformation options
|
|
350
|
+
*/
|
|
351
351
|
interface CropOptions extends TransformOptions {
|
|
352
352
|
/** Crop area height */
|
|
353
353
|
height: number;
|
|
@@ -359,8 +359,8 @@ interface CropOptions extends TransformOptions {
|
|
|
359
359
|
width: number;
|
|
360
360
|
}
|
|
361
361
|
/**
|
|
362
|
-
* Rotate transformation options
|
|
363
|
-
*/
|
|
362
|
+
* Rotate transformation options
|
|
363
|
+
*/
|
|
364
364
|
interface RotateOptions extends TransformOptions {
|
|
365
365
|
/** Rotation angle in degrees. Note: angles other than 90°, 180°, and 270° require interpolation and may affect image quality */
|
|
366
366
|
angle: number;
|
|
@@ -368,22 +368,22 @@ interface RotateOptions extends TransformOptions {
|
|
|
368
368
|
background?: string;
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
371
|
-
* Transformation pipeline step
|
|
372
|
-
*/
|
|
371
|
+
* Transformation pipeline step
|
|
372
|
+
*/
|
|
373
373
|
interface TransformationStep {
|
|
374
374
|
options: TransformOptions | ResizeOptions | CropOptions | RotateOptions | SharpenOptions | BlurOptions | MedianOptions | CLAHEOptions | ConvolveOptions | ThresholdOptions | BooleanOptions | LinearOptions | RecombineOptions | ModulateOptions | TintOptions | GreyscaleOptions | ColourspaceOptions | ExtractChannelOptions | JoinChannelOptions | BandboolOptions | AffineOptions | DilateOptions | ErodeOptions | PipelineColourspaceOptions | ToColourspaceOptions | RemoveAlphaOptions | EnsureAlphaOptions;
|
|
375
375
|
type: "resize" | "crop" | "rotate" | "format" | "quality" | "sharpen" | "blur" | "median" | "clahe" | "convolve" | "threshold" | "boolean" | "linear" | "recombine" | "modulate" | "tint" | "greyscale" | "colourspace" | "extractChannel" | "joinChannel" | "bandbool" | "autoOrient" | "flip" | "flop" | "affine" | "dilate" | "erode" | "pipelineColourspace" | "toColourspace" | "removeAlpha" | "ensureAlpha" | "flatten" | "unflatten" | "gamma" | "negate" | "normalise" | "normalize";
|
|
376
376
|
}
|
|
377
377
|
/**
|
|
378
|
-
* Generic transformation pipeline step (for any media type)
|
|
379
|
-
*/
|
|
378
|
+
* Generic transformation pipeline step (for any media type)
|
|
379
|
+
*/
|
|
380
380
|
interface MediaTransformationStep {
|
|
381
381
|
options: TransformOptions | ResizeOptions | CropOptions | RotateOptions | SharpenOptions | BlurOptions | MedianOptions | CLAHEOptions | ConvolveOptions | ThresholdOptions | BooleanOptions | LinearOptions | RecombineOptions | ModulateOptions | TintOptions | GreyscaleOptions | ColourspaceOptions | ExtractChannelOptions | JoinChannelOptions | BandboolOptions | VideoTransformOptions | VideoResizeOptions | VideoCropOptions | VideoRotateOptions | AudioTransformOptions | AudioChannelMixOptions | AudioResampleOptions;
|
|
382
382
|
type: "resize" | "crop" | "rotate" | "format" | "quality" | "sharpen" | "blur" | "median" | "clahe" | "convolve" | "threshold" | "boolean" | "linear" | "recombine" | "modulate" | "tint" | "greyscale" | "colourspace" | "extractChannel" | "joinChannel" | "bandbool" | "autoOrient" | "flip" | "flop" | "affine" | "dilate" | "erode" | "flatten" | "unflatten" | "gamma" | "negate" | "normalise" | "normalize" | "codec" | "bitrate" | "frameRate" | "resample" | "channels";
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
385
|
-
* Video transformation options
|
|
386
|
-
*/
|
|
385
|
+
* Video transformation options
|
|
386
|
+
*/
|
|
387
387
|
interface VideoTransformOptions extends TransformOptions {
|
|
388
388
|
/** Video bitrate */
|
|
389
389
|
bitrate?: number;
|
|
@@ -395,8 +395,8 @@ interface VideoTransformOptions extends TransformOptions {
|
|
|
395
395
|
keyFrameInterval?: number;
|
|
396
396
|
}
|
|
397
397
|
/**
|
|
398
|
-
* Audio transformation options
|
|
399
|
-
*/
|
|
398
|
+
* Audio transformation options
|
|
399
|
+
*/
|
|
400
400
|
interface AudioTransformOptions extends TransformOptions {
|
|
401
401
|
/** Audio bitrate */
|
|
402
402
|
bitrate?: number;
|
|
@@ -408,8 +408,8 @@ interface AudioTransformOptions extends TransformOptions {
|
|
|
408
408
|
sampleRate?: number;
|
|
409
409
|
}
|
|
410
410
|
/**
|
|
411
|
-
* Video resize transformation options
|
|
412
|
-
*/
|
|
411
|
+
* Video resize transformation options
|
|
412
|
+
*/
|
|
413
413
|
interface VideoResizeOptions extends VideoTransformOptions {
|
|
414
414
|
/** Resize fit mode */
|
|
415
415
|
fit?: "cover" | "contain" | "fill" | "inside" | "outside";
|
|
@@ -425,8 +425,8 @@ interface VideoResizeOptions extends VideoTransformOptions {
|
|
|
425
425
|
withoutReduction?: boolean;
|
|
426
426
|
}
|
|
427
427
|
/**
|
|
428
|
-
* Video crop transformation options
|
|
429
|
-
*/
|
|
428
|
+
* Video crop transformation options
|
|
429
|
+
*/
|
|
430
430
|
interface VideoCropOptions extends VideoTransformOptions {
|
|
431
431
|
/** Crop area height */
|
|
432
432
|
height: number;
|
|
@@ -438,8 +438,8 @@ interface VideoCropOptions extends VideoTransformOptions {
|
|
|
438
438
|
width: number;
|
|
439
439
|
}
|
|
440
440
|
/**
|
|
441
|
-
* Video rotate transformation options
|
|
442
|
-
*/
|
|
441
|
+
* Video rotate transformation options
|
|
442
|
+
*/
|
|
443
443
|
interface VideoRotateOptions extends VideoTransformOptions {
|
|
444
444
|
/** Rotation angle in degrees. Note: angles other than 90°, 180°, and 270° require interpolation and may affect video quality */
|
|
445
445
|
angle: number;
|
|
@@ -447,36 +447,36 @@ interface VideoRotateOptions extends VideoTransformOptions {
|
|
|
447
447
|
background?: string;
|
|
448
448
|
}
|
|
449
449
|
/**
|
|
450
|
-
* Audio channel mix transformation options
|
|
451
|
-
*/
|
|
450
|
+
* Audio channel mix transformation options
|
|
451
|
+
*/
|
|
452
452
|
interface AudioChannelMixOptions extends AudioTransformOptions {
|
|
453
453
|
/** Number of output channels */
|
|
454
454
|
numberOfChannels: number;
|
|
455
455
|
}
|
|
456
456
|
/**
|
|
457
|
-
* Audio resample transformation options
|
|
458
|
-
*/
|
|
457
|
+
* Audio resample transformation options
|
|
458
|
+
*/
|
|
459
459
|
interface AudioResampleOptions extends AudioTransformOptions {
|
|
460
460
|
/** Output sample rate in Hz */
|
|
461
461
|
sampleRate: number;
|
|
462
462
|
}
|
|
463
463
|
/**
|
|
464
|
-
* Video transformation pipeline step
|
|
465
|
-
*/
|
|
464
|
+
* Video transformation pipeline step
|
|
465
|
+
*/
|
|
466
466
|
interface VideoTransformationStep {
|
|
467
467
|
options: VideoTransformOptions | VideoResizeOptions | VideoCropOptions | VideoRotateOptions;
|
|
468
468
|
type: "resize" | "crop" | "rotate" | "format" | "codec" | "bitrate" | "frameRate";
|
|
469
469
|
}
|
|
470
470
|
/**
|
|
471
|
-
* Audio transformation pipeline step
|
|
472
|
-
*/
|
|
471
|
+
* Audio transformation pipeline step
|
|
472
|
+
*/
|
|
473
473
|
interface AudioTransformationStep {
|
|
474
474
|
options: AudioTransformOptions | AudioChannelMixOptions | AudioResampleOptions;
|
|
475
475
|
type: "resample" | "channels" | "format" | "codec" | "bitrate";
|
|
476
476
|
}
|
|
477
477
|
/**
|
|
478
|
-
* Image transformation result
|
|
479
|
-
*/
|
|
478
|
+
* Image transformation result
|
|
479
|
+
*/
|
|
480
480
|
interface TransformResult<TFileReturn extends FileReturn = FileReturn> {
|
|
481
481
|
/** Transformed image buffer */
|
|
482
482
|
buffer: Buffer;
|
|
@@ -492,8 +492,8 @@ interface TransformResult<TFileReturn extends FileReturn = FileReturn> {
|
|
|
492
492
|
width: number;
|
|
493
493
|
}
|
|
494
494
|
/**
|
|
495
|
-
* Video transformation result
|
|
496
|
-
*/
|
|
495
|
+
* Video transformation result
|
|
496
|
+
*/
|
|
497
497
|
interface VideoTransformResult<TFileReturn extends FileReturn = FileReturn> extends TransformResult<TFileReturn> {
|
|
498
498
|
/** Video bitrate */
|
|
499
499
|
bitrate?: number;
|
|
@@ -501,8 +501,8 @@ interface VideoTransformResult<TFileReturn extends FileReturn = FileReturn> exte
|
|
|
501
501
|
duration: number;
|
|
502
502
|
}
|
|
503
503
|
/**
|
|
504
|
-
* Audio transformation result
|
|
505
|
-
*/
|
|
504
|
+
* Audio transformation result
|
|
505
|
+
*/
|
|
506
506
|
interface AudioTransformResult<TFileReturn extends FileReturn = FileReturn> extends Omit<TransformResult<TFileReturn>, "width" | "height"> {
|
|
507
507
|
/** Audio bitrate */
|
|
508
508
|
bitrate?: number;
|
|
@@ -514,8 +514,8 @@ interface AudioTransformResult<TFileReturn extends FileReturn = FileReturn> exte
|
|
|
514
514
|
sampleRate: number;
|
|
515
515
|
}
|
|
516
516
|
/**
|
|
517
|
-
* Media transformer configuration (unified config for all transformers)
|
|
518
|
-
*/
|
|
517
|
+
* Media transformer configuration (unified config for all transformers)
|
|
518
|
+
*/
|
|
519
519
|
interface MediaTransformerConfig<TFile extends File = File, TFileReturn extends FileReturn = FileReturn> {
|
|
520
520
|
/** Default audio bitrate */
|
|
521
521
|
audioBitrate?: number;
|
|
@@ -553,8 +553,8 @@ interface MediaTransformerConfig<TFile extends File = File, TFileReturn extends
|
|
|
553
553
|
VideoTransformer?: new (storage: BaseStorage<TFile, TFileReturn>, config: VideoTransformerConfig) => BaseTransformer<VideoTransformerConfig, VideoTransformResult<TFileReturn>, TFile, TFileReturn>;
|
|
554
554
|
}
|
|
555
555
|
/**
|
|
556
|
-
* Unified media transformation result
|
|
557
|
-
*/
|
|
556
|
+
* Unified media transformation result
|
|
557
|
+
*/
|
|
558
558
|
interface MediaTransformResult<TFileReturn extends FileReturn = FileReturn> {
|
|
559
559
|
/** Video-specific properties */
|
|
560
560
|
bitrate?: number;
|
|
@@ -580,8 +580,8 @@ interface MediaTransformResult<TFileReturn extends FileReturn = FileReturn> {
|
|
|
580
580
|
width?: number;
|
|
581
581
|
}
|
|
582
582
|
/**
|
|
583
|
-
* Query parameters for media transformation
|
|
584
|
-
*/
|
|
583
|
+
* Query parameters for media transformation
|
|
584
|
+
*/
|
|
585
585
|
interface MediaTransformQuery {
|
|
586
586
|
/** Apply affine transformation */
|
|
587
587
|
affine?: boolean;
|
|
@@ -681,8 +681,8 @@ interface MediaTransformQuery {
|
|
|
681
681
|
withoutReduction?: boolean;
|
|
682
682
|
}
|
|
683
683
|
/**
|
|
684
|
-
* Image transformer configuration
|
|
685
|
-
*/
|
|
684
|
+
* Image transformer configuration
|
|
685
|
+
*/
|
|
686
686
|
interface ImageTransformerConfig extends BaseTransformerConfig {
|
|
687
687
|
/** Sharp `failOn` setting controlling which libvips warnings abort decoding. Defaults to `"warning"`. */
|
|
688
688
|
failOn?: "error" | "none" | "truncated" | "warning";
|
|
@@ -696,8 +696,8 @@ interface ImageTransformerConfig extends BaseTransformerConfig {
|
|
|
696
696
|
maxImageWidth?: number;
|
|
697
697
|
}
|
|
698
698
|
/**
|
|
699
|
-
* Video transformer configuration
|
|
700
|
-
*/
|
|
699
|
+
* Video transformer configuration
|
|
700
|
+
*/
|
|
701
701
|
interface VideoTransformerConfig extends BaseTransformerConfig {
|
|
702
702
|
/** Default video bitrate */
|
|
703
703
|
defaultBitrate?: number;
|
|
@@ -707,8 +707,8 @@ interface VideoTransformerConfig extends BaseTransformerConfig {
|
|
|
707
707
|
maxVideoSize?: number;
|
|
708
708
|
}
|
|
709
709
|
/**
|
|
710
|
-
* Audio transformer configuration
|
|
711
|
-
*/
|
|
710
|
+
* Audio transformer configuration
|
|
711
|
+
*/
|
|
712
712
|
interface AudioTransformerConfig extends BaseTransformerConfig {
|
|
713
713
|
/** Default audio bitrate */
|
|
714
714
|
defaultBitrate?: number;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions } from "./storage.d-DIav_lF1.js";
|
|
2
|
+
import 'node:stream';
|
|
3
|
+
import { Client } from '@microsoft/microsoft-graph-client';
|
|
4
|
+
declare class OneDriveFile extends File {
|
|
5
|
+
driveItemId?: string;
|
|
6
|
+
eTag?: string;
|
|
7
|
+
webUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
interface OneDriveClientCredentialsAuth {
|
|
10
|
+
/**
|
|
11
|
+
* Microsoft Entra (Azure AD) application (client) ID.
|
|
12
|
+
*/
|
|
13
|
+
clientId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Application (client) secret.
|
|
16
|
+
*/
|
|
17
|
+
clientSecret: string;
|
|
18
|
+
/**
|
|
19
|
+
* Microsoft Entra tenant ID (GUID or domain name).
|
|
20
|
+
*/
|
|
21
|
+
tenantId: string;
|
|
22
|
+
}
|
|
23
|
+
interface OneDriveOAuthRefreshAuth {
|
|
24
|
+
/**
|
|
25
|
+
* Microsoft Entra application (client) ID.
|
|
26
|
+
*/
|
|
27
|
+
clientId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Application client secret. Required for confidential clients (default).
|
|
30
|
+
* Public clients may omit it if the app registration allows.
|
|
31
|
+
*/
|
|
32
|
+
clientSecret?: string;
|
|
33
|
+
/**
|
|
34
|
+
* OAuth2 refresh token obtained from an interactive sign-in flow.
|
|
35
|
+
*/
|
|
36
|
+
refreshToken: string;
|
|
37
|
+
/**
|
|
38
|
+
* Tenant ID — `"common"`, `"consumers"`, `"organizations"`, or a tenant
|
|
39
|
+
* GUID/domain. Defaults to `"common"`.
|
|
40
|
+
*/
|
|
41
|
+
tenantId?: string;
|
|
42
|
+
}
|
|
43
|
+
interface OneDriveStorageOptions extends BaseStorageOptions {
|
|
44
|
+
/**
|
|
45
|
+
* Static or dynamic access token. Pass a string for a one-shot token, or
|
|
46
|
+
* a function returning a fresh token on each call.
|
|
47
|
+
*/
|
|
48
|
+
accessToken?: string | (() => string | Promise<string>);
|
|
49
|
+
/**
|
|
50
|
+
* Pre-built `@microsoft/microsoft-graph-client` `Client`. Escape hatch for
|
|
51
|
+
* callers that wire up their own `AuthenticationProvider` (e.g. with
|
|
52
|
+
* `@azure/identity` or `@azure/msal-node`).
|
|
53
|
+
*/
|
|
54
|
+
client?: Client;
|
|
55
|
+
/**
|
|
56
|
+
* Client-credentials auth — for app-only / daemon scenarios.
|
|
57
|
+
* Cannot be used with `/me/drive`; you must target via `driveId`,
|
|
58
|
+
* `siteId`, or `userId`.
|
|
59
|
+
*/
|
|
60
|
+
clientCredentials?: OneDriveClientCredentialsAuth;
|
|
61
|
+
/**
|
|
62
|
+
* Timeout, in milliseconds, for polling the async-copy monitor URL.
|
|
63
|
+
* Defaults to 60_000 (60s).
|
|
64
|
+
*/
|
|
65
|
+
copyTimeoutMs?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Target drive by ID. Mutually exclusive with `siteId` and `userId`.
|
|
68
|
+
*/
|
|
69
|
+
driveId?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Configure metafiles storage. Defaults to local tmp directory.
|
|
72
|
+
*/
|
|
73
|
+
metaStorageConfig?: LocalMetaStorageOptions;
|
|
74
|
+
/**
|
|
75
|
+
* OAuth2 refresh-token auth — for delegated user scenarios. Exchanges
|
|
76
|
+
* the refresh token at the Microsoft identity platform and caches the
|
|
77
|
+
* resulting access token until ~60s before expiry.
|
|
78
|
+
*/
|
|
79
|
+
oauth?: OneDriveOAuthRefreshAuth;
|
|
80
|
+
/**
|
|
81
|
+
* When `true`, `getReadUrl` creates an anonymous shared link with
|
|
82
|
+
* `view` permission. Otherwise it returns the short-lived pre-authenticated
|
|
83
|
+
* `@microsoft.graph.downloadUrl` from the item metadata.
|
|
84
|
+
*/
|
|
85
|
+
publicByDefault?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Logical "bucket root" — virtual keys live under this folder path within
|
|
88
|
+
* the target drive. Must already exist; the adapter does not create
|
|
89
|
+
* folders. Defaults to drive root.
|
|
90
|
+
*/
|
|
91
|
+
rootFolderPath?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Target a SharePoint site's default drive. Mutually exclusive with
|
|
94
|
+
* `driveId` and `userId`.
|
|
95
|
+
*/
|
|
96
|
+
siteId?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Target a specific user's drive. Mutually exclusive with `driveId` and
|
|
99
|
+
* `siteId`. Required when using `clientCredentials` auth (Graph does not
|
|
100
|
+
* accept `/me/drive` for app-only tokens).
|
|
101
|
+
*/
|
|
102
|
+
userId?: string;
|
|
103
|
+
}
|
|
104
|
+
export { OneDriveFile as O, OneDriveStorageOptions as a, OneDriveClientCredentialsAuth as b, OneDriveOAuthRefreshAuth as c };
|