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
@@ -14,7 +14,7 @@ export class FilesResource extends APIResource {
14
14
  *
15
15
  * @param fileId -
16
16
  *
17
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FILE_NOT_FOUND_EXCEPTION.
17
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FILE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
18
18
  *
19
19
  * Capability the role of an organization API key needs: `device.view`.
20
20
  */
@@ -29,7 +29,7 @@ export class FilesResource extends APIResource {
29
29
  *
30
30
  * @param fileId - tmp_file_id as returned by POST /file/upload-tmp or POST /file/generate-speech: `<2 hex>/<32 hex>/<file name>`. Put it into the path as is: the slashes are path separators and must not be percent-encoded (most SDK generators encode `/` in a path parameter by default; turn it off for this one). Percent-encode only characters of the file name that are not allowed in a path segment.
31
31
  *
32
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, TMP_FILE_NOT_FOUND.
32
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, TMP_FILE_NOT_FOUND, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
33
33
  *
34
34
  * Capability the role of an organization API key needs: `automation.manage`.
35
35
  */
@@ -42,7 +42,7 @@ export class FilesResource extends APIResource {
42
42
  *
43
43
  * Uploads an audio file as a temporary file, converted to the modem format; pass the returned tmp_file_id to a call scenario or a call mailing.
44
44
  *
45
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FILE_ERROR_IDENTIFIER_EMPTY_FIELDS, FILE_ERROR_FILE_NOT_VALID_BASE_64, FILE_ERROR_FILE_WRONG_TYPE, FILE_ERROR_FILE_NOT_VALID_SIZE, FILE_ERROR_CONVERT_TO_DONGLE_AUDIO, FILE_ERROR_DONGLE_AUDIO_TOO_LARGE, FILE_ERROR_IDENTIFIER_UNKNOWN_SCENARIO.
45
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FILE_ERROR_IDENTIFIER_EMPTY_FIELDS, FILE_ERROR_FILE_NOT_VALID_BASE_64, FILE_ERROR_FILE_WRONG_TYPE, FILE_ERROR_FILE_NOT_VALID_SIZE, FILE_ERROR_CONVERT_TO_DONGLE_AUDIO, FILE_ERROR_DONGLE_AUDIO_TOO_LARGE, FILE_ERROR_IDENTIFIER_UNKNOWN_SCENARIO, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
46
46
  *
47
47
  * Capability the role of an organization API key needs: `automation.manage`.
48
48
  */
@@ -64,7 +64,7 @@ export class FilesResource extends APIResource {
64
64
  *
65
65
  * Synthesises the text into a temporary audio file for a call scenario or a call mailing; pass the returned tmp_file_id as the audio of those. Limited to 5 calls per day per account, per organization for an organization API key: the 6th answers 429 RATE_LIMIT_EXCEEDED.
66
66
  *
67
- * Error codes (`errorMessage`): RATE_LIMIT_EXCEEDED, FILE_GENERATE_SPEECH_IDENTIFIER_EMPTY_FIELDS, FILE_GENERATE_SPEECH_IDENTIFIER_NOT_ALLOWED_VOICE, FILE_GENERATE_SPEECH_IDENTIFIER_NOT_ALLOWED_LANGUAGE, FILE_GENERATE_SPEECH_IDENTIFIER_LONG_TEXT.
67
+ * Error codes (`errorMessage`): RATE_LIMIT_EXCEEDED, FILE_GENERATE_SPEECH_IDENTIFIER_EMPTY_FIELDS, FILE_GENERATE_SPEECH_IDENTIFIER_NOT_ALLOWED_VOICE, FILE_GENERATE_SPEECH_IDENTIFIER_NOT_ALLOWED_LANGUAGE, FILE_GENERATE_SPEECH_IDENTIFIER_LONG_TEXT, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
68
68
  *
69
69
  * Capability the role of an organization API key needs: `automation.manage`.
70
70
  */
@@ -17,7 +17,7 @@ export class FollowUpSmsSettingsResource extends APIResource {
17
17
  *
18
18
  * Follow-up SMS settings of the account: the SMS a modem sends to a caller after a call. Newest first by default (the id descending).
19
19
  *
20
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
20
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
21
21
  *
22
22
  * Capability the role of an organization API key needs: `automation.view`.
23
23
  */
@@ -70,7 +70,7 @@ export class FollowUpSmsSettingsResource extends APIResource {
70
70
  *
71
71
  * @param followUpSmsSettingId - Follow Up Sms Setting ID
72
72
  *
73
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FOLLOW_UP_SMS_SETTING_NOT_FOUND_EXCEPTION.
73
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FOLLOW_UP_SMS_SETTING_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
74
74
  *
75
75
  * Capability the role of an organization API key needs: `automation.view`.
76
76
  */
@@ -15,6 +15,7 @@ import { PublicVpnResource } from './public-vpn.js';
15
15
  import { SocksProxiesResource } from './socks-proxies.js';
16
16
  import { SipUsersResource } from './sip-users.js';
17
17
  import { FilesResource } from './files.js';
18
+ import { PlansResource } from './plans.js';
18
19
 
19
20
  export {
20
21
  DonglesResource,
@@ -31,6 +32,7 @@ export {
31
32
  SocksProxiesResource,
32
33
  SipUsersResource,
33
34
  FilesResource,
35
+ PlansResource,
34
36
  };
35
37
 
36
38
  /** Resource groups of the client. */
@@ -63,6 +65,10 @@ export interface Resources {
63
65
  readonly sipUsers: SipUsersResource;
64
66
  /** Downloads, temporary audio uploads and text-to-speech. */
65
67
  readonly files: FilesResource;
68
+ /**
69
+ * Prices of Teleleo: the subscriptions of the cabinet and the products of the store. Public, without a key.
70
+ */
71
+ readonly plans: PlansResource;
66
72
  }
67
73
 
68
74
  /** @internal */
@@ -82,5 +88,6 @@ export function createResources(client: BaseClient): Resources {
82
88
  socksProxies: new SocksProxiesResource(client),
83
89
  sipUsers: new SipUsersResource(client),
84
90
  files: new FilesResource(client),
91
+ plans: new PlansResource(client),
85
92
  };
86
93
  }
@@ -19,7 +19,7 @@ export class MailingsResource extends APIResource {
19
19
  *
20
20
  * Mailings (bulk SMS or call campaigns) of the account. Newest first by default (created_at descending, then the id descending).
21
21
  *
22
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION.
22
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
23
23
  *
24
24
  * Capability the role of an organization API key needs: `automation.view`.
25
25
  */
@@ -58,7 +58,7 @@ export class MailingsResource extends APIResource {
58
58
  *
59
59
  * Creates an SMS or call mailing. Use POST /mailing/sms or POST /mailing/call instead.
60
60
  *
61
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, MAILING_MANAGEMENT_INVALID_STATUS_FOR_CREATE, MAILING_MANAGEMENT_INVALID_SCHEDULED_AT, MAILING_MANAGEMENT_DONGLE_TARIFF_INVALID, MAILING_MANAGEMENT_INVALID_PHONE, MAILING_MANAGEMENT_NO_RECIPIENTS, MAILING_MANAGEMENT_CONTACT_NOT_FOUND, MAILING_MANAGEMENT_CONTACT_GROUP_NOT_FOUND, MAILING_MANAGEMENT_DONGLE_SMS_LIMIT_EXCEEDED, TMP_FILE_NOT_FOUND, DONGLE_FIRMWARE_UPDATING_EXCEPTION, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE.
61
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, MAILING_MANAGEMENT_INVALID_STATUS_FOR_CREATE, MAILING_MANAGEMENT_INVALID_SCHEDULED_AT, MAILING_MANAGEMENT_INVALID_PHONE, MAILING_MANAGEMENT_NO_RECIPIENTS, MAILING_MANAGEMENT_CONTACT_NOT_FOUND, MAILING_MANAGEMENT_CONTACT_GROUP_NOT_FOUND, MAILING_MANAGEMENT_DONGLE_SMS_LIMIT_EXCEEDED, TMP_FILE_NOT_FOUND, DONGLE_FIRMWARE_UPDATING_EXCEPTION, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
62
62
  *
63
63
  * Capability the role of an organization API key needs: `automation.manage`.
64
64
  */
@@ -89,7 +89,7 @@ export class MailingsResource extends APIResource {
89
89
  *
90
90
  * Creates an SMS mailing to the listed phones, contacts and contact groups, sent now or at scheduled_at.
91
91
  *
92
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, MAILING_MANAGEMENT_INVALID_STATUS_FOR_CREATE, MAILING_MANAGEMENT_INVALID_SCHEDULED_AT, MAILING_MANAGEMENT_DONGLE_TARIFF_INVALID, MAILING_MANAGEMENT_INVALID_PHONE, MAILING_MANAGEMENT_NO_RECIPIENTS, MAILING_MANAGEMENT_CONTACT_NOT_FOUND, MAILING_MANAGEMENT_CONTACT_GROUP_NOT_FOUND, MAILING_MANAGEMENT_DONGLE_SMS_LIMIT_EXCEEDED, DONGLE_FIRMWARE_UPDATING_EXCEPTION, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE.
92
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, MAILING_MANAGEMENT_INVALID_STATUS_FOR_CREATE, MAILING_MANAGEMENT_INVALID_SCHEDULED_AT, MAILING_MANAGEMENT_INVALID_PHONE, MAILING_MANAGEMENT_NO_RECIPIENTS, MAILING_MANAGEMENT_CONTACT_NOT_FOUND, MAILING_MANAGEMENT_CONTACT_GROUP_NOT_FOUND, MAILING_MANAGEMENT_DONGLE_SMS_LIMIT_EXCEEDED, DONGLE_FIRMWARE_UPDATING_EXCEPTION, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
93
93
  *
94
94
  * Capability the role of an organization API key needs: `automation.manage`.
95
95
  */
@@ -117,7 +117,7 @@ export class MailingsResource extends APIResource {
117
117
  *
118
118
  * Creates a call mailing that plays an audio file (tmp_file_id) to the listed phones, contacts and contact groups.
119
119
  *
120
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, MAILING_MANAGEMENT_INVALID_STATUS_FOR_CREATE, MAILING_MANAGEMENT_INVALID_SCHEDULED_AT, MAILING_MANAGEMENT_DONGLE_TARIFF_INVALID, MAILING_MANAGEMENT_INVALID_PHONE, MAILING_MANAGEMENT_NO_RECIPIENTS, MAILING_MANAGEMENT_CONTACT_NOT_FOUND, MAILING_MANAGEMENT_CONTACT_GROUP_NOT_FOUND, TMP_FILE_NOT_FOUND, DONGLE_FIRMWARE_UPDATING_EXCEPTION.
120
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, MAILING_MANAGEMENT_INVALID_STATUS_FOR_CREATE, MAILING_MANAGEMENT_INVALID_SCHEDULED_AT, MAILING_MANAGEMENT_INVALID_PHONE, MAILING_MANAGEMENT_NO_RECIPIENTS, MAILING_MANAGEMENT_CONTACT_NOT_FOUND, MAILING_MANAGEMENT_CONTACT_GROUP_NOT_FOUND, TMP_FILE_NOT_FOUND, DONGLE_FIRMWARE_UPDATING_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
121
121
  *
122
122
  * Capability the role of an organization API key needs: `automation.manage`.
123
123
  */
@@ -149,7 +149,7 @@ export class MailingsResource extends APIResource {
149
149
  *
150
150
  * @param mailingId - Identifier in the path
151
151
  *
152
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, MAILING_NOT_FOUND.
152
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, MAILING_NOT_FOUND, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
153
153
  *
154
154
  * Capability the role of an organization API key needs: `automation.view`.
155
155
  */
@@ -166,7 +166,7 @@ export class MailingsResource extends APIResource {
166
166
  *
167
167
  * @param mailingId - Identifier in the path
168
168
  *
169
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, MAILING_NOT_FOUND, PARSING_DATE_TIME_EXCEPTION, MAILING_MANAGEMENT_INVALID_STATUS_FOR_UPDATE, MAILING_MANAGEMENT_INVALID_STATUS_FOR_CANCEL, MAILING_MANAGEMENT_INVALID_STATUS_FOR_SOFT_DELETE, MAILING_MANAGEMENT_DONGLE_TARIFF_INVALID, MAILING_MANAGEMENT_INVALID_PHONE, MAILING_MANAGEMENT_NO_RECIPIENTS, MAILING_MANAGEMENT_CONTACT_NOT_FOUND, MAILING_MANAGEMENT_CONTACT_GROUP_NOT_FOUND, MAILING_MANAGEMENT_DONGLE_SMS_LIMIT_EXCEEDED, TMP_FILE_NOT_FOUND, DONGLE_FIRMWARE_UPDATING_EXCEPTION, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE.
169
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, MAILING_NOT_FOUND, PARSING_DATE_TIME_EXCEPTION, MAILING_MANAGEMENT_INVALID_STATUS_FOR_UPDATE, MAILING_MANAGEMENT_INVALID_STATUS_FOR_CANCEL, MAILING_MANAGEMENT_INVALID_STATUS_FOR_SOFT_DELETE, MAILING_MANAGEMENT_INVALID_PHONE, MAILING_MANAGEMENT_NO_RECIPIENTS, MAILING_MANAGEMENT_CONTACT_NOT_FOUND, MAILING_MANAGEMENT_CONTACT_GROUP_NOT_FOUND, MAILING_MANAGEMENT_DONGLE_SMS_LIMIT_EXCEEDED, TMP_FILE_NOT_FOUND, DONGLE_FIRMWARE_UPDATING_EXCEPTION, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
170
170
  *
171
171
  * Capability the role of an organization API key needs: `automation.manage`.
172
172
  */
@@ -197,7 +197,7 @@ export class MailingsResource extends APIResource {
197
197
  *
198
198
  * @param mailingId - Identifier in the path
199
199
  *
200
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, MAILING_NOT_FOUND, MAILING_MANAGEMENT_INVALID_STATUS_FOR_HARD_DELETE, DONGLE_NOT_FOUND_EXCEPTION, MAILING_MANAGEMENT_DONGLE_TARIFF_INVALID.
200
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, MAILING_NOT_FOUND, MAILING_MANAGEMENT_INVALID_STATUS_FOR_HARD_DELETE, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
201
201
  *
202
202
  * Capability the role of an organization API key needs: `automation.manage`.
203
203
  */
@@ -0,0 +1,25 @@
1
+ // File generated from spec/openapi.yaml by scripts/generate.mjs. Do not edit by hand.
2
+
3
+ import type { RequestOptions } from '../core.js';
4
+ import { APIResource } from '../resource.js';
5
+ import type { PlanCatalog } from '../types/models.js';
6
+ import type { PlansGetCatalogParams } from '../types/params.js';
7
+ /**
8
+ * Prices of Teleleo: the subscriptions of the cabinet and the products of the store. Public, without a key.
9
+ */
10
+ export class PlansResource extends APIResource {
11
+ /**
12
+ * List plans and prices.
13
+ *
14
+ * The prices of Teleleo and what each plan or product includes, in one currency: the subscriptions of the cabinet (monthly and yearly, paid per modem) and the products of the store (the modem alone and the modem with months of subscription). Public, the one operation without a key: no auth-key is needed, but a key sent with it must be valid, or the answer is 401. A subscription costs what the cabinet charges for it; a product costs what the store asks in that currency, with the store page in url. The answer is cached for 5 minutes, so a new price shows within 5 minutes. When the prices cannot be read, the last good answer is served for up to 24 hours (updated_at tells how old it is); with none, 503 PLAN_CATALOG_UNAVAILABLE.
15
+ *
16
+ * Error codes (`errorMessage`): PLAN_CURRENCY_NOT_SUPPORTED, PLAN_CATALOG_UNAVAILABLE.
17
+ *
18
+ * Needs no API key: a client made with `apiKey: null` can call it. A key the client has is sent, and it must be valid.
19
+ */
20
+ getCatalog(params: PlansGetCatalogParams = {}, options?: RequestOptions): Promise<PlanCatalog> {
21
+ return this._client
22
+ .request('GET', '/plan', { query: { currency: params.currency }, keyOptional: true, options })
23
+ .then((data) => data as PlanCatalog);
24
+ }
25
+ }
@@ -30,7 +30,7 @@ export class PublicVpnResource extends APIResource {
30
30
  *
31
31
  * @param dongleId - ID of the dongle
32
32
  *
33
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_PUBLIC_VPN_ALREADY_DISABLED_EXCEPTION.
33
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_PUBLIC_VPN_ALREADY_DISABLED_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
34
34
  *
35
35
  * Capability the role of an organization API key needs: `network.manage`.
36
36
  */
@@ -62,6 +62,8 @@ export class PublicVpnResource extends APIResource {
62
62
  *
63
63
  * Live VPN sessions of the modems of the account, as the VPN gateway reports them. Not paginated.
64
64
  *
65
+ * Error codes (`errorMessage`): BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
66
+ *
65
67
  * Capability the role of an organization API key needs: `network.view`.
66
68
  */
67
69
  listSessions(options?: RequestOptions): Promise<Array<PublicVpnSession>> {
@@ -17,7 +17,7 @@ export class RedirectionsResource extends APIResource {
17
17
  *
18
18
  * Redirection rules of the account: forwarding of incoming SMS and calls, auto replies and HTTP callbacks. Newest first by default (created_at descending, then the id descending).
19
19
  *
20
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION.
20
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
21
21
  *
22
22
  * Capability the role of an organization API key needs: `automation.view`.
23
23
  */
@@ -71,7 +71,7 @@ export class RedirectionsResource extends APIResource {
71
71
  *
72
72
  * @param redirectionId - Identifier in the path
73
73
  *
74
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, REDIRECTION_NOT_FOUND_EXCEPTION.
74
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, REDIRECTION_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
75
75
  *
76
76
  * Capability the role of an organization API key needs: `automation.view`.
77
77
  */
@@ -117,7 +117,7 @@ export class RedirectionsResource extends APIResource {
117
117
  *
118
118
  * @param redirectionId - Identifier in the path
119
119
  *
120
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, REDIRECTION_NOT_FOUND_EXCEPTION.
120
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, REDIRECTION_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
121
121
  *
122
122
  * Capability the role of an organization API key needs: `automation.manage`.
123
123
  */
@@ -12,7 +12,7 @@ export class SipUsersResource extends APIResource {
12
12
  *
13
13
  * SIP accounts of the modems of the account, one per modem (dongle_id is always set; the softphone login of the cabinet and the mobile app is not listed). Modems deleted from the account are not listed. pbx_sip_connections lists the SIP servers to register at (TLS and UDP/TCP).
14
14
  *
15
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
15
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
16
16
  *
17
17
  * Capability the role of an organization API key needs: `call.make`.
18
18
  */
@@ -32,7 +32,7 @@ export class SipUsersResource extends APIResource {
32
32
  *
33
33
  * @param sipUserId - Identifier in the path
34
34
  *
35
- * Error codes (`errorMessage`): PBX_SIP_ERROR_IDENTIFIER_CANT_FIND_PBX_USER.
35
+ * Error codes (`errorMessage`): PBX_SIP_ERROR_IDENTIFIER_CANT_FIND_PBX_USER, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
36
36
  *
37
37
  * Capability the role of an organization API key needs: `call.make`.
38
38
  */
@@ -90,7 +90,7 @@ export class SmsResource extends APIResource {
90
90
  *
91
91
  * Conversation view: the last SMS per phone number of the modem, newest first.
92
92
  *
93
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
93
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
94
94
  *
95
95
  * Capability the role of an organization API key needs: `sms.view`.
96
96
  */
@@ -107,7 +107,7 @@ export class SmsResource extends APIResource {
107
107
  *
108
108
  * SMS of all modems of the account, incoming and outgoing. Newest first by default (created_at descending, then the id descending).
109
109
  *
110
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, SMS_ERROR_IDENTIFIER_INVALID_SMS_TYPE.
110
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, SMS_ERROR_IDENTIFIER_INVALID_SMS_TYPE, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
111
111
  *
112
112
  * Capability the role of an organization API key needs: `sms.view`.
113
113
  */
@@ -137,7 +137,7 @@ export class SmsResource extends APIResource {
137
137
  *
138
138
  * @param dongleId - Identifier in the path
139
139
  *
140
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, SMS_ERROR_IDENTIFIER_INVALID_SMS_TYPE.
140
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, SMS_ERROR_IDENTIFIER_INVALID_SMS_TYPE, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
141
141
  *
142
142
  * Capability the role of an organization API key needs: `sms.view`.
143
143
  */
@@ -170,7 +170,7 @@ export class SmsResource extends APIResource {
170
170
  * @param dongleId - Identifier in the path
171
171
  * @param smsId - Identifier in the path
172
172
  *
173
- * Error codes (`errorMessage`): SMS_ERROR_ERROR_SMS_NOT_FOUND.
173
+ * Error codes (`errorMessage`): SMS_ERROR_ERROR_SMS_NOT_FOUND, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
174
174
  *
175
175
  * Capability the role of an organization API key needs: `sms.view`.
176
176
  */
@@ -188,7 +188,7 @@ export class SmsResource extends APIResource {
188
188
  * @param dongleId - Identifier in the path
189
189
  * @param smsId - Identifier in the path
190
190
  *
191
- * Error codes (`errorMessage`): SMS_ERROR_ERROR_SMS_NOT_FOUND, DONGLE_ERROR_DONGLE_NOT_FOUND, CONTACT_ERROR_IDENTIFIER_CONTACT_NOT_FOUND, SMS_ERROR_IDENTIFIER_INVALID_SMS_TYPE, SMS_ERROR_IDENTIFIER_LONG_MESSAGE, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE, SMS_ERROR_IDENTIFIER_INVALID_SCHEDULED_AT, PARSING_DATE_TIME_EXCEPTION.
191
+ * Error codes (`errorMessage`): SMS_ERROR_ERROR_SMS_NOT_FOUND, DONGLE_ERROR_DONGLE_NOT_FOUND, CONTACT_ERROR_IDENTIFIER_CONTACT_NOT_FOUND, SMS_ERROR_IDENTIFIER_INVALID_SMS_TYPE, SMS_ERROR_IDENTIFIER_LONG_MESSAGE, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE, SMS_ERROR_IDENTIFIER_INVALID_SCHEDULED_AT, PARSING_DATE_TIME_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
192
192
  *
193
193
  * Capability the role of an organization API key needs: `sms.send`.
194
194
  */
@@ -220,7 +220,7 @@ export class SmsResource extends APIResource {
220
220
  * @param dongleId - Identifier in the path
221
221
  * @param smsId - Identifier in the path
222
222
  *
223
- * Error codes (`errorMessage`): SMS_ERROR_ERROR_SMS_NOT_FOUND.
223
+ * Error codes (`errorMessage`): SMS_ERROR_ERROR_SMS_NOT_FOUND, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
224
224
  *
225
225
  * Capability the role of an organization API key needs: `sms.send`.
226
226
  */
@@ -17,7 +17,7 @@ export class SocksProxiesResource extends APIResource {
17
17
  *
18
18
  * SOCKS5 proxies of the modems of the account. Newest first by default (created_at descending, then the id descending).
19
19
  *
20
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
20
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
21
21
  *
22
22
  * Capability the role of an organization API key needs: `network.view`.
23
23
  */
@@ -54,7 +54,7 @@ export class SocksProxiesResource extends APIResource {
54
54
  *
55
55
  * @param dongleSocksProxyId - Identifier in the path
56
56
  *
57
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_SOCKS_PROXY_NOT_FOUND_EXCEPTION.
57
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_SOCKS_PROXY_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
58
58
  *
59
59
  * Capability the role of an organization API key needs: `network.view`.
60
60
  */
@@ -95,7 +95,7 @@ export class SocksProxiesResource extends APIResource {
95
95
  *
96
96
  * @param dongleSocksProxyId - Identifier in the path
97
97
  *
98
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_SOCKS_PROXY_NOT_FOUND_EXCEPTION.
98
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_SOCKS_PROXY_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
99
99
  *
100
100
  * Capability the role of an organization API key needs: `network.manage`.
101
101
  */
@@ -15,7 +15,7 @@ export class UssdResource extends APIResource {
15
15
  *
16
16
  * @param dongleId - Identifier in the path
17
17
  *
18
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION.
18
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
19
19
  *
20
20
  * Capability the role of an organization API key needs: `device.manage`.
21
21
  */
@@ -52,7 +52,7 @@ export class UssdResource extends APIResource {
52
52
  * @param dongleId - Identifier in the path
53
53
  * @param ussdId - Identifier in the path
54
54
  *
55
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, USSD_NOT_FOUND_EXCEPTION.
55
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, USSD_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
56
56
  *
57
57
  * Capability the role of an organization API key needs: `device.manage`.
58
58
  */
@@ -70,7 +70,7 @@ export class UssdResource extends APIResource {
70
70
  * @param dongleId - Identifier in the path
71
71
  * @param ussdId - Identifier in the path
72
72
  *
73
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, USSD_NOT_FOUND_EXCEPTION.
73
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, USSD_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
74
74
  *
75
75
  * Capability the role of an organization API key needs: `device.manage`.
76
76
  */
@@ -87,7 +87,7 @@ export class UssdResource extends APIResource {
87
87
  *
88
88
  * @param dongleId - Identifier in the path
89
89
  *
90
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION.
90
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
91
91
  *
92
92
  * Capability the role of an organization API key needs: `device.manage`.
93
93
  */
@@ -110,7 +110,7 @@ export const DongleOnlineErrorCode = {
110
110
  export type DongleOnlineErrorCode = (typeof DongleOnlineErrorCode)[keyof typeof DongleOnlineErrorCode];
111
111
 
112
112
  /**
113
- * 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)
113
+ * 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)
114
114
  */
115
115
  export const DongleOnlineStatus = {
116
116
  /** Offline */
@@ -125,11 +125,13 @@ export const DongleOnlineStatus = {
125
125
  ONLINE: 5,
126
126
  /** Updating */
127
127
  UPDATING: 6,
128
- /** Rebooting (set at once by POST /dongle/{dongle_id}/reboot) */
128
+ /**
129
+ * 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)
130
+ */
129
131
  REBOOTING: 7,
130
132
  } as const;
131
133
  /**
132
- * 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)
134
+ * 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)
133
135
  */
134
136
  export type DongleOnlineStatus = (typeof DongleOnlineStatus)[keyof typeof DongleOnlineStatus];
135
137
 
@@ -234,6 +234,10 @@ export interface Dongle {
234
234
  public_vpn_password: string | null;
235
235
  is_mute_incoming_call: boolean;
236
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;
237
241
  /** UTC, `YYYY-MM-DD HH:MM:SS[.ffffff]`. */
238
242
  trial_end: string | null;
239
243
  /**
@@ -247,11 +251,11 @@ export interface Dongle {
247
251
  /** Password of the Wi-Fi extender network; null when the role of the key has no device.manage. */
248
252
  wifi_extender_password?: string | null;
249
253
  /**
250
- * 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.
251
255
  */
252
256
  wifi_extender_mode?: number | null;
253
257
  /**
254
- * 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.
255
259
  */
256
260
  dongle_wifi_extender_mode_id?: number | null;
257
261
  /** FreeSWITCH dialplan of the modem. */
@@ -259,15 +263,15 @@ export interface Dongle {
259
263
  /** True while a wifi extender enable/disable command is being processed by the modem. */
260
264
  is_wifi_extender_processing?: boolean;
261
265
  /**
262
- * 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.
263
267
  */
264
268
  dongle_setting?: DongleDongleSetting;
265
269
  /**
266
- * Use public_vpn_server.address. Returned by GET /dongle only, in full mode; null when the role of the key has no network.view.
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.
267
271
  */
268
272
  public_vpn_endpoint?: string | null;
269
273
  /**
270
- * 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 and when the role of the key has no network.view.
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.
271
275
  */
272
276
  public_vpn_server?: DonglePublicVpnServer;
273
277
  dongle_online_status?: DongleOnlineStatus;
@@ -304,13 +308,21 @@ export interface DongleBootstrapDongle {
304
308
  }
305
309
 
306
310
  /**
307
- * 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.
308
312
  */
309
313
  export interface DongleDongleSetting {
310
314
  /**
311
315
  * Email the owner when the modem goes offline. Written via PUT /dongle/{dongle_id}/setting/offline-notification.
312
316
  */
313
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;
314
326
  }
315
327
 
316
328
  /**
@@ -357,6 +369,10 @@ export interface DongleListItem {
357
369
  public_vpn_password?: string | null;
358
370
  is_mute_incoming_call?: boolean;
359
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;
360
376
  /** UTC, `YYYY-MM-DD HH:MM:SS[.ffffff]`. */
361
377
  trial_end?: string | null;
362
378
  dialplan_id?: number;
@@ -371,7 +387,7 @@ export interface DongleListItem {
371
387
  wifi_extender_password?: string | null;
372
388
  dongle_wifi_extender_mode_id?: number | null;
373
389
  /**
374
- * 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.
375
391
  */
376
392
  dongle_online_status: DongleOnlineStatus | null;
377
393
  is_wifi_extender_processing: boolean;
@@ -401,6 +417,11 @@ export interface DongleListItemBootstrapDongle {
401
417
  /** Per-modem settings the client may see; absent when the modem has no settings. */
402
418
  export interface DongleListItemDongleSetting {
403
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;
404
425
  }
405
426
 
406
427
  /**
@@ -438,7 +459,7 @@ export interface DongleNetworkInfo {
438
459
  }
439
460
 
440
461
  /**
441
- * 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 and when the role of the key has no network.view.
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.
442
463
  */
443
464
  export interface DonglePublicVpnServer {
444
465
  type: 'IKEv2';
@@ -583,6 +604,66 @@ export interface PbxSipUser {
583
604
  pbx_sip_connections: Array<PbxSipConnection>;
584
605
  }
585
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
+
586
667
  export interface PublicVpnSession {
587
668
  /** Client address inside the VPN. */
588
669
  ip: string;
@@ -635,7 +716,9 @@ export interface RedirectionCondition {}
635
716
  * Other keys are stored as sent and returned as is.
636
717
  */
637
718
  export interface RedirectionParams {
638
- /** 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
+ */
639
722
  email?: string;
640
723
  /** E-mail addresses to deliver to (types 1 and 2); each must be a valid address. */
641
724
  emails?: Array<string>;
@@ -647,7 +730,9 @@ export interface RedirectionParams {
647
730
  auto_reply_message?: string;
648
731
  /** Optional text stored with the redirection. */
649
732
  forwarding_message?: string;
650
- /** 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
+ */
651
736
  url?: string;
652
737
  }
653
738