teleleo 0.1.0 → 0.2.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 (98) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +53 -2
  3. package/api.md +116 -112
  4. package/dist/core.d.ts +5 -1
  5. package/dist/core.d.ts.map +1 -1
  6. package/dist/core.js +1 -1
  7. package/dist/core.js.map +1 -1
  8. package/dist/errors.d.ts +11 -3
  9. package/dist/errors.d.ts.map +1 -1
  10. package/dist/errors.js +11 -3
  11. package/dist/errors.js.map +1 -1
  12. package/dist/resources/call-scenarios.d.ts +12 -0
  13. package/dist/resources/call-scenarios.d.ts.map +1 -1
  14. package/dist/resources/call-scenarios.js +12 -0
  15. package/dist/resources/call-scenarios.js.map +1 -1
  16. package/dist/resources/calls.d.ts +22 -2
  17. package/dist/resources/calls.d.ts.map +1 -1
  18. package/dist/resources/calls.js +25 -1
  19. package/dist/resources/calls.js.map +1 -1
  20. package/dist/resources/contact-groups.d.ts +10 -0
  21. package/dist/resources/contact-groups.d.ts.map +1 -1
  22. package/dist/resources/contact-groups.js +10 -0
  23. package/dist/resources/contact-groups.js.map +1 -1
  24. package/dist/resources/contacts.d.ts +12 -0
  25. package/dist/resources/contacts.d.ts.map +1 -1
  26. package/dist/resources/contacts.js +12 -0
  27. package/dist/resources/contacts.js.map +1 -1
  28. package/dist/resources/dongles.d.ts +46 -2
  29. package/dist/resources/dongles.d.ts.map +1 -1
  30. package/dist/resources/dongles.js +49 -1
  31. package/dist/resources/dongles.js.map +1 -1
  32. package/dist/resources/files.d.ts +11 -3
  33. package/dist/resources/files.d.ts.map +1 -1
  34. package/dist/resources/files.js +11 -3
  35. package/dist/resources/files.js.map +1 -1
  36. package/dist/resources/follow-up-sms-settings.d.ts +12 -2
  37. package/dist/resources/follow-up-sms-settings.d.ts.map +1 -1
  38. package/dist/resources/follow-up-sms-settings.js +12 -2
  39. package/dist/resources/follow-up-sms-settings.js.map +1 -1
  40. package/dist/resources/index.d.ts +1 -1
  41. package/dist/resources/index.d.ts.map +1 -1
  42. package/dist/resources/mailings.d.ts +18 -4
  43. package/dist/resources/mailings.d.ts.map +1 -1
  44. package/dist/resources/mailings.js +18 -4
  45. package/dist/resources/mailings.js.map +1 -1
  46. package/dist/resources/public-vpn.d.ts +8 -0
  47. package/dist/resources/public-vpn.d.ts.map +1 -1
  48. package/dist/resources/public-vpn.js +8 -0
  49. package/dist/resources/public-vpn.js.map +1 -1
  50. package/dist/resources/redirections.d.ts +12 -2
  51. package/dist/resources/redirections.d.ts.map +1 -1
  52. package/dist/resources/redirections.js +12 -2
  53. package/dist/resources/redirections.js.map +1 -1
  54. package/dist/resources/sip-users.d.ts +4 -0
  55. package/dist/resources/sip-users.d.ts.map +1 -1
  56. package/dist/resources/sip-users.js +4 -0
  57. package/dist/resources/sip-users.js.map +1 -1
  58. package/dist/resources/sms.d.ts +23 -5
  59. package/dist/resources/sms.d.ts.map +1 -1
  60. package/dist/resources/sms.js +23 -5
  61. package/dist/resources/sms.js.map +1 -1
  62. package/dist/resources/socks-proxies.d.ts +10 -0
  63. package/dist/resources/socks-proxies.d.ts.map +1 -1
  64. package/dist/resources/socks-proxies.js +10 -0
  65. package/dist/resources/socks-proxies.js.map +1 -1
  66. package/dist/resources/ussd.d.ts +11 -1
  67. package/dist/resources/ussd.d.ts.map +1 -1
  68. package/dist/resources/ussd.js +11 -1
  69. package/dist/resources/ussd.js.map +1 -1
  70. package/dist/types/enums.d.ts +29 -8
  71. package/dist/types/enums.d.ts.map +1 -1
  72. package/dist/types/enums.js +24 -7
  73. package/dist/types/enums.js.map +1 -1
  74. package/dist/types/models.d.ts +102 -15
  75. package/dist/types/models.d.ts.map +1 -1
  76. package/dist/version.d.ts +1 -1
  77. package/dist/version.js +1 -1
  78. package/package.json +1 -1
  79. package/src/core.ts +6 -2
  80. package/src/errors.ts +11 -3
  81. package/src/resources/call-scenarios.ts +12 -0
  82. package/src/resources/calls.ts +27 -2
  83. package/src/resources/contact-groups.ts +10 -0
  84. package/src/resources/contacts.ts +12 -0
  85. package/src/resources/dongles.ts +51 -1
  86. package/src/resources/files.ts +11 -3
  87. package/src/resources/follow-up-sms-settings.ts +12 -2
  88. package/src/resources/index.ts +1 -1
  89. package/src/resources/mailings.ts +18 -4
  90. package/src/resources/public-vpn.ts +8 -0
  91. package/src/resources/redirections.ts +12 -2
  92. package/src/resources/sip-users.ts +4 -0
  93. package/src/resources/sms.ts +23 -5
  94. package/src/resources/socks-proxies.ts +10 -0
  95. package/src/resources/ussd.ts +11 -1
  96. package/src/types/enums.ts +30 -8
  97. package/src/types/models.ts +107 -14
  98. package/src/version.ts +1 -1
@@ -9,6 +9,7 @@ import type {
9
9
  DongleNetworkInfo,
10
10
  DongleSimIdentifiers,
11
11
  DongleStatistic,
12
+ DongleWifiClientList,
12
13
  } from '../types/models.js';
13
14
  import type {
14
15
  DonglesEnableWifiExtenderParams,
@@ -28,6 +29,8 @@ export class DonglesResource extends APIResource {
28
29
  * Modems of the account. In full mode every field of the Dongle schema that the list serves is returned; dongle_setting and public_vpn_server are present in full mode only. The cheapest call is GET /dongle?is_short=1&limit=1: use it to check that an API key works. Newest first by default (created_at descending, then the id descending).
29
30
  *
30
31
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
32
+ *
33
+ * Capability the role of an organization API key needs: `device.view`.
31
34
  */
32
35
  list(params: DonglesListParams = {}, options?: RequestOptions): PagePromise<DongleListItem> {
33
36
  return this._client.getPage<DongleListItem>('/dongle', {
@@ -58,11 +61,32 @@ export class DonglesResource extends APIResource {
58
61
  * @param dongleId - Identifier in the path
59
62
  *
60
63
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION.
64
+ *
65
+ * Capability the role of an organization API key needs: `device.manage`.
61
66
  */
62
67
  reboot(dongleId: number, options?: RequestOptions): Promise<boolean> {
63
68
  return this._client.request('POST', `/dongle/${pathParam(dongleId)}/reboot`, { options }).then(asStatus);
64
69
  }
65
70
 
71
+ /**
72
+ * List devices on modem Wi-Fi.
73
+ *
74
+ * Devices connected to the Wi-Fi hotspot of the modem. The modem is asked only when this is called; its answer, a failure included, is kept for 20 seconds: a call within that time gets it without asking the modem again, and updated_at tells when the modem answered. Turning Wi-Fi on or off and new Wi-Fi credentials drop the kept answer. The computer on USB is not in the list. Available from modem firmware 4.5.8; older firmware answers 409 DONGLE_WIFI_CLIENT_LIST_NOT_SUPPORTED_EXCEPTION.
75
+ *
76
+ * @param dongleId - ID of the dongle
77
+ *
78
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_CLIENT_LIST_DONGLE_OFFLINE_EXCEPTION, DONGLE_WIFI_CLIENT_LIST_DONGLE_BUSY_EXCEPTION, DONGLE_WIFI_CLIENT_LIST_NOT_SUPPORTED_EXCEPTION, DONGLE_WIFI_CLIENT_LIST_DONGLE_UNAVAILABLE_EXCEPTION.
79
+ *
80
+ * Capability the role of an organization API key needs: `network.view`.
81
+ *
82
+ * Needs modem firmware 4.5.8 or later.
83
+ */
84
+ getWifiClients(dongleId: number, options?: RequestOptions): Promise<DongleWifiClientList> {
85
+ return this._client
86
+ .request('GET', `/dongle/${pathParam(dongleId)}/wifi/clients`, { options })
87
+ .then((data) => data as DongleWifiClientList);
88
+ }
89
+
66
90
  /**
67
91
  * Enable modem Wi-Fi.
68
92
  *
@@ -71,6 +95,8 @@ export class DonglesResource extends APIResource {
71
95
  * @param dongleId - ID of the dongle
72
96
  *
73
97
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_ALREADY_IN_THE_SAME_STATUS_EXCEPTION, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
98
+ *
99
+ * Capability the role of an organization API key needs: `device.manage`.
74
100
  */
75
101
  enableWifi(dongleId: number, options?: RequestOptions): Promise<boolean> {
76
102
  return this._client
@@ -86,6 +112,8 @@ export class DonglesResource extends APIResource {
86
112
  * @param dongleId - ID of the dongle
87
113
  *
88
114
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_ALREADY_IN_THE_SAME_STATUS_EXCEPTION, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
115
+ *
116
+ * Capability the role of an organization API key needs: `device.manage`.
89
117
  */
90
118
  disableWifi(dongleId: number, options?: RequestOptions): Promise<boolean> {
91
119
  return this._client
@@ -101,6 +129,8 @@ export class DonglesResource extends APIResource {
101
129
  * @param dongleId - ID of the dongle
102
130
  *
103
131
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_INVALID_SSID_EXCEPTION, DONGLE_WIFI_INVALID_PASSWORD_EXCEPTION, DONGLE_WIFI_API_EXCEPTION.
132
+ *
133
+ * Capability the role of an organization API key needs: `device.manage`.
104
134
  */
105
135
  setWifiCredentials(
106
136
  dongleId: number,
@@ -123,6 +153,8 @@ export class DonglesResource extends APIResource {
123
153
  * @param dongleId - ID of the dongle
124
154
  *
125
155
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, DONGLE_WIFI_EXTENDER_LOCKED_EXCEPTION, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
156
+ *
157
+ * Capability the role of an organization API key needs: `device.manage`.
126
158
  */
127
159
  enableWifiExtender(
128
160
  dongleId: number,
@@ -145,6 +177,8 @@ export class DonglesResource extends APIResource {
145
177
  * @param dongleId - ID of the dongle
146
178
  *
147
179
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_EXTENDER_LOCKED_EXCEPTION, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
180
+ *
181
+ * Capability the role of an organization API key needs: `device.manage`.
148
182
  */
149
183
  disableWifiExtender(dongleId: number, options?: RequestOptions): Promise<boolean> {
150
184
  return this._client
@@ -160,6 +194,8 @@ export class DonglesResource extends APIResource {
160
194
  * @param dongleId - ID of the dongle
161
195
  *
162
196
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
197
+ *
198
+ * Capability the role of an organization API key needs: `device.manage`.
163
199
  */
164
200
  scanWifiNetworks(dongleId: number, options?: RequestOptions): Promise<boolean> {
165
201
  return this._client
@@ -175,6 +211,8 @@ export class DonglesResource extends APIResource {
175
211
  * @param dongleId - ID of the dongle
176
212
  *
177
213
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_SETTING_NOT_FOUND.
214
+ *
215
+ * Capability the role of an organization API key needs: `device.manage`.
178
216
  */
179
217
  updateOfflineNotification(
180
218
  dongleId: number,
@@ -197,6 +235,8 @@ export class DonglesResource extends APIResource {
197
235
  * @param dongleId - ID of the dongle
198
236
  *
199
237
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_MANUAL_PHONE_DETERMINATION_NUMBER_EXCEPTION, DONGLE_MANUAL_PHONE_DETERMINATION_ALREADY_IN_PROGRESS_EXCEPTION.
238
+ *
239
+ * Capability the role of an organization API key needs: `device.manage`.
200
240
  */
201
241
  setNumber(dongleId: number, params: DonglesSetNumberParams, options?: RequestOptions): Promise<boolean> {
202
242
  return this._client
@@ -212,6 +252,8 @@ export class DonglesResource extends APIResource {
212
252
  * @param dongleId - Identifier in the path
213
253
  *
214
254
  * Error codes (`errorMessage`): DONGLE_ERROR_DONGLE_NOT_FOUND.
255
+ *
256
+ * Capability the role of an organization API key needs: `device.view`.
215
257
  */
216
258
  get(dongleId: number, options?: RequestOptions): Promise<Dongle> {
217
259
  return this._client
@@ -226,7 +268,9 @@ export class DonglesResource extends APIResource {
226
268
  *
227
269
  * @param dongleId - Identifier in the path
228
270
  *
229
- * Error codes (`errorMessage`): DONGLE_ERROR_DONGLE_NOT_FOUND, PUBLIC_API_FIELD_FORBIDDEN.
271
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_ERROR_DONGLE_NOT_FOUND, PUBLIC_API_FIELD_FORBIDDEN.
272
+ *
273
+ * Capability the role of an organization API key needs: `device.manage`.
230
274
  */
231
275
  update(dongleId: number, params: DonglesUpdateParams = {}, options?: RequestOptions): Promise<Dongle> {
232
276
  return this._client
@@ -250,6 +294,8 @@ export class DonglesResource extends APIResource {
250
294
  * @param dongleId - Identifier in the path
251
295
  *
252
296
  * Error codes (`errorMessage`): DONGLE_ERROR_DONGLE_NOT_FOUND, DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_HTTP_RESPONSE, DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_INVALID_CONTENT.
297
+ *
298
+ * Capability the role of an organization API key needs: `device.view`.
253
299
  */
254
300
  getNetworkInfo(dongleId: number, options?: RequestOptions): Promise<DongleNetworkInfo> {
255
301
  return this._client
@@ -265,6 +311,8 @@ export class DonglesResource extends APIResource {
265
311
  * @param dongleId - Identifier in the path
266
312
  *
267
313
  * Error codes (`errorMessage`): DONGLE_ERROR_DONGLE_NOT_FOUND, DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_HTTP_RESPONSE, DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_INVALID_CONTENT.
314
+ *
315
+ * Capability the role of an organization API key needs: `device.view`.
268
316
  */
269
317
  getSimIdentifiers(dongleId: number, options?: RequestOptions): Promise<DongleSimIdentifiers> {
270
318
  return this._client
@@ -280,6 +328,8 @@ export class DonglesResource extends APIResource {
280
328
  * @param dongleId - Identifier in the path
281
329
  *
282
330
  * Error codes (`errorMessage`): PARSING_DATE_TIME_EXCEPTION, DONGLE_ERROR_DONGLE_NOT_FOUND.
331
+ *
332
+ * Capability the role of an organization API key needs: `device.view`.
283
333
  */
284
334
  listStatistics(
285
335
  dongleId: number,
@@ -10,11 +10,13 @@ export class FilesResource extends APIResource {
10
10
  /**
11
11
  * Get file.
12
12
  *
13
- * Downloads a file of the account: a call recording, the audio of a call scenario or a mailing, an invoice document. The file_id comes from those objects (file_id, call_scenario_file_id, invoice and receipt files).
13
+ * Downloads a file of the account: a call recording, or the audio of a call scenario or a mailing. The file_id comes from those objects (file_id, call_scenario_file_id).
14
14
  *
15
15
  * @param fileId -
16
16
  *
17
17
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FILE_NOT_FOUND_EXCEPTION.
18
+ *
19
+ * Capability the role of an organization API key needs: `device.view`.
18
20
  */
19
21
  download(fileId: number, options?: RequestOptions): Promise<Uint8Array> {
20
22
  return this._client.requestBytes('GET', `/file/${pathParam(fileId)}`, { options });
@@ -28,6 +30,8 @@ export class FilesResource extends APIResource {
28
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.
29
31
  *
30
32
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, TMP_FILE_NOT_FOUND.
33
+ *
34
+ * Capability the role of an organization API key needs: `automation.manage`.
31
35
  */
32
36
  downloadTmp(fileId: string, options?: RequestOptions): Promise<Uint8Array> {
33
37
  return this._client.requestBytes('GET', `/file/tmp/${pathParam(fileId, true)}`, { options });
@@ -38,7 +42,9 @@ export class FilesResource extends APIResource {
38
42
  *
39
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.
40
44
  *
41
- * 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.
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.
46
+ *
47
+ * Capability the role of an organization API key needs: `automation.manage`.
42
48
  */
43
49
  uploadTmp(params: FilesUploadTmpParams, options?: RequestOptions): Promise<TmpFile> {
44
50
  return this._client
@@ -56,9 +62,11 @@ export class FilesResource extends APIResource {
56
62
  /**
57
63
  * Generate speech.
58
64
  *
59
- * 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 user: the 6th answers 429 RATE_LIMIT_EXCEEDED.
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.
60
66
  *
61
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.
68
+ *
69
+ * Capability the role of an organization API key needs: `automation.manage`.
62
70
  */
63
71
  generateSpeech(params: FilesGenerateSpeechParams, options?: RequestOptions): Promise<TmpFile> {
64
72
  return this._client
@@ -18,6 +18,8 @@ export class FollowUpSmsSettingsResource extends APIResource {
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
20
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
21
+ *
22
+ * Capability the role of an organization API key needs: `automation.view`.
21
23
  */
22
24
  list(
23
25
  params: FollowUpSmsSettingsListParams = {},
@@ -41,7 +43,9 @@ export class FollowUpSmsSettingsResource extends APIResource {
41
43
  *
42
44
  * Creates a follow-up SMS setting for a modem.
43
45
  *
44
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, INVALID_DONGLE_TYPE, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, INVALID_RINGING_DURATION_TIMEOUT, INVALID_CALL_DURATION_TIMEOUT, INVALID_DAILY_SMS_LIMIT, DUPLICATE_DONGLE_FOLLOW_UP_SMS_SETTING.
46
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, INVALID_DONGLE_TYPE, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, INVALID_RINGING_DURATION_TIMEOUT, INVALID_CALL_DURATION_TIMEOUT, INVALID_DAILY_SMS_LIMIT, DUPLICATE_DONGLE_FOLLOW_UP_SMS_SETTING, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE.
47
+ *
48
+ * Capability the role of an organization API key needs: `automation.manage`.
45
49
  */
46
50
  create(params: FollowUpSmsSettingsCreateParams, options?: RequestOptions): Promise<FollowUpSmsSetting> {
47
51
  return this._client
@@ -67,6 +71,8 @@ export class FollowUpSmsSettingsResource extends APIResource {
67
71
  * @param followUpSmsSettingId - Follow Up Sms Setting ID
68
72
  *
69
73
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FOLLOW_UP_SMS_SETTING_NOT_FOUND_EXCEPTION.
74
+ *
75
+ * Capability the role of an organization API key needs: `automation.view`.
70
76
  */
71
77
  get(followUpSmsSettingId: number, options?: RequestOptions): Promise<FollowUpSmsSetting> {
72
78
  return this._client
@@ -81,7 +87,9 @@ export class FollowUpSmsSettingsResource extends APIResource {
81
87
  *
82
88
  * @param followUpSmsSettingId - Follow-up SMS setting ID
83
89
  *
84
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FOLLOW_UP_SMS_SETTING_NOT_FOUND_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, INVALID_DONGLE_TYPE, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, INVALID_RINGING_DURATION_TIMEOUT, INVALID_CALL_DURATION_TIMEOUT, INVALID_DAILY_SMS_LIMIT, DUPLICATE_DONGLE_FOLLOW_UP_SMS_SETTING.
90
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FOLLOW_UP_SMS_SETTING_NOT_FOUND_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, INVALID_DONGLE_TYPE, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, INVALID_RINGING_DURATION_TIMEOUT, INVALID_CALL_DURATION_TIMEOUT, INVALID_DAILY_SMS_LIMIT, DUPLICATE_DONGLE_FOLLOW_UP_SMS_SETTING, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE.
91
+ *
92
+ * Capability the role of an organization API key needs: `automation.manage`.
85
93
  */
86
94
  update(
87
95
  followUpSmsSettingId: number,
@@ -111,6 +119,8 @@ export class FollowUpSmsSettingsResource extends APIResource {
111
119
  * @param followUpSmsSettingId - Follow-up SMS setting ID
112
120
  *
113
121
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, FOLLOW_UP_SMS_SETTING_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
122
+ *
123
+ * Capability the role of an organization API key needs: `automation.manage`.
114
124
  */
115
125
  delete(followUpSmsSettingId: number, options?: RequestOptions): Promise<boolean> {
116
126
  return this._client
@@ -39,7 +39,7 @@ export interface Resources {
39
39
  readonly dongles: DonglesResource;
40
40
  /** SMS of the modems: history, sending, replies, threads. */
41
41
  readonly sms: SmsResource;
42
- /** Calls of the modems: history, outgoing calls. */
42
+ /** Calls of the modems: history, outgoing calls, transcripts. */
43
43
  readonly calls: CallsResource;
44
44
  /** USSD requests through a modem. */
45
45
  readonly ussd: UssdResource;
@@ -20,6 +20,8 @@ export class MailingsResource extends APIResource {
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
22
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION.
23
+ *
24
+ * Capability the role of an organization API key needs: `automation.view`.
23
25
  */
24
26
  list(params: MailingsListParams = {}, options?: RequestOptions): PagePromise<Mailing> {
25
27
  return this._client.getPage<Mailing>('/mailing', {
@@ -56,7 +58,9 @@ export class MailingsResource extends APIResource {
56
58
  *
57
59
  * Creates an SMS or call mailing. Use POST /mailing/sms or POST /mailing/call instead.
58
60
  *
59
- * 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.
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.
62
+ *
63
+ * Capability the role of an organization API key needs: `automation.manage`.
60
64
  */
61
65
  create(params: MailingsCreateParams, options?: RequestOptions): Promise<Mailing> {
62
66
  return this._client
@@ -85,7 +89,9 @@ export class MailingsResource extends APIResource {
85
89
  *
86
90
  * Creates an SMS mailing to the listed phones, contacts and contact groups, sent now or at scheduled_at.
87
91
  *
88
- * 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.
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.
93
+ *
94
+ * Capability the role of an organization API key needs: `automation.manage`.
89
95
  */
90
96
  createSms(params: MailingsCreateSmsParams, options?: RequestOptions): Promise<Mailing> {
91
97
  return this._client
@@ -111,7 +117,9 @@ export class MailingsResource extends APIResource {
111
117
  *
112
118
  * Creates a call mailing that plays an audio file (tmp_file_id) to the listed phones, contacts and contact groups.
113
119
  *
114
- * 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.
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.
121
+ *
122
+ * Capability the role of an organization API key needs: `automation.manage`.
115
123
  */
116
124
  createCall(params: MailingsCreateCallParams, options?: RequestOptions): Promise<Mailing> {
117
125
  return this._client
@@ -142,6 +150,8 @@ export class MailingsResource extends APIResource {
142
150
  * @param mailingId - Identifier in the path
143
151
  *
144
152
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, MAILING_NOT_FOUND.
153
+ *
154
+ * Capability the role of an organization API key needs: `automation.view`.
145
155
  */
146
156
  get(mailingId: number, options?: RequestOptions): Promise<Mailing> {
147
157
  return this._client
@@ -156,7 +166,9 @@ export class MailingsResource extends APIResource {
156
166
  *
157
167
  * @param mailingId - Identifier in the path
158
168
  *
159
- * 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.
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.
170
+ *
171
+ * Capability the role of an organization API key needs: `automation.manage`.
160
172
  */
161
173
  update(mailingId: number, params: MailingsUpdateParams = {}, options?: RequestOptions): Promise<Mailing> {
162
174
  return this._client
@@ -186,6 +198,8 @@ export class MailingsResource extends APIResource {
186
198
  * @param mailingId - Identifier in the path
187
199
  *
188
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.
201
+ *
202
+ * Capability the role of an organization API key needs: `automation.manage`.
189
203
  */
190
204
  delete(mailingId: number, options?: RequestOptions): Promise<boolean> {
191
205
  return this._client.request('DELETE', `/mailing/${pathParam(mailingId)}`, { options }).then(asStatus);
@@ -14,6 +14,8 @@ export class PublicVpnResource extends APIResource {
14
14
  * @param dongleId - ID of the dongle
15
15
  *
16
16
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, DONGLE_PUBLIC_VPN_ALREADY_ENABLED_EXCEPTION.
17
+ *
18
+ * Capability the role of an organization API key needs: `network.manage`.
17
19
  */
18
20
  enable(dongleId: number, options?: RequestOptions): Promise<boolean> {
19
21
  return this._client
@@ -29,6 +31,8 @@ export class PublicVpnResource extends APIResource {
29
31
  * @param dongleId - ID of the dongle
30
32
  *
31
33
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_PUBLIC_VPN_ALREADY_DISABLED_EXCEPTION.
34
+ *
35
+ * Capability the role of an organization API key needs: `network.manage`.
32
36
  */
33
37
  disable(dongleId: number, options?: RequestOptions): Promise<boolean> {
34
38
  return this._client
@@ -44,6 +48,8 @@ export class PublicVpnResource extends APIResource {
44
48
  * @param dongleId - ID of the dongle
45
49
  *
46
50
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
51
+ *
52
+ * Capability the role of an organization API key needs: `network.manage`.
47
53
  */
48
54
  refreshPassword(dongleId: number, options?: RequestOptions): Promise<boolean> {
49
55
  return this._client
@@ -55,6 +61,8 @@ export class PublicVpnResource extends APIResource {
55
61
  * List public VPN sessions.
56
62
  *
57
63
  * Live VPN sessions of the modems of the account, as the VPN gateway reports them. Not paginated.
64
+ *
65
+ * Capability the role of an organization API key needs: `network.view`.
58
66
  */
59
67
  listSessions(options?: RequestOptions): Promise<Array<PublicVpnSession>> {
60
68
  return this._client
@@ -18,6 +18,8 @@ export class RedirectionsResource extends APIResource {
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
20
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION.
21
+ *
22
+ * Capability the role of an organization API key needs: `automation.view`.
21
23
  */
22
24
  list(params: RedirectionsListParams = {}, options?: RequestOptions): PagePromise<Redirection> {
23
25
  return this._client.getPage<Redirection>('/redirection', {
@@ -44,7 +46,9 @@ export class RedirectionsResource extends APIResource {
44
46
  *
45
47
  * Creates a redirection rule; condition and params are checked on save (see RedirectionCondition and RedirectionParams).
46
48
  *
47
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARAMS_NOT_VALID_EXCEPTION, CONDITION_NOT_VALID_EXCEPTION, DONGLE_NOT_FOUND, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
49
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARAMS_NOT_VALID_EXCEPTION, CONDITION_NOT_VALID_EXCEPTION, DONGLE_NOT_FOUND, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE.
50
+ *
51
+ * Capability the role of an organization API key needs: `automation.manage`.
48
52
  */
49
53
  create(params: RedirectionsCreateParams, options?: RequestOptions): Promise<Redirection> {
50
54
  return this._client
@@ -68,6 +72,8 @@ export class RedirectionsResource extends APIResource {
68
72
  * @param redirectionId - Identifier in the path
69
73
  *
70
74
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, REDIRECTION_NOT_FOUND_EXCEPTION.
75
+ *
76
+ * Capability the role of an organization API key needs: `automation.view`.
71
77
  */
72
78
  get(redirectionId: number, options?: RequestOptions): Promise<Redirection> {
73
79
  return this._client
@@ -82,7 +88,9 @@ export class RedirectionsResource extends APIResource {
82
88
  *
83
89
  * @param redirectionId - Identifier in the path
84
90
  *
85
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, REDIRECTION_NOT_FOUND_EXCEPTION, PARAMS_NOT_VALID_EXCEPTION, CONDITION_NOT_VALID_EXCEPTION, DONGLE_NOT_FOUND, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
91
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, REDIRECTION_NOT_FOUND_EXCEPTION, PARAMS_NOT_VALID_EXCEPTION, CONDITION_NOT_VALID_EXCEPTION, DONGLE_NOT_FOUND, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE.
92
+ *
93
+ * Capability the role of an organization API key needs: `automation.manage`.
86
94
  */
87
95
  update(
88
96
  redirectionId: number,
@@ -110,6 +118,8 @@ export class RedirectionsResource extends APIResource {
110
118
  * @param redirectionId - Identifier in the path
111
119
  *
112
120
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, REDIRECTION_NOT_FOUND_EXCEPTION.
121
+ *
122
+ * Capability the role of an organization API key needs: `automation.manage`.
113
123
  */
114
124
  delete(redirectionId: number, options?: RequestOptions): Promise<boolean> {
115
125
  return this._client
@@ -13,6 +13,8 @@ export class SipUsersResource extends APIResource {
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
15
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
16
+ *
17
+ * Capability the role of an organization API key needs: `call.make`.
16
18
  */
17
19
  list(params: SipUsersListParams = {}, options?: RequestOptions): Promise<Array<PbxSipUser>> {
18
20
  return this._client
@@ -31,6 +33,8 @@ export class SipUsersResource extends APIResource {
31
33
  * @param sipUserId - Identifier in the path
32
34
  *
33
35
  * Error codes (`errorMessage`): PBX_SIP_ERROR_IDENTIFIER_CANT_FIND_PBX_USER.
36
+ *
37
+ * Capability the role of an organization API key needs: `call.make`.
34
38
  */
35
39
  get(sipUserId: number, options?: RequestOptions): Promise<PbxSipUser> {
36
40
  return this._client
@@ -19,11 +19,13 @@ export class SmsResource extends APIResource {
19
19
  /**
20
20
  * Send SMS.
21
21
  *
22
- * Sends an SMS from the modem to a phone number, now or at scheduled_at. sms_status_id 1 (Sended) means the mobile network accepted it, not that the handset received it.
22
+ * Sends an SMS from the modem to a phone number, now or at scheduled_at. sms_status_id 1 (Sended) means the modem took it for the mobile network, not that the handset received it: delivery is confirmed by 2 (from the delivery report), and 3 means it was not delivered or no report came within about 5 minutes.
23
23
  *
24
24
  * @param dongleId - ID of the dongle
25
25
  *
26
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, SMS_ERROR_INVALID_RECEIVER_NUMBER, SMS_ERROR_IDENTIFIER_INVALID_CALLBACK_URL, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, SMS_ERROR_IDENTIFIER_LONG_MESSAGE, SMS_ERROR_IDENTIFIER_INVALID_SCHEDULED_AT, SMS_ERROR_IDENTIFIER_EMPTY_FIELDS.
26
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, SMS_ERROR_INVALID_RECEIVER_NUMBER, SMS_ERROR_IDENTIFIER_INVALID_CALLBACK_URL, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, SMS_ERROR_IDENTIFIER_LONG_MESSAGE, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE, SMS_ERROR_IDENTIFIER_INVALID_SCHEDULED_AT, SMS_ERROR_IDENTIFIER_EMPTY_FIELDS, DONGLE_FIRMWARE_UPDATING_EXCEPTION.
27
+ *
28
+ * Capability the role of an organization API key needs: `sms.send`.
27
29
  */
28
30
  send(dongleId: number, params: SmsSendParams, options?: RequestOptions): Promise<Sms> {
29
31
  return this._client
@@ -46,7 +48,9 @@ export class SmsResource extends APIResource {
46
48
  *
47
49
  * @param dongleId - ID of the dongle
48
50
  *
49
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, CONTACT_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, SMS_ERROR_IDENTIFIER_LONG_MESSAGE, SMS_ERROR_IDENTIFIER_INVALID_SCHEDULED_AT, SMS_ERROR_IDENTIFIER_EMPTY_FIELDS.
51
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, CONTACT_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, SMS_ERROR_IDENTIFIER_LONG_MESSAGE, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE, SMS_ERROR_IDENTIFIER_INVALID_SCHEDULED_AT, SMS_ERROR_IDENTIFIER_EMPTY_FIELDS, DONGLE_FIRMWARE_UPDATING_EXCEPTION.
52
+ *
53
+ * Capability the role of an organization API key needs: `sms.send`.
50
54
  */
51
55
  sendToContact(dongleId: number, params: SmsSendToContactParams, options?: RequestOptions): Promise<Sms> {
52
56
  return this._client
@@ -64,7 +68,9 @@ export class SmsResource extends APIResource {
64
68
  *
65
69
  * @param dongleId - ID of the dongle
66
70
  *
67
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, SMS_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, SMS_ERROR_IDENTIFIER_LONG_MESSAGE, SMS_ERROR_IDENTIFIER_INVALID_SCHEDULED_AT, SMS_ERROR_IDENTIFIER_EMPTY_FIELDS.
71
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, SMS_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, SMS_ERROR_IDENTIFIER_LONG_MESSAGE, SMS_ERROR_IDENTIFIER_EMPTY_MESSAGE, SMS_ERROR_IDENTIFIER_INVALID_SCHEDULED_AT, SMS_ERROR_IDENTIFIER_EMPTY_FIELDS, DONGLE_FIRMWARE_UPDATING_EXCEPTION.
72
+ *
73
+ * Capability the role of an organization API key needs: `sms.send`.
68
74
  */
69
75
  reply(dongleId: number, params: SmsReplyParams, options?: RequestOptions): Promise<Sms> {
70
76
  return this._client
@@ -85,6 +91,8 @@ export class SmsResource extends APIResource {
85
91
  * Conversation view: the last SMS per phone number of the modem, newest first.
86
92
  *
87
93
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
94
+ *
95
+ * Capability the role of an organization API key needs: `sms.view`.
88
96
  */
89
97
  listThreads(params: SmsListThreadsParams = {}, options?: RequestOptions): PagePromise<SmsThread> {
90
98
  return this._client.getPage<SmsThread>('/sms/thread', {
@@ -100,6 +108,8 @@ export class SmsResource extends APIResource {
100
108
  * SMS of all modems of the account, incoming and outgoing. Newest first by default (created_at descending, then the id descending).
101
109
  *
102
110
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, SMS_ERROR_IDENTIFIER_INVALID_SMS_TYPE.
111
+ *
112
+ * Capability the role of an organization API key needs: `sms.view`.
103
113
  */
104
114
  list(params: SmsListParams = {}, options?: RequestOptions): PagePromise<Sms> {
105
115
  return this._client.getPage<Sms>('/sms', {
@@ -128,6 +138,8 @@ export class SmsResource extends APIResource {
128
138
  * @param dongleId - Identifier in the path
129
139
  *
130
140
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, SMS_ERROR_IDENTIFIER_INVALID_SMS_TYPE.
141
+ *
142
+ * Capability the role of an organization API key needs: `sms.view`.
131
143
  */
132
144
  listForDongle(
133
145
  dongleId: number,
@@ -159,6 +171,8 @@ export class SmsResource extends APIResource {
159
171
  * @param smsId - Identifier in the path
160
172
  *
161
173
  * Error codes (`errorMessage`): SMS_ERROR_ERROR_SMS_NOT_FOUND.
174
+ *
175
+ * Capability the role of an organization API key needs: `sms.view`.
162
176
  */
163
177
  get(dongleId: number, smsId: number, options?: RequestOptions): Promise<Sms> {
164
178
  return this._client
@@ -174,7 +188,9 @@ export class SmsResource extends APIResource {
174
188
  * @param dongleId - Identifier in the path
175
189
  * @param smsId - Identifier in the path
176
190
  *
177
- * 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_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.
192
+ *
193
+ * Capability the role of an organization API key needs: `sms.send`.
178
194
  */
179
195
  update(
180
196
  dongleId: number,
@@ -205,6 +221,8 @@ export class SmsResource extends APIResource {
205
221
  * @param smsId - Identifier in the path
206
222
  *
207
223
  * Error codes (`errorMessage`): SMS_ERROR_ERROR_SMS_NOT_FOUND.
224
+ *
225
+ * Capability the role of an organization API key needs: `sms.send`.
208
226
  */
209
227
  delete(dongleId: number, smsId: number, options?: RequestOptions): Promise<void> {
210
228
  return this._client
@@ -18,6 +18,8 @@ export class SocksProxiesResource extends APIResource {
18
18
  * SOCKS5 proxies of the modems of the account. Newest first by default (created_at descending, then the id descending).
19
19
  *
20
20
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
21
+ *
22
+ * Capability the role of an organization API key needs: `network.view`.
21
23
  */
22
24
  list(params: SocksProxiesListParams = {}, options?: RequestOptions): PagePromise<DongleSocksProxy> {
23
25
  return this._client.getPage<DongleSocksProxy>('/dongle-socks-proxy', {
@@ -33,6 +35,8 @@ export class SocksProxiesResource extends APIResource {
33
35
  * One proxy per modem; the login is generated by the server. The proxy routes traffic through the mobile network of the modem.
34
36
  *
35
37
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, PASSWORD_TOO_SHORT_EXCEPTION, ALLOWED_IPS_NOT_VALID_EXCEPTION, DONGLE_SOCKS_PROXY_ALREADY_EXISTS_EXCEPTION.
38
+ *
39
+ * Capability the role of an organization API key needs: `network.manage`.
36
40
  */
37
41
  create(params: SocksProxiesCreateParams, options?: RequestOptions): Promise<DongleSocksProxy> {
38
42
  return this._client
@@ -51,6 +55,8 @@ export class SocksProxiesResource extends APIResource {
51
55
  * @param dongleSocksProxyId - Identifier in the path
52
56
  *
53
57
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_SOCKS_PROXY_NOT_FOUND_EXCEPTION.
58
+ *
59
+ * Capability the role of an organization API key needs: `network.view`.
54
60
  */
55
61
  get(dongleSocksProxyId: number, options?: RequestOptions): Promise<DongleSocksProxy> {
56
62
  return this._client
@@ -66,6 +72,8 @@ export class SocksProxiesResource extends APIResource {
66
72
  * @param dongleSocksProxyId - Identifier in the path
67
73
  *
68
74
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_SOCKS_PROXY_NOT_FOUND_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, PASSWORD_TOO_SHORT_EXCEPTION, ALLOWED_IPS_NOT_VALID_EXCEPTION.
75
+ *
76
+ * Capability the role of an organization API key needs: `network.manage`.
69
77
  */
70
78
  update(
71
79
  dongleSocksProxyId: number,
@@ -88,6 +96,8 @@ export class SocksProxiesResource extends APIResource {
88
96
  * @param dongleSocksProxyId - Identifier in the path
89
97
  *
90
98
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_SOCKS_PROXY_NOT_FOUND_EXCEPTION.
99
+ *
100
+ * Capability the role of an organization API key needs: `network.manage`.
91
101
  */
92
102
  delete(dongleSocksProxyId: number, options?: RequestOptions): Promise<boolean> {
93
103
  return this._client
@@ -16,6 +16,8 @@ export class UssdResource extends APIResource {
16
16
  * @param dongleId - Identifier in the path
17
17
  *
18
18
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION.
19
+ *
20
+ * Capability the role of an organization API key needs: `device.manage`.
19
21
  */
20
22
  list(dongleId: number, params: UssdListParams = {}, options?: RequestOptions): PagePromise<Ussd> {
21
23
  return this._client.getPage<Ussd>(`/dongle/${pathParam(dongleId)}/ussd`, {
@@ -32,7 +34,9 @@ export class UssdResource extends APIResource {
32
34
  *
33
35
  * @param dongleId - Identifier in the path
34
36
  *
35
- * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, USSD_INVALID_COMMAND_FORMAT_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, USSD_LAST_USSD_NOT_PROCESSED_EXCEPTION.
37
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, USSD_INVALID_COMMAND_FORMAT_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, USSD_LAST_USSD_NOT_PROCESSED_EXCEPTION, DONGLE_FIRMWARE_UPDATING_EXCEPTION.
38
+ *
39
+ * Capability the role of an organization API key needs: `device.manage`.
36
40
  */
37
41
  send(dongleId: number, params: UssdSendParams, options?: RequestOptions): Promise<Ussd> {
38
42
  return this._client
@@ -49,6 +53,8 @@ export class UssdResource extends APIResource {
49
53
  * @param ussdId - Identifier in the path
50
54
  *
51
55
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, USSD_NOT_FOUND_EXCEPTION.
56
+ *
57
+ * Capability the role of an organization API key needs: `device.manage`.
52
58
  */
53
59
  get(dongleId: number, ussdId: number, options?: RequestOptions): Promise<Ussd> {
54
60
  return this._client
@@ -65,6 +71,8 @@ export class UssdResource extends APIResource {
65
71
  * @param ussdId - Identifier in the path
66
72
  *
67
73
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, USSD_NOT_FOUND_EXCEPTION.
74
+ *
75
+ * Capability the role of an organization API key needs: `device.manage`.
68
76
  */
69
77
  delete(dongleId: number, ussdId: number, options?: RequestOptions): Promise<boolean> {
70
78
  return this._client
@@ -80,6 +88,8 @@ export class UssdResource extends APIResource {
80
88
  * @param dongleId - Identifier in the path
81
89
  *
82
90
  * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION.
91
+ *
92
+ * Capability the role of an organization API key needs: `device.manage`.
83
93
  */
84
94
  deleteAll(dongleId: number, options?: RequestOptions): Promise<boolean> {
85
95
  return this._client.request('DELETE', `/dongle/${pathParam(dongleId)}/ussds`, { options }).then(asStatus);