netlify-api 1.2.0 → 1.3.1

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