@amityco/ts-sdk 0.0.1-2d1411d.0 → 0.0.1-376eede.0
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/@types/core/errors.d.ts +5 -2
- package/dist/@types/core/errors.d.ts.map +1 -1
- package/dist/@types/core/events.d.ts +5 -1
- package/dist/@types/core/events.d.ts.map +1 -1
- package/dist/@types/core/transport.d.ts +2 -2
- package/dist/client/events/index.d.ts +2 -0
- package/dist/client/events/index.d.ts.map +1 -1
- package/dist/client/events/onClientBanned.d.ts +17 -0
- package/dist/client/events/onClientBanned.d.ts.map +1 -0
- package/dist/client/events/onClientDisconnected.d.ts +1 -1
- package/dist/client/events/onClientDisconnected.d.ts.map +1 -1
- package/dist/client/events/onConnectionError.d.ts +18 -0
- package/dist/client/events/onConnectionError.d.ts.map +1 -0
- package/dist/core/errors.d.ts +6 -5
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/events.d.ts.map +1 -1
- package/dist/core/transports.d.ts.map +1 -1
- package/dist/index.cjs.js +112 -18
- package/dist/index.esm.js +111 -19
- package/dist/index.umd.js +112 -18
- package/dist/post/api/createPost.d.ts +5 -1
- package/dist/post/api/createPost.d.ts.map +1 -1
- package/dist/post/api/deletePost.d.ts +3 -1
- package/dist/post/api/deletePost.d.ts.map +1 -1
- package/dist/post/api/getPost.d.ts.map +1 -1
- package/dist/post/api/queryPosts.d.ts +2 -0
- package/dist/post/api/queryPosts.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/@types/core/errors.ts +5 -1
- package/src/@types/core/events.ts +6 -1
- package/src/@types/core/transport.ts +2 -2
- package/src/client/events/index.ts +3 -0
- package/src/client/events/onClientBanned.ts +24 -0
- package/src/client/events/onClientDisconnected.ts +5 -10
- package/src/client/events/onConnectionError.ts +53 -0
- package/src/core/errors.ts +12 -5
- package/src/core/events.ts +4 -0
- package/src/core/transports.ts +0 -6
- package/src/post/api/createPost.ts +5 -1
- package/src/post/api/deletePost.ts +24 -3
- package/src/post/api/getPost.ts +17 -5
- package/src/post/api/queryPosts.ts +2 -0
|
@@ -5,6 +5,7 @@ declare global {
|
|
|
5
5
|
ERROR = "error",
|
|
6
6
|
FATAL = "fatal"
|
|
7
7
|
}
|
|
8
|
+
type ErrorCode = ServerError | ClientError;
|
|
8
9
|
const enum ServerError {
|
|
9
10
|
BAD_REQUEST = 400000,
|
|
10
11
|
UNAUTHORIZED = 400100,
|
|
@@ -13,8 +14,9 @@ declare global {
|
|
|
13
14
|
CONFLICT = 400900,
|
|
14
15
|
FORBIDDEN = 400300,
|
|
15
16
|
USER_IS_MUTED = 400302,
|
|
16
|
-
USER_IS_BANNED = 400304,
|
|
17
17
|
CHANNEL_IS_MUTED = 400303,
|
|
18
|
+
CHANNEL_BAN = 400304,
|
|
19
|
+
GLOBAL_BAN = 400312,
|
|
18
20
|
NUMBER_OF_MEMBERS_EXCEEDED = 400305,
|
|
19
21
|
MAX_REPETITION_EXCEEDED = 400307,
|
|
20
22
|
BAN_WORD_FOUND = 400308,
|
|
@@ -25,7 +27,8 @@ declare global {
|
|
|
25
27
|
UNKNOWN_ERROR = 800000,
|
|
26
28
|
INVALID_PARAMETERS = 800110,
|
|
27
29
|
QUERY_IN_PROGRESS = 800170,
|
|
28
|
-
CONNECTION_ERROR = 800210
|
|
30
|
+
CONNECTION_ERROR = 800210,
|
|
31
|
+
DISCONNECTED = 800211
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/@types/core/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA;AAET,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,WAAW,UAAU;YACnB,KAAK,UAAU;YACf,KAAK,UAAU;SAChB;QAED,WAAW,WAAW;YACpB,WAAW,SAAS;YACpB,YAAY,SAAS;YACrB,iBAAiB,SAAS;YAC1B,cAAc,SAAS;YACvB,QAAQ,SAAS;YACjB,SAAS,SAAS;YAClB,aAAa,SAAS;YACtB,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/@types/core/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA;AAET,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,WAAW,UAAU;YACnB,KAAK,UAAU;YACf,KAAK,UAAU;SAChB;QAED,KAAK,SAAS,GAAG,WAAW,GAAG,WAAW,CAAA;QAE1C,WAAW,WAAW;YACpB,WAAW,SAAS;YACpB,YAAY,SAAS;YACrB,iBAAiB,SAAS;YAC1B,cAAc,SAAS;YACvB,QAAQ,SAAS;YACjB,SAAS,SAAS;YAClB,aAAa,SAAS;YACtB,gBAAgB,SAAS;YACzB,WAAW,SAAS;YACpB,UAAU,SAAS;YACnB,0BAA0B,SAAS;YACnC,uBAAuB,SAAS;YAChC,cAAc,SAAS;YACvB,gBAAgB,SAAS;YACzB,cAAc,SAAS;SACxB;QAED,WAAW,WAAW;YACpB,aAAa,SAAS;YACtB,kBAAkB,SAAS;YAC3B,iBAAiB,SAAS;YAC1B,gBAAgB,SAAS;YACzB,YAAY,SAAS;SACtB;KACF;CACF"}
|
|
@@ -10,7 +10,11 @@ declare global {
|
|
|
10
10
|
type Unsubscriber = () => void;
|
|
11
11
|
type Subscriber<T = any> = (fn: Amity.Listener<T>) => Unsubscriber;
|
|
12
12
|
type Events = {
|
|
13
|
-
disconnected:
|
|
13
|
+
disconnected: Amity.ErrorResponse | undefined;
|
|
14
|
+
error: Amity.ErrorResponse | undefined;
|
|
15
|
+
connect_error: Amity.ErrorResponse | undefined;
|
|
16
|
+
reconnect_error: Amity.ErrorResponse | undefined;
|
|
17
|
+
reconnect_failed: Amity.ErrorResponse | undefined;
|
|
14
18
|
'v3.user.didUpdate': Amity.UserPayload;
|
|
15
19
|
'v3.channel.didCreate': Amity.ChannelPayload;
|
|
16
20
|
'v3.channel.didUpdate': Amity.ChannelPayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/@types/core/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA;AAET,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,QAAQ,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAA;QAE5C,KAAK,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAG;YACzD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,CAAA;SAChD,GAAG;aACD,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;SAC/B,CAAA,CAAA;QAED,KAAK,YAAY,GAAG,MAAM,IAAI,CAAA;QAE9B,KAAK,UAAU,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,YAAY,CAAA;QAElE,KAAK,MAAM,GAAG;YACZ,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/@types/core/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA;AAET,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,QAAQ,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAA;QAE5C,KAAK,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAG;YACzD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,CAAA;SAChD,GAAG;aACD,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;SAC/B,CAAA,CAAA;QAED,KAAK,YAAY,GAAG,MAAM,IAAI,CAAA;QAE9B,KAAK,UAAU,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,YAAY,CAAA;QAElE,KAAK,MAAM,GAAG;YACZ,YAAY,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAA;YAC7C,KAAK,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC;YACvC,aAAa,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC;YAC/C,eAAe,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC;YACjD,gBAAgB,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC;YAElD,mBAAmB,EAAE,KAAK,CAAC,WAAW,CAAA;YAEtC,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC5C,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC5C,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC5C,oBAAoB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC1C,qBAAqB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC3C,wBAAwB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC9C,2BAA2B,EAAE,KAAK,CAAC,cAAc,CAAA;YACjD,mBAAmB,EAAE,KAAK,CAAC,cAAc,CAAA;YACzC,qBAAqB,EAAE,KAAK,CAAC,cAAc,CAAA;YAE3C,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC5C,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC5C,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAA;YAE5C,2BAA2B,EAAE,KAAK,CAAC,aAAa,CAAA;YAChD,0BAA0B,EAAE,KAAK,CAAC,aAAa,CAAA;YAC/C,yBAAyB,EAAE,KAAK,CAAC,aAAa,CAAA;YAM9C,wBAAwB,EAAE,KAAK,CAAC,gBAAgB,CAAA;YAChD,wBAAwB,EAAE,KAAK,CAAC,gBAAgB,CAAA;YAChD,wBAAwB,EAAE,KAAK,CAAC,gBAAgB,CAAA;YAChD,sBAAsB,EAAE,KAAK,CAAC,gBAAgB,CAAA;YAC9C,uBAAuB,EAAE,KAAK,CAAC,gBAAgB,CAAA;YAC/C,0BAA0B,EAAE,KAAK,CAAC,gBAAgB,CAAA;YAClD,6BAA6B,EAAE,KAAK,CAAC,gBAAgB,CAAA;YAErD,mBAAmB,EAAE,KAAK,CAAC,WAAW,CAAA;YACtC,mBAAmB,EAAE,KAAK,CAAC,WAAW,CAAA;YACtC,mBAAmB,EAAE,KAAK,CAAC,WAAW,CAAA;YAEtC,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC5C,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAA;YAC5C,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAA;SAC7C,CAAA;KACF;CACF"}
|
|
@@ -7,12 +7,12 @@ declare global {
|
|
|
7
7
|
};
|
|
8
8
|
type FailResponse = {
|
|
9
9
|
status: 'fail';
|
|
10
|
-
code: Amity.
|
|
10
|
+
code: Amity.ServerError;
|
|
11
11
|
};
|
|
12
12
|
type ErrorResponse = {
|
|
13
13
|
status: 'error';
|
|
14
14
|
message: string;
|
|
15
|
-
code: Amity.
|
|
15
|
+
code: Amity.ServerError;
|
|
16
16
|
};
|
|
17
17
|
type Response<T> = (SuccessResponse<T> | FailResponse | ErrorResponse);
|
|
18
18
|
type Token = string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AAEnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { onClientBanned } from '@amityco/ts-sdk'
|
|
4
|
+
* const dispose = onClientBanned(() => {
|
|
5
|
+
* // ...
|
|
6
|
+
* })
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Fired when any {@link Amity.Client} have been banned from the platform
|
|
10
|
+
*
|
|
11
|
+
* @param callback The function to call when the event was fired
|
|
12
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
+
*
|
|
14
|
+
* @category Client Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const onClientBanned: (callback: Amity.Listener<void>) => Amity.Unsubscriber;
|
|
17
|
+
//# sourceMappingURL=onClientBanned.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onClientBanned.d.ts","sourceRoot":"","sources":["../../../src/client/events/onClientBanned.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,aACf,MAAM,QAAQ,CAAC,IAAI,CAAC,KAC7B,MAAM,YAIR,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onClientDisconnected.d.ts","sourceRoot":"","sources":["../../../src/client/events/onClientDisconnected.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onClientDisconnected.d.ts","sourceRoot":"","sources":["../../../src/client/events/onClientDisconnected.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,aACrB,MAAM,QAAQ,CAAC,IAAI,CAAC,KAC7B,MAAM,YAIR,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ASCError } from '~/core/errors';
|
|
2
|
+
/**
|
|
3
|
+
* ```js
|
|
4
|
+
* import { onConnectionError } from '@amityco/ts-sdk'
|
|
5
|
+
* const dispose = onClientBanned(() => {
|
|
6
|
+
* // ...
|
|
7
|
+
* })
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* Fired when any {@link Amity.Client} have been banned from the platform
|
|
11
|
+
*
|
|
12
|
+
* @param callback The function to call when the event was fired
|
|
13
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
14
|
+
*
|
|
15
|
+
* @category Client Events
|
|
16
|
+
*/
|
|
17
|
+
export declare const onConnectionError: (callback: Amity.Listener<ASCError>) => Amity.Unsubscriber;
|
|
18
|
+
//# sourceMappingURL=onConnectionError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onConnectionError.d.ts","sourceRoot":"","sources":["../../../src/client/events/onConnectionError.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAsB,MAAM,eAAe,CAAA;AAU5D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,aAClB,MAAM,QAAQ,CAAC,QAAQ,CAAC,KACjC,MAAM,YAqBR,CAAA"}
|
package/dist/core/errors.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @category Errors
|
|
4
4
|
*/
|
|
5
5
|
export declare class ASCError extends Error {
|
|
6
|
-
readonly code: Amity.
|
|
6
|
+
readonly code: Amity.ErrorCode;
|
|
7
7
|
readonly level: Amity.ErrorLevel;
|
|
8
8
|
readonly type: string;
|
|
9
9
|
readonly timestamp: number;
|
|
@@ -12,7 +12,7 @@ export declare class ASCError extends Error {
|
|
|
12
12
|
* @param code A normalized error code
|
|
13
13
|
* @param level A normalized failure level descriptor
|
|
14
14
|
*/
|
|
15
|
-
constructor(message: string, code: Amity.
|
|
15
|
+
constructor(message: string, code: Amity.ErrorCode, level: Amity.ErrorLevel);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* API level error
|
|
@@ -23,7 +23,7 @@ export declare class ASCApiError extends ASCError {
|
|
|
23
23
|
* @param code A normalized error code
|
|
24
24
|
* @param level A normalized failure level descriptor
|
|
25
25
|
*/
|
|
26
|
-
constructor(message: string, code: Amity.
|
|
26
|
+
constructor(message: string, code: Amity.ErrorCode, level: Amity.ErrorLevel);
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Unexpected error
|
|
@@ -34,17 +34,18 @@ export declare class ASCUnknownError extends ASCError {
|
|
|
34
34
|
* @param code A normalized error code
|
|
35
35
|
* @param level A normalized failure level descriptor
|
|
36
36
|
*/
|
|
37
|
-
constructor(code?: Amity.
|
|
37
|
+
constructor(code?: Amity.ErrorCode, level?: Amity.ErrorLevel);
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Network related error
|
|
41
41
|
* @category Errors
|
|
42
42
|
*/
|
|
43
43
|
export declare class ASCConnectionError extends ASCError {
|
|
44
|
+
readonly event: string;
|
|
44
45
|
/**
|
|
45
46
|
* @param message A custom error message
|
|
46
47
|
*/
|
|
47
|
-
constructor(message?: string);
|
|
48
|
+
constructor(event: string, message?: string);
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
51
|
* Input sanitization related error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,QAAS,SAAQ,KAAK;aAWf,IAAI,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,QAAS,SAAQ,KAAK;aAWf,IAAI,EAAE,KAAK,CAAC,SAAS;aACrB,KAAK,EAAE,KAAK,CAAC,UAAU;IAXzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAQ;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAa;IAEvC;;;;OAIG;gBAED,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,KAAK,CAAC,SAAS,EACrB,KAAK,EAAE,KAAK,CAAC,UAAU;CAO1C;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,QAAQ;IACvC;;;OAGG;gBAED,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,KAAK,CAAC,SAAS,EACrB,KAAK,EAAE,KAAK,CAAC,UAAU;CAI1B;AAED;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;IAC3C;;;OAGG;gBAED,IAAI,GAAE,KAAK,CAAC,SAA2C,EACvD,KAAK,GAAE,KAAK,CAAC,UAAmC;CAInD;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;aAK5B,KAAK,EAAE,MAAM;IAJ/B;;OAEG;gBAEe,KAAK,EAAE,MAAM,EAC7B,OAAO,GAAE,MAAiD;CAQ7D;AAED;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,QAAQ;IACpD;;OAEG;gBACS,OAAO,EAAE,MAAM;CAG5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/core/events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/core/events.ts"],"names":[],"mappings":"AA4BA,cAAc;AACd,eAAO,MAAM,kBAAkB,4CAE9B,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,OAAQ,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,MAAM,MAAM,CAAC,SAAS,CAAC,SAI5F,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,yCACxB,MAAM,MAAM,aACT,MAAM,oDAGhB,MAAM,YAiBR,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,4EAMrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transports.d.ts","sourceRoot":"","sources":["../../src/core/transports.ts"],"names":[],"mappings":";AAgCA;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,cAAc,MAAM,kCA2BnD,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,cAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"transports.d.ts","sourceRoot":"","sources":["../../src/core/transports.ts"],"names":[],"mappings":";AAgCA;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,cAAc,MAAM,kCA2BnD,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,cAAc,MAAM,0BAaxD,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,uCAWzB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,cACpB,MAAM,MAAM,SACb,MAAM,sDAgBd,CAAA"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -75,8 +75,9 @@ class ASCConnectionError extends ASCError {
|
|
|
75
75
|
/**
|
|
76
76
|
* @param message A custom error message
|
|
77
77
|
*/
|
|
78
|
-
constructor(message = 'SDK client is having connection issues') {
|
|
79
|
-
super(message
|
|
78
|
+
constructor(event, message = 'SDK client is having connection issues') {
|
|
79
|
+
super(`${message} (${event})`, event === 'disconnected' ? 800211 /* DISCONNECTED */ : 800210 /* CONNECTION_ERROR */, "error" /* ERROR */);
|
|
80
|
+
this.event = event;
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -828,11 +829,6 @@ const createWebsocketTransport = (endpoint = 'https://api.ekomedia.technology')
|
|
|
828
829
|
if (reason === 'io server disconnect')
|
|
829
830
|
socket.connect();
|
|
830
831
|
});
|
|
831
|
-
['error', 'connect_error', 'connect_timeout', 'reconnect_error', 'reconnect_failed'].forEach(event => {
|
|
832
|
-
socket.on(event, (error) => {
|
|
833
|
-
throw new ASCConnectionError(`socket.io(${event}): ${error.message}`);
|
|
834
|
-
});
|
|
835
|
-
});
|
|
836
832
|
return socket;
|
|
837
833
|
};
|
|
838
834
|
/**
|
|
@@ -889,8 +885,12 @@ const synchronousWSCall = async (client, event, data) => {
|
|
|
889
885
|
};
|
|
890
886
|
|
|
891
887
|
// need to sync up the list
|
|
892
|
-
const EVENTS = [
|
|
888
|
+
const EVENTS$1 = [
|
|
893
889
|
'disconnected',
|
|
890
|
+
'error',
|
|
891
|
+
'connect_error',
|
|
892
|
+
'reconnect_error',
|
|
893
|
+
'reconnect_failed',
|
|
894
894
|
'v3.user.didUpdate',
|
|
895
895
|
'v3.channel.didUpdate',
|
|
896
896
|
'v3.channel.didUpdate',
|
|
@@ -919,7 +919,7 @@ const createEventEmitter = () => {
|
|
|
919
919
|
* @hidden
|
|
920
920
|
*/
|
|
921
921
|
const proxyWebsocketEvents = (ws, emitter) => {
|
|
922
|
-
EVENTS.forEach(event => {
|
|
922
|
+
EVENTS$1.forEach(event => {
|
|
923
923
|
ws.on(event, (param) => emitter.emit(event, param));
|
|
924
924
|
});
|
|
925
925
|
};
|
|
@@ -1374,10 +1374,45 @@ const sortByLastCreated = ({ createdAt: a }, { createdAt: b }) => new Date(b).va
|
|
|
1374
1374
|
*/
|
|
1375
1375
|
const sortByLastActivity = ({ lastActivity: a }, { lastActivity: b }) => new Date(b).valueOf() - new Date(a).valueOf();
|
|
1376
1376
|
|
|
1377
|
+
const EVENTS = [
|
|
1378
|
+
'disconnected',
|
|
1379
|
+
'error',
|
|
1380
|
+
'connect_error',
|
|
1381
|
+
'reconnect_error',
|
|
1382
|
+
'reconnect_failed',
|
|
1383
|
+
];
|
|
1384
|
+
/**
|
|
1385
|
+
* ```js
|
|
1386
|
+
* import { onConnectionError } from '@amityco/ts-sdk'
|
|
1387
|
+
* const dispose = onClientBanned(() => {
|
|
1388
|
+
* // ...
|
|
1389
|
+
* })
|
|
1390
|
+
* ```
|
|
1391
|
+
*
|
|
1392
|
+
* Fired when any {@link Amity.Client} have been banned from the platform
|
|
1393
|
+
*
|
|
1394
|
+
* @param callback The function to call when the event was fired
|
|
1395
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
1396
|
+
*
|
|
1397
|
+
* @category Client Events
|
|
1398
|
+
*/
|
|
1399
|
+
const onConnectionError = (callback) => {
|
|
1400
|
+
const client = getActiveClient();
|
|
1401
|
+
const subscribers = EVENTS.map(event => (createEventSubscriber(client, `client/onConnectionError(${event})`, event, (response) => {
|
|
1402
|
+
const error = (response && 'code' in response)
|
|
1403
|
+
? new ASCError(response.message, response.code, "fatal" /* FATAL */)
|
|
1404
|
+
: new ASCConnectionError(event);
|
|
1405
|
+
callback(error);
|
|
1406
|
+
})));
|
|
1407
|
+
return () => {
|
|
1408
|
+
subscribers.forEach(fn => fn());
|
|
1409
|
+
};
|
|
1410
|
+
};
|
|
1411
|
+
|
|
1377
1412
|
/**
|
|
1378
1413
|
* ```js
|
|
1379
1414
|
* import { onClientDisconnected } from '@amityco/ts-sdk'
|
|
1380
|
-
* const dispose = onClientDisconnected(
|
|
1415
|
+
* const dispose = onClientDisconnected(() => {
|
|
1381
1416
|
* // ...
|
|
1382
1417
|
* })
|
|
1383
1418
|
* ```
|
|
@@ -1390,7 +1425,30 @@ const sortByLastActivity = ({ lastActivity: a }, { lastActivity: b }) => new Dat
|
|
|
1390
1425
|
* @category Client Events
|
|
1391
1426
|
*/
|
|
1392
1427
|
const onClientDisconnected = (callback) => {
|
|
1393
|
-
return
|
|
1428
|
+
return onConnectionError(({ code }) => {
|
|
1429
|
+
code === 800211 /* DISCONNECTED */ && callback();
|
|
1430
|
+
});
|
|
1431
|
+
};
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* ```js
|
|
1435
|
+
* import { onClientBanned } from '@amityco/ts-sdk'
|
|
1436
|
+
* const dispose = onClientBanned(() => {
|
|
1437
|
+
* // ...
|
|
1438
|
+
* })
|
|
1439
|
+
* ```
|
|
1440
|
+
*
|
|
1441
|
+
* Fired when any {@link Amity.Client} have been banned from the platform
|
|
1442
|
+
*
|
|
1443
|
+
* @param callback The function to call when the event was fired
|
|
1444
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
1445
|
+
*
|
|
1446
|
+
* @category Client Events
|
|
1447
|
+
*/
|
|
1448
|
+
const onClientBanned = (callback) => {
|
|
1449
|
+
return onConnectionError(({ code }) => {
|
|
1450
|
+
code === 400312 /* GLOBAL_BAN */ && callback();
|
|
1451
|
+
});
|
|
1394
1452
|
};
|
|
1395
1453
|
|
|
1396
1454
|
/**
|
|
@@ -2383,10 +2441,21 @@ getPosts.locally = (postIds) => {
|
|
|
2383
2441
|
* @async
|
|
2384
2442
|
*/
|
|
2385
2443
|
const getPost = async (postId) => {
|
|
2444
|
+
var _a;
|
|
2386
2445
|
const client = getActiveClient();
|
|
2387
2446
|
client.log('post/getPost', postId);
|
|
2388
|
-
|
|
2389
|
-
|
|
2447
|
+
let data;
|
|
2448
|
+
try {
|
|
2449
|
+
// API-FIX: endpoint should not be /list, parameters should be querystring.
|
|
2450
|
+
const response = await client.http.get(`/api/v3/posts/${postId}`);
|
|
2451
|
+
data = response.data;
|
|
2452
|
+
}
|
|
2453
|
+
catch (error) {
|
|
2454
|
+
if (((_a = error) === null || _a === void 0 ? void 0 : _a.code) === 400400 /* ITEM_NOT_FOUND */) {
|
|
2455
|
+
dropFromCache('post', { postId });
|
|
2456
|
+
}
|
|
2457
|
+
throw error;
|
|
2458
|
+
}
|
|
2390
2459
|
decoratePayload(data);
|
|
2391
2460
|
ingestInCache(data);
|
|
2392
2461
|
const { posts } = data;
|
|
@@ -2416,7 +2485,11 @@ getPost.locally = (postId) => {
|
|
|
2416
2485
|
/**
|
|
2417
2486
|
* ```js
|
|
2418
2487
|
* import { createPost } from '@amityco/ts-sdk'
|
|
2419
|
-
* const
|
|
2488
|
+
* const created = await createPost({
|
|
2489
|
+
* targetType: 'user',
|
|
2490
|
+
* targetId: 'foobar',
|
|
2491
|
+
* data: { text: 'hello world' }
|
|
2492
|
+
* }))
|
|
2420
2493
|
* ```
|
|
2421
2494
|
*
|
|
2422
2495
|
* Creates an {@link Amity.Post}
|
|
@@ -2920,13 +2993,32 @@ const removeCommunityMembersRole = async (communityId, roleId, userIds) => {
|
|
|
2920
2993
|
* @category Post API
|
|
2921
2994
|
* @async
|
|
2922
2995
|
*/
|
|
2923
|
-
const deletePost = async (postId) => {
|
|
2996
|
+
const deletePost = async (postId, permanent = false) => {
|
|
2997
|
+
var _a;
|
|
2924
2998
|
const client = getActiveClient();
|
|
2925
2999
|
client.log('post/deletePost', postId);
|
|
2926
3000
|
// API-FIX: This endpoint has not been implemented yet.
|
|
2927
|
-
await client.http.delete(`/api/
|
|
2928
|
-
|
|
2929
|
-
|
|
3001
|
+
await client.http.delete(`/api/v4/posts/${postId}`, {
|
|
3002
|
+
params: {
|
|
3003
|
+
postId,
|
|
3004
|
+
permanent,
|
|
3005
|
+
},
|
|
3006
|
+
});
|
|
3007
|
+
let deleted;
|
|
3008
|
+
try {
|
|
3009
|
+
// API-FIX: as for now we have no choice but to refetch
|
|
3010
|
+
deleted = await getPost(postId);
|
|
3011
|
+
}
|
|
3012
|
+
catch (error) {
|
|
3013
|
+
if (((_a = error) === null || _a === void 0 ? void 0 : _a.code) === 400400 /* ITEM_NOT_FOUND */) {
|
|
3014
|
+
// there is currently a limitation which doesnt allow us to fire event to tell that community
|
|
3015
|
+
// has been updated. reason is that, when the object is deleted, we don't have its `communityId`
|
|
3016
|
+
// and so we cannot refetch the community or advertise on events. hopefully this should be solved
|
|
3017
|
+
// later when realtime events covers that for us.
|
|
3018
|
+
return { success: true };
|
|
3019
|
+
}
|
|
3020
|
+
throw (error);
|
|
3021
|
+
}
|
|
2930
3022
|
if (deleted.targetType === 'community') {
|
|
2931
3023
|
const community = await getCommunity(deleted.targetId);
|
|
2932
3024
|
fireEvent('v3.community.didUpdate', { communities: [community] });
|
|
@@ -5025,6 +5117,7 @@ exports.onChannelDeleted = onChannelDeleted;
|
|
|
5025
5117
|
exports.onChannelJoined = onChannelJoined;
|
|
5026
5118
|
exports.onChannelLeft = onChannelLeft;
|
|
5027
5119
|
exports.onChannelUpdated = onChannelUpdated;
|
|
5120
|
+
exports.onClientBanned = onClientBanned;
|
|
5028
5121
|
exports.onClientDisconnected = onClientDisconnected;
|
|
5029
5122
|
exports.onCommentCreated = onCommentCreated;
|
|
5030
5123
|
exports.onCommentDeleted = onCommentDeleted;
|
|
@@ -5034,6 +5127,7 @@ exports.onCommunityDeleted = onCommunityDeleted;
|
|
|
5034
5127
|
exports.onCommunityJoined = onCommunityJoined;
|
|
5035
5128
|
exports.onCommunityLeft = onCommunityLeft;
|
|
5036
5129
|
exports.onCommunityUpdated = onCommunityUpdated;
|
|
5130
|
+
exports.onConnectionError = onConnectionError;
|
|
5037
5131
|
exports.onMemberAdded = onMemberAdded;
|
|
5038
5132
|
exports.onMemberRemoved = onMemberRemoved;
|
|
5039
5133
|
exports.onMessageCreated = onMessageCreated;
|
package/dist/index.esm.js
CHANGED
|
@@ -61,8 +61,9 @@ class ASCConnectionError extends ASCError {
|
|
|
61
61
|
/**
|
|
62
62
|
* @param message A custom error message
|
|
63
63
|
*/
|
|
64
|
-
constructor(message = 'SDK client is having connection issues') {
|
|
65
|
-
super(message
|
|
64
|
+
constructor(event, message = 'SDK client is having connection issues') {
|
|
65
|
+
super(`${message} (${event})`, event === 'disconnected' ? 800211 /* DISCONNECTED */ : 800210 /* CONNECTION_ERROR */, "error" /* ERROR */);
|
|
66
|
+
this.event = event;
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -814,11 +815,6 @@ const createWebsocketTransport = (endpoint = 'https://api.ekomedia.technology')
|
|
|
814
815
|
if (reason === 'io server disconnect')
|
|
815
816
|
socket.connect();
|
|
816
817
|
});
|
|
817
|
-
['error', 'connect_error', 'connect_timeout', 'reconnect_error', 'reconnect_failed'].forEach(event => {
|
|
818
|
-
socket.on(event, (error) => {
|
|
819
|
-
throw new ASCConnectionError(`socket.io(${event}): ${error.message}`);
|
|
820
|
-
});
|
|
821
|
-
});
|
|
822
818
|
return socket;
|
|
823
819
|
};
|
|
824
820
|
/**
|
|
@@ -875,8 +871,12 @@ const synchronousWSCall = async (client, event, data) => {
|
|
|
875
871
|
};
|
|
876
872
|
|
|
877
873
|
// need to sync up the list
|
|
878
|
-
const EVENTS = [
|
|
874
|
+
const EVENTS$1 = [
|
|
879
875
|
'disconnected',
|
|
876
|
+
'error',
|
|
877
|
+
'connect_error',
|
|
878
|
+
'reconnect_error',
|
|
879
|
+
'reconnect_failed',
|
|
880
880
|
'v3.user.didUpdate',
|
|
881
881
|
'v3.channel.didUpdate',
|
|
882
882
|
'v3.channel.didUpdate',
|
|
@@ -905,7 +905,7 @@ const createEventEmitter = () => {
|
|
|
905
905
|
* @hidden
|
|
906
906
|
*/
|
|
907
907
|
const proxyWebsocketEvents = (ws, emitter) => {
|
|
908
|
-
EVENTS.forEach(event => {
|
|
908
|
+
EVENTS$1.forEach(event => {
|
|
909
909
|
ws.on(event, (param) => emitter.emit(event, param));
|
|
910
910
|
});
|
|
911
911
|
};
|
|
@@ -1360,10 +1360,45 @@ const sortByLastCreated = ({ createdAt: a }, { createdAt: b }) => new Date(b).va
|
|
|
1360
1360
|
*/
|
|
1361
1361
|
const sortByLastActivity = ({ lastActivity: a }, { lastActivity: b }) => new Date(b).valueOf() - new Date(a).valueOf();
|
|
1362
1362
|
|
|
1363
|
+
const EVENTS = [
|
|
1364
|
+
'disconnected',
|
|
1365
|
+
'error',
|
|
1366
|
+
'connect_error',
|
|
1367
|
+
'reconnect_error',
|
|
1368
|
+
'reconnect_failed',
|
|
1369
|
+
];
|
|
1370
|
+
/**
|
|
1371
|
+
* ```js
|
|
1372
|
+
* import { onConnectionError } from '@amityco/ts-sdk'
|
|
1373
|
+
* const dispose = onClientBanned(() => {
|
|
1374
|
+
* // ...
|
|
1375
|
+
* })
|
|
1376
|
+
* ```
|
|
1377
|
+
*
|
|
1378
|
+
* Fired when any {@link Amity.Client} have been banned from the platform
|
|
1379
|
+
*
|
|
1380
|
+
* @param callback The function to call when the event was fired
|
|
1381
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
1382
|
+
*
|
|
1383
|
+
* @category Client Events
|
|
1384
|
+
*/
|
|
1385
|
+
const onConnectionError = (callback) => {
|
|
1386
|
+
const client = getActiveClient();
|
|
1387
|
+
const subscribers = EVENTS.map(event => (createEventSubscriber(client, `client/onConnectionError(${event})`, event, (response) => {
|
|
1388
|
+
const error = (response && 'code' in response)
|
|
1389
|
+
? new ASCError(response.message, response.code, "fatal" /* FATAL */)
|
|
1390
|
+
: new ASCConnectionError(event);
|
|
1391
|
+
callback(error);
|
|
1392
|
+
})));
|
|
1393
|
+
return () => {
|
|
1394
|
+
subscribers.forEach(fn => fn());
|
|
1395
|
+
};
|
|
1396
|
+
};
|
|
1397
|
+
|
|
1363
1398
|
/**
|
|
1364
1399
|
* ```js
|
|
1365
1400
|
* import { onClientDisconnected } from '@amityco/ts-sdk'
|
|
1366
|
-
* const dispose = onClientDisconnected(
|
|
1401
|
+
* const dispose = onClientDisconnected(() => {
|
|
1367
1402
|
* // ...
|
|
1368
1403
|
* })
|
|
1369
1404
|
* ```
|
|
@@ -1376,7 +1411,30 @@ const sortByLastActivity = ({ lastActivity: a }, { lastActivity: b }) => new Dat
|
|
|
1376
1411
|
* @category Client Events
|
|
1377
1412
|
*/
|
|
1378
1413
|
const onClientDisconnected = (callback) => {
|
|
1379
|
-
return
|
|
1414
|
+
return onConnectionError(({ code }) => {
|
|
1415
|
+
code === 800211 /* DISCONNECTED */ && callback();
|
|
1416
|
+
});
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* ```js
|
|
1421
|
+
* import { onClientBanned } from '@amityco/ts-sdk'
|
|
1422
|
+
* const dispose = onClientBanned(() => {
|
|
1423
|
+
* // ...
|
|
1424
|
+
* })
|
|
1425
|
+
* ```
|
|
1426
|
+
*
|
|
1427
|
+
* Fired when any {@link Amity.Client} have been banned from the platform
|
|
1428
|
+
*
|
|
1429
|
+
* @param callback The function to call when the event was fired
|
|
1430
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
1431
|
+
*
|
|
1432
|
+
* @category Client Events
|
|
1433
|
+
*/
|
|
1434
|
+
const onClientBanned = (callback) => {
|
|
1435
|
+
return onConnectionError(({ code }) => {
|
|
1436
|
+
code === 400312 /* GLOBAL_BAN */ && callback();
|
|
1437
|
+
});
|
|
1380
1438
|
};
|
|
1381
1439
|
|
|
1382
1440
|
/**
|
|
@@ -2369,10 +2427,21 @@ getPosts.locally = (postIds) => {
|
|
|
2369
2427
|
* @async
|
|
2370
2428
|
*/
|
|
2371
2429
|
const getPost = async (postId) => {
|
|
2430
|
+
var _a;
|
|
2372
2431
|
const client = getActiveClient();
|
|
2373
2432
|
client.log('post/getPost', postId);
|
|
2374
|
-
|
|
2375
|
-
|
|
2433
|
+
let data;
|
|
2434
|
+
try {
|
|
2435
|
+
// API-FIX: endpoint should not be /list, parameters should be querystring.
|
|
2436
|
+
const response = await client.http.get(`/api/v3/posts/${postId}`);
|
|
2437
|
+
data = response.data;
|
|
2438
|
+
}
|
|
2439
|
+
catch (error) {
|
|
2440
|
+
if (((_a = error) === null || _a === void 0 ? void 0 : _a.code) === 400400 /* ITEM_NOT_FOUND */) {
|
|
2441
|
+
dropFromCache('post', { postId });
|
|
2442
|
+
}
|
|
2443
|
+
throw error;
|
|
2444
|
+
}
|
|
2376
2445
|
decoratePayload(data);
|
|
2377
2446
|
ingestInCache(data);
|
|
2378
2447
|
const { posts } = data;
|
|
@@ -2402,7 +2471,11 @@ getPost.locally = (postId) => {
|
|
|
2402
2471
|
/**
|
|
2403
2472
|
* ```js
|
|
2404
2473
|
* import { createPost } from '@amityco/ts-sdk'
|
|
2405
|
-
* const
|
|
2474
|
+
* const created = await createPost({
|
|
2475
|
+
* targetType: 'user',
|
|
2476
|
+
* targetId: 'foobar',
|
|
2477
|
+
* data: { text: 'hello world' }
|
|
2478
|
+
* }))
|
|
2406
2479
|
* ```
|
|
2407
2480
|
*
|
|
2408
2481
|
* Creates an {@link Amity.Post}
|
|
@@ -2906,13 +2979,32 @@ const removeCommunityMembersRole = async (communityId, roleId, userIds) => {
|
|
|
2906
2979
|
* @category Post API
|
|
2907
2980
|
* @async
|
|
2908
2981
|
*/
|
|
2909
|
-
const deletePost = async (postId) => {
|
|
2982
|
+
const deletePost = async (postId, permanent = false) => {
|
|
2983
|
+
var _a;
|
|
2910
2984
|
const client = getActiveClient();
|
|
2911
2985
|
client.log('post/deletePost', postId);
|
|
2912
2986
|
// API-FIX: This endpoint has not been implemented yet.
|
|
2913
|
-
await client.http.delete(`/api/
|
|
2914
|
-
|
|
2915
|
-
|
|
2987
|
+
await client.http.delete(`/api/v4/posts/${postId}`, {
|
|
2988
|
+
params: {
|
|
2989
|
+
postId,
|
|
2990
|
+
permanent,
|
|
2991
|
+
},
|
|
2992
|
+
});
|
|
2993
|
+
let deleted;
|
|
2994
|
+
try {
|
|
2995
|
+
// API-FIX: as for now we have no choice but to refetch
|
|
2996
|
+
deleted = await getPost(postId);
|
|
2997
|
+
}
|
|
2998
|
+
catch (error) {
|
|
2999
|
+
if (((_a = error) === null || _a === void 0 ? void 0 : _a.code) === 400400 /* ITEM_NOT_FOUND */) {
|
|
3000
|
+
// there is currently a limitation which doesnt allow us to fire event to tell that community
|
|
3001
|
+
// has been updated. reason is that, when the object is deleted, we don't have its `communityId`
|
|
3002
|
+
// and so we cannot refetch the community or advertise on events. hopefully this should be solved
|
|
3003
|
+
// later when realtime events covers that for us.
|
|
3004
|
+
return { success: true };
|
|
3005
|
+
}
|
|
3006
|
+
throw (error);
|
|
3007
|
+
}
|
|
2916
3008
|
if (deleted.targetType === 'community') {
|
|
2917
3009
|
const community = await getCommunity(deleted.targetId);
|
|
2918
3010
|
fireEvent('v3.community.didUpdate', { communities: [community] });
|
|
@@ -4925,4 +5017,4 @@ const disposeStream = async (streamId) => {
|
|
|
4925
5017
|
return videoStreamings.find(stream => stream.streamId === streamId);
|
|
4926
5018
|
};
|
|
4927
5019
|
|
|
4928
|
-
export { addChannelMembers, addChannelMembersRole, addCommunityMembers, addCommunityMembersRole, addReaction, clearCache, connectClient, createCache, createChannel, createClient, createComment, createCommunity, createFile, createMessage, createPost, createQuery, createReport, createStream, decorateModel, decorateModels, decoratePayload, deleteChannel, deleteComment, deleteCommunity, deleteFile, deleteMessage, deletePost, deleteReport, deleteStream, disconnectClient, disposeStream, dropFromCache, enableCache, fileUrlWithSize, filterByPropEquality, getActiveClient, getChannel, getChannels, getComment, getComments, getCommunities, getCommunity, getFile, getMessage, getMessages, getPost, getPosts, getRole, getStream, getUser, getUsers, ingestInCache, isAfterBefore, isConnected, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkipLimit, isSyncable, isSynced, joinChannel, joinCommunity, leaveChannel, leaveCommunity, memoryStore, memoryStores, mergeInCache, mutateCache, observeChannel, observeComment, observeComments, observeCommunity, observeFile, observeMessage, observeMessages, observePost, observePosts, observeUser, onChannelDeleted, onChannelJoined, onChannelLeft, onChannelUpdated, onClientDisconnected, onCommentCreated, onCommentDeleted, onCommentUpdated, onCommunityCreated, onCommunityDeleted, onCommunityJoined, onCommunityLeft, onCommunityUpdated, onMemberAdded, onMemberRemoved, onMessageCreated, onMessageDeleted, onMessageUpdated, onPostCreated, onPostDeleted, onPostUpdated, onReactionRemoved, onUserUpdated, persistentStore, pullFromCache, pushToCache, queryChannelMembers, queryChannels, queryComments, queryCommunities, queryCommunityMembers, queryGlobalFeed, queryMessages, queryOptions, queryPosts, queryRoles, queryStreams, queryUsers, removeChannelMembers, removeChannelMembersRole, removeCommunityMembers, removeCommunityMembersRole, removeReaction, runQuery, sliceByPaging, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByLastActivity, sortByLastCreated, sortBySegmentNumber, syncInCache, toPage, toToken, updateChannel, updateComment, updateCommunity, updateMessage, updatePost, updateStream, updateUser };
|
|
5020
|
+
export { addChannelMembers, addChannelMembersRole, addCommunityMembers, addCommunityMembersRole, addReaction, clearCache, connectClient, createCache, createChannel, createClient, createComment, createCommunity, createFile, createMessage, createPost, createQuery, createReport, createStream, decorateModel, decorateModels, decoratePayload, deleteChannel, deleteComment, deleteCommunity, deleteFile, deleteMessage, deletePost, deleteReport, deleteStream, disconnectClient, disposeStream, dropFromCache, enableCache, fileUrlWithSize, filterByPropEquality, getActiveClient, getChannel, getChannels, getComment, getComments, getCommunities, getCommunity, getFile, getMessage, getMessages, getPost, getPosts, getRole, getStream, getUser, getUsers, ingestInCache, isAfterBefore, isConnected, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkipLimit, isSyncable, isSynced, joinChannel, joinCommunity, leaveChannel, leaveCommunity, memoryStore, memoryStores, mergeInCache, mutateCache, observeChannel, observeComment, observeComments, observeCommunity, observeFile, observeMessage, observeMessages, observePost, observePosts, observeUser, onChannelDeleted, onChannelJoined, onChannelLeft, onChannelUpdated, onClientBanned, onClientDisconnected, onCommentCreated, onCommentDeleted, onCommentUpdated, onCommunityCreated, onCommunityDeleted, onCommunityJoined, onCommunityLeft, onCommunityUpdated, onConnectionError, onMemberAdded, onMemberRemoved, onMessageCreated, onMessageDeleted, onMessageUpdated, onPostCreated, onPostDeleted, onPostUpdated, onReactionRemoved, onUserUpdated, persistentStore, pullFromCache, pushToCache, queryChannelMembers, queryChannels, queryComments, queryCommunities, queryCommunityMembers, queryGlobalFeed, queryMessages, queryOptions, queryPosts, queryRoles, queryStreams, queryUsers, removeChannelMembers, removeChannelMembersRole, removeCommunityMembers, removeCommunityMembersRole, removeReaction, runQuery, sliceByPaging, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByLastActivity, sortByLastCreated, sortBySegmentNumber, syncInCache, toPage, toToken, updateChannel, updateComment, updateCommunity, updateMessage, updatePost, updateStream, updateUser };
|