@cloudbase/manager-node 4.2.3 → 4.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +4 -3
  3. package/lib/access/index.js +0 -141
  4. package/lib/access/types.js +0 -2
  5. package/lib/billing/index.js +0 -36
  6. package/lib/cam/index.js +0 -77
  7. package/lib/cloudBaseRun/index.js +0 -36
  8. package/lib/cloudBaseRun/types.js +0 -2
  9. package/lib/common/index.js +0 -39
  10. package/lib/constant.js +0 -51
  11. package/lib/context.js +0 -14
  12. package/lib/database/index.js +0 -244
  13. package/lib/debug.js +0 -34
  14. package/lib/env/index.js +0 -488
  15. package/lib/environment.js +0 -124
  16. package/lib/environmentManager.js +0 -44
  17. package/lib/error.js +0 -16
  18. package/lib/function/index.js +0 -1022
  19. package/lib/function/packer.js +0 -129
  20. package/lib/function/types.js +0 -2
  21. package/lib/hosting/index.js +0 -461
  22. package/lib/index.js +0 -83
  23. package/lib/interfaces/base.interface.js +0 -2
  24. package/lib/interfaces/billing.interface.js +0 -2
  25. package/lib/interfaces/cam.interface.js +0 -2
  26. package/lib/interfaces/flexdb.interface.js +0 -2
  27. package/lib/interfaces/function.interface.js +0 -2
  28. package/lib/interfaces/index.js +0 -19
  29. package/lib/interfaces/storage.interface.js +0 -2
  30. package/lib/interfaces/tcb.interface.js +0 -2
  31. package/lib/storage/index.js +0 -1037
  32. package/lib/third/index.js +0 -18
  33. package/lib/user/index.js +0 -136
  34. package/lib/user/types.js +0 -2
  35. package/lib/utils/auth.js +0 -97
  36. package/lib/utils/cloud-api-request.js +0 -205
  37. package/lib/utils/cloudbase-request.js +0 -69
  38. package/lib/utils/envLazy.js +0 -18
  39. package/lib/utils/fs.js +0 -64
  40. package/lib/utils/http-request.js +0 -44
  41. package/lib/utils/index.js +0 -103
  42. package/lib/utils/parallel.js +0 -69
  43. package/lib/utils/uuid.js +0 -18
  44. package/src/access/index.ts +0 -168
  45. package/src/access/types.ts +0 -55
  46. package/src/billing/index.ts +0 -43
  47. package/src/cam/index.ts +0 -106
  48. package/src/cloudBaseRun/index.ts +0 -40
  49. package/src/cloudBaseRun/types.ts +0 -24
  50. package/src/common/index.ts +0 -54
  51. package/src/constant.ts +0 -56
  52. package/src/context.ts +0 -18
  53. package/src/database/index.ts +0 -369
  54. package/src/debug.ts +0 -34
  55. package/src/env/index.ts +0 -614
  56. package/src/environment.ts +0 -156
  57. package/src/environmentManager.ts +0 -50
  58. package/src/error.ts +0 -27
  59. package/src/function/index.ts +0 -1378
  60. package/src/function/packer.ts +0 -164
  61. package/src/function/types.ts +0 -165
  62. package/src/hosting/index.ts +0 -698
  63. package/src/index.ts +0 -127
  64. package/src/interfaces/base.interface.ts +0 -8
  65. package/src/interfaces/billing.interface.ts +0 -21
  66. package/src/interfaces/cam.interface.ts +0 -28
  67. package/src/interfaces/flexdb.interface.ts +0 -104
  68. package/src/interfaces/function.interface.ts +0 -75
  69. package/src/interfaces/index.ts +0 -7
  70. package/src/interfaces/storage.interface.ts +0 -29
  71. package/src/interfaces/tcb.interface.ts +0 -642
  72. package/src/storage/index.ts +0 -1290
  73. package/src/third/index.ts +0 -24
  74. package/src/user/index.ts +0 -174
  75. package/src/user/types.ts +0 -21
  76. package/src/utils/auth.ts +0 -112
  77. package/src/utils/cloud-api-request.ts +0 -252
  78. package/src/utils/cloudbase-request.ts +0 -109
  79. package/src/utils/envLazy.ts +0 -15
  80. package/src/utils/fs.ts +0 -57
  81. package/src/utils/http-request.ts +0 -37
  82. package/src/utils/index.ts +0 -103
  83. package/src/utils/parallel.ts +0 -82
  84. package/src/utils/uuid.ts +0 -14
  85. package/types/access/index.d.ts +0 -38
  86. package/types/access/types.d.ts +0 -42
  87. package/types/billing/index.d.ts +0 -21
  88. package/types/cam/index.d.ts +0 -63
  89. package/types/cloudBaseRun/index.d.ts +0 -12
  90. package/types/cloudBaseRun/types.d.ts +0 -21
  91. package/types/common/index.d.ts +0 -18
  92. package/types/constant.d.ts +0 -37
  93. package/types/context.d.ts +0 -17
  94. package/types/database/index.d.ts +0 -66
  95. package/types/debug.d.ts +0 -1
  96. package/types/env/index.d.ts +0 -144
  97. package/types/environment.d.ts +0 -51
  98. package/types/environmentManager.d.ts +0 -13
  99. package/types/error.d.ts +0 -18
  100. package/types/function/index.d.ts +0 -379
  101. package/types/function/packer.d.ts +0 -37
  102. package/types/function/types.d.ts +0 -156
  103. package/types/hosting/index.d.ts +0 -253
  104. package/types/index.d.ts +0 -52
  105. package/types/interfaces/base.interface.d.ts +0 -7
  106. package/types/interfaces/billing.interface.d.ts +0 -18
  107. package/types/interfaces/cam.interface.d.ts +0 -24
  108. package/types/interfaces/flexdb.interface.d.ts +0 -67
  109. package/types/interfaces/function.interface.d.ts +0 -65
  110. package/types/interfaces/index.d.ts +0 -7
  111. package/types/interfaces/storage.interface.d.ts +0 -26
  112. package/types/interfaces/tcb.interface.d.ts +0 -305
  113. package/types/storage/index.d.ts +0 -324
  114. package/types/third/index.d.ts +0 -11
  115. package/types/user/index.d.ts +0 -52
  116. package/types/user/types.d.ts +0 -20
  117. package/types/utils/auth.d.ts +0 -8
  118. package/types/utils/cloud-api-request.d.ts +0 -21
  119. package/types/utils/cloudbase-request.d.ts +0 -14
  120. package/types/utils/envLazy.d.ts +0 -1
  121. package/types/utils/fs.d.ts +0 -7
  122. package/types/utils/http-request.d.ts +0 -2
  123. package/types/utils/index.d.ts +0 -20
  124. package/types/utils/parallel.d.ts +0 -17
  125. package/types/utils/uuid.d.ts +0 -2
@@ -1,156 +0,0 @@
1
- export interface ITag {
2
- TagKey: string;
3
- TagValue: string[];
4
- }
5
- /**
6
- * VPC
7
- */
8
- export interface IVpc {
9
- VpcId: string;
10
- VpcName: string;
11
- CidrBlock: string;
12
- Ipv6CidrBlock: string;
13
- IsDefault: false;
14
- EnableMulticast: false;
15
- CreatedTime: string;
16
- EnableDhcp: boolean;
17
- DhcpOptionsId: string;
18
- DnsServerSet: string[];
19
- DomainName: string;
20
- TagSet: any[];
21
- AssistantCidrSet: any[];
22
- }
23
- /**
24
- * 子网
25
- */
26
- export interface ISubnet {
27
- VpcId: string;
28
- SubnetId: string;
29
- SubnetName: string;
30
- CidrBlock: string;
31
- Ipv6CidrBlock: string;
32
- IsDefault: boolean;
33
- IsRemoteVpcSnat: boolean;
34
- EnableBroadcast: boolean;
35
- Zone: string;
36
- RouteTableId: string;
37
- NetworkAclId: string;
38
- TotalIpAddressCount: number;
39
- AvailableIpAddressCount: number;
40
- CreatedTime: string;
41
- TagSet: any[];
42
- }
43
- /**
44
- * 函数
45
- */
46
- export interface IFunctionLog {
47
- FunctionName: string;
48
- RetMsg: string;
49
- RequestId: string;
50
- StartTime?: string;
51
- RetCode?: number;
52
- InvokeFinished?: number;
53
- Duration?: number;
54
- BillDuration?: number;
55
- MemUsage: number;
56
- Log?: string;
57
- Level?: string;
58
- Source?: string;
59
- }
60
- export interface ILogFilter {
61
- RetCode?: 'not0' | 'is0' | 'TimeLimitExceeded' | 'ResourceLimitExceeded' | 'UserCodeException';
62
- }
63
- export declare type IRegion = number;
64
- export interface IEnvVariable {
65
- Key: string;
66
- Value: string;
67
- }
68
- export interface ITrigger {
69
- Name: string;
70
- Type: string;
71
- Config: string;
72
- TriggerName: string;
73
- TriggerDesc: string;
74
- }
75
- export interface IFunctionInfo {
76
- FunctionName: string;
77
- FunctionId: string;
78
- Runtime: string;
79
- Handler: string;
80
- CodeSize: number;
81
- Timeout: number;
82
- FunctionVersion: string;
83
- MemorySize: number;
84
- UseGpu: 'TRUE' | 'FALSE';
85
- CodeInfo: string;
86
- CodeResult: string;
87
- CodeError: string;
88
- ErrNo: number;
89
- Role: string;
90
- InstallDependency: 'FALSE' | 'TRUE';
91
- AddTime: string;
92
- ModTime: string;
93
- Namespace: string;
94
- Status: string;
95
- StatusDesc: string;
96
- Description: string;
97
- Tags: ITag[];
98
- VpcConfig: {
99
- VpcId?: string;
100
- SubnetId?: string;
101
- vpc?: string;
102
- subnet?: string;
103
- };
104
- Environment: {
105
- Variables: IEnvVariable[];
106
- };
107
- Type: string;
108
- EipConfig: {
109
- EipFixed: 'FALSE' | 'TRUE';
110
- Eips: string[];
111
- };
112
- PublicNetConfig: {
113
- PublicNetStatus: 'ENABLE' | 'DISABLE';
114
- EipConfig: {
115
- EipStatus: 'ENABLE' | 'DISABLE';
116
- EipAddress: string[];
117
- };
118
- };
119
- Triggers: ITrigger[];
120
- }
121
- export interface IFunctionCode {
122
- CosBucketName?: string;
123
- CosObjectName?: string;
124
- ZipFile: string;
125
- }
126
- export interface ILayerVersionItem {
127
- LayerName: string;
128
- LayerVersion: number;
129
- }
130
- export interface IFunctionUpdateAttribute {
131
- Code: IFunctionCode;
132
- Description: string;
133
- FunctionName: string;
134
- MemorySize: number;
135
- Timeout: number;
136
- UseGpu: 'FALSE' | 'TRUE';
137
- Namespace: string;
138
- Environment: {
139
- Variables: IEnvVariable[];
140
- };
141
- VpcConfig: {
142
- VpcId: string;
143
- SubnetId: string;
144
- };
145
- InstallDependency?: 'FALSE' | 'TRUE';
146
- PublicNetConfig: {
147
- PublicNetStatus: string;
148
- EipConfig: {
149
- EipStatus: string;
150
- EipAddress: string[];
151
- };
152
- };
153
- Layers?: ILayerVersionItem[];
154
- ClsLogsetId?: string;
155
- ClsTopicId?: string;
156
- }
@@ -1,253 +0,0 @@
1
- /// <reference types="node" />
2
- import { Environment } from '../environment';
3
- import { IListFileInfo } from '../interfaces';
4
- export interface IProgressData {
5
- loaded: number;
6
- total: number;
7
- speed: number;
8
- percent: number;
9
- }
10
- export declare type OnProgress = (progressData: IProgressData) => void;
11
- export declare type OnFileFinish = (error: Error, res: any, fileData: any) => void;
12
- export interface IHostingFileOptions {
13
- localPath: string;
14
- cloudPath?: string;
15
- parallel?: number;
16
- files?: {
17
- localPath: string;
18
- cloudPath: string;
19
- }[];
20
- onProgress?: OnProgress;
21
- onFileFinish?: OnFileFinish;
22
- ignore?: string | string[];
23
- retryCount?: number;
24
- retryInterval?: number;
25
- }
26
- export interface IHostingFilesOptions {
27
- localPath?: string;
28
- cloudPath?: string;
29
- parallel?: number;
30
- files: {
31
- localPath: string;
32
- cloudPath: string;
33
- }[];
34
- onProgress?: OnProgress;
35
- onFileFinish?: OnFileFinish;
36
- ignore?: string | string[];
37
- retryCount?: number;
38
- retryInterval?: number;
39
- }
40
- export declare type IHostingOptions = IHostingFileOptions | IHostingFilesOptions;
41
- export interface IHostingCloudOptions {
42
- cloudPath: string;
43
- isDir: boolean;
44
- }
45
- export interface IBindDomainOptions {
46
- domain: string;
47
- certId: string;
48
- }
49
- export interface ICheckSourceOptions {
50
- domains: string[];
51
- }
52
- export interface ITcbOrigin {
53
- Master: string;
54
- Slave: string;
55
- }
56
- export interface IIpFilter {
57
- Switch: string;
58
- FilterType?: string;
59
- Filters?: string[];
60
- }
61
- export interface IIpFreqLimit {
62
- Switch: string;
63
- Qps?: number;
64
- }
65
- export interface ITcbAuthentication {
66
- Switch: string;
67
- SecretKey: string;
68
- SignParam?: string;
69
- TimeParam?: string;
70
- ExpireTime?: string;
71
- }
72
- export interface ITcbCache {
73
- RuleType: string;
74
- RuleValue: string;
75
- CacheTtl: number;
76
- }
77
- export interface ITcbRefererRule {
78
- RefererType: string;
79
- Referers: string[];
80
- AllowEmpty: boolean;
81
- }
82
- export interface ITcbReferer {
83
- Switch: string;
84
- RefererRules?: ITcbRefererRule[];
85
- }
86
- export interface ITcbDomainConfig {
87
- Cache?: ITcbCache[];
88
- IpFilter?: IIpFilter;
89
- IpFreqLimit?: IIpFreqLimit;
90
- Refer?: ITcbReferer;
91
- }
92
- export interface IModifyOptions {
93
- domain: string;
94
- domainId: number;
95
- domainConfig: ITcbDomainConfig;
96
- }
97
- export interface IDeleteDomainOptions {
98
- domain: string;
99
- }
100
- export interface IDomainInfo {
101
- Domain: string;
102
- DomainId: number;
103
- Status: 'process' | 'online' | 'offline';
104
- DomainConfig: Record<string, string>;
105
- CName: String;
106
- }
107
- export interface IHostingInfo {
108
- EnvId: string;
109
- CdnDomain: string;
110
- Bucket: string;
111
- Regoin: string;
112
- Status: string;
113
- MaxDomain: number;
114
- Id: number;
115
- PolicyId: number;
116
- }
117
- export interface IRoutingRules {
118
- keyPrefixEquals?: string;
119
- httpErrorCodeReturnedEquals?: string;
120
- replaceKeyWith?: string;
121
- replaceKeyPrefixWith?: string;
122
- }
123
- export interface IBucketWebsiteOptiosn {
124
- indexDocument: string;
125
- errorDocument?: string;
126
- routingRules?: Array<IRoutingRules>;
127
- }
128
- export interface IFindOptions {
129
- prefix?: string;
130
- marker?: string;
131
- maxKeys?: number;
132
- }
133
- export declare class HostingService {
134
- private environment;
135
- private tcbService;
136
- private cdnService;
137
- constructor(environment: Environment);
138
- /**
139
- * 获取 hosting 信息
140
- */
141
- getInfo(): Promise<IHostingInfo[]>;
142
- /**
143
- * 开启 hosting 服务,异步任务
144
- */
145
- enableService(): Promise<{
146
- code: number;
147
- requestId: string;
148
- }>;
149
- findFiles(options: IFindOptions): Promise<any>;
150
- /**
151
- * 展示文件列表
152
- */
153
- listFiles(): Promise<IListFileInfo[]>;
154
- /**
155
- * 销毁静态托管服务
156
- */
157
- destroyService(): Promise<{
158
- code: number;
159
- requestId: string;
160
- }>;
161
- /**
162
- * 支持上传单个文件,文件夹,或多个文件
163
- * @param options
164
- */
165
- uploadFiles(options: IHostingOptions): Promise<any>;
166
- /**
167
- * 删除文件或文件夹
168
- * @param options
169
- */
170
- deleteFiles(options: IHostingCloudOptions): Promise<{
171
- Deleted: {
172
- Key: string;
173
- }[];
174
- Error: Object[];
175
- } | {
176
- Deleted: any[];
177
- Error: any[];
178
- }>;
179
- /**
180
- * 下载文件
181
- * @param {string} cloudPath 云端文件路径
182
- * @param {string} localPath 文件本地存储路径,文件需指定文件名称
183
- * @returns {Promise<NodeJS.ReadableStream>}
184
- */
185
- downloadFile(options: {
186
- cloudPath: string;
187
- localPath?: string;
188
- }): Promise<NodeJS.ReadableStream | string>;
189
- /**
190
- * 下载文件夹
191
- * @param {string} cloudPath 云端文件路径
192
- * @param {string} localPath 本地文件夹存储路径
193
- * @returns {Promise<(NodeJS.ReadableStream | string)[]>}
194
- */
195
- downloadDirectory(options: {
196
- cloudPath: string;
197
- localPath?: string;
198
- }): Promise<void>;
199
- walkLocalDir(envId: string, dir: string): Promise<string[]>;
200
- /**
201
- * 绑定自定义域名
202
- * @param {IBindDomainOptions} options
203
- * @returns
204
- * @memberof HostingService
205
- */
206
- CreateHostingDomain(options: IBindDomainOptions): Promise<{}>;
207
- /**
208
- * 删除托管域名
209
- *
210
- * @param {IBindDomainOptions} options
211
- * @returns
212
- * @memberof HostingService
213
- */
214
- deleteHostingDomain(options: IDeleteDomainOptions): Promise<{
215
- RequestId: string;
216
- }>;
217
- /**
218
- * 查询域名状态信息
219
- * @param options
220
- */
221
- tcbCheckResource(options: ICheckSourceOptions): Promise<{
222
- Domains: IDomainInfo[];
223
- RecordCount: number;
224
- RequestId: string;
225
- }>;
226
- /**
227
- * 域名配置变更
228
- * @param options
229
- */
230
- tcbModifyAttribute(options: IModifyOptions): Promise<{}>;
231
- /**
232
- * 查询静态网站配置
233
- * @memberof HostingService
234
- */
235
- getWebsiteConfig(): Promise<any>;
236
- /**
237
- * 配置静态网站文档
238
- * @param options
239
- */
240
- setWebsiteDocument(options: IBucketWebsiteOptiosn): Promise<any>;
241
- /**
242
- * 检查 hosting 服务状态
243
- */
244
- private checkStatus;
245
- /**
246
- * 获取配置
247
- */
248
- private getHostingConfig;
249
- /**
250
- * 将 cloudPath 转换成 cloudPath/ 形式
251
- */
252
- private getCloudKey;
253
- }
package/types/index.d.ts DELETED
@@ -1,52 +0,0 @@
1
- import { EnvService } from './env';
2
- import { FunctionService } from './function';
3
- import { StorageService } from './storage';
4
- import { DatabaseService } from './database';
5
- import { CommonService } from './common';
6
- import { HostingService } from './hosting';
7
- import { Environment } from './environment';
8
- import { EnvironmentManager } from './environmentManager';
9
- import { ThirdService } from './third';
10
- import { AccessService } from './access';
11
- import { UserService } from './user';
12
- import { CloudBaseRunService } from './cloudBaseRun';
13
- interface CloudBaseConfig {
14
- secretId?: string;
15
- secretKey?: string;
16
- token?: string;
17
- envId?: string;
18
- proxy?: string;
19
- region?: string;
20
- envType?: string;
21
- }
22
- declare class CloudBase {
23
- private static cloudBase;
24
- /**
25
- * init 初始化 为单例
26
- *
27
- * @static
28
- * @param {ManagerConfig} config
29
- * @returns {CloudBase}
30
- * @memberof CloudBase
31
- */
32
- static init(config: CloudBaseConfig): CloudBase;
33
- private context;
34
- private cloudBaseConfig;
35
- private environmentManager;
36
- constructor(config?: CloudBaseConfig);
37
- addEnvironment(envId: string): void;
38
- currentEnvironment(): Environment;
39
- get functions(): FunctionService;
40
- get storage(): StorageService;
41
- get database(): DatabaseService;
42
- get hosting(): HostingService;
43
- get access(): AccessService;
44
- get cloudApp(): CloudBaseRunService;
45
- commonService(service?: string, version?: string): CommonService;
46
- get env(): EnvService;
47
- get third(): ThirdService;
48
- get user(): UserService;
49
- getEnvironmentManager(): EnvironmentManager;
50
- getManagerConfig(): CloudBaseConfig;
51
- }
52
- export = CloudBase;
@@ -1,7 +0,0 @@
1
- export interface IResponseInfo {
2
- RequestId: string;
3
- }
4
- export interface IServiceVersion {
5
- service: string;
6
- version: string;
7
- }
@@ -1,18 +0,0 @@
1
- import { IResponseInfo } from './base.interface';
2
- export interface IGoodItem {
3
- GoodsCategoryId: number;
4
- RegionId: number;
5
- ZoneId: number;
6
- GoodsNum: number;
7
- ProjectId: number;
8
- PayMode: number;
9
- Platform: number;
10
- GoodsDetail: string;
11
- }
12
- export interface IGenerateDealsRes extends IResponseInfo {
13
- OrderIds: Array<string>;
14
- }
15
- export interface IPayDealsRes extends IResponseInfo {
16
- OrderIds: Array<string>;
17
- ResourceIds: Array<string>;
18
- }
@@ -1,24 +0,0 @@
1
- import { IResponseInfo } from './base.interface';
2
- interface IRoleInfo {
3
- RoleId: string;
4
- RoleName: string;
5
- PolicyDocument: string;
6
- Description: string;
7
- AddTime: string;
8
- UpdateTime: string;
9
- ConsoleLogin: number;
10
- }
11
- export interface IRoleListRes extends IResponseInfo {
12
- List: Array<IRoleInfo>;
13
- TotalNum: number;
14
- }
15
- export interface ICreateRoleRes extends IResponseInfo {
16
- RoleId: string;
17
- }
18
- export interface ICheckTcbServiceRes extends IResponseInfo {
19
- Initialized: boolean;
20
- }
21
- export interface IGetRoleRes extends IResponseInfo {
22
- RoleInfo: IRoleInfo;
23
- }
24
- export {};
@@ -1,67 +0,0 @@
1
- export interface IExistsRes {
2
- RequestId: string;
3
- Msg?: string;
4
- Exists: boolean;
5
- }
6
- export interface IDatabaseTableReq {
7
- Tag: string;
8
- TableName: string;
9
- }
10
- export interface IndexInfo {
11
- Name: string;
12
- Size: number;
13
- Keys: Indexkey[];
14
- Accesses: IndexAccesses;
15
- Unique: boolean;
16
- }
17
- export interface IndexAccesses {
18
- Ops: number;
19
- Since: string;
20
- }
21
- export interface Indexkey {
22
- Name?: string;
23
- Direction?: string;
24
- }
25
- export interface DropIndex {
26
- IndexName: string;
27
- }
28
- export interface CreateIndex {
29
- IndexName: string;
30
- MgoKeySchema: MgoKeySchema;
31
- }
32
- export interface MgoKeySchema {
33
- MgoIndexKeys: MgoIndexKeys[];
34
- MgoIsUnique: boolean;
35
- }
36
- export interface Pager {
37
- Offset: number;
38
- Limit: number;
39
- Total: number;
40
- }
41
- export interface MgoIndexKeys {
42
- Name: string;
43
- Direction: string;
44
- }
45
- export interface TableInfo {
46
- TableName: string;
47
- CollectionName: string;
48
- Count: number;
49
- Size: number;
50
- IndexCount: number;
51
- IndexSize: number;
52
- }
53
- export interface GoodsDetail {
54
- QuataId: string;
55
- DiskSize?: number;
56
- ConnNum?: number;
57
- ReadOperands?: number;
58
- WriteOperands?: number;
59
- CollectionLimits?: number;
60
- SingleCollectionIndexLimits?: number;
61
- }
62
- export interface ResourceAmount {
63
- UsedDiskSize?: number;
64
- ReadOperands?: number;
65
- WriteOperands?: number;
66
- TableNum?: number;
67
- }
@@ -1,65 +0,0 @@
1
- export interface IFunctionVPC {
2
- subnetId: string;
3
- vpcId: string;
4
- }
5
- export interface ICloudFunctionTrigger {
6
- name: string;
7
- type: string;
8
- config: string;
9
- }
10
- export interface ICloudFunctionConfig {
11
- timeout?: number;
12
- envVariables?: Record<string, string | number | boolean>;
13
- runtime?: string;
14
- vpc?: IFunctionVPC;
15
- installDependency?: boolean;
16
- l5?: boolean;
17
- memorySize?: number;
18
- role?: string;
19
- }
20
- export interface LayerVersionSimple {
21
- LayerName: string;
22
- LayerVersion: number;
23
- }
24
- export interface ICloudFunction extends ICloudFunctionConfig {
25
- name: string;
26
- handler?: string;
27
- codeSecret?: string;
28
- isWaitInstall?: boolean;
29
- ignore?: string | string[];
30
- layers?: {
31
- name: string;
32
- version: number;
33
- }[];
34
- triggers?: ICloudFunctionTrigger[];
35
- }
36
- export interface IFunctionLogOptions {
37
- name: string;
38
- offset?: number;
39
- limit?: number;
40
- order?: string;
41
- orderBy?: string;
42
- startTime?: string;
43
- endTime?: string;
44
- requestId?: string;
45
- }
46
- export interface IFunctionInvokeRes {
47
- RequestId: string;
48
- Log: string;
49
- RetMsg: string;
50
- ErrMsg: string;
51
- MemUsage: number;
52
- Duration: number;
53
- BillDuration: number;
54
- FunctionRequestId: string;
55
- }
56
- export interface IFunctionLogRes {
57
- RequestId: string;
58
- Data: [];
59
- TotalCount: number;
60
- }
61
- export interface IFunctionDownloadUrlRes {
62
- Url: string;
63
- RequestId: string;
64
- CodeSha256: string;
65
- }
@@ -1,7 +0,0 @@
1
- export * from './function.interface';
2
- export * from './flexdb.interface';
3
- export * from './tcb.interface';
4
- export * from './base.interface';
5
- export * from './storage.interface';
6
- export * from './cam.interface';
7
- export * from './billing.interface';
@@ -1,26 +0,0 @@
1
- export interface IUploadMetadata {
2
- token: string;
3
- url: string;
4
- authorization: string;
5
- fileId: string;
6
- cosFileId: string;
7
- download_url: string;
8
- }
9
- export interface IListFileInfo {
10
- Key: string;
11
- LastModified: string;
12
- ETag: string;
13
- Size: string;
14
- Owner: string;
15
- StorageClass: string;
16
- }
17
- export interface IFileInfo {
18
- Size: string;
19
- Type: string;
20
- Date: string;
21
- ETag: string;
22
- }
23
- export interface ITempUrlInfo {
24
- cloudPath: string;
25
- maxAge?: number;
26
- }