@m1cro/server-sdk 1.0.0-beta.2 → 1.0.0-beta.3
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/globals.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EntitySchema, G as GeneratedFields, C as CompiledSchema, F as Filter, a as FindQuery, H as HydratedDocument, b as FindOneQuery, I as InsertDocument, c as InsertQuery, d as InsertOneQuery, U as UpdateQuery, e as InferInterface, f as UpdateOneQuery, R as RemoveQuery, g as RemoveOneQuery, h as Router, i as HookEventMap, A as AppRole, j as EventHandler } from './log-
|
|
2
|
-
export { k as AppId, l as Artifacts, m as Auth, B as Bridge, n as Entity, o as InferSchema, L as LogLevel, M as Method, p as Middleware, N as Namespace, P as Provider, q as Providers, r as Request, s as RequestBuilder, t as RequestHandler, u as Response, v as ResponseBuilder, w as RouteOptions, S as Sorting, x as StatusCode, y as Subject, T as Tenant, V as Visibility, z as entitySchema } from './log-
|
|
1
|
+
import { E as EntitySchema, G as GeneratedFields, C as CompiledSchema, F as Filter, a as FindQuery, H as HydratedDocument, b as FindOneQuery, I as InsertDocument, c as InsertQuery, d as InsertOneQuery, U as UpdateQuery, e as InferInterface, f as UpdateOneQuery, R as RemoveQuery, g as RemoveOneQuery, h as Router, i as HookEventMap, A as AppRole, j as EventHandler } from './log-B9tjIUd0.js';
|
|
2
|
+
export { k as AppId, l as Artifacts, m as Auth, B as Bridge, n as Entity, o as InferSchema, L as LogLevel, M as Method, p as Middleware, N as Namespace, P as Provider, q as Providers, r as Request, s as RequestBuilder, t as RequestHandler, u as Response, v as ResponseBuilder, w as RouteOptions, S as Sorting, x as StatusCode, y as Subject, T as Tenant, V as Visibility, z as entitySchema } from './log-B9tjIUd0.js';
|
|
3
3
|
import 'cookie';
|
|
4
4
|
|
|
5
5
|
declare function entityModel<S extends EntitySchema<any>>(name: string, schemaDef: S, options?: EntityModelOptions<S>): EntityModel<S>;
|
|
@@ -343,6 +343,10 @@ interface Argon2Options {
|
|
|
343
343
|
outputLen?: number;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
interface EventEmitter {
|
|
347
|
+
publish<T extends object>(event: string, payload: T, visibility?: Visibility[]): Promise<void>;
|
|
348
|
+
}
|
|
349
|
+
|
|
346
350
|
interface SetOptions {
|
|
347
351
|
ttl?: number;
|
|
348
352
|
existenceCheck?: 'nx' | 'xx';
|
|
@@ -366,7 +370,7 @@ interface Call extends RequestBuilder, PromiseLike<Response> {
|
|
|
366
370
|
}
|
|
367
371
|
|
|
368
372
|
interface Providers {
|
|
369
|
-
list(group: string): Provider[]
|
|
373
|
+
list(group: string): Promise<Provider[]>;
|
|
370
374
|
createFromId(id: string): Provider;
|
|
371
375
|
}
|
|
372
376
|
interface Provider {
|
|
@@ -394,8 +398,8 @@ interface Bridge {
|
|
|
394
398
|
get kv(): KeyValueStore;
|
|
395
399
|
get sse(): SSE;
|
|
396
400
|
get crypto(): Crypto;
|
|
401
|
+
get event(): EventEmitter;
|
|
397
402
|
entity<T extends object>(name: string): Entity<T>;
|
|
398
|
-
publish<T extends object>(event: string, payload: T, visibility?: Visibility[]): void;
|
|
399
403
|
}
|
|
400
404
|
|
|
401
405
|
declare const logLevels: readonly ["trace", "debug", "info", "warn", "error", "none"];
|