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.
- package/README.md +13 -0
- package/docs/sdks/agents/README.md +16 -0
- package/docs/sdks/batches/README.md +4 -4
- package/docs/sdks/roles/README.md +445 -0
- package/docs/sdks/takeouts/README.md +1 -1
- package/docs/sdks/workflows/README.md +8 -8
- package/funcs/rolesCreate.d.ts +16 -0
- package/funcs/rolesCreate.d.ts.map +1 -0
- package/funcs/rolesCreate.js +102 -0
- package/funcs/rolesCreate.js.map +1 -0
- package/funcs/rolesDelete.d.ts +16 -0
- package/funcs/rolesDelete.d.ts.map +1 -0
- package/funcs/rolesDelete.js +112 -0
- package/funcs/rolesDelete.js.map +1 -0
- package/funcs/rolesGetById.d.ts +17 -0
- package/funcs/rolesGetById.d.ts.map +1 -0
- package/funcs/rolesGetById.js +108 -0
- package/funcs/rolesGetById.js.map +1 -0
- package/funcs/rolesList.d.ts +17 -0
- package/funcs/rolesList.d.ts.map +1 -0
- package/funcs/rolesList.js +114 -0
- package/funcs/rolesList.js.map +1 -0
- package/funcs/rolesUpdate.d.ts +16 -0
- package/funcs/rolesUpdate.d.ts.map +1 -0
- package/funcs/rolesUpdate.js +102 -0
- package/funcs/rolesUpdate.js.map +1 -0
- package/funcs/takeoutsTakeoutsGetFile.d.ts +1 -1
- package/funcs/takeoutsTakeoutsGetFile.d.ts.map +1 -1
- package/funcs/takeoutsTakeoutsGetFile.js +3 -1
- package/funcs/takeoutsTakeoutsGetFile.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/agentcreate.d.ts +8 -1
- package/models/components/agentcreate.d.ts.map +1 -1
- package/models/components/agentcreate.js +2 -0
- package/models/components/agentcreate.js.map +1 -1
- package/models/components/agentproperties.d.ts +3 -0
- package/models/components/agentproperties.d.ts.map +1 -1
- package/models/components/agentproperties.js +1 -0
- package/models/components/agentproperties.js.map +1 -1
- package/models/components/agentresponse.d.ts +8 -1
- package/models/components/agentresponse.d.ts.map +1 -1
- package/models/components/agentresponse.js +2 -0
- package/models/components/agentresponse.js.map +1 -1
- package/models/components/agentupdate.d.ts +8 -1
- package/models/components/agentupdate.d.ts.map +1 -1
- package/models/components/agentupdate.js +2 -0
- package/models/components/agentupdate.js.map +1 -1
- package/models/components/index.d.ts +5 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -1
- package/models/components/index.js.map +1 -1
- package/models/components/listresponseroleresponse.d.ts +53 -0
- package/models/components/listresponseroleresponse.d.ts.map +1 -0
- package/models/components/listresponseroleresponse.js +81 -0
- package/models/components/listresponseroleresponse.js.map +1 -0
- package/models/components/permissionresponse.d.ts +4 -2
- package/models/components/permissionresponse.d.ts.map +1 -1
- package/models/components/permissionresponse.js +2 -3
- package/models/components/permissionresponse.js.map +1 -1
- package/models/components/rolecreaterequest.d.ts +45 -0
- package/models/components/rolecreaterequest.d.ts.map +1 -0
- package/models/components/rolecreaterequest.js +63 -0
- package/models/components/rolecreaterequest.js.map +1 -0
- package/models/components/roleproperties.d.ts +40 -0
- package/models/components/roleproperties.d.ts.map +1 -0
- package/models/components/roleproperties.js +55 -0
- package/models/components/roleproperties.js.map +1 -0
- package/models/components/roleresponse.d.ts +70 -0
- package/models/components/roleresponse.d.ts.map +1 -0
- package/models/components/roleresponse.js +88 -0
- package/models/components/roleresponse.js.map +1 -0
- package/models/components/roleupdaterequest.d.ts +55 -0
- package/models/components/roleupdaterequest.d.ts.map +1 -0
- package/models/components/roleupdaterequest.js +76 -0
- package/models/components/roleupdaterequest.js.map +1 -0
- package/models/components/tooldetailresponse.d.ts +1 -1
- package/models/components/toolresponse.d.ts +1 -1
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/rolesdelete.d.ts +31 -0
- package/models/operations/rolesdelete.d.ts.map +1 -0
- package/models/operations/rolesdelete.js +70 -0
- package/models/operations/rolesdelete.js.map +1 -0
- package/models/operations/rolesgetbyid.d.ts +29 -0
- package/models/operations/rolesgetbyid.d.ts.map +1 -0
- package/models/operations/rolesgetbyid.js +68 -0
- package/models/operations/rolesgetbyid.js.map +1 -0
- package/models/operations/roleslist.d.ts +73 -0
- package/models/operations/roleslist.d.ts.map +1 -0
- package/models/operations/roleslist.js +99 -0
- package/models/operations/roleslist.js.map +1 -0
- package/openapi.json +826 -108
- package/package.json +1 -1
- package/sdk/roles.d.ts +41 -0
- package/sdk/roles.d.ts.map +1 -0
- package/sdk/roles.js +62 -0
- package/sdk/roles.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/takeouts.d.ts +1 -1
- package/sdk/takeouts.d.ts.map +1 -1
- package/src/funcs/rolesCreate.ts +135 -0
- package/src/funcs/rolesDelete.ts +147 -0
- package/src/funcs/rolesGetById.ts +142 -0
- package/src/funcs/rolesList.ts +148 -0
- package/src/funcs/rolesUpdate.ts +135 -0
- package/src/funcs/takeoutsTakeoutsGetFile.ts +5 -3
- package/src/lib/config.ts +2 -2
- package/src/models/components/agentcreate.ts +10 -1
- package/src/models/components/agentproperties.ts +1 -0
- package/src/models/components/agentresponse.ts +10 -1
- package/src/models/components/agentupdate.ts +10 -1
- package/src/models/components/index.ts +5 -1
- package/src/models/components/listresponseroleresponse.ts +116 -0
- package/src/models/components/permissionresponse.ts +6 -8
- package/src/models/components/rolecreaterequest.ts +86 -0
- package/src/models/components/roleproperties.ts +41 -0
- package/src/models/components/roleresponse.ts +134 -0
- package/src/models/components/roleupdaterequest.ts +109 -0
- package/src/models/components/tooldetailresponse.ts +1 -1
- package/src/models/components/toolresponse.ts +1 -1
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/rolesdelete.ts +79 -0
- package/src/models/operations/rolesgetbyid.ts +75 -0
- package/src/models/operations/roleslist.ts +149 -0
- package/src/sdk/roles.ts +100 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/takeouts.ts +1 -1
- package/models/components/permissions.d.ts +0 -199
- package/models/components/permissions.d.ts.map +0 -1
- package/models/components/permissions.js +0 -108
- package/models/components/permissions.js.map +0 -1
- package/src/models/components/permissions.ts +0 -88
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SyllableSDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { Result } from "../types/fp.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* List Roles
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* List the existing roles.
|
|
32
|
+
*/
|
|
33
|
+
export async function rolesList(
|
|
34
|
+
client: SyllableSDKCore,
|
|
35
|
+
request: operations.RolesListRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): Promise<
|
|
38
|
+
Result<
|
|
39
|
+
components.ListResponseRoleResponse,
|
|
40
|
+
| errors.HTTPValidationError
|
|
41
|
+
| SDKError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
const parsed = safeParse(
|
|
51
|
+
request,
|
|
52
|
+
(value) => operations.RolesListRequest$outboundSchema.parse(value),
|
|
53
|
+
"Input validation failed",
|
|
54
|
+
);
|
|
55
|
+
if (!parsed.ok) {
|
|
56
|
+
return parsed;
|
|
57
|
+
}
|
|
58
|
+
const payload = parsed.value;
|
|
59
|
+
const body = null;
|
|
60
|
+
|
|
61
|
+
const path = pathToFunc("/api/v1/roles/")();
|
|
62
|
+
|
|
63
|
+
const query = encodeFormQuery({
|
|
64
|
+
"end_datetime": payload.end_datetime,
|
|
65
|
+
"fields": payload.fields,
|
|
66
|
+
"limit": payload.limit,
|
|
67
|
+
"order_by": payload.order_by,
|
|
68
|
+
"order_by_direction": payload.order_by_direction,
|
|
69
|
+
"page": payload.page,
|
|
70
|
+
"search_field_values": payload.search_field_values,
|
|
71
|
+
"search_fields": payload.search_fields,
|
|
72
|
+
"start_datetime": payload.start_datetime,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const headers = new Headers(compactMap({
|
|
76
|
+
Accept: "application/json",
|
|
77
|
+
}));
|
|
78
|
+
|
|
79
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
80
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
81
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
82
|
+
|
|
83
|
+
const context = {
|
|
84
|
+
baseURL: options?.serverURL ?? "",
|
|
85
|
+
operationID: "roles_list",
|
|
86
|
+
oAuth2Scopes: [],
|
|
87
|
+
|
|
88
|
+
resolvedSecurity: requestSecurity,
|
|
89
|
+
|
|
90
|
+
securitySource: client._options.apiKeyHeader,
|
|
91
|
+
retryConfig: options?.retries
|
|
92
|
+
|| client._options.retryConfig
|
|
93
|
+
|| { strategy: "none" },
|
|
94
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const requestRes = client._createRequest(context, {
|
|
98
|
+
security: requestSecurity,
|
|
99
|
+
method: "GET",
|
|
100
|
+
baseURL: options?.serverURL,
|
|
101
|
+
path: path,
|
|
102
|
+
headers: headers,
|
|
103
|
+
query: query,
|
|
104
|
+
body: body,
|
|
105
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
106
|
+
}, options);
|
|
107
|
+
if (!requestRes.ok) {
|
|
108
|
+
return requestRes;
|
|
109
|
+
}
|
|
110
|
+
const req = requestRes.value;
|
|
111
|
+
|
|
112
|
+
const doResult = await client._do(req, {
|
|
113
|
+
context,
|
|
114
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
115
|
+
retryConfig: context.retryConfig,
|
|
116
|
+
retryCodes: context.retryCodes,
|
|
117
|
+
});
|
|
118
|
+
if (!doResult.ok) {
|
|
119
|
+
return doResult;
|
|
120
|
+
}
|
|
121
|
+
const response = doResult.value;
|
|
122
|
+
|
|
123
|
+
const responseFields = {
|
|
124
|
+
HttpMeta: { Response: response, Request: req },
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const [result] = await M.match<
|
|
128
|
+
components.ListResponseRoleResponse,
|
|
129
|
+
| errors.HTTPValidationError
|
|
130
|
+
| SDKError
|
|
131
|
+
| SDKValidationError
|
|
132
|
+
| UnexpectedClientError
|
|
133
|
+
| InvalidRequestError
|
|
134
|
+
| RequestAbortedError
|
|
135
|
+
| RequestTimeoutError
|
|
136
|
+
| ConnectionError
|
|
137
|
+
>(
|
|
138
|
+
M.json(200, components.ListResponseRoleResponse$inboundSchema),
|
|
139
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
140
|
+
M.fail("4XX"),
|
|
141
|
+
M.fail("5XX"),
|
|
142
|
+
)(response, { extraFields: responseFields });
|
|
143
|
+
if (!result.ok) {
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SyllableSDKCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Update Role
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Update an existing role.
|
|
31
|
+
*/
|
|
32
|
+
export async function rolesUpdate(
|
|
33
|
+
client: SyllableSDKCore,
|
|
34
|
+
request: components.RoleUpdateRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): Promise<
|
|
37
|
+
Result<
|
|
38
|
+
components.RoleResponse,
|
|
39
|
+
| errors.HTTPValidationError
|
|
40
|
+
| SDKError
|
|
41
|
+
| SDKValidationError
|
|
42
|
+
| UnexpectedClientError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
>
|
|
48
|
+
> {
|
|
49
|
+
const parsed = safeParse(
|
|
50
|
+
request,
|
|
51
|
+
(value) => components.RoleUpdateRequest$outboundSchema.parse(value),
|
|
52
|
+
"Input validation failed",
|
|
53
|
+
);
|
|
54
|
+
if (!parsed.ok) {
|
|
55
|
+
return parsed;
|
|
56
|
+
}
|
|
57
|
+
const payload = parsed.value;
|
|
58
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
59
|
+
|
|
60
|
+
const path = pathToFunc("/api/v1/roles/")();
|
|
61
|
+
|
|
62
|
+
const headers = new Headers(compactMap({
|
|
63
|
+
"Content-Type": "application/json",
|
|
64
|
+
Accept: "application/json",
|
|
65
|
+
}));
|
|
66
|
+
|
|
67
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
68
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
69
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
70
|
+
|
|
71
|
+
const context = {
|
|
72
|
+
baseURL: options?.serverURL ?? "",
|
|
73
|
+
operationID: "roles_update",
|
|
74
|
+
oAuth2Scopes: [],
|
|
75
|
+
|
|
76
|
+
resolvedSecurity: requestSecurity,
|
|
77
|
+
|
|
78
|
+
securitySource: client._options.apiKeyHeader,
|
|
79
|
+
retryConfig: options?.retries
|
|
80
|
+
|| client._options.retryConfig
|
|
81
|
+
|| { strategy: "none" },
|
|
82
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const requestRes = client._createRequest(context, {
|
|
86
|
+
security: requestSecurity,
|
|
87
|
+
method: "PUT",
|
|
88
|
+
baseURL: options?.serverURL,
|
|
89
|
+
path: path,
|
|
90
|
+
headers: headers,
|
|
91
|
+
body: body,
|
|
92
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
93
|
+
}, options);
|
|
94
|
+
if (!requestRes.ok) {
|
|
95
|
+
return requestRes;
|
|
96
|
+
}
|
|
97
|
+
const req = requestRes.value;
|
|
98
|
+
|
|
99
|
+
const doResult = await client._do(req, {
|
|
100
|
+
context,
|
|
101
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
102
|
+
retryConfig: context.retryConfig,
|
|
103
|
+
retryCodes: context.retryCodes,
|
|
104
|
+
});
|
|
105
|
+
if (!doResult.ok) {
|
|
106
|
+
return doResult;
|
|
107
|
+
}
|
|
108
|
+
const response = doResult.value;
|
|
109
|
+
|
|
110
|
+
const responseFields = {
|
|
111
|
+
HttpMeta: { Response: response, Request: req },
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const [result] = await M.match<
|
|
115
|
+
components.RoleResponse,
|
|
116
|
+
| errors.HTTPValidationError
|
|
117
|
+
| SDKError
|
|
118
|
+
| SDKValidationError
|
|
119
|
+
| UnexpectedClientError
|
|
120
|
+
| InvalidRequestError
|
|
121
|
+
| RequestAbortedError
|
|
122
|
+
| RequestTimeoutError
|
|
123
|
+
| ConnectionError
|
|
124
|
+
>(
|
|
125
|
+
M.json(200, components.RoleResponse$inboundSchema),
|
|
126
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
127
|
+
M.fail("4XX"),
|
|
128
|
+
M.fail("5XX"),
|
|
129
|
+
)(response, { extraFields: responseFields });
|
|
130
|
+
if (!result.ok) {
|
|
131
|
+
return result;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
@@ -33,7 +33,7 @@ export async function takeoutsTakeoutsGetFile(
|
|
|
33
33
|
options?: RequestOptions,
|
|
34
34
|
): Promise<
|
|
35
35
|
Result<
|
|
36
|
-
|
|
36
|
+
ReadableStream<Uint8Array>,
|
|
37
37
|
| errors.HTTPValidationError
|
|
38
38
|
| SDKError
|
|
39
39
|
| SDKValidationError
|
|
@@ -122,7 +122,7 @@ export async function takeoutsTakeoutsGetFile(
|
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
const [result] = await M.match<
|
|
125
|
-
|
|
125
|
+
ReadableStream<Uint8Array>,
|
|
126
126
|
| errors.HTTPValidationError
|
|
127
127
|
| SDKError
|
|
128
128
|
| SDKValidationError
|
|
@@ -132,7 +132,9 @@ export async function takeoutsTakeoutsGetFile(
|
|
|
132
132
|
| RequestTimeoutError
|
|
133
133
|
| ConnectionError
|
|
134
134
|
>(
|
|
135
|
-
M.
|
|
135
|
+
M.stream(200, z.instanceof(ReadableStream<Uint8Array>), {
|
|
136
|
+
ctype: "application/zip",
|
|
137
|
+
}),
|
|
136
138
|
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
137
139
|
M.fail("4XX"),
|
|
138
140
|
M.fail("5XX"),
|
package/src/lib/config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.2",
|
|
60
|
-
sdkVersion: "0.1.0-alpha.
|
|
60
|
+
sdkVersion: "0.1.0-alpha.168",
|
|
61
61
|
genVersion: "2.512.4",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
63
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.168 2.512.4 0.0.2 syllable-sdk",
|
|
64
64
|
} as const;
|
|
@@ -37,9 +37,15 @@ export type AgentCreate = {
|
|
|
37
37
|
*/
|
|
38
38
|
description?: string | null | undefined;
|
|
39
39
|
/**
|
|
40
|
-
* The agent label
|
|
40
|
+
* The agent label (DEPRECATED - use labels instead.)
|
|
41
|
+
*
|
|
42
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
41
43
|
*/
|
|
42
44
|
label?: string | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The agent labels
|
|
47
|
+
*/
|
|
48
|
+
labels?: Array<string> | null | undefined;
|
|
43
49
|
/**
|
|
44
50
|
* The agent type. Must be "ca_v1" currently.
|
|
45
51
|
*/
|
|
@@ -101,6 +107,7 @@ export const AgentCreate$inboundSchema: z.ZodType<
|
|
|
101
107
|
name: z.string(),
|
|
102
108
|
description: z.nullable(z.string()).optional(),
|
|
103
109
|
label: z.nullable(z.string()).optional(),
|
|
110
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
104
111
|
type: z.string(),
|
|
105
112
|
prompt_id: z.number().int(),
|
|
106
113
|
custom_message_id: z.number().int(),
|
|
@@ -131,6 +138,7 @@ export type AgentCreate$Outbound = {
|
|
|
131
138
|
name: string;
|
|
132
139
|
description?: string | null | undefined;
|
|
133
140
|
label?: string | null | undefined;
|
|
141
|
+
labels?: Array<string> | null | undefined;
|
|
134
142
|
type: string;
|
|
135
143
|
prompt_id: number;
|
|
136
144
|
custom_message_id: number;
|
|
@@ -154,6 +162,7 @@ export const AgentCreate$outboundSchema: z.ZodType<
|
|
|
154
162
|
name: z.string(),
|
|
155
163
|
description: z.nullable(z.string()).optional(),
|
|
156
164
|
label: z.nullable(z.string()).optional(),
|
|
165
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
157
166
|
type: z.string(),
|
|
158
167
|
promptId: z.number().int(),
|
|
159
168
|
customMessageId: z.number().int(),
|
|
@@ -63,9 +63,15 @@ export type AgentResponse = {
|
|
|
63
63
|
*/
|
|
64
64
|
description?: string | null | undefined;
|
|
65
65
|
/**
|
|
66
|
-
* The agent label
|
|
66
|
+
* The agent label (DEPRECATED - use labels instead.)
|
|
67
|
+
*
|
|
68
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
67
69
|
*/
|
|
68
70
|
label?: string | null | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* The agent labels
|
|
73
|
+
*/
|
|
74
|
+
labels?: Array<string> | null | undefined;
|
|
69
75
|
/**
|
|
70
76
|
* The agent type. Must be "ca_v1" currently.
|
|
71
77
|
*/
|
|
@@ -159,6 +165,7 @@ export const AgentResponse$inboundSchema: z.ZodType<
|
|
|
159
165
|
name: z.string(),
|
|
160
166
|
description: z.nullable(z.string()).optional(),
|
|
161
167
|
label: z.nullable(z.string()).optional(),
|
|
168
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
162
169
|
type: z.string(),
|
|
163
170
|
prompt_id: z.number().int(),
|
|
164
171
|
custom_message_id: z.number().int(),
|
|
@@ -204,6 +211,7 @@ export type AgentResponse$Outbound = {
|
|
|
204
211
|
name: string;
|
|
205
212
|
description?: string | null | undefined;
|
|
206
213
|
label?: string | null | undefined;
|
|
214
|
+
labels?: Array<string> | null | undefined;
|
|
207
215
|
type: string;
|
|
208
216
|
prompt_id: number;
|
|
209
217
|
custom_message_id: number;
|
|
@@ -235,6 +243,7 @@ export const AgentResponse$outboundSchema: z.ZodType<
|
|
|
235
243
|
name: z.string(),
|
|
236
244
|
description: z.nullable(z.string()).optional(),
|
|
237
245
|
label: z.nullable(z.string()).optional(),
|
|
246
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
238
247
|
type: z.string(),
|
|
239
248
|
promptId: z.number().int(),
|
|
240
249
|
customMessageId: z.number().int(),
|
|
@@ -37,9 +37,15 @@ export type AgentUpdate = {
|
|
|
37
37
|
*/
|
|
38
38
|
description?: string | null | undefined;
|
|
39
39
|
/**
|
|
40
|
-
* The agent label
|
|
40
|
+
* The agent label (DEPRECATED - use labels instead.)
|
|
41
|
+
*
|
|
42
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
41
43
|
*/
|
|
42
44
|
label?: string | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The agent labels
|
|
47
|
+
*/
|
|
48
|
+
labels?: Array<string> | null | undefined;
|
|
43
49
|
/**
|
|
44
50
|
* The agent type. Must be "ca_v1" currently.
|
|
45
51
|
*/
|
|
@@ -105,6 +111,7 @@ export const AgentUpdate$inboundSchema: z.ZodType<
|
|
|
105
111
|
name: z.string(),
|
|
106
112
|
description: z.nullable(z.string()).optional(),
|
|
107
113
|
label: z.nullable(z.string()).optional(),
|
|
114
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
108
115
|
type: z.string(),
|
|
109
116
|
prompt_id: z.number().int(),
|
|
110
117
|
custom_message_id: z.number().int(),
|
|
@@ -136,6 +143,7 @@ export type AgentUpdate$Outbound = {
|
|
|
136
143
|
name: string;
|
|
137
144
|
description?: string | null | undefined;
|
|
138
145
|
label?: string | null | undefined;
|
|
146
|
+
labels?: Array<string> | null | undefined;
|
|
139
147
|
type: string;
|
|
140
148
|
prompt_id: number;
|
|
141
149
|
custom_message_id: number;
|
|
@@ -160,6 +168,7 @@ export const AgentUpdate$outboundSchema: z.ZodType<
|
|
|
160
168
|
name: z.string(),
|
|
161
169
|
description: z.nullable(z.string()).optional(),
|
|
162
170
|
label: z.nullable(z.string()).optional(),
|
|
171
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
163
172
|
type: z.string(),
|
|
164
173
|
promptId: z.number().int(),
|
|
165
174
|
customMessageId: z.number().int(),
|
|
@@ -118,6 +118,7 @@ export * from "./listresponseinsightworkflowoutput.js";
|
|
|
118
118
|
export * from "./listresponselanguagegroupresponse.js";
|
|
119
119
|
export * from "./listresponseoutboundcampaign.js";
|
|
120
120
|
export * from "./listresponsepromptresponse.js";
|
|
121
|
+
export * from "./listresponseroleresponse.js";
|
|
121
122
|
export * from "./listresponseserviceresponse.js";
|
|
122
123
|
export * from "./listresponsesession.js";
|
|
123
124
|
export * from "./listresponsesessionlabel.js";
|
|
@@ -126,7 +127,6 @@ export * from "./orderbydirection.js";
|
|
|
126
127
|
export * from "./outboundcampaign.js";
|
|
127
128
|
export * from "./outboundcampaigninput.js";
|
|
128
129
|
export * from "./permissionresponse.js";
|
|
129
|
-
export * from "./permissions.js";
|
|
130
130
|
export * from "./promptcreaterequest.js";
|
|
131
131
|
export * from "./prompthistory.js";
|
|
132
132
|
export * from "./promptllmconfig.js";
|
|
@@ -135,6 +135,10 @@ export * from "./promptproperties.js";
|
|
|
135
135
|
export * from "./promptresponse.js";
|
|
136
136
|
export * from "./promptupdaterequest.js";
|
|
137
137
|
export * from "./requeststatus.js";
|
|
138
|
+
export * from "./rolecreaterequest.js";
|
|
139
|
+
export * from "./roleproperties.js";
|
|
140
|
+
export * from "./roleresponse.js";
|
|
141
|
+
export * from "./roleupdaterequest.js";
|
|
138
142
|
export * from "./security.js";
|
|
139
143
|
export * from "./servicecreaterequest.js";
|
|
140
144
|
export * from "./serviceproperties.js";
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
RoleResponse,
|
|
12
|
+
RoleResponse$inboundSchema,
|
|
13
|
+
RoleResponse$Outbound,
|
|
14
|
+
RoleResponse$outboundSchema,
|
|
15
|
+
} from "./roleresponse.js";
|
|
16
|
+
|
|
17
|
+
export type ListResponseRoleResponse = {
|
|
18
|
+
/**
|
|
19
|
+
* List of items returned from the query
|
|
20
|
+
*/
|
|
21
|
+
items: Array<RoleResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* The page number of the results (0-based)
|
|
24
|
+
*/
|
|
25
|
+
page: number;
|
|
26
|
+
/**
|
|
27
|
+
* The number of items returned per page
|
|
28
|
+
*/
|
|
29
|
+
pageSize: number;
|
|
30
|
+
/**
|
|
31
|
+
* The total number of pages of results given the indicated page size
|
|
32
|
+
*/
|
|
33
|
+
totalPages?: number | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The total number of items returned from the query
|
|
36
|
+
*/
|
|
37
|
+
totalCount?: number | null | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ListResponseRoleResponse$inboundSchema: z.ZodType<
|
|
42
|
+
ListResponseRoleResponse,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
items: z.array(RoleResponse$inboundSchema),
|
|
47
|
+
page: z.number().int(),
|
|
48
|
+
page_size: z.number().int(),
|
|
49
|
+
total_pages: z.nullable(z.number().int()).optional(),
|
|
50
|
+
total_count: z.nullable(z.number().int()).optional(),
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
"page_size": "pageSize",
|
|
54
|
+
"total_pages": "totalPages",
|
|
55
|
+
"total_count": "totalCount",
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type ListResponseRoleResponse$Outbound = {
|
|
61
|
+
items: Array<RoleResponse$Outbound>;
|
|
62
|
+
page: number;
|
|
63
|
+
page_size: number;
|
|
64
|
+
total_pages?: number | null | undefined;
|
|
65
|
+
total_count?: number | null | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const ListResponseRoleResponse$outboundSchema: z.ZodType<
|
|
70
|
+
ListResponseRoleResponse$Outbound,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
ListResponseRoleResponse
|
|
73
|
+
> = z.object({
|
|
74
|
+
items: z.array(RoleResponse$outboundSchema),
|
|
75
|
+
page: z.number().int(),
|
|
76
|
+
pageSize: z.number().int(),
|
|
77
|
+
totalPages: z.nullable(z.number().int()).optional(),
|
|
78
|
+
totalCount: z.nullable(z.number().int()).optional(),
|
|
79
|
+
}).transform((v) => {
|
|
80
|
+
return remap$(v, {
|
|
81
|
+
pageSize: "page_size",
|
|
82
|
+
totalPages: "total_pages",
|
|
83
|
+
totalCount: "total_count",
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
90
|
+
*/
|
|
91
|
+
export namespace ListResponseRoleResponse$ {
|
|
92
|
+
/** @deprecated use `ListResponseRoleResponse$inboundSchema` instead. */
|
|
93
|
+
export const inboundSchema = ListResponseRoleResponse$inboundSchema;
|
|
94
|
+
/** @deprecated use `ListResponseRoleResponse$outboundSchema` instead. */
|
|
95
|
+
export const outboundSchema = ListResponseRoleResponse$outboundSchema;
|
|
96
|
+
/** @deprecated use `ListResponseRoleResponse$Outbound` instead. */
|
|
97
|
+
export type Outbound = ListResponseRoleResponse$Outbound;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function listResponseRoleResponseToJSON(
|
|
101
|
+
listResponseRoleResponse: ListResponseRoleResponse,
|
|
102
|
+
): string {
|
|
103
|
+
return JSON.stringify(
|
|
104
|
+
ListResponseRoleResponse$outboundSchema.parse(listResponseRoleResponse),
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function listResponseRoleResponseFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<ListResponseRoleResponse, SDKValidationError> {
|
|
111
|
+
return safeParse(
|
|
112
|
+
jsonString,
|
|
113
|
+
(x) => ListResponseRoleResponse$inboundSchema.parse(JSON.parse(x)),
|
|
114
|
+
`Failed to parse 'ListResponseRoleResponse' from JSON`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -6,17 +6,15 @@ import * as z from "zod";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
import {
|
|
10
|
-
Permissions,
|
|
11
|
-
Permissions$inboundSchema,
|
|
12
|
-
Permissions$outboundSchema,
|
|
13
|
-
} from "./permissions.js";
|
|
14
9
|
|
|
15
10
|
/**
|
|
16
11
|
* Information about a permission.
|
|
17
12
|
*/
|
|
18
13
|
export type PermissionResponse = {
|
|
19
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Name of the permission
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
20
18
|
/**
|
|
21
19
|
* Description of the permission
|
|
22
20
|
*/
|
|
@@ -29,7 +27,7 @@ export const PermissionResponse$inboundSchema: z.ZodType<
|
|
|
29
27
|
z.ZodTypeDef,
|
|
30
28
|
unknown
|
|
31
29
|
> = z.object({
|
|
32
|
-
name:
|
|
30
|
+
name: z.string(),
|
|
33
31
|
description: z.string(),
|
|
34
32
|
});
|
|
35
33
|
|
|
@@ -45,7 +43,7 @@ export const PermissionResponse$outboundSchema: z.ZodType<
|
|
|
45
43
|
z.ZodTypeDef,
|
|
46
44
|
PermissionResponse
|
|
47
45
|
> = z.object({
|
|
48
|
-
name:
|
|
46
|
+
name: z.string(),
|
|
49
47
|
description: z.string(),
|
|
50
48
|
});
|
|
51
49
|
|