@amityco/ts-sdk 7.29.0 → 7.29.1-cc0fba8.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.
Files changed (70) hide show
  1. package/dist/@types/core/errors.d.ts +2 -0
  2. package/dist/@types/core/errors.d.ts.map +1 -1
  3. package/dist/@types/domains/content.d.ts +11 -0
  4. package/dist/@types/domains/content.d.ts.map +1 -1
  5. package/dist/@types/domains/user.d.ts +31 -0
  6. package/dist/@types/domains/user.d.ts.map +1 -1
  7. package/dist/commentRepository/api/flagComment.d.ts +72 -5
  8. package/dist/commentRepository/api/flagComment.d.ts.map +1 -1
  9. package/dist/commentRepository/internalApi/flagCommentWithOptions.d.ts +13 -0
  10. package/dist/commentRepository/internalApi/flagCommentWithOptions.d.ts.map +1 -0
  11. package/dist/commentRepository/internalApi/flagCommentWithReasonString.d.ts +17 -0
  12. package/dist/commentRepository/internalApi/flagCommentWithReasonString.d.ts.map +1 -0
  13. package/dist/commentRepository/internalApi/index.d.ts +2 -0
  14. package/dist/commentRepository/internalApi/index.d.ts.map +1 -1
  15. package/dist/commentRepository/internalApi/tests/integration/flagCommentWithOptions.integration.test.d.ts +2 -0
  16. package/dist/commentRepository/internalApi/tests/integration/flagCommentWithOptions.integration.test.d.ts.map +1 -0
  17. package/dist/commentRepository/internalApi/tests/integration/flagCommentWithReasonString.integration.test.d.ts +2 -0
  18. package/dist/commentRepository/internalApi/tests/integration/flagCommentWithReasonString.integration.test.d.ts.map +1 -0
  19. package/dist/core/transports/tests/integration/serverErrorCodes.integration.test.d.ts +2 -0
  20. package/dist/core/transports/tests/integration/serverErrorCodes.integration.test.d.ts.map +1 -0
  21. package/dist/index.cjs.js +445 -51
  22. package/dist/index.esm.js +446 -52
  23. package/dist/index.umd.js +2 -2
  24. package/dist/messageRepository/api/flagMessage.d.ts +73 -6
  25. package/dist/messageRepository/api/flagMessage.d.ts.map +1 -1
  26. package/dist/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.d.ts +2 -0
  27. package/dist/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.d.ts.map +1 -0
  28. package/dist/messageRepository/internalApi/flagMessageWithOptions.d.ts +13 -0
  29. package/dist/messageRepository/internalApi/flagMessageWithOptions.d.ts.map +1 -0
  30. package/dist/messageRepository/internalApi/flagMessageWithReasonString.d.ts +18 -0
  31. package/dist/messageRepository/internalApi/flagMessageWithReasonString.d.ts.map +1 -0
  32. package/dist/messageRepository/internalApi/tests/integration/flagMessageWithOptions.integration.test.d.ts +2 -0
  33. package/dist/messageRepository/internalApi/tests/integration/flagMessageWithOptions.integration.test.d.ts.map +1 -0
  34. package/dist/messageRepository/internalApi/tests/integration/flagMessageWithReasonString.integration.test.d.ts +2 -0
  35. package/dist/messageRepository/internalApi/tests/integration/flagMessageWithReasonString.integration.test.d.ts.map +1 -0
  36. package/dist/postRepository/api/flagPost.d.ts +73 -6
  37. package/dist/postRepository/api/flagPost.d.ts.map +1 -1
  38. package/dist/postRepository/api/tests/integration/flagPost.overloads.integration.test.d.ts +2 -0
  39. package/dist/postRepository/api/tests/integration/flagPost.overloads.integration.test.d.ts.map +1 -0
  40. package/dist/postRepository/internalApi/flagPostWithOptions.d.ts +13 -0
  41. package/dist/postRepository/internalApi/flagPostWithOptions.d.ts.map +1 -0
  42. package/dist/postRepository/internalApi/flagPostWithReasonString.d.ts +17 -0
  43. package/dist/postRepository/internalApi/flagPostWithReasonString.d.ts.map +1 -0
  44. package/dist/postRepository/internalApi/index.d.ts +2 -0
  45. package/dist/postRepository/internalApi/index.d.ts.map +1 -1
  46. package/dist/postRepository/internalApi/tests/integration/flagPostWithOptions.integration.test.d.ts +2 -0
  47. package/dist/postRepository/internalApi/tests/integration/flagPostWithOptions.integration.test.d.ts.map +1 -0
  48. package/dist/postRepository/internalApi/tests/integration/flagPostWithReasonString.integration.test.d.ts +2 -0
  49. package/dist/postRepository/internalApi/tests/integration/flagPostWithReasonString.integration.test.d.ts.map +1 -0
  50. package/dist/userRepository/api/flagUser.d.ts +50 -9
  51. package/dist/userRepository/api/flagUser.d.ts.map +1 -1
  52. package/dist/userRepository/api/flagUserBehavior.d.ts +29 -0
  53. package/dist/userRepository/api/flagUserBehavior.d.ts.map +1 -0
  54. package/dist/userRepository/api/flagUserProfile.d.ts +29 -0
  55. package/dist/userRepository/api/flagUserProfile.d.ts.map +1 -0
  56. package/dist/userRepository/api/index.d.ts +2 -0
  57. package/dist/userRepository/api/index.d.ts.map +1 -1
  58. package/dist/userRepository/api/tests/integration/flagUser.overloads.integration.test.d.ts +2 -0
  59. package/dist/userRepository/api/tests/integration/flagUser.overloads.integration.test.d.ts.map +1 -0
  60. package/dist/userRepository/api/tests/integration/flagUserBehavior.integration.test.d.ts +2 -0
  61. package/dist/userRepository/api/tests/integration/flagUserBehavior.integration.test.d.ts.map +1 -0
  62. package/dist/userRepository/api/tests/integration/flagUserProfile.integration.test.d.ts +2 -0
  63. package/dist/userRepository/api/tests/integration/flagUserProfile.integration.test.d.ts.map +1 -0
  64. package/dist/userRepository/utils/submitUserReport.d.ts +10 -0
  65. package/dist/userRepository/utils/submitUserReport.d.ts.map +1 -0
  66. package/dist/userRepository/utils/userReport.d.ts +35 -0
  67. package/dist/userRepository/utils/userReport.d.ts.map +1 -0
  68. package/dist/utils/contentFlag.d.ts +28 -0
  69. package/dist/utils/contentFlag.d.ts.map +1 -0
  70. package/package.json +1 -1
@@ -16,6 +16,8 @@ declare global {
16
16
  CHANNEL_IS_MUTED = 400303,
17
17
  CHANNEL_BAN = 400304,
18
18
  GLOBAL_BAN = 400312,
19
+ GLOBAL_MUTE = 400313,
20
+ UNSAFE_CONTENT = 400314,
19
21
  NUMBER_OF_MEMBERS_EXCEEDED = 400305,
20
22
  MAX_REPETITION_EXCEEDED = 400307,
21
23
  BAN_WORD_FOUND = 400308,
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/@types/core/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,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,gBAAgB,SAAS;YACzB,WAAW,SAAS;YACpB,UAAU,SAAS;YACnB,0BAA0B,SAAS;YACnC,uBAAuB,SAAS;YAChC,cAAc,SAAS;YACvB,gBAAgB,SAAS;YACzB,cAAc,SAAS;YACvB,yBAAyB,SAAS;YAClC,qBAAqB,SAAS;YAC9B,4BAA4B,SAAS;YACrC,qBAAqB,SAAS;YAC9B,yBAAyB,SAAS;YAClC,mBAAmB,SAAS;SAC7B;QAED,WAAW,WAAW;YACpB,aAAa,SAAS;YACtB,kBAAkB,SAAS;YAC3B,iBAAiB,SAAS;YAC1B,gBAAgB,SAAS;YACzB,YAAY,SAAS;YACrB,aAAa,SAAS;YACtB,wBAAwB,SAAS;SAClC;QAED,KAAK,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;KAC5C;CACF"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/@types/core/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,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,gBAAgB,SAAS;YACzB,WAAW,SAAS;YACpB,UAAU,SAAS;YACnB,WAAW,SAAS;YACpB,cAAc,SAAS;YACvB,0BAA0B,SAAS;YACnC,uBAAuB,SAAS;YAChC,cAAc,SAAS;YACvB,gBAAgB,SAAS;YACzB,cAAc,SAAS;YACvB,yBAAyB,SAAS;YAClC,qBAAqB,SAAS;YAC9B,4BAA4B,SAAS;YACrC,qBAAqB,SAAS;YAC9B,yBAAyB,SAAS;YAClC,mBAAmB,SAAS;SAC7B;QAED,WAAW,WAAW;YACpB,aAAa,SAAS;YACtB,kBAAkB,SAAS;YAC3B,iBAAiB,SAAS;YAC1B,gBAAgB,SAAS;YACzB,YAAY,SAAS;YACrB,aAAa,SAAS;YACtB,wBAAwB,SAAS;SAClC;QAED,KAAK,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;KAC5C;CACF"}
@@ -19,6 +19,17 @@ export declare enum ContentFlagReasonEnum {
19
19
  declare global {
20
20
  namespace Amity {
21
21
  type ContentFlagReason = Exclude<`${ContentFlagReasonEnum}`, `${ContentFlagReasonEnum.Others}`> | (string & {});
22
+ /**
23
+ * Input for the reason-bearing `flagPost` / `flagComment` / `flagMessage` overloads:
24
+ * one payload-free category plus optional reporter context. Arbitrary custom
25
+ * strings are not accepted here; use `ContentFlagReasonEnum.Others` and put the
26
+ * text in `detail`. `detail` is forwarded unchanged (the backend enforces the
27
+ * 300-character limit) and is omitted from the request when `undefined`.
28
+ */
29
+ type ContentFlagOptions = {
30
+ reason: ContentFlagReasonEnum;
31
+ detail?: string;
32
+ };
22
33
  type ContentType = 'text' | 'image' | 'file' | 'video' | 'poll' | 'json' | 'liveStream' | 'clip' | 'audio' | string;
23
34
  type ContentFeedType = ValueOf<typeof ContentFeedType>;
24
35
  type ContentDataText = {
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,oBAAY,qBAAqB;IAC/B,mBAAmB,iCAAiC;IACpD,oBAAoB,2BAA2B;IAC/C,iBAA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KAAK,mBAAmB,GAAG;YACzB,WAAW,EAAE,OAAO,CAAC;YACrB,OAAO,EAAE,OAAO,CAAC;YACjB,kBAAkB,EAAE,MAAM,CAAC;YAC3B,eAAe,EAAE;gBACf,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC;gBACrC,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC;aACtC,CAAC;SACH,CAAC;QAEF,KAAK,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,GAAG,OAAO,IAAI,CAAC,SAAS,MAAM,GAC5E,kBAAkB,GAClB,CAAC,SAAS,OAAO,GACjB,mBAAmB,GACnB,KAAK,CAAC;KACX;CACF"}
@@ -1,4 +1,5 @@
1
1
  import { AmityUserSearchMatchType } from '~/userRepository';
2
+ import { ContentFlagReasonEnum } from './content';
2
3
  export declare const enum UserTypeEnum {
3
4
  SIGNED_IN = "signed-in",
4
5
  VISITOR = "visitor",
@@ -15,6 +16,17 @@ export declare enum UserReportTypeEnum {
15
16
  AVATAR = "avatarFileId",
16
17
  BEHAVIOR = "behavior"
17
18
  }
19
+ /**
20
+ * The profile field a user is reported for in `UserRepository.flagUserProfile`.
21
+ * Each member is the backend `reportType` wire value. There is deliberately no
22
+ * behavior member: behavior reports need a reason and go through
23
+ * `UserRepository.flagUserBehavior`.
24
+ */
25
+ export declare enum UserProfileFieldEnum {
26
+ DISPLAY_NAME = "displayName",
27
+ DESCRIPTION = "description",
28
+ AVATAR = "avatarFileId"
29
+ }
18
30
  export {};
19
31
  declare global {
20
32
  namespace Amity {
@@ -39,6 +51,25 @@ declare global {
39
51
  reason?: Amity.ContentFlagReason;
40
52
  comment?: string;
41
53
  };
54
+ /**
55
+ * Input for `UserRepository.flagUserProfile`: the reported profile field plus
56
+ * optional reporter context. There is no `reason`; profile reports never carry one.
57
+ * `comment` is trimmed, omitted when blank, and rejected locally above 300 characters.
58
+ */
59
+ type UserProfileReportOptions = {
60
+ field: UserProfileFieldEnum;
61
+ comment?: string;
62
+ };
63
+ /**
64
+ * Input for `UserRepository.flagUserBehavior`: one payload-free category plus
65
+ * optional reporter context. Reporter text, including the explanation for
66
+ * `ContentFlagReasonEnum.Others`, always travels in `comment`. `comment` is
67
+ * trimmed, omitted when blank, and rejected locally above 300 characters.
68
+ */
69
+ type UserBehaviorReportOptions = {
70
+ reason: ContentFlagReasonEnum;
71
+ comment?: string;
72
+ };
42
73
  type RawUser = {
43
74
  _id: string;
44
75
  userId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,0BAAkB,YAAY;IAC5B,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,oBAAY,iBAAiB;IAC3B,YAAY,gBAAgB;IAC5B,cAAc,kBAAkB;IAChC,OAAO,WAAW;CACnB;AAED,oBAAY,kBAAkB;IAC5B,YAAY,gBAAgB;IAC5B,WAAW,gBAAgB;IAC3B,MAAM,iBAAiB;IACvB,QAAQ,aAAa;CACtB;AAED,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,WAAW,cAAc;YACvB,YAAY,iBAAiB;YAC7B,WAAW,gBAAgB;SAC5B;QAED,KAAK,mBAAmB,GAAG,wBAAwB,CAAC;QAEpD,KAAK,UAAU,GAAG,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;QAE5C,WAAW,oBAAoB;YAC7B,YAAY,iBAAiB;YAC7B,WAAW,gBAAgB;YAC3B,WAAW,gBAAgB;SAC5B;QAED,KAAK,gBAAgB,GAAG,GAAG,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAExD,KAAK,aAAa,GAAG,iBAAiB,CAAC;QAEvC,KAAK,cAAc,GACf,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,aAAa,GACb,eAAe,CAAC;Q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,CAAC,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC;YACjD,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,SAAS,CAAC,EAAE,mBAAmB,CAAC;SACjC,CAAC;QAEF,KAAK,gBAAgB,GAAG;YACtB,WAAW,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;YAChD,MAAM,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;YAC3B,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC,oBAAoB,CAAC;YAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,SAAS,CAAC,EAAE,mBAAmB,CAAC;YAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC;SAClC,CAAC;QAEF,KAAK,kBAAkB,GAAG,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;QAErF,KAAK,wBAAwB,GAAG,KAAK,CAAC,oBAAoB,CACxD,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CACvC,CAAC;QAEF,KAAK,wBAAwB,GAAG,KAAK,CAAC,wBAAwB,CAAC;QAE/D,KAAK,uBAAuB,GAAG,KAAK,CAAC,mBAAmB,CACtD,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,EAC5B,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CACzB,CAAC;KACH;CACF"}
@@ -1,15 +1,82 @@
1
+ declare type FlagComment = {
2
+ /**
3
+ * ```js
4
+ * import { CommentRepository } from '@amityco/ts-sdk'
5
+ * const flagged = await CommentRepository.flagComment(commentId)
6
+ * ```
7
+ *
8
+ * Flags a comment without a reason. The report is sent as `Others` with an empty detail.
9
+ *
10
+ * @param commentId The ID of the comment to flag
11
+ * @returns `true` when the report was created
12
+ */
13
+ (commentId: Amity.Comment['commentId'], reason?: undefined): Promise<boolean>;
14
+ /**
15
+ * ```js
16
+ * import { CommentRepository, ContentFlagReasonEnum } from '@amityco/ts-sdk'
17
+ * const flagged = await CommentRepository.flagComment(commentId, {
18
+ * reason: ContentFlagReasonEnum.SpamOrScams,
19
+ * detail: 'Repeated promotional links',
20
+ * })
21
+ * ```
22
+ *
23
+ * Flags a comment 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 commentId The ID of the comment 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
+ (commentId: Amity.Comment['commentId'], options: Amity.ContentFlagOptions): Promise<boolean>;
33
+ /**
34
+ * ```js
35
+ * import { CommentRepository } from '@amityco/ts-sdk'
36
+ * const flagged = await CommentRepository.flagComment(commentId, reason)
37
+ * ```
38
+ *
39
+ * @deprecated Pass an options object instead: `flagComment(commentId, { 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 commentId The ID of the comment to flag
46
+ * @param reason a predefined `ContentFlagReasonEnum` value or a custom string
47
+ * @returns `true` when the report was created
48
+ */
49
+ (commentId: Amity.Comment['commentId'], reason?: Amity.ContentFlagReason): Promise<boolean>;
50
+ };
1
51
  /**
2
52
  * ```js
3
- * import { CommentRepository } from '@amityco/ts-sdk'
4
- * const flagged = await CommentRepository.flagComment(commentId, reason)
53
+ * import { CommentRepository, ContentFlagReasonEnum } from '@amityco/ts-sdk'
54
+ *
55
+ * // No reason: sent as Others with an empty detail.
56
+ * await CommentRepository.flagComment(commentId)
57
+ *
58
+ * // Category plus optional reporter context (any category, including Others).
59
+ * await CommentRepository.flagComment(commentId, {
60
+ * reason: ContentFlagReasonEnum.SpamOrScams,
61
+ * detail: 'Repeated promotional links',
62
+ * })
5
63
  * ```
6
64
  *
65
+ * Reports a comment to moderation. Three call shapes are accepted (see the overloads):
66
+ * id-only, an options object, and the deprecated legacy reason string. The public
67
+ * name only dispatches on the input shape; the two implementations are kept separate
68
+ * so the legacy path is untouched by the new contract:
69
+ *
70
+ * - `undefined` or a string → `flagCommentWithReasonString` (unchanged legacy mapping)
71
+ * - anything else → `flagCommentWithOptions` (validated `{ reason, detail? }`)
72
+ *
7
73
  * @param commentId The ID of the comment to flag
8
- * @param reason the reason to flag the comment
9
- * @returns the created report result
74
+ * @param input an options object `{ reason, detail? }`, a legacy reason string, or nothing
75
+ * @returns `true` when the report was created
10
76
  *
11
77
  * @category Comment API
12
78
  * @async
13
79
  * */
14
- export declare const flagComment: (commentId: Amity.Comment['commentId'], reason?: Amity.ContentFlagReason) => Promise<boolean>;
80
+ export declare const flagComment: FlagComment;
81
+ export {};
15
82
  //# sourceMappingURL=flagComment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flagComment.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/api/flagComment.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;KAYK;AACL,eAAO,MAAM,WAAW,cACX,aAAa,CAAC,WAAW,CAAC,WAC5B,MAAM,iBAAiB,KAC/B,QAAQ,OAAO,CA2BjB,CAAC"}
1
+ {"version":3,"file":"flagComment.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/api/flagComment.ts"],"names":[],"mappings":"AAIA,aAAK,WAAW,GAAG;IACjB;;;;;;;;;;OAUG;IACH,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9E;;;;;;;;;;;;;;;;;OAiBG;IACH,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7F;;;;;;;;;;;;;;;OAeG;IACH,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7F,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BK;AACL,eAAO,MAAM,WAAW,EAAE,WAMoB,CAAC"}
@@ -0,0 +1,13 @@
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 `api/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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flagCommentWithOptions.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/internalApi/flagCommentWithOptions.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,cACtB,aAAa,CAAC,WAAW,CAAC,WAC5B,MAAM,kBAAkB,KAChC,QAAQ,OAAO,CAoBjB,CAAC"}
@@ -0,0 +1,17 @@
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 `api/flagComment.ts`.
11
+ *
12
+ * Not itself deprecated: it implements the deprecated legacy-string overload of the public
13
+ * `flagComment`, which carries the deprecation tag. New code should use `flagCommentWithOptions`
14
+ * (the `{ reason, detail? }` contract). This path stays available throughout the current major version.
15
+ */
16
+ export declare const flagCommentWithReasonString: (commentId: Amity.Comment['commentId'], reason?: Amity.ContentFlagReason) => Promise<boolean>;
17
+ //# sourceMappingURL=flagCommentWithReasonString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flagCommentWithReasonString.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/internalApi/flagCommentWithReasonString.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,2BAA2B,cAC3B,aAAa,CAAC,WAAW,CAAC,WAC5B,MAAM,iBAAiB,KAC/B,QAAQ,OAAO,CA2BjB,CAAC"}
@@ -7,4 +7,6 @@ export * from './hardDeleteComment';
7
7
  export * from './flagComment';
8
8
  export * from './unflagComment';
9
9
  export * from './isCommentFlaggedByMe';
10
+ export * from './flagCommentWithReasonString';
11
+ export * from './flagCommentWithOptions';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/internalApi/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/internalApi/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=flagCommentWithOptions.integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flagCommentWithOptions.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/commentRepository/internalApi/tests/integration/flagCommentWithOptions.integration.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=flagCommentWithReasonString.integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flagCommentWithReasonString.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/commentRepository/internalApi/tests/integration/flagCommentWithReasonString.integration.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=serverErrorCodes.integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverErrorCodes.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/core/transports/tests/integration/serverErrorCodes.integration.test.ts"],"names":[],"mappings":""}