Skip to content

Commit

Permalink
Remove deprecated fields from the frontend (#4490)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Oct 4, 2023
1 parent 7fb6d79 commit 206db67
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 150 deletions.
6 changes: 0 additions & 6 deletions frontend/openchat-agent/src/services/community/candid/idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,6 @@ export const idlFactory = ({ IDL }) => {
'mentions' : IDL.Vec(Mention),
'my_metrics' : ChatMetrics,
});
const MessageIndexRange = IDL.Record({
'end' : MessageIndex,
'start' : MessageIndex,
});
const MessageReport = IDL.Record({
'notes' : IDL.Opt(IDL.Text),
'timestamp' : TimestampMillis,
Expand Down Expand Up @@ -576,13 +572,11 @@ export const idlFactory = ({ IDL }) => {
'events_ttl' : IDL.Opt(Milliseconds),
'last_updated' : TimestampMillis,
'avatar_id' : IDL.Opt(IDL.Nat),
'next_message_expiry' : IDL.Opt(TimestampMillis),
'membership' : IDL.Opt(ChannelMembership),
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : IDL.Bool,
'min_visible_message_index' : MessageIndex,
'member_count' : IDL.Nat32,
'expired_messages' : IDL.Vec(MessageIndexRange),
'latest_message' : IDL.Opt(MessageEventWrapper),
});
const ChannelSummaryResponse = IDL.Variant({
Expand Down
10 changes: 0 additions & 10 deletions frontend/openchat-agent/src/services/community/candid/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,11 @@ export interface CommunityCanisterChannelSummary {
'events_ttl' : [] | [Milliseconds],
'last_updated' : TimestampMillis,
'avatar_id' : [] | [bigint],
'next_message_expiry' : [] | [TimestampMillis],
'membership' : [] | [ChannelMembership],
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : boolean,
'min_visible_message_index' : MessageIndex,
'member_count' : number,
'expired_messages' : Array<MessageIndexRange>,
'latest_message' : [] | [MessageEventWrapper],
}
export interface CommunityCanisterChannelSummaryUpdates {
Expand Down Expand Up @@ -579,7 +577,6 @@ export interface DirectChatSummary {
'last_updated' : TimestampMillis,
'latest_event_index' : EventIndex,
'read_by_me_up_to' : [] | [MessageIndex],
'expired_messages' : Array<MessageIndexRange>,
'archived' : boolean,
'my_metrics' : ChatMetrics,
'latest_message' : MessageEventWrapper,
Expand All @@ -594,7 +591,6 @@ export interface DirectChatSummaryUpdates {
'updated_events' : Array<[number, bigint]>,
'read_by_me_up_to' : [] | [MessageIndex],
'chat_id' : ChatId,
'newly_expired_messages' : Array<MessageIndexRange>,
'archived' : [] | [boolean],
'my_metrics' : [] | [ChatMetrics],
'latest_message' : [] | [MessageEventWrapper],
Expand Down Expand Up @@ -794,15 +790,13 @@ export interface GroupCanisterGroupChatSummary {
'joined' : TimestampMillis,
'avatar_id' : [] | [bigint],
'rules_accepted' : boolean,
'next_message_expiry' : [] | [TimestampMillis],
'latest_threads' : Array<GroupCanisterThreadDetails>,
'frozen' : [] | [FrozenGroupInfo],
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : boolean,
'min_visible_message_index' : MessageIndex,
'mentions' : Array<Mention>,
'chat_id' : ChatId,
'expired_messages' : Array<MessageIndexRange>,
'participant_count' : number,
'my_metrics' : ChatMetrics,
'latest_message' : [] | [MessageEventWrapper],
Expand All @@ -824,14 +818,12 @@ export interface GroupCanisterGroupChatSummaryUpdates {
'unfollowed_threads' : Uint32Array | number[],
'avatar_id' : DocumentIdUpdate,
'rules_accepted' : [] | [boolean],
'next_message_expiry' : TimestampUpdate,
'latest_threads' : Array<GroupCanisterThreadDetails>,
'frozen' : FrozenGroupUpdate,
'latest_event_index' : [] | [EventIndex],
'updated_events' : Array<[[] | [number], number, bigint]>,
'mentions' : Array<Mention>,
'chat_id' : ChatId,
'newly_expired_messages' : Array<MessageIndexRange>,
'participant_count' : [] | [number],
'my_metrics' : [] | [ChatMetrics],
'latest_message' : [] | [MessageEventWrapper],
Expand Down Expand Up @@ -865,7 +857,6 @@ export interface GroupChatSummary {
'joined' : TimestampMillis,
'avatar_id' : [] | [bigint],
'rules_accepted' : boolean,
'next_message_expiry' : [] | [TimestampMillis],
'latest_threads' : Array<ThreadSyncDetails>,
'frozen' : [] | [FrozenGroupInfo],
'latest_event_index' : EventIndex,
Expand All @@ -875,7 +866,6 @@ export interface GroupChatSummary {
'mentions' : Array<Mention>,
'chat_id' : ChatId,
'date_read_pinned' : [] | [TimestampMillis],
'expired_messages' : Array<MessageIndexRange>,
'archived' : boolean,
'participant_count' : number,
'my_metrics' : ChatMetrics,
Expand Down
13 changes: 0 additions & 13 deletions frontend/openchat-agent/src/services/group/candid/idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1053,10 +1053,6 @@ export const idlFactory = ({ IDL }) => {
'mentioned_by' : UserId,
'message_index' : MessageIndex,
});
const MessageIndexRange = IDL.Record({
'end' : MessageIndex,
'start' : MessageIndex,
});
const GroupCanisterGroupChatSummary = IDL.Record({
'is_public' : IDL.Bool,
'permissions' : GroupPermissions,
Expand All @@ -1075,15 +1071,13 @@ export const idlFactory = ({ IDL }) => {
'joined' : TimestampMillis,
'avatar_id' : IDL.Opt(IDL.Nat),
'rules_accepted' : IDL.Bool,
'next_message_expiry' : IDL.Opt(TimestampMillis),
'latest_threads' : IDL.Vec(GroupCanisterThreadDetails),
'frozen' : IDL.Opt(FrozenGroupInfo),
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : IDL.Bool,
'min_visible_message_index' : MessageIndex,
'mentions' : IDL.Vec(Mention),
'chat_id' : ChatId,
'expired_messages' : IDL.Vec(MessageIndexRange),
'participant_count' : IDL.Nat32,
'my_metrics' : ChatMetrics,
'latest_message' : IDL.Opt(MessageEventWrapper),
Expand Down Expand Up @@ -1113,11 +1107,6 @@ export const idlFactory = ({ IDL }) => {
'SetToNone' : IDL.Null,
'SetToSome' : IDL.Nat,
});
const TimestampUpdate = IDL.Variant({
'NoChange' : IDL.Null,
'SetToNone' : IDL.Null,
'SetToSome' : TimestampMillis,
});
const FrozenGroupUpdate = IDL.Variant({
'NoChange' : IDL.Null,
'SetToNone' : IDL.Null,
Expand All @@ -1140,7 +1129,6 @@ export const idlFactory = ({ IDL }) => {
'unfollowed_threads' : IDL.Vec(MessageIndex),
'avatar_id' : DocumentIdUpdate,
'rules_accepted' : IDL.Opt(IDL.Bool),
'next_message_expiry' : TimestampUpdate,
'latest_threads' : IDL.Vec(GroupCanisterThreadDetails),
'frozen' : FrozenGroupUpdate,
'latest_event_index' : IDL.Opt(EventIndex),
Expand All @@ -1149,7 +1137,6 @@ export const idlFactory = ({ IDL }) => {
),
'mentions' : IDL.Vec(Mention),
'chat_id' : ChatId,
'newly_expired_messages' : IDL.Vec(MessageIndexRange),
'participant_count' : IDL.Opt(IDL.Nat32),
'my_metrics' : IDL.Opt(ChatMetrics),
'latest_message' : IDL.Opt(MessageEventWrapper),
Expand Down
10 changes: 0 additions & 10 deletions frontend/openchat-agent/src/services/group/candid/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,11 @@ export interface CommunityCanisterChannelSummary {
'events_ttl' : [] | [Milliseconds],
'last_updated' : TimestampMillis,
'avatar_id' : [] | [bigint],
'next_message_expiry' : [] | [TimestampMillis],
'membership' : [] | [ChannelMembership],
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : boolean,
'min_visible_message_index' : MessageIndex,
'member_count' : number,
'expired_messages' : Array<MessageIndexRange>,
'latest_message' : [] | [MessageEventWrapper],
}
export interface CommunityCanisterChannelSummaryUpdates {
Expand Down Expand Up @@ -465,7 +463,6 @@ export interface DirectChatSummary {
'last_updated' : TimestampMillis,
'latest_event_index' : EventIndex,
'read_by_me_up_to' : [] | [MessageIndex],
'expired_messages' : Array<MessageIndexRange>,
'archived' : boolean,
'my_metrics' : ChatMetrics,
'latest_message' : MessageEventWrapper,
Expand All @@ -480,7 +477,6 @@ export interface DirectChatSummaryUpdates {
'updated_events' : Array<[number, bigint]>,
'read_by_me_up_to' : [] | [MessageIndex],
'chat_id' : ChatId,
'newly_expired_messages' : Array<MessageIndexRange>,
'archived' : [] | [boolean],
'my_metrics' : [] | [ChatMetrics],
'latest_message' : [] | [MessageEventWrapper],
Expand Down Expand Up @@ -659,15 +655,13 @@ export interface GroupCanisterGroupChatSummary {
'joined' : TimestampMillis,
'avatar_id' : [] | [bigint],
'rules_accepted' : boolean,
'next_message_expiry' : [] | [TimestampMillis],
'latest_threads' : Array<GroupCanisterThreadDetails>,
'frozen' : [] | [FrozenGroupInfo],
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : boolean,
'min_visible_message_index' : MessageIndex,
'mentions' : Array<Mention>,
'chat_id' : ChatId,
'expired_messages' : Array<MessageIndexRange>,
'participant_count' : number,
'my_metrics' : ChatMetrics,
'latest_message' : [] | [MessageEventWrapper],
Expand All @@ -689,14 +683,12 @@ export interface GroupCanisterGroupChatSummaryUpdates {
'unfollowed_threads' : Uint32Array | number[],
'avatar_id' : DocumentIdUpdate,
'rules_accepted' : [] | [boolean],
'next_message_expiry' : TimestampUpdate,
'latest_threads' : Array<GroupCanisterThreadDetails>,
'frozen' : FrozenGroupUpdate,
'latest_event_index' : [] | [EventIndex],
'updated_events' : Array<[[] | [number], number, bigint]>,
'mentions' : Array<Mention>,
'chat_id' : ChatId,
'newly_expired_messages' : Array<MessageIndexRange>,
'participant_count' : [] | [number],
'my_metrics' : [] | [ChatMetrics],
'latest_message' : [] | [MessageEventWrapper],
Expand Down Expand Up @@ -730,7 +722,6 @@ export interface GroupChatSummary {
'joined' : TimestampMillis,
'avatar_id' : [] | [bigint],
'rules_accepted' : boolean,
'next_message_expiry' : [] | [TimestampMillis],
'latest_threads' : Array<ThreadSyncDetails>,
'frozen' : [] | [FrozenGroupInfo],
'latest_event_index' : EventIndex,
Expand All @@ -740,7 +731,6 @@ export interface GroupChatSummary {
'mentions' : Array<Mention>,
'chat_id' : ChatId,
'date_read_pinned' : [] | [TimestampMillis],
'expired_messages' : Array<MessageIndexRange>,
'archived' : boolean,
'participant_count' : number,
'my_metrics' : ChatMetrics,
Expand Down
10 changes: 0 additions & 10 deletions frontend/openchat-agent/src/services/groupIndex/candid/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,11 @@ export interface CommunityCanisterChannelSummary {
'events_ttl' : [] | [Milliseconds],
'last_updated' : TimestampMillis,
'avatar_id' : [] | [bigint],
'next_message_expiry' : [] | [TimestampMillis],
'membership' : [] | [ChannelMembership],
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : boolean,
'min_visible_message_index' : MessageIndex,
'member_count' : number,
'expired_messages' : Array<MessageIndexRange>,
'latest_message' : [] | [MessageEventWrapper],
}
export interface CommunityCanisterChannelSummaryUpdates {
Expand Down Expand Up @@ -412,7 +410,6 @@ export interface DirectChatSummary {
'last_updated' : TimestampMillis,
'latest_event_index' : EventIndex,
'read_by_me_up_to' : [] | [MessageIndex],
'expired_messages' : Array<MessageIndexRange>,
'archived' : boolean,
'my_metrics' : ChatMetrics,
'latest_message' : MessageEventWrapper,
Expand All @@ -427,7 +424,6 @@ export interface DirectChatSummaryUpdates {
'updated_events' : Array<[number, bigint]>,
'read_by_me_up_to' : [] | [MessageIndex],
'chat_id' : ChatId,
'newly_expired_messages' : Array<MessageIndexRange>,
'archived' : [] | [boolean],
'my_metrics' : [] | [ChatMetrics],
'latest_message' : [] | [MessageEventWrapper],
Expand Down Expand Up @@ -623,15 +619,13 @@ export interface GroupCanisterGroupChatSummary {
'joined' : TimestampMillis,
'avatar_id' : [] | [bigint],
'rules_accepted' : boolean,
'next_message_expiry' : [] | [TimestampMillis],
'latest_threads' : Array<GroupCanisterThreadDetails>,
'frozen' : [] | [FrozenGroupInfo],
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : boolean,
'min_visible_message_index' : MessageIndex,
'mentions' : Array<Mention>,
'chat_id' : ChatId,
'expired_messages' : Array<MessageIndexRange>,
'participant_count' : number,
'my_metrics' : ChatMetrics,
'latest_message' : [] | [MessageEventWrapper],
Expand All @@ -653,14 +647,12 @@ export interface GroupCanisterGroupChatSummaryUpdates {
'unfollowed_threads' : Uint32Array | number[],
'avatar_id' : DocumentIdUpdate,
'rules_accepted' : [] | [boolean],
'next_message_expiry' : TimestampUpdate,
'latest_threads' : Array<GroupCanisterThreadDetails>,
'frozen' : FrozenGroupUpdate,
'latest_event_index' : [] | [EventIndex],
'updated_events' : Array<[[] | [number], number, bigint]>,
'mentions' : Array<Mention>,
'chat_id' : ChatId,
'newly_expired_messages' : Array<MessageIndexRange>,
'participant_count' : [] | [number],
'my_metrics' : [] | [ChatMetrics],
'latest_message' : [] | [MessageEventWrapper],
Expand Down Expand Up @@ -694,7 +686,6 @@ export interface GroupChatSummary {
'joined' : TimestampMillis,
'avatar_id' : [] | [bigint],
'rules_accepted' : boolean,
'next_message_expiry' : [] | [TimestampMillis],
'latest_threads' : Array<ThreadSyncDetails>,
'frozen' : [] | [FrozenGroupInfo],
'latest_event_index' : EventIndex,
Expand All @@ -704,7 +695,6 @@ export interface GroupChatSummary {
'mentions' : Array<Mention>,
'chat_id' : ChatId,
'date_read_pinned' : [] | [TimestampMillis],
'expired_messages' : Array<MessageIndexRange>,
'archived' : boolean,
'participant_count' : number,
'my_metrics' : ChatMetrics,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ export const idlFactory = ({ IDL }) => {
'mentions' : IDL.Vec(Mention),
'my_metrics' : ChatMetrics,
});
const MessageIndexRange = IDL.Record({
'end' : MessageIndex,
'start' : MessageIndex,
});
const MessageReport = IDL.Record({
'notes' : IDL.Opt(IDL.Text),
'timestamp' : TimestampMillis,
Expand Down Expand Up @@ -515,13 +511,11 @@ export const idlFactory = ({ IDL }) => {
'events_ttl' : IDL.Opt(Milliseconds),
'last_updated' : TimestampMillis,
'avatar_id' : IDL.Opt(IDL.Nat),
'next_message_expiry' : IDL.Opt(TimestampMillis),
'membership' : IDL.Opt(ChannelMembership),
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : IDL.Bool,
'min_visible_message_index' : MessageIndex,
'member_count' : IDL.Nat32,
'expired_messages' : IDL.Vec(MessageIndexRange),
'latest_message' : IDL.Opt(MessageEventWrapper),
});
const CommunityPermissionRole = IDL.Variant({
Expand Down Expand Up @@ -644,15 +638,13 @@ export const idlFactory = ({ IDL }) => {
'joined' : TimestampMillis,
'avatar_id' : IDL.Opt(IDL.Nat),
'rules_accepted' : IDL.Bool,
'next_message_expiry' : IDL.Opt(TimestampMillis),
'latest_threads' : IDL.Vec(GroupCanisterThreadDetails),
'frozen' : IDL.Opt(FrozenGroupInfo),
'latest_event_index' : EventIndex,
'history_visible_to_new_joiners' : IDL.Bool,
'min_visible_message_index' : MessageIndex,
'mentions' : IDL.Vec(Mention),
'chat_id' : ChatId,
'expired_messages' : IDL.Vec(MessageIndexRange),
'participant_count' : IDL.Nat32,
'my_metrics' : ChatMetrics,
'latest_message' : IDL.Opt(MessageEventWrapper),
Expand Down
Loading

0 comments on commit 206db67

Please sign in to comment.