typings.d.ts 15.3 KB
Newer Older
R
Rongfeng Fu 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
declare namespace API {
  type Auth = {
    /** User ssh user */
    user?: string;
    /** Password ssh password */
    password?: string;
    /** Port ssh port */
    port?: number;
  };

  type Component = {
    /** Name component name */
    name: string;
    /** Info info */
    info?: service_model_components_ComponentInfo[];
  };

  type ComponentConfig = {
    oceanbase: OceanBase;
    obproxy?: ObProxy;
    ocpexpress?: OcpExpress;
    obagent?: ObAgent;
    obclient?: ObClient;
  };

  type ConfigParameter = {
    /** Is Essential is essential */
    is_essential?: boolean;
    /** Name parameter name */
    name?: string;
    /** Require parameter is it required */
    require?: boolean;
    /** Auto parameter can be calculated automatically */
    auto?: boolean;
    /** Description parameter description */
    description?: string;
    /** Type parameter type */
    type?: string;
    /** Default parameter default value */
    default?: string;
    /** Min Value parameter min value */
    min_value?: string;
    /** Max Value parameter max value */
    max_value?: string;
    /** Need Redeploy need redeploy */
    need_redeploy?: boolean;
    /** Modify Limit modify limit */
    modify_limit?: string;
    /** Need Reload need reload */
    need_reload?: boolean;
    /** Need Restart need restart */
    need_restart?: boolean;
    /** Section section */
    section?: string;
  };

  type ConnectionInfo = {
    /** Component component name */
    component: string;
    /** Access Url access url */
    access_url: string;
    /** User user */
    user: string;
    /** Password password */
    password: string;
    /** Connect Url connect url */
    connect_url: string;
  };

  type createDeploymentConfigParams = {
    /** name */
    name: string;
  };

  type DataListComponent_ = {
    /** Total */
    total?: number;
    /** Items */
    items?: Component[];
  };

  type DataListConnectionInfo_ = {
    /** Total */
    total?: number;
    /** Items */
    items?: ConnectionInfo[];
  };

  type DataListDeployment_ = {
    /** Total */
    total?: number;
    /** Items */
    items?: Deployment[];
  };

  type DataListDeploymentReport_ = {
    /** Total */
    total?: number;
    /** Items */
    items?: DeploymentReport[];
  };

  type DataListMirror_ = {
    /** Total */
    total?: number;
    /** Items */
    items?: Mirror[];
  };

  type DataListParameterMeta_ = {
    /** Total */
    total?: number;
    /** Items */
    items?: ParameterMeta[];
  };

  type DataListRecoverChangeParameter_ = {
    /** Total */
    total?: number;
    /** Items */
    items?: RecoverChangeParameter[];
  };

R
Rongfeng Fu 已提交
124
  type deployAndStartADeploymentParams = {
R
Rongfeng Fu 已提交
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
    name: string;
  };

  type Deployment = {
    /** Name deployment name */
    name: string;
    /** Status status, ex:CONFIGURED,DEPLOYED,STARTING,RUNNING,DESTROYED,UPGRADING */
    status: string;
  };

  type DeploymentConfig = {
    auth: Auth;
    components: ComponentConfig;
    /** Home Path global home path */
    home_path?: string;
  };

  type DeploymentInfo = {
    /** Name deployment name */
    name?: string;
    /** Config Path config path */
    config_path?: string;
    /** Status ex:CONFIGURING,CONFIGURED,DEPLOYING,DEPLOYED,RUNNING,STOPPING,STOPPED,DESTROYING,DESTROYED,UPGRADING */
    status?: string;
    config?: DeploymentConfig;
  };

  type DeploymentReport = {
    /** Name component name */
    name: string;
    /** Version component version */
    version: string;
    /** Servers server ip */
    servers: string[];
    /** status, ex: RUNNING, SUCCESSFUL, FAILED */
    status: TaskResult;
  };

  type DeploymentStatus = 'INSTALLING' | 'DRAFT';

  type DeployMode = 'DEMO' | 'PRODUCTION';

R
Rongfeng Fu 已提交
167
  type destroyDeploymentParams = {
R
Rongfeng Fu 已提交
168 169 170
    name: string;
  };

R
Rongfeng Fu 已提交
171 172 173 174 175 176 177
  type getDeploymentParams = {
    /** task status,ex:INSTALLING,DRAFT */
    task_status: DeploymentStatus;
  };

  type getDestroyTaskInfoParams = {
    name: string;
R
Rongfeng Fu 已提交
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
  };

  type HTTPValidationError = {
    /** Detail */
    detail?: ValidationError[];
  };

  type InstallLog = {
    /** Log install log */
    log?: string;
    /** Offset log offset */
    offset?: number;
  };

  type Mirror = {
    /** Mirror Path mirror path */
    mirror_path?: string;
    /** Name mirror name */
    name: string;
    /** Section Name section name */
    section_name?: string;
    /** Baseurl baseurl */
    baseurl?: string;
    /** Repomd Age repomd age */
    repomd_age?: number;
    /** Repo Age repo age */
    repo_age?: number;
    /** Priority priority */
    priority?: number;
    /** Gpgcheck gpgcheck */
    gpgcheck?: string;
    /** Enabled remote mirror is enabled */
R
Rongfeng Fu 已提交
210
    enabled?: boolean;
R
Rongfeng Fu 已提交
211
    /** Available remote mirror is enabled */
R
Rongfeng Fu 已提交
212
    available?: boolean;
R
Rongfeng Fu 已提交
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463
  };

  type ObAgent = {
    /** Component obagent component name,ex:obagent */
    component?: string;
    /** Version version */
    version: string;
    /** Package Hash obagent package md5 */
    package_hash?: string;
    /** Release obagent release no */
    release: string;
    /** Home Path install obagent home path */
    home_path?: string;
    /** Monagent Http Port server port */
    monagent_http_port: number;
    /** Mgragent Http Port debug port */
    mgragent_http_port: number;
    /** Parameters config parameter */
    parameters?: Parameter[];
    /** Servers server ip, ex:[ '1.1.1.1','2.2.2.2'] */
    servers: string[];
  };

  type ObClient = {
    /** Component obclient component name,ex:obclient */
    component?: string;
    /** Version version */
    version: string;
    /** Release obclient release no */
    release: string;
    /** Parameters config parameter */
    parameters?: Parameter[];
    /** Home Path install obclient home path */
    home_path?: string;
    /** Servers server ip, ex:[ '1.1.1.1','2.2.2.2'] */
    servers: string[];
  };

  type ObProxy = {
    /** Component obproxy component name, ex:obproxy-ce,obproxy */
    component: string;
    /** Version version */
    version: string;
    /** Package Hash obproxy package md5 */
    package_hash?: string;
    /** Release obproxy release no */
    release: string;
    /** Cluster Name obproxy name */
    cluster_name?: string;
    /** Home Path install obproxy home path */
    home_path?: string;
    /** Prometheus Listen Port prometheus port */
    prometheus_listen_port: number;
    /** Listen Port sql port */
    listen_port: number;
    /** Parameters config parameter */
    parameters?: Parameter[];
    /** Servers server ip, ex:[ '1.1.1.1','2.2.2.2'] */
    servers: string[];
  };

  type OBResponse = {
    /** Code */
    code?: number;
    /** Data */
    data?: any;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseComponent_ = {
    /** Code */
    code?: number;
    data?: Component;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseDataListComponent_ = {
    /** Code */
    code?: number;
    data?: DataListComponent_;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseDataListConnectionInfo_ = {
    /** Code */
    code?: number;
    data?: DataListConnectionInfo_;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseDataListDeployment_ = {
    /** Code */
    code?: number;
    data?: DataListDeployment_;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseDataListDeploymentReport_ = {
    /** Code */
    code?: number;
    data?: DataListDeploymentReport_;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseDataListMirror_ = {
    /** Code */
    code?: number;
    data?: DataListMirror_;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseDataListParameterMeta_ = {
    /** Code */
    code?: number;
    data?: DataListParameterMeta_;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseDataListRecoverChangeParameter_ = {
    /** Code */
    code?: number;
    data?: DataListRecoverChangeParameter_;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseDeploymentInfo_ = {
    /** Code */
    code?: number;
    data?: DeploymentInfo;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseInstallLog_ = {
    /** Code */
    code?: number;
    data?: InstallLog;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponsePreCheckResult_ = {
    /** Code */
    code?: number;
    data?: PreCheckResult;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseServiceInfo_ = {
    /** Code */
    code?: number;
    data?: ServiceInfo;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OBResponseTaskInfo_ = {
    /** Code */
    code?: number;
    data?: TaskInfo;
    /** Msg */
    msg?: string;
    /** Success */
    success?: boolean;
  };

  type OceanBase = {
    /** Component oceanbase component name,ex:oceanbase-ce,oceanbase */
    component: string;
    /** Appname cluster name */
    appname: string;
    /** Version version */
    version: string;
    /** Release oceanbase release no */
    release: string;
    /** Package Hash oceanbase package md5 */
    package_hash?: string;
    /** deploy mode ex:DEMO,PRODUCTION */
    mode: DeployMode;
    /** Root Password root password */
    root_password: string;
    /** Mysql Port sql port */
    mysql_port: number;
    /** Rpc Port rpc port */
    rpc_port: number;
    /** Home Path install OceanBase home path */
    home_path?: string;
    /** Data Dir OceanBase data path */
    data_dir?: string;
    /** Redo Dir clog path */
    redo_dir?: string;
    /** Parameters config parameter */
    parameters?: Parameter[];
    /** Topology topology */
    topology: Zone[];
  };

  type OceanbaseServers = {
    /** Ip server ip */
    ip: string;
    /** Parameters */
    parameters?: Record<string, any>;
  };

  type OcpExpress = {
    /** Component ocp-express component name */
    component?: string;
    /** Version version */
    version: string;
    /** Package Hash ocp-express package md5 */
    package_hash?: string;
    /** Release ocp-express release no */
    release: string;
    /** Home Path install ocp-express home path */
    home_path?: string;
R
Rongfeng Fu 已提交
464
    /** Port server port */
R
Rongfeng Fu 已提交
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553
    port: number;
    /** Parameters config parameter */
    parameters?: Parameter[];
    /** Servers server ip, ex:[ '1.1.1.1','2.2.2.2'] */
    servers: string[];
  };

  type Parameter = {
    /** Key parameter key */
    key: string;
    /** Value parameter value */
    value: string;
    /** Adaptive parameter value is adaptive */
    adaptive?: boolean;
  };

  type ParameterFilter = {
    /** Component component name */
    component: string;
    /** Version version name */
    version: string;
    /** Is Essential Only essential parameter filter */
    is_essential_only?: boolean;
  };

  type ParameterMeta = {
    /** Component */
    component: string;
    /** Version */
    version: string;
    /** Config Parameters */
    config_parameters: ConfigParameter[];
  };

  type ParameterRequest = {
    /** Filters parameter filters */
    filters: ParameterFilter[];
  };

  type PreCheckInfo = {
    /** Name pre check item */
    name: string;
    /** Server server node */
    server: string;
    /** status, ex:FINISHED, RUNNING, PENDING */
    status?: TaskStatus;
    /** result, ex:PASSED, FAILED */
    result?: PrecheckTaskResult;
    /** Recoverable can be automatically repaired */
    recoverable?: boolean;
    /** Code error code */
    code?: string;
    /** Description error description */
    description?: string;
    /** Advisement repaired suggestion */
    advisement?: RecoverAdvisement;
  };

  type preCheckParams = {
    name: string;
  };

  type PreCheckResult = {
    /** Total total item for pre check */
    total?: number;
    /** Finished finished item for pre check */
    finished?: number;
    /** All Passed is all passed */
    all_passed?: boolean;
    /** pre check task status,ex:RUNNING,SUCCESSFUL,FAILED */
    status?: TaskResult;
    /** Message pre check task message */
    message?: string;
    /** Info pre check item info */
    info?: PreCheckInfo[];
  };

  type preCheckStatusParams = {
    /** deployment name */
    name: string;
  };

  type PrecheckTaskResult = 'PASSED' | 'FAILED' | 'RUNNING';

  type queryComponentByComponentNameParams = {
    /** component name */
    component: string;
  };

R
Rongfeng Fu 已提交
554 555 556 557
  type queryComponentParametersParams = {
    'accept-language'?: string;
  };

R
Rongfeng Fu 已提交
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577
  type queryConnectionInfoParams = {
    /** deployment name */
    name: string;
  };

  type queryDeploymentConfigParams = {
    /** deployment name */
    name: string;
  };

  type queryDeploymentReportParams = {
    /** deployment name */
    name: string;
  };

  type queryInstallLogParams = {
    /** deployment name */
    name: string;
    /** log offset */
    offset?: number;
R
Rongfeng Fu 已提交
578 579
    /** component name */
    component_name?: string;
R
Rongfeng Fu 已提交
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655
  };

  type queryInstallStatusParams = {
    /** deployment name */
    name: string;
  };

  type RecoverAdvisement = {
    /** Description advisement description */
    description?: string;
  };

  type RecoverChangeParameter = {
    /** Name repaired item */
    name: string;
    /** Old Value old value item */
    old_value?: any;
    /** New Value new value item */
    new_value?: any;
  };

  type recoverParams = {
    /** deployment name */
    name: string;
  };

  type service_model_components_ComponentInfo = {
    /** Estimated Size estimated size after install */
    estimated_size?: number;
    /** Version component version */
    version?: string;
    /** Type component type,ex:remote,local */
    type?: string;
    /** Release component release no */
    release?: string;
    /** Arch component package arch info */
    arch?: string;
    /** Md5 component package md5 info */
    md5?: string;
    /** Version Type  version type,ex:ce,business */
    version_type?: string;
  };

  type service_model_deployments_ComponentInfo = {
    /** Component install component name */
    component: string;
    /** status, ex:FINISHED, RUNNING, PENDING */
    status: TaskStatus;
    /** result, ex:SUCCESSFUL, FAILED */
    result: TaskResult;
  };

  type ServiceInfo = {
    /** User user name */
    user: string;
  };

  type TaskInfo = {
    /** Total total item for install */
    total?: number;
    /** Finished finished item for install */
    finished?: number;
    /** Current current item for install */
    current?: string;
    /** status,ex:RUNNING,SUCCESSFUL,FAILED */
    status: TaskResult;
    /** Msg task message */
    msg?: string;
    /** Info install item info */
    info?: service_model_deployments_ComponentInfo[];
  };

  type TaskResult = 'SUCCESSFUL' | 'FAILED' | 'RUNNING';

  type TaskStatus = 'PENDING' | 'RUNNING' | 'FINISHED';

R
Rongfeng Fu 已提交
656 657 658 659 660 661 662
  type validateOrSetKeepAliveTokenParams = {
    /** token */
    token?: string;
    /** force set token when conflict */
    overwrite?: boolean;
  };

R
Rongfeng Fu 已提交
663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680
  type ValidationError = {
    /** Location */
    loc: any[];
    /** Message */
    msg: string;
    /** Error Type */
    type: string;
  };

  type Zone = {
    /** Name zone name */
    name: string;
    /** Rootservice root service */
    rootservice: string;
    /** Servers */
    servers: OceanbaseServers[];
  };
}