@adviverse/mcp 0.1.0 → 0.1.2
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/dist/http.js +570 -139
- package/dist/index.js +570 -139
- package/package.json +10 -2
package/dist/index.js
CHANGED
|
@@ -32,11 +32,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
mod
|
|
33
33
|
));
|
|
34
34
|
|
|
35
|
-
// ../../node_modules/.pnpm/tsup@8.5.
|
|
35
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.7.0_postcss@8.5.29_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js
|
|
36
36
|
import path from "path";
|
|
37
37
|
import { fileURLToPath } from "url";
|
|
38
38
|
var init_esm_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.5.
|
|
39
|
+
"../../node_modules/.pnpm/tsup@8.5.1_jiti@2.7.0_postcss@8.5.29_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -13172,6 +13172,16 @@ var AuthResource = class extends Resource {
|
|
|
13172
13172
|
resetPassword(token, password) {
|
|
13173
13173
|
return this.c.request("POST", "/v1/auth/reset-password", { body: { token, password } });
|
|
13174
13174
|
}
|
|
13175
|
+
/**
|
|
13176
|
+
* Set or change the signed-in account's password. Omit `currentPassword` when
|
|
13177
|
+
* the account is SSO-only (setting a password for the first time so email+password
|
|
13178
|
+
* login also works); it's required when changing an existing password.
|
|
13179
|
+
*/
|
|
13180
|
+
setPassword(newPassword, currentPassword) {
|
|
13181
|
+
return this.c.request("POST", "/v1/auth/password", {
|
|
13182
|
+
body: { newPassword, ...currentPassword ? { currentPassword } : {} }
|
|
13183
|
+
});
|
|
13184
|
+
}
|
|
13175
13185
|
login(body) {
|
|
13176
13186
|
return this.c.request("POST", "/v1/auth/login", { body });
|
|
13177
13187
|
}
|
|
@@ -13242,6 +13252,10 @@ var ReportingResource = class extends Resource {
|
|
|
13242
13252
|
publisherPlacements(query) {
|
|
13243
13253
|
return this.c.request("GET", "/v1/reporting/publisher/placements", { query });
|
|
13244
13254
|
}
|
|
13255
|
+
/** Anti-adblock: impressions recovered from adblock visitors (first-party serving). */
|
|
13256
|
+
antiAdblock(query) {
|
|
13257
|
+
return this.c.request("GET", "/v1/reporting/publisher/anti-adblock", { query });
|
|
13258
|
+
}
|
|
13245
13259
|
advertiser(query) {
|
|
13246
13260
|
return this.c.request("GET", "/v1/reporting/advertiser", { query });
|
|
13247
13261
|
}
|
|
@@ -13259,7 +13273,13 @@ var ReportingResource = class extends Resource {
|
|
|
13259
13273
|
reach(query) {
|
|
13260
13274
|
return this.c.request("GET", "/v1/reporting/reach", { query });
|
|
13261
13275
|
}
|
|
13262
|
-
/**
|
|
13276
|
+
/**
|
|
13277
|
+
* Breakdown over a dimension the hourly rollup drops
|
|
13278
|
+
* (bdim=os|browser|deal|page|page_url|app|property). 'page' groups by site
|
|
13279
|
+
* (host), 'page_url' by individual page (host+path), 'app' by in-app/in-game
|
|
13280
|
+
* app id, 'property' by owning property (app/site). Rows carry impressions,
|
|
13281
|
+
* clicks, ctr, revenue (publisher earnings or advertiser spend) and ecpm.
|
|
13282
|
+
*/
|
|
13263
13283
|
breakdown(query) {
|
|
13264
13284
|
return this.c.request("GET", "/v1/reporting/breakdown", { query });
|
|
13265
13285
|
}
|
|
@@ -13335,6 +13355,23 @@ var ReportingResource = class extends Resource {
|
|
|
13335
13355
|
viewability(query) {
|
|
13336
13356
|
return this.c.request("GET", "/v1/reporting/viewability", { query });
|
|
13337
13357
|
}
|
|
13358
|
+
/** Video completion: the funnel (starts → quartiles → completes) and completion
|
|
13359
|
+
* rate / VTR, plus a per-placement (publisher) or per-campaign (advertiser)
|
|
13360
|
+
* breakdown. Returns { funnel, breakdown }. */
|
|
13361
|
+
video(query) {
|
|
13362
|
+
return this.c.request("GET", "/v1/reporting/video", { query });
|
|
13363
|
+
}
|
|
13364
|
+
/** Affiliate sub-id funnel: impressions → clicks → conversions per sub-id, with
|
|
13365
|
+
* CTR / CVR / revenue / payout. `sub` picks which of sub1..sub5 to group by
|
|
13366
|
+
* (default sub1). Conversions populate on advertiser scope only. */
|
|
13367
|
+
affiliate(query) {
|
|
13368
|
+
return this.c.request("GET", "/v1/reporting/affiliate", { query });
|
|
13369
|
+
}
|
|
13370
|
+
/** Per-card carousel click attribution: clicks per card of each carousel
|
|
13371
|
+
* creative, with the card's title/price. Advertiser-scoped. */
|
|
13372
|
+
carousel(query) {
|
|
13373
|
+
return this.c.request("GET", "/v1/reporting/carousel", { query });
|
|
13374
|
+
}
|
|
13338
13375
|
/** List saved report configurations. */
|
|
13339
13376
|
saved() {
|
|
13340
13377
|
return this.c.request("GET", "/v1/reporting/saved");
|
|
@@ -13417,9 +13454,29 @@ var WebhooksResource = class extends Resource {
|
|
|
13417
13454
|
create(body) {
|
|
13418
13455
|
return this.c.request("POST", "/v1/webhooks", { body });
|
|
13419
13456
|
}
|
|
13457
|
+
/** Update an endpoint's URL, subscribed events, and/or active (pause) flag. */
|
|
13458
|
+
update(id, body) {
|
|
13459
|
+
return this.c.request("PATCH", `/v1/webhooks/${encodeURIComponent(id)}`, { body });
|
|
13460
|
+
}
|
|
13420
13461
|
delete(id) {
|
|
13421
13462
|
return this.c.request("DELETE", `/v1/webhooks/${encodeURIComponent(id)}`);
|
|
13422
13463
|
}
|
|
13464
|
+
/** Roll the signing secret (old one stops verifying immediately). */
|
|
13465
|
+
rotateSecret(id) {
|
|
13466
|
+
return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/rotate-secret`);
|
|
13467
|
+
}
|
|
13468
|
+
/** Fire a synthetic `ping` event to verify the endpoint. */
|
|
13469
|
+
ping(id) {
|
|
13470
|
+
return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/ping`);
|
|
13471
|
+
}
|
|
13472
|
+
/** Recent delivery attempts for one subscription (newest first). */
|
|
13473
|
+
deliveries(id, query) {
|
|
13474
|
+
return this.c.request("GET", `/v1/webhooks/${encodeURIComponent(id)}/deliveries`, { query });
|
|
13475
|
+
}
|
|
13476
|
+
/** Manually re-send a past delivery's payload. */
|
|
13477
|
+
redeliver(deliveryId) {
|
|
13478
|
+
return this.c.request("POST", `/v1/webhooks/deliveries/${encodeURIComponent(deliveryId)}/redeliver`);
|
|
13479
|
+
}
|
|
13423
13480
|
};
|
|
13424
13481
|
var KeysResource = class extends Resource {
|
|
13425
13482
|
constructor(c) {
|
|
@@ -13508,6 +13565,186 @@ var StatsResource = class extends Resource {
|
|
|
13508
13565
|
return this.c.request("GET", "/v1/stats");
|
|
13509
13566
|
}
|
|
13510
13567
|
};
|
|
13568
|
+
var TeamResource = class extends Resource {
|
|
13569
|
+
constructor(c) {
|
|
13570
|
+
super(c);
|
|
13571
|
+
}
|
|
13572
|
+
/** Every seat under the account, with each member's role + pixel grants. */
|
|
13573
|
+
list() {
|
|
13574
|
+
return this.c.request("GET", "/v1/advertiser/team");
|
|
13575
|
+
}
|
|
13576
|
+
/**
|
|
13577
|
+
* Invite a team member. `role` 'admin' grants full account access; 'manager'
|
|
13578
|
+
* and 'analyst' are confined to the assigned `pixelIds` (managers can write,
|
|
13579
|
+
* analysts are read-only). `allPixels: true` grants every pixel.
|
|
13580
|
+
*/
|
|
13581
|
+
invite(body) {
|
|
13582
|
+
return this.c.request("POST", "/v1/advertiser/team", { body });
|
|
13583
|
+
}
|
|
13584
|
+
/** Change a member's role, pixel grants, name, or status ('active'|'disabled'). */
|
|
13585
|
+
update(id, body) {
|
|
13586
|
+
return this.c.request("POST", `/v1/advertiser/team/${encodeURIComponent(id)}`, { body });
|
|
13587
|
+
}
|
|
13588
|
+
/** Re-send a pending member's invitation email. */
|
|
13589
|
+
resendInvite(id) {
|
|
13590
|
+
return this.c.request("POST", `/v1/advertiser/team/${encodeURIComponent(id)}/resend`);
|
|
13591
|
+
}
|
|
13592
|
+
/** Remove a seat entirely (revokes their sessions). */
|
|
13593
|
+
remove(id) {
|
|
13594
|
+
return this.c.request("DELETE", `/v1/advertiser/team/${encodeURIComponent(id)}`);
|
|
13595
|
+
}
|
|
13596
|
+
};
|
|
13597
|
+
var ClientsResource = class extends Resource {
|
|
13598
|
+
constructor(c) {
|
|
13599
|
+
super(c);
|
|
13600
|
+
}
|
|
13601
|
+
/** List the agency's clients (with tagged-campaign counts). */
|
|
13602
|
+
list() {
|
|
13603
|
+
return this.c.request("GET", "/v1/advertiser/clients");
|
|
13604
|
+
}
|
|
13605
|
+
get(id) {
|
|
13606
|
+
return this.c.request("GET", `/v1/advertiser/clients/${encodeURIComponent(id)}`);
|
|
13607
|
+
}
|
|
13608
|
+
create(body) {
|
|
13609
|
+
return this.c.request("POST", "/v1/advertiser/clients", { body });
|
|
13610
|
+
}
|
|
13611
|
+
update(id, body) {
|
|
13612
|
+
return this.c.request("POST", `/v1/advertiser/clients/${encodeURIComponent(id)}`, { body });
|
|
13613
|
+
}
|
|
13614
|
+
remove(id) {
|
|
13615
|
+
return this.c.request("DELETE", `/v1/advertiser/clients/${encodeURIComponent(id)}`);
|
|
13616
|
+
}
|
|
13617
|
+
/** Campaigns owned by the account with their current client tag. */
|
|
13618
|
+
campaigns() {
|
|
13619
|
+
return this.c.request("GET", "/v1/advertiser/clients/campaigns");
|
|
13620
|
+
}
|
|
13621
|
+
/** Tag (or untag with clientId=null) a campaign to a client so its spend rolls up. */
|
|
13622
|
+
tagCampaign(campaignId, clientId) {
|
|
13623
|
+
return this.c.request("POST", "/v1/advertiser/clients/tag", { body: { campaignId, clientId } });
|
|
13624
|
+
}
|
|
13625
|
+
/** Spend + delivery for a client over a period (defaults to last 30d). */
|
|
13626
|
+
spend(id, from, to) {
|
|
13627
|
+
return this.c.request("GET", `/v1/advertiser/clients/${encodeURIComponent(id)}/spend`, { query: { ...from ? { from } : {}, ...to ? { to } : {} } });
|
|
13628
|
+
}
|
|
13629
|
+
};
|
|
13630
|
+
var InvoicesResource = class extends Resource {
|
|
13631
|
+
constructor(c) {
|
|
13632
|
+
super(c);
|
|
13633
|
+
}
|
|
13634
|
+
list(clientId) {
|
|
13635
|
+
return this.c.request("GET", "/v1/advertiser/invoices", { query: clientId ? { clientId } : void 0 });
|
|
13636
|
+
}
|
|
13637
|
+
get(id) {
|
|
13638
|
+
return this.c.request("GET", `/v1/advertiser/invoices/${encodeURIComponent(id)}`);
|
|
13639
|
+
}
|
|
13640
|
+
/**
|
|
13641
|
+
* Create a draft invoice. With a period, auto-adds the client's tagged-campaign
|
|
13642
|
+
* spend as a line, plus an optional markupPct agency fee. Extra manual items
|
|
13643
|
+
* may be supplied.
|
|
13644
|
+
*/
|
|
13645
|
+
create(body) {
|
|
13646
|
+
return this.c.request("POST", "/v1/advertiser/invoices", { body });
|
|
13647
|
+
}
|
|
13648
|
+
addItem(id, item) {
|
|
13649
|
+
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/items`, { body: item });
|
|
13650
|
+
}
|
|
13651
|
+
removeItem(id, itemId) {
|
|
13652
|
+
return this.c.request("DELETE", `/v1/advertiser/invoices/${encodeURIComponent(id)}/items/${encodeURIComponent(itemId)}`);
|
|
13653
|
+
}
|
|
13654
|
+
/** Send the invoice: mints a public pay link + emails the client. Returns it with `payLink`. */
|
|
13655
|
+
send(id) {
|
|
13656
|
+
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/send`);
|
|
13657
|
+
}
|
|
13658
|
+
/** Record an offline/out-of-band payment. */
|
|
13659
|
+
markPaid(id) {
|
|
13660
|
+
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/mark-paid`);
|
|
13661
|
+
}
|
|
13662
|
+
void(id) {
|
|
13663
|
+
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/void`);
|
|
13664
|
+
}
|
|
13665
|
+
};
|
|
13666
|
+
var TransfersResource = class extends Resource {
|
|
13667
|
+
constructor(c) {
|
|
13668
|
+
super(c);
|
|
13669
|
+
}
|
|
13670
|
+
/** Initiate a transfer of one of your pixels (and its audiences) to an email. */
|
|
13671
|
+
initiate(pixelId, email2) {
|
|
13672
|
+
return this.c.request("POST", "/v1/advertiser/transfers", { body: { pixelId, email: email2 } });
|
|
13673
|
+
}
|
|
13674
|
+
/** Outgoing transfers you've initiated. */
|
|
13675
|
+
list() {
|
|
13676
|
+
return this.c.request("GET", "/v1/advertiser/transfers");
|
|
13677
|
+
}
|
|
13678
|
+
cancel(id) {
|
|
13679
|
+
return this.c.request("POST", `/v1/advertiser/transfers/${encodeURIComponent(id)}/cancel`);
|
|
13680
|
+
}
|
|
13681
|
+
/** Preview an incoming transfer by its token (the recipient must be logged in). */
|
|
13682
|
+
info(token) {
|
|
13683
|
+
return this.c.request("GET", "/v1/transfers/info", { query: { token } });
|
|
13684
|
+
}
|
|
13685
|
+
/** Accept an incoming transfer — the pixel + its audiences move to YOUR account. */
|
|
13686
|
+
accept(token) {
|
|
13687
|
+
return this.c.request("POST", "/v1/transfers/accept", { body: { token } });
|
|
13688
|
+
}
|
|
13689
|
+
};
|
|
13690
|
+
var TerminalResource = class extends Resource {
|
|
13691
|
+
constructor(c) {
|
|
13692
|
+
super(c);
|
|
13693
|
+
}
|
|
13694
|
+
/**
|
|
13695
|
+
* Fetch one rotated terminal ad from YOUR OWN campaigns. Auth precedence:
|
|
13696
|
+
* `token` (public ts_… — safe to ship) → the client's `x-api-key` (secret).
|
|
13697
|
+
*/
|
|
13698
|
+
serve(opts = {}) {
|
|
13699
|
+
return this.c.request("GET", "/terminal/serve", {
|
|
13700
|
+
baseUrl: this.c.servingBaseUrl,
|
|
13701
|
+
query: { token: opts.token, campaignId: opts.campaignId, uid: opts.uid }
|
|
13702
|
+
});
|
|
13703
|
+
}
|
|
13704
|
+
/** Mint a PUBLIC serve token (ts_…) — non-secret, serve-only, safe to embed in
|
|
13705
|
+
* a distributed client. Optionally pin it to one terminal campaign, and/or arm
|
|
13706
|
+
* adaptive mode-switching (`switch`) so the engine rotates each install between
|
|
13707
|
+
* your ads and the marketplace based on engagement. */
|
|
13708
|
+
createToken(body = {}) {
|
|
13709
|
+
return this.c.request("POST", "/v1/advertiser/terminal-tokens", { body });
|
|
13710
|
+
}
|
|
13711
|
+
listTokens() {
|
|
13712
|
+
return this.c.request("GET", "/v1/advertiser/terminal-tokens");
|
|
13713
|
+
}
|
|
13714
|
+
/** Arm / update / disable a token's mode-switching policy in place (same ts_
|
|
13715
|
+
* value keeps working). Pass an empty object (or all-zero policy) to disable. */
|
|
13716
|
+
setTokenPolicy(id, policy) {
|
|
13717
|
+
return this.c.request("PATCH", `/v1/advertiser/terminal-tokens/${encodeURIComponent(id)}/switch`, { body: policy });
|
|
13718
|
+
}
|
|
13719
|
+
/** Rotate a token's value (old value stops working immediately). */
|
|
13720
|
+
rotateToken(id) {
|
|
13721
|
+
return this.c.request("POST", `/v1/advertiser/terminal-tokens/${encodeURIComponent(id)}/rotate`);
|
|
13722
|
+
}
|
|
13723
|
+
revokeToken(id) {
|
|
13724
|
+
return this.c.request("DELETE", `/v1/advertiser/terminal-tokens/${encodeURIComponent(id)}`);
|
|
13725
|
+
}
|
|
13726
|
+
};
|
|
13727
|
+
var CampaignGroupsResource = class extends Resource {
|
|
13728
|
+
constructor(c) {
|
|
13729
|
+
super(c);
|
|
13730
|
+
}
|
|
13731
|
+
/** Groups with their ad sets nested + a per-group spend rollup. */
|
|
13732
|
+
list() {
|
|
13733
|
+
return this.c.request("GET", "/v1/advertiser/campaign-groups");
|
|
13734
|
+
}
|
|
13735
|
+
get(id) {
|
|
13736
|
+
return this.c.request("GET", `/v1/advertiser/campaign-groups/${encodeURIComponent(id)}`);
|
|
13737
|
+
}
|
|
13738
|
+
create(body) {
|
|
13739
|
+
return this.c.request("POST", "/v1/advertiser/campaign-groups", { body });
|
|
13740
|
+
}
|
|
13741
|
+
update(id, body) {
|
|
13742
|
+
return this.c.request("PATCH", `/v1/advertiser/campaign-groups/${encodeURIComponent(id)}`, { body });
|
|
13743
|
+
}
|
|
13744
|
+
remove(id) {
|
|
13745
|
+
return this.c.request("DELETE", `/v1/advertiser/campaign-groups/${encodeURIComponent(id)}`);
|
|
13746
|
+
}
|
|
13747
|
+
};
|
|
13511
13748
|
var CampaignsResource = class extends Resource {
|
|
13512
13749
|
constructor(c) {
|
|
13513
13750
|
super(c);
|
|
@@ -13524,6 +13761,11 @@ var CampaignsResource = class extends Resource {
|
|
|
13524
13761
|
update(id, body) {
|
|
13525
13762
|
return this.c.request("PATCH", `/v1/advertiser/campaigns/${encodeURIComponent(id)}`, { body });
|
|
13526
13763
|
}
|
|
13764
|
+
/** Soft-delete a campaign: stops serving + removes it from the list. Past
|
|
13765
|
+
* spend/stats stay for reporting. */
|
|
13766
|
+
remove(id) {
|
|
13767
|
+
return this.c.request("DELETE", `/v1/advertiser/campaigns/${encodeURIComponent(id)}`);
|
|
13768
|
+
}
|
|
13527
13769
|
submit(id) {
|
|
13528
13770
|
return this.c.request("POST", `/v1/advertiser/campaigns/${encodeURIComponent(id)}/submit`);
|
|
13529
13771
|
}
|
|
@@ -13606,6 +13848,15 @@ var CreativesResource = class extends Resource {
|
|
|
13606
13848
|
if (fields2) for (const [k, v] of Object.entries(fields2)) form.append(k, v);
|
|
13607
13849
|
return this.c.request("POST", "/v1/advertiser/creatives/upload", { form });
|
|
13608
13850
|
}
|
|
13851
|
+
/** Uploads a PLAYABLE (interactive HTML5) as a ZIP bundle. The server validates
|
|
13852
|
+
* it, injects the sandbox runtime into its index.html, and hosts it on the CDN.
|
|
13853
|
+
* Returns { assetUrl, type:'html5', … } to pass to create() as a full-screen
|
|
13854
|
+
* (interstitial/rewarded) creative. `zip` is a Blob/File of the .zip. */
|
|
13855
|
+
uploadPlayable(zip, filename = "playable.zip") {
|
|
13856
|
+
const form = new FormData();
|
|
13857
|
+
form.append("file", zip, filename);
|
|
13858
|
+
return this.c.request("POST", "/v1/advertiser/creatives/playable", { form });
|
|
13859
|
+
}
|
|
13609
13860
|
delete(id) {
|
|
13610
13861
|
return this.c.request("DELETE", `/v1/advertiser/creatives/${encodeURIComponent(id)}`);
|
|
13611
13862
|
}
|
|
@@ -13726,11 +13977,16 @@ var SegmentsResource = class extends Resource {
|
|
|
13726
13977
|
catalog() {
|
|
13727
13978
|
return this.c.request("GET", "/v1/advertiser/segments/catalog");
|
|
13728
13979
|
}
|
|
13729
|
-
/** Contribute one of the account's audiences to the co-op
|
|
13730
|
-
*
|
|
13980
|
+
/** Contribute one of the account's audiences to the co-op. The niche is
|
|
13981
|
+
* auto-detected from the audience's members (taxonomyId is optional). Returns
|
|
13982
|
+
* the segment id, rev-share, and the resolved niche. */
|
|
13731
13983
|
contribute(body) {
|
|
13732
13984
|
return this.c.request("POST", "/v1/advertiser/segments/contribute", { body });
|
|
13733
13985
|
}
|
|
13986
|
+
/** The auto-detected interest/niche for an audience (from its members' keywords). */
|
|
13987
|
+
detectNiche(audienceId) {
|
|
13988
|
+
return this.c.request("GET", "/v1/advertiser/segments/detect-niche", { query: { audienceId } });
|
|
13989
|
+
}
|
|
13734
13990
|
/** Segments the account has contributed to the co-op (size, rev-share, licensees). */
|
|
13735
13991
|
contributions() {
|
|
13736
13992
|
return this.c.request("GET", "/v1/advertiser/segments/contributions");
|
|
@@ -13851,128 +14107,6 @@ var PixelResource = class extends Resource {
|
|
|
13851
14107
|
return this.c.request("GET", "/v1/advertiser/pixel/traits", { query: { user, ...pixelId ? { pixelId } : {} } });
|
|
13852
14108
|
}
|
|
13853
14109
|
};
|
|
13854
|
-
var TeamResource = class extends Resource {
|
|
13855
|
-
constructor(c) {
|
|
13856
|
-
super(c);
|
|
13857
|
-
}
|
|
13858
|
-
/** Every seat under the account, with each member's role + pixel grants. */
|
|
13859
|
-
list() {
|
|
13860
|
-
return this.c.request("GET", "/v1/advertiser/team");
|
|
13861
|
-
}
|
|
13862
|
-
/**
|
|
13863
|
-
* Invite a team member. `role` 'admin' grants full account access; 'manager'
|
|
13864
|
-
* and 'analyst' are confined to the assigned `pixelIds` (managers can write,
|
|
13865
|
-
* analysts are read-only). `allPixels: true` grants every pixel.
|
|
13866
|
-
*/
|
|
13867
|
-
invite(body) {
|
|
13868
|
-
return this.c.request("POST", "/v1/advertiser/team", { body });
|
|
13869
|
-
}
|
|
13870
|
-
/** Change a member's role, pixel grants, name, or status ('active'|'disabled'). */
|
|
13871
|
-
update(id, body) {
|
|
13872
|
-
return this.c.request("POST", `/v1/advertiser/team/${encodeURIComponent(id)}`, { body });
|
|
13873
|
-
}
|
|
13874
|
-
/** Re-send a pending member's invitation email. */
|
|
13875
|
-
resendInvite(id) {
|
|
13876
|
-
return this.c.request("POST", `/v1/advertiser/team/${encodeURIComponent(id)}/resend`);
|
|
13877
|
-
}
|
|
13878
|
-
/** Remove a seat entirely (revokes their sessions). */
|
|
13879
|
-
remove(id) {
|
|
13880
|
-
return this.c.request("DELETE", `/v1/advertiser/team/${encodeURIComponent(id)}`);
|
|
13881
|
-
}
|
|
13882
|
-
};
|
|
13883
|
-
var ClientsResource = class extends Resource {
|
|
13884
|
-
constructor(c) {
|
|
13885
|
-
super(c);
|
|
13886
|
-
}
|
|
13887
|
-
/** List the agency's clients (with tagged-campaign counts). */
|
|
13888
|
-
list() {
|
|
13889
|
-
return this.c.request("GET", "/v1/advertiser/clients");
|
|
13890
|
-
}
|
|
13891
|
-
get(id) {
|
|
13892
|
-
return this.c.request("GET", `/v1/advertiser/clients/${encodeURIComponent(id)}`);
|
|
13893
|
-
}
|
|
13894
|
-
create(body) {
|
|
13895
|
-
return this.c.request("POST", "/v1/advertiser/clients", { body });
|
|
13896
|
-
}
|
|
13897
|
-
update(id, body) {
|
|
13898
|
-
return this.c.request("POST", `/v1/advertiser/clients/${encodeURIComponent(id)}`, { body });
|
|
13899
|
-
}
|
|
13900
|
-
remove(id) {
|
|
13901
|
-
return this.c.request("DELETE", `/v1/advertiser/clients/${encodeURIComponent(id)}`);
|
|
13902
|
-
}
|
|
13903
|
-
/** Campaigns owned by the account with their current client tag. */
|
|
13904
|
-
campaigns() {
|
|
13905
|
-
return this.c.request("GET", "/v1/advertiser/clients/campaigns");
|
|
13906
|
-
}
|
|
13907
|
-
/** Tag (or untag with clientId=null) a campaign to a client so its spend rolls up. */
|
|
13908
|
-
tagCampaign(campaignId, clientId) {
|
|
13909
|
-
return this.c.request("POST", "/v1/advertiser/clients/tag", { body: { campaignId, clientId } });
|
|
13910
|
-
}
|
|
13911
|
-
/** Spend + delivery for a client over a period (defaults to last 30d). */
|
|
13912
|
-
spend(id, from, to) {
|
|
13913
|
-
return this.c.request("GET", `/v1/advertiser/clients/${encodeURIComponent(id)}/spend`, { query: { ...from ? { from } : {}, ...to ? { to } : {} } });
|
|
13914
|
-
}
|
|
13915
|
-
};
|
|
13916
|
-
var InvoicesResource = class extends Resource {
|
|
13917
|
-
constructor(c) {
|
|
13918
|
-
super(c);
|
|
13919
|
-
}
|
|
13920
|
-
list(clientId) {
|
|
13921
|
-
return this.c.request("GET", "/v1/advertiser/invoices", { query: clientId ? { clientId } : void 0 });
|
|
13922
|
-
}
|
|
13923
|
-
get(id) {
|
|
13924
|
-
return this.c.request("GET", `/v1/advertiser/invoices/${encodeURIComponent(id)}`);
|
|
13925
|
-
}
|
|
13926
|
-
/**
|
|
13927
|
-
* Create a draft invoice. With a period, auto-adds the client's tagged-campaign
|
|
13928
|
-
* spend as a line, plus an optional markupPct agency fee. Extra manual items
|
|
13929
|
-
* may be supplied.
|
|
13930
|
-
*/
|
|
13931
|
-
create(body) {
|
|
13932
|
-
return this.c.request("POST", "/v1/advertiser/invoices", { body });
|
|
13933
|
-
}
|
|
13934
|
-
addItem(id, item) {
|
|
13935
|
-
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/items`, { body: item });
|
|
13936
|
-
}
|
|
13937
|
-
removeItem(id, itemId) {
|
|
13938
|
-
return this.c.request("DELETE", `/v1/advertiser/invoices/${encodeURIComponent(id)}/items/${encodeURIComponent(itemId)}`);
|
|
13939
|
-
}
|
|
13940
|
-
/** Send the invoice: mints a public pay link + emails the client. Returns it with `payLink`. */
|
|
13941
|
-
send(id) {
|
|
13942
|
-
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/send`);
|
|
13943
|
-
}
|
|
13944
|
-
/** Record an offline/out-of-band payment. */
|
|
13945
|
-
markPaid(id) {
|
|
13946
|
-
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/mark-paid`);
|
|
13947
|
-
}
|
|
13948
|
-
void(id) {
|
|
13949
|
-
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/void`);
|
|
13950
|
-
}
|
|
13951
|
-
};
|
|
13952
|
-
var TransfersResource = class extends Resource {
|
|
13953
|
-
constructor(c) {
|
|
13954
|
-
super(c);
|
|
13955
|
-
}
|
|
13956
|
-
/** Initiate a transfer of one of your pixels (and its audiences) to an email. */
|
|
13957
|
-
initiate(pixelId, email2) {
|
|
13958
|
-
return this.c.request("POST", "/v1/advertiser/transfers", { body: { pixelId, email: email2 } });
|
|
13959
|
-
}
|
|
13960
|
-
/** Outgoing transfers you've initiated. */
|
|
13961
|
-
list() {
|
|
13962
|
-
return this.c.request("GET", "/v1/advertiser/transfers");
|
|
13963
|
-
}
|
|
13964
|
-
cancel(id) {
|
|
13965
|
-
return this.c.request("POST", `/v1/advertiser/transfers/${encodeURIComponent(id)}/cancel`);
|
|
13966
|
-
}
|
|
13967
|
-
/** Preview an incoming transfer by its token (the recipient must be logged in). */
|
|
13968
|
-
info(token) {
|
|
13969
|
-
return this.c.request("GET", "/v1/transfers/info", { query: { token } });
|
|
13970
|
-
}
|
|
13971
|
-
/** Accept an incoming transfer — the pixel + its audiences move to YOUR account. */
|
|
13972
|
-
accept(token) {
|
|
13973
|
-
return this.c.request("POST", "/v1/transfers/accept", { body: { token } });
|
|
13974
|
-
}
|
|
13975
|
-
};
|
|
13976
14110
|
var FeedsResource = class extends Resource {
|
|
13977
14111
|
constructor(c) {
|
|
13978
14112
|
super(c);
|
|
@@ -14067,6 +14201,10 @@ var AutomationResource = class extends Resource {
|
|
|
14067
14201
|
deleteRule(id) {
|
|
14068
14202
|
return this.c.request("DELETE", `/v1/automation/rules/${encodeURIComponent(id)}`);
|
|
14069
14203
|
}
|
|
14204
|
+
/** Enable or disable a rule (pause it without deleting). */
|
|
14205
|
+
setRuleEnabled(id, enabled) {
|
|
14206
|
+
return this.c.request("PATCH", `/v1/automation/rules/${encodeURIComponent(id)}`, { body: { enabled } });
|
|
14207
|
+
}
|
|
14070
14208
|
/** Recent automated budget-reallocation actions. */
|
|
14071
14209
|
optimizerLog(limit) {
|
|
14072
14210
|
return this.c.request("GET", "/v1/optimizer/log", { query: { limit } });
|
|
@@ -14116,6 +14254,18 @@ var PropertiesResource = class extends Resource {
|
|
|
14116
14254
|
verify(id) {
|
|
14117
14255
|
return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/verify`);
|
|
14118
14256
|
}
|
|
14257
|
+
/** Set/clear the property's first-party ad-serving domain (anti-adblock). Pass
|
|
14258
|
+
* null/undefined to remove. Returns the CNAME target to point the domain at. */
|
|
14259
|
+
setServingDomain(id, domain) {
|
|
14260
|
+
return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/serving-domain`, { body: { domain } });
|
|
14261
|
+
}
|
|
14262
|
+
/** Verify the custom serving domain CNAMEs to our edge (proves control + routes). */
|
|
14263
|
+
verifyServingDomain(id) {
|
|
14264
|
+
return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/serving-domain/verify`);
|
|
14265
|
+
}
|
|
14266
|
+
removeServingDomain(id) {
|
|
14267
|
+
return this.c.request("DELETE", `/v1/publisher/properties/${encodeURIComponent(id)}/serving-domain`);
|
|
14268
|
+
}
|
|
14119
14269
|
domainConnect(id) {
|
|
14120
14270
|
return this.c.request(
|
|
14121
14271
|
"POST",
|
|
@@ -14185,11 +14335,19 @@ var ConsentResource = class extends Resource {
|
|
|
14185
14335
|
constructor(c) {
|
|
14186
14336
|
super(c);
|
|
14187
14337
|
}
|
|
14188
|
-
/**
|
|
14189
|
-
|
|
14190
|
-
|
|
14338
|
+
/**
|
|
14339
|
+
* Get consent config. Consent is scoped per PROPERTY (domain) — pass a
|
|
14340
|
+
* propertyId to read that property's config (falling back to the account-wide
|
|
14341
|
+
* default). Omit it to read the account-wide default directly.
|
|
14342
|
+
*/
|
|
14343
|
+
getConfig(propertyId) {
|
|
14344
|
+
const q = propertyId ? `?propertyId=${encodeURIComponent(propertyId)}` : "";
|
|
14345
|
+
return this.c.request("GET", `/v1/publisher/consent-config${q}`);
|
|
14191
14346
|
}
|
|
14192
|
-
/**
|
|
14347
|
+
/**
|
|
14348
|
+
* Save the CMP framework + default-consent + snippet behavior for a property
|
|
14349
|
+
* (set `propertyId` in the body). Omit `propertyId` to save the account default.
|
|
14350
|
+
*/
|
|
14193
14351
|
saveConfig(body) {
|
|
14194
14352
|
return this.c.request("POST", "/v1/publisher/consent-config", { body });
|
|
14195
14353
|
}
|
|
@@ -14412,10 +14570,235 @@ var BlogResource = class extends Resource {
|
|
|
14412
14570
|
return this.c.request("DELETE", `/v1/admin/blog/${encodeURIComponent(id)}`);
|
|
14413
14571
|
}
|
|
14414
14572
|
};
|
|
14573
|
+
var MarketplaceCatalogResource = class extends Resource {
|
|
14574
|
+
constructor(c) {
|
|
14575
|
+
super(c);
|
|
14576
|
+
}
|
|
14577
|
+
/** Bulk upsert catalog items (create or update by `external_id`). */
|
|
14578
|
+
upsert(items) {
|
|
14579
|
+
const body = { items };
|
|
14580
|
+
return this.c.request("POST", "/v1/advertiser/marketplace-catalog", { body });
|
|
14581
|
+
}
|
|
14582
|
+
/** The catalog items the account has uploaded. */
|
|
14583
|
+
list() {
|
|
14584
|
+
return this.c.request("GET", "/v1/advertiser/marketplace-catalog");
|
|
14585
|
+
}
|
|
14586
|
+
/**
|
|
14587
|
+
* Register (or update) a hosted catalog feed URL that we re-fetch on a schedule
|
|
14588
|
+
* (SSRF-guarded pull → the same upsert path). Re-registering the same URL updates
|
|
14589
|
+
* its interval and re-activates it.
|
|
14590
|
+
*/
|
|
14591
|
+
registerFeed(input) {
|
|
14592
|
+
return this.c.request("POST", "/v1/advertiser/catalog-feeds", { body: input });
|
|
14593
|
+
}
|
|
14594
|
+
/** The scheduled catalog feeds the account has registered. */
|
|
14595
|
+
listFeeds() {
|
|
14596
|
+
return this.c.request("GET", "/v1/advertiser/catalog-feeds");
|
|
14597
|
+
}
|
|
14598
|
+
/** Remove a registered feed (stops its scheduled refresh). */
|
|
14599
|
+
removeFeed(id) {
|
|
14600
|
+
return this.c.request("DELETE", `/v1/advertiser/catalog-feeds/${encodeURIComponent(id)}`);
|
|
14601
|
+
}
|
|
14602
|
+
};
|
|
14603
|
+
var PromoteCampaignsResource = class extends Resource {
|
|
14604
|
+
constructor(c) {
|
|
14605
|
+
super(c);
|
|
14606
|
+
}
|
|
14607
|
+
create(body) {
|
|
14608
|
+
return this.c.request("POST", "/v1/advertiser/promote-campaigns", { body });
|
|
14609
|
+
}
|
|
14610
|
+
list() {
|
|
14611
|
+
return this.c.request("GET", "/v1/advertiser/promote-campaigns");
|
|
14612
|
+
}
|
|
14613
|
+
/** Submit a promote campaign for review. */
|
|
14614
|
+
submit(id) {
|
|
14615
|
+
return this.c.request("POST", `/v1/advertiser/promote-campaigns/${encodeURIComponent(id)}/submit`);
|
|
14616
|
+
}
|
|
14617
|
+
/** Set a promote campaign's status (e.g. active, paused). */
|
|
14618
|
+
setStatus(id, status) {
|
|
14619
|
+
return this.c.request("POST", `/v1/advertiser/promote-campaigns/${encodeURIComponent(id)}/status`, {
|
|
14620
|
+
body: { status }
|
|
14621
|
+
});
|
|
14622
|
+
}
|
|
14623
|
+
};
|
|
14624
|
+
var ConversionsResource = class extends Resource {
|
|
14625
|
+
constructor(c) {
|
|
14626
|
+
super(c);
|
|
14627
|
+
}
|
|
14628
|
+
/**
|
|
14629
|
+
* Report an attributed purchase (advertiser postback / S2S). `clickId` is the
|
|
14630
|
+
* ad click id (adclid); `orderId` is the marketplace order id (dedup key);
|
|
14631
|
+
* `orderValue` is the gross order amount (sent as `order_value`). Optional
|
|
14632
|
+
* `value` overrides the billable value, `eventId` gives at-most-once
|
|
14633
|
+
* ingestion, and `campaignId` hints attribution when the click id can't
|
|
14634
|
+
* resolve one on its own.
|
|
14635
|
+
*/
|
|
14636
|
+
purchase(req) {
|
|
14637
|
+
const { orderValue, ...rest } = req;
|
|
14638
|
+
return this.c.request("POST", "/v1/track/conversion", {
|
|
14639
|
+
body: { ...rest, order_value: orderValue }
|
|
14640
|
+
});
|
|
14641
|
+
}
|
|
14642
|
+
/** Report a refund / chargeback for a previously reported order — reverses
|
|
14643
|
+
* its settlement with a compensating ledger entry. */
|
|
14644
|
+
refund(req) {
|
|
14645
|
+
return this.c.request("POST", "/v1/track/refund", { body: req });
|
|
14646
|
+
}
|
|
14647
|
+
};
|
|
14648
|
+
var CurrenciesResource = class extends Resource {
|
|
14649
|
+
constructor(c) {
|
|
14650
|
+
super(c);
|
|
14651
|
+
}
|
|
14652
|
+
/** List all registered tokens/currencies and their USD rates. */
|
|
14653
|
+
list() {
|
|
14654
|
+
return this.c.request("GET", "/v1/finance/currencies");
|
|
14655
|
+
}
|
|
14656
|
+
/** Register or update the caller's token and its USD rate (or live feed). */
|
|
14657
|
+
register(req) {
|
|
14658
|
+
return this.c.request("POST", "/v1/finance/currencies", { body: req });
|
|
14659
|
+
}
|
|
14660
|
+
};
|
|
14661
|
+
var DoohResource = class extends Resource {
|
|
14662
|
+
constructor(c) {
|
|
14663
|
+
super(c);
|
|
14664
|
+
}
|
|
14665
|
+
/** Claim a pending screen by the code it is displaying (attaches venue + activates). */
|
|
14666
|
+
claimScreen(req) {
|
|
14667
|
+
return this.c.request("POST", "/v1/dooh/screens/claim", { body: req });
|
|
14668
|
+
}
|
|
14669
|
+
/** The caller's screen fleet, each with a live online flag. */
|
|
14670
|
+
listScreens() {
|
|
14671
|
+
return this.c.request("GET", "/v1/dooh/screens");
|
|
14672
|
+
}
|
|
14673
|
+
getScreen(id) {
|
|
14674
|
+
return this.c.request("GET", `/v1/dooh/screens/${encodeURIComponent(id)}`);
|
|
14675
|
+
}
|
|
14676
|
+
updateScreen(id, req) {
|
|
14677
|
+
return this.c.request("PATCH", `/v1/dooh/screens/${encodeURIComponent(id)}`, { body: req });
|
|
14678
|
+
}
|
|
14679
|
+
setScreenStatus(id, status) {
|
|
14680
|
+
return this.c.request("POST", `/v1/dooh/screens/${encodeURIComponent(id)}/status`, { body: { status } });
|
|
14681
|
+
}
|
|
14682
|
+
/** Publisher proof-of-play earnings report. */
|
|
14683
|
+
plays(params) {
|
|
14684
|
+
return this.c.request("GET", "/v1/dooh/plays", { query: params });
|
|
14685
|
+
}
|
|
14686
|
+
/** Advertiser proof-of-play VERIFICATION report (prove ads ran on real screens). */
|
|
14687
|
+
advertiserPlays(params) {
|
|
14688
|
+
return this.c.request("GET", "/v1/advertiser/dooh/plays", { query: params });
|
|
14689
|
+
}
|
|
14690
|
+
};
|
|
14691
|
+
var MetaverseResource = class extends Resource {
|
|
14692
|
+
constructor(c) {
|
|
14693
|
+
super(c);
|
|
14694
|
+
}
|
|
14695
|
+
/** Onboard a world integration (returns the signing secret ONCE). */
|
|
14696
|
+
createWorld(req) {
|
|
14697
|
+
return this.c.request("POST", "/v1/metaverse/worlds", { body: req });
|
|
14698
|
+
}
|
|
14699
|
+
listWorlds() {
|
|
14700
|
+
return this.c.request("GET", "/v1/metaverse/worlds");
|
|
14701
|
+
}
|
|
14702
|
+
/** Claim a pending surface by the code it is displaying (activates serving). */
|
|
14703
|
+
claimSurface(req) {
|
|
14704
|
+
return this.c.request("POST", "/v1/metaverse/surfaces/claim", { body: req });
|
|
14705
|
+
}
|
|
14706
|
+
listSurfaces() {
|
|
14707
|
+
return this.c.request("GET", "/v1/metaverse/surfaces");
|
|
14708
|
+
}
|
|
14709
|
+
getSurface(id) {
|
|
14710
|
+
return this.c.request("GET", `/v1/metaverse/surfaces/${encodeURIComponent(id)}`);
|
|
14711
|
+
}
|
|
14712
|
+
updateSurface(id, req) {
|
|
14713
|
+
return this.c.request("PATCH", `/v1/metaverse/surfaces/${encodeURIComponent(id)}`, { body: req });
|
|
14714
|
+
}
|
|
14715
|
+
setSurfaceStatus(id, status) {
|
|
14716
|
+
return this.c.request("POST", `/v1/metaverse/surfaces/${encodeURIComponent(id)}/status`, { body: { status } });
|
|
14717
|
+
}
|
|
14718
|
+
/** Publisher proof-of-view earnings report. */
|
|
14719
|
+
views(params) {
|
|
14720
|
+
return this.c.request("GET", "/v1/metaverse/views", { query: params });
|
|
14721
|
+
}
|
|
14722
|
+
/** Advertiser proof-of-view VERIFICATION report (real avatars, dwell, completions). */
|
|
14723
|
+
advertiserViews(params) {
|
|
14724
|
+
return this.c.request("GET", "/v1/advertiser/metaverse/views", { query: params });
|
|
14725
|
+
}
|
|
14726
|
+
/** ADMIN: latest automatic trust-score snapshot per world (CPA-only ⇄ CPM tiering). */
|
|
14727
|
+
adminTrustScores() {
|
|
14728
|
+
return this.c.request("GET", "/v1/admin/metaverse/trust-scores");
|
|
14729
|
+
}
|
|
14730
|
+
};
|
|
14731
|
+
var PortalTemplatesResource = class extends Resource {
|
|
14732
|
+
constructor(c) {
|
|
14733
|
+
super(c);
|
|
14734
|
+
}
|
|
14735
|
+
/** The template catalog (each with its schema-driven `fields`). */
|
|
14736
|
+
listTemplates() {
|
|
14737
|
+
return this.c.request("GET", "/v1/portal/templates");
|
|
14738
|
+
}
|
|
14739
|
+
/**
|
|
14740
|
+
* Store a portal config and get back `{ id, url }`. The `url` is the hosted
|
|
14741
|
+
* template with the config id baked in — pass it as an `html5` creative's
|
|
14742
|
+
* `assetUrl` (and the config's landing URL as `landingUrl`) to make a normal
|
|
14743
|
+
* creative attachable to a metaverse portal-surface campaign.
|
|
14744
|
+
*/
|
|
14745
|
+
createConfig(req) {
|
|
14746
|
+
return this.c.request("POST", "/v1/portal/configs", { body: req });
|
|
14747
|
+
}
|
|
14748
|
+
};
|
|
14749
|
+
var RewardsResource = class extends Resource {
|
|
14750
|
+
constructor(c) {
|
|
14751
|
+
super(c);
|
|
14752
|
+
}
|
|
14753
|
+
/** Fund (or top up) a campaign's reward pool — escrows `amount` from your balance. */
|
|
14754
|
+
fundPool(req) {
|
|
14755
|
+
return this.c.request("POST", "/v1/rewards/pools", { body: req });
|
|
14756
|
+
}
|
|
14757
|
+
/**
|
|
14758
|
+
* Create an ADVERTISER-CUSTODIED, on-chain-in-the-creative reward pool. No escrow:
|
|
14759
|
+
* your own dApp/contract in the portal pays the user on-chain. Returns the pool
|
|
14760
|
+
* plus the one-time `voucher_secret` your contract/backend uses to verify the
|
|
14761
|
+
* eligibility voucher Adviverse issues on each verified completion before paying.
|
|
14762
|
+
*/
|
|
14763
|
+
createOnchainPool(req) {
|
|
14764
|
+
return this.c.request("POST", "/v1/rewards/pools/onchain", { body: req });
|
|
14765
|
+
}
|
|
14766
|
+
/** Fetch a campaign's on-chain reward voucher secret (verify vouchers with it). */
|
|
14767
|
+
voucherSecret(campaignId) {
|
|
14768
|
+
return this.c.request("GET", `/v1/rewards/pools/${encodeURIComponent(campaignId)}/voucher-secret`);
|
|
14769
|
+
}
|
|
14770
|
+
/** List your reward pools. */
|
|
14771
|
+
listPools() {
|
|
14772
|
+
return this.c.request("GET", "/v1/rewards/pools");
|
|
14773
|
+
}
|
|
14774
|
+
/** Get one campaign's reward pool. */
|
|
14775
|
+
getPool(campaignId) {
|
|
14776
|
+
return this.c.request("GET", `/v1/rewards/pools/${encodeURIComponent(campaignId)}`);
|
|
14777
|
+
}
|
|
14778
|
+
/** Pause / resume a reward pool. */
|
|
14779
|
+
setPoolStatus(campaignId, status) {
|
|
14780
|
+
return this.c.request("POST", `/v1/rewards/pools/${encodeURIComponent(campaignId)}/status`, {
|
|
14781
|
+
body: { status }
|
|
14782
|
+
});
|
|
14783
|
+
}
|
|
14784
|
+
/** Reward-payout report: completions, amounts paid, per-campaign + per-payout rows. */
|
|
14785
|
+
report(params) {
|
|
14786
|
+
return this.c.request("GET", "/v1/rewards/report", { query: params });
|
|
14787
|
+
}
|
|
14788
|
+
/**
|
|
14789
|
+
* Point a metaverse world's reward-payout webhook at your endpoint. Adviverse
|
|
14790
|
+
* POSTs a signed `{ completion_id, campaign_id, user_ref, wallet, amount, token,
|
|
14791
|
+
* ts, sig }` per verified completion; you fulfil the end-user's on-chain payout.
|
|
14792
|
+
*/
|
|
14793
|
+
setWorldWebhook(worldId, url) {
|
|
14794
|
+
return this.c.request("POST", "/v1/rewards/world-webhook", { body: { worldId, url } });
|
|
14795
|
+
}
|
|
14796
|
+
};
|
|
14415
14797
|
var AdNetClient = class {
|
|
14416
14798
|
constructor(opts) {
|
|
14417
14799
|
if (!opts?.baseUrl) throw new Error("AdNetClient: baseUrl is required");
|
|
14418
14800
|
this.baseUrl = opts.baseUrl.replace(/\/+$/, "");
|
|
14801
|
+
this.servingBaseUrl = (opts.servingBaseUrl ?? "https://serve.adviverse.com").replace(/\/+$/, "");
|
|
14419
14802
|
this.token = opts.token;
|
|
14420
14803
|
this.apiKey = opts.apiKey;
|
|
14421
14804
|
this.timeoutMs = opts.timeoutMs ?? 3e4;
|
|
@@ -14426,6 +14809,8 @@ var AdNetClient = class {
|
|
|
14426
14809
|
this.fetchImpl = f.bind(globalThis);
|
|
14427
14810
|
this.auth = new AuthResource(this);
|
|
14428
14811
|
this.campaigns = new CampaignsResource(this);
|
|
14812
|
+
this.terminal = new TerminalResource(this);
|
|
14813
|
+
this.campaignGroups = new CampaignGroupsResource(this);
|
|
14429
14814
|
this.creatives = new CreativesResource(this);
|
|
14430
14815
|
this.properties = new PropertiesResource(this);
|
|
14431
14816
|
this.placements = new PlacementsResource(this);
|
|
@@ -14462,6 +14847,14 @@ var AdNetClient = class {
|
|
|
14462
14847
|
this.guides = new GuidesResource(this);
|
|
14463
14848
|
this.blog = new BlogResource(this);
|
|
14464
14849
|
this.stats = new StatsResource(this);
|
|
14850
|
+
this.marketplaceCatalog = new MarketplaceCatalogResource(this);
|
|
14851
|
+
this.promoteCampaigns = new PromoteCampaignsResource(this);
|
|
14852
|
+
this.conversions = new ConversionsResource(this);
|
|
14853
|
+
this.currencies = new CurrenciesResource(this);
|
|
14854
|
+
this.dooh = new DoohResource(this);
|
|
14855
|
+
this.metaverse = new MetaverseResource(this);
|
|
14856
|
+
this.portalTemplates = new PortalTemplatesResource(this);
|
|
14857
|
+
this.rewards = new RewardsResource(this);
|
|
14465
14858
|
}
|
|
14466
14859
|
/** Sets (or clears) the bearer session token used for subsequent requests. */
|
|
14467
14860
|
setToken(token) {
|
|
@@ -14481,7 +14874,7 @@ var AdNetClient = class {
|
|
|
14481
14874
|
}
|
|
14482
14875
|
/** Low-level request. Most callers should use the typed resource methods. */
|
|
14483
14876
|
async request(method, path2, opts = {}) {
|
|
14484
|
-
const url = new URL(this.baseUrl + path2);
|
|
14877
|
+
const url = new URL((opts.baseUrl ?? this.baseUrl) + path2);
|
|
14485
14878
|
if (opts.query) {
|
|
14486
14879
|
for (const [k, v] of Object.entries(opts.query)) {
|
|
14487
14880
|
if (v !== void 0) url.searchParams.set(k, String(v));
|
|
@@ -22756,21 +23149,38 @@ function createServer(client) {
|
|
|
22756
23149
|
tool("get_campaign", "Get one campaign by id.", { id: external_exports.string() }, (a) => client.campaigns.get(a.id));
|
|
22757
23150
|
tool("create_campaign", "Create a campaign. `fields` follows the API CreateCampaign body (name, format, pricingModel, bidAmount, budgetDaily, \u2026). Optional `utm` object ({enabled,source,medium,campaign,content,term}) tags the landing URL for the advertiser's own analytics; omit for the default (enabled, auto values).", { fields, idempotencyKey: idem }, (a) => client.campaigns.create(a.fields, a.idempotencyKey));
|
|
22758
23151
|
tool("update_campaign", "Update a campaign (partial fields).", { id: external_exports.string(), fields }, (a) => client.campaigns.update(a.id, a.fields));
|
|
23152
|
+
tool("delete_campaign", "Delete a campaign (soft-delete): stops serving and removes it from the list; past spend/stats stay in reporting.", { id: external_exports.string() }, (a) => client.campaigns.remove(a.id));
|
|
22759
23153
|
tool("submit_campaign", "Submit a campaign for review.", { id: external_exports.string() }, (a) => client.campaigns.submit(a.id));
|
|
22760
23154
|
tool("set_campaign_status", "Set a campaign status (e.g. active, paused).", { id: external_exports.string(), status: external_exports.string() }, (a) => client.campaigns.setStatus(a.id, a.status));
|
|
23155
|
+
tool("upsert_marketplace_catalog", "Bulk upsert marketplace catalog items (create or update by external_id). fields.items = [{ external_id, title, description?, image_url?, price?, currency?, landing_url?, brand?, category?, keywords?: string[], availability? }]. These SKUs become eligible to be promoted as sponsored products in search.", { items: external_exports.array(fields) }, (a) => client.marketplaceCatalog.upsert(a.items));
|
|
23156
|
+
tool("list_marketplace_catalog", "List the marketplace catalog items the account has uploaded.", {}, () => client.marketplaceCatalog.list());
|
|
23157
|
+
tool("create_promote_campaign", 'Create a seller "promote products" campaign (sponsored products). fields (camelCase): { name, pricingModel: cpc|cpa, bidAmount (max CPC, or the flat CPA rate \u2014 required unless cpaMode=percent), cpaMode?: flat|percent (CPA basis), cpaPercent? (fraction of order value billed per checkout when cpaMode=percent, 0\u20131 e.g. 0.15=15%), minOrderValue? (anti-fraud floor; checkouts below it never bill), budgetDaily?, budgetTotal?, pacing?, currency?, itemSelector ({item_ids:[]} | {keywords:[]} | {all:true}), targeting? }.', { fields }, (a) => client.promoteCampaigns.create(a.fields));
|
|
23158
|
+
tool("list_promote_campaigns", "List the account's promote-products campaigns.", {}, () => client.promoteCampaigns.list());
|
|
23159
|
+
tool("submit_promote_campaign", "Submit a promote-products campaign for review.", { id: external_exports.string() }, (a) => client.promoteCampaigns.submit(a.id));
|
|
23160
|
+
tool("set_promote_campaign_status", "Set a promote-products campaign status (e.g. active, paused).", { id: external_exports.string(), status: external_exports.string() }, (a) => client.promoteCampaigns.setStatus(a.id, a.status));
|
|
23161
|
+
tool("report_conversion", "Report an attributed purchase (advertiser postback / S2S) for per-checkout (CPA) settlement. clickId = the ad click id (adclid) captured on the landing page; orderId = the marketplace order id (dedup key); orderValue = gross order amount (sent as order_value). Optional: value (billable-value override), eventId (at-most-once ingestion), campaignId (attribution hint). A verified, deduped Purchase debits the advertiser (CPA) and credits the publisher (rev-share).", { clickId: external_exports.string(), orderId: external_exports.string(), orderValue: external_exports.number(), value: external_exports.number().optional(), eventId: external_exports.string().optional(), campaignId: external_exports.string().optional() }, (a) => client.conversions.purchase({ clickId: a.clickId, orderId: a.orderId, orderValue: a.orderValue, value: a.value, eventId: a.eventId, campaignId: a.campaignId }));
|
|
23162
|
+
tool("report_refund", "Report a refund / chargeback for a previously reported order \u2014 reverses its CPA settlement with a compensating (append-only) ledger entry. orderId = the marketplace order id to reverse; advertiserId optionally scopes the reversal.", { orderId: external_exports.string(), advertiserId: external_exports.string().optional() }, (a) => client.conversions.refund({ orderId: a.orderId, advertiserId: a.advertiserId }));
|
|
22761
23163
|
tool("list_creatives", "List the advertiser's whole creative library.", {}, () => client.creatives.list());
|
|
22762
23164
|
tool("list_campaign_creatives", "List creatives serving a campaign (authored + attached).", { campaignId: external_exports.string() }, (a) => client.creatives.listForCampaign(a.campaignId));
|
|
22763
23165
|
tool("get_creative", "Get one creative by id.", { id: external_exports.string() }, (a) => client.creatives.get(a.id));
|
|
22764
|
-
tool("create_creative", "Create a creative (full Studio parity \u2014 camelCase fields). fields: { type: image|native|popunder_url|push|html5|video, landingUrl, assetUrl?, title?, description?, iconUrl?, mainImageUrl?, cta?, brandName?, starRating?(0-5), width?, height?, weight?, campaignId? (omit for library-only) }. Use upload to host
|
|
22765
|
-
tool("update_creative", "Update a creative's content (camelCase fields: assetUrl, landingUrl, title, description, iconUrl, mainImageUrl, cta, brandName, starRating, width, height, weight). type & campaignId are fixed at creation.", { id: external_exports.string(), fields }, (a) => client.creatives.update(a.id, a.fields));
|
|
23166
|
+
tool("create_creative", "Create a creative (full Studio parity \u2014 camelCase fields). fields: { type: image|native|popunder_url|push|html5|video|audio, landingUrl, assetUrl?, title?, description?, iconUrl?, mainImageUrl?, cta?, brandName?, starRating?(0-5), width?, height?, weight?, campaignId? (omit for library-only), duration?(sec 1-600), skipOffsetSec?(0-600, >0 = skippable), vpaidUrl?(https), companions?[{width,height,staticUrl(https),staticMime?,clickUrl?}] (max 5), vastTagUrl?(https third-party VAST tag; video/audio only) }. A video creative needs assetUrl OR vastTagUrl \u2014 with only vastTagUrl it serves as a VAST Wrapper around your own ad server's tag (duration is probed from the tag when omitted). type html5 = a playable (interactive HTML5) \u2014 host the ZIP via POST /v1/advertiser/creatives/playable first (returns assetUrl), then create with type html5 + that assetUrl on a full-screen/interstitial placement. Use upload to host a static asset, then add DCO variants via add_creative_component / set_creative_dco.", { fields }, (a) => client.creatives.create(a.fields));
|
|
23167
|
+
tool("update_creative", "Update a creative's content (camelCase fields: assetUrl, landingUrl, title, description, iconUrl, mainImageUrl, cta, brandName, starRating, width, height, weight, carouselItems, duration, skipOffsetSec, vpaidUrl, companions, vastTagUrl (null clears)). Changing assetUrl/landing/text/vastTagUrl/vpaidUrl/companions re-enters moderation. type & campaignId are fixed at creation.", { id: external_exports.string(), fields }, (a) => client.creatives.update(a.id, a.fields));
|
|
22766
23168
|
tool("delete_creative", "Delete a creative.", { id: external_exports.string() }, (a) => client.creatives.delete(a.id));
|
|
22767
23169
|
tool("attach_creative", "Attach a library creative to a campaign (optional rotation weight).", { id: external_exports.string(), campaignId: external_exports.string(), weight: external_exports.number().optional() }, (a) => client.creatives.attach(a.id, a.campaignId, a.weight));
|
|
22768
23170
|
tool("detach_creative", "Detach a library creative from a campaign.", { id: external_exports.string(), campaignId: external_exports.string() }, (a) => client.creatives.detach(a.id, a.campaignId));
|
|
22769
23171
|
tool("creative_campaigns", "List campaigns a library creative is attached to.", { id: external_exports.string() }, (a) => client.creatives.campaigns(a.id));
|
|
23172
|
+
tool("serve_terminal_ad", "Fetch ONE rotated terminal (CLI status-line) ad from YOUR OWN active terminal campaigns. Auth: a public `token` (ts_\u2026) if given, else this key. Rotation/eligibility/frequency capping applied server-side. Optional campaignId narrows to one campaign; uid is a stable per-install id. Returns { text, cta, url, impression_url, ... } or {} on no-fill.", { token: external_exports.string().optional(), campaignId: external_exports.string().optional(), uid: external_exports.string().optional() }, (a) => client.terminal.serve({ token: a.token, campaignId: a.campaignId, uid: a.uid }));
|
|
23173
|
+
tool("create_terminal_token", "Mint a PUBLIC terminal serve token (ts_\u2026) \u2014 a non-secret, serve-only credential SAFE to embed in a distributed CLI/desktop app. Optionally pin it to one terminal campaign, and/or arm adaptive mode-switching (`switch`) so the engine flips each install from YOUR ads to the marketplace after it engages. Returns { id, token, ... }.", { name: external_exports.string().optional(), campaignId: external_exports.string().optional(), switch: external_exports.object({ flipAfter: external_exports.number().int().min(0).optional(), flipOnClick: external_exports.boolean().optional(), fallbackTag: external_exports.string().optional() }).optional() }, (a) => client.terminal.createToken({ name: a.name, campaignId: a.campaignId, switch: a.switch }));
|
|
23174
|
+
tool("list_terminal_tokens", "List your public terminal serve tokens (includes each token's switch policy).", {}, () => client.terminal.listTokens());
|
|
23175
|
+
tool("set_terminal_token_policy", "Arm / update / disable a terminal serve token's adaptive mode-switching policy IN PLACE (the ts_ value keeps working). `flipAfter` flips an install to the marketplace after N self-network impressions; `flipOnClick` flips once it clicks your ad; `fallbackTag` (tk_\u2026, one of your own placements) is served post-flip (omit = flip to no ad). Needs a campaign-pinned token. Pass all-zero/empty to disable.", { id: external_exports.string(), flipAfter: external_exports.number().int().min(0).optional(), flipOnClick: external_exports.boolean().optional(), fallbackTag: external_exports.string().optional() }, (a) => client.terminal.setTokenPolicy(a.id, { flipAfter: a.flipAfter, flipOnClick: a.flipOnClick, fallbackTag: a.fallbackTag }));
|
|
23176
|
+
tool("rotate_terminal_token", "Rotate a terminal serve token by id (its old value stops working immediately). Returns the new token. The switch policy is preserved.", { id: external_exports.string() }, (a) => client.terminal.rotateToken(a.id));
|
|
23177
|
+
tool("revoke_terminal_token", "Revoke (delete) a terminal serve token by id.", { id: external_exports.string() }, (a) => client.terminal.revokeToken(a.id));
|
|
22770
23178
|
tool("list_properties", "List publisher properties (sites, CLIs, apps).", page, (a) => client.properties.list(a));
|
|
22771
23179
|
tool("create_property", "Register a property. fields: { kind: website|cli|mobile_app|ctv, domain, name?, verificationMethod? }.", { fields, idempotencyKey: idem }, (a) => client.properties.create(a.fields, a.idempotencyKey));
|
|
22772
23180
|
tool("update_property", "Update a property. fields: { name?, domain?, category?, verificationMethod? }. Changing the domain resets verification.", { id: external_exports.string(), fields }, (a) => client.properties.update(a.id, a.fields));
|
|
22773
23181
|
tool("verify_property", "Trigger ownership verification for a property.", { id: external_exports.string() }, (a) => client.properties.verify(a.id));
|
|
23182
|
+
tool("set_serving_domain", "Set a first-party ad-serving domain on a property (anti-adblock). The publisher CNAMEs this host to our edge; returns the CNAME target. Pass domain:null to remove.", { id: external_exports.string(), domain: external_exports.string().nullable() }, (a) => client.properties.setServingDomain(a.id, a.domain));
|
|
23183
|
+
tool("verify_serving_domain", "Verify a property custom serving domain CNAMEs to our edge (routes traffic + proves control). On success the tag serves first-party.", { id: external_exports.string() }, (a) => client.properties.verifyServingDomain(a.id));
|
|
22774
23184
|
tool("list_placements", "List ad placements.", page, (a) => client.placements.list(a));
|
|
22775
23185
|
tool("create_placement", "Create a placement. fields: { propertyId, name, format, floorCpm, \u2026 }.", { fields, idempotencyKey: idem }, (a) => client.placements.create(a.fields, a.idempotencyKey));
|
|
22776
23186
|
tool("get_placement_tag", "Get the ad tag / install code for a placement.", { id: external_exports.string() }, (a) => client.placements.tag(a.id));
|
|
@@ -22778,11 +23188,12 @@ function createServer(client) {
|
|
|
22778
23188
|
tool("disable_placement_signing", "Disable signed-tag enforcement on a placement.", { id: external_exports.string() }, (a) => client.placements.disableSigning(a.id));
|
|
22779
23189
|
tool("list_combo_presets", "List the static combo / layout presets (each bundles several ad units: standard_combo, leaderboard_pop, social_push, sticky_interstitial, full_monetization).", {}, () => client.placements.comboPresets());
|
|
22780
23190
|
tool("create_combo", "Provision several ad units as placements on a property at once and get ONE combined embed snippet back (paste once before </body>). Provide EITHER a preset (presetKey) OR a custom set of units [{format,label?,width?,height?}]. fields: { presetKey?, units?, namePrefix?, floorCpm?, revShare?, auctionType?, passbackUrl?, houseOnly?, houseShare?, houseBackfill?, floorFallback? }.", { propertyId: external_exports.string(), fields }, (a) => client.placements.createCombo(a.propertyId, a.fields));
|
|
22781
|
-
tool("get_balance", "Get the account balance (available / held).", {}, () => client.finance.balance());
|
|
23191
|
+
tool("get_balance", "Get the account balance (available / held). The balance currency may be a tenant's own platform-token code (not an ISO code).", {}, () => client.finance.balance());
|
|
22782
23192
|
tool("list_ledger", "List ledger entries.", { limit: external_exports.number().optional(), offset: external_exports.number().optional() }, (a) => client.finance.ledger({ limit: a.limit, offset: a.offset }));
|
|
22783
23193
|
tool("advertiser_report", "Advertiser spend/performance report.", reportQuery, (a) => client.reporting.advertiser(a));
|
|
22784
23194
|
tool("publisher_report", "Publisher revenue/delivery report.", reportQuery, (a) => client.reporting.publisher(a));
|
|
22785
23195
|
tool("publisher_placements_report", "Per-placement publisher rollup: impressions, clicks, CTR, revenue, RPM, eCPM, fill rate and viewable rate.", reportQuery, (a) => client.reporting.publisherPlacements(a));
|
|
23196
|
+
tool("anti_adblock_report", "Anti-adblock: impressions recovered from visitors running an adblocker (served first-party), with daily series + recovered %.", reportQuery, (a) => client.reporting.antiAdblock(a));
|
|
22786
23197
|
const dealRole = external_exports.enum(["advertiser", "publisher"]).optional().describe("Which side to view: deals where the account is the publisher (seller) or advertiser (buyer). Omit for the account default.");
|
|
22787
23198
|
tool("list_deals", "List private marketplace deals.", { ...page, role: dealRole }, (a) => client.deals.list(a));
|
|
22788
23199
|
tool(
|
|
@@ -22856,7 +23267,8 @@ function createServer(client) {
|
|
|
22856
23267
|
tool("delete_audience", "Delete an audience.", { id: external_exports.string() }, (a) => client.audiences.delete(a.id));
|
|
22857
23268
|
tool("segment_taxonomy", "Get the shared interest taxonomy (IAB-style nodes: id, parent, name, contextual keywords, sensitive flag).", {}, () => client.segments.taxonomy());
|
|
22858
23269
|
tool("segment_catalog", "Browse the segment catalog: for each interest, the CONTEXTUAL keywords (always usable \u2014 add to a campaign's targeting.contextual_include) and the BEHAVIORAL network preset when present ({ segmentId, size, dataCpm } \u2014 add segmentId to targeting.audience_include) or its build progress ({ size, needed }).", {}, () => client.segments.catalog());
|
|
22859
|
-
tool("contribute_segment", "Contribute one of the account's audiences to the privacy-safe co-op
|
|
23270
|
+
tool("contribute_segment", "Contribute one of the account's audiences to the privacy-safe co-op. The niche is AUTO-DETECTED from the audience's members' keywords \u2014 taxonomyId is optional (usually omit it). fields: { audienceId, revShare?, taxonomyId? }. Returns segmentId, revShare, and the resolved niche.", { fields }, (a) => client.segments.contribute(a.fields));
|
|
23271
|
+
tool("detect_niche", "Preview the auto-detected interest/niche for an audience (from its members' harvested keywords), before contributing it to the co-op.", { audienceId: external_exports.string() }, (a) => client.segments.detectNiche(a.audienceId));
|
|
22860
23272
|
tool("my_contributions", "List segments the account has contributed to the co-op (id, name, taxonomy_id, size, rev_share, licensees).", {}, () => client.segments.contributions());
|
|
22861
23273
|
tool("revoke_contribution", "Withdraw a contributed segment from the co-op.", { id: external_exports.string() }, (a) => client.segments.revoke(a.id));
|
|
22862
23274
|
tool("license_segment", "License a network behavioral segment for targeting. Returns { segmentId, dataCpm, note } \u2014 add segmentId to a campaign's targeting.audience_include.", { id: external_exports.string() }, (a) => client.segments.license(a.id));
|
|
@@ -22997,11 +23409,25 @@ function createServer(client) {
|
|
|
22997
23409
|
tool("issue_invoice", "Issue a draft invoice (admin).", { id: external_exports.string() }, (a) => client.billing.issueInvoice(a.id));
|
|
22998
23410
|
tool("pay_invoice", "Pay an invoice (advertiser own; admin any).", { id: external_exports.string() }, (a) => client.billing.payInvoice(a.id));
|
|
22999
23411
|
tool("void_invoice", "Void an invoice (admin).", { id: external_exports.string() }, (a) => client.billing.voidInvoice(a.id));
|
|
23000
|
-
tool("deposit_funds", "Request a deposit / account top-up. fields: { amount, provider?: stripe|paypal|crypto|mock, currency? }.", { fields }, (a) => client.finance.deposit(a.fields));
|
|
23412
|
+
tool("deposit_funds", "Request a deposit / account top-up. fields: { amount, provider?: stripe|card|paypal|crypto|wire|paxum|mock, currency? }. card=Stripe card checkout; wire/paxum are instruction-based \u2014 the response carries where to send funds + a reference, and the balance is credited once receipt is confirmed. Accounts on a tenant network transact in that tenant's own platform token: currency is the token code and amount is denominated in it.", { fields }, (a) => client.finance.deposit(a.fields));
|
|
23001
23413
|
tool("list_deposits", "List deposit history.", {}, () => client.finance.deposits());
|
|
23002
|
-
tool("request_payout", "Request a publisher payout. fields: { amount, method:
|
|
23414
|
+
tool("request_payout", "Request a publisher payout. fields: { amount, method: crypto|paxum|wire, destination? }. crypto\u2192OxaPay, paxum\u2192Paxum wallet email (destination.email), wire\u2192bank transfer (destination bank fields; settled once ops confirms it was sent).", { fields }, (a) => client.finance.requestPayout(a.fields));
|
|
23003
23415
|
tool("list_payouts", "List payout history.", {}, () => client.finance.payouts());
|
|
23004
23416
|
tool("get_tax_form", "Get the saved payout tax form (W-9 / W-8BEN).", {}, () => client.finance.taxForm());
|
|
23417
|
+
tool("list_currencies", "List all registered platform tokens / currencies and their USD rates. Feed-backed tokens also show their live price-feed URL (rate_url), the JSON dot-path (rate_json_path), and last_rate_at (when the feed last synced usd_micro).", {}, () => client.currencies.list());
|
|
23418
|
+
tool("register_currency", "Register or update YOUR tenant's own token and its USD rate. Provide EITHER a static `usdMicro` (micro-USD per unit, 1_000_000 = $1.00) OR a live `rateUrl` \u2014 a price API returning the token's USD price, polled to keep the rate current \u2014 with an optional `rateJsonPath` dot-path to the numeric price in the response (e.g. 'price' or 'data.usd'; empty = the body is the bare number or a { price: ... }). A code owned by another account cannot be overwritten.", { code: external_exports.string(), name: external_exports.string(), usdMicro: external_exports.number().optional(), rateUrl: external_exports.string().optional(), rateJsonPath: external_exports.string().optional() }, (a) => client.currencies.register({ code: a.code, name: a.name, usdMicro: a.usdMicro, rateUrl: a.rateUrl, rateJsonPath: a.rateJsonPath }));
|
|
23419
|
+
tool("list_dooh_screens", "List the account's DOOH screens (physical screens running the Adviverse player), each with venue, resolution, loop length, status, and a live `online` flag derived from the screen's heartbeat.", {}, () => client.dooh.listScreens());
|
|
23420
|
+
tool("dooh_proof_of_play_report", 'Proof-of-play report over a date range (default last 30 days). scope="advertiser" verifies YOUR ads actually ran on real screens (what creative/campaign played, on which screen/venue, when, duration, completed, spend, screenshots if present); scope="publisher" is your screen-fleet earnings. Returns { summary, rows }.', { scope: external_exports.enum(["advertiser", "publisher"]).optional(), from: external_exports.string().optional(), to: external_exports.string().optional() }, (a) => a.scope === "publisher" ? client.dooh.plays({ from: a.from, to: a.to }) : client.dooh.advertiserPlays({ from: a.from, to: a.to }));
|
|
23421
|
+
tool("create_metaverse_world", "Onboard a metaverse world integration. Returns a signing_secret ONCE \u2014 the world's server signs proofs of view with it (attestation). fields: { name, networkId? (the tenant network these surfaces belong to) }.", { fields }, (a) => client.metaverse.createWorld(a.fields));
|
|
23422
|
+
tool("list_metaverse_surfaces", "List the account's metaverse ad surfaces (screens/posters/portals placed in shops), each with venue, status, and a live `online` flag.", {}, () => client.metaverse.listSurfaces());
|
|
23423
|
+
tool("metaverse_proof_of_view_report", 'Proof-of-view report over a date range (default last 30 days). scope="advertiser" verifies YOUR ads were actually seen by real avatars (dwell, distance, portal completions, spend); scope="publisher" is your surface earnings. Returns { summary, rows }.', { scope: external_exports.enum(["advertiser", "publisher"]).optional(), from: external_exports.string().optional(), to: external_exports.string().optional() }, (a) => a.scope === "publisher" ? client.metaverse.views({ from: a.from, to: a.to }) : client.metaverse.advertiserViews({ from: a.from, to: a.to }));
|
|
23424
|
+
tool("metaverse_trust_scores", "ADMIN: the automatic world TRUST-SCORING snapshot. Each world's last-7-day proof-of-view traffic is scored 0..1 (attested-identity rate, IVT valid rate, unique-user ratio, dwell plausibility); clean high-volume worlds are auto-promoted from CPA-only ('unverified') to CPM ('trusted'), degraded ones demoted. Returns per-world { current_tier, auto_tier, score, views_7d, valid_rate, attested_rate, unique_user_ratio, dwell_cv, factors }.", {}, () => client.metaverse.adminTrustScores());
|
|
23425
|
+
tool("list_portal_templates", "List the prebuilt HTML5 portal experience templates an advertiser can configure WITHOUT authoring a bundle (e.g. product-showcase, spin-to-win, 360-viewer). Each returns { key, name, description, fields:[{ key, label, type, required? }] } \u2014 the `fields` define that template's config shape.", {}, () => client.portalTemplates.listTemplates());
|
|
23426
|
+
tool("create_portal_experience", "Create a configured portal experience from a template. fields: { template (a key from list_portal_templates), config (the template's fields, e.g. { title, productImage, ctaUrl, bgColor }) }. Returns { id, url } \u2014 the hosted template URL. Pass that url as an `html5` creative's assetUrl (via create_creative) and the config's ctaUrl as landingUrl to make a normal creative attachable to a metaverse PORTAL surface campaign.", { fields }, (a) => client.portalTemplates.createConfig(a.fields));
|
|
23427
|
+
tool("fund_reward_pool", "Fund (or top up) a metaverse portal/experience campaign's REWARD POOL. Each VERIFIED completion pays the end-user a crypto reward \u2014 TENANT-CUSTODIED (Adviverse escrows your money + emits a signed payout webhook; the metaverse operator fulfils the on-chain payout in its own coin). fields (camelCase): { campaignId, perCompletion (fixed reward per completion), amount (escrowed now from your balance), token? (reward denomination; defaults to your account currency), perUserDailyCap?, perWalletDailyCap? }. Escrow reduces your available balance; insufficient funds is refused.", { fields }, (a) => client.rewards.fundPool(a.fields));
|
|
23428
|
+
tool("create_onchain_reward_pool", "Create an ADVERTISER-CUSTODIED, on-chain-in-the-creative reward pool. Your OWN dApp/contract inside the portal experience pays the end-user on-chain in a coin YOU choose (BTC/ETH/USDC/\u2026); Adviverse never touches the crypto \u2014 it only verifies each completion (attested real user + per-user/per-wallet daily caps + no replay) and hands the creative a single-use signed ELIGIBILITY VOUCHER your contract verifies before paying. NO escrow / no funding. fields (camelCase): { campaignId, perCompletion (display amount; real amount enforced by your contract), token (coin symbol), chain? (e.g. bitcoin/ethereum/base), perUserDailyCap?, perWalletDailyCap? }. Returns the pool plus a one-time `voucher_secret` \u2014 embed it in your contract/backend to verify vouchers.", { fields }, (a) => client.rewards.createOnchainPool(a.fields));
|
|
23429
|
+
tool("reward_voucher_secret", "Fetch a campaign's on-chain reward VOUCHER SECRET (the HMAC key your contract/backend uses to verify the eligibility voucher Adviverse issues on each verified completion). Applies to on-chain reward pools only. fields: { campaignId }.", { campaignId: external_exports.string() }, (a) => client.rewards.voucherSecret(a.campaignId));
|
|
23430
|
+
tool("reward_report", "Reward-payout report over a date range (default last 30 days): completions, amount paid, distinct recipients, sent/pending/failed webhook counts (tenant-custodied) + attributed/tx-confirmed on-chain counts (advertiser-custodied), a per-campaign breakdown, your pools (funded/spent/mode), and per-payout rows (incl. tx_hash for on-chain payouts).", { from: external_exports.string().optional(), to: external_exports.string().optional() }, (a) => client.rewards.report({ from: a.from, to: a.to }));
|
|
23005
23431
|
tool("submit_tax_form", "Submit/update the payout tax form. fields: { formType: w9|w8ben, legalName, taxId, address, country, certified, taxClassification? }.", { fields }, (a) => client.finance.submitTaxForm(a.fields));
|
|
23006
23432
|
tool("run_export", "Export analytics to a warehouse format. fields: { dataset: events|conversions|spend, from, to, format?: ndjson|csv }.", { fields }, (a) => client.exports.run(a.fields));
|
|
23007
23433
|
tool("list_exports", "List export jobs.", {}, () => client.exports.list());
|
|
@@ -23011,6 +23437,7 @@ function createServer(client) {
|
|
|
23011
23437
|
tool("list_automation_rules", "List automation rules.", {}, () => client.automation.rules());
|
|
23012
23438
|
tool("create_automation_rule", "Create an automation rule. fields: { name?, scope?: campaign|all, targetId?, metric?: cpa|ctr|spend|conversions|fill_rate, operator?: gt|lt, threshold?, windowHours?, action?: pause|resume|notify|adjust_bid, actionValue?, enabled? }.", { fields }, (a) => client.automation.createRule(a.fields));
|
|
23013
23439
|
tool("delete_automation_rule", "Delete an automation rule.", { id: external_exports.string() }, (a) => client.automation.deleteRule(a.id));
|
|
23440
|
+
tool("set_automation_rule_enabled", "Enable or disable an automation rule (pause it without deleting).", { id: external_exports.string(), enabled: external_exports.boolean() }, (a) => client.automation.setRuleEnabled(a.id, a.enabled));
|
|
23014
23441
|
tool("optimizer_log", "Recent automated budget-reallocation actions.", { limit: external_exports.number().optional() }, (a) => client.automation.optimizerLog(a.limit));
|
|
23015
23442
|
tool("list_alerts", "List anomaly/optimizer alerts.", {}, () => client.automation.alerts());
|
|
23016
23443
|
tool("ack_alert", "Acknowledge (mark read) an alert.", { id: external_exports.string() }, (a) => client.automation.ackAlert(a.id));
|
|
@@ -23026,7 +23453,7 @@ function createServer(client) {
|
|
|
23026
23453
|
tool("get_app_ads_txt", "An app's generated app-ads.txt content.", { id: external_exports.string() }, (a) => client.apps.appAdsTxt(a.id));
|
|
23027
23454
|
tool("report_ivt", "Invalid-traffic breakdown.", reportQuery, (a) => client.reporting.ivt(a));
|
|
23028
23455
|
tool("report_reach", "Reach & frequency (unique users): total reach, average frequency, a frequency-distribution histogram (impressions per user), and daily unique reach.", reportQuery, (a) => client.reporting.reach(a));
|
|
23029
|
-
tool("report_breakdown", "Impressions/clicks/CTR broken down by a dimension the hourly rollup drops: bdim = 'os' | 'browser' | 'deal' (PMP) | 'page' (page host). Defaults to os.", { ...reportQuery, bdim: external_exports.enum(["os", "browser", "deal", "page"]).optional().describe("os | browser | deal | page") }, (a) => client.reporting.breakdown(a));
|
|
23456
|
+
tool("report_breakdown", "Impressions/clicks/CTR/revenue/eCPM broken down by a dimension the hourly rollup drops: bdim = 'os' | 'browser' | 'deal' (PMP) | 'page' (site, by host) | 'page_url' (individual page, host+path \u2014 earnings per page) | 'app' (in-app/in-game app id \u2014 earnings per app) | 'property' (owning property) | 'region' | 'make'/'model' (device) | 'sub1'..'sub5' (affiliate sub-ids). revenue is publisher earnings or advertiser spend depending on the account. Defaults to os.", { ...reportQuery, bdim: external_exports.enum(["os", "browser", "deal", "page", "page_url", "app", "property", "region", "make", "model", "sub1", "sub2", "sub3", "sub4", "sub5"]).optional().describe("os | browser | deal | page | page_url | app | property") }, (a) => client.reporting.breakdown(a));
|
|
23030
23457
|
tool("report_creatives", "Per-creative performance for the advertiser: impressions, clicks, CTR, conversions, CVR per creative, plus a daily-CTR fatigue series for the top creative.", reportQuery, (a) => client.reporting.creatives(a));
|
|
23031
23458
|
tool("report_roas", "Advertiser ROAS / conversion-value daily trend: spend, conversions, conversion value, and ROAS (value/spend) per day.", reportQuery, (a) => client.reporting.roas(a));
|
|
23032
23459
|
tool("report_time_to_click", "Time-to-click engagement latency: average, median, and a distribution histogram (<1s / 1-3s / 3-10s / 10-30s / 30s+).", reportQuery, (a) => client.reporting.timeToClick(a));
|
|
@@ -23047,6 +23474,9 @@ function createServer(client) {
|
|
|
23047
23474
|
tool("report_closed_loop", "Closed-loop full-funnel attribution for house campaigns.", reportQuery, (a) => client.reporting.closedLoop(a));
|
|
23048
23475
|
tool("report_personal_network", "Personal Network (house ads) infra fees + delivery.", reportQuery, (a) => client.reporting.personalNetwork(a));
|
|
23049
23476
|
tool("report_viewability", "Viewability metrics grouped by placement or campaign.", { groupBy: external_exports.enum(["placement", "campaign"]).optional(), from: external_exports.string().optional(), to: external_exports.string().optional() }, (a) => client.reporting.viewability(a));
|
|
23477
|
+
tool("report_video", "Video completion analytics from quartile tracking: a funnel (starts \u2192 firstQuartile \u2192 midpoint \u2192 thirdQuartile \u2192 completes) with completionRate (completes\xF7starts), per-quartile retention, skips/skipRate and VAST error counts, plus a breakdown by placement (publisher) or campaign (advertiser). Returns { funnel, breakdown }.", { from: external_exports.string().optional(), to: external_exports.string().optional() }, (a) => client.reporting.video(a));
|
|
23478
|
+
tool("report_affiliate", "Affiliate sub-id performance: the FULL funnel per sub-id \u2014 impressions \u2192 clicks \u2192 conversions with CTR, CVR, revenue and payout. `sub` groups by sub1..sub5 (default sub1). Conversions/payout/CVR populate on advertiser scope (conversions carry no publisher_id).", { sub: external_exports.enum(["sub1", "sub2", "sub3", "sub4", "sub5"]).optional(), from: external_exports.string().optional(), to: external_exports.string().optional() }, (a) => client.reporting.affiliate(a));
|
|
23479
|
+
tool("report_carousel", "Per-card carousel click attribution: clicks per card (0-based index) of each carousel creative, with the card title/price. Advertiser-scoped.", { from: external_exports.string().optional(), to: external_exports.string().optional() }, (a) => client.reporting.carousel(a));
|
|
23050
23480
|
tool("list_saved_reports", "List saved report configs.", {}, () => client.reporting.saved());
|
|
23051
23481
|
tool("save_report", "Save a report configuration. fields: { name?, config? }.", { fields }, (a) => client.reporting.saveSaved(a.fields));
|
|
23052
23482
|
tool("delete_saved_report", "Delete a saved report.", { id: external_exports.string() }, (a) => client.reporting.deleteSaved(a.id));
|
|
@@ -23120,6 +23550,7 @@ function createServer(client) {
|
|
|
23120
23550
|
tool("save_onboarding_profile", "Save the onboarding profile. fields: { goal?, name?, company?, country?, currency?, timezone?, marketingOptIn? }.", { fields }, (a) => client.account.saveOnboardingProfile(a.fields));
|
|
23121
23551
|
tool("list_connections", "List linked social-login providers.", {}, () => client.auth.connections());
|
|
23122
23552
|
tool("disconnect_provider", "Disconnect a linked social-login provider.", { provider: external_exports.string() }, (a) => client.auth.disconnect(a.provider));
|
|
23553
|
+
tool("set_password", "Set or change the account password. Omit currentPassword when the account is SSO-only (setting a password for the first time so email+password login also works); required when changing an existing password.", { newPassword: external_exports.string(), currentPassword: external_exports.string().optional() }, (a) => client.auth.setPassword(a.newPassword, a.currentPassword));
|
|
23123
23554
|
tool("list_referrals", "Referral program overview.", {}, () => client.referrals.list());
|
|
23124
23555
|
tool("list_regions", "List active edge regions.", {}, () => client.regions.list());
|
|
23125
23556
|
tool("nearest_region", "Resolve the nearest region for a country/geo.", { country: external_exports.string().optional(), lat: external_exports.number().optional(), lng: external_exports.number().optional() }, (a) => client.regions.nearest(a));
|