@zinn-digital/sdk 0.1.1452 → 0.1.1454

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.
@@ -16023,7 +16023,7 @@ export interface paths {
16023
16023
  cookie?: never;
16024
16024
  };
16025
16025
  /**
16026
- * Zinn® Ads analytics leaderboard by network, account, campaign, country or product/site (za-280).
16026
+ * Zinn® Ads analytics leaderboard by network, account, campaign, country, device or product/site (za-280, za-282).
16027
16027
  * @description Rows sorted by spend, paged with `offset` and `limit` (`total` counts every row), each with its comparison figures and a spend sparkline. Gated on `ads.view` over the organisations the person can view; `org_id` narrows to that organisation and its client organisations. Stored rows only (the daily audit's figures), never a network call. Money is integer micros of the reporting `currency`: each account's currency is converted at the CURRENT stored rate, named in `fx`; a currency with no rate is left out of the blended figures and listed in `unconverted`. Conversions are thousandths; ROAS, CTR and conversion rate are basis points; CPA and CPC are micros; a ratio with no denominator is null (za-280).
16028
16028
  */
16029
16029
  get: operations["getAdsAnalyticsBreakdown"];
@@ -20943,7 +20943,7 @@ export interface paths {
20943
20943
  post?: never;
20944
20944
  /**
20945
20945
  * Remove a site tag; its script answers 404 from then on.
20946
- * @description Gated on `ads.manage`; audit-logged (`ads.site_tag_deleted`).
20946
+ * @description Gated on `ads.manage`; audit-logged (`ads.site_tag_deleted`). A first-party setup (za-123) is removed first, as `DELETE …/first-party` does; a temporary Cloudflare failure refuses the delete (503) so nothing is left on the customer's account.
20947
20947
  */
20948
20948
  delete: operations["deleteAdsSiteTag"];
20949
20949
  options?: never;
@@ -20951,6 +20951,58 @@ export interface paths {
20951
20951
  patch?: never;
20952
20952
  trace?: never;
20953
20953
  };
20954
+ "/v1/ads/site-tags/{tag_id}/first-party": {
20955
+ parameters: {
20956
+ query?: never;
20957
+ header?: never;
20958
+ path: {
20959
+ tag_id: string;
20960
+ };
20961
+ cookie?: never;
20962
+ };
20963
+ /**
20964
+ * First-party tracking for this site on the customer's own Cloudflare (za-123).
20965
+ * @description Gated on `ads.view` (docs/1006 §105). `status` is `off` until a token is connected, then `ok`, `needs_token` (the customer must fix the token or zone) or `failed` (`last_error`). `snippet` is the first-party install: the universal script from `/ztag/{public_key}.js` on the site's own host. Never returns the token: `token_hint` is its last four characters.
20966
+ */
20967
+ get: operations["getAdsSiteTagFirstParty"];
20968
+ /**
20969
+ * Deploy first-party tracking with the customer's own Cloudflare API token.
20970
+ * @description Gated on `ads.manage`; audit-logged (`ads.first_party_connected`, zone and route only). The token (Zone Read, Workers Scripts Edit, Workers Routes Edit) is checked by using it: one Worker `zinn-ads-<id>` is uploaded to the account of the site's zone and routed on `<site_host>/ztag/*` only. It serves the site's universal script and passes Google's tag gateway through, so gtag.js and its hits are same-origin; Consent Mode v2 defaults are still set before any tag loads. No HTML, DNS or zone setting is changed. The token is kept only in Vault; sending a new one replaces it and destroys the old one. Refusals: `refusal.adsconnect.firstParty.*` (`badToken`, `tokenRejected`, `permissionMissing`, `zoneNotFound` 422; `rateLimited`, `unavailable`, `vaultUnavailable` 503).
20971
+ */
20972
+ put: operations["connectAdsSiteTagFirstParty"];
20973
+ post?: never;
20974
+ /**
20975
+ * Remove the first-party route, Worker and stored token.
20976
+ * @description Gated on `ads.manage`; audit-logged (`ads.first_party_removed`). `removed_at_edge` is false when the stored token no longer works: our record and token are gone, and the customer deletes the `zinn-ads-…` Worker in their Cloudflare dashboard. A temporary Cloudflare failure changes nothing (503) so the call can be retried. 204 when there was nothing to remove.
20977
+ */
20978
+ delete: operations["deleteAdsSiteTagFirstParty"];
20979
+ options?: never;
20980
+ head?: never;
20981
+ patch?: never;
20982
+ trace?: never;
20983
+ };
20984
+ "/v1/ads/site-tags/{tag_id}/first-party/check": {
20985
+ parameters: {
20986
+ query?: never;
20987
+ header?: never;
20988
+ path: {
20989
+ tag_id: string;
20990
+ };
20991
+ cookie?: never;
20992
+ };
20993
+ get?: never;
20994
+ put?: never;
20995
+ /**
20996
+ * Ask Cloudflare whether the first-party route still serves this site.
20997
+ * @description Gated on `ads.manage` (docs/1006 §105). Records `ok`, `failed` (`routeMissing`: the route was removed or repointed) or `needs_token`; a temporary Cloudflare failure keeps the previous status. The served script uses the first-party path only while `ok`.
20998
+ */
20999
+ post: operations["checkAdsSiteTagFirstParty"];
21000
+ delete?: never;
21001
+ options?: never;
21002
+ head?: never;
21003
+ patch?: never;
21004
+ trace?: never;
21005
+ };
20954
21006
  "/v1/ads/site-tags/{tag_id}/gtm-container": {
20955
21007
  parameters: {
20956
21008
  query?: never;
@@ -63093,7 +63145,7 @@ export interface components {
63093
63145
  };
63094
63146
  AdsAnalyticsBreakdown: components["schemas"]["AdsAnalyticsFrame"] & {
63095
63147
  /** @enum {string} */
63096
- by: "network" | "connection" | "campaign" | "country" | "offering";
63148
+ by: "network" | "connection" | "campaign" | "country" | "device" | "offering";
63097
63149
  limit: number;
63098
63150
  offset: number;
63099
63151
  rows: components["schemas"]["AdsAnalyticsRow"][];
@@ -63272,6 +63324,11 @@ export interface components {
63272
63324
  connection_id?: string;
63273
63325
  country?: string;
63274
63326
  currencies: string[];
63327
+ /**
63328
+ * @description za-282: the device of a `by=device` row.
63329
+ * @enum {string}
63330
+ */
63331
+ device?: "mobile" | "desktop" | "tablet" | "tv" | "other";
63275
63332
  key: string;
63276
63333
  kind?: string;
63277
63334
  label: string;
@@ -67706,6 +67763,26 @@ export interface components {
67706
67763
  */
67707
67764
  org_id?: string;
67708
67765
  };
67766
+ AdsSiteTagFirstParty: {
67767
+ /** Format: date-time */
67768
+ checked_at?: string | null;
67769
+ /** @description An error code: tokenRejected, permissionMissing, zoneNotFound, rateLimited, unavailable or routeMissing; empty when ok. */
67770
+ last_error?: string;
67771
+ /** @description The path on the site host: /ztag. */
67772
+ path: string;
67773
+ provider?: string;
67774
+ route_pattern: string;
67775
+ script_name?: string;
67776
+ snippet: string;
67777
+ /** @enum {string} */
67778
+ status: "off" | "ok" | "needs_token" | "failed";
67779
+ /** @description The token's last four characters */
67780
+ token_hint?: string;
67781
+ zone_name?: string;
67782
+ };
67783
+ AdsSiteTagFirstPartyConnect: {
67784
+ token: string;
67785
+ };
67709
67786
  AdsSiteTagInstall: {
67710
67787
  conversion_example: string;
67711
67788
  data_layer_example: string;
@@ -112234,6 +112311,8 @@ export interface components {
112234
112311
  AdsAnalyticsCountry: string;
112235
112312
  /** @description Reporting currency (ISO 4217). Default the one currency in play, else the organisation's. */
112236
112313
  AdsAnalyticsCurrency: string;
112314
+ /** @description Comma-separated devices: `mobile`, `desktop`, `tablet`, `tv`, `other` (za-282). Reads the device-level figures (Google Ads accounts, campaign grain). No stored level is split by both country and device, so `device` with `country` is refused (422, field `device`). */
112315
+ AdsAnalyticsDevice: string;
112237
112316
  AdsAnalyticsFrom: string;
112238
112317
  /** @description Bucket size. Default day up to 92 days, week up to 366, month beyond. */
112239
112318
  AdsAnalyticsGrain: "day" | "week" | "month";
@@ -137597,7 +137676,7 @@ export interface operations {
137597
137676
  getAdsAnalyticsBreakdown: {
137598
137677
  parameters: {
137599
137678
  query?: {
137600
- by?: "network" | "connection" | "campaign" | "country" | "offering";
137679
+ by?: "network" | "connection" | "campaign" | "country" | "device" | "offering";
137601
137680
  /** @description Comma-separated `<connection_id>:<campaign_id>` tokens. */
137602
137681
  campaign?: components["parameters"]["AdsAnalyticsCampaign"];
137603
137682
  compare?: components["parameters"]["AdsAnalyticsCompare"];
@@ -137607,6 +137686,8 @@ export interface operations {
137607
137686
  country?: components["parameters"]["AdsAnalyticsCountry"];
137608
137687
  /** @description Reporting currency (ISO 4217). Default the one currency in play, else the organisation's. */
137609
137688
  currency?: components["parameters"]["AdsAnalyticsCurrency"];
137689
+ /** @description Comma-separated devices: `mobile`, `desktop`, `tablet`, `tv`, `other` (za-282). Reads the device-level figures (Google Ads accounts, campaign grain). No stored level is split by both country and device, so `device` with `country` is refused (422, field `device`). */
137690
+ device?: components["parameters"]["AdsAnalyticsDevice"];
137610
137691
  from?: components["parameters"]["AdsAnalyticsFrom"];
137611
137692
  /** @description Bucket size. Default day up to 92 days, week up to 366, month beyond. */
137612
137693
  grain?: components["parameters"]["AdsAnalyticsGrain"];
@@ -137657,6 +137738,8 @@ export interface operations {
137657
137738
  country?: components["parameters"]["AdsAnalyticsCountry"];
137658
137739
  /** @description Reporting currency (ISO 4217). Default the one currency in play, else the organisation's. */
137659
137740
  currency?: components["parameters"]["AdsAnalyticsCurrency"];
137741
+ /** @description Comma-separated devices: `mobile`, `desktop`, `tablet`, `tv`, `other` (za-282). Reads the device-level figures (Google Ads accounts, campaign grain). No stored level is split by both country and device, so `device` with `country` is refused (422, field `device`). */
137742
+ device?: components["parameters"]["AdsAnalyticsDevice"];
137660
137743
  from?: components["parameters"]["AdsAnalyticsFrom"];
137661
137744
  /** @description Bucket size. Default day up to 92 days, week up to 366, month beyond. */
137662
137745
  grain?: components["parameters"]["AdsAnalyticsGrain"];
@@ -137705,6 +137788,8 @@ export interface operations {
137705
137788
  country?: components["parameters"]["AdsAnalyticsCountry"];
137706
137789
  /** @description Reporting currency (ISO 4217). Default the one currency in play, else the organisation's. */
137707
137790
  currency?: components["parameters"]["AdsAnalyticsCurrency"];
137791
+ /** @description Comma-separated devices: `mobile`, `desktop`, `tablet`, `tv`, `other` (za-282). Reads the device-level figures (Google Ads accounts, campaign grain). No stored level is split by both country and device, so `device` with `country` is refused (422, field `device`). */
137792
+ device?: components["parameters"]["AdsAnalyticsDevice"];
137708
137793
  from?: components["parameters"]["AdsAnalyticsFrom"];
137709
137794
  /** @description Bucket size. Default day up to 92 days, week up to 366, month beyond. */
137710
137795
  grain?: components["parameters"]["AdsAnalyticsGrain"];
@@ -137753,6 +137838,8 @@ export interface operations {
137753
137838
  country?: components["parameters"]["AdsAnalyticsCountry"];
137754
137839
  /** @description Reporting currency (ISO 4217). Default the one currency in play, else the organisation's. */
137755
137840
  currency?: components["parameters"]["AdsAnalyticsCurrency"];
137841
+ /** @description Comma-separated devices: `mobile`, `desktop`, `tablet`, `tv`, `other` (za-282). Reads the device-level figures (Google Ads accounts, campaign grain). No stored level is split by both country and device, so `device` with `country` is refused (422, field `device`). */
137842
+ device?: components["parameters"]["AdsAnalyticsDevice"];
137756
137843
  from?: components["parameters"]["AdsAnalyticsFrom"];
137757
137844
  /** @description Bucket size. Default day up to 92 days, week up to 366, month beyond. */
137758
137845
  grain?: components["parameters"]["AdsAnalyticsGrain"];
@@ -147063,6 +147150,124 @@ export interface operations {
147063
147150
  401: components["responses"]["Unauthorized"];
147064
147151
  403: components["responses"]["Forbidden"];
147065
147152
  404: components["responses"]["NotFound"];
147153
+ 503: components["responses"]["ServiceUnavailable"];
147154
+ };
147155
+ };
147156
+ getAdsSiteTagFirstParty: {
147157
+ parameters: {
147158
+ query?: never;
147159
+ header?: never;
147160
+ path: {
147161
+ tag_id: string;
147162
+ };
147163
+ cookie?: never;
147164
+ };
147165
+ requestBody?: never;
147166
+ responses: {
147167
+ /** @description The first-party setup. */
147168
+ 200: {
147169
+ headers: {
147170
+ [name: string]: unknown;
147171
+ };
147172
+ content: {
147173
+ "application/json": components["schemas"]["AdsSiteTagFirstParty"];
147174
+ };
147175
+ };
147176
+ 401: components["responses"]["Unauthorized"];
147177
+ 403: components["responses"]["Forbidden"];
147178
+ 404: components["responses"]["NotFound"];
147179
+ };
147180
+ };
147181
+ connectAdsSiteTagFirstParty: {
147182
+ parameters: {
147183
+ query?: never;
147184
+ header?: never;
147185
+ path: {
147186
+ tag_id: string;
147187
+ };
147188
+ cookie?: never;
147189
+ };
147190
+ requestBody: {
147191
+ content: {
147192
+ "application/json": components["schemas"]["AdsSiteTagFirstPartyConnect"];
147193
+ };
147194
+ };
147195
+ responses: {
147196
+ /** @description Deployed. */
147197
+ 200: {
147198
+ headers: {
147199
+ [name: string]: unknown;
147200
+ };
147201
+ content: {
147202
+ "application/json": components["schemas"]["AdsSiteTagFirstParty"];
147203
+ };
147204
+ };
147205
+ 401: components["responses"]["Unauthorized"];
147206
+ 403: components["responses"]["Forbidden"];
147207
+ 404: components["responses"]["NotFound"];
147208
+ 422: components["responses"]["UnprocessableEntity"];
147209
+ 503: components["responses"]["ServiceUnavailable"];
147210
+ };
147211
+ };
147212
+ deleteAdsSiteTagFirstParty: {
147213
+ parameters: {
147214
+ query?: never;
147215
+ header?: never;
147216
+ path: {
147217
+ tag_id: string;
147218
+ };
147219
+ cookie?: never;
147220
+ };
147221
+ requestBody?: never;
147222
+ responses: {
147223
+ /** @description Removed. */
147224
+ 200: {
147225
+ headers: {
147226
+ [name: string]: unknown;
147227
+ };
147228
+ content: {
147229
+ "application/json": {
147230
+ removed_at_edge: boolean;
147231
+ };
147232
+ };
147233
+ };
147234
+ /** @description Nothing to remove. */
147235
+ 204: {
147236
+ headers: {
147237
+ [name: string]: unknown;
147238
+ };
147239
+ content?: never;
147240
+ };
147241
+ 401: components["responses"]["Unauthorized"];
147242
+ 403: components["responses"]["Forbidden"];
147243
+ 404: components["responses"]["NotFound"];
147244
+ 503: components["responses"]["ServiceUnavailable"];
147245
+ };
147246
+ };
147247
+ checkAdsSiteTagFirstParty: {
147248
+ parameters: {
147249
+ query?: never;
147250
+ header?: never;
147251
+ path: {
147252
+ tag_id: string;
147253
+ };
147254
+ cookie?: never;
147255
+ };
147256
+ requestBody?: never;
147257
+ responses: {
147258
+ /** @description The first-party setup after the check. */
147259
+ 200: {
147260
+ headers: {
147261
+ [name: string]: unknown;
147262
+ };
147263
+ content: {
147264
+ "application/json": components["schemas"]["AdsSiteTagFirstParty"];
147265
+ };
147266
+ };
147267
+ 401: components["responses"]["Unauthorized"];
147268
+ 403: components["responses"]["Forbidden"];
147269
+ 404: components["responses"]["NotFound"];
147270
+ 503: components["responses"]["ServiceUnavailable"];
147066
147271
  };
147067
147272
  };
147068
147273
  getAdsSiteTagGtmContainer: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1452",
3
+ "version": "0.1.1454",
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>",