@azure-tools/typespec-go 0.5.1 → 0.7.0
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.
- package/dist/codegen.go/src/constants.d.ts.map +1 -1
- package/dist/codegen.go/src/constants.js +0 -12
- package/dist/codegen.go/src/constants.js.map +1 -1
- package/dist/codegen.go/src/example.js +76 -76
- package/dist/codegen.go/src/example.js.map +1 -1
- package/dist/codegen.go/src/fake/factory.d.ts.map +1 -1
- package/dist/codegen.go/src/fake/factory.js +29 -24
- package/dist/codegen.go/src/fake/factory.js.map +1 -1
- package/dist/codegen.go/src/fake/internal.js +1 -1
- package/dist/codegen.go/src/fake/internal.js.map +1 -1
- package/dist/codegen.go/src/fake/servers.js +107 -99
- package/dist/codegen.go/src/fake/servers.js.map +1 -1
- package/dist/codegen.go/src/helpers.d.ts +66 -5
- package/dist/codegen.go/src/helpers.d.ts.map +1 -1
- package/dist/codegen.go/src/helpers.js +221 -135
- package/dist/codegen.go/src/helpers.js.map +1 -1
- package/dist/codegen.go/src/imports.d.ts +1 -1
- package/dist/codegen.go/src/imports.d.ts.map +1 -1
- package/dist/codegen.go/src/imports.js +13 -12
- package/dist/codegen.go/src/imports.js.map +1 -1
- package/dist/codegen.go/src/interfaces.js +2 -2
- package/dist/codegen.go/src/interfaces.js.map +1 -1
- package/dist/codegen.go/src/models.d.ts.map +1 -1
- package/dist/codegen.go/src/models.js +81 -81
- package/dist/codegen.go/src/models.js.map +1 -1
- package/dist/codegen.go/src/operations.d.ts.map +1 -1
- package/dist/codegen.go/src/operations.js +112 -114
- package/dist/codegen.go/src/operations.js.map +1 -1
- package/dist/codegen.go/src/options.js +2 -2
- package/dist/codegen.go/src/options.js.map +1 -1
- package/dist/codegen.go/src/polymorphics.d.ts.map +1 -1
- package/dist/codegen.go/src/polymorphics.js +30 -25
- package/dist/codegen.go/src/polymorphics.js.map +1 -1
- package/dist/codegen.go/src/responses.js +2 -2
- package/dist/codegen.go/src/responses.js.map +1 -1
- package/dist/codegen.go/src/time.js +14 -15
- package/dist/codegen.go/src/time.js.map +1 -1
- package/dist/codegen.go/src/version.d.ts +3 -0
- package/dist/codegen.go/src/version.d.ts.map +1 -0
- package/dist/codegen.go/src/version.js +25 -0
- package/dist/codegen.go/src/version.js.map +1 -0
- package/dist/codegen.go/src/xmlAdditionalProps.js +1 -2
- package/dist/codegen.go/src/xmlAdditionalProps.js.map +1 -1
- package/dist/codemodel.go/src/examples.d.ts +20 -20
- package/dist/codemodel.go/src/examples.d.ts.map +1 -1
- package/dist/codemodel.go/src/examples.js +2 -2
- package/dist/codemodel.go/src/examples.js.map +1 -1
- package/dist/codemodel.go/src/package.d.ts +4 -4
- package/dist/codemodel.go/src/package.d.ts.map +1 -1
- package/dist/codemodel.go/src/package.js +3 -3
- package/dist/codemodel.go/src/package.js.map +1 -1
- package/dist/codemodel.go/src/param.d.ts +32 -24
- package/dist/codemodel.go/src/param.d.ts.map +1 -1
- package/dist/codemodel.go/src/param.js +54 -1
- package/dist/codemodel.go/src/param.js.map +1 -1
- package/dist/codemodel.go/src/result.d.ts +12 -10
- package/dist/codemodel.go/src/result.d.ts.map +1 -1
- package/dist/codemodel.go/src/result.js +21 -4
- package/dist/codemodel.go/src/result.js.map +1 -1
- package/dist/codemodel.go/src/type.d.ts +219 -86
- package/dist/codemodel.go/src/type.d.ts.map +1 -1
- package/dist/codemodel.go/src/type.js +137 -127
- package/dist/codemodel.go/src/type.js.map +1 -1
- package/dist/typespec-go/src/emitter.d.ts.map +1 -1
- package/dist/typespec-go/src/emitter.js +86 -0
- package/dist/typespec-go/src/emitter.js.map +1 -1
- package/dist/typespec-go/src/lib.d.ts +1 -0
- package/dist/typespec-go/src/lib.d.ts.map +1 -1
- package/dist/typespec-go/src/lib.js +6 -1
- package/dist/typespec-go/src/lib.js.map +1 -1
- package/dist/typespec-go/src/tcgcadapter/adapter.d.ts.map +1 -1
- package/dist/typespec-go/src/tcgcadapter/adapter.js +8 -5
- package/dist/typespec-go/src/tcgcadapter/adapter.js.map +1 -1
- package/dist/typespec-go/src/tcgcadapter/clients.d.ts.map +1 -1
- package/dist/typespec-go/src/tcgcadapter/clients.js +80 -61
- package/dist/typespec-go/src/tcgcadapter/clients.js.map +1 -1
- package/dist/typespec-go/src/tcgcadapter/types.d.ts +3 -3
- package/dist/typespec-go/src/tcgcadapter/types.d.ts.map +1 -1
- package/dist/typespec-go/src/tcgcadapter/types.js +47 -46
- package/dist/typespec-go/src/tcgcadapter/types.js.map +1 -1
- package/package.json +21 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"param.js","sourceRoot":"","sources":["../../../../codemodel.go/src/param.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAmQlC,wEAAwE;AACxE,MAAM,UAAU,mBAAmB,CAAC,KAAqB;IACvD,OAA2B,KAAM,CAAC,YAAY,KAAK,SAAS,CAAC;AAC/D,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,mBAAmB,CAAC,KAAsB;IACxD,OAAO,KAAK,CAAC,IAAI,KAAK,yBAAyB,IAAI,KAAK,CAAC,IAAI,KAAK,qBAAqB,CAAC;AAC1F,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,iBAAiB,CAAC,KAAsB;IACtD,OAAO,KAAK,CAAC,IAAI,KAAK,uBAAuB,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB,IAAI,KAAK,CAAC,IAAI,KAAK,mBAAmB,CAAC;AACzH,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,eAAe,CAAC,KAAsB;IACpD,OAAO,KAAK,CAAC,IAAI,KAAK,qBAAqB,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,CAAC;AAClF,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,gBAAgB,CAAC,KAAsB;IACrD,OAAO,KAAK,CAAC,IAAI,KAAK,sBAAsB,IAAI,KAAK,CAAC,IA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kBAAkB,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,6DAA6D,CAAC;IACpF,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,aAAa;IAC7C,YAAY,IAAY,EAAE,cAAsB,EAAE,IAAsB,EAAE,KAAqB,EAAE,OAAgB,EAAE,QAA2B;QAC5I,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -14,7 +14,7 @@ export interface AnyResult {
|
|
|
14
14
|
* maps an HTTP status code to a result type.
|
|
15
15
|
* status codes that don't return a schema will be absent.
|
|
16
16
|
*/
|
|
17
|
-
httpStatusCodeType: Record<number, type.
|
|
17
|
+
httpStatusCodeType: Record<number, type.WireType>;
|
|
18
18
|
/** the format in which the result is returned */
|
|
19
19
|
format: ResultFormat;
|
|
20
20
|
}
|
|
@@ -45,7 +45,7 @@ export interface HeaderMapResponse {
|
|
|
45
45
|
/** any docs for the header */
|
|
46
46
|
docs: type.Docs;
|
|
47
47
|
/** the type of the response header */
|
|
48
|
-
type: type.
|
|
48
|
+
type: type.Map;
|
|
49
49
|
/** the header prefix for each header name in type */
|
|
50
50
|
headerName: string;
|
|
51
51
|
}
|
|
@@ -72,7 +72,7 @@ export interface ModelResult {
|
|
|
72
72
|
/** any docs for the result type */
|
|
73
73
|
docs: type.Docs;
|
|
74
74
|
/** the type returned in the response envelope */
|
|
75
|
-
modelType: type.
|
|
75
|
+
modelType: type.Model;
|
|
76
76
|
/** the format in which the result is returned */
|
|
77
77
|
format: ModelResultFormat;
|
|
78
78
|
}
|
|
@@ -98,7 +98,7 @@ export interface MonomorphicResult {
|
|
|
98
98
|
xml?: type.XMLInfo;
|
|
99
99
|
}
|
|
100
100
|
/** the possible monomorphic result types */
|
|
101
|
-
export type MonomorphicResultType = type.
|
|
101
|
+
export type MonomorphicResultType = type.Any | type.Constant | type.EncodedBytes | type.Map | type.RawJSON | type.Scalar | type.Slice | type.String | type.Time;
|
|
102
102
|
/**
|
|
103
103
|
* used for methods that return a discriminated type.
|
|
104
104
|
* the type is anonymously embedded in the response envelope.
|
|
@@ -108,7 +108,7 @@ export interface PolymorphicResult {
|
|
|
108
108
|
/** any docs for the result type */
|
|
109
109
|
docs: type.Docs;
|
|
110
110
|
/** the interface type used for the discriminated union of possible types */
|
|
111
|
-
|
|
111
|
+
interface: type.Interface;
|
|
112
112
|
/**
|
|
113
113
|
* the format in which the result is returned.
|
|
114
114
|
* only JSON is supported for polymorphic types.
|
|
@@ -137,9 +137,11 @@ export interface ResponseEnvelope {
|
|
|
137
137
|
/** indicates the wire format for response bodies */
|
|
138
138
|
export type ResultFormat = 'JSON' | 'XML' | 'Text';
|
|
139
139
|
/** returns the underlying type used for the specified result type */
|
|
140
|
-
export declare function getResultType(result: Result): type.
|
|
140
|
+
export declare function getResultType(result: Result): type.Interface | type.Model | MonomorphicResultType | type.Scalar | type.QualifiedType;
|
|
141
|
+
/** narrows type to a MonomorphicResultType within the conditional block */
|
|
142
|
+
export declare function isMonomorphicResultType(type: type.WireType): type is MonomorphicResultType;
|
|
141
143
|
export declare class AnyResult implements AnyResult {
|
|
142
|
-
constructor(fieldName: string, format: ResultFormat, resultTypes: Record<number, type.
|
|
144
|
+
constructor(fieldName: string, format: ResultFormat, resultTypes: Record<number, type.WireType>);
|
|
143
145
|
}
|
|
144
146
|
export declare class BinaryResult implements BinaryResult {
|
|
145
147
|
constructor(fieldName: string);
|
|
@@ -148,19 +150,19 @@ export declare class HeadAsBooleanResult implements HeadAsBooleanResult {
|
|
|
148
150
|
constructor(fieldName: string);
|
|
149
151
|
}
|
|
150
152
|
export declare class HeaderMapResponse implements HeaderMapResponse {
|
|
151
|
-
constructor(fieldName: string, type: type.
|
|
153
|
+
constructor(fieldName: string, type: type.Map, headerName: string);
|
|
152
154
|
}
|
|
153
155
|
export declare class HeaderScalarResponse implements HeaderScalarResponse {
|
|
154
156
|
constructor(fieldName: string, type: param.HeaderScalarType, headerName: string, byValue: boolean);
|
|
155
157
|
}
|
|
156
158
|
export declare class ModelResult implements ModelResult {
|
|
157
|
-
constructor(type: type.
|
|
159
|
+
constructor(type: type.Model, format: ModelResultFormat);
|
|
158
160
|
}
|
|
159
161
|
export declare class MonomorphicResult implements MonomorphicResult {
|
|
160
162
|
constructor(fieldName: string, format: ResultFormat, type: MonomorphicResultType, byValue: boolean);
|
|
161
163
|
}
|
|
162
164
|
export declare class PolymorphicResult implements PolymorphicResult {
|
|
163
|
-
constructor(type: type.
|
|
165
|
+
constructor(type: type.Interface);
|
|
164
166
|
}
|
|
165
167
|
export declare class ResponseEnvelope implements ResponseEnvelope {
|
|
166
168
|
constructor(name: string, docs: type.Docs, forMethod: client.MethodType);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../../codemodel.go/src/result.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,0EAA0E;AAC1E,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,mBAAmB,GAAG,WAAW,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAE1H,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,WAAW,CAAC;IAElB,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAElB,8BAA8B;IAC9B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAEhB;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../../codemodel.go/src/result.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YAAW,mBAAmB;gBACjD,SAAS,EAAE,MAAM;CAK9B;AAED,qBAAa,iBAAkB,YAAW,iBAAiB;gBAC7C,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM;CAOlE;AAED,qBAAa,oBAAqB,YAAW,oBAAoB;gBACnD,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;CAQlG;AAED,qBAAa,WAAY,YAAW,WAAW;gBACjC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,iBAAiB;CAMxD;AAED,qBAAa,iBAAkB,YAAW,iBAAiB;gBAC7C,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,OAAO;CAQnG;AAED,qBAAa,iBAAkB,YAAW,iBAAiB;gBAC7C,IAAI,EAAE,IAAI,CAAC,SAAS;CAMjC;AAED,qBAAa,gBAAiB,YAAW,gBAAgB;gBAC3C,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,UAAU;CAMxE"}
|
|
@@ -7,17 +7,34 @@ import * as type from './type.js';
|
|
|
7
7
|
export function getResultType(result) {
|
|
8
8
|
switch (result.kind) {
|
|
9
9
|
case 'anyResult':
|
|
10
|
-
return new type.
|
|
10
|
+
return new type.Any();
|
|
11
11
|
case 'binaryResult':
|
|
12
12
|
return new type.QualifiedType('ReadCloser', 'io');
|
|
13
13
|
case 'headAsBooleanResult':
|
|
14
|
-
return new type.
|
|
14
|
+
return new type.Scalar('bool', false);
|
|
15
15
|
case 'modelResult':
|
|
16
16
|
return result.modelType;
|
|
17
17
|
case 'monomorphicResult':
|
|
18
18
|
return result.monomorphicType;
|
|
19
19
|
case 'polymorphicResult':
|
|
20
|
-
return result.
|
|
20
|
+
return result.interface;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** narrows type to a MonomorphicResultType within the conditional block */
|
|
24
|
+
export function isMonomorphicResultType(type) {
|
|
25
|
+
switch (type.kind) {
|
|
26
|
+
case 'any':
|
|
27
|
+
case 'constant':
|
|
28
|
+
case 'encodedBytes':
|
|
29
|
+
case 'map':
|
|
30
|
+
case 'rawJSON':
|
|
31
|
+
case 'scalar':
|
|
32
|
+
case 'slice':
|
|
33
|
+
case 'string':
|
|
34
|
+
case 'time':
|
|
35
|
+
return true;
|
|
36
|
+
default:
|
|
37
|
+
return false;
|
|
21
38
|
}
|
|
22
39
|
}
|
|
23
40
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -85,7 +102,7 @@ export class MonomorphicResult {
|
|
|
85
102
|
export class PolymorphicResult {
|
|
86
103
|
constructor(type) {
|
|
87
104
|
this.kind = 'polymorphicResult';
|
|
88
|
-
this.
|
|
105
|
+
this.interface = type;
|
|
89
106
|
this.format = 'JSON';
|
|
90
107
|
this.docs = {};
|
|
91
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../../../codemodel.go/src/result.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAI/F,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAuLlC,qEAAqE;AACrE,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,WAAW;YACd,OAAO,IAAI,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../../../codemodel.go/src/result.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAI/F,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAuLlC,qEAAqE;AACrE,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK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,SAAiB,EAAE,MAAoB,EAAE,IAA2B,EAAE,OAAgB;QAChG,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;IACjB,CAAC;CACF;AAED,MAAM,OAAO,iBAAiB;IAC5B,YAAY,IAAoB;QAC9B,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;IACjB,CAAC;CACF;AAED,MAAM,OAAO,gBAAgB;IAC3B,YAAY,IAAY,EAAE,IAAe,EAAE,SAA4B;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,KAAK,EAA4C,CAAC;QACrE,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -1,183 +1,316 @@
|
|
|
1
|
-
|
|
2
|
-
export interface
|
|
3
|
-
|
|
1
|
+
/** Docs contains the values used in doc comment generation. */
|
|
2
|
+
export interface Docs {
|
|
3
|
+
/** the high level summary */
|
|
4
|
+
summary?: string;
|
|
5
|
+
/** detailed description */
|
|
6
|
+
description?: string;
|
|
4
7
|
}
|
|
5
|
-
|
|
6
|
-
export
|
|
8
|
+
/** defines types that go across the wire */
|
|
9
|
+
export type WireType = Any | Constant | EncodedBytes | Interface | Literal | Map | Model | PolymorphicModel | QualifiedType | RawJSON | Scalar | Slice | String | Time;
|
|
10
|
+
/** the Go any type */
|
|
11
|
+
export interface Any {
|
|
12
|
+
kind: 'any';
|
|
13
|
+
}
|
|
14
|
+
/** a const type definition */
|
|
15
|
+
export interface Constant {
|
|
16
|
+
kind: 'constant';
|
|
17
|
+
/** the const type name */
|
|
7
18
|
name: string;
|
|
19
|
+
/** any docs for the const type */
|
|
8
20
|
docs: Docs;
|
|
9
|
-
type
|
|
21
|
+
/** the underlying type of the const */
|
|
22
|
+
type: ConstantType;
|
|
23
|
+
/** the possible values for this const */
|
|
10
24
|
values: Array<ConstantValue>;
|
|
25
|
+
/** the name of the func that returns the set of values */
|
|
11
26
|
valuesFuncName: string;
|
|
12
27
|
}
|
|
13
|
-
|
|
28
|
+
/** the underlying type of a const */
|
|
29
|
+
export type ConstantType = 'bool' | 'float32' | 'float64' | 'int32' | 'int64' | 'string';
|
|
30
|
+
/** a const value definition */
|
|
14
31
|
export interface ConstantValue {
|
|
32
|
+
kind: 'constantValue';
|
|
33
|
+
/** the const value name */
|
|
15
34
|
name: string;
|
|
35
|
+
/** any docs for the const value */
|
|
16
36
|
docs: Docs;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
/** the const to which this value belongs */
|
|
38
|
+
type: Constant;
|
|
39
|
+
/** the value for this const */
|
|
40
|
+
value: ConstantValueType;
|
|
41
|
+
}
|
|
42
|
+
/** the underlying type of a const value */
|
|
43
|
+
export type ConstantValueType = boolean | number | string;
|
|
44
|
+
/** a byte slice that's base64 encoded */
|
|
45
|
+
export interface EncodedBytes {
|
|
46
|
+
kind: 'encodedBytes';
|
|
47
|
+
/** indicates what kind of base64-encoding to use */
|
|
48
|
+
encoding: BytesEncoding;
|
|
25
49
|
}
|
|
26
|
-
|
|
50
|
+
/** the types of base64 encoding */
|
|
51
|
+
export type BytesEncoding = 'Std' | 'URL';
|
|
52
|
+
/** a Go interface type used for discriminated types */
|
|
53
|
+
export interface Interface {
|
|
54
|
+
kind: 'interface';
|
|
55
|
+
/** the name of the interface (e.g. FishClassification) */
|
|
27
56
|
name: string;
|
|
57
|
+
/** any docs for the interface */
|
|
28
58
|
docs: Docs;
|
|
29
|
-
|
|
59
|
+
/** contains possible concrete type instances (e.g. Flounder, Carp) */
|
|
60
|
+
possibleTypes: Array<PolymorphicModel>;
|
|
61
|
+
/** contains the name of the discriminator field in the JSON (e.g. "fishtype") */
|
|
30
62
|
discriminatorField: string;
|
|
31
|
-
parent
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
63
|
+
/** does this polymorphic type have a parent (e.g. SalmonClassification has parent FishClassification) */
|
|
64
|
+
parent?: Interface;
|
|
65
|
+
/** this is the "root" type in the list of polymorphic types (e.g. Fish for FishClassification) */
|
|
66
|
+
rootType: PolymorphicModel;
|
|
67
|
+
}
|
|
68
|
+
/** a literal value (e.g. "foo", 123, true) */
|
|
69
|
+
export interface Literal {
|
|
70
|
+
kind: 'literal';
|
|
71
|
+
/** the literal's underlying type */
|
|
72
|
+
type: LiteralType;
|
|
73
|
+
/** the value for this literal */
|
|
36
74
|
literal: any;
|
|
37
75
|
}
|
|
38
|
-
|
|
39
|
-
export
|
|
76
|
+
/** the possible types of literals */
|
|
77
|
+
export type LiteralType = Constant | EncodedBytes | Scalar | String | Time;
|
|
78
|
+
/** a Go map type. note that the key is always a string */
|
|
79
|
+
export interface Map {
|
|
80
|
+
kind: 'map';
|
|
81
|
+
/** the type of values in the map */
|
|
40
82
|
valueType: MapValueType;
|
|
83
|
+
/** indicates if the map's value type is pointer-to-type or not */
|
|
41
84
|
valueTypeByValue: boolean;
|
|
42
85
|
}
|
|
43
|
-
|
|
86
|
+
/** the set of map value types */
|
|
87
|
+
export type MapValueType = WireType;
|
|
88
|
+
/** a field within a model */
|
|
44
89
|
export interface ModelField extends StructField {
|
|
90
|
+
/** the name of the field as it's sent/received over the wire */
|
|
45
91
|
serializedName: string;
|
|
92
|
+
/** metadata for this field */
|
|
46
93
|
annotations: ModelFieldAnnotations;
|
|
47
|
-
|
|
94
|
+
/** the value to send over the wire if one isn't specified */
|
|
95
|
+
defaultValue?: Literal;
|
|
96
|
+
/** any XML metadata */
|
|
48
97
|
xml?: XMLInfo;
|
|
49
98
|
}
|
|
99
|
+
/** additional settings for a model type */
|
|
50
100
|
export interface ModelAnnotations {
|
|
101
|
+
/** when true, serde methods will not be generated */
|
|
51
102
|
omitSerDeMethods: boolean;
|
|
103
|
+
/** indicates the model should be converted into multipart/form data */
|
|
52
104
|
multipartFormData: boolean;
|
|
53
105
|
}
|
|
106
|
+
/** additional settings for a model field */
|
|
54
107
|
export interface ModelFieldAnnotations {
|
|
108
|
+
/** the field is required on input and will always be populated on output */
|
|
55
109
|
required: boolean;
|
|
110
|
+
/** the field is read-only and will be populated on output. any set value on input will be ignored */
|
|
56
111
|
readOnly: boolean;
|
|
112
|
+
/** field is JSON additional properties */
|
|
57
113
|
isAdditionalProperties: boolean;
|
|
114
|
+
/** field is the discriminator for a discriminated type */
|
|
58
115
|
isDiscriminator: boolean;
|
|
59
116
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
export type PrimitiveTypeName = 'any' | 'bool' | 'byte' | 'float32' | 'float64' | 'int8' | 'int16' | 'int32' | 'int64' | 'rune' | 'string' | 'uint8' | 'uint16' | 'uint32' | 'uint64';
|
|
117
|
+
/** a struct that participates in serialization over the wire */
|
|
118
|
+
export interface Model extends ModelBase {
|
|
119
|
+
kind: 'model';
|
|
120
|
+
}
|
|
121
|
+
/** a model that's a discriminated type */
|
|
122
|
+
export interface PolymorphicModel extends ModelBase {
|
|
123
|
+
kind: 'polymorphicModel';
|
|
124
|
+
/** the polymorphic interface this type implements */
|
|
125
|
+
interface: Interface;
|
|
126
|
+
/**
|
|
127
|
+
* the value in the JSON that indicates what type was sent over the wire (e.g. goblin, salmon, shark)
|
|
128
|
+
* note that for "root" types (Fish), there is no discriminatorValue. however, "sub-root" types (e.g. Salmon)
|
|
129
|
+
* will have this populated.
|
|
130
|
+
*/
|
|
131
|
+
discriminatorValue?: Literal;
|
|
132
|
+
}
|
|
133
|
+
/** a type from some package, e.g. the Go standard library (excluding time.Time) */
|
|
78
134
|
export interface QualifiedType {
|
|
135
|
+
kind: 'qualifiedType';
|
|
136
|
+
/** the type name minus any package qualifier (e.g. URL) */
|
|
79
137
|
exportName: string;
|
|
138
|
+
/** the full name of the package to import (e.g. "net/url") */
|
|
80
139
|
packageName: string;
|
|
81
140
|
}
|
|
82
|
-
|
|
141
|
+
/** a byte slice containing raw JSON */
|
|
142
|
+
export interface RawJSON {
|
|
143
|
+
kind: 'rawJSON';
|
|
144
|
+
}
|
|
145
|
+
/** a Go scalar type */
|
|
146
|
+
export interface Scalar {
|
|
147
|
+
kind: 'scalar';
|
|
148
|
+
/** the type of scalar */
|
|
149
|
+
type: ScalarType;
|
|
150
|
+
/** indicates the value is sent/received as a string */
|
|
151
|
+
encodeAsString: boolean;
|
|
152
|
+
}
|
|
153
|
+
/** the supported Go scalar types */
|
|
154
|
+
export type ScalarType = 'bool' | 'byte' | 'float32' | 'float64' | 'int8' | 'int16' | 'int32' | 'int64' | 'rune' | 'uint8' | 'uint16' | 'uint32' | 'uint64';
|
|
155
|
+
/** a Go slice */
|
|
156
|
+
export interface Slice {
|
|
157
|
+
kind: 'slice';
|
|
158
|
+
/** the element type for this slice */
|
|
83
159
|
elementType: SliceElementType;
|
|
160
|
+
/** indicates if the slice's element type is pointer-to-type or not */
|
|
84
161
|
elementTypeByValue: boolean;
|
|
85
|
-
rawJSONAsBytes: boolean;
|
|
86
162
|
}
|
|
87
|
-
|
|
88
|
-
export
|
|
163
|
+
/** the set of slice element types */
|
|
164
|
+
export type SliceElementType = WireType;
|
|
165
|
+
/** a Go string */
|
|
166
|
+
export interface String {
|
|
167
|
+
kind: 'string';
|
|
168
|
+
}
|
|
169
|
+
/** a vanilla struct definition (pretty much exclusively used for parameter groups/options bag types) */
|
|
170
|
+
export interface Struct {
|
|
171
|
+
/** the name of the struct */
|
|
89
172
|
name: string;
|
|
173
|
+
/** and docs for this struct */
|
|
90
174
|
docs: Docs;
|
|
175
|
+
/** the fields in this struct. can be empty */
|
|
91
176
|
fields: Array<StructField>;
|
|
92
177
|
}
|
|
178
|
+
/** a field definition within a struct */
|
|
93
179
|
export interface StructField {
|
|
180
|
+
/** the name of the field */
|
|
94
181
|
name: string;
|
|
182
|
+
/** and docs for this field */
|
|
95
183
|
docs: Docs;
|
|
96
|
-
type
|
|
184
|
+
/** the field's underlying type */
|
|
185
|
+
type: WireType;
|
|
186
|
+
/** indicates if the field is pointer-to-type or not */
|
|
97
187
|
byValue: boolean;
|
|
98
188
|
}
|
|
99
|
-
|
|
100
|
-
|
|
189
|
+
/** a time.Time type from the standard library with a format specifier */
|
|
190
|
+
export interface Time {
|
|
191
|
+
kind: 'time';
|
|
192
|
+
/** the serde format used */
|
|
193
|
+
format: TimeFormat;
|
|
194
|
+
/** indicates if the time is always in UTC */
|
|
101
195
|
utc: boolean;
|
|
102
196
|
}
|
|
197
|
+
/** the set of time serde formats */
|
|
198
|
+
export type TimeFormat = 'dateType' | 'dateTimeRFC1123' | 'dateTimeRFC3339' | 'timeRFC3339' | 'timeUnix';
|
|
199
|
+
/** bit flags indicating how a model/polymorphic type is used */
|
|
103
200
|
export declare enum UsageFlags {
|
|
201
|
+
/** the type is unreferenced */
|
|
104
202
|
None = 0,
|
|
203
|
+
/** the type is received over the wire */
|
|
105
204
|
Input = 1,
|
|
205
|
+
/** the type is sent over the wire */
|
|
106
206
|
Output = 2
|
|
107
207
|
}
|
|
208
|
+
/** metadata used for XML serde */
|
|
108
209
|
export interface XMLInfo {
|
|
210
|
+
/** element name to use instead of the default name */
|
|
109
211
|
name?: string;
|
|
212
|
+
/** name propagated to the generated wrapper type */
|
|
110
213
|
wrapper?: string;
|
|
214
|
+
/** slices only. this is the name of the wrapped type */
|
|
111
215
|
wraps?: string;
|
|
216
|
+
/** value is an XML attribute */
|
|
112
217
|
attribute: boolean;
|
|
218
|
+
/** value is raw text */
|
|
113
219
|
text: boolean;
|
|
114
220
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
export declare function
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
221
|
+
/**
|
|
222
|
+
* returns the Go type declaration for the specified LiteralType
|
|
223
|
+
*
|
|
224
|
+
* @param literal the type for which to emit the declaration
|
|
225
|
+
* @returns the Go type declaration
|
|
226
|
+
*/
|
|
227
|
+
export declare function getLiteralTypeDeclaration(literal: LiteralType): string;
|
|
228
|
+
/**
|
|
229
|
+
* returns the Go type declaration for the specified type.
|
|
230
|
+
* any value in pkgName is prefixed to the underlying type name.
|
|
231
|
+
*
|
|
232
|
+
* @param type the type for which to emit the declaration
|
|
233
|
+
* @param pkgName optional package name prefix for the type
|
|
234
|
+
* @returns the Go type declaration
|
|
235
|
+
*/
|
|
236
|
+
export declare function getTypeDeclaration(type: WireType, pkgName?: string): string;
|
|
237
|
+
/** narrows type to a LiteralType within the conditional block */
|
|
238
|
+
export declare function isLiteralValueType(type: WireType): type is LiteralType;
|
|
129
239
|
export declare class StructField implements StructField {
|
|
130
|
-
constructor(name: string, type:
|
|
240
|
+
constructor(name: string, type: WireType, byValue: boolean);
|
|
131
241
|
}
|
|
132
|
-
export declare class
|
|
242
|
+
export declare class Struct implements Struct {
|
|
133
243
|
constructor(name: string);
|
|
134
244
|
}
|
|
135
|
-
|
|
136
|
-
|
|
245
|
+
interface ModelBase extends Struct {
|
|
246
|
+
/** the fields in this model. can be empty */
|
|
247
|
+
fields: Array<ModelField>;
|
|
248
|
+
/** any annotations for this model */
|
|
249
|
+
annotations: ModelAnnotations;
|
|
250
|
+
/** usage flags for this model */
|
|
251
|
+
usage: UsageFlags;
|
|
252
|
+
/** any XML metadata */
|
|
253
|
+
xml?: XMLInfo;
|
|
137
254
|
}
|
|
138
|
-
|
|
139
|
-
constructor(name: string,
|
|
255
|
+
declare class ModelBase extends Struct implements ModelBase {
|
|
256
|
+
constructor(name: string, annotations: ModelAnnotations, usage: UsageFlags);
|
|
257
|
+
}
|
|
258
|
+
export declare class Any implements Any {
|
|
259
|
+
constructor();
|
|
260
|
+
}
|
|
261
|
+
export declare class Constant implements Constant {
|
|
262
|
+
constructor(name: string, type: ConstantType, valuesFuncName: string);
|
|
140
263
|
}
|
|
141
264
|
export declare class ConstantValue implements ConstantValue {
|
|
142
|
-
constructor(name: string, type:
|
|
265
|
+
constructor(name: string, type: Constant, value: ConstantValueType);
|
|
143
266
|
}
|
|
144
|
-
export declare class
|
|
267
|
+
export declare class EncodedBytes implements EncodedBytes {
|
|
268
|
+
constructor(encoding: BytesEncoding);
|
|
269
|
+
}
|
|
270
|
+
export declare class Interface implements Interface {
|
|
145
271
|
constructor(name: string, discriminatorField: string);
|
|
146
272
|
}
|
|
147
|
-
export declare class
|
|
148
|
-
constructor(type:
|
|
273
|
+
export declare class Literal implements Literal {
|
|
274
|
+
constructor(type: LiteralType, literal: any);
|
|
149
275
|
}
|
|
150
|
-
export declare class
|
|
276
|
+
export declare class Map implements Map {
|
|
151
277
|
constructor(valueType: MapValueType, valueTypeByValue: boolean);
|
|
152
278
|
}
|
|
153
279
|
export declare class ModelAnnotations implements ModelAnnotations {
|
|
154
280
|
constructor(omitSerDe: boolean, multipartForm: boolean);
|
|
155
281
|
}
|
|
156
282
|
export declare class ModelField extends StructField implements ModelField {
|
|
157
|
-
constructor(name: string, type:
|
|
283
|
+
constructor(name: string, type: WireType, byValue: boolean, serializedName: string, annotations: ModelFieldAnnotations);
|
|
158
284
|
}
|
|
159
285
|
export declare class ModelFieldAnnotations implements ModelFieldAnnotations {
|
|
160
286
|
constructor(required: boolean, readOnly: boolean, isAddlProps: boolean, isDiscriminator: boolean);
|
|
161
287
|
}
|
|
162
|
-
export declare class
|
|
288
|
+
export declare class Model extends ModelBase implements Model {
|
|
163
289
|
constructor(name: string, annotations: ModelAnnotations, usage: UsageFlags);
|
|
164
290
|
}
|
|
165
|
-
export declare class
|
|
166
|
-
constructor(name: string, iface:
|
|
167
|
-
}
|
|
168
|
-
export declare class PrimitiveType implements PrimitiveType {
|
|
169
|
-
constructor(typeName: PrimitiveTypeName, encodeAsString?: boolean);
|
|
291
|
+
export declare class PolymorphicModel extends ModelBase implements PolymorphicModel {
|
|
292
|
+
constructor(name: string, iface: Interface, annotations: ModelAnnotations, usage: UsageFlags);
|
|
170
293
|
}
|
|
171
294
|
export declare class QualifiedType implements QualifiedType {
|
|
172
295
|
constructor(exportName: string, packageName: string);
|
|
173
296
|
}
|
|
174
|
-
export declare class
|
|
297
|
+
export declare class RawJSON implements RawJSON {
|
|
298
|
+
constructor();
|
|
299
|
+
}
|
|
300
|
+
export declare class Scalar implements Scalar {
|
|
301
|
+
constructor(type: ScalarType, encodeAsString: boolean);
|
|
302
|
+
}
|
|
303
|
+
export declare class Slice implements Slice {
|
|
175
304
|
constructor(elementType: SliceElementType, elementTypeByValue: boolean);
|
|
176
305
|
}
|
|
177
|
-
export declare class
|
|
178
|
-
constructor(
|
|
306
|
+
export declare class String implements String {
|
|
307
|
+
constructor();
|
|
308
|
+
}
|
|
309
|
+
export declare class Time implements Time {
|
|
310
|
+
constructor(format: TimeFormat, utc: boolean);
|
|
179
311
|
}
|
|
180
312
|
export declare class XMLInfo implements XMLInfo {
|
|
181
313
|
constructor();
|
|
182
314
|
}
|
|
315
|
+
export {};
|
|
183
316
|
//# sourceMappingURL=type.d.ts.map
|