diff --git a/apps/web/src/lib/access-control/page-permission-helper.ts b/apps/web/src/lib/access-control/page-permission-helper.ts index 2f1536a20d..7999f399ca 100644 --- a/apps/web/src/lib/access-control/page-permission-helper.ts +++ b/apps/web/src/lib/access-control/page-permission-helper.ts @@ -1,4 +1,7 @@ + +import type { RoleType } from '@/schema/identity/role/type'; + import type { PagePermissionMap, PagePermissionTuple, PagePermissionType, RawPagePermission, @@ -16,7 +19,7 @@ import { MENU_INFO_MAP } from '@/lib/menu/menu-info'; import type { LNBItem, LNBMenu } from '@/common/modules/navigations/lnb/type'; -import type { RoleType } from '@/api-schema/identity/role/model'; + export const getDefaultPagePermissionList = (isDomainOwner: boolean, roleType?: RoleType): PagePermissionTuple[] => { diff --git a/apps/web/src/schema/_common/model.ts b/apps/web/src/schema/_common/model.ts index b972d93eed..8c4aeb979c 100644 --- a/apps/web/src/schema/_common/model.ts +++ b/apps/web/src/schema/_common/model.ts @@ -9,7 +9,7 @@ export interface TimeStamp { export interface ListResponse { results: T[]; - total_count?: number; + total_count: number; } export interface AnalyzeResponse { diff --git a/apps/web/src/schema/board/board/model.ts b/apps/web/src/schema/board/board/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/config/domain-config/model.ts b/apps/web/src/schema/config/domain-config/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/config/user-config/model.ts b/apps/web/src/schema/config/user-config/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/cost-analysis/cost-query-set/model.ts b/apps/web/src/schema/cost-analysis/cost-query-set/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/cost-analysis/cost/model.ts b/apps/web/src/schema/cost-analysis/cost/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/cost-analysis/data-source-rule/model.ts b/apps/web/src/schema/cost-analysis/data-source-rule/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/cost-analysis/job-task/model.ts b/apps/web/src/schema/cost-analysis/job-task/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/cost-analysis/job/model.ts b/apps/web/src/schema/cost-analysis/job/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/file-manager/file/model.ts b/apps/web/src/schema/file-manager/file/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/identity/API-key/model.ts b/apps/web/src/schema/identity/API-key/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/identity/authorization/model.ts b/apps/web/src/schema/identity/authorization/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/identity/domain/model.ts b/apps/web/src/schema/identity/domain/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/identity/endpoint/model.ts b/apps/web/src/schema/identity/endpoint/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/identity/external-auth/model.ts b/apps/web/src/schema/identity/external-auth/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/identity/policy/model.ts b/apps/web/src/schema/identity/policy/model.ts index e69de29bb2..89e660625f 100644 --- a/apps/web/src/schema/identity/policy/model.ts +++ b/apps/web/src/schema/identity/policy/model.ts @@ -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; + 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'; diff --git a/apps/web/src/schema/identity/provider/model.ts b/apps/web/src/schema/identity/provider/model.ts index e69de29bb2..199a8187a0 100644 --- a/apps/web/src/schema/identity/provider/model.ts +++ b/apps/web/src/schema/identity/provider/model.ts @@ -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; +} diff --git a/apps/web/src/schema/identity/role-binding/model.ts b/apps/web/src/schema/identity/role-binding/model.ts index e69de29bb2..431e2cef5d 100644 --- a/apps/web/src/schema/identity/role-binding/model.ts +++ b/apps/web/src/schema/identity/role-binding/model.ts @@ -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 }; +} diff --git a/apps/web/src/schema/identity/role/model.ts b/apps/web/src/schema/identity/role/model.ts index e69de29bb2..27143048f3 100644 --- a/apps/web/src/schema/identity/role/model.ts +++ b/apps/web/src/schema/identity/role/model.ts @@ -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 ] +} diff --git a/apps/web/src/schema/identity/role/type.ts b/apps/web/src/schema/identity/role/type.ts new file mode 100644 index 0000000000..696271d884 --- /dev/null +++ b/apps/web/src/schema/identity/role/type.ts @@ -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; +} diff --git a/apps/web/src/schema/identity/service-account/constant.ts b/apps/web/src/schema/identity/service-account/constant.ts new file mode 100644 index 0000000000..84eda337d8 --- /dev/null +++ b/apps/web/src/schema/identity/service-account/constant.ts @@ -0,0 +1,4 @@ +export const ACCOUNT_TYPE = { + GENERAL: 'GENERAL', + TRUSTED: 'TRUSTED', +} as const; diff --git a/apps/web/src/schema/identity/service-account/model.ts b/apps/web/src/schema/identity/service-account/model.ts index e69de29bb2..63fdac7887 100644 --- a/apps/web/src/schema/identity/service-account/model.ts +++ b/apps/web/src/schema/identity/service-account/model.ts @@ -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 { + service_account_type?: AccountType | 'TRUSTED-MANAGED'; +} + +export type AccountType = typeof ACCOUNT_TYPE[keyof typeof ACCOUNT_TYPE]; diff --git a/apps/web/src/schema/identity/user-group/model.ts b/apps/web/src/schema/identity/user-group/model.ts index d03de5cf41..e69de29bb2 100644 --- a/apps/web/src/schema/identity/user-group/model.ts +++ b/apps/web/src/schema/identity/user-group/model.ts @@ -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; - 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'; diff --git a/apps/web/src/schema/identity/user/model.ts b/apps/web/src/schema/identity/user/model.ts index e69de29bb2..76b55dff5c 100644 --- a/apps/web/src/schema/identity/user/model.ts +++ b/apps/web/src/schema/identity/user/model.ts @@ -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[]; +} + diff --git a/apps/web/src/schema/identity/user/type.ts b/apps/web/src/schema/identity/user/type.ts new file mode 100644 index 0000000000..9ecdd2de5d --- /dev/null +++ b/apps/web/src/schema/identity/user/type.ts @@ -0,0 +1,3 @@ +import type { USER_TYPE } from '@/schema/identity/user/constant'; + +export type UserType = typeof USER_TYPE[keyof typeof USER_TYPE]; diff --git a/apps/web/src/schema/inventory/cloud-service-query-set/model.ts b/apps/web/src/schema/inventory/cloud-service-query-set/model.ts index 70e217c279..e69de29bb2 100644 --- a/apps/web/src/schema/inventory/cloud-service-query-set/model.ts +++ b/apps/web/src/schema/inventory/cloud-service-query-set/model.ts @@ -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 }; -} diff --git a/apps/web/src/schema/inventory/cloud-service-report/model.ts b/apps/web/src/schema/inventory/cloud-service-report/model.ts index 049c45e67a..8b13789179 100644 --- a/apps/web/src/schema/inventory/cloud-service-report/model.ts +++ b/apps/web/src/schema/inventory/cloud-service-report/model.ts @@ -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; -} diff --git a/apps/web/src/schema/inventory/cloud-service-type/model.ts b/apps/web/src/schema/inventory/cloud-service-type/model.ts index e69de29bb2..f77977c380 100644 --- a/apps/web/src/schema/inventory/cloud-service-type/model.ts +++ b/apps/web/src/schema/inventory/cloud-service-type/model.ts @@ -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; +} diff --git a/apps/web/src/schema/inventory/collector/model.ts b/apps/web/src/schema/inventory/collector/model.ts index 2485ea2ac3..ec7ff27e52 100644 --- a/apps/web/src/schema/inventory/collector/model.ts +++ b/apps/web/src/schema/inventory/collector/model.ts @@ -1,8 +1,7 @@ import type { JsonSchema } from '@spaceone/design-system/types/inputs/forms/json-schema-form/type'; import type { Tags } from '@/schema/_common/model'; - -import type { MonitoringType } from '@/common/modules/monitoring/config'; +import type { Capability } from '@/schema/repository/plugin/model'; // CollectorPluginModel @@ -33,50 +32,6 @@ export interface CollectorPluginModel { } } -// RepositoryPluginModel -interface Capability { - supported_schemas: string[]; - use_resource_secret: boolean; - monitoring_type: MonitoringType; - supported_providers?: string[]; - [key: string]: any; -} - -export interface RepositoryInfo { - created_at: string; - endpoint: string; - name: string; - repository_id: string; - repository_type: string; -} - -export interface RepositoryPluginModel { - plugin_id: string; - name: string; - image: string; - registry_type: 'DOCKER_HUB'|'AWS_PUBLIC_ECR'|'HARBOR'; - registry_url: string; - registry_config: object; - service_type: string; - provider?: string; - capability: Capability; - template: { - options: { - schema: JsonSchema; - } - }; - repository_info: RepositoryInfo; - project_id: string; - labels: string[]; - version: string; - tags: { - icon?: string; - description?: string; - link?: string; - beta?: string; - } & Tags; -} - // CollectorModel export const COLLECTOR_SECRET_STATE = { @@ -115,16 +70,6 @@ export interface CollectorModel { tags: Tags; } -// SecretModel -export interface SecretModel { - secret_id: string; - provider: string; - service_account_id: string; - project_id: string; - created_at: string; - name: string; -} - // collector api parameters export interface CollectorUpdateParameter { collector_id: string; @@ -148,23 +93,3 @@ export interface CollectorUpdatePluginParameter { upgrade_mode?: UpgradeMode; } -export type JobStatus = | - 'IN_PROGRESS'| // One or more JobTasks are running - 'FAILURE'| // When one or more JobTasks are FAILURE or TIMEOUT - 'CANCELED'| // When a Job is Canceled - 'SUCCESS'; // When all JobTasks succeed - -export interface JobModel { - job_id: string; - status: JobStatus; - remained_tasks: number; - total_tasks: number; - failure_tasks: number; - success_tasks: number; - collector_id: string; - plugin_id: string; - created_at: string; - finished_at: string; - updated_at: string; - secret_id?: string; -} diff --git a/apps/web/src/schema/inventory/job-task/model.ts b/apps/web/src/schema/inventory/job-task/model.ts index 390cf9e117..e7ad381722 100644 --- a/apps/web/src/schema/inventory/job-task/model.ts +++ b/apps/web/src/schema/inventory/job-task/model.ts @@ -1,23 +1,21 @@ -import type { USER_TYPE } from '@/schema/identity/user/constant'; +import type { JobTaskError } from '@/services/asset-inventory/types/collector-history-job-type'; -import type { Tags, TimeStamp } from '@/api-schema/common/model'; -import type { RoleBindingModel } from '@/api-schema/identity/role-binding/model'; - -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[]; +export interface JobTaskModel { + job_task_id: string; + status: string; + create_count: number; + updated_count: number; + failure_count: number; + deleted_count: number; + disconnected_count: number; + errors: JobTaskError[]; + job_id: string; + secret_id: string; + provider: string; + service_account_id: string; + project_id: string; + domain_id: string; + created_at: string; + started_at: string; + finished_at: string; } - -export type UserType = typeof USER_TYPE[keyof typeof USER_TYPE]; diff --git a/apps/web/src/schema/inventory/job/model.ts b/apps/web/src/schema/inventory/job/model.ts index e69de29bb2..650422aa7a 100644 --- a/apps/web/src/schema/inventory/job/model.ts +++ b/apps/web/src/schema/inventory/job/model.ts @@ -0,0 +1,16 @@ +import type { JobStatus } from '@/schema/inventory/job/type'; + +export interface JobModel { + job_id: string; + status: JobStatus; + total_tasks: number; + remained_tasks: number; + success_tasks: number; + failure_tasks: number; + collector_id: string; + secret_id?: string; + plugin_id: string; + created_at?: string; + updated_at?: string; + finished_at: string; +} diff --git a/apps/web/src/schema/inventory/job/type.ts b/apps/web/src/schema/inventory/job/type.ts new file mode 100644 index 0000000000..7405dfc6e2 --- /dev/null +++ b/apps/web/src/schema/inventory/job/type.ts @@ -0,0 +1,5 @@ +export type JobStatus = | + 'IN_PROGRESS' | // One or more JobTasks are running + 'FAILURE' | // When one or more JobTasks are FAILURE or TIMEOUT + 'CANCELED' | // When a Job is Canceled + 'SUCCESS'; // When all JobTasks succeed diff --git a/apps/web/src/schema/inventory/note/model.ts b/apps/web/src/schema/inventory/note/model.ts index e69de29bb2..cc77abfd72 100644 --- a/apps/web/src/schema/inventory/note/model.ts +++ b/apps/web/src/schema/inventory/note/model.ts @@ -0,0 +1,10 @@ +import type { TimeStamp } from '@/schema/_common/model'; + +export interface NoteModel { + note_id: string; + cloud_service_id: string; + note: string; + user_id: string; + project_id: string; + created_at: TimeStamp|string; +} diff --git a/apps/web/src/schema/inventory/region/model.ts b/apps/web/src/schema/inventory/region/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/inventory/resource-group/model.ts b/apps/web/src/schema/inventory/resource-group/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/data-source/model.ts b/apps/web/src/schema/monitoring/data-source/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/escalation-policy/model.ts b/apps/web/src/schema/monitoring/escalation-policy/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/event-rule/model.ts b/apps/web/src/schema/monitoring/event-rule/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/event/model.ts b/apps/web/src/schema/monitoring/event/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/log/model.ts b/apps/web/src/schema/monitoring/log/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/maintenance-window/model.ts b/apps/web/src/schema/monitoring/maintenance-window/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/metric/model.ts b/apps/web/src/schema/monitoring/metric/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/note/model.ts b/apps/web/src/schema/monitoring/note/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/project-alert-config/model.ts b/apps/web/src/schema/monitoring/project-alert-config/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/monitoring/webhook/model.ts b/apps/web/src/schema/monitoring/webhook/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/notification/notification-usage/model.ts b/apps/web/src/schema/notification/notification-usage/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/notification/notification/model.ts b/apps/web/src/schema/notification/notification/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/notification/project-channel/model.ts b/apps/web/src/schema/notification/project-channel/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/notification/protocol/model.ts b/apps/web/src/schema/notification/protocol/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/notification/quota/model.ts b/apps/web/src/schema/notification/quota/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/notification/user-channel/model.ts b/apps/web/src/schema/notification/user-channel/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/plugin/plugin/model.ts b/apps/web/src/schema/plugin/plugin/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/plugin/supervisor/model.ts b/apps/web/src/schema/plugin/supervisor/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/repository/plugin/model.ts b/apps/web/src/schema/repository/plugin/model.ts index e69de29bb2..ef977a9963 100644 --- a/apps/web/src/schema/repository/plugin/model.ts +++ b/apps/web/src/schema/repository/plugin/model.ts @@ -0,0 +1,49 @@ +import type { JsonSchema } from '@spaceone/design-system/types/inputs/forms/json-schema-form/type'; + +import type { Tags } from '@/schema/_common/model'; + +import type { MonitoringType } from '@/common/modules/monitoring/config'; + +export interface Capability { + supported_schemas: string[]; + use_resource_secret: boolean; + monitoring_type: MonitoringType; + supported_providers?: string[]; + + [key: string]: any; +} + +export interface RepositoryInfo { + created_at: string; + endpoint: string; + name: string; + repository_id: string; + repository_type: string; +} + +export interface PluginModel { + plugin_id: string; + name: string; + image: string; + registry_type: 'DOCKER_HUB' | 'AWS_PUBLIC_ECR' | 'HARBOR'; + registry_url: string; + registry_config: object; + service_type: string; + provider?: string; + capability: Capability; + template: { + options: { + schema: JsonSchema; + } + }; + repository_info: RepositoryInfo; + project_id: string; + labels: string[]; + version: string; + tags: { + icon?: string; + description?: string; + link?: string; + beta?: string; + } & Tags; +} diff --git a/apps/web/src/schema/repository/policy/model.ts b/apps/web/src/schema/repository/policy/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/repository/repository/model.ts b/apps/web/src/schema/repository/repository/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/repository/schema/model.ts b/apps/web/src/schema/repository/schema/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/secret/secret-group/model.ts b/apps/web/src/schema/secret/secret-group/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/secret/secret/model.ts b/apps/web/src/schema/secret/secret/model.ts index e69de29bb2..7a9dab0dae 100644 --- a/apps/web/src/schema/secret/secret/model.ts +++ b/apps/web/src/schema/secret/secret/model.ts @@ -0,0 +1,25 @@ +import type { TimeStamp } from '@/schema/_common/model'; + +export interface CredentialModel { + secret_id?: string; + name?: string; + secret_type?: string; + schema?: string; + provider?: string; + service_account_id?: string; + trusted_secret_id?: string; + trusted_service_account_id?: string; + project_id?: string; + domain_id?: string; + created_at?: TimeStamp; + tags?: { [key: string]: any; }; +} + +export interface SecretModel { + secret_id: string; + provider: string; + service_account_id: string; + project_id: string; + created_at: string; + name: string; +} diff --git a/apps/web/src/schema/secret/trusted-secret/model.ts b/apps/web/src/schema/secret/trusted-secret/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/statistics/history/model.ts b/apps/web/src/schema/statistics/history/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/statistics/resource/model.ts b/apps/web/src/schema/statistics/resource/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/schema/statistics/schedule/model.ts b/apps/web/src/schema/statistics/schedule/model.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/services/administration/components/PolicyListDataTable.vue b/apps/web/src/services/administration/components/PolicyListDataTable.vue index a3132727a7..2fa39cf6e5 100644 --- a/apps/web/src/services/administration/components/PolicyListDataTable.vue +++ b/apps/web/src/services/administration/components/PolicyListDataTable.vue @@ -87,6 +87,8 @@ import type { ToolboxOptions } from '@cloudforet/core-lib/component-util/toolbox import { ApiQueryHelper } from '@cloudforet/core-lib/space-connector/helper'; import { SpaceRouter } from '@/router'; +import type { PolicyModel } from '@/schema/identity/policy/model'; +import type { Policy } from '@/schema/identity/role/type'; import { store } from '@/store'; import { replaceUrlQuery } from '@/lib/router-query-string'; @@ -101,8 +103,7 @@ import { ADMINISTRATION_ROUTE } from '@/services/administration/routes/route-con import { usePolicyStore } from '@/services/administration/store/policy-page-store'; import type { PolicyType } from '@/services/administration/types/policy-type'; -import type { PolicyModel } from '@/api-schema/identity/policy/model'; -import type { Policy } from '@/api-schema/identity/role/model'; + const getFilteredItems = (queryTags: QueryTag[], policyList: PolicyModel[], selectedType: PolicyType): PolicyModel[] => { // 1. filter by type diff --git a/apps/web/src/services/administration/components/RoleDeleteModal.vue b/apps/web/src/services/administration/components/RoleDeleteModal.vue index e3aadec985..87d8c8bb9c 100644 --- a/apps/web/src/services/administration/components/RoleDeleteModal.vue +++ b/apps/web/src/services/administration/components/RoleDeleteModal.vue @@ -79,6 +79,10 @@ import type { DataTableField } from '@spaceone/design-system/types/data-display/ import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import { SpaceRouter } from '@/router'; +import type { ListResponse } from '@/schema/_common/model'; +import type { ProjectGroupModel } from '@/schema/identity/project-group/model'; +import type { ProjectModel } from '@/schema/identity/project/model'; +import type { RoleBindingModel } from '@/schema/identity/role-binding/model'; import { store } from '@/store'; import { i18n } from '@/translations'; @@ -94,10 +98,6 @@ import { useProxyValue } from '@/common/composables/proxy-state'; import { ROLE_TYPE_BADGE_OPTION } from '@/services/administration/constants/role-constant'; import { useRolePageStore } from '@/services/administration/store/role-page-store'; -import type { ProjectGroupInfo, ProjectModel } from '@/services/project/type'; - -import type { ListModel } from '@/api-schema/common/model'; -import type { RoleBindingModel } from '@/api-schema/identity/role-binding/model'; interface UnDeletableRole { @@ -107,7 +107,7 @@ interface UnDeletableRole { assignTo: { resource_id: string; resource_type: string }; project?: { project_info: ProjectModel | undefined; - project_group_info: ProjectGroupInfo | undefined; + project_group_info: ProjectGroupModel | undefined; }; } @@ -200,7 +200,7 @@ export default { }; const getRoleBindingList = () => Promise.all(rolePageStore.selectedRoles.map(async (role) => { try { - const { results }: ListModel = await SpaceConnector.client.identity.roleBinding.list({ role_id: role.role_id }); + const { results }: ListResponse = await SpaceConnector.client.identity.roleBinding.list({ role_id: role.role_id }); const roleBindingList: UnDeletableRole[] = results.map((roleBinding) => { const { // eslint-disable-next-line @typescript-eslint/naming-convention diff --git a/apps/web/src/services/administration/components/RoleManagementTabDetail.vue b/apps/web/src/services/administration/components/RoleManagementTabDetail.vue index 8d2e5b9d6b..1d1771fb01 100644 --- a/apps/web/src/services/administration/components/RoleManagementTabDetail.vue +++ b/apps/web/src/services/administration/components/RoleManagementTabDetail.vue @@ -92,6 +92,8 @@ import type { DataTableField } from '@spaceone/design-system/types/data-display/ import { iso8601Formatter } from '@cloudforet/core-lib'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; +import type { PolicyModel } from '@/schema/identity/policy/model'; +import type { RoleModel } from '@/schema/identity/role/model'; import { store } from '@/store'; import { i18n } from '@/translations'; @@ -108,8 +110,6 @@ import { policyTypeBadgeColorFormatter } from '@/services/administration/helpers import { ADMINISTRATION_ROUTE } from '@/services/administration/routes/route-constant'; import type { PolicyType } from '@/services/administration/types/policy-type'; -import type { PolicyModel } from '@/api-schema/identity/policy/model'; -import type { RoleModel } from '@/api-schema/identity/role/model'; type DataTableTranslationField = DataTableField | { label?: TranslateResult | string; diff --git a/apps/web/src/services/administration/components/RoleUpdateForm.vue b/apps/web/src/services/administration/components/RoleUpdateForm.vue index ac63dd62e9..e7ecead356 100644 --- a/apps/web/src/services/administration/components/RoleUpdateForm.vue +++ b/apps/web/src/services/administration/components/RoleUpdateForm.vue @@ -44,6 +44,8 @@ import { import { PHeading } from '@spaceone/design-system'; +import type { RoleModel } from '@/schema/identity/role/model'; +import type { RoleType, Policy } from '@/schema/identity/role/type'; import { i18n } from '@/translations'; import type { RawPagePermission } from '@/lib/access-control/config'; @@ -55,7 +57,6 @@ import RoleUpdatePageAccessForm from '@/services/administration/components/RoleU import RoleUpdatePageBaseInformation from '@/services/administration/components/RoleUpdatePageBaseInformation.vue'; import { FORM_TYPE } from '@/services/administration/constants/role-constant'; -import type { RoleType, RoleModel, Policy } from '@/api-schema/identity/role/model'; export interface BaseInfoFormData { roleName: string; diff --git a/apps/web/src/services/administration/components/RoleUpdatePageAccessForm.vue b/apps/web/src/services/administration/components/RoleUpdatePageAccessForm.vue index e55eb30097..d476a61187 100644 --- a/apps/web/src/services/administration/components/RoleUpdatePageAccessForm.vue +++ b/apps/web/src/services/administration/components/RoleUpdatePageAccessForm.vue @@ -46,7 +46,7 @@ import { PPaneLayout, PHeading } from '@spaceone/design-system'; import { find, isEqual } from 'lodash'; import { ROLE_TYPE } from '@/schema/identity/role/constant'; - +import type { RoleType } from '@/schema/identity/role/type'; import type { RawPagePermission } from '@/lib/access-control/config'; import { PAGE_PERMISSION_TYPE } from '@/lib/access-control/config'; @@ -58,7 +58,7 @@ import RoleUpdatePageAccessMenuItem from '@/services/administration/components/R import { getPageAccessMenuList } from '@/services/administration/helpers/page-access-menu-list'; import type { PageAccessMenuItem } from '@/services/administration/types/page-access-menu-type'; -import type { RoleType } from '@/api-schema/identity/role/model'; + const getIndividualPagePermissions = (menuItem: PageAccessMenuItem): RawPagePermission[] => { diff --git a/apps/web/src/services/administration/components/RoleUpdatePageBaseInformation.vue b/apps/web/src/services/administration/components/RoleUpdatePageBaseInformation.vue index d38f5d7943..0185e2d666 100644 --- a/apps/web/src/services/administration/components/RoleUpdatePageBaseInformation.vue +++ b/apps/web/src/services/administration/components/RoleUpdatePageBaseInformation.vue @@ -67,6 +67,7 @@ import { } from '@spaceone/design-system'; import { ROLE_TYPE } from '@/schema/identity/role/constant'; +import type { RoleType } from '@/schema/identity/role/type'; import { i18n } from '@/translations'; import { useFormValidator } from '@/common/composables/form-validator'; @@ -74,7 +75,7 @@ import { useFormValidator } from '@/common/composables/form-validator'; import type { BaseInfoFormData } from '@/services/administration/components/RoleUpdateForm.vue'; import { ROLE_TYPE_BADGE_OPTION } from '@/services/administration/constants/role-constant'; -import type { RoleType } from '@/api-schema/identity/role/model'; + interface RoleTypeForm {label: string; key: string; description: TranslateResult} diff --git a/apps/web/src/services/administration/components/UserManagementFormModal.vue b/apps/web/src/services/administration/components/UserManagementFormModal.vue index 3654b10cba..b76c3511d4 100644 --- a/apps/web/src/services/administration/components/UserManagementFormModal.vue +++ b/apps/web/src/services/administration/components/UserManagementFormModal.vue @@ -5,6 +5,7 @@ import { PButtonModal, PBoxTab } from '@spaceone/design-system'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; +import type { Tags } from '@/schema/_common/model'; import { USER_TYPE } from '@/schema/identity/user/constant'; import { store } from '@/store'; @@ -22,7 +23,6 @@ import { PASSWORD_TYPE } from '@/services/administration/constants/user-constant import { useUserPageStore } from '@/services/administration/store/user-page-store'; import type { User } from '@/services/administration/types/user-type'; -import type { Tags } from '@/api-schema/common/model'; interface Props { headerTitle: string; diff --git a/apps/web/src/services/administration/components/UserManagementTabAssignedRole.vue b/apps/web/src/services/administration/components/UserManagementTabAssignedRole.vue index 9b36ec1dbc..2592f70ae0 100644 --- a/apps/web/src/services/administration/components/UserManagementTabAssignedRole.vue +++ b/apps/web/src/services/administration/components/UserManagementTabAssignedRole.vue @@ -61,6 +61,7 @@ import { ACTION_ICON } from '@spaceone/design-system/src/inputs/link/type'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; +import type { Tags } from '@/schema/_common/model'; import { store } from '@/store'; import { i18n } from '@/translations'; @@ -73,7 +74,6 @@ import ErrorHandler from '@/common/composables/error/errorHandler'; import { userStateFormatter } from '@/services/administration/helpers/user-management-tab-helper'; -import type { Tags } from '@/api-schema/common/model'; interface UserRoleItem { labels?: string[]|string; diff --git a/apps/web/src/services/administration/components/UserManagementTabDetail.vue b/apps/web/src/services/administration/components/UserManagementTabDetail.vue index e8ecfabc20..8db744a982 100644 --- a/apps/web/src/services/administration/components/UserManagementTabDetail.vue +++ b/apps/web/src/services/administration/components/UserManagementTabDetail.vue @@ -84,6 +84,7 @@ import type { DefinitionField } from '@spaceone/design-system/src/data-display/t import { iso8601Formatter } from '@cloudforet/core-lib'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; +import type { UserModel } from '@/schema/identity/user/model'; import { i18n } from '@/translations'; import config from '@/lib/config'; @@ -94,7 +95,6 @@ import VerifyButton from '@/common/modules/button/verify-button/VerifyButton.vue import { calculateTime, userStateFormatter } from '@/services/administration/helpers/user-management-tab-helper'; import { useUserPageStore } from '@/services/administration/store/user-page-store'; -import type { UserModel } from '@/api-schema/identity/user/model'; interface Props { userId: string diff --git a/apps/web/src/services/administration/helpers/policy-helper.ts b/apps/web/src/services/administration/helpers/policy-helper.ts index 432ac6fd4c..21e83feaba 100644 --- a/apps/web/src/services/administration/helpers/policy-helper.ts +++ b/apps/web/src/services/administration/helpers/policy-helper.ts @@ -1,11 +1,12 @@ import { iso8601Formatter } from '@cloudforet/core-lib'; import type { KeyDataType, ValueHandler, ValueItem } from '@cloudforet/core-lib/component-util/query-search/type'; +import type { TimeStamp } from '@/schema/_common/model'; +import type { PolicyModel } from '@/schema/identity/policy/model'; + import { POLICY_TYPE } from '@/services/administration/constants/policy-constant'; import type { PolicyType } from '@/services/administration/types/policy-type'; -import type { TimeStamp } from '@/api-schema/common/model'; -import type { PolicyModel } from '@/api-schema/identity/policy/model'; diff --git a/apps/web/src/services/administration/pages/RoleCreatePage.vue b/apps/web/src/services/administration/pages/RoleCreatePage.vue index f26b094aa2..1812b9ee9f 100644 --- a/apps/web/src/services/administration/pages/RoleCreatePage.vue +++ b/apps/web/src/services/administration/pages/RoleCreatePage.vue @@ -34,6 +34,7 @@ import { PHeading, PButton } from '@spaceone/design-system'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import { SpaceRouter } from '@/router'; +import type { RoleModel } from '@/schema/identity/role/model'; import { i18n } from '@/translations'; import { showSuccessMessage } from '@/lib/helper/notice-alert-helper'; @@ -42,7 +43,6 @@ import ErrorHandler from '@/common/composables/error/errorHandler'; import RoleUpdateForm from '@/services/administration/components/RoleUpdateForm.vue'; -import type { RoleModel } from '@/api-schema/identity/role/model'; diff --git a/apps/web/src/services/administration/pages/RoleUpdatePage.vue b/apps/web/src/services/administration/pages/RoleUpdatePage.vue index e5c487bbbf..fa2e62f1ad 100644 --- a/apps/web/src/services/administration/pages/RoleUpdatePage.vue +++ b/apps/web/src/services/administration/pages/RoleUpdatePage.vue @@ -35,6 +35,7 @@ import { PHeading, PButton } from '@spaceone/design-system'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import { SpaceRouter } from '@/router'; +import type { RoleModel } from '@/schema/identity/role/model'; import { i18n } from '@/translations'; import { showSuccessMessage } from '@/lib/helper/notice-alert-helper'; @@ -44,7 +45,6 @@ import ErrorHandler from '@/common/composables/error/errorHandler'; import RoleUpdateForm from '@/services/administration/components/RoleUpdateForm.vue'; import { FORM_TYPE } from '@/services/administration/constants/role-constant'; -import type { RoleModel } from '@/api-schema/identity/role/model'; diff --git a/apps/web/src/services/administration/store/policy-page-store.ts b/apps/web/src/services/administration/store/policy-page-store.ts index a87447ae47..de340df3c9 100644 --- a/apps/web/src/services/administration/store/policy-page-store.ts +++ b/apps/web/src/services/administration/store/policy-page-store.ts @@ -4,13 +4,14 @@ import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; +import type { ListResponse } from '@/schema/_common/model'; +import type { PolicyModel } from '@/schema/identity/policy/model'; + import ErrorHandler from '@/common/composables/error/errorHandler'; import { POLICY_TYPE } from '@/services/administration/constants/policy-constant'; import type { PolicyType } from '@/services/administration/types/policy-type'; -import type { ListModel } from '@/api-schema/common/model'; -import type { PolicyModel } from '@/api-schema/identity/policy/model'; @@ -25,7 +26,7 @@ export const usePolicyStore = defineStore('policy-page', { async listPolicyData(params: any): Promise { this.loading = true; try { - const { results, total_count }: ListModel = await SpaceConnector.client.identity.policy.list({ + const { results, total_count }: ListResponse = await SpaceConnector.client.identity.policy.list({ params, }); this.policyList = results; diff --git a/apps/web/src/services/administration/store/role-page-store.ts b/apps/web/src/services/administration/store/role-page-store.ts index 47b437bd91..9dce421882 100644 --- a/apps/web/src/services/administration/store/role-page-store.ts +++ b/apps/web/src/services/administration/store/role-page-store.ts @@ -3,9 +3,10 @@ import { defineStore } from 'pinia'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import type { Query } from '@cloudforet/core-lib/space-connector/type'; +import type { RoleModel } from '@/schema/identity/role/model'; + import ErrorHandler from '@/common/composables/error/errorHandler'; -import type { RoleModel } from '@/api-schema/identity/role/model'; diff --git a/apps/web/src/services/administration/store/user-page-store.ts b/apps/web/src/services/administration/store/user-page-store.ts index a7123ae82e..378fe4201f 100644 --- a/apps/web/src/services/administration/store/user-page-store.ts +++ b/apps/web/src/services/administration/store/user-page-store.ts @@ -4,6 +4,7 @@ import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import type { Query } from '@cloudforet/core-lib/space-connector/type'; import { USER_TYPE } from '@/schema/identity/user/constant'; +import type { UserType } from '@/schema/identity/user/type'; import { store } from '@/store'; import ErrorHandler from '@/common/composables/error/errorHandler'; @@ -11,7 +12,6 @@ import ErrorHandler from '@/common/composables/error/errorHandler'; import { calculateTime } from '@/services/administration/helpers/user-management-tab-helper'; import type { User } from '@/services/administration/types/user-type'; -import type { UserType } from '@/api-schema/identity/user/model'; const _getArrayWithNotDuplicatedItem = (array) => [...new Set(array)]; const _getUserType = (userType: UserType) => { diff --git a/apps/web/src/services/administration/types/user-notification-type.ts b/apps/web/src/services/administration/types/user-notification-type.ts index 793f5c1b63..472a7eec87 100644 --- a/apps/web/src/services/administration/types/user-notification-type.ts +++ b/apps/web/src/services/administration/types/user-notification-type.ts @@ -2,7 +2,7 @@ import type { TranslateResult } from 'vue-i18n'; import type { Location } from 'vue-router'; -import type { Tags, TimeStamp } from '@/api-schema/common/model'; +import type { Tags, TimeStamp } from '@/schema/_common/model'; type ProtocolType = 'INTERNAL' | 'EXTERNAL'; diff --git a/apps/web/src/services/administration/types/user-type.ts b/apps/web/src/services/administration/types/user-type.ts index 3457492cad..4d453fa7f2 100644 --- a/apps/web/src/services/administration/types/user-type.ts +++ b/apps/web/src/services/administration/types/user-type.ts @@ -1,8 +1,4 @@ - -import type { UserModel } from '@/api-schema/identity/user/model'; - - - +import type { UserModel } from '@/schema/identity/user/model'; export interface User extends UserModel { api_key_count?: number; diff --git a/apps/web/src/services/asset-inventory/components/CloudServiceHistory.vue b/apps/web/src/services/asset-inventory/components/CloudServiceHistory.vue index 7516fd0d30..6ec62b9ef8 100644 --- a/apps/web/src/services/asset-inventory/components/CloudServiceHistory.vue +++ b/apps/web/src/services/asset-inventory/components/CloudServiceHistory.vue @@ -114,6 +114,7 @@ import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import { ApiQueryHelper } from '@cloudforet/core-lib/space-connector/helper'; import { SpaceRouter } from '@/router'; +import type { NoteModel } from '@/schema/inventory/note/model'; import { store } from '@/store'; import VerticalTimeline from '@/common/components/vertical-timeline/VerticalTimeline.vue'; @@ -123,11 +124,11 @@ import CloudServiceHistoryDateSelectDropdown from '@/services/asset-inventory/components/CloudServiceHistoryDateSelectDropdown.vue'; import CloudServiceHistoryDetailOverlay from '@/services/asset-inventory/components/CloudServiceHistoryDetailOverlay.vue'; +import { HISTORY_ACTION_MAP } from '@/services/asset-inventory/constants/cloud-service-detail-constant'; import type { CloudServiceHistoryItem, - NoteModel, + } from '@/services/asset-inventory/types/cloud-service-detail-page-type'; -import { HISTORY_ACTION_MAP } from '@/services/asset-inventory/types/cloud-service-detail-page-type'; const makeCustomValueHandler = (distinctKey: string, cloudServiceId: string): ValueHandler => async (inputText: string) => { diff --git a/apps/web/src/services/asset-inventory/components/CloudServiceHistoryDetailNoteTab.vue b/apps/web/src/services/asset-inventory/components/CloudServiceHistoryDetailNoteTab.vue index b2518b329b..a4c3ddbe66 100644 --- a/apps/web/src/services/asset-inventory/components/CloudServiceHistoryDetailNoteTab.vue +++ b/apps/web/src/services/asset-inventory/components/CloudServiceHistoryDetailNoteTab.vue @@ -66,13 +66,14 @@ import { iso8601Formatter } from '@cloudforet/core-lib/index'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import { ApiQueryHelper } from '@cloudforet/core-lib/space-connector/helper'; +import type { NoteModel } from '@/schema/inventory/note/model'; import { store } from '@/store'; import { i18n } from '@/translations'; import DeleteModal from '@/common/components/modals/DeleteModal.vue'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import type { NoteModel } from '@/services/asset-inventory/types/cloud-service-detail-page-type'; + export default { name: 'CloudServiceHistoryDetailNote', diff --git a/apps/web/src/services/asset-inventory/components/CloudServiceHistoryDetailOverlay.vue b/apps/web/src/services/asset-inventory/components/CloudServiceHistoryDetailOverlay.vue index 6277d4a3db..733d8fb4a6 100644 --- a/apps/web/src/services/asset-inventory/components/CloudServiceHistoryDetailOverlay.vue +++ b/apps/web/src/services/asset-inventory/components/CloudServiceHistoryDetailOverlay.vue @@ -117,8 +117,9 @@ import CloudServiceHistoryDetailNote from '@/services/asset-inventory/components/CloudServiceHistoryDetailNoteTab.vue'; import CloudServiceLogTab from '@/services/asset-inventory/components/CloudServiceLogTab.vue'; +import { HISTORY_ACTION_MAP } from '@/services/asset-inventory/constants/cloud-service-detail-constant'; import type { CloudServiceHistoryItem } from '@/services/asset-inventory/types/cloud-service-detail-page-type'; -import { HISTORY_ACTION_MAP } from '@/services/asset-inventory/types/cloud-service-detail-page-type'; + const TIMELINE_ITEM_LIMIT = 10; diff --git a/apps/web/src/services/asset-inventory/components/CloudServiceUsageOverview.vue b/apps/web/src/services/asset-inventory/components/CloudServiceUsageOverview.vue index c462194dd2..000aa34c6d 100644 --- a/apps/web/src/services/asset-inventory/components/CloudServiceUsageOverview.vue +++ b/apps/web/src/services/asset-inventory/components/CloudServiceUsageOverview.vue @@ -54,15 +54,14 @@ import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import { getCancellableFetcher } from '@cloudforet/core-lib/space-connector/cancallable-fetcher'; import type { ApiFilter } from '@cloudforet/core-lib/space-connector/type'; +import type { CloudServiceTypeInfo } from '@/schema/inventory/cloud-service-type/model'; + import ErrorHandler from '@/common/composables/error/errorHandler'; import CloudServiceUsageOverviewDetailModal from '@/services/asset-inventory/components/CloudServiceUsageOverviewDetailModal.vue'; import CloudServiceUsageOverviewSummary from '@/services/asset-inventory/components/CloudServiceUsageOverviewSummary.vue'; -import type { - CloudServiceTypeInfo, -} from '@/services/asset-inventory/types/cloud-service-detail-page-type'; import type { Period } from '@/services/asset-inventory/types/type'; interface Props { diff --git a/apps/web/src/services/asset-inventory/components/CloudServiceUsageOverviewDetailModal.vue b/apps/web/src/services/asset-inventory/components/CloudServiceUsageOverviewDetailModal.vue index 019f2ef295..95214f7ca5 100644 --- a/apps/web/src/services/asset-inventory/components/CloudServiceUsageOverviewDetailModal.vue +++ b/apps/web/src/services/asset-inventory/components/CloudServiceUsageOverviewDetailModal.vue @@ -73,6 +73,7 @@ import type { ConsoleFilter } from '@cloudforet/core-lib/query/type'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import type { ApiFilter } from '@cloudforet/core-lib/space-connector/type'; +import type { CloudServiceTypeInfo } from '@/schema/inventory/cloud-service-type/model'; import { store } from '@/store'; import { i18n } from '@/translations'; @@ -85,7 +86,6 @@ import { useQueryTags } from '@/common/composables/query-tags'; import CloudServicePeriodFilter from '@/services/asset-inventory/components/CloudServicePeriodFilter.vue'; import CloudServiceUsageOverviewSummary from '@/services/asset-inventory/components/CloudServiceUsageOverviewSummary.vue'; -import type { CloudServiceTypeInfo } from '@/services/asset-inventory/types/cloud-service-detail-page-type'; import type { Period } from '@/services/asset-inventory/types/type'; interface Data { diff --git a/apps/web/src/services/asset-inventory/components/CollectorBaseInfoSection.vue b/apps/web/src/services/asset-inventory/components/CollectorBaseInfoSection.vue index ce21fe01f3..ad6b57dbe9 100644 --- a/apps/web/src/services/asset-inventory/components/CollectorBaseInfoSection.vue +++ b/apps/web/src/services/asset-inventory/components/CollectorBaseInfoSection.vue @@ -67,11 +67,12 @@ import { UPGRADE_MODE } from '@/schema/inventory/collector/model'; import type { CollectorModel, CollectorPluginModel, - JobModel, CollectorUpdateParameter, CollectorUpdatePluginParameter, - RepositoryPluginModel, + } from '@/schema/inventory/collector/model'; +import type { JobModel } from '@/schema/inventory/job/model'; +import type { PluginModel } from '@/schema/repository/plugin/model'; import { i18n } from '@/translations'; import { showSuccessMessage } from '@/lib/helper/notice-alert-helper'; @@ -100,7 +101,7 @@ const collectorJobState = collectorJobStore.$state; const state = reactive({ collectorPluginInfo: computed(() => collectorFormState.originCollector?.plugin_info ?? null), - repositoryPlugin: null as null|RepositoryPluginModel, + repositoryPlugin: null as null|PluginModel, isCollectorAutoUpgrade: computed(() => collectorFormState.originCollector?.plugin_info?.upgrade_mode === UPGRADE_MODE.AUTO), isLatestVersion: computed(() => { const version = state.collectorPluginInfo?.version; diff --git a/apps/web/src/services/asset-inventory/components/CollectorCreateStep1.vue b/apps/web/src/services/asset-inventory/components/CollectorCreateStep1.vue index 9b57b491dd..730d9feef5 100644 --- a/apps/web/src/services/asset-inventory/components/CollectorCreateStep1.vue +++ b/apps/web/src/services/asset-inventory/components/CollectorCreateStep1.vue @@ -80,6 +80,8 @@ import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import { ApiQueryHelper } from '@cloudforet/core-lib/space-connector/helper'; +import type { PluginModel } from '@/schema/repository/plugin/model'; + import ErrorHandler from '@/common/composables/error/errorHandler'; import { useLastItemObserver } from '@/common/composables/last-item-observer'; @@ -92,7 +94,6 @@ import CollectPluginContents from '@/services/asset-inventory/components/CollectorPluginContents.vue'; import { useCollectorFormStore } from '@/services/asset-inventory/stores/collector-form-store'; -import type { RepositoryPluginModel } from '@/api-schema/inventory/collector/model'; const emit = defineEmits([ 'update:currentStep', @@ -104,7 +105,7 @@ const collectorFormState = collectorFormStore.$state; const state = reactive({ inputValue: '', - pluginList: [] as RepositoryPluginModel[], + pluginList: [] as PluginModel[], loading: false, selectedRepository: '', currentPage: 1, @@ -114,7 +115,7 @@ const state = reactive({ const pluginApiQuery = new ApiQueryHelper(); const getPluginKey = (item) => `${item.name}-${item.repository_info.repository_id}`; -const getPlugins = async (): Promise => { +const getPlugins = async (): Promise => { try { state.loading = true; pluginApiQuery.setPage(getPageStart(state.currentPage, 10), 10).setSort('name', false) @@ -154,7 +155,7 @@ const handleSearch = async (keyword) => { if (!state.inputValue && !keyword) return; await updateKeyword(keyword); }; -const handleClickNextStep = (item: RepositoryPluginModel) => { +const handleClickNextStep = (item: PluginModel) => { emit('update:currentStep', 2); collectorFormStore.setRepositoryPlugin(item); }; diff --git a/apps/web/src/services/asset-inventory/components/CollectorCreateStep4.vue b/apps/web/src/services/asset-inventory/components/CollectorCreateStep4.vue index f852f870a6..3f6bbc161b 100644 --- a/apps/web/src/services/asset-inventory/components/CollectorCreateStep4.vue +++ b/apps/web/src/services/asset-inventory/components/CollectorCreateStep4.vue @@ -59,6 +59,7 @@ import { import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import { SpaceRouter } from '@/router'; +import type { CollectorCreateParameter, CollectorModel } from '@/schema/inventory/collector/model'; import { i18n } from '@/translations'; import { showSuccessMessage } from '@/lib/helper/notice-alert-helper'; @@ -72,7 +73,6 @@ import { useCollectorFormStore, } from '@/services/asset-inventory/stores/collector-form-store'; -import type { CollectorCreateParameter, CollectorModel } from '@/api-schema/inventory/collector/model'; const collectorFormStore = useCollectorFormStore(); const collectorFormState = collectorFormStore.$state; diff --git a/apps/web/src/services/asset-inventory/components/CollectorCurrentStatus.vue b/apps/web/src/services/asset-inventory/components/CollectorCurrentStatus.vue index 952a91bea8..d169694143 100644 --- a/apps/web/src/services/asset-inventory/components/CollectorCurrentStatus.vue +++ b/apps/web/src/services/asset-inventory/components/CollectorCurrentStatus.vue @@ -59,8 +59,9 @@ import { numberFormatter } from '@cloudforet/core-lib/index'; import { peacock } from '@/styles/colors'; +import { JOB_STATE } from '@/services/asset-inventory/constants/collector-constant'; import type { JobAnalyzeStatus } from '@/services/asset-inventory/types/collector-main-page-type'; -import { JOB_STATE } from '@/services/asset-inventory/types/collector-type'; + const PROGRESS_BAR_COLOR = peacock[500]; diff --git a/apps/web/src/services/asset-inventory/components/CollectorDataDefaultInner.vue b/apps/web/src/services/asset-inventory/components/CollectorDataDefaultInner.vue index aa98af4cee..56bdeae69f 100644 --- a/apps/web/src/services/asset-inventory/components/CollectorDataDefaultInner.vue +++ b/apps/web/src/services/asset-inventory/components/CollectorDataDefaultInner.vue @@ -21,10 +21,11 @@