proto.io 0.0.216 → 0.0.217
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/adapters/file/aliyun-oss.d.ts +3 -3
- package/dist/adapters/file/database.d.ts +2 -2
- package/dist/adapters/file/database.js +1 -1
- package/dist/adapters/file/database.mjs +1 -1
- package/dist/adapters/file/filesystem.d.ts +3 -3
- package/dist/adapters/file/google-cloud-storage.d.ts +3 -3
- package/dist/adapters/storage/progres.d.ts +5 -3
- package/dist/adapters/storage/progres.js +474 -111
- package/dist/adapters/storage/progres.js.map +1 -1
- package/dist/adapters/storage/progres.mjs +474 -111
- package/dist/adapters/storage/progres.mjs.map +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/client.js +1 -7
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internals/{base-BO3ZP6EF.d.ts → base-CWnOBKD5.d.ts} +2 -2
- package/dist/internals/base-CWnOBKD5.d.ts.map +1 -0
- package/dist/internals/{chunk-DDkLpKXp.d.ts → chunk-CNNSQpRF.d.ts} +3 -3
- package/dist/internals/chunk-CNNSQpRF.d.ts.map +1 -0
- package/dist/internals/{index-CYhA8SU8.d.ts → index-BRIlS3mY.d.ts} +3 -9
- package/dist/internals/index-BRIlS3mY.d.ts.map +1 -0
- package/dist/internals/{index-HdMgLYtD.d.ts → index-Bs8n7Q8f.d.ts} +55 -18
- package/dist/internals/index-Bs8n7Q8f.d.ts.map +1 -0
- package/dist/internals/{index-DF2AfSGK.mjs → index-DfqABzjr.mjs} +134 -141
- package/dist/internals/index-DfqABzjr.mjs.map +1 -0
- package/dist/internals/{index-DfnPpl1I.js → index-DylUjD_1.js} +133 -146
- package/dist/internals/index-DylUjD_1.js.map +1 -0
- package/dist/internals/{validator-LNgZGT_l.mjs → validator-CEcBF4Cn.mjs} +728 -27
- package/dist/internals/validator-CEcBF4Cn.mjs.map +1 -0
- package/dist/internals/{validator-BBjOdLiT.js → validator-mcBCJP4P.js} +734 -27
- package/dist/internals/validator-mcBCJP4P.js.map +1 -0
- package/package.json +1 -1
- package/dist/internals/base-BO3ZP6EF.d.ts.map +0 -1
- package/dist/internals/chunk-DDkLpKXp.d.ts.map +0 -1
- package/dist/internals/index-CYhA8SU8.d.ts.map +0 -1
- package/dist/internals/index-DF2AfSGK.mjs.map +0 -1
- package/dist/internals/index-DfnPpl1I.js.map +0 -1
- package/dist/internals/index-HdMgLYtD.d.ts.map +0 -1
- package/dist/internals/validator-BBjOdLiT.js.map +0 -1
- package/dist/internals/validator-LNgZGT_l.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as TFileStorage, T as TSchema, P as ProtoService,
|
|
1
|
+
import { d as TFileStorage, T as TSchema, P as ProtoService, G as TFileInfo } from './index-Bs8n7Q8f.js';
|
|
2
2
|
import { BinaryData } from '@o2ter/utils-js';
|
|
3
3
|
|
|
4
4
|
type FileStorageOptions = {
|
|
@@ -23,4 +23,4 @@ declare abstract class FileStorageBase implements TFileStorage {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export { FileStorageBase as F, type FileStorageOptions as a };
|
|
26
|
-
//# sourceMappingURL=base-
|
|
26
|
+
//# sourceMappingURL=base-CWnOBKD5.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-CWnOBKD5.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FileStorageBase } from './base-
|
|
2
|
-
import { P as ProtoService } from './index-
|
|
1
|
+
import { F as FileStorageBase } from './base-CWnOBKD5.js';
|
|
2
|
+
import { P as ProtoService } from './index-Bs8n7Q8f.js';
|
|
3
3
|
|
|
4
4
|
declare abstract class FileChunkStorageBase<File> extends FileStorageBase {
|
|
5
5
|
abstract listChunks<E>(proto: ProtoService<E>, token: string, start?: number, end?: number): AsyncGenerator<{
|
|
@@ -14,4 +14,4 @@ declare abstract class FileChunkStorageBase<File> extends FileStorageBase {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export { FileChunkStorageBase as F };
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-CNNSQpRF.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-CNNSQpRF.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { h as TExtensions,
|
|
1
|
+
import { h as TExtensions, E as ExtraOptions, S as SerializeOptions, i as ProtoType, j as TQuery, k as TObject, l as PathName, a as TValueWithoutObject, f as TSerializable, m as TObjectType, n as TUser, T as TSchema, o as EventData, p as TQuerySelector } from './index-Bs8n7Q8f.js';
|
|
2
2
|
import * as _o2ter_utils_js from '@o2ter/utils-js';
|
|
3
3
|
import * as socket_io_client from 'socket.io-client';
|
|
4
4
|
import * as _socket_io_component_emitter from '@socket.io/component-emitter';
|
|
5
5
|
|
|
6
6
|
declare const classExtends: <E = {}>(x: TExtensions<E>) => TExtensions<E>;
|
|
7
|
-
declare const isQuery: (x: any) => x is TQuery<any, any, any>;
|
|
8
|
-
declare const isObject: (x: any) => x is TObject;
|
|
9
|
-
declare const isUser: (x: any) => x is TUser;
|
|
10
|
-
declare const isRole: (x: any) => x is TRole;
|
|
11
|
-
declare const isFile: (x: any) => x is TFile;
|
|
12
|
-
declare const isJob: (x: any) => x is TJob;
|
|
13
7
|
|
|
14
8
|
type RequestOptions<M extends boolean> = ExtraOptions<M> & {
|
|
15
9
|
serializeOpts?: SerializeOptions;
|
|
@@ -89,5 +83,5 @@ declare class ProtoClient<Ext = any> extends ProtoType<Ext> {
|
|
|
89
83
|
refs(object: TObject, options?: RequestOptions<boolean>): _o2ter_utils_js.AsyncStream<TObjectType<string, Ext>>;
|
|
90
84
|
}
|
|
91
85
|
|
|
92
|
-
export { ProtoClient as P,
|
|
93
|
-
//# sourceMappingURL=index-
|
|
86
|
+
export { ProtoClient as P, classExtends as c };
|
|
87
|
+
//# sourceMappingURL=index-BRIlS3mY.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BRIlS3mY.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -3,7 +3,7 @@ import { BinaryData, asyncStream, Awaitable } from '@o2ter/utils-js';
|
|
|
3
3
|
import jwt, { SignOptions, VerifyOptions } from 'jsonwebtoken';
|
|
4
4
|
import { Request, CookieOptions } from '@o2ter/server-js';
|
|
5
5
|
import Decimal$1, { Decimal } from 'decimal.js';
|
|
6
|
-
import _ from 'lodash';
|
|
6
|
+
import _$1 from 'lodash';
|
|
7
7
|
import { Readable } from 'node:stream';
|
|
8
8
|
import * as socket_io_client from 'socket.io-client';
|
|
9
9
|
import { Socket } from 'socket.io-client';
|
|
@@ -20,7 +20,7 @@ type PathComponent<T extends string> = T extends Digits<T> | FieldName<T> ? T :
|
|
|
20
20
|
type PathComponents<T extends string> = T extends PathComponent<T> ? T : T extends `${PathComponent<infer L>}.${infer R}` ? `${L}.${PathComponents<R>}` : never;
|
|
21
21
|
type PathName<T extends string> = string extends T ? string : T extends '$' | PathComponent<T> ? T : T extends `${infer L}.${infer R}` ? `${PathComponent<L>}.${PathComponents<R>}` : never;
|
|
22
22
|
type IncludePath<T extends string> = T extends '*' | FieldName<T> ? T : T extends `${infer L}.${infer R}` ? `${FieldName<L>}.${IncludePath<R>}` : never;
|
|
23
|
-
type IncludePaths<T extends _.RecursiveArray<string>> = T extends [] ? [] : T extends [infer H extends string, ...infer R extends _.RecursiveArray<string>] ? H extends undefined ? IncludePaths<R> : [IncludePath<H>, ...IncludePaths<R>] : T;
|
|
23
|
+
type IncludePaths<T extends _$1.RecursiveArray<string>> = T extends [] ? [] : T extends [infer H extends string, ...infer R extends _$1.RecursiveArray<string>] ? H extends undefined ? IncludePaths<R> : [IncludePath<H>, ...IncludePaths<R>] : T;
|
|
24
24
|
type PathNameMap<T extends object> = Exact<T, {
|
|
25
25
|
[K in keyof T as K extends string ? PathName<K> : never]: T[K];
|
|
26
26
|
}>;
|
|
@@ -204,8 +204,13 @@ declare const TComparisonKeys: readonly ["$eq", "$gt", "$gte", "$lt", "$lte", "$
|
|
|
204
204
|
declare const TValueListKeys: readonly ["$in", "$nin"];
|
|
205
205
|
declare const TValueSetKeys: readonly ["$subset", "$superset", "$intersect"];
|
|
206
206
|
declare const TConditionalKeys: readonly ["$and", "$nor", "$or"];
|
|
207
|
-
declare const TDistanceKeys: readonly ["$distance", "$innerProduct", "$negInnerProduct", "$cosineDistance", "$rectilinearDistance"];
|
|
208
207
|
|
|
208
|
+
declare const TZeroParamExprKeys: readonly ["$now", "$rand"];
|
|
209
|
+
declare const TUnaryExprKeys: readonly ["$abs", "$neg", "$sqrt", "$cbrt", "$ceil", "$floor", "$round", "$exp", "$ln", "$log2", "$log10", "$sin", "$cos", "$tan", "$asin", "$acos", "$atan", "$asinh", "$acosh", "$atanh", "$sinh", "$cosh", "$tanh", "$degrees", "$radians", "$sign", "$size", "$lower", "$upper"];
|
|
210
|
+
declare const TBinaryExprKeys: readonly ["$divide", "$subtract", "$log", "$pow", "$atan2", "$trim", "$ltrim", "$rtrim", "$first", "$last", "$ldrop", "$rdrop"];
|
|
211
|
+
declare const TTernaryExprKeys: readonly ["$lpad", "$rpad"];
|
|
212
|
+
declare const TListExprKeys: readonly ["$add", "$multiply", "$ifNull", "$concat"];
|
|
213
|
+
declare const TDistanceExprKeys: readonly ["$distance", "$innerProduct", "$negInnerProduct", "$cosineDistance", "$rectilinearDistance"];
|
|
209
214
|
type TBooleanExpression = {
|
|
210
215
|
$not?: TBooleanExpression;
|
|
211
216
|
} & {
|
|
@@ -214,7 +219,7 @@ type TBooleanExpression = {
|
|
|
214
219
|
[x in (typeof TConditionalKeys)[number]]?: TBooleanExpression[];
|
|
215
220
|
};
|
|
216
221
|
type TDistanceExpression = {
|
|
217
|
-
[x in (typeof
|
|
222
|
+
[x in (typeof TDistanceExprKeys)[number]]?: [
|
|
218
223
|
TExpression[] | {
|
|
219
224
|
$key: string;
|
|
220
225
|
} | {
|
|
@@ -231,6 +236,24 @@ type TExpression = {
|
|
|
231
236
|
$array?: TExpression[];
|
|
232
237
|
$key?: string;
|
|
233
238
|
$value?: TValue;
|
|
239
|
+
} & {
|
|
240
|
+
$cond?: {
|
|
241
|
+
branch: _.Many<{
|
|
242
|
+
case: TExpression;
|
|
243
|
+
then: TExpression;
|
|
244
|
+
}[]>;
|
|
245
|
+
default: TExpression;
|
|
246
|
+
};
|
|
247
|
+
} & {
|
|
248
|
+
[x in (typeof TZeroParamExprKeys)[number]]?: true | {};
|
|
249
|
+
} & {
|
|
250
|
+
[x in (typeof TUnaryExprKeys)[number]]?: TExpression;
|
|
251
|
+
} & {
|
|
252
|
+
[x in (typeof TBinaryExprKeys)[number]]?: [TExpression, TExpression];
|
|
253
|
+
} & {
|
|
254
|
+
[x in (typeof TTernaryExprKeys)[number]]?: [TExpression, TExpression, TExpression];
|
|
255
|
+
} & {
|
|
256
|
+
[x in (typeof TListExprKeys)[number]]?: TExpression[];
|
|
234
257
|
} & TBooleanExpression & TDistanceExpression;
|
|
235
258
|
|
|
236
259
|
type TThisQuerySelector = {
|
|
@@ -261,8 +284,8 @@ type TQuerySelector = (TCoditionalQuerySelector & {
|
|
|
261
284
|
[x: string]: TFieldQuerySelector;
|
|
262
285
|
};
|
|
263
286
|
|
|
264
|
-
declare const
|
|
265
|
-
declare const
|
|
287
|
+
declare const TUnaryAccumulatorKeys: readonly ["$max", "$min", "$most", "$sum", "$avg", "$stdDevPop", "$stdDevSamp", "$varPop", "$varSamp"];
|
|
288
|
+
declare const TZeroParamAccumulatorKeys: readonly ["$count"];
|
|
266
289
|
type TQueryAccumulator = {
|
|
267
290
|
$percentile?: {
|
|
268
291
|
input: TExpression;
|
|
@@ -270,9 +293,9 @@ type TQueryAccumulator = {
|
|
|
270
293
|
mode?: 'discrete' | 'continuous';
|
|
271
294
|
};
|
|
272
295
|
} & {
|
|
273
|
-
[x in (typeof
|
|
296
|
+
[x in (typeof TZeroParamAccumulatorKeys)[number]]?: true | {};
|
|
274
297
|
} & {
|
|
275
|
-
[x in (typeof
|
|
298
|
+
[x in (typeof TUnaryAccumulatorKeys)[number]]?: TExpression;
|
|
276
299
|
};
|
|
277
300
|
|
|
278
301
|
/**
|
|
@@ -428,6 +451,20 @@ declare class TQueryFilterBase {
|
|
|
428
451
|
* @returns The current instance for chaining.
|
|
429
452
|
*/
|
|
430
453
|
notContainedIn<T extends string>(key: PathName<T>, value: TValueWithUndefined[]): this;
|
|
454
|
+
/**
|
|
455
|
+
* Filters the query to include only documents where the specified key contains all of the specified values.
|
|
456
|
+
* @param key - The key to check for containing values.
|
|
457
|
+
* @param value - The array of values to check against.
|
|
458
|
+
* @returns The current instance for chaining.
|
|
459
|
+
*/
|
|
460
|
+
containedBy<T extends string>(key: PathName<T>, value: TValueWithUndefined[]): this;
|
|
461
|
+
/**
|
|
462
|
+
* Filters the query to exclude documents where the specified key contains all of the specified values.
|
|
463
|
+
* @param key - The key to check for superset.
|
|
464
|
+
* @param value - The array of values to check against.
|
|
465
|
+
* @returns The current instance for chaining.
|
|
466
|
+
*/
|
|
467
|
+
notContainedBy<T extends string>(key: PathName<T>, value: TValueWithUndefined[]): this;
|
|
431
468
|
/**
|
|
432
469
|
* Filters the query to include only documents where the specified key is a subset of the specified values.
|
|
433
470
|
* @param key - The key to check for subset.
|
|
@@ -475,19 +512,19 @@ declare class TQueryFilterBase {
|
|
|
475
512
|
* @param callbacks - The callback queries to apply.
|
|
476
513
|
* @returns The current instance for chaining.
|
|
477
514
|
*/
|
|
478
|
-
and(...callbacks: _.Many<(query: TQueryFilterBase) => void>[]): this;
|
|
515
|
+
and(...callbacks: _$1.Many<(query: TQueryFilterBase) => void>[]): this;
|
|
479
516
|
/**
|
|
480
517
|
* Filters the query to include only documents that match any of the provided callback queries.
|
|
481
518
|
* @param callbacks - The callback queries to apply.
|
|
482
519
|
* @returns The current instance for chaining.
|
|
483
520
|
*/
|
|
484
|
-
or(...callbacks: _.Many<(query: TQueryFilterBase) => void>[]): this;
|
|
521
|
+
or(...callbacks: _$1.Many<(query: TQueryFilterBase) => void>[]): this;
|
|
485
522
|
/**
|
|
486
523
|
* Filters the query to include only documents that do not match any of the provided callback queries.
|
|
487
524
|
* @param callbacks - The callback queries to apply.
|
|
488
525
|
* @returns The current instance for chaining.
|
|
489
526
|
*/
|
|
490
|
-
nor(...callbacks: _.Many<(query: TQueryFilterBase) => void>[]): this;
|
|
527
|
+
nor(...callbacks: _$1.Many<(query: TQueryFilterBase) => void>[]): this;
|
|
491
528
|
}
|
|
492
529
|
declare class TQueryBase extends TQueryFilterBase {
|
|
493
530
|
/**
|
|
@@ -657,7 +694,7 @@ declare abstract class TQuery<T extends string, Ext, M extends boolean> extends
|
|
|
657
694
|
* @param includes - The fields to include.
|
|
658
695
|
* @returns The query instance.
|
|
659
696
|
*/
|
|
660
|
-
includes<T extends _.RecursiveArray<string>>(...includes: IncludePaths<T>): this;
|
|
697
|
+
includes<T extends _$1.RecursiveArray<string>>(...includes: IncludePaths<T>): this;
|
|
661
698
|
/**
|
|
662
699
|
* Gets a record by its ID.
|
|
663
700
|
* @param id - The ID of the record.
|
|
@@ -1162,7 +1199,7 @@ interface TObject {
|
|
|
1162
1199
|
* @param options - Additional options for the fetch operation.
|
|
1163
1200
|
* @returns A promise that resolves to the fetched object.
|
|
1164
1201
|
*/
|
|
1165
|
-
fetchWithInclude<T extends _.RecursiveArray<string>>(keys: IncludePaths<T>, options?: ExtraOptions<boolean>): PromiseLike<this>;
|
|
1202
|
+
fetchWithInclude<T extends _$1.RecursiveArray<string>>(keys: IncludePaths<T>, options?: ExtraOptions<boolean>): PromiseLike<this>;
|
|
1166
1203
|
/**
|
|
1167
1204
|
* Saves the object.
|
|
1168
1205
|
* @param options - Additional options for the save operation.
|
|
@@ -1353,7 +1390,7 @@ declare class TObject {
|
|
|
1353
1390
|
* @param options - Additional options for the fetch operation.
|
|
1354
1391
|
* @returns A promise that resolves to the fetched object.
|
|
1355
1392
|
*/
|
|
1356
|
-
fetchIfNeeded<T extends _.RecursiveArray<string>>(keys: IncludePaths<T>, options?: ExtraOptions<boolean>): Promise<this>;
|
|
1393
|
+
fetchIfNeeded<T extends _$1.RecursiveArray<string>>(keys: IncludePaths<T>, options?: ExtraOptions<boolean>): Promise<this>;
|
|
1357
1394
|
}
|
|
1358
1395
|
|
|
1359
1396
|
type _TContainer<Primitive> = {
|
|
@@ -1629,7 +1666,7 @@ interface TFileStorage {
|
|
|
1629
1666
|
}
|
|
1630
1667
|
|
|
1631
1668
|
declare class QueryExpression {
|
|
1632
|
-
static decode(expr: _.Many<TExpression>, dollerSign: boolean): QueryExpression;
|
|
1669
|
+
static decode(expr: _$1.Many<TExpression>, dollerSign: boolean): QueryExpression;
|
|
1633
1670
|
simplify(): QueryExpression;
|
|
1634
1671
|
keyPaths(): string[];
|
|
1635
1672
|
mapKey(callback: (key: string) => string): QueryExpression;
|
|
@@ -1638,7 +1675,7 @@ declare class QueryExpression {
|
|
|
1638
1675
|
}
|
|
1639
1676
|
|
|
1640
1677
|
declare class QuerySelector {
|
|
1641
|
-
static decode(selectors: _.Many<TQuerySelector>, dollerSign?: boolean): QuerySelector;
|
|
1678
|
+
static decode(selectors: _$1.Many<TQuerySelector>, dollerSign?: boolean): QuerySelector;
|
|
1642
1679
|
simplify(): QuerySelector;
|
|
1643
1680
|
keyPaths(): string[];
|
|
1644
1681
|
eval(value: any): boolean;
|
|
@@ -1963,5 +2000,5 @@ declare class ProtoService<Ext = any> extends ProtoType<Ext> {
|
|
|
1963
2000
|
gc(classNames?: string | string[]): Promise<void>;
|
|
1964
2001
|
}
|
|
1965
2002
|
|
|
1966
|
-
export { type
|
|
1967
|
-
//# sourceMappingURL=index-
|
|
2003
|
+
export { type TransactionOptions as A, type QueryRandomOptions as B, type TPubSub as C, type DeserializeOptions as D, type ExtraOptions as E, FieldSelectorExpression as F, type TFileInfo as G, type InsertOptions as I, ProtoService as P, QueryExpression as Q, type RelationOptions as R, type SerializeOptions as S, TSchema as T, type TValueWithoutObject as a, type ProtoServiceOptions as b, type ProtoServiceKeyOptions as c, type TFileStorage as d, type TNumber as e, type TSerializable as f, deserialize as g, type TExtensions as h, ProtoType as i, TQuery as j, TObject as k, type PathName as l, type TObjectType as m, TUser as n, type EventData as o, type TQuerySelector as p, type TValueWithUndefined as q, type TValue as r, serialize as s, type TUpdateOp as t, QueryAccumulator as u, QuerySelector as v, type DecodedSortOption as w, type DecodedQuery as x, type FindOptions as y, type TStorage as z };
|
|
2004
|
+
//# sourceMappingURL=index-Bs8n7Q8f.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Bs8n7Q8f.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -198,6 +198,24 @@ class TQueryFilterBase {
|
|
|
198
198
|
notContainedIn(key, value) {
|
|
199
199
|
return this.filter({ [key]: { $nin: value } });
|
|
200
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Filters the query to include only documents where the specified key contains all of the specified values.
|
|
203
|
+
* @param key - The key to check for containing values.
|
|
204
|
+
* @param value - The array of values to check against.
|
|
205
|
+
* @returns The current instance for chaining.
|
|
206
|
+
*/
|
|
207
|
+
containedBy(key, value) {
|
|
208
|
+
return this.filter({ [key]: { $superset: value } });
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Filters the query to exclude documents where the specified key contains all of the specified values.
|
|
212
|
+
* @param key - The key to check for superset.
|
|
213
|
+
* @param value - The array of values to check against.
|
|
214
|
+
* @returns The current instance for chaining.
|
|
215
|
+
*/
|
|
216
|
+
notContainedBy(key, value) {
|
|
217
|
+
return this.filter({ [key]: { $not: { $superset: value } } });
|
|
218
|
+
}
|
|
201
219
|
/**
|
|
202
220
|
* Filters the query to include only documents where the specified key is a subset of the specified values.
|
|
203
221
|
* @param key - The key to check for subset.
|
|
@@ -600,7 +618,7 @@ class LiveQuerySubscription {
|
|
|
600
618
|
}
|
|
601
619
|
|
|
602
620
|
//
|
|
603
|
-
//
|
|
621
|
+
// user.ts
|
|
604
622
|
//
|
|
605
623
|
// The MIT License
|
|
606
624
|
// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
|
|
@@ -623,45 +641,14 @@ class LiveQuerySubscription {
|
|
|
623
641
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
624
642
|
// THE SOFTWARE.
|
|
625
643
|
//
|
|
626
|
-
|
|
627
|
-
* Class representing a file.
|
|
628
|
-
*/
|
|
629
|
-
class TFile extends TObject {
|
|
644
|
+
class TUser extends TObject {
|
|
630
645
|
constructor(attributes) {
|
|
631
|
-
super('
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* Gets the filename of the file.
|
|
635
|
-
* @returns The filename.
|
|
636
|
-
*/
|
|
637
|
-
get filename() {
|
|
638
|
-
return this.get('filename');
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* Gets the size of the file.
|
|
642
|
-
* @returns The size of the file.
|
|
643
|
-
*/
|
|
644
|
-
get size() {
|
|
645
|
-
return this.get('size');
|
|
646
|
-
}
|
|
647
|
-
/**
|
|
648
|
-
* Gets the type of the file.
|
|
649
|
-
* @returns The type of the file.
|
|
650
|
-
*/
|
|
651
|
-
get type() {
|
|
652
|
-
return this.get('type');
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* Gets the token of the file.
|
|
656
|
-
* @returns The token of the file.
|
|
657
|
-
*/
|
|
658
|
-
get token() {
|
|
659
|
-
return this.get('token');
|
|
646
|
+
super('User', attributes);
|
|
660
647
|
}
|
|
661
648
|
}
|
|
662
649
|
|
|
663
650
|
//
|
|
664
|
-
//
|
|
651
|
+
// role.ts
|
|
665
652
|
//
|
|
666
653
|
// The MIT License
|
|
667
654
|
// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
|
|
@@ -685,59 +672,52 @@ class TFile extends TObject {
|
|
|
685
672
|
// THE SOFTWARE.
|
|
686
673
|
//
|
|
687
674
|
/**
|
|
688
|
-
* Class representing a
|
|
675
|
+
* Class representing a Role.
|
|
689
676
|
* @extends TObject
|
|
690
677
|
*/
|
|
691
|
-
class
|
|
678
|
+
class TRole extends TObject {
|
|
692
679
|
constructor(attributes) {
|
|
693
|
-
super('
|
|
680
|
+
super('Role', attributes);
|
|
694
681
|
}
|
|
695
682
|
/**
|
|
696
|
-
* Get the name of the
|
|
697
|
-
* @return {string} The name of the
|
|
683
|
+
* Get the name of the role.
|
|
684
|
+
* @return {string | undefined} The name of the role.
|
|
698
685
|
*/
|
|
699
686
|
get name() {
|
|
700
687
|
return this.get('name');
|
|
701
688
|
}
|
|
702
689
|
/**
|
|
703
|
-
* Get the
|
|
704
|
-
* @return {
|
|
705
|
-
*/
|
|
706
|
-
get data() {
|
|
707
|
-
return this.get('data');
|
|
708
|
-
}
|
|
709
|
-
/**
|
|
710
|
-
* Get the user associated with the job.
|
|
711
|
-
* @return {TUser | undefined} The user associated with the job.
|
|
690
|
+
* Get the users associated with the role.
|
|
691
|
+
* @return {TUser[]} The users associated with the role.
|
|
712
692
|
*/
|
|
713
|
-
get
|
|
714
|
-
return this.get('
|
|
693
|
+
get users() {
|
|
694
|
+
return this.get('users') ?? [];
|
|
715
695
|
}
|
|
716
696
|
/**
|
|
717
|
-
*
|
|
718
|
-
* @
|
|
697
|
+
* Set the users associated with the role.
|
|
698
|
+
* @param {TUser[]} value - The users to associate with the role.
|
|
719
699
|
*/
|
|
720
|
-
|
|
721
|
-
|
|
700
|
+
set users(value) {
|
|
701
|
+
this.set('users', value);
|
|
722
702
|
}
|
|
723
703
|
/**
|
|
724
|
-
* Get the
|
|
725
|
-
* @return {
|
|
704
|
+
* Get the roles associated with the role.
|
|
705
|
+
* @return {TRole[]} The roles associated with the role.
|
|
726
706
|
*/
|
|
727
|
-
get
|
|
728
|
-
return this.get('
|
|
707
|
+
get roles() {
|
|
708
|
+
return this.get('roles') ?? [];
|
|
729
709
|
}
|
|
730
710
|
/**
|
|
731
|
-
*
|
|
732
|
-
* @
|
|
711
|
+
* Set the roles associated with the role.
|
|
712
|
+
* @param {TRole[]} value - The roles to associate with the role.
|
|
733
713
|
*/
|
|
734
|
-
|
|
735
|
-
|
|
714
|
+
set roles(value) {
|
|
715
|
+
this.set('roles', value);
|
|
736
716
|
}
|
|
737
717
|
}
|
|
738
718
|
|
|
739
719
|
//
|
|
740
|
-
//
|
|
720
|
+
// file.ts
|
|
741
721
|
//
|
|
742
722
|
// The MIT License
|
|
743
723
|
// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
|
|
@@ -761,52 +741,44 @@ class TJob extends TObject {
|
|
|
761
741
|
// THE SOFTWARE.
|
|
762
742
|
//
|
|
763
743
|
/**
|
|
764
|
-
* Class representing a
|
|
765
|
-
* @extends TObject
|
|
744
|
+
* Class representing a file.
|
|
766
745
|
*/
|
|
767
|
-
class
|
|
746
|
+
class TFile extends TObject {
|
|
768
747
|
constructor(attributes) {
|
|
769
|
-
super('
|
|
770
|
-
}
|
|
771
|
-
/**
|
|
772
|
-
* Get the name of the role.
|
|
773
|
-
* @return {string | undefined} The name of the role.
|
|
774
|
-
*/
|
|
775
|
-
get name() {
|
|
776
|
-
return this.get('name');
|
|
748
|
+
super('File', attributes);
|
|
777
749
|
}
|
|
778
750
|
/**
|
|
779
|
-
*
|
|
780
|
-
* @
|
|
751
|
+
* Gets the filename of the file.
|
|
752
|
+
* @returns The filename.
|
|
781
753
|
*/
|
|
782
|
-
get
|
|
783
|
-
return this.get('
|
|
754
|
+
get filename() {
|
|
755
|
+
return this.get('filename');
|
|
784
756
|
}
|
|
785
757
|
/**
|
|
786
|
-
*
|
|
787
|
-
* @
|
|
758
|
+
* Gets the size of the file.
|
|
759
|
+
* @returns The size of the file.
|
|
788
760
|
*/
|
|
789
|
-
|
|
790
|
-
this.
|
|
761
|
+
get size() {
|
|
762
|
+
return this.get('size');
|
|
791
763
|
}
|
|
792
764
|
/**
|
|
793
|
-
*
|
|
794
|
-
* @
|
|
765
|
+
* Gets the type of the file.
|
|
766
|
+
* @returns The type of the file.
|
|
795
767
|
*/
|
|
796
|
-
get
|
|
797
|
-
return this.get('
|
|
768
|
+
get type() {
|
|
769
|
+
return this.get('type');
|
|
798
770
|
}
|
|
799
771
|
/**
|
|
800
|
-
*
|
|
801
|
-
* @
|
|
772
|
+
* Gets the token of the file.
|
|
773
|
+
* @returns The token of the file.
|
|
802
774
|
*/
|
|
803
|
-
|
|
804
|
-
this.
|
|
775
|
+
get token() {
|
|
776
|
+
return this.get('token');
|
|
805
777
|
}
|
|
806
778
|
}
|
|
807
779
|
|
|
808
780
|
//
|
|
809
|
-
//
|
|
781
|
+
// job.ts
|
|
810
782
|
//
|
|
811
783
|
// The MIT License
|
|
812
784
|
// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
|
|
@@ -829,9 +801,55 @@ class TRole extends TObject {
|
|
|
829
801
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
830
802
|
// THE SOFTWARE.
|
|
831
803
|
//
|
|
832
|
-
|
|
804
|
+
/**
|
|
805
|
+
* Class representing a Job.
|
|
806
|
+
* @extends TObject
|
|
807
|
+
*/
|
|
808
|
+
class TJob extends TObject {
|
|
833
809
|
constructor(attributes) {
|
|
834
|
-
super('
|
|
810
|
+
super('_Job', attributes);
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Get the name of the job.
|
|
814
|
+
* @return {string} The name of the job.
|
|
815
|
+
*/
|
|
816
|
+
get name() {
|
|
817
|
+
return this.get('name');
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Get the data of the job.
|
|
821
|
+
* @return {TValue | undefined} The data of the job.
|
|
822
|
+
*/
|
|
823
|
+
get data() {
|
|
824
|
+
return this.get('data');
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Get the user associated with the job.
|
|
828
|
+
* @return {TUser | undefined} The user associated with the job.
|
|
829
|
+
*/
|
|
830
|
+
get user() {
|
|
831
|
+
return this.get('user');
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Get the error of the job.
|
|
835
|
+
* @return {TValue | undefined} The error of the job.
|
|
836
|
+
*/
|
|
837
|
+
get error() {
|
|
838
|
+
return this.get('error');
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Get the start time of the job.
|
|
842
|
+
* @return {Date | undefined} The start time of the job.
|
|
843
|
+
*/
|
|
844
|
+
get startedAt() {
|
|
845
|
+
return this.get('startedAt');
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* Get the completion time of the job.
|
|
849
|
+
* @return {Date | undefined} The completion time of the job.
|
|
850
|
+
*/
|
|
851
|
+
get completedAt() {
|
|
852
|
+
return this.get('completedAt');
|
|
835
853
|
}
|
|
836
854
|
}
|
|
837
855
|
|
|
@@ -867,7 +885,7 @@ const TObjectTypes = {
|
|
|
867
885
|
};
|
|
868
886
|
|
|
869
887
|
//
|
|
870
|
-
//
|
|
888
|
+
// index.ts
|
|
871
889
|
//
|
|
872
890
|
// The MIT License
|
|
873
891
|
// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
|
|
@@ -891,6 +909,25 @@ const TObjectTypes = {
|
|
|
891
909
|
// THE SOFTWARE.
|
|
892
910
|
//
|
|
893
911
|
const isObjKey = (key, obj) => key in obj;
|
|
912
|
+
const classExtends = (x) => x;
|
|
913
|
+
const isQuery = (x) => {
|
|
914
|
+
return x instanceof TQuery;
|
|
915
|
+
};
|
|
916
|
+
const isObject = (x) => {
|
|
917
|
+
return x instanceof TObject;
|
|
918
|
+
};
|
|
919
|
+
const isUser = (x) => {
|
|
920
|
+
return x instanceof TUser;
|
|
921
|
+
};
|
|
922
|
+
const isRole = (x) => {
|
|
923
|
+
return x instanceof TRole;
|
|
924
|
+
};
|
|
925
|
+
const isFile = (x) => {
|
|
926
|
+
return x instanceof TFile;
|
|
927
|
+
};
|
|
928
|
+
const isJob = (x) => {
|
|
929
|
+
return x instanceof TJob;
|
|
930
|
+
};
|
|
894
931
|
|
|
895
932
|
//
|
|
896
933
|
// codec.ts
|
|
@@ -979,50 +1016,6 @@ const decodeEJSON = (x, stack, options) => {
|
|
|
979
1016
|
const serialize = (x, options) => JSON.stringify(encodeEJSON(x, [], options ?? {}), undefined, options?.space);
|
|
980
1017
|
const deserialize = (buffer, options) => decodeEJSON(JSON.parse(buffer), [], options ?? {});
|
|
981
1018
|
|
|
982
|
-
//
|
|
983
|
-
// index.ts
|
|
984
|
-
//
|
|
985
|
-
// The MIT License
|
|
986
|
-
// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
|
|
987
|
-
//
|
|
988
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
989
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
990
|
-
// in the Software without restriction, including without limitation the rights
|
|
991
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
992
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
993
|
-
// furnished to do so, subject to the following conditions:
|
|
994
|
-
//
|
|
995
|
-
// The above copyright notice and this permission notice shall be included in
|
|
996
|
-
// all copies or substantial portions of the Software.
|
|
997
|
-
//
|
|
998
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
999
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1000
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1001
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1002
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1003
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1004
|
-
// THE SOFTWARE.
|
|
1005
|
-
//
|
|
1006
|
-
const classExtends = (x) => x;
|
|
1007
|
-
const isQuery = (x) => {
|
|
1008
|
-
return x instanceof TQuery;
|
|
1009
|
-
};
|
|
1010
|
-
const isObject = (x) => {
|
|
1011
|
-
return x instanceof TObject;
|
|
1012
|
-
};
|
|
1013
|
-
const isUser = (x) => {
|
|
1014
|
-
return x instanceof TUser;
|
|
1015
|
-
};
|
|
1016
|
-
const isRole = (x) => {
|
|
1017
|
-
return x instanceof TRole;
|
|
1018
|
-
};
|
|
1019
|
-
const isFile = (x) => {
|
|
1020
|
-
return x instanceof TFile;
|
|
1021
|
-
};
|
|
1022
|
-
const isJob = (x) => {
|
|
1023
|
-
return x instanceof TJob;
|
|
1024
|
-
};
|
|
1025
|
-
|
|
1026
1019
|
//
|
|
1027
1020
|
// methods.ts
|
|
1028
1021
|
//
|
|
@@ -2025,5 +2018,5 @@ class ProtoClient extends ProtoType {
|
|
|
2025
2018
|
}
|
|
2026
2019
|
}
|
|
2027
2020
|
|
|
2028
|
-
export { LiveQuerySubscription as L, ProtoType as P, TQuery as T, _logLevels as _, TUser as a, ProtoClient as b, classExtends as c, deserialize as d,
|
|
2029
|
-
//# sourceMappingURL=index-
|
|
2021
|
+
export { LiveQuerySubscription as L, ProtoType as P, TQuery as T, _logLevels as _, TUser as a, ProtoClient as b, classExtends as c, deserialize as d, serialize as s };
|
|
2022
|
+
//# sourceMappingURL=index-DfqABzjr.mjs.map
|