@memori.ai/memori-api-client 6.5.5 → 6.5.7
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/CHANGELOG.md +19 -0
- package/dist/backend/userPwl.d.ts +36 -0
- package/dist/backend/userPwl.js +53 -0
- package/dist/backend/userPwl.js.map +1 -0
- package/dist/backend.d.ts +66 -0
- package/dist/backend.js +3 -0
- package/dist/backend.js.map +1 -1
- package/dist/index.d.ts +66 -0
- package/esm/backend/userPwl.d.ts +36 -0
- package/esm/backend/userPwl.js +51 -0
- package/esm/backend/userPwl.js.map +1 -0
- package/esm/backend.d.ts +66 -0
- package/esm/backend.js +3 -0
- package/esm/backend.js.map +1 -1
- package/esm/index.d.ts +66 -0
- package/package.json +1 -1
- package/src/backend/userPwl.ts +155 -0
- package/src/backend.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [6.5.7](https://github.com/memori-ai/memori-api-client/compare/v6.5.6...v6.5.7) (2025-06-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add userPwl API integration to backend for enhanced user management ([c55af83](https://github.com/memori-ai/memori-api-client/commit/c55af83f626ff4c6e41c2056333ce03b6a8b423b))
|
|
9
|
+
|
|
10
|
+
## [6.5.6](https://github.com/memori-ai/memori-api-client/compare/v6.5.5...v6.5.6) (2025-06-23)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* implement user management API functions including login, logout and user details retrieval ([58a6b44](https://github.com/memori-ai/memori-api-client/commit/58a6b44f039fac65e0a45d80399519bce3566ea6))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Changes
|
|
19
|
+
|
|
20
|
+
* rename user management API functions to include 'pwl' prefix for clarity ([1b49f3f](https://github.com/memori-ai/memori-api-client/commit/1b49f3f8e413731f362f7cac751dca270df5a7a5))
|
|
21
|
+
|
|
3
22
|
## [6.5.5](https://github.com/memori-ai/memori-api-client/compare/v6.5.4...v6.5.5) (2025-06-11)
|
|
4
23
|
|
|
5
24
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ResponseSpec, User, UserFilters } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
pwlUserLogin: (user: User) => Promise<ResponseSpec & {
|
|
4
|
+
user: User;
|
|
5
|
+
token?: string | undefined;
|
|
6
|
+
flowID?: string | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
pwlUserLogout: (authToken: string) => Promise<ResponseSpec>;
|
|
9
|
+
pwlGetCurrentUser: (authToken: string) => Promise<ResponseSpec & {
|
|
10
|
+
user: User;
|
|
11
|
+
}>;
|
|
12
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<ResponseSpec & {
|
|
13
|
+
user: User;
|
|
14
|
+
}>;
|
|
15
|
+
pwlGetUsersList: (authToken: string) => Promise<ResponseSpec & {
|
|
16
|
+
users: User[];
|
|
17
|
+
}>;
|
|
18
|
+
pwlGetUsersListPaginated: (authToken: string, filters: UserFilters) => Promise<ResponseSpec & {
|
|
19
|
+
users: User[];
|
|
20
|
+
count: number;
|
|
21
|
+
}>;
|
|
22
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<ResponseSpec>;
|
|
23
|
+
pwlUpdateUser: (authToken: string, userID: string, user: User) => Promise<ResponseSpec & {
|
|
24
|
+
user: User;
|
|
25
|
+
}>;
|
|
26
|
+
pwlRecoverUsername: (user: User) => Promise<ResponseSpec>;
|
|
27
|
+
pwlCreateUser: (authToken: string, user: Partial<User>) => Promise<ResponseSpec & {
|
|
28
|
+
user: User;
|
|
29
|
+
}>;
|
|
30
|
+
pwlLoginWithJWT: (jwt: string) => Promise<ResponseSpec & {
|
|
31
|
+
user: User;
|
|
32
|
+
token?: string | undefined;
|
|
33
|
+
flowID?: string | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const apiFetcher_1 = require("../apiFetcher");
|
|
4
|
+
exports.default = (apiUrl) => ({
|
|
5
|
+
pwlUserLogin: (user) => (0, apiFetcher_1.apiFetcher)('/PwlLogin', {
|
|
6
|
+
apiUrl,
|
|
7
|
+
body: user,
|
|
8
|
+
method: 'POST',
|
|
9
|
+
}),
|
|
10
|
+
pwlUserLogout: (authToken) => (0, apiFetcher_1.apiFetcher)(`/PwlLogout/${authToken}`, {
|
|
11
|
+
apiUrl,
|
|
12
|
+
method: 'POST',
|
|
13
|
+
}),
|
|
14
|
+
pwlGetCurrentUser: (authToken) => (0, apiFetcher_1.apiFetcher)(`/PwlUser/${authToken}`, {
|
|
15
|
+
apiUrl,
|
|
16
|
+
}),
|
|
17
|
+
pwlGetUser: (authToken, userID) => (0, apiFetcher_1.apiFetcher)(`/PwlUser/${authToken}/${userID}`, {
|
|
18
|
+
apiUrl,
|
|
19
|
+
}),
|
|
20
|
+
pwlGetUsersList: (authToken) => (0, apiFetcher_1.apiFetcher)(`/PwlUsers/${authToken}`, {
|
|
21
|
+
apiUrl,
|
|
22
|
+
}),
|
|
23
|
+
pwlGetUsersListPaginated: (authToken, filters) => (0, apiFetcher_1.apiFetcher)(`/FilterPwlUsers/${authToken}`, {
|
|
24
|
+
apiUrl,
|
|
25
|
+
body: filters,
|
|
26
|
+
method: 'POST',
|
|
27
|
+
}),
|
|
28
|
+
pwlDeleteUser: (authToken, userID) => (0, apiFetcher_1.apiFetcher)(`/PwlUser/${authToken}/${userID}`, {
|
|
29
|
+
apiUrl,
|
|
30
|
+
method: 'DELETE',
|
|
31
|
+
}),
|
|
32
|
+
pwlUpdateUser: (authToken, userID, user) => (0, apiFetcher_1.apiFetcher)(`/PwlUser/${authToken}/${userID}`, {
|
|
33
|
+
apiUrl,
|
|
34
|
+
method: 'PATCH',
|
|
35
|
+
body: user,
|
|
36
|
+
}),
|
|
37
|
+
pwlRecoverUsername: (user) => (0, apiFetcher_1.apiFetcher)(`/RecoverPwlUserName`, {
|
|
38
|
+
apiUrl,
|
|
39
|
+
body: user,
|
|
40
|
+
method: 'POST',
|
|
41
|
+
}),
|
|
42
|
+
pwlCreateUser: (authToken, user) => (0, apiFetcher_1.apiFetcher)(`/PwlUser/${authToken}`, {
|
|
43
|
+
apiUrl,
|
|
44
|
+
body: user,
|
|
45
|
+
method: 'POST',
|
|
46
|
+
}),
|
|
47
|
+
pwlLoginWithJWT: (jwt) => (0, apiFetcher_1.apiFetcher)('/LoginWithJWT', {
|
|
48
|
+
apiUrl,
|
|
49
|
+
body: { jwt },
|
|
50
|
+
method: 'POST',
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=userPwl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userPwl.js","sourceRoot":"","sources":["../../src/backend/userPwl.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAE3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,YAAY,EAAE,CAAC,IAAU,EAAE,EAAE,CAC3B,IAAA,uBAAU,EAAC,WAAW,EAAE;QACtB,MAAM;QACN,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,MAAM;KACf,CAEA;IAMH,aAAa,EAAE,CAAC,SAAiB,EAAE,EAAE,CACnC,IAAA,uBAAU,EAAC,cAAc,SAAS,EAAE,EAAE;QACpC,MAAM;QACN,MAAM,EAAE,MAAM;KACf,CAA0B;IAO7B,iBAAiB,EAAE,CAAC,SAAiB,EAAE,EAAE,CACvC,IAAA,uBAAU,EAAC,YAAY,SAAS,EAAE,EAAE;QAClC,MAAM;KACP,CAIA;IAQH,UAAU,EAAE,CAAC,SAAiB,EAAE,MAAc,EAAE,EAAE,CAChD,IAAA,uBAAU,EAAC,YAAY,SAAS,IAAI,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.d.ts
CHANGED
|
@@ -146,6 +146,38 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
146
146
|
updateIntegration: (authToken: string, integrationID: string, integration: import("./types").Integration) => Promise<import("./types").ResponseSpec & {
|
|
147
147
|
integration: import("./types").Integration;
|
|
148
148
|
}>;
|
|
149
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
150
|
+
user: import("./types").User;
|
|
151
|
+
token?: string | undefined;
|
|
152
|
+
flowID?: string | undefined;
|
|
153
|
+
}>;
|
|
154
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
155
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
156
|
+
user: import("./types").User;
|
|
157
|
+
}>;
|
|
158
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
159
|
+
user: import("./types").User;
|
|
160
|
+
}>;
|
|
161
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
162
|
+
users: import("./types").User[];
|
|
163
|
+
}>;
|
|
164
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
165
|
+
users: import("./types").User[];
|
|
166
|
+
count: number;
|
|
167
|
+
}>;
|
|
168
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
169
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
170
|
+
user: import("./types").User;
|
|
171
|
+
}>;
|
|
172
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
173
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
174
|
+
user: import("./types").User;
|
|
175
|
+
}>;
|
|
176
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
177
|
+
user: import("./types").User;
|
|
178
|
+
token?: string | undefined;
|
|
179
|
+
flowID?: string | undefined;
|
|
180
|
+
}>;
|
|
149
181
|
userSignUp: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
150
182
|
user: import("./types").User;
|
|
151
183
|
}>;
|
|
@@ -380,6 +412,40 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
380
412
|
user: import("./types").User;
|
|
381
413
|
}>;
|
|
382
414
|
};
|
|
415
|
+
userPwl: {
|
|
416
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
417
|
+
user: import("./types").User;
|
|
418
|
+
token?: string | undefined;
|
|
419
|
+
flowID?: string | undefined;
|
|
420
|
+
}>;
|
|
421
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
422
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
423
|
+
user: import("./types").User;
|
|
424
|
+
}>;
|
|
425
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
426
|
+
user: import("./types").User;
|
|
427
|
+
}>;
|
|
428
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
429
|
+
users: import("./types").User[];
|
|
430
|
+
}>;
|
|
431
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
432
|
+
users: import("./types").User[];
|
|
433
|
+
count: number;
|
|
434
|
+
}>;
|
|
435
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
436
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
437
|
+
user: import("./types").User;
|
|
438
|
+
}>;
|
|
439
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
440
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
441
|
+
user: import("./types").User;
|
|
442
|
+
}>;
|
|
443
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
444
|
+
user: import("./types").User;
|
|
445
|
+
token?: string | undefined;
|
|
446
|
+
flowID?: string | undefined;
|
|
447
|
+
}>;
|
|
448
|
+
};
|
|
383
449
|
integration: {
|
|
384
450
|
getMemoriIntegrationsList: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec & {
|
|
385
451
|
integrations: import("./types").Integration[];
|
package/dist/backend.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const memori_1 = tslib_1.__importDefault(require("./backend/memori"));
|
|
5
5
|
const user_1 = tslib_1.__importDefault(require("./backend/user"));
|
|
6
|
+
const userPwl_1 = tslib_1.__importDefault(require("./backend/userPwl"));
|
|
6
7
|
const integration_1 = tslib_1.__importDefault(require("./backend/integration"));
|
|
7
8
|
const asset_1 = tslib_1.__importDefault(require("./backend/asset"));
|
|
8
9
|
const invitation_1 = tslib_1.__importDefault(require("./backend/invitation"));
|
|
@@ -18,6 +19,7 @@ const backendAPI = (apiUrl) => ({
|
|
|
18
19
|
asset: (0, asset_1.default)(apiUrl),
|
|
19
20
|
memori: (0, memori_1.default)(apiUrl),
|
|
20
21
|
user: (0, user_1.default)(apiUrl),
|
|
22
|
+
userPwl: (0, userPwl_1.default)(apiUrl),
|
|
21
23
|
integration: (0, integration_1.default)(apiUrl),
|
|
22
24
|
invitation: (0, invitation_1.default)(apiUrl),
|
|
23
25
|
consumptionLogs: (0, consumptionLogs_1.default)(apiUrl),
|
|
@@ -31,6 +33,7 @@ const backendAPI = (apiUrl) => ({
|
|
|
31
33
|
...(0, asset_1.default)(apiUrl),
|
|
32
34
|
...(0, memori_1.default)(apiUrl),
|
|
33
35
|
...(0, user_1.default)(apiUrl),
|
|
36
|
+
...(0, userPwl_1.default)(apiUrl),
|
|
34
37
|
...(0, integration_1.default)(apiUrl),
|
|
35
38
|
...(0, invitation_1.default)(apiUrl),
|
|
36
39
|
...(0, consumptionLogs_1.default)(apiUrl),
|
package/dist/backend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":";;;AAAA,sEAAsC;AACtC,kEAAkC;AAClC,gFAAgD;AAChD,oEAAoC;AACpC,8EAA8C;AAC9C,wFAAwD;AACxD,oFAAoD;AACpD,kFAAkD;AAClD,wEAAwC;AACxC,0EAA0C;AAC1C,0FAA0D;AAC1D,oEAAoC;AACpC,sEAAsC;AAEtC,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IACtC,KAAK,EAAE,IAAA,eAAK,EAAC,MAAM,CAAC;IACpB,MAAM,EAAE,IAAA,gBAAM,EAAC,MAAM,CAAC;IACtB,IAAI,EAAE,IAAA,cAAI,EAAC,MAAM,CAAC;IAClB,WAAW,EAAE,IAAA,qBAAW,EAAC,MAAM,CAAC;IAChC,UAAU,EAAE,IAAA,oBAAU,EAAC,MAAM,CAAC;IAC9B,eAAe,EAAE,IAAA,yBAAe,EAAC,MAAM,CAAC;IACxC,aAAa,EAAE,IAAA,uBAAa,EAAC,MAAM,CAAC;IACpC,YAAY,EAAE,IAAA,sBAAY,EAAC,MAAM,CAAC;IAClC,OAAO,EAAE,IAAA,iBAAO,EAAC,MAAM,CAAC;IACxB,QAAQ,EAAE,IAAA,kBAAQ,EAAC,MAAM,CAAC;IAC1B,gBAAgB,EAAE,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,IAAA,eAAK,EAAC,MAAM,CAAC;IACpB,MAAM,EAAE,IAAA,gBAAM,EAAC,MAAM,CAAC;IACtB,GAAG,IAAA,eAAK,EAAC,MAAM,CAAC;IAChB,GAAG,IA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AAC;IACxC,aAAa,EAAE,IAAA,uBAAa,EAAC,MAAM,CAAC;IACpC,YAAY,EAAE,IAAA,sBAAY,EAAC,MAAM,CAAC;IAClC,OAAO,EAAE,IAAA,iBAAO,EAAC,MAAM,CAAC;IACxB,QAAQ,EAAE,IAAA,kBAAQ,EAAC,MAAM,CAAC;IAC1B,gBAAgB,EAAE,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,IAAA,eAAK,EAAC,MAAM,CAAC;IACpB,MAAM,EAAE,IAAA,gBAAM,EAAC,MAAM,CAAC;IACtB,GAAG,IAAA,eAAK,EAAC,MAAM,CAAC;IAChB,GAAG,IAAA,gBAAM,EAAC,MAAM,CAAC;IACjB,GAAG,IAAA,cAAI,EAAC,MAAM,CAAC;IACf,GAAG,IAAA,iBAAO,EAAC,MAAM,CAAC;IAClB,GAAG,IAAA,qBAAW,EAAC,MAAM,CAAC;IACtB,GAAG,IAAA,oBAAU,EAAC,MAAM,CAAC;IACrB,GAAG,IAAA,yBAAe,EAAC,MAAM,CAAC;IAC1B,GAAG,IAAA,uBAAa,EAAC,MAAM,CAAC;IACxB,GAAG,IAAA,sBAAY,EAAC,MAAM,CAAC;IACvB,GAAG,IAAA,iBAAO,EAAC,MAAM,CAAC;IAClB,GAAG,IAAA,kBAAQ,EAAC,MAAM,CAAC;IACnB,GAAG,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC3B,GAAG,IAAA,eAAK,EAAC,MAAM,CAAC;IAChB,GAAG,IAAA,gBAAM,EAAC,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,kBAAe,UAAU,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -892,6 +892,38 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
892
892
|
updateIntegration: (authToken: string, integrationID: string, integration: import("./types").Integration) => Promise<import("./types").ResponseSpec & {
|
|
893
893
|
integration: import("./types").Integration;
|
|
894
894
|
}>;
|
|
895
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
896
|
+
user: import("./types").User;
|
|
897
|
+
token?: string | undefined;
|
|
898
|
+
flowID?: string | undefined;
|
|
899
|
+
}>;
|
|
900
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
901
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
902
|
+
user: import("./types").User;
|
|
903
|
+
}>;
|
|
904
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
905
|
+
user: import("./types").User;
|
|
906
|
+
}>;
|
|
907
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
908
|
+
users: import("./types").User[];
|
|
909
|
+
}>;
|
|
910
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
911
|
+
users: import("./types").User[];
|
|
912
|
+
count: number;
|
|
913
|
+
}>;
|
|
914
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
915
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
916
|
+
user: import("./types").User;
|
|
917
|
+
}>;
|
|
918
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
919
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
920
|
+
user: import("./types").User;
|
|
921
|
+
}>;
|
|
922
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
923
|
+
user: import("./types").User;
|
|
924
|
+
token?: string | undefined;
|
|
925
|
+
flowID?: string | undefined;
|
|
926
|
+
}>;
|
|
895
927
|
userSignUp: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
896
928
|
user: import("./types").User;
|
|
897
929
|
}>;
|
|
@@ -1126,6 +1158,40 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
1126
1158
|
user: import("./types").User;
|
|
1127
1159
|
}>;
|
|
1128
1160
|
};
|
|
1161
|
+
userPwl: {
|
|
1162
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
1163
|
+
user: import("./types").User;
|
|
1164
|
+
token?: string | undefined;
|
|
1165
|
+
flowID?: string | undefined;
|
|
1166
|
+
}>;
|
|
1167
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
1168
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
1169
|
+
user: import("./types").User;
|
|
1170
|
+
}>;
|
|
1171
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
1172
|
+
user: import("./types").User;
|
|
1173
|
+
}>;
|
|
1174
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
1175
|
+
users: import("./types").User[];
|
|
1176
|
+
}>;
|
|
1177
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
1178
|
+
users: import("./types").User[];
|
|
1179
|
+
count: number;
|
|
1180
|
+
}>;
|
|
1181
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
1182
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
1183
|
+
user: import("./types").User;
|
|
1184
|
+
}>;
|
|
1185
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
1186
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
1187
|
+
user: import("./types").User;
|
|
1188
|
+
}>;
|
|
1189
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
1190
|
+
user: import("./types").User;
|
|
1191
|
+
token?: string | undefined;
|
|
1192
|
+
flowID?: string | undefined;
|
|
1193
|
+
}>;
|
|
1194
|
+
};
|
|
1129
1195
|
integration: {
|
|
1130
1196
|
getMemoriIntegrationsList: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec & {
|
|
1131
1197
|
integrations: import("./types").Integration[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ResponseSpec, User, UserFilters } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
pwlUserLogin: (user: User) => Promise<ResponseSpec & {
|
|
4
|
+
user: User;
|
|
5
|
+
token?: string | undefined;
|
|
6
|
+
flowID?: string | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
pwlUserLogout: (authToken: string) => Promise<ResponseSpec>;
|
|
9
|
+
pwlGetCurrentUser: (authToken: string) => Promise<ResponseSpec & {
|
|
10
|
+
user: User;
|
|
11
|
+
}>;
|
|
12
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<ResponseSpec & {
|
|
13
|
+
user: User;
|
|
14
|
+
}>;
|
|
15
|
+
pwlGetUsersList: (authToken: string) => Promise<ResponseSpec & {
|
|
16
|
+
users: User[];
|
|
17
|
+
}>;
|
|
18
|
+
pwlGetUsersListPaginated: (authToken: string, filters: UserFilters) => Promise<ResponseSpec & {
|
|
19
|
+
users: User[];
|
|
20
|
+
count: number;
|
|
21
|
+
}>;
|
|
22
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<ResponseSpec>;
|
|
23
|
+
pwlUpdateUser: (authToken: string, userID: string, user: User) => Promise<ResponseSpec & {
|
|
24
|
+
user: User;
|
|
25
|
+
}>;
|
|
26
|
+
pwlRecoverUsername: (user: User) => Promise<ResponseSpec>;
|
|
27
|
+
pwlCreateUser: (authToken: string, user: Partial<User>) => Promise<ResponseSpec & {
|
|
28
|
+
user: User;
|
|
29
|
+
}>;
|
|
30
|
+
pwlLoginWithJWT: (jwt: string) => Promise<ResponseSpec & {
|
|
31
|
+
user: User;
|
|
32
|
+
token?: string | undefined;
|
|
33
|
+
flowID?: string | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { apiFetcher } from '../apiFetcher';
|
|
2
|
+
export default (apiUrl) => ({
|
|
3
|
+
pwlUserLogin: (user) => apiFetcher('/PwlLogin', {
|
|
4
|
+
apiUrl,
|
|
5
|
+
body: user,
|
|
6
|
+
method: 'POST',
|
|
7
|
+
}),
|
|
8
|
+
pwlUserLogout: (authToken) => apiFetcher(`/PwlLogout/${authToken}`, {
|
|
9
|
+
apiUrl,
|
|
10
|
+
method: 'POST',
|
|
11
|
+
}),
|
|
12
|
+
pwlGetCurrentUser: (authToken) => apiFetcher(`/PwlUser/${authToken}`, {
|
|
13
|
+
apiUrl,
|
|
14
|
+
}),
|
|
15
|
+
pwlGetUser: (authToken, userID) => apiFetcher(`/PwlUser/${authToken}/${userID}`, {
|
|
16
|
+
apiUrl,
|
|
17
|
+
}),
|
|
18
|
+
pwlGetUsersList: (authToken) => apiFetcher(`/PwlUsers/${authToken}`, {
|
|
19
|
+
apiUrl,
|
|
20
|
+
}),
|
|
21
|
+
pwlGetUsersListPaginated: (authToken, filters) => apiFetcher(`/FilterPwlUsers/${authToken}`, {
|
|
22
|
+
apiUrl,
|
|
23
|
+
body: filters,
|
|
24
|
+
method: 'POST',
|
|
25
|
+
}),
|
|
26
|
+
pwlDeleteUser: (authToken, userID) => apiFetcher(`/PwlUser/${authToken}/${userID}`, {
|
|
27
|
+
apiUrl,
|
|
28
|
+
method: 'DELETE',
|
|
29
|
+
}),
|
|
30
|
+
pwlUpdateUser: (authToken, userID, user) => apiFetcher(`/PwlUser/${authToken}/${userID}`, {
|
|
31
|
+
apiUrl,
|
|
32
|
+
method: 'PATCH',
|
|
33
|
+
body: user,
|
|
34
|
+
}),
|
|
35
|
+
pwlRecoverUsername: (user) => apiFetcher(`/RecoverPwlUserName`, {
|
|
36
|
+
apiUrl,
|
|
37
|
+
body: user,
|
|
38
|
+
method: 'POST',
|
|
39
|
+
}),
|
|
40
|
+
pwlCreateUser: (authToken, user) => apiFetcher(`/PwlUser/${authToken}`, {
|
|
41
|
+
apiUrl,
|
|
42
|
+
body: user,
|
|
43
|
+
method: 'POST',
|
|
44
|
+
}),
|
|
45
|
+
pwlLoginWithJWT: (jwt) => apiFetcher('/LoginWithJWT', {
|
|
46
|
+
apiUrl,
|
|
47
|
+
body: { jwt },
|
|
48
|
+
method: 'POST',
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=userPwl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userPwl.js","sourceRoot":"","sources":["../../src/backend/userPwl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,YAAY,EAAE,CAAC,IAAU,EAAE,EAAE,CAC3B,UAAU,CAAC,WAAW,EAAE;QACtB,MAAM;QACN,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,MAAM;KACf,CAEA;IAMH,aAAa,EAAE,CAAC,SAAiB,EAAE,EAAE,CACnC,UAAU,CAAC,cAAc,SAAS,EAAE,EAAE;QACpC,MAAM;QACN,MAAM,EAAE,MAAM;KACf,CAA0B;IAO7B,iBAAiB,EAAE,CAAC,SAAiB,EAAE,EAAE,CACvC,UAAU,CAAC,YAAY,SAAS,EAAE,EAAE;QAClC,MAAM;KACP,CAIA;IAQH,UAAU,EAAE,CAAC,SAAiB,EAAE,MAAc,EAAE,EAAE,CAChD,UAAU,CAAC,YAAY,SAAS,IAAI,MAAM,EAAE,EAAE;QAC5C,MAAM;KACP,CAIA;IAOH,eAAe,EAAE,CAAC,SAAiB,EAAE,EAAE,CACrC,UAAU,CAAC,aAAa,SAAS,EAAE,EAAE;QACnC,MAAM;KACP,CAIA;IASH,wBAAwB,EAAE,CAAC,SAAiB,EAAE,OAAoB,EAAE,EAAE,CACpE,UAAU,CAAC,mBAAmB,SAAS,EAAE,EAAE;QACzC,MAAM;QACN,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,MAAM;KACf,CAKA;IAOH,aAAa,EAAE,CAAC,SAAiB,EAAE,MAAc,EAAE,EAAE,CACnD,UAAU,CAAC,YAAY,SAAS,IAAI,MAAM,EAAE,EAAE;QAC5C,MAAM;QACN,MAAM,EAAE,QAAQ;KACjB,CAA0B;IAQ7B,aAAa,EAAE,CAAC,SAAiB,EAAE,MAAc,EAAE,IAAU,EAAE,EAAE,CAC/D,UAAU,CAAC,YAAY,SAAS,IAAI,MAAM,EAAE,EAAE;QAC5C,MAAM;QACN,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,IAAI;KACX,CAIA;IAMH,kBAAkB,EAAE,CAAC,IAAU,EAAE,EAAE,CACjC,UAAU,CAAC,qBAAqB,EAAE;QAChC,MAAM;QACN,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,MAAM;KACf,CAA0B;IAM7B,aAAa,EAAE,CAAC,SAAiB,EAAE,IAAmB,EAAE,EAAE,CACxD,UAAU,CAAC,YAAY,SAAS,EAAE,EAAE;QAClC,MAAM;QACN,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,MAAM;KACf,CAA2C;IAQ9C,eAAe,EAAE,CAAC,GAAW,EAAE,EAAE,CAC/B,UAAU,CAAC,eAAe,EAAE;QAC1B,MAAM;QACN,IAAI,EAAE,EAAE,GAAG,EAAE;QACb,MAAM,EAAE,MAAM;KACf,CAEA;CACJ,CAAC,CAAC"}
|
package/esm/backend.d.ts
CHANGED
|
@@ -146,6 +146,38 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
146
146
|
updateIntegration: (authToken: string, integrationID: string, integration: import("./types").Integration) => Promise<import("./types").ResponseSpec & {
|
|
147
147
|
integration: import("./types").Integration;
|
|
148
148
|
}>;
|
|
149
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
150
|
+
user: import("./types").User;
|
|
151
|
+
token?: string | undefined;
|
|
152
|
+
flowID?: string | undefined;
|
|
153
|
+
}>;
|
|
154
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
155
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
156
|
+
user: import("./types").User;
|
|
157
|
+
}>;
|
|
158
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
159
|
+
user: import("./types").User;
|
|
160
|
+
}>;
|
|
161
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
162
|
+
users: import("./types").User[];
|
|
163
|
+
}>;
|
|
164
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
165
|
+
users: import("./types").User[];
|
|
166
|
+
count: number;
|
|
167
|
+
}>;
|
|
168
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
169
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
170
|
+
user: import("./types").User;
|
|
171
|
+
}>;
|
|
172
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
173
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
174
|
+
user: import("./types").User;
|
|
175
|
+
}>;
|
|
176
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
177
|
+
user: import("./types").User;
|
|
178
|
+
token?: string | undefined;
|
|
179
|
+
flowID?: string | undefined;
|
|
180
|
+
}>;
|
|
149
181
|
userSignUp: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
150
182
|
user: import("./types").User;
|
|
151
183
|
}>;
|
|
@@ -380,6 +412,40 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
380
412
|
user: import("./types").User;
|
|
381
413
|
}>;
|
|
382
414
|
};
|
|
415
|
+
userPwl: {
|
|
416
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
417
|
+
user: import("./types").User;
|
|
418
|
+
token?: string | undefined;
|
|
419
|
+
flowID?: string | undefined;
|
|
420
|
+
}>;
|
|
421
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
422
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
423
|
+
user: import("./types").User;
|
|
424
|
+
}>;
|
|
425
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
426
|
+
user: import("./types").User;
|
|
427
|
+
}>;
|
|
428
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
429
|
+
users: import("./types").User[];
|
|
430
|
+
}>;
|
|
431
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
432
|
+
users: import("./types").User[];
|
|
433
|
+
count: number;
|
|
434
|
+
}>;
|
|
435
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
436
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
437
|
+
user: import("./types").User;
|
|
438
|
+
}>;
|
|
439
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
440
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
441
|
+
user: import("./types").User;
|
|
442
|
+
}>;
|
|
443
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
444
|
+
user: import("./types").User;
|
|
445
|
+
token?: string | undefined;
|
|
446
|
+
flowID?: string | undefined;
|
|
447
|
+
}>;
|
|
448
|
+
};
|
|
383
449
|
integration: {
|
|
384
450
|
getMemoriIntegrationsList: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec & {
|
|
385
451
|
integrations: import("./types").Integration[];
|
package/esm/backend.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import memori from './backend/memori';
|
|
2
2
|
import user from './backend/user';
|
|
3
|
+
import userPwl from './backend/userPwl';
|
|
3
4
|
import integration from './backend/integration';
|
|
4
5
|
import asset from './backend/asset';
|
|
5
6
|
import invitation from './backend/invitation';
|
|
@@ -15,6 +16,7 @@ const backendAPI = (apiUrl) => ({
|
|
|
15
16
|
asset: asset(apiUrl),
|
|
16
17
|
memori: memori(apiUrl),
|
|
17
18
|
user: user(apiUrl),
|
|
19
|
+
userPwl: userPwl(apiUrl),
|
|
18
20
|
integration: integration(apiUrl),
|
|
19
21
|
invitation: invitation(apiUrl),
|
|
20
22
|
consumptionLogs: consumptionLogs(apiUrl),
|
|
@@ -28,6 +30,7 @@ const backendAPI = (apiUrl) => ({
|
|
|
28
30
|
...asset(apiUrl),
|
|
29
31
|
...memori(apiUrl),
|
|
30
32
|
...user(apiUrl),
|
|
33
|
+
...userPwl(apiUrl),
|
|
31
34
|
...integration(apiUrl),
|
|
32
35
|
...invitation(apiUrl),
|
|
33
36
|
...consumptionLogs(apiUrl),
|
package/esm/backend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,eAAe,MAAM,2BAA2B,C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,MAAM,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC;IACxB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,GAAG,KAAK,CAAC,MAAM,CAAC;IAChB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjB,GAAG,IAAI,CAAC,MAAM,CAAC;IACf,GAAG,OAAO,CAAC,MAAM,CAAC;IAClB,GAAG,WAAW,CAAC,MAAM,CAAC;IACtB,GAAG,UAAU,CAAC,MAAM,CAAC;IACrB,GAAG,eAAe,CAAC,MAAM,CAAC;IAC1B,GAAG,aAAa,CAAC,MAAM,CAAC;IACxB,GAAG,YAAY,CAAC,MAAM,CAAC;IACvB,GAAG,OAAO,CAAC,MAAM,CAAC;IAClB,GAAG,QAAQ,CAAC,MAAM,CAAC;IACnB,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAC3B,GAAG,KAAK,CAAC,MAAM,CAAC;IAChB,GAAG,MAAM,CAAC,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
package/esm/index.d.ts
CHANGED
|
@@ -892,6 +892,38 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
892
892
|
updateIntegration: (authToken: string, integrationID: string, integration: import("./types").Integration) => Promise<import("./types").ResponseSpec & {
|
|
893
893
|
integration: import("./types").Integration;
|
|
894
894
|
}>;
|
|
895
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
896
|
+
user: import("./types").User;
|
|
897
|
+
token?: string | undefined;
|
|
898
|
+
flowID?: string | undefined;
|
|
899
|
+
}>;
|
|
900
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
901
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
902
|
+
user: import("./types").User;
|
|
903
|
+
}>;
|
|
904
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
905
|
+
user: import("./types").User;
|
|
906
|
+
}>;
|
|
907
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
908
|
+
users: import("./types").User[];
|
|
909
|
+
}>;
|
|
910
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
911
|
+
users: import("./types").User[];
|
|
912
|
+
count: number;
|
|
913
|
+
}>;
|
|
914
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
915
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
916
|
+
user: import("./types").User;
|
|
917
|
+
}>;
|
|
918
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
919
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
920
|
+
user: import("./types").User;
|
|
921
|
+
}>;
|
|
922
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
923
|
+
user: import("./types").User;
|
|
924
|
+
token?: string | undefined;
|
|
925
|
+
flowID?: string | undefined;
|
|
926
|
+
}>;
|
|
895
927
|
userSignUp: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
896
928
|
user: import("./types").User;
|
|
897
929
|
}>;
|
|
@@ -1126,6 +1158,40 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
1126
1158
|
user: import("./types").User;
|
|
1127
1159
|
}>;
|
|
1128
1160
|
};
|
|
1161
|
+
userPwl: {
|
|
1162
|
+
pwlUserLogin: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
1163
|
+
user: import("./types").User;
|
|
1164
|
+
token?: string | undefined;
|
|
1165
|
+
flowID?: string | undefined;
|
|
1166
|
+
}>;
|
|
1167
|
+
pwlUserLogout: (authToken: string) => Promise<import("./types").ResponseSpec>;
|
|
1168
|
+
pwlGetCurrentUser: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
1169
|
+
user: import("./types").User;
|
|
1170
|
+
}>;
|
|
1171
|
+
pwlGetUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec & {
|
|
1172
|
+
user: import("./types").User;
|
|
1173
|
+
}>;
|
|
1174
|
+
pwlGetUsersList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
1175
|
+
users: import("./types").User[];
|
|
1176
|
+
}>;
|
|
1177
|
+
pwlGetUsersListPaginated: (authToken: string, filters: import("./types").UserFilters) => Promise<import("./types").ResponseSpec & {
|
|
1178
|
+
users: import("./types").User[];
|
|
1179
|
+
count: number;
|
|
1180
|
+
}>;
|
|
1181
|
+
pwlDeleteUser: (authToken: string, userID: string) => Promise<import("./types").ResponseSpec>;
|
|
1182
|
+
pwlUpdateUser: (authToken: string, userID: string, user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
1183
|
+
user: import("./types").User;
|
|
1184
|
+
}>;
|
|
1185
|
+
pwlRecoverUsername: (user: import("./types").User) => Promise<import("./types").ResponseSpec>;
|
|
1186
|
+
pwlCreateUser: (authToken: string, user: Partial<import("./types").User>) => Promise<import("./types").ResponseSpec & {
|
|
1187
|
+
user: import("./types").User;
|
|
1188
|
+
}>;
|
|
1189
|
+
pwlLoginWithJWT: (jwt: string) => Promise<import("./types").ResponseSpec & {
|
|
1190
|
+
user: import("./types").User;
|
|
1191
|
+
token?: string | undefined;
|
|
1192
|
+
flowID?: string | undefined;
|
|
1193
|
+
}>;
|
|
1194
|
+
};
|
|
1129
1195
|
integration: {
|
|
1130
1196
|
getMemoriIntegrationsList: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec & {
|
|
1131
1197
|
integrations: import("./types").Integration[];
|
package/package.json
CHANGED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { ResponseSpec, User, UserFilters } from '../types';
|
|
2
|
+
import { apiFetcher } from '../apiFetcher';
|
|
3
|
+
|
|
4
|
+
export default (apiUrl: string) => ({
|
|
5
|
+
/**
|
|
6
|
+
* Tries a login with the specified credentials and returns a login token if successful.
|
|
7
|
+
* @param user - The user object
|
|
8
|
+
* @returns The logged in user object
|
|
9
|
+
*/
|
|
10
|
+
pwlUserLogin: (user: User) =>
|
|
11
|
+
apiFetcher('/PwlLogin', {
|
|
12
|
+
apiUrl,
|
|
13
|
+
body: user,
|
|
14
|
+
method: 'POST',
|
|
15
|
+
}) as Promise<
|
|
16
|
+
ResponseSpec & { user: User; token?: string; flowID?: string }
|
|
17
|
+
>,
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Logs out the user.
|
|
21
|
+
* @param authToken - The login token
|
|
22
|
+
*/
|
|
23
|
+
pwlUserLogout: (authToken: string) =>
|
|
24
|
+
apiFetcher(`/PwlLogout/${authToken}`, {
|
|
25
|
+
apiUrl,
|
|
26
|
+
method: 'POST',
|
|
27
|
+
}) as Promise<ResponseSpec>,
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Gets the details of the currently logged in User object.
|
|
31
|
+
* @param authToken - The login token
|
|
32
|
+
* @returns The user object
|
|
33
|
+
*/
|
|
34
|
+
pwlGetCurrentUser: (authToken: string) =>
|
|
35
|
+
apiFetcher(`/PwlUser/${authToken}`, {
|
|
36
|
+
apiUrl,
|
|
37
|
+
}) as Promise<
|
|
38
|
+
ResponseSpec & {
|
|
39
|
+
user: User;
|
|
40
|
+
}
|
|
41
|
+
>,
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Gets the details of a User object.
|
|
45
|
+
* @param authToken - The login token
|
|
46
|
+
* @param userID - The user ID
|
|
47
|
+
* @returns The user object
|
|
48
|
+
*/
|
|
49
|
+
pwlGetUser: (authToken: string, userID: string) =>
|
|
50
|
+
apiFetcher(`/PwlUser/${authToken}/${userID}`, {
|
|
51
|
+
apiUrl,
|
|
52
|
+
}) as Promise<
|
|
53
|
+
ResponseSpec & {
|
|
54
|
+
user: User;
|
|
55
|
+
}
|
|
56
|
+
>,
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Gets a list of all the existing User objects.
|
|
60
|
+
* @param authToken - The login token
|
|
61
|
+
* @returns A list of User objects
|
|
62
|
+
*/
|
|
63
|
+
pwlGetUsersList: (authToken: string) =>
|
|
64
|
+
apiFetcher(`/PwlUsers/${authToken}`, {
|
|
65
|
+
apiUrl,
|
|
66
|
+
}) as Promise<
|
|
67
|
+
ResponseSpec & {
|
|
68
|
+
users: User[];
|
|
69
|
+
}
|
|
70
|
+
>,
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Gets a list of all the existing User objects paginated.
|
|
74
|
+
* @param authToken - The login token
|
|
75
|
+
* @param from - The 0-based index of the first User object to list
|
|
76
|
+
* @param howMany - The number of User objects to list
|
|
77
|
+
* @returns A list of User objects
|
|
78
|
+
*/
|
|
79
|
+
pwlGetUsersListPaginated: (authToken: string, filters: UserFilters) =>
|
|
80
|
+
apiFetcher(`/FilterPwlUsers/${authToken}`, {
|
|
81
|
+
apiUrl,
|
|
82
|
+
body: filters,
|
|
83
|
+
method: 'POST',
|
|
84
|
+
}) as Promise<
|
|
85
|
+
ResponseSpec & {
|
|
86
|
+
users: User[];
|
|
87
|
+
count: number;
|
|
88
|
+
}
|
|
89
|
+
>,
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Deletes the currently logged in User.
|
|
93
|
+
* @param {string} authToken - The login token
|
|
94
|
+
* @param {string} userID: The User ID
|
|
95
|
+
*/
|
|
96
|
+
pwlDeleteUser: (authToken: string, userID: string) =>
|
|
97
|
+
apiFetcher(`/PwlUser/${authToken}/${userID}`, {
|
|
98
|
+
apiUrl,
|
|
99
|
+
method: 'DELETE',
|
|
100
|
+
}) as Promise<ResponseSpec>,
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Updates the details of a User object.
|
|
104
|
+
* @param authToken - The login token
|
|
105
|
+
* @param userID - The user ID
|
|
106
|
+
* @returns The user object
|
|
107
|
+
*/
|
|
108
|
+
pwlUpdateUser: (authToken: string, userID: string, user: User) =>
|
|
109
|
+
apiFetcher(`/PwlUser/${authToken}/${userID}`, {
|
|
110
|
+
apiUrl,
|
|
111
|
+
method: 'PATCH',
|
|
112
|
+
body: user,
|
|
113
|
+
}) as Promise<
|
|
114
|
+
ResponseSpec & {
|
|
115
|
+
user: User;
|
|
116
|
+
}
|
|
117
|
+
>,
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Recovers a User's name and sends it to their configured e-mail.
|
|
121
|
+
* @param {User} user - The user object
|
|
122
|
+
*/
|
|
123
|
+
pwlRecoverUsername: (user: User) =>
|
|
124
|
+
apiFetcher(`/RecoverPwlUserName`, {
|
|
125
|
+
apiUrl,
|
|
126
|
+
body: user,
|
|
127
|
+
method: 'POST',
|
|
128
|
+
}) as Promise<ResponseSpec>,
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Registers a new user.
|
|
132
|
+
* @param {User} user - The user object
|
|
133
|
+
*/
|
|
134
|
+
pwlCreateUser: (authToken: string, user: Partial<User>) =>
|
|
135
|
+
apiFetcher(`/PwlUser/${authToken}`, {
|
|
136
|
+
apiUrl,
|
|
137
|
+
body: user,
|
|
138
|
+
method: 'POST',
|
|
139
|
+
}) as Promise<ResponseSpec & { user: User }>,
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Tries a login with the specified JWT and returns a login token if successful.
|
|
143
|
+
* @param {object} payload - The payload object
|
|
144
|
+
* @param {string} payload.jwt - The JWT
|
|
145
|
+
* @returns The logged in user object
|
|
146
|
+
*/
|
|
147
|
+
pwlLoginWithJWT: (jwt: string) =>
|
|
148
|
+
apiFetcher('/LoginWithJWT', {
|
|
149
|
+
apiUrl,
|
|
150
|
+
body: { jwt },
|
|
151
|
+
method: 'POST',
|
|
152
|
+
}) as Promise<
|
|
153
|
+
ResponseSpec & { user: User; token?: string; flowID?: string }
|
|
154
|
+
>,
|
|
155
|
+
});
|
package/src/backend.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import memori from './backend/memori';
|
|
2
2
|
import user from './backend/user';
|
|
3
|
+
import userPwl from './backend/userPwl';
|
|
3
4
|
import integration from './backend/integration';
|
|
4
5
|
import asset from './backend/asset';
|
|
5
6
|
import invitation from './backend/invitation';
|
|
@@ -16,6 +17,7 @@ const backendAPI = (apiUrl: string) => ({
|
|
|
16
17
|
asset: asset(apiUrl),
|
|
17
18
|
memori: memori(apiUrl),
|
|
18
19
|
user: user(apiUrl),
|
|
20
|
+
userPwl: userPwl(apiUrl),
|
|
19
21
|
integration: integration(apiUrl),
|
|
20
22
|
invitation: invitation(apiUrl),
|
|
21
23
|
consumptionLogs: consumptionLogs(apiUrl),
|
|
@@ -29,6 +31,7 @@ const backendAPI = (apiUrl: string) => ({
|
|
|
29
31
|
...asset(apiUrl),
|
|
30
32
|
...memori(apiUrl),
|
|
31
33
|
...user(apiUrl),
|
|
34
|
+
...userPwl(apiUrl),
|
|
32
35
|
...integration(apiUrl),
|
|
33
36
|
...invitation(apiUrl),
|
|
34
37
|
...consumptionLogs(apiUrl),
|