@dimah-s3/db 2.0.0-beta.0 → 2.0.0-beta.10
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/README.md +19 -10
- package/dist/adapters/drizzle.d.ts +2 -2
- package/dist/adapters/kysely.d.ts +1 -1
- package/dist/adapters/prisma.d.ts +1 -1
- package/dist/cli.d.ts +18 -14
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +69 -153
- package/dist/cli.js.map +1 -1
- package/dist/client/db-client.d.ts +1 -1
- package/dist/client/db-client.d.ts.map +1 -1
- package/dist/client/db-object-source.d.ts +15 -9
- package/dist/client/db-object-source.d.ts.map +1 -1
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +101 -21
- package/dist/client/index.js.map +1 -1
- package/dist/folder-path.d.ts +17 -4
- package/dist/folder-path.d.ts.map +1 -1
- package/dist/fuma-db.d.ts +22 -43
- package/dist/fuma-db.d.ts.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +606 -314
- package/dist/index.js.map +1 -1
- package/dist/plugin/create-database-endpoints.d.ts +46 -22
- package/dist/plugin/create-database-endpoints.d.ts.map +1 -1
- package/dist/plugin/create-database-lifecycle-hooks.d.ts +4 -4
- package/dist/plugin/create-database-lifecycle-hooks.d.ts.map +1 -1
- package/dist/plugin/db.d.ts +2 -2
- package/dist/plugin/db.d.ts.map +1 -1
- package/dist/plugin/object-access.d.ts +2 -2
- package/dist/plugin/object-access.d.ts.map +1 -1
- package/dist/plugin/public-stores.d.ts +5 -8
- package/dist/plugin/public-stores.d.ts.map +1 -1
- package/dist/plugin/quota.d.ts +1 -1
- package/dist/plugin/schemas.d.ts +25 -11
- package/dist/plugin/schemas.d.ts.map +1 -1
- package/dist/plugin/scope.d.ts +2 -0
- package/dist/plugin/scope.d.ts.map +1 -1
- package/dist/plugin/to-db-client-object.d.ts.map +1 -1
- package/dist/schema/schema.d.ts +72 -0
- package/dist/schema/schema.d.ts.map +1 -0
- package/dist/store/create-db-store.d.ts +4 -4
- package/dist/store/create-db-store.d.ts.map +1 -1
- package/dist/store/folder-store.d.ts +73 -15
- package/dist/store/folder-store.d.ts.map +1 -1
- package/dist/store/list-cursor.d.ts +3 -1
- package/dist/store/list-cursor.d.ts.map +1 -1
- package/dist/store/map-row.d.ts +3 -9
- package/dist/store/map-row.d.ts.map +1 -1
- package/dist/store/object-store.d.ts +24 -14
- package/dist/store/object-store.d.ts.map +1 -1
- package/dist/store/schema-version.d.ts +1 -1
- package/dist/store/search-name.d.ts +7 -0
- package/dist/store/search-name.d.ts.map +1 -0
- package/dist/types/client.d.ts +114 -23
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/plugin.d.ts +17 -6
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/storage-object.d.ts +8 -7
- package/dist/types/storage-object.d.ts.map +1 -1
- package/package.json +15 -30
- package/dist/drizzle/mysql.d.ts +0 -1024
- package/dist/drizzle/mysql.d.ts.map +0 -1
- package/dist/drizzle/mysql.js +0 -123
- package/dist/drizzle/mysql.js.map +0 -1
- package/dist/drizzle/pg.d.ts +0 -963
- package/dist/drizzle/pg.d.ts.map +0 -1
- package/dist/drizzle/pg.js +0 -104
- package/dist/drizzle/pg.js.map +0 -1
- package/dist/drizzle/shared.d.ts +0 -16
- package/dist/drizzle/shared.d.ts.map +0 -1
- package/dist/drizzle/sqlite.d.ts +0 -1023
- package/dist/drizzle/sqlite.d.ts.map +0 -1
- package/dist/drizzle/sqlite.js +0 -107
- package/dist/drizzle/sqlite.js.map +0 -1
- package/dist/schema/v1.d.ts +0 -24
- package/dist/schema/v1.d.ts.map +0 -1
- package/dist/schema/v2.d.ts +0 -64
- package/dist/schema/v2.d.ts.map +0 -1
- package/prisma/dimah-s3.prisma +0 -80
- package/sql/mysql.sql +0 -59
- package/sql/pg.sql +0 -53
- package/sql/sqlite.sql +0 -54
- package/sql/upgrade/1.0.0-2.0.0/mysql.sql +0 -71
- package/sql/upgrade/1.0.0-2.0.0/pg.sql +0 -47
- package/sql/upgrade/1.0.0-2.0.0/sqlite.sql +0 -119
|
@@ -2,16 +2,18 @@ import type { DbStore } from "../store/create-db-store.js";
|
|
|
2
2
|
import type { DbClientFolder, DbClientListResponse, DbClientObject } from "../types/client.js";
|
|
3
3
|
import type { DbAttributesOptions } from "../types/plugin.js";
|
|
4
4
|
import type { StorageObject } from "../types/storage-object.js";
|
|
5
|
-
import type { ObjectAccess } from "./object-access";
|
|
6
|
-
import type { DbObjects } from "./public-stores";
|
|
7
|
-
import type { Quota } from "./quota";
|
|
5
|
+
import type { ObjectAccess } from "./object-access.js";
|
|
6
|
+
import type { DbObjects } from "./public-stores.js";
|
|
7
|
+
import type { Quota } from "./quota.js";
|
|
8
|
+
import type { ScopeResolver } from "./scope.js";
|
|
8
9
|
/** Largest JSON size of stored attributes when `maxBytes` is not set. */
|
|
9
10
|
export declare const DEFAULT_ATTRIBUTES_MAX_BYTES = 16384;
|
|
10
11
|
export type CreateDatabaseEndpointsOptions<TSession, TAttributes, TClientAttributes> = {
|
|
11
12
|
store: Pick<DbStore<TAttributes>, "objects" | "folders">;
|
|
12
|
-
/** The public object store, whose `update`
|
|
13
|
+
/** The public object store, whose `update` checks the folder and retains it. */
|
|
13
14
|
objects: Pick<DbObjects<TAttributes>, "update">;
|
|
14
15
|
access: ObjectAccess<TSession, TAttributes>;
|
|
16
|
+
resolveScope: ScopeResolver<TSession>;
|
|
15
17
|
quota: Pick<Quota<TSession>, "limits">;
|
|
16
18
|
/** The plugin's `attributes` option. Without it, PATCH refuses `attributes`. */
|
|
17
19
|
attributes?: DbAttributesOptions<TAttributes, TClientAttributes>;
|
|
@@ -21,23 +23,26 @@ export type CreateDatabaseEndpointsOptions<TSession, TAttributes, TClientAttribu
|
|
|
21
23
|
* The `db` plugin's HTTP endpoints. Each one resolves the caller's scope and
|
|
22
24
|
* runs `authorize` before it reads or writes a row:
|
|
23
25
|
*
|
|
24
|
-
* - `GET /db/objects` (op `list`): one page of the scope's objects
|
|
25
|
-
*
|
|
26
|
-
*
|
|
26
|
+
* - `GET /db/objects` (op `list`): one page of the scope's objects, from
|
|
27
|
+
* one folder or, with `recursive`, from it and every folder below. The
|
|
28
|
+
* first page also carries usage, the quota, the folders (those whose name
|
|
29
|
+
* contains `search`, when it is set), the breadcrumb trail, and a
|
|
30
|
+
* search's `total`. A recursive page carries the `locations` of its rows.
|
|
27
31
|
* - `GET /db/object` (op `read`): one object.
|
|
28
32
|
* - `PATCH /db/object` (op `update`): renames, moves, or sets attributes.
|
|
29
|
-
* - `POST /db/folder` and `DELETE /db/folder`
|
|
30
|
-
*
|
|
33
|
+
* - `POST /db/folder`, `PATCH /db/folder`, and `DELETE /db/folder`
|
|
34
|
+
* (op `update`): create a folder, rename or move it, or remove an empty one.
|
|
31
35
|
*/
|
|
32
36
|
export declare function createDatabaseEndpoints<TSession, TAttributes, TClientAttributes>(options: CreateDatabaseEndpointsOptions<TSession, TAttributes, TClientAttributes>): {
|
|
33
|
-
/** One page of the caller's objects. `
|
|
37
|
+
/** One page of the caller's objects. `folderId` omitted lists every folder. */
|
|
34
38
|
objects: import("better-call").StrictEndpoint<string, {
|
|
35
39
|
use: import("better-call").MiddlewareHandler[];
|
|
36
40
|
} & {
|
|
37
41
|
method: "GET";
|
|
38
42
|
} & {
|
|
39
43
|
query: import("better-call").StandardSchemaV1<{
|
|
40
|
-
|
|
44
|
+
folderId?: string | undefined;
|
|
45
|
+
recursive?: "false" | "true" | boolean | undefined;
|
|
41
46
|
route?: string | undefined;
|
|
42
47
|
status?: "active" | "deleted" | "pending" | undefined;
|
|
43
48
|
contentType?: unknown;
|
|
@@ -49,7 +54,8 @@ export declare function createDatabaseEndpoints<TSession, TAttributes, TClientAt
|
|
|
49
54
|
limit?: string | number | undefined;
|
|
50
55
|
cursor?: unknown;
|
|
51
56
|
}, {
|
|
52
|
-
|
|
57
|
+
folderId?: string | undefined;
|
|
58
|
+
recursive?: "false" | "true" | boolean | undefined;
|
|
53
59
|
route?: string | undefined;
|
|
54
60
|
status?: "active" | "deleted" | "pending" | undefined;
|
|
55
61
|
contentType?: unknown;
|
|
@@ -80,8 +86,7 @@ export declare function createDatabaseEndpoints<TSession, TAttributes, TClientAt
|
|
|
80
86
|
}>;
|
|
81
87
|
/**
|
|
82
88
|
* Renames, moves, or sets the attributes of an active object. A move
|
|
83
|
-
*
|
|
84
|
-
* created when missing.
|
|
89
|
+
* requires the target folder to exist and authorizes that folder.
|
|
85
90
|
*/
|
|
86
91
|
updateObject: import("better-call").StrictEndpoint<string, {
|
|
87
92
|
use: import("better-call").MiddlewareHandler[];
|
|
@@ -91,27 +96,46 @@ export declare function createDatabaseEndpoints<TSession, TAttributes, TClientAt
|
|
|
91
96
|
key: string;
|
|
92
97
|
bucket?: string | undefined;
|
|
93
98
|
filename?: string | undefined;
|
|
94
|
-
|
|
99
|
+
folderId?: string | null | undefined;
|
|
95
100
|
attributes?: Record<string, unknown> | null | undefined;
|
|
96
101
|
}, {
|
|
97
102
|
key: string;
|
|
98
103
|
bucket?: string | undefined;
|
|
99
104
|
filename?: string | undefined;
|
|
100
|
-
|
|
105
|
+
folderId?: string | null | undefined;
|
|
101
106
|
attributes?: Record<string, unknown> | null | undefined;
|
|
102
107
|
}>;
|
|
103
108
|
}, {
|
|
104
109
|
object: DbClientObject<TClientAttributes>;
|
|
105
110
|
}>;
|
|
106
|
-
/** Creates
|
|
111
|
+
/** Creates one folder inside a parent that already exists. */
|
|
107
112
|
createFolder: import("better-call").StrictEndpoint<string, {
|
|
108
113
|
use: import("better-call").MiddlewareHandler[];
|
|
109
114
|
} & {
|
|
110
115
|
method: "POST";
|
|
111
116
|
body: import("better-call").StandardSchemaV1<{
|
|
112
|
-
|
|
117
|
+
parentId?: string | null | undefined;
|
|
118
|
+
name: string;
|
|
113
119
|
}, {
|
|
114
|
-
|
|
120
|
+
parentId?: string | null | undefined;
|
|
121
|
+
name: string;
|
|
122
|
+
}>;
|
|
123
|
+
}, {
|
|
124
|
+
folder: DbClientFolder;
|
|
125
|
+
}>;
|
|
126
|
+
/** Renames a folder, moves it, or both. */
|
|
127
|
+
updateFolder: import("better-call").StrictEndpoint<string, {
|
|
128
|
+
use: import("better-call").MiddlewareHandler[];
|
|
129
|
+
} & {
|
|
130
|
+
method: "PATCH";
|
|
131
|
+
body: import("better-call").StandardSchemaV1<{
|
|
132
|
+
id: string;
|
|
133
|
+
name?: string | undefined;
|
|
134
|
+
parentId?: string | null | undefined;
|
|
135
|
+
}, {
|
|
136
|
+
id: string;
|
|
137
|
+
name?: string | undefined;
|
|
138
|
+
parentId?: string | null | undefined;
|
|
115
139
|
}>;
|
|
116
140
|
}, {
|
|
117
141
|
folder: DbClientFolder;
|
|
@@ -124,12 +148,12 @@ export declare function createDatabaseEndpoints<TSession, TAttributes, TClientAt
|
|
|
124
148
|
body: import("better-call").StandardSchemaV1<unknown, unknown>;
|
|
125
149
|
} & {
|
|
126
150
|
query: import("better-call").StandardSchemaV1<{
|
|
127
|
-
|
|
151
|
+
id: string;
|
|
128
152
|
}, {
|
|
129
|
-
|
|
153
|
+
id: string;
|
|
130
154
|
}>;
|
|
131
155
|
}, {
|
|
132
|
-
|
|
156
|
+
id: string;
|
|
133
157
|
}>;
|
|
134
158
|
};
|
|
135
159
|
//# sourceMappingURL=create-database-endpoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-database-endpoints.d.ts","sourceRoot":"","sources":["../../src/plugin/create-database-endpoints.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,cAAc,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,wBAA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C,WAAW,CAAC,KAC/B,cAAc,CAAC,iBAAiB,CAAC,CAAC;CACxC,CAAC;AA+DF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EACR,WAAW,EACX,iBAAiB,EAEjB,OAAO,EAAE,8BAA8B,CACrC,QAAQ,EACR,WAAW,EACX,iBAAiB,CAClB;IAiDC,+EAA+E;IAC/E,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwFP,wCAAwC;IACxC,MAAM;;;;;;;;;;;;;gBAG2B,cAAc,CAAC,iBAAiB,CAAC;;IAiBlE;;;OAGG;IACH,YAAY;;;;;;;;;;;;;;;;;;gBAGqB,cAAc,CAAC,iBAAiB,CAAC;;IAmDlE,8DAA8D;IAC9D,YAAY;;;;;;;;;;;;gBAGqB,cAAc;;IAmB/C,2CAA2C;IAC3C,YAAY;;;;;;;;;;;;;;gBAGqB,cAAc;;IA4B/C,iEAAiE;IACjE,YAAY;;;;;;;;;;;;YAGiB,MAAM;;EAatC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type S3Client } from "@aws-sdk/client-s3";
|
|
2
2
|
import type { DimahS3PluginHooks } from "@dimah-s3/server/plugins";
|
|
3
3
|
import type { DbStore } from "../store/create-db-store.js";
|
|
4
|
-
import type { ObjectAccess } from "./object-access";
|
|
5
|
-
import type { Quota } from "./quota";
|
|
6
|
-
import type { ScopeResolver } from "./scope";
|
|
4
|
+
import type { ObjectAccess } from "./object-access.js";
|
|
5
|
+
import type { Quota } from "./quota.js";
|
|
6
|
+
import type { ScopeResolver } from "./scope.js";
|
|
7
7
|
/** What the hooks read from the dimah-s3 config, once `init` has run. */
|
|
8
8
|
export type DbRoutes = {
|
|
9
9
|
/** False when the route sets `plugins: { db: false }`. */
|
|
@@ -29,7 +29,7 @@ export type CreateDatabaseLifecycleHooksOptions<TSession, TAttributes> = {
|
|
|
29
29
|
* - `ticketSubject` binds upload tickets to the scope.
|
|
30
30
|
* - `upload.guard` checks the folder, ownership of the key, `authorize`
|
|
31
31
|
* (with the object an overwrite replaces), and the quota; `onStart` writes
|
|
32
|
-
* the pending row, then its
|
|
32
|
+
* the pending row, then retains its folder. An overwrite leaves the active row in
|
|
33
33
|
* place until it is confirmed.
|
|
34
34
|
* - `confirmGuard` and `multipart.guard` accept only the row of the ticket's
|
|
35
35
|
* upload, or a confirm it already finished; `onConfirmed` checks the quota
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-database-lifecycle-hooks.d.ts","sourceRoot":"","sources":["../../src/plugin/create-database-lifecycle-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQhF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"create-database-lifecycle-hooks.d.ts","sourceRoot":"","sources":["../../src/plugin/create-database-lifecycle-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQhF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAIvD,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,yEAAyE;AACzE,MAAM,MAAM,QAAQ,GAAG;IACrB,0DAA0D;IAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,wCAAwC;IACxC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAC;IACpD,8BAA8B;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,QAAQ,GAAG,SAAS,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,mCAAmC,CAAC,QAAQ,EAAE,WAAW,IAAI;IACvE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;IACzD,YAAY,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC5C,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,MAAM,EAAE,QAAQ,CAAC;CAClB,CAAC;AA6DF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,WAAW,EAChE,OAAO,EAAE,mCAAmC,CAAC,QAAQ,EAAE,WAAW,CAAC,GAClE,kBAAkB,CA4PpB"}
|
package/dist/plugin/db.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type DimahS3Plugin } from "@dimah-s3/server/plugins";
|
|
2
2
|
import type { DbPluginOptions } from "../types/plugin.js";
|
|
3
|
-
import { type DbFolders, type DbObjects } from "./public-stores";
|
|
4
|
-
import { type Purge } from "./purge";
|
|
3
|
+
import { type DbFolders, type DbObjects } from "./public-stores.js";
|
|
4
|
+
import { type Purge } from "./purge.js";
|
|
5
5
|
/** What `db()` exposes on `s3.db` and `s3.context.db`. */
|
|
6
6
|
export type DbPluginContext<TAttributes = never> = {
|
|
7
7
|
/** The `storage_object` rows: listings, usage, and your own changes. */
|
package/dist/plugin/db.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../src/plugin/db.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KA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W,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC,GAAG,KAAK,CAAC;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,EAAE,CAChB,QAAQ,GAAG,SAAS,EACpB,WAAW,GAAG,KAAK,EACnB,iBAAiB,GAAG,WAAW,EAE/B,OAAO,EAAE,eAAe,CAAC,QAAQ,EAAE,WAAW,EAAE,iBAAiB,CAAC,GACjE,aAAa,CAAC,IAAI,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CA2DnD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ObjectRef, StorageObjectStore } from "../store/object-store.js";
|
|
2
2
|
import type { AuthorizeContext, DbPluginOptions } from "../types/plugin.js";
|
|
3
3
|
import type { StorageObject } from "../types/storage-object.js";
|
|
4
|
-
import type { ResolvedScope, ScopeCall, ScopeResolver, ScopeTarget } from "./scope";
|
|
4
|
+
import type { ResolvedScope, ScopeCall, ScopeResolver, ScopeTarget } from "./scope.js";
|
|
5
5
|
/** What a call targets: its scope target, plus what `authorize` checks. */
|
|
6
|
-
export type AccessTarget = ScopeTarget & Pick<AuthorizeContext, "key" | "folder" | "clientMetadata">;
|
|
6
|
+
export type AccessTarget = ScopeTarget & Pick<AuthorizeContext, "key" | "folder" | "folderId" | "recursive" | "clientMetadata">;
|
|
7
7
|
export type CreateObjectAccessOptions<TSession, TAttributes> = Pick<DbPluginOptions<TSession, TAttributes>, "authorize"> & {
|
|
8
8
|
objects: Pick<StorageObjectStore<TAttributes>, "find">;
|
|
9
9
|
resolveScope: ScopeResolver<TSession>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-access.d.ts","sourceRoot":"","sources":["../../src/plugin/object-access.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,M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M,MAAM,YAAY,CAAC,QAAQ,EAAE,WAAW,IAAI;IAChD;;;;OAIG;IACH,KAAK,EAAE,CACL,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,YAAY,KACjB,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtC;;;;;;;OAOG;IACH,MAAM,EAAE,CACN,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,SAAS,EACd,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,KACjC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IACtD;;;OAGG;IACH,WAAW,EAAE,CACX,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,EAC9B,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,EAClC,MAAM,CAAC,EAAE,YAAY,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,EACtD,OAAO,EAAE,yBAAyB,CAAC,QAAQ,EAAE,WAAW,CAAC,GACxD,YAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,CAiDrC"}
|
|
@@ -11,20 +11,17 @@ import type { StorageObject } from "../types/storage-object.js";
|
|
|
11
11
|
export type DbObjects<TAttributes = never> = Pick<StorageObjectStore<TAttributes>, "find" | "list" | "count" | "getUsage"> & {
|
|
12
12
|
/**
|
|
13
13
|
* Renames, moves, or sets the attributes of an active row, like
|
|
14
|
-
* `PATCH /db/object` without its access check. A
|
|
15
|
-
* (`
|
|
16
|
-
* that row changes. Returns `null` when no active row matches.
|
|
14
|
+
* `PATCH /db/object` without its access check. A `folderId` must already
|
|
15
|
+
* exist in the row's scope (`FOLDER_NOT_FOUND`). With `id` or `scope`,
|
|
16
|
+
* only that row changes. Returns `null` when no active row matches.
|
|
17
17
|
*/
|
|
18
18
|
update: (ref: ObjectRef & {
|
|
19
19
|
id?: string;
|
|
20
20
|
scope?: string;
|
|
21
21
|
}, input: UpdateObjectInput<TAttributes>) => Promise<StorageObject<TAttributes> | null>;
|
|
22
22
|
};
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
* HTTP endpoints (`FOLDER_INVALID`); the root (`null`) is never stored.
|
|
26
|
-
*/
|
|
27
|
-
export type DbFolders = StorageFolderStore;
|
|
23
|
+
/** `s3.db.folders`: the `storage_folder` rows. The root is never stored. */
|
|
24
|
+
export type DbFolders = Omit<StorageFolderStore, "subtreeIds">;
|
|
28
25
|
/** The public stores over the plugin's stores. */
|
|
29
26
|
export declare function createPublicStores<TAttributes>(store: Pick<DbStore<TAttributes>, "objects" | "folders">): {
|
|
30
27
|
objects: DbObjects<TAttributes>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-stores.d.ts","sourceRoot":"","sources":["../../src/plugin/public-stores.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"public-stores.d.ts","sourceRoot":"","sources":["../../src/plugin/public-stores.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CAAC,WAAW,GAAG,KAAK,IAAI,IAAI,CAC/C,kBAAkB,CAAC,WAAW,CAAC,EAC/B,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CACvC,GAAG;IACF;;;;;OAKG;IACH,MAAM,EAAE,CACN,GAAG,EAAE,SAAS,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAChD,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAClC,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC;CACjD,CAAC;AAEF,4EAA4E;AAC5E,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;AAwB/D,kDAAkD;AAClD,wBAAgB,kBAAkB,CAAC,WAAW,EAC5C,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,GACvD;IAAE,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CA2BzD"}
|
package/dist/plugin/quota.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ObjectRef, StorageObjectStore } from "../store/object-store.js";
|
|
2
2
|
import type { DbQuota } from "../types/client.js";
|
|
3
3
|
import type { DbQuotaOption } from "../types/plugin.js";
|
|
4
|
-
import type { ResolvedScope } from "./scope";
|
|
4
|
+
import type { ResolvedScope } from "./scope.js";
|
|
5
5
|
/** An upload checked against the caps of its scope. */
|
|
6
6
|
export type QuotaInput = {
|
|
7
7
|
/** Bytes the upload adds: the declared size, or the verified size at confirm. */
|
package/dist/plugin/schemas.d.ts
CHANGED
|
@@ -2,12 +2,16 @@ import * as z from "zod";
|
|
|
2
2
|
/** Most rows one page of `GET /db/objects` returns. */
|
|
3
3
|
export declare const DB_LIST_MAX_LIMIT = 100;
|
|
4
4
|
/**
|
|
5
|
-
* Query of `GET /db/objects`. `
|
|
6
|
-
*
|
|
5
|
+
* Query of `GET /db/objects`. `folderId` of `""` is the root. Omit it for a
|
|
6
|
+
* flat list. `recursive` also lists the folders below `folderId`. Blank
|
|
7
7
|
* `search`, `contentType`, and `cursor` values are omitted.
|
|
8
8
|
*/
|
|
9
9
|
export declare const dbListQuerySchema: z.ZodObject<{
|
|
10
|
-
|
|
10
|
+
folderId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
recursive: z.ZodOptional<z.ZodCodec<z.ZodUnion<readonly [z.ZodEnum<{
|
|
12
|
+
false: "false";
|
|
13
|
+
true: "true";
|
|
14
|
+
}>, z.ZodBoolean]>, z.ZodBoolean>>;
|
|
11
15
|
route: z.ZodOptional<z.ZodString>;
|
|
12
16
|
status: z.ZodOptional<z.ZodEnum<{
|
|
13
17
|
active: "active";
|
|
@@ -48,22 +52,32 @@ export declare const dbObjectQuerySchema: z.ZodObject<{
|
|
|
48
52
|
bucket: z.ZodOptional<z.ZodString>;
|
|
49
53
|
}, z.core.$strict>;
|
|
50
54
|
/**
|
|
51
|
-
* Body of `PATCH /db/object`. `
|
|
52
|
-
*
|
|
53
|
-
* `attributes.schema`.
|
|
55
|
+
* Body of `PATCH /db/object`. `folderId` of `null` or `""` is the root.
|
|
56
|
+
* `attributes` are checked by the plugin's `attributes.schema`.
|
|
54
57
|
*/
|
|
55
58
|
export declare const dbUpdateObjectBodySchema: z.ZodObject<{
|
|
56
59
|
key: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
57
60
|
bucket: z.ZodOptional<z.ZodString>;
|
|
58
61
|
filename: z.ZodOptional<z.ZodString>;
|
|
59
|
-
|
|
62
|
+
folderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
63
|
attributes: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
61
64
|
}, z.core.$strict>;
|
|
65
|
+
/** Body of `POST /db/folder`. `parentId` omitted, `null`, or `""` is the root. */
|
|
66
|
+
export declare const dbCreateFolderBodySchema: z.ZodObject<{
|
|
67
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
}, z.core.$strict>;
|
|
62
70
|
/**
|
|
63
|
-
* Body of `
|
|
64
|
-
*
|
|
71
|
+
* Body of `PATCH /db/folder`. `parentId` of `null` or `""` is the root.
|
|
72
|
+
* The endpoint checks the name and that the folder is not moved into itself.
|
|
65
73
|
*/
|
|
66
|
-
export declare const
|
|
67
|
-
|
|
74
|
+
export declare const dbUpdateFolderBodySchema: z.ZodObject<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
name: z.ZodOptional<z.ZodString>;
|
|
77
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
/** Query of `DELETE /db/folder`. */
|
|
80
|
+
export declare const dbDeleteFolderQuerySchema: z.ZodObject<{
|
|
81
|
+
id: z.ZodString;
|
|
68
82
|
}, z.core.$strict>;
|
|
69
83
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/plugin/schemas.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/plugin/schemas.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAiErC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkB5B,CAAC;AAEH,iCAAiC;AACjC,eAAO,MAAM,mBAAmB;;;kBAG9B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;kBAOnC,CAAC;AAEH,kFAAkF;AAClF,eAAO,MAAM,wBAAwB;;;kBAGnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;kBAInC,CAAC;AAEH,oCAAoC;AACpC,eAAO,MAAM,yBAAyB;;kBAEpC,CAAC"}
|
package/dist/plugin/scope.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export type ResolvedScope<TSession = undefined> = ScopeContext<TSession> & {
|
|
|
14
14
|
/**
|
|
15
15
|
* Resolves the scope of a call.
|
|
16
16
|
* @throws `UNAUTHORIZED` when `resolveScope` returns `null`.
|
|
17
|
+
* @throws a config error when the scope is longer than
|
|
18
|
+
* {@link SCOPE_MAX_LENGTH} characters.
|
|
17
19
|
*/
|
|
18
20
|
export type ScopeResolver<TSession = undefined> = (call: ScopeCall, target: ScopeTarget) => Promise<ResolvedScope<TSession>>;
|
|
19
21
|
export type CreateScopeResolverOptions<TSession> = Pick<DbPluginOptions<TSession>, "getSession" | "resolveScope">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/plugin/scope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/plugin/scope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEpE,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC;AAEpE,sDAAsD;AACtD,MAAM,MAAM,aAAa,CAAC,QAAQ,GAAG,SAAS,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG;IACzE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CAAC,QAAQ,GAAG,SAAS,IAAI,CAChD,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,0BAA0B,CAAC,QAAQ,IAAI,IAAI,CACrD,eAAe,CAAC,QAAQ,CAAC,EACzB,YAAY,GAAG,cAAc,CAC9B,CAAC;AAgBF;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAC1C,OAAO,EAAE,0BAA0B,CAAC,QAAQ,CAAC,GAC5C,aAAa,CAAC,QAAQ,CAAC,CA2CzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-db-client-object.d.ts","sourceRoot":"","sources":["../../src/plugin/to-db-client-object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EAEf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE3E;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,GAAG,WAAW,EAC3E,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,EAClC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,WAAW,KAAK,iBAAiB,GACxD,cAAc,CAAC,iBAAiB,CAAC,CAyBnC;AAED,6DAA6D;AAC7D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"to-db-client-object.d.ts","sourceRoot":"","sources":["../../src/plugin/to-db-client-object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EAEf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE3E;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,GAAG,WAAW,EAC3E,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,EAClC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,WAAW,KAAK,iBAAiB,GACxD,cAAc,CAAC,iBAAiB,CAAC,CAyBnC;AAED,6DAA6D;AAC7D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,cAAc,CAStE"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Longest `search_name`, in characters. Folding can lengthen a name (`ß`
|
|
3
|
+
* becomes `ss`), so it has more room than the 255-character name.
|
|
4
|
+
*/
|
|
5
|
+
export declare const SEARCH_NAME_MAX_LENGTH = 1024;
|
|
6
|
+
/**
|
|
7
|
+
* Longest scope `resolveScope` may return, in characters. The `scope`
|
|
8
|
+
* columns are `varchar(255)`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SCOPE_MAX_LENGTH = 255;
|
|
11
|
+
/**
|
|
12
|
+
* The @dimah-s3/db schema, version `2.2.0`. The tables, their indexes, and
|
|
13
|
+
* the MySQL collations and prefix lengths are all declared here, so FumaDB
|
|
14
|
+
* creates them (`migrate`) and generates them for Drizzle and Prisma.
|
|
15
|
+
*/
|
|
16
|
+
export declare const dbSchema: import("fumadb/schema").Schema<"2.2.0", {
|
|
17
|
+
storageObject: import("fumadb/schema").Table<{
|
|
18
|
+
id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
|
|
19
|
+
/** Owner, for example `user:123` or `org:acme`. */
|
|
20
|
+
scope: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
21
|
+
bucket: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
22
|
+
key: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
23
|
+
/** Named dimah-s3 route that created the object. */
|
|
24
|
+
route: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
25
|
+
/** Folder that holds the object. `null` is the root. */
|
|
26
|
+
folderId: import("fumadb/schema").Column<`varchar(${number})`, string | null, string | null>;
|
|
27
|
+
filename: import("fumadb/schema").Column<"varchar(255)", string, string>;
|
|
28
|
+
/**
|
|
29
|
+
* `filename` folded for search: lowercase, without accents, with `%`,
|
|
30
|
+
* `_`, and `\` kept literal. Search matches it on every database the
|
|
31
|
+
* same way.
|
|
32
|
+
*/
|
|
33
|
+
searchName: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
34
|
+
contentType: import("fumadb/schema").Column<`varchar(${number})`, string | null, string | null>;
|
|
35
|
+
/** Verified size from HeadObject, set on confirm. */
|
|
36
|
+
size: import("fumadb/schema").Column<"bigint", bigint | null, bigint | null>;
|
|
37
|
+
/** Size the client declared before confirm. Quota counts it while pending. */
|
|
38
|
+
declaredSize: import("fumadb/schema").Column<"bigint", bigint | null, bigint | null>;
|
|
39
|
+
eTag: import("fumadb/schema").Column<`varchar(${number})`, string | null, string | null>;
|
|
40
|
+
status: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
41
|
+
/** S3 user metadata of the verified object. */
|
|
42
|
+
s3Metadata: import("fumadb/schema").Column<"json", unknown, unknown>;
|
|
43
|
+
/** App attributes, validated by the plugin's `attributes.schema`. */
|
|
44
|
+
attributes: import("fumadb/schema").Column<"json", unknown, unknown>;
|
|
45
|
+
acl: import("fumadb/schema").Column<`varchar(${number})`, string | null, string | null>;
|
|
46
|
+
/** Multipart upload ID while the row is pending. */
|
|
47
|
+
uploadId: import("fumadb/schema").Column<"string", string | null, string | null>;
|
|
48
|
+
/** Token of the upload ticket that wrote the row. Confirm and purge match it. */
|
|
49
|
+
uploadToken: import("fumadb/schema").Column<`varchar(${number})`, string | null, string | null>;
|
|
50
|
+
/** Confirm deadline of a pending row (the upload ticket's expiry). */
|
|
51
|
+
expiresAt: import("fumadb/schema").Column<"timestamp", Date | null, Date | null>;
|
|
52
|
+
confirmedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date | null>;
|
|
53
|
+
createdAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
|
|
54
|
+
updatedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
|
|
55
|
+
deletedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date | null>;
|
|
56
|
+
}, {}>;
|
|
57
|
+
storageFolder: import("fumadb/schema").Table<{
|
|
58
|
+
id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
|
|
59
|
+
scope: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
60
|
+
/** Id of the containing folder. `""` is the root. */
|
|
61
|
+
parentId: import("fumadb/schema").Column<`varchar(${number})`, string | null, string>;
|
|
62
|
+
/** Last segment of `path`. */
|
|
63
|
+
name: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
64
|
+
/** `name` folded for search, like `storage_object.search_name`. */
|
|
65
|
+
searchName: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
66
|
+
/** Full folder path. */
|
|
67
|
+
path: import("fumadb/schema").Column<`varchar(${number})`, string, string>;
|
|
68
|
+
createdAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
|
|
69
|
+
updatedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
|
|
70
|
+
}, {}>;
|
|
71
|
+
}>;
|
|
72
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema/schema.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAS3C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,MAAM,CAAC;AA0FpC;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;QAlFnB,mDAAmD;;;;QAInD,oDAAoD;;QAEpD,wDAAwD;;;QAGxD;;;;WAIG;;;QAGH,qDAAqD;;QAErD,8EAA8E;;;;QAI9E,+CAA+C;;QAE/C,qEAAqE;;;QAGrE,oDAAoD;;QAEpD,iFAAiF;;QAEjF,sEAAsE;;;;;;;;;;QA8BtE,qDAAqD;;QAErD,8BAA8B;;QAE9B,mEAAmE;;QAEnE,wBAAwB;;;;;EAqBxB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DimahS3DbClient } from "../fuma-db.js";
|
|
2
|
-
import { type StorageFolderStore } from "./folder-store";
|
|
3
|
-
import { type StorageObjectStore } from "./object-store";
|
|
2
|
+
import { type StorageFolderStore } from "./folder-store.js";
|
|
3
|
+
import { type StorageObjectStore } from "./object-store.js";
|
|
4
4
|
/** The stores over one FumaDB client. */
|
|
5
5
|
export type DbStore<TAttributes = never> = {
|
|
6
6
|
objects: StorageObjectStore<TAttributes>;
|
|
@@ -10,8 +10,8 @@ export type DbStore<TAttributes = never> = {
|
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Creates the object and folder stores. The first query checks the schema
|
|
13
|
-
* version, so a
|
|
14
|
-
* columns. A failed check runs again on the next query.
|
|
13
|
+
* version, so a database at another version throws instead of being read
|
|
14
|
+
* with the wrong columns. A failed check runs again on the next query.
|
|
15
15
|
*/
|
|
16
16
|
export declare function createDbStore<TAttributes = never>(client: DimahS3DbClient): DbStore<TAttributes>;
|
|
17
17
|
//# sourceMappingURL=create-db-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-db-store.d.ts","sourceRoot":"","sources":["../../src/store/create-db-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAG5E,yCAAyC;AACzC,MAAM,MAAM,OAAO,CAAC,WAAW,GAAG,KAAK,IAAI;IACzC,OAAO,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,kEAAkE;IAClE,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,GAAG,KAAK,EAC/C,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"create-db-store.d.ts","sourceRoot":"","sources":["../../src/store/create-db-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAG5E,yCAAyC;AACzC,MAAM,MAAM,OAAO,CAAC,WAAW,GAAG,KAAK,IAAI;IACzC,OAAO,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,kEAAkE;IAClE,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,GAAG,KAAK,EAC/C,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,WAAW,CAAC,CAmBtB"}
|
|
@@ -1,35 +1,93 @@
|
|
|
1
1
|
import type { StorageFolder } from "../types/storage-object.js";
|
|
2
|
-
import { type GetDbOrm } from "./object-store";
|
|
2
|
+
import { type GetDbOrm } from "./object-store.js";
|
|
3
3
|
/** Most child folders `children` returns when `limit` is not given. */
|
|
4
4
|
export declare const DEFAULT_FOLDER_CHILDREN_LIMIT = 1000;
|
|
5
|
+
/** Most folders `descendants` returns when `limit` is not given. */
|
|
6
|
+
export declare const DEFAULT_FOLDER_DESCENDANTS_LIMIT = 1000;
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
+
* Most folders below the open one that a recursive listing covers. Their
|
|
9
|
+
* ids go into one `in` list, well under every driver's parameter cap.
|
|
10
|
+
*/
|
|
11
|
+
export declare const FOLDER_SUBTREE_LIMIT = 10000;
|
|
12
|
+
/** Where a new or moved folder sits. `null` is the root. */
|
|
13
|
+
export type FolderPlacement = {
|
|
14
|
+
parentId: string | null;
|
|
15
|
+
name: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Data access for the `storage_folder` table. A folder is its `id`. The
|
|
19
|
+
* root is not a row: a top-level folder stores `parent_id` as `""`, because
|
|
20
|
+
* a nullable parent cannot be unique. `path` is rewritten when the folder
|
|
21
|
+
* or one of its ancestors is renamed or moved.
|
|
8
22
|
*/
|
|
9
23
|
export type StorageFolderStore = {
|
|
10
|
-
/** Loads one folder. */
|
|
11
|
-
find: (scope: string,
|
|
12
|
-
/**
|
|
13
|
-
|
|
24
|
+
/** Loads one folder of the scope. */
|
|
25
|
+
find: (scope: string, id: string) => Promise<StorageFolder | null>;
|
|
26
|
+
/**
|
|
27
|
+
* Ids of the folders below `id` at any depth, up to
|
|
28
|
+
* {@link FOLDER_SUBTREE_LIMIT}, in no order. Empty for a folder the scope
|
|
29
|
+
* does not have. Lookups for the same folder that overlap share one walk.
|
|
30
|
+
* @internal Recursive listings use it.
|
|
31
|
+
*/
|
|
32
|
+
subtreeIds: (scope: string, id: string) => Promise<string[]>;
|
|
33
|
+
/** Direct child folders of `parentId` (`null` is the root), by name. */
|
|
34
|
+
children: (scope: string, parentId: string | null, options?: {
|
|
14
35
|
limit?: number;
|
|
15
36
|
}) => Promise<StorageFolder[]>;
|
|
16
37
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* The root (`null`) needs nothing.
|
|
38
|
+
* The folders from the root down to `id`, including `id`.
|
|
39
|
+
* @throws `FOLDER_NOT_FOUND` when the scope has no such folder.
|
|
20
40
|
*/
|
|
21
|
-
|
|
41
|
+
trail: (scope: string, id: string) => Promise<StorageFolder[]>;
|
|
22
42
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
43
|
+
* Folders below `parentId` at any depth (`null`: every folder of the
|
|
44
|
+
* scope), by name, then path. With `search`, only those whose name
|
|
45
|
+
* contains it, folded the way file search folds (case, accents, and
|
|
46
|
+
* look-alike letters do not count). `parentId` itself is not included.
|
|
47
|
+
* @throws `FOLDER_NOT_FOUND` when `parentId` is not in the scope.
|
|
25
48
|
*/
|
|
26
|
-
|
|
49
|
+
descendants: (scope: string, parentId: string | null, options?: {
|
|
50
|
+
search?: string;
|
|
51
|
+
limit?: number;
|
|
52
|
+
}) => Promise<StorageFolder[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Every folder from the top level down to each of `ids`, `ids` included,
|
|
55
|
+
* once each, in path order. Ids the scope does not have are skipped.
|
|
56
|
+
* Draws the location of rows that come from several folders.
|
|
57
|
+
*/
|
|
58
|
+
ancestors: (scope: string, ids: readonly string[]) => Promise<StorageFolder[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Creates `name` inside `parentId`. The parent must already exist.
|
|
61
|
+
* @throws `FOLDER_NOT_FOUND` when the parent is missing.
|
|
62
|
+
* @throws `FOLDER_INVALID` when the name or the resulting path is not a
|
|
63
|
+
* folder path.
|
|
64
|
+
* @throws `FOLDER_EXISTS` when that parent already has the name.
|
|
65
|
+
*/
|
|
66
|
+
create: (scope: string, input: FolderPlacement) => Promise<StorageFolder>;
|
|
67
|
+
/**
|
|
68
|
+
* Renames `id`, moves it, or both. An omitted field stays as it is.
|
|
69
|
+
* `parentId: null` moves the folder to the root. Descendants keep their
|
|
70
|
+
* ids; their paths are rewritten.
|
|
71
|
+
* @throws `FOLDER_NOT_FOUND` when the folder or its new parent is missing.
|
|
72
|
+
* @throws `FOLDER_INVALID` when the name is not a folder name, the folder
|
|
73
|
+
* would sit inside itself, or a path would be too long or too deep.
|
|
74
|
+
* @throws `FOLDER_EXISTS` when the destination already has the name.
|
|
75
|
+
*/
|
|
76
|
+
update: (scope: string, id: string, input: {
|
|
77
|
+
name?: string;
|
|
78
|
+
parentId?: string | null;
|
|
79
|
+
}) => Promise<StorageFolder>;
|
|
27
80
|
/**
|
|
28
81
|
* Removes an empty folder. Removing a missing folder does nothing.
|
|
29
82
|
* @throws `FOLDER_NOT_EMPTY` when it has child folders, or active or
|
|
30
83
|
* pending objects.
|
|
31
84
|
*/
|
|
32
|
-
delete: (scope: string,
|
|
85
|
+
delete: (scope: string, id: string) => Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Puts `folder` back when a concurrent delete removed it, with the same
|
|
88
|
+
* id. An object written in between still points at that id.
|
|
89
|
+
*/
|
|
90
|
+
retain: (folder: StorageFolder) => Promise<void>;
|
|
33
91
|
};
|
|
34
92
|
/** Creates the `storage_folder` store over `getOrm`. */
|
|
35
93
|
export declare function createFolderStore(getOrm: GetDbOrm): StorageFolderStore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder-store.d.ts","sourceRoot":"","sources":["../../src/store/folder-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"folder-store.d.ts","sourceRoot":"","sources":["../../src/store/folder-store.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGvE,uEAAuE;AACvE,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAElD,oEAAoE;AACpE,eAAO,MAAM,gCAAgC,OAAO,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAK3C,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,qCAAqC;IACrC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,E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CAAC,CAAC;IAC5B;;;;OAIG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD;;;OAGG;IACH,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD,CAAC;AAoDF,wDAAwD;AACxD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAoVtE"}
|
|
@@ -5,7 +5,9 @@ export declare const DEFAULT_LIST_SORT: DbListSort;
|
|
|
5
5
|
/** What a listing is filtered and ordered by. A cursor is only valid for these. */
|
|
6
6
|
export type ListCursorFilters = {
|
|
7
7
|
/** `undefined` lists every folder; `null` is the root. */
|
|
8
|
-
|
|
8
|
+
folderId: string | null | undefined;
|
|
9
|
+
/** The folders below `folderId` are listed too. */
|
|
10
|
+
recursive: boolean;
|
|
9
11
|
search: string | undefined;
|
|
10
12
|
status: StorageObjectStatus;
|
|
11
13
|
route: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-cursor.d.ts","sourceRoot":"","sources":["../../src/store/list-cursor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAEhC,sDAAsD;AACtD,eAAO,MAAM,iBAAiB,EAAE,UAG/B,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0DAA0D;IAC1D,
|
|
1
|
+
{"version":3,"file":"list-cursor.d.ts","sourceRoot":"","sources":["../../src/store/list-cursor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,wBAAwB,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