@zinn-digital/sdk 0.1.1504 → 0.1.1508
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/schema.d.ts +278 -5
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -58061,7 +58145,7 @@ export interface components {
|
|
|
58061
58145
|
* @description The org to record against; optional when the caller owns exactly one.
|
|
58062
58146
|
*/
|
|
58063
58147
|
org_id?: string;
|
|
58064
|
-
/** @description Captured on landing. Kept keys: utm_source, utm_medium, utm_campaign, utm_term, utm_content, gclid, fbclid, ttclid, msclkid, ref, zd_vid, referrer_host, landing_page, and entry (only the value `direct`). Others are dropped. */
|
|
58148
|
+
/** @description Captured on landing. Kept keys: utm_source, utm_medium, utm_campaign, utm_term, utm_content, gclid, gbraid, wbraid, fbclid, ttclid, msclkid, twclid (a malformed twclid is dropped), ref, zd_vid, referrer_host, landing_page, and entry (only the value `direct`). Others are dropped. */
|
|
58065
58149
|
touch: {
|
|
58066
58150
|
[key: string]: string;
|
|
58067
58151
|
};
|
|
@@ -59473,7 +59557,7 @@ export interface components {
|
|
|
59473
59557
|
subscriptions?: components["schemas"]["Subscription"][];
|
|
59474
59558
|
tickets: components["schemas"]["AdminTicket"][];
|
|
59475
59559
|
};
|
|
59476
|
-
/** @description Where the customer came from (BHWTRACK, 2026-11-03): the FIRST touch, written once and never overwritten (what brought them to us), and the LAST touch, replaced on every recorded campaign visit (what brought them back to buy). Each touch is the allow-listed set the attribution capture keeps - `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, the click ids (`gclid`, `gbraid`, `wbraid`, `fbclid`, `ttclid`, `msclkid`), `ref`, `landing_page` (host + path), `referrer_host`, `zd_vid`, `entry`. An empty object with a null time means no touch was recorded (an account created by staff, a partner or an import), which is not the same as a direct visit. */
|
|
59560
|
+
/** @description Where the customer came from (BHWTRACK, 2026-11-03): the FIRST touch, written once and never overwritten (what brought them to us), and the LAST touch, replaced on every recorded campaign visit (what brought them back to buy). Each touch is the allow-listed set the attribution capture keeps - `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, the click ids (`gclid`, `gbraid`, `wbraid`, `fbclid`, `ttclid`, `msclkid`, `twclid`), `ref`, `landing_page` (host + path), `referrer_host`, `zd_vid`, `entry`. An empty object with a null time means no touch was recorded (an account created by staff, a partner or an import), which is not the same as a direct visit. */
|
|
59477
59561
|
AdminCustomerAttribution: {
|
|
59478
59562
|
first: {
|
|
59479
59563
|
[key: string]: string;
|
|
@@ -67121,6 +67205,8 @@ export interface components {
|
|
|
67121
67205
|
referrer?: string;
|
|
67122
67206
|
/** @enum {string} */
|
|
67123
67207
|
source?: "store" | "plugin" | "crm" | "events";
|
|
67208
|
+
/** @description X's click id (za-302), uploaded to X's Conversion API. */
|
|
67209
|
+
twclid?: string;
|
|
67124
67210
|
/** @description Integer minor units. A `free_listing` carries none (omit it or send 0; a positive value is a 422). */
|
|
67125
67211
|
value_minor?: number | null;
|
|
67126
67212
|
wbraid?: string;
|
|
@@ -68900,7 +68986,7 @@ export interface components {
|
|
|
68900
68986
|
AdsSiteTagFirstParty: {
|
|
68901
68987
|
/** Format: date-time */
|
|
68902
68988
|
checked_at?: string | null;
|
|
68903
|
-
/** @description An error code: tokenRejected, permissionMissing, zoneNotFound, rateLimited, unavailable or routeMissing; empty when ok. */
|
|
68989
|
+
/** @description An error code: tokenRejected, permissionMissing, zoneNotFound, rateLimited, unavailable, unexpected or routeMissing; empty when ok. */
|
|
68904
68990
|
last_error?: string;
|
|
68905
68991
|
/** @description The path on the site host: /ztag. */
|
|
68906
68992
|
path: string;
|
|
@@ -69125,7 +69211,7 @@ export interface components {
|
|
|
69125
69211
|
day: string;
|
|
69126
69212
|
diagnoses: {
|
|
69127
69213
|
/** @enum {string} */
|
|
69128
|
-
code: "noSource" | "unreadable" | "lostClickIds" | "checkoutRoundTrip" | "offSiteOutcome" | "missingTag" | "noUploadAction" | "uploadActionNotPrimary" | "undercount" | "doubleCounting" | "providerGap";
|
|
69214
|
+
code: "noSource" | "unreadable" | "lostClickIds" | "checkoutRoundTrip" | "offSiteOutcome" | "missingTag" | "noUploadAction" | "uploadActionNotPrimary" | "uploadRequestRejected" | "uploadResponseUnreadable" | "undercount" | "doubleCounting" | "providerGap";
|
|
69129
69215
|
figures: {
|
|
69130
69216
|
[key: string]: unknown;
|
|
69131
69217
|
};
|
|
@@ -69630,6 +69716,38 @@ export interface components {
|
|
|
69630
69716
|
/** Format: int64 */
|
|
69631
69717
|
total_budget_micros: number | null;
|
|
69632
69718
|
};
|
|
69719
|
+
/** @description A Cloudflare zone connected for Zaraz (za-131). The token is in Vault, never here; `token_hint` is its last four characters. */
|
|
69720
|
+
AdsZarazConnection: {
|
|
69721
|
+
account_name: string;
|
|
69722
|
+
/** Format: date-time */
|
|
69723
|
+
connected_at: string;
|
|
69724
|
+
/** Format: uuid */
|
|
69725
|
+
id: string;
|
|
69726
|
+
/** Format: date-time */
|
|
69727
|
+
last_checked_at: string | null;
|
|
69728
|
+
/** @description The last check's refusal code (empty when it passed). */
|
|
69729
|
+
last_error: string;
|
|
69730
|
+
/** Format: uuid */
|
|
69731
|
+
org_id: string;
|
|
69732
|
+
/** @enum {string} */
|
|
69733
|
+
provider: "cloudflare";
|
|
69734
|
+
/** @enum {string} */
|
|
69735
|
+
status: "ok" | "needs_token";
|
|
69736
|
+
token_hint: string;
|
|
69737
|
+
/** @description Zaraz's publishing workflow on the zone as last read: realtime or preview. */
|
|
69738
|
+
workflow: string;
|
|
69739
|
+
zone_id: string;
|
|
69740
|
+
zone_name: string;
|
|
69741
|
+
};
|
|
69742
|
+
/** @description One Cloudflare zone a Zaraz token reaches (za-131). */
|
|
69743
|
+
AdsZarazZone: {
|
|
69744
|
+
account_id: string;
|
|
69745
|
+
account_name: string;
|
|
69746
|
+
/** @description Cloudflare's zone status (active, pending, …). */
|
|
69747
|
+
status: string;
|
|
69748
|
+
zone_id: string;
|
|
69749
|
+
zone_name: string;
|
|
69750
|
+
};
|
|
69633
69751
|
AffiliateAccount: {
|
|
69634
69752
|
/** Format: date-time */
|
|
69635
69753
|
applied_at?: string;
|
|
@@ -91810,7 +91928,7 @@ export interface components {
|
|
|
91810
91928
|
state: "active" | "pending_consent" | "revoked";
|
|
91811
91929
|
};
|
|
91812
91930
|
PartnerCustomerCreate: {
|
|
91813
|
-
/** @description Optional. Where YOU say this customer came from — your own first-party attribution: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `gclid`, `gbraid`, `wbraid`, `fbclid`, `msclkid`, `referrer_host`, `landing_page` (host + path). Unknown keys are dropped. Recorded once, as the first touch of an organization this call creates; it never replaces a source we already hold. */
|
|
91931
|
+
/** @description Optional. Where YOU say this customer came from — your own first-party attribution: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `gclid`, `gbraid`, `wbraid`, `fbclid`, `ttclid`, `msclkid`, `twclid`, `ref`, `referrer_host`, `landing_page` (host + path). Unknown keys are dropped. Recorded once, as the first touch of an organization this call creates; it never replaces a source we already hold. */
|
|
91814
91932
|
attribution?: {
|
|
91815
91933
|
[key: string]: string;
|
|
91816
91934
|
};
|
|
@@ -149980,6 +150098,161 @@ export interface operations {
|
|
|
149980
150098
|
429: components["responses"]["TooManyRequests"];
|
|
149981
150099
|
};
|
|
149982
150100
|
};
|
|
150101
|
+
listAdsZarazConnections: {
|
|
150102
|
+
parameters: {
|
|
150103
|
+
query?: {
|
|
150104
|
+
org_id?: string;
|
|
150105
|
+
};
|
|
150106
|
+
header?: never;
|
|
150107
|
+
path?: never;
|
|
150108
|
+
cookie?: never;
|
|
150109
|
+
};
|
|
150110
|
+
requestBody?: never;
|
|
150111
|
+
responses: {
|
|
150112
|
+
/** @description The connections. */
|
|
150113
|
+
200: {
|
|
150114
|
+
headers: {
|
|
150115
|
+
[name: string]: unknown;
|
|
150116
|
+
};
|
|
150117
|
+
content: {
|
|
150118
|
+
"application/json": {
|
|
150119
|
+
data: components["schemas"]["AdsZarazConnection"][];
|
|
150120
|
+
};
|
|
150121
|
+
};
|
|
150122
|
+
};
|
|
150123
|
+
401: components["responses"]["Unauthorized"];
|
|
150124
|
+
403: components["responses"]["Forbidden"];
|
|
150125
|
+
429: components["responses"]["TooManyRequests"];
|
|
150126
|
+
};
|
|
150127
|
+
};
|
|
150128
|
+
createAdsZarazConnection: {
|
|
150129
|
+
parameters: {
|
|
150130
|
+
query?: never;
|
|
150131
|
+
header?: never;
|
|
150132
|
+
path?: never;
|
|
150133
|
+
cookie?: never;
|
|
150134
|
+
};
|
|
150135
|
+
requestBody: {
|
|
150136
|
+
content: {
|
|
150137
|
+
"application/json": {
|
|
150138
|
+
/** Format: uuid */
|
|
150139
|
+
org_id?: string;
|
|
150140
|
+
token: string;
|
|
150141
|
+
zone_id: string;
|
|
150142
|
+
};
|
|
150143
|
+
};
|
|
150144
|
+
};
|
|
150145
|
+
responses: {
|
|
150146
|
+
/** @description The connection. */
|
|
150147
|
+
201: {
|
|
150148
|
+
headers: {
|
|
150149
|
+
[name: string]: unknown;
|
|
150150
|
+
};
|
|
150151
|
+
content: {
|
|
150152
|
+
"application/json": {
|
|
150153
|
+
data: components["schemas"]["AdsZarazConnection"];
|
|
150154
|
+
};
|
|
150155
|
+
};
|
|
150156
|
+
};
|
|
150157
|
+
401: components["responses"]["Unauthorized"];
|
|
150158
|
+
403: components["responses"]["Forbidden"];
|
|
150159
|
+
404: components["responses"]["NotFound"];
|
|
150160
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
150161
|
+
429: components["responses"]["TooManyRequests"];
|
|
150162
|
+
};
|
|
150163
|
+
};
|
|
150164
|
+
deleteAdsZarazConnection: {
|
|
150165
|
+
parameters: {
|
|
150166
|
+
query?: {
|
|
150167
|
+
org_id?: string;
|
|
150168
|
+
};
|
|
150169
|
+
header?: never;
|
|
150170
|
+
path: {
|
|
150171
|
+
connection_id: string;
|
|
150172
|
+
};
|
|
150173
|
+
cookie?: never;
|
|
150174
|
+
};
|
|
150175
|
+
requestBody?: never;
|
|
150176
|
+
responses: {
|
|
150177
|
+
/** @description Disconnected. */
|
|
150178
|
+
204: {
|
|
150179
|
+
headers: {
|
|
150180
|
+
[name: string]: unknown;
|
|
150181
|
+
};
|
|
150182
|
+
content?: never;
|
|
150183
|
+
};
|
|
150184
|
+
401: components["responses"]["Unauthorized"];
|
|
150185
|
+
403: components["responses"]["Forbidden"];
|
|
150186
|
+
404: components["responses"]["NotFound"];
|
|
150187
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
150188
|
+
429: components["responses"]["TooManyRequests"];
|
|
150189
|
+
};
|
|
150190
|
+
};
|
|
150191
|
+
checkAdsZarazConnection: {
|
|
150192
|
+
parameters: {
|
|
150193
|
+
query?: {
|
|
150194
|
+
org_id?: string;
|
|
150195
|
+
};
|
|
150196
|
+
header?: never;
|
|
150197
|
+
path: {
|
|
150198
|
+
connection_id: string;
|
|
150199
|
+
};
|
|
150200
|
+
cookie?: never;
|
|
150201
|
+
};
|
|
150202
|
+
requestBody?: never;
|
|
150203
|
+
responses: {
|
|
150204
|
+
/** @description The connection after the check. */
|
|
150205
|
+
200: {
|
|
150206
|
+
headers: {
|
|
150207
|
+
[name: string]: unknown;
|
|
150208
|
+
};
|
|
150209
|
+
content: {
|
|
150210
|
+
"application/json": {
|
|
150211
|
+
data: components["schemas"]["AdsZarazConnection"];
|
|
150212
|
+
};
|
|
150213
|
+
};
|
|
150214
|
+
};
|
|
150215
|
+
401: components["responses"]["Unauthorized"];
|
|
150216
|
+
403: components["responses"]["Forbidden"];
|
|
150217
|
+
404: components["responses"]["NotFound"];
|
|
150218
|
+
429: components["responses"]["TooManyRequests"];
|
|
150219
|
+
};
|
|
150220
|
+
};
|
|
150221
|
+
listAdsZarazZones: {
|
|
150222
|
+
parameters: {
|
|
150223
|
+
query?: never;
|
|
150224
|
+
header?: never;
|
|
150225
|
+
path?: never;
|
|
150226
|
+
cookie?: never;
|
|
150227
|
+
};
|
|
150228
|
+
requestBody: {
|
|
150229
|
+
content: {
|
|
150230
|
+
"application/json": {
|
|
150231
|
+
/** Format: uuid */
|
|
150232
|
+
org_id?: string;
|
|
150233
|
+
token: string;
|
|
150234
|
+
};
|
|
150235
|
+
};
|
|
150236
|
+
};
|
|
150237
|
+
responses: {
|
|
150238
|
+
/** @description The zones, by name. */
|
|
150239
|
+
200: {
|
|
150240
|
+
headers: {
|
|
150241
|
+
[name: string]: unknown;
|
|
150242
|
+
};
|
|
150243
|
+
content: {
|
|
150244
|
+
"application/json": {
|
|
150245
|
+
data: components["schemas"]["AdsZarazZone"][];
|
|
150246
|
+
};
|
|
150247
|
+
};
|
|
150248
|
+
};
|
|
150249
|
+
401: components["responses"]["Unauthorized"];
|
|
150250
|
+
403: components["responses"]["Forbidden"];
|
|
150251
|
+
404: components["responses"]["NotFound"];
|
|
150252
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
150253
|
+
429: components["responses"]["TooManyRequests"];
|
|
150254
|
+
};
|
|
150255
|
+
};
|
|
149983
150256
|
getAffiliateAccount: {
|
|
149984
150257
|
parameters: {
|
|
149985
150258
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1508",
|
|
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>",
|