@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 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?: string;
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?: T;
62
+ metadata: T;
64
63
  }
package/dist/common.js CHANGED
@@ -7,7 +7,6 @@ export const StorageItemUpdate = z
7
7
  name: z.string(),
8
8
  owner: z.uuid(),
9
9
  trash: z.boolean(),
10
- restrict: z.boolean(),
11
10
  publicPermission: z.number().min(0).max(5),
12
11
  })
13
12
  .partial();
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
@@ -12,7 +12,6 @@ declare module '@axium/server/database' {
12
12
  modifiedAt: Generated<Date>;
13
13
  name: string;
14
14
  parentId: string | null;
15
- restricted: Generated<boolean>;
16
15
  size: number;
17
16
  trashedAt: Date | null;
18
17
  type: string;
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 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/storage",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "description": "User file storage for Axium",
6
6
  "funding": {