@zinn-digital/sdk 0.1.1506 → 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 +272 -1
- 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;
|
|
@@ -68902,7 +68986,7 @@ export interface components {
|
|
|
68902
68986
|
AdsSiteTagFirstParty: {
|
|
68903
68987
|
/** Format: date-time */
|
|
68904
68988
|
checked_at?: string | null;
|
|
68905
|
-
/** @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. */
|
|
68906
68990
|
last_error?: string;
|
|
68907
68991
|
/** @description The path on the site host: /ztag. */
|
|
68908
68992
|
path: string;
|
|
@@ -69632,6 +69716,38 @@ export interface components {
|
|
|
69632
69716
|
/** Format: int64 */
|
|
69633
69717
|
total_budget_micros: number | null;
|
|
69634
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
|
+
};
|
|
69635
69751
|
AffiliateAccount: {
|
|
69636
69752
|
/** Format: date-time */
|
|
69637
69753
|
applied_at?: string;
|
|
@@ -149982,6 +150098,161 @@ export interface operations {
|
|
|
149982
150098
|
429: components["responses"]["TooManyRequests"];
|
|
149983
150099
|
};
|
|
149984
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
|
+
};
|
|
149985
150256
|
getAffiliateAccount: {
|
|
149986
150257
|
parameters: {
|
|
149987
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>",
|