MCPcopy Create free account
hub / github.com/ShaanCoding/makeread.me / ServiceResponse

Class ServiceResponse

backend/src/common/models/serviceResponse.ts:8–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6}
7
8export class ServiceResponse<T = null> {
9 success: boolean
10 message: string
11 responseObject: T
12 statusCode: number
13
14 constructor(status: ResponseStatus, message: string, responseObject: T, statusCode: number) {
15 this.success = status === ResponseStatus.Success
16 this.message = message
17 this.responseObject = responseObject
18 this.statusCode = statusCode
19 }
20}
21
22export const ServiceResponseSchema = <T extends z.ZodTypeAny>(dataSchema: T) =>
23 z.object({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected