proto.io 0.0.170 → 0.0.172

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.
@@ -606,7 +606,10 @@ interface TPubSub {
606
606
  type ProtoServiceOptions<Ext> = {
607
607
  endpoint: string;
608
608
  schema: Record<string, TSchema>;
609
- roleInheritKeys?: string[];
609
+ roleResolver?: {
610
+ inheritKeys?: string[];
611
+ resolver?: (user: TUser, defaultResolver: () => PromiseLike<TRole[]>) => PromiseLike<TRole[]>;
612
+ };
610
613
  storage: TStorage;
611
614
  fileStorage: TFileStorage;
612
615
  pubsub?: TPubSub;
@@ -670,7 +673,7 @@ declare class ProtoService<Ext = any> extends ProtoType<Ext> {
670
673
  }) => T)): Promise<this & {
671
674
  session?: Session;
672
675
  } & T>;
673
- userRoles(user: TUser): Promise<TObjectType<"Role", Ext>[]>;
676
+ userRoles(user: TUser): Promise<TRole[]>;
674
677
  becomeUser(req: Request, user: TUser, options?: {
675
678
  cookieOptions?: CookieOptions | undefined;
676
679
  jwtSignOptions?: jwt.SignOptions | undefined;
@@ -720,4 +723,4 @@ declare class ProtoService<Ext = any> extends ProtoType<Ext> {
720
723
  }
721
724
 
722
725
  export { type TPubSub as A, type TFileInfo as B, type DeserializeOptions as D, type ExtraOptions as E, type FindOptions as F, type InsertOptions as I, ProtoService as P, QuerySelector as Q, type RelationOptions as R, type SerializeOptions as S, TSchema as T, type _TValue as _, type ProtoServiceOptions as a, type ProtoServiceKeyOptions as b, type TFileStorage as c, type TSerializable as d, deserialize as e, type TExtensions as f, TQuery as g, TObject as h, TUser as i, TRole as j, TFile as k, ProtoType as l, type PathName as m, type TObjectType as n, type EventData as o, type DecodedQuery as p, type DecodedSortOption as q, type TValue as r, serialize as s, type FindOneOptions as t, type TUpdateOp as u, FieldSelectorExpression as v, QueryExpression as w, type TStorage as x, type TransactionOptions as y, type TQueryRandomOptions as z };
723
- //# sourceMappingURL=index-BB2vDnq0.d.ts.map
726
+ //# sourceMappingURL=index-BhWRmBiq.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BhWRmBiq.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { f as TExtensions, g as TQuery, h as TObject, i as TUser, j as TRole, k as TFile, E as ExtraOptions, S as SerializeOptions, l as ProtoType, m as PathName, _ as _TValue, d as TSerializable, n as TObjectType, T as TSchema, o as EventData } from './index-BB2vDnq0.js';
1
+ import { f as TExtensions, g as TQuery, h as TObject, i as TUser, j as TRole, k as TFile, E as ExtraOptions, S as SerializeOptions, l as ProtoType, m as PathName, _ as _TValue, d as TSerializable, n as TObjectType, T as TSchema, o as EventData } from './index-BhWRmBiq.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';
@@ -58,4 +58,4 @@ declare class ProtoClient<Ext = any> extends ProtoType<Ext> {
58
58
  }
59
59
 
60
60
  export { ProtoClient as P, isObject as a, isUser as b, classExtends as c, isRole as d, isFile as e, isQuery as i };
61
- //# sourceMappingURL=index-D_GYwO8X.d.ts.map
61
+ //# sourceMappingURL=index-DchUjNEf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DchUjNEf.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { c as TFileStorage, T as TSchema, P as ProtoService, B as TFileInfo } from './index-BB2vDnq0.js';
1
+ import { c as TFileStorage, T as TSchema, P as ProtoService, B as TFileInfo } from './index-BhWRmBiq.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=index-B5u7VXjz.d.ts.map
26
+ //# sourceMappingURL=index-K0jhERvZ.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-K0jhERvZ.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proto.io",
3
- "version": "0.0.170",
3
+ "version": "0.0.172",
4
4
  "main": "dist/index",
5
5
  "module": "dist/index",
6
6
  "types": "dist/index",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-B5u7VXjz.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-BB2vDnq0.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-D_GYwO8X.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}