@hyperdrive.bot/cli 1.0.6 → 1.0.8
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/README.md +415 -67
- package/dist/commands/account/add.d.ts +6 -6
- package/dist/commands/account/list.d.ts +3 -0
- package/dist/commands/account/list.js +9 -2
- package/dist/commands/account/remove.d.ts +3 -3
- package/dist/commands/auth/login.d.ts +4 -4
- package/dist/commands/auth/login.js +1 -0
- package/dist/commands/ci/account/create.d.ts +7 -6
- package/dist/commands/ci/account/create.js +49 -3
- package/dist/commands/ci/account/delete.d.ts +3 -3
- package/dist/commands/ci/account/list.d.ts +2 -2
- package/dist/commands/config/get.d.ts +1 -1
- package/dist/commands/config/set.d.ts +2 -2
- package/dist/commands/deployment/create.d.ts +10 -10
- package/dist/commands/deployment/get.d.ts +4 -4
- package/dist/commands/deployment/launch.d.ts +6 -6
- package/dist/commands/deployment/list.d.ts +3 -3
- package/dist/commands/deployment/list.js +17 -17
- package/dist/commands/domain/switch.d.ts +1 -1
- package/dist/commands/example.d.ts +3 -3
- package/dist/commands/git/connect.d.ts +2 -2
- package/dist/commands/git/connect.js +1 -0
- package/dist/commands/git/disconnect.d.ts +3 -3
- package/dist/commands/git/list.d.ts +2 -2
- package/dist/commands/git/sync.d.ts +7 -7
- package/dist/commands/git/sync.js +24 -23
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +20 -19
- package/dist/commands/jira/connect.d.ts +2 -1
- package/dist/commands/jira/connect.js +17 -6
- package/dist/commands/jira/hook/add.d.ts +17 -0
- package/dist/commands/jira/hook/add.js +147 -0
- package/dist/commands/jira/hook/list.d.ts +14 -0
- package/dist/commands/jira/hook/list.js +105 -0
- package/dist/commands/jira/hook/remove.d.ts +15 -0
- package/dist/commands/jira/hook/remove.js +119 -0
- package/dist/commands/jira/hook/toggle.d.ts +15 -0
- package/dist/commands/jira/hook/toggle.js +136 -0
- package/dist/commands/jira/status.d.ts +1 -1
- package/dist/commands/module/analyze.d.ts +5 -5
- package/dist/commands/module/create.d.ts +17 -17
- package/dist/commands/module/create.js +9 -1
- package/dist/commands/module/destroy.d.ts +3 -3
- package/dist/commands/module/get.d.ts +2 -2
- package/dist/commands/module/link.d.ts +4 -4
- package/dist/commands/module/list.d.ts +1 -1
- package/dist/commands/module/list.js +12 -11
- package/dist/commands/module/reanalyze.d.ts +6 -6
- package/dist/commands/module/update.d.ts +19 -19
- package/dist/commands/parameter/add.d.ts +7 -7
- package/dist/commands/parameter/backfill.d.ts +4 -4
- package/dist/commands/parameter/backfill.js +4 -3
- package/dist/commands/parameter/clear.d.ts +6 -6
- package/dist/commands/parameter/list.d.ts +6 -6
- package/dist/commands/parameter/list.js +4 -3
- package/dist/commands/parameter/pull.d.ts +6 -6
- package/dist/commands/parameter/remove.d.ts +7 -7
- package/dist/commands/parameter/sync.d.ts +6 -6
- package/dist/commands/parameter/update.d.ts +7 -7
- package/dist/commands/project/init.d.ts +21 -0
- package/dist/commands/project/init.js +576 -0
- package/dist/commands/project/list.d.ts +10 -0
- package/dist/commands/project/list.js +119 -0
- package/dist/commands/project/status.d.ts +13 -0
- package/dist/commands/project/status.js +163 -0
- package/dist/commands/project/sync.d.ts +26 -0
- package/dist/commands/project/sync.js +388 -0
- package/dist/commands/stage/access.d.ts +15 -0
- package/dist/commands/stage/access.js +130 -0
- package/dist/commands/stage/create.d.ts +11 -11
- package/dist/commands/stage/list.d.ts +1 -1
- package/dist/commands/stage/list.js +21 -20
- package/dist/commands/stage/revoke.d.ts +18 -0
- package/dist/commands/stage/revoke.js +171 -0
- package/dist/commands/stage/share.d.ts +23 -0
- package/dist/commands/stage/share.js +292 -0
- package/dist/commands/test-api.d.ts +1 -1
- package/dist/services/auth-service.d.ts +15 -82
- package/dist/services/auth-service.js +24 -237
- package/dist/services/hyperdrive-sigv4.d.ts +162 -24
- package/dist/services/hyperdrive-sigv4.js +107 -193
- package/dist/services/tenant-service.d.ts +6 -0
- package/dist/services/tenant-service.js +13 -0
- package/dist/utils/account-flow.d.ts +2 -2
- package/dist/utils/account-flow.js +4 -4
- package/dist/utils/auth-flow.d.ts +1 -0
- package/dist/utils/auth-flow.js +2 -0
- package/dist/utils/git-flow.d.ts +1 -0
- package/dist/utils/git-flow.js +2 -2
- package/dist/utils/hook-flow.d.ts +21 -0
- package/dist/utils/hook-flow.js +154 -0
- package/dist/utils/jira-flow.d.ts +2 -2
- package/dist/utils/jira-flow.js +4 -4
- package/dist/utils/table.d.ts +17 -0
- package/dist/utils/table.js +41 -0
- package/oclif.manifest.json +844 -154
- package/package.json +59 -15
|
@@ -1,240 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Hyperdrive Authentication Service
|
|
3
|
+
*
|
|
4
|
+
* Re-exports from @devsquad/cli-auth with hyperdrive-specific configuration.
|
|
5
|
+
*/
|
|
6
|
+
import { AuthService as BaseAuthService, } from '@hyperdrive.bot/cli-auth';
|
|
7
|
+
// Hyperdrive-specific configuration
|
|
8
|
+
const HYPERDRIVE_AUTH_CONFIG = {
|
|
9
|
+
appName: 'hyperdrive',
|
|
10
|
+
defaultCognitoClientId: process.env.HYPERDRIVE_COGNITO_CLIENT_ID || '',
|
|
11
|
+
defaultCognitoDomain: process.env.HYPERDRIVE_COGNITO_DOMAIN || 'hyperdrive.auth.us-east-1.amazoncognito.com',
|
|
12
|
+
defaultIdentityPoolId: process.env.HYPERDRIVE_COGNITO_IDENTITY_POOL_ID || '',
|
|
13
|
+
defaultUserPoolId: process.env.HYPERDRIVE_COGNITO_USER_POOL_ID || '',
|
|
14
|
+
defaultRegion: process.env.HYPERDRIVE_AWS_REGION || 'us-east-1',
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Hyperdrive-specific AuthService
|
|
18
|
+
*
|
|
19
|
+
* Wrapper around @devsquad/cli-auth with hyperdrive defaults.
|
|
20
|
+
*/
|
|
21
|
+
export class AuthService extends BaseAuthService {
|
|
17
22
|
constructor(domain) {
|
|
18
|
-
|
|
19
|
-
this.domain = domain;
|
|
20
|
-
this.credPath = this.getCredentialsPath();
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Clear stored credentials
|
|
24
|
-
*/
|
|
25
|
-
clearCredentials() {
|
|
26
|
-
if (existsSync(this.credPath)) {
|
|
27
|
-
unlinkSync(this.credPath);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Ensure credentials are valid, refresh if needed
|
|
32
|
-
* Returns valid credentials or throws error
|
|
33
|
-
*/
|
|
34
|
-
async ensureValidCredentials() {
|
|
35
|
-
const credentials = this.loadCredentials();
|
|
36
|
-
if (!credentials) {
|
|
37
|
-
throw new Error('Not authenticated. Please run "hd auth login" first.');
|
|
38
|
-
}
|
|
39
|
-
// Auto-refresh if needed
|
|
40
|
-
if (this.needsRefresh(credentials)) {
|
|
41
|
-
if (!credentials.cognitoConfig) {
|
|
42
|
-
throw new Error('Cognito configuration not found. Please run "hd auth login" again.');
|
|
43
|
-
}
|
|
44
|
-
console.log('⏳ Credentials expiring soon, refreshing...');
|
|
45
|
-
const newTokens = await this.refreshTokens(credentials.refresh_token, credentials.cognitoConfig);
|
|
46
|
-
const newAwsCredentials = await this.getAWSCredentials(newTokens.id_token, credentials.region, credentials.cognitoConfig);
|
|
47
|
-
const updatedCredentials = {
|
|
48
|
-
...newTokens,
|
|
49
|
-
apiUrl: credentials.apiUrl,
|
|
50
|
-
awsCredentials: newAwsCredentials,
|
|
51
|
-
cognitoConfig: credentials.cognitoConfig,
|
|
52
|
-
obtainedAt: new Date().toISOString(),
|
|
53
|
-
region: credentials.region,
|
|
54
|
-
tenantDomain: credentials.tenantDomain,
|
|
55
|
-
tenantId: credentials.tenantId,
|
|
56
|
-
};
|
|
57
|
-
this.saveCredentials(updatedCredentials);
|
|
58
|
-
console.log('✅ Credentials refreshed automatically');
|
|
59
|
-
return updatedCredentials;
|
|
60
|
-
}
|
|
61
|
-
return credentials;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Get AWS credentials from Cognito Identity Pool using ID token
|
|
65
|
-
*/
|
|
66
|
-
async getAWSCredentials(idToken, region, cognitoConfig) {
|
|
67
|
-
const client = new CognitoIdentityClient({ region });
|
|
68
|
-
try {
|
|
69
|
-
// Step 1: Get Identity ID
|
|
70
|
-
const getIdResponse = await client.send(new GetIdCommand({
|
|
71
|
-
IdentityPoolId: cognitoConfig.identityPoolId,
|
|
72
|
-
Logins: {
|
|
73
|
-
[`cognito-idp.${region}.amazonaws.com/${cognitoConfig.userPoolId}`]: idToken,
|
|
74
|
-
},
|
|
75
|
-
}));
|
|
76
|
-
if (!getIdResponse.IdentityId) {
|
|
77
|
-
throw new Error('Failed to get Identity ID from Cognito');
|
|
78
|
-
}
|
|
79
|
-
// Step 2: Get temporary AWS credentials
|
|
80
|
-
const getCredentialsResponse = await client.send(new GetCredentialsForIdentityCommand({
|
|
81
|
-
IdentityId: getIdResponse.IdentityId,
|
|
82
|
-
Logins: {
|
|
83
|
-
[`cognito-idp.${region}.amazonaws.com/${cognitoConfig.userPoolId}`]: idToken,
|
|
84
|
-
},
|
|
85
|
-
}));
|
|
86
|
-
if (!getCredentialsResponse.Credentials) {
|
|
87
|
-
throw new Error('Failed to get AWS credentials from Cognito');
|
|
88
|
-
}
|
|
89
|
-
const { AccessKeyId, Expiration, SecretKey, SessionToken } = getCredentialsResponse.Credentials;
|
|
90
|
-
if (!AccessKeyId || !SecretKey || !SessionToken || !Expiration) {
|
|
91
|
-
throw new Error('Incomplete AWS credentials received from Cognito');
|
|
92
|
-
}
|
|
93
|
-
return {
|
|
94
|
-
accessKeyId: AccessKeyId,
|
|
95
|
-
expiration: Expiration,
|
|
96
|
-
secretAccessKey: SecretKey,
|
|
97
|
-
sessionToken: SessionToken,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
if (error instanceof Error) {
|
|
102
|
-
throw new Error(`Failed to obtain AWS credentials: ${error.message}`);
|
|
103
|
-
}
|
|
104
|
-
throw error;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Get all domains with stored credentials
|
|
109
|
-
*/
|
|
110
|
-
getCredentialDomains() {
|
|
111
|
-
try {
|
|
112
|
-
if (!existsSync(this.credDir)) {
|
|
113
|
-
return [];
|
|
114
|
-
}
|
|
115
|
-
const files = require('fs').readdirSync(this.credDir);
|
|
116
|
-
const domains = [];
|
|
117
|
-
for (const file of files) {
|
|
118
|
-
// Match files like "credentials.example.com"
|
|
119
|
-
const match = file.match(/^credentials\.(.+)$/);
|
|
120
|
-
if (match) {
|
|
121
|
-
domains.push(match[1]);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return domains;
|
|
125
|
-
}
|
|
126
|
-
catch (error) {
|
|
127
|
-
return [];
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Check if credentials are expired
|
|
132
|
-
*/
|
|
133
|
-
isExpired(credentials) {
|
|
134
|
-
const expiration = new Date(credentials.awsCredentials.expiration);
|
|
135
|
-
return new Date() >= expiration;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Load stored credentials from domain-specific path
|
|
139
|
-
*
|
|
140
|
-
* Always uses domain-specific credentials (credentials.<domain>)
|
|
141
|
-
* Domain is either explicitly specified or uses default domain
|
|
142
|
-
*/
|
|
143
|
-
loadCredentials() {
|
|
144
|
-
try {
|
|
145
|
-
if (!existsSync(this.credPath)) {
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
const data = readFileSync(this.credPath, 'utf8');
|
|
149
|
-
const credentials = JSON.parse(data);
|
|
150
|
-
// Convert expiration string back to Date object
|
|
151
|
-
credentials.awsCredentials.expiration = new Date(credentials.awsCredentials.expiration);
|
|
152
|
-
return credentials;
|
|
153
|
-
}
|
|
154
|
-
catch (error) {
|
|
155
|
-
console.error('Failed to load credentials:', error);
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Check if credentials need refresh
|
|
161
|
-
* Returns true if AWS credentials expire in less than 5 minutes
|
|
162
|
-
*/
|
|
163
|
-
needsRefresh(credentials) {
|
|
164
|
-
const expiration = new Date(credentials.awsCredentials.expiration);
|
|
165
|
-
const now = new Date();
|
|
166
|
-
const timeUntilExpiry = expiration.getTime() - now.getTime();
|
|
167
|
-
const fiveMinutes = 5 * 60 * 1000;
|
|
168
|
-
return timeUntilExpiry < fiveMinutes;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Refresh Cognito tokens using refresh token
|
|
172
|
-
*/
|
|
173
|
-
async refreshTokens(refreshToken, cognitoConfig) {
|
|
174
|
-
try {
|
|
175
|
-
const response = await axios.post(`https://${cognitoConfig.domain}/oauth2/token`, new URLSearchParams({
|
|
176
|
-
client_id: cognitoConfig.clientId,
|
|
177
|
-
grant_type: 'refresh_token',
|
|
178
|
-
refresh_token: refreshToken,
|
|
179
|
-
}), {
|
|
180
|
-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
181
|
-
});
|
|
182
|
-
// Cognito doesn't return a new refresh token on refresh, so we need to keep the old one
|
|
183
|
-
return {
|
|
184
|
-
...response.data,
|
|
185
|
-
refresh_token: refreshToken, // Preserve original refresh token
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
catch (error) {
|
|
189
|
-
if (axios.isAxiosError(error)) {
|
|
190
|
-
throw new Error(`Token refresh failed: ${error.response?.data?.error_description || error.message}`);
|
|
191
|
-
}
|
|
192
|
-
throw error;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Save credentials to ~/.hyperdrive/credentials
|
|
197
|
-
*/
|
|
198
|
-
saveCredentials(credentials) {
|
|
199
|
-
// Prevent saving test/mock credentials to production path
|
|
200
|
-
const testPatterns = ['test-client-id', 'us-east-1_TEST', 'test-identity', 'test.auth.amazoncognito'];
|
|
201
|
-
const credString = JSON.stringify(credentials);
|
|
202
|
-
for (const pattern of testPatterns) {
|
|
203
|
-
if (credString.includes(pattern)) {
|
|
204
|
-
throw new Error(`Refusing to save credentials containing test value: "${pattern}". This looks like test data.`);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
// Ensure directory exists
|
|
208
|
-
if (!existsSync(this.credDir)) {
|
|
209
|
-
mkdirSync(this.credDir, { recursive: true });
|
|
210
|
-
}
|
|
211
|
-
// Write with secure permissions (owner read/write only)
|
|
212
|
-
writeFileSync(this.credPath, JSON.stringify(credentials, null, 2), { mode: 0o600 });
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Get the credentials file path (always domain-specific)
|
|
216
|
-
*/
|
|
217
|
-
getCredentialsPath() {
|
|
218
|
-
const domain = this.domain || this.getDefaultDomain();
|
|
219
|
-
if (!domain) {
|
|
220
|
-
throw new Error('No domain specified and no default domain configured');
|
|
221
|
-
}
|
|
222
|
-
// Domain-specific credentials: ~/.hyperdrive/credentials.{domain}
|
|
223
|
-
return join(this.credDir, `credentials.${domain}`);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Get default domain from TenantService (avoid circular dependency by reading file directly)
|
|
227
|
-
*/
|
|
228
|
-
getDefaultDomain() {
|
|
229
|
-
try {
|
|
230
|
-
const defaultDomainPath = join(this.credDir, 'default-domain');
|
|
231
|
-
if (!existsSync(defaultDomainPath)) {
|
|
232
|
-
return null;
|
|
233
|
-
}
|
|
234
|
-
return readFileSync(defaultDomainPath, 'utf8').trim();
|
|
235
|
-
}
|
|
236
|
-
catch (error) {
|
|
237
|
-
return null;
|
|
238
|
-
}
|
|
23
|
+
super(HYPERDRIVE_AUTH_CONFIG, domain);
|
|
239
24
|
}
|
|
240
25
|
}
|
|
26
|
+
// Export config for use by HyperdriveSigV4Service
|
|
27
|
+
export { HYPERDRIVE_AUTH_CONFIG };
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hyperdrive API Service with AWS SigV4 authentication
|
|
3
|
+
*
|
|
4
|
+
* This service extends @devsquad/cli-auth SigV4ApiClient to provide
|
|
5
|
+
* hyperdrive-specific API methods with AWS Signature V4 signing.
|
|
6
|
+
*/
|
|
7
|
+
import { SigV4ApiClient, type OutdatedRoleErrorResponse } from '@hyperdrive.bot/cli-auth';
|
|
1
8
|
import { LoggingConfig } from './log-tailer.js';
|
|
2
9
|
interface DeploymentCheckResponse {
|
|
3
10
|
commit?: string;
|
|
@@ -129,18 +136,47 @@ interface GitAuthInitiateResponse {
|
|
|
129
136
|
installUrl: string;
|
|
130
137
|
state: string;
|
|
131
138
|
}
|
|
139
|
+
export type HookActionType = 'adhb-enrich' | 'ci-trigger' | 'slack-notify' | 'webhook';
|
|
140
|
+
export interface SlackNotifyConfig {
|
|
141
|
+
channel: string;
|
|
142
|
+
template?: string;
|
|
143
|
+
}
|
|
144
|
+
export interface AdhbEnrichConfig {
|
|
145
|
+
priority?: 'high' | 'low' | 'normal';
|
|
146
|
+
}
|
|
147
|
+
export interface WebhookConfig {
|
|
148
|
+
headers?: Record<string, string>;
|
|
149
|
+
method: 'POST' | 'PUT';
|
|
150
|
+
url: string;
|
|
151
|
+
}
|
|
152
|
+
export interface CiTriggerConfig {
|
|
153
|
+
pipeline: string;
|
|
154
|
+
provider: 'github' | 'gitlab';
|
|
155
|
+
ref?: string;
|
|
156
|
+
}
|
|
157
|
+
export type HookActionConfig = AdhbEnrichConfig | CiTriggerConfig | SlackNotifyConfig | WebhookConfig;
|
|
158
|
+
export interface HookResponse {
|
|
159
|
+
actionConfig: HookActionConfig;
|
|
160
|
+
actionType: HookActionType;
|
|
161
|
+
createdAt: string;
|
|
162
|
+
enabled: boolean;
|
|
163
|
+
hookId: string;
|
|
164
|
+
triggerStatus: string;
|
|
165
|
+
updatedAt: string;
|
|
166
|
+
}
|
|
167
|
+
export interface HookListResponse {
|
|
168
|
+
hooks: HookResponse[];
|
|
169
|
+
}
|
|
170
|
+
export interface HookCreateRequest {
|
|
171
|
+
actionConfig: HookActionConfig;
|
|
172
|
+
actionType: HookActionType;
|
|
173
|
+
triggerStatus: string;
|
|
174
|
+
}
|
|
132
175
|
/**
|
|
133
176
|
* Hyperdrive API Service with AWS SigV4 authentication
|
|
134
|
-
*
|
|
135
|
-
* This service signs all API requests using AWS Signature Version 4,
|
|
136
|
-
* which allows both CLI and web frontend to use the same endpoints
|
|
137
|
-
* with unified AWS IAM authentication via Cognito.
|
|
138
177
|
*/
|
|
139
|
-
export declare class HyperdriveSigV4Service {
|
|
140
|
-
private
|
|
141
|
-
private authService;
|
|
142
|
-
private region;
|
|
143
|
-
private tenantDomain;
|
|
178
|
+
export declare class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
179
|
+
private readonly userGroupsApiUrl?;
|
|
144
180
|
constructor(domain?: string);
|
|
145
181
|
accountAdd(params: {
|
|
146
182
|
accountId: string;
|
|
@@ -253,6 +289,28 @@ export declare class HyperdriveSigV4Service {
|
|
|
253
289
|
repos: GitRepoInfo[];
|
|
254
290
|
totalCount: number;
|
|
255
291
|
}>;
|
|
292
|
+
hookCreate(projectId: string, body: HookCreateRequest): Promise<HookResponse>;
|
|
293
|
+
hookDelete(projectId: string, hookId: string): Promise<{
|
|
294
|
+
message: string;
|
|
295
|
+
}>;
|
|
296
|
+
hookList(projectId: string): Promise<HookListResponse>;
|
|
297
|
+
hookUpdate(projectId: string, hookId: string, body: Partial<HookCreateRequest> & {
|
|
298
|
+
enabled?: boolean;
|
|
299
|
+
}): Promise<HookResponse>;
|
|
300
|
+
projectGetJiraStatuses(projectId: string): Promise<{
|
|
301
|
+
statuses: Array<{
|
|
302
|
+
id: string;
|
|
303
|
+
name: string;
|
|
304
|
+
category?: string;
|
|
305
|
+
}>;
|
|
306
|
+
}>;
|
|
307
|
+
jiraGetProjectStatuses(jiraProjectKey: string): Promise<{
|
|
308
|
+
statuses: Array<{
|
|
309
|
+
id: string;
|
|
310
|
+
name: string;
|
|
311
|
+
category?: string;
|
|
312
|
+
}>;
|
|
313
|
+
}>;
|
|
256
314
|
jiraPreRegister(params: {
|
|
257
315
|
jiraDomain: string;
|
|
258
316
|
}): Promise<{
|
|
@@ -268,9 +326,73 @@ export declare class HyperdriveSigV4Service {
|
|
|
268
326
|
};
|
|
269
327
|
success: boolean;
|
|
270
328
|
}>;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
329
|
+
projectAddRepo(projectId: string, repo: {
|
|
330
|
+
defaultBranch: string;
|
|
331
|
+
gitProvider: string;
|
|
332
|
+
gitRemote: string;
|
|
333
|
+
name: string;
|
|
334
|
+
}): Promise<{
|
|
335
|
+
defaultBranch: string;
|
|
336
|
+
gitProvider: string;
|
|
337
|
+
gitRemote: string;
|
|
338
|
+
name: string;
|
|
339
|
+
repoId: string;
|
|
340
|
+
}>;
|
|
341
|
+
projectFindByJiraKey(jiraProjectKey: string): Promise<{
|
|
342
|
+
jiraProjectKey: string;
|
|
343
|
+
projectId: string;
|
|
344
|
+
slug: string;
|
|
345
|
+
}>;
|
|
346
|
+
projectGetJiraConfig(projectId: string): Promise<{
|
|
347
|
+
createdAt: string;
|
|
348
|
+
jiraProjectKey: string;
|
|
349
|
+
statusMapping: Record<string, string>;
|
|
350
|
+
updatedAt: string;
|
|
351
|
+
}>;
|
|
352
|
+
projectListRepos(projectId: string): Promise<Array<{
|
|
353
|
+
architectureSummary?: string | null;
|
|
354
|
+
architectureSummaryUpdatedAt?: string | null;
|
|
355
|
+
createdAt: string;
|
|
356
|
+
defaultBranch: string;
|
|
357
|
+
gitRemote: string;
|
|
358
|
+
name: string;
|
|
359
|
+
provider: string;
|
|
360
|
+
repoId: string;
|
|
361
|
+
updatedAt: string;
|
|
362
|
+
}>>;
|
|
363
|
+
projectSetJiraConfig(projectId: string, config: {
|
|
364
|
+
jiraProjectKey: string;
|
|
365
|
+
statusMapping: Record<string, string>;
|
|
366
|
+
}): Promise<{
|
|
367
|
+
jiraProjectKey: string;
|
|
368
|
+
projectId: string;
|
|
369
|
+
statusMapping: Record<string, string>;
|
|
370
|
+
}>;
|
|
371
|
+
projectUpdateRepo(projectId: string, repoId: string, updateData: {
|
|
372
|
+
architectureSummary?: string | null;
|
|
373
|
+
defaultBranch?: string;
|
|
374
|
+
lastSyncedAt?: string;
|
|
375
|
+
}): Promise<{
|
|
376
|
+
architectureSummary?: string | null;
|
|
377
|
+
defaultBranch: string;
|
|
378
|
+
gitRemote: string;
|
|
379
|
+
lastSyncedAt?: string;
|
|
380
|
+
provider: string;
|
|
381
|
+
repoId: string;
|
|
382
|
+
}>;
|
|
383
|
+
projectUpdateEntities(projectId: string, repoId: string, entities: Array<{
|
|
384
|
+
name: string;
|
|
385
|
+
type: string;
|
|
386
|
+
path: string;
|
|
387
|
+
repository?: string;
|
|
388
|
+
description?: string;
|
|
389
|
+
}>): Promise<Array<{
|
|
390
|
+
name: string;
|
|
391
|
+
type: string;
|
|
392
|
+
path: string;
|
|
393
|
+
repository?: string;
|
|
394
|
+
description?: string;
|
|
395
|
+
}>>;
|
|
274
396
|
makeTestRequest(): Promise<Record<string, unknown>>;
|
|
275
397
|
moduleAnalyze(slug: string): Promise<{
|
|
276
398
|
jobId: string;
|
|
@@ -433,17 +555,33 @@ export declare class HyperdriveSigV4Service {
|
|
|
433
555
|
name: string;
|
|
434
556
|
}): Promise<StageResponse>;
|
|
435
557
|
stageList(): Promise<StageResponse[]>;
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
558
|
+
stageAccessGet(stageName: string): Promise<{
|
|
559
|
+
access: Array<{
|
|
560
|
+
role: string;
|
|
561
|
+
targetId: string;
|
|
562
|
+
targetType: 'user' | 'group';
|
|
563
|
+
}>;
|
|
564
|
+
stageId: string;
|
|
565
|
+
stageName: string;
|
|
566
|
+
}>;
|
|
567
|
+
stageAccessGrant(stageName: string, access: Array<{
|
|
568
|
+
role: 'viewer' | 'deployer' | 'manager';
|
|
569
|
+
targetId: string;
|
|
570
|
+
targetType: 'user' | 'group';
|
|
571
|
+
}>): Promise<{
|
|
572
|
+
added: number;
|
|
573
|
+
message: string;
|
|
574
|
+
}>;
|
|
575
|
+
stageAccessRevoke(stageName: string, targetType: 'user' | 'group', targetId: string): Promise<{
|
|
576
|
+
message: string;
|
|
577
|
+
}>;
|
|
578
|
+
groupList(): Promise<Array<{
|
|
579
|
+
groupId: string;
|
|
580
|
+
name: string;
|
|
581
|
+
description?: string;
|
|
582
|
+
memberCount: number;
|
|
583
|
+
isSystemGroup: boolean;
|
|
584
|
+
}>>;
|
|
585
|
+
protected handleOutdatedRole(errorData: OutdatedRoleErrorResponse): Promise<void>;
|
|
448
586
|
}
|
|
449
587
|
export {};
|