@zinn-digital/sdk 0.1.1621 → 0.1.1624
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 +88 -6
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -58119,7 +58139,7 @@ export interface paths {
|
|
|
58119
58139
|
put?: never;
|
|
58120
58140
|
/**
|
|
58121
58141
|
* Add credit to your balance.
|
|
58122
|
-
* @description Charged on **your provider's own** payment account when you are a reseller's client, and on Zinn®'s when you buy directly. The credit is written when the payment **captures**: a crypto invoice awaiting confirmation (`pending`)
|
|
58142
|
+
* @description Charged on **your provider's own** payment account when you are a reseller's client, and on Zinn®'s when you buy directly. The credit is written when the payment **captures**: a crypto invoice awaiting confirmation (`pending`), a card awaiting 3-D Secure or a PayPal payment awaiting your approval at `action_url` (`requires_action`) returns 201 with that status and **no** balance change, because the money has not arrived. An approved PayPal top-up is captured and credited when PayPal reports the approval. 422 when your provider has not finished connecting a payment account — the charge is refused rather than settled somewhere else.
|
|
58123
58143
|
*
|
|
58124
58144
|
* ⚖️ **Credit bought from Zinn® is never refundable, including on account closure, and never expires** (owner ruling 2026-08-22). Call `GET /v1/wallet/top-ups/estimate` first and show the customer what they will actually receive — on a crypto rail that can be less than the amount quoted, because we credit what settles rather than what was asked for. Requires `billing.payment.manage`.
|
|
58125
58145
|
*/
|
|
@@ -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;
|
|
@@ -78590,7 +78610,7 @@ export interface components {
|
|
|
78590
78610
|
/** @description `quoted_minor - credited_minor`. `null` until the top-up settles. Derived rather than stored: it is a difference between two recorded facts, and a stored copy is a second source of truth that drifts. */
|
|
78591
78611
|
shortfall_minor?: number | null;
|
|
78592
78612
|
/**
|
|
78593
|
-
* @description ⛔ Credit is written on `captured` only. `pending` (a crypto invoice confirming) and `requires_action` (3-D Secure) both mean the money has not arrived yet.
|
|
78613
|
+
* @description ⛔ Credit is written on `captured` only. `pending` (a crypto invoice confirming) and `requires_action` (3-D Secure, or a PayPal approval) both mean the money has not arrived yet.
|
|
78594
78614
|
* @enum {string}
|
|
78595
78615
|
*/
|
|
78596
78616
|
status: "pending" | "requires_action" | "captured" | "failed";
|
|
@@ -83432,6 +83452,16 @@ export interface components {
|
|
|
83432
83452
|
open: boolean;
|
|
83433
83453
|
sender_count: number;
|
|
83434
83454
|
};
|
|
83455
|
+
/** @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. */
|
|
83456
|
+
EmailMarketingOwnSenders: {
|
|
83457
|
+
/** @description The alphanumeric SMS sender ID ("" when not set). */
|
|
83458
|
+
sender_id: string;
|
|
83459
|
+
/** @description Countries where `sender_id` is used. Others need a registered number. */
|
|
83460
|
+
sender_id_countries: string[];
|
|
83461
|
+
/** @description The organisation's own WhatsApp Business Account is connected. */
|
|
83462
|
+
whatsapp_connected: boolean;
|
|
83463
|
+
whatsapp_display_phone: string;
|
|
83464
|
+
};
|
|
83435
83465
|
EmailMarketingSender: {
|
|
83436
83466
|
/** Format: date-time */
|
|
83437
83467
|
created_at: string;
|
|
@@ -83498,6 +83528,10 @@ export interface components {
|
|
|
83498
83528
|
country: string;
|
|
83499
83529
|
price_usd_micros_per_part: number;
|
|
83500
83530
|
}[];
|
|
83531
|
+
sender_id: string;
|
|
83532
|
+
sender_id_countries: string[];
|
|
83533
|
+
whatsapp_connected: boolean;
|
|
83534
|
+
whatsapp_display_phone: string;
|
|
83501
83535
|
};
|
|
83502
83536
|
EmailMarketingTestResult: {
|
|
83503
83537
|
detail: string;
|
|
@@ -109882,6 +109916,8 @@ export interface components {
|
|
|
109882
109916
|
SmsMarketingCampaignReport: {
|
|
109883
109917
|
/** Format: uuid */
|
|
109884
109918
|
campaign_id: string;
|
|
109919
|
+
/** @description Sent messages the carrier confirmed delivered (Telnyx delivery receipt). */
|
|
109920
|
+
delivered: number;
|
|
109885
109921
|
failed: number;
|
|
109886
109922
|
/** @description Recipients who replied STOP after this campaign started. */
|
|
109887
109923
|
opted_out: number;
|
|
@@ -109894,6 +109930,10 @@ export interface components {
|
|
|
109894
109930
|
spent_usd_micros: number;
|
|
109895
109931
|
/** @enum {string} */
|
|
109896
109932
|
status: "draft" | "sending" | "paused" | "sent" | "refused";
|
|
109933
|
+
/** @description Sent messages the carrier gave no final answer for. `sent` minus these three is still awaiting a receipt. */
|
|
109934
|
+
unconfirmed: number;
|
|
109935
|
+
/** @description Sent messages the carrier or handset refused. The vendor charged for the attempt */
|
|
109936
|
+
undelivered: number;
|
|
109897
109937
|
};
|
|
109898
109938
|
SmsMarketingCampaignWrite: {
|
|
109899
109939
|
/** Format: uuid */
|
|
@@ -173619,6 +173659,46 @@ export interface operations {
|
|
|
173619
173659
|
503: components["responses"]["ServiceUnavailable"];
|
|
173620
173660
|
};
|
|
173621
173661
|
};
|
|
173662
|
+
setEmailMarketingSmsSenderId: {
|
|
173663
|
+
parameters: {
|
|
173664
|
+
query?: {
|
|
173665
|
+
/** @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). */
|
|
173666
|
+
org_id?: components["parameters"]["OrgIdQuery"];
|
|
173667
|
+
};
|
|
173668
|
+
header?: never;
|
|
173669
|
+
path?: never;
|
|
173670
|
+
cookie?: never;
|
|
173671
|
+
};
|
|
173672
|
+
requestBody: {
|
|
173673
|
+
content: {
|
|
173674
|
+
"application/json": {
|
|
173675
|
+
sender_id: string;
|
|
173676
|
+
};
|
|
173677
|
+
};
|
|
173678
|
+
};
|
|
173679
|
+
responses: {
|
|
173680
|
+
/** @description The organisation's own sending identities after the change. */
|
|
173681
|
+
200: {
|
|
173682
|
+
headers: {
|
|
173683
|
+
[name: string]: unknown;
|
|
173684
|
+
};
|
|
173685
|
+
content: {
|
|
173686
|
+
"application/json": components["schemas"]["EmailMarketingOwnSenders"];
|
|
173687
|
+
};
|
|
173688
|
+
};
|
|
173689
|
+
/** @description The sender ID is not allowed (`CAMPAIGNS_SENDER_ID_INVALID`). */
|
|
173690
|
+
400: {
|
|
173691
|
+
headers: {
|
|
173692
|
+
[name: string]: unknown;
|
|
173693
|
+
};
|
|
173694
|
+
content: {
|
|
173695
|
+
"application/json": components["schemas"]["Error"];
|
|
173696
|
+
};
|
|
173697
|
+
};
|
|
173698
|
+
401: components["responses"]["Unauthorized"];
|
|
173699
|
+
403: components["responses"]["Forbidden"];
|
|
173700
|
+
};
|
|
173701
|
+
};
|
|
173622
173702
|
getEntitlementUsage: {
|
|
173623
173703
|
parameters: {
|
|
173624
173704
|
query?: {
|
|
@@ -211934,7 +212014,9 @@ export interface operations {
|
|
|
211934
212014
|
content: {
|
|
211935
212015
|
"application/json": {
|
|
211936
212016
|
/** @enum {string} */
|
|
211937
|
-
|
|
212017
|
+
delivery?: "delivered" | "failed" | "unconfirmed";
|
|
212018
|
+
/** @enum {string} */
|
|
212019
|
+
handled: "stop" | "start" | "no_keyword" | "ignored" | "receipt" | "unknown_message" | "unknown_status" | "no_message_id";
|
|
211938
212020
|
ok: boolean;
|
|
211939
212021
|
orgs?: number;
|
|
211940
212022
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1624",
|
|
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>",
|