@meetkai/mka1 0.54.2 → 0.54.4
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 +282 -276
- package/bin/mcp-server.js +528 -65
- package/bin/mcp-server.js.map +21 -11
- package/dist/commonjs/funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts +18 -0
- package/dist/commonjs/funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts.map +1 -0
- package/dist/commonjs/funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js +140 -0
- package/dist/commonjs/funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js.map +1 -0
- package/dist/commonjs/funcs/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.d.ts +2 -1
- package/dist/commonjs/funcs/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.js +9 -1
- package/dist/commonjs/funcs/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.js.map +1 -1
- package/dist/commonjs/funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts +18 -0
- package/dist/commonjs/funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts.map +1 -0
- package/dist/commonjs/funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js +138 -0
- package/dist/commonjs/funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +6 -2
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js +63 -0
- package/dist/commonjs/mcp-server/tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js +63 -0
- package/dist/commonjs/mcp-server/tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js.map +1 -0
- package/dist/commonjs/models/components/connection.d.ts +2 -0
- package/dist/commonjs/models/components/connection.d.ts.map +1 -1
- package/dist/commonjs/models/components/connection.js +5 -0
- package/dist/commonjs/models/components/connection.js.map +1 -1
- package/dist/commonjs/models/components/githubpullrequestrequest.d.ts +34 -0
- package/dist/commonjs/models/components/githubpullrequestrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/githubpullrequestrequest.js +66 -0
- package/dist/commonjs/models/components/githubpullrequestrequest.js.map +1 -0
- package/dist/commonjs/models/components/githubpullrequestresult.d.ts +37 -0
- package/dist/commonjs/models/components/githubpullrequestresult.d.ts.map +1 -0
- package/dist/commonjs/models/components/githubpullrequestresult.js +93 -0
- package/dist/commonjs/models/components/githubpullrequestresult.js.map +1 -0
- package/dist/commonjs/models/components/githubpushrequest.d.ts +35 -0
- package/dist/commonjs/models/components/githubpushrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/githubpushrequest.js +75 -0
- package/dist/commonjs/models/components/githubpushrequest.js.map +1 -0
- package/dist/commonjs/models/components/githubpushresult.d.ts +31 -0
- package/dist/commonjs/models/components/githubpushresult.d.ts.map +1 -0
- package/dist/commonjs/models/components/githubpushresult.js +89 -0
- package/dist/commonjs/models/components/githubpushresult.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +4 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +4 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/createorupdateapiv1sandboxsessionssessionidgithubpullrequestpost.d.ts +25 -0
- package/dist/commonjs/models/operations/createorupdateapiv1sandboxsessionssessionidgithubpullrequestpost.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createorupdateapiv1sandboxsessionssessionidgithubpullrequestpost.js +78 -0
- package/dist/commonjs/models/operations/createorupdateapiv1sandboxsessionssessionidgithubpullrequestpost.js.map +1 -0
- package/dist/commonjs/models/operations/getconnectionapiv1sandboxgithuboauthconnectionsget.d.ts +2 -0
- package/dist/commonjs/models/operations/getconnectionapiv1sandboxgithuboauthconnectionsget.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getconnectionapiv1sandboxgithuboauthconnectionsget.js +2 -0
- package/dist/commonjs/models/operations/getconnectionapiv1sandboxgithuboauthconnectionsget.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/pushapiv1sandboxsessionssessionidgithubpushpost.d.ts +25 -0
- package/dist/commonjs/models/operations/pushapiv1sandboxsessionssessionidgithubpushpost.d.ts.map +1 -0
- package/dist/commonjs/models/operations/pushapiv1sandboxsessionssessionidgithubpushpost.js +77 -0
- package/dist/commonjs/models/operations/pushapiv1sandboxsessionssessionidgithubpushpost.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts +27 -0
- package/dist/commonjs/react-query/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts.map +1 -0
- package/dist/commonjs/react-query/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js +48 -0
- package/dist/commonjs/react-query/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js.map +1 -0
- package/dist/commonjs/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.core.d.ts +1 -0
- package/dist/commonjs/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.core.js +1 -0
- package/dist/commonjs/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.core.js.map +1 -1
- package/dist/commonjs/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.d.ts +9 -4
- package/dist/commonjs/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.d.ts.map +1 -1
- package/dist/commonjs/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.js.map +1 -1
- package/dist/commonjs/react-query/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts +27 -0
- package/dist/commonjs/react-query/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts.map +1 -0
- package/dist/commonjs/react-query/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js +48 -0
- package/dist/commonjs/react-query/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js.map +1 -0
- package/dist/commonjs/sdk/schema3other.d.ts +12 -4
- package/dist/commonjs/sdk/schema3other.d.ts.map +1 -1
- package/dist/commonjs/sdk/schema3other.js +20 -6
- package/dist/commonjs/sdk/schema3other.js.map +1 -1
- package/dist/esm/funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts +18 -0
- package/dist/esm/funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts.map +1 -0
- package/dist/esm/funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js +104 -0
- package/dist/esm/funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js.map +1 -0
- package/dist/esm/funcs/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.d.ts +2 -1
- package/dist/esm/funcs/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.d.ts.map +1 -1
- package/dist/esm/funcs/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.js +10 -2
- package/dist/esm/funcs/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.js.map +1 -1
- package/dist/esm/funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts +18 -0
- package/dist/esm/funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts.map +1 -0
- package/dist/esm/funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js +102 -0
- package/dist/esm/funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +6 -2
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts +8 -0
- package/dist/esm/mcp-server/tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js +27 -0
- package/dist/esm/mcp-server/tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js.map +1 -0
- package/dist/esm/mcp-server/tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts +8 -0
- package/dist/esm/mcp-server/tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js +27 -0
- package/dist/esm/mcp-server/tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js.map +1 -0
- package/dist/esm/models/components/connection.d.ts +2 -0
- package/dist/esm/models/components/connection.d.ts.map +1 -1
- package/dist/esm/models/components/connection.js +5 -0
- package/dist/esm/models/components/connection.js.map +1 -1
- package/dist/esm/models/components/githubpullrequestrequest.d.ts +34 -0
- package/dist/esm/models/components/githubpullrequestrequest.d.ts.map +1 -0
- package/dist/esm/models/components/githubpullrequestrequest.js +28 -0
- package/dist/esm/models/components/githubpullrequestrequest.js.map +1 -0
- package/dist/esm/models/components/githubpullrequestresult.d.ts +37 -0
- package/dist/esm/models/components/githubpullrequestresult.d.ts.map +1 -0
- package/dist/esm/models/components/githubpullrequestresult.js +55 -0
- package/dist/esm/models/components/githubpullrequestresult.js.map +1 -0
- package/dist/esm/models/components/githubpushrequest.d.ts +35 -0
- package/dist/esm/models/components/githubpushrequest.d.ts.map +1 -0
- package/dist/esm/models/components/githubpushrequest.js +37 -0
- package/dist/esm/models/components/githubpushrequest.js.map +1 -0
- package/dist/esm/models/components/githubpushresult.d.ts +31 -0
- package/dist/esm/models/components/githubpushresult.d.ts.map +1 -0
- package/dist/esm/models/components/githubpushresult.js +51 -0
- package/dist/esm/models/components/githubpushresult.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +4 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +4 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/createorupdateapiv1sandboxsessionssessionidgithubpullrequestpost.d.ts +25 -0
- package/dist/esm/models/operations/createorupdateapiv1sandboxsessionssessionidgithubpullrequestpost.d.ts.map +1 -0
- package/dist/esm/models/operations/createorupdateapiv1sandboxsessionssessionidgithubpullrequestpost.js +40 -0
- package/dist/esm/models/operations/createorupdateapiv1sandboxsessionssessionidgithubpullrequestpost.js.map +1 -0
- package/dist/esm/models/operations/getconnectionapiv1sandboxgithuboauthconnectionsget.d.ts +2 -0
- package/dist/esm/models/operations/getconnectionapiv1sandboxgithuboauthconnectionsget.d.ts.map +1 -1
- package/dist/esm/models/operations/getconnectionapiv1sandboxgithuboauthconnectionsget.js +2 -0
- package/dist/esm/models/operations/getconnectionapiv1sandboxgithuboauthconnectionsget.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/pushapiv1sandboxsessionssessionidgithubpushpost.d.ts +25 -0
- package/dist/esm/models/operations/pushapiv1sandboxsessionssessionidgithubpushpost.d.ts.map +1 -0
- package/dist/esm/models/operations/pushapiv1sandboxsessionssessionidgithubpushpost.js +39 -0
- package/dist/esm/models/operations/pushapiv1sandboxsessionssessionidgithubpushpost.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts +27 -0
- package/dist/esm/react-query/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.d.ts.map +1 -0
- package/dist/esm/react-query/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js +43 -0
- package/dist/esm/react-query/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js.map +1 -0
- package/dist/esm/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.core.d.ts +1 -0
- package/dist/esm/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.core.d.ts.map +1 -1
- package/dist/esm/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.core.js +1 -0
- package/dist/esm/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.core.js.map +1 -1
- package/dist/esm/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.d.ts +9 -4
- package/dist/esm/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.d.ts.map +1 -1
- package/dist/esm/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.js.map +1 -1
- package/dist/esm/react-query/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts +27 -0
- package/dist/esm/react-query/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.d.ts.map +1 -0
- package/dist/esm/react-query/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js +43 -0
- package/dist/esm/react-query/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js.map +1 -0
- package/dist/esm/sdk/schema3other.d.ts +12 -4
- package/dist/esm/sdk/schema3other.d.ts.map +1 -1
- package/dist/esm/sdk/schema3other.js +20 -6
- package/dist/esm/sdk/schema3other.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.ts +202 -0
- package/src/funcs/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.ts +16 -2
- package/src/funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.ts +197 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +10 -2
- package/src/mcp-server/tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.ts +40 -0
- package/src/mcp-server/tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.ts +40 -0
- package/src/models/components/connection.ts +9 -0
- package/src/models/components/githubpullrequestrequest.ts +76 -0
- package/src/models/components/githubpullrequestresult.ts +106 -0
- package/src/models/components/githubpushrequest.ts +86 -0
- package/src/models/components/githubpushresult.ts +96 -0
- package/src/models/components/index.ts +4 -0
- package/src/models/operations/createorupdateapiv1sandboxsessionssessionidgithubpullrequestpost.ts +90 -0
- package/src/models/operations/getconnectionapiv1sandboxgithuboauthconnectionsget.ts +4 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/pushapiv1sandboxsessionssessionidgithubpushpost.ts +86 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.ts +129 -0
- package/src/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.core.ts +5 -1
- package/src/react-query/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.ts +12 -2
- package/src/react-query/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.ts +128 -0
- package/src/sdk/schema3other.ts +46 -11
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Push
|
|
32
|
+
*
|
|
33
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
34
|
+
*/
|
|
35
|
+
export function schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost(
|
|
36
|
+
client: SDKCore,
|
|
37
|
+
request: operations.PushApiV1SandboxSessionsSessionIdGithubPushPostRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
components.GitHubPushResult,
|
|
42
|
+
| errors.HTTPValidationError
|
|
43
|
+
| SDKError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: SDKCore,
|
|
62
|
+
request: operations.PushApiV1SandboxSessionsSessionIdGithubPushPostRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
components.GitHubPushResult,
|
|
68
|
+
| errors.HTTPValidationError
|
|
69
|
+
| SDKError
|
|
70
|
+
| ResponseValidationError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| InvalidRequestError
|
|
75
|
+
| UnexpectedClientError
|
|
76
|
+
| SDKValidationError
|
|
77
|
+
>,
|
|
78
|
+
APICall,
|
|
79
|
+
]
|
|
80
|
+
> {
|
|
81
|
+
const parsed = safeParse(
|
|
82
|
+
request,
|
|
83
|
+
(value) =>
|
|
84
|
+
operations
|
|
85
|
+
.PushApiV1SandboxSessionsSessionIdGithubPushPostRequest$outboundSchema
|
|
86
|
+
.parse(value),
|
|
87
|
+
"Input validation failed",
|
|
88
|
+
);
|
|
89
|
+
if (!parsed.ok) {
|
|
90
|
+
return [parsed, { status: "invalid" }];
|
|
91
|
+
}
|
|
92
|
+
const payload = parsed.value;
|
|
93
|
+
const body = encodeJSON("body", payload.GitHubPushRequest, { explode: true });
|
|
94
|
+
|
|
95
|
+
const pathParams = {
|
|
96
|
+
session_id: encodeSimple("session_id", payload.session_id, {
|
|
97
|
+
explode: false,
|
|
98
|
+
charEncoding: "percent",
|
|
99
|
+
}),
|
|
100
|
+
};
|
|
101
|
+
const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/github/push")(
|
|
102
|
+
pathParams,
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
const headers = new Headers(compactMap({
|
|
106
|
+
"Content-Type": "application/json",
|
|
107
|
+
Accept: "application/json",
|
|
108
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
109
|
+
"X-On-Behalf-Of",
|
|
110
|
+
payload["X-On-Behalf-Of"],
|
|
111
|
+
{ explode: false, charEncoding: "none" },
|
|
112
|
+
),
|
|
113
|
+
}));
|
|
114
|
+
|
|
115
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
116
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
117
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
118
|
+
|
|
119
|
+
const context = {
|
|
120
|
+
options: client._options,
|
|
121
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
122
|
+
operationID: "push_api_v1_sandbox_sessions__session_id__github_push_post",
|
|
123
|
+
oAuth2Scopes: null,
|
|
124
|
+
|
|
125
|
+
resolvedSecurity: requestSecurity,
|
|
126
|
+
|
|
127
|
+
securitySource: client._options.bearerAuth,
|
|
128
|
+
retryConfig: options?.retries
|
|
129
|
+
|| client._options.retryConfig
|
|
130
|
+
|| {
|
|
131
|
+
strategy: "backoff",
|
|
132
|
+
backoff: {
|
|
133
|
+
initialInterval: 500,
|
|
134
|
+
maxInterval: 5000,
|
|
135
|
+
exponent: 1.5,
|
|
136
|
+
maxElapsedTime: 15000,
|
|
137
|
+
},
|
|
138
|
+
retryConnectionErrors: true,
|
|
139
|
+
}
|
|
140
|
+
|| { strategy: "none" },
|
|
141
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const requestRes = client._createRequest(context, {
|
|
145
|
+
security: requestSecurity,
|
|
146
|
+
method: "POST",
|
|
147
|
+
baseURL: options?.serverURL,
|
|
148
|
+
path: path,
|
|
149
|
+
headers: headers,
|
|
150
|
+
body: body,
|
|
151
|
+
userAgent: client._options.userAgent,
|
|
152
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
153
|
+
}, options);
|
|
154
|
+
if (!requestRes.ok) {
|
|
155
|
+
return [requestRes, { status: "invalid" }];
|
|
156
|
+
}
|
|
157
|
+
const req = requestRes.value;
|
|
158
|
+
|
|
159
|
+
const doResult = await client._do(req, {
|
|
160
|
+
context,
|
|
161
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
162
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
163
|
+
retryConfig: context.retryConfig,
|
|
164
|
+
retryCodes: context.retryCodes,
|
|
165
|
+
});
|
|
166
|
+
if (!doResult.ok) {
|
|
167
|
+
return [doResult, { status: "request-error", request: req }];
|
|
168
|
+
}
|
|
169
|
+
const response = doResult.value;
|
|
170
|
+
|
|
171
|
+
const responseFields = {
|
|
172
|
+
HttpMeta: { Response: response, Request: req },
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const [result] = await M.match<
|
|
176
|
+
components.GitHubPushResult,
|
|
177
|
+
| errors.HTTPValidationError
|
|
178
|
+
| SDKError
|
|
179
|
+
| ResponseValidationError
|
|
180
|
+
| ConnectionError
|
|
181
|
+
| RequestAbortedError
|
|
182
|
+
| RequestTimeoutError
|
|
183
|
+
| InvalidRequestError
|
|
184
|
+
| UnexpectedClientError
|
|
185
|
+
| SDKValidationError
|
|
186
|
+
>(
|
|
187
|
+
M.json(200, components.GitHubPushResult$inboundSchema),
|
|
188
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
189
|
+
M.fail("4XX"),
|
|
190
|
+
M.fail("5XX"),
|
|
191
|
+
)(response, req, { extraFields: responseFields });
|
|
192
|
+
if (!result.ok) {
|
|
193
|
+
return [result, { status: "complete", request: req, response }];
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return [result, { status: "complete", request: req, response }];
|
|
197
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.1.0",
|
|
68
|
-
sdkVersion: "0.54.
|
|
68
|
+
sdkVersion: "0.54.4",
|
|
69
69
|
genVersion: "2.932.9",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.54.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.54.4 2.932.9 1.1.0 @meetkai/mka1",
|
|
71
71
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -361,9 +361,13 @@ import { tool$sandboxUploadArchive } from "./tools/sandboxUploadArchive.js";
|
|
|
361
361
|
import { tool$sandboxUploadFile } from "./tools/sandboxUploadFile.js";
|
|
362
362
|
import { tool$schema3OtherConnectApiV1SandboxGithubOauthConnectionsPost } from "./tools/schema3OtherConnectApiV1SandboxGithubOauthConnectionsPost.js";
|
|
363
363
|
import { tool$schema3OtherCreateIntentApiV1SandboxGithubOauthIntentsPost } from "./tools/schema3OtherCreateIntentApiV1SandboxGithubOauthIntentsPost.js";
|
|
364
|
+
import {
|
|
365
|
+
tool$schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost,
|
|
366
|
+
} from "./tools/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js";
|
|
364
367
|
import { tool$schema3OtherDisconnectApiV1SandboxGithubOauthConnectionsDelete } from "./tools/schema3OtherDisconnectApiV1SandboxGithubOauthConnectionsDelete.js";
|
|
365
368
|
import { tool$schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet } from "./tools/schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet.js";
|
|
366
369
|
import { tool$schema3OtherListRepositoriesApiV1SandboxGithubRepositoriesGet } from "./tools/schema3OtherListRepositoriesApiV1SandboxGithubRepositoriesGet.js";
|
|
370
|
+
import { tool$schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost } from "./tools/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js";
|
|
367
371
|
import { tool$schema3OtherReadCloneApiV1SandboxSessionsSessionIdGithubReadClonePost } from "./tools/schema3OtherReadCloneApiV1SandboxSessionsSessionIdGithubReadClonePost.js";
|
|
368
372
|
import { tool$schema3OtherRefreshRepositoriesApiV1SandboxGithubRepositoriesRefreshPost } from "./tools/schema3OtherRefreshRepositoriesApiV1SandboxGithubRepositoriesRefreshPost.js";
|
|
369
373
|
import { tool$schema3OtherResolveReferenceApiV1SandboxGithubRepositoriesResolvePost } from "./tools/schema3OtherResolveReferenceApiV1SandboxGithubRepositoriesResolvePost.js";
|
|
@@ -380,7 +384,7 @@ export function createMCPServer(deps: {
|
|
|
380
384
|
}) {
|
|
381
385
|
const server = new McpServer({
|
|
382
386
|
name: "SDK",
|
|
383
|
-
version: "0.54.
|
|
387
|
+
version: "0.54.4",
|
|
384
388
|
});
|
|
385
389
|
|
|
386
390
|
const client = new SDKCore({
|
|
@@ -416,8 +420,8 @@ export function createMCPServer(deps: {
|
|
|
416
420
|
tool(tool$guardrailsListGuardrailsPolicies);
|
|
417
421
|
tool(tool$guardrailsTestGuardrails);
|
|
418
422
|
tool(tool$schema3OtherCreateIntentApiV1SandboxGithubOauthIntentsPost);
|
|
419
|
-
tool(tool$schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet);
|
|
420
423
|
tool(tool$schema3OtherConnectApiV1SandboxGithubOauthConnectionsPost);
|
|
424
|
+
tool(tool$schema3OtherGetConnectionApiV1SandboxGithubOauthConnectionsGet);
|
|
421
425
|
tool(tool$schema3OtherDisconnectApiV1SandboxGithubOauthConnectionsDelete);
|
|
422
426
|
tool(tool$schema3OtherListRepositoriesApiV1SandboxGithubRepositoriesGet);
|
|
423
427
|
tool(
|
|
@@ -429,6 +433,10 @@ export function createMCPServer(deps: {
|
|
|
429
433
|
tool(
|
|
430
434
|
tool$schema3OtherReadCloneApiV1SandboxSessionsSessionIdGithubReadClonePost,
|
|
431
435
|
);
|
|
436
|
+
tool(tool$schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost);
|
|
437
|
+
tool(
|
|
438
|
+
tool$schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost,
|
|
439
|
+
);
|
|
432
440
|
tool(tool$sandboxCreate);
|
|
433
441
|
tool(tool$sandboxList);
|
|
434
442
|
tool(tool$sandboxGet);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost } from "../../funcs/schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request:
|
|
11
|
+
operations
|
|
12
|
+
.CreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPostRequest$inboundSchema,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const tool$schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost:
|
|
16
|
+
ToolDefinition<typeof args> = {
|
|
17
|
+
name:
|
|
18
|
+
"schema-3-other-create-or-update-api-v1-sandbox-sessions-session-id-github-pull-request-post",
|
|
19
|
+
description: `Create Or Update`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] =
|
|
23
|
+
await schema3OtherCreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost(
|
|
24
|
+
client,
|
|
25
|
+
args.request,
|
|
26
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
27
|
+
).$inspect();
|
|
28
|
+
|
|
29
|
+
if (!result.ok) {
|
|
30
|
+
return {
|
|
31
|
+
content: [{ type: "text", text: result.error.message }],
|
|
32
|
+
isError: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const value = result.value;
|
|
37
|
+
|
|
38
|
+
return formatResult(value, apiCall);
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost } from "../../funcs/schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request:
|
|
11
|
+
operations
|
|
12
|
+
.PushApiV1SandboxSessionsSessionIdGithubPushPostRequest$inboundSchema,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const tool$schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost:
|
|
16
|
+
ToolDefinition<typeof args> = {
|
|
17
|
+
name:
|
|
18
|
+
"schema-3-other-push-api-v1-sandbox-sessions-session-id-github-push-post",
|
|
19
|
+
description: `Push`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] =
|
|
23
|
+
await schema3OtherPushApiV1SandboxSessionsSessionIdGithubPushPost(
|
|
24
|
+
client,
|
|
25
|
+
args.request,
|
|
26
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
27
|
+
).$inspect();
|
|
28
|
+
|
|
29
|
+
if (!result.ok) {
|
|
30
|
+
return {
|
|
31
|
+
content: [{ type: "text", text: result.error.message }],
|
|
32
|
+
isError: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const value = result.value;
|
|
37
|
+
|
|
38
|
+
return formatResult(value, apiCall);
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -19,6 +19,7 @@ export type Connection = {
|
|
|
19
19
|
githubUserId: number;
|
|
20
20
|
scopes: string;
|
|
21
21
|
syncedAt: Date;
|
|
22
|
+
tokenInvalidAt?: Date | null | undefined;
|
|
22
23
|
repositories: Array<ConnectedRepository>;
|
|
23
24
|
};
|
|
24
25
|
|
|
@@ -32,12 +33,16 @@ export const Connection$inboundSchema: z.ZodType<
|
|
|
32
33
|
github_user_id: z.number().int(),
|
|
33
34
|
scopes: z.string(),
|
|
34
35
|
synced_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
36
|
+
token_invalid_at: z.nullable(
|
|
37
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
38
|
+
).optional(),
|
|
35
39
|
repositories: z.array(ConnectedRepository$inboundSchema),
|
|
36
40
|
}).transform((v) => {
|
|
37
41
|
return remap$(v, {
|
|
38
42
|
"github_login": "githubLogin",
|
|
39
43
|
"github_user_id": "githubUserId",
|
|
40
44
|
"synced_at": "syncedAt",
|
|
45
|
+
"token_invalid_at": "tokenInvalidAt",
|
|
41
46
|
});
|
|
42
47
|
});
|
|
43
48
|
/** @internal */
|
|
@@ -46,6 +51,7 @@ export type Connection$Outbound = {
|
|
|
46
51
|
github_user_id: number;
|
|
47
52
|
scopes: string;
|
|
48
53
|
synced_at: string;
|
|
54
|
+
token_invalid_at?: string | null | undefined;
|
|
49
55
|
repositories: Array<ConnectedRepository$Outbound>;
|
|
50
56
|
};
|
|
51
57
|
|
|
@@ -59,12 +65,15 @@ export const Connection$outboundSchema: z.ZodType<
|
|
|
59
65
|
githubUserId: z.number().int(),
|
|
60
66
|
scopes: z.string(),
|
|
61
67
|
syncedAt: z.date().transform(v => v.toISOString()),
|
|
68
|
+
tokenInvalidAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
69
|
+
.optional(),
|
|
62
70
|
repositories: z.array(ConnectedRepository$outboundSchema),
|
|
63
71
|
}).transform((v) => {
|
|
64
72
|
return remap$(v, {
|
|
65
73
|
githubLogin: "github_login",
|
|
66
74
|
githubUserId: "github_user_id",
|
|
67
75
|
syncedAt: "synced_at",
|
|
76
|
+
tokenInvalidAt: "token_invalid_at",
|
|
68
77
|
});
|
|
69
78
|
});
|
|
70
79
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Public operation request.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*
|
|
15
|
+
* It deliberately has no repository field: the repository is the session's
|
|
16
|
+
* clone binding. The head branch is the caller's — the branch the agent
|
|
17
|
+
* pushed.
|
|
18
|
+
*/
|
|
19
|
+
export type GitHubPullRequestRequest = {
|
|
20
|
+
branch: string;
|
|
21
|
+
title: string;
|
|
22
|
+
body?: string | undefined;
|
|
23
|
+
base?: string | null | undefined;
|
|
24
|
+
draft?: boolean | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const GitHubPullRequestRequest$inboundSchema: z.ZodType<
|
|
29
|
+
GitHubPullRequestRequest,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
branch: z.string(),
|
|
34
|
+
title: z.string(),
|
|
35
|
+
body: z.string().default(""),
|
|
36
|
+
base: z.nullable(z.string()).optional(),
|
|
37
|
+
draft: z.boolean().default(false),
|
|
38
|
+
});
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type GitHubPullRequestRequest$Outbound = {
|
|
41
|
+
branch: string;
|
|
42
|
+
title: string;
|
|
43
|
+
body: string;
|
|
44
|
+
base?: string | null | undefined;
|
|
45
|
+
draft: boolean;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const GitHubPullRequestRequest$outboundSchema: z.ZodType<
|
|
50
|
+
GitHubPullRequestRequest$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
GitHubPullRequestRequest
|
|
53
|
+
> = z.object({
|
|
54
|
+
branch: z.string(),
|
|
55
|
+
title: z.string(),
|
|
56
|
+
body: z.string().default(""),
|
|
57
|
+
base: z.nullable(z.string()).optional(),
|
|
58
|
+
draft: z.boolean().default(false),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export function gitHubPullRequestRequestToJSON(
|
|
62
|
+
gitHubPullRequestRequest: GitHubPullRequestRequest,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
GitHubPullRequestRequest$outboundSchema.parse(gitHubPullRequestRequest),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export function gitHubPullRequestRequestFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<GitHubPullRequestRequest, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => GitHubPullRequestRequest$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'GitHubPullRequestRequest' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type GitHubPullRequestResult = {
|
|
12
|
+
sessionId: string;
|
|
13
|
+
repositoryId: number;
|
|
14
|
+
owner: string;
|
|
15
|
+
repository: string;
|
|
16
|
+
number: number;
|
|
17
|
+
url: string;
|
|
18
|
+
state: string;
|
|
19
|
+
draft: boolean;
|
|
20
|
+
headBranch: string;
|
|
21
|
+
baseBranch: string | null;
|
|
22
|
+
created: boolean;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const GitHubPullRequestResult$inboundSchema: z.ZodType<
|
|
27
|
+
GitHubPullRequestResult,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
session_id: z.string(),
|
|
32
|
+
repository_id: z.number().int(),
|
|
33
|
+
owner: z.string(),
|
|
34
|
+
repository: z.string(),
|
|
35
|
+
number: z.number().int(),
|
|
36
|
+
url: z.string(),
|
|
37
|
+
state: z.string(),
|
|
38
|
+
draft: z.boolean(),
|
|
39
|
+
head_branch: z.string(),
|
|
40
|
+
base_branch: z.nullable(z.string()),
|
|
41
|
+
created: z.boolean(),
|
|
42
|
+
}).transform((v) => {
|
|
43
|
+
return remap$(v, {
|
|
44
|
+
"session_id": "sessionId",
|
|
45
|
+
"repository_id": "repositoryId",
|
|
46
|
+
"head_branch": "headBranch",
|
|
47
|
+
"base_branch": "baseBranch",
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type GitHubPullRequestResult$Outbound = {
|
|
52
|
+
session_id: string;
|
|
53
|
+
repository_id: number;
|
|
54
|
+
owner: string;
|
|
55
|
+
repository: string;
|
|
56
|
+
number: number;
|
|
57
|
+
url: string;
|
|
58
|
+
state: string;
|
|
59
|
+
draft: boolean;
|
|
60
|
+
head_branch: string;
|
|
61
|
+
base_branch: string | null;
|
|
62
|
+
created: boolean;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const GitHubPullRequestResult$outboundSchema: z.ZodType<
|
|
67
|
+
GitHubPullRequestResult$Outbound,
|
|
68
|
+
z.ZodTypeDef,
|
|
69
|
+
GitHubPullRequestResult
|
|
70
|
+
> = z.object({
|
|
71
|
+
sessionId: z.string(),
|
|
72
|
+
repositoryId: z.number().int(),
|
|
73
|
+
owner: z.string(),
|
|
74
|
+
repository: z.string(),
|
|
75
|
+
number: z.number().int(),
|
|
76
|
+
url: z.string(),
|
|
77
|
+
state: z.string(),
|
|
78
|
+
draft: z.boolean(),
|
|
79
|
+
headBranch: z.string(),
|
|
80
|
+
baseBranch: z.nullable(z.string()),
|
|
81
|
+
created: z.boolean(),
|
|
82
|
+
}).transform((v) => {
|
|
83
|
+
return remap$(v, {
|
|
84
|
+
sessionId: "session_id",
|
|
85
|
+
repositoryId: "repository_id",
|
|
86
|
+
headBranch: "head_branch",
|
|
87
|
+
baseBranch: "base_branch",
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export function gitHubPullRequestResultToJSON(
|
|
92
|
+
gitHubPullRequestResult: GitHubPullRequestResult,
|
|
93
|
+
): string {
|
|
94
|
+
return JSON.stringify(
|
|
95
|
+
GitHubPullRequestResult$outboundSchema.parse(gitHubPullRequestResult),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
export function gitHubPullRequestResultFromJSON(
|
|
99
|
+
jsonString: string,
|
|
100
|
+
): SafeParseResult<GitHubPullRequestResult, SDKValidationError> {
|
|
101
|
+
return safeParse(
|
|
102
|
+
jsonString,
|
|
103
|
+
(x) => GitHubPullRequestResult$inboundSchema.parse(JSON.parse(x)),
|
|
104
|
+
`Failed to parse 'GitHubPullRequestResult' from JSON`,
|
|
105
|
+
);
|
|
106
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Public operation request.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
*
|
|
16
|
+
* It deliberately has no credential or repository field: the credential is
|
|
17
|
+
* the caller's stored connection, and the repository is the session's clone
|
|
18
|
+
* binding. ``checkout_path`` names where the repository root sits inside
|
|
19
|
+
* the workspace (empty = the workspace root), because the caller — the
|
|
20
|
+
* agent working in the checkout — knows the layout and the server must not
|
|
21
|
+
* guess it.
|
|
22
|
+
*/
|
|
23
|
+
export type GitHubPushRequest = {
|
|
24
|
+
assignmentGeneration: number;
|
|
25
|
+
branch: string;
|
|
26
|
+
checkoutPath?: string | undefined;
|
|
27
|
+
force?: boolean | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const GitHubPushRequest$inboundSchema: z.ZodType<
|
|
32
|
+
GitHubPushRequest,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
assignment_generation: z.number().int(),
|
|
37
|
+
branch: z.string(),
|
|
38
|
+
checkout_path: z.string().default(""),
|
|
39
|
+
force: z.boolean().default(false),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"assignment_generation": "assignmentGeneration",
|
|
43
|
+
"checkout_path": "checkoutPath",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type GitHubPushRequest$Outbound = {
|
|
48
|
+
assignment_generation: number;
|
|
49
|
+
branch: string;
|
|
50
|
+
checkout_path: string;
|
|
51
|
+
force: boolean;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const GitHubPushRequest$outboundSchema: z.ZodType<
|
|
56
|
+
GitHubPushRequest$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
GitHubPushRequest
|
|
59
|
+
> = z.object({
|
|
60
|
+
assignmentGeneration: z.number().int(),
|
|
61
|
+
branch: z.string(),
|
|
62
|
+
checkoutPath: z.string().default(""),
|
|
63
|
+
force: z.boolean().default(false),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
assignmentGeneration: "assignment_generation",
|
|
67
|
+
checkoutPath: "checkout_path",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function gitHubPushRequestToJSON(
|
|
72
|
+
gitHubPushRequest: GitHubPushRequest,
|
|
73
|
+
): string {
|
|
74
|
+
return JSON.stringify(
|
|
75
|
+
GitHubPushRequest$outboundSchema.parse(gitHubPushRequest),
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
export function gitHubPushRequestFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<GitHubPushRequest, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => GitHubPushRequest$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'GitHubPushRequest' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|