@5ss/ai-tools 2.11.1
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.
- package/CHANGELOG.md +112 -0
- package/LICENSE +21 -0
- package/README.md +221 -0
- package/dist/ai-sdk/index.d.ts +15 -0
- package/dist/ai-sdk/index.d.ts.map +1 -0
- package/dist/ai-sdk/index.js +24 -0
- package/dist/ai-sdk/index.js.map +1 -0
- package/dist/artifact-D064mHfK.js +44 -0
- package/dist/artifact-D064mHfK.js.map +1 -0
- package/dist/artifacts-O8g-40Pw.js +404 -0
- package/dist/artifacts-O8g-40Pw.js.map +1 -0
- package/dist/aws-json-CecFqzqX.js +23 -0
- package/dist/aws-json-CecFqzqX.js.map +1 -0
- package/dist/aws-service-msttbPrz.js +58 -0
- package/dist/aws-service-msttbPrz.js.map +1 -0
- package/dist/batch-BMM5dXqL.d.ts +22 -0
- package/dist/batch-BMM5dXqL.d.ts.map +1 -0
- package/dist/batch-Co1ujeAW.js +67 -0
- package/dist/batch-Co1ujeAW.js.map +1 -0
- package/dist/bedrock-agentcore-browser-a_qOs-NR.js +182 -0
- package/dist/bedrock-agentcore-browser-a_qOs-NR.js.map +1 -0
- package/dist/bedrock-agentcore-code-interpreter-MWK-8RhA.js +357 -0
- package/dist/bedrock-agentcore-code-interpreter-MWK-8RhA.js.map +1 -0
- package/dist/bytes-BxpimpQx.js +45 -0
- package/dist/bytes-BxpimpQx.js.map +1 -0
- package/dist/client-CCKGsTeI.js +743 -0
- package/dist/client-CCKGsTeI.js.map +1 -0
- package/dist/cloudflare/index.d.ts +37 -0
- package/dist/cloudflare/index.d.ts.map +1 -0
- package/dist/cloudflare/index.js +41 -0
- package/dist/cloudflare/index.js.map +1 -0
- package/dist/cloudflare-browser-B6Yolpin.js +428 -0
- package/dist/cloudflare-browser-B6Yolpin.js.map +1 -0
- package/dist/cloudflare-email-Dy0KHeDf.js +197 -0
- package/dist/cloudflare-email-Dy0KHeDf.js.map +1 -0
- package/dist/cloudflare-sandbox-Dp_uNaqW.js +982 -0
- package/dist/cloudflare-sandbox-Dp_uNaqW.js.map +1 -0
- package/dist/content-type-CORxaxcv.js +49 -0
- package/dist/content-type-CORxaxcv.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +204 -0
- package/dist/core/index.js.map +1 -0
- package/dist/define-CvpJ_pNP.js +115 -0
- package/dist/define-CvpJ_pNP.js.map +1 -0
- package/dist/errors-DoSpNHvs.js +20 -0
- package/dist/errors-DoSpNHvs.js.map +1 -0
- package/dist/errors-aKhko9T1.d.ts +18 -0
- package/dist/errors-aKhko9T1.d.ts.map +1 -0
- package/dist/eventbridge-scheduler-Bh6GqZY2.js +349 -0
- package/dist/eventbridge-scheduler-Bh6GqZY2.js.map +1 -0
- package/dist/framework-context-DVIIY8ZO.js +24 -0
- package/dist/framework-context-DVIIY8ZO.js.map +1 -0
- package/dist/gotenberg-NuJjxyln.js +291 -0
- package/dist/gotenberg-NuJjxyln.js.map +1 -0
- package/dist/http/index.d.ts +47 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +3 -0
- package/dist/http-service-DDNCO1s4.js +254 -0
- package/dist/http-service-DDNCO1s4.js.map +1 -0
- package/dist/http-service-T7E5UjP8.d.ts +80 -0
- package/dist/http-service-T7E5UjP8.d.ts.map +1 -0
- package/dist/imessage-BSAFOI8Z.js +154 -0
- package/dist/imessage-BSAFOI8Z.js.map +1 -0
- package/dist/index-BU4gmYO8.d.ts +254 -0
- package/dist/index-BU4gmYO8.d.ts.map +1 -0
- package/dist/index-CCivzmxO.d.ts +188 -0
- package/dist/index-CCivzmxO.d.ts.map +1 -0
- package/dist/index-CLmTrcu5.d.ts +22 -0
- package/dist/index-CLmTrcu5.d.ts.map +1 -0
- package/dist/index-CZX5OeOF.d.ts +235 -0
- package/dist/index-CZX5OeOF.d.ts.map +1 -0
- package/dist/index-CdFmEfZO.d.ts +359 -0
- package/dist/index-CdFmEfZO.d.ts.map +1 -0
- package/dist/index-Cuh6eMWc.d.ts +285 -0
- package/dist/index-Cuh6eMWc.d.ts.map +1 -0
- package/dist/index-DuOGj7vc.d.ts +107 -0
- package/dist/index-DuOGj7vc.d.ts.map +1 -0
- package/dist/index-ccZ1XOHw.d.ts +69 -0
- package/dist/index-ccZ1XOHw.d.ts.map +1 -0
- package/dist/index-n8JTpNf1.d.ts +247 -0
- package/dist/index-n8JTpNf1.d.ts.map +1 -0
- package/dist/index-pwW1OsOx.d.ts +134 -0
- package/dist/index-pwW1OsOx.d.ts.map +1 -0
- package/dist/index-zK1ZwS4m.d.ts +347 -0
- package/dist/index-zK1ZwS4m.d.ts.map +1 -0
- package/dist/limits-hjrO8zUG.js +80 -0
- package/dist/limits-hjrO8zUG.js.map +1 -0
- package/dist/mastra/index.d.ts +14 -0
- package/dist/mastra/index.d.ts.map +1 -0
- package/dist/mastra/index.js +26 -0
- package/dist/mastra/index.js.map +1 -0
- package/dist/mastra-vector-Dhc6XZ8l.js +234 -0
- package/dist/mastra-vector-Dhc6XZ8l.js.map +1 -0
- package/dist/mcp/index.d.ts +80 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +97 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/modules/artifacts/index.d.ts +337 -0
- package/dist/modules/artifacts/index.d.ts.map +1 -0
- package/dist/modules/artifacts/index.js +348 -0
- package/dist/modules/artifacts/index.js.map +1 -0
- package/dist/modules/browser/index.d.ts +516 -0
- package/dist/modules/browser/index.d.ts.map +1 -0
- package/dist/modules/browser/index.js +475 -0
- package/dist/modules/browser/index.js.map +1 -0
- package/dist/modules/calendar/index.d.ts +93 -0
- package/dist/modules/calendar/index.d.ts.map +1 -0
- package/dist/modules/calendar/index.js +131 -0
- package/dist/modules/calendar/index.js.map +1 -0
- package/dist/modules/code-sandbox/index.d.ts +317 -0
- package/dist/modules/code-sandbox/index.d.ts.map +1 -0
- package/dist/modules/code-sandbox/index.js +537 -0
- package/dist/modules/code-sandbox/index.js.map +1 -0
- package/dist/modules/content-type/index.d.ts +22 -0
- package/dist/modules/content-type/index.d.ts.map +1 -0
- package/dist/modules/content-type/index.js +66 -0
- package/dist/modules/content-type/index.js.map +1 -0
- package/dist/modules/crypto/index.d.ts +115 -0
- package/dist/modules/crypto/index.d.ts.map +1 -0
- package/dist/modules/crypto/index.js +139 -0
- package/dist/modules/crypto/index.js.map +1 -0
- package/dist/modules/document/index.d.ts +575 -0
- package/dist/modules/document/index.d.ts.map +1 -0
- package/dist/modules/document/index.js +444 -0
- package/dist/modules/document/index.js.map +1 -0
- package/dist/modules/document-extract/index.d.ts +438 -0
- package/dist/modules/document-extract/index.d.ts.map +1 -0
- package/dist/modules/document-extract/index.js +127 -0
- package/dist/modules/document-extract/index.js.map +1 -0
- package/dist/modules/document-render/index.d.ts +336 -0
- package/dist/modules/document-render/index.d.ts.map +1 -0
- package/dist/modules/document-render/index.js +155 -0
- package/dist/modules/document-render/index.js.map +1 -0
- package/dist/modules/email/index.d.ts +311 -0
- package/dist/modules/email/index.d.ts.map +1 -0
- package/dist/modules/email/index.js +167 -0
- package/dist/modules/email/index.js.map +1 -0
- package/dist/modules/email-message/index.d.ts +95 -0
- package/dist/modules/email-message/index.d.ts.map +1 -0
- package/dist/modules/email-message/index.js +264 -0
- package/dist/modules/email-message/index.js.map +1 -0
- package/dist/modules/file-convert/index.d.ts +273 -0
- package/dist/modules/file-convert/index.d.ts.map +1 -0
- package/dist/modules/file-convert/index.js +103 -0
- package/dist/modules/file-convert/index.js.map +1 -0
- package/dist/modules/files/index.d.ts +452 -0
- package/dist/modules/files/index.d.ts.map +1 -0
- package/dist/modules/files/index.js +733 -0
- package/dist/modules/files/index.js.map +1 -0
- package/dist/modules/image/index.d.ts +342 -0
- package/dist/modules/image/index.d.ts.map +1 -0
- package/dist/modules/image/index.js +281 -0
- package/dist/modules/image/index.js.map +1 -0
- package/dist/modules/messaging/index.d.ts +608 -0
- package/dist/modules/messaging/index.d.ts.map +1 -0
- package/dist/modules/messaging/index.js +1067 -0
- package/dist/modules/messaging/index.js.map +1 -0
- package/dist/modules/pdf/index.d.ts +287 -0
- package/dist/modules/pdf/index.d.ts.map +1 -0
- package/dist/modules/pdf/index.js +259 -0
- package/dist/modules/pdf/index.js.map +1 -0
- package/dist/modules/presentation/index.d.ts +247 -0
- package/dist/modules/presentation/index.d.ts.map +1 -0
- package/dist/modules/presentation/index.js +12657 -0
- package/dist/modules/presentation/index.js.map +1 -0
- package/dist/modules/queue/index.d.ts +129 -0
- package/dist/modules/queue/index.d.ts.map +1 -0
- package/dist/modules/queue/index.js +131 -0
- package/dist/modules/queue/index.js.map +1 -0
- package/dist/modules/rag/index.d.ts +250 -0
- package/dist/modules/rag/index.d.ts.map +1 -0
- package/dist/modules/rag/index.js +366 -0
- package/dist/modules/rag/index.js.map +1 -0
- package/dist/modules/scheduler/index.d.ts +216 -0
- package/dist/modules/scheduler/index.d.ts.map +1 -0
- package/dist/modules/scheduler/index.js +153 -0
- package/dist/modules/scheduler/index.js.map +1 -0
- package/dist/modules/skills/index.d.ts +205 -0
- package/dist/modules/skills/index.d.ts.map +1 -0
- package/dist/modules/skills/index.js +203 -0
- package/dist/modules/skills/index.js.map +1 -0
- package/dist/modules/tasks/index.d.ts +287 -0
- package/dist/modules/tasks/index.d.ts.map +1 -0
- package/dist/modules/tasks/index.js +207 -0
- package/dist/modules/tasks/index.js.map +1 -0
- package/dist/modules/vector-store/index.d.ts +3 -0
- package/dist/modules/vector-store/index.js +3 -0
- package/dist/modules/web-fetch/index.d.ts +99 -0
- package/dist/modules/web-fetch/index.d.ts.map +1 -0
- package/dist/modules/web-fetch/index.js +242 -0
- package/dist/modules/web-fetch/index.js.map +1 -0
- package/dist/object-artifact-store-CMTzCm_G.d.ts +7 -0
- package/dist/object-artifact-store-CMTzCm_G.d.ts.map +1 -0
- package/dist/object-artifact-store-wZ2j9cto.js +28 -0
- package/dist/object-artifact-store-wZ2j9cto.js.map +1 -0
- package/dist/pinecone-umY4t6OF.js +190 -0
- package/dist/pinecone-umY4t6OF.js.map +1 -0
- package/dist/provider-CgDAlg6K.js +34 -0
- package/dist/provider-CgDAlg6K.js.map +1 -0
- package/dist/qdrant-DMp4NhKR.js +253 -0
- package/dist/qdrant-DMp4NhKR.js.map +1 -0
- package/dist/resend-BAC38_dA.js +155 -0
- package/dist/resend-BAC38_dA.js.map +1 -0
- package/dist/s3-CsOaPWMP.js +955 -0
- package/dist/s3-CsOaPWMP.js.map +1 -0
- package/dist/schemas-ChOAhdo9.js +192 -0
- package/dist/schemas-ChOAhdo9.js.map +1 -0
- package/dist/slack-Di5BBNpt.js +1455 -0
- package/dist/slack-Di5BBNpt.js.map +1 -0
- package/dist/sqs-DCwS1i2N.js +225 -0
- package/dist/sqs-DCwS1i2N.js.map +1 -0
- package/dist/supabase-vector-Dpp9mmJR.js +218 -0
- package/dist/supabase-vector-Dpp9mmJR.js.map +1 -0
- package/dist/tanstack/index.d.ts +15 -0
- package/dist/tanstack/index.d.ts.map +1 -0
- package/dist/tanstack/index.js +28 -0
- package/dist/tanstack/index.js.map +1 -0
- package/dist/teams-DYAHNb39.js +835 -0
- package/dist/teams-DYAHNb39.js.map +1 -0
- package/dist/telegram-DDXWzkfL.js +734 -0
- package/dist/telegram-DDXWzkfL.js.map +1 -0
- package/dist/textract-CPLiB22H.js +554 -0
- package/dist/textract-CPLiB22H.js.map +1 -0
- package/dist/transport-B4vn-XiQ.js +157 -0
- package/dist/transport-B4vn-XiQ.js.map +1 -0
- package/dist/transport-i96ACAI_.d.ts +46 -0
- package/dist/transport-i96ACAI_.d.ts.map +1 -0
- package/dist/types-Ccb0DXY9.d.ts +150 -0
- package/dist/types-Ccb0DXY9.d.ts.map +1 -0
- package/dist/unique-EwBH1JPB.js +19 -0
- package/dist/unique-EwBH1JPB.js.map +1 -0
- package/dist/vector-store-C3nEO80e.js +193 -0
- package/dist/vector-store-C3nEO80e.js.map +1 -0
- package/dist/vendors/amazon-sp-api/index.d.ts +526 -0
- package/dist/vendors/amazon-sp-api/index.d.ts.map +1 -0
- package/dist/vendors/amazon-sp-api/index.js +975 -0
- package/dist/vendors/amazon-sp-api/index.js.map +1 -0
- package/dist/vendors/bedrock-agentcore-browser/index.d.ts +2 -0
- package/dist/vendors/bedrock-agentcore-browser/index.js +2 -0
- package/dist/vendors/bedrock-agentcore-code-interpreter/index.d.ts +228 -0
- package/dist/vendors/bedrock-agentcore-code-interpreter/index.d.ts.map +1 -0
- package/dist/vendors/bedrock-agentcore-code-interpreter/index.js +2 -0
- package/dist/vendors/cloudflare-browser/index.d.ts +2 -0
- package/dist/vendors/cloudflare-browser/index.js +2 -0
- package/dist/vendors/cloudflare-email/index.d.ts +260 -0
- package/dist/vendors/cloudflare-email/index.d.ts.map +1 -0
- package/dist/vendors/cloudflare-email/index.js +3 -0
- package/dist/vendors/cloudflare-sandbox/index.d.ts +565 -0
- package/dist/vendors/cloudflare-sandbox/index.d.ts.map +1 -0
- package/dist/vendors/cloudflare-sandbox/index.js +2 -0
- package/dist/vendors/eventbridge-scheduler/index.d.ts +2 -0
- package/dist/vendors/eventbridge-scheduler/index.js +2 -0
- package/dist/vendors/gotenberg/index.d.ts +306 -0
- package/dist/vendors/gotenberg/index.d.ts.map +1 -0
- package/dist/vendors/gotenberg/index.js +2 -0
- package/dist/vendors/imessage/index.d.ts +420 -0
- package/dist/vendors/imessage/index.d.ts.map +1 -0
- package/dist/vendors/imessage/index.js +4 -0
- package/dist/vendors/katana/index.d.ts +1570 -0
- package/dist/vendors/katana/index.d.ts.map +1 -0
- package/dist/vendors/katana/index.js +1639 -0
- package/dist/vendors/katana/index.js.map +1 -0
- package/dist/vendors/mastra-vector/index.d.ts +120 -0
- package/dist/vendors/mastra-vector/index.d.ts.map +1 -0
- package/dist/vendors/mastra-vector/index.js +3 -0
- package/dist/vendors/pinecone/index.d.ts +75 -0
- package/dist/vendors/pinecone/index.d.ts.map +1 -0
- package/dist/vendors/pinecone/index.js +3 -0
- package/dist/vendors/qdrant/index.d.ts +75 -0
- package/dist/vendors/qdrant/index.d.ts.map +1 -0
- package/dist/vendors/qdrant/index.js +3 -0
- package/dist/vendors/resend/index.d.ts +3 -0
- package/dist/vendors/resend/index.js +3 -0
- package/dist/vendors/s3/index.d.ts +2 -0
- package/dist/vendors/s3/index.js +2 -0
- package/dist/vendors/slack/index.d.ts +576 -0
- package/dist/vendors/slack/index.d.ts.map +1 -0
- package/dist/vendors/slack/index.js +3 -0
- package/dist/vendors/sqs/index.d.ts +2 -0
- package/dist/vendors/sqs/index.js +2 -0
- package/dist/vendors/supabase-vector/index.d.ts +89 -0
- package/dist/vendors/supabase-vector/index.d.ts.map +1 -0
- package/dist/vendors/supabase-vector/index.js +3 -0
- package/dist/vendors/teams/index.d.ts +303 -0
- package/dist/vendors/teams/index.d.ts.map +1 -0
- package/dist/vendors/teams/index.js +3 -0
- package/dist/vendors/telegram/index.d.ts +319 -0
- package/dist/vendors/telegram/index.d.ts.map +1 -0
- package/dist/vendors/telegram/index.js +3 -0
- package/dist/vendors/textract/index.d.ts +2 -0
- package/dist/vendors/textract/index.js +2 -0
- package/dist/vendors/woocommerce/index.d.ts +1700 -0
- package/dist/vendors/woocommerce/index.d.ts.map +1 -0
- package/dist/vendors/woocommerce/index.js +1427 -0
- package/dist/vendors/woocommerce/index.js.map +1 -0
- package/dist/with-auth-CpKqTrGK.js +240 -0
- package/dist/with-auth-CpKqTrGK.js.map +1 -0
- package/logos/LUCIDE-ATTRIBUTION.txt +4 -0
- package/logos/README.md +89 -0
- package/logos/amazon.svg +6 -0
- package/logos/artifacts.svg +9 -0
- package/logos/browser.svg +9 -0
- package/logos/calendar.svg +15 -0
- package/logos/cloudflare-browser.svg +5 -0
- package/logos/cloudflare-email.svg +5 -0
- package/logos/cloudflare.svg +4 -0
- package/logos/code-sandbox.svg +8 -0
- package/logos/content-type.svg +10 -0
- package/logos/crypto.svg +7 -0
- package/logos/document-extract.svg +12 -0
- package/logos/document-render.svg +8 -0
- package/logos/document.svg +10 -0
- package/logos/email-message.svg +8 -0
- package/logos/email.svg +7 -0
- package/logos/file-convert.svg +9 -0
- package/logos/files.svg +6 -0
- package/logos/gotenberg.svg +340 -0
- package/logos/image.svg +8 -0
- package/logos/imessage.svg +7 -0
- package/logos/katana.svg +13 -0
- package/logos/mastra.svg +7 -0
- package/logos/messaging.svg +7 -0
- package/logos/pack-logos.json +48 -0
- package/logos/pdf.svg +10 -0
- package/logos/pinecone.svg +25 -0
- package/logos/presentation.svg +8 -0
- package/logos/qdrant.svg +4 -0
- package/logos/queue.svg +11 -0
- package/logos/rag.svg +18 -0
- package/logos/resend.svg +5 -0
- package/logos/scheduler.svg +7 -0
- package/logos/skills.svg +10 -0
- package/logos/slack.svg +14 -0
- package/logos/supabase.svg +4 -0
- package/logos/tasks.svg +10 -0
- package/logos/teams.svg +6 -0
- package/logos/telegram.svg +10 -0
- package/logos/textract.svg +5 -0
- package/logos/vector-store.svg +8 -0
- package/logos/web-fetch.svg +8 -0
- package/logos/woocommerce.svg +4 -0
- package/package.json +373 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["#auth","#lwa","#api","#download","#ensureAccessToken","#accessToken","#accessTokenExpiresAt","#spGet","#spPost","#resolveSettlementReportDocumentId"],"sources":["../../../src/vendors/amazon-sp-api/contracts.ts","../../../src/vendors/amazon-sp-api/domain.ts","../../../src/vendors/amazon-sp-api/domain/settlement.ts","../../../src/vendors/amazon-sp-api/client.ts","../../../src/vendors/amazon-sp-api/module.ts"],"sourcesContent":["import { z } from 'zod'\n\n/** SP-API regional endpoints. */\nexport const amazonSpApiEndpointSchema = z.enum([\n\t'https://sellingpartnerapi-na.amazon.com',\n\t'https://sellingpartnerapi-eu.amazon.com',\n\t'https://sellingpartnerapi-fe.amazon.com'\n])\n\nexport const amazonSpApiAuthSchema = z.object({\n\tclient_id: z.string().min(1).describe('LWA client id'),\n\tclient_secret: z.string().min(1).describe('LWA client secret'),\n\trefresh_token: z.string().min(1).describe('LWA refresh token for the selling partner'),\n\taccess_key_id: z.string().min(1).describe('AWS access key id for SP-API SigV4'),\n\tsecret_access_key: z.string().min(1).describe('AWS secret access key for SP-API SigV4'),\n\tregion: z\n\t\t.string()\n\t\t.min(1)\n\t\t.describe('AWS region used for SigV4 (typically us-east-1 for NA, eu-west-1 for EU, us-west-2 for FE)'),\n\tendpoint: amazonSpApiEndpointSchema.describe('SP-API regional endpoint'),\n\tsession_token: z.string().min(1).optional().describe('Optional AWS session token'),\n\tmarketplace_ids: z\n\t\t.array(z.string().min(1))\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('Default marketplace ids when a tool call omits marketplace_ids')\n})\n\nexport type AmazonSpApiAuth = z.infer<typeof amazonSpApiAuthSchema>\n\n// ─── Orders ───────────────────────────────────────────────────────────────────\n\nexport const amazonSpApiListOrdersInputSchema = z.object({\n\tmarketplace_ids: z\n\t\t.array(z.string().min(1))\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('Marketplace ids; omit to use the configured defaults'),\n\tcreated_after: z.string().min(1).optional().describe('ISO 8601; orders created after'),\n\tcreated_before: z.string().min(1).optional().describe('ISO 8601; orders created before'),\n\tlast_updated_after: z.string().min(1).optional().describe('ISO 8601; orders updated after'),\n\torder_statuses: z.array(z.string().min(1)).optional().describe('Order status filter list'),\n\tcursor: z.string().min(1).optional().describe('NextToken from a prior page'),\n\tmax_results: z.int().min(1).max(100).optional().describe('Page size (1-100)')\n})\n\nexport const amazonSpApiOrderSchema = z.object({\n\tamazon_order_id: z.string(),\n\torder_status: z.string().optional(),\n\tpurchase_date: z.string().optional(),\n\tlast_update_date: z.string().optional(),\n\tmarketplace_id: z.string().optional(),\n\torder_total_amount: z.string().optional(),\n\torder_total_currency: z.string().optional(),\n\tfulfillment_channel: z.string().optional()\n})\n\nexport const amazonSpApiListOrdersOutputSchema = z.object({\n\titems: z.array(amazonSpApiOrderSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const amazonSpApiGetOrderInputSchema = z.object({\n\tamazon_order_id: z.string().min(1).describe('Amazon order id')\n})\n\nexport const amazonSpApiGetOrderOutputSchema = z.object({\n\torder: amazonSpApiOrderSchema\n})\n\nexport const amazonSpApiGetOrderItemsInputSchema = z.object({\n\tamazon_order_id: z.string().min(1).describe('Amazon order id'),\n\tcursor: z.string().min(1).optional().describe('NextToken from a prior page')\n})\n\nexport const amazonSpApiOrderItemSchema = z.object({\n\torder_item_id: z.string(),\n\tasin: z.string().optional(),\n\tseller_sku: z.string().optional(),\n\ttitle: z.string().optional(),\n\tquantity_ordered: z.number().optional(),\n\tquantity_shipped: z.number().optional(),\n\titem_price_amount: z.string().optional(),\n\titem_price_currency: z.string().optional()\n})\n\nexport const amazonSpApiGetOrderItemsOutputSchema = z.object({\n\tamazon_order_id: z.string(),\n\titems: z.array(amazonSpApiOrderItemSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\n// ─── Orders v2026-01-01 SearchOrders ──────────────────────────────────────────\n\nexport const amazonSpApiSearchOrdersInputSchema = z.object({\n\tcreated_after: z\n\t\t.string()\n\t\t.min(1)\n\t\t.describe('ISO 8601; orders created at or after this time (required for reconciliation)'),\n\tcreated_before: z.string().min(1).optional().describe('ISO 8601; orders created at or before this time'),\n\tmarketplace_ids: z\n\t\t.array(z.string().min(1))\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('Marketplace ids; omit to use the configured defaults'),\n\tmax_results: z.int().min(1).max(100).optional().describe('Page size (1-100, default 100)'),\n\tcursor: z.string().min(1).optional().describe('paginationToken from a prior page'),\n\tmax_pages: z\n\t\t.int()\n\t\t.min(1)\n\t\t.max(50)\n\t\t.optional()\n\t\t.describe('When set, drains up to this many pages and returns a combined list (default 1)')\n})\n\nexport const amazonSpApiSearchOrderSchema = z.object({\n\torder_id: z.string().describe('Amazon order id'),\n\tcreated_time: z.string().optional().describe('Order created time (ISO 8601)'),\n\tfulfillment_status: z.string().optional().describe('Fulfillment status when FULFILLMENT data is included')\n})\n\nexport const amazonSpApiSearchOrdersOutputSchema = z.object({\n\titems: z.array(amazonSpApiSearchOrderSchema),\n\tnext_cursor: z.string().optional().describe('paginationToken for the next page when not fully drained'),\n\ttruncated: z.boolean()\n})\n\n// ─── Inventory ────────────────────────────────────────────────────────────────\n\nexport const amazonSpApiListInventorySummariesInputSchema = z.object({\n\tmarketplace_id: z.string().min(1).optional().describe('Marketplace id; omit to use the first configured default'),\n\tseller_skus: z.array(z.string().min(1)).max(50).optional().describe('Optional seller SKU filter (max 50)'),\n\tstart_date_time: z.string().min(1).optional().describe('ISO 8601; summaries changed after'),\n\tcursor: z.string().min(1).optional().describe('nextToken from a prior page')\n})\n\nexport const amazonSpApiInventorySummarySchema = z.object({\n\tseller_sku: z.string().optional(),\n\tasin: z.string().optional(),\n\tfn_sku: z.string().optional(),\n\tcondition: z.string().optional(),\n\ttotal_quantity: z.number().optional(),\n\tproduct_name: z.string().optional()\n})\n\nexport const amazonSpApiListInventorySummariesOutputSchema = z.object({\n\titems: z.array(amazonSpApiInventorySummarySchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\n// ─── Reports (2021-06-30) ─────────────────────────────────────────────────────\n\nexport const amazonSpApiCreateReportInputSchema = z.object({\n\treport_type: z.string().min(1).describe('Report type (e.g. GET_FLAT_FILE_OPEN_LISTINGS_DATA)'),\n\tmarketplace_ids: z\n\t\t.array(z.string().min(1))\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('Marketplace ids; omit to use the configured defaults'),\n\tdata_start_time: z.string().min(1).optional().describe('ISO 8601 report data start'),\n\tdata_end_time: z.string().min(1).optional().describe('ISO 8601 report data end'),\n\treport_options: z.record(z.string(), z.string()).optional().describe('Optional report-type-specific options map')\n})\n\nexport const amazonSpApiCreateReportOutputSchema = z.object({\n\treport_id: z.string()\n})\n\nexport const amazonSpApiGetReportInputSchema = z.object({\n\treport_id: z.string().min(1).describe('Report id from createReport or listReports')\n})\n\nexport const amazonSpApiReportSchema = z.object({\n\treport_id: z.string(),\n\treport_type: z.string().optional(),\n\tprocessing_status: z.string().optional(),\n\tmarketplace_ids: z.array(z.string()).optional(),\n\tdata_start_time: z.string().optional(),\n\tdata_end_time: z.string().optional(),\n\treport_document_id: z.string().optional(),\n\tcreated_time: z.string().optional()\n})\n\nexport const amazonSpApiGetReportOutputSchema = z.object({\n\treport: amazonSpApiReportSchema\n})\n\nexport const amazonSpApiListReportsInputSchema = z.object({\n\treport_types: z.array(z.string().min(1)).optional().describe('Filter by report type(s)'),\n\tprocessing_statuses: z\n\t\t.array(z.string().min(1))\n\t\t.optional()\n\t\t.describe('Filter by processing status (e.g. DONE, IN_QUEUE, IN_PROGRESS, CANCELLED, FATAL)'),\n\tmarketplace_ids: z\n\t\t.array(z.string().min(1))\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('Marketplace ids filter; omit to use configured defaults when available'),\n\tpage_size: z.int().min(1).max(100).optional().describe('Page size (1-100)'),\n\tcreated_since: z.string().min(1).optional().describe('ISO 8601; reports created after'),\n\tcreated_until: z.string().min(1).optional().describe('ISO 8601; reports created before'),\n\tcursor: z.string().min(1).optional().describe('nextToken from a prior page')\n})\n\nexport const amazonSpApiListReportsOutputSchema = z.object({\n\titems: z.array(amazonSpApiReportSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const amazonSpApiGetReportDocumentInputSchema = z.object({\n\treport_document_id: z.string().min(1).describe('Report document id from a completed report')\n})\n\nexport const amazonSpApiGetReportDocumentOutputSchema = z.object({\n\tdocument_id: z.string(),\n\turl: z.string(),\n\tcompression_algorithm: z.string().optional()\n})\n\n// ─── Settlement summary (Flat File V2 composite) ──────────────────────────────\n\n/**\n * Composite input: pick newest completed V2 settlement report in the retention\n * window (default 90d), download one document, return eight summary fields only.\n */\nexport const amazonSpApiGetSettlementSummaryInputSchema = z.object({\n\treport_id: z\n\t\t.string()\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('Optional report id; when set, uses this report instead of listing the newest DONE settlement report'),\n\tcreated_since: z\n\t\t.string()\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('ISO 8601 lower bound when listing reports (default: now minus 90 days)')\n})\n\n/** Eight summary fields only — never raw TSV rows. */\nexport const amazonSpApiSettlementSummarySchema = z.object({\n\tsettlement_id: z.string().describe('Amazon settlement id'),\n\tsettlement_start_date: z.string().describe('Settlement period start'),\n\tsettlement_end_date: z.string().describe('Settlement period end'),\n\tdeposit_date: z.string().describe('Deposit date when present; otherwise settlement end'),\n\tcurrency: z.string().describe('ISO currency code from the report'),\n\ttotal_amount_cents: z\n\t\t.number()\n\t\t.int()\n\t\t.describe('Report total-amount as safe integer cents (must equal amount_sum_cents)'),\n\tamount_sum_cents: z.number().int().describe('Sum of amount column as safe integer cents'),\n\trow_count: z.number().int().describe('Number of data rows in the TSV (excluding header)')\n})\n\nexport const amazonSpApiGetSettlementSummaryOutputSchema = amazonSpApiSettlementSummarySchema\n\n// ─── Catalog (2022-04-01) ─────────────────────────────────────────────────────\n\nexport const amazonSpApiSearchCatalogItemsInputSchema = z.object({\n\tkeywords: z.array(z.string().min(1)).min(1).describe('Search keywords'),\n\tmarketplace_ids: z\n\t\t.array(z.string().min(1))\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('Marketplace ids; omit to use the configured defaults'),\n\tincluded_data: z\n\t\t.array(z.string().min(1))\n\t\t.optional()\n\t\t.describe('Data sets to include (e.g. summaries, images, attributes)'),\n\tpage_size: z.int().min(1).max(20).optional().describe('Page size (1-20)'),\n\tcursor: z.string().min(1).optional().describe('pageToken from a prior page')\n})\n\nexport const amazonSpApiCatalogItemSchema = z.object({\n\tasin: z.string(),\n\ttitle: z.string().optional(),\n\tbrand: z.string().optional(),\n\tproduct_type: z.string().optional(),\n\tmarketplace_id: z.string().optional()\n})\n\nexport const amazonSpApiSearchCatalogItemsOutputSchema = z.object({\n\titems: z.array(amazonSpApiCatalogItemSchema),\n\tnumber_of_results: z.number().optional(),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type AmazonSpApiListOrdersInput = z.infer<typeof amazonSpApiListOrdersInputSchema>\nexport type AmazonSpApiListOrdersOutput = z.infer<typeof amazonSpApiListOrdersOutputSchema>\nexport type AmazonSpApiGetOrderInput = z.infer<typeof amazonSpApiGetOrderInputSchema>\nexport type AmazonSpApiGetOrderOutput = z.infer<typeof amazonSpApiGetOrderOutputSchema>\nexport type AmazonSpApiGetOrderItemsInput = z.infer<typeof amazonSpApiGetOrderItemsInputSchema>\nexport type AmazonSpApiGetOrderItemsOutput = z.infer<typeof amazonSpApiGetOrderItemsOutputSchema>\nexport type AmazonSpApiListInventorySummariesInput = z.infer<typeof amazonSpApiListInventorySummariesInputSchema>\nexport type AmazonSpApiListInventorySummariesOutput = z.infer<typeof amazonSpApiListInventorySummariesOutputSchema>\nexport type AmazonSpApiCreateReportInput = z.infer<typeof amazonSpApiCreateReportInputSchema>\nexport type AmazonSpApiCreateReportOutput = z.infer<typeof amazonSpApiCreateReportOutputSchema>\nexport type AmazonSpApiGetReportInput = z.infer<typeof amazonSpApiGetReportInputSchema>\nexport type AmazonSpApiGetReportOutput = z.infer<typeof amazonSpApiGetReportOutputSchema>\nexport type AmazonSpApiListReportsInput = z.infer<typeof amazonSpApiListReportsInputSchema>\nexport type AmazonSpApiListReportsOutput = z.infer<typeof amazonSpApiListReportsOutputSchema>\nexport type AmazonSpApiGetReportDocumentInput = z.infer<typeof amazonSpApiGetReportDocumentInputSchema>\nexport type AmazonSpApiGetReportDocumentOutput = z.infer<typeof amazonSpApiGetReportDocumentOutputSchema>\nexport type AmazonSpApiSearchCatalogItemsInput = z.infer<typeof amazonSpApiSearchCatalogItemsInputSchema>\nexport type AmazonSpApiSearchCatalogItemsOutput = z.infer<typeof amazonSpApiSearchCatalogItemsOutputSchema>\nexport type AmazonSpApiSearchOrdersInput = z.infer<typeof amazonSpApiSearchOrdersInputSchema>\nexport type AmazonSpApiSearchOrdersOutput = z.infer<typeof amazonSpApiSearchOrdersOutputSchema>\nexport type AmazonSpApiSearchOrder = z.infer<typeof amazonSpApiSearchOrderSchema>\nexport type AmazonSpApiGetSettlementSummaryInput = z.infer<typeof amazonSpApiGetSettlementSummaryInputSchema>\nexport type AmazonSpApiGetSettlementSummaryOutput = z.infer<typeof amazonSpApiGetSettlementSummaryOutputSchema>\nexport type AmazonSpApiSettlementSummary = z.infer<typeof amazonSpApiSettlementSummarySchema>\nexport type AmazonSpApiOrder = z.infer<typeof amazonSpApiOrderSchema>\nexport type AmazonSpApiOrderItem = z.infer<typeof amazonSpApiOrderItemSchema>\nexport type AmazonSpApiInventorySummary = z.infer<typeof amazonSpApiInventorySummarySchema>\nexport type AmazonSpApiReport = z.infer<typeof amazonSpApiReportSchema>\nexport type AmazonSpApiCatalogItem = z.infer<typeof amazonSpApiCatalogItemSchema>\n","/**\n * Amazon SP-API: LWA body, order/inventory/report/catalog parse (no HTTP).\n */\n\nimport { isPlainObject, isString } from 'es-toolkit'\n\nimport { ToolError } from '../../core/errors'\nimport type {\n\tAmazonSpApiCatalogItem,\n\tAmazonSpApiInventorySummary,\n\tAmazonSpApiOrder,\n\tAmazonSpApiOrderItem,\n\tAmazonSpApiReport,\n\tAmazonSpApiSearchOrder\n} from './contracts'\n\nexport const LWA_TOKEN_URL = 'https://api.amazon.com/auth/o2/token'\n\nexport function lwaTokenBody(auth: { client_id: string; client_secret: string; refresh_token: string }): string {\n\tconst params = new URLSearchParams({\n\t\tgrant_type: 'refresh_token',\n\t\trefresh_token: auth.refresh_token,\n\t\tclient_id: auth.client_id,\n\t\tclient_secret: auth.client_secret\n\t})\n\treturn params.toString()\n}\n\nexport function parseLwaAccessToken(data: unknown): string {\n\tif (!isPlainObject(data) || !isString(data['access_token']) || data['access_token'].length === 0) {\n\t\tthrow new ToolError('Amazon LWA did not return an access_token', { code: 'bad_auth' })\n\t}\n\treturn data['access_token']\n}\n\nexport function parseOrder(value: unknown): AmazonSpApiOrder {\n\tif (!isPlainObject(value) || !isString(value['AmazonOrderId']) || value['AmazonOrderId'].length === 0) {\n\t\tthrow new ToolError('Amazon SP-API returned an invalid order', { code: 'upstream' })\n\t}\n\tconst total = value['OrderTotal']\n\tconst amount = isPlainObject(total) && isString(total['Amount']) ? total['Amount'] : undefined\n\tconst currency = isPlainObject(total) && isString(total['CurrencyCode']) ? total['CurrencyCode'] : undefined\n\treturn {\n\t\tamazon_order_id: value['AmazonOrderId'],\n\t\t...(isString(value['OrderStatus']) && { order_status: value['OrderStatus'] }),\n\t\t...(isString(value['PurchaseDate']) && { purchase_date: value['PurchaseDate'] }),\n\t\t...(isString(value['LastUpdateDate']) && { last_update_date: value['LastUpdateDate'] }),\n\t\t...(isString(value['MarketplaceId']) && { marketplace_id: value['MarketplaceId'] }),\n\t\t...(amount && { order_total_amount: amount }),\n\t\t...(currency && { order_total_currency: currency }),\n\t\t...(isString(value['FulfillmentChannel']) && { fulfillment_channel: value['FulfillmentChannel'] })\n\t}\n}\n\nexport function parseOrdersPayload(data: unknown): {\n\titems: AmazonSpApiOrder[]\n\tnextToken?: string\n} {\n\tif (!isPlainObject(data)) {\n\t\tthrow new ToolError('Amazon SP-API orders payload invalid', { code: 'upstream' })\n\t}\n\tconst payload = data['payload']\n\tif (!isPlainObject(payload)) {\n\t\tthrow new ToolError('Amazon SP-API orders missing payload', { code: 'upstream' })\n\t}\n\tconst orders = payload['Orders']\n\tif (!Array.isArray(orders)) {\n\t\tthrow new ToolError('Amazon SP-API orders missing Orders array', { code: 'upstream' })\n\t}\n\tconst nextToken = isString(payload['NextToken']) && payload['NextToken'].length > 0 ? payload['NextToken'] : undefined\n\treturn { items: orders.map(parseOrder), ...(nextToken && { nextToken }) }\n}\n\nexport function parseOrderPayload(data: unknown): AmazonSpApiOrder {\n\tif (!isPlainObject(data) || !isPlainObject(data['payload'])) {\n\t\tthrow new ToolError('Amazon SP-API get order payload invalid', { code: 'upstream' })\n\t}\n\treturn parseOrder(data['payload'])\n}\n\n/** Orders API v2026-01-01 SearchOrders — camelCase body, not v0 payload wrapper. */\nexport function parseSearchOrder(value: unknown): AmazonSpApiSearchOrder {\n\tif (!isPlainObject(value) || !isString(value['orderId']) || value['orderId'].length === 0) {\n\t\tthrow new ToolError('Amazon SP-API searchOrders returned an invalid order', { code: 'upstream' })\n\t}\n\tconst fulfillment = value['fulfillment']\n\tconst fulfillmentStatus =\n\t\tisPlainObject(fulfillment) && isString(fulfillment['fulfillmentStatus'])\n\t\t\t? fulfillment['fulfillmentStatus']\n\t\t\t: undefined\n\treturn {\n\t\torder_id: value['orderId'],\n\t\t...(isString(value['createdTime']) && { created_time: value['createdTime'] }),\n\t\t...(fulfillmentStatus && { fulfillment_status: fulfillmentStatus })\n\t}\n}\n\nexport function parseSearchOrdersPayload(data: unknown): {\n\titems: AmazonSpApiSearchOrder[]\n\tnextToken?: string\n} {\n\tif (!isPlainObject(data)) {\n\t\tthrow new ToolError('Amazon SP-API searchOrders payload invalid', { code: 'upstream' })\n\t}\n\t// Some gateways still wrap; accept both shapes.\n\tconst root = isPlainObject(data['payload']) ? data['payload'] : data\n\tif (!isPlainObject(root)) {\n\t\tthrow new ToolError('Amazon SP-API searchOrders missing body', { code: 'upstream' })\n\t}\n\tconst orders = root['orders']\n\tif (!Array.isArray(orders)) {\n\t\tthrow new ToolError('Amazon SP-API searchOrders missing orders array', { code: 'upstream' })\n\t}\n\tconst pagination = root['pagination']\n\tconst nextToken =\n\t\tisPlainObject(pagination) && isString(pagination['nextToken']) && pagination['nextToken'].length > 0\n\t\t\t? pagination['nextToken']\n\t\t\t: undefined\n\treturn { items: orders.map(parseSearchOrder), ...(nextToken && { nextToken }) }\n}\n\nexport function parseOrderItem(value: unknown): AmazonSpApiOrderItem {\n\tif (!isPlainObject(value) || !isString(value['OrderItemId']) || value['OrderItemId'].length === 0) {\n\t\tthrow new ToolError('Amazon SP-API returned an invalid order item', { code: 'upstream' })\n\t}\n\tconst price = value['ItemPrice']\n\tconst amount = isPlainObject(price) && isString(price['Amount']) ? price['Amount'] : undefined\n\tconst currency = isPlainObject(price) && isString(price['CurrencyCode']) ? price['CurrencyCode'] : undefined\n\treturn {\n\t\torder_item_id: value['OrderItemId'],\n\t\t...(isString(value['ASIN']) && { asin: value['ASIN'] }),\n\t\t...(isString(value['SellerSKU']) && { seller_sku: value['SellerSKU'] }),\n\t\t...(isString(value['Title']) && { title: value['Title'] }),\n\t\t...(typeof value['QuantityOrdered'] === 'number' && { quantity_ordered: value['QuantityOrdered'] }),\n\t\t...(typeof value['QuantityShipped'] === 'number' && { quantity_shipped: value['QuantityShipped'] }),\n\t\t...(amount && { item_price_amount: amount }),\n\t\t...(currency && { item_price_currency: currency })\n\t}\n}\n\nexport function parseOrderItemsPayload(data: unknown): {\n\tamazon_order_id: string\n\titems: AmazonSpApiOrderItem[]\n\tnextToken?: string\n} {\n\tif (!isPlainObject(data)) {\n\t\tthrow new ToolError('Amazon SP-API order items payload invalid', { code: 'upstream' })\n\t}\n\tconst payload = data['payload']\n\tif (!isPlainObject(payload)) {\n\t\tthrow new ToolError('Amazon SP-API order items missing payload', { code: 'upstream' })\n\t}\n\tif (!isString(payload['AmazonOrderId']) || payload['AmazonOrderId'].length === 0) {\n\t\tthrow new ToolError('Amazon SP-API order items missing AmazonOrderId', { code: 'upstream' })\n\t}\n\tconst orderItems = payload['OrderItems']\n\tif (!Array.isArray(orderItems)) {\n\t\tthrow new ToolError('Amazon SP-API order items missing OrderItems array', { code: 'upstream' })\n\t}\n\tconst nextToken = isString(payload['NextToken']) && payload['NextToken'].length > 0 ? payload['NextToken'] : undefined\n\treturn {\n\t\tamazon_order_id: payload['AmazonOrderId'],\n\t\titems: orderItems.map(parseOrderItem),\n\t\t...(nextToken && { nextToken })\n\t}\n}\n\nexport function parseInventorySummary(value: unknown): AmazonSpApiInventorySummary {\n\tif (!isPlainObject(value)) {\n\t\tthrow new ToolError('Amazon SP-API returned an invalid inventory summary', { code: 'upstream' })\n\t}\n\tconst totals = value['inventoryDetails']\n\tlet totalQuantity: number | undefined\n\tif (isPlainObject(totals) && typeof totals['fulfillableQuantity'] === 'number') {\n\t\ttotalQuantity = totals['fulfillableQuantity']\n\t} else if (typeof value['totalQuantity'] === 'number') {\n\t\ttotalQuantity = value['totalQuantity']\n\t}\n\treturn {\n\t\t...(isString(value['sellerSku']) && { seller_sku: value['sellerSku'] }),\n\t\t...(isString(value['asin']) && { asin: value['asin'] }),\n\t\t...(isString(value['fnSku']) && { fn_sku: value['fnSku'] }),\n\t\t...(isString(value['condition']) && { condition: value['condition'] }),\n\t\t...(totalQuantity !== undefined && { total_quantity: totalQuantity }),\n\t\t...(isString(value['productName']) && { product_name: value['productName'] })\n\t}\n}\n\nexport function parseInventoryPayload(data: unknown): {\n\titems: AmazonSpApiInventorySummary[]\n\tnextToken?: string\n} {\n\tif (!isPlainObject(data)) {\n\t\tthrow new ToolError('Amazon SP-API inventory payload invalid', { code: 'upstream' })\n\t}\n\tconst payload = data['payload']\n\tif (!isPlainObject(payload)) {\n\t\tthrow new ToolError('Amazon SP-API inventory missing payload', { code: 'upstream' })\n\t}\n\tconst summaries = payload['inventorySummaries']\n\tif (!Array.isArray(summaries)) {\n\t\tthrow new ToolError('Amazon SP-API inventory missing inventorySummaries', { code: 'upstream' })\n\t}\n\tconst pagination = payload['pagination']\n\tconst nextToken =\n\t\tisPlainObject(pagination) && isString(pagination['nextToken']) && pagination['nextToken'].length > 0\n\t\t\t? pagination['nextToken']\n\t\t\t: undefined\n\treturn { items: summaries.map(parseInventorySummary), ...(nextToken && { nextToken }) }\n}\n\nexport function parseCreateReportPayload(data: unknown): { report_id: string } {\n\tif (!isPlainObject(data) || !isString(data['reportId']) || data['reportId'].length === 0) {\n\t\tthrow new ToolError('Amazon SP-API create report response invalid', { code: 'upstream' })\n\t}\n\treturn { report_id: data['reportId'] }\n}\n\nexport function parseReport(value: unknown): AmazonSpApiReport {\n\tif (!isPlainObject(value) || !isString(value['reportId']) || value['reportId'].length === 0) {\n\t\tthrow new ToolError('Amazon SP-API returned an invalid report', { code: 'upstream' })\n\t}\n\tconst marketplaceIds = value['marketplaceIds']\n\tconst marketplace_ids =\n\t\tArray.isArray(marketplaceIds) && marketplaceIds.every((id) => isString(id))\n\t\t\t? marketplaceIds.filter((id): id is string => isString(id) && id.length > 0)\n\t\t\t: undefined\n\treturn {\n\t\treport_id: value['reportId'],\n\t\t...(isString(value['reportType']) && { report_type: value['reportType'] }),\n\t\t...(isString(value['processingStatus']) && { processing_status: value['processingStatus'] }),\n\t\t...(marketplace_ids && marketplace_ids.length > 0 && { marketplace_ids }),\n\t\t...(isString(value['dataStartTime']) && { data_start_time: value['dataStartTime'] }),\n\t\t...(isString(value['dataEndTime']) && { data_end_time: value['dataEndTime'] }),\n\t\t...(isString(value['reportDocumentId']) && { report_document_id: value['reportDocumentId'] }),\n\t\t...(isString(value['createdTime']) && { created_time: value['createdTime'] })\n\t}\n}\n\nexport function parseGetReportPayload(data: unknown): AmazonSpApiReport {\n\treturn parseReport(data)\n}\n\nexport function parseListReportsPayload(data: unknown): {\n\titems: AmazonSpApiReport[]\n\tnextToken?: string\n} {\n\tif (!isPlainObject(data)) {\n\t\tthrow new ToolError('Amazon SP-API list reports payload invalid', { code: 'upstream' })\n\t}\n\tconst reports = data['reports']\n\tif (!Array.isArray(reports)) {\n\t\tthrow new ToolError('Amazon SP-API list reports missing reports array', { code: 'upstream' })\n\t}\n\tconst nextToken = isString(data['nextToken']) && data['nextToken'].length > 0 ? data['nextToken'] : undefined\n\treturn { items: reports.map(parseReport), ...(nextToken && { nextToken }) }\n}\n\nexport function parseReportDocumentPayload(data: unknown): {\n\tdocument_id: string\n\turl: string\n\tcompression_algorithm?: string\n} {\n\tif (\n\t\t!isPlainObject(data) ||\n\t\t!isString(data['reportDocumentId']) ||\n\t\tdata['reportDocumentId'].length === 0 ||\n\t\t!isString(data['url']) ||\n\t\tdata['url'].length === 0\n\t) {\n\t\tthrow new ToolError('Amazon SP-API report document response invalid', { code: 'upstream' })\n\t}\n\treturn {\n\t\tdocument_id: data['reportDocumentId'],\n\t\turl: data['url'],\n\t\t...(isString(data['compressionAlgorithm']) &&\n\t\t\tdata['compressionAlgorithm'].length > 0 && {\n\t\t\t\tcompression_algorithm: data['compressionAlgorithm']\n\t\t\t})\n\t}\n}\n\nexport function parseCatalogItem(value: unknown): AmazonSpApiCatalogItem {\n\tif (!isPlainObject(value) || !isString(value['asin']) || value['asin'].length === 0) {\n\t\tthrow new ToolError('Amazon SP-API returned an invalid catalog item', { code: 'upstream' })\n\t}\n\tconst summaries = value['summaries']\n\tlet title: string | undefined\n\tlet brand: string | undefined\n\tlet marketplace_id: string | undefined\n\tif (Array.isArray(summaries) && summaries.length > 0 && isPlainObject(summaries[0])) {\n\t\tconst summary = summaries[0]\n\t\tif (isString(summary['itemName'])) title = summary['itemName']\n\t\tif (isString(summary['brandName'])) brand = summary['brandName']\n\t\tif (isString(summary['marketplaceId'])) marketplace_id = summary['marketplaceId']\n\t}\n\tconst productTypes = value['productTypes']\n\tlet product_type: string | undefined\n\tif (Array.isArray(productTypes) && productTypes.length > 0 && isPlainObject(productTypes[0])) {\n\t\tconst pt = productTypes[0]\n\t\tif (isString(pt['productType'])) product_type = pt['productType']\n\t}\n\treturn {\n\t\tasin: value['asin'],\n\t\t...(title && { title }),\n\t\t...(brand && { brand }),\n\t\t...(product_type && { product_type }),\n\t\t...(marketplace_id && { marketplace_id })\n\t}\n}\n\nexport function parseSearchCatalogItemsPayload(data: unknown): {\n\titems: AmazonSpApiCatalogItem[]\n\tnumberOfResults?: number\n\tnextToken?: string\n} {\n\tif (!isPlainObject(data)) {\n\t\tthrow new ToolError('Amazon SP-API catalog search payload invalid', { code: 'upstream' })\n\t}\n\tconst items = data['items']\n\tif (!Array.isArray(items)) {\n\t\tthrow new ToolError('Amazon SP-API catalog search missing items array', { code: 'upstream' })\n\t}\n\tconst pagination = data['pagination']\n\tconst nextToken =\n\t\tisPlainObject(pagination) && isString(pagination['nextToken']) && pagination['nextToken'].length > 0\n\t\t\t? pagination['nextToken']\n\t\t\t: undefined\n\tconst numberOfResults = typeof data['numberOfResults'] === 'number' ? data['numberOfResults'] : undefined\n\treturn {\n\t\titems: items.map(parseCatalogItem),\n\t\t...(numberOfResults !== undefined && { numberOfResults }),\n\t\t...(nextToken && { nextToken })\n\t}\n}\n\nexport function requireMarketplaceIds(\n\tinputIds: string[] | undefined,\n\tauthIds: string[] | undefined,\n\tlabel: string\n): string[] {\n\tconst ids = inputIds ?? authIds\n\tif (!ids || ids.length === 0) {\n\t\tthrow new ToolError(`${label} requires marketplace_ids on the call or auth`, { code: 'bad_input' })\n\t}\n\treturn ids\n}\n","/**\n * Amazon settlement report V2 (GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2).\n * TSV via papaparse; money via decimal.js. Never put raw row PII in errors/output.\n */\n\nimport Decimal from 'decimal.js'\nimport Papa from 'papaparse'\n\nimport { ToolError } from '../../../core/errors'\nimport type { AmazonSpApiSettlementSummary } from '../contracts'\n\n/** Report type for Flat File V2 Settlement (auto-scheduled by Amazon). */\nexport const SETTLEMENT_REPORT_TYPE_V2 = 'GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2'\n\n/** How far back listReports looks for completed settlement reports. */\nexport const SETTLEMENT_RETENTION_DAYS = 90\n\n/** Max compressed document body (bytes). */\nexport const SETTLEMENT_MAX_COMPRESSED_BYTES = 16 * 1024 * 1024\n\n/** Max decompressed TSV body (bytes). */\nexport const SETTLEMENT_MAX_DECOMPRESSED_BYTES = 64 * 1024 * 1024\n\n/** Max data rows (excluding header). */\nexport const SETTLEMENT_MAX_ROWS = 250_000\n\n/** Required V2 header names (order free after parse; extra trailing columns OK). */\nexport const SETTLEMENT_V2_REQUIRED_COLUMNS = [\n\t'settlement-id',\n\t'settlement-start-date',\n\t'settlement-end-date',\n\t'deposit-date',\n\t'total-amount',\n\t'currency',\n\t'amount'\n] as const\n\ntype SettlementRow = Record<string, string | undefined>\n\nfunction settlementError(\n\tmessage: string,\n\tcode: 'bad_input' | 'upstream' | 'too_large' | 'not_found' | 'unsupported' = 'upstream'\n): never {\n\tthrow new ToolError(message, { code })\n}\n\nfunction cell(row: SettlementRow, key: string): string {\n\treturn (row[key] ?? '').trim()\n}\n\n/**\n * Parse Amazon settlement amount strings to safe integer cents via decimal.js.\n * Empty → 0. Strips US thousands commas only (`1,234.56` → `1234.56`).\n */\nexport function parseUsMoneyToSafeCents(raw: string): number {\n\tconst trimmed = raw.trim()\n\tif (trimmed.length === 0) return 0\n\t// Amazon V2 is US-style; drop thousands separators so Decimal accepts the value.\n\tconst normalized = trimmed.replace(/,/g, '')\n\tlet value: Decimal\n\ttry {\n\t\tvalue = new Decimal(normalized)\n\t} catch {\n\t\tsettlementError('Settlement report has an invalid amount cell', 'upstream')\n\t}\n\tif (!value.isFinite()) {\n\t\tsettlementError('Settlement report has a non-numeric amount', 'upstream')\n\t}\n\tconst cents = value.times(100).toDecimalPlaces(0, Decimal.ROUND_HALF_UP)\n\tif (!cents.isInteger()) {\n\t\tsettlementError('Settlement report has a non-numeric amount', 'upstream')\n\t}\n\tconst n = cents.toNumber()\n\tif (!Number.isSafeInteger(n)) {\n\t\tsettlementError('Settlement amount exceeds safe integer cents range', 'upstream')\n\t}\n\treturn n\n}\n\n/** Copy into a fresh ArrayBuffer so Blob accepts it under exact DOM typings. */\nfunction toArrayBuffer(bytes: Uint8Array): ArrayBuffer {\n\tconst copy = new Uint8Array(bytes.byteLength)\n\tcopy.set(bytes)\n\treturn copy.buffer\n}\n\n/** Decompress GZIP when report document uses compressionAlgorithm GZIP (Web DecompressionStream). */\nexport async function maybeGunzipReportBytes(\n\tbytes: Uint8Array,\n\tcompressionAlgorithm: string | undefined\n): Promise<Uint8Array> {\n\tif (!compressionAlgorithm) return bytes\n\tconst algo = compressionAlgorithm.toUpperCase()\n\tif (algo !== 'GZIP') {\n\t\tsettlementError(`Unsupported settlement report compression: ${algo}`, 'upstream')\n\t}\n\tif (bytes.byteLength > SETTLEMENT_MAX_COMPRESSED_BYTES) {\n\t\tsettlementError('Settlement report compressed body exceeds limit', 'too_large')\n\t}\n\tif (typeof DecompressionStream === 'undefined') {\n\t\tsettlementError('GZIP decompression is not available in this runtime', 'unsupported')\n\t}\n\ttry {\n\t\tconst stream = new Blob([toArrayBuffer(bytes)]).stream().pipeThrough(new DecompressionStream('gzip'))\n\t\tconst buffer = await new Response(stream).arrayBuffer()\n\t\tif (buffer.byteLength > SETTLEMENT_MAX_DECOMPRESSED_BYTES) {\n\t\t\tsettlementError('Settlement report decompressed body exceeds limit', 'too_large')\n\t\t}\n\t\treturn new Uint8Array(buffer)\n\t} catch (error) {\n\t\tif (error instanceof ToolError) throw error\n\t\tsettlementError('Failed to decompress settlement report', 'upstream')\n\t}\n}\n\n/**\n * Parse Flat File V2 settlement TSV into the eight summary fields only.\n * Validates single settlement-id, currency, period, and amount sum vs total-amount.\n */\nexport function parseSettlementV2Tsv(text: string): AmazonSpApiSettlementSummary {\n\tconst result = Papa.parse<SettlementRow>(text, {\n\t\tdelimiter: '\\t',\n\t\theader: true,\n\t\tskipEmptyLines: 'greedy',\n\t\ttransformHeader: (header) => header.trim().replace(/^\\uFEFF/, '')\n\t})\n\n\tif (result.errors.length > 0) {\n\t\tsettlementError('Settlement report TSV could not be parsed', 'upstream')\n\t}\n\n\tconst fields = result.meta.fields ?? []\n\tfor (const required of SETTLEMENT_V2_REQUIRED_COLUMNS) {\n\t\tif (!fields.includes(required)) {\n\t\t\tsettlementError('Settlement report header columns do not match Flat File V2 schema', 'upstream')\n\t\t}\n\t}\n\n\tconst rows = result.data\n\tif (rows.length === 0) {\n\t\tsettlementError('Settlement report is empty or missing data rows', 'upstream')\n\t}\n\tif (rows.length > SETTLEMENT_MAX_ROWS) {\n\t\tsettlementError('Settlement report exceeds max row limit', 'too_large')\n\t}\n\n\tlet settlementId: string | undefined\n\tlet settlementStart: string | undefined\n\tlet settlementEnd: string | undefined\n\tlet depositDate: string | undefined\n\tlet currency: string | undefined\n\tlet totalAmountCents: number | undefined\n\tlet amountSum = new Decimal(0)\n\n\tfor (const row of rows) {\n\t\tconst rowSettlementId = cell(row, 'settlement-id')\n\t\tconst rowStart = cell(row, 'settlement-start-date')\n\t\tconst rowEnd = cell(row, 'settlement-end-date')\n\t\tconst rowDeposit = cell(row, 'deposit-date')\n\t\tconst rowTotal = cell(row, 'total-amount')\n\t\tconst rowCurrency = cell(row, 'currency')\n\t\tconst rowAmount = cell(row, 'amount')\n\n\t\tif (rowSettlementId.length === 0) {\n\t\t\tsettlementError('Settlement report row missing settlement-id', 'upstream')\n\t\t}\n\n\t\tconst rowTotalCents = parseUsMoneyToSafeCents(rowTotal)\n\t\tconst rowAmountCents = parseUsMoneyToSafeCents(rowAmount)\n\n\t\tif (settlementId === undefined) {\n\t\t\tsettlementId = rowSettlementId\n\t\t\tsettlementStart = rowStart\n\t\t\tsettlementEnd = rowEnd\n\t\t\tdepositDate = rowDeposit\n\t\t\tcurrency = rowCurrency\n\t\t\ttotalAmountCents = rowTotalCents\n\t\t} else {\n\t\t\tif (rowSettlementId !== settlementId) {\n\t\t\t\tsettlementError('Settlement report contains multiple settlement ids', 'upstream')\n\t\t\t}\n\t\t\tif (rowStart !== settlementStart || rowEnd !== settlementEnd) {\n\t\t\t\tsettlementError('Settlement report has inconsistent settlement period', 'upstream')\n\t\t\t}\n\t\t\tif (rowCurrency !== currency) {\n\t\t\t\tsettlementError('Settlement report has inconsistent currency', 'upstream')\n\t\t\t}\n\t\t\tif (rowTotalCents !== totalAmountCents) {\n\t\t\t\tsettlementError('Settlement report has inconsistent total-amount', 'upstream')\n\t\t\t}\n\t\t\tif (rowDeposit.length > 0) {\n\t\t\t\tif (depositDate && depositDate.length > 0 && rowDeposit !== depositDate) {\n\t\t\t\t\tsettlementError('Settlement report has inconsistent deposit-date', 'upstream')\n\t\t\t\t}\n\t\t\t\tif (!depositDate || depositDate.length === 0) depositDate = rowDeposit\n\t\t\t}\n\t\t}\n\n\t\tamountSum = amountSum.plus(rowAmountCents)\n\t}\n\n\tif (\n\t\tsettlementId === undefined ||\n\t\tsettlementStart === undefined ||\n\t\tsettlementEnd === undefined ||\n\t\tcurrency === undefined ||\n\t\ttotalAmountCents === undefined\n\t) {\n\t\tsettlementError('Settlement report has no usable data rows', 'upstream')\n\t}\n\n\tif (!amountSum.isInteger() || !Number.isSafeInteger(amountSum.toNumber())) {\n\t\tsettlementError('Settlement amount sum exceeds safe integer cents range', 'upstream')\n\t}\n\tconst amountSumCents = amountSum.toNumber()\n\tif (amountSumCents !== totalAmountCents) {\n\t\tsettlementError('Settlement amount sum does not match total-amount', 'upstream')\n\t}\n\n\treturn {\n\t\tsettlement_id: settlementId,\n\t\tsettlement_start_date: settlementStart,\n\t\tsettlement_end_date: settlementEnd,\n\t\tdeposit_date: depositDate && depositDate.length > 0 ? depositDate : settlementEnd,\n\t\tcurrency,\n\t\ttotal_amount_cents: totalAmountCents,\n\t\tamount_sum_cents: amountSumCents,\n\t\trow_count: rows.length\n\t}\n}\n\n/** Decode UTF-8 document bytes (after optional gunzip) and parse summary. */\nexport async function summarizeSettlementDocument(\n\tbytes: Uint8Array,\n\tcompressionAlgorithm: string | undefined\n): Promise<AmazonSpApiSettlementSummary> {\n\tif (!compressionAlgorithm && bytes.byteLength > SETTLEMENT_MAX_DECOMPRESSED_BYTES) {\n\t\tsettlementError('Settlement report body exceeds limit', 'too_large')\n\t}\n\tconst plain = await maybeGunzipReportBytes(bytes, compressionAlgorithm)\n\tif (plain.byteLength > SETTLEMENT_MAX_DECOMPRESSED_BYTES) {\n\t\tsettlementError('Settlement report body exceeds limit', 'too_large')\n\t}\n\tconst text = new TextDecoder('utf-8', { fatal: false }).decode(plain)\n\treturn parseSettlementV2Tsv(text)\n}\n\n/** ISO createdSince for listReports retention window. */\nexport function settlementCreatedSinceIso(now = new Date(), retentionDays = SETTLEMENT_RETENTION_DAYS): string {\n\tconst ms = retentionDays * 24 * 60 * 60 * 1000\n\treturn new Date(now.getTime() - ms).toISOString()\n}\n","/**\n * Amazon Selling Partner API vendor client.\n * Host: `new AmazonSpApiClient(auth)`. Agent tools: `fromContext(ctx)`.\n *\n * LWA refresh → access token; SP-API calls use AwsService (SigV4 execute-api)\n * plus x-amz-access-token.\n */\n\nimport { ToolError } from '../../core/errors'\nimport { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport { AwsService } from '../../transport/aws-service'\nimport { HttpService } from '../../transport/http-service'\nimport type { HttpServiceOptions } from '../../transport/http-service'\nimport type {\n\tAmazonSpApiAuth,\n\tAmazonSpApiCreateReportInput,\n\tAmazonSpApiCreateReportOutput,\n\tAmazonSpApiGetOrderInput,\n\tAmazonSpApiGetOrderItemsInput,\n\tAmazonSpApiGetOrderItemsOutput,\n\tAmazonSpApiGetOrderOutput,\n\tAmazonSpApiGetReportDocumentInput,\n\tAmazonSpApiGetReportDocumentOutput,\n\tAmazonSpApiGetReportInput,\n\tAmazonSpApiGetReportOutput,\n\tAmazonSpApiGetSettlementSummaryInput,\n\tAmazonSpApiGetSettlementSummaryOutput,\n\tAmazonSpApiListInventorySummariesInput,\n\tAmazonSpApiListInventorySummariesOutput,\n\tAmazonSpApiListOrdersInput,\n\tAmazonSpApiListOrdersOutput,\n\tAmazonSpApiListReportsInput,\n\tAmazonSpApiListReportsOutput,\n\tAmazonSpApiSearchCatalogItemsInput,\n\tAmazonSpApiSearchCatalogItemsOutput,\n\tAmazonSpApiSearchOrdersInput,\n\tAmazonSpApiSearchOrdersOutput\n} from './contracts'\nimport { amazonSpApiAuthSchema } from './contracts'\nimport {\n\tLWA_TOKEN_URL,\n\tlwaTokenBody,\n\tparseCreateReportPayload,\n\tparseGetReportPayload,\n\tparseInventoryPayload,\n\tparseListReportsPayload,\n\tparseLwaAccessToken,\n\tparseOrderItemsPayload,\n\tparseOrderPayload,\n\tparseOrdersPayload,\n\tparseReportDocumentPayload,\n\tparseSearchCatalogItemsPayload,\n\tparseSearchOrdersPayload,\n\trequireMarketplaceIds\n} from './domain'\nimport {\n\tSETTLEMENT_MAX_COMPRESSED_BYTES,\n\tSETTLEMENT_REPORT_TYPE_V2,\n\tsettlementCreatedSinceIso,\n\tsummarizeSettlementDocument\n} from './domain/settlement'\n\nexport type AmazonSpApiClientOptions = Pick<HttpServiceOptions, 'fetch' | 'signal'>\n\nexport class AmazonSpApiClient {\n\treadonly #auth: AmazonSpApiAuth\n\treadonly #lwa: HttpService\n\treadonly #api: AwsService\n\t/** Absolute URL document download (report document URLs). */\n\treadonly #download: HttpService\n\t#accessToken: string | undefined\n\t#accessTokenExpiresAt = 0\n\n\tconstructor(auth: AmazonSpApiAuth, options: AmazonSpApiClientOptions = {}) {\n\t\tconst parsed = amazonSpApiAuthSchema.safeParse(auth)\n\t\tif (!parsed.success) {\n\t\t\tthrow new ToolError('Invalid Amazon SP-API auth credentials', {\n\t\t\t\tcode: 'bad_auth',\n\t\t\t\tdetails: { issues: parsed.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tthis.#auth = parsed.data\n\t\tthis.#lwa = new HttpService({\n\t\t\t...options,\n\t\t\tlabel: 'Amazon LWA'\n\t\t})\n\t\tthis.#api = new AwsService({\n\t\t\t...options,\n\t\t\taccessKeyId: this.#auth.access_key_id,\n\t\t\tsecretAccessKey: this.#auth.secret_access_key,\n\t\t\tregion: this.#auth.region,\n\t\t\tservice: 'execute-api',\n\t\t\tbaseURL: this.#auth.endpoint,\n\t\t\tlabel: 'Amazon SP-API',\n\t\t\t...(this.#auth.session_token && { sessionToken: this.#auth.session_token })\n\t\t})\n\t\tthis.#download = new HttpService({\n\t\t\t...options,\n\t\t\tlabel: 'Amazon SP-API report download'\n\t\t})\n\t}\n\n\tstatic fromContext(ctx: ToolContext): AmazonSpApiClient {\n\t\tconst auth = requireAuth(ctx, amazonSpApiAuthSchema)\n\t\treturn new AmazonSpApiClient(auth, {\n\t\t\t...(ctx.fetch && { fetch: ctx.fetch }),\n\t\t\t...(ctx.signal && { signal: ctx.signal })\n\t\t})\n\t}\n\n\tasync #ensureAccessToken(): Promise<string> {\n\t\tconst now = Date.now()\n\t\tif (this.#accessToken && now < this.#accessTokenExpiresAt - 60_000) {\n\t\t\treturn this.#accessToken\n\t\t}\n\t\tconst { data } = await this.#lwa.post(LWA_TOKEN_URL, lwaTokenBody(this.#auth), {\n\t\t\tlabel: 'Amazon LWA token',\n\t\t\theaders: { 'Content-Type': 'application/x-www-form-urlencoded' }\n\t\t})\n\t\tconst token = parseLwaAccessToken(data)\n\t\tthis.#accessToken = token\n\t\t// LWA tokens last ~1h; refresh early without relying on expires_in type noise\n\t\tthis.#accessTokenExpiresAt = now + 3_000_000\n\t\treturn token\n\t}\n\n\tasync #spGet(path: string, label: string, query?: Record<string, string | number | boolean | undefined>) {\n\t\tconst token = await this.#ensureAccessToken()\n\t\treturn this.#api.get(path, {\n\t\t\tlabel,\n\t\t\theaders: { 'x-amz-access-token': token },\n\t\t\t...(query && { query })\n\t\t})\n\t}\n\n\tasync #spPost(path: string, label: string, body: Record<string, unknown>) {\n\t\tconst token = await this.#ensureAccessToken()\n\t\treturn this.#api.post(path, body, {\n\t\t\tlabel,\n\t\t\theaders: {\n\t\t\t\t'x-amz-access-token': token,\n\t\t\t\t'Content-Type': 'application/json'\n\t\t\t}\n\t\t})\n\t}\n\n\t/** GET /orders/v0/orders */\n\tasync listOrders(input: AmazonSpApiListOrdersInput = {}): Promise<AmazonSpApiListOrdersOutput> {\n\t\tconst marketplaceIds = requireMarketplaceIds(\n\t\t\tinput.marketplace_ids,\n\t\t\tthis.#auth.marketplace_ids,\n\t\t\t'Amazon SP-API listOrders'\n\t\t)\n\t\tconst { data } = await this.#spGet('/orders/v0/orders', 'Amazon SP-API listOrders', {\n\t\t\tMarketplaceIds: marketplaceIds.join(','),\n\t\t\t...(input.created_after && { CreatedAfter: input.created_after }),\n\t\t\t...(input.created_before && { CreatedBefore: input.created_before }),\n\t\t\t...(input.last_updated_after && { LastUpdatedAfter: input.last_updated_after }),\n\t\t\t...(input.order_statuses &&\n\t\t\t\tinput.order_statuses.length > 0 && {\n\t\t\t\t\tOrderStatuses: input.order_statuses.join(',')\n\t\t\t\t}),\n\t\t\t...(input.cursor && { NextToken: input.cursor }),\n\t\t\t...(input.max_results !== undefined && { MaxResultsPerPage: input.max_results })\n\t\t})\n\t\tconst parsed = parseOrdersPayload(data)\n\t\treturn {\n\t\t\titems: parsed.items,\n\t\t\ttruncated: Boolean(parsed.nextToken),\n\t\t\t...(parsed.nextToken && { next_cursor: parsed.nextToken })\n\t\t}\n\t}\n\n\t/** GET /orders/v0/orders/{orderId} */\n\tasync getOrder(input: AmazonSpApiGetOrderInput): Promise<AmazonSpApiGetOrderOutput> {\n\t\tconst { data } = await this.#spGet(\n\t\t\t`/orders/v0/orders/${encodeURIComponent(input.amazon_order_id)}`,\n\t\t\t'Amazon SP-API getOrder'\n\t\t)\n\t\treturn { order: parseOrderPayload(data) }\n\t}\n\n\t/** GET /orders/v0/orders/{orderId}/orderItems */\n\tasync getOrderItems(input: AmazonSpApiGetOrderItemsInput): Promise<AmazonSpApiGetOrderItemsOutput> {\n\t\tconst query = input.cursor ? { NextToken: input.cursor } : undefined\n\t\tconst { data } = await this.#spGet(\n\t\t\t`/orders/v0/orders/${encodeURIComponent(input.amazon_order_id)}/orderItems`,\n\t\t\t'Amazon SP-API getOrderItems',\n\t\t\tquery\n\t\t)\n\t\tconst parsed = parseOrderItemsPayload(data)\n\t\treturn {\n\t\t\tamazon_order_id: parsed.amazon_order_id,\n\t\t\titems: parsed.items,\n\t\t\ttruncated: Boolean(parsed.nextToken),\n\t\t\t...(parsed.nextToken && { next_cursor: parsed.nextToken })\n\t\t}\n\t}\n\n\t/**\n\t * GET /orders/2026-01-01/orders (searchOrders).\n\t * Always requests includedData=FULFILLMENT for fulfillmentStatus.\n\t * Optional max_pages drains pages sequentially (bounded).\n\t */\n\tasync searchOrders(input: AmazonSpApiSearchOrdersInput): Promise<AmazonSpApiSearchOrdersOutput> {\n\t\tconst marketplaceIds = requireMarketplaceIds(\n\t\t\tinput.marketplace_ids,\n\t\t\tthis.#auth.marketplace_ids,\n\t\t\t'Amazon SP-API searchOrders'\n\t\t)\n\t\tconst maxPages = input.max_pages ?? 1\n\t\tconst pageSize = input.max_results ?? 100\n\t\tconst items: AmazonSpApiSearchOrdersOutput['items'] = []\n\t\tlet cursor: string | undefined = input.cursor\n\t\tlet pages = 0\n\t\tlet nextToken: string | undefined\n\n\t\twhile (pages < maxPages) {\n\t\t\tpages += 1\n\t\t\tconst { data } = await this.#spGet('/orders/2026-01-01/orders', 'Amazon SP-API searchOrders', {\n\t\t\t\tcreatedAfter: input.created_after,\n\t\t\t\t...(input.created_before && { createdBefore: input.created_before }),\n\t\t\t\tmarketplaceIds: marketplaceIds.join(','),\n\t\t\t\tincludedData: 'FULFILLMENT',\n\t\t\t\tmaxResultsPerPage: pageSize,\n\t\t\t\t...(cursor && { paginationToken: cursor })\n\t\t\t})\n\t\t\tconst parsed = parseSearchOrdersPayload(data)\n\t\t\titems.push(...parsed.items)\n\t\t\tnextToken = parsed.nextToken\n\t\t\tif (!nextToken) break\n\t\t\tcursor = nextToken\n\t\t}\n\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: Boolean(nextToken),\n\t\t\t...(nextToken && { next_cursor: nextToken })\n\t\t}\n\t}\n\n\t/** GET /fba/inventory/v1/summaries */\n\tasync listInventorySummaries(\n\t\tinput: AmazonSpApiListInventorySummariesInput = {}\n\t): Promise<AmazonSpApiListInventorySummariesOutput> {\n\t\tconst marketplaceIds = requireMarketplaceIds(\n\t\t\tinput.marketplace_id ? [input.marketplace_id] : undefined,\n\t\t\tthis.#auth.marketplace_ids,\n\t\t\t'Amazon SP-API listInventorySummaries'\n\t\t)\n\t\tconst marketplaceId = marketplaceIds[0]\n\t\tif (!marketplaceId) {\n\t\t\tthrow new ToolError('Amazon SP-API listInventorySummaries requires a marketplace_id', {\n\t\t\t\tcode: 'bad_input'\n\t\t\t})\n\t\t}\n\t\tconst { data } = await this.#spGet('/fba/inventory/v1/summaries', 'Amazon SP-API listInventorySummaries', {\n\t\t\tdetails: true,\n\t\t\tgranularityType: 'Marketplace',\n\t\t\tgranularityId: marketplaceId,\n\t\t\tmarketplaceIds: marketplaceId,\n\t\t\t...(input.seller_skus && input.seller_skus.length > 0 && { sellerSkus: input.seller_skus.join(',') }),\n\t\t\t...(input.start_date_time && { startDateTime: input.start_date_time }),\n\t\t\t...(input.cursor && { nextToken: input.cursor })\n\t\t})\n\t\tconst parsed = parseInventoryPayload(data)\n\t\treturn {\n\t\t\titems: parsed.items,\n\t\t\ttruncated: Boolean(parsed.nextToken),\n\t\t\t...(parsed.nextToken && { next_cursor: parsed.nextToken })\n\t\t}\n\t}\n\n\t/** POST /reports/2021-06-30/reports */\n\tasync createReport(input: AmazonSpApiCreateReportInput): Promise<AmazonSpApiCreateReportOutput> {\n\t\tconst marketplaceIds = requireMarketplaceIds(\n\t\t\tinput.marketplace_ids,\n\t\t\tthis.#auth.marketplace_ids,\n\t\t\t'Amazon SP-API createReport'\n\t\t)\n\t\tconst body: Record<string, unknown> = {\n\t\t\treportType: input.report_type,\n\t\t\tmarketplaceIds,\n\t\t\t...(input.data_start_time && { dataStartTime: input.data_start_time }),\n\t\t\t...(input.data_end_time && { dataEndTime: input.data_end_time }),\n\t\t\t...(input.report_options && { reportOptions: input.report_options })\n\t\t}\n\t\tconst { data } = await this.#spPost('/reports/2021-06-30/reports', 'Amazon SP-API createReport', body)\n\t\treturn parseCreateReportPayload(data)\n\t}\n\n\t/** GET /reports/2021-06-30/reports/{reportId} */\n\tasync getReport(input: AmazonSpApiGetReportInput): Promise<AmazonSpApiGetReportOutput> {\n\t\tconst { data } = await this.#spGet(\n\t\t\t`/reports/2021-06-30/reports/${encodeURIComponent(input.report_id)}`,\n\t\t\t'Amazon SP-API getReport'\n\t\t)\n\t\treturn { report: parseGetReportPayload(data) }\n\t}\n\n\t/** GET /reports/2021-06-30/reports */\n\tasync listReports(input: AmazonSpApiListReportsInput = {}): Promise<AmazonSpApiListReportsOutput> {\n\t\tconst marketplaceIds = input.marketplace_ids ?? this.#auth.marketplace_ids\n\t\tconst { data } = await this.#spGet('/reports/2021-06-30/reports', 'Amazon SP-API listReports', {\n\t\t\t...(input.report_types &&\n\t\t\t\tinput.report_types.length > 0 && {\n\t\t\t\t\treportTypes: input.report_types.join(',')\n\t\t\t\t}),\n\t\t\t...(input.processing_statuses &&\n\t\t\t\tinput.processing_statuses.length > 0 && {\n\t\t\t\t\tprocessingStatuses: input.processing_statuses.join(',')\n\t\t\t\t}),\n\t\t\t...(marketplaceIds && marketplaceIds.length > 0 && { marketplaceIds: marketplaceIds.join(',') }),\n\t\t\t...(input.page_size !== undefined && { pageSize: input.page_size }),\n\t\t\t...(input.created_since && { createdSince: input.created_since }),\n\t\t\t...(input.created_until && { createdUntil: input.created_until }),\n\t\t\t...(input.cursor && { nextToken: input.cursor })\n\t\t})\n\t\tconst parsed = parseListReportsPayload(data)\n\t\treturn {\n\t\t\titems: parsed.items,\n\t\t\ttruncated: Boolean(parsed.nextToken),\n\t\t\t...(parsed.nextToken && { next_cursor: parsed.nextToken })\n\t\t}\n\t}\n\n\t/** GET /reports/2021-06-30/documents/{reportDocumentId} */\n\tasync getReportDocument(input: AmazonSpApiGetReportDocumentInput): Promise<AmazonSpApiGetReportDocumentOutput> {\n\t\tconst { data } = await this.#spGet(\n\t\t\t`/reports/2021-06-30/documents/${encodeURIComponent(input.report_document_id)}`,\n\t\t\t'Amazon SP-API getReportDocument'\n\t\t)\n\t\treturn parseReportDocumentPayload(data)\n\t}\n\n\t/**\n\t * Composite: newest DONE Flat File V2 settlement report (or `report_id`) →\n\t * one document download → eight summary fields in safe integer cents.\n\t * Never returns raw TSV rows, order ids, skus, or document URLs.\n\t */\n\tasync getSettlementSummary(\n\t\tinput: AmazonSpApiGetSettlementSummaryInput = {}\n\t): Promise<AmazonSpApiGetSettlementSummaryOutput> {\n\t\tconst reportDocumentId = await this.#resolveSettlementReportDocumentId(input)\n\t\tconst doc = await this.getReportDocument({ report_document_id: reportDocumentId })\n\t\t// Download uses absolute URL from Amazon; do not put URL in errors downstream.\n\t\tconst { bytes } = await this.#download.bytes('GET', doc.url, {\n\t\t\tlabel: 'Amazon SP-API settlement document',\n\t\t\tmaxBytes: SETTLEMENT_MAX_COMPRESSED_BYTES\n\t\t})\n\t\treturn await summarizeSettlementDocument(bytes, doc.compression_algorithm)\n\t}\n\n\tasync #resolveSettlementReportDocumentId(input: AmazonSpApiGetSettlementSummaryInput): Promise<string> {\n\t\tif (input.report_id) {\n\t\t\tconst { report } = await this.getReport({ report_id: input.report_id })\n\t\t\tif (report.processing_status && report.processing_status !== 'DONE') {\n\t\t\t\tthrow new ToolError('Settlement report is not DONE', {\n\t\t\t\t\tcode: 'bad_input',\n\t\t\t\t\tdetails: { processing_status: report.processing_status }\n\t\t\t\t})\n\t\t\t}\n\t\t\tif (!report.report_document_id) {\n\t\t\t\tthrow new ToolError('Settlement report has no document id', { code: 'upstream' })\n\t\t\t}\n\t\t\treturn report.report_document_id\n\t\t}\n\n\t\tconst createdSince = input.created_since ?? settlementCreatedSinceIso()\n\t\t// Drain a few list pages; Amazon returns newest first for this endpoint.\n\t\tlet cursor: string | undefined\n\t\tfor (let page = 0; page < 5; page += 1) {\n\t\t\tconst listed = await this.listReports({\n\t\t\t\treport_types: [SETTLEMENT_REPORT_TYPE_V2],\n\t\t\t\tprocessing_statuses: ['DONE'],\n\t\t\t\tcreated_since: createdSince,\n\t\t\t\tpage_size: 100,\n\t\t\t\t...(cursor && { cursor })\n\t\t\t})\n\t\t\tfor (const report of listed.items) {\n\t\t\t\tif (report.report_document_id) {\n\t\t\t\t\treturn report.report_document_id\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!listed.next_cursor) break\n\t\t\tcursor = listed.next_cursor\n\t\t}\n\n\t\tthrow new ToolError('No completed settlement report found in the retention window', {\n\t\t\tcode: 'not_found'\n\t\t})\n\t}\n\n\t/** GET /catalog/2022-04-01/items */\n\tasync searchCatalogItems(input: AmazonSpApiSearchCatalogItemsInput): Promise<AmazonSpApiSearchCatalogItemsOutput> {\n\t\tconst marketplaceIds = requireMarketplaceIds(\n\t\t\tinput.marketplace_ids,\n\t\t\tthis.#auth.marketplace_ids,\n\t\t\t'Amazon SP-API searchCatalogItems'\n\t\t)\n\t\tconst { data } = await this.#spGet('/catalog/2022-04-01/items', 'Amazon SP-API searchCatalogItems', {\n\t\t\tkeywords: input.keywords.join(','),\n\t\t\tmarketplaceIds: marketplaceIds.join(','),\n\t\t\t...(input.included_data &&\n\t\t\t\tinput.included_data.length > 0 && {\n\t\t\t\t\tincludedData: input.included_data.join(',')\n\t\t\t\t}),\n\t\t\t...(input.page_size !== undefined && { pageSize: input.page_size }),\n\t\t\t...(input.cursor && { pageToken: input.cursor })\n\t\t})\n\t\tconst parsed = parseSearchCatalogItemsPayload(data)\n\t\treturn {\n\t\t\titems: parsed.items,\n\t\t\ttruncated: Boolean(parsed.nextToken),\n\t\t\t...(parsed.numberOfResults !== undefined && { number_of_results: parsed.numberOfResults }),\n\t\t\t...(parsed.nextToken && { next_cursor: parsed.nextToken })\n\t\t}\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { AmazonSpApiClient } from './client'\nimport {\n\tamazonSpApiAuthSchema,\n\tamazonSpApiCreateReportInputSchema,\n\tamazonSpApiCreateReportOutputSchema,\n\tamazonSpApiGetOrderInputSchema,\n\tamazonSpApiGetOrderItemsInputSchema,\n\tamazonSpApiGetOrderItemsOutputSchema,\n\tamazonSpApiGetOrderOutputSchema,\n\tamazonSpApiGetReportDocumentInputSchema,\n\tamazonSpApiGetReportDocumentOutputSchema,\n\tamazonSpApiGetReportInputSchema,\n\tamazonSpApiGetReportOutputSchema,\n\tamazonSpApiListInventorySummariesInputSchema,\n\tamazonSpApiListInventorySummariesOutputSchema,\n\tamazonSpApiListOrdersInputSchema,\n\tamazonSpApiListOrdersOutputSchema,\n\tamazonSpApiListReportsInputSchema,\n\tamazonSpApiListReportsOutputSchema,\n\tamazonSpApiSearchCatalogItemsInputSchema,\n\tamazonSpApiSearchCatalogItemsOutputSchema,\n\tamazonSpApiSearchOrdersInputSchema,\n\tamazonSpApiSearchOrdersOutputSchema,\n\tamazonSpApiGetSettlementSummaryInputSchema,\n\tamazonSpApiGetSettlementSummaryOutputSchema\n} from './contracts'\n\nexport const amazonSpApiListOrdersTool = defineTool({\n\tid: 'amazon-sp-api-list-orders',\n\tname: 'amazonSpApiListOrders',\n\tdescription:\n\t\t'List Amazon SP-API orders for one or more marketplaces. Optional date and status filters. Paginate with next_cursor (NextToken).',\n\tinputSchema: amazonSpApiListOrdersInputSchema,\n\toutputSchema: amazonSpApiListOrdersOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).listOrders(input)\n})\n\nexport const amazonSpApiGetOrderTool = defineTool({\n\tid: 'amazon-sp-api-get-order',\n\tname: 'amazonSpApiGetOrder',\n\tdescription: 'Get one Amazon SP-API order by AmazonOrderId.',\n\tinputSchema: amazonSpApiGetOrderInputSchema,\n\toutputSchema: amazonSpApiGetOrderOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).getOrder(input)\n})\n\nexport const amazonSpApiGetOrderItemsTool = defineTool({\n\tid: 'amazon-sp-api-get-order-items',\n\tname: 'amazonSpApiGetOrderItems',\n\tdescription: 'List line items for one Amazon SP-API order. Paginate with next_cursor (NextToken).',\n\tinputSchema: amazonSpApiGetOrderItemsInputSchema,\n\toutputSchema: amazonSpApiGetOrderItemsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).getOrderItems(input)\n})\n\nexport const amazonSpApiSearchOrdersTool = defineTool({\n\tid: 'amazon-sp-api-search-orders',\n\tname: 'amazonSpApiSearchOrders',\n\tdescription:\n\t\t'Search Amazon orders via Orders API v2026-01-01 (searchOrders). Filter by created_after (required) and optional created_before. Always includes FULFILLMENT data for fulfillment_status. Optional max_pages drains pages sequentially (max 50). Paginate with next_cursor when truncated.',\n\tinputSchema: amazonSpApiSearchOrdersInputSchema,\n\toutputSchema: amazonSpApiSearchOrdersOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).searchOrders(input)\n})\n\nexport const amazonSpApiListInventorySummariesTool = defineTool({\n\tid: 'amazon-sp-api-list-inventory-summaries',\n\tname: 'amazonSpApiListInventorySummaries',\n\tdescription:\n\t\t'List FBA inventory summaries for a marketplace. Optional seller SKUs and start_date_time. Paginate with next_cursor.',\n\tinputSchema: amazonSpApiListInventorySummariesInputSchema,\n\toutputSchema: amazonSpApiListInventorySummariesOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).listInventorySummaries(input)\n})\n\nexport const amazonSpApiCreateReportTool = defineTool({\n\tid: 'amazon-sp-api-create-report',\n\tname: 'amazonSpApiCreateReport',\n\tdescription:\n\t\t'Request an Amazon SP-API report for given marketplace(s) and optional date range. Returns report_id for later getReport polling.',\n\tinputSchema: amazonSpApiCreateReportInputSchema,\n\toutputSchema: amazonSpApiCreateReportOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).createReport(input)\n})\n\nexport const amazonSpApiGetReportTool = defineTool({\n\tid: 'amazon-sp-api-get-report',\n\tname: 'amazonSpApiGetReport',\n\tdescription:\n\t\t'Get one Amazon SP-API report by report_id, including processing_status and report_document_id when DONE.',\n\tinputSchema: amazonSpApiGetReportInputSchema,\n\toutputSchema: amazonSpApiGetReportOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).getReport(input)\n})\n\nexport const amazonSpApiListReportsTool = defineTool({\n\tid: 'amazon-sp-api-list-reports',\n\tname: 'amazonSpApiListReports',\n\tdescription:\n\t\t'List Amazon SP-API reports with optional type, status, marketplace, and created-time filters. Paginate with next_cursor.',\n\tinputSchema: amazonSpApiListReportsInputSchema,\n\toutputSchema: amazonSpApiListReportsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).listReports(input)\n})\n\nexport const amazonSpApiGetReportDocumentTool = defineTool({\n\tid: 'amazon-sp-api-get-report-document',\n\tname: 'amazonSpApiGetReportDocument',\n\tdescription:\n\t\t'Get a downloadable Amazon SP-API report document (document_id, url, optional compression_algorithm). Does not download the file body.',\n\tinputSchema: amazonSpApiGetReportDocumentInputSchema,\n\toutputSchema: amazonSpApiGetReportDocumentOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).getReportDocument(input)\n})\n\nexport const amazonSpApiSearchCatalogItemsTool = defineTool({\n\tid: 'amazon-sp-api-search-catalog-items',\n\tname: 'amazonSpApiSearchCatalogItems',\n\tdescription:\n\t\t'Search Amazon catalog items by keywords for marketplace(s). Optional included_data and page_size. Paginate with next_cursor (pageToken).',\n\tinputSchema: amazonSpApiSearchCatalogItemsInputSchema,\n\toutputSchema: amazonSpApiSearchCatalogItemsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).searchCatalogItems(input)\n})\n\nexport const amazonSpApiGetSettlementSummaryTool = defineTool({\n\tid: 'amazon-sp-api-get-settlement-summary',\n\tname: 'amazonSpApiGetSettlementSummary',\n\tdescription:\n\t\t'Summarize the newest completed Amazon Flat File V2 settlement report (or a specific report_id): downloads one document, validates the TSV, and returns eight summary fields in integer cents (settlement id, period, deposit date, currency, total and amount sum, row count). Does not return line-level order or SKU data. Optional created_since (default last 90 days when listing).',\n\tinputSchema: amazonSpApiGetSettlementSummaryInputSchema,\n\toutputSchema: amazonSpApiGetSettlementSummaryOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => AmazonSpApiClient.fromContext(ctx).getSettlementSummary(input)\n})\n\nexport const amazonSpApiModule = defineModule({\n\tid: 'amazon-sp-api',\n\ttitle: 'Amazon SP-API',\n\tdescription:\n\t\t'Amazon Selling Partner API vendor pack: orders v0 and SearchOrders v2026, order items, FBA inventory summaries, reports (create/get/list/document), settlement V2 summary, and catalog item search.',\n\truntime: 'both',\n\tauth: { type: 'custom', schema: amazonSpApiAuthSchema },\n\tcategories: ['commerce', 'amazon'],\n\tclassification: 'pii',\n\ttags: ['orders', 'fba', 'reports'],\n\ttools: [\n\t\tamazonSpApiListOrdersTool,\n\t\tamazonSpApiGetOrderTool,\n\t\tamazonSpApiGetOrderItemsTool,\n\t\tamazonSpApiSearchOrdersTool,\n\t\tamazonSpApiListInventorySummariesTool,\n\t\tamazonSpApiCreateReportTool,\n\t\tamazonSpApiGetReportTool,\n\t\tamazonSpApiListReportsTool,\n\t\tamazonSpApiGetReportDocumentTool,\n\t\tamazonSpApiGetSettlementSummaryTool,\n\t\tamazonSpApiSearchCatalogItemsTool\n\t]\n})\n"],"mappings":";;;;;;;;;;;AAGA,MAAa,4BAA4B,EAAE,KAAK;CAC/C;CACA;CACA;AACD,CAAC;AAED,MAAa,wBAAwB,EAAE,OAAO;CAC7C,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,eAAe;CACrD,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,mBAAmB;CAC7D,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,2CAA2C;CACrF,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,oCAAoC;CAC9E,mBAAmB,EAAE,OAAO,CAAC,CA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tD,YAAY,CAAC,YAAY,QAAQ;CACjC,gBAAgB;CAChB,MAAM;EAAC;EAAU;EAAO;CAAS;CACjC,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as BedrockAgentCoreBrowserClient, c as BrowserSessionIdInput, d as DEFAULT_BROWSER_ID, f as bedrockAgentCoreBrowserAuthSchema, g as browserStreamSchema, h as browserStartSessionInputSchema, i as bedrockAgentCoreBrowserStopSessionTool, l as BrowserSessionOutput, m as browserSessionOutputSchema, n as bedrockAgentCoreBrowserModule, o as BedrockAgentCoreBrowserClientOptions, p as browserSessionIdInputSchema, r as bedrockAgentCoreBrowserStartSessionTool, s as BedrockAgentCoreBrowserAuth, t as bedrockAgentCoreBrowserGetSessionTool, u as BrowserStartSessionInput } from "../../index-DuOGj7vc.js";
|
|
2
|
+
export { type BedrockAgentCoreBrowserAuth, BedrockAgentCoreBrowserClient, type BedrockAgentCoreBrowserClientOptions, type BrowserSessionIdInput, type BrowserSessionOutput, type BrowserStartSessionInput, DEFAULT_BROWSER_ID, bedrockAgentCoreBrowserAuthSchema, bedrockAgentCoreBrowserGetSessionTool, bedrockAgentCoreBrowserModule, bedrockAgentCoreBrowserStartSessionTool, bedrockAgentCoreBrowserStopSessionTool, browserSessionIdInputSchema, browserSessionOutputSchema, browserStartSessionInputSchema, browserStreamSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as BedrockAgentCoreBrowserClient, c as browserSessionIdInputSchema, d as browserStreamSchema, i as bedrockAgentCoreBrowserStopSessionTool, l as browserSessionOutputSchema, n as bedrockAgentCoreBrowserModule, o as DEFAULT_BROWSER_ID, r as bedrockAgentCoreBrowserStartSessionTool, s as bedrockAgentCoreBrowserAuthSchema, t as bedrockAgentCoreBrowserGetSessionTool, u as browserStartSessionInputSchema } from "../../bedrock-agentcore-browser-a_qOs-NR.js";
|
|
2
|
+
export { BedrockAgentCoreBrowserClient, DEFAULT_BROWSER_ID, bedrockAgentCoreBrowserAuthSchema, bedrockAgentCoreBrowserGetSessionTool, bedrockAgentCoreBrowserModule, bedrockAgentCoreBrowserStartSessionTool, bedrockAgentCoreBrowserStopSessionTool, browserSessionIdInputSchema, browserSessionOutputSchema, browserStartSessionInputSchema, browserStreamSchema };
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { a as ModuleDefinition, o as ToolContext, s as ToolDefinition } from "../../types-Ccb0DXY9.js";
|
|
2
|
+
import "../../index-CZX5OeOF.js";
|
|
3
|
+
import { s as HttpServiceOptions } from "../../http-service-T7E5UjP8.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/vendors/bedrock-agentcore-code-interpreter/contracts.d.ts
|
|
6
|
+
declare const DEFAULT_CODE_INTERPRETER_ID = "aws.codeinterpreter.v1";
|
|
7
|
+
declare const MAX_CODE_CHARS = 200000;
|
|
8
|
+
declare const MAX_COMMAND_CHARS = 20000;
|
|
9
|
+
declare const MAX_FILE_PATHS = 50;
|
|
10
|
+
declare const MAX_WRITE_FILES = 20;
|
|
11
|
+
declare const MAX_FILE_TEXT = 500000;
|
|
12
|
+
declare const bedrockAgentCoreCodeInterpreterAuthSchema: z.ZodObject<{
|
|
13
|
+
access_key_id: z.ZodString;
|
|
14
|
+
secret_access_key: z.ZodString;
|
|
15
|
+
region: z.ZodString;
|
|
16
|
+
session_token: z.ZodOptional<z.ZodString>;
|
|
17
|
+
code_interpreter_id: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
type BedrockAgentCoreCodeInterpreterAuth = z.infer<typeof bedrockAgentCoreCodeInterpreterAuthSchema>;
|
|
20
|
+
declare const startSessionInputSchema: z.ZodObject<{
|
|
21
|
+
name: z.ZodOptional<z.ZodString>;
|
|
22
|
+
session_timeout_seconds: z.ZodOptional<z.ZodInt>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
declare const sessionIdInputSchema: z.ZodObject<{
|
|
25
|
+
session_id: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
declare const sessionOutputSchema: z.ZodObject<{
|
|
28
|
+
session_id: z.ZodString;
|
|
29
|
+
code_interpreter_id: z.ZodOptional<z.ZodString>;
|
|
30
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
31
|
+
status: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
declare const executeCodeInputSchema: z.ZodObject<{
|
|
34
|
+
session_id: z.ZodString;
|
|
35
|
+
code: z.ZodString;
|
|
36
|
+
language: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
declare const executeCommandInputSchema: z.ZodObject<{
|
|
39
|
+
session_id: z.ZodString;
|
|
40
|
+
command: z.ZodString;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
declare const startCommandInputSchema: z.ZodObject<{
|
|
43
|
+
session_id: z.ZodString;
|
|
44
|
+
command: z.ZodString;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
declare const taskIdInputSchema: z.ZodObject<{
|
|
47
|
+
session_id: z.ZodString;
|
|
48
|
+
task_id: z.ZodString;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
declare const listFilesInputSchema: z.ZodObject<{
|
|
51
|
+
session_id: z.ZodString;
|
|
52
|
+
directory_path: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
declare const readFilesInputSchema: z.ZodObject<{
|
|
55
|
+
session_id: z.ZodString;
|
|
56
|
+
paths: z.ZodArray<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
declare const writeFilesInputSchema: z.ZodObject<{
|
|
59
|
+
session_id: z.ZodString;
|
|
60
|
+
files: z.ZodArray<z.ZodObject<{
|
|
61
|
+
path: z.ZodString;
|
|
62
|
+
text: z.ZodString;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
declare const removeFilesInputSchema: z.ZodObject<{
|
|
66
|
+
session_id: z.ZodString;
|
|
67
|
+
paths: z.ZodArray<z.ZodString>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
declare const invokeResultSchema: z.ZodObject<{
|
|
70
|
+
session_id: z.ZodString;
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
73
|
+
raw: z.ZodOptional<z.ZodUnknown>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
type StartSessionInput = z.infer<typeof startSessionInputSchema>;
|
|
76
|
+
type SessionIdInput = z.infer<typeof sessionIdInputSchema>;
|
|
77
|
+
type SessionOutput = z.infer<typeof sessionOutputSchema>;
|
|
78
|
+
type ExecuteCodeInput = z.infer<typeof executeCodeInputSchema>;
|
|
79
|
+
type ExecuteCommandInput = z.infer<typeof executeCommandInputSchema>;
|
|
80
|
+
type StartCommandInput = z.infer<typeof startCommandInputSchema>;
|
|
81
|
+
type TaskIdInput = z.infer<typeof taskIdInputSchema>;
|
|
82
|
+
type ListFilesInput = z.infer<typeof listFilesInputSchema>;
|
|
83
|
+
type ReadFilesInput = z.infer<typeof readFilesInputSchema>;
|
|
84
|
+
type WriteFilesInput = z.infer<typeof writeFilesInputSchema>;
|
|
85
|
+
type RemoveFilesInput = z.infer<typeof removeFilesInputSchema>;
|
|
86
|
+
type InvokeResult = z.infer<typeof invokeResultSchema>;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/vendors/bedrock-agentcore-code-interpreter/client.d.ts
|
|
89
|
+
type BedrockAgentCoreCodeInterpreterClientOptions = Pick<HttpServiceOptions, 'fetch' | 'signal'>;
|
|
90
|
+
declare class BedrockAgentCoreCodeInterpreterClient {
|
|
91
|
+
#private;
|
|
92
|
+
constructor(auth: BedrockAgentCoreCodeInterpreterAuth, options?: BedrockAgentCoreCodeInterpreterClientOptions);
|
|
93
|
+
static fromContext(ctx: ToolContext): BedrockAgentCoreCodeInterpreterClient;
|
|
94
|
+
startSession(input?: StartSessionInput): Promise<SessionOutput>;
|
|
95
|
+
stopSession(input: SessionIdInput): Promise<SessionOutput>;
|
|
96
|
+
getSession(input: SessionIdInput): Promise<SessionOutput>;
|
|
97
|
+
executeCode(input: ExecuteCodeInput): Promise<InvokeResult>;
|
|
98
|
+
executeCommand(input: ExecuteCommandInput): Promise<InvokeResult>;
|
|
99
|
+
startCommand(input: StartCommandInput): Promise<InvokeResult>;
|
|
100
|
+
getTask(input: TaskIdInput): Promise<InvokeResult>;
|
|
101
|
+
stopTask(input: TaskIdInput): Promise<InvokeResult>;
|
|
102
|
+
listFiles(input: ListFilesInput): Promise<InvokeResult>;
|
|
103
|
+
readFiles(input: ReadFilesInput): Promise<InvokeResult>;
|
|
104
|
+
writeFiles(input: WriteFilesInput): Promise<InvokeResult>;
|
|
105
|
+
removeFiles(input: RemoveFilesInput): Promise<InvokeResult>;
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/vendors/bedrock-agentcore-code-interpreter/module.d.ts
|
|
109
|
+
declare const bedrockAgentCoreCodeInterpreterStartSessionTool: ToolDefinition<{
|
|
110
|
+
name?: string | undefined;
|
|
111
|
+
session_timeout_seconds?: number | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
session_id: string;
|
|
114
|
+
code_interpreter_id?: string | undefined;
|
|
115
|
+
created_at?: string | undefined;
|
|
116
|
+
status?: string | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
declare const bedrockAgentCoreCodeInterpreterStopSessionTool: ToolDefinition<{
|
|
119
|
+
session_id: string;
|
|
120
|
+
}, {
|
|
121
|
+
session_id: string;
|
|
122
|
+
code_interpreter_id?: string | undefined;
|
|
123
|
+
created_at?: string | undefined;
|
|
124
|
+
status?: string | undefined;
|
|
125
|
+
}>;
|
|
126
|
+
declare const bedrockAgentCoreCodeInterpreterGetSessionTool: ToolDefinition<{
|
|
127
|
+
session_id: string;
|
|
128
|
+
}, {
|
|
129
|
+
session_id: string;
|
|
130
|
+
code_interpreter_id?: string | undefined;
|
|
131
|
+
created_at?: string | undefined;
|
|
132
|
+
status?: string | undefined;
|
|
133
|
+
}>;
|
|
134
|
+
declare const bedrockAgentCoreCodeInterpreterExecuteCodeTool: ToolDefinition<{
|
|
135
|
+
session_id: string;
|
|
136
|
+
code: string;
|
|
137
|
+
language?: string | undefined;
|
|
138
|
+
}, {
|
|
139
|
+
session_id: string;
|
|
140
|
+
name: string;
|
|
141
|
+
result?: unknown;
|
|
142
|
+
raw?: unknown;
|
|
143
|
+
}>;
|
|
144
|
+
declare const bedrockAgentCoreCodeInterpreterExecuteCommandTool: ToolDefinition<{
|
|
145
|
+
session_id: string;
|
|
146
|
+
command: string;
|
|
147
|
+
}, {
|
|
148
|
+
session_id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
result?: unknown;
|
|
151
|
+
raw?: unknown;
|
|
152
|
+
}>;
|
|
153
|
+
declare const bedrockAgentCoreCodeInterpreterStartCommandTool: ToolDefinition<{
|
|
154
|
+
session_id: string;
|
|
155
|
+
command: string;
|
|
156
|
+
}, {
|
|
157
|
+
session_id: string;
|
|
158
|
+
name: string;
|
|
159
|
+
result?: unknown;
|
|
160
|
+
raw?: unknown;
|
|
161
|
+
}>;
|
|
162
|
+
declare const bedrockAgentCoreCodeInterpreterGetTaskTool: ToolDefinition<{
|
|
163
|
+
session_id: string;
|
|
164
|
+
task_id: string;
|
|
165
|
+
}, {
|
|
166
|
+
session_id: string;
|
|
167
|
+
name: string;
|
|
168
|
+
result?: unknown;
|
|
169
|
+
raw?: unknown;
|
|
170
|
+
}>;
|
|
171
|
+
declare const bedrockAgentCoreCodeInterpreterStopTaskTool: ToolDefinition<{
|
|
172
|
+
session_id: string;
|
|
173
|
+
task_id: string;
|
|
174
|
+
}, {
|
|
175
|
+
session_id: string;
|
|
176
|
+
name: string;
|
|
177
|
+
result?: unknown;
|
|
178
|
+
raw?: unknown;
|
|
179
|
+
}>;
|
|
180
|
+
declare const bedrockAgentCoreCodeInterpreterListFilesTool: ToolDefinition<{
|
|
181
|
+
session_id: string;
|
|
182
|
+
directory_path?: string | undefined;
|
|
183
|
+
}, {
|
|
184
|
+
session_id: string;
|
|
185
|
+
name: string;
|
|
186
|
+
result?: unknown;
|
|
187
|
+
raw?: unknown;
|
|
188
|
+
}>;
|
|
189
|
+
declare const bedrockAgentCoreCodeInterpreterReadFilesTool: ToolDefinition<{
|
|
190
|
+
session_id: string;
|
|
191
|
+
paths: string[];
|
|
192
|
+
}, {
|
|
193
|
+
session_id: string;
|
|
194
|
+
name: string;
|
|
195
|
+
result?: unknown;
|
|
196
|
+
raw?: unknown;
|
|
197
|
+
}>;
|
|
198
|
+
declare const bedrockAgentCoreCodeInterpreterWriteFilesTool: ToolDefinition<{
|
|
199
|
+
session_id: string;
|
|
200
|
+
files: {
|
|
201
|
+
path: string;
|
|
202
|
+
text: string;
|
|
203
|
+
}[];
|
|
204
|
+
}, {
|
|
205
|
+
session_id: string;
|
|
206
|
+
name: string;
|
|
207
|
+
result?: unknown;
|
|
208
|
+
raw?: unknown;
|
|
209
|
+
}>;
|
|
210
|
+
declare const bedrockAgentCoreCodeInterpreterRemoveFilesTool: ToolDefinition<{
|
|
211
|
+
session_id: string;
|
|
212
|
+
paths: string[];
|
|
213
|
+
}, {
|
|
214
|
+
session_id: string;
|
|
215
|
+
name: string;
|
|
216
|
+
result?: unknown;
|
|
217
|
+
raw?: unknown;
|
|
218
|
+
}>;
|
|
219
|
+
declare const bedrockAgentCoreCodeInterpreterModule: ModuleDefinition<{
|
|
220
|
+
access_key_id: string;
|
|
221
|
+
secret_access_key: string;
|
|
222
|
+
region: string;
|
|
223
|
+
session_token?: string | undefined;
|
|
224
|
+
code_interpreter_id?: string | undefined;
|
|
225
|
+
}>;
|
|
226
|
+
//#endregion
|
|
227
|
+
export { type BedrockAgentCoreCodeInterpreterAuth, BedrockAgentCoreCodeInterpreterClient, type BedrockAgentCoreCodeInterpreterClientOptions, DEFAULT_CODE_INTERPRETER_ID, type ExecuteCodeInput, type ExecuteCommandInput, type InvokeResult, type ListFilesInput, MAX_CODE_CHARS, MAX_COMMAND_CHARS, MAX_FILE_PATHS, MAX_FILE_TEXT, MAX_WRITE_FILES, type ReadFilesInput, type RemoveFilesInput, type SessionIdInput, type SessionOutput, type StartCommandInput, type StartSessionInput, type TaskIdInput, type WriteFilesInput, bedrockAgentCoreCodeInterpreterAuthSchema, bedrockAgentCoreCodeInterpreterExecuteCodeTool, bedrockAgentCoreCodeInterpreterExecuteCommandTool, bedrockAgentCoreCodeInterpreterGetSessionTool, bedrockAgentCoreCodeInterpreterGetTaskTool, bedrockAgentCoreCodeInterpreterListFilesTool, bedrockAgentCoreCodeInterpreterModule, bedrockAgentCoreCodeInterpreterReadFilesTool, bedrockAgentCoreCodeInterpreterRemoveFilesTool, bedrockAgentCoreCodeInterpreterStartCommandTool, bedrockAgentCoreCodeInterpreterStartSessionTool, bedrockAgentCoreCodeInterpreterStopSessionTool, bedrockAgentCoreCodeInterpreterStopTaskTool, bedrockAgentCoreCodeInterpreterWriteFilesTool, executeCodeInputSchema, executeCommandInputSchema, invokeResultSchema, listFilesInputSchema, readFilesInputSchema, removeFilesInputSchema, sessionIdInputSchema, sessionOutputSchema, startCommandInputSchema, startSessionInputSchema, taskIdInputSchema, writeFilesInputSchema };
|
|
228
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/vendors/bedrock-agentcore-code-interpreter/contracts.ts","../../../src/vendors/bedrock-agentcore-code-interpreter/client.ts","../../../src/vendors/bedrock-agentcore-code-interpreter/module.ts"],"mappings":";;;;;cAMa;cACA;cACA;cACA;cACA;cACA;cAEA,2CAAyC,EAAA;;;;;;GAUpD,EAAA,KAAA;KAEU,sCAAsC,EAAE,aAAa;cAIpD,yBAAuB,EAAA;;;GA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AiB,QAAQ;EAI1C,WAAW,OAAO,kBAAkB,QAAQ;EAM5C,YAAY,OAAO,mBAAmB,QAAQ;;;;cClHxC,iDAAA;;;;;;;;;cAYA,gDAAA;;;;;;;;cAYA,+CAAA;;;;;;;;cAYA,gDAAA;;;;;;;;;;cAYA,mDAAA;;;;;;;;;cAYA,iDAAA;;;;;;;;;cAYA,4CAAA;;;;;;;;;cAYA,6CAAA;;;;;;;;;cAYA,8CAAA;;;;;;;;;cAYA,8CAAA;;;;;;;;;cAYA,+CAAA;;;;;;;;;;;;cAYA,gDAAA;;;;;;;;;cAYA,uCAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as startCommandInputSchema, C as executeCommandInputSchema, D as removeFilesInputSchema, E as readFilesInputSchema, M as taskIdInputSchema, N as writeFilesInputSchema, O as sessionIdInputSchema, S as executeCodeInputSchema, T as listFilesInputSchema, _ as MAX_COMMAND_CHARS, a as bedrockAgentCoreCodeInterpreterListFilesTool, b as MAX_WRITE_FILES, c as bedrockAgentCoreCodeInterpreterRemoveFilesTool, d as bedrockAgentCoreCodeInterpreterStopSessionTool, f as bedrockAgentCoreCodeInterpreterStopTaskTool, g as MAX_CODE_CHARS, h as DEFAULT_CODE_INTERPRETER_ID, i as bedrockAgentCoreCodeInterpreterGetTaskTool, j as startSessionInputSchema, k as sessionOutputSchema, l as bedrockAgentCoreCodeInterpreterStartCommandTool, m as BedrockAgentCoreCodeInterpreterClient, n as bedrockAgentCoreCodeInterpreterExecuteCommandTool, o as bedrockAgentCoreCodeInterpreterModule, p as bedrockAgentCoreCodeInterpreterWriteFilesTool, r as bedrockAgentCoreCodeInterpreterGetSessionTool, s as bedrockAgentCoreCodeInterpreterReadFilesTool, t as bedrockAgentCoreCodeInterpreterExecuteCodeTool, u as bedrockAgentCoreCodeInterpreterStartSessionTool, v as MAX_FILE_PATHS, w as invokeResultSchema, x as bedrockAgentCoreCodeInterpreterAuthSchema, y as MAX_FILE_TEXT } from "../../bedrock-agentcore-code-interpreter-MWK-8RhA.js";
|
|
2
|
+
export { BedrockAgentCoreCodeInterpreterClient, DEFAULT_CODE_INTERPRETER_ID, MAX_CODE_CHARS, MAX_COMMAND_CHARS, MAX_FILE_PATHS, MAX_FILE_TEXT, MAX_WRITE_FILES, bedrockAgentCoreCodeInterpreterAuthSchema, bedrockAgentCoreCodeInterpreterExecuteCodeTool, bedrockAgentCoreCodeInterpreterExecuteCommandTool, bedrockAgentCoreCodeInterpreterGetSessionTool, bedrockAgentCoreCodeInterpreterGetTaskTool, bedrockAgentCoreCodeInterpreterListFilesTool, bedrockAgentCoreCodeInterpreterModule, bedrockAgentCoreCodeInterpreterReadFilesTool, bedrockAgentCoreCodeInterpreterRemoveFilesTool, bedrockAgentCoreCodeInterpreterStartCommandTool, bedrockAgentCoreCodeInterpreterStartSessionTool, bedrockAgentCoreCodeInterpreterStopSessionTool, bedrockAgentCoreCodeInterpreterStopTaskTool, bedrockAgentCoreCodeInterpreterWriteFilesTool, executeCodeInputSchema, executeCommandInputSchema, invokeResultSchema, listFilesInputSchema, readFilesInputSchema, removeFilesInputSchema, sessionIdInputSchema, sessionOutputSchema, startCommandInputSchema, startSessionInputSchema, taskIdInputSchema, writeFilesInputSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as cloudflareBrowserRenderOutputSchema, C as CloudflareBrowserSessionOutput, D as cloudflareBrowserAuthSchema, E as MAX_HTML_CHARS, F as cloudflareBrowserSessionIdInputSchema, I as cloudflareBrowserSessionOutputSchema, L as cloudflareBrowserStartSessionInputSchema, M as cloudflareBrowserRenderScreenshotInputSchema, N as cloudflareBrowserRenderSourceSchema, O as cloudflareBrowserClientAuthSchema, P as cloudflareBrowserSessionAuthSchema, R as cloudflareBrowserViewportSchema, S as CloudflareBrowserSessionIdInput, T as CloudflareBrowserViewport, _ as CloudflareBrowserRenderOutput, a as cloudflareBrowserRenderPdfTool, b as CloudflareBrowserRenderSource, c as cloudflareBrowserStopSessionTool, d as mintCloudflareBrowserCdpConnection, f as CloudflareBrowserClient, g as CloudflareBrowserEngine, h as CloudflareBrowserClientAuth, i as cloudflareBrowserModule, j as cloudflareBrowserRenderPdfInputSchema, k as cloudflareBrowserEngineSchema, l as CloudflareBrowserCdpConnection, m as CloudflareBrowserAuth, n as titleFromHtml, o as cloudflareBrowserRenderScreenshotTool, p as CloudflareBrowserClientOptions, r as cloudflareBrowserGetSessionTool, s as cloudflareBrowserStartSessionTool, t as plainTextFromHtml, u as MintCloudflareBrowserCdpOptions, v as CloudflareBrowserRenderPdfInput, w as CloudflareBrowserStartSessionInput, x as CloudflareBrowserSessionAuth, y as CloudflareBrowserRenderScreenshotInput } from "../../index-Cuh6eMWc.js";
|
|
2
|
+
export { type CloudflareBrowserAuth, type CloudflareBrowserCdpConnection, CloudflareBrowserClient, type CloudflareBrowserClientAuth, type CloudflareBrowserClientOptions, type CloudflareBrowserEngine, type CloudflareBrowserRenderOutput, type CloudflareBrowserRenderPdfInput, type CloudflareBrowserRenderScreenshotInput, type CloudflareBrowserRenderSource, type CloudflareBrowserSessionAuth, type CloudflareBrowserSessionIdInput, type CloudflareBrowserSessionOutput, type CloudflareBrowserStartSessionInput, type CloudflareBrowserViewport, MAX_HTML_CHARS, type MintCloudflareBrowserCdpOptions, cloudflareBrowserAuthSchema, cloudflareBrowserClientAuthSchema, cloudflareBrowserEngineSchema, cloudflareBrowserGetSessionTool, cloudflareBrowserModule, cloudflareBrowserRenderOutputSchema, cloudflareBrowserRenderPdfInputSchema, cloudflareBrowserRenderPdfTool, cloudflareBrowserRenderScreenshotInputSchema, cloudflareBrowserRenderScreenshotTool, cloudflareBrowserRenderSourceSchema, cloudflareBrowserSessionAuthSchema, cloudflareBrowserSessionIdInputSchema, cloudflareBrowserSessionOutputSchema, cloudflareBrowserStartSessionInputSchema, cloudflareBrowserStartSessionTool, cloudflareBrowserStopSessionTool, cloudflareBrowserViewportSchema, mintCloudflareBrowserCdpConnection, plainTextFromHtml, titleFromHtml };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as cloudflareBrowserViewportSchema, S as cloudflareBrowserStartSessionInputSchema, _ as cloudflareBrowserRenderScreenshotInputSchema, a as cloudflareBrowserStartSessionTool, b as cloudflareBrowserSessionIdInputSchema, c as CloudflareBrowserClient, d as MAX_HTML_CHARS, f as cloudflareBrowserAuthSchema, g as cloudflareBrowserRenderPdfInputSchema, h as cloudflareBrowserRenderOutputSchema, i as cloudflareBrowserRenderScreenshotTool, l as plainTextFromHtml, m as cloudflareBrowserEngineSchema, n as cloudflareBrowserModule, o as cloudflareBrowserStopSessionTool, p as cloudflareBrowserClientAuthSchema, r as cloudflareBrowserRenderPdfTool, s as mintCloudflareBrowserCdpConnection, t as cloudflareBrowserGetSessionTool, u as titleFromHtml, v as cloudflareBrowserRenderSourceSchema, x as cloudflareBrowserSessionOutputSchema, y as cloudflareBrowserSessionAuthSchema } from "../../cloudflare-browser-B6Yolpin.js";
|
|
2
|
+
export { CloudflareBrowserClient, MAX_HTML_CHARS, cloudflareBrowserAuthSchema, cloudflareBrowserClientAuthSchema, cloudflareBrowserEngineSchema, cloudflareBrowserGetSessionTool, cloudflareBrowserModule, cloudflareBrowserRenderOutputSchema, cloudflareBrowserRenderPdfInputSchema, cloudflareBrowserRenderPdfTool, cloudflareBrowserRenderScreenshotInputSchema, cloudflareBrowserRenderScreenshotTool, cloudflareBrowserRenderSourceSchema, cloudflareBrowserSessionAuthSchema, cloudflareBrowserSessionIdInputSchema, cloudflareBrowserSessionOutputSchema, cloudflareBrowserStartSessionInputSchema, cloudflareBrowserStartSessionTool, cloudflareBrowserStopSessionTool, cloudflareBrowserViewportSchema, mintCloudflareBrowserCdpConnection, plainTextFromHtml, titleFromHtml };
|