syllable-sdk 0.1.0-alpha.26 → 0.1.0-alpha.27
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 +6 -25
- package/lib/config.d.ts +3 -3
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +6 -6
- package/lib/config.js.map +1 -1
- package/models/components/channel.d.ts +3 -0
- package/models/components/channel.d.ts.map +1 -1
- package/models/components/channel.js.map +1 -1
- package/models/components/index.d.ts +0 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -1
- package/models/components/index.js.map +1 -1
- package/models/components/llmconfig.d.ts +34 -3
- package/models/components/llmconfig.d.ts.map +1 -1
- package/models/components/llmconfig.js +26 -4
- package/models/components/llmconfig.js.map +1 -1
- package/models/components/prompt.d.ts +3 -0
- package/models/components/prompt.d.ts.map +1 -1
- package/models/components/prompt.js.map +1 -1
- package/models/components/promptcreate.d.ts +3 -0
- package/models/components/promptcreate.d.ts.map +1 -1
- package/models/components/promptcreate.js.map +1 -1
- package/models/components/promptupdate.d.ts +3 -0
- package/models/components/promptupdate.d.ts.map +1 -1
- package/models/components/promptupdate.js.map +1 -1
- package/models/components/target.d.ts +3 -0
- package/models/components/target.d.ts.map +1 -1
- package/models/components/target.js.map +1 -1
- package/models/components/testmessage.d.ts +2 -0
- package/models/components/testmessage.d.ts.map +1 -1
- package/models/components/testmessage.js +4 -0
- package/models/components/testmessage.js.map +1 -1
- package/package.json +1 -1
- package/sdk/sdk.d.ts +0 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -5
- package/sdk/sdk.js.map +1 -1
- package/src/lib/config.ts +6 -6
- package/src/models/components/channel.ts +3 -0
- package/src/models/components/index.ts +0 -1
- package/src/models/components/llmconfig.ts +36 -9
- package/src/models/components/prompt.ts +3 -0
- package/src/models/components/promptcreate.ts +3 -0
- package/src/models/components/promptupdate.ts +3 -0
- package/src/models/components/target.ts +3 -0
- package/src/models/components/testmessage.ts +6 -0
- package/src/sdk/sdk.ts +0 -6
- package/docs/sdks/v1/README.md +0 -629
- package/funcs/v1AgentGetAvailableVoices.d.ts +0 -15
- package/funcs/v1AgentGetAvailableVoices.d.ts.map +0 -1
- package/funcs/v1AgentGetAvailableVoices.js +0 -87
- package/funcs/v1AgentGetAvailableVoices.js.map +0 -1
- package/funcs/v1Create.d.ts +0 -16
- package/funcs/v1Create.d.ts.map +0 -1
- package/funcs/v1Create.js +0 -100
- package/funcs/v1Create.js.map +0 -1
- package/funcs/v1Delete.d.ts +0 -16
- package/funcs/v1Delete.d.ts.map +0 -1
- package/funcs/v1Delete.js +0 -106
- package/funcs/v1Delete.js.map +0 -1
- package/funcs/v1DirectoryMemberBulkLoad.d.ts +0 -16
- package/funcs/v1DirectoryMemberBulkLoad.d.ts.map +0 -1
- package/funcs/v1DirectoryMemberBulkLoad.js +0 -113
- package/funcs/v1DirectoryMemberBulkLoad.js.map +0 -1
- package/funcs/v1DirectoryMemberDownload.d.ts +0 -14
- package/funcs/v1DirectoryMemberDownload.d.ts.map +0 -1
- package/funcs/v1DirectoryMemberDownload.js +0 -86
- package/funcs/v1DirectoryMemberDownload.js.map +0 -1
- package/funcs/v1GetById.d.ts +0 -17
- package/funcs/v1GetById.d.ts.map +0 -1
- package/funcs/v1GetById.js +0 -106
- package/funcs/v1GetById.js.map +0 -1
- package/funcs/v1List.d.ts +0 -17
- package/funcs/v1List.d.ts.map +0 -1
- package/funcs/v1List.js +0 -112
- package/funcs/v1List.js.map +0 -1
- package/funcs/v1Update.d.ts +0 -17
- package/funcs/v1Update.d.ts.map +0 -1
- package/funcs/v1Update.js +0 -107
- package/funcs/v1Update.js.map +0 -1
- package/models/components/provider.d.ts +0 -34
- package/models/components/provider.d.ts.map +0 -1
- package/models/components/provider.js +0 -54
- package/models/components/provider.js.map +0 -1
- package/sdk/v1.d.ts +0 -62
- package/sdk/v1.d.ts.map +0 -1
- package/sdk/v1.js +0 -92
- package/sdk/v1.js.map +0 -1
- package/src/funcs/v1AgentGetAvailableVoices.ts +0 -109
- package/src/funcs/v1Create.ts +0 -132
- package/src/funcs/v1Delete.ts +0 -140
- package/src/funcs/v1DirectoryMemberBulkLoad.ts +0 -149
- package/src/funcs/v1DirectoryMemberDownload.ts +0 -108
- package/src/funcs/v1GetById.ts +0 -140
- package/src/funcs/v1List.ts +0 -146
- package/src/funcs/v1Update.ts +0 -141
- package/src/models/components/provider.ts +0 -37
- package/src/sdk/v1.ts +0 -150
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { SyllableSDKCore } from "../core.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
-
import { pathToFunc } from "../lib/url.js";
|
|
11
|
-
import {
|
|
12
|
-
ConnectionError,
|
|
13
|
-
InvalidRequestError,
|
|
14
|
-
RequestAbortedError,
|
|
15
|
-
RequestTimeoutError,
|
|
16
|
-
UnexpectedClientError,
|
|
17
|
-
} from "../models/errors/httpclienterrors.js";
|
|
18
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
19
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
20
|
-
import { Result } from "../types/fp.js";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Download Directory Members
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* Download the entire directory as a JSON file.
|
|
27
|
-
*/
|
|
28
|
-
export async function v1DirectoryMemberDownload(
|
|
29
|
-
client: SyllableSDKCore,
|
|
30
|
-
options?: RequestOptions,
|
|
31
|
-
): Promise<
|
|
32
|
-
Result<
|
|
33
|
-
any,
|
|
34
|
-
| SDKError
|
|
35
|
-
| SDKValidationError
|
|
36
|
-
| UnexpectedClientError
|
|
37
|
-
| InvalidRequestError
|
|
38
|
-
| RequestAbortedError
|
|
39
|
-
| RequestTimeoutError
|
|
40
|
-
| ConnectionError
|
|
41
|
-
>
|
|
42
|
-
> {
|
|
43
|
-
const path = pathToFunc("/api/v1/directory_members/download/")();
|
|
44
|
-
|
|
45
|
-
const headers = new Headers({
|
|
46
|
-
Accept: "application/json",
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
50
|
-
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
51
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52
|
-
|
|
53
|
-
const context = {
|
|
54
|
-
operationID: "directory_member_download",
|
|
55
|
-
oAuth2Scopes: [],
|
|
56
|
-
|
|
57
|
-
resolvedSecurity: requestSecurity,
|
|
58
|
-
|
|
59
|
-
securitySource: client._options.apiKeyHeader,
|
|
60
|
-
retryConfig: options?.retries
|
|
61
|
-
|| client._options.retryConfig
|
|
62
|
-
|| { strategy: "none" },
|
|
63
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const requestRes = client._createRequest(context, {
|
|
67
|
-
security: requestSecurity,
|
|
68
|
-
method: "GET",
|
|
69
|
-
baseURL: options?.serverURL,
|
|
70
|
-
path: path,
|
|
71
|
-
headers: headers,
|
|
72
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
73
|
-
}, options);
|
|
74
|
-
if (!requestRes.ok) {
|
|
75
|
-
return requestRes;
|
|
76
|
-
}
|
|
77
|
-
const req = requestRes.value;
|
|
78
|
-
|
|
79
|
-
const doResult = await client._do(req, {
|
|
80
|
-
context,
|
|
81
|
-
errorCodes: ["4XX", "500", "5XX"],
|
|
82
|
-
retryConfig: context.retryConfig,
|
|
83
|
-
retryCodes: context.retryCodes,
|
|
84
|
-
});
|
|
85
|
-
if (!doResult.ok) {
|
|
86
|
-
return doResult;
|
|
87
|
-
}
|
|
88
|
-
const response = doResult.value;
|
|
89
|
-
|
|
90
|
-
const [result] = await M.match<
|
|
91
|
-
any,
|
|
92
|
-
| SDKError
|
|
93
|
-
| SDKValidationError
|
|
94
|
-
| UnexpectedClientError
|
|
95
|
-
| InvalidRequestError
|
|
96
|
-
| RequestAbortedError
|
|
97
|
-
| RequestTimeoutError
|
|
98
|
-
| ConnectionError
|
|
99
|
-
>(
|
|
100
|
-
M.json(200, z.any()),
|
|
101
|
-
M.fail(["4XX", 500, "5XX"]),
|
|
102
|
-
)(response);
|
|
103
|
-
if (!result.ok) {
|
|
104
|
-
return result;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return result;
|
|
108
|
-
}
|
package/src/funcs/v1GetById.ts
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { SyllableSDKCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { safeParse } from "../lib/schemas.js";
|
|
9
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
-
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import * as components from "../models/components/index.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { Result } from "../types/fp.js";
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Get Directory Member By Id
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* Get a DirectoryMember by ID.
|
|
31
|
-
*/
|
|
32
|
-
export async function v1GetById(
|
|
33
|
-
client: SyllableSDKCore,
|
|
34
|
-
request: operations.DirectoryMemberGetByIdRequest,
|
|
35
|
-
options?: RequestOptions,
|
|
36
|
-
): Promise<
|
|
37
|
-
Result<
|
|
38
|
-
components.DirectoryMember,
|
|
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) =>
|
|
52
|
-
operations.DirectoryMemberGetByIdRequest$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 pathParams = {
|
|
62
|
-
member_id: encodeSimple("member_id", payload.member_id, {
|
|
63
|
-
explode: false,
|
|
64
|
-
charEncoding: "percent",
|
|
65
|
-
}),
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const path = pathToFunc("/api/v1/directory_members/{member_id}")(pathParams);
|
|
69
|
-
|
|
70
|
-
const headers = new Headers({
|
|
71
|
-
Accept: "application/json",
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
75
|
-
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
76
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
77
|
-
|
|
78
|
-
const context = {
|
|
79
|
-
operationID: "directory_member_get_by_id",
|
|
80
|
-
oAuth2Scopes: [],
|
|
81
|
-
|
|
82
|
-
resolvedSecurity: requestSecurity,
|
|
83
|
-
|
|
84
|
-
securitySource: client._options.apiKeyHeader,
|
|
85
|
-
retryConfig: options?.retries
|
|
86
|
-
|| client._options.retryConfig
|
|
87
|
-
|| { strategy: "none" },
|
|
88
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const requestRes = client._createRequest(context, {
|
|
92
|
-
security: requestSecurity,
|
|
93
|
-
method: "GET",
|
|
94
|
-
baseURL: options?.serverURL,
|
|
95
|
-
path: path,
|
|
96
|
-
headers: headers,
|
|
97
|
-
body: body,
|
|
98
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
99
|
-
}, options);
|
|
100
|
-
if (!requestRes.ok) {
|
|
101
|
-
return requestRes;
|
|
102
|
-
}
|
|
103
|
-
const req = requestRes.value;
|
|
104
|
-
|
|
105
|
-
const doResult = await client._do(req, {
|
|
106
|
-
context,
|
|
107
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
108
|
-
retryConfig: context.retryConfig,
|
|
109
|
-
retryCodes: context.retryCodes,
|
|
110
|
-
});
|
|
111
|
-
if (!doResult.ok) {
|
|
112
|
-
return doResult;
|
|
113
|
-
}
|
|
114
|
-
const response = doResult.value;
|
|
115
|
-
|
|
116
|
-
const responseFields = {
|
|
117
|
-
HttpMeta: { Response: response, Request: req },
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const [result] = await M.match<
|
|
121
|
-
components.DirectoryMember,
|
|
122
|
-
| errors.HTTPValidationError
|
|
123
|
-
| SDKError
|
|
124
|
-
| SDKValidationError
|
|
125
|
-
| UnexpectedClientError
|
|
126
|
-
| InvalidRequestError
|
|
127
|
-
| RequestAbortedError
|
|
128
|
-
| RequestTimeoutError
|
|
129
|
-
| ConnectionError
|
|
130
|
-
>(
|
|
131
|
-
M.json(200, components.DirectoryMember$inboundSchema),
|
|
132
|
-
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
133
|
-
M.fail(["4XX", "5XX"]),
|
|
134
|
-
)(response, { extraFields: responseFields });
|
|
135
|
-
if (!result.ok) {
|
|
136
|
-
return result;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return result;
|
|
140
|
-
}
|
package/src/funcs/v1List.ts
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
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 { safeParse } from "../lib/schemas.js";
|
|
9
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
-
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import * as components from "../models/components/index.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { Result } from "../types/fp.js";
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Directory Member List
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* List the existing directory_members
|
|
31
|
-
*/
|
|
32
|
-
export async function v1List(
|
|
33
|
-
client: SyllableSDKCore,
|
|
34
|
-
request: operations.DirectoryMemberListRequest,
|
|
35
|
-
options?: RequestOptions,
|
|
36
|
-
): Promise<
|
|
37
|
-
Result<
|
|
38
|
-
components.ListResponseDirectoryMember,
|
|
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) =>
|
|
52
|
-
operations.DirectoryMemberListRequest$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/directory_members/")();
|
|
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({
|
|
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
|
-
operationID: "directory_member_list",
|
|
85
|
-
oAuth2Scopes: [],
|
|
86
|
-
|
|
87
|
-
resolvedSecurity: requestSecurity,
|
|
88
|
-
|
|
89
|
-
securitySource: client._options.apiKeyHeader,
|
|
90
|
-
retryConfig: options?.retries
|
|
91
|
-
|| client._options.retryConfig
|
|
92
|
-
|| { strategy: "none" },
|
|
93
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const requestRes = client._createRequest(context, {
|
|
97
|
-
security: requestSecurity,
|
|
98
|
-
method: "GET",
|
|
99
|
-
baseURL: options?.serverURL,
|
|
100
|
-
path: path,
|
|
101
|
-
headers: headers,
|
|
102
|
-
query: query,
|
|
103
|
-
body: body,
|
|
104
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
105
|
-
}, options);
|
|
106
|
-
if (!requestRes.ok) {
|
|
107
|
-
return requestRes;
|
|
108
|
-
}
|
|
109
|
-
const req = requestRes.value;
|
|
110
|
-
|
|
111
|
-
const doResult = await client._do(req, {
|
|
112
|
-
context,
|
|
113
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
114
|
-
retryConfig: context.retryConfig,
|
|
115
|
-
retryCodes: context.retryCodes,
|
|
116
|
-
});
|
|
117
|
-
if (!doResult.ok) {
|
|
118
|
-
return doResult;
|
|
119
|
-
}
|
|
120
|
-
const response = doResult.value;
|
|
121
|
-
|
|
122
|
-
const responseFields = {
|
|
123
|
-
HttpMeta: { Response: response, Request: req },
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const [result] = await M.match<
|
|
127
|
-
components.ListResponseDirectoryMember,
|
|
128
|
-
| errors.HTTPValidationError
|
|
129
|
-
| SDKError
|
|
130
|
-
| SDKValidationError
|
|
131
|
-
| UnexpectedClientError
|
|
132
|
-
| InvalidRequestError
|
|
133
|
-
| RequestAbortedError
|
|
134
|
-
| RequestTimeoutError
|
|
135
|
-
| ConnectionError
|
|
136
|
-
>(
|
|
137
|
-
M.json(200, components.ListResponseDirectoryMember$inboundSchema),
|
|
138
|
-
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
139
|
-
M.fail(["4XX", "5XX"]),
|
|
140
|
-
)(response, { extraFields: responseFields });
|
|
141
|
-
if (!result.ok) {
|
|
142
|
-
return result;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return result;
|
|
146
|
-
}
|
package/src/funcs/v1Update.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { SyllableSDKCore } from "../core.js";
|
|
6
|
-
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { safeParse } from "../lib/schemas.js";
|
|
9
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
-
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import * as components from "../models/components/index.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { Result } from "../types/fp.js";
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Update Directory Member
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* Update a DirectoryMember.
|
|
31
|
-
*/
|
|
32
|
-
export async function v1Update(
|
|
33
|
-
client: SyllableSDKCore,
|
|
34
|
-
request: operations.DirectoryMemberUpdateRequest,
|
|
35
|
-
options?: RequestOptions,
|
|
36
|
-
): Promise<
|
|
37
|
-
Result<
|
|
38
|
-
components.DirectoryMember,
|
|
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) =>
|
|
52
|
-
operations.DirectoryMemberUpdateRequest$outboundSchema.parse(value),
|
|
53
|
-
"Input validation failed",
|
|
54
|
-
);
|
|
55
|
-
if (!parsed.ok) {
|
|
56
|
-
return parsed;
|
|
57
|
-
}
|
|
58
|
-
const payload = parsed.value;
|
|
59
|
-
const body = encodeJSON("body", payload.DirectoryMember, { explode: true });
|
|
60
|
-
|
|
61
|
-
const pathParams = {
|
|
62
|
-
member_id: encodeSimple("member_id", payload.member_id, {
|
|
63
|
-
explode: false,
|
|
64
|
-
charEncoding: "percent",
|
|
65
|
-
}),
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const path = pathToFunc("/api/v1/directory_members/{member_id}")(pathParams);
|
|
69
|
-
|
|
70
|
-
const headers = new Headers({
|
|
71
|
-
"Content-Type": "application/json",
|
|
72
|
-
Accept: "application/json",
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
76
|
-
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
77
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
78
|
-
|
|
79
|
-
const context = {
|
|
80
|
-
operationID: "directory_member_update",
|
|
81
|
-
oAuth2Scopes: [],
|
|
82
|
-
|
|
83
|
-
resolvedSecurity: requestSecurity,
|
|
84
|
-
|
|
85
|
-
securitySource: client._options.apiKeyHeader,
|
|
86
|
-
retryConfig: options?.retries
|
|
87
|
-
|| client._options.retryConfig
|
|
88
|
-
|| { strategy: "none" },
|
|
89
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
const requestRes = client._createRequest(context, {
|
|
93
|
-
security: requestSecurity,
|
|
94
|
-
method: "PUT",
|
|
95
|
-
baseURL: options?.serverURL,
|
|
96
|
-
path: path,
|
|
97
|
-
headers: headers,
|
|
98
|
-
body: body,
|
|
99
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
100
|
-
}, options);
|
|
101
|
-
if (!requestRes.ok) {
|
|
102
|
-
return requestRes;
|
|
103
|
-
}
|
|
104
|
-
const req = requestRes.value;
|
|
105
|
-
|
|
106
|
-
const doResult = await client._do(req, {
|
|
107
|
-
context,
|
|
108
|
-
errorCodes: ["400", "404", "412", "422", "4XX", "500", "5XX"],
|
|
109
|
-
retryConfig: context.retryConfig,
|
|
110
|
-
retryCodes: context.retryCodes,
|
|
111
|
-
});
|
|
112
|
-
if (!doResult.ok) {
|
|
113
|
-
return doResult;
|
|
114
|
-
}
|
|
115
|
-
const response = doResult.value;
|
|
116
|
-
|
|
117
|
-
const responseFields = {
|
|
118
|
-
HttpMeta: { Response: response, Request: req },
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
const [result] = await M.match<
|
|
122
|
-
components.DirectoryMember,
|
|
123
|
-
| errors.HTTPValidationError
|
|
124
|
-
| SDKError
|
|
125
|
-
| SDKValidationError
|
|
126
|
-
| UnexpectedClientError
|
|
127
|
-
| InvalidRequestError
|
|
128
|
-
| RequestAbortedError
|
|
129
|
-
| RequestTimeoutError
|
|
130
|
-
| ConnectionError
|
|
131
|
-
>(
|
|
132
|
-
M.json(200, components.DirectoryMember$inboundSchema),
|
|
133
|
-
M.fail([400, 404, 412, "4XX", 500, "5XX"]),
|
|
134
|
-
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
135
|
-
)(response, { extraFields: responseFields });
|
|
136
|
-
if (!result.ok) {
|
|
137
|
-
return result;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return result;
|
|
141
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* LLM API provider.
|
|
10
|
-
*/
|
|
11
|
-
export const Provider = {
|
|
12
|
-
AzureOpenai: "azure_openai",
|
|
13
|
-
Openai: "openai",
|
|
14
|
-
} as const;
|
|
15
|
-
/**
|
|
16
|
-
* LLM API provider.
|
|
17
|
-
*/
|
|
18
|
-
export type Provider = ClosedEnum<typeof Provider>;
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
|
|
22
|
-
.nativeEnum(Provider);
|
|
23
|
-
|
|
24
|
-
/** @internal */
|
|
25
|
-
export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
|
|
26
|
-
Provider$inboundSchema;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @internal
|
|
30
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
31
|
-
*/
|
|
32
|
-
export namespace Provider$ {
|
|
33
|
-
/** @deprecated use `Provider$inboundSchema` instead. */
|
|
34
|
-
export const inboundSchema = Provider$inboundSchema;
|
|
35
|
-
/** @deprecated use `Provider$outboundSchema` instead. */
|
|
36
|
-
export const outboundSchema = Provider$outboundSchema;
|
|
37
|
-
}
|