proto.io 0.0.139 → 0.0.141

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.
@@ -1,4 +1,4 @@
1
- import { c as TFileStorage, T as TSchema, P as ProtoService, C as TFileInfo } from './index-rcLPSrw6.js';
1
+ import { c as TFileStorage, T as TSchema, P as ProtoService, C as TFileInfo } from './index-BabXTvEZ.js';
2
2
 
3
3
  type FileStorageOptions = {
4
4
  chunkSize?: number;
@@ -22,4 +22,4 @@ declare abstract class FileStorageBase implements TFileStorage {
22
22
  }
23
23
 
24
24
  export { FileStorageBase as F, type FileStorageOptions as a };
25
- //# sourceMappingURL=index-D1h-5NmA.d.ts.map
25
+ //# sourceMappingURL=index-DCjn9EDu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DCjn9EDu.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1136,6 +1136,17 @@ class ProtoClientInternal {
1136
1136
  setSessionToken(proto, token) {
1137
1137
  this.service.setSessionToken(token);
1138
1138
  }
1139
+ async sessionInfo(proto, options) {
1140
+ const { serializeOpts, context, ...opts } = options ?? {};
1141
+ const res = await this.service.request({
1142
+ method: 'get',
1143
+ baseURL: this.options.endpoint,
1144
+ url: 'sessionInfo',
1145
+ responseType: 'text',
1146
+ ...opts,
1147
+ });
1148
+ return proto.rebind(deserialize(res.data));
1149
+ }
1139
1150
  async currentUser(proto, options) {
1140
1151
  const { serializeOpts, context, ...opts } = options ?? {};
1141
1152
  const res = await this.service.request({
@@ -1422,6 +1433,9 @@ class ProtoClient extends ProtoType {
1422
1433
  setSessionToken(token) {
1423
1434
  this[PVK].setSessionToken(this, token);
1424
1435
  }
1436
+ sessionInfo(options) {
1437
+ return this[PVK].sessionInfo(this, options);
1438
+ }
1425
1439
  currentUser(options) {
1426
1440
  return this[PVK].currentUser(this, options);
1427
1441
  }
@@ -1449,4 +1463,4 @@ class ProtoClient extends ProtoType {
1449
1463
  }
1450
1464
 
1451
1465
  export { AUTH_COOKIE_KEY as A, MASTER_USER_HEADER_NAME as M, ProtoType as P, TQuery as T, UPLOAD_TOKEN_HEADER_NAME as U, MASTER_PASS_HEADER_NAME as a, TUser as b, ProtoClient as c, deserialize as d, classExtends as e, isObject as f, isUser as g, isRole as h, isQuery as i, isFile as j, serialize as s };
1452
- //# sourceMappingURL=index-C8hhBfuh.mjs.map
1466
+ //# sourceMappingURL=index-ZIegYNKT.mjs.map