freestyle-sandboxes 0.0.26 → 0.0.28

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,9 +1,44 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
+ /**
4
+ * Identical to [`RepositoryInfo`], but with the permissions field added.
5
+ */
6
+ export type AccessibleRepository = {
7
+ id: string;
8
+ name?: (string) | null;
9
+ accountId: string;
10
+ permissions: AccessLevel;
11
+ visibility: Visibility;
12
+ };
13
+
14
+ export type AccessLevel = 'read' | 'write';
15
+
16
+ export type AccessTokenInfo = {
17
+ id: string;
18
+ };
19
+
3
20
  export type Behavior = 'regex' | 'exact';
4
21
 
22
+ export type CreateDomainMappingRequest = {
23
+ deploymentId: string;
24
+ };
25
+
26
+ export type CreatedToken = {
27
+ id: string;
28
+ token: string;
29
+ };
30
+
5
31
  export type CreateRepositoryRequest = {
6
- name: string;
32
+ /**
33
+ * This name is not visible to users, and is only accessible to you via API and in the
34
+ * dashboard. Mostly useful for observability.
35
+ */
36
+ name?: (string) | null;
37
+ public?: boolean;
38
+ };
39
+
40
+ export type CreateRepositoryResponseSuccess = {
41
+ repoId: string;
7
42
  };
8
43
 
9
44
  export type DeploymentLogEntry = {
@@ -21,6 +56,31 @@ export type DeploymentLogEntry = {
21
56
 
22
57
  export type DeploymentState = 'provisioning' | 'deployed' | 'failed';
23
58
 
59
+ export type DescribePermissionResponseSuccess = {
60
+ identity: string;
61
+ repo: string;
62
+ accessLevel?: (null | AccessLevel);
63
+ };
64
+
65
+ export type DnsRecord = {
66
+ kind: DnsRecordKind;
67
+ name: string;
68
+ value: string;
69
+ ttl: string;
70
+ priority?: (number) | null;
71
+ managed: boolean;
72
+ };
73
+
74
+ export type DnsRecordKind = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'NS';
75
+
76
+ export type DomainVerificationRequest = {
77
+ id: string;
78
+ domain: string;
79
+ accountId: string;
80
+ verificationCode: string;
81
+ createdAt: number;
82
+ };
83
+
24
84
  export type ExecuteLogEntry = {
25
85
  deployment: string;
26
86
  accountId: string;
@@ -181,6 +241,9 @@ export type FreestyleExecuteScriptParamsConfiguration = {
181
241
  };
182
242
 
183
243
  export type FreestyleExecuteScriptResultSuccess = {
244
+ /**
245
+ * The return value of the default export of the script
246
+ */
184
247
  result: unknown;
185
248
  logs: Array<FreestyleJavaScriptLog>;
186
249
  };
@@ -224,8 +287,64 @@ export type FreestyleNetworkPermission = (NetworkPermissionData & {
224
287
 
225
288
  export type action = 'allow';
226
289
 
290
+ /**
291
+ * Verify a domain verification request, can either be done for a domain, or for a specific request
292
+ */
227
293
  export type FreestyleVerifyDomainRequest = {
228
294
  domain: string;
295
+ } | {
296
+ id: string;
297
+ };
298
+
299
+ export type GitIdentity = {
300
+ id: string;
301
+ };
302
+
303
+ export type GitRepositoryTrigger = {
304
+ repositoryId: string;
305
+ trigger: ({
306
+ branches?: Array<(string)> | null;
307
+ globs?: Array<(string)> | null;
308
+ event: 'push';
309
+ });
310
+ action: ({
311
+ endpoint: string;
312
+ action: 'webhook';
313
+ });
314
+ managed: boolean;
315
+ id: string;
316
+ createdAt: number;
317
+ };
318
+
319
+ export type event = 'push';
320
+
321
+ export type action2 = 'webhook';
322
+
323
+ export type GitTrigger = {
324
+ branches?: Array<(string)> | null;
325
+ globs?: Array<(string)> | null;
326
+ event: 'push';
327
+ };
328
+
329
+ export type GitTriggerAction = {
330
+ endpoint: string;
331
+ action: 'webhook';
332
+ };
333
+
334
+ export type GrantPermissionRequest = {
335
+ permission: AccessLevel;
336
+ };
337
+
338
+ export type ListGitTokensResponseSuccess = {
339
+ tokens: Array<AccessTokenInfo>;
340
+ };
341
+
342
+ export type ListPermissionResponseSuccess = {
343
+ repositories: Array<AccessibleRepository>;
344
+ };
345
+
346
+ export type ListRecordsResponse = {
347
+ records: Array<DnsRecord>;
229
348
  };
230
349
 
231
350
  export type NetworkPermissionData = {
@@ -235,10 +354,21 @@ export type NetworkPermissionData = {
235
354
 
236
355
  export type RepositoryInfo = {
237
356
  id: string;
238
- name: string;
239
- ownerId: string;
357
+ name?: (string) | null;
358
+ accountId: string;
359
+ visibility: Visibility;
360
+ };
361
+
362
+ export type RevokeGitTokenRequest = {
363
+ tokenId: string;
240
364
  };
241
365
 
366
+ export type UpdatePermissionRequest = {
367
+ permission: AccessLevel;
368
+ };
369
+
370
+ export type Visibility = 'public' | 'private';
371
+
242
372
  export type HandleDeployCloudstateData = {
243
373
  body: FreestyleCloudstateDeployRequest;
244
374
  };
@@ -257,6 +387,54 @@ export type HandleBackupCloudstateResponse = (Array<(number)>);
257
387
 
258
388
  export type HandleBackupCloudstateError = (unknown);
259
389
 
390
+ export type HandleListRecordsData = {
391
+ query: {
392
+ domain: string;
393
+ };
394
+ };
395
+
396
+ export type HandleListRecordsResponse = (ListRecordsResponse);
397
+
398
+ export type HandleListRecordsError = ({
399
+ message: string;
400
+ });
401
+
402
+ export type HandleCreateRecordData = {
403
+ query: {
404
+ domain: string;
405
+ record: DnsRecord;
406
+ };
407
+ };
408
+
409
+ export type HandleCreateRecordResponse = ({
410
+ record: DnsRecord;
411
+ });
412
+
413
+ export type HandleCreateRecordError = ({
414
+ message: string;
415
+ });
416
+
417
+ export type HandleDeleteRecordData = {
418
+ query: {
419
+ domain: string;
420
+ record: DnsRecord;
421
+ };
422
+ };
423
+
424
+ export type HandleDeleteRecordResponse = ({
425
+ message: string;
426
+ });
427
+
428
+ export type HandleDeleteRecordError = ({
429
+ message: string;
430
+ });
431
+
432
+ export type HandleVerifyWildcardData = {
433
+ path: {
434
+ domain: string;
435
+ };
436
+ };
437
+
260
438
  export type HandleVerifyWildcardResponse = ({
261
439
  domain: string;
262
440
  });
@@ -274,6 +452,31 @@ export type HandleListDomainsError = ({
274
452
  message: string;
275
453
  });
276
454
 
455
+ export type HandleInsertDomainMappingData = {
456
+ body: CreateDomainMappingRequest;
457
+ path: {
458
+ domain: string;
459
+ };
460
+ };
461
+
462
+ export type HandleInsertDomainMappingResponse = (unknown);
463
+
464
+ export type HandleInsertDomainMappingError = ({
465
+ message: string;
466
+ });
467
+
468
+ export type HandleDeleteDomainMappingData = {
469
+ path: {
470
+ domain: string;
471
+ };
472
+ };
473
+
474
+ export type HandleDeleteDomainMappingResponse = (unknown);
475
+
476
+ export type HandleDeleteDomainMappingError = ({
477
+ message: string;
478
+ });
479
+
277
480
  export type HandleListDomainVerificationRequestsResponse = (Array<{
278
481
  verificationCode: string;
279
482
  domain: string;
@@ -300,10 +503,7 @@ export type HandleCreateDomainVerificationData = {
300
503
  body: FreestyleDomainVerificationRequest;
301
504
  };
302
505
 
303
- export type HandleCreateDomainVerificationResponse = ({
304
- verificationCode: string;
305
- domain: string;
306
- });
506
+ export type HandleCreateDomainVerificationResponse = (DomainVerificationRequest);
307
507
 
308
508
  export type HandleCreateDomainVerificationError = ({
309
509
  message: string;
@@ -359,6 +559,9 @@ export type HandleExecuteScriptData = {
359
559
  };
360
560
 
361
561
  export type HandleExecuteScriptResponse = ({
562
+ /**
563
+ * The return value of the default export of the script
564
+ */
362
565
  result: unknown;
363
566
  logs: Array<FreestyleJavaScriptLog>;
364
567
  });
@@ -367,37 +570,227 @@ export type HandleExecuteScriptError = ({
367
570
  error: string;
368
571
  });
369
572
 
370
- export type ListRepositoriesHandlerData = {
371
- query: {
573
+ export type HandleCreateIdentityResponse = (GitIdentity);
574
+
575
+ export type HandleCreateIdentityError = ({
576
+ message: string;
577
+ });
578
+
579
+ export type HandleDeleteIdentityData = {
580
+ path: {
581
+ identity: string;
582
+ };
583
+ };
584
+
585
+ export type HandleDeleteIdentityResponse = ({
586
+ [key: string]: unknown;
587
+ });
588
+
589
+ export type HandleDeleteIdentityError = ({
590
+ message: string;
591
+ });
592
+
593
+ export type HandleListPermissionsData = {
594
+ path: {
595
+ identity: string;
596
+ };
597
+ query?: {
372
598
  /**
373
599
  * Maximum number of repositories to return
374
600
  */
375
- limit: number;
601
+ limit?: number;
376
602
  /**
377
603
  * Offset for the list of repositories
378
604
  */
379
- offset: number;
605
+ offset?: number;
606
+ };
607
+ };
608
+
609
+ export type HandleListPermissionsResponse = (ListPermissionResponseSuccess);
610
+
611
+ export type HandleListPermissionsError = ({
612
+ message: string;
613
+ });
614
+
615
+ export type HandleDescribePermissionData = {
616
+ path: {
617
+ identity: string;
618
+ repo: string;
619
+ };
620
+ };
621
+
622
+ export type HandleDescribePermissionResponse = (DescribePermissionResponseSuccess);
623
+
624
+ export type HandleDescribePermissionError = ({
625
+ message: string;
626
+ });
627
+
628
+ export type HandleGrantPermissionData = {
629
+ body: GrantPermissionRequest;
630
+ path: {
631
+ identity: string;
632
+ repo: string;
633
+ };
634
+ };
635
+
636
+ export type HandleGrantPermissionResponse = ({
637
+ [key: string]: unknown;
638
+ });
639
+
640
+ export type HandleGrantPermissionError = ({
641
+ message: string;
642
+ });
643
+
644
+ export type HandleRevokePermissionData = {
645
+ path: {
646
+ identity: string;
647
+ repo: string;
648
+ };
649
+ };
650
+
651
+ export type HandleRevokePermissionResponse = ({
652
+ [key: string]: unknown;
653
+ });
654
+
655
+ export type HandleRevokePermissionError = ({
656
+ message: string;
657
+ });
658
+
659
+ export type HandleUpdatePermissionData = {
660
+ body: UpdatePermissionRequest;
661
+ path: {
662
+ identity: string;
663
+ repo: string;
664
+ };
665
+ };
666
+
667
+ export type HandleUpdatePermissionResponse = ({
668
+ [key: string]: unknown;
669
+ });
670
+
671
+ export type HandleUpdatePermissionError = ({
672
+ message: string;
673
+ });
674
+
675
+ export type HandleListGitTokensData = {
676
+ path: {
677
+ identity: string;
678
+ };
679
+ };
680
+
681
+ export type HandleListGitTokensResponse = (ListGitTokensResponseSuccess);
682
+
683
+ export type HandleListGitTokensError = ({
684
+ message: string;
685
+ });
686
+
687
+ export type HandleCreateGitTokenData = {
688
+ path: {
689
+ identity: string;
690
+ };
691
+ };
692
+
693
+ export type HandleCreateGitTokenResponse = (CreatedToken);
694
+
695
+ export type HandleCreateGitTokenError = ({
696
+ message: string;
697
+ });
698
+
699
+ export type HandleRevokeGitTokenData = {
700
+ body: RevokeGitTokenRequest;
701
+ path: {
702
+ identity: string;
380
703
  };
381
704
  };
382
705
 
383
- export type ListRepositoriesHandlerResponse = ({
706
+ export type HandleRevokeGitTokenResponse = ({
707
+ [key: string]: unknown;
708
+ });
709
+
710
+ export type HandleRevokeGitTokenError = ({
711
+ message: string;
712
+ });
713
+
714
+ export type HandleListRepositoriesData = {
715
+ query?: {
716
+ /**
717
+ * Maximum number of repositories to return
718
+ */
719
+ limit?: number;
720
+ /**
721
+ * Offset for the list of repositories
722
+ */
723
+ offset?: number;
724
+ };
725
+ };
726
+
727
+ export type HandleListRepositoriesResponse = ({
384
728
  repositories: Array<RepositoryInfo>;
385
729
  offset: number;
386
730
  });
387
731
 
388
- export type ListRepositoriesHandlerError = (string);
732
+ export type HandleListRepositoriesError = ({
733
+ message: string;
734
+ });
389
735
 
390
- export type CreateRepoHandlerData = {
736
+ export type HandleCreateRepoData = {
391
737
  body: CreateRepositoryRequest;
392
738
  };
393
739
 
394
- export type CreateRepoHandlerResponse = ({
395
- repo_id: string;
740
+ export type HandleCreateRepoResponse = (CreateRepositoryResponseSuccess);
741
+
742
+ export type HandleCreateRepoError = ({
743
+ message: string;
744
+ });
745
+
746
+ export type HandleDeleteRepoData = {
747
+ path: {
748
+ /**
749
+ * The repository id
750
+ */
751
+ repo: string;
752
+ };
753
+ };
754
+
755
+ export type HandleDeleteRepoResponse = ({
756
+ [key: string]: unknown;
757
+ });
758
+
759
+ export type HandleDeleteRepoError = ({
760
+ message: string;
761
+ } | {
762
+ [key: string]: unknown;
763
+ });
764
+
765
+ export type HandleListGitTriggersData = {
766
+ path: {
767
+ /**
768
+ * The repository id
769
+ */
770
+ repo: string;
771
+ };
772
+ };
773
+
774
+ export type HandleListGitTriggersResponse = ({
775
+ triggers: Array<GitRepositoryTrigger>;
396
776
  });
397
777
 
398
- export type CreateRepoHandlerError = (string | unknown);
778
+ export type HandleListGitTriggersError = ({
779
+ message: string;
780
+ });
399
781
 
400
- export type DeleteRepoHandlerData = {
782
+ export type HandleCreateGitTriggerData = {
783
+ body: {
784
+ trigger: ({
785
+ branches?: Array<(string)> | null;
786
+ globs?: Array<(string)> | null;
787
+ event: 'push';
788
+ });
789
+ action: ({
790
+ endpoint: string;
791
+ action: 'webhook';
792
+ });
793
+ };
401
794
  path: {
402
795
  /**
403
796
  * The repository id
@@ -406,9 +799,36 @@ export type DeleteRepoHandlerData = {
406
799
  };
407
800
  };
408
801
 
409
- export type DeleteRepoHandlerResponse = (unknown);
802
+ export type HandleCreateGitTriggerResponse = ({
803
+ triggerId: string;
804
+ });
410
805
 
411
- export type DeleteRepoHandlerError = (string | unknown);
806
+ export type HandleCreateGitTriggerError = ({
807
+ message: string;
808
+ });
809
+
810
+ export type HandleDeleteGitTriggerData = {
811
+ path: {
812
+ /**
813
+ * The repository id
814
+ */
815
+ repo: string;
816
+ /**
817
+ * The trigger id
818
+ */
819
+ trigger: string;
820
+ };
821
+ };
822
+
823
+ export type HandleDeleteGitTriggerResponse = ({
824
+ [key: string]: unknown;
825
+ });
826
+
827
+ export type HandleDeleteGitTriggerError = ({
828
+ message: string;
829
+ } | {
830
+ [key: string]: unknown;
831
+ });
412
832
 
413
833
  export type HandleGetLogsData = {
414
834
  query?: {