Skip to content

Commit

Permalink
feat: query/store SourceMember modstore
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Dec 4, 2024
1 parent 8b05aa5 commit 2568ca5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/shared/remote/fileOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const revisionToRemoteChangeElement = (memberRevision: MemberRevision): R
revisionCounter: memberRevision.RevisionCounter,
changedBy: memberRevision.ChangedBy,
memberIdOrName: memberRevision.MemberIdOrName,
lastModifiedDate: memberRevision.LastModifiedDate,
});

export const upgradeFileContents = (contents: ContentsV0): ContentsV1 => ({
Expand All @@ -70,6 +71,7 @@ export const upgradeFileContents = (contents: ContentsV0): ContentsV1 => ({
lastRetrievedFromServer: value.lastRetrievedFromServer ?? undefined,
ChangedBy: 'unknown',
MemberIdOrName: 'unknown',
LastModifiedDate: 'unknown',
},
])
),
Expand Down
2 changes: 2 additions & 0 deletions src/shared/remote/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export type SourceMember = {
MemberIdOrName: string;
/** userID of the person who made change */
ChangedBy: string;
LastModifiedDate: string;
};

export type MemberRevision = SourceMember & {
Expand All @@ -57,4 +58,5 @@ export const SOURCE_MEMBER_FIELDS = [
'RevisionCounter',
'IsNewMember',
'ChangedBy',
'LastModifiedDate',
] satisfies Array<keyof SourceMember>;
1 change: 1 addition & 0 deletions src/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type RemoteChangeElement = {
modified?: boolean;
changedBy: string;
revisionCounter: number;
lastModifiedDate: string;
/** the ID of the metadata that was changed. Each metadata type has a different 3-char prefix */
memberIdOrName: string;
};
Expand Down

0 comments on commit 2568ca5

Please sign in to comment.