netlify-api 1.2.0 → 1.3.0

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/dist/effect.cjs CHANGED
@@ -1,3854 +1,10 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
3
  var effect = require('@sferadev/openapi-utils/effect');
4
+ var components = require('./components-iv5vmyoy.cjs');
4
5
 
5
- function notEmpty(value) {
6
- return value !== null && value !== undefined;
7
- }
8
- function compactObject(obj) {
9
- return Object.fromEntries(Object.entries(obj).filter(([, value])=>notEmpty(value)));
10
- }
11
-
12
- const baseUrl = "https://api.netlify.com";
13
- async function client({ url, method, body, headers, pathParams, queryParams, signal, token = null, basePath = "/api/v1", fetchImpl = fetch }) {
14
- try {
15
- const requestHeaders = compactObject({
16
- "Content-Type": "application/json",
17
- Authorization: token ? `Bearer ${token}` : undefined,
18
- ...headers
19
- });
20
- if (requestHeaders["Content-Type"]?.toLowerCase().includes("multipart/form-data")) {
21
- delete requestHeaders["Content-Type"];
22
- }
23
- const payload = body instanceof FormData ? body : requestHeaders["Content-Type"] === "application/json" ? JSON.stringify(body) : body;
24
- const fullUrl = `${baseUrl}${basePath}${resolveUrl(url, queryParams, pathParams)}`;
25
- const response = await fetchImpl(fullUrl, {
26
- signal,
27
- method: method.toUpperCase(),
28
- body: payload,
29
- headers: requestHeaders
30
- });
31
- if (!response.ok) {
32
- let error;
33
- try {
34
- error = await response.json();
35
- } catch (e) {
36
- error = {
37
- status: "unknown",
38
- payload: e instanceof Error ? `Unexpected error (${e.message})` : "Unexpected error"
39
- };
40
- }
41
- throw error;
42
- }
43
- if (response.headers?.get("content-type")?.includes("json")) {
44
- return await response.json();
45
- } else {
46
- return await response.text();
47
- }
48
- } catch (e) {
49
- const errorObject = {
50
- name: "unknown",
51
- message: e instanceof Error ? `Network error (${e.message})` : "Network error",
52
- stack: e
53
- };
54
- throw errorObject;
55
- }
56
- }
57
- const resolveUrl = (url, queryParams = {}, pathParams = {})=>{
58
- let query = new URLSearchParams(queryParams).toString();
59
- if (query) query = `?${query}`;
60
- return url.replace(/\{\w*\}/g, (key)=>pathParams[key.slice(1, -1)] ?? "") + query;
61
- };
62
-
63
- /**
64
- * @description **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [getEnvVars](#tag/environmentVariables/operation/getEnvVars) to retrieve site environment variables.
65
- * @link /sites
66
- */ async function listSites({ queryParams, config } = {}) {
67
- const { client: request = client, ...requestConfig } = config ?? {};
68
- const data = await request({
69
- method: "GET",
70
- url: `/sites`,
71
- queryParams,
72
- ...requestConfig,
73
- headers: {
74
- ...requestConfig.headers
75
- }
76
- });
77
- return data;
78
- }
79
- /**
80
- * @description **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [createEnvVars](#tag/environmentVariables/operation/createEnvVars) to create environment variables for a site.
81
- * @link /sites
82
- */ async function createSite({ body, queryParams, config } = {}) {
83
- const { client: request = client, ...requestConfig } = config ?? {};
84
- const data = await request({
85
- method: "POST",
86
- url: `/sites`,
87
- queryParams,
88
- body: body,
89
- ...requestConfig,
90
- headers: {
91
- ...requestConfig.headers
92
- }
93
- });
94
- return data;
95
- }
96
- /**
97
- * @description **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [getEnvVars](#tag/environmentVariables/operation/getEnvVars) to retrieve site environment variables.
98
- * @link /sites/{site_id}
99
- */ async function getSite({ pathParams, queryParams, config } = {}) {
100
- const { client: request = client, ...requestConfig } = config ?? {};
101
- if (!pathParams.site_id) {
102
- throw new Error(`Missing required path parameter: site_id`);
103
- }
104
- const data = await request({
105
- method: "GET",
106
- url: `/sites/${pathParams.site_id}`,
107
- queryParams,
108
- ...requestConfig,
109
- headers: {
110
- ...requestConfig.headers
111
- }
112
- });
113
- return data;
114
- }
115
- /**
116
- * @description **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [updateEnvVar](#tag/environmentVariables/operation/updateEnvVar) to update a site's environment variables.
117
- * @link /sites/{site_id}
118
- */ async function updateSite({ pathParams, body, config } = {}) {
119
- const { client: request = client, ...requestConfig } = config ?? {};
120
- if (!pathParams.site_id) {
121
- throw new Error(`Missing required path parameter: site_id`);
122
- }
123
- const data = await request({
124
- method: "PATCH",
125
- url: `/sites/${pathParams.site_id}`,
126
- body: body,
127
- ...requestConfig,
128
- headers: {
129
- ...requestConfig.headers
130
- }
131
- });
132
- return data;
133
- }
134
- /**
135
- * @link /sites/{site_id}
136
- */ async function deleteSite({ pathParams, config } = {}) {
137
- const { client: request = client, ...requestConfig } = config ?? {};
138
- if (!pathParams.site_id) {
139
- throw new Error(`Missing required path parameter: site_id`);
140
- }
141
- const data = await request({
142
- method: "DELETE",
143
- url: `/sites/${pathParams.site_id}`,
144
- ...requestConfig,
145
- headers: {
146
- ...requestConfig.headers
147
- }
148
- });
149
- return data;
150
- }
151
- /**
152
- * @description Provisions or updates a TLS certificate for the site.
153
- * **Creating a certificate (site has no certificate):**
154
- * - Omit certificate params to initiate Let's Encrypt provisioning
155
- * - Provide certificate, key, and ca_certificates to upload a custom certificate
156
- * **Updating a certificate (site already has a certificate):**
157
- * - REQUIRES certificate, key, and ca_certificates to replace with a new custom certificate
158
- * - Use POST /api/v1/sites/{site_id}/ssl/renew to renew an existing Let's Encrypt certificate
159
- * @link /sites/{site_id}/ssl
160
- */ async function provisionSiteTLSCertificate({ pathParams, queryParams, config } = {}) {
161
- const { client: request = client, ...requestConfig } = config ?? {};
162
- if (!pathParams.site_id) {
163
- throw new Error(`Missing required path parameter: site_id`);
164
- }
165
- const data = await request({
166
- method: "POST",
167
- url: `/sites/${pathParams.site_id}/ssl`,
168
- queryParams,
169
- ...requestConfig,
170
- headers: {
171
- ...requestConfig.headers
172
- }
173
- });
174
- return data;
175
- }
176
- /**
177
- * @link /sites/{site_id}/ssl
178
- */ async function showSiteTLSCertificate({ pathParams, config } = {}) {
179
- const { client: request = client, ...requestConfig } = config ?? {};
180
- if (!pathParams.site_id) {
181
- throw new Error(`Missing required path parameter: site_id`);
182
- }
183
- const data = await request({
184
- method: "GET",
185
- url: `/sites/${pathParams.site_id}/ssl`,
186
- ...requestConfig,
187
- headers: {
188
- ...requestConfig.headers
189
- }
190
- });
191
- return data;
192
- }
193
- /**
194
- * @link /sites/{site_id}/ssl/certificates
195
- */ async function getAllCertificates({ pathParams, queryParams, config } = {}) {
196
- const { client: request = client, ...requestConfig } = config ?? {};
197
- if (!pathParams.site_id) {
198
- throw new Error(`Missing required path parameter: site_id`);
199
- }
200
- const data = await request({
201
- method: "GET",
202
- url: `/sites/${pathParams.site_id}/ssl/certificates`,
203
- queryParams,
204
- ...requestConfig,
205
- headers: {
206
- ...requestConfig.headers
207
- }
208
- });
209
- return data;
210
- }
211
- /**
212
- * @description Returns all environment variables for an account or site. An account corresponds to a team in the Netlify UI.
213
- * @link /accounts/{account_id}/env
214
- */ async function getEnvVars({ pathParams, queryParams, config } = {}) {
215
- const { client: request = client, ...requestConfig } = config ?? {};
216
- if (!pathParams.account_id) {
217
- throw new Error(`Missing required path parameter: account_id`);
218
- }
219
- const data = await request({
220
- method: "GET",
221
- url: `/accounts/${pathParams.account_id}/env`,
222
- queryParams,
223
- ...requestConfig,
224
- headers: {
225
- ...requestConfig.headers
226
- }
227
- });
228
- return data;
229
- }
230
- /**
231
- * @description Creates new environment variables. Granular scopes are available on Pro plans and above.
232
- * @link /accounts/{account_id}/env
233
- */ async function createEnvVars({ pathParams, body, queryParams, config } = {}) {
234
- const { client: request = client, ...requestConfig } = config ?? {};
235
- if (!pathParams.account_id) {
236
- throw new Error(`Missing required path parameter: account_id`);
237
- }
238
- const data = await request({
239
- method: "POST",
240
- url: `/accounts/${pathParams.account_id}/env`,
241
- queryParams,
242
- body: body,
243
- ...requestConfig,
244
- headers: {
245
- ...requestConfig.headers
246
- }
247
- });
248
- return data;
249
- }
250
- /**
251
- * @description Returns all environment variables for a site. This convenience method behaves the same as `getEnvVars` but doesn't require an `account_id` as input.
252
- * @link /api/v1/sites/{site_id}/env
253
- */ async function getSiteEnvVars({ pathParams, queryParams, config } = {}) {
254
- const { client: request = client, ...requestConfig } = config ?? {};
255
- if (!pathParams.site_id) {
256
- throw new Error(`Missing required path parameter: site_id`);
257
- }
258
- const data = await request({
259
- method: "GET",
260
- url: `/api/v1/sites/${pathParams.site_id}/env`,
261
- queryParams,
262
- ...requestConfig,
263
- headers: {
264
- ...requestConfig.headers
265
- }
266
- });
267
- return data;
268
- }
269
- /**
270
- * @description Returns an individual environment variable.
271
- * @link /accounts/{account_id}/env/{key}
272
- */ async function getEnvVar({ pathParams, queryParams, config } = {}) {
273
- const { client: request = client, ...requestConfig } = config ?? {};
274
- if (!pathParams.account_id) {
275
- throw new Error(`Missing required path parameter: account_id`);
276
- }
277
- if (!pathParams.key) {
278
- throw new Error(`Missing required path parameter: key`);
279
- }
280
- const data = await request({
281
- method: "GET",
282
- url: `/accounts/${pathParams.account_id}/env/${pathParams.key}`,
283
- queryParams,
284
- ...requestConfig,
285
- headers: {
286
- ...requestConfig.headers
287
- }
288
- });
289
- return data;
290
- }
291
- /**
292
- * @description Updates an existing environment variable and all of its values. Existing values will be replaced by values provided.
293
- * @link /accounts/{account_id}/env/{key}
294
- */ async function updateEnvVar({ pathParams, body, queryParams, config } = {}) {
295
- const { client: request = client, ...requestConfig } = config ?? {};
296
- if (!pathParams.account_id) {
297
- throw new Error(`Missing required path parameter: account_id`);
298
- }
299
- if (!pathParams.key) {
300
- throw new Error(`Missing required path parameter: key`);
301
- }
302
- const data = await request({
303
- method: "PUT",
304
- url: `/accounts/${pathParams.account_id}/env/${pathParams.key}`,
305
- queryParams,
306
- body: body,
307
- ...requestConfig,
308
- headers: {
309
- ...requestConfig.headers
310
- }
311
- });
312
- return data;
313
- }
314
- /**
315
- * @description Updates or creates a new value for an existing environment variable.
316
- * @link /accounts/{account_id}/env/{key}
317
- */ async function setEnvVarValue({ pathParams, body, queryParams, config } = {}) {
318
- const { client: request = client, ...requestConfig } = config ?? {};
319
- if (!pathParams.account_id) {
320
- throw new Error(`Missing required path parameter: account_id`);
321
- }
322
- if (!pathParams.key) {
323
- throw new Error(`Missing required path parameter: key`);
324
- }
325
- const data = await request({
326
- method: "PATCH",
327
- url: `/accounts/${pathParams.account_id}/env/${pathParams.key}`,
328
- queryParams,
329
- body: body,
330
- ...requestConfig,
331
- headers: {
332
- ...requestConfig.headers
333
- }
334
- });
335
- return data;
336
- }
337
- /**
338
- * @description Deletes an environment variable
339
- * @link /accounts/{account_id}/env/{key}
340
- */ async function deleteEnvVar({ pathParams, queryParams, config } = {}) {
341
- const { client: request = client, ...requestConfig } = config ?? {};
342
- if (!pathParams.account_id) {
343
- throw new Error(`Missing required path parameter: account_id`);
344
- }
345
- if (!pathParams.key) {
346
- throw new Error(`Missing required path parameter: key`);
347
- }
348
- const data = await request({
349
- method: "DELETE",
350
- url: `/accounts/${pathParams.account_id}/env/${pathParams.key}`,
351
- queryParams,
352
- ...requestConfig,
353
- headers: {
354
- ...requestConfig.headers
355
- }
356
- });
357
- return data;
358
- }
359
- /**
360
- * @description Deletes a specific environment variable value.
361
- * @link /accounts/{account_id}/env/{key}/value/{id}
362
- */ async function deleteEnvVarValue({ pathParams, queryParams, config } = {}) {
363
- const { client: request = client, ...requestConfig } = config ?? {};
364
- if (!pathParams.account_id) {
365
- throw new Error(`Missing required path parameter: account_id`);
366
- }
367
- if (!pathParams.id) {
368
- throw new Error(`Missing required path parameter: id`);
369
- }
370
- if (!pathParams.key) {
371
- throw new Error(`Missing required path parameter: key`);
372
- }
373
- const data = await request({
374
- method: "DELETE",
375
- url: `/accounts/${pathParams.account_id}/env/${pathParams.key}/value/${pathParams.id}`,
376
- queryParams,
377
- ...requestConfig,
378
- headers: {
379
- ...requestConfig.headers
380
- }
381
- });
382
- return data;
383
- }
384
- /**
385
- * @link /sites/{site_id}/functions
386
- */ async function searchSiteFunctions({ pathParams, queryParams, config } = {}) {
387
- const { client: request = client, ...requestConfig } = config ?? {};
388
- if (!pathParams.site_id) {
389
- throw new Error(`Missing required path parameter: site_id`);
390
- }
391
- const data = await request({
392
- method: "GET",
393
- url: `/sites/${pathParams.site_id}/functions`,
394
- queryParams,
395
- ...requestConfig,
396
- headers: {
397
- ...requestConfig.headers
398
- }
399
- });
400
- return data;
401
- }
402
- /**
403
- * @link /sites/{site_id}/forms
404
- */ async function listSiteForms({ pathParams, config } = {}) {
405
- const { client: request = client, ...requestConfig } = config ?? {};
406
- if (!pathParams.site_id) {
407
- throw new Error(`Missing required path parameter: site_id`);
408
- }
409
- const data = await request({
410
- method: "GET",
411
- url: `/sites/${pathParams.site_id}/forms`,
412
- ...requestConfig,
413
- headers: {
414
- ...requestConfig.headers
415
- }
416
- });
417
- return data;
418
- }
419
- /**
420
- * @link /sites/{site_id}/forms/{form_id}
421
- */ async function deleteSiteForm({ pathParams, config } = {}) {
422
- const { client: request = client, ...requestConfig } = config ?? {};
423
- if (!pathParams.site_id) {
424
- throw new Error(`Missing required path parameter: site_id`);
425
- }
426
- if (!pathParams.form_id) {
427
- throw new Error(`Missing required path parameter: form_id`);
428
- }
429
- const data = await request({
430
- method: "DELETE",
431
- url: `/sites/${pathParams.site_id}/forms/${pathParams.form_id}`,
432
- ...requestConfig,
433
- headers: {
434
- ...requestConfig.headers
435
- }
436
- });
437
- return data;
438
- }
439
- /**
440
- * @link /sites/{site_id}/submissions
441
- */ async function listSiteSubmissions({ pathParams, queryParams, config } = {}) {
442
- const { client: request = client, ...requestConfig } = config ?? {};
443
- if (!pathParams.site_id) {
444
- throw new Error(`Missing required path parameter: site_id`);
445
- }
446
- const data = await request({
447
- method: "GET",
448
- url: `/sites/${pathParams.site_id}/submissions`,
449
- queryParams,
450
- ...requestConfig,
451
- headers: {
452
- ...requestConfig.headers
453
- }
454
- });
455
- return data;
456
- }
457
- /**
458
- * @link /sites/{site_id}/files
459
- */ async function listSiteFiles({ pathParams, config } = {}) {
460
- const { client: request = client, ...requestConfig } = config ?? {};
461
- if (!pathParams.site_id) {
462
- throw new Error(`Missing required path parameter: site_id`);
463
- }
464
- const data = await request({
465
- method: "GET",
466
- url: `/sites/${pathParams.site_id}/files`,
467
- ...requestConfig,
468
- headers: {
469
- ...requestConfig.headers
470
- }
471
- });
472
- return data;
473
- }
474
- /**
475
- * @link /sites/{site_id}/assets
476
- */ async function listSiteAssets({ pathParams, config } = {}) {
477
- const { client: request = client, ...requestConfig } = config ?? {};
478
- if (!pathParams.site_id) {
479
- throw new Error(`Missing required path parameter: site_id`);
480
- }
481
- const data = await request({
482
- method: "GET",
483
- url: `/sites/${pathParams.site_id}/assets`,
484
- ...requestConfig,
485
- headers: {
486
- ...requestConfig.headers
487
- }
488
- });
489
- return data;
490
- }
491
- /**
492
- * @link /sites/{site_id}/assets
493
- */ async function createSiteAsset({ pathParams, queryParams, config } = {}) {
494
- const { client: request = client, ...requestConfig } = config ?? {};
495
- if (!pathParams.site_id) {
496
- throw new Error(`Missing required path parameter: site_id`);
497
- }
498
- const data = await request({
499
- method: "POST",
500
- url: `/sites/${pathParams.site_id}/assets`,
501
- queryParams,
502
- ...requestConfig,
503
- headers: {
504
- ...requestConfig.headers
505
- }
506
- });
507
- return data;
508
- }
509
- /**
510
- * @link /sites/{site_id}/assets/{asset_id}
511
- */ async function getSiteAssetInfo({ pathParams, config } = {}) {
512
- const { client: request = client, ...requestConfig } = config ?? {};
513
- if (!pathParams.site_id) {
514
- throw new Error(`Missing required path parameter: site_id`);
515
- }
516
- if (!pathParams.asset_id) {
517
- throw new Error(`Missing required path parameter: asset_id`);
518
- }
519
- const data = await request({
520
- method: "GET",
521
- url: `/sites/${pathParams.site_id}/assets/${pathParams.asset_id}`,
522
- ...requestConfig,
523
- headers: {
524
- ...requestConfig.headers
525
- }
526
- });
527
- return data;
528
- }
529
- /**
530
- * @link /sites/{site_id}/assets/{asset_id}
531
- */ async function updateSiteAsset({ pathParams, queryParams, config } = {}) {
532
- const { client: request = client, ...requestConfig } = config ?? {};
533
- if (!pathParams.site_id) {
534
- throw new Error(`Missing required path parameter: site_id`);
535
- }
536
- if (!pathParams.asset_id) {
537
- throw new Error(`Missing required path parameter: asset_id`);
538
- }
539
- const data = await request({
540
- method: "PUT",
541
- url: `/sites/${pathParams.site_id}/assets/${pathParams.asset_id}`,
542
- queryParams,
543
- ...requestConfig,
544
- headers: {
545
- ...requestConfig.headers
546
- }
547
- });
548
- return data;
549
- }
550
- /**
551
- * @link /sites/{site_id}/assets/{asset_id}
552
- */ async function deleteSiteAsset({ pathParams, config } = {}) {
553
- const { client: request = client, ...requestConfig } = config ?? {};
554
- if (!pathParams.site_id) {
555
- throw new Error(`Missing required path parameter: site_id`);
556
- }
557
- if (!pathParams.asset_id) {
558
- throw new Error(`Missing required path parameter: asset_id`);
559
- }
560
- const data = await request({
561
- method: "DELETE",
562
- url: `/sites/${pathParams.site_id}/assets/${pathParams.asset_id}`,
563
- ...requestConfig,
564
- headers: {
565
- ...requestConfig.headers
566
- }
567
- });
568
- return data;
569
- }
570
- /**
571
- * @link /sites/{site_id}/assets/{asset_id}/public_signature
572
- */ async function getSiteAssetPublicSignature({ pathParams, config } = {}) {
573
- const { client: request = client, ...requestConfig } = config ?? {};
574
- if (!pathParams.site_id) {
575
- throw new Error(`Missing required path parameter: site_id`);
576
- }
577
- if (!pathParams.asset_id) {
578
- throw new Error(`Missing required path parameter: asset_id`);
579
- }
580
- const data = await request({
581
- method: "GET",
582
- url: `/sites/${pathParams.site_id}/assets/${pathParams.asset_id}/public_signature`,
583
- ...requestConfig,
584
- headers: {
585
- ...requestConfig.headers
586
- }
587
- });
588
- return data;
589
- }
590
- /**
591
- * @link /sites/{site_id}/files/{file_path}
592
- */ async function getSiteFileByPathName({ pathParams, config } = {}) {
593
- const { client: request = client, ...requestConfig } = config ?? {};
594
- if (!pathParams.site_id) {
595
- throw new Error(`Missing required path parameter: site_id`);
596
- }
597
- if (!pathParams.file_path) {
598
- throw new Error(`Missing required path parameter: file_path`);
599
- }
600
- const data = await request({
601
- method: "GET",
602
- url: `/sites/${pathParams.site_id}/files/${pathParams.file_path}`,
603
- ...requestConfig,
604
- headers: {
605
- ...requestConfig.headers
606
- }
607
- });
608
- return data;
609
- }
610
- /**
611
- * @description Purges cached content from Netlify's CDN. Supports purging by Cache-Tag.
612
- * @link /purge
613
- */ async function purgeCache({ body, config } = {}) {
614
- const { client: request = client, ...requestConfig } = config ?? {};
615
- const data = await request({
616
- method: "POST",
617
- url: `/purge`,
618
- body: body,
619
- ...requestConfig,
620
- headers: {
621
- ...requestConfig.headers
622
- }
623
- });
624
- return data;
625
- }
626
- /**
627
- * @link /sites/{site_id}/snippets
628
- */ async function listSiteSnippets({ pathParams, config } = {}) {
629
- const { client: request = client, ...requestConfig } = config ?? {};
630
- if (!pathParams.site_id) {
631
- throw new Error(`Missing required path parameter: site_id`);
632
- }
633
- const data = await request({
634
- method: "GET",
635
- url: `/sites/${pathParams.site_id}/snippets`,
636
- ...requestConfig,
637
- headers: {
638
- ...requestConfig.headers
639
- }
640
- });
641
- return data;
642
- }
643
- /**
644
- * @link /sites/{site_id}/snippets
645
- */ async function createSiteSnippet({ pathParams, body, config } = {}) {
646
- const { client: request = client, ...requestConfig } = config ?? {};
647
- if (!pathParams.site_id) {
648
- throw new Error(`Missing required path parameter: site_id`);
649
- }
650
- const data = await request({
651
- method: "POST",
652
- url: `/sites/${pathParams.site_id}/snippets`,
653
- body: body,
654
- ...requestConfig,
655
- headers: {
656
- ...requestConfig.headers
657
- }
658
- });
659
- return data;
660
- }
661
- /**
662
- * @link /sites/{site_id}/snippets/{snippet_id}
663
- */ async function getSiteSnippet({ pathParams, config } = {}) {
664
- const { client: request = client, ...requestConfig } = config ?? {};
665
- if (!pathParams.site_id) {
666
- throw new Error(`Missing required path parameter: site_id`);
667
- }
668
- if (!pathParams.snippet_id) {
669
- throw new Error(`Missing required path parameter: snippet_id`);
670
- }
671
- const data = await request({
672
- method: "GET",
673
- url: `/sites/${pathParams.site_id}/snippets/${pathParams.snippet_id}`,
674
- ...requestConfig,
675
- headers: {
676
- ...requestConfig.headers
677
- }
678
- });
679
- return data;
680
- }
681
- /**
682
- * @link /sites/{site_id}/snippets/{snippet_id}
683
- */ async function updateSiteSnippet({ pathParams, body, config } = {}) {
684
- const { client: request = client, ...requestConfig } = config ?? {};
685
- if (!pathParams.site_id) {
686
- throw new Error(`Missing required path parameter: site_id`);
687
- }
688
- if (!pathParams.snippet_id) {
689
- throw new Error(`Missing required path parameter: snippet_id`);
690
- }
691
- const data = await request({
692
- method: "PUT",
693
- url: `/sites/${pathParams.site_id}/snippets/${pathParams.snippet_id}`,
694
- body: body,
695
- ...requestConfig,
696
- headers: {
697
- ...requestConfig.headers
698
- }
699
- });
700
- return data;
701
- }
702
- /**
703
- * @link /sites/{site_id}/snippets/{snippet_id}
704
- */ async function deleteSiteSnippet({ pathParams, config } = {}) {
705
- const { client: request = client, ...requestConfig } = config ?? {};
706
- if (!pathParams.site_id) {
707
- throw new Error(`Missing required path parameter: site_id`);
708
- }
709
- if (!pathParams.snippet_id) {
710
- throw new Error(`Missing required path parameter: snippet_id`);
711
- }
712
- const data = await request({
713
- method: "DELETE",
714
- url: `/sites/${pathParams.site_id}/snippets/${pathParams.snippet_id}`,
715
- ...requestConfig,
716
- headers: {
717
- ...requestConfig.headers
718
- }
719
- });
720
- return data;
721
- }
722
- /**
723
- * @link /sites/{site_id}/metadata
724
- */ async function getSiteMetadata({ pathParams, config } = {}) {
725
- const { client: request = client, ...requestConfig } = config ?? {};
726
- if (!pathParams.site_id) {
727
- throw new Error(`Missing required path parameter: site_id`);
728
- }
729
- const data = await request({
730
- method: "GET",
731
- url: `/sites/${pathParams.site_id}/metadata`,
732
- ...requestConfig,
733
- headers: {
734
- ...requestConfig.headers
735
- }
736
- });
737
- return data;
738
- }
739
- /**
740
- * @link /sites/{site_id}/metadata
741
- */ async function updateSiteMetadata({ pathParams, body, config } = {}) {
742
- const { client: request = client, ...requestConfig } = config ?? {};
743
- if (!pathParams.site_id) {
744
- throw new Error(`Missing required path parameter: site_id`);
745
- }
746
- const data = await request({
747
- method: "PUT",
748
- url: `/sites/${pathParams.site_id}/metadata`,
749
- body: body,
750
- ...requestConfig,
751
- headers: {
752
- ...requestConfig.headers
753
- }
754
- });
755
- return data;
756
- }
757
- /**
758
- * @link /sites/{site_id}/build_hooks
759
- */ async function listSiteBuildHooks({ pathParams, config } = {}) {
760
- const { client: request = client, ...requestConfig } = config ?? {};
761
- if (!pathParams.site_id) {
762
- throw new Error(`Missing required path parameter: site_id`);
763
- }
764
- const data = await request({
765
- method: "GET",
766
- url: `/sites/${pathParams.site_id}/build_hooks`,
767
- ...requestConfig,
768
- headers: {
769
- ...requestConfig.headers
770
- }
771
- });
772
- return data;
773
- }
774
- /**
775
- * @link /sites/{site_id}/build_hooks
776
- */ async function createSiteBuildHook({ pathParams, body, config } = {}) {
777
- const { client: request = client, ...requestConfig } = config ?? {};
778
- if (!pathParams.site_id) {
779
- throw new Error(`Missing required path parameter: site_id`);
780
- }
781
- const data = await request({
782
- method: "POST",
783
- url: `/sites/${pathParams.site_id}/build_hooks`,
784
- body: body,
785
- ...requestConfig,
786
- headers: {
787
- ...requestConfig.headers
788
- }
789
- });
790
- return data;
791
- }
792
- /**
793
- * @link /sites/{site_id}/build_hooks/{id}
794
- */ async function getSiteBuildHook({ pathParams, config } = {}) {
795
- const { client: request = client, ...requestConfig } = config ?? {};
796
- if (!pathParams.site_id) {
797
- throw new Error(`Missing required path parameter: site_id`);
798
- }
799
- if (!pathParams.id) {
800
- throw new Error(`Missing required path parameter: id`);
801
- }
802
- const data = await request({
803
- method: "GET",
804
- url: `/sites/${pathParams.site_id}/build_hooks/${pathParams.id}`,
805
- ...requestConfig,
806
- headers: {
807
- ...requestConfig.headers
808
- }
809
- });
810
- return data;
811
- }
812
- /**
813
- * @link /sites/{site_id}/build_hooks/{id}
814
- */ async function updateSiteBuildHook({ pathParams, body, config } = {}) {
815
- const { client: request = client, ...requestConfig } = config ?? {};
816
- if (!pathParams.site_id) {
817
- throw new Error(`Missing required path parameter: site_id`);
818
- }
819
- if (!pathParams.id) {
820
- throw new Error(`Missing required path parameter: id`);
821
- }
822
- const data = await request({
823
- method: "PUT",
824
- url: `/sites/${pathParams.site_id}/build_hooks/${pathParams.id}`,
825
- body: body,
826
- ...requestConfig,
827
- headers: {
828
- ...requestConfig.headers
829
- }
830
- });
831
- return data;
832
- }
833
- /**
834
- * @link /sites/{site_id}/build_hooks/{id}
835
- */ async function deleteSiteBuildHook({ pathParams, config } = {}) {
836
- const { client: request = client, ...requestConfig } = config ?? {};
837
- if (!pathParams.site_id) {
838
- throw new Error(`Missing required path parameter: site_id`);
839
- }
840
- if (!pathParams.id) {
841
- throw new Error(`Missing required path parameter: id`);
842
- }
843
- const data = await request({
844
- method: "DELETE",
845
- url: `/sites/${pathParams.site_id}/build_hooks/${pathParams.id}`,
846
- ...requestConfig,
847
- headers: {
848
- ...requestConfig.headers
849
- }
850
- });
851
- return data;
852
- }
853
- /**
854
- * @link /sites/{site_id}/deploys
855
- */ async function listSiteDeploys({ pathParams, queryParams, config } = {}) {
856
- const { client: request = client, ...requestConfig } = config ?? {};
857
- if (!pathParams.site_id) {
858
- throw new Error(`Missing required path parameter: site_id`);
859
- }
860
- const data = await request({
861
- method: "GET",
862
- url: `/sites/${pathParams.site_id}/deploys`,
863
- queryParams,
864
- ...requestConfig,
865
- headers: {
866
- ...requestConfig.headers
867
- }
868
- });
869
- return data;
870
- }
871
- /**
872
- * @link /sites/{site_id}/deploys
873
- */ async function createSiteDeploy({ pathParams, body, queryParams, config } = {}) {
874
- const { client: request = client, ...requestConfig } = config ?? {};
875
- if (!pathParams.site_id) {
876
- throw new Error(`Missing required path parameter: site_id`);
877
- }
878
- const data = await request({
879
- method: "POST",
880
- url: `/sites/${pathParams.site_id}/deploys`,
881
- queryParams,
882
- body: body,
883
- ...requestConfig,
884
- headers: {
885
- ...requestConfig.headers
886
- }
887
- });
888
- return data;
889
- }
890
- /**
891
- * @link /sites/{site_id}/deploys/{deploy_id}
892
- */ async function getSiteDeploy({ pathParams, config } = {}) {
893
- const { client: request = client, ...requestConfig } = config ?? {};
894
- if (!pathParams.site_id) {
895
- throw new Error(`Missing required path parameter: site_id`);
896
- }
897
- if (!pathParams.deploy_id) {
898
- throw new Error(`Missing required path parameter: deploy_id`);
899
- }
900
- const data = await request({
901
- method: "GET",
902
- url: `/sites/${pathParams.site_id}/deploys/${pathParams.deploy_id}`,
903
- ...requestConfig,
904
- headers: {
905
- ...requestConfig.headers
906
- }
907
- });
908
- return data;
909
- }
910
- /**
911
- * @link /sites/{site_id}/deploys/{deploy_id}
912
- */ async function updateSiteDeploy({ pathParams, body, queryParams, config } = {}) {
913
- const { client: request = client, ...requestConfig } = config ?? {};
914
- if (!pathParams.site_id) {
915
- throw new Error(`Missing required path parameter: site_id`);
916
- }
917
- if (!pathParams.deploy_id) {
918
- throw new Error(`Missing required path parameter: deploy_id`);
919
- }
920
- const data = await request({
921
- method: "PUT",
922
- url: `/sites/${pathParams.site_id}/deploys/${pathParams.deploy_id}`,
923
- queryParams,
924
- body: body,
925
- ...requestConfig,
926
- headers: {
927
- ...requestConfig.headers
928
- }
929
- });
930
- return data;
931
- }
932
- /**
933
- * @link /sites/{site_id}/deploys/{deploy_id}
934
- */ async function deleteSiteDeploy({ pathParams, config } = {}) {
935
- const { client: request = client, ...requestConfig } = config ?? {};
936
- if (!pathParams.deploy_id) {
937
- throw new Error(`Missing required path parameter: deploy_id`);
938
- }
939
- if (!pathParams.site_id) {
940
- throw new Error(`Missing required path parameter: site_id`);
941
- }
942
- const data = await request({
943
- method: "DELETE",
944
- url: `/sites/${pathParams.site_id}/deploys/${pathParams.deploy_id}`,
945
- ...requestConfig,
946
- headers: {
947
- ...requestConfig.headers
948
- }
949
- });
950
- return data;
951
- }
952
- /**
953
- * @link /deploys/{deploy_id}/cancel
954
- */ async function cancelSiteDeploy({ pathParams, config } = {}) {
955
- const { client: request = client, ...requestConfig } = config ?? {};
956
- if (!pathParams.deploy_id) {
957
- throw new Error(`Missing required path parameter: deploy_id`);
958
- }
959
- const data = await request({
960
- method: "POST",
961
- url: `/deploys/${pathParams.deploy_id}/cancel`,
962
- ...requestConfig,
963
- headers: {
964
- ...requestConfig.headers
965
- }
966
- });
967
- return data;
968
- }
969
- /**
970
- * @link /sites/{site_id}/deploys/{deploy_id}/restore
971
- */ async function restoreSiteDeploy({ pathParams, config } = {}) {
972
- const { client: request = client, ...requestConfig } = config ?? {};
973
- if (!pathParams.site_id) {
974
- throw new Error(`Missing required path parameter: site_id`);
975
- }
976
- if (!pathParams.deploy_id) {
977
- throw new Error(`Missing required path parameter: deploy_id`);
978
- }
979
- const data = await request({
980
- method: "POST",
981
- url: `/sites/${pathParams.site_id}/deploys/${pathParams.deploy_id}/restore`,
982
- ...requestConfig,
983
- headers: {
984
- ...requestConfig.headers
985
- }
986
- });
987
- return data;
988
- }
989
- /**
990
- * @link /sites/{site_id}/builds
991
- */ async function listSiteBuilds({ pathParams, queryParams, config } = {}) {
992
- const { client: request = client, ...requestConfig } = config ?? {};
993
- if (!pathParams.site_id) {
994
- throw new Error(`Missing required path parameter: site_id`);
995
- }
996
- const data = await request({
997
- method: "GET",
998
- url: `/sites/${pathParams.site_id}/builds`,
999
- queryParams,
1000
- ...requestConfig,
1001
- headers: {
1002
- ...requestConfig.headers
1003
- }
1004
- });
1005
- return data;
1006
- }
1007
- /**
1008
- * @description Runs a build for a site. The build will be scheduled to run at the first opportunity, but it might not start immediately if insufficient account build capacity is available.
1009
- * Files for build can be uploaded as a zipped site using one of these methods:
1010
- * 1. Set Content-Type to 'application/zip' and send the zip file as the raw request body
1011
- * 2. Set Content-Type to 'multipart/form-data' and include the zip file in the 'zip' field
1012
- * @link /sites/{site_id}/builds
1013
- */ async function createSiteBuild({ pathParams, queryParams, config } = {}) {
1014
- const { client: request = client, ...requestConfig } = config ?? {};
1015
- if (!pathParams.site_id) {
1016
- throw new Error(`Missing required path parameter: site_id`);
1017
- }
1018
- const data = await request({
1019
- method: "POST",
1020
- url: `/sites/${pathParams.site_id}/builds`,
1021
- queryParams,
1022
- ...requestConfig,
1023
- headers: {
1024
- ...requestConfig.headers
1025
- }
1026
- });
1027
- return data;
1028
- }
1029
- /**
1030
- * @link /sites/{site_id}/deployed-branches
1031
- */ async function listSiteDeployedBranches({ pathParams, config } = {}) {
1032
- const { client: request = client, ...requestConfig } = config ?? {};
1033
- if (!pathParams.site_id) {
1034
- throw new Error(`Missing required path parameter: site_id`);
1035
- }
1036
- const data = await request({
1037
- method: "GET",
1038
- url: `/sites/${pathParams.site_id}/deployed-branches`,
1039
- ...requestConfig,
1040
- headers: {
1041
- ...requestConfig.headers
1042
- }
1043
- });
1044
- return data;
1045
- }
1046
- /**
1047
- * @description [Beta] Unlinks the repo from the site.
1048
- * This action will also:
1049
- * - Delete associated deploy keys
1050
- * - Delete outgoing webhooks for the repo
1051
- * - Delete the site's build hooks
1052
- * @link /sites/{site_id}/unlink_repo
1053
- */ async function unlinkSiteRepo({ pathParams, config } = {}) {
1054
- const { client: request = client, ...requestConfig } = config ?? {};
1055
- if (!pathParams.site_id) {
1056
- throw new Error(`Missing required path parameter: site_id`);
1057
- }
1058
- const data = await request({
1059
- method: "PUT",
1060
- url: `/sites/${pathParams.site_id}/unlink_repo`,
1061
- ...requestConfig,
1062
- headers: {
1063
- ...requestConfig.headers
1064
- }
1065
- });
1066
- return data;
1067
- }
1068
- /**
1069
- * @description Re-enables a site that was previously disabled by the user. Sites that were disabled for usage exceeded or marked as spam cannot be re-enabled via this endpoint.
1070
- * @link /sites/{site_id}/enable
1071
- */ async function enableSite({ pathParams, config } = {}) {
1072
- const { client: request = client, ...requestConfig } = config ?? {};
1073
- if (!pathParams.site_id) {
1074
- throw new Error(`Missing required path parameter: site_id`);
1075
- }
1076
- const data = await request({
1077
- method: "PUT",
1078
- url: `/sites/${pathParams.site_id}/enable`,
1079
- ...requestConfig,
1080
- headers: {
1081
- ...requestConfig.headers
1082
- }
1083
- });
1084
- return data;
1085
- }
1086
- /**
1087
- * @description Disables a site, preventing it from serving content. The site can be re-enabled later using the enable endpoint.
1088
- * @link /sites/{site_id}/disable
1089
- */ async function disableSite({ pathParams, queryParams, config } = {}) {
1090
- const { client: request = client, ...requestConfig } = config ?? {};
1091
- if (!pathParams.site_id) {
1092
- throw new Error(`Missing required path parameter: site_id`);
1093
- }
1094
- const data = await request({
1095
- method: "PUT",
1096
- url: `/sites/${pathParams.site_id}/disable`,
1097
- queryParams,
1098
- ...requestConfig,
1099
- headers: {
1100
- ...requestConfig.headers
1101
- }
1102
- });
1103
- return data;
1104
- }
1105
- /**
1106
- * @link /builds/{build_id}
1107
- */ async function getSiteBuild({ pathParams, config } = {}) {
1108
- const { client: request = client, ...requestConfig } = config ?? {};
1109
- if (!pathParams.build_id) {
1110
- throw new Error(`Missing required path parameter: build_id`);
1111
- }
1112
- const data = await request({
1113
- method: "GET",
1114
- url: `/builds/${pathParams.build_id}`,
1115
- ...requestConfig,
1116
- headers: {
1117
- ...requestConfig.headers
1118
- }
1119
- });
1120
- return data;
1121
- }
1122
- /**
1123
- * @link /builds/{build_id}/log
1124
- */ async function updateSiteBuildLog({ pathParams, config } = {}) {
1125
- const { client: request = client, ...requestConfig } = config ?? {};
1126
- if (!pathParams.build_id) {
1127
- throw new Error(`Missing required path parameter: build_id`);
1128
- }
1129
- const data = await request({
1130
- method: "POST",
1131
- url: `/builds/${pathParams.build_id}/log`,
1132
- ...requestConfig,
1133
- headers: {
1134
- ...requestConfig.headers
1135
- }
1136
- });
1137
- return data;
1138
- }
1139
- /**
1140
- * @link /builds/{build_id}/start
1141
- */ async function notifyBuildStart({ pathParams, queryParams, config } = {}) {
1142
- const { client: request = client, ...requestConfig } = config ?? {};
1143
- if (!pathParams.build_id) {
1144
- throw new Error(`Missing required path parameter: build_id`);
1145
- }
1146
- const data = await request({
1147
- method: "POST",
1148
- url: `/builds/${pathParams.build_id}/start`,
1149
- queryParams,
1150
- ...requestConfig,
1151
- headers: {
1152
- ...requestConfig.headers
1153
- }
1154
- });
1155
- return data;
1156
- }
1157
- /**
1158
- * @link /{account_id}/builds/status
1159
- */ async function getAccountBuildStatus({ pathParams, config } = {}) {
1160
- const { client: request = client, ...requestConfig } = config ?? {};
1161
- if (!pathParams.account_id) {
1162
- throw new Error(`Missing required path parameter: account_id`);
1163
- }
1164
- const data = await request({
1165
- method: "GET",
1166
- url: `/${pathParams.account_id}/builds/status`,
1167
- ...requestConfig,
1168
- headers: {
1169
- ...requestConfig.headers
1170
- }
1171
- });
1172
- return data;
1173
- }
1174
- /**
1175
- * @link /sites/{site_id}/dns
1176
- */ async function getDNSForSite({ pathParams, config } = {}) {
1177
- const { client: request = client, ...requestConfig } = config ?? {};
1178
- if (!pathParams.site_id) {
1179
- throw new Error(`Missing required path parameter: site_id`);
1180
- }
1181
- const data = await request({
1182
- method: "GET",
1183
- url: `/sites/${pathParams.site_id}/dns`,
1184
- ...requestConfig,
1185
- headers: {
1186
- ...requestConfig.headers
1187
- }
1188
- });
1189
- return data;
1190
- }
1191
- /**
1192
- * @link /sites/{site_id}/dns
1193
- */ async function configureDNSForSite({ pathParams, config } = {}) {
1194
- const { client: request = client, ...requestConfig } = config ?? {};
1195
- if (!pathParams.site_id) {
1196
- throw new Error(`Missing required path parameter: site_id`);
1197
- }
1198
- const data = await request({
1199
- method: "PUT",
1200
- url: `/sites/${pathParams.site_id}/dns`,
1201
- ...requestConfig,
1202
- headers: {
1203
- ...requestConfig.headers
1204
- }
1205
- });
1206
- return data;
1207
- }
1208
- /**
1209
- * @link /sites/{site_id}/rollback
1210
- */ async function rollbackSiteDeploy({ pathParams, config } = {}) {
1211
- const { client: request = client, ...requestConfig } = config ?? {};
1212
- if (!pathParams.site_id) {
1213
- throw new Error(`Missing required path parameter: site_id`);
1214
- }
1215
- const data = await request({
1216
- method: "PUT",
1217
- url: `/sites/${pathParams.site_id}/rollback`,
1218
- ...requestConfig,
1219
- headers: {
1220
- ...requestConfig.headers
1221
- }
1222
- });
1223
- return data;
1224
- }
1225
- /**
1226
- * @link /deploys/{deploy_id}
1227
- */ async function getDeploy({ pathParams, config } = {}) {
1228
- const { client: request = client, ...requestConfig } = config ?? {};
1229
- if (!pathParams.deploy_id) {
1230
- throw new Error(`Missing required path parameter: deploy_id`);
1231
- }
1232
- const data = await request({
1233
- method: "GET",
1234
- url: `/deploys/${pathParams.deploy_id}`,
1235
- ...requestConfig,
1236
- headers: {
1237
- ...requestConfig.headers
1238
- }
1239
- });
1240
- return data;
1241
- }
1242
- /**
1243
- * @link /deploys/{deploy_id}
1244
- */ async function deleteDeploy({ pathParams, config } = {}) {
1245
- const { client: request = client, ...requestConfig } = config ?? {};
1246
- if (!pathParams.deploy_id) {
1247
- throw new Error(`Missing required path parameter: deploy_id`);
1248
- }
1249
- const data = await request({
1250
- method: "DELETE",
1251
- url: `/deploys/${pathParams.deploy_id}`,
1252
- ...requestConfig,
1253
- headers: {
1254
- ...requestConfig.headers
1255
- }
1256
- });
1257
- return data;
1258
- }
1259
- /**
1260
- * @description Updates the deploy validations report for a deploy.
1261
- * @link /deploys/{deploy_id}/validations_report
1262
- */ async function updateDeployValidations({ pathParams, body, config } = {}) {
1263
- const { client: request = client, ...requestConfig } = config ?? {};
1264
- if (!pathParams.deploy_id) {
1265
- throw new Error(`Missing required path parameter: deploy_id`);
1266
- }
1267
- const data = await request({
1268
- method: "PATCH",
1269
- url: `/deploys/${pathParams.deploy_id}/validations_report`,
1270
- body: body,
1271
- ...requestConfig,
1272
- headers: {
1273
- ...requestConfig.headers
1274
- }
1275
- });
1276
- return data;
1277
- }
1278
- /**
1279
- * @link /deploys/{deploy_id}/lock
1280
- */ async function lockDeploy({ pathParams, config } = {}) {
1281
- const { client: request = client, ...requestConfig } = config ?? {};
1282
- if (!pathParams.deploy_id) {
1283
- throw new Error(`Missing required path parameter: deploy_id`);
1284
- }
1285
- const data = await request({
1286
- method: "POST",
1287
- url: `/deploys/${pathParams.deploy_id}/lock`,
1288
- ...requestConfig,
1289
- headers: {
1290
- ...requestConfig.headers
1291
- }
1292
- });
1293
- return data;
1294
- }
1295
- /**
1296
- * @link /deploys/{deploy_id}/unlock
1297
- */ async function unlockDeploy({ pathParams, config } = {}) {
1298
- const { client: request = client, ...requestConfig } = config ?? {};
1299
- if (!pathParams.deploy_id) {
1300
- throw new Error(`Missing required path parameter: deploy_id`);
1301
- }
1302
- const data = await request({
1303
- method: "POST",
1304
- url: `/deploys/${pathParams.deploy_id}/unlock`,
1305
- ...requestConfig,
1306
- headers: {
1307
- ...requestConfig.headers
1308
- }
1309
- });
1310
- return data;
1311
- }
1312
- /**
1313
- * @link /deploys/{deploy_id}/files/{path}
1314
- */ async function uploadDeployFile({ pathParams, queryParams, config } = {}) {
1315
- const { client: request = client, ...requestConfig } = config ?? {};
1316
- if (!pathParams.deploy_id) {
1317
- throw new Error(`Missing required path parameter: deploy_id`);
1318
- }
1319
- if (!pathParams.path) {
1320
- throw new Error(`Missing required path parameter: path`);
1321
- }
1322
- const data = await request({
1323
- method: "PUT",
1324
- url: `/deploys/${pathParams.deploy_id}/files/${pathParams.path}`,
1325
- queryParams,
1326
- ...requestConfig,
1327
- headers: {
1328
- ...requestConfig.headers
1329
- }
1330
- });
1331
- return data;
1332
- }
1333
- /**
1334
- * @link /deploys/{deploy_id}/functions/{name}
1335
- */ async function uploadDeployFunction({ pathParams, queryParams, headers, config } = {}) {
1336
- const { client: request = client, ...requestConfig } = config ?? {};
1337
- if (!pathParams.deploy_id) {
1338
- throw new Error(`Missing required path parameter: deploy_id`);
1339
- }
1340
- if (!pathParams.name) {
1341
- throw new Error(`Missing required path parameter: name`);
1342
- }
1343
- const data = await request({
1344
- method: "PUT",
1345
- url: `/deploys/${pathParams.deploy_id}/functions/${pathParams.name}`,
1346
- queryParams,
1347
- ...requestConfig,
1348
- headers: {
1349
- ...headers,
1350
- ...requestConfig.headers
1351
- }
1352
- });
1353
- return data;
1354
- }
1355
- /**
1356
- * @link /deploys/{deploy_id}/edge_functions/{code_sha}
1357
- */ async function uploadDeployEdgeFunction({ pathParams, headers, config } = {}) {
1358
- const { client: request = client, ...requestConfig } = config ?? {};
1359
- if (!pathParams.deploy_id) {
1360
- throw new Error(`Missing required path parameter: deploy_id`);
1361
- }
1362
- if (!pathParams.code_sha) {
1363
- throw new Error(`Missing required path parameter: code_sha`);
1364
- }
1365
- const data = await request({
1366
- method: "PUT",
1367
- url: `/deploys/${pathParams.deploy_id}/edge_functions/${pathParams.code_sha}`,
1368
- ...requestConfig,
1369
- headers: {
1370
- ...headers,
1371
- ...requestConfig.headers
1372
- }
1373
- });
1374
- return data;
1375
- }
1376
- /**
1377
- * @description This is an internal-only endpoint.
1378
- * @link /sites/{site_id}/plugin_runs/latest
1379
- */ async function getLatestPluginRuns({ pathParams, queryParams, config } = {}) {
1380
- const { client: request = client, ...requestConfig } = config ?? {};
1381
- if (!pathParams.site_id) {
1382
- throw new Error(`Missing required path parameter: site_id`);
1383
- }
1384
- const data = await request({
1385
- method: "GET",
1386
- url: `/sites/${pathParams.site_id}/plugin_runs/latest`,
1387
- queryParams,
1388
- ...requestConfig,
1389
- headers: {
1390
- ...requestConfig.headers
1391
- }
1392
- });
1393
- return data;
1394
- }
1395
- /**
1396
- * @description This is an internal-only endpoint.
1397
- * @link /deploys/{deploy_id}/plugin_runs
1398
- */ async function createPluginRun({ pathParams, body, config } = {}) {
1399
- const { client: request = client, ...requestConfig } = config ?? {};
1400
- if (!pathParams.deploy_id) {
1401
- throw new Error(`Missing required path parameter: deploy_id`);
1402
- }
1403
- const data = await request({
1404
- method: "POST",
1405
- url: `/deploys/${pathParams.deploy_id}/plugin_runs`,
1406
- body: body,
1407
- ...requestConfig,
1408
- headers: {
1409
- ...requestConfig.headers
1410
- }
1411
- });
1412
- return data;
1413
- }
1414
- /**
1415
- * @link /forms/{form_id}/submissions
1416
- */ async function listFormSubmissions({ pathParams, queryParams, config } = {}) {
1417
- const { client: request = client, ...requestConfig } = config ?? {};
1418
- if (!pathParams.form_id) {
1419
- throw new Error(`Missing required path parameter: form_id`);
1420
- }
1421
- const data = await request({
1422
- method: "GET",
1423
- url: `/forms/${pathParams.form_id}/submissions`,
1424
- queryParams,
1425
- ...requestConfig,
1426
- headers: {
1427
- ...requestConfig.headers
1428
- }
1429
- });
1430
- return data;
1431
- }
1432
- /**
1433
- * @link /hooks
1434
- */ async function listHooksBySiteId({ queryParams, config } = {}) {
1435
- const { client: request = client, ...requestConfig } = config ?? {};
1436
- const data = await request({
1437
- method: "GET",
1438
- url: `/hooks`,
1439
- queryParams,
1440
- ...requestConfig,
1441
- headers: {
1442
- ...requestConfig.headers
1443
- }
1444
- });
1445
- return data;
1446
- }
1447
- /**
1448
- * @link /hooks
1449
- */ async function createHookBySiteId({ body, queryParams, config } = {}) {
1450
- const { client: request = client, ...requestConfig } = config ?? {};
1451
- const data = await request({
1452
- method: "POST",
1453
- url: `/hooks`,
1454
- queryParams,
1455
- body: body,
1456
- ...requestConfig,
1457
- headers: {
1458
- ...requestConfig.headers
1459
- }
1460
- });
1461
- return data;
1462
- }
1463
- /**
1464
- * @link /hooks/{hook_id}
1465
- */ async function getHook({ pathParams, config } = {}) {
1466
- const { client: request = client, ...requestConfig } = config ?? {};
1467
- if (!pathParams.hook_id) {
1468
- throw new Error(`Missing required path parameter: hook_id`);
1469
- }
1470
- const data = await request({
1471
- method: "GET",
1472
- url: `/hooks/${pathParams.hook_id}`,
1473
- ...requestConfig,
1474
- headers: {
1475
- ...requestConfig.headers
1476
- }
1477
- });
1478
- return data;
1479
- }
1480
- /**
1481
- * @link /hooks/{hook_id}
1482
- */ async function updateHook({ pathParams, body, config } = {}) {
1483
- const { client: request = client, ...requestConfig } = config ?? {};
1484
- if (!pathParams.hook_id) {
1485
- throw new Error(`Missing required path parameter: hook_id`);
1486
- }
1487
- const data = await request({
1488
- method: "PUT",
1489
- url: `/hooks/${pathParams.hook_id}`,
1490
- body: body,
1491
- ...requestConfig,
1492
- headers: {
1493
- ...requestConfig.headers
1494
- }
1495
- });
1496
- return data;
1497
- }
1498
- /**
1499
- * @link /hooks/{hook_id}
1500
- */ async function deleteHook({ pathParams, config } = {}) {
1501
- const { client: request = client, ...requestConfig } = config ?? {};
1502
- if (!pathParams.hook_id) {
1503
- throw new Error(`Missing required path parameter: hook_id`);
1504
- }
1505
- const data = await request({
1506
- method: "DELETE",
1507
- url: `/hooks/${pathParams.hook_id}`,
1508
- ...requestConfig,
1509
- headers: {
1510
- ...requestConfig.headers
1511
- }
1512
- });
1513
- return data;
1514
- }
1515
- /**
1516
- * @link /hooks/{hook_id}/enable
1517
- */ async function enableHook({ pathParams, config } = {}) {
1518
- const { client: request = client, ...requestConfig } = config ?? {};
1519
- if (!pathParams.hook_id) {
1520
- throw new Error(`Missing required path parameter: hook_id`);
1521
- }
1522
- const data = await request({
1523
- method: "POST",
1524
- url: `/hooks/${pathParams.hook_id}/enable`,
1525
- ...requestConfig,
1526
- headers: {
1527
- ...requestConfig.headers
1528
- }
1529
- });
1530
- return data;
1531
- }
1532
- /**
1533
- * @link /hooks/types
1534
- */ async function listHookTypes({ config } = {}) {
1535
- const { client: request = client, ...requestConfig } = config ?? {};
1536
- const data = await request({
1537
- method: "GET",
1538
- url: `/hooks/types`,
1539
- ...requestConfig,
1540
- headers: {
1541
- ...requestConfig.headers
1542
- }
1543
- });
1544
- return data;
1545
- }
1546
- /**
1547
- * @link /oauth/tickets
1548
- */ async function createTicket({ body, queryParams, config } = {}) {
1549
- const { client: request = client, ...requestConfig } = config ?? {};
1550
- const data = await request({
1551
- method: "POST",
1552
- url: `/oauth/tickets`,
1553
- queryParams,
1554
- body: body,
1555
- ...requestConfig,
1556
- headers: {
1557
- ...requestConfig.headers
1558
- }
1559
- });
1560
- return data;
1561
- }
1562
- /**
1563
- * @link /oauth/tickets/{ticket_id}
1564
- */ async function showTicket({ pathParams, config } = {}) {
1565
- const { client: request = client, ...requestConfig } = config ?? {};
1566
- if (!pathParams.ticket_id) {
1567
- throw new Error(`Missing required path parameter: ticket_id`);
1568
- }
1569
- const data = await request({
1570
- method: "GET",
1571
- url: `/oauth/tickets/${pathParams.ticket_id}`,
1572
- ...requestConfig,
1573
- headers: {
1574
- ...requestConfig.headers
1575
- }
1576
- });
1577
- return data;
1578
- }
1579
- /**
1580
- * @link /oauth/tickets/{ticket_id}/exchange
1581
- */ async function exchangeTicket({ pathParams, config } = {}) {
1582
- const { client: request = client, ...requestConfig } = config ?? {};
1583
- if (!pathParams.ticket_id) {
1584
- throw new Error(`Missing required path parameter: ticket_id`);
1585
- }
1586
- const data = await request({
1587
- method: "POST",
1588
- url: `/oauth/tickets/${pathParams.ticket_id}/exchange`,
1589
- ...requestConfig,
1590
- headers: {
1591
- ...requestConfig.headers
1592
- }
1593
- });
1594
- return data;
1595
- }
1596
- /**
1597
- * @link /deploy_keys
1598
- */ async function listDeployKeys({ config } = {}) {
1599
- const { client: request = client, ...requestConfig } = config ?? {};
1600
- const data = await request({
1601
- method: "GET",
1602
- url: `/deploy_keys`,
1603
- ...requestConfig,
1604
- headers: {
1605
- ...requestConfig.headers
1606
- }
1607
- });
1608
- return data;
1609
- }
1610
- /**
1611
- * @link /deploy_keys
1612
- */ async function createDeployKey({ config } = {}) {
1613
- const { client: request = client, ...requestConfig } = config ?? {};
1614
- const data = await request({
1615
- method: "POST",
1616
- url: `/deploy_keys`,
1617
- ...requestConfig,
1618
- headers: {
1619
- ...requestConfig.headers
1620
- }
1621
- });
1622
- return data;
1623
- }
1624
- /**
1625
- * @link /deploy_keys/{key_id}
1626
- */ async function getDeployKey({ pathParams, config } = {}) {
1627
- const { client: request = client, ...requestConfig } = config ?? {};
1628
- if (!pathParams.key_id) {
1629
- throw new Error(`Missing required path parameter: key_id`);
1630
- }
1631
- const data = await request({
1632
- method: "GET",
1633
- url: `/deploy_keys/${pathParams.key_id}`,
1634
- ...requestConfig,
1635
- headers: {
1636
- ...requestConfig.headers
1637
- }
1638
- });
1639
- return data;
1640
- }
1641
- /**
1642
- * @link /deploy_keys/{key_id}
1643
- */ async function deleteDeployKey({ pathParams, config } = {}) {
1644
- const { client: request = client, ...requestConfig } = config ?? {};
1645
- if (!pathParams.key_id) {
1646
- throw new Error(`Missing required path parameter: key_id`);
1647
- }
1648
- const data = await request({
1649
- method: "DELETE",
1650
- url: `/deploy_keys/${pathParams.key_id}`,
1651
- ...requestConfig,
1652
- headers: {
1653
- ...requestConfig.headers
1654
- }
1655
- });
1656
- return data;
1657
- }
1658
- /**
1659
- * @description **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [createEnvVars](#tag/environmentVariables/operation/createEnvVars) to create environment variables for a site.
1660
- * @link /{account_slug}/sites
1661
- */ async function createSiteInTeam({ pathParams, body, queryParams, config } = {}) {
1662
- const { client: request = client, ...requestConfig } = config ?? {};
1663
- if (!pathParams.account_slug) {
1664
- throw new Error(`Missing required path parameter: account_slug`);
1665
- }
1666
- const data = await request({
1667
- method: "POST",
1668
- url: `/${pathParams.account_slug}/sites`,
1669
- queryParams,
1670
- body: body,
1671
- ...requestConfig,
1672
- headers: {
1673
- ...requestConfig.headers
1674
- }
1675
- });
1676
- return data;
1677
- }
1678
- /**
1679
- * @description **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [getEnvVars](#tag/environmentVariables/operation/getEnvVars) to retrieve site environment variables.
1680
- * @link /{account_slug}/sites
1681
- */ async function listSitesForAccount({ pathParams, queryParams, config } = {}) {
1682
- const { client: request = client, ...requestConfig } = config ?? {};
1683
- if (!pathParams.account_slug) {
1684
- throw new Error(`Missing required path parameter: account_slug`);
1685
- }
1686
- const data = await request({
1687
- method: "GET",
1688
- url: `/${pathParams.account_slug}/sites`,
1689
- queryParams,
1690
- ...requestConfig,
1691
- headers: {
1692
- ...requestConfig.headers
1693
- }
1694
- });
1695
- return data;
1696
- }
1697
- /**
1698
- * @link /{account_slug}/members
1699
- */ async function listMembersForAccount({ pathParams, config } = {}) {
1700
- const { client: request = client, ...requestConfig } = config ?? {};
1701
- if (!pathParams.account_slug) {
1702
- throw new Error(`Missing required path parameter: account_slug`);
1703
- }
1704
- const data = await request({
1705
- method: "GET",
1706
- url: `/${pathParams.account_slug}/members`,
1707
- ...requestConfig,
1708
- headers: {
1709
- ...requestConfig.headers
1710
- }
1711
- });
1712
- return data;
1713
- }
1714
- /**
1715
- * @link /{account_slug}/members
1716
- */ async function addMemberToAccount({ pathParams, body, config } = {}) {
1717
- const { client: request = client, ...requestConfig } = config ?? {};
1718
- if (!pathParams.account_slug) {
1719
- throw new Error(`Missing required path parameter: account_slug`);
1720
- }
1721
- const data = await request({
1722
- method: "POST",
1723
- url: `/${pathParams.account_slug}/members`,
1724
- body: body,
1725
- ...requestConfig,
1726
- headers: {
1727
- ...requestConfig.headers
1728
- }
1729
- });
1730
- return data;
1731
- }
1732
- /**
1733
- * @link /{account_slug}/members/{member_id}
1734
- */ async function getAccountMember({ pathParams, config } = {}) {
1735
- const { client: request = client, ...requestConfig } = config ?? {};
1736
- if (!pathParams.account_slug) {
1737
- throw new Error(`Missing required path parameter: account_slug`);
1738
- }
1739
- if (!pathParams.member_id) {
1740
- throw new Error(`Missing required path parameter: member_id`);
1741
- }
1742
- const data = await request({
1743
- method: "GET",
1744
- url: `/${pathParams.account_slug}/members/${pathParams.member_id}`,
1745
- ...requestConfig,
1746
- headers: {
1747
- ...requestConfig.headers
1748
- }
1749
- });
1750
- return data;
1751
- }
1752
- /**
1753
- * @link /{account_slug}/members/{member_id}
1754
- */ async function updateAccountMember({ pathParams, body, config } = {}) {
1755
- const { client: request = client, ...requestConfig } = config ?? {};
1756
- if (!pathParams.account_slug) {
1757
- throw new Error(`Missing required path parameter: account_slug`);
1758
- }
1759
- if (!pathParams.member_id) {
1760
- throw new Error(`Missing required path parameter: member_id`);
1761
- }
1762
- const data = await request({
1763
- method: "PUT",
1764
- url: `/${pathParams.account_slug}/members/${pathParams.member_id}`,
1765
- body: body,
1766
- ...requestConfig,
1767
- headers: {
1768
- ...requestConfig.headers
1769
- }
1770
- });
1771
- return data;
1772
- }
1773
- /**
1774
- * @link /{account_slug}/members/{member_id}
1775
- */ async function removeAccountMember({ pathParams, config } = {}) {
1776
- const { client: request = client, ...requestConfig } = config ?? {};
1777
- if (!pathParams.account_slug) {
1778
- throw new Error(`Missing required path parameter: account_slug`);
1779
- }
1780
- if (!pathParams.member_id) {
1781
- throw new Error(`Missing required path parameter: member_id`);
1782
- }
1783
- const data = await request({
1784
- method: "DELETE",
1785
- url: `/${pathParams.account_slug}/members/${pathParams.member_id}`,
1786
- ...requestConfig,
1787
- headers: {
1788
- ...requestConfig.headers
1789
- }
1790
- });
1791
- return data;
1792
- }
1793
- /**
1794
- * @link /billing/payment_methods
1795
- */ async function listPaymentMethodsForUser({ config } = {}) {
1796
- const { client: request = client, ...requestConfig } = config ?? {};
1797
- const data = await request({
1798
- method: "GET",
1799
- url: `/billing/payment_methods`,
1800
- ...requestConfig,
1801
- headers: {
1802
- ...requestConfig.headers
1803
- }
1804
- });
1805
- return data;
1806
- }
1807
- /**
1808
- * @link /accounts/types
1809
- */ async function listAccountTypesForUser({ config } = {}) {
1810
- const { client: request = client, ...requestConfig } = config ?? {};
1811
- const data = await request({
1812
- method: "GET",
1813
- url: `/accounts/types`,
1814
- ...requestConfig,
1815
- headers: {
1816
- ...requestConfig.headers
1817
- }
1818
- });
1819
- return data;
1820
- }
1821
- /**
1822
- * @link /accounts
1823
- */ async function listAccountsForUser({ queryParams, config } = {}) {
1824
- const { client: request = client, ...requestConfig } = config ?? {};
1825
- const data = await request({
1826
- method: "GET",
1827
- url: `/accounts`,
1828
- queryParams,
1829
- ...requestConfig,
1830
- headers: {
1831
- ...requestConfig.headers
1832
- }
1833
- });
1834
- return data;
1835
- }
1836
- /**
1837
- * @link /accounts
1838
- */ async function createAccount({ body, config } = {}) {
1839
- const { client: request = client, ...requestConfig } = config ?? {};
1840
- const data = await request({
1841
- method: "POST",
1842
- url: `/accounts`,
1843
- body: body,
1844
- ...requestConfig,
1845
- headers: {
1846
- ...requestConfig.headers
1847
- }
1848
- });
1849
- return data;
1850
- }
1851
- /**
1852
- * @link /accounts/{account_id}
1853
- */ async function getAccount({ pathParams, config } = {}) {
1854
- const { client: request = client, ...requestConfig } = config ?? {};
1855
- if (!pathParams.account_id) {
1856
- throw new Error(`Missing required path parameter: account_id`);
1857
- }
1858
- const data = await request({
1859
- method: "GET",
1860
- url: `/accounts/${pathParams.account_id}`,
1861
- ...requestConfig,
1862
- headers: {
1863
- ...requestConfig.headers
1864
- }
1865
- });
1866
- return data;
1867
- }
1868
- /**
1869
- * @link /accounts/{account_id}
1870
- */ async function updateAccount({ pathParams, body, config } = {}) {
1871
- const { client: request = client, ...requestConfig } = config ?? {};
1872
- if (!pathParams.account_id) {
1873
- throw new Error(`Missing required path parameter: account_id`);
1874
- }
1875
- const data = await request({
1876
- method: "PUT",
1877
- url: `/accounts/${pathParams.account_id}`,
1878
- body: body,
1879
- ...requestConfig,
1880
- headers: {
1881
- ...requestConfig.headers
1882
- }
1883
- });
1884
- return data;
1885
- }
1886
- /**
1887
- * @link /accounts/{account_id}
1888
- */ async function cancelAccount({ pathParams, config } = {}) {
1889
- const { client: request = client, ...requestConfig } = config ?? {};
1890
- if (!pathParams.account_id) {
1891
- throw new Error(`Missing required path parameter: account_id`);
1892
- }
1893
- const data = await request({
1894
- method: "DELETE",
1895
- url: `/accounts/${pathParams.account_id}`,
1896
- ...requestConfig,
1897
- headers: {
1898
- ...requestConfig.headers
1899
- }
1900
- });
1901
- return data;
1902
- }
1903
- /**
1904
- * @link /accounts/{account_id}/audit
1905
- */ async function listAccountAuditEvents({ pathParams, queryParams, config } = {}) {
1906
- const { client: request = client, ...requestConfig } = config ?? {};
1907
- if (!pathParams.account_id) {
1908
- throw new Error(`Missing required path parameter: account_id`);
1909
- }
1910
- const data = await request({
1911
- method: "GET",
1912
- url: `/accounts/${pathParams.account_id}/audit`,
1913
- queryParams,
1914
- ...requestConfig,
1915
- headers: {
1916
- ...requestConfig.headers
1917
- }
1918
- });
1919
- return data;
1920
- }
1921
- /**
1922
- * @link /agent_runners
1923
- */ async function listAgentRunners({ queryParams, config } = {}) {
1924
- const { client: request = client, ...requestConfig } = config ?? {};
1925
- const data = await request({
1926
- method: "GET",
1927
- url: `/agent_runners`,
1928
- queryParams,
1929
- ...requestConfig,
1930
- headers: {
1931
- ...requestConfig.headers
1932
- }
1933
- });
1934
- return data;
1935
- }
1936
- /**
1937
- * @link /agent_runners
1938
- */ async function createAgentRunner({ queryParams, config } = {}) {
1939
- const { client: request = client, ...requestConfig } = config ?? {};
1940
- const data = await request({
1941
- method: "POST",
1942
- url: `/agent_runners`,
1943
- queryParams,
1944
- ...requestConfig,
1945
- headers: {
1946
- ...requestConfig.headers
1947
- }
1948
- });
1949
- return data;
1950
- }
1951
- /**
1952
- * @link /agent_runners/upload_url
1953
- */ async function createAgentRunnerUploadUrl({ queryParams, config } = {}) {
1954
- const { client: request = client, ...requestConfig } = config ?? {};
1955
- const data = await request({
1956
- method: "POST",
1957
- url: `/agent_runners/upload_url`,
1958
- queryParams,
1959
- ...requestConfig,
1960
- headers: {
1961
- ...requestConfig.headers
1962
- }
1963
- });
1964
- return data;
1965
- }
1966
- /**
1967
- * @link /agent_runners/{agent_runner_id}
1968
- */ async function getAgentRunner({ pathParams, config } = {}) {
1969
- const { client: request = client, ...requestConfig } = config ?? {};
1970
- if (!pathParams.agent_runner_id) {
1971
- throw new Error(`Missing required path parameter: agent_runner_id`);
1972
- }
1973
- const data = await request({
1974
- method: "GET",
1975
- url: `/agent_runners/${pathParams.agent_runner_id}`,
1976
- ...requestConfig,
1977
- headers: {
1978
- ...requestConfig.headers
1979
- }
1980
- });
1981
- return data;
1982
- }
1983
- /**
1984
- * @link /agent_runners/{agent_runner_id}
1985
- */ async function updateAgentRunner({ pathParams, config } = {}) {
1986
- const { client: request = client, ...requestConfig } = config ?? {};
1987
- if (!pathParams.agent_runner_id) {
1988
- throw new Error(`Missing required path parameter: agent_runner_id`);
1989
- }
1990
- const data = await request({
1991
- method: "PATCH",
1992
- url: `/agent_runners/${pathParams.agent_runner_id}`,
1993
- ...requestConfig,
1994
- headers: {
1995
- ...requestConfig.headers
1996
- }
1997
- });
1998
- return data;
1999
- }
2000
- /**
2001
- * @link /agent_runners/{agent_runner_id}
2002
- */ async function deleteAgentRunner({ pathParams, config } = {}) {
2003
- const { client: request = client, ...requestConfig } = config ?? {};
2004
- if (!pathParams.agent_runner_id) {
2005
- throw new Error(`Missing required path parameter: agent_runner_id`);
2006
- }
2007
- const data = await request({
2008
- method: "DELETE",
2009
- url: `/agent_runners/${pathParams.agent_runner_id}`,
2010
- ...requestConfig,
2011
- headers: {
2012
- ...requestConfig.headers
2013
- }
2014
- });
2015
- return data;
2016
- }
2017
- /**
2018
- * @link /agent_runners/{agent_runner_id}/archive
2019
- */ async function archiveAgentRunner({ pathParams, config } = {}) {
2020
- const { client: request = client, ...requestConfig } = config ?? {};
2021
- if (!pathParams.agent_runner_id) {
2022
- throw new Error(`Missing required path parameter: agent_runner_id`);
2023
- }
2024
- const data = await request({
2025
- method: "POST",
2026
- url: `/agent_runners/${pathParams.agent_runner_id}/archive`,
2027
- ...requestConfig,
2028
- headers: {
2029
- ...requestConfig.headers
2030
- }
2031
- });
2032
- return data;
2033
- }
2034
- /**
2035
- * @link /agent_runners/{agent_runner_id}/pull_request
2036
- */ async function agentRunnerPullRequest({ pathParams, config } = {}) {
2037
- const { client: request = client, ...requestConfig } = config ?? {};
2038
- if (!pathParams.agent_runner_id) {
2039
- throw new Error(`Missing required path parameter: agent_runner_id`);
2040
- }
2041
- const data = await request({
2042
- method: "POST",
2043
- url: `/agent_runners/${pathParams.agent_runner_id}/pull_request`,
2044
- ...requestConfig,
2045
- headers: {
2046
- ...requestConfig.headers
2047
- }
2048
- });
2049
- return data;
2050
- }
2051
- /**
2052
- * @link /agent_runners/{agent_runner_id}/commit
2053
- */ async function agentRunnerCommitToBranch({ pathParams, queryParams, config } = {}) {
2054
- const { client: request = client, ...requestConfig } = config ?? {};
2055
- if (!pathParams.agent_runner_id) {
2056
- throw new Error(`Missing required path parameter: agent_runner_id`);
2057
- }
2058
- const data = await request({
2059
- method: "POST",
2060
- url: `/agent_runners/${pathParams.agent_runner_id}/commit`,
2061
- queryParams,
2062
- ...requestConfig,
2063
- headers: {
2064
- ...requestConfig.headers
2065
- }
2066
- });
2067
- return data;
2068
- }
2069
- /**
2070
- * @link /agent_runners/{agent_runner_id}/sessions
2071
- */ async function listAgentRunnerSessions({ pathParams, queryParams, config } = {}) {
2072
- const { client: request = client, ...requestConfig } = config ?? {};
2073
- if (!pathParams.agent_runner_id) {
2074
- throw new Error(`Missing required path parameter: agent_runner_id`);
2075
- }
2076
- const data = await request({
2077
- method: "GET",
2078
- url: `/agent_runners/${pathParams.agent_runner_id}/sessions`,
2079
- queryParams,
2080
- ...requestConfig,
2081
- headers: {
2082
- ...requestConfig.headers
2083
- }
2084
- });
2085
- return data;
2086
- }
2087
- /**
2088
- * @link /agent_runners/{agent_runner_id}/sessions
2089
- */ async function createAgentRunnerSession({ pathParams, queryParams, config } = {}) {
2090
- const { client: request = client, ...requestConfig } = config ?? {};
2091
- if (!pathParams.agent_runner_id) {
2092
- throw new Error(`Missing required path parameter: agent_runner_id`);
2093
- }
2094
- const data = await request({
2095
- method: "POST",
2096
- url: `/agent_runners/${pathParams.agent_runner_id}/sessions`,
2097
- queryParams,
2098
- ...requestConfig,
2099
- headers: {
2100
- ...requestConfig.headers
2101
- }
2102
- });
2103
- return data;
2104
- }
2105
- /**
2106
- * @link /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}
2107
- */ async function getAgentRunnerSession({ pathParams, config } = {}) {
2108
- const { client: request = client, ...requestConfig } = config ?? {};
2109
- if (!pathParams.agent_runner_id) {
2110
- throw new Error(`Missing required path parameter: agent_runner_id`);
2111
- }
2112
- if (!pathParams.agent_runner_session_id) {
2113
- throw new Error(`Missing required path parameter: agent_runner_session_id`);
2114
- }
2115
- const data = await request({
2116
- method: "GET",
2117
- url: `/agent_runners/${pathParams.agent_runner_id}/sessions/${pathParams.agent_runner_session_id}`,
2118
- ...requestConfig,
2119
- headers: {
2120
- ...requestConfig.headers
2121
- }
2122
- });
2123
- return data;
2124
- }
2125
- /**
2126
- * @link /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}
2127
- */ async function updateAgentRunnerSession({ pathParams, queryParams, config } = {}) {
2128
- const { client: request = client, ...requestConfig } = config ?? {};
2129
- if (!pathParams.agent_runner_id) {
2130
- throw new Error(`Missing required path parameter: agent_runner_id`);
2131
- }
2132
- if (!pathParams.agent_runner_session_id) {
2133
- throw new Error(`Missing required path parameter: agent_runner_session_id`);
2134
- }
2135
- const data = await request({
2136
- method: "PATCH",
2137
- url: `/agent_runners/${pathParams.agent_runner_id}/sessions/${pathParams.agent_runner_session_id}`,
2138
- queryParams,
2139
- ...requestConfig,
2140
- headers: {
2141
- ...requestConfig.headers
2142
- }
2143
- });
2144
- return data;
2145
- }
2146
- /**
2147
- * @link /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}
2148
- */ async function deleteAgentRunnerSession({ pathParams, config } = {}) {
2149
- const { client: request = client, ...requestConfig } = config ?? {};
2150
- if (!pathParams.agent_runner_id) {
2151
- throw new Error(`Missing required path parameter: agent_runner_id`);
2152
- }
2153
- if (!pathParams.agent_runner_session_id) {
2154
- throw new Error(`Missing required path parameter: agent_runner_session_id`);
2155
- }
2156
- const data = await request({
2157
- method: "DELETE",
2158
- url: `/agent_runners/${pathParams.agent_runner_id}/sessions/${pathParams.agent_runner_session_id}`,
2159
- ...requestConfig,
2160
- headers: {
2161
- ...requestConfig.headers
2162
- }
2163
- });
2164
- return data;
2165
- }
2166
- /**
2167
- * @link /submissions/{submission_id}
2168
- */ async function listFormSubmission({ pathParams, queryParams, config } = {}) {
2169
- const { client: request = client, ...requestConfig } = config ?? {};
2170
- if (!pathParams.submission_id) {
2171
- throw new Error(`Missing required path parameter: submission_id`);
2172
- }
2173
- const data = await request({
2174
- method: "GET",
2175
- url: `/submissions/${pathParams.submission_id}`,
2176
- queryParams,
2177
- ...requestConfig,
2178
- headers: {
2179
- ...requestConfig.headers
2180
- }
2181
- });
2182
- return data;
2183
- }
2184
- /**
2185
- * @link /submissions/{submission_id}
2186
- */ async function deleteSubmission({ pathParams, config } = {}) {
2187
- const { client: request = client, ...requestConfig } = config ?? {};
2188
- if (!pathParams.submission_id) {
2189
- throw new Error(`Missing required path parameter: submission_id`);
2190
- }
2191
- const data = await request({
2192
- method: "DELETE",
2193
- url: `/submissions/${pathParams.submission_id}`,
2194
- ...requestConfig,
2195
- headers: {
2196
- ...requestConfig.headers
2197
- }
2198
- });
2199
- return data;
2200
- }
2201
- /**
2202
- * @link /sites/{site_id}/service-instances
2203
- */ async function listServiceInstancesForSite({ pathParams, config } = {}) {
2204
- const { client: request = client, ...requestConfig } = config ?? {};
2205
- if (!pathParams.site_id) {
2206
- throw new Error(`Missing required path parameter: site_id`);
2207
- }
2208
- const data = await request({
2209
- method: "GET",
2210
- url: `/sites/${pathParams.site_id}/service-instances`,
2211
- ...requestConfig,
2212
- headers: {
2213
- ...requestConfig.headers
2214
- }
2215
- });
2216
- return data;
2217
- }
2218
- /**
2219
- * @link /sites/{site_id}/services/{addon}/instances
2220
- */ async function createServiceInstance({ pathParams, body, config } = {}) {
2221
- const { client: request = client, ...requestConfig } = config ?? {};
2222
- if (!pathParams.site_id) {
2223
- throw new Error(`Missing required path parameter: site_id`);
2224
- }
2225
- if (!pathParams.addon) {
2226
- throw new Error(`Missing required path parameter: addon`);
2227
- }
2228
- const data = await request({
2229
- method: "POST",
2230
- url: `/sites/${pathParams.site_id}/services/${pathParams.addon}/instances`,
2231
- body: body,
2232
- ...requestConfig,
2233
- headers: {
2234
- ...requestConfig.headers
2235
- }
2236
- });
2237
- return data;
2238
- }
2239
- /**
2240
- * @link /sites/{site_id}/services/{addon}/instances/{instance_id}
2241
- */ async function showServiceInstance({ pathParams, config } = {}) {
2242
- const { client: request = client, ...requestConfig } = config ?? {};
2243
- if (!pathParams.site_id) {
2244
- throw new Error(`Missing required path parameter: site_id`);
2245
- }
2246
- if (!pathParams.addon) {
2247
- throw new Error(`Missing required path parameter: addon`);
2248
- }
2249
- if (!pathParams.instance_id) {
2250
- throw new Error(`Missing required path parameter: instance_id`);
2251
- }
2252
- const data = await request({
2253
- method: "GET",
2254
- url: `/sites/${pathParams.site_id}/services/${pathParams.addon}/instances/${pathParams.instance_id}`,
2255
- ...requestConfig,
2256
- headers: {
2257
- ...requestConfig.headers
2258
- }
2259
- });
2260
- return data;
2261
- }
2262
- /**
2263
- * @link /sites/{site_id}/services/{addon}/instances/{instance_id}
2264
- */ async function updateServiceInstance({ pathParams, body, config } = {}) {
2265
- const { client: request = client, ...requestConfig } = config ?? {};
2266
- if (!pathParams.site_id) {
2267
- throw new Error(`Missing required path parameter: site_id`);
2268
- }
2269
- if (!pathParams.addon) {
2270
- throw new Error(`Missing required path parameter: addon`);
2271
- }
2272
- if (!pathParams.instance_id) {
2273
- throw new Error(`Missing required path parameter: instance_id`);
2274
- }
2275
- const data = await request({
2276
- method: "PUT",
2277
- url: `/sites/${pathParams.site_id}/services/${pathParams.addon}/instances/${pathParams.instance_id}`,
2278
- body: body,
2279
- ...requestConfig,
2280
- headers: {
2281
- ...requestConfig.headers
2282
- }
2283
- });
2284
- return data;
2285
- }
2286
- /**
2287
- * @link /sites/{site_id}/services/{addon}/instances/{instance_id}
2288
- */ async function deleteServiceInstance({ pathParams, config } = {}) {
2289
- const { client: request = client, ...requestConfig } = config ?? {};
2290
- if (!pathParams.site_id) {
2291
- throw new Error(`Missing required path parameter: site_id`);
2292
- }
2293
- if (!pathParams.addon) {
2294
- throw new Error(`Missing required path parameter: addon`);
2295
- }
2296
- if (!pathParams.instance_id) {
2297
- throw new Error(`Missing required path parameter: instance_id`);
2298
- }
2299
- const data = await request({
2300
- method: "DELETE",
2301
- url: `/sites/${pathParams.site_id}/services/${pathParams.addon}/instances/${pathParams.instance_id}`,
2302
- ...requestConfig,
2303
- headers: {
2304
- ...requestConfig.headers
2305
- }
2306
- });
2307
- return data;
2308
- }
2309
- /**
2310
- * @link /services/
2311
- */ async function getServices({ queryParams, config } = {}) {
2312
- const { client: request = client, ...requestConfig } = config ?? {};
2313
- const data = await request({
2314
- method: "GET",
2315
- url: `/services/`,
2316
- queryParams,
2317
- ...requestConfig,
2318
- headers: {
2319
- ...requestConfig.headers
2320
- }
2321
- });
2322
- return data;
2323
- }
2324
- /**
2325
- * @link /services/{addonName}
2326
- */ async function showService({ pathParams, config } = {}) {
2327
- const { client: request = client, ...requestConfig } = config ?? {};
2328
- if (!pathParams.addonName) {
2329
- throw new Error(`Missing required path parameter: addonName`);
2330
- }
2331
- const data = await request({
2332
- method: "GET",
2333
- url: `/services/${pathParams.addonName}`,
2334
- ...requestConfig,
2335
- headers: {
2336
- ...requestConfig.headers
2337
- }
2338
- });
2339
- return data;
2340
- }
2341
- /**
2342
- * @link /services/{addonName}/manifest
2343
- */ async function showServiceManifest({ pathParams, config } = {}) {
2344
- const { client: request = client, ...requestConfig } = config ?? {};
2345
- if (!pathParams.addonName) {
2346
- throw new Error(`Missing required path parameter: addonName`);
2347
- }
2348
- const data = await request({
2349
- method: "GET",
2350
- url: `/services/${pathParams.addonName}/manifest`,
2351
- ...requestConfig,
2352
- headers: {
2353
- ...requestConfig.headers
2354
- }
2355
- });
2356
- return data;
2357
- }
2358
- /**
2359
- * @link /user
2360
- */ async function getCurrentUser({ config } = {}) {
2361
- const { client: request = client, ...requestConfig } = config ?? {};
2362
- const data = await request({
2363
- method: "GET",
2364
- url: `/user`,
2365
- ...requestConfig,
2366
- headers: {
2367
- ...requestConfig.headers
2368
- }
2369
- });
2370
- return data;
2371
- }
2372
- /**
2373
- * @link /sites/{site_id}/traffic_splits
2374
- */ async function createSplitTest({ pathParams, body, config } = {}) {
2375
- const { client: request = client, ...requestConfig } = config ?? {};
2376
- if (!pathParams.site_id) {
2377
- throw new Error(`Missing required path parameter: site_id`);
2378
- }
2379
- const data = await request({
2380
- method: "POST",
2381
- url: `/sites/${pathParams.site_id}/traffic_splits`,
2382
- body: body,
2383
- ...requestConfig,
2384
- headers: {
2385
- ...requestConfig.headers
2386
- }
2387
- });
2388
- return data;
2389
- }
2390
- /**
2391
- * @link /sites/{site_id}/traffic_splits
2392
- */ async function getSplitTests({ pathParams, config } = {}) {
2393
- const { client: request = client, ...requestConfig } = config ?? {};
2394
- if (!pathParams.site_id) {
2395
- throw new Error(`Missing required path parameter: site_id`);
2396
- }
2397
- const data = await request({
2398
- method: "GET",
2399
- url: `/sites/${pathParams.site_id}/traffic_splits`,
2400
- ...requestConfig,
2401
- headers: {
2402
- ...requestConfig.headers
2403
- }
2404
- });
2405
- return data;
2406
- }
2407
- /**
2408
- * @link /sites/{site_id}/traffic_splits/{split_test_id}
2409
- */ async function updateSplitTest({ pathParams, body, config } = {}) {
2410
- const { client: request = client, ...requestConfig } = config ?? {};
2411
- if (!pathParams.site_id) {
2412
- throw new Error(`Missing required path parameter: site_id`);
2413
- }
2414
- if (!pathParams.split_test_id) {
2415
- throw new Error(`Missing required path parameter: split_test_id`);
2416
- }
2417
- const data = await request({
2418
- method: "PUT",
2419
- url: `/sites/${pathParams.site_id}/traffic_splits/${pathParams.split_test_id}`,
2420
- body: body,
2421
- ...requestConfig,
2422
- headers: {
2423
- ...requestConfig.headers
2424
- }
2425
- });
2426
- return data;
2427
- }
2428
- /**
2429
- * @link /sites/{site_id}/traffic_splits/{split_test_id}
2430
- */ async function getSplitTest({ pathParams, config } = {}) {
2431
- const { client: request = client, ...requestConfig } = config ?? {};
2432
- if (!pathParams.site_id) {
2433
- throw new Error(`Missing required path parameter: site_id`);
2434
- }
2435
- if (!pathParams.split_test_id) {
2436
- throw new Error(`Missing required path parameter: split_test_id`);
2437
- }
2438
- const data = await request({
2439
- method: "GET",
2440
- url: `/sites/${pathParams.site_id}/traffic_splits/${pathParams.split_test_id}`,
2441
- ...requestConfig,
2442
- headers: {
2443
- ...requestConfig.headers
2444
- }
2445
- });
2446
- return data;
2447
- }
2448
- /**
2449
- * @link /sites/{site_id}/traffic_splits/{split_test_id}/publish
2450
- */ async function enableSplitTest({ pathParams, config } = {}) {
2451
- const { client: request = client, ...requestConfig } = config ?? {};
2452
- if (!pathParams.site_id) {
2453
- throw new Error(`Missing required path parameter: site_id`);
2454
- }
2455
- if (!pathParams.split_test_id) {
2456
- throw new Error(`Missing required path parameter: split_test_id`);
2457
- }
2458
- const data = await request({
2459
- method: "POST",
2460
- url: `/sites/${pathParams.site_id}/traffic_splits/${pathParams.split_test_id}/publish`,
2461
- ...requestConfig,
2462
- headers: {
2463
- ...requestConfig.headers
2464
- }
2465
- });
2466
- return data;
2467
- }
2468
- /**
2469
- * @link /sites/{site_id}/traffic_splits/{split_test_id}/unpublish
2470
- */ async function disableSplitTest({ pathParams, config } = {}) {
2471
- const { client: request = client, ...requestConfig } = config ?? {};
2472
- if (!pathParams.site_id) {
2473
- throw new Error(`Missing required path parameter: site_id`);
2474
- }
2475
- if (!pathParams.split_test_id) {
2476
- throw new Error(`Missing required path parameter: split_test_id`);
2477
- }
2478
- const data = await request({
2479
- method: "POST",
2480
- url: `/sites/${pathParams.site_id}/traffic_splits/${pathParams.split_test_id}/unpublish`,
2481
- ...requestConfig,
2482
- headers: {
2483
- ...requestConfig.headers
2484
- }
2485
- });
2486
- return data;
2487
- }
2488
- /**
2489
- * @link /dns_zones
2490
- */ async function createDnsZone({ body, config } = {}) {
2491
- const { client: request = client, ...requestConfig } = config ?? {};
2492
- const data = await request({
2493
- method: "POST",
2494
- url: `/dns_zones`,
2495
- body: body,
2496
- ...requestConfig,
2497
- headers: {
2498
- ...requestConfig.headers
2499
- }
2500
- });
2501
- return data;
2502
- }
2503
- /**
2504
- * @link /dns_zones
2505
- */ async function getDnsZones({ queryParams, config } = {}) {
2506
- const { client: request = client, ...requestConfig } = config ?? {};
2507
- const data = await request({
2508
- method: "GET",
2509
- url: `/dns_zones`,
2510
- queryParams,
2511
- ...requestConfig,
2512
- headers: {
2513
- ...requestConfig.headers
2514
- }
2515
- });
2516
- return data;
2517
- }
2518
- /**
2519
- * @link /dns_zones/{zone_id}
2520
- */ async function getDnsZone({ pathParams, config } = {}) {
2521
- const { client: request = client, ...requestConfig } = config ?? {};
2522
- if (!pathParams.zone_id) {
2523
- throw new Error(`Missing required path parameter: zone_id`);
2524
- }
2525
- const data = await request({
2526
- method: "GET",
2527
- url: `/dns_zones/${pathParams.zone_id}`,
2528
- ...requestConfig,
2529
- headers: {
2530
- ...requestConfig.headers
2531
- }
2532
- });
2533
- return data;
2534
- }
2535
- /**
2536
- * @link /dns_zones/{zone_id}
2537
- */ async function deleteDnsZone({ pathParams, config } = {}) {
2538
- const { client: request = client, ...requestConfig } = config ?? {};
2539
- if (!pathParams.zone_id) {
2540
- throw new Error(`Missing required path parameter: zone_id`);
2541
- }
2542
- const data = await request({
2543
- method: "DELETE",
2544
- url: `/dns_zones/${pathParams.zone_id}`,
2545
- ...requestConfig,
2546
- headers: {
2547
- ...requestConfig.headers
2548
- }
2549
- });
2550
- return data;
2551
- }
2552
- /**
2553
- * @link /dns_zones/{zone_id}/transfer
2554
- */ async function transferDnsZone({ pathParams, queryParams, config } = {}) {
2555
- const { client: request = client, ...requestConfig } = config ?? {};
2556
- if (!pathParams.zone_id) {
2557
- throw new Error(`Missing required path parameter: zone_id`);
2558
- }
2559
- const data = await request({
2560
- method: "PUT",
2561
- url: `/dns_zones/${pathParams.zone_id}/transfer`,
2562
- queryParams,
2563
- ...requestConfig,
2564
- headers: {
2565
- ...requestConfig.headers
2566
- }
2567
- });
2568
- return data;
2569
- }
2570
- /**
2571
- * @link /dns_zones/{zone_id}/dns_records
2572
- */ async function getDnsRecords({ pathParams, config } = {}) {
2573
- const { client: request = client, ...requestConfig } = config ?? {};
2574
- if (!pathParams.zone_id) {
2575
- throw new Error(`Missing required path parameter: zone_id`);
2576
- }
2577
- const data = await request({
2578
- method: "GET",
2579
- url: `/dns_zones/${pathParams.zone_id}/dns_records`,
2580
- ...requestConfig,
2581
- headers: {
2582
- ...requestConfig.headers
2583
- }
2584
- });
2585
- return data;
2586
- }
2587
- /**
2588
- * @link /dns_zones/{zone_id}/dns_records
2589
- */ async function createDnsRecord({ pathParams, body, config } = {}) {
2590
- const { client: request = client, ...requestConfig } = config ?? {};
2591
- if (!pathParams.zone_id) {
2592
- throw new Error(`Missing required path parameter: zone_id`);
2593
- }
2594
- const data = await request({
2595
- method: "POST",
2596
- url: `/dns_zones/${pathParams.zone_id}/dns_records`,
2597
- body: body,
2598
- ...requestConfig,
2599
- headers: {
2600
- ...requestConfig.headers
2601
- }
2602
- });
2603
- return data;
2604
- }
2605
- /**
2606
- * @link /dns_zones/{zone_id}/dns_records/{dns_record_id}
2607
- */ async function getIndividualDnsRecord({ pathParams, config } = {}) {
2608
- const { client: request = client, ...requestConfig } = config ?? {};
2609
- if (!pathParams.zone_id) {
2610
- throw new Error(`Missing required path parameter: zone_id`);
2611
- }
2612
- if (!pathParams.dns_record_id) {
2613
- throw new Error(`Missing required path parameter: dns_record_id`);
2614
- }
2615
- const data = await request({
2616
- method: "GET",
2617
- url: `/dns_zones/${pathParams.zone_id}/dns_records/${pathParams.dns_record_id}`,
2618
- ...requestConfig,
2619
- headers: {
2620
- ...requestConfig.headers
2621
- }
2622
- });
2623
- return data;
2624
- }
2625
- /**
2626
- * @link /dns_zones/{zone_id}/dns_records/{dns_record_id}
2627
- */ async function deleteDnsRecord({ pathParams, config } = {}) {
2628
- const { client: request = client, ...requestConfig } = config ?? {};
2629
- if (!pathParams.zone_id) {
2630
- throw new Error(`Missing required path parameter: zone_id`);
2631
- }
2632
- if (!pathParams.dns_record_id) {
2633
- throw new Error(`Missing required path parameter: dns_record_id`);
2634
- }
2635
- const data = await request({
2636
- method: "DELETE",
2637
- url: `/dns_zones/${pathParams.zone_id}/dns_records/${pathParams.dns_record_id}`,
2638
- ...requestConfig,
2639
- headers: {
2640
- ...requestConfig.headers
2641
- }
2642
- });
2643
- return data;
2644
- }
2645
- /**
2646
- * @link /sites/{site_id}/dev_servers
2647
- */ async function listSiteDevServers({ pathParams, queryParams, config } = {}) {
2648
- const { client: request = client, ...requestConfig } = config ?? {};
2649
- if (!pathParams.site_id) {
2650
- throw new Error(`Missing required path parameter: site_id`);
2651
- }
2652
- const data = await request({
2653
- method: "GET",
2654
- url: `/sites/${pathParams.site_id}/dev_servers`,
2655
- queryParams,
2656
- ...requestConfig,
2657
- headers: {
2658
- ...requestConfig.headers
2659
- }
2660
- });
2661
- return data;
2662
- }
2663
- /**
2664
- * @link /sites/{site_id}/dev_servers
2665
- */ async function createSiteDevServer({ pathParams, queryParams, config } = {}) {
2666
- const { client: request = client, ...requestConfig } = config ?? {};
2667
- if (!pathParams.site_id) {
2668
- throw new Error(`Missing required path parameter: site_id`);
2669
- }
2670
- const data = await request({
2671
- method: "POST",
2672
- url: `/sites/${pathParams.site_id}/dev_servers`,
2673
- queryParams,
2674
- ...requestConfig,
2675
- headers: {
2676
- ...requestConfig.headers
2677
- }
2678
- });
2679
- return data;
2680
- }
2681
- /**
2682
- * @link /sites/{site_id}/dev_servers
2683
- */ async function deleteSiteDevServers({ pathParams, queryParams, config } = {}) {
2684
- const { client: request = client, ...requestConfig } = config ?? {};
2685
- if (!pathParams.site_id) {
2686
- throw new Error(`Missing required path parameter: site_id`);
2687
- }
2688
- const data = await request({
2689
- method: "DELETE",
2690
- url: `/sites/${pathParams.site_id}/dev_servers`,
2691
- queryParams,
2692
- ...requestConfig,
2693
- headers: {
2694
- ...requestConfig.headers
2695
- }
2696
- });
2697
- return data;
2698
- }
2699
- /**
2700
- * @link /sites/{site_id}/dev_servers/{dev_server_id}
2701
- */ async function getSiteDevServer({ pathParams, config } = {}) {
2702
- const { client: request = client, ...requestConfig } = config ?? {};
2703
- if (!pathParams.site_id) {
2704
- throw new Error(`Missing required path parameter: site_id`);
2705
- }
2706
- if (!pathParams.dev_server_id) {
2707
- throw new Error(`Missing required path parameter: dev_server_id`);
2708
- }
2709
- const data = await request({
2710
- method: "GET",
2711
- url: `/sites/${pathParams.site_id}/dev_servers/${pathParams.dev_server_id}`,
2712
- ...requestConfig,
2713
- headers: {
2714
- ...requestConfig.headers
2715
- }
2716
- });
2717
- return data;
2718
- }
2719
- /**
2720
- * @link /sites/{site_id}/dev_servers/{dev_server_id}/activity
2721
- */ async function markDevServerActivity({ pathParams, config } = {}) {
2722
- const { client: request = client, ...requestConfig } = config ?? {};
2723
- if (!pathParams.site_id) {
2724
- throw new Error(`Missing required path parameter: site_id`);
2725
- }
2726
- if (!pathParams.dev_server_id) {
2727
- throw new Error(`Missing required path parameter: dev_server_id`);
2728
- }
2729
- const data = await request({
2730
- method: "POST",
2731
- url: `/sites/${pathParams.site_id}/dev_servers/${pathParams.dev_server_id}/activity`,
2732
- ...requestConfig,
2733
- headers: {
2734
- ...requestConfig.headers
2735
- }
2736
- });
2737
- return data;
2738
- }
2739
- /**
2740
- * @link /sites/{site_id}/dev_servers/{dev_server_id}/state
2741
- */ async function updateDevServerState({ pathParams, body, config } = {}) {
2742
- const { client: request = client, ...requestConfig } = config ?? {};
2743
- if (!pathParams.site_id) {
2744
- throw new Error(`Missing required path parameter: site_id`);
2745
- }
2746
- if (!pathParams.dev_server_id) {
2747
- throw new Error(`Missing required path parameter: dev_server_id`);
2748
- }
2749
- const data = await request({
2750
- method: "POST",
2751
- url: `/sites/${pathParams.site_id}/dev_servers/${pathParams.dev_server_id}/state`,
2752
- body: body,
2753
- ...requestConfig,
2754
- headers: {
2755
- ...requestConfig.headers
2756
- }
2757
- });
2758
- return data;
2759
- }
2760
- /**
2761
- * @link /sites/{site_id}/dev_server_hooks
2762
- */ async function listSiteDevServerHooks({ pathParams, config } = {}) {
2763
- const { client: request = client, ...requestConfig } = config ?? {};
2764
- if (!pathParams.site_id) {
2765
- throw new Error(`Missing required path parameter: site_id`);
2766
- }
2767
- const data = await request({
2768
- method: "GET",
2769
- url: `/sites/${pathParams.site_id}/dev_server_hooks`,
2770
- ...requestConfig,
2771
- headers: {
2772
- ...requestConfig.headers
2773
- }
2774
- });
2775
- return data;
2776
- }
2777
- /**
2778
- * @link /sites/{site_id}/dev_server_hooks
2779
- */ async function createSiteDevServerHook({ pathParams, body, config } = {}) {
2780
- const { client: request = client, ...requestConfig } = config ?? {};
2781
- if (!pathParams.site_id) {
2782
- throw new Error(`Missing required path parameter: site_id`);
2783
- }
2784
- const data = await request({
2785
- method: "POST",
2786
- url: `/sites/${pathParams.site_id}/dev_server_hooks`,
2787
- body: body,
2788
- ...requestConfig,
2789
- headers: {
2790
- ...requestConfig.headers
2791
- }
2792
- });
2793
- return data;
2794
- }
2795
- /**
2796
- * @link /sites/{site_id}/dev_server_hooks/{id}
2797
- */ async function getSiteDevServerHook({ pathParams, config } = {}) {
2798
- const { client: request = client, ...requestConfig } = config ?? {};
2799
- if (!pathParams.site_id) {
2800
- throw new Error(`Missing required path parameter: site_id`);
2801
- }
2802
- if (!pathParams.id) {
2803
- throw new Error(`Missing required path parameter: id`);
2804
- }
2805
- const data = await request({
2806
- method: "GET",
2807
- url: `/sites/${pathParams.site_id}/dev_server_hooks/${pathParams.id}`,
2808
- ...requestConfig,
2809
- headers: {
2810
- ...requestConfig.headers
2811
- }
2812
- });
2813
- return data;
2814
- }
2815
- /**
2816
- * @link /sites/{site_id}/dev_server_hooks/{id}
2817
- */ async function updateSiteDevServerHook({ pathParams, body, config } = {}) {
2818
- const { client: request = client, ...requestConfig } = config ?? {};
2819
- if (!pathParams.site_id) {
2820
- throw new Error(`Missing required path parameter: site_id`);
2821
- }
2822
- if (!pathParams.id) {
2823
- throw new Error(`Missing required path parameter: id`);
2824
- }
2825
- const data = await request({
2826
- method: "PUT",
2827
- url: `/sites/${pathParams.site_id}/dev_server_hooks/${pathParams.id}`,
2828
- body: body,
2829
- ...requestConfig,
2830
- headers: {
2831
- ...requestConfig.headers
2832
- }
2833
- });
2834
- return data;
2835
- }
2836
- /**
2837
- * @link /sites/{site_id}/dev_server_hooks/{id}
2838
- */ async function deleteSiteDevServerHook({ pathParams, config } = {}) {
2839
- const { client: request = client, ...requestConfig } = config ?? {};
2840
- if (!pathParams.site_id) {
2841
- throw new Error(`Missing required path parameter: site_id`);
2842
- }
2843
- if (!pathParams.id) {
2844
- throw new Error(`Missing required path parameter: id`);
2845
- }
2846
- const data = await request({
2847
- method: "DELETE",
2848
- url: `/sites/${pathParams.site_id}/dev_server_hooks/${pathParams.id}`,
2849
- ...requestConfig,
2850
- headers: {
2851
- ...requestConfig.headers
2852
- }
2853
- });
2854
- return data;
2855
- }
2856
- /**
2857
- * @link /sites/{site_id}/agent_runner_hooks
2858
- */ async function listSiteAgentRunnerHooks({ pathParams, config } = {}) {
2859
- const { client: request = client, ...requestConfig } = config ?? {};
2860
- if (!pathParams.site_id) {
2861
- throw new Error(`Missing required path parameter: site_id`);
2862
- }
2863
- const data = await request({
2864
- method: "GET",
2865
- url: `/sites/${pathParams.site_id}/agent_runner_hooks`,
2866
- ...requestConfig,
2867
- headers: {
2868
- ...requestConfig.headers
2869
- }
2870
- });
2871
- return data;
2872
- }
2873
- /**
2874
- * @link /sites/{site_id}/agent_runner_hooks
2875
- */ async function createSiteAgentRunnerHook({ pathParams, body, config } = {}) {
2876
- const { client: request = client, ...requestConfig } = config ?? {};
2877
- if (!pathParams.site_id) {
2878
- throw new Error(`Missing required path parameter: site_id`);
2879
- }
2880
- const data = await request({
2881
- method: "POST",
2882
- url: `/sites/${pathParams.site_id}/agent_runner_hooks`,
2883
- body: body,
2884
- ...requestConfig,
2885
- headers: {
2886
- ...requestConfig.headers
2887
- }
2888
- });
2889
- return data;
2890
- }
2891
- /**
2892
- * @link /sites/{site_id}/agent_runner_hooks/{id}
2893
- */ async function getSiteAgentRunnerHook({ pathParams, config } = {}) {
2894
- const { client: request = client, ...requestConfig } = config ?? {};
2895
- if (!pathParams.site_id) {
2896
- throw new Error(`Missing required path parameter: site_id`);
2897
- }
2898
- if (!pathParams.id) {
2899
- throw new Error(`Missing required path parameter: id`);
2900
- }
2901
- const data = await request({
2902
- method: "GET",
2903
- url: `/sites/${pathParams.site_id}/agent_runner_hooks/${pathParams.id}`,
2904
- ...requestConfig,
2905
- headers: {
2906
- ...requestConfig.headers
2907
- }
2908
- });
2909
- return data;
2910
- }
2911
- /**
2912
- * @link /sites/{site_id}/agent_runner_hooks/{id}
2913
- */ async function updateSiteAgentRunnerHook({ pathParams, body, config } = {}) {
2914
- const { client: request = client, ...requestConfig } = config ?? {};
2915
- if (!pathParams.site_id) {
2916
- throw new Error(`Missing required path parameter: site_id`);
2917
- }
2918
- if (!pathParams.id) {
2919
- throw new Error(`Missing required path parameter: id`);
2920
- }
2921
- const data = await request({
2922
- method: "PUT",
2923
- url: `/sites/${pathParams.site_id}/agent_runner_hooks/${pathParams.id}`,
2924
- body: body,
2925
- ...requestConfig,
2926
- headers: {
2927
- ...requestConfig.headers
2928
- }
2929
- });
2930
- return data;
2931
- }
2932
- /**
2933
- * @link /sites/{site_id}/agent_runner_hooks/{id}
2934
- */ async function deleteSiteAgentRunnerHook({ pathParams, config } = {}) {
2935
- const { client: request = client, ...requestConfig } = config ?? {};
2936
- if (!pathParams.site_id) {
2937
- throw new Error(`Missing required path parameter: site_id`);
2938
- }
2939
- if (!pathParams.id) {
2940
- throw new Error(`Missing required path parameter: id`);
2941
- }
2942
- const data = await request({
2943
- method: "DELETE",
2944
- url: `/sites/${pathParams.site_id}/agent_runner_hooks/${pathParams.id}`,
2945
- ...requestConfig,
2946
- headers: {
2947
- ...requestConfig.headers
2948
- }
2949
- });
2950
- return data;
2951
- }
2952
- /**
2953
- * @link /ai-gateway/providers
2954
- */ async function getAIGatewayProviders({ config } = {}) {
2955
- const { client: request = client, ...requestConfig } = config ?? {};
2956
- const data = await request({
2957
- method: "GET",
2958
- url: `/ai-gateway/providers`,
2959
- ...requestConfig,
2960
- headers: {
2961
- ...requestConfig.headers
2962
- }
2963
- });
2964
- return data;
2965
- }
2966
- /**
2967
- * @description Returns an AI Gateway token for a specific site
2968
- * @link /sites/{site_id}/ai-gateway/token
2969
- */ async function getAIGatewayToken({ pathParams, config } = {}) {
2970
- const { client: request = client, ...requestConfig } = config ?? {};
2971
- if (!pathParams.site_id) {
2972
- throw new Error(`Missing required path parameter: site_id`);
2973
- }
2974
- const data = await request({
2975
- method: "GET",
2976
- url: `/sites/${pathParams.site_id}/ai-gateway/token`,
2977
- ...requestConfig,
2978
- headers: {
2979
- ...requestConfig.headers
2980
- }
2981
- });
2982
- return data;
2983
- }
2984
- /**
2985
- * @description Returns an AI Gateway token scoped to an account
2986
- * @link /accounts/{account_id}/ai-gateway/token
2987
- */ async function getAccountAIGatewayToken({ pathParams, config } = {}) {
2988
- const { client: request = client, ...requestConfig } = config ?? {};
2989
- if (!pathParams.account_id) {
2990
- throw new Error(`Missing required path parameter: account_id`);
2991
- }
2992
- const data = await request({
2993
- method: "GET",
2994
- url: `/accounts/${pathParams.account_id}/ai-gateway/token`,
2995
- ...requestConfig,
2996
- headers: {
2997
- ...requestConfig.headers
2998
- }
2999
- });
3000
- return data;
3001
- }
3002
- /**
3003
- * @description Creates a new database for the specified site. If a database already exists, returns the existing connection string. The database region defaults to the site's functions region if not specified.
3004
- * @link /sites/{site_id}/database
3005
- */ async function createSiteDatabase({ pathParams, body, config } = {}) {
3006
- const { client: request = client, ...requestConfig } = config ?? {};
3007
- if (!pathParams.site_id) {
3008
- throw new Error(`Missing required path parameter: site_id`);
3009
- }
3010
- const data = await request({
3011
- method: "POST",
3012
- url: `/sites/${pathParams.site_id}/database`,
3013
- body: body,
3014
- ...requestConfig,
3015
- headers: {
3016
- ...requestConfig.headers
3017
- }
3018
- });
3019
- return data;
3020
- }
3021
- /**
3022
- * @description Returns the database connection string for the specified site.
3023
- * @link /sites/{site_id}/database
3024
- */ async function getSiteDatabase({ pathParams, queryParams, config } = {}) {
3025
- const { client: request = client, ...requestConfig } = config ?? {};
3026
- if (!pathParams.site_id) {
3027
- throw new Error(`Missing required path parameter: site_id`);
3028
- }
3029
- const data = await request({
3030
- method: "GET",
3031
- url: `/sites/${pathParams.site_id}/database`,
3032
- queryParams,
3033
- ...requestConfig,
3034
- headers: {
3035
- ...requestConfig.headers
3036
- }
3037
- });
3038
- return data;
3039
- }
3040
- /**
3041
- * @description Deletes the database and all associated branches and snapshots for the specified site.
3042
- * @link /sites/{site_id}/database
3043
- */ async function deleteSiteDatabase({ pathParams, config } = {}) {
3044
- const { client: request = client, ...requestConfig } = config ?? {};
3045
- if (!pathParams.site_id) {
3046
- throw new Error(`Missing required path parameter: site_id`);
3047
- }
3048
- const data = await request({
3049
- method: "DELETE",
3050
- url: `/sites/${pathParams.site_id}/database`,
3051
- ...requestConfig,
3052
- headers: {
3053
- ...requestConfig.headers
3054
- }
3055
- });
3056
- return data;
3057
- }
3058
- /**
3059
- * @description Creates a new database branch. If a branch already exists for the specified branch ID, returns the existing connection string.
3060
- * @link /sites/{site_id}/database/branch
3061
- */ async function createSiteDatabaseBranch({ pathParams, body, config } = {}) {
3062
- const { client: request = client, ...requestConfig } = config ?? {};
3063
- if (!pathParams.site_id) {
3064
- throw new Error(`Missing required path parameter: site_id`);
3065
- }
3066
- const data = await request({
3067
- method: "POST",
3068
- url: `/sites/${pathParams.site_id}/database/branch`,
3069
- body: body,
3070
- ...requestConfig,
3071
- headers: {
3072
- ...requestConfig.headers
3073
- }
3074
- });
3075
- return data;
3076
- }
3077
- /**
3078
- * @description Returns all branches for the site's database with compute status and metadata.
3079
- * @link /sites/{site_id}/database/branches
3080
- */ async function listSiteDatabaseBranches({ pathParams, config } = {}) {
3081
- const { client: request = client, ...requestConfig } = config ?? {};
3082
- if (!pathParams.site_id) {
3083
- throw new Error(`Missing required path parameter: site_id`);
3084
- }
3085
- const data = await request({
3086
- method: "GET",
3087
- url: `/sites/${pathParams.site_id}/database/branches`,
3088
- ...requestConfig,
3089
- headers: {
3090
- ...requestConfig.headers
3091
- }
3092
- });
3093
- return data;
3094
- }
3095
- /**
3096
- * @description Returns the database branch connection string for a specific branch.
3097
- * @link /sites/{site_id}/database/branch/{branch_id}
3098
- */ async function getSiteDatabaseBranch({ pathParams, queryParams, config } = {}) {
3099
- const { client: request = client, ...requestConfig } = config ?? {};
3100
- if (!pathParams.site_id) {
3101
- throw new Error(`Missing required path parameter: site_id`);
3102
- }
3103
- if (!pathParams.branch_id) {
3104
- throw new Error(`Missing required path parameter: branch_id`);
3105
- }
3106
- const data = await request({
3107
- method: "GET",
3108
- url: `/sites/${pathParams.site_id}/database/branch/${pathParams.branch_id}`,
3109
- queryParams,
3110
- ...requestConfig,
3111
- headers: {
3112
- ...requestConfig.headers
3113
- }
3114
- });
3115
- return data;
3116
- }
3117
- /**
3118
- * @description Deletes a database branch.
3119
- * @link /sites/{site_id}/database/branch/{branch_id}
3120
- */ async function deleteSiteDatabaseBranch({ pathParams, config } = {}) {
3121
- const { client: request = client, ...requestConfig } = config ?? {};
3122
- if (!pathParams.site_id) {
3123
- throw new Error(`Missing required path parameter: site_id`);
3124
- }
3125
- if (!pathParams.branch_id) {
3126
- throw new Error(`Missing required path parameter: branch_id`);
3127
- }
3128
- const data = await request({
3129
- method: "DELETE",
3130
- url: `/sites/${pathParams.site_id}/database/branch/${pathParams.branch_id}`,
3131
- ...requestConfig,
3132
- headers: {
3133
- ...requestConfig.headers
3134
- }
3135
- });
3136
- return data;
3137
- }
3138
- /**
3139
- * @description Resets a non-production database branch by re-forking it from a source branch (defaults to the production branch). If the target branch is already in sync with the source, returns the existing connection string without performing a reset, unless `force=true` is passed. The production branch cannot be reset.
3140
- * @link /sites/{site_id}/database/branch/{branch_id}/reset
3141
- */ async function resetSiteDatabaseBranch({ pathParams, body, queryParams, config } = {}) {
3142
- const { client: request = client, ...requestConfig } = config ?? {};
3143
- if (!pathParams.site_id) {
3144
- throw new Error(`Missing required path parameter: site_id`);
3145
- }
3146
- if (!pathParams.branch_id) {
3147
- throw new Error(`Missing required path parameter: branch_id`);
3148
- }
3149
- const data = await request({
3150
- method: "POST",
3151
- url: `/sites/${pathParams.site_id}/database/branch/${pathParams.branch_id}/reset`,
3152
- queryParams,
3153
- body: body,
3154
- ...requestConfig,
3155
- headers: {
3156
- ...requestConfig.headers
3157
- }
3158
- });
3159
- return data;
3160
- }
3161
- /**
3162
- * @description Sets compute settings for a specific database branch, overriding project-level settings. Requires a Pro or higher plan.
3163
- * @link /sites/{site_id}/database/branch/{branch_id}/compute/settings
3164
- */ async function setSiteDatabaseBranchComputeSettings({ pathParams, body, config } = {}) {
3165
- const { client: request = client, ...requestConfig } = config ?? {};
3166
- if (!pathParams.site_id) {
3167
- throw new Error(`Missing required path parameter: site_id`);
3168
- }
3169
- if (!pathParams.branch_id) {
3170
- throw new Error(`Missing required path parameter: branch_id`);
3171
- }
3172
- const data = await request({
3173
- method: "PUT",
3174
- url: `/sites/${pathParams.site_id}/database/branch/${pathParams.branch_id}/compute/settings`,
3175
- body: body,
3176
- ...requestConfig,
3177
- headers: {
3178
- ...requestConfig.headers
3179
- }
3180
- });
3181
- return data;
3182
- }
3183
- /**
3184
- * @description Sets project-level compute settings for the database. Applied to new branches. Can be overridden per-branch. Requires a Pro or higher plan.
3185
- * @link /sites/{site_id}/database/compute/settings
3186
- */ async function setSiteDatabaseComputeSettings({ pathParams, body, config } = {}) {
3187
- const { client: request = client, ...requestConfig } = config ?? {};
3188
- if (!pathParams.site_id) {
3189
- throw new Error(`Missing required path parameter: site_id`);
3190
- }
3191
- const data = await request({
3192
- method: "PUT",
3193
- url: `/sites/${pathParams.site_id}/database/compute/settings`,
3194
- body: body,
3195
- ...requestConfig,
3196
- headers: {
3197
- ...requestConfig.headers
3198
- }
3199
- });
3200
- return data;
3201
- }
3202
- /**
3203
- * @description Returns the project-level compute settings for the database. Returns effective settings (custom or tier defaults). Requires a Pro or higher plan.
3204
- * @link /sites/{site_id}/database/compute/settings
3205
- */ async function getSiteDatabaseComputeSettings({ pathParams, config } = {}) {
3206
- const { client: request = client, ...requestConfig } = config ?? {};
3207
- if (!pathParams.site_id) {
3208
- throw new Error(`Missing required path parameter: site_id`);
3209
- }
3210
- const data = await request({
3211
- method: "GET",
3212
- url: `/sites/${pathParams.site_id}/database/compute/settings`,
3213
- ...requestConfig,
3214
- headers: {
3215
- ...requestConfig.headers
3216
- }
3217
- });
3218
- return data;
3219
- }
3220
- /**
3221
- * @description Resets project-level compute settings to tier defaults. Requires a Pro or higher plan.
3222
- * @link /sites/{site_id}/database/compute/settings
3223
- */ async function clearSiteDatabaseComputeSettings({ pathParams, config } = {}) {
3224
- const { client: request = client, ...requestConfig } = config ?? {};
3225
- if (!pathParams.site_id) {
3226
- throw new Error(`Missing required path parameter: site_id`);
3227
- }
3228
- const data = await request({
3229
- method: "DELETE",
3230
- url: `/sites/${pathParams.site_id}/database/compute/settings`,
3231
- ...requestConfig,
3232
- headers: {
3233
- ...requestConfig.headers
3234
- }
3235
- });
3236
- return data;
3237
- }
3238
- /**
3239
- * @description Returns the list of migrations available for the specified branch, indicating which ones have been applied to the database.
3240
- * @link /sites/{site_id}/database/migrations
3241
- */ async function listSiteDatabaseMigrations({ pathParams, queryParams, config } = {}) {
3242
- const { client: request = client, ...requestConfig } = config ?? {};
3243
- if (!pathParams.site_id) {
3244
- throw new Error(`Missing required path parameter: site_id`);
3245
- }
3246
- const data = await request({
3247
- method: "GET",
3248
- url: `/sites/${pathParams.site_id}/database/migrations`,
3249
- queryParams,
3250
- ...requestConfig,
3251
- headers: {
3252
- ...requestConfig.headers
3253
- }
3254
- });
3255
- return data;
3256
- }
3257
- /**
3258
- * @description Returns the contents of a named migration for the specified branch.
3259
- * @link /sites/{site_id}/database/migrations/{name}
3260
- */ async function getSiteDatabaseMigration({ pathParams, queryParams, config } = {}) {
3261
- const { client: request = client, ...requestConfig } = config ?? {};
3262
- if (!pathParams.site_id) {
3263
- throw new Error(`Missing required path parameter: site_id`);
3264
- }
3265
- if (!pathParams.name) {
3266
- throw new Error(`Missing required path parameter: name`);
3267
- }
3268
- const data = await request({
3269
- method: "GET",
3270
- url: `/sites/${pathParams.site_id}/database/migrations/${pathParams.name}`,
3271
- queryParams,
3272
- ...requestConfig,
3273
- headers: {
3274
- ...requestConfig.headers
3275
- }
3276
- });
3277
- return data;
3278
- }
3279
- /**
3280
- * @description Runs database migrations for the specified deploy. Finds the deploy and determines the appropriate branch.
3281
- * @link /sites/{site_id}/database/migrations/{deploy_id}
3282
- */ async function runSiteDatabaseMigrations({ pathParams, body, config } = {}) {
3283
- const { client: request = client, ...requestConfig } = config ?? {};
3284
- if (!pathParams.site_id) {
3285
- throw new Error(`Missing required path parameter: site_id`);
3286
- }
3287
- if (!pathParams.deploy_id) {
3288
- throw new Error(`Missing required path parameter: deploy_id`);
3289
- }
3290
- const data = await request({
3291
- method: "POST",
3292
- url: `/sites/${pathParams.site_id}/database/migrations/${pathParams.deploy_id}`,
3293
- body: body,
3294
- ...requestConfig,
3295
- headers: {
3296
- ...requestConfig.headers
3297
- }
3298
- });
3299
- return data;
3300
- }
3301
- /**
3302
- * @description Creates a point-in-time snapshot of a database branch. Defaults to the production branch if no branch name is specified.
3303
- * @link /sites/{site_id}/database/snapshot
3304
- */ async function createSiteDatabaseSnapshot({ pathParams, body, config } = {}) {
3305
- const { client: request = client, ...requestConfig } = config ?? {};
3306
- if (!pathParams.site_id) {
3307
- throw new Error(`Missing required path parameter: site_id`);
3308
- }
3309
- const data = await request({
3310
- method: "POST",
3311
- url: `/sites/${pathParams.site_id}/database/snapshot`,
3312
- body: body,
3313
- ...requestConfig,
3314
- headers: {
3315
- ...requestConfig.headers
3316
- }
3317
- });
3318
- return data;
3319
- }
3320
- /**
3321
- * @description Returns all snapshots for the site's database.
3322
- * @link /sites/{site_id}/database/snapshots
3323
- */ async function listSiteDatabaseSnapshots({ pathParams, config } = {}) {
3324
- const { client: request = client, ...requestConfig } = config ?? {};
3325
- if (!pathParams.site_id) {
3326
- throw new Error(`Missing required path parameter: site_id`);
3327
- }
3328
- const data = await request({
3329
- method: "GET",
3330
- url: `/sites/${pathParams.site_id}/database/snapshots`,
3331
- ...requestConfig,
3332
- headers: {
3333
- ...requestConfig.headers
3334
- }
3335
- });
3336
- return data;
3337
- }
3338
- /**
3339
- * @description Deletes a database snapshot.
3340
- * @link /sites/{site_id}/database/snapshot/{snapshot_id}
3341
- */ async function deleteSiteDatabaseSnapshot({ pathParams, config } = {}) {
3342
- const { client: request = client, ...requestConfig } = config ?? {};
3343
- if (!pathParams.site_id) {
3344
- throw new Error(`Missing required path parameter: site_id`);
3345
- }
3346
- if (!pathParams.snapshot_id) {
3347
- throw new Error(`Missing required path parameter: snapshot_id`);
3348
- }
3349
- const data = await request({
3350
- method: "DELETE",
3351
- url: `/sites/${pathParams.site_id}/database/snapshot/${pathParams.snapshot_id}`,
3352
- ...requestConfig,
3353
- headers: {
3354
- ...requestConfig.headers
3355
- }
3356
- });
3357
- return data;
3358
- }
3359
- /**
3360
- * @description Restores a snapshot to a database branch. Defaults to the production branch if no branch_name is specified.
3361
- * @link /sites/{site_id}/database/snapshot/{snapshot_id}/restore
3362
- */ async function restoreSiteDatabaseSnapshot({ pathParams, body, config } = {}) {
3363
- const { client: request = client, ...requestConfig } = config ?? {};
3364
- if (!pathParams.site_id) {
3365
- throw new Error(`Missing required path parameter: site_id`);
3366
- }
3367
- if (!pathParams.snapshot_id) {
3368
- throw new Error(`Missing required path parameter: snapshot_id`);
3369
- }
3370
- const data = await request({
3371
- method: "POST",
3372
- url: `/sites/${pathParams.site_id}/database/snapshot/${pathParams.snapshot_id}/restore`,
3373
- body: body,
3374
- ...requestConfig,
3375
- headers: {
3376
- ...requestConfig.headers
3377
- }
3378
- });
3379
- return data;
3380
- }
3381
- /**
3382
- * @description This is an internal-only endpoint.
3383
- * @link /sites/{site_id}/plugins/{_package}
3384
- */ async function updatePlugin({ pathParams, body, config } = {}) {
3385
- const { client: request = client, ...requestConfig } = config ?? {};
3386
- if (!pathParams.site_id) {
3387
- throw new Error(`Missing required path parameter: site_id`);
3388
- }
3389
- if (!pathParams._package) {
3390
- throw new Error(`Missing required path parameter: _package`);
3391
- }
3392
- const data = await request({
3393
- method: "PUT",
3394
- url: `/sites/${pathParams.site_id}/plugins/${pathParams._package}`,
3395
- body: body,
3396
- ...requestConfig,
3397
- headers: {
3398
- ...requestConfig.headers
3399
- }
3400
- });
3401
- return data;
3402
- }
3403
- const operationsByPath = {
3404
- "GET /sites": listSites,
3405
- "POST /sites": createSite,
3406
- "GET /sites/{site_id}": getSite,
3407
- "PATCH /sites/{site_id}": updateSite,
3408
- "DELETE /sites/{site_id}": deleteSite,
3409
- "POST /sites/{site_id}/ssl": provisionSiteTLSCertificate,
3410
- "GET /sites/{site_id}/ssl": showSiteTLSCertificate,
3411
- "GET /sites/{site_id}/ssl/certificates": getAllCertificates,
3412
- "GET /accounts/{account_id}/env": getEnvVars,
3413
- "POST /accounts/{account_id}/env": createEnvVars,
3414
- "GET /api/v1/sites/{site_id}/env": getSiteEnvVars,
3415
- "GET /accounts/{account_id}/env/{key}": getEnvVar,
3416
- "PUT /accounts/{account_id}/env/{key}": updateEnvVar,
3417
- "PATCH /accounts/{account_id}/env/{key}": setEnvVarValue,
3418
- "DELETE /accounts/{account_id}/env/{key}": deleteEnvVar,
3419
- "DELETE /accounts/{account_id}/env/{key}/value/{id}": deleteEnvVarValue,
3420
- "GET /sites/{site_id}/functions": searchSiteFunctions,
3421
- "GET /sites/{site_id}/forms": listSiteForms,
3422
- "DELETE /sites/{site_id}/forms/{form_id}": deleteSiteForm,
3423
- "GET /sites/{site_id}/submissions": listSiteSubmissions,
3424
- "GET /sites/{site_id}/files": listSiteFiles,
3425
- "GET /sites/{site_id}/assets": listSiteAssets,
3426
- "POST /sites/{site_id}/assets": createSiteAsset,
3427
- "GET /sites/{site_id}/assets/{asset_id}": getSiteAssetInfo,
3428
- "PUT /sites/{site_id}/assets/{asset_id}": updateSiteAsset,
3429
- "DELETE /sites/{site_id}/assets/{asset_id}": deleteSiteAsset,
3430
- "GET /sites/{site_id}/assets/{asset_id}/public_signature": getSiteAssetPublicSignature,
3431
- "GET /sites/{site_id}/files/{file_path}": getSiteFileByPathName,
3432
- "POST /purge": purgeCache,
3433
- "GET /sites/{site_id}/snippets": listSiteSnippets,
3434
- "POST /sites/{site_id}/snippets": createSiteSnippet,
3435
- "GET /sites/{site_id}/snippets/{snippet_id}": getSiteSnippet,
3436
- "PUT /sites/{site_id}/snippets/{snippet_id}": updateSiteSnippet,
3437
- "DELETE /sites/{site_id}/snippets/{snippet_id}": deleteSiteSnippet,
3438
- "GET /sites/{site_id}/metadata": getSiteMetadata,
3439
- "PUT /sites/{site_id}/metadata": updateSiteMetadata,
3440
- "GET /sites/{site_id}/build_hooks": listSiteBuildHooks,
3441
- "POST /sites/{site_id}/build_hooks": createSiteBuildHook,
3442
- "GET /sites/{site_id}/build_hooks/{id}": getSiteBuildHook,
3443
- "PUT /sites/{site_id}/build_hooks/{id}": updateSiteBuildHook,
3444
- "DELETE /sites/{site_id}/build_hooks/{id}": deleteSiteBuildHook,
3445
- "GET /sites/{site_id}/deploys": listSiteDeploys,
3446
- "POST /sites/{site_id}/deploys": createSiteDeploy,
3447
- "GET /sites/{site_id}/deploys/{deploy_id}": getSiteDeploy,
3448
- "PUT /sites/{site_id}/deploys/{deploy_id}": updateSiteDeploy,
3449
- "DELETE /sites/{site_id}/deploys/{deploy_id}": deleteSiteDeploy,
3450
- "POST /deploys/{deploy_id}/cancel": cancelSiteDeploy,
3451
- "POST /sites/{site_id}/deploys/{deploy_id}/restore": restoreSiteDeploy,
3452
- "GET /sites/{site_id}/builds": listSiteBuilds,
3453
- "POST /sites/{site_id}/builds": createSiteBuild,
3454
- "GET /sites/{site_id}/deployed-branches": listSiteDeployedBranches,
3455
- "PUT /sites/{site_id}/unlink_repo": unlinkSiteRepo,
3456
- "PUT /sites/{site_id}/enable": enableSite,
3457
- "PUT /sites/{site_id}/disable": disableSite,
3458
- "GET /builds/{build_id}": getSiteBuild,
3459
- "POST /builds/{build_id}/log": updateSiteBuildLog,
3460
- "POST /builds/{build_id}/start": notifyBuildStart,
3461
- "GET /{account_id}/builds/status": getAccountBuildStatus,
3462
- "GET /sites/{site_id}/dns": getDNSForSite,
3463
- "PUT /sites/{site_id}/dns": configureDNSForSite,
3464
- "PUT /sites/{site_id}/rollback": rollbackSiteDeploy,
3465
- "GET /deploys/{deploy_id}": getDeploy,
3466
- "DELETE /deploys/{deploy_id}": deleteDeploy,
3467
- "PATCH /deploys/{deploy_id}/validations_report": updateDeployValidations,
3468
- "POST /deploys/{deploy_id}/lock": lockDeploy,
3469
- "POST /deploys/{deploy_id}/unlock": unlockDeploy,
3470
- "PUT /deploys/{deploy_id}/files/{path}": uploadDeployFile,
3471
- "PUT /deploys/{deploy_id}/functions/{name}": uploadDeployFunction,
3472
- "PUT /deploys/{deploy_id}/edge_functions/{code_sha}": uploadDeployEdgeFunction,
3473
- "GET /sites/{site_id}/plugin_runs/latest": getLatestPluginRuns,
3474
- "POST /deploys/{deploy_id}/plugin_runs": createPluginRun,
3475
- "GET /forms/{form_id}/submissions": listFormSubmissions,
3476
- "GET /hooks": listHooksBySiteId,
3477
- "POST /hooks": createHookBySiteId,
3478
- "GET /hooks/{hook_id}": getHook,
3479
- "PUT /hooks/{hook_id}": updateHook,
3480
- "DELETE /hooks/{hook_id}": deleteHook,
3481
- "POST /hooks/{hook_id}/enable": enableHook,
3482
- "GET /hooks/types": listHookTypes,
3483
- "POST /oauth/tickets": createTicket,
3484
- "GET /oauth/tickets/{ticket_id}": showTicket,
3485
- "POST /oauth/tickets/{ticket_id}/exchange": exchangeTicket,
3486
- "GET /deploy_keys": listDeployKeys,
3487
- "POST /deploy_keys": createDeployKey,
3488
- "GET /deploy_keys/{key_id}": getDeployKey,
3489
- "DELETE /deploy_keys/{key_id}": deleteDeployKey,
3490
- "POST /{account_slug}/sites": createSiteInTeam,
3491
- "GET /{account_slug}/sites": listSitesForAccount,
3492
- "GET /{account_slug}/members": listMembersForAccount,
3493
- "POST /{account_slug}/members": addMemberToAccount,
3494
- "GET /{account_slug}/members/{member_id}": getAccountMember,
3495
- "PUT /{account_slug}/members/{member_id}": updateAccountMember,
3496
- "DELETE /{account_slug}/members/{member_id}": removeAccountMember,
3497
- "GET /billing/payment_methods": listPaymentMethodsForUser,
3498
- "GET /accounts/types": listAccountTypesForUser,
3499
- "GET /accounts": listAccountsForUser,
3500
- "POST /accounts": createAccount,
3501
- "GET /accounts/{account_id}": getAccount,
3502
- "PUT /accounts/{account_id}": updateAccount,
3503
- "DELETE /accounts/{account_id}": cancelAccount,
3504
- "GET /accounts/{account_id}/audit": listAccountAuditEvents,
3505
- "GET /agent_runners": listAgentRunners,
3506
- "POST /agent_runners": createAgentRunner,
3507
- "POST /agent_runners/upload_url": createAgentRunnerUploadUrl,
3508
- "GET /agent_runners/{agent_runner_id}": getAgentRunner,
3509
- "PATCH /agent_runners/{agent_runner_id}": updateAgentRunner,
3510
- "DELETE /agent_runners/{agent_runner_id}": deleteAgentRunner,
3511
- "POST /agent_runners/{agent_runner_id}/archive": archiveAgentRunner,
3512
- "POST /agent_runners/{agent_runner_id}/pull_request": agentRunnerPullRequest,
3513
- "POST /agent_runners/{agent_runner_id}/commit": agentRunnerCommitToBranch,
3514
- "GET /agent_runners/{agent_runner_id}/sessions": listAgentRunnerSessions,
3515
- "POST /agent_runners/{agent_runner_id}/sessions": createAgentRunnerSession,
3516
- "GET /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}": getAgentRunnerSession,
3517
- "PATCH /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}": updateAgentRunnerSession,
3518
- "DELETE /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}": deleteAgentRunnerSession,
3519
- "GET /submissions/{submission_id}": listFormSubmission,
3520
- "DELETE /submissions/{submission_id}": deleteSubmission,
3521
- "GET /sites/{site_id}/service-instances": listServiceInstancesForSite,
3522
- "POST /sites/{site_id}/services/{addon}/instances": createServiceInstance,
3523
- "GET /sites/{site_id}/services/{addon}/instances/{instance_id}": showServiceInstance,
3524
- "PUT /sites/{site_id}/services/{addon}/instances/{instance_id}": updateServiceInstance,
3525
- "DELETE /sites/{site_id}/services/{addon}/instances/{instance_id}": deleteServiceInstance,
3526
- "GET /services/": getServices,
3527
- "GET /services/{addonName}": showService,
3528
- "GET /services/{addonName}/manifest": showServiceManifest,
3529
- "GET /user": getCurrentUser,
3530
- "POST /sites/{site_id}/traffic_splits": createSplitTest,
3531
- "GET /sites/{site_id}/traffic_splits": getSplitTests,
3532
- "PUT /sites/{site_id}/traffic_splits/{split_test_id}": updateSplitTest,
3533
- "GET /sites/{site_id}/traffic_splits/{split_test_id}": getSplitTest,
3534
- "POST /sites/{site_id}/traffic_splits/{split_test_id}/publish": enableSplitTest,
3535
- "POST /sites/{site_id}/traffic_splits/{split_test_id}/unpublish": disableSplitTest,
3536
- "POST /dns_zones": createDnsZone,
3537
- "GET /dns_zones": getDnsZones,
3538
- "GET /dns_zones/{zone_id}": getDnsZone,
3539
- "DELETE /dns_zones/{zone_id}": deleteDnsZone,
3540
- "PUT /dns_zones/{zone_id}/transfer": transferDnsZone,
3541
- "GET /dns_zones/{zone_id}/dns_records": getDnsRecords,
3542
- "POST /dns_zones/{zone_id}/dns_records": createDnsRecord,
3543
- "GET /dns_zones/{zone_id}/dns_records/{dns_record_id}": getIndividualDnsRecord,
3544
- "DELETE /dns_zones/{zone_id}/dns_records/{dns_record_id}": deleteDnsRecord,
3545
- "GET /sites/{site_id}/dev_servers": listSiteDevServers,
3546
- "POST /sites/{site_id}/dev_servers": createSiteDevServer,
3547
- "DELETE /sites/{site_id}/dev_servers": deleteSiteDevServers,
3548
- "GET /sites/{site_id}/dev_servers/{dev_server_id}": getSiteDevServer,
3549
- "POST /sites/{site_id}/dev_servers/{dev_server_id}/activity": markDevServerActivity,
3550
- "POST /sites/{site_id}/dev_servers/{dev_server_id}/state": updateDevServerState,
3551
- "GET /sites/{site_id}/dev_server_hooks": listSiteDevServerHooks,
3552
- "POST /sites/{site_id}/dev_server_hooks": createSiteDevServerHook,
3553
- "GET /sites/{site_id}/dev_server_hooks/{id}": getSiteDevServerHook,
3554
- "PUT /sites/{site_id}/dev_server_hooks/{id}": updateSiteDevServerHook,
3555
- "DELETE /sites/{site_id}/dev_server_hooks/{id}": deleteSiteDevServerHook,
3556
- "GET /sites/{site_id}/agent_runner_hooks": listSiteAgentRunnerHooks,
3557
- "POST /sites/{site_id}/agent_runner_hooks": createSiteAgentRunnerHook,
3558
- "GET /sites/{site_id}/agent_runner_hooks/{id}": getSiteAgentRunnerHook,
3559
- "PUT /sites/{site_id}/agent_runner_hooks/{id}": updateSiteAgentRunnerHook,
3560
- "DELETE /sites/{site_id}/agent_runner_hooks/{id}": deleteSiteAgentRunnerHook,
3561
- "GET /ai-gateway/providers": getAIGatewayProviders,
3562
- "GET /sites/{site_id}/ai-gateway/token": getAIGatewayToken,
3563
- "GET /accounts/{account_id}/ai-gateway/token": getAccountAIGatewayToken,
3564
- "POST /sites/{site_id}/database": createSiteDatabase,
3565
- "GET /sites/{site_id}/database": getSiteDatabase,
3566
- "DELETE /sites/{site_id}/database": deleteSiteDatabase,
3567
- "POST /sites/{site_id}/database/branch": createSiteDatabaseBranch,
3568
- "GET /sites/{site_id}/database/branches": listSiteDatabaseBranches,
3569
- "GET /sites/{site_id}/database/branch/{branch_id}": getSiteDatabaseBranch,
3570
- "DELETE /sites/{site_id}/database/branch/{branch_id}": deleteSiteDatabaseBranch,
3571
- "POST /sites/{site_id}/database/branch/{branch_id}/reset": resetSiteDatabaseBranch,
3572
- "PUT /sites/{site_id}/database/branch/{branch_id}/compute/settings": setSiteDatabaseBranchComputeSettings,
3573
- "PUT /sites/{site_id}/database/compute/settings": setSiteDatabaseComputeSettings,
3574
- "GET /sites/{site_id}/database/compute/settings": getSiteDatabaseComputeSettings,
3575
- "DELETE /sites/{site_id}/database/compute/settings": clearSiteDatabaseComputeSettings,
3576
- "GET /sites/{site_id}/database/migrations": listSiteDatabaseMigrations,
3577
- "GET /sites/{site_id}/database/migrations/{name}": getSiteDatabaseMigration,
3578
- "POST /sites/{site_id}/database/migrations/{deploy_id}": runSiteDatabaseMigrations,
3579
- "POST /sites/{site_id}/database/snapshot": createSiteDatabaseSnapshot,
3580
- "GET /sites/{site_id}/database/snapshots": listSiteDatabaseSnapshots,
3581
- "DELETE /sites/{site_id}/database/snapshot/{snapshot_id}": deleteSiteDatabaseSnapshot,
3582
- "POST /sites/{site_id}/database/snapshot/{snapshot_id}/restore": restoreSiteDatabaseSnapshot,
3583
- "PUT /sites/{site_id}/plugins/{_package}": updatePlugin
3584
- };
3585
- const operationsByTag = {
3586
- "site": {
3587
- listSites,
3588
- createSite,
3589
- getSite,
3590
- updateSite,
3591
- deleteSite,
3592
- unlinkSiteRepo,
3593
- enableSite,
3594
- disableSite,
3595
- createSiteInTeam,
3596
- listSitesForAccount
3597
- },
3598
- "snicertificate": {
3599
- provisionSiteTLSCertificate,
3600
- showSiteTLSCertificate,
3601
- getAllCertificates
3602
- },
3603
- "environmentvariables": {
3604
- getEnvVars,
3605
- createEnvVars,
3606
- getSiteEnvVars,
3607
- getEnvVar,
3608
- updateEnvVar,
3609
- setEnvVarValue,
3610
- deleteEnvVar,
3611
- deleteEnvVarValue
3612
- },
3613
- "function": {
3614
- searchSiteFunctions,
3615
- uploadDeployFunction
3616
- },
3617
- "form": {
3618
- listSiteForms,
3619
- deleteSiteForm
3620
- },
3621
- "submission": {
3622
- listSiteSubmissions,
3623
- listFormSubmissions,
3624
- listFormSubmission,
3625
- deleteSubmission
3626
- },
3627
- "file": {
3628
- listSiteFiles,
3629
- getSiteFileByPathName,
3630
- uploadDeployFile
3631
- },
3632
- "asset": {
3633
- listSiteAssets,
3634
- createSiteAsset,
3635
- getSiteAssetInfo,
3636
- updateSiteAsset,
3637
- deleteSiteAsset
3638
- },
3639
- "assetpublicsignature": {
3640
- getSiteAssetPublicSignature
3641
- },
3642
- "purge": {
3643
- purgeCache
3644
- },
3645
- "snippet": {
3646
- listSiteSnippets,
3647
- createSiteSnippet,
3648
- getSiteSnippet,
3649
- updateSiteSnippet,
3650
- deleteSiteSnippet
3651
- },
3652
- "metadata": {
3653
- getSiteMetadata,
3654
- updateSiteMetadata
3655
- },
3656
- "buildhook": {
3657
- listSiteBuildHooks,
3658
- createSiteBuildHook,
3659
- getSiteBuildHook,
3660
- updateSiteBuildHook,
3661
- deleteSiteBuildHook
3662
- },
3663
- "deploy": {
3664
- listSiteDeploys,
3665
- createSiteDeploy,
3666
- getSiteDeploy,
3667
- updateSiteDeploy,
3668
- deleteSiteDeploy,
3669
- cancelSiteDeploy,
3670
- restoreSiteDeploy,
3671
- rollbackSiteDeploy,
3672
- getDeploy,
3673
- deleteDeploy,
3674
- updateDeployValidations,
3675
- lockDeploy,
3676
- unlockDeploy
3677
- },
3678
- "build": {
3679
- listSiteBuilds,
3680
- createSiteBuild,
3681
- getSiteBuild,
3682
- notifyBuildStart,
3683
- getAccountBuildStatus
3684
- },
3685
- "deployedbranch": {
3686
- listSiteDeployedBranches
3687
- },
3688
- "buildlogmsg": {
3689
- updateSiteBuildLog
3690
- },
3691
- "dnszone": {
3692
- getDNSForSite,
3693
- configureDNSForSite,
3694
- createDnsZone,
3695
- getDnsZones,
3696
- getDnsZone,
3697
- deleteDnsZone,
3698
- transferDnsZone,
3699
- getDnsRecords,
3700
- createDnsRecord,
3701
- getIndividualDnsRecord,
3702
- deleteDnsRecord
3703
- },
3704
- "edgefunction": {
3705
- uploadDeployEdgeFunction
3706
- },
3707
- "xInternal": {
3708
- getLatestPluginRuns,
3709
- createPluginRun,
3710
- updatePlugin
3711
- },
3712
- "hook": {
3713
- listHooksBySiteId,
3714
- createHookBySiteId,
3715
- getHook,
3716
- updateHook,
3717
- deleteHook,
3718
- enableHook
3719
- },
3720
- "hooktype": {
3721
- listHookTypes
3722
- },
3723
- "ticket": {
3724
- createTicket,
3725
- showTicket
3726
- },
3727
- "accesstoken": {
3728
- exchangeTicket
3729
- },
3730
- "deploykey": {
3731
- listDeployKeys,
3732
- createDeployKey,
3733
- getDeployKey,
3734
- deleteDeployKey
3735
- },
3736
- "member": {
3737
- listMembersForAccount,
3738
- addMemberToAccount,
3739
- getAccountMember,
3740
- updateAccountMember,
3741
- removeAccountMember
3742
- },
3743
- "paymentmethod": {
3744
- listPaymentMethodsForUser
3745
- },
3746
- "accounttype": {
3747
- listAccountTypesForUser
3748
- },
3749
- "accountmembership": {
3750
- listAccountsForUser,
3751
- createAccount,
3752
- getAccount,
3753
- updateAccount,
3754
- cancelAccount
3755
- },
3756
- "auditlog": {
3757
- listAccountAuditEvents
3758
- },
3759
- "agentrunner": {
3760
- listAgentRunners,
3761
- createAgentRunner,
3762
- createAgentRunnerUploadUrl,
3763
- getAgentRunner,
3764
- updateAgentRunner,
3765
- deleteAgentRunner,
3766
- archiveAgentRunner,
3767
- agentRunnerPullRequest,
3768
- agentRunnerCommitToBranch
3769
- },
3770
- "agentrunnersession": {
3771
- listAgentRunnerSessions,
3772
- createAgentRunnerSession,
3773
- getAgentRunnerSession,
3774
- updateAgentRunnerSession,
3775
- deleteAgentRunnerSession
3776
- },
3777
- "serviceinstance": {
3778
- listServiceInstancesForSite,
3779
- createServiceInstance,
3780
- showServiceInstance,
3781
- updateServiceInstance,
3782
- deleteServiceInstance
3783
- },
3784
- "service": {
3785
- getServices,
3786
- showService,
3787
- showServiceManifest
3788
- },
3789
- "user": {
3790
- getCurrentUser
3791
- },
3792
- "splittest": {
3793
- createSplitTest,
3794
- getSplitTests,
3795
- updateSplitTest,
3796
- getSplitTest,
3797
- enableSplitTest,
3798
- disableSplitTest
3799
- },
3800
- "devserver": {
3801
- listSiteDevServers,
3802
- createSiteDevServer,
3803
- deleteSiteDevServers,
3804
- getSiteDevServer,
3805
- markDevServerActivity,
3806
- updateDevServerState
3807
- },
3808
- "devserverhook": {
3809
- listSiteDevServerHooks,
3810
- createSiteDevServerHook,
3811
- getSiteDevServerHook,
3812
- updateSiteDevServerHook,
3813
- deleteSiteDevServerHook
3814
- },
3815
- "agentrunnerhook": {
3816
- listSiteAgentRunnerHooks,
3817
- createSiteAgentRunnerHook,
3818
- getSiteAgentRunnerHook,
3819
- updateSiteAgentRunnerHook,
3820
- deleteSiteAgentRunnerHook
3821
- },
3822
- "aigateway": {
3823
- getAIGatewayProviders,
3824
- getAIGatewayToken,
3825
- getAccountAIGatewayToken
3826
- },
3827
- "database": {
3828
- createSiteDatabase,
3829
- getSiteDatabase,
3830
- deleteSiteDatabase,
3831
- createSiteDatabaseBranch,
3832
- listSiteDatabaseBranches,
3833
- getSiteDatabaseBranch,
3834
- deleteSiteDatabaseBranch,
3835
- resetSiteDatabaseBranch,
3836
- setSiteDatabaseBranchComputeSettings,
3837
- setSiteDatabaseComputeSettings,
3838
- getSiteDatabaseComputeSettings,
3839
- clearSiteDatabaseComputeSettings,
3840
- listSiteDatabaseMigrations,
3841
- getSiteDatabaseMigration,
3842
- runSiteDatabaseMigrations,
3843
- createSiteDatabaseSnapshot,
3844
- listSiteDatabaseSnapshots,
3845
- deleteSiteDatabaseSnapshot,
3846
- restoreSiteDatabaseSnapshot
3847
- }
3848
- };
3849
-
3850
- const ApiService = effect.createEffectApi(operationsByTag);
3851
- const effectByPath = effect.createEffectByPath(operationsByPath);
6
+ const ApiService = effect.createEffectApi(components.operationsByTag);
7
+ const effectByPath = effect.createEffectByPath(components.operationsByPath);
3852
8
 
3853
9
  Object.defineProperty(exports, "ApiConfig", {
3854
10
  enumerable: true,