@zinn-digital/sdk 0.1.1622 → 0.1.1626

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.
@@ -16889,7 +16889,7 @@ export interface paths {
16889
16889
  put?: never;
16890
16890
  /**
16891
16891
  * Approve, reject, undo, or allow a rejected change again.
16892
- * @description Gated on `ads.manage`; audit action `ads.change_<action>`. `approve` sends exactly the proposed request to Google in the background (202); a kill switch, the spend ceiling or the organisation's standing can still refuse it (`refused`). When the send meets Google's daily operation allowance the change stays `approved` with `summary.deferred_to` (when it is sent — automatically, by the same workflow), never refused. `undo` sends the change's inverse (202) — allowed with the kill switch on; an Undo that meets the same allowance leaves the change `applied` with `summary.undo_deferred_to` and is sent after the reset by the same Undo workflow (never recorded as failed), even when that is past the Undo window. A rejection binds the item on Google, Microsoft Ads and X alike. `reject` answers 200. A rejected negative keyword or keyword (same account, text, match type and level) is never proposed or sent again by any producer — the gate refuses it `rejectedBefore`, whether or not it still collides — until `allow_again` (200, a rejected change only, else `notRejected`; leaves `summary.allowed_again` `{by, at}`); `undo_allow_again` (200, else `notAllowedAgain`) puts the rejection back.
16892
+ * @description Gated on `ads.manage`; audit action `ads.change_<action>`. `approve` sends exactly the proposed request to Google in the background (202); a kill switch, the spend ceiling or the organisation's standing can still refuse it (`refused`). When the send meets Google's daily operation allowance the change stays `approved` with `summary.deferred_to` (when it is sent — automatically, by the same workflow), never refused. za-326 r3: an approval does not override a network's learning phase — an automatic change approved while the network says its unit is learning stays `approved` with `summary.learning` (`rule`, `network`) and `summary.deferred_to` (when learning is read again), and is sent once learning ends. `undo` sends the change's inverse (202) — allowed with the kill switch on; an Undo that meets the same allowance leaves the change `applied` with `summary.undo_deferred_to` and is sent after the reset by the same Undo workflow (never recorded as failed), even when that is past the Undo window. A rejection binds the item on Google, Microsoft Ads and X alike. `reject` answers 200. A rejected negative keyword or keyword (same account, text, match type and level) is never proposed or sent again by any producer — the gate refuses it `rejectedBefore`, whether or not it still collides — until `allow_again` (200, a rejected change only, else `notRejected`; leaves `summary.allowed_again` `{by, at}`); `undo_allow_again` (200, else `notAllowedAgain`) puts the rejection back.
16893
16893
  */
16894
16894
  post: operations["decideAdsChange"];
16895
16895
  delete?: never;
@@ -34097,7 +34097,7 @@ export interface paths {
34097
34097
  };
34098
34098
  /**
34099
34099
  * What the SMS screen needs — open?, paused?, credit balance and prices.
34100
- * @description Gated on `email_marketing.view`. `open` is true only when Zinn® Campaigns AND its SMS channel are open to this organisation (both ship off; pilot organisations first). `paused` is true while this organisation's SMS is paused by the spike guard (staff resume it). `prices` lists every country SMS can be sent to today with the price per message part in US dollar micros — the measured provider rate plus the margin row, the same figure the send charges. A country that needs a registered sender first (the US, India, the UAE, Saudi Arabia …) is not listed — unless this organisation's own approved registration opened it (US 10DLC, `/v1/email-marketing/sms/registrations/us`). Messages are paid from the Zinn® credit balance before they are sent.
34100
+ * @description Gated on `email_marketing.view`. `open` is true only when Zinn® Campaigns AND its SMS channel are open to this organisation (both ship off; pilot organisations first). `paused` is true while this organisation's SMS is paused by the spike guard (staff resume it). `prices` lists every country SMS can be sent to today with the price per message part in US dollar micros — the measured provider rate plus the margin row, the same figure the send charges. A country that needs a registered sender first (the US, India, the UAE, Saudi Arabia …) is not listed — unless this organisation's own approved registration opened it (US 10DLC, `/v1/email-marketing/sms/registrations/us`). Messages are paid from the Zinn® credit balance before they are sent. Texts go out under the organisation's OWN name: `sender_id` (set with `PUT /v1/email-marketing/sms/sender-id`) in `sender_id_countries`, else its own registered number; never Zinn®'s numbers or names.
34101
34101
  */
34102
34102
  get: operations["getEmailMarketingSms"];
34103
34103
  put?: never;
@@ -34220,6 +34220,26 @@ export interface paths {
34220
34220
  patch?: never;
34221
34221
  trace?: never;
34222
34222
  };
34223
+ "/v1/email-marketing/sms/sender-id": {
34224
+ parameters: {
34225
+ query?: never;
34226
+ header?: never;
34227
+ path?: never;
34228
+ cookie?: never;
34229
+ };
34230
+ get?: never;
34231
+ /**
34232
+ * Set this organisation's own SMS sender name (alphanumeric sender ID).
34233
+ * @description Gated on `email_marketing.manage`. Texts go out under the customer's OWN name, never Zinn®'s: where a country allows an alphanumeric sender ID (`sender_id_countries` on `GET /v1/email-marketing/sms`), this is the name the handset shows. 3 to 11 letters, digits or spaces, with at least one letter; Zinn®'s own names are refused. An empty `sender_id` clears it, and SMS to those countries is then refused with `own_sender_required` before any credit is taken. Refusal: `CAMPAIGNS_SENDER_ID_INVALID` (400, `details[].code` says why). Audited (`email_marketing.sms.sender_id.update`).
34234
+ */
34235
+ put: operations["setEmailMarketingSmsSenderId"];
34236
+ post?: never;
34237
+ delete?: never;
34238
+ options?: never;
34239
+ head?: never;
34240
+ patch?: never;
34241
+ trace?: never;
34242
+ };
34223
34243
  "/v1/entitlements": {
34224
34244
  parameters: {
34225
34245
  query?: never;
@@ -58250,8 +58270,8 @@ export interface paths {
58250
58270
  get?: never;
58251
58271
  put?: never;
58252
58272
  /**
58253
- * Inbound SMS replies (STOP / START) from our SMS vendor.
58254
- * @description **Unauthenticated by design**: the vendor's Ed25519 signature over `timestamp|raw body` (`telnyx-signature-ed25519`, `telnyx-timestamp`), checked with the public key held in the Campaigns settings, is the authentication — `401` when it does not verify or is older than five minutes, `503` while no key is configured (never accepted unverified). A `message.received` whose whole text is a STOP word opts the number out of SMS for every account holding it as a contact; START removes those reply opt-outs. Anything else is acknowledged and ignored. Redelivery is a no-op.
58273
+ * Inbound SMS replies (STOP / START) and delivery receipts from our SMS vendor.
58274
+ * @description **Unauthenticated by design**: the vendor's Ed25519 signature over `timestamp|raw body` (`telnyx-signature-ed25519`, `telnyx-timestamp`), checked with the public key held in the Campaigns settings, is the authentication — `401` when it does not verify or is older than five minutes, `503` while no key is configured (never accepted unverified). A `message.received` whose whole text is a STOP word opts the number out of SMS for every account holding it as a contact; START removes those reply opt-outs. A `message.finalized` records the delivery receipt (`delivered`, `failed` with the vendor's error code, or `unconfirmed`) on the paid message with that vendor id; an unknown status is left awaiting. Anything else is acknowledged and ignored. Redelivery is a no-op.
58255
58275
  */
58256
58276
  post: operations["receiveCampaignsTelnyxInbound"];
58257
58277
  delete?: never;
@@ -65772,6 +65792,10 @@ export interface components {
65772
65792
  found?: {
65773
65793
  [key: string]: number;
65774
65794
  };
65795
+ /** @description za-326: the proposals a learning rule held, per rule code — `bid_strategy` (our 14-day freeze after a bid-strategy switch), `meta_learning_phase` (Meta reports the ad set as learning), `tiktok_learning_phase` (TikTok's first 7 days / 25 results). Each network's rule comes from the network registry; a Google negative or exclusion is never held (Google: targeting changes never trigger Learning). Absent when none. */
65796
+ learning_held?: {
65797
+ [key: string]: number;
65798
+ };
65775
65799
  proposed?: number;
65776
65800
  read?: {
65777
65801
  [key: string]: number;
@@ -65782,6 +65806,8 @@ export interface components {
65782
65806
  * @enum {string}
65783
65807
  */
65784
65808
  sanity_unchecked?: "x_no_targeting_read" | "no_keyword_read" | "held_trackingUnreadable" | "held_trackingUnreliable" | "held" | "names_unread";
65809
+ /** @description Proposals a learning rule held (nothing sent or queued). */
65810
+ skipped_learning?: number;
65785
65811
  skipped_recent?: number;
65786
65812
  } & {
65787
65813
  [key: string]: unknown;
@@ -66516,7 +66542,7 @@ export interface components {
66516
66542
  /** @enum {string|null} */
66517
66543
  source: "auto" | "person" | "launch" | null;
66518
66544
  };
66519
- /** @description One change to an ad account. `summary` holds figures (service, operations, resources, values), never sentences. A Microsoft website exclusion re-added by the hourly repair (PG2FIX) carries `reason: reapplied_after_concurrent_edit`. An automatic raise (AUTO3) carries `auto_action` (`cap_raise` za-141 · `budget_raise` za-144), `campaign`, `campaign_id`, `from_micros`, `to_micros`, `cpa_micros`, `account_cpa_micros` and `lost_rank` or `lost_budget`, plus za-157's quality gate figures `quality_signal`, `quality_rate` and `quality_account_rate`. A conflicting negative keyword (za-182, `auto_action: negative_conflict`) carries `decision` (`pause_keywords` · `narrow_negative` · `remove_negative` · `move_to_campaigns`, with `keep_campaigns` `id`/`name`), `reasons` (`negative_newer` · `owner_kept` · `shared_list` · `waste_negative` · `keyword_converts` · `keyword_newer` · `keyword_wins` · `list_reaches_sibling`), `negative` (`text`, `match`, `level` campaign · ad_group · list · account, `where`, `resource`), `blocked` (up to 20 keywords: `text`, `match`, `campaign`, `ad_group`, `resource`) and `blocked_count`. A write that would ADD a negative blocking an enabled keyword is refused before it is sent or queued, whoever asked. A new keyword the audit adds (za-81, `auto_action: new_keyword`) carries `keyword`, `campaign`, `campaign_id`, `ad_group`, `clicks`, `conversions`, `est_daily_micros` and `currency`; when approved it is checked for collisions once more as it is sent, and refused (`error` starting `collides:`) when it would take searches from another ad group. A conversion-goal change (za-78, `auto_action: primary_goal`) carries `goal_action` (the conversion action's name), `goal_category`, `goal_primary` (the new flag), `goal_rule` (`outcome_secondary` · `soft_primary`) and `goal_recorded` (its 30-day count); it is approve-first always, and refused (`error` `goalStarves`, figures in `goal_check`: `recording_now`, `recording_after`) when it would leave no primary conversion action that records — whoever approved it; `error` `goalUnreadable` (no `goal_check`) when the account's conversion actions could not be read to check it. za-70: every change on a customer's account that adds a negative keyword or a keyword is replayed by the collision simulator first, and the replay is kept in `collision`: `checked_at`, `unread` (the account could not be read — a collision, never "clean"), `changes` (each `kind` negative · keyword, `text`, `match`, `ad_group`), `collisions` (each `kind` keyword · converted · main · growing · competes · takes, `text`, `campaign`, `ad_group`) with `collisions_total`, `hits` (up to 10 searches of the last 30 days with a click or a conversion it would block or compete for: `term`, `campaign`, `ad_group`, `clicks`, `conversions_milli`) with `hits_total`, `clicks` and `conversions_milli` (totals). A colliding change is never sent by itself: with the connection's `collision_mode` `approve` it waits in the queue, and a person's approval sends it only when a fresh replay finds no collision they were not shown; otherwise, and with `refuse`, it is refused (`error` `collides`). When the account could not be read for the replay (`collision.unread`) an approval, or `refuse`, refuses it `collisionUnread` — nothing established, asked again once the account reads. za-213 (site-to-ad sync for a site hosted with us, `proposed_by: site-sync`): `auto_action: site_sync` is an ad text edit writing a hosted page's new price (`url`, `old_price_minor`, `new_price_minor`, `currency`, integer minor units); `auto_action: site_sync_pause` pauses the ads of a page whose offer ended (`url`). */
66545
+ /** @description One change to an ad account. `summary` holds figures (service, operations, resources, values), never sentences. za-326 r3: a change queued (or approved and waiting) while the network says its ad set is learning carries `learning` (`rule`: an `AdsAuditRun` `learning_held` code, `network`: the network's name). A Microsoft website exclusion re-added by the hourly repair (PG2FIX) carries `reason: reapplied_after_concurrent_edit`. An automatic raise (AUTO3) carries `auto_action` (`cap_raise` za-141 · `budget_raise` za-144), `campaign`, `campaign_id`, `from_micros`, `to_micros`, `cpa_micros`, `account_cpa_micros` and `lost_rank` or `lost_budget`, plus za-157's quality gate figures `quality_signal`, `quality_rate` and `quality_account_rate`. A conflicting negative keyword (za-182, `auto_action: negative_conflict`) carries `decision` (`pause_keywords` · `narrow_negative` · `remove_negative` · `move_to_campaigns`, with `keep_campaigns` `id`/`name`), `reasons` (`negative_newer` · `owner_kept` · `shared_list` · `waste_negative` · `keyword_converts` · `keyword_newer` · `keyword_wins` · `list_reaches_sibling`), `negative` (`text`, `match`, `level` campaign · ad_group · list · account, `where`, `resource`), `blocked` (up to 20 keywords: `text`, `match`, `campaign`, `ad_group`, `resource`) and `blocked_count`. A write that would ADD a negative blocking an enabled keyword is refused before it is sent or queued, whoever asked. A new keyword the audit adds (za-81, `auto_action: new_keyword`) carries `keyword`, `campaign`, `campaign_id`, `ad_group`, `clicks`, `conversions`, `est_daily_micros` and `currency`; when approved it is checked for collisions once more as it is sent, and refused (`error` starting `collides:`) when it would take searches from another ad group. A conversion-goal change (za-78, `auto_action: primary_goal`) carries `goal_action` (the conversion action's name), `goal_category`, `goal_primary` (the new flag), `goal_rule` (`outcome_secondary` · `soft_primary`) and `goal_recorded` (its 30-day count); it is approve-first always, and refused (`error` `goalStarves`, figures in `goal_check`: `recording_now`, `recording_after`) when it would leave no primary conversion action that records — whoever approved it; `error` `goalUnreadable` (no `goal_check`) when the account's conversion actions could not be read to check it. za-70: every change on a customer's account that adds a negative keyword or a keyword is replayed by the collision simulator first, and the replay is kept in `collision`: `checked_at`, `unread` (the account could not be read — a collision, never "clean"), `changes` (each `kind` negative · keyword, `text`, `match`, `ad_group`), `collisions` (each `kind` keyword · converted · main · growing · competes · takes, `text`, `campaign`, `ad_group`) with `collisions_total`, `hits` (up to 10 searches of the last 30 days with a click or a conversion it would block or compete for: `term`, `campaign`, `ad_group`, `clicks`, `conversions_milli`) with `hits_total`, `clicks` and `conversions_milli` (totals). A colliding change is never sent by itself: with the connection's `collision_mode` `approve` it waits in the queue, and a person's approval sends it only when a fresh replay finds no collision they were not shown; otherwise, and with `refuse`, it is refused (`error` `collides`). When the account could not be read for the replay (`collision.unread`) an approval, or `refuse`, refuses it `collisionUnread` — nothing established, asked again once the account reads. za-213 (site-to-ad sync for a site hosted with us, `proposed_by: site-sync`): `auto_action: site_sync` is an ad text edit writing a hosted page's new price (`url`, `old_price_minor`, `new_price_minor`, `currency`, integer minor units); `auto_action: site_sync_pause` pauses the ads of a page whose offer ended (`url`). */
66520
66546
  AdsChange: {
66521
66547
  action_class: string;
66522
66548
  /** Format: date-time */
@@ -83432,6 +83458,16 @@ export interface components {
83432
83458
  open: boolean;
83433
83459
  sender_count: number;
83434
83460
  };
83461
+ /** @description The organisation's OWN sending identities (owner ruling 2026-11-08): SMS and WhatsApp go out under the customer's name and WhatsApp Business Account, never Zinn®'s. */
83462
+ EmailMarketingOwnSenders: {
83463
+ /** @description The alphanumeric SMS sender ID ("" when not set). */
83464
+ sender_id: string;
83465
+ /** @description Countries where `sender_id` is used. Others need a registered number. */
83466
+ sender_id_countries: string[];
83467
+ /** @description The organisation's own WhatsApp Business Account is connected. */
83468
+ whatsapp_connected: boolean;
83469
+ whatsapp_display_phone: string;
83470
+ };
83435
83471
  EmailMarketingSender: {
83436
83472
  /** Format: date-time */
83437
83473
  created_at: string;
@@ -83498,6 +83534,10 @@ export interface components {
83498
83534
  country: string;
83499
83535
  price_usd_micros_per_part: number;
83500
83536
  }[];
83537
+ sender_id: string;
83538
+ sender_id_countries: string[];
83539
+ whatsapp_connected: boolean;
83540
+ whatsapp_display_phone: string;
83501
83541
  };
83502
83542
  EmailMarketingTestResult: {
83503
83543
  detail: string;
@@ -109882,6 +109922,8 @@ export interface components {
109882
109922
  SmsMarketingCampaignReport: {
109883
109923
  /** Format: uuid */
109884
109924
  campaign_id: string;
109925
+ /** @description Sent messages the carrier confirmed delivered (Telnyx delivery receipt). */
109926
+ delivered: number;
109885
109927
  failed: number;
109886
109928
  /** @description Recipients who replied STOP after this campaign started. */
109887
109929
  opted_out: number;
@@ -109894,6 +109936,10 @@ export interface components {
109894
109936
  spent_usd_micros: number;
109895
109937
  /** @enum {string} */
109896
109938
  status: "draft" | "sending" | "paused" | "sent" | "refused";
109939
+ /** @description Sent messages the carrier gave no final answer for. `sent` minus these three is still awaiting a receipt. */
109940
+ unconfirmed: number;
109941
+ /** @description Sent messages the carrier or handset refused. The vendor charged for the attempt */
109942
+ undelivered: number;
109897
109943
  };
109898
109944
  SmsMarketingCampaignWrite: {
109899
109945
  /** Format: uuid */
@@ -173619,6 +173665,46 @@ export interface operations {
173619
173665
  503: components["responses"]["ServiceUnavailable"];
173620
173666
  };
173621
173667
  };
173668
+ setEmailMarketingSmsSenderId: {
173669
+ parameters: {
173670
+ query?: {
173671
+ /** @description The organization this call acts on. Optional for a caller with exactly one direct membership; **required** for anyone with more than one — which is every reseller and every agency — because the engine refuses rather than guesses (a wrong guess here writes one tenant's gateway credentials under another tenant's Vault path). */
173672
+ org_id?: components["parameters"]["OrgIdQuery"];
173673
+ };
173674
+ header?: never;
173675
+ path?: never;
173676
+ cookie?: never;
173677
+ };
173678
+ requestBody: {
173679
+ content: {
173680
+ "application/json": {
173681
+ sender_id: string;
173682
+ };
173683
+ };
173684
+ };
173685
+ responses: {
173686
+ /** @description The organisation's own sending identities after the change. */
173687
+ 200: {
173688
+ headers: {
173689
+ [name: string]: unknown;
173690
+ };
173691
+ content: {
173692
+ "application/json": components["schemas"]["EmailMarketingOwnSenders"];
173693
+ };
173694
+ };
173695
+ /** @description The sender ID is not allowed (`CAMPAIGNS_SENDER_ID_INVALID`). */
173696
+ 400: {
173697
+ headers: {
173698
+ [name: string]: unknown;
173699
+ };
173700
+ content: {
173701
+ "application/json": components["schemas"]["Error"];
173702
+ };
173703
+ };
173704
+ 401: components["responses"]["Unauthorized"];
173705
+ 403: components["responses"]["Forbidden"];
173706
+ };
173707
+ };
173622
173708
  getEntitlementUsage: {
173623
173709
  parameters: {
173624
173710
  query?: {
@@ -211934,7 +212020,9 @@ export interface operations {
211934
212020
  content: {
211935
212021
  "application/json": {
211936
212022
  /** @enum {string} */
211937
- handled: "stop" | "start" | "no_keyword" | "ignored";
212023
+ delivery?: "delivered" | "failed" | "unconfirmed";
212024
+ /** @enum {string} */
212025
+ handled: "stop" | "start" | "no_keyword" | "ignored" | "receipt" | "unknown_message" | "unknown_status" | "no_message_id";
211938
212026
  ok: boolean;
211939
212027
  orgs?: number;
211940
212028
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1622",
3
+ "version": "0.1.1626",
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>",