@axium/storage 0.13.1 → 0.13.3
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 -31
- package/dist/common.js +7 -9
- package/package.json +1 -2
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>;
|
|
@@ -131,7 +131,6 @@ export declare const StorageConfig: z.ZodObject<{
|
|
|
131
131
|
chunk: z.ZodBoolean;
|
|
132
132
|
max_transfer_size: z.ZodInt;
|
|
133
133
|
max_chunks: z.ZodInt;
|
|
134
|
-
app_enabled: z.ZodBoolean;
|
|
135
134
|
cas: z.ZodObject<{
|
|
136
135
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
137
136
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -140,9 +139,9 @@ export declare const StorageConfig: z.ZodObject<{
|
|
|
140
139
|
data: z.ZodString;
|
|
141
140
|
enabled: z.ZodBoolean;
|
|
142
141
|
limits: z.ZodObject<{
|
|
143
|
-
item_size: z.
|
|
144
|
-
user_items: z.
|
|
145
|
-
user_size: z.
|
|
142
|
+
item_size: z.ZodInt;
|
|
143
|
+
user_items: z.ZodInt;
|
|
144
|
+
user_size: z.ZodInt;
|
|
146
145
|
}, z.core.$strip>;
|
|
147
146
|
trash_duration: z.ZodNumber;
|
|
148
147
|
}, z.core.$strip>;
|
|
@@ -155,12 +154,12 @@ declare const StorageAPI: {
|
|
|
155
154
|
readonly 'users/:id/storage': {
|
|
156
155
|
readonly OPTIONS: z.ZodObject<{
|
|
157
156
|
limits: z.ZodObject<{
|
|
158
|
-
item_size: z.
|
|
159
|
-
user_items: z.
|
|
160
|
-
user_size: z.
|
|
157
|
+
item_size: z.ZodInt;
|
|
158
|
+
user_items: z.ZodInt;
|
|
159
|
+
user_size: z.ZodInt;
|
|
161
160
|
}, z.core.$strip>;
|
|
162
|
-
usedBytes: z.
|
|
163
|
-
itemCount: z.
|
|
161
|
+
usedBytes: z.ZodInt;
|
|
162
|
+
itemCount: z.ZodInt;
|
|
164
163
|
lastModified: z.ZodCoercedDate<unknown>;
|
|
165
164
|
lastTrashed: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
166
165
|
}, z.core.$strip>;
|
|
@@ -181,12 +180,12 @@ declare const StorageAPI: {
|
|
|
181
180
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
182
181
|
}, z.core.$strip>>;
|
|
183
182
|
limits: z.ZodObject<{
|
|
184
|
-
item_size: z.
|
|
185
|
-
user_items: z.
|
|
186
|
-
user_size: z.
|
|
183
|
+
item_size: z.ZodInt;
|
|
184
|
+
user_items: z.ZodInt;
|
|
185
|
+
user_size: z.ZodInt;
|
|
187
186
|
}, z.core.$strip>;
|
|
188
|
-
usedBytes: z.
|
|
189
|
-
itemCount: z.
|
|
187
|
+
usedBytes: z.ZodInt;
|
|
188
|
+
itemCount: z.ZodInt;
|
|
190
189
|
lastModified: z.ZodCoercedDate<unknown>;
|
|
191
190
|
lastTrashed: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
192
191
|
}, z.core.$strip>;
|
|
@@ -252,8 +251,8 @@ declare const StorageAPI: {
|
|
|
252
251
|
chunk: z.ZodBoolean;
|
|
253
252
|
max_transfer_size: z.ZodInt;
|
|
254
253
|
max_chunks: z.ZodInt;
|
|
255
|
-
syncProtocolVersion: z.
|
|
256
|
-
batchFormatVersion: z.
|
|
254
|
+
syncProtocolVersion: z.ZodInt32;
|
|
255
|
+
batchFormatVersion: z.ZodInt32;
|
|
257
256
|
}, z.core.$strip>;
|
|
258
257
|
};
|
|
259
258
|
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
|
});
|
|
@@ -86,8 +86,6 @@ export const StoragePublicConfig = z.object({
|
|
|
86
86
|
max_chunks: z.int().positive(),
|
|
87
87
|
});
|
|
88
88
|
export const StorageConfig = StoragePublicConfig.safeExtend({
|
|
89
|
-
/** Whether the files app is enabled. Requires `enabled` */
|
|
90
|
-
app_enabled: z.boolean(),
|
|
91
89
|
/** Content Addressable Storage (CAS) configuration */
|
|
92
90
|
cas: z
|
|
93
91
|
.object({
|
|
@@ -125,8 +123,8 @@ const StorageAPI = {
|
|
|
125
123
|
},
|
|
126
124
|
storage: {
|
|
127
125
|
OPTIONS: StoragePublicConfig.extend({
|
|
128
|
-
syncProtocolVersion: z.
|
|
129
|
-
batchFormatVersion: z.
|
|
126
|
+
syncProtocolVersion: z.int32().nonnegative(),
|
|
127
|
+
batchFormatVersion: z.int32().nonnegative(),
|
|
130
128
|
}),
|
|
131
129
|
},
|
|
132
130
|
'storage/batch': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axium/storage",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"author": "James Prevett <axium@jamespre.dev>",
|
|
5
5
|
"description": "User file storage for Axium",
|
|
6
6
|
"funding": {
|
|
@@ -70,7 +70,6 @@
|
|
|
70
70
|
],
|
|
71
71
|
"update_checks": true,
|
|
72
72
|
"config": {
|
|
73
|
-
"app_enabled": true,
|
|
74
73
|
"batch": {
|
|
75
74
|
"enabled": false,
|
|
76
75
|
"max_items": 100,
|