@zinn-digital/sdk 0.1.1433 → 0.1.1435

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.
@@ -18306,7 +18306,7 @@ export interface paths {
18306
18306
  };
18307
18307
  /**
18308
18308
  * The connected Google Ads account's whole structure as last read (za-262).
18309
- * @description Gated on `ads.view`. Read on Temporal when the account is connected, on Refresh and weekly by the daily audit — never Google in the request. `state` is `notRead` until the first read, `ok` with `import`, or `failed` with `error` (a failed read never shows old figures as current). `import` carries the account's campaigns (status, channel, daily budget in micros, shared budget, bid strategy and its target, Google's bidding-strategy status, ad groups, keywords by match type, ads, negatives, location targets), its conversion actions and totals. Read only: nothing is written to the account. A connection on another network is a `422` `refusal.adsconnect.platformNotSupported`. `history` (za-263) is the account's OWN history read back month by month to the retention edge (400 days) after the first read — `null` until it starts; its figures are the ad-group totals now stored.
18309
+ * @description Gated on `ads.view`. Read on Temporal when the account is connected, on Refresh and weekly by the daily audit — never Google in the request. `state` is `notRead` until the first read, `ok` with `import`, or `failed` with `error` (a failed read never shows old figures as current). `import` carries the account's campaigns (status, channel, daily budget in micros, shared budget, bid strategy and its target, Google's bidding-strategy status, ad groups, keywords by match type, ads, negatives, location targets), its conversion actions and totals. Read only: nothing is written to the account. A connection on another network is a `422` `refusal.adsconnect.platformNotSupported`. `history` (za-263) is the account's OWN history read back month by month to the retention edge (400 days) after the first read — `null` until it starts; its figures are the ad-group totals now stored. `plan` (za-265) is the optimisation plan built from that history once it is read (and at most weekly after) — `null` until then: what WORKS (kept and protected from automatic pauses), the measured waste and the structural steps, every write a PENDING change in the approvals queue (`change_id`), never applied by itself.
18310
18310
  */
18311
18311
  get: operations["getAdsImportedAccount"];
18312
18312
  put?: never;
@@ -25625,6 +25625,66 @@ export interface paths {
25625
25625
  patch?: never;
25626
25626
  trace?: never;
25627
25627
  };
25628
+ "/v1/bulk-site-imports": {
25629
+ parameters: {
25630
+ query?: never;
25631
+ header?: never;
25632
+ path?: never;
25633
+ cookie?: never;
25634
+ };
25635
+ get?: never;
25636
+ put?: never;
25637
+ /**
25638
+ * Add many sites — one per valid row of a file.
25639
+ * @description Re-checks the file exactly as the preview does and enrols every VALID row as an item of a `site_create` bulk job; invalid rows are left out (the preview named them). Each row is then created through the same path as `POST /v1/sites`, so the site-slot quota, plan allowances and hostname rules apply per row. Refused with a `422` before anything is written when no row is valid or the file cannot be read; rows past the plan's room are flagged by the check and not enrolled. One durable job with bounded concurrency and no row cap: the bound is the quota. Follow progress with `GET /v1/bulk-jobs/{bulkJobId}`. Requires `sites.create`.
25640
+ */
25641
+ post: operations["createBulkSiteImport"];
25642
+ delete?: never;
25643
+ options?: never;
25644
+ head?: never;
25645
+ patch?: never;
25646
+ trace?: never;
25647
+ };
25648
+ "/v1/bulk-site-imports/preview": {
25649
+ parameters: {
25650
+ query?: never;
25651
+ header?: never;
25652
+ path?: never;
25653
+ cookie?: never;
25654
+ };
25655
+ get?: never;
25656
+ put?: never;
25657
+ /**
25658
+ * Check every row of a site file before anything is created.
25659
+ * @description Parses the rows (CSV; comma, semicolon or tab; a header row naming the columns, or no header and the columns in the template's order, so a pasted list of domains works) over the batch `defaults`, and answers per row what is wrong with it, by column: field validation by the one-site create path's own rules, an unknown site type, an unknown CDN, an own CDN account that is not connected (or not acknowledged on a platform-managed line), duplicates inside the file, a domain that is already one of the account's sites, and rows past the plan's remaining site slots. Nothing is written. A file that cannot be read at all comes back as `file_error` with a `200`, so the screen can say why. ⛔ `POST` for a read: a file does not fit in a query string. Requires `sites.create`.
25660
+ */
25661
+ post: operations["previewBulkSiteImport"];
25662
+ delete?: never;
25663
+ options?: never;
25664
+ head?: never;
25665
+ patch?: never;
25666
+ trace?: never;
25667
+ };
25668
+ "/v1/bulk-site-imports/template": {
25669
+ parameters: {
25670
+ query?: never;
25671
+ header?: never;
25672
+ path?: never;
25673
+ cookie?: never;
25674
+ };
25675
+ /**
25676
+ * The columns, allowed values and example file for Add many sites.
25677
+ * @description s1014 BULKUPLOAD. The single source of the upload format: the deploy form's "Many sites" mode renders its "Download example CSV" button and its instructions table from this, so the example file is by construction one the importer accepts. Requires `sites.create`.
25678
+ */
25679
+ get: operations["getBulkSiteImportTemplate"];
25680
+ put?: never;
25681
+ post?: never;
25682
+ delete?: never;
25683
+ options?: never;
25684
+ head?: never;
25685
+ patch?: never;
25686
+ trace?: never;
25687
+ };
25628
25688
  "/v1/campaigns": {
25629
25689
  parameters: {
25630
25690
  query?: never;
@@ -64655,6 +64715,76 @@ export interface components {
64655
64715
  /** Format: date */
64656
64716
  window_start: string | null;
64657
64717
  };
64718
+ /** @description za-265: the imported account's plan from its own history. `state` is `ok`, `notEnoughHistory` or `noConversions` (no waste is judged on a thin or conversion-less history — `decided_by` carries the counts and the bars that decided it) or `paused` (the org is not in good standing). Money in integer micros; conversions in thousandths. */
64719
+ AdsImportedPlan: {
64720
+ /** Format: date-time */
64721
+ built_at: string;
64722
+ decided_by?: {
64723
+ /** Format: int64 */
64724
+ account_cpa_micros?: number;
64725
+ /** Format: int64 */
64726
+ clicks?: number;
64727
+ /** Format: int64 */
64728
+ conversions_milli?: number;
64729
+ /** Format: int64 */
64730
+ cost_micros?: number;
64731
+ days_with_data?: number;
64732
+ min_clicks?: number;
64733
+ min_days?: number;
64734
+ };
64735
+ keep?: {
64736
+ campaigns?: ({
64737
+ campaign_id?: string;
64738
+ name?: string;
64739
+ } & components["schemas"]["AdsImportedPlanFigures"])[];
64740
+ countries?: ({
64741
+ country?: string;
64742
+ } & components["schemas"]["AdsImportedPlanFigures"])[];
64743
+ keywords?: ({
64744
+ campaign?: string;
64745
+ keyword?: string;
64746
+ resource?: string;
64747
+ } & components["schemas"]["AdsImportedPlanFigures"])[];
64748
+ };
64749
+ /** @enum {string} */
64750
+ state: "ok" | "notEnoughHistory" | "noConversions" | "paused";
64751
+ structural?: components["schemas"]["AdsImportedPlanItem"][];
64752
+ waste?: components["schemas"]["AdsImportedPlanItem"][];
64753
+ };
64754
+ AdsImportedPlanFigures: {
64755
+ /** Format: int64 */
64756
+ clicks?: number;
64757
+ /** Format: int64 */
64758
+ conversions_milli?: number;
64759
+ /** Format: int64 */
64760
+ cost_micros?: number;
64761
+ };
64762
+ /** @description One plan item. `kind`: `searchNegative` (an EXACT negative for `term` on `campaigns`), `keywordPause` (`keyword`, `resource`), `countryExclude` (`country`, ISO 3166-1 alpha-2, with `expected_conversions` at the account's own rate), `bidForConversions` (`campaign_id`, `campaign`, `from`, `conversions_30d`, `need` — the bid-ladder rung), `sharedBudget` (`budget`, `campaigns` — a person's step) or `noConversionAction`. A write carries the pending change it queued (`change_id`, `change_status`). */
64763
+ AdsImportedPlanItem: {
64764
+ budget?: string;
64765
+ campaign?: string;
64766
+ campaign_id?: string;
64767
+ campaigns?: string[];
64768
+ /** Format: uuid */
64769
+ change_id?: string;
64770
+ change_status?: string;
64771
+ /** Format: int64 */
64772
+ clicks?: number;
64773
+ conversions_30d?: number;
64774
+ /** Format: int64 */
64775
+ conversions_milli?: number;
64776
+ /** Format: int64 */
64777
+ cost_micros?: number;
64778
+ country?: string;
64779
+ expected_conversions?: number;
64780
+ from?: string;
64781
+ keyword?: string;
64782
+ /** @enum {string} */
64783
+ kind: "searchNegative" | "keywordPause" | "countryExclude" | "bidForConversions" | "sharedBudget" | "noConversionAction";
64784
+ need?: number;
64785
+ resource?: string;
64786
+ term?: string;
64787
+ };
64658
64788
  /** @description One reading of an account, or null before its first audit. `figures` depends on `kind` (docs/1006 §30): money is integer minor units (`*_minor`) or micros (`*_micros`) of the account's currency, never a float; missed clicks and conversions are estimates. */
64659
64789
  AdsInsightReading: {
64660
64790
  /** Format: date */
@@ -72104,7 +72234,7 @@ export interface components {
72104
72234
  * @example unsupported_platform
72105
72235
  * @enum {string}
72106
72236
  */
72107
- BulkErrorCode: "not_wordpress" | "not_serving" | "unsupported_platform" | "capability_denied" | "not_installed" | "unknown_blueprint" | "site_missing" | "driver_unresolved" | "vendor_refused" | "install_failed" | "not_in_good_standing" | "already_deleted" | "not_php" | "no_cdn" | "needs_addon" | "refused" | "file_missing" | "file_not_regular" | "unknown";
72237
+ BulkErrorCode: "not_wordpress" | "not_serving" | "unsupported_platform" | "capability_denied" | "not_installed" | "unknown_blueprint" | "site_missing" | "driver_unresolved" | "vendor_refused" | "install_failed" | "not_in_good_standing" | "already_deleted" | "not_php" | "no_cdn" | "needs_addon" | "refused" | "file_missing" | "file_not_regular" | "domain_taken" | "domain_probe_budget" | "create_refused" | "invalid_row" | "unknown";
72108
72238
  /** @description One plugin, and how far it reaches across the sites that were read. */
72109
72239
  BulkInstalledPlugin: {
72110
72240
  /** @description How many have it switched on. Carried separately rather than derived: *"active on 3 of the 9 that have it"* is the sentence somebody about to press **Deactivate** needs, and it cannot be recovered from one number. */
@@ -72223,8 +72353,12 @@ export interface components {
72223
72353
  error_code: components["schemas"]["BulkErrorCode"] | null;
72224
72354
  /** @description For a `find_file` or `delete_file` item that succeeded: the file's size and last modified time. `null` for every other item, and for a file item written before these facts were recorded. */
72225
72355
  file: components["schemas"]["BulkJobItemFile"] | null;
72356
+ /** @description `site_create` only: the one-site create path's own keyed refusal for a refused row (domain taken, no site slot, product line not allowed), rendered by the client in the reader's language. `null` otherwise. The row's create payload is never echoed. */
72357
+ refusal?: components["schemas"]["Refusal"] | null;
72226
72358
  /** @description Whether `retry-failed` would reopen this item: every `failed` item, and every `skipped` item whose code is not a final answer. A search that found no such file (`file_missing`, `file_not_regular`) has answered and is not retried. Count these to label a retry control; do not re-derive the rule from `status`. */
72227
72359
  retryable: boolean;
72360
+ /** @description `site_create` (Add many sites) only: the row's line in the uploaded file, the header being line 1, so the report says "line 14" in the customer's own terms. `null` for every other operation. Until the row's site exists, `site_id` is a placeholder. */
72361
+ row?: number | null;
72228
72362
  /** Format: date-time */
72229
72363
  settled_at: string | null;
72230
72364
  /** @description Carried on the row rather than joined, so the report survives the site being deleted mid-job — which, on a long run, is not hypothetical. */
@@ -72446,7 +72580,7 @@ export interface components {
72446
72580
  * @example plugin_install
72447
72581
  * @enum {string}
72448
72582
  */
72449
- BulkOperation: "stack_apply" | "blueprint_apply" | "application_install" | "plugin_install" | "plugin_activate" | "plugin_deactivate" | "plugin_remove" | "plugin_update" | "theme_install" | "core_update" | "wp_search_replace" | "featured_image_backfill" | "wp_auto_updates" | "site_delete" | "php_version" | "force_https" | "canonical_www" | "country_lock" | "cdn_purge" | "malware_scan" | "malware_clean" | "find_file" | "delete_file";
72583
+ BulkOperation: "stack_apply" | "blueprint_apply" | "application_install" | "plugin_install" | "plugin_activate" | "plugin_deactivate" | "plugin_remove" | "plugin_update" | "theme_install" | "core_update" | "wp_search_replace" | "featured_image_backfill" | "wp_auto_updates" | "site_delete" | "php_version" | "force_https" | "canonical_www" | "country_lock" | "cdn_purge" | "malware_scan" | "malware_clean" | "find_file" | "delete_file" | "site_create";
72450
72584
  /** @description The outcome of restoring every restorable site for one org. */
72451
72585
  BulkRestoreResult: {
72452
72586
  /** @description Each site that could not be restored, with the reason code. */
@@ -72469,6 +72603,93 @@ export interface components {
72469
72603
  * @enum {string}
72470
72604
  */
72471
72605
  BulkSelector: "sites" | "product_line" | "org" | "group" | "filter";
72606
+ /** @description "Settings for all sites": any of these `SiteCreate` fields, applied to every row that leaves the matching column blank. A row naming its own `site_type` drops the batch's stack-specific choices (blueprint, application, PHP, theme, plugins). `footprint_acknowledged` is the shared-footprint warning accepted for own-CDN rows on a platform-managed line. Any other key is ignored. */
72607
+ BulkSiteImportDefaults: {
72608
+ application?: string;
72609
+ /** @enum {string} */
72610
+ canonical_host?: "apex" | "www";
72611
+ cdn_account_id?: string;
72612
+ cdn_tier?: string;
72613
+ cdn_vendor?: string;
72614
+ create_mailbox?: boolean;
72615
+ deploy_target?: string;
72616
+ dns_vendor?: string;
72617
+ footprint_acknowledged?: boolean;
72618
+ force_https?: boolean;
72619
+ php_version?: string;
72620
+ plugins?: string[];
72621
+ random_theme?: boolean;
72622
+ region?: string;
72623
+ site_blueprint_id?: components["schemas"]["Uuid"];
72624
+ source?: string;
72625
+ stack_type?: string;
72626
+ subscription_id?: components["schemas"]["Uuid"];
72627
+ theme?: string;
72628
+ use_own_dns?: boolean;
72629
+ } & {
72630
+ [key: string]: unknown;
72631
+ };
72632
+ BulkSiteImportPreview: {
72633
+ /** @enum {string|null} */
72634
+ file_error: "file_empty" | "file_too_large" | "no_rows" | null;
72635
+ invalid: number;
72636
+ quota: {
72637
+ enough: boolean;
72638
+ product_line: string;
72639
+ /** @description `null` = unlimited. */
72640
+ remaining: number | null;
72641
+ rows: number;
72642
+ }[];
72643
+ rows: {
72644
+ /** @description The row's CDN vendor, `own` for the customer's own account, or empty for the line default. */
72645
+ cdn: string;
72646
+ domain: string;
72647
+ errors: components["schemas"]["BulkSiteImportRowError"][];
72648
+ name: string;
72649
+ product_line: string;
72650
+ row: number;
72651
+ site_type: string;
72652
+ title?: string;
72653
+ }[];
72654
+ total: number;
72655
+ valid: number;
72656
+ };
72657
+ BulkSiteImportRequest: {
72658
+ /** @description The rows' text. Comma, semicolon or tab separated; the first line is the header when it names a `domain` column, otherwise every line is a row in the template's order. */
72659
+ csv: string;
72660
+ defaults?: components["schemas"]["BulkSiteImportDefaults"];
72661
+ note?: string;
72662
+ /** @description The account the sites belong to. Optional when you reach exactly one. */
72663
+ org_id?: components["schemas"]["Uuid"] | null;
72664
+ /** @description The product line every row is created on (the deploy form's line). */
72665
+ product_line?: string;
72666
+ };
72667
+ BulkSiteImportRowError: {
72668
+ /** @enum {string} */
72669
+ code: "domain_missing" | "domain_invalid" | "domain_duplicate" | "domain_exists" | "site_type_missing" | "unknown_site_type" | "unknown_cdn" | "cdn_account_missing" | "cdn_account_not_connected" | "cdn_needs_acknowledgement" | "title_needs_wordpress" | "invalid_value" | "over_plan_limit";
72670
+ column: string;
72671
+ };
72672
+ BulkSiteImportTemplate: {
72673
+ /** @description The `cdn` value meaning "my own connected CDN account" (named in `cdn_account`). */
72674
+ cdn_own_value?: string;
72675
+ columns: {
72676
+ allowed: string[];
72677
+ example: string;
72678
+ name: string;
72679
+ required: boolean;
72680
+ }[];
72681
+ example_csv: string;
72682
+ max_file_bytes: number;
72683
+ };
72684
+ BulkSiteImportUpload: {
72685
+ /** @description `BulkSiteImportDefaults` as a JSON string. */
72686
+ defaults?: string;
72687
+ /** Format: binary */
72688
+ file: string;
72689
+ note?: string;
72690
+ org_id?: components["schemas"]["Uuid"];
72691
+ product_line?: string;
72692
+ };
72472
72693
  BulkVendorOperationRequest: {
72473
72694
  /**
72474
72695
  * @description Which platform operation to run. ⛔ A closed set, not a passthrough — a client cannot name an upstream path. `block_country` and `delete` are deliberately absent and answer `422` with the reason if asked for.
@@ -99560,6 +99781,8 @@ export interface components {
99560
99781
  * @example bunny_dns
99561
99782
  */
99562
99783
  dns_vendor?: string;
99784
+ /** @description Omitted means `false`. The customer accepted the shared-footprint warning for their own CDN account on a platform-managed line (Footprint-Free). With it, `cdn_tier: byo` plus a named `cdn_account_id` is accepted at create on that line; without it, refused (`422`). */
99785
+ footprint_acknowledged?: boolean;
99563
99786
  /** @description Redirect http to https at the edge. **Omitted means `true`** — the insecure choice has to be asked for and is never reached by leaving the field out. */
99564
99787
  force_https?: boolean;
99565
99788
  /** @example Acme Marketing Site */
@@ -141112,6 +141335,7 @@ export interface operations {
141112
141335
  error: string | null;
141113
141336
  history: components["schemas"]["AdsImportedHistory"] | null;
141114
141337
  import: components["schemas"]["AdsImportedAccount"] | null;
141338
+ plan: components["schemas"]["AdsImportedPlan"] | null;
141115
141339
  /** Format: date-time */
141116
141340
  read_at: string | null;
141117
141341
  /** @enum {string} */
@@ -154168,6 +154392,86 @@ export interface operations {
154168
154392
  429: components["responses"]["TooManyRequests"];
154169
154393
  };
154170
154394
  };
154395
+ createBulkSiteImport: {
154396
+ parameters: {
154397
+ query?: never;
154398
+ header?: never;
154399
+ path?: never;
154400
+ cookie?: never;
154401
+ };
154402
+ requestBody: {
154403
+ content: {
154404
+ "application/json": components["schemas"]["BulkSiteImportRequest"];
154405
+ "multipart/form-data": components["schemas"]["BulkSiteImportUpload"];
154406
+ };
154407
+ };
154408
+ responses: {
154409
+ /** @description The job was created and is running. */
154410
+ 202: {
154411
+ headers: {
154412
+ [name: string]: unknown;
154413
+ };
154414
+ content: {
154415
+ "application/json": components["schemas"]["BulkJob"];
154416
+ };
154417
+ };
154418
+ 401: components["responses"]["Unauthorized"];
154419
+ 403: components["responses"]["Forbidden"];
154420
+ 409: components["responses"]["Conflict"];
154421
+ 422: components["responses"]["UnprocessableEntity"];
154422
+ 429: components["responses"]["TooManyRequests"];
154423
+ };
154424
+ };
154425
+ previewBulkSiteImport: {
154426
+ parameters: {
154427
+ query?: never;
154428
+ header?: never;
154429
+ path?: never;
154430
+ cookie?: never;
154431
+ };
154432
+ requestBody: {
154433
+ content: {
154434
+ "application/json": components["schemas"]["BulkSiteImportRequest"];
154435
+ "multipart/form-data": components["schemas"]["BulkSiteImportUpload"];
154436
+ };
154437
+ };
154438
+ responses: {
154439
+ /** @description Every row and what is wrong with it. */
154440
+ 200: {
154441
+ headers: {
154442
+ [name: string]: unknown;
154443
+ };
154444
+ content: {
154445
+ "application/json": components["schemas"]["BulkSiteImportPreview"];
154446
+ };
154447
+ };
154448
+ 401: components["responses"]["Unauthorized"];
154449
+ 403: components["responses"]["Forbidden"];
154450
+ 422: components["responses"]["UnprocessableEntity"];
154451
+ };
154452
+ };
154453
+ getBulkSiteImportTemplate: {
154454
+ parameters: {
154455
+ query?: never;
154456
+ header?: never;
154457
+ path?: never;
154458
+ cookie?: never;
154459
+ };
154460
+ requestBody?: never;
154461
+ responses: {
154462
+ /** @description The upload format. */
154463
+ 200: {
154464
+ headers: {
154465
+ [name: string]: unknown;
154466
+ };
154467
+ content: {
154468
+ "application/json": components["schemas"]["BulkSiteImportTemplate"];
154469
+ };
154470
+ };
154471
+ 401: components["responses"]["Unauthorized"];
154472
+ 403: components["responses"]["Forbidden"];
154473
+ };
154474
+ };
154171
154475
  listCampaigns: {
154172
154476
  parameters: {
154173
154477
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1433",
3
+ "version": "0.1.1435",
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>",