@adviverse/mcp 0.1.1 → 0.1.3
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 +626 -151
- package/dist/index.js +626 -151
- package/package.json +2 -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
|
}
|
|
@@ -13234,14 +13244,19 @@ var ReportingResource = class extends Resource {
|
|
|
13234
13244
|
publisher(query) {
|
|
13235
13245
|
return this.c.request("GET", "/v1/reporting/publisher", { query });
|
|
13236
13246
|
}
|
|
13247
|
+
/** Fill summary: requests, fill_rate, paid_fill_rate (house excluded), no-fill reasons. */
|
|
13237
13248
|
publisherFill(query) {
|
|
13238
13249
|
return this.c.request("GET", "/v1/reporting/publisher/fill", { query });
|
|
13239
13250
|
}
|
|
13240
13251
|
/** Per-placement rollup (impressions, clicks, CTR, revenue, RPM, eCPM, fill
|
|
13241
|
-
* rate, viewable rate) for the authed publisher. */
|
|
13252
|
+
* rate, paid fill rate, viewable rate, slot CLS) for the authed publisher. */
|
|
13242
13253
|
publisherPlacements(query) {
|
|
13243
13254
|
return this.c.request("GET", "/v1/reporting/publisher/placements", { query });
|
|
13244
13255
|
}
|
|
13256
|
+
/** Anti-adblock: impressions recovered from adblock visitors (first-party serving). */
|
|
13257
|
+
antiAdblock(query) {
|
|
13258
|
+
return this.c.request("GET", "/v1/reporting/publisher/anti-adblock", { query });
|
|
13259
|
+
}
|
|
13245
13260
|
advertiser(query) {
|
|
13246
13261
|
return this.c.request("GET", "/v1/reporting/advertiser", { query });
|
|
13247
13262
|
}
|
|
@@ -13259,7 +13274,13 @@ var ReportingResource = class extends Resource {
|
|
|
13259
13274
|
reach(query) {
|
|
13260
13275
|
return this.c.request("GET", "/v1/reporting/reach", { query });
|
|
13261
13276
|
}
|
|
13262
|
-
/**
|
|
13277
|
+
/**
|
|
13278
|
+
* Breakdown over a dimension the hourly rollup drops
|
|
13279
|
+
* (bdim=os|browser|deal|page|page_url|app|property). 'page' groups by site
|
|
13280
|
+
* (host), 'page_url' by individual page (host+path), 'app' by in-app/in-game
|
|
13281
|
+
* app id, 'property' by owning property (app/site). Rows carry impressions,
|
|
13282
|
+
* clicks, ctr, revenue (publisher earnings or advertiser spend) and ecpm.
|
|
13283
|
+
*/
|
|
13263
13284
|
breakdown(query) {
|
|
13264
13285
|
return this.c.request("GET", "/v1/reporting/breakdown", { query });
|
|
13265
13286
|
}
|
|
@@ -13335,6 +13356,23 @@ var ReportingResource = class extends Resource {
|
|
|
13335
13356
|
viewability(query) {
|
|
13336
13357
|
return this.c.request("GET", "/v1/reporting/viewability", { query });
|
|
13337
13358
|
}
|
|
13359
|
+
/** Video completion: the funnel (starts → quartiles → completes) and completion
|
|
13360
|
+
* rate / VTR, plus a per-placement (publisher) or per-campaign (advertiser)
|
|
13361
|
+
* breakdown. Returns { funnel, breakdown }. */
|
|
13362
|
+
video(query) {
|
|
13363
|
+
return this.c.request("GET", "/v1/reporting/video", { query });
|
|
13364
|
+
}
|
|
13365
|
+
/** Affiliate sub-id funnel: impressions → clicks → conversions per sub-id, with
|
|
13366
|
+
* CTR / CVR / revenue / payout. `sub` picks which of sub1..sub5 to group by
|
|
13367
|
+
* (default sub1). Conversions populate on advertiser scope only. */
|
|
13368
|
+
affiliate(query) {
|
|
13369
|
+
return this.c.request("GET", "/v1/reporting/affiliate", { query });
|
|
13370
|
+
}
|
|
13371
|
+
/** Per-card carousel click attribution: clicks per card of each carousel
|
|
13372
|
+
* creative, with the card's title/price. Advertiser-scoped. */
|
|
13373
|
+
carousel(query) {
|
|
13374
|
+
return this.c.request("GET", "/v1/reporting/carousel", { query });
|
|
13375
|
+
}
|
|
13338
13376
|
/** List saved report configurations. */
|
|
13339
13377
|
saved() {
|
|
13340
13378
|
return this.c.request("GET", "/v1/reporting/saved");
|
|
@@ -13403,6 +13441,14 @@ var ReferralsResource = class extends Resource {
|
|
|
13403
13441
|
list() {
|
|
13404
13442
|
return this.c.request("GET", "/v1/referrals");
|
|
13405
13443
|
}
|
|
13444
|
+
/** Refer & earn: partner status, `?via=` link, clicks, sign-ups and commissions. */
|
|
13445
|
+
affiliate() {
|
|
13446
|
+
return this.c.request("GET", "/v1/referrals/affiliate");
|
|
13447
|
+
}
|
|
13448
|
+
/** Join Refer & earn (idempotent); returns the new overview. */
|
|
13449
|
+
joinAffiliate() {
|
|
13450
|
+
return this.c.request("POST", "/v1/referrals/affiliate/join");
|
|
13451
|
+
}
|
|
13406
13452
|
};
|
|
13407
13453
|
var WebhooksResource = class extends Resource {
|
|
13408
13454
|
constructor(c) {
|
|
@@ -13417,9 +13463,33 @@ var WebhooksResource = class extends Resource {
|
|
|
13417
13463
|
create(body) {
|
|
13418
13464
|
return this.c.request("POST", "/v1/webhooks", { body });
|
|
13419
13465
|
}
|
|
13466
|
+
/** Update an endpoint's URL, subscribed events, and/or active (pause) flag. */
|
|
13467
|
+
update(id, body) {
|
|
13468
|
+
return this.c.request("PATCH", `/v1/webhooks/${encodeURIComponent(id)}`, { body });
|
|
13469
|
+
}
|
|
13420
13470
|
delete(id) {
|
|
13421
13471
|
return this.c.request("DELETE", `/v1/webhooks/${encodeURIComponent(id)}`);
|
|
13422
13472
|
}
|
|
13473
|
+
/** Roll the signing secret (old one stops verifying immediately). */
|
|
13474
|
+
rotateSecret(id) {
|
|
13475
|
+
return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/rotate-secret`);
|
|
13476
|
+
}
|
|
13477
|
+
/** Fetch the signing secret (list()/update() only return `has_secret` + `secret_hint`). */
|
|
13478
|
+
revealSecret(id) {
|
|
13479
|
+
return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/secret/reveal`);
|
|
13480
|
+
}
|
|
13481
|
+
/** Fire a synthetic `ping` event to verify the endpoint. */
|
|
13482
|
+
ping(id) {
|
|
13483
|
+
return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/ping`);
|
|
13484
|
+
}
|
|
13485
|
+
/** Recent delivery attempts for one subscription (newest first). */
|
|
13486
|
+
deliveries(id, query) {
|
|
13487
|
+
return this.c.request("GET", `/v1/webhooks/${encodeURIComponent(id)}/deliveries`, { query });
|
|
13488
|
+
}
|
|
13489
|
+
/** Manually re-send a past delivery's payload. */
|
|
13490
|
+
redeliver(deliveryId) {
|
|
13491
|
+
return this.c.request("POST", `/v1/webhooks/deliveries/${encodeURIComponent(deliveryId)}/redeliver`);
|
|
13492
|
+
}
|
|
13423
13493
|
};
|
|
13424
13494
|
var KeysResource = class extends Resource {
|
|
13425
13495
|
constructor(c) {
|
|
@@ -13508,6 +13578,186 @@ var StatsResource = class extends Resource {
|
|
|
13508
13578
|
return this.c.request("GET", "/v1/stats");
|
|
13509
13579
|
}
|
|
13510
13580
|
};
|
|
13581
|
+
var TeamResource = class extends Resource {
|
|
13582
|
+
constructor(c) {
|
|
13583
|
+
super(c);
|
|
13584
|
+
}
|
|
13585
|
+
/** Every seat under the account, with each member's role + pixel grants. */
|
|
13586
|
+
list() {
|
|
13587
|
+
return this.c.request("GET", "/v1/advertiser/team");
|
|
13588
|
+
}
|
|
13589
|
+
/**
|
|
13590
|
+
* Invite a team member. `role` 'admin' grants full account access; 'manager'
|
|
13591
|
+
* and 'analyst' are confined to the assigned `pixelIds` (managers can write,
|
|
13592
|
+
* analysts are read-only). `allPixels: true` grants every pixel.
|
|
13593
|
+
*/
|
|
13594
|
+
invite(body) {
|
|
13595
|
+
return this.c.request("POST", "/v1/advertiser/team", { body });
|
|
13596
|
+
}
|
|
13597
|
+
/** Change a member's role, pixel grants, name, or status ('active'|'disabled'). */
|
|
13598
|
+
update(id, body) {
|
|
13599
|
+
return this.c.request("POST", `/v1/advertiser/team/${encodeURIComponent(id)}`, { body });
|
|
13600
|
+
}
|
|
13601
|
+
/** Re-send a pending member's invitation email. */
|
|
13602
|
+
resendInvite(id) {
|
|
13603
|
+
return this.c.request("POST", `/v1/advertiser/team/${encodeURIComponent(id)}/resend`);
|
|
13604
|
+
}
|
|
13605
|
+
/** Remove a seat entirely (revokes their sessions). */
|
|
13606
|
+
remove(id) {
|
|
13607
|
+
return this.c.request("DELETE", `/v1/advertiser/team/${encodeURIComponent(id)}`);
|
|
13608
|
+
}
|
|
13609
|
+
};
|
|
13610
|
+
var ClientsResource = class extends Resource {
|
|
13611
|
+
constructor(c) {
|
|
13612
|
+
super(c);
|
|
13613
|
+
}
|
|
13614
|
+
/** List the agency's clients (with tagged-campaign counts). */
|
|
13615
|
+
list() {
|
|
13616
|
+
return this.c.request("GET", "/v1/advertiser/clients");
|
|
13617
|
+
}
|
|
13618
|
+
get(id) {
|
|
13619
|
+
return this.c.request("GET", `/v1/advertiser/clients/${encodeURIComponent(id)}`);
|
|
13620
|
+
}
|
|
13621
|
+
create(body) {
|
|
13622
|
+
return this.c.request("POST", "/v1/advertiser/clients", { body });
|
|
13623
|
+
}
|
|
13624
|
+
update(id, body) {
|
|
13625
|
+
return this.c.request("POST", `/v1/advertiser/clients/${encodeURIComponent(id)}`, { body });
|
|
13626
|
+
}
|
|
13627
|
+
remove(id) {
|
|
13628
|
+
return this.c.request("DELETE", `/v1/advertiser/clients/${encodeURIComponent(id)}`);
|
|
13629
|
+
}
|
|
13630
|
+
/** Campaigns owned by the account with their current client tag. */
|
|
13631
|
+
campaigns() {
|
|
13632
|
+
return this.c.request("GET", "/v1/advertiser/clients/campaigns");
|
|
13633
|
+
}
|
|
13634
|
+
/** Tag (or untag with clientId=null) a campaign to a client so its spend rolls up. */
|
|
13635
|
+
tagCampaign(campaignId, clientId) {
|
|
13636
|
+
return this.c.request("POST", "/v1/advertiser/clients/tag", { body: { campaignId, clientId } });
|
|
13637
|
+
}
|
|
13638
|
+
/** Spend + delivery for a client over a period (defaults to last 30d). */
|
|
13639
|
+
spend(id, from, to) {
|
|
13640
|
+
return this.c.request("GET", `/v1/advertiser/clients/${encodeURIComponent(id)}/spend`, { query: { ...from ? { from } : {}, ...to ? { to } : {} } });
|
|
13641
|
+
}
|
|
13642
|
+
};
|
|
13643
|
+
var InvoicesResource = class extends Resource {
|
|
13644
|
+
constructor(c) {
|
|
13645
|
+
super(c);
|
|
13646
|
+
}
|
|
13647
|
+
list(clientId) {
|
|
13648
|
+
return this.c.request("GET", "/v1/advertiser/invoices", { query: clientId ? { clientId } : void 0 });
|
|
13649
|
+
}
|
|
13650
|
+
get(id) {
|
|
13651
|
+
return this.c.request("GET", `/v1/advertiser/invoices/${encodeURIComponent(id)}`);
|
|
13652
|
+
}
|
|
13653
|
+
/**
|
|
13654
|
+
* Create a draft invoice. With a period, auto-adds the client's tagged-campaign
|
|
13655
|
+
* spend as a line, plus an optional markupPct agency fee. Extra manual items
|
|
13656
|
+
* may be supplied.
|
|
13657
|
+
*/
|
|
13658
|
+
create(body) {
|
|
13659
|
+
return this.c.request("POST", "/v1/advertiser/invoices", { body });
|
|
13660
|
+
}
|
|
13661
|
+
addItem(id, item) {
|
|
13662
|
+
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/items`, { body: item });
|
|
13663
|
+
}
|
|
13664
|
+
removeItem(id, itemId) {
|
|
13665
|
+
return this.c.request("DELETE", `/v1/advertiser/invoices/${encodeURIComponent(id)}/items/${encodeURIComponent(itemId)}`);
|
|
13666
|
+
}
|
|
13667
|
+
/** Send the invoice: mints a public pay link + emails the client. Returns it with `payLink`. */
|
|
13668
|
+
send(id) {
|
|
13669
|
+
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/send`);
|
|
13670
|
+
}
|
|
13671
|
+
/** Record an offline/out-of-band payment. */
|
|
13672
|
+
markPaid(id) {
|
|
13673
|
+
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/mark-paid`);
|
|
13674
|
+
}
|
|
13675
|
+
void(id) {
|
|
13676
|
+
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/void`);
|
|
13677
|
+
}
|
|
13678
|
+
};
|
|
13679
|
+
var TransfersResource = class extends Resource {
|
|
13680
|
+
constructor(c) {
|
|
13681
|
+
super(c);
|
|
13682
|
+
}
|
|
13683
|
+
/** Initiate a transfer of one of your pixels (and its audiences) to an email. */
|
|
13684
|
+
initiate(pixelId, email2) {
|
|
13685
|
+
return this.c.request("POST", "/v1/advertiser/transfers", { body: { pixelId, email: email2 } });
|
|
13686
|
+
}
|
|
13687
|
+
/** Outgoing transfers you've initiated. */
|
|
13688
|
+
list() {
|
|
13689
|
+
return this.c.request("GET", "/v1/advertiser/transfers");
|
|
13690
|
+
}
|
|
13691
|
+
cancel(id) {
|
|
13692
|
+
return this.c.request("POST", `/v1/advertiser/transfers/${encodeURIComponent(id)}/cancel`);
|
|
13693
|
+
}
|
|
13694
|
+
/** Preview an incoming transfer by its token (the recipient must be logged in). */
|
|
13695
|
+
info(token) {
|
|
13696
|
+
return this.c.request("GET", "/v1/transfers/info", { query: { token } });
|
|
13697
|
+
}
|
|
13698
|
+
/** Accept an incoming transfer — the pixel + its audiences move to YOUR account. */
|
|
13699
|
+
accept(token) {
|
|
13700
|
+
return this.c.request("POST", "/v1/transfers/accept", { body: { token } });
|
|
13701
|
+
}
|
|
13702
|
+
};
|
|
13703
|
+
var TerminalResource = class extends Resource {
|
|
13704
|
+
constructor(c) {
|
|
13705
|
+
super(c);
|
|
13706
|
+
}
|
|
13707
|
+
/**
|
|
13708
|
+
* Fetch one rotated terminal ad from YOUR OWN campaigns. Auth precedence:
|
|
13709
|
+
* `token` (public ts_… — safe to ship) → the client's `x-api-key` (secret).
|
|
13710
|
+
*/
|
|
13711
|
+
serve(opts = {}) {
|
|
13712
|
+
return this.c.request("GET", "/terminal/serve", {
|
|
13713
|
+
baseUrl: this.c.servingBaseUrl,
|
|
13714
|
+
query: { token: opts.token, campaignId: opts.campaignId, uid: opts.uid }
|
|
13715
|
+
});
|
|
13716
|
+
}
|
|
13717
|
+
/** Mint a PUBLIC serve token (ts_…) — non-secret, serve-only, safe to embed in
|
|
13718
|
+
* a distributed client. Optionally pin it to one terminal campaign, and/or arm
|
|
13719
|
+
* adaptive mode-switching (`switch`) so the engine rotates each install between
|
|
13720
|
+
* your ads and the marketplace based on engagement. */
|
|
13721
|
+
createToken(body = {}) {
|
|
13722
|
+
return this.c.request("POST", "/v1/advertiser/terminal-tokens", { body });
|
|
13723
|
+
}
|
|
13724
|
+
listTokens() {
|
|
13725
|
+
return this.c.request("GET", "/v1/advertiser/terminal-tokens");
|
|
13726
|
+
}
|
|
13727
|
+
/** Arm / update / disable a token's mode-switching policy in place (same ts_
|
|
13728
|
+
* value keeps working). Pass an empty object (or all-zero policy) to disable. */
|
|
13729
|
+
setTokenPolicy(id, policy) {
|
|
13730
|
+
return this.c.request("PATCH", `/v1/advertiser/terminal-tokens/${encodeURIComponent(id)}/switch`, { body: policy });
|
|
13731
|
+
}
|
|
13732
|
+
/** Rotate a token's value (old value stops working immediately). */
|
|
13733
|
+
rotateToken(id) {
|
|
13734
|
+
return this.c.request("POST", `/v1/advertiser/terminal-tokens/${encodeURIComponent(id)}/rotate`);
|
|
13735
|
+
}
|
|
13736
|
+
revokeToken(id) {
|
|
13737
|
+
return this.c.request("DELETE", `/v1/advertiser/terminal-tokens/${encodeURIComponent(id)}`);
|
|
13738
|
+
}
|
|
13739
|
+
};
|
|
13740
|
+
var CampaignGroupsResource = class extends Resource {
|
|
13741
|
+
constructor(c) {
|
|
13742
|
+
super(c);
|
|
13743
|
+
}
|
|
13744
|
+
/** Groups with their ad sets nested + a per-group spend rollup. */
|
|
13745
|
+
list() {
|
|
13746
|
+
return this.c.request("GET", "/v1/advertiser/campaign-groups");
|
|
13747
|
+
}
|
|
13748
|
+
get(id) {
|
|
13749
|
+
return this.c.request("GET", `/v1/advertiser/campaign-groups/${encodeURIComponent(id)}`);
|
|
13750
|
+
}
|
|
13751
|
+
create(body) {
|
|
13752
|
+
return this.c.request("POST", "/v1/advertiser/campaign-groups", { body });
|
|
13753
|
+
}
|
|
13754
|
+
update(id, body) {
|
|
13755
|
+
return this.c.request("PATCH", `/v1/advertiser/campaign-groups/${encodeURIComponent(id)}`, { body });
|
|
13756
|
+
}
|
|
13757
|
+
remove(id) {
|
|
13758
|
+
return this.c.request("DELETE", `/v1/advertiser/campaign-groups/${encodeURIComponent(id)}`);
|
|
13759
|
+
}
|
|
13760
|
+
};
|
|
13511
13761
|
var CampaignsResource = class extends Resource {
|
|
13512
13762
|
constructor(c) {
|
|
13513
13763
|
super(c);
|
|
@@ -13524,6 +13774,11 @@ var CampaignsResource = class extends Resource {
|
|
|
13524
13774
|
update(id, body) {
|
|
13525
13775
|
return this.c.request("PATCH", `/v1/advertiser/campaigns/${encodeURIComponent(id)}`, { body });
|
|
13526
13776
|
}
|
|
13777
|
+
/** Soft-delete a campaign: stops serving + removes it from the list. Past
|
|
13778
|
+
* spend/stats stay for reporting. */
|
|
13779
|
+
remove(id) {
|
|
13780
|
+
return this.c.request("DELETE", `/v1/advertiser/campaigns/${encodeURIComponent(id)}`);
|
|
13781
|
+
}
|
|
13527
13782
|
submit(id) {
|
|
13528
13783
|
return this.c.request("POST", `/v1/advertiser/campaigns/${encodeURIComponent(id)}/submit`);
|
|
13529
13784
|
}
|
|
@@ -13606,6 +13861,15 @@ var CreativesResource = class extends Resource {
|
|
|
13606
13861
|
if (fields2) for (const [k, v] of Object.entries(fields2)) form.append(k, v);
|
|
13607
13862
|
return this.c.request("POST", "/v1/advertiser/creatives/upload", { form });
|
|
13608
13863
|
}
|
|
13864
|
+
/** Uploads a PLAYABLE (interactive HTML5) as a ZIP bundle. The server validates
|
|
13865
|
+
* it, injects the sandbox runtime into its index.html, and hosts it on the CDN.
|
|
13866
|
+
* Returns { assetUrl, type:'html5', … } to pass to create() as a full-screen
|
|
13867
|
+
* (interstitial/rewarded) creative. `zip` is a Blob/File of the .zip. */
|
|
13868
|
+
uploadPlayable(zip, filename = "playable.zip") {
|
|
13869
|
+
const form = new FormData();
|
|
13870
|
+
form.append("file", zip, filename);
|
|
13871
|
+
return this.c.request("POST", "/v1/advertiser/creatives/playable", { form });
|
|
13872
|
+
}
|
|
13609
13873
|
delete(id) {
|
|
13610
13874
|
return this.c.request("DELETE", `/v1/advertiser/creatives/${encodeURIComponent(id)}`);
|
|
13611
13875
|
}
|
|
@@ -13856,128 +14120,6 @@ var PixelResource = class extends Resource {
|
|
|
13856
14120
|
return this.c.request("GET", "/v1/advertiser/pixel/traits", { query: { user, ...pixelId ? { pixelId } : {} } });
|
|
13857
14121
|
}
|
|
13858
14122
|
};
|
|
13859
|
-
var TeamResource = class extends Resource {
|
|
13860
|
-
constructor(c) {
|
|
13861
|
-
super(c);
|
|
13862
|
-
}
|
|
13863
|
-
/** Every seat under the account, with each member's role + pixel grants. */
|
|
13864
|
-
list() {
|
|
13865
|
-
return this.c.request("GET", "/v1/advertiser/team");
|
|
13866
|
-
}
|
|
13867
|
-
/**
|
|
13868
|
-
* Invite a team member. `role` 'admin' grants full account access; 'manager'
|
|
13869
|
-
* and 'analyst' are confined to the assigned `pixelIds` (managers can write,
|
|
13870
|
-
* analysts are read-only). `allPixels: true` grants every pixel.
|
|
13871
|
-
*/
|
|
13872
|
-
invite(body) {
|
|
13873
|
-
return this.c.request("POST", "/v1/advertiser/team", { body });
|
|
13874
|
-
}
|
|
13875
|
-
/** Change a member's role, pixel grants, name, or status ('active'|'disabled'). */
|
|
13876
|
-
update(id, body) {
|
|
13877
|
-
return this.c.request("POST", `/v1/advertiser/team/${encodeURIComponent(id)}`, { body });
|
|
13878
|
-
}
|
|
13879
|
-
/** Re-send a pending member's invitation email. */
|
|
13880
|
-
resendInvite(id) {
|
|
13881
|
-
return this.c.request("POST", `/v1/advertiser/team/${encodeURIComponent(id)}/resend`);
|
|
13882
|
-
}
|
|
13883
|
-
/** Remove a seat entirely (revokes their sessions). */
|
|
13884
|
-
remove(id) {
|
|
13885
|
-
return this.c.request("DELETE", `/v1/advertiser/team/${encodeURIComponent(id)}`);
|
|
13886
|
-
}
|
|
13887
|
-
};
|
|
13888
|
-
var ClientsResource = class extends Resource {
|
|
13889
|
-
constructor(c) {
|
|
13890
|
-
super(c);
|
|
13891
|
-
}
|
|
13892
|
-
/** List the agency's clients (with tagged-campaign counts). */
|
|
13893
|
-
list() {
|
|
13894
|
-
return this.c.request("GET", "/v1/advertiser/clients");
|
|
13895
|
-
}
|
|
13896
|
-
get(id) {
|
|
13897
|
-
return this.c.request("GET", `/v1/advertiser/clients/${encodeURIComponent(id)}`);
|
|
13898
|
-
}
|
|
13899
|
-
create(body) {
|
|
13900
|
-
return this.c.request("POST", "/v1/advertiser/clients", { body });
|
|
13901
|
-
}
|
|
13902
|
-
update(id, body) {
|
|
13903
|
-
return this.c.request("POST", `/v1/advertiser/clients/${encodeURIComponent(id)}`, { body });
|
|
13904
|
-
}
|
|
13905
|
-
remove(id) {
|
|
13906
|
-
return this.c.request("DELETE", `/v1/advertiser/clients/${encodeURIComponent(id)}`);
|
|
13907
|
-
}
|
|
13908
|
-
/** Campaigns owned by the account with their current client tag. */
|
|
13909
|
-
campaigns() {
|
|
13910
|
-
return this.c.request("GET", "/v1/advertiser/clients/campaigns");
|
|
13911
|
-
}
|
|
13912
|
-
/** Tag (or untag with clientId=null) a campaign to a client so its spend rolls up. */
|
|
13913
|
-
tagCampaign(campaignId, clientId) {
|
|
13914
|
-
return this.c.request("POST", "/v1/advertiser/clients/tag", { body: { campaignId, clientId } });
|
|
13915
|
-
}
|
|
13916
|
-
/** Spend + delivery for a client over a period (defaults to last 30d). */
|
|
13917
|
-
spend(id, from, to) {
|
|
13918
|
-
return this.c.request("GET", `/v1/advertiser/clients/${encodeURIComponent(id)}/spend`, { query: { ...from ? { from } : {}, ...to ? { to } : {} } });
|
|
13919
|
-
}
|
|
13920
|
-
};
|
|
13921
|
-
var InvoicesResource = class extends Resource {
|
|
13922
|
-
constructor(c) {
|
|
13923
|
-
super(c);
|
|
13924
|
-
}
|
|
13925
|
-
list(clientId) {
|
|
13926
|
-
return this.c.request("GET", "/v1/advertiser/invoices", { query: clientId ? { clientId } : void 0 });
|
|
13927
|
-
}
|
|
13928
|
-
get(id) {
|
|
13929
|
-
return this.c.request("GET", `/v1/advertiser/invoices/${encodeURIComponent(id)}`);
|
|
13930
|
-
}
|
|
13931
|
-
/**
|
|
13932
|
-
* Create a draft invoice. With a period, auto-adds the client's tagged-campaign
|
|
13933
|
-
* spend as a line, plus an optional markupPct agency fee. Extra manual items
|
|
13934
|
-
* may be supplied.
|
|
13935
|
-
*/
|
|
13936
|
-
create(body) {
|
|
13937
|
-
return this.c.request("POST", "/v1/advertiser/invoices", { body });
|
|
13938
|
-
}
|
|
13939
|
-
addItem(id, item) {
|
|
13940
|
-
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/items`, { body: item });
|
|
13941
|
-
}
|
|
13942
|
-
removeItem(id, itemId) {
|
|
13943
|
-
return this.c.request("DELETE", `/v1/advertiser/invoices/${encodeURIComponent(id)}/items/${encodeURIComponent(itemId)}`);
|
|
13944
|
-
}
|
|
13945
|
-
/** Send the invoice: mints a public pay link + emails the client. Returns it with `payLink`. */
|
|
13946
|
-
send(id) {
|
|
13947
|
-
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/send`);
|
|
13948
|
-
}
|
|
13949
|
-
/** Record an offline/out-of-band payment. */
|
|
13950
|
-
markPaid(id) {
|
|
13951
|
-
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/mark-paid`);
|
|
13952
|
-
}
|
|
13953
|
-
void(id) {
|
|
13954
|
-
return this.c.request("POST", `/v1/advertiser/invoices/${encodeURIComponent(id)}/void`);
|
|
13955
|
-
}
|
|
13956
|
-
};
|
|
13957
|
-
var TransfersResource = class extends Resource {
|
|
13958
|
-
constructor(c) {
|
|
13959
|
-
super(c);
|
|
13960
|
-
}
|
|
13961
|
-
/** Initiate a transfer of one of your pixels (and its audiences) to an email. */
|
|
13962
|
-
initiate(pixelId, email2) {
|
|
13963
|
-
return this.c.request("POST", "/v1/advertiser/transfers", { body: { pixelId, email: email2 } });
|
|
13964
|
-
}
|
|
13965
|
-
/** Outgoing transfers you've initiated. */
|
|
13966
|
-
list() {
|
|
13967
|
-
return this.c.request("GET", "/v1/advertiser/transfers");
|
|
13968
|
-
}
|
|
13969
|
-
cancel(id) {
|
|
13970
|
-
return this.c.request("POST", `/v1/advertiser/transfers/${encodeURIComponent(id)}/cancel`);
|
|
13971
|
-
}
|
|
13972
|
-
/** Preview an incoming transfer by its token (the recipient must be logged in). */
|
|
13973
|
-
info(token) {
|
|
13974
|
-
return this.c.request("GET", "/v1/transfers/info", { query: { token } });
|
|
13975
|
-
}
|
|
13976
|
-
/** Accept an incoming transfer — the pixel + its audiences move to YOUR account. */
|
|
13977
|
-
accept(token) {
|
|
13978
|
-
return this.c.request("POST", "/v1/transfers/accept", { body: { token } });
|
|
13979
|
-
}
|
|
13980
|
-
};
|
|
13981
14123
|
var FeedsResource = class extends Resource {
|
|
13982
14124
|
constructor(c) {
|
|
13983
14125
|
super(c);
|
|
@@ -14072,6 +14214,10 @@ var AutomationResource = class extends Resource {
|
|
|
14072
14214
|
deleteRule(id) {
|
|
14073
14215
|
return this.c.request("DELETE", `/v1/automation/rules/${encodeURIComponent(id)}`);
|
|
14074
14216
|
}
|
|
14217
|
+
/** Enable or disable a rule (pause it without deleting). */
|
|
14218
|
+
setRuleEnabled(id, enabled) {
|
|
14219
|
+
return this.c.request("PATCH", `/v1/automation/rules/${encodeURIComponent(id)}`, { body: { enabled } });
|
|
14220
|
+
}
|
|
14075
14221
|
/** Recent automated budget-reallocation actions. */
|
|
14076
14222
|
optimizerLog(limit) {
|
|
14077
14223
|
return this.c.request("GET", "/v1/optimizer/log", { query: { limit } });
|
|
@@ -14114,13 +14260,39 @@ var PropertiesResource = class extends Resource {
|
|
|
14114
14260
|
return this.c.request("POST", "/v1/publisher/properties", { body, idempotencyKey });
|
|
14115
14261
|
}
|
|
14116
14262
|
/** Update a property's editable fields: display name, domain, category, and
|
|
14117
|
-
* verification method. Changing the domain resets verification.
|
|
14263
|
+
* verification method. Changing the domain resets verification. `category`
|
|
14264
|
+
* (a site-niche id) is kept as the publisher's manual choice; 0 hands it back
|
|
14265
|
+
* to auto-detection. */
|
|
14118
14266
|
update(id, body) {
|
|
14119
14267
|
return this.c.request("PATCH", `/v1/publisher/properties/${encodeURIComponent(id)}`, { body });
|
|
14120
14268
|
}
|
|
14269
|
+
/** Re-detect a website's niche from its pages (updates `category` only when it is auto). */
|
|
14270
|
+
classify(id) {
|
|
14271
|
+
return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/classify`);
|
|
14272
|
+
}
|
|
14273
|
+
/** The site-niche taxonomy: ids for property `category` and campaign `propertyCategoryInclude/Exclude`. Public. */
|
|
14274
|
+
niches() {
|
|
14275
|
+
return this.c.request("GET", "/v1/site-niches");
|
|
14276
|
+
}
|
|
14121
14277
|
verify(id) {
|
|
14122
14278
|
return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/verify`);
|
|
14123
14279
|
}
|
|
14280
|
+
/** The ads.txt line(s) to publish at https://<domain>/ads.txt (plain text). */
|
|
14281
|
+
adsTxt(id) {
|
|
14282
|
+
return this.c.request("GET", `/v1/publisher/properties/${encodeURIComponent(id)}/ads.txt`, { text: true });
|
|
14283
|
+
}
|
|
14284
|
+
/** Set/clear the property's first-party ad-serving domain (anti-adblock). Pass
|
|
14285
|
+
* null/undefined to remove. Returns the CNAME target to point the domain at. */
|
|
14286
|
+
setServingDomain(id, domain) {
|
|
14287
|
+
return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/serving-domain`, { body: { domain } });
|
|
14288
|
+
}
|
|
14289
|
+
/** Verify the custom serving domain CNAMEs to our edge (proves control + routes). */
|
|
14290
|
+
verifyServingDomain(id) {
|
|
14291
|
+
return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/serving-domain/verify`);
|
|
14292
|
+
}
|
|
14293
|
+
removeServingDomain(id) {
|
|
14294
|
+
return this.c.request("DELETE", `/v1/publisher/properties/${encodeURIComponent(id)}/serving-domain`);
|
|
14295
|
+
}
|
|
14124
14296
|
domainConnect(id) {
|
|
14125
14297
|
return this.c.request(
|
|
14126
14298
|
"POST",
|
|
@@ -14148,6 +14320,7 @@ var PlacementsResource = class extends Resource {
|
|
|
14148
14320
|
update(id, body) {
|
|
14149
14321
|
return this.c.request("PATCH", `/v1/publisher/placements/${encodeURIComponent(id)}`, { body });
|
|
14150
14322
|
}
|
|
14323
|
+
/** Install code; responsive banners also carry `autoAdsScript` (site-wide auto-ads tag). */
|
|
14151
14324
|
tag(id) {
|
|
14152
14325
|
return this.c.request("GET", `/v1/publisher/placements/${encodeURIComponent(id)}/tag`);
|
|
14153
14326
|
}
|
|
@@ -14190,11 +14363,19 @@ var ConsentResource = class extends Resource {
|
|
|
14190
14363
|
constructor(c) {
|
|
14191
14364
|
super(c);
|
|
14192
14365
|
}
|
|
14193
|
-
/**
|
|
14194
|
-
|
|
14195
|
-
|
|
14366
|
+
/**
|
|
14367
|
+
* Get consent config. Consent is scoped per PROPERTY (domain) — pass a
|
|
14368
|
+
* propertyId to read that property's config (falling back to the account-wide
|
|
14369
|
+
* default). Omit it to read the account-wide default directly.
|
|
14370
|
+
*/
|
|
14371
|
+
getConfig(propertyId) {
|
|
14372
|
+
const q = propertyId ? `?propertyId=${encodeURIComponent(propertyId)}` : "";
|
|
14373
|
+
return this.c.request("GET", `/v1/publisher/consent-config${q}`);
|
|
14196
14374
|
}
|
|
14197
|
-
/**
|
|
14375
|
+
/**
|
|
14376
|
+
* Save the CMP framework + default-consent + snippet behavior for a property
|
|
14377
|
+
* (set `propertyId` in the body). Omit `propertyId` to save the account default.
|
|
14378
|
+
*/
|
|
14198
14379
|
saveConfig(body) {
|
|
14199
14380
|
return this.c.request("POST", "/v1/publisher/consent-config", { body });
|
|
14200
14381
|
}
|
|
@@ -14341,6 +14522,18 @@ var AdminResource = class extends Resource {
|
|
|
14341
14522
|
return this.c.request("GET", "/v1/admin/audit");
|
|
14342
14523
|
}
|
|
14343
14524
|
/** Properties ranked by Made-For-Advertising risk score. */
|
|
14525
|
+
/** Website/app properties with trust tier, lock, niches and promotion progress. */
|
|
14526
|
+
trustProperties(query) {
|
|
14527
|
+
return this.c.request("GET", "/v1/admin/properties/trust", { query });
|
|
14528
|
+
}
|
|
14529
|
+
/** Override a property's trust tier and/or lock it against automatic changes. */
|
|
14530
|
+
setPropertyTrust(id, body) {
|
|
14531
|
+
return this.c.request("POST", `/v1/admin/properties/${encodeURIComponent(id)}/trust`, { body });
|
|
14532
|
+
}
|
|
14533
|
+
/** The trust audit log (auto promotions/demotions, domain resets, overrides). */
|
|
14534
|
+
trustEvents(query) {
|
|
14535
|
+
return this.c.request("GET", "/v1/admin/trust-events", { query });
|
|
14536
|
+
}
|
|
14344
14537
|
mfaRanking(limit) {
|
|
14345
14538
|
return this.c.request("GET", "/v1/admin/mfa", { query: { limit } });
|
|
14346
14539
|
}
|
|
@@ -14417,10 +14610,235 @@ var BlogResource = class extends Resource {
|
|
|
14417
14610
|
return this.c.request("DELETE", `/v1/admin/blog/${encodeURIComponent(id)}`);
|
|
14418
14611
|
}
|
|
14419
14612
|
};
|
|
14613
|
+
var MarketplaceCatalogResource = class extends Resource {
|
|
14614
|
+
constructor(c) {
|
|
14615
|
+
super(c);
|
|
14616
|
+
}
|
|
14617
|
+
/** Bulk upsert catalog items (create or update by `external_id`). */
|
|
14618
|
+
upsert(items) {
|
|
14619
|
+
const body = { items };
|
|
14620
|
+
return this.c.request("POST", "/v1/advertiser/marketplace-catalog", { body });
|
|
14621
|
+
}
|
|
14622
|
+
/** The catalog items the account has uploaded. */
|
|
14623
|
+
list() {
|
|
14624
|
+
return this.c.request("GET", "/v1/advertiser/marketplace-catalog");
|
|
14625
|
+
}
|
|
14626
|
+
/**
|
|
14627
|
+
* Register (or update) a hosted catalog feed URL that we re-fetch on a schedule
|
|
14628
|
+
* (SSRF-guarded pull → the same upsert path). Re-registering the same URL updates
|
|
14629
|
+
* its interval and re-activates it.
|
|
14630
|
+
*/
|
|
14631
|
+
registerFeed(input) {
|
|
14632
|
+
return this.c.request("POST", "/v1/advertiser/catalog-feeds", { body: input });
|
|
14633
|
+
}
|
|
14634
|
+
/** The scheduled catalog feeds the account has registered. */
|
|
14635
|
+
listFeeds() {
|
|
14636
|
+
return this.c.request("GET", "/v1/advertiser/catalog-feeds");
|
|
14637
|
+
}
|
|
14638
|
+
/** Remove a registered feed (stops its scheduled refresh). */
|
|
14639
|
+
removeFeed(id) {
|
|
14640
|
+
return this.c.request("DELETE", `/v1/advertiser/catalog-feeds/${encodeURIComponent(id)}`);
|
|
14641
|
+
}
|
|
14642
|
+
};
|
|
14643
|
+
var PromoteCampaignsResource = class extends Resource {
|
|
14644
|
+
constructor(c) {
|
|
14645
|
+
super(c);
|
|
14646
|
+
}
|
|
14647
|
+
create(body) {
|
|
14648
|
+
return this.c.request("POST", "/v1/advertiser/promote-campaigns", { body });
|
|
14649
|
+
}
|
|
14650
|
+
list() {
|
|
14651
|
+
return this.c.request("GET", "/v1/advertiser/promote-campaigns");
|
|
14652
|
+
}
|
|
14653
|
+
/** Submit a promote campaign for review. */
|
|
14654
|
+
submit(id) {
|
|
14655
|
+
return this.c.request("POST", `/v1/advertiser/promote-campaigns/${encodeURIComponent(id)}/submit`);
|
|
14656
|
+
}
|
|
14657
|
+
/** Set a promote campaign's status (e.g. active, paused). */
|
|
14658
|
+
setStatus(id, status) {
|
|
14659
|
+
return this.c.request("POST", `/v1/advertiser/promote-campaigns/${encodeURIComponent(id)}/status`, {
|
|
14660
|
+
body: { status }
|
|
14661
|
+
});
|
|
14662
|
+
}
|
|
14663
|
+
};
|
|
14664
|
+
var ConversionsResource = class extends Resource {
|
|
14665
|
+
constructor(c) {
|
|
14666
|
+
super(c);
|
|
14667
|
+
}
|
|
14668
|
+
/**
|
|
14669
|
+
* Report an attributed purchase (advertiser postback / S2S). `clickId` is the
|
|
14670
|
+
* ad click id (adclid); `orderId` is the marketplace order id (dedup key);
|
|
14671
|
+
* `orderValue` is the gross order amount (sent as `order_value`). Optional
|
|
14672
|
+
* `value` overrides the billable value, `eventId` gives at-most-once
|
|
14673
|
+
* ingestion, and `campaignId` hints attribution when the click id can't
|
|
14674
|
+
* resolve one on its own.
|
|
14675
|
+
*/
|
|
14676
|
+
purchase(req) {
|
|
14677
|
+
const { orderValue, ...rest } = req;
|
|
14678
|
+
return this.c.request("POST", "/v1/track/conversion", {
|
|
14679
|
+
body: { ...rest, order_value: orderValue }
|
|
14680
|
+
});
|
|
14681
|
+
}
|
|
14682
|
+
/** Report a refund / chargeback for a previously reported order — reverses
|
|
14683
|
+
* its settlement with a compensating ledger entry. */
|
|
14684
|
+
refund(req) {
|
|
14685
|
+
return this.c.request("POST", "/v1/track/refund", { body: req });
|
|
14686
|
+
}
|
|
14687
|
+
};
|
|
14688
|
+
var CurrenciesResource = class extends Resource {
|
|
14689
|
+
constructor(c) {
|
|
14690
|
+
super(c);
|
|
14691
|
+
}
|
|
14692
|
+
/** List all registered tokens/currencies and their USD rates. */
|
|
14693
|
+
list() {
|
|
14694
|
+
return this.c.request("GET", "/v1/finance/currencies");
|
|
14695
|
+
}
|
|
14696
|
+
/** Register or update the caller's token and its USD rate (or live feed). */
|
|
14697
|
+
register(req) {
|
|
14698
|
+
return this.c.request("POST", "/v1/finance/currencies", { body: req });
|
|
14699
|
+
}
|
|
14700
|
+
};
|
|
14701
|
+
var DoohResource = class extends Resource {
|
|
14702
|
+
constructor(c) {
|
|
14703
|
+
super(c);
|
|
14704
|
+
}
|
|
14705
|
+
/** Claim a pending screen by the code it is displaying (attaches venue + activates). */
|
|
14706
|
+
claimScreen(req) {
|
|
14707
|
+
return this.c.request("POST", "/v1/dooh/screens/claim", { body: req });
|
|
14708
|
+
}
|
|
14709
|
+
/** The caller's screen fleet, each with a live online flag. */
|
|
14710
|
+
listScreens() {
|
|
14711
|
+
return this.c.request("GET", "/v1/dooh/screens");
|
|
14712
|
+
}
|
|
14713
|
+
getScreen(id) {
|
|
14714
|
+
return this.c.request("GET", `/v1/dooh/screens/${encodeURIComponent(id)}`);
|
|
14715
|
+
}
|
|
14716
|
+
updateScreen(id, req) {
|
|
14717
|
+
return this.c.request("PATCH", `/v1/dooh/screens/${encodeURIComponent(id)}`, { body: req });
|
|
14718
|
+
}
|
|
14719
|
+
setScreenStatus(id, status) {
|
|
14720
|
+
return this.c.request("POST", `/v1/dooh/screens/${encodeURIComponent(id)}/status`, { body: { status } });
|
|
14721
|
+
}
|
|
14722
|
+
/** Publisher proof-of-play earnings report. */
|
|
14723
|
+
plays(params) {
|
|
14724
|
+
return this.c.request("GET", "/v1/dooh/plays", { query: params });
|
|
14725
|
+
}
|
|
14726
|
+
/** Advertiser proof-of-play VERIFICATION report (prove ads ran on real screens). */
|
|
14727
|
+
advertiserPlays(params) {
|
|
14728
|
+
return this.c.request("GET", "/v1/advertiser/dooh/plays", { query: params });
|
|
14729
|
+
}
|
|
14730
|
+
};
|
|
14731
|
+
var MetaverseResource = class extends Resource {
|
|
14732
|
+
constructor(c) {
|
|
14733
|
+
super(c);
|
|
14734
|
+
}
|
|
14735
|
+
/** Onboard a world integration (returns the signing secret ONCE). */
|
|
14736
|
+
createWorld(req) {
|
|
14737
|
+
return this.c.request("POST", "/v1/metaverse/worlds", { body: req });
|
|
14738
|
+
}
|
|
14739
|
+
listWorlds() {
|
|
14740
|
+
return this.c.request("GET", "/v1/metaverse/worlds");
|
|
14741
|
+
}
|
|
14742
|
+
/** Claim a pending surface by the code it is displaying (activates serving). */
|
|
14743
|
+
claimSurface(req) {
|
|
14744
|
+
return this.c.request("POST", "/v1/metaverse/surfaces/claim", { body: req });
|
|
14745
|
+
}
|
|
14746
|
+
listSurfaces() {
|
|
14747
|
+
return this.c.request("GET", "/v1/metaverse/surfaces");
|
|
14748
|
+
}
|
|
14749
|
+
getSurface(id) {
|
|
14750
|
+
return this.c.request("GET", `/v1/metaverse/surfaces/${encodeURIComponent(id)}`);
|
|
14751
|
+
}
|
|
14752
|
+
updateSurface(id, req) {
|
|
14753
|
+
return this.c.request("PATCH", `/v1/metaverse/surfaces/${encodeURIComponent(id)}`, { body: req });
|
|
14754
|
+
}
|
|
14755
|
+
setSurfaceStatus(id, status) {
|
|
14756
|
+
return this.c.request("POST", `/v1/metaverse/surfaces/${encodeURIComponent(id)}/status`, { body: { status } });
|
|
14757
|
+
}
|
|
14758
|
+
/** Publisher proof-of-view earnings report. */
|
|
14759
|
+
views(params) {
|
|
14760
|
+
return this.c.request("GET", "/v1/metaverse/views", { query: params });
|
|
14761
|
+
}
|
|
14762
|
+
/** Advertiser proof-of-view VERIFICATION report (real avatars, dwell, completions). */
|
|
14763
|
+
advertiserViews(params) {
|
|
14764
|
+
return this.c.request("GET", "/v1/advertiser/metaverse/views", { query: params });
|
|
14765
|
+
}
|
|
14766
|
+
/** ADMIN: latest automatic trust-score snapshot per world (CPA-only ⇄ CPM tiering). */
|
|
14767
|
+
adminTrustScores() {
|
|
14768
|
+
return this.c.request("GET", "/v1/admin/metaverse/trust-scores");
|
|
14769
|
+
}
|
|
14770
|
+
};
|
|
14771
|
+
var PortalTemplatesResource = class extends Resource {
|
|
14772
|
+
constructor(c) {
|
|
14773
|
+
super(c);
|
|
14774
|
+
}
|
|
14775
|
+
/** The template catalog (each with its schema-driven `fields`). */
|
|
14776
|
+
listTemplates() {
|
|
14777
|
+
return this.c.request("GET", "/v1/portal/templates");
|
|
14778
|
+
}
|
|
14779
|
+
/**
|
|
14780
|
+
* Store a portal config and get back `{ id, url }`. The `url` is the hosted
|
|
14781
|
+
* template with the config id baked in — pass it as an `html5` creative's
|
|
14782
|
+
* `assetUrl` (and the config's landing URL as `landingUrl`) to make a normal
|
|
14783
|
+
* creative attachable to a metaverse portal-surface campaign.
|
|
14784
|
+
*/
|
|
14785
|
+
createConfig(req) {
|
|
14786
|
+
return this.c.request("POST", "/v1/portal/configs", { body: req });
|
|
14787
|
+
}
|
|
14788
|
+
};
|
|
14789
|
+
var RewardsResource = class extends Resource {
|
|
14790
|
+
constructor(c) {
|
|
14791
|
+
super(c);
|
|
14792
|
+
}
|
|
14793
|
+
/** Fund (or top up) a campaign's reward pool — escrows `amount` from your balance. */
|
|
14794
|
+
fundPool(req) {
|
|
14795
|
+
return this.c.request("POST", "/v1/rewards/pools", { body: req });
|
|
14796
|
+
}
|
|
14797
|
+
/**
|
|
14798
|
+
* Create an ADVERTISER-CUSTODIED, on-chain-in-the-creative reward pool. No escrow:
|
|
14799
|
+
* your own dApp/contract in the portal pays the user on-chain. Returns the pool
|
|
14800
|
+
* plus the one-time `voucher_secret` your contract/backend uses to verify the
|
|
14801
|
+
* eligibility voucher Adviverse issues on each verified completion before paying.
|
|
14802
|
+
*/
|
|
14803
|
+
createOnchainPool(req) {
|
|
14804
|
+
return this.c.request("POST", "/v1/rewards/pools/onchain", { body: req });
|
|
14805
|
+
}
|
|
14806
|
+
/** Fetch a campaign's on-chain reward voucher secret (verify vouchers with it). */
|
|
14807
|
+
voucherSecret(campaignId) {
|
|
14808
|
+
return this.c.request("GET", `/v1/rewards/pools/${encodeURIComponent(campaignId)}/voucher-secret`);
|
|
14809
|
+
}
|
|
14810
|
+
/** List your reward pools. */
|
|
14811
|
+
listPools() {
|
|
14812
|
+
return this.c.request("GET", "/v1/rewards/pools");
|
|
14813
|
+
}
|
|
14814
|
+
/** Get one campaign's reward pool. */
|
|
14815
|
+
getPool(campaignId) {
|
|
14816
|
+
return this.c.request("GET", `/v1/rewards/pools/${encodeURIComponent(campaignId)}`);
|
|
14817
|
+
}
|
|
14818
|
+
/** Pause / resume a reward pool. */
|
|
14819
|
+
setPoolStatus(campaignId, status) {
|
|
14820
|
+
return this.c.request("POST", `/v1/rewards/pools/${encodeURIComponent(campaignId)}/status`, {
|
|
14821
|
+
body: { status }
|
|
14822
|
+
});
|
|
14823
|
+
}
|
|
14824
|
+
/** Reward-payout report: completions, amounts paid, per-campaign + per-payout rows. */
|
|
14825
|
+
report(params) {
|
|
14826
|
+
return this.c.request("GET", "/v1/rewards/report", { query: params });
|
|
14827
|
+
}
|
|
14828
|
+
/**
|
|
14829
|
+
* Point a metaverse world's reward-payout webhook at your endpoint. Adviverse
|
|
14830
|
+
* POSTs a signed `{ completion_id, campaign_id, user_ref, wallet, amount, token,
|
|
14831
|
+
* ts, sig }` per verified completion; you fulfil the end-user's on-chain payout.
|
|
14832
|
+
*/
|
|
14833
|
+
setWorldWebhook(worldId, url) {
|
|
14834
|
+
return this.c.request("POST", "/v1/rewards/world-webhook", { body: { worldId, url } });
|
|
14835
|
+
}
|
|
14836
|
+
};
|
|
14420
14837
|
var AdNetClient = class {
|
|
14421
14838
|
constructor(opts) {
|
|
14422
14839
|
if (!opts?.baseUrl) throw new Error("AdNetClient: baseUrl is required");
|
|
14423
14840
|
this.baseUrl = opts.baseUrl.replace(/\/+$/, "");
|
|
14841
|
+
this.servingBaseUrl = (opts.servingBaseUrl ?? "https://serve.adviverse.com").replace(/\/+$/, "");
|
|
14424
14842
|
this.token = opts.token;
|
|
14425
14843
|
this.apiKey = opts.apiKey;
|
|
14426
14844
|
this.timeoutMs = opts.timeoutMs ?? 3e4;
|
|
@@ -14431,6 +14849,8 @@ var AdNetClient = class {
|
|
|
14431
14849
|
this.fetchImpl = f.bind(globalThis);
|
|
14432
14850
|
this.auth = new AuthResource(this);
|
|
14433
14851
|
this.campaigns = new CampaignsResource(this);
|
|
14852
|
+
this.terminal = new TerminalResource(this);
|
|
14853
|
+
this.campaignGroups = new CampaignGroupsResource(this);
|
|
14434
14854
|
this.creatives = new CreativesResource(this);
|
|
14435
14855
|
this.properties = new PropertiesResource(this);
|
|
14436
14856
|
this.placements = new PlacementsResource(this);
|
|
@@ -14467,6 +14887,14 @@ var AdNetClient = class {
|
|
|
14467
14887
|
this.guides = new GuidesResource(this);
|
|
14468
14888
|
this.blog = new BlogResource(this);
|
|
14469
14889
|
this.stats = new StatsResource(this);
|
|
14890
|
+
this.marketplaceCatalog = new MarketplaceCatalogResource(this);
|
|
14891
|
+
this.promoteCampaigns = new PromoteCampaignsResource(this);
|
|
14892
|
+
this.conversions = new ConversionsResource(this);
|
|
14893
|
+
this.currencies = new CurrenciesResource(this);
|
|
14894
|
+
this.dooh = new DoohResource(this);
|
|
14895
|
+
this.metaverse = new MetaverseResource(this);
|
|
14896
|
+
this.portalTemplates = new PortalTemplatesResource(this);
|
|
14897
|
+
this.rewards = new RewardsResource(this);
|
|
14470
14898
|
}
|
|
14471
14899
|
/** Sets (or clears) the bearer session token used for subsequent requests. */
|
|
14472
14900
|
setToken(token) {
|
|
@@ -14486,7 +14914,7 @@ var AdNetClient = class {
|
|
|
14486
14914
|
}
|
|
14487
14915
|
/** Low-level request. Most callers should use the typed resource methods. */
|
|
14488
14916
|
async request(method, path2, opts = {}) {
|
|
14489
|
-
const url = new URL(this.baseUrl + path2);
|
|
14917
|
+
const url = new URL((opts.baseUrl ?? this.baseUrl) + path2);
|
|
14490
14918
|
if (opts.query) {
|
|
14491
14919
|
for (const [k, v] of Object.entries(opts.query)) {
|
|
14492
14920
|
if (v !== void 0) url.searchParams.set(k, String(v));
|
|
@@ -22759,35 +23187,57 @@ function createServer(client) {
|
|
|
22759
23187
|
tool("public_stats", "Public network stats: total ads served and total paid out (Redis-cached).", {}, () => client.stats.public());
|
|
22760
23188
|
tool("list_campaigns", "List the advertiser account's campaigns.", page, (a) => client.campaigns.list(a));
|
|
22761
23189
|
tool("get_campaign", "Get one campaign by id.", { id: external_exports.string() }, (a) => client.campaigns.get(a.id));
|
|
22762
|
-
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));
|
|
22763
|
-
tool("update_campaign", "Update a campaign (partial fields).", { id: external_exports.string(), fields }, (a) => client.campaigns.update(a.id, a.fields));
|
|
23190
|
+
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). Routing booleans (both default true): `autoOwnPlacements` \u2014 a house/backfill-tier campaign also runs on every placement your account publishes, even if not on its placement whitelist; `networkExpansion` \u2014 smart routing weights delivery toward sites where similar ads perform well (false = pure targeting).", { fields, idempotencyKey: idem }, (a) => client.campaigns.create(a.fields, a.idempotencyKey));
|
|
23191
|
+
tool("update_campaign", "Update a campaign (partial fields, incl. autoOwnPlacements / networkExpansion routing booleans).", { id: external_exports.string(), fields }, (a) => client.campaigns.update(a.id, a.fields));
|
|
23192
|
+
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));
|
|
22764
23193
|
tool("submit_campaign", "Submit a campaign for review.", { id: external_exports.string() }, (a) => client.campaigns.submit(a.id));
|
|
22765
23194
|
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));
|
|
23195
|
+
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));
|
|
23196
|
+
tool("list_marketplace_catalog", "List the marketplace catalog items the account has uploaded.", {}, () => client.marketplaceCatalog.list());
|
|
23197
|
+
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));
|
|
23198
|
+
tool("list_promote_campaigns", "List the account's promote-products campaigns.", {}, () => client.promoteCampaigns.list());
|
|
23199
|
+
tool("submit_promote_campaign", "Submit a promote-products campaign for review.", { id: external_exports.string() }, (a) => client.promoteCampaigns.submit(a.id));
|
|
23200
|
+
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));
|
|
23201
|
+
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 }));
|
|
23202
|
+
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 }));
|
|
22766
23203
|
tool("list_creatives", "List the advertiser's whole creative library.", {}, () => client.creatives.list());
|
|
22767
23204
|
tool("list_campaign_creatives", "List creatives serving a campaign (authored + attached).", { campaignId: external_exports.string() }, (a) => client.creatives.listForCampaign(a.campaignId));
|
|
22768
23205
|
tool("get_creative", "Get one creative by id.", { id: external_exports.string() }, (a) => client.creatives.get(a.id));
|
|
22769
|
-
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
|
|
22770
|
-
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));
|
|
23206
|
+
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));
|
|
23207
|
+
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));
|
|
22771
23208
|
tool("delete_creative", "Delete a creative.", { id: external_exports.string() }, (a) => client.creatives.delete(a.id));
|
|
22772
23209
|
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));
|
|
22773
23210
|
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));
|
|
22774
23211
|
tool("creative_campaigns", "List campaigns a library creative is attached to.", { id: external_exports.string() }, (a) => client.creatives.campaigns(a.id));
|
|
23212
|
+
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 }));
|
|
23213
|
+
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 }));
|
|
23214
|
+
tool("list_terminal_tokens", "List your public terminal serve tokens (includes each token's switch policy).", {}, () => client.terminal.listTokens());
|
|
23215
|
+
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 }));
|
|
23216
|
+
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));
|
|
23217
|
+
tool("revoke_terminal_token", "Revoke (delete) a terminal serve token by id.", { id: external_exports.string() }, (a) => client.terminal.revokeToken(a.id));
|
|
22775
23218
|
tool("list_properties", "List publisher properties (sites, CLIs, apps).", page, (a) => client.properties.list(a));
|
|
22776
23219
|
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));
|
|
22777
|
-
tool("update_property", "Update a property. fields: { name?, domain?, category?,
|
|
23220
|
+
tool("update_property", "Update a property. fields: { name?, domain?, category? (site-niche id from list_site_niches; manual, 0 = back to auto-detect), verificationMethod?, crossFill? }. Changing the domain resets verification and trust.", { id: external_exports.string(), fields }, (a) => client.properties.update(a.id, a.fields));
|
|
23221
|
+
tool("get_property_ads_txt", "A property's ads.txt line(s), to publish at https://<domain>/ads.txt.", { id: external_exports.string() }, (a) => client.properties.adsTxt(a.id));
|
|
22778
23222
|
tool("verify_property", "Trigger ownership verification for a property.", { id: external_exports.string() }, (a) => client.properties.verify(a.id));
|
|
22779
|
-
tool("
|
|
23223
|
+
tool("classify_property", "Re-detect a website property's niche from its pages; returns the top-3 niches. Updates category only if it was auto-detected.", { id: external_exports.string() }, (a) => client.properties.classify(a.id));
|
|
23224
|
+
tool("list_site_niches", "The site-niche taxonomy (IAB v1 tier-1 ids + names) used by property category and campaign targeting propertyCategoryInclude/Exclude.", {}, () => client.properties.niches());
|
|
23225
|
+
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));
|
|
23226
|
+
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));
|
|
23227
|
+
tool("list_placements", "List ad placements. has_signing_secret says whether signed-tag enforcement is on (the secret itself is only returned by rotate_placement_signing_secret).", page, (a) => client.placements.list(a));
|
|
22780
23228
|
tool("create_placement", "Create a placement. fields: { propertyId, name, format, floorCpm, \u2026 }.", { fields, idempotencyKey: idem }, (a) => client.placements.create(a.fields, a.idempotencyKey));
|
|
22781
|
-
tool("get_placement_tag", "Get the ad tag / install code for a placement.", { id: external_exports.string() }, (a) => client.placements.tag(a.id));
|
|
23229
|
+
tool("get_placement_tag", "Get the ad tag / install code for a placement (responsive banners also return autoAdsScript, the one-line site-wide auto-ads tag).", { id: external_exports.string() }, (a) => client.placements.tag(a.id));
|
|
22782
23230
|
tool("rotate_placement_signing_secret", "Generate/rotate a placement signing secret (Layer 3, returned once). With a secret set, the engine only serves /terminal requests carrying a valid HMAC signature.", { id: external_exports.string() }, (a) => client.placements.rotateSigningSecret(a.id));
|
|
22783
23231
|
tool("disable_placement_signing", "Disable signed-tag enforcement on a placement.", { id: external_exports.string() }, (a) => client.placements.disableSigning(a.id));
|
|
22784
23232
|
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());
|
|
22785
23233
|
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));
|
|
22786
|
-
tool("get_balance", "Get the account balance (available / held).", {}, () => client.finance.balance());
|
|
23234
|
+
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());
|
|
22787
23235
|
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 }));
|
|
22788
23236
|
tool("advertiser_report", "Advertiser spend/performance report.", reportQuery, (a) => client.reporting.advertiser(a));
|
|
22789
23237
|
tool("publisher_report", "Publisher revenue/delivery report.", reportQuery, (a) => client.reporting.publisher(a));
|
|
22790
|
-
tool("publisher_placements_report", "Per-placement publisher rollup: impressions, clicks, CTR, revenue, RPM, eCPM, fill rate
|
|
23238
|
+
tool("publisher_placements_report", "Per-placement publisher rollup: impressions, clicks, CTR, revenue, RPM, eCPM, fill rate, paid fill rate (paid_fill_rate: house/self-promo fills excluded), viewable rate, and layout shift the slot causes (cls_avg per measured impression, cls_poor_rate = share with CLS > 0.1; reserve the slot box size to fix).", reportQuery, (a) => client.reporting.publisherPlacements(a));
|
|
23239
|
+
tool("publisher_fill_report", "Publisher fill summary: requests, filled, fill_rate, paid_filled + paid_fill_rate (paid demand only, house/self-promo excluded; rates are %), and no-fill counts by reason.", reportQuery, (a) => client.reporting.publisherFill(a));
|
|
23240
|
+
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));
|
|
22791
23241
|
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.");
|
|
22792
23242
|
tool("list_deals", "List private marketplace deals.", { ...page, role: dealRole }, (a) => client.deals.list(a));
|
|
22793
23243
|
tool(
|
|
@@ -22985,7 +23435,7 @@ function createServer(client) {
|
|
|
22985
23435
|
tool("property_domain_connect", "Initiate DomainConnect DNS automation for a property.", { id: external_exports.string() }, (a) => client.properties.domainConnect(a.id));
|
|
22986
23436
|
tool("delete_property", "Delete a publisher property.", { id: external_exports.string() }, (a) => client.properties.delete(a.id));
|
|
22987
23437
|
tool("property_mfa_score", "A property's Made-For-Advertising quality score + guidance.", { id: external_exports.string() }, (a) => client.properties.mfa(a.id));
|
|
22988
|
-
tool("update_placement",
|
|
23438
|
+
tool("update_placement", `Update a placement (partial fields: floorCpm, floorSoft, revShare, status, houseShare, \u2026). Set floorAuto:true to let the yield optimizer manage floorCpm + floorSoft automatically from recent clearing prices (floorAuto:false = full manual control). autoAds tunes auto ads on a responsive banner placement (stored at settings.auto_ads, wins over the page's data-max): { enabled?, max?(1-10), every?(paragraphs between ads, 2-12), min_paragraph_chars?(0-2000), exclude_paths?["/checkout*"], selectors?[css] } \u2014 null clears.`, { id: external_exports.string(), fields }, (a) => client.placements.update(a.id, a.fields));
|
|
22989
23439
|
tool("list_feeds", "List product feeds.", {}, () => client.feeds.list());
|
|
22990
23440
|
tool("create_feed", "Create a product feed. fields: { name, url, format: csv|xml|google_merchant, scheduleCron? }.", { fields }, (a) => client.feeds.create(a.fields));
|
|
22991
23441
|
tool("fetch_feed", "Trigger an immediate feed fetch/refresh.", { id: external_exports.string() }, (a) => client.feeds.fetch(a.id));
|
|
@@ -23003,11 +23453,25 @@ function createServer(client) {
|
|
|
23003
23453
|
tool("issue_invoice", "Issue a draft invoice (admin).", { id: external_exports.string() }, (a) => client.billing.issueInvoice(a.id));
|
|
23004
23454
|
tool("pay_invoice", "Pay an invoice (advertiser own; admin any).", { id: external_exports.string() }, (a) => client.billing.payInvoice(a.id));
|
|
23005
23455
|
tool("void_invoice", "Void an invoice (admin).", { id: external_exports.string() }, (a) => client.billing.voidInvoice(a.id));
|
|
23006
|
-
tool("deposit_funds", "Request a deposit / account top-up. fields: { amount, provider?: stripe|paypal|crypto|mock, currency? }.", { fields }, (a) => client.finance.deposit(a.fields));
|
|
23456
|
+
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));
|
|
23007
23457
|
tool("list_deposits", "List deposit history.", {}, () => client.finance.deposits());
|
|
23008
|
-
tool("request_payout", "Request a publisher payout. fields: { amount, method:
|
|
23458
|
+
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));
|
|
23009
23459
|
tool("list_payouts", "List payout history.", {}, () => client.finance.payouts());
|
|
23010
23460
|
tool("get_tax_form", "Get the saved payout tax form (W-9 / W-8BEN).", {}, () => client.finance.taxForm());
|
|
23461
|
+
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());
|
|
23462
|
+
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 }));
|
|
23463
|
+
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());
|
|
23464
|
+
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 }));
|
|
23465
|
+
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));
|
|
23466
|
+
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());
|
|
23467
|
+
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 }));
|
|
23468
|
+
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());
|
|
23469
|
+
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());
|
|
23470
|
+
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));
|
|
23471
|
+
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));
|
|
23472
|
+
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));
|
|
23473
|
+
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));
|
|
23474
|
+
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 }));
|
|
23011
23475
|
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));
|
|
23012
23476
|
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));
|
|
23013
23477
|
tool("list_exports", "List export jobs.", {}, () => client.exports.list());
|
|
@@ -23017,14 +23481,15 @@ function createServer(client) {
|
|
|
23017
23481
|
tool("list_automation_rules", "List automation rules.", {}, () => client.automation.rules());
|
|
23018
23482
|
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));
|
|
23019
23483
|
tool("delete_automation_rule", "Delete an automation rule.", { id: external_exports.string() }, (a) => client.automation.deleteRule(a.id));
|
|
23484
|
+
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));
|
|
23020
23485
|
tool("optimizer_log", "Recent automated budget-reallocation actions.", { limit: external_exports.number().optional() }, (a) => client.automation.optimizerLog(a.limit));
|
|
23021
23486
|
tool("list_alerts", "List anomaly/optimizer alerts.", {}, () => client.automation.alerts());
|
|
23022
23487
|
tool("ack_alert", "Acknowledge (mark read) an alert.", { id: external_exports.string() }, (a) => client.automation.ackAlert(a.id));
|
|
23023
|
-
tool("identity_resolve", "Resolve a canonical identity from signals. fields: { email?, phone?, cookieId?, deviceId? }.", { fields }, (a) => client.identity.resolve(a.fields));
|
|
23024
|
-
tool("identity_link", "Link signals to a canonical id. fields: { canonicalId, signals: [{type,value}] }.", { fields }, (a) => client.identity.link(a.fields));
|
|
23025
|
-
tool("identity_consent", "Set consent for a canonical id. fields: { canonicalId, state: granted|denied }.", { fields }, (a) => client.identity.setConsent(a.fields));
|
|
23026
|
-
tool("identity_stats", "Identity graph
|
|
23027
|
-
tool("get_identity", "Get an identity
|
|
23488
|
+
tool("identity_resolve", "Resolve a canonical identity from signals (shared graph; you become an owner of the signals you supply, and only your own signals are returned; unifiedId is per-advertiser, not comparable across accounts). fields: { email?, phone?, cookieId?, deviceId? }.", { fields }, (a) => client.identity.resolve(a.fields));
|
|
23489
|
+
tool("identity_link", "Link signals to a canonical id you own (404 otherwise; 409 if a signal sits on another identity and you never supplied it). fields: { canonicalId, signals: [{type,value}] }.", { fields }, (a) => client.identity.link(a.fields));
|
|
23490
|
+
tool("identity_consent", "Set consent for a canonical id you own (404 otherwise). fields: { canonicalId, state: granted|denied }.", { fields }, (a) => client.identity.setConsent(a.fields));
|
|
23491
|
+
tool("identity_stats", "Identity stats for your own identities/signals (admins: graph-wide).", {}, () => client.identity.stats());
|
|
23492
|
+
tool("get_identity", "Get an identity you own by canonical id, with only the signals you supplied (404 if you own none of its signals).", { canonicalId: external_exports.string() }, (a) => client.identity.get(a.canonicalId));
|
|
23028
23493
|
tool("list_apps", "List publisher mobile/CTV apps.", {}, () => client.apps.list());
|
|
23029
23494
|
tool("get_app", "Get one app by id.", { id: external_exports.string() }, (a) => client.apps.get(a.id));
|
|
23030
23495
|
tool("create_app", "Register a mobile/CTV app. fields: { kind: mobile_app|ctv, name, bundleId, platform, storeUrl?, appStoreId?, category?, ctvMeta? }.", { fields }, (a) => client.apps.create(a.fields));
|
|
@@ -23032,7 +23497,7 @@ function createServer(client) {
|
|
|
23032
23497
|
tool("get_app_ads_txt", "An app's generated app-ads.txt content.", { id: external_exports.string() }, (a) => client.apps.appAdsTxt(a.id));
|
|
23033
23498
|
tool("report_ivt", "Invalid-traffic breakdown.", reportQuery, (a) => client.reporting.ivt(a));
|
|
23034
23499
|
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));
|
|
23035
|
-
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));
|
|
23500
|
+
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));
|
|
23036
23501
|
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));
|
|
23037
23502
|
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));
|
|
23038
23503
|
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));
|
|
@@ -23053,6 +23518,9 @@ function createServer(client) {
|
|
|
23053
23518
|
tool("report_closed_loop", "Closed-loop full-funnel attribution for house campaigns.", reportQuery, (a) => client.reporting.closedLoop(a));
|
|
23054
23519
|
tool("report_personal_network", "Personal Network (house ads) infra fees + delivery.", reportQuery, (a) => client.reporting.personalNetwork(a));
|
|
23055
23520
|
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));
|
|
23521
|
+
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));
|
|
23522
|
+
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));
|
|
23523
|
+
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));
|
|
23056
23524
|
tool("list_saved_reports", "List saved report configs.", {}, () => client.reporting.saved());
|
|
23057
23525
|
tool("save_report", "Save a report configuration. fields: { name?, config? }.", { fields }, (a) => client.reporting.saveSaved(a.fields));
|
|
23058
23526
|
tool("delete_saved_report", "Delete a saved report.", { id: external_exports.string() }, (a) => client.reporting.deleteSaved(a.id));
|
|
@@ -23113,7 +23581,8 @@ function createServer(client) {
|
|
|
23113
23581
|
{},
|
|
23114
23582
|
() => client.publisherInsights.deals()
|
|
23115
23583
|
);
|
|
23116
|
-
tool("list_webhooks", "List webhook subscriptions.", {}, () => client.webhooks.list());
|
|
23584
|
+
tool("list_webhooks", "List webhook subscriptions (secrets omitted: has_secret + secret_hint only).", {}, () => client.webhooks.list());
|
|
23585
|
+
tool("reveal_webhook_secret", "Return a webhook endpoint's HMAC signing secret (whsec_...).", { id: external_exports.string() }, (a) => client.webhooks.revealSecret(a.id));
|
|
23117
23586
|
tool("list_webhook_events", "List available webhook event types.", {}, () => client.webhooks.events());
|
|
23118
23587
|
tool("create_webhook", "Subscribe to webhook events. fields: { url (https), events: [...] }.", { fields }, (a) => client.webhooks.create(a.fields));
|
|
23119
23588
|
tool("delete_webhook", "Delete a webhook subscription.", { id: external_exports.string() }, (a) => client.webhooks.delete(a.id));
|
|
@@ -23126,7 +23595,10 @@ function createServer(client) {
|
|
|
23126
23595
|
tool("save_onboarding_profile", "Save the onboarding profile. fields: { goal?, name?, company?, country?, currency?, timezone?, marketingOptIn? }.", { fields }, (a) => client.account.saveOnboardingProfile(a.fields));
|
|
23127
23596
|
tool("list_connections", "List linked social-login providers.", {}, () => client.auth.connections());
|
|
23128
23597
|
tool("disconnect_provider", "Disconnect a linked social-login provider.", { provider: external_exports.string() }, (a) => client.auth.disconnect(a.provider));
|
|
23598
|
+
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));
|
|
23129
23599
|
tool("list_referrals", "Referral program overview.", {}, () => client.referrals.list());
|
|
23600
|
+
tool("get_affiliate", "Refer & earn (Referalli affiliate program): joined?, ?via= link, clicks, sign-ups, commissions pending/credited, terms.", {}, () => client.referrals.affiliate());
|
|
23601
|
+
tool("join_affiliate", "Join Refer & earn: enroll this account as an affiliate and get its ?via= link (idempotent).", {}, () => client.referrals.joinAffiliate());
|
|
23130
23602
|
tool("list_regions", "List active edge regions.", {}, () => client.regions.list());
|
|
23131
23603
|
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));
|
|
23132
23604
|
tool("regions_health", "Per-region engine health.", {}, () => client.regions.health());
|
|
@@ -23144,6 +23616,9 @@ function createServer(client) {
|
|
|
23144
23616
|
tool("admin_get_config", "Get platform config / feature flags.", {}, () => client.admin.getConfig());
|
|
23145
23617
|
tool("admin_set_config", "Set a platform config value.", { key: external_exports.string(), value: external_exports.any().optional() }, (a) => client.admin.setConfig(a.key, a.value));
|
|
23146
23618
|
tool("admin_audit_log", "Recent admin audit-log entries.", {}, () => client.admin.audit());
|
|
23619
|
+
tool("admin_trust_properties", "Properties with trust tier, lock, detected niches and progress toward auto-promotion. q filters by domain/name.", { q: external_exports.string().optional(), limit: external_exports.number().optional() }, (a) => client.admin.trustProperties(a));
|
|
23620
|
+
tool("admin_set_property_trust", "Override a property's trust tier (trusted = full demand, unverified = CPA-only) and lock it against automatic changes.", { id: external_exports.string(), tier: external_exports.enum(["trusted", "unverified"]).optional(), locked: external_exports.boolean(), note: external_exports.string().optional() }, (a) => client.admin.setPropertyTrust(a.id, { tier: a.tier, locked: a.locked, note: a.note }));
|
|
23621
|
+
tool("admin_trust_events", "Trust audit log: auto promotions/demotions, domain resets and admin overrides, with metrics.", { propertyId: external_exports.string().optional(), limit: external_exports.number().optional() }, (a) => client.admin.trustEvents(a));
|
|
23147
23622
|
tool("admin_mfa_ranking", "Properties ranked by Made-For-Advertising risk.", { limit: external_exports.number().optional() }, (a) => client.admin.mfaRanking(a.limit));
|
|
23148
23623
|
tool("admin_create_region", "Create an edge region. fields: { code, name, public_endpoint, lat, lng, country_codes?, status?, priority? }.", { fields }, (a) => client.admin.createRegion(a.fields));
|
|
23149
23624
|
tool("admin_update_region", "Update an edge region. fields: { status?, public_endpoint?, priority?, country_codes?, name? }.", { id: external_exports.string(), fields }, (a) => client.admin.updateRegion(a.id, a.fields));
|