@axium/storage 0.2.2 → 0.2.4
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 +2 -3
- package/dist/common.js +0 -1
- package/dist/plugin.js +0 -1
- package/dist/server.d.ts +0 -1
- package/dist/server.js +0 -1
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -42,13 +42,12 @@ export declare const StorageItemUpdate: z.ZodObject<{
|
|
|
42
42
|
name: z.ZodOptional<z.ZodString>;
|
|
43
43
|
owner: z.ZodOptional<z.ZodUUID>;
|
|
44
44
|
trash: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
-
restrict: z.ZodOptional<z.ZodBoolean>;
|
|
46
45
|
publicPermission: z.ZodOptional<z.ZodNumber>;
|
|
47
46
|
}, z.core.$strip>;
|
|
48
47
|
export type StorageItemUpdate = z.infer<typeof StorageItemUpdate>;
|
|
49
48
|
export interface StorageItemMetadata<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
50
49
|
createdAt: Date;
|
|
51
|
-
dataURL
|
|
50
|
+
dataURL: string;
|
|
52
51
|
hash: string;
|
|
53
52
|
id: string;
|
|
54
53
|
immutable: boolean;
|
|
@@ -60,5 +59,5 @@ export interface StorageItemMetadata<T extends Record<string, unknown> = Record<
|
|
|
60
59
|
size: number;
|
|
61
60
|
trashedAt: Date | null;
|
|
62
61
|
type: string;
|
|
63
|
-
metadata
|
|
62
|
+
metadata: T;
|
|
64
63
|
}
|
package/dist/common.js
CHANGED
package/dist/plugin.js
CHANGED
|
@@ -23,7 +23,6 @@ async function db_init(opt, db) {
|
|
|
23
23
|
.addColumn('parentId', 'uuid', col => col.references('storage.itemId').onDelete('cascade').onUpdate('cascade').defaultTo(null))
|
|
24
24
|
.addColumn('createdAt', 'timestamptz', col => col.notNull().defaultTo(sql `now()`))
|
|
25
25
|
.addColumn('modifiedAt', 'timestamptz', col => col.notNull().defaultTo(sql `now()`))
|
|
26
|
-
.addColumn('restricted', 'boolean', col => col.notNull().defaultTo(false))
|
|
27
26
|
.addColumn('size', 'integer', col => col.notNull())
|
|
28
27
|
.addColumn('trashedAt', 'timestamptz', col => col.defaultTo(null))
|
|
29
28
|
.addColumn('hash', 'bytea', col => col.notNull())
|
package/dist/server.d.ts
CHANGED
package/dist/server.js
CHANGED
|
@@ -21,7 +21,6 @@ expectedTypes.storage = {
|
|
|
21
21
|
modifiedAt: { type: 'timestamptz', required: true, hasDefault: true },
|
|
22
22
|
name: { type: 'text' },
|
|
23
23
|
parentId: { type: 'uuid' },
|
|
24
|
-
restricted: { type: 'bool', required: true, hasDefault: true },
|
|
25
24
|
size: { type: 'int4', required: true },
|
|
26
25
|
trashedAt: { type: 'timestampz' },
|
|
27
26
|
type: { type: 'text', required: true },
|