syllable-sdk 1.0.16-rc.7 → 1.0.16-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +663 -548
- package/bin/mcp-server.js.map +21 -18
- package/examples/package-lock.json +1 -1
- package/funcs/directoryCreate.d.ts +2 -1
- package/funcs/directoryCreate.d.ts.map +1 -1
- package/funcs/directoryCreate.js +9 -2
- package/funcs/directoryCreate.js.map +1 -1
- package/funcs/directoryDirectoryMemberDownload.d.ts +3 -1
- package/funcs/directoryDirectoryMemberDownload.d.ts.map +1 -1
- package/funcs/directoryDirectoryMemberDownload.js +23 -5
- package/funcs/directoryDirectoryMemberDownload.js.map +1 -1
- package/funcs/directoryGetById.js +4 -0
- package/funcs/directoryGetById.js.map +1 -1
- package/funcs/directoryList.js +1 -0
- package/funcs/directoryList.js.map +1 -1
- package/funcs/directoryUpdate.js +4 -0
- package/funcs/directoryUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/tools/directoryCreate.d.ts +2 -2
- package/mcp-server/tools/directoryCreate.js +2 -2
- package/mcp-server/tools/directoryCreate.js.map +1 -1
- package/mcp-server/tools/directoryDirectoryMemberDownload.d.ts +6 -1
- package/mcp-server/tools/directoryDirectoryMemberDownload.d.ts.map +1 -1
- package/mcp-server/tools/directoryDirectoryMemberDownload.js +40 -2
- package/mcp-server/tools/directoryDirectoryMemberDownload.js.map +1 -1
- package/models/components/directoryresponseformat.d.ts +18 -0
- package/models/components/directoryresponseformat.d.ts.map +1 -0
- package/models/components/directoryresponseformat.js +52 -0
- package/models/components/directoryresponseformat.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/directorymembercreate.d.ts +23 -0
- package/models/operations/directorymembercreate.d.ts.map +1 -0
- package/models/operations/directorymembercreate.js +72 -0
- package/models/operations/directorymembercreate.js.map +1 -0
- package/models/operations/directorymemberdownload.d.ts +21 -0
- package/models/operations/directorymemberdownload.d.ts.map +1 -0
- package/models/operations/directorymemberdownload.js +68 -0
- package/models/operations/directorymemberdownload.js.map +1 -0
- package/models/operations/directorymembergetbyid.d.ts +6 -0
- package/models/operations/directorymembergetbyid.d.ts.map +1 -1
- package/models/operations/directorymembergetbyid.js +5 -0
- package/models/operations/directorymembergetbyid.js.map +1 -1
- package/models/operations/directorymemberlist.d.ts +14 -9
- package/models/operations/directorymemberlist.d.ts.map +1 -1
- package/models/operations/directorymemberlist.js +4 -0
- package/models/operations/directorymemberlist.js.map +1 -1
- package/models/operations/directorymemberupdate.d.ts +5 -0
- package/models/operations/directorymemberupdate.d.ts.map +1 -1
- package/models/operations/directorymemberupdate.js +4 -0
- package/models/operations/directorymemberupdate.js.map +1 -1
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/openapi.json +136 -79
- package/package.json +1 -1
- package/sdk/directory.d.ts +2 -2
- package/sdk/directory.d.ts.map +1 -1
- package/sdk/directory.js +2 -2
- package/sdk/directory.js.map +1 -1
- package/src/funcs/directoryCreate.ts +14 -5
- package/src/funcs/directoryDirectoryMemberDownload.ts +35 -2
- package/src/funcs/directoryGetById.ts +6 -1
- package/src/funcs/directoryList.ts +1 -0
- package/src/funcs/directoryUpdate.ts +6 -1
- package/src/lib/config.ts +4 -4
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/directoryCreate.ts +2 -2
- package/src/mcp-server/tools/directoryDirectoryMemberDownload.ts +11 -2
- package/src/models/components/directoryresponseformat.ts +29 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/directorymembercreate.ts +72 -0
- package/src/models/operations/directorymemberdownload.ts +66 -0
- package/src/models/operations/directorymembergetbyid.ts +10 -0
- package/src/models/operations/directorymemberlist.ts +18 -9
- package/src/models/operations/directorymemberupdate.ts +9 -0
- package/src/models/operations/index.ts +2 -0
- package/src/sdk/directory.ts +3 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { SyllableSDKCore } from "../core.js";
|
|
6
|
-
import { encodeJSON } from "../lib/encodings.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
22
22
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
24
|
import { SyllableSDKError } from "../models/errors/syllablesdkerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
25
26
|
import { APICall, APIPromise } from "../types/async.js";
|
|
26
27
|
import { Result } from "../types/fp.js";
|
|
27
28
|
|
|
@@ -33,7 +34,7 @@ import { Result } from "../types/fp.js";
|
|
|
33
34
|
*/
|
|
34
35
|
export function directoryCreate(
|
|
35
36
|
client: SyllableSDKCore,
|
|
36
|
-
request:
|
|
37
|
+
request: operations.DirectoryMemberCreateRequest,
|
|
37
38
|
options?: RequestOptions,
|
|
38
39
|
): APIPromise<
|
|
39
40
|
Result<
|
|
@@ -58,7 +59,7 @@ export function directoryCreate(
|
|
|
58
59
|
|
|
59
60
|
async function $do(
|
|
60
61
|
client: SyllableSDKCore,
|
|
61
|
-
request:
|
|
62
|
+
request: operations.DirectoryMemberCreateRequest,
|
|
62
63
|
options?: RequestOptions,
|
|
63
64
|
): Promise<
|
|
64
65
|
[
|
|
@@ -79,17 +80,24 @@ async function $do(
|
|
|
79
80
|
> {
|
|
80
81
|
const parsed = safeParse(
|
|
81
82
|
request,
|
|
82
|
-
(value) =>
|
|
83
|
+
(value) =>
|
|
84
|
+
operations.DirectoryMemberCreateRequest$outboundSchema.parse(value),
|
|
83
85
|
"Input validation failed",
|
|
84
86
|
);
|
|
85
87
|
if (!parsed.ok) {
|
|
86
88
|
return [parsed, { status: "invalid" }];
|
|
87
89
|
}
|
|
88
90
|
const payload = parsed.value;
|
|
89
|
-
const body = encodeJSON("body", payload, {
|
|
91
|
+
const body = encodeJSON("body", payload.DirectoryMemberCreate, {
|
|
92
|
+
explode: true,
|
|
93
|
+
});
|
|
90
94
|
|
|
91
95
|
const path = pathToFunc("/api/v1/directory_members/")();
|
|
92
96
|
|
|
97
|
+
const query = encodeFormQuery({
|
|
98
|
+
"response_format": payload.response_format,
|
|
99
|
+
});
|
|
100
|
+
|
|
93
101
|
const headers = new Headers(compactMap({
|
|
94
102
|
"Content-Type": "application/json",
|
|
95
103
|
Accept: "application/json",
|
|
@@ -120,6 +128,7 @@ async function $do(
|
|
|
120
128
|
baseURL: options?.serverURL,
|
|
121
129
|
path: path,
|
|
122
130
|
headers: headers,
|
|
131
|
+
query: query,
|
|
123
132
|
body: body,
|
|
124
133
|
userAgent: client._options.userAgent,
|
|
125
134
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { SyllableSDKCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
11
|
import { RequestOptions } from "../lib/sdks.js";
|
|
10
12
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
13
|
import { pathToFunc } from "../lib/url.js";
|
|
@@ -16,9 +18,11 @@ import {
|
|
|
16
18
|
RequestTimeoutError,
|
|
17
19
|
UnexpectedClientError,
|
|
18
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
19
22
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
24
|
import { SyllableSDKError } from "../models/errors/syllablesdkerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
22
26
|
import { APICall, APIPromise } from "../types/async.js";
|
|
23
27
|
import { Result } from "../types/fp.js";
|
|
24
28
|
|
|
@@ -30,10 +34,12 @@ import { Result } from "../types/fp.js";
|
|
|
30
34
|
*/
|
|
31
35
|
export function directoryDirectoryMemberDownload(
|
|
32
36
|
client: SyllableSDKCore,
|
|
37
|
+
request: operations.DirectoryMemberDownloadRequest,
|
|
33
38
|
options?: RequestOptions,
|
|
34
39
|
): APIPromise<
|
|
35
40
|
Result<
|
|
36
41
|
any,
|
|
42
|
+
| errors.HTTPValidationError
|
|
37
43
|
| SyllableSDKError
|
|
38
44
|
| ResponseValidationError
|
|
39
45
|
| ConnectionError
|
|
@@ -46,17 +52,20 @@ export function directoryDirectoryMemberDownload(
|
|
|
46
52
|
> {
|
|
47
53
|
return new APIPromise($do(
|
|
48
54
|
client,
|
|
55
|
+
request,
|
|
49
56
|
options,
|
|
50
57
|
));
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
async function $do(
|
|
54
61
|
client: SyllableSDKCore,
|
|
62
|
+
request: operations.DirectoryMemberDownloadRequest,
|
|
55
63
|
options?: RequestOptions,
|
|
56
64
|
): Promise<
|
|
57
65
|
[
|
|
58
66
|
Result<
|
|
59
67
|
any,
|
|
68
|
+
| errors.HTTPValidationError
|
|
60
69
|
| SyllableSDKError
|
|
61
70
|
| ResponseValidationError
|
|
62
71
|
| ConnectionError
|
|
@@ -69,8 +78,24 @@ async function $do(
|
|
|
69
78
|
APICall,
|
|
70
79
|
]
|
|
71
80
|
> {
|
|
81
|
+
const parsed = safeParse(
|
|
82
|
+
request,
|
|
83
|
+
(value) =>
|
|
84
|
+
operations.DirectoryMemberDownloadRequest$outboundSchema.parse(value),
|
|
85
|
+
"Input validation failed",
|
|
86
|
+
);
|
|
87
|
+
if (!parsed.ok) {
|
|
88
|
+
return [parsed, { status: "invalid" }];
|
|
89
|
+
}
|
|
90
|
+
const payload = parsed.value;
|
|
91
|
+
const body = null;
|
|
92
|
+
|
|
72
93
|
const path = pathToFunc("/api/v1/directory_members/download/")();
|
|
73
94
|
|
|
95
|
+
const query = encodeFormQuery({
|
|
96
|
+
"response_format": payload.response_format,
|
|
97
|
+
});
|
|
98
|
+
|
|
74
99
|
const headers = new Headers(compactMap({
|
|
75
100
|
Accept: "application/json",
|
|
76
101
|
}));
|
|
@@ -100,6 +125,8 @@ async function $do(
|
|
|
100
125
|
baseURL: options?.serverURL,
|
|
101
126
|
path: path,
|
|
102
127
|
headers: headers,
|
|
128
|
+
query: query,
|
|
129
|
+
body: body,
|
|
103
130
|
userAgent: client._options.userAgent,
|
|
104
131
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
105
132
|
}, options);
|
|
@@ -110,7 +137,7 @@ async function $do(
|
|
|
110
137
|
|
|
111
138
|
const doResult = await client._do(req, {
|
|
112
139
|
context,
|
|
113
|
-
errorCodes: ["4XX", "500", "5XX"],
|
|
140
|
+
errorCodes: ["422", "4XX", "500", "5XX"],
|
|
114
141
|
retryConfig: context.retryConfig,
|
|
115
142
|
retryCodes: context.retryCodes,
|
|
116
143
|
});
|
|
@@ -119,8 +146,13 @@ async function $do(
|
|
|
119
146
|
}
|
|
120
147
|
const response = doResult.value;
|
|
121
148
|
|
|
149
|
+
const responseFields = {
|
|
150
|
+
HttpMeta: { Response: response, Request: req },
|
|
151
|
+
};
|
|
152
|
+
|
|
122
153
|
const [result] = await M.match<
|
|
123
154
|
any,
|
|
155
|
+
| errors.HTTPValidationError
|
|
124
156
|
| SyllableSDKError
|
|
125
157
|
| ResponseValidationError
|
|
126
158
|
| ConnectionError
|
|
@@ -131,9 +163,10 @@ async function $do(
|
|
|
131
163
|
| SDKValidationError
|
|
132
164
|
>(
|
|
133
165
|
M.json(200, z.any()),
|
|
166
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
134
167
|
M.fail("4XX"),
|
|
135
168
|
M.fail([500, "5XX"]),
|
|
136
|
-
)(response, req);
|
|
169
|
+
)(response, req, { extraFields: responseFields });
|
|
137
170
|
if (!result.ok) {
|
|
138
171
|
return [result, { status: "complete", request: req, response }];
|
|
139
172
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { SyllableSDKCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -99,6 +99,10 @@ async function $do(
|
|
|
99
99
|
|
|
100
100
|
const path = pathToFunc("/api/v1/directory_members/{member_id}")(pathParams);
|
|
101
101
|
|
|
102
|
+
const query = encodeFormQuery({
|
|
103
|
+
"response_format": payload.response_format,
|
|
104
|
+
});
|
|
105
|
+
|
|
102
106
|
const headers = new Headers(compactMap({
|
|
103
107
|
Accept: "application/json",
|
|
104
108
|
}));
|
|
@@ -128,6 +132,7 @@ async function $do(
|
|
|
128
132
|
baseURL: options?.serverURL,
|
|
129
133
|
path: path,
|
|
130
134
|
headers: headers,
|
|
135
|
+
query: query,
|
|
131
136
|
body: body,
|
|
132
137
|
userAgent: client._options.userAgent,
|
|
133
138
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
@@ -99,6 +99,7 @@ async function $do(
|
|
|
99
99
|
"order_by": payload.order_by,
|
|
100
100
|
"order_by_direction": payload.order_by_direction,
|
|
101
101
|
"page": payload.page,
|
|
102
|
+
"response_format": payload.response_format,
|
|
102
103
|
"search_field_values": payload.search_field_values,
|
|
103
104
|
"search_fields": payload.search_fields,
|
|
104
105
|
"start_datetime": payload.start_datetime,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { SyllableSDKCore } from "../core.js";
|
|
6
|
-
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -101,6 +101,10 @@ async function $do(
|
|
|
101
101
|
|
|
102
102
|
const path = pathToFunc("/api/v1/directory_members/{member_id}")(pathParams);
|
|
103
103
|
|
|
104
|
+
const query = encodeFormQuery({
|
|
105
|
+
"response_format": payload.response_format,
|
|
106
|
+
});
|
|
107
|
+
|
|
104
108
|
const headers = new Headers(compactMap({
|
|
105
109
|
"Content-Type": "application/json",
|
|
106
110
|
Accept: "application/json",
|
|
@@ -131,6 +135,7 @@ async function $do(
|
|
|
131
135
|
baseURL: options?.serverURL,
|
|
132
136
|
path: path,
|
|
133
137
|
headers: headers,
|
|
138
|
+
query: query,
|
|
134
139
|
body: body,
|
|
135
140
|
userAgent: client._options.userAgent,
|
|
136
141
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
package/src/lib/config.ts
CHANGED
|
@@ -60,8 +60,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
60
60
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
|
-
openapiDocVersion: "0.0.
|
|
64
|
-
sdkVersion: "1.0.16-rc.
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 1.0.16-rc.
|
|
63
|
+
openapiDocVersion: "0.0.3",
|
|
64
|
+
sdkVersion: "1.0.16-rc.8",
|
|
65
|
+
genVersion: "2.781.2",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 1.0.16-rc.8 2.781.2 0.0.3 syllable-sdk",
|
|
67
67
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { directoryCreate } from "../../funcs/directoryCreate.js";
|
|
6
|
-
import * as
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
7
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
8
|
|
|
9
9
|
const args = {
|
|
10
|
-
request:
|
|
10
|
+
request: operations.DirectoryMemberCreateRequest$inboundSchema,
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const tool$directoryCreate: ToolDefinition<typeof args> = {
|
|
@@ -3,16 +3,25 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { directoryDirectoryMemberDownload } from "../../funcs/directoryDirectoryMemberDownload.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
6
7
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.DirectoryMemberDownloadRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$directoryDirectoryMemberDownload: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
9
16
|
name: "directory-directory-member-download",
|
|
10
17
|
description: `Download Directory Members
|
|
11
18
|
|
|
12
19
|
Download the entire directory as a JSON file.`,
|
|
13
|
-
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
14
22
|
const [result, apiCall] = await directoryDirectoryMemberDownload(
|
|
15
23
|
client,
|
|
24
|
+
args.request,
|
|
16
25
|
{ fetchOptions: { signal: ctx.signal } },
|
|
17
26
|
).$inspect();
|
|
18
27
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Response shape selector for directory member APIs.
|
|
10
|
+
*/
|
|
11
|
+
export const DirectoryResponseFormat = {
|
|
12
|
+
Normalized: "normalized",
|
|
13
|
+
Raw: "raw",
|
|
14
|
+
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* Response shape selector for directory member APIs.
|
|
17
|
+
*/
|
|
18
|
+
export type DirectoryResponseFormat = ClosedEnum<
|
|
19
|
+
typeof DirectoryResponseFormat
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const DirectoryResponseFormat$inboundSchema: z.ZodNativeEnum<
|
|
24
|
+
typeof DirectoryResponseFormat
|
|
25
|
+
> = z.nativeEnum(DirectoryResponseFormat);
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const DirectoryResponseFormat$outboundSchema: z.ZodNativeEnum<
|
|
28
|
+
typeof DirectoryResponseFormat
|
|
29
|
+
> = DirectoryResponseFormat$inboundSchema;
|
|
@@ -83,6 +83,7 @@ export * from "./directorymembercreate.js";
|
|
|
83
83
|
export * from "./directorymemberproperties.js";
|
|
84
84
|
export * from "./directorymembertestresponse.js";
|
|
85
85
|
export * from "./directorymemberupdate.js";
|
|
86
|
+
export * from "./directoryresponseformat.js";
|
|
86
87
|
export * from "./event.js";
|
|
87
88
|
export * from "./eventproperties.js";
|
|
88
89
|
export * from "./eventtask.js";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type DirectoryMemberCreateRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Directory response format: normalized (default) strips @hours and formats times; raw returns stored @hours values.
|
|
15
|
+
*/
|
|
16
|
+
responseFormat?: components.DirectoryResponseFormat | undefined;
|
|
17
|
+
directoryMemberCreate: components.DirectoryMemberCreate;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const DirectoryMemberCreateRequest$inboundSchema: z.ZodType<
|
|
22
|
+
DirectoryMemberCreateRequest,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
response_format: components.DirectoryResponseFormat$inboundSchema.optional(),
|
|
27
|
+
DirectoryMemberCreate: components.DirectoryMemberCreate$inboundSchema,
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"response_format": "responseFormat",
|
|
31
|
+
"DirectoryMemberCreate": "directoryMemberCreate",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type DirectoryMemberCreateRequest$Outbound = {
|
|
36
|
+
response_format?: string | undefined;
|
|
37
|
+
DirectoryMemberCreate: components.DirectoryMemberCreate$Outbound;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const DirectoryMemberCreateRequest$outboundSchema: z.ZodType<
|
|
42
|
+
DirectoryMemberCreateRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
DirectoryMemberCreateRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
responseFormat: components.DirectoryResponseFormat$outboundSchema.optional(),
|
|
47
|
+
directoryMemberCreate: components.DirectoryMemberCreate$outboundSchema,
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
responseFormat: "response_format",
|
|
51
|
+
directoryMemberCreate: "DirectoryMemberCreate",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function directoryMemberCreateRequestToJSON(
|
|
56
|
+
directoryMemberCreateRequest: DirectoryMemberCreateRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
DirectoryMemberCreateRequest$outboundSchema.parse(
|
|
60
|
+
directoryMemberCreateRequest,
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export function directoryMemberCreateRequestFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<DirectoryMemberCreateRequest, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => DirectoryMemberCreateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'DirectoryMemberCreateRequest' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type DirectoryMemberDownloadRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Directory response format: normalized (default) strips @hours and formats times; raw returns stored @hours values.
|
|
15
|
+
*/
|
|
16
|
+
responseFormat?: components.DirectoryResponseFormat | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const DirectoryMemberDownloadRequest$inboundSchema: z.ZodType<
|
|
21
|
+
DirectoryMemberDownloadRequest,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
response_format: components.DirectoryResponseFormat$inboundSchema.optional(),
|
|
26
|
+
}).transform((v) => {
|
|
27
|
+
return remap$(v, {
|
|
28
|
+
"response_format": "responseFormat",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type DirectoryMemberDownloadRequest$Outbound = {
|
|
33
|
+
response_format?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const DirectoryMemberDownloadRequest$outboundSchema: z.ZodType<
|
|
38
|
+
DirectoryMemberDownloadRequest$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
DirectoryMemberDownloadRequest
|
|
41
|
+
> = z.object({
|
|
42
|
+
responseFormat: components.DirectoryResponseFormat$outboundSchema.optional(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
responseFormat: "response_format",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function directoryMemberDownloadRequestToJSON(
|
|
50
|
+
directoryMemberDownloadRequest: DirectoryMemberDownloadRequest,
|
|
51
|
+
): string {
|
|
52
|
+
return JSON.stringify(
|
|
53
|
+
DirectoryMemberDownloadRequest$outboundSchema.parse(
|
|
54
|
+
directoryMemberDownloadRequest,
|
|
55
|
+
),
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
export function directoryMemberDownloadRequestFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<DirectoryMemberDownloadRequest, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => DirectoryMemberDownloadRequest$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'DirectoryMemberDownloadRequest' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -6,10 +6,15 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
|
|
11
12
|
export type DirectoryMemberGetByIdRequest = {
|
|
12
13
|
memberId: number;
|
|
14
|
+
/**
|
|
15
|
+
* Directory response format: normalized (default) strips @hours and formats times; raw returns stored @hours values.
|
|
16
|
+
*/
|
|
17
|
+
responseFormat?: components.DirectoryResponseFormat | undefined;
|
|
13
18
|
};
|
|
14
19
|
|
|
15
20
|
/** @internal */
|
|
@@ -19,14 +24,17 @@ export const DirectoryMemberGetByIdRequest$inboundSchema: z.ZodType<
|
|
|
19
24
|
unknown
|
|
20
25
|
> = z.object({
|
|
21
26
|
member_id: z.number().int(),
|
|
27
|
+
response_format: components.DirectoryResponseFormat$inboundSchema.optional(),
|
|
22
28
|
}).transform((v) => {
|
|
23
29
|
return remap$(v, {
|
|
24
30
|
"member_id": "memberId",
|
|
31
|
+
"response_format": "responseFormat",
|
|
25
32
|
});
|
|
26
33
|
});
|
|
27
34
|
/** @internal */
|
|
28
35
|
export type DirectoryMemberGetByIdRequest$Outbound = {
|
|
29
36
|
member_id: number;
|
|
37
|
+
response_format?: string | undefined;
|
|
30
38
|
};
|
|
31
39
|
|
|
32
40
|
/** @internal */
|
|
@@ -36,9 +44,11 @@ export const DirectoryMemberGetByIdRequest$outboundSchema: z.ZodType<
|
|
|
36
44
|
DirectoryMemberGetByIdRequest
|
|
37
45
|
> = z.object({
|
|
38
46
|
memberId: z.number().int(),
|
|
47
|
+
responseFormat: components.DirectoryResponseFormat$outboundSchema.optional(),
|
|
39
48
|
}).transform((v) => {
|
|
40
49
|
return remap$(v, {
|
|
41
50
|
memberId: "member_id",
|
|
51
|
+
responseFormat: "response_format",
|
|
42
52
|
});
|
|
43
53
|
});
|
|
44
54
|
|
|
@@ -11,39 +11,43 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
11
11
|
|
|
12
12
|
export type DirectoryMemberListRequest = {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Directory response format: normalized (default) strips @hours and formats times; raw returns stored @hours values.
|
|
15
|
+
*/
|
|
16
|
+
responseFormat?: components.DirectoryResponseFormat | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Page number (0-based)
|
|
15
19
|
*/
|
|
16
20
|
page?: number | null | undefined;
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
22
|
+
* Items per page
|
|
19
23
|
*/
|
|
20
24
|
limit?: number | undefined;
|
|
21
25
|
/**
|
|
22
|
-
*
|
|
26
|
+
* Fields to search; aligns with search_field_values
|
|
23
27
|
*/
|
|
24
28
|
searchFields?: Array<components.DirectoryMemberProperties> | undefined;
|
|
25
29
|
/**
|
|
26
|
-
* Values
|
|
30
|
+
* Values for search_fields in matching order
|
|
27
31
|
*/
|
|
28
32
|
searchFieldValues?: Array<string> | undefined;
|
|
29
33
|
/**
|
|
30
|
-
*
|
|
34
|
+
* Field to order results by
|
|
31
35
|
*/
|
|
32
36
|
orderBy?: components.DirectoryMemberProperties | null | undefined;
|
|
33
37
|
/**
|
|
34
|
-
*
|
|
38
|
+
* Direction to order results
|
|
35
39
|
*/
|
|
36
40
|
orderByDirection?: components.OrderByDirection | null | undefined;
|
|
37
41
|
/**
|
|
38
|
-
*
|
|
42
|
+
* Fields to include in response
|
|
39
43
|
*/
|
|
40
44
|
fields?: Array<components.DirectoryMemberProperties> | null | undefined;
|
|
41
45
|
/**
|
|
42
|
-
*
|
|
46
|
+
* Start datetime for filtering results
|
|
43
47
|
*/
|
|
44
48
|
startDatetime?: string | null | undefined;
|
|
45
49
|
/**
|
|
46
|
-
*
|
|
50
|
+
* End datetime for filtering results
|
|
47
51
|
*/
|
|
48
52
|
endDatetime?: string | null | undefined;
|
|
49
53
|
};
|
|
@@ -54,6 +58,7 @@ export const DirectoryMemberListRequest$inboundSchema: z.ZodType<
|
|
|
54
58
|
z.ZodTypeDef,
|
|
55
59
|
unknown
|
|
56
60
|
> = z.object({
|
|
61
|
+
response_format: components.DirectoryResponseFormat$inboundSchema.optional(),
|
|
57
62
|
page: z.nullable(z.number().int()).optional(),
|
|
58
63
|
limit: z.number().int().default(25),
|
|
59
64
|
search_fields: z.array(components.DirectoryMemberProperties$inboundSchema)
|
|
@@ -70,6 +75,7 @@ export const DirectoryMemberListRequest$inboundSchema: z.ZodType<
|
|
|
70
75
|
end_datetime: z.nullable(z.string()).optional(),
|
|
71
76
|
}).transform((v) => {
|
|
72
77
|
return remap$(v, {
|
|
78
|
+
"response_format": "responseFormat",
|
|
73
79
|
"search_fields": "searchFields",
|
|
74
80
|
"search_field_values": "searchFieldValues",
|
|
75
81
|
"order_by": "orderBy",
|
|
@@ -80,6 +86,7 @@ export const DirectoryMemberListRequest$inboundSchema: z.ZodType<
|
|
|
80
86
|
});
|
|
81
87
|
/** @internal */
|
|
82
88
|
export type DirectoryMemberListRequest$Outbound = {
|
|
89
|
+
response_format?: string | undefined;
|
|
83
90
|
page?: number | null | undefined;
|
|
84
91
|
limit: number;
|
|
85
92
|
search_fields?: Array<string> | undefined;
|
|
@@ -97,6 +104,7 @@ export const DirectoryMemberListRequest$outboundSchema: z.ZodType<
|
|
|
97
104
|
z.ZodTypeDef,
|
|
98
105
|
DirectoryMemberListRequest
|
|
99
106
|
> = z.object({
|
|
107
|
+
responseFormat: components.DirectoryResponseFormat$outboundSchema.optional(),
|
|
100
108
|
page: z.nullable(z.number().int()).optional(),
|
|
101
109
|
limit: z.number().int().default(25),
|
|
102
110
|
searchFields: z.array(components.DirectoryMemberProperties$outboundSchema)
|
|
@@ -113,6 +121,7 @@ export const DirectoryMemberListRequest$outboundSchema: z.ZodType<
|
|
|
113
121
|
endDatetime: z.nullable(z.string()).optional(),
|
|
114
122
|
}).transform((v) => {
|
|
115
123
|
return remap$(v, {
|
|
124
|
+
responseFormat: "response_format",
|
|
116
125
|
searchFields: "search_fields",
|
|
117
126
|
searchFieldValues: "search_field_values",
|
|
118
127
|
orderBy: "order_by",
|