@adcp/sdk 8.1.0-beta.1 → 8.1.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/bin/adcp.js +75 -21
- package/dist/lib/conformance/oracle.d.ts.map +1 -1
- package/dist/lib/conformance/oracle.js +8 -1
- package/dist/lib/conformance/oracle.js.map +1 -1
- package/dist/lib/conformance/schemaArbitrary.js +135 -9
- package/dist/lib/conformance/schemaArbitrary.js.map +1 -1
- package/dist/lib/core/AgentClient.d.ts +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/AgentClient.js.map +1 -1
- package/dist/lib/core/GovernanceMiddleware.d.ts +2 -1
- package/dist/lib/core/GovernanceMiddleware.d.ts.map +1 -1
- package/dist/lib/core/GovernanceMiddleware.js +9 -2
- package/dist/lib/core/GovernanceMiddleware.js.map +1 -1
- package/dist/lib/core/ResponseValidator.js +1 -1
- package/dist/lib/core/ResponseValidator.js.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts +6 -0
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +2 -3
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/TaskExecutor.d.ts +1 -0
- package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
- package/dist/lib/core/TaskExecutor.js +14 -3
- package/dist/lib/core/TaskExecutor.js.map +1 -1
- package/dist/lib/index.d.ts +3 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +26 -11
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/media-buy/index.d.ts +1 -1
- package/dist/lib/media-buy/index.d.ts.map +1 -1
- package/dist/lib/media-buy/index.js.map +1 -1
- package/dist/lib/media-buy/types.d.ts +12 -52
- package/dist/lib/media-buy/types.d.ts.map +1 -1
- package/dist/lib/media-buy/types.js +12 -15
- package/dist/lib/media-buy/types.js.map +1 -1
- package/dist/lib/net/index.d.ts +1 -1
- package/dist/lib/net/index.d.ts.map +1 -1
- package/dist/lib/net/index.js +2 -1
- package/dist/lib/net/index.js.map +1 -1
- package/dist/lib/protocols/index.d.ts +10 -2
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +7 -6
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/schemas/index.d.ts +68 -10
- package/dist/lib/schemas/index.d.ts.map +1 -1
- package/dist/lib/schemas/index.js +57 -16
- package/dist/lib/schemas/index.js.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/create-adcp-server.d.ts +59 -53
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +62 -10
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/decisioning/account.d.ts +22 -6
- package/dist/lib/server/decisioning/account.d.ts.map +1 -1
- package/dist/lib/server/decisioning/account.js.map +1 -1
- package/dist/lib/server/decisioning/capabilities.d.ts +8 -0
- package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.d.ts +12 -11
- package/dist/lib/server/decisioning/index.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.js.map +1 -1
- package/dist/lib/server/decisioning/list-helpers.d.ts +3 -2
- package/dist/lib/server/decisioning/list-helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/list-helpers.js +0 -1
- package/dist/lib/server/decisioning/list-helpers.js.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.d.ts +8 -2
- package/dist/lib/server/decisioning/manifest-helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.js +8 -2
- package/dist/lib/server/decisioning/manifest-helpers.js.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.d.ts +3 -2
- package/dist/lib/server/decisioning/proposal/dispatch.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.js +1 -0
- package/dist/lib/server/decisioning/proposal/dispatch.js.map +1 -1
- package/dist/lib/server/decisioning/proposal/mock-manager.d.ts +3 -2
- package/dist/lib/server/decisioning/proposal/mock-manager.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/mock-manager.js.map +1 -1
- package/dist/lib/server/decisioning/proposal/types.d.ts +3 -2
- package/dist/lib/server/decisioning/proposal/types.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/types.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +14 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/audiences.d.ts +4 -1
- package/dist/lib/server/decisioning/specialisms/audiences.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +19 -7
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/campaign-governance.d.ts +9 -4
- package/dist/lib/server/decisioning/specialisms/campaign-governance.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/content-standards.d.ts +17 -8
- package/dist/lib/server/decisioning/specialisms/content-standards.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +13 -5
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative.d.ts +14 -9
- package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/lists.d.ts +21 -10
- package/dist/lib/server/decisioning/specialisms/lists.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.d.ts +27 -12
- package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/signals.d.ts +5 -2
- package/dist/lib/server/decisioning/specialisms/signals.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.d.ts +9 -4
- package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.d.ts.map +1 -1
- package/dist/lib/server/index.d.ts +2 -0
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/operational-platform.d.ts +4 -3
- package/dist/lib/server/operational-platform.d.ts.map +1 -1
- package/dist/lib/server/operational-platform.js.map +1 -1
- package/dist/lib/server/responses.d.ts +28 -27
- package/dist/lib/server/responses.d.ts.map +1 -1
- package/dist/lib/server/responses.js +96 -35
- package/dist/lib/server/responses.js.map +1 -1
- package/dist/lib/signing/types.d.ts +6 -0
- package/dist/lib/signing/types.d.ts.map +1 -1
- package/dist/lib/signing/types.js.map +1 -1
- package/dist/lib/signing/verifier.d.ts.map +1 -1
- package/dist/lib/signing/verifier.js +33 -4
- package/dist/lib/signing/verifier.js.map +1 -1
- package/dist/lib/testing/client.d.ts +5 -0
- package/dist/lib/testing/client.d.ts.map +1 -1
- package/dist/lib/testing/client.js +34 -3
- package/dist/lib/testing/client.js.map +1 -1
- package/dist/lib/testing/compliance/comply.d.ts +8 -1
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +57 -25
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/types.d.ts +2 -0
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/index.d.ts +1 -1
- package/dist/lib/testing/index.d.ts.map +1 -1
- package/dist/lib/testing/index.js +4 -1
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.js +12 -9
- package/dist/lib/testing/scenarios/media-buy.js.map +1 -1
- package/dist/lib/testing/storyboard/compliance.d.ts +11 -1
- package/dist/lib/testing/storyboard/compliance.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/compliance.js +37 -3
- package/dist/lib/testing/storyboard/compliance.js.map +1 -1
- package/dist/lib/testing/storyboard/context.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/context.js +26 -11
- package/dist/lib/testing/storyboard/context.js.map +1 -1
- package/dist/lib/testing/storyboard/index.d.ts +2 -2
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js +6 -2
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/probes.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/probes.js +3 -0
- package/dist/lib/testing/storyboard/probes.js.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.js +4 -1
- package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts +2 -0
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +357 -47
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/types.d.ts +65 -0
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/types.js.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +4 -3
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +27 -3
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/testing/types.d.ts +19 -0
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/types/activate-signal.d.ts +647 -0
- package/dist/lib/types/build-creative.d.ts +2105 -0
- package/dist/lib/types/calibrate-content.d.ts +675 -0
- package/dist/lib/types/check-governance.d.ts +619 -0
- package/dist/lib/types/comply-test-controller.d.ts +8428 -0
- package/dist/lib/types/core.generated.d.ts +547 -537
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +1 -1
- package/dist/lib/types/create-collection-list.d.ts +693 -0
- package/dist/lib/types/create-content-standards.d.ts +830 -0
- package/dist/lib/types/create-media-buy.d.ts +3374 -0
- package/dist/lib/types/create-property-list.d.ts +836 -0
- package/dist/lib/types/delete-collection-list.d.ts +497 -0
- package/dist/lib/types/delete-property-list.d.ts +497 -0
- package/dist/lib/types/get-account-financials.d.ts +624 -0
- package/dist/lib/types/get-adcp-capabilities.d.ts +2863 -0
- package/dist/lib/types/get-collection-list.d.ts +763 -0
- package/dist/lib/types/get-content-standards.d.ts +919 -0
- package/dist/lib/types/get-creative-delivery.d.ts +2219 -0
- package/dist/lib/types/get-creative-features.d.ts +1736 -0
- package/dist/lib/types/get-media-buy-artifacts.d.ts +864 -0
- package/dist/lib/types/get-media-buys.d.ts +1670 -0
- package/dist/lib/types/get-plan-audit-logs.d.ts +455 -0
- package/dist/lib/types/get-products.d.ts +4935 -0
- package/dist/lib/types/get-property-list.d.ts +874 -0
- package/dist/lib/types/get-signals.d.ts +986 -0
- package/dist/lib/types/index.d.ts +2 -0
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/lib/types/index.js +1 -0
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/inline-enums.generated.d.ts +163 -7
- package/dist/lib/types/inline-enums.generated.d.ts.map +1 -1
- package/dist/lib/types/inline-enums.generated.js +222 -9
- package/dist/lib/types/inline-enums.generated.js.map +1 -1
- package/dist/lib/types/list-accounts.d.ts +851 -0
- package/dist/lib/types/list-content-standards.d.ts +975 -0
- package/dist/lib/types/list-creative-formats.d.ts +3132 -0
- package/dist/lib/types/list-creatives.d.ts +2390 -0
- package/dist/lib/types/list-property-lists.d.ts +855 -0
- package/dist/lib/types/log-event.d.ts +373 -0
- package/dist/lib/types/per-tool-index.json +391 -0
- package/dist/lib/types/preview-creative.d.ts +1981 -0
- package/dist/lib/types/provide-performance-feedback.d.ts +218 -0
- package/dist/lib/types/report-plan-outcome.d.ts +433 -0
- package/dist/lib/types/report-usage.d.ts +579 -0
- package/dist/lib/types/schemas.generated.d.ts +146765 -128986
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +405 -437
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/server-payload-aliases.d.ts +78 -0
- package/dist/lib/types/server-payload-aliases.d.ts.map +1 -0
- package/dist/lib/types/server-payload-aliases.js +11 -0
- package/dist/lib/types/server-payload-aliases.js.map +1 -0
- package/dist/lib/types/server-payload.d.ts +39 -0
- package/dist/lib/types/server-payload.d.ts.map +1 -0
- package/dist/lib/types/server-payload.js +11 -0
- package/dist/lib/types/server-payload.js.map +1 -0
- package/dist/lib/types/si-get-offering.d.ts +259 -0
- package/dist/lib/types/si-initiate-session.d.ts +372 -0
- package/dist/lib/types/si-send-message.d.ts +300 -0
- package/dist/lib/types/si-terminate-session.d.ts +213 -0
- package/dist/lib/types/sync-accounts.d.ts +856 -0
- package/dist/lib/types/sync-audiences.d.ts +707 -0
- package/dist/lib/types/sync-catalogs.d.ts +766 -0
- package/dist/lib/types/sync-creatives.d.ts +2134 -0
- package/dist/lib/types/sync-event-sources.d.ts +665 -0
- package/dist/lib/types/sync-governance.d.ts +558 -0
- package/dist/lib/types/sync-plans.d.ts +979 -0
- package/dist/lib/types/tools.generated.d.ts +236 -188
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/types/update-collection-list.d.ts +697 -0
- package/dist/lib/types/update-content-standards.d.ts +847 -0
- package/dist/lib/types/update-media-buy.d.ts +3047 -0
- package/dist/lib/types/update-property-list.d.ts +840 -0
- package/dist/lib/types/validate-content-delivery.d.ts +722 -0
- package/dist/lib/types/validate-input.d.ts +1683 -0
- package/dist/lib/utils/adcp-version-config.d.ts +2 -0
- package/dist/lib/utils/adcp-version-config.d.ts.map +1 -1
- package/dist/lib/utils/adcp-version-config.js +42 -0
- package/dist/lib/utils/adcp-version-config.js.map +1 -1
- package/dist/lib/utils/envelope-status-compat.d.ts +24 -5
- package/dist/lib/utils/envelope-status-compat.d.ts.map +1 -1
- package/dist/lib/utils/envelope-status-compat.js +71 -5
- package/dist/lib/utils/envelope-status-compat.js.map +1 -1
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.d.ts.map +1 -1
- package/dist/lib/utils/index.js +5 -2
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/lib/utils/media-buy-status.d.ts +22 -0
- package/dist/lib/utils/media-buy-status.d.ts.map +1 -0
- package/dist/lib/utils/media-buy-status.js +55 -0
- package/dist/lib/utils/media-buy-status.js.map +1 -0
- package/dist/lib/utils/response-schemas.d.ts.map +1 -1
- package/dist/lib/utils/response-schemas.js +3 -0
- package/dist/lib/utils/response-schemas.js.map +1 -1
- package/dist/lib/utils/response-unwrapper.d.ts.map +1 -1
- package/dist/lib/utils/response-unwrapper.js +48 -6
- package/dist/lib/utils/response-unwrapper.js.map +1 -1
- package/dist/lib/utils/tool-request-schemas.d.ts +8574 -1
- package/dist/lib/utils/tool-request-schemas.d.ts.map +1 -1
- package/dist/lib/utils/tool-request-schemas.js +4 -5
- package/dist/lib/utils/tool-request-schemas.js.map +1 -1
- package/dist/lib/utils/union-errors.d.ts +13 -6
- package/dist/lib/utils/union-errors.d.ts.map +1 -1
- package/dist/lib/utils/union-errors.js +34 -7
- package/dist/lib/utils/union-errors.js.map +1 -1
- package/dist/lib/validation/schema-loader.d.ts.map +1 -1
- package/dist/lib/validation/schema-loader.js +68 -15
- package/dist/lib/validation/schema-loader.js.map +1 -1
- package/dist/lib/validation/schema-validator.js +1 -1
- package/dist/lib/validation/schema-validator.js.map +1 -1
- package/dist/lib/version.d.ts +27 -3
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +42 -3
- package/dist/lib/version.js.map +1 -1
- package/examples/error-compliant-server.ts +1 -1
- package/examples/hello_seller_adapter_guaranteed.ts +14 -10
- package/examples/hello_seller_adapter_multi_tenant.ts +27 -23
- package/examples/hello_seller_adapter_non_guaranteed.ts +16 -14
- package/examples/hello_seller_adapter_proposal_mode.ts +22 -6
- package/examples/hello_signals_adapter_marketplace.ts +34 -3
- package/package.json +17 -2
|
@@ -28,8 +28,13 @@
|
|
|
28
28
|
*/
|
|
29
29
|
import type { Account } from '../account';
|
|
30
30
|
import type { RequestContext } from '../context';
|
|
31
|
+
import type { ServerPayload } from '../../../types/server-payload';
|
|
31
32
|
import type { CheckGovernanceRequest, CheckGovernanceResponse, SyncPlansRequest, SyncPlansResponse, ReportPlanOutcomeRequest, ReportPlanOutcomeResponse, GetPlanAuditLogsRequest, GetPlanAuditLogsResponse } from '../../../types/tools.generated';
|
|
32
33
|
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
34
|
+
export type CheckGovernancePayload = ServerPayload<CheckGovernanceResponse>;
|
|
35
|
+
export type SyncPlansPayload = ServerPayload<SyncPlansResponse>;
|
|
36
|
+
export type ReportPlanOutcomePayload = ServerPayload<ReportPlanOutcomeResponse>;
|
|
37
|
+
export type GetPlanAuditLogsPayload = ServerPayload<GetPlanAuditLogsResponse>;
|
|
33
38
|
export interface CampaignGovernancePlatform<TCtxMeta = Record<string, unknown>> {
|
|
34
39
|
/**
|
|
35
40
|
* Runtime governance decision. Buyer (or seller, on the seller's behalf)
|
|
@@ -45,23 +50,23 @@ export interface CampaignGovernancePlatform<TCtxMeta = Record<string, unknown>>
|
|
|
45
50
|
* `status: 'denied'` for governance decisions that ARE the answer
|
|
46
51
|
* (the plan exists and the agent is rejecting the action).
|
|
47
52
|
*/
|
|
48
|
-
checkGovernance(req: CheckGovernanceRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
53
|
+
checkGovernance(req: CheckGovernanceRequest, ctx: Ctx<TCtxMeta>): Promise<CheckGovernancePayload>;
|
|
49
54
|
/**
|
|
50
55
|
* Plan CRUD. Buyers sync their campaign plans into the governance
|
|
51
56
|
* agent so the agent can maintain spend authority + delivery context.
|
|
52
57
|
*/
|
|
53
|
-
syncPlans(req: SyncPlansRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
58
|
+
syncPlans(req: SyncPlansRequest, ctx: Ctx<TCtxMeta>): Promise<SyncPlansPayload>;
|
|
54
59
|
/**
|
|
55
60
|
* Outcome reporting. Sellers report what actually happened (impressions
|
|
56
61
|
* delivered, spend incurred, status transitions) so the agent can
|
|
57
62
|
* calibrate future decisions.
|
|
58
63
|
*/
|
|
59
|
-
reportPlanOutcome(req: ReportPlanOutcomeRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
64
|
+
reportPlanOutcome(req: ReportPlanOutcomeRequest, ctx: Ctx<TCtxMeta>): Promise<ReportPlanOutcomePayload>;
|
|
60
65
|
/**
|
|
61
66
|
* Audit log read. Returns the chronological history of governance
|
|
62
67
|
* decisions + outcome reports for a plan.
|
|
63
68
|
*/
|
|
64
|
-
getPlanAuditLogs(req: GetPlanAuditLogsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
69
|
+
getPlanAuditLogs(req: GetPlanAuditLogsRequest, ctx: Ctx<TCtxMeta>): Promise<GetPlanAuditLogsPayload>;
|
|
65
70
|
}
|
|
66
71
|
export {};
|
|
67
72
|
//# sourceMappingURL=campaign-governance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"campaign-governance.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/campaign-governance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,gCAAgC,CAAC;AAExC,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,0BAA0B,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5E;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,GAAG,EAAE,sBAAsB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"campaign-governance.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/campaign-governance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,gCAAgC,CAAC;AAExC,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC,uBAAuB,CAAC,CAAC;AAC5E,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;AAChE,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAChF,MAAM,MAAM,uBAAuB,GAAG,aAAa,CAAC,wBAAwB,CAAC,CAAC;AAE9E,MAAM,WAAW,0BAA0B,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5E;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,GAAG,EAAE,sBAAsB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAElG;;;OAGG;IACH,SAAS,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEhF;;;;OAIG;IACH,iBAAiB,CAAC,GAAG,EAAE,wBAAwB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAExG;;;OAGG;IACH,gBAAgB,CAAC,GAAG,EAAE,uBAAuB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACtG"}
|
|
@@ -32,47 +32,56 @@
|
|
|
32
32
|
*/
|
|
33
33
|
import type { Account } from '../account';
|
|
34
34
|
import type { RequestContext } from '../context';
|
|
35
|
+
import type { ServerPayload } from '../../../types/server-payload';
|
|
35
36
|
import type { ListContentStandardsRequest, ListContentStandardsResponse, GetContentStandardsRequest, GetContentStandardsResponse, CreateContentStandardsRequest, CreateContentStandardsResponse, UpdateContentStandardsRequest, UpdateContentStandardsResponse, CalibrateContentRequest, CalibrateContentResponse, ValidateContentDeliveryRequest, ValidateContentDeliveryResponse, GetMediaBuyArtifactsRequest, GetMediaBuyArtifactsResponse, GetCreativeFeaturesRequest, GetCreativeFeaturesResponse } from '../../../types/tools.generated';
|
|
36
37
|
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
38
|
+
export type ListContentStandardsPayload = ServerPayload<ListContentStandardsResponse>;
|
|
39
|
+
export type GetContentStandardsPayload = ServerPayload<GetContentStandardsResponse>;
|
|
40
|
+
export type CreateContentStandardsPayload = ServerPayload<CreateContentStandardsResponse>;
|
|
41
|
+
export type UpdateContentStandardsPayload = ServerPayload<UpdateContentStandardsResponse>;
|
|
42
|
+
export type CalibrateContentPayload = ServerPayload<CalibrateContentResponse>;
|
|
43
|
+
export type ValidateContentDeliveryPayload = ServerPayload<ValidateContentDeliveryResponse>;
|
|
44
|
+
export type GetMediaBuyArtifactsPayload = ServerPayload<GetMediaBuyArtifactsResponse>;
|
|
45
|
+
export type GetCreativeFeaturesPayload = ServerPayload<GetCreativeFeaturesResponse>;
|
|
37
46
|
export interface ContentStandardsPlatform<TCtxMeta = Record<string, unknown>> {
|
|
38
47
|
/** Discover content standards published by this agent. */
|
|
39
|
-
listContentStandards(req: ListContentStandardsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
48
|
+
listContentStandards(req: ListContentStandardsRequest, ctx: Ctx<TCtxMeta>): Promise<ListContentStandardsPayload>;
|
|
40
49
|
/** Read a single content standard by id. */
|
|
41
|
-
getContentStandards(req: GetContentStandardsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
50
|
+
getContentStandards(req: GetContentStandardsRequest, ctx: Ctx<TCtxMeta>): Promise<GetContentStandardsPayload>;
|
|
42
51
|
/**
|
|
43
52
|
* Create a new content standard. Adopter validates the policy schema
|
|
44
53
|
* and returns the persisted record. Idempotent on the buyer's
|
|
45
54
|
* `idempotency_key`.
|
|
46
55
|
*/
|
|
47
|
-
createContentStandards(req: CreateContentStandardsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
56
|
+
createContentStandards(req: CreateContentStandardsRequest, ctx: Ctx<TCtxMeta>): Promise<CreateContentStandardsPayload>;
|
|
48
57
|
/** Update an existing content standard. */
|
|
49
|
-
updateContentStandards(req: UpdateContentStandardsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
58
|
+
updateContentStandards(req: UpdateContentStandardsRequest, ctx: Ctx<TCtxMeta>): Promise<UpdateContentStandardsPayload>;
|
|
50
59
|
/**
|
|
51
60
|
* Calibrate content against the published standards. Returns the
|
|
52
61
|
* standard's current calibration profile + any flags raised against
|
|
53
62
|
* the submitted content.
|
|
54
63
|
*/
|
|
55
|
-
calibrateContent(req: CalibrateContentRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
64
|
+
calibrateContent(req: CalibrateContentRequest, ctx: Ctx<TCtxMeta>): Promise<CalibrateContentPayload>;
|
|
56
65
|
/**
|
|
57
66
|
* Validate that a delivered media-buy / creative meets the buyer's
|
|
58
67
|
* declared content-standards. Sellers call this post-flight to confirm
|
|
59
68
|
* adjacency and policy conformance before issuing a
|
|
60
69
|
* `validate_content_delivery_artifact` to a governance agent.
|
|
61
70
|
*/
|
|
62
|
-
validateContentDelivery(req: ValidateContentDeliveryRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
71
|
+
validateContentDelivery(req: ValidateContentDeliveryRequest, ctx: Ctx<TCtxMeta>): Promise<ValidateContentDeliveryPayload>;
|
|
63
72
|
/**
|
|
64
73
|
* Read content artifacts produced during a media buy's flight (creative
|
|
65
74
|
* proofs, ad-server tags, completed log captures). Optional — adopters
|
|
66
75
|
* who don't expose artifact archival omit. Required by governance
|
|
67
76
|
* receivers running adjacency validation.
|
|
68
77
|
*/
|
|
69
|
-
getMediaBuyArtifacts?(req: GetMediaBuyArtifactsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
78
|
+
getMediaBuyArtifacts?(req: GetMediaBuyArtifactsRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuyArtifactsPayload>;
|
|
70
79
|
/**
|
|
71
80
|
* Read per-creative analyzed features (object detection, scene
|
|
72
81
|
* classification, transcript) the agent extracted during calibration.
|
|
73
82
|
* Optional — adopters without analyzer pipelines omit.
|
|
74
83
|
*/
|
|
75
|
-
getCreativeFeatures?(req: GetCreativeFeaturesRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
84
|
+
getCreativeFeatures?(req: GetCreativeFeaturesRequest, ctx: Ctx<TCtxMeta>): Promise<GetCreativeFeaturesPayload>;
|
|
76
85
|
}
|
|
77
86
|
export {};
|
|
78
87
|
//# sourceMappingURL=content-standards.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-standards.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/content-standards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,gCAAgC,CAAC;AAExC,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,wBAAwB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1E,0DAA0D;IAC1D,oBAAoB,CAAC,GAAG,EAAE,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"content-standards.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/content-standards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA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B,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAE1C,2CAA2C;IAC3C,sBAAsB,CACpB,GAAG,EAAE,6BAA6B,EAClC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GACjB,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAE1C;;;;OAIG;IACH,gBAAgB,CAAC,GAAG,EAAE,uBAAuB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAErG;;;;;OAKG;IACH,uBAAuB,CACrB,GAAG,EAAE,8BAA8B,EACnC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GACjB,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAE3C;;;;;OAKG;IACH,oBAAoB,CAAC,CAAC,GAAG,EAAE,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAElH;;;;OAIG;IACH,mBAAmB,CAAC,CAAC,GAAG,EAAE,0BAA0B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAChH"}
|
|
@@ -26,10 +26,18 @@
|
|
|
26
26
|
import type { Account, NoAccountCtx } from '../account';
|
|
27
27
|
import type { RequestContext } from '../context';
|
|
28
28
|
import type { TaskHandoff } from '../async-outcome';
|
|
29
|
+
import type { ServerPayload } from '../../../types/server-payload';
|
|
29
30
|
import type { BuildCreativeRequest, CreativeManifest, PreviewCreativeRequest, PreviewCreativeResponse, ListCreativesRequest, ListCreativesResponse, ListCreativeFormatsRequest, ListCreativeFormatsResponse, GetCreativeDeliveryRequest, GetCreativeDeliveryResponse, CreativeAsset, BuildCreativeSuccess, BuildCreativeMultiSuccess } from '../../../types/tools.generated';
|
|
30
31
|
import type { SyncCreativesRow } from './sales';
|
|
31
32
|
type Creative = CreativeAsset;
|
|
32
33
|
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
34
|
+
export type PreviewCreativePayload = ServerPayload<PreviewCreativeResponse>;
|
|
35
|
+
export type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
|
|
36
|
+
export type ListCreativesPayload = ServerPayload<ListCreativesResponse>;
|
|
37
|
+
export type GetCreativeDeliveryPayload = ServerPayload<GetCreativeDeliveryResponse>;
|
|
38
|
+
export type BuildCreativePayload = ServerPayload<BuildCreativeSuccess>;
|
|
39
|
+
export type BuildCreativeMultiPayload = ServerPayload<BuildCreativeMultiSuccess>;
|
|
40
|
+
export type BuildCreativeReturn = CreativeManifest | CreativeManifest[] | BuildCreativePayload | BuildCreativeMultiPayload;
|
|
33
41
|
export interface CreativeAdServerPlatform<TCtxMeta = Record<string, unknown>> {
|
|
34
42
|
/**
|
|
35
43
|
* Build / retrieve creative tags. Two invocation modes per the spec:
|
|
@@ -51,7 +59,7 @@ export interface CreativeAdServerPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
51
59
|
* that lands, slow tag-generation pipelines await in-request; status
|
|
52
60
|
* changes flow via `publishStatusChange`.
|
|
53
61
|
*/
|
|
54
|
-
buildCreative(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
62
|
+
buildCreative(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<BuildCreativeReturn>;
|
|
55
63
|
/**
|
|
56
64
|
* Preview-only variant — sandbox URL or inline HTML, expires. Always sync.
|
|
57
65
|
*
|
|
@@ -59,7 +67,7 @@ export interface CreativeAdServerPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
59
67
|
* does not carry an `account` field; narrow `ctx.account` before reading
|
|
60
68
|
* `ctx_metadata` / `id`. See {@link NoAccountCtx}.
|
|
61
69
|
*/
|
|
62
|
-
previewCreative(req: PreviewCreativeRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<
|
|
70
|
+
previewCreative(req: PreviewCreativeRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<PreviewCreativePayload>;
|
|
63
71
|
/**
|
|
64
72
|
* Format catalog. Optional because adopters who delegate format definitions
|
|
65
73
|
* to a separate creative agent (declared via `capabilities.creative_agents`)
|
|
@@ -67,7 +75,7 @@ export interface CreativeAdServerPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
67
75
|
*
|
|
68
76
|
* ⚠️ NO-ACCOUNT TOOL. See `previewCreative` note above.
|
|
69
77
|
*/
|
|
70
|
-
listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<
|
|
78
|
+
listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ListCreativeFormatsPayload>;
|
|
71
79
|
/**
|
|
72
80
|
* Push creatives. Return per-creative result rows (sync fast path) OR
|
|
73
81
|
* `ctx.handoffToTask(fn)` to promote to a background task (HITL —
|
|
@@ -82,7 +90,7 @@ export interface CreativeAdServerPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
82
90
|
* graph. When `req.include_pricing`, include vendor pricing options
|
|
83
91
|
* on each creative.
|
|
84
92
|
*/
|
|
85
|
-
listCreatives(req: ListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
93
|
+
listCreatives(req: ListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativesPayload>;
|
|
86
94
|
/**
|
|
87
95
|
* Per-creative delivery actuals (impressions, spend, pacing). Sync —
|
|
88
96
|
* report-running platforms with manual report cycles return the
|
|
@@ -102,7 +110,7 @@ export interface CreativeAdServerPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
102
110
|
* through and the platform owns fan-out. Sellers that can't compute
|
|
103
111
|
* cross-cuts omit them; buyers fall back to per-row values.
|
|
104
112
|
*/
|
|
105
|
-
getCreativeDelivery(filter: GetCreativeDeliveryRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
113
|
+
getCreativeDelivery(filter: GetCreativeDeliveryRequest, ctx: Ctx<TCtxMeta>): Promise<GetCreativeDeliveryPayload>;
|
|
106
114
|
}
|
|
107
115
|
export {};
|
|
108
116
|
//# sourceMappingURL=creative-ad-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creative-ad-server.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/creative-ad-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,KAAK,QAAQ,GAAG,aAAa,CAAC;AAC9B,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,wBAAwB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1E;;;;;;;;;;;;;;;;;;;OAmBG;IACH,aAAa,
|
|
1
|
+
{"version":3,"file":"creative-ad-server.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/creative-ad-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,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AE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE3F;;;;;;OAMG;IACH,eAAe,CAAC,GAAG,EAAE,sBAAsB,EAAE,GAAG,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAE3G;;;;;;OAMG;IACH,mBAAmB,CAAC,CAClB,GAAG,EAAE,0BAA0B,EAC/B,GAAG,EAAE,YAAY,CAAC,QAAQ,CAAC,GAC1B,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAIvC;;;;;;OAMG;IACH,aAAa,CAAC,CACZ,SAAS,EAAE,QAAQ,EAAE,EACrB,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GACjB,OAAO,CAAC,gBAAgB,EAAE,GAAG,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;IAEjE;;;;;OAKG;IACH,aAAa,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE5F;;;;;;;;;;;;;;;;;;OAkBG;IACH,mBAAmB,CAAC,MAAM,EAAE,0BAA0B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAClH"}
|
|
@@ -17,8 +17,15 @@
|
|
|
17
17
|
import type { Account, NoAccountCtx } from '../account';
|
|
18
18
|
import type { RequestContext } from '../context';
|
|
19
19
|
import type { TaskHandoff } from '../async-outcome';
|
|
20
|
+
import type { ServerPayload } from '../../../types/server-payload';
|
|
20
21
|
import type { CreativeAsset, CreativeManifest, BuildCreativeRequest, BuildCreativeSuccess, BuildCreativeMultiSuccess, PreviewCreativeRequest, PreviewCreativeResponse, ListCreativeFormatsRequest, ListCreativeFormatsResponse } from '../../../types/tools.generated';
|
|
21
22
|
import type { SyncCreativesRow } from './sales';
|
|
23
|
+
type Creative = CreativeAsset;
|
|
24
|
+
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
25
|
+
export type BuildCreativePayload = ServerPayload<BuildCreativeSuccess>;
|
|
26
|
+
export type BuildCreativeMultiPayload = ServerPayload<BuildCreativeMultiSuccess>;
|
|
27
|
+
export type PreviewCreativePayload = ServerPayload<PreviewCreativeResponse>;
|
|
28
|
+
export type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
|
|
22
29
|
/**
|
|
23
30
|
* Adopter return shape for `buildCreative`. Discriminated by the wire
|
|
24
31
|
* spec's Single vs Multi response arms — pick whichever matches the
|
|
@@ -32,8 +39,8 @@ import type { SyncCreativesRow } from './sales';
|
|
|
32
39
|
* `CreativeManifest[]`. Framework wraps as
|
|
33
40
|
* `{ creative_manifests: [...] }`. Use this for multi-format
|
|
34
41
|
* requests (`target_format_ids`) when you don't need rich metadata.
|
|
35
|
-
* - **Fully-shaped envelope**: return a `
|
|
36
|
-
* or `
|
|
42
|
+
* - **Fully-shaped envelope**: return a `BuildCreativePayload` (single)
|
|
43
|
+
* or `BuildCreativeMultiPayload` (multi) with `sandbox` /
|
|
37
44
|
* `expires_at` / `preview` populated. Framework passes through
|
|
38
45
|
* unchanged. Detected by the presence of `creative_manifest` (single
|
|
39
46
|
* envelope) or `creative_manifests` (multi envelope) at the top level.
|
|
@@ -44,9 +51,7 @@ import type { SyncCreativesRow } from './sales';
|
|
|
44
51
|
* multi-format request, is an adopter contract violation that surfaces
|
|
45
52
|
* as schema-validation failure on the wire response.
|
|
46
53
|
*/
|
|
47
|
-
export type BuildCreativeReturn = CreativeManifest | CreativeManifest[] |
|
|
48
|
-
type Creative = CreativeAsset;
|
|
49
|
-
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
54
|
+
export type BuildCreativeReturn = CreativeManifest | CreativeManifest[] | BuildCreativePayload | BuildCreativeMultiPayload;
|
|
50
55
|
export type { SyncCreativesRow };
|
|
51
56
|
/**
|
|
52
57
|
* Creative-builder agent. Produces creatives from buyer inputs — equally
|
|
@@ -89,8 +94,8 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
89
94
|
*
|
|
90
95
|
* Return shape is discriminated; see {@link BuildCreativeReturn}:
|
|
91
96
|
* single `CreativeManifest`, `CreativeManifest[]` for multi-format
|
|
92
|
-
* requests, OR a fully-shaped `
|
|
93
|
-
* `
|
|
97
|
+
* requests, OR a fully-shaped `BuildCreativePayload` /
|
|
98
|
+
* `BuildCreativeMultiPayload` payload when you need to set
|
|
94
99
|
* `sandbox` / `expires_at` / `preview`.
|
|
95
100
|
*/
|
|
96
101
|
buildCreative(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<BuildCreativeReturn>;
|
|
@@ -106,7 +111,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
106
111
|
* when `accounts.resolve(undefined)` returned null. Narrow before reading
|
|
107
112
|
* `ctx.account.ctx_metadata`. See {@link NoAccountCtx}.
|
|
108
113
|
*/
|
|
109
|
-
previewCreative?(req: PreviewCreativeRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<
|
|
114
|
+
previewCreative?(req: PreviewCreativeRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<PreviewCreativePayload>;
|
|
110
115
|
/**
|
|
111
116
|
* Format catalog. Buyers call `list_creative_formats` to discover the
|
|
112
117
|
* formats this agent supports. Optional because adopters who declare
|
|
@@ -130,7 +135,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
130
135
|
* claiming only creative specialisms (`creative-template`, `creative-
|
|
131
136
|
* generative`, `creative-ad-server`) without a sales platform attached.
|
|
132
137
|
*/
|
|
133
|
-
listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<
|
|
138
|
+
listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ListCreativeFormatsPayload>;
|
|
134
139
|
/**
|
|
135
140
|
* Refine a prior generation. `taskId` references a prior submission.
|
|
136
141
|
* Sync — refinement is a mutation on existing state, not a new task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creative.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/creative.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"creative.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/creative.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,gB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,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE9G;;;;;OAKG;IACH,aAAa,CAAC,CACZ,SAAS,EAAE,QAAQ,EAAE,EACrB,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GACjB,OAAO,CAAC,gBAAgB,EAAE,GAAG,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;CAClE;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,wBAAwB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAE7G;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAM/G,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC"}
|
|
@@ -27,35 +27,46 @@
|
|
|
27
27
|
*/
|
|
28
28
|
import type { Account } from '../account';
|
|
29
29
|
import type { RequestContext } from '../context';
|
|
30
|
+
import type { ServerPayload } from '../../../types/server-payload';
|
|
30
31
|
import type { CreatePropertyListRequest, CreatePropertyListResponse, UpdatePropertyListRequest, UpdatePropertyListResponse, GetPropertyListRequest, GetPropertyListResponse, ListPropertyListsRequest, ListPropertyListsResponse, DeletePropertyListRequest, DeletePropertyListResponse, CreateCollectionListRequest, CreateCollectionListResponse, UpdateCollectionListRequest, UpdateCollectionListResponse, GetCollectionListRequest, GetCollectionListResponse, ListCollectionListsRequest, ListCollectionListsResponse, DeleteCollectionListRequest, DeleteCollectionListResponse } from '../../../types/tools.generated';
|
|
31
32
|
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
33
|
+
export type CreatePropertyListPayload = ServerPayload<CreatePropertyListResponse>;
|
|
34
|
+
export type UpdatePropertyListPayload = ServerPayload<UpdatePropertyListResponse>;
|
|
35
|
+
export type GetPropertyListPayload = ServerPayload<GetPropertyListResponse>;
|
|
36
|
+
export type ListPropertyListsPayload = ServerPayload<ListPropertyListsResponse>;
|
|
37
|
+
export type DeletePropertyListPayload = ServerPayload<DeletePropertyListResponse>;
|
|
38
|
+
export type CreateCollectionListPayload = ServerPayload<CreateCollectionListResponse>;
|
|
39
|
+
export type UpdateCollectionListPayload = ServerPayload<UpdateCollectionListResponse>;
|
|
40
|
+
export type GetCollectionListPayload = ServerPayload<GetCollectionListResponse>;
|
|
41
|
+
export type ListCollectionListsPayload = ServerPayload<ListCollectionListsResponse>;
|
|
42
|
+
export type DeleteCollectionListPayload = ServerPayload<DeleteCollectionListResponse>;
|
|
32
43
|
export interface PropertyListsPlatform<TCtxMeta = Record<string, unknown>> {
|
|
33
44
|
/**
|
|
34
45
|
* Create a property list. Returns a `fetch_token` the buyer stores in
|
|
35
46
|
* their secret manager. Token is scoped to this list_id; MUST NOT be
|
|
36
47
|
* reused across lists.
|
|
37
48
|
*/
|
|
38
|
-
createPropertyList(req: CreatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
49
|
+
createPropertyList(req: CreatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<CreatePropertyListPayload>;
|
|
39
50
|
/** Patch an existing property list. */
|
|
40
|
-
updatePropertyList(req: UpdatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
51
|
+
updatePropertyList(req: UpdatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<UpdatePropertyListPayload>;
|
|
41
52
|
/** Read a property list by id. Sellers call this with the fetch_token. */
|
|
42
|
-
getPropertyList(req: GetPropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
53
|
+
getPropertyList(req: GetPropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<GetPropertyListPayload>;
|
|
43
54
|
/** Discover property lists the caller is authorized to read. */
|
|
44
|
-
listPropertyLists(req: ListPropertyListsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
55
|
+
listPropertyLists(req: ListPropertyListsRequest, ctx: Ctx<TCtxMeta>): Promise<ListPropertyListsPayload>;
|
|
45
56
|
/**
|
|
46
57
|
* Delete a property list. MUST revoke the fetch_token immediately and
|
|
47
58
|
* signal cache invalidation to sellers (reduced cache_valid_until or
|
|
48
59
|
* a list-changed webhook). Compromise-driven revocation MUST also
|
|
49
60
|
* trigger this path.
|
|
50
61
|
*/
|
|
51
|
-
deletePropertyList(req: DeletePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
62
|
+
deletePropertyList(req: DeletePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<DeletePropertyListPayload>;
|
|
52
63
|
}
|
|
53
64
|
export interface CollectionListsPlatform<TCtxMeta = Record<string, unknown>> {
|
|
54
|
-
createCollectionList(req: CreateCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
55
|
-
updateCollectionList(req: UpdateCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
56
|
-
getCollectionList(req: GetCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
57
|
-
listCollectionLists(req: ListCollectionListsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
58
|
-
deleteCollectionList(req: DeleteCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
65
|
+
createCollectionList(req: CreateCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<CreateCollectionListPayload>;
|
|
66
|
+
updateCollectionList(req: UpdateCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<UpdateCollectionListPayload>;
|
|
67
|
+
getCollectionList(req: GetCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<GetCollectionListPayload>;
|
|
68
|
+
listCollectionLists(req: ListCollectionListsRequest, ctx: Ctx<TCtxMeta>): Promise<ListCollectionListsPayload>;
|
|
69
|
+
deleteCollectionList(req: DeleteCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<DeleteCollectionListPayload>;
|
|
59
70
|
}
|
|
60
71
|
export {};
|
|
61
72
|
//# sourceMappingURL=lists.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/lists.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAC;AAExC,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,qBAAqB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvE;;;;OAIG;IACH,kBAAkB,CAAC,GAAG,EAAE,yBAAyB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/lists.ts"],"names":[],"mappings":"AAAA;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AAQ,CAAC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACxG,mBAAmB,CAAC,GAAG,EAAE,0BAA0B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC9G,oBAAoB,CAAC,GAAG,EAAE,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAClH"}
|
|
@@ -62,18 +62,33 @@
|
|
|
62
62
|
import type { Account, NoAccountCtx } from '../account';
|
|
63
63
|
import type { RequestContext } from '../context';
|
|
64
64
|
import type { TaskHandoff } from '../async-outcome';
|
|
65
|
+
import type { ServerPayload } from '../../../types/server-payload';
|
|
65
66
|
import type { GetProductsRequest, GetProductsResponse, CreateMediaBuyRequest, CreateMediaBuySuccess, UpdateMediaBuyRequest, UpdateMediaBuySuccess, GetMediaBuysRequest, GetMediaBuysResponse, GetMediaBuyDeliveryRequest, GetMediaBuyDeliveryResponse, ProvidePerformanceFeedbackRequest, ProvidePerformanceFeedbackSuccess, ListCreativeFormatsRequest, ListCreativeFormatsResponse, ListCreativesRequest, ListCreativesResponse, SyncCatalogsRequest, SyncCatalogsSuccess, LogEventRequest, LogEventSuccess, SyncEventSourcesRequest, SyncEventSourcesSuccess, SyncCreativesSuccess, CreativeAsset } from '../../../types/tools.generated';
|
|
66
67
|
type Creative = CreativeAsset;
|
|
67
68
|
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
69
|
+
export type GetProductsPayload = ServerPayload<GetProductsResponse>;
|
|
70
|
+
export type CreateMediaBuyPayload = ServerPayload<CreateMediaBuySuccess>;
|
|
71
|
+
export type UpdateMediaBuyPayload = ServerPayload<UpdateMediaBuySuccess>;
|
|
72
|
+
export type GetMediaBuyDeliveryPayload = ServerPayload<GetMediaBuyDeliveryResponse>;
|
|
73
|
+
export type GetMediaBuysPayload = ServerPayload<GetMediaBuysResponse>;
|
|
74
|
+
export type ProvidePerformanceFeedbackPayload = ServerPayload<ProvidePerformanceFeedbackSuccess>;
|
|
75
|
+
export type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
|
|
76
|
+
export type ListCreativesPayload = ServerPayload<ListCreativesResponse>;
|
|
77
|
+
export type SyncCreativesPayload = ServerPayload<SyncCreativesSuccess>;
|
|
78
|
+
export type SyncCatalogsPayload = ServerPayload<SyncCatalogsSuccess>;
|
|
79
|
+
export type LogEventPayload = ServerPayload<LogEventSuccess>;
|
|
80
|
+
export type SyncEventSourcesPayload = ServerPayload<SyncEventSourcesSuccess>;
|
|
68
81
|
/**
|
|
69
82
|
* Wire success-row shape for `sync_creatives`. Returning the array of these
|
|
70
83
|
* rows from `syncCreatives` is what adopters write — the framework wraps
|
|
71
84
|
* with `{ creatives: [...] }` to form `SyncCreativesSuccess`.
|
|
72
85
|
*/
|
|
73
86
|
export type SyncCreativesRow = SyncCreativesSuccess['creatives'][number];
|
|
87
|
+
export type CreateMediaBuyHandlerResult = CreateMediaBuyPayload | TaskHandoff<CreateMediaBuyPayload>;
|
|
88
|
+
export type SyncCreativesHandlerResult = SyncCreativesRow[] | TaskHandoff<SyncCreativesRow[]>;
|
|
74
89
|
export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
|
|
75
90
|
/** Sync catalog lookup: filters in, products out. NOT for proposal generation. */
|
|
76
|
-
getProducts?(req: GetProductsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
91
|
+
getProducts?(req: GetProductsRequest, ctx: Ctx<TCtxMeta>): Promise<GetProductsPayload>;
|
|
77
92
|
/**
|
|
78
93
|
* Create a media buy. Return the wire success-arm shape (sync fast path)
|
|
79
94
|
* OR `ctx.handoffToTask(fn)` to promote the call to a background task
|
|
@@ -120,9 +135,9 @@ export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
120
135
|
* }
|
|
121
136
|
* ```
|
|
122
137
|
*/
|
|
123
|
-
createMediaBuy?(req: CreateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
138
|
+
createMediaBuy?(req: CreateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<CreateMediaBuyHandlerResult>;
|
|
124
139
|
/** Sync update. Returns the patched buy. */
|
|
125
|
-
updateMediaBuy?(buyId: string, patch: UpdateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
140
|
+
updateMediaBuy?(buyId: string, patch: UpdateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<UpdateMediaBuyPayload>;
|
|
126
141
|
/**
|
|
127
142
|
* Push creatives. Return the array of wire success rows (sync fast
|
|
128
143
|
* path) OR `ctx.handoffToTask(fn)` to defer to a background task
|
|
@@ -147,7 +162,7 @@ export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
147
162
|
* }
|
|
148
163
|
* ```
|
|
149
164
|
*/
|
|
150
|
-
syncCreatives?(creatives: Creative[], ctx: Ctx<TCtxMeta>): Promise<
|
|
165
|
+
syncCreatives?(creatives: Creative[], ctx: Ctx<TCtxMeta>): Promise<SyncCreativesHandlerResult>;
|
|
151
166
|
/**
|
|
152
167
|
* Per-media-buy delivery actuals (impressions, spend, pacing,
|
|
153
168
|
* conversions). Sync — report-running platforms with manual report
|
|
@@ -207,7 +222,7 @@ export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
207
222
|
* defaults to `['active']` when omitted; honor the filter in your
|
|
208
223
|
* iteration.
|
|
209
224
|
*/
|
|
210
|
-
getMediaBuyDelivery?(filter: GetMediaBuyDeliveryRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
225
|
+
getMediaBuyDelivery?(filter: GetMediaBuyDeliveryRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuyDeliveryPayload>;
|
|
211
226
|
/**
|
|
212
227
|
* List media buys this account owns. Filter + pagination per the wire shape.
|
|
213
228
|
*
|
|
@@ -223,14 +238,14 @@ export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
223
238
|
* When `media_buy_ids` is omitted, return a paginated set of accessible
|
|
224
239
|
* buys filtered by `status_filter` (defaults to `['active']`).
|
|
225
240
|
*/
|
|
226
|
-
getMediaBuys?(req: GetMediaBuysRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
241
|
+
getMediaBuys?(req: GetMediaBuysRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuysPayload>;
|
|
227
242
|
/** Accept buyer-side performance signals on a media buy / creative. */
|
|
228
|
-
providePerformanceFeedback?(req: ProvidePerformanceFeedbackRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<
|
|
229
|
-
listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<
|
|
230
|
-
listCreatives?(req: ListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
231
|
-
syncCatalogs?(req: SyncCatalogsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
232
|
-
logEvent?(req: LogEventRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
233
|
-
syncEventSources?(req: SyncEventSourcesRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
243
|
+
providePerformanceFeedback?(req: ProvidePerformanceFeedbackRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ProvidePerformanceFeedbackPayload>;
|
|
244
|
+
listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ListCreativeFormatsPayload>;
|
|
245
|
+
listCreatives?(req: ListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativesPayload>;
|
|
246
|
+
syncCatalogs?(req: SyncCatalogsRequest, ctx: Ctx<TCtxMeta>): Promise<SyncCatalogsPayload>;
|
|
247
|
+
logEvent?(req: LogEventRequest, ctx: Ctx<TCtxMeta>): Promise<LogEventPayload>;
|
|
248
|
+
syncEventSources?(req: SyncEventSourcesRequest, ctx: Ctx<TCtxMeta>): Promise<SyncEventSourcesPayload>;
|
|
234
249
|
}
|
|
235
250
|
/**
|
|
236
251
|
* Names the **core sales surface** — bidding + media-buy lifecycle. Required
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sales.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/sales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,iCAAiC,EACjC,iCAAiC,EACjC,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,aAAa,EACd,MAAM,gCAAgC,CAAC;AAExC,KAAK,QAAQ,GAAG,aAAa,CAAC;AAC9B,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"sales.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/sales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,uBAAuB,CAAC,CAAC;CACvG;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,iBAAiB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,QAAQ,CAC1E,IAAI,CACF,aAAa,CAAC,QAAQ,CAAC,EACvB,aAAa,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,qBAAqB,GAAG,cAAc,CAC7F,CACF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,sBAAsB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,IAAI,CAC3E,aAAa,CAAC,QAAQ,CAAC,EACrB,eAAe,GACf,cAAc,GACd,kBAAkB,GAClB,UAAU,GACV,qBAAqB,GACrB,eAAe,GACf,4BAA4B,CAC/B,CAAC"}
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import type { Account } from '../account';
|
|
27
27
|
import type { RequestContext } from '../context';
|
|
28
|
+
import type { ServerPayload } from '../../../types/server-payload';
|
|
28
29
|
import type { GetSignalsRequest, GetSignalsResponse, ActivateSignalRequest, ActivateSignalSuccess } from '../../../types/tools.generated';
|
|
29
30
|
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
31
|
+
export type GetSignalsPayload = ServerPayload<GetSignalsResponse>;
|
|
32
|
+
export type ActivateSignalPayload = ServerPayload<ActivateSignalSuccess>;
|
|
30
33
|
export interface SignalsPlatform<TCtxMeta = Record<string, unknown>> {
|
|
31
34
|
/**
|
|
32
35
|
* Catalog discovery. Sync — query your signal index, return signals
|
|
@@ -38,7 +41,7 @@ export interface SignalsPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
38
41
|
* `'POLICY_VIOLATION'` if the buyer doesn't have rights to the data
|
|
39
42
|
* category they're requesting).
|
|
40
43
|
*/
|
|
41
|
-
getSignals(req: GetSignalsRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
44
|
+
getSignals(req: GetSignalsRequest, ctx: Ctx<TCtxMeta>): Promise<GetSignalsPayload>;
|
|
42
45
|
/**
|
|
43
46
|
* Provision a signal onto one or more destination platforms (Snap,
|
|
44
47
|
* Meta, TikTok, etc.). Returns the success-arm shape immediately with
|
|
@@ -58,7 +61,7 @@ export interface SignalsPlatform<TCtxMeta = Record<string, unknown>> {
|
|
|
58
61
|
* - `'POLICY_VIOLATION'` — buyer lacks rights to activate this data
|
|
59
62
|
* - `'INVALID_REQUEST'` — missing or unrecognized destination
|
|
60
63
|
*/
|
|
61
|
-
activateSignal(req: ActivateSignalRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
64
|
+
activateSignal(req: ActivateSignalRequest, ctx: Ctx<TCtxMeta>): Promise<ActivateSignalPayload>;
|
|
62
65
|
}
|
|
63
66
|
export {};
|
|
64
67
|
//# sourceMappingURL=signals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAExC,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,eAAe,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACjE;;;;;;;;;OASG;IACH,UAAU,CAAC,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAExC,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAC;AAClE,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAEzE,MAAM,WAAW,eAAe,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACjE;;;;;;;;;OASG;IACH,UAAU,CAAC,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEnF;;;;;;;;;;;;;;;;;;OAkBG;IACH,cAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAChG"}
|
|
@@ -49,8 +49,13 @@
|
|
|
49
49
|
*/
|
|
50
50
|
import type { Account } from '../account';
|
|
51
51
|
import type { RequestContext } from '../context';
|
|
52
|
+
import type { ServerPayload } from '../../../types/server-payload';
|
|
52
53
|
import type { SIGetOfferingRequest, SIGetOfferingResponse, SIInitiateSessionRequest, SIInitiateSessionResponse, SISendMessageRequest, SISendMessageResponse, SITerminateSessionRequest, SITerminateSessionResponse } from '../../../types/tools.generated';
|
|
53
54
|
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
55
|
+
export type SIGetOfferingPayload = ServerPayload<SIGetOfferingResponse>;
|
|
56
|
+
export type SIInitiateSessionPayload = ServerPayload<SIInitiateSessionResponse>;
|
|
57
|
+
export type SISendMessagePayload = ServerPayload<SISendMessageResponse>;
|
|
58
|
+
export type SITerminateSessionPayload = ServerPayload<SITerminateSessionResponse>;
|
|
54
59
|
export interface SponsoredIntelligencePlatform<TCtxMeta = Record<string, unknown>> {
|
|
55
60
|
/**
|
|
56
61
|
* Offering lookup. Sync — return offering metadata, availability, and
|
|
@@ -64,7 +69,7 @@ export interface SponsoredIntelligencePlatform<TCtxMeta = Record<string, unknown
|
|
|
64
69
|
* - `'EXPIRED'` — offering past its `expires_at`
|
|
65
70
|
* - `'REGION_RESTRICTED'` — offering not available in caller's region
|
|
66
71
|
*/
|
|
67
|
-
getOffering(req: SIGetOfferingRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
72
|
+
getOffering(req: SIGetOfferingRequest, ctx: Ctx<TCtxMeta>): Promise<SIGetOfferingPayload>;
|
|
68
73
|
/**
|
|
69
74
|
* Start a session. Returns `session_id` plus the brand's first response
|
|
70
75
|
* turn. The framework auto-stores the resulting session record under
|
|
@@ -83,7 +88,7 @@ export interface SponsoredIntelligencePlatform<TCtxMeta = Record<string, unknown
|
|
|
83
88
|
* - `'CAPABILITY_UNSUPPORTED'` — host advertised capabilities the
|
|
84
89
|
* brand cannot fulfill (rare; usually downgrades silently)
|
|
85
90
|
*/
|
|
86
|
-
initiateSession(req: SIInitiateSessionRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
91
|
+
initiateSession(req: SIInitiateSessionRequest, ctx: Ctx<TCtxMeta>): Promise<SIInitiateSessionPayload>;
|
|
87
92
|
/**
|
|
88
93
|
* Send a turn. A small session record is auto-attached at
|
|
89
94
|
* `req.session` from the framework's `ctx.store` keyed on
|
|
@@ -105,7 +110,7 @@ export interface SponsoredIntelligencePlatform<TCtxMeta = Record<string, unknown
|
|
|
105
110
|
* - `'SESSION_TIMEOUT'` — exceeded `session_ttl_seconds` since last
|
|
106
111
|
* turn (brand may also auto-terminate via `host_terminated`)
|
|
107
112
|
*/
|
|
108
|
-
sendMessage(req: SISendMessageRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
113
|
+
sendMessage(req: SISendMessageRequest, ctx: Ctx<TCtxMeta>): Promise<SISendMessagePayload>;
|
|
109
114
|
/**
|
|
110
115
|
* Terminate a session. Naturally idempotent — `session_id` is the
|
|
111
116
|
* dedup boundary; AdCP intentionally omits `idempotency_key` on this
|
|
@@ -119,7 +124,7 @@ export interface SponsoredIntelligencePlatform<TCtxMeta = Record<string, unknown
|
|
|
119
124
|
* Throw `AdcpError` for buyer-fixable rejection:
|
|
120
125
|
* - `'SESSION_NOT_FOUND'` — unknown `session_id`
|
|
121
126
|
*/
|
|
122
|
-
terminateSession(req: SITerminateSessionRequest, ctx: Ctx<TCtxMeta>): Promise<
|
|
127
|
+
terminateSession(req: SITerminateSessionRequest, ctx: Ctx<TCtxMeta>): Promise<SITerminateSessionPayload>;
|
|
123
128
|
}
|
|
124
129
|
export {};
|
|
125
130
|
//# sourceMappingURL=sponsored-intelligence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sponsored-intelligence.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/sponsored-intelligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,gCAAgC,CAAC;AAExC,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,6BAA6B,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/E;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"sponsored-intelligence.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/sponsored-intelligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,gCAAgC,CAAC;AAExC,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;AACxE,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAChF,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;AACxE,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC,0BAA0B,CAAC,CAAC;AAElF,MAAM,WAAW,6BAA6B,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/E;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE1F;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,CAAC,GAAG,EAAE,wBAAwB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAEtG;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE1F;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,GAAG,EAAE,yBAAyB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAC1G"}
|
|
@@ -15,6 +15,8 @@ export { defineOperationalPlatform } from './operational-platform';
|
|
|
15
15
|
export type { OperationalPlatform, OperationalContext } from './operational-platform';
|
|
16
16
|
export { pickWireSpecFields, scrubExtensions, WIRE_SPEC_FIELDS } from './wire-safe';
|
|
17
17
|
export type { WireSafe, WireSpecRequestName, ScrubExtensionsOptions } from './wire-safe';
|
|
18
|
+
export type { ServerPayload } from '../types/server-payload';
|
|
19
|
+
export type { ActivateSignalPayload, AcquireRightsAcquiredPayload, AcquireRightsPayload, AcquireRightsPendingApprovalPayload, AcquireRightsRejectedPayload, BuildCreativeMultiPayload, BuildCreativePayload, CalibrateContentPayload, CheckGovernancePayload, CreateCollectionListPayload, CreateContentStandardsPayload, CreateMediaBuyPayload, CreatePropertyListPayload, CreativeApprovalPayload, CreativeApprovedPayload, CreativePendingReviewPayload, CreativeRejectedPayload, DeleteCollectionListPayload, DeletePropertyListPayload, GetAccountFinancialsPayload, GetAccountFinancialsSuccessPayload, GetAdCPCapabilitiesPayload, GetBrandIdentityPayload, GetCollectionListPayload, GetContentStandardsPayload, GetCreativeDeliveryPayload, GetCreativeFeaturesPayload, GetMediaBuyArtifactsPayload, GetMediaBuyDeliveryPayload, GetMediaBuysPayload, GetPlanAuditLogsPayload, GetProductsPayload, GetPropertyListPayload, GetRightsPayload, GetRightsResponsePayload, GetSignalsPayload, ListAccountsPayload, ListCollectionListsPayload, ListContentStandardsPayload, ListCreativeFormatsPayload, ListCreativesPayload, ListPropertyListsPayload, LogEventPayload, PreviewCreativePayload, ProvidePerformanceFeedbackPayload, ReportPlanOutcomePayload, ReportUsagePayload, SIGetOfferingPayload, SIInitiateSessionPayload, SISendMessagePayload, SITerminateSessionPayload, SyncAccountsPayload, SyncAccountsSuccessPayload, SyncAudiencesPayload, SyncCatalogsPayload, SyncCreativesPayload, SyncEventSourcesPayload, SyncGovernancePayload, SyncGovernanceSuccessPayload, SyncPlansPayload, UpdateCollectionListPayload, UpdateContentStandardsPayload, UpdateMediaBuyPayload, UpdatePropertyListPayload, UpdateRightsPayload, ValidateContentDeliveryPayload, } from '../types/server-payload-aliases';
|
|
18
20
|
export { assertNoExampleTlds } from './example-tld-guard';
|
|
19
21
|
export type { AssertNoExampleTldsOptions } from './example-tld-guard';
|
|
20
22
|
export { capabilitiesResponse, productsResponse, mediaBuyResponse, deliveryResponse, listAccountsResponse, listCreativeFormatsResponse, updateMediaBuyResponse, getMediaBuysResponse, performanceFeedbackResponse, buildCreativeResponse, buildCreativeMultiResponse, previewCreativeResponse, creativeDeliveryResponse, listCreativesResponse, listPropertyListsResponse, listCollectionListsResponse, listContentStandardsResponse, getPlanAuditLogsResponse, syncCreativesResponse, getSignalsResponse, activateSignalResponse, cancelMediaBuyResponse, acquireRightsResponse, acquireRightsAcquired, acquireRightsPendingApproval, acquireRightsRejected, updateRightsResponse, updateRightsSuccess, creativeApprovalResponse, creativeApprovalApproved, creativeApprovalRejected, creativeApprovalPendingReview, creativeApprovalError, syncAccountsResponse, syncGovernanceResponse, reportUsageResponse, toStructuredContent, } from './responses';
|