@kumori/aurora-interfaces 1.0.12 → 1.0.14
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.
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export enum AccountStatus {
|
|
2
|
+
/** Waiting for credentials validation (initial / transient state) */
|
|
3
|
+
PENDING = "pending",
|
|
4
|
+
|
|
5
|
+
/** Backend confirmed credentials are valid */
|
|
6
|
+
ACTIVE = "active",
|
|
7
|
+
|
|
8
|
+
/** Backend rejected credentials (strategy-service path) */
|
|
9
|
+
INVALID_CREDENTIALS_SNAKE = "invalid_credentials",
|
|
10
|
+
|
|
11
|
+
/** Backend rejected credentials (backend-event path) */
|
|
12
|
+
INVALID_CREDENTIALS = "InvalidCredentials",
|
|
13
|
+
|
|
14
|
+
/** Account is currently being deleted */
|
|
15
|
+
DELETING = "deleting",
|
|
16
|
+
|
|
17
|
+
/** Generic backend error */
|
|
18
|
+
ERROR = "error",
|
|
19
|
+
|
|
20
|
+
/** Generic backend failure */
|
|
21
|
+
FAILED = "failed",
|
|
22
|
+
|
|
23
|
+
/** waitForAccountStatus gave up after MAX_WAIT_MS */
|
|
24
|
+
TIMEOUT = "timeout",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const ACCOUNT_STATUS_NON_ERROR: ReadonlySet<string> = new Set([
|
|
28
|
+
AccountStatus.PENDING,
|
|
29
|
+
AccountStatus.ACTIVE,
|
|
30
|
+
AccountStatus.DELETING,
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
export function isAccountError(status: string): boolean {
|
|
34
|
+
return (
|
|
35
|
+
status === AccountStatus.INVALID_CREDENTIALS ||
|
|
36
|
+
status === AccountStatus.INVALID_CREDENTIALS_SNAKE ||
|
|
37
|
+
status === AccountStatus.ERROR ||
|
|
38
|
+
status === AccountStatus.FAILED ||
|
|
39
|
+
status === AccountStatus.TIMEOUT
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Environment } from './../interfaces/environment-interface';
|
|
2
|
+
import { Account } from './../interfaces/account-interface';
|
|
3
3
|
|
|
4
4
|
export enum ResourceType {
|
|
5
5
|
CPU = "cpu",
|