Skip to content

ClientContextClient

reference
1 min readUpdated

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

PropertyType
installationIdstring
appTitlestring
appVersionNamestring
appVersionCodestring
appPackageNamestring

Diagram

mermaid
graph LR
  ClientContextClient --> installationId
  ClientContextClient --> appTitle
  ClientContextClient --> appVersionName
  ClientContextClient --> appVersionCode
  ClientContextClient --> appPackageName

Usage

ts
import 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 ClientContextClient value.

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:

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?

Download as PDF
ClientContextClient — Hono (narrator proof)