teleleo 0.2.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 (89) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +71 -11
  3. package/api.md +16 -2
  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 +9 -2
  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 +14 -4
  13. package/dist/errors.d.ts.map +1 -1
  14. package/dist/errors.js +14 -4
  15. package/dist/errors.js.map +1 -1
  16. package/dist/resources/call-scenarios.d.ts +3 -3
  17. package/dist/resources/call-scenarios.js +3 -3
  18. package/dist/resources/calls.d.ts +5 -5
  19. package/dist/resources/calls.js +5 -5
  20. package/dist/resources/contact-groups.d.ts +5 -5
  21. package/dist/resources/contact-groups.js +5 -5
  22. package/dist/resources/contacts.d.ts +6 -6
  23. package/dist/resources/contacts.js +6 -6
  24. package/dist/resources/dongles.d.ts +43 -15
  25. package/dist/resources/dongles.d.ts.map +1 -1
  26. package/dist/resources/dongles.js +56 -14
  27. package/dist/resources/dongles.js.map +1 -1
  28. package/dist/resources/files.d.ts +4 -4
  29. package/dist/resources/files.js +4 -4
  30. package/dist/resources/follow-up-sms-settings.d.ts +2 -2
  31. package/dist/resources/follow-up-sms-settings.js +2 -2
  32. package/dist/resources/index.d.ts +6 -1
  33. package/dist/resources/index.d.ts.map +1 -1
  34. package/dist/resources/index.js +3 -1
  35. package/dist/resources/index.js.map +1 -1
  36. package/dist/resources/mailings.d.ts +7 -7
  37. package/dist/resources/mailings.js +7 -7
  38. package/dist/resources/plans.d.ts +20 -0
  39. package/dist/resources/plans.d.ts.map +1 -0
  40. package/dist/resources/plans.js +22 -0
  41. package/dist/resources/plans.js.map +1 -0
  42. package/dist/resources/public-vpn.d.ts +3 -1
  43. package/dist/resources/public-vpn.d.ts.map +1 -1
  44. package/dist/resources/public-vpn.js +3 -1
  45. package/dist/resources/public-vpn.js.map +1 -1
  46. package/dist/resources/redirections.d.ts +3 -3
  47. package/dist/resources/redirections.js +3 -3
  48. package/dist/resources/sip-users.d.ts +2 -2
  49. package/dist/resources/sip-users.js +2 -2
  50. package/dist/resources/sms.d.ts +6 -6
  51. package/dist/resources/sms.js +6 -6
  52. package/dist/resources/socks-proxies.d.ts +3 -3
  53. package/dist/resources/socks-proxies.js +3 -3
  54. package/dist/resources/ussd.d.ts +4 -4
  55. package/dist/resources/ussd.js +4 -4
  56. package/dist/types/enums.d.ts +5 -3
  57. package/dist/types/enums.d.ts.map +1 -1
  58. package/dist/types/enums.js +4 -2
  59. package/dist/types/enums.js.map +1 -1
  60. package/dist/types/models.d.ts +92 -10
  61. package/dist/types/models.d.ts.map +1 -1
  62. package/dist/types/params.d.ts +32 -5
  63. package/dist/types/params.d.ts.map +1 -1
  64. package/dist/version.d.ts +1 -1
  65. package/dist/version.js +1 -1
  66. package/package.json +1 -1
  67. package/src/client.ts +5 -2
  68. package/src/core.ts +41 -10
  69. package/src/errors.ts +14 -4
  70. package/src/resources/call-scenarios.ts +3 -3
  71. package/src/resources/calls.ts +5 -5
  72. package/src/resources/contact-groups.ts +5 -5
  73. package/src/resources/contacts.ts +6 -6
  74. package/src/resources/dongles.ts +68 -14
  75. package/src/resources/files.ts +4 -4
  76. package/src/resources/follow-up-sms-settings.ts +2 -2
  77. package/src/resources/index.ts +7 -0
  78. package/src/resources/mailings.ts +7 -7
  79. package/src/resources/plans.ts +25 -0
  80. package/src/resources/public-vpn.ts +3 -1
  81. package/src/resources/redirections.ts +3 -3
  82. package/src/resources/sip-users.ts +2 -2
  83. package/src/resources/sms.ts +6 -6
  84. package/src/resources/socks-proxies.ts +3 -3
  85. package/src/resources/ussd.ts +4 -4
  86. package/src/types/enums.ts +5 -3
  87. package/src/types/models.ts +95 -10
  88. package/src/types/params.ts +35 -5
  89. package/src/version.ts +1 -1
@@ -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.2.0';
1
+ export const VERSION = '0.3.0';