How microsoft/kiota-typescript works
Main Components
a. Core Layer (Abstractions Package):
• Authentication Providers
• Serialization Core
• Request/Response Handling
• Store Management
• Base Client Infrastructure
b. HTTP Implementation Layer:
• Fetch Implementation
• Middleware Pipeline
• Request Adapters
c. Serialization Implementations:
• JSON Serialization
• Form Serialization
• Multipart Serialization
• Text Serialization
d. Authentication Implementations:
• Azure Authentication
• SharePoint Framework (SPFx) Authentication
Relationships and Flow
┌─────────────────────────────────────────────────────────┐
• Client Applications │
• ┬─────────────────────────┘
• ▼
┌─────────────────────────────────────────────────────────┐
• Bundle Package │
• ┬─────────────────────────┘
• ▼
┌─────────────────────────────────────────────────────────┐
• Core Abstractions Layer │
• ┬─────────────┬────────────────┬───────────┤
• Authentication│Serialization│Request Handling│ Store │
• Interface │ Interface │ Interface │Interface │
• ┴─────────────┴────────────────┴───────────┘
• ▲ ▲ ▲ ▲
┌───────┴──────┐ ┌────┴─────┐ ┌──────┴───────┐ ┌─┴────────┐
• Authentication│ │Serializer │ │HTTP Client │ │Store │
• Implementations│ │Implementations│Implementations│Implementations│
• ┘ └──────────┘ └──────────────┘ └──────────┘
Important Elements to Highlight
a. Middleware Pipeline:
Request → [Middleware Chain] → HTTP Client → Response
• Chaos Handler
• Compression Handler
• Retry Handler
• Telemetry Handler
• User Agent Handler
b. Serialization Support:
• JSON
• Form
• Multipart
• Text
Implementation Details
Technical aspects:
• TypeScript implementation
• Browser and Node.js support
• Middleware pattern
• Plugin architecture for authentication
• Extensible serialization system
Integration Points
• External service connections
• Authentication providers
• HTTP endpoints
• Client application integration points