@autorest/typescript 6.0.10 → 6.0.11
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/src/generators/samples/rlcSampleGenerator.d.ts +2 -5
- package/dist/src/generators/samples/rlcSampleGenerator.d.ts.map +1 -1
- package/dist/src/generators/samples/rlcSampleGenerator.js +29 -66
- package/dist/src/generators/samples/rlcSampleGenerator.js.map +1 -1
- package/dist/src/generators/static/packageFileGenerator.js +7 -6
- package/dist/src/generators/static/packageFileGenerator.js.map +1 -1
- package/dist/src/restLevelClient/generateRestLevel.d.ts.map +1 -1
- package/dist/src/restLevelClient/generateRestLevel.js +8 -8
- package/dist/src/restLevelClient/generateRestLevel.js.map +1 -1
- package/dist/src/restLevelClient/helpers/generatorHelpers.d.ts +1 -1
- package/dist/src/restLevelClient/helpers/generatorHelpers.d.ts.map +1 -1
- package/dist/src/restLevelClient/helpers/generatorHelpers.js +10 -5
- package/dist/src/restLevelClient/helpers/generatorHelpers.js.map +1 -1
- package/dist/src/restLevelClient/transforms/transform.d.ts.map +1 -1
- package/dist/src/restLevelClient/transforms/transform.js +6 -0
- package/dist/src/restLevelClient/transforms/transform.js.map +1 -1
- package/dist/src/restLevelClient/transforms/transformParameterTypes.d.ts +1 -0
- package/dist/src/restLevelClient/transforms/transformParameterTypes.d.ts.map +1 -1
- package/dist/src/restLevelClient/transforms/transformParameterTypes.js +18 -4
- package/dist/src/restLevelClient/transforms/transformParameterTypes.js.map +1 -1
- package/package.json +2 -2
- package/src/generators/samples/rlcSampleGenerator.ts +41 -57
- package/src/generators/static/packageFileGenerator.ts +7 -6
- package/src/restLevelClient/generateRestLevel.ts +8 -24
- package/src/restLevelClient/helpers/generatorHelpers.ts +13 -9
- package/src/restLevelClient/transforms/transform.ts +6 -0
- package/src/restLevelClient/transforms/transformParameterTypes.ts +35 -6
- package/dist/src/restLevelClient/interfaces.d.ts +0 -74
- package/dist/src/restLevelClient/interfaces.d.ts.map +0 -1
- package/dist/src/restLevelClient/interfaces.js +0 -5
- package/dist/src/restLevelClient/interfaces.js.map +0 -1
- package/src/restLevelClient/interfaces.ts +0 -96
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { Schema } from "@autorest/codemodel";
|
|
5
|
-
import { ExampleParameter } from "@autorest/testmodeler/dist/src/core/model";
|
|
6
|
-
// import { ExampleParameter } from "@autorest/testmodeler";
|
|
7
|
-
|
|
8
|
-
export type PathParameter = {
|
|
9
|
-
name: string;
|
|
10
|
-
schema: Schema;
|
|
11
|
-
description?: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export interface ResponseTypes {
|
|
15
|
-
success: string[];
|
|
16
|
-
error: string[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface OperationMethod {
|
|
20
|
-
optionsName: string;
|
|
21
|
-
description: string;
|
|
22
|
-
hasOptionalOptions: boolean;
|
|
23
|
-
returnType: string;
|
|
24
|
-
successStatus: string[];
|
|
25
|
-
responseTypes: ResponseTypes;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type Methods = {
|
|
29
|
-
[key: string]: [OperationMethod];
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export interface PathMetadata {
|
|
33
|
-
name: string;
|
|
34
|
-
pathParameters: PathParameter[];
|
|
35
|
-
methods: Methods;
|
|
36
|
-
annotations?: OperationAnnotations;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type Paths = Record<string, PathMetadata>;
|
|
40
|
-
|
|
41
|
-
export interface OperationAnnotations {
|
|
42
|
-
isLongRunning?: boolean;
|
|
43
|
-
isPageable?: boolean;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* A group of samples in operation_id level and they are used to generate in a sample file
|
|
48
|
-
*/
|
|
49
|
-
export interface RLCSampleGroup {
|
|
50
|
-
filename: string;
|
|
51
|
-
clientPackageName: string;
|
|
52
|
-
defaultFactoryName: string;
|
|
53
|
-
samples: RLCSampleDetail[];
|
|
54
|
-
importedTypes?: string[];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* An independent sample detail and it will be wrapped as a func
|
|
59
|
-
*/
|
|
60
|
-
export interface RLCSampleDetail {
|
|
61
|
-
/**
|
|
62
|
-
* metadata for comments
|
|
63
|
-
*/
|
|
64
|
-
description: string;
|
|
65
|
-
originalFileLocation?: string;
|
|
66
|
-
name: string;
|
|
67
|
-
path: string;
|
|
68
|
-
defaultFactoryName: string;
|
|
69
|
-
clientParamAssignments: string[];
|
|
70
|
-
pathParamAssignments: string[];
|
|
71
|
-
methodParamAssignments: string[];
|
|
72
|
-
clientParamNames: string;
|
|
73
|
-
pathParamNames: string;
|
|
74
|
-
methodParamNames: "options" | "";
|
|
75
|
-
method: string;
|
|
76
|
-
isLRO: boolean;
|
|
77
|
-
isPaging: boolean;
|
|
78
|
-
useLegacyLro: boolean;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export type SampleParameterPosition = "client" | "path" | "method";
|
|
82
|
-
|
|
83
|
-
export type SampleParameters = Record<
|
|
84
|
-
SampleParameterPosition,
|
|
85
|
-
SampleParameter[]
|
|
86
|
-
>;
|
|
87
|
-
|
|
88
|
-
export type TestSampleParameters = Record<
|
|
89
|
-
SampleParameterPosition,
|
|
90
|
-
ExampleParameter[]
|
|
91
|
-
>;
|
|
92
|
-
|
|
93
|
-
export interface SampleParameter {
|
|
94
|
-
name: string;
|
|
95
|
-
assignment?: string;
|
|
96
|
-
}
|