@envoy/envoy-integrations-sdk / EnvoyResponse
Use to type your res object in Envoy event handlers.
| Name | Type |
|---|---|
Body |
Body = unknown |
-
Response↳ EnvoyResponse
• send: (body?: Body) => EnvoyResponse<Body>
▸ (body?): EnvoyResponse<Body>
| Name | Type |
|---|---|
body? |
Body |
EnvoyResponse<Body>
Response.send
• sendFailed: (message: string, debugInfo?: unknown, ...attachments: EnvoyPluginJobAttachment[]) => void
Marks the job as "failed". The message will be communicated to the Envoy Dashboard user.
• sendFailedScreen: (message: string, debugInfo?: unknown, ...attachments: EnvoyPluginScreenerJobAttachment, ) => void
Halts processing of the job. The message will be communicated to the Envoy Dashboard user and a pop up modal for access approval will be displayed.
▸ (message, debugInfo?, ...attachments): void
| Name | Type |
|---|---|
message |
string |
debugInfo? |
unknown |
...attachments |
EnvoyPluginJobAttachment[] |
void
• sendIgnored: (message: string, debugInfo?: unknown, ...attachments: EnvoyPluginJobAttachment[]) => void
Marks the job as "ignored". Useful when you explicitly do not want to handle the event.
▸ (message, debugInfo?, ...attachments): void
| Name | Type |
|---|---|
message |
string |
debugInfo? |
unknown |
...attachments |
EnvoyPluginJobAttachment[] |
void
• sendOngoing: (debugInfo?: unknown) => void
Marks the job as "ongoing". This is useful for long-running event handling. Later on, you should update the job using EnvoyPluginJob.complete, EnvoyPluginJob.fail, or EnvoyPluginJob.ignore.
▸ (debugInfo?): void
| Name | Type |
|---|---|
debugInfo? |
unknown |
void