@zinn-digital/sdk 0.1.1506 → 0.1.1509

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.
@@ -21664,6 +21664,90 @@ export interface paths {
21664
21664
  patch?: never;
21665
21665
  trace?: never;
21666
21666
  };
21667
+ "/v1/ads/zaraz/connections": {
21668
+ parameters: {
21669
+ query?: never;
21670
+ header?: never;
21671
+ path?: never;
21672
+ cookie?: never;
21673
+ };
21674
+ /**
21675
+ * The organisation's Cloudflare zones connected for Zaraz.
21676
+ * @description za-131 (docs/1006 §88). Gated on `ads.view`. Our own rows; no Cloudflare call.
21677
+ */
21678
+ get: operations["listAdsZarazConnections"];
21679
+ put?: never;
21680
+ /**
21681
+ * Connect one Cloudflare zone for Zaraz with a scoped token.
21682
+ * @description za-131 (docs/1006 §88). Gated on `ads.manage`; audit action `ads.zaraz_connect`. The token must reach the zone and be able to READ and EDIT Zaraz on it (proved by reading the zone's Zaraz workflow, then a config PUT whose body can never be a config — Cloudflare answers 400 to a token with Zaraz Edit and 403 without; nothing is written). The token goes to Vault (`secret/orgs/<org>/ads/zaraz/<id>`) before the row is saved and is never stored in the database or returned. Connecting a zone again replaces its token. Refusals: `refusal.adsconnect.zaraz.<code>` — `tokenShape`, `tokenRejected`, `permissionMissing`, `zoneNotFound`, `rateLimited`, `unavailable`, `unexpected`, `vaultUnavailable`.
21683
+ */
21684
+ post: operations["createAdsZarazConnection"];
21685
+ delete?: never;
21686
+ options?: never;
21687
+ head?: never;
21688
+ patch?: never;
21689
+ trace?: never;
21690
+ };
21691
+ "/v1/ads/zaraz/connections/{connection_id}": {
21692
+ parameters: {
21693
+ query?: never;
21694
+ header?: never;
21695
+ path?: never;
21696
+ cookie?: never;
21697
+ };
21698
+ get?: never;
21699
+ put?: never;
21700
+ post?: never;
21701
+ /**
21702
+ * Disconnect a Cloudflare zone (the stored token is deleted from Vault).
21703
+ * @description za-131 (docs/1006 §88). Gated on `ads.manage`; audit action `ads.zaraz_disconnect`. Nothing on the zone is changed. A Vault failure refuses with `vaultUnavailable` and keeps the row.
21704
+ */
21705
+ delete: operations["deleteAdsZarazConnection"];
21706
+ options?: never;
21707
+ head?: never;
21708
+ patch?: never;
21709
+ trace?: never;
21710
+ };
21711
+ "/v1/ads/zaraz/connections/{connection_id}/check": {
21712
+ parameters: {
21713
+ query?: never;
21714
+ header?: never;
21715
+ path?: never;
21716
+ cookie?: never;
21717
+ };
21718
+ get?: never;
21719
+ put?: never;
21720
+ /**
21721
+ * Re-prove the stored token can read and edit Zaraz on the zone.
21722
+ * @description za-131 (docs/1006 §88). Gated on `ads.manage`; audit action `ads.zaraz_check`. A token Cloudflare refuses sets `status: needs_token`; a rate limit or an outage is reported in `last_error` and leaves the status as it was. Answers 200 either way.
21723
+ */
21724
+ post: operations["checkAdsZarazConnection"];
21725
+ delete?: never;
21726
+ options?: never;
21727
+ head?: never;
21728
+ patch?: never;
21729
+ trace?: never;
21730
+ };
21731
+ "/v1/ads/zaraz/zones": {
21732
+ parameters: {
21733
+ query?: never;
21734
+ header?: never;
21735
+ path?: never;
21736
+ cookie?: never;
21737
+ };
21738
+ get?: never;
21739
+ put?: never;
21740
+ /**
21741
+ * The Cloudflare zones a pasted Zaraz token can reach (the zone picker).
21742
+ * @description za-131 (docs/1006 §88). Gated on `ads.manage`. The customer's scoped Cloudflare API token (Zone Read + Zaraz Edit) is used for this one call and NOT stored; it is never echoed back. Every page of zones is read. A refusal carries `refusal.adsconnect.zaraz.<code>`: `tokenShape`, `tokenRejected`, `rateLimited`, `unavailable` (Cloudflare answered 5xx), `unexpected` (our side failed or Cloudflare's answer was not understood; names no vendor).
21743
+ */
21744
+ post: operations["listAdsZarazZones"];
21745
+ delete?: never;
21746
+ options?: never;
21747
+ head?: never;
21748
+ patch?: never;
21749
+ trace?: never;
21750
+ };
21667
21751
  "/v1/affiliate": {
21668
21752
  parameters: {
21669
21753
  query?: never;
@@ -67004,6 +67088,8 @@ export interface components {
67004
67088
  paying_accounts: number;
67005
67089
  signups: number;
67006
67090
  trials: number;
67091
+ /** @description Landing-page visits from links carrying this utm_source (whole UTC days, read from the edge; real browsers only, our own checks left out). Zero for sources the edge read does not cover (only configured ad sources are read). BHWDAILY. */
67092
+ visits: number;
67007
67093
  };
67008
67094
  AdSourcesReport: {
67009
67095
  configured: {
@@ -67048,6 +67134,8 @@ export interface components {
67048
67134
  source_label: string;
67049
67135
  trial_to_paid_bp: number;
67050
67136
  trials: number;
67137
+ /** @description Landing-page visits from links carrying this utm_source (whole UTC days, read from the edge; real browsers only, our own checks left out). Zero for sources the edge read does not cover (only configured ad sources are read). BHWDAILY. */
67138
+ visits: number;
67051
67139
  };
67052
67140
  AdSourcesSource: {
67053
67141
  /** Format: int64 */
@@ -67063,6 +67151,8 @@ export interface components {
67063
67151
  source_label: string;
67064
67152
  trial_to_paid_bp: number;
67065
67153
  trials: number;
67154
+ /** @description Landing-page visits from links carrying this utm_source (whole UTC days, read from the edge; real browsers only, our own checks left out). Zero for sources the edge read does not cover (only configured ad sources are read). BHWDAILY. */
67155
+ visits: number;
67066
67156
  };
67067
67157
  AdsOutcome: {
67068
67158
  /** @description Masked to a prefix. */
@@ -68902,7 +68992,7 @@ export interface components {
68902
68992
  AdsSiteTagFirstParty: {
68903
68993
  /** Format: date-time */
68904
68994
  checked_at?: string | null;
68905
- /** @description An error code: tokenRejected, permissionMissing, zoneNotFound, rateLimited, unavailable or routeMissing; empty when ok. */
68995
+ /** @description An error code: tokenRejected, permissionMissing, zoneNotFound, rateLimited, unavailable, unexpected or routeMissing; empty when ok. */
68906
68996
  last_error?: string;
68907
68997
  /** @description The path on the site host: /ztag. */
68908
68998
  path: string;
@@ -69632,6 +69722,38 @@ export interface components {
69632
69722
  /** Format: int64 */
69633
69723
  total_budget_micros: number | null;
69634
69724
  };
69725
+ /** @description A Cloudflare zone connected for Zaraz (za-131). The token is in Vault, never here; `token_hint` is its last four characters. */
69726
+ AdsZarazConnection: {
69727
+ account_name: string;
69728
+ /** Format: date-time */
69729
+ connected_at: string;
69730
+ /** Format: uuid */
69731
+ id: string;
69732
+ /** Format: date-time */
69733
+ last_checked_at: string | null;
69734
+ /** @description The last check's refusal code (empty when it passed). */
69735
+ last_error: string;
69736
+ /** Format: uuid */
69737
+ org_id: string;
69738
+ /** @enum {string} */
69739
+ provider: "cloudflare";
69740
+ /** @enum {string} */
69741
+ status: "ok" | "needs_token";
69742
+ token_hint: string;
69743
+ /** @description Zaraz's publishing workflow on the zone as last read: realtime or preview. */
69744
+ workflow: string;
69745
+ zone_id: string;
69746
+ zone_name: string;
69747
+ };
69748
+ /** @description One Cloudflare zone a Zaraz token reaches (za-131). */
69749
+ AdsZarazZone: {
69750
+ account_id: string;
69751
+ account_name: string;
69752
+ /** @description Cloudflare's zone status (active, pending, …). */
69753
+ status: string;
69754
+ zone_id: string;
69755
+ zone_name: string;
69756
+ };
69635
69757
  AffiliateAccount: {
69636
69758
  /** Format: date-time */
69637
69759
  applied_at?: string;
@@ -149982,6 +150104,161 @@ export interface operations {
149982
150104
  429: components["responses"]["TooManyRequests"];
149983
150105
  };
149984
150106
  };
150107
+ listAdsZarazConnections: {
150108
+ parameters: {
150109
+ query?: {
150110
+ org_id?: string;
150111
+ };
150112
+ header?: never;
150113
+ path?: never;
150114
+ cookie?: never;
150115
+ };
150116
+ requestBody?: never;
150117
+ responses: {
150118
+ /** @description The connections. */
150119
+ 200: {
150120
+ headers: {
150121
+ [name: string]: unknown;
150122
+ };
150123
+ content: {
150124
+ "application/json": {
150125
+ data: components["schemas"]["AdsZarazConnection"][];
150126
+ };
150127
+ };
150128
+ };
150129
+ 401: components["responses"]["Unauthorized"];
150130
+ 403: components["responses"]["Forbidden"];
150131
+ 429: components["responses"]["TooManyRequests"];
150132
+ };
150133
+ };
150134
+ createAdsZarazConnection: {
150135
+ parameters: {
150136
+ query?: never;
150137
+ header?: never;
150138
+ path?: never;
150139
+ cookie?: never;
150140
+ };
150141
+ requestBody: {
150142
+ content: {
150143
+ "application/json": {
150144
+ /** Format: uuid */
150145
+ org_id?: string;
150146
+ token: string;
150147
+ zone_id: string;
150148
+ };
150149
+ };
150150
+ };
150151
+ responses: {
150152
+ /** @description The connection. */
150153
+ 201: {
150154
+ headers: {
150155
+ [name: string]: unknown;
150156
+ };
150157
+ content: {
150158
+ "application/json": {
150159
+ data: components["schemas"]["AdsZarazConnection"];
150160
+ };
150161
+ };
150162
+ };
150163
+ 401: components["responses"]["Unauthorized"];
150164
+ 403: components["responses"]["Forbidden"];
150165
+ 404: components["responses"]["NotFound"];
150166
+ 422: components["responses"]["UnprocessableEntity"];
150167
+ 429: components["responses"]["TooManyRequests"];
150168
+ };
150169
+ };
150170
+ deleteAdsZarazConnection: {
150171
+ parameters: {
150172
+ query?: {
150173
+ org_id?: string;
150174
+ };
150175
+ header?: never;
150176
+ path: {
150177
+ connection_id: string;
150178
+ };
150179
+ cookie?: never;
150180
+ };
150181
+ requestBody?: never;
150182
+ responses: {
150183
+ /** @description Disconnected. */
150184
+ 204: {
150185
+ headers: {
150186
+ [name: string]: unknown;
150187
+ };
150188
+ content?: never;
150189
+ };
150190
+ 401: components["responses"]["Unauthorized"];
150191
+ 403: components["responses"]["Forbidden"];
150192
+ 404: components["responses"]["NotFound"];
150193
+ 422: components["responses"]["UnprocessableEntity"];
150194
+ 429: components["responses"]["TooManyRequests"];
150195
+ };
150196
+ };
150197
+ checkAdsZarazConnection: {
150198
+ parameters: {
150199
+ query?: {
150200
+ org_id?: string;
150201
+ };
150202
+ header?: never;
150203
+ path: {
150204
+ connection_id: string;
150205
+ };
150206
+ cookie?: never;
150207
+ };
150208
+ requestBody?: never;
150209
+ responses: {
150210
+ /** @description The connection after the check. */
150211
+ 200: {
150212
+ headers: {
150213
+ [name: string]: unknown;
150214
+ };
150215
+ content: {
150216
+ "application/json": {
150217
+ data: components["schemas"]["AdsZarazConnection"];
150218
+ };
150219
+ };
150220
+ };
150221
+ 401: components["responses"]["Unauthorized"];
150222
+ 403: components["responses"]["Forbidden"];
150223
+ 404: components["responses"]["NotFound"];
150224
+ 429: components["responses"]["TooManyRequests"];
150225
+ };
150226
+ };
150227
+ listAdsZarazZones: {
150228
+ parameters: {
150229
+ query?: never;
150230
+ header?: never;
150231
+ path?: never;
150232
+ cookie?: never;
150233
+ };
150234
+ requestBody: {
150235
+ content: {
150236
+ "application/json": {
150237
+ /** Format: uuid */
150238
+ org_id?: string;
150239
+ token: string;
150240
+ };
150241
+ };
150242
+ };
150243
+ responses: {
150244
+ /** @description The zones, by name. */
150245
+ 200: {
150246
+ headers: {
150247
+ [name: string]: unknown;
150248
+ };
150249
+ content: {
150250
+ "application/json": {
150251
+ data: components["schemas"]["AdsZarazZone"][];
150252
+ };
150253
+ };
150254
+ };
150255
+ 401: components["responses"]["Unauthorized"];
150256
+ 403: components["responses"]["Forbidden"];
150257
+ 404: components["responses"]["NotFound"];
150258
+ 422: components["responses"]["UnprocessableEntity"];
150259
+ 429: components["responses"]["TooManyRequests"];
150260
+ };
150261
+ };
149985
150262
  getAffiliateAccount: {
149986
150263
  parameters: {
149987
150264
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1506",
3
+ "version": "0.1.1509",
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>",