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.
- package/CHANGELOG.md +27 -0
- package/README.md +71 -11
- package/api.md +16 -2
- package/dist/client.d.ts +3 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -2
- package/dist/client.js.map +1 -1
- package/dist/core.d.ts +9 -2
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +19 -6
- package/dist/core.js.map +1 -1
- package/dist/errors.d.ts +14 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +14 -4
- package/dist/errors.js.map +1 -1
- package/dist/resources/call-scenarios.d.ts +3 -3
- package/dist/resources/call-scenarios.js +3 -3
- package/dist/resources/calls.d.ts +5 -5
- package/dist/resources/calls.js +5 -5
- package/dist/resources/contact-groups.d.ts +5 -5
- package/dist/resources/contact-groups.js +5 -5
- package/dist/resources/contacts.d.ts +6 -6
- package/dist/resources/contacts.js +6 -6
- package/dist/resources/dongles.d.ts +43 -15
- package/dist/resources/dongles.d.ts.map +1 -1
- package/dist/resources/dongles.js +56 -14
- package/dist/resources/dongles.js.map +1 -1
- package/dist/resources/files.d.ts +4 -4
- package/dist/resources/files.js +4 -4
- package/dist/resources/follow-up-sms-settings.d.ts +2 -2
- package/dist/resources/follow-up-sms-settings.js +2 -2
- package/dist/resources/index.d.ts +6 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +3 -1
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/mailings.d.ts +7 -7
- package/dist/resources/mailings.js +7 -7
- package/dist/resources/plans.d.ts +20 -0
- package/dist/resources/plans.d.ts.map +1 -0
- package/dist/resources/plans.js +22 -0
- package/dist/resources/plans.js.map +1 -0
- package/dist/resources/public-vpn.d.ts +3 -1
- package/dist/resources/public-vpn.d.ts.map +1 -1
- package/dist/resources/public-vpn.js +3 -1
- package/dist/resources/public-vpn.js.map +1 -1
- package/dist/resources/redirections.d.ts +3 -3
- package/dist/resources/redirections.js +3 -3
- package/dist/resources/sip-users.d.ts +2 -2
- package/dist/resources/sip-users.js +2 -2
- package/dist/resources/sms.d.ts +6 -6
- package/dist/resources/sms.js +6 -6
- package/dist/resources/socks-proxies.d.ts +3 -3
- package/dist/resources/socks-proxies.js +3 -3
- package/dist/resources/ussd.d.ts +4 -4
- package/dist/resources/ussd.js +4 -4
- package/dist/types/enums.d.ts +5 -3
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/enums.js +4 -2
- package/dist/types/enums.js.map +1 -1
- package/dist/types/models.d.ts +92 -10
- package/dist/types/models.d.ts.map +1 -1
- package/dist/types/params.d.ts +32 -5
- package/dist/types/params.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/client.ts +5 -2
- package/src/core.ts +41 -10
- package/src/errors.ts +14 -4
- package/src/resources/call-scenarios.ts +3 -3
- package/src/resources/calls.ts +5 -5
- package/src/resources/contact-groups.ts +5 -5
- package/src/resources/contacts.ts +6 -6
- package/src/resources/dongles.ts +68 -14
- package/src/resources/files.ts +4 -4
- package/src/resources/follow-up-sms-settings.ts +2 -2
- package/src/resources/index.ts +7 -0
- package/src/resources/mailings.ts +7 -7
- package/src/resources/plans.ts +25 -0
- package/src/resources/public-vpn.ts +3 -1
- package/src/resources/redirections.ts +3 -3
- package/src/resources/sip-users.ts +2 -2
- package/src/resources/sms.ts +6 -6
- package/src/resources/socks-proxies.ts +3 -3
- package/src/resources/ussd.ts +4 -4
- package/src/types/enums.ts +5 -3
- package/src/types/models.ts +95 -10
- package/src/types/params.ts +35 -5
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [semver](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [0.3.0] - 2026-12-02
|
|
6
|
+
|
|
7
|
+
Supports Teleleo API 1.3.0: 87 operations.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `plans.getCatalog(params?)` (`GET /plan`): the prices of Teleleo in GBP (default) or EUR (`currency`), the subscriptions of the cabinet and the products of the store, with the `PlanCatalog`, `PlanSubscription` and `PlanProduct` types. Prices are decimal strings (`'10.00'`). It needs no API key: `new Teleleo({ apiKey: null })` makes a client without a key, even when `TELELEO_API_KEY` is set, and any other method of that client throws `TeleleoError` before anything is sent.
|
|
12
|
+
- `dongles.updateWifiIsolation(dongleId, { is_enabled })` (`PUT /dongle/{dongle_id}/setting/wifi-isolation`) and `dongles.updateUsbGateway(dongleId, { is_enabled })` (`PUT /dongle/{dongle_id}/setting/usb-gateway`), from modem firmware 5.1.0. `dongle_setting` carries `is_wifi_isolation_enabled` and `is_usb_gateway_enabled`.
|
|
13
|
+
- `is_lifetime` on `Dongle` and `DongleListItem`: the modem has a lifetime subscription.
|
|
14
|
+
- Modems from `dongles.get()` and `dongles.update()` carry `dongle_setting`, `public_vpn_server` and `public_vpn_endpoint`, as in `dongles.list()`.
|
|
15
|
+
- README sections Plans and prices and Subscription, and `examples/plans.ts`.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- `ClientOptions.apiKey` takes `null`, and `client.apiKey` is `string | null`: it is `null` only for a client made with `apiKey: null`. Without `apiKey` and without `TELELEO_API_KEY` the constructor still throws.
|
|
20
|
+
- The API works only for modems with an active subscription; a trial counts as one. A method that names a modem without one throws `BadRequestError` with `BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE`, and so does every method but `dongles.list()`, `dongles.get()` and `plans.getCatalog()` when no modem of the organization has one. Lists leave out the objects of modems without a subscription. Reading, rebooting, the Wi-Fi hotspot, switching a function off and deleting need the subscription too. The mailing methods throw this code instead of `MAILING_MANAGEMENT_DONGLE_TARIFF_INVALID`, and `calls.create()` and `sms.update()` throw it (a `BadRequestError`) instead of `NotFoundError` with `DONGLE_ERROR_DONGLE_NOT_FOUND`.
|
|
21
|
+
- The legacy user key spends the request budget of its owner, 1200 requests a minute shared with the cabinet and the app, on most methods. Over it a method throws `RateLimitError` with `RATE_LIMIT_EXCEEDED`, after the client waited for `Retry-After` within `maxRetries`, as for the organization API key.
|
|
22
|
+
- `callback_url` of `sms.send()` and `params.url` of a redirection of type 4 or 5 must be an http or https URL of a public host, otherwise `BadRequestError` with `SMS_ERROR_IDENTIFIER_INVALID_CALLBACK_URL` or `PARAMS_NOT_VALID_EXCEPTION`. An e-mail address of a redirection with a control character in it is refused with `PARAMS_NOT_VALID_EXCEPTION`.
|
|
23
|
+
- `dongles.get()` and `dongles.update()` with the legacy user key of an account that is not active throw `AuthenticationError` with `UNAUTHORIZED_EXCEPTION` instead of `USER_NOT_ACTIVE`.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- `withOptions({ apiKey: undefined })` keeps the key of the client. It used to read `TELELEO_API_KEY` again, so a copy could get another key or none.
|
|
28
|
+
- Modems from `dongles.get()` and `dongles.update()` carry the real `sms_outgoing`, `sms_incoming`, `call_outgoing`, `call_incoming` and `is_wifi_extender_processing`; they were always `0` and `false`.
|
|
29
|
+
- `dongles.update()` with an empty `name`, a `name` longer than 255 characters or a `number` longer than 50 throws `BadRequestError` with `REQUEST_VALIDATION_EXCEPTION`, as its doc comment says, instead of `DONGLE_ERROR_ERROR_WHILE_SAVING`. Its doc comment names `DONGLE_ERROR_CALL_SCENARIO_NOT_REMOVED`.
|
|
30
|
+
- A modem is `DongleOnlineStatus.UPDATING`, and sending refused with `DONGLE_FIRMWARE_UPDATING_EXCEPTION`, only while it installs a firmware update, no longer from the moment a new firmware is assigned to it.
|
|
31
|
+
|
|
5
32
|
## [0.2.0] - 2026-11-30
|
|
6
33
|
|
|
7
34
|
Supports Teleleo API 1.2.0: 84 operations.
|
package/README.md
CHANGED
|
@@ -43,7 +43,8 @@ Methods take the path parameters first (`dongleId`, `smsId`, ...), then an objec
|
|
|
43
43
|
The client sends the key in the `auth-key` header of every request.
|
|
44
44
|
|
|
45
45
|
- **Organization API key** (`tlk_...`) - the key to use. Create it in the Teleleo cabinet, in the team settings of the organization (API keys), with a role: `owner`, `admin`, `member` or `viewer`. The key acts in its own organization only, with the rights of its role: a method the role may not call throws `PermissionDeniedError` with `errorMessage` `ORGANIZATION_CAPABILITY_FORBIDDEN`. The key is rate limited, see [Rate limits](#rate-limits).
|
|
46
|
-
- **Legacy user key** (Settings → API key) - deprecated, removed in API v2. It still works, with every right of its owner, in the owner's personal organization. Move to an organization API key.
|
|
46
|
+
- **Legacy user key** (Settings → API key) - deprecated, removed in API v2. It still works, with every right of its owner, in the owner's personal organization, and spends the request budget of its owner (see [Rate limits](#rate-limits)). Move to an organization API key.
|
|
47
|
+
- **No key** - `plans.getCatalog()`, the prices of Teleleo, is public. `new Teleleo({ apiKey: null })` makes a client without a key, even when `TELELEO_API_KEY` is set: it can call `plans.getCatalog()`, and any other method throws `TeleleoError` before anything is sent. A client with a key sends it with `plans.getCatalog()` too, so the key must be valid. See [Plans and prices](#plans-and-prices).
|
|
47
48
|
|
|
48
49
|
What each role may do is listed in the [API documentation](https://github.com/teleleo-com/teleleo-openapi) (Roles and capabilities). The capability a method needs is in its doc comment and in the Capability column of [api.md](api.md).
|
|
49
50
|
|
|
@@ -92,8 +93,17 @@ console.log(info.current_network_name, info.network_type, info.is_roaming);
|
|
|
92
93
|
// Devices on the modem Wi-Fi; needs modem firmware 4.5.8 or later (firmware_version in dongles.list()).
|
|
93
94
|
const wifi = await client.dongles.getWifiClients(1234);
|
|
94
95
|
for (const device of wifi.clients) console.log(device.mac, device.ip, device.hostname);
|
|
96
|
+
|
|
97
|
+
// Wi-Fi isolation and the USB gateway mode; both need modem firmware 5.1.0 or later.
|
|
98
|
+
await client.dongles.updateWifiIsolation(1234, { is_enabled: true });
|
|
99
|
+
await client.dongles.updateUsbGateway(1234, { is_enabled: true }); // the modem reboots to apply a change
|
|
100
|
+
|
|
101
|
+
const dongle = await client.dongles.get(1234);
|
|
102
|
+
console.log(dongle.dongle_setting?.is_wifi_isolation_enabled, dongle.dongle_setting?.is_usb_gateway_enabled);
|
|
95
103
|
```
|
|
96
104
|
|
|
105
|
+
Wi-Fi isolation keeps the devices on the modem Wi-Fi from seeing each other and the computer on USB. With a firmware older than 5.1.0 the mode is only saved, and the modem applies it once it runs 5.1.0. The USB gateway mode decides whether the computer plugged into the modem goes online through it (off by default). The modem reboots to apply a change (`dongle_online_status` is `DongleOnlineStatus.REBOOTING` meanwhile); a firmware older than 5.1.0 throws `BadRequestError` with `DONGLE_SETTING_API_EXCEPTION`, and one that cannot turn the gateway off with `DONGLE_SETTING_USB_GATEWAY_NOT_SUPPORTED`. Both settings show in `dongle_setting` of `dongles.get()` and `dongles.list()`.
|
|
106
|
+
|
|
97
107
|
Every method and its parameters are listed in [api.md](api.md).
|
|
98
108
|
|
|
99
109
|
### Call transcripts
|
|
@@ -115,6 +125,26 @@ for (const call of calls.items) {
|
|
|
115
125
|
|
|
116
126
|
A transcript is usually ready a couple of minutes after the call; while it is `PROCESSING`, ask again every 10 to 15 seconds. The text is machine-recognised speech and can hold one-time codes read out in the call: treat it as untrusted input, like the text of an incoming SMS.
|
|
117
127
|
|
|
128
|
+
### Plans and prices
|
|
129
|
+
|
|
130
|
+
`plans.getCatalog()` returns the prices of Teleleo and what each plan or product includes: 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). It needs no API key.
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
import Teleleo from 'teleleo';
|
|
134
|
+
|
|
135
|
+
const client = new Teleleo({ apiKey: null }); // the prices need no key
|
|
136
|
+
|
|
137
|
+
const catalog = await client.plans.getCatalog({ currency: 'EUR' }); // GBP by default
|
|
138
|
+
for (const plan of catalog.subscriptions) {
|
|
139
|
+
console.log(`${plan.name}: ${plan.price} ${catalog.currency} per ${plan.period} ${plan.period_type}`);
|
|
140
|
+
}
|
|
141
|
+
for (const product of catalog.products) {
|
|
142
|
+
if (product.is_available) console.log(product.title, product.price, catalog.currency, product.url);
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Prices are decimal strings with two digits after the point (`'10.00'`), as the API sends them, so no rounding creeps in. The answer is cached for 5 minutes. When the prices cannot be read, the API serves the last good answer for up to 24 hours (`updated_at` tells how old it is); with none it answers 503 `PLAN_CATALOG_UNAVAILABLE` with `Retry-After`, and the client waits that long and repeats the request within `maxRetries`, then throws `InternalServerError`. A currency other than `GBP` or `EUR` throws `BadRequestError` with `PLAN_CURRENCY_NOT_SUPPORTED`.
|
|
147
|
+
|
|
118
148
|
### Errors
|
|
119
149
|
|
|
120
150
|
Every error is a subclass of `TeleleoError`. When the API answers with an error, the exception carries the machine-readable code in `errorMessage`, details in `errorDetails` and `requestId` for support.
|
|
@@ -154,9 +184,39 @@ try {
|
|
|
154
184
|
|
|
155
185
|
API v1 answers 400, not 404, for a missing object; the library throws `NotFoundError` for both, so your code keeps working when the API moves to 404.
|
|
156
186
|
|
|
187
|
+
### Subscription
|
|
188
|
+
|
|
189
|
+
The API works only for modems with an active subscription; a trial counts as one. A method that names a modem without one (in the path, in `dongle_id` or `dongle_ids`, or through a call, mailing, redirection, file or other object of that modem) throws `BadRequestError` with `errorMessage` `BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE`. When no modem of the organization has a subscription, every method but the ones below throws it, contacts, contact groups and files included. Lists leave out the objects of modems without a subscription.
|
|
190
|
+
|
|
191
|
+
`dongles.list()` and `dongles.get()` always answer, so you can see which modems are paid (`is_tariff_package_active` or `is_trial`); `plans.getCatalog()` is not gated either. The subscription is paid in the Teleleo cabinet, which keeps working without one, and the API opens for the modem as soon as it is paid.
|
|
192
|
+
|
|
193
|
+
```ts
|
|
194
|
+
import Teleleo, { BadRequestError } from 'teleleo';
|
|
195
|
+
|
|
196
|
+
const client = new Teleleo();
|
|
197
|
+
|
|
198
|
+
for await (const dongle of client.dongles.list({ is_short: true })) {
|
|
199
|
+
if (!dongle.is_tariff_package_active && !dongle.is_trial)
|
|
200
|
+
console.log(dongle.dongle_id, 'has no subscription');
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
try {
|
|
204
|
+
await client.sms.send(1234, { number: '+447700900123', message: 'Hello from Teleleo' });
|
|
205
|
+
} catch (error) {
|
|
206
|
+
if (
|
|
207
|
+
error instanceof BadRequestError &&
|
|
208
|
+
error.errorMessage === 'BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE'
|
|
209
|
+
) {
|
|
210
|
+
console.log('Pay for the modem in the Teleleo cabinet');
|
|
211
|
+
} else {
|
|
212
|
+
throw error;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
157
217
|
### Retries, timeouts and abort
|
|
158
218
|
|
|
159
|
-
Requests that failed for a transient reason are repeated twice with exponential backoff: connection errors, 429 (after the `Retry-After` the API sends, see [Rate limits](#rate-limits)), and 408/502/503/504 for requests that are safe to repeat. A POST (sending an SMS, creating a call) is repeated only when the server could not have acted on it, so a retry never sends an SMS twice.
|
|
219
|
+
Requests that failed for a transient reason are repeated twice with exponential backoff: connection errors, 429 (after the `Retry-After` the API sends, see [Rate limits](#rate-limits)), and 408/502/503/504 for requests that are safe to repeat. When the answer carries `Retry-After` (429, and the 503 of `plans.getCatalog()`), the client waits those seconds. A POST (sending an SMS, creating a call) is repeated only when the server could not have acted on it, so a retry never sends an SMS twice.
|
|
160
220
|
|
|
161
221
|
```ts
|
|
162
222
|
const client = new Teleleo({ timeout: 20_000, maxRetries: 3 });
|
|
@@ -187,18 +247,18 @@ try {
|
|
|
187
247
|
}
|
|
188
248
|
```
|
|
189
249
|
|
|
190
|
-
The legacy user key
|
|
250
|
+
The legacy user key spends the request budget of its owner: 1200 requests a minute per person, shared with that person's own requests from the Teleleo cabinet and app, on most methods. Over it the API answers 429 with `errorMessage` `RATE_LIMIT_EXCEEDED` and a `Retry-After` header, and the client handles it the same way.
|
|
191
251
|
|
|
192
252
|
### Configuration
|
|
193
253
|
|
|
194
|
-
| Option | Environment variable | Default
|
|
195
|
-
| ---------------- | -------------------- |
|
|
196
|
-
| `apiKey` | `TELELEO_API_KEY` | required
|
|
197
|
-
| `baseURL` | `TELELEO_BASE_URL` | `https://app.teleleo.com/react_api`
|
|
198
|
-
| `timeout` | | 60 000 ms
|
|
199
|
-
| `maxRetries` | | 2
|
|
200
|
-
| `defaultHeaders` | |
|
|
201
|
-
| `fetch` | | the global `fetch`; pass your own for proxies or custom agents
|
|
254
|
+
| Option | Environment variable | Default |
|
|
255
|
+
| ---------------- | -------------------- | ----------------------------------------------------------------------- |
|
|
256
|
+
| `apiKey` | `TELELEO_API_KEY` | required; `null` for a client without a key (`plans.getCatalog()` only) |
|
|
257
|
+
| `baseURL` | `TELELEO_BASE_URL` | `https://app.teleleo.com/react_api` |
|
|
258
|
+
| `timeout` | | 60 000 ms |
|
|
259
|
+
| `maxRetries` | | 2 |
|
|
260
|
+
| `defaultHeaders` | | |
|
|
261
|
+
| `fetch` | | the global `fetch`; pass your own for proxies or custom agents |
|
|
202
262
|
|
|
203
263
|
Every method also takes request options as its last argument: `headers`, `query`, `body`, `timeout`, `maxRetries`, `signal`. Use `query` and `body` to send a parameter the library does not have yet.
|
|
204
264
|
|
package/api.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# API reference
|
|
2
2
|
|
|
3
|
-
Every method of the `Teleleo` client, generated from [`spec/openapi.yaml`](spec/openapi.yaml) (Teleleo API 1.
|
|
3
|
+
Every method of the `Teleleo` client, generated from [`spec/openapi.yaml`](spec/openapi.yaml) (Teleleo API 1.3.0). Types are exported from the package root.
|
|
4
4
|
|
|
5
|
-
Every method
|
|
5
|
+
Every method except `plans.getCatalog()` needs the API key, sent in the `auth-key` header. Use an organization API key (`tlk_...`): create it in the Teleleo cabinet, in the team settings of the organization (API keys), with a role. The Capability column names what the role of the key needs for a method; a key without it gets `PermissionDeniedError` with `errorMessage` `ORGANIZATION_CAPABILITY_FORBIDDEN`. Roles and rate limits are described in the README: [Authentication](README.md#authentication), [Rate limits](README.md#rate-limits). The legacy user key (cabinet Settings → API key) has every capability, but it is deprecated and will be removed in API v2.
|
|
6
|
+
|
|
7
|
+
`plans.getCatalog()` needs no key: a client made with `new Teleleo({ apiKey: null })` can call it, and any other method of such a client throws `TeleleoError` without sending the request. A key the client has is sent with it, and it must be valid.
|
|
8
|
+
|
|
9
|
+
The API works only for modems with an active subscription (a trial counts): a method that names a modem without one throws `BadRequestError` with `errorMessage` `BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE`, and so does any method when no modem of the organization has one. `dongles.list()`, `dongles.get()` and `plans.getCatalog()` are not gated. See [Subscription](README.md#subscription).
|
|
6
10
|
|
|
7
11
|
## `client.dongles`
|
|
8
12
|
|
|
@@ -20,6 +24,8 @@ Modems of the account and their commands: reboot, Wi-Fi, Wi-Fi extender, number,
|
|
|
20
24
|
| `disableWifiExtender(dongleId)` | `POST /dongle/{dongle_id}/wifi-extender/disable` | `Promise<boolean>` | `device.manage` | Disable Wi-Fi extender |
|
|
21
25
|
| `scanWifiNetworks(dongleId)` | `POST /dongle/{dongle_id}/wifi-extender/networks` | `Promise<boolean>` | `device.manage` | Scan Wi-Fi networks |
|
|
22
26
|
| `updateOfflineNotification(dongleId, params)` | `PUT /dongle/{dongle_id}/setting/offline-notification` | `Promise<boolean>` | `device.manage` | Set offline notification |
|
|
27
|
+
| `updateWifiIsolation(dongleId, params)` | `PUT /dongle/{dongle_id}/setting/wifi-isolation` | `Promise<boolean>` | `device.manage` | Set Wi-Fi isolation |
|
|
28
|
+
| `updateUsbGateway(dongleId, params)` | `PUT /dongle/{dongle_id}/setting/usb-gateway` | `Promise<boolean>` | `device.manage` | Set USB gateway mode |
|
|
23
29
|
| `setNumber(dongleId, params)` | `PUT /dongle/{dongle_id}/number` | `Promise<boolean>` | `device.manage` | Set modem number |
|
|
24
30
|
| `get(dongleId)` | `GET /dongle/{dongle_id}` | `Promise<Dongle>` | `device.view` | Get modem |
|
|
25
31
|
| `update(dongleId, params?)` | `PUT /dongle/{dongle_id}` | `Promise<Dongle>` | `device.manage` | Update modem |
|
|
@@ -185,3 +191,11 @@ Downloads, temporary audio uploads and text-to-speech.
|
|
|
185
191
|
| `downloadTmp(fileId)` | `GET /file/tmp/{file_id}` | `Promise<Uint8Array>` | `automation.manage` | Get temporary file |
|
|
186
192
|
| `uploadTmp(params)` | `POST /file/upload-tmp` | `Promise<TmpFile>` | `automation.manage` | Upload temporary file |
|
|
187
193
|
| `generateSpeech(params)` | `POST /file/generate-speech` | `Promise<TmpFile>` | `automation.manage` | Generate speech |
|
|
194
|
+
|
|
195
|
+
## `client.plans`
|
|
196
|
+
|
|
197
|
+
Prices of Teleleo: the subscriptions of the cabinet and the products of the store. Public, without a key.
|
|
198
|
+
|
|
199
|
+
| Method | HTTP | Returns | Capability | Description |
|
|
200
|
+
|---|---|---|---|---|
|
|
201
|
+
| `getCatalog(params?)` | `GET /plan` | `Promise<PlanCatalog>` | no key needed | List plans and prices |
|
package/dist/client.d.ts
CHANGED
|
@@ -17,7 +17,9 @@ export interface Teleleo extends Resources {
|
|
|
17
17
|
export declare class Teleleo extends BaseClient {
|
|
18
18
|
constructor(options?: ClientOptions);
|
|
19
19
|
/**
|
|
20
|
-
* A copy of the client with some options changed.
|
|
20
|
+
* A copy of the client with some options changed. The copy keeps the key of this client unless `apiKey` is
|
|
21
|
+
* given a value: a string, or `null` for a copy without a key. `apiKey: undefined` keeps the key and never
|
|
22
|
+
* reads `TELELEO_API_KEY` again.
|
|
21
23
|
*
|
|
22
24
|
* ```ts
|
|
23
25
|
* await client.withOptions({ timeout: 5_000, maxRetries: 0 }).dongles.list();
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEvE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,OAAQ,SAAQ,SAAS;CAAG;AAE7C,qBAAa,OAAQ,SAAQ,UAAU;gBACzB,OAAO,GAAE,aAAkB;IAKvC
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEvE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,OAAQ,SAAQ,SAAS;CAAG;AAE7C,qBAAa,OAAQ,SAAQ,UAAU;gBACzB,OAAO,GAAE,aAAkB;IAKvC;;;;;;;;OAQG;IACH,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO;CAY7C"}
|
package/dist/client.js
CHANGED
|
@@ -6,7 +6,9 @@ export class Teleleo extends BaseClient {
|
|
|
6
6
|
Object.assign(this, createResources(this));
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* A copy of the client with some options changed.
|
|
9
|
+
* A copy of the client with some options changed. The copy keeps the key of this client unless `apiKey` is
|
|
10
|
+
* given a value: a string, or `null` for a copy without a key. `apiKey: undefined` keeps the key and never
|
|
11
|
+
* reads `TELELEO_API_KEY` again.
|
|
10
12
|
*
|
|
11
13
|
* ```ts
|
|
12
14
|
* await client.withOptions({ timeout: 5_000, maxRetries: 0 }).dongles.list();
|
|
@@ -15,11 +17,12 @@ export class Teleleo extends BaseClient {
|
|
|
15
17
|
withOptions(options) {
|
|
16
18
|
return new Teleleo({
|
|
17
19
|
...this._options,
|
|
18
|
-
apiKey: this.apiKey,
|
|
19
20
|
baseURL: this.baseURL,
|
|
20
21
|
timeout: this.timeout,
|
|
21
22
|
maxRetries: this.maxRetries,
|
|
22
23
|
...options,
|
|
24
|
+
// An explicit `apiKey: undefined` must not drop the inherited key and fall back to the environment.
|
|
25
|
+
apiKey: options.apiKey !== undefined ? options.apiKey : this.apiKey,
|
|
23
26
|
defaultHeaders: { ...this._options.defaultHeaders, ...options.defaultHeaders },
|
|
24
27
|
});
|
|
25
28
|
}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAkB,MAAM,sBAAsB,CAAC;AAgBvE,MAAM,OAAO,OAAQ,SAAQ,UAAU;IACrC,YAAY,UAAyB,EAAE;QACrC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAkB,MAAM,sBAAsB,CAAC;AAgBvE,MAAM,OAAO,OAAQ,SAAQ,UAAU;IACrC,YAAY,UAAyB,EAAE;QACrC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;OAQG;IACH,WAAW,CAAC,OAAsB;QAChC,OAAO,IAAI,OAAO,CAAC;YACjB,GAAG,IAAI,CAAC,QAAQ;YAChB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,GAAG,OAAO;YACV,oGAAoG;YACpG,MAAM,EAAE,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;YACnE,cAAc,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE;SAC/E,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/core.d.ts
CHANGED
|
@@ -7,8 +7,11 @@ export interface ClientOptions {
|
|
|
7
7
|
* The organization API key (`tlk_...`), created in the Teleleo cabinet in the team settings of the
|
|
8
8
|
* organization (API keys); sent in the `auth-key` header. The legacy user key (Settings - API key) still
|
|
9
9
|
* works but is deprecated and will be removed in API v2. Defaults to `process.env.TELELEO_API_KEY`.
|
|
10
|
+
*
|
|
11
|
+
* `null` makes a client without a key, even when `TELELEO_API_KEY` is set: it can call only the methods that
|
|
12
|
+
* need no key (`plans.getCatalog()`); any other method throws `TeleleoError` without sending the request.
|
|
10
13
|
*/
|
|
11
|
-
apiKey?: string | undefined;
|
|
14
|
+
apiKey?: string | null | undefined;
|
|
12
15
|
/** Defaults to `process.env.TELELEO_BASE_URL`, then to `https://app.teleleo.com/react_api`. */
|
|
13
16
|
baseURL?: string | undefined;
|
|
14
17
|
/** Milliseconds before a request is aborted; 60 000 by default. */
|
|
@@ -39,7 +42,8 @@ export interface RequestOptions {
|
|
|
39
42
|
}
|
|
40
43
|
export declare class BaseClient {
|
|
41
44
|
#private;
|
|
42
|
-
|
|
45
|
+
/** The API key the client sends; `null` for a client made with `apiKey: null`. */
|
|
46
|
+
readonly apiKey: string | null;
|
|
43
47
|
readonly baseURL: string;
|
|
44
48
|
readonly timeout: number;
|
|
45
49
|
readonly maxRetries: number;
|
|
@@ -51,16 +55,19 @@ export declare class BaseClient {
|
|
|
51
55
|
query?: Record<string, unknown>;
|
|
52
56
|
body?: Record<string, unknown>;
|
|
53
57
|
options?: RequestOptions | undefined;
|
|
58
|
+
keyOptional?: boolean;
|
|
54
59
|
}): Promise<unknown>;
|
|
55
60
|
/** @internal Send a request and return the raw bytes of the answer. */
|
|
56
61
|
requestBytes(method: string, path: string, args?: {
|
|
57
62
|
options?: RequestOptions | undefined;
|
|
63
|
+
keyOptional?: boolean;
|
|
58
64
|
}): Promise<Uint8Array>;
|
|
59
65
|
/** @internal Request one page of a list. */
|
|
60
66
|
getPage<T>(path: string, args: {
|
|
61
67
|
query: Record<string, unknown>;
|
|
62
68
|
itemKey: string;
|
|
63
69
|
options?: RequestOptions | undefined;
|
|
70
|
+
keyOptional?: boolean;
|
|
64
71
|
}): PagePromise<T>;
|
|
65
72
|
}
|
|
66
73
|
//# sourceMappingURL=core.d.ts.map
|
package/dist/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAQA,OAAO,EAAQ,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIpD,eAAO,MAAM,gBAAgB,sCAAsC,CAAC;AACpE,eAAO,MAAM,eAAe,QAAS,CAAC;AACtC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAqBrC,MAAM,WAAW,aAAa;IAC5B
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAQA,OAAO,EAAQ,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIpD,eAAO,MAAM,gBAAgB,sCAAsC,CAAC;AACpE,eAAO,MAAM,eAAe,QAAS,CAAC;AACtC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAqBrC,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,+FAA+F;IAC/F,OAAO,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D,OAAO,CACX,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/B,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;QACrC,WAAW,CAAC,EAAE,OAAO,CAAC;KAClB,GACL,OAAO,CAAC,OAAO,CAAC;IAoBnB,uEAAuE;IACjE,YAAY,CAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;QAAE,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAO,GACzE,OAAO,CAAC,UAAU,CAAC;IAKtB,4CAA4C;IAC5C,OAAO,CAAC,CAAC,EACP,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/B,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;QACrC,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,GACA,WAAW,CAAC,CAAC,CAAC;CAyBlB"}
|
package/dist/core.js
CHANGED
|
@@ -45,7 +45,11 @@ function cleanQuery(query) {
|
|
|
45
45
|
}
|
|
46
46
|
return out;
|
|
47
47
|
}
|
|
48
|
+
function hasHeader(headers, name) {
|
|
49
|
+
return Object.keys(headers).some((key) => key.toLowerCase() === name);
|
|
50
|
+
}
|
|
48
51
|
export class BaseClient {
|
|
52
|
+
/** The API key the client sends; `null` for a client made with `apiKey: null`. */
|
|
49
53
|
apiKey;
|
|
50
54
|
baseURL;
|
|
51
55
|
timeout;
|
|
@@ -53,10 +57,11 @@ export class BaseClient {
|
|
|
53
57
|
_options;
|
|
54
58
|
#fetch;
|
|
55
59
|
constructor(options = {}) {
|
|
56
|
-
const apiKey = options.apiKey ?? readEnv('TELELEO_API_KEY');
|
|
57
|
-
if (!apiKey) {
|
|
60
|
+
const apiKey = options.apiKey === null ? null : (options.apiKey ?? readEnv('TELELEO_API_KEY'));
|
|
61
|
+
if (apiKey !== null && !apiKey) {
|
|
58
62
|
throw new TeleleoError('The API key is not set: pass apiKey to the client or set the TELELEO_API_KEY environment variable. ' +
|
|
59
|
-
'Create an organization API key in the Teleleo cabinet, in the team settings of the organization.'
|
|
63
|
+
'Create an organization API key in the Teleleo cabinet, in the team settings of the organization. ' +
|
|
64
|
+
'For the methods that need no key (plans.getCatalog), pass apiKey: null.');
|
|
60
65
|
}
|
|
61
66
|
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
62
67
|
if (!fetchImpl)
|
|
@@ -72,7 +77,7 @@ export class BaseClient {
|
|
|
72
77
|
return {
|
|
73
78
|
Accept: 'application/json',
|
|
74
79
|
'User-Agent': `teleleo-node/${VERSION}`,
|
|
75
|
-
'auth-key': this.apiKey,
|
|
80
|
+
...(this.apiKey === null ? {} : { 'auth-key': this.apiKey }),
|
|
76
81
|
...this._options.defaultHeaders,
|
|
77
82
|
};
|
|
78
83
|
}
|
|
@@ -91,7 +96,7 @@ export class BaseClient {
|
|
|
91
96
|
const delay = Math.min(INITIAL_RETRY_DELAY * 2 ** attempt, MAX_RETRY_DELAY);
|
|
92
97
|
return delay * (1 - 0.25 * Math.random());
|
|
93
98
|
}
|
|
94
|
-
async #send(method, path, { query, body, options, accept }) {
|
|
99
|
+
async #send(method, path, { query, body, options, accept, keyOptional }) {
|
|
95
100
|
const qs = buildQuery(query, options?.query);
|
|
96
101
|
const url = `${this.baseURL}${path}${qs ? `?${qs}` : ''}`;
|
|
97
102
|
const payload = body !== undefined || options?.body !== undefined ? buildBody(body, options?.body) : undefined;
|
|
@@ -101,6 +106,10 @@ export class BaseClient {
|
|
|
101
106
|
if (payload !== undefined)
|
|
102
107
|
headers['Content-Type'] = 'application/json';
|
|
103
108
|
Object.assign(headers, options?.headers);
|
|
109
|
+
if (!keyOptional && !hasHeader(headers, 'auth-key')) {
|
|
110
|
+
throw new TeleleoError(`${method} ${path} needs an API key, and this client has none (apiKey: null). ` +
|
|
111
|
+
'Create the client with an organization API key, or pass the key with withOptions({ apiKey }).');
|
|
112
|
+
}
|
|
104
113
|
const maxRetries = options?.maxRetries ?? this.maxRetries;
|
|
105
114
|
const timeout = options?.timeout ?? this.timeout;
|
|
106
115
|
const userSignal = options?.signal;
|
|
@@ -175,7 +184,11 @@ export class BaseClient {
|
|
|
175
184
|
/** @internal Request one page of a list. */
|
|
176
185
|
getPage(path, args) {
|
|
177
186
|
const load = async (query) => {
|
|
178
|
-
const data = await this.request('GET', path, {
|
|
187
|
+
const data = await this.request('GET', path, {
|
|
188
|
+
query,
|
|
189
|
+
options: args.options,
|
|
190
|
+
keyOptional: args.keyOptional,
|
|
191
|
+
});
|
|
179
192
|
let items = [];
|
|
180
193
|
let total = null;
|
|
181
194
|
if (Array.isArray(data)) {
|
package/dist/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,mCAAmC,CAAC;AACpE,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AACtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;A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AAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE;gBAC3C,KAAK;gBACL,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC,CAAC;YACH,IAAI,KAAK,GAAY,EAAE,CAAC;YACxB,IAAI,KAAK,GAAY,IAAI,CAAC;YAC1B,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxB,KAAK,GAAG,IAAI,CAAC;YACf,CAAC;iBAAM,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC5C,KAAK,GAAI,IAAgC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;gBAC9D,KAAK,GAAI,IAAgC,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC;YACnE,CAAC;YACD,OAAO,IAAI,IAAI,CACb,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAAa,CAAC,CAAC,CAAC,EAAE,EAC1C,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EACxC,KAAK,EACL,IAAI,CACL,CAAC;QACJ,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,IAAI,WAAW,CAAI,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -53,7 +53,10 @@ export declare class APIStatusError extends APIError {
|
|
|
53
53
|
body: unknown;
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* 400: the request is invalid, or a modem it names has no active subscription
|
|
58
|
+
* (`BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE`; a trial counts as one).
|
|
59
|
+
*/
|
|
57
60
|
export declare class BadRequestError extends APIStatusError {
|
|
58
61
|
}
|
|
59
62
|
/** 401: the API key is missing, unknown, revoked or expired, or the account is not active. */
|
|
@@ -79,12 +82,19 @@ export declare class ConflictError extends APIStatusError {
|
|
|
79
82
|
}
|
|
80
83
|
/**
|
|
81
84
|
* 429: too many requests. An organization API key over its budget for the minute answers
|
|
82
|
-
* `ORGANIZATION_API_KEY_RATE_LIMIT_EXCEEDED
|
|
83
|
-
*
|
|
85
|
+
* `ORGANIZATION_API_KEY_RATE_LIMIT_EXCEEDED`, a legacy user key whose owner spent the budget of the minute
|
|
86
|
+
* `RATE_LIMIT_EXCEEDED`, both with a `Retry-After` header; the client waits that long and repeats the request
|
|
87
|
+
* within `maxRetries` before it throws this error.
|
|
84
88
|
*/
|
|
85
89
|
export declare class RateLimitError extends APIStatusError {
|
|
86
90
|
}
|
|
87
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* 5xx: a failure on the Teleleo side. Retry later and quote `requestId` if it persists.
|
|
93
|
+
*
|
|
94
|
+
* `plans.getCatalog()` answers 503 `PLAN_CATALOG_UNAVAILABLE` with a `Retry-After` header when the prices
|
|
95
|
+
* cannot be read; the client waits that long and repeats the request within `maxRetries` before it throws
|
|
96
|
+
* this error.
|
|
97
|
+
*/
|
|
88
98
|
export declare class InternalServerError extends APIStatusError {
|
|
89
99
|
}
|
|
90
100
|
/** @internal */
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,qBAAa,YAAa,SAAQ,KAAK;gBACzB,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAI3D;AAED,uDAAuD;AACvD,qBAAa,QAAS,SAAQ,YAAY;CAAG;AAE7C,oCAAoC;AACpC,qBAAa,kBAA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,EAAE,OAAO,CAAC;IAC1B,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;gBAGrB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,EAAE,OAAO,CAAC;KACf;CAUJ;AAED;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,cAAc;CAAG;AAEtD,8FAA8F;AAC9F,qBAAa,mBAAoB,SAAQ,cAAc;CAAG;AAE1D;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,cAAc;CAAG;AAE5D;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,cAAc;CAAG;AAEpD,yDAAyD;AACzD,qBAAa,aAAc,SAAQ,cAAc;CAAG;AAEpD;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,cAAc;CAAG;AAErD;;;;;;GAMG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;CAAG;AAW1D,gBAAgB;AAChB,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CA6C9F"}
|
package/dist/errors.js
CHANGED
|
@@ -60,7 +60,10 @@ export class APIStatusError extends APIError {
|
|
|
60
60
|
this.body = init.body;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* 400: the request is invalid, or a modem it names has no active subscription
|
|
65
|
+
* (`BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE`; a trial counts as one).
|
|
66
|
+
*/
|
|
64
67
|
export class BadRequestError extends APIStatusError {
|
|
65
68
|
}
|
|
66
69
|
/** 401: the API key is missing, unknown, revoked or expired, or the account is not active. */
|
|
@@ -86,12 +89,19 @@ export class ConflictError extends APIStatusError {
|
|
|
86
89
|
}
|
|
87
90
|
/**
|
|
88
91
|
* 429: too many requests. An organization API key over its budget for the minute answers
|
|
89
|
-
* `ORGANIZATION_API_KEY_RATE_LIMIT_EXCEEDED
|
|
90
|
-
*
|
|
92
|
+
* `ORGANIZATION_API_KEY_RATE_LIMIT_EXCEEDED`, a legacy user key whose owner spent the budget of the minute
|
|
93
|
+
* `RATE_LIMIT_EXCEEDED`, both with a `Retry-After` header; the client waits that long and repeats the request
|
|
94
|
+
* within `maxRetries` before it throws this error.
|
|
91
95
|
*/
|
|
92
96
|
export class RateLimitError extends APIStatusError {
|
|
93
97
|
}
|
|
94
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* 5xx: a failure on the Teleleo side. Retry later and quote `requestId` if it persists.
|
|
100
|
+
*
|
|
101
|
+
* `plans.getCatalog()` answers 503 `PLAN_CATALOG_UNAVAILABLE` with a `Retry-After` header when the prices
|
|
102
|
+
* cannot be read; the client waits that long and repeats the request within `maxRetries` before it throws
|
|
103
|
+
* this error.
|
|
104
|
+
*/
|
|
95
105
|
export class InternalServerError extends APIStatusError {
|
|
96
106
|
}
|
|
97
107
|
function parseErrorBody(text) {
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAe,EAAE,OAA6B;QACxD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9B,CAAC;CACF;AAED,uDAAuD;AACvD,MAAM,OAAO,QAAS,SAAQ,YAAY;CAAG;AAE7C,oCAAoC;AACpC,MAAM,OAAO,kBAAmB,SAAQ,QAAQ;IA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E,IAAI,CAAC,CAAC;IACpE,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5D,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC7D,IAAI,MAAM,IAAI,GAAG;QAAE,OAAO,IAAI,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjE,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -10,7 +10,7 @@ export declare class CallScenariosResource extends APIResource {
|
|
|
10
10
|
*
|
|
11
11
|
* Call scenarios of the account: what a modem plays to incoming callers. Newest first by default (created_at descending, then the id descending).
|
|
12
12
|
*
|
|
13
|
-
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION.
|
|
13
|
+
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
|
|
14
14
|
*
|
|
15
15
|
* Capability the role of an organization API key needs: `automation.view`.
|
|
16
16
|
*/
|
|
@@ -32,7 +32,7 @@ export declare class CallScenariosResource extends APIResource {
|
|
|
32
32
|
*
|
|
33
33
|
* @param callScenarioId - Call scenario id
|
|
34
34
|
*
|
|
35
|
-
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CALL_SCENARIO_NOT_FOUND_EXCEPTION.
|
|
35
|
+
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CALL_SCENARIO_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
|
|
36
36
|
*
|
|
37
37
|
* Capability the role of an organization API key needs: `automation.view`.
|
|
38
38
|
*/
|
|
@@ -56,7 +56,7 @@ export declare class CallScenariosResource extends APIResource {
|
|
|
56
56
|
*
|
|
57
57
|
* @param callScenarioId - Identifier in the path
|
|
58
58
|
*
|
|
59
|
-
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CALL_SCENARIO_NOT_FOUND_EXCEPTION, CALL_SCENARIO_MANAGEMENT_DONGLE_UNAVAILABLE_EXCEPTION, CALL_SCENARIO_MANAGEMENT_VERSION_CONFLICT_EXCEPTION.
|
|
59
|
+
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CALL_SCENARIO_NOT_FOUND_EXCEPTION, CALL_SCENARIO_MANAGEMENT_DONGLE_UNAVAILABLE_EXCEPTION, CALL_SCENARIO_MANAGEMENT_VERSION_CONFLICT_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
|
|
60
60
|
*
|
|
61
61
|
* Capability the role of an organization API key needs: `automation.manage`.
|
|
62
62
|
*/
|
|
@@ -8,7 +8,7 @@ export class CallScenariosResource extends APIResource {
|
|
|
8
8
|
*
|
|
9
9
|
* Call scenarios of the account: what a modem plays to incoming callers. Newest first by default (created_at descending, then the id descending).
|
|
10
10
|
*
|
|
11
|
-
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION.
|
|
11
|
+
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, PARSING_DATE_TIME_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
|
|
12
12
|
*
|
|
13
13
|
* Capability the role of an organization API key needs: `automation.view`.
|
|
14
14
|
*/
|
|
@@ -64,7 +64,7 @@ export class CallScenariosResource extends APIResource {
|
|
|
64
64
|
*
|
|
65
65
|
* @param callScenarioId - Call scenario id
|
|
66
66
|
*
|
|
67
|
-
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CALL_SCENARIO_NOT_FOUND_EXCEPTION.
|
|
67
|
+
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CALL_SCENARIO_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
|
|
68
68
|
*
|
|
69
69
|
* Capability the role of an organization API key needs: `automation.view`.
|
|
70
70
|
*/
|
|
@@ -108,7 +108,7 @@ export class CallScenariosResource extends APIResource {
|
|
|
108
108
|
*
|
|
109
109
|
* @param callScenarioId - Identifier in the path
|
|
110
110
|
*
|
|
111
|
-
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CALL_SCENARIO_NOT_FOUND_EXCEPTION, CALL_SCENARIO_MANAGEMENT_DONGLE_UNAVAILABLE_EXCEPTION, CALL_SCENARIO_MANAGEMENT_VERSION_CONFLICT_EXCEPTION.
|
|
111
|
+
* Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CALL_SCENARIO_NOT_FOUND_EXCEPTION, CALL_SCENARIO_MANAGEMENT_DONGLE_UNAVAILABLE_EXCEPTION, CALL_SCENARIO_MANAGEMENT_VERSION_CONFLICT_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE.
|
|
112
112
|
*
|
|
113
113
|
* Capability the role of an organization API key needs: `automation.manage`.
|
|
114
114
|
*/
|