tuturuuu 0.0.1 → 0.0.2
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/LICENSE +21 -0
- package/README.md +87 -0
- package/dist/errors.d.ts +75 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +155 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/storage.d.ts +280 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +612 -0
- package/dist/storage.js.map +1 -0
- package/dist/types.d.ts +251 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +70 -0
- package/dist/types.js.map +1 -0
- package/package.json +40 -12
- package/src/documents.test.ts +0 -523
- package/src/errors.test.ts +0 -278
- package/src/errors.ts +0 -161
- package/src/index.ts +0 -60
- package/src/storage.test.ts +0 -604
- package/src/storage.ts +0 -702
- package/src/types.test.ts +0 -562
- package/src/types.ts +0 -291
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for the Tuturuuu SDK
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
/**
|
|
6
|
+
* Storage object returned from list operations
|
|
7
|
+
*/
|
|
8
|
+
export interface StorageObject {
|
|
9
|
+
id?: string;
|
|
10
|
+
name: string;
|
|
11
|
+
createdAt?: string;
|
|
12
|
+
updatedAt?: string;
|
|
13
|
+
lastAccessedAt?: string;
|
|
14
|
+
metadata?: {
|
|
15
|
+
eTag?: string;
|
|
16
|
+
size?: number;
|
|
17
|
+
mimetype?: string;
|
|
18
|
+
cacheControl?: string;
|
|
19
|
+
contentLength?: number;
|
|
20
|
+
httpStatusCode?: number;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* List options for storage listing
|
|
25
|
+
*/
|
|
26
|
+
export interface ListStorageOptions {
|
|
27
|
+
path?: string;
|
|
28
|
+
search?: string;
|
|
29
|
+
limit?: number;
|
|
30
|
+
offset?: number;
|
|
31
|
+
sortBy?: 'name' | 'created_at' | 'updated_at' | 'size';
|
|
32
|
+
sortOrder?: 'asc' | 'desc';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Upload options for file upload
|
|
36
|
+
*/
|
|
37
|
+
export interface UploadOptions {
|
|
38
|
+
path?: string;
|
|
39
|
+
upsert?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Share options for signed URL generation
|
|
43
|
+
*/
|
|
44
|
+
export interface ShareOptions {
|
|
45
|
+
expiresIn?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Pagination metadata
|
|
49
|
+
*/
|
|
50
|
+
export interface Pagination {
|
|
51
|
+
limit: number;
|
|
52
|
+
offset: number;
|
|
53
|
+
total: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Response for list storage operation
|
|
57
|
+
*/
|
|
58
|
+
export interface ListStorageResponse {
|
|
59
|
+
data: StorageObject[];
|
|
60
|
+
pagination: Pagination;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Path data returned by storage operations
|
|
64
|
+
*/
|
|
65
|
+
export interface PathData {
|
|
66
|
+
path: string;
|
|
67
|
+
fullPath: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Generic path response for operations that return path information
|
|
71
|
+
*/
|
|
72
|
+
export interface PathResponse {
|
|
73
|
+
message: string;
|
|
74
|
+
data: PathData;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Response for signed upload URL request
|
|
78
|
+
*/
|
|
79
|
+
export interface SignedUploadUrlResponse {
|
|
80
|
+
data: {
|
|
81
|
+
signedUrl: string;
|
|
82
|
+
token: string;
|
|
83
|
+
path: string;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Response for upload operation
|
|
88
|
+
*/
|
|
89
|
+
export type UploadResponse = PathResponse;
|
|
90
|
+
/**
|
|
91
|
+
* Response for delete operation
|
|
92
|
+
*/
|
|
93
|
+
export interface DeleteResponse {
|
|
94
|
+
message: string;
|
|
95
|
+
data: {
|
|
96
|
+
deleted: number;
|
|
97
|
+
paths: string[];
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Response for create folder operation
|
|
102
|
+
*/
|
|
103
|
+
export type CreateFolderResponse = PathResponse;
|
|
104
|
+
/**
|
|
105
|
+
* Response for share operation
|
|
106
|
+
*/
|
|
107
|
+
export interface ShareResponse {
|
|
108
|
+
message: string;
|
|
109
|
+
data: {
|
|
110
|
+
signedUrl: string;
|
|
111
|
+
expiresAt: string;
|
|
112
|
+
expiresIn: number;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Storage analytics data
|
|
117
|
+
*/
|
|
118
|
+
export interface StorageAnalytics {
|
|
119
|
+
totalSize: number;
|
|
120
|
+
fileCount: number;
|
|
121
|
+
storageLimit: number;
|
|
122
|
+
usagePercentage: number;
|
|
123
|
+
largestFile: {
|
|
124
|
+
name: string;
|
|
125
|
+
size: number;
|
|
126
|
+
createdAt: string;
|
|
127
|
+
} | null;
|
|
128
|
+
smallestFile: {
|
|
129
|
+
name: string;
|
|
130
|
+
size: number;
|
|
131
|
+
createdAt: string;
|
|
132
|
+
} | null;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Response for analytics operation
|
|
136
|
+
*/
|
|
137
|
+
export interface AnalyticsResponse {
|
|
138
|
+
data: StorageAnalytics;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Document object
|
|
142
|
+
*/
|
|
143
|
+
export interface Document {
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
content: string;
|
|
147
|
+
isPublic: boolean;
|
|
148
|
+
createdAt: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* List documents options
|
|
152
|
+
*/
|
|
153
|
+
export interface ListDocumentsOptions {
|
|
154
|
+
search?: string;
|
|
155
|
+
limit?: number;
|
|
156
|
+
offset?: number;
|
|
157
|
+
isPublic?: boolean;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Create document data
|
|
161
|
+
*/
|
|
162
|
+
export interface CreateDocumentData {
|
|
163
|
+
name: string;
|
|
164
|
+
content?: string;
|
|
165
|
+
isPublic?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Update document data
|
|
169
|
+
*/
|
|
170
|
+
export interface UpdateDocumentData {
|
|
171
|
+
name?: string;
|
|
172
|
+
content?: string;
|
|
173
|
+
isPublic?: boolean;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Response for list documents operation
|
|
177
|
+
*/
|
|
178
|
+
export interface ListDocumentsResponse {
|
|
179
|
+
data: Document[];
|
|
180
|
+
pagination: Pagination;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Response for document operation
|
|
184
|
+
*/
|
|
185
|
+
export interface DocumentResponse {
|
|
186
|
+
message: string;
|
|
187
|
+
data: Document;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Response for get document operation
|
|
191
|
+
*/
|
|
192
|
+
export interface GetDocumentResponse {
|
|
193
|
+
data: Document;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Response for delete document operation
|
|
197
|
+
*/
|
|
198
|
+
export interface DeleteDocumentResponse {
|
|
199
|
+
message: string;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* API error response
|
|
203
|
+
*/
|
|
204
|
+
export interface ApiErrorResponse {
|
|
205
|
+
error: string;
|
|
206
|
+
message: string;
|
|
207
|
+
code?: string;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Zod schemas for validation
|
|
211
|
+
*/
|
|
212
|
+
export declare const listStorageOptionsSchema: z.ZodObject<{
|
|
213
|
+
path: z.ZodOptional<z.ZodString>;
|
|
214
|
+
search: z.ZodOptional<z.ZodString>;
|
|
215
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
218
|
+
name: "name";
|
|
219
|
+
created_at: "created_at";
|
|
220
|
+
updated_at: "updated_at";
|
|
221
|
+
size: "size";
|
|
222
|
+
}>>;
|
|
223
|
+
sortOrder: z.ZodOptional<z.ZodEnum<{
|
|
224
|
+
asc: "asc";
|
|
225
|
+
desc: "desc";
|
|
226
|
+
}>>;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
export declare const uploadOptionsSchema: z.ZodObject<{
|
|
229
|
+
path: z.ZodOptional<z.ZodString>;
|
|
230
|
+
upsert: z.ZodOptional<z.ZodBoolean>;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
export declare const shareOptionsSchema: z.ZodObject<{
|
|
233
|
+
expiresIn: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
export declare const listDocumentsOptionsSchema: z.ZodObject<{
|
|
236
|
+
search: z.ZodOptional<z.ZodString>;
|
|
237
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
238
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
239
|
+
isPublic: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
export declare const createDocumentDataSchema: z.ZodObject<{
|
|
242
|
+
name: z.ZodString;
|
|
243
|
+
content: z.ZodOptional<z.ZodString>;
|
|
244
|
+
isPublic: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
export declare const updateDocumentDataSchema: z.ZodObject<{
|
|
247
|
+
name: z.ZodOptional<z.ZodString>;
|
|
248
|
+
content: z.ZodOptional<z.ZodString>;
|
|
249
|
+
isPublic: z.ZodOptional<z.ZodBoolean>;
|
|
250
|
+
}, z.core.$strip>;
|
|
251
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,MAAM,CAAC;IACvD,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM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,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;iBASzB,CAAC;AAEb,eAAO,MAAM,mBAAmB;;;iBAKpB,CAAC;AAEb,eAAO,MAAM,kBAAkB;;iBAInB,CAAC;AAEb,eAAO,MAAM,0BAA0B;;;;;iBA2BnC,CAAC;AAEL,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Type definitions for the Tuturuuu SDK
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.updateDocumentDataSchema = exports.createDocumentDataSchema = exports.listDocumentsOptionsSchema = exports.shareOptionsSchema = exports.uploadOptionsSchema = exports.listStorageOptionsSchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
/**
|
|
9
|
+
* Zod schemas for validation
|
|
10
|
+
*/
|
|
11
|
+
exports.listStorageOptionsSchema = zod_1.z
|
|
12
|
+
.object({
|
|
13
|
+
path: zod_1.z.string(),
|
|
14
|
+
search: zod_1.z.string(),
|
|
15
|
+
limit: zod_1.z.number().int().min(1).max(100).finite(),
|
|
16
|
+
offset: zod_1.z.number().int().min(0).finite(),
|
|
17
|
+
sortBy: zod_1.z.enum(['name', 'created_at', 'updated_at', 'size']),
|
|
18
|
+
sortOrder: zod_1.z.enum(['asc', 'desc']),
|
|
19
|
+
})
|
|
20
|
+
.partial();
|
|
21
|
+
exports.uploadOptionsSchema = zod_1.z
|
|
22
|
+
.object({
|
|
23
|
+
path: zod_1.z.string(),
|
|
24
|
+
upsert: zod_1.z.boolean(),
|
|
25
|
+
})
|
|
26
|
+
.partial();
|
|
27
|
+
exports.shareOptionsSchema = zod_1.z
|
|
28
|
+
.object({
|
|
29
|
+
expiresIn: zod_1.z.number().int().min(60).max(604800).finite(),
|
|
30
|
+
})
|
|
31
|
+
.partial();
|
|
32
|
+
exports.listDocumentsOptionsSchema = zod_1.z
|
|
33
|
+
.object({
|
|
34
|
+
search: zod_1.z.string(),
|
|
35
|
+
limit: zod_1.z.number().int().min(1).max(100).finite(),
|
|
36
|
+
offset: zod_1.z.number().int().min(0).finite(),
|
|
37
|
+
isPublic: zod_1.z.boolean(),
|
|
38
|
+
})
|
|
39
|
+
.partial()
|
|
40
|
+
.superRefine((data, ctx) => {
|
|
41
|
+
if ('limit' in data && data.limit === undefined) {
|
|
42
|
+
ctx.addIssue({
|
|
43
|
+
code: 'invalid_type',
|
|
44
|
+
expected: 'number',
|
|
45
|
+
received: 'undefined',
|
|
46
|
+
path: ['limit'],
|
|
47
|
+
message: 'limit cannot be explicitly undefined',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if ('offset' in data && data.offset === undefined) {
|
|
51
|
+
ctx.addIssue({
|
|
52
|
+
code: 'invalid_type',
|
|
53
|
+
expected: 'number',
|
|
54
|
+
received: 'undefined',
|
|
55
|
+
path: ['offset'],
|
|
56
|
+
message: 'offset cannot be explicitly undefined',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
exports.createDocumentDataSchema = zod_1.z.object({
|
|
61
|
+
name: zod_1.z.string().min(1).max(255),
|
|
62
|
+
content: zod_1.z.string().max(100000).optional(),
|
|
63
|
+
isPublic: zod_1.z.boolean().optional(),
|
|
64
|
+
});
|
|
65
|
+
exports.updateDocumentDataSchema = zod_1.z.object({
|
|
66
|
+
name: zod_1.z.string().min(1).max(255).optional(),
|
|
67
|
+
content: zod_1.z.string().max(100000).optional(),
|
|
68
|
+
isPublic: zod_1.z.boolean().optional(),
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6BAAwB;AAsOxB;;GAEG;AAEU,QAAA,wBAAwB,GAAG,OAAC;KACtC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE;IAChD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE;IACxC,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;IAC5D,SAAS,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;KACD,OAAO,EAAE,CAAC;AAEA,QAAA,mBAAmB,GAAG,OAAC;KACjC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;CACpB,CAAC;KACD,OAAO,EAAE,CAAC;AAEA,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,CAAC;IACN,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE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G,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAC1C,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAC1C,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tuturuuu",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Official TypeScript/JavaScript SDK for the Tuturuuu platform",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Official TypeScript/JavaScript SDK for the Tuturuuu platform - Manage workspace storage, documents, and resources with type-safe APIs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Tuturuuu",
|
|
7
7
|
"homepage": "https://tuturuuu.com",
|
|
@@ -13,29 +13,57 @@
|
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/tutur3u/platform/issues"
|
|
15
15
|
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
"keywords": [
|
|
17
|
+
"tuturuuu",
|
|
18
|
+
"sdk",
|
|
19
|
+
"api",
|
|
20
|
+
"typescript",
|
|
21
|
+
"storage",
|
|
22
|
+
"documents",
|
|
23
|
+
"workspace",
|
|
24
|
+
"file-management",
|
|
25
|
+
"type-safe",
|
|
26
|
+
"cloud-storage"
|
|
27
|
+
],
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
19
30
|
"exports": {
|
|
20
|
-
".":
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js",
|
|
34
|
+
"require": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./storage": {
|
|
37
|
+
"types": "./dist/storage.d.ts",
|
|
38
|
+
"import": "./dist/storage.js",
|
|
39
|
+
"require": "./dist/storage.js"
|
|
40
|
+
},
|
|
41
|
+
"./types": {
|
|
42
|
+
"types": "./dist/types.d.ts",
|
|
43
|
+
"import": "./dist/types.js",
|
|
44
|
+
"require": "./dist/types.js"
|
|
45
|
+
},
|
|
46
|
+
"./errors": {
|
|
47
|
+
"types": "./dist/errors.d.ts",
|
|
48
|
+
"import": "./dist/errors.js",
|
|
49
|
+
"require": "./dist/errors.js"
|
|
50
|
+
}
|
|
24
51
|
},
|
|
25
|
-
"files": ["
|
|
52
|
+
"files": ["dist", "README.md", "LICENSE"],
|
|
26
53
|
"publishConfig": {
|
|
27
54
|
"access": "public"
|
|
28
55
|
},
|
|
29
56
|
"scripts": {
|
|
57
|
+
"build": "tsc --project tsconfig.build.json",
|
|
58
|
+
"clean": "rm -rf dist .turbo",
|
|
59
|
+
"prepublishOnly": "bun run clean && bun run build",
|
|
30
60
|
"test": "vitest run",
|
|
31
61
|
"test:watch": "vitest"
|
|
32
62
|
},
|
|
33
63
|
"dependencies": {
|
|
34
|
-
"@tuturuuu/supabase": "0.1.1",
|
|
35
64
|
"zod": "^4.1.12"
|
|
36
65
|
},
|
|
37
66
|
"devDependencies": {
|
|
38
|
-
"@tuturuuu/typescript-config": "0.1.0",
|
|
39
67
|
"@types/node": "^24.9.1",
|
|
40
68
|
"typescript": "^5.9.3",
|
|
41
69
|
"vitest": "^3.2.4"
|