Skip to content

Commit ca3b587

Browse files
committed
add aws/identity class models
1 parent c661fee commit ca3b587

19 files changed

+182
-0
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageServer.kt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ import org.eclipse.lsp4j.jsonrpc.services.JsonRequest
99
import org.eclipse.lsp4j.services.LanguageServer
1010
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.credentials.UpdateCredentialsPayload
1111
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.dependencies.SyncModuleDependenciesParams
12+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity.GetSsoTokenParams
13+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity.GetSsoTokenResult
14+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity.InvalidateSsoTokenParams
15+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity.InvalidateSsoTokenResult
16+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity.ListProfilesResult
17+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity.SsoTokenChangedParams
18+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity.UpdateProfileParams
19+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity.UpdateProfileResult
1220
import java.util.concurrent.CompletableFuture
1321

1422
/**
@@ -24,4 +32,19 @@ interface AmazonQLanguageServer : LanguageServer {
2432

2533
@JsonNotification("aws/credentials/token/delete")
2634
fun deleteTokenCredentials(): CompletableFuture<Unit>
35+
36+
@JsonRequest("aws/identity/listProfiles")
37+
fun listProfiles(): CompletableFuture<ListProfilesResult>
38+
39+
@JsonRequest("aws/identity/getSsoToken")
40+
fun getSsoToken(params: GetSsoTokenParams): CompletableFuture<GetSsoTokenResult>
41+
42+
@JsonRequest("aws/identity/invalidateSsoToken")
43+
fun invalidateSsoToken(params: InvalidateSsoTokenParams): CompletableFuture<InvalidateSsoTokenResult>
44+
45+
@JsonRequest("aws/identity/updateProfile")
46+
fun updateProfile(params: UpdateProfileParams): CompletableFuture<UpdateProfileResult>
47+
48+
@JsonNotification("aws/identity/ssoTokenChanged")
49+
fun ssoTokenChanged(params: SsoTokenChangedParams): CompletableFuture<Unit>
2750
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity
5+
6+
class GetSsoTokenOptions(
7+
val loginOnInvalidToken: Boolean
8+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity
5+
6+
class GetSsoTokenParams(
7+
val source: GetSsoTokenSource,
8+
val clientName: String,
9+
val options: GetSsoTokenOptions
10+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity
5+
6+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.credentials.UpdateCredentialsPayload
7+
8+
class GetSsoTokenResult(
9+
val ssoToken: SsoToken,
10+
val updateCredentialsParams: UpdateCredentialsPayload
11+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity
5+
6+
class GetSsoTokenSource(
7+
val kind: String,
8+
val ssoRegistrationScopes: List<String>,
9+
val profileName: String
10+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity
5+
6+
data class InvalidateSsoTokenParams(
7+
val ssoTokenId: String
8+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity
5+
6+
//Intentionally left blank
7+
class InvalidateSsoTokenResult ()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity
5+
6+
// intentionally left blank
7+
class ListProfilesParams()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity
5+
6+
class ListProfilesResult(
7+
val profiles: List<Profile>,
8+
val ssoSessions: List<SsoSession>
9+
10+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.identity
5+
6+
class Profile(
7+
val kinds: List<String>,
8+
val settings: ProfileSettings
9+
)

0 commit comments

Comments
 (0)