File tree Expand file tree Collapse file tree 6 files changed +32
-30
lines changed Expand file tree Collapse file tree 6 files changed +32
-30
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ import {
22
22
ApigwRemoveInputs ,
23
23
ApigwBindCustomDomainInputs ,
24
24
ApigwBindUsagePlanOutputs ,
25
- CustomDomain ,
26
25
} from './interface' ;
27
26
28
27
export default class Apigw {
@@ -355,7 +354,7 @@ export default class Apigw {
355
354
* 解绑 API 网关所有自定义域名
356
355
* @param serviceId API 网关 ID
357
356
*/
358
- async unbindCustomDomain ( serviceId : string , customDomains : CustomDomain [ ] ) {
357
+ async unbindCustomDomain ( serviceId : string , customDomains : { subDomain ?: string } [ ] ) {
359
358
const customDomainDetail = ( await this . request ( {
360
359
Action : 'DescribeServiceSubDomains' ,
361
360
serviceId,
@@ -407,7 +406,7 @@ export default class Apigw {
407
406
this . unbindCustomDomain ( serviceId , oldState ?. customDomains ?? [ ] ) ;
408
407
409
408
// 2. bind user config domain
410
- const customDomainOutput = [ ] ;
409
+ const customDomainOutput : ApigwBindCustomDomainOutputs [ ] = [ ] ;
411
410
if ( customDomains && customDomains . length > 0 ) {
412
411
console . log ( `Start bind custom domain for service ${ serviceId } ` ) ;
413
412
for ( let i = 0 ; i < customDomains . length ; i ++ ) {
Original file line number Diff line number Diff line change @@ -65,21 +65,21 @@ export interface ApiEndpoint {
65
65
base64EncodedTriggerRules ?: string [ ] ;
66
66
}
67
67
68
- export interface CustomDomain {
69
- domain : string ;
70
- subDomain : string ;
71
- protocols : ( 'http' | 'https' ) [ ] ;
68
+ export interface ApigwBindCustomDomainInputs {
69
+ customDomains ?: {
70
+ domain : string ;
71
+ protocols : ( 'http' | 'https' ) [ ] ;
72
72
73
- certificateId : string ;
74
- isDefaultMapping ?: boolean ;
75
- pathMappingSet : [ ] ;
76
- netType : string ;
73
+ certificateId : string ;
74
+ isDefaultMapping ?: boolean ;
75
+ pathMappingSet : [ ] ;
76
+ netType : string ;
77
77
78
- isForcedHttps : boolean ;
79
- }
78
+ isForcedHttps : boolean ;
80
79
81
- export interface ApigwBindCustomDomainInputs {
82
- customDomains ?: CustomDomain [ ] ;
80
+ subDomain ?: string ;
81
+ created ?: boolean ;
82
+ } [ ] ;
83
83
protocols : ( 'http' | 'https' ) [ ] | string ;
84
84
oldState ?: Partial < ApigwBindCustomDomainInputs > ;
85
85
}
@@ -127,7 +127,7 @@ export interface ApigwDeployInputs
127
127
export interface ApigwBindCustomDomainOutputs {
128
128
isBinded : boolean ;
129
129
created ?: boolean ;
130
- subDomain : any ;
130
+ subDomain : string ;
131
131
cname : string ;
132
132
url ?: string ;
133
133
message ?: string ;
@@ -168,11 +168,6 @@ export interface ApigwRemoveInputs {
168
168
environment : EnviromentType ;
169
169
serviceId : string ;
170
170
apiList : ApiEndpoint [ ] ;
171
- customDomains : CustomDomain [ ] ;
172
- usagePlan : ApigwSetupUsagePlanInputs ;
173
- }
174
-
175
- export interface CustomDomain {
176
- subDomain : string ;
177
- created : boolean ;
171
+ customDomains ?: ApigwBindCustomDomainOutputs [ ] ;
172
+ usagePlan ?: ApigwSetupUsagePlanInputs ;
178
173
}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export interface CnsRecordInputs {
5
5
recordLine : string ;
6
6
recordType : 'CNAME' | 'A' | 'AAAA' | 'TXT' | string ;
7
7
recordId : string ;
8
- mx ?: string ;
8
+ mx ?: number ;
9
9
ttl ?: number ;
10
10
status ?: string ;
11
11
}
@@ -15,7 +15,7 @@ export interface CnsRecordOutputs {
15
15
name : string ;
16
16
type : string ;
17
17
id : string ;
18
- mx ?: string ;
18
+ mx ?: number ;
19
19
ttl ?: number ;
20
20
line : string ;
21
21
Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ export default class Cos {
296
296
Filter : { } ,
297
297
} ;
298
298
299
- if ( lc . filter ?. prefix ) {
299
+ if ( typeof lc . filter !== 'string' && lc . filter ?. prefix ) {
300
300
tempLifecycle . Filter = {
301
301
Prefix : lc . filter ?. prefix ,
302
302
} ;
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export interface CosSetLifecycleInputs {
76
76
id : string ;
77
77
status : 'Enabled' | 'Disabled' ;
78
78
filter ?: {
79
- prefix : string ;
79
+ prefix ? : string ;
80
80
} ;
81
81
transition ?: {
82
82
days : number | string ;
@@ -88,11 +88,11 @@ export interface CosSetLifecycleInputs {
88
88
storageClass : number | string ;
89
89
} ;
90
90
expiration ?: {
91
- days : number ;
91
+ days : number | string ;
92
92
expiredObjectDeleteMarker : string ;
93
93
} ;
94
94
abortIncompleteMultipartUpload ?: {
95
- daysAfterInitiation : number ;
95
+ daysAfterInitiation : number | string ;
96
96
} ;
97
97
} [ ] ;
98
98
}
Original file line number Diff line number Diff line change @@ -158,7 +158,15 @@ export interface ScfDeployInputs extends ScfCreateFunctionInputs {
158
158
events ?: TriggerType [ ] ;
159
159
}
160
160
161
- export interface ScfDeployOutputs { }
161
+ export interface ScfDeployOutputs {
162
+ FunctionName : string ;
163
+ Runtime : string ;
164
+ Namespace : string ;
165
+ LastVersion ?: string ;
166
+ Traffic ?: number ;
167
+
168
+ ConfigTrafficVersion : string ;
169
+ }
162
170
163
171
export interface ScfRemoveInputs {
164
172
functionName ?: string ;
You can’t perform that action at this time.
0 commit comments