@zinn-digital/sdk 0.1.1404 → 0.1.1405

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.
@@ -15972,6 +15972,54 @@ export interface paths {
15972
15972
  patch: operations["updateAdsAutopilotDecisions"];
15973
15973
  trace?: never;
15974
15974
  };
15975
+ "/v1/ads/brief": {
15976
+ parameters: {
15977
+ query?: never;
15978
+ header?: never;
15979
+ path?: never;
15980
+ cookie?: never;
15981
+ };
15982
+ /**
15983
+ * The one brief across every ad network, and the split it drives.
15984
+ * @description Gated on `ads.view`. Read from our own rows (no network call): the objective (`leads` or `revenue`), the monthly budget, the optional target and the test share, and per network its current and proposed monthly ceiling and `why` (`bestReturn`, `offTarget`, `testShare`, `held`, `unreadable`, `otherCurrency`, `noReturn`), plus the versions saved in the last 30 days. The split is the cross-network budget's proposal (docs/1006 §113, §67), measured daily by a Temporal workflow and applied with `applyAdsCrossBudget`.
15985
+ */
15986
+ get: operations["getAdsBrief"];
15987
+ /**
15988
+ * State the objective and the budget once, for every network.
15989
+ * @description Gated on `ads.manage`; audit action `ads.brief_set`. Sets the cross-network monthly ceiling to `budget_minor` and ranks the split by `objective`; the brief it replaces is kept 30 days for `undoAdsBrief`. Measured again now by a Temporal workflow, never in the request; nothing is applied (approve-first unless `mode: auto`). Refusals `refusal.adsconnect.briefBadObjective`, `briefBadBudget`, `briefBadCurrency`, `briefBadTarget`, `briefBadTestShare`, `briefBadMode`.
15990
+ */
15991
+ put: operations["setAdsBrief"];
15992
+ post?: never;
15993
+ /**
15994
+ * Remove the brief (the budget stays, split by conversions per spend).
15995
+ * @description Gated on `ads.manage`; audit action `ads.brief_clear`. Kept as a version, so it can be undone within 30 days.
15996
+ */
15997
+ delete: operations["clearAdsBrief"];
15998
+ options?: never;
15999
+ head?: never;
16000
+ patch?: never;
16001
+ trace?: never;
16002
+ };
16003
+ "/v1/ads/brief/undo": {
16004
+ parameters: {
16005
+ query?: never;
16006
+ header?: never;
16007
+ path?: never;
16008
+ cookie?: never;
16009
+ };
16010
+ get?: never;
16011
+ put?: never;
16012
+ /**
16013
+ * Put back the brief the last save replaced.
16014
+ * @description Gated on `ads.manage`; audit action `ads.brief_undo`. Refused with `refusal.adsconnect.briefNothingToUndo` when no version from the last 30 days is left.
16015
+ */
16016
+ post: operations["undoAdsBrief"];
16017
+ delete?: never;
16018
+ options?: never;
16019
+ head?: never;
16020
+ patch?: never;
16021
+ trace?: never;
16022
+ };
15975
16023
  "/v1/ads/builds": {
15976
16024
  parameters: {
15977
16025
  query?: never;
@@ -62270,6 +62318,64 @@ export interface components {
62270
62318
  /** @description Our absolute-top share on the brand keywords below this (with rank loss) means someone is placed above us. */
62271
62319
  top_floor_pct: number;
62272
62320
  };
62321
+ AdsBrief: {
62322
+ /** @enum {string} */
62323
+ blocked: "" | "noReturnYet";
62324
+ brief: {
62325
+ /** @description Integer minor units (§2.8). */
62326
+ budget_minor: number | null;
62327
+ currency: string;
62328
+ /** @enum {string} */
62329
+ mode: "suggest" | "auto";
62330
+ /** @enum {string} */
62331
+ objective: "leads" | "revenue";
62332
+ target: number | null;
62333
+ test_share_pct: number;
62334
+ } | null;
62335
+ can_undo_brief: boolean;
62336
+ keep_days: number;
62337
+ last_apply: {
62338
+ at: string | null;
62339
+ by: string | null;
62340
+ can_undo: boolean;
62341
+ moves: components["schemas"]["AdsCrossBudgetMove"][];
62342
+ undone_at: string | null;
62343
+ } | null;
62344
+ /** Format: date-time */
62345
+ measured_at: string | null;
62346
+ moves: components["schemas"]["AdsCrossBudgetMove"][];
62347
+ /** Format: uuid */
62348
+ org_id: string;
62349
+ split: {
62350
+ /** Format: uuid */
62351
+ connection_id: string;
62352
+ conversions_milli: number;
62353
+ cost_minor: number;
62354
+ current_minor: number | null;
62355
+ label: string;
62356
+ platform: string;
62357
+ proposed_minor: number | null;
62358
+ value_minor: number;
62359
+ why: components["schemas"]["AdsBriefWhy"];
62360
+ }[];
62361
+ test_share_max: number;
62362
+ test_share_min: number;
62363
+ test_share_recommended: number;
62364
+ versions: {
62365
+ /** Format: date-time */
62366
+ at: string;
62367
+ brief: {
62368
+ [key: string]: unknown;
62369
+ };
62370
+ by: string;
62371
+ /** Format: uuid */
62372
+ id: string;
62373
+ /** Format: date-time */
62374
+ undone_at: string | null;
62375
+ }[];
62376
+ };
62377
+ /** @enum {string} */
62378
+ AdsBriefWhy: "bestReturn" | "offTarget" | "testShare" | "held" | "unreadable" | "otherCurrency" | "noReturn";
62273
62379
  /** @description The customer's own budget for one campaign (za-84, docs/1006 §84). */
62274
62380
  AdsBudgetDecision: {
62275
62381
  /** Format: int64 */
@@ -63181,6 +63287,10 @@ export interface components {
63181
63287
  targets: {
63182
63288
  [key: string]: number;
63183
63289
  };
63290
+ /** @description za-208 — per connection id, why it gets what it gets (absent on a proposal made before the brief existed). */
63291
+ why?: {
63292
+ [key: string]: components["schemas"]["AdsBriefWhy"];
63293
+ };
63184
63294
  };
63185
63295
  };
63186
63296
  AdsCrossBudgetMove: {
@@ -134995,6 +135105,136 @@ export interface operations {
134995
135105
  429: components["responses"]["TooManyRequests"];
134996
135106
  };
134997
135107
  };
135108
+ getAdsBrief: {
135109
+ parameters: {
135110
+ query?: {
135111
+ org_id?: string;
135112
+ };
135113
+ header?: never;
135114
+ path?: never;
135115
+ cookie?: never;
135116
+ };
135117
+ requestBody?: never;
135118
+ responses: {
135119
+ /** @description The brief and the split it drives. */
135120
+ 200: {
135121
+ headers: {
135122
+ [name: string]: unknown;
135123
+ };
135124
+ content: {
135125
+ "application/json": components["schemas"]["AdsBrief"];
135126
+ };
135127
+ };
135128
+ 401: components["responses"]["Unauthorized"];
135129
+ 403: components["responses"]["Forbidden"];
135130
+ 404: components["responses"]["NotFound"];
135131
+ 422: components["responses"]["UnprocessableEntity"];
135132
+ 429: components["responses"]["TooManyRequests"];
135133
+ };
135134
+ };
135135
+ setAdsBrief: {
135136
+ parameters: {
135137
+ query?: never;
135138
+ header?: never;
135139
+ path?: never;
135140
+ cookie?: never;
135141
+ };
135142
+ requestBody: {
135143
+ content: {
135144
+ "application/json": {
135145
+ /** @description The monthly budget, integer minor units of `currency` (§2.8). */
135146
+ budget_minor: number;
135147
+ /** @description ISO 4217 */
135148
+ currency: string;
135149
+ /** @enum {string} */
135150
+ mode?: "suggest" | "auto";
135151
+ /** @enum {string} */
135152
+ objective: "leads" | "revenue";
135153
+ /** Format: uuid */
135154
+ org_id?: string;
135155
+ /** @description `leads` — a cost per conversion in minor units; `revenue` — a ROAS in %. */
135156
+ target?: number | null;
135157
+ /** @description The share the networks with no measured return test with (recommended 10). */
135158
+ test_share_pct?: number;
135159
+ };
135160
+ };
135161
+ };
135162
+ responses: {
135163
+ /** @description The brief and the split it drives. */
135164
+ 200: {
135165
+ headers: {
135166
+ [name: string]: unknown;
135167
+ };
135168
+ content: {
135169
+ "application/json": components["schemas"]["AdsBrief"];
135170
+ };
135171
+ };
135172
+ 401: components["responses"]["Unauthorized"];
135173
+ 403: components["responses"]["Forbidden"];
135174
+ 404: components["responses"]["NotFound"];
135175
+ 422: components["responses"]["UnprocessableEntity"];
135176
+ 429: components["responses"]["TooManyRequests"];
135177
+ };
135178
+ };
135179
+ clearAdsBrief: {
135180
+ parameters: {
135181
+ query?: {
135182
+ org_id?: string;
135183
+ };
135184
+ header?: never;
135185
+ path?: never;
135186
+ cookie?: never;
135187
+ };
135188
+ requestBody?: never;
135189
+ responses: {
135190
+ /** @description The brief and the split it drives. */
135191
+ 200: {
135192
+ headers: {
135193
+ [name: string]: unknown;
135194
+ };
135195
+ content: {
135196
+ "application/json": components["schemas"]["AdsBrief"];
135197
+ };
135198
+ };
135199
+ 401: components["responses"]["Unauthorized"];
135200
+ 403: components["responses"]["Forbidden"];
135201
+ 404: components["responses"]["NotFound"];
135202
+ 422: components["responses"]["UnprocessableEntity"];
135203
+ 429: components["responses"]["TooManyRequests"];
135204
+ };
135205
+ };
135206
+ undoAdsBrief: {
135207
+ parameters: {
135208
+ query?: never;
135209
+ header?: never;
135210
+ path?: never;
135211
+ cookie?: never;
135212
+ };
135213
+ requestBody?: {
135214
+ content: {
135215
+ "application/json": {
135216
+ /** Format: uuid */
135217
+ org_id?: string;
135218
+ };
135219
+ };
135220
+ };
135221
+ responses: {
135222
+ /** @description The brief and the split it drives. */
135223
+ 200: {
135224
+ headers: {
135225
+ [name: string]: unknown;
135226
+ };
135227
+ content: {
135228
+ "application/json": components["schemas"]["AdsBrief"];
135229
+ };
135230
+ };
135231
+ 401: components["responses"]["Unauthorized"];
135232
+ 403: components["responses"]["Forbidden"];
135233
+ 404: components["responses"]["NotFound"];
135234
+ 422: components["responses"]["UnprocessableEntity"];
135235
+ 429: components["responses"]["TooManyRequests"];
135236
+ };
135237
+ };
134998
135238
  listAdsBuilds: {
134999
135239
  parameters: {
135000
135240
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1404",
3
+ "version": "0.1.1405",
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>",