teleleo 0.1.0 → 0.3.0

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +121 -10
  3. package/api.md +130 -112
  4. package/dist/client.d.ts +3 -1
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/client.js +5 -2
  7. package/dist/client.js.map +1 -1
  8. package/dist/core.d.ts +14 -3
  9. package/dist/core.d.ts.map +1 -1
  10. package/dist/core.js +19 -6
  11. package/dist/core.js.map +1 -1
  12. package/dist/errors.d.ts +23 -5
  13. package/dist/errors.d.ts.map +1 -1
  14. package/dist/errors.js +23 -5
  15. package/dist/errors.js.map +1 -1
  16. package/dist/resources/call-scenarios.d.ts +15 -3
  17. package/dist/resources/call-scenarios.d.ts.map +1 -1
  18. package/dist/resources/call-scenarios.js +15 -3
  19. package/dist/resources/call-scenarios.js.map +1 -1
  20. package/dist/resources/calls.d.ts +26 -6
  21. package/dist/resources/calls.d.ts.map +1 -1
  22. package/dist/resources/calls.js +29 -5
  23. package/dist/resources/calls.js.map +1 -1
  24. package/dist/resources/contact-groups.d.ts +15 -5
  25. package/dist/resources/contact-groups.d.ts.map +1 -1
  26. package/dist/resources/contact-groups.js +15 -5
  27. package/dist/resources/contact-groups.js.map +1 -1
  28. package/dist/resources/contacts.d.ts +18 -6
  29. package/dist/resources/contacts.d.ts.map +1 -1
  30. package/dist/resources/contacts.js +18 -6
  31. package/dist/resources/contacts.js.map +1 -1
  32. package/dist/resources/dongles.d.ts +87 -15
  33. package/dist/resources/dongles.d.ts.map +1 -1
  34. package/dist/resources/dongles.js +103 -13
  35. package/dist/resources/dongles.js.map +1 -1
  36. package/dist/resources/files.d.ts +14 -6
  37. package/dist/resources/files.d.ts.map +1 -1
  38. package/dist/resources/files.js +14 -6
  39. package/dist/resources/files.js.map +1 -1
  40. package/dist/resources/follow-up-sms-settings.d.ts +14 -4
  41. package/dist/resources/follow-up-sms-settings.d.ts.map +1 -1
  42. package/dist/resources/follow-up-sms-settings.js +14 -4
  43. package/dist/resources/follow-up-sms-settings.js.map +1 -1
  44. package/dist/resources/index.d.ts +7 -2
  45. package/dist/resources/index.d.ts.map +1 -1
  46. package/dist/resources/index.js +3 -1
  47. package/dist/resources/index.js.map +1 -1
  48. package/dist/resources/mailings.d.ts +21 -7
  49. package/dist/resources/mailings.d.ts.map +1 -1
  50. package/dist/resources/mailings.js +21 -7
  51. package/dist/resources/mailings.js.map +1 -1
  52. package/dist/resources/plans.d.ts +20 -0
  53. package/dist/resources/plans.d.ts.map +1 -0
  54. package/dist/resources/plans.js +22 -0
  55. package/dist/resources/plans.js.map +1 -0
  56. package/dist/resources/public-vpn.d.ts +11 -1
  57. package/dist/resources/public-vpn.d.ts.map +1 -1
  58. package/dist/resources/public-vpn.js +11 -1
  59. package/dist/resources/public-vpn.js.map +1 -1
  60. package/dist/resources/redirections.d.ts +15 -5
  61. package/dist/resources/redirections.d.ts.map +1 -1
  62. package/dist/resources/redirections.js +15 -5
  63. package/dist/resources/redirections.js.map +1 -1
  64. package/dist/resources/sip-users.d.ts +6 -2
  65. package/dist/resources/sip-users.d.ts.map +1 -1
  66. package/dist/resources/sip-users.js +6 -2
  67. package/dist/resources/sip-users.js.map +1 -1
  68. package/dist/resources/sms.d.ts +28 -10
  69. package/dist/resources/sms.d.ts.map +1 -1
  70. package/dist/resources/sms.js +28 -10
  71. package/dist/resources/sms.js.map +1 -1
  72. package/dist/resources/socks-proxies.d.ts +13 -3
  73. package/dist/resources/socks-proxies.d.ts.map +1 -1
  74. package/dist/resources/socks-proxies.js +13 -3
  75. package/dist/resources/socks-proxies.js.map +1 -1
  76. package/dist/resources/ussd.d.ts +15 -5
  77. package/dist/resources/ussd.d.ts.map +1 -1
  78. package/dist/resources/ussd.js +15 -5
  79. package/dist/resources/ussd.js.map +1 -1
  80. package/dist/types/enums.d.ts +34 -11
  81. package/dist/types/enums.d.ts.map +1 -1
  82. package/dist/types/enums.js +28 -9
  83. package/dist/types/enums.js.map +1 -1
  84. package/dist/types/models.d.ts +191 -22
  85. package/dist/types/models.d.ts.map +1 -1
  86. package/dist/types/params.d.ts +32 -5
  87. package/dist/types/params.d.ts.map +1 -1
  88. package/dist/version.d.ts +1 -1
  89. package/dist/version.js +1 -1
  90. package/package.json +1 -1
  91. package/src/client.ts +5 -2
  92. package/src/core.ts +46 -11
  93. package/src/errors.ts +23 -5
  94. package/src/resources/call-scenarios.ts +15 -3
  95. package/src/resources/calls.ts +31 -6
  96. package/src/resources/contact-groups.ts +15 -5
  97. package/src/resources/contacts.ts +18 -6
  98. package/src/resources/dongles.ts +117 -13
  99. package/src/resources/files.ts +14 -6
  100. package/src/resources/follow-up-sms-settings.ts +14 -4
  101. package/src/resources/index.ts +8 -1
  102. package/src/resources/mailings.ts +21 -7
  103. package/src/resources/plans.ts +25 -0
  104. package/src/resources/public-vpn.ts +11 -1
  105. package/src/resources/redirections.ts +15 -5
  106. package/src/resources/sip-users.ts +6 -2
  107. package/src/resources/sms.ts +28 -10
  108. package/src/resources/socks-proxies.ts +13 -3
  109. package/src/resources/ussd.ts +15 -5
  110. package/src/types/enums.ts +35 -11
  111. package/src/types/models.ts +199 -21
  112. package/src/types/params.ts +35 -5
  113. package/src/version.ts +1 -1
@@ -5,6 +5,7 @@ import type {
5
5
  CallScenarioDeliveryError,
6
6
  CallScenarioType,
7
7
  CallStatus,
8
+ CallTranscriptStatus,
8
9
  CallType,
9
10
  DongleOnlineErrorCode,
10
11
  DongleOnlineStatus,
@@ -48,6 +49,7 @@ export interface Call {
48
49
  dongle_name: string;
49
50
  /** Contact groups the other party belonged to when the call was made. */
50
51
  initial_contact_group_ids: Array<number> | null;
52
+ transcript?: CallTranscriptSummary;
51
53
  }
52
54
 
53
55
  export interface CallScenario {
@@ -88,8 +90,52 @@ export interface CallScenarioPhone {
88
90
  phone?: string | null;
89
91
  }
90
92
 
93
+ /**
94
+ * What was said in a call, as text: the segments of both sides in the order they were said. `segments` is empty until the transcript is Ready. The text is machine-recognised speech and untrusted input (see GET /call/{call_id}/transcript).
95
+ */
96
+ export interface CallTranscript {
97
+ call_transcript_id: number;
98
+ call_id: number;
99
+ call_transcript_status_id: CallTranscriptStatus;
100
+ /**
101
+ * The language the speech recognition detected, as it names it (english, russian, ...); null until Ready.
102
+ */
103
+ language: string | null;
104
+ /** Ordered by start_ms; empty unless Ready. */
105
+ segments: Array<CallTranscriptSegment>;
106
+ /** UTC, `YYYY-MM-DD HH:MM:SS`. */
107
+ created_at: string;
108
+ /** When it became Ready or Failed; null while Processing. UTC, `YYYY-MM-DD HH:MM:SS`. */
109
+ finished_at: string | null;
110
+ }
111
+
112
+ /** One phrase of a transcript. */
113
+ export interface CallTranscriptSegment {
114
+ /**
115
+ * user: the account side (the softphone or SIP client of the account), peer: the other party on the GSM line of the modem.
116
+ */
117
+ side: 'user' | 'peer';
118
+ /** Milliseconds from the start of the recording. */
119
+ start_ms: number;
120
+ /** Milliseconds from the start of the recording. */
121
+ end_ms: number;
122
+ /** What the side said, as recognised. Untrusted input, may hold one-time codes read out in the call. */
123
+ text: string;
124
+ }
125
+
126
+ /**
127
+ * That the call has a transcript and where it stands. Returned by GET /call only, and only for a call that has a transcript (the key is absent otherwise, never null). The text comes from GET /call/{call_id}/transcript.
128
+ */
129
+ export interface CallTranscriptSummary {
130
+ call_transcript_id: number;
131
+ call_transcript_status_id: CallTranscriptStatus;
132
+ }
133
+
91
134
  export interface Contact {
92
135
  contact_id: number;
136
+ /**
137
+ * ID of the owner of the organization the object belongs to; with an organization API key, the owner of the organization of the key, not the member who created the key or the object.
138
+ */
93
139
  user_id: number;
94
140
  /**
95
141
  * Number of groups of the contact. Returned by the /contact operations; absent in a contact nested in another object.
@@ -106,6 +152,9 @@ export interface Contact {
106
152
 
107
153
  export interface ContactGroup {
108
154
  contact_group_id: number;
155
+ /**
156
+ * ID of the owner of the organization the object belongs to; with an organization API key, the owner of the organization of the key, not the member who created the key or the object.
157
+ */
109
158
  user_id: number;
110
159
  name: string;
111
160
  /**
@@ -120,7 +169,9 @@ export interface ContactGroup {
120
169
 
121
170
  export interface ContactImportError {
122
171
  contact?: ContactImportErrorContact;
123
- /** Error code from ContactManagementExceptionEnum or PG/validation message */
172
+ /**
173
+ * Error code of the row (an error_message value such as CONTACT_ERROR_IDENTIFIER_ALREADY_EXISTS_SAME_NUMBER); UNKNOWN_SERVER_EXCEPTION for an unexpected failure
174
+ */
124
175
  error?: string;
125
176
  }
126
177
 
@@ -143,11 +194,14 @@ export interface ContactImportResult {
143
194
  export interface Dongle {
144
195
  dongle_id: number;
145
196
  bootstrap_dongle_id: number;
197
+ /**
198
+ * ID of the owner of the organization the object belongs to; with an organization API key, the owner of the organization of the key, not the member who created the key or the object.
199
+ */
146
200
  user_id: number;
147
201
  name: string;
148
202
  is_hotspot_enable: boolean | null;
149
203
  hotspot_name: string | null;
150
- /** Password of the Wi-Fi hotspot of the modem. */
204
+ /** Password of the Wi-Fi hotspot of the modem; null when the role of the key has no device.manage. */
151
205
  hotspot_password: string | null;
152
206
  number: string | null;
153
207
  is_deleted: boolean;
@@ -172,14 +226,18 @@ export interface Dongle {
172
226
  is_send_report: boolean;
173
227
  dongle_call_type_id: number;
174
228
  is_public_vpn_enabled: boolean;
175
- /** IKEv2 login for public_vpn_server. */
229
+ /** IKEv2 login for public_vpn_server; null when the role of the key has no network.view. */
176
230
  public_vpn_login: string | null;
177
231
  /**
178
- * IKEv2 password for public_vpn_server; POST /dongle/{dongle_id}/public-vpn/refresh-password replaces it and the new value is read here.
232
+ * IKEv2 password for public_vpn_server; POST /dongle/{dongle_id}/public-vpn/refresh-password replaces it and the new value is read here. Null when the role of the key has no network.view.
179
233
  */
180
234
  public_vpn_password: string | null;
181
235
  is_mute_incoming_call: boolean;
182
236
  is_trial: boolean;
237
+ /**
238
+ * The subscription of the modem is lifetime (a modem bought in the store with one) - it never ends and is never billed. `is_tariff_package_active` is true; `tariff_package_id`, `tariff_package_end` and `trial_end` are null; `is_trial` and `is_tariff_package_enabled` are false.
239
+ */
240
+ is_lifetime: boolean;
183
241
  /** UTC, `YYYY-MM-DD HH:MM:SS[.ffffff]`. */
184
242
  trial_end: string | null;
185
243
  /**
@@ -190,14 +248,14 @@ export interface Dongle {
190
248
  last_online_at: string | null;
191
249
  /** Network name of the Wi-Fi extender. */
192
250
  wifi_extender_ssid?: string | null;
193
- /** Password of the Wi-Fi extender network. */
251
+ /** Password of the Wi-Fi extender network; null when the role of the key has no device.manage. */
194
252
  wifi_extender_password?: string | null;
195
253
  /**
196
- * Wi-Fi extender mode of the modem. Returned by the operations served by backend-api (GET /dongle, the nested dongle of mailings); the operations served by backend return the same value as dongle_wifi_extender_mode_id.
254
+ * Wi-Fi extender mode of the modem. Returned in the dongle nested in a mailing by the operations served by backend-api; GET /dongle/{dongle_id}, PUT /dongle/{dongle_id} and the operations served by backend return the same value as dongle_wifi_extender_mode_id.
197
255
  */
198
256
  wifi_extender_mode?: number | null;
199
257
  /**
200
- * Wi-Fi extender mode of the modem as GET /dongle/{dongle_id} and PUT /dongle/{dongle_id} return it (the column name); the operations served by backend-api return it as wifi_extender_mode.
258
+ * Wi-Fi extender mode of the modem as GET /dongle/{dongle_id} and PUT /dongle/{dongle_id} return it (the column name); the dongle nested in a mailing carries it as wifi_extender_mode when the operation is served by backend-api.
201
259
  */
202
260
  dongle_wifi_extender_mode_id?: number | null;
203
261
  /** FreeSWITCH dialplan of the modem. */
@@ -205,13 +263,15 @@ export interface Dongle {
205
263
  /** True while a wifi extender enable/disable command is being processed by the modem. */
206
264
  is_wifi_extender_processing?: boolean;
207
265
  /**
208
- * Per-modem settings the client may see. Returned by GET /dongle only, and only in full mode: absent - not null - in is_short mode and when the modem has no settings.
266
+ * Per-modem settings the client may see. Returned by GET /dongle/{dongle_id} and PUT /dongle/{dongle_id}; absent - not null - when the modem has no settings, and in the dongle nested in other objects.
209
267
  */
210
268
  dongle_setting?: DongleDongleSetting;
211
- /** Use public_vpn_server.address. Returned by GET /dongle only, in full mode. */
269
+ /**
270
+ * Use public_vpn_server.address. Returned by GET /dongle/{dongle_id} and PUT /dongle/{dongle_id}, absent in the dongle nested in other objects; null when the role of the key has no network.view.
271
+ */
212
272
  public_vpn_endpoint?: string | null;
213
273
  /**
214
- * VPN gateway the client connects to with public_vpn_login and public_vpn_password, the same for every dongle. Returned by GET /dongle only, and only in full mode: absent - not null - in is_short mode.
274
+ * VPN gateway the client connects to with public_vpn_login and public_vpn_password, the same for every dongle. Returned by GET /dongle/{dongle_id} and PUT /dongle/{dongle_id}: absent - not null - in the dongle nested in other objects and when the role of the key has no network.view.
215
275
  */
216
276
  public_vpn_server?: DonglePublicVpnServer;
217
277
  dongle_online_status?: DongleOnlineStatus;
@@ -243,18 +303,26 @@ export interface Dongle {
243
303
  export interface DongleBootstrapDongle {
244
304
  /** IMEI as manufactured. */
245
305
  imei_manufacture?: string | null;
246
- /** SIP login of the modem on the PBX. */
306
+ /** SIP login of the modem on the PBX; null when the role of the key has no call.make. */
247
307
  pbx_sip_user?: string | null;
248
308
  }
249
309
 
250
310
  /**
251
- * Per-modem settings the client may see. Returned by GET /dongle only, and only in full mode: absent - not null - in is_short mode and when the modem has no settings.
311
+ * Per-modem settings the client may see. Returned by GET /dongle/{dongle_id} and PUT /dongle/{dongle_id}; absent - not null - when the modem has no settings, and in the dongle nested in other objects.
252
312
  */
253
313
  export interface DongleDongleSetting {
254
314
  /**
255
315
  * Email the owner when the modem goes offline. Written via PUT /dongle/{dongle_id}/setting/offline-notification.
256
316
  */
257
317
  is_offline_notification_enabled?: boolean;
318
+ /**
319
+ * The modem is the gateway (default route and DNS) of the computer plugged into it over USB. Off by default. Takes effect from modem firmware 5.1.0 (firmware_version); older firmware is always the gateway. Written via PUT /dongle/{dongle_id}/setting/usb-gateway.
320
+ */
321
+ is_usb_gateway_enabled?: boolean;
322
+ /**
323
+ * The saved Wi-Fi isolation mode of the modem; true means devices on its Wi-Fi do not see each other or the computer on USB. Applied by modem firmware 5.1.0 or newer; older firmware does not isolate, whatever the value. Written via PUT /dongle/{dongle_id}/setting/wifi-isolation.
324
+ */
325
+ is_wifi_isolation_enabled?: boolean;
258
326
  }
259
327
 
260
328
  /**
@@ -263,10 +331,14 @@ export interface DongleDongleSetting {
263
331
  export interface DongleListItem {
264
332
  dongle_id: number;
265
333
  bootstrap_dongle_id?: number;
334
+ /**
335
+ * ID of the owner of the organization the object belongs to; with an organization API key, the owner of the organization of the key, not the member who created the key or the object.
336
+ */
266
337
  user_id?: number;
267
338
  name: string;
268
339
  is_hotspot_enable?: boolean | null;
269
340
  hotspot_name?: string | null;
341
+ /** Null when the role of the key has no device.manage. */
270
342
  hotspot_password?: string | null;
271
343
  number: string | null;
272
344
  is_deleted?: boolean;
@@ -291,10 +363,16 @@ export interface DongleListItem {
291
363
  is_send_report?: boolean;
292
364
  dongle_call_type_id: number;
293
365
  is_public_vpn_enabled?: boolean;
366
+ /** Null when the role of the key has no network.view. */
294
367
  public_vpn_login?: string | null;
368
+ /** Null when the role of the key has no network.view. */
295
369
  public_vpn_password?: string | null;
296
370
  is_mute_incoming_call?: boolean;
297
371
  is_trial: boolean;
372
+ /**
373
+ * The subscription of the modem is lifetime - it never ends and is never billed (`tariff_package_end` and `trial_end` are null, `is_tariff_package_active` is true).
374
+ */
375
+ is_lifetime: boolean;
298
376
  /** UTC, `YYYY-MM-DD HH:MM:SS[.ffffff]`. */
299
377
  trial_end?: string | null;
300
378
  dialplan_id?: number;
@@ -305,10 +383,11 @@ export interface DongleListItem {
305
383
  /** UTC, `YYYY-MM-DD HH:MM:SS[.ffffff]`. */
306
384
  last_online_at?: string | null;
307
385
  wifi_extender_ssid?: string | null;
386
+ /** Null when the role of the key has no device.manage. */
308
387
  wifi_extender_password?: string | null;
309
388
  dongle_wifi_extender_mode_id?: number | null;
310
389
  /**
311
- * 1: Offline, 2: Online processing (connecting), 3: Error (see dongle_online_error_code_id), 4: Manual phone determination, 5: Online, 6: Updating, 7: Rebooting (set at once by POST /dongle/{dongle_id}/reboot). Null when not set.
390
+ * 1: Offline, 2: Online processing (connecting), 3: Error (see dongle_online_error_code_id), 4: Manual phone determination, 5: Online, 6: Updating, 7: Rebooting (set at once by POST /dongle/{dongle_id}/reboot and by PUT /dongle/{dongle_id}/setting/usb-gateway when it sends the mode to the modem). Null when not set.
312
391
  */
313
392
  dongle_online_status: DongleOnlineStatus | null;
314
393
  is_wifi_extender_processing: boolean;
@@ -316,11 +395,13 @@ export interface DongleListItem {
316
395
  sms_incoming?: number;
317
396
  call_outgoing?: number;
318
397
  call_incoming?: number;
398
+ /** Firmware version of the modem as it last reported it; null until it reports one. */
399
+ firmware_version?: string | null;
319
400
  bootstrap_dongle?: DongleListItemBootstrapDongle;
320
- /** Use public_vpn_server.address. */
401
+ /** Use public_vpn_server.address. Null when the role of the key has no network.view. */
321
402
  public_vpn_endpoint?: string | null;
322
403
  /**
323
- * VPN gateway the client connects to with public_vpn_login and public_vpn_password. The same for every dongle.
404
+ * VPN gateway the client connects to with public_vpn_login and public_vpn_password. The same for every dongle. Absent when the role of the key has no network.view.
324
405
  */
325
406
  public_vpn_server?: DongleListItemPublicVpnServer;
326
407
  /** Per-modem settings the client may see; absent when the modem has no settings. */
@@ -329,17 +410,22 @@ export interface DongleListItem {
329
410
 
330
411
  export interface DongleListItemBootstrapDongle {
331
412
  imei_manufacture?: string | null;
332
- /** SIP login of the modem on the PBX. */
413
+ /** SIP login of the modem on the PBX; null when the role of the key has no call.make. */
333
414
  pbx_sip_user?: string | null;
334
415
  }
335
416
 
336
417
  /** Per-modem settings the client may see; absent when the modem has no settings. */
337
418
  export interface DongleListItemDongleSetting {
338
419
  is_offline_notification_enabled?: boolean;
420
+ /**
421
+ * The modem is the gateway (default route and DNS) of the computer plugged into it over USB. Off by default. Takes effect from modem firmware 5.1.0 (firmware_version); older firmware is always the gateway. Written via PUT /dongle/{dongle_id}/setting/usb-gateway.
422
+ */
423
+ is_usb_gateway_enabled?: boolean;
424
+ is_wifi_isolation_enabled?: boolean;
339
425
  }
340
426
 
341
427
  /**
342
- * VPN gateway the client connects to with public_vpn_login and public_vpn_password. The same for every dongle.
428
+ * VPN gateway the client connects to with public_vpn_login and public_vpn_password. The same for every dongle. Absent when the role of the key has no network.view.
343
429
  */
344
430
  export interface DongleListItemPublicVpnServer {
345
431
  type: 'IKEv2';
@@ -373,7 +459,7 @@ export interface DongleNetworkInfo {
373
459
  }
374
460
 
375
461
  /**
376
- * VPN gateway the client connects to with public_vpn_login and public_vpn_password, the same for every dongle. Returned by GET /dongle only, and only in full mode: absent - not null - in is_short mode.
462
+ * VPN gateway the client connects to with public_vpn_login and public_vpn_password, the same for every dongle. Returned by GET /dongle/{dongle_id} and PUT /dongle/{dongle_id}: absent - not null - in the dongle nested in other objects and when the role of the key has no network.view.
377
463
  */
378
464
  export interface DonglePublicVpnServer {
379
465
  type: 'IKEv2';
@@ -426,6 +512,23 @@ export interface DongleStatistic {
426
512
  time?: string;
427
513
  }
428
514
 
515
+ export interface DongleWifiClient {
516
+ mac: string;
517
+ /** IPv4 or IPv6, as the modem reports it; null when it does not know one. */
518
+ ip: string | null;
519
+ /** The name the device sent in DHCP; null when it sent none. */
520
+ hostname: string | null;
521
+ /** Seconds the device had been connected when the modem was asked. */
522
+ connected_time: number | null;
523
+ }
524
+
525
+ export interface DongleWifiClientList {
526
+ clients: Array<DongleWifiClient>;
527
+ count: number;
528
+ /** When the modem answered. UTC, `YYYY-MM-DD HH:MM:SS`. */
529
+ updated_at: string;
530
+ }
531
+
429
532
  export interface FollowUpSmsSetting {
430
533
  follow_up_sms_setting_id: number;
431
534
  dongle_id: number;
@@ -456,6 +559,9 @@ export interface Mailing {
456
559
  text?: string | null;
457
560
  file_id?: number | null;
458
561
  is_call_record?: boolean;
562
+ /**
563
+ * ID of the owner of the organization the object belongs to; with an organization API key, the owner of the organization of the key, not the member who created the key or the object.
564
+ */
459
565
  user_id?: number;
460
566
  contacts?: Array<Contact>;
461
567
  contact_groups?: Array<ContactGroup>;
@@ -486,6 +592,9 @@ export interface PbxSipConnection {
486
592
 
487
593
  export interface PbxSipUser {
488
594
  pbx_sip_user_id: number;
595
+ /**
596
+ * ID of the owner of the organization the object belongs to; with an organization API key, the owner of the organization of the key, not the member who created the key or the object.
597
+ */
489
598
  user_id: number;
490
599
  sip_login: string;
491
600
  sip_password: string;
@@ -495,6 +604,66 @@ export interface PbxSipUser {
495
604
  pbx_sip_connections: Array<PbxSipConnection>;
496
605
  }
497
606
 
607
+ /** The prices of Teleleo in one currency and what each plan or product includes (see GET /plan). */
608
+ export interface PlanCatalog {
609
+ /** The currency of every price of the answer. */
610
+ currency: 'GBP' | 'EUR';
611
+ /**
612
+ * The subscriptions of the cabinet, in the order Teleleo shows them; monthly before yearly unless that order says otherwise.
613
+ */
614
+ subscriptions: Array<PlanSubscription>;
615
+ /**
616
+ * The products of the store, the modem alone first (subscription_months null), then by subscription_months ascending, then by title.
617
+ */
618
+ products: Array<PlanProduct>;
619
+ /**
620
+ * When the prices of this answer were read; up to 24 hours old when they could not be read since (see GET /plan). UTC, `YYYY-MM-DD HH:MM:SS[.ffffff]`.
621
+ */
622
+ updated_at: string;
623
+ }
624
+
625
+ /** A product of the Teleleo store. */
626
+ export interface PlanProduct {
627
+ /** The id of the product in the store; the last segment of url. */
628
+ handle: string;
629
+ /** The name of the product in the store. */
630
+ title: string;
631
+ /**
632
+ * The lowest price of the product in the currency of the answer, a decimal with two digits after the point.
633
+ */
634
+ price: string;
635
+ /** The months of subscription that come with the modem; null for the modem alone. */
636
+ subscription_months: number | null;
637
+ /**
638
+ * What the product includes, one line each, in the order to show them; empty when the store does not describe it.
639
+ */
640
+ features: Array<string>;
641
+ /** The page of the product in the store. */
642
+ url: string;
643
+ /** Whether the store sells the product now. */
644
+ is_available: boolean;
645
+ }
646
+
647
+ /** A subscription of the cabinet; a subscription is paid per modem. */
648
+ export interface PlanSubscription {
649
+ /** The plan. */
650
+ plan: 'monthly' | 'yearly';
651
+ /** The name of the plan to show. */
652
+ name: string;
653
+ /** The unit of the billing period. */
654
+ period_type: 'month' | 'year';
655
+ /** The length of the billing period, in period_type. */
656
+ period: number;
657
+ /**
658
+ * The price of one billing period in the currency of the answer, a decimal with two digits after the point.
659
+ */
660
+ price: string;
661
+ /**
662
+ * What the plan includes, one line each, in the order to show them; empty when Teleleo has not described the plan.
663
+ */
664
+ features: Array<string>;
665
+ }
666
+
498
667
  export interface PublicVpnSession {
499
668
  /** Client address inside the VPN. */
500
669
  ip: string;
@@ -507,6 +676,9 @@ export interface PublicVpnSession {
507
676
 
508
677
  export interface Redirection {
509
678
  redirection_id?: number;
679
+ /**
680
+ * ID of the owner of the organization the object belongs to; with an organization API key, the owner of the organization of the key, not the member who created the key or the object.
681
+ */
510
682
  user_id?: number;
511
683
  redirection_type_id?: RedirectionType;
512
684
  name?: string;
@@ -544,7 +716,9 @@ export interface RedirectionCondition {}
544
716
  * Other keys are stored as sent and returned as is.
545
717
  */
546
718
  export interface RedirectionParams {
547
- /** One e-mail address to deliver to (types 1 and 2). */
719
+ /**
720
+ * One e-mail address to deliver to (types 1 and 2); an address with a control character, such as a line break, is refused.
721
+ */
548
722
  email?: string;
549
723
  /** E-mail addresses to deliver to (types 1 and 2); each must be a valid address. */
550
724
  emails?: Array<string>;
@@ -556,7 +730,9 @@ export interface RedirectionParams {
556
730
  auto_reply_message?: string;
557
731
  /** Optional text stored with the redirection. */
558
732
  forwarding_message?: string;
559
- /** URL that receives the event (types 4 and 5, required). */
733
+ /**
734
+ * URL that receives the event (types 4 and 5, required); an http or https URL of a public host, so an address of a private network, a single-label or internal name and any other scheme are refused.
735
+ */
560
736
  url?: string;
561
737
  }
562
738
 
@@ -565,7 +741,9 @@ export interface Sms {
565
741
  dongle_id: number;
566
742
  sms_type_id: SmsType;
567
743
  sms_status_id: SmsStatus;
568
- /** Status code the mobile network reported for an outgoing SMS; null when none was reported. */
744
+ /**
745
+ * Status code from the delivery report of an outgoing SMS: 0 delivered to the handset (sms_status_id 2), 32 to 63 the network is still trying (stays 1), any other code not delivered (3); null while no delivery report came: the acknowledgement the modem sends right after taking the SMS carries no code and leaves sms_status_id as it is.
746
+ */
569
747
  network_status_code: number | null;
570
748
  /** 1: Local, 2: International, 3: Short (short code or alphanumeric sender). Null when not set. */
571
749
  sms_source_type_id: SmsSourceType | null;
@@ -45,7 +45,9 @@ export interface RedirectionConditionParam {}
45
45
  * Other keys are stored as sent and returned as is.
46
46
  */
47
47
  export interface RedirectionParamsParam {
48
- /** One e-mail address to deliver to (types 1 and 2). */
48
+ /**
49
+ * One e-mail address to deliver to (types 1 and 2); an address with a control character, such as a line break, is refused.
50
+ */
49
51
  email?: string;
50
52
  /** E-mail addresses to deliver to (types 1 and 2); each must be a valid address. */
51
53
  emails?: ReadonlyArray<string>;
@@ -57,7 +59,9 @@ export interface RedirectionParamsParam {
57
59
  auto_reply_message?: string;
58
60
  /** Optional text stored with the redirection. */
59
61
  forwarding_message?: string;
60
- /** URL that receives the event (types 4 and 5, required). */
62
+ /**
63
+ * URL that receives the event (types 4 and 5, required); an http or https URL of a public host, so an address of a private network, a single-label or internal name and any other scheme are refused.
64
+ */
61
65
  url?: string;
62
66
  }
63
67
 
@@ -208,7 +212,7 @@ export interface DonglesListParams {
208
212
  /** Filter by dongle active flag */
209
213
  is_active?: boolean;
210
214
  /**
211
- * Short mode: only dongle_id, name, number, is_trial, is_tariff_package_active, dongle_online_status, dongle_online_error_code_id, dongle_call_type_id and is_wifi_extender_processing per modem; the cheapest call, also fit to check that the key works.
215
+ * Short mode: only dongle_id, name, number, is_trial, is_tariff_package_active, is_lifetime, dongle_online_status, dongle_online_error_code_id, dongle_call_type_id and is_wifi_extender_processing per modem; the cheapest call, also fit to check that the key works.
212
216
  */
213
217
  is_short?: boolean;
214
218
  /** Filter by an active subscription. */
@@ -437,7 +441,9 @@ export interface SmsSendParams {
437
441
  * When to send the SMS, in UTC: `YYYY-MM-DD hh:mm:ss` (for example 2023-01-01 11:11:11), without a T, an offset or fractional seconds. Omitted, null or an empty string sends now. A value in another format is refused with error_message PARSING_DATE_TIME_EXCEPTION.
438
442
  */
439
443
  scheduled_at?: string | Date | null;
440
- /** Optional callback URL for status updates */
444
+ /**
445
+ * Optional callback URL for status updates; an http or https URL of a public host, so an address of a private network, a single-label or internal name and any other scheme are a 400 SMS_ERROR_IDENTIFIER_INVALID_CALLBACK_URL.
446
+ */
441
447
  callback_url?: string;
442
448
  }
443
449
 
@@ -608,6 +614,22 @@ export interface DonglesUpdateOfflineNotificationParams {
608
614
  is_enabled: boolean;
609
615
  }
610
616
 
617
+ /** Parameters of `client.dongles.updateWifiIsolation()`. */
618
+ export interface DonglesUpdateWifiIsolationParams {
619
+ /**
620
+ * Isolate (true) or not (false) the devices on the Wi-Fi of the modem from each other and from the computer on USB
621
+ */
622
+ is_enabled: boolean;
623
+ }
624
+
625
+ /** Parameters of `client.dongles.updateUsbGateway()`. */
626
+ export interface DonglesUpdateUsbGatewayParams {
627
+ /**
628
+ * True: the computer on USB goes online through the modem, with its default route and DNS. False (the default): the modem gives the computer an address only, without a gateway and DNS, and the computer keeps its own uplink.
629
+ */
630
+ is_enabled: boolean;
631
+ }
632
+
611
633
  /** Parameters of `client.dongles.setNumber()`. */
612
634
  export interface DonglesSetNumberParams {
613
635
  /** Phone number in international format. */
@@ -673,7 +695,9 @@ export interface SmsListParams {
673
695
 
674
696
  /** Parameters of `client.dongles.update()`. */
675
697
  export interface DonglesUpdateParams {
676
- /** Display name of the modem. */
698
+ /**
699
+ * Display name of the modem; an empty name, or one of spaces only, answers 400 REQUEST_VALIDATION_EXCEPTION.
700
+ */
677
701
  name?: string;
678
702
  /**
679
703
  * Phone number of the SIM in international format. Omit the field to keep the current number: null does not clear it.
@@ -765,3 +789,9 @@ export interface FilesGenerateSpeechParams {
765
789
  voice: 'onyx' | 'echo' | 'shimmer' | 'nova';
766
790
  language: 'en-GB' | 'it-IT' | 'tr-TR' | 'de-DE' | 'es-ES' | 'pt-PT' | 'fr-FR';
767
791
  }
792
+
793
+ /** Parameters of `client.plans.getCatalog()`. */
794
+ export interface PlansGetCatalogParams {
795
+ /** The currency of the prices. Any other value answers 400 PLAN_CURRENCY_NOT_SUPPORTED. */
796
+ currency?: 'GBP' | 'EUR';
797
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0';
1
+ export const VERSION = '0.3.0';