@zinn-digital/sdk 0.1.1632 → 0.1.1635
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 +275 -2
- package/package.json +1 -1
|
@@ -39215,6 +39215,100 @@ export interface paths {
|
|
|
39215
39215
|
patch?: never;
|
|
39216
39216
|
trace?: never;
|
|
39217
39217
|
};
|
|
39218
|
+
"/v1/notification-phone": {
|
|
39219
|
+
parameters: {
|
|
39220
|
+
query?: {
|
|
39221
|
+
/** @description The organization to act on, as for the other notification endpoints. Omitted resolves to your own only when you belong to exactly one organisation. */
|
|
39222
|
+
org_id?: string;
|
|
39223
|
+
};
|
|
39224
|
+
header?: never;
|
|
39225
|
+
path?: never;
|
|
39226
|
+
cookie?: never;
|
|
39227
|
+
};
|
|
39228
|
+
/**
|
|
39229
|
+
* Text-message and WhatsApp alerts for me in this organisation.
|
|
39230
|
+
* @description Whether text messages (SMS) and WhatsApp alerts can be used here, the countries whose numbers we can text, my verified number on each channel and whether my consent is active, and the events a text can be sent for. A person only, never an API key. A white-label organisation sees both channels unavailable: texts come from Zinn®'s own sender, which would show our name to your clients.
|
|
39231
|
+
*/
|
|
39232
|
+
get: operations["getNotificationPhone"];
|
|
39233
|
+
put?: never;
|
|
39234
|
+
post?: never;
|
|
39235
|
+
delete?: never;
|
|
39236
|
+
options?: never;
|
|
39237
|
+
head?: never;
|
|
39238
|
+
patch?: never;
|
|
39239
|
+
trace?: never;
|
|
39240
|
+
};
|
|
39241
|
+
"/v1/notification-phone/{channel}": {
|
|
39242
|
+
parameters: {
|
|
39243
|
+
query?: {
|
|
39244
|
+
/** @description The organization to act on, as above. */
|
|
39245
|
+
org_id?: string;
|
|
39246
|
+
};
|
|
39247
|
+
header?: never;
|
|
39248
|
+
path: {
|
|
39249
|
+
channel: "sms" | "whatsapp";
|
|
39250
|
+
};
|
|
39251
|
+
cookie?: never;
|
|
39252
|
+
};
|
|
39253
|
+
get?: never;
|
|
39254
|
+
put?: never;
|
|
39255
|
+
post?: never;
|
|
39256
|
+
/**
|
|
39257
|
+
* Stop alert texts on one channel.
|
|
39258
|
+
* @description Removes my connection on this channel and records my consent as withdrawn (the consent record itself is kept, as proof of when it was given and withdrawn).
|
|
39259
|
+
*/
|
|
39260
|
+
delete: operations["revokeNotificationPhone"];
|
|
39261
|
+
options?: never;
|
|
39262
|
+
head?: never;
|
|
39263
|
+
patch?: never;
|
|
39264
|
+
trace?: never;
|
|
39265
|
+
};
|
|
39266
|
+
"/v1/notification-phone/confirm": {
|
|
39267
|
+
parameters: {
|
|
39268
|
+
query?: {
|
|
39269
|
+
/** @description The organization to act on, as above. */
|
|
39270
|
+
org_id?: string;
|
|
39271
|
+
};
|
|
39272
|
+
header?: never;
|
|
39273
|
+
path?: never;
|
|
39274
|
+
cookie?: never;
|
|
39275
|
+
};
|
|
39276
|
+
get?: never;
|
|
39277
|
+
put?: never;
|
|
39278
|
+
/**
|
|
39279
|
+
* Confirm the code; my number is connected with every topic off.
|
|
39280
|
+
* @description A code works once, for ten minutes, and five wrong tries spend it. On success each asked channel becomes a `kind=sms` or `kind=whatsapp` notification connection owned by me, with every topic off until I turn it on.
|
|
39281
|
+
*/
|
|
39282
|
+
post: operations["confirmNotificationPhone"];
|
|
39283
|
+
delete?: never;
|
|
39284
|
+
options?: never;
|
|
39285
|
+
head?: never;
|
|
39286
|
+
patch?: never;
|
|
39287
|
+
trace?: never;
|
|
39288
|
+
};
|
|
39289
|
+
"/v1/notification-phone/start": {
|
|
39290
|
+
parameters: {
|
|
39291
|
+
query?: {
|
|
39292
|
+
/** @description The organization to act on, as above. */
|
|
39293
|
+
org_id?: string;
|
|
39294
|
+
};
|
|
39295
|
+
header?: never;
|
|
39296
|
+
path?: never;
|
|
39297
|
+
cookie?: never;
|
|
39298
|
+
};
|
|
39299
|
+
get?: never;
|
|
39300
|
+
put?: never;
|
|
39301
|
+
/**
|
|
39302
|
+
* Text a six-digit code to my number.
|
|
39303
|
+
* @description Sends one code to the number by text message (and on WhatsApp when only WhatsApp is asked for). `consent` must be true: it records that I agreed to receive alert texts on this number (the wording version is `consent_text_version`). Refused when the channel is unavailable, the number's country is not open, the organisation is white-label or not in good standing, or too many codes were asked for (429). No topic is switched on by this: every topic stays off for texts until I turn it on in the routing grid.
|
|
39304
|
+
*/
|
|
39305
|
+
post: operations["startNotificationPhone"];
|
|
39306
|
+
delete?: never;
|
|
39307
|
+
options?: never;
|
|
39308
|
+
head?: never;
|
|
39309
|
+
patch?: never;
|
|
39310
|
+
trace?: never;
|
|
39311
|
+
};
|
|
39218
39312
|
"/v1/notification-preferences": {
|
|
39219
39313
|
parameters: {
|
|
39220
39314
|
query?: {
|
|
@@ -78597,6 +78691,8 @@ export interface components {
|
|
|
78597
78691
|
/** @description What went into the balance — `settled_minor - fee_minor`. */
|
|
78598
78692
|
credited_minor?: number;
|
|
78599
78693
|
currency: string;
|
|
78694
|
+
/** @description Zinn® credit only (`/v1/wallet/top-ups`): the class of a REFUSED top-up (PAYNOTICE, row 1108#29), so the screen says what happened and what to do. Empty when it did not fail, failed for a reason that is no decline, or predates the class. */
|
|
78695
|
+
decline_class?: components["schemas"]["PaymentDeclineClass"] | "";
|
|
78600
78696
|
/** @description The gateway's refusal, in words the customer can act on. */
|
|
78601
78697
|
error?: string;
|
|
78602
78698
|
/** @description What the provider kept out of the settlement. **`null` = not known**, never zero — recording an unknown as `0` would credit the customer the shortfall. */
|
|
@@ -92333,7 +92429,7 @@ export interface components {
|
|
|
92333
92429
|
/** Format: uuid */
|
|
92334
92430
|
id?: string;
|
|
92335
92431
|
/** @enum {string} */
|
|
92336
|
-
kind?: "email" | "slack" | "telegram" | "webhook" | "push";
|
|
92432
|
+
kind?: "email" | "slack" | "telegram" | "webhook" | "push" | "sms" | "whatsapp";
|
|
92337
92433
|
label?: string;
|
|
92338
92434
|
/**
|
|
92339
92435
|
* Format: date-time
|
|
@@ -92409,6 +92505,34 @@ export interface components {
|
|
|
92409
92505
|
data: components["schemas"]["NotificationConnectionDelivery"][];
|
|
92410
92506
|
page: components["schemas"]["PageMeta"];
|
|
92411
92507
|
};
|
|
92508
|
+
NotificationPhoneState: {
|
|
92509
|
+
availability: {
|
|
92510
|
+
countries: string[];
|
|
92511
|
+
sms: boolean;
|
|
92512
|
+
whatsapp: boolean;
|
|
92513
|
+
/** @description Base language codes WhatsApp has no template language for. A WhatsApp alert for a person whose language is one of these is sent by SMS in their own language instead. */
|
|
92514
|
+
whatsapp_fallback_languages: string[];
|
|
92515
|
+
white_label: boolean;
|
|
92516
|
+
};
|
|
92517
|
+
channels: {
|
|
92518
|
+
/** @enum {string} */
|
|
92519
|
+
channel: "sms" | "whatsapp";
|
|
92520
|
+
/** Format: uuid */
|
|
92521
|
+
connection_id: string;
|
|
92522
|
+
consent_active: boolean;
|
|
92523
|
+
health: string;
|
|
92524
|
+
/** Format: date-time */
|
|
92525
|
+
last_delivery_at: string | null;
|
|
92526
|
+
phone: string;
|
|
92527
|
+
}[];
|
|
92528
|
+
consent_text_version: string;
|
|
92529
|
+
event_groups: {
|
|
92530
|
+
[key: string]: string;
|
|
92531
|
+
};
|
|
92532
|
+
events_by_topic: {
|
|
92533
|
+
[key: string]: string[];
|
|
92534
|
+
};
|
|
92535
|
+
};
|
|
92412
92536
|
/** @description One topic's delivery answer for the calling user in one organization. */
|
|
92413
92537
|
NotificationPreference: {
|
|
92414
92538
|
/** @description Those messages by stable id, so a screen can name them rather than only count them. The difference between a disclaimer and an answer. */
|
|
@@ -92763,6 +92887,8 @@ export interface components {
|
|
|
92763
92887
|
id: components["schemas"]["Uuid"];
|
|
92764
92888
|
lines: components["schemas"]["OrderLine"][];
|
|
92765
92889
|
org_id: components["schemas"]["Uuid"];
|
|
92890
|
+
/** @description Present only on an unpaid order (`pending_payment` / `payment_failed`) whose latest payment attempt FAILED; `null` otherwise. Says why, so the customer is told plainly and offered another card, a retry or another way to pay (row 1108#29). */
|
|
92891
|
+
payment_failure?: components["schemas"]["PaymentFailure"] | null;
|
|
92766
92892
|
payments: components["schemas"]["Payment"][];
|
|
92767
92893
|
/** Format: date-time */
|
|
92768
92894
|
placed_at?: string | null;
|
|
@@ -94915,6 +95041,8 @@ export interface components {
|
|
|
94915
95041
|
/** Format: date-time */
|
|
94916
95042
|
created_at?: string;
|
|
94917
95043
|
currency: components["schemas"]["CurrencyCode"];
|
|
95044
|
+
/** @description The class of this attempt's failure (PAYNOTICE, row 1108#29), decided from the gateway's machine codes when it failed. Empty when the attempt did not fail or was recorded before the class existed. */
|
|
95045
|
+
decline_class?: components["schemas"]["PaymentDeclineClass"] | "";
|
|
94918
95046
|
failure_reason?: string;
|
|
94919
95047
|
id: components["schemas"]["Uuid"];
|
|
94920
95048
|
/** Format: int64 */
|
|
@@ -94971,6 +95099,19 @@ export interface components {
|
|
|
94971
95099
|
services_resume: boolean;
|
|
94972
95100
|
subscription_id: components["schemas"]["Uuid"];
|
|
94973
95101
|
};
|
|
95102
|
+
/**
|
|
95103
|
+
* @description Why a payment did not go through, named for what the customer can do about it (`engine.commerce.payment_help.NoticeClass`). `processing`: our side or the gateway's, not the customer's card. `unknown`: not positively identified, so nothing is guessed.
|
|
95104
|
+
* @enum {string}
|
|
95105
|
+
*/
|
|
95106
|
+
PaymentDeclineClass: "bank_declined" | "insufficient_funds" | "limit" | "authentication" | "card_expired" | "card_details" | "card_unusable" | "crypto_expired" | "no_method" | "processing" | "unknown";
|
|
95107
|
+
/** @description Why the latest payment attempt on an UNPAID order failed, so every surface that shows the order can say what happened and what to do (owner 2026-11-08, row 1108#29). */
|
|
95108
|
+
PaymentFailure: {
|
|
95109
|
+
decline_class: components["schemas"]["PaymentDeclineClass"];
|
|
95110
|
+
/** Format: date-time */
|
|
95111
|
+
failed_at: string;
|
|
95112
|
+
/** @description The payment rail of the failed attempt (`stripe`, `paypal`, `nowpayments`, …). */
|
|
95113
|
+
rail: string;
|
|
95114
|
+
};
|
|
94974
95115
|
/** @description What broke in the customer's browser on the add-a-payment-method form. `reason` is the SDK's own short message (for example `Failed to load Stripe.js`), never card data. */
|
|
94975
95116
|
PaymentFormFailure: {
|
|
94976
95117
|
/**
|
|
@@ -181827,7 +181968,7 @@ export interface operations {
|
|
|
181827
181968
|
*/
|
|
181828
181969
|
credential?: string;
|
|
181829
181970
|
/**
|
|
181830
|
-
* @description
|
|
181971
|
+
* @description A phone (`push`) is not connected here: the phone app registers itself through `POST /v1/me/push-devices`, which proves the token first. Text messages (`sms`) and WhatsApp are not connected here either: a person verifies their number and gives consent through `/v1/notification-phone`.
|
|
181831
181972
|
* @enum {string}
|
|
181832
181973
|
*/
|
|
181833
181974
|
kind: "email" | "slack" | "telegram" | "webhook";
|
|
@@ -182007,6 +182148,138 @@ export interface operations {
|
|
|
182007
182148
|
};
|
|
182008
182149
|
};
|
|
182009
182150
|
};
|
|
182151
|
+
getNotificationPhone: {
|
|
182152
|
+
parameters: {
|
|
182153
|
+
query?: {
|
|
182154
|
+
/** @description The organization to act on, as for the other notification endpoints. Omitted resolves to your own only when you belong to exactly one organisation. */
|
|
182155
|
+
org_id?: string;
|
|
182156
|
+
};
|
|
182157
|
+
header?: never;
|
|
182158
|
+
path?: never;
|
|
182159
|
+
cookie?: never;
|
|
182160
|
+
};
|
|
182161
|
+
requestBody?: never;
|
|
182162
|
+
responses: {
|
|
182163
|
+
/** @description What is available and which of my channels are on. */
|
|
182164
|
+
200: {
|
|
182165
|
+
headers: {
|
|
182166
|
+
[name: string]: unknown;
|
|
182167
|
+
};
|
|
182168
|
+
content: {
|
|
182169
|
+
"application/json": components["schemas"]["NotificationPhoneState"];
|
|
182170
|
+
};
|
|
182171
|
+
};
|
|
182172
|
+
401: components["responses"]["Unauthorized"];
|
|
182173
|
+
403: components["responses"]["Forbidden"];
|
|
182174
|
+
};
|
|
182175
|
+
};
|
|
182176
|
+
revokeNotificationPhone: {
|
|
182177
|
+
parameters: {
|
|
182178
|
+
query?: {
|
|
182179
|
+
/** @description The organization to act on, as above. */
|
|
182180
|
+
org_id?: string;
|
|
182181
|
+
};
|
|
182182
|
+
header?: never;
|
|
182183
|
+
path: {
|
|
182184
|
+
channel: "sms" | "whatsapp";
|
|
182185
|
+
};
|
|
182186
|
+
cookie?: never;
|
|
182187
|
+
};
|
|
182188
|
+
requestBody?: never;
|
|
182189
|
+
responses: {
|
|
182190
|
+
/** @description Stopped. The new state. */
|
|
182191
|
+
200: {
|
|
182192
|
+
headers: {
|
|
182193
|
+
[name: string]: unknown;
|
|
182194
|
+
};
|
|
182195
|
+
content: {
|
|
182196
|
+
"application/json": components["schemas"]["NotificationPhoneState"];
|
|
182197
|
+
};
|
|
182198
|
+
};
|
|
182199
|
+
401: components["responses"]["Unauthorized"];
|
|
182200
|
+
403: components["responses"]["Forbidden"];
|
|
182201
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
182202
|
+
};
|
|
182203
|
+
};
|
|
182204
|
+
confirmNotificationPhone: {
|
|
182205
|
+
parameters: {
|
|
182206
|
+
query?: {
|
|
182207
|
+
/** @description The organization to act on, as above. */
|
|
182208
|
+
org_id?: string;
|
|
182209
|
+
};
|
|
182210
|
+
header?: never;
|
|
182211
|
+
path?: never;
|
|
182212
|
+
cookie?: never;
|
|
182213
|
+
};
|
|
182214
|
+
requestBody: {
|
|
182215
|
+
content: {
|
|
182216
|
+
"application/json": {
|
|
182217
|
+
code: string;
|
|
182218
|
+
/** Format: uuid */
|
|
182219
|
+
verification_id: string;
|
|
182220
|
+
};
|
|
182221
|
+
};
|
|
182222
|
+
};
|
|
182223
|
+
responses: {
|
|
182224
|
+
/** @description Connected. The new state. */
|
|
182225
|
+
200: {
|
|
182226
|
+
headers: {
|
|
182227
|
+
[name: string]: unknown;
|
|
182228
|
+
};
|
|
182229
|
+
content: {
|
|
182230
|
+
"application/json": components["schemas"]["NotificationPhoneState"];
|
|
182231
|
+
};
|
|
182232
|
+
};
|
|
182233
|
+
401: components["responses"]["Unauthorized"];
|
|
182234
|
+
403: components["responses"]["Forbidden"];
|
|
182235
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
182236
|
+
429: components["responses"]["TooManyRequests"];
|
|
182237
|
+
};
|
|
182238
|
+
};
|
|
182239
|
+
startNotificationPhone: {
|
|
182240
|
+
parameters: {
|
|
182241
|
+
query?: {
|
|
182242
|
+
/** @description The organization to act on, as above. */
|
|
182243
|
+
org_id?: string;
|
|
182244
|
+
};
|
|
182245
|
+
header?: never;
|
|
182246
|
+
path?: never;
|
|
182247
|
+
cookie?: never;
|
|
182248
|
+
};
|
|
182249
|
+
requestBody: {
|
|
182250
|
+
content: {
|
|
182251
|
+
"application/json": {
|
|
182252
|
+
channels: ("sms" | "whatsapp")[];
|
|
182253
|
+
/** @description The consent tick. Must be true. */
|
|
182254
|
+
consent: boolean;
|
|
182255
|
+
locale?: string;
|
|
182256
|
+
/** @description The mobile number in international form, e.g. +447700900123. */
|
|
182257
|
+
phone: string;
|
|
182258
|
+
};
|
|
182259
|
+
};
|
|
182260
|
+
};
|
|
182261
|
+
responses: {
|
|
182262
|
+
/** @description The code was sent. */
|
|
182263
|
+
201: {
|
|
182264
|
+
headers: {
|
|
182265
|
+
[name: string]: unknown;
|
|
182266
|
+
};
|
|
182267
|
+
content: {
|
|
182268
|
+
"application/json": {
|
|
182269
|
+
/** Format: date-time */
|
|
182270
|
+
expires_at: string;
|
|
182271
|
+
/** Format: uuid */
|
|
182272
|
+
verification_id: string;
|
|
182273
|
+
};
|
|
182274
|
+
};
|
|
182275
|
+
};
|
|
182276
|
+
401: components["responses"]["Unauthorized"];
|
|
182277
|
+
403: components["responses"]["Forbidden"];
|
|
182278
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
182279
|
+
429: components["responses"]["TooManyRequests"];
|
|
182280
|
+
503: components["responses"]["ServiceUnavailable"];
|
|
182281
|
+
};
|
|
182282
|
+
};
|
|
182010
182283
|
listNotificationPreferences: {
|
|
182011
182284
|
parameters: {
|
|
182012
182285
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1635",
|
|
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>",
|