@babelforce/manager-sdk 0.5.0 → 0.38.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 +226 -0
- package/README.md +4 -3
- package/dist/index.d.ts +5683 -950
- package/dist/index.js +7621 -1275
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,8 +3,234 @@
|
|
|
3
3
|
All notable changes to `@babelforce/manager-sdk` are documented here. This project adheres to
|
|
4
4
|
[Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## 0.38.0
|
|
7
|
+
|
|
8
|
+
- **BREAKING:** Removed the `apiKey` auth mode (the `X-Auth-Access-Id` / `X-Auth-Access-Token`
|
|
9
|
+
header pair). The babelforce API no longer accepts those headers.
|
|
10
|
+
- Added a `clientCredentials` OAuth2 auth mode (`grant_type=client_credentials` against
|
|
11
|
+
`/oauth/token`, fetched lazily and refreshed transparently) as the server-to-server replacement.
|
|
12
|
+
|
|
13
|
+
## 0.37.0
|
|
14
|
+
|
|
15
|
+
- Complete manager API parity (356/356 operations; 397/397 across all specs). Final operations:
|
|
16
|
+
`users.me`/`users.getByEmail`, `prompts.uses`, `metrics.definitions`, `babeldesk.widgetSettings`,
|
|
17
|
+
and `applications.allLocalAutomations`. Re-enabled the `full` coverage gate. (`getMe` is
|
|
18
|
+
deprecated upstream but wrapped for completeness.)
|
|
19
|
+
|
|
20
|
+
## 0.36.0
|
|
21
|
+
|
|
22
|
+
- Add a new `system` resource for system/reference endpoints: `echo`, `ping`, `apiStatus`,
|
|
23
|
+
`serverTime`, `timezones`, `pushToken`, `tags`, `tagsByCategory`, `exportTemplates` — 9 new
|
|
24
|
+
operations.
|
|
25
|
+
|
|
26
|
+
## 0.35.0
|
|
27
|
+
|
|
28
|
+
- Extend `integrations` with the action catalog and execution: `listActions`, `listActionParams`,
|
|
29
|
+
`executeAction`, and `dispatchActionGet` — 4 new operations.
|
|
30
|
+
|
|
31
|
+
## 0.34.0
|
|
32
|
+
|
|
33
|
+
- Extend `queues` (`bulkUpdate`, `globalSelections`, `selections.setPriority`), `outbound`
|
|
34
|
+
(`getLead`, `listLeads`), `phonebook` (`bulkDelete`), and `numbers` (`update`) — 7 new
|
|
35
|
+
operations.
|
|
36
|
+
|
|
37
|
+
## 0.33.0
|
|
38
|
+
|
|
39
|
+
- Extend `calls` (`cancel`, `listQueued`, `queueCallback`, and `reporting.inboundSimpleAll`) and
|
|
40
|
+
`logs` (`enableLive`, `disableLive`, `write`) — 7 new operations.
|
|
41
|
+
|
|
42
|
+
## 0.32.0
|
|
43
|
+
|
|
44
|
+
- Extend `settings` with generic scope/key operations (`listAll`, `listInScope`, `clear`,
|
|
45
|
+
`clearInScope`, `clearAll`) and `applications` (`clone`, `bulkUpdate`, `listActions`,
|
|
46
|
+
`listErrors`) — 9 new operations.
|
|
47
|
+
|
|
48
|
+
## 0.31.0
|
|
49
|
+
|
|
50
|
+
- Extend `conversations` (`addEvent`, `open`, `close`, `firstEvent`, `latestEvent`, `allEvents`)
|
|
51
|
+
and `sms` (`send`, `delete`, `report`, `testInbound`) — 10 new operations.
|
|
52
|
+
|
|
53
|
+
## 0.30.0
|
|
54
|
+
|
|
55
|
+
- Extend `businesshours` (range `addRanges`/`listRanges`/`getRange`/`removeRange`,
|
|
56
|
+
`bulkUpdate`/`bulkDelete`) and `calendars` (individual-date `getDate`/`updateDate`/`removeDate`,
|
|
57
|
+
`testDate`, `bulkUpdate`/`bulkDelete`) — 12 new operations.
|
|
58
|
+
|
|
59
|
+
## 0.29.0
|
|
60
|
+
|
|
61
|
+
- Extend `agents` with bulk actions (`bulkAction`), CSV `export`/`import`/`validateImport` +
|
|
62
|
+
`getImportJob`, per-agent and global activity `logs`/`allLogs`, `push`, `updatePassword`, and
|
|
63
|
+
group membership (`groups.removeAgent`, `groups.listAgents`, `groups.bulkDelete`) — 12 new
|
|
64
|
+
operations.
|
|
65
|
+
|
|
66
|
+
## 0.28.0
|
|
67
|
+
|
|
68
|
+
- Extend `agents` with named presence CRUD (`presences`, `getPresence`, `createPresence`,
|
|
69
|
+
`updatePresence`, `deletePresence`), status reads (`getStatus`, `availableStatuses`), and
|
|
70
|
+
lifecycle controls (`enable`, `disable`, `hangupCall`) — 10 new operations.
|
|
71
|
+
|
|
72
|
+
## 0.27.0
|
|
73
|
+
|
|
74
|
+
- Extend `triggers` (expression/operator catalogs, `conditions`/`setConditions`, `uses`,
|
|
75
|
+
`bulkAction`), `automations` (`clone`, `dispatch`, `bulkUpdate`/`bulkDelete` of event triggers),
|
|
76
|
+
and `queues` (`listTriggers`) — 11 new operations.
|
|
77
|
+
|
|
78
|
+
## 0.26.0
|
|
79
|
+
|
|
80
|
+
- Extend `outbound` with outbound-list management (`getList`/`updateList`/`deleteList`),
|
|
81
|
+
lead/attempt browsing (`leads`/`processedLeads`/`attempts` + simple reporting),
|
|
82
|
+
`createAgentCall`, bulk lead deletion, and CSV lead uploads (11 new operations).
|
|
83
|
+
|
|
84
|
+
## 0.25.0
|
|
85
|
+
|
|
86
|
+
- Extend `campaigns` with realtime `status`/`statistics`, `hopper`, `leads`/`processedLeads`,
|
|
87
|
+
`attempts`, lead-list assignment (`getList`/`setList`/`setListById`/`unsetList`), and
|
|
88
|
+
`logoutAllAgents` (11 new operations).
|
|
89
|
+
|
|
90
|
+
## 0.24.0
|
|
91
|
+
|
|
92
|
+
- Extend `integrations` with the provider catalog, OAuth token management (`listTokens`,
|
|
93
|
+
`getToken`, `refreshToken`, `deleteToken`), `clone`, `authorize`, `integrate`, type actions
|
|
94
|
+
(`typeActions`, `dispatchTypeAction`), the API proxy (`apiProxyGet`/`apiProxyPost`), templates,
|
|
95
|
+
and bulk update/delete (16 new operations).
|
|
96
|
+
|
|
97
|
+
## 0.23.0
|
|
98
|
+
|
|
99
|
+
- Add the `recordings` resource (v2 manager API): `list`/`listAll`, `start`, `get`, `update`,
|
|
100
|
+
`delete`, `bulkAction`, plus recording flags (`getFlag`, `flag`, `unflag`, `toggleFlag`).
|
|
101
|
+
|
|
102
|
+
## 0.22.0
|
|
103
|
+
|
|
104
|
+
- Add the `dialer` resource (v2 manager API): `info`, `flush`, `simpleReporting` /
|
|
105
|
+
`simpleReportingAll` (auto-paginated dialer call report), plus a nested `dialer.behaviours`
|
|
106
|
+
sub-resource (CRUD).
|
|
107
|
+
|
|
108
|
+
## 0.21.0
|
|
109
|
+
|
|
110
|
+
- Add the `files` resource (v2 manager API): `list`/`listAll` (auto-paginated), `listByType`,
|
|
111
|
+
`backups`, `recordings`, `prompts`, `get`, `delete`, `download`, `bulkDelete`, `bulkDownload`,
|
|
112
|
+
`bulkDownloadPost`.
|
|
113
|
+
|
|
114
|
+
## 0.20.0
|
|
115
|
+
|
|
116
|
+
- Add the `dashboards` resource (v2 manager API): `list` / `listAll` (auto-paginated), `create`,
|
|
117
|
+
`get`, `update`, `delete`, plus dashboard-user access (`listUsers`, `addUser`, `removeUser`).
|
|
118
|
+
|
|
119
|
+
## 0.19.0
|
|
120
|
+
|
|
121
|
+
- Add the `auth` resource — the **OAuth 2.0** endpoints (`/oauth/authorize`, `/oauth/token`,
|
|
122
|
+
`/oauth/revoke`): `mgr.auth.token`, `mgr.auth.revoke`, `mgr.auth.authorize`. These authenticate
|
|
123
|
+
via client credentials in the request, independent of the SDK's api-key/bearer auth.
|
|
124
|
+
|
|
125
|
+
## 0.18.0
|
|
126
|
+
|
|
127
|
+
- **Refreshed the manager OpenAPI spec** (a large upstream expansion: 187 → 356 operations) and
|
|
128
|
+
**vendored the new `auth` (OAuth 2.0) spec**. The low-level generated clients now cover the new
|
|
129
|
+
surface; ergonomic facade methods for the new operations land in follow-up releases.
|
|
130
|
+
- **Breaking — removed operations no longer in the spec:** `conversations.getEvent`,
|
|
131
|
+
`calls.reporting.simpleByType` / `simpleAllByType`, `metrics.push`, `metrics.reset`.
|
|
132
|
+
- **Breaking — changed signatures:** `calendars.addDate(id, body)` now takes a `CalendarDateBody`
|
|
133
|
+
and returns `CalendarDateItemResponse`; `calendars.getDates` returns `CalendarDateListResponse`.
|
|
134
|
+
- Coverage is tracked against the new 397-operation scope; the SDK currently wraps ~56% while the
|
|
135
|
+
newly-added operations are wrapped over the coming releases.
|
|
136
|
+
|
|
137
|
+
## 0.17.0
|
|
138
|
+
|
|
139
|
+
- Extend `tasks` with `tasks.metrics` (task journal, agent journal, agent interaction durations),
|
|
140
|
+
`usage` / `usageTypes`, `logs` (customer logs), `agentAction`, `setAgentLock`, `changeState`, and
|
|
141
|
+
`testAction`.
|
|
142
|
+
- **The SDK now wraps 100% of every babelforce manager spec** (manager v2, user, task-automation,
|
|
143
|
+
task-schedule); the only excluded operation is the Zendesk webhook receiver, which is not a client call.
|
|
144
|
+
|
|
145
|
+
## 0.16.0
|
|
146
|
+
|
|
147
|
+
- Extend `tasks` (v3 task automation) with `tasks.scripts` (script CRUD by type), `tasks.secrets`
|
|
148
|
+
(prefixes, keys, create/patch/delete), and `tasks.selectionConfig` (account task-selection
|
|
149
|
+
configuration: read/create/update/delete).
|
|
150
|
+
|
|
151
|
+
## 0.15.0
|
|
152
|
+
|
|
153
|
+
- Add the `events` resource (`list`, `createCustom`, `deleteCustom`), the `logs` resource (`audit` /
|
|
154
|
+
`auditAll` auto-paginated, `live`), and the `expressions` resource (`list`, `evaluate`).
|
|
155
|
+
- Extend `integrations` with `dispatchAction` and `actionVariables`.
|
|
156
|
+
- **The TypeScript SDK now wraps 100% of the manager (v2) API.**
|
|
157
|
+
|
|
158
|
+
## 0.14.0
|
|
159
|
+
|
|
160
|
+
- Add the `prompts` resource (v2 audio prompts): `list` / `listAll`, `get`, `upload`, `update`,
|
|
161
|
+
`delete`.
|
|
162
|
+
- Add the `babeldesk` resource (v2 babeldesk dashboards): `list` / `listAll`, `create`, `get`,
|
|
163
|
+
`update`, `delete`, plus a nested `babeldesk.widgets` sub-resource (widget CRUD).
|
|
164
|
+
|
|
165
|
+
## 0.13.0
|
|
166
|
+
|
|
167
|
+
- Add the `conversations` resource (v2 conversations): `list` / `listAll`, `create`, `get`,
|
|
168
|
+
`update`, `delete`, plus `events`, `getEvent`, `getSession`, `updateSession`.
|
|
169
|
+
- Add the `sessions` resource (v2 sessions): `create`, `get`, `updateVariables`.
|
|
170
|
+
|
|
171
|
+
## 0.12.0
|
|
172
|
+
|
|
173
|
+
- Add the `businessHours` resource (v2 business hours): `list` / `listAll`, `create`, `get`,
|
|
174
|
+
`update`, `delete`.
|
|
175
|
+
- Add the `calendars` resource (v2 calendars): `list` / `listAll`, `create`, `get`, `update`,
|
|
176
|
+
`delete`, plus `getDates` / `addDate`.
|
|
177
|
+
|
|
178
|
+
## 0.11.0
|
|
179
|
+
|
|
180
|
+
- Add the `outbound` resource (v2 dialer lists & leads): `lists`, `createList`, `clearList`,
|
|
181
|
+
`addLead`, `updateLead`, `deleteLead`.
|
|
182
|
+
- Add the `phonebook` resource (v2 phonebook): `list` / `listAll`, `create`, `get`, `update`,
|
|
183
|
+
`delete`, plus bulk `download` / `upload`.
|
|
184
|
+
- Add the `campaigns` resource (v2 outbound campaigns): `list`, `create`, `get`, `update`, `delete`.
|
|
185
|
+
|
|
186
|
+
## 0.10.0
|
|
187
|
+
|
|
188
|
+
- Add the `integrations` resource (v2 integrations): `list` / `listAll`, `create`, `get`, `update`,
|
|
189
|
+
`delete`, `available`, `addAssociation` / `removeAssociation`, `providerLogo`, and
|
|
190
|
+
`providerSessionVariables`.
|
|
191
|
+
|
|
192
|
+
## 0.9.0
|
|
193
|
+
|
|
194
|
+
- Add the `routing` resource (v2 routing rules): `list` / `listAll`, `create`, `get`, `update`,
|
|
195
|
+
`delete`.
|
|
196
|
+
- Add the `triggers` resource (v2 workflow triggers): CRUD plus `clone(id)` and `test(body, testMode)`.
|
|
197
|
+
- Add the `automations` resource (v2 global automations / event triggers): `list` / `listAll`,
|
|
198
|
+
`create`, `get`, `update`, `delete`.
|
|
199
|
+
|
|
200
|
+
## 0.8.0
|
|
201
|
+
|
|
202
|
+
- Add the `queues` resource (v2 queues): `list` / `listAll`, `create`, `get`, `update`, `delete`,
|
|
203
|
+
plus a nested `queues.selections` sub-resource — selection CRUD, agent/group/tag membership
|
|
204
|
+
(`addAgent` / `removeAgent` / `addGroup` / `removeGroup` / `addTag` / `removeTag`), and
|
|
205
|
+
`selectAgents` to resolve a queue's selected agents.
|
|
206
|
+
|
|
207
|
+
## 0.7.0
|
|
208
|
+
|
|
209
|
+
- Extend the `calls` resource with call control: `get(id)`, `hangup(id)`, `createTestCall(body)`, and
|
|
210
|
+
`setSessionVariables(id, vars)`.
|
|
211
|
+
- Add the `sms` resource (v2 SMS records): `list` / `listAll` (auto-paginated) and `get(id)`.
|
|
212
|
+
- Add the `numbers` resource (v2 service numbers): `list` / `listAll`, `get(id)`, and
|
|
213
|
+
`addTags(id, tags)`.
|
|
214
|
+
- Add the `conferences` resource (v2 conferences): `list` / `listAll` and `get(id)`.
|
|
215
|
+
|
|
216
|
+
## 0.6.0
|
|
217
|
+
|
|
218
|
+
- Extend the `users` resource: `listRoles()` (assignable role names), `addRoles(emails, roles)` /
|
|
219
|
+
`removeRoles(emails, roles)`, and `resetPasswords(emails)`.
|
|
220
|
+
- Add the `me` resource (the authenticated principal, v2 user API): `get()` (current user),
|
|
221
|
+
`customer()` (current user + account info), `accounts()` (accounts the principal can access), and
|
|
222
|
+
`resetPassword()`.
|
|
223
|
+
|
|
6
224
|
## 0.5.0
|
|
7
225
|
|
|
226
|
+
- **Breaking:** removed the `environment` option (and the `Environment` type export). The client now
|
|
227
|
+
targets `https://services.babelforce.com` by default — set `baseUrl` to point at another host.
|
|
228
|
+
The default is exported as `DEFAULT_BASE_URL`.
|
|
229
|
+
- Add automatic retries, on by default and configurable via the new `retry` option (`false` to
|
|
230
|
+
disable, or a `RetryOptions` object to tune). Transient failures — network errors and `429`/`502`/
|
|
231
|
+
`503`/`504` — are retried with exponential backoff and jitter, honouring `Retry-After`;
|
|
232
|
+
non-idempotent requests (POST/PATCH) are only retried on `429`. Exposes `RetryOptions` and the
|
|
233
|
+
`withRetry` helper.
|
|
8
234
|
- `applications.list` / `applications.actions.list`: an explicit `pageSize: 0` now means "use the
|
|
9
235
|
server default" (the `max` query parameter is omitted), matching the Go SDK. It was previously sent
|
|
10
236
|
as `max=0`.
|
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ ESM, ships with types. Node 18+ (for global `fetch`).
|
|
|
22
22
|
import { ManagerClient } from "@babelforce/manager-sdk";
|
|
23
23
|
|
|
24
24
|
const mgr = await ManagerClient.connect({
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
auth: { kind: "clientCredentials", clientId, clientSecret }, // or { kind: "password", user, pass }
|
|
26
|
+
// baseUrl defaults to https://services.babelforce.com
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
// list users (auto-paginated)
|
|
@@ -37,7 +37,8 @@ await mgr.users.enable(["new.user@acme.com"]);
|
|
|
37
37
|
|
|
38
38
|
### Authentication
|
|
39
39
|
|
|
40
|
-
- `{ kind: "
|
|
40
|
+
- `{ kind: "clientCredentials", clientId, clientSecret }` — recommended for server-to-server use;
|
|
41
|
+
OAuth2 client_credentials grant against `/oauth/token` with transparent refresh.
|
|
41
42
|
- `{ kind: "bearer", token }` — a token you already hold.
|
|
42
43
|
- `{ kind: "password", user, pass }` — OAuth2 password grant with transparent refresh.
|
|
43
44
|
|