@vercel/sdk 14.0.0-canary.5 → 14.0.0-canary.6

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.
Files changed (129) hide show
  1. package/README.md +0 -11
  2. package/docs/sdks/projects/README.md +8 -12
  3. package/esm/funcs/projectsPauseProject.d.ts +2 -2
  4. package/esm/funcs/projectsPauseProject.d.ts.map +1 -1
  5. package/esm/funcs/projectsPauseProject.js +4 -3
  6. package/esm/funcs/projectsPauseProject.js.map +1 -1
  7. package/esm/funcs/projectsUnpauseProject.d.ts +2 -2
  8. package/esm/funcs/projectsUnpauseProject.d.ts.map +1 -1
  9. package/esm/funcs/projectsUnpauseProject.js +4 -3
  10. package/esm/funcs/projectsUnpauseProject.js.map +1 -1
  11. package/esm/lib/config.d.ts +3 -3
  12. package/esm/lib/config.js +3 -3
  13. package/esm/models/operations/createproject.d.ts +91 -9
  14. package/esm/models/operations/createproject.d.ts.map +1 -1
  15. package/esm/models/operations/createproject.js +55 -3
  16. package/esm/models/operations/createproject.js.map +1 -1
  17. package/esm/models/operations/createprojectenv.d.ts +6 -6
  18. package/esm/models/operations/createprojectenv.js +2 -2
  19. package/esm/models/operations/createprojectenv.js.map +1 -1
  20. package/esm/models/operations/createwebhook.d.ts +12 -6
  21. package/esm/models/operations/createwebhook.d.ts.map +1 -1
  22. package/esm/models/operations/createwebhook.js +4 -2
  23. package/esm/models/operations/createwebhook.js.map +1 -1
  24. package/esm/models/operations/editprojectenv.d.ts +3 -3
  25. package/esm/models/operations/editprojectenv.js +1 -1
  26. package/esm/models/operations/editprojectenv.js.map +1 -1
  27. package/esm/models/operations/getprojects.d.ts +82 -0
  28. package/esm/models/operations/getprojects.d.ts.map +1 -1
  29. package/esm/models/operations/getprojects.js +52 -0
  30. package/esm/models/operations/getprojects.js.map +1 -1
  31. package/esm/models/operations/getwebhook.d.ts +6 -3
  32. package/esm/models/operations/getwebhook.d.ts.map +1 -1
  33. package/esm/models/operations/getwebhook.js +2 -1
  34. package/esm/models/operations/getwebhook.js.map +1 -1
  35. package/esm/models/operations/getwebhooks.d.ts +12 -6
  36. package/esm/models/operations/getwebhooks.d.ts.map +1 -1
  37. package/esm/models/operations/getwebhooks.js +4 -2
  38. package/esm/models/operations/getwebhooks.js.map +1 -1
  39. package/esm/models/operations/pauseproject.d.ts +0 -32
  40. package/esm/models/operations/pauseproject.d.ts.map +1 -1
  41. package/esm/models/operations/pauseproject.js +0 -25
  42. package/esm/models/operations/pauseproject.js.map +1 -1
  43. package/esm/models/operations/removeprojectenv.d.ts +9 -9
  44. package/esm/models/operations/removeprojectenv.js +3 -3
  45. package/esm/models/operations/removeprojectenv.js.map +1 -1
  46. package/esm/models/operations/unpauseproject.d.ts +0 -32
  47. package/esm/models/operations/unpauseproject.d.ts.map +1 -1
  48. package/esm/models/operations/unpauseproject.js +0 -25
  49. package/esm/models/operations/unpauseproject.js.map +1 -1
  50. package/esm/models/operations/updateproject.d.ts +91 -9
  51. package/esm/models/operations/updateproject.d.ts.map +1 -1
  52. package/esm/models/operations/updateproject.js +55 -3
  53. package/esm/models/operations/updateproject.js.map +1 -1
  54. package/esm/models/operations/updateprojectdatacache.d.ts +82 -0
  55. package/esm/models/operations/updateprojectdatacache.d.ts.map +1 -1
  56. package/esm/models/operations/updateprojectdatacache.js +51 -0
  57. package/esm/models/operations/updateprojectdatacache.js.map +1 -1
  58. package/esm/sdk/projects.d.ts +4 -4
  59. package/esm/sdk/projects.d.ts.map +1 -1
  60. package/esm/sdk/projects.js.map +1 -1
  61. package/esm/sdk/sdk.d.ts +0 -3
  62. package/esm/sdk/sdk.d.ts.map +1 -1
  63. package/esm/sdk/sdk.js +0 -5
  64. package/esm/sdk/sdk.js.map +1 -1
  65. package/package.json +9 -6
  66. package/src/funcs/projectsPauseProject.ts +5 -6
  67. package/src/funcs/projectsUnpauseProject.ts +5 -6
  68. package/src/lib/config.ts +3 -3
  69. package/src/models/operations/createproject.ts +133 -3
  70. package/src/models/operations/createprojectenv.ts +2 -2
  71. package/src/models/operations/createwebhook.ts +4 -2
  72. package/src/models/operations/editprojectenv.ts +1 -1
  73. package/src/models/operations/getprojects.ts +130 -0
  74. package/src/models/operations/getwebhook.ts +2 -1
  75. package/src/models/operations/getwebhooks.ts +4 -2
  76. package/src/models/operations/pauseproject.ts +0 -55
  77. package/src/models/operations/removeprojectenv.ts +3 -3
  78. package/src/models/operations/unpauseproject.ts +0 -55
  79. package/src/models/operations/updateproject.ts +133 -3
  80. package/src/models/operations/updateprojectdatacache.ts +125 -0
  81. package/src/sdk/projects.ts +4 -10
  82. package/src/sdk/sdk.ts +0 -6
  83. package/LICENSE +0 -202
  84. package/docs/sdks/secrets/README.md +0 -331
  85. package/esm/funcs/secretsCreateSecret.d.ts +0 -15
  86. package/esm/funcs/secretsCreateSecret.d.ts.map +0 -1
  87. package/esm/funcs/secretsCreateSecret.js +0 -74
  88. package/esm/funcs/secretsCreateSecret.js.map +0 -1
  89. package/esm/funcs/secretsDeleteSecret.d.ts +0 -15
  90. package/esm/funcs/secretsDeleteSecret.d.ts.map +0 -1
  91. package/esm/funcs/secretsDeleteSecret.js +0 -79
  92. package/esm/funcs/secretsDeleteSecret.js.map +0 -1
  93. package/esm/funcs/secretsGetSecret.d.ts +0 -15
  94. package/esm/funcs/secretsGetSecret.d.ts.map +0 -1
  95. package/esm/funcs/secretsGetSecret.js +0 -80
  96. package/esm/funcs/secretsGetSecret.js.map +0 -1
  97. package/esm/funcs/secretsRenameSecret.d.ts +0 -15
  98. package/esm/funcs/secretsRenameSecret.d.ts.map +0 -1
  99. package/esm/funcs/secretsRenameSecret.js +0 -80
  100. package/esm/funcs/secretsRenameSecret.js.map +0 -1
  101. package/esm/models/operations/createsecret.d.ts +0 -192
  102. package/esm/models/operations/createsecret.d.ts.map +0 -1
  103. package/esm/models/operations/createsecret.js +0 -136
  104. package/esm/models/operations/createsecret.js.map +0 -1
  105. package/esm/models/operations/deletesecret.d.ts +0 -74
  106. package/esm/models/operations/deletesecret.d.ts.map +0 -1
  107. package/esm/models/operations/deletesecret.js +0 -51
  108. package/esm/models/operations/deletesecret.js.map +0 -1
  109. package/esm/models/operations/getsecret.d.ts +0 -144
  110. package/esm/models/operations/getsecret.d.ts.map +0 -1
  111. package/esm/models/operations/getsecret.js +0 -87
  112. package/esm/models/operations/getsecret.js.map +0 -1
  113. package/esm/models/operations/renamesecret.d.ts +0 -95
  114. package/esm/models/operations/renamesecret.d.ts.map +0 -1
  115. package/esm/models/operations/renamesecret.js +0 -83
  116. package/esm/models/operations/renamesecret.js.map +0 -1
  117. package/esm/sdk/secrets.d.ts +0 -36
  118. package/esm/sdk/secrets.d.ts.map +0 -1
  119. package/esm/sdk/secrets.js +0 -48
  120. package/esm/sdk/secrets.js.map +0 -1
  121. package/src/funcs/secretsCreateSecret.ts +0 -134
  122. package/src/funcs/secretsDeleteSecret.ts +0 -140
  123. package/src/funcs/secretsGetSecret.ts +0 -141
  124. package/src/funcs/secretsRenameSecret.ts +0 -141
  125. package/src/models/operations/createsecret.ts +0 -304
  126. package/src/models/operations/deletesecret.ts +0 -119
  127. package/src/models/operations/getsecret.ts +0 -205
  128. package/src/models/operations/renamesecret.ts +0 -170
  129. package/src/sdk/secrets.ts +0 -96
@@ -1,140 +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 { 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
- DeleteSecretRequest,
23
- DeleteSecretRequest$outboundSchema,
24
- DeleteSecretResponseBody,
25
- DeleteSecretResponseBody$inboundSchema,
26
- } from "../models/operations/deletesecret.js";
27
- import { Result } from "../types/fp.js";
28
-
29
- /**
30
- * Delete a secret
31
- *
32
- * @remarks
33
- * This deletes the user or team’s secret defined in the URL.
34
- */
35
- export async function secretsDeleteSecret(
36
- client: VercelCore,
37
- request: DeleteSecretRequest,
38
- options?: RequestOptions,
39
- ): Promise<
40
- Result<
41
- DeleteSecretResponseBody,
42
- | SDKError
43
- | SDKValidationError
44
- | UnexpectedClientError
45
- | InvalidRequestError
46
- | RequestAbortedError
47
- | RequestTimeoutError
48
- | ConnectionError
49
- >
50
- > {
51
- const parsed = safeParse(
52
- request,
53
- (value) => DeleteSecretRequest$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
- idOrName: encodeSimple("idOrName", payload.idOrName, {
64
- explode: false,
65
- charEncoding: "percent",
66
- }),
67
- };
68
-
69
- const path = pathToFunc("/v2/secrets/{idOrName}")(pathParams);
70
-
71
- const query = encodeFormQuery({
72
- "slug": payload.slug,
73
- "teamId": payload.teamId,
74
- });
75
-
76
- const headers = new Headers({
77
- Accept: "application/json",
78
- });
79
-
80
- const secConfig = await extractSecurity(client._options.bearerToken);
81
- const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
82
- const requestSecurity = resolveGlobalSecurity(securityInput);
83
-
84
- const context = {
85
- operationID: "deleteSecret",
86
- oAuth2Scopes: [],
87
-
88
- resolvedSecurity: requestSecurity,
89
-
90
- securitySource: client._options.bearerToken,
91
- retryConfig: options?.retries
92
- || client._options.retryConfig
93
- || { strategy: "none" },
94
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
95
- };
96
-
97
- const requestRes = client._createRequest(context, {
98
- security: requestSecurity,
99
- method: "DELETE",
100
- path: path,
101
- headers: headers,
102
- query: query,
103
- body: body,
104
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
105
- }, options);
106
- if (!requestRes.ok) {
107
- return requestRes;
108
- }
109
- const req = requestRes.value;
110
-
111
- const doResult = await client._do(req, {
112
- context,
113
- errorCodes: ["400", "401", "403", "410", "4XX", "5XX"],
114
- retryConfig: context.retryConfig,
115
- retryCodes: context.retryCodes,
116
- });
117
- if (!doResult.ok) {
118
- return doResult;
119
- }
120
- const response = doResult.value;
121
-
122
- const [result] = await M.match<
123
- DeleteSecretResponseBody,
124
- | SDKError
125
- | SDKValidationError
126
- | UnexpectedClientError
127
- | InvalidRequestError
128
- | RequestAbortedError
129
- | RequestTimeoutError
130
- | ConnectionError
131
- >(
132
- M.json(200, DeleteSecretResponseBody$inboundSchema),
133
- M.fail([400, 401, 403, 410, "4XX", "5XX"]),
134
- )(response);
135
- if (!result.ok) {
136
- return result;
137
- }
138
-
139
- return result;
140
- }
@@ -1,141 +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 { 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
- GetSecretRequest,
23
- GetSecretRequest$outboundSchema,
24
- GetSecretResponseBody,
25
- GetSecretResponseBody$inboundSchema,
26
- } from "../models/operations/getsecret.js";
27
- import { Result } from "../types/fp.js";
28
-
29
- /**
30
- * Get a single secret
31
- *
32
- * @remarks
33
- * Retrieves the information for a specific secret by passing either the secret id or name in the URL.
34
- */
35
- export async function secretsGetSecret(
36
- client: VercelCore,
37
- request: GetSecretRequest,
38
- options?: RequestOptions,
39
- ): Promise<
40
- Result<
41
- GetSecretResponseBody,
42
- | SDKError
43
- | SDKValidationError
44
- | UnexpectedClientError
45
- | InvalidRequestError
46
- | RequestAbortedError
47
- | RequestTimeoutError
48
- | ConnectionError
49
- >
50
- > {
51
- const parsed = safeParse(
52
- request,
53
- (value) => GetSecretRequest$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
- idOrName: encodeSimple("idOrName", payload.idOrName, {
64
- explode: false,
65
- charEncoding: "percent",
66
- }),
67
- };
68
-
69
- const path = pathToFunc("/v3/secrets/{idOrName}")(pathParams);
70
-
71
- const query = encodeFormQuery({
72
- "decrypt": payload.decrypt,
73
- "slug": payload.slug,
74
- "teamId": payload.teamId,
75
- });
76
-
77
- const headers = new Headers({
78
- Accept: "application/json",
79
- });
80
-
81
- const secConfig = await extractSecurity(client._options.bearerToken);
82
- const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
83
- const requestSecurity = resolveGlobalSecurity(securityInput);
84
-
85
- const context = {
86
- operationID: "getSecret",
87
- oAuth2Scopes: [],
88
-
89
- resolvedSecurity: requestSecurity,
90
-
91
- securitySource: client._options.bearerToken,
92
- retryConfig: options?.retries
93
- || client._options.retryConfig
94
- || { strategy: "none" },
95
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
96
- };
97
-
98
- const requestRes = client._createRequest(context, {
99
- security: requestSecurity,
100
- method: "GET",
101
- path: path,
102
- headers: headers,
103
- query: query,
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", "410", "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
- GetSecretResponseBody,
125
- | SDKError
126
- | SDKValidationError
127
- | UnexpectedClientError
128
- | InvalidRequestError
129
- | RequestAbortedError
130
- | RequestTimeoutError
131
- | ConnectionError
132
- >(
133
- M.json(200, GetSecretResponseBody$inboundSchema),
134
- M.fail([400, 401, 403, 404, 410, "4XX", "5XX"]),
135
- )(response);
136
- if (!result.ok) {
137
- return result;
138
- }
139
-
140
- return result;
141
- }
@@ -1,141 +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, 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
- RenameSecretRequest,
23
- RenameSecretRequest$outboundSchema,
24
- RenameSecretResponseBody,
25
- RenameSecretResponseBody$inboundSchema,
26
- } from "../models/operations/renamesecret.js";
27
- import { Result } from "../types/fp.js";
28
-
29
- /**
30
- * Change secret name
31
- *
32
- * @remarks
33
- * Enables to edit the name of a secret. The name has to be unique to the user or team’s secrets.
34
- */
35
- export async function secretsRenameSecret(
36
- client: VercelCore,
37
- request: RenameSecretRequest,
38
- options?: RequestOptions,
39
- ): Promise<
40
- Result<
41
- RenameSecretResponseBody,
42
- | SDKError
43
- | SDKValidationError
44
- | UnexpectedClientError
45
- | InvalidRequestError
46
- | RequestAbortedError
47
- | RequestTimeoutError
48
- | ConnectionError
49
- >
50
- > {
51
- const parsed = safeParse(
52
- request,
53
- (value) => RenameSecretRequest$outboundSchema.parse(value),
54
- "Input validation failed",
55
- );
56
- if (!parsed.ok) {
57
- return parsed;
58
- }
59
- const payload = parsed.value;
60
- const body = encodeJSON("body", payload.RequestBody, { explode: true });
61
-
62
- const pathParams = {
63
- name: encodeSimple("name", payload.name, {
64
- explode: false,
65
- charEncoding: "percent",
66
- }),
67
- };
68
-
69
- const path = pathToFunc("/v2/secrets/{name}")(pathParams);
70
-
71
- const query = encodeFormQuery({
72
- "slug": payload.slug,
73
- "teamId": payload.teamId,
74
- });
75
-
76
- const headers = new Headers({
77
- "Content-Type": "application/json",
78
- Accept: "application/json",
79
- });
80
-
81
- const secConfig = await extractSecurity(client._options.bearerToken);
82
- const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
83
- const requestSecurity = resolveGlobalSecurity(securityInput);
84
-
85
- const context = {
86
- operationID: "renameSecret",
87
- oAuth2Scopes: [],
88
-
89
- resolvedSecurity: requestSecurity,
90
-
91
- securitySource: client._options.bearerToken,
92
- retryConfig: options?.retries
93
- || client._options.retryConfig
94
- || { strategy: "none" },
95
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
96
- };
97
-
98
- const requestRes = client._createRequest(context, {
99
- security: requestSecurity,
100
- method: "PATCH",
101
- path: path,
102
- headers: headers,
103
- query: query,
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", "410", "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
- RenameSecretResponseBody,
125
- | SDKError
126
- | SDKValidationError
127
- | UnexpectedClientError
128
- | InvalidRequestError
129
- | RequestAbortedError
130
- | RequestTimeoutError
131
- | ConnectionError
132
- >(
133
- M.json(200, RenameSecretResponseBody$inboundSchema),
134
- M.fail([400, 401, 403, 410, "4XX", "5XX"]),
135
- )(response);
136
- if (!result.ok) {
137
- return result;
138
- }
139
-
140
- return result;
141
- }