@azure-tools/typespec-azure-resource-manager 0.67.0-dev.1 → 0.67.0-dev.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/README.md +39 -38
- package/dist/generated-defs/Azure.ResourceManager.Private.d.ts +12 -0
- package/dist/generated-defs/Azure.ResourceManager.Private.d.ts.map +1 -1
- package/dist/generated-defs/Azure.ResourceManager.d.ts +3 -2
- package/dist/generated-defs/Azure.ResourceManager.d.ts.map +1 -1
- package/dist/src/private.decorators.d.ts +3 -2
- package/dist/src/private.decorators.d.ts.map +1 -1
- package/dist/src/private.decorators.js +68 -4
- package/dist/src/private.decorators.js.map +1 -1
- package/dist/src/resource.d.ts +16 -3
- package/dist/src/resource.d.ts.map +1 -1
- package/dist/src/resource.js +188 -20
- package/dist/src/resource.js.map +1 -1
- package/dist/src/rules/arm-common-types-version.d.ts.map +1 -1
- package/dist/src/rules/arm-common-types-version.js +1 -0
- package/dist/src/rules/arm-common-types-version.js.map +1 -1
- package/dist/src/rules/arm-custom-resource-no-key.js +1 -1
- package/dist/src/rules/arm-custom-resource-no-key.js.map +1 -1
- package/dist/src/rules/arm-custom-resource-usage-discourage.d.ts.map +1 -1
- package/dist/src/rules/arm-custom-resource-usage-discourage.js +1 -0
- package/dist/src/rules/arm-custom-resource-usage-discourage.js.map +1 -1
- package/dist/src/rules/arm-resource-action-no-segment.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-action-no-segment.js +1 -0
- package/dist/src/rules/arm-resource-action-no-segment.js.map +1 -1
- package/dist/src/rules/arm-resource-duplicate-property.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-duplicate-property.js +1 -0
- package/dist/src/rules/arm-resource-duplicate-property.js.map +1 -1
- package/dist/src/rules/arm-resource-interfaces.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-interfaces.js +1 -0
- package/dist/src/rules/arm-resource-interfaces.js.map +1 -1
- package/dist/src/rules/arm-resource-invalid-envelope-property.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-invalid-envelope-property.js +1 -0
- package/dist/src/rules/arm-resource-invalid-envelope-property.js.map +1 -1
- package/dist/src/rules/arm-resource-invalid-version-format.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-invalid-version-format.js +1 -0
- package/dist/src/rules/arm-resource-invalid-version-format.js.map +1 -1
- package/dist/src/rules/arm-resource-key-invalid-chars.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-key-invalid-chars.js +1 -0
- package/dist/src/rules/arm-resource-key-invalid-chars.js.map +1 -1
- package/dist/src/rules/arm-resource-operation-response.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-operation-response.js +1 -0
- package/dist/src/rules/arm-resource-operation-response.js.map +1 -1
- package/dist/src/rules/arm-resource-patch.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-patch.js +1 -0
- package/dist/src/rules/arm-resource-patch.js.map +1 -1
- package/dist/src/rules/arm-resource-path-invalid-chars.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-path-invalid-chars.js +1 -0
- package/dist/src/rules/arm-resource-path-invalid-chars.js.map +1 -1
- package/dist/src/rules/arm-resource-provisioning-state-rule.d.ts.map +1 -1
- package/dist/src/rules/arm-resource-provisioning-state-rule.js +1 -0
- package/dist/src/rules/arm-resource-provisioning-state-rule.js.map +1 -1
- package/dist/src/rules/beyond-nesting-levels.d.ts.map +1 -1
- package/dist/src/rules/beyond-nesting-levels.js +1 -0
- package/dist/src/rules/beyond-nesting-levels.js.map +1 -1
- package/dist/src/rules/core-operations.d.ts.map +1 -1
- package/dist/src/rules/core-operations.js +1 -0
- package/dist/src/rules/core-operations.js.map +1 -1
- package/dist/src/rules/envelope-properties.d.ts.map +1 -1
- package/dist/src/rules/envelope-properties.js +1 -0
- package/dist/src/rules/envelope-properties.js.map +1 -1
- package/dist/src/rules/improper-subscription-list-operation.d.ts.map +1 -1
- package/dist/src/rules/improper-subscription-list-operation.js +1 -0
- package/dist/src/rules/improper-subscription-list-operation.js.map +1 -1
- package/dist/src/rules/operations-interface-missing.d.ts.map +1 -1
- package/dist/src/rules/operations-interface-missing.js +1 -0
- package/dist/src/rules/operations-interface-missing.js.map +1 -1
- package/dist/src/rules/patch-envelope-properties.d.ts.map +1 -1
- package/dist/src/rules/patch-envelope-properties.js +1 -0
- package/dist/src/rules/patch-envelope-properties.js.map +1 -1
- package/dist/src/rules/resource-name.d.ts.map +1 -1
- package/dist/src/rules/resource-name.js +1 -0
- package/dist/src/rules/resource-name.js.map +1 -1
- package/dist/src/rules/retry-after.d.ts.map +1 -1
- package/dist/src/rules/retry-after.js +1 -0
- package/dist/src/rules/retry-after.js.map +1 -1
- package/dist/src/state.d.ts +1 -0
- package/dist/src/state.d.ts.map +1 -1
- package/dist/src/state.js +1 -0
- package/dist/src/state.js.map +1 -1
- package/lib/decorators.tsp +3 -2
- package/lib/legacy-types/resource.tsp +34 -0
- package/lib/operations.tsp +178 -53
- package/lib/parameters.tsp +40 -4
- package/lib/private.decorators.tsp +12 -0
- package/lib/responses.tsp +4 -5
- package/package.json +3 -3
package/lib/parameters.tsp
CHANGED
|
@@ -131,6 +131,7 @@ model ResourceUriParameter {
|
|
|
131
131
|
* where the resource is based. The default is in a resource group
|
|
132
132
|
* @template Resource The resource to get parameters for
|
|
133
133
|
* @template BaseParameters The parameters representing the base Uri of the resource
|
|
134
|
+
* @template Provider Optional. The provider namespace model for the resource.
|
|
134
135
|
*
|
|
135
136
|
* @example
|
|
136
137
|
* ```typespec
|
|
@@ -141,10 +142,11 @@ model ResourceUriParameter {
|
|
|
141
142
|
*/
|
|
142
143
|
model ResourceInstanceParameters<
|
|
143
144
|
Resource extends {},
|
|
144
|
-
BaseParameters = DefaultBaseParameters<Resource
|
|
145
|
+
BaseParameters = DefaultBaseParameters<Resource>,
|
|
146
|
+
Provider extends {} = ProviderNamespace<Resource>
|
|
145
147
|
> {
|
|
146
148
|
...BaseParameters;
|
|
147
|
-
...
|
|
149
|
+
...Provider;
|
|
148
150
|
...KeysOf<Resource>;
|
|
149
151
|
}
|
|
150
152
|
|
|
@@ -153,13 +155,15 @@ model ResourceInstanceParameters<
|
|
|
153
155
|
* where the list should take place. The default is in a resource group
|
|
154
156
|
* @template Resource The resource to get parameters for
|
|
155
157
|
* @template BaseParameters The parameters representing the base Uri of the resource
|
|
158
|
+
* @template Provider Optional. The provider namespace model for the resource.
|
|
156
159
|
*/
|
|
157
160
|
model ResourceParentParameters<
|
|
158
161
|
Resource extends Foundations.SimpleResource,
|
|
159
|
-
BaseParameters = DefaultBaseParameters<Resource
|
|
162
|
+
BaseParameters = DefaultBaseParameters<Resource>,
|
|
163
|
+
Provider extends {} = ProviderNamespace<Resource>
|
|
160
164
|
> {
|
|
161
165
|
...BaseParameters;
|
|
162
|
-
...
|
|
166
|
+
...Provider;
|
|
163
167
|
...ParentKeysOf<Resource>;
|
|
164
168
|
}
|
|
165
169
|
|
|
@@ -219,6 +223,38 @@ model TenantActionScope {
|
|
|
219
223
|
name: string;
|
|
220
224
|
}
|
|
221
225
|
|
|
226
|
+
/**
|
|
227
|
+
* Scope for operation status endpoints at the tenant level with a location path segment.
|
|
228
|
+
* Use with `GetResourceOperationStatus` to produce:
|
|
229
|
+
* `GET /providers/{providerNamespace}/locations/{location}/operationStatuses/{operationId}`
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```typespec
|
|
233
|
+
* op getStatus is GetResourceOperationStatus<ArmOperationStatus, TenantLocationActionScope>;
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
@armVirtualResource
|
|
237
|
+
@tenantResource
|
|
238
|
+
model TenantLocationActionScope {
|
|
239
|
+
...LocationResourceParameter;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Scope for operation status endpoints at the subscription level with a location path segment.
|
|
244
|
+
* Use with `GetResourceOperationStatus` to produce:
|
|
245
|
+
* `GET /subscriptions/{subscriptionId}/providers/{providerNamespace}/locations/{location}/operationStatuses/{operationId}`
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* ```typespec
|
|
249
|
+
* op getStatus is GetResourceOperationStatus<ArmOperationStatus, SubscriptionLocationActionScope>;
|
|
250
|
+
* ```
|
|
251
|
+
*/
|
|
252
|
+
@armVirtualResource
|
|
253
|
+
@subscriptionResource
|
|
254
|
+
model SubscriptionLocationActionScope {
|
|
255
|
+
...LocationResourceParameter;
|
|
256
|
+
}
|
|
257
|
+
|
|
222
258
|
/**
|
|
223
259
|
* Template used by ArmProviderAction templates. This produces following action route:
|
|
224
260
|
* `/{resourceUri}/providers/Microsoft.SomeRP/someAction`
|
|
@@ -229,3 +229,15 @@ extern dec validateCommonTypesVersionForResource(
|
|
|
229
229
|
version: valueof string,
|
|
230
230
|
resourceName: valueof string
|
|
231
231
|
);
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* This decorator is used to identify a generic Azure Resource Manager resource type
|
|
235
|
+
* that does not require name, key, or segment properties on the model itself.
|
|
236
|
+
* The resource type and path information comes from the operations (e.g. RoutedOperations).
|
|
237
|
+
*
|
|
238
|
+
* It is *not* meant to be used directly by a spec author, it instead
|
|
239
|
+
* gets implicitly applied when the spec author defines a model type in this form:
|
|
240
|
+
*
|
|
241
|
+
* `model MyResource is GenericResource;`
|
|
242
|
+
*/
|
|
243
|
+
extern dec genericResourceInternal(target: Model);
|
package/lib/responses.tsp
CHANGED
|
@@ -136,7 +136,9 @@ model ArmAcceptedLroResponse<
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* Standard Azure Resource Manager operation status response
|
|
139
|
+
* Standard Azure Resource Manager operation status response, used as the response
|
|
140
|
+
* body for `GetResourceOperationStatus`.
|
|
141
|
+
*
|
|
140
142
|
* @template Properties Optional resource-specific properties
|
|
141
143
|
* @template StatusValues The set of allowed values for operation status
|
|
142
144
|
*/
|
|
@@ -153,12 +155,9 @@ model ArmOperationStatus<
|
|
|
153
155
|
status: StatusValues;
|
|
154
156
|
|
|
155
157
|
/** The unique identifier for the operationStatus resource */
|
|
156
|
-
@key
|
|
157
|
-
@path
|
|
158
|
-
@segment("operationStatuses")
|
|
159
158
|
id: string;
|
|
160
159
|
|
|
161
|
-
/** The name of the
|
|
160
|
+
/** The name of the operationStatus resource */
|
|
162
161
|
@visibility(Lifecycle.Read)
|
|
163
162
|
name?: string;
|
|
164
163
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.67.0-dev.
|
|
3
|
+
"version": "0.67.0-dev.11",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"pluralize": "^8.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@azure-tools/typespec-azure-core": "^0.66.
|
|
50
|
+
"@azure-tools/typespec-azure-core": "^0.66.1 || >=0.67.0-dev <0.67.0",
|
|
51
51
|
"@typespec/compiler": "^1.10.0",
|
|
52
52
|
"@typespec/http": "^1.10.0",
|
|
53
53
|
"@typespec/rest": "^0.80.0 || >=0.81.0-dev <0.81.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@typespec/versioning": "^0.80.0 || >=0.81.0-dev <0.81.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@azure-tools/typespec-azure-core": "^0.66.
|
|
58
|
+
"@azure-tools/typespec-azure-core": "^0.66.1 || >=0.67.0-dev <0.67.0",
|
|
59
59
|
"@types/node": "~25.5.0",
|
|
60
60
|
"@types/pluralize": "^0.0.33",
|
|
61
61
|
"@typespec/compiler": "^1.10.0",
|