@singularlogic/coreplatts 0.0.16 → 0.0.17

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/index.d.ts CHANGED
@@ -152,6 +152,13 @@ interface Bucket {
152
152
  creation_date?: Date;
153
153
  }
154
154
 
155
+ interface TotalInfo {
156
+ number_organizations: number;
157
+ number_datasets: number;
158
+ number_resources: number;
159
+ total_size: number;
160
+ }
161
+
155
162
  type TokenProvider = () => string | Promise<string>;
156
163
  interface IClient$1 {
157
164
  login(email: string, password: string): Promise<OidcToken>;
@@ -166,6 +173,7 @@ interface IClient$1 {
166
173
  removeOrganizationByID(organization: string, token?: string): Promise<Bucket>;
167
174
  getFolderByName(name: string, token?: string): Promise<Folder>;
168
175
  getFolderByID(id: string, token?: string): Promise<Folder>;
176
+ totalInfo(token?: string): Promise<TotalInfo>;
169
177
  }
170
178
  /**
171
179
  * Client supports:
@@ -182,6 +190,7 @@ declare class Client implements IClient$1 {
182
190
  private _axiosAccount;
183
191
  private _axiosManagement;
184
192
  private _tokenProvider?;
193
+ private _publicConsumer;
185
194
  constructor(managementURL: string, accountURL: string);
186
195
  /**
187
196
  * Set a token provider (Keycloak-friendly).
@@ -206,6 +215,7 @@ declare class Client implements IClient$1 {
206
215
  *
207
216
  * But the best pattern is: do not pass token in SPA and let interceptor handle it.
208
217
  */
218
+ totalInfo(token?: string): Promise<TotalInfo>;
209
219
  myUser(token?: string): Promise<User>;
210
220
  allOrganizations(token?: string): Promise<Group[]>;
211
221
  myOrganizations(token?: string): Promise<Group[]>;
@@ -227,4 +237,4 @@ declare class Client implements IClient$1 {
227
237
 
228
238
  type IClient = IClient$1;
229
239
 
230
- export { type Bucket, Client, type ErrorReport, type FileModel, type FolderList, type FolderModel, type Group, type IClient, type Meta, type MultipartWrapper, type OidcToken, type PartInfo, Role, type Updated, type User, type UserRoles };
240
+ export { type Bucket, Client, type ErrorReport, type FileModel, type FolderList, type FolderModel, type Group, type IClient, type Meta, type MultipartWrapper, type OidcToken, type PartInfo, Role, type TotalInfo, type Updated, type User, type UserRoles };
package/dist/index.js CHANGED
@@ -873,6 +873,12 @@ var Client = class {
873
873
  * But the best pattern is: do not pass token in SPA and let interceptor handle it.
874
874
  */
875
875
  // -----------------------------
876
+ // Public APIs
877
+ // -----------------------------
878
+ totalInfo(token) {
879
+ return this._publicConsumer.totalInfo();
880
+ }
881
+ // -----------------------------
876
882
  // Account APIs
877
883
  // -----------------------------
878
884
  myUser(token) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singularlogic/coreplatts",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [