@vercel/sdk 1.6.4 → 1.6.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 (125) hide show
  1. package/README.md +2 -0
  2. package/bin/mcp-server.js +517 -275
  3. package/bin/mcp-server.js.map +17 -14
  4. package/docs/sdks/projects/README.md +85 -0
  5. package/esm/__tests__/accessgroups.test.js +94 -60
  6. package/esm/__tests__/accessgroups.test.js.map +1 -1
  7. package/esm/__tests__/aliases.test.js +41 -41
  8. package/esm/__tests__/aliases.test.js.map +1 -1
  9. package/esm/__tests__/certs.test.js +2 -2
  10. package/esm/__tests__/checks.test.js +5 -3
  11. package/esm/__tests__/checks.test.js.map +1 -1
  12. package/esm/__tests__/deployments.test.js +51 -35
  13. package/esm/__tests__/deployments.test.js.map +1 -1
  14. package/esm/__tests__/dns.test.js +0 -27
  15. package/esm/__tests__/dns.test.js.map +1 -1
  16. package/esm/__tests__/domains.test.js +2 -2
  17. package/esm/__tests__/domains.test.js.map +1 -1
  18. package/esm/__tests__/edgeconfig.test.js +9 -5
  19. package/esm/__tests__/edgeconfig.test.js.map +1 -1
  20. package/esm/__tests__/environment.test.js +15 -24
  21. package/esm/__tests__/environment.test.js.map +1 -1
  22. package/esm/__tests__/integrations.test.js +1 -7
  23. package/esm/__tests__/integrations.test.js.map +1 -1
  24. package/esm/__tests__/logdrains.test.js +72 -24
  25. package/esm/__tests__/logdrains.test.js.map +1 -1
  26. package/esm/__tests__/marketplace.test.js +60 -72
  27. package/esm/__tests__/marketplace.test.js.map +1 -1
  28. package/esm/__tests__/projects.test.js +198 -118
  29. package/esm/__tests__/projects.test.js.map +1 -1
  30. package/esm/__tests__/security.test.js +106 -118
  31. package/esm/__tests__/security.test.js.map +1 -1
  32. package/esm/__tests__/teams.test.js +11 -6
  33. package/esm/__tests__/teams.test.js.map +1 -1
  34. package/esm/funcs/projectsMoveProjectDomain.d.ts +18 -0
  35. package/esm/funcs/projectsMoveProjectDomain.d.ts.map +1 -0
  36. package/esm/funcs/projectsMoveProjectDomain.js +96 -0
  37. package/esm/funcs/projectsMoveProjectDomain.js.map +1 -0
  38. package/esm/lib/config.d.ts +3 -3
  39. package/esm/lib/config.js +3 -3
  40. package/esm/mcp-server/mcp-server.js +1 -1
  41. package/esm/mcp-server/server.d.ts.map +1 -1
  42. package/esm/mcp-server/server.js +3 -1
  43. package/esm/mcp-server/server.js.map +1 -1
  44. package/esm/mcp-server/tools/projectsMoveProjectDomain.d.ts +7 -0
  45. package/esm/mcp-server/tools/projectsMoveProjectDomain.d.ts.map +1 -0
  46. package/esm/mcp-server/tools/projectsMoveProjectDomain.js +28 -0
  47. package/esm/mcp-server/tools/projectsMoveProjectDomain.js.map +1 -0
  48. package/esm/models/authuser.d.ts +5 -0
  49. package/esm/models/authuser.d.ts.map +1 -1
  50. package/esm/models/authuser.js +2 -0
  51. package/esm/models/authuser.js.map +1 -1
  52. package/esm/models/createprojectop.d.ts +2 -0
  53. package/esm/models/createprojectop.d.ts.map +1 -1
  54. package/esm/models/createprojectop.js +2 -0
  55. package/esm/models/createprojectop.js.map +1 -1
  56. package/esm/models/getdomainconfigop.d.ts +0 -7
  57. package/esm/models/getdomainconfigop.d.ts.map +1 -1
  58. package/esm/models/getdomainconfigop.js +0 -4
  59. package/esm/models/getdomainconfigop.js.map +1 -1
  60. package/esm/models/getprojectsop.d.ts +2 -0
  61. package/esm/models/getprojectsop.d.ts.map +1 -1
  62. package/esm/models/getprojectsop.js +2 -0
  63. package/esm/models/getprojectsop.js.map +1 -1
  64. package/esm/models/getv9projectsidornamecustomenvironmentsop.d.ts +31 -1
  65. package/esm/models/getv9projectsidornamecustomenvironmentsop.d.ts.map +1 -1
  66. package/esm/models/getv9projectsidornamecustomenvironmentsop.js +27 -0
  67. package/esm/models/getv9projectsidornamecustomenvironmentsop.js.map +1 -1
  68. package/esm/models/moveprojectdomainop.d.ts +165 -0
  69. package/esm/models/moveprojectdomainop.d.ts.map +1 -0
  70. package/esm/models/moveprojectdomainop.js +151 -0
  71. package/esm/models/moveprojectdomainop.js.map +1 -0
  72. package/esm/models/updateprojectdatacacheop.d.ts +2 -0
  73. package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
  74. package/esm/models/updateprojectdatacacheop.js +2 -0
  75. package/esm/models/updateprojectdatacacheop.js.map +1 -1
  76. package/esm/models/updateprojectop.d.ts +2 -0
  77. package/esm/models/updateprojectop.d.ts.map +1 -1
  78. package/esm/models/updateprojectop.js +2 -0
  79. package/esm/models/updateprojectop.js.map +1 -1
  80. package/esm/models/userevent.d.ts +43 -0
  81. package/esm/models/userevent.d.ts.map +1 -1
  82. package/esm/models/userevent.js +31 -0
  83. package/esm/models/userevent.js.map +1 -1
  84. package/esm/sdk/projects.d.ts +8 -0
  85. package/esm/sdk/projects.d.ts.map +1 -1
  86. package/esm/sdk/projects.js +10 -0
  87. package/esm/sdk/projects.js.map +1 -1
  88. package/jsr.json +1 -1
  89. package/package.json +1 -1
  90. package/src/__tests__/accessgroups.test.ts +94 -63
  91. package/src/__tests__/aliases.test.ts +47 -47
  92. package/src/__tests__/certs.test.ts +2 -2
  93. package/src/__tests__/checks.test.ts +5 -3
  94. package/src/__tests__/deployments.test.ts +56 -40
  95. package/src/__tests__/dns.test.ts +0 -30
  96. package/src/__tests__/domains.test.ts +2 -2
  97. package/src/__tests__/edgeconfig.test.ts +9 -5
  98. package/src/__tests__/environment.test.ts +20 -41
  99. package/src/__tests__/integrations.test.ts +1 -13
  100. package/src/__tests__/logdrains.test.ts +75 -36
  101. package/src/__tests__/marketplace.test.ts +63 -83
  102. package/src/__tests__/projects.test.ts +201 -121
  103. package/src/__tests__/security.test.ts +106 -121
  104. package/src/__tests__/teams.test.ts +11 -9
  105. package/src/funcs/projectsMoveProjectDomain.ts +198 -0
  106. package/src/lib/config.ts +3 -3
  107. package/src/mcp-server/mcp-server.ts +1 -1
  108. package/src/mcp-server/server.ts +3 -1
  109. package/src/mcp-server/tools/projectsMoveProjectDomain.ts +37 -0
  110. package/src/models/authuser.ts +7 -0
  111. package/src/models/createprojectop.ts +4 -0
  112. package/src/models/getdomainconfigop.ts +0 -11
  113. package/src/models/getprojectsop.ts +4 -0
  114. package/src/models/getv9projectsidornamecustomenvironmentsop.ts +62 -1
  115. package/src/models/moveprojectdomainop.ts +356 -0
  116. package/src/models/updateprojectdatacacheop.ts +4 -0
  117. package/src/models/updateprojectop.ts +4 -0
  118. package/src/models/userevent.ts +80 -0
  119. package/src/sdk/projects.ts +22 -0
  120. package/vercel-spec.json +269 -17
  121. package/esm/__tests__/apiexperimentation.test.d.ts +0 -2
  122. package/esm/__tests__/apiexperimentation.test.d.ts.map +0 -1
  123. package/esm/__tests__/apiexperimentation.test.js +0 -8
  124. package/esm/__tests__/apiexperimentation.test.js.map +0 -1
  125. package/src/__tests__/apiexperimentation.test.ts +0 -11
@@ -30,6 +30,25 @@ test("Deployments Get Deployment Events", async () => {
30
30
  });
31
31
  });
32
32
 
33
+ test("Deployments Update Integration Deployment Action", async () => {
34
+ const testHttpClient = createTestHTTPClient(
35
+ "update-integration-deployment-action",
36
+ );
37
+
38
+ const vercel = new Vercel({
39
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
40
+ httpClient: testHttpClient,
41
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
42
+ });
43
+
44
+ await vercel.deployments.updateIntegrationDeploymentAction({
45
+ deploymentId: "<id>",
46
+ integrationConfigurationId: "<id>",
47
+ resourceId: "<id>",
48
+ action: "<value>",
49
+ });
50
+ });
51
+
33
52
  test("Deployments Get Deployment", async () => {
34
53
  const testHttpClient = createTestHTTPClient("getDeployment");
35
54
 
@@ -84,6 +103,7 @@ test("Deployments Create Deployment", async () => {
84
103
  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
85
104
  slug: "my-team-url-slug",
86
105
  requestBody: {
106
+ deploymentId: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6",
87
107
  files: [
88
108
  {
89
109
  file: "folder/file.js",
@@ -101,48 +121,64 @@ test("Deployments Create Deployment", async () => {
101
121
  commitSha: "dc36199b2234c6586ebe05ec94078a895c707e29",
102
122
  dirty: true,
103
123
  },
124
+ gitSource: {
125
+ ref: "main",
126
+ repoId: 123456789,
127
+ sha: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
128
+ type: "github",
129
+ },
104
130
  meta: {
105
131
  "foo": "bar",
106
132
  },
107
133
  name: "my-instant-deployment",
108
134
  project: "my-deployment-project",
135
+ projectSettings: {
136
+ buildCommand: "next build",
137
+ installCommand: "pnpm install",
138
+ },
139
+ target: "production",
109
140
  },
110
141
  });
111
142
  expect(result).toBeDefined();
112
143
  expect(result).toEqual({
113
144
  build: {
114
- env: [],
145
+ env: [
146
+ "<value>",
147
+ "<value>",
148
+ "<value>",
149
+ ],
115
150
  },
116
151
  env: [
117
152
  "<value>",
118
153
  "<value>",
119
- "<value>",
120
154
  ],
121
- inspectorUrl: "https://grave-dredger.com",
155
+ inspectorUrl: "https://firm-casket.name/",
122
156
  isInConcurrentBuildsQueue: false,
123
157
  isInSystemBuildsQueue: false,
124
158
  projectSettings: {},
125
- aliasAssigned: false,
126
- bootedAt: 4336.60,
127
- buildingAt: 7030.55,
128
- buildSkipped: true,
159
+ aliasAssigned: true,
160
+ bootedAt: 7030.55,
161
+ buildingAt: 2916.6,
162
+ buildSkipped: false,
129
163
  creator: {
130
164
  uid: "<id>",
131
165
  },
132
- public: false,
133
- status: "QUEUED",
166
+ public: true,
167
+ status: "BUILDING",
134
168
  type: "LAMBDAS",
135
169
  name: "<value>",
136
- createdAt: 5133.44,
170
+ createdAt: 1218,
137
171
  id: "<id>",
138
- version: 1218.01,
172
+ version: 5856.16,
139
173
  meta: {
140
174
  "key": "<value>",
141
175
  "key1": "<value>",
142
176
  },
143
- readyState: "INITIALIZING",
144
- regions: [],
145
- url: "https://apprehensive-perp.info/",
177
+ readyState: "CANCELED",
178
+ regions: [
179
+ "<value>",
180
+ ],
181
+ url: "https://quiet-formation.name/",
146
182
  plan: "pro",
147
183
  projectId: "<id>",
148
184
  ownerId: "<id>",
@@ -150,9 +186,6 @@ test("Deployments Create Deployment", async () => {
150
186
  {
151
187
  src: "<value>",
152
188
  },
153
- {
154
- src: "<value>",
155
- },
156
189
  ],
157
190
  createdIn: "<value>",
158
191
  });
@@ -191,7 +224,7 @@ test("Deployments Cancel Deployment", async () => {
191
224
  projectSettings: {},
192
225
  aliasAssigned: false,
193
226
  bootedAt: 8528.74,
194
- buildingAt: 7590.78,
227
+ buildingAt: 7590.79,
195
228
  buildSkipped: false,
196
229
  creator: {
197
230
  uid: "<id>",
@@ -223,8 +256,8 @@ test("Deployments Cancel Deployment", async () => {
223
256
  },
224
257
  {
225
258
  src: "<value>",
226
- continue: false,
227
- middleware: 6618.12,
259
+ continue: true,
260
+ middleware: 4831.29,
228
261
  },
229
262
  ],
230
263
  });
@@ -268,7 +301,7 @@ test("Deployments List Deployment Files", async () => {
268
301
  type: "file",
269
302
  uid: "2d4aad419917f15b1146e9e03ddc9bb31747e4d0",
270
303
  contentType: "application/json",
271
- mode: 956.44,
304
+ mode: 956.43,
272
305
  },
273
306
  {
274
307
  name: "my-file.json",
@@ -333,6 +366,7 @@ test("Deployments Get Deployments", async () => {
333
366
  name: "docs",
334
367
  url: "docs-9jaeg38me.vercel.app",
335
368
  created: 1609492210000,
369
+ defaultRoute: "/docs",
336
370
  deleted: 1609492210000,
337
371
  undeleted: 1609492210000,
338
372
  softDeletedByRetention: true,
@@ -359,6 +393,7 @@ test("Deployments Get Deployments", async () => {
359
393
  name: "docs",
360
394
  url: "docs-9jaeg38me.vercel.app",
361
395
  created: 1609492210000,
396
+ defaultRoute: "/docs",
362
397
  deleted: 1609492210000,
363
398
  undeleted: 1609492210000,
364
399
  softDeletedByRetention: true,
@@ -405,22 +440,3 @@ test("Deployments Delete Deployment", async () => {
405
440
  state: "DELETED",
406
441
  });
407
442
  });
408
-
409
- test("Deployments Update Integration Deployment Action", async () => {
410
- const testHttpClient = createTestHTTPClient(
411
- "update-integration-deployment-action",
412
- );
413
-
414
- const vercel = new Vercel({
415
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
416
- httpClient: testHttpClient,
417
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
418
- });
419
-
420
- await vercel.deployments.updateIntegrationDeploymentAction({
421
- deploymentId: "<id>",
422
- integrationConfigurationId: "<id>",
423
- resourceId: "<id>",
424
- action: "<value>",
425
- });
426
- });
@@ -6,36 +6,6 @@ import { expect, test } from "vitest";
6
6
  import { Vercel } from "../index.js";
7
7
  import { createTestHTTPClient } from "./testclient.js";
8
8
 
9
- test("Dns Create Record", async () => {
10
- const testHttpClient = createTestHTTPClient("createRecord");
11
-
12
- const vercel = new Vercel({
13
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
14
- httpClient: testHttpClient,
15
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
16
- });
17
-
18
- const result = await vercel.dns.createRecord({
19
- domain: "example.com",
20
- teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
21
- slug: "my-team-url-slug",
22
- requestBody: {
23
- type: "CNAME",
24
- ttl: 60,
25
- https: {
26
- priority: 10,
27
- target: "host.example.com",
28
- params: "alpn=h2,h3",
29
- },
30
- comment: "used to verify ownership of domain",
31
- },
32
- });
33
- expect(result).toBeDefined();
34
- expect(result).toEqual({
35
- uid: "rec_V0fra8eEgQwEpFhYG2vTzC3K",
36
- });
37
- });
38
-
39
9
  test("Dns Update Record", async () => {
40
10
  const testHttpClient = createTestHTTPClient("updateRecord");
41
11
 
@@ -44,7 +44,7 @@ test("Domains Buy Domain", async () => {
44
44
  "<value>",
45
45
  ],
46
46
  verified: false,
47
- created: 9374.80,
47
+ created: 9374.8,
48
48
  pending: false,
49
49
  },
50
50
  });
@@ -319,6 +319,6 @@ test("Domains Delete Domain", async () => {
319
319
  });
320
320
  expect(result).toBeDefined();
321
321
  expect(result).toEqual({
322
- uid: "rec_V0fra8eEgQwEpFhYG2vTzC3K",
322
+ uid: "<id>",
323
323
  });
324
324
  });
@@ -25,6 +25,10 @@ test("Edge Config Get Edge Configs", async () => {
25
25
  sizeInBytes: 8239.08,
26
26
  itemCount: 557.07,
27
27
  },
28
+ {
29
+ sizeInBytes: 4591.09,
30
+ itemCount: 7040.34,
31
+ },
28
32
  ]);
29
33
  });
30
34
 
@@ -129,9 +133,9 @@ test("Edge Config Get Edge Config Items", async () => {
129
133
  expect(result).toBeDefined();
130
134
  expect(result).toEqual({
131
135
  key: "<key>",
132
- value: "5002.95",
136
+ value: 5002.95,
133
137
  edgeConfigId: "<id>",
134
- createdAt: 9069.68,
138
+ createdAt: 9069.69,
135
139
  updatedAt: 6276.41,
136
140
  });
137
141
  });
@@ -209,10 +213,10 @@ test("Edge Config Get Edge Config Item", async () => {
209
213
  expect(result).toBeDefined();
210
214
  expect(result).toEqual({
211
215
  key: "<key>",
212
- value: "9966.77",
216
+ value: 9966.78,
213
217
  edgeConfigId: "<id>",
214
218
  createdAt: 1621.85,
215
- updatedAt: 3034.44,
219
+ updatedAt: 3034.43,
216
220
  });
217
221
  });
218
222
 
@@ -236,7 +240,7 @@ test("Edge Config Get Edge Config Tokens", async () => {
236
240
  label: "<value>",
237
241
  id: "<id>",
238
242
  edgeConfigId: "<id>",
239
- createdAt: 7692.35,
243
+ createdAt: 7692.36,
240
244
  });
241
245
  });
242
246
 
@@ -2,14 +2,26 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { assert, expect, it, test } from "vitest";
5
+ import { expect, test } from "vitest";
6
6
  import { Vercel } from "../index.js";
7
7
  import { createTestHTTPClient } from "./testclient.js";
8
8
 
9
- it.skip("Environment Post /V1 /Projects/{id Or Name}/custom Environments", async () => {
10
- assert.fail(
11
- "incomplete test found please make sure to address the following errors: [`workflow step post_/v1/projects/{idOrName}/custom-environments.test referencing operation post_/v1/projects/{idOrName}/custom-environments not found in document`]",
12
- );
9
+ test("Environment Create Custom Environment", async () => {
10
+ const testHttpClient = createTestHTTPClient("createCustomEnvironment");
11
+
12
+ const vercel = new Vercel({
13
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
14
+ httpClient: testHttpClient,
15
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
16
+ });
17
+
18
+ const result = await vercel.environment.createCustomEnvironment({
19
+ idOrName: "<value>",
20
+ teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
21
+ slug: "my-team-url-slug",
22
+ });
23
+ expect(result).toBeDefined();
24
+ expect(result).toEqual({});
13
25
  });
14
26
 
15
27
  test("Environment Get /V9 /Projects/{id Or Name}/custom Environments", async () => {
@@ -31,46 +43,13 @@ test("Environment Get /V9 /Projects/{id Or Name}/custom Environments", async ()
31
43
  });
32
44
  expect(result).toBeDefined();
33
45
  expect(result).toEqual({
46
+ accountLimit: {
47
+ total: 966.92,
48
+ },
34
49
  environments: [],
35
50
  });
36
51
  });
37
52
 
38
- it.skip("Environment Get /V9 /Projects/{id Or Name}/custom Environments/{environment Slug Or Id}", async () => {
39
- assert.fail(
40
- "incomplete test found please make sure to address the following errors: [`workflow step get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}.test referencing operation get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId} not found in document`]",
41
- );
42
- });
43
-
44
- it.skip("Environment Patch /V9 /Projects/{id Or Name}/custom Environments/{environment Slug Or Id}", async () => {
45
- assert.fail(
46
- "incomplete test found please make sure to address the following errors: [`workflow step patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}.test referencing operation patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId} not found in document`]",
47
- );
48
- });
49
-
50
- it.skip("Environment Delete /V9 /Projects/{id Or Name}/custom Environments/{environment Slug Or Id}", async () => {
51
- assert.fail(
52
- "incomplete test found please make sure to address the following errors: [`workflow step delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}.test referencing operation delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId} not found in document`]",
53
- );
54
- });
55
-
56
- test("Environment Create Custom Environment", async () => {
57
- const testHttpClient = createTestHTTPClient("createCustomEnvironment");
58
-
59
- const vercel = new Vercel({
60
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
61
- httpClient: testHttpClient,
62
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
63
- });
64
-
65
- const result = await vercel.environment.createCustomEnvironment({
66
- idOrName: "<value>",
67
- teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
68
- slug: "my-team-url-slug",
69
- });
70
- expect(result).toBeDefined();
71
- expect(result).toEqual({});
72
- });
73
-
74
53
  test("Environment Get Custom Environment", async () => {
75
54
  const testHttpClient = createTestHTTPClient("getCustomEnvironment");
76
55
 
@@ -2,7 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { assert, expect, it, test } from "vitest";
5
+ import { expect, test } from "vitest";
6
6
  import { Vercel } from "../index.js";
7
7
  import { createTestHTTPClient } from "./testclient.js";
8
8
 
@@ -61,15 +61,3 @@ test("Integrations Delete Configuration", async () => {
61
61
  slug: "my-team-url-slug",
62
62
  });
63
63
  });
64
-
65
- it.skip("Integrations Git Namespaces", async () => {
66
- assert.fail(
67
- "incomplete test found please make sure to address the following errors: [`workflow step gitNamespaces.test referencing operation gitNamespaces not found in document`]",
68
- );
69
- });
70
-
71
- it.skip("Integrations Search Repo", async () => {
72
- assert.fail(
73
- "incomplete test found please make sure to address the following errors: [`workflow step searchRepo.test referencing operation searchRepo not found in document`]",
74
- );
75
- });
@@ -2,10 +2,26 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { assert, expect, it, test } from "vitest";
5
+ import { expect, test } from "vitest";
6
6
  import { Vercel } from "../index.js";
7
7
  import { createTestHTTPClient } from "./testclient.js";
8
8
 
9
+ test("Logdrains Delete Configurable Log Drain", async () => {
10
+ const testHttpClient = createTestHTTPClient("deleteConfigurableLogDrain");
11
+
12
+ const vercel = new Vercel({
13
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
14
+ httpClient: testHttpClient,
15
+ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
16
+ });
17
+
18
+ await vercel.logDrains.deleteConfigurableLogDrain({
19
+ id: "<id>",
20
+ teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
21
+ slug: "my-team-url-slug",
22
+ });
23
+ });
24
+
9
25
  test("Logdrains Get Integration Log Drains", async () => {
10
26
  const testHttpClient = createTestHTTPClient("getIntegrationLogDrains");
11
27
 
@@ -20,7 +36,64 @@ test("Logdrains Get Integration Log Drains", async () => {
20
36
  slug: "my-team-url-slug",
21
37
  });
22
38
  expect(result).toBeDefined();
23
- expect(result).toEqual([]);
39
+ expect(result).toEqual([
40
+ {
41
+ clientId: "oac_xRhY4LAB7yLhUADD69EvV7ct",
42
+ configurationId: "icfg_cuwj0AdCdH3BwWT4LPijCC7t",
43
+ createdAt: 1558531915505,
44
+ id: "ld_nBuA7zCID8g4QZ8g",
45
+ deliveryFormat: "json",
46
+ name: "My first log drain",
47
+ ownerId: "kr1PsOIzqEL5Xg6M4VZcZosf",
48
+ projectId: "AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb",
49
+ projectIds: [
50
+ "AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb",
51
+ ],
52
+ url: "https://example.com/log-drain",
53
+ sources: [
54
+ "build",
55
+ ],
56
+ createdFrom: "integration",
57
+ headers: {
58
+ "0": "{",
59
+ "1": "\"",
60
+ "2": "A",
61
+ "3": "u",
62
+ "4": "t",
63
+ "5": "h",
64
+ "6": "o",
65
+ "7": "r",
66
+ "8": "i",
67
+ "9": "z",
68
+ "10": "a",
69
+ "11": "t",
70
+ "12": "i",
71
+ "13": "o",
72
+ "14": "n",
73
+ "15": "\"",
74
+ "16": ":",
75
+ "17": " ",
76
+ "18": "\"",
77
+ "19": "B",
78
+ "20": "e",
79
+ "21": "a",
80
+ "22": "r",
81
+ "23": "e",
82
+ "24": "r",
83
+ "25": " ",
84
+ "26": "1",
85
+ "27": "2",
86
+ "28": "3",
87
+ "29": "\"",
88
+ "30": "}",
89
+ },
90
+ environments: [
91
+ "production",
92
+ ],
93
+ branch: "feature/*",
94
+ samplingRate: 0.5,
95
+ },
96
+ ]);
24
97
  });
25
98
 
26
99
  test("Logdrains Create Log Drain", async () => {
@@ -116,37 +189,3 @@ test("Logdrains Delete Integration Log Drain", async () => {
116
189
  slug: "my-team-url-slug",
117
190
  });
118
191
  });
119
-
120
- it.skip("Logdrains Get Configurable Log Drain", async () => {
121
- assert.fail(
122
- "incomplete test found please make sure to address the following errors: [`workflow step getConfigurableLogDrain.test referencing operation getConfigurableLogDrain not found in document`]",
123
- );
124
- });
125
-
126
- test("Logdrains Delete Configurable Log Drain", async () => {
127
- const testHttpClient = createTestHTTPClient("deleteConfigurableLogDrain");
128
-
129
- const vercel = new Vercel({
130
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
131
- httpClient: testHttpClient,
132
- bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
133
- });
134
-
135
- await vercel.logDrains.deleteConfigurableLogDrain({
136
- id: "<id>",
137
- teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
138
- slug: "my-team-url-slug",
139
- });
140
- });
141
-
142
- it.skip("Logdrains Get All Log Drains", async () => {
143
- assert.fail(
144
- "incomplete test found please make sure to address the following errors: [`workflow step getAllLogDrains.test referencing operation getAllLogDrains not found in document`]",
145
- );
146
- });
147
-
148
- it.skip("Logdrains Create Configurable Log Drain", async () => {
149
- assert.fail(
150
- "incomplete test found please make sure to address the following errors: [`workflow step createConfigurableLogDrain.test referencing operation createConfigurableLogDrain not found in document`]",
151
- );
152
- });