teleleo 0.0.0-stage → 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 (140) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/LICENSE +21 -0
  3. package/README.md +236 -2
  4. package/api.md +187 -0
  5. package/dist/client.d.ts +28 -0
  6. package/dist/client.d.ts.map +1 -0
  7. package/dist/client.js +27 -0
  8. package/dist/client.js.map +1 -0
  9. package/dist/core.d.ts +66 -0
  10. package/dist/core.d.ts.map +1 -0
  11. package/dist/core.js +195 -0
  12. package/dist/core.js.map +1 -0
  13. package/dist/errors.d.ts +92 -0
  14. package/dist/errors.d.ts.map +1 -0
  15. package/dist/errors.js +163 -0
  16. package/dist/errors.js.map +1 -0
  17. package/dist/index.d.ts +23 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +23 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/pagination.d.ts +41 -0
  22. package/dist/pagination.d.ts.map +1 -0
  23. package/dist/pagination.js +98 -0
  24. package/dist/pagination.js.map +1 -0
  25. package/dist/resource.d.ts +7 -0
  26. package/dist/resource.d.ts.map +1 -0
  27. package/dist/resource.js +8 -0
  28. package/dist/resource.js.map +1 -0
  29. package/dist/resources/call-scenarios.d.ts +77 -0
  30. package/dist/resources/call-scenarios.d.ts.map +1 -0
  31. package/dist/resources/call-scenarios.js +137 -0
  32. package/dist/resources/call-scenarios.js.map +1 -0
  33. package/dist/resources/calls.d.ts +69 -0
  34. package/dist/resources/calls.d.ts.map +1 -0
  35. package/dist/resources/calls.js +109 -0
  36. package/dist/resources/calls.js.map +1 -0
  37. package/dist/resources/contact-groups.d.ts +65 -0
  38. package/dist/resources/contact-groups.d.ts.map +1 -0
  39. package/dist/resources/contact-groups.js +99 -0
  40. package/dist/resources/contact-groups.js.map +1 -0
  41. package/dist/resources/contacts.d.ts +75 -0
  42. package/dist/resources/contacts.d.ts.map +1 -0
  43. package/dist/resources/contacts.js +132 -0
  44. package/dist/resources/contacts.js.map +1 -0
  45. package/dist/resources/dongles.d.ts +201 -0
  46. package/dist/resources/dongles.d.ts.map +1 -0
  47. package/dist/resources/dongles.js +296 -0
  48. package/dist/resources/dongles.js.map +1 -0
  49. package/dist/resources/files.d.ts +52 -0
  50. package/dist/resources/files.d.ts.map +1 -0
  51. package/dist/resources/files.js +73 -0
  52. package/dist/resources/files.js.map +1 -0
  53. package/dist/resources/follow-up-sms-settings.d.ts +65 -0
  54. package/dist/resources/follow-up-sms-settings.d.ts.map +1 -0
  55. package/dist/resources/follow-up-sms-settings.js +111 -0
  56. package/dist/resources/follow-up-sms-settings.js.map +1 -0
  57. package/dist/resources/index.d.ts +50 -0
  58. package/dist/resources/index.d.ts.map +1 -0
  59. package/dist/resources/index.js +36 -0
  60. package/dist/resources/index.js.map +1 -0
  61. package/dist/resources/mailings.d.ts +85 -0
  62. package/dist/resources/mailings.d.ts.map +1 -0
  63. package/dist/resources/mailings.js +191 -0
  64. package/dist/resources/mailings.js.map +1 -0
  65. package/dist/resources/public-vpn.d.ts +51 -0
  66. package/dist/resources/public-vpn.d.ts.map +1 -0
  67. package/dist/resources/public-vpn.js +67 -0
  68. package/dist/resources/public-vpn.js.map +1 -0
  69. package/dist/resources/redirections.d.ts +65 -0
  70. package/dist/resources/redirections.d.ts.map +1 -0
  71. package/dist/resources/redirections.js +113 -0
  72. package/dist/resources/redirections.js.map +1 -0
  73. package/dist/resources/sip-users.d.ts +30 -0
  74. package/dist/resources/sip-users.d.ts.map +1 -0
  75. package/dist/resources/sip-users.js +40 -0
  76. package/dist/resources/sip-users.js.map +1 -0
  77. package/dist/resources/sms.d.ts +116 -0
  78. package/dist/resources/sms.d.ts.map +1 -0
  79. package/dist/resources/sms.js +203 -0
  80. package/dist/resources/sms.js.map +1 -0
  81. package/dist/resources/socks-proxies.d.ts +65 -0
  82. package/dist/resources/socks-proxies.d.ts.map +1 -0
  83. package/dist/resources/socks-proxies.js +91 -0
  84. package/dist/resources/socks-proxies.js.map +1 -0
  85. package/dist/resources/ussd.d.ts +71 -0
  86. package/dist/resources/ussd.d.ts.map +1 -0
  87. package/dist/resources/ussd.js +89 -0
  88. package/dist/resources/ussd.js.map +1 -0
  89. package/dist/types/enums.d.ts +280 -0
  90. package/dist/types/enums.d.ts.map +1 -0
  91. package/dist/types/enums.js +233 -0
  92. package/dist/types/enums.js.map +1 -0
  93. package/dist/types/index.d.ts +4 -0
  94. package/dist/types/index.d.ts.map +1 -0
  95. package/dist/types/index.js +5 -0
  96. package/dist/types/index.js.map +1 -0
  97. package/dist/types/models.d.ts +686 -0
  98. package/dist/types/models.d.ts.map +1 -0
  99. package/dist/types/models.js +3 -0
  100. package/dist/types/models.js.map +1 -0
  101. package/dist/types/params.d.ts +711 -0
  102. package/dist/types/params.d.ts.map +1 -0
  103. package/dist/types/params.js +3 -0
  104. package/dist/types/params.js.map +1 -0
  105. package/dist/utils.d.ts +32 -0
  106. package/dist/utils.d.ts.map +1 -0
  107. package/dist/utils.js +118 -0
  108. package/dist/utils.js.map +1 -0
  109. package/dist/version.d.ts +2 -0
  110. package/dist/version.d.ts.map +1 -0
  111. package/dist/version.js +2 -0
  112. package/dist/version.js.map +1 -0
  113. package/package.json +63 -4
  114. package/src/client.ts +42 -0
  115. package/src/core.ts +278 -0
  116. package/src/errors.ts +170 -0
  117. package/src/index.ts +46 -0
  118. package/src/pagination.ts +110 -0
  119. package/src/resource.ts +10 -0
  120. package/src/resources/call-scenarios.ts +154 -0
  121. package/src/resources/calls.ts +117 -0
  122. package/src/resources/contact-groups.ts +115 -0
  123. package/src/resources/contacts.ts +149 -0
  124. package/src/resources/dongles.ts +346 -0
  125. package/src/resources/files.ts +79 -0
  126. package/src/resources/follow-up-sms-settings.ts +130 -0
  127. package/src/resources/index.ts +86 -0
  128. package/src/resources/mailings.ts +207 -0
  129. package/src/resources/public-vpn.ts +72 -0
  130. package/src/resources/redirections.ts +129 -0
  131. package/src/resources/sip-users.ts +44 -0
  132. package/src/resources/sms.ts +232 -0
  133. package/src/resources/socks-proxies.ts +107 -0
  134. package/src/resources/ussd.ts +97 -0
  135. package/src/types/enums.ts +300 -0
  136. package/src/types/index.ts +5 -0
  137. package/src/types/models.ts +747 -0
  138. package/src/types/params.ts +767 -0
  139. package/src/utils.ts +123 -0
  140. package/src/version.ts +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,27 @@
1
+ # Changelog
2
+
3
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [semver](https://semver.org/).
4
+
5
+ ## [0.2.0] - 2026-11-30
6
+
7
+ Supports Teleleo API 1.2.0: 84 operations.
8
+
9
+ ### Added
10
+
11
+ - `calls.getTranscript(callId)` (`GET /call/{call_id}/transcript`): the text of a call by side, with the `CallTranscript` and `CallTranscriptSegment` types and the `CallTranscriptStatus` enum. Calls from `calls.list()` carry `transcript` (`CallTranscriptSummary`) when they have one.
12
+ - `dongles.getWifiClients(dongleId)` (`GET /dongle/{dongle_id}/wifi/clients`): the devices on the modem Wi-Fi, from modem firmware 4.5.8. Modems from `dongles.list()` carry `firmware_version`.
13
+ - Organization API key (`tlk_...`) in the docs: the key to use, created in the Teleleo cabinet in the team settings of the organization, with a role, sent in the `auth-key` header. A method the role may not call throws `PermissionDeniedError` with `ORGANIZATION_CAPABILITY_FORBIDDEN`.
14
+ - The doc comment of every method names the capability the role of an organization API key needs and, where the operation depends on it, the lowest modem firmware; `api.md` has a Capability column.
15
+ - Rate limits in the docs and tests: an organization API key over its 600 reads or 120 writes a minute gets 429 `ORGANIZATION_API_KEY_RATE_LIMIT_EXCEEDED`; the client repeats the request after the `Retry-After` seconds within `maxRetries`, then throws `RateLimitError` with that `errorMessage`.
16
+
17
+ ### Changed
18
+
19
+ - Types and method docs follow API 1.2.0: SMS delivery statuses, new error codes, and the fields that come as `null` or absent when the role of the key lacks a capability.
20
+
21
+ ### Deprecated
22
+
23
+ - The legacy user key (Settings → API key) still works but is deprecated by the API and will be removed in API v2. Move to an organization API key.
24
+
25
+ ## [0.1.0] - 2026-11-10
26
+
27
+ First release: a typed client for the 82 operations of Teleleo API v1.0.0, exceptions with API error codes, automatic pagination with `for await`, safe retries and timeouts.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Teleleo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,237 @@
1
- # Temporary Holding Version
1
+ # Teleleo TypeScript and JavaScript library
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Teleleo is a platform for managing SIM-card modems from the cloud: SMS, calls, USSD, mailings, redirections, Wi-Fi, VPN and SOCKS proxy. `teleleo` is the official TypeScript and JavaScript library for the [Teleleo REST API](https://github.com/teleleo-com/teleleo-openapi).
4
+
5
+ - Types for every request and answer, docs on every method
6
+ - Every error is an exception with the API error code
7
+ - Automatic pagination with `for await`
8
+ - Safe retries and timeouts
9
+ - No runtime dependencies; Node.js 20.19+
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install teleleo
15
+ ```
16
+
17
+ ## Quickstart
18
+
19
+ Create an organization API key in the Teleleo cabinet (team settings of your organization → API keys) and put it into the `TELELEO_API_KEY` environment variable.
20
+
21
+ ```ts
22
+ import Teleleo from 'teleleo';
23
+
24
+ const client = new Teleleo(); // reads TELELEO_API_KEY
25
+
26
+ for await (const dongle of client.dongles.list()) {
27
+ console.log(dongle.dongle_id, dongle.name, dongle.number);
28
+ }
29
+
30
+ const sms = await client.sms.send(1234, {
31
+ number: '+447700900123',
32
+ message: 'Hello from Teleleo',
33
+ });
34
+ console.log(sms.sms_id, sms.sms_status_id);
35
+ ```
36
+
37
+ Methods take the path parameters first (`dongleId`, `smsId`, ...), then an object with the parameters of the request. The parameter and field names are the ones of the API, so the [API documentation](https://github.com/teleleo-com/teleleo-openapi) reads one to one.
38
+
39
+ ## Usage
40
+
41
+ ### Authentication
42
+
43
+ The client sends the key in the `auth-key` header of every request.
44
+
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.
47
+
48
+ 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
+ ### Read incoming SMS
51
+
52
+ ```ts
53
+ import Teleleo, { SmsType, toDate } from 'teleleo';
54
+
55
+ const client = new Teleleo();
56
+ const since = new Date(Date.now() - 24 * 60 * 60 * 1000);
57
+
58
+ for await (const sms of client.sms.list({ sms_type_ids: [SmsType.INCOMING], from: since, limit: 100 })) {
59
+ console.log(toDate(sms.created_at), sms.number_caller, sms.message_decoded);
60
+ }
61
+ ```
62
+
63
+ Dates in answers are strings in UTC, `YYYY-MM-DD HH:MM:SS[.ffffff]`, as the API sends them; `toDate()` turns one into a `Date`. Date parameters take a `Date` or a string in the API format.
64
+
65
+ ### Pagination
66
+
67
+ A list method returns a `PagePromise`: `await` it for one page, or iterate it with `for await` to go through every item; the next pages are requested as needed.
68
+
69
+ ```ts
70
+ const page = await client.contacts.list({ limit: 50 });
71
+ console.log(page.totalCount, page.items.length);
72
+
73
+ for await (const contact of client.contacts.list({ limit: 50 })) {
74
+ console.log(contact.name);
75
+ }
76
+
77
+ let current = page;
78
+ while (current.hasNextPage()) {
79
+ current = await current.getNextPage();
80
+ }
81
+ ```
82
+
83
+ Without `page` and `limit` the API returns the whole list in one answer (mailings return the first 50).
84
+
85
+ ### Modem commands
86
+
87
+ ```ts
88
+ await client.dongles.reboot(1234);
89
+ const info = await client.dongles.getNetworkInfo(1234);
90
+ console.log(info.current_network_name, info.network_type, info.is_roaming);
91
+
92
+ // Devices on the modem Wi-Fi; needs modem firmware 4.5.8 or later (firmware_version in dongles.list()).
93
+ const wifi = await client.dongles.getWifiClients(1234);
94
+ for (const device of wifi.clients) console.log(device.mac, device.ip, device.hostname);
95
+ ```
96
+
97
+ Every method and its parameters are listed in [api.md](api.md).
98
+
99
+ ### Call transcripts
100
+
101
+ When call transcription is on for the account, a call in `calls.list()` that has a transcript carries `transcript` with its status; `calls.getTranscript()` returns the text by side.
102
+
103
+ ```ts
104
+ import Teleleo, { CallTranscriptStatus } from 'teleleo';
105
+
106
+ const client = new Teleleo();
107
+ const calls = await client.calls.list({ limit: 20 });
108
+
109
+ for (const call of calls.items) {
110
+ if (call.transcript?.call_transcript_status_id !== CallTranscriptStatus.READY) continue;
111
+ const transcript = await client.calls.getTranscript(call.call_id);
112
+ for (const segment of transcript.segments) console.log(`${segment.side}: ${segment.text}`);
113
+ }
114
+ ```
115
+
116
+ 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
+
118
+ ### Errors
119
+
120
+ 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.
121
+
122
+ ```ts
123
+ import Teleleo, { APIConnectionError, APIStatusError, BadRequestError, NotFoundError } from 'teleleo';
124
+
125
+ const client = new Teleleo();
126
+
127
+ try {
128
+ await client.contacts.get(999999);
129
+ } catch (error) {
130
+ if (error instanceof NotFoundError) {
131
+ console.log('No such contact:', error.errorMessage);
132
+ } else if (error instanceof BadRequestError) {
133
+ console.log(error.status, error.errorMessage, error.errorDetails);
134
+ } else if (error instanceof APIStatusError) {
135
+ console.log('Teleleo error', error.status, error.errorMessage, 'request_id:', error.requestId);
136
+ } else if (error instanceof APIConnectionError) {
137
+ console.log('Teleleo is unreachable');
138
+ } else {
139
+ throw error;
140
+ }
141
+ }
142
+ ```
143
+
144
+ | Status | Exception |
145
+ | --------------------------- | --------------------------------------- |
146
+ | 400 | `BadRequestError` |
147
+ | 400 with `*NOT_FOUND*`, 404 | `NotFoundError` |
148
+ | 401 | `AuthenticationError` |
149
+ | 403 | `PermissionDeniedError` |
150
+ | 409 | `ConflictError` |
151
+ | 429 | `RateLimitError` |
152
+ | 5xx | `InternalServerError` |
153
+ | no answer | `APIConnectionError`, `APITimeoutError` |
154
+
155
+ 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
+
157
+ ### Retries, timeouts and abort
158
+
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.
160
+
161
+ ```ts
162
+ const client = new Teleleo({ timeout: 20_000, maxRetries: 3 });
163
+
164
+ await client.dongles.list({}, { timeout: 5_000, maxRetries: 0 });
165
+
166
+ const controller = new AbortController();
167
+ const request = client.dongles.get(1234, { signal: controller.signal });
168
+ controller.abort();
169
+ ```
170
+
171
+ The default timeout is 60 seconds.
172
+
173
+ ### Rate limits
174
+
175
+ An organization API key may make 600 reads (GET) and 120 writes (any other method) a minute; the minute is a fixed clock minute. Over the budget the API answers 429 with `errorMessage` `ORGANIZATION_API_KEY_RATE_LIMIT_EXCEEDED` and a `Retry-After` header: the seconds (1 to 60) until the next minute. The client waits that long and repeats the request, within `maxRetries`; then it throws `RateLimitError`. A refused request still counts, so spread the requests of a big job over time rather than retrying in a loop.
176
+
177
+ ```ts
178
+ import Teleleo, { RateLimitError } from 'teleleo';
179
+
180
+ const client = new Teleleo({ maxRetries: 0 }); // handle 429 yourself
181
+
182
+ try {
183
+ await client.dongles.list();
184
+ } catch (error) {
185
+ if (error instanceof RateLimitError) console.log('wait', error.headers.get('retry-after'), 'seconds');
186
+ else throw error;
187
+ }
188
+ ```
189
+
190
+ The legacy user key is not rate limited.
191
+
192
+ ### Configuration
193
+
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 |
202
+
203
+ 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
+
205
+ ### Answers
206
+
207
+ Answers are returned as the API sends them, without validation, so a new field or enum value in the API never breaks your code. Enums are plain numbers with named constants (`SmsType.INCOMING === 2`).
208
+
209
+ ### CommonJS
210
+
211
+ The package is an ES module. Node.js 20.19+ and 22.12+ load it with `require()` too:
212
+
213
+ ```js
214
+ const { Teleleo } = require('teleleo');
215
+ ```
216
+
217
+ ## Versioning
218
+
219
+ The library follows [semver](https://semver.org/). Changes are listed in [CHANGELOG.md](CHANGELOG.md).
220
+
221
+ ## Development
222
+
223
+ Types and resources in `src/resources` and `src/types` are generated from [`spec/openapi.yaml`](spec/openapi.yaml):
224
+
225
+ ```bash
226
+ npm install
227
+ npm run generate
228
+ npm test
229
+ ```
230
+
231
+ ## Support
232
+
233
+ support@teleleo.com · [teleleo.com](https://teleleo.com) · [issues](https://github.com/teleleo-com/teleleo-node/issues)
234
+
235
+ ## License
236
+
237
+ [MIT](LICENSE)
package/api.md ADDED
@@ -0,0 +1,187 @@
1
+ # API reference
2
+
3
+ Every method of the `Teleleo` client, generated from [`spec/openapi.yaml`](spec/openapi.yaml) (Teleleo API 1.2.0). Types are exported from the package root.
4
+
5
+ Every method sends the API key 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
+ ## `client.dongles`
8
+
9
+ Modems of the account and their commands: reboot, Wi-Fi, Wi-Fi extender, number, network info.
10
+
11
+ | Method | HTTP | Returns | Capability | Description |
12
+ |---|---|---|---|---|
13
+ | `list(params?)` | `GET /dongle` | `PagePromise<DongleListItem>` | `device.view` | List modems |
14
+ | `reboot(dongleId)` | `POST /dongle/{dongle_id}/reboot` | `Promise<boolean>` | `device.manage` | Reboot modem |
15
+ | `getWifiClients(dongleId)` | `GET /dongle/{dongle_id}/wifi/clients` | `Promise<DongleWifiClientList>` | `network.view` | List devices on modem Wi-Fi |
16
+ | `enableWifi(dongleId)` | `POST /dongle/{dongle_id}/wifi/enable` | `Promise<boolean>` | `device.manage` | Enable modem Wi-Fi |
17
+ | `disableWifi(dongleId)` | `POST /dongle/{dongle_id}/wifi/disable` | `Promise<boolean>` | `device.manage` | Disable modem Wi-Fi |
18
+ | `setWifiCredentials(dongleId, params)` | `POST /dongle/{dongle_id}/wifi/credentials` | `Promise<boolean>` | `device.manage` | Set modem Wi-Fi credentials |
19
+ | `enableWifiExtender(dongleId, params)` | `POST /dongle/{dongle_id}/wifi-extender/enable` | `Promise<boolean>` | `device.manage` | Enable Wi-Fi extender |
20
+ | `disableWifiExtender(dongleId)` | `POST /dongle/{dongle_id}/wifi-extender/disable` | `Promise<boolean>` | `device.manage` | Disable Wi-Fi extender |
21
+ | `scanWifiNetworks(dongleId)` | `POST /dongle/{dongle_id}/wifi-extender/networks` | `Promise<boolean>` | `device.manage` | Scan Wi-Fi networks |
22
+ | `updateOfflineNotification(dongleId, params)` | `PUT /dongle/{dongle_id}/setting/offline-notification` | `Promise<boolean>` | `device.manage` | Set offline notification |
23
+ | `setNumber(dongleId, params)` | `PUT /dongle/{dongle_id}/number` | `Promise<boolean>` | `device.manage` | Set modem number |
24
+ | `get(dongleId)` | `GET /dongle/{dongle_id}` | `Promise<Dongle>` | `device.view` | Get modem |
25
+ | `update(dongleId, params?)` | `PUT /dongle/{dongle_id}` | `Promise<Dongle>` | `device.manage` | Update modem |
26
+ | `getNetworkInfo(dongleId)` | `POST /dongle/{dongle_id}/mobile-network-info` | `Promise<DongleNetworkInfo>` | `device.view` | Get modem network info |
27
+ | `getSimIdentifiers(dongleId)` | `POST /dongle/{dongle_id}/mobile-network-ids` | `Promise<DongleSimIdentifiers>` | `device.view` | Get modem SIM identifiers |
28
+ | `listStatistics(dongleId, params?)` | `GET /dongle/{dongle_id}/statistic` | `Promise<Array<DongleStatistic>>` | `device.view` | List modem traffic statistics |
29
+
30
+ ## `client.sms`
31
+
32
+ SMS of the modems: history, sending, replies, threads.
33
+
34
+ | Method | HTTP | Returns | Capability | Description |
35
+ |---|---|---|---|---|
36
+ | `send(dongleId, params)` | `POST /dongle/{dongle_id}/outgoing-sms` | `Promise<Sms>` | `sms.send` | Send SMS |
37
+ | `sendToContact(dongleId, params)` | `POST /dongle/{dongle_id}/outgoing-contact-sms` | `Promise<Sms>` | `sms.send` | Send SMS to contact |
38
+ | `reply(dongleId, params)` | `POST /dongle/{dongle_id}/reply-sms` | `Promise<Sms>` | `sms.send` | Reply to SMS |
39
+ | `listThreads(params?)` | `GET /sms/thread` | `PagePromise<SmsThread>` | `sms.view` | List SMS threads |
40
+ | `list(params?)` | `GET /sms` | `PagePromise<Sms>` | `sms.view` | List SMS |
41
+ | `listForDongle(dongleId, params?)` | `GET /dongle/{dongle_id}/sms` | `PagePromise<Sms>` | `sms.view` | List modem SMS |
42
+ | `get(dongleId, smsId)` | `GET /dongle/{dongle_id}/sms/{sms_id}` | `Promise<Sms>` | `sms.view` | Get SMS |
43
+ | `update(dongleId, smsId, params?)` | `PUT /dongle/{dongle_id}/sms/{sms_id}` | `Promise<Sms>` | `sms.send` | Update SMS |
44
+ | `delete(dongleId, smsId)` | `DELETE /dongle/{dongle_id}/sms/{sms_id}` | `Promise<void>` | `sms.send` | Delete SMS |
45
+
46
+ ## `client.calls`
47
+
48
+ Calls of the modems: history, outgoing calls, transcripts.
49
+
50
+ | Method | HTTP | Returns | Capability | Description |
51
+ |---|---|---|---|---|
52
+ | `list(params?)` | `GET /call` | `PagePromise<Call>` | `call.view` | List calls |
53
+ | `getTranscript(callId)` | `GET /call/{call_id}/transcript` | `Promise<CallTranscript>` | `call.view` | Get call transcript |
54
+ | `create(dongleId, params?)` | `POST /dongle/{dongle_id}/call` | `Promise<Call>` | `call.make` | Make call |
55
+ | `get(dongleId, callId)` | `GET /dongle/{dongle_id}/call/{call_id}` | `Promise<Call>` | `call.view` | Get call |
56
+ | `delete(dongleId, callId)` | `DELETE /dongle/{dongle_id}/call/{call_id}` | `Promise<void>` | `call.make` | Delete call |
57
+
58
+ ## `client.ussd`
59
+
60
+ USSD requests through a modem.
61
+
62
+ | Method | HTTP | Returns | Capability | Description |
63
+ |---|---|---|---|---|
64
+ | `list(dongleId, params?)` | `GET /dongle/{dongle_id}/ussd` | `PagePromise<Ussd>` | `device.manage` | List USSD requests |
65
+ | `send(dongleId, params)` | `POST /dongle/{dongle_id}/ussd` | `Promise<Ussd>` | `device.manage` | Send USSD |
66
+ | `get(dongleId, ussdId)` | `GET /dongle/{dongle_id}/ussd/{ussd_id}` | `Promise<Ussd>` | `device.manage` | Get USSD request |
67
+ | `delete(dongleId, ussdId)` | `DELETE /dongle/{dongle_id}/ussd/{ussd_id}` | `Promise<boolean>` | `device.manage` | Delete USSD request |
68
+ | `deleteAll(dongleId)` | `DELETE /dongle/{dongle_id}/ussds` | `Promise<boolean>` | `device.manage` | Delete USSD history |
69
+
70
+ ## `client.contacts`
71
+
72
+ Address book of the account.
73
+
74
+ | Method | HTTP | Returns | Capability | Description |
75
+ |---|---|---|---|---|
76
+ | `list(params?)` | `GET /contact` | `PagePromise<Contact>` | `contact.view` | List contacts |
77
+ | `create(params)` | `POST /contact` | `Promise<Contact>` | `contact.manage` | Create contact |
78
+ | `get(contactId)` | `GET /contact/{contact_id}` | `Promise<Contact>` | `contact.view` | Get contact |
79
+ | `update(contactId, params)` | `PUT /contact/{contact_id}` | `Promise<Contact>` | `contact.manage` | Update contact |
80
+ | `delete(contactId)` | `DELETE /contact/{contact_id}` | `Promise<boolean>` | `contact.manage` | Delete contact |
81
+ | `importContacts(params)` | `POST /contact/import` | `Promise<ContactImportResult>` | `contact.manage` | Import contacts |
82
+
83
+ ## `client.contactGroups`
84
+
85
+ Groups of contacts, used by mailings, call scenarios and redirections.
86
+
87
+ | Method | HTTP | Returns | Capability | Description |
88
+ |---|---|---|---|---|
89
+ | `list(params?)` | `GET /contact-group` | `PagePromise<ContactGroup>` | `contact.view` | List contact groups |
90
+ | `create(params)` | `POST /contact-group` | `Promise<ContactGroup>` | `contact.manage` | Create contact group |
91
+ | `get(contactGroupId)` | `GET /contact-group/{contact_group_id}` | `Promise<ContactGroup>` | `contact.view` | Get contact group |
92
+ | `update(contactGroupId, params)` | `PUT /contact-group/{contact_group_id}` | `Promise<ContactGroup>` | `contact.manage` | Update contact group |
93
+ | `delete(contactGroupId)` | `DELETE /contact-group/{contact_group_id}` | `Promise<boolean>` | `contact.manage` | Delete contact group |
94
+
95
+ ## `client.mailings`
96
+
97
+ Bulk SMS and call campaigns.
98
+
99
+ | Method | HTTP | Returns | Capability | Description |
100
+ |---|---|---|---|---|
101
+ | `list(params?)` | `GET /mailing` | `PagePromise<Mailing>` | `automation.view` | List mailings |
102
+ | `create(params)` | `POST /mailing` | `Promise<Mailing>` | `automation.manage` | Create mailing |
103
+ | `createSms(params)` | `POST /mailing/sms` | `Promise<Mailing>` | `automation.manage` | Create SMS mailing |
104
+ | `createCall(params)` | `POST /mailing/call` | `Promise<Mailing>` | `automation.manage` | Create call mailing |
105
+ | `get(mailingId)` | `GET /mailing/{mailing_id}` | `Promise<Mailing>` | `automation.view` | Get mailing |
106
+ | `update(mailingId, params?)` | `PUT /mailing/{mailing_id}` | `Promise<Mailing>` | `automation.manage` | Update mailing |
107
+ | `delete(mailingId)` | `DELETE /mailing/{mailing_id}` | `Promise<boolean>` | `automation.manage` | Delete mailing |
108
+
109
+ ## `client.redirections`
110
+
111
+ Rules for incoming SMS and calls: forwarding, auto reply, HTTP callback.
112
+
113
+ | Method | HTTP | Returns | Capability | Description |
114
+ |---|---|---|---|---|
115
+ | `list(params?)` | `GET /redirection` | `PagePromise<Redirection>` | `automation.view` | List redirections |
116
+ | `create(params)` | `POST /redirection` | `Promise<Redirection>` | `automation.manage` | Create redirection |
117
+ | `get(redirectionId)` | `GET /redirection/{redirection_id}` | `Promise<Redirection>` | `automation.view` | Get redirection |
118
+ | `update(redirectionId, params)` | `PUT /redirection/{redirection_id}` | `Promise<Redirection>` | `automation.manage` | Update redirection |
119
+ | `delete(redirectionId)` | `DELETE /redirection/{redirection_id}` | `Promise<boolean>` | `automation.manage` | Delete redirection |
120
+
121
+ ## `client.callScenarios`
122
+
123
+ What a modem plays to incoming callers.
124
+
125
+ | Method | HTTP | Returns | Capability | Description |
126
+ |---|---|---|---|---|
127
+ | `list(params?)` | `GET /call-scenario` | `PagePromise<CallScenario>` | `automation.view` | List call scenarios |
128
+ | `create(params)` | `POST /call-scenario` | `Promise<CallScenario>` | `automation.manage` | Create call scenario |
129
+ | `get(callScenarioId)` | `GET /call-scenario/{call_scenario_id}` | `Promise<CallScenario>` | `automation.view` | Get call scenario |
130
+ | `update(callScenarioId, params?)` | `PUT /call-scenario/{call_scenario_id}` | `Promise<CallScenario>` | `automation.manage` | Update call scenario |
131
+ | `delete(callScenarioId)` | `DELETE /call-scenario/{call_scenario_id}` | `Promise<boolean>` | `automation.manage` | Delete call scenario |
132
+ | `retry(callScenarioId)` | `POST /call-scenario/{call_scenario_id}/retry` | `Promise<CallScenario>` | `automation.manage` | Retry call scenario delivery |
133
+
134
+ ## `client.followUpSmsSettings`
135
+
136
+ SMS a modem sends to a caller after a call.
137
+
138
+ | Method | HTTP | Returns | Capability | Description |
139
+ |---|---|---|---|---|
140
+ | `list(params?)` | `GET /follow-up-sms-setting` | `PagePromise<FollowUpSmsSetting>` | `automation.view` | List follow-up SMS settings |
141
+ | `create(params)` | `POST /follow-up-sms-setting` | `Promise<FollowUpSmsSetting>` | `automation.manage` | Create follow-up SMS setting |
142
+ | `get(followUpSmsSettingId)` | `GET /follow-up-sms-setting/{follow_up_sms_setting_id}` | `Promise<FollowUpSmsSetting>` | `automation.view` | Get follow-up SMS setting |
143
+ | `update(followUpSmsSettingId, params)` | `PUT /follow-up-sms-setting/{follow_up_sms_setting_id}` | `Promise<FollowUpSmsSetting>` | `automation.manage` | Update follow-up SMS setting |
144
+ | `delete(followUpSmsSettingId)` | `DELETE /follow-up-sms-setting/{follow_up_sms_setting_id}` | `Promise<boolean>` | `automation.manage` | Delete follow-up SMS setting |
145
+
146
+ ## `client.publicVpn`
147
+
148
+ VPN access through a modem.
149
+
150
+ | Method | HTTP | Returns | Capability | Description |
151
+ |---|---|---|---|---|
152
+ | `enable(dongleId)` | `POST /dongle/{dongle_id}/public-vpn/enable` | `Promise<boolean>` | `network.manage` | Enable public VPN |
153
+ | `disable(dongleId)` | `POST /dongle/{dongle_id}/public-vpn/disable` | `Promise<boolean>` | `network.manage` | Disable public VPN |
154
+ | `refreshPassword(dongleId)` | `POST /dongle/{dongle_id}/public-vpn/refresh-password` | `Promise<boolean>` | `network.manage` | Refresh public VPN password |
155
+ | `listSessions()` | `GET /public-vpn/connect-session-list` | `Promise<Array<PublicVpnSession>>` | `network.view` | List public VPN sessions |
156
+
157
+ ## `client.socksProxies`
158
+
159
+ SOCKS5 proxy through the mobile network of a modem.
160
+
161
+ | Method | HTTP | Returns | Capability | Description |
162
+ |---|---|---|---|---|
163
+ | `list(params?)` | `GET /dongle-socks-proxy` | `PagePromise<DongleSocksProxy>` | `network.view` | List SOCKS proxies |
164
+ | `create(params)` | `POST /dongle-socks-proxy` | `Promise<DongleSocksProxy>` | `network.manage` | Create SOCKS proxy |
165
+ | `get(dongleSocksProxyId)` | `GET /dongle-socks-proxy/{dongle_socks_proxy_id}` | `Promise<DongleSocksProxy>` | `network.view` | Get SOCKS proxy |
166
+ | `update(dongleSocksProxyId, params)` | `PUT /dongle-socks-proxy/{dongle_socks_proxy_id}` | `Promise<DongleSocksProxy>` | `network.manage` | Update SOCKS proxy |
167
+ | `delete(dongleSocksProxyId)` | `DELETE /dongle-socks-proxy/{dongle_socks_proxy_id}` | `Promise<boolean>` | `network.manage` | Delete SOCKS proxy |
168
+
169
+ ## `client.sipUsers`
170
+
171
+ SIP accounts of the modems.
172
+
173
+ | Method | HTTP | Returns | Capability | Description |
174
+ |---|---|---|---|---|
175
+ | `list(params?)` | `GET /sip-user` | `Promise<Array<PbxSipUser>>` | `call.make` | List SIP users |
176
+ | `get(sipUserId)` | `GET /sip-user/{sip_user_id}` | `Promise<PbxSipUser>` | `call.make` | Get SIP user |
177
+
178
+ ## `client.files`
179
+
180
+ Downloads, temporary audio uploads and text-to-speech.
181
+
182
+ | Method | HTTP | Returns | Capability | Description |
183
+ |---|---|---|---|---|
184
+ | `download(fileId)` | `GET /file/{file_id}` | `Promise<Uint8Array>` | `device.view` | Get file |
185
+ | `downloadTmp(fileId)` | `GET /file/tmp/{file_id}` | `Promise<Uint8Array>` | `automation.manage` | Get temporary file |
186
+ | `uploadTmp(params)` | `POST /file/upload-tmp` | `Promise<TmpFile>` | `automation.manage` | Upload temporary file |
187
+ | `generateSpeech(params)` | `POST /file/generate-speech` | `Promise<TmpFile>` | `automation.manage` | Generate speech |
@@ -0,0 +1,28 @@
1
+ import { BaseClient, type ClientOptions } from './core.js';
2
+ import { type Resources } from './resources/index.js';
3
+ /**
4
+ * Client for the Teleleo API.
5
+ *
6
+ * ```ts
7
+ * import Teleleo from 'teleleo';
8
+ *
9
+ * const client = new Teleleo(); // reads TELELEO_API_KEY
10
+ * for await (const dongle of client.dongles.list()) {
11
+ * console.log(dongle.dongle_id, dongle.name);
12
+ * }
13
+ * ```
14
+ */
15
+ export interface Teleleo extends Resources {
16
+ }
17
+ export declare class Teleleo extends BaseClient {
18
+ constructor(options?: ClientOptions);
19
+ /**
20
+ * A copy of the client with some options changed.
21
+ *
22
+ * ```ts
23
+ * await client.withOptions({ timeout: 5_000, maxRetries: 0 }).dongles.list();
24
+ * ```
25
+ */
26
+ withOptions(options: ClientOptions): Teleleo;
27
+ }
28
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +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;;;;;;OAMG;IACH,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO;CAW7C"}
package/dist/client.js ADDED
@@ -0,0 +1,27 @@
1
+ import { BaseClient } from './core.js';
2
+ import { createResources } from './resources/index.js';
3
+ export class Teleleo extends BaseClient {
4
+ constructor(options = {}) {
5
+ super(options);
6
+ Object.assign(this, createResources(this));
7
+ }
8
+ /**
9
+ * A copy of the client with some options changed.
10
+ *
11
+ * ```ts
12
+ * await client.withOptions({ timeout: 5_000, maxRetries: 0 }).dongles.list();
13
+ * ```
14
+ */
15
+ withOptions(options) {
16
+ return new Teleleo({
17
+ ...this._options,
18
+ apiKey: this.apiKey,
19
+ baseURL: this.baseURL,
20
+ timeout: this.timeout,
21
+ maxRetries: this.maxRetries,
22
+ ...options,
23
+ defaultHeaders: { ...this._options.defaultHeaders, ...options.defaultHeaders },
24
+ });
25
+ }
26
+ }
27
+ //# sourceMappingURL=client.js.map
@@ -0,0 +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;;;;;;OAMG;IACH,WAAW,CAAC,OAAsB;QAChC,OAAO,IAAI,OAAO,CAAC;YACjB,GAAG,IAAI,CAAC,QAAQ;YAChB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,GAAG,OAAO;YACV,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 ADDED
@@ -0,0 +1,66 @@
1
+ import { PagePromise } from './pagination.js';
2
+ export declare const DEFAULT_BASE_URL = "https://app.teleleo.com/react_api";
3
+ export declare const DEFAULT_TIMEOUT = 60000;
4
+ export declare const DEFAULT_MAX_RETRIES = 2;
5
+ export interface ClientOptions {
6
+ /**
7
+ * The organization API key (`tlk_...`), created in the Teleleo cabinet in the team settings of the
8
+ * organization (API keys); sent in the `auth-key` header. The legacy user key (Settings - API key) still
9
+ * works but is deprecated and will be removed in API v2. Defaults to `process.env.TELELEO_API_KEY`.
10
+ */
11
+ apiKey?: string | undefined;
12
+ /** Defaults to `process.env.TELELEO_BASE_URL`, then to `https://app.teleleo.com/react_api`. */
13
+ baseURL?: string | undefined;
14
+ /** Milliseconds before a request is aborted; 60 000 by default. */
15
+ timeout?: number | undefined;
16
+ /**
17
+ * How many times to repeat a request that failed for a transient reason; 2 by default. Requests that create
18
+ * something (POST) are repeated only when the server could not have acted on them.
19
+ */
20
+ maxRetries?: number | undefined;
21
+ /** Headers to send with every request. */
22
+ defaultHeaders?: Record<string, string> | undefined;
23
+ /** Your own `fetch`, for proxies, custom agents or tests. Defaults to the global `fetch`. */
24
+ fetch?: typeof fetch | undefined;
25
+ }
26
+ export interface RequestOptions {
27
+ /** Extra headers for this request. */
28
+ headers?: Record<string, string> | undefined;
29
+ /** Extra query parameters, for parameters the library does not have yet. */
30
+ query?: Record<string, unknown> | undefined;
31
+ /** Extra body fields, for fields the library does not have yet. */
32
+ body?: Record<string, unknown> | undefined;
33
+ /** Milliseconds before this request is aborted. */
34
+ timeout?: number | undefined;
35
+ /** Retries for this request. */
36
+ maxRetries?: number | undefined;
37
+ /** Abort the request. */
38
+ signal?: AbortSignal | undefined;
39
+ }
40
+ export declare class BaseClient {
41
+ #private;
42
+ readonly apiKey: string;
43
+ readonly baseURL: string;
44
+ readonly timeout: number;
45
+ readonly maxRetries: number;
46
+ protected readonly _options: ClientOptions;
47
+ constructor(options?: ClientOptions);
48
+ protected defaultHeaders(): Record<string, string>;
49
+ /** @internal Send a request and return the `data` of the answer. */
50
+ request(method: string, path: string, args?: {
51
+ query?: Record<string, unknown>;
52
+ body?: Record<string, unknown>;
53
+ options?: RequestOptions | undefined;
54
+ }): Promise<unknown>;
55
+ /** @internal Send a request and return the raw bytes of the answer. */
56
+ requestBytes(method: string, path: string, args?: {
57
+ options?: RequestOptions | undefined;
58
+ }): Promise<Uint8Array>;
59
+ /** @internal Request one page of a list. */
60
+ getPage<T>(path: string, args: {
61
+ query: Record<string, unknown>;
62
+ itemKey: string;
63
+ options?: RequestOptions | undefined;
64
+ }): PagePromise<T>;
65
+ }
66
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +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;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,+FAA+F;IAC/F,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,0CAA0C;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACpD,6FAA6F;IAC7F,KAAK,CAAC,EAAE,OAAO,KAAK,GAAG,SAAS,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAC7C,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC5C,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC3C,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,yBAAyB;IACzB,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC;AAqCD,qBAAa,UAAU;;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;gBAG/B,OAAO,GAAE,aAAkB;IAmBvC,SAAS,CAAC,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IA+ElD,oEAAoE;IAC9D,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;KACjC,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,CAAA;KAAO,GAClD,OAAO,CAAC,UAAU,CAAC;IAKtB,4CAA4C;IAC5C,OAAO,CAAC,CAAC,EACP,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;KAAE,GAC9F,WAAW,CAAC,CAAC,CAAC;CAqBlB"}