diff --git a/.changeset/unified-agents-api.md b/.changeset/unified-agents-api.md new file mode 100644 index 0000000..7e9a8f9 --- /dev/null +++ b/.changeset/unified-agents-api.md @@ -0,0 +1,20 @@ +--- +"@scope3/agentic-client": major +--- + +Add unified agents API and remove salesAgents + +BREAKING CHANGE: Removed `salesAgents` resource. Use `agents` resource instead with type filtering. + +- Add unified agents resource supporting both SALES and OUTCOME agent types +- Remove deprecated salesAgents resource +- Add JWT authentication support +- Update simple-media-agent to use new agents API +- Update documentation to use 'Agent' instead of 'Sales Agent' +- Add publishConfig for npm publishing +- Update schemas from merged outcomes-agent-registration branch + +Migration guide: +- Replace `client.salesAgents.list()` with `client.agents.list({ type: 'SALES' })` +- Replace `client.salesAgents.get()` with `client.agents.get()` +- Replace `client.salesAgents.register()` with `client.agents.register({ type: 'SALES', ... })` diff --git a/README.md b/README.md index 6d5b17d..3f65007 100644 --- a/README.md +++ b/README.md @@ -108,15 +108,33 @@ await client.mediaBuys.create({ await client.mediaBuys.execute({ mediaBuyId }); ``` -### Sales Agents +### Agents ```typescript -await client.salesAgents.list(); -await client.salesAgents.register({ +// List all agents (sales and outcome) +await client.agents.list(); +await client.agents.list({ type: 'SALES' }); +await client.agents.list({ type: 'OUTCOME' }); + +// Register a new agent +await client.agents.register({ + type: 'SALES', name: '...', endpointUrl: '...', - protocol: 'A2A', + protocol: 'MCP', authenticationType: 'API_KEY', }); + +// Get agent details +await client.agents.get({ agentId: '...' }); + +// Update agent +await client.agents.update({ + agentId: '...', + name: 'Updated Name', +}); + +// Unregister agent +await client.agents.unregister({ agentId: '...' }); ``` ### Other Resources diff --git a/SIMPLE_MEDIA_AGENT.md b/SIMPLE_MEDIA_AGENT.md index 5233f2e..a6ead82 100644 --- a/SIMPLE_MEDIA_AGENT.md +++ b/SIMPLE_MEDIA_AGENT.md @@ -6,7 +6,7 @@ A basic reference implementation of a media agent using MCP (Model Context Proto This media agent exposes MCP tools that Scope3 platform calls to manage media buying: -- **get_proposed_tactics**: Fetches products from sales agents and proposes budget allocation based on floor prices +- **get_proposed_tactics**: Fetches products from registered agents and proposes budget allocation based on floor prices - **manage_tactic**: When assigned, creates media buys by allocating budget to the N cheapest products with overallocation **Protocol**: MCP (stdio) - All communication via MCP, no HTTP server needed! @@ -141,7 +141,7 @@ Scope3 Platform → MCP (stdio) → Simple Media Agent → Scope3 API The agent: 1. Receives MCP tool calls from Scope3 platform -2. Fetches products from sales agents via Scope3 API +2. Fetches products from registered agents via Scope3 API 3. Calculates budget allocation with overallocation 4. Creates media buys via Scope3 API 5. Returns results via MCP response diff --git a/TESTING.md b/TESTING.md index 4da0d65..9e8252b 100644 --- a/TESTING.md +++ b/TESTING.md @@ -4,8 +4,8 @@ You need: - Scope3 API key -- Registered sales agents in your Scope3 account -- Products available from those sales agents +- Registered agents in your Scope3 account +- Products available from those agents ## Method 1: Direct Testing (Recommended First) @@ -77,7 +77,7 @@ This opens a web UI where you can: ### manage_tactic ✅ Creates media buys with: - Sum of all budgets = original budget * 1.4 (40% overallocation) -- Each media buy has correct product ID, sales agent ID, CPM +- Each media buy has correct product ID, agent ID, CPM - Uses MediaBuyProduct structure from ADCP client - N products where daily budget >= $100 @@ -107,7 +107,7 @@ If something fails: 1. **Check logs**: The server outputs to stderr 2. **Verify API key**: Make sure it's valid and has proper permissions -3. **Check sales agents**: Run `scope3.salesAgents.list()` to verify you have agents registered +3. **Check agents**: Run `scope3.agents.list({ type: 'SALES' })` to verify you have agents registered 4. **Check products**: Run `scope3.products.discover()` to verify products are available ## Common Issues diff --git a/openapi.yaml b/openapi.yaml index b56f3ab..afc321e 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3249,13 +3249,15 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /sales-agent-get: + /agent-get: post: - operationId: sales_agent_get - summary: Get sales agent - description: Get detailed information about a specific sales agent (DSP, publisher platform). + operationId: agent_get + summary: Get agent + description: >- + Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the + agent ID. tags: - - Sales Agents + - Agents security: - bearerAuth: [] parameters: @@ -3278,9 +3280,9 @@ paths: tool: type: string enum: - - sales_agent_get + - agent_get arguments: - $ref: '#/components/schemas/GetSalesAgentInput' + $ref: '#/components/schemas/GetAgentInput' required: - tool - arguments @@ -3297,7 +3299,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/SalesAgentGet' + $ref: '#/components/schemas/AgentGet' required: - content - structuredContent @@ -3320,13 +3322,15 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /sales-agent-list: + /agent-list: post: - operationId: sales_agent_list - summary: List sales agents - description: List all registered sales agents (DSPs, publisher platforms). + operationId: agent_list + summary: List agents + description: >- + List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, + organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. tags: - - Sales Agents + - Agents security: - bearerAuth: [] parameters: @@ -3349,9 +3353,9 @@ paths: tool: type: string enum: - - sales_agent_list + - agent_list arguments: - $ref: '#/components/schemas/ListSalesAgentsInput' + $ref: '#/components/schemas/ListAgentsInput' required: - tool - arguments @@ -3368,7 +3372,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/SalesAgentList' + $ref: '#/components/schemas/AgentList' required: - content - structuredContent @@ -3391,13 +3395,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /sales-agent-register: + /agent-register: post: - operationId: sales_agent_register - summary: Register sales agent - description: Register a new sales agent (DSP, publisher platform) for media buying. + operationId: agent_register + summary: Register agent + description: Register a new agent for media buying (SALES type) or outcome optimization (OUTCOME type). tags: - - Sales Agents + - Agents security: - bearerAuth: [] parameters: @@ -3420,9 +3424,9 @@ paths: tool: type: string enum: - - sales_agent_register + - agent_register arguments: - $ref: '#/components/schemas/RegisterSalesAgentInput' + $ref: '#/components/schemas/RegisterAgentInput' required: - tool - arguments @@ -3439,7 +3443,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/SalesAgentRegister' + $ref: '#/components/schemas/AgentRegister' required: - content - structuredContent @@ -3462,13 +3466,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /sales-agent-unregister: + /agent-unregister: post: - operationId: sales_agent_unregister - summary: Unregister sales agent - description: Unregister a sales agent and disconnect it from the platform. + operationId: agent_unregister + summary: Unregister agent + description: Unregister an agent and disconnect it from the platform. Type is automatically inferred from the agent ID. tags: - - Sales Agents + - Agents security: - bearerAuth: [] parameters: @@ -3491,9 +3495,9 @@ paths: tool: type: string enum: - - sales_agent_unregister + - agent_unregister arguments: - $ref: '#/components/schemas/UnregisterSalesAgentInput' + $ref: '#/components/schemas/UnregisterAgentInput' required: - tool - arguments @@ -3510,7 +3514,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/SalesAgentUnregister' + $ref: '#/components/schemas/AgentUnregister' required: - content - structuredContent @@ -3533,13 +3537,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /sales-agent-update: + /agent-update: post: - operationId: sales_agent_update - summary: Update sales agent - description: Update sales agent configuration and credentials. + operationId: agent_update + summary: Update agent + description: Update agent configuration and credentials. Type is automatically inferred from the agent ID. tags: - - Sales Agents + - Agents security: - bearerAuth: [] parameters: @@ -3562,9 +3566,9 @@ paths: tool: type: string enum: - - sales_agent_update + - agent_update arguments: - $ref: '#/components/schemas/UpdateSalesAgentInput' + $ref: '#/components/schemas/UpdateAgentInput' required: - tool - arguments @@ -3581,7 +3585,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/SalesAgentUpdate' + $ref: '#/components/schemas/AgentUpdate' required: - content - structuredContent @@ -3604,13 +3608,16 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /sales-agent-account-list: + /sales-agent-get: post: - operationId: sales_agent_account_list - summary: List sales agent accounts - description: List all accounts (seats, advertisers) within a sales agent. + operationId: sales_agent_get + summary: Get sales agent (DEPRECATED) + description: >- + DEPRECATED: Use agent_get instead. Get detailed information about a specific sales agent (DSP, publisher + platform). tags: - - Sales Agents + - Sales Agents (Deprecated) + deprecated: true security: - bearerAuth: [] parameters: @@ -3633,9 +3640,9 @@ paths: tool: type: string enum: - - sales_agent_account_list + - sales_agent_get arguments: - $ref: '#/components/schemas/ListSalesAgentAccountsInput' + $ref: '#/components/schemas/GetSalesAgentInput' required: - tool - arguments @@ -3652,7 +3659,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/SalesAgentAccountList' + $ref: '#/components/schemas/SalesAgentGet' required: - content - structuredContent @@ -3675,13 +3682,14 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /sales-agent-account-register: + /sales-agent-list: post: - operationId: sales_agent_account_register - summary: Register sales agent account - description: Register a new account (seat, advertiser) within a sales agent. + operationId: sales_agent_list + summary: List sales agents (DEPRECATED) + description: 'DEPRECATED: Use agent_list instead. List all registered sales agents (DSPs, publisher platforms).' tags: - - Sales Agents + - Sales Agents (Deprecated) + deprecated: true security: - bearerAuth: [] parameters: @@ -3704,9 +3712,9 @@ paths: tool: type: string enum: - - sales_agent_account_register + - sales_agent_list arguments: - $ref: '#/components/schemas/RegisterSalesAgentAccountInput' + $ref: '#/components/schemas/ListSalesAgentsInput' required: - tool - arguments @@ -3723,7 +3731,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/SalesAgentAccountRegister' + $ref: '#/components/schemas/SalesAgentList' required: - content - structuredContent @@ -3746,13 +3754,14 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /sales-agent-account-unregister: + /sales-agent-register: post: - operationId: sales_agent_account_unregister - summary: Unregister sales agent account - description: Unregister an account from a sales agent. + operationId: sales_agent_register + summary: Register sales agent (DEPRECATED) + description: 'DEPRECATED: Use agent_register instead. Register a new sales agent (DSP, publisher platform) for media buying.' tags: - - Sales Agents + - Sales Agents (Deprecated) + deprecated: true security: - bearerAuth: [] parameters: @@ -3775,9 +3784,9 @@ paths: tool: type: string enum: - - sales_agent_account_unregister + - sales_agent_register arguments: - $ref: '#/components/schemas/UnregisterSalesAgentAccountInput' + $ref: '#/components/schemas/RegisterSalesAgentInput' required: - tool - arguments @@ -3794,7 +3803,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/SalesAgentAccountUnregister' + $ref: '#/components/schemas/SalesAgentRegister' required: - content - structuredContent @@ -3817,13 +3826,14 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /sales-agent-account-update: + /sales-agent-unregister: post: - operationId: sales_agent_account_update - summary: Update sales agent account - description: Update account configuration within a sales agent. + operationId: sales_agent_unregister + summary: Unregister sales agent (DEPRECATED) + description: 'DEPRECATED: Use agent_unregister instead. Unregister a sales agent and disconnect it from the platform.' tags: - - Sales Agents + - Sales Agents (Deprecated) + deprecated: true security: - bearerAuth: [] parameters: @@ -3846,9 +3856,9 @@ paths: tool: type: string enum: - - sales_agent_account_update + - sales_agent_unregister arguments: - $ref: '#/components/schemas/UpdateSalesAgentAccountInput' + $ref: '#/components/schemas/UnregisterSalesAgentInput' required: - tool - arguments @@ -3865,7 +3875,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/SalesAgentAccountUpdate' + $ref: '#/components/schemas/SalesAgentUnregister' required: - content - structuredContent @@ -3888,13 +3898,14 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /tactic-create: + /sales-agent-update: post: - operationId: tactic_create - summary: Create tactic - description: Create a new tactic defining how to achieve campaign objectives. + operationId: sales_agent_update + summary: Update sales agent (DEPRECATED) + description: 'DEPRECATED: Use agent_update instead. Update sales agent configuration and credentials.' tags: - - Tactics + - Sales Agents (Deprecated) + deprecated: true security: - bearerAuth: [] parameters: @@ -3917,9 +3928,9 @@ paths: tool: type: string enum: - - tactic_create + - sales_agent_update arguments: - $ref: '#/components/schemas/CreateTacticInput' + $ref: '#/components/schemas/UpdateSalesAgentInput' required: - tool - arguments @@ -3936,7 +3947,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/TacticCreate' + $ref: '#/components/schemas/SalesAgentUpdate' required: - content - structuredContent @@ -3959,13 +3970,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /tactic-update: + /sales-agent-account-list: post: - operationId: tactic_update - summary: Update tactic - description: Update an existing tactic with new targeting, budget, or creative requirements. + operationId: sales_agent_account_list + summary: List sales agent accounts + description: List all accounts (seats, advertisers) within a sales agent. tags: - - Tactics + - Sales Agents security: - bearerAuth: [] parameters: @@ -3988,9 +3999,9 @@ paths: tool: type: string enum: - - tactic_update + - sales_agent_account_list arguments: - $ref: '#/components/schemas/UpdateTacticInput' + $ref: '#/components/schemas/ListSalesAgentAccountsInput' required: - tool - arguments @@ -4007,7 +4018,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/TacticGetOutput' + $ref: '#/components/schemas/SalesAgentAccountList' required: - content - structuredContent @@ -4030,13 +4041,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /tactic-delete: + /sales-agent-account-register: post: - operationId: tactic_delete - summary: Delete tactic - description: Delete a tactic and all associated media buys. + operationId: sales_agent_account_register + summary: Register sales agent account + description: Register a new account (seat, advertiser) within a sales agent. tags: - - Tactics + - Sales Agents security: - bearerAuth: [] parameters: @@ -4059,9 +4070,9 @@ paths: tool: type: string enum: - - tactic_delete + - sales_agent_account_register arguments: - $ref: '#/components/schemas/DeleteTacticInput' + $ref: '#/components/schemas/RegisterSalesAgentAccountInput' required: - tool - arguments @@ -4078,7 +4089,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/TacticDelete' + $ref: '#/components/schemas/SalesAgentAccountRegister' required: - content - structuredContent @@ -4101,13 +4112,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /tactic-get: + /sales-agent-account-unregister: post: - operationId: tactic_get - summary: Get tactic - description: Get detailed information about a specific tactic. + operationId: sales_agent_account_unregister + summary: Unregister sales agent account + description: Unregister an account from a sales agent. tags: - - Tactics + - Sales Agents security: - bearerAuth: [] parameters: @@ -4130,9 +4141,9 @@ paths: tool: type: string enum: - - tactic_get + - sales_agent_account_unregister arguments: - $ref: '#/components/schemas/GetTacticInput' + $ref: '#/components/schemas/UnregisterSalesAgentAccountInput' required: - tool - arguments @@ -4149,7 +4160,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/TacticGetOutput' + $ref: '#/components/schemas/SalesAgentAccountUnregister' required: - content - structuredContent @@ -4172,13 +4183,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /tactic-list: + /sales-agent-account-update: post: - operationId: tactic_list - summary: List tactics - description: List all tactics with optional filtering by brand agent or campaign. + operationId: sales_agent_account_update + summary: Update sales agent account + description: Update account configuration within a sales agent. tags: - - Tactics + - Sales Agents security: - bearerAuth: [] parameters: @@ -4201,9 +4212,9 @@ paths: tool: type: string enum: - - tactic_list + - sales_agent_account_update arguments: - $ref: '#/components/schemas/ListTacticsInput' + $ref: '#/components/schemas/UpdateSalesAgentAccountInput' required: - tool - arguments @@ -4220,7 +4231,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/TacticList' + $ref: '#/components/schemas/SalesAgentAccountUpdate' required: - content - structuredContent @@ -4243,11 +4254,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /tactic-link-campaign: + /tactic-create: post: - operationId: tactic_link_campaign - summary: Link tactic to campaign - description: Link a tactic to a campaign. + operationId: tactic_create + summary: Create tactic + description: Create a new tactic defining how to achieve campaign objectives. tags: - Tactics security: @@ -4272,9 +4283,9 @@ paths: tool: type: string enum: - - tactic_link_campaign + - tactic_create arguments: - $ref: '#/components/schemas/LinkCampaignToTacticInput' + $ref: '#/components/schemas/CreateTacticInput' required: - tool - arguments @@ -4291,7 +4302,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/TacticLinkCampaign' + $ref: '#/components/schemas/TacticCreate' required: - content - structuredContent @@ -4314,11 +4325,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /tactic-unlink-campaign: + /tactic-update: post: - operationId: tactic_unlink_campaign - summary: Unlink tactic from campaign - description: Unlink a tactic from a campaign. + operationId: tactic_update + summary: Update tactic + description: Update an existing tactic with new targeting, budget, or creative requirements. tags: - Tactics security: @@ -4343,9 +4354,9 @@ paths: tool: type: string enum: - - tactic_unlink_campaign + - tactic_update arguments: - $ref: '#/components/schemas/UnlinkCampaignFromTacticInput' + $ref: '#/components/schemas/UpdateTacticInput' required: - tool - arguments @@ -4362,7 +4373,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/TacticUnlinkCampaign' + $ref: '#/components/schemas/TacticGetOutput' required: - content - structuredContent @@ -4385,13 +4396,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /webhook-register: + /tactic-delete: post: - operationId: webhook_register - summary: Register webhook - description: Register a webhook to receive real-time notifications about events. + operationId: tactic_delete + summary: Delete tactic + description: Delete a tactic and all associated media buys. tags: - - Webhooks + - Tactics security: - bearerAuth: [] parameters: @@ -4414,9 +4425,9 @@ paths: tool: type: string enum: - - webhook_register + - tactic_delete arguments: - $ref: '#/components/schemas/RegisterWebhookInput' + $ref: '#/components/schemas/DeleteTacticInput' required: - tool - arguments @@ -4433,7 +4444,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/WebhookRegister' + $ref: '#/components/schemas/TacticDelete' required: - content - structuredContent @@ -4456,13 +4467,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /webhook-list: + /tactic-get: post: - operationId: webhook_list - summary: List webhooks - description: List all registered webhooks. + operationId: tactic_get + summary: Get tactic + description: Get detailed information about a specific tactic. tags: - - Webhooks + - Tactics security: - bearerAuth: [] parameters: @@ -4485,9 +4496,9 @@ paths: tool: type: string enum: - - webhook_list + - tactic_get arguments: - $ref: '#/components/schemas/ListWebhooksInput' + $ref: '#/components/schemas/GetTacticInput' required: - tool - arguments @@ -4504,7 +4515,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/WebhookList' + $ref: '#/components/schemas/TacticGetOutput' required: - content - structuredContent @@ -4527,13 +4538,13 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' - /webhook-delete: + /tactic-list: post: - operationId: webhook_delete - summary: Delete webhook - description: Delete a registered webhook. + operationId: tactic_list + summary: List tactics + description: List all tactics with optional filtering by brand agent or campaign. tags: - - Webhooks + - Tactics security: - bearerAuth: [] parameters: @@ -4556,9 +4567,9 @@ paths: tool: type: string enum: - - webhook_delete + - tactic_list arguments: - $ref: '#/components/schemas/DeleteWebhookInput' + $ref: '#/components/schemas/ListTacticsInput' required: - tool - arguments @@ -4575,7 +4586,7 @@ paths: items: $ref: '#/components/schemas/MCPContent' structuredContent: - $ref: '#/components/schemas/WebhookDelete' + $ref: '#/components/schemas/TacticList' required: - content - structuredContent @@ -4598,24 +4609,379 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalError' -components: - schemas: - ListAssetsInput: - type: object - properties: - brandAgentId: - description: Optional brand agent ID to filter assets - type: integer - exclusiveMinimum: true - maximum: 9007199254740991 - ListBrandAgentsInput: - description: Parameters for listing brand agents. Authentication is automatic. - type: object - properties: - where: - description: Prisma-style where clause for filtering agents - type: object - additionalProperties: {} + /tactic-link-campaign: + post: + operationId: tactic_link_campaign + summary: Link tactic to campaign + description: Link a tactic to a campaign. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_link_campaign + arguments: + $ref: '#/components/schemas/LinkCampaignToTacticInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticLinkCampaign' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /tactic-unlink-campaign: + post: + operationId: tactic_unlink_campaign + summary: Unlink tactic from campaign + description: Unlink a tactic from a campaign. + tags: + - Tactics + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + tool: + type: string + enum: + - tactic_unlink_campaign + arguments: + $ref: '#/components/schemas/UnlinkCampaignFromTacticInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/TacticUnlinkCampaign' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /webhook-register: + post: + operationId: webhook_register + summary: Register webhook + description: Register a webhook to receive real-time notifications about events. + tags: + - Webhooks + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + tool: + type: string + enum: + - webhook_register + arguments: + $ref: '#/components/schemas/RegisterWebhookInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/WebhookRegister' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /webhook-list: + post: + operationId: webhook_list + summary: List webhooks + description: List all registered webhooks. + tags: + - Webhooks + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + tool: + type: string + enum: + - webhook_list + arguments: + $ref: '#/components/schemas/ListWebhooksInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/WebhookList' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' + /webhook-delete: + post: + operationId: webhook_delete + summary: Delete webhook + description: Delete a registered webhook. + tags: + - Webhooks + security: + - bearerAuth: [] + parameters: + - name: mcp-session-id + in: header + required: true + schema: + type: string + format: uuid + description: >- + MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a + session ID, then reuse it for all subsequent tool requests in the same session. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + tool: + type: string + enum: + - webhook_delete + arguments: + $ref: '#/components/schemas/DeleteWebhookInput' + required: + - tool + - arguments + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/MCPContent' + structuredContent: + $ref: '#/components/schemas/WebhookDelete' + required: + - content + - structuredContent + additionalProperties: false + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalError' +components: + schemas: + ListAssetsInput: + type: object + properties: + brandAgentId: + description: Optional brand agent ID to filter assets + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + ListBrandAgentsInput: + description: Parameters for listing brand agents. Authentication is automatic. + type: object + properties: + where: + description: Prisma-style where clause for filtering agents + type: object + additionalProperties: {} orderBy: description: Prisma-style orderBy clause type: object @@ -4785,6 +5151,11 @@ components: ListBrandStandardsInput: type: object properties: + brandAgentId: + description: Optional brand agent ID to filter brand standards by + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 where: description: Prisma-style where clause for filtering standards type: object @@ -4866,6 +5237,11 @@ components: ListBrandStoriesInput: type: object properties: + brandAgentId: + description: Optional brand agent ID to filter brand stories by + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 where: description: Filtering criteria type: object @@ -5183,6 +5559,9 @@ components: - CREATIVE_AGENT - PUBLISHER formatId: + description: >- + Format identifier. For ADCP sources, this should be a format ID string recognized by the target sales agent + (e.g., display_300x250, video_1920x1080). Valid formats are agent-specific. type: string mediaUrl: type: string @@ -5307,6 +5686,8 @@ components: properties: tacticId: type: number + agentId: + type: string name: type: string minLength: 1 @@ -5319,8 +5700,6 @@ components: properties: mediaProductId: type: string - salesAgentId: - type: string budgetAmount: type: number minimum: 0 @@ -5337,41 +5716,94 @@ components: type: integer minimum: -9007199254740991 maximum: 9007199254740991 + creatives: + type: array + items: + type: object + properties: + creative_id: + type: string + name: + type: string + format_id: + anyOf: + - type: string + - type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + assets: + type: object + additionalProperties: + type: object + properties: + url: + type: string + width: + type: number + height: + type: number + required: + - url + click_url: + type: string + required: + - creative_id + - name + - format_id + required: + - mediaProductId + - budgetAmount + creatives: + type: array + items: + type: object + properties: + creative_id: + type: string + name: + type: string + format_id: + anyOf: + - type: string + - type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + assets: + type: object + additionalProperties: + type: object + properties: + url: + type: string + width: + type: number + height: + type: number + required: + - url + click_url: + type: string required: - - mediaProductId - - salesAgentId - creativeIds: - type: array - items: - type: string - budget: - type: object - properties: - amount: - type: number - minimum: 0 - exclusiveMinimum: true - currency: - type: string - dailyCap: - type: number - minimum: 0 - exclusiveMinimum: true - pacing: - type: string - enum: - - asap - - even - - front_loaded - required: - - amount - - currency - - pacing + - creative_id + - name + - format_id required: - tacticId + - agentId - name - products - - budget UpdateMediaBuyInput: type: object properties: @@ -5381,25 +5813,6 @@ components: type: string description: type: string - budget: - type: object - properties: - amount: - type: number - minimum: 0 - exclusiveMinimum: true - currency: - type: string - dailyCap: - type: number - minimum: 0 - exclusiveMinimum: true - pacing: - type: string - enum: - - asap - - even - - front_loaded status: type: string enum: @@ -5414,6 +5827,20 @@ components: type: array items: type: string + packages: + type: array + items: + type: object + properties: + packageId: + type: string + creativeIds: + type: array + items: + type: string + required: + - packageId + - creativeIds required: - mediaBuyId DeleteMediaBuyInput: @@ -5537,121 +5964,410 @@ components: - video inventoryType: type: string - enum: - - premium - - run_of_site - - targeted_package - maxCpm: - type: number - minimum: 0 - exclusiveMinimum: true - minCpm: - type: number - minimum: 0 - exclusiveMinimum: true - publisherIds: - type: array - items: - type: string - salesAgentId: - type: integer - exclusiveMinimum: true - maximum: 9007199254740991 - SaveProductInput: + enum: + - premium + - run_of_site + - targeted_package + maxCpm: + type: number + minimum: 0 + exclusiveMinimum: true + minCpm: + type: number + minimum: 0 + exclusiveMinimum: true + publisherIds: + type: array + items: + type: string + agentId: + type: string + SaveProductInput: + type: object + properties: + productId: + type: string + name: + type: string + description: + type: string + publisherId: + type: string + publisherName: + type: string + deliveryType: + type: string + enum: + - guaranteed + - non_guaranteed + inventoryType: + type: string + enum: + - premium + - run_of_site + - targeted_package + creativeFormats: + anyOf: + - type: array + items: + type: string + - type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + pricingModel: + type: string + enum: + - auction + - fixed_cpm + fixedCpm: + type: number + minimum: 0 + exclusiveMinimum: true + floorCpm: + type: number + minimum: 0 + exclusiveMinimum: true + targetCpm: + type: number + minimum: 0 + exclusiveMinimum: true + pricingOptions: + type: array + items: + type: object + additionalProperties: {} + supportedTargeting: + type: array + items: + type: string + adcpAgentId: + type: string + required: + - productId + - name + - description + - publisherId + - publisherName + - deliveryType + - inventoryType + - pricingModel + ListProductsInput: + type: object + properties: + take: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + skip: + type: integer + minimum: 0 + maximum: 9007199254740991 + SyncProductsInput: + type: object + properties: + sourceId: + type: string + required: + - sourceId + GetAgentInput: + type: object + properties: + agentId: + description: The agent ID to retrieve + type: string + required: + - agentId + ListAgentsInput: + type: object + properties: + type: + description: Filter by agent type (SALES or OUTCOME) + type: string + enum: + - SALES + - OUTCOME + status: + description: Filter by status (PENDING, ACTIVE, DISABLED) + type: string + enum: + - PENDING + - ACTIVE + - DISABLED + organizationId: + description: Filter by organization ID + type: string + relationship: + description: >- + Filter by relationship (SELF = owned by you, SCOPE3 = Scope3-provided, MARKETPLACE = third-party marketplace + agents) + type: string + enum: + - SELF + - SCOPE3 + - MARKETPLACE + name: + description: Filter by agent name (partial match) + type: string + RegisterAgentInput: + type: object + properties: + type: + description: The type of agent to register + type: string + enum: + - SALES + - OUTCOME + name: + description: Agent name + type: string + minLength: 1 + description: + description: Agent description + type: string + endpointUrl: + description: Agent endpoint URL + type: string + format: uri + protocol: + description: Protocol used by the agent (MCP or A2A) + type: string + enum: + - MCP + - A2A + authenticationType: + description: Authentication type + type: string + enum: + - API_KEY + - OAUTH + - NO_AUTH + - JWT + organizationId: + description: Organization ID + type: string + authConfig: + description: Authentication configuration object + anyOf: + - type: object + properties: + type: + type: string + enum: + - jwt + privateKey: + type: string + minLength: 1 + issuer: + type: string + minLength: 1 + subject: + type: string + minLength: 1 + keyId: + type: string + minLength: 1 + scope: + type: string + minLength: 1 + tokenEndpointUrl: + type: string + format: uri + audienceUrl: + type: string + format: uri + algorithm: + type: string + enum: + - ES256 + - RS256 + environment: + type: string + required: + - type + - privateKey + - issuer + - subject + - keyId + - scope + - tokenEndpointUrl + - audienceUrl + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - bearer + - apikey + - api_key + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - oauth + - oauth2 + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: {} + required: + - type + - name + - endpointUrl + - protocol + UnregisterAgentInput: + type: object + properties: + agentId: + description: The agent ID to unregister + type: string + required: + - agentId + UpdateAgentInput: type: object properties: - productId: + agentId: + description: The agent ID to update type: string name: + description: New agent name type: string description: + description: New agent description type: string - publisherId: - type: string - publisherName: + endpointUrl: + description: New endpoint URL type: string - deliveryType: + format: uri + protocol: + description: New protocol type: string enum: - - guaranteed - - non_guaranteed - inventoryType: + - MCP + - A2A + authenticationType: + description: New authentication type type: string enum: - - premium - - run_of_site - - targeted_package - creativeFormats: + - API_KEY + - OAUTH + - NO_AUTH + - JWT + authConfig: + description: New authentication configuration anyOf: - - type: array - items: - type: string - - type: array - items: - type: object - properties: - agent_url: - type: string - id: - type: string - required: - - agent_url - - id - pricingModel: - type: string - enum: - - auction - - fixed_cpm - fixedCpm: - type: number - minimum: 0 - exclusiveMinimum: true - floorCpm: - type: number - minimum: 0 - exclusiveMinimum: true - targetCpm: - type: number - minimum: 0 - exclusiveMinimum: true - pricingOptions: - type: array - items: - type: object - additionalProperties: {} - supportedTargeting: - type: array - items: - type: string - adcpAgentId: - type: string - required: - - productId - - name - - description - - publisherId - - publisherName - - deliveryType - - inventoryType - - pricingModel - ListProductsInput: - type: object - properties: - take: - type: integer - exclusiveMinimum: true - maximum: 9007199254740991 - skip: - type: integer - minimum: 0 - maximum: 9007199254740991 - SyncProductsInput: - type: object - properties: - sourceId: - type: string + - type: object + properties: + type: + type: string + enum: + - jwt + privateKey: + type: string + minLength: 1 + issuer: + type: string + minLength: 1 + subject: + type: string + minLength: 1 + keyId: + type: string + minLength: 1 + scope: + type: string + minLength: 1 + tokenEndpointUrl: + type: string + format: uri + audienceUrl: + type: string + format: uri + algorithm: + type: string + enum: + - ES256 + - RS256 + environment: + type: string + required: + - type + - privateKey + - issuer + - subject + - keyId + - scope + - tokenEndpointUrl + - audienceUrl + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - bearer + - apikey + - api_key + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - oauth + - oauth2 + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: {} required: - - sourceId + - agentId GetSalesAgentInput: type: object properties: @@ -5684,16 +6400,97 @@ components: - API_KEY - OAUTH - NO_AUTH + - JWT organizationId: type: string authConfig: - type: object - additionalProperties: {} + anyOf: + - type: object + properties: + type: + type: string + enum: + - jwt + privateKey: + type: string + minLength: 1 + issuer: + type: string + minLength: 1 + subject: + type: string + minLength: 1 + keyId: + type: string + minLength: 1 + scope: + type: string + minLength: 1 + tokenEndpointUrl: + type: string + format: uri + audienceUrl: + type: string + format: uri + algorithm: + type: string + enum: + - ES256 + - RS256 + environment: + type: string + required: + - type + - privateKey + - issuer + - subject + - keyId + - scope + - tokenEndpointUrl + - audienceUrl + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - bearer + - apikey + - api_key + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - oauth + - oauth2 + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: {} required: - name - endpointUrl - protocol - - authenticationType UnregisterSalesAgentInput: type: object properties: @@ -5724,9 +6521,91 @@ components: - API_KEY - OAUTH - NO_AUTH + - JWT authConfig: - type: object - additionalProperties: {} + anyOf: + - type: object + properties: + type: + type: string + enum: + - jwt + privateKey: + type: string + minLength: 1 + issuer: + type: string + minLength: 1 + subject: + type: string + minLength: 1 + keyId: + type: string + minLength: 1 + scope: + type: string + minLength: 1 + tokenEndpointUrl: + type: string + format: uri + audienceUrl: + type: string + format: uri + algorithm: + type: string + enum: + - ES256 + - RS256 + environment: + type: string + required: + - type + - privateKey + - issuer + - subject + - keyId + - scope + - tokenEndpointUrl + - audienceUrl + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - bearer + - apikey + - api_key + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - oauth + - oauth2 + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: {} required: - agentId ListSalesAgentAccountsInput: @@ -5739,15 +6618,96 @@ components: RegisterSalesAgentAccountInput: type: object properties: - salesAgentId: + agentId: type: string accountIdentifier: type: string authConfig: - type: object - additionalProperties: {} + anyOf: + - type: object + properties: + type: + type: string + enum: + - jwt + privateKey: + type: string + minLength: 1 + issuer: + type: string + minLength: 1 + subject: + type: string + minLength: 1 + keyId: + type: string + minLength: 1 + scope: + type: string + minLength: 1 + tokenEndpointUrl: + type: string + format: uri + audienceUrl: + type: string + format: uri + algorithm: + type: string + enum: + - ES256 + - RS256 + environment: + type: string + required: + - type + - privateKey + - issuer + - subject + - keyId + - scope + - tokenEndpointUrl + - audienceUrl + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - bearer + - apikey + - api_key + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: + auth: + type: object + properties: + type: + type: string + enum: + - oauth + - oauth2 + token: + type: string + minLength: 1 + required: + - type + - token + required: + - auth + - type: object + properties: {} required: - - salesAgentId + - agentId - accountIdentifier UnregisterSalesAgentAccountInput: type: object @@ -6085,6 +7045,37 @@ components: type: array items: type: string + models: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + prompt: + type: string + status: + nullable: true + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - name + - prompt + - status + - createdAt + - updatedAt createdAt: type: string format: date-time @@ -6101,12 +7092,13 @@ components: - countryCodes - channelCodes - brands + - models - createdAt - updatedAt CampaignUpdate: type: object properties: - id: + campaignId: type: string name: type: string @@ -6123,7 +7115,7 @@ components: pattern: >- ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ required: - - id + - campaignId - name - status - createdAt @@ -6162,8 +7154,190 @@ components: type: string tacticId: type: number + customerId: + type: number + name: + type: string + description: + type: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + required: + - mediaProductId + - salesAgentId + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm status: type: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks archivedAt: type: string format: date-time @@ -6182,6 +7356,9 @@ components: required: - id - tacticId + - customerId + - name + - pricing - status - createdAt - updatedAt @@ -6402,6 +7579,36 @@ components: type: array items: type: string + currentModel: + type: object + properties: + id: + type: string + name: + type: string + prompt: + type: string + status: + nullable: true + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - name + - prompt + - status + - createdAt + - updatedAt + additionalProperties: false createdAt: type: string format: date-time @@ -6478,6 +7685,40 @@ components: type: string type: type: string + languages: + type: array + items: + type: string + currentModel: + type: object + properties: + id: + type: string + name: + type: string + prompt: + type: string + status: + nullable: true + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - name + - prompt + - status + - createdAt + - updatedAt + additionalProperties: false createdAt: type: string format: date-time @@ -6493,6 +7734,7 @@ components: - name - status - type + - languages - createdAt - updatedAt additionalProperties: false @@ -6951,26 +8193,265 @@ components: - total - items additionalProperties: false - MediaProductSync: + MediaProductSync: + type: object + properties: + success: + type: boolean + productsSaved: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - success + - productsSaved + additionalProperties: false + AgentGet: + anyOf: + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + authenticationType: + type: string + description: + type: string + organizationId: + type: string + registeredBy: + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + - authenticationType + - createdAt + - updatedAt + additionalProperties: false + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + authenticationType: + type: string + description: + type: string + organizationId: + type: string + registeredBy: + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + customerAccountCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + - authenticationType + - createdAt + - updatedAt + - customerAccountCount + additionalProperties: false + AgentList: + type: object + properties: + total: + type: integer + minimum: 0 + maximum: 9007199254740991 + items: + type: array + items: + anyOf: + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + additionalProperties: false + - type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + relationship: + type: string + endpointUrl: + type: string + protocol: + type: string + customerAccountCount: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - agentId + - name + - type + - status + - relationship + - endpointUrl + - protocol + - customerAccountCount + additionalProperties: false + required: + - total + - items + additionalProperties: false + AgentRegister: + type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + endpointUrl: + type: string + required: + - agentId + - name + - type + - status + - endpointUrl + additionalProperties: false + AgentUnregister: type: object properties: success: type: boolean - productsSaved: - type: integer - minimum: 0 - maximum: 9007199254740991 + agentId: + type: string + type: + type: string + enum: + - SALES + - OUTCOME required: - success - - productsSaved + - agentId + - type + additionalProperties: false + AgentUpdate: + type: object + properties: + agentId: + type: string + name: + type: string + type: + type: string + enum: + - SALES + - OUTCOME + status: + type: string + required: + - agentId + - name + - type + - status additionalProperties: false SalesAgentGet: type: object properties: - id: - type: integer - exclusiveMinimum: true - maximum: 9007199254740991 + agentId: + type: string name: type: string status: @@ -7004,7 +8485,7 @@ components: pattern: >- ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ required: - - id + - agentId - name - status - relationship @@ -7027,10 +8508,8 @@ components: items: type: object properties: - id: - type: integer - exclusiveMinimum: true - maximum: 9007199254740991 + agentId: + type: string name: type: string status: @@ -7046,7 +8525,7 @@ components: minimum: 0 maximum: 9007199254740991 required: - - id + - agentId - name - status - relationship @@ -7061,10 +8540,8 @@ components: SalesAgentRegister: type: object properties: - id: - type: integer - exclusiveMinimum: true - maximum: 9007199254740991 + agentId: + type: string name: type: string status: @@ -7072,7 +8549,7 @@ components: endpointUrl: type: string required: - - id + - agentId - name - status - endpointUrl @@ -7082,23 +8559,23 @@ components: properties: success: type: boolean - id: + agentId: type: string required: - success - - id + - agentId additionalProperties: false SalesAgentUpdate: type: object properties: - id: + agentId: type: string name: type: string status: type: string required: - - id + - agentId - name - status additionalProperties: false @@ -7162,11 +8639,11 @@ components: properties: success: type: boolean - salesAgentId: + agentId: type: string required: - success - - salesAgentId + - agentId additionalProperties: false SalesAgentAccountUpdate: type: object @@ -7498,6 +8975,38 @@ components: type: array items: type: string + models: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + prompt: + type: string + status: + nullable: true + type: string + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - id + - name + - prompt + - status + - createdAt + - updatedAt + additionalProperties: false createdAt: type: string format: date-time @@ -7514,13 +9023,14 @@ components: - countryCodes - channelCodes - brands + - models - createdAt - updatedAt additionalProperties: false CampaignUpdateOutput: type: object properties: - id: + campaignId: type: string name: type: string @@ -7537,7 +9047,7 @@ components: pattern: >- ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ required: - - id + - campaignId - name - status - createdAt @@ -7578,8 +9088,199 @@ components: type: string tacticId: type: number + customerId: + type: number + name: + type: string + description: + type: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - mediaProductId + - salesAgentId + additionalProperties: false + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + additionalProperties: false + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm + additionalProperties: false status: type: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + additionalProperties: false + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks + additionalProperties: false archivedAt: type: string format: date-time @@ -7598,6 +9299,9 @@ components: required: - id - tacticId + - customerId + - name + - pricing - status - createdAt - updatedAt @@ -7723,7 +9427,7 @@ components: CampaignCreate: type: object properties: - id: + campaignId: type: string name: type: string @@ -7740,7 +9444,7 @@ components: pattern: >- ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ required: - - id + - campaignId - name - status - createdAt @@ -7749,7 +9453,7 @@ components: CampaignGet: type: object properties: - id: + campaignId: type: string name: type: string @@ -7766,7 +9470,7 @@ components: pattern: >- ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ required: - - id + - campaignId - name - status - createdAt @@ -7835,8 +9539,199 @@ components: type: string tacticId: type: number + customerId: + type: number + name: + type: string + description: + type: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - mediaProductId + - salesAgentId + additionalProperties: false + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + additionalProperties: false + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm + additionalProperties: false status: type: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + additionalProperties: false + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks + additionalProperties: false archivedAt: type: string format: date-time @@ -7855,6 +9750,9 @@ components: required: - id - tacticId + - customerId + - name + - pricing - status - createdAt - updatedAt @@ -7866,8 +9764,199 @@ components: type: string tacticId: type: number + customerId: + type: number + name: + type: string + description: + type: string + products: + type: array + items: + type: object + properties: + mediaProductId: + type: string + salesAgentId: + type: string + salesAgentName: + type: string + budgetAmount: + type: number + budgetCurrency: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + displayOrder: + type: number + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - mediaProductId + - salesAgentId + additionalProperties: false + packages: + type: array + items: + type: object + properties: + packageId: + type: string + productIds: + type: array + items: + type: string + impressions: + type: number + budget: + type: number + targetingOverlay: {} + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + createdAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + updatedAt: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + salesAgentId: + type: string + salesAgentName: + type: string + pricingCpm: + type: number + pricingSignalCost: + type: number + bidPrice: + type: number + pricingOptionId: + type: string + creativeFormats: + type: array + items: + type: object + properties: + agent_url: + type: string + id: + type: string + required: + - agent_url + - id + additionalProperties: false + required: + - packageId + - productIds + - impressions + - budget + - targetingOverlay + - creatives + - createdAt + - updatedAt + additionalProperties: false + creatives: + type: array + items: + type: object + properties: + creativeId: + type: string + name: + type: string + formatId: + type: string + mediaUrl: + type: string + status: + type: string + required: + - creativeId + - name + - formatId + - mediaUrl + - status + additionalProperties: false + pricing: + type: object + properties: + cpm: + type: number + signalCost: + type: number + totalCpm: + type: number + required: + - cpm + - totalCpm + additionalProperties: false status: type: string + adcp: + type: object + properties: + mediaBuyId: + type: string + status: + type: string + webhookUrl: + type: string + additionalProperties: false + performance: + type: object + properties: + impressions: + type: number + spend: + type: number + clicks: + type: number + lastUpdated: + type: string + format: date-time + pattern: >- + ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - impressions + - spend + - clicks + additionalProperties: false archivedAt: type: string format: date-time @@ -7886,6 +9975,9 @@ components: required: - id - tacticId + - customerId + - name + - pricing - status - createdAt - updatedAt diff --git a/package.json b/package.json index 2accc6e..1c0e6a3 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,9 @@ ], "author": "", "license": "MIT", + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", "url": "git+https://github.com/scope3data/agentic-client.git" diff --git a/src/__tests__/client.test.ts b/src/__tests__/client.test.ts index ebfbb48..12cb471 100644 --- a/src/__tests__/client.test.ts +++ b/src/__tests__/client.test.ts @@ -14,6 +14,7 @@ describe('Scope3AgenticClient', () => { }); it('should have all resource modules', () => { + expect(client.agents).toBeDefined(); expect(client.assets).toBeDefined(); expect(client.brandAgents).toBeDefined(); expect(client.brandStandards).toBeDefined(); @@ -21,7 +22,6 @@ describe('Scope3AgenticClient', () => { expect(client.campaigns).toBeDefined(); expect(client.channels).toBeDefined(); expect(client.creatives).toBeDefined(); - expect(client.salesAgents).toBeDefined(); expect(client.tactics).toBeDefined(); expect(client.mediaBuys).toBeDefined(); expect(client.notifications).toBeDefined(); diff --git a/src/index.ts b/src/index.ts index f52a429..2a547bf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,7 @@ export { SimpleMediaAgent } from './simple-media-agent'; export type { ClientConfig, ToolResponse, Environment } from './types'; export type { WebhookEvent, WebhookHandler, WebhookServerConfig } from './webhook-server'; +export * from './resources/agents'; export * from './resources/assets'; export * from './resources/brand-agents'; export * from './resources/brand-standards'; @@ -13,7 +14,6 @@ export * from './resources/brand-stories'; export * from './resources/campaigns'; export * from './resources/channels'; export * from './resources/creatives'; -export * from './resources/sales-agents'; export * from './resources/tactics'; export * from './resources/media-buys'; export * from './resources/notifications'; diff --git a/src/resources/agents.ts b/src/resources/agents.ts new file mode 100644 index 0000000..12d4553 --- /dev/null +++ b/src/resources/agents.ts @@ -0,0 +1,98 @@ +import { Scope3Client } from '../client'; +import { ToolResponse } from '../types'; + +export type AgentType = 'SALES' | 'OUTCOME'; +export type AgentStatus = 'PENDING' | 'ACTIVE' | 'DISABLED'; +export type AgentRelationship = 'SELF' | 'SCOPE3' | 'MARKETPLACE'; + +export interface JWTAuthConfig { + type: 'jwt'; + privateKey: string; + issuer: string; + subject: string; + keyId: string; + scope: string; + tokenEndpointUrl: string; + audienceUrl: string; + algorithm?: 'ES256' | 'RS256'; + environment?: string; +} + +export interface ApiKeyAuthConfig { + auth: { + type: 'bearer' | 'apikey' | 'api_key'; + token: string; + }; +} + +export interface OAuthAuthConfig { + auth: { + type: 'oauth' | 'oauth2'; + token: string; + }; +} + +export interface NoAuthConfig {} + +export type AgentAuthConfig = JWTAuthConfig | ApiKeyAuthConfig | OAuthAuthConfig | NoAuthConfig; + +export interface AgentListRequest { + type?: AgentType; + status?: AgentStatus; + organizationId?: string; + relationship?: AgentRelationship; + name?: string; +} + +export interface AgentGetRequest { + agentId: string; +} + +export interface AgentRegisterRequest { + type: AgentType; + name: string; + endpointUrl: string; + protocol: 'MCP' | 'A2A'; + authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; + description?: string; + organizationId?: string; + authConfig?: AgentAuthConfig; +} + +export interface AgentUpdateRequest { + agentId: string; + name?: string; + description?: string; + endpointUrl?: string; + protocol?: 'MCP' | 'A2A'; + authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; + authConfig?: AgentAuthConfig; +} + +export interface AgentUnregisterRequest { + agentId: string; +} + +export class AgentsResource { + constructor(private client: Scope3Client) {} + + async list(request?: AgentListRequest): Promise { + return this.client['callTool']('agent_list', request || {}); + } + + async get(request: AgentGetRequest): Promise { + return this.client['callTool']('agent_get', request); + } + + async register(request: AgentRegisterRequest): Promise { + return this.client['callTool']('agent_register', request); + } + + async update(request: AgentUpdateRequest): Promise { + return this.client['callTool']('agent_update', request); + } + + async unregister(request: AgentUnregisterRequest): Promise { + return this.client['callTool']('agent_unregister', request); + } +} diff --git a/src/resources/sales-agents.ts b/src/resources/sales-agents.ts deleted file mode 100644 index 7ac4bfb..0000000 --- a/src/resources/sales-agents.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Scope3Client } from '../client'; -import { ToolResponse } from '../types'; - -export interface SalesAgentAuthConfig { - apiKey?: string; - clientId?: string; - clientSecret?: string; - accessToken?: string; - refreshToken?: string; - [key: string]: string | undefined; -} - -export interface SalesAgentRegisterRequest { - name: string; - endpointUrl: string; - protocol: 'REST' | 'MCP' | 'A2A' | 'CUSTOM'; - authenticationType: 'API_KEY' | 'OAUTH' | 'NO_AUTH'; - description?: string; - organizationId?: string; - authConfig?: SalesAgentAuthConfig; -} - -export interface SalesAgentGetRequest { - salesAgentId: string; -} - -export interface SalesAgentUpdateRequest { - salesAgentId: string; - name?: string; - description?: string; - endpointUrl?: string; - protocol?: 'REST' | 'MCP' | 'A2A' | 'CUSTOM'; - authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH'; - authConfig?: SalesAgentAuthConfig; -} - -export interface SalesAgentUnregisterRequest { - salesAgentId: string; - confirm: boolean; -} - -export interface SalesAgentAccountListRequest { - salesAgentId: string; -} - -export interface SalesAgentAccountRegisterRequest { - salesAgentId: string; - accountIdentifier: string; - authConfig?: SalesAgentAuthConfig; -} - -export interface SalesAgentAccountUpdateRequest { - salesAgentId: string; - accountIdentifier: string; - authConfig: SalesAgentAuthConfig; -} - -export interface SalesAgentAccountUnregisterRequest { - salesAgentId: string; - confirm: boolean; -} - -export class SalesAgentsResource { - constructor(private client: Scope3Client) {} - - async list(): Promise { - return this.client['callTool']('sales_agent_list', {}); - } - - async get(request: SalesAgentGetRequest): Promise { - return this.client['callTool']('sales_agent_get', request); - } - - async register(request: SalesAgentRegisterRequest): Promise { - return this.client['callTool']('sales_agent_register', request); - } - - async update(request: SalesAgentUpdateRequest): Promise { - return this.client['callTool']('sales_agent_update', request); - } - - async unregister(request: SalesAgentUnregisterRequest): Promise { - return this.client['callTool']('sales_agent_unregister', request); - } - - async listAccounts(request: SalesAgentAccountListRequest): Promise { - return this.client['callTool']('sales_agent_account_list', request); - } - - async registerAccount(request: SalesAgentAccountRegisterRequest): Promise { - return this.client['callTool']('sales_agent_account_register', request); - } - - async updateAccount(request: SalesAgentAccountUpdateRequest): Promise { - return this.client['callTool']('sales_agent_account_update', request); - } - - async unregisterAccount(request: SalesAgentAccountUnregisterRequest): Promise { - return this.client['callTool']('sales_agent_account_unregister', request); - } -} diff --git a/src/sdk.ts b/src/sdk.ts index 0091073..d8b9dc9 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,5 +1,6 @@ import { Scope3Client } from './client'; import { ClientConfig } from './types'; +import { AgentsResource } from './resources/agents'; import { AssetsResource } from './resources/assets'; import { BrandAgentsResource } from './resources/brand-agents'; import { BrandStandardsResource } from './resources/brand-standards'; @@ -7,13 +8,13 @@ import { BrandStoriesResource } from './resources/brand-stories'; import { CampaignsResource } from './resources/campaigns'; import { ChannelsResource } from './resources/channels'; import { CreativesResource } from './resources/creatives'; -import { SalesAgentsResource } from './resources/sales-agents'; import { TacticsResource } from './resources/tactics'; import { MediaBuysResource } from './resources/media-buys'; import { NotificationsResource } from './resources/notifications'; import { ProductsResource } from './resources/products'; export class Scope3AgenticClient extends Scope3Client { + public readonly agents: AgentsResource; public readonly assets: AssetsResource; public readonly brandAgents: BrandAgentsResource; public readonly brandStandards: BrandStandardsResource; @@ -21,7 +22,6 @@ export class Scope3AgenticClient extends Scope3Client { public readonly campaigns: CampaignsResource; public readonly channels: ChannelsResource; public readonly creatives: CreativesResource; - public readonly salesAgents: SalesAgentsResource; public readonly tactics: TacticsResource; public readonly mediaBuys: MediaBuysResource; public readonly notifications: NotificationsResource; @@ -30,6 +30,7 @@ export class Scope3AgenticClient extends Scope3Client { constructor(config: ClientConfig) { super(config); + this.agents = new AgentsResource(this); this.assets = new AssetsResource(this); this.brandAgents = new BrandAgentsResource(this); this.brandStandards = new BrandStandardsResource(this); @@ -37,7 +38,6 @@ export class Scope3AgenticClient extends Scope3Client { this.campaigns = new CampaignsResource(this); this.channels = new ChannelsResource(this); this.creatives = new CreativesResource(this); - this.salesAgents = new SalesAgentsResource(this); this.tactics = new TacticsResource(this); this.mediaBuys = new MediaBuysResource(this); this.notifications = new NotificationsResource(this); diff --git a/src/simple-media-agent/get-proposed-tactics.ts b/src/simple-media-agent/get-proposed-tactics.ts index 055bdad..2845081 100644 --- a/src/simple-media-agent/get-proposed-tactics.ts +++ b/src/simple-media-agent/get-proposed-tactics.ts @@ -11,15 +11,15 @@ export async function getProposedTactics( ): Promise<{ proposedTactics: ProposedTactic[] }> { const { campaignId, budgetRange } = args; - // Get all registered sales agents - const salesAgentsResponse = await scope3.salesAgents.list(); - const salesAgents = salesAgentsResponse.data || []; + // Get all registered agents (SALES type) + const agentsResponse = await scope3.agents.list({ type: 'SALES' }); + const agents = agentsResponse.data || []; - if (!Array.isArray(salesAgents)) { - throw new Error('Expected salesAgents to be an array'); + if (!Array.isArray(agents)) { + throw new Error('Expected agents to be an array'); } - // Call getProducts for each sales agent + // Call getProducts for each agent const allProducts: Array<{ id: string; salesAgentId: string; @@ -28,7 +28,7 @@ export async function getProposedTactics( name?: string; }> = []; - for (const agent of salesAgents) { + for (const agent of agents) { try { const productsResponse = await scope3.products.discover({ salesAgentId: agent.id, @@ -54,7 +54,7 @@ export async function getProposedTactics( // Fail if no products found if (allProducts.length === 0) { throw new Error( - `No products available from ${salesAgents.length} sales agents. ` + + `No products available from ${agents.length} agents. ` + 'Cannot propose tactics without available inventory.' ); } diff --git a/src/simple-media-agent/manage-tactic.ts b/src/simple-media-agent/manage-tactic.ts index ab6078a..b35252e 100644 --- a/src/simple-media-agent/manage-tactic.ts +++ b/src/simple-media-agent/manage-tactic.ts @@ -60,15 +60,15 @@ export async function manageTactic( console.log(`Managing tactic ${tacticId}`); - // Get all registered sales agents - const salesAgentsResponse = await scope3.salesAgents.list(); - const salesAgents = salesAgentsResponse.data || []; + // Get all registered agents (SALES type) + const agentsResponse = await scope3.agents.list({ type: 'SALES' }); + const agents = agentsResponse.data || []; - if (!Array.isArray(salesAgents)) { - throw new Error('Expected salesAgents to be an array'); + if (!Array.isArray(agents)) { + throw new Error('Expected agents to be an array'); } - // Get products from all sales agents + // Get products from all agents const allProducts: Array<{ id: string; salesAgentId: string; @@ -77,7 +77,7 @@ export async function manageTactic( name?: string; }> = []; - for (const agent of salesAgents) { + for (const agent of agents) { try { const productsResponse = await scope3.products.discover({ salesAgentId: agent.id, diff --git a/src/types/api.ts b/src/types/api.ts index b7f5113..dfcd654 100644 --- a/src/types/api.ts +++ b/src/types/api.ts @@ -319,38 +319,78 @@ export interface paths { */ post: operations['media_product_sync']; }; + '/agent-get': { + /** + * Get agent + * @description Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the agent ID. + */ + post: operations['agent_get']; + }; + '/agent-list': { + /** + * List agents + * @description List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + */ + post: operations['agent_list']; + }; + '/agent-register': { + /** + * Register agent + * @description Register a new agent for media buying (SALES type) or outcome optimization (OUTCOME type). + */ + post: operations['agent_register']; + }; + '/agent-unregister': { + /** + * Unregister agent + * @description Unregister an agent and disconnect it from the platform. Type is automatically inferred from the agent ID. + */ + post: operations['agent_unregister']; + }; + '/agent-update': { + /** + * Update agent + * @description Update agent configuration and credentials. Type is automatically inferred from the agent ID. + */ + post: operations['agent_update']; + }; '/sales-agent-get': { /** - * Get sales agent - * @description Get detailed information about a specific sales agent (DSP, publisher platform). + * Get sales agent (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_get instead. Get detailed information about a specific sales agent (DSP, publisher platform). */ post: operations['sales_agent_get']; }; '/sales-agent-list': { /** - * List sales agents - * @description List all registered sales agents (DSPs, publisher platforms). + * List sales agents (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_list instead. List all registered sales agents (DSPs, publisher platforms). */ post: operations['sales_agent_list']; }; '/sales-agent-register': { /** - * Register sales agent - * @description Register a new sales agent (DSP, publisher platform) for media buying. + * Register sales agent (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_register instead. Register a new sales agent (DSP, publisher platform) for media buying. */ post: operations['sales_agent_register']; }; '/sales-agent-unregister': { /** - * Unregister sales agent - * @description Unregister a sales agent and disconnect it from the platform. + * Unregister sales agent (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_unregister instead. Unregister a sales agent and disconnect it from the platform. */ post: operations['sales_agent_unregister']; }; '/sales-agent-update': { /** - * Update sales agent - * @description Update sales agent configuration and credentials. + * Update sales agent (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_update instead. Update sales agent configuration and credentials. */ post: operations['sales_agent_update']; }; @@ -572,6 +612,8 @@ export interface components { brandStandardId: string; }; ListBrandStandardsInput: { + /** @description Optional brand agent ID to filter brand standards by */ + brandAgentId?: number; /** @description Prisma-style where clause for filtering standards */ where?: { [key: string]: unknown; @@ -612,6 +654,8 @@ export interface components { brandStoryId: string; }; ListBrandStoriesInput: { + /** @description Optional brand agent ID to filter brand stories by */ + brandAgentId?: number; /** @description Filtering criteria */ where?: { [key: string]: unknown; @@ -791,6 +835,7 @@ export interface components { description?: string; /** @enum {string} */ formatSource?: 'ADCP' | 'CREATIVE_AGENT' | 'PUBLISHER'; + /** @description Format identifier. For ADCP sources, this should be a format ID string recognized by the target sales agent (e.g., display_300x250, video_1920x1080). Valid formats are agent-specific. */ formatId?: string; mediaUrl?: string; /** @description Optional: Upload assets inline with the creative. Each asset requires: name, contentType, data (base64), and assetType. */ @@ -846,37 +891,58 @@ export interface components { }; CreateMediaBuyInput: { tacticId: number; + agentId: string; name: string; description?: string; products: { mediaProductId: string; - salesAgentId: string; - budgetAmount?: number; + budgetAmount: number; budgetCurrency?: string; pricingCpm?: number; pricingSignalCost?: number; displayOrder?: number; + creatives?: { + creative_id: string; + name: string; + format_id: + | string + | { + agent_url: string; + id: string; + }; + assets?: { + [key: string]: { + url: string; + width?: number; + height?: number; + }; + }; + click_url?: string; + }[]; + }[]; + creatives?: { + creative_id: string; + name: string; + format_id: + | string + | { + agent_url: string; + id: string; + }; + assets?: { + [key: string]: { + url: string; + width?: number; + height?: number; + }; + }; + click_url?: string; }[]; - creativeIds?: string[]; - budget: { - amount: number; - currency: string; - dailyCap?: number; - /** @enum {string} */ - pacing: 'asap' | 'even' | 'front_loaded'; - }; }; UpdateMediaBuyInput: { mediaBuyId: string; name?: string; description?: string; - budget?: { - amount?: number; - currency?: string; - dailyCap?: number; - /** @enum {string} */ - pacing?: 'asap' | 'even' | 'front_loaded'; - }; /** @enum {string} */ status?: | 'DRAFT' @@ -887,6 +953,10 @@ export interface components { | 'FAILED' | 'REJECTED'; creativeIds?: string[]; + packages?: { + packageId: string; + creativeIds: string[]; + }[]; }; DeleteMediaBuyInput: { mediaBuyId: string; @@ -944,7 +1014,7 @@ export interface components { maxCpm?: number; minCpm?: number; publisherIds?: string[]; - salesAgentId?: number; + agentId?: string; }; SaveProductInput: { productId: string; @@ -980,6 +1050,152 @@ export interface components { SyncProductsInput: { sourceId: string; }; + GetAgentInput: { + /** @description The agent ID to retrieve */ + agentId: string; + }; + ListAgentsInput: { + /** + * @description Filter by agent type (SALES or OUTCOME) + * @enum {string} + */ + type?: 'SALES' | 'OUTCOME'; + /** + * @description Filter by status (PENDING, ACTIVE, DISABLED) + * @enum {string} + */ + status?: 'PENDING' | 'ACTIVE' | 'DISABLED'; + /** @description Filter by organization ID */ + organizationId?: string; + /** + * @description Filter by relationship (SELF = owned by you, SCOPE3 = Scope3-provided, MARKETPLACE = third-party marketplace agents) + * @enum {string} + */ + relationship?: 'SELF' | 'SCOPE3' | 'MARKETPLACE'; + /** @description Filter by agent name (partial match) */ + name?: string; + }; + RegisterAgentInput: { + /** + * @description The type of agent to register + * @enum {string} + */ + type: 'SALES' | 'OUTCOME'; + /** @description Agent name */ + name: string; + /** @description Agent description */ + description?: string; + /** + * Format: uri + * @description Agent endpoint URL + */ + endpointUrl: string; + /** + * @description Protocol used by the agent (MCP or A2A) + * @enum {string} + */ + protocol: 'MCP' | 'A2A'; + /** + * @description Authentication type + * @enum {string} + */ + authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; + /** @description Organization ID */ + organizationId?: string; + /** @description Authentication configuration object */ + authConfig?: + | { + /** @enum {string} */ + type: 'jwt'; + privateKey: string; + issuer: string; + subject: string; + keyId: string; + scope: string; + /** Format: uri */ + tokenEndpointUrl: string; + /** Format: uri */ + audienceUrl: string; + /** @enum {string} */ + algorithm?: 'ES256' | 'RS256'; + environment?: string; + } + | { + auth: { + /** @enum {string} */ + type: 'bearer' | 'apikey' | 'api_key'; + token: string; + }; + } + | { + auth: { + /** @enum {string} */ + type: 'oauth' | 'oauth2'; + token: string; + }; + } + | Record; + }; + UnregisterAgentInput: { + /** @description The agent ID to unregister */ + agentId: string; + }; + UpdateAgentInput: { + /** @description The agent ID to update */ + agentId: string; + /** @description New agent name */ + name?: string; + /** @description New agent description */ + description?: string; + /** + * Format: uri + * @description New endpoint URL + */ + endpointUrl?: string; + /** + * @description New protocol + * @enum {string} + */ + protocol?: 'MCP' | 'A2A'; + /** + * @description New authentication type + * @enum {string} + */ + authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; + /** @description New authentication configuration */ + authConfig?: + | { + /** @enum {string} */ + type: 'jwt'; + privateKey: string; + issuer: string; + subject: string; + keyId: string; + scope: string; + /** Format: uri */ + tokenEndpointUrl: string; + /** Format: uri */ + audienceUrl: string; + /** @enum {string} */ + algorithm?: 'ES256' | 'RS256'; + environment?: string; + } + | { + auth: { + /** @enum {string} */ + type: 'bearer' | 'apikey' | 'api_key'; + token: string; + }; + } + | { + auth: { + /** @enum {string} */ + type: 'oauth' | 'oauth2'; + token: string; + }; + } + | Record; + }; GetSalesAgentInput: { agentId: string; }; @@ -992,11 +1208,40 @@ export interface components { /** @enum {string} */ protocol: 'MCP' | 'A2A'; /** @enum {string} */ - authenticationType: 'API_KEY' | 'OAUTH' | 'NO_AUTH'; + authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; organizationId?: string; - authConfig?: { - [key: string]: unknown; - }; + authConfig?: + | { + /** @enum {string} */ + type: 'jwt'; + privateKey: string; + issuer: string; + subject: string; + keyId: string; + scope: string; + /** Format: uri */ + tokenEndpointUrl: string; + /** Format: uri */ + audienceUrl: string; + /** @enum {string} */ + algorithm?: 'ES256' | 'RS256'; + environment?: string; + } + | { + auth: { + /** @enum {string} */ + type: 'bearer' | 'apikey' | 'api_key'; + token: string; + }; + } + | { + auth: { + /** @enum {string} */ + type: 'oauth' | 'oauth2'; + token: string; + }; + } + | Record; }; UnregisterSalesAgentInput: { agentId: string; @@ -1010,20 +1255,78 @@ export interface components { /** @enum {string} */ protocol?: 'MCP' | 'A2A'; /** @enum {string} */ - authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH'; - authConfig?: { - [key: string]: unknown; - }; + authenticationType?: 'API_KEY' | 'OAUTH' | 'NO_AUTH' | 'JWT'; + authConfig?: + | { + /** @enum {string} */ + type: 'jwt'; + privateKey: string; + issuer: string; + subject: string; + keyId: string; + scope: string; + /** Format: uri */ + tokenEndpointUrl: string; + /** Format: uri */ + audienceUrl: string; + /** @enum {string} */ + algorithm?: 'ES256' | 'RS256'; + environment?: string; + } + | { + auth: { + /** @enum {string} */ + type: 'bearer' | 'apikey' | 'api_key'; + token: string; + }; + } + | { + auth: { + /** @enum {string} */ + type: 'oauth' | 'oauth2'; + token: string; + }; + } + | Record; }; ListSalesAgentAccountsInput: { agentId: string; }; RegisterSalesAgentAccountInput: { - salesAgentId: string; + agentId: string; accountIdentifier: string; - authConfig?: { - [key: string]: unknown; - }; + authConfig?: + | { + /** @enum {string} */ + type: 'jwt'; + privateKey: string; + issuer: string; + subject: string; + keyId: string; + scope: string; + /** Format: uri */ + tokenEndpointUrl: string; + /** Format: uri */ + audienceUrl: string; + /** @enum {string} */ + algorithm?: 'ES256' | 'RS256'; + environment?: string; + } + | { + auth: { + /** @enum {string} */ + type: 'bearer' | 'apikey' | 'api_key'; + token: string; + }; + } + | { + auth: { + /** @enum {string} */ + type: 'oauth' | 'oauth2'; + token: string; + }; + } + | Record; }; UnregisterSalesAgentAccountInput: { accountId: string; @@ -1144,13 +1447,23 @@ export interface components { countryCodes: string[]; channelCodes: string[]; brands: string[]; + models: { + id: string; + name: string; + prompt: string; + status: string | null; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + }[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ updatedAt: string; }; CampaignUpdate: { - id: string; + campaignId: string; name: string; status: string; /** Format: date-time */ @@ -1171,7 +1484,76 @@ export interface components { MediaBuyGet: { id: string; tacticId: number; + customerId: number; + name: string; + description?: string; + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; /** Format: date-time */ archivedAt?: string; /** Format: date-time */ @@ -1251,6 +1633,16 @@ export interface components { channelCodes?: string[]; languages?: string[]; brands?: string[]; + currentModel?: { + id: string; + name: string; + prompt: string; + status: string | null; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + }; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -1278,6 +1670,17 @@ export interface components { description?: string; status: string; type: string; + languages: string[]; + currentModel?: { + id: string; + name: string; + prompt: string; + status: string | null; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + }; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -1440,8 +1843,93 @@ export interface components { success: boolean; productsSaved: number; }; + AgentGet: + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + authenticationType: string; + description?: string; + organizationId?: string; + registeredBy?: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + } + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + authenticationType: string; + description?: string; + organizationId?: string; + registeredBy?: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + customerAccountCount: number; + }; + AgentList: { + total: number; + items: ( + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + } + | { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + relationship: string; + endpointUrl: string; + protocol: string; + customerAccountCount: number; + } + )[]; + }; + AgentRegister: { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + endpointUrl: string; + }; + AgentUnregister: { + success: boolean; + agentId: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + }; + AgentUpdate: { + agentId: string; + name: string; + /** @enum {string} */ + type: 'SALES' | 'OUTCOME'; + status: string; + }; SalesAgentGet: { - id: number; + agentId: string; name: string; status: string; relationship: string; @@ -1460,7 +1948,7 @@ export interface components { SalesAgentList: { total: number; items: { - id: number; + agentId: string; name: string; status: string; relationship: string; @@ -1470,17 +1958,17 @@ export interface components { }[]; }; SalesAgentRegister: { - id: number; + agentId: string; name: string; status: string; endpointUrl: string; }; SalesAgentUnregister: { success: boolean; - id: string; + agentId: string; }; SalesAgentUpdate: { - id: string; + agentId: string; name: string; status: string; }; @@ -1504,7 +1992,7 @@ export interface components { }; SalesAgentAccountUnregister: { success: boolean; - salesAgentId: string; + agentId: string; }; SalesAgentAccountUpdate: { id: string; @@ -1611,13 +2099,23 @@ export interface components { countryCodes: string[]; channelCodes: string[]; brands: string[]; + models: { + id: string; + name: string; + prompt: string; + status: string | null; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + }[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ updatedAt: string; }; CampaignUpdateOutput: { - id: string; + campaignId: string; name: string; status: string; /** Format: date-time */ @@ -1638,7 +2136,76 @@ export interface components { MediaBuyGetOutput: { id: string; tacticId: number; + customerId: number; + name: string; + description?: string; + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; /** Format: date-time */ archivedAt?: string; /** Format: date-time */ @@ -1686,7 +2253,7 @@ export interface components { updatedAt: string; }; CampaignCreate: { - id: string; + campaignId: string; name: string; status: string; /** Format: date-time */ @@ -1695,7 +2262,7 @@ export interface components { updatedAt: string; }; CampaignGet: { - id: string; + campaignId: string; name: string; status: string; /** Format: date-time */ @@ -1726,7 +2293,76 @@ export interface components { MediaBuyCreate: { id: string; tacticId: number; + customerId: number; + name: string; + description?: string; + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; /** Format: date-time */ archivedAt?: string; /** Format: date-time */ @@ -1737,7 +2373,76 @@ export interface components { MediaBuyUpdate: { id: string; tacticId: number; + customerId: number; + name: string; + description?: string; + products?: { + mediaProductId: string; + salesAgentId: string; + salesAgentName?: string; + budgetAmount?: number; + budgetCurrency?: string; + pricingCpm?: number; + pricingSignalCost?: number; + displayOrder?: number; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + packages?: { + packageId: string; + productIds: string[]; + impressions: number; + budget: number; + targetingOverlay: unknown; + creatives: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + salesAgentId?: string; + salesAgentName?: string; + pricingCpm?: number; + pricingSignalCost?: number; + bidPrice?: number; + pricingOptionId?: string; + creativeFormats?: { + agent_url: string; + id: string; + }[]; + }[]; + creatives?: { + creativeId: string; + name: string; + formatId: string; + mediaUrl: string; + status: string; + }[]; + pricing: { + cpm: number; + signalCost?: number; + totalCpm: number; + }; status: string; + adcp?: { + mediaBuyId?: string; + status?: string; + webhookUrl?: string; + }; + performance?: { + impressions: number; + spend: number; + clicks: number; + /** Format: date-time */ + lastUpdated?: string; + }; /** Format: date-time */ archivedAt?: string; /** Format: date-time */ @@ -4032,8 +4737,259 @@ export interface operations { }; }; /** - * Get sales agent - * @description Get detailed information about a specific sales agent (DSP, publisher platform). + * Get agent + * @description Get detailed information about a specific agent (SALES or OUTCOME type). Type is automatically inferred from the agent ID. + */ + agent_get: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + tool: 'agent_get'; + arguments: components['schemas']['GetAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentGet']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * List agents + * @description List all registered agents with comprehensive filtering. Supports filtering by type (SALES/OUTCOME), status, organization, relationship (SELF/SCOPE3/MARKETPLACE), and name. + */ + agent_list: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + tool: 'agent_list'; + arguments: components['schemas']['ListAgentsInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentList']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Register agent + * @description Register a new agent for media buying (SALES type) or outcome optimization (OUTCOME type). + */ + agent_register: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + tool: 'agent_register'; + arguments: components['schemas']['RegisterAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentRegister']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Unregister agent + * @description Unregister an agent and disconnect it from the platform. Type is automatically inferred from the agent ID. + */ + agent_unregister: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + tool: 'agent_unregister'; + arguments: components['schemas']['UnregisterAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentUnregister']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Update agent + * @description Update agent configuration and credentials. Type is automatically inferred from the agent ID. + */ + agent_update: { + parameters: { + header: { + /** @description MCP session identifier (UUID). Initialize your session using the /mcp-initialize endpoint first to obtain a session ID, then reuse it for all subsequent tool requests in the same session. */ + 'mcp-session-id': string; + }; + }; + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + tool: 'agent_update'; + arguments: components['schemas']['UpdateAgentInput']; + }; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + content: components['schemas']['MCPContent'][]; + structuredContent: components['schemas']['AgentUpdate']; + }; + }; + }; + /** @description Bad request */ + 400: { + content: { + 'application/json': components['schemas']['BadRequest']; + }; + }; + /** @description Unauthorized */ + 401: { + content: { + 'application/json': components['schemas']['Unauthorized']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['InternalError']; + }; + }; + }; + }; + /** + * Get sales agent (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_get instead. Get detailed information about a specific sales agent (DSP, publisher platform). */ sales_agent_get: { parameters: { @@ -4082,8 +5038,9 @@ export interface operations { }; }; /** - * List sales agents - * @description List all registered sales agents (DSPs, publisher platforms). + * List sales agents (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_list instead. List all registered sales agents (DSPs, publisher platforms). */ sales_agent_list: { parameters: { @@ -4132,8 +5089,9 @@ export interface operations { }; }; /** - * Register sales agent - * @description Register a new sales agent (DSP, publisher platform) for media buying. + * Register sales agent (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_register instead. Register a new sales agent (DSP, publisher platform) for media buying. */ sales_agent_register: { parameters: { @@ -4182,8 +5140,9 @@ export interface operations { }; }; /** - * Unregister sales agent - * @description Unregister a sales agent and disconnect it from the platform. + * Unregister sales agent (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_unregister instead. Unregister a sales agent and disconnect it from the platform. */ sales_agent_unregister: { parameters: { @@ -4232,8 +5191,9 @@ export interface operations { }; }; /** - * Update sales agent - * @description Update sales agent configuration and credentials. + * Update sales agent (DEPRECATED) + * @deprecated + * @description DEPRECATED: Use agent_update instead. Update sales agent configuration and credentials. */ sales_agent_update: { parameters: {