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