netlify-api 0.10.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4510 @@
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, body, 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
+ body: body,
1129
+ ...requestConfig,
1130
+ headers: {
1131
+ ...requestConfig.headers
1132
+ }
1133
+ });
1134
+ return data;
1135
+ }
1136
+ /**
1137
+ * @link /builds/{build_id}/start
1138
+ */ async function notifyBuildStart({ pathParams, queryParams, config } = {}) {
1139
+ const { client: request = client, ...requestConfig } = config ?? {};
1140
+ if (!pathParams.build_id) {
1141
+ throw new Error(`Missing required path parameter: build_id`);
1142
+ }
1143
+ const data = await request({
1144
+ method: "POST",
1145
+ url: `/builds/${pathParams.build_id}/start`,
1146
+ queryParams,
1147
+ ...requestConfig,
1148
+ headers: {
1149
+ ...requestConfig.headers
1150
+ }
1151
+ });
1152
+ return data;
1153
+ }
1154
+ /**
1155
+ * @link /{account_id}/builds/status
1156
+ */ async function getAccountBuildStatus({ pathParams, config } = {}) {
1157
+ const { client: request = client, ...requestConfig } = config ?? {};
1158
+ if (!pathParams.account_id) {
1159
+ throw new Error(`Missing required path parameter: account_id`);
1160
+ }
1161
+ const data = await request({
1162
+ method: "GET",
1163
+ url: `/${pathParams.account_id}/builds/status`,
1164
+ ...requestConfig,
1165
+ headers: {
1166
+ ...requestConfig.headers
1167
+ }
1168
+ });
1169
+ return data;
1170
+ }
1171
+ /**
1172
+ * @link /sites/{site_id}/dns
1173
+ */ async function getDNSForSite({ pathParams, config } = {}) {
1174
+ const { client: request = client, ...requestConfig } = config ?? {};
1175
+ if (!pathParams.site_id) {
1176
+ throw new Error(`Missing required path parameter: site_id`);
1177
+ }
1178
+ const data = await request({
1179
+ method: "GET",
1180
+ url: `/sites/${pathParams.site_id}/dns`,
1181
+ ...requestConfig,
1182
+ headers: {
1183
+ ...requestConfig.headers
1184
+ }
1185
+ });
1186
+ return data;
1187
+ }
1188
+ /**
1189
+ * @link /sites/{site_id}/dns
1190
+ */ async function configureDNSForSite({ pathParams, config } = {}) {
1191
+ const { client: request = client, ...requestConfig } = config ?? {};
1192
+ if (!pathParams.site_id) {
1193
+ throw new Error(`Missing required path parameter: site_id`);
1194
+ }
1195
+ const data = await request({
1196
+ method: "PUT",
1197
+ url: `/sites/${pathParams.site_id}/dns`,
1198
+ ...requestConfig,
1199
+ headers: {
1200
+ ...requestConfig.headers
1201
+ }
1202
+ });
1203
+ return data;
1204
+ }
1205
+ /**
1206
+ * @link /sites/{site_id}/rollback
1207
+ */ async function rollbackSiteDeploy({ pathParams, config } = {}) {
1208
+ const { client: request = client, ...requestConfig } = config ?? {};
1209
+ if (!pathParams.site_id) {
1210
+ throw new Error(`Missing required path parameter: site_id`);
1211
+ }
1212
+ const data = await request({
1213
+ method: "PUT",
1214
+ url: `/sites/${pathParams.site_id}/rollback`,
1215
+ ...requestConfig,
1216
+ headers: {
1217
+ ...requestConfig.headers
1218
+ }
1219
+ });
1220
+ return data;
1221
+ }
1222
+ /**
1223
+ * @link /deploys/{deploy_id}
1224
+ */ async function getDeploy({ pathParams, config } = {}) {
1225
+ const { client: request = client, ...requestConfig } = config ?? {};
1226
+ if (!pathParams.deploy_id) {
1227
+ throw new Error(`Missing required path parameter: deploy_id`);
1228
+ }
1229
+ const data = await request({
1230
+ method: "GET",
1231
+ url: `/deploys/${pathParams.deploy_id}`,
1232
+ ...requestConfig,
1233
+ headers: {
1234
+ ...requestConfig.headers
1235
+ }
1236
+ });
1237
+ return data;
1238
+ }
1239
+ /**
1240
+ * @link /deploys/{deploy_id}
1241
+ */ async function deleteDeploy({ pathParams, config } = {}) {
1242
+ const { client: request = client, ...requestConfig } = config ?? {};
1243
+ if (!pathParams.deploy_id) {
1244
+ throw new Error(`Missing required path parameter: deploy_id`);
1245
+ }
1246
+ const data = await request({
1247
+ method: "DELETE",
1248
+ url: `/deploys/${pathParams.deploy_id}`,
1249
+ ...requestConfig,
1250
+ headers: {
1251
+ ...requestConfig.headers
1252
+ }
1253
+ });
1254
+ return data;
1255
+ }
1256
+ /**
1257
+ * @description Updates the deploy validations report for a deploy.
1258
+ * @link /deploys/{deploy_id}/validations_report
1259
+ */ async function updateDeployValidations({ pathParams, body, config } = {}) {
1260
+ const { client: request = client, ...requestConfig } = config ?? {};
1261
+ if (!pathParams.deploy_id) {
1262
+ throw new Error(`Missing required path parameter: deploy_id`);
1263
+ }
1264
+ const data = await request({
1265
+ method: "PATCH",
1266
+ url: `/deploys/${pathParams.deploy_id}/validations_report`,
1267
+ body: body,
1268
+ ...requestConfig,
1269
+ headers: {
1270
+ ...requestConfig.headers
1271
+ }
1272
+ });
1273
+ return data;
1274
+ }
1275
+ /**
1276
+ * @link /deploys/{deploy_id}/lock
1277
+ */ async function lockDeploy({ pathParams, config } = {}) {
1278
+ const { client: request = client, ...requestConfig } = config ?? {};
1279
+ if (!pathParams.deploy_id) {
1280
+ throw new Error(`Missing required path parameter: deploy_id`);
1281
+ }
1282
+ const data = await request({
1283
+ method: "POST",
1284
+ url: `/deploys/${pathParams.deploy_id}/lock`,
1285
+ ...requestConfig,
1286
+ headers: {
1287
+ ...requestConfig.headers
1288
+ }
1289
+ });
1290
+ return data;
1291
+ }
1292
+ /**
1293
+ * @link /deploys/{deploy_id}/unlock
1294
+ */ async function unlockDeploy({ pathParams, config } = {}) {
1295
+ const { client: request = client, ...requestConfig } = config ?? {};
1296
+ if (!pathParams.deploy_id) {
1297
+ throw new Error(`Missing required path parameter: deploy_id`);
1298
+ }
1299
+ const data = await request({
1300
+ method: "POST",
1301
+ url: `/deploys/${pathParams.deploy_id}/unlock`,
1302
+ ...requestConfig,
1303
+ headers: {
1304
+ ...requestConfig.headers
1305
+ }
1306
+ });
1307
+ return data;
1308
+ }
1309
+ /**
1310
+ * @link /deploys/{deploy_id}/files/{path}
1311
+ */ async function uploadDeployFile({ pathParams, queryParams, config } = {}) {
1312
+ const { client: request = client, ...requestConfig } = config ?? {};
1313
+ if (!pathParams.deploy_id) {
1314
+ throw new Error(`Missing required path parameter: deploy_id`);
1315
+ }
1316
+ if (!pathParams.path) {
1317
+ throw new Error(`Missing required path parameter: path`);
1318
+ }
1319
+ const data = await request({
1320
+ method: "PUT",
1321
+ url: `/deploys/${pathParams.deploy_id}/files/${pathParams.path}`,
1322
+ queryParams,
1323
+ ...requestConfig,
1324
+ headers: {
1325
+ ...requestConfig.headers
1326
+ }
1327
+ });
1328
+ return data;
1329
+ }
1330
+ /**
1331
+ * @link /deploys/{deploy_id}/functions/{name}
1332
+ */ async function uploadDeployFunction({ pathParams, queryParams, headers, config } = {}) {
1333
+ const { client: request = client, ...requestConfig } = config ?? {};
1334
+ if (!pathParams.deploy_id) {
1335
+ throw new Error(`Missing required path parameter: deploy_id`);
1336
+ }
1337
+ if (!pathParams.name) {
1338
+ throw new Error(`Missing required path parameter: name`);
1339
+ }
1340
+ const data = await request({
1341
+ method: "PUT",
1342
+ url: `/deploys/${pathParams.deploy_id}/functions/${pathParams.name}`,
1343
+ queryParams,
1344
+ ...requestConfig,
1345
+ headers: {
1346
+ ...headers,
1347
+ ...requestConfig.headers
1348
+ }
1349
+ });
1350
+ return data;
1351
+ }
1352
+ /**
1353
+ * @link /deploys/{deploy_id}/edge_functions/{code_sha}
1354
+ */ async function uploadDeployEdgeFunction({ pathParams, headers, config } = {}) {
1355
+ const { client: request = client, ...requestConfig } = config ?? {};
1356
+ if (!pathParams.deploy_id) {
1357
+ throw new Error(`Missing required path parameter: deploy_id`);
1358
+ }
1359
+ if (!pathParams.code_sha) {
1360
+ throw new Error(`Missing required path parameter: code_sha`);
1361
+ }
1362
+ const data = await request({
1363
+ method: "PUT",
1364
+ url: `/deploys/${pathParams.deploy_id}/edge_functions/${pathParams.code_sha}`,
1365
+ ...requestConfig,
1366
+ headers: {
1367
+ ...headers,
1368
+ ...requestConfig.headers
1369
+ }
1370
+ });
1371
+ return data;
1372
+ }
1373
+ /**
1374
+ * @description This is an internal-only endpoint.
1375
+ * @link /sites/{site_id}/plugin_runs/latest
1376
+ */ async function getLatestPluginRuns({ pathParams, queryParams, config } = {}) {
1377
+ const { client: request = client, ...requestConfig } = config ?? {};
1378
+ if (!pathParams.site_id) {
1379
+ throw new Error(`Missing required path parameter: site_id`);
1380
+ }
1381
+ const data = await request({
1382
+ method: "GET",
1383
+ url: `/sites/${pathParams.site_id}/plugin_runs/latest`,
1384
+ queryParams,
1385
+ ...requestConfig,
1386
+ headers: {
1387
+ ...requestConfig.headers
1388
+ }
1389
+ });
1390
+ return data;
1391
+ }
1392
+ /**
1393
+ * @description This is an internal-only endpoint.
1394
+ * @link /deploys/{deploy_id}/plugin_runs
1395
+ */ async function createPluginRun({ pathParams, body, config } = {}) {
1396
+ const { client: request = client, ...requestConfig } = config ?? {};
1397
+ if (!pathParams.deploy_id) {
1398
+ throw new Error(`Missing required path parameter: deploy_id`);
1399
+ }
1400
+ const data = await request({
1401
+ method: "POST",
1402
+ url: `/deploys/${pathParams.deploy_id}/plugin_runs`,
1403
+ body: body,
1404
+ ...requestConfig,
1405
+ headers: {
1406
+ ...requestConfig.headers
1407
+ }
1408
+ });
1409
+ return data;
1410
+ }
1411
+ /**
1412
+ * @link /forms/{form_id}/submissions
1413
+ */ async function listFormSubmissions({ pathParams, queryParams, config } = {}) {
1414
+ const { client: request = client, ...requestConfig } = config ?? {};
1415
+ if (!pathParams.form_id) {
1416
+ throw new Error(`Missing required path parameter: form_id`);
1417
+ }
1418
+ const data = await request({
1419
+ method: "GET",
1420
+ url: `/forms/${pathParams.form_id}/submissions`,
1421
+ queryParams,
1422
+ ...requestConfig,
1423
+ headers: {
1424
+ ...requestConfig.headers
1425
+ }
1426
+ });
1427
+ return data;
1428
+ }
1429
+ /**
1430
+ * @link /hooks
1431
+ */ async function listHooksBySiteId({ queryParams, config } = {}) {
1432
+ const { client: request = client, ...requestConfig } = config ?? {};
1433
+ const data = await request({
1434
+ method: "GET",
1435
+ url: `/hooks`,
1436
+ queryParams,
1437
+ ...requestConfig,
1438
+ headers: {
1439
+ ...requestConfig.headers
1440
+ }
1441
+ });
1442
+ return data;
1443
+ }
1444
+ /**
1445
+ * @link /hooks
1446
+ */ async function createHookBySiteId({ body, queryParams, config } = {}) {
1447
+ const { client: request = client, ...requestConfig } = config ?? {};
1448
+ const data = await request({
1449
+ method: "POST",
1450
+ url: `/hooks`,
1451
+ queryParams,
1452
+ body: body,
1453
+ ...requestConfig,
1454
+ headers: {
1455
+ ...requestConfig.headers
1456
+ }
1457
+ });
1458
+ return data;
1459
+ }
1460
+ /**
1461
+ * @link /hooks/{hook_id}
1462
+ */ async function getHook({ pathParams, config } = {}) {
1463
+ const { client: request = client, ...requestConfig } = config ?? {};
1464
+ if (!pathParams.hook_id) {
1465
+ throw new Error(`Missing required path parameter: hook_id`);
1466
+ }
1467
+ const data = await request({
1468
+ method: "GET",
1469
+ url: `/hooks/${pathParams.hook_id}`,
1470
+ ...requestConfig,
1471
+ headers: {
1472
+ ...requestConfig.headers
1473
+ }
1474
+ });
1475
+ return data;
1476
+ }
1477
+ /**
1478
+ * @link /hooks/{hook_id}
1479
+ */ async function updateHook({ pathParams, body, config } = {}) {
1480
+ const { client: request = client, ...requestConfig } = config ?? {};
1481
+ if (!pathParams.hook_id) {
1482
+ throw new Error(`Missing required path parameter: hook_id`);
1483
+ }
1484
+ const data = await request({
1485
+ method: "PUT",
1486
+ url: `/hooks/${pathParams.hook_id}`,
1487
+ body: body,
1488
+ ...requestConfig,
1489
+ headers: {
1490
+ ...requestConfig.headers
1491
+ }
1492
+ });
1493
+ return data;
1494
+ }
1495
+ /**
1496
+ * @link /hooks/{hook_id}
1497
+ */ async function deleteHook({ pathParams, config } = {}) {
1498
+ const { client: request = client, ...requestConfig } = config ?? {};
1499
+ if (!pathParams.hook_id) {
1500
+ throw new Error(`Missing required path parameter: hook_id`);
1501
+ }
1502
+ const data = await request({
1503
+ method: "DELETE",
1504
+ url: `/hooks/${pathParams.hook_id}`,
1505
+ ...requestConfig,
1506
+ headers: {
1507
+ ...requestConfig.headers
1508
+ }
1509
+ });
1510
+ return data;
1511
+ }
1512
+ /**
1513
+ * @link /hooks/{hook_id}/enable
1514
+ */ async function enableHook({ pathParams, config } = {}) {
1515
+ const { client: request = client, ...requestConfig } = config ?? {};
1516
+ if (!pathParams.hook_id) {
1517
+ throw new Error(`Missing required path parameter: hook_id`);
1518
+ }
1519
+ const data = await request({
1520
+ method: "POST",
1521
+ url: `/hooks/${pathParams.hook_id}/enable`,
1522
+ ...requestConfig,
1523
+ headers: {
1524
+ ...requestConfig.headers
1525
+ }
1526
+ });
1527
+ return data;
1528
+ }
1529
+ /**
1530
+ * @link /hooks/types
1531
+ */ async function listHookTypes({ config } = {}) {
1532
+ const { client: request = client, ...requestConfig } = config ?? {};
1533
+ const data = await request({
1534
+ method: "GET",
1535
+ url: `/hooks/types`,
1536
+ ...requestConfig,
1537
+ headers: {
1538
+ ...requestConfig.headers
1539
+ }
1540
+ });
1541
+ return data;
1542
+ }
1543
+ /**
1544
+ * @link /oauth/tickets
1545
+ */ async function createTicket({ body, queryParams, config } = {}) {
1546
+ const { client: request = client, ...requestConfig } = config ?? {};
1547
+ const data = await request({
1548
+ method: "POST",
1549
+ url: `/oauth/tickets`,
1550
+ queryParams,
1551
+ body: body,
1552
+ ...requestConfig,
1553
+ headers: {
1554
+ ...requestConfig.headers
1555
+ }
1556
+ });
1557
+ return data;
1558
+ }
1559
+ /**
1560
+ * @link /oauth/tickets/{ticket_id}
1561
+ */ async function showTicket({ pathParams, config } = {}) {
1562
+ const { client: request = client, ...requestConfig } = config ?? {};
1563
+ if (!pathParams.ticket_id) {
1564
+ throw new Error(`Missing required path parameter: ticket_id`);
1565
+ }
1566
+ const data = await request({
1567
+ method: "GET",
1568
+ url: `/oauth/tickets/${pathParams.ticket_id}`,
1569
+ ...requestConfig,
1570
+ headers: {
1571
+ ...requestConfig.headers
1572
+ }
1573
+ });
1574
+ return data;
1575
+ }
1576
+ /**
1577
+ * @link /oauth/tickets/{ticket_id}/exchange
1578
+ */ async function exchangeTicket({ pathParams, config } = {}) {
1579
+ const { client: request = client, ...requestConfig } = config ?? {};
1580
+ if (!pathParams.ticket_id) {
1581
+ throw new Error(`Missing required path parameter: ticket_id`);
1582
+ }
1583
+ const data = await request({
1584
+ method: "POST",
1585
+ url: `/oauth/tickets/${pathParams.ticket_id}/exchange`,
1586
+ ...requestConfig,
1587
+ headers: {
1588
+ ...requestConfig.headers
1589
+ }
1590
+ });
1591
+ return data;
1592
+ }
1593
+ /**
1594
+ * @link /deploy_keys
1595
+ */ async function listDeployKeys({ config } = {}) {
1596
+ const { client: request = client, ...requestConfig } = config ?? {};
1597
+ const data = await request({
1598
+ method: "GET",
1599
+ url: `/deploy_keys`,
1600
+ ...requestConfig,
1601
+ headers: {
1602
+ ...requestConfig.headers
1603
+ }
1604
+ });
1605
+ return data;
1606
+ }
1607
+ /**
1608
+ * @link /deploy_keys
1609
+ */ async function createDeployKey({ config } = {}) {
1610
+ const { client: request = client, ...requestConfig } = config ?? {};
1611
+ const data = await request({
1612
+ method: "POST",
1613
+ url: `/deploy_keys`,
1614
+ ...requestConfig,
1615
+ headers: {
1616
+ ...requestConfig.headers
1617
+ }
1618
+ });
1619
+ return data;
1620
+ }
1621
+ /**
1622
+ * @link /deploy_keys/{key_id}
1623
+ */ async function getDeployKey({ pathParams, config } = {}) {
1624
+ const { client: request = client, ...requestConfig } = config ?? {};
1625
+ if (!pathParams.key_id) {
1626
+ throw new Error(`Missing required path parameter: key_id`);
1627
+ }
1628
+ const data = await request({
1629
+ method: "GET",
1630
+ url: `/deploy_keys/${pathParams.key_id}`,
1631
+ ...requestConfig,
1632
+ headers: {
1633
+ ...requestConfig.headers
1634
+ }
1635
+ });
1636
+ return data;
1637
+ }
1638
+ /**
1639
+ * @link /deploy_keys/{key_id}
1640
+ */ async function deleteDeployKey({ pathParams, config } = {}) {
1641
+ const { client: request = client, ...requestConfig } = config ?? {};
1642
+ if (!pathParams.key_id) {
1643
+ throw new Error(`Missing required path parameter: key_id`);
1644
+ }
1645
+ const data = await request({
1646
+ method: "DELETE",
1647
+ url: `/deploy_keys/${pathParams.key_id}`,
1648
+ ...requestConfig,
1649
+ headers: {
1650
+ ...requestConfig.headers
1651
+ }
1652
+ });
1653
+ return data;
1654
+ }
1655
+ /**
1656
+ * @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.
1657
+ * @link /{account_slug}/sites
1658
+ */ async function createSiteInTeam({ pathParams, body, queryParams, config } = {}) {
1659
+ const { client: request = client, ...requestConfig } = config ?? {};
1660
+ if (!pathParams.account_slug) {
1661
+ throw new Error(`Missing required path parameter: account_slug`);
1662
+ }
1663
+ const data = await request({
1664
+ method: "POST",
1665
+ url: `/${pathParams.account_slug}/sites`,
1666
+ queryParams,
1667
+ body: body,
1668
+ ...requestConfig,
1669
+ headers: {
1670
+ ...requestConfig.headers
1671
+ }
1672
+ });
1673
+ return data;
1674
+ }
1675
+ /**
1676
+ * @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.
1677
+ * @link /{account_slug}/sites
1678
+ */ async function listSitesForAccount({ pathParams, queryParams, config } = {}) {
1679
+ const { client: request = client, ...requestConfig } = config ?? {};
1680
+ if (!pathParams.account_slug) {
1681
+ throw new Error(`Missing required path parameter: account_slug`);
1682
+ }
1683
+ const data = await request({
1684
+ method: "GET",
1685
+ url: `/${pathParams.account_slug}/sites`,
1686
+ queryParams,
1687
+ ...requestConfig,
1688
+ headers: {
1689
+ ...requestConfig.headers
1690
+ }
1691
+ });
1692
+ return data;
1693
+ }
1694
+ /**
1695
+ * @link /{account_slug}/members
1696
+ */ async function listMembersForAccount({ pathParams, config } = {}) {
1697
+ const { client: request = client, ...requestConfig } = config ?? {};
1698
+ if (!pathParams.account_slug) {
1699
+ throw new Error(`Missing required path parameter: account_slug`);
1700
+ }
1701
+ const data = await request({
1702
+ method: "GET",
1703
+ url: `/${pathParams.account_slug}/members`,
1704
+ ...requestConfig,
1705
+ headers: {
1706
+ ...requestConfig.headers
1707
+ }
1708
+ });
1709
+ return data;
1710
+ }
1711
+ /**
1712
+ * @link /{account_slug}/members
1713
+ */ async function addMemberToAccount({ pathParams, body, config } = {}) {
1714
+ const { client: request = client, ...requestConfig } = config ?? {};
1715
+ if (!pathParams.account_slug) {
1716
+ throw new Error(`Missing required path parameter: account_slug`);
1717
+ }
1718
+ const data = await request({
1719
+ method: "POST",
1720
+ url: `/${pathParams.account_slug}/members`,
1721
+ body: body,
1722
+ ...requestConfig,
1723
+ headers: {
1724
+ ...requestConfig.headers
1725
+ }
1726
+ });
1727
+ return data;
1728
+ }
1729
+ /**
1730
+ * @link /{account_slug}/members/{member_id}
1731
+ */ async function getAccountMember({ pathParams, config } = {}) {
1732
+ const { client: request = client, ...requestConfig } = config ?? {};
1733
+ if (!pathParams.account_slug) {
1734
+ throw new Error(`Missing required path parameter: account_slug`);
1735
+ }
1736
+ if (!pathParams.member_id) {
1737
+ throw new Error(`Missing required path parameter: member_id`);
1738
+ }
1739
+ const data = await request({
1740
+ method: "GET",
1741
+ url: `/${pathParams.account_slug}/members/${pathParams.member_id}`,
1742
+ ...requestConfig,
1743
+ headers: {
1744
+ ...requestConfig.headers
1745
+ }
1746
+ });
1747
+ return data;
1748
+ }
1749
+ /**
1750
+ * @link /{account_slug}/members/{member_id}
1751
+ */ async function updateAccountMember({ pathParams, body, config } = {}) {
1752
+ const { client: request = client, ...requestConfig } = config ?? {};
1753
+ if (!pathParams.account_slug) {
1754
+ throw new Error(`Missing required path parameter: account_slug`);
1755
+ }
1756
+ if (!pathParams.member_id) {
1757
+ throw new Error(`Missing required path parameter: member_id`);
1758
+ }
1759
+ const data = await request({
1760
+ method: "PUT",
1761
+ url: `/${pathParams.account_slug}/members/${pathParams.member_id}`,
1762
+ body: body,
1763
+ ...requestConfig,
1764
+ headers: {
1765
+ ...requestConfig.headers
1766
+ }
1767
+ });
1768
+ return data;
1769
+ }
1770
+ /**
1771
+ * @link /{account_slug}/members/{member_id}
1772
+ */ async function removeAccountMember({ pathParams, config } = {}) {
1773
+ const { client: request = client, ...requestConfig } = config ?? {};
1774
+ if (!pathParams.account_slug) {
1775
+ throw new Error(`Missing required path parameter: account_slug`);
1776
+ }
1777
+ if (!pathParams.member_id) {
1778
+ throw new Error(`Missing required path parameter: member_id`);
1779
+ }
1780
+ const data = await request({
1781
+ method: "DELETE",
1782
+ url: `/${pathParams.account_slug}/members/${pathParams.member_id}`,
1783
+ ...requestConfig,
1784
+ headers: {
1785
+ ...requestConfig.headers
1786
+ }
1787
+ });
1788
+ return data;
1789
+ }
1790
+ /**
1791
+ * @link /billing/payment_methods
1792
+ */ async function listPaymentMethodsForUser({ config } = {}) {
1793
+ const { client: request = client, ...requestConfig } = config ?? {};
1794
+ const data = await request({
1795
+ method: "GET",
1796
+ url: `/billing/payment_methods`,
1797
+ ...requestConfig,
1798
+ headers: {
1799
+ ...requestConfig.headers
1800
+ }
1801
+ });
1802
+ return data;
1803
+ }
1804
+ /**
1805
+ * @link /accounts/types
1806
+ */ async function listAccountTypesForUser({ config } = {}) {
1807
+ const { client: request = client, ...requestConfig } = config ?? {};
1808
+ const data = await request({
1809
+ method: "GET",
1810
+ url: `/accounts/types`,
1811
+ ...requestConfig,
1812
+ headers: {
1813
+ ...requestConfig.headers
1814
+ }
1815
+ });
1816
+ return data;
1817
+ }
1818
+ /**
1819
+ * @link /accounts
1820
+ */ async function listAccountsForUser({ queryParams, config } = {}) {
1821
+ const { client: request = client, ...requestConfig } = config ?? {};
1822
+ const data = await request({
1823
+ method: "GET",
1824
+ url: `/accounts`,
1825
+ queryParams,
1826
+ ...requestConfig,
1827
+ headers: {
1828
+ ...requestConfig.headers
1829
+ }
1830
+ });
1831
+ return data;
1832
+ }
1833
+ /**
1834
+ * @link /accounts
1835
+ */ async function createAccount({ body, config } = {}) {
1836
+ const { client: request = client, ...requestConfig } = config ?? {};
1837
+ const data = await request({
1838
+ method: "POST",
1839
+ url: `/accounts`,
1840
+ body: body,
1841
+ ...requestConfig,
1842
+ headers: {
1843
+ ...requestConfig.headers
1844
+ }
1845
+ });
1846
+ return data;
1847
+ }
1848
+ /**
1849
+ * @link /accounts/{account_id}
1850
+ */ async function getAccount({ pathParams, config } = {}) {
1851
+ const { client: request = client, ...requestConfig } = config ?? {};
1852
+ if (!pathParams.account_id) {
1853
+ throw new Error(`Missing required path parameter: account_id`);
1854
+ }
1855
+ const data = await request({
1856
+ method: "GET",
1857
+ url: `/accounts/${pathParams.account_id}`,
1858
+ ...requestConfig,
1859
+ headers: {
1860
+ ...requestConfig.headers
1861
+ }
1862
+ });
1863
+ return data;
1864
+ }
1865
+ /**
1866
+ * @link /accounts/{account_id}
1867
+ */ async function updateAccount({ pathParams, body, config } = {}) {
1868
+ const { client: request = client, ...requestConfig } = config ?? {};
1869
+ if (!pathParams.account_id) {
1870
+ throw new Error(`Missing required path parameter: account_id`);
1871
+ }
1872
+ const data = await request({
1873
+ method: "PUT",
1874
+ url: `/accounts/${pathParams.account_id}`,
1875
+ body: body,
1876
+ ...requestConfig,
1877
+ headers: {
1878
+ ...requestConfig.headers
1879
+ }
1880
+ });
1881
+ return data;
1882
+ }
1883
+ /**
1884
+ * @link /accounts/{account_id}
1885
+ */ async function cancelAccount({ pathParams, config } = {}) {
1886
+ const { client: request = client, ...requestConfig } = config ?? {};
1887
+ if (!pathParams.account_id) {
1888
+ throw new Error(`Missing required path parameter: account_id`);
1889
+ }
1890
+ const data = await request({
1891
+ method: "DELETE",
1892
+ url: `/accounts/${pathParams.account_id}`,
1893
+ ...requestConfig,
1894
+ headers: {
1895
+ ...requestConfig.headers
1896
+ }
1897
+ });
1898
+ return data;
1899
+ }
1900
+ /**
1901
+ * @link /accounts/{account_id}/audit
1902
+ */ async function listAccountAuditEvents({ pathParams, queryParams, config } = {}) {
1903
+ const { client: request = client, ...requestConfig } = config ?? {};
1904
+ if (!pathParams.account_id) {
1905
+ throw new Error(`Missing required path parameter: account_id`);
1906
+ }
1907
+ const data = await request({
1908
+ method: "GET",
1909
+ url: `/accounts/${pathParams.account_id}/audit`,
1910
+ queryParams,
1911
+ ...requestConfig,
1912
+ headers: {
1913
+ ...requestConfig.headers
1914
+ }
1915
+ });
1916
+ return data;
1917
+ }
1918
+ /**
1919
+ * @link /agent_runners
1920
+ */ async function listAgentRunners({ queryParams, config } = {}) {
1921
+ const { client: request = client, ...requestConfig } = config ?? {};
1922
+ const data = await request({
1923
+ method: "GET",
1924
+ url: `/agent_runners`,
1925
+ queryParams,
1926
+ ...requestConfig,
1927
+ headers: {
1928
+ ...requestConfig.headers
1929
+ }
1930
+ });
1931
+ return data;
1932
+ }
1933
+ /**
1934
+ * @link /agent_runners
1935
+ */ async function createAgentRunner({ queryParams, config } = {}) {
1936
+ const { client: request = client, ...requestConfig } = config ?? {};
1937
+ const data = await request({
1938
+ method: "POST",
1939
+ url: `/agent_runners`,
1940
+ queryParams,
1941
+ ...requestConfig,
1942
+ headers: {
1943
+ ...requestConfig.headers
1944
+ }
1945
+ });
1946
+ return data;
1947
+ }
1948
+ /**
1949
+ * @link /agent_runners/upload_url
1950
+ */ async function createAgentRunnerUploadUrl({ queryParams, config } = {}) {
1951
+ const { client: request = client, ...requestConfig } = config ?? {};
1952
+ const data = await request({
1953
+ method: "POST",
1954
+ url: `/agent_runners/upload_url`,
1955
+ queryParams,
1956
+ ...requestConfig,
1957
+ headers: {
1958
+ ...requestConfig.headers
1959
+ }
1960
+ });
1961
+ return data;
1962
+ }
1963
+ /**
1964
+ * @link /agent_runners/{agent_runner_id}
1965
+ */ async function getAgentRunner({ pathParams, config } = {}) {
1966
+ const { client: request = client, ...requestConfig } = config ?? {};
1967
+ if (!pathParams.agent_runner_id) {
1968
+ throw new Error(`Missing required path parameter: agent_runner_id`);
1969
+ }
1970
+ const data = await request({
1971
+ method: "GET",
1972
+ url: `/agent_runners/${pathParams.agent_runner_id}`,
1973
+ ...requestConfig,
1974
+ headers: {
1975
+ ...requestConfig.headers
1976
+ }
1977
+ });
1978
+ return data;
1979
+ }
1980
+ /**
1981
+ * @link /agent_runners/{agent_runner_id}
1982
+ */ async function updateAgentRunner({ pathParams, config } = {}) {
1983
+ const { client: request = client, ...requestConfig } = config ?? {};
1984
+ if (!pathParams.agent_runner_id) {
1985
+ throw new Error(`Missing required path parameter: agent_runner_id`);
1986
+ }
1987
+ const data = await request({
1988
+ method: "PATCH",
1989
+ url: `/agent_runners/${pathParams.agent_runner_id}`,
1990
+ ...requestConfig,
1991
+ headers: {
1992
+ ...requestConfig.headers
1993
+ }
1994
+ });
1995
+ return data;
1996
+ }
1997
+ /**
1998
+ * @link /agent_runners/{agent_runner_id}
1999
+ */ async function deleteAgentRunner({ pathParams, config } = {}) {
2000
+ const { client: request = client, ...requestConfig } = config ?? {};
2001
+ if (!pathParams.agent_runner_id) {
2002
+ throw new Error(`Missing required path parameter: agent_runner_id`);
2003
+ }
2004
+ const data = await request({
2005
+ method: "DELETE",
2006
+ url: `/agent_runners/${pathParams.agent_runner_id}`,
2007
+ ...requestConfig,
2008
+ headers: {
2009
+ ...requestConfig.headers
2010
+ }
2011
+ });
2012
+ return data;
2013
+ }
2014
+ /**
2015
+ * @link /agent_runners/{agent_runner_id}/archive
2016
+ */ async function archiveAgentRunner({ pathParams, config } = {}) {
2017
+ const { client: request = client, ...requestConfig } = config ?? {};
2018
+ if (!pathParams.agent_runner_id) {
2019
+ throw new Error(`Missing required path parameter: agent_runner_id`);
2020
+ }
2021
+ const data = await request({
2022
+ method: "POST",
2023
+ url: `/agent_runners/${pathParams.agent_runner_id}/archive`,
2024
+ ...requestConfig,
2025
+ headers: {
2026
+ ...requestConfig.headers
2027
+ }
2028
+ });
2029
+ return data;
2030
+ }
2031
+ /**
2032
+ * @link /agent_runners/{agent_runner_id}/pull_request
2033
+ */ async function agentRunnerPullRequest({ pathParams, config } = {}) {
2034
+ const { client: request = client, ...requestConfig } = config ?? {};
2035
+ if (!pathParams.agent_runner_id) {
2036
+ throw new Error(`Missing required path parameter: agent_runner_id`);
2037
+ }
2038
+ const data = await request({
2039
+ method: "POST",
2040
+ url: `/agent_runners/${pathParams.agent_runner_id}/pull_request`,
2041
+ ...requestConfig,
2042
+ headers: {
2043
+ ...requestConfig.headers
2044
+ }
2045
+ });
2046
+ return data;
2047
+ }
2048
+ /**
2049
+ * @link /agent_runners/{agent_runner_id}/commit
2050
+ */ async function agentRunnerCommitToBranch({ pathParams, queryParams, config } = {}) {
2051
+ const { client: request = client, ...requestConfig } = config ?? {};
2052
+ if (!pathParams.agent_runner_id) {
2053
+ throw new Error(`Missing required path parameter: agent_runner_id`);
2054
+ }
2055
+ const data = await request({
2056
+ method: "POST",
2057
+ url: `/agent_runners/${pathParams.agent_runner_id}/commit`,
2058
+ queryParams,
2059
+ ...requestConfig,
2060
+ headers: {
2061
+ ...requestConfig.headers
2062
+ }
2063
+ });
2064
+ return data;
2065
+ }
2066
+ /**
2067
+ * @link /agent_runners/{agent_runner_id}/sessions
2068
+ */ async function listAgentRunnerSessions({ pathParams, queryParams, config } = {}) {
2069
+ const { client: request = client, ...requestConfig } = config ?? {};
2070
+ if (!pathParams.agent_runner_id) {
2071
+ throw new Error(`Missing required path parameter: agent_runner_id`);
2072
+ }
2073
+ const data = await request({
2074
+ method: "GET",
2075
+ url: `/agent_runners/${pathParams.agent_runner_id}/sessions`,
2076
+ queryParams,
2077
+ ...requestConfig,
2078
+ headers: {
2079
+ ...requestConfig.headers
2080
+ }
2081
+ });
2082
+ return data;
2083
+ }
2084
+ /**
2085
+ * @link /agent_runners/{agent_runner_id}/sessions
2086
+ */ async function createAgentRunnerSession({ pathParams, queryParams, config } = {}) {
2087
+ const { client: request = client, ...requestConfig } = config ?? {};
2088
+ if (!pathParams.agent_runner_id) {
2089
+ throw new Error(`Missing required path parameter: agent_runner_id`);
2090
+ }
2091
+ const data = await request({
2092
+ method: "POST",
2093
+ url: `/agent_runners/${pathParams.agent_runner_id}/sessions`,
2094
+ queryParams,
2095
+ ...requestConfig,
2096
+ headers: {
2097
+ ...requestConfig.headers
2098
+ }
2099
+ });
2100
+ return data;
2101
+ }
2102
+ /**
2103
+ * @link /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}
2104
+ */ async function getAgentRunnerSession({ pathParams, config } = {}) {
2105
+ const { client: request = client, ...requestConfig } = config ?? {};
2106
+ if (!pathParams.agent_runner_id) {
2107
+ throw new Error(`Missing required path parameter: agent_runner_id`);
2108
+ }
2109
+ if (!pathParams.agent_runner_session_id) {
2110
+ throw new Error(`Missing required path parameter: agent_runner_session_id`);
2111
+ }
2112
+ const data = await request({
2113
+ method: "GET",
2114
+ url: `/agent_runners/${pathParams.agent_runner_id}/sessions/${pathParams.agent_runner_session_id}`,
2115
+ ...requestConfig,
2116
+ headers: {
2117
+ ...requestConfig.headers
2118
+ }
2119
+ });
2120
+ return data;
2121
+ }
2122
+ /**
2123
+ * @link /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}
2124
+ */ async function updateAgentRunnerSession({ pathParams, queryParams, config } = {}) {
2125
+ const { client: request = client, ...requestConfig } = config ?? {};
2126
+ if (!pathParams.agent_runner_id) {
2127
+ throw new Error(`Missing required path parameter: agent_runner_id`);
2128
+ }
2129
+ if (!pathParams.agent_runner_session_id) {
2130
+ throw new Error(`Missing required path parameter: agent_runner_session_id`);
2131
+ }
2132
+ const data = await request({
2133
+ method: "PATCH",
2134
+ url: `/agent_runners/${pathParams.agent_runner_id}/sessions/${pathParams.agent_runner_session_id}`,
2135
+ queryParams,
2136
+ ...requestConfig,
2137
+ headers: {
2138
+ ...requestConfig.headers
2139
+ }
2140
+ });
2141
+ return data;
2142
+ }
2143
+ /**
2144
+ * @link /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}
2145
+ */ async function deleteAgentRunnerSession({ pathParams, config } = {}) {
2146
+ const { client: request = client, ...requestConfig } = config ?? {};
2147
+ if (!pathParams.agent_runner_id) {
2148
+ throw new Error(`Missing required path parameter: agent_runner_id`);
2149
+ }
2150
+ if (!pathParams.agent_runner_session_id) {
2151
+ throw new Error(`Missing required path parameter: agent_runner_session_id`);
2152
+ }
2153
+ const data = await request({
2154
+ method: "DELETE",
2155
+ url: `/agent_runners/${pathParams.agent_runner_id}/sessions/${pathParams.agent_runner_session_id}`,
2156
+ ...requestConfig,
2157
+ headers: {
2158
+ ...requestConfig.headers
2159
+ }
2160
+ });
2161
+ return data;
2162
+ }
2163
+ /**
2164
+ * @link /submissions/{submission_id}
2165
+ */ async function listFormSubmission({ pathParams, queryParams, config } = {}) {
2166
+ const { client: request = client, ...requestConfig } = config ?? {};
2167
+ if (!pathParams.submission_id) {
2168
+ throw new Error(`Missing required path parameter: submission_id`);
2169
+ }
2170
+ const data = await request({
2171
+ method: "GET",
2172
+ url: `/submissions/${pathParams.submission_id}`,
2173
+ queryParams,
2174
+ ...requestConfig,
2175
+ headers: {
2176
+ ...requestConfig.headers
2177
+ }
2178
+ });
2179
+ return data;
2180
+ }
2181
+ /**
2182
+ * @link /submissions/{submission_id}
2183
+ */ async function deleteSubmission({ pathParams, config } = {}) {
2184
+ const { client: request = client, ...requestConfig } = config ?? {};
2185
+ if (!pathParams.submission_id) {
2186
+ throw new Error(`Missing required path parameter: submission_id`);
2187
+ }
2188
+ const data = await request({
2189
+ method: "DELETE",
2190
+ url: `/submissions/${pathParams.submission_id}`,
2191
+ ...requestConfig,
2192
+ headers: {
2193
+ ...requestConfig.headers
2194
+ }
2195
+ });
2196
+ return data;
2197
+ }
2198
+ /**
2199
+ * @link /sites/{site_id}/service-instances
2200
+ */ async function listServiceInstancesForSite({ pathParams, config } = {}) {
2201
+ const { client: request = client, ...requestConfig } = config ?? {};
2202
+ if (!pathParams.site_id) {
2203
+ throw new Error(`Missing required path parameter: site_id`);
2204
+ }
2205
+ const data = await request({
2206
+ method: "GET",
2207
+ url: `/sites/${pathParams.site_id}/service-instances`,
2208
+ ...requestConfig,
2209
+ headers: {
2210
+ ...requestConfig.headers
2211
+ }
2212
+ });
2213
+ return data;
2214
+ }
2215
+ /**
2216
+ * @link /sites/{site_id}/services/{addon}/instances
2217
+ */ async function createServiceInstance({ pathParams, body, config } = {}) {
2218
+ const { client: request = client, ...requestConfig } = config ?? {};
2219
+ if (!pathParams.site_id) {
2220
+ throw new Error(`Missing required path parameter: site_id`);
2221
+ }
2222
+ if (!pathParams.addon) {
2223
+ throw new Error(`Missing required path parameter: addon`);
2224
+ }
2225
+ const data = await request({
2226
+ method: "POST",
2227
+ url: `/sites/${pathParams.site_id}/services/${pathParams.addon}/instances`,
2228
+ body: body,
2229
+ ...requestConfig,
2230
+ headers: {
2231
+ ...requestConfig.headers
2232
+ }
2233
+ });
2234
+ return data;
2235
+ }
2236
+ /**
2237
+ * @link /sites/{site_id}/services/{addon}/instances/{instance_id}
2238
+ */ async function showServiceInstance({ pathParams, config } = {}) {
2239
+ const { client: request = client, ...requestConfig } = config ?? {};
2240
+ if (!pathParams.site_id) {
2241
+ throw new Error(`Missing required path parameter: site_id`);
2242
+ }
2243
+ if (!pathParams.addon) {
2244
+ throw new Error(`Missing required path parameter: addon`);
2245
+ }
2246
+ if (!pathParams.instance_id) {
2247
+ throw new Error(`Missing required path parameter: instance_id`);
2248
+ }
2249
+ const data = await request({
2250
+ method: "GET",
2251
+ url: `/sites/${pathParams.site_id}/services/${pathParams.addon}/instances/${pathParams.instance_id}`,
2252
+ ...requestConfig,
2253
+ headers: {
2254
+ ...requestConfig.headers
2255
+ }
2256
+ });
2257
+ return data;
2258
+ }
2259
+ /**
2260
+ * @link /sites/{site_id}/services/{addon}/instances/{instance_id}
2261
+ */ async function updateServiceInstance({ pathParams, body, config } = {}) {
2262
+ const { client: request = client, ...requestConfig } = config ?? {};
2263
+ if (!pathParams.site_id) {
2264
+ throw new Error(`Missing required path parameter: site_id`);
2265
+ }
2266
+ if (!pathParams.addon) {
2267
+ throw new Error(`Missing required path parameter: addon`);
2268
+ }
2269
+ if (!pathParams.instance_id) {
2270
+ throw new Error(`Missing required path parameter: instance_id`);
2271
+ }
2272
+ const data = await request({
2273
+ method: "PUT",
2274
+ url: `/sites/${pathParams.site_id}/services/${pathParams.addon}/instances/${pathParams.instance_id}`,
2275
+ body: body,
2276
+ ...requestConfig,
2277
+ headers: {
2278
+ ...requestConfig.headers
2279
+ }
2280
+ });
2281
+ return data;
2282
+ }
2283
+ /**
2284
+ * @link /sites/{site_id}/services/{addon}/instances/{instance_id}
2285
+ */ async function deleteServiceInstance({ pathParams, config } = {}) {
2286
+ const { client: request = client, ...requestConfig } = config ?? {};
2287
+ if (!pathParams.site_id) {
2288
+ throw new Error(`Missing required path parameter: site_id`);
2289
+ }
2290
+ if (!pathParams.addon) {
2291
+ throw new Error(`Missing required path parameter: addon`);
2292
+ }
2293
+ if (!pathParams.instance_id) {
2294
+ throw new Error(`Missing required path parameter: instance_id`);
2295
+ }
2296
+ const data = await request({
2297
+ method: "DELETE",
2298
+ url: `/sites/${pathParams.site_id}/services/${pathParams.addon}/instances/${pathParams.instance_id}`,
2299
+ ...requestConfig,
2300
+ headers: {
2301
+ ...requestConfig.headers
2302
+ }
2303
+ });
2304
+ return data;
2305
+ }
2306
+ /**
2307
+ * @link /services/
2308
+ */ async function getServices({ queryParams, config } = {}) {
2309
+ const { client: request = client, ...requestConfig } = config ?? {};
2310
+ const data = await request({
2311
+ method: "GET",
2312
+ url: `/services/`,
2313
+ queryParams,
2314
+ ...requestConfig,
2315
+ headers: {
2316
+ ...requestConfig.headers
2317
+ }
2318
+ });
2319
+ return data;
2320
+ }
2321
+ /**
2322
+ * @link /services/{addonName}
2323
+ */ async function showService({ pathParams, config } = {}) {
2324
+ const { client: request = client, ...requestConfig } = config ?? {};
2325
+ if (!pathParams.addonName) {
2326
+ throw new Error(`Missing required path parameter: addonName`);
2327
+ }
2328
+ const data = await request({
2329
+ method: "GET",
2330
+ url: `/services/${pathParams.addonName}`,
2331
+ ...requestConfig,
2332
+ headers: {
2333
+ ...requestConfig.headers
2334
+ }
2335
+ });
2336
+ return data;
2337
+ }
2338
+ /**
2339
+ * @link /services/{addonName}/manifest
2340
+ */ async function showServiceManifest({ pathParams, config } = {}) {
2341
+ const { client: request = client, ...requestConfig } = config ?? {};
2342
+ if (!pathParams.addonName) {
2343
+ throw new Error(`Missing required path parameter: addonName`);
2344
+ }
2345
+ const data = await request({
2346
+ method: "GET",
2347
+ url: `/services/${pathParams.addonName}/manifest`,
2348
+ ...requestConfig,
2349
+ headers: {
2350
+ ...requestConfig.headers
2351
+ }
2352
+ });
2353
+ return data;
2354
+ }
2355
+ /**
2356
+ * @link /user
2357
+ */ async function getCurrentUser({ config } = {}) {
2358
+ const { client: request = client, ...requestConfig } = config ?? {};
2359
+ const data = await request({
2360
+ method: "GET",
2361
+ url: `/user`,
2362
+ ...requestConfig,
2363
+ headers: {
2364
+ ...requestConfig.headers
2365
+ }
2366
+ });
2367
+ return data;
2368
+ }
2369
+ /**
2370
+ * @link /sites/{site_id}/traffic_splits
2371
+ */ async function createSplitTest({ pathParams, body, config } = {}) {
2372
+ const { client: request = client, ...requestConfig } = config ?? {};
2373
+ if (!pathParams.site_id) {
2374
+ throw new Error(`Missing required path parameter: site_id`);
2375
+ }
2376
+ const data = await request({
2377
+ method: "POST",
2378
+ url: `/sites/${pathParams.site_id}/traffic_splits`,
2379
+ body: body,
2380
+ ...requestConfig,
2381
+ headers: {
2382
+ ...requestConfig.headers
2383
+ }
2384
+ });
2385
+ return data;
2386
+ }
2387
+ /**
2388
+ * @link /sites/{site_id}/traffic_splits
2389
+ */ async function getSplitTests({ pathParams, config } = {}) {
2390
+ const { client: request = client, ...requestConfig } = config ?? {};
2391
+ if (!pathParams.site_id) {
2392
+ throw new Error(`Missing required path parameter: site_id`);
2393
+ }
2394
+ const data = await request({
2395
+ method: "GET",
2396
+ url: `/sites/${pathParams.site_id}/traffic_splits`,
2397
+ ...requestConfig,
2398
+ headers: {
2399
+ ...requestConfig.headers
2400
+ }
2401
+ });
2402
+ return data;
2403
+ }
2404
+ /**
2405
+ * @link /sites/{site_id}/traffic_splits/{split_test_id}
2406
+ */ async function updateSplitTest({ pathParams, body, config } = {}) {
2407
+ const { client: request = client, ...requestConfig } = config ?? {};
2408
+ if (!pathParams.site_id) {
2409
+ throw new Error(`Missing required path parameter: site_id`);
2410
+ }
2411
+ if (!pathParams.split_test_id) {
2412
+ throw new Error(`Missing required path parameter: split_test_id`);
2413
+ }
2414
+ const data = await request({
2415
+ method: "PUT",
2416
+ url: `/sites/${pathParams.site_id}/traffic_splits/${pathParams.split_test_id}`,
2417
+ body: body,
2418
+ ...requestConfig,
2419
+ headers: {
2420
+ ...requestConfig.headers
2421
+ }
2422
+ });
2423
+ return data;
2424
+ }
2425
+ /**
2426
+ * @link /sites/{site_id}/traffic_splits/{split_test_id}
2427
+ */ async function getSplitTest({ pathParams, config } = {}) {
2428
+ const { client: request = client, ...requestConfig } = config ?? {};
2429
+ if (!pathParams.site_id) {
2430
+ throw new Error(`Missing required path parameter: site_id`);
2431
+ }
2432
+ if (!pathParams.split_test_id) {
2433
+ throw new Error(`Missing required path parameter: split_test_id`);
2434
+ }
2435
+ const data = await request({
2436
+ method: "GET",
2437
+ url: `/sites/${pathParams.site_id}/traffic_splits/${pathParams.split_test_id}`,
2438
+ ...requestConfig,
2439
+ headers: {
2440
+ ...requestConfig.headers
2441
+ }
2442
+ });
2443
+ return data;
2444
+ }
2445
+ /**
2446
+ * @link /sites/{site_id}/traffic_splits/{split_test_id}/publish
2447
+ */ async function enableSplitTest({ pathParams, config } = {}) {
2448
+ const { client: request = client, ...requestConfig } = config ?? {};
2449
+ if (!pathParams.site_id) {
2450
+ throw new Error(`Missing required path parameter: site_id`);
2451
+ }
2452
+ if (!pathParams.split_test_id) {
2453
+ throw new Error(`Missing required path parameter: split_test_id`);
2454
+ }
2455
+ const data = await request({
2456
+ method: "POST",
2457
+ url: `/sites/${pathParams.site_id}/traffic_splits/${pathParams.split_test_id}/publish`,
2458
+ ...requestConfig,
2459
+ headers: {
2460
+ ...requestConfig.headers
2461
+ }
2462
+ });
2463
+ return data;
2464
+ }
2465
+ /**
2466
+ * @link /sites/{site_id}/traffic_splits/{split_test_id}/unpublish
2467
+ */ async function disableSplitTest({ pathParams, config } = {}) {
2468
+ const { client: request = client, ...requestConfig } = config ?? {};
2469
+ if (!pathParams.site_id) {
2470
+ throw new Error(`Missing required path parameter: site_id`);
2471
+ }
2472
+ if (!pathParams.split_test_id) {
2473
+ throw new Error(`Missing required path parameter: split_test_id`);
2474
+ }
2475
+ const data = await request({
2476
+ method: "POST",
2477
+ url: `/sites/${pathParams.site_id}/traffic_splits/${pathParams.split_test_id}/unpublish`,
2478
+ ...requestConfig,
2479
+ headers: {
2480
+ ...requestConfig.headers
2481
+ }
2482
+ });
2483
+ return data;
2484
+ }
2485
+ /**
2486
+ * @link /dns_zones
2487
+ */ async function createDnsZone({ body, config } = {}) {
2488
+ const { client: request = client, ...requestConfig } = config ?? {};
2489
+ const data = await request({
2490
+ method: "POST",
2491
+ url: `/dns_zones`,
2492
+ body: body,
2493
+ ...requestConfig,
2494
+ headers: {
2495
+ ...requestConfig.headers
2496
+ }
2497
+ });
2498
+ return data;
2499
+ }
2500
+ /**
2501
+ * @link /dns_zones
2502
+ */ async function getDnsZones({ queryParams, config } = {}) {
2503
+ const { client: request = client, ...requestConfig } = config ?? {};
2504
+ const data = await request({
2505
+ method: "GET",
2506
+ url: `/dns_zones`,
2507
+ queryParams,
2508
+ ...requestConfig,
2509
+ headers: {
2510
+ ...requestConfig.headers
2511
+ }
2512
+ });
2513
+ return data;
2514
+ }
2515
+ /**
2516
+ * @link /dns_zones/{zone_id}
2517
+ */ async function getDnsZone({ pathParams, config } = {}) {
2518
+ const { client: request = client, ...requestConfig } = config ?? {};
2519
+ if (!pathParams.zone_id) {
2520
+ throw new Error(`Missing required path parameter: zone_id`);
2521
+ }
2522
+ const data = await request({
2523
+ method: "GET",
2524
+ url: `/dns_zones/${pathParams.zone_id}`,
2525
+ ...requestConfig,
2526
+ headers: {
2527
+ ...requestConfig.headers
2528
+ }
2529
+ });
2530
+ return data;
2531
+ }
2532
+ /**
2533
+ * @link /dns_zones/{zone_id}
2534
+ */ async function deleteDnsZone({ pathParams, config } = {}) {
2535
+ const { client: request = client, ...requestConfig } = config ?? {};
2536
+ if (!pathParams.zone_id) {
2537
+ throw new Error(`Missing required path parameter: zone_id`);
2538
+ }
2539
+ const data = await request({
2540
+ method: "DELETE",
2541
+ url: `/dns_zones/${pathParams.zone_id}`,
2542
+ ...requestConfig,
2543
+ headers: {
2544
+ ...requestConfig.headers
2545
+ }
2546
+ });
2547
+ return data;
2548
+ }
2549
+ /**
2550
+ * @link /dns_zones/{zone_id}/transfer
2551
+ */ async function transferDnsZone({ pathParams, queryParams, config } = {}) {
2552
+ const { client: request = client, ...requestConfig } = config ?? {};
2553
+ if (!pathParams.zone_id) {
2554
+ throw new Error(`Missing required path parameter: zone_id`);
2555
+ }
2556
+ const data = await request({
2557
+ method: "PUT",
2558
+ url: `/dns_zones/${pathParams.zone_id}/transfer`,
2559
+ queryParams,
2560
+ ...requestConfig,
2561
+ headers: {
2562
+ ...requestConfig.headers
2563
+ }
2564
+ });
2565
+ return data;
2566
+ }
2567
+ /**
2568
+ * @link /dns_zones/{zone_id}/dns_records
2569
+ */ async function getDnsRecords({ pathParams, config } = {}) {
2570
+ const { client: request = client, ...requestConfig } = config ?? {};
2571
+ if (!pathParams.zone_id) {
2572
+ throw new Error(`Missing required path parameter: zone_id`);
2573
+ }
2574
+ const data = await request({
2575
+ method: "GET",
2576
+ url: `/dns_zones/${pathParams.zone_id}/dns_records`,
2577
+ ...requestConfig,
2578
+ headers: {
2579
+ ...requestConfig.headers
2580
+ }
2581
+ });
2582
+ return data;
2583
+ }
2584
+ /**
2585
+ * @link /dns_zones/{zone_id}/dns_records
2586
+ */ async function createDnsRecord({ pathParams, body, config } = {}) {
2587
+ const { client: request = client, ...requestConfig } = config ?? {};
2588
+ if (!pathParams.zone_id) {
2589
+ throw new Error(`Missing required path parameter: zone_id`);
2590
+ }
2591
+ const data = await request({
2592
+ method: "POST",
2593
+ url: `/dns_zones/${pathParams.zone_id}/dns_records`,
2594
+ body: body,
2595
+ ...requestConfig,
2596
+ headers: {
2597
+ ...requestConfig.headers
2598
+ }
2599
+ });
2600
+ return data;
2601
+ }
2602
+ /**
2603
+ * @link /dns_zones/{zone_id}/dns_records/{dns_record_id}
2604
+ */ async function getIndividualDnsRecord({ pathParams, config } = {}) {
2605
+ const { client: request = client, ...requestConfig } = config ?? {};
2606
+ if (!pathParams.zone_id) {
2607
+ throw new Error(`Missing required path parameter: zone_id`);
2608
+ }
2609
+ if (!pathParams.dns_record_id) {
2610
+ throw new Error(`Missing required path parameter: dns_record_id`);
2611
+ }
2612
+ const data = await request({
2613
+ method: "GET",
2614
+ url: `/dns_zones/${pathParams.zone_id}/dns_records/${pathParams.dns_record_id}`,
2615
+ ...requestConfig,
2616
+ headers: {
2617
+ ...requestConfig.headers
2618
+ }
2619
+ });
2620
+ return data;
2621
+ }
2622
+ /**
2623
+ * @link /dns_zones/{zone_id}/dns_records/{dns_record_id}
2624
+ */ async function deleteDnsRecord({ pathParams, config } = {}) {
2625
+ const { client: request = client, ...requestConfig } = config ?? {};
2626
+ if (!pathParams.zone_id) {
2627
+ throw new Error(`Missing required path parameter: zone_id`);
2628
+ }
2629
+ if (!pathParams.dns_record_id) {
2630
+ throw new Error(`Missing required path parameter: dns_record_id`);
2631
+ }
2632
+ const data = await request({
2633
+ method: "DELETE",
2634
+ url: `/dns_zones/${pathParams.zone_id}/dns_records/${pathParams.dns_record_id}`,
2635
+ ...requestConfig,
2636
+ headers: {
2637
+ ...requestConfig.headers
2638
+ }
2639
+ });
2640
+ return data;
2641
+ }
2642
+ /**
2643
+ * @link /sites/{site_id}/dev_servers
2644
+ */ async function listSiteDevServers({ pathParams, queryParams, config } = {}) {
2645
+ const { client: request = client, ...requestConfig } = config ?? {};
2646
+ if (!pathParams.site_id) {
2647
+ throw new Error(`Missing required path parameter: site_id`);
2648
+ }
2649
+ const data = await request({
2650
+ method: "GET",
2651
+ url: `/sites/${pathParams.site_id}/dev_servers`,
2652
+ queryParams,
2653
+ ...requestConfig,
2654
+ headers: {
2655
+ ...requestConfig.headers
2656
+ }
2657
+ });
2658
+ return data;
2659
+ }
2660
+ /**
2661
+ * @link /sites/{site_id}/dev_servers
2662
+ */ async function createSiteDevServer({ pathParams, queryParams, config } = {}) {
2663
+ const { client: request = client, ...requestConfig } = config ?? {};
2664
+ if (!pathParams.site_id) {
2665
+ throw new Error(`Missing required path parameter: site_id`);
2666
+ }
2667
+ const data = await request({
2668
+ method: "POST",
2669
+ url: `/sites/${pathParams.site_id}/dev_servers`,
2670
+ queryParams,
2671
+ ...requestConfig,
2672
+ headers: {
2673
+ ...requestConfig.headers
2674
+ }
2675
+ });
2676
+ return data;
2677
+ }
2678
+ /**
2679
+ * @link /sites/{site_id}/dev_servers
2680
+ */ async function deleteSiteDevServers({ pathParams, queryParams, config } = {}) {
2681
+ const { client: request = client, ...requestConfig } = config ?? {};
2682
+ if (!pathParams.site_id) {
2683
+ throw new Error(`Missing required path parameter: site_id`);
2684
+ }
2685
+ const data = await request({
2686
+ method: "DELETE",
2687
+ url: `/sites/${pathParams.site_id}/dev_servers`,
2688
+ queryParams,
2689
+ ...requestConfig,
2690
+ headers: {
2691
+ ...requestConfig.headers
2692
+ }
2693
+ });
2694
+ return data;
2695
+ }
2696
+ /**
2697
+ * @link /sites/{site_id}/dev_servers/{dev_server_id}
2698
+ */ async function getSiteDevServer({ pathParams, config } = {}) {
2699
+ const { client: request = client, ...requestConfig } = config ?? {};
2700
+ if (!pathParams.site_id) {
2701
+ throw new Error(`Missing required path parameter: site_id`);
2702
+ }
2703
+ if (!pathParams.dev_server_id) {
2704
+ throw new Error(`Missing required path parameter: dev_server_id`);
2705
+ }
2706
+ const data = await request({
2707
+ method: "GET",
2708
+ url: `/sites/${pathParams.site_id}/dev_servers/${pathParams.dev_server_id}`,
2709
+ ...requestConfig,
2710
+ headers: {
2711
+ ...requestConfig.headers
2712
+ }
2713
+ });
2714
+ return data;
2715
+ }
2716
+ /**
2717
+ * @link /sites/{site_id}/dev_servers/{dev_server_id}/activity
2718
+ */ async function markDevServerActivity({ pathParams, config } = {}) {
2719
+ const { client: request = client, ...requestConfig } = config ?? {};
2720
+ if (!pathParams.site_id) {
2721
+ throw new Error(`Missing required path parameter: site_id`);
2722
+ }
2723
+ if (!pathParams.dev_server_id) {
2724
+ throw new Error(`Missing required path parameter: dev_server_id`);
2725
+ }
2726
+ const data = await request({
2727
+ method: "POST",
2728
+ url: `/sites/${pathParams.site_id}/dev_servers/${pathParams.dev_server_id}/activity`,
2729
+ ...requestConfig,
2730
+ headers: {
2731
+ ...requestConfig.headers
2732
+ }
2733
+ });
2734
+ return data;
2735
+ }
2736
+ /**
2737
+ * @link /sites/{site_id}/dev_servers/{dev_server_id}/state
2738
+ */ async function updateDevServerState({ pathParams, body, config } = {}) {
2739
+ const { client: request = client, ...requestConfig } = config ?? {};
2740
+ if (!pathParams.site_id) {
2741
+ throw new Error(`Missing required path parameter: site_id`);
2742
+ }
2743
+ if (!pathParams.dev_server_id) {
2744
+ throw new Error(`Missing required path parameter: dev_server_id`);
2745
+ }
2746
+ const data = await request({
2747
+ method: "POST",
2748
+ url: `/sites/${pathParams.site_id}/dev_servers/${pathParams.dev_server_id}/state`,
2749
+ body: body,
2750
+ ...requestConfig,
2751
+ headers: {
2752
+ ...requestConfig.headers
2753
+ }
2754
+ });
2755
+ return data;
2756
+ }
2757
+ /**
2758
+ * @link /sites/{site_id}/dev_server_hooks
2759
+ */ async function listSiteDevServerHooks({ pathParams, config } = {}) {
2760
+ const { client: request = client, ...requestConfig } = config ?? {};
2761
+ if (!pathParams.site_id) {
2762
+ throw new Error(`Missing required path parameter: site_id`);
2763
+ }
2764
+ const data = await request({
2765
+ method: "GET",
2766
+ url: `/sites/${pathParams.site_id}/dev_server_hooks`,
2767
+ ...requestConfig,
2768
+ headers: {
2769
+ ...requestConfig.headers
2770
+ }
2771
+ });
2772
+ return data;
2773
+ }
2774
+ /**
2775
+ * @link /sites/{site_id}/dev_server_hooks
2776
+ */ async function createSiteDevServerHook({ pathParams, body, config } = {}) {
2777
+ const { client: request = client, ...requestConfig } = config ?? {};
2778
+ if (!pathParams.site_id) {
2779
+ throw new Error(`Missing required path parameter: site_id`);
2780
+ }
2781
+ const data = await request({
2782
+ method: "POST",
2783
+ url: `/sites/${pathParams.site_id}/dev_server_hooks`,
2784
+ body: body,
2785
+ ...requestConfig,
2786
+ headers: {
2787
+ ...requestConfig.headers
2788
+ }
2789
+ });
2790
+ return data;
2791
+ }
2792
+ /**
2793
+ * @link /sites/{site_id}/dev_server_hooks/{id}
2794
+ */ async function getSiteDevServerHook({ pathParams, config } = {}) {
2795
+ const { client: request = client, ...requestConfig } = config ?? {};
2796
+ if (!pathParams.site_id) {
2797
+ throw new Error(`Missing required path parameter: site_id`);
2798
+ }
2799
+ if (!pathParams.id) {
2800
+ throw new Error(`Missing required path parameter: id`);
2801
+ }
2802
+ const data = await request({
2803
+ method: "GET",
2804
+ url: `/sites/${pathParams.site_id}/dev_server_hooks/${pathParams.id}`,
2805
+ ...requestConfig,
2806
+ headers: {
2807
+ ...requestConfig.headers
2808
+ }
2809
+ });
2810
+ return data;
2811
+ }
2812
+ /**
2813
+ * @link /sites/{site_id}/dev_server_hooks/{id}
2814
+ */ async function updateSiteDevServerHook({ pathParams, body, config } = {}) {
2815
+ const { client: request = client, ...requestConfig } = config ?? {};
2816
+ if (!pathParams.site_id) {
2817
+ throw new Error(`Missing required path parameter: site_id`);
2818
+ }
2819
+ if (!pathParams.id) {
2820
+ throw new Error(`Missing required path parameter: id`);
2821
+ }
2822
+ const data = await request({
2823
+ method: "PUT",
2824
+ url: `/sites/${pathParams.site_id}/dev_server_hooks/${pathParams.id}`,
2825
+ body: body,
2826
+ ...requestConfig,
2827
+ headers: {
2828
+ ...requestConfig.headers
2829
+ }
2830
+ });
2831
+ return data;
2832
+ }
2833
+ /**
2834
+ * @link /sites/{site_id}/dev_server_hooks/{id}
2835
+ */ async function deleteSiteDevServerHook({ pathParams, config } = {}) {
2836
+ const { client: request = client, ...requestConfig } = config ?? {};
2837
+ if (!pathParams.site_id) {
2838
+ throw new Error(`Missing required path parameter: site_id`);
2839
+ }
2840
+ if (!pathParams.id) {
2841
+ throw new Error(`Missing required path parameter: id`);
2842
+ }
2843
+ const data = await request({
2844
+ method: "DELETE",
2845
+ url: `/sites/${pathParams.site_id}/dev_server_hooks/${pathParams.id}`,
2846
+ ...requestConfig,
2847
+ headers: {
2848
+ ...requestConfig.headers
2849
+ }
2850
+ });
2851
+ return data;
2852
+ }
2853
+ /**
2854
+ * @link /sites/{site_id}/agent_runner_hooks
2855
+ */ async function listSiteAgentRunnerHooks({ pathParams, config } = {}) {
2856
+ const { client: request = client, ...requestConfig } = config ?? {};
2857
+ if (!pathParams.site_id) {
2858
+ throw new Error(`Missing required path parameter: site_id`);
2859
+ }
2860
+ const data = await request({
2861
+ method: "GET",
2862
+ url: `/sites/${pathParams.site_id}/agent_runner_hooks`,
2863
+ ...requestConfig,
2864
+ headers: {
2865
+ ...requestConfig.headers
2866
+ }
2867
+ });
2868
+ return data;
2869
+ }
2870
+ /**
2871
+ * @link /sites/{site_id}/agent_runner_hooks
2872
+ */ async function createSiteAgentRunnerHook({ pathParams, body, config } = {}) {
2873
+ const { client: request = client, ...requestConfig } = config ?? {};
2874
+ if (!pathParams.site_id) {
2875
+ throw new Error(`Missing required path parameter: site_id`);
2876
+ }
2877
+ const data = await request({
2878
+ method: "POST",
2879
+ url: `/sites/${pathParams.site_id}/agent_runner_hooks`,
2880
+ body: body,
2881
+ ...requestConfig,
2882
+ headers: {
2883
+ ...requestConfig.headers
2884
+ }
2885
+ });
2886
+ return data;
2887
+ }
2888
+ /**
2889
+ * @link /sites/{site_id}/agent_runner_hooks/{id}
2890
+ */ async function getSiteAgentRunnerHook({ pathParams, config } = {}) {
2891
+ const { client: request = client, ...requestConfig } = config ?? {};
2892
+ if (!pathParams.site_id) {
2893
+ throw new Error(`Missing required path parameter: site_id`);
2894
+ }
2895
+ if (!pathParams.id) {
2896
+ throw new Error(`Missing required path parameter: id`);
2897
+ }
2898
+ const data = await request({
2899
+ method: "GET",
2900
+ url: `/sites/${pathParams.site_id}/agent_runner_hooks/${pathParams.id}`,
2901
+ ...requestConfig,
2902
+ headers: {
2903
+ ...requestConfig.headers
2904
+ }
2905
+ });
2906
+ return data;
2907
+ }
2908
+ /**
2909
+ * @link /sites/{site_id}/agent_runner_hooks/{id}
2910
+ */ async function updateSiteAgentRunnerHook({ pathParams, body, config } = {}) {
2911
+ const { client: request = client, ...requestConfig } = config ?? {};
2912
+ if (!pathParams.site_id) {
2913
+ throw new Error(`Missing required path parameter: site_id`);
2914
+ }
2915
+ if (!pathParams.id) {
2916
+ throw new Error(`Missing required path parameter: id`);
2917
+ }
2918
+ const data = await request({
2919
+ method: "PUT",
2920
+ url: `/sites/${pathParams.site_id}/agent_runner_hooks/${pathParams.id}`,
2921
+ body: body,
2922
+ ...requestConfig,
2923
+ headers: {
2924
+ ...requestConfig.headers
2925
+ }
2926
+ });
2927
+ return data;
2928
+ }
2929
+ /**
2930
+ * @link /sites/{site_id}/agent_runner_hooks/{id}
2931
+ */ async function deleteSiteAgentRunnerHook({ pathParams, config } = {}) {
2932
+ const { client: request = client, ...requestConfig } = config ?? {};
2933
+ if (!pathParams.site_id) {
2934
+ throw new Error(`Missing required path parameter: site_id`);
2935
+ }
2936
+ if (!pathParams.id) {
2937
+ throw new Error(`Missing required path parameter: id`);
2938
+ }
2939
+ const data = await request({
2940
+ method: "DELETE",
2941
+ url: `/sites/${pathParams.site_id}/agent_runner_hooks/${pathParams.id}`,
2942
+ ...requestConfig,
2943
+ headers: {
2944
+ ...requestConfig.headers
2945
+ }
2946
+ });
2947
+ return data;
2948
+ }
2949
+ /**
2950
+ * @link /ai-gateway/providers
2951
+ */ async function getAIGatewayProviders({ config } = {}) {
2952
+ const { client: request = client, ...requestConfig } = config ?? {};
2953
+ const data = await request({
2954
+ method: "GET",
2955
+ url: `/ai-gateway/providers`,
2956
+ ...requestConfig,
2957
+ headers: {
2958
+ ...requestConfig.headers
2959
+ }
2960
+ });
2961
+ return data;
2962
+ }
2963
+ /**
2964
+ * @description Returns an AI Gateway token for a specific site
2965
+ * @link /sites/{site_id}/ai-gateway/token
2966
+ */ async function getAIGatewayToken({ pathParams, config } = {}) {
2967
+ const { client: request = client, ...requestConfig } = config ?? {};
2968
+ if (!pathParams.site_id) {
2969
+ throw new Error(`Missing required path parameter: site_id`);
2970
+ }
2971
+ const data = await request({
2972
+ method: "GET",
2973
+ url: `/sites/${pathParams.site_id}/ai-gateway/token`,
2974
+ ...requestConfig,
2975
+ headers: {
2976
+ ...requestConfig.headers
2977
+ }
2978
+ });
2979
+ return data;
2980
+ }
2981
+ /**
2982
+ * @description Returns an AI Gateway token scoped to an account
2983
+ * @link /accounts/{account_id}/ai-gateway/token
2984
+ */ async function getAccountAIGatewayToken({ pathParams, config } = {}) {
2985
+ const { client: request = client, ...requestConfig } = config ?? {};
2986
+ if (!pathParams.account_id) {
2987
+ throw new Error(`Missing required path parameter: account_id`);
2988
+ }
2989
+ const data = await request({
2990
+ method: "GET",
2991
+ url: `/accounts/${pathParams.account_id}/ai-gateway/token`,
2992
+ ...requestConfig,
2993
+ headers: {
2994
+ ...requestConfig.headers
2995
+ }
2996
+ });
2997
+ return data;
2998
+ }
2999
+ /**
3000
+ * @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.
3001
+ * @link /sites/{site_id}/database
3002
+ */ async function createSiteDatabase({ pathParams, body, config } = {}) {
3003
+ const { client: request = client, ...requestConfig } = config ?? {};
3004
+ if (!pathParams.site_id) {
3005
+ throw new Error(`Missing required path parameter: site_id`);
3006
+ }
3007
+ const data = await request({
3008
+ method: "POST",
3009
+ url: `/sites/${pathParams.site_id}/database`,
3010
+ body: body,
3011
+ ...requestConfig,
3012
+ headers: {
3013
+ ...requestConfig.headers
3014
+ }
3015
+ });
3016
+ return data;
3017
+ }
3018
+ /**
3019
+ * @description Returns the database connection string for the specified site.
3020
+ * @link /sites/{site_id}/database
3021
+ */ async function getSiteDatabase({ pathParams, queryParams, config } = {}) {
3022
+ const { client: request = client, ...requestConfig } = config ?? {};
3023
+ if (!pathParams.site_id) {
3024
+ throw new Error(`Missing required path parameter: site_id`);
3025
+ }
3026
+ const data = await request({
3027
+ method: "GET",
3028
+ url: `/sites/${pathParams.site_id}/database`,
3029
+ queryParams,
3030
+ ...requestConfig,
3031
+ headers: {
3032
+ ...requestConfig.headers
3033
+ }
3034
+ });
3035
+ return data;
3036
+ }
3037
+ /**
3038
+ * @description Deletes the database and all associated branches and snapshots for the specified site.
3039
+ * @link /sites/{site_id}/database
3040
+ */ async function deleteSiteDatabase({ pathParams, config } = {}) {
3041
+ const { client: request = client, ...requestConfig } = config ?? {};
3042
+ if (!pathParams.site_id) {
3043
+ throw new Error(`Missing required path parameter: site_id`);
3044
+ }
3045
+ const data = await request({
3046
+ method: "DELETE",
3047
+ url: `/sites/${pathParams.site_id}/database`,
3048
+ ...requestConfig,
3049
+ headers: {
3050
+ ...requestConfig.headers
3051
+ }
3052
+ });
3053
+ return data;
3054
+ }
3055
+ /**
3056
+ * @description Creates a new database branch. If a branch already exists for the specified branch ID, returns the existing connection string.
3057
+ * @link /sites/{site_id}/database/branch
3058
+ */ async function createSiteDatabaseBranch({ pathParams, body, config } = {}) {
3059
+ const { client: request = client, ...requestConfig } = config ?? {};
3060
+ if (!pathParams.site_id) {
3061
+ throw new Error(`Missing required path parameter: site_id`);
3062
+ }
3063
+ const data = await request({
3064
+ method: "POST",
3065
+ url: `/sites/${pathParams.site_id}/database/branch`,
3066
+ body: body,
3067
+ ...requestConfig,
3068
+ headers: {
3069
+ ...requestConfig.headers
3070
+ }
3071
+ });
3072
+ return data;
3073
+ }
3074
+ /**
3075
+ * @description Returns all branches for the site's database with compute status and metadata.
3076
+ * @link /sites/{site_id}/database/branches
3077
+ */ async function listSiteDatabaseBranches({ pathParams, config } = {}) {
3078
+ const { client: request = client, ...requestConfig } = config ?? {};
3079
+ if (!pathParams.site_id) {
3080
+ throw new Error(`Missing required path parameter: site_id`);
3081
+ }
3082
+ const data = await request({
3083
+ method: "GET",
3084
+ url: `/sites/${pathParams.site_id}/database/branches`,
3085
+ ...requestConfig,
3086
+ headers: {
3087
+ ...requestConfig.headers
3088
+ }
3089
+ });
3090
+ return data;
3091
+ }
3092
+ /**
3093
+ * @description Returns the database branch connection string for a specific branch.
3094
+ * @link /sites/{site_id}/database/branch/{branch_id}
3095
+ */ async function getSiteDatabaseBranch({ pathParams, queryParams, config } = {}) {
3096
+ const { client: request = client, ...requestConfig } = config ?? {};
3097
+ if (!pathParams.site_id) {
3098
+ throw new Error(`Missing required path parameter: site_id`);
3099
+ }
3100
+ if (!pathParams.branch_id) {
3101
+ throw new Error(`Missing required path parameter: branch_id`);
3102
+ }
3103
+ const data = await request({
3104
+ method: "GET",
3105
+ url: `/sites/${pathParams.site_id}/database/branch/${pathParams.branch_id}`,
3106
+ queryParams,
3107
+ ...requestConfig,
3108
+ headers: {
3109
+ ...requestConfig.headers
3110
+ }
3111
+ });
3112
+ return data;
3113
+ }
3114
+ /**
3115
+ * @description Deletes a database branch.
3116
+ * @link /sites/{site_id}/database/branch/{branch_id}
3117
+ */ async function deleteSiteDatabaseBranch({ pathParams, config } = {}) {
3118
+ const { client: request = client, ...requestConfig } = config ?? {};
3119
+ if (!pathParams.site_id) {
3120
+ throw new Error(`Missing required path parameter: site_id`);
3121
+ }
3122
+ if (!pathParams.branch_id) {
3123
+ throw new Error(`Missing required path parameter: branch_id`);
3124
+ }
3125
+ const data = await request({
3126
+ method: "DELETE",
3127
+ url: `/sites/${pathParams.site_id}/database/branch/${pathParams.branch_id}`,
3128
+ ...requestConfig,
3129
+ headers: {
3130
+ ...requestConfig.headers
3131
+ }
3132
+ });
3133
+ return data;
3134
+ }
3135
+ /**
3136
+ * @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.
3137
+ * @link /sites/{site_id}/database/branch/{branch_id}/reset
3138
+ */ async function resetSiteDatabaseBranch({ pathParams, body, queryParams, config } = {}) {
3139
+ const { client: request = client, ...requestConfig } = config ?? {};
3140
+ if (!pathParams.site_id) {
3141
+ throw new Error(`Missing required path parameter: site_id`);
3142
+ }
3143
+ if (!pathParams.branch_id) {
3144
+ throw new Error(`Missing required path parameter: branch_id`);
3145
+ }
3146
+ const data = await request({
3147
+ method: "POST",
3148
+ url: `/sites/${pathParams.site_id}/database/branch/${pathParams.branch_id}/reset`,
3149
+ queryParams,
3150
+ body: body,
3151
+ ...requestConfig,
3152
+ headers: {
3153
+ ...requestConfig.headers
3154
+ }
3155
+ });
3156
+ return data;
3157
+ }
3158
+ /**
3159
+ * @description Sets compute settings for a specific database branch, overriding project-level settings. Requires a Pro or higher plan.
3160
+ * @link /sites/{site_id}/database/branch/{branch_id}/compute/settings
3161
+ */ async function setSiteDatabaseBranchComputeSettings({ pathParams, body, config } = {}) {
3162
+ const { client: request = client, ...requestConfig } = config ?? {};
3163
+ if (!pathParams.site_id) {
3164
+ throw new Error(`Missing required path parameter: site_id`);
3165
+ }
3166
+ if (!pathParams.branch_id) {
3167
+ throw new Error(`Missing required path parameter: branch_id`);
3168
+ }
3169
+ const data = await request({
3170
+ method: "PUT",
3171
+ url: `/sites/${pathParams.site_id}/database/branch/${pathParams.branch_id}/compute/settings`,
3172
+ body: body,
3173
+ ...requestConfig,
3174
+ headers: {
3175
+ ...requestConfig.headers
3176
+ }
3177
+ });
3178
+ return data;
3179
+ }
3180
+ /**
3181
+ * @description Sets project-level compute settings for the database. Applied to new branches. Can be overridden per-branch. Requires a Pro or higher plan.
3182
+ * @link /sites/{site_id}/database/compute/settings
3183
+ */ async function setSiteDatabaseComputeSettings({ pathParams, body, config } = {}) {
3184
+ const { client: request = client, ...requestConfig } = config ?? {};
3185
+ if (!pathParams.site_id) {
3186
+ throw new Error(`Missing required path parameter: site_id`);
3187
+ }
3188
+ const data = await request({
3189
+ method: "PUT",
3190
+ url: `/sites/${pathParams.site_id}/database/compute/settings`,
3191
+ body: body,
3192
+ ...requestConfig,
3193
+ headers: {
3194
+ ...requestConfig.headers
3195
+ }
3196
+ });
3197
+ return data;
3198
+ }
3199
+ /**
3200
+ * @description Returns the project-level compute settings for the database. Returns effective settings (custom or tier defaults). Requires a Pro or higher plan.
3201
+ * @link /sites/{site_id}/database/compute/settings
3202
+ */ async function getSiteDatabaseComputeSettings({ pathParams, config } = {}) {
3203
+ const { client: request = client, ...requestConfig } = config ?? {};
3204
+ if (!pathParams.site_id) {
3205
+ throw new Error(`Missing required path parameter: site_id`);
3206
+ }
3207
+ const data = await request({
3208
+ method: "GET",
3209
+ url: `/sites/${pathParams.site_id}/database/compute/settings`,
3210
+ ...requestConfig,
3211
+ headers: {
3212
+ ...requestConfig.headers
3213
+ }
3214
+ });
3215
+ return data;
3216
+ }
3217
+ /**
3218
+ * @description Resets project-level compute settings to tier defaults. Requires a Pro or higher plan.
3219
+ * @link /sites/{site_id}/database/compute/settings
3220
+ */ async function clearSiteDatabaseComputeSettings({ pathParams, config } = {}) {
3221
+ const { client: request = client, ...requestConfig } = config ?? {};
3222
+ if (!pathParams.site_id) {
3223
+ throw new Error(`Missing required path parameter: site_id`);
3224
+ }
3225
+ const data = await request({
3226
+ method: "DELETE",
3227
+ url: `/sites/${pathParams.site_id}/database/compute/settings`,
3228
+ ...requestConfig,
3229
+ headers: {
3230
+ ...requestConfig.headers
3231
+ }
3232
+ });
3233
+ return data;
3234
+ }
3235
+ /**
3236
+ * @description Returns the list of migrations available for the specified branch, indicating which ones have been applied to the database.
3237
+ * @link /sites/{site_id}/database/migrations
3238
+ */ async function listSiteDatabaseMigrations({ pathParams, queryParams, config } = {}) {
3239
+ const { client: request = client, ...requestConfig } = config ?? {};
3240
+ if (!pathParams.site_id) {
3241
+ throw new Error(`Missing required path parameter: site_id`);
3242
+ }
3243
+ const data = await request({
3244
+ method: "GET",
3245
+ url: `/sites/${pathParams.site_id}/database/migrations`,
3246
+ queryParams,
3247
+ ...requestConfig,
3248
+ headers: {
3249
+ ...requestConfig.headers
3250
+ }
3251
+ });
3252
+ return data;
3253
+ }
3254
+ /**
3255
+ * @description Returns the contents of a named migration for the specified branch.
3256
+ * @link /sites/{site_id}/database/migrations/{name}
3257
+ */ async function getSiteDatabaseMigration({ pathParams, queryParams, config } = {}) {
3258
+ const { client: request = client, ...requestConfig } = config ?? {};
3259
+ if (!pathParams.site_id) {
3260
+ throw new Error(`Missing required path parameter: site_id`);
3261
+ }
3262
+ if (!pathParams.name) {
3263
+ throw new Error(`Missing required path parameter: name`);
3264
+ }
3265
+ const data = await request({
3266
+ method: "GET",
3267
+ url: `/sites/${pathParams.site_id}/database/migrations/${pathParams.name}`,
3268
+ queryParams,
3269
+ ...requestConfig,
3270
+ headers: {
3271
+ ...requestConfig.headers
3272
+ }
3273
+ });
3274
+ return data;
3275
+ }
3276
+ /**
3277
+ * @description Runs database migrations for the specified deploy. Finds the deploy and determines the appropriate branch.
3278
+ * @link /sites/{site_id}/database/migrations/{deploy_id}
3279
+ */ async function runSiteDatabaseMigrations({ pathParams, body, config } = {}) {
3280
+ const { client: request = client, ...requestConfig } = config ?? {};
3281
+ if (!pathParams.site_id) {
3282
+ throw new Error(`Missing required path parameter: site_id`);
3283
+ }
3284
+ if (!pathParams.deploy_id) {
3285
+ throw new Error(`Missing required path parameter: deploy_id`);
3286
+ }
3287
+ const data = await request({
3288
+ method: "POST",
3289
+ url: `/sites/${pathParams.site_id}/database/migrations/${pathParams.deploy_id}`,
3290
+ body: body,
3291
+ ...requestConfig,
3292
+ headers: {
3293
+ ...requestConfig.headers
3294
+ }
3295
+ });
3296
+ return data;
3297
+ }
3298
+ /**
3299
+ * @description Creates a point-in-time snapshot of a database branch. Defaults to the production branch if no branch name is specified.
3300
+ * @link /sites/{site_id}/database/snapshot
3301
+ */ async function createSiteDatabaseSnapshot({ pathParams, body, config } = {}) {
3302
+ const { client: request = client, ...requestConfig } = config ?? {};
3303
+ if (!pathParams.site_id) {
3304
+ throw new Error(`Missing required path parameter: site_id`);
3305
+ }
3306
+ const data = await request({
3307
+ method: "POST",
3308
+ url: `/sites/${pathParams.site_id}/database/snapshot`,
3309
+ body: body,
3310
+ ...requestConfig,
3311
+ headers: {
3312
+ ...requestConfig.headers
3313
+ }
3314
+ });
3315
+ return data;
3316
+ }
3317
+ /**
3318
+ * @description Returns all snapshots for the site's database.
3319
+ * @link /sites/{site_id}/database/snapshots
3320
+ */ async function listSiteDatabaseSnapshots({ pathParams, config } = {}) {
3321
+ const { client: request = client, ...requestConfig } = config ?? {};
3322
+ if (!pathParams.site_id) {
3323
+ throw new Error(`Missing required path parameter: site_id`);
3324
+ }
3325
+ const data = await request({
3326
+ method: "GET",
3327
+ url: `/sites/${pathParams.site_id}/database/snapshots`,
3328
+ ...requestConfig,
3329
+ headers: {
3330
+ ...requestConfig.headers
3331
+ }
3332
+ });
3333
+ return data;
3334
+ }
3335
+ /**
3336
+ * @description Deletes a database snapshot.
3337
+ * @link /sites/{site_id}/database/snapshot/{snapshot_id}
3338
+ */ async function deleteSiteDatabaseSnapshot({ pathParams, config } = {}) {
3339
+ const { client: request = client, ...requestConfig } = config ?? {};
3340
+ if (!pathParams.site_id) {
3341
+ throw new Error(`Missing required path parameter: site_id`);
3342
+ }
3343
+ if (!pathParams.snapshot_id) {
3344
+ throw new Error(`Missing required path parameter: snapshot_id`);
3345
+ }
3346
+ const data = await request({
3347
+ method: "DELETE",
3348
+ url: `/sites/${pathParams.site_id}/database/snapshot/${pathParams.snapshot_id}`,
3349
+ ...requestConfig,
3350
+ headers: {
3351
+ ...requestConfig.headers
3352
+ }
3353
+ });
3354
+ return data;
3355
+ }
3356
+ /**
3357
+ * @description Restores a snapshot to a database branch. Defaults to the production branch if no branch_name is specified.
3358
+ * @link /sites/{site_id}/database/snapshot/{snapshot_id}/restore
3359
+ */ async function restoreSiteDatabaseSnapshot({ pathParams, body, config } = {}) {
3360
+ const { client: request = client, ...requestConfig } = config ?? {};
3361
+ if (!pathParams.site_id) {
3362
+ throw new Error(`Missing required path parameter: site_id`);
3363
+ }
3364
+ if (!pathParams.snapshot_id) {
3365
+ throw new Error(`Missing required path parameter: snapshot_id`);
3366
+ }
3367
+ const data = await request({
3368
+ method: "POST",
3369
+ url: `/sites/${pathParams.site_id}/database/snapshot/${pathParams.snapshot_id}/restore`,
3370
+ body: body,
3371
+ ...requestConfig,
3372
+ headers: {
3373
+ ...requestConfig.headers
3374
+ }
3375
+ });
3376
+ return data;
3377
+ }
3378
+ /**
3379
+ * @description This is an internal-only endpoint.
3380
+ * @link /sites/{site_id}/plugins/{_package}
3381
+ */ async function updatePlugin({ pathParams, body, config } = {}) {
3382
+ const { client: request = client, ...requestConfig } = config ?? {};
3383
+ if (!pathParams.site_id) {
3384
+ throw new Error(`Missing required path parameter: site_id`);
3385
+ }
3386
+ if (!pathParams._package) {
3387
+ throw new Error(`Missing required path parameter: _package`);
3388
+ }
3389
+ const data = await request({
3390
+ method: "PUT",
3391
+ url: `/sites/${pathParams.site_id}/plugins/${pathParams._package}`,
3392
+ body: body,
3393
+ ...requestConfig,
3394
+ headers: {
3395
+ ...requestConfig.headers
3396
+ }
3397
+ });
3398
+ return data;
3399
+ }
3400
+ const operationsByPath = {
3401
+ "GET /sites": listSites,
3402
+ "POST /sites": createSite,
3403
+ "GET /sites/{site_id}": getSite,
3404
+ "PATCH /sites/{site_id}": updateSite,
3405
+ "DELETE /sites/{site_id}": deleteSite,
3406
+ "POST /sites/{site_id}/ssl": provisionSiteTLSCertificate,
3407
+ "GET /sites/{site_id}/ssl": showSiteTLSCertificate,
3408
+ "GET /sites/{site_id}/ssl/certificates": getAllCertificates,
3409
+ "GET /accounts/{account_id}/env": getEnvVars,
3410
+ "POST /accounts/{account_id}/env": createEnvVars,
3411
+ "GET /api/v1/sites/{site_id}/env": getSiteEnvVars,
3412
+ "GET /accounts/{account_id}/env/{key}": getEnvVar,
3413
+ "PUT /accounts/{account_id}/env/{key}": updateEnvVar,
3414
+ "PATCH /accounts/{account_id}/env/{key}": setEnvVarValue,
3415
+ "DELETE /accounts/{account_id}/env/{key}": deleteEnvVar,
3416
+ "DELETE /accounts/{account_id}/env/{key}/value/{id}": deleteEnvVarValue,
3417
+ "GET /sites/{site_id}/functions": searchSiteFunctions,
3418
+ "GET /sites/{site_id}/forms": listSiteForms,
3419
+ "DELETE /sites/{site_id}/forms/{form_id}": deleteSiteForm,
3420
+ "GET /sites/{site_id}/submissions": listSiteSubmissions,
3421
+ "GET /sites/{site_id}/files": listSiteFiles,
3422
+ "GET /sites/{site_id}/assets": listSiteAssets,
3423
+ "POST /sites/{site_id}/assets": createSiteAsset,
3424
+ "GET /sites/{site_id}/assets/{asset_id}": getSiteAssetInfo,
3425
+ "PUT /sites/{site_id}/assets/{asset_id}": updateSiteAsset,
3426
+ "DELETE /sites/{site_id}/assets/{asset_id}": deleteSiteAsset,
3427
+ "GET /sites/{site_id}/assets/{asset_id}/public_signature": getSiteAssetPublicSignature,
3428
+ "GET /sites/{site_id}/files/{file_path}": getSiteFileByPathName,
3429
+ "POST /purge": purgeCache,
3430
+ "GET /sites/{site_id}/snippets": listSiteSnippets,
3431
+ "POST /sites/{site_id}/snippets": createSiteSnippet,
3432
+ "GET /sites/{site_id}/snippets/{snippet_id}": getSiteSnippet,
3433
+ "PUT /sites/{site_id}/snippets/{snippet_id}": updateSiteSnippet,
3434
+ "DELETE /sites/{site_id}/snippets/{snippet_id}": deleteSiteSnippet,
3435
+ "GET /sites/{site_id}/metadata": getSiteMetadata,
3436
+ "PUT /sites/{site_id}/metadata": updateSiteMetadata,
3437
+ "GET /sites/{site_id}/build_hooks": listSiteBuildHooks,
3438
+ "POST /sites/{site_id}/build_hooks": createSiteBuildHook,
3439
+ "GET /sites/{site_id}/build_hooks/{id}": getSiteBuildHook,
3440
+ "PUT /sites/{site_id}/build_hooks/{id}": updateSiteBuildHook,
3441
+ "DELETE /sites/{site_id}/build_hooks/{id}": deleteSiteBuildHook,
3442
+ "GET /sites/{site_id}/deploys": listSiteDeploys,
3443
+ "POST /sites/{site_id}/deploys": createSiteDeploy,
3444
+ "GET /sites/{site_id}/deploys/{deploy_id}": getSiteDeploy,
3445
+ "PUT /sites/{site_id}/deploys/{deploy_id}": updateSiteDeploy,
3446
+ "DELETE /sites/{site_id}/deploys/{deploy_id}": deleteSiteDeploy,
3447
+ "POST /deploys/{deploy_id}/cancel": cancelSiteDeploy,
3448
+ "POST /sites/{site_id}/deploys/{deploy_id}/restore": restoreSiteDeploy,
3449
+ "GET /sites/{site_id}/builds": listSiteBuilds,
3450
+ "POST /sites/{site_id}/builds": createSiteBuild,
3451
+ "GET /sites/{site_id}/deployed-branches": listSiteDeployedBranches,
3452
+ "PUT /sites/{site_id}/unlink_repo": unlinkSiteRepo,
3453
+ "PUT /sites/{site_id}/enable": enableSite,
3454
+ "PUT /sites/{site_id}/disable": disableSite,
3455
+ "GET /builds/{build_id}": getSiteBuild,
3456
+ "POST /builds/{build_id}/log": updateSiteBuildLog,
3457
+ "POST /builds/{build_id}/start": notifyBuildStart,
3458
+ "GET /{account_id}/builds/status": getAccountBuildStatus,
3459
+ "GET /sites/{site_id}/dns": getDNSForSite,
3460
+ "PUT /sites/{site_id}/dns": configureDNSForSite,
3461
+ "PUT /sites/{site_id}/rollback": rollbackSiteDeploy,
3462
+ "GET /deploys/{deploy_id}": getDeploy,
3463
+ "DELETE /deploys/{deploy_id}": deleteDeploy,
3464
+ "PATCH /deploys/{deploy_id}/validations_report": updateDeployValidations,
3465
+ "POST /deploys/{deploy_id}/lock": lockDeploy,
3466
+ "POST /deploys/{deploy_id}/unlock": unlockDeploy,
3467
+ "PUT /deploys/{deploy_id}/files/{path}": uploadDeployFile,
3468
+ "PUT /deploys/{deploy_id}/functions/{name}": uploadDeployFunction,
3469
+ "PUT /deploys/{deploy_id}/edge_functions/{code_sha}": uploadDeployEdgeFunction,
3470
+ "GET /sites/{site_id}/plugin_runs/latest": getLatestPluginRuns,
3471
+ "POST /deploys/{deploy_id}/plugin_runs": createPluginRun,
3472
+ "GET /forms/{form_id}/submissions": listFormSubmissions,
3473
+ "GET /hooks": listHooksBySiteId,
3474
+ "POST /hooks": createHookBySiteId,
3475
+ "GET /hooks/{hook_id}": getHook,
3476
+ "PUT /hooks/{hook_id}": updateHook,
3477
+ "DELETE /hooks/{hook_id}": deleteHook,
3478
+ "POST /hooks/{hook_id}/enable": enableHook,
3479
+ "GET /hooks/types": listHookTypes,
3480
+ "POST /oauth/tickets": createTicket,
3481
+ "GET /oauth/tickets/{ticket_id}": showTicket,
3482
+ "POST /oauth/tickets/{ticket_id}/exchange": exchangeTicket,
3483
+ "GET /deploy_keys": listDeployKeys,
3484
+ "POST /deploy_keys": createDeployKey,
3485
+ "GET /deploy_keys/{key_id}": getDeployKey,
3486
+ "DELETE /deploy_keys/{key_id}": deleteDeployKey,
3487
+ "POST /{account_slug}/sites": createSiteInTeam,
3488
+ "GET /{account_slug}/sites": listSitesForAccount,
3489
+ "GET /{account_slug}/members": listMembersForAccount,
3490
+ "POST /{account_slug}/members": addMemberToAccount,
3491
+ "GET /{account_slug}/members/{member_id}": getAccountMember,
3492
+ "PUT /{account_slug}/members/{member_id}": updateAccountMember,
3493
+ "DELETE /{account_slug}/members/{member_id}": removeAccountMember,
3494
+ "GET /billing/payment_methods": listPaymentMethodsForUser,
3495
+ "GET /accounts/types": listAccountTypesForUser,
3496
+ "GET /accounts": listAccountsForUser,
3497
+ "POST /accounts": createAccount,
3498
+ "GET /accounts/{account_id}": getAccount,
3499
+ "PUT /accounts/{account_id}": updateAccount,
3500
+ "DELETE /accounts/{account_id}": cancelAccount,
3501
+ "GET /accounts/{account_id}/audit": listAccountAuditEvents,
3502
+ "GET /agent_runners": listAgentRunners,
3503
+ "POST /agent_runners": createAgentRunner,
3504
+ "POST /agent_runners/upload_url": createAgentRunnerUploadUrl,
3505
+ "GET /agent_runners/{agent_runner_id}": getAgentRunner,
3506
+ "PATCH /agent_runners/{agent_runner_id}": updateAgentRunner,
3507
+ "DELETE /agent_runners/{agent_runner_id}": deleteAgentRunner,
3508
+ "POST /agent_runners/{agent_runner_id}/archive": archiveAgentRunner,
3509
+ "POST /agent_runners/{agent_runner_id}/pull_request": agentRunnerPullRequest,
3510
+ "POST /agent_runners/{agent_runner_id}/commit": agentRunnerCommitToBranch,
3511
+ "GET /agent_runners/{agent_runner_id}/sessions": listAgentRunnerSessions,
3512
+ "POST /agent_runners/{agent_runner_id}/sessions": createAgentRunnerSession,
3513
+ "GET /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}": getAgentRunnerSession,
3514
+ "PATCH /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}": updateAgentRunnerSession,
3515
+ "DELETE /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}": deleteAgentRunnerSession,
3516
+ "GET /submissions/{submission_id}": listFormSubmission,
3517
+ "DELETE /submissions/{submission_id}": deleteSubmission,
3518
+ "GET /sites/{site_id}/service-instances": listServiceInstancesForSite,
3519
+ "POST /sites/{site_id}/services/{addon}/instances": createServiceInstance,
3520
+ "GET /sites/{site_id}/services/{addon}/instances/{instance_id}": showServiceInstance,
3521
+ "PUT /sites/{site_id}/services/{addon}/instances/{instance_id}": updateServiceInstance,
3522
+ "DELETE /sites/{site_id}/services/{addon}/instances/{instance_id}": deleteServiceInstance,
3523
+ "GET /services/": getServices,
3524
+ "GET /services/{addonName}": showService,
3525
+ "GET /services/{addonName}/manifest": showServiceManifest,
3526
+ "GET /user": getCurrentUser,
3527
+ "POST /sites/{site_id}/traffic_splits": createSplitTest,
3528
+ "GET /sites/{site_id}/traffic_splits": getSplitTests,
3529
+ "PUT /sites/{site_id}/traffic_splits/{split_test_id}": updateSplitTest,
3530
+ "GET /sites/{site_id}/traffic_splits/{split_test_id}": getSplitTest,
3531
+ "POST /sites/{site_id}/traffic_splits/{split_test_id}/publish": enableSplitTest,
3532
+ "POST /sites/{site_id}/traffic_splits/{split_test_id}/unpublish": disableSplitTest,
3533
+ "POST /dns_zones": createDnsZone,
3534
+ "GET /dns_zones": getDnsZones,
3535
+ "GET /dns_zones/{zone_id}": getDnsZone,
3536
+ "DELETE /dns_zones/{zone_id}": deleteDnsZone,
3537
+ "PUT /dns_zones/{zone_id}/transfer": transferDnsZone,
3538
+ "GET /dns_zones/{zone_id}/dns_records": getDnsRecords,
3539
+ "POST /dns_zones/{zone_id}/dns_records": createDnsRecord,
3540
+ "GET /dns_zones/{zone_id}/dns_records/{dns_record_id}": getIndividualDnsRecord,
3541
+ "DELETE /dns_zones/{zone_id}/dns_records/{dns_record_id}": deleteDnsRecord,
3542
+ "GET /sites/{site_id}/dev_servers": listSiteDevServers,
3543
+ "POST /sites/{site_id}/dev_servers": createSiteDevServer,
3544
+ "DELETE /sites/{site_id}/dev_servers": deleteSiteDevServers,
3545
+ "GET /sites/{site_id}/dev_servers/{dev_server_id}": getSiteDevServer,
3546
+ "POST /sites/{site_id}/dev_servers/{dev_server_id}/activity": markDevServerActivity,
3547
+ "POST /sites/{site_id}/dev_servers/{dev_server_id}/state": updateDevServerState,
3548
+ "GET /sites/{site_id}/dev_server_hooks": listSiteDevServerHooks,
3549
+ "POST /sites/{site_id}/dev_server_hooks": createSiteDevServerHook,
3550
+ "GET /sites/{site_id}/dev_server_hooks/{id}": getSiteDevServerHook,
3551
+ "PUT /sites/{site_id}/dev_server_hooks/{id}": updateSiteDevServerHook,
3552
+ "DELETE /sites/{site_id}/dev_server_hooks/{id}": deleteSiteDevServerHook,
3553
+ "GET /sites/{site_id}/agent_runner_hooks": listSiteAgentRunnerHooks,
3554
+ "POST /sites/{site_id}/agent_runner_hooks": createSiteAgentRunnerHook,
3555
+ "GET /sites/{site_id}/agent_runner_hooks/{id}": getSiteAgentRunnerHook,
3556
+ "PUT /sites/{site_id}/agent_runner_hooks/{id}": updateSiteAgentRunnerHook,
3557
+ "DELETE /sites/{site_id}/agent_runner_hooks/{id}": deleteSiteAgentRunnerHook,
3558
+ "GET /ai-gateway/providers": getAIGatewayProviders,
3559
+ "GET /sites/{site_id}/ai-gateway/token": getAIGatewayToken,
3560
+ "GET /accounts/{account_id}/ai-gateway/token": getAccountAIGatewayToken,
3561
+ "POST /sites/{site_id}/database": createSiteDatabase,
3562
+ "GET /sites/{site_id}/database": getSiteDatabase,
3563
+ "DELETE /sites/{site_id}/database": deleteSiteDatabase,
3564
+ "POST /sites/{site_id}/database/branch": createSiteDatabaseBranch,
3565
+ "GET /sites/{site_id}/database/branches": listSiteDatabaseBranches,
3566
+ "GET /sites/{site_id}/database/branch/{branch_id}": getSiteDatabaseBranch,
3567
+ "DELETE /sites/{site_id}/database/branch/{branch_id}": deleteSiteDatabaseBranch,
3568
+ "POST /sites/{site_id}/database/branch/{branch_id}/reset": resetSiteDatabaseBranch,
3569
+ "PUT /sites/{site_id}/database/branch/{branch_id}/compute/settings": setSiteDatabaseBranchComputeSettings,
3570
+ "PUT /sites/{site_id}/database/compute/settings": setSiteDatabaseComputeSettings,
3571
+ "GET /sites/{site_id}/database/compute/settings": getSiteDatabaseComputeSettings,
3572
+ "DELETE /sites/{site_id}/database/compute/settings": clearSiteDatabaseComputeSettings,
3573
+ "GET /sites/{site_id}/database/migrations": listSiteDatabaseMigrations,
3574
+ "GET /sites/{site_id}/database/migrations/{name}": getSiteDatabaseMigration,
3575
+ "POST /sites/{site_id}/database/migrations/{deploy_id}": runSiteDatabaseMigrations,
3576
+ "POST /sites/{site_id}/database/snapshot": createSiteDatabaseSnapshot,
3577
+ "GET /sites/{site_id}/database/snapshots": listSiteDatabaseSnapshots,
3578
+ "DELETE /sites/{site_id}/database/snapshot/{snapshot_id}": deleteSiteDatabaseSnapshot,
3579
+ "POST /sites/{site_id}/database/snapshot/{snapshot_id}/restore": restoreSiteDatabaseSnapshot,
3580
+ "PUT /sites/{site_id}/plugins/{_package}": updatePlugin
3581
+ };
3582
+ const operationsByTag = {
3583
+ site: {
3584
+ listSites,
3585
+ createSite,
3586
+ getSite,
3587
+ updateSite,
3588
+ deleteSite,
3589
+ unlinkSiteRepo,
3590
+ enableSite,
3591
+ disableSite,
3592
+ createSiteInTeam,
3593
+ listSitesForAccount
3594
+ },
3595
+ snicertificate: {
3596
+ provisionSiteTLSCertificate,
3597
+ showSiteTLSCertificate,
3598
+ getAllCertificates
3599
+ },
3600
+ environmentvariables: {
3601
+ getEnvVars,
3602
+ createEnvVars,
3603
+ getSiteEnvVars,
3604
+ getEnvVar,
3605
+ updateEnvVar,
3606
+ setEnvVarValue,
3607
+ deleteEnvVar,
3608
+ deleteEnvVarValue
3609
+ },
3610
+ function: {
3611
+ searchSiteFunctions,
3612
+ uploadDeployFunction
3613
+ },
3614
+ form: {
3615
+ listSiteForms,
3616
+ deleteSiteForm
3617
+ },
3618
+ submission: {
3619
+ listSiteSubmissions,
3620
+ listFormSubmissions,
3621
+ listFormSubmission,
3622
+ deleteSubmission
3623
+ },
3624
+ file: {
3625
+ listSiteFiles,
3626
+ getSiteFileByPathName,
3627
+ uploadDeployFile
3628
+ },
3629
+ asset: {
3630
+ listSiteAssets,
3631
+ createSiteAsset,
3632
+ getSiteAssetInfo,
3633
+ updateSiteAsset,
3634
+ deleteSiteAsset
3635
+ },
3636
+ assetpublicsignature: {
3637
+ getSiteAssetPublicSignature
3638
+ },
3639
+ purge: {
3640
+ purgeCache
3641
+ },
3642
+ snippet: {
3643
+ listSiteSnippets,
3644
+ createSiteSnippet,
3645
+ getSiteSnippet,
3646
+ updateSiteSnippet,
3647
+ deleteSiteSnippet
3648
+ },
3649
+ metadata: {
3650
+ getSiteMetadata,
3651
+ updateSiteMetadata
3652
+ },
3653
+ buildhook: {
3654
+ listSiteBuildHooks,
3655
+ createSiteBuildHook,
3656
+ getSiteBuildHook,
3657
+ updateSiteBuildHook,
3658
+ deleteSiteBuildHook
3659
+ },
3660
+ deploy: {
3661
+ listSiteDeploys,
3662
+ createSiteDeploy,
3663
+ getSiteDeploy,
3664
+ updateSiteDeploy,
3665
+ deleteSiteDeploy,
3666
+ cancelSiteDeploy,
3667
+ restoreSiteDeploy,
3668
+ rollbackSiteDeploy,
3669
+ getDeploy,
3670
+ deleteDeploy,
3671
+ updateDeployValidations,
3672
+ lockDeploy,
3673
+ unlockDeploy
3674
+ },
3675
+ build: {
3676
+ listSiteBuilds,
3677
+ createSiteBuild,
3678
+ getSiteBuild,
3679
+ notifyBuildStart,
3680
+ getAccountBuildStatus
3681
+ },
3682
+ deployedbranch: {
3683
+ listSiteDeployedBranches
3684
+ },
3685
+ buildlogmsg: {
3686
+ updateSiteBuildLog
3687
+ },
3688
+ dnszone: {
3689
+ getDNSForSite,
3690
+ configureDNSForSite,
3691
+ createDnsZone,
3692
+ getDnsZones,
3693
+ getDnsZone,
3694
+ deleteDnsZone,
3695
+ transferDnsZone,
3696
+ getDnsRecords,
3697
+ createDnsRecord,
3698
+ getIndividualDnsRecord,
3699
+ deleteDnsRecord
3700
+ },
3701
+ edgefunction: {
3702
+ uploadDeployEdgeFunction
3703
+ },
3704
+ xInternal: {
3705
+ getLatestPluginRuns,
3706
+ createPluginRun,
3707
+ updatePlugin
3708
+ },
3709
+ hook: {
3710
+ listHooksBySiteId,
3711
+ createHookBySiteId,
3712
+ getHook,
3713
+ updateHook,
3714
+ deleteHook,
3715
+ enableHook
3716
+ },
3717
+ hooktype: {
3718
+ listHookTypes
3719
+ },
3720
+ ticket: {
3721
+ createTicket,
3722
+ showTicket
3723
+ },
3724
+ accesstoken: {
3725
+ exchangeTicket
3726
+ },
3727
+ deploykey: {
3728
+ listDeployKeys,
3729
+ createDeployKey,
3730
+ getDeployKey,
3731
+ deleteDeployKey
3732
+ },
3733
+ member: {
3734
+ listMembersForAccount,
3735
+ addMemberToAccount,
3736
+ getAccountMember,
3737
+ updateAccountMember,
3738
+ removeAccountMember
3739
+ },
3740
+ paymentmethod: {
3741
+ listPaymentMethodsForUser
3742
+ },
3743
+ accounttype: {
3744
+ listAccountTypesForUser
3745
+ },
3746
+ accountmembership: {
3747
+ listAccountsForUser,
3748
+ createAccount,
3749
+ getAccount,
3750
+ updateAccount,
3751
+ cancelAccount
3752
+ },
3753
+ auditlog: {
3754
+ listAccountAuditEvents
3755
+ },
3756
+ agentrunner: {
3757
+ listAgentRunners,
3758
+ createAgentRunner,
3759
+ createAgentRunnerUploadUrl,
3760
+ getAgentRunner,
3761
+ updateAgentRunner,
3762
+ deleteAgentRunner,
3763
+ archiveAgentRunner,
3764
+ agentRunnerPullRequest,
3765
+ agentRunnerCommitToBranch
3766
+ },
3767
+ agentrunnersession: {
3768
+ listAgentRunnerSessions,
3769
+ createAgentRunnerSession,
3770
+ getAgentRunnerSession,
3771
+ updateAgentRunnerSession,
3772
+ deleteAgentRunnerSession
3773
+ },
3774
+ serviceinstance: {
3775
+ listServiceInstancesForSite,
3776
+ createServiceInstance,
3777
+ showServiceInstance,
3778
+ updateServiceInstance,
3779
+ deleteServiceInstance
3780
+ },
3781
+ service: {
3782
+ getServices,
3783
+ showService,
3784
+ showServiceManifest
3785
+ },
3786
+ user: {
3787
+ getCurrentUser
3788
+ },
3789
+ splittest: {
3790
+ createSplitTest,
3791
+ getSplitTests,
3792
+ updateSplitTest,
3793
+ getSplitTest,
3794
+ enableSplitTest,
3795
+ disableSplitTest
3796
+ },
3797
+ devserver: {
3798
+ listSiteDevServers,
3799
+ createSiteDevServer,
3800
+ deleteSiteDevServers,
3801
+ getSiteDevServer,
3802
+ markDevServerActivity,
3803
+ updateDevServerState
3804
+ },
3805
+ devserverhook: {
3806
+ listSiteDevServerHooks,
3807
+ createSiteDevServerHook,
3808
+ getSiteDevServerHook,
3809
+ updateSiteDevServerHook,
3810
+ deleteSiteDevServerHook
3811
+ },
3812
+ agentrunnerhook: {
3813
+ listSiteAgentRunnerHooks,
3814
+ createSiteAgentRunnerHook,
3815
+ getSiteAgentRunnerHook,
3816
+ updateSiteAgentRunnerHook,
3817
+ deleteSiteAgentRunnerHook
3818
+ },
3819
+ aigateway: {
3820
+ getAIGatewayProviders,
3821
+ getAIGatewayToken,
3822
+ getAccountAIGatewayToken
3823
+ },
3824
+ database: {
3825
+ createSiteDatabase,
3826
+ getSiteDatabase,
3827
+ deleteSiteDatabase,
3828
+ createSiteDatabaseBranch,
3829
+ listSiteDatabaseBranches,
3830
+ getSiteDatabaseBranch,
3831
+ deleteSiteDatabaseBranch,
3832
+ resetSiteDatabaseBranch,
3833
+ setSiteDatabaseBranchComputeSettings,
3834
+ setSiteDatabaseComputeSettings,
3835
+ getSiteDatabaseComputeSettings,
3836
+ clearSiteDatabaseComputeSettings,
3837
+ listSiteDatabaseMigrations,
3838
+ getSiteDatabaseMigration,
3839
+ runSiteDatabaseMigrations,
3840
+ createSiteDatabaseSnapshot,
3841
+ listSiteDatabaseSnapshots,
3842
+ deleteSiteDatabaseSnapshot,
3843
+ restoreSiteDatabaseSnapshot
3844
+ }
3845
+ };
3846
+ const tagDictionary = {
3847
+ site: {
3848
+ GET: [
3849
+ "listSites",
3850
+ "getSite",
3851
+ "listSitesForAccount"
3852
+ ],
3853
+ POST: [
3854
+ "createSite",
3855
+ "createSiteInTeam"
3856
+ ],
3857
+ PATCH: [
3858
+ "updateSite"
3859
+ ],
3860
+ DELETE: [
3861
+ "deleteSite"
3862
+ ],
3863
+ PUT: [
3864
+ "unlinkSiteRepo",
3865
+ "enableSite",
3866
+ "disableSite"
3867
+ ]
3868
+ },
3869
+ snicertificate: {
3870
+ POST: [
3871
+ "provisionSiteTLSCertificate"
3872
+ ],
3873
+ GET: [
3874
+ "showSiteTLSCertificate",
3875
+ "getAllCertificates"
3876
+ ]
3877
+ },
3878
+ environmentvariables: {
3879
+ GET: [
3880
+ "getEnvVars",
3881
+ "getSiteEnvVars",
3882
+ "getEnvVar"
3883
+ ],
3884
+ POST: [
3885
+ "createEnvVars"
3886
+ ],
3887
+ PUT: [
3888
+ "updateEnvVar"
3889
+ ],
3890
+ PATCH: [
3891
+ "setEnvVarValue"
3892
+ ],
3893
+ DELETE: [
3894
+ "deleteEnvVar",
3895
+ "deleteEnvVarValue"
3896
+ ]
3897
+ },
3898
+ function: {
3899
+ GET: [
3900
+ "searchSiteFunctions"
3901
+ ],
3902
+ PUT: [
3903
+ "uploadDeployFunction"
3904
+ ]
3905
+ },
3906
+ form: {
3907
+ GET: [
3908
+ "listSiteForms"
3909
+ ],
3910
+ DELETE: [
3911
+ "deleteSiteForm"
3912
+ ]
3913
+ },
3914
+ submission: {
3915
+ GET: [
3916
+ "listSiteSubmissions",
3917
+ "listFormSubmissions",
3918
+ "listFormSubmission"
3919
+ ],
3920
+ DELETE: [
3921
+ "deleteSubmission"
3922
+ ]
3923
+ },
3924
+ file: {
3925
+ GET: [
3926
+ "listSiteFiles",
3927
+ "getSiteFileByPathName"
3928
+ ],
3929
+ PUT: [
3930
+ "uploadDeployFile"
3931
+ ]
3932
+ },
3933
+ asset: {
3934
+ GET: [
3935
+ "listSiteAssets",
3936
+ "getSiteAssetInfo"
3937
+ ],
3938
+ POST: [
3939
+ "createSiteAsset"
3940
+ ],
3941
+ PUT: [
3942
+ "updateSiteAsset"
3943
+ ],
3944
+ DELETE: [
3945
+ "deleteSiteAsset"
3946
+ ]
3947
+ },
3948
+ assetpublicsignature: {
3949
+ GET: [
3950
+ "getSiteAssetPublicSignature"
3951
+ ]
3952
+ },
3953
+ purge: {
3954
+ POST: [
3955
+ "purgeCache"
3956
+ ]
3957
+ },
3958
+ snippet: {
3959
+ GET: [
3960
+ "listSiteSnippets",
3961
+ "getSiteSnippet"
3962
+ ],
3963
+ POST: [
3964
+ "createSiteSnippet"
3965
+ ],
3966
+ PUT: [
3967
+ "updateSiteSnippet"
3968
+ ],
3969
+ DELETE: [
3970
+ "deleteSiteSnippet"
3971
+ ]
3972
+ },
3973
+ metadata: {
3974
+ GET: [
3975
+ "getSiteMetadata"
3976
+ ],
3977
+ PUT: [
3978
+ "updateSiteMetadata"
3979
+ ]
3980
+ },
3981
+ buildhook: {
3982
+ GET: [
3983
+ "listSiteBuildHooks",
3984
+ "getSiteBuildHook"
3985
+ ],
3986
+ POST: [
3987
+ "createSiteBuildHook"
3988
+ ],
3989
+ PUT: [
3990
+ "updateSiteBuildHook"
3991
+ ],
3992
+ DELETE: [
3993
+ "deleteSiteBuildHook"
3994
+ ]
3995
+ },
3996
+ deploy: {
3997
+ GET: [
3998
+ "listSiteDeploys",
3999
+ "getSiteDeploy",
4000
+ "getDeploy"
4001
+ ],
4002
+ POST: [
4003
+ "createSiteDeploy",
4004
+ "cancelSiteDeploy",
4005
+ "restoreSiteDeploy",
4006
+ "lockDeploy",
4007
+ "unlockDeploy"
4008
+ ],
4009
+ PUT: [
4010
+ "updateSiteDeploy",
4011
+ "rollbackSiteDeploy"
4012
+ ],
4013
+ DELETE: [
4014
+ "deleteSiteDeploy",
4015
+ "deleteDeploy"
4016
+ ],
4017
+ PATCH: [
4018
+ "updateDeployValidations"
4019
+ ]
4020
+ },
4021
+ build: {
4022
+ GET: [
4023
+ "listSiteBuilds",
4024
+ "getSiteBuild",
4025
+ "getAccountBuildStatus"
4026
+ ],
4027
+ POST: [
4028
+ "createSiteBuild",
4029
+ "notifyBuildStart"
4030
+ ]
4031
+ },
4032
+ deployedbranch: {
4033
+ GET: [
4034
+ "listSiteDeployedBranches"
4035
+ ]
4036
+ },
4037
+ buildlogmsg: {
4038
+ POST: [
4039
+ "updateSiteBuildLog"
4040
+ ]
4041
+ },
4042
+ dnszone: {
4043
+ GET: [
4044
+ "getDNSForSite",
4045
+ "getDnsZones",
4046
+ "getDnsZone",
4047
+ "getDnsRecords",
4048
+ "getIndividualDnsRecord"
4049
+ ],
4050
+ PUT: [
4051
+ "configureDNSForSite",
4052
+ "transferDnsZone"
4053
+ ],
4054
+ POST: [
4055
+ "createDnsZone",
4056
+ "createDnsRecord"
4057
+ ],
4058
+ DELETE: [
4059
+ "deleteDnsZone",
4060
+ "deleteDnsRecord"
4061
+ ]
4062
+ },
4063
+ edgefunction: {
4064
+ PUT: [
4065
+ "uploadDeployEdgeFunction"
4066
+ ]
4067
+ },
4068
+ xInternal: {
4069
+ GET: [
4070
+ "getLatestPluginRuns"
4071
+ ],
4072
+ POST: [
4073
+ "createPluginRun"
4074
+ ],
4075
+ PUT: [
4076
+ "updatePlugin"
4077
+ ]
4078
+ },
4079
+ hook: {
4080
+ GET: [
4081
+ "listHooksBySiteId",
4082
+ "getHook"
4083
+ ],
4084
+ POST: [
4085
+ "createHookBySiteId",
4086
+ "enableHook"
4087
+ ],
4088
+ PUT: [
4089
+ "updateHook"
4090
+ ],
4091
+ DELETE: [
4092
+ "deleteHook"
4093
+ ]
4094
+ },
4095
+ hooktype: {
4096
+ GET: [
4097
+ "listHookTypes"
4098
+ ]
4099
+ },
4100
+ ticket: {
4101
+ POST: [
4102
+ "createTicket"
4103
+ ],
4104
+ GET: [
4105
+ "showTicket"
4106
+ ]
4107
+ },
4108
+ accesstoken: {
4109
+ POST: [
4110
+ "exchangeTicket"
4111
+ ]
4112
+ },
4113
+ deploykey: {
4114
+ GET: [
4115
+ "listDeployKeys",
4116
+ "getDeployKey"
4117
+ ],
4118
+ POST: [
4119
+ "createDeployKey"
4120
+ ],
4121
+ DELETE: [
4122
+ "deleteDeployKey"
4123
+ ]
4124
+ },
4125
+ member: {
4126
+ GET: [
4127
+ "listMembersForAccount",
4128
+ "getAccountMember"
4129
+ ],
4130
+ POST: [
4131
+ "addMemberToAccount"
4132
+ ],
4133
+ PUT: [
4134
+ "updateAccountMember"
4135
+ ],
4136
+ DELETE: [
4137
+ "removeAccountMember"
4138
+ ]
4139
+ },
4140
+ paymentmethod: {
4141
+ GET: [
4142
+ "listPaymentMethodsForUser"
4143
+ ]
4144
+ },
4145
+ accounttype: {
4146
+ GET: [
4147
+ "listAccountTypesForUser"
4148
+ ]
4149
+ },
4150
+ accountmembership: {
4151
+ GET: [
4152
+ "listAccountsForUser",
4153
+ "getAccount"
4154
+ ],
4155
+ POST: [
4156
+ "createAccount"
4157
+ ],
4158
+ PUT: [
4159
+ "updateAccount"
4160
+ ],
4161
+ DELETE: [
4162
+ "cancelAccount"
4163
+ ]
4164
+ },
4165
+ auditlog: {
4166
+ GET: [
4167
+ "listAccountAuditEvents"
4168
+ ]
4169
+ },
4170
+ agentrunner: {
4171
+ GET: [
4172
+ "listAgentRunners",
4173
+ "getAgentRunner"
4174
+ ],
4175
+ POST: [
4176
+ "createAgentRunner",
4177
+ "createAgentRunnerUploadUrl",
4178
+ "archiveAgentRunner",
4179
+ "agentRunnerPullRequest",
4180
+ "agentRunnerCommitToBranch"
4181
+ ],
4182
+ PATCH: [
4183
+ "updateAgentRunner"
4184
+ ],
4185
+ DELETE: [
4186
+ "deleteAgentRunner"
4187
+ ]
4188
+ },
4189
+ agentrunnersession: {
4190
+ GET: [
4191
+ "listAgentRunnerSessions",
4192
+ "getAgentRunnerSession"
4193
+ ],
4194
+ POST: [
4195
+ "createAgentRunnerSession"
4196
+ ],
4197
+ PATCH: [
4198
+ "updateAgentRunnerSession"
4199
+ ],
4200
+ DELETE: [
4201
+ "deleteAgentRunnerSession"
4202
+ ]
4203
+ },
4204
+ serviceinstance: {
4205
+ GET: [
4206
+ "listServiceInstancesForSite",
4207
+ "showServiceInstance"
4208
+ ],
4209
+ POST: [
4210
+ "createServiceInstance"
4211
+ ],
4212
+ PUT: [
4213
+ "updateServiceInstance"
4214
+ ],
4215
+ DELETE: [
4216
+ "deleteServiceInstance"
4217
+ ]
4218
+ },
4219
+ service: {
4220
+ GET: [
4221
+ "getServices",
4222
+ "showService",
4223
+ "showServiceManifest"
4224
+ ]
4225
+ },
4226
+ user: {
4227
+ GET: [
4228
+ "getCurrentUser"
4229
+ ]
4230
+ },
4231
+ splittest: {
4232
+ POST: [
4233
+ "createSplitTest",
4234
+ "enableSplitTest",
4235
+ "disableSplitTest"
4236
+ ],
4237
+ GET: [
4238
+ "getSplitTests",
4239
+ "getSplitTest"
4240
+ ],
4241
+ PUT: [
4242
+ "updateSplitTest"
4243
+ ]
4244
+ },
4245
+ devserver: {
4246
+ GET: [
4247
+ "listSiteDevServers",
4248
+ "getSiteDevServer"
4249
+ ],
4250
+ POST: [
4251
+ "createSiteDevServer",
4252
+ "markDevServerActivity",
4253
+ "updateDevServerState"
4254
+ ],
4255
+ DELETE: [
4256
+ "deleteSiteDevServers"
4257
+ ]
4258
+ },
4259
+ devserverhook: {
4260
+ GET: [
4261
+ "listSiteDevServerHooks",
4262
+ "getSiteDevServerHook"
4263
+ ],
4264
+ POST: [
4265
+ "createSiteDevServerHook"
4266
+ ],
4267
+ PUT: [
4268
+ "updateSiteDevServerHook"
4269
+ ],
4270
+ DELETE: [
4271
+ "deleteSiteDevServerHook"
4272
+ ]
4273
+ },
4274
+ agentrunnerhook: {
4275
+ GET: [
4276
+ "listSiteAgentRunnerHooks",
4277
+ "getSiteAgentRunnerHook"
4278
+ ],
4279
+ POST: [
4280
+ "createSiteAgentRunnerHook"
4281
+ ],
4282
+ PUT: [
4283
+ "updateSiteAgentRunnerHook"
4284
+ ],
4285
+ DELETE: [
4286
+ "deleteSiteAgentRunnerHook"
4287
+ ]
4288
+ },
4289
+ aigateway: {
4290
+ GET: [
4291
+ "getAIGatewayProviders",
4292
+ "getAIGatewayToken",
4293
+ "getAccountAIGatewayToken"
4294
+ ]
4295
+ },
4296
+ database: {
4297
+ POST: [
4298
+ "createSiteDatabase",
4299
+ "createSiteDatabaseBranch",
4300
+ "resetSiteDatabaseBranch",
4301
+ "runSiteDatabaseMigrations",
4302
+ "createSiteDatabaseSnapshot",
4303
+ "restoreSiteDatabaseSnapshot"
4304
+ ],
4305
+ GET: [
4306
+ "getSiteDatabase",
4307
+ "listSiteDatabaseBranches",
4308
+ "getSiteDatabaseBranch",
4309
+ "getSiteDatabaseComputeSettings",
4310
+ "listSiteDatabaseMigrations",
4311
+ "getSiteDatabaseMigration",
4312
+ "listSiteDatabaseSnapshots"
4313
+ ],
4314
+ DELETE: [
4315
+ "deleteSiteDatabase",
4316
+ "deleteSiteDatabaseBranch",
4317
+ "clearSiteDatabaseComputeSettings",
4318
+ "deleteSiteDatabaseSnapshot"
4319
+ ],
4320
+ PUT: [
4321
+ "setSiteDatabaseBranchComputeSettings",
4322
+ "setSiteDatabaseComputeSettings"
4323
+ ]
4324
+ }
4325
+ };
4326
+
4327
+ exports.addMemberToAccount = addMemberToAccount;
4328
+ exports.agentRunnerCommitToBranch = agentRunnerCommitToBranch;
4329
+ exports.agentRunnerPullRequest = agentRunnerPullRequest;
4330
+ exports.archiveAgentRunner = archiveAgentRunner;
4331
+ exports.cancelAccount = cancelAccount;
4332
+ exports.cancelSiteDeploy = cancelSiteDeploy;
4333
+ exports.clearSiteDatabaseComputeSettings = clearSiteDatabaseComputeSettings;
4334
+ exports.client = client;
4335
+ exports.configureDNSForSite = configureDNSForSite;
4336
+ exports.createAccount = createAccount;
4337
+ exports.createAgentRunner = createAgentRunner;
4338
+ exports.createAgentRunnerSession = createAgentRunnerSession;
4339
+ exports.createAgentRunnerUploadUrl = createAgentRunnerUploadUrl;
4340
+ exports.createDeployKey = createDeployKey;
4341
+ exports.createDnsRecord = createDnsRecord;
4342
+ exports.createDnsZone = createDnsZone;
4343
+ exports.createEnvVars = createEnvVars;
4344
+ exports.createHookBySiteId = createHookBySiteId;
4345
+ exports.createPluginRun = createPluginRun;
4346
+ exports.createServiceInstance = createServiceInstance;
4347
+ exports.createSite = createSite;
4348
+ exports.createSiteAgentRunnerHook = createSiteAgentRunnerHook;
4349
+ exports.createSiteAsset = createSiteAsset;
4350
+ exports.createSiteBuild = createSiteBuild;
4351
+ exports.createSiteBuildHook = createSiteBuildHook;
4352
+ exports.createSiteDatabase = createSiteDatabase;
4353
+ exports.createSiteDatabaseBranch = createSiteDatabaseBranch;
4354
+ exports.createSiteDatabaseSnapshot = createSiteDatabaseSnapshot;
4355
+ exports.createSiteDeploy = createSiteDeploy;
4356
+ exports.createSiteDevServer = createSiteDevServer;
4357
+ exports.createSiteDevServerHook = createSiteDevServerHook;
4358
+ exports.createSiteInTeam = createSiteInTeam;
4359
+ exports.createSiteSnippet = createSiteSnippet;
4360
+ exports.createSplitTest = createSplitTest;
4361
+ exports.createTicket = createTicket;
4362
+ exports.deleteAgentRunner = deleteAgentRunner;
4363
+ exports.deleteAgentRunnerSession = deleteAgentRunnerSession;
4364
+ exports.deleteDeploy = deleteDeploy;
4365
+ exports.deleteDeployKey = deleteDeployKey;
4366
+ exports.deleteDnsRecord = deleteDnsRecord;
4367
+ exports.deleteDnsZone = deleteDnsZone;
4368
+ exports.deleteEnvVar = deleteEnvVar;
4369
+ exports.deleteEnvVarValue = deleteEnvVarValue;
4370
+ exports.deleteHook = deleteHook;
4371
+ exports.deleteServiceInstance = deleteServiceInstance;
4372
+ exports.deleteSite = deleteSite;
4373
+ exports.deleteSiteAgentRunnerHook = deleteSiteAgentRunnerHook;
4374
+ exports.deleteSiteAsset = deleteSiteAsset;
4375
+ exports.deleteSiteBuildHook = deleteSiteBuildHook;
4376
+ exports.deleteSiteDatabase = deleteSiteDatabase;
4377
+ exports.deleteSiteDatabaseBranch = deleteSiteDatabaseBranch;
4378
+ exports.deleteSiteDatabaseSnapshot = deleteSiteDatabaseSnapshot;
4379
+ exports.deleteSiteDeploy = deleteSiteDeploy;
4380
+ exports.deleteSiteDevServerHook = deleteSiteDevServerHook;
4381
+ exports.deleteSiteDevServers = deleteSiteDevServers;
4382
+ exports.deleteSiteForm = deleteSiteForm;
4383
+ exports.deleteSiteSnippet = deleteSiteSnippet;
4384
+ exports.deleteSubmission = deleteSubmission;
4385
+ exports.disableSite = disableSite;
4386
+ exports.disableSplitTest = disableSplitTest;
4387
+ exports.enableHook = enableHook;
4388
+ exports.enableSite = enableSite;
4389
+ exports.enableSplitTest = enableSplitTest;
4390
+ exports.exchangeTicket = exchangeTicket;
4391
+ exports.getAIGatewayProviders = getAIGatewayProviders;
4392
+ exports.getAIGatewayToken = getAIGatewayToken;
4393
+ exports.getAccount = getAccount;
4394
+ exports.getAccountAIGatewayToken = getAccountAIGatewayToken;
4395
+ exports.getAccountBuildStatus = getAccountBuildStatus;
4396
+ exports.getAccountMember = getAccountMember;
4397
+ exports.getAgentRunner = getAgentRunner;
4398
+ exports.getAgentRunnerSession = getAgentRunnerSession;
4399
+ exports.getAllCertificates = getAllCertificates;
4400
+ exports.getCurrentUser = getCurrentUser;
4401
+ exports.getDNSForSite = getDNSForSite;
4402
+ exports.getDeploy = getDeploy;
4403
+ exports.getDeployKey = getDeployKey;
4404
+ exports.getDnsRecords = getDnsRecords;
4405
+ exports.getDnsZone = getDnsZone;
4406
+ exports.getDnsZones = getDnsZones;
4407
+ exports.getEnvVar = getEnvVar;
4408
+ exports.getEnvVars = getEnvVars;
4409
+ exports.getHook = getHook;
4410
+ exports.getIndividualDnsRecord = getIndividualDnsRecord;
4411
+ exports.getLatestPluginRuns = getLatestPluginRuns;
4412
+ exports.getServices = getServices;
4413
+ exports.getSite = getSite;
4414
+ exports.getSiteAgentRunnerHook = getSiteAgentRunnerHook;
4415
+ exports.getSiteAssetInfo = getSiteAssetInfo;
4416
+ exports.getSiteAssetPublicSignature = getSiteAssetPublicSignature;
4417
+ exports.getSiteBuild = getSiteBuild;
4418
+ exports.getSiteBuildHook = getSiteBuildHook;
4419
+ exports.getSiteDatabase = getSiteDatabase;
4420
+ exports.getSiteDatabaseBranch = getSiteDatabaseBranch;
4421
+ exports.getSiteDatabaseComputeSettings = getSiteDatabaseComputeSettings;
4422
+ exports.getSiteDatabaseMigration = getSiteDatabaseMigration;
4423
+ exports.getSiteDeploy = getSiteDeploy;
4424
+ exports.getSiteDevServer = getSiteDevServer;
4425
+ exports.getSiteDevServerHook = getSiteDevServerHook;
4426
+ exports.getSiteEnvVars = getSiteEnvVars;
4427
+ exports.getSiteFileByPathName = getSiteFileByPathName;
4428
+ exports.getSiteMetadata = getSiteMetadata;
4429
+ exports.getSiteSnippet = getSiteSnippet;
4430
+ exports.getSplitTest = getSplitTest;
4431
+ exports.getSplitTests = getSplitTests;
4432
+ exports.listAccountAuditEvents = listAccountAuditEvents;
4433
+ exports.listAccountTypesForUser = listAccountTypesForUser;
4434
+ exports.listAccountsForUser = listAccountsForUser;
4435
+ exports.listAgentRunnerSessions = listAgentRunnerSessions;
4436
+ exports.listAgentRunners = listAgentRunners;
4437
+ exports.listDeployKeys = listDeployKeys;
4438
+ exports.listFormSubmission = listFormSubmission;
4439
+ exports.listFormSubmissions = listFormSubmissions;
4440
+ exports.listHookTypes = listHookTypes;
4441
+ exports.listHooksBySiteId = listHooksBySiteId;
4442
+ exports.listMembersForAccount = listMembersForAccount;
4443
+ exports.listPaymentMethodsForUser = listPaymentMethodsForUser;
4444
+ exports.listServiceInstancesForSite = listServiceInstancesForSite;
4445
+ exports.listSiteAgentRunnerHooks = listSiteAgentRunnerHooks;
4446
+ exports.listSiteAssets = listSiteAssets;
4447
+ exports.listSiteBuildHooks = listSiteBuildHooks;
4448
+ exports.listSiteBuilds = listSiteBuilds;
4449
+ exports.listSiteDatabaseBranches = listSiteDatabaseBranches;
4450
+ exports.listSiteDatabaseMigrations = listSiteDatabaseMigrations;
4451
+ exports.listSiteDatabaseSnapshots = listSiteDatabaseSnapshots;
4452
+ exports.listSiteDeployedBranches = listSiteDeployedBranches;
4453
+ exports.listSiteDeploys = listSiteDeploys;
4454
+ exports.listSiteDevServerHooks = listSiteDevServerHooks;
4455
+ exports.listSiteDevServers = listSiteDevServers;
4456
+ exports.listSiteFiles = listSiteFiles;
4457
+ exports.listSiteForms = listSiteForms;
4458
+ exports.listSiteSnippets = listSiteSnippets;
4459
+ exports.listSiteSubmissions = listSiteSubmissions;
4460
+ exports.listSites = listSites;
4461
+ exports.listSitesForAccount = listSitesForAccount;
4462
+ exports.lockDeploy = lockDeploy;
4463
+ exports.markDevServerActivity = markDevServerActivity;
4464
+ exports.notifyBuildStart = notifyBuildStart;
4465
+ exports.operationsByPath = operationsByPath;
4466
+ exports.operationsByTag = operationsByTag;
4467
+ exports.provisionSiteTLSCertificate = provisionSiteTLSCertificate;
4468
+ exports.purgeCache = purgeCache;
4469
+ exports.removeAccountMember = removeAccountMember;
4470
+ exports.resetSiteDatabaseBranch = resetSiteDatabaseBranch;
4471
+ exports.restoreSiteDatabaseSnapshot = restoreSiteDatabaseSnapshot;
4472
+ exports.restoreSiteDeploy = restoreSiteDeploy;
4473
+ exports.rollbackSiteDeploy = rollbackSiteDeploy;
4474
+ exports.runSiteDatabaseMigrations = runSiteDatabaseMigrations;
4475
+ exports.searchSiteFunctions = searchSiteFunctions;
4476
+ exports.setEnvVarValue = setEnvVarValue;
4477
+ exports.setSiteDatabaseBranchComputeSettings = setSiteDatabaseBranchComputeSettings;
4478
+ exports.setSiteDatabaseComputeSettings = setSiteDatabaseComputeSettings;
4479
+ exports.showService = showService;
4480
+ exports.showServiceInstance = showServiceInstance;
4481
+ exports.showServiceManifest = showServiceManifest;
4482
+ exports.showSiteTLSCertificate = showSiteTLSCertificate;
4483
+ exports.showTicket = showTicket;
4484
+ exports.tagDictionary = tagDictionary;
4485
+ exports.transferDnsZone = transferDnsZone;
4486
+ exports.unlinkSiteRepo = unlinkSiteRepo;
4487
+ exports.unlockDeploy = unlockDeploy;
4488
+ exports.updateAccount = updateAccount;
4489
+ exports.updateAccountMember = updateAccountMember;
4490
+ exports.updateAgentRunner = updateAgentRunner;
4491
+ exports.updateAgentRunnerSession = updateAgentRunnerSession;
4492
+ exports.updateDeployValidations = updateDeployValidations;
4493
+ exports.updateDevServerState = updateDevServerState;
4494
+ exports.updateEnvVar = updateEnvVar;
4495
+ exports.updateHook = updateHook;
4496
+ exports.updatePlugin = updatePlugin;
4497
+ exports.updateServiceInstance = updateServiceInstance;
4498
+ exports.updateSite = updateSite;
4499
+ exports.updateSiteAgentRunnerHook = updateSiteAgentRunnerHook;
4500
+ exports.updateSiteAsset = updateSiteAsset;
4501
+ exports.updateSiteBuildHook = updateSiteBuildHook;
4502
+ exports.updateSiteBuildLog = updateSiteBuildLog;
4503
+ exports.updateSiteDeploy = updateSiteDeploy;
4504
+ exports.updateSiteDevServerHook = updateSiteDevServerHook;
4505
+ exports.updateSiteMetadata = updateSiteMetadata;
4506
+ exports.updateSiteSnippet = updateSiteSnippet;
4507
+ exports.updateSplitTest = updateSplitTest;
4508
+ exports.uploadDeployEdgeFunction = uploadDeployEdgeFunction;
4509
+ exports.uploadDeployFile = uploadDeployFile;
4510
+ exports.uploadDeployFunction = uploadDeployFunction;