freestyle-sandboxes 0.0.45 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/inde.d.cts +71 -0
- package/dist/ai/inde.d.mts +71 -0
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/expo/inde.d.cts +6 -0
- package/dist/expo/inde.d.mts +6 -0
- package/dist/inde.d.cts +192 -0
- package/dist/inde.d.mts +192 -0
- package/dist/index.cjs +160 -49
- package/dist/index.d.cts +83 -47
- package/dist/index.d.mts +83 -47
- package/dist/index.mjs +160 -49
- package/dist/langgraph/inde.d.cts +2162 -0
- package/dist/langgraph/inde.d.mts +2162 -0
- package/dist/langgraph/index.d.cts +1 -1
- package/dist/langgraph/index.d.mts +1 -1
- package/dist/mastra/inde.d.cts +2623 -0
- package/dist/mastra/inde.d.mts +2623 -0
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/react/dev-server/index..d.cts +28 -0
- package/dist/react/dev-server/index..d.mts +28 -0
- package/dist/react/dev-server/index.cjs +83 -0
- package/dist/react/dev-server/index.d.cts +28 -0
- package/dist/react/dev-server/index.d.mts +28 -0
- package/dist/react/dev-server/index.mjs +80 -0
- package/dist/types.gen-CIf3ciN7.d.ts +807 -0
- package/dist/utils/inde.d.cts +10 -0
- package/dist/utils/inde.d.mts +10 -0
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/openapi/types.gen.ts +27 -6
- package/openapi.json +4649 -1
- package/package.json +14 -2
- package/src/index.ts +222 -105
- package/src/react/dev-server/index.tsx +111 -0
- package/src/react/dev-server/types.ts +5 -0
- package/tsconfig.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -51,6 +51,12 @@ const handleDeleteDomainVerification = (options) => {
|
|
|
51
51
|
url: "/domains/v1/verifications"
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
+
const handleEphemeralDevServer = (options) => {
|
|
55
|
+
return (options?.client ?? client).post({
|
|
56
|
+
...options,
|
|
57
|
+
url: "/ephemeral/v1/dev-servers"
|
|
58
|
+
});
|
|
59
|
+
};
|
|
54
60
|
const handleListExecuteRuns = (options) => {
|
|
55
61
|
return (options?.client ?? client).get({
|
|
56
62
|
...options,
|
|
@@ -147,6 +153,24 @@ const handleDeleteRepo = (options) => {
|
|
|
147
153
|
url: "/git/v1/repo/{repo}"
|
|
148
154
|
});
|
|
149
155
|
};
|
|
156
|
+
const handleListGitTriggers = (options) => {
|
|
157
|
+
return (options?.client ?? client).get({
|
|
158
|
+
...options,
|
|
159
|
+
url: "/git/v1/repo/{repo}/trigger"
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
const handleCreateGitTrigger = (options) => {
|
|
163
|
+
return (options?.client ?? client).post({
|
|
164
|
+
...options,
|
|
165
|
+
url: "/git/v1/repo/{repo}/trigger"
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
const handleDeleteGitTrigger = (options) => {
|
|
169
|
+
return (options?.client ?? client).delete({
|
|
170
|
+
...options,
|
|
171
|
+
url: "/git/v1/repo/{repo}/trigger/{trigger}"
|
|
172
|
+
});
|
|
173
|
+
};
|
|
150
174
|
const handleGetLogs = (options) => {
|
|
151
175
|
return (options?.client ?? client).get({
|
|
152
176
|
...options,
|
|
@@ -429,14 +453,18 @@ ${response.error.message}`);
|
|
|
429
453
|
}
|
|
430
454
|
/**
|
|
431
455
|
* Create a new git repository.
|
|
432
|
-
*
|
|
433
|
-
* @param name The name of the repository.
|
|
434
456
|
*/
|
|
435
|
-
async createGitRepository(
|
|
457
|
+
async createGitRepository({
|
|
458
|
+
name,
|
|
459
|
+
public: pub = false,
|
|
460
|
+
source
|
|
461
|
+
}) {
|
|
436
462
|
const response = await handleCreateRepo({
|
|
437
463
|
client: this.client,
|
|
438
464
|
body: {
|
|
439
|
-
name
|
|
465
|
+
name,
|
|
466
|
+
public: pub,
|
|
467
|
+
source
|
|
440
468
|
}
|
|
441
469
|
});
|
|
442
470
|
if (response.data) {
|
|
@@ -448,16 +476,16 @@ ${response.error.message}`);
|
|
|
448
476
|
}
|
|
449
477
|
/**
|
|
450
478
|
* List git repositories.
|
|
451
|
-
*
|
|
452
|
-
* @param limit The maximum number of repositories to return. Defaults to 10.
|
|
453
|
-
* @param offset The offset to start at. Defaults to 0.
|
|
454
479
|
*/
|
|
455
|
-
async listGitRepositories(
|
|
480
|
+
async listGitRepositories({
|
|
481
|
+
limit = 10,
|
|
482
|
+
offset = 0
|
|
483
|
+
} = {}) {
|
|
456
484
|
const response = await handleListRepositories({
|
|
457
485
|
client: this.client,
|
|
458
486
|
query: {
|
|
459
|
-
limit
|
|
460
|
-
offset
|
|
487
|
+
limit,
|
|
488
|
+
offset
|
|
461
489
|
}
|
|
462
490
|
});
|
|
463
491
|
if (response.data) {
|
|
@@ -467,21 +495,21 @@ ${response.error.message}`);
|
|
|
467
495
|
}
|
|
468
496
|
/**
|
|
469
497
|
* Delete a git repository.
|
|
470
|
-
*
|
|
471
|
-
* @param repositoryId The ID of the repository to delete.
|
|
472
498
|
*/
|
|
473
|
-
async deleteGitRepository(
|
|
499
|
+
async deleteGitRepository({
|
|
500
|
+
repoId
|
|
501
|
+
}) {
|
|
474
502
|
const response = await handleDeleteRepo({
|
|
475
503
|
client: this.client,
|
|
476
504
|
path: {
|
|
477
|
-
repo:
|
|
505
|
+
repo: repoId
|
|
478
506
|
}
|
|
479
507
|
});
|
|
480
508
|
if (response.data) {
|
|
481
509
|
return response.data;
|
|
482
510
|
}
|
|
483
511
|
throw new Error(
|
|
484
|
-
`Failed to delete git repository ${
|
|
512
|
+
`Failed to delete git repository ${repoId}: ${response.error}`
|
|
485
513
|
);
|
|
486
514
|
}
|
|
487
515
|
/**
|
|
@@ -498,10 +526,10 @@ ${response.error.message}`);
|
|
|
498
526
|
}
|
|
499
527
|
/**
|
|
500
528
|
* Delete a git identity.
|
|
501
|
-
*
|
|
502
|
-
* @param identityId The ID of the identity to delete.
|
|
503
529
|
*/
|
|
504
|
-
async deleteGitIdentity(
|
|
530
|
+
async deleteGitIdentity({
|
|
531
|
+
identityId
|
|
532
|
+
}) {
|
|
505
533
|
const response = await handleDeleteIdentity({
|
|
506
534
|
client: this.client,
|
|
507
535
|
path: {
|
|
@@ -515,12 +543,12 @@ ${response.error.message}`);
|
|
|
515
543
|
}
|
|
516
544
|
/**
|
|
517
545
|
* Grant a git identity access to a repository.
|
|
518
|
-
*
|
|
519
|
-
* @param repoId The ID of the repository to grant access to.
|
|
520
|
-
* @param identityId The ID of the identity grant access to `repoId`.
|
|
521
|
-
* @param permission The permission to grant.
|
|
522
546
|
*/
|
|
523
|
-
async grantGitPermission(
|
|
547
|
+
async grantGitPermission({
|
|
548
|
+
repoId,
|
|
549
|
+
identityId,
|
|
550
|
+
permission
|
|
551
|
+
}) {
|
|
524
552
|
const response = await handleGrantPermission({
|
|
525
553
|
client: this.client,
|
|
526
554
|
path: {
|
|
@@ -540,12 +568,12 @@ ${response.error.message}`);
|
|
|
540
568
|
}
|
|
541
569
|
/**
|
|
542
570
|
* Update a git identity's permissions on a repository.
|
|
543
|
-
*
|
|
544
|
-
* @param repoId The ID of the repository to update permissions for.
|
|
545
|
-
* @param identityId The ID of the identity to whose access to update.
|
|
546
|
-
* @param permission The permission to grant.
|
|
547
571
|
*/
|
|
548
|
-
async updateGitPermission(
|
|
572
|
+
async updateGitPermission({
|
|
573
|
+
repoId,
|
|
574
|
+
identityId,
|
|
575
|
+
permission
|
|
576
|
+
}) {
|
|
549
577
|
const response = await handleUpdatePermission({
|
|
550
578
|
client: this.client,
|
|
551
579
|
path: {
|
|
@@ -565,11 +593,11 @@ ${response.error.message}`);
|
|
|
565
593
|
}
|
|
566
594
|
/**
|
|
567
595
|
* Revoke a git identity's access to a repository.
|
|
568
|
-
*
|
|
569
|
-
* @param repoId The ID of the repository revoke access to.
|
|
570
|
-
* @param identityId The ID of the identity to revoke access from.
|
|
571
596
|
*/
|
|
572
|
-
async revokeGitPermission(
|
|
597
|
+
async revokeGitPermission({
|
|
598
|
+
repoId,
|
|
599
|
+
identityId
|
|
600
|
+
}) {
|
|
573
601
|
const response = await handleRevokePermission({
|
|
574
602
|
client: this.client,
|
|
575
603
|
path: {
|
|
@@ -586,10 +614,10 @@ ${response.error.message}`);
|
|
|
586
614
|
}
|
|
587
615
|
/**
|
|
588
616
|
* List access permissions for a git identity.
|
|
589
|
-
*
|
|
590
|
-
* @param identityId The ID of the identity to list permissions for.
|
|
591
617
|
*/
|
|
592
|
-
async listGitPermissions(
|
|
618
|
+
async listGitPermissions({
|
|
619
|
+
identityId
|
|
620
|
+
}) {
|
|
593
621
|
const response = await handleListPermissions({
|
|
594
622
|
client: this.client,
|
|
595
623
|
path: {
|
|
@@ -605,11 +633,11 @@ ${response.error.message}`);
|
|
|
605
633
|
}
|
|
606
634
|
/**
|
|
607
635
|
* Get the permission of a git identity on a repository.
|
|
608
|
-
*
|
|
609
|
-
* @param repoId The ID of the repository to check permissions for.
|
|
610
|
-
* @param identityId The ID of the identity to check permissions for.
|
|
611
636
|
*/
|
|
612
|
-
async getGitPermission(
|
|
637
|
+
async getGitPermission({
|
|
638
|
+
repoId,
|
|
639
|
+
identityId
|
|
640
|
+
}) {
|
|
613
641
|
const response = await handleDescribePermission({
|
|
614
642
|
client: this.client,
|
|
615
643
|
path: {
|
|
@@ -626,10 +654,10 @@ ${response.error.message}`);
|
|
|
626
654
|
}
|
|
627
655
|
/**
|
|
628
656
|
* Create a new git access token for an identity.
|
|
629
|
-
*
|
|
630
|
-
* @param identityId The ID of the identity to create the token for.
|
|
631
657
|
*/
|
|
632
|
-
async createGitAccessToken(
|
|
658
|
+
async createGitAccessToken({
|
|
659
|
+
identityId
|
|
660
|
+
}) {
|
|
633
661
|
const response = await handleCreateGitToken({
|
|
634
662
|
client: this.client,
|
|
635
663
|
path: {
|
|
@@ -645,11 +673,11 @@ ${response.error.message}`);
|
|
|
645
673
|
}
|
|
646
674
|
/**
|
|
647
675
|
* Revoke a git access token.
|
|
648
|
-
*
|
|
649
|
-
* @param identityId The ID of the identity the token belongs to.
|
|
650
|
-
* @param tokenId The ID of the token to revoke.
|
|
651
676
|
*/
|
|
652
|
-
async revokeGitAccessToken(
|
|
677
|
+
async revokeGitAccessToken({
|
|
678
|
+
identityId,
|
|
679
|
+
tokenId
|
|
680
|
+
}) {
|
|
653
681
|
const response = await handleRevokeGitToken({
|
|
654
682
|
client: this.client,
|
|
655
683
|
body: {
|
|
@@ -668,10 +696,10 @@ ${response.error.message}`);
|
|
|
668
696
|
}
|
|
669
697
|
/**
|
|
670
698
|
* List git access tokens for an identity.
|
|
671
|
-
*
|
|
672
|
-
* @param identityId The ID of the identity to list tokens for.
|
|
673
699
|
*/
|
|
674
|
-
async listGitAccessTokens(
|
|
700
|
+
async listGitAccessTokens({
|
|
701
|
+
identityId
|
|
702
|
+
}) {
|
|
675
703
|
const response = await handleListGitTokens({
|
|
676
704
|
client: this.client,
|
|
677
705
|
path: {
|
|
@@ -685,6 +713,89 @@ ${response.error.message}`);
|
|
|
685
713
|
`Failed to list git access tokens: ${response.error.message}`
|
|
686
714
|
);
|
|
687
715
|
}
|
|
716
|
+
/**
|
|
717
|
+
* List git triggers for a repository.
|
|
718
|
+
*/
|
|
719
|
+
async listGitTriggers({
|
|
720
|
+
repoId
|
|
721
|
+
}) {
|
|
722
|
+
const response = await handleListGitTriggers({
|
|
723
|
+
client: this.client,
|
|
724
|
+
path: {
|
|
725
|
+
repo: repoId
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
if (response.data) {
|
|
729
|
+
return response.data;
|
|
730
|
+
}
|
|
731
|
+
throw new Error(
|
|
732
|
+
`Failed to list git triggers for repository ${repoId}: ${response.error.message}`
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Create a git trigger for a repository.
|
|
737
|
+
*/
|
|
738
|
+
async createGitTrigger({
|
|
739
|
+
repoId,
|
|
740
|
+
trigger,
|
|
741
|
+
action
|
|
742
|
+
}) {
|
|
743
|
+
const response = await handleCreateGitTrigger({
|
|
744
|
+
client: this.client,
|
|
745
|
+
path: {
|
|
746
|
+
repo: repoId
|
|
747
|
+
},
|
|
748
|
+
body: {
|
|
749
|
+
trigger,
|
|
750
|
+
action
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
if (response.data) {
|
|
754
|
+
return response.data;
|
|
755
|
+
}
|
|
756
|
+
throw new Error(
|
|
757
|
+
`Failed to create git trigger for repository ${repoId}: ${response.error.message}`
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* Delete a git trigger.
|
|
762
|
+
*/
|
|
763
|
+
async deleteGitTrigger({ triggerId }) {
|
|
764
|
+
const response = await handleDeleteGitTrigger({
|
|
765
|
+
client: this.client,
|
|
766
|
+
path: {
|
|
767
|
+
trigger: triggerId
|
|
768
|
+
}
|
|
769
|
+
});
|
|
770
|
+
if (response.data) {
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
throw new Error(
|
|
774
|
+
`Failed to delete git trigger ${triggerId}: ${response.error.message}`
|
|
775
|
+
);
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* Request a dev server for a repository. If a dev server is already running
|
|
779
|
+
* for that repository, it will return a url to that server. Dev servers are
|
|
780
|
+
* ephemeral so you should call this function every time you need a url. Do
|
|
781
|
+
* not store the url in your database!
|
|
782
|
+
*/
|
|
783
|
+
async requestDevServer({
|
|
784
|
+
repoUrl
|
|
785
|
+
}) {
|
|
786
|
+
const response = await handleEphemeralDevServer({
|
|
787
|
+
client: this.client,
|
|
788
|
+
body: {
|
|
789
|
+
repo: repoUrl
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
if (!response.data) {
|
|
793
|
+
throw new Error(
|
|
794
|
+
`Failed to request dev server: ${response.error}`
|
|
795
|
+
);
|
|
796
|
+
}
|
|
797
|
+
return response.data;
|
|
798
|
+
}
|
|
688
799
|
}
|
|
689
800
|
|
|
690
801
|
exports.FreestyleSandboxes = FreestyleSandboxes;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, B as BuildOptions, c as FreestyleDeployWebSuccessResponseV2, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse, g as HandleCreateDomainVerificationResponse, h as HandleVerifyDomainResponse, i as HandleVerifyDomainError, j as HandleListDomainsResponse, k as HandleListDomainVerificationRequestsResponse, l as HandleDeleteDomainVerificationResponse, m as HandleListWebDeploysResponse, n as HandleListExecuteRunsResponse, o as HandleGetExecuteRunResponse, p as HandleVerifyWildcardResponse, C as CreateRepositoryResponseSuccess, q as HandleListRepositoriesResponse, r as HandleDeleteRepoResponse, G as GitIdentity, s as HandleDeleteIdentityResponse, A as AccessLevel, t as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, u as DescribePermissionResponseSuccess, v as CreatedToken, w as ListGitTokensResponseSuccess } from './types.gen-
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, B as BuildOptions, c as FreestyleDeployWebSuccessResponseV2, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse, g as HandleCreateDomainVerificationResponse, h as HandleVerifyDomainResponse, i as HandleVerifyDomainError, j as HandleListDomainsResponse, k as HandleListDomainVerificationRequestsResponse, l as HandleDeleteDomainVerificationResponse, m as HandleListWebDeploysResponse, n as HandleListExecuteRunsResponse, o as HandleGetExecuteRunResponse, p as HandleVerifyWildcardResponse, C as CreateRepositoryResponseSuccess, q as HandleListRepositoriesResponse, r as HandleDeleteRepoResponse, G as GitIdentity, s as HandleDeleteIdentityResponse, A as AccessLevel, t as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, u as DescribePermissionResponseSuccess, v as CreatedToken, w as ListGitTokensResponseSuccess, x as HandleListGitTriggersResponse, y as GitTrigger, z as GitTriggerAction, E as HandleCreateGitTriggerResponse, I as HandleEphemeralDevServerResponse } from './types.gen-CIf3ciN7.js';
|
|
2
|
+
export { K as AccessTokenInfo, J as AccessibleRepository, M as Behavior, N as CreateDomainMappingRequest, O as CreateRecordParams, P as CreateRepoRequest, R as CreateRepoSource, Q as CreateRepositoryRequest, T as DeploymentLogEntry, V as DeploymentState, W as DevServer, X as DnsRecord, Y as DnsRecordData, Z as DnsRecordKind, _ as DomainVerificationRequest, $ as ExecuteLogEntry, a0 as ExecuteRunInfo, a1 as ExecuteRunState, a2 as FreestyleCloudstateDeployConfiguration, a3 as FreestyleCloudstateDeployErrorResponse, a4 as FreestyleDeleteDomainVerificationRequest, a5 as FreestyleDeployWebErrorResponse, a6 as FreestyleDeployWebPayload, a7 as FreestyleDeployWebPayloadV2, a8 as FreestyleDomainVerificationRequest, a9 as FreestyleExecuteScriptParams, aa as FreestyleFile, ab as FreestyleGetLogsResponse, ac as FreestyleJavaScriptLog, ad as FreestyleLogResponseObject, ae as FreestyleNetworkPermission, ag as FreestyleVerifyDomainRequest, ah as GitRepositoryTrigger, ak as GrantPermissionRequest, av as HandleBackupCloudstateData, aw as HandleBackupCloudstateError, aR as HandleCreateDomainVerificationData, aS as HandleCreateDomainVerificationError, bn as HandleCreateGitTokenData, bp as HandleCreateGitTokenError, bo as HandleCreateGitTokenResponse, bC as HandleCreateGitTriggerData, bD as HandleCreateGitTriggerError, b3 as HandleCreateIdentityError, b2 as HandleCreateIdentityResponse, aA as HandleCreateRecordData, aC as HandleCreateRecordError, aB as HandleCreateRecordResponse, bv as HandleCreateRepoData, bx as HandleCreateRepoError, bw as HandleCreateRepoResponse, aM as HandleDeleteDomainMappingData, aO as HandleDeleteDomainMappingError, aN as HandleDeleteDomainMappingResponse, aT as HandleDeleteDomainVerificationData, aU as HandleDeleteDomainVerificationError, bE as HandleDeleteGitTriggerData, bG as HandleDeleteGitTriggerError, bF as HandleDeleteGitTriggerResponse, b4 as HandleDeleteIdentityData, b5 as HandleDeleteIdentityError, aD as HandleDeleteRecordData, aF as HandleDeleteRecordError, aE as HandleDeleteRecordResponse, by as HandleDeleteRepoData, bz as HandleDeleteRepoError, as as HandleDeployCloudstateData, au as HandleDeployCloudstateError, at as HandleDeployCloudstateResponse, bJ as HandleDeployWebData, bL as HandleDeployWebError, bK as HandleDeployWebResponse, bM as HandleDeployWebV2Data, bO as HandleDeployWebV2Error, bN as HandleDeployWebV2Response, b9 as HandleDescribePermissionData, bb as HandleDescribePermissionError, ba as HandleDescribePermissionResponse, aV as HandleEphemeralDevServerData, aW as HandleEphemeralDevServerError, a$ as HandleExecuteScriptData, b1 as HandleExecuteScriptError, b0 as HandleExecuteScriptResponse, aZ as HandleGetExecuteRunData, a_ as HandleGetExecuteRunError, bH as HandleGetLogsData, bI as HandleGetLogsError, bR as HandleGetWebDeployDetailsData, bc as HandleGrantPermissionData, bd as HandleGrantPermissionError, aJ as HandleInsertDomainMappingData, aL as HandleInsertDomainMappingError, aK as HandleInsertDomainMappingResponse, aP as HandleListDomainVerificationRequestsError, aI as HandleListDomainsError, aX as HandleListExecuteRunsData, aY as HandleListExecuteRunsError, bk as HandleListGitTokensData, bm as HandleListGitTokensError, bl as HandleListGitTokensResponse, bA as HandleListGitTriggersData, bB as HandleListGitTriggersError, b6 as HandleListPermissionsData, b8 as HandleListPermissionsError, b7 as HandleListPermissionsResponse, ax as HandleListRecordsData, az as HandleListRecordsError, ay as HandleListRecordsResponse, bt as HandleListRepositoriesData, bu as HandleListRepositoriesError, bP as HandleListWebDeploysData, bQ as HandleListWebDeploysError, bq as HandleRevokeGitTokenData, bs as HandleRevokeGitTokenError, br as HandleRevokeGitTokenResponse, be as HandleRevokePermissionData, bg as HandleRevokePermissionError, bf as HandleRevokePermissionResponse, bh as HandleUpdatePermissionData, bj as HandleUpdatePermissionError, bi as HandleUpdatePermissionResponse, aQ as HandleVerifyDomainData, aG as HandleVerifyWildcardData, aH as HandleVerifyWildcardError, al as InternalServerError, am as ListRecordsResponse, an as NetworkPermissionData, ao as RepositoryInfo, ap as RevokeGitTokenRequest, aq as UpdatePermissionRequest, ar as Visibility, af as action, aj as action2, ai as event, U as kind, S as type } from './types.gen-CIf3ciN7.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -69,88 +69,124 @@ declare class FreestyleSandboxes {
|
|
|
69
69
|
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
70
70
|
/**
|
|
71
71
|
* Create a new git repository.
|
|
72
|
-
*
|
|
73
|
-
* @param name The name of the repository.
|
|
74
72
|
*/
|
|
75
|
-
createGitRepository(name:
|
|
73
|
+
createGitRepository({ name, public: pub, source, }: {
|
|
74
|
+
name: string;
|
|
75
|
+
public?: boolean;
|
|
76
|
+
source?: {
|
|
77
|
+
type: "git";
|
|
78
|
+
url: string;
|
|
79
|
+
branch?: string;
|
|
80
|
+
depth?: number;
|
|
81
|
+
};
|
|
82
|
+
}): Promise<CreateRepositoryResponseSuccess>;
|
|
76
83
|
/**
|
|
77
84
|
* List git repositories.
|
|
78
|
-
*
|
|
79
|
-
* @param limit The maximum number of repositories to return. Defaults to 10.
|
|
80
|
-
* @param offset The offset to start at. Defaults to 0.
|
|
81
85
|
*/
|
|
82
|
-
listGitRepositories(limit
|
|
86
|
+
listGitRepositories({ limit, offset, }?: {
|
|
87
|
+
limit?: number;
|
|
88
|
+
offset?: number;
|
|
89
|
+
}): Promise<HandleListRepositoriesResponse>;
|
|
83
90
|
/**
|
|
84
91
|
* Delete a git repository.
|
|
85
|
-
*
|
|
86
|
-
* @param repositoryId The ID of the repository to delete.
|
|
87
92
|
*/
|
|
88
|
-
deleteGitRepository(
|
|
93
|
+
deleteGitRepository({ repoId, }: {
|
|
94
|
+
repoId: string;
|
|
95
|
+
}): Promise<HandleDeleteRepoResponse>;
|
|
89
96
|
/**
|
|
90
97
|
* Create a new git identity.
|
|
91
98
|
*/
|
|
92
99
|
createGitIdentity(): Promise<GitIdentity>;
|
|
93
100
|
/**
|
|
94
101
|
* Delete a git identity.
|
|
95
|
-
*
|
|
96
|
-
* @param identityId The ID of the identity to delete.
|
|
97
102
|
*/
|
|
98
|
-
deleteGitIdentity(identityId
|
|
103
|
+
deleteGitIdentity({ identityId, }: {
|
|
104
|
+
identityId: string;
|
|
105
|
+
}): Promise<HandleDeleteIdentityResponse>;
|
|
99
106
|
/**
|
|
100
107
|
* Grant a git identity access to a repository.
|
|
101
|
-
*
|
|
102
|
-
* @param repoId The ID of the repository to grant access to.
|
|
103
|
-
* @param identityId The ID of the identity grant access to `repoId`.
|
|
104
|
-
* @param permission The permission to grant.
|
|
105
108
|
*/
|
|
106
|
-
grantGitPermission(repoId
|
|
109
|
+
grantGitPermission({ repoId, identityId, permission, }: {
|
|
110
|
+
repoId: string;
|
|
111
|
+
identityId: string;
|
|
112
|
+
permission: AccessLevel;
|
|
113
|
+
}): Promise<HandleGrantPermissionResponse>;
|
|
107
114
|
/**
|
|
108
115
|
* Update a git identity's permissions on a repository.
|
|
109
|
-
*
|
|
110
|
-
* @param repoId The ID of the repository to update permissions for.
|
|
111
|
-
* @param identityId The ID of the identity to whose access to update.
|
|
112
|
-
* @param permission The permission to grant.
|
|
113
116
|
*/
|
|
114
|
-
updateGitPermission(repoId
|
|
117
|
+
updateGitPermission({ repoId, identityId, permission, }: {
|
|
118
|
+
repoId: string;
|
|
119
|
+
identityId: string;
|
|
120
|
+
permission: AccessLevel;
|
|
121
|
+
}): Promise<void>;
|
|
115
122
|
/**
|
|
116
123
|
* Revoke a git identity's access to a repository.
|
|
117
|
-
*
|
|
118
|
-
* @param repoId The ID of the repository revoke access to.
|
|
119
|
-
* @param identityId The ID of the identity to revoke access from.
|
|
120
124
|
*/
|
|
121
|
-
revokeGitPermission(repoId
|
|
125
|
+
revokeGitPermission({ repoId, identityId, }: {
|
|
126
|
+
repoId: string;
|
|
127
|
+
identityId: string;
|
|
128
|
+
}): Promise<void>;
|
|
122
129
|
/**
|
|
123
130
|
* List access permissions for a git identity.
|
|
124
|
-
*
|
|
125
|
-
* @param identityId The ID of the identity to list permissions for.
|
|
126
131
|
*/
|
|
127
|
-
listGitPermissions(identityId
|
|
132
|
+
listGitPermissions({ identityId, }: {
|
|
133
|
+
identityId: string;
|
|
134
|
+
}): Promise<ListPermissionResponseSuccess>;
|
|
128
135
|
/**
|
|
129
136
|
* Get the permission of a git identity on a repository.
|
|
130
|
-
*
|
|
131
|
-
* @param repoId The ID of the repository to check permissions for.
|
|
132
|
-
* @param identityId The ID of the identity to check permissions for.
|
|
133
137
|
*/
|
|
134
|
-
getGitPermission(repoId
|
|
138
|
+
getGitPermission({ repoId, identityId, }: {
|
|
139
|
+
repoId: string;
|
|
140
|
+
identityId: string;
|
|
141
|
+
}): Promise<DescribePermissionResponseSuccess>;
|
|
135
142
|
/**
|
|
136
143
|
* Create a new git access token for an identity.
|
|
137
|
-
*
|
|
138
|
-
* @param identityId The ID of the identity to create the token for.
|
|
139
144
|
*/
|
|
140
|
-
createGitAccessToken(identityId
|
|
145
|
+
createGitAccessToken({ identityId, }: {
|
|
146
|
+
identityId: string;
|
|
147
|
+
}): Promise<CreatedToken>;
|
|
141
148
|
/**
|
|
142
149
|
* Revoke a git access token.
|
|
143
|
-
*
|
|
144
|
-
* @param identityId The ID of the identity the token belongs to.
|
|
145
|
-
* @param tokenId The ID of the token to revoke.
|
|
146
150
|
*/
|
|
147
|
-
revokeGitAccessToken(identityId
|
|
151
|
+
revokeGitAccessToken({ identityId, tokenId, }: {
|
|
152
|
+
identityId: string;
|
|
153
|
+
tokenId: string;
|
|
154
|
+
}): Promise<void>;
|
|
148
155
|
/**
|
|
149
156
|
* List git access tokens for an identity.
|
|
150
|
-
*
|
|
151
|
-
* @param identityId The ID of the identity to list tokens for.
|
|
152
157
|
*/
|
|
153
|
-
listGitAccessTokens(identityId
|
|
158
|
+
listGitAccessTokens({ identityId, }: {
|
|
159
|
+
identityId: string;
|
|
160
|
+
}): Promise<ListGitTokensResponseSuccess>;
|
|
161
|
+
/**
|
|
162
|
+
* List git triggers for a repository.
|
|
163
|
+
*/
|
|
164
|
+
listGitTriggers({ repoId, }: {
|
|
165
|
+
repoId: string;
|
|
166
|
+
}): Promise<HandleListGitTriggersResponse>;
|
|
167
|
+
/**
|
|
168
|
+
* Create a git trigger for a repository.
|
|
169
|
+
*/
|
|
170
|
+
createGitTrigger({ repoId, trigger, action, }: {
|
|
171
|
+
repoId: string;
|
|
172
|
+
trigger: GitTrigger;
|
|
173
|
+
action: GitTriggerAction;
|
|
174
|
+
}): Promise<HandleCreateGitTriggerResponse>;
|
|
175
|
+
/**
|
|
176
|
+
* Delete a git trigger.
|
|
177
|
+
*/
|
|
178
|
+
deleteGitTrigger({ triggerId }: {
|
|
179
|
+
triggerId: string;
|
|
180
|
+
}): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Request a dev server for a repository. If a dev server is already running
|
|
183
|
+
* for that repository, it will return a url to that server. Dev servers are
|
|
184
|
+
* ephemeral so you should call this function every time you need a url. Do
|
|
185
|
+
* not store the url in your database!
|
|
186
|
+
*/
|
|
187
|
+
requestDevServer({ repoUrl }: {
|
|
188
|
+
repoUrl: string;
|
|
189
|
+
}): Promise<HandleEphemeralDevServerResponse>;
|
|
154
190
|
}
|
|
155
191
|
|
|
156
|
-
export { AccessLevel, BuildOptions, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
|
192
|
+
export { AccessLevel, BuildOptions, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleEphemeralDevServerResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|