How to Type an `HttpApi` in Effect Typescript Library?
Hello all...so how can I type my
HttpApiHttpApi? I am beginning to think it is not possible, export const mpApi = HttpApi.make('myApi').add(
HttpApiGroup.make('chat')
.add(
HttpApiEndpoint.get('getStream', '/stream')
.setUrlParams(
Schema.Struct({
message: Schema.String,
threadId: Schema.optional(Schema.String)
})
)
.addSuccess(
Schema.String.pipe( // <!-- this, not really adequate
HttpApiSchema.withEncoding({
kind: 'Text',
contentType: 'application/x-ndjson'
})
)
)
)
)
)export const mpApi = HttpApi.make('myApi').add(
HttpApiGroup.make('chat')
.add(
HttpApiEndpoint.get('getStream', '/stream')
.setUrlParams(
Schema.Struct({
message: Schema.String,
threadId: Schema.optional(Schema.String)
})
)
.addSuccess(
Schema.String.pipe( // <!-- this, not really adequate
HttpApiSchema.withEncoding({
kind: 'Text',
contentType: 'application/x-ndjson'
})
)
)
)
)
)