@bwi-mentorspaces/application-utils-npm 0.0.15 → 0.0.18
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,19 +1,6 @@
|
|
|
1
1
|
import { User, StreamChat, PartialUserUpdate, UserFilters } from "stream-chat";
|
|
2
2
|
import { IUserResponse } from "./models";
|
|
3
3
|
import { StreamBase } from "./stream.base";
|
|
4
|
-
/**
|
|
5
|
-
* Necessary user information on a getStream user
|
|
6
|
-
*/
|
|
7
|
-
interface IUserInfo {
|
|
8
|
-
email: string;
|
|
9
|
-
firstName: string;
|
|
10
|
-
lastName: string;
|
|
11
|
-
avatar: string;
|
|
12
|
-
name: string;
|
|
13
|
-
headline: string;
|
|
14
|
-
pronouns: string;
|
|
15
|
-
companyHeadline: string;
|
|
16
|
-
}
|
|
17
4
|
/**
|
|
18
5
|
* Channel Api declarations
|
|
19
6
|
*/
|
|
@@ -58,7 +45,7 @@ export declare class StreamUser extends StreamBase implements IStreamUser {
|
|
|
58
45
|
* @param {info} userInfo user info object
|
|
59
46
|
* @returns {Promise<boolean>} promise of the type boolean
|
|
60
47
|
*/
|
|
61
|
-
createUser(
|
|
48
|
+
createUser(userInfo: any): Promise<boolean>;
|
|
62
49
|
/**
|
|
63
50
|
* Delete stream user
|
|
64
51
|
* https://getstream.io/chat/docs/node/update_users/?language=javascript#delete-a-user
|
|
@@ -77,15 +77,12 @@ class StreamUser extends stream_base_1.StreamBase {
|
|
|
77
77
|
* @param {info} userInfo user info object
|
|
78
78
|
* @returns {Promise<boolean>} promise of the type boolean
|
|
79
79
|
*/
|
|
80
|
-
createUser(
|
|
80
|
+
createUser(userInfo) {
|
|
81
81
|
const _super = Object.create(null, {
|
|
82
82
|
server: { get: () => super.server }
|
|
83
83
|
});
|
|
84
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
const
|
|
86
|
-
payload.id = userRef;
|
|
87
|
-
payload.role = "user";
|
|
88
|
-
const r = yield _super.server.upsertUser(payload);
|
|
85
|
+
const r = yield _super.server.upsertUser(userInfo);
|
|
89
86
|
//check the result
|
|
90
87
|
if (r) {
|
|
91
88
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.user.js","sourceRoot":"","sources":["../../../chat/stream/stream.user.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+CAA2C;
|
|
1
|
+
{"version":3,"file":"stream.user.js","sourceRoot":"","sources":["../../../chat/stream/stream.user.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+CAA2C;AAiC3C;;GAEG;AACH,MAAa,UAAW,SAAQ,wBAAU;IACtC,aAAa;IAEb;;;;OAIG;IACH,YAAY,MAAkB;QAC1B,KAAK,EAAE,CAAC;QACR,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,UAAU;IAEV;;;;;OAKG;IACG,QAAQ,CAAC,KAAa;;;;;YACxB,kBAAkB;YAClB,MAAM,CAAC,GAAG,MAAM,OAAM,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAChD,kBAAkB;YAClB,IAAI,CAAC,EAAE;gBACH,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC;KAAA;IAED;;;;;OAKG;IACG,kBAAkB,CAAC,WAAgC;;;;;YACrD,kBAAkB;YAClB,MAAM,CAAC,GAAG,MAAM,OAAM,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YAC7D,kBAAkB;YAClB,IAAI,CAAC,EAAE;gBACH,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC;KAAA;IAED;;;;;;OAMG;IACG,UAAU,CAAC,QAAQ;;;;;YACrB,MAAM,CAAC,GAAG,MAAM,OAAM,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YAClD,kBAAkB;YAClB,IAAI,CAAC,EAAE;gBACH,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC;KAAA;IAGD;;;;;;;OAOG;IACG,UAAU,CAAC,IAAU,EAAE,MAAgB;;;;;YACzC,kBAAkB;YAClB,MAAM,CAAC,GAAG,MAAM,OAAM,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE;gBAC7C,WAAW,EAAE,MAAM;gBACnB,4BAA4B,EAAE,IAAI;aACrC,CAAC,CAAC;YACH,kBAAkB;YAClB,IAAI,CAAC,EAAE;gBACH,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC;KAAA;IAED;;;;;OAKG;IACG,UAAU,CAAC,IAAiB;;;;;YAC9B,wBAAwB;YACxB,MAAM,CAAC,GAAG,MAAM,OAAM,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAE9C,OAAO,CAAC,CAAC,KAAK,CAAC;QACnB,CAAC;KAAA;CACJ;AArGD,gCAqGC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bwi-mentorspaces/application-utils-npm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "Mentor Spaces npm packages for reusable models, utils, and abstracted, commonly used processes for DB Repo, Logging, etc.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Mentor Spaces",
|