@azure-tools/typespec-azure-resource-manager 0.34.0-dev.2 → 0.34.0-dev.4

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.
Files changed (133) hide show
  1. package/dist/src/index.d.ts +1 -1
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +1 -1
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/lib.d.ts +89 -516
  6. package/dist/src/lib.d.ts.map +1 -1
  7. package/dist/src/lib.js +78 -171
  8. package/dist/src/lib.js.map +1 -1
  9. package/dist/src/namespace.d.ts.map +1 -1
  10. package/dist/src/namespace.js +15 -15
  11. package/dist/src/namespace.js.map +1 -1
  12. package/dist/src/operations.d.ts.map +1 -1
  13. package/dist/src/operations.js +6 -7
  14. package/dist/src/operations.js.map +1 -1
  15. package/dist/src/private.decorators.d.ts.map +1 -1
  16. package/dist/src/private.decorators.js +7 -8
  17. package/dist/src/private.decorators.js.map +1 -1
  18. package/dist/src/resource.d.ts.map +1 -1
  19. package/dist/src/resource.js +12 -12
  20. package/dist/src/resource.js.map +1 -1
  21. package/dist/src/rules/arm-resource-action-no-segment.d.ts +3 -1
  22. package/dist/src/rules/arm-resource-action-no-segment.d.ts.map +1 -1
  23. package/dist/src/rules/arm-resource-action-no-segment.js +9 -6
  24. package/dist/src/rules/arm-resource-action-no-segment.js.map +1 -1
  25. package/dist/src/rules/arm-resource-duplicate-property.d.ts +4 -0
  26. package/dist/src/rules/arm-resource-duplicate-property.d.ts.map +1 -0
  27. package/dist/src/rules/arm-resource-duplicate-property.js +43 -0
  28. package/dist/src/rules/arm-resource-duplicate-property.js.map +1 -0
  29. package/dist/src/rules/arm-resource-interfaces.d.ts +4 -0
  30. package/dist/src/rules/arm-resource-interfaces.d.ts.map +1 -0
  31. package/dist/src/rules/arm-resource-interfaces.js +26 -0
  32. package/dist/src/rules/arm-resource-interfaces.js.map +1 -0
  33. package/dist/src/rules/arm-resource-invalid-action-verb.d.ts +4 -0
  34. package/dist/src/rules/arm-resource-invalid-action-verb.d.ts.map +1 -0
  35. package/dist/src/rules/arm-resource-invalid-action-verb.js +28 -0
  36. package/dist/src/rules/arm-resource-invalid-action-verb.js.map +1 -0
  37. package/dist/src/rules/arm-resource-invalid-envelope-property.d.ts +4 -0
  38. package/dist/src/rules/arm-resource-invalid-envelope-property.d.ts.map +1 -0
  39. package/dist/src/rules/{arm-resource-properties.js → arm-resource-invalid-envelope-property.js} +13 -23
  40. package/dist/src/rules/arm-resource-invalid-envelope-property.js.map +1 -0
  41. package/dist/src/rules/arm-resource-invalid-version-format.d.ts +4 -1
  42. package/dist/src/rules/arm-resource-invalid-version-format.d.ts.map +1 -1
  43. package/dist/src/rules/arm-resource-invalid-version-format.js +12 -9
  44. package/dist/src/rules/arm-resource-invalid-version-format.js.map +1 -1
  45. package/dist/src/rules/arm-resource-key-invalid-chars.d.ts +4 -0
  46. package/dist/src/rules/arm-resource-key-invalid-chars.d.ts.map +1 -0
  47. package/dist/src/rules/arm-resource-key-invalid-chars.js +30 -0
  48. package/dist/src/rules/arm-resource-key-invalid-chars.js.map +1 -0
  49. package/dist/src/rules/arm-resource-operation-response.d.ts +4 -0
  50. package/dist/src/rules/arm-resource-operation-response.d.ts.map +1 -0
  51. package/dist/src/rules/{arm-resource-operations.js → arm-resource-operation-response.js} +24 -22
  52. package/dist/src/rules/arm-resource-operation-response.js.map +1 -0
  53. package/dist/src/rules/arm-resource-patch.d.ts +6 -0
  54. package/dist/src/rules/arm-resource-patch.d.ts.map +1 -0
  55. package/dist/src/rules/arm-resource-patch.js +108 -0
  56. package/dist/src/rules/arm-resource-patch.js.map +1 -0
  57. package/dist/src/rules/arm-resource-path-invalid-chars.d.ts +4 -0
  58. package/dist/src/rules/arm-resource-path-invalid-chars.d.ts.map +1 -0
  59. package/dist/src/rules/arm-resource-path-invalid-chars.js +37 -0
  60. package/dist/src/rules/arm-resource-path-invalid-chars.js.map +1 -0
  61. package/dist/src/rules/arm-resource-provisioning-state-rule.d.ts +4 -1
  62. package/dist/src/rules/arm-resource-provisioning-state-rule.d.ts.map +1 -1
  63. package/dist/src/rules/arm-resource-provisioning-state-rule.js +13 -11
  64. package/dist/src/rules/arm-resource-provisioning-state-rule.js.map +1 -1
  65. package/dist/src/rules/beyond-nesting-levels.d.ts +3 -1
  66. package/dist/src/rules/beyond-nesting-levels.d.ts.map +1 -1
  67. package/dist/src/rules/beyond-nesting-levels.js +10 -7
  68. package/dist/src/rules/beyond-nesting-levels.js.map +1 -1
  69. package/dist/src/rules/core-operations.d.ts +5 -1
  70. package/dist/src/rules/core-operations.d.ts.map +1 -1
  71. package/dist/src/rules/core-operations.js +19 -121
  72. package/dist/src/rules/core-operations.js.map +1 -1
  73. package/dist/src/rules/delete-operation.d.ts +3 -1
  74. package/dist/src/rules/delete-operation.d.ts.map +1 -1
  75. package/dist/src/rules/delete-operation.js +10 -7
  76. package/dist/src/rules/delete-operation.js.map +1 -1
  77. package/dist/src/rules/envelope-properties.d.ts +3 -1
  78. package/dist/src/rules/envelope-properties.d.ts.map +1 -1
  79. package/dist/src/rules/envelope-properties.js +12 -31
  80. package/dist/src/rules/envelope-properties.js.map +1 -1
  81. package/dist/src/rules/list-operation.d.ts +3 -1
  82. package/dist/src/rules/list-operation.d.ts.map +1 -1
  83. package/dist/src/rules/list-operation.js +9 -6
  84. package/dist/src/rules/list-operation.js.map +1 -1
  85. package/dist/src/rules/no-response-body.d.ts +3 -1
  86. package/dist/src/rules/no-response-body.d.ts.map +1 -1
  87. package/dist/src/rules/no-response-body.js +10 -7
  88. package/dist/src/rules/no-response-body.js.map +1 -1
  89. package/dist/src/rules/operations-interface-missing.d.ts +3 -1
  90. package/dist/src/rules/operations-interface-missing.d.ts.map +1 -1
  91. package/dist/src/rules/operations-interface-missing.js +12 -10
  92. package/dist/src/rules/operations-interface-missing.js.map +1 -1
  93. package/dist/src/rules/patch-envelope-properties.d.ts +4 -0
  94. package/dist/src/rules/patch-envelope-properties.d.ts.map +1 -0
  95. package/dist/src/rules/patch-envelope-properties.js +44 -0
  96. package/dist/src/rules/patch-envelope-properties.js.map +1 -0
  97. package/dist/src/rules/resource-name.d.ts +4 -1
  98. package/dist/src/rules/resource-name.d.ts.map +1 -1
  99. package/dist/src/rules/resource-name.js +14 -11
  100. package/dist/src/rules/resource-name.js.map +1 -1
  101. package/dist/src/rules/retry-after.d.ts +3 -1
  102. package/dist/src/rules/retry-after.d.ts.map +1 -1
  103. package/dist/src/rules/retry-after.js +10 -7
  104. package/dist/src/rules/retry-after.js.map +1 -1
  105. package/dist/src/rules/unsupported-types.d.ts +3 -1
  106. package/dist/src/rules/unsupported-types.d.ts.map +1 -1
  107. package/dist/src/rules/unsupported-types.js +9 -6
  108. package/dist/src/rules/unsupported-types.js.map +1 -1
  109. package/dist/src/rules/utils.d.ts +3 -1
  110. package/dist/src/rules/utils.d.ts.map +1 -1
  111. package/dist/src/rules/utils.js +18 -0
  112. package/dist/src/rules/utils.js.map +1 -1
  113. package/dist/src/state.d.ts +13 -0
  114. package/dist/src/state.d.ts.map +1 -0
  115. package/dist/src/state.js +20 -0
  116. package/dist/src/state.js.map +1 -0
  117. package/lib/arm.tsp +1 -0
  118. package/lib/private-links.tsp +137 -0
  119. package/package.json +2 -4
  120. package/dist/src/linter.d.ts +0 -3
  121. package/dist/src/linter.d.ts.map +0 -1
  122. package/dist/src/linter.js +0 -42
  123. package/dist/src/linter.js.map +0 -1
  124. package/dist/src/rules/arm-resource-invalid-chars.d.ts +0 -2
  125. package/dist/src/rules/arm-resource-invalid-chars.d.ts.map +0 -1
  126. package/dist/src/rules/arm-resource-invalid-chars.js +0 -61
  127. package/dist/src/rules/arm-resource-invalid-chars.js.map +0 -1
  128. package/dist/src/rules/arm-resource-operations.d.ts +0 -2
  129. package/dist/src/rules/arm-resource-operations.d.ts.map +0 -1
  130. package/dist/src/rules/arm-resource-operations.js.map +0 -1
  131. package/dist/src/rules/arm-resource-properties.d.ts +0 -2
  132. package/dist/src/rules/arm-resource-properties.d.ts.map +0 -1
  133. package/dist/src/rules/arm-resource-properties.js.map +0 -1
package/dist/src/lib.d.ts CHANGED
@@ -1,615 +1,188 @@
1
- export declare const libDef: {
2
- readonly name: "@azure-tools/typespec-azure-resource-manager";
3
- readonly diagnostics: {
4
- readonly "single-arm-provider": {
5
- readonly severity: "error";
6
- readonly messages: {
7
- readonly default: "Only one @armProviderNamespace can be declared in a typespec spec at once.";
8
- };
9
- };
10
- readonly "decorator-param-wrong-type": {
11
- readonly severity: "error";
12
- readonly messages: {
13
- readonly armUpdateProviderNamespace: "The parameter to @armUpdateProviderNamespace must be an operation with a 'provider' parameter.";
14
- };
15
- };
16
- readonly "missing-operations-endpoint": {
17
- readonly severity: "warning";
18
- readonly messages: {
19
- readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
20
- };
21
- };
22
- readonly "arm-resource-invalid-version-format": {
23
- readonly severity: "warning";
24
- readonly messages: {
25
- readonly invalidType: import("@typespec/compiler").CallableMessage<[]>;
26
- readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
27
- };
28
- };
29
- readonly "arm-resource-name-invalid-chars": {
30
- readonly severity: "warning";
31
- readonly messages: {
32
- readonly default: "Arm resource name must contain only alphanumeric characters.";
33
- };
34
- };
35
- readonly "arm-resource-key-invalid-chars": {
36
- readonly severity: "warning";
37
- readonly messages: {
38
- readonly default: import("@typespec/compiler").CallableMessage<["key"]>;
39
- };
40
- };
41
- readonly "arm-resource-invalid-patch-model": {
42
- readonly severity: "warning";
43
- readonly messages: {
44
- readonly default: "The request body of a PATCH must be a model with a subset of resource properties";
45
- };
46
- };
47
- readonly "arm-resource-path-segment-invalid-chars": {
48
- readonly severity: "warning";
49
- readonly messages: {
50
- readonly default: import("@typespec/compiler").CallableMessage<["segment"]>;
51
- };
52
- };
53
- readonly "arm-resource-invalid-envelope-property": {
54
- readonly severity: "warning";
55
- readonly messages: {
56
- readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
57
- };
58
- };
59
- readonly "arm-resource-duplicate-property": {
60
- readonly severity: "warning";
61
- readonly messages: {
62
- readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
63
- };
64
- };
65
- readonly "arm-resource-provisioning-state": {
66
- readonly severity: "warning";
67
- readonly messages: {
68
- readonly default: "The RP-specific property model in the 'properties' property of this resource must contain a 'provisioningState property. The property type should be an enum, and it must specify known state values 'Succeeded', 'Failed', and 'Canceled'.";
69
- };
70
- };
71
- readonly "arm-resource-provisioning-state-values": {
72
- readonly severity: "warning";
73
- readonly messages: {
74
- readonly default: import("@typespec/compiler").CallableMessage<["missingValues"]>;
75
- };
76
- };
77
- readonly "arm-resource-patch-missing-tags": {
78
- readonly severity: "warning";
79
- readonly messages: {
80
- readonly default: "Resource PATCH must contain the 'tags' property.";
81
- };
82
- };
83
- readonly "arm-resource-operation-missing-decorator": {
84
- readonly severity: "warning";
85
- readonly messages: {
86
- readonly default: import("@typespec/compiler").CallableMessage<["verb", "decorator"]>;
87
- };
88
- };
89
- readonly "arm-resource-interface-requires-decorator": {
90
- readonly severity: "warning";
91
- readonly messages: {
92
- readonly default: "Each resource interface must have an @armResourceOperations decorator.";
93
- };
94
- };
95
- readonly "arm-resource-circular-ancestry": {
96
- readonly severity: "warning";
97
- readonly messages: {
98
- readonly default: "There is a loop in the ancestry of this resource. Please ensure that the `@parentResource` decorator contains the correct parent resource, and that parentage contains no cycles.";
99
- };
100
- };
101
- readonly "arm-resource-duplicate-base-parameter": {
102
- readonly severity: "warning";
103
- readonly messages: {
104
- readonly default: "Only one base parameter type is allowed per resource. Each resource may have only one of `@parentResource`, `@resourceGroupResource`, `@tenantResource`, `@locationResource`, or `@subscriptionResource` decorators.";
105
- };
106
- };
107
- readonly "arm-resource-invalid-action-verb": {
108
- readonly severity: "warning";
109
- readonly messages: {
110
- readonly default: "Actions must be HTTP Post operations.";
111
- };
112
- };
113
- readonly "arm-resource-action-no-segment": {
114
- readonly severity: "warning";
115
- readonly messages: {
116
- readonly default: "`@armResourceAction` should not be used with `@segment`. Instead, use `@action(...)` if you need to rename the action, or omit.";
117
- };
118
- };
119
- readonly "arm-resource-patch-model-superset": {
120
- readonly severity: "warning";
121
- readonly messages: {
122
- readonly default: import("@typespec/compiler").CallableMessage<["name", "resourceModel"]>;
123
- };
124
- };
125
- readonly "arm-resource-operation-missing-api-version": {
126
- readonly severity: "warning";
127
- readonly messages: {
128
- readonly default: "All Resource operations must use an api-version parameter. Please include Azure.ResourceManager.ApiVersionParameter in the operation parameter list using the spread (...ApiVersionParameter) operator, or using one of the common resource parameter models.";
129
- };
130
- };
131
- readonly "arm-resource-operation-outside-interface": {
132
- readonly severity: "warning";
133
- readonly messages: {
134
- readonly default: "All operations must be inside an interface declaration.";
135
- };
136
- };
137
- readonly "arm-resource-operation-response": {
138
- readonly severity: "error";
139
- readonly messages: {
140
- readonly default: "[RPC 008]: PUT, GET, PATCH & LIST must return the same resource schema.";
141
- };
142
- };
143
- readonly "arm-resource-missing-name-property": {
144
- readonly severity: "error";
145
- readonly messages: {
146
- readonly default: "Resource types must include a string property called 'name'.";
147
- };
148
- };
149
- readonly "arm-resource-missing-name-key-decorator": {
150
- readonly severity: "error";
151
- readonly messages: {
152
- readonly default: "Resource type 'name' property must have a @key decorator which defines its key name.";
153
- };
154
- };
155
- readonly "arm-resource-missing-name-segment-decorator": {
156
- readonly severity: "error";
157
- readonly messages: {
158
- readonly default: "Resource type 'name' property must have a @segment decorator which defines its path fragment.";
159
- };
160
- };
161
- readonly "arm-resource-missing-arm-namespace": {
162
- readonly severity: "error";
163
- readonly messages: {
164
- readonly default: "The @armProviderNamespace decorator must be used to define the ARM namespace of the service. This is best applied to the file-level namespace.";
165
- };
166
- };
167
- readonly "arm-resource-invalid-base-type": {
168
- readonly severity: "error";
169
- readonly messages: {
170
- readonly default: "The @armResourceInternal decorator can only be used on a type that ultimately extends TrackedResource, ProxyResource, or ExtensionResource.";
171
- };
172
- };
173
- readonly "arm-resource-missing": {
174
- readonly severity: "error";
175
- readonly messages: {
176
- readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
177
- };
178
- };
179
- readonly "decorator-in-namespace": {
180
- readonly severity: "error";
181
- readonly messages: {
182
- readonly default: import("@typespec/compiler").CallableMessage<["decoratorName"]>;
183
- };
184
- };
185
- readonly "parent-type": {
186
- readonly severity: "error";
187
- readonly messages: {
188
- readonly notResourceType: import("@typespec/compiler").CallableMessage<["parent", "type"]>;
189
- };
190
- };
191
- readonly "unsupported-type": {
192
- readonly severity: "warning";
193
- readonly messages: {
194
- readonly default: import("@typespec/compiler").CallableMessage<["typeName"]>;
195
- };
196
- };
197
- readonly "resource-name": {
198
- readonly severity: "warning";
199
- readonly messages: {
200
- readonly default: "The resource 'name' field should be marked with 'read' visibility and an @path decorator.";
201
- };
202
- };
203
- readonly "no-response-body": {
204
- readonly severity: "warning";
205
- readonly messages: {
206
- readonly default: "The body of 202 response should be empty.";
207
- };
208
- };
209
- readonly "beyond-nesting-levels": {
210
- readonly severity: "warning";
211
- readonly messages: {
212
- readonly default: "Tracked Resources must use 3 or fewer levels of nesting.";
213
- };
214
- };
215
- readonly "no-resource-delete-operation": {
216
- readonly severity: "warning";
217
- readonly messages: {
218
- readonly default: "The resource must have a delete operation.";
219
- };
220
- };
221
- readonly "patch-envelope": {
222
- readonly severity: "warning";
223
- readonly messages: {
224
- readonly default: import("@typespec/compiler").CallableMessage<["resourceName", "propertyName"]>;
225
- };
226
- };
227
- readonly "empty-updateable-properties": {
228
- readonly severity: "warning";
229
- readonly messages: {
230
- readonly default: "The RP-specific properties of the Resource (as defined in the 'properties' property) should have at least one updateable property. Properties are updateable if they do not have a '@visibility' decorator, or if they include 'update' in the '@visibility' decorator arguments.";
231
- };
232
- };
233
- readonly "retry-after": {
234
- readonly severity: "warning";
235
- readonly messages: {
236
- readonly default: "For long-running operations, the Retry-After header indicates how long the client should wait before polling the operation status, please add this header to the 201 or 202 response for this operation.";
237
- };
238
- };
239
- readonly "improper-subscription-list-operation": {
240
- readonly severity: "warning";
241
- readonly messages: {
242
- readonly default: "Tenant and Extension resources should not define a list by subscription operation.";
243
- };
244
- };
245
- };
246
- };
247
1
  export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
248
2
  "single-arm-provider": {
249
- readonly default: "Only one @armProviderNamespace can be declared in a typespec spec at once.";
3
+ default: string;
250
4
  };
251
5
  "decorator-param-wrong-type": {
252
- readonly armUpdateProviderNamespace: "The parameter to @armUpdateProviderNamespace must be an operation with a 'provider' parameter.";
253
- };
254
- "missing-operations-endpoint": {
255
- readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
256
- };
257
- "arm-resource-invalid-version-format": {
258
- readonly invalidType: import("@typespec/compiler").CallableMessage<[]>;
259
- readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
260
- };
261
- "arm-resource-name-invalid-chars": {
262
- readonly default: "Arm resource name must contain only alphanumeric characters.";
263
- };
264
- "arm-resource-key-invalid-chars": {
265
- readonly default: import("@typespec/compiler").CallableMessage<["key"]>;
266
- };
267
- "arm-resource-invalid-patch-model": {
268
- readonly default: "The request body of a PATCH must be a model with a subset of resource properties";
269
- };
270
- "arm-resource-path-segment-invalid-chars": {
271
- readonly default: import("@typespec/compiler").CallableMessage<["segment"]>;
272
- };
273
- "arm-resource-invalid-envelope-property": {
274
- readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
275
- };
276
- "arm-resource-duplicate-property": {
277
- readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
278
- };
279
- "arm-resource-provisioning-state": {
280
- readonly default: "The RP-specific property model in the 'properties' property of this resource must contain a 'provisioningState property. The property type should be an enum, and it must specify known state values 'Succeeded', 'Failed', and 'Canceled'.";
281
- };
282
- "arm-resource-provisioning-state-values": {
283
- readonly default: import("@typespec/compiler").CallableMessage<["missingValues"]>;
284
- };
285
- "arm-resource-patch-missing-tags": {
286
- readonly default: "Resource PATCH must contain the 'tags' property.";
287
- };
288
- "arm-resource-operation-missing-decorator": {
289
- readonly default: import("@typespec/compiler").CallableMessage<["verb", "decorator"]>;
290
- };
291
- "arm-resource-interface-requires-decorator": {
292
- readonly default: "Each resource interface must have an @armResourceOperations decorator.";
6
+ armUpdateProviderNamespace: string;
293
7
  };
294
8
  "arm-resource-circular-ancestry": {
295
- readonly default: "There is a loop in the ancestry of this resource. Please ensure that the `@parentResource` decorator contains the correct parent resource, and that parentage contains no cycles.";
9
+ default: string;
296
10
  };
297
11
  "arm-resource-duplicate-base-parameter": {
298
- readonly default: "Only one base parameter type is allowed per resource. Each resource may have only one of `@parentResource`, `@resourceGroupResource`, `@tenantResource`, `@locationResource`, or `@subscriptionResource` decorators.";
299
- };
300
- "arm-resource-invalid-action-verb": {
301
- readonly default: "Actions must be HTTP Post operations.";
302
- };
303
- "arm-resource-action-no-segment": {
304
- readonly default: "`@armResourceAction` should not be used with `@segment`. Instead, use `@action(...)` if you need to rename the action, or omit.";
305
- };
306
- "arm-resource-patch-model-superset": {
307
- readonly default: import("@typespec/compiler").CallableMessage<["name", "resourceModel"]>;
308
- };
309
- "arm-resource-operation-missing-api-version": {
310
- readonly default: "All Resource operations must use an api-version parameter. Please include Azure.ResourceManager.ApiVersionParameter in the operation parameter list using the spread (...ApiVersionParameter) operator, or using one of the common resource parameter models.";
311
- };
312
- "arm-resource-operation-outside-interface": {
313
- readonly default: "All operations must be inside an interface declaration.";
314
- };
315
- "arm-resource-operation-response": {
316
- readonly default: "[RPC 008]: PUT, GET, PATCH & LIST must return the same resource schema.";
12
+ default: string;
317
13
  };
318
14
  "arm-resource-missing-name-property": {
319
- readonly default: "Resource types must include a string property called 'name'.";
15
+ default: string;
320
16
  };
321
17
  "arm-resource-missing-name-key-decorator": {
322
- readonly default: "Resource type 'name' property must have a @key decorator which defines its key name.";
18
+ default: string;
323
19
  };
324
20
  "arm-resource-missing-name-segment-decorator": {
325
- readonly default: "Resource type 'name' property must have a @segment decorator which defines its path fragment.";
21
+ default: string;
326
22
  };
327
23
  "arm-resource-missing-arm-namespace": {
328
- readonly default: "The @armProviderNamespace decorator must be used to define the ARM namespace of the service. This is best applied to the file-level namespace.";
24
+ default: string;
329
25
  };
330
26
  "arm-resource-invalid-base-type": {
331
- readonly default: "The @armResourceInternal decorator can only be used on a type that ultimately extends TrackedResource, ProxyResource, or ExtensionResource.";
27
+ default: string;
332
28
  };
333
29
  "arm-resource-missing": {
334
- readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
30
+ default: import("@typespec/compiler").CallableMessage<[string]>;
335
31
  };
336
32
  "decorator-in-namespace": {
337
- readonly default: import("@typespec/compiler").CallableMessage<["decoratorName"]>;
33
+ default: import("@typespec/compiler").CallableMessage<[string]>;
338
34
  };
339
35
  "parent-type": {
340
- readonly notResourceType: import("@typespec/compiler").CallableMessage<["parent", "type"]>;
341
- };
342
- "unsupported-type": {
343
- readonly default: import("@typespec/compiler").CallableMessage<["typeName"]>;
344
- };
345
- "resource-name": {
346
- readonly default: "The resource 'name' field should be marked with 'read' visibility and an @path decorator.";
347
- };
348
- "no-response-body": {
349
- readonly default: "The body of 202 response should be empty.";
350
- };
351
- "beyond-nesting-levels": {
352
- readonly default: "Tracked Resources must use 3 or fewer levels of nesting.";
353
- };
354
- "no-resource-delete-operation": {
355
- readonly default: "The resource must have a delete operation.";
356
- };
357
- "patch-envelope": {
358
- readonly default: import("@typespec/compiler").CallableMessage<["resourceName", "propertyName"]>;
359
- };
360
- "empty-updateable-properties": {
361
- readonly default: "The RP-specific properties of the Resource (as defined in the 'properties' property) should have at least one updateable property. Properties are updateable if they do not have a '@visibility' decorator, or if they include 'update' in the '@visibility' decorator arguments.";
362
- };
363
- "retry-after": {
364
- readonly default: "For long-running operations, the Retry-After header indicates how long the client should wait before polling the operation status, please add this header to the 201 or 202 response for this operation.";
365
- };
366
- "improper-subscription-list-operation": {
367
- readonly default: "Tenant and Extension resources should not define a list by subscription operation.";
36
+ notResourceType: import("@typespec/compiler").CallableMessage<[string, string]>;
368
37
  };
369
38
  }, Record<string, any>>;
370
- export declare const reportDiagnostic: <C extends "retry-after" | "single-arm-provider" | "decorator-param-wrong-type" | "missing-operations-endpoint" | "arm-resource-invalid-version-format" | "arm-resource-name-invalid-chars" | "arm-resource-key-invalid-chars" | "arm-resource-invalid-patch-model" | "arm-resource-path-segment-invalid-chars" | "arm-resource-invalid-envelope-property" | "arm-resource-duplicate-property" | "arm-resource-provisioning-state" | "arm-resource-provisioning-state-values" | "arm-resource-patch-missing-tags" | "arm-resource-operation-missing-decorator" | "arm-resource-interface-requires-decorator" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-invalid-action-verb" | "arm-resource-action-no-segment" | "arm-resource-patch-model-superset" | "arm-resource-operation-missing-api-version" | "arm-resource-operation-outside-interface" | "arm-resource-operation-response" | "arm-resource-missing-name-property" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-segment-decorator" | "arm-resource-missing-arm-namespace" | "arm-resource-invalid-base-type" | "arm-resource-missing" | "decorator-in-namespace" | "parent-type" | "unsupported-type" | "resource-name" | "no-response-body" | "beyond-nesting-levels" | "no-resource-delete-operation" | "patch-envelope" | "empty-updateable-properties" | "improper-subscription-list-operation", M extends keyof {
39
+ export declare const reportDiagnostic: <C extends "single-arm-provider" | "decorator-param-wrong-type" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-missing-name-property" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-segment-decorator" | "arm-resource-missing-arm-namespace" | "arm-resource-invalid-base-type" | "arm-resource-missing" | "decorator-in-namespace" | "parent-type", M extends keyof {
371
40
  "single-arm-provider": {
372
- readonly default: "Only one @armProviderNamespace can be declared in a typespec spec at once.";
41
+ default: string;
373
42
  };
374
43
  "decorator-param-wrong-type": {
375
- readonly armUpdateProviderNamespace: "The parameter to @armUpdateProviderNamespace must be an operation with a 'provider' parameter.";
44
+ armUpdateProviderNamespace: string;
376
45
  };
377
- "missing-operations-endpoint": {
378
- readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
379
- };
380
- "arm-resource-invalid-version-format": {
381
- readonly invalidType: import("@typespec/compiler").CallableMessage<[]>;
382
- readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
46
+ "arm-resource-circular-ancestry": {
47
+ default: string;
383
48
  };
384
- "arm-resource-name-invalid-chars": {
385
- readonly default: "Arm resource name must contain only alphanumeric characters.";
49
+ "arm-resource-duplicate-base-parameter": {
50
+ default: string;
386
51
  };
387
- "arm-resource-key-invalid-chars": {
388
- readonly default: import("@typespec/compiler").CallableMessage<["key"]>;
52
+ "arm-resource-missing-name-property": {
53
+ default: string;
389
54
  };
390
- "arm-resource-invalid-patch-model": {
391
- readonly default: "The request body of a PATCH must be a model with a subset of resource properties";
55
+ "arm-resource-missing-name-key-decorator": {
56
+ default: string;
392
57
  };
393
- "arm-resource-path-segment-invalid-chars": {
394
- readonly default: import("@typespec/compiler").CallableMessage<["segment"]>;
58
+ "arm-resource-missing-name-segment-decorator": {
59
+ default: string;
395
60
  };
396
- "arm-resource-invalid-envelope-property": {
397
- readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
61
+ "arm-resource-missing-arm-namespace": {
62
+ default: string;
398
63
  };
399
- "arm-resource-duplicate-property": {
400
- readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
64
+ "arm-resource-invalid-base-type": {
65
+ default: string;
401
66
  };
402
- "arm-resource-provisioning-state": {
403
- readonly default: "The RP-specific property model in the 'properties' property of this resource must contain a 'provisioningState property. The property type should be an enum, and it must specify known state values 'Succeeded', 'Failed', and 'Canceled'.";
67
+ "arm-resource-missing": {
68
+ default: import("@typespec/compiler").CallableMessage<[string]>;
404
69
  };
405
- "arm-resource-provisioning-state-values": {
406
- readonly default: import("@typespec/compiler").CallableMessage<["missingValues"]>;
70
+ "decorator-in-namespace": {
71
+ default: import("@typespec/compiler").CallableMessage<[string]>;
407
72
  };
408
- "arm-resource-patch-missing-tags": {
409
- readonly default: "Resource PATCH must contain the 'tags' property.";
73
+ "parent-type": {
74
+ notResourceType: import("@typespec/compiler").CallableMessage<[string, string]>;
410
75
  };
411
- "arm-resource-operation-missing-decorator": {
412
- readonly default: import("@typespec/compiler").CallableMessage<["verb", "decorator"]>;
76
+ }[C]>(program: import("@typespec/compiler").Program, diag: import("@typespec/compiler").DiagnosticReport<{
77
+ "single-arm-provider": {
78
+ default: string;
413
79
  };
414
- "arm-resource-interface-requires-decorator": {
415
- readonly default: "Each resource interface must have an @armResourceOperations decorator.";
80
+ "decorator-param-wrong-type": {
81
+ armUpdateProviderNamespace: string;
416
82
  };
417
83
  "arm-resource-circular-ancestry": {
418
- readonly default: "There is a loop in the ancestry of this resource. Please ensure that the `@parentResource` decorator contains the correct parent resource, and that parentage contains no cycles.";
84
+ default: string;
419
85
  };
420
86
  "arm-resource-duplicate-base-parameter": {
421
- readonly default: "Only one base parameter type is allowed per resource. Each resource may have only one of `@parentResource`, `@resourceGroupResource`, `@tenantResource`, `@locationResource`, or `@subscriptionResource` decorators.";
422
- };
423
- "arm-resource-invalid-action-verb": {
424
- readonly default: "Actions must be HTTP Post operations.";
425
- };
426
- "arm-resource-action-no-segment": {
427
- readonly default: "`@armResourceAction` should not be used with `@segment`. Instead, use `@action(...)` if you need to rename the action, or omit.";
428
- };
429
- "arm-resource-patch-model-superset": {
430
- readonly default: import("@typespec/compiler").CallableMessage<["name", "resourceModel"]>;
431
- };
432
- "arm-resource-operation-missing-api-version": {
433
- readonly default: "All Resource operations must use an api-version parameter. Please include Azure.ResourceManager.ApiVersionParameter in the operation parameter list using the spread (...ApiVersionParameter) operator, or using one of the common resource parameter models.";
434
- };
435
- "arm-resource-operation-outside-interface": {
436
- readonly default: "All operations must be inside an interface declaration.";
437
- };
438
- "arm-resource-operation-response": {
439
- readonly default: "[RPC 008]: PUT, GET, PATCH & LIST must return the same resource schema.";
87
+ default: string;
440
88
  };
441
89
  "arm-resource-missing-name-property": {
442
- readonly default: "Resource types must include a string property called 'name'.";
90
+ default: string;
443
91
  };
444
92
  "arm-resource-missing-name-key-decorator": {
445
- readonly default: "Resource type 'name' property must have a @key decorator which defines its key name.";
93
+ default: string;
446
94
  };
447
95
  "arm-resource-missing-name-segment-decorator": {
448
- readonly default: "Resource type 'name' property must have a @segment decorator which defines its path fragment.";
96
+ default: string;
449
97
  };
450
98
  "arm-resource-missing-arm-namespace": {
451
- readonly default: "The @armProviderNamespace decorator must be used to define the ARM namespace of the service. This is best applied to the file-level namespace.";
99
+ default: string;
452
100
  };
453
101
  "arm-resource-invalid-base-type": {
454
- readonly default: "The @armResourceInternal decorator can only be used on a type that ultimately extends TrackedResource, ProxyResource, or ExtensionResource.";
102
+ default: string;
455
103
  };
456
104
  "arm-resource-missing": {
457
- readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
105
+ default: import("@typespec/compiler").CallableMessage<[string]>;
458
106
  };
459
107
  "decorator-in-namespace": {
460
- readonly default: import("@typespec/compiler").CallableMessage<["decoratorName"]>;
108
+ default: import("@typespec/compiler").CallableMessage<[string]>;
461
109
  };
462
110
  "parent-type": {
463
- readonly notResourceType: import("@typespec/compiler").CallableMessage<["parent", "type"]>;
464
- };
465
- "unsupported-type": {
466
- readonly default: import("@typespec/compiler").CallableMessage<["typeName"]>;
467
- };
468
- "resource-name": {
469
- readonly default: "The resource 'name' field should be marked with 'read' visibility and an @path decorator.";
470
- };
471
- "no-response-body": {
472
- readonly default: "The body of 202 response should be empty.";
473
- };
474
- "beyond-nesting-levels": {
475
- readonly default: "Tracked Resources must use 3 or fewer levels of nesting.";
476
- };
477
- "no-resource-delete-operation": {
478
- readonly default: "The resource must have a delete operation.";
479
- };
480
- "patch-envelope": {
481
- readonly default: import("@typespec/compiler").CallableMessage<["resourceName", "propertyName"]>;
111
+ notResourceType: import("@typespec/compiler").CallableMessage<[string, string]>;
482
112
  };
483
- "empty-updateable-properties": {
484
- readonly default: "The RP-specific properties of the Resource (as defined in the 'properties' property) should have at least one updateable property. Properties are updateable if they do not have a '@visibility' decorator, or if they include 'update' in the '@visibility' decorator arguments.";
485
- };
486
- "retry-after": {
487
- readonly default: "For long-running operations, the Retry-After header indicates how long the client should wait before polling the operation status, please add this header to the 201 or 202 response for this operation.";
488
- };
489
- "improper-subscription-list-operation": {
490
- readonly default: "Tenant and Extension resources should not define a list by subscription operation.";
491
- };
492
- }[C]>(program: import("@typespec/compiler").Program, diag: import("@typespec/compiler").DiagnosticReport<{
113
+ }, C, M>) => void, createDiagnostic: <C extends "single-arm-provider" | "decorator-param-wrong-type" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-missing-name-property" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-segment-decorator" | "arm-resource-missing-arm-namespace" | "arm-resource-invalid-base-type" | "arm-resource-missing" | "decorator-in-namespace" | "parent-type", M extends keyof {
493
114
  "single-arm-provider": {
494
- readonly default: "Only one @armProviderNamespace can be declared in a typespec spec at once.";
115
+ default: string;
495
116
  };
496
117
  "decorator-param-wrong-type": {
497
- readonly armUpdateProviderNamespace: "The parameter to @armUpdateProviderNamespace must be an operation with a 'provider' parameter.";
498
- };
499
- "missing-operations-endpoint": {
500
- readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
118
+ armUpdateProviderNamespace: string;
501
119
  };
502
- "arm-resource-invalid-version-format": {
503
- readonly invalidType: import("@typespec/compiler").CallableMessage<[]>;
504
- readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
120
+ "arm-resource-circular-ancestry": {
121
+ default: string;
505
122
  };
506
- "arm-resource-name-invalid-chars": {
507
- readonly default: "Arm resource name must contain only alphanumeric characters.";
123
+ "arm-resource-duplicate-base-parameter": {
124
+ default: string;
508
125
  };
509
- "arm-resource-key-invalid-chars": {
510
- readonly default: import("@typespec/compiler").CallableMessage<["key"]>;
126
+ "arm-resource-missing-name-property": {
127
+ default: string;
511
128
  };
512
- "arm-resource-invalid-patch-model": {
513
- readonly default: "The request body of a PATCH must be a model with a subset of resource properties";
129
+ "arm-resource-missing-name-key-decorator": {
130
+ default: string;
514
131
  };
515
- "arm-resource-path-segment-invalid-chars": {
516
- readonly default: import("@typespec/compiler").CallableMessage<["segment"]>;
132
+ "arm-resource-missing-name-segment-decorator": {
133
+ default: string;
517
134
  };
518
- "arm-resource-invalid-envelope-property": {
519
- readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
135
+ "arm-resource-missing-arm-namespace": {
136
+ default: string;
520
137
  };
521
- "arm-resource-duplicate-property": {
522
- readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
138
+ "arm-resource-invalid-base-type": {
139
+ default: string;
523
140
  };
524
- "arm-resource-provisioning-state": {
525
- readonly default: "The RP-specific property model in the 'properties' property of this resource must contain a 'provisioningState property. The property type should be an enum, and it must specify known state values 'Succeeded', 'Failed', and 'Canceled'.";
141
+ "arm-resource-missing": {
142
+ default: import("@typespec/compiler").CallableMessage<[string]>;
526
143
  };
527
- "arm-resource-provisioning-state-values": {
528
- readonly default: import("@typespec/compiler").CallableMessage<["missingValues"]>;
144
+ "decorator-in-namespace": {
145
+ default: import("@typespec/compiler").CallableMessage<[string]>;
529
146
  };
530
- "arm-resource-patch-missing-tags": {
531
- readonly default: "Resource PATCH must contain the 'tags' property.";
147
+ "parent-type": {
148
+ notResourceType: import("@typespec/compiler").CallableMessage<[string, string]>;
532
149
  };
533
- "arm-resource-operation-missing-decorator": {
534
- readonly default: import("@typespec/compiler").CallableMessage<["verb", "decorator"]>;
150
+ }[C]>(diag: import("@typespec/compiler").DiagnosticReport<{
151
+ "single-arm-provider": {
152
+ default: string;
535
153
  };
536
- "arm-resource-interface-requires-decorator": {
537
- readonly default: "Each resource interface must have an @armResourceOperations decorator.";
154
+ "decorator-param-wrong-type": {
155
+ armUpdateProviderNamespace: string;
538
156
  };
539
157
  "arm-resource-circular-ancestry": {
540
- readonly default: "There is a loop in the ancestry of this resource. Please ensure that the `@parentResource` decorator contains the correct parent resource, and that parentage contains no cycles.";
158
+ default: string;
541
159
  };
542
160
  "arm-resource-duplicate-base-parameter": {
543
- readonly default: "Only one base parameter type is allowed per resource. Each resource may have only one of `@parentResource`, `@resourceGroupResource`, `@tenantResource`, `@locationResource`, or `@subscriptionResource` decorators.";
544
- };
545
- "arm-resource-invalid-action-verb": {
546
- readonly default: "Actions must be HTTP Post operations.";
547
- };
548
- "arm-resource-action-no-segment": {
549
- readonly default: "`@armResourceAction` should not be used with `@segment`. Instead, use `@action(...)` if you need to rename the action, or omit.";
550
- };
551
- "arm-resource-patch-model-superset": {
552
- readonly default: import("@typespec/compiler").CallableMessage<["name", "resourceModel"]>;
553
- };
554
- "arm-resource-operation-missing-api-version": {
555
- readonly default: "All Resource operations must use an api-version parameter. Please include Azure.ResourceManager.ApiVersionParameter in the operation parameter list using the spread (...ApiVersionParameter) operator, or using one of the common resource parameter models.";
556
- };
557
- "arm-resource-operation-outside-interface": {
558
- readonly default: "All operations must be inside an interface declaration.";
559
- };
560
- "arm-resource-operation-response": {
561
- readonly default: "[RPC 008]: PUT, GET, PATCH & LIST must return the same resource schema.";
161
+ default: string;
562
162
  };
563
163
  "arm-resource-missing-name-property": {
564
- readonly default: "Resource types must include a string property called 'name'.";
164
+ default: string;
565
165
  };
566
166
  "arm-resource-missing-name-key-decorator": {
567
- readonly default: "Resource type 'name' property must have a @key decorator which defines its key name.";
167
+ default: string;
568
168
  };
569
169
  "arm-resource-missing-name-segment-decorator": {
570
- readonly default: "Resource type 'name' property must have a @segment decorator which defines its path fragment.";
170
+ default: string;
571
171
  };
572
172
  "arm-resource-missing-arm-namespace": {
573
- readonly default: "The @armProviderNamespace decorator must be used to define the ARM namespace of the service. This is best applied to the file-level namespace.";
173
+ default: string;
574
174
  };
575
175
  "arm-resource-invalid-base-type": {
576
- readonly default: "The @armResourceInternal decorator can only be used on a type that ultimately extends TrackedResource, ProxyResource, or ExtensionResource.";
176
+ default: string;
577
177
  };
578
178
  "arm-resource-missing": {
579
- readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
179
+ default: import("@typespec/compiler").CallableMessage<[string]>;
580
180
  };
581
181
  "decorator-in-namespace": {
582
- readonly default: import("@typespec/compiler").CallableMessage<["decoratorName"]>;
182
+ default: import("@typespec/compiler").CallableMessage<[string]>;
583
183
  };
584
184
  "parent-type": {
585
- readonly notResourceType: import("@typespec/compiler").CallableMessage<["parent", "type"]>;
586
- };
587
- "unsupported-type": {
588
- readonly default: import("@typespec/compiler").CallableMessage<["typeName"]>;
589
- };
590
- "resource-name": {
591
- readonly default: "The resource 'name' field should be marked with 'read' visibility and an @path decorator.";
592
- };
593
- "no-response-body": {
594
- readonly default: "The body of 202 response should be empty.";
595
- };
596
- "beyond-nesting-levels": {
597
- readonly default: "Tracked Resources must use 3 or fewer levels of nesting.";
598
- };
599
- "no-resource-delete-operation": {
600
- readonly default: "The resource must have a delete operation.";
601
- };
602
- "patch-envelope": {
603
- readonly default: import("@typespec/compiler").CallableMessage<["resourceName", "propertyName"]>;
604
- };
605
- "empty-updateable-properties": {
606
- readonly default: "The RP-specific properties of the Resource (as defined in the 'properties' property) should have at least one updateable property. Properties are updateable if they do not have a '@visibility' decorator, or if they include 'update' in the '@visibility' decorator arguments.";
607
- };
608
- "retry-after": {
609
- readonly default: "For long-running operations, the Retry-After header indicates how long the client should wait before polling the operation status, please add this header to the 201 or 202 response for this operation.";
610
- };
611
- "improper-subscription-list-operation": {
612
- readonly default: "Tenant and Extension resources should not define a list by subscription operation.";
185
+ notResourceType: import("@typespec/compiler").CallableMessage<[string, string]>;
613
186
  };
614
- }, C, M>) => void, createStateSymbol: (name: string) => symbol;
187
+ }, C, M>) => import("@typespec/compiler").Diagnostic;
615
188
  //# sourceMappingURL=lib.d.ts.map