@azure-tools/typespec-azure-core 0.42.0-dev.9 → 0.43.0-dev.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/lib/azure-core.tsp +1 -0
- package/lib/decorators.tsp +192 -207
- package/lib/obsolete.tsp +267 -0
- package/lib/operations.tsp +0 -245
- package/package.json +10 -10
package/lib/azure-core.tsp
CHANGED
package/lib/decorators.tsp
CHANGED
|
@@ -1,215 +1,200 @@
|
|
|
1
1
|
using TypeSpec.Reflection;
|
|
2
2
|
|
|
3
|
-
namespace Azure {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
extern dec nextPageOperation(entity: Operation, linkedOperation: Operation, parameters?: {});
|
|
129
|
-
}
|
|
3
|
+
namespace Azure.Core {
|
|
4
|
+
/**
|
|
5
|
+
* Marks an Enum as being fixed since enums in Azure are
|
|
6
|
+
* assumed to be extensible.
|
|
7
|
+
*/
|
|
8
|
+
extern dec fixed(target: Enum);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Marks a Model as a paged collection.
|
|
12
|
+
*/
|
|
13
|
+
extern dec pagedResult(entity: Model);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Identifies the ModelProperty that contains the paged items. Can only be used on a Model marked with `@pagedResult`.
|
|
17
|
+
*/
|
|
18
|
+
extern dec items(entity: ModelProperty);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Identifies a ModelProperty that contains the next link value. Can only be used on a Model marked with `@pagedResult`.
|
|
22
|
+
*/
|
|
23
|
+
extern dec nextLink(entity: ModelProperty);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Used for custom StatusMonitor implementation.
|
|
27
|
+
* Identifies an Enum or ModelProperty as containing long-running operation
|
|
28
|
+
* status.
|
|
29
|
+
*/
|
|
30
|
+
extern dec lroStatus(entity: Enum | Union | ModelProperty);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Used for custom StatusMonitor implementation.
|
|
34
|
+
* Identifies an EnumMember as a long-running "Succeeded" terminal state.
|
|
35
|
+
*/
|
|
36
|
+
extern dec lroSucceeded(entity: EnumMember | UnionVariant);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Used for custom StatusMonitor implementation.
|
|
40
|
+
* Identifies an EnumMember as a long-running "Canceled" terminal state.
|
|
41
|
+
*/
|
|
42
|
+
extern dec lroCanceled(entity: EnumMember | UnionVariant);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Used for custom StatusMonitor implementation.
|
|
46
|
+
* Identifies an enum member as a long-running "Failed" terminal state.
|
|
47
|
+
*/
|
|
48
|
+
extern dec lroFailed(entity: EnumMember | UnionVariant);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Used for custom StatusMonitor implementation.
|
|
52
|
+
* Identifies a model property of a StatusMonitor as containing the result
|
|
53
|
+
* of a long-running operation that terminates successfully (Succeeded).
|
|
54
|
+
*/
|
|
55
|
+
extern dec lroResult(entity: ModelProperty);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Used for custom StatusMonitor implementation.
|
|
59
|
+
* Identifies a model property of a StatusMonitor as containing the result
|
|
60
|
+
* of a long-running operation that terminates unsuccessfully (Failed).
|
|
61
|
+
*/
|
|
62
|
+
extern dec lroErrorResult(entity: ModelProperty);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Identifies a model property as containing the location to poll for operation state.
|
|
66
|
+
* @param options PollingOptions for the poller pointed to by this link. Overrides
|
|
67
|
+
* settings derived from property value it is decorating, if the value of the
|
|
68
|
+
* property is ResourceLocation<Resource>
|
|
69
|
+
*/
|
|
70
|
+
extern dec pollingLocation(entity: ModelProperty, options?: PollingOptions);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Identifies a ModelProperty as containing the final location for the operation result.
|
|
74
|
+
* @param finalResult Sets the expected return value for the final result. Overrides
|
|
75
|
+
* any value provided in the decorated property, if the property uses ResourceLocation<Resource>.
|
|
76
|
+
*/
|
|
77
|
+
extern dec finalLocation(entity: ModelProperty, finalResult?: Model | void);
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Identifies an operation that is linked to the target operation.
|
|
81
|
+
* @param linkedOperation The linked Operation
|
|
82
|
+
* @param linkType A string indicating the role of the linked operation
|
|
83
|
+
* @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
|
|
84
|
+
* be passed to the linked operation request.
|
|
85
|
+
*/
|
|
86
|
+
extern dec operationLink(
|
|
87
|
+
entity: Operation,
|
|
88
|
+
linkedOperation: Operation,
|
|
89
|
+
linkType: valueof string,
|
|
90
|
+
parameters?: {}
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Used to define how to call custom polling operations for long-running operations.
|
|
95
|
+
*
|
|
96
|
+
* @param targetParameter A reference to the polling operation parameter this parameter
|
|
97
|
+
* provides a value for, or the name of that parameter. The default value is the name of
|
|
98
|
+
* the decorated parameter or property.
|
|
99
|
+
*/
|
|
100
|
+
extern dec pollingOperationParameter(
|
|
101
|
+
entity: ModelProperty,
|
|
102
|
+
targetParameter?: ModelProperty | string
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Identifies that an operation is a polling operation for an LRO.
|
|
107
|
+
* @param linkedOperation The linked Operation
|
|
108
|
+
* @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
|
|
109
|
+
* be passed to the linked operation request.
|
|
110
|
+
*/
|
|
111
|
+
extern dec pollingOperation(entity: Operation, linkedOperation: Operation, parameters?: {});
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Identifies that an operation is the final operation for an LRO.
|
|
115
|
+
* @param linkedOperation The linked Operation
|
|
116
|
+
* @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
|
|
117
|
+
* be passed to the linked operation request.
|
|
118
|
+
*/
|
|
119
|
+
extern dec finalOperation(entity: Operation, linkedOperation: Operation, parameters?: {});
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Identifies that an operation is used to retrieve the next page for paged operations.
|
|
123
|
+
* @param linkedOperation The linked Operation
|
|
124
|
+
* @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
|
|
125
|
+
* be passed to the linked operation request.
|
|
126
|
+
*/
|
|
127
|
+
extern dec nextPageOperation(entity: Operation, linkedOperation: Operation, parameters?: {});
|
|
130
128
|
}
|
|
131
129
|
|
|
132
|
-
namespace Azure {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*/
|
|
150
|
-
extern dec responseProperty(entity: Model, name: valueof string);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
130
|
+
namespace Azure.Core.Foundations {
|
|
131
|
+
/**
|
|
132
|
+
* Deletes any key properties from the model.
|
|
133
|
+
*/
|
|
134
|
+
extern dec omitKeyProperties(entity: Model);
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Identifies a property on a request model that serves as a linked operation parameter.
|
|
138
|
+
* @param name Property name on the target
|
|
139
|
+
*/
|
|
140
|
+
extern dec requestParameter(entity: Model, name: valueof string);
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Identifies a property on *all* non-error response models that serve as a linked operation parameter.
|
|
144
|
+
* @param name Property name on the target
|
|
145
|
+
*/
|
|
146
|
+
extern dec responseProperty(entity: Model, name: valueof string);
|
|
153
147
|
}
|
|
154
148
|
|
|
155
|
-
namespace Azure {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
entity: TypeSpec.Reflection.Model,
|
|
200
|
-
type: TypeSpec.Reflection.Scalar
|
|
201
|
-
);
|
|
202
|
-
|
|
203
|
-
model ArmResourceIdentifierConfigOptions {
|
|
204
|
-
allowedResources: ArmResourceIdentifierAllowedResource[];
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/** Configuration for the armResourceIdentifier scalar */
|
|
208
|
-
extern dec armResourceIdentifierConfig(
|
|
209
|
-
target: Scalar,
|
|
210
|
-
options: ArmResourceIdentifierConfigOptions
|
|
211
|
-
);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
149
|
+
namespace Azure.Core.Foundations.Private {
|
|
150
|
+
/**
|
|
151
|
+
* Provides a Model describing parameter customizations to spread into the target.
|
|
152
|
+
* @param customizations Model describing the customization to spread
|
|
153
|
+
*/
|
|
154
|
+
extern dec spreadCustomParameters(entity: Model, customizations: {});
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Provides a Model describing response property customizations to spread into the target.
|
|
158
|
+
* @param customizations Model describing the customization to spread
|
|
159
|
+
*/
|
|
160
|
+
extern dec spreadCustomResponseProperties(entity: Model, customizations: {});
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Checks the Resource parameter of an operation signature to ensure it's a valid resource type.
|
|
164
|
+
* Also marks the operation as a resource operation.
|
|
165
|
+
* @param resourceType The possible resource Type to validate.
|
|
166
|
+
*/
|
|
167
|
+
extern dec ensureResourceType(entity: TypeSpec.Reflection.Operation, resourceType: unknown);
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Checks the Resource parameter of an operation signature to ensure it's a valid resource type.
|
|
171
|
+
*/
|
|
172
|
+
extern dec needsRoute(entity: TypeSpec.Reflection.Operation);
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Issues a warning if an operation which derives from an operation templated marked with `@ensureVerb`
|
|
176
|
+
* differs from the verb specified.
|
|
177
|
+
* @param templateName: Name of the template operation.
|
|
178
|
+
* @param verb The intended HTTP verb.
|
|
179
|
+
*/
|
|
180
|
+
extern dec ensureVerb(
|
|
181
|
+
entity: TypeSpec.Reflection.Operation,
|
|
182
|
+
templateName: valueof string,
|
|
183
|
+
verb: valueof string
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Identifies that a model should be treated as an embedding vector.
|
|
188
|
+
*/
|
|
189
|
+
extern dec embeddingVector(entity: TypeSpec.Reflection.Model, type: TypeSpec.Reflection.Scalar);
|
|
190
|
+
|
|
191
|
+
model ArmResourceIdentifierConfigOptions {
|
|
192
|
+
allowedResources: ArmResourceIdentifierAllowedResource[];
|
|
214
193
|
}
|
|
194
|
+
|
|
195
|
+
/** Configuration for the armResourceIdentifier scalar */
|
|
196
|
+
extern dec armResourceIdentifierConfig(
|
|
197
|
+
target: Scalar,
|
|
198
|
+
options: ArmResourceIdentifierConfigOptions
|
|
199
|
+
);
|
|
215
200
|
}
|
package/lib/obsolete.tsp
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
// This file contains operation template that are deprecated and shouldn't be used.
|
|
2
|
+
import "@typespec/http";
|
|
3
|
+
import "@typespec/rest";
|
|
4
|
+
import "@typespec/versioning";
|
|
5
|
+
import "./models.tsp";
|
|
6
|
+
import "./traits.tsp";
|
|
7
|
+
import "./operations.tsp";
|
|
8
|
+
|
|
9
|
+
namespace Azure.Core;
|
|
10
|
+
|
|
11
|
+
using TypeSpec.Http;
|
|
12
|
+
using TypeSpec.Rest;
|
|
13
|
+
using TypeSpec.Versioning;
|
|
14
|
+
using Azure.Core.Traits;
|
|
15
|
+
using Azure.Core.Traits.Private;
|
|
16
|
+
|
|
17
|
+
alias StandardResourceOperations = ResourceOperations<NoConditionalRequests &
|
|
18
|
+
NoRepeatableRequests &
|
|
19
|
+
NoClientRequestId>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* DEPRECATED: Use `ResourceCreateOrReplace` from a `ResourceOperations` interface instance.
|
|
23
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
24
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
25
|
+
*
|
|
26
|
+
* Operation signature to create or replace a resource.
|
|
27
|
+
* @template Resource The type of the resource.
|
|
28
|
+
* @template Traits Traits to apply to the operation.
|
|
29
|
+
*/
|
|
30
|
+
#deprecated "Use `ResourceCreateOrReplace` from a `ResourceOperations` interface instance."
|
|
31
|
+
op ResourceCreateOrReplace<
|
|
32
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
33
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
34
|
+
> is StandardResourceOperations.ResourceCreateOrReplace<Resource, Traits>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* DEPRECATED: Use `LongRunningResourceCreateOrReplace` from a `ResourceOperations` interface instance.
|
|
38
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
39
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
40
|
+
*
|
|
41
|
+
* Long-running operation signature to create or replace a resource.
|
|
42
|
+
* @template Resource The type of the resource.
|
|
43
|
+
* @template Traits Traits to apply to the operation.
|
|
44
|
+
*/
|
|
45
|
+
#deprecated "Use `LongRunningResourceCreateOrReplace` from a `ResourceOperations` interface instance."
|
|
46
|
+
op LongRunningResourceCreateOrReplace<
|
|
47
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
48
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
49
|
+
> is StandardResourceOperations.LongRunningResourceCreateOrReplace<Resource, Traits>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* DEPRECATED: Use `ResourceCreateOrUpdate` from a `ResourceOperations` interface instance.
|
|
53
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
54
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
55
|
+
*
|
|
56
|
+
* Operation signature to create or update a resource.
|
|
57
|
+
* @template Resource The type of the resource.
|
|
58
|
+
* @template Traits Traits to apply to the operation.
|
|
59
|
+
*/
|
|
60
|
+
#deprecated "Use `LongRunningResourceCreateOrReplace` from a `ResourceOperations` interface instance."
|
|
61
|
+
op ResourceCreateOrUpdate<
|
|
62
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
63
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
64
|
+
> is StandardResourceOperations.ResourceCreateOrUpdate<Resource, Traits>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* DEPRECATED: Use `LongRunningResourceCreateOrUpdate` from a `ResourceOperations` interface instance.
|
|
68
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
69
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
70
|
+
*
|
|
71
|
+
* Long-running operation signature to create or update a resource.
|
|
72
|
+
* @template Resource The type of the resource.
|
|
73
|
+
* @template Traits Traits to apply to the operation.
|
|
74
|
+
*/
|
|
75
|
+
#deprecated "Use `LongRunningResourceCreateOrUpdate` from a `ResourceOperations` interface instance."
|
|
76
|
+
op LongRunningResourceCreateOrUpdate<
|
|
77
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
78
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
79
|
+
> is StandardResourceOperations.LongRunningResourceCreateOrUpdate<Resource, Traits>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* DEPRECATED: Use `ResourceUpdate` from a `ResourceOperations` interface instance.
|
|
83
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
84
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
85
|
+
* Operation signature to update a resource.
|
|
86
|
+
* @template Resource The type of the resource.
|
|
87
|
+
* @template Traits Traits to apply to the operation.
|
|
88
|
+
*/
|
|
89
|
+
#deprecated "Use `ResourceUpdate` from a `ResourceOperations` interface instance."
|
|
90
|
+
op ResourceUpdate<
|
|
91
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
92
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
93
|
+
> is StandardResourceOperations.ResourceUpdate<Resource, Traits>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* DEPRECATED: Use `ResourceCreateWithServiceProvidedName` from a `ResourceOperations` interface instance.
|
|
97
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
98
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
99
|
+
*
|
|
100
|
+
* Operation signature to synchronously create a resource with a service-provided name.
|
|
101
|
+
* @template Resource The type of the resource.
|
|
102
|
+
* @template Traits Traits to apply to the operation.
|
|
103
|
+
*/
|
|
104
|
+
#deprecated "Use `ResourceCreateWithServiceProvidedName` from a `ResourceOperations` interface instance."
|
|
105
|
+
op ResourceCreateWithServiceProvidedName<
|
|
106
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
107
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
108
|
+
> is StandardResourceOperations.ResourceCreateWithServiceProvidedName<Resource, Traits>;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* DEPRECATED: Use `LongRunningResourceCreateWithServiceProvidedName` from a `ResourceOperations` interface instance.
|
|
112
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
113
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
114
|
+
*
|
|
115
|
+
* Long-running operation signature to create a resource with a service-provided name.
|
|
116
|
+
* @template Resource The type of the resource.
|
|
117
|
+
* @template Traits Traits to apply to the operation.
|
|
118
|
+
*/
|
|
119
|
+
#deprecated "Use `LongRunningResourceCreateWithServiceProvidedName` from a `ResourceOperations` interface instance."
|
|
120
|
+
op LongRunningResourceCreateWithServiceProvidedName<
|
|
121
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
122
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
123
|
+
> is StandardResourceOperations.LongRunningResourceCreateWithServiceProvidedName<Resource, Traits>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* DEPRECATED: Use `ResourceRead` from a `ResourceOperations` interface instance.
|
|
127
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
128
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
129
|
+
*
|
|
130
|
+
* Operation signature to retrieve a resource.
|
|
131
|
+
* @template Resource The type of the resource.
|
|
132
|
+
* @template Traits Traits to apply to the operation.
|
|
133
|
+
*/
|
|
134
|
+
op ResourceRead<
|
|
135
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
136
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
137
|
+
> is StandardResourceOperations.ResourceRead<Resource, Traits>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* DEPRECATED: Use `ResourceDelete` from a `ResourceOperations` interface instance.
|
|
141
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
142
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
143
|
+
*
|
|
144
|
+
* Operation signature to delete a resource.
|
|
145
|
+
* @template Resource The type of the resource.
|
|
146
|
+
* @template Traits Traits to apply to the operation.
|
|
147
|
+
*/
|
|
148
|
+
op ResourceDelete<
|
|
149
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
150
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
151
|
+
> is StandardResourceOperations.ResourceDelete<Resource, Traits>;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* DEPRECATED: Use `LongRunningResourceDelete` from a `ResourceOperations` interface instance.
|
|
155
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
156
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
157
|
+
*
|
|
158
|
+
* Long-running operation signature to delete a resource.
|
|
159
|
+
* @template Resource The type of the resource.
|
|
160
|
+
* @template Traits Traits to apply to the operation.
|
|
161
|
+
*/
|
|
162
|
+
op LongRunningResourceDelete<
|
|
163
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
164
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
165
|
+
> is StandardResourceOperations.LongRunningResourceDelete<Resource, Traits>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* DEPRECATED: Use `ResourceList` from a `ResourceOperations` interface instance.
|
|
169
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
170
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
171
|
+
*
|
|
172
|
+
* Operation signature to list resources in a paginated way.
|
|
173
|
+
* @template Resource The type of the resource.
|
|
174
|
+
* @template Traits Traits to apply to the operation.
|
|
175
|
+
*/
|
|
176
|
+
op ResourceList<
|
|
177
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
178
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
179
|
+
> is StandardResourceOperations.ResourceList<Resource, Traits>;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* DEPRECATED: Use `ResourceAction` from a `ResourceOperations` interface instance.
|
|
183
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
184
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
185
|
+
*
|
|
186
|
+
* Operation signature for a resource action.
|
|
187
|
+
* @template Resource The type of the resource.
|
|
188
|
+
* @template Parameters Object describing the request parameters.
|
|
189
|
+
* @template Response Object describing the response parameters.
|
|
190
|
+
* @template Traits Traits to apply to the operation.
|
|
191
|
+
*/
|
|
192
|
+
op ResourceAction<
|
|
193
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
194
|
+
Parameters extends TypeSpec.Reflection.Model,
|
|
195
|
+
Response extends TypeSpec.Reflection.Model,
|
|
196
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
197
|
+
> is StandardResourceOperations.ResourceAction<Resource, Parameters, Response, Traits>;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* DEPRECATED: Use `ResourceCollectionAction` from a `ResourceOperations` interface instance.
|
|
201
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
202
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
203
|
+
*
|
|
204
|
+
* Operation signature for an action that applies to a collection of resources.
|
|
205
|
+
* @template Resource The type of the resource.
|
|
206
|
+
* @template Parameters Object describing the request parameters.
|
|
207
|
+
* @template Response Object describing the response parameters.
|
|
208
|
+
* @template Traits Traits to apply to the operation.
|
|
209
|
+
*/
|
|
210
|
+
op ResourceCollectionAction<
|
|
211
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
212
|
+
Parameters extends TypeSpec.Reflection.Model,
|
|
213
|
+
Response extends TypeSpec.Reflection.Model,
|
|
214
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
215
|
+
> is StandardResourceOperations.ResourceCollectionAction<Resource, Parameters, Response, Traits>;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* DEPRECATED: Use `LongRunningResourceAction` from a `ResourceOperations` interface instance.
|
|
219
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
220
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
221
|
+
*
|
|
222
|
+
* Long-running operation signature for a resource action.
|
|
223
|
+
* @template Resource The type of the resource.
|
|
224
|
+
* @template Parameters Object describing the request parameters.
|
|
225
|
+
* @template StatusResult Object describing the result of the status operation.
|
|
226
|
+
* @template StatusError Object describing the error of the status operation. If not provided, the default error type is used.
|
|
227
|
+
* @template Traits Traits to apply to the operation.
|
|
228
|
+
*/
|
|
229
|
+
op LongRunningResourceAction<
|
|
230
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
231
|
+
Parameters extends TypeSpec.Reflection.Model,
|
|
232
|
+
StatusResult extends TypeSpec.Reflection.Model,
|
|
233
|
+
StatusError = Foundations.Error,
|
|
234
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
235
|
+
> is StandardResourceOperations.LongRunningResourceAction<
|
|
236
|
+
Resource,
|
|
237
|
+
Parameters,
|
|
238
|
+
StatusResult,
|
|
239
|
+
StatusError,
|
|
240
|
+
Traits
|
|
241
|
+
>;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* DEPRECATED: Use `LongRunningResourceCollectionAction` from a `ResourceOperations` interface instance.
|
|
245
|
+
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
246
|
+
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
247
|
+
*
|
|
248
|
+
* Long-running operation signature for an action that applies to a collection of resources.
|
|
249
|
+
* @template Resource The type of the resource.
|
|
250
|
+
* @template Parameters Object describing the request parameters.
|
|
251
|
+
* @template StatusResult Object describing the result of the status operation.
|
|
252
|
+
* @template StatusError Object describing the error of the status operation. If not provided, the default error type is used.
|
|
253
|
+
* @template Traits Traits to apply to the operation.
|
|
254
|
+
*/
|
|
255
|
+
op LongRunningResourceCollectionAction<
|
|
256
|
+
Resource extends TypeSpec.Reflection.Model,
|
|
257
|
+
Parameters extends TypeSpec.Reflection.Model,
|
|
258
|
+
StatusResult extends TypeSpec.Reflection.Model,
|
|
259
|
+
StatusError = Foundations.Error,
|
|
260
|
+
Traits extends TypeSpec.Reflection.Model = {}
|
|
261
|
+
> is StandardResourceOperations.LongRunningResourceCollectionAction<
|
|
262
|
+
Resource,
|
|
263
|
+
Parameters,
|
|
264
|
+
StatusResult,
|
|
265
|
+
StatusError,
|
|
266
|
+
Traits
|
|
267
|
+
>;
|
package/lib/operations.tsp
CHANGED
|
@@ -503,251 +503,6 @@ interface ResourceOperations<
|
|
|
503
503
|
>;
|
|
504
504
|
}
|
|
505
505
|
|
|
506
|
-
alias StandardResourceOperations = ResourceOperations<NoConditionalRequests &
|
|
507
|
-
NoRepeatableRequests &
|
|
508
|
-
NoClientRequestId>;
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* DEPRECATED: Use `ResourceCreateOrReplace` from a `ResourceOperations` interface instance.
|
|
512
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
513
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
514
|
-
*
|
|
515
|
-
* Operation signature to create or replace a resource.
|
|
516
|
-
* @template Resource The type of the resource.
|
|
517
|
-
* @template Traits Traits to apply to the operation.
|
|
518
|
-
*/
|
|
519
|
-
op ResourceCreateOrReplace<
|
|
520
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
521
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
522
|
-
> is StandardResourceOperations.ResourceCreateOrReplace<Resource, Traits>;
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* DEPRECATED: Use `LongRunningResourceCreateOrReplace` from a `ResourceOperations` interface instance.
|
|
526
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
527
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
528
|
-
*
|
|
529
|
-
* Long-running operation signature to create or replace a resource.
|
|
530
|
-
* @template Resource The type of the resource.
|
|
531
|
-
* @template Traits Traits to apply to the operation.
|
|
532
|
-
*/
|
|
533
|
-
op LongRunningResourceCreateOrReplace<
|
|
534
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
535
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
536
|
-
> is StandardResourceOperations.LongRunningResourceCreateOrReplace<Resource, Traits>;
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* DEPRECATED: Use `ResourceCreateOrUpdate` from a `ResourceOperations` interface instance.
|
|
540
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
541
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
542
|
-
*
|
|
543
|
-
* Operation signature to create or update a resource.
|
|
544
|
-
* @template Resource The type of the resource.
|
|
545
|
-
* @template Traits Traits to apply to the operation.
|
|
546
|
-
*/
|
|
547
|
-
op ResourceCreateOrUpdate<
|
|
548
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
549
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
550
|
-
> is StandardResourceOperations.ResourceCreateOrUpdate<Resource, Traits>;
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* DEPRECATED: Use `LongRunningResourceCreateOrUpdate` from a `ResourceOperations` interface instance.
|
|
554
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
555
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
556
|
-
*
|
|
557
|
-
* Long-running operation signature to create or update a resource.
|
|
558
|
-
* @template Resource The type of the resource.
|
|
559
|
-
* @template Traits Traits to apply to the operation.
|
|
560
|
-
*/
|
|
561
|
-
op LongRunningResourceCreateOrUpdate<
|
|
562
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
563
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
564
|
-
> is StandardResourceOperations.LongRunningResourceCreateOrUpdate<Resource, Traits>;
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* DEPRECATED: Use `ResourceUpdate` from a `ResourceOperations` interface instance.
|
|
568
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
569
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
570
|
-
* Operation signature to update a resource.
|
|
571
|
-
* @template Resource The type of the resource.
|
|
572
|
-
* @template Traits Traits to apply to the operation.
|
|
573
|
-
*/
|
|
574
|
-
op ResourceUpdate<
|
|
575
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
576
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
577
|
-
> is StandardResourceOperations.ResourceUpdate<Resource, Traits>;
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* DEPRECATED: Use `ResourceCreateWithServiceProvidedName` from a `ResourceOperations` interface instance.
|
|
581
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
582
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
583
|
-
*
|
|
584
|
-
* Operation signature to synchronously create a resource with a service-provided name.
|
|
585
|
-
* @template Resource The type of the resource.
|
|
586
|
-
* @template Traits Traits to apply to the operation.
|
|
587
|
-
*/
|
|
588
|
-
op ResourceCreateWithServiceProvidedName<
|
|
589
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
590
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
591
|
-
> is StandardResourceOperations.ResourceCreateWithServiceProvidedName<Resource, Traits>;
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* DEPRECATED: Use `LongRunningResourceCreateWithServiceProvidedName` from a `ResourceOperations` interface instance.
|
|
595
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
596
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
597
|
-
*
|
|
598
|
-
* Long-running operation signature to create a resource with a service-provided name.
|
|
599
|
-
* @template Resource The type of the resource.
|
|
600
|
-
* @template Traits Traits to apply to the operation.
|
|
601
|
-
*/
|
|
602
|
-
op LongRunningResourceCreateWithServiceProvidedName<
|
|
603
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
604
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
605
|
-
> is StandardResourceOperations.LongRunningResourceCreateWithServiceProvidedName<Resource, Traits>;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* DEPRECATED: Use `ResourceRead` from a `ResourceOperations` interface instance.
|
|
609
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
610
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
611
|
-
*
|
|
612
|
-
* Operation signature to retrieve a resource.
|
|
613
|
-
* @template Resource The type of the resource.
|
|
614
|
-
* @template Traits Traits to apply to the operation.
|
|
615
|
-
*/
|
|
616
|
-
op ResourceRead<
|
|
617
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
618
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
619
|
-
> is StandardResourceOperations.ResourceRead<Resource, Traits>;
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* DEPRECATED: Use `ResourceDelete` from a `ResourceOperations` interface instance.
|
|
623
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
624
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
625
|
-
*
|
|
626
|
-
* Operation signature to delete a resource.
|
|
627
|
-
* @template Resource The type of the resource.
|
|
628
|
-
* @template Traits Traits to apply to the operation.
|
|
629
|
-
*/
|
|
630
|
-
op ResourceDelete<
|
|
631
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
632
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
633
|
-
> is StandardResourceOperations.ResourceDelete<Resource, Traits>;
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* DEPRECATED: Use `LongRunningResourceDelete` from a `ResourceOperations` interface instance.
|
|
637
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
638
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
639
|
-
*
|
|
640
|
-
* Long-running operation signature to delete a resource.
|
|
641
|
-
* @template Resource The type of the resource.
|
|
642
|
-
* @template Traits Traits to apply to the operation.
|
|
643
|
-
*/
|
|
644
|
-
op LongRunningResourceDelete<
|
|
645
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
646
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
647
|
-
> is StandardResourceOperations.LongRunningResourceDelete<Resource, Traits>;
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* DEPRECATED: Use `ResourceList` from a `ResourceOperations` interface instance.
|
|
651
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
652
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
653
|
-
*
|
|
654
|
-
* Operation signature to list resources in a paginated way.
|
|
655
|
-
* @template Resource The type of the resource.
|
|
656
|
-
* @template Traits Traits to apply to the operation.
|
|
657
|
-
*/
|
|
658
|
-
op ResourceList<
|
|
659
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
660
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
661
|
-
> is StandardResourceOperations.ResourceList<Resource, Traits>;
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* DEPRECATED: Use `ResourceAction` from a `ResourceOperations` interface instance.
|
|
665
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
666
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
667
|
-
*
|
|
668
|
-
* Operation signature for a resource action.
|
|
669
|
-
* @template Resource The type of the resource.
|
|
670
|
-
* @template Parameters Object describing the request parameters.
|
|
671
|
-
* @template Response Object describing the response parameters.
|
|
672
|
-
* @template Traits Traits to apply to the operation.
|
|
673
|
-
*/
|
|
674
|
-
op ResourceAction<
|
|
675
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
676
|
-
Parameters extends TypeSpec.Reflection.Model,
|
|
677
|
-
Response extends TypeSpec.Reflection.Model,
|
|
678
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
679
|
-
> is StandardResourceOperations.ResourceAction<Resource, Parameters, Response, Traits>;
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* DEPRECATED: Use `ResourceCollectionAction` from a `ResourceOperations` interface instance.
|
|
683
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
684
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
685
|
-
*
|
|
686
|
-
* Operation signature for an action that applies to a collection of resources.
|
|
687
|
-
* @template Resource The type of the resource.
|
|
688
|
-
* @template Parameters Object describing the request parameters.
|
|
689
|
-
* @template Response Object describing the response parameters.
|
|
690
|
-
* @template Traits Traits to apply to the operation.
|
|
691
|
-
*/
|
|
692
|
-
op ResourceCollectionAction<
|
|
693
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
694
|
-
Parameters extends TypeSpec.Reflection.Model,
|
|
695
|
-
Response extends TypeSpec.Reflection.Model,
|
|
696
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
697
|
-
> is StandardResourceOperations.ResourceCollectionAction<Resource, Parameters, Response, Traits>;
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
* DEPRECATED: Use `LongRunningResourceAction` from a `ResourceOperations` interface instance.
|
|
701
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
702
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
703
|
-
*
|
|
704
|
-
* Long-running operation signature for a resource action.
|
|
705
|
-
* @template Resource The type of the resource.
|
|
706
|
-
* @template Parameters Object describing the request parameters.
|
|
707
|
-
* @template StatusResult Object describing the result of the status operation.
|
|
708
|
-
* @template StatusError Object describing the error of the status operation. If not provided, the default error type is used.
|
|
709
|
-
* @template Traits Traits to apply to the operation.
|
|
710
|
-
*/
|
|
711
|
-
op LongRunningResourceAction<
|
|
712
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
713
|
-
Parameters extends TypeSpec.Reflection.Model,
|
|
714
|
-
StatusResult extends TypeSpec.Reflection.Model,
|
|
715
|
-
StatusError = Foundations.Error,
|
|
716
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
717
|
-
> is StandardResourceOperations.LongRunningResourceAction<
|
|
718
|
-
Resource,
|
|
719
|
-
Parameters,
|
|
720
|
-
StatusResult,
|
|
721
|
-
StatusError,
|
|
722
|
-
Traits
|
|
723
|
-
>;
|
|
724
|
-
|
|
725
|
-
/**
|
|
726
|
-
* DEPRECATED: Use `LongRunningResourceCollectionAction` from a `ResourceOperations` interface instance.
|
|
727
|
-
* This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
|
|
728
|
-
* See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
|
|
729
|
-
*
|
|
730
|
-
* Long-running operation signature for an action that applies to a collection of resources.
|
|
731
|
-
* @template Resource The type of the resource.
|
|
732
|
-
* @template Parameters Object describing the request parameters.
|
|
733
|
-
* @template StatusResult Object describing the result of the status operation.
|
|
734
|
-
* @template StatusError Object describing the error of the status operation. If not provided, the default error type is used.
|
|
735
|
-
* @template Traits Traits to apply to the operation.
|
|
736
|
-
*/
|
|
737
|
-
op LongRunningResourceCollectionAction<
|
|
738
|
-
Resource extends TypeSpec.Reflection.Model,
|
|
739
|
-
Parameters extends TypeSpec.Reflection.Model,
|
|
740
|
-
StatusResult extends TypeSpec.Reflection.Model,
|
|
741
|
-
StatusError = Foundations.Error,
|
|
742
|
-
Traits extends TypeSpec.Reflection.Model = {}
|
|
743
|
-
> is StandardResourceOperations.LongRunningResourceCollectionAction<
|
|
744
|
-
Resource,
|
|
745
|
-
Parameters,
|
|
746
|
-
StatusResult,
|
|
747
|
-
StatusError,
|
|
748
|
-
Traits
|
|
749
|
-
>;
|
|
750
|
-
|
|
751
506
|
// Resource Status Monitoring
|
|
752
507
|
|
|
753
508
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0-dev.0",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Core library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"!dist/test/**"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@typespec/compiler": "~0.
|
|
43
|
-
"@typespec/http": "~0.
|
|
44
|
-
"@typespec/rest": "~0.
|
|
42
|
+
"@typespec/compiler": "~0.56.0 || >=0.57.0-dev <0.57.0",
|
|
43
|
+
"@typespec/http": "~0.56.0 || >=0.57.0-dev <0.57.0",
|
|
44
|
+
"@typespec/rest": "~0.56.0 || >=0.57.0-dev <0.57.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "~18.11.19",
|
|
48
|
-
"@typespec/compiler": "~0.
|
|
49
|
-
"@typespec/http": "~0.
|
|
50
|
-
"@typespec/library-linter": "~0.
|
|
51
|
-
"@typespec/openapi": "~0.
|
|
52
|
-
"@typespec/rest": "~0.
|
|
53
|
-
"@typespec/versioning": "~0.
|
|
48
|
+
"@typespec/compiler": "~0.56.0 || >=0.57.0-dev <0.57.0",
|
|
49
|
+
"@typespec/http": "~0.56.0 || >=0.57.0-dev <0.57.0",
|
|
50
|
+
"@typespec/library-linter": "~0.56.0 || >=0.57.0-dev <0.57.0",
|
|
51
|
+
"@typespec/openapi": "~0.56.0 || >=0.57.0-dev <0.57.0",
|
|
52
|
+
"@typespec/rest": "~0.56.0 || >=0.57.0-dev <0.57.0",
|
|
53
|
+
"@typespec/versioning": "~0.56.0 || >=0.57.0-dev <0.57.0",
|
|
54
54
|
"@vitest/coverage-v8": "^1.5.0",
|
|
55
55
|
"@vitest/ui": "^1.5.0",
|
|
56
56
|
"c8": "^9.1.0",
|