proto.io 0.0.218 → 0.0.220
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/filesystem.d.ts +3 -3
- package/dist/adapters/file/google-cloud-storage.d.ts +3 -3
- package/dist/adapters/storage/progres.d.ts +1 -1
- package/dist/adapters/storage/progres.js +4 -1
- package/dist/adapters/storage/progres.js.map +1 -1
- package/dist/adapters/storage/progres.mjs +4 -1
- package/dist/adapters/storage/progres.mjs.map +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internals/{base-CqeIQTE9.d.ts → base-C1uAg1dD.d.ts} +2 -2
- package/dist/internals/base-C1uAg1dD.d.ts.map +1 -0
- package/dist/internals/{chunk-CLKTwfRe.d.ts → chunk-CpgqvFNO.d.ts} +3 -3
- package/dist/internals/chunk-CpgqvFNO.d.ts.map +1 -0
- package/dist/internals/{index-DQHWdslW.d.ts → index-82GLvDiN.d.ts} +14 -14
- package/dist/internals/index-82GLvDiN.d.ts.map +1 -0
- package/dist/internals/{index-Ci8d33k-.d.ts → index-CWhqANZM.d.ts} +3 -3
- package/dist/internals/index-CWhqANZM.d.ts.map +1 -0
- package/dist/internals/index-CZ5fKgiJ.mjs.map +1 -1
- package/dist/internals/index-xHeu-AjT.js.map +1 -1
- package/package.json +1 -1
- package/dist/internals/base-CqeIQTE9.d.ts.map +0 -1
- package/dist/internals/chunk-CLKTwfRe.d.ts.map +0 -1
- package/dist/internals/index-Ci8d33k-.d.ts.map +0 -1
- package/dist/internals/index-DQHWdslW.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as TFileStorage, T as TSchema, P as ProtoService, G as TFileInfo } from './index-
|
|
1
|
+
import { d as TFileStorage, T as TSchema, P as ProtoService, G as TFileInfo } from './index-82GLvDiN.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-C1uAg1dD.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-C1uAg1dD.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-C1uAg1dD.js';
|
|
2
|
+
import { P as ProtoService } from './index-82GLvDiN.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-CpgqvFNO.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-CpgqvFNO.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -771,9 +771,9 @@ type Callback<T, R, E> = (request: ProtoService<E> & T) => Awaitable<R>;
|
|
|
771
771
|
* @param request - The request object.
|
|
772
772
|
* @returns An awaitable response.
|
|
773
773
|
*/
|
|
774
|
-
type ProtoFunction<E> = Callback<{
|
|
775
|
-
params:
|
|
776
|
-
},
|
|
774
|
+
type ProtoFunction<E, P extends TSerializable, R extends TSerializable | void> = Callback<{
|
|
775
|
+
params: P;
|
|
776
|
+
}, R, E>;
|
|
777
777
|
/**
|
|
778
778
|
* A trigger callback function type.
|
|
779
779
|
* @param request - The request object.
|
|
@@ -787,8 +787,8 @@ type ProtoTriggerFunction<T, E> = Callback<{
|
|
|
787
787
|
* @param request - The request object.
|
|
788
788
|
* @returns An awaitable response.
|
|
789
789
|
*/
|
|
790
|
-
type ProtoJobFunction<E> = Callback<{
|
|
791
|
-
params:
|
|
790
|
+
type ProtoJobFunction<E, P extends TValueWithoutObject> = Callback<{
|
|
791
|
+
params: P;
|
|
792
792
|
user?: TUser;
|
|
793
793
|
job: TObjectType<'_Job', E>;
|
|
794
794
|
}, void, E>;
|
|
@@ -820,7 +820,7 @@ type ProtoFunctionOptions<E> = {
|
|
|
820
820
|
/**
|
|
821
821
|
* The callback function for the proto function.
|
|
822
822
|
*/
|
|
823
|
-
callback: ProtoFunction<E>;
|
|
823
|
+
callback: ProtoFunction<E, any, any>;
|
|
824
824
|
/**
|
|
825
825
|
* Optional validator for the proto function.
|
|
826
826
|
*/
|
|
@@ -833,7 +833,7 @@ type ProtoJobFunctionOptions<E> = {
|
|
|
833
833
|
/**
|
|
834
834
|
* The callback function for the proto job function.
|
|
835
835
|
*/
|
|
836
|
-
callback: ProtoJobFunction<E>;
|
|
836
|
+
callback: ProtoJobFunction<E, any>;
|
|
837
837
|
/**
|
|
838
838
|
* Optional scopes for the proto job function.
|
|
839
839
|
*/
|
|
@@ -936,7 +936,7 @@ declare abstract class ProtoType<Ext> {
|
|
|
936
936
|
* @param options - Additional options for running the function.
|
|
937
937
|
* @returns A promise that resolves to the result of the function.
|
|
938
938
|
*/
|
|
939
|
-
abstract run(name: string, data?: TSerializable, options?: ExtraOptions<boolean>): Promise<
|
|
939
|
+
abstract run<R extends TSerializable | void = any>(name: string, data?: TSerializable, options?: ExtraOptions<boolean>): Promise<R>;
|
|
940
940
|
/**
|
|
941
941
|
* Schedules a job.
|
|
942
942
|
* @param name - The name of the job to schedule.
|
|
@@ -1094,7 +1094,7 @@ interface ProtoType<Ext> {
|
|
|
1094
1094
|
* @param callback - The function callback.
|
|
1095
1095
|
* @param options - Optional function options excluding the callback.
|
|
1096
1096
|
*/
|
|
1097
|
-
define(name: string, callback: ProtoFunction<Ext>, options?: Omit<ProtoFunctionOptions<Ext>, 'callback'>): void;
|
|
1097
|
+
define<P extends TSerializable = any, R extends TSerializable | void = any>(name: string, callback: ProtoFunction<Ext, P, R>, options?: Omit<ProtoFunctionOptions<Ext>, 'callback'>): void;
|
|
1098
1098
|
/**
|
|
1099
1099
|
* Registers a callback to be executed after an object is created.
|
|
1100
1100
|
* @param className - The name of the class.
|
|
@@ -1119,7 +1119,7 @@ interface ProtoType<Ext> {
|
|
|
1119
1119
|
* @param callback - The job function callback.
|
|
1120
1120
|
* @param options - Optional job function options excluding the callback.
|
|
1121
1121
|
*/
|
|
1122
|
-
defineJob(name: string, callback: ProtoJobFunction<Ext>, options?: Omit<ProtoJobFunctionOptions<Ext>, 'callback'>): void;
|
|
1122
|
+
defineJob<P extends TValueWithoutObject = any>(name: string, callback: ProtoJobFunction<Ext, P>, options?: Omit<ProtoJobFunctionOptions<Ext>, 'callback'>): void;
|
|
1123
1123
|
/**
|
|
1124
1124
|
* Locks a table for updates.
|
|
1125
1125
|
* @param className - The name of the class or an array of class names.
|
|
@@ -1974,13 +1974,13 @@ declare class ProtoService<Ext = any> extends ProtoType<Ext> {
|
|
|
1974
1974
|
master: true;
|
|
1975
1975
|
acl?: string[];
|
|
1976
1976
|
}): Promise<void>;
|
|
1977
|
-
run(name: string, params?: TSerializable, options?: ExtraOptions<boolean>): Promise<
|
|
1978
|
-
define(name: string, callback: ProtoFunction<Ext>, options?: Omit<ProtoFunctionOptions<Ext>, 'callback'>): void;
|
|
1977
|
+
run<R extends TSerializable | void = any>(name: string, params?: TSerializable, options?: ExtraOptions<boolean>): Promise<R>;
|
|
1978
|
+
define<P extends TSerializable = any, R extends TSerializable | void = any>(name: string, callback: ProtoFunction<Ext, P, R>, options?: Omit<ProtoFunctionOptions<Ext>, 'callback'>): void;
|
|
1979
1979
|
afterCreate<T extends string>(className: string, callback: ProtoTriggerFunction<T, Ext>): void;
|
|
1980
1980
|
afterUpdate<T extends string>(className: string, callback: ProtoTriggerFunction<T, Ext>): void;
|
|
1981
1981
|
afterDelete<T extends string>(className: string, callback: ProtoTriggerFunction<T, Ext>): void;
|
|
1982
1982
|
scheduleJob(name: string, params?: TValueWithoutObject, options?: ExtraOptions<boolean>): Promise<TObjectType<"_Job", Ext>>;
|
|
1983
|
-
defineJob(name: string, callback: ProtoJobFunction<Ext>, options?: Omit<ProtoJobFunctionOptions<Ext>, 'callback'>): void;
|
|
1983
|
+
defineJob<P extends TValueWithoutObject = any>(name: string, callback: ProtoJobFunction<Ext, P>, options?: Omit<ProtoJobFunctionOptions<Ext>, 'callback'>): void;
|
|
1984
1984
|
lockTable(className: string | string[], update: boolean): Promise<void>;
|
|
1985
1985
|
withTransaction<T>(callback: (connection: ProtoService<Ext>) => PromiseLike<T>, options?: TransactionOptions): PromiseLike<T>;
|
|
1986
1986
|
generateUploadToken(options?: {
|
|
@@ -2001,4 +2001,4 @@ declare class ProtoService<Ext = any> extends ProtoType<Ext> {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
|
|
2003
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-
|
|
2004
|
+
//# sourceMappingURL=index-82GLvDiN.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-82GLvDiN.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-82GLvDiN.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';
|
|
@@ -64,7 +64,7 @@ declare class ProtoClient<Ext = any> extends ProtoType<Ext> {
|
|
|
64
64
|
setConfig(values: Record<string, TValueWithoutObject>, options: RequestOptions<true> & {
|
|
65
65
|
acl?: string[];
|
|
66
66
|
}): Promise<void>;
|
|
67
|
-
run(name: string, data?: TSerializable, options?: RequestOptions<boolean>): Promise<
|
|
67
|
+
run<R extends TSerializable | void = any>(name: string, data?: TSerializable, options?: RequestOptions<boolean>): Promise<R>;
|
|
68
68
|
scheduleJob(name: string, data?: TValueWithoutObject, options?: RequestOptions<boolean>): any;
|
|
69
69
|
setSessionToken(token?: string): void;
|
|
70
70
|
sessionInfo(options?: RequestOptions<boolean>): Promise<TSerializable>;
|
|
@@ -84,4 +84,4 @@ declare class ProtoClient<Ext = any> extends ProtoType<Ext> {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export { ProtoClient as P, classExtends as c };
|
|
87
|
-
//# sourceMappingURL=index-
|
|
87
|
+
//# sourceMappingURL=index-CWhqANZM.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CWhqANZM.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|