@zinn-digital/sdk 0.1.1632 → 0.1.1634
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 +256 -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?: {
|
|
@@ -92333,7 +92427,7 @@ export interface components {
|
|
|
92333
92427
|
/** Format: uuid */
|
|
92334
92428
|
id?: string;
|
|
92335
92429
|
/** @enum {string} */
|
|
92336
|
-
kind?: "email" | "slack" | "telegram" | "webhook" | "push";
|
|
92430
|
+
kind?: "email" | "slack" | "telegram" | "webhook" | "push" | "sms" | "whatsapp";
|
|
92337
92431
|
label?: string;
|
|
92338
92432
|
/**
|
|
92339
92433
|
* Format: date-time
|
|
@@ -92409,6 +92503,34 @@ export interface components {
|
|
|
92409
92503
|
data: components["schemas"]["NotificationConnectionDelivery"][];
|
|
92410
92504
|
page: components["schemas"]["PageMeta"];
|
|
92411
92505
|
};
|
|
92506
|
+
NotificationPhoneState: {
|
|
92507
|
+
availability: {
|
|
92508
|
+
countries: string[];
|
|
92509
|
+
sms: boolean;
|
|
92510
|
+
whatsapp: boolean;
|
|
92511
|
+
/** @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. */
|
|
92512
|
+
whatsapp_fallback_languages: string[];
|
|
92513
|
+
white_label: boolean;
|
|
92514
|
+
};
|
|
92515
|
+
channels: {
|
|
92516
|
+
/** @enum {string} */
|
|
92517
|
+
channel: "sms" | "whatsapp";
|
|
92518
|
+
/** Format: uuid */
|
|
92519
|
+
connection_id: string;
|
|
92520
|
+
consent_active: boolean;
|
|
92521
|
+
health: string;
|
|
92522
|
+
/** Format: date-time */
|
|
92523
|
+
last_delivery_at: string | null;
|
|
92524
|
+
phone: string;
|
|
92525
|
+
}[];
|
|
92526
|
+
consent_text_version: string;
|
|
92527
|
+
event_groups: {
|
|
92528
|
+
[key: string]: string;
|
|
92529
|
+
};
|
|
92530
|
+
events_by_topic: {
|
|
92531
|
+
[key: string]: string[];
|
|
92532
|
+
};
|
|
92533
|
+
};
|
|
92412
92534
|
/** @description One topic's delivery answer for the calling user in one organization. */
|
|
92413
92535
|
NotificationPreference: {
|
|
92414
92536
|
/** @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. */
|
|
@@ -181827,7 +181949,7 @@ export interface operations {
|
|
|
181827
181949
|
*/
|
|
181828
181950
|
credential?: string;
|
|
181829
181951
|
/**
|
|
181830
|
-
* @description
|
|
181952
|
+
* @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
181953
|
* @enum {string}
|
|
181832
181954
|
*/
|
|
181833
181955
|
kind: "email" | "slack" | "telegram" | "webhook";
|
|
@@ -182007,6 +182129,138 @@ export interface operations {
|
|
|
182007
182129
|
};
|
|
182008
182130
|
};
|
|
182009
182131
|
};
|
|
182132
|
+
getNotificationPhone: {
|
|
182133
|
+
parameters: {
|
|
182134
|
+
query?: {
|
|
182135
|
+
/** @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. */
|
|
182136
|
+
org_id?: string;
|
|
182137
|
+
};
|
|
182138
|
+
header?: never;
|
|
182139
|
+
path?: never;
|
|
182140
|
+
cookie?: never;
|
|
182141
|
+
};
|
|
182142
|
+
requestBody?: never;
|
|
182143
|
+
responses: {
|
|
182144
|
+
/** @description What is available and which of my channels are on. */
|
|
182145
|
+
200: {
|
|
182146
|
+
headers: {
|
|
182147
|
+
[name: string]: unknown;
|
|
182148
|
+
};
|
|
182149
|
+
content: {
|
|
182150
|
+
"application/json": components["schemas"]["NotificationPhoneState"];
|
|
182151
|
+
};
|
|
182152
|
+
};
|
|
182153
|
+
401: components["responses"]["Unauthorized"];
|
|
182154
|
+
403: components["responses"]["Forbidden"];
|
|
182155
|
+
};
|
|
182156
|
+
};
|
|
182157
|
+
revokeNotificationPhone: {
|
|
182158
|
+
parameters: {
|
|
182159
|
+
query?: {
|
|
182160
|
+
/** @description The organization to act on, as above. */
|
|
182161
|
+
org_id?: string;
|
|
182162
|
+
};
|
|
182163
|
+
header?: never;
|
|
182164
|
+
path: {
|
|
182165
|
+
channel: "sms" | "whatsapp";
|
|
182166
|
+
};
|
|
182167
|
+
cookie?: never;
|
|
182168
|
+
};
|
|
182169
|
+
requestBody?: never;
|
|
182170
|
+
responses: {
|
|
182171
|
+
/** @description Stopped. The new state. */
|
|
182172
|
+
200: {
|
|
182173
|
+
headers: {
|
|
182174
|
+
[name: string]: unknown;
|
|
182175
|
+
};
|
|
182176
|
+
content: {
|
|
182177
|
+
"application/json": components["schemas"]["NotificationPhoneState"];
|
|
182178
|
+
};
|
|
182179
|
+
};
|
|
182180
|
+
401: components["responses"]["Unauthorized"];
|
|
182181
|
+
403: components["responses"]["Forbidden"];
|
|
182182
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
182183
|
+
};
|
|
182184
|
+
};
|
|
182185
|
+
confirmNotificationPhone: {
|
|
182186
|
+
parameters: {
|
|
182187
|
+
query?: {
|
|
182188
|
+
/** @description The organization to act on, as above. */
|
|
182189
|
+
org_id?: string;
|
|
182190
|
+
};
|
|
182191
|
+
header?: never;
|
|
182192
|
+
path?: never;
|
|
182193
|
+
cookie?: never;
|
|
182194
|
+
};
|
|
182195
|
+
requestBody: {
|
|
182196
|
+
content: {
|
|
182197
|
+
"application/json": {
|
|
182198
|
+
code: string;
|
|
182199
|
+
/** Format: uuid */
|
|
182200
|
+
verification_id: string;
|
|
182201
|
+
};
|
|
182202
|
+
};
|
|
182203
|
+
};
|
|
182204
|
+
responses: {
|
|
182205
|
+
/** @description Connected. The new state. */
|
|
182206
|
+
200: {
|
|
182207
|
+
headers: {
|
|
182208
|
+
[name: string]: unknown;
|
|
182209
|
+
};
|
|
182210
|
+
content: {
|
|
182211
|
+
"application/json": components["schemas"]["NotificationPhoneState"];
|
|
182212
|
+
};
|
|
182213
|
+
};
|
|
182214
|
+
401: components["responses"]["Unauthorized"];
|
|
182215
|
+
403: components["responses"]["Forbidden"];
|
|
182216
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
182217
|
+
429: components["responses"]["TooManyRequests"];
|
|
182218
|
+
};
|
|
182219
|
+
};
|
|
182220
|
+
startNotificationPhone: {
|
|
182221
|
+
parameters: {
|
|
182222
|
+
query?: {
|
|
182223
|
+
/** @description The organization to act on, as above. */
|
|
182224
|
+
org_id?: string;
|
|
182225
|
+
};
|
|
182226
|
+
header?: never;
|
|
182227
|
+
path?: never;
|
|
182228
|
+
cookie?: never;
|
|
182229
|
+
};
|
|
182230
|
+
requestBody: {
|
|
182231
|
+
content: {
|
|
182232
|
+
"application/json": {
|
|
182233
|
+
channels: ("sms" | "whatsapp")[];
|
|
182234
|
+
/** @description The consent tick. Must be true. */
|
|
182235
|
+
consent: boolean;
|
|
182236
|
+
locale?: string;
|
|
182237
|
+
/** @description The mobile number in international form, e.g. +447700900123. */
|
|
182238
|
+
phone: string;
|
|
182239
|
+
};
|
|
182240
|
+
};
|
|
182241
|
+
};
|
|
182242
|
+
responses: {
|
|
182243
|
+
/** @description The code was sent. */
|
|
182244
|
+
201: {
|
|
182245
|
+
headers: {
|
|
182246
|
+
[name: string]: unknown;
|
|
182247
|
+
};
|
|
182248
|
+
content: {
|
|
182249
|
+
"application/json": {
|
|
182250
|
+
/** Format: date-time */
|
|
182251
|
+
expires_at: string;
|
|
182252
|
+
/** Format: uuid */
|
|
182253
|
+
verification_id: string;
|
|
182254
|
+
};
|
|
182255
|
+
};
|
|
182256
|
+
};
|
|
182257
|
+
401: components["responses"]["Unauthorized"];
|
|
182258
|
+
403: components["responses"]["Forbidden"];
|
|
182259
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
182260
|
+
429: components["responses"]["TooManyRequests"];
|
|
182261
|
+
503: components["responses"]["ServiceUnavailable"];
|
|
182262
|
+
};
|
|
182263
|
+
};
|
|
182010
182264
|
listNotificationPreferences: {
|
|
182011
182265
|
parameters: {
|
|
182012
182266
|
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.1634",
|
|
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>",
|