@zinn-digital/sdk 0.1.1407 → 0.1.1408

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.
@@ -17657,6 +17657,32 @@ export interface paths {
17657
17657
  patch?: never;
17658
17658
  trace?: never;
17659
17659
  };
17660
+ "/v1/ads/connections/{connection_id}/copy-winners": {
17661
+ parameters: {
17662
+ query?: never;
17663
+ header?: never;
17664
+ path: {
17665
+ connection_id: string;
17666
+ };
17667
+ cookie?: never;
17668
+ };
17669
+ /**
17670
+ * Copy winners across your own accounts and countries - settings and the last run (za-N5).
17671
+ * @description Gated on `ads.view`. On the caller's own connection. The daily audit (Temporal) finds the responsive search ads that win in a campaign on FIRST-PARTY conversions only (a one-sided two-proportion test against the campaign's other ads at `confidence_pct`, with at least `min_clicks` clicks and `min_conversions` conversions over `lookback_days`) and offers each winner - its ad and keyword set - to the same org's other campaigns, countries and connected accounts on the same website, translated in one batched call where the language differs and checked by the ad-quality gate (docs/1006 §91). Copies are ordinary changes on the TARGET connection (`listAdsChanges`): approve-first in mode `suggest`; approved at once with Undo in mode `auto` when that account's `campaigns` class is Automatic. `pending` counts this account's copies waiting anywhere in the org. Read from stored rows, never a network call in the request.
17672
+ */
17673
+ get: operations["getAdsCopyWinners"];
17674
+ put?: never;
17675
+ post?: never;
17676
+ delete?: never;
17677
+ options?: never;
17678
+ head?: never;
17679
+ /**
17680
+ * Edit copy winners - switch, mode, thresholds; null puts a threshold back on Recommended (audited).
17681
+ * @description Gated on `ads.manage`. Audit action `ads.copy_winners_update`. `on` is a boolean; `mode` is `suggest` or `auto`; each threshold is a whole number inside its bounds (see `settings.<field>.min/max` in the GET), or `null` for the Recommended value. Any unknown field or invalid value refuses the whole request with `copyWinnersInvalid` (nothing is half-applied).
17682
+ */
17683
+ patch: operations["updateAdsCopyWinners"];
17684
+ trace?: never;
17685
+ };
17660
17686
  "/v1/ads/connections/{connection_id}/crm-sources": {
17661
17687
  parameters: {
17662
17688
  query?: never;
@@ -63144,6 +63170,88 @@ export interface components {
63144
63170
  uploaded: number;
63145
63171
  };
63146
63172
  };
63173
+ AdsCopyWinner: {
63174
+ ad_group: string;
63175
+ ad_id: string;
63176
+ /** @description The campaign's other ads, pooled. */
63177
+ baseline_rate: number;
63178
+ campaign?: string;
63179
+ campaign_id: string;
63180
+ clicks: number;
63181
+ /** @description First-party conversions only. */
63182
+ conversions: number;
63183
+ /** @description ISO country codes the source campaign targets. */
63184
+ countries: string[];
63185
+ /** @description The source market's language code. */
63186
+ language: string;
63187
+ p_value: number;
63188
+ rate: number;
63189
+ };
63190
+ AdsCopyWinnerCopy: {
63191
+ ad_group: string;
63192
+ campaign?: string;
63193
+ campaign_id: string;
63194
+ /** Format: uuid */
63195
+ change_id?: string;
63196
+ /**
63197
+ * Format: uuid
63198
+ * @description The target connection (same org).
63199
+ */
63200
+ connection_id: string;
63201
+ countries?: string[];
63202
+ descriptions?: string[];
63203
+ detail?: string[];
63204
+ headlines?: string[];
63205
+ keywords?: string[];
63206
+ language: string;
63207
+ /** @description Why it waits - noTranslation, tooLong, gateRefused. */
63208
+ reason?: string;
63209
+ source_ad_id: string;
63210
+ /** @enum {string} */
63211
+ status: "proposed" | "approved" | "waiting";
63212
+ };
63213
+ AdsCopyWinnersEnvelope: {
63214
+ data: {
63215
+ last_run: components["schemas"]["AdsCopyWinnersRun"] | null;
63216
+ /** @enum {string} */
63217
+ mode: "suggest" | "auto";
63218
+ on: boolean;
63219
+ /** @description This account's copies waiting for approval, in any of the org's accounts. */
63220
+ pending: number;
63221
+ settings: {
63222
+ confidence_pct: components["schemas"]["AdsCompetitorGroupsThreshold"];
63223
+ lookback_days: components["schemas"]["AdsCompetitorGroupsThreshold"];
63224
+ min_clicks: components["schemas"]["AdsCompetitorGroupsThreshold"];
63225
+ min_conversions: components["schemas"]["AdsCompetitorGroupsThreshold"];
63226
+ };
63227
+ };
63228
+ };
63229
+ AdsCopyWinnersPatch: {
63230
+ confidence_pct?: number | null;
63231
+ lookback_days?: number | null;
63232
+ min_clicks?: number | null;
63233
+ min_conversions?: number | null;
63234
+ /** @enum {string} */
63235
+ mode?: "suggest" | "auto";
63236
+ on?: boolean;
63237
+ };
63238
+ AdsCopyWinnersRun: {
63239
+ /** @description Copies approved at once (mode auto). */
63240
+ applied: number;
63241
+ /** Format: date-time */
63242
+ at: string;
63243
+ copy_list: components["schemas"]["AdsCopyWinnerCopy"][];
63244
+ /** @description Targets that already have the group or a decided copy. */
63245
+ covered: number;
63246
+ /** @description Campaigns skipped because they advertise another website. */
63247
+ other_site: number;
63248
+ proposed: number;
63249
+ /** @description Empty when it ran; else why not (switchedOff, noFirstPartyProof, notInGoodStanding, ...). */
63250
+ skipped: string;
63251
+ waiting: number;
63252
+ winner_list: components["schemas"]["AdsCopyWinner"][];
63253
+ winners: number;
63254
+ };
63147
63255
  /** @description COUNTRYCUT — our recommended values, in the connection's currency. */
63148
63256
  AdsCountryCutRecommended: {
63149
63257
  currency: string;
@@ -138496,6 +138604,63 @@ export interface operations {
138496
138604
  429: components["responses"]["TooManyRequests"];
138497
138605
  };
138498
138606
  };
138607
+ getAdsCopyWinners: {
138608
+ parameters: {
138609
+ query?: never;
138610
+ header?: never;
138611
+ path: {
138612
+ connection_id: string;
138613
+ };
138614
+ cookie?: never;
138615
+ };
138616
+ requestBody?: never;
138617
+ responses: {
138618
+ /** @description The switch, mode, thresholds (each with its Recommended value) and the last run. */
138619
+ 200: {
138620
+ headers: {
138621
+ [name: string]: unknown;
138622
+ };
138623
+ content: {
138624
+ "application/json": components["schemas"]["AdsCopyWinnersEnvelope"];
138625
+ };
138626
+ };
138627
+ 401: components["responses"]["Unauthorized"];
138628
+ 403: components["responses"]["Forbidden"];
138629
+ 404: components["responses"]["NotFound"];
138630
+ 429: components["responses"]["TooManyRequests"];
138631
+ };
138632
+ };
138633
+ updateAdsCopyWinners: {
138634
+ parameters: {
138635
+ query?: never;
138636
+ header?: never;
138637
+ path: {
138638
+ connection_id: string;
138639
+ };
138640
+ cookie?: never;
138641
+ };
138642
+ requestBody: {
138643
+ content: {
138644
+ "application/json": components["schemas"]["AdsCopyWinnersPatch"];
138645
+ };
138646
+ };
138647
+ responses: {
138648
+ /** @description The settings after the change. */
138649
+ 200: {
138650
+ headers: {
138651
+ [name: string]: unknown;
138652
+ };
138653
+ content: {
138654
+ "application/json": components["schemas"]["AdsCopyWinnersEnvelope"];
138655
+ };
138656
+ };
138657
+ 401: components["responses"]["Unauthorized"];
138658
+ 403: components["responses"]["Forbidden"];
138659
+ 404: components["responses"]["NotFound"];
138660
+ 422: components["responses"]["UnprocessableEntity"];
138661
+ 429: components["responses"]["TooManyRequests"];
138662
+ };
138663
+ };
138499
138664
  listAdsCrmSources: {
138500
138665
  parameters: {
138501
138666
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1407",
3
+ "version": "0.1.1408",
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>",