flexport-sdk-patterns

Featured

Apply production-ready Flexport API patterns for TypeScript and Python. Use when building typed HTTP clients, implementing pagination, or establishing team coding standards for Flexport logistics integration. Trigger: "flexport SDK patterns", "flexport best practices", "flexport client wrapper".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Flexport SDK Patterns ## Overview Production-ready patterns for the Flexport REST API v2. Since Flexport has no official npm/pip SDK, you build typed HTTP clients. Key patterns: singleton client, paginated iteration, retry wrapper, and Zod response validation. ## Instructions ### Pattern 1: Singleton Client with Auto-Retry ```typescript // src/flexport/client.ts import { z } from 'zod'; class FlexportClient { private static instance: FlexportClient | null = null; private base = 'https://api.flexport.com'; private headers: Record<string, string>; private constructor(apiKey: string) { this.headers = { 'Authorization': `Bearer ${apiKey}`, 'Flexport-Version': '2', 'Content-Type': 'application/json', }; } static getInstance(): FlexportClient { if (!this.instance) { const key = process.env.FLEXPORT_API_KEY; if (!key) throw new Error('Missing FLEXPORT_API_KEY'); this.instance = new FlexportClient(key); } return this.instance; } async request<T>(path: string, options: RequestInit = {}): Promise<T> { const res = await fetch(`${this.base}${path}`, { ...options, headers: { ...this.headers, ...options.headers } }); if (res.status === 429) { const retryAfter = parseInt(res.headers.get('Retry-After') || '60'); await new Promise(r => setTimeout(r, retryAfter * 1000)); return this.request(path, options); // Retry once } if (!res.ok) { const body = await res.text(); ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

salesloft-sdk-patterns

Apply production-ready SalesLoft API patterns for TypeScript and Python. Use when building SalesLoft integrations, implementing pagination, or wrapping the REST API v2 with typed clients. Trigger: "salesloft SDK patterns", "salesloft best practices", "salesloft client wrapper".

2,266 Updated today
jeremylongshore
AI & Automation Featured

elevenlabs-sdk-patterns

Apply production-ready ElevenLabs SDK patterns for TypeScript and Python. Use when implementing ElevenLabs integrations, refactoring SDK usage, or establishing team coding standards for audio AI applications. Trigger: "elevenlabs SDK patterns", "elevenlabs best practices", "elevenlabs code patterns", "idiomatic elevenlabs", "elevenlabs typescript".

2,266 Updated today
jeremylongshore
AI & Automation Featured

instantly-sdk-patterns

Apply production-ready Instantly.ai API client patterns for TypeScript and Python. Use when building reusable API wrappers, implementing retry logic, or establishing coding standards for Instantly integrations. Trigger with phrases like "instantly SDK patterns", "instantly best practices", "instantly client wrapper", "instantly code patterns", "idiomatic instantly".

2,266 Updated today
jeremylongshore
AI & Automation Solid

webflow-sdk-patterns

Apply production-ready Webflow SDK patterns — singleton client, typed error handling, pagination helpers, and raw response access for the webflow-api package. Use when implementing Webflow integrations, refactoring SDK usage, or establishing team coding standards. Trigger with phrases like "webflow SDK patterns", "webflow best practices", "webflow code patterns", "idiomatic webflow", "webflow typescript".

2,266 Updated today
jeremylongshore
AI & Automation Featured

attio-sdk-patterns

Production-ready patterns for the Attio REST API: typed client, retry with backoff, pagination iterators, and multi-tenant factory. Trigger: "attio SDK patterns", "attio best practices", "attio client wrapper", "idiomatic attio", "attio TypeScript patterns".

2,266 Updated today
jeremylongshore