-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
460 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/node_modules/grpc-web/index.d.ts b/node_modules/grpc-web/index.d.ts | ||
index 09fb671..9b6b233 100644 | ||
--- a/node_modules/grpc-web/index.d.ts | ||
+++ b/node_modules/grpc-web/index.d.ts | ||
@@ -71,8 +71,8 @@ declare module "grpc-web" { | ||
export class MethodDescriptor<REQ, RESP> { | ||
constructor(name: string, | ||
methodType: string, | ||
- requestType: new (...args: unknown[]) => REQ, | ||
- responseType: new (...args: unknown[]) => RESP, | ||
+ requestType: new (...args: any) => REQ, | ||
+ responseType: new (...args: any) => RESP, | ||
requestSerializeFn: any, | ||
responseDeserializeFn: any); | ||
getName(): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
import { User } from '../../models/User'; | ||
|
||
export type IamResponse = { | ||
status: 'success' | 'cached'; | ||
user: User; | ||
}; | ||
|
||
export interface IIamRepository { | ||
loginWithEmailPassword(email: string, password: string): Promise<User>; | ||
registerWithEmailPassword(email: string, password: string): Promise<void>; | ||
isAuthenticated(): boolean; | ||
logout(): void; | ||
getUser(): User | null; | ||
setUser(user: User): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import Todo from '../../models/Todo'; | ||
|
||
type GetAllTodoSuccessResponse = { | ||
status: 'success'; | ||
todos: Todo[]; | ||
error: undefined; | ||
}; | ||
|
||
type GetAllTodoCachedResponse = { | ||
status: 'cached'; | ||
todos: Todo[]; | ||
error: undefined; | ||
}; | ||
|
||
type GetAllTodoErrorResponse = { | ||
status: 'error'; | ||
error: string; | ||
todos: undefined; | ||
}; | ||
|
||
export type GetAllTodoResponse = | ||
| GetAllTodoSuccessResponse | ||
| GetAllTodoCachedResponse | ||
| GetAllTodoErrorResponse; | ||
|
||
export interface ITodoRepository { | ||
getAllTodo(callback: (asyncResponse: GetAllTodoResponse) => void): GetAllTodoResponse; | ||
modifyTodoTitle(id: string, title: string): Promise<void>; | ||
completeTodo(id: string): Promise<void>; | ||
uncompleteTodo(id: string): Promise<void>; | ||
deleteTodo(id: string): Promise<void>; | ||
addTodo(title: string): Promise<void>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,3 @@ | ||
import { User } from '../../../models/User'; | ||
import { IamRepository } from './IamRepository'; | ||
|
||
export type IamResponse = { | ||
status: 'success' | 'cached'; | ||
user: User; | ||
}; | ||
|
||
interface IIamRepository { | ||
loginWithEmailPassword(email: string, password: string): Promise<User>; | ||
registerWithEmailPassword(email: string, password: string): Promise<void>; | ||
isAuthenticated(): boolean; | ||
logout(): void; | ||
getUser(): User | null; | ||
setUser(user: User): void; | ||
} | ||
|
||
export { IamRepository } from './IamRepository'; | ||
export type { IIamRepository }; | ||
export default IamRepository; |
Oops, something went wrong.