@amityco/ts-sdk 7.28.0 → 7.28.1-1ea66ee3.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 (124) hide show
  1. package/dist/@types/core/errors.d.ts +4 -1
  2. package/dist/@types/core/errors.d.ts.map +1 -1
  3. package/dist/@types/core/transport.d.ts +1 -0
  4. package/dist/@types/core/transport.d.ts.map +1 -1
  5. package/dist/@types/domains/channel.d.ts +13 -1
  6. package/dist/@types/domains/channel.d.ts.map +1 -1
  7. package/dist/@types/domains/client.d.ts +86 -0
  8. package/dist/@types/domains/client.d.ts.map +1 -1
  9. package/dist/@types/domains/content.d.ts +11 -0
  10. package/dist/@types/domains/content.d.ts.map +1 -1
  11. package/dist/@types/domains/user.d.ts +31 -0
  12. package/dist/@types/domains/user.d.ts.map +1 -1
  13. package/dist/channelRepository/observers/getChannels/ChannelLiveCollectionController.d.ts.map +1 -1
  14. package/dist/channelRepository/observers/searchChannels/SearchChannelLiveCollectionController.d.ts.map +1 -1
  15. package/dist/channelRepository/observers/tests/integrations/getChannelsSortByLastMessage.integration.test.d.ts +2 -0
  16. package/dist/channelRepository/observers/tests/integrations/getChannelsSortByLastMessage.integration.test.d.ts.map +1 -0
  17. package/dist/channelRepository/utils/channelActivityOnLoginHandler.d.ts +16 -0
  18. package/dist/channelRepository/utils/channelActivityOnLoginHandler.d.ts.map +1 -0
  19. package/dist/channelRepository/utils/tests/integrations/channelActivity.integration.test.d.ts +2 -0
  20. package/dist/channelRepository/utils/tests/integrations/channelActivity.integration.test.d.ts.map +1 -0
  21. package/dist/channelRepository/utils/tests/updateChannelActivityTimestamps.test.d.ts +2 -0
  22. package/dist/channelRepository/utils/tests/updateChannelActivityTimestamps.test.d.ts.map +1 -0
  23. package/dist/channelRepository/utils/updateChannelActivityTimestamps.d.ts +34 -0
  24. package/dist/channelRepository/utils/updateChannelActivityTimestamps.d.ts.map +1 -0
  25. package/dist/client/api/createClient.d.ts.map +1 -1
  26. package/dist/client/api/getModuleSettings.d.ts +25 -0
  27. package/dist/client/api/getModuleSettings.d.ts.map +1 -0
  28. package/dist/client/api/index.d.ts +1 -0
  29. package/dist/client/api/index.d.ts.map +1 -1
  30. package/dist/client/api/resumeSession.d.ts.map +1 -1
  31. package/dist/client/api/setupLoginSubscriptions.d.ts.map +1 -1
  32. package/dist/client/api/tests/integration/moduleSettings.integration.test.d.ts +2 -0
  33. package/dist/client/api/tests/integration/moduleSettings.integration.test.d.ts.map +1 -0
  34. package/dist/client/index.d.ts +1 -0
  35. package/dist/client/index.d.ts.map +1 -1
  36. package/dist/client/utils/parseModuleSettings.d.ts +9 -0
  37. package/dist/client/utils/parseModuleSettings.d.ts.map +1 -0
  38. package/dist/client/utils/resolveModuleAvailability.d.ts +39 -0
  39. package/dist/client/utils/resolveModuleAvailability.d.ts.map +1 -0
  40. package/dist/client/utils/tests/resolveModuleAvailability.test.d.ts +2 -0
  41. package/dist/client/utils/tests/resolveModuleAvailability.test.d.ts.map +1 -0
  42. package/dist/commentRepository/api/flagComment.d.ts +72 -5
  43. package/dist/commentRepository/api/flagComment.d.ts.map +1 -1
  44. package/dist/commentRepository/internalApi/flagCommentWithOptions.d.ts +13 -0
  45. package/dist/commentRepository/internalApi/flagCommentWithOptions.d.ts.map +1 -0
  46. package/dist/commentRepository/internalApi/flagCommentWithReasonString.d.ts +17 -0
  47. package/dist/commentRepository/internalApi/flagCommentWithReasonString.d.ts.map +1 -0
  48. package/dist/commentRepository/internalApi/index.d.ts +2 -0
  49. package/dist/commentRepository/internalApi/index.d.ts.map +1 -1
  50. package/dist/commentRepository/internalApi/tests/integration/flagCommentWithOptions.integration.test.d.ts +2 -0
  51. package/dist/commentRepository/internalApi/tests/integration/flagCommentWithOptions.integration.test.d.ts.map +1 -0
  52. package/dist/commentRepository/internalApi/tests/integration/flagCommentWithReasonString.integration.test.d.ts +2 -0
  53. package/dist/commentRepository/internalApi/tests/integration/flagCommentWithReasonString.integration.test.d.ts.map +1 -0
  54. package/dist/core/errors.d.ts +20 -0
  55. package/dist/core/errors.d.ts.map +1 -1
  56. package/dist/core/microtasks.d.ts.map +1 -1
  57. package/dist/core/query/sorting.d.ts +10 -0
  58. package/dist/core/query/sorting.d.ts.map +1 -1
  59. package/dist/core/query/tests/sorting.test.d.ts +2 -0
  60. package/dist/core/query/tests/sorting.test.d.ts.map +1 -0
  61. package/dist/core/tests/microtasks.test.d.ts +2 -0
  62. package/dist/core/tests/microtasks.test.d.ts.map +1 -0
  63. package/dist/core/transports/tests/integration/serverErrorCodes.integration.test.d.ts +2 -0
  64. package/dist/core/transports/tests/integration/serverErrorCodes.integration.test.d.ts.map +1 -0
  65. package/dist/core/transports/tests/moduleNotEntitled.test.d.ts +2 -0
  66. package/dist/core/transports/tests/moduleNotEntitled.test.d.ts.map +1 -0
  67. package/dist/core/transports/utils.d.ts.map +1 -1
  68. package/dist/index.cjs.js +853 -68
  69. package/dist/index.d.ts +2 -0
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.esm.js +851 -69
  72. package/dist/index.umd.js +2 -2
  73. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts +1 -0
  74. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts.map +1 -1
  75. package/dist/messageRepository/api/createMessage.d.ts.map +1 -1
  76. package/dist/messageRepository/api/flagMessage.d.ts +73 -6
  77. package/dist/messageRepository/api/flagMessage.d.ts.map +1 -1
  78. package/dist/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.d.ts +2 -0
  79. package/dist/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.d.ts.map +1 -0
  80. package/dist/messageRepository/internalApi/flagMessageWithOptions.d.ts +13 -0
  81. package/dist/messageRepository/internalApi/flagMessageWithOptions.d.ts.map +1 -0
  82. package/dist/messageRepository/internalApi/flagMessageWithReasonString.d.ts +18 -0
  83. package/dist/messageRepository/internalApi/flagMessageWithReasonString.d.ts.map +1 -0
  84. package/dist/messageRepository/internalApi/tests/integration/flagMessageWithOptions.integration.test.d.ts +2 -0
  85. package/dist/messageRepository/internalApi/tests/integration/flagMessageWithOptions.integration.test.d.ts.map +1 -0
  86. package/dist/messageRepository/internalApi/tests/integration/flagMessageWithReasonString.integration.test.d.ts +2 -0
  87. package/dist/messageRepository/internalApi/tests/integration/flagMessageWithReasonString.integration.test.d.ts.map +1 -0
  88. package/dist/postRepository/api/flagPost.d.ts +73 -6
  89. package/dist/postRepository/api/flagPost.d.ts.map +1 -1
  90. package/dist/postRepository/api/tests/integration/flagPost.overloads.integration.test.d.ts +2 -0
  91. package/dist/postRepository/api/tests/integration/flagPost.overloads.integration.test.d.ts.map +1 -0
  92. package/dist/postRepository/internalApi/flagPostWithOptions.d.ts +13 -0
  93. package/dist/postRepository/internalApi/flagPostWithOptions.d.ts.map +1 -0
  94. package/dist/postRepository/internalApi/flagPostWithReasonString.d.ts +17 -0
  95. package/dist/postRepository/internalApi/flagPostWithReasonString.d.ts.map +1 -0
  96. package/dist/postRepository/internalApi/index.d.ts +2 -0
  97. package/dist/postRepository/internalApi/index.d.ts.map +1 -1
  98. package/dist/postRepository/internalApi/tests/integration/flagPostWithOptions.integration.test.d.ts +2 -0
  99. package/dist/postRepository/internalApi/tests/integration/flagPostWithOptions.integration.test.d.ts.map +1 -0
  100. package/dist/postRepository/internalApi/tests/integration/flagPostWithReasonString.integration.test.d.ts +2 -0
  101. package/dist/postRepository/internalApi/tests/integration/flagPostWithReasonString.integration.test.d.ts.map +1 -0
  102. package/dist/userRepository/api/flagUser.d.ts +50 -9
  103. package/dist/userRepository/api/flagUser.d.ts.map +1 -1
  104. package/dist/userRepository/api/flagUserBehavior.d.ts +29 -0
  105. package/dist/userRepository/api/flagUserBehavior.d.ts.map +1 -0
  106. package/dist/userRepository/api/flagUserProfile.d.ts +29 -0
  107. package/dist/userRepository/api/flagUserProfile.d.ts.map +1 -0
  108. package/dist/userRepository/api/index.d.ts +2 -0
  109. package/dist/userRepository/api/index.d.ts.map +1 -1
  110. package/dist/userRepository/api/tests/integration/flagUser.overloads.integration.test.d.ts +2 -0
  111. package/dist/userRepository/api/tests/integration/flagUser.overloads.integration.test.d.ts.map +1 -0
  112. package/dist/userRepository/api/tests/integration/flagUserBehavior.integration.test.d.ts +2 -0
  113. package/dist/userRepository/api/tests/integration/flagUserBehavior.integration.test.d.ts.map +1 -0
  114. package/dist/userRepository/api/tests/integration/flagUserProfile.integration.test.d.ts +2 -0
  115. package/dist/userRepository/api/tests/integration/flagUserProfile.integration.test.d.ts.map +1 -0
  116. package/dist/userRepository/utils/submitUserReport.d.ts +10 -0
  117. package/dist/userRepository/utils/submitUserReport.d.ts.map +1 -0
  118. package/dist/userRepository/utils/userReport.d.ts +35 -0
  119. package/dist/userRepository/utils/userReport.d.ts.map +1 -0
  120. package/dist/utils/contentFlag.d.ts +28 -0
  121. package/dist/utils/contentFlag.d.ts.map +1 -0
  122. package/dist/utils/tests/dummy/channel.d.ts +4 -0
  123. package/dist/utils/tests/dummy/channel.d.ts.map +1 -1
  124. package/package.json +1 -1
@@ -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":""}
@@ -47,6 +47,26 @@ export declare class ASCConnectionError extends ASCError {
47
47
  */
48
48
  constructor(event: string, message?: string);
49
49
  }
50
+ /**
51
+ * Thrown when the network does not own a module the call needs. Raised from
52
+ * any module endpoint under `enforce` enforcement, mapped from app code
53
+ * `400325` — never from HTTP 403 alone, which already covers a role problem
54
+ * (`400300` / `400301`), a visitor (`403999`) and a bot (`403998`).
55
+ *
56
+ * `modules` carries **every** key the refusal named, as raw strings, so a
57
+ * caller can say which entitlement is absent without a second request.
58
+ *
59
+ * @category Errors
60
+ */
61
+ export declare class AmityModuleNotEntitledError extends ASCApiError {
62
+ readonly modules: string[];
63
+ readonly type = "AmityModuleNotEntitledError";
64
+ /**
65
+ * @param message The server's message, e.g. `Module not entitled: chat, live`
66
+ * @param modules Every module key from the rejection's `data.modules`
67
+ */
68
+ constructor(message: string, modules?: string[]);
69
+ }
50
70
  /**
51
71
  * Input sanitization related error
52
72
  * @category Errors
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH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AU;CAM1C;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,QAAQ;IACvC;;;OAGG;gBAES,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU;CAG5E;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;aAIlB,KAAK,EAAE,MAAM;IAHzC;;OAEG;gBACyB,KAAK,EAAE,MAAM,EAAE,OAAO,SAA2C;CAS9F;AAED;;;;;;;;;;GAUG;AACH,qBAAa,2BAA4B,SAAQ,WAAW;aAOb,OAAO,EAAE,MAAM,EAAE;IAN9D,QAAQ,CAAC,IAAI,iCAAiC;IAE9C;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAkB,OAAO,GAAE,MAAM,EAAO;CAGpE;AAED;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,QAAQ;IACpD;;OAEG;gBACS,OAAO,EAAE,MAAM;CAG5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"microtasks.d.ts","sourceRoot":"","sources":["../../src/core/microtasks.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,YAAY,SAAU,QAAQ,SAQ1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,SAAU,QAAQ,SAGxC,CAAC"}
1
+ {"version":3,"file":"microtasks.d.ts","sourceRoot":"","sources":["../../src/core/microtasks.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,YAAY,SAAU,QAAQ,SAa1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,SAAU,QAAQ,SAGxC,CAAC"}
@@ -61,6 +61,16 @@ export declare const sortByLastUpdated: SortingFunc<{
61
61
  export declare const sortByLastActivity: SortingFunc<{
62
62
  lastActivity: Date | number | string;
63
63
  }>;
64
+ /**
65
+ * Sorting a channel collection by the time of its newest message (newest first).
66
+ * Channels whose `lastMessageAt` is `null` sort last, ordered by `createdAt`
67
+ * (newest first) among themselves, matching the server's `sortBy=lastMessage`
68
+ * order so the local sort agrees with the page order.
69
+ */
70
+ export declare const sortByLastMessage: SortingFunc<{
71
+ lastMessageAt?: Date | number | string | null;
72
+ createdAt: Date | number | string;
73
+ }>;
64
74
  /**
65
75
  * Filter items by untilAt timestamp based on sort direction
66
76
  * - For 'lastCreated' (newest first): untilAt acts as lower bound, excludes items older than boundary
@@ -1 +1 @@
1
- {"version":3,"file":"sorting.d.ts","sourceRoot":"","sources":["../../../src/core/query/sorting.ts"],"names":[],"mappings":"AAIA,aAAK,WAAW,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAMnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAGrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,CAG/D,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAG7D,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC;IAAE,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,CAGhC,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM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AAG,MAAM,CAAA;CAAE,CAGnC,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC;IAC1C,aAAa,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9C,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;CACnC,CAQA,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe;eAA2B,IAAI,GAAG,MAAM,GAAG,MAAM;wBAElE,IAAI,GAAG,MAAM,GAAG,MAAM,UACvB,aAAa,GAAG,cAAc,QAWvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,YAAa,MAAM,KAAG,MAAM,GAAG,SAW1D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,cACtB,IAAI,GAAG,MAAM,GAAG,MAAM,WACxB,IAAI,GAAG,MAAM,GAAG,MAAM,UACvB,aAAa,GAAG,cAAc,KACrC,OAWF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sorting.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sorting.test.d.ts","sourceRoot":"","sources":["../../../../src/core/query/tests/sorting.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=microtasks.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"microtasks.test.d.ts","sourceRoot":"","sources":["../../../src/core/tests/microtasks.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":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=moduleNotEntitled.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moduleNotEntitled.test.d.ts","sourceRoot":"","sources":["../../../../src/core/transports/tests/moduleNotEntitled.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/transports/utils.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,uCAYzB,CAAC;AAYF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,QAAO,MAAkD,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/transports/utils.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,uCAyBzB,CAAC;AAYF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,QAAO,MAAkD,CAAC"}