@bwi-mentorspaces/application-utils-npm 0.0.6 → 0.0.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.
Files changed (114) hide show
  1. package/chat/index.d.ts +36 -36
  2. package/chat/index.js +58 -58
  3. package/chat/stream/enum/index.d.ts +33 -27
  4. package/chat/stream/enum/index.js +41 -34
  5. package/chat/stream/enum/index.js.map +1 -1
  6. package/chat/stream/index.d.ts +9 -9
  7. package/chat/stream/index.js +17 -17
  8. package/chat/stream/models/_/channel.data.d.ts +19 -19
  9. package/chat/stream/models/_/channel.data.js +2 -2
  10. package/chat/stream/models/_/channel.member.d.ts +14 -14
  11. package/chat/stream/models/_/channel.member.js +11 -11
  12. package/chat/stream/models/_/channel.response.d.ts +8 -8
  13. package/chat/stream/models/_/channel.response.js +2 -2
  14. package/chat/stream/models/_/event.data.d.ts +16 -0
  15. package/chat/stream/models/_/event.data.js +4 -0
  16. package/chat/stream/models/_/event.data.js.map +1 -0
  17. package/chat/stream/models/_/message.response.d.ts +8 -8
  18. package/chat/stream/models/_/message.response.js +2 -2
  19. package/chat/stream/models/_/stream.config.d.ts +22 -22
  20. package/chat/stream/models/_/stream.config.js +2 -2
  21. package/chat/stream/models/_/user.response.d.ts +8 -8
  22. package/chat/stream/models/_/user.response.js +2 -2
  23. package/chat/stream/models/index.d.ts +9 -7
  24. package/chat/stream/models/index.js +5 -5
  25. package/chat/stream/models/index.js.map +1 -1
  26. package/chat/stream/stream.api.d.ts +63 -63
  27. package/chat/stream/stream.api.js +76 -76
  28. package/chat/stream/stream.auth.d.ts +70 -70
  29. package/chat/stream/stream.auth.js +80 -80
  30. package/chat/stream/stream.base.d.ts +56 -56
  31. package/chat/stream/stream.base.js +93 -93
  32. package/chat/stream/stream.channel.d.ts +132 -118
  33. package/chat/stream/stream.channel.js +306 -285
  34. package/chat/stream/stream.channel.js.map +1 -1
  35. package/chat/stream/stream.error.d.ts +19 -19
  36. package/chat/stream/stream.error.js +17 -17
  37. package/chat/stream/stream.member.d.ts +75 -75
  38. package/chat/stream/stream.member.js +175 -175
  39. package/chat/stream/stream.message.d.ts +59 -59
  40. package/chat/stream/stream.message.js +112 -112
  41. package/chat/stream/stream.user.d.ts +49 -49
  42. package/chat/stream/stream.user.js +90 -90
  43. package/core/_/api-error.d.ts +24 -24
  44. package/core/_/api-error.js +21 -21
  45. package/core/_/api-response.d.ts +25 -25
  46. package/core/_/api-response.js +21 -21
  47. package/core/_/cors-headers.d.ts +16 -16
  48. package/core/_/cors-headers.js +32 -32
  49. package/core/_/model.d.ts +39 -31
  50. package/core/_/model.js +2 -2
  51. package/core/_/service-request.d.ts +66 -66
  52. package/core/_/service-request.js +104 -104
  53. package/core/_/service-request.js.map +1 -1
  54. package/core/index.d.ts +10 -10
  55. package/core/index.js +11 -11
  56. package/deployment/_/serverless.d.ts +26 -26
  57. package/deployment/_/serverless.js +43 -43
  58. package/deployment/index.d.ts +2 -2
  59. package/deployment/index.js +5 -5
  60. package/endpoint-test-factory/_/test-factory.d.ts +45 -45
  61. package/endpoint-test-factory/_/test-factory.js +91 -91
  62. package/endpoint-test-factory/index.d.ts +2 -2
  63. package/endpoint-test-factory/index.js +5 -5
  64. package/enums/index.d.ts +92 -92
  65. package/enums/index.js +2 -2
  66. package/meet/index.d.ts +36 -36
  67. package/meet/index.js +58 -58
  68. package/meet/twilio/enum/index.d.ts +6 -6
  69. package/meet/twilio/enum/index.js +10 -10
  70. package/meet/twilio/index.d.ts +5 -5
  71. package/meet/twilio/index.js +11 -11
  72. package/meet/twilio/models/_/room.data.d.ts +6 -6
  73. package/meet/twilio/models/_/room.data.js +2 -2
  74. package/meet/twilio/models/_/twilio.config.d.ts +29 -29
  75. package/meet/twilio/models/_/twilio.config.js +2 -2
  76. package/meet/twilio/models/index.d.ts +3 -3
  77. package/meet/twilio/models/index.js +2 -2
  78. package/meet/twilio/twilio.api.d.ts +28 -28
  79. package/meet/twilio/twilio.api.js +45 -45
  80. package/meet/twilio/twilio.auth.d.ts +55 -55
  81. package/meet/twilio/twilio.auth.js +83 -83
  82. package/meet/twilio/twilio.base.d.ts +41 -41
  83. package/meet/twilio/twilio.base.js +53 -53
  84. package/meet/twilio/twilio.room.d.ts +46 -46
  85. package/meet/twilio/twilio.room.js +124 -124
  86. package/package.json +57 -57
  87. package/swagger/_/swagger.config.d.ts +21 -21
  88. package/swagger/_/swagger.config.js +2 -2
  89. package/swagger/_/swagger.d.ts +37 -37
  90. package/swagger/_/swagger.js +78 -78
  91. package/swagger/index.d.ts +3 -3
  92. package/swagger/index.js +5 -5
  93. package/types/index.d.ts +19 -19
  94. package/types/index.js +2 -2
  95. package/utils/_/encoder.d.ts +19 -19
  96. package/utils/_/encoder.js +27 -27
  97. package/utils/_/encryptor.d.ts +26 -26
  98. package/utils/_/encryptor.js +67 -67
  99. package/utils/_/hasher.d.ts +25 -25
  100. package/utils/_/hasher.js +63 -63
  101. package/utils/_/object-mapper.d.ts +12 -12
  102. package/utils/_/object-mapper.js +22 -22
  103. package/utils/_/string-formatter.d.ts +34 -34
  104. package/utils/_/string-formatter.js +49 -49
  105. package/utils/_/utc-date.d.ts +35 -35
  106. package/utils/_/utc-date.js +84 -84
  107. package/utils/index.d.ts +7 -7
  108. package/utils/index.js +15 -15
  109. package/validators/_/checker.d.ts +62 -62
  110. package/validators/_/checker.js +98 -98
  111. package/validators/_/regex.d.ts +98 -98
  112. package/validators/_/regex.js +142 -142
  113. package/validators/index.d.ts +3 -3
  114. package/validators/index.js +7 -7
@@ -1,56 +1,56 @@
1
- import { Channel, StreamChat } from "stream-chat";
2
- import { StreamAuth } from "./stream.auth";
3
- /**
4
- * BaseClient class
5
- */
6
- export declare abstract class StreamBase {
7
- private _server;
8
- private _auth;
9
- /**
10
- * getter for stream chat instance
11
- *
12
- * @returns {StreamChat} stream chat instance
13
- */
14
- get server(): StreamChat;
15
- /**
16
- * setter for stream chat instance
17
- *
18
- * @param {StreamChat} value stream chat instance
19
- */
20
- set server(value: StreamChat);
21
- /**
22
- * getter for stream auth
23
- *
24
- * @returns {StreamAuth} stream auth instance
25
- */
26
- get auth(): StreamAuth;
27
- /**
28
- * setter for stream auth instance
29
- *
30
- * @param {StreamAuth} value stream auth instance
31
- */
32
- set auth(value: StreamAuth);
33
- /**
34
- * Get token for extended classes
35
- *
36
- * @param {string} userId user id
37
- * @param {boolean} refresh refresh token
38
- * @returns {string} returns the token value
39
- */
40
- getToken(userId: string, refresh?: boolean): string;
41
- /**
42
- * Get channel instance by id
43
- *
44
- * @param {string} channelId channel id
45
- * @returns {Channel} channel instance
46
- */
47
- getChannelById(channelId: string): Promise<Channel[]>;
48
- /**
49
- * Handles the exceptions generated by the StreamAPI *(check for token expiration)
50
- *
51
- * @param {number} httpError http error from Stream
52
- * @param {number} httpCode http error code
53
- * @returns {boolean} Will be return a string with a friendly message or a new token(depending of the case)
54
- */
55
- static hasTokenExpired(httpError: number, httpCode: number): boolean;
56
- }
1
+ import { Channel, StreamChat } from "stream-chat";
2
+ import { StreamAuth } from "./stream.auth";
3
+ /**
4
+ * BaseClient class
5
+ */
6
+ export declare abstract class StreamBase {
7
+ private _server;
8
+ private _auth;
9
+ /**
10
+ * getter for stream chat instance
11
+ *
12
+ * @returns {StreamChat} stream chat instance
13
+ */
14
+ get server(): StreamChat;
15
+ /**
16
+ * setter for stream chat instance
17
+ *
18
+ * @param {StreamChat} value stream chat instance
19
+ */
20
+ set server(value: StreamChat);
21
+ /**
22
+ * getter for stream auth
23
+ *
24
+ * @returns {StreamAuth} stream auth instance
25
+ */
26
+ get auth(): StreamAuth;
27
+ /**
28
+ * setter for stream auth instance
29
+ *
30
+ * @param {StreamAuth} value stream auth instance
31
+ */
32
+ set auth(value: StreamAuth);
33
+ /**
34
+ * Get token for extended classes
35
+ *
36
+ * @param {string} userId user id
37
+ * @param {boolean} refresh refresh token
38
+ * @returns {string} returns the token value
39
+ */
40
+ getToken(userId: string, refresh?: boolean): string;
41
+ /**
42
+ * Get channel instance by id
43
+ *
44
+ * @param {string} channelId channel id
45
+ * @returns {Channel} channel instance
46
+ */
47
+ getChannelById(channelId: string): Promise<Channel[]>;
48
+ /**
49
+ * Handles the exceptions generated by the StreamAPI *(check for token expiration)
50
+ *
51
+ * @param {number} httpError http error from Stream
52
+ * @param {number} httpCode http error code
53
+ * @returns {boolean} Will be return a string with a friendly message or a new token(depending of the case)
54
+ */
55
+ static hasTokenExpired(httpError: number, httpCode: number): boolean;
56
+ }
@@ -1,94 +1,94 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.StreamBase = void 0;
13
- const enum_1 = require("./enum");
14
- /**
15
- * BaseClient class
16
- */
17
- class StreamBase {
18
- // getter / setter
19
- /**
20
- * getter for stream chat instance
21
- *
22
- * @returns {StreamChat} stream chat instance
23
- */
24
- get server() {
25
- return this._server;
26
- }
27
- /**
28
- * setter for stream chat instance
29
- *
30
- * @param {StreamChat} value stream chat instance
31
- */
32
- set server(value) {
33
- this._server = value;
34
- }
35
- /**
36
- * getter for stream auth
37
- *
38
- * @returns {StreamAuth} stream auth instance
39
- */
40
- get auth() {
41
- return this._auth;
42
- }
43
- /**
44
- * setter for stream auth instance
45
- *
46
- * @param {StreamAuth} value stream auth instance
47
- */
48
- set auth(value) {
49
- this._auth = value;
50
- }
51
- // methods
52
- /**
53
- * Get token for extended classes
54
- *
55
- * @param {string} userId user id
56
- * @param {boolean} refresh refresh token
57
- * @returns {string} returns the token value
58
- */
59
- getToken(userId, refresh) {
60
- return this.auth.token(userId, refresh);
61
- }
62
- /**
63
- * Get channel instance by id
64
- *
65
- * @param {string} channelId channel id
66
- * @returns {Channel} channel instance
67
- */
68
- getChannelById(channelId) {
69
- return __awaiter(this, void 0, void 0, function* () {
70
- //Create the filter
71
- const filter = { type: enum_1.ChannelType.Team, id: { $eq: channelId } };
72
- //return the result
73
- return yield this._server.queryChannels(filter);
74
- });
75
- }
76
- /**
77
- * Handles the exceptions generated by the StreamAPI *(check for token expiration)
78
- *
79
- * @param {number} httpError http error from Stream
80
- * @param {number} httpCode http error code
81
- * @returns {boolean} Will be return a string with a friendly message or a new token(depending of the case)
82
- */
83
- static hasTokenExpired(httpError, httpCode) {
84
- //Check if the error belows an specific Authentication error code
85
- if (httpError === 401 /* Unauthorized */ || httpError === 403 /* Forbidden */) {
86
- //This is a token expired validation from API
87
- if (httpCode == enum_1.ResponseCode.TokenExpired) {
88
- return true;
89
- }
90
- }
91
- }
92
- }
93
- exports.StreamBase = StreamBase;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.StreamBase = void 0;
13
+ const enum_1 = require("./enum");
14
+ /**
15
+ * BaseClient class
16
+ */
17
+ class StreamBase {
18
+ // getter / setter
19
+ /**
20
+ * getter for stream chat instance
21
+ *
22
+ * @returns {StreamChat} stream chat instance
23
+ */
24
+ get server() {
25
+ return this._server;
26
+ }
27
+ /**
28
+ * setter for stream chat instance
29
+ *
30
+ * @param {StreamChat} value stream chat instance
31
+ */
32
+ set server(value) {
33
+ this._server = value;
34
+ }
35
+ /**
36
+ * getter for stream auth
37
+ *
38
+ * @returns {StreamAuth} stream auth instance
39
+ */
40
+ get auth() {
41
+ return this._auth;
42
+ }
43
+ /**
44
+ * setter for stream auth instance
45
+ *
46
+ * @param {StreamAuth} value stream auth instance
47
+ */
48
+ set auth(value) {
49
+ this._auth = value;
50
+ }
51
+ // methods
52
+ /**
53
+ * Get token for extended classes
54
+ *
55
+ * @param {string} userId user id
56
+ * @param {boolean} refresh refresh token
57
+ * @returns {string} returns the token value
58
+ */
59
+ getToken(userId, refresh) {
60
+ return this.auth.token(userId, refresh);
61
+ }
62
+ /**
63
+ * Get channel instance by id
64
+ *
65
+ * @param {string} channelId channel id
66
+ * @returns {Channel} channel instance
67
+ */
68
+ getChannelById(channelId) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ //Create the filter
71
+ const filter = { type: enum_1.ChannelType.Team, id: { $eq: channelId } };
72
+ //return the result
73
+ return yield this._server.queryChannels(filter);
74
+ });
75
+ }
76
+ /**
77
+ * Handles the exceptions generated by the StreamAPI *(check for token expiration)
78
+ *
79
+ * @param {number} httpError http error from Stream
80
+ * @param {number} httpCode http error code
81
+ * @returns {boolean} Will be return a string with a friendly message or a new token(depending of the case)
82
+ */
83
+ static hasTokenExpired(httpError, httpCode) {
84
+ //Check if the error belows an specific Authentication error code
85
+ if (httpError === 401 /* Unauthorized */ || httpError === 403 /* Forbidden */) {
86
+ //This is a token expired validation from API
87
+ if (httpCode == enum_1.ResponseCode.TokenExpired) {
88
+ return true;
89
+ }
90
+ }
91
+ }
92
+ }
93
+ exports.StreamBase = StreamBase;
94
94
  //# sourceMappingURL=stream.base.js.map
@@ -1,118 +1,132 @@
1
- import { ChannelAPIResponse, StreamChat, Channel, ChannelSort, UpdateChannelAPIResponse, ChannelFilters, ChannelOptions } from "stream-chat";
2
- import { IChannelData } from "./models/";
3
- import { StreamBase } from "./stream.base";
4
- import { StreamAuth } from "./stream.auth";
5
- /**
6
- * Channel Api declarations
7
- */
8
- interface IStreamChannel {
9
- /**
10
- * Create channel with optional data object
11
- */
12
- create(data: IChannelData): Promise<ChannelAPIResponse>;
13
- /**
14
- * Check if exist a channel with specific members
15
- */
16
- getByMembers(data: IChannelData): Promise<Channel[]>;
17
- /**
18
- * Get channel by filter
19
- */
20
- getChannel(filter: ChannelFilters): Promise<Channel[]>;
21
- /**
22
- * Delete a specific channel from stream, this will be delete the data too.
23
- */
24
- deleteChannel(channelId: string, isHard: boolean): Promise<boolean>;
25
- /**
26
- * Accept invited channel
27
- */
28
- acceptInvite(channelId: string, userId: string): Promise<UpdateChannelAPIResponse>;
29
- /**
30
- * Reject invited channel
31
- */
32
- rejectInvite(channelId: string, userId: string): Promise<UpdateChannelAPIResponse>;
33
- /**
34
- * Sync channel
35
- */
36
- syncChannel(data: IChannelData): Promise<boolean>;
37
- }
38
- /**
39
- * A class that provides methods to manage StreamAPI Channel
40
- */
41
- export declare class StreamChannel extends StreamBase implements IStreamChannel {
42
- /**
43
- * Stream channel constructor
44
- *
45
- * @param {StreamAuth} auth Auth class
46
- * @param {StreamChat} server Stream API server
47
- */
48
- constructor(auth: StreamAuth, server: StreamChat);
49
- /**
50
- * Create channel
51
- *
52
- * @param {IChannelData} data channel data object
53
- * @returns {ChannelAPIResponse} channel object response
54
- */
55
- create(data: IChannelData): Promise<ChannelAPIResponse>;
56
- /**
57
- * Add new members into a specific channel.
58
- *
59
- * @param {IChannelData} data channel data object
60
- * @returns {Promise<boolean>} promise of the result to add members
61
- */
62
- addMembers(data: IChannelData): Promise<boolean>;
63
- /**
64
- * Check if exist a channel with specific members
65
- *
66
- * @param {IChannelData} data channel data object
67
- * @returns {Promise<Channel[]>} channel response
68
- */
69
- getByMembers(data: IChannelData): Promise<Channel[]>;
70
- /**
71
- * Get channel by filter
72
- *
73
- * @param {ChannelFilters} filter filter parameters
74
- * @param {ChannelSort} sort sort parameters
75
- * @param {ChannelOptions} options options parameter
76
- * @returns {Promise<Channel[]>} channel response
77
- */
78
- getChannel(filter: ChannelFilters, sort?: ChannelSort, options?: ChannelOptions): Promise<Channel[]>;
79
- /**
80
- * Allow to partial update some fields on stream channel
81
- *
82
- * @param {IChannelData} data channel data object
83
- * @returns {Promise<UpdateChannelAPIResponse>} channel object response
84
- */
85
- updateChannel(data: IChannelData): Promise<UpdateChannelAPIResponse>;
86
- /**
87
- * This will be delete a specific channel from Stream
88
- *
89
- * @param {string} channelId channel id of the channel
90
- * @param {boolean} isHard is Hard delete
91
- * @returns {Promise<boolean>} promise of the result to delete channel
92
- */
93
- deleteChannel(channelId: string, isHard?: boolean): Promise<boolean>;
94
- /**
95
- * Accept invited channel
96
- *
97
- * @param {string} channelId channel id of the channel
98
- * @param {string} userId user id from stream
99
- * @returns {boolean} true / false
100
- */
101
- acceptInvite(channelId: string, userId: string): Promise<UpdateChannelAPIResponse>;
102
- /**
103
- * Reject invited channel
104
- *
105
- * @param {string} channelId channel id of the channel
106
- * @param {string} userId user id from stream
107
- * @returns {boolean} true / false
108
- */
109
- rejectInvite(channelId: string, userId: string): Promise<UpdateChannelAPIResponse>;
110
- /**
111
- * Sync a channel
112
- *
113
- * @param {IChannelData} data channel data
114
- * @returns {Promise<boolean>} promise of the type boolean
115
- */
116
- syncChannel(data: IChannelData): Promise<boolean>;
117
- }
118
- export {};
1
+ import { ChannelAPIResponse, StreamChat, Channel, ChannelSort, UpdateChannelAPIResponse, ChannelFilters, ChannelOptions, UserResponse, EventAPIResponse, DefaultGenerics } from "stream-chat";
2
+ import { IChannelData, IEventTypes, IEventTypesData } from "./models";
3
+ import { StreamBase } from "./stream.base";
4
+ import { StreamAuth } from "./stream.auth";
5
+ /**
6
+ * Channel Api declarations
7
+ */
8
+ interface IStreamChannel {
9
+ /**
10
+ * Create channel with optional data object
11
+ */
12
+ create(data: IChannelData): Promise<ChannelAPIResponse>;
13
+ /**
14
+ * Check if exist a channel with specific members
15
+ */
16
+ getByMembers(data: IChannelData): Promise<Channel[]>;
17
+ /**
18
+ * Get channel by filter
19
+ */
20
+ getChannel(filter: ChannelFilters): Promise<Channel[]>;
21
+ /**
22
+ * Delete a specific channel from stream, this will be delete the data too.
23
+ */
24
+ deleteChannel(channelId: string, isHard: boolean): Promise<boolean>;
25
+ /**
26
+ * Accept invited channel
27
+ */
28
+ acceptInvite(channelId: string, userId: string): Promise<UpdateChannelAPIResponse>;
29
+ /**
30
+ * Reject invited channel
31
+ */
32
+ rejectInvite(channelId: string, userId: string): Promise<UpdateChannelAPIResponse>;
33
+ /**
34
+ * Sync channel
35
+ */
36
+ syncChannel(data: IChannelData): Promise<boolean>;
37
+ /**
38
+ * Send event to channel
39
+ */
40
+ sendChannelEvent<T extends IEventTypes>(channelId: string, eventType: T, user: UserResponse, customData?: IEventTypesData[T]): Promise<EventAPIResponse<DefaultGenerics>>;
41
+ }
42
+ /**
43
+ * A class that provides methods to manage StreamAPI Channel
44
+ */
45
+ export declare class StreamChannel extends StreamBase implements IStreamChannel {
46
+ /**
47
+ * Stream channel constructor
48
+ *
49
+ * @param {StreamAuth} auth Auth class
50
+ * @param {StreamChat} server Stream API server
51
+ */
52
+ constructor(auth: StreamAuth, server: StreamChat);
53
+ /**
54
+ * Create channel
55
+ *
56
+ * @param {IChannelData} data channel data object
57
+ * @returns {ChannelAPIResponse} channel object response
58
+ */
59
+ create(data: IChannelData): Promise<ChannelAPIResponse>;
60
+ /**
61
+ * Send event to channel
62
+ *
63
+ * @param {string} channelId the channel id
64
+ * @param {IEventTypes} eventType the event type
65
+ * @param {string} user user responsible for sent the event
66
+ * @param {IEventTypesData} customData the data to send with the event
67
+ * @returns {Promise<EventAPIResponse<DefaultGenerics>>} channel object response
68
+ */
69
+ sendChannelEvent<T extends IEventTypes>(channelId: string, eventType: T, user: UserResponse, customData?: IEventTypesData[T]): Promise<EventAPIResponse<DefaultGenerics>>;
70
+ /**
71
+ * Add new members into a specific channel.
72
+ *
73
+ * @param {IChannelData} data channel data object
74
+ * @returns {Promise<boolean>} promise of the result to add members
75
+ */
76
+ addMembers(data: IChannelData): Promise<boolean>;
77
+ /**
78
+ * Check if exist a channel with specific members
79
+ *
80
+ * @param {IChannelData} data channel data object
81
+ * @returns {Promise<Channel[]>} channel response
82
+ */
83
+ getByMembers(data: IChannelData): Promise<Channel[]>;
84
+ /**
85
+ * Get channel by filter
86
+ *
87
+ * @param {ChannelFilters} filter filter parameters
88
+ * @param {ChannelSort} sort sort parameters
89
+ * @param {ChannelOptions} options options parameter
90
+ * @returns {Promise<Channel[]>} channel response
91
+ */
92
+ getChannel(filter: ChannelFilters, sort?: ChannelSort, options?: ChannelOptions): Promise<Channel[]>;
93
+ /**
94
+ * Allow to partial update some fields on stream channel
95
+ *
96
+ * @param {IChannelData} data channel data object
97
+ * @returns {Promise<UpdateChannelAPIResponse>} channel object response
98
+ */
99
+ updateChannel(data: IChannelData): Promise<UpdateChannelAPIResponse>;
100
+ /**
101
+ * This will be delete a specific channel from Stream
102
+ *
103
+ * @param {string} channelId channel id of the channel
104
+ * @param {boolean} isHard is Hard delete
105
+ * @returns {Promise<boolean>} promise of the result to delete channel
106
+ */
107
+ deleteChannel(channelId: string, isHard?: boolean): Promise<boolean>;
108
+ /**
109
+ * Accept invited channel
110
+ *
111
+ * @param {string} channelId channel id of the channel
112
+ * @param {string} userId user id from stream
113
+ * @returns {boolean} true / false
114
+ */
115
+ acceptInvite(channelId: string, userId: string): Promise<UpdateChannelAPIResponse>;
116
+ /**
117
+ * Reject invited channel
118
+ *
119
+ * @param {string} channelId channel id of the channel
120
+ * @param {string} userId user id from stream
121
+ * @returns {boolean} true / false
122
+ */
123
+ rejectInvite(channelId: string, userId: string): Promise<UpdateChannelAPIResponse>;
124
+ /**
125
+ * Sync a channel
126
+ *
127
+ * @param {IChannelData} data channel data
128
+ * @returns {Promise<boolean>} promise of the type boolean
129
+ */
130
+ syncChannel(data: IChannelData): Promise<boolean>;
131
+ }
132
+ export {};