@adcp/sdk 6.10.0 → 6.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/adcp-config.js +7 -1
- package/bin/adcp.js +191 -4
- package/dist/lib/adapters/index.d.ts +0 -2
- package/dist/lib/adapters/index.d.ts.map +1 -1
- package/dist/lib/adapters/index.js +1 -8
- package/dist/lib/adapters/index.js.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +2 -7
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/mock-server/index.d.ts +2 -0
- package/dist/lib/mock-server/index.d.ts.map +1 -1
- package/dist/lib/mock-server/index.js +17 -0
- package/dist/lib/mock-server/index.js.map +1 -1
- package/dist/lib/mock-server/sales-guaranteed/recipe.d.ts +155 -0
- package/dist/lib/mock-server/sales-guaranteed/recipe.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/recipe.js +107 -0
- package/dist/lib/mock-server/sales-guaranteed/recipe.js.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/server.d.ts.map +1 -1
- package/dist/lib/mock-server/sales-guaranteed/server.js +212 -0
- package/dist/lib/mock-server/sales-guaranteed/server.js.map +1 -1
- package/dist/lib/mock-server/sales-non-guaranteed/recipe.d.ts +123 -0
- package/dist/lib/mock-server/sales-non-guaranteed/recipe.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-non-guaranteed/recipe.js +81 -0
- package/dist/lib/mock-server/sales-non-guaranteed/recipe.js.map +1 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/ctx-metadata/index.d.ts +1 -1
- package/dist/lib/server/ctx-metadata/index.d.ts.map +1 -1
- package/dist/lib/server/ctx-metadata/index.js +3 -1
- package/dist/lib/server/ctx-metadata/index.js.map +1 -1
- package/dist/lib/server/ctx-metadata/wire-shape.d.ts +21 -0
- package/dist/lib/server/ctx-metadata/wire-shape.d.ts.map +1 -1
- package/dist/lib/server/ctx-metadata/wire-shape.js +111 -0
- package/dist/lib/server/ctx-metadata/wire-shape.js.map +1 -1
- package/dist/lib/server/decisioning/async-outcome.d.ts +17 -0
- package/dist/lib/server/decisioning/async-outcome.d.ts.map +1 -1
- package/dist/lib/server/decisioning/async-outcome.js +23 -18
- package/dist/lib/server/decisioning/async-outcome.js.map +1 -1
- package/dist/lib/server/decisioning/context.d.ts +27 -2
- package/dist/lib/server/decisioning/context.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.d.ts +4 -0
- package/dist/lib/server/decisioning/index.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.js +16 -1
- package/dist/lib/server/decisioning/index.js.map +1 -1
- package/dist/lib/server/decisioning/platform.d.ts +17 -0
- package/dist/lib/server/decisioning/platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/platform.js.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.d.ts +203 -0
- package/dist/lib/server/decisioning/proposal/dispatch.d.ts.map +1 -0
- package/dist/lib/server/decisioning/proposal/dispatch.js +395 -0
- package/dist/lib/server/decisioning/proposal/dispatch.js.map +1 -0
- package/dist/lib/server/decisioning/proposal/index.d.ts +21 -0
- package/dist/lib/server/decisioning/proposal/index.d.ts.map +1 -0
- package/dist/lib/server/decisioning/proposal/index.js +37 -0
- package/dist/lib/server/decisioning/proposal/index.js.map +1 -0
- package/dist/lib/server/decisioning/proposal/lifecycle.d.ts +195 -0
- package/dist/lib/server/decisioning/proposal/lifecycle.d.ts.map +1 -0
- package/dist/lib/server/decisioning/proposal/lifecycle.js +366 -0
- package/dist/lib/server/decisioning/proposal/lifecycle.js.map +1 -0
- package/dist/lib/server/decisioning/proposal/mock-manager.d.ts +93 -0
- package/dist/lib/server/decisioning/proposal/mock-manager.d.ts.map +1 -0
- package/dist/lib/server/decisioning/proposal/mock-manager.js +109 -0
- package/dist/lib/server/decisioning/proposal/mock-manager.js.map +1 -0
- package/dist/lib/server/decisioning/proposal/store.d.ts +279 -0
- package/dist/lib/server/decisioning/proposal/store.d.ts.map +1 -0
- package/dist/lib/server/decisioning/proposal/store.js +291 -0
- package/dist/lib/server/decisioning/proposal/store.js.map +1 -0
- package/dist/lib/server/decisioning/proposal/types.d.ts +394 -0
- package/dist/lib/server/decisioning/proposal/types.d.ts.map +1 -0
- package/dist/lib/server/decisioning/proposal/types.js +58 -0
- package/dist/lib/server/decisioning/proposal/types.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +25 -0
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +204 -19
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.js +5 -2
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/task-registry.d.ts +5 -0
- package/dist/lib/server/decisioning/runtime/task-registry.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/task-registry.js +4 -1
- package/dist/lib/server/decisioning/runtime/task-registry.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.js +10 -2
- package/dist/lib/server/decisioning/runtime/to-context.js.map +1 -1
- package/dist/lib/server/index.d.ts +1 -1
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +3 -1
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/test-controller.d.ts +2 -0
- package/dist/lib/server/test-controller.d.ts.map +1 -1
- package/dist/lib/server/test-controller.js +6 -11
- package/dist/lib/server/test-controller.js.map +1 -1
- package/dist/lib/testing/client.d.ts.map +1 -1
- package/dist/lib/testing/client.js +7 -1
- package/dist/lib/testing/client.js.map +1 -1
- package/dist/lib/testing/comply-controller.d.ts +2 -0
- package/dist/lib/testing/comply-controller.d.ts.map +1 -1
- package/dist/lib/testing/comply-controller.js.map +1 -1
- package/dist/lib/testing/storyboard/task-map.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/task-map.js +1 -0
- package/dist/lib/testing/storyboard/task-map.js.map +1 -1
- package/dist/lib/testing/storyboard/test-kit.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/test-kit.js +4 -0
- package/dist/lib/testing/storyboard/test-kit.js.map +1 -1
- package/dist/lib/testing/types.d.ts +10 -0
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/examples/hello_seller_adapter_guaranteed.ts +29 -2
- package/examples/hello_seller_adapter_proposal_mode.ts +575 -0
- package/package.json +1 -1
- package/dist/lib/adapters/proposal-manager.d.ts +0 -142
- package/dist/lib/adapters/proposal-manager.d.ts.map +0 -1
- package/dist/lib/adapters/proposal-manager.js +0 -184
- package/dist/lib/adapters/proposal-manager.js.map +0 -1
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProposalManager — primitives for the two-platform composition.
|
|
3
|
+
*
|
|
4
|
+
* The existing `DecisioningPlatform` conflates two concerns: assembling
|
|
5
|
+
* proposals from briefs (`get_products`, refine) vs. executing media buys
|
|
6
|
+
* against an upstream (`create_media_buy`, `update_media_buy`,
|
|
7
|
+
* `get_media_buy_delivery`). The two-platform composition splits them: a
|
|
8
|
+
* separate {@link ProposalManager} handles the proposal side; the
|
|
9
|
+
* `DecisioningPlatform` keeps the execution side. Either platform can be
|
|
10
|
+
* mock-backed independently.
|
|
11
|
+
*
|
|
12
|
+
* Ports the Python primitives shipped in `adcp-client-python` PRs #504
|
|
13
|
+
* (v1) and #550 (v1.5):
|
|
14
|
+
*
|
|
15
|
+
* - {@link ProposalManager} — interface with `getProducts` (required)
|
|
16
|
+
* plus optional `refineProducts` and `finalizeProposal`.
|
|
17
|
+
* - {@link ProposalCapabilities} — sales-axis-scoped capability flags.
|
|
18
|
+
* - {@link Recipe} — typed `recipe_kind`-discriminated base; adopters
|
|
19
|
+
* subclass with their internal-config schema. Rides on
|
|
20
|
+
* `Product.implementation_config` (opaque to the buyer).
|
|
21
|
+
* - {@link CapabilityOverlap} — typed declaration of which wire
|
|
22
|
+
* capabilities the buyer can configure on a product. The framework
|
|
23
|
+
* validates buyer requests against the overlap pre-adapter.
|
|
24
|
+
* - {@link FinalizeProposalRequest} / {@link FinalizeProposalSuccess} —
|
|
25
|
+
* framework-internal shapes for the finalize lifecycle (wired in the
|
|
26
|
+
* v1.5 dispatch helpers).
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
* @packageDocumentation
|
|
30
|
+
*/
|
|
31
|
+
import type { MaybePromise } from '../../create-adcp-server';
|
|
32
|
+
import type { Account } from '../account';
|
|
33
|
+
import type { RequestContext } from '../context';
|
|
34
|
+
import type { GetProductsRequest, GetProductsResponse } from '../../../types/tools.generated';
|
|
35
|
+
import type { TaskHandoff } from '../async-outcome';
|
|
36
|
+
/**
|
|
37
|
+
* Sales specialisms a {@link ProposalManager} can serve. Mirrors the
|
|
38
|
+
* `sales-*` slugs in the spec's specialism enum.
|
|
39
|
+
*
|
|
40
|
+
* v1 scopes to the two `ProposalManager`-relevant flavours; broader
|
|
41
|
+
* coverage (broadcast-tv, social, proposal-mode, catalog-driven) lands
|
|
42
|
+
* as adopter signal grows.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export type ProposalSalesSpecialism = 'sales-guaranteed' | 'sales-non-guaranteed';
|
|
47
|
+
/**
|
|
48
|
+
* Capability declaration for a {@link ProposalManager}.
|
|
49
|
+
*
|
|
50
|
+
* Sales-axis-scoped: proposal handling is a sales-specialism concern,
|
|
51
|
+
* not a generic platform-wide concept. The `salesSpecialism` field
|
|
52
|
+
* declares which AdCP sales specialism this manager serves; capability
|
|
53
|
+
* flags declare which optional behaviours it supports.
|
|
54
|
+
*
|
|
55
|
+
* The framework reads this declaration at server-construction time to
|
|
56
|
+
* decide which dispatch paths apply (e.g. `refineProducts` is only
|
|
57
|
+
* invoked when `refine` is true; `finalizeProposal` is only invoked
|
|
58
|
+
* when `finalize` is true).
|
|
59
|
+
*
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
export interface ProposalCapabilities {
|
|
63
|
+
/**
|
|
64
|
+
* Which AdCP sales specialism this manager serves.
|
|
65
|
+
*
|
|
66
|
+
* `sales-guaranteed` for guaranteed-direct flows with proposal
|
|
67
|
+
* lifecycle (finalize → committed proposal → media buy).
|
|
68
|
+
*
|
|
69
|
+
* `sales-non-guaranteed` for catalog-style flows where `getProducts`
|
|
70
|
+
* returns a static catalog and buyers reference products directly at
|
|
71
|
+
* `create_media_buy`.
|
|
72
|
+
*/
|
|
73
|
+
salesSpecialism: ProposalSalesSpecialism;
|
|
74
|
+
/**
|
|
75
|
+
* When true, the manager implements {@link ProposalManager.refineProducts}
|
|
76
|
+
* and the framework routes `get_products` requests with
|
|
77
|
+
* `buying_mode: 'refine'` to that method. When false, refine requests
|
|
78
|
+
* fall through to `getProducts` (or surface `UNSUPPORTED_FEATURE` if
|
|
79
|
+
* the manager rejects them).
|
|
80
|
+
*/
|
|
81
|
+
refine?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* When true, the manager implements {@link ProposalManager.finalizeProposal}
|
|
84
|
+
* and the framework intercepts `refine[i].action: 'finalize'` entries to
|
|
85
|
+
* commit drafts via the lifecycle helpers. When false, finalize entries
|
|
86
|
+
* pass through to the underlying `getProducts` / `refineProducts` method
|
|
87
|
+
* unchanged.
|
|
88
|
+
*/
|
|
89
|
+
finalize?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Grace window (in seconds) added to a committed proposal's `expires_at`
|
|
92
|
+
* before the framework rejects `create_media_buy` calls referencing the
|
|
93
|
+
* proposal with `PROPOSAL_EXPIRED`. Default 0 (strict).
|
|
94
|
+
*/
|
|
95
|
+
expiresAtGraceSeconds?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Signal-driven product assembly — the manager constructs products from
|
|
98
|
+
* buyer signals at request time rather than enumerating a static
|
|
99
|
+
* catalogue. Informational in v1.5; future PRs may validate that
|
|
100
|
+
* inventory / signal stores are wired when this flag is set.
|
|
101
|
+
*/
|
|
102
|
+
dynamicProducts?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The manager consults rate cards (per buyer relationship per product)
|
|
105
|
+
* when emitting prices. Informational in v1.5.
|
|
106
|
+
*/
|
|
107
|
+
rateCardPricing?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* The manager reserves capacity at proposal time (typical for
|
|
110
|
+
* guaranteed). Informational in v1.5; the `finalize` transition that
|
|
111
|
+
* drives the actual hold is wired via the lifecycle helpers.
|
|
112
|
+
*/
|
|
113
|
+
availabilityReservations?: boolean;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Validate a {@link ProposalCapabilities} object. Throws when the declaration
|
|
117
|
+
* is malformed (unknown `salesSpecialism`, negative `expiresAtGraceSeconds`).
|
|
118
|
+
* The framework calls this at boot; adopters can call it from their own
|
|
119
|
+
* config-validation code paths to fail fast on misconfiguration.
|
|
120
|
+
*
|
|
121
|
+
* Kept as a plain function rather than a class constructor to match the
|
|
122
|
+
* codebase's preference for plain TS interfaces over runtime classes
|
|
123
|
+
* for adopter-facing types.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export declare function validateProposalCapabilities(caps: ProposalCapabilities): void;
|
|
128
|
+
/**
|
|
129
|
+
* Per-product subset of wire capability flags that the buyer can
|
|
130
|
+
* configure on this product.
|
|
131
|
+
*
|
|
132
|
+
* Buyer requests asking for capabilities outside this overlap are
|
|
133
|
+
* rejected by the framework before the adapter sees them (validated by
|
|
134
|
+
* the lifecycle helpers — see `proposal/lifecycle.ts`).
|
|
135
|
+
*
|
|
136
|
+
* Each field is `ReadonlySet<string> | undefined`:
|
|
137
|
+
*
|
|
138
|
+
* - `undefined` → framework does not gate this axis (open).
|
|
139
|
+
* - `ReadonlySet` → buyer choices must be subsets of this set.
|
|
140
|
+
* An empty set means deny-all on this axis.
|
|
141
|
+
*
|
|
142
|
+
* The undefined vs. empty-set distinction matches set intuition:
|
|
143
|
+
* "no constraint" is `undefined`; "allowed set is empty" is `new Set()`.
|
|
144
|
+
*
|
|
145
|
+
* **Why no extras dict?** v1.5 deliberately omits an `extras` escape
|
|
146
|
+
* hatch (per Python design § D4). Adopters with novel gating needs
|
|
147
|
+
* extend the interface with typed fields; a dict bag leaves no paper
|
|
148
|
+
* trail. If a new axis turns out to be widely useful, it lands as a
|
|
149
|
+
* typed field on `CapabilityOverlap` upstream.
|
|
150
|
+
*
|
|
151
|
+
* @public
|
|
152
|
+
*/
|
|
153
|
+
export interface CapabilityOverlap {
|
|
154
|
+
/**
|
|
155
|
+
* Subset of wire `pricing_models` the buyer can choose. Validated
|
|
156
|
+
* against the matching `PricingOption.pricing_model` on the buyer's
|
|
157
|
+
* package.
|
|
158
|
+
*/
|
|
159
|
+
pricingModels?: ReadonlySet<string>;
|
|
160
|
+
/**
|
|
161
|
+
* Subset of wire targeting dimensions (`geo`, `device_type`,
|
|
162
|
+
* `language`, etc.). Validated against the keys present on the
|
|
163
|
+
* buyer's `targeting_overlay`.
|
|
164
|
+
*/
|
|
165
|
+
targetingDimensions?: ReadonlySet<string>;
|
|
166
|
+
/**
|
|
167
|
+
* Subset of `{ guaranteed, non_guaranteed }` the product offers.
|
|
168
|
+
*/
|
|
169
|
+
deliveryTypes?: ReadonlySet<string>;
|
|
170
|
+
/**
|
|
171
|
+
* If the seller integrates signals, which signal types this product
|
|
172
|
+
* accepts. An empty set means the seller explicitly refuses all
|
|
173
|
+
* signals on this product; `undefined` means no framework gate.
|
|
174
|
+
*/
|
|
175
|
+
signalTypes?: ReadonlySet<string>;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Base type for typed product `implementation_config` payloads.
|
|
179
|
+
*
|
|
180
|
+
* Adopters declare a discriminated subtype with a literal `recipe_kind`:
|
|
181
|
+
*
|
|
182
|
+
* ```ts
|
|
183
|
+
* interface GAMRecipe extends Recipe {
|
|
184
|
+
* recipe_kind: 'gam';
|
|
185
|
+
* line_item_template_id: string;
|
|
186
|
+
* ad_unit_ids: readonly string[];
|
|
187
|
+
* capability_overlap?: CapabilityOverlap;
|
|
188
|
+
* }
|
|
189
|
+
* ```
|
|
190
|
+
*
|
|
191
|
+
* The kind tag enables router-by-recipe-kind dispatch in the
|
|
192
|
+
* multi-decisioning case (one ProposalManager + many DecisioningPlatforms,
|
|
193
|
+
* each handling a subset of recipe kinds). v1.5 doesn't yet wire that
|
|
194
|
+
* routing — adopters using a single DecisioningPlatform attach recipes
|
|
195
|
+
* freely without registry validation.
|
|
196
|
+
*
|
|
197
|
+
* **The recipe is never on the buyer's wire surface.** It rides inside
|
|
198
|
+
* `Product.implementation_config` (an opaque-to-buyer dict). Buyers treat
|
|
199
|
+
* it as a black box; the framework persists it through the proposal
|
|
200
|
+
* lifecycle so the executing DecisioningPlatform sees a stable view.
|
|
201
|
+
*
|
|
202
|
+
* `capability_overlap` is optional. When present, the framework activates
|
|
203
|
+
* the v1.5 buyer-request validation seam against the declared subsets.
|
|
204
|
+
*
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
export interface Recipe {
|
|
208
|
+
/** Adapter-family discriminator. Subtypes narrow with a literal type. */
|
|
209
|
+
recipe_kind: string;
|
|
210
|
+
/**
|
|
211
|
+
* Optional typed declaration of which wire capabilities the buyer can
|
|
212
|
+
* configure on this product. `undefined` means no framework gating.
|
|
213
|
+
* An explicit {@link CapabilityOverlap} activates the v1.5 validation.
|
|
214
|
+
*/
|
|
215
|
+
capability_overlap?: CapabilityOverlap;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Framework-internal request shape passed to {@link ProposalManager.finalizeProposal}.
|
|
219
|
+
*
|
|
220
|
+
* Constructed by the framework dispatcher when a buyer's `get_products`
|
|
221
|
+
* request with `buying_mode: 'refine'` carries a `refine[i].action: 'finalize'`
|
|
222
|
+
* entry. Adopters don't parse the wire envelope; the framework projects.
|
|
223
|
+
*
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
226
|
+
export interface FinalizeProposalRequest<TRecipe extends Recipe = Recipe> {
|
|
227
|
+
/**
|
|
228
|
+
* The draft proposal the buyer is asking to finalize. Hydrated from
|
|
229
|
+
* the wire's `refine[i].proposal_id` field.
|
|
230
|
+
*/
|
|
231
|
+
proposalId: string;
|
|
232
|
+
/**
|
|
233
|
+
* `product_id -> Recipe` mapping pulled from the {@link ProposalStore}
|
|
234
|
+
* draft. The adopter's finalize logic typically lock-prices these and
|
|
235
|
+
* emits the committed proposal.
|
|
236
|
+
*/
|
|
237
|
+
recipes: ReadonlyMap<string, TRecipe>;
|
|
238
|
+
/**
|
|
239
|
+
* The draft's wire `Proposal` shape (the same payload the adopter
|
|
240
|
+
* returned on the prior `getProducts` / `refineProducts` call).
|
|
241
|
+
* Adopter typically modifies this with locked pricing and returns it
|
|
242
|
+
* on {@link FinalizeProposalSuccess}.
|
|
243
|
+
*/
|
|
244
|
+
proposalPayload: Record<string, unknown>;
|
|
245
|
+
/**
|
|
246
|
+
* The buyer's per-entry refine `ask` text — what they want finalized.
|
|
247
|
+
* Free-form; adopter consumes.
|
|
248
|
+
*/
|
|
249
|
+
ask?: string;
|
|
250
|
+
/**
|
|
251
|
+
* The parent {@link GetProductsRequest} so the adopter sees the full
|
|
252
|
+
* envelope (account, etc.) without the framework projecting fields
|
|
253
|
+
* one-by-one.
|
|
254
|
+
*/
|
|
255
|
+
parentRequest: GetProductsRequest;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Adopter-returned shape from {@link ProposalManager.finalizeProposal} —
|
|
259
|
+
* inline commit.
|
|
260
|
+
*
|
|
261
|
+
* Framework calls `ProposalStore.commit` with these fields before
|
|
262
|
+
* projecting the wire response. The buyer sees the committed `Proposal`
|
|
263
|
+
* with `proposal_status: 'committed'` + `expires_at` populated on the
|
|
264
|
+
* next `get_products` response payload.
|
|
265
|
+
*
|
|
266
|
+
* @public
|
|
267
|
+
*/
|
|
268
|
+
export interface FinalizeProposalSuccess<TRecipe extends Recipe = Recipe> {
|
|
269
|
+
/**
|
|
270
|
+
* The wire `Proposal` shape with locked pricing and
|
|
271
|
+
* `proposal_status: 'committed'`. Adopter typically derives this from
|
|
272
|
+
* {@link FinalizeProposalRequest.proposalPayload} with modifications.
|
|
273
|
+
*
|
|
274
|
+
* **Must be JSON-serializable end-to-end** — non-JSON values won't
|
|
275
|
+
* survive a process restart through a durable {@link ProposalStore}.
|
|
276
|
+
*/
|
|
277
|
+
proposal: Record<string, unknown>;
|
|
278
|
+
/**
|
|
279
|
+
* Inventory hold deadline. After this (plus the adopter's
|
|
280
|
+
* {@link ProposalCapabilities.expiresAtGraceSeconds} window), the
|
|
281
|
+
* framework rejects `create_media_buy` calls referencing the proposal
|
|
282
|
+
* with `PROPOSAL_EXPIRED`.
|
|
283
|
+
*/
|
|
284
|
+
expiresAt: Date;
|
|
285
|
+
/**
|
|
286
|
+
* Optional refreshed recipe mapping. Omitting preserves the draft's
|
|
287
|
+
* recipes verbatim. Adopters whose finalize logic mutates recipe
|
|
288
|
+
* fields (e.g. locking a line-item template id) supply a fresh
|
|
289
|
+
* mapping.
|
|
290
|
+
*/
|
|
291
|
+
recipes?: ReadonlyMap<string, TRecipe>;
|
|
292
|
+
}
|
|
293
|
+
type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
|
|
294
|
+
/**
|
|
295
|
+
* Assembles proposals from buyer briefs.
|
|
296
|
+
*
|
|
297
|
+
* Reads inventory, signals, rate cards, availability. Produces proposals
|
|
298
|
+
* where each `Product` carries a typed `implementation_config` (a recipe;
|
|
299
|
+
* see {@link Recipe}) that the bound `DecisioningPlatform` consumes at
|
|
300
|
+
* `create_media_buy` time.
|
|
301
|
+
*
|
|
302
|
+
* Methods may be sync or async; the framework awaits whatever is
|
|
303
|
+
* returned. Same convention as `SalesPlatform`.
|
|
304
|
+
*
|
|
305
|
+
* **Required surface:** {@link getProducts}.
|
|
306
|
+
*
|
|
307
|
+
* **Optional surfaces (capability-gated):**
|
|
308
|
+
*
|
|
309
|
+
* - {@link refineProducts} — only invoked when
|
|
310
|
+
* {@link ProposalCapabilities.refine} is true.
|
|
311
|
+
* - {@link finalizeProposal} — only invoked when
|
|
312
|
+
* {@link ProposalCapabilities.finalize} is true. Wired by the
|
|
313
|
+
* framework's lifecycle helpers; intercepts `refine[i].action: 'finalize'`
|
|
314
|
+
* entries before the underlying `getProducts` / `refineProducts` runs.
|
|
315
|
+
*
|
|
316
|
+
* Throw `AdcpError` for buyer-fixable rejection (`BUDGET_TOO_LOW`,
|
|
317
|
+
* `POLICY_VIOLATION`, `UNSUPPORTED_FEATURE`); the framework projects to
|
|
318
|
+
* the wire structured-error envelope.
|
|
319
|
+
*
|
|
320
|
+
* Adopter typing tip: parameterize on your concrete `Recipe` subtype to
|
|
321
|
+
* get end-to-end recipe typing through `ctx.recipes` in the bound
|
|
322
|
+
* `DecisioningPlatform`'s methods:
|
|
323
|
+
*
|
|
324
|
+
* ```ts
|
|
325
|
+
* type MyRecipe = GAMRecipe | KevelRecipe;
|
|
326
|
+
* const manager: ProposalManager<MyRecipe, MyTenantMeta> = { ... };
|
|
327
|
+
* ```
|
|
328
|
+
*
|
|
329
|
+
* @public
|
|
330
|
+
*/
|
|
331
|
+
export interface ProposalManager<TRecipe extends Recipe = Recipe, TCtxMeta = unknown> {
|
|
332
|
+
/**
|
|
333
|
+
* What this ProposalManager can do — sales specialism + capability flags.
|
|
334
|
+
*/
|
|
335
|
+
capabilities: ProposalCapabilities;
|
|
336
|
+
/**
|
|
337
|
+
* Initial product discovery from a buyer brief.
|
|
338
|
+
*
|
|
339
|
+
* Each returned `Product` SHOULD carry an `implementation_config`
|
|
340
|
+
* matching the bound `DecisioningPlatform`'s recipe schema (see
|
|
341
|
+
* {@link Recipe}). The framework treats `implementation_config` as
|
|
342
|
+
* opaque on the wire; recipe typing is enforced through the
|
|
343
|
+
* `TRecipe` type parameter on the adopter side.
|
|
344
|
+
*
|
|
345
|
+
* For non-guaranteed flows: typically a static catalogue, possibly
|
|
346
|
+
* filtered by buyer brief / signals.
|
|
347
|
+
*
|
|
348
|
+
* For guaranteed flows: typically a brief-driven assembly consulting
|
|
349
|
+
* rate cards + availability. Adopters return draft proposals; the
|
|
350
|
+
* buyer drives the finalize transition via subsequent refine calls
|
|
351
|
+
* with `action: 'finalize'`.
|
|
352
|
+
*/
|
|
353
|
+
getProducts(req: GetProductsRequest, ctx: Ctx<TCtxMeta>): MaybePromise<GetProductsResponse>;
|
|
354
|
+
/**
|
|
355
|
+
* Refine-mode iteration on a previous `getProducts` response.
|
|
356
|
+
*
|
|
357
|
+
* Per the spec, refine is a `buying_mode` value on `get_products` —
|
|
358
|
+
* the wire envelope is the same. The framework routes refine requests
|
|
359
|
+
* to this method when:
|
|
360
|
+
*
|
|
361
|
+
* 1. The wired ProposalManager declares `capabilities.refine` = true,
|
|
362
|
+
* 2. The request has `buying_mode === 'refine'`, AND
|
|
363
|
+
* 3. The manager implements this method.
|
|
364
|
+
*
|
|
365
|
+
* Otherwise refine requests fall through to {@link getProducts}.
|
|
366
|
+
*
|
|
367
|
+
* Adopters implementing `refineProducts` without `finalize` support
|
|
368
|
+
* should treat `action: 'finalize'` entries as `UNSUPPORTED_FEATURE`
|
|
369
|
+
* and return a structured error. Adopters with `finalize` support
|
|
370
|
+
* see those entries intercepted by the framework before this method
|
|
371
|
+
* is called.
|
|
372
|
+
*/
|
|
373
|
+
refineProducts?(req: GetProductsRequest, ctx: Ctx<TCtxMeta>): MaybePromise<GetProductsResponse>;
|
|
374
|
+
/**
|
|
375
|
+
* Commit a draft proposal to firm pricing + inventory hold.
|
|
376
|
+
*
|
|
377
|
+
* Wired by the framework's lifecycle helpers when:
|
|
378
|
+
*
|
|
379
|
+
* 1. `capabilities.finalize === true`,
|
|
380
|
+
* 2. The buyer's request has `buying_mode === 'refine'` with a
|
|
381
|
+
* `refine[i]` entry of `{ scope: 'proposal', action: 'finalize',
|
|
382
|
+
* proposal_id }`, AND
|
|
383
|
+
* 3. The proposal_id resolves to a DRAFT entry in the
|
|
384
|
+
* {@link ProposalStore}.
|
|
385
|
+
*
|
|
386
|
+
* Return a {@link FinalizeProposalSuccess} for inline commit (the
|
|
387
|
+
* spec-default route), or a `TaskHandoff<FinalizeProposalSuccess>` to
|
|
388
|
+
* promote to a HITL background task. The HITL commit hook is wired
|
|
389
|
+
* in v1.6+; v1.5 inline-only.
|
|
390
|
+
*/
|
|
391
|
+
finalizeProposal?(req: FinalizeProposalRequest<TRecipe>, ctx: Ctx<TCtxMeta>): MaybePromise<FinalizeProposalSuccess<TRecipe> | TaskHandoff<FinalizeProposalSuccess<TRecipe>>>;
|
|
392
|
+
}
|
|
393
|
+
export {};
|
|
394
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/proposal/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAMpD;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAElF;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;O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AC,CAAC,CAAC,CAAC;CACnG"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ProposalManager — primitives for the two-platform composition.
|
|
4
|
+
*
|
|
5
|
+
* The existing `DecisioningPlatform` conflates two concerns: assembling
|
|
6
|
+
* proposals from briefs (`get_products`, refine) vs. executing media buys
|
|
7
|
+
* against an upstream (`create_media_buy`, `update_media_buy`,
|
|
8
|
+
* `get_media_buy_delivery`). The two-platform composition splits them: a
|
|
9
|
+
* separate {@link ProposalManager} handles the proposal side; the
|
|
10
|
+
* `DecisioningPlatform` keeps the execution side. Either platform can be
|
|
11
|
+
* mock-backed independently.
|
|
12
|
+
*
|
|
13
|
+
* Ports the Python primitives shipped in `adcp-client-python` PRs #504
|
|
14
|
+
* (v1) and #550 (v1.5):
|
|
15
|
+
*
|
|
16
|
+
* - {@link ProposalManager} — interface with `getProducts` (required)
|
|
17
|
+
* plus optional `refineProducts` and `finalizeProposal`.
|
|
18
|
+
* - {@link ProposalCapabilities} — sales-axis-scoped capability flags.
|
|
19
|
+
* - {@link Recipe} — typed `recipe_kind`-discriminated base; adopters
|
|
20
|
+
* subclass with their internal-config schema. Rides on
|
|
21
|
+
* `Product.implementation_config` (opaque to the buyer).
|
|
22
|
+
* - {@link CapabilityOverlap} — typed declaration of which wire
|
|
23
|
+
* capabilities the buyer can configure on a product. The framework
|
|
24
|
+
* validates buyer requests against the overlap pre-adapter.
|
|
25
|
+
* - {@link FinalizeProposalRequest} / {@link FinalizeProposalSuccess} —
|
|
26
|
+
* framework-internal shapes for the finalize lifecycle (wired in the
|
|
27
|
+
* v1.5 dispatch helpers).
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
* @packageDocumentation
|
|
31
|
+
*/
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.validateProposalCapabilities = validateProposalCapabilities;
|
|
34
|
+
/**
|
|
35
|
+
* Validate a {@link ProposalCapabilities} object. Throws when the declaration
|
|
36
|
+
* is malformed (unknown `salesSpecialism`, negative `expiresAtGraceSeconds`).
|
|
37
|
+
* The framework calls this at boot; adopters can call it from their own
|
|
38
|
+
* config-validation code paths to fail fast on misconfiguration.
|
|
39
|
+
*
|
|
40
|
+
* Kept as a plain function rather than a class constructor to match the
|
|
41
|
+
* codebase's preference for plain TS interfaces over runtime classes
|
|
42
|
+
* for adopter-facing types.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
function validateProposalCapabilities(caps) {
|
|
47
|
+
const valid = ['sales-guaranteed', 'sales-non-guaranteed'];
|
|
48
|
+
if (!valid.includes(caps.salesSpecialism)) {
|
|
49
|
+
throw new Error(`ProposalCapabilities.salesSpecialism must be one of ${JSON.stringify(valid)}. ` +
|
|
50
|
+
`Got ${JSON.stringify(caps.salesSpecialism)}. v1.5 scopes ProposalManager to the two ` +
|
|
51
|
+
`core sales specialisms; broader specialism support lands in subsequent releases.`);
|
|
52
|
+
}
|
|
53
|
+
if (caps.expiresAtGraceSeconds != null && caps.expiresAtGraceSeconds < 0) {
|
|
54
|
+
throw new Error(`ProposalCapabilities.expiresAtGraceSeconds must be >= 0; got ${caps.expiresAtGraceSeconds}. ` +
|
|
55
|
+
`The grace window extends the inventory hold past expires_at; negative values would shrink it.`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/proposal/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;AA+GH,oEAeC;AA3BD;;;;;;;;;;;GAWG;AACH,SAAgB,4BAA4B,CAAC,IAA0B;IACrE,MAAM,KAAK,GAAuC,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,CAAC;IAC/F,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CACb,uDAAuD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI;YAC9E,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,2CAA2C;YACtF,kFAAkF,CACrF,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,CAAC,qBAAqB,IAAI,IAAI,IAAI,IAAI,CAAC,qBAAqB,GAAG,CAAC,EAAE,CAAC;QACzE,MAAM,IAAI,KAAK,CACb,gEAAgE,IAAI,CAAC,qBAAqB,IAAI;YAC5F,+FAA+F,CAClG,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -390,6 +390,31 @@ export interface CreateAdcpServerFromPlatformOptions extends Omit<AdcpServerConf
|
|
|
390
390
|
* ```
|
|
391
391
|
*/
|
|
392
392
|
mediaBuyStore?: MediaBuyStore;
|
|
393
|
+
/**
|
|
394
|
+
* Proposal lifecycle ledger — wires the v1.5 ProposalManager dispatch
|
|
395
|
+
* seams. When supplied alongside `platform.proposalManager`, the
|
|
396
|
+
* framework drives the full lifecycle:
|
|
397
|
+
*
|
|
398
|
+
* - `getProducts` / refine responses persist `proposals[]` as DRAFT
|
|
399
|
+
* records (with typed recipes pulled from
|
|
400
|
+
* `Product.implementation_config`).
|
|
401
|
+
* - `refine[i].action: 'finalize'` entries are intercepted before
|
|
402
|
+
* dispatch; the manager's `finalizeProposal` is called and the
|
|
403
|
+
* proposal is committed via the store.
|
|
404
|
+
* - `createMediaBuy` requests carrying `proposal_id` are validated
|
|
405
|
+
* against expiry + capability overlap, the proposal is reserved
|
|
406
|
+
* (atomic CAS `COMMITTED → CONSUMING`), and `ctx.recipes` is
|
|
407
|
+
* hydrated from the record. Adapter success → `CONSUMING →
|
|
408
|
+
* CONSUMED`; adapter throw → rollback to `COMMITTED`.
|
|
409
|
+
* - `updateMediaBuy` / `getMediaBuyDelivery` hydrate `ctx.recipes`
|
|
410
|
+
* via the reverse-index `getByMediaBuyId`.
|
|
411
|
+
*
|
|
412
|
+
* Backed by any {@link ProposalStore} — `InMemoryProposalStore` for
|
|
413
|
+
* dev / single-process; adopters wire their own durable backings for
|
|
414
|
+
* production. Without this option (and/or without
|
|
415
|
+
* `platform.proposalManager`), the v1 path runs unchanged.
|
|
416
|
+
*/
|
|
417
|
+
proposalStore?: import('../proposal').ProposalStore;
|
|
393
418
|
/**
|
|
394
419
|
* Allow `push_notification_config.url` to point at loopback / private-IP
|
|
395
420
|
* destinations. Default is `false` — the framework's request-ingest
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"from-platform.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/runtime/from-platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAEL,KAAK,gBAAgB,EASrB,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAoC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"from-platform.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/runtime/from-platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAEL,KAAK,gBAAgB,EASrB,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,mBAAmB,EAAE,o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