@adviverse/mcp 0.1.2 → 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.
Files changed (3) hide show
  1. package/dist/http.js +65 -15
  2. package/dist/index.js +65 -15
  3. package/package.json +2 -2
package/dist/http.js CHANGED
@@ -14483,11 +14483,12 @@ var ReportingResource = class extends Resource {
14483
14483
  publisher(query) {
14484
14484
  return this.c.request("GET", "/v1/reporting/publisher", { query });
14485
14485
  }
14486
+ /** Fill summary: requests, fill_rate, paid_fill_rate (house excluded), no-fill reasons. */
14486
14487
  publisherFill(query) {
14487
14488
  return this.c.request("GET", "/v1/reporting/publisher/fill", { query });
14488
14489
  }
14489
14490
  /** Per-placement rollup (impressions, clicks, CTR, revenue, RPM, eCPM, fill
14490
- * rate, viewable rate) for the authed publisher. */
14491
+ * rate, paid fill rate, viewable rate, slot CLS) for the authed publisher. */
14491
14492
  publisherPlacements(query) {
14492
14493
  return this.c.request("GET", "/v1/reporting/publisher/placements", { query });
14493
14494
  }
@@ -14679,6 +14680,14 @@ var ReferralsResource = class extends Resource {
14679
14680
  list() {
14680
14681
  return this.c.request("GET", "/v1/referrals");
14681
14682
  }
14683
+ /** Refer & earn: partner status, `?via=` link, clicks, sign-ups and commissions. */
14684
+ affiliate() {
14685
+ return this.c.request("GET", "/v1/referrals/affiliate");
14686
+ }
14687
+ /** Join Refer & earn (idempotent); returns the new overview. */
14688
+ joinAffiliate() {
14689
+ return this.c.request("POST", "/v1/referrals/affiliate/join");
14690
+ }
14682
14691
  };
14683
14692
  var WebhooksResource = class extends Resource {
14684
14693
  constructor(c) {
@@ -14704,6 +14713,10 @@ var WebhooksResource = class extends Resource {
14704
14713
  rotateSecret(id) {
14705
14714
  return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/rotate-secret`);
14706
14715
  }
14716
+ /** Fetch the signing secret (list()/update() only return `has_secret` + `secret_hint`). */
14717
+ revealSecret(id) {
14718
+ return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/secret/reveal`);
14719
+ }
14707
14720
  /** Fire a synthetic `ping` event to verify the endpoint. */
14708
14721
  ping(id) {
14709
14722
  return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/ping`);
@@ -15486,13 +15499,27 @@ var PropertiesResource = class extends Resource {
15486
15499
  return this.c.request("POST", "/v1/publisher/properties", { body, idempotencyKey });
15487
15500
  }
15488
15501
  /** Update a property's editable fields: display name, domain, category, and
15489
- * verification method. Changing the domain resets verification. */
15502
+ * verification method. Changing the domain resets verification. `category`
15503
+ * (a site-niche id) is kept as the publisher's manual choice; 0 hands it back
15504
+ * to auto-detection. */
15490
15505
  update(id, body) {
15491
15506
  return this.c.request("PATCH", `/v1/publisher/properties/${encodeURIComponent(id)}`, { body });
15492
15507
  }
15508
+ /** Re-detect a website's niche from its pages (updates `category` only when it is auto). */
15509
+ classify(id) {
15510
+ return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/classify`);
15511
+ }
15512
+ /** The site-niche taxonomy: ids for property `category` and campaign `propertyCategoryInclude/Exclude`. Public. */
15513
+ niches() {
15514
+ return this.c.request("GET", "/v1/site-niches");
15515
+ }
15493
15516
  verify(id) {
15494
15517
  return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/verify`);
15495
15518
  }
15519
+ /** The ads.txt line(s) to publish at https://<domain>/ads.txt (plain text). */
15520
+ adsTxt(id) {
15521
+ return this.c.request("GET", `/v1/publisher/properties/${encodeURIComponent(id)}/ads.txt`, { text: true });
15522
+ }
15496
15523
  /** Set/clear the property's first-party ad-serving domain (anti-adblock). Pass
15497
15524
  * null/undefined to remove. Returns the CNAME target to point the domain at. */
15498
15525
  setServingDomain(id, domain) {
@@ -15532,6 +15559,7 @@ var PlacementsResource = class extends Resource {
15532
15559
  update(id, body) {
15533
15560
  return this.c.request("PATCH", `/v1/publisher/placements/${encodeURIComponent(id)}`, { body });
15534
15561
  }
15562
+ /** Install code; responsive banners also carry `autoAdsScript` (site-wide auto-ads tag). */
15535
15563
  tag(id) {
15536
15564
  return this.c.request("GET", `/v1/publisher/placements/${encodeURIComponent(id)}/tag`);
15537
15565
  }
@@ -15733,6 +15761,18 @@ var AdminResource = class extends Resource {
15733
15761
  return this.c.request("GET", "/v1/admin/audit");
15734
15762
  }
15735
15763
  /** Properties ranked by Made-For-Advertising risk score. */
15764
+ /** Website/app properties with trust tier, lock, niches and promotion progress. */
15765
+ trustProperties(query) {
15766
+ return this.c.request("GET", "/v1/admin/properties/trust", { query });
15767
+ }
15768
+ /** Override a property's trust tier and/or lock it against automatic changes. */
15769
+ setPropertyTrust(id, body) {
15770
+ return this.c.request("POST", `/v1/admin/properties/${encodeURIComponent(id)}/trust`, { body });
15771
+ }
15772
+ /** The trust audit log (auto promotions/demotions, domain resets, overrides). */
15773
+ trustEvents(query) {
15774
+ return this.c.request("GET", "/v1/admin/trust-events", { query });
15775
+ }
15736
15776
  mfaRanking(limit) {
15737
15777
  return this.c.request("GET", "/v1/admin/mfa", { query: { limit } });
15738
15778
  }
@@ -24386,8 +24426,8 @@ function createServer(client) {
24386
24426
  tool("public_stats", "Public network stats: total ads served and total paid out (Redis-cached).", {}, () => client.stats.public());
24387
24427
  tool("list_campaigns", "List the advertiser account's campaigns.", page, (a) => client.campaigns.list(a));
24388
24428
  tool("get_campaign", "Get one campaign by id.", { id: external_exports.string() }, (a) => client.campaigns.get(a.id));
24389
- 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));
24390
- tool("update_campaign", "Update a campaign (partial fields).", { id: external_exports.string(), fields }, (a) => client.campaigns.update(a.id, a.fields));
24429
+ 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));
24430
+ 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));
24391
24431
  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));
24392
24432
  tool("submit_campaign", "Submit a campaign for review.", { id: external_exports.string() }, (a) => client.campaigns.submit(a.id));
24393
24433
  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));
@@ -24416,13 +24456,16 @@ function createServer(client) {
24416
24456
  tool("revoke_terminal_token", "Revoke (delete) a terminal serve token by id.", { id: external_exports.string() }, (a) => client.terminal.revokeToken(a.id));
24417
24457
  tool("list_properties", "List publisher properties (sites, CLIs, apps).", page, (a) => client.properties.list(a));
24418
24458
  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));
24419
- 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));
24459
+ 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));
24460
+ 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));
24420
24461
  tool("verify_property", "Trigger ownership verification for a property.", { id: external_exports.string() }, (a) => client.properties.verify(a.id));
24462
+ 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));
24463
+ 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());
24421
24464
  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));
24422
24465
  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));
24423
- tool("list_placements", "List ad placements.", page, (a) => client.placements.list(a));
24466
+ 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));
24424
24467
  tool("create_placement", "Create a placement. fields: { propertyId, name, format, floorCpm, \u2026 }.", { fields, idempotencyKey: idem }, (a) => client.placements.create(a.fields, a.idempotencyKey));
24425
- tool("get_placement_tag", "Get the ad tag / install code for a placement.", { id: external_exports.string() }, (a) => client.placements.tag(a.id));
24468
+ 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));
24426
24469
  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));
24427
24470
  tool("disable_placement_signing", "Disable signed-tag enforcement on a placement.", { id: external_exports.string() }, (a) => client.placements.disableSigning(a.id));
24428
24471
  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());
@@ -24431,7 +24474,8 @@ function createServer(client) {
24431
24474
  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 }));
24432
24475
  tool("advertiser_report", "Advertiser spend/performance report.", reportQuery, (a) => client.reporting.advertiser(a));
24433
24476
  tool("publisher_report", "Publisher revenue/delivery report.", reportQuery, (a) => client.reporting.publisher(a));
24434
- 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));
24477
+ 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));
24478
+ 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));
24435
24479
  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));
24436
24480
  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.");
24437
24481
  tool("list_deals", "List private marketplace deals.", { ...page, role: dealRole }, (a) => client.deals.list(a));
@@ -24630,7 +24674,7 @@ function createServer(client) {
24630
24674
  tool("property_domain_connect", "Initiate DomainConnect DNS automation for a property.", { id: external_exports.string() }, (a) => client.properties.domainConnect(a.id));
24631
24675
  tool("delete_property", "Delete a publisher property.", { id: external_exports.string() }, (a) => client.properties.delete(a.id));
24632
24676
  tool("property_mfa_score", "A property's Made-For-Advertising quality score + guidance.", { id: external_exports.string() }, (a) => client.properties.mfa(a.id));
24633
- 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).", { id: external_exports.string(), fields }, (a) => client.placements.update(a.id, a.fields));
24677
+ 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));
24634
24678
  tool("list_feeds", "List product feeds.", {}, () => client.feeds.list());
24635
24679
  tool("create_feed", "Create a product feed. fields: { name, url, format: csv|xml|google_merchant, scheduleCron? }.", { fields }, (a) => client.feeds.create(a.fields));
24636
24680
  tool("fetch_feed", "Trigger an immediate feed fetch/refresh.", { id: external_exports.string() }, (a) => client.feeds.fetch(a.id));
@@ -24680,11 +24724,11 @@ function createServer(client) {
24680
24724
  tool("optimizer_log", "Recent automated budget-reallocation actions.", { limit: external_exports.number().optional() }, (a) => client.automation.optimizerLog(a.limit));
24681
24725
  tool("list_alerts", "List anomaly/optimizer alerts.", {}, () => client.automation.alerts());
24682
24726
  tool("ack_alert", "Acknowledge (mark read) an alert.", { id: external_exports.string() }, (a) => client.automation.ackAlert(a.id));
24683
- tool("identity_resolve", "Resolve a canonical identity from signals. fields: { email?, phone?, cookieId?, deviceId? }.", { fields }, (a) => client.identity.resolve(a.fields));
24684
- tool("identity_link", "Link signals to a canonical id. fields: { canonicalId, signals: [{type,value}] }.", { fields }, (a) => client.identity.link(a.fields));
24685
- tool("identity_consent", "Set consent for a canonical id. fields: { canonicalId, state: granted|denied }.", { fields }, (a) => client.identity.setConsent(a.fields));
24686
- tool("identity_stats", "Identity graph stats.", {}, () => client.identity.stats());
24687
- tool("get_identity", "Get an identity record by canonical id.", { canonicalId: external_exports.string() }, (a) => client.identity.get(a.canonicalId));
24727
+ 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));
24728
+ 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));
24729
+ 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));
24730
+ tool("identity_stats", "Identity stats for your own identities/signals (admins: graph-wide).", {}, () => client.identity.stats());
24731
+ 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));
24688
24732
  tool("list_apps", "List publisher mobile/CTV apps.", {}, () => client.apps.list());
24689
24733
  tool("get_app", "Get one app by id.", { id: external_exports.string() }, (a) => client.apps.get(a.id));
24690
24734
  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));
@@ -24776,7 +24820,8 @@ function createServer(client) {
24776
24820
  {},
24777
24821
  () => client.publisherInsights.deals()
24778
24822
  );
24779
- tool("list_webhooks", "List webhook subscriptions.", {}, () => client.webhooks.list());
24823
+ tool("list_webhooks", "List webhook subscriptions (secrets omitted: has_secret + secret_hint only).", {}, () => client.webhooks.list());
24824
+ tool("reveal_webhook_secret", "Return a webhook endpoint's HMAC signing secret (whsec_...).", { id: external_exports.string() }, (a) => client.webhooks.revealSecret(a.id));
24780
24825
  tool("list_webhook_events", "List available webhook event types.", {}, () => client.webhooks.events());
24781
24826
  tool("create_webhook", "Subscribe to webhook events. fields: { url (https), events: [...] }.", { fields }, (a) => client.webhooks.create(a.fields));
24782
24827
  tool("delete_webhook", "Delete a webhook subscription.", { id: external_exports.string() }, (a) => client.webhooks.delete(a.id));
@@ -24791,6 +24836,8 @@ function createServer(client) {
24791
24836
  tool("disconnect_provider", "Disconnect a linked social-login provider.", { provider: external_exports.string() }, (a) => client.auth.disconnect(a.provider));
24792
24837
  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));
24793
24838
  tool("list_referrals", "Referral program overview.", {}, () => client.referrals.list());
24839
+ tool("get_affiliate", "Refer & earn (Referalli affiliate program): joined?, ?via= link, clicks, sign-ups, commissions pending/credited, terms.", {}, () => client.referrals.affiliate());
24840
+ tool("join_affiliate", "Join Refer & earn: enroll this account as an affiliate and get its ?via= link (idempotent).", {}, () => client.referrals.joinAffiliate());
24794
24841
  tool("list_regions", "List active edge regions.", {}, () => client.regions.list());
24795
24842
  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));
24796
24843
  tool("regions_health", "Per-region engine health.", {}, () => client.regions.health());
@@ -24808,6 +24855,9 @@ function createServer(client) {
24808
24855
  tool("admin_get_config", "Get platform config / feature flags.", {}, () => client.admin.getConfig());
24809
24856
  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));
24810
24857
  tool("admin_audit_log", "Recent admin audit-log entries.", {}, () => client.admin.audit());
24858
+ 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));
24859
+ 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 }));
24860
+ 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));
24811
24861
  tool("admin_mfa_ranking", "Properties ranked by Made-For-Advertising risk.", { limit: external_exports.number().optional() }, (a) => client.admin.mfaRanking(a.limit));
24812
24862
  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));
24813
24863
  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));
package/dist/index.js CHANGED
@@ -13244,11 +13244,12 @@ var ReportingResource = class extends Resource {
13244
13244
  publisher(query) {
13245
13245
  return this.c.request("GET", "/v1/reporting/publisher", { query });
13246
13246
  }
13247
+ /** Fill summary: requests, fill_rate, paid_fill_rate (house excluded), no-fill reasons. */
13247
13248
  publisherFill(query) {
13248
13249
  return this.c.request("GET", "/v1/reporting/publisher/fill", { query });
13249
13250
  }
13250
13251
  /** Per-placement rollup (impressions, clicks, CTR, revenue, RPM, eCPM, fill
13251
- * rate, viewable rate) for the authed publisher. */
13252
+ * rate, paid fill rate, viewable rate, slot CLS) for the authed publisher. */
13252
13253
  publisherPlacements(query) {
13253
13254
  return this.c.request("GET", "/v1/reporting/publisher/placements", { query });
13254
13255
  }
@@ -13440,6 +13441,14 @@ var ReferralsResource = class extends Resource {
13440
13441
  list() {
13441
13442
  return this.c.request("GET", "/v1/referrals");
13442
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
+ }
13443
13452
  };
13444
13453
  var WebhooksResource = class extends Resource {
13445
13454
  constructor(c) {
@@ -13465,6 +13474,10 @@ var WebhooksResource = class extends Resource {
13465
13474
  rotateSecret(id) {
13466
13475
  return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/rotate-secret`);
13467
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
+ }
13468
13481
  /** Fire a synthetic `ping` event to verify the endpoint. */
13469
13482
  ping(id) {
13470
13483
  return this.c.request("POST", `/v1/webhooks/${encodeURIComponent(id)}/ping`);
@@ -14247,13 +14260,27 @@ var PropertiesResource = class extends Resource {
14247
14260
  return this.c.request("POST", "/v1/publisher/properties", { body, idempotencyKey });
14248
14261
  }
14249
14262
  /** Update a property's editable fields: display name, domain, category, and
14250
- * 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. */
14251
14266
  update(id, body) {
14252
14267
  return this.c.request("PATCH", `/v1/publisher/properties/${encodeURIComponent(id)}`, { body });
14253
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
+ }
14254
14277
  verify(id) {
14255
14278
  return this.c.request("POST", `/v1/publisher/properties/${encodeURIComponent(id)}/verify`);
14256
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
+ }
14257
14284
  /** Set/clear the property's first-party ad-serving domain (anti-adblock). Pass
14258
14285
  * null/undefined to remove. Returns the CNAME target to point the domain at. */
14259
14286
  setServingDomain(id, domain) {
@@ -14293,6 +14320,7 @@ var PlacementsResource = class extends Resource {
14293
14320
  update(id, body) {
14294
14321
  return this.c.request("PATCH", `/v1/publisher/placements/${encodeURIComponent(id)}`, { body });
14295
14322
  }
14323
+ /** Install code; responsive banners also carry `autoAdsScript` (site-wide auto-ads tag). */
14296
14324
  tag(id) {
14297
14325
  return this.c.request("GET", `/v1/publisher/placements/${encodeURIComponent(id)}/tag`);
14298
14326
  }
@@ -14494,6 +14522,18 @@ var AdminResource = class extends Resource {
14494
14522
  return this.c.request("GET", "/v1/admin/audit");
14495
14523
  }
14496
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
+ }
14497
14537
  mfaRanking(limit) {
14498
14538
  return this.c.request("GET", "/v1/admin/mfa", { query: { limit } });
14499
14539
  }
@@ -23147,8 +23187,8 @@ function createServer(client) {
23147
23187
  tool("public_stats", "Public network stats: total ads served and total paid out (Redis-cached).", {}, () => client.stats.public());
23148
23188
  tool("list_campaigns", "List the advertiser account's campaigns.", page, (a) => client.campaigns.list(a));
23149
23189
  tool("get_campaign", "Get one campaign by id.", { id: external_exports.string() }, (a) => client.campaigns.get(a.id));
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));
23151
- 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));
23152
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));
23153
23193
  tool("submit_campaign", "Submit a campaign for review.", { id: external_exports.string() }, (a) => client.campaigns.submit(a.id));
23154
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));
@@ -23177,13 +23217,16 @@ function createServer(client) {
23177
23217
  tool("revoke_terminal_token", "Revoke (delete) a terminal serve token by id.", { id: external_exports.string() }, (a) => client.terminal.revokeToken(a.id));
23178
23218
  tool("list_properties", "List publisher properties (sites, CLIs, apps).", page, (a) => client.properties.list(a));
23179
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));
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));
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));
23181
23222
  tool("verify_property", "Trigger ownership verification for a property.", { id: external_exports.string() }, (a) => client.properties.verify(a.id));
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());
23182
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));
23183
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));
23184
- tool("list_placements", "List ad placements.", page, (a) => client.placements.list(a));
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));
23185
23228
  tool("create_placement", "Create a placement. fields: { propertyId, name, format, floorCpm, \u2026 }.", { fields, idempotencyKey: idem }, (a) => client.placements.create(a.fields, a.idempotencyKey));
23186
- 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));
23187
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));
23188
23231
  tool("disable_placement_signing", "Disable signed-tag enforcement on a placement.", { id: external_exports.string() }, (a) => client.placements.disableSigning(a.id));
23189
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());
@@ -23192,7 +23235,8 @@ function createServer(client) {
23192
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 }));
23193
23236
  tool("advertiser_report", "Advertiser spend/performance report.", reportQuery, (a) => client.reporting.advertiser(a));
23194
23237
  tool("publisher_report", "Publisher revenue/delivery report.", reportQuery, (a) => client.reporting.publisher(a));
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));
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));
23196
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));
23197
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.");
23198
23242
  tool("list_deals", "List private marketplace deals.", { ...page, role: dealRole }, (a) => client.deals.list(a));
@@ -23391,7 +23435,7 @@ function createServer(client) {
23391
23435
  tool("property_domain_connect", "Initiate DomainConnect DNS automation for a property.", { id: external_exports.string() }, (a) => client.properties.domainConnect(a.id));
23392
23436
  tool("delete_property", "Delete a publisher property.", { id: external_exports.string() }, (a) => client.properties.delete(a.id));
23393
23437
  tool("property_mfa_score", "A property's Made-For-Advertising quality score + guidance.", { id: external_exports.string() }, (a) => client.properties.mfa(a.id));
23394
- 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).", { id: external_exports.string(), fields }, (a) => client.placements.update(a.id, a.fields));
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));
23395
23439
  tool("list_feeds", "List product feeds.", {}, () => client.feeds.list());
23396
23440
  tool("create_feed", "Create a product feed. fields: { name, url, format: csv|xml|google_merchant, scheduleCron? }.", { fields }, (a) => client.feeds.create(a.fields));
23397
23441
  tool("fetch_feed", "Trigger an immediate feed fetch/refresh.", { id: external_exports.string() }, (a) => client.feeds.fetch(a.id));
@@ -23441,11 +23485,11 @@ function createServer(client) {
23441
23485
  tool("optimizer_log", "Recent automated budget-reallocation actions.", { limit: external_exports.number().optional() }, (a) => client.automation.optimizerLog(a.limit));
23442
23486
  tool("list_alerts", "List anomaly/optimizer alerts.", {}, () => client.automation.alerts());
23443
23487
  tool("ack_alert", "Acknowledge (mark read) an alert.", { id: external_exports.string() }, (a) => client.automation.ackAlert(a.id));
23444
- tool("identity_resolve", "Resolve a canonical identity from signals. fields: { email?, phone?, cookieId?, deviceId? }.", { fields }, (a) => client.identity.resolve(a.fields));
23445
- tool("identity_link", "Link signals to a canonical id. fields: { canonicalId, signals: [{type,value}] }.", { fields }, (a) => client.identity.link(a.fields));
23446
- tool("identity_consent", "Set consent for a canonical id. fields: { canonicalId, state: granted|denied }.", { fields }, (a) => client.identity.setConsent(a.fields));
23447
- tool("identity_stats", "Identity graph stats.", {}, () => client.identity.stats());
23448
- tool("get_identity", "Get an identity record by canonical id.", { canonicalId: external_exports.string() }, (a) => client.identity.get(a.canonicalId));
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));
23449
23493
  tool("list_apps", "List publisher mobile/CTV apps.", {}, () => client.apps.list());
23450
23494
  tool("get_app", "Get one app by id.", { id: external_exports.string() }, (a) => client.apps.get(a.id));
23451
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));
@@ -23537,7 +23581,8 @@ function createServer(client) {
23537
23581
  {},
23538
23582
  () => client.publisherInsights.deals()
23539
23583
  );
23540
- 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));
23541
23586
  tool("list_webhook_events", "List available webhook event types.", {}, () => client.webhooks.events());
23542
23587
  tool("create_webhook", "Subscribe to webhook events. fields: { url (https), events: [...] }.", { fields }, (a) => client.webhooks.create(a.fields));
23543
23588
  tool("delete_webhook", "Delete a webhook subscription.", { id: external_exports.string() }, (a) => client.webhooks.delete(a.id));
@@ -23552,6 +23597,8 @@ function createServer(client) {
23552
23597
  tool("disconnect_provider", "Disconnect a linked social-login provider.", { provider: external_exports.string() }, (a) => client.auth.disconnect(a.provider));
23553
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));
23554
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());
23555
23602
  tool("list_regions", "List active edge regions.", {}, () => client.regions.list());
23556
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));
23557
23604
  tool("regions_health", "Per-region engine health.", {}, () => client.regions.health());
@@ -23569,6 +23616,9 @@ function createServer(client) {
23569
23616
  tool("admin_get_config", "Get platform config / feature flags.", {}, () => client.admin.getConfig());
23570
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));
23571
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));
23572
23622
  tool("admin_mfa_ranking", "Properties ranked by Made-For-Advertising risk.", { limit: external_exports.number().optional() }, (a) => client.admin.mfaRanking(a.limit));
23573
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));
23574
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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adviverse/mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "MCP server exposing the Adviverse ad network API as tools for AI agents.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -22,7 +22,7 @@
22
22
  "tsup": "^8.3.0",
23
23
  "typescript": "^5.6.2",
24
24
  "@types/node": "^22.0.0",
25
- "@adviverse/sdk": "0.1.2",
25
+ "@adviverse/sdk": "0.1.3",
26
26
  "@adnet/shared": "0.1.0"
27
27
  },
28
28
  "repository": {