@azure-tools/typespec-azure-resource-manager 0.31.0-dev.4 → 0.31.0-dev.6
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/{internal.d.ts → private.decorators.d.ts} +29 -9
- package/dist/src/private.decorators.d.ts.map +1 -0
- package/dist/src/private.decorators.js +274 -0
- package/dist/src/private.decorators.js.map +1 -0
- package/dist/src/resource.d.ts +3 -19
- package/dist/src/resource.d.ts.map +1 -1
- package/dist/src/resource.js +6 -150
- package/dist/src/resource.js.map +1 -1
- package/dist/src/rules/core-operations.js +1 -1
- package/dist/src/rules/core-operations.js.map +1 -1
- package/dist/src/rules/operations-interface-missing.js +1 -1
- package/dist/src/rules/operations-interface-missing.js.map +1 -1
- package/lib/arm.foundations.tsp +17 -9
- package/lib/arm.tsp +1 -2
- package/lib/decorators.tsp +7 -38
- package/lib/interfaces.tsp +19 -12
- package/lib/models.tsp +1 -0
- package/lib/operations.tsp +16 -16
- package/lib/parameters.tsp +1 -0
- package/lib/private.decorators.tsp +70 -0
- package/lib/responses.tsp +1 -0
- package/package.json +1 -1
- package/dist/src/internal.d.ts.map +0 -1
- package/dist/src/internal.js +0 -123
- package/dist/src/internal.js.map +0 -1
- package/lib/arm.foundations.decorators.tsp +0 -37
|
@@ -2,8 +2,8 @@ import { getEffectiveModelType, getProperty, isErrorType, SyntaxKind, } from "@t
|
|
|
2
2
|
import { getOperationVerb, isBody, isHeader, isPathParam, isQueryParam, } from "@typespec/http";
|
|
3
3
|
import { createRule } from "@typespec/lint";
|
|
4
4
|
import { getActionDetails } from "@typespec/rest";
|
|
5
|
-
import { isArmOperationsListInterface } from "../internal.js";
|
|
6
5
|
import { reportDiagnostic } from "../lib.js";
|
|
6
|
+
import { isArmOperationsListInterface } from "../private.decorators.js";
|
|
7
7
|
import { getArmResource } from "../resource.js";
|
|
8
8
|
import { getNamespaceName, getSourceModel, isInternalTypeSpec, isTemplatedInterfaceOperation, } from "./utils.js";
|
|
9
9
|
export const coreOperationsRule = createRule({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-operations.js","sourceRoot":"","sources":["../../../src/rules/core-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,WAAW,EAEX,WAAW,EAKX,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,gBAAgB,EAEhB,MAAM,EACN,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"core-operations.js","sourceRoot":"","sources":["../../../src/rules/core-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,WAAW,EAEX,WAAW,EAKX,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,gBAAgB,EAEhB,MAAM,EACN,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,IAAI,EAAE,iBAAiB;IACvB,MAAM,CAAC,EAAE,OAAO,EAAE;QAChB,OAAO;YACL,SAAS,EAAE,CAAC,SAAoB,EAAE,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OAAO,EAAE,QAAQ,CAAC;YAC3B,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC;YAC/B,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC;YAE9B,SAAS;QACX,IAAI,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAC;QACnF,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC/B;IAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAClD,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO;QACxE,OAAO,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;IACzD,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isService } from "@typespec/compiler";
|
|
2
2
|
import { createRule } from "@typespec/lint";
|
|
3
|
-
import { isArmOperationsListInterface } from "../internal.js";
|
|
4
3
|
import { reportDiagnostic } from "../lib.js";
|
|
5
4
|
import { getArmProviderNamespace } from "../namespace.js";
|
|
5
|
+
import { isArmOperationsListInterface } from "../private.decorators.js";
|
|
6
6
|
/**
|
|
7
7
|
* verify that the Arm Operations interface is included.
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations-interface-missing.js","sourceRoot":"","sources":["../../../src/rules/operations-interface-missing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"operations-interface-missing.js","sourceRoot":"","sources":["../../../src/rules/operations-interface-missing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAExE;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,UAAU,CAAC;IACvD,IAAI,EAAE,8BAA8B;IACpC,MAAM,CAAC,EAAE,OAAO,EAAE;QAChB,OAAO;YACL,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE;gBACvB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;oBAClC,OAAO;iBACR;gBAED,MAAM,YAAY,GAAG,uBAAuB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;gBACjE,IAAI,CAAC,YAAY,EAAE;oBACjB,OAAO;iBACR;gBACD,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE;oBAChD,IAAI,4BAA4B,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;wBAC/C,OAAO;qBACR;iBACF;gBACD,gBAAgB,CAAC,OAAO,EAAE;oBACxB,IAAI,EAAE,6BAA6B;oBACnC,MAAM,EAAE;wBACN,SAAS,EAAE,SAAS,CAAC,IAAI;qBAC1B;oBACD,MAAM,EAAE,SAAS;iBAClB,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/lib/arm.foundations.tsp
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
using TypeSpec.Http;
|
|
2
2
|
using OpenAPI;
|
|
3
3
|
using TypeSpec.Versioning;
|
|
4
|
+
using Azure.ResourceManager.Private;
|
|
4
5
|
|
|
5
6
|
namespace Azure.ResourceManager.Foundations;
|
|
6
7
|
|
|
@@ -412,8 +413,10 @@ enum ManagedSystemIdentityType {
|
|
|
412
413
|
*/
|
|
413
414
|
@doc("The updatable properties of the {name}.", TResource)
|
|
414
415
|
@friendlyName("{name}UpdateProperties", TResource)
|
|
415
|
-
model ResourceUpdateModelProperties<
|
|
416
|
-
|
|
416
|
+
model ResourceUpdateModelProperties<
|
|
417
|
+
TResource extends ArmResource,
|
|
418
|
+
TProperties extends TypeSpec.Reflection.Model
|
|
419
|
+
> is OptionalProperties<UpdateableProperties<TProperties>>;
|
|
417
420
|
|
|
418
421
|
/**
|
|
419
422
|
* Defines a model type used to create named resource update models
|
|
@@ -424,8 +427,10 @@ model ResourceUpdateModelProperties<TResource extends ArmResource, TProperties e
|
|
|
424
427
|
@doc("The type used for update operations of the {name}.", TResource)
|
|
425
428
|
@friendlyName("{name}Update", TResource)
|
|
426
429
|
@omitIfEmpty("properties")
|
|
427
|
-
model ResourceUpdateModel<
|
|
428
|
-
|
|
430
|
+
model ResourceUpdateModel<
|
|
431
|
+
TResource extends ArmResource,
|
|
432
|
+
TProperties extends TypeSpec.Reflection.Model
|
|
433
|
+
> is OptionalProperties<UpdateableProperties<OmitProperties<TResource, "Name" | "name">>> {
|
|
429
434
|
@extension("x-ms-client-flatten", true)
|
|
430
435
|
properties?: ResourceUpdateModelProperties<TResource, TProperties>;
|
|
431
436
|
}
|
|
@@ -547,7 +552,10 @@ enum SkuTier {
|
|
|
547
552
|
*/
|
|
548
553
|
@doc("The type used for update operations of the {name}.", TResource)
|
|
549
554
|
@friendlyName("{name}Update", TResource)
|
|
550
|
-
model ProxyResourceUpdateModel<
|
|
555
|
+
model ProxyResourceUpdateModel<
|
|
556
|
+
TResource extends ArmResource,
|
|
557
|
+
TProperties extends TypeSpec.Reflection.Model
|
|
558
|
+
> {
|
|
551
559
|
@extension("x-ms-client-flatten", true)
|
|
552
560
|
properties?: ResourceUpdateModelProperties<TResource, TProperties>;
|
|
553
561
|
}
|
|
@@ -661,10 +669,10 @@ alias DefaultProviderNamespace = {
|
|
|
661
669
|
@TypeSpec.Rest.action("checkNameAvailability")
|
|
662
670
|
@post
|
|
663
671
|
op checkNameAvailability<
|
|
664
|
-
TScopeParameters extends
|
|
665
|
-
TRequest extends
|
|
666
|
-
TResponse extends
|
|
667
|
-
TAdditionalParams extends
|
|
672
|
+
TScopeParameters extends TypeSpec.Reflection.Model,
|
|
673
|
+
TRequest extends TypeSpec.Reflection.Model = Azure.ResourceManager.Foundations.CheckNameAvailabilityRequest,
|
|
674
|
+
TResponse extends TypeSpec.Reflection.Model = CheckNameAvailabilityResponse,
|
|
675
|
+
TAdditionalParams extends TypeSpec.Reflection.Model = {}
|
|
668
676
|
>(
|
|
669
677
|
...ApiVersionParameter,
|
|
670
678
|
...TScopeParameters,
|
package/lib/arm.tsp
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "../dist/src/index.js";
|
|
2
|
-
import "../dist/src/internal.js";
|
|
3
2
|
import "@typespec/openapi";
|
|
4
3
|
import "@typespec/http";
|
|
5
4
|
import "@typespec/rest";
|
|
@@ -8,7 +7,7 @@ import "@azure-tools/typespec-autorest";
|
|
|
8
7
|
import "@azure-tools/typespec-azure-core";
|
|
9
8
|
|
|
10
9
|
import "./arm.foundations.tsp";
|
|
11
|
-
import "./
|
|
10
|
+
import "./private.decorators.tsp";
|
|
12
11
|
import "./models.tsp";
|
|
13
12
|
import "./operations.tsp";
|
|
14
13
|
import "./decorators.tsp";
|
package/lib/decorators.tsp
CHANGED
|
@@ -32,7 +32,7 @@ extern dec armProviderNamespace(target: Namespace, providerNamespace?: string);
|
|
|
32
32
|
*
|
|
33
33
|
* @param keyValue The name of the singleton resource. Default name is "default".
|
|
34
34
|
*/
|
|
35
|
-
extern dec singleton(target:
|
|
35
|
+
extern dec singleton(target: Model, keyValue?: string | "default");
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* `@tenantResource` marks an ARM resource model as a Tenant resource/Root resource/Top-Level resource.
|
|
@@ -42,7 +42,7 @@ extern dec singleton(target: object, keyValue?: string | "default");
|
|
|
42
42
|
*
|
|
43
43
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
44
44
|
*/
|
|
45
|
-
extern dec tenantResource(target:
|
|
45
|
+
extern dec tenantResource(target: Model);
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* `@subscriptionResource` marks an ARM resource model as a subscription resource.
|
|
@@ -52,7 +52,7 @@ extern dec tenantResource(target: object);
|
|
|
52
52
|
*
|
|
53
53
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
54
54
|
*/
|
|
55
|
-
extern dec subscriptionResource(target:
|
|
55
|
+
extern dec subscriptionResource(target: Model);
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* `@locationResource` marks an ARM resource model as a location based resource.
|
|
@@ -62,7 +62,7 @@ extern dec subscriptionResource(target: object);
|
|
|
62
62
|
*
|
|
63
63
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
64
64
|
*/
|
|
65
|
-
extern dec locationResource(target:
|
|
65
|
+
extern dec locationResource(target: Model);
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* `@resourceGroupResource` marks an ARM resource model as a resource group level resource.
|
|
@@ -73,7 +73,7 @@ extern dec locationResource(target: object);
|
|
|
73
73
|
*
|
|
74
74
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
75
75
|
*/
|
|
76
|
-
extern dec resourceGroupResource(target:
|
|
76
|
+
extern dec resourceGroupResource(target: Model);
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* `@extensionResource` marks an ARM resource model as an Extension resource.
|
|
@@ -84,14 +84,14 @@ extern dec resourceGroupResource(target: object);
|
|
|
84
84
|
*
|
|
85
85
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
86
86
|
*/
|
|
87
|
-
extern dec extensionResource(target:
|
|
87
|
+
extern dec extensionResource(target: Model);
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* `@armResourceType` sets the value fo the decorated string
|
|
91
91
|
* property to the type of the ARM resource.
|
|
92
92
|
* @param resource The resource to get the type of
|
|
93
93
|
*/
|
|
94
|
-
extern dec armProviderNameValue(target: Operation |
|
|
94
|
+
extern dec armProviderNameValue(target: Operation | Model);
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* Marks the operation as being a collection action
|
|
@@ -141,21 +141,6 @@ extern dec armResourceDelete(target: Operation, resourceType: Model);
|
|
|
141
141
|
*/
|
|
142
142
|
extern dec armResourceList(target: Operation, resourceType: Model);
|
|
143
143
|
|
|
144
|
-
/**
|
|
145
|
-
* This decorator is used to identify ARM resource types and extract their
|
|
146
|
-
* metadata. It is *not* meant to be used directly by a spec author, it instead
|
|
147
|
-
* gets implicitly applied when the spec author defines a model type in this form:
|
|
148
|
-
*
|
|
149
|
-
* `model Server is TrackedResource<ServerProperties>;`
|
|
150
|
-
*
|
|
151
|
-
* The `TrackedResource<T>` type (and other associated base types) use the `@armResource`
|
|
152
|
-
* decorator, so it also gets applied to the type which absorbs the `TrackedResource<T>`
|
|
153
|
-
* definition by using the `is` keyword.
|
|
154
|
-
*
|
|
155
|
-
* @param properties Arm resource properties
|
|
156
|
-
*/
|
|
157
|
-
extern dec armResourceInternal(target: Model, properties: Model);
|
|
158
|
-
|
|
159
144
|
/**
|
|
160
145
|
* This decorator is used to identify interfaces containing resource operations.
|
|
161
146
|
* When applied, it marks the interface with the `@autoRoute` decorator so that
|
|
@@ -168,19 +153,3 @@ extern dec armResourceInternal(target: Model, properties: Model);
|
|
|
168
153
|
* @param _ DEPRECATED
|
|
169
154
|
*/
|
|
170
155
|
extern dec armResourceOperations(target: Interface, _?: unknown);
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Omit a property in the target model.
|
|
174
|
-
* @internal
|
|
175
|
-
* @param propertyName Name of the property to omit
|
|
176
|
-
*/
|
|
177
|
-
extern dec omitIfEmpty(target: Model, propertyName: string);
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* @param propertyName Name of the property to omit
|
|
181
|
-
*/
|
|
182
|
-
extern dec resourceBaseParametersOf(target: Model, propertyName: Model);
|
|
183
|
-
/**
|
|
184
|
-
* @param values Values
|
|
185
|
-
*/
|
|
186
|
-
extern dec resourceParameterBaseFor(target: ModelProperty, values: unknown[]);
|
package/lib/interfaces.tsp
CHANGED
|
@@ -3,6 +3,7 @@ using TypeSpec.Rest;
|
|
|
3
3
|
using OpenAPI;
|
|
4
4
|
using Autorest;
|
|
5
5
|
using Azure.ResourceManager.Foundations;
|
|
6
|
+
using Azure.ResourceManager.Private;
|
|
6
7
|
|
|
7
8
|
namespace Azure.ResourceManager;
|
|
8
9
|
|
|
@@ -44,7 +45,7 @@ interface Operations {
|
|
|
44
45
|
@deprecated("Use Azure.ResourceManager.TrackedResourceOperations instead")
|
|
45
46
|
interface ResourceOperations<
|
|
46
47
|
TResource extends ArmResource,
|
|
47
|
-
TProperties extends
|
|
48
|
+
TProperties extends TypeSpec.Reflection.Model,
|
|
48
49
|
TBaseParameters = BaseParameters<TResource>
|
|
49
50
|
> extends TrackedResourceOperations<TResource, TProperties, TBaseParameters> {}
|
|
50
51
|
|
|
@@ -61,7 +62,7 @@ interface ResourceOperations<
|
|
|
61
62
|
|
|
62
63
|
interface TrackedResourceOperations<
|
|
63
64
|
TResource extends ArmResource,
|
|
64
|
-
TProperties extends
|
|
65
|
+
TProperties extends TypeSpec.Reflection.Model,
|
|
65
66
|
TBaseParameters = BaseParameters<TResource>
|
|
66
67
|
>
|
|
67
68
|
extends ResourceInstanceOperations<TResource, TProperties, TBaseParameters>,
|
|
@@ -98,7 +99,10 @@ interface ProxyResourceOperations<
|
|
|
98
99
|
* @template TResource the ArmResource that provides these operations
|
|
99
100
|
* @template TProperties RP-specific property bag for the resource
|
|
100
101
|
*/
|
|
101
|
-
interface TenantResourceOperations<
|
|
102
|
+
interface TenantResourceOperations<
|
|
103
|
+
TResource extends ArmResource,
|
|
104
|
+
TProperties extends TypeSpec.Reflection.Model
|
|
105
|
+
>
|
|
102
106
|
extends TenantResourceRead<TResource>,
|
|
103
107
|
TenantResourceCreate<TResource>,
|
|
104
108
|
TenantResourceUpdate<TResource, TProperties>,
|
|
@@ -114,7 +118,7 @@ interface TenantResourceOperations<TResource extends ArmResource, TProperties ex
|
|
|
114
118
|
*/
|
|
115
119
|
interface ResourceInstanceOperations<
|
|
116
120
|
TResource extends ArmResource,
|
|
117
|
-
TProperties extends
|
|
121
|
+
TProperties extends TypeSpec.Reflection.Model,
|
|
118
122
|
TBaseParameters = BaseParameters<TResource>,
|
|
119
123
|
TPatchModel = ResourceUpdateModel<TResource, TProperties>
|
|
120
124
|
>
|
|
@@ -266,7 +270,7 @@ interface ResourceDeleteSync<
|
|
|
266
270
|
@doc("Asynchronous resource update")
|
|
267
271
|
interface ResourceUpdateAsync<
|
|
268
272
|
TResource extends ArmResource,
|
|
269
|
-
TProperties extends
|
|
273
|
+
TProperties extends TypeSpec.Reflection.Model,
|
|
270
274
|
TBaseParameters = BaseParameters<TResource>
|
|
271
275
|
> {
|
|
272
276
|
/**
|
|
@@ -291,7 +295,7 @@ interface ResourceUpdateAsync<
|
|
|
291
295
|
@doc("Synchronous resource update")
|
|
292
296
|
interface ResourceUpdateSync<
|
|
293
297
|
TResource extends ArmResource,
|
|
294
|
-
TProperties extends
|
|
298
|
+
TProperties extends TypeSpec.Reflection.Model,
|
|
295
299
|
TBaseParameters = BaseParameters<TResource>
|
|
296
300
|
> {
|
|
297
301
|
/**
|
|
@@ -314,7 +318,7 @@ interface ResourceUpdateSync<
|
|
|
314
318
|
*/
|
|
315
319
|
interface ExtensionResourceInstanceOperations<
|
|
316
320
|
TResource extends ArmResource,
|
|
317
|
-
TProperties extends
|
|
321
|
+
TProperties extends TypeSpec.Reflection.Model
|
|
318
322
|
>
|
|
319
323
|
extends ExtensionResourceRead<TResource>,
|
|
320
324
|
ExtensionResourceCreate<TResource>,
|
|
@@ -333,7 +337,10 @@ interface ExtensionResourceCollectionOperations<TResource extends ArmResource>
|
|
|
333
337
|
* @template TResource The ArmResource that provides these operations
|
|
334
338
|
* @template TProperties RP-specific property bag for the resource
|
|
335
339
|
*/
|
|
336
|
-
interface ExtensionResourceOperations<
|
|
340
|
+
interface ExtensionResourceOperations<
|
|
341
|
+
TResource extends ArmResource,
|
|
342
|
+
TProperties extends TypeSpec.Reflection.Model
|
|
343
|
+
>
|
|
337
344
|
extends ExtensionResourceInstanceOperations<TResource, TProperties>,
|
|
338
345
|
ExtensionResourceCollectionOperations<TResource> {}
|
|
339
346
|
|
|
@@ -344,7 +351,7 @@ alias ResourceCreate<
|
|
|
344
351
|
|
|
345
352
|
alias ResourceUpdate<
|
|
346
353
|
TResource extends ArmResource,
|
|
347
|
-
TProperties extends
|
|
354
|
+
TProperties extends TypeSpec.Reflection.Model,
|
|
348
355
|
TBaseParameters = BaseParameters<TResource>
|
|
349
356
|
> = ResourceUpdateSync<TResource, TProperties, TBaseParameters>;
|
|
350
357
|
|
|
@@ -355,7 +362,7 @@ alias ResourceDelete<
|
|
|
355
362
|
|
|
356
363
|
alias ProxyResourceUpdate<
|
|
357
364
|
TResource extends ArmResource,
|
|
358
|
-
TProperties extends
|
|
365
|
+
TProperties extends TypeSpec.Reflection.Model
|
|
359
366
|
> = ResourceUpdate<TResource, TProperties>;
|
|
360
367
|
|
|
361
368
|
alias ExtensionResourceRead<TResource extends ArmResource> = ResourceRead<
|
|
@@ -370,7 +377,7 @@ alias ExtensionResourceCreate<TResource extends ArmResource> = ResourceCreate<
|
|
|
370
377
|
|
|
371
378
|
alias ExtensionResourceUpdate<
|
|
372
379
|
TResource extends ArmResource,
|
|
373
|
-
TProperties extends
|
|
380
|
+
TProperties extends TypeSpec.Reflection.Model
|
|
374
381
|
> = ResourceUpdate<TResource, TProperties, ExtensionBaseParameters>;
|
|
375
382
|
|
|
376
383
|
alias ExtensionResourceDelete<TResource extends ArmResource> = ResourceDelete<
|
|
@@ -402,7 +409,7 @@ alias TenantResourceDelete<TResource extends ArmResource> = ResourceDelete<
|
|
|
402
409
|
|
|
403
410
|
alias TenantResourceUpdate<
|
|
404
411
|
TResource extends ArmResource,
|
|
405
|
-
TProperties extends
|
|
412
|
+
TProperties extends TypeSpec.Reflection.Model
|
|
406
413
|
> = ResourceUpdate<TResource, TProperties, TenantBaseParameters>;
|
|
407
414
|
|
|
408
415
|
alias TenantResourceListByParent<TResource extends ArmResource> = ResourceListByParent<
|
package/lib/models.tsp
CHANGED
package/lib/operations.tsp
CHANGED
|
@@ -141,7 +141,7 @@ alias ArmTagsPatchAsync<
|
|
|
141
141
|
*/
|
|
142
142
|
alias ArmResourcePatchAsync<
|
|
143
143
|
TResource extends ArmResource,
|
|
144
|
-
TProperties extends
|
|
144
|
+
TProperties extends TypeSpec.Reflection.Model,
|
|
145
145
|
TBaseParameters = BaseParameters<TResource>
|
|
146
146
|
> = ArmCustomPatchAsync<TResource, ResourceUpdateModel<TResource, TProperties>, TBaseParameters>;
|
|
147
147
|
|
|
@@ -164,7 +164,7 @@ alias ArmResourcePatchAsync<
|
|
|
164
164
|
@patch
|
|
165
165
|
op ArmCustomPatchAsync<
|
|
166
166
|
TResource extends ArmResource,
|
|
167
|
-
TPatchModel extends
|
|
167
|
+
TPatchModel extends TypeSpec.Reflection.Model = TagsUpdateModel<TResource>,
|
|
168
168
|
TBaseParameters = BaseParameters<TResource>
|
|
169
169
|
>(
|
|
170
170
|
...ResourceInstanceParameters<TResource, TBaseParameters>,
|
|
@@ -192,7 +192,7 @@ alias ArmTagsPatchSync<
|
|
|
192
192
|
*/
|
|
193
193
|
alias ArmResourcePatchSync<
|
|
194
194
|
TResource extends ArmResource,
|
|
195
|
-
TProperties extends
|
|
195
|
+
TProperties extends TypeSpec.Reflection.Model,
|
|
196
196
|
TBaseParameters = BaseParameters<TResource>
|
|
197
197
|
> = ArmCustomPatchSync<TResource, ResourceUpdateModel<TResource, TProperties>, TBaseParameters>;
|
|
198
198
|
|
|
@@ -208,7 +208,7 @@ alias ArmResourcePatchSync<
|
|
|
208
208
|
@patch
|
|
209
209
|
op ArmCustomPatchSync<
|
|
210
210
|
TResource extends ArmResource,
|
|
211
|
-
TPatchModel extends
|
|
211
|
+
TPatchModel extends TypeSpec.Reflection.Model = TagsUpdateModel<TResource>,
|
|
212
212
|
TBaseParameters = BaseParameters<TResource>
|
|
213
213
|
>(
|
|
214
214
|
...ResourceInstanceParameters<TResource, TBaseParameters>,
|
|
@@ -278,8 +278,8 @@ op ArmResourceDeleteSync<
|
|
|
278
278
|
@post
|
|
279
279
|
op ArmResourceActionAsync<
|
|
280
280
|
TResource extends ArmResource,
|
|
281
|
-
TRequest extends
|
|
282
|
-
TResponse extends
|
|
281
|
+
TRequest extends TypeSpec.Reflection.Model,
|
|
282
|
+
TResponse extends TypeSpec.Reflection.Model,
|
|
283
283
|
TBaseParameters = BaseParameters<TResource>
|
|
284
284
|
>(
|
|
285
285
|
...ResourceInstanceParameters<TResource, TBaseParameters>,
|
|
@@ -301,8 +301,8 @@ op ArmResourceActionAsync<
|
|
|
301
301
|
@post
|
|
302
302
|
op ArmResourceActionSync<
|
|
303
303
|
TResource extends ArmResource,
|
|
304
|
-
TRequest extends
|
|
305
|
-
TResponse extends
|
|
304
|
+
TRequest extends TypeSpec.Reflection.Model,
|
|
305
|
+
TResponse extends TypeSpec.Reflection.Model,
|
|
306
306
|
TBaseParameters = BaseParameters<TResource>
|
|
307
307
|
>(
|
|
308
308
|
...ResourceInstanceParameters<TResource, TBaseParameters>,
|
|
@@ -330,7 +330,7 @@ op ArmResourceActionSync<
|
|
|
330
330
|
@post
|
|
331
331
|
op ArmResourceActionNoContentAsync<
|
|
332
332
|
TResource extends ArmResource,
|
|
333
|
-
TRequest extends
|
|
333
|
+
TRequest extends TypeSpec.Reflection.Model,
|
|
334
334
|
TBaseParameters = BaseParameters<TResource>
|
|
335
335
|
>(
|
|
336
336
|
...ResourceInstanceParameters<TResource, TBaseParameters>,
|
|
@@ -351,7 +351,7 @@ op ArmResourceActionNoContentAsync<
|
|
|
351
351
|
@post
|
|
352
352
|
op ArmResourceActionNoContentSync<
|
|
353
353
|
TResource extends ArmResource,
|
|
354
|
-
TRequest extends
|
|
354
|
+
TRequest extends TypeSpec.Reflection.Model,
|
|
355
355
|
TBaseParameters = BaseParameters<TResource>
|
|
356
356
|
>(
|
|
357
357
|
...ResourceInstanceParameters<TResource, TBaseParameters>,
|
|
@@ -370,9 +370,9 @@ op ArmResourceActionNoContentSync<
|
|
|
370
370
|
* @template TAdditionalParams A model specifying additiional non-path parameters to the availability request
|
|
371
371
|
*/
|
|
372
372
|
alias checkGlobalNameAvailability<
|
|
373
|
-
TRequest extends
|
|
374
|
-
TResponse extends
|
|
375
|
-
TAdditionalParams extends
|
|
373
|
+
TRequest extends TypeSpec.Reflection.Model = Azure.ResourceManager.Foundations.CheckNameAvailabilityRequest,
|
|
374
|
+
TResponse extends TypeSpec.Reflection.Model = CheckNameAvailabilityResponse,
|
|
375
|
+
TAdditionalParams extends TypeSpec.Reflection.Model = {}
|
|
376
376
|
> = checkNameAvailability<SubscriptionIdParameter, TRequest, TResponse, TAdditionalParams>;
|
|
377
377
|
|
|
378
378
|
/**
|
|
@@ -384,9 +384,9 @@ alias checkGlobalNameAvailability<
|
|
|
384
384
|
* @template TAdditionalParams A model specifying additiional non-path parameters to the availability request
|
|
385
385
|
*/
|
|
386
386
|
alias checkLocalNameAvailability<
|
|
387
|
-
TRequest extends
|
|
388
|
-
TResponse extends
|
|
389
|
-
TAdditionalParams extends
|
|
387
|
+
TRequest extends TypeSpec.Reflection.Model = Azure.ResourceManager.Foundations.CheckNameAvailabilityRequest,
|
|
388
|
+
TResponse extends TypeSpec.Reflection.Model = CheckNameAvailabilityResponse,
|
|
389
|
+
TAdditionalParams extends TypeSpec.Reflection.Model = {}
|
|
390
390
|
> = checkNameAvailability<
|
|
391
391
|
SubscriptionIdParameter & LocationParameter,
|
|
392
392
|
TRequest,
|
package/lib/parameters.tsp
CHANGED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import "../dist/src/private.decorators.js";
|
|
2
|
+
|
|
3
|
+
namespace Azure.ResourceManager.Private;
|
|
4
|
+
|
|
5
|
+
using TypeSpec.Reflection;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Update the ARM provider namespace for a given entity.
|
|
9
|
+
*/
|
|
10
|
+
extern dec armUpdateProviderNamespace(target: Reflection.Operation);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param resource Resource model
|
|
14
|
+
*/
|
|
15
|
+
extern dec assignProviderNameValue(target: ModelProperty, resource: Model);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @param definitionName Definition name
|
|
19
|
+
* @param version Arm Version
|
|
20
|
+
* @param referenceFile Reference file
|
|
21
|
+
*/
|
|
22
|
+
extern dec armCommonDefinition(
|
|
23
|
+
target: Model,
|
|
24
|
+
definitionName?: string,
|
|
25
|
+
version?: string,
|
|
26
|
+
referenceFile?: string
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @param definitionName Definition name
|
|
31
|
+
* @param version Arm Version
|
|
32
|
+
* @param referenceFile Reference file
|
|
33
|
+
*/
|
|
34
|
+
extern dec armCommonParameter(
|
|
35
|
+
target: ModelProperty,
|
|
36
|
+
definitionName?: string,
|
|
37
|
+
version?: string,
|
|
38
|
+
referenceFile?: string
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* This decorator is used to identify ARM resource types and extract their
|
|
43
|
+
* metadata. It is *not* meant to be used directly by a spec author, it instead
|
|
44
|
+
* gets implicitly applied when the spec author defines a model type in this form:
|
|
45
|
+
*
|
|
46
|
+
* `model Server is TrackedResource<ServerProperties>;`
|
|
47
|
+
*
|
|
48
|
+
* The `TrackedResource<T>` type (and other associated base types) use the `@armResource`
|
|
49
|
+
* decorator, so it also gets applied to the type which absorbs the `TrackedResource<T>`
|
|
50
|
+
* definition by using the `is` keyword.
|
|
51
|
+
*
|
|
52
|
+
* @param properties Arm resource properties
|
|
53
|
+
*/
|
|
54
|
+
extern dec armResourceInternal(target: Model, properties: Model);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Omit a property in the target model.
|
|
58
|
+
* @internal
|
|
59
|
+
* @param propertyName Name of the property to omit
|
|
60
|
+
*/
|
|
61
|
+
extern dec omitIfEmpty(target: Model, propertyName: string);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @param propertyName Name of the property to omit
|
|
65
|
+
*/
|
|
66
|
+
extern dec resourceBaseParametersOf(target: Model, propertyName: Model);
|
|
67
|
+
/**
|
|
68
|
+
* @param values Values
|
|
69
|
+
*/
|
|
70
|
+
extern dec resourceParameterBaseFor(target: ModelProperty, values: unknown[]);
|
package/lib/responses.tsp
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.31.0-dev.
|
|
3
|
+
"version": "0.31.0-dev.6",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/internal.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,sCAAsC,CAAC;AAG7D,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,OAAO,EAER,MAAM,oBAAoB,CAAC;AAS5B;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,cAAc,CAAC,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACrB,IAAI,CAiBN;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,aAAa,CAAC,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACrB,IAAI,CAiBN;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,KAAK,GAClB,IAAI,CAON;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,QAwBvF;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAWvF"}
|