@apostra/sdk 0.38.0 → 0.40.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,7 +1,21 @@
1
- export declare const version = "0.38.0";
1
+ export declare const version = "0.40.0";
2
2
  export declare const baseUrl = "https://api.apostra.com/api/v3";
3
3
  export declare const m2mTokenUrl = "https://identity.scope3.com/oauth2/token";
4
4
  export declare const operations: {
5
+ readonly confirm_payment_authority: {
6
+ readonly path: "/tools/confirm_payment_authority";
7
+ readonly method: "POST";
8
+ readonly body: true;
9
+ readonly binary: false;
10
+ readonly idempotencyKey: true;
11
+ readonly parameters: readonly [];
12
+ readonly security: readonly [{
13
+ readonly apiKeyAuth: readonly [];
14
+ }, {
15
+ readonly m2mOAuth: readonly ["interchange:write"];
16
+ }];
17
+ readonly summary: "Issue the hosted card-capture link for a token from request_payment_authority. Give the link to the cardholder; cards stay off MCP.";
18
+ };
5
19
  readonly downloadV3PublicDocumentRevision: {
6
20
  readonly path: "/documents/{documentId}/revisions/{revisionId}/download";
7
21
  readonly method: "GET";
@@ -164,7 +178,22 @@ export declare const operations: {
164
178
  }, {
165
179
  readonly m2mOAuth: readonly ["interchange:read"];
166
180
  }];
167
- readonly summary: "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.";
181
+ readonly summary: "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.";
182
+ };
183
+ readonly log_event: {
184
+ readonly path: "/tools/log_event";
185
+ readonly method: "POST";
186
+ readonly body: true;
187
+ readonly binary: false;
188
+ readonly idempotencyKey: true;
189
+ readonly bodyKeyField: "idempotencyKey";
190
+ readonly parameters: readonly [];
191
+ readonly security: readonly [{
192
+ readonly apiKeyAuth: readonly [];
193
+ }, {
194
+ readonly m2mOAuth: readonly ["interchange:write"];
195
+ }];
196
+ readonly summary: "Send up to 10,000 AdCP conversion events (log_event) to an event source the advertiser registered with save_event_source. Events must also pass the v2 rules: no raw email or phone in user_match, each event_type + event_id once per call. One invalid event refuses the whole call.";
168
197
  };
169
198
  readonly open_advertisers_page: {
170
199
  readonly path: "/tools/open_advertisers_page";
@@ -180,6 +209,20 @@ export declare const operations: {
180
209
  }];
181
210
  readonly summary: "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\").";
182
211
  };
212
+ readonly open_agent_certification_page: {
213
+ readonly path: "/tools/open_agent_certification_page";
214
+ readonly method: "POST";
215
+ readonly body: true;
216
+ readonly binary: false;
217
+ readonly idempotencyKey: false;
218
+ readonly parameters: readonly [];
219
+ readonly security: readonly [{
220
+ readonly apiKeyAuth: readonly [];
221
+ }, {
222
+ readonly m2mOAuth: readonly ["interchange:read"];
223
+ }];
224
+ readonly summary: "Open one agent’s Test & certify Page: live certification per use case, recent test runs, AdCP 4.0 readiness and capability declarations. Read-only.";
225
+ };
183
226
  readonly open_agent_page: {
184
227
  readonly path: "/tools/open_agent_page";
185
228
  readonly method: "POST";
@@ -190,10 +233,38 @@ export declare const operations: {
190
233
  readonly security: readonly [{
191
234
  readonly apiKeyAuth: readonly [];
192
235
  }, {
193
- readonly m2mOAuth: readonly ["interchange:admin"];
236
+ readonly m2mOAuth: readonly ["interchange:read"];
194
237
  }];
195
238
  readonly summary: "Open one agent owned by this Developer account.";
196
239
  };
240
+ readonly open_agent_sources_page: {
241
+ readonly path: "/tools/open_agent_sources_page";
242
+ readonly method: "POST";
243
+ readonly body: true;
244
+ readonly binary: false;
245
+ readonly idempotencyKey: false;
246
+ readonly parameters: readonly [];
247
+ readonly security: readonly [{
248
+ readonly apiKeyAuth: readonly [];
249
+ }, {
250
+ readonly m2mOAuth: readonly ["interchange:read"];
251
+ }];
252
+ readonly summary: "Open one agent’s Inventory sources Page: the inventory sources it powers and the health of each. Read-only.";
253
+ };
254
+ readonly open_agent_webhooks_page: {
255
+ readonly path: "/tools/open_agent_webhooks_page";
256
+ readonly method: "POST";
257
+ readonly body: true;
258
+ readonly binary: false;
259
+ readonly idempotencyKey: false;
260
+ readonly parameters: readonly [];
261
+ readonly security: readonly [{
262
+ readonly apiKeyAuth: readonly [];
263
+ }, {
264
+ readonly m2mOAuth: readonly ["interchange:read"];
265
+ }];
266
+ readonly summary: "Open one agent’s Webhooks Page: its recent inbound webhook outcomes, each refusal with its reason. Read-only.";
267
+ };
197
268
  readonly open_agents_page: {
198
269
  readonly path: "/tools/open_agents_page";
199
270
  readonly method: "POST";
@@ -204,7 +275,7 @@ export declare const operations: {
204
275
  readonly security: readonly [{
205
276
  readonly apiKeyAuth: readonly [];
206
277
  }, {
207
- readonly m2mOAuth: readonly ["interchange:admin"];
278
+ readonly m2mOAuth: readonly ["interchange:read"];
208
279
  }];
209
280
  readonly summary: "Open Build an agent for this Developer account.";
210
281
  };
@@ -262,7 +333,7 @@ export declare const operations: {
262
333
  }, {
263
334
  readonly m2mOAuth: readonly ["interchange:read"];
264
335
  }];
265
- readonly summary: "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.";
336
+ readonly summary: "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.";
266
337
  };
267
338
  readonly open_creative_engines_page: {
268
339
  readonly path: "/tools/open_creative_engines_page";
@@ -292,6 +363,20 @@ export declare const operations: {
292
363
  }];
293
364
  readonly summary: "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.";
294
365
  };
366
+ readonly open_developer_home: {
367
+ readonly path: "/tools/open_developer_home";
368
+ readonly method: "POST";
369
+ readonly body: true;
370
+ readonly binary: false;
371
+ readonly idempotencyKey: false;
372
+ readonly parameters: readonly [];
373
+ readonly security: readonly [{
374
+ readonly apiKeyAuth: readonly [];
375
+ }, {
376
+ readonly m2mOAuth: readonly ["interchange:read"];
377
+ }];
378
+ readonly summary: "Open the Developer home for this Developer account: its agents, their stages and what to do next.";
379
+ };
295
380
  readonly open_media_buys_page: {
296
381
  readonly path: "/tools/open_media_buys_page";
297
382
  readonly method: "POST";
@@ -304,7 +389,21 @@ export declare const operations: {
304
389
  }, {
305
390
  readonly m2mOAuth: readonly ["interchange:read"];
306
391
  }];
307
- readonly summary: "Open the Seller Media Buys Page. Optionally focus one seller-owned account relationship and its buys or creatives; the Page self-fetches.";
392
+ readonly summary: "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.";
393
+ };
394
+ readonly open_media_partners_page: {
395
+ readonly path: "/tools/open_media_partners_page";
396
+ readonly method: "POST";
397
+ readonly body: true;
398
+ readonly binary: false;
399
+ readonly idempotencyKey: false;
400
+ readonly parameters: readonly [];
401
+ readonly security: readonly [{
402
+ readonly apiKeyAuth: readonly [];
403
+ }, {
404
+ readonly m2mOAuth: readonly ["interchange:read"];
405
+ }];
406
+ readonly summary: "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.";
308
407
  };
309
408
  readonly open_page: {
310
409
  readonly path: "/tools/open_page";
@@ -318,7 +417,7 @@ export declare const operations: {
318
417
  }, {
319
418
  readonly m2mOAuth: readonly ["interchange:read"];
320
419
  }];
321
- readonly summary: "Open a compatibility Page. source_diagnostics can create or attach the Agent. External hosts may return text. Credentials and authority changes remain human ceremonies.";
420
+ readonly summary: "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.";
322
421
  };
323
422
  readonly open_proposal_pass: {
324
423
  readonly path: "/tools/open_proposal_pass";
@@ -374,7 +473,7 @@ export declare const operations: {
374
473
  }, {
375
474
  readonly m2mOAuth: readonly ["interchange:write"];
376
475
  }];
377
- readonly summary: "Rechecks one external sales-agent source with no-spend get_products. Returns evidence IDs and seller readiness; no source configuration or media buy.";
476
+ readonly summary: "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.";
378
477
  };
379
478
  readonly request_buyer_child_account: {
380
479
  readonly path: "/tools/request_buyer_child_account";
@@ -391,6 +490,20 @@ export declare const operations: {
391
490
  }];
392
491
  readonly summary: "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.";
393
492
  };
493
+ readonly request_payment_authority: {
494
+ readonly path: "/tools/request_payment_authority";
495
+ readonly method: "POST";
496
+ readonly body: true;
497
+ readonly binary: false;
498
+ readonly idempotencyKey: true;
499
+ readonly parameters: readonly [];
500
+ readonly security: readonly [{
501
+ readonly apiKeyAuth: readonly [];
502
+ }, {
503
+ readonly m2mOAuth: readonly ["interchange:write"];
504
+ }];
505
+ readonly summary: "Stage a card handoff for the organization and return a confirmation token. No link is issued until confirm_payment_authority.";
506
+ };
394
507
  readonly request_proposals: {
395
508
  readonly path: "/tools/request_proposals";
396
509
  readonly method: "POST";
@@ -404,7 +517,7 @@ export declare const operations: {
404
517
  }, {
405
518
  readonly m2mOAuth: readonly ["interchange:write"];
406
519
  }];
407
- readonly summary: "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.";
520
+ readonly summary: "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.";
408
521
  };
409
522
  readonly request_seller_reporting_update: {
410
523
  readonly path: "/tools/request_seller_reporting_update";
@@ -446,7 +559,7 @@ export declare const operations: {
446
559
  }, {
447
560
  readonly m2mOAuth: readonly ["interchange:admin"];
448
561
  }];
449
- readonly summary: "Rename an existing direct child Account or update settings.company. Never provisions, archives, or changes owners or members; use Account settings for access changes.";
562
+ readonly summary: "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.";
450
563
  };
451
564
  readonly save_advertiser: {
452
565
  readonly path: "/tools/save_advertiser";
@@ -462,20 +575,6 @@ export declare const operations: {
462
575
  }];
463
576
  readonly summary: "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.";
464
577
  };
465
- readonly save_advertiser_access: {
466
- readonly path: "/tools/save_advertiser_access";
467
- readonly method: "POST";
468
- readonly body: true;
469
- readonly binary: false;
470
- readonly idempotencyKey: true;
471
- readonly parameters: readonly [];
472
- readonly security: readonly [{
473
- readonly apiKeyAuth: readonly [];
474
- }, {
475
- readonly m2mOAuth: readonly ["interchange:admin"];
476
- }];
477
- readonly summary: "Invite a client to one of your advertisers, approve, suspend, reactivate, or revoke a client, or change a client's role. Read get kind advertiser_access first and use only what it offers. Needs an organization administrator signed in directly.";
478
- };
479
578
  readonly save_advertiser_grant: {
480
579
  readonly path: "/tools/save_advertiser_grant";
481
580
  readonly method: "POST";
@@ -516,7 +615,7 @@ export declare const operations: {
516
615
  }, {
517
616
  readonly m2mOAuth: readonly ["interchange:write"];
518
617
  }];
519
- readonly summary: "Save a Sales Agent mode, register an Agent, or update an owned Agent: rename it or say it is ready for certification. Select seller_save, developer_create, or developer_update.";
618
+ readonly summary: "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.";
520
619
  };
521
620
  readonly save_ask: {
522
621
  readonly path: "/tools/save_ask";
@@ -558,7 +657,7 @@ export declare const operations: {
558
657
  }, {
559
658
  readonly m2mOAuth: readonly ["interchange:read"];
560
659
  }];
561
- readonly summary: "Accept Terms, set seller terms, or manage payment authority. Cards stay off MCP.";
660
+ readonly summary: "Accept Terms, set the payment terms sellers are asked for, or accept a plan, answer its offer and change its renewal. Accepting a plan needs an administrator to approve it on our site. Cards stay off MCP.";
562
661
  };
563
662
  readonly save_business_rules: {
564
663
  readonly path: "/tools/save_business_rules";
@@ -586,7 +685,7 @@ export declare const operations: {
586
685
  }, {
587
686
  readonly m2mOAuth: readonly ["interchange:admin"];
588
687
  }];
589
- readonly summary: "Create or manage one buyer agent.";
688
+ readonly summary: "Create a buyer agent, or with id make one change: name, advertiser access, lifecycle state, or credential handoff.";
590
689
  };
591
690
  readonly save_buyer_operator: {
592
691
  readonly path: "/tools/save_buyer_operator";
@@ -615,7 +714,7 @@ export declare const operations: {
615
714
  }, {
616
715
  readonly m2mOAuth: readonly ["interchange:write"];
617
716
  }];
618
- readonly summary: "Save a campaign. To create, send advertiserId and name; flight and budget are optional. Split inventory into media buys. Set desiredPhase: active to launch; omit confirmLaunch to preview. Cancellation is irreversible: desiredPhase: canceled cancels the campaign and every live media buy.";
717
+ readonly summary: "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.";
619
718
  };
620
719
  readonly save_catalog: {
621
720
  readonly path: "/tools/save_catalog";
@@ -672,7 +771,7 @@ export declare const operations: {
672
771
  }, {
673
772
  readonly m2mOAuth: readonly ["interchange:write"];
674
773
  }];
675
- readonly summary: "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.";
774
+ readonly summary: "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.";
676
775
  };
677
776
  readonly save_creative_collection: {
678
777
  readonly path: "/tools/save_creative_collection";
@@ -700,7 +799,7 @@ export declare const operations: {
700
799
  }, {
701
800
  readonly m2mOAuth: readonly ["interchange:write"];
702
801
  }];
703
- readonly summary: "Create image, video, or voice/audio variants from a brief (including radio spots). Scope: campaign/campaignId or advertiser/advertiserId.";
802
+ readonly summary: "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.";
704
803
  };
705
804
  readonly save_dimension: {
706
805
  readonly path: "/tools/save_dimension";
@@ -758,7 +857,7 @@ export declare const operations: {
758
857
  }, {
759
858
  readonly m2mOAuth: readonly ["interchange:write"];
760
859
  }];
761
- readonly summary: "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.";
860
+ readonly summary: "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.";
762
861
  };
763
862
  readonly save_lesson: {
764
863
  readonly path: "/tools/save_lesson";
@@ -772,7 +871,7 @@ export declare const operations: {
772
871
  }, {
773
872
  readonly m2mOAuth: readonly ["interchange:write"];
774
873
  }];
775
- readonly summary: "Manage seller lessons. 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.";
874
+ readonly summary: "Manage seller lessons in a seller account; send the accountId of that account. 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.";
776
875
  };
777
876
  readonly save_library_request: {
778
877
  readonly path: "/tools/save_library_request";
@@ -800,7 +899,7 @@ export declare const operations: {
800
899
  }, {
801
900
  readonly m2mOAuth: readonly ["interchange:write"];
802
901
  }];
803
- readonly summary: "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).";
902
+ readonly summary: "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";
804
903
  };
805
904
  readonly save_media_buy: {
806
905
  readonly path: "/tools/save_media_buy";
@@ -857,7 +956,7 @@ export declare const operations: {
857
956
  }, {
858
957
  readonly m2mOAuth: readonly ["interchange:write"];
859
958
  }];
860
- readonly summary: "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.";
959
+ readonly summary: "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.";
861
960
  };
862
961
  readonly save_property_list: {
863
962
  readonly path: "/tools/save_property_list";
@@ -879,13 +978,29 @@ export declare const operations: {
879
978
  readonly body: true;
880
979
  readonly binary: false;
881
980
  readonly idempotencyKey: true;
981
+ readonly bodyKeyField: "clientRequestId";
982
+ readonly parameters: readonly [];
983
+ readonly security: readonly [{
984
+ readonly apiKeyAuth: readonly [];
985
+ }, {
986
+ readonly m2mOAuth: readonly ["interchange:write"];
987
+ }];
988
+ readonly summary: "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.";
989
+ };
990
+ readonly save_rfp_turn: {
991
+ readonly path: "/tools/save_rfp_turn";
992
+ readonly method: "POST";
993
+ readonly body: true;
994
+ readonly binary: false;
995
+ readonly idempotencyKey: true;
996
+ readonly bodyKeyField: "clientRequestId";
882
997
  readonly parameters: readonly [];
883
998
  readonly security: readonly [{
884
999
  readonly apiKeyAuth: readonly [];
885
1000
  }, {
886
1001
  readonly m2mOAuth: readonly ["interchange:write"];
887
1002
  }];
888
- readonly summary: "Save RFPs and turns: imported origins, typed feedback, response pairs, endorsement, and proposal-file requests.";
1003
+ readonly summary: "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.";
889
1004
  };
890
1005
  readonly save_seller: {
891
1006
  readonly path: "/tools/save_seller";
@@ -899,7 +1014,7 @@ export declare const operations: {
899
1014
  }, {
900
1015
  readonly m2mOAuth: readonly ["interchange:write"];
901
1016
  }];
902
- readonly summary: "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\").";
1017
+ readonly summary: "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\").";
903
1018
  };
904
1019
  readonly save_signal: {
905
1020
  readonly path: "/tools/save_signal";