-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2301 from sulmoJ/directory
refactor: refactor directory structure & models
- Loading branch information
Showing
148 changed files
with
515 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { Tags, TimeStamp } from '@/schema/_common/model'; | ||
|
||
export interface PolicyModel { | ||
created_at: TimeStamp; | ||
domain_id: string; | ||
name: string; | ||
permissions: Array<string>; | ||
policy_id: string; | ||
repository_info?: RepositoryInfoDataModel; | ||
tags: Tags; | ||
policy_type?: string; | ||
project_id?: string; | ||
labels?: any; | ||
state?: PolicyState; | ||
updated_at?: TimeStamp; | ||
} | ||
|
||
interface RepositoryInfoDataModel { | ||
repository_id: string; | ||
name: string; | ||
repository_type: string; | ||
endpoint: string; | ||
} | ||
|
||
type PolicyState = 'ENABLED' | 'DISABLED'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { JsonSchema } from '@spaceone/design-system/types/inputs/forms/json-schema-form/type'; | ||
|
||
import type { Tags, TimeStamp } from '@/schema/_common/model'; | ||
|
||
const idField = 'provider'; | ||
|
||
interface IdParameter { | ||
[idField]: string; | ||
} | ||
|
||
export interface ProviderModel extends Tags, IdParameter { | ||
name: string; | ||
template: { | ||
service_account: { | ||
schema: JsonSchema; | ||
}; | ||
}; | ||
capability: { | ||
supported_schema: string[]; | ||
}; | ||
created_at: TimeStamp; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { TimeStamp } from '@/schema/_common/model'; | ||
import type { ProjectGroupModel } from '@/schema/identity/project-group/model'; | ||
import type { ProjectModel } from '@/schema/identity/project/model'; | ||
import type { RoleModel } from '@/schema/identity/role/model'; | ||
|
||
export interface RoleBindingModel { | ||
created_at: TimeStamp; | ||
domain_id: string; | ||
labels?: string[]; | ||
project_group_info?: ProjectGroupModel | undefined; | ||
project_info?: ProjectModel | undefined; | ||
resource_id: string; | ||
resource_type: string; | ||
role_binding_id: string; | ||
role_info: RoleModel; | ||
tags: { description: string }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Tags, TimeStamp } from '@/schema/_common/model'; | ||
import type { RoleType, Policy } from '@/schema/identity/role/type'; | ||
|
||
import type { RawPagePermission } from '@/lib/access-control/config'; | ||
|
||
export interface RoleModel { | ||
created_at: TimeStamp; | ||
deleted_at?: TimeStamp; | ||
domain_id: string; | ||
name: string; | ||
policies?: Policy[]; | ||
page_permissions: RawPagePermission[]; | ||
role_id: string; | ||
role_type: RoleType; | ||
tags?: Tags; // [ description: string ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { ROLE_TYPE } from '@/schema/identity/role/constant'; | ||
|
||
export type RoleType = typeof ROLE_TYPE[keyof typeof ROLE_TYPE]; | ||
|
||
export interface Policy { | ||
policy_id: string; | ||
policy_type: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const ACCOUNT_TYPE = { | ||
GENERAL: 'GENERAL', | ||
TRUSTED: 'TRUSTED', | ||
} as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { ACCOUNT_TYPE } from '@/schema/identity/service-account/constant'; | ||
|
||
export interface ServiceAccountModel { | ||
name: string; | ||
provider: string; | ||
service_account_id: string; | ||
service_account_type?: AccountType; | ||
data: { | ||
[key: string]: string; | ||
}, | ||
tags: { [key: string]: unknown; }; | ||
} | ||
|
||
export interface ServiceAccountModelForBinding extends Omit<ServiceAccountModel, 'service_account_type'> { | ||
service_account_type?: AccountType | 'TRUSTED-MANAGED'; | ||
} | ||
|
||
export type AccountType = typeof ACCOUNT_TYPE[keyof typeof ACCOUNT_TYPE]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +0,0 @@ | ||
import type { Tags, TimeStamp } from '@/api-schema/common/model'; | ||
|
||
export interface PolicyModel { | ||
created_at: TimeStamp; | ||
domain_id: string; | ||
name: string; | ||
permissions: Array<string>; | ||
policy_id: string; | ||
repository_info?: RepositoryInfoDataModel; | ||
tags: Tags; | ||
policy_type?: string; | ||
project_id?: string; | ||
labels?: any; | ||
state?: PolicyState; | ||
updated_at?: TimeStamp; | ||
} | ||
|
||
interface RepositoryInfoDataModel { | ||
repository_id: string; | ||
name: string; | ||
repository_type: string; | ||
endpoint: string; | ||
} | ||
type PolicyState = 'ENABLED' | 'DISABLED'; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { Tags, TimeStamp } from '@/schema/_common/model'; | ||
import type { RoleBindingModel } from '@/schema/identity/role-binding/model'; | ||
import type { UserType } from '@/schema/identity/user/type'; | ||
|
||
|
||
export interface UserModel { | ||
created_at: TimeStamp; | ||
domain_id?: string; | ||
email?: string; | ||
email_verified?: boolean; | ||
language: string; | ||
last_accessed_at: TimeStamp | number; | ||
name: string; | ||
state: string; | ||
tags?: Tags; | ||
timezone: string; | ||
user_id: string; | ||
backend: string; | ||
user_type: UserType; | ||
role_bindings?: RoleBindingModel[]; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { USER_TYPE } from '@/schema/identity/user/constant'; | ||
|
||
export type UserType = typeof USER_TYPE[keyof typeof USER_TYPE]; |
18 changes: 0 additions & 18 deletions
18
apps/web/src/schema/inventory/cloud-service-query-set/model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +0,0 @@ | ||
import type { ProjectGroupInfo, ProjectModel } from '@/services/project/type'; | ||
|
||
import type { TimeStamp } from '@/api-schema/common/model'; | ||
import type { RoleModel } from '@/api-schema/identity/role/model'; | ||
|
||
|
||
export interface RoleBindingModel { | ||
created_at: TimeStamp; | ||
domain_id: string; | ||
labels?: string[]; | ||
project_group_info?: ProjectGroupInfo | undefined; | ||
project_info?: ProjectModel | undefined; | ||
resource_id: string; | ||
resource_type: string; | ||
role_binding_id: string; | ||
role_info: RoleModel; | ||
tags: { description: string }; | ||
} | ||
23 changes: 0 additions & 23 deletions
23
apps/web/src/schema/inventory/cloud-service-report/model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1 @@ | ||
import type { ROLE_TYPE } from '@/schema/identity/role/constant'; | ||
|
||
import type { RawPagePermission } from '@/lib/access-control/config'; | ||
|
||
import type { Tags, TimeStamp } from '@/api-schema/common/model'; | ||
|
||
export type RoleType = typeof ROLE_TYPE[keyof typeof ROLE_TYPE]; | ||
|
||
export interface RoleModel { | ||
created_at: TimeStamp; | ||
deleted_at?: TimeStamp; | ||
domain_id: string; | ||
name: string; | ||
policies?: Policy[]; | ||
page_permissions: RawPagePermission[]; | ||
role_id: string; | ||
role_type: RoleType; | ||
tags?: Tags; // [ description: string ] | ||
} | ||
|
||
export interface Policy { | ||
policy_id: string; | ||
policy_type: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Tags } from '@/schema/_common/model'; | ||
|
||
export interface CloudServiceTypeInfo { | ||
cloud_service_type_id: string; | ||
cloud_service_type_key: string; | ||
name: string; | ||
provider: string; | ||
group: string; | ||
service_code: string; | ||
is_primary: boolean; | ||
is_major: boolean; | ||
resource_type: string; | ||
metadata: any; | ||
labels: string[]; | ||
tags: Tags; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
a6092c1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
console – ./
console-cloudforet.vercel.app
console-git-master-cloudforet.vercel.app