@singularlogic/coreplatts 0.0.10 → 0.0.11
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 +30 -15
- package/dist/index.js +11 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,23 @@ interface FolderList {
|
|
|
38
38
|
files: FileModel[];
|
|
39
39
|
folder: FolderModel[];
|
|
40
40
|
}
|
|
41
|
+
interface MultipartWrapper {
|
|
42
|
+
file: string;
|
|
43
|
+
folder: string;
|
|
44
|
+
parts: PartInfo[];
|
|
45
|
+
}
|
|
46
|
+
interface PartInfo {
|
|
47
|
+
number: number;
|
|
48
|
+
presigned_url: string;
|
|
49
|
+
etag: string;
|
|
50
|
+
uploaded: boolean;
|
|
51
|
+
}
|
|
52
|
+
interface ErrorReport {
|
|
53
|
+
internal_status?: string;
|
|
54
|
+
status: number;
|
|
55
|
+
message?: string;
|
|
56
|
+
reason: string;
|
|
57
|
+
}
|
|
41
58
|
|
|
42
59
|
declare class File$1 implements FileModel {
|
|
43
60
|
protected _httpClient: AxiosInstance;
|
|
@@ -95,7 +112,7 @@ interface UserAccess {
|
|
|
95
112
|
impersonate: boolean;
|
|
96
113
|
manage: boolean;
|
|
97
114
|
}
|
|
98
|
-
interface User
|
|
115
|
+
interface User {
|
|
99
116
|
id: string;
|
|
100
117
|
username: string;
|
|
101
118
|
firstName: string;
|
|
@@ -112,7 +129,7 @@ interface User$1 {
|
|
|
112
129
|
access: UserAccess;
|
|
113
130
|
}
|
|
114
131
|
|
|
115
|
-
interface Group
|
|
132
|
+
interface Group {
|
|
116
133
|
id?: string;
|
|
117
134
|
name: string;
|
|
118
135
|
path: string;
|
|
@@ -138,11 +155,11 @@ interface Bucket {
|
|
|
138
155
|
type TokenProvider = () => string | Promise<string>;
|
|
139
156
|
interface IClient$1 {
|
|
140
157
|
login(email: string, password: string): Promise<OidcToken>;
|
|
141
|
-
myUser(token?: string): Promise<User
|
|
142
|
-
allOrganizations(token?: string): Promise<Group
|
|
143
|
-
myOrganizations(token?: string): Promise<Group
|
|
144
|
-
organizationByID(id: string, token?: string): Promise<Group
|
|
145
|
-
organizationByName(name: string, token?: string): Promise<Group
|
|
158
|
+
myUser(token?: string): Promise<User>;
|
|
159
|
+
allOrganizations(token?: string): Promise<Group[]>;
|
|
160
|
+
myOrganizations(token?: string): Promise<Group[]>;
|
|
161
|
+
organizationByID(id: string, token?: string): Promise<Group>;
|
|
162
|
+
organizationByName(name: string, token?: string): Promise<Group>;
|
|
146
163
|
addToOrganization(organization: string, users: UserRoles, token?: string): Promise<void>;
|
|
147
164
|
register(email: string, password: string, password_confirm: string, firstName: string, lastName: string): Promise<void>;
|
|
148
165
|
createOrganization(name: string, token?: string): Promise<Bucket>;
|
|
@@ -189,11 +206,11 @@ declare class Client implements IClient$1 {
|
|
|
189
206
|
*
|
|
190
207
|
* But the best pattern is: do not pass token in SPA and let interceptor handle it.
|
|
191
208
|
*/
|
|
192
|
-
myUser(token?: string): Promise<User
|
|
193
|
-
allOrganizations(token?: string): Promise<Group
|
|
194
|
-
myOrganizations(token?: string): Promise<Group
|
|
195
|
-
organizationByID(id: string, token?: string): Promise<Group
|
|
196
|
-
organizationByName(name: string, token?: string): Promise<Group
|
|
209
|
+
myUser(token?: string): Promise<User>;
|
|
210
|
+
allOrganizations(token?: string): Promise<Group[]>;
|
|
211
|
+
myOrganizations(token?: string): Promise<Group[]>;
|
|
212
|
+
organizationByID(id: string, token?: string): Promise<Group>;
|
|
213
|
+
organizationByName(name: string, token?: string): Promise<Group>;
|
|
197
214
|
addToOrganization(organization: string, users: UserRoles, token?: string): Promise<void>;
|
|
198
215
|
register(email: string, password: string, password_confirm: string, firstName: string, lastName: string): Promise<void>;
|
|
199
216
|
createOrganization(name: string, token?: string): Promise<Bucket>;
|
|
@@ -208,8 +225,6 @@ declare class Client implements IClient$1 {
|
|
|
208
225
|
requestWithToken<T>(instance: AxiosInstance, token: string, config: AxiosRequestConfig): Promise<T>;
|
|
209
226
|
}
|
|
210
227
|
|
|
211
|
-
type User = User$1;
|
|
212
|
-
type Group = Group$1;
|
|
213
228
|
type IClient = IClient$1;
|
|
214
229
|
|
|
215
|
-
export { Client, type Group, type IClient, type User };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -67,10 +67,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
67
67
|
// src/index.ts
|
|
68
68
|
var index_exports = {};
|
|
69
69
|
__export(index_exports, {
|
|
70
|
-
Client: () => Client
|
|
70
|
+
Client: () => Client,
|
|
71
|
+
Role: () => Role
|
|
71
72
|
});
|
|
72
73
|
module.exports = __toCommonJS(index_exports);
|
|
73
74
|
|
|
75
|
+
// src/models/group.account.models.ts
|
|
76
|
+
var Role = /* @__PURE__ */ ((Role2) => {
|
|
77
|
+
Role2["ADMIN"] = "admin";
|
|
78
|
+
Role2["MEMBER"] = "member";
|
|
79
|
+
return Role2;
|
|
80
|
+
})(Role || {});
|
|
81
|
+
|
|
74
82
|
// src/client.ts
|
|
75
83
|
var import_axios = __toESM(require("axios"));
|
|
76
84
|
|
|
@@ -939,5 +947,6 @@ var Client = class {
|
|
|
939
947
|
};
|
|
940
948
|
// Annotate the CommonJS export names for ESM import in node:
|
|
941
949
|
0 && (module.exports = {
|
|
942
|
-
Client
|
|
950
|
+
Client,
|
|
951
|
+
Role
|
|
943
952
|
});
|