Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change d.ts for better intelesense #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 47 additions & 25 deletions lib/services/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,55 @@
import { ConfigOptions } from '../core/config';
import { CredentialOptions } from '../core/credential';
declare const BaseClient: any;
import BaseClient from '../core/client';
import CubeClient from './cube';
import IPSecVPNClient from './ipsecvpn';
import PathXClient from './pathx';
import UAccountClient from './uaccount';
import UBillClient from './ubill';
import UCDNClient from './ucdn';
import UDBClient from './udb';
import UDDBClient from './uddb';
import UDiskClient from './udisk';
import UDPNClient from './udpn';
import UECClient from './uec';
import UFileClient from './ufile';
import UFSClient from './ufs';
import UHostClient from './uhost';
import UK8SClient from './uk8s';
import ULBClient from './ulb';
import UMemClient from './umem';
import UNetClient from './unet';
import UPhoneClient from './uphone';
import UPHostClient from './uphost';
import USMSClient from './usms';
import UVMSClient from './uvms';
import VPCClient from './vpc';
export declare class Client extends BaseClient {
constructor({ config, credential, }: {
config: ConfigOptions;
credential: CredentialOptions;
});
cube(): any;
ipsecvpn(): any;
pathx(): any;
uaccount(): any;
ubill(): any;
ucdn(): any;
udb(): any;
uddb(): any;
udisk(): any;
udpn(): any;
uec(): any;
ufile(): any;
ufs(): any;
uhost(): any;
uk8s(): any;
ulb(): any;
umem(): any;
unet(): any;
uphone(): any;
uphost(): any;
usms(): any;
uvms(): any;
vpc(): any;
cube(): CubeClient;
ipsecvpn(): IPSecVPNClient;
pathx(): PathXClient;
uaccount(): UAccountClient;
ubill(): UBillClient;
ucdn(): UCDNClient;
udb(): UDBClient;
uddb(): UDDBClient;
udisk(): UDiskClient;
udpn(): UDPNClient;
uec(): UECClient;
ufile(): UFileClient;
ufs(): UFSClient;
uhost(): UHostClient;
uk8s(): UK8SClient;
ulb(): ULBClient;
umem(): UMemClient;
unet(): UNetClient;
uphone(): UPhoneClient;
uphost(): UPHostClient;
usms(): USMSClient;
uvms(): UVMSClient;
vpc(): VPCClient;
}
export {};
99 changes: 51 additions & 48 deletions lib/services/index.js
Original file line number Diff line number Diff line change
@@ -1,129 +1,132 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Client = void 0;
const BaseClient = require('../core/client').default;
const CubeClient = require('./cube').default;
const IPSecVPNClient = require('./ipsecvpn').default;
const PathXClient = require('./pathx').default;
const UAccountClient = require('./uaccount').default;
const UBillClient = require('./ubill').default;
const UCDNClient = require('./ucdn').default;
const UDBClient = require('./udb').default;
const UDDBClient = require('./uddb').default;
const UDiskClient = require('./udisk').default;
const UDPNClient = require('./udpn').default;
const UECClient = require('./uec').default;
const UFileClient = require('./ufile').default;
const UFSClient = require('./ufs').default;
const UHostClient = require('./uhost').default;
const UK8SClient = require('./uk8s').default;
const ULBClient = require('./ulb').default;
const UMemClient = require('./umem').default;
const UNetClient = require('./unet').default;
const UPhoneClient = require('./uphone').default;
const UPHostClient = require('./uphost').default;
const USMSClient = require('./usms').default;
const UVMSClient = require('./uvms').default;
const VPCClient = require('./vpc').default;
class Client extends BaseClient {
const client_1 = __importDefault(require("../core/client"));
const cube_1 = __importDefault(require("./cube"));
const ipsecvpn_1 = __importDefault(require("./ipsecvpn"));
const pathx_1 = __importDefault(require("./pathx"));
const uaccount_1 = __importDefault(require("./uaccount"));
const ubill_1 = __importDefault(require("./ubill"));
const ucdn_1 = __importDefault(require("./ucdn"));
const udb_1 = __importDefault(require("./udb"));
const uddb_1 = __importDefault(require("./uddb"));
const udisk_1 = __importDefault(require("./udisk"));
const udpn_1 = __importDefault(require("./udpn"));
const uec_1 = __importDefault(require("./uec"));
const ufile_1 = __importDefault(require("./ufile"));
const ufs_1 = __importDefault(require("./ufs"));
const uhost_1 = __importDefault(require("./uhost"));
const uk8s_1 = __importDefault(require("./uk8s"));
const ulb_1 = __importDefault(require("./ulb"));
const umem_1 = __importDefault(require("./umem"));
const unet_1 = __importDefault(require("./unet"));
const uphone_1 = __importDefault(require("./uphone"));
const uphost_1 = __importDefault(require("./uphost"));
const usms_1 = __importDefault(require("./usms"));
const uvms_1 = __importDefault(require("./uvms"));
const vpc_1 = __importDefault(require("./vpc"));
class Client extends client_1.default {
constructor({ config, credential, }) {
super({ config, credential });
}
cube() {
return new CubeClient({ config: this.config, credential: this.credential });
return new cube_1.default({ config: this.config, credential: this.credential });
}
ipsecvpn() {
return new IPSecVPNClient({
return new ipsecvpn_1.default({
config: this.config,
credential: this.credential,
});
}
pathx() {
return new PathXClient({
return new pathx_1.default({
config: this.config,
credential: this.credential,
});
}
uaccount() {
return new UAccountClient({
return new uaccount_1.default({
config: this.config,
credential: this.credential,
});
}
ubill() {
return new UBillClient({
return new ubill_1.default({
config: this.config,
credential: this.credential,
});
}
ucdn() {
return new UCDNClient({ config: this.config, credential: this.credential });
return new ucdn_1.default({ config: this.config, credential: this.credential });
}
udb() {
return new UDBClient({ config: this.config, credential: this.credential });
return new udb_1.default({ config: this.config, credential: this.credential });
}
uddb() {
return new UDDBClient({ config: this.config, credential: this.credential });
return new uddb_1.default({ config: this.config, credential: this.credential });
}
udisk() {
return new UDiskClient({
return new udisk_1.default({
config: this.config,
credential: this.credential,
});
}
udpn() {
return new UDPNClient({ config: this.config, credential: this.credential });
return new udpn_1.default({ config: this.config, credential: this.credential });
}
uec() {
return new UECClient({ config: this.config, credential: this.credential });
return new uec_1.default({ config: this.config, credential: this.credential });
}
ufile() {
return new UFileClient({
return new ufile_1.default({
config: this.config,
credential: this.credential,
});
}
ufs() {
return new UFSClient({ config: this.config, credential: this.credential });
return new ufs_1.default({ config: this.config, credential: this.credential });
}
uhost() {
return new UHostClient({
return new uhost_1.default({
config: this.config,
credential: this.credential,
});
}
uk8s() {
return new UK8SClient({ config: this.config, credential: this.credential });
return new uk8s_1.default({ config: this.config, credential: this.credential });
}
ulb() {
return new ULBClient({ config: this.config, credential: this.credential });
return new ulb_1.default({ config: this.config, credential: this.credential });
}
umem() {
return new UMemClient({ config: this.config, credential: this.credential });
return new umem_1.default({ config: this.config, credential: this.credential });
}
unet() {
return new UNetClient({ config: this.config, credential: this.credential });
return new unet_1.default({ config: this.config, credential: this.credential });
}
uphone() {
return new UPhoneClient({
return new uphone_1.default({
config: this.config,
credential: this.credential,
});
}
uphost() {
return new UPHostClient({
return new uphost_1.default({
config: this.config,
credential: this.credential,
});
}
usms() {
return new USMSClient({ config: this.config, credential: this.credential });
return new usms_1.default({ config: this.config, credential: this.credential });
}
uvms() {
return new UVMSClient({ config: this.config, credential: this.credential });
return new uvms_1.default({ config: this.config, credential: this.credential });
}
vpc() {
return new VPCClient({ config: this.config, credential: this.credential });
return new vpc_1.default({ config: this.config, credential: this.credential });
}
}
exports.Client = Client;
Expand Down
35 changes: 35 additions & 0 deletions lib/services/ucdn/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ export default class UCDNClient extends Client {
* See also: https://docs.ucloud.cn/api/ucdn-api/add_certificate
*/
addCertificate(request?: AddCertificateRequest): Promise<AddCertificateResponse>;
/**
* GetCertificateBaseInfoList - 配置CDN获取证书列表
*/
getCertificateBaseInfoList(request: GetCertificateBaseInfoListRequest): Promise<GetCertificateBaseInfoListResponse>;
/**
* UpdateUcdnDomainHttpsConfig - 配置CDN域名HTTPS
*/
updateUcdnDomainHttpsConfig(request?: UpdateUcdnDomainHttpsConfigRequest): Promise<UpdateUcdnDomainHttpsConfigResponse>;
/**
* ControlUcdnDomainCacheAccess - 封禁解封缓存访问
*
Expand Down Expand Up @@ -216,6 +224,33 @@ export interface AddCertificateRequest {
*/
export interface AddCertificateResponse {
}
/**
* 配置CDN证书获取证书清单
*/
export interface GetCertificateBaseInfoListRequest {
Domain?: string;
}
export interface GetCertificateBaseInfoListResponse {
CertList: Array<{
CertId: number;
CertName: string;
CertType: 'ucdn';
}>;
}
/**
* 配置CDN的HTTPS
*/
export interface UpdateUcdnDomainHttpsConfigRequest {
ProjectId: string;
Areacode: 'cn' | 'oversea';
DomainId: string;
HttpsStatus: 'enable' | 'disable';
CertName?: string;
CertId: number;
CertType: 'ucdn';
}
export interface UpdateUcdnDomainHttpsConfigResponse {
}
/**
* ControlUcdnDomainCacheAccess - 封禁解封缓存访问
*/
Expand Down
14 changes: 14 additions & 0 deletions lib/services/ucdn/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ class UCDNClient extends client_1.default {
const args = Object.assign({ Action: 'AddCertificate' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetCertificateBaseInfoList - 配置CDN获取证书列表
*/
getCertificateBaseInfoList(request) {
const args = Object.assign({ Action: 'GetCertificateBaseInfoList' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* UpdateUcdnDomainHttpsConfig - 配置CDN域名HTTPS
*/
updateUcdnDomainHttpsConfig(request) {
const args = Object.assign({ Action: 'UpdateUcdnDomainHttpsConfig' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* ControlUcdnDomainCacheAccess - 封禁解封缓存访问
*
Expand Down
Loading