Kind: Interface
Source: src/adapter/aws-lambda/types.ts
Part of: Adapter
ClientContextClient models client application metadata carried by the AWS Lambda adapter. It provides typed fields for the installation, application identity, and version information associated with a request.
Properties
| Property | Type |
|---|---|
installationId | string |
appTitle | string |
appVersionName | string |
appVersionCode | string |
appPackageName | string |
Diagram
mermaidgraph LR ClientContextClient --> installationId ClientContextClient --> appTitle ClientContextClient --> appVersionName ClientContextClient --> appVersionCode ClientContextClient --> appPackageName
Usage
tsimport type { ClientContextClient } from './types';
const client: ClientContextClient = {
installationId: 'device-token',
appTitle: 'Example App',
appVersionName: 'release-name',
appVersionCode: 'release-code',
appPackageName: 'com.example.app',
};
function getClientLabel(context: ClientContextClient): string {
return `${context.appTitle} (${context.appPackageName})`;
}
console.log(getClientLabel(client));
AI Coding Instructions
- Keep every property as a string, including version codes and installation identifiers.
- Preserve the field names when mapping AWS Lambda client-context data into this interface.
- Treat client-provided values as request metadata and validate them before using them for authorization or persistence.
- Handle missing client context before constructing a
ClientContextClientvalue.
How it works
ClientContextClient is an exported TypeScript interface describing the client portion of a Lambda client context. src/adapter/aws-lambda/types.ts:8-20
An object typed as ClientContextClient has five required string fields:
installationId—src/adapter/aws-lambda/types.ts:16appTitle—src/adapter/aws-lambda/types.ts:17appVersionName—src/adapter/aws-lambda/types.ts:18appVersionCode—src/adapter/aws-lambda/types.ts:19appPackageName— `src/adapter/aws-lambda/types.ts:20
ClientContext requires its client field to conform to this interface. src/adapter/aws-lambda/types.ts:8-13 LambdaContext may contain that enclosing ClientContext through its optional clientContext field. src/adapter/aws-lambda/types.ts:35-45
The interface declares no methods, runtime validation, error handling, or side effects. src/adapter/aws-lambda/types.ts:15-21
Was this page helpful?