syllable-sdk 0.1.0-alpha.169 → 0.1.0-alpha.174
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/README.md +24 -0
- package/docs/sdks/batches/README.md +4 -4
- package/docs/sdks/campaigns/README.md +18 -2
- package/docs/sdks/languagegroups/README.md +4 -4
- package/docs/sdks/numbers/README.md +164 -0
- package/docs/sdks/users/README.md +424 -1
- package/docs/sdks/v1/README.md +424 -1
- package/docs/sdks/workflows/README.md +8 -8
- package/funcs/channelsTwilioNumbersList.d.ts +17 -0
- package/funcs/channelsTwilioNumbersList.d.ts.map +1 -0
- package/funcs/channelsTwilioNumbersList.js +108 -0
- package/funcs/channelsTwilioNumbersList.js.map +1 -0
- package/funcs/channelsTwilioNumbersUpdate.d.ts +17 -0
- package/funcs/channelsTwilioNumbersUpdate.d.ts.map +1 -0
- package/funcs/channelsTwilioNumbersUpdate.js +111 -0
- package/funcs/channelsTwilioNumbersUpdate.js.map +1 -0
- package/funcs/usersCreate.d.ts +16 -0
- package/funcs/usersCreate.d.ts.map +1 -0
- package/funcs/usersCreate.js +102 -0
- package/funcs/usersCreate.js.map +1 -0
- package/funcs/usersDelete.d.ts +16 -0
- package/funcs/usersDelete.d.ts.map +1 -0
- package/funcs/usersDelete.js +103 -0
- package/funcs/usersDelete.js.map +1 -0
- package/funcs/usersList.d.ts +17 -0
- package/funcs/usersList.d.ts.map +1 -0
- package/funcs/usersList.js +114 -0
- package/funcs/usersList.js.map +1 -0
- package/funcs/usersUpdate.d.ts +16 -0
- package/funcs/usersUpdate.d.ts.map +1 -0
- package/funcs/usersUpdate.js +102 -0
- package/funcs/usersUpdate.js.map +1 -0
- package/funcs/usersUsersDeleteAccount.d.ts +4 -0
- package/funcs/usersUsersDeleteAccount.d.ts.map +1 -1
- package/funcs/usersUsersDeleteAccount.js +4 -0
- package/funcs/usersUsersDeleteAccount.js.map +1 -1
- package/funcs/usersUsersGetByEmail.d.ts +17 -0
- package/funcs/usersUsersGetByEmail.d.ts.map +1 -0
- package/funcs/usersUsersGetByEmail.js +108 -0
- package/funcs/usersUsersGetByEmail.js.map +1 -0
- package/funcs/v1Create.d.ts +16 -0
- package/funcs/v1Create.d.ts.map +1 -0
- package/funcs/v1Create.js +102 -0
- package/funcs/v1Create.js.map +1 -0
- package/funcs/v1Delete.d.ts +16 -0
- package/funcs/v1Delete.d.ts.map +1 -0
- package/funcs/v1Delete.js +103 -0
- package/funcs/v1Delete.js.map +1 -0
- package/funcs/v1List.d.ts +17 -0
- package/funcs/v1List.d.ts.map +1 -0
- package/funcs/v1List.js +114 -0
- package/funcs/v1List.js.map +1 -0
- package/funcs/v1Update.d.ts +16 -0
- package/funcs/v1Update.d.ts.map +1 -0
- package/funcs/v1Update.js +102 -0
- package/funcs/v1Update.js.map +1 -0
- package/funcs/v1UsersDeleteAccount.d.ts +4 -0
- package/funcs/v1UsersDeleteAccount.d.ts.map +1 -1
- package/funcs/v1UsersDeleteAccount.js +4 -0
- package/funcs/v1UsersDeleteAccount.js.map +1 -1
- package/funcs/v1UsersGetByEmail.d.ts +17 -0
- package/funcs/v1UsersGetByEmail.d.ts.map +1 -0
- package/funcs/v1UsersGetByEmail.js +108 -0
- package/funcs/v1UsersGetByEmail.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/campaignproperties.d.ts +3 -0
- package/models/components/campaignproperties.d.ts.map +1 -1
- package/models/components/campaignproperties.js +1 -0
- package/models/components/campaignproperties.js.map +1 -1
- package/models/components/index.d.ts +10 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +10 -0
- package/models/components/index.js.map +1 -1
- package/models/components/languagecode.d.ts +6 -0
- package/models/components/languagecode.d.ts.map +1 -1
- package/models/components/languagecode.js +2 -0
- package/models/components/languagecode.js.map +1 -1
- package/models/components/listresponseuserresponse.d.ts +53 -0
- package/models/components/listresponseuserresponse.d.ts.map +1 -0
- package/models/components/listresponseuserresponse.js +81 -0
- package/models/components/listresponseuserresponse.js.map +1 -0
- package/models/components/outboundcampaign.d.ts +8 -1
- package/models/components/outboundcampaign.d.ts.map +1 -1
- package/models/components/outboundcampaign.js +2 -0
- package/models/components/outboundcampaign.js.map +1 -1
- package/models/components/outboundcampaigninput.d.ts +8 -1
- package/models/components/outboundcampaigninput.d.ts.map +1 -1
- package/models/components/outboundcampaigninput.js +2 -0
- package/models/components/outboundcampaigninput.js.map +1 -1
- package/models/components/twiliolistnumbersresponse.d.ts +36 -0
- package/models/components/twiliolistnumbersresponse.d.ts.map +1 -0
- package/models/components/twiliolistnumbersresponse.js +69 -0
- package/models/components/twiliolistnumbersresponse.js.map +1 -0
- package/models/components/twilionumberupdaterequest.d.ts +40 -0
- package/models/components/twilionumberupdaterequest.d.ts.map +1 -0
- package/models/components/twilionumberupdaterequest.js +72 -0
- package/models/components/twilionumberupdaterequest.js.map +1 -0
- package/models/components/twilionumberupdateresponse.d.ts +35 -0
- package/models/components/twilionumberupdateresponse.d.ts.map +1 -0
- package/models/components/twilionumberupdateresponse.js +68 -0
- package/models/components/twilionumberupdateresponse.js.map +1 -0
- package/models/components/twiliophonenumber.d.ts +47 -0
- package/models/components/twiliophonenumber.d.ts.map +1 -0
- package/models/components/twiliophonenumber.js +78 -0
- package/models/components/twiliophonenumber.js.map +1 -0
- package/models/components/usercreaterequest.d.ts +50 -0
- package/models/components/usercreaterequest.d.ts.map +1 -0
- package/models/components/usercreaterequest.js +78 -0
- package/models/components/usercreaterequest.js.map +1 -0
- package/models/components/userdeleterequest.d.ts +40 -0
- package/models/components/userdeleterequest.d.ts.map +1 -0
- package/models/components/userdeleterequest.js +61 -0
- package/models/components/userdeleterequest.js.map +1 -0
- package/models/components/userproperties.d.ts +40 -0
- package/models/components/userproperties.d.ts.map +1 -0
- package/models/components/userproperties.js +55 -0
- package/models/components/userproperties.js.map +1 -0
- package/models/components/userresponse.d.ts +75 -0
- package/models/components/userresponse.d.ts.map +1 -0
- package/models/components/userresponse.js +97 -0
- package/models/components/userresponse.js.map +1 -0
- package/models/components/userupdaterequest.d.ts +55 -0
- package/models/components/userupdaterequest.d.ts.map +1 -0
- package/models/components/userupdaterequest.js +82 -0
- package/models/components/userupdaterequest.js.map +1 -0
- package/models/operations/channelstwilionumberslist.d.ts +29 -0
- package/models/operations/channelstwilionumberslist.d.ts.map +1 -0
- package/models/operations/channelstwilionumberslist.js +68 -0
- package/models/operations/channelstwilionumberslist.js.map +1 -0
- package/models/operations/channelstwilionumbersupdate.d.ts +32 -0
- package/models/operations/channelstwilionumbersupdate.d.ts.map +1 -0
- package/models/operations/channelstwilionumbersupdate.js +73 -0
- package/models/operations/channelstwilionumbersupdate.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/usersgetbyemail.d.ts +29 -0
- package/models/operations/usersgetbyemail.d.ts.map +1 -0
- package/models/operations/usersgetbyemail.js +68 -0
- package/models/operations/usersgetbyemail.js.map +1 -0
- package/models/operations/userslist.d.ts +73 -0
- package/models/operations/userslist.d.ts.map +1 -0
- package/models/operations/userslist.js +99 -0
- package/models/operations/userslist.js.map +1 -0
- package/openapi.json +1353 -343
- package/package.json +1 -1
- package/sdk/numbers.d.ts +14 -0
- package/sdk/numbers.d.ts.map +1 -1
- package/sdk/numbers.js +20 -0
- package/sdk/numbers.js.map +1 -1
- package/sdk/users.d.ts +41 -0
- package/sdk/users.d.ts.map +1 -1
- package/sdk/users.js +54 -0
- package/sdk/users.js.map +1 -1
- package/sdk/v1.d.ts +41 -0
- package/sdk/v1.d.ts.map +1 -1
- package/sdk/v1.js +54 -0
- package/sdk/v1.js.map +1 -1
- package/src/funcs/channelsTwilioNumbersList.ts +145 -0
- package/src/funcs/channelsTwilioNumbersUpdate.ts +148 -0
- package/src/funcs/usersCreate.ts +135 -0
- package/src/funcs/usersDelete.ts +136 -0
- package/src/funcs/usersList.ts +148 -0
- package/src/funcs/usersUpdate.ts +135 -0
- package/src/funcs/usersUsersDeleteAccount.ts +4 -0
- package/src/funcs/usersUsersGetByEmail.ts +142 -0
- package/src/funcs/v1Create.ts +135 -0
- package/src/funcs/v1Delete.ts +136 -0
- package/src/funcs/v1List.ts +148 -0
- package/src/funcs/v1Update.ts +135 -0
- package/src/funcs/v1UsersDeleteAccount.ts +4 -0
- package/src/funcs/v1UsersGetByEmail.ts +142 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/campaignproperties.ts +1 -0
- package/src/models/components/index.ts +10 -0
- package/src/models/components/languagecode.ts +2 -0
- package/src/models/components/listresponseuserresponse.ts +116 -0
- package/src/models/components/outboundcampaign.ts +10 -1
- package/src/models/components/outboundcampaigninput.ts +10 -1
- package/src/models/components/twiliolistnumbersresponse.ts +87 -0
- package/src/models/components/twilionumberupdaterequest.ts +90 -0
- package/src/models/components/twilionumberupdateresponse.ts +81 -0
- package/src/models/components/twiliophonenumber.ts +103 -0
- package/src/models/components/usercreaterequest.ts +106 -0
- package/src/models/components/userdeleterequest.ts +79 -0
- package/src/models/components/userproperties.ts +41 -0
- package/src/models/components/userresponse.ts +150 -0
- package/src/models/components/userupdaterequest.ts +115 -0
- package/src/models/operations/channelstwilionumberslist.ts +77 -0
- package/src/models/operations/channelstwilionumbersupdate.ts +87 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/usersgetbyemail.ts +75 -0
- package/src/models/operations/userslist.ts +149 -0
- package/src/sdk/numbers.ts +36 -0
- package/src/sdk/users.ts +96 -0
- package/src/sdk/v1.ts +96 -0
|
@@ -5,11 +5,434 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
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
|
|
8
13
|
* [usersDeleteAccount](#usersdeleteaccount) - Request Removal Of This Account
|
|
9
14
|
|
|
15
|
+
## list
|
|
16
|
+
|
|
17
|
+
List the existing users.
|
|
18
|
+
|
|
19
|
+
### Example Usage
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
23
|
+
|
|
24
|
+
const syllableSDK = new SyllableSDK({
|
|
25
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
async function run() {
|
|
29
|
+
const result = await syllableSDK.users.list({
|
|
30
|
+
page: 0,
|
|
31
|
+
searchFields: [
|
|
32
|
+
"role_id",
|
|
33
|
+
],
|
|
34
|
+
searchFieldValues: [
|
|
35
|
+
"Some Object Name",
|
|
36
|
+
],
|
|
37
|
+
startDatetime: "2023-01-01T00:00:00Z",
|
|
38
|
+
endDatetime: "2024-01-01T00:00:00Z",
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// Handle the result
|
|
42
|
+
console.log(result);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
run();
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Standalone function
|
|
49
|
+
|
|
50
|
+
The standalone function version of this method:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
54
|
+
import { usersList } from "syllable-sdk/funcs/usersList.js";
|
|
55
|
+
|
|
56
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
57
|
+
// You can create one instance of it to use across an application.
|
|
58
|
+
const syllableSDK = new SyllableSDKCore({
|
|
59
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
async function run() {
|
|
63
|
+
const res = await usersList(syllableSDK, {
|
|
64
|
+
page: 0,
|
|
65
|
+
searchFields: [
|
|
66
|
+
"role_id",
|
|
67
|
+
],
|
|
68
|
+
searchFieldValues: [
|
|
69
|
+
"Some Object Name",
|
|
70
|
+
],
|
|
71
|
+
startDatetime: "2023-01-01T00:00:00Z",
|
|
72
|
+
endDatetime: "2024-01-01T00:00:00Z",
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
if (!res.ok) {
|
|
76
|
+
throw res.error;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const { value: result } = res;
|
|
80
|
+
|
|
81
|
+
// Handle the result
|
|
82
|
+
console.log(result);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
run();
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Parameters
|
|
89
|
+
|
|
90
|
+
| Parameter | Type | Required | Description |
|
|
91
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
92
|
+
| `request` | [operations.UsersListRequest](../../models/operations/userslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
93
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
94
|
+
| `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. |
|
|
95
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
96
|
+
|
|
97
|
+
### Response
|
|
98
|
+
|
|
99
|
+
**Promise\<[components.ListResponseUserResponse](../../models/components/listresponseuserresponse.md)\>**
|
|
100
|
+
|
|
101
|
+
### Errors
|
|
102
|
+
|
|
103
|
+
| Error Type | Status Code | Content Type |
|
|
104
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
105
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
106
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
107
|
+
|
|
108
|
+
## create
|
|
109
|
+
|
|
110
|
+
Create a new user.
|
|
111
|
+
|
|
112
|
+
### Example Usage
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
116
|
+
|
|
117
|
+
const syllableSDK = new SyllableSDK({
|
|
118
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
async function run() {
|
|
122
|
+
const result = await syllableSDK.users.create({
|
|
123
|
+
email: "user@email.com",
|
|
124
|
+
firstName: "Jane",
|
|
125
|
+
lastName: "Smith",
|
|
126
|
+
roleId: 1,
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// Handle the result
|
|
130
|
+
console.log(result);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
run();
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Standalone function
|
|
137
|
+
|
|
138
|
+
The standalone function version of this method:
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
142
|
+
import { usersCreate } from "syllable-sdk/funcs/usersCreate.js";
|
|
143
|
+
|
|
144
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
145
|
+
// You can create one instance of it to use across an application.
|
|
146
|
+
const syllableSDK = new SyllableSDKCore({
|
|
147
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
async function run() {
|
|
151
|
+
const res = await usersCreate(syllableSDK, {
|
|
152
|
+
email: "user@email.com",
|
|
153
|
+
firstName: "Jane",
|
|
154
|
+
lastName: "Smith",
|
|
155
|
+
roleId: 1,
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
if (!res.ok) {
|
|
159
|
+
throw res.error;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const { value: result } = res;
|
|
163
|
+
|
|
164
|
+
// Handle the result
|
|
165
|
+
console.log(result);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
run();
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Parameters
|
|
172
|
+
|
|
173
|
+
| Parameter | Type | Required | Description |
|
|
174
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
175
|
+
| `request` | [components.UserCreateRequest](../../models/components/usercreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
176
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
177
|
+
| `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. |
|
|
178
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
179
|
+
|
|
180
|
+
### Response
|
|
181
|
+
|
|
182
|
+
**Promise\<[components.UserResponse](../../models/components/userresponse.md)\>**
|
|
183
|
+
|
|
184
|
+
### Errors
|
|
185
|
+
|
|
186
|
+
| Error Type | Status Code | Content Type |
|
|
187
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
188
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
189
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
190
|
+
|
|
191
|
+
## update
|
|
192
|
+
|
|
193
|
+
Update an existing user.
|
|
194
|
+
|
|
195
|
+
### Example Usage
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
199
|
+
|
|
200
|
+
const syllableSDK = new SyllableSDK({
|
|
201
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
async function run() {
|
|
205
|
+
const result = await syllableSDK.users.update({
|
|
206
|
+
email: "user@email.com",
|
|
207
|
+
firstName: "Jane",
|
|
208
|
+
lastName: "Smith",
|
|
209
|
+
roleId: 1,
|
|
210
|
+
lastUpdatedComments: "Updated to change which role was assigned",
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// Handle the result
|
|
214
|
+
console.log(result);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
run();
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Standalone function
|
|
221
|
+
|
|
222
|
+
The standalone function version of this method:
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
226
|
+
import { usersUpdate } from "syllable-sdk/funcs/usersUpdate.js";
|
|
227
|
+
|
|
228
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
229
|
+
// You can create one instance of it to use across an application.
|
|
230
|
+
const syllableSDK = new SyllableSDKCore({
|
|
231
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
async function run() {
|
|
235
|
+
const res = await usersUpdate(syllableSDK, {
|
|
236
|
+
email: "user@email.com",
|
|
237
|
+
firstName: "Jane",
|
|
238
|
+
lastName: "Smith",
|
|
239
|
+
roleId: 1,
|
|
240
|
+
lastUpdatedComments: "Updated to change which role was assigned",
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
if (!res.ok) {
|
|
244
|
+
throw res.error;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const { value: result } = res;
|
|
248
|
+
|
|
249
|
+
// Handle the result
|
|
250
|
+
console.log(result);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
run();
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Parameters
|
|
257
|
+
|
|
258
|
+
| Parameter | Type | Required | Description |
|
|
259
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
260
|
+
| `request` | [components.UserUpdateRequest](../../models/components/userupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
261
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
262
|
+
| `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. |
|
|
263
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
264
|
+
|
|
265
|
+
### Response
|
|
266
|
+
|
|
267
|
+
**Promise\<[components.UserResponse](../../models/components/userresponse.md)\>**
|
|
268
|
+
|
|
269
|
+
### Errors
|
|
270
|
+
|
|
271
|
+
| Error Type | Status Code | Content Type |
|
|
272
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
273
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
274
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
275
|
+
|
|
276
|
+
## delete
|
|
277
|
+
|
|
278
|
+
Delete a user.
|
|
279
|
+
|
|
280
|
+
### Example Usage
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
284
|
+
|
|
285
|
+
const syllableSDK = new SyllableSDK({
|
|
286
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
async function run() {
|
|
290
|
+
const result = await syllableSDK.users.delete({
|
|
291
|
+
email: "user@email.com",
|
|
292
|
+
reason: "User left the organization",
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
// Handle the result
|
|
296
|
+
console.log(result);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
run();
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Standalone function
|
|
303
|
+
|
|
304
|
+
The standalone function version of this method:
|
|
305
|
+
|
|
306
|
+
```typescript
|
|
307
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
308
|
+
import { usersDelete } from "syllable-sdk/funcs/usersDelete.js";
|
|
309
|
+
|
|
310
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
311
|
+
// You can create one instance of it to use across an application.
|
|
312
|
+
const syllableSDK = new SyllableSDKCore({
|
|
313
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
async function run() {
|
|
317
|
+
const res = await usersDelete(syllableSDK, {
|
|
318
|
+
email: "user@email.com",
|
|
319
|
+
reason: "User left the organization",
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
if (!res.ok) {
|
|
323
|
+
throw res.error;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
const { value: result } = res;
|
|
327
|
+
|
|
328
|
+
// Handle the result
|
|
329
|
+
console.log(result);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
run();
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Parameters
|
|
336
|
+
|
|
337
|
+
| Parameter | Type | Required | Description |
|
|
338
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
339
|
+
| `request` | [components.UserDeleteRequest](../../models/components/userdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
340
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
341
|
+
| `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. |
|
|
342
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
343
|
+
|
|
344
|
+
### Response
|
|
345
|
+
|
|
346
|
+
**Promise\<[any](../../models/.md)\>**
|
|
347
|
+
|
|
348
|
+
### Errors
|
|
349
|
+
|
|
350
|
+
| Error Type | Status Code | Content Type |
|
|
351
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
352
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
353
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
354
|
+
|
|
355
|
+
## usersGetByEmail
|
|
356
|
+
|
|
357
|
+
Fetch a given user.
|
|
358
|
+
|
|
359
|
+
### Example Usage
|
|
360
|
+
|
|
361
|
+
```typescript
|
|
362
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
363
|
+
|
|
364
|
+
const syllableSDK = new SyllableSDK({
|
|
365
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
async function run() {
|
|
369
|
+
const result = await syllableSDK.users.usersGetByEmail({
|
|
370
|
+
userEmail: "<value>",
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
// Handle the result
|
|
374
|
+
console.log(result);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
run();
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### Standalone function
|
|
381
|
+
|
|
382
|
+
The standalone function version of this method:
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
386
|
+
import { usersUsersGetByEmail } from "syllable-sdk/funcs/usersUsersGetByEmail.js";
|
|
387
|
+
|
|
388
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
389
|
+
// You can create one instance of it to use across an application.
|
|
390
|
+
const syllableSDK = new SyllableSDKCore({
|
|
391
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
async function run() {
|
|
395
|
+
const res = await usersUsersGetByEmail(syllableSDK, {
|
|
396
|
+
userEmail: "<value>",
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
if (!res.ok) {
|
|
400
|
+
throw res.error;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
const { value: result } = res;
|
|
404
|
+
|
|
405
|
+
// Handle the result
|
|
406
|
+
console.log(result);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
run();
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Parameters
|
|
413
|
+
|
|
414
|
+
| Parameter | Type | Required | Description |
|
|
415
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
416
|
+
| `request` | [operations.UsersGetByEmailRequest](../../models/operations/usersgetbyemailrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
417
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
418
|
+
| `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. |
|
|
419
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
420
|
+
|
|
421
|
+
### Response
|
|
422
|
+
|
|
423
|
+
**Promise\<[components.UserResponse](../../models/components/userresponse.md)\>**
|
|
424
|
+
|
|
425
|
+
### Errors
|
|
426
|
+
|
|
427
|
+
| Error Type | Status Code | Content Type |
|
|
428
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
429
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
430
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
431
|
+
|
|
10
432
|
## usersDeleteAccount
|
|
11
433
|
|
|
12
|
-
Request
|
|
434
|
+
Request removal of the account of the user calling this endpoint. Intended for removing trial
|
|
435
|
+
accounts.
|
|
13
436
|
|
|
14
437
|
### Example Usage
|
|
15
438
|
|