@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,331 +0,0 @@
1
- # Secrets
2
- (*secrets*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [createSecret](#createsecret) - Create a new secret
9
- * [renameSecret](#renamesecret) - Change secret name
10
- * [getSecret](#getsecret) - Get a single secret
11
- * [deleteSecret](#deletesecret) - Delete a secret
12
-
13
- ## createSecret
14
-
15
- Allows to create a new secret.
16
-
17
- ### Example Usage
18
-
19
- ```typescript
20
- import { Vercel } from "@vercel/sdk";
21
-
22
- const vercel = new Vercel({
23
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
24
- });
25
-
26
- async function run() {
27
- const result = await vercel.secrets.createSecret({
28
- requestBody: {
29
- name: "my-api-key",
30
- value: "some secret value",
31
- decryptable: true,
32
- },
33
- });
34
-
35
- // Handle the result
36
- console.log(result);
37
- }
38
-
39
- run();
40
- ```
41
-
42
- ### Standalone function
43
-
44
- The standalone function version of this method:
45
-
46
- ```typescript
47
- import { VercelCore } from "@vercel/sdk/core.js";
48
- import { secretsCreateSecret } from "@vercel/sdk/funcs/secretsCreateSecret.js";
49
-
50
- // Use `VercelCore` for best tree-shaking performance.
51
- // You can create one instance of it to use across an application.
52
- const vercel = new VercelCore({
53
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
54
- });
55
-
56
- async function run() {
57
- const res = await secretsCreateSecret(vercel, {
58
- requestBody: {
59
- name: "my-api-key",
60
- value: "some secret value",
61
- decryptable: true,
62
- },
63
- });
64
-
65
- if (!res.ok) {
66
- throw res.error;
67
- }
68
-
69
- const { value: result } = res;
70
-
71
- // Handle the result
72
- console.log(result);
73
- }
74
-
75
- run();
76
- ```
77
-
78
- ### Parameters
79
-
80
- | Parameter | Type | Required | Description |
81
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
82
- | `request` | [operations.CreateSecretRequest](../../models/operations/createsecretrequest.md) | :heavy_check_mark: | The request object to use for the request. |
83
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
84
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
85
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
86
-
87
- ### Response
88
-
89
- **Promise\<[operations.CreateSecretResponseBody](../../models/operations/createsecretresponsebody.md)\>**
90
-
91
- ### Errors
92
-
93
- | Error Type | Status Code | Content Type |
94
- | --------------- | --------------- | --------------- |
95
- | errors.SDKError | 4XX, 5XX | \*/\* |
96
-
97
- ## renameSecret
98
-
99
- Enables to edit the name of a secret. The name has to be unique to the user or team’s secrets.
100
-
101
- ### Example Usage
102
-
103
- ```typescript
104
- import { Vercel } from "@vercel/sdk";
105
-
106
- const vercel = new Vercel({
107
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
108
- });
109
-
110
- async function run() {
111
- const result = await vercel.secrets.renameSecret({
112
- name: "my-api-key",
113
- requestBody: {
114
- name: "my-api-key",
115
- },
116
- });
117
-
118
- // Handle the result
119
- console.log(result);
120
- }
121
-
122
- run();
123
- ```
124
-
125
- ### Standalone function
126
-
127
- The standalone function version of this method:
128
-
129
- ```typescript
130
- import { VercelCore } from "@vercel/sdk/core.js";
131
- import { secretsRenameSecret } from "@vercel/sdk/funcs/secretsRenameSecret.js";
132
-
133
- // Use `VercelCore` for best tree-shaking performance.
134
- // You can create one instance of it to use across an application.
135
- const vercel = new VercelCore({
136
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
137
- });
138
-
139
- async function run() {
140
- const res = await secretsRenameSecret(vercel, {
141
- name: "my-api-key",
142
- requestBody: {
143
- name: "my-api-key",
144
- },
145
- });
146
-
147
- if (!res.ok) {
148
- throw res.error;
149
- }
150
-
151
- const { value: result } = res;
152
-
153
- // Handle the result
154
- console.log(result);
155
- }
156
-
157
- run();
158
- ```
159
-
160
- ### Parameters
161
-
162
- | Parameter | Type | Required | Description |
163
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
164
- | `request` | [operations.RenameSecretRequest](../../models/operations/renamesecretrequest.md) | :heavy_check_mark: | The request object to use for the request. |
165
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
166
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
167
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
168
-
169
- ### Response
170
-
171
- **Promise\<[operations.RenameSecretResponseBody](../../models/operations/renamesecretresponsebody.md)\>**
172
-
173
- ### Errors
174
-
175
- | Error Type | Status Code | Content Type |
176
- | --------------- | --------------- | --------------- |
177
- | errors.SDKError | 4XX, 5XX | \*/\* |
178
-
179
- ## getSecret
180
-
181
- Retrieves the information for a specific secret by passing either the secret id or name in the URL.
182
-
183
- ### Example Usage
184
-
185
- ```typescript
186
- import { Vercel } from "@vercel/sdk";
187
-
188
- const vercel = new Vercel({
189
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
190
- });
191
-
192
- async function run() {
193
- const result = await vercel.secrets.getSecret({
194
- idOrName: "sec_RKc5iV0rV3ZSrFrHiruRno7k",
195
- decrypt: "true",
196
- });
197
-
198
- // Handle the result
199
- console.log(result);
200
- }
201
-
202
- run();
203
- ```
204
-
205
- ### Standalone function
206
-
207
- The standalone function version of this method:
208
-
209
- ```typescript
210
- import { VercelCore } from "@vercel/sdk/core.js";
211
- import { secretsGetSecret } from "@vercel/sdk/funcs/secretsGetSecret.js";
212
-
213
- // Use `VercelCore` for best tree-shaking performance.
214
- // You can create one instance of it to use across an application.
215
- const vercel = new VercelCore({
216
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
217
- });
218
-
219
- async function run() {
220
- const res = await secretsGetSecret(vercel, {
221
- idOrName: "sec_RKc5iV0rV3ZSrFrHiruRno7k",
222
- decrypt: "true",
223
- });
224
-
225
- if (!res.ok) {
226
- throw res.error;
227
- }
228
-
229
- const { value: result } = res;
230
-
231
- // Handle the result
232
- console.log(result);
233
- }
234
-
235
- run();
236
- ```
237
-
238
- ### Parameters
239
-
240
- | Parameter | Type | Required | Description |
241
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
242
- | `request` | [operations.GetSecretRequest](../../models/operations/getsecretrequest.md) | :heavy_check_mark: | The request object to use for the request. |
243
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
244
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
245
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
246
-
247
- ### Response
248
-
249
- **Promise\<[operations.GetSecretResponseBody](../../models/operations/getsecretresponsebody.md)\>**
250
-
251
- ### Errors
252
-
253
- | Error Type | Status Code | Content Type |
254
- | --------------- | --------------- | --------------- |
255
- | errors.SDKError | 4XX, 5XX | \*/\* |
256
-
257
- ## deleteSecret
258
-
259
- This deletes the user or team’s secret defined in the URL.
260
-
261
- ### Example Usage
262
-
263
- ```typescript
264
- import { Vercel } from "@vercel/sdk";
265
-
266
- const vercel = new Vercel({
267
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
268
- });
269
-
270
- async function run() {
271
- const result = await vercel.secrets.deleteSecret({
272
- idOrName: "sec_RKc5iV0rV3ZSrFrHiruRno7k",
273
- });
274
-
275
- // Handle the result
276
- console.log(result);
277
- }
278
-
279
- run();
280
- ```
281
-
282
- ### Standalone function
283
-
284
- The standalone function version of this method:
285
-
286
- ```typescript
287
- import { VercelCore } from "@vercel/sdk/core.js";
288
- import { secretsDeleteSecret } from "@vercel/sdk/funcs/secretsDeleteSecret.js";
289
-
290
- // Use `VercelCore` for best tree-shaking performance.
291
- // You can create one instance of it to use across an application.
292
- const vercel = new VercelCore({
293
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
294
- });
295
-
296
- async function run() {
297
- const res = await secretsDeleteSecret(vercel, {
298
- idOrName: "sec_RKc5iV0rV3ZSrFrHiruRno7k",
299
- });
300
-
301
- if (!res.ok) {
302
- throw res.error;
303
- }
304
-
305
- const { value: result } = res;
306
-
307
- // Handle the result
308
- console.log(result);
309
- }
310
-
311
- run();
312
- ```
313
-
314
- ### Parameters
315
-
316
- | Parameter | Type | Required | Description |
317
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
318
- | `request` | [operations.DeleteSecretRequest](../../models/operations/deletesecretrequest.md) | :heavy_check_mark: | The request object to use for the request. |
319
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
320
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
321
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
322
-
323
- ### Response
324
-
325
- **Promise\<[operations.DeleteSecretResponseBody](../../models/operations/deletesecretresponsebody.md)\>**
326
-
327
- ### Errors
328
-
329
- | Error Type | Status Code | Content Type |
330
- | --------------- | --------------- | --------------- |
331
- | errors.SDKError | 4XX, 5XX | \*/\* |
@@ -1,15 +0,0 @@
1
- import { VercelCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
- import { SDKError } from "../models/errors/sdkerror.js";
5
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
6
- import { CreateSecretRequest, CreateSecretResponseBody } from "../models/operations/createsecret.js";
7
- import { Result } from "../types/fp.js";
8
- /**
9
- * Create a new secret
10
- *
11
- * @remarks
12
- * Allows to create a new secret.
13
- */
14
- export declare function secretsCreateSecret(client: VercelCore, request: CreateSecretRequest, options?: RequestOptions): Promise<Result<CreateSecretResponseBody, SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
15
- //# sourceMappingURL=secretsCreateSecret.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secretsCreateSecret.d.ts","sourceRoot":"","sources":["../../src/funcs/secretsCreateSecret.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EAEnB,wBAAwB,EAEzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,wBAAwB,EACtB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAoFA"}
@@ -1,74 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
5
- import * as M from "../lib/matchers.js";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
8
- import { pathToFunc } from "../lib/url.js";
9
- import { CreateSecretRequest$outboundSchema, CreateSecretResponseBody$inboundSchema, } from "../models/operations/createsecret.js";
10
- /**
11
- * Create a new secret
12
- *
13
- * @remarks
14
- * Allows to create a new secret.
15
- */
16
- export async function secretsCreateSecret(client, request, options) {
17
- const parsed = safeParse(request, (value) => CreateSecretRequest$outboundSchema.parse(value), "Input validation failed");
18
- if (!parsed.ok) {
19
- return parsed;
20
- }
21
- const payload = parsed.value;
22
- const body = encodeJSON("body", payload.RequestBody, { explode: true });
23
- const path = pathToFunc("/v2/secrets/{name}")();
24
- const query = encodeFormQuery({
25
- "slug": payload.slug,
26
- "teamId": payload.teamId,
27
- });
28
- const headers = new Headers({
29
- "Content-Type": "application/json",
30
- Accept: "application/json",
31
- });
32
- const secConfig = await extractSecurity(client._options.bearerToken);
33
- const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
34
- const requestSecurity = resolveGlobalSecurity(securityInput);
35
- const context = {
36
- operationID: "createSecret",
37
- oAuth2Scopes: [],
38
- resolvedSecurity: requestSecurity,
39
- securitySource: client._options.bearerToken,
40
- retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
41
- || client._options.retryConfig
42
- || { strategy: "none" },
43
- retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
44
- };
45
- const requestRes = client._createRequest(context, {
46
- security: requestSecurity,
47
- method: "POST",
48
- path: path,
49
- headers: headers,
50
- query: query,
51
- body: body,
52
- timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || -1,
53
- }, options);
54
- if (!requestRes.ok) {
55
- return requestRes;
56
- }
57
- const req = requestRes.value;
58
- const doResult = await client._do(req, {
59
- context,
60
- errorCodes: ["400", "401", "402", "403", "410", "4XX", "5XX"],
61
- retryConfig: context.retryConfig,
62
- retryCodes: context.retryCodes,
63
- });
64
- if (!doResult.ok) {
65
- return doResult;
66
- }
67
- const response = doResult.value;
68
- const [result] = await M.match(M.json(200, CreateSecretResponseBody$inboundSchema), M.fail([400, 401, 402, 403, 410, "4XX", "5XX"]))(response);
69
- if (!result.ok) {
70
- return result;
71
- }
72
- return result;
73
- }
74
- //# sourceMappingURL=secretsCreateSecret.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secretsCreateSecret.js","sourceRoot":"","sources":["../../src/funcs/secretsCreateSecret.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,OAAO,EAEL,kCAAkC,EAElC,sCAAsC,GACvC,MAAM,sCAAsC,CAAC;AAG9C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAkB,EAClB,OAA4B,EAC5B,OAAwB;IAaxB,MAAM,MAAM,GAAG,SAAS,CACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,EAC1D,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,EA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AbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
- import { SDKError } from "../models/errors/sdkerror.js";
5
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
6
- import { DeleteSecretRequest, DeleteSecretResponseBody } from "../models/operations/deletesecret.js";
7
- import { Result } from "../types/fp.js";
8
- /**
9
- * Delete a secret
10
- *
11
- * @remarks
12
- * This deletes the user or team’s secret defined in the URL.
13
- */
14
- export declare function secretsDeleteSecret(client: VercelCore, request: DeleteSecretRequest, options?: RequestOptions): Promise<Result<DeleteSecretResponseBody, SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
15
- //# sourceMappingURL=secretsDeleteSecret.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secretsDeleteSecret.d.ts","sourceRoot":"","sources":["../../src/funcs/secretsDeleteSecret.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EAEnB,wBAAwB,EAEzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,wBAAwB,EACtB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA0FA"}
@@ -1,79 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
5
- import * as M from "../lib/matchers.js";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
8
- import { pathToFunc } from "../lib/url.js";
9
- import { DeleteSecretRequest$outboundSchema, DeleteSecretResponseBody$inboundSchema, } from "../models/operations/deletesecret.js";
10
- /**
11
- * Delete a secret
12
- *
13
- * @remarks
14
- * This deletes the user or team’s secret defined in the URL.
15
- */
16
- export async function secretsDeleteSecret(client, request, options) {
17
- const parsed = safeParse(request, (value) => DeleteSecretRequest$outboundSchema.parse(value), "Input validation failed");
18
- if (!parsed.ok) {
19
- return parsed;
20
- }
21
- const payload = parsed.value;
22
- const body = null;
23
- const pathParams = {
24
- idOrName: encodeSimple("idOrName", payload.idOrName, {
25
- explode: false,
26
- charEncoding: "percent",
27
- }),
28
- };
29
- const path = pathToFunc("/v2/secrets/{idOrName}")(pathParams);
30
- const query = encodeFormQuery({
31
- "slug": payload.slug,
32
- "teamId": payload.teamId,
33
- });
34
- const headers = new Headers({
35
- Accept: "application/json",
36
- });
37
- const secConfig = await extractSecurity(client._options.bearerToken);
38
- const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
39
- const requestSecurity = resolveGlobalSecurity(securityInput);
40
- const context = {
41
- operationID: "deleteSecret",
42
- oAuth2Scopes: [],
43
- resolvedSecurity: requestSecurity,
44
- securitySource: client._options.bearerToken,
45
- retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
46
- || client._options.retryConfig
47
- || { strategy: "none" },
48
- retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
49
- };
50
- const requestRes = client._createRequest(context, {
51
- security: requestSecurity,
52
- method: "DELETE",
53
- path: path,
54
- headers: headers,
55
- query: query,
56
- body: body,
57
- timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || -1,
58
- }, options);
59
- if (!requestRes.ok) {
60
- return requestRes;
61
- }
62
- const req = requestRes.value;
63
- const doResult = await client._do(req, {
64
- context,
65
- errorCodes: ["400", "401", "403", "410", "4XX", "5XX"],
66
- retryConfig: context.retryConfig,
67
- retryCodes: context.retryCodes,
68
- });
69
- if (!doResult.ok) {
70
- return doResult;
71
- }
72
- const response = doResult.value;
73
- const [result] = await M.match(M.json(200, DeleteSecretResponseBody$inboundSchema), M.fail([400, 401, 403, 410, "4XX", "5XX"]))(response);
74
- if (!result.ok) {
75
- return result;
76
- }
77
- return result;
78
- }
79
- //# sourceMappingURL=secretsDeleteSecret.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secretsDeleteSecret.js","sourceRoot":"","sources":["../../src/funcs/secretsDeleteSecret.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,OAAO,EAEL,kCAAkC,EAElC,sCAAsC,GACvC,MAAM,sCAAsC,CAAC;AAG9C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAkB,EAClB,OAA4B,EAC5B,OAAwB;IAaxB,MAAM,MAAM,GAAG,SAAS,CACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,EAC1D,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EA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IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,15 +0,0 @@
1
- import { VercelCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
- import { SDKError } from "../models/errors/sdkerror.js";
5
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
6
- import { GetSecretRequest, GetSecretResponseBody } from "../models/operations/getsecret.js";
7
- import { Result } from "../types/fp.js";
8
- /**
9
- * Get a single secret
10
- *
11
- * @remarks
12
- * Retrieves the information for a specific secret by passing either the secret id or name in the URL.
13
- */
14
- export declare function secretsGetSecret(client: VercelCore, request: GetSecretRequest, options?: RequestOptions): Promise<Result<GetSecretResponseBody, SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
15
- //# sourceMappingURL=secretsGetSecret.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secretsGetSecret.d.ts","sourceRoot":"","sources":["../../src/funcs/secretsGetSecret.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,gBAAgB,EAEhB,qBAAqB,EAEtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,qBAAqB,EACnB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA2FA"}
@@ -1,80 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
5
- import * as M from "../lib/matchers.js";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
8
- import { pathToFunc } from "../lib/url.js";
9
- import { GetSecretRequest$outboundSchema, GetSecretResponseBody$inboundSchema, } from "../models/operations/getsecret.js";
10
- /**
11
- * Get a single secret
12
- *
13
- * @remarks
14
- * Retrieves the information for a specific secret by passing either the secret id or name in the URL.
15
- */
16
- export async function secretsGetSecret(client, request, options) {
17
- const parsed = safeParse(request, (value) => GetSecretRequest$outboundSchema.parse(value), "Input validation failed");
18
- if (!parsed.ok) {
19
- return parsed;
20
- }
21
- const payload = parsed.value;
22
- const body = null;
23
- const pathParams = {
24
- idOrName: encodeSimple("idOrName", payload.idOrName, {
25
- explode: false,
26
- charEncoding: "percent",
27
- }),
28
- };
29
- const path = pathToFunc("/v3/secrets/{idOrName}")(pathParams);
30
- const query = encodeFormQuery({
31
- "decrypt": payload.decrypt,
32
- "slug": payload.slug,
33
- "teamId": payload.teamId,
34
- });
35
- const headers = new Headers({
36
- Accept: "application/json",
37
- });
38
- const secConfig = await extractSecurity(client._options.bearerToken);
39
- const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
40
- const requestSecurity = resolveGlobalSecurity(securityInput);
41
- const context = {
42
- operationID: "getSecret",
43
- oAuth2Scopes: [],
44
- resolvedSecurity: requestSecurity,
45
- securitySource: client._options.bearerToken,
46
- retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
47
- || client._options.retryConfig
48
- || { strategy: "none" },
49
- retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
50
- };
51
- const requestRes = client._createRequest(context, {
52
- security: requestSecurity,
53
- method: "GET",
54
- path: path,
55
- headers: headers,
56
- query: query,
57
- body: body,
58
- timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || -1,
59
- }, options);
60
- if (!requestRes.ok) {
61
- return requestRes;
62
- }
63
- const req = requestRes.value;
64
- const doResult = await client._do(req, {
65
- context,
66
- errorCodes: ["400", "401", "403", "404", "410", "4XX", "5XX"],
67
- retryConfig: context.retryConfig,
68
- retryCodes: context.retryCodes,
69
- });
70
- if (!doResult.ok) {
71
- return doResult;
72
- }
73
- const response = doResult.value;
74
- const [result] = await M.match(M.json(200, GetSecretResponseBody$inboundSchema), M.fail([400, 401, 403, 404, 410, "4XX", "5XX"]))(response);
75
- if (!result.ok) {
76
- return result;
77
- }
78
- return result;
79
- }
80
- //# sourceMappingURL=secretsGetSecret.js.map