@vercel/sdk 14.0.0-canary.7 → 14.0.0-canary.9
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/.devcontainer/README.md +1 -1
- package/README.md +25 -0
- package/docs/sdks/authentication/README.md +69 -0
- package/docs/sdks/marketplace/README.md +694 -0
- package/docs/sdks/projects/README.md +85 -0
- package/esm/funcs/authenticationExchangeSsoToken.d.ts +15 -0
- package/esm/funcs/authenticationExchangeSsoToken.d.ts.map +1 -0
- package/esm/funcs/authenticationExchangeSsoToken.js +66 -0
- package/esm/funcs/authenticationExchangeSsoToken.js.map +1 -0
- package/esm/funcs/marketplaceCreateEvent.d.ts +15 -0
- package/esm/funcs/marketplaceCreateEvent.d.ts.map +1 -0
- package/esm/funcs/marketplaceCreateEvent.js +73 -0
- package/esm/funcs/marketplaceCreateEvent.js.map +1 -0
- package/esm/funcs/marketplaceExchangeSsoToken.d.ts +15 -0
- package/esm/funcs/marketplaceExchangeSsoToken.d.ts.map +1 -0
- package/esm/funcs/marketplaceExchangeSsoToken.js +66 -0
- package/esm/funcs/marketplaceExchangeSsoToken.js.map +1 -0
- package/esm/funcs/marketplaceGetAccountInfo.d.ts +15 -0
- package/esm/funcs/marketplaceGetAccountInfo.d.ts.map +1 -0
- package/esm/funcs/marketplaceGetAccountInfo.js +71 -0
- package/esm/funcs/marketplaceGetAccountInfo.js.map +1 -0
- package/esm/funcs/marketplaceGetInvoice.d.ts +15 -0
- package/esm/funcs/marketplaceGetInvoice.d.ts.map +1 -0
- package/esm/funcs/marketplaceGetInvoice.js +75 -0
- package/esm/funcs/marketplaceGetInvoice.js.map +1 -0
- package/esm/funcs/marketplaceGetMember.d.ts +15 -0
- package/esm/funcs/marketplaceGetMember.d.ts.map +1 -0
- package/esm/funcs/marketplaceGetMember.js +75 -0
- package/esm/funcs/marketplaceGetMember.js.map +1 -0
- package/esm/funcs/marketplaceSubmitBillingData.d.ts +15 -0
- package/esm/funcs/marketplaceSubmitBillingData.d.ts.map +1 -0
- package/esm/funcs/marketplaceSubmitBillingData.js +73 -0
- package/esm/funcs/marketplaceSubmitBillingData.js.map +1 -0
- package/esm/funcs/marketplaceSubmitInvoice.d.ts +15 -0
- package/esm/funcs/marketplaceSubmitInvoice.d.ts.map +1 -0
- package/esm/funcs/marketplaceSubmitInvoice.js +72 -0
- package/esm/funcs/marketplaceSubmitInvoice.js.map +1 -0
- package/esm/funcs/marketplaceUpdateInvoice.d.ts +15 -0
- package/esm/funcs/marketplaceUpdateInvoice.d.ts.map +1 -0
- package/esm/funcs/marketplaceUpdateInvoice.js +77 -0
- package/esm/funcs/marketplaceUpdateInvoice.js.map +1 -0
- package/esm/funcs/marketplaceUpdateResourceSecrets.d.ts +15 -0
- package/esm/funcs/marketplaceUpdateResourceSecrets.d.ts.map +1 -0
- package/esm/funcs/marketplaceUpdateResourceSecrets.js +78 -0
- package/esm/funcs/marketplaceUpdateResourceSecrets.js.map +1 -0
- package/esm/funcs/projectsGetProjectDomains.d.ts +15 -0
- package/esm/funcs/projectsGetProjectDomains.d.ts.map +1 -0
- package/esm/funcs/projectsGetProjectDomains.js +89 -0
- package/esm/funcs/projectsGetProjectDomains.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/components/authuser.d.ts +6 -3
- package/esm/models/components/authuser.d.ts.map +1 -1
- package/esm/models/components/authuser.js +2 -1
- package/esm/models/components/authuser.js.map +1 -1
- package/esm/models/components/security.d.ts +2 -2
- package/esm/models/components/security.d.ts.map +1 -1
- package/esm/models/components/security.js +2 -2
- package/esm/models/components/security.js.map +1 -1
- package/esm/models/operations/createevent.d.ts +187 -0
- package/esm/models/operations/createevent.d.ts.map +1 -0
- package/esm/models/operations/createevent.js +195 -0
- package/esm/models/operations/createevent.js.map +1 -0
- package/esm/models/operations/createproject.d.ts +4 -0
- package/esm/models/operations/createproject.d.ts.map +1 -1
- package/esm/models/operations/createproject.js +4 -0
- package/esm/models/operations/createproject.js.map +1 -1
- package/esm/models/operations/createteam.d.ts +15 -15
- package/esm/models/operations/createteam.d.ts.map +1 -1
- package/esm/models/operations/createteam.js +15 -15
- package/esm/models/operations/createteam.js.map +1 -1
- package/esm/models/operations/deletedeployment.d.ts +8 -8
- package/esm/models/operations/deletedeployment.d.ts.map +1 -1
- package/esm/models/operations/deletedeployment.js +12 -12
- package/esm/models/operations/deletedeployment.js.map +1 -1
- package/esm/models/operations/exchangessotoken.d.ts +81 -0
- package/esm/models/operations/exchangessotoken.d.ts.map +1 -0
- package/esm/models/operations/exchangessotoken.js +93 -0
- package/esm/models/operations/exchangessotoken.js.map +1 -0
- package/esm/models/operations/getaccountinfo.d.ts +85 -0
- package/esm/models/operations/getaccountinfo.d.ts.map +1 -0
- package/esm/models/operations/getaccountinfo.js +87 -0
- package/esm/models/operations/getaccountinfo.js.map +1 -0
- package/esm/models/operations/getinvoice.d.ts +232 -0
- package/esm/models/operations/getinvoice.d.ts.map +1 -0
- package/esm/models/operations/getinvoice.js +219 -0
- package/esm/models/operations/getinvoice.js.map +1 -0
- package/esm/models/operations/getmember.d.ts +84 -0
- package/esm/models/operations/getmember.d.ts.map +1 -0
- package/esm/models/operations/getmember.js +79 -0
- package/esm/models/operations/getmember.js.map +1 -0
- package/esm/models/operations/getprojectdomains.d.ts +367 -0
- package/esm/models/operations/getprojectdomains.d.ts.map +1 -0
- package/esm/models/operations/getprojectdomains.js +272 -0
- package/esm/models/operations/getprojectdomains.js.map +1 -0
- package/esm/models/operations/getprojects.d.ts +4 -0
- package/esm/models/operations/getprojects.d.ts.map +1 -1
- package/esm/models/operations/getprojects.js +4 -0
- package/esm/models/operations/getprojects.js.map +1 -1
- package/esm/models/operations/putfirewallconfig.d.ts +44 -44
- package/esm/models/operations/putfirewallconfig.d.ts.map +1 -1
- package/esm/models/operations/putfirewallconfig.js +71 -72
- package/esm/models/operations/putfirewallconfig.js.map +1 -1
- package/esm/models/operations/submitbillingdata.d.ts +448 -0
- package/esm/models/operations/submitbillingdata.d.ts.map +1 -0
- package/esm/models/operations/submitbillingdata.js +355 -0
- package/esm/models/operations/submitbillingdata.js.map +1 -0
- package/esm/models/operations/submitinvoice.d.ts +299 -0
- package/esm/models/operations/submitinvoice.d.ts.map +1 -0
- package/esm/models/operations/submitinvoice.js +269 -0
- package/esm/models/operations/submitinvoice.js.map +1 -0
- package/esm/models/operations/updateinvoice.d.ts +91 -0
- package/esm/models/operations/updateinvoice.d.ts.map +1 -0
- package/esm/models/operations/updateinvoice.js +92 -0
- package/esm/models/operations/updateinvoice.js.map +1 -0
- package/esm/models/operations/updateproject.d.ts +4 -0
- package/esm/models/operations/updateproject.d.ts.map +1 -1
- package/esm/models/operations/updateproject.js +4 -0
- package/esm/models/operations/updateproject.js.map +1 -1
- package/esm/models/operations/updateprojectdatacache.d.ts +4 -0
- package/esm/models/operations/updateprojectdatacache.d.ts.map +1 -1
- package/esm/models/operations/updateprojectdatacache.js +4 -0
- package/esm/models/operations/updateprojectdatacache.js.map +1 -1
- package/esm/models/operations/updateresourcesecrets.d.ts +87 -0
- package/esm/models/operations/updateresourcesecrets.d.ts.map +1 -0
- package/esm/models/operations/updateresourcesecrets.js +100 -0
- package/esm/models/operations/updateresourcesecrets.js.map +1 -0
- package/esm/sdk/authentication.d.ts +8 -0
- package/esm/sdk/authentication.d.ts.map +1 -1
- package/esm/sdk/authentication.js +10 -0
- package/esm/sdk/authentication.js.map +1 -1
- package/esm/sdk/marketplace.d.ts +76 -0
- package/esm/sdk/marketplace.d.ts.map +1 -0
- package/esm/sdk/marketplace.js +98 -0
- package/esm/sdk/marketplace.js.map +1 -0
- package/esm/sdk/projects.d.ts +8 -0
- package/esm/sdk/projects.d.ts.map +1 -1
- package/esm/sdk/projects.js +10 -0
- package/esm/sdk/projects.js.map +1 -1
- package/esm/sdk/sdk.d.ts +5 -2
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +9 -4
- package/esm/sdk/sdk.js.map +1 -1
- package/package.json +2 -2
- package/src/funcs/authenticationExchangeSsoToken.ts +125 -0
- package/src/funcs/marketplaceCreateEvent.ts +137 -0
- package/src/funcs/marketplaceExchangeSsoToken.ts +125 -0
- package/src/funcs/marketplaceGetAccountInfo.ts +137 -0
- package/src/funcs/marketplaceGetInvoice.ts +141 -0
- package/src/funcs/marketplaceGetMember.ts +141 -0
- package/src/funcs/marketplaceSubmitBillingData.ts +137 -0
- package/src/funcs/marketplaceSubmitInvoice.ts +138 -0
- package/src/funcs/marketplaceUpdateInvoice.ts +141 -0
- package/src/funcs/marketplaceUpdateResourceSecrets.ts +146 -0
- package/src/funcs/projectsGetProjectDomains.ts +150 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/authuser.ts +2 -1
- package/src/models/components/security.ts +4 -4
- package/src/models/operations/createevent.ts +373 -0
- package/src/models/operations/createproject.ts +8 -0
- package/src/models/operations/createteam.ts +31 -24
- package/src/models/operations/deletedeployment.ts +16 -15
- package/src/models/operations/exchangessotoken.ts +192 -0
- package/src/models/operations/getaccountinfo.ts +187 -0
- package/src/models/operations/getinvoice.ts +454 -0
- package/src/models/operations/getmember.ts +160 -0
- package/src/models/operations/getprojectdomains.ts +571 -0
- package/src/models/operations/getprojects.ts +8 -0
- package/src/models/operations/putfirewallconfig.ts +102 -93
- package/src/models/operations/submitbillingdata.ts +813 -0
- package/src/models/operations/submitinvoice.ts +593 -0
- package/src/models/operations/updateinvoice.ts +180 -0
- package/src/models/operations/updateproject.ts +8 -0
- package/src/models/operations/updateprojectdatacache.ts +8 -0
- package/src/models/operations/updateresourcesecrets.ts +206 -0
- package/src/sdk/authentication.ts +22 -0
- package/src/sdk/marketplace.ts +194 -0
- package/src/sdk/projects.ts +22 -0
- package/src/sdk/sdk.ts +11 -5
package/esm/sdk/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk/sdk.ts"],"names":[],"mappings":"AAAA;;GAE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OAAO;;QACT,OAAO,OAAC,IAAI,CAAC,QAAQ,oCAAb,IAAI,CAAC,QAAQ,GAAK,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACxD,CAAC;IAGD,IAAI,KAAK;;QACP,OAAO,OAAC,IAAI,CAAC,MAAM,oCAAX,IAAI,CAAC,MAAM,GAAK,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpD,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/sdk",
|
|
3
|
-
"version": "14.0.0-canary.
|
|
3
|
+
"version": "14.0.0-canary.9",
|
|
4
4
|
"author": "Speakeasy",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./esm/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
|
-
"url": "https://github.com/vercel/
|
|
28
|
+
"url": "https://github.com/vercel/sdk.git",
|
|
29
29
|
"directory": "packages/sdk"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { VercelCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import {
|
|
12
|
+
ConnectionError,
|
|
13
|
+
InvalidRequestError,
|
|
14
|
+
RequestAbortedError,
|
|
15
|
+
RequestTimeoutError,
|
|
16
|
+
UnexpectedClientError,
|
|
17
|
+
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
19
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
20
|
+
import {
|
|
21
|
+
ExchangeSsoTokenRequestBody,
|
|
22
|
+
ExchangeSsoTokenRequestBody$outboundSchema,
|
|
23
|
+
ExchangeSsoTokenResponseBody,
|
|
24
|
+
ExchangeSsoTokenResponseBody$inboundSchema,
|
|
25
|
+
} from "../models/operations/exchangessotoken.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* SSO Token Exchange
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* During the autorization process, Vercel sends the user to the provider [redirectLoginUrl](https://vercel.com/docs/integrations/create-integration/submit-integration#redirect-login-url), that includes the OAuth authorization `code` parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Vercel account using deep-link parameters included the redirectLoginUrl. This is used to verify the identity of the user during the [**Open in Provider** flow](https://vercel.com/docs/integrations/marketplace-flows#open-in-provider-button-flow). Providers should not persist the returned `id_token` in a database since the token will expire.
|
|
33
|
+
*/
|
|
34
|
+
export async function authenticationExchangeSsoToken(
|
|
35
|
+
client: VercelCore,
|
|
36
|
+
request?: ExchangeSsoTokenRequestBody | undefined,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): Promise<
|
|
39
|
+
Result<
|
|
40
|
+
ExchangeSsoTokenResponseBody,
|
|
41
|
+
| SDKError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
const parsed = safeParse(
|
|
51
|
+
request,
|
|
52
|
+
(value) =>
|
|
53
|
+
ExchangeSsoTokenRequestBody$outboundSchema.optional().parse(value),
|
|
54
|
+
"Input validation failed",
|
|
55
|
+
);
|
|
56
|
+
if (!parsed.ok) {
|
|
57
|
+
return parsed;
|
|
58
|
+
}
|
|
59
|
+
const payload = parsed.value;
|
|
60
|
+
const body = payload === undefined
|
|
61
|
+
? null
|
|
62
|
+
: encodeJSON("body", payload, { explode: true });
|
|
63
|
+
|
|
64
|
+
const path = pathToFunc("/v1/integrations/sso/token")();
|
|
65
|
+
|
|
66
|
+
const headers = new Headers({
|
|
67
|
+
"Content-Type": "application/json",
|
|
68
|
+
Accept: "application/json",
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const context = {
|
|
72
|
+
operationID: "exchange-sso-token",
|
|
73
|
+
oAuth2Scopes: [],
|
|
74
|
+
|
|
75
|
+
resolvedSecurity: null,
|
|
76
|
+
|
|
77
|
+
securitySource: null,
|
|
78
|
+
retryConfig: options?.retries
|
|
79
|
+
|| client._options.retryConfig
|
|
80
|
+
|| { strategy: "none" },
|
|
81
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const requestRes = client._createRequest(context, {
|
|
85
|
+
method: "POST",
|
|
86
|
+
path: path,
|
|
87
|
+
headers: headers,
|
|
88
|
+
body: body,
|
|
89
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
90
|
+
}, options);
|
|
91
|
+
if (!requestRes.ok) {
|
|
92
|
+
return requestRes;
|
|
93
|
+
}
|
|
94
|
+
const req = requestRes.value;
|
|
95
|
+
|
|
96
|
+
const doResult = await client._do(req, {
|
|
97
|
+
context,
|
|
98
|
+
errorCodes: ["400", "404", "4XX", "500", "5XX"],
|
|
99
|
+
retryConfig: context.retryConfig,
|
|
100
|
+
retryCodes: context.retryCodes,
|
|
101
|
+
});
|
|
102
|
+
if (!doResult.ok) {
|
|
103
|
+
return doResult;
|
|
104
|
+
}
|
|
105
|
+
const response = doResult.value;
|
|
106
|
+
|
|
107
|
+
const [result] = await M.match<
|
|
108
|
+
ExchangeSsoTokenResponseBody,
|
|
109
|
+
| SDKError
|
|
110
|
+
| SDKValidationError
|
|
111
|
+
| UnexpectedClientError
|
|
112
|
+
| InvalidRequestError
|
|
113
|
+
| RequestAbortedError
|
|
114
|
+
| RequestTimeoutError
|
|
115
|
+
| ConnectionError
|
|
116
|
+
>(
|
|
117
|
+
M.json(200, ExchangeSsoTokenResponseBody$inboundSchema),
|
|
118
|
+
M.fail([400, 404, "4XX", 500, "5XX"]),
|
|
119
|
+
)(response);
|
|
120
|
+
if (!result.ok) {
|
|
121
|
+
return result;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { VercelCore } from "../core.js";
|
|
7
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.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
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
21
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
|
+
import {
|
|
23
|
+
CreateEventRequest,
|
|
24
|
+
CreateEventRequest$outboundSchema,
|
|
25
|
+
} from "../models/operations/createevent.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Create Event
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Partner notifies Vercel of any changes made to an Installation or a Resource. Vercel is expected to use `list-resources` and other read APIs to get the new state. <br/> <br/> `resource.updated` event should be dispatched when any state of a resource linked to Vercel is modified by the partner. <br/> <br/> Use cases: <br/> <br/> - The user renames a database in the partner’s application. The partner should dispatch a `resource.updated` event to notify Vercel to update the resource in Vercel’s datastores. <br/>
|
|
33
|
+
*/
|
|
34
|
+
export async function marketplaceCreateEvent(
|
|
35
|
+
client: VercelCore,
|
|
36
|
+
request: CreateEventRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): Promise<
|
|
39
|
+
Result<
|
|
40
|
+
void,
|
|
41
|
+
| SDKError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
const parsed = safeParse(
|
|
51
|
+
request,
|
|
52
|
+
(value) => CreateEventRequest$outboundSchema.parse(value),
|
|
53
|
+
"Input validation failed",
|
|
54
|
+
);
|
|
55
|
+
if (!parsed.ok) {
|
|
56
|
+
return parsed;
|
|
57
|
+
}
|
|
58
|
+
const payload = parsed.value;
|
|
59
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
60
|
+
|
|
61
|
+
const pathParams = {
|
|
62
|
+
integrationConfigurationId: encodeSimple(
|
|
63
|
+
"integrationConfigurationId",
|
|
64
|
+
payload.integrationConfigurationId,
|
|
65
|
+
{ explode: false, charEncoding: "percent" },
|
|
66
|
+
),
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const path = pathToFunc(
|
|
70
|
+
"/v1/installations/{integrationConfigurationId}/events",
|
|
71
|
+
)(pathParams);
|
|
72
|
+
|
|
73
|
+
const headers = new Headers({
|
|
74
|
+
"Content-Type": "application/json",
|
|
75
|
+
Accept: "*/*",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const secConfig = await extractSecurity(client._options.bearerToken);
|
|
79
|
+
const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
|
|
80
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
81
|
+
|
|
82
|
+
const context = {
|
|
83
|
+
operationID: "create-event",
|
|
84
|
+
oAuth2Scopes: [],
|
|
85
|
+
|
|
86
|
+
resolvedSecurity: requestSecurity,
|
|
87
|
+
|
|
88
|
+
securitySource: client._options.bearerToken,
|
|
89
|
+
retryConfig: options?.retries
|
|
90
|
+
|| client._options.retryConfig
|
|
91
|
+
|| { strategy: "none" },
|
|
92
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const requestRes = client._createRequest(context, {
|
|
96
|
+
security: requestSecurity,
|
|
97
|
+
method: "POST",
|
|
98
|
+
path: path,
|
|
99
|
+
headers: headers,
|
|
100
|
+
body: body,
|
|
101
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
102
|
+
}, options);
|
|
103
|
+
if (!requestRes.ok) {
|
|
104
|
+
return requestRes;
|
|
105
|
+
}
|
|
106
|
+
const req = requestRes.value;
|
|
107
|
+
|
|
108
|
+
const doResult = await client._do(req, {
|
|
109
|
+
context,
|
|
110
|
+
errorCodes: ["400", "401", "403", "4XX", "5XX"],
|
|
111
|
+
retryConfig: context.retryConfig,
|
|
112
|
+
retryCodes: context.retryCodes,
|
|
113
|
+
});
|
|
114
|
+
if (!doResult.ok) {
|
|
115
|
+
return doResult;
|
|
116
|
+
}
|
|
117
|
+
const response = doResult.value;
|
|
118
|
+
|
|
119
|
+
const [result] = await M.match<
|
|
120
|
+
void,
|
|
121
|
+
| SDKError
|
|
122
|
+
| SDKValidationError
|
|
123
|
+
| UnexpectedClientError
|
|
124
|
+
| InvalidRequestError
|
|
125
|
+
| RequestAbortedError
|
|
126
|
+
| RequestTimeoutError
|
|
127
|
+
| ConnectionError
|
|
128
|
+
>(
|
|
129
|
+
M.nil(201, z.void()),
|
|
130
|
+
M.fail([400, 401, 403, "4XX", "5XX"]),
|
|
131
|
+
)(response);
|
|
132
|
+
if (!result.ok) {
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { VercelCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import {
|
|
12
|
+
ConnectionError,
|
|
13
|
+
InvalidRequestError,
|
|
14
|
+
RequestAbortedError,
|
|
15
|
+
RequestTimeoutError,
|
|
16
|
+
UnexpectedClientError,
|
|
17
|
+
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
19
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
20
|
+
import {
|
|
21
|
+
ExchangeSsoTokenRequestBody,
|
|
22
|
+
ExchangeSsoTokenRequestBody$outboundSchema,
|
|
23
|
+
ExchangeSsoTokenResponseBody,
|
|
24
|
+
ExchangeSsoTokenResponseBody$inboundSchema,
|
|
25
|
+
} from "../models/operations/exchangessotoken.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* SSO Token Exchange
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* During the autorization process, Vercel sends the user to the provider [redirectLoginUrl](https://vercel.com/docs/integrations/create-integration/submit-integration#redirect-login-url), that includes the OAuth authorization `code` parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Vercel account using deep-link parameters included the redirectLoginUrl. This is used to verify the identity of the user during the [**Open in Provider** flow](https://vercel.com/docs/integrations/marketplace-flows#open-in-provider-button-flow). Providers should not persist the returned `id_token` in a database since the token will expire.
|
|
33
|
+
*/
|
|
34
|
+
export async function marketplaceExchangeSsoToken(
|
|
35
|
+
client: VercelCore,
|
|
36
|
+
request?: ExchangeSsoTokenRequestBody | undefined,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): Promise<
|
|
39
|
+
Result<
|
|
40
|
+
ExchangeSsoTokenResponseBody,
|
|
41
|
+
| SDKError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
const parsed = safeParse(
|
|
51
|
+
request,
|
|
52
|
+
(value) =>
|
|
53
|
+
ExchangeSsoTokenRequestBody$outboundSchema.optional().parse(value),
|
|
54
|
+
"Input validation failed",
|
|
55
|
+
);
|
|
56
|
+
if (!parsed.ok) {
|
|
57
|
+
return parsed;
|
|
58
|
+
}
|
|
59
|
+
const payload = parsed.value;
|
|
60
|
+
const body = payload === undefined
|
|
61
|
+
? null
|
|
62
|
+
: encodeJSON("body", payload, { explode: true });
|
|
63
|
+
|
|
64
|
+
const path = pathToFunc("/v1/integrations/sso/token")();
|
|
65
|
+
|
|
66
|
+
const headers = new Headers({
|
|
67
|
+
"Content-Type": "application/json",
|
|
68
|
+
Accept: "application/json",
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const context = {
|
|
72
|
+
operationID: "exchange-sso-token",
|
|
73
|
+
oAuth2Scopes: [],
|
|
74
|
+
|
|
75
|
+
resolvedSecurity: null,
|
|
76
|
+
|
|
77
|
+
securitySource: null,
|
|
78
|
+
retryConfig: options?.retries
|
|
79
|
+
|| client._options.retryConfig
|
|
80
|
+
|| { strategy: "none" },
|
|
81
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const requestRes = client._createRequest(context, {
|
|
85
|
+
method: "POST",
|
|
86
|
+
path: path,
|
|
87
|
+
headers: headers,
|
|
88
|
+
body: body,
|
|
89
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
90
|
+
}, options);
|
|
91
|
+
if (!requestRes.ok) {
|
|
92
|
+
return requestRes;
|
|
93
|
+
}
|
|
94
|
+
const req = requestRes.value;
|
|
95
|
+
|
|
96
|
+
const doResult = await client._do(req, {
|
|
97
|
+
context,
|
|
98
|
+
errorCodes: ["400", "404", "4XX", "500", "5XX"],
|
|
99
|
+
retryConfig: context.retryConfig,
|
|
100
|
+
retryCodes: context.retryCodes,
|
|
101
|
+
});
|
|
102
|
+
if (!doResult.ok) {
|
|
103
|
+
return doResult;
|
|
104
|
+
}
|
|
105
|
+
const response = doResult.value;
|
|
106
|
+
|
|
107
|
+
const [result] = await M.match<
|
|
108
|
+
ExchangeSsoTokenResponseBody,
|
|
109
|
+
| SDKError
|
|
110
|
+
| SDKValidationError
|
|
111
|
+
| UnexpectedClientError
|
|
112
|
+
| InvalidRequestError
|
|
113
|
+
| RequestAbortedError
|
|
114
|
+
| RequestTimeoutError
|
|
115
|
+
| ConnectionError
|
|
116
|
+
>(
|
|
117
|
+
M.json(200, ExchangeSsoTokenResponseBody$inboundSchema),
|
|
118
|
+
M.fail([400, 404, "4XX", 500, "5XX"]),
|
|
119
|
+
)(response);
|
|
120
|
+
if (!result.ok) {
|
|
121
|
+
return result;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { VercelCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/httpclienterrors.js";
|
|
19
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
20
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
|
+
import {
|
|
22
|
+
GetAccountInfoRequest,
|
|
23
|
+
GetAccountInfoRequest$outboundSchema,
|
|
24
|
+
GetAccountInfoResponseBody,
|
|
25
|
+
GetAccountInfoResponseBody$inboundSchema,
|
|
26
|
+
} from "../models/operations/getaccountinfo.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get Account Information
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Fetches the best account or user’s contact info
|
|
34
|
+
*/
|
|
35
|
+
export async function marketplaceGetAccountInfo(
|
|
36
|
+
client: VercelCore,
|
|
37
|
+
request: GetAccountInfoRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): Promise<
|
|
40
|
+
Result<
|
|
41
|
+
GetAccountInfoResponseBody,
|
|
42
|
+
| SDKError
|
|
43
|
+
| SDKValidationError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| ConnectionError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
const parsed = safeParse(
|
|
52
|
+
request,
|
|
53
|
+
(value) => GetAccountInfoRequest$outboundSchema.parse(value),
|
|
54
|
+
"Input validation failed",
|
|
55
|
+
);
|
|
56
|
+
if (!parsed.ok) {
|
|
57
|
+
return parsed;
|
|
58
|
+
}
|
|
59
|
+
const payload = parsed.value;
|
|
60
|
+
const body = null;
|
|
61
|
+
|
|
62
|
+
const pathParams = {
|
|
63
|
+
integrationConfigurationId: encodeSimple(
|
|
64
|
+
"integrationConfigurationId",
|
|
65
|
+
payload.integrationConfigurationId,
|
|
66
|
+
{ explode: false, charEncoding: "percent" },
|
|
67
|
+
),
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const path = pathToFunc(
|
|
71
|
+
"/v1/installations/{integrationConfigurationId}/account",
|
|
72
|
+
)(pathParams);
|
|
73
|
+
|
|
74
|
+
const headers = new Headers({
|
|
75
|
+
Accept: "application/json",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const secConfig = await extractSecurity(client._options.bearerToken);
|
|
79
|
+
const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
|
|
80
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
81
|
+
|
|
82
|
+
const context = {
|
|
83
|
+
operationID: "get-account-info",
|
|
84
|
+
oAuth2Scopes: [],
|
|
85
|
+
|
|
86
|
+
resolvedSecurity: requestSecurity,
|
|
87
|
+
|
|
88
|
+
securitySource: client._options.bearerToken,
|
|
89
|
+
retryConfig: options?.retries
|
|
90
|
+
|| client._options.retryConfig
|
|
91
|
+
|| { strategy: "none" },
|
|
92
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const requestRes = client._createRequest(context, {
|
|
96
|
+
security: requestSecurity,
|
|
97
|
+
method: "GET",
|
|
98
|
+
path: path,
|
|
99
|
+
headers: headers,
|
|
100
|
+
body: body,
|
|
101
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
102
|
+
}, options);
|
|
103
|
+
if (!requestRes.ok) {
|
|
104
|
+
return requestRes;
|
|
105
|
+
}
|
|
106
|
+
const req = requestRes.value;
|
|
107
|
+
|
|
108
|
+
const doResult = await client._do(req, {
|
|
109
|
+
context,
|
|
110
|
+
errorCodes: ["400", "401", "403", "4XX", "5XX"],
|
|
111
|
+
retryConfig: context.retryConfig,
|
|
112
|
+
retryCodes: context.retryCodes,
|
|
113
|
+
});
|
|
114
|
+
if (!doResult.ok) {
|
|
115
|
+
return doResult;
|
|
116
|
+
}
|
|
117
|
+
const response = doResult.value;
|
|
118
|
+
|
|
119
|
+
const [result] = await M.match<
|
|
120
|
+
GetAccountInfoResponseBody,
|
|
121
|
+
| SDKError
|
|
122
|
+
| SDKValidationError
|
|
123
|
+
| UnexpectedClientError
|
|
124
|
+
| InvalidRequestError
|
|
125
|
+
| RequestAbortedError
|
|
126
|
+
| RequestTimeoutError
|
|
127
|
+
| ConnectionError
|
|
128
|
+
>(
|
|
129
|
+
M.json(200, GetAccountInfoResponseBody$inboundSchema),
|
|
130
|
+
M.fail([400, 401, 403, "4XX", "5XX"]),
|
|
131
|
+
)(response);
|
|
132
|
+
if (!result.ok) {
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { VercelCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/httpclienterrors.js";
|
|
19
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
20
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
|
+
import {
|
|
22
|
+
GetInvoiceRequest,
|
|
23
|
+
GetInvoiceRequest$outboundSchema,
|
|
24
|
+
GetInvoiceResponseBody,
|
|
25
|
+
GetInvoiceResponseBody$inboundSchema,
|
|
26
|
+
} from "../models/operations/getinvoice.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get Invoice
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Get Invoice details and status for a given invoice ID.<br/> <br/> See Billing Events with Webhooks documentation on how to receive invoice events. This endpoint is used to retrieve the invoice details.
|
|
34
|
+
*/
|
|
35
|
+
export async function marketplaceGetInvoice(
|
|
36
|
+
client: VercelCore,
|
|
37
|
+
request: GetInvoiceRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): Promise<
|
|
40
|
+
Result<
|
|
41
|
+
GetInvoiceResponseBody,
|
|
42
|
+
| SDKError
|
|
43
|
+
| SDKValidationError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| ConnectionError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
const parsed = safeParse(
|
|
52
|
+
request,
|
|
53
|
+
(value) => GetInvoiceRequest$outboundSchema.parse(value),
|
|
54
|
+
"Input validation failed",
|
|
55
|
+
);
|
|
56
|
+
if (!parsed.ok) {
|
|
57
|
+
return parsed;
|
|
58
|
+
}
|
|
59
|
+
const payload = parsed.value;
|
|
60
|
+
const body = null;
|
|
61
|
+
|
|
62
|
+
const pathParams = {
|
|
63
|
+
integrationConfigurationId: encodeSimple(
|
|
64
|
+
"integrationConfigurationId",
|
|
65
|
+
payload.integrationConfigurationId,
|
|
66
|
+
{ explode: false, charEncoding: "percent" },
|
|
67
|
+
),
|
|
68
|
+
invoiceId: encodeSimple("invoiceId", payload.invoiceId, {
|
|
69
|
+
explode: false,
|
|
70
|
+
charEncoding: "percent",
|
|
71
|
+
}),
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const path = pathToFunc(
|
|
75
|
+
"/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}",
|
|
76
|
+
)(pathParams);
|
|
77
|
+
|
|
78
|
+
const headers = new Headers({
|
|
79
|
+
Accept: "application/json",
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const secConfig = await extractSecurity(client._options.bearerToken);
|
|
83
|
+
const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
|
|
84
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
85
|
+
|
|
86
|
+
const context = {
|
|
87
|
+
operationID: "get-invoice",
|
|
88
|
+
oAuth2Scopes: [],
|
|
89
|
+
|
|
90
|
+
resolvedSecurity: requestSecurity,
|
|
91
|
+
|
|
92
|
+
securitySource: client._options.bearerToken,
|
|
93
|
+
retryConfig: options?.retries
|
|
94
|
+
|| client._options.retryConfig
|
|
95
|
+
|| { strategy: "none" },
|
|
96
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const requestRes = client._createRequest(context, {
|
|
100
|
+
security: requestSecurity,
|
|
101
|
+
method: "GET",
|
|
102
|
+
path: path,
|
|
103
|
+
headers: headers,
|
|
104
|
+
body: body,
|
|
105
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
106
|
+
}, options);
|
|
107
|
+
if (!requestRes.ok) {
|
|
108
|
+
return requestRes;
|
|
109
|
+
}
|
|
110
|
+
const req = requestRes.value;
|
|
111
|
+
|
|
112
|
+
const doResult = await client._do(req, {
|
|
113
|
+
context,
|
|
114
|
+
errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
|
|
115
|
+
retryConfig: context.retryConfig,
|
|
116
|
+
retryCodes: context.retryCodes,
|
|
117
|
+
});
|
|
118
|
+
if (!doResult.ok) {
|
|
119
|
+
return doResult;
|
|
120
|
+
}
|
|
121
|
+
const response = doResult.value;
|
|
122
|
+
|
|
123
|
+
const [result] = await M.match<
|
|
124
|
+
GetInvoiceResponseBody,
|
|
125
|
+
| SDKError
|
|
126
|
+
| SDKValidationError
|
|
127
|
+
| UnexpectedClientError
|
|
128
|
+
| InvalidRequestError
|
|
129
|
+
| RequestAbortedError
|
|
130
|
+
| RequestTimeoutError
|
|
131
|
+
| ConnectionError
|
|
132
|
+
>(
|
|
133
|
+
M.json(200, GetInvoiceResponseBody$inboundSchema),
|
|
134
|
+
M.fail([400, 401, 403, 404, "4XX", "5XX"]),
|
|
135
|
+
)(response);
|
|
136
|
+
if (!result.ok) {
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return result;
|
|
141
|
+
}
|