@discover-cloud/shared 1.0.7 → 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.
@@ -11,30 +11,73 @@ import { CloudProvider, CloudAccountStatus, AwsAuthMethod, GcpAuthMethod, AzureA
11
11
  * SyncJobDto is read-only — sync jobs are created internally by the
12
12
  * orchestrator and exposed for status polling only.
13
13
  */
14
+ export type CloudAuthMethod = AwsAuthMethod | GcpAuthMethod | AzureAuthMethod;
14
15
  export interface CloudAccountDto {
15
16
  id: string;
16
17
  userId: string;
17
18
  alias: string;
18
19
  provider: CloudProvider;
19
20
  status: CloudAccountStatus;
20
- authMethod: AwsAuthMethod | GcpAuthMethod | AzureAuthMethod | null;
21
- lastSyncAt: Date | null;
22
- lastErrorAt: Date | null;
21
+ authMethod: CloudAuthMethod | null;
22
+ lastSyncAt: string | null;
23
+ lastErrorAt: string | null;
23
24
  lastErrorMsg: string | null;
24
- createdAt: Date;
25
- updatedAt: Date;
25
+ createdAt: string;
26
+ updatedAt: string;
26
27
  }
27
28
  export interface SyncJobDto {
28
29
  id: string;
29
30
  cloudAccountId: string;
30
31
  type: SyncType;
31
32
  status: SyncStatus;
32
- startedAt: Date | null;
33
- completedAt: Date | null;
33
+ startedAt: string | null;
34
+ completedAt: string | null;
34
35
  errorMessage: string | null;
35
36
  resourcesSynced: number;
36
37
  costRecords: number;
37
38
  budgetsSynced: number;
38
- createdAt: Date;
39
- updatedAt: Date;
39
+ createdAt: string;
40
+ updatedAt: string;
41
+ }
42
+ export interface ConnectAwsAccountDto {
43
+ alias: string;
44
+ authMethod: AwsAuthMethod;
45
+ credentials: unknown;
46
+ }
47
+ export interface ConnectGcpAccountDto {
48
+ alias: string;
49
+ authMethod: GcpAuthMethod;
50
+ credentials: unknown;
51
+ }
52
+ export interface ConnectAzureAccountDto {
53
+ alias: string;
54
+ authMethod: AzureAuthMethod;
55
+ credentials: unknown;
56
+ }
57
+ export interface CloudCostRecordDto {
58
+ provider: CloudProvider;
59
+ service: string;
60
+ region: string;
61
+ amount: number;
62
+ currency: string;
63
+ periodStart: string;
64
+ periodEnd: string;
65
+ usageType: string;
66
+ }
67
+ export interface CloudResourceDto {
68
+ provider: CloudProvider;
69
+ resourceType: string;
70
+ resourceId: string;
71
+ region: string;
72
+ name: string | null;
73
+ status: string;
74
+ tags: Record<string, string>;
75
+ metadata: Record<string, unknown>;
76
+ }
77
+ export interface CloudBudgetDto {
78
+ provider: CloudProvider;
79
+ name: string;
80
+ limitAmount: number;
81
+ currency: string;
82
+ period: string;
40
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discover-cloud/shared",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",