@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 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.ZodNumber;
32
- user_items: z.ZodNumber;
33
- user_size: z.ZodNumber;
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.ZodNumber;
39
- itemCount: z.ZodNumber;
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.ZodNumber;
48
- user_items: z.ZodNumber;
49
- user_size: z.ZodNumber;
47
+ item_size: z.ZodInt;
48
+ user_items: z.ZodInt;
49
+ user_size: z.ZodInt;
50
50
  }, z.core.$strip>;
51
- usedBytes: z.ZodNumber;
52
- itemCount: z.ZodNumber;
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.ZodNumber;
76
- user_items: z.ZodNumber;
77
- user_size: z.ZodNumber;
75
+ item_size: z.ZodInt;
76
+ user_items: z.ZodInt;
77
+ user_size: z.ZodInt;
78
78
  }, z.core.$strip>;
79
- usedBytes: z.ZodNumber;
80
- itemCount: z.ZodNumber;
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.ZodNumber;
144
- user_items: z.ZodNumber;
145
- user_size: z.ZodNumber;
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.ZodNumber;
159
- user_items: z.ZodNumber;
160
- user_size: z.ZodNumber;
158
+ item_size: z.ZodInt;
159
+ user_items: z.ZodInt;
160
+ user_size: z.ZodInt;
161
161
  }, z.core.$strip>;
162
- usedBytes: z.ZodNumber;
163
- itemCount: z.ZodNumber;
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.ZodNumber;
185
- user_items: z.ZodNumber;
186
- user_size: z.ZodNumber;
184
+ item_size: z.ZodInt;
185
+ user_items: z.ZodInt;
186
+ user_size: z.ZodInt;
187
187
  }, z.core.$strip>;
188
- usedBytes: z.ZodNumber;
189
- itemCount: z.ZodNumber;
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.ZodNumber;
256
- batchFormatVersion: z.ZodNumber;
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.number(),
32
+ item_size: z.int().nonnegative(),
33
33
  /** Maximum number of items per user */
34
- user_items: z.number(),
34
+ user_items: z.int().nonnegative(),
35
35
  /** The maximum storage size per user in MB */
36
- user_size: z.number(),
36
+ user_size: z.int().nonnegative(),
37
37
  });
38
38
  export const StorageStats = z.object({
39
- usedBytes: z.number().nonnegative(),
40
- itemCount: z.number().nonnegative(),
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.number(),
129
- batchFormatVersion: z.number(),
128
+ syncProtocolVersion: z.int32().nonnegative(),
129
+ batchFormatVersion: z.int32().nonnegative(),
130
130
  }),
131
131
  },
132
132
  'storage/batch': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/storage",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "description": "User file storage for Axium",
6
6
  "funding": {