1234567891011121314151617181920212223242526272829303132333435363738 |
-
- export type Outcome = "Success" | "Error"
-
- /* Responses */
- export class Response{
- constructor(
- public message?:string
- ){}
- }
-
- export class SuccessResponse extends Response{
- result:Outcome = "Success"
-
- constructor(
- message?:string
- ){
- super(message)
- }
- }
-
- export class ErrorResponse extends Response{
- result:Outcome = "Error"
-
- constructor(
- message: string = "Unknown error"
- ){
- super(message)
- }
- }
-
- export class SubscriptionResponse extends SuccessResponse{
- constructor(
- public uid: string,
- message?:string
- ){
- super(message)
- }
- }
|