@amityco/ts-sdk-react-native 7.24.1-c018455.0 → 7.25.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/events.d.ts +2 -2
- package/dist/@types/core/events.d.ts.map +1 -1
- package/dist/@types/domains/event.d.ts +1 -0
- package/dist/@types/domains/event.d.ts.map +1 -1
- package/dist/@types/domains/room.d.ts +2 -0
- package/dist/@types/domains/room.d.ts.map +1 -1
- package/dist/@types/domains/user.d.ts +12 -0
- package/dist/@types/domains/user.d.ts.map +1 -1
- package/dist/core/transports/mqtt.d.ts +1 -1
- package/dist/core/transports/mqtt.d.ts.map +1 -1
- package/dist/index.cjs.js +91 -2605
- package/dist/index.esm.js +90 -18696
- package/dist/index.umd.js +1 -5
- package/dist/report/api/createReport.d.ts +7 -1
- package/dist/report/api/createReport.d.ts.map +1 -1
- package/dist/roomRepository/events/onRoomParticipantLeft.d.ts.map +1 -1
- package/dist/roomRepository/events/onRoomParticipantRemoved.d.ts.map +1 -1
- package/dist/userRepository/api/flagUser.d.ts +11 -3
- package/dist/userRepository/api/flagUser.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -2,14 +2,20 @@
|
|
|
2
2
|
* ```js
|
|
3
3
|
* import { createReport } from '@amityco/ts-sdk-react-native'
|
|
4
4
|
* const flagged = await createReport('post', postId)
|
|
5
|
+
* const flaggedUser = await createReport('user', userId, {
|
|
6
|
+
* reportType: 'behavior',
|
|
7
|
+
* reason: 'Harassment or bullying',
|
|
8
|
+
* })
|
|
5
9
|
* ```
|
|
6
10
|
*
|
|
7
11
|
* @param referenceType The type of thing to add a report to, such as a post or a comment.
|
|
8
12
|
* @param referenceId The ID of the thing to add a new report to.
|
|
13
|
+
* @param options Optional report metadata. Only honored when `referenceType === 'user'`.
|
|
14
|
+
* See `UserRepository.flagUser` for the accepted shape and validation rules.
|
|
9
15
|
* @returns the created report result
|
|
10
16
|
*
|
|
11
17
|
* @category Report API
|
|
12
18
|
* @async
|
|
13
19
|
* */
|
|
14
|
-
export declare const createReport: (referenceType: 'post' | 'comment' | 'message' | 'user', referenceId: string) => Promise<boolean>;
|
|
20
|
+
export declare const createReport: (referenceType: 'post' | 'comment' | 'message' | 'user', referenceId: string, options?: Amity.UserReportOptions) => Promise<boolean>;
|
|
15
21
|
//# sourceMappingURL=createReport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReport.d.ts","sourceRoot":"","sources":["../../../src/report/api/createReport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createReport.d.ts","sourceRoot":"","sources":["../../../src/report/api/createReport.ts"],"names":[],"mappings":"AAgFA;;;;;;;;;;;;;;;;;;KAkBK;AACL,eAAO,MAAM,YAAY,kBACR,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,eACzC,MAAM,YACT,MAAM,iBAAiB,KAChC,QAAQ,OAAO,CAqBjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onRoomParticipantLeft.d.ts","sourceRoot":"","sources":["../../../src/roomRepository/events/onRoomParticipantLeft.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,aACtB,MAAM,QAAQ,CAAC,MAAM,WAAW,CAAC,KAC1C,MAAM,
|
|
1
|
+
{"version":3,"file":"onRoomParticipantLeft.d.ts","sourceRoot":"","sources":["../../../src/roomRepository/events/onRoomParticipantLeft.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,aACtB,MAAM,QAAQ,CAAC,MAAM,WAAW,CAAC,KAC1C,MAAM,YAoBR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onRoomParticipantRemoved.d.ts","sourceRoot":"","sources":["../../../src/roomRepository/events/onRoomParticipantRemoved.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,aACzB,MAAM,QAAQ,CAAC,MAAM,WAAW,CAAC,KAC1C,MAAM,
|
|
1
|
+
{"version":3,"file":"onRoomParticipantRemoved.d.ts","sourceRoot":"","sources":["../../../src/roomRepository/events/onRoomParticipantRemoved.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,aACzB,MAAM,QAAQ,CAAC,MAAM,WAAW,CAAC,KAC1C,MAAM,YAoBR,CAAC"}
|
|
@@ -2,13 +2,21 @@
|
|
|
2
2
|
* ```js
|
|
3
3
|
* import { UserRepository } from '@amityco/ts-sdk-react-native'
|
|
4
4
|
* const flagged = await UserRepository.flagUser('userId')
|
|
5
|
+
* const flaggedBehavior = await UserRepository.flagUser('userId', {
|
|
6
|
+
* reportType: 'behavior',
|
|
7
|
+
* reason: 'Harassment or bullying',
|
|
8
|
+
* comment: 'optional free-text',
|
|
9
|
+
* })
|
|
5
10
|
* ```
|
|
6
11
|
*
|
|
7
|
-
* @param userId The ID of the user to
|
|
8
|
-
* @
|
|
12
|
+
* @param userId The ID of the user to be flagged
|
|
13
|
+
* @param options Optional report metadata forwarded to the server as the request
|
|
14
|
+
* body: `reportType`, `reason`, `comment`. Only non-null fields are included.
|
|
15
|
+
* All validation is server-side; a bodyless call produces a typeless report.
|
|
16
|
+
* @returns the flagged {@link Amity.User}
|
|
9
17
|
*
|
|
10
18
|
* @category User API
|
|
11
19
|
* @async
|
|
12
20
|
* */
|
|
13
|
-
export declare const flagUser: (userId: Amity.User['userId']) => Promise<
|
|
21
|
+
export declare const flagUser: (userId: Amity.User['userId'], options?: Amity.UserReportOptions) => Promise<Amity.User>;
|
|
14
22
|
//# sourceMappingURL=flagUser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flagUser.d.ts","sourceRoot":"","sources":["../../../src/userRepository/api/flagUser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flagUser.d.ts","sourceRoot":"","sources":["../../../src/userRepository/api/flagUser.ts"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;KAmBK;AACL,eAAO,MAAM,QAAQ,WACX,MAAM,IAAI,CAAC,QAAQ,CAAC,YAClB,MAAM,iBAAiB,KAChC,QAAQ,MAAM,IAAI,CAoBpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amityco/ts-sdk-react-native",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.25.0",
|
|
4
4
|
"license": "CC-BY-ND-4.0",
|
|
5
5
|
"author": "amity.co <developers@amity.co> (https://amity.co)",
|
|
6
6
|
"description": "Amity Social Cloud Typescript SDK",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"jwt-decode": "^3.1.2",
|
|
84
84
|
"mime": "3.0.0",
|
|
85
85
|
"mitt": "^3.0.0",
|
|
86
|
-
"mqtt": "^
|
|
86
|
+
"mqtt": "^5.15.2",
|
|
87
87
|
"object-hash": "^3.0.0",
|
|
88
88
|
"react-native-uuid": "^2.0.1",
|
|
89
89
|
"ts-jest": "^28.0.3"
|