/* eslint-disable */ /* tslint:disable */ /* * --------------------------------------------------------------- * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## * ## ## * ## AUTHOR: acacode ## * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## * --------------------------------------------------------------- */ /** * Common types shared across multiple API modules * This file is auto-generated to avoid duplicate type definitions */ export interface GormDeletedAt { time?: string; /** Valid is true if Time is not NULL */ valid?: boolean; } export interface AppOptions { use_home_dashboard?: boolean; } export interface IngressGroup { default?: boolean; i18n_name?: I18NText; icon_name?: string; id?: number; items?: IngressItem[]; name?: string; } export interface IngressItem { enabled?: boolean; i18n_name?: I18NText; id?: string; meta?: Record; name?: string; type?: string; } export type I18NText = Record; export interface ErrorResponse { error?: string; key?: string; meta?: Record; status?: string; } export enum PronounsType { PronounsTypeUnknown = 0, PronounsTypeHeHim = 1, PronounsTypeSheHer = 2, PronounsTypeTheyThem = 3, PronounsTypeOther = 4, } export interface Tenant { color_schema?: string; createdAt?: string; currency?: string; deletedAt?: SqlNullTime; /** not in db */ hashID?: string; icon_assets_id?: number; icon_url?: string; id?: number; join_able?: boolean; locale?: string; logo_assets_id?: number; logo_url?: string; name?: string; timezone?: string; updatedAt?: string; } export interface User { bio?: string; city?: string; country?: string; custom_pronouns?: string; email?: string; locale?: string; mobile?: string; mobile_prefix?: string; name?: string; pronouns?: PronounsType; t?: number; timezone?: string; } export interface SqlNullTime { time?: string; /** Valid is true if Time is not NULL */ valid?: boolean; } export enum PermitValueFrom { ValueFromStatic = 1, ValueFromRelation = 2, } export enum PermitEntityProp { PropCreateTime = "created", PropUpdateTime = "updated", PropCreateBy = "creator", } export enum PermitEntityEvent { EntityCreated = 1, EntityUpdated = 2, EntityDeleted = 3, EntitySchemaChanged = 4, EntityCommentAdded = 99, EntityFlowChanged = 11, EntityFlowAction = 12, } export interface PermitConditionSet { conditions?: PermitRecordCondition[]; /** and, or */ mode?: string; } export interface PermitRecordCondition { column?: PermitEntityProp; operator?: string; subset?: PermitConditionSet; value?: any; value_from?: PermitValueFrom; value_relation?: PermitEntityProp; } export interface CommonPagination { page?: number; size?: number; total?: number; } export interface App { createdAt?: string; deletedAt?: GormDeletedAt; has_workflow?: boolean; icon_color?: string; icon_name?: string; id?: number; name?: string; options?: AppOptions; tenant_id?: number; updatedAt?: string; } export interface DashboardOptions { i18n_name?: Record; theme?: { gutter?: number; has_shadow?: boolean; round_corners?: number; }; users?: PermitUserScope[]; } export interface PermitUserScope { data?: { name?: string; }; id?: number; /** department, member, actor */ type?: string; } export interface TenantDepartment { child_dept_count?: number; children?: TenantDepartment[]; id?: number; name?: string; parent_id?: number; } export interface PostqueryAppendData { assets?: Record; departments?: Record; linkto?: Record; users?: Record; } export interface PostqueryUserData { avatar?: string; city?: string; country?: string; custom_pronouns?: string; id?: number; name?: string; pronouns?: PronounsType; status?: number; timezone?: string; } export interface PostqueryAssetsData { created?: number; expired?: number; file_name?: string; file_size?: number; url?: StorageUrlSets; } export interface PostqueryDepartmentData { id?: number; name?: string; } export interface PostqueryLinktoData { id?: number; title?: string; } export interface StorageUrlSets { /** 3种尺寸, 原始尺寸, 128x128px, 26x26px */ full_size_url?: string; /** 26x26px */ icon_url?: string; /** 128x128px */ thumb_url?: string; } export enum DeveloperClientType { /** 租户级客户端 */ ClientTypeTenant = 1, /** 平台级客户端 */ ClientTypePlatform = 2, } export enum DeveloperClientStatus { ClientStatusActive = 1, ClientStatusSuspended = 2, } export enum NotificationPayloadMode { PayloadModeJson = 0, PayloadModeURLEncoded = 1, } export enum NotificationNotificationType { NotificationTypeWebhook = "webhook", NotificationTypeSQS = "sqs", } export enum MagicStringPartType { MagicStringPartStatic = 1, MagicStringPartField = 2, MagicStringPartProp = 3, } export interface ActionBulkUpdate { action?: ActionBulkUpdateAction; id?: number; } export interface ActionBulkUpdateAction { number_add?: number; number_mul?: number; number_sub?: number; text_append?: string; text_prepend?: string; text_replace?: string; text_search?: string; type?: string; value?: any; } export interface KioskConfig { interactiveMode?: string; lookupFields?: number[]; options?: Record; screens?: KioskScreen[]; theme?: string; } export type KioskScreen = Record; export interface AiOptions { custom?: MagicString; result_map?: { field_id?: number; type?: string; var?: string; }[]; type?: string; } export interface ApiEndpoint { content_type?: string; headers?: ApiEndpointParam[]; method?: string; params?: ApiEndpointParam[]; sign_mode?: string; url?: MagicString; } export interface ApiEndpointParam { key?: string; value?: MagicString; } export interface ApiOptions { api_id?: number; input?: any; output?: any; } export interface Assets { content_type?: string; createdAt?: string; deletedAt?: GormDeletedAt; file?: string; file_name?: string; file_size?: number; id?: number; is_public?: boolean; platform?: string; updatedAt?: string; } export interface Button { action?: Record; label?: string; type?: string; } export interface CustomAction { actions?: EntityFrontEvent[]; id?: string; label?: string; options?: any; } export interface EntityFrontEvent { action?: string; ai_options?: AiOptions; api_options?: ApiOptions; backfills?: any; curl_options?: ApiEndpoint; description?: string; enabled?: boolean; id?: string; open_url_options?: any; setValues?: any; title?: string; trigger_field?: number; type?: string; } export interface EntityKioskFlow { app_id?: number; config?: KioskConfig; enabled?: boolean; entity_id?: number; icon_name?: string; id?: string; last_modified_by?: number; name?: string; tenant_id?: number; title_color?: string; updatedAt?: string; user_scope?: PermitUserScope[]; } export interface EntityOptions { ArchiveSearchFieldID?: number; /** 归档配置 */ EnableArchive?: boolean; buttons?: Button[]; commentAble?: boolean; customActions?: CustomAction[]; customTitle?: boolean; enableDraft?: boolean; enableFastEdit?: boolean; enableLog?: boolean; enableOffline?: boolean; enableSuccessScreen?: boolean; enableTags?: boolean; frontendEvents?: EntityFrontEvent[]; misc?: Record; /** 通知配置 */ notifications?: { /** 使用指针类型以支持默认值 */ enabled?: boolean; events?: PermitEntityEvent[]; events_map?: Record; mode?: NotificationPayloadMode; template?: string; type?: NotificationNotificationType; url?: string; /** 统一使用 Version 字段 */ version?: string; }[]; successScreen?: string; titleFormat?: MagicString; } export interface EntityPrintTemplate { background_assets?: Assets; background_assets_id?: number; entity_id?: number; id?: number; name?: string; size?: string; template?: Record; } export type Fields = object; export interface MagicString { body?: string; fields?: number[]; parts?: MagicStringPart[]; } export interface MagicStringPart { data?: string; /** @format int32 */ fieldID?: number; type?: MagicStringPartType; } export interface PermitColumn { field_id?: number; is_field?: boolean; prop?: string; } export interface PermitEntityListOptions { default_sort?: { column?: PermitColumn; order?: string; }; hide_all_tab_button?: boolean; search?: PermitSearchColumn[]; sorts?: PermitColumn[]; tabs?: PermitEntityListTab[]; widgets?: PermitEntityListWidget[]; } export interface PermitEntityListTab { conditions?: PermitConditionSet; hidden?: string[]; id?: string; label?: string; } export interface PermitEntityListWidget { dashboard_id?: number; height?: number; widget_id?: number; width?: number; } export interface PermitFieldPermit { key?: string; read?: boolean; report?: boolean; write?: boolean; } export interface PermitPolicy { actions?: string[]; all_fields_read?: boolean; all_fields_write?: boolean; condition?: PermitConditionSet; description?: string; fields?: PermitFieldPermit[]; /** TODO: 当migrateion完成后,删除ID字段 */ id?: string; key?: string; name?: string; } export interface PermitSearchColumn { /** default search column */ default?: boolean; /** default value for filter input box */ default_value?: number[]; field_id?: number; infilter?: boolean; is_field?: boolean; /** pinned filter input box to listpage's top */ pinned?: boolean; prop?: string; /** has wildcard, when in default search column */ wildcard?: boolean; } export enum WorkflowStateType { Normal = 0, Processing = 1, Completed = 2, Denied = 3, Cancelled = 4, NotRequired = 5, } export interface DataRecord { created_at?: number; creator?: number; fields?: Record; id?: number; lock_subject?: string; lock_user_id?: number; locked?: boolean; parent_id?: number; process?: DataRecordProcess; process_state?: WorkflowStateType; resources?: DataRecordResource[]; subform_id?: number; tags?: string[]; title?: string; updated_at?: number; } export interface EntityVO { app_id?: number; field_id_seq?: number; fields?: Fields; id?: number; layout?: number[][]; name?: string; options?: EntityOptions; prototypes?: number[]; schema_version?: number; workflow_enabled?: boolean; } export interface DataRecordProcess { trans?: DataRecordTrans[]; } export interface DataRecordResource { key?: any; type?: string; url?: string; } export interface DataRecordTrans { id?: number; label?: string; time?: number; } export interface OpenAPITenantInfo { /** HashID for external API */ ID?: string; IconUrl?: string; /** Whether user is admin of this tenant */ IsAdmin?: boolean; Name?: string; SiteLogoUrl?: string; } export interface EntityValidateUniqFieldVO { field_id?: number; value?: string; } export interface EntityValidateUniqReqVO { fields?: EntityValidateUniqFieldVO[]; record_id?: number; } export type EntityValidateUniqRespVO = Record; export interface UploadPreviewReqVO { fname?: string; upload_id?: number; } export enum WidgetsTypeCode { WidgetsTypeDashboard = 1, WidgetsTypeIngress = 2, } export enum CubeMeasureAggregate { CubeMeasureAggregateSum = "sum", CubeMeasureAggregateAvg = "avg", CubeMeasureAggregateMax = "max", CubeMeasureAggregateMin = "min", CubeMeasureAggregateCount = "count", CubeMeasureAggregateDistinctCount = "distinct_count", } export interface ChartOption { conditions?: PermitConditionSet; dimensions?: CubeDimension[]; entity_id?: number; measures?: CubeMeasure[]; options?: Record; type?: string; } export interface CubeDimension { /** @format int32 */ fieldID?: number; isField?: boolean; label?: string; name?: string; options?: Record; orderBy?: string; propName?: string; } export interface CubeMeasure { aggregate?: CubeMeasureAggregate; /** @format int32 */ fieldID?: number; label?: string; name?: string; options?: Record; orderBy?: string; } export interface DashboardWidgets { app_id?: number; dashboard_id?: number; deletedAt?: GormDeletedAt; entity_id?: number; h?: number; id?: number; ingress_id?: number; options?: WidgetsOption; tenant_id?: number; type?: string; updated_at?: string; w?: number; x?: number; y?: number; } export interface WidgetsListViewOptions { cond_follow?: boolean; cond_follow_cols?: string[]; cond_follow_tab?: boolean; link?: Record; } export interface WidgetsOption { charts?: ChartOption; ingress?: WidgetsListViewOptions; render?: Record; } export interface EntityWorkflowNodeVO { id?: number; label?: string; } export interface EntityWorkflowVersionVO { deployed?: boolean; id?: number; is_current?: boolean; nodes?: EntityWorkflowNodeVO[]; version?: number; }