syllable-sdk 1.0.7 → 1.0.8-rc.2
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/bin/mcp-server.js +54 -17
- package/bin/mcp-server.js.map +11 -10
- package/examples/package-lock.json +1 -1
- package/funcs/directoryUpdate.js +3 -1
- package/funcs/directoryUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/server.js.map +1 -1
- package/models/components/directorymember.d.ts +4 -4
- package/models/components/directorymember.d.ts.map +1 -1
- package/models/components/directorymember.js +4 -4
- package/models/components/directorymember.js.map +1 -1
- package/models/components/directorymemberupdate.d.ts +60 -0
- package/models/components/directorymemberupdate.d.ts.map +1 -0
- package/models/components/directorymemberupdate.js +87 -0
- package/models/components/directorymemberupdate.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/directorymemberupdate.d.ts +2 -2
- package/models/operations/directorymemberupdate.d.ts.map +1 -1
- package/models/operations/directorymemberupdate.js +4 -4
- package/models/operations/directorymemberupdate.js.map +1 -1
- package/openapi.json +136 -52
- package/package.json +1 -1
- package/src/funcs/directoryUpdate.ts +3 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/directorymember.ts +8 -10
- package/src/models/components/directorymemberupdate.ts +115 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/directorymemberupdate.ts +6 -6
- package/.devcontainer/README.md +0 -35
- package/api-reference/sdks/agents/README.md +0 -224
- package/api-reference/sdks/availabletargets/README.md +0 -49
- package/api-reference/sdks/channels/README.md +0 -92
- package/api-reference/sdks/chats/README.md +0 -55
- package/api-reference/sdks/conversations/README.md +0 -91
- package/api-reference/sdks/dashboards/README.md +0 -321
- package/api-reference/sdks/events/README.md +0 -50
- package/api-reference/sdks/greetings/README.md +0 -223
- package/api-reference/sdks/organizations/README.md +0 -48
- package/api-reference/sdks/prompts/README.md +0 -225
- package/api-reference/sdks/sessions/README.md +0 -50
- package/api-reference/sdks/syllable/README.md +0 -22
- package/api-reference/sdks/targets/README.md +0 -194
- package/api-reference/sdks/tools/README.md +0 -92
- package/docs/sdks/agents/README.md +0 -589
- package/docs/sdks/batches/README.md +0 -742
- package/docs/sdks/campaigns/README.md +0 -526
- package/docs/sdks/channels/README.md +0 -401
- package/docs/sdks/conversations/README.md +0 -100
- package/docs/sdks/custommessages/README.md +0 -496
- package/docs/sdks/dashboards/README.md +0 -481
- package/docs/sdks/datasources/README.md +0 -458
- package/docs/sdks/directory/README.md +0 -731
- package/docs/sdks/events/README.md +0 -100
- package/docs/sdks/folders/README.md +0 -675
- package/docs/sdks/fullsummary/README.md +0 -82
- package/docs/sdks/incidents/README.md +0 -501
- package/docs/sdks/insights/README.md +0 -100
- package/docs/sdks/languagegroups/README.md +0 -565
- package/docs/sdks/latency/README.md +0 -82
- package/docs/sdks/numbers/README.md +0 -250
- package/docs/sdks/organizations/README.md +0 -317
- package/docs/sdks/permissions/README.md +0 -78
- package/docs/sdks/prompts/README.md +0 -592
- package/docs/sdks/pronunciations/README.md +0 -360
- package/docs/sdks/roles/README.md +0 -430
- package/docs/sdks/services/README.md +0 -430
- package/docs/sdks/sessiondebug/README.md +0 -236
- package/docs/sdks/sessionlabels/README.md +0 -262
- package/docs/sdks/sessions/README.md +0 -325
- package/docs/sdks/syllablesdktools/README.md +0 -578
- package/docs/sdks/takeouts/README.md +0 -228
- package/docs/sdks/targets/README.md +0 -454
- package/docs/sdks/test/README.md +0 -92
- package/docs/sdks/tools/README.md +0 -518
- package/docs/sdks/transcript/README.md +0 -82
- package/docs/sdks/twilio/README.md +0 -246
- package/docs/sdks/users/README.md +0 -561
- package/docs/sdks/v1/README.md +0 -561
- package/docs/sdks/voicegroups/README.md +0 -551
- package/docs/sdks/workflows/README.md +0 -781
- package/examples/README.md +0 -31
package/docs/sdks/v1/README.md
DELETED
|
@@ -1,561 +0,0 @@
|
|
|
1
|
-
# V1
|
|
2
|
-
(*v1*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [list](#list) - List Users
|
|
9
|
-
* [create](#create) - Create User
|
|
10
|
-
* [update](#update) - Update User
|
|
11
|
-
* [delete](#delete) - Delete User
|
|
12
|
-
* [usersGetByEmail](#usersgetbyemail) - Get User
|
|
13
|
-
* [usersSendEmail](#userssendemail) - Send User Email
|
|
14
|
-
* [usersDeleteAccount](#usersdeleteaccount) - Request Removal Of This Account
|
|
15
|
-
|
|
16
|
-
## list
|
|
17
|
-
|
|
18
|
-
List the existing users.
|
|
19
|
-
|
|
20
|
-
### Example Usage
|
|
21
|
-
|
|
22
|
-
<!-- UsageSnippet language="typescript" operationID="users_list" method="get" path="/api/v1/users/" -->
|
|
23
|
-
```typescript
|
|
24
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
25
|
-
|
|
26
|
-
const syllableSDK = new SyllableSDK({
|
|
27
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
async function run() {
|
|
31
|
-
const result = await syllableSDK.v1.list({
|
|
32
|
-
page: 0,
|
|
33
|
-
searchFields: [
|
|
34
|
-
"activity_status",
|
|
35
|
-
],
|
|
36
|
-
searchFieldValues: [
|
|
37
|
-
"Some Object Name",
|
|
38
|
-
],
|
|
39
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
40
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
console.log(result);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
run();
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Standalone function
|
|
50
|
-
|
|
51
|
-
The standalone function version of this method:
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
55
|
-
import { usersList } from "syllable-sdk/funcs/usersList.js";
|
|
56
|
-
|
|
57
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
58
|
-
// You can create one instance of it to use across an application.
|
|
59
|
-
const syllableSDK = new SyllableSDKCore({
|
|
60
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
async function run() {
|
|
64
|
-
const res = await usersList(syllableSDK, {
|
|
65
|
-
page: 0,
|
|
66
|
-
searchFields: [
|
|
67
|
-
"activity_status",
|
|
68
|
-
],
|
|
69
|
-
searchFieldValues: [
|
|
70
|
-
"Some Object Name",
|
|
71
|
-
],
|
|
72
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
73
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
74
|
-
});
|
|
75
|
-
if (res.ok) {
|
|
76
|
-
const { value: result } = res;
|
|
77
|
-
console.log(result);
|
|
78
|
-
} else {
|
|
79
|
-
console.log("usersList failed:", res.error);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
run();
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Parameters
|
|
87
|
-
|
|
88
|
-
| Parameter | Type | Required | Description |
|
|
89
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
90
|
-
| `request` | [operations.UsersListRequest](../../models/operations/userslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
91
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
92
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
93
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
94
|
-
|
|
95
|
-
### Response
|
|
96
|
-
|
|
97
|
-
**Promise\<[components.ListResponseUserResponse](../../models/components/listresponseuserresponse.md)\>**
|
|
98
|
-
|
|
99
|
-
### Errors
|
|
100
|
-
|
|
101
|
-
| Error Type | Status Code | Content Type |
|
|
102
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
103
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
104
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
105
|
-
|
|
106
|
-
## create
|
|
107
|
-
|
|
108
|
-
Create a new user.
|
|
109
|
-
|
|
110
|
-
### Example Usage
|
|
111
|
-
|
|
112
|
-
<!-- UsageSnippet language="typescript" operationID="users_create" method="post" path="/api/v1/users/" -->
|
|
113
|
-
```typescript
|
|
114
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
115
|
-
|
|
116
|
-
const syllableSDK = new SyllableSDK({
|
|
117
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
async function run() {
|
|
121
|
-
const result = await syllableSDK.v1.create({
|
|
122
|
-
email: "user@syllable.ai",
|
|
123
|
-
firstName: "Jane",
|
|
124
|
-
lastName: "Smith",
|
|
125
|
-
roleId: 1,
|
|
126
|
-
loginType: "username_and_password",
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
console.log(result);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
run();
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Standalone function
|
|
136
|
-
|
|
137
|
-
The standalone function version of this method:
|
|
138
|
-
|
|
139
|
-
```typescript
|
|
140
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
141
|
-
import { usersCreate } from "syllable-sdk/funcs/usersCreate.js";
|
|
142
|
-
|
|
143
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
144
|
-
// You can create one instance of it to use across an application.
|
|
145
|
-
const syllableSDK = new SyllableSDKCore({
|
|
146
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
async function run() {
|
|
150
|
-
const res = await usersCreate(syllableSDK, {
|
|
151
|
-
email: "user@syllable.ai",
|
|
152
|
-
firstName: "Jane",
|
|
153
|
-
lastName: "Smith",
|
|
154
|
-
roleId: 1,
|
|
155
|
-
loginType: "username_and_password",
|
|
156
|
-
});
|
|
157
|
-
if (res.ok) {
|
|
158
|
-
const { value: result } = res;
|
|
159
|
-
console.log(result);
|
|
160
|
-
} else {
|
|
161
|
-
console.log("usersCreate failed:", res.error);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
run();
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Parameters
|
|
169
|
-
|
|
170
|
-
| Parameter | Type | Required | Description |
|
|
171
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
172
|
-
| `request` | [components.UserCreateRequest](../../models/components/usercreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
173
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
174
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
175
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
176
|
-
|
|
177
|
-
### Response
|
|
178
|
-
|
|
179
|
-
**Promise\<[components.UserResponse](../../models/components/userresponse.md)\>**
|
|
180
|
-
|
|
181
|
-
### Errors
|
|
182
|
-
|
|
183
|
-
| Error Type | Status Code | Content Type |
|
|
184
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
185
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
186
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
187
|
-
|
|
188
|
-
## update
|
|
189
|
-
|
|
190
|
-
Update an existing user.
|
|
191
|
-
|
|
192
|
-
### Example Usage
|
|
193
|
-
|
|
194
|
-
<!-- UsageSnippet language="typescript" operationID="users_update" method="put" path="/api/v1/users/" -->
|
|
195
|
-
```typescript
|
|
196
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
197
|
-
|
|
198
|
-
const syllableSDK = new SyllableSDK({
|
|
199
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
async function run() {
|
|
203
|
-
const result = await syllableSDK.v1.update({
|
|
204
|
-
email: "user@syllable.ai",
|
|
205
|
-
firstName: "Jane",
|
|
206
|
-
lastName: "Smith",
|
|
207
|
-
roleId: 1,
|
|
208
|
-
lastUpdatedComments: "Updated to change which role was assigned",
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
console.log(result);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
run();
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### Standalone function
|
|
218
|
-
|
|
219
|
-
The standalone function version of this method:
|
|
220
|
-
|
|
221
|
-
```typescript
|
|
222
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
223
|
-
import { usersUpdate } from "syllable-sdk/funcs/usersUpdate.js";
|
|
224
|
-
|
|
225
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
226
|
-
// You can create one instance of it to use across an application.
|
|
227
|
-
const syllableSDK = new SyllableSDKCore({
|
|
228
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
async function run() {
|
|
232
|
-
const res = await usersUpdate(syllableSDK, {
|
|
233
|
-
email: "user@syllable.ai",
|
|
234
|
-
firstName: "Jane",
|
|
235
|
-
lastName: "Smith",
|
|
236
|
-
roleId: 1,
|
|
237
|
-
lastUpdatedComments: "Updated to change which role was assigned",
|
|
238
|
-
});
|
|
239
|
-
if (res.ok) {
|
|
240
|
-
const { value: result } = res;
|
|
241
|
-
console.log(result);
|
|
242
|
-
} else {
|
|
243
|
-
console.log("usersUpdate failed:", res.error);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
run();
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### Parameters
|
|
251
|
-
|
|
252
|
-
| Parameter | Type | Required | Description |
|
|
253
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
254
|
-
| `request` | [components.UserUpdateRequest](../../models/components/userupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
255
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
256
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
257
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
258
|
-
|
|
259
|
-
### Response
|
|
260
|
-
|
|
261
|
-
**Promise\<[components.UserResponse](../../models/components/userresponse.md)\>**
|
|
262
|
-
|
|
263
|
-
### Errors
|
|
264
|
-
|
|
265
|
-
| Error Type | Status Code | Content Type |
|
|
266
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
267
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
268
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
269
|
-
|
|
270
|
-
## delete
|
|
271
|
-
|
|
272
|
-
Delete a user.
|
|
273
|
-
|
|
274
|
-
### Example Usage
|
|
275
|
-
|
|
276
|
-
<!-- UsageSnippet language="typescript" operationID="users_delete" method="delete" path="/api/v1/users/" -->
|
|
277
|
-
```typescript
|
|
278
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
279
|
-
|
|
280
|
-
const syllableSDK = new SyllableSDK({
|
|
281
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
async function run() {
|
|
285
|
-
const result = await syllableSDK.v1.delete({
|
|
286
|
-
email: "user@syllable.ai",
|
|
287
|
-
reason: "User left the organization",
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
console.log(result);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
run();
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### Standalone function
|
|
297
|
-
|
|
298
|
-
The standalone function version of this method:
|
|
299
|
-
|
|
300
|
-
```typescript
|
|
301
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
302
|
-
import { usersDelete } from "syllable-sdk/funcs/usersDelete.js";
|
|
303
|
-
|
|
304
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
305
|
-
// You can create one instance of it to use across an application.
|
|
306
|
-
const syllableSDK = new SyllableSDKCore({
|
|
307
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
async function run() {
|
|
311
|
-
const res = await usersDelete(syllableSDK, {
|
|
312
|
-
email: "user@syllable.ai",
|
|
313
|
-
reason: "User left the organization",
|
|
314
|
-
});
|
|
315
|
-
if (res.ok) {
|
|
316
|
-
const { value: result } = res;
|
|
317
|
-
console.log(result);
|
|
318
|
-
} else {
|
|
319
|
-
console.log("usersDelete failed:", res.error);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
run();
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
### Parameters
|
|
327
|
-
|
|
328
|
-
| Parameter | Type | Required | Description |
|
|
329
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
330
|
-
| `request` | [components.UserDeleteRequest](../../models/components/userdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
331
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
332
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
333
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
334
|
-
|
|
335
|
-
### Response
|
|
336
|
-
|
|
337
|
-
**Promise\<[any](../../models/.md)\>**
|
|
338
|
-
|
|
339
|
-
### Errors
|
|
340
|
-
|
|
341
|
-
| Error Type | Status Code | Content Type |
|
|
342
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
343
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
344
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
345
|
-
|
|
346
|
-
## usersGetByEmail
|
|
347
|
-
|
|
348
|
-
Fetch a given user.
|
|
349
|
-
|
|
350
|
-
### Example Usage
|
|
351
|
-
|
|
352
|
-
<!-- UsageSnippet language="typescript" operationID="users_get_by_email" method="get" path="/api/v1/users/{user_email}" -->
|
|
353
|
-
```typescript
|
|
354
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
355
|
-
|
|
356
|
-
const syllableSDK = new SyllableSDK({
|
|
357
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
358
|
-
});
|
|
359
|
-
|
|
360
|
-
async function run() {
|
|
361
|
-
const result = await syllableSDK.v1.usersGetByEmail({
|
|
362
|
-
userEmail: "<value>",
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
console.log(result);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
run();
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
### Standalone function
|
|
372
|
-
|
|
373
|
-
The standalone function version of this method:
|
|
374
|
-
|
|
375
|
-
```typescript
|
|
376
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
377
|
-
import { usersUsersGetByEmail } from "syllable-sdk/funcs/usersUsersGetByEmail.js";
|
|
378
|
-
|
|
379
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
380
|
-
// You can create one instance of it to use across an application.
|
|
381
|
-
const syllableSDK = new SyllableSDKCore({
|
|
382
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
async function run() {
|
|
386
|
-
const res = await usersUsersGetByEmail(syllableSDK, {
|
|
387
|
-
userEmail: "<value>",
|
|
388
|
-
});
|
|
389
|
-
if (res.ok) {
|
|
390
|
-
const { value: result } = res;
|
|
391
|
-
console.log(result);
|
|
392
|
-
} else {
|
|
393
|
-
console.log("usersUsersGetByEmail failed:", res.error);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
run();
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
### Parameters
|
|
401
|
-
|
|
402
|
-
| Parameter | Type | Required | Description |
|
|
403
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
404
|
-
| `request` | [operations.UsersGetByEmailRequest](../../models/operations/usersgetbyemailrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
405
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
406
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
407
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
408
|
-
|
|
409
|
-
### Response
|
|
410
|
-
|
|
411
|
-
**Promise\<[components.UserResponse](../../models/components/userresponse.md)\>**
|
|
412
|
-
|
|
413
|
-
### Errors
|
|
414
|
-
|
|
415
|
-
| Error Type | Status Code | Content Type |
|
|
416
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
417
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
418
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
419
|
-
|
|
420
|
-
## usersSendEmail
|
|
421
|
-
|
|
422
|
-
Send a welcome email to a user.
|
|
423
|
-
|
|
424
|
-
### Example Usage
|
|
425
|
-
|
|
426
|
-
<!-- UsageSnippet language="typescript" operationID="users_send_email" method="post" path="/api/v1/users/{user_email}/send_email" -->
|
|
427
|
-
```typescript
|
|
428
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
429
|
-
|
|
430
|
-
const syllableSDK = new SyllableSDK({
|
|
431
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
432
|
-
});
|
|
433
|
-
|
|
434
|
-
async function run() {
|
|
435
|
-
const result = await syllableSDK.v1.usersSendEmail({
|
|
436
|
-
userEmail: "<value>",
|
|
437
|
-
});
|
|
438
|
-
|
|
439
|
-
console.log(result);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
run();
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
### Standalone function
|
|
446
|
-
|
|
447
|
-
The standalone function version of this method:
|
|
448
|
-
|
|
449
|
-
```typescript
|
|
450
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
451
|
-
import { usersUsersSendEmail } from "syllable-sdk/funcs/usersUsersSendEmail.js";
|
|
452
|
-
|
|
453
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
454
|
-
// You can create one instance of it to use across an application.
|
|
455
|
-
const syllableSDK = new SyllableSDKCore({
|
|
456
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
async function run() {
|
|
460
|
-
const res = await usersUsersSendEmail(syllableSDK, {
|
|
461
|
-
userEmail: "<value>",
|
|
462
|
-
});
|
|
463
|
-
if (res.ok) {
|
|
464
|
-
const { value: result } = res;
|
|
465
|
-
console.log(result);
|
|
466
|
-
} else {
|
|
467
|
-
console.log("usersUsersSendEmail failed:", res.error);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
run();
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
### Parameters
|
|
475
|
-
|
|
476
|
-
| Parameter | Type | Required | Description |
|
|
477
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
478
|
-
| `request` | [operations.UsersSendEmailRequest](../../models/operations/userssendemailrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
479
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
480
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
481
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
482
|
-
|
|
483
|
-
### Response
|
|
484
|
-
|
|
485
|
-
**Promise\<[any](../../models/.md)\>**
|
|
486
|
-
|
|
487
|
-
### Errors
|
|
488
|
-
|
|
489
|
-
| Error Type | Status Code | Content Type |
|
|
490
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
491
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
492
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
493
|
-
|
|
494
|
-
## usersDeleteAccount
|
|
495
|
-
|
|
496
|
-
Request removal of the account of the user calling this endpoint. Intended for removing trial
|
|
497
|
-
accounts.
|
|
498
|
-
|
|
499
|
-
### Example Usage
|
|
500
|
-
|
|
501
|
-
<!-- UsageSnippet language="typescript" operationID="users_delete_account" method="delete" path="/api/v1/users/delete_account" -->
|
|
502
|
-
```typescript
|
|
503
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
504
|
-
|
|
505
|
-
const syllableSDK = new SyllableSDK({
|
|
506
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
507
|
-
});
|
|
508
|
-
|
|
509
|
-
async function run() {
|
|
510
|
-
const result = await syllableSDK.v1.usersDeleteAccount();
|
|
511
|
-
|
|
512
|
-
console.log(result);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
run();
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
### Standalone function
|
|
519
|
-
|
|
520
|
-
The standalone function version of this method:
|
|
521
|
-
|
|
522
|
-
```typescript
|
|
523
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
524
|
-
import { usersUsersDeleteAccount } from "syllable-sdk/funcs/usersUsersDeleteAccount.js";
|
|
525
|
-
|
|
526
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
527
|
-
// You can create one instance of it to use across an application.
|
|
528
|
-
const syllableSDK = new SyllableSDKCore({
|
|
529
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
530
|
-
});
|
|
531
|
-
|
|
532
|
-
async function run() {
|
|
533
|
-
const res = await usersUsersDeleteAccount(syllableSDK);
|
|
534
|
-
if (res.ok) {
|
|
535
|
-
const { value: result } = res;
|
|
536
|
-
console.log(result);
|
|
537
|
-
} else {
|
|
538
|
-
console.log("usersUsersDeleteAccount failed:", res.error);
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
run();
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
### Parameters
|
|
546
|
-
|
|
547
|
-
| Parameter | Type | Required | Description |
|
|
548
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
549
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
550
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
551
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
552
|
-
|
|
553
|
-
### Response
|
|
554
|
-
|
|
555
|
-
**Promise\<[any](../../models/.md)\>**
|
|
556
|
-
|
|
557
|
-
### Errors
|
|
558
|
-
|
|
559
|
-
| Error Type | Status Code | Content Type |
|
|
560
|
-
| --------------- | --------------- | --------------- |
|
|
561
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|