The list of your application's api keys.
Returns the assets directory for your application.
the assets directory for your application.
The context object for the current request. This object contains information about the current request, such as the current user, the IP address, the user agent used, the request headers, and more.
The list of your application's secrets as defined in the Squid Console.
Returns the Squid client instance for your application.
the Squid client instance for your application.
Asserts that the current method call includes an API key in the context. Throws an error if called without an API key.
Asserts that the method is called within a valid request scope. Throws an error if no request context can be found.
Converts a file to a SquidFile object. This function is useful when you want to return a file using OpenAPI (tsoa decorators).
Constructs a response for an OpenAPI operation. This function is typically used within an OpenAPI handler.
Optional
body: unknownThe payload of the response. If not provided, defaults to an empty string.
Optional
statusCode: numberThe HTTP status code for the response. Defaults to 200 if a body is present, otherwise 204.
Optional
headers: Record<string, unknown>An object containing response headers. Defaults to an empty object if not provided.
The openapi response.
A helper method to create a webhook response. This method should be used inside a webhook handler (function decorated with @webhook).
Optional
body: unknownThe body of the response.
Optional
statusCode: numberThe status code of the response.
Optional
headers: Record<string, unknown>The headers of the response.
The webhook response.
Returns the API key used by the backend for your application.
Returns the auth object for the current request or undefined if unauthenticated or if using a user token.
The auth object for the current request or undefined if unauthenticated or if using a user token.
Returns the auth object for the current request or undefined if unauthenticated or if using an API key.
The auth object for the current request or undefined if unauthenticated or if using an API key.
Returns true if the current request is authenticated (using a user token or an API key).
true if the current request is authenticated (using a user token or an API key).
Throws an OpenAPI response. This function is useful when you want to interrupt normal execution and immediately return a response from an OpenAPI handler.
The response content including optional body, status code, and headers.
Throws a webhook response. This function is useful when you want to interrupt normal execution and immediately return a response from a webhook handler.
The response content including optional body, status code, and headers.
A base class for all the different types of Squid backend services. This class serves as a container for the various methods implemented in the backend in order to customize the Squid backend for an application.