@sequenceholdings/managed-functions 0.4.4 → 0.4.5
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/runtime.cjs +6 -1
- package/dist/storage.d.ts +34 -0
- package/package.json +2 -2
package/dist/runtime.cjs
CHANGED
|
@@ -29013,7 +29013,7 @@ var require_contracts = __commonJS({
|
|
|
29013
29013
|
"../storage/dist/contracts.js"(exports2) {
|
|
29014
29014
|
"use strict";
|
|
29015
29015
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
29016
|
-
exports2.storageErrorSchema = exports2.storageAccessSchema = exports2.updateStorageAccessSchema = exports2.storagePrincipalSchema = exports2.reconcileUploadsResultSchema = exports2.reconcileUploadsSchema = exports2.uploadListSchema = exports2.uploadLimitsSchema = exports2.uploadListItemSchema = exports2.uploadSessionSchema = exports2.startUploadBatchSchema = exports2.completeUploadSchema = exports2.startUploadSchema = exports2.storageChecksum = exports2.STORAGE_IMPORT_CONCURRENCY_MAX = exports2.STORAGE_IMPORT_CONCURRENCY_DEFAULT = exports2.STORAGE_UPLOAD_BATCH_LIMIT = exports2.STORAGE_PENDING_UPLOADS_PER_WORKSPACE = exports2.STORAGE_PENDING_UPLOADS_PER_PRINCIPAL = exports2.updateNodeSchema = exports2.createFolderSchema = exports2.listStorageSchema = exports2.storagePage = exports2.listStorageOperationsSchema = exports2.storageOperationScope = exports2.operationSchema = exports2.versionSchema = exports2.nodeSchema = exports2.workspaceSchema = exports2.workspaceManifestSchema = exports2.storageMetadata = exports2.storagePath = exports2.storageName = exports2.storageLifecycle = exports2.storageRole = exports2.storageId = void 0;
|
|
29016
|
+
exports2.storageErrorSchema = exports2.storageAccessSchema = exports2.updateStorageAccessSchema = exports2.storagePrincipalSchema = exports2.reconcileUploadsResultSchema = exports2.reconcileUploadsSchema = exports2.uploadListSchema = exports2.uploadLimitsSchema = exports2.uploadListItemSchema = exports2.uploadSessionSchema = exports2.startUploadBatchSchema = exports2.completeUploadSchema = exports2.startUploadSchema = exports2.storageChecksum = exports2.STORAGE_IMPORT_CONCURRENCY_MAX = exports2.STORAGE_IMPORT_CONCURRENCY_DEFAULT = exports2.STORAGE_UPLOAD_BATCH_LIMIT = exports2.STORAGE_PENDING_UPLOADS_PER_WORKSPACE = exports2.STORAGE_PENDING_UPLOADS_PER_PRINCIPAL = exports2.updateNodeSchema = exports2.createFolderSchema = exports2.listStorageSchema = exports2.storagePage = exports2.listStorageOperationsSchema = exports2.storageOperationScope = exports2.operationSchema = exports2.versionSchema = exports2.nodeWithAncestorsSchema = exports2.nodeSchema = exports2.workspaceSchema = exports2.workspaceManifestSchema = exports2.storageMetadata = exports2.storagePath = exports2.storageName = exports2.storageLifecycle = exports2.storageRole = exports2.storageId = void 0;
|
|
29017
29017
|
var zod_12 = require_zod();
|
|
29018
29018
|
var paths_js_1 = require_paths();
|
|
29019
29019
|
exports2.storageId = zod_12.z.uuid();
|
|
@@ -29078,6 +29078,9 @@ var require_contracts = __commonJS({
|
|
|
29078
29078
|
size: zod_12.z.number().nullable(),
|
|
29079
29079
|
contentType: zod_12.z.string().nullable()
|
|
29080
29080
|
});
|
|
29081
|
+
exports2.nodeWithAncestorsSchema = exports2.nodeSchema.extend({
|
|
29082
|
+
ancestors: zod_12.z.array(exports2.nodeSchema)
|
|
29083
|
+
});
|
|
29081
29084
|
exports2.versionSchema = zod_12.z.object({
|
|
29082
29085
|
id: exports2.storageId,
|
|
29083
29086
|
fileId: exports2.storageId,
|
|
@@ -29704,6 +29707,8 @@ var require_client = __commonJS({
|
|
|
29704
29707
|
delete: (expectedRevision) => request("DELETE", `${root}${query({ expectedRevision })}`, contracts_js_1.operationSchema),
|
|
29705
29708
|
list: (options = {}) => replayable("GET", `${root}/nodes${query({ ...options })}`, (0, contracts_js_1.storagePage)(contracts_js_1.nodeSchema)),
|
|
29706
29709
|
getNode: (id2) => replayable("GET", node(id2), contracts_js_1.nodeSchema),
|
|
29710
|
+
/** getNode plus its readable ancestors, decided in the same request. */
|
|
29711
|
+
getNodeWithAncestors: (id2) => replayable("GET", `${node(id2)}${query({ include: "ancestors" })}`, contracts_js_1.nodeWithAncestorsSchema),
|
|
29707
29712
|
/**
|
|
29708
29713
|
* Keyed like upload start, so every resend (storage_busy,
|
|
29709
29714
|
* permissions_pending, a lost reply) returns the one folder it made.
|
package/dist/storage.d.ts
CHANGED
|
@@ -134,6 +134,40 @@ export declare function createFunctionStorageClient({ baseUrl, headers, mode, }:
|
|
|
134
134
|
size: number | null;
|
|
135
135
|
contentType: string | null;
|
|
136
136
|
}>;
|
|
137
|
+
getNodeWithAncestors: (id: string) => Promise<{
|
|
138
|
+
id: string;
|
|
139
|
+
workspaceId: string;
|
|
140
|
+
parentId: string | null;
|
|
141
|
+
name: string;
|
|
142
|
+
kind: "file" | "folder";
|
|
143
|
+
state: "active" | "trashed" | "purging";
|
|
144
|
+
restricted: boolean;
|
|
145
|
+
revision: number;
|
|
146
|
+
currentVersionId: string | null;
|
|
147
|
+
metadata: Record<string, string>;
|
|
148
|
+
createdAt: string;
|
|
149
|
+
updatedAt: string;
|
|
150
|
+
role: "viewer" | "editor" | "admin";
|
|
151
|
+
size: number | null;
|
|
152
|
+
contentType: string | null;
|
|
153
|
+
ancestors: {
|
|
154
|
+
id: string;
|
|
155
|
+
workspaceId: string;
|
|
156
|
+
parentId: string | null;
|
|
157
|
+
name: string;
|
|
158
|
+
kind: "file" | "folder";
|
|
159
|
+
state: "active" | "trashed" | "purging";
|
|
160
|
+
restricted: boolean;
|
|
161
|
+
revision: number;
|
|
162
|
+
currentVersionId: string | null;
|
|
163
|
+
metadata: Record<string, string>;
|
|
164
|
+
createdAt: string;
|
|
165
|
+
updatedAt: string;
|
|
166
|
+
role: "viewer" | "editor" | "admin";
|
|
167
|
+
size: number | null;
|
|
168
|
+
contentType: string | null;
|
|
169
|
+
}[];
|
|
170
|
+
}>;
|
|
137
171
|
createFolder: (name: string, parentId?: string | null, { idempotencyKey, }?: {
|
|
138
172
|
idempotencyKey?: string;
|
|
139
173
|
}) => Promise<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequenceholdings/managed-functions",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Managed Function context and opt-in cache runtime",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"vitest": "^4.1.11",
|
|
49
49
|
"esbuild": "^0.25.0",
|
|
50
50
|
"tsup": "^8.3.0",
|
|
51
|
-
"@sequenceholdings/orm": "2.7.
|
|
51
|
+
"@sequenceholdings/orm": "2.7.1"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=20"
|