@raisindb/functions-types 0.1.18 → 0.1.54
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/package.json +1 -1
- package/raisin.d.ts +62 -0
package/package.json
CHANGED
package/raisin.d.ts
CHANGED
|
@@ -158,6 +158,20 @@ interface RaisinNode {
|
|
|
158
158
|
* @param data - Resource (from resize()), or { base64, mimeType, name }
|
|
159
159
|
*/
|
|
160
160
|
addResource(propertyPath: string, data: Resource | ResourceUploadData | string): Promise<any>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* True if this node carries the given mixin (type-declared, transitively).
|
|
164
|
+
* Backed by the server-materialized effective-mixin set.
|
|
165
|
+
* @param mixinName - e.g., "app:SEO"
|
|
166
|
+
*/
|
|
167
|
+
hasMixin(mixinName: string): boolean;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* True if this node "is a" given type — its node_type, any `extends` ancestor,
|
|
171
|
+
* or any effective mixin.
|
|
172
|
+
* @param typeName - e.g., "app:Folder"
|
|
173
|
+
*/
|
|
174
|
+
isNodeType(typeName: string): boolean;
|
|
161
175
|
}
|
|
162
176
|
|
|
163
177
|
interface ResourceUploadData {
|
|
@@ -166,6 +180,22 @@ interface ResourceUploadData {
|
|
|
166
180
|
name?: string;
|
|
167
181
|
}
|
|
168
182
|
|
|
183
|
+
/**
|
|
184
|
+
* A single entry in a node's revision history (newest first), returned by
|
|
185
|
+
* raisin.nodes.history(). Use `revision` with an at-revision read to fetch the
|
|
186
|
+
* full snapshot of that historical version.
|
|
187
|
+
*/
|
|
188
|
+
interface RaisinRevisionEntry {
|
|
189
|
+
/** HLC revision string ("timestamp-counter"). */
|
|
190
|
+
revision: string;
|
|
191
|
+
/** When this revision was written (ISO 8601 string). */
|
|
192
|
+
updated_at?: string;
|
|
193
|
+
/** User ID who authored this revision. */
|
|
194
|
+
updated_by?: string;
|
|
195
|
+
/** True when the node was deleted at this revision (tombstone). */
|
|
196
|
+
deleted: boolean;
|
|
197
|
+
}
|
|
198
|
+
|
|
169
199
|
interface NodeCreateData {
|
|
170
200
|
name?: string;
|
|
171
201
|
path?: string;
|
|
@@ -249,6 +279,7 @@ declare namespace raisin {
|
|
|
249
279
|
|
|
250
280
|
namespace crypto {
|
|
251
281
|
function uuid(): Promise<string>;
|
|
282
|
+
function verifyJwt(token: string, opts?: any | null): Promise<any>;
|
|
252
283
|
}
|
|
253
284
|
|
|
254
285
|
namespace date {
|
|
@@ -289,9 +320,31 @@ declare namespace raisin {
|
|
|
289
320
|
function delete(url: string, options?: HttpOptions): Promise<HttpResponse>;
|
|
290
321
|
}
|
|
291
322
|
|
|
323
|
+
namespace imap {
|
|
324
|
+
function fetchSince(conn: any, sinceUid: number, opts?: any | null): Promise<any>;
|
|
325
|
+
function listMailboxes(conn: any): Promise<any>;
|
|
326
|
+
function fetchMessage(conn: any, uid: number, opts?: any | null): Promise<any>;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
namespace integrations {
|
|
330
|
+
function syncNow(mountId: string, mode?: string | null): Promise<any>;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
namespace inventory {
|
|
334
|
+
function claim(pool: string, n: number, capacity: number): Promise<any>;
|
|
335
|
+
function release(pool: string, n: number): Promise<number>;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
namespace locks {
|
|
339
|
+
function acquire(key: string, ttlMs: number, owner?: string | null): Promise<any>;
|
|
340
|
+
function release(key: string, token: number): Promise<boolean>;
|
|
341
|
+
function renew(key: string, token: number, ttlMs: number): Promise<boolean>;
|
|
342
|
+
}
|
|
343
|
+
|
|
292
344
|
namespace nodes {
|
|
293
345
|
function get(workspace: string, path: string): Promise<RaisinNode | null>;
|
|
294
346
|
function getById(workspace: string, id: string): Promise<RaisinNode | null>;
|
|
347
|
+
function history(workspace: string, id: string, limit?: number | null): Promise<RaisinRevisionEntry[]>;
|
|
295
348
|
function create(workspace: string, parentPath: string, data: any): Promise<RaisinNode>;
|
|
296
349
|
function update(workspace: string, path: string, data: any): Promise<RaisinNode>;
|
|
297
350
|
function delete(workspace: string, path: string): Promise<void>;
|
|
@@ -299,7 +352,16 @@ declare namespace raisin {
|
|
|
299
352
|
function move(workspace: string, nodePath: string, newParentPath: string): Promise<RaisinNode>;
|
|
300
353
|
function query(workspace: string, query: any): Promise<RaisinNode[]>;
|
|
301
354
|
function getChildren(workspace: string, parentPath: string, limit?: number | null): Promise<RaisinNode[]>;
|
|
355
|
+
function applyChildOrder(workspace: string, parentPath: string, sourceBranch: string, targetBranch: string): Promise<void>;
|
|
302
356
|
function addResource(workspace: string, nodePath: string, propertyPath: string, uploadData: any): Promise<any>;
|
|
357
|
+
/**
|
|
358
|
+
* Create a node under parentPath, auto-creating any missing ancestor folders.
|
|
359
|
+
*/
|
|
360
|
+
function createDeep(workspace: string, parentPath: string, data: any, parentNodeType?: string): Promise<RaisinNode>;
|
|
361
|
+
/**
|
|
362
|
+
* Upsert a node by path (create-or-update), auto-creating any missing ancestor folders.
|
|
363
|
+
*/
|
|
364
|
+
function upsertDeep(workspace: string, data: any, parentNodeType?: string): Promise<void>;
|
|
303
365
|
/**
|
|
304
366
|
* Start a transaction for atomic multi-node operations.
|
|
305
367
|
* @example
|