@vercel/sdk 1.6.1 → 1.6.3
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 +4 -10
- package/bin/mcp-server.js +1579 -2527
- package/bin/mcp-server.js.map +29 -38
- package/docs/sdks/integrations/README.md +0 -161
- package/docs/sdks/logdrains/README.md +0 -260
- package/docs/sdks/projects/README.md +162 -0
- package/esm/__tests__/integrations.test.js +5 -40
- package/esm/__tests__/integrations.test.js.map +1 -1
- package/esm/__tests__/logdrains.test.js +7 -89
- package/esm/__tests__/logdrains.test.js.map +1 -1
- package/esm/__tests__/projects.test.js +41 -13
- package/esm/__tests__/projects.test.js.map +1 -1
- package/esm/funcs/projectsCreateProject.js +2 -2
- package/esm/funcs/projectsCreateProject.js.map +1 -1
- package/esm/funcs/projectsPauseProject.d.ts +18 -0
- package/esm/funcs/projectsPauseProject.d.ts.map +1 -0
- package/esm/funcs/{logDrainsGetConfigurableLogDrain.js → projectsPauseProject.js} +13 -13
- package/esm/funcs/projectsPauseProject.js.map +1 -0
- package/esm/funcs/projectsUnpauseProject.d.ts +18 -0
- package/esm/funcs/projectsUnpauseProject.d.ts.map +1 -0
- package/esm/funcs/{logDrainsGetAllLogDrains.js → projectsUnpauseProject.js} +18 -14
- package/esm/funcs/projectsUnpauseProject.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/matchers.d.ts +3 -1
- package/esm/lib/matchers.d.ts.map +1 -1
- package/esm/lib/matchers.js +10 -0
- package/esm/lib/matchers.js.map +1 -1
- package/esm/lib/sdks.js +7 -2
- package/esm/lib/sdks.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +5 -11
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/projectsPauseProject.d.ts +7 -0
- package/esm/mcp-server/tools/projectsPauseProject.d.ts.map +1 -0
- package/esm/mcp-server/tools/projectsPauseProject.js +27 -0
- package/esm/mcp-server/tools/projectsPauseProject.js.map +1 -0
- package/esm/mcp-server/tools/projectsUnpauseProject.d.ts +7 -0
- package/esm/mcp-server/tools/projectsUnpauseProject.d.ts.map +1 -0
- package/esm/mcp-server/tools/projectsUnpauseProject.js +27 -0
- package/esm/mcp-server/tools/projectsUnpauseProject.js.map +1 -0
- package/esm/models/authuser.d.ts +41 -0
- package/esm/models/authuser.d.ts.map +1 -1
- package/esm/models/authuser.js +29 -0
- package/esm/models/authuser.js.map +1 -1
- package/esm/models/canceldeploymentop.d.ts +3 -3
- package/esm/models/canceldeploymentop.js +1 -1
- package/esm/models/canceldeploymentop.js.map +1 -1
- package/esm/models/createlogdrainop.d.ts +51 -51
- package/esm/models/createlogdrainop.d.ts.map +1 -1
- package/esm/models/createlogdrainop.js +74 -75
- package/esm/models/createlogdrainop.js.map +1 -1
- package/esm/models/createprojectop.d.ts +46 -16
- package/esm/models/createprojectop.d.ts.map +1 -1
- package/esm/models/createprojectop.js +17 -5
- package/esm/models/createprojectop.js.map +1 -1
- package/esm/models/exchangessotokenop.d.ts +34 -0
- package/esm/models/exchangessotokenop.d.ts.map +1 -1
- package/esm/models/exchangessotokenop.js +25 -0
- package/esm/models/exchangessotokenop.js.map +1 -1
- package/esm/models/getconfigurationsop.d.ts +19 -16
- package/esm/models/getconfigurationsop.d.ts.map +1 -1
- package/esm/models/getconfigurationsop.js +25 -27
- package/esm/models/getconfigurationsop.js.map +1 -1
- package/esm/models/getcustomenvironmentop.d.ts +3 -0
- package/esm/models/getcustomenvironmentop.d.ts.map +1 -1
- package/esm/models/getcustomenvironmentop.js.map +1 -1
- package/esm/models/getintegrationlogdrainsop.d.ts +11 -11
- package/esm/models/getintegrationlogdrainsop.d.ts.map +1 -1
- package/esm/models/getintegrationlogdrainsop.js +14 -13
- package/esm/models/getintegrationlogdrainsop.js.map +1 -1
- package/esm/models/getprojectsop.d.ts +46 -16
- package/esm/models/getprojectsop.d.ts.map +1 -1
- package/esm/models/getprojectsop.js +17 -5
- package/esm/models/getprojectsop.js.map +1 -1
- package/esm/models/getteammembersop.d.ts +9 -9
- package/esm/models/getteammembersop.js +3 -3
- package/esm/models/getteammembersop.js.map +1 -1
- package/esm/models/getv9projectsidornamecustomenvironmentsop.d.ts +3 -0
- package/esm/models/getv9projectsidornamecustomenvironmentsop.d.ts.map +1 -1
- package/esm/models/getv9projectsidornamecustomenvironmentsop.js.map +1 -1
- package/esm/models/pauseprojectop.d.ts +42 -0
- package/esm/models/pauseprojectop.d.ts.map +1 -0
- package/esm/models/pauseprojectop.js +35 -0
- package/esm/models/pauseprojectop.js.map +1 -0
- package/esm/models/unpauseprojectop.d.ts +42 -0
- package/esm/models/unpauseprojectop.d.ts.map +1 -0
- package/esm/models/unpauseprojectop.js +35 -0
- package/esm/models/unpauseprojectop.js.map +1 -0
- package/esm/models/updateprojectdatacacheop.d.ts +46 -16
- package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
- package/esm/models/updateprojectdatacacheop.js +17 -5
- package/esm/models/updateprojectdatacacheop.js.map +1 -1
- package/esm/models/updateprojectop.d.ts +46 -16
- package/esm/models/updateprojectop.d.ts.map +1 -1
- package/esm/models/updateprojectop.js +17 -5
- package/esm/models/updateprojectop.js.map +1 -1
- package/esm/models/userevent.d.ts +569 -512
- package/esm/models/userevent.d.ts.map +1 -1
- package/esm/models/userevent.js +703 -645
- package/esm/models/userevent.js.map +1 -1
- package/esm/sdk/integrations.d.ts +0 -16
- package/esm/sdk/integrations.d.ts.map +1 -1
- package/esm/sdk/integrations.js +0 -20
- package/esm/sdk/integrations.js.map +1 -1
- package/esm/sdk/logdrains.d.ts +0 -24
- package/esm/sdk/logdrains.d.ts.map +1 -1
- package/esm/sdk/logdrains.js +0 -30
- package/esm/sdk/logdrains.js.map +1 -1
- package/esm/sdk/projects.d.ts +16 -0
- package/esm/sdk/projects.d.ts.map +1 -1
- package/esm/sdk/projects.js +20 -0
- package/esm/sdk/projects.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/integrations.test.ts +9 -44
- package/src/__tests__/logdrains.test.ts +13 -95
- package/src/__tests__/projects.test.ts +47 -13
- package/src/funcs/projectsCreateProject.ts +2 -2
- package/src/funcs/{integrationsGitNamespaces.ts → projectsPauseProject.ts} +30 -25
- package/src/funcs/{logDrainsGetAllLogDrains.ts → projectsUnpauseProject.ts} +27 -24
- package/src/lib/config.ts +3 -3
- package/src/lib/matchers.ts +20 -0
- package/src/lib/sdks.ts +8 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -11
- package/src/mcp-server/tools/projectsPauseProject.ts +35 -0
- package/src/mcp-server/tools/projectsUnpauseProject.ts +35 -0
- package/src/models/authuser.ts +74 -0
- package/src/models/canceldeploymentop.ts +1 -1
- package/src/models/createlogdrainop.ts +95 -112
- package/src/models/createprojectop.ts +42 -6
- package/src/models/exchangessotokenop.ts +44 -0
- package/src/models/getconfigurationsop.ts +34 -39
- package/src/models/getcustomenvironmentop.ts +3 -0
- package/src/models/getintegrationlogdrainsop.ts +15 -20
- package/src/models/getprojectsop.ts +42 -6
- package/src/models/getteammembersop.ts +3 -3
- package/src/models/getv9projectsidornamecustomenvironmentsop.ts +3 -0
- package/src/models/pauseprojectop.ts +83 -0
- package/src/models/unpauseprojectop.ts +83 -0
- package/src/models/updateprojectdatacacheop.ts +42 -6
- package/src/models/updateprojectop.ts +42 -6
- package/src/models/userevent.ts +1328 -1193
- package/src/sdk/integrations.ts +0 -44
- package/src/sdk/logdrains.ts +0 -66
- package/src/sdk/projects.ts +38 -0
- package/vercel-spec.json +616 -1392
- package/esm/funcs/integrationsGitNamespaces.d.ts +0 -18
- package/esm/funcs/integrationsGitNamespaces.d.ts.map +0 -1
- package/esm/funcs/integrationsGitNamespaces.js +0 -86
- package/esm/funcs/integrationsGitNamespaces.js.map +0 -1
- package/esm/funcs/integrationsSearchRepo.d.ts +0 -17
- package/esm/funcs/integrationsSearchRepo.d.ts.map +0 -1
- package/esm/funcs/integrationsSearchRepo.js +0 -89
- package/esm/funcs/integrationsSearchRepo.js.map +0 -1
- package/esm/funcs/logDrainsCreateConfigurableLogDrain.d.ts +0 -18
- package/esm/funcs/logDrainsCreateConfigurableLogDrain.d.ts.map +0 -1
- package/esm/funcs/logDrainsCreateConfigurableLogDrain.js +0 -86
- package/esm/funcs/logDrainsCreateConfigurableLogDrain.js.map +0 -1
- package/esm/funcs/logDrainsGetAllLogDrains.d.ts +0 -18
- package/esm/funcs/logDrainsGetAllLogDrains.d.ts.map +0 -1
- package/esm/funcs/logDrainsGetAllLogDrains.js.map +0 -1
- package/esm/funcs/logDrainsGetConfigurableLogDrain.d.ts +0 -19
- package/esm/funcs/logDrainsGetConfigurableLogDrain.d.ts.map +0 -1
- package/esm/funcs/logDrainsGetConfigurableLogDrain.js.map +0 -1
- package/esm/mcp-server/tools/integrationsGitNamespaces.d.ts +0 -7
- package/esm/mcp-server/tools/integrationsGitNamespaces.d.ts.map +0 -1
- package/esm/mcp-server/tools/integrationsGitNamespaces.js +0 -28
- package/esm/mcp-server/tools/integrationsGitNamespaces.js.map +0 -1
- package/esm/mcp-server/tools/integrationsSearchRepo.d.ts +0 -7
- package/esm/mcp-server/tools/integrationsSearchRepo.d.ts.map +0 -1
- package/esm/mcp-server/tools/integrationsSearchRepo.js +0 -28
- package/esm/mcp-server/tools/integrationsSearchRepo.js.map +0 -1
- package/esm/mcp-server/tools/logDrainsCreateConfigurableLogDrain.d.ts +0 -7
- package/esm/mcp-server/tools/logDrainsCreateConfigurableLogDrain.d.ts.map +0 -1
- package/esm/mcp-server/tools/logDrainsCreateConfigurableLogDrain.js +0 -28
- package/esm/mcp-server/tools/logDrainsCreateConfigurableLogDrain.js.map +0 -1
- package/esm/mcp-server/tools/logDrainsGetAllLogDrains.d.ts +0 -7
- package/esm/mcp-server/tools/logDrainsGetAllLogDrains.d.ts.map +0 -1
- package/esm/mcp-server/tools/logDrainsGetAllLogDrains.js +0 -28
- package/esm/mcp-server/tools/logDrainsGetAllLogDrains.js.map +0 -1
- package/esm/mcp-server/tools/logDrainsGetConfigurableLogDrain.d.ts +0 -7
- package/esm/mcp-server/tools/logDrainsGetConfigurableLogDrain.d.ts.map +0 -1
- package/esm/mcp-server/tools/logDrainsGetConfigurableLogDrain.js +0 -28
- package/esm/mcp-server/tools/logDrainsGetConfigurableLogDrain.js.map +0 -1
- package/esm/models/createconfigurablelogdrainop.d.ts +0 -451
- package/esm/models/createconfigurablelogdrainop.d.ts.map +0 -1
- package/esm/models/createconfigurablelogdrainop.js +0 -348
- package/esm/models/createconfigurablelogdrainop.js.map +0 -1
- package/esm/models/getalllogdrainsop.d.ts +0 -294
- package/esm/models/getalllogdrainsop.d.ts.map +0 -1
- package/esm/models/getalllogdrainsop.js +0 -231
- package/esm/models/getalllogdrainsop.js.map +0 -1
- package/esm/models/getconfigurablelogdrainop.d.ts +0 -292
- package/esm/models/getconfigurablelogdrainop.d.ts.map +0 -1
- package/esm/models/getconfigurablelogdrainop.js +0 -230
- package/esm/models/getconfigurablelogdrainop.js.map +0 -1
- package/esm/models/gitnamespacesop.d.ts +0 -126
- package/esm/models/gitnamespacesop.d.ts.map +0 -1
- package/esm/models/gitnamespacesop.js +0 -115
- package/esm/models/gitnamespacesop.js.map +0 -1
- package/esm/models/searchrepoop.d.ts +0 -421
- package/esm/models/searchrepoop.d.ts.map +0 -1
- package/esm/models/searchrepoop.js +0 -385
- package/esm/models/searchrepoop.js.map +0 -1
- package/src/funcs/integrationsSearchRepo.ts +0 -181
- package/src/funcs/logDrainsCreateConfigurableLogDrain.ts +0 -185
- package/src/funcs/logDrainsGetConfigurableLogDrain.ts +0 -199
- package/src/mcp-server/tools/integrationsGitNamespaces.ts +0 -37
- package/src/mcp-server/tools/integrationsSearchRepo.ts +0 -37
- package/src/mcp-server/tools/logDrainsCreateConfigurableLogDrain.ts +0 -39
- package/src/mcp-server/tools/logDrainsGetAllLogDrains.ts +0 -37
- package/src/mcp-server/tools/logDrainsGetConfigurableLogDrain.ts +0 -39
- package/src/models/createconfigurablelogdrainop.ts +0 -652
- package/src/models/getalllogdrainsop.ts +0 -416
- package/src/models/getconfigurablelogdrainop.ts +0 -420
- package/src/models/gitnamespacesop.ts +0 -235
- package/src/models/searchrepoop.ts +0 -784
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { VercelCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
CreateConfigurableLogDrainRequest,
|
|
15
|
-
CreateConfigurableLogDrainRequest$outboundSchema,
|
|
16
|
-
CreateConfigurableLogDrainResponseBody,
|
|
17
|
-
CreateConfigurableLogDrainResponseBody$inboundSchema,
|
|
18
|
-
} from "../models/createconfigurablelogdrainop.js";
|
|
19
|
-
import {
|
|
20
|
-
ConnectionError,
|
|
21
|
-
InvalidRequestError,
|
|
22
|
-
RequestAbortedError,
|
|
23
|
-
RequestTimeoutError,
|
|
24
|
-
UnexpectedClientError,
|
|
25
|
-
} from "../models/httpclienterrors.js";
|
|
26
|
-
import { SDKError } from "../models/sdkerror.js";
|
|
27
|
-
import { SDKValidationError } from "../models/sdkvalidationerror.js";
|
|
28
|
-
import {
|
|
29
|
-
VercelBadRequestError,
|
|
30
|
-
VercelBadRequestError$inboundSchema,
|
|
31
|
-
} from "../models/vercelbadrequesterror.js";
|
|
32
|
-
import {
|
|
33
|
-
VercelForbiddenError,
|
|
34
|
-
VercelForbiddenError$inboundSchema,
|
|
35
|
-
} from "../models/vercelforbiddenerror.js";
|
|
36
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
37
|
-
import { Result } from "../types/fp.js";
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Creates a Configurable Log Drain
|
|
41
|
-
*
|
|
42
|
-
* @remarks
|
|
43
|
-
* Creates a configurable log drain. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed)
|
|
44
|
-
*/
|
|
45
|
-
export function logDrainsCreateConfigurableLogDrain(
|
|
46
|
-
client: VercelCore,
|
|
47
|
-
request: CreateConfigurableLogDrainRequest,
|
|
48
|
-
options?: RequestOptions,
|
|
49
|
-
): APIPromise<
|
|
50
|
-
Result<
|
|
51
|
-
CreateConfigurableLogDrainResponseBody,
|
|
52
|
-
| VercelBadRequestError
|
|
53
|
-
| VercelForbiddenError
|
|
54
|
-
| SDKError
|
|
55
|
-
| SDKValidationError
|
|
56
|
-
| UnexpectedClientError
|
|
57
|
-
| InvalidRequestError
|
|
58
|
-
| RequestAbortedError
|
|
59
|
-
| RequestTimeoutError
|
|
60
|
-
| ConnectionError
|
|
61
|
-
>
|
|
62
|
-
> {
|
|
63
|
-
return new APIPromise($do(
|
|
64
|
-
client,
|
|
65
|
-
request,
|
|
66
|
-
options,
|
|
67
|
-
));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
async function $do(
|
|
71
|
-
client: VercelCore,
|
|
72
|
-
request: CreateConfigurableLogDrainRequest,
|
|
73
|
-
options?: RequestOptions,
|
|
74
|
-
): Promise<
|
|
75
|
-
[
|
|
76
|
-
Result<
|
|
77
|
-
CreateConfigurableLogDrainResponseBody,
|
|
78
|
-
| VercelBadRequestError
|
|
79
|
-
| VercelForbiddenError
|
|
80
|
-
| SDKError
|
|
81
|
-
| SDKValidationError
|
|
82
|
-
| UnexpectedClientError
|
|
83
|
-
| InvalidRequestError
|
|
84
|
-
| RequestAbortedError
|
|
85
|
-
| RequestTimeoutError
|
|
86
|
-
| ConnectionError
|
|
87
|
-
>,
|
|
88
|
-
APICall,
|
|
89
|
-
]
|
|
90
|
-
> {
|
|
91
|
-
const parsed = safeParse(
|
|
92
|
-
request,
|
|
93
|
-
(value) => CreateConfigurableLogDrainRequest$outboundSchema.parse(value),
|
|
94
|
-
"Input validation failed",
|
|
95
|
-
);
|
|
96
|
-
if (!parsed.ok) {
|
|
97
|
-
return [parsed, { status: "invalid" }];
|
|
98
|
-
}
|
|
99
|
-
const payload = parsed.value;
|
|
100
|
-
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
101
|
-
|
|
102
|
-
const path = pathToFunc("/v1/log-drains")();
|
|
103
|
-
|
|
104
|
-
const query = encodeFormQuery({
|
|
105
|
-
"slug": payload.slug,
|
|
106
|
-
"teamId": payload.teamId,
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
const headers = new Headers(compactMap({
|
|
110
|
-
"Content-Type": "application/json",
|
|
111
|
-
Accept: "application/json",
|
|
112
|
-
}));
|
|
113
|
-
|
|
114
|
-
const secConfig = await extractSecurity(client._options.bearerToken);
|
|
115
|
-
const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
|
|
116
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
117
|
-
|
|
118
|
-
const context = {
|
|
119
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
120
|
-
operationID: "createConfigurableLogDrain",
|
|
121
|
-
oAuth2Scopes: [],
|
|
122
|
-
|
|
123
|
-
resolvedSecurity: requestSecurity,
|
|
124
|
-
|
|
125
|
-
securitySource: client._options.bearerToken,
|
|
126
|
-
retryConfig: options?.retries
|
|
127
|
-
|| client._options.retryConfig
|
|
128
|
-
|| { strategy: "none" },
|
|
129
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
const requestRes = client._createRequest(context, {
|
|
133
|
-
security: requestSecurity,
|
|
134
|
-
method: "POST",
|
|
135
|
-
baseURL: options?.serverURL,
|
|
136
|
-
path: path,
|
|
137
|
-
headers: headers,
|
|
138
|
-
query: query,
|
|
139
|
-
body: body,
|
|
140
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
141
|
-
}, options);
|
|
142
|
-
if (!requestRes.ok) {
|
|
143
|
-
return [requestRes, { status: "invalid" }];
|
|
144
|
-
}
|
|
145
|
-
const req = requestRes.value;
|
|
146
|
-
|
|
147
|
-
const doResult = await client._do(req, {
|
|
148
|
-
context,
|
|
149
|
-
errorCodes: ["400", "401", "403", "4XX", "5XX"],
|
|
150
|
-
retryConfig: context.retryConfig,
|
|
151
|
-
retryCodes: context.retryCodes,
|
|
152
|
-
});
|
|
153
|
-
if (!doResult.ok) {
|
|
154
|
-
return [doResult, { status: "request-error", request: req }];
|
|
155
|
-
}
|
|
156
|
-
const response = doResult.value;
|
|
157
|
-
|
|
158
|
-
const responseFields = {
|
|
159
|
-
HttpMeta: { Response: response, Request: req },
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
const [result] = await M.match<
|
|
163
|
-
CreateConfigurableLogDrainResponseBody,
|
|
164
|
-
| VercelBadRequestError
|
|
165
|
-
| VercelForbiddenError
|
|
166
|
-
| SDKError
|
|
167
|
-
| SDKValidationError
|
|
168
|
-
| UnexpectedClientError
|
|
169
|
-
| InvalidRequestError
|
|
170
|
-
| RequestAbortedError
|
|
171
|
-
| RequestTimeoutError
|
|
172
|
-
| ConnectionError
|
|
173
|
-
>(
|
|
174
|
-
M.json(200, CreateConfigurableLogDrainResponseBody$inboundSchema),
|
|
175
|
-
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
176
|
-
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
177
|
-
M.fail([403, "4XX"]),
|
|
178
|
-
M.fail("5XX"),
|
|
179
|
-
)(response, { extraFields: responseFields });
|
|
180
|
-
if (!result.ok) {
|
|
181
|
-
return [result, { status: "complete", request: req, response }];
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
return [result, { status: "complete", request: req, response }];
|
|
185
|
-
}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { VercelCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
GetConfigurableLogDrainRequest,
|
|
15
|
-
GetConfigurableLogDrainRequest$outboundSchema,
|
|
16
|
-
GetConfigurableLogDrainResponseBody,
|
|
17
|
-
GetConfigurableLogDrainResponseBody$inboundSchema,
|
|
18
|
-
} from "../models/getconfigurablelogdrainop.js";
|
|
19
|
-
import {
|
|
20
|
-
ConnectionError,
|
|
21
|
-
InvalidRequestError,
|
|
22
|
-
RequestAbortedError,
|
|
23
|
-
RequestTimeoutError,
|
|
24
|
-
UnexpectedClientError,
|
|
25
|
-
} from "../models/httpclienterrors.js";
|
|
26
|
-
import { SDKError } from "../models/sdkerror.js";
|
|
27
|
-
import { SDKValidationError } from "../models/sdkvalidationerror.js";
|
|
28
|
-
import {
|
|
29
|
-
VercelBadRequestError,
|
|
30
|
-
VercelBadRequestError$inboundSchema,
|
|
31
|
-
} from "../models/vercelbadrequesterror.js";
|
|
32
|
-
import {
|
|
33
|
-
VercelForbiddenError,
|
|
34
|
-
VercelForbiddenError$inboundSchema,
|
|
35
|
-
} from "../models/vercelforbiddenerror.js";
|
|
36
|
-
import {
|
|
37
|
-
VercelNotFoundError,
|
|
38
|
-
VercelNotFoundError$inboundSchema,
|
|
39
|
-
} from "../models/vercelnotfounderror.js";
|
|
40
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
41
|
-
import { Result } from "../types/fp.js";
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Retrieves a Configurable Log Drain
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* Retrieves a Configurable Log Drain. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed). Only log drains owned by the authenticated team can be accessed.
|
|
48
|
-
*/
|
|
49
|
-
export function logDrainsGetConfigurableLogDrain(
|
|
50
|
-
client: VercelCore,
|
|
51
|
-
request: GetConfigurableLogDrainRequest,
|
|
52
|
-
options?: RequestOptions,
|
|
53
|
-
): APIPromise<
|
|
54
|
-
Result<
|
|
55
|
-
GetConfigurableLogDrainResponseBody,
|
|
56
|
-
| VercelBadRequestError
|
|
57
|
-
| VercelForbiddenError
|
|
58
|
-
| VercelNotFoundError
|
|
59
|
-
| SDKError
|
|
60
|
-
| SDKValidationError
|
|
61
|
-
| UnexpectedClientError
|
|
62
|
-
| InvalidRequestError
|
|
63
|
-
| RequestAbortedError
|
|
64
|
-
| RequestTimeoutError
|
|
65
|
-
| ConnectionError
|
|
66
|
-
>
|
|
67
|
-
> {
|
|
68
|
-
return new APIPromise($do(
|
|
69
|
-
client,
|
|
70
|
-
request,
|
|
71
|
-
options,
|
|
72
|
-
));
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
async function $do(
|
|
76
|
-
client: VercelCore,
|
|
77
|
-
request: GetConfigurableLogDrainRequest,
|
|
78
|
-
options?: RequestOptions,
|
|
79
|
-
): Promise<
|
|
80
|
-
[
|
|
81
|
-
Result<
|
|
82
|
-
GetConfigurableLogDrainResponseBody,
|
|
83
|
-
| VercelBadRequestError
|
|
84
|
-
| VercelForbiddenError
|
|
85
|
-
| VercelNotFoundError
|
|
86
|
-
| SDKError
|
|
87
|
-
| SDKValidationError
|
|
88
|
-
| UnexpectedClientError
|
|
89
|
-
| InvalidRequestError
|
|
90
|
-
| RequestAbortedError
|
|
91
|
-
| RequestTimeoutError
|
|
92
|
-
| ConnectionError
|
|
93
|
-
>,
|
|
94
|
-
APICall,
|
|
95
|
-
]
|
|
96
|
-
> {
|
|
97
|
-
const parsed = safeParse(
|
|
98
|
-
request,
|
|
99
|
-
(value) => GetConfigurableLogDrainRequest$outboundSchema.parse(value),
|
|
100
|
-
"Input validation failed",
|
|
101
|
-
);
|
|
102
|
-
if (!parsed.ok) {
|
|
103
|
-
return [parsed, { status: "invalid" }];
|
|
104
|
-
}
|
|
105
|
-
const payload = parsed.value;
|
|
106
|
-
const body = null;
|
|
107
|
-
|
|
108
|
-
const pathParams = {
|
|
109
|
-
id: encodeSimple("id", payload.id, {
|
|
110
|
-
explode: false,
|
|
111
|
-
charEncoding: "percent",
|
|
112
|
-
}),
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const path = pathToFunc("/v1/log-drains/{id}")(pathParams);
|
|
116
|
-
|
|
117
|
-
const query = encodeFormQuery({
|
|
118
|
-
"slug": payload.slug,
|
|
119
|
-
"teamId": payload.teamId,
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
const headers = new Headers(compactMap({
|
|
123
|
-
Accept: "application/json",
|
|
124
|
-
}));
|
|
125
|
-
|
|
126
|
-
const secConfig = await extractSecurity(client._options.bearerToken);
|
|
127
|
-
const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
|
|
128
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
129
|
-
|
|
130
|
-
const context = {
|
|
131
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
132
|
-
operationID: "getConfigurableLogDrain",
|
|
133
|
-
oAuth2Scopes: [],
|
|
134
|
-
|
|
135
|
-
resolvedSecurity: requestSecurity,
|
|
136
|
-
|
|
137
|
-
securitySource: client._options.bearerToken,
|
|
138
|
-
retryConfig: options?.retries
|
|
139
|
-
|| client._options.retryConfig
|
|
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: "GET",
|
|
147
|
-
baseURL: options?.serverURL,
|
|
148
|
-
path: path,
|
|
149
|
-
headers: headers,
|
|
150
|
-
query: query,
|
|
151
|
-
body: body,
|
|
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
|
-
errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
|
|
162
|
-
retryConfig: context.retryConfig,
|
|
163
|
-
retryCodes: context.retryCodes,
|
|
164
|
-
});
|
|
165
|
-
if (!doResult.ok) {
|
|
166
|
-
return [doResult, { status: "request-error", request: req }];
|
|
167
|
-
}
|
|
168
|
-
const response = doResult.value;
|
|
169
|
-
|
|
170
|
-
const responseFields = {
|
|
171
|
-
HttpMeta: { Response: response, Request: req },
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
const [result] = await M.match<
|
|
175
|
-
GetConfigurableLogDrainResponseBody,
|
|
176
|
-
| VercelBadRequestError
|
|
177
|
-
| VercelForbiddenError
|
|
178
|
-
| VercelNotFoundError
|
|
179
|
-
| SDKError
|
|
180
|
-
| SDKValidationError
|
|
181
|
-
| UnexpectedClientError
|
|
182
|
-
| InvalidRequestError
|
|
183
|
-
| RequestAbortedError
|
|
184
|
-
| RequestTimeoutError
|
|
185
|
-
| ConnectionError
|
|
186
|
-
>(
|
|
187
|
-
M.json(200, GetConfigurableLogDrainResponseBody$inboundSchema),
|
|
188
|
-
M.jsonErr(400, VercelBadRequestError$inboundSchema),
|
|
189
|
-
M.jsonErr(401, VercelForbiddenError$inboundSchema),
|
|
190
|
-
M.jsonErr(404, VercelNotFoundError$inboundSchema),
|
|
191
|
-
M.fail([403, "4XX"]),
|
|
192
|
-
M.fail("5XX"),
|
|
193
|
-
)(response, { extraFields: responseFields });
|
|
194
|
-
if (!result.ok) {
|
|
195
|
-
return [result, { status: "complete", request: req, response }];
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return [result, { status: "complete", request: req, response }];
|
|
199
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { integrationsGitNamespaces } from "../../funcs/integrationsGitNamespaces.js";
|
|
6
|
-
import { GitNamespacesRequest$inboundSchema } from "../../models/gitnamespacesop.js";
|
|
7
|
-
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
-
|
|
9
|
-
const args = {
|
|
10
|
-
request: GitNamespacesRequest$inboundSchema,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const tool$integrationsGitNamespaces: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "integrations-git-namespaces",
|
|
15
|
-
description: `List git namespaces by provider
|
|
16
|
-
|
|
17
|
-
Lists git namespaces for a supported provider. Supported providers are \`github\`, \`gitlab\` and \`bitbucket\`. If the provider is not provided, it will try to obtain it from the user that authenticated the request.`,
|
|
18
|
-
args,
|
|
19
|
-
tool: async (client, args, ctx) => {
|
|
20
|
-
const [result, apiCall] = await integrationsGitNamespaces(
|
|
21
|
-
client,
|
|
22
|
-
args.request,
|
|
23
|
-
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
-
).$inspect();
|
|
25
|
-
|
|
26
|
-
if (!result.ok) {
|
|
27
|
-
return {
|
|
28
|
-
content: [{ type: "text", text: result.error.message }],
|
|
29
|
-
isError: true,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const value = result.value;
|
|
34
|
-
|
|
35
|
-
return formatResult(value, apiCall);
|
|
36
|
-
},
|
|
37
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { integrationsSearchRepo } from "../../funcs/integrationsSearchRepo.js";
|
|
6
|
-
import { SearchRepoRequest$inboundSchema } from "../../models/searchrepoop.js";
|
|
7
|
-
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
-
|
|
9
|
-
const args = {
|
|
10
|
-
request: SearchRepoRequest$inboundSchema,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const tool$integrationsSearchRepo: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "integrations-search-repo",
|
|
15
|
-
description: `List git repositories linked to namespace by provider
|
|
16
|
-
|
|
17
|
-
Lists git repositories linked to a namespace \`id\` for a supported provider. A specific namespace \`id\` can be obtained via the \`git-namespaces\` endpoint. Supported providers are \`github\`, \`gitlab\` and \`bitbucket\`. If the provider or namespace is not provided, it will try to obtain it from the user that authenticated the request.`,
|
|
18
|
-
args,
|
|
19
|
-
tool: async (client, args, ctx) => {
|
|
20
|
-
const [result, apiCall] = await integrationsSearchRepo(
|
|
21
|
-
client,
|
|
22
|
-
args.request,
|
|
23
|
-
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
-
).$inspect();
|
|
25
|
-
|
|
26
|
-
if (!result.ok) {
|
|
27
|
-
return {
|
|
28
|
-
content: [{ type: "text", text: result.error.message }],
|
|
29
|
-
isError: true,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const value = result.value;
|
|
34
|
-
|
|
35
|
-
return formatResult(value, apiCall);
|
|
36
|
-
},
|
|
37
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { logDrainsCreateConfigurableLogDrain } from "../../funcs/logDrainsCreateConfigurableLogDrain.js";
|
|
6
|
-
import { CreateConfigurableLogDrainRequest$inboundSchema } from "../../models/createconfigurablelogdrainop.js";
|
|
7
|
-
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
-
|
|
9
|
-
const args = {
|
|
10
|
-
request: CreateConfigurableLogDrainRequest$inboundSchema,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const tool$logDrainsCreateConfigurableLogDrain: ToolDefinition<
|
|
14
|
-
typeof args
|
|
15
|
-
> = {
|
|
16
|
-
name: "log-drains-create-configurable-log-drain",
|
|
17
|
-
description: `Creates a Configurable Log Drain
|
|
18
|
-
|
|
19
|
-
Creates a configurable log drain. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed)`,
|
|
20
|
-
args,
|
|
21
|
-
tool: async (client, args, ctx) => {
|
|
22
|
-
const [result, apiCall] = await logDrainsCreateConfigurableLogDrain(
|
|
23
|
-
client,
|
|
24
|
-
args.request,
|
|
25
|
-
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
-
).$inspect();
|
|
27
|
-
|
|
28
|
-
if (!result.ok) {
|
|
29
|
-
return {
|
|
30
|
-
content: [{ type: "text", text: result.error.message }],
|
|
31
|
-
isError: true,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const value = result.value;
|
|
36
|
-
|
|
37
|
-
return formatResult(value, apiCall);
|
|
38
|
-
},
|
|
39
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { logDrainsGetAllLogDrains } from "../../funcs/logDrainsGetAllLogDrains.js";
|
|
6
|
-
import { GetAllLogDrainsRequest$inboundSchema } from "../../models/getalllogdrainsop.js";
|
|
7
|
-
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
-
|
|
9
|
-
const args = {
|
|
10
|
-
request: GetAllLogDrainsRequest$inboundSchema,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const tool$logDrainsGetAllLogDrains: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "log-drains-get-all-log-drains",
|
|
15
|
-
description: `Retrieves a list of all the Log Drains
|
|
16
|
-
|
|
17
|
-
Retrieves a list of all the Log Drains owned by the account. This endpoint must be called with an account AccessToken (integration OAuth2 clients are not allowed). Only log drains owned by the authenticated account can be accessed.`,
|
|
18
|
-
args,
|
|
19
|
-
tool: async (client, args, ctx) => {
|
|
20
|
-
const [result, apiCall] = await logDrainsGetAllLogDrains(
|
|
21
|
-
client,
|
|
22
|
-
args.request,
|
|
23
|
-
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
-
).$inspect();
|
|
25
|
-
|
|
26
|
-
if (!result.ok) {
|
|
27
|
-
return {
|
|
28
|
-
content: [{ type: "text", text: result.error.message }],
|
|
29
|
-
isError: true,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const value = result.value;
|
|
34
|
-
|
|
35
|
-
return formatResult(value, apiCall);
|
|
36
|
-
},
|
|
37
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { logDrainsGetConfigurableLogDrain } from "../../funcs/logDrainsGetConfigurableLogDrain.js";
|
|
6
|
-
import { GetConfigurableLogDrainRequest$inboundSchema } from "../../models/getconfigurablelogdrainop.js";
|
|
7
|
-
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
-
|
|
9
|
-
const args = {
|
|
10
|
-
request: GetConfigurableLogDrainRequest$inboundSchema,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const tool$logDrainsGetConfigurableLogDrain: ToolDefinition<
|
|
14
|
-
typeof args
|
|
15
|
-
> = {
|
|
16
|
-
name: "log-drains-get-configurable-log-drain",
|
|
17
|
-
description: `Retrieves a Configurable Log Drain
|
|
18
|
-
|
|
19
|
-
Retrieves a Configurable Log Drain. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed). Only log drains owned by the authenticated team can be accessed.`,
|
|
20
|
-
args,
|
|
21
|
-
tool: async (client, args, ctx) => {
|
|
22
|
-
const [result, apiCall] = await logDrainsGetConfigurableLogDrain(
|
|
23
|
-
client,
|
|
24
|
-
args.request,
|
|
25
|
-
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
-
).$inspect();
|
|
27
|
-
|
|
28
|
-
if (!result.ok) {
|
|
29
|
-
return {
|
|
30
|
-
content: [{ type: "text", text: result.error.message }],
|
|
31
|
-
isError: true,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const value = result.value;
|
|
36
|
-
|
|
37
|
-
return formatResult(value, apiCall);
|
|
38
|
-
},
|
|
39
|
-
};
|