@zinn-digital/sdk 0.1.1419 → 0.1.1420

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.
@@ -20401,6 +20401,82 @@ export interface paths {
20401
20401
  patch?: never;
20402
20402
  trace?: never;
20403
20403
  };
20404
+ "/v1/ads/site-tags": {
20405
+ parameters: {
20406
+ query?: never;
20407
+ header?: never;
20408
+ path?: never;
20409
+ cookie?: never;
20410
+ };
20411
+ /**
20412
+ * Install on any site — the organisation's site tags with their install code.
20413
+ * @description Gated on `ads.view` (docs/1006 §84, za-128). One row per non-WordPress site: the network tag ids (Google Ads `AW-…`, GA4 `G-…`, Microsoft UET, Meta pixel), the Google Ads conversion label per outcome kind and the consent default. `install` holds the universal snippet, the Shopify custom-pixel code and the GTM container path, all generated from the same row. `suggested_hosts` are sites already named as an ad account's tracking site that have no tag yet.
20414
+ */
20415
+ get: operations["listAdsSiteTags"];
20416
+ put?: never;
20417
+ /**
20418
+ * Add a site and mint its public tag key.
20419
+ * @description Gated on `ads.manage`; audit-logged (`ads.site_tag_created`). `site_host` may be pasted as a URL (it is reduced to the host). The `public_key` is in the customer's page source and is NOT a secret: it only selects public tag ids. A second tag for the same host in the organisation is a `409` (`refusal.adsconnect.siteTag.duplicateHost`); a value in the wrong format is a `422` (`refusal.adsconnect.siteTag.*`).
20420
+ */
20421
+ post: operations["createAdsSiteTag"];
20422
+ delete?: never;
20423
+ options?: never;
20424
+ head?: never;
20425
+ patch?: never;
20426
+ trace?: never;
20427
+ };
20428
+ "/v1/ads/site-tags/{tag_id}": {
20429
+ parameters: {
20430
+ query?: never;
20431
+ header?: never;
20432
+ path: {
20433
+ tag_id: string;
20434
+ };
20435
+ cookie?: never;
20436
+ };
20437
+ /**
20438
+ * One site tag with its install code.
20439
+ * @description Gated on `ads.view` (docs/1006 §84). Another organisation's tag is a `404`.
20440
+ */
20441
+ get: operations["getAdsSiteTag"];
20442
+ /**
20443
+ * Change a site tag (every install route follows within five minutes).
20444
+ * @description Gated on `ads.manage`; audit-logged (`ads.site_tag_updated`). Only the fields sent change. `version` goes up by one and the cached script is dropped, so the snippet and the Shopify pixel serve the new settings within the edge lifetime (300 s). A GTM container already imported does not change: download and import it again.
20445
+ */
20446
+ put: operations["updateAdsSiteTag"];
20447
+ post?: never;
20448
+ /**
20449
+ * Remove a site tag; its script answers 404 from then on.
20450
+ * @description Gated on `ads.manage`; audit-logged (`ads.site_tag_deleted`).
20451
+ */
20452
+ delete: operations["deleteAdsSiteTag"];
20453
+ options?: never;
20454
+ head?: never;
20455
+ patch?: never;
20456
+ trace?: never;
20457
+ };
20458
+ "/v1/ads/site-tags/{tag_id}/gtm-container": {
20459
+ parameters: {
20460
+ query?: never;
20461
+ header?: never;
20462
+ path: {
20463
+ tag_id: string;
20464
+ };
20465
+ cookie?: never;
20466
+ };
20467
+ /**
20468
+ * The Google Tag Manager container to import, built from the same site tag.
20469
+ * @description Gated on `ads.view` (docs/1006 §84). A GTM export (format 2) the customer imports in Admin → Import container (choose Merge): consent defaults on Consent Initialization, the Conversion Linker and Google tag, one Google Ads conversion tag per label (fired by the data-layer event `zinn_<kind>`), Microsoft UET and the Meta pixel (the Meta tags require `ad_storage` consent). The site pushes `{event: "zinn_purchase", zinn: {value_minor, currency, transaction_id}}`.
20470
+ */
20471
+ get: operations["getAdsSiteTagGtmContainer"];
20472
+ put?: never;
20473
+ post?: never;
20474
+ delete?: never;
20475
+ options?: never;
20476
+ head?: never;
20477
+ patch?: never;
20478
+ trace?: never;
20479
+ };
20404
20480
  "/v1/ads/social": {
20405
20481
  parameters: {
20406
20482
  query?: never;
@@ -20505,6 +20581,52 @@ export interface paths {
20505
20581
  patch?: never;
20506
20582
  trace?: never;
20507
20583
  };
20584
+ "/v1/ads/wordpress/sites": {
20585
+ parameters: {
20586
+ query?: never;
20587
+ header?: never;
20588
+ path?: never;
20589
+ cookie?: never;
20590
+ };
20591
+ /**
20592
+ * The organisation's WordPress sites connected with the Zinn® Ads plugin.
20593
+ * @description Gated on `ads.view` (docs/1006 §102). Connected sites and pairing codes that have not expired yet. Each site says whether Cloudflare fronts it (`cloudflare_detected`, measured by the plugin), its tag mode (`browser` or `zaraz`), whether to offer Zaraz mode, and in Zaraz mode the purchases sent through Zaraz against what the ad networks credited over the latest tracking-check window (`zaraz_health`). Cursor-paged newest first: follow `page.next_cursor` while `page.has_more` is true (there is no cap on the total).
20594
+ */
20595
+ get: operations["listAdsWordPressSites"];
20596
+ put?: never;
20597
+ /**
20598
+ * Make a one-time code that connects a WordPress site with the Zinn® Ads plugin.
20599
+ * @description Gated on `ads.manage`; audit action `ads.wordpress_pairing_created`. The `code` is shown ONCE (only its SHA-256 hash is stored) and is valid for 30 minutes. The customer pastes it into the plugin's settings page; the plugin redeems it at `claimAdsWordPressSite`.
20600
+ */
20601
+ post: operations["createAdsWordPressPairing"];
20602
+ delete?: never;
20603
+ options?: never;
20604
+ head?: never;
20605
+ patch?: never;
20606
+ trace?: never;
20607
+ };
20608
+ "/v1/ads/wordpress/sites/{site_id}": {
20609
+ parameters: {
20610
+ query?: never;
20611
+ header?: never;
20612
+ path: {
20613
+ site_id: string;
20614
+ };
20615
+ cookie?: never;
20616
+ };
20617
+ get?: never;
20618
+ put?: never;
20619
+ post?: never;
20620
+ /**
20621
+ * Disconnect a WordPress site (its token stops working at once).
20622
+ * @description Gated on `ads.manage`; audit action `ads.wordpress_site_disconnected`. Another organisation's site answers 404.
20623
+ */
20624
+ delete: operations["disconnectAdsWordPressSite"];
20625
+ options?: never;
20626
+ head?: never;
20627
+ patch?: never;
20628
+ trace?: never;
20629
+ };
20508
20630
  "/v1/affiliate": {
20509
20631
  parameters: {
20510
20632
  query?: never;
@@ -40808,6 +40930,148 @@ export interface paths {
40808
40930
  patch?: never;
40809
40931
  trace?: never;
40810
40932
  };
40933
+ "/v1/public/ads-tag/{public_key}.js": {
40934
+ parameters: {
40935
+ query?: never;
40936
+ header?: never;
40937
+ path: {
40938
+ public_key: string;
40939
+ };
40940
+ cookie?: never;
40941
+ };
40942
+ /**
40943
+ * The universal Zinn® Ads script for one site (public, cached).
40944
+ * @description Public (docs/1006 §84, za-128): sites load it as `https://zinndigital.com/zat/{public_key}.js`, which the public site's edge caches and fills from here. Answered from the cache, never a database read per page view. Sets Google Consent Mode v2 defaults BEFORE any tag loads, then the configured Google, Microsoft and (only after ad consent) Meta tags, and defines `zinnAds.conversion(kind, {value_minor | amount, currency, id})`, `zinnAds.consent({...})` and `zinnAds.clickIds()`. No personal data. An unknown, removed or switched-off key is a `404` whose body is a JavaScript comment.
40945
+ */
40946
+ get: operations["getAdsSiteTagScript"];
40947
+ put?: never;
40948
+ post?: never;
40949
+ delete?: never;
40950
+ options?: never;
40951
+ head?: never;
40952
+ patch?: never;
40953
+ trace?: never;
40954
+ };
40955
+ "/v1/public/ads-wordpress/claim": {
40956
+ parameters: {
40957
+ query?: never;
40958
+ header?: never;
40959
+ path?: never;
40960
+ cookie?: never;
40961
+ };
40962
+ get?: never;
40963
+ put?: never;
40964
+ /**
40965
+ * The Zinn® Ads plugin exchanges a one-time code for its site token.
40966
+ * @description ⛔ **No authentication** — the one-time code is the whole authorisation (docs/1006 §102). Unknown, used and expired codes are one answer (422 `codeInvalid`). The `token` is returned ONCE; we keep only its SHA-256 hash. Re-connecting a host that is already connected retires its old token in the same step. Audit action `ads.wordpress_site_connected`.
40967
+ */
40968
+ post: operations["claimAdsWordPressSite"];
40969
+ delete?: never;
40970
+ options?: never;
40971
+ head?: never;
40972
+ patch?: never;
40973
+ trace?: never;
40974
+ };
40975
+ "/v1/public/ads-wordpress/clicks": {
40976
+ parameters: {
40977
+ query?: never;
40978
+ header?: never;
40979
+ path?: never;
40980
+ cookie?: never;
40981
+ };
40982
+ get?: never;
40983
+ put?: never;
40984
+ /**
40985
+ * The plugin's click-fraud tag sends paid-click visits for scoring.
40986
+ * @description Site token only. Up to 500 visits a batch, the facts an access log holds. Visits that carry a paid-click id (gclid, msclkid, fbclid, ttclid, li_fat_id, twclid, epik) and are older than the 10-minute dwell window are scored by the same click-fraud shield as sites hosted by Zinn® (docs/1006 §15), on the connected host whatever host a visit names. Each click is stored once, so a re-sent batch stores nothing new. Nothing is scored when the organisation switched the shield off.
40987
+ */
40988
+ post: operations["sendAdsWordPressClicks"];
40989
+ delete?: never;
40990
+ options?: never;
40991
+ head?: never;
40992
+ patch?: never;
40993
+ trace?: never;
40994
+ };
40995
+ "/v1/public/ads-wordpress/heartbeat": {
40996
+ parameters: {
40997
+ query?: never;
40998
+ header?: never;
40999
+ path?: never;
41000
+ cookie?: never;
41001
+ };
41002
+ get?: never;
41003
+ put?: never;
41004
+ /**
41005
+ * The plugin reports in and reads its config.
41006
+ * @description Site token only. Records the plugin and WordPress versions, whether Cloudflare fronts the site, the tag mode and, per UTC day, how many purchases the plugin sent through Zaraz (`zaraz_sent`, running totals; days in the future or older than 35 days are dropped). WPPAID: also each path's own per-day counts, so the dashboard measures the browser path and the server upload apart — `zaraz_delivered` (handed to Zaraz in the visitor's browser), `zaraz_declined` (withheld: no ad consent) and `orders_reported` (paid orders queued for the server upload). A counter not sent keeps what it had. The site calls us; nothing calls the site (§2.56).
41007
+ */
41008
+ post: operations["adsWordPressHeartbeat"];
41009
+ delete?: never;
41010
+ options?: never;
41011
+ head?: never;
41012
+ patch?: never;
41013
+ trace?: never;
41014
+ };
41015
+ "/v1/public/ads-wordpress/outcomes": {
41016
+ parameters: {
41017
+ query?: never;
41018
+ header?: never;
41019
+ path?: never;
41020
+ cookie?: never;
41021
+ };
41022
+ get?: never;
41023
+ put?: never;
41024
+ /**
41025
+ * The plugin sends the site's paid orders and free trials to the outcome pipeline.
41026
+ * @description Site token only. The same outcome shape and store as the events API (`POST /v1/ads/connections/{connection_id}/outcomes`), for every connection of the site's organisation that is not disconnected, then pushed to the networks within minutes. Only `purchase` and `trial` (a 422 otherwise: a lead is the browser tag's). The reference is forced into the site's own namespace (`<ref_prefix>-<order number>`, the same transaction id the browser tag sends, so the network counts a sale once), the host is the connected site's whatever `outcome_url` says, and the source is `store`. Click ids and the e-mail are stored and forwarded only when an outcome's `consent` is `GRANTED` (the order page's own consent); otherwise they are dropped, whatever the request carries. Idempotent per order: a re-sent order stores nothing new. Audit action `ads.outcomes_received` when something was stored.
41027
+ */
41028
+ post: operations["sendAdsWordPressOutcomes"];
41029
+ delete?: never;
41030
+ options?: never;
41031
+ head?: never;
41032
+ patch?: never;
41033
+ trace?: never;
41034
+ };
41035
+ "/v1/public/ads-wordpress/refunds": {
41036
+ parameters: {
41037
+ query?: never;
41038
+ header?: never;
41039
+ path?: never;
41040
+ cookie?: never;
41041
+ };
41042
+ get?: never;
41043
+ put?: never;
41044
+ /**
41045
+ * The plugin withdraws or restates orders cancelled, failed or refunded after they were reported.
41046
+ * @description Site token only (WPPAID). An order the plugin reported (only once PAID) and that was then cancelled, failed or refunded in full is withdrawn exactly as the events API's retraction does: not uploaded yet, it never goes; uploaded, the network gets ONE retraction. Refunded in part (`refunded_minor` = refunded so far, with `currency`), the sale is restated to what was kept. The reference is forced into the site's own namespace, so a site can withdraw only its own orders. `not_found` counts references the pipeline does not have yet (the plugin tries again later). Idempotent. Audit action `ads.outcomes_retracted` when something changed.
41047
+ */
41048
+ post: operations["sendAdsWordPressRefunds"];
41049
+ delete?: never;
41050
+ options?: never;
41051
+ head?: never;
41052
+ patch?: never;
41053
+ trace?: never;
41054
+ };
41055
+ "/v1/public/ads-wordpress/site": {
41056
+ parameters: {
41057
+ query?: never;
41058
+ header?: never;
41059
+ path?: never;
41060
+ cookie?: never;
41061
+ };
41062
+ get?: never;
41063
+ put?: never;
41064
+ post?: never;
41065
+ /**
41066
+ * The plugin's Disconnect button revokes its own site token.
41067
+ * @description Site token only; audit action `ads.wordpress_site_disconnected`.
41068
+ */
41069
+ delete: operations["disconnectAdsWordPressSelf"];
41070
+ options?: never;
41071
+ head?: never;
41072
+ patch?: never;
41073
+ trace?: never;
41074
+ };
40811
41075
  "/v1/public/ads/call-numbers/{pool_key}": {
40812
41076
  parameters: {
40813
41077
  query?: {
@@ -66167,6 +66431,84 @@ export interface components {
66167
66431
  /** @description The address of the site in that language. */
66168
66432
  url?: string;
66169
66433
  };
66434
+ AdsSiteTag: {
66435
+ /** @enum {string} */
66436
+ consent_default: "denied_eea" | "denied" | "granted";
66437
+ enabled: boolean;
66438
+ ga4_id: string;
66439
+ google_ads_id: string;
66440
+ google_labels: {
66441
+ [key: string]: string;
66442
+ };
66443
+ /** Format: uuid */
66444
+ id: string;
66445
+ install: components["schemas"]["AdsSiteTagInstall"];
66446
+ keep_click_ids: boolean;
66447
+ meta_pixel_id: string;
66448
+ microsoft_uet_id: string;
66449
+ /** Format: uuid */
66450
+ org_id: string;
66451
+ /** @description Public (it is in the page source); never an API credential. */
66452
+ public_key: string;
66453
+ site_host: string;
66454
+ /** Format: date-time */
66455
+ updated_at: string | null;
66456
+ version: number;
66457
+ wait_for_update_ms: number;
66458
+ };
66459
+ AdsSiteTagCreate: components["schemas"]["AdsSiteTagSettings"] & {
66460
+ /**
66461
+ * Format: uuid
66462
+ * @description Required when you manage more than one organisation.
66463
+ */
66464
+ org_id?: string;
66465
+ };
66466
+ AdsSiteTagInstall: {
66467
+ conversion_example: string;
66468
+ data_layer_example: string;
66469
+ gtm_container_path: string;
66470
+ /** Format: uri */
66471
+ script_url: string;
66472
+ /** @description Code for Shopify admin → Settings → Customer events → Add custom pixel. */
66473
+ shopify_pixel: string;
66474
+ /** @description The two lines to paste into every page's head. */
66475
+ snippet_html: string;
66476
+ };
66477
+ AdsSiteTagList: {
66478
+ items: components["schemas"]["AdsSiteTag"][];
66479
+ suggested_hosts: string[];
66480
+ };
66481
+ /** @description The editable settings of a site tag (za-128, docs/1006 §84). */
66482
+ AdsSiteTagSettings: {
66483
+ /**
66484
+ * @description Ad consent before the visitor's banner answers: denied in the EEA, UK and Switzerland (default), denied everywhere, or granted.
66485
+ * @enum {string}
66486
+ */
66487
+ consent_default?: "denied_eea" | "denied" | "granted";
66488
+ enabled?: boolean;
66489
+ /** @description GA4 measurement id, G- plus letters/digits; empty for none. */
66490
+ ga4_id?: string;
66491
+ /**
66492
+ * @description Google Ads tag id, AW- plus digits; empty for none.
66493
+ * @example AW-123456789
66494
+ */
66495
+ google_ads_id?: string;
66496
+ /** @description Google Ads conversion label per outcome kind (purchase, trial, lead, signup, activation, retained7, retained30, upgrade, free_listing). An empty label removes the kind. */
66497
+ google_labels?: {
66498
+ [key: string]: string;
66499
+ };
66500
+ /** @description Keep gclid, gbraid, wbraid, msclkid and fbclid in a first-party cookie for 90 days, only after ad consent. */
66501
+ keep_click_ids?: boolean;
66502
+ /** @description Meta pixel id (digits). Loaded only once ad consent is granted. */
66503
+ meta_pixel_id?: string;
66504
+ /** @description Microsoft Advertising UET tag id (digits). */
66505
+ microsoft_uet_id?: string;
66506
+ /** @example shop.example.com */
66507
+ site_host?: string;
66508
+ /** @description How long Google's tags wait for the banner's answer. */
66509
+ wait_for_update_ms?: number;
66510
+ };
66511
+ AdsSiteTagUpdate: components["schemas"]["AdsSiteTagSettings"];
66170
66512
  AdsSocial: {
66171
66513
  accounts: {
66172
66514
  /** Format: uuid */
@@ -66629,6 +66971,103 @@ export interface components {
66629
66971
  endpoints: components["schemas"]["AdsWebhookEndpoint"][];
66630
66972
  events: components["schemas"]["AdsWebhookEventName"][];
66631
66973
  };
66974
+ /** @description What the Zinn® Ads plugin needs to run. Public ids only, never a credential. */
66975
+ AdsWordPressConfig: {
66976
+ cloudflare_detected: boolean;
66977
+ heartbeat_seconds: number;
66978
+ /** @enum {string} */
66979
+ mode: "browser" | "zaraz";
66980
+ offer_zaraz: boolean;
66981
+ /** @description The site's order-reference prefix: an order's transaction id is `<ref_prefix>-<order number>` in the browser tag and the server-side upload alike. */
66982
+ ref_prefix?: string;
66983
+ shield: {
66984
+ dwell_seconds: number;
66985
+ enabled: boolean;
66986
+ max_hits: number;
66987
+ /**
66988
+ * @description Why the shield may not score this site's clicks now (a site we do not host needs the click-shield add-on; §2.46 good standing). While set, the plugin collects nothing and shows the add-on offer.
66989
+ * @enum {string|null}
66990
+ */
66991
+ refusal: "clickShieldRequired" | "notInGoodStanding" | null;
66992
+ };
66993
+ site_host: string;
66994
+ /** Format: uuid */
66995
+ site_id: string;
66996
+ /** @description The site's Zinn® Ads tag (the same `AdsSiteTag` "Install on any site" edits; claiming a host creates or links it). Browser mode loads `script_url` and hands each conversion to it. `null` when the tag was deleted or switched off there. */
66997
+ tag?: {
66998
+ public_key: string;
66999
+ /** Format: uri */
67000
+ script_url: string;
67001
+ version: number;
67002
+ } | null;
67003
+ };
67004
+ /** @description One delivery path of a Zaraz-mode site (WPPAID); `short` when more than 10% of at least 5 expected went missing. */
67005
+ AdsWordPressPathHealth: {
67006
+ delivered: number;
67007
+ expected: number;
67008
+ /** @enum {string} */
67009
+ status: "ok" | "short" | "tooFew";
67010
+ };
67011
+ AdsWordPressSite: {
67012
+ /** Format: date-time */
67013
+ claimed_at?: string | null;
67014
+ /**
67015
+ * @description Why this site's paid clicks are not checked now: a site Zinn Digital® does not host needs the click-shield add-on (or a plan that carries it), and the account must be in good standing. The card shows the add-on offer or the billing link instead.
67016
+ * @enum {string|null}
67017
+ */
67018
+ click_shield_refusal: "clickShieldRequired" | "notInGoodStanding" | null;
67019
+ cloudflare_detected: boolean;
67020
+ /** Format: date-time */
67021
+ created_at?: string | null;
67022
+ /** Format: uuid */
67023
+ id: string;
67024
+ /** Format: date-time */
67025
+ last_seen_at?: string | null;
67026
+ /** @enum {string} */
67027
+ mode: "browser" | "zaraz";
67028
+ offer_zaraz: boolean;
67029
+ /** Format: uuid */
67030
+ org_id: string;
67031
+ /** Format: date-time */
67032
+ pairing_expires_at?: string | null;
67033
+ plugin_version?: string;
67034
+ site_host: string;
67035
+ site_url?: string;
67036
+ /** @enum {string} */
67037
+ status: "pending" | "active";
67038
+ /** @description Whether that tag loads (browser mode sends nothing without it). */
67039
+ tag_enabled?: boolean;
67040
+ /**
67041
+ * Format: uuid
67042
+ * @description The site's tag in "Install on any site" (`null` = none for this host).
67043
+ */
67044
+ tag_id?: string | null;
67045
+ /** @description The token's last 4 characters. */
67046
+ token_hint?: string;
67047
+ wp_version?: string;
67048
+ /** @description Zaraz-sent purchases vs network-credited, per SITE: compared only when the organisation's credit can be attributed to this site (it is the only connected WordPress site, enabled site tag and recorded sale host in the window); otherwise `cannotAttribute` with `credited` null — never a gap alarm, never a hidden loss. WPPAID: first, each path on its own over the last 7 complete UTC days (`paths`; null for a plugin build that reports no per-path counts) — the browser path (purchases handed to Zaraz vs Zaraz purchases on order pages, less those withheld for want of consent) and the server upload (orders it delivered vs paid orders queued). The ad network de-duplicates the two, so its credit alone hides a Zaraz loss; a short path makes the status `pathShort` and `short_path` names it. */
67049
+ zaraz_health: {
67050
+ credited?: number | null;
67051
+ gap_pct?: number | null;
67052
+ paths?: {
67053
+ browser: components["schemas"]["AdsWordPressPathHealth"];
67054
+ server: components["schemas"]["AdsWordPressPathHealth"];
67055
+ /** Format: date */
67056
+ window_end: string;
67057
+ /** Format: date */
67058
+ window_start: string;
67059
+ } | null;
67060
+ sent?: number | null;
67061
+ /** @enum {string|null} */
67062
+ short_path?: "browser" | "server" | "both" | null;
67063
+ /** @enum {string} */
67064
+ status: "notZaraz" | "noCheck" | "cannotAttribute" | "unreadable" | "tooFew" | "ok" | "gap" | "pathShort";
67065
+ /** Format: date */
67066
+ window_end?: string;
67067
+ /** Format: date */
67068
+ window_start?: string;
67069
+ };
67070
+ };
66632
67071
  /** @description One X Ads campaign and its budgets (za-43). Money is micros of `currency` (§2.8). */
66633
67072
  AdsXCampaign: {
66634
67073
  /** @description ISO 4217 code. */
@@ -144041,6 +144480,166 @@ export interface operations {
144041
144480
  429: components["responses"]["TooManyRequests"];
144042
144481
  };
144043
144482
  };
144483
+ listAdsSiteTags: {
144484
+ parameters: {
144485
+ query?: {
144486
+ /** @description Narrow to one of your organisations (default: all you can view). */
144487
+ org_id?: string;
144488
+ };
144489
+ header?: never;
144490
+ path?: never;
144491
+ cookie?: never;
144492
+ };
144493
+ requestBody?: never;
144494
+ responses: {
144495
+ /** @description The site tags (up to 200) and the hosts to suggest. */
144496
+ 200: {
144497
+ headers: {
144498
+ [name: string]: unknown;
144499
+ };
144500
+ content: {
144501
+ "application/json": components["schemas"]["AdsSiteTagList"];
144502
+ };
144503
+ };
144504
+ 401: components["responses"]["Unauthorized"];
144505
+ 403: components["responses"]["Forbidden"];
144506
+ };
144507
+ };
144508
+ createAdsSiteTag: {
144509
+ parameters: {
144510
+ query?: never;
144511
+ header?: never;
144512
+ path?: never;
144513
+ cookie?: never;
144514
+ };
144515
+ requestBody: {
144516
+ content: {
144517
+ "application/json": components["schemas"]["AdsSiteTagCreate"];
144518
+ };
144519
+ };
144520
+ responses: {
144521
+ /** @description The new site tag. */
144522
+ 201: {
144523
+ headers: {
144524
+ [name: string]: unknown;
144525
+ };
144526
+ content: {
144527
+ "application/json": components["schemas"]["AdsSiteTag"];
144528
+ };
144529
+ };
144530
+ 401: components["responses"]["Unauthorized"];
144531
+ 403: components["responses"]["Forbidden"];
144532
+ 404: components["responses"]["NotFound"];
144533
+ 409: components["responses"]["Conflict"];
144534
+ 422: components["responses"]["UnprocessableEntity"];
144535
+ };
144536
+ };
144537
+ getAdsSiteTag: {
144538
+ parameters: {
144539
+ query?: never;
144540
+ header?: never;
144541
+ path: {
144542
+ tag_id: string;
144543
+ };
144544
+ cookie?: never;
144545
+ };
144546
+ requestBody?: never;
144547
+ responses: {
144548
+ /** @description The site tag. */
144549
+ 200: {
144550
+ headers: {
144551
+ [name: string]: unknown;
144552
+ };
144553
+ content: {
144554
+ "application/json": components["schemas"]["AdsSiteTag"];
144555
+ };
144556
+ };
144557
+ 401: components["responses"]["Unauthorized"];
144558
+ 403: components["responses"]["Forbidden"];
144559
+ 404: components["responses"]["NotFound"];
144560
+ };
144561
+ };
144562
+ updateAdsSiteTag: {
144563
+ parameters: {
144564
+ query?: never;
144565
+ header?: never;
144566
+ path: {
144567
+ tag_id: string;
144568
+ };
144569
+ cookie?: never;
144570
+ };
144571
+ requestBody: {
144572
+ content: {
144573
+ "application/json": components["schemas"]["AdsSiteTagUpdate"];
144574
+ };
144575
+ };
144576
+ responses: {
144577
+ /** @description The changed site tag. */
144578
+ 200: {
144579
+ headers: {
144580
+ [name: string]: unknown;
144581
+ };
144582
+ content: {
144583
+ "application/json": components["schemas"]["AdsSiteTag"];
144584
+ };
144585
+ };
144586
+ 401: components["responses"]["Unauthorized"];
144587
+ 403: components["responses"]["Forbidden"];
144588
+ 404: components["responses"]["NotFound"];
144589
+ 409: components["responses"]["Conflict"];
144590
+ 422: components["responses"]["UnprocessableEntity"];
144591
+ };
144592
+ };
144593
+ deleteAdsSiteTag: {
144594
+ parameters: {
144595
+ query?: never;
144596
+ header?: never;
144597
+ path: {
144598
+ tag_id: string;
144599
+ };
144600
+ cookie?: never;
144601
+ };
144602
+ requestBody?: never;
144603
+ responses: {
144604
+ /** @description Removed. */
144605
+ 204: {
144606
+ headers: {
144607
+ [name: string]: unknown;
144608
+ };
144609
+ content?: never;
144610
+ };
144611
+ 401: components["responses"]["Unauthorized"];
144612
+ 403: components["responses"]["Forbidden"];
144613
+ 404: components["responses"]["NotFound"];
144614
+ };
144615
+ };
144616
+ getAdsSiteTagGtmContainer: {
144617
+ parameters: {
144618
+ query?: never;
144619
+ header?: never;
144620
+ path: {
144621
+ tag_id: string;
144622
+ };
144623
+ cookie?: never;
144624
+ };
144625
+ requestBody?: never;
144626
+ responses: {
144627
+ /** @description The container JSON (sent as an attachment). */
144628
+ 200: {
144629
+ headers: {
144630
+ [name: string]: unknown;
144631
+ };
144632
+ content: {
144633
+ "application/json": {
144634
+ [key: string]: unknown;
144635
+ };
144636
+ };
144637
+ };
144638
+ 401: components["responses"]["Unauthorized"];
144639
+ 403: components["responses"]["Forbidden"];
144640
+ 404: components["responses"]["NotFound"];
144641
+ };
144642
+ };
144044
144643
  getAdsSocial: {
144045
144644
  parameters: {
144046
144645
  query?: {
@@ -144207,6 +144806,97 @@ export interface operations {
144207
144806
  429: components["responses"]["TooManyRequests"];
144208
144807
  };
144209
144808
  };
144809
+ listAdsWordPressSites: {
144810
+ parameters: {
144811
+ query?: {
144812
+ /** @description Opaque cursor from a previous page's `page.next_cursor`. */
144813
+ cursor?: components["parameters"]["Cursor"];
144814
+ /** @description Maximum items to return (page size). */
144815
+ limit?: components["parameters"]["Limit"];
144816
+ org_id?: string;
144817
+ };
144818
+ header?: never;
144819
+ path?: never;
144820
+ cookie?: never;
144821
+ };
144822
+ requestBody?: never;
144823
+ responses: {
144824
+ /** @description One page of sites. */
144825
+ 200: {
144826
+ headers: {
144827
+ [name: string]: unknown;
144828
+ };
144829
+ content: {
144830
+ "application/json": {
144831
+ data: components["schemas"]["AdsWordPressSite"][];
144832
+ page: components["schemas"]["PageMeta"];
144833
+ };
144834
+ };
144835
+ };
144836
+ 401: components["responses"]["Unauthorized"];
144837
+ 403: components["responses"]["Forbidden"];
144838
+ 429: components["responses"]["TooManyRequests"];
144839
+ };
144840
+ };
144841
+ createAdsWordPressPairing: {
144842
+ parameters: {
144843
+ query?: never;
144844
+ header?: never;
144845
+ path?: never;
144846
+ cookie?: never;
144847
+ };
144848
+ requestBody?: {
144849
+ content: {
144850
+ "application/json": {
144851
+ /** Format: uuid */
144852
+ org_id?: string;
144853
+ };
144854
+ };
144855
+ };
144856
+ responses: {
144857
+ /** @description The pending site and its code. */
144858
+ 201: {
144859
+ headers: {
144860
+ [name: string]: unknown;
144861
+ };
144862
+ content: {
144863
+ "application/json": components["schemas"]["AdsWordPressSite"] & {
144864
+ /** @example 7KQ2-M9XD-4RTB */
144865
+ code: string;
144866
+ };
144867
+ };
144868
+ };
144869
+ 401: components["responses"]["Unauthorized"];
144870
+ 403: components["responses"]["Forbidden"];
144871
+ 404: components["responses"]["NotFound"];
144872
+ 422: components["responses"]["UnprocessableEntity"];
144873
+ 429: components["responses"]["TooManyRequests"];
144874
+ };
144875
+ };
144876
+ disconnectAdsWordPressSite: {
144877
+ parameters: {
144878
+ query?: never;
144879
+ header?: never;
144880
+ path: {
144881
+ site_id: string;
144882
+ };
144883
+ cookie?: never;
144884
+ };
144885
+ requestBody?: never;
144886
+ responses: {
144887
+ /** @description Disconnected. */
144888
+ 204: {
144889
+ headers: {
144890
+ [name: string]: unknown;
144891
+ };
144892
+ content?: never;
144893
+ };
144894
+ 401: components["responses"]["Unauthorized"];
144895
+ 403: components["responses"]["Forbidden"];
144896
+ 404: components["responses"]["NotFound"];
144897
+ 429: components["responses"]["TooManyRequests"];
144898
+ };
144899
+ };
144210
144900
  getAffiliateAccount: {
144211
144901
  parameters: {
144212
144902
  query?: {
@@ -177562,6 +178252,271 @@ export interface operations {
177562
178252
  429: components["responses"]["TooManyRequests"];
177563
178253
  };
177564
178254
  };
178255
+ getAdsSiteTagScript: {
178256
+ parameters: {
178257
+ query?: never;
178258
+ header?: never;
178259
+ path: {
178260
+ public_key: string;
178261
+ };
178262
+ cookie?: never;
178263
+ };
178264
+ requestBody?: never;
178265
+ responses: {
178266
+ /** @description The script. */
178267
+ 200: {
178268
+ headers: {
178269
+ /** @description public, max-age=300, s-maxage=300, stale-while-revalidate=86400 */
178270
+ "Cache-Control"?: string;
178271
+ [name: string]: unknown;
178272
+ };
178273
+ content: {
178274
+ "application/javascript": string;
178275
+ };
178276
+ };
178277
+ /** @description No such site tag (a JavaScript comment). */
178278
+ 404: {
178279
+ headers: {
178280
+ [name: string]: unknown;
178281
+ };
178282
+ content: {
178283
+ "application/javascript": string;
178284
+ };
178285
+ };
178286
+ };
178287
+ };
178288
+ claimAdsWordPressSite: {
178289
+ parameters: {
178290
+ query?: never;
178291
+ header?: never;
178292
+ path?: never;
178293
+ cookie?: never;
178294
+ };
178295
+ requestBody: {
178296
+ content: {
178297
+ "application/json": {
178298
+ /** @description A CF-Ray header reached PHP. */
178299
+ cloudflare?: boolean;
178300
+ code: string;
178301
+ plugin_version?: string;
178302
+ /**
178303
+ * Format: uri
178304
+ * @description The site's home_url().
178305
+ */
178306
+ site_url: string;
178307
+ wp_version?: string;
178308
+ };
178309
+ };
178310
+ };
178311
+ responses: {
178312
+ /** @description Connected. */
178313
+ 201: {
178314
+ headers: {
178315
+ [name: string]: unknown;
178316
+ };
178317
+ content: {
178318
+ "application/json": {
178319
+ config: components["schemas"]["AdsWordPressConfig"];
178320
+ /** @description zwp_… — store it; it is never shown again. */
178321
+ token: string;
178322
+ };
178323
+ };
178324
+ };
178325
+ 422: components["responses"]["UnprocessableEntity"];
178326
+ 429: components["responses"]["TooManyRequests"];
178327
+ };
178328
+ };
178329
+ sendAdsWordPressClicks: {
178330
+ parameters: {
178331
+ query?: never;
178332
+ header?: never;
178333
+ path?: never;
178334
+ cookie?: never;
178335
+ };
178336
+ requestBody: {
178337
+ content: {
178338
+ "application/json": {
178339
+ hits: {
178340
+ /** Format: date-time */
178341
+ at: string;
178342
+ ip: string;
178343
+ method?: string;
178344
+ path?: string;
178345
+ query?: string;
178346
+ status?: number;
178347
+ user_agent?: string;
178348
+ }[];
178349
+ };
178350
+ };
178351
+ };
178352
+ responses: {
178353
+ /** @description What was scored. */
178354
+ 200: {
178355
+ headers: {
178356
+ [name: string]: unknown;
178357
+ };
178358
+ content: {
178359
+ "application/json": {
178360
+ clicks: number;
178361
+ received: number;
178362
+ stored: number;
178363
+ suspected: number;
178364
+ };
178365
+ };
178366
+ };
178367
+ 401: components["responses"]["Unauthorized"];
178368
+ 422: components["responses"]["UnprocessableEntity"];
178369
+ 429: components["responses"]["TooManyRequests"];
178370
+ };
178371
+ };
178372
+ adsWordPressHeartbeat: {
178373
+ parameters: {
178374
+ query?: never;
178375
+ header?: never;
178376
+ path?: never;
178377
+ cookie?: never;
178378
+ };
178379
+ requestBody?: {
178380
+ content: {
178381
+ "application/json": {
178382
+ cloudflare?: boolean;
178383
+ /** @enum {string} */
178384
+ mode?: "browser" | "zaraz";
178385
+ /** @description {"YYYY-MM-DD": paid orders queued for the server-side upload} */
178386
+ orders_reported?: {
178387
+ [key: string]: number;
178388
+ };
178389
+ plugin_version?: string;
178390
+ wp_version?: string;
178391
+ /** @description {"YYYY-MM-DD": of those, withheld because the visitor declined ad cookies} */
178392
+ zaraz_declined?: {
178393
+ [key: string]: number;
178394
+ };
178395
+ /** @description {"YYYY-MM-DD": of those, handed to Zaraz in the browser} */
178396
+ zaraz_delivered?: {
178397
+ [key: string]: number;
178398
+ };
178399
+ /** @description {"YYYY-MM-DD": purchases sent through Zaraz that day} */
178400
+ zaraz_sent?: {
178401
+ [key: string]: number;
178402
+ };
178403
+ };
178404
+ };
178405
+ };
178406
+ responses: {
178407
+ /** @description The site's config. */
178408
+ 200: {
178409
+ headers: {
178410
+ [name: string]: unknown;
178411
+ };
178412
+ content: {
178413
+ "application/json": components["schemas"]["AdsWordPressConfig"];
178414
+ };
178415
+ };
178416
+ 401: components["responses"]["Unauthorized"];
178417
+ 429: components["responses"]["TooManyRequests"];
178418
+ };
178419
+ };
178420
+ sendAdsWordPressOutcomes: {
178421
+ parameters: {
178422
+ query?: never;
178423
+ header?: never;
178424
+ path?: never;
178425
+ cookie?: never;
178426
+ };
178427
+ requestBody: {
178428
+ content: {
178429
+ "application/json": {
178430
+ outcomes: components["schemas"]["AdsOutcomeIn"][];
178431
+ };
178432
+ };
178433
+ };
178434
+ responses: {
178435
+ /** @description Nothing new (every outcome was already stored). */
178436
+ 200: {
178437
+ headers: {
178438
+ [name: string]: unknown;
178439
+ };
178440
+ content: {
178441
+ "application/json": components["schemas"]["AdsOutcomesIngested"];
178442
+ };
178443
+ };
178444
+ /** @description At least one outcome stored. */
178445
+ 201: {
178446
+ headers: {
178447
+ [name: string]: unknown;
178448
+ };
178449
+ content: {
178450
+ "application/json": components["schemas"]["AdsOutcomesIngested"];
178451
+ };
178452
+ };
178453
+ 401: components["responses"]["Unauthorized"];
178454
+ 422: components["responses"]["UnprocessableEntity"];
178455
+ 429: components["responses"]["TooManyRequests"];
178456
+ };
178457
+ };
178458
+ sendAdsWordPressRefunds: {
178459
+ parameters: {
178460
+ query?: never;
178461
+ header?: never;
178462
+ path?: never;
178463
+ cookie?: never;
178464
+ };
178465
+ requestBody: {
178466
+ content: {
178467
+ "application/json": {
178468
+ refunds: {
178469
+ /** @description Required with refunded_minor. */
178470
+ currency?: string;
178471
+ external_ref: string;
178472
+ /** @enum {string} */
178473
+ kind: "purchase" | "trial";
178474
+ /** @description Refunded so far, in minor units (refunded in part). Absent, or a total reaching the order's value in the same currency = withdrawn in full. */
178475
+ refunded_minor?: number;
178476
+ }[];
178477
+ };
178478
+ };
178479
+ };
178480
+ responses: {
178481
+ /** @description What was done, summed over the organisation's ad accounts. */
178482
+ 200: {
178483
+ headers: {
178484
+ [name: string]: unknown;
178485
+ };
178486
+ content: {
178487
+ "application/json": {
178488
+ already: number;
178489
+ not_found: number;
178490
+ restated: number;
178491
+ retracted: number;
178492
+ };
178493
+ };
178494
+ };
178495
+ 401: components["responses"]["Unauthorized"];
178496
+ 422: components["responses"]["UnprocessableEntity"];
178497
+ 429: components["responses"]["TooManyRequests"];
178498
+ };
178499
+ };
178500
+ disconnectAdsWordPressSelf: {
178501
+ parameters: {
178502
+ query?: never;
178503
+ header?: never;
178504
+ path?: never;
178505
+ cookie?: never;
178506
+ };
178507
+ requestBody?: never;
178508
+ responses: {
178509
+ /** @description Disconnected. */
178510
+ 204: {
178511
+ headers: {
178512
+ [name: string]: unknown;
178513
+ };
178514
+ content?: never;
178515
+ };
178516
+ 401: components["responses"]["Unauthorized"];
178517
+ 429: components["responses"]["TooManyRequests"];
178518
+ };
178519
+ };
177565
178520
  getAdsCallPoolNumber: {
177566
178521
  parameters: {
177567
178522
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1419",
3
+ "version": "0.1.1420",
4
4
  "description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
5
5
  "license": "MIT",
6
6
  "author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",