@cesteral/amazon-dsp-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +201 -0
- package/README.md +59 -0
- package/dist/auth/amazon-dsp-auth-adapter.d.ts +42 -0
- package/dist/auth/amazon-dsp-auth-adapter.d.ts.map +1 -0
- package/dist/auth/amazon-dsp-auth-adapter.js +126 -0
- package/dist/auth/amazon-dsp-auth-adapter.js.map +1 -0
- package/dist/auth/amazon-dsp-auth-strategy.d.ts +14 -0
- package/dist/auth/amazon-dsp-auth-strategy.d.ts.map +1 -0
- package/dist/auth/amazon-dsp-auth-strategy.js +58 -0
- package/dist/auth/amazon-dsp-auth-strategy.js.map +1 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +3 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/config/index.d.ts +116 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +49 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +65 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/bulk-operations-workflow.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/bulk-operations-workflow.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/bulk-operations-workflow.prompt.js +127 -0
- package/dist/mcp-server/prompts/definitions/bulk-operations-workflow.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/campaign-setup-workflow.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/campaign-setup-workflow.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/campaign-setup-workflow.prompt.js +120 -0
- package/dist/mcp-server/prompts/definitions/campaign-setup-workflow.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/creative-upload-workflow.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/creative-upload-workflow.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/creative-upload-workflow.prompt.js +116 -0
- package/dist/mcp-server/prompts/definitions/creative-upload-workflow.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/cross-platform-campaign-setup.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/cross-platform-campaign-setup.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/cross-platform-campaign-setup.prompt.js +299 -0
- package/dist/mcp-server/prompts/definitions/cross-platform-campaign-setup.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/cross-platform-performance.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/cross-platform-performance.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/cross-platform-performance.prompt.js +170 -0
- package/dist/mcp-server/prompts/definitions/cross-platform-performance.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/entity-duplication-workflow.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/entity-duplication-workflow.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/entity-duplication-workflow.prompt.js +200 -0
- package/dist/mcp-server/prompts/definitions/entity-duplication-workflow.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/entity-update-workflow.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/entity-update-workflow.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/entity-update-workflow.prompt.js +183 -0
- package/dist/mcp-server/prompts/definitions/entity-update-workflow.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/reporting-workflow.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/reporting-workflow.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/reporting-workflow.prompt.js +126 -0
- package/dist/mcp-server/prompts/definitions/reporting-workflow.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/targeting-discovery-workflow.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/targeting-discovery-workflow.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/targeting-discovery-workflow.prompt.js +198 -0
- package/dist/mcp-server/prompts/definitions/targeting-discovery-workflow.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/tool-schema-exploration.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/tool-schema-exploration.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/tool-schema-exploration.prompt.js +96 -0
- package/dist/mcp-server/prompts/definitions/tool-schema-exploration.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/troubleshoot-entity.prompt.d.ts +4 -0
- package/dist/mcp-server/prompts/definitions/troubleshoot-entity.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/troubleshoot-entity.prompt.js +111 -0
- package/dist/mcp-server/prompts/definitions/troubleshoot-entity.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/index.d.ts +9 -0
- package/dist/mcp-server/prompts/index.d.ts.map +1 -0
- package/dist/mcp-server/prompts/index.js +97 -0
- package/dist/mcp-server/prompts/index.js.map +1 -0
- package/dist/mcp-server/resources/definitions/entity-examples.resource.d.ts +4 -0
- package/dist/mcp-server/resources/definitions/entity-examples.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/entity-examples.resource.js +121 -0
- package/dist/mcp-server/resources/definitions/entity-examples.resource.js.map +1 -0
- package/dist/mcp-server/resources/definitions/entity-hierarchy.resource.d.ts +3 -0
- package/dist/mcp-server/resources/definitions/entity-hierarchy.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/entity-hierarchy.resource.js +58 -0
- package/dist/mcp-server/resources/definitions/entity-hierarchy.resource.js.map +1 -0
- package/dist/mcp-server/resources/definitions/entity-schemas.resource.d.ts +4 -0
- package/dist/mcp-server/resources/definitions/entity-schemas.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/entity-schemas.resource.js +51 -0
- package/dist/mcp-server/resources/definitions/entity-schemas.resource.js.map +1 -0
- package/dist/mcp-server/resources/definitions/index.d.ts +7 -0
- package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/index.js +53 -0
- package/dist/mcp-server/resources/definitions/index.js.map +1 -0
- package/dist/mcp-server/resources/definitions/reporting-reference.resource.d.ts +3 -0
- package/dist/mcp-server/resources/definitions/reporting-reference.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/reporting-reference.resource.js +50 -0
- package/dist/mcp-server/resources/definitions/reporting-reference.resource.js.map +1 -0
- package/dist/mcp-server/resources/index.d.ts +3 -0
- package/dist/mcp-server/resources/index.d.ts.map +1 -0
- package/dist/mcp-server/resources/index.js +2 -0
- package/dist/mcp-server/resources/index.js.map +1 -0
- package/dist/mcp-server/resources/types.d.ts +8 -0
- package/dist/mcp-server/resources/types.d.ts.map +1 -0
- package/dist/mcp-server/resources/types.js +2 -0
- package/dist/mcp-server/resources/types.js.map +1 -0
- package/dist/mcp-server/server.d.ts +5 -0
- package/dist/mcp-server/server.d.ts.map +1 -0
- package/dist/mcp-server/server.js +137 -0
- package/dist/mcp-server/server.js.map +1 -0
- package/dist/mcp-server/tools/definitions/adjust-bids.tool.d.ts +215 -0
- package/dist/mcp-server/tools/definitions/adjust-bids.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/adjust-bids.tool.js +147 -0
- package/dist/mcp-server/tools/definitions/adjust-bids.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/bulk-create-entities.tool.d.ts +152 -0
- package/dist/mcp-server/tools/definitions/bulk-create-entities.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/bulk-create-entities.tool.js +111 -0
- package/dist/mcp-server/tools/definitions/bulk-create-entities.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/bulk-update-entities.tool.d.ts +193 -0
- package/dist/mcp-server/tools/definitions/bulk-update-entities.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/bulk-update-entities.tool.js +127 -0
- package/dist/mcp-server/tools/definitions/bulk-update-entities.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/bulk-update-status.tool.d.ts +153 -0
- package/dist/mcp-server/tools/definitions/bulk-update-status.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/bulk-update-status.tool.js +136 -0
- package/dist/mcp-server/tools/definitions/bulk-update-status.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/check-report-status.tool.d.ts +112 -0
- package/dist/mcp-server/tools/definitions/check-report-status.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/check-report-status.tool.js +87 -0
- package/dist/mcp-server/tools/definitions/check-report-status.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/create-entity.tool.d.ts +111 -0
- package/dist/mcp-server/tools/definitions/create-entity.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/create-entity.tool.js +96 -0
- package/dist/mcp-server/tools/definitions/create-entity.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/delete-entity.tool.d.ts +152 -0
- package/dist/mcp-server/tools/definitions/delete-entity.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/delete-entity.tool.js +142 -0
- package/dist/mcp-server/tools/definitions/delete-entity.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/download-report.tool.d.ts +297 -0
- package/dist/mcp-server/tools/definitions/download-report.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/download-report.tool.js +107 -0
- package/dist/mcp-server/tools/definitions/download-report.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/duplicate-entity.tool.d.ts +105 -0
- package/dist/mcp-server/tools/definitions/duplicate-entity.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/duplicate-entity.tool.js +85 -0
- package/dist/mcp-server/tools/definitions/duplicate-entity.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ad-preview.tool.d.ts +75 -0
- package/dist/mcp-server/tools/definitions/get-ad-preview.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-ad-preview.tool.js +63 -0
- package/dist/mcp-server/tools/definitions/get-ad-preview.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-audience-estimate.tool.d.ts +85 -0
- package/dist/mcp-server/tools/definitions/get-audience-estimate.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-audience-estimate.tool.js +91 -0
- package/dist/mcp-server/tools/definitions/get-audience-estimate.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-entity.tool.d.ts +76 -0
- package/dist/mcp-server/tools/definitions/get-entity.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-entity.tool.js +71 -0
- package/dist/mcp-server/tools/definitions/get-entity.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-report-breakdowns.tool.d.ts +289 -0
- package/dist/mcp-server/tools/definitions/get-report-breakdowns.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-report-breakdowns.tool.js +181 -0
- package/dist/mcp-server/tools/definitions/get-report-breakdowns.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-report.tool.d.ts +271 -0
- package/dist/mcp-server/tools/definitions/get-report.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-report.tool.js +174 -0
- package/dist/mcp-server/tools/definitions/get-report.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-targeting-options.tool.d.ts +75 -0
- package/dist/mcp-server/tools/definitions/get-targeting-options.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-targeting-options.tool.js +75 -0
- package/dist/mcp-server/tools/definitions/get-targeting-options.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/index.d.ts +21 -0
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/index.js +63 -0
- package/dist/mcp-server/tools/definitions/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/list-advertisers.tool.d.ts +54 -0
- package/dist/mcp-server/tools/definitions/list-advertisers.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/list-advertisers.tool.js +58 -0
- package/dist/mcp-server/tools/definitions/list-advertisers.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/list-entities.tool.d.ts +171 -0
- package/dist/mcp-server/tools/definitions/list-entities.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/list-entities.tool.js +112 -0
- package/dist/mcp-server/tools/definitions/list-entities.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-targeting.tool.d.ts +89 -0
- package/dist/mcp-server/tools/definitions/search-targeting.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-targeting.tool.js +93 -0
- package/dist/mcp-server/tools/definitions/search-targeting.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/submit-report.tool.d.ts +134 -0
- package/dist/mcp-server/tools/definitions/submit-report.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/submit-report.tool.js +119 -0
- package/dist/mcp-server/tools/definitions/submit-report.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/update-entity.tool.d.ts +114 -0
- package/dist/mcp-server/tools/definitions/update-entity.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/update-entity.tool.js +89 -0
- package/dist/mcp-server/tools/definitions/update-entity.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/validate-entity.tool.d.ts +169 -0
- package/dist/mcp-server/tools/definitions/validate-entity.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/validate-entity.tool.js +104 -0
- package/dist/mcp-server/tools/definitions/validate-entity.tool.js.map +1 -0
- package/dist/mcp-server/tools/index.d.ts +2 -0
- package/dist/mcp-server/tools/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/index.js +2 -0
- package/dist/mcp-server/tools/index.js.map +1 -0
- package/dist/mcp-server/tools/utils/entity-mapping.d.ts +24 -0
- package/dist/mcp-server/tools/utils/entity-mapping.d.ts.map +1 -0
- package/dist/mcp-server/tools/utils/entity-mapping.js +42 -0
- package/dist/mcp-server/tools/utils/entity-mapping.js.map +1 -0
- package/dist/mcp-server/tools/utils/resolve-session.d.ts +4 -0
- package/dist/mcp-server/tools/utils/resolve-session.d.ts.map +1 -0
- package/dist/mcp-server/tools/utils/resolve-session.js +6 -0
- package/dist/mcp-server/tools/utils/resolve-session.js.map +1 -0
- package/dist/mcp-server/transports/streamable-http-transport.d.ts +57 -0
- package/dist/mcp-server/transports/streamable-http-transport.d.ts.map +1 -0
- package/dist/mcp-server/transports/streamable-http-transport.js +105 -0
- package/dist/mcp-server/transports/streamable-http-transport.js.map +1 -0
- package/dist/services/amazon-dsp/amazon-dsp-api-contract.d.ts +43 -0
- package/dist/services/amazon-dsp/amazon-dsp-api-contract.d.ts.map +1 -0
- package/dist/services/amazon-dsp/amazon-dsp-api-contract.js +193 -0
- package/dist/services/amazon-dsp/amazon-dsp-api-contract.js.map +1 -0
- package/dist/services/amazon-dsp/amazon-dsp-http-client.d.ts +15 -0
- package/dist/services/amazon-dsp/amazon-dsp-http-client.d.ts.map +1 -0
- package/dist/services/amazon-dsp/amazon-dsp-http-client.js +138 -0
- package/dist/services/amazon-dsp/amazon-dsp-http-client.js.map +1 -0
- package/dist/services/amazon-dsp/amazon-dsp-reporting-service.d.ts +63 -0
- package/dist/services/amazon-dsp/amazon-dsp-reporting-service.d.ts.map +1 -0
- package/dist/services/amazon-dsp/amazon-dsp-reporting-service.js +134 -0
- package/dist/services/amazon-dsp/amazon-dsp-reporting-service.js.map +1 -0
- package/dist/services/amazon-dsp/amazon-dsp-service.d.ts +85 -0
- package/dist/services/amazon-dsp/amazon-dsp-service.d.ts.map +1 -0
- package/dist/services/amazon-dsp/amazon-dsp-service.js +182 -0
- package/dist/services/amazon-dsp/amazon-dsp-service.js.map +1 -0
- package/dist/services/amazon-dsp/types.d.ts +142 -0
- package/dist/services/amazon-dsp/types.d.ts.map +1 -0
- package/dist/services/amazon-dsp/types.js +24 -0
- package/dist/services/amazon-dsp/types.js.map +1 -0
- package/dist/services/session-services.d.ts +20 -0
- package/dist/services/session-services.d.ts.map +1 -0
- package/dist/services/session-services.js +23 -0
- package/dist/services/session-services.js.map +1 -0
- package/dist/types-global/mcp.d.ts +2 -0
- package/dist/types-global/mcp.d.ts.map +1 -0
- package/dist/types-global/mcp.js +2 -0
- package/dist/types-global/mcp.js.map +1 -0
- package/dist/utils/errors/index.d.ts +2 -0
- package/dist/utils/errors/index.d.ts.map +1 -0
- package/dist/utils/errors/index.js +2 -0
- package/dist/utils/errors/index.js.map +1 -0
- package/dist/utils/platform.d.ts +3 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +5 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/security/rate-limiter.d.ts +3 -0
- package/dist/utils/security/rate-limiter.d.ts.map +1 -0
- package/dist/utils/security/rate-limiter.js +5 -0
- package/dist/utils/security/rate-limiter.js.map +1 -0
- package/dist/utils/telemetry/index.d.ts +2 -0
- package/dist/utils/telemetry/index.d.ts.map +1 -0
- package/dist/utils/telemetry/index.js +2 -0
- package/dist/utils/telemetry/index.js.map +1 -0
- package/dist/utils/telemetry/tracing.d.ts +3 -0
- package/dist/utils/telemetry/tracing.d.ts.map +1 -0
- package/dist/utils/telemetry/tracing.js +4 -0
- package/dist/utils/telemetry/tracing.js.map +1 -0
- package/package.json +55 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @cesteral/amazon-dsp-mcp
|
|
2
|
+
|
|
3
|
+
Amazon DSP MCP server for campaign management and reporting through the Amazon Ads API.
|
|
4
|
+
|
|
5
|
+
## Current Scope
|
|
6
|
+
|
|
7
|
+
The server currently exposes generic CRUD-style MCP tools for these Amazon DSP entities:
|
|
8
|
+
|
|
9
|
+
- `campaign` and `order` as backward-compatible aliases for the same management object
|
|
10
|
+
- `adGroup` and `lineItem` as backward-compatible aliases for the same management object
|
|
11
|
+
- `creative`
|
|
12
|
+
- `target`
|
|
13
|
+
- `creativeAssociation`
|
|
14
|
+
|
|
15
|
+
The implementation keeps the older `order` / `lineItem` names for compatibility while accepting Amazon-style `campaign` / `adGroup` inputs.
|
|
16
|
+
|
|
17
|
+
## Reporting
|
|
18
|
+
|
|
19
|
+
Amazon Ads reporting uses reporting v3:
|
|
20
|
+
|
|
21
|
+
- Submit: `POST /reporting/reports`
|
|
22
|
+
- Poll: `GET /reporting/reports/{reportId}`
|
|
23
|
+
- Required `Content-Type`: `application/vnd.createasyncreportrequest.v3+json`
|
|
24
|
+
- Status values: `PENDING`, `PROCESSING`, `COMPLETED`, `FAILED`
|
|
25
|
+
|
|
26
|
+
Downloaded reports are handled as raw JSON after decompression, with CSV-style fallback parsing for defensive compatibility.
|
|
27
|
+
|
|
28
|
+
The `amazon_dsp_get_report`, `amazon_dsp_get_report_breakdowns`, and `amazon_dsp_download_report` tools all return data using the shared bounded report-view contract: `mode` (`"summary"` default — headers + counts + 10-row preview, or `"rows"` for a paginated rows page), `columns` (project to selected columns), `offset` (zero-based pagination), and `maxRows` (page size; default 10 for summary, 50 for rows; hard cap 200).
|
|
29
|
+
|
|
30
|
+
## Auth And Headers
|
|
31
|
+
|
|
32
|
+
All upstream requests carry:
|
|
33
|
+
|
|
34
|
+
- `Authorization: Bearer <access token>`
|
|
35
|
+
- `Amazon-Advertising-API-Scope: <profile id>`
|
|
36
|
+
- `Amazon-Advertising-API-ClientId: <client id>`
|
|
37
|
+
|
|
38
|
+
The MCP server does not inject profile IDs into request bodies — scope is conveyed through Amazon's required headers.
|
|
39
|
+
|
|
40
|
+
### Auth flows
|
|
41
|
+
|
|
42
|
+
Amazon access tokens expire after **60 minutes** (hard limit, per [Amazon Ads API docs](https://advertising.amazon.com/API/docs/en-us/guides/get-started/retrieve-access-token)). Refresh tokens **do not expire** unless revoked. The server supports two flows:
|
|
43
|
+
|
|
44
|
+
**Flow A — LwA refresh-token (recommended).** Provide `AMAZON_DSP_APP_ID` + `AMAZON_DSP_APP_SECRET` + `AMAZON_DSP_REFRESH_TOKEN` + `AMAZON_DSP_PROFILE_ID`. The adapter mints access tokens via `POST https://api.amazon.com/auth/o2/token` and auto-refreshes them before the 60-minute expiry. In HTTP mode, pass these as `X-AmazonDsp-App-Id` / `-App-Secret` / `-Refresh-Token` headers plus `Amazon-Advertising-API-Scope`.
|
|
45
|
+
|
|
46
|
+
**Flow B — static access token (CI / short sessions).** Provide `AMAZON_DSP_ACCESS_TOKEN` + `AMAZON_DSP_PROFILE_ID` (+ optional `AMAZON_DSP_CLIENT_ID`). Server starts returning 401 after 60 minutes — re-mint manually. In HTTP mode, use a standard `Authorization: Bearer …` header.
|
|
47
|
+
|
|
48
|
+
Stdio prefers Flow A when its three env vars are set, falling back to Flow B.
|
|
49
|
+
|
|
50
|
+
### Producing a refresh token
|
|
51
|
+
|
|
52
|
+
The fastest path is Amazon's [Postman collection](https://github.com/amzn/ads-advanced-tools-docs) — its auth scripts walk through the OAuth grant flow, exchange the auth code, and store the resulting refresh token in environment variables. Alternatively follow steps 1–2 of the [official getting-started guide](https://advertising.amazon.com/API/docs/en-us/guides/get-started/overview) with `curl`.
|
|
53
|
+
|
|
54
|
+
## Notes
|
|
55
|
+
|
|
56
|
+
- Amazon DSP campaign management is modeled through the order object.
|
|
57
|
+
- Amazon DSP ad group management is modeled through the line item object.
|
|
58
|
+
- Performance+ support is represented through optional order fields such as `automatedAdGroupCreation`.
|
|
59
|
+
- Guidance, Quick Actions, and some newer DSP APIs are not yet implemented in this package.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OAuth2RefreshAdapterBase } from "@cesteral/shared";
|
|
2
|
+
export interface AmazonDspAuthAdapter {
|
|
3
|
+
getAccessToken(): Promise<string>;
|
|
4
|
+
validate(): Promise<void>;
|
|
5
|
+
readonly userId: string;
|
|
6
|
+
readonly profileId: string;
|
|
7
|
+
readonly clientId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class AmazonDspAccessTokenAdapter implements AmazonDspAuthAdapter {
|
|
10
|
+
private readonly accessToken;
|
|
11
|
+
private readonly _profileId;
|
|
12
|
+
private readonly baseUrl;
|
|
13
|
+
private readonly _clientId;
|
|
14
|
+
private validated;
|
|
15
|
+
private _userId;
|
|
16
|
+
constructor(accessToken: string, _profileId: string, baseUrl?: string, _clientId?: string);
|
|
17
|
+
get userId(): string;
|
|
18
|
+
get profileId(): string;
|
|
19
|
+
get clientId(): string;
|
|
20
|
+
getAccessToken(): Promise<string>;
|
|
21
|
+
validate(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export interface AmazonDspRefreshCredentials {
|
|
24
|
+
appId: string;
|
|
25
|
+
appSecret: string;
|
|
26
|
+
refreshToken: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class AmazonDspRefreshTokenAdapter extends OAuth2RefreshAdapterBase<AmazonDspRefreshCredentials> implements AmazonDspAuthAdapter {
|
|
29
|
+
private readonly _profileId;
|
|
30
|
+
private readonly baseUrl;
|
|
31
|
+
private _userId;
|
|
32
|
+
constructor(credentials: AmazonDspRefreshCredentials, _profileId: string, baseUrl?: string);
|
|
33
|
+
get userId(): string;
|
|
34
|
+
get profileId(): string;
|
|
35
|
+
get clientId(): string;
|
|
36
|
+
validate(): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export declare function parseAmazonDspRefreshCredentialsFromHeaders(headers: Record<string, string | string[] | undefined>): AmazonDspRefreshCredentials | undefined;
|
|
39
|
+
export declare function parseAmazonDspTokenFromHeaders(headers: Record<string, string | string[] | undefined>): string;
|
|
40
|
+
export declare function getAmazonDspProfileIdFromHeaders(headers: Record<string, string | string[] | undefined>): string;
|
|
41
|
+
export declare function getAmazonDspCredentialFingerprint(accessToken: string, profileId: string): string;
|
|
42
|
+
//# sourceMappingURL=amazon-dsp-auth-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amazon-dsp-auth-adapter.d.ts","sourceRoot":"","sources":["../../src/auth/amazon-dsp-auth-adapter.ts"],"names":[],"mappings":"AAiBA,OAAO,EAML,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAa1B,MAAM,WAAW,oBAAoB;IACnC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AA4CD,qBAAa,2BAA4B,YAAW,oBAAoB;IAKpE,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAP5B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAM;gBAGF,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,MAA6C,EACtD,SAAS,GAAE,MAAW;IAGzC,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAEK,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIjC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAUhC;AAKD,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAMD,qBAAa,4BACX,SAAQ,wBAAwB,CAAC,2BAA2B,CAC5D,YAAW,oBAAoB;IAM7B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAL1B,OAAO,CAAC,OAAO,CAAM;gBAGnB,WAAW,EAAE,2BAA2B,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,MAA6C;IAqCzE,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAEK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAUhC;AAMD,wBAAgB,2CAA2C,CACzD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GACrD,2BAA2B,GAAG,SAAS,CAUzC;AAMD,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GACrD,MAAM,CAgBR;AAMD,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GACrD,MAAM,CAcR;AAKD,wBAAgB,iCAAiC,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEhG"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { extractHeader, fetchWithTimeout, fingerprintCredentials, JsonRpcErrorCode, McpError, OAuth2RefreshAdapterBase, } from "@cesteral/shared";
|
|
2
|
+
async function fetchAmazonDspUserId(token, baseUrl, profileId, clientId) {
|
|
3
|
+
const response = await fetchWithTimeout(`${baseUrl}/dsp/advertisers?startIndex=0&count=1`, 10_000, undefined, {
|
|
4
|
+
method: "GET",
|
|
5
|
+
headers: {
|
|
6
|
+
Authorization: `Bearer ${token}`,
|
|
7
|
+
"Content-Type": "application/json",
|
|
8
|
+
...(clientId && { "Amazon-Advertising-API-ClientId": clientId }),
|
|
9
|
+
"Amazon-Advertising-API-Scope": profileId,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
if (!response.ok) {
|
|
13
|
+
const errorBody = await response.text().catch(() => "");
|
|
14
|
+
throw new McpError(JsonRpcErrorCode.Unauthorized, `AmazonDsp token validation HTTP error: ${response.status} ${response.statusText}. ${errorBody.substring(0, 200)}`);
|
|
15
|
+
}
|
|
16
|
+
const data = (await response.json());
|
|
17
|
+
return data.response?.[0]?.name ?? "unknown";
|
|
18
|
+
}
|
|
19
|
+
export class AmazonDspAccessTokenAdapter {
|
|
20
|
+
accessToken;
|
|
21
|
+
_profileId;
|
|
22
|
+
baseUrl;
|
|
23
|
+
_clientId;
|
|
24
|
+
validated = false;
|
|
25
|
+
_userId = "";
|
|
26
|
+
constructor(accessToken, _profileId, baseUrl = "https://advertising-api.amazon.com", _clientId = "") {
|
|
27
|
+
this.accessToken = accessToken;
|
|
28
|
+
this._profileId = _profileId;
|
|
29
|
+
this.baseUrl = baseUrl;
|
|
30
|
+
this._clientId = _clientId;
|
|
31
|
+
}
|
|
32
|
+
get userId() {
|
|
33
|
+
return this._userId;
|
|
34
|
+
}
|
|
35
|
+
get profileId() {
|
|
36
|
+
return this._profileId;
|
|
37
|
+
}
|
|
38
|
+
get clientId() {
|
|
39
|
+
return this._clientId;
|
|
40
|
+
}
|
|
41
|
+
async getAccessToken() {
|
|
42
|
+
return this.accessToken;
|
|
43
|
+
}
|
|
44
|
+
async validate() {
|
|
45
|
+
if (this.validated)
|
|
46
|
+
return;
|
|
47
|
+
this._userId = await fetchAmazonDspUserId(this.accessToken, this.baseUrl, this._profileId, this._clientId);
|
|
48
|
+
this.validated = true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export class AmazonDspRefreshTokenAdapter extends OAuth2RefreshAdapterBase {
|
|
52
|
+
_profileId;
|
|
53
|
+
baseUrl;
|
|
54
|
+
_userId = "";
|
|
55
|
+
constructor(credentials, _profileId, baseUrl = "https://advertising-api.amazon.com") {
|
|
56
|
+
super({
|
|
57
|
+
platformName: "AmazonDsp",
|
|
58
|
+
credentials,
|
|
59
|
+
requestToken: async (refreshToken) => {
|
|
60
|
+
const response = await fetchWithTimeout("https://api.amazon.com/auth/o2/token", 10_000, undefined, {
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
63
|
+
body: new URLSearchParams({
|
|
64
|
+
grant_type: "refresh_token",
|
|
65
|
+
client_id: credentials.appId,
|
|
66
|
+
client_secret: credentials.appSecret,
|
|
67
|
+
refresh_token: refreshToken,
|
|
68
|
+
}).toString(),
|
|
69
|
+
});
|
|
70
|
+
if (!response.ok) {
|
|
71
|
+
const errorBody = await response.text().catch(() => "");
|
|
72
|
+
throw new McpError(JsonRpcErrorCode.InternalError, `AmazonDsp token refresh failed: ${response.status} ${response.statusText}. ${errorBody.substring(0, 200)}`);
|
|
73
|
+
}
|
|
74
|
+
return (await response.json());
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
this._profileId = _profileId;
|
|
78
|
+
this.baseUrl = baseUrl;
|
|
79
|
+
}
|
|
80
|
+
get userId() {
|
|
81
|
+
return this._userId;
|
|
82
|
+
}
|
|
83
|
+
get profileId() {
|
|
84
|
+
return this._profileId;
|
|
85
|
+
}
|
|
86
|
+
get clientId() {
|
|
87
|
+
return this.credentials.appId;
|
|
88
|
+
}
|
|
89
|
+
async validate() {
|
|
90
|
+
const token = await this.getAccessToken();
|
|
91
|
+
this._userId = await fetchAmazonDspUserId(token, this.baseUrl, this._profileId, this.credentials.appId);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export function parseAmazonDspRefreshCredentialsFromHeaders(headers) {
|
|
95
|
+
const appId = extractHeader(headers, "x-amazondsp-app-id");
|
|
96
|
+
const appSecret = extractHeader(headers, "x-amazondsp-app-secret");
|
|
97
|
+
const refreshToken = extractHeader(headers, "x-amazondsp-refresh-token");
|
|
98
|
+
if (!appId || !appSecret || !refreshToken) {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
return { appId, appSecret, refreshToken };
|
|
102
|
+
}
|
|
103
|
+
export function parseAmazonDspTokenFromHeaders(headers) {
|
|
104
|
+
const authHeader = extractHeader(headers, "authorization");
|
|
105
|
+
if (!authHeader) {
|
|
106
|
+
throw new McpError(JsonRpcErrorCode.Unauthorized, "Missing required Authorization header");
|
|
107
|
+
}
|
|
108
|
+
const match = authHeader.match(/^Bearer\s+(.+)$/i);
|
|
109
|
+
if (!match || !match[1]) {
|
|
110
|
+
throw new McpError(JsonRpcErrorCode.Unauthorized, "Authorization header must use Bearer scheme");
|
|
111
|
+
}
|
|
112
|
+
return match[1];
|
|
113
|
+
}
|
|
114
|
+
export function getAmazonDspProfileIdFromHeaders(headers) {
|
|
115
|
+
const profileId = extractHeader(headers, "amazon-advertising-api-scope") ??
|
|
116
|
+
extractHeader(headers, "Amazon-Advertising-API-Scope");
|
|
117
|
+
if (!profileId) {
|
|
118
|
+
throw new McpError(JsonRpcErrorCode.InvalidRequest, "Missing required Amazon-Advertising-API-Scope header (DSP entity ID / profile ID). " +
|
|
119
|
+
"Also ensure Amazon-Advertising-API-ClientId header is set.");
|
|
120
|
+
}
|
|
121
|
+
return profileId;
|
|
122
|
+
}
|
|
123
|
+
export function getAmazonDspCredentialFingerprint(accessToken, profileId) {
|
|
124
|
+
return fingerprintCredentials(accessToken, profileId);
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=amazon-dsp-auth-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amazon-dsp-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CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Logger } from "pino";
|
|
2
|
+
import { BearerAuthStrategyBase, type BearerAdapterResult } from "@cesteral/shared";
|
|
3
|
+
export declare class AmazonDspBearerAuthStrategy extends BearerAuthStrategyBase {
|
|
4
|
+
private readonly baseUrl;
|
|
5
|
+
protected readonly authType = "amazon-dsp-bearer";
|
|
6
|
+
protected readonly platformName = "AmazonDsp";
|
|
7
|
+
constructor(baseUrl: string, logger?: Logger);
|
|
8
|
+
private getClientIdFromHeaders;
|
|
9
|
+
protected resolveRefreshBranch(headers: Record<string, string | string[] | undefined>): Promise<BearerAdapterResult | null>;
|
|
10
|
+
protected resolveAccessBranch(headers: Record<string, string | string[] | undefined>): Promise<BearerAdapterResult>;
|
|
11
|
+
protected getRefreshFingerprint(headers: Record<string, string | string[] | undefined>): string | undefined;
|
|
12
|
+
protected getTokenFingerprint(headers: Record<string, string | string[] | undefined>): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=amazon-dsp-auth-strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amazon-dsp-auth-strategy.d.ts","sourceRoot":"","sources":["../../src/auth/amazon-dsp-auth-strategy.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWpF,qBAAa,2BAA4B,SAAQ,sBAAsB;IAKnE,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJ1B,SAAS,CAAC,QAAQ,CAAC,QAAQ,uBAAuB;IAClD,SAAS,CAAC,QAAQ,CAAC,YAAY,eAAe;gBAG3B,OAAO,EAAE,MAAM,EAChC,MAAM,CAAC,EAAE,MAAM;IAKjB,OAAO,CAAC,sBAAsB;cAMd,oBAAoB,CAClC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GACrD,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;cAmBtB,mBAAmB,CACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GACrD,OAAO,CAAC,mBAAmB,CAAC;IAgB/B,SAAS,CAAC,qBAAqB,CAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GACrD,MAAM,GAAG,SAAS;IAOrB,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,MAAM;CAK9F"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BearerAuthStrategyBase } from "@cesteral/shared";
|
|
2
|
+
import { extractHeader } from "@cesteral/shared";
|
|
3
|
+
import { AmazonDspAccessTokenAdapter, AmazonDspRefreshTokenAdapter, parseAmazonDspTokenFromHeaders, parseAmazonDspRefreshCredentialsFromHeaders, getAmazonDspProfileIdFromHeaders, getAmazonDspCredentialFingerprint, } from "./amazon-dsp-auth-adapter.js";
|
|
4
|
+
export class AmazonDspBearerAuthStrategy extends BearerAuthStrategyBase {
|
|
5
|
+
baseUrl;
|
|
6
|
+
authType = "amazon-dsp-bearer";
|
|
7
|
+
platformName = "AmazonDsp";
|
|
8
|
+
constructor(baseUrl, logger) {
|
|
9
|
+
super(logger);
|
|
10
|
+
this.baseUrl = baseUrl;
|
|
11
|
+
}
|
|
12
|
+
getClientIdFromHeaders(headers) {
|
|
13
|
+
return extractHeader(headers, "amazon-advertising-api-clientid");
|
|
14
|
+
}
|
|
15
|
+
async resolveRefreshBranch(headers) {
|
|
16
|
+
const refreshCreds = parseAmazonDspRefreshCredentialsFromHeaders(headers);
|
|
17
|
+
if (!refreshCreds)
|
|
18
|
+
return null;
|
|
19
|
+
const profileId = getAmazonDspProfileIdFromHeaders(headers);
|
|
20
|
+
const clientId = this.getClientIdFromHeaders(headers) ?? refreshCreds.appId;
|
|
21
|
+
const adapter = new AmazonDspRefreshTokenAdapter(refreshCreds, profileId, this.baseUrl);
|
|
22
|
+
await adapter.validate();
|
|
23
|
+
return {
|
|
24
|
+
adapter,
|
|
25
|
+
fingerprint: getAmazonDspCredentialFingerprint(refreshCreds.appId, profileId),
|
|
26
|
+
userId: adapter.userId,
|
|
27
|
+
authFlow: "refresh-token",
|
|
28
|
+
logContext: { profileId, clientId },
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
async resolveAccessBranch(headers) {
|
|
32
|
+
const token = parseAmazonDspTokenFromHeaders(headers);
|
|
33
|
+
const profileId = getAmazonDspProfileIdFromHeaders(headers);
|
|
34
|
+
const clientId = this.getClientIdFromHeaders(headers);
|
|
35
|
+
const adapter = new AmazonDspAccessTokenAdapter(token, profileId, this.baseUrl, clientId);
|
|
36
|
+
await adapter.validate();
|
|
37
|
+
return {
|
|
38
|
+
adapter,
|
|
39
|
+
fingerprint: getAmazonDspCredentialFingerprint(token, profileId),
|
|
40
|
+
userId: adapter.userId,
|
|
41
|
+
authFlow: "static-token",
|
|
42
|
+
logContext: { profileId, clientId },
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
getRefreshFingerprint(headers) {
|
|
46
|
+
const refreshCreds = parseAmazonDspRefreshCredentialsFromHeaders(headers);
|
|
47
|
+
if (!refreshCreds)
|
|
48
|
+
return undefined;
|
|
49
|
+
const profileId = getAmazonDspProfileIdFromHeaders(headers);
|
|
50
|
+
return getAmazonDspCredentialFingerprint(refreshCreds.appId, profileId);
|
|
51
|
+
}
|
|
52
|
+
getTokenFingerprint(headers) {
|
|
53
|
+
const token = parseAmazonDspTokenFromHeaders(headers);
|
|
54
|
+
const profileId = getAmazonDspProfileIdFromHeaders(headers);
|
|
55
|
+
return getAmazonDspCredentialFingerprint(token, profileId);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=amazon-dsp-auth-strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amazon-dsp-auth-strategy.js","sourceRoot":"","sources":["../../src/auth/amazon-dsp-auth-strategy.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,sBAAsB,EAA4B,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,8BAA8B,EAC9B,2CAA2C,EAC3C,gCAAgC,EAChC,iCAAiC,GAClC,MAAM,8BAA8B,CAAC;AAEtC,MAAM,OAAO,2BAA4B,SAAQ,sBAAsB;IAKlD;IAJA,QAAQ,GAAG,mBAAmB,CAAC;IAC/B,YAAY,GAAG,WAAW,CAAC;IAE9C,YACmB,OAAe,EAChC,MAAe;QAEf,KAAK,CAAC,MAAM,CAAC,CAAC;QAHG,YAAO,GAAP,OAAO,CAAQ;IAIlC,CAAC;IAEO,sBAAsB,CAC5B,OAAsD;QAEtD,OAAO,aAAa,CAAC,OAAO,EAAE,iCAAiC,CAAC,CAAC;IACnE,CAAC;IAES,KAAK,CAAC,oBAAoB,CAClC,OAAsD;QAEtD,MAAM,YAAY,GAAG,2CAA2C,CAAC,OAAO,CAAC,CAAC;QAC1E,IAAI,CAAC,YAAY;YAAE,OAAO,IAAI,CAAC;QAE/B,MAAM,SAAS,GAAG,gCAAgC,CAAC,OAAO,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC;QAC5E,MAAM,OAAO,GAAG,IAAI,4BAA4B,CAAC,YAAY,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxF,MAAM,OAAO,CAAC,QAAQ,EAAE,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AAC,CAAC;QAC5D,OAAO,iCAAiC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAGA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAGA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC"}
|