syllable-sdk 0.1.0-alpha.163 → 0.1.0-alpha.168

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 (139) hide show
  1. package/README.md +13 -0
  2. package/docs/sdks/agents/README.md +16 -0
  3. package/docs/sdks/batches/README.md +4 -4
  4. package/docs/sdks/roles/README.md +445 -0
  5. package/docs/sdks/takeouts/README.md +1 -1
  6. package/docs/sdks/workflows/README.md +8 -8
  7. package/funcs/rolesCreate.d.ts +16 -0
  8. package/funcs/rolesCreate.d.ts.map +1 -0
  9. package/funcs/rolesCreate.js +102 -0
  10. package/funcs/rolesCreate.js.map +1 -0
  11. package/funcs/rolesDelete.d.ts +16 -0
  12. package/funcs/rolesDelete.d.ts.map +1 -0
  13. package/funcs/rolesDelete.js +112 -0
  14. package/funcs/rolesDelete.js.map +1 -0
  15. package/funcs/rolesGetById.d.ts +17 -0
  16. package/funcs/rolesGetById.d.ts.map +1 -0
  17. package/funcs/rolesGetById.js +108 -0
  18. package/funcs/rolesGetById.js.map +1 -0
  19. package/funcs/rolesList.d.ts +17 -0
  20. package/funcs/rolesList.d.ts.map +1 -0
  21. package/funcs/rolesList.js +114 -0
  22. package/funcs/rolesList.js.map +1 -0
  23. package/funcs/rolesUpdate.d.ts +16 -0
  24. package/funcs/rolesUpdate.d.ts.map +1 -0
  25. package/funcs/rolesUpdate.js +102 -0
  26. package/funcs/rolesUpdate.js.map +1 -0
  27. package/funcs/takeoutsTakeoutsGetFile.d.ts +1 -1
  28. package/funcs/takeoutsTakeoutsGetFile.d.ts.map +1 -1
  29. package/funcs/takeoutsTakeoutsGetFile.js +3 -1
  30. package/funcs/takeoutsTakeoutsGetFile.js.map +1 -1
  31. package/jsr.json +1 -1
  32. package/lib/config.d.ts +2 -2
  33. package/lib/config.js +2 -2
  34. package/models/components/agentcreate.d.ts +8 -1
  35. package/models/components/agentcreate.d.ts.map +1 -1
  36. package/models/components/agentcreate.js +2 -0
  37. package/models/components/agentcreate.js.map +1 -1
  38. package/models/components/agentproperties.d.ts +3 -0
  39. package/models/components/agentproperties.d.ts.map +1 -1
  40. package/models/components/agentproperties.js +1 -0
  41. package/models/components/agentproperties.js.map +1 -1
  42. package/models/components/agentresponse.d.ts +8 -1
  43. package/models/components/agentresponse.d.ts.map +1 -1
  44. package/models/components/agentresponse.js +2 -0
  45. package/models/components/agentresponse.js.map +1 -1
  46. package/models/components/agentupdate.d.ts +8 -1
  47. package/models/components/agentupdate.d.ts.map +1 -1
  48. package/models/components/agentupdate.js +2 -0
  49. package/models/components/agentupdate.js.map +1 -1
  50. package/models/components/index.d.ts +5 -1
  51. package/models/components/index.d.ts.map +1 -1
  52. package/models/components/index.js +5 -1
  53. package/models/components/index.js.map +1 -1
  54. package/models/components/listresponseroleresponse.d.ts +53 -0
  55. package/models/components/listresponseroleresponse.d.ts.map +1 -0
  56. package/models/components/listresponseroleresponse.js +81 -0
  57. package/models/components/listresponseroleresponse.js.map +1 -0
  58. package/models/components/permissionresponse.d.ts +4 -2
  59. package/models/components/permissionresponse.d.ts.map +1 -1
  60. package/models/components/permissionresponse.js +2 -3
  61. package/models/components/permissionresponse.js.map +1 -1
  62. package/models/components/rolecreaterequest.d.ts +45 -0
  63. package/models/components/rolecreaterequest.d.ts.map +1 -0
  64. package/models/components/rolecreaterequest.js +63 -0
  65. package/models/components/rolecreaterequest.js.map +1 -0
  66. package/models/components/roleproperties.d.ts +40 -0
  67. package/models/components/roleproperties.d.ts.map +1 -0
  68. package/models/components/roleproperties.js +55 -0
  69. package/models/components/roleproperties.js.map +1 -0
  70. package/models/components/roleresponse.d.ts +70 -0
  71. package/models/components/roleresponse.d.ts.map +1 -0
  72. package/models/components/roleresponse.js +88 -0
  73. package/models/components/roleresponse.js.map +1 -0
  74. package/models/components/roleupdaterequest.d.ts +55 -0
  75. package/models/components/roleupdaterequest.d.ts.map +1 -0
  76. package/models/components/roleupdaterequest.js +76 -0
  77. package/models/components/roleupdaterequest.js.map +1 -0
  78. package/models/components/tooldetailresponse.d.ts +1 -1
  79. package/models/components/toolresponse.d.ts +1 -1
  80. package/models/operations/index.d.ts +3 -0
  81. package/models/operations/index.d.ts.map +1 -1
  82. package/models/operations/index.js +3 -0
  83. package/models/operations/index.js.map +1 -1
  84. package/models/operations/rolesdelete.d.ts +31 -0
  85. package/models/operations/rolesdelete.d.ts.map +1 -0
  86. package/models/operations/rolesdelete.js +70 -0
  87. package/models/operations/rolesdelete.js.map +1 -0
  88. package/models/operations/rolesgetbyid.d.ts +29 -0
  89. package/models/operations/rolesgetbyid.d.ts.map +1 -0
  90. package/models/operations/rolesgetbyid.js +68 -0
  91. package/models/operations/rolesgetbyid.js.map +1 -0
  92. package/models/operations/roleslist.d.ts +73 -0
  93. package/models/operations/roleslist.d.ts.map +1 -0
  94. package/models/operations/roleslist.js +99 -0
  95. package/models/operations/roleslist.js.map +1 -0
  96. package/openapi.json +826 -108
  97. package/package.json +1 -1
  98. package/sdk/roles.d.ts +41 -0
  99. package/sdk/roles.d.ts.map +1 -0
  100. package/sdk/roles.js +62 -0
  101. package/sdk/roles.js.map +1 -0
  102. package/sdk/sdk.d.ts +3 -0
  103. package/sdk/sdk.d.ts.map +1 -1
  104. package/sdk/sdk.js +4 -0
  105. package/sdk/sdk.js.map +1 -1
  106. package/sdk/takeouts.d.ts +1 -1
  107. package/sdk/takeouts.d.ts.map +1 -1
  108. package/src/funcs/rolesCreate.ts +135 -0
  109. package/src/funcs/rolesDelete.ts +147 -0
  110. package/src/funcs/rolesGetById.ts +142 -0
  111. package/src/funcs/rolesList.ts +148 -0
  112. package/src/funcs/rolesUpdate.ts +135 -0
  113. package/src/funcs/takeoutsTakeoutsGetFile.ts +5 -3
  114. package/src/lib/config.ts +2 -2
  115. package/src/models/components/agentcreate.ts +10 -1
  116. package/src/models/components/agentproperties.ts +1 -0
  117. package/src/models/components/agentresponse.ts +10 -1
  118. package/src/models/components/agentupdate.ts +10 -1
  119. package/src/models/components/index.ts +5 -1
  120. package/src/models/components/listresponseroleresponse.ts +116 -0
  121. package/src/models/components/permissionresponse.ts +6 -8
  122. package/src/models/components/rolecreaterequest.ts +86 -0
  123. package/src/models/components/roleproperties.ts +41 -0
  124. package/src/models/components/roleresponse.ts +134 -0
  125. package/src/models/components/roleupdaterequest.ts +109 -0
  126. package/src/models/components/tooldetailresponse.ts +1 -1
  127. package/src/models/components/toolresponse.ts +1 -1
  128. package/src/models/operations/index.ts +3 -0
  129. package/src/models/operations/rolesdelete.ts +79 -0
  130. package/src/models/operations/rolesgetbyid.ts +75 -0
  131. package/src/models/operations/roleslist.ts +149 -0
  132. package/src/sdk/roles.ts +100 -0
  133. package/src/sdk/sdk.ts +6 -0
  134. package/src/sdk/takeouts.ts +1 -1
  135. package/models/components/permissions.d.ts +0 -199
  136. package/models/components/permissions.d.ts.map +0 -1
  137. package/models/components/permissions.js +0 -108
  138. package/models/components/permissions.js.map +0 -1
  139. package/src/models/components/permissions.ts +0 -88
package/README.md CHANGED
@@ -296,6 +296,14 @@ run();
296
296
  * [promptsHistory](docs/sdks/prompts/README.md#promptshistory) - Get Prompt History
297
297
  * [promptGetSupportedLlms](docs/sdks/prompts/README.md#promptgetsupportedllms) - Get Supported Llm Configs
298
298
 
299
+ ### [roles](docs/sdks/roles/README.md)
300
+
301
+ * [list](docs/sdks/roles/README.md#list) - List Roles
302
+ * [create](docs/sdks/roles/README.md#create) - Create Role
303
+ * [update](docs/sdks/roles/README.md#update) - Update Role
304
+ * [getById](docs/sdks/roles/README.md#getbyid) - Get Role
305
+ * [delete](docs/sdks/roles/README.md#delete) - Delete Role
306
+
299
307
  ### [services](docs/sdks/services/README.md)
300
308
 
301
309
  * [list](docs/sdks/services/README.md#list) - Service List
@@ -466,6 +474,11 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
466
474
  - [`promptsPromptGetSupportedLlms`](docs/sdks/prompts/README.md#promptgetsupportedllms) - Get Supported Llm Configs
467
475
  - [`promptsPromptsHistory`](docs/sdks/prompts/README.md#promptshistory) - Get Prompt History
468
476
  - [`promptsUpdate`](docs/sdks/prompts/README.md#update) - Update Prompt
477
+ - [`rolesCreate`](docs/sdks/roles/README.md#create) - Create Role
478
+ - [`rolesDelete`](docs/sdks/roles/README.md#delete) - Delete Role
479
+ - [`rolesGetById`](docs/sdks/roles/README.md#getbyid) - Get Role
480
+ - [`rolesList`](docs/sdks/roles/README.md#list) - List Roles
481
+ - [`rolesUpdate`](docs/sdks/roles/README.md#update) - Update Role
469
482
  - [`servicesCreate`](docs/sdks/services/README.md#create) - Create Service
470
483
  - [`servicesDelete`](docs/sdks/services/README.md#delete) - Delete Service
471
484
  - [`servicesGetById`](docs/sdks/services/README.md#getbyid) - Get Service By Id
@@ -125,6 +125,10 @@ async function run() {
125
125
  name: "Weather agent",
126
126
  description: "Agent for answering questions about weather.",
127
127
  label: "Information",
128
+ labels: [
129
+ "Information",
130
+ "Weather",
131
+ ],
128
132
  type: "ca_v1",
129
133
  promptId: 1,
130
134
  customMessageId: 1,
@@ -181,6 +185,10 @@ async function run() {
181
185
  name: "Weather agent",
182
186
  description: "Agent for answering questions about weather.",
183
187
  label: "Information",
188
+ labels: [
189
+ "Information",
190
+ "Weather",
191
+ ],
184
192
  type: "ca_v1",
185
193
  promptId: 1,
186
194
  customMessageId: 1,
@@ -262,6 +270,10 @@ async function run() {
262
270
  name: "Weather agent",
263
271
  description: "Agent for answering questions about weather.",
264
272
  label: "Information",
273
+ labels: [
274
+ "Information",
275
+ "Weather",
276
+ ],
265
277
  type: "ca_v1",
266
278
  promptId: 1,
267
279
  customMessageId: 1,
@@ -319,6 +331,10 @@ async function run() {
319
331
  name: "Weather agent",
320
332
  description: "Agent for answering questions about weather.",
321
333
  label: "Information",
334
+ labels: [
335
+ "Information",
336
+ "Weather",
337
+ ],
322
338
  type: "ca_v1",
323
339
  promptId: 1,
324
340
  customMessageId: 1,
@@ -125,9 +125,9 @@ const syllableSDK = new SyllableSDK({
125
125
 
126
126
  async function run() {
127
127
  const result = await syllableSDK.outbound.batches.create({
128
- batchId: "20250527.9",
128
+ batchId: "20250529.9",
129
129
  campaignId: 1,
130
- expiresOn: new Date("2025-05-28T00:00:00Z"),
130
+ expiresOn: new Date("2025-05-30T00:00:00Z"),
131
131
  paused: true,
132
132
  });
133
133
 
@@ -154,9 +154,9 @@ const syllableSDK = new SyllableSDKCore({
154
154
 
155
155
  async function run() {
156
156
  const res = await outboundBatchesCreate(syllableSDK, {
157
- batchId: "20250527.9",
157
+ batchId: "20250529.9",
158
158
  campaignId: 1,
159
- expiresOn: new Date("2025-05-28T00:00:00Z"),
159
+ expiresOn: new Date("2025-05-30T00:00:00Z"),
160
160
  paused: true,
161
161
  });
162
162
 
@@ -0,0 +1,445 @@
1
+ # Roles
2
+ (*roles*)
3
+
4
+ ## Overview
5
+
6
+ Operations related to roles. A role is a collection of permissions that can be assigned to users to control their access to various features within the Syllable system.
7
+
8
+ ### Available Operations
9
+
10
+ * [list](#list) - List Roles
11
+ * [create](#create) - Create Role
12
+ * [update](#update) - Update Role
13
+ * [getById](#getbyid) - Get Role
14
+ * [delete](#delete) - Delete Role
15
+
16
+ ## list
17
+
18
+ List the existing roles.
19
+
20
+ ### Example Usage
21
+
22
+ ```typescript
23
+ import { SyllableSDK } from "syllable-sdk";
24
+
25
+ const syllableSDK = new SyllableSDK({
26
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
27
+ });
28
+
29
+ async function run() {
30
+ const result = await syllableSDK.roles.list({
31
+ page: 0,
32
+ searchFields: [
33
+ "name",
34
+ ],
35
+ searchFieldValues: [
36
+ "Some Object Name",
37
+ ],
38
+ startDatetime: "2023-01-01T00:00:00Z",
39
+ endDatetime: "2024-01-01T00:00:00Z",
40
+ });
41
+
42
+ // Handle the result
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 { rolesList } from "syllable-sdk/funcs/rolesList.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 rolesList(syllableSDK, {
65
+ page: 0,
66
+ searchFields: [
67
+ "name",
68
+ ],
69
+ searchFieldValues: [
70
+ "Some Object Name",
71
+ ],
72
+ startDatetime: "2023-01-01T00:00:00Z",
73
+ endDatetime: "2024-01-01T00:00:00Z",
74
+ });
75
+
76
+ if (!res.ok) {
77
+ throw res.error;
78
+ }
79
+
80
+ const { value: result } = res;
81
+
82
+ // Handle the result
83
+ console.log(result);
84
+ }
85
+
86
+ run();
87
+ ```
88
+
89
+ ### Parameters
90
+
91
+ | Parameter | Type | Required | Description |
92
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
93
+ | `request` | [operations.RolesListRequest](../../models/operations/roleslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
94
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
95
+ | `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. |
96
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
97
+
98
+ ### Response
99
+
100
+ **Promise\<[components.ListResponseRoleResponse](../../models/components/listresponseroleresponse.md)\>**
101
+
102
+ ### Errors
103
+
104
+ | Error Type | Status Code | Content Type |
105
+ | -------------------------- | -------------------------- | -------------------------- |
106
+ | errors.HTTPValidationError | 422 | application/json |
107
+ | errors.SDKError | 4XX, 5XX | \*/\* |
108
+
109
+ ## create
110
+
111
+ Create a new role.
112
+
113
+ ### Example Usage
114
+
115
+ ```typescript
116
+ import { SyllableSDK } from "syllable-sdk";
117
+
118
+ const syllableSDK = new SyllableSDK({
119
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
120
+ });
121
+
122
+ async function run() {
123
+ const result = await syllableSDK.roles.create({
124
+ name: "prompt_engineer",
125
+ description: "Role for users who can fetch and change prompts",
126
+ permissions: [
127
+ "prompts_read",
128
+ "prompts_write",
129
+ "prompts_delete",
130
+ ],
131
+ });
132
+
133
+ // Handle the result
134
+ console.log(result);
135
+ }
136
+
137
+ run();
138
+ ```
139
+
140
+ ### Standalone function
141
+
142
+ The standalone function version of this method:
143
+
144
+ ```typescript
145
+ import { SyllableSDKCore } from "syllable-sdk/core.js";
146
+ import { rolesCreate } from "syllable-sdk/funcs/rolesCreate.js";
147
+
148
+ // Use `SyllableSDKCore` for best tree-shaking performance.
149
+ // You can create one instance of it to use across an application.
150
+ const syllableSDK = new SyllableSDKCore({
151
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
152
+ });
153
+
154
+ async function run() {
155
+ const res = await rolesCreate(syllableSDK, {
156
+ name: "prompt_engineer",
157
+ description: "Role for users who can fetch and change prompts",
158
+ permissions: [
159
+ "prompts_read",
160
+ "prompts_write",
161
+ "prompts_delete",
162
+ ],
163
+ });
164
+
165
+ if (!res.ok) {
166
+ throw res.error;
167
+ }
168
+
169
+ const { value: result } = res;
170
+
171
+ // Handle the result
172
+ console.log(result);
173
+ }
174
+
175
+ run();
176
+ ```
177
+
178
+ ### Parameters
179
+
180
+ | Parameter | Type | Required | Description |
181
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
182
+ | `request` | [components.RoleCreateRequest](../../models/components/rolecreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
183
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
184
+ | `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. |
185
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
186
+
187
+ ### Response
188
+
189
+ **Promise\<[components.RoleResponse](../../models/components/roleresponse.md)\>**
190
+
191
+ ### Errors
192
+
193
+ | Error Type | Status Code | Content Type |
194
+ | -------------------------- | -------------------------- | -------------------------- |
195
+ | errors.HTTPValidationError | 422 | application/json |
196
+ | errors.SDKError | 4XX, 5XX | \*/\* |
197
+
198
+ ## update
199
+
200
+ Update an existing role.
201
+
202
+ ### Example Usage
203
+
204
+ ```typescript
205
+ import { SyllableSDK } from "syllable-sdk";
206
+
207
+ const syllableSDK = new SyllableSDK({
208
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
209
+ });
210
+
211
+ async function run() {
212
+ const result = await syllableSDK.roles.update({
213
+ name: "prompt_engineer",
214
+ description: "Role for users who can fetch and change prompts",
215
+ permissions: [
216
+ "prompts_read",
217
+ "prompts_write",
218
+ "prompts_delete",
219
+ ],
220
+ id: 1,
221
+ lastUpdatedComments: "Updated to add delete permission",
222
+ });
223
+
224
+ // Handle the result
225
+ console.log(result);
226
+ }
227
+
228
+ run();
229
+ ```
230
+
231
+ ### Standalone function
232
+
233
+ The standalone function version of this method:
234
+
235
+ ```typescript
236
+ import { SyllableSDKCore } from "syllable-sdk/core.js";
237
+ import { rolesUpdate } from "syllable-sdk/funcs/rolesUpdate.js";
238
+
239
+ // Use `SyllableSDKCore` for best tree-shaking performance.
240
+ // You can create one instance of it to use across an application.
241
+ const syllableSDK = new SyllableSDKCore({
242
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
243
+ });
244
+
245
+ async function run() {
246
+ const res = await rolesUpdate(syllableSDK, {
247
+ name: "prompt_engineer",
248
+ description: "Role for users who can fetch and change prompts",
249
+ permissions: [
250
+ "prompts_read",
251
+ "prompts_write",
252
+ "prompts_delete",
253
+ ],
254
+ id: 1,
255
+ lastUpdatedComments: "Updated to add delete permission",
256
+ });
257
+
258
+ if (!res.ok) {
259
+ throw res.error;
260
+ }
261
+
262
+ const { value: result } = res;
263
+
264
+ // Handle the result
265
+ console.log(result);
266
+ }
267
+
268
+ run();
269
+ ```
270
+
271
+ ### Parameters
272
+
273
+ | Parameter | Type | Required | Description |
274
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
275
+ | `request` | [components.RoleUpdateRequest](../../models/components/roleupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
276
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
277
+ | `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. |
278
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
279
+
280
+ ### Response
281
+
282
+ **Promise\<[components.RoleResponse](../../models/components/roleresponse.md)\>**
283
+
284
+ ### Errors
285
+
286
+ | Error Type | Status Code | Content Type |
287
+ | -------------------------- | -------------------------- | -------------------------- |
288
+ | errors.HTTPValidationError | 422 | application/json |
289
+ | errors.SDKError | 4XX, 5XX | \*/\* |
290
+
291
+ ## getById
292
+
293
+ Fetch a given role.
294
+
295
+ ### Example Usage
296
+
297
+ ```typescript
298
+ import { SyllableSDK } from "syllable-sdk";
299
+
300
+ const syllableSDK = new SyllableSDK({
301
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
302
+ });
303
+
304
+ async function run() {
305
+ const result = await syllableSDK.roles.getById({
306
+ roleId: 931598,
307
+ });
308
+
309
+ // Handle the result
310
+ console.log(result);
311
+ }
312
+
313
+ run();
314
+ ```
315
+
316
+ ### Standalone function
317
+
318
+ The standalone function version of this method:
319
+
320
+ ```typescript
321
+ import { SyllableSDKCore } from "syllable-sdk/core.js";
322
+ import { rolesGetById } from "syllable-sdk/funcs/rolesGetById.js";
323
+
324
+ // Use `SyllableSDKCore` for best tree-shaking performance.
325
+ // You can create one instance of it to use across an application.
326
+ const syllableSDK = new SyllableSDKCore({
327
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
328
+ });
329
+
330
+ async function run() {
331
+ const res = await rolesGetById(syllableSDK, {
332
+ roleId: 931598,
333
+ });
334
+
335
+ if (!res.ok) {
336
+ throw res.error;
337
+ }
338
+
339
+ const { value: result } = res;
340
+
341
+ // Handle the result
342
+ console.log(result);
343
+ }
344
+
345
+ run();
346
+ ```
347
+
348
+ ### Parameters
349
+
350
+ | Parameter | Type | Required | Description |
351
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
352
+ | `request` | [operations.RolesGetByIdRequest](../../models/operations/rolesgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
353
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
354
+ | `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. |
355
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
356
+
357
+ ### Response
358
+
359
+ **Promise\<[components.RoleResponse](../../models/components/roleresponse.md)\>**
360
+
361
+ ### Errors
362
+
363
+ | Error Type | Status Code | Content Type |
364
+ | -------------------------- | -------------------------- | -------------------------- |
365
+ | errors.HTTPValidationError | 422 | application/json |
366
+ | errors.SDKError | 4XX, 5XX | \*/\* |
367
+
368
+ ## delete
369
+
370
+ Delete a role.
371
+
372
+ ### Example Usage
373
+
374
+ ```typescript
375
+ import { SyllableSDK } from "syllable-sdk";
376
+
377
+ const syllableSDK = new SyllableSDK({
378
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
379
+ });
380
+
381
+ async function run() {
382
+ const result = await syllableSDK.roles.delete({
383
+ roleId: 545907,
384
+ reason: "<value>",
385
+ });
386
+
387
+ // Handle the result
388
+ console.log(result);
389
+ }
390
+
391
+ run();
392
+ ```
393
+
394
+ ### Standalone function
395
+
396
+ The standalone function version of this method:
397
+
398
+ ```typescript
399
+ import { SyllableSDKCore } from "syllable-sdk/core.js";
400
+ import { rolesDelete } from "syllable-sdk/funcs/rolesDelete.js";
401
+
402
+ // Use `SyllableSDKCore` for best tree-shaking performance.
403
+ // You can create one instance of it to use across an application.
404
+ const syllableSDK = new SyllableSDKCore({
405
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
406
+ });
407
+
408
+ async function run() {
409
+ const res = await rolesDelete(syllableSDK, {
410
+ roleId: 545907,
411
+ reason: "<value>",
412
+ });
413
+
414
+ if (!res.ok) {
415
+ throw res.error;
416
+ }
417
+
418
+ const { value: result } = res;
419
+
420
+ // Handle the result
421
+ console.log(result);
422
+ }
423
+
424
+ run();
425
+ ```
426
+
427
+ ### Parameters
428
+
429
+ | Parameter | Type | Required | Description |
430
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
431
+ | `request` | [operations.RolesDeleteRequest](../../models/operations/rolesdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
432
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
433
+ | `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. |
434
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
435
+
436
+ ### Response
437
+
438
+ **Promise\<[any](../../models/.md)\>**
439
+
440
+ ### Errors
441
+
442
+ | Error Type | Status Code | Content Type |
443
+ | -------------------------- | -------------------------- | -------------------------- |
444
+ | errors.HTTPValidationError | 422 | application/json |
445
+ | errors.SDKError | 4XX, 5XX | \*/\* |
@@ -227,7 +227,7 @@ run();
227
227
 
228
228
  ### Response
229
229
 
230
- **Promise\<[string](../../models/.md)\>**
230
+ **Promise\<[ReadableStream<Uint8Array>](../../models/.md)\>**
231
231
 
232
232
  ### Errors
233
233
 
@@ -131,8 +131,8 @@ async function run() {
131
131
  1,
132
132
  ],
133
133
  conditions: {},
134
- startDatetime: new Date("2025-05-26T00:00:00Z"),
135
- endDatetime: new Date("2025-05-27T00:00:00Z"),
134
+ startDatetime: new Date("2025-05-28T00:00:00Z"),
135
+ endDatetime: new Date("2025-05-29T00:00:00Z"),
136
136
  });
137
137
 
138
138
  // Handle the result
@@ -165,8 +165,8 @@ async function run() {
165
165
  1,
166
166
  ],
167
167
  conditions: {},
168
- startDatetime: new Date("2025-05-26T00:00:00Z"),
169
- endDatetime: new Date("2025-05-27T00:00:00Z"),
168
+ startDatetime: new Date("2025-05-28T00:00:00Z"),
169
+ endDatetime: new Date("2025-05-29T00:00:00Z"),
170
170
  });
171
171
 
172
172
  if (!res.ok) {
@@ -303,8 +303,8 @@ async function run() {
303
303
  1,
304
304
  ],
305
305
  conditions: {},
306
- startDatetime: new Date("2025-05-26T00:00:00Z"),
307
- endDatetime: new Date("2025-05-27T00:00:00Z"),
306
+ startDatetime: new Date("2025-05-28T00:00:00Z"),
307
+ endDatetime: new Date("2025-05-29T00:00:00Z"),
308
308
  },
309
309
  });
310
310
 
@@ -340,8 +340,8 @@ async function run() {
340
340
  1,
341
341
  ],
342
342
  conditions: {},
343
- startDatetime: new Date("2025-05-26T00:00:00Z"),
344
- endDatetime: new Date("2025-05-27T00:00:00Z"),
343
+ startDatetime: new Date("2025-05-28T00:00:00Z"),
344
+ endDatetime: new Date("2025-05-29T00:00:00Z"),
345
345
  },
346
346
  });
347
347
 
@@ -0,0 +1,16 @@
1
+ import { SyllableSDKCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import * as components from "../models/components/index.js";
4
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
+ import * as errors from "../models/errors/index.js";
6
+ import { SDKError } from "../models/errors/sdkerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import { Result } from "../types/fp.js";
9
+ /**
10
+ * Create Role
11
+ *
12
+ * @remarks
13
+ * Create a new role.
14
+ */
15
+ export declare function rolesCreate(client: SyllableSDKCore, request: components.RoleCreateRequest, options?: RequestOptions): Promise<Result<components.RoleResponse, errors.HTTPValidationError | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
16
+ //# sourceMappingURL=rolesCreate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolesCreate.d.ts","sourceRoot":"","sources":["../src/funcs/rolesCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAK7C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,YAAY,EACrB,MAAM,CAAC,mBAAmB,GAC1B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAuFA"}