@apostra/sdk 0.37.0 → 0.39.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.
@@ -1,5 +1,14 @@
1
1
  import { Transport } from '../transport.js';
2
2
  export class Apostra extends Transport {
3
+ /**
4
+ * Issue the hosted card-capture link for a token from request_payment_authority. Give the link to the cardholder; cards stay off MCP.
5
+ *
6
+ * @example
7
+ * await client.confirmPaymentAuthority(input, { idempotencyKey: 'stable-key' })
8
+ */
9
+ confirmPaymentAuthority(input, options) { return this.request("confirm_payment_authority", input, options); }
10
+ /** Issue the hosted card-capture link for a token from request_payment_authority. Give the link to the cardholder; cards stay off MCP. Returns the data together with response headers and request ID. */
11
+ confirmPaymentAuthorityWithResponse(input, options) { return this.requestDetailed("confirm_payment_authority", input, options); }
3
12
  /**
4
13
  * Download a public immutable document revision
5
14
  *
@@ -10,22 +19,22 @@ export class Apostra extends Transport {
10
19
  /** Download a public immutable document revision Returns the data together with response headers and request ID. */
11
20
  downloadV3PublicDocumentRevisionWithResponse(input, options) { return this.requestDetailed("downloadV3PublicDocumentRevision", input, options); }
12
21
  /**
13
- * Generate or refine new image, hosted video, or voice/audio (radio spots, voiceovers) from a saved Creative Engines brief. Reuse actionKey for an identical retry.
22
+ * Generate variants from a saved brief; use Creative Sessions for voice/audio, radio spots, and voiceovers. Send kind, scope, and variantAction; reuse actionKey only on retries.
14
23
  *
15
24
  * @example
16
25
  * await client.generateVariants(input, { idempotencyKey: 'stable-key' })
17
26
  */
18
27
  generateVariants(input, options) { return this.request("generate_variants", input, options); }
19
- /** Generate or refine new image, hosted video, or voice/audio (radio spots, voiceovers) from a saved Creative Engines brief. Reuse actionKey for an identical retry. Returns the data together with response headers and request ID. */
28
+ /** Generate variants from a saved brief; use Creative Sessions for voice/audio, radio spots, and voiceovers. Send kind, scope, and variantAction; reuse actionKey only on retries. Returns the data together with response headers and request ID. */
20
29
  generateVariantsWithResponse(input, options) { return this.requestDetailed("generate_variants", input, options); }
21
30
  /**
22
- * Read one object by kind plus the id that search returned, or an account singleton with no id. Never guess an id. include adds detail; each include value works only for the kinds that serve it.
31
+ * Read one object by kind and id, or an account singleton without id. Never guess ids. Campaign reads return targetingOverlay to verify before proposals. include adds detail only for kinds that serve it.
23
32
  *
24
33
  * @example
25
34
  * await client.get(input)
26
35
  */
27
36
  get(input, options) { return this.request("get", input, options); }
28
- /** Read one object by kind plus the id that search returned, or an account singleton with no id. Never guess an id. include adds detail; each include value works only for the kinds that serve it. Returns the data together with response headers and request ID. */
37
+ /** Read one object by kind and id, or an account singleton without id. Never guess ids. Campaign reads return targetingOverlay to verify before proposals. include adds detail only for kinds that serve it. Returns the data together with response headers and request ID. */
29
38
  getWithResponse(input, options) { return this.requestDetailed("get", input, options); }
30
39
  /**
31
40
  * Read a bounded public immutable document revision
@@ -73,13 +82,13 @@ export class Apostra extends Transport {
73
82
  /** Show a seller what reporting we received for one buyer media buy, whether each receipt was accepted, and the current computed daily totals. Opens the Media Buy Timeline Glance. Returns the data together with response headers and request ID. */
74
83
  getSellerReportingReceiptsWithResponse(input, options) { return this.requestDetailed("get_seller_reporting_receipts", input, options); }
75
84
  /**
76
- * Current account, state, blockers, exact fixes, and reachable accounts. For seller demand, use it to tell whether readiness stops requests before source calls; read before diagnosing source health, empty responses, or demand.
85
+ * Current account, state, blockers, exact fixes, and reachable accounts. For seller demand, use it to tell whether readiness stops requests before source calls; read before diagnosing source health, empty responses, or demand. A Developer account adds each agent's stage, blocker, and next call.
77
86
  *
78
87
  * @example
79
88
  * await client.getStatus(input)
80
89
  */
81
90
  getStatus(input = {}, options) { return this.request("get_status", input, options); }
82
- /** Current account, state, blockers, exact fixes, and reachable accounts. For seller demand, use it to tell whether readiness stops requests before source calls; read before diagnosing source health, empty responses, or demand. Returns the data together with response headers and request ID. */
91
+ /** Current account, state, blockers, exact fixes, and reachable accounts. For seller demand, use it to tell whether readiness stops requests before source calls; read before diagnosing source health, empty responses, or demand. A Developer account adds each agent's stage, blocker, and next call. Returns the data together with response headers and request ID. */
83
92
  getStatusWithResponse(input = {}, options) { return this.requestDetailed("get_status", input, options); }
84
93
  /**
85
94
  * Open the Advertisers Page: every advertiser with its campaign and draft counts and one next action each. Use it for "show my advertisers" or "where do I start"; the Page self-fetches. To add or set up an advertiser, pass intent: "add". For a text answer use search(kind: "advertiser").
@@ -90,6 +99,15 @@ export class Apostra extends Transport {
90
99
  openAdvertisersPage(input, options) { return this.request("open_advertisers_page", input, options); }
91
100
  /** Open the Advertisers Page: every advertiser with its campaign and draft counts and one next action each. Use it for "show my advertisers" or "where do I start"; the Page self-fetches. To add or set up an advertiser, pass intent: "add". For a text answer use search(kind: "advertiser"). Returns the data together with response headers and request ID. */
92
101
  openAdvertisersPageWithResponse(input, options) { return this.requestDetailed("open_advertisers_page", input, options); }
102
+ /**
103
+ * Open one agent’s Test & certify Page: live certification per use case, recent test runs, AdCP 4.0 readiness and capability declarations. Read-only.
104
+ *
105
+ * @example
106
+ * await client.openAgentCertificationPage(input)
107
+ */
108
+ openAgentCertificationPage(input, options) { return this.request("open_agent_certification_page", input, options); }
109
+ /** Open one agent’s Test & certify Page: live certification per use case, recent test runs, AdCP 4.0 readiness and capability declarations. Read-only. Returns the data together with response headers and request ID. */
110
+ openAgentCertificationPageWithResponse(input, options) { return this.requestDetailed("open_agent_certification_page", input, options); }
93
111
  /**
94
112
  * Open one agent owned by this Developer account.
95
113
  *
@@ -99,6 +117,24 @@ export class Apostra extends Transport {
99
117
  openAgentPage(input, options) { return this.request("open_agent_page", input, options); }
100
118
  /** Open one agent owned by this Developer account. Returns the data together with response headers and request ID. */
101
119
  openAgentPageWithResponse(input, options) { return this.requestDetailed("open_agent_page", input, options); }
120
+ /**
121
+ * Open one agent’s Inventory sources Page: the inventory sources it powers and the health of each. Read-only.
122
+ *
123
+ * @example
124
+ * await client.openAgentSourcesPage(input)
125
+ */
126
+ openAgentSourcesPage(input, options) { return this.request("open_agent_sources_page", input, options); }
127
+ /** Open one agent’s Inventory sources Page: the inventory sources it powers and the health of each. Read-only. Returns the data together with response headers and request ID. */
128
+ openAgentSourcesPageWithResponse(input, options) { return this.requestDetailed("open_agent_sources_page", input, options); }
129
+ /**
130
+ * Open one agent’s Webhooks Page: its recent inbound webhook outcomes, each refusal with its reason. Read-only.
131
+ *
132
+ * @example
133
+ * await client.openAgentWebhooksPage(input)
134
+ */
135
+ openAgentWebhooksPage(input, options) { return this.request("open_agent_webhooks_page", input, options); }
136
+ /** Open one agent’s Webhooks Page: its recent inbound webhook outcomes, each refusal with its reason. Read-only. Returns the data together with response headers and request ID. */
137
+ openAgentWebhooksPageWithResponse(input, options) { return this.requestDetailed("open_agent_webhooks_page", input, options); }
102
138
  /**
103
139
  * Open Build an agent for this Developer account.
104
140
  *
@@ -136,13 +172,13 @@ export class Apostra extends Transport {
136
172
  /** Open the Campaigns Page: campaigns with status, flight, and budget; open one for its media buys and creatives. The Page self-fetches, so do not list campaigns in prose. advertiserId scopes to one advertiser; campaignId focuses one campaign. A draft's go-live review is open_campaign_receipt. Returns the data together with response headers and request ID. */
137
173
  openCampaignsPageWithResponse(input, options) { return this.requestDetailed("open_campaigns_page", input, options); }
138
174
  /**
139
- * Open the buyer Media Partners Page. Optionally scope to an advertiser or seller; connectionAction "connect" opens that media partner at connection setup without mutating until the user confirms.
175
+ * Open the buyer Media Partners Page. Optionally scope to an advertiser or seller; connectionAction "connect" opens that media partner at connection setup without mutating until the user confirms. Replaced by open_media_partners_page, which opens the same Page.
140
176
  *
141
177
  * @example
142
178
  * await client.openConnectionsPage(input)
143
179
  */
144
180
  openConnectionsPage(input, options) { return this.request("open_connections_page", input, options); }
145
- /** Open the buyer Media Partners Page. Optionally scope to an advertiser or seller; connectionAction "connect" opens that media partner at connection setup without mutating until the user confirms. Returns the data together with response headers and request ID. */
181
+ /** Open the buyer Media Partners Page. Optionally scope to an advertiser or seller; connectionAction "connect" opens that media partner at connection setup without mutating until the user confirms. Replaced by open_media_partners_page, which opens the same Page. Returns the data together with response headers and request ID. */
146
182
  openConnectionsPageWithResponse(input, options) { return this.requestDetailed("open_connections_page", input, options); }
147
183
  /**
148
184
  * Open the buyer Creative Engines Page. Optionally focus an engine, connection, or its secure setup control; the buyer starts setup in the Page, and this does not authorize a provider or start generation.
@@ -163,22 +199,40 @@ export class Apostra extends Transport {
163
199
  /** Open Creative Library. Use search for a plain object answer. Composer needs campaignId; assembly needs no Creative Engine. To save a draft, use exactly one format: a canonical format such as image, hosted video, or hosted audio, or a seller format. Returns the data together with response headers and request ID. */
164
200
  openCreativeLibraryWithResponse(input, options) { return this.requestDetailed("open_creative_library", input, options); }
165
201
  /**
166
- * Open the Seller Media Buys Page. Optionally focus one seller-owned account relationship and its buys or creatives; the Page self-fetches.
202
+ * Open the Developer home for this Developer account: its agents, their stages and what to do next.
203
+ *
204
+ * @example
205
+ * await client.openDeveloperHome(input)
206
+ */
207
+ openDeveloperHome(input, options) { return this.request("open_developer_home", input, options); }
208
+ /** Open the Developer home for this Developer account: its agents, their stages and what to do next. Returns the data together with response headers and request ID. */
209
+ openDeveloperHomeWithResponse(input, options) { return this.requestDetailed("open_developer_home", input, options); }
210
+ /**
211
+ * Open the Seller Media Buys Page. Optionally focus one account relationship or seller account mapping (not both) and its buys or creatives; the Page self-fetches.
167
212
  *
168
213
  * @example
169
214
  * await client.openMediaBuysPage(input)
170
215
  */
171
216
  openMediaBuysPage(input, options) { return this.request("open_media_buys_page", input, options); }
172
- /** Open the Seller Media Buys Page. Optionally focus one seller-owned account relationship and its buys or creatives; the Page self-fetches. Returns the data together with response headers and request ID. */
217
+ /** Open the Seller Media Buys Page. Optionally focus one account relationship or seller account mapping (not both) and its buys or creatives; the Page self-fetches. Returns the data together with response headers and request ID. */
173
218
  openMediaBuysPageWithResponse(input, options) { return this.requestDetailed("open_media_buys_page", input, options); }
174
219
  /**
175
- * Open a compatibility Page. source_diagnostics can create or attach the Agent. External hosts may return text. Credentials and authority changes remain human ceremonies.
220
+ * Open the buyer Media Partners Page. Optionally scope to an advertiser or seller; connectionAction "connect" opens that media partner at connection setup without mutating until the user confirms.
221
+ *
222
+ * @example
223
+ * await client.openMediaPartnersPage(input)
224
+ */
225
+ openMediaPartnersPage(input, options) { return this.request("open_media_partners_page", input, options); }
226
+ /** Open the buyer Media Partners Page. Optionally scope to an advertiser or seller; connectionAction "connect" opens that media partner at connection setup without mutating until the user confirms. Returns the data together with response headers and request ID. */
227
+ openMediaPartnersPageWithResponse(input, options) { return this.requestDetailed("open_media_partners_page", input, options); }
228
+ /**
229
+ * Open a compatibility Page. Owners create or attach the Agent in source_diagnostics. External hosts may return text. Credentials and authority changes remain human ceremonies.
176
230
  *
177
231
  * @example
178
232
  * await client.openPage(input)
179
233
  */
180
234
  openPage(input, options) { return this.request("open_page", input, options); }
181
- /** Open a compatibility Page. source_diagnostics can create or attach the Agent. External hosts may return text. Credentials and authority changes remain human ceremonies. Returns the data together with response headers and request ID. */
235
+ /** Open a compatibility Page. Owners create or attach the Agent in source_diagnostics. External hosts may return text. Credentials and authority changes remain human ceremonies. Returns the data together with response headers and request ID. */
182
236
  openPageWithResponse(input, options) { return this.requestDetailed("open_page", input, options); }
183
237
  /**
184
238
  * Open Proposal Pass on one exact immutable RFP turn. Supply the matching rfpId and turnId from save_rfp or get; the Page loads the private response itself.
@@ -208,13 +262,13 @@ export class Apostra extends Transport {
208
262
  /** Show a saved Creative Session’s variants (find via search/get kind creative_session). Not for generating new variants. Returns the data together with response headers and request ID. */
209
263
  openVariantGalleryWithResponse(input, options) { return this.requestDetailed("open_variant_gallery", input, options); }
210
264
  /**
211
- * Rechecks one external sales-agent source with no-spend get_products. Returns evidence IDs and seller readiness; no source configuration or media buy.
265
+ * Rechecks one external sales-agent source with no-spend get_products and, if it publishes one, a catalog refresh. Returns each check, findings still open, evidence IDs and readiness; no source configuration or media buy.
212
266
  *
213
267
  * @example
214
268
  * await client.refreshInventorySourceHealth(input, { idempotencyKey: 'stable-key' })
215
269
  */
216
270
  refreshInventorySourceHealth(input, options) { return this.request("refresh_inventory_source_health", input, options); }
217
- /** Rechecks one external sales-agent source with no-spend get_products. Returns evidence IDs and seller readiness; no source configuration or media buy. Returns the data together with response headers and request ID. */
271
+ /** Rechecks one external sales-agent source with no-spend get_products and, if it publishes one, a catalog refresh. Returns each check, findings still open, evidence IDs and readiness; no source configuration or media buy. Returns the data together with response headers and request ID. */
218
272
  refreshInventorySourceHealthWithResponse(input, options) { return this.requestDetailed("refresh_inventory_source_health", input, options); }
219
273
  /**
220
274
  * Request a Buyer child under the selected Organization. Nothing is created until an Organization administrator approves it on our site; the result is approval_required with a link to show the person. Repeat with the same idempotencyKey and name for the outcome.
@@ -226,13 +280,22 @@ export class Apostra extends Transport {
226
280
  /** Request a Buyer child under the selected Organization. Nothing is created until an Organization administrator approves it on our site; the result is approval_required with a link to show the person. Repeat with the same idempotencyKey and name for the outcome. Returns the data together with response headers and request ID. */
227
281
  requestBuyerChildAccountWithResponse(input, options) { return this.requestDetailed("request_buyer_child_account", input, options); }
228
282
  /**
229
- * Request quotes/products. With a MediaBuy cap, only quotes confirming the exact cap are usable. sellerIds fail closed; campaign-only lists use eligible subset. Broadcast needs confirmBroadcast:true.
283
+ * Stage a card handoff for the organization and return a confirmation token. No link is issued until confirm_payment_authority.
284
+ *
285
+ * @example
286
+ * await client.requestPaymentAuthority(input, { idempotencyKey: 'stable-key' })
287
+ */
288
+ requestPaymentAuthority(input, options) { return this.request("request_payment_authority", input, options); }
289
+ /** Stage a card handoff for the organization and return a confirmation token. No link is issued until confirm_payment_authority. Returns the data together with response headers and request ID. */
290
+ requestPaymentAuthorityWithResponse(input, options) { return this.requestDetailed("request_payment_authority", input, options); }
291
+ /**
292
+ * Request quotes/products. With a MediaBuy cap, only quotes confirming the exact cap are usable. sellerIds and sellerAccountIds fail closed; campaign-only lists use eligible subset. Broadcast needs confirmBroadcast:true.
230
293
  *
231
294
  * @example
232
295
  * await client.requestProposals(input, { idempotencyKey: 'stable-key' })
233
296
  */
234
297
  requestProposals(input, options) { return this.request("request_proposals", input, options); }
235
- /** Request quotes/products. With a MediaBuy cap, only quotes confirming the exact cap are usable. sellerIds fail closed; campaign-only lists use eligible subset. Broadcast needs confirmBroadcast:true. Returns the data together with response headers and request ID. */
298
+ /** Request quotes/products. With a MediaBuy cap, only quotes confirming the exact cap are usable. sellerIds and sellerAccountIds fail closed; campaign-only lists use eligible subset. Broadcast needs confirmBroadcast:true. Returns the data together with response headers and request ID. */
236
299
  requestProposalsWithResponse(input, options) { return this.requestDetailed("request_proposals", input, options); }
237
300
  /**
238
301
  * Requests a scheduler-run reporting refresh or a bounded replay for one seller media buy. It never polls a provider directly.
@@ -253,22 +316,22 @@ export class Apostra extends Transport {
253
316
  /** Review a Buyer child under the selected Organization: name, role, capacity, plan coverage, operator, inherited access and other effects. Read-only; nothing is created. Show the review to the person, then call request_buyer_child_account. Returns the data together with response headers and request ID. */
254
317
  reviewBuyerChildAccountWithResponse(input, options) { return this.requestDetailed("review_buyer_child_account", input, options); }
255
318
  /**
256
- * Rename an existing direct child Account or update settings.company. Never provisions, archives, or changes owners or members; use Account settings for access changes.
319
+ * Create a child Account (omit id), rename one, or archive or restore it (isArchived). Each is recorded for website approval by an Organization administrator; repeat with the same idempotencyKey for the outcome. dryRun previews. settings.company saves at once. Never changes owners or members.
257
320
  *
258
321
  * @example
259
322
  * await client.saveAccount(input, { idempotencyKey: 'stable-key' })
260
323
  */
261
324
  saveAccount(input, options) { return this.request("save_account", input, options); }
262
- /** Rename an existing direct child Account or update settings.company. Never provisions, archives, or changes owners or members; use Account settings for access changes. Returns the data together with response headers and request ID. */
325
+ /** Create a child Account (omit id), rename one, or archive or restore it (isArchived). Each is recorded for website approval by an Organization administrator; repeat with the same idempotencyKey for the outcome. dryRun previews. settings.company saves at once. Never changes owners or members. Returns the data together with response headers and request ID. */
263
326
  saveAccountWithResponse(input, options) { return this.requestDetailed("save_account", input, options); }
264
327
  /**
265
- * Save an advertiser or its mappings. Confirm markets/channels with the buyer first (see footprintProposal). `needs_input` = ask the buyer; never recreate to change currency. Use identityContract:confirmed-v1 for brand fixes. resolveBrand looks up public branding. Guide: /v2/setup/v3/identity-setup.
328
+ * Save an advertiser or mappings. Buyer privateNotes: owning Buyer Account only; /v3/manage-ads#private-advertiser-notes. Confirm markets/channels (footprintProposal); needs_input=ask; never recreate for currency. Brand: identityContract:confirmed-v1; preview: resolveBrand; read advertiser.brandRef.
266
329
  *
267
330
  * @example
268
331
  * await client.saveAdvertiser(input, { idempotencyKey: 'stable-key' })
269
332
  */
270
333
  saveAdvertiser(input, options) { return this.request("save_advertiser", input, options); }
271
- /** Save an advertiser or its mappings. Confirm markets/channels with the buyer first (see footprintProposal). `needs_input` = ask the buyer; never recreate to change currency. Use identityContract:confirmed-v1 for brand fixes. resolveBrand looks up public branding. Guide: /v2/setup/v3/identity-setup. Returns the data together with response headers and request ID. */
334
+ /** Save an advertiser or mappings. Buyer privateNotes: owning Buyer Account only; /v3/manage-ads#private-advertiser-notes. Confirm markets/channels (footprintProposal); needs_input=ask; never recreate for currency. Brand: identityContract:confirmed-v1; preview: resolveBrand; read advertiser.brandRef. Returns the data together with response headers and request ID. */
272
335
  saveAdvertiserWithResponse(input, options) { return this.requestDetailed("save_advertiser", input, options); }
273
336
  /**
274
337
  * Invite another Organization to exact advertisers, accept/reject an invitation, or revoke a grant. Limited beta: eligible Organization, entitlement, server-side exposure, and direct human-admin authority are required.
@@ -280,22 +343,22 @@ export class Apostra extends Transport {
280
343
  /** Invite another Organization to exact advertisers, accept/reject an invitation, or revoke a grant. Limited beta: eligible Organization, entitlement, server-side exposure, and direct human-admin authority are required. Returns the data together with response headers and request ID. */
281
344
  saveAdvertiserGrantWithResponse(input, options) { return this.requestDetailed("save_advertiser_grant", input, options); }
282
345
  /**
283
- * Save seller notes and instructions for an exact brand-domain × operator-domain pair. Configuration does not verify the registry; discounts, source routing, sponsored access, and buyer-account trust are read-only.
346
+ * Seller-only CRM notes for an exact brand × operator pair. Buyers use save_advertiser.privateNotes; see /v3/manage-ads#private-advertiser-notes. Effective discounts, routing, access and trust are read-only.
284
347
  *
285
348
  * @example
286
349
  * await client.saveAdvertiserInstructions(input, { idempotencyKey: 'stable-key' })
287
350
  */
288
351
  saveAdvertiserInstructions(input, options) { return this.request("save_advertiser_instructions", input, options); }
289
- /** Save seller notes and instructions for an exact brand-domain × operator-domain pair. Configuration does not verify the registry; discounts, source routing, sponsored access, and buyer-account trust are read-only. Returns the data together with response headers and request ID. */
352
+ /** Seller-only CRM notes for an exact brand × operator pair. Buyers use save_advertiser.privateNotes; see /v3/manage-ads#private-advertiser-notes. Effective discounts, routing, access and trust are read-only. Returns the data together with response headers and request ID. */
290
353
  saveAdvertiserInstructionsWithResponse(input, options) { return this.requestDetailed("save_advertiser_instructions", input, options); }
291
354
  /**
292
- * In a Developer account, register a Sales or Creative Agent, or rename an owned Agent. A registration requires an account administrator and an idempotency key. In a Seller account, confirm or correct one Sales Agent product mode.
355
+ * Confirm a Sales Agent product mode, register a Sales or Creative Agent, or update an owned Agent: rename it or allow certification buys. To connect from a URL, send agentUrl with dryRun: true, show what was read, then send it without dryRun. A connected agent is not yet verified as theirs.
293
356
  *
294
357
  * @example
295
358
  * await client.saveAgent(input, { idempotencyKey: 'stable-key' })
296
359
  */
297
360
  saveAgent(input, options) { return this.request("save_agent", input, options); }
298
- /** In a Developer account, register a Sales or Creative Agent, or rename an owned Agent. A registration requires an account administrator and an idempotency key. In a Seller account, confirm or correct one Sales Agent product mode. Returns the data together with response headers and request ID. */
361
+ /** Confirm a Sales Agent product mode, register a Sales or Creative Agent, or update an owned Agent: rename it or allow certification buys. To connect from a URL, send agentUrl with dryRun: true, show what was read, then send it without dryRun. A connected agent is not yet verified as theirs. Returns the data together with response headers and request ID. */
299
362
  saveAgentWithResponse(input, options) { return this.requestDetailed("save_agent", input, options); }
300
363
  /**
301
364
  * File or update a typed ask in the Apostra Support workflow; returns askId. Supply is buyer inventory. Call immediately with type support when a person explicitly asks for a human; do not diagnose first.
@@ -316,13 +379,13 @@ export class Apostra extends Transport {
316
379
  /** Sync first-party CRM audiences for a buyer advertiser. Each audiences[] item may add, remove, or delete members. Returns an operationId; use get(kind: audience, advertiserId: "...") to read match status after it settles. Returns the data together with response headers and request ID. */
317
380
  saveAudienceWithResponse(input, options) { return this.requestDetailed("save_audience", input, options); }
318
381
  /**
319
- * Accept Terms, set seller terms, or manage payment authority. Cards stay off MCP.
382
+ * Accept Terms, set the payment terms sellers are asked for, or accept a plan, answer its offer and change its renewal. Cards stay off MCP.
320
383
  *
321
384
  * @example
322
385
  * await client.saveBilling(input, { idempotencyKey: 'stable-key' })
323
386
  */
324
387
  saveBilling(input, options) { return this.request("save_billing", input, options); }
325
- /** Accept Terms, set seller terms, or manage payment authority. Cards stay off MCP. Returns the data together with response headers and request ID. */
388
+ /** Accept Terms, set the payment terms sellers are asked for, or accept a plan, answer its offer and change its renewal. Cards stay off MCP. Returns the data together with response headers and request ID. */
326
389
  saveBillingWithResponse(input, options) { return this.requestDetailed("save_billing", input, options); }
327
390
  /**
328
391
  * Write seller AI Business Rules. Policy content needs an account admin and both policy fields. Approval auto needs acknowledgeNoHumanReview.
@@ -334,13 +397,13 @@ export class Apostra extends Transport {
334
397
  /** Write seller AI Business Rules. Policy content needs an account admin and both policy fields. Approval auto needs acknowledgeNoHumanReview. Returns the data together with response headers and request ID. */
335
398
  saveBusinessRulesWithResponse(input, options) { return this.requestDetailed("save_business_rules", input, options); }
336
399
  /**
337
- * Create, rename, reconcile access, change lifecycle, or prepare a human credential handoff for one buyer agent per call.
400
+ * Create a buyer agent, or with id make one change: name, advertiser access, lifecycle state, or credential handoff.
338
401
  *
339
402
  * @example
340
403
  * await client.saveBuyerAgent(input, { idempotencyKey: 'stable-key' })
341
404
  */
342
405
  saveBuyerAgent(input, options) { return this.request("save_buyer_agent", input, options); }
343
- /** Create, rename, reconcile access, change lifecycle, or prepare a human credential handoff for one buyer agent per call. Returns the data together with response headers and request ID. */
406
+ /** Create a buyer agent, or with id make one change: name, advertiser access, lifecycle state, or credential handoff. Returns the data together with response headers and request ID. */
344
407
  saveBuyerAgentWithResponse(input, options) { return this.requestDetailed("save_buyer_agent", input, options); }
345
408
  /**
346
409
  * Save buyer commercial identity. Read get_status; use identityContract:confirmed-v1 for preview and confirmation. Guide: /v2/setup/v3/identity-setup.
@@ -352,22 +415,22 @@ export class Apostra extends Transport {
352
415
  /** Save buyer commercial identity. Read get_status; use identityContract:confirmed-v1 for preview and confirmation. Guide: /v2/setup/v3/identity-setup. Returns the data together with response headers and request ID. */
353
416
  saveBuyerOperatorWithResponse(input, options) { return this.requestDetailed("save_buyer_operator", input, options); }
354
417
  /**
355
- * Save a campaign. Create needs advertiserId and name; flight and budget are optional. Split inventory choices into separate media buys; presets expand dimensions. To launch, set desiredPhase: active with confirmLaunch: true; omit confirmation to preview. Cancellation never cancels media buys.
418
+ * Create: advertiserId/name; flight/budget optional. Receipts and launch previews show local/UTC times in the applicable IANA timezone. desiredPhase: active previews; confirmLaunch: true launches. Cancellation is irreversible: desiredPhase: canceled cancels the campaign and every live media buy.
356
419
  *
357
420
  * @example
358
421
  * await client.saveCampaign(input, { idempotencyKey: 'stable-key' })
359
422
  */
360
423
  saveCampaign(input, options) { return this.request("save_campaign", input, options); }
361
- /** Save a campaign. Create needs advertiserId and name; flight and budget are optional. Split inventory choices into separate media buys; presets expand dimensions. To launch, set desiredPhase: active with confirmLaunch: true; omit confirmation to preview. Cancellation never cancels media buys. Returns the data together with response headers and request ID. */
424
+ /** Create: advertiserId/name; flight/budget optional. Receipts and launch previews show local/UTC times in the applicable IANA timezone. desiredPhase: active previews; confirmLaunch: true launches. Cancellation is irreversible: desiredPhase: canceled cancels the campaign and every live media buy. Returns the data together with response headers and request ID. */
362
425
  saveCampaignWithResponse(input, options) { return this.requestDetailed("save_campaign", input, options); }
363
426
  /**
364
- * Create or replace one flat catalog declaration by catalogId, or archive it with isArchived. URL saves refetch the feed.
427
+ * Create or replace a catalog: type and exactly one of url (feed URL) or non-empty items are required. If missing, ask the buyer for the feed URL or items before calling. URL saves refetch the feed. To archive, set isArchived: true with identity only; type, url and items are not needed.
365
428
  *
366
429
  * @example
367
430
  * await client.saveCatalog(input, { idempotencyKey: 'stable-key' })
368
431
  */
369
432
  saveCatalog(input, options) { return this.request("save_catalog", input, options); }
370
- /** Create or replace one flat catalog declaration by catalogId, or archive it with isArchived. URL saves refetch the feed. Returns the data together with response headers and request ID. */
433
+ /** Create or replace a catalog: type and exactly one of url (feed URL) or non-empty items are required. If missing, ask the buyer for the feed URL or items before calling. URL saves refetch the feed. To archive, set isArchived: true with identity only; type, url and items are not needed. Returns the data together with response headers and request ID. */
371
434
  saveCatalogWithResponse(input, options) { return this.requestDetailed("save_catalog", input, options); }
372
435
  /**
373
436
  * Manage seller or creative-engine authorization, accounts and advertiser mappings. Seller-only: reporting, selection, billing, policy, activation.
@@ -388,13 +451,13 @@ export class Apostra extends Transport {
388
451
  /** Declare publisher domains this Seller sells and its claimed properties. `domains` replaces the complete set; `add`, `remove`, `declareProperties`, and `removeProperties` change named items only. Read authorization; never assume it. Returns the data together with response headers and request ID. */
389
452
  saveCoverageWithResponse(input, options) { return this.requestDetailed("save_coverage", input, options); }
390
453
  /**
391
- * Save creative in advertiserId/campaignId with name, message, assets, clickUrl, social, sourceAssetRef/sourceAssets. Use exactly one format selector: formatKind/formatParams, creativeFormatId, formatOptionRef. Supplied content/assets only; generate new media (radio spots) via save_creative_session.
454
+ * advertiserId/campaignId:name,message;assets/landing_page_url/social/sourceAssetRef/sourceAssets;Supplied content/assets only;generate new media (radio spots):save_creative_session;exactly one format selector:formatKind/formatParams,creativeFormatId/formatOptionRef;libraryRole:Buyer Account only.
392
455
  *
393
456
  * @example
394
457
  * await client.saveCreative(input, { idempotencyKey: 'stable-key' })
395
458
  */
396
459
  saveCreative(input, options) { return this.request("save_creative", input, options); }
397
- /** Save creative in advertiserId/campaignId with name, message, assets, clickUrl, social, sourceAssetRef/sourceAssets. Use exactly one format selector: formatKind/formatParams, creativeFormatId, formatOptionRef. Supplied content/assets only; generate new media (radio spots) via save_creative_session. Returns the data together with response headers and request ID. */
460
+ /** advertiserId/campaignId:name,message;assets/landing_page_url/social/sourceAssetRef/sourceAssets;Supplied content/assets only;generate new media (radio spots):save_creative_session;exactly one format selector:formatKind/formatParams,creativeFormatId/formatOptionRef;libraryRole:Buyer Account only. Returns the data together with response headers and request ID. */
398
461
  saveCreativeWithResponse(input, options) { return this.requestDetailed("save_creative", input, options); }
399
462
  /**
400
463
  * Manage collections. Create with one owner and name: campaignId or advertiserId. Only advertiser mutations of an existing collection need expectedUpdatedAt; campaign writes and creates do not. isArchived archives or restores advertiser collections.
@@ -406,13 +469,13 @@ export class Apostra extends Transport {
406
469
  /** Manage collections. Create with one owner and name: campaignId or advertiserId. Only advertiser mutations of an existing collection need expectedUpdatedAt; campaign writes and creates do not. isArchived archives or restores advertiser collections. Returns the data together with response headers and request ID. */
407
470
  saveCreativeCollectionWithResponse(input, options) { return this.requestDetailed("save_creative_collection", input, options); }
408
471
  /**
409
- * Create image, video, or voice/audio variants from a brief (including radio spots). Scope: campaign/campaignId or advertiser/advertiserId.
472
+ * Save a Creative Session for image, video, or voice/audio (including radio spots) from a brief: its draft, selected output, approval, or finalisation. It never generates; generate_variants does. To save an approved output to the Library, use save_creative with fromCreativeSessionOutput.
410
473
  *
411
474
  * @example
412
475
  * await client.saveCreativeSession(input, { idempotencyKey: 'stable-key' })
413
476
  */
414
477
  saveCreativeSession(input, options) { return this.request("save_creative_session", input, options); }
415
- /** Create image, video, or voice/audio variants from a brief (including radio spots). Scope: campaign/campaignId or advertiser/advertiserId. Returns the data together with response headers and request ID. */
478
+ /** Save a Creative Session for image, video, or voice/audio (including radio spots) from a brief: its draft, selected output, approval, or finalisation. It never generates; generate_variants does. To save an approved output to the Library, use save_creative with fromCreativeSessionOutput. Returns the data together with response headers and request ID. */
416
479
  saveCreativeSessionWithResponse(input, options) { return this.requestDetailed("save_creative_session", input, options); }
417
480
  /**
418
481
  * Create a dimension, or update an existing dimension by its id. Tags is built in and open. Labels belong only to objects in appliesTo.
@@ -424,13 +487,13 @@ export class Apostra extends Transport {
424
487
  /** Create a dimension, or update an existing dimension by its id. Tags is built in and open. Labels belong only to objects in appliesTo. Returns the data together with response headers and request ID. */
425
488
  saveDimensionWithResponse(input, options) { return this.requestDetailed("save_dimension", input, options); }
426
489
  /**
427
- * Subscribe to a connected seller's directed campaigns, mirroring its media buys into this buyer's view. Set `unsubscribe: true` to remove the subscription and retire mirrored campaigns. Requires a mapped seller account and reachable advertiser.
490
+ * Import native campaigns from Spotify Ads Manager or other platforms, including future-start campaigns, as read-only mirrors. Confirm ongoing sync first. No provider changes. /v3/import-existing-campaigns.
428
491
  *
429
492
  * @example
430
493
  * await client.saveDirectedCampaignSubscription(input, { idempotencyKey: 'stable-key' })
431
494
  */
432
495
  saveDirectedCampaignSubscription(input, options) { return this.request("save_directed_campaign_subscription", input, options); }
433
- /** Subscribe to a connected seller's directed campaigns, mirroring its media buys into this buyer's view. Set `unsubscribe: true` to remove the subscription and retire mirrored campaigns. Requires a mapped seller account and reachable advertiser. Returns the data together with response headers and request ID. */
496
+ /** Import native campaigns from Spotify Ads Manager or other platforms, including future-start campaigns, as read-only mirrors. Confirm ongoing sync first. No provider changes. /v3/import-existing-campaigns. Returns the data together with response headers and request ID. */
434
497
  saveDirectedCampaignSubscriptionWithResponse(input, options) { return this.requestDetailed("save_directed_campaign_subscription", input, options); }
435
498
  /**
436
499
  * Create, change, archive, or restore up to 50 advertiser conversion event sources (pixels, server feeds). Each entry is keyed by eventSourceId and succeeds or fails alone. Setup is not proof events flow: check health with get, then use eventSourceId in an optimization goal.
@@ -442,14 +505,23 @@ export class Apostra extends Transport {
442
505
  /** Create, change, archive, or restore up to 50 advertiser conversion event sources (pixels, server feeds). Each entry is keyed by eventSourceId and succeeds or fails alone. Setup is not proof events flow: check health with get, then use eventSourceId in an optimization goal. Returns the data together with response headers and request ID. */
443
506
  saveEventSourceWithResponse(input, options) { return this.requestDetailed("save_event_source", input, options); }
444
507
  /**
445
- * Create or update where a seller's inventory comes from. Pass `id` to change an existing source, omit it to add one. Credentials are never passed here — a source that needs a secret comes back with the state and the page that collects it.
508
+ * Create or update where a seller's inventory comes from. Pass `id` to change a source or omit it to add one. Pass only `agentId` or `adServer` to open the form that connects an agent or an ad server. Credentials are never passed here; a source that needs one returns the page that collects it.
446
509
  *
447
510
  * @example
448
511
  * await client.saveInventorySource(input, { idempotencyKey: 'stable-key' })
449
512
  */
450
513
  saveInventorySource(input, options) { return this.request("save_inventory_source", input, options); }
451
- /** Create or update where a seller's inventory comes from. Pass `id` to change an existing source, omit it to add one. Credentials are never passed here — a source that needs a secret comes back with the state and the page that collects it. Returns the data together with response headers and request ID. */
514
+ /** Create or update where a seller's inventory comes from. Pass `id` to change a source or omit it to add one. Pass only `agentId` or `adServer` to open the form that connects an agent or an ad server. Credentials are never passed here; a source that needs one returns the page that collects it. Returns the data together with response headers and request ID. */
452
515
  saveInventorySourceWithResponse(input, options) { return this.requestDetailed("save_inventory_source", input, options); }
516
+ /**
517
+ * Manage seller lessons in a seller account context; use switch_account first. propose requires lesson; approve and retire require lessonId; preview requires lessonId and brief. Preserve seller words from a private Session note and ask if kind or scope is unclear.
518
+ *
519
+ * @example
520
+ * await client.saveLesson(input, { idempotencyKey: 'stable-key' })
521
+ */
522
+ saveLesson(input, options) { return this.request("save_lesson", input, options); }
523
+ /** Manage seller lessons in a seller account context; use switch_account first. propose requires lesson; approve and retire require lessonId; preview requires lessonId and brief. Preserve seller words from a private Session note and ask if kind or scope is unclear. Returns the data together with response headers and request ID. */
524
+ saveLessonWithResponse(input, options) { return this.requestDetailed("save_lesson", input, options); }
453
525
  /**
454
526
  * Open a seller library request or close it with seller Material.
455
527
  *
@@ -460,13 +532,13 @@ export class Apostra extends Transport {
460
532
  /** Open a seller library request or close it with seller Material. Returns the data together with response headers and request ID. */
461
533
  saveLibraryRequestWithResponse(input, options) { return this.requestDetailed("save_library_request", input, options); }
462
534
  /**
463
- * Register, revise, archive, restore, or reprocess seller Materials; manage candidate decisions and receipts; mark a slide, page, or sheet reusable only when it has no commercial figures (UNIT_NOT_REUSABLE_KIND rejects document containers, UNIT_CONTAINS_PRICING rejects priced units).
535
+ * Create or update seller Materials. Seller beta: preview, delete, Undo deletion, or Include again for one imported Library document. Delete archives it, excludes its source until Include again, and purges it after 30 days. https://docs.apostra.com/v3/delete-from-apostra
464
536
  *
465
537
  * @example
466
538
  * await client.saveMaterial(input, { idempotencyKey: 'stable-key' })
467
539
  */
468
540
  saveMaterial(input, options) { return this.request("save_material", input, options); }
469
- /** Register, revise, archive, restore, or reprocess seller Materials; manage candidate decisions and receipts; mark a slide, page, or sheet reusable only when it has no commercial figures (UNIT_NOT_REUSABLE_KIND rejects document containers, UNIT_CONTAINS_PRICING rejects priced units). Returns the data together with response headers and request ID. */
541
+ /** Create or update seller Materials. Seller beta: preview, delete, Undo deletion, or Include again for one imported Library document. Delete archives it, excludes its source until Include again, and purges it after 30 days. https://docs.apostra.com/v3/delete-from-apostra Returns the data together with response headers and request ID. */
470
542
  saveMaterialWithResponse(input, options) { return this.requestDetailed("save_material", input, options); }
471
543
  /**
472
544
  * Create DRAFT buy; no spend until confirmed. Meta: shared campaign=seller_optimized; ad sets=fixed; ask if unclear. Shared: omit buy/product budgets. Pause/resume: mediaBuyId + isPaused. Proposal: flight + total budget; omit products. channelGroupId: required if grouped; invalid ungrouped/updates.
@@ -487,49 +559,58 @@ export class Apostra extends Transport {
487
559
  /** Deprecated compatibility tool ("listing" is the modern term). It writes only the legacy businessProfile and does not update the canonical buyer-visible listing. New clients must read with `get({ kind: "seller", include: ["listing"] })` and write with `save_seller`. Returns the data together with response headers and request ID. */
488
560
  saveMediaKitWithResponse(input, options) { return this.requestDetailed("save_media_kit", input, options); }
489
561
  /**
490
- * Create or update a notification subscription: scope, content, routes; no trigger type is creatable yet, no delivery policy yet. Omit subscriptionId to create, supply it to patch. Managed subscriptions are editable only within their mutability. Credentials belong to save_integration.
562
+ * Create or update a notification subscription. Omit subscriptionId to create; managed subscriptions permit only mutable fields. Use save_integration for credentials when needed.
491
563
  *
492
564
  * @example
493
565
  * await client.saveNotificationConfig(input, { idempotencyKey: 'stable-key' })
494
566
  */
495
567
  saveNotificationConfig(input, options) { return this.request("save_notification_config", input, options); }
496
- /** Create or update a notification subscription: scope, content, routes; no trigger type is creatable yet, no delivery policy yet. Omit subscriptionId to create, supply it to patch. Managed subscriptions are editable only within their mutability. Credentials belong to save_integration. Returns the data together with response headers and request ID. */
568
+ /** Create or update a notification subscription. Omit subscriptionId to create; managed subscriptions permit only mutable fields. Use save_integration for credentials when needed. Returns the data together with response headers and request ID. */
497
569
  saveNotificationConfigWithResponse(input, options) { return this.requestDetailed("save_notification_config", input, options); }
498
570
  /**
499
- * Write how the seller sells. `active` creates and activates a new version in one step — no separate activate; the response names the version created and replaced. `pricing` replaces the whole fact list. `discounts` sets or removes brand/operator rules one by one. Halves never roll back each other.
571
+ * Write selling guidance. `active` turns Playbook prose and its optional seller note into proposed Lessons; the active Playbook is unchanged. `pricing` replaces facts. `discounts` sets or removes brand/operator rules. Halves never roll back each other.
500
572
  *
501
573
  * @example
502
574
  * await client.savePlaybook(input, { idempotencyKey: 'stable-key' })
503
575
  */
504
576
  savePlaybook(input, options) { return this.request("save_playbook", input, options); }
505
- /** Write how the seller sells. `active` creates and activates a new version in one step — no separate activate; the response names the version created and replaced. `pricing` replaces the whole fact list. `discounts` sets or removes brand/operator rules one by one. Halves never roll back each other. Returns the data together with response headers and request ID. */
577
+ /** Write selling guidance. `active` turns Playbook prose and its optional seller note into proposed Lessons; the active Playbook is unchanged. `pricing` replaces facts. `discounts` sets or removes brand/operator rules. Halves never roll back each other. Returns the data together with response headers and request ID. */
506
578
  savePlaybookWithResponse(input, options) { return this.requestDetailed("save_playbook", input, options); }
507
579
  /**
508
- * Create, update, archive, or AAO-check an advertiser property list. Check uses identifiers without saving. Search/get read saved lists.
580
+ * Create, update, archive, restore, or AAO-check an advertiser property list. Check uses identifiers without saving. Search/get read saved lists.
509
581
  *
510
582
  * @example
511
583
  * await client.savePropertyList(input, { idempotencyKey: 'stable-key' })
512
584
  */
513
585
  savePropertyList(input, options) { return this.request("save_property_list", input, options); }
514
- /** Create, update, archive, or AAO-check an advertiser property list. Check uses identifiers without saving. Search/get read saved lists. Returns the data together with response headers and request ID. */
586
+ /** Create, update, archive, restore, or AAO-check an advertiser property list. Check uses identifiers without saving. Search/get read saved lists. Returns the data together with response headers and request ID. */
515
587
  savePropertyListWithResponse(input, options) { return this.requestDetailed("save_property_list", input, options); }
516
588
  /**
517
- * Save RFPs and turns: imported origins, typed feedback, response pairs, endorsement, and proposal-file requests.
589
+ * Save an RFP: create it from an origin, revise it with a new request, endorse or unendorse its response, or attach an imported response. A turn’s feedback, release, proposal files and outcome use save_rfp_turn.
518
590
  *
519
591
  * @example
520
592
  * await client.saveRfp(input, { idempotencyKey: 'stable-key' })
521
593
  */
522
594
  saveRfp(input, options) { return this.request("save_rfp", input, options); }
523
- /** Save RFPs and turns: imported origins, typed feedback, response pairs, endorsement, and proposal-file requests. Returns the data together with response headers and request ID. */
595
+ /** Save an RFP: create it from an origin, revise it with a new request, endorse or unendorse its response, or attach an imported response. A turn’s feedback, release, proposal files and outcome use save_rfp_turn. Returns the data together with response headers and request ID. */
524
596
  saveRfpWithResponse(input, options) { return this.requestDetailed("save_rfp", input, options); }
525
597
  /**
526
- * Save Seller identity, capabilities, Apostra listing, buyer-visible listing (mediaKit is a deprecated alias), Distribution's OpenAI challenge token, or a seller-controlled admission. Scope3 eligibility and Market Maker entitlements are read-only here. Read Distribution with get(kind:"distribution").
598
+ * Change one RFP turn: release it, request or cancel a proposal file, append feedback, or record its outcome. One of these per call; revise, endorse and attach a response with save_rfp.
599
+ *
600
+ * @example
601
+ * await client.saveRfpTurn(input, { idempotencyKey: 'stable-key' })
602
+ */
603
+ saveRfpTurn(input, options) { return this.request("save_rfp_turn", input, options); }
604
+ /** Change one RFP turn: release it, request or cancel a proposal file, append feedback, or record its outcome. One of these per call; revise, endorse and attach a response with save_rfp. Returns the data together with response headers and request ID. */
605
+ saveRfpTurnWithResponse(input, options) { return this.requestDetailed("save_rfp_turn", input, options); }
606
+ /**
607
+ * Save Seller identity, capabilities, Apostra listing, buyer-visible listing (mediaKit is a deprecated alias), Distribution's OpenAI challenge token, an admission, or the intake hold. Scope3 eligibility and Market Maker entitlements are read-only here. Read Distribution with get(kind:"distribution").
527
608
  *
528
609
  * @example
529
610
  * await client.saveSeller(input, { idempotencyKey: 'stable-key' })
530
611
  */
531
612
  saveSeller(input, options) { return this.request("save_seller", input, options); }
532
- /** Save Seller identity, capabilities, Apostra listing, buyer-visible listing (mediaKit is a deprecated alias), Distribution's OpenAI challenge token, or a seller-controlled admission. Scope3 eligibility and Market Maker entitlements are read-only here. Read Distribution with get(kind:"distribution"). Returns the data together with response headers and request ID. */
613
+ /** Save Seller identity, capabilities, Apostra listing, buyer-visible listing (mediaKit is a deprecated alias), Distribution's OpenAI challenge token, an admission, or the intake hold. Scope3 eligibility and Market Maker entitlements are read-only here. Read Distribution with get(kind:"distribution"). Returns the data together with response headers and request ID. */
533
614
  saveSellerWithResponse(input, options) { return this.requestDetailed("save_seller", input, options); }
534
615
  /**
535
616
  * Create, replace, or archive a signal. Managed writes need a complete draft; read before updates. Without sourceId, writes the seller catalog.