@zinn-digital/sdk 0.1.1812 → 0.1.1814

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.
@@ -35180,8 +35180,8 @@ export interface paths {
35180
35180
  get?: never;
35181
35181
  put?: never;
35182
35182
  /**
35183
- * Send one SMS to one contact, paid from the Zinn® credit balance.
35184
- * @description Gated on `email_marketing.manage`. Every guard runs before the provider is called: the line and SMS switches, the account's good standing, the contact's SMS consent, this organisation's spike pause, an open country, and the credit — the price (parts x the country's price per part) is debited BEFORE sending and returned if the network refuses the message. Refusals carry a `refusal.campaigns.channel*` key: `CAMPAIGNS_NO_CREDIT` (402), `CAMPAIGNS_NO_CONSENT` / `CAMPAIGNS_SUPPRESSED` / `CAMPAIGNS_NO_PHONE` / `CAMPAIGNS_PAUSED` (409), `CAMPAIGNS_UNPRICED` / `CAMPAIGNS_COUNTRY_NOT_OPEN` / `CAMPAIGNS_VENDOR_REFUSED` (422), `CAMPAIGNS_TOO_LONG` (400), `CAMPAIGNS_NOT_OPEN` / `CAMPAIGNS_CHANNEL_OFF` / `CAMPAIGNS_ACCOUNT_ON_HOLD` (403), and `CAMPAIGNS_VENDOR_UNAVAILABLE` / `CAMPAIGNS_NOT_CONFIGURED` (503). One message per call; audited (`email_marketing.message.send`).
35183
+ * Send one SMS or WhatsApp message to one contact.
35184
+ * @description Gated on `email_marketing.manage`. `channel: whatsapp` sends a Meta-approved `template` (with `template_language` and up to 20 `template_params`) from the organisation's OWN WhatsApp Business account; it costs 0 Zinn® credit (Meta bills that account) and still checks good standing, WhatsApp consent and the WhatsApp spike pause. A missing or malformed template is refused with `CAMPAIGNS_TEMPLATE_REQUIRED` (400) before anything else; no own account is `CAMPAIGNS_OWN_SENDER_REQUIRED` (409). An SMS is paid from the Zinn® credit balance. Every guard runs before the provider is called: the line and SMS switches, the account's good standing, the contact's SMS consent, this organisation's spike pause, an open country, and the credit — the price (parts x the country's price per part) is debited BEFORE sending and returned if the network refuses the message. Refusals carry a `refusal.campaigns.channel*` key: `CAMPAIGNS_NO_CREDIT` (402), `CAMPAIGNS_NO_CONSENT` / `CAMPAIGNS_SUPPRESSED` / `CAMPAIGNS_NO_PHONE` / `CAMPAIGNS_PAUSED` (409), `CAMPAIGNS_UNPRICED` / `CAMPAIGNS_COUNTRY_NOT_OPEN` / `CAMPAIGNS_VENDOR_REFUSED` (422), `CAMPAIGNS_TOO_LONG` (400), `CAMPAIGNS_NOT_OPEN` / `CAMPAIGNS_CHANNEL_OFF` / `CAMPAIGNS_ACCOUNT_ON_HOLD` (403), and `CAMPAIGNS_VENDOR_UNAVAILABLE` / `CAMPAIGNS_NOT_CONFIGURED` (503). One message per call; audited (`email_marketing.message.send`).
35185
35185
  */
35186
35186
  post: operations["sendEmailMarketingMessage"];
35187
35187
  delete?: never;
@@ -35642,14 +35642,14 @@ export interface paths {
35642
35642
  cookie?: never;
35643
35643
  };
35644
35644
  /**
35645
- * Bulk SMS campaigns, newest first, one keyset page.
35646
- * @description Gated on `email_marketing.view`.
35645
+ * Bulk SMS and WhatsApp campaigns, newest first, one keyset page.
35646
+ * @description Gated on `email_marketing.view`. `channel` narrows the page to one channel.
35647
35647
  */
35648
35648
  get: operations["listSmsMarketingCampaigns"];
35649
35649
  put?: never;
35650
35650
  /**
35651
- * Create a draft SMS to a list.
35652
- * @description Gated on `email_marketing.manage`.
35651
+ * Create a draft SMS or WhatsApp campaign to a list.
35652
+ * @description Gated on `email_marketing.manage`. `channel: whatsapp` sends an approved template from the organisation's own WhatsApp Business account (named "WhatsApp campaign" by default).
35653
35653
  */
35654
35654
  post: operations["createSmsMarketingCampaign"];
35655
35655
  delete?: never;
@@ -35713,7 +35713,7 @@ export interface paths {
35713
35713
  put?: never;
35714
35714
  /**
35715
35715
  * Start sending an SMS to everyone on its list who agreed to SMS — or resume one paused for credit.
35716
- * @description Gated on `email_marketing.manage`. The gate runs first, in order: the line is open, SMS is open to the account, the account is in good standing, the campaign is complete and within the length limit, SMS is not paused, someone on the list may be texted (a member, subscribed, with a number, an SMS consent and no STOP), and staff have reviewed a send above the review size. Each refusal is its own `409` code (`CAMPAIGNS_SMS_<CODE>`). On `202` a durable workflow sends in batches; each message is priced and paid from the account's credit before it leaves. When the credit runs out the campaign pauses (`no_credit`) and this call resumes it after a top-up. STOP replies or carrier rejections over the line pause the account's SMS; staff resume it.
35716
+ * @description Gated on `email_marketing.manage`. The gate runs first, in order: the line is open, SMS is open to the account, the account is in good standing, the campaign is complete and within the length limit, SMS is not paused, someone on the list may be texted (a member, subscribed, with a number, an SMS consent and no STOP), and staff have reviewed a send above the review size. Each refusal is its own `409` code (`CAMPAIGNS_SMS_<CODE>`). On `202` a durable workflow sends in batches; each message is priced and paid from the account's credit before it leaves. When the credit runs out the campaign pauses (`no_credit`) and this call resumes it after a top-up. STOP replies or carrier rejections over the line pause the account's SMS; staff resume it. A `whatsapp` campaign runs the same gate on WhatsApp's own switch, consent and pause, needs a complete template and the organisation's own connected WhatsApp Business account (`own_sender_required`), and costs 0 Zinn® credit (Meta bills that account). If Meta stops accepting that account's messages the campaign pauses as `whatsapp_not_ready`; the customer fixes the account and this call resumes it. A WhatsApp pause never pauses SMS campaigns, and the reverse.
35717
35717
  */
35718
35718
  post: operations["sendSmsMarketingCampaign"];
35719
35719
  delete?: never;
@@ -38197,6 +38197,66 @@ export interface paths {
38197
38197
  patch?: never;
38198
38198
  trace?: never;
38199
38199
  };
38200
+ "/v1/marketplace/guest-post-sites": {
38201
+ parameters: {
38202
+ query?: never;
38203
+ header?: never;
38204
+ path?: never;
38205
+ cookie?: never;
38206
+ };
38207
+ /**
38208
+ * Guest-post sites on sale, for a signed-in buyer (real identity once revealed).
38209
+ * @description GUESTFEED1114 — the same rows and filters as `listPublicGuestPostSites`. The real domain, name and sample link are filled in only for a signed-in user AND only while ZinnHub's feed is in `revealed` mode for this consumer (`revealed` on the page says which). Responses are `Cache-Control: private, no-store`. Requires authentication — any signed-in user.
38210
+ */
38211
+ get: operations["listGuestPostSites"];
38212
+ put?: never;
38213
+ post?: never;
38214
+ delete?: never;
38215
+ options?: never;
38216
+ head?: never;
38217
+ patch?: never;
38218
+ trace?: never;
38219
+ };
38220
+ "/v1/marketplace/guest-post-sites/{site_uid}": {
38221
+ parameters: {
38222
+ query?: never;
38223
+ header?: never;
38224
+ path?: never;
38225
+ cookie?: never;
38226
+ };
38227
+ /**
38228
+ * One guest-post site, every offer and metric (signed in).
38229
+ * @description GUESTFEED1114 — one site by its stable feed id (`s<digits>`). Identity rules as `listGuestPostSites`. `Cache-Control: private, no-store`.
38230
+ */
38231
+ get: operations["getGuestPostSite"];
38232
+ put?: never;
38233
+ post?: never;
38234
+ delete?: never;
38235
+ options?: never;
38236
+ head?: never;
38237
+ patch?: never;
38238
+ trace?: never;
38239
+ };
38240
+ "/v1/marketplace/guest-post-sites/{site_uid}/order": {
38241
+ parameters: {
38242
+ query?: never;
38243
+ header?: never;
38244
+ path?: never;
38245
+ cookie?: never;
38246
+ };
38247
+ get?: never;
38248
+ put?: never;
38249
+ /**
38250
+ * Order a guest post on one site — opens a support ticket in the caller's org.
38251
+ * @description GUESTFEED1114: no payment is taken here; the ticket (origin `guest_post_site_order`) carries the site, the chosen offer and its price, and staff fulfil it with the seller. Requires `tickets.reply` in the org (the caller's scope or `X-Zinn-Org`). An unknown site or offer index is 404.
38252
+ */
38253
+ post: operations["orderGuestPostSite"];
38254
+ delete?: never;
38255
+ options?: never;
38256
+ head?: never;
38257
+ patch?: never;
38258
+ trace?: never;
38259
+ };
38200
38260
  "/v1/marketplace/latest": {
38201
38261
  parameters: {
38202
38262
  query?: never;
@@ -46341,6 +46401,26 @@ export interface paths {
46341
46401
  patch?: never;
46342
46402
  trace?: never;
46343
46403
  };
46404
+ "/v1/public/guest-post-sites": {
46405
+ parameters: {
46406
+ query?: never;
46407
+ header?: never;
46408
+ path?: never;
46409
+ cookie?: never;
46410
+ };
46411
+ /**
46412
+ * Guest-post sites on sale, filtered, sorted and paged, every row blurred (public).
46413
+ * @description GUESTFEED1114 (ZinnHub ZH-5491, owner 2026-11-14) — the guest-post sites from ZinnHub's site-listings feed (synced hourly), for a visitor who is not signed in. ⛔ No site is NAMED: every row is `label` "Site 12" (its number) with `domain`, `domain_ascii`, `name` and `sample_url` null and `revealed: false`, even when a bearer token is sent (this endpoint reads no credentials at all). No filter or sort reads the real domain, so it cannot be probed. Filters: `language`, `country`, `min_dr`, `max_price_minor`, `link_type`; `sort` `dr` (default), `price` or `newest`; `per_page` 24, 48 or 96. Prices are integer minor units of `currency`, before VAT. Cached 5 minutes; no authentication (docs/1309).
46414
+ */
46415
+ get: operations["listPublicGuestPostSites"];
46416
+ put?: never;
46417
+ post?: never;
46418
+ delete?: never;
46419
+ options?: never;
46420
+ head?: never;
46421
+ patch?: never;
46422
+ trace?: never;
46423
+ };
46344
46424
  "/v1/public/house-tags": {
46345
46425
  parameters: {
46346
46426
  query?: never;
@@ -87636,6 +87716,10 @@ export interface components {
87636
87716
  whatsapp_connected: boolean;
87637
87717
  whatsapp_display_phone: string;
87638
87718
  whatsapp_health: components["schemas"]["EmailMarketingWhatsappHealth"];
87719
+ /** @description WhatsApp sending is open to this organisation (line, account and switch). */
87720
+ whatsapp_open: boolean;
87721
+ /** @description WhatsApp sending is paused for this organisation (its own spike pause). */
87722
+ whatsapp_paused: boolean;
87639
87723
  /** @description Embedded Signup's app and configuration ids; null when not offered yet. */
87640
87724
  whatsapp_signup: {
87641
87725
  app_id: string;
@@ -89859,6 +89943,58 @@ export interface components {
89859
89943
  GpuFlavourList: {
89860
89944
  flavours: components["schemas"]["GpuFlavour"][];
89861
89945
  };
89946
+ /** @description One guest-post site from ZinnHub's feed (GUESTFEED1114). `domain`, `domain_ascii`, `name` and `sample_url` are null unless `revealed` is true (signed in, feed revealed). */
89947
+ GuestPostSite: {
89948
+ country?: string | null;
89949
+ currency: string;
89950
+ domain?: string | null;
89951
+ domain_ascii?: string | null;
89952
+ dr?: number | null;
89953
+ general_niche?: string | null;
89954
+ /** @description The public name, "Site" and its number (e.g. "Site 12"). */
89955
+ label: string;
89956
+ labels?: string[];
89957
+ language?: string | null;
89958
+ /** Format: date-time */
89959
+ last_checked?: string | null;
89960
+ link_type?: string | null;
89961
+ max_links?: number | null;
89962
+ metrics?: {
89963
+ [key: string]: unknown;
89964
+ };
89965
+ name?: string | null;
89966
+ niches?: {
89967
+ [key: string]: unknown;
89968
+ }[];
89969
+ offers: ({
89970
+ name?: string | null;
89971
+ price_minor?: number | null;
89972
+ type?: string | null;
89973
+ } & {
89974
+ [key: string]: unknown;
89975
+ })[];
89976
+ price_from_minor?: number | null;
89977
+ revealed: boolean;
89978
+ revisions?: number | null;
89979
+ sample_url?: string | null;
89980
+ site_uid: string;
89981
+ sponsored_label?: string | null;
89982
+ turnaround_days?: number | null;
89983
+ verified_traffic?: {
89984
+ [key: string]: unknown;
89985
+ };
89986
+ word_count_min?: number | null;
89987
+ };
89988
+ GuestPostSitePage: {
89989
+ applied: {
89990
+ [key: string]: unknown;
89991
+ };
89992
+ data: components["schemas"]["GuestPostSite"][];
89993
+ page: number;
89994
+ per_page: number;
89995
+ revealed: boolean;
89996
+ total: number;
89997
+ };
89862
89998
  Health: {
89863
89999
  /**
89864
90000
  * @example ok
@@ -114656,9 +114792,11 @@ export interface components {
114656
114792
  uptime_target_percent: string;
114657
114793
  };
114658
114794
  SmsMarketingCampaign: {
114795
+ /** @enum {string} */
114796
+ channel: "sms" | "whatsapp";
114659
114797
  /** Format: date-time */
114660
114798
  created_at: string;
114661
- /** @description Paused for credit; `send` resumes it after a top-up. */
114799
+ /** @description Paused for something the customer fixes (credit, their own sender, or Meta not accepting their WhatsApp account's messages); `send` resumes it once fixed. */
114662
114800
  customer_can_resume: boolean;
114663
114801
  /** Format: date-time */
114664
114802
  finished_at: string | null;
@@ -114669,12 +114807,15 @@ export interface components {
114669
114807
  name: string;
114670
114808
  recipients_total: number;
114671
114809
  /** @enum {string|null} */
114672
- refusal_code: "not_open" | "channel_off" | "account_on_hold" | "incomplete" | "too_long" | "paused" | "empty" | "review" | "no_credit" | "not_configured" | null;
114810
+ refusal_code: "not_open" | "channel_off" | "account_on_hold" | "incomplete" | "too_long" | "paused" | "empty" | "review" | "no_credit" | "not_configured" | "own_sender_required" | "whatsapp_not_ready" | null;
114673
114811
  refusal_message: string | null;
114674
114812
  /** Format: date-time */
114675
114813
  started_at: string | null;
114676
114814
  /** @enum {string} */
114677
114815
  status: "draft" | "sending" | "paused" | "sent" | "refused";
114816
+ template: string | null;
114817
+ template_language: string | null;
114818
+ template_params: string[];
114678
114819
  text: string;
114679
114820
  /** Format: date-time */
114680
114821
  updated_at: string;
@@ -114707,9 +114848,20 @@ export interface components {
114707
114848
  undelivered: number;
114708
114849
  };
114709
114850
  SmsMarketingCampaignWrite: {
114851
+ /**
114852
+ * @description Chosen while the campaign is a draft. `whatsapp` sends `template` from the organisation's OWN WhatsApp Business account (0 Zinn® credit; Meta bills that account).
114853
+ * @enum {string}
114854
+ */
114855
+ channel?: "sms" | "whatsapp";
114710
114856
  /** Format: uuid */
114711
114857
  list_id?: string | null;
114712
114858
  name?: string;
114859
+ /** @description WhatsApp only — the name of a template Meta approved for this account. */
114860
+ template?: string;
114861
+ /** @description WhatsApp only — the template's language code */
114862
+ template_language?: string;
114863
+ /** @description WhatsApp only — the values for the template body's `{{1}}`, `{{2}}`, … in order (the same for every recipient). */
114864
+ template_params?: string[];
114713
114865
  /** @description The message. Longer than 160 GSM-7 characters is sent (and priced) as several parts. */
114714
114866
  text?: string;
114715
114867
  };
@@ -180376,9 +180528,15 @@ export interface operations {
180376
180528
  * @default sms
180377
180529
  * @enum {string}
180378
180530
  */
180379
- channel?: "sms";
180380
- /** @description The message. At most 1,530 characters (10 parts) are sent. */
180381
- text: string;
180531
+ channel?: "sms" | "whatsapp";
180532
+ /** @description WhatsApp only (required): the name of a template Meta approved for this organisation's WhatsApp Business account (lower-case letters, digits, `_`). */
180533
+ template?: string;
180534
+ /** @description WhatsApp only (required) — the template's language code, e.g. `en_GB`. */
180535
+ template_language?: string;
180536
+ /** @description WhatsApp only — the values for the template body's `{{1}}`, `{{2}}`, … in order. */
180537
+ template_params?: string[];
180538
+ /** @description The SMS text (required for `sms`; ignored for `whatsapp`). At most 1,530 characters (10 parts) are sent. */
180539
+ text?: string;
180382
180540
  };
180383
180541
  };
180384
180542
  };
@@ -180392,7 +180550,7 @@ export interface operations {
180392
180550
  "application/json": components["schemas"]["EmailMarketingMessage"];
180393
180551
  };
180394
180552
  };
180395
- /** @description The text is missing or too long (`CAMPAIGNS_TOO_LONG`). */
180553
+ /** @description The text is missing or too long (`CAMPAIGNS_TOO_LONG`), or a WhatsApp send has no usable template (`CAMPAIGNS_TEMPLATE_REQUIRED`). */
180396
180554
  400: {
180397
180555
  headers: {
180398
180556
  [name: string]: unknown;
@@ -181384,6 +181542,7 @@ export interface operations {
181384
181542
  parameters: {
181385
181543
  query?: {
181386
181544
  after?: string;
181545
+ channel?: "sms" | "whatsapp";
181387
181546
  limit?: number;
181388
181547
  /** @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). */
181389
181548
  org_id?: components["parameters"]["OrgIdQuery"];
@@ -185674,6 +185833,102 @@ export interface operations {
185674
185833
  };
185675
185834
  };
185676
185835
  };
185836
+ listGuestPostSites: {
185837
+ parameters: {
185838
+ query?: {
185839
+ /** @description ISO 3166-1 alpha-2 */
185840
+ country?: string;
185841
+ language?: string;
185842
+ link_type?: string;
185843
+ max_price_minor?: number;
185844
+ min_dr?: number;
185845
+ page?: number;
185846
+ per_page?: 24 | 48 | 96;
185847
+ sort?: "dr" | "price" | "newest";
185848
+ };
185849
+ header?: never;
185850
+ path?: never;
185851
+ cookie?: never;
185852
+ };
185853
+ requestBody?: never;
185854
+ responses: {
185855
+ /** @description One page of guest-post sites. */
185856
+ 200: {
185857
+ headers: {
185858
+ [name: string]: unknown;
185859
+ };
185860
+ content: {
185861
+ "application/json": components["schemas"]["GuestPostSitePage"];
185862
+ };
185863
+ };
185864
+ 401: components["responses"]["Unauthorized"];
185865
+ };
185866
+ };
185867
+ getGuestPostSite: {
185868
+ parameters: {
185869
+ query?: never;
185870
+ header?: never;
185871
+ path: {
185872
+ site_uid: string;
185873
+ };
185874
+ cookie?: never;
185875
+ };
185876
+ requestBody?: never;
185877
+ responses: {
185878
+ /** @description The site. */
185879
+ 200: {
185880
+ headers: {
185881
+ [name: string]: unknown;
185882
+ };
185883
+ content: {
185884
+ "application/json": components["schemas"]["GuestPostSite"];
185885
+ };
185886
+ };
185887
+ 401: components["responses"]["Unauthorized"];
185888
+ 404: components["responses"]["NotFound"];
185889
+ };
185890
+ };
185891
+ orderGuestPostSite: {
185892
+ parameters: {
185893
+ query?: never;
185894
+ header?: never;
185895
+ path: {
185896
+ site_uid: string;
185897
+ };
185898
+ cookie?: never;
185899
+ };
185900
+ requestBody?: {
185901
+ content: {
185902
+ "application/json": {
185903
+ note?: string;
185904
+ /** @default 0 */
185905
+ offer_index?: number;
185906
+ /** Format: uuid */
185907
+ org_id?: string;
185908
+ };
185909
+ };
185910
+ };
185911
+ responses: {
185912
+ /** @description The ticket that was opened. */
185913
+ 201: {
185914
+ headers: {
185915
+ [name: string]: unknown;
185916
+ };
185917
+ content: {
185918
+ "application/json": {
185919
+ currency: string;
185920
+ price_minor?: number | null;
185921
+ site_uid: string;
185922
+ /** Format: uuid */
185923
+ ticket_id: string;
185924
+ };
185925
+ };
185926
+ };
185927
+ 401: components["responses"]["Unauthorized"];
185928
+ 403: components["responses"]["Forbidden"];
185929
+ 404: components["responses"]["NotFound"];
185930
+ };
185931
+ };
185677
185932
  getMarketplaceLatestListings: {
185678
185933
  parameters: {
185679
185934
  query?: {
@@ -198852,6 +199107,36 @@ export interface operations {
198852
199107
  429: components["responses"]["TooManyRequests"];
198853
199108
  };
198854
199109
  };
199110
+ listPublicGuestPostSites: {
199111
+ parameters: {
199112
+ query?: {
199113
+ /** @description ISO 3166-1 alpha-2 */
199114
+ country?: string;
199115
+ language?: string;
199116
+ link_type?: string;
199117
+ max_price_minor?: number;
199118
+ min_dr?: number;
199119
+ page?: number;
199120
+ per_page?: 24 | 48 | 96;
199121
+ sort?: "dr" | "price" | "newest";
199122
+ };
199123
+ header?: never;
199124
+ path?: never;
199125
+ cookie?: never;
199126
+ };
199127
+ requestBody?: never;
199128
+ responses: {
199129
+ /** @description One blurred page of guest-post sites. */
199130
+ 200: {
199131
+ headers: {
199132
+ [name: string]: unknown;
199133
+ };
199134
+ content: {
199135
+ "application/json": components["schemas"]["GuestPostSitePage"];
199136
+ };
199137
+ };
199138
+ };
199139
+ };
198855
199140
  getPublicHouseTags: {
198856
199141
  parameters: {
198857
199142
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1812",
3
+ "version": "0.1.1814",
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>",