@henrylabs/mcp 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,20 +52,20 @@ const EMBEDDED_METHODS = [
52
52
  stainlessPath: '(resource) products > (method) search',
53
53
  qualified: 'client.products.search',
54
54
  params: [
55
- "{ query: string; searchType: 'text'; country?: string; cursor?: number; limit?: number; maxPrice?: number; merchant?: string; minPrice?: number; mode?: 'async' | 'sync'; sortBy?: 'lowToHigh' | 'highToLow'; } | { imageUrl: string; searchType: 'image'; country?: string; limit?: number; mode?: 'async' | 'sync'; };",
55
+ "{ filters: { query: string; type: 'text'; country?: string; price?: { currency?: string; max?: number; min?: number; }; sortBy?: 'price-low-to-high' | 'price-high-to-low'; } | { imageUrl: string; type: 'image'; country?: string; }; type: 'global'; cursor?: number; limit?: number; mode?: 'async' | 'sync'; } | { filters: { merchant: string; }; type: 'merchant'; cursor?: number; limit?: number; mode?: 'async' | 'sync'; query?: string; };",
56
56
  ],
57
- response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { pagination: { nextCursor: string; previousCursor: string; }; products: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: object[]; originalPrice?: object; price?: object; sku?: string; variants?: object[]; }[]; }; }",
57
+ response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { pagination: { nextCursor: number; previousCursor: number; }; products: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: object[]; options?: object | object; originalPrice?: object; price?: object; sku?: string; }[]; }; }",
58
58
  perLanguage: {
59
59
  http: {
60
- example: 'curl https://api.henrylabs.ai/v1/product/search \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "query": "Air Max Shoes",\n "searchType": "text",\n "country": "US",\n "limit": 20,\n "maxPrice": 100,\n "merchant": "Nike",\n "minPrice": 1,\n "mode": "async",\n "sortBy": "lowToHigh"\n }\'',
60
+ example: 'curl https://api.henrylabs.ai/v1/product/search \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "filters": {\n "query": "Air Max Shoes",\n "type": "text"\n },\n "type": "global",\n "limit": 20\n }\'',
61
61
  },
62
62
  python: {
63
63
  method: 'products.search',
64
- example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.products.search(\n query="Air Max Shoes",\n search_type="text",\n country="US",\n cursor=0,\n limit=40,\n max_price=100,\n merchant="Nike",\n min_price=1,\n mode="async",\n sort_by="lowToHigh",\n)\nprint(response.ref_id)',
64
+ example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.products.search(\n filters={\n "type": "text",\n "query": "Air Max Shoes",\n "country": "US",\n "price": {\n "min": 1,\n "max": 100,\n "currency": "USD",\n },\n "sort_by": "price-low-to-high",\n },\n type="global",\n cursor=0,\n limit=40,\n mode="async",\n)\nprint(response.ref_id)',
65
65
  },
66
66
  typescript: {
67
67
  method: 'client.products.search',
68
- example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.products.search({\n query: 'Air Max Shoes',\n searchType: 'text',\n country: 'US',\n limit: 40,\n maxPrice: 100,\n merchant: 'Nike',\n minPrice: 1,\n mode: 'async',\n sortBy: 'lowToHigh',\n});\n\nconsole.log(response.refId);",
68
+ example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.products.search({\n filters: {\n type: 'text',\n query: 'Air Max Shoes',\n country: 'US',\n price: {\n min: 1,\n max: 100,\n currency: 'USD',\n },\n sortBy: 'price-low-to-high',\n },\n type: 'global',\n limit: 40,\n mode: 'async',\n});\n\nconsole.log(response.refId);",
69
69
  },
70
70
  },
71
71
  },
@@ -78,8 +78,8 @@ const EMBEDDED_METHODS = [
78
78
  stainlessPath: '(resource) products > (method) poll_search',
79
79
  qualified: 'client.products.pollSearch',
80
80
  params: ['refId: string;'],
81
- response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { pagination: { nextCursor: string; previousCursor: string; }; products: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: object[]; originalPrice?: object; price?: object; sku?: string; variants?: object[]; }[]; }; }",
82
- markdown: "## poll_search\n\n`client.products.pollSearch(refId: string): { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }`\n\n**get** `/product/search/status`\n\nCheck the status of a product search retrieval job and get results when ready.\n\n### Parameters\n\n- `refId: string`\n Reference ID used for checking status\n\n### Returns\n\n- `{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { pagination: { nextCursor: string; previousCursor: string; }; products: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: object[]; originalPrice?: object; price?: object; sku?: string; variants?: object[]; }[]; }; }`\n\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'failed'`\n - `error?: object`\n - `result?: { pagination: { nextCursor: string; previousCursor: string; }; products: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; price?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; variants?: { name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; sku?: string; }[]; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.products.pollSearch({ refId: 'prs-ref_3fa85f64-5717-4562-b3fc' });\n\nconsole.log(response);\n```",
81
+ response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { pagination: { nextCursor: number; previousCursor: number; }; products: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: object[]; options?: object | object; originalPrice?: object; price?: object; sku?: string; }[]; }; }",
82
+ markdown: "## poll_search\n\n`client.products.pollSearch(refId: string): { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }`\n\n**get** `/product/search/status`\n\nCheck the status of a product search retrieval job and get results when ready.\n\n### Parameters\n\n- `refId: string`\n Reference ID used for checking status\n\n### Returns\n\n- `{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { pagination: { nextCursor: number; previousCursor: number; }; products: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: object[]; options?: object | object; originalPrice?: object; price?: object; sku?: string; }[]; }; }`\n\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'failed'`\n - `error?: object`\n - `result?: { pagination: { nextCursor: number; previousCursor: number; }; products: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; options?: { status: 'found'; values: { value: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; images?: object[]; label?: string; link?: string; nextOption?: object; }[]; label?: string; } | { message: string; status: 'unknown'; }; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; price?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.products.pollSearch({ refId: 'prs-ref_3fa85f64-5717-4562-b3fc' });\n\nconsole.log(response);\n```",
83
83
  perLanguage: {
84
84
  http: {
85
85
  example: 'curl https://api.henrylabs.ai/v1/product/search/status \\\n -H "x-api-key: $HENRY_SDK_API_KEY"',
@@ -102,20 +102,20 @@ const EMBEDDED_METHODS = [
102
102
  description: 'Fetch detailed information about a product from a given URL. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.',
103
103
  stainlessPath: '(resource) products > (method) details',
104
104
  qualified: 'client.products.details',
105
- params: ['link: string;', 'country?: string;', "mode?: 'async' | 'sync';", 'variant?: string | object;'],
106
- response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { host: string; link: string; merchant: string; name: string; price: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; metadata?: object; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; variants?: { name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; sku?: string; }[]; }; }",
107
- markdown: "## details\n\n`client.products.details(link: string, country?: string, mode?: 'async' | 'sync', variant?: string | object): { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }`\n\n**post** `/product/details`\n\nFetch detailed information about a product from a given URL. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.\n\n### Parameters\n\n- `link: string`\n Direct product URL\n\n- `country?: string`\n Country code for the product's location\n\n- `mode?: 'async' | 'sync'`\n Response mode. Use sync to wait up to 30 seconds for the backing worker flow to complete.\n\n- `variant?: string | object`\n Variant selection. Can be a simple string or a key-value object\n\n### Returns\n\n- `{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { host: string; link: string; merchant: string; name: string; price: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; metadata?: object; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; variants?: { name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; sku?: string; }[]; }; }`\n\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'failed'`\n - `error?: object`\n - `result?: { host: string; link: string; merchant: string; name: string; price: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; metadata?: object; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; variants?: { name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; sku?: string; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.products.details({ link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' });\n\nconsole.log(response);\n```",
105
+ params: ['link: string;', 'country?: string;', "mode?: 'async' | 'sync';", 'selectedOptions?: string[];'],
106
+ response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; options?: { status: 'found'; values: object[]; label?: string; } | { message: string; status: 'unknown'; }; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; price?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; }; }",
107
+ markdown: "## details\n\n`client.products.details(link: string, country?: string, mode?: 'async' | 'sync', selectedOptions?: string[]): { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }`\n\n**post** `/product/details`\n\nFetch detailed information about a product from a given URL. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.\n\n### Parameters\n\n- `link: string`\n Direct product URL\n\n- `country?: string`\n Country code for the product's location\n\n- `mode?: 'async' | 'sync'`\n Response mode. Use sync to wait up to 30 seconds for the backing worker flow to complete.\n\n- `selectedOptions?: string[]`\n An ordered array of option values to select for the product. Will be selected in the order listed.\n\n### Returns\n\n- `{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; options?: { status: 'found'; values: object[]; label?: string; } | { message: string; status: 'unknown'; }; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; price?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; }; }`\n\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'failed'`\n - `error?: object`\n - `result?: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; options?: { status: 'found'; values: { value: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; images?: { url: string; isFeatured?: boolean; }[]; label?: string; link?: string; nextOption?: object; }[]; label?: string; } | { message: string; status: 'unknown'; }; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; price?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.products.details({ link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' });\n\nconsole.log(response);\n```",
108
108
  perLanguage: {
109
109
  http: {
110
- example: 'curl https://api.henrylabs.ai/v1/product/details \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "country": "US",\n "mode": "async",\n "variant": {\n "size": "bar",\n "color": "bar"\n }\n }\'',
110
+ example: 'curl https://api.henrylabs.ai/v1/product/details \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "country": "US",\n "mode": "async",\n "selectedOptions": [\n "regular",\n "black",\n "10-w"\n ]\n }\'',
111
111
  },
112
112
  python: {
113
113
  method: 'products.details',
114
- example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.products.details(\n link="https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n country="US",\n mode="async",\n variant={\n "size": "10",\n "color": "Black",\n },\n)\nprint(response.ref_id)',
114
+ example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.products.details(\n link="https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n country="US",\n mode="async",\n)\nprint(response.ref_id)',
115
115
  },
116
116
  typescript: {
117
117
  method: 'client.products.details',
118
- example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.products.details({\n link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',\n country: 'US',\n mode: 'async',\n variant: { size: '10', color: 'Black' },\n});\n\nconsole.log(response.refId);",
118
+ example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.products.details({\n link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',\n country: 'US',\n mode: 'async',\n});\n\nconsole.log(response.refId);",
119
119
  },
120
120
  },
121
121
  },
@@ -128,8 +128,8 @@ const EMBEDDED_METHODS = [
128
128
  stainlessPath: '(resource) products > (method) poll_details',
129
129
  qualified: 'client.products.pollDetails',
130
130
  params: ['refId: string;'],
131
- response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { host: string; link: string; merchant: string; name: string; price: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; metadata?: object; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; variants?: { name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; sku?: string; }[]; }; }",
132
- markdown: "## poll_details\n\n`client.products.pollDetails(refId: string): { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }`\n\n**get** `/product/details/status`\n\nCheck the status of a product details retrieval job and get results when ready.\n\n### Parameters\n\n- `refId: string`\n Reference ID used for checking status\n\n### Returns\n\n- `{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { host: string; link: string; merchant: string; name: string; price: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; metadata?: object; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; variants?: { name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; sku?: string; }[]; }; }`\n\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'failed'`\n - `error?: object`\n - `result?: { host: string; link: string; merchant: string; name: string; price: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; metadata?: object; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; variants?: { name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; sku?: string; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.products.pollDetails({ refId: 'prd-ref_3fa85f64-5717-4562-b3fc' });\n\nconsole.log(response);\n```",
131
+ response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; options?: { status: 'found'; values: object[]; label?: string; } | { message: string; status: 'unknown'; }; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; price?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; }; }",
132
+ markdown: "## poll_details\n\n`client.products.pollDetails(refId: string): { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }`\n\n**get** `/product/details/status`\n\nCheck the status of a product details retrieval job and get results when ready.\n\n### Parameters\n\n- `refId: string`\n Reference ID used for checking status\n\n### Returns\n\n- `{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; options?: { status: 'found'; values: object[]; label?: string; } | { message: string; status: 'unknown'; }; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; price?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; }; }`\n\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'failed'`\n - `error?: object`\n - `result?: { host: string; link: string; merchant: string; name: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; description?: string; images?: { url: string; isFeatured?: boolean; }[]; options?: { status: 'found'; values: { value: string; availability?: 'in_stock' | 'limited_stock' | 'out_of_stock' | 'preorder' | 'backorder'; images?: { url: string; isFeatured?: boolean; }[]; label?: string; link?: string; nextOption?: object; }[]; label?: string; } | { message: string; status: 'unknown'; }; originalPrice?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; price?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; sku?: string; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.products.pollDetails({ refId: 'prd-ref_3fa85f64-5717-4562-b3fc' });\n\nconsole.log(response);\n```",
133
133
  perLanguage: {
134
134
  http: {
135
135
  example: 'curl https://api.henrylabs.ai/v1/product/details/status \\\n -H "x-api-key: $HENRY_SDK_API_KEY"',
@@ -153,23 +153,23 @@ const EMBEDDED_METHODS = [
153
153
  stainlessPath: '(resource) cart > (method) create',
154
154
  qualified: 'client.cart.create',
155
155
  params: [
156
- 'items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }[];',
156
+ 'items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[];',
157
157
  "settings?: { commissionFeeFixed?: { value: number; currency?: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; }; commissionFeePercent?: number; events?: { data: { points: number; type: 'give_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'give_points_per_spent'; } | { points: number; type: 'remove_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'remove_points_per_spent'; } | { tierUUID: string; type: 'give_tier'; } | { type: 'remove_tier'; } | { type: 'send_webhook'; webhookUUID: string; } | { type: 'send_email'; }[]; type: string; conditional?: { operator: 'equals' | 'not_equals'; type: 'tier'; value: string; } | { operator: string; type: 'points'; value: number; }; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; };",
158
158
  'tags?: object;',
159
159
  ],
160
160
  response: '{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }',
161
- markdown: "## create\n\n`client.cart.create(items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }[], settings?: { commissionFeeFixed?: { value: number; currency?: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }, tags?: object): { data: object; message: string; status: string; success: boolean; }`\n\n**post** `/cart`\n\nCreate a cart with one or more items and get a checkout URL\n\n### Parameters\n\n- `items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }[]`\n Items to include in the cart\n\n- `settings?: { commissionFeeFixed?: { value: number; currency?: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; }; commissionFeePercent?: number; events?: { data: { points: number; type: 'give_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'give_points_per_spent'; } | { points: number; type: 'remove_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'remove_points_per_spent'; } | { tierUUID: string; type: 'give_tier'; } | { type: 'remove_tier'; } | { type: 'send_webhook'; webhookUUID: string; } | { type: 'send_email'; }[]; type: string; conditional?: { operator: 'equals' | 'not_equals'; type: 'tier'; value: string; } | { operator: string; type: 'points'; value: number; }; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }`\n - `commissionFeeFixed?: { value: number; currency?: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; }`\n - `commissionFeePercent?: number`\n Commission percentage (0–100)\n - `events?: { data: { points: number; type: 'give_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'give_points_per_spent'; } | { points: number; type: 'remove_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'remove_points_per_spent'; } | { tierUUID: string; type: 'give_tier'; } | { type: 'remove_tier'; } | { type: 'send_webhook'; webhookUUID: string; } | { type: 'send_email'; }[]; type: string; conditional?: { operator: 'equals' | 'not_equals'; type: 'tier'; value: string; } | { operator: string; type: 'points'; value: number; }; }[]`\n List of events to trigger during checkout\n - `options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }`\n\n- `tags?: object`\n Key-value tags to associate with the cart\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst cart = await client.cart.create({ items: [{ link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' }] });\n\nconsole.log(cart);\n```",
161
+ markdown: "## create\n\n`client.cart.create(items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[], settings?: { commissionFeeFixed?: { value: number; currency?: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }, tags?: object): { data: object; message: string; status: string; success: boolean; }`\n\n**post** `/cart`\n\nCreate a cart with one or more items and get a checkout URL\n\n### Parameters\n\n- `items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]`\n Items to include in the cart\n\n- `settings?: { commissionFeeFixed?: { value: number; currency?: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; }; commissionFeePercent?: number; events?: { data: { points: number; type: 'give_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'give_points_per_spent'; } | { points: number; type: 'remove_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'remove_points_per_spent'; } | { tierUUID: string; type: 'give_tier'; } | { type: 'remove_tier'; } | { type: 'send_webhook'; webhookUUID: string; } | { type: 'send_email'; }[]; type: string; conditional?: { operator: 'equals' | 'not_equals'; type: 'tier'; value: string; } | { operator: string; type: 'points'; value: number; }; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }`\n - `commissionFeeFixed?: { value: number; currency?: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; }`\n - `commissionFeePercent?: number`\n Commission percentage (0–100)\n - `events?: { data: { points: number; type: 'give_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'give_points_per_spent'; } | { points: number; type: 'remove_points_fixed'; } | { perAmount: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; points: number; type: 'remove_points_per_spent'; } | { tierUUID: string; type: 'give_tier'; } | { type: 'remove_tier'; } | { type: 'send_webhook'; webhookUUID: string; } | { type: 'send_email'; }[]; type: string; conditional?: { operator: 'equals' | 'not_equals'; type: 'tier'; value: string; } | { operator: string; type: 'points'; value: number; }; }[]`\n List of events to trigger during checkout\n - `options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }`\n\n- `tags?: object`\n Key-value tags to associate with the cart\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst cart = await client.cart.create({ items: [{ link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' }] });\n\nconsole.log(cart);\n```",
162
162
  perLanguage: {
163
163
  http: {
164
- example: 'curl https://api.henrylabs.ai/v1/cart \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "items": [\n {\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "metadata": {\n "creatorSource": "bar"\n },\n "quantity": 2,\n "variant": {\n "size": "bar",\n "color": "bar"\n }\n }\n ]\n }\'',
164
+ example: 'curl https://api.henrylabs.ai/v1/cart \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "items": [\n {\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "metadata": {\n "creatorSource": "bar"\n },\n "quantity": 2,\n "selectedOptions": [\n "regular",\n "black",\n "10-w"\n ]\n }\n ]\n }\'',
165
165
  },
166
166
  python: {
167
167
  method: 'cart.create',
168
- example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\ncart = client.cart.create(\n items=[{\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "quantity": 2,\n "variant": {\n "size": "10",\n "color": "Black",\n },\n "metadata": {\n "creatorSource": "Frank Herbert"\n },\n }],\n settings={\n "options": {\n "allow_partial_purchase": True,\n "collect_buyer_email": "required",\n "collect_buyer_address": "optional",\n "collect_buyer_phone": "off",\n },\n "commission_fee_fixed": {\n "value": 1.99,\n "currency": "USD",\n },\n "commission_fee_percent": 10,\n "events": [],\n },\n)\nprint(cart.data)',
168
+ example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\ncart = client.cart.create(\n items=[{\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "quantity": 2,\n "selected_options": ["regular", "black", "10-w"],\n "metadata": {\n "creatorSource": "Frank Herbert"\n },\n }],\n settings={\n "options": {\n "allow_partial_purchase": True,\n "collect_buyer_email": "required",\n "collect_buyer_address": "optional",\n "collect_buyer_phone": "off",\n },\n "commission_fee_fixed": {\n "value": 1.99,\n "currency": "USD",\n },\n "commission_fee_percent": 10,\n "events": [],\n },\n)\nprint(cart.data)',
169
169
  },
170
170
  typescript: {
171
171
  method: 'client.cart.create',
172
- example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst cart = await client.cart.create({\n items: [\n {\n link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',\n quantity: 2,\n variant: { size: '10', color: 'Black' },\n metadata: { creatorSource: 'Frank Herbert' },\n },\n ],\n settings: {\n options: {\n allowPartialPurchase: true,\n collectBuyerEmail: 'required',\n collectBuyerAddress: 'optional',\n collectBuyerPhone: 'off',\n },\n commissionFeeFixed: { value: 1.99, currency: 'USD' },\n commissionFeePercent: 10,\n events: [],\n },\n});\n\nconsole.log(cart.data);",
172
+ example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst cart = await client.cart.create({\n items: [\n {\n link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',\n quantity: 2,\n selectedOptions: ['regular', 'black', '10-w'],\n metadata: { creatorSource: 'Frank Herbert' },\n },\n ],\n settings: {\n options: {\n allowPartialPurchase: true,\n collectBuyerEmail: 'required',\n collectBuyerAddress: 'optional',\n collectBuyerPhone: 'off',\n },\n commissionFeeFixed: { value: 1.99, currency: 'USD' },\n commissionFeePercent: 10,\n events: [],\n },\n});\n\nconsole.log(cart.data);",
173
173
  },
174
174
  },
175
175
  },
@@ -183,7 +183,7 @@ const EMBEDDED_METHODS = [
183
183
  qualified: 'client.cart.list',
184
184
  params: ['cartId?: string;', 'cursor?: string;', 'limit?: number;', 'tags?: object;'],
185
185
  response: '{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }[]; message: string; status: string; success: boolean; }',
186
- markdown: "## list\n\n`client.cart.list(cartId?: string, cursor?: string, limit?: number, tags?: object): { data: object[]; message: string; status: string; success: boolean; }`\n\n**get** `/cart`\n\nFetch a list of carts with optional filtering by cart ID or tags.\n\n### Parameters\n\n- `cartId?: string`\n Filter by a specific cart ID\n\n- `cursor?: string`\n Cursor returned from the previous response\n\n- `limit?: number`\n Limit the number of results\n\n- `tags?: object`\n Filter carts by key-value tags\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }[]; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }[]`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst carts = await client.cart.list();\n\nconsole.log(carts);\n```",
186
+ markdown: "## list\n\n`client.cart.list(cartId?: string, cursor?: string, limit?: number, tags?: object): { data: object[]; message: string; status: string; success: boolean; }`\n\n**get** `/cart`\n\nFetch a list of carts with optional filtering by cart ID or tags.\n\n### Parameters\n\n- `cartId?: string`\n Filter by a specific cart ID\n\n- `cursor?: string`\n Cursor returned from the previous response\n\n- `limit?: number`\n Limit the number of results\n\n- `tags?: object`\n Filter carts by key-value tags\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }[]; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }[]`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst carts = await client.cart.list();\n\nconsole.log(carts);\n```",
187
187
  perLanguage: {
188
188
  http: {
189
189
  example: 'curl https://api.henrylabs.ai/v1/cart \\\n -H "x-api-key: $HENRY_SDK_API_KEY"',
@@ -208,7 +208,7 @@ const EMBEDDED_METHODS = [
208
208
  qualified: 'client.cart.delete',
209
209
  params: ['cartId: string;'],
210
210
  response: '{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }',
211
- markdown: "## delete\n\n`client.cart.delete(cartId: string): { data: object; message: string; status: string; success: boolean; }`\n\n**delete** `/cart/{cartId}`\n\nDelete a cart by its unique identifier\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst cart = await client.cart.delete('crt_sa2aEsCz9PRM');\n\nconsole.log(cart);\n```",
211
+ markdown: "## delete\n\n`client.cart.delete(cartId: string): { data: object; message: string; status: string; success: boolean; }`\n\n**delete** `/cart/{cartId}`\n\nDelete a cart by its unique identifier\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst cart = await client.cart.delete('crt_sa2aEsCz9PRM');\n\nconsole.log(cart);\n```",
212
212
  perLanguage: {
213
213
  http: {
214
214
  example: 'curl https://api.henrylabs.ai/v1/cart/$CART_ID \\\n -X DELETE \\\n -H "x-api-key: $HENRY_SDK_API_KEY"',
@@ -233,21 +233,21 @@ const EMBEDDED_METHODS = [
233
233
  qualified: 'client.cart.item.add',
234
234
  params: [
235
235
  'cartId: string;',
236
- 'item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; };',
236
+ 'item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; };',
237
237
  ],
238
238
  response: '{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }',
239
- markdown: "## add\n\n`client.cart.item.add(cartId: string, item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }): { data: object; message: string; status: string; success: boolean; }`\n\n**post** `/cart/{cartId}/item`\n\nAdd an item to an existing cart.\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }`\n Item to add to the cart (can be object or stringified JSON)\n - `link: string`\n Direct product URL\n - `coupons?: string[]`\n List of coupon codes applied to this cart item\n - `metadata?: object`\n Misc metadata associated with this cart item\n - `quantity?: number`\n Quantity of this item\n - `shippingOption?: { id?: string; value?: string; }`\n Shipping option selected for this cart item\n - `variant?: string | object`\n Variant selection. Can be a simple string or a key-value object\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.item.add('crt_sa2aEsCz9PRM', { item: { link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' } });\n\nconsole.log(response);\n```",
239
+ markdown: "## add\n\n`client.cart.item.add(cartId: string, item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }): { data: object; message: string; status: string; success: boolean; }`\n\n**post** `/cart/{cartId}/item`\n\nAdd an item to an existing cart.\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }`\n Item to add to the cart (can be object or stringified JSON)\n - `link: string`\n Direct product URL\n - `coupons?: string[]`\n List of coupon codes applied to this cart item\n - `metadata?: object`\n Misc metadata associated with this cart item\n - `quantity?: number`\n Quantity of this item\n - `selectedOptions?: string[]`\n An ordered array of option values to select for the product. Will be selected in the order listed.\n - `selectedShipping?: { id?: string; value?: string; }`\n Shipping option selected for this cart item\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.item.add('crt_sa2aEsCz9PRM', { item: { link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' } });\n\nconsole.log(response);\n```",
240
240
  perLanguage: {
241
241
  http: {
242
- example: 'curl https://api.henrylabs.ai/v1/cart/$CART_ID/item \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "item": {\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "metadata": {\n "creatorSource": "bar"\n },\n "quantity": 1,\n "variant": {\n "size": "bar",\n "color": "bar"\n }\n }\n }\'',
242
+ example: 'curl https://api.henrylabs.ai/v1/cart/$CART_ID/item \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "item": {\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "metadata": {\n "creatorSource": "bar"\n },\n "quantity": 1,\n "selectedOptions": [\n "regular",\n "black",\n "10-w"\n ]\n }\n }\'',
243
243
  },
244
244
  python: {
245
245
  method: 'cart.item.add',
246
- example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.cart.item.add(\n cart_id="crt_sa2aEsCz9PRM",\n item={\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "quantity": 1,\n "variant": {\n "size": "10",\n "color": "Black",\n },\n "metadata": {\n "creatorSource": "Frank Herbert"\n },\n },\n)\nprint(response.data)',
246
+ example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.cart.item.add(\n cart_id="crt_sa2aEsCz9PRM",\n item={\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "quantity": 1,\n "selected_options": ["regular", "black", "10-w"],\n "metadata": {\n "creatorSource": "Frank Herbert"\n },\n },\n)\nprint(response.data)',
247
247
  },
248
248
  typescript: {
249
249
  method: 'client.cart.item.add',
250
- example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.cart.item.add('crt_sa2aEsCz9PRM', {\n item: {\n link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',\n quantity: 1,\n variant: { size: '10', color: 'Black' },\n metadata: { creatorSource: 'Frank Herbert' },\n },\n});\n\nconsole.log(response.data);",
250
+ example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.cart.item.add('crt_sa2aEsCz9PRM', {\n item: {\n link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',\n quantity: 1,\n selectedOptions: ['regular', 'black', '10-w'],\n metadata: { creatorSource: 'Frank Herbert' },\n },\n});\n\nconsole.log(response.data);",
251
251
  },
252
252
  },
253
253
  },
@@ -261,21 +261,21 @@ const EMBEDDED_METHODS = [
261
261
  qualified: 'client.cart.item.update',
262
262
  params: [
263
263
  'cartId: string;',
264
- 'item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; };',
264
+ 'item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; };',
265
265
  ],
266
266
  response: '{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }',
267
- markdown: "## update\n\n`client.cart.item.update(cartId: string, item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }): { data: object; message: string; status: string; success: boolean; }`\n\n**put** `/cart/{cartId}/item`\n\nUpdate an item in an existing cart.\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }`\n Item to update (can be object or stringified JSON)\n - `link: string`\n Direct product URL\n - `coupons?: string[]`\n List of coupon codes applied to this cart item\n - `metadata?: object`\n Misc metadata associated with this cart item\n - `quantity?: number`\n Quantity of this item\n - `shippingOption?: { id?: string; value?: string; }`\n Shipping option selected for this cart item\n - `variant?: string | object`\n Variant selection. Can be a simple string or a key-value object\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst item = await client.cart.item.update('crt_sa2aEsCz9PRM', { item: { link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' } });\n\nconsole.log(item);\n```",
267
+ markdown: "## update\n\n`client.cart.item.update(cartId: string, item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }): { data: object; message: string; status: string; success: boolean; }`\n\n**put** `/cart/{cartId}/item`\n\nUpdate an item in an existing cart.\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `item: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }`\n Item to update (can be object or stringified JSON)\n - `link: string`\n Direct product URL\n - `coupons?: string[]`\n List of coupon codes applied to this cart item\n - `metadata?: object`\n Misc metadata associated with this cart item\n - `quantity?: number`\n Quantity of this item\n - `selectedOptions?: string[]`\n An ordered array of option values to select for the product. Will be selected in the order listed.\n - `selectedShipping?: { id?: string; value?: string; }`\n Shipping option selected for this cart item\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst item = await client.cart.item.update('crt_sa2aEsCz9PRM', { item: { link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' } });\n\nconsole.log(item);\n```",
268
268
  perLanguage: {
269
269
  http: {
270
- example: 'curl https://api.henrylabs.ai/v1/cart/$CART_ID/item \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "item": {\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "metadata": {\n "creatorSource": "bar"\n },\n "quantity": 1,\n "variant": {\n "size": "bar",\n "color": "bar"\n }\n }\n }\'',
270
+ example: 'curl https://api.henrylabs.ai/v1/cart/$CART_ID/item \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "item": {\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "metadata": {\n "creatorSource": "bar"\n },\n "quantity": 1,\n "selectedOptions": [\n "regular",\n "black",\n "10-w"\n ]\n }\n }\'',
271
271
  },
272
272
  python: {
273
273
  method: 'cart.item.update',
274
- example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\nitem = client.cart.item.update(\n cart_id="crt_sa2aEsCz9PRM",\n item={\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "quantity": 1,\n "variant": {\n "size": "10",\n "color": "Black",\n },\n "metadata": {\n "creatorSource": "Frank Herbert"\n },\n },\n)\nprint(item.data)',
274
+ example: 'import os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\nitem = client.cart.item.update(\n cart_id="crt_sa2aEsCz9PRM",\n item={\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205",\n "quantity": 1,\n "selected_options": ["regular", "black", "10-w"],\n "metadata": {\n "creatorSource": "Frank Herbert"\n },\n },\n)\nprint(item.data)',
275
275
  },
276
276
  typescript: {
277
277
  method: 'client.cart.item.update',
278
- example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst item = await client.cart.item.update('crt_sa2aEsCz9PRM', {\n item: {\n link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',\n quantity: 1,\n variant: { size: '10', color: 'Black' },\n metadata: { creatorSource: 'Frank Herbert' },\n },\n});\n\nconsole.log(item.data);",
278
+ example: "import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst item = await client.cart.item.update('crt_sa2aEsCz9PRM', {\n item: {\n link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',\n quantity: 1,\n selectedOptions: ['regular', 'black', '10-w'],\n metadata: { creatorSource: 'Frank Herbert' },\n },\n});\n\nconsole.log(item.data);",
279
279
  },
280
280
  },
281
281
  },
@@ -289,7 +289,7 @@ const EMBEDDED_METHODS = [
289
289
  qualified: 'client.cart.item.remove',
290
290
  params: ['cartId: string;', 'link: string;'],
291
291
  response: '{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }',
292
- markdown: "## remove\n\n`client.cart.item.remove(cartId: string, link: string): { data: object; message: string; status: string; success: boolean; }`\n\n**delete** `/cart/{cartId}/item`\n\nRemove an item from a cart by its unique identifier\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `link: string`\n Direct product URL\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; shippingOption?: { id?: string; value?: string; }; variant?: string | object; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst item = await client.cart.item.remove('crt_sa2aEsCz9PRM', { link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' });\n\nconsole.log(item);\n```",
292
+ markdown: "## remove\n\n`client.cart.item.remove(cartId: string, link: string): { data: object; message: string; status: string; success: boolean; }`\n\n**delete** `/cart/{cartId}/item`\n\nRemove an item from a cart by its unique identifier\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `link: string`\n Direct product URL\n\n### Returns\n\n- `{ data: { cartId: string; checkoutUrl: string; data: { items: object[]; settings?: object; tags?: object; }; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { cartId: string; checkoutUrl: string; data: { items: { link: string; coupons?: string[]; metadata?: object; quantity?: number; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; settings?: { commissionFeeFixed?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; commissionFeePercent?: number; events?: { data: object | object | object | object | object | object | object | object[]; type: string; conditional?: object | object; }[]; options?: { allowPartialPurchase?: boolean; collectBuyerAddress?: 'off' | 'required' | 'optional'; collectBuyerEmail?: 'off' | 'required' | 'optional'; collectBuyerPhone?: 'off' | 'required' | 'optional'; }; }; tags?: object; }; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst item = await client.cart.item.remove('crt_sa2aEsCz9PRM', { link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205' });\n\nconsole.log(item);\n```",
293
293
  perLanguage: {
294
294
  http: {
295
295
  example: 'curl https://api.henrylabs.ai/v1/cart/$CART_ID/item \\\n -X DELETE \\\n -H "x-api-key: $HENRY_SDK_API_KEY"',
@@ -320,7 +320,7 @@ const EMBEDDED_METHODS = [
320
320
  "mode?: 'async' | 'sync';",
321
321
  ],
322
322
  response: "{ data: { jobs: { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }[]; metadata?: object; }; message: string; status: string; success: boolean; }",
323
- markdown: "## details\n\n`client.cart.checkout.details(cartId: string, buyer: { shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }, coupons?: string[], metadata?: { botAuth?: { forterToken?: string; }; userData?: { ipAddress?: string; userAgent?: string; }; }, mode?: 'async' | 'sync'): { data: object; message: string; status: string; success: boolean; }`\n\n**post** `/cart/{cartId}/details`\n\nRetrieve detailed information about a cart. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `buyer: { shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }`\n - `shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }`\n Shipping address for the cart\n\n- `coupons?: string[]`\n List of coupon codes applied to the cart\n\n- `metadata?: { botAuth?: { forterToken?: string; }; userData?: { ipAddress?: string; userAgent?: string; }; }`\n Additional metadata for the request\n - `botAuth?: { forterToken?: string; }`\n Bot authentication credentials\n - `userData?: { ipAddress?: string; userAgent?: string; }`\n User identity and device information\n\n- `mode?: 'async' | 'sync'`\n Response mode. Use sync to wait up to 30 seconds for the backing worker flow to complete.\n\n### Returns\n\n- `{ data: { jobs: { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }[]; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { jobs: { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { items: { costs: object; shippingOptions: object[]; coupons?: object[]; metadata?: object; }[]; }; }[]; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.checkout.details('crt_sa2aEsCz9PRM', { buyer: { shippingAddress: {\n city: 'Anytown',\n countryCode: 'US',\n line1: '123 Main St',\n postalCode: '12345',\n province: 'CA',\n} } });\n\nconsole.log(response);\n```",
323
+ markdown: "## details\n\n`client.cart.checkout.details(cartId: string, buyer: { shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }, coupons?: string[], metadata?: { botAuth?: { forterToken?: string; }; userData?: { ipAddress?: string; userAgent?: string; }; }, mode?: 'async' | 'sync'): { data: object; message: string; status: string; success: boolean; }`\n\n**post** `/cart/{cartId}/details`\n\nRetrieve detailed information about a cart. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `buyer: { shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }`\n - `shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }`\n Shipping address for the cart\n\n- `coupons?: string[]`\n List of coupon codes applied to the cart\n\n- `metadata?: { botAuth?: { forterToken?: string; }; userData?: { ipAddress?: string; userAgent?: string; }; }`\n Additional metadata for the request\n - `botAuth?: { forterToken?: string; }`\n Bot authentication credentials\n - `userData?: { ipAddress?: string; userAgent?: string; }`\n User identity and device information\n\n- `mode?: 'async' | 'sync'`\n Response mode. Use sync to wait up to 30 seconds for the backing worker flow to complete.\n\n### Returns\n\n- `{ data: { jobs: { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }[]; metadata?: object; }; message: string; status: string; success: boolean; }`\n\n - `data: { jobs: { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { items: { costs: object; shippingOptions: object[]; coupons?: object[]; }[]; }; }[]; metadata?: object; }`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.checkout.details('crt_sa2aEsCz9PRM', { buyer: { shippingAddress: {\n city: 'Anytown',\n countryCode: 'US',\n line1: '123 Main St',\n postalCode: '12345',\n province: 'CA',\n} } });\n\nconsole.log(response);\n```",
324
324
  perLanguage: {
325
325
  http: {
326
326
  example: 'curl https://api.henrylabs.ai/v1/cart/$CART_ID/details \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "buyer": {\n "shippingAddress": {\n "city": "Anytown",\n "countryCode": "US",\n "line1": "123 Main St",\n "postalCode": "12345",\n "province": "CA",\n "line2": "Apt 4B"\n }\n },\n "coupons": [\n "SUMMER21",\n "FREESHIP"\n ],\n "mode": "async"\n }\'',
@@ -344,8 +344,8 @@ const EMBEDDED_METHODS = [
344
344
  stainlessPath: '(resource) cart.checkout > (method) poll_details',
345
345
  qualified: 'client.cart.checkout.pollDetails',
346
346
  params: ['refId: string;'],
347
- response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { items: { costs: object; shippingOptions: object[]; coupons?: object[]; metadata?: object; }[]; }; }",
348
- markdown: "## poll_details\n\n`client.cart.checkout.pollDetails(refId: string): { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }`\n\n**get** `/cart/checkout/status`\n\nCheck the status of a cart details retrieval job and get results when ready.\n\n### Parameters\n\n- `refId: string`\n Reference ID used for checking status\n\n### Returns\n\n- `{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { items: { costs: object; shippingOptions: object[]; coupons?: object[]; metadata?: object; }[]; }; }`\n\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'failed'`\n - `error?: object`\n - `result?: { items: { costs: { subtotal: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; discount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; shipping?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; tax?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; shippingOptions: { id: string; cost: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; name: string; maxDate?: string; minDate?: string; timeEstimate?: string; }[]; coupons?: { available: boolean; code: string; savedAmount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }[]; metadata?: object; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.checkout.pollDetails({ refId: 'ckd-ref_3fa85f64-5717-4562-b3fc' });\n\nconsole.log(response);\n```",
347
+ response: "{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { items: { costs: object; shippingOptions: object[]; coupons?: object[]; }[]; }; }",
348
+ markdown: "## poll_details\n\n`client.cart.checkout.pollDetails(refId: string): { refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: object; }`\n\n**get** `/cart/checkout/status`\n\nCheck the status of a cart details retrieval job and get results when ready.\n\n### Parameters\n\n- `refId: string`\n Reference ID used for checking status\n\n### Returns\n\n- `{ refId: string; status: 'pending' | 'processing' | 'complete' | 'failed'; error?: object; result?: { items: { costs: object; shippingOptions: object[]; coupons?: object[]; }[]; }; }`\n\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'failed'`\n - `error?: object`\n - `result?: { items: { costs: { subtotal: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; discount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; shipping?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; tax?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; shippingOptions: { id: string; cost: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; name: string; maxDate?: string; minDate?: string; timeEstimate?: string; }[]; coupons?: { available: boolean; code: string; savedAmount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }[]; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.checkout.pollDetails({ refId: 'ckd-ref_3fa85f64-5717-4562-b3fc' });\n\nconsole.log(response);\n```",
349
349
  perLanguage: {
350
350
  http: {
351
351
  example: 'curl https://api.henrylabs.ai/v1/cart/checkout/status \\\n -H "x-api-key: $HENRY_SDK_API_KEY"',
@@ -376,8 +376,8 @@ const EMBEDDED_METHODS = [
376
376
  'overrideProducts?: object;',
377
377
  'settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; };',
378
378
  ],
379
- response: "{ details: { card: { details: object; nameOnCard: object; billingAddress?: object; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; metadata?: object; variant?: string | object; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: object; subtotal: object; total: object; }; items: { confirmationNumber: string; costs: object; productLink: string; appliedCoupon?: object; metadata?: object; shippingOption?: object; }[]; }; }",
380
- markdown: "## purchase\n\n`client.cart.checkout.purchase(cartId: string, buyer: { card: { details: object; billingAddress?: object; nameOnCard?: object; }; email: string; name: { firstName: string; lastName: string; middleName?: string; }; shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; phone?: string; }, metadata?: { botAuth?: { forterToken?: string; }; userData?: { ipAddress?: string; userAgent?: string; }; }, mode?: 'async' | 'sync', overrideProducts?: object, settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }): { details: object; products: object[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: object; }`\n\n**post** `/cart/{cartId}/purchase`\n\nInitiate the purchase process for a cart. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `buyer: { card: { details: { cardToken: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; nameOnCard?: { firstName: string; lastName: string; middleName?: string; }; }; email: string; name: { firstName: string; lastName: string; middleName?: string; }; shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; phone?: string; }`\n - `card: { details: { cardToken: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; nameOnCard?: { firstName: string; lastName: string; middleName?: string; }; }`\n - `email: string`\n Buyer's email address\n - `name: { firstName: string; lastName: string; middleName?: string; }`\n Buyer's full name\n - `shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }`\n Shipping address for the cart\n - `phone?: string`\n Buyer's phone number\n\n- `metadata?: { botAuth?: { forterToken?: string; }; userData?: { ipAddress?: string; userAgent?: string; }; }`\n Additional metadata for the request\n - `botAuth?: { forterToken?: string; }`\n Bot authentication credentials\n - `userData?: { ipAddress?: string; userAgent?: string; }`\n User identity and device information\n\n- `mode?: 'async' | 'sync'`\n Response mode. Use sync to wait up to 30 seconds for the backing worker flow to complete.\n\n- `overrideProducts?: object`\n Override quantity for a specific product URL\n\n- `settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }`\n Settings for what information to collect\n - `collectAddress?: boolean`\n Whether to collect the buyer's shipping address\n - `collectEmail?: boolean`\n Whether to collect the buyer's email address\n - `collectPhone?: boolean`\n Whether to collect the buyer's phone number\n\n### Returns\n\n- `{ details: { card: { details: object; nameOnCard: object; billingAddress?: object; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; metadata?: object; variant?: string | object; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: object; subtotal: object; total: object; }; items: { confirmationNumber: string; costs: object; productLink: string; appliedCoupon?: object; metadata?: object; shippingOption?: object; }[]; }; }`\n\n - `details: { card: { details: object; nameOnCard: { firstName: string; lastName: string; middleName?: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }`\n - `products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; metadata?: object; variant?: string | object; }[]`\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'cancelled'`\n - `error?: object`\n - `result?: { costs: { commissionFee: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; items: { confirmationNumber: string; costs: { total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; discount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; shipping?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; tax?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; productLink: string; appliedCoupon?: { code: string; savedAmount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; metadata?: object; shippingOption?: { id: string; cost: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; name: string; maxDate?: string; minDate?: string; timeEstimate?: string; }; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.checkout.purchase('crt_sa2aEsCz9PRM', { buyer: {\n card: { details: { cardToken: 'card_live_SimDpKU9cmU7tvdUXHzOeLudtgfadQVnbof' } },\n email: 'johnadoe@example.com',\n name: { firstName: 'John', lastName: 'Doe' },\n shippingAddress: {\n city: 'Anytown',\n countryCode: 'US',\n line1: '123 Main St',\n postalCode: '12345',\n province: 'CA',\n},\n} });\n\nconsole.log(response);\n```",
379
+ response: "{ details: { card: { details: object; nameOnCard: object; billingAddress?: object; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: object; subtotal: object; total: object; }; items: { confirmationNumber: string; costs: object; productLink: string; appliedCoupon?: object; metadata?: object; shipping?: object; }[]; }; }",
380
+ markdown: "## purchase\n\n`client.cart.checkout.purchase(cartId: string, buyer: { card: { details: object; billingAddress?: object; nameOnCard?: object; }; email: string; name: { firstName: string; lastName: string; middleName?: string; }; shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; phone?: string; }, metadata?: { botAuth?: { forterToken?: string; }; userData?: { ipAddress?: string; userAgent?: string; }; }, mode?: 'async' | 'sync', overrideProducts?: object, settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }): { details: object; products: object[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: object; }`\n\n**post** `/cart/{cartId}/purchase`\n\nInitiate the purchase process for a cart. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.\n\n### Parameters\n\n- `cartId: string`\n Unique identifier for the cart\n\n- `buyer: { card: { details: { cardToken: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; nameOnCard?: { firstName: string; lastName: string; middleName?: string; }; }; email: string; name: { firstName: string; lastName: string; middleName?: string; }; shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; phone?: string; }`\n - `card: { details: { cardToken: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; nameOnCard?: { firstName: string; lastName: string; middleName?: string; }; }`\n - `email: string`\n Buyer's email address\n - `name: { firstName: string; lastName: string; middleName?: string; }`\n Buyer's full name\n - `shippingAddress: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }`\n Shipping address for the cart\n - `phone?: string`\n Buyer's phone number\n\n- `metadata?: { botAuth?: { forterToken?: string; }; userData?: { ipAddress?: string; userAgent?: string; }; }`\n Additional metadata for the request\n - `botAuth?: { forterToken?: string; }`\n Bot authentication credentials\n - `userData?: { ipAddress?: string; userAgent?: string; }`\n User identity and device information\n\n- `mode?: 'async' | 'sync'`\n Response mode. Use sync to wait up to 30 seconds for the backing worker flow to complete.\n\n- `overrideProducts?: object`\n Override quantity for a specific product URL\n\n- `settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }`\n Settings for what information to collect\n - `collectAddress?: boolean`\n Whether to collect the buyer's shipping address\n - `collectEmail?: boolean`\n Whether to collect the buyer's email address\n - `collectPhone?: boolean`\n Whether to collect the buyer's phone number\n\n### Returns\n\n- `{ details: { card: { details: object; nameOnCard: object; billingAddress?: object; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: object; subtotal: object; total: object; }; items: { confirmationNumber: string; costs: object; productLink: string; appliedCoupon?: object; metadata?: object; shipping?: object; }[]; }; }`\n\n - `details: { card: { details: object; nameOnCard: { firstName: string; lastName: string; middleName?: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }`\n - `products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]`\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'cancelled'`\n - `error?: object`\n - `result?: { costs: { commissionFee: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; items: { confirmationNumber: string; costs: { total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; discount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; shipping?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; tax?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; productLink: string; appliedCoupon?: { code: string; savedAmount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; metadata?: object; shipping?: { id: string; cost: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; name: string; maxDate?: string; minDate?: string; timeEstimate?: string; }; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.checkout.purchase('crt_sa2aEsCz9PRM', { buyer: {\n card: { details: { cardToken: 'card_live_SimDpKU9cmU7tvdUXHzOeLudtgfadQVnbof' } },\n email: 'johnadoe@example.com',\n name: { firstName: 'John', lastName: 'Doe' },\n shippingAddress: {\n city: 'Anytown',\n countryCode: 'US',\n line1: '123 Main St',\n postalCode: '12345',\n province: 'CA',\n},\n} });\n\nconsole.log(response);\n```",
381
381
  perLanguage: {
382
382
  http: {
383
383
  example: 'curl https://api.henrylabs.ai/v1/cart/$CART_ID/purchase \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $HENRY_SDK_API_KEY" \\\n -d \'{\n "buyer": {\n "card": {\n "details": {\n "cardToken": "card_live_SimDpKU9cmU7tvdUXHzOeLudtgfadQVnbof"\n },\n "billingAddress": {\n "city": "Anytown",\n "countryCode": "US",\n "line1": "123 Main St",\n "postalCode": "12345",\n "province": "CA",\n "line2": "Apt 4B"\n },\n "nameOnCard": {\n "firstName": "John",\n "lastName": "Doe",\n "middleName": "A."\n }\n },\n "email": "johnadoe@example.com",\n "name": {\n "firstName": "John",\n "lastName": "Doe",\n "middleName": "A."\n },\n "shippingAddress": {\n "city": "Anytown",\n "countryCode": "US",\n "line1": "123 Main St",\n "postalCode": "12345",\n "province": "CA",\n "line2": "Apt 4B"\n },\n "phone": "+1234567890"\n },\n "mode": "async"\n }\'',
@@ -401,8 +401,8 @@ const EMBEDDED_METHODS = [
401
401
  stainlessPath: '(resource) cart.checkout > (method) poll_purchase',
402
402
  qualified: 'client.cart.checkout.pollPurchase',
403
403
  params: ['refId: string;'],
404
- response: "{ details: { card: { details: object; nameOnCard: object; billingAddress?: object; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; metadata?: object; variant?: string | object; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: object; subtotal: object; total: object; }; items: { confirmationNumber: string; costs: object; productLink: string; appliedCoupon?: object; metadata?: object; shippingOption?: object; }[]; }; }",
405
- markdown: "## poll_purchase\n\n`client.cart.checkout.pollPurchase(refId: string): { details: object; products: object[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: object; }`\n\n**get** `/cart/purchase/status`\n\nCheck the status of a cart purchase job and get results when ready.\n\n### Parameters\n\n- `refId: string`\n Reference ID used for checking status\n\n### Returns\n\n- `{ details: { card: { details: object; nameOnCard: object; billingAddress?: object; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; metadata?: object; variant?: string | object; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: object; subtotal: object; total: object; }; items: { confirmationNumber: string; costs: object; productLink: string; appliedCoupon?: object; metadata?: object; shippingOption?: object; }[]; }; }`\n\n - `details: { card: { details: object; nameOnCard: { firstName: string; lastName: string; middleName?: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }`\n - `products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; metadata?: object; variant?: string | object; }[]`\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'cancelled'`\n - `error?: object`\n - `result?: { costs: { commissionFee: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; items: { confirmationNumber: string; costs: { total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; discount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; shipping?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; tax?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; productLink: string; appliedCoupon?: { code: string; savedAmount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; metadata?: object; shippingOption?: { id: string; cost: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; name: string; maxDate?: string; minDate?: string; timeEstimate?: string; }; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.checkout.pollPurchase({ refId: 'ckp-ref_3fa85f64-5717-4562-b3fc' });\n\nconsole.log(response);\n```",
404
+ response: "{ details: { card: { details: object; nameOnCard: object; billingAddress?: object; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: object; subtotal: object; total: object; }; items: { confirmationNumber: string; costs: object; productLink: string; appliedCoupon?: object; metadata?: object; shipping?: object; }[]; }; }",
405
+ markdown: "## poll_purchase\n\n`client.cart.checkout.pollPurchase(refId: string): { details: object; products: object[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: object; }`\n\n**get** `/cart/purchase/status`\n\nCheck the status of a cart purchase job and get results when ready.\n\n### Parameters\n\n- `refId: string`\n Reference ID used for checking status\n\n### Returns\n\n- `{ details: { card: { details: object; nameOnCard: object; billingAddress?: object; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: object; subtotal: object; total: object; }; items: { confirmationNumber: string; costs: object; productLink: string; appliedCoupon?: object; metadata?: object; shipping?: object; }[]; }; }`\n\n - `details: { card: { details: object; nameOnCard: { firstName: string; lastName: string; middleName?: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }`\n - `products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]`\n - `refId: string`\n - `status: 'pending' | 'processing' | 'complete' | 'cancelled'`\n - `error?: object`\n - `result?: { costs: { commissionFee: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; items: { confirmationNumber: string; costs: { total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; discount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; shipping?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; tax?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; productLink: string; appliedCoupon?: { code: string; savedAmount?: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; metadata?: object; shipping?: { id: string; cost: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; name: string; maxDate?: string; minDate?: string; timeEstimate?: string; }; }[]; }`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst response = await client.cart.checkout.pollPurchase({ refId: 'ckp-ref_3fa85f64-5717-4562-b3fc' });\n\nconsole.log(response);\n```",
406
406
  perLanguage: {
407
407
  http: {
408
408
  example: 'curl https://api.henrylabs.ai/v1/cart/purchase/status \\\n -H "x-api-key: $HENRY_SDK_API_KEY"',
@@ -431,8 +431,8 @@ const EMBEDDED_METHODS = [
431
431
  'limit?: number;',
432
432
  "status?: 'pending' | 'processing' | 'complete' | 'cancelled';",
433
433
  ],
434
- response: "{ data: { details: { card: object; hasAccount: boolean; name: object; email?: string; phone?: object; settings?: object; shippingAddress?: object; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; metadata?: object; variant?: string | object; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: object; items: object[]; }; }[]; message: string; status: string; success: boolean; }",
435
- markdown: "## list\n\n`client.orders.list(cartId?: string, cursor?: string, limit?: number, status?: 'pending' | 'processing' | 'complete' | 'cancelled'): { data: object[]; message: string; status: string; success: boolean; }`\n\n**get** `/orders`\n\nFetch a list of orders with optional filtering and pagination.\n\n### Parameters\n\n- `cartId?: string`\n Filter orders by cart ID\n\n- `cursor?: string`\n Cursor returned from the previous response\n\n- `limit?: number`\n Limit the number of results\n\n- `status?: 'pending' | 'processing' | 'complete' | 'cancelled'`\n Filter orders by status\n\n### Returns\n\n- `{ data: { details: { card: object; hasAccount: boolean; name: object; email?: string; phone?: object; settings?: object; shippingAddress?: object; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; metadata?: object; variant?: string | object; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: object; items: object[]; }; }[]; message: string; status: string; success: boolean; }`\n\n - `data: { details: { card: { details: object; nameOnCard: { firstName: string; lastName: string; middleName?: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; metadata?: object; variant?: string | object; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; items: { confirmationNumber: string; costs: { total: object; discount?: object; shipping?: object; subtotal?: object; tax?: object; }; productLink: string; appliedCoupon?: { code: string; savedAmount?: object; }; metadata?: object; shippingOption?: { id: string; cost: object; name: string; maxDate?: string; minDate?: string; timeEstimate?: string; }; }[]; }; }[]`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst orders = await client.orders.list();\n\nconsole.log(orders);\n```",
434
+ response: "{ data: { details: { card: object; hasAccount: boolean; name: object; email?: string; phone?: object; settings?: object; shippingAddress?: object; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; selectedOptions?: string[]; selectedShipping?: object; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: object; items: object[]; }; }[]; message: string; status: string; success: boolean; }",
435
+ markdown: "## list\n\n`client.orders.list(cartId?: string, cursor?: string, limit?: number, status?: 'pending' | 'processing' | 'complete' | 'cancelled'): { data: object[]; message: string; status: string; success: boolean; }`\n\n**get** `/orders`\n\nFetch a list of orders with optional filtering and pagination.\n\n### Parameters\n\n- `cartId?: string`\n Filter orders by cart ID\n\n- `cursor?: string`\n Cursor returned from the previous response\n\n- `limit?: number`\n Limit the number of results\n\n- `status?: 'pending' | 'processing' | 'complete' | 'cancelled'`\n Filter orders by status\n\n### Returns\n\n- `{ data: { details: { card: object; hasAccount: boolean; name: object; email?: string; phone?: object; settings?: object; shippingAddress?: object; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; selectedOptions?: string[]; selectedShipping?: object; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: object; items: object[]; }; }[]; message: string; status: string; success: boolean; }`\n\n - `data: { details: { card: { details: object; nameOnCard: { firstName: string; lastName: string; middleName?: string; }; billingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: object; phone?: object; }; }; hasAccount: boolean; name: { firstName: string; lastName: string; middleName?: string; }; email?: string; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; settings?: { collectAddress?: boolean; collectEmail?: boolean; collectPhone?: boolean; }; shippingAddress?: { city: string; countryCode: string; line1: string; postalCode: string; province: string; email?: string; line2?: string; name?: { firstName: string; lastName: string; middleName?: string; }; phone?: { countryCode: string; e164: string; nationalNumber: string; country?: string; }; }; }; products: { host: string; link: string; merchant: string; quantity: number; status: 'pending' | 'processing' | 'complete' | 'failed'; selectedOptions?: string[]; selectedShipping?: { id?: string; value?: string; }; }[]; refId: string; status: 'pending' | 'processing' | 'complete' | 'cancelled'; error?: object; result?: { costs: { commissionFee: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; subtotal: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; total: { currency: 'USD' | 'EUR' | 'AUD' | 'SGD' | 'TWD' | 'GBP' | 'CAD' | 'MXN' | 'NPR'; value: number; }; }; items: { confirmationNumber: string; costs: { total: object; discount?: object; shipping?: object; subtotal?: object; tax?: object; }; productLink: string; appliedCoupon?: { code: string; savedAmount?: object; }; metadata?: object; shipping?: { id: string; cost: object; name: string; maxDate?: string; minDate?: string; timeEstimate?: string; }; }[]; }; }[]`\n - `message: string`\n - `status: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK();\n\nconst orders = await client.orders.list();\n\nconsole.log(orders);\n```",
436
436
  perLanguage: {
437
437
  http: {
438
438
  example: 'curl https://api.henrylabs.ai/v1/orders \\\n -H "x-api-key: $HENRY_SDK_API_KEY"',
@@ -482,11 +482,11 @@ const EMBEDDED_METHODS = [
482
482
  const EMBEDDED_READMES = [
483
483
  {
484
484
  language: 'python',
485
- content: '# Henry SDK Python API library\n\n<!-- prettier-ignore -->\n[![PyPI version](https://img.shields.io/pypi/v/henrylabs.svg?label=pypi%20(stable))](https://pypi.org/project/henrylabs/)\n\nThe Henry SDK Python library provides convenient access to the Henry SDK REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Henry SDK MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40henrylabs%2Fmcp&config=eyJuYW1lIjoiQGhlbnJ5bGFicy9tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oZW5yeS1zZGsuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40henrylabs%2Fmcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhenry-sdk.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.henrylabs.ai](https://docs.henrylabs.ai/). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install henrylabs\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\n\nresponse = client.products.search(\n image_url="https://static.nike.com/a/images/t_web_pdp_535_v2/f_auto/example.png",\n search_type="image",\n country="US",\n limit=10,\n)\nprint(response.ref_id)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `HENRY_SDK_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncHenrySDK` instead of `HenrySDK` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom henry_sdk import AsyncHenrySDK\n\nclient = AsyncHenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n response = await client.products.search(\n image_url="https://static.nike.com/a/images/t_web_pdp_535_v2/f_auto/example.png",\n search_type="image",\n country="US",\n limit=10,\n )\n print(response.ref_id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install henrylabs[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom henry_sdk import DefaultAioHttpClient\nfrom henry_sdk import AsyncHenrySDK\n\nasync def main() -> None:\n async with AsyncHenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n response = await client.products.search(\n image_url="https://static.nike.com/a/images/t_web_pdp_535_v2/f_auto/example.png",\n search_type="image",\n country="US",\n limit=10,\n )\n print(response.ref_id)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK()\n\ncart = client.cart.create(\n items=[{\n "link": "https://www.nike.com/u/custom-nike-ja-3-by-you-10002205"\n }],\n settings={\n "commission_fee_fixed": {\n "value": 1.99,\n "currency": "USD",\n },\n "commission_fee_percent": 10,\n "events": [{\n "data": [{\n "points": 0,\n "type": "give_points_fixed",\n }],\n "type": "order",\n }],\n "options": {\n "allow_partial_purchase": True,\n "collect_buyer_address": "optional",\n "collect_buyer_email": "required",\n "collect_buyer_phone": "off",\n },\n },\n)\nprint(cart.settings)\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `henry_sdk.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `henry_sdk.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `henry_sdk.APIError`.\n\n```python\nimport henry_sdk\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK()\n\ntry:\n client.products.search(\n query="Nike Air Max",\n search_type="text",\n )\nexcept henry_sdk.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept henry_sdk.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept henry_sdk.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom henry_sdk import HenrySDK\n\n# Configure the default for all requests:\nclient = HenrySDK(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).products.search(\n query="Nike Air Max",\n search_type="text",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom henry_sdk import HenrySDK\n\n# Configure the default for all requests:\nclient = HenrySDK(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = HenrySDK(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).products.search(\n query="Nike Air Max",\n search_type="text",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `HENRY_SDK_LOG` to `info`.\n\n```shell\n$ export HENRY_SDK_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK()\nresponse = client.products.with_raw_response.search(\n query="Nike Air Max",\n search_type="text",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nproduct = response.parse() # get the object that `products.search()` would have returned\nprint(product.ref_id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/Henry-Social/henry-sdk-py/tree/main/src/henry_sdk/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/Henry-Social/henry-sdk-py/tree/main/src/henry_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.products.with_streaming_response.search(\n query="Nike Air Max",\n search_type="text",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom henry_sdk import HenrySDK, DefaultHttpxClient\n\nclient = HenrySDK(\n # Or use the `HENRY_SDK_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom henry_sdk import HenrySDK\n\nwith HenrySDK() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/Henry-Social/henry-sdk-py/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport henry_sdk\nprint(henry_sdk.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
485
+ content: '# Henry SDK Python API library\n\n<!-- prettier-ignore -->\n[![PyPI version](https://img.shields.io/pypi/v/henrylabs.svg?label=pypi%20(stable))](https://pypi.org/project/henrylabs/)\n\nThe Henry SDK Python library provides convenient access to the Henry SDK REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Henry SDK MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40henrylabs%2Fmcp&config=eyJuYW1lIjoiQGhlbnJ5bGFicy9tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oZW5yeS1zZGsuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40henrylabs%2Fmcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhenry-sdk.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.henrylabs.ai](https://docs.henrylabs.ai/). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install henrylabs\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\n\nresponse = client.products.search(\n filters={\n "type": "image",\n "image_url": "https://static.nike.com/a/images/t_web_pdp_535_v2/f_auto/example.png",\n "country": "US",\n },\n type="global",\n limit=10,\n)\nprint(response.ref_id)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `HENRY_SDK_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncHenrySDK` instead of `HenrySDK` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom henry_sdk import AsyncHenrySDK\n\nclient = AsyncHenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n response = await client.products.search(\n filters={\n "type": "image",\n "image_url": "https://static.nike.com/a/images/t_web_pdp_535_v2/f_auto/example.png",\n "country": "US",\n },\n type="global",\n limit=10,\n )\n print(response.ref_id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install henrylabs[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom henry_sdk import DefaultAioHttpClient\nfrom henry_sdk import AsyncHenrySDK\n\nasync def main() -> None:\n async with AsyncHenrySDK(\n api_key=os.environ.get("HENRY_SDK_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n response = await client.products.search(\n filters={\n "type": "image",\n "image_url": "https://static.nike.com/a/images/t_web_pdp_535_v2/f_auto/example.png",\n "country": "US",\n },\n type="global",\n limit=10,\n )\n print(response.ref_id)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK()\n\nresponse = client.products.search(\n filters={\n "merchant": "nike.com"\n },\n type="merchant",\n)\nprint(response.filters)\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `henry_sdk.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `henry_sdk.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `henry_sdk.APIError`.\n\n```python\nimport henry_sdk\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK()\n\ntry:\n client.products.search(\n filters={\n "type": "text",\n "query": "Air Max Shoes",\n "country": "US",\n },\n type="global",\n limit=40,\n )\nexcept henry_sdk.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept henry_sdk.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept henry_sdk.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom henry_sdk import HenrySDK\n\n# Configure the default for all requests:\nclient = HenrySDK(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).products.search(\n filters={\n "type": "text",\n "query": "Air Max Shoes",\n "country": "US",\n },\n type="global",\n limit=40,\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom henry_sdk import HenrySDK\n\n# Configure the default for all requests:\nclient = HenrySDK(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = HenrySDK(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).products.search(\n filters={\n "type": "text",\n "query": "Air Max Shoes",\n "country": "US",\n },\n type="global",\n limit=40,\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `HENRY_SDK_LOG` to `info`.\n\n```shell\n$ export HENRY_SDK_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom henry_sdk import HenrySDK\n\nclient = HenrySDK()\nresponse = client.products.with_raw_response.search(\n filters={\n "type": "text",\n "query": "Air Max Shoes",\n "country": "US",\n },\n type="global",\n limit=40,\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nproduct = response.parse() # get the object that `products.search()` would have returned\nprint(product.ref_id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/Henry-Social/henry-sdk-py/tree/main/src/henry_sdk/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/Henry-Social/henry-sdk-py/tree/main/src/henry_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.products.with_streaming_response.search(\n filters={\n "type": "text",\n "query": "Air Max Shoes",\n "country": "US",\n },\n type="global",\n limit=40,\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom henry_sdk import HenrySDK, DefaultHttpxClient\n\nclient = HenrySDK(\n # Or use the `HENRY_SDK_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom henry_sdk import HenrySDK\n\nwith HenrySDK() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/Henry-Social/henry-sdk-py/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport henry_sdk\nprint(henry_sdk.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
486
486
  },
487
487
  {
488
488
  language: 'typescript',
489
- content: "# Henry SDK TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@henrylabs/sdk.svg?label=npm%20(stable))](https://npmjs.org/package/@henrylabs/sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@henrylabs/sdk)\n\nThis library provides convenient access to the Henry SDK REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.henrylabs.ai](https://docs.henrylabs.ai/). The full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Henry SDK MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40henrylabs%2Fmcp&config=eyJuYW1lIjoiQGhlbnJ5bGFicy9tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oZW5yeS1zZGsuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40henrylabs%2Fmcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhenry-sdk.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @henrylabs/sdk\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.products.search({\n imageUrl: 'https://static.nike.com/a/images/t_web_pdp_535_v2/f_auto/example.png',\n searchType: 'image',\n country: 'US',\n limit: 10,\n});\n\nconsole.log(response.refId);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: HenrySDK.ProductSearchParams = { query: 'Nike Air Max', searchType: 'text' };\nconst response: HenrySDK.ProductSearchResponse = await client.products.search(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst response = await client.products\n .search({ query: 'Nike Air Max', searchType: 'text' })\n .catch(async (err) => {\n if (err instanceof HenrySDK.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new HenrySDK({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.products.search({ query: 'Nike Air Max', searchType: 'text' }, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new HenrySDK({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.products.search({ query: 'Nike Air Max', searchType: 'text' }, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new HenrySDK();\n\nconst response = await client.products\n .search({ query: 'Nike Air Max', searchType: 'text' })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: response, response: raw } = await client.products\n .search({ query: 'Nike Air Max', searchType: 'text' })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(response.refId);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `HENRY_SDK_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new HenrySDK({\n logger: logger.child({ name: 'HenrySDK' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.products.search({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\nimport fetch from 'my-fetch';\n\nconst client = new HenrySDK({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new HenrySDK({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport HenrySDK from 'npm:@henrylabs/sdk';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new HenrySDK({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/Henry-Social/henry-sdk-ts/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
489
+ content: "# Henry SDK TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@henrylabs/sdk.svg?label=npm%20(stable))](https://npmjs.org/package/@henrylabs/sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@henrylabs/sdk)\n\nThis library provides convenient access to the Henry SDK REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.henrylabs.ai](https://docs.henrylabs.ai/). The full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Henry SDK MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40henrylabs%2Fmcp&config=eyJuYW1lIjoiQGhlbnJ5bGFicy9tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oZW5yeS1zZGsuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40henrylabs%2Fmcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhenry-sdk.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @henrylabs/sdk\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.products.search({\n filters: {\n type: 'image',\n imageUrl: 'https://static.nike.com/a/images/t_web_pdp_535_v2/f_auto/example.png',\n country: 'US',\n },\n type: 'global',\n limit: 10,\n});\n\nconsole.log(response.refId);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: HenrySDK.ProductSearchParams = {\n filters: {\n type: 'text',\n query: 'Air Max Shoes',\n country: 'US',\n },\n type: 'global',\n limit: 40,\n};\nconst response: HenrySDK.ProductSearchResponse = await client.products.search(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst response = await client.products\n .search({\n filters: {\n type: 'text',\n query: 'Air Max Shoes',\n country: 'US',\n },\n type: 'global',\n limit: 40,\n })\n .catch(async (err) => {\n if (err instanceof HenrySDK.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new HenrySDK({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.products.search({\n filters: {\n type: 'text',\n query: 'Air Max Shoes',\n country: 'US',\n},\n type: 'global',\n limit: 40,\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new HenrySDK({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.products.search({\n filters: {\n type: 'text',\n query: 'Air Max Shoes',\n country: 'US',\n},\n type: 'global',\n limit: 40,\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new HenrySDK();\n\nconst response = await client.products\n .search({\n filters: {\n type: 'text',\n query: 'Air Max Shoes',\n country: 'US',\n },\n type: 'global',\n limit: 40,\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: response, response: raw } = await client.products\n .search({\n filters: {\n type: 'text',\n query: 'Air Max Shoes',\n country: 'US',\n },\n type: 'global',\n limit: 40,\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(response.refId);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `HENRY_SDK_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new HenrySDK({\n logger: logger.child({ name: 'HenrySDK' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.products.search({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\nimport fetch from 'my-fetch';\n\nconst client = new HenrySDK({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new HenrySDK({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport HenrySDK from 'npm:@henrylabs/sdk';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new HenrySDK({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/Henry-Social/henry-sdk-ts/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
490
490
  },
491
491
  ];
492
492
  const INDEX_OPTIONS = {