Page MenuHomePhabricator

D12827.id.diff
No OneTemporary

D12827.id.diff

diff --git a/lib/types/message-types.js b/lib/types/message-types.js
--- a/lib/types/message-types.js
+++ b/lib/types/message-types.js
@@ -564,39 +564,35 @@
+newerThan?: ?number,
};
+export type SimpleMessagesPayload = {
+ +rawMessageInfos: $ReadOnlyArray<RawMessageInfo>,
+ +truncationStatuses: MessageTruncationStatuses,
+};
+
export type FetchMessageInfosRequest = {
+cursors: ThreadCursors,
+numberPerThread?: ?number,
};
-export type FetchMessageInfosResponse = {
- +rawMessageInfos: $ReadOnlyArray<RawMessageInfo>,
- +truncationStatuses: MessageTruncationStatuses,
+export type FetchMessageInfosResponse = $ReadOnly<{
+ ...SimpleMessagesPayload,
+userInfos: UserInfos,
-};
-export type FetchMessageInfosResult = {
- +rawMessageInfos: $ReadOnlyArray<RawMessageInfo>,
- +truncationStatuses: MessageTruncationStatuses,
-};
+}>;
+export type FetchMessageInfosResult = SimpleMessagesPayload;
export type FetchMessageInfosPayload = {
+threadID: string,
+rawMessageInfos: $ReadOnlyArray<RawMessageInfo>,
+truncationStatus: MessageTruncationStatus,
};
-export type MessagesResponse = {
- +rawMessageInfos: $ReadOnlyArray<RawMessageInfo>,
- +truncationStatuses: MessageTruncationStatuses,
+export type MessagesResponse = $ReadOnly<{
+ ...SimpleMessagesPayload,
+currentAsOf: number,
-};
+}>;
export const messagesResponseValidator: TInterface<MessagesResponse> =
tShape<MessagesResponse>({
rawMessageInfos: t.list(rawMessageInfoValidator),
truncationStatuses: messageTruncationStatusesValidator,
currentAsOf: t.Number,
});
-export type SimpleMessagesPayload = {
- +rawMessageInfos: $ReadOnlyArray<RawMessageInfo>,
- +truncationStatuses: MessageTruncationStatuses,
-};
export const defaultNumberPerThread = 20;
export const defaultMaxMessageAge = 14 * 24 * 60 * 60 * 1000; // 2 weeks

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 12:39 PM (7 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2700035
Default Alt Text
D12827.id.diff (1 KB)

Event Timeline