File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
- import { Member , OperationModel } from "./protocol" ;
1
+ import { OperationModel } from "./protocol" ;
2
2
import { HttpRequest } from "./http" ;
3
3
4
4
export interface BodySerializer < SerializedType = string > {
5
5
/**
6
6
* Converts the provided `input` into the serialized format described in the
7
7
* provided `shape`.
8
8
*
9
- * @param shape The serialization model shape to which the input should be
9
+ * @param operation The operation model to which the input should be
10
10
* converted
11
11
* @param input The value to convert
12
12
*
13
13
* @throws if a node in the input cannot be converted into the type
14
14
* specified by the serialization model
15
15
*/
16
- build ( shape : Member , input : any ) : SerializedType ;
16
+ build ( operation : OperationModel , input : any ) : SerializedType ;
17
17
}
18
18
19
19
export interface RequestSerializer < StreamType = Uint8Array > {
Original file line number Diff line number Diff line change 1
- export type SerializationType = 'blob' | 'boolean' | 'list ' | 'map ' | 'number ' | 'string' | 'structure' | 'timestamp' ;
1
+ export type SerializationType = 'blob' | 'boolean' | 'float ' | 'integer ' | 'list' | 'map '| 'string' | 'structure' | 'timestamp' ;
2
2
3
3
export type MemberLocation = 'header' | 'headers' | 'uri' | 'querystring' | 'statusCode' ;
4
4
@@ -32,6 +32,16 @@ export interface Boolean extends Shape {
32
32
type : 'boolean' ;
33
33
}
34
34
35
+ export interface Float extends Shape {
36
+ type : 'float' ;
37
+ min ?: number ;
38
+ }
39
+
40
+ export interface Integer extends Shape {
41
+ type : 'integer' ;
42
+ min ?: number ;
43
+ }
44
+
35
45
export interface List extends Shape {
36
46
type : 'list' ;
37
47
member : Member ;
@@ -47,7 +57,6 @@ export interface Map extends Shape {
47
57
}
48
58
49
59
export interface Number extends Shape {
50
- type : 'number' ;
51
60
min ?: number ;
52
61
}
53
62
@@ -72,7 +81,7 @@ export interface Timestamp extends Shape {
72
81
timestampFormat ?: string ;
73
82
}
74
83
75
- export type SerializationModel = Blob | Boolean | List | Map | Number | String | Structure | Timestamp ;
84
+ export type SerializationModel = Blob | Boolean | Float | Integer | List | Map | String | Structure | Timestamp ;
76
85
77
86
export interface HttpTrait {
78
87
method : string ;
You can’t perform that action at this time.
0 commit comments