@zinn-digital/sdk 0.1.1492 → 0.1.1493

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.
@@ -16123,6 +16123,26 @@ export interface paths {
16123
16123
  patch?: never;
16124
16124
  trace?: never;
16125
16125
  };
16126
+ "/v1/ads/analytics/forecast": {
16127
+ parameters: {
16128
+ query?: never;
16129
+ header?: never;
16130
+ path?: never;
16131
+ cookie?: never;
16132
+ };
16133
+ /**
16134
+ * This month's spend so far, the month-end forecast with its band, and the spend ceiling it is held against (za-284).
16135
+ * @description Always the CURRENT month (UTC), over the screen's network, account, campaign, country, device and product/site filters (its date range does not apply). The forecast is the pacing card's own, per account: what it spent this month before today plus its mean daily spend over the last `rate_days` complete days for every day left, today included (on the account's own weekday pattern when its pacing strategy is `day_of_week`). The band is a MODEL: each day left varies like the last `rate_days` did, days independent, accounts summed by variance; `low`..`high` is the central `band_pct`% and never below what is spent. `days` is one point per day of the month: `actual` (cumulative spend) before today, `mid`/`low`/`high` from today to the month's last day. `ceiling`: the organisation's one cross-network monthly ceiling when every live account of it is in scope, else the sum of the accounts' own monthly ceilings; `complete` is false when an account in scope that spends has none (`missing` counts them), and `comparable` is false under a campaign, country, device or product/site filter (a ceiling is per account). `state`: `no_spend`, `no_ceiling`, `at_ceiling` (spent), `over` (the forecast passes it), `at_risk` (the band's top passes it) or `under`. Gated on `ads.view` like the other analytics reads. Stored rows only. Money is integer micros of the reporting `currency` at the current stored rate (`fx`).
16136
+ */
16137
+ get: operations["getAdsAnalyticsForecast"];
16138
+ put?: never;
16139
+ post?: never;
16140
+ delete?: never;
16141
+ options?: never;
16142
+ head?: never;
16143
+ patch?: never;
16144
+ trace?: never;
16145
+ };
16126
16146
  "/v1/ads/analytics/funnel": {
16127
16147
  parameters: {
16128
16148
  query?: never;
@@ -16163,6 +16183,46 @@ export interface paths {
16163
16183
  patch?: never;
16164
16184
  trace?: never;
16165
16185
  };
16186
+ "/v1/ads/analytics/markers": {
16187
+ parameters: {
16188
+ query?: never;
16189
+ header?: never;
16190
+ path?: never;
16191
+ cookie?: never;
16192
+ };
16193
+ /**
16194
+ * What happened on each day of the chart - the changes made and the anomalies, each anomaly linked to the changes before it (za-284).
16195
+ * @description Over the same filters as the other analytics reads. Per bucket of the chart's grain: the changes APPLIED to an ad account in scope (an undone change too - it happened, then it was taken back), split by who made them (`zinn`: the daily audit, the autopilot, Simple mode, the assistant; `you`: a person in the dashboard or the customer's own API key), and the changes Google made in the account by itself (`google`; `google_breaks` of them broke one of the customer's own rules). `anomalies` are the days whose spend or conversions left the account's own pattern of the 14 days before (at least 7 of them with data): beyond three standard deviations, half the mean and a floor of one unit of the currency or two conversions. Today is never judged. Each anomaly counts the changes in the `link_days` days up to it (`linked`), and `linked_first_day`..`linked_last_day` is the window `GET /v1/ads/analytics/markers/items` lists them in. Changes are account-level: with a campaign, country, device or product/site filter they are still the whole account's, and `narrowed` says so. Gated on `ads.view` over the organisations the person can view; `org_id` narrows to that organisation and its client organisations; no organisation is a 404. Stored rows only, counted in the database. Anomaly values are integer micros of the reporting `currency` (conversions in thousandths).
16196
+ */
16197
+ get: operations["getAdsAnalyticsMarkers"];
16198
+ put?: never;
16199
+ post?: never;
16200
+ delete?: never;
16201
+ options?: never;
16202
+ head?: never;
16203
+ patch?: never;
16204
+ trace?: never;
16205
+ };
16206
+ "/v1/ads/analytics/markers/items": {
16207
+ parameters: {
16208
+ query?: never;
16209
+ header?: never;
16210
+ path?: never;
16211
+ cookie?: never;
16212
+ };
16213
+ /**
16214
+ * The changes behind a chart marker, newest first, paged, each with its Undo state (za-284).
16215
+ * @description The changes applied (`changes`) and the changes Google made by itself (`google`) in `marker_first`..`marker_last` (UTC days; default the screen's window), each list paged by the same `offset` and `limit` with its own full `count`. The window must lie inside the screen's window or the `link_days` before it (an anomaly's link window), else 422. A change carries `can_undo` while its 30-day Undo is open (`POST /v1/ads/changes/{change_id}/undo`); a Google change carries `undoable` while its Undo can still be asked for (`POST /v1/ads/connections/{connection_id}/google-changes/{change_id}/undo`). Same gate and filters as `GET /v1/ads/analytics/markers`.
16216
+ */
16217
+ get: operations["listAdsAnalyticsMarkerItems"];
16218
+ put?: never;
16219
+ post?: never;
16220
+ delete?: never;
16221
+ options?: never;
16222
+ head?: never;
16223
+ patch?: never;
16224
+ trace?: never;
16225
+ };
16166
16226
  "/v1/ads/analytics/summary": {
16167
16227
  parameters: {
16168
16228
  query?: never;
@@ -63744,6 +63804,27 @@ export interface components {
63744
63804
  connection_id: string;
63745
63805
  data: components["schemas"]["AdsAllowedTerm"][];
63746
63806
  };
63807
+ AdsAnalyticsAnomaly: {
63808
+ change_pct: number;
63809
+ /** Format: date */
63810
+ day: string;
63811
+ /** @enum {string} */
63812
+ direction: "up" | "down";
63813
+ /**
63814
+ * Format: int64
63815
+ * @description The mean of the baseline days.
63816
+ */
63817
+ expected: number;
63818
+ linked: components["schemas"]["AdsAnalyticsMarkerCounts"];
63819
+ /** Format: date */
63820
+ linked_first_day: string;
63821
+ /** Format: date */
63822
+ linked_last_day: string;
63823
+ /** @enum {string} */
63824
+ metric: "cost_micros" | "conversions_milli";
63825
+ /** Format: int64 */
63826
+ value: number;
63827
+ };
63747
63828
  AdsAnalyticsBreakdown: components["schemas"]["AdsAnalyticsFrame"] & {
63748
63829
  /** @enum {string} */
63749
63830
  by: "network" | "connection" | "campaign" | "country" | "device" | "offering";
@@ -63774,6 +63855,56 @@ export interface components {
63774
63855
  /** Format: int64 */
63775
63856
  value_micros: number;
63776
63857
  };
63858
+ AdsAnalyticsForecast: {
63859
+ accounts: number;
63860
+ band_pct: number;
63861
+ ceiling: {
63862
+ comparable: boolean;
63863
+ complete: boolean;
63864
+ /** Format: int64 */
63865
+ micros: number | null;
63866
+ missing: number;
63867
+ /** @enum {string} */
63868
+ source: "" | "accounts" | "cross" | "mixed";
63869
+ };
63870
+ currency: string;
63871
+ days: components["schemas"]["AdsAnalyticsForecastDay"][];
63872
+ days_left: number;
63873
+ /** Format: int64 */
63874
+ forecast_micros: number;
63875
+ fx: components["schemas"]["AdsAnalyticsFx"][];
63876
+ /** Format: int64 */
63877
+ high_micros: number;
63878
+ /** Format: int64 */
63879
+ low_micros: number;
63880
+ /** Format: date */
63881
+ month_first_day: string;
63882
+ /** Format: date */
63883
+ month_last_day: string;
63884
+ rate_days: number;
63885
+ /** Format: int64 */
63886
+ spent_micros: number;
63887
+ /** @enum {string} */
63888
+ state: "no_spend" | "no_ceiling" | "at_ceiling" | "over" | "at_risk" | "under";
63889
+ /** Format: date */
63890
+ today: string;
63891
+ unconverted: string[];
63892
+ };
63893
+ AdsAnalyticsForecastDay: {
63894
+ /**
63895
+ * Format: int64
63896
+ * @description Cumulative spend, before today.
63897
+ */
63898
+ actual: number | null;
63899
+ /** Format: date */
63900
+ day: string;
63901
+ /** Format: int64 */
63902
+ high: number | null;
63903
+ /** Format: int64 */
63904
+ low: number | null;
63905
+ /** Format: int64 */
63906
+ mid: number | null;
63907
+ };
63777
63908
  AdsAnalyticsFrame: {
63778
63909
  accounts: number;
63779
63910
  /** @enum {string} */
@@ -63938,6 +64069,95 @@ export interface components {
63938
64069
  /** Format: date */
63939
64070
  last_day: string;
63940
64071
  };
64072
+ AdsAnalyticsMarkerBucket: {
64073
+ anomalies: components["schemas"]["AdsAnalyticsAnomaly"][];
64074
+ /** Format: date */
64075
+ bucket: string;
64076
+ google: number;
64077
+ google_breaks: number;
64078
+ you: number;
64079
+ zinn: number;
64080
+ };
64081
+ AdsAnalyticsMarkerChange: {
64082
+ account: string;
64083
+ action_class: string;
64084
+ /** Format: date-time */
64085
+ applied_at: string | null;
64086
+ can_undo: boolean;
64087
+ /** Format: uuid */
64088
+ connection_id: string;
64089
+ decided_by: string;
64090
+ /** Format: uuid */
64091
+ id: string;
64092
+ network: string;
64093
+ proposed_by: string;
64094
+ /** @enum {string} */
64095
+ status: "applied" | "undone";
64096
+ summary: {
64097
+ [key: string]: unknown;
64098
+ };
64099
+ /** Format: date-time */
64100
+ undo_until: string | null;
64101
+ /** @enum {string} */
64102
+ who: "zinn" | "you";
64103
+ };
64104
+ AdsAnalyticsMarkerCounts: {
64105
+ /** @description Changes Google made in the account by itself. */
64106
+ google: number;
64107
+ /** @description Changes a person made in the dashboard or the customer's own API key made. */
64108
+ you: number;
64109
+ /** @description Changes Zinn® Ads made (the audit, the autopilot, Simple mode, the assistant). */
64110
+ zinn: number;
64111
+ };
64112
+ AdsAnalyticsMarkerGoogleChange: {
64113
+ account: string;
64114
+ /** @enum {string} */
64115
+ actor: "auto_apply" | "recommendation" | "google";
64116
+ /** Format: date-time */
64117
+ changed_at: string;
64118
+ changed_fields: string[];
64119
+ /** Format: uuid */
64120
+ connection_id: string;
64121
+ /** Format: uuid */
64122
+ id: string;
64123
+ network: string;
64124
+ operation: string;
64125
+ resource_type: string;
64126
+ undo_requested: boolean;
64127
+ undoable: boolean;
64128
+ /** @enum {string} */
64129
+ verdict: "within_rules" | "risky" | "needs_approval" | "breaks_rule";
64130
+ };
64131
+ AdsAnalyticsMarkerItems: {
64132
+ changes: {
64133
+ count: number;
64134
+ rows: components["schemas"]["AdsAnalyticsMarkerChange"][];
64135
+ };
64136
+ /** Format: date */
64137
+ first_day: string;
64138
+ google: {
64139
+ count: number;
64140
+ rows: components["schemas"]["AdsAnalyticsMarkerGoogleChange"][];
64141
+ };
64142
+ /** Format: date */
64143
+ last_day: string;
64144
+ limit: number;
64145
+ offset: number;
64146
+ };
64147
+ AdsAnalyticsMarkers: {
64148
+ accounts: number;
64149
+ buckets: components["schemas"]["AdsAnalyticsMarkerBucket"][];
64150
+ currency: string;
64151
+ /** Format: date */
64152
+ first_day: string;
64153
+ /** @enum {string} */
64154
+ grain: "day" | "week" | "month";
64155
+ /** Format: date */
64156
+ last_day: string;
64157
+ link_days: number;
64158
+ narrowed: boolean;
64159
+ unconverted: string[];
64160
+ };
63941
64161
  AdsAnalyticsPoint: components["schemas"]["AdsAnalyticsFigures"] & {
63942
64162
  /** Format: date */
63943
64163
  bucket: string;
@@ -138989,6 +139209,56 @@ export interface operations {
138989
139209
  429: components["responses"]["TooManyRequests"];
138990
139210
  };
138991
139211
  };
139212
+ getAdsAnalyticsForecast: {
139213
+ parameters: {
139214
+ query?: {
139215
+ /** @description Comma-separated `<connection_id>:<campaign_id>` tokens. */
139216
+ campaign?: components["parameters"]["AdsAnalyticsCampaign"];
139217
+ compare?: components["parameters"]["AdsAnalyticsCompare"];
139218
+ /** @description Comma-separated ad-account connection ids. */
139219
+ connection?: components["parameters"]["AdsAnalyticsConnection"];
139220
+ /** @description Comma-separated ISO 3166-1 alpha-2 codes. Reads the country-level figures. */
139221
+ country?: components["parameters"]["AdsAnalyticsCountry"];
139222
+ /** @description Reporting currency (ISO 4217). Default the one currency in play, else the organisation's. */
139223
+ currency?: components["parameters"]["AdsAnalyticsCurrency"];
139224
+ /** @description Comma-separated devices: `mobile`, `desktop`, `tablet`, `tv`, `other` (za-282). Reads the device-level figures (Google Ads accounts, campaign grain). No stored level is split by both country and device, so `device` with `country` is refused (422, field `device`). */
139225
+ device?: components["parameters"]["AdsAnalyticsDevice"];
139226
+ from?: components["parameters"]["AdsAnalyticsFrom"];
139227
+ /** @description Bucket size. Default day up to 92 days, week up to 366, month beyond. */
139228
+ grain?: components["parameters"]["AdsAnalyticsGrain"];
139229
+ /** @description Comma-separated networks (google, microsoft, meta, linkedin, tiktok, x, pinterest, amazon). */
139230
+ network?: components["parameters"]["AdsAnalyticsNetwork"];
139231
+ /** @description Comma-separated product/site ids (za-290), or `unassigned`. */
139232
+ offering?: components["parameters"]["AdsAnalyticsOffering"];
139233
+ org_id?: string;
139234
+ /** @description The period. `custom` takes `from` and `to`. */
139235
+ range?: components["parameters"]["AdsAnalyticsRange"];
139236
+ to?: components["parameters"]["AdsAnalyticsTo"];
139237
+ };
139238
+ header?: never;
139239
+ path?: never;
139240
+ cookie?: never;
139241
+ };
139242
+ requestBody?: never;
139243
+ responses: {
139244
+ /** @description The month-end forecast. */
139245
+ 200: {
139246
+ headers: {
139247
+ [name: string]: unknown;
139248
+ };
139249
+ content: {
139250
+ "application/json": {
139251
+ data: components["schemas"]["AdsAnalyticsForecast"];
139252
+ };
139253
+ };
139254
+ };
139255
+ 401: components["responses"]["Unauthorized"];
139256
+ 403: components["responses"]["Forbidden"];
139257
+ 404: components["responses"]["NotFound"];
139258
+ 422: components["responses"]["UnprocessableEntity"];
139259
+ 429: components["responses"]["TooManyRequests"];
139260
+ };
139261
+ };
138992
139262
  getAdsAnalyticsFunnel: {
138993
139263
  parameters: {
138994
139264
  query?: {
@@ -139089,6 +139359,110 @@ export interface operations {
139089
139359
  429: components["responses"]["TooManyRequests"];
139090
139360
  };
139091
139361
  };
139362
+ getAdsAnalyticsMarkers: {
139363
+ parameters: {
139364
+ query?: {
139365
+ /** @description Comma-separated `<connection_id>:<campaign_id>` tokens. */
139366
+ campaign?: components["parameters"]["AdsAnalyticsCampaign"];
139367
+ compare?: components["parameters"]["AdsAnalyticsCompare"];
139368
+ /** @description Comma-separated ad-account connection ids. */
139369
+ connection?: components["parameters"]["AdsAnalyticsConnection"];
139370
+ /** @description Comma-separated ISO 3166-1 alpha-2 codes. Reads the country-level figures. */
139371
+ country?: components["parameters"]["AdsAnalyticsCountry"];
139372
+ /** @description Reporting currency (ISO 4217). Default the one currency in play, else the organisation's. */
139373
+ currency?: components["parameters"]["AdsAnalyticsCurrency"];
139374
+ /** @description Comma-separated devices: `mobile`, `desktop`, `tablet`, `tv`, `other` (za-282). Reads the device-level figures (Google Ads accounts, campaign grain). No stored level is split by both country and device, so `device` with `country` is refused (422, field `device`). */
139375
+ device?: components["parameters"]["AdsAnalyticsDevice"];
139376
+ from?: components["parameters"]["AdsAnalyticsFrom"];
139377
+ /** @description Bucket size. Default day up to 92 days, week up to 366, month beyond. */
139378
+ grain?: components["parameters"]["AdsAnalyticsGrain"];
139379
+ /** @description Comma-separated networks (google, microsoft, meta, linkedin, tiktok, x, pinterest, amazon). */
139380
+ network?: components["parameters"]["AdsAnalyticsNetwork"];
139381
+ /** @description Comma-separated product/site ids (za-290), or `unassigned`. */
139382
+ offering?: components["parameters"]["AdsAnalyticsOffering"];
139383
+ org_id?: string;
139384
+ /** @description The period. `custom` takes `from` and `to`. */
139385
+ range?: components["parameters"]["AdsAnalyticsRange"];
139386
+ to?: components["parameters"]["AdsAnalyticsTo"];
139387
+ };
139388
+ header?: never;
139389
+ path?: never;
139390
+ cookie?: never;
139391
+ };
139392
+ requestBody?: never;
139393
+ responses: {
139394
+ /** @description The markers per bucket. */
139395
+ 200: {
139396
+ headers: {
139397
+ [name: string]: unknown;
139398
+ };
139399
+ content: {
139400
+ "application/json": {
139401
+ data: components["schemas"]["AdsAnalyticsMarkers"];
139402
+ };
139403
+ };
139404
+ };
139405
+ 401: components["responses"]["Unauthorized"];
139406
+ 403: components["responses"]["Forbidden"];
139407
+ 404: components["responses"]["NotFound"];
139408
+ 422: components["responses"]["UnprocessableEntity"];
139409
+ 429: components["responses"]["TooManyRequests"];
139410
+ };
139411
+ };
139412
+ listAdsAnalyticsMarkerItems: {
139413
+ parameters: {
139414
+ query?: {
139415
+ /** @description Comma-separated `<connection_id>:<campaign_id>` tokens. */
139416
+ campaign?: components["parameters"]["AdsAnalyticsCampaign"];
139417
+ compare?: components["parameters"]["AdsAnalyticsCompare"];
139418
+ /** @description Comma-separated ad-account connection ids. */
139419
+ connection?: components["parameters"]["AdsAnalyticsConnection"];
139420
+ /** @description Comma-separated ISO 3166-1 alpha-2 codes. Reads the country-level figures. */
139421
+ country?: components["parameters"]["AdsAnalyticsCountry"];
139422
+ /** @description Reporting currency (ISO 4217). Default the one currency in play, else the organisation's. */
139423
+ currency?: components["parameters"]["AdsAnalyticsCurrency"];
139424
+ /** @description Comma-separated devices: `mobile`, `desktop`, `tablet`, `tv`, `other` (za-282). Reads the device-level figures (Google Ads accounts, campaign grain). No stored level is split by both country and device, so `device` with `country` is refused (422, field `device`). */
139425
+ device?: components["parameters"]["AdsAnalyticsDevice"];
139426
+ from?: components["parameters"]["AdsAnalyticsFrom"];
139427
+ /** @description Bucket size. Default day up to 92 days, week up to 366, month beyond. */
139428
+ grain?: components["parameters"]["AdsAnalyticsGrain"];
139429
+ limit?: number;
139430
+ marker_first?: string;
139431
+ marker_last?: string;
139432
+ /** @description Comma-separated networks (google, microsoft, meta, linkedin, tiktok, x, pinterest, amazon). */
139433
+ network?: components["parameters"]["AdsAnalyticsNetwork"];
139434
+ /** @description Comma-separated product/site ids (za-290), or `unassigned`. */
139435
+ offering?: components["parameters"]["AdsAnalyticsOffering"];
139436
+ offset?: number;
139437
+ org_id?: string;
139438
+ /** @description The period. `custom` takes `from` and `to`. */
139439
+ range?: components["parameters"]["AdsAnalyticsRange"];
139440
+ to?: components["parameters"]["AdsAnalyticsTo"];
139441
+ };
139442
+ header?: never;
139443
+ path?: never;
139444
+ cookie?: never;
139445
+ };
139446
+ requestBody?: never;
139447
+ responses: {
139448
+ /** @description One page of each list. */
139449
+ 200: {
139450
+ headers: {
139451
+ [name: string]: unknown;
139452
+ };
139453
+ content: {
139454
+ "application/json": {
139455
+ data: components["schemas"]["AdsAnalyticsMarkerItems"];
139456
+ };
139457
+ };
139458
+ };
139459
+ 401: components["responses"]["Unauthorized"];
139460
+ 403: components["responses"]["Forbidden"];
139461
+ 404: components["responses"]["NotFound"];
139462
+ 422: components["responses"]["UnprocessableEntity"];
139463
+ 429: components["responses"]["TooManyRequests"];
139464
+ };
139465
+ };
139092
139466
  getAdsAnalyticsSummary: {
139093
139467
  parameters: {
139094
139468
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1492",
3
+ "version": "0.1.1493",
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>",