@amityco/ts-sdk 7.27.2-fbc08952.0 → 7.28.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 +1 -2
- package/dist/@types/core/errors.d.ts.map +1 -1
- package/dist/@types/core/transport.d.ts +0 -1
- package/dist/@types/core/transport.d.ts.map +1 -1
- package/dist/@types/domains/client.d.ts +0 -86
- package/dist/@types/domains/client.d.ts.map +1 -1
- package/dist/@types/domains/content.d.ts +0 -11
- package/dist/@types/domains/content.d.ts.map +1 -1
- package/dist/@types/domains/user.d.ts +0 -31
- package/dist/@types/domains/user.d.ts.map +1 -1
- package/dist/client/api/createClient.d.ts.map +1 -1
- package/dist/client/api/index.d.ts +0 -1
- package/dist/client/api/index.d.ts.map +1 -1
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/commentRepository/api/flagComment.d.ts +5 -72
- package/dist/commentRepository/api/flagComment.d.ts.map +1 -1
- package/dist/core/errors.d.ts +0 -20
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/transports/utils.d.ts.map +1 -1
- package/dist/index.cjs.js +54 -666
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +55 -665
- package/dist/index.umd.js +2 -2
- package/dist/messageRepository/api/flagMessage.d.ts +6 -73
- package/dist/messageRepository/api/flagMessage.d.ts.map +1 -1
- package/dist/postRepository/api/flagPost.d.ts +6 -73
- package/dist/postRepository/api/flagPost.d.ts.map +1 -1
- package/dist/userRepository/api/flagUser.d.ts +9 -50
- package/dist/userRepository/api/flagUser.d.ts.map +1 -1
- package/dist/userRepository/api/index.d.ts +0 -2
- package/dist/userRepository/api/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/client/api/getModuleSettings.d.ts +0 -25
- package/dist/client/api/getModuleSettings.d.ts.map +0 -1
- package/dist/client/api/tests/integration/moduleSettings.integration.test.d.ts +0 -2
- package/dist/client/api/tests/integration/moduleSettings.integration.test.d.ts.map +0 -1
- package/dist/client/utils/parseModuleSettings.d.ts +0 -9
- package/dist/client/utils/parseModuleSettings.d.ts.map +0 -1
- package/dist/client/utils/resolveModuleAvailability.d.ts +0 -39
- package/dist/client/utils/resolveModuleAvailability.d.ts.map +0 -1
- package/dist/client/utils/tests/resolveModuleAvailability.test.d.ts +0 -2
- package/dist/client/utils/tests/resolveModuleAvailability.test.d.ts.map +0 -1
- package/dist/commentRepository/api/flagCommentWithOptions.d.ts +0 -13
- package/dist/commentRepository/api/flagCommentWithOptions.d.ts.map +0 -1
- package/dist/commentRepository/api/flagCommentWithReasonString.d.ts +0 -16
- package/dist/commentRepository/api/flagCommentWithReasonString.d.ts.map +0 -1
- package/dist/commentRepository/api/tests/integration/flagCommentWithOptions.integration.test.d.ts +0 -2
- package/dist/commentRepository/api/tests/integration/flagCommentWithOptions.integration.test.d.ts.map +0 -1
- package/dist/commentRepository/api/tests/integration/flagCommentWithReasonString.integration.test.d.ts +0 -2
- package/dist/commentRepository/api/tests/integration/flagCommentWithReasonString.integration.test.d.ts.map +0 -1
- package/dist/core/transports/tests/moduleNotEntitled.test.d.ts +0 -2
- package/dist/core/transports/tests/moduleNotEntitled.test.d.ts.map +0 -1
- package/dist/messageRepository/api/flagMessageWithOptions.d.ts +0 -13
- package/dist/messageRepository/api/flagMessageWithOptions.d.ts.map +0 -1
- package/dist/messageRepository/api/flagMessageWithReasonString.d.ts +0 -17
- package/dist/messageRepository/api/flagMessageWithReasonString.d.ts.map +0 -1
- package/dist/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.d.ts +0 -2
- package/dist/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.d.ts.map +0 -1
- package/dist/messageRepository/api/tests/integration/flagMessageWithOptions.integration.test.d.ts +0 -2
- package/dist/messageRepository/api/tests/integration/flagMessageWithOptions.integration.test.d.ts.map +0 -1
- package/dist/messageRepository/api/tests/integration/flagMessageWithReasonString.integration.test.d.ts +0 -2
- package/dist/messageRepository/api/tests/integration/flagMessageWithReasonString.integration.test.d.ts.map +0 -1
- package/dist/postRepository/api/flagPostWithOptions.d.ts +0 -13
- package/dist/postRepository/api/flagPostWithOptions.d.ts.map +0 -1
- package/dist/postRepository/api/flagPostWithReasonString.d.ts +0 -16
- package/dist/postRepository/api/flagPostWithReasonString.d.ts.map +0 -1
- package/dist/postRepository/api/tests/integration/flagPost.overloads.integration.test.d.ts +0 -2
- package/dist/postRepository/api/tests/integration/flagPost.overloads.integration.test.d.ts.map +0 -1
- package/dist/postRepository/api/tests/integration/flagPostWithOptions.integration.test.d.ts +0 -2
- package/dist/postRepository/api/tests/integration/flagPostWithOptions.integration.test.d.ts.map +0 -1
- package/dist/postRepository/api/tests/integration/flagPostWithReasonString.integration.test.d.ts +0 -2
- package/dist/postRepository/api/tests/integration/flagPostWithReasonString.integration.test.d.ts.map +0 -1
- package/dist/userRepository/api/flagUserBehavior.d.ts +0 -29
- package/dist/userRepository/api/flagUserBehavior.d.ts.map +0 -1
- package/dist/userRepository/api/flagUserProfile.d.ts +0 -29
- package/dist/userRepository/api/flagUserProfile.d.ts.map +0 -1
- package/dist/userRepository/api/tests/integration/flagUser.overloads.integration.test.d.ts +0 -2
- package/dist/userRepository/api/tests/integration/flagUser.overloads.integration.test.d.ts.map +0 -1
- package/dist/userRepository/api/tests/integration/flagUserBehavior.integration.test.d.ts +0 -2
- package/dist/userRepository/api/tests/integration/flagUserBehavior.integration.test.d.ts.map +0 -1
- package/dist/userRepository/api/tests/integration/flagUserProfile.integration.test.d.ts +0 -2
- package/dist/userRepository/api/tests/integration/flagUserProfile.integration.test.d.ts.map +0 -1
- package/dist/userRepository/utils/submitUserReport.d.ts +0 -10
- package/dist/userRepository/utils/submitUserReport.d.ts.map +0 -1
- package/dist/userRepository/utils/userReport.d.ts +0 -35
- package/dist/userRepository/utils/userReport.d.ts.map +0 -1
- package/dist/utils/contentFlag.d.ts +0 -28
- package/dist/utils/contentFlag.d.ts.map +0 -1
|
@@ -1,82 +1,15 @@
|
|
|
1
|
-
declare type FlagMessage = {
|
|
2
|
-
/**
|
|
3
|
-
* ```js
|
|
4
|
-
* import { MessageRepository } from '@amityco/ts-sdk'
|
|
5
|
-
* const flagged = await MessageRepository.flagMessage(messageId)
|
|
6
|
-
* ```
|
|
7
|
-
*
|
|
8
|
-
* Flags a message without a reason. The report is sent as `Others`; no detail is serialized.
|
|
9
|
-
*
|
|
10
|
-
* @param messageId The ID of the message to flag
|
|
11
|
-
* @returns `true` when the report was created
|
|
12
|
-
*/
|
|
13
|
-
(messageId: Amity.Message['messageId'], reason?: undefined): Promise<boolean>;
|
|
14
|
-
/**
|
|
15
|
-
* ```js
|
|
16
|
-
* import { MessageRepository, ContentFlagReasonEnum } from '@amityco/ts-sdk'
|
|
17
|
-
* const flagged = await MessageRepository.flagMessage(messageId, {
|
|
18
|
-
* reason: ContentFlagReasonEnum.SpamOrScams,
|
|
19
|
-
* detail: 'Repeated promotional links',
|
|
20
|
-
* })
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* Flags a message with a category and optional reporter context. Any category,
|
|
24
|
-
* including `Others`, may carry a `detail`. `detail` is sent unchanged and omitted
|
|
25
|
-
* when not supplied; the backend enforces its 300-character limit.
|
|
26
|
-
*
|
|
27
|
-
* @param messageId The ID of the message to flag
|
|
28
|
-
* @param options `reason` is a `ContentFlagReasonEnum` value; `detail` is optional free text
|
|
29
|
-
* @returns `true` when the report was created
|
|
30
|
-
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
|
|
31
|
-
*/
|
|
32
|
-
(messageId: Amity.Message['messageId'], options: Amity.ContentFlagOptions): Promise<boolean>;
|
|
33
|
-
/**
|
|
34
|
-
* ```js
|
|
35
|
-
* import { MessageRepository } from '@amityco/ts-sdk'
|
|
36
|
-
* const flagged = await MessageRepository.flagMessage(messageId, reason)
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @deprecated Pass an options object instead: `flagMessage(messageId, { reason, detail })`.
|
|
40
|
-
* A predefined string maps to `{ reason: <value>, detail: '' }`; a custom string maps to
|
|
41
|
-
* `{ reason: 'Others', detail: <string> }`. Migrate a custom string to
|
|
42
|
-
* `{ reason: ContentFlagReasonEnum.Others, detail: customString }`. This mapping is
|
|
43
|
-
* unchanged and stays available throughout the current major version.
|
|
44
|
-
*
|
|
45
|
-
* @param messageId The ID of the message to flag
|
|
46
|
-
* @param reason a predefined `ContentFlagReasonEnum` value or a custom string
|
|
47
|
-
* @returns `true` when the report was created
|
|
48
|
-
*/
|
|
49
|
-
(messageId: Amity.Message['messageId'], reason?: Amity.ContentFlagReason): Promise<boolean>;
|
|
50
|
-
};
|
|
51
1
|
/**
|
|
52
2
|
* ```js
|
|
53
|
-
* import { MessageRepository
|
|
54
|
-
*
|
|
55
|
-
* // No reason.
|
|
56
|
-
* await MessageRepository.flagMessage(messageId)
|
|
57
|
-
*
|
|
58
|
-
* // Category plus optional reporter context (any category, including Others).
|
|
59
|
-
* await MessageRepository.flagMessage(messageId, {
|
|
60
|
-
* reason: ContentFlagReasonEnum.SpamOrScams,
|
|
61
|
-
* detail: 'Repeated promotional links',
|
|
62
|
-
* })
|
|
3
|
+
* import { MessageRepository } from '@amityco/ts-sdk'
|
|
4
|
+
* const flagged = await MessageRepository.flagMessage(messageId, reason)
|
|
63
5
|
* ```
|
|
64
6
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* so the legacy path is untouched by the new contract:
|
|
69
|
-
*
|
|
70
|
-
* - `undefined` or a string → `flagMessageWithReasonString` (unchanged legacy mapping)
|
|
71
|
-
* - anything else → `flagMessageWithOptions` (validated `{ reason, detail? }`)
|
|
72
|
-
*
|
|
73
|
-
* @param messageId The ID of the message to flag
|
|
74
|
-
* @param input an options object `{ reason, detail? }`, a legacy reason string, or nothing
|
|
75
|
-
* @returns `true` when the report was created
|
|
7
|
+
* @param messageId of the message to flag
|
|
8
|
+
* @param reason the reason to flag the message
|
|
9
|
+
* @returns the created report result
|
|
76
10
|
*
|
|
77
11
|
* @category Message API
|
|
78
12
|
* @async
|
|
79
13
|
* */
|
|
80
|
-
export declare const flagMessage:
|
|
81
|
-
export {};
|
|
14
|
+
export declare const flagMessage: (messageId: Amity.Message['messageId'], reason?: Amity.ContentFlagReason) => Promise<boolean>;
|
|
82
15
|
//# sourceMappingURL=flagMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flagMessage.d.ts","sourceRoot":"","sources":["../../../src/messageRepository/api/flagMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flagMessage.d.ts","sourceRoot":"","sources":["../../../src/messageRepository/api/flagMessage.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;KAYK;AACL,eAAO,MAAM,WAAW,cACX,MAAM,OAAO,CAAC,WAAW,CAAC,WAC5B,MAAM,iBAAiB,KAC/B,QAAQ,OAAO,CA4BjB,CAAC"}
|
|
@@ -1,82 +1,15 @@
|
|
|
1
|
-
declare type FlagPost = {
|
|
2
|
-
/**
|
|
3
|
-
* ```js
|
|
4
|
-
* import { PostRepository } from '@amityco/ts-sdk'
|
|
5
|
-
* const flagged = await PostRepository.flagPost(postId)
|
|
6
|
-
* ```
|
|
7
|
-
*
|
|
8
|
-
* Flags a post without a reason. The report is sent as `Others` with an empty detail.
|
|
9
|
-
*
|
|
10
|
-
* @param postId The ID of the post to flag
|
|
11
|
-
* @returns `true` when the report was created
|
|
12
|
-
*/
|
|
13
|
-
(postId: Amity.Post['postId'], reason?: undefined): Promise<boolean>;
|
|
14
|
-
/**
|
|
15
|
-
* ```js
|
|
16
|
-
* import { PostRepository, ContentFlagReasonEnum } from '@amityco/ts-sdk'
|
|
17
|
-
* const flagged = await PostRepository.flagPost(postId, {
|
|
18
|
-
* reason: ContentFlagReasonEnum.SpamOrScams,
|
|
19
|
-
* detail: 'Repeated promotional links',
|
|
20
|
-
* })
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* Flags a post with a category and optional reporter context. Any category,
|
|
24
|
-
* including `Others`, may carry a `detail`. `detail` is sent unchanged and omitted
|
|
25
|
-
* when not supplied; the backend enforces its 300-character limit.
|
|
26
|
-
*
|
|
27
|
-
* @param postId The ID of the post to flag
|
|
28
|
-
* @param options `reason` is a `ContentFlagReasonEnum` value; `detail` is optional free text
|
|
29
|
-
* @returns `true` when the report was created
|
|
30
|
-
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
|
|
31
|
-
*/
|
|
32
|
-
(postId: Amity.Post['postId'], options: Amity.ContentFlagOptions): Promise<boolean>;
|
|
33
|
-
/**
|
|
34
|
-
* ```js
|
|
35
|
-
* import { PostRepository } from '@amityco/ts-sdk'
|
|
36
|
-
* const flagged = await PostRepository.flagPost(postId, reason)
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @deprecated Pass an options object instead: `flagPost(postId, { reason, detail })`.
|
|
40
|
-
* A predefined string maps to `{ reason: <value>, detail: '' }`; a custom string maps to
|
|
41
|
-
* `{ reason: 'Others', detail: <string> }`. Migrate a custom string to
|
|
42
|
-
* `{ reason: ContentFlagReasonEnum.Others, detail: customString }`. This mapping is
|
|
43
|
-
* unchanged and stays available throughout the current major version.
|
|
44
|
-
*
|
|
45
|
-
* @param postId The ID of the post to flag
|
|
46
|
-
* @param reason a predefined `ContentFlagReasonEnum` value or a custom string
|
|
47
|
-
* @returns `true` when the report was created
|
|
48
|
-
*/
|
|
49
|
-
(postId: Amity.Post['postId'], reason?: Amity.ContentFlagReason): Promise<boolean>;
|
|
50
|
-
};
|
|
51
1
|
/**
|
|
52
2
|
* ```js
|
|
53
|
-
* import { PostRepository
|
|
54
|
-
*
|
|
55
|
-
* // No reason.
|
|
56
|
-
* await PostRepository.flagPost(postId)
|
|
57
|
-
*
|
|
58
|
-
* // Category plus optional reporter context (any category, including Others).
|
|
59
|
-
* await PostRepository.flagPost(postId, {
|
|
60
|
-
* reason: ContentFlagReasonEnum.SpamOrScams,
|
|
61
|
-
* detail: 'Repeated promotional links',
|
|
62
|
-
* })
|
|
3
|
+
* import { PostRepository } from '@amityco/ts-sdk'
|
|
4
|
+
* const flagged = await PostRepository.flagPost(postId, reason)
|
|
63
5
|
* ```
|
|
64
6
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* so the legacy path is untouched by the new contract:
|
|
69
|
-
*
|
|
70
|
-
* - `undefined` or a string → `flagPostWithReasonString` (unchanged legacy mapping)
|
|
71
|
-
* - anything else → `flagPostWithOptions` (validated `{ reason, detail? }`)
|
|
72
|
-
*
|
|
73
|
-
* @param postId The ID of the post to flag
|
|
74
|
-
* @param input an options object `{ reason, detail? }`, a legacy reason string, or nothing
|
|
75
|
-
* @returns `true` when the report was created
|
|
7
|
+
* @param postId of the post to flag
|
|
8
|
+
* @param reason the reason to flag the post
|
|
9
|
+
* @returns a boolean
|
|
76
10
|
*
|
|
77
11
|
* @category Post API
|
|
78
12
|
* @async
|
|
79
13
|
* */
|
|
80
|
-
export declare const flagPost:
|
|
81
|
-
export {};
|
|
14
|
+
export declare const flagPost: (postId: Amity.Post['postId'], reason?: Amity.ContentFlagReason) => Promise<boolean>;
|
|
82
15
|
//# sourceMappingURL=flagPost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flagPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/flagPost.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flagPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/flagPost.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;KAYK;AACL,eAAO,MAAM,QAAQ,WACX,MAAM,IAAI,CAAC,QAAQ,CAAC,WACnB,MAAM,iBAAiB,KAC/B,QAAQ,OAAO,CA2BjB,CAAC"}
|
|
@@ -1,63 +1,22 @@
|
|
|
1
|
-
declare type FlagUser = {
|
|
2
|
-
/**
|
|
3
|
-
* ```js
|
|
4
|
-
* import { UserRepository } from '@amityco/ts-sdk'
|
|
5
|
-
* const flagged = await UserRepository.flagUser('userId')
|
|
6
|
-
* ```
|
|
7
|
-
*
|
|
8
|
-
* Flags a user with a typeless report. No request body is sent.
|
|
9
|
-
*
|
|
10
|
-
* To report a specific profile field use `flagUserProfile(userId, { field, comment })`;
|
|
11
|
-
* to report behavior use `flagUserBehavior(userId, { reason, comment })`.
|
|
12
|
-
*
|
|
13
|
-
* @param userId The ID of the user to be flagged
|
|
14
|
-
* @returns the flagged {@link Amity.User}
|
|
15
|
-
*/
|
|
16
|
-
(userId: Amity.User['userId'], options?: undefined): Promise<Amity.User>;
|
|
17
|
-
/**
|
|
18
|
-
* ```js
|
|
19
|
-
* import { UserRepository } from '@amityco/ts-sdk'
|
|
20
|
-
* const flaggedBehavior = await UserRepository.flagUser('userId', {
|
|
21
|
-
* reportType: 'behavior',
|
|
22
|
-
* reason: 'Harassment or bullying',
|
|
23
|
-
* comment: 'optional free-text',
|
|
24
|
-
* })
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @deprecated Use `flagUserProfile(userId, { field, comment })` to report a profile
|
|
28
|
-
* field, or `flagUserBehavior(userId, { reason, comment })` to report behavior. For a
|
|
29
|
-
* custom `Others` reason, pass `reason: ContentFlagReasonEnum.Others` and put the text
|
|
30
|
-
* in `comment`. `flagUser(userId)` without options stays supported. This overload's
|
|
31
|
-
* request mapping is unchanged and stays available throughout the current major version.
|
|
32
|
-
*
|
|
33
|
-
* @param userId The ID of the user to be flagged
|
|
34
|
-
* @param options Optional report metadata forwarded to the server as the request
|
|
35
|
-
* body: `reportType`, `reason`, `comment`. Only non-undefined fields are included.
|
|
36
|
-
* All validation is server-side; a bodyless call produces a typeless report.
|
|
37
|
-
* @returns the flagged {@link Amity.User}
|
|
38
|
-
*/
|
|
39
|
-
(userId: Amity.User['userId'], options?: Amity.UserReportOptions): Promise<Amity.User>;
|
|
40
|
-
};
|
|
41
1
|
/**
|
|
42
2
|
* ```js
|
|
43
3
|
* import { UserRepository } from '@amityco/ts-sdk'
|
|
44
|
-
*
|
|
45
|
-
* // Typeless report (supported).
|
|
46
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
|
+
* })
|
|
47
10
|
* ```
|
|
48
11
|
*
|
|
49
|
-
* Flags a user. Two call shapes are accepted (see the overloads): id-only, which
|
|
50
|
-
* sends no body and stays supported, and the deprecated structured options object,
|
|
51
|
-
* whose request mapping is unchanged. New code reporting a profile field or behavior
|
|
52
|
-
* should use `flagUserProfile` or `flagUserBehavior`.
|
|
53
|
-
*
|
|
54
12
|
* @param userId The ID of the user to be flagged
|
|
55
|
-
* @param options
|
|
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.
|
|
56
16
|
* @returns the flagged {@link Amity.User}
|
|
57
17
|
*
|
|
58
18
|
* @category User API
|
|
59
19
|
* @async
|
|
60
20
|
* */
|
|
61
|
-
export declare const flagUser:
|
|
62
|
-
export {};
|
|
21
|
+
export declare const flagUser: (userId: Amity.User['userId'], options?: Amity.UserReportOptions) => Promise<Amity.User>;
|
|
63
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"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export { getUserByIds } from './getUserByIds';
|
|
2
2
|
export { updateUser } from './updateUser';
|
|
3
3
|
export { flagUser } from './flagUser';
|
|
4
|
-
export { flagUserProfile } from './flagUserProfile';
|
|
5
|
-
export { flagUserBehavior } from './flagUserBehavior';
|
|
6
4
|
export { unflagUser } from './unflagUser';
|
|
7
5
|
export { isUserFlaggedByMe } from './isUserFlaggedByMe';
|
|
8
6
|
export { getAllBlockedUsers } from './getAllBlockedUsers';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/userRepository/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/userRepository/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { Client } from '@amityco/ts-sdk'
|
|
4
|
-
* const moduleSettings = await Client.getModuleSettings()
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Fetches the network's module entitlements: which modules the network was
|
|
8
|
-
* granted, whether core is enforcing those grants, and the catalog of all
|
|
9
|
-
* modules with their dependency chains.
|
|
10
|
-
*
|
|
11
|
-
* The payload is returned whole — `catalog` is the dependency table
|
|
12
|
-
* {@link resolveModuleAvailability} reads, and a client that cannot see it has
|
|
13
|
-
* to hardcode one.
|
|
14
|
-
*
|
|
15
|
-
* The read is **advisory**. It tells a host what to offer; under `enforce` the
|
|
16
|
-
* backend refuses a call to an unowned module regardless of what was resolved
|
|
17
|
-
* here, and that refusal arrives as `AmityModuleNotEntitledError`.
|
|
18
|
-
*
|
|
19
|
-
* @returns A Promise of {@link Amity.ModuleSettings} object
|
|
20
|
-
*
|
|
21
|
-
* @category Client API
|
|
22
|
-
* @async
|
|
23
|
-
*/
|
|
24
|
-
export declare const getModuleSettings: () => Promise<Amity.ModuleSettings>;
|
|
25
|
-
//# sourceMappingURL=getModuleSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getModuleSettings.d.ts","sourceRoot":"","sources":["../../../src/client/api/getModuleSettings.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,iBAAiB,QAAa,QAAQ,MAAM,cAAc,CAQtE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moduleSettings.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/client/api/tests/integration/moduleSettings.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Decodes `GET /api/v3/network-settings/modules`. Nothing is trimmed: the
|
|
3
|
-
* catalog is the dependency table callers resolve against, and a client that
|
|
4
|
-
* cannot see it has to hardcode one.
|
|
5
|
-
*
|
|
6
|
-
* @category private
|
|
7
|
-
*/
|
|
8
|
-
export declare const parseModuleSettings: (raw: Amity.RawModuleSettings) => Amity.ModuleSettings;
|
|
9
|
-
//# sourceMappingURL=parseModuleSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseModuleSettings.d.ts","sourceRoot":"","sources":["../../../src/client/utils/parseModuleSettings.ts"],"names":[],"mappings":"AAkDA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,QAAS,MAAM,iBAAiB,KAAG,MAAM,cAIvE,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { Client, resolveModuleAvailability } from '@amityco/ts-sdk'
|
|
4
|
-
*
|
|
5
|
-
* const moduleSettings = await Client.getModuleSettings()
|
|
6
|
-
*
|
|
7
|
-
* if (resolveModuleAvailability(moduleSettings, 'live').isAvailable) {
|
|
8
|
-
* // offer the Live entry point
|
|
9
|
-
* }
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
* Resolves whether one module is usable on this network.
|
|
13
|
-
*
|
|
14
|
-
* Availability is a function of all three fields of
|
|
15
|
-
* {@link Amity.ModuleSettings} — the enforcement mode, the module's own grant,
|
|
16
|
-
* and its prerequisite chain — combined in that order. Reading `modules`
|
|
17
|
-
* directly contradicts the mode: staging answers `mode: 'off'` with
|
|
18
|
-
* `modules: {}`, and every module still works.
|
|
19
|
-
*
|
|
20
|
-
* The dependency table comes from the payload's `catalog`, never from a
|
|
21
|
-
* hardcoded copy, so a chain the backend changes takes effect without an SDK
|
|
22
|
-
* release.
|
|
23
|
-
*
|
|
24
|
-
* The SDK does not hold the settings — the caller keeps what it fetched and
|
|
25
|
-
* resolves against it. With no settings at all (a fetch that never succeeded)
|
|
26
|
-
* the caller reads that as every module available: under `enforce` the backend
|
|
27
|
-
* refuses the calls anyway, so the exposure is a screen that offers too much,
|
|
28
|
-
* not one that withholds what a customer paid for.
|
|
29
|
-
*
|
|
30
|
-
* @param moduleSettings The network's module settings
|
|
31
|
-
* @param moduleKey The module to resolve — an {@link Amity.ModuleKey}, so the
|
|
32
|
-
* 15 keys this build knows complete and type-check while a catalog entry it
|
|
33
|
-
* does not know still resolves.
|
|
34
|
-
* @returns An {@link Amity.ModuleAvailability} answer
|
|
35
|
-
*
|
|
36
|
-
* @category Client API
|
|
37
|
-
*/
|
|
38
|
-
export declare const resolveModuleAvailability: (moduleSettings: Amity.ModuleSettings, moduleKey: Amity.ModuleKey, seen?: Set<Amity.ModuleKey>) => Amity.ModuleAvailability;
|
|
39
|
-
//# sourceMappingURL=resolveModuleAvailability.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveModuleAvailability.d.ts","sourceRoot":"","sources":["../../../src/client/utils/resolveModuleAvailability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,yBAAyB,mBACpB,MAAM,cAAc,aACzB,MAAM,SAAS,SACpB,IAAI,MAAM,SAAS,CAAC,KACzB,MAAM,kBAuDR,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveModuleAvailability.test.d.ts","sourceRoot":"","sources":["../../../../src/client/utils/tests/resolveModuleAvailability.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* New `flagComment(commentId, { reason, detail? })` implementation. Any category,
|
|
3
|
-
* including `Others`, may carry a `detail`. `detail` is forwarded unchanged (empty and
|
|
4
|
-
* whitespace-only strings included) and omitted from the request body when `undefined`;
|
|
5
|
-
* the backend enforces the 300-character limit.
|
|
6
|
-
*
|
|
7
|
-
* Not exported from the public API. It is reached through the
|
|
8
|
-
* `CommentRepository.flagComment(commentId, options)` overload; see `flagComment.ts`.
|
|
9
|
-
*
|
|
10
|
-
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
|
|
11
|
-
*/
|
|
12
|
-
export declare const flagCommentWithOptions: (commentId: Amity.Comment['commentId'], options: Amity.ContentFlagOptions) => Promise<boolean>;
|
|
13
|
-
//# sourceMappingURL=flagCommentWithOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagCommentWithOptions.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/api/flagCommentWithOptions.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,cACtB,aAAa,CAAC,WAAW,CAAC,WAC5B,MAAM,kBAAkB,KAChC,QAAQ,OAAO,CAkBjB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Legacy `flagComment(commentId, reason?)` implementation, kept verbatim so existing
|
|
3
|
-
* callers keep the exact request body they had before the options contract existed:
|
|
4
|
-
*
|
|
5
|
-
* - predefined `ContentFlagReasonEnum` value → `{ reason: <value>, detail: '' }`
|
|
6
|
-
* - any other non-empty string (including the literal `'Others'`) → `{ reason: 'Others', detail: <string> }`
|
|
7
|
-
* - `undefined` or `''` → `{ reason: 'Others', detail: '' }`
|
|
8
|
-
*
|
|
9
|
-
* Not exported from the public API. It is reached through the deprecated
|
|
10
|
-
* `CommentRepository.flagComment(commentId, reason)` overload; see `flagComment.ts`.
|
|
11
|
-
*
|
|
12
|
-
* @deprecated Use `flagCommentWithOptions` (the `{ reason, detail? }` contract) for new code.
|
|
13
|
-
* This path stays available throughout the current major version.
|
|
14
|
-
*/
|
|
15
|
-
export declare const flagCommentWithReasonString: (commentId: Amity.Comment['commentId'], reason?: Amity.ContentFlagReason) => Promise<boolean>;
|
|
16
|
-
//# sourceMappingURL=flagCommentWithReasonString.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagCommentWithReasonString.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/api/flagCommentWithReasonString.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B,cAC3B,aAAa,CAAC,WAAW,CAAC,WAC5B,MAAM,iBAAiB,KAC/B,QAAQ,OAAO,CA2BjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagCommentWithOptions.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/commentRepository/api/tests/integration/flagCommentWithOptions.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagCommentWithReasonString.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/commentRepository/api/tests/integration/flagCommentWithReasonString.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moduleNotEntitled.test.d.ts","sourceRoot":"","sources":["../../../../src/core/transports/tests/moduleNotEntitled.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* New `flagMessage(messageId, { reason, detail? })` implementation. Any category,
|
|
3
|
-
* including `Others`, may carry a `detail`. `detail` is forwarded unchanged (empty and
|
|
4
|
-
* whitespace-only strings included) and omitted from the request body when `undefined`;
|
|
5
|
-
* the backend enforces the 300-character limit.
|
|
6
|
-
*
|
|
7
|
-
* Not exported from the public API. It is reached through the
|
|
8
|
-
* `MessageRepository.flagMessage(messageId, options)` overload; see `flagMessage.ts`.
|
|
9
|
-
*
|
|
10
|
-
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
|
|
11
|
-
*/
|
|
12
|
-
export declare const flagMessageWithOptions: (messageId: Amity.Message['messageId'], options: Amity.ContentFlagOptions) => Promise<boolean>;
|
|
13
|
-
//# sourceMappingURL=flagMessageWithOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagMessageWithOptions.d.ts","sourceRoot":"","sources":["../../../src/messageRepository/api/flagMessageWithOptions.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,cACtB,MAAM,OAAO,CAAC,WAAW,CAAC,WAC5B,MAAM,kBAAkB,KAChC,QAAQ,OAAO,CAmBjB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Legacy `flagMessage(messageId, reason?)` implementation, kept verbatim so existing
|
|
3
|
-
* callers keep the exact request body they had before the options contract existed:
|
|
4
|
-
*
|
|
5
|
-
* - predefined `ContentFlagReasonEnum` value → `{ reason: <value>, detail: '' }`
|
|
6
|
-
* - any other non-empty string (including the literal `'Others'`) → `{ reason: 'Others', detail: <string> }`
|
|
7
|
-
* - `undefined` or `''` → `{ reason: 'Others', detail: '' }`
|
|
8
|
-
* (for `undefined` the message body carries `detail: undefined`, which JSON serialization omits)
|
|
9
|
-
*
|
|
10
|
-
* Not exported from the public API. It is reached through the deprecated
|
|
11
|
-
* `MessageRepository.flagMessage(messageId, reason)` overload; see `flagMessage.ts`.
|
|
12
|
-
*
|
|
13
|
-
* @deprecated Use `flagMessageWithOptions` (the `{ reason, detail? }` contract) for new code.
|
|
14
|
-
* This path stays available throughout the current major version.
|
|
15
|
-
*/
|
|
16
|
-
export declare const flagMessageWithReasonString: (messageId: Amity.Message['messageId'], reason?: Amity.ContentFlagReason) => Promise<boolean>;
|
|
17
|
-
//# sourceMappingURL=flagMessageWithReasonString.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagMessageWithReasonString.d.ts","sourceRoot":"","sources":["../../../src/messageRepository/api/flagMessageWithReasonString.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,2BAA2B,cAC3B,MAAM,OAAO,CAAC,WAAW,CAAC,WAC5B,MAAM,iBAAiB,KAC/B,QAAQ,OAAO,CA4BjB,CAAC"}
|
package/dist/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagMessage.overloads.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagMessageWithOptions.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/messageRepository/api/tests/integration/flagMessageWithOptions.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagMessageWithReasonString.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/messageRepository/api/tests/integration/flagMessageWithReasonString.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* New `flagPost(postId, { reason, detail? })` implementation. Any category, including
|
|
3
|
-
* `Others`, may carry a `detail`. `detail` is forwarded unchanged (empty and
|
|
4
|
-
* whitespace-only strings included) and omitted from the request body when `undefined`;
|
|
5
|
-
* the backend enforces the 300-character limit.
|
|
6
|
-
*
|
|
7
|
-
* Not exported from the public API. It is reached through the
|
|
8
|
-
* `PostRepository.flagPost(postId, options)` overload; see `flagPost.ts`.
|
|
9
|
-
*
|
|
10
|
-
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
|
|
11
|
-
*/
|
|
12
|
-
export declare const flagPostWithOptions: (postId: Amity.Post['postId'], options: Amity.ContentFlagOptions) => Promise<boolean>;
|
|
13
|
-
//# sourceMappingURL=flagPostWithOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagPostWithOptions.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/flagPostWithOptions.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,WACtB,MAAM,IAAI,CAAC,QAAQ,CAAC,WACnB,MAAM,kBAAkB,KAChC,QAAQ,OAAO,CAkBjB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Legacy `flagPost(postId, reason?)` implementation, kept verbatim so existing
|
|
3
|
-
* callers keep the exact request body they had before the options contract existed:
|
|
4
|
-
*
|
|
5
|
-
* - predefined `ContentFlagReasonEnum` value → `{ reason: <value>, detail: '' }`
|
|
6
|
-
* - any other non-empty string (including the literal `'Others'`) → `{ reason: 'Others', detail: <string> }`
|
|
7
|
-
* - `undefined` or `''` → `{ reason: 'Others', detail: '' }`
|
|
8
|
-
*
|
|
9
|
-
* Not exported from the public API. It is reached through the deprecated
|
|
10
|
-
* `PostRepository.flagPost(postId, reason)` overload; see `flagPost.ts`.
|
|
11
|
-
*
|
|
12
|
-
* @deprecated Use `flagPostWithOptions` (the `{ reason, detail? }` contract) for new code.
|
|
13
|
-
* This path stays available throughout the current major version.
|
|
14
|
-
*/
|
|
15
|
-
export declare const flagPostWithReasonString: (postId: Amity.Post['postId'], reason?: Amity.ContentFlagReason) => Promise<boolean>;
|
|
16
|
-
//# sourceMappingURL=flagPostWithReasonString.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagPostWithReasonString.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/flagPostWithReasonString.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,WAC3B,MAAM,IAAI,CAAC,QAAQ,CAAC,WACnB,MAAM,iBAAiB,KAC/B,QAAQ,OAAO,CA2BjB,CAAC"}
|
package/dist/postRepository/api/tests/integration/flagPost.overloads.integration.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagPost.overloads.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/postRepository/api/tests/integration/flagPost.overloads.integration.test.ts"],"names":[],"mappings":""}
|
package/dist/postRepository/api/tests/integration/flagPostWithOptions.integration.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagPostWithOptions.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/postRepository/api/tests/integration/flagPostWithOptions.integration.test.ts"],"names":[],"mappings":""}
|
package/dist/postRepository/api/tests/integration/flagPostWithReasonString.integration.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flagPostWithReasonString.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/postRepository/api/tests/integration/flagPostWithReasonString.integration.test.ts"],"names":[],"mappings":""}
|