@squidcloud/backend 1.0.478 → 1.0.481

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,12 @@ import { AiStatusMessage, AuthWithApiKey, AuthWithBearer, ClientId, RunContext,
2
2
  import { SquidFile } from '../../internal-common/src/public-types-backend/bundle-api.public-types';
3
3
  import { TenantModuleId } from '../../internal-common/src/public-types-backend/bundle-data.public-types';
4
4
  import { WorkspaceClient } from './workspace-client';
5
+ /** The content of a webhook or OpenAPI protocol response: body, status code, and headers, all optional. */
6
+ interface ProtocolResponseContent {
7
+ body?: unknown;
8
+ statusCode?: number;
9
+ headers?: Record<string, unknown>;
10
+ }
5
11
  /**
6
12
  * A base class for all the different types of Squid backend services. This class serves as a container
7
13
  * for the various methods implemented in the backend in order to customize the Squid backend for an application.
@@ -94,11 +100,7 @@ export declare class SquidService {
94
100
  * @param content The response content including optional body, status code, and headers.
95
101
  * @throws An object marked as a webhook response.
96
102
  */
97
- throwWebhookResponse(content: Partial<{
98
- body: unknown;
99
- statusCode: number;
100
- headers: Record<string, unknown>;
101
- }>): never;
103
+ throwWebhookResponse(content: ProtocolResponseContent): never;
102
104
  /**
103
105
  * Constructs a response for an OpenAPI operation. This function is typically used within an OpenAPI handler.
104
106
  *
@@ -115,11 +117,7 @@ export declare class SquidService {
115
117
  * @param content The response content including optional body, status code, and headers.
116
118
  * @throws An object marked as an OpenAPI response.
117
119
  */
118
- throwOpenApiResponse(content: Partial<{
119
- body: unknown;
120
- statusCode: number;
121
- headers: Record<string, unknown>;
122
- }>): never;
120
+ throwOpenApiResponse(content: ProtocolResponseContent): never;
123
121
  /**
124
122
  * Converts a file to a SquidFile object. This function is useful when you want to return a file using OpenAPI (tsoa
125
123
  * decorators).
@@ -152,3 +150,4 @@ export declare function getSquid(): Squid;
152
150
  * main {@link getSquid} instance.
153
151
  */
154
152
  export declare function getPassiveSquid(): Squid;
153
+ export {};