@zinn-digital/sdk 0.1.1811 → 0.1.1813
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.
- package/dist/generated/schema.d.ts +44 -15
- package/package.json +1 -1
|
@@ -35180,8 +35180,8 @@ export interface paths {
|
|
|
35180
35180
|
get?: never;
|
|
35181
35181
|
put?: never;
|
|
35182
35182
|
/**
|
|
35183
|
-
* Send one SMS to one contact
|
|
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;
|
|
@@ -57218,7 +57218,9 @@ export interface paths {
|
|
|
57218
57218
|
*
|
|
57219
57219
|
* The vendor's acknowledgement is checked separately from its result: this endpoint answers a success object rather than the result field every other vendor call uses, and an absent result is **not** a refusal — reading it as one would report a refused reinstall of a customer's live WordPress as completed.
|
|
57220
57220
|
*
|
|
57221
|
-
* `
|
|
57221
|
+
* **Asynchronous.** Only the cheap refusals (capability, WordPress installed) run in the request; the pre-reinstall safety backup and the reinstall itself run in the `SiteWordPressReinstallWorkflow` (one per site, `hosting-provisioning` queue). In the request, a real site's backup outlived the request budget and every press answered `422` (BACKUPACCUM1114). The `wordpress.reinstall` activity row is written when the reinstall HAS happened, `wordpress.reinstall_failed` (with a reason) when it did not.
|
|
57222
|
+
*
|
|
57223
|
+
* `202` and no body. `404` for a site with no hosting package. `409` (`refusal.hosting.wordpressReinstallInFlight`) while a reinstall of this site is already running. `503` (`refusal.hosting.wordpressReinstallUnavailable`) when the workflow engine cannot be reached; nothing was started. Requires `sites.view` and `sites.panel_access`.
|
|
57222
57224
|
*/
|
|
57223
57225
|
post: operations["reinstallSiteWordPress"];
|
|
57224
57226
|
delete?: never;
|
|
@@ -87634,6 +87636,10 @@ export interface components {
|
|
|
87634
87636
|
whatsapp_connected: boolean;
|
|
87635
87637
|
whatsapp_display_phone: string;
|
|
87636
87638
|
whatsapp_health: components["schemas"]["EmailMarketingWhatsappHealth"];
|
|
87639
|
+
/** @description WhatsApp sending is open to this organisation (line, account and switch). */
|
|
87640
|
+
whatsapp_open: boolean;
|
|
87641
|
+
/** @description WhatsApp sending is paused for this organisation (its own spike pause). */
|
|
87642
|
+
whatsapp_paused: boolean;
|
|
87637
87643
|
/** @description Embedded Signup's app and configuration ids; null when not offered yet. */
|
|
87638
87644
|
whatsapp_signup: {
|
|
87639
87645
|
app_id: string;
|
|
@@ -114654,9 +114660,11 @@ export interface components {
|
|
|
114654
114660
|
uptime_target_percent: string;
|
|
114655
114661
|
};
|
|
114656
114662
|
SmsMarketingCampaign: {
|
|
114663
|
+
/** @enum {string} */
|
|
114664
|
+
channel: "sms" | "whatsapp";
|
|
114657
114665
|
/** Format: date-time */
|
|
114658
114666
|
created_at: string;
|
|
114659
|
-
/** @description Paused for credit; `send` resumes it
|
|
114667
|
+
/** @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. */
|
|
114660
114668
|
customer_can_resume: boolean;
|
|
114661
114669
|
/** Format: date-time */
|
|
114662
114670
|
finished_at: string | null;
|
|
@@ -114667,12 +114675,15 @@ export interface components {
|
|
|
114667
114675
|
name: string;
|
|
114668
114676
|
recipients_total: number;
|
|
114669
114677
|
/** @enum {string|null} */
|
|
114670
|
-
refusal_code: "not_open" | "channel_off" | "account_on_hold" | "incomplete" | "too_long" | "paused" | "empty" | "review" | "no_credit" | "not_configured" | null;
|
|
114678
|
+
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;
|
|
114671
114679
|
refusal_message: string | null;
|
|
114672
114680
|
/** Format: date-time */
|
|
114673
114681
|
started_at: string | null;
|
|
114674
114682
|
/** @enum {string} */
|
|
114675
114683
|
status: "draft" | "sending" | "paused" | "sent" | "refused";
|
|
114684
|
+
template: string | null;
|
|
114685
|
+
template_language: string | null;
|
|
114686
|
+
template_params: string[];
|
|
114676
114687
|
text: string;
|
|
114677
114688
|
/** Format: date-time */
|
|
114678
114689
|
updated_at: string;
|
|
@@ -114705,9 +114716,20 @@ export interface components {
|
|
|
114705
114716
|
undelivered: number;
|
|
114706
114717
|
};
|
|
114707
114718
|
SmsMarketingCampaignWrite: {
|
|
114719
|
+
/**
|
|
114720
|
+
* @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).
|
|
114721
|
+
* @enum {string}
|
|
114722
|
+
*/
|
|
114723
|
+
channel?: "sms" | "whatsapp";
|
|
114708
114724
|
/** Format: uuid */
|
|
114709
114725
|
list_id?: string | null;
|
|
114710
114726
|
name?: string;
|
|
114727
|
+
/** @description WhatsApp only — the name of a template Meta approved for this account. */
|
|
114728
|
+
template?: string;
|
|
114729
|
+
/** @description WhatsApp only — the template's language code */
|
|
114730
|
+
template_language?: string;
|
|
114731
|
+
/** @description WhatsApp only — the values for the template body's `{{1}}`, `{{2}}`, … in order (the same for every recipient). */
|
|
114732
|
+
template_params?: string[];
|
|
114711
114733
|
/** @description The message. Longer than 160 GSM-7 characters is sent (and priced) as several parts. */
|
|
114712
114734
|
text?: string;
|
|
114713
114735
|
};
|
|
@@ -180374,9 +180396,15 @@ export interface operations {
|
|
|
180374
180396
|
* @default sms
|
|
180375
180397
|
* @enum {string}
|
|
180376
180398
|
*/
|
|
180377
|
-
channel?: "sms";
|
|
180378
|
-
/** @description
|
|
180379
|
-
|
|
180399
|
+
channel?: "sms" | "whatsapp";
|
|
180400
|
+
/** @description WhatsApp only (required): the name of a template Meta approved for this organisation's WhatsApp Business account (lower-case letters, digits, `_`). */
|
|
180401
|
+
template?: string;
|
|
180402
|
+
/** @description WhatsApp only (required) — the template's language code, e.g. `en_GB`. */
|
|
180403
|
+
template_language?: string;
|
|
180404
|
+
/** @description WhatsApp only — the values for the template body's `{{1}}`, `{{2}}`, … in order. */
|
|
180405
|
+
template_params?: string[];
|
|
180406
|
+
/** @description The SMS text (required for `sms`; ignored for `whatsapp`). At most 1,530 characters (10 parts) are sent. */
|
|
180407
|
+
text?: string;
|
|
180380
180408
|
};
|
|
180381
180409
|
};
|
|
180382
180410
|
};
|
|
@@ -180390,7 +180418,7 @@ export interface operations {
|
|
|
180390
180418
|
"application/json": components["schemas"]["EmailMarketingMessage"];
|
|
180391
180419
|
};
|
|
180392
180420
|
};
|
|
180393
|
-
/** @description The text is missing or too long (`CAMPAIGNS_TOO_LONG`). */
|
|
180421
|
+
/** @description The text is missing or too long (`CAMPAIGNS_TOO_LONG`), or a WhatsApp send has no usable template (`CAMPAIGNS_TEMPLATE_REQUIRED`). */
|
|
180394
180422
|
400: {
|
|
180395
180423
|
headers: {
|
|
180396
180424
|
[name: string]: unknown;
|
|
@@ -181382,6 +181410,7 @@ export interface operations {
|
|
|
181382
181410
|
parameters: {
|
|
181383
181411
|
query?: {
|
|
181384
181412
|
after?: string;
|
|
181413
|
+
channel?: "sms" | "whatsapp";
|
|
181385
181414
|
limit?: number;
|
|
181386
181415
|
/** @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). */
|
|
181387
181416
|
org_id?: components["parameters"]["OrgIdQuery"];
|
|
@@ -216101,7 +216130,7 @@ export interface operations {
|
|
|
216101
216130
|
};
|
|
216102
216131
|
requestBody?: never;
|
|
216103
216132
|
responses: {
|
|
216104
|
-
/** @description The reinstall was accepted and
|
|
216133
|
+
/** @description The reinstall was accepted and runs on the platform's workflow queue. */
|
|
216105
216134
|
202: {
|
|
216106
216135
|
headers: {
|
|
216107
216136
|
[name: string]: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1813",
|
|
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>",
|