@axium/storage 0.13.1 → 0.13.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/dist/common.d.ts +30 -30
- package/dist/common.js +7 -7
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -28,15 +28,15 @@ export interface StorageItemMetadata<T extends Record<string, unknown> = Record<
|
|
|
28
28
|
}
|
|
29
29
|
export declare const syncProtocolVersion = 0;
|
|
30
30
|
export declare const StorageLimits: z.ZodObject<{
|
|
31
|
-
item_size: z.
|
|
32
|
-
user_items: z.
|
|
33
|
-
user_size: z.
|
|
31
|
+
item_size: z.ZodInt;
|
|
32
|
+
user_items: z.ZodInt;
|
|
33
|
+
user_size: z.ZodInt;
|
|
34
34
|
}, z.core.$strip>;
|
|
35
35
|
export interface StorageLimits extends z.infer<typeof StorageLimits> {
|
|
36
36
|
}
|
|
37
37
|
export declare const StorageStats: z.ZodObject<{
|
|
38
|
-
usedBytes: z.
|
|
39
|
-
itemCount: z.
|
|
38
|
+
usedBytes: z.ZodInt;
|
|
39
|
+
itemCount: z.ZodInt;
|
|
40
40
|
lastModified: z.ZodCoercedDate<unknown>;
|
|
41
41
|
lastTrashed: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
42
42
|
}, z.core.$strip>;
|
|
@@ -44,12 +44,12 @@ export interface StorageStats extends z.infer<typeof StorageStats> {
|
|
|
44
44
|
}
|
|
45
45
|
export declare const UserStorageInfo: z.ZodObject<{
|
|
46
46
|
limits: z.ZodObject<{
|
|
47
|
-
item_size: z.
|
|
48
|
-
user_items: z.
|
|
49
|
-
user_size: z.
|
|
47
|
+
item_size: z.ZodInt;
|
|
48
|
+
user_items: z.ZodInt;
|
|
49
|
+
user_size: z.ZodInt;
|
|
50
50
|
}, z.core.$strip>;
|
|
51
|
-
usedBytes: z.
|
|
52
|
-
itemCount: z.
|
|
51
|
+
usedBytes: z.ZodInt;
|
|
52
|
+
itemCount: z.ZodInt;
|
|
53
53
|
lastModified: z.ZodCoercedDate<unknown>;
|
|
54
54
|
lastTrashed: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
55
55
|
}, z.core.$strip>;
|
|
@@ -72,12 +72,12 @@ export declare const UserStorage: z.ZodObject<{
|
|
|
72
72
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
73
73
|
}, z.core.$strip>>;
|
|
74
74
|
limits: z.ZodObject<{
|
|
75
|
-
item_size: z.
|
|
76
|
-
user_items: z.
|
|
77
|
-
user_size: z.
|
|
75
|
+
item_size: z.ZodInt;
|
|
76
|
+
user_items: z.ZodInt;
|
|
77
|
+
user_size: z.ZodInt;
|
|
78
78
|
}, z.core.$strip>;
|
|
79
|
-
usedBytes: z.
|
|
80
|
-
itemCount: z.
|
|
79
|
+
usedBytes: z.ZodInt;
|
|
80
|
+
itemCount: z.ZodInt;
|
|
81
81
|
lastModified: z.ZodCoercedDate<unknown>;
|
|
82
82
|
lastTrashed: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
83
83
|
}, z.core.$strip>;
|
|
@@ -140,9 +140,9 @@ export declare const StorageConfig: z.ZodObject<{
|
|
|
140
140
|
data: z.ZodString;
|
|
141
141
|
enabled: z.ZodBoolean;
|
|
142
142
|
limits: z.ZodObject<{
|
|
143
|
-
item_size: z.
|
|
144
|
-
user_items: z.
|
|
145
|
-
user_size: z.
|
|
143
|
+
item_size: z.ZodInt;
|
|
144
|
+
user_items: z.ZodInt;
|
|
145
|
+
user_size: z.ZodInt;
|
|
146
146
|
}, z.core.$strip>;
|
|
147
147
|
trash_duration: z.ZodNumber;
|
|
148
148
|
}, z.core.$strip>;
|
|
@@ -155,12 +155,12 @@ declare const StorageAPI: {
|
|
|
155
155
|
readonly 'users/:id/storage': {
|
|
156
156
|
readonly OPTIONS: z.ZodObject<{
|
|
157
157
|
limits: z.ZodObject<{
|
|
158
|
-
item_size: z.
|
|
159
|
-
user_items: z.
|
|
160
|
-
user_size: z.
|
|
158
|
+
item_size: z.ZodInt;
|
|
159
|
+
user_items: z.ZodInt;
|
|
160
|
+
user_size: z.ZodInt;
|
|
161
161
|
}, z.core.$strip>;
|
|
162
|
-
usedBytes: z.
|
|
163
|
-
itemCount: z.
|
|
162
|
+
usedBytes: z.ZodInt;
|
|
163
|
+
itemCount: z.ZodInt;
|
|
164
164
|
lastModified: z.ZodCoercedDate<unknown>;
|
|
165
165
|
lastTrashed: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
166
166
|
}, z.core.$strip>;
|
|
@@ -181,12 +181,12 @@ declare const StorageAPI: {
|
|
|
181
181
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
182
182
|
}, z.core.$strip>>;
|
|
183
183
|
limits: z.ZodObject<{
|
|
184
|
-
item_size: z.
|
|
185
|
-
user_items: z.
|
|
186
|
-
user_size: z.
|
|
184
|
+
item_size: z.ZodInt;
|
|
185
|
+
user_items: z.ZodInt;
|
|
186
|
+
user_size: z.ZodInt;
|
|
187
187
|
}, z.core.$strip>;
|
|
188
|
-
usedBytes: z.
|
|
189
|
-
itemCount: z.
|
|
188
|
+
usedBytes: z.ZodInt;
|
|
189
|
+
itemCount: z.ZodInt;
|
|
190
190
|
lastModified: z.ZodCoercedDate<unknown>;
|
|
191
191
|
lastTrashed: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
192
192
|
}, z.core.$strip>;
|
|
@@ -252,8 +252,8 @@ declare const StorageAPI: {
|
|
|
252
252
|
chunk: z.ZodBoolean;
|
|
253
253
|
max_transfer_size: z.ZodInt;
|
|
254
254
|
max_chunks: z.ZodInt;
|
|
255
|
-
syncProtocolVersion: z.
|
|
256
|
-
batchFormatVersion: z.
|
|
255
|
+
syncProtocolVersion: z.ZodInt32;
|
|
256
|
+
batchFormatVersion: z.ZodInt32;
|
|
257
257
|
}, z.core.$strip>;
|
|
258
258
|
};
|
|
259
259
|
readonly 'storage/batch': {
|
package/dist/common.js
CHANGED
|
@@ -29,15 +29,15 @@ export const StorageItemMetadata = z.object({
|
|
|
29
29
|
export const syncProtocolVersion = 0;
|
|
30
30
|
export const StorageLimits = z.object({
|
|
31
31
|
/** The maximum size per item in MB */
|
|
32
|
-
item_size: z.
|
|
32
|
+
item_size: z.int().nonnegative(),
|
|
33
33
|
/** Maximum number of items per user */
|
|
34
|
-
user_items: z.
|
|
34
|
+
user_items: z.int().nonnegative(),
|
|
35
35
|
/** The maximum storage size per user in MB */
|
|
36
|
-
user_size: z.
|
|
36
|
+
user_size: z.int().nonnegative(),
|
|
37
37
|
});
|
|
38
38
|
export const StorageStats = z.object({
|
|
39
|
-
usedBytes: z.
|
|
40
|
-
itemCount: z.
|
|
39
|
+
usedBytes: z.int().nonnegative(),
|
|
40
|
+
itemCount: z.int().nonnegative(),
|
|
41
41
|
lastModified: z.coerce.date(),
|
|
42
42
|
lastTrashed: z.coerce.date().nullable(),
|
|
43
43
|
});
|
|
@@ -125,8 +125,8 @@ const StorageAPI = {
|
|
|
125
125
|
},
|
|
126
126
|
storage: {
|
|
127
127
|
OPTIONS: StoragePublicConfig.extend({
|
|
128
|
-
syncProtocolVersion: z.
|
|
129
|
-
batchFormatVersion: z.
|
|
128
|
+
syncProtocolVersion: z.int32().nonnegative(),
|
|
129
|
+
batchFormatVersion: z.int32().nonnegative(),
|
|
130
130
|
}),
|
|
131
131
|
},
|
|
132
132
|
'storage/batch': {
|