@azure-tools/typespec-azure-resource-manager 0.32.0-dev.8 → 0.32.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.
@@ -681,7 +681,6 @@ op checkNameAvailability<
681
681
  >(
682
682
  ...ApiVersionParameter,
683
683
  ...TScopeParameters,
684
- ...DefaultProviderNamespace,
685
684
  ...TAdditionalParams,
686
685
 
687
686
  @doc("The CheckAvailability request")
@@ -141,7 +141,7 @@ interface ResourceCollectionOperations<
141
141
  */
142
142
  interface ResourceListBySubscription<TResource extends ArmResource> {
143
143
  /**
144
- * List resources by subscription.
144
+ * @dev List resources by subscription.
145
145
  * @template TResource The ArmResource to list.
146
146
  */
147
147
  listBySubscription is ArmListBySubscription<TResource>;
@@ -161,7 +161,7 @@ interface ResourceListByParent<
161
161
  TParentFriendlyName extends valueof string = ""
162
162
  > {
163
163
  /**
164
- * List resources by parent.
164
+ * @dev List resources by parent.
165
165
  * @template TResource The ArmResource to list.
166
166
  * @template TBaseParameters The http parameters that are part of the request
167
167
  * @template TParentName The name of the parent resource
@@ -182,7 +182,7 @@ interface ResourceListByParent<
182
182
  */
183
183
  interface ResourceRead<TResource extends ArmResource, TBaseParameters = BaseParameters<TResource>> {
184
184
  /**
185
- * Retrieve a resource.
185
+ * @dev Retrieve a resource.
186
186
  * @template TResource The ArmResource to retrieve.
187
187
  * @template TBaseParameters The http parameters that are part of the request
188
188
  */
@@ -199,7 +199,7 @@ interface ResourceCreateSync<
199
199
  TBaseParameters = BaseParameters<TResource>
200
200
  > {
201
201
  /**
202
- * Create or update a resource using the synchronous call pattern.
202
+ * @dev Create or update a resource using the synchronous call pattern.
203
203
  * @template TResource The ArmResource to create or update.
204
204
  * @template TBaseParameters The http parameters that are part of the request
205
205
  */
@@ -216,7 +216,7 @@ interface ResourceCreateAsync<
216
216
  TBaseParameters = BaseParameters<TResource>
217
217
  > {
218
218
  /**
219
- * Create or update a resource using the asynchronous call pattern.
219
+ * @dev Create or update a resource using the asynchronous call pattern.
220
220
  * @template TResource The ArmResource to create or update.
221
221
  * @template TBaseParameters The http parameters that are part of the request
222
222
  */
@@ -224,7 +224,8 @@ interface ResourceCreateAsync<
224
224
  }
225
225
 
226
226
  /**
227
- * A composite interface for resources that include a long-running delete operation.
227
+ * @dev A composite interface for resources that include a long-running delete operation.
228
+ * DEPRECATED: Use ResourceDeleteWithoutOkAsync instead
228
229
  * @template TResource The ArmResource that provides these operations
229
230
  * @template TBaseParameters The http parameters that are part of the request
230
231
  */
@@ -234,13 +235,31 @@ interface ResourceDeleteAsync<
234
235
  TBaseParameters = BaseParameters<TResource>
235
236
  > {
236
237
  /**
237
- * Delete a resource using the asynchronous call pattern.
238
+ * @dev Delete a resource using the asynchronous call pattern.
238
239
  * @template TResource The ArmResource to delete.
239
240
  * @template TBaseParameters The http parameters that are part of the request
240
241
  */
241
242
  delete is ArmResourceDeleteAsync<TResource, TBaseParameters>;
242
243
  }
243
244
 
245
+ /**
246
+ * @dev A composite interface for resources that include a synchronous delete operation.
247
+ * @template TResource The ArmResource that provides these operations
248
+ * @template TBaseParameters The http parameters that are part of the request
249
+ */
250
+ @doc("Delete a resource using the asynchronous call pattern")
251
+ interface ResourceDeleteWithoutOkAsync<
252
+ TResource extends ArmResource,
253
+ TBaseParameters = BaseParameters<TResource>
254
+ > {
255
+ /**
256
+ * @dev Delete a resource using the asynchronous call pattern.
257
+ * @template TResource The ArmResource to delete.
258
+ * @template TBaseParameters The http parameters that are part of the request
259
+ */
260
+ delete is ArmResourceDeleteWithoutOkAsync<TResource, TBaseParameters>;
261
+ }
262
+
244
263
  /**
245
264
  * A composite interface for resources that include a synchronous delete operation.
246
265
  * @template TResource The ArmResource that provides these operations
@@ -252,7 +271,7 @@ interface ResourceDeleteSync<
252
271
  TBaseParameters = BaseParameters<TResource>
253
272
  > {
254
273
  /**
255
- * Delete a resource using the synchronous call pattern.
274
+ * @dev Delete a resource using the synchronous call pattern.
256
275
  * @template TResource The ArmResource to delete.
257
276
  * @template TBaseParameters The http parameters that are part of the request
258
277
  */
@@ -260,7 +279,7 @@ interface ResourceDeleteSync<
260
279
  }
261
280
 
262
281
  /**
263
- * A composite interface for resources that include a long-running update operation.
282
+ * @dev A composite interface for resources that include a long-running update operation.
264
283
  * @template TResource The ArmResource that provides these operations
265
284
  * @template TProperties RP-specific property bag for the resource
266
285
  * @template TBaseParameters The http parameters that are part of the request
@@ -272,7 +291,7 @@ interface ResourceUpdateAsync<
272
291
  TBaseParameters = BaseParameters<TResource>
273
292
  > {
274
293
  /**
275
- * Update a resource using the asynchronous call pattern.
294
+ * @dev Update a resource using the asynchronous call pattern.
276
295
  * @template TResource The ArmResource to update.
277
296
  * @template TProperties RP-specific property bag for the resource
278
297
  * @template TBaseParameters The http parameters that are part of the request
@@ -297,7 +316,7 @@ interface ResourceUpdateSync<
297
316
  TBaseParameters = BaseParameters<TResource>
298
317
  > {
299
318
  /**
300
- * Update a resource using the synchronous call pattern.
319
+ * @dev Update a resource using the synchronous call pattern.
301
320
  * @template TResource The ArmResource to update.
302
321
  * @template TProperties RP-specific property bag for the resource
303
322
  * @template TBaseParameters The http parameters that are part of the request
@@ -219,8 +219,9 @@ op ArmCustomPatchSync<
219
219
  ): ArmResponse<TResource> | ErrorResponse;
220
220
 
221
221
  /**
222
- * Delete a resource Asynchronously
222
+ * @dev Delete a resource asynchronously
223
223
  * @template TResource The resource being deleted
224
+ * @template TResponse The response type for the operation
224
225
  * @template TBaseParameters Optional. Allows overriding the parameters for the operation
225
226
  */
226
227
  @autoRoute
@@ -234,14 +235,39 @@ op ArmCustomPatchSync<
234
235
  )
235
236
  @armResourceDelete(TResource)
236
237
  @delete
238
+ op ArmResourceDeleteAsyncBase<
239
+ TResource extends ArmResource,
240
+ TResponse,
241
+ TBaseParameters = BaseParameters<TResource>
242
+ >(...ResourceInstanceParameters<TResource, TBaseParameters>): TResponse | ErrorResponse;
243
+
244
+ /**
245
+ * @dev Delete a resource asynchronously. DEPRECATED: Use ArmResourceDeleteWithoutOkAsync instead
246
+ * @template TResource The resource being deleted
247
+ * @template TBaseParameters Optional. Allows overriding the parameters for the operation
248
+ */
237
249
  op ArmResourceDeleteAsync<
238
250
  TResource extends ArmResource,
239
251
  TBaseParameters = BaseParameters<TResource>
240
- >(...ResourceInstanceParameters<TResource, TBaseParameters>):
241
- | ArmDeletedResponse
242
- | ArmDeleteAcceptedLroResponse
243
- | ArmDeletedNoContentResponse
244
- | ErrorResponse;
252
+ > is ArmResourceDeleteAsyncBase<
253
+ TResource,
254
+ ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse,
255
+ TBaseParameters
256
+ >;
257
+
258
+ /**
259
+ * @dev Delete a resource asynchronously
260
+ * @template TResource The resource being deleted
261
+ * @template TBaseParameters Optional. Allows overriding the parameters for the operation
262
+ */
263
+ op ArmResourceDeleteWithoutOkAsync<
264
+ TResource extends ArmResource,
265
+ TBaseParameters = BaseParameters<TResource>
266
+ > is ArmResourceDeleteAsyncBase<
267
+ TResource,
268
+ ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse,
269
+ TBaseParameters
270
+ >;
245
271
 
246
272
  /**
247
273
  * Delete a resource synchronously
@@ -263,7 +289,7 @@ op ArmResourceDeleteSync<
263
289
  * A long-running resource action.
264
290
  * @template TResource The resource being acted upon
265
291
  * @template TRequest The request model for the action
266
- * @template TResponse The response model for the action
292
+ * @template TResponse The response type for the action
267
293
  * @template TBaseParameters Optional. Allows overriding the parameters for the operation
268
294
  */
269
295
  @autoRoute
@@ -276,18 +302,37 @@ op ArmResourceDeleteSync<
276
302
  )
277
303
  @armResourceAction(TResource)
278
304
  @post
279
- op ArmResourceActionAsync<
305
+ op ArmResourceActionAsyncBase<
280
306
  TResource extends ArmResource,
281
307
  TRequest extends TypeSpec.Reflection.Model,
282
- TResponse extends TypeSpec.Reflection.Model,
283
- TBaseParameters = BaseParameters<TResource>
308
+ TResponse,
309
+ TBaseParameters extends TypeSpec.Reflection.Model
284
310
  >(
285
311
  ...ResourceInstanceParameters<TResource, TBaseParameters>,
286
312
 
287
313
  @doc("The content of the action request")
288
314
  @body
289
315
  body: TRequest,
290
- ): ArmAcceptedLroResponse | ArmResponse<TResponse> | ErrorResponse;
316
+ ): TResponse | ErrorResponse;
317
+
318
+ /**
319
+ * A long-running resource action.
320
+ * @template TResource The resource being acted upon
321
+ * @template TRequest The request model for the action
322
+ * @template TResponse The response model for the action
323
+ * @template TBaseParameters Optional. Allows overriding the parameters for the operation
324
+ */
325
+ op ArmResourceActionAsync<
326
+ TResource extends ArmResource,
327
+ TRequest extends TypeSpec.Reflection.Model,
328
+ TResponse extends TypeSpec.Reflection.Model,
329
+ TBaseParameters extends TypeSpec.Reflection.Model = BaseParameters<TResource>
330
+ > is ArmResourceActionAsyncBase<
331
+ TResource,
332
+ TRequest,
333
+ ArmAcceptedLroResponse | ArmResponse<TResponse>,
334
+ TBaseParameters
335
+ >;
291
336
 
292
337
  /**
293
338
  * A synchronous resource action.
@@ -318,27 +363,28 @@ op ArmResourceActionSync<
318
363
  * @template TRequest The request model for the action
319
364
  * @template TBaseParameters Optional. Allows overriding the parameters for the operation
320
365
  */
321
- @autoRoute
322
- @extension("x-ms-long-running-operation", true)
323
- @extension(
324
- "x-ms-long-running-operation-options",
325
- {
326
- `final-state-via`: "location",
327
- }
328
- )
329
- @armResourceAction(TResource)
330
- @post
331
366
  op ArmResourceActionNoContentAsync<
332
367
  TResource extends ArmResource,
333
368
  TRequest extends TypeSpec.Reflection.Model,
334
- TBaseParameters = BaseParameters<TResource>
335
- >(
336
- ...ResourceInstanceParameters<TResource, TBaseParameters>,
369
+ TBaseParameters extends TypeSpec.Reflection.Model = BaseParameters<TResource>
370
+ > is ArmResourceActionAsyncBase<
371
+ TResource,
372
+ TRequest,
373
+ ArmAcceptedLroResponse | ArmNoContentResponse<"Action completed successfully.">,
374
+ TBaseParameters
375
+ >;
337
376
 
338
- @doc("The content of the action request")
339
- @body
340
- body: TRequest,
341
- ): ArmAcceptedLroResponse | ArmNoContentResponse<"Action completed successfully."> | ErrorResponse;
377
+ /**
378
+ * A long-running resource action that returns no content.
379
+ * @template TResource The resource being acted upon
380
+ * @template TRequest The request model for the action
381
+ * @template TBaseParameters Optional. Allows overriding the parameters for the operation
382
+ */
383
+ op ArmResourceActionNoResponseContentAsync<
384
+ TResource extends ArmResource,
385
+ TRequest extends TypeSpec.Reflection.Model,
386
+ TBaseParameters extends TypeSpec.Reflection.Model = BaseParameters<TResource>
387
+ > is ArmResourceActionAsyncBase<TResource, TRequest, ArmAcceptedLroResponse, TBaseParameters>;
342
388
 
343
389
  /**
344
390
  * A synchronous resource action that returns no content.
@@ -373,7 +419,12 @@ alias checkGlobalNameAvailability<
373
419
  TRequest extends TypeSpec.Reflection.Model = Azure.ResourceManager.Foundations.CheckNameAvailabilityRequest,
374
420
  TResponse extends TypeSpec.Reflection.Model = CheckNameAvailabilityResponse,
375
421
  TAdditionalParams extends TypeSpec.Reflection.Model = {}
376
- > = checkNameAvailability<SubscriptionIdParameter, TRequest, TResponse, TAdditionalParams>;
422
+ > = checkNameAvailability<
423
+ SubscriptionIdParameter & DefaultProviderNamespace,
424
+ TRequest,
425
+ TResponse,
426
+ TAdditionalParams
427
+ >;
377
428
 
378
429
  /**
379
430
  * Adds check location-specific name availability operation, normally used if
@@ -388,7 +439,7 @@ alias checkLocalNameAvailability<
388
439
  TResponse extends TypeSpec.Reflection.Model = CheckNameAvailabilityResponse,
389
440
  TAdditionalParams extends TypeSpec.Reflection.Model = {}
390
441
  > = checkNameAvailability<
391
- SubscriptionIdParameter & LocationParameter,
442
+ SubscriptionIdParameter & DefaultProviderNamespace & LocationParameter,
392
443
  TRequest,
393
444
  TResponse,
394
445
  TAdditionalParams
package/lib/responses.tsp CHANGED
@@ -36,12 +36,12 @@ model ArmDeletedResponse {
36
36
  }
37
37
 
38
38
  /**
39
- * The response for asynchronous ARM delete ACCEPTED
39
+ * @dev The response for asynchronous ARM delete ACCEPTED
40
40
  */
41
41
  model ArmDeleteAcceptedLroResponse is ArmAcceptedLroResponse<"Resource deletion accepted.">;
42
42
 
43
43
  /**
44
- * The response for synchronous ARM delete ACCEPTED
44
+ * @dev The response for synchronous ARM delete ACCEPTED
45
45
  */
46
46
  model ArmDeleteAcceptedResponse is ArmAcceptedResponse<"Resource deletion accepted.">;
47
47
 
@@ -59,6 +59,7 @@ model ArmAcceptedResponse<TMessage extends valueof string = "Resource operation
59
59
  * The standard ARM response for asynchronous PATCH, POST, and DELETE operations
60
60
  * @template TMessage The description of the response status (defaults to `Resource operation accepted`)
61
61
  */
62
+ @doc(TMessage)
62
63
  model ArmAcceptedLroResponse<TMessage extends valueof string = "Resource operation accepted.">
63
64
  is ArmAcceptedResponse<TMessage> {
64
65
  @doc("The Location header contains the URL where the status of the long running operation can be checked.")
@@ -67,7 +68,7 @@ model ArmAcceptedLroResponse<TMessage extends valueof string = "Resource operati
67
68
  }
68
69
 
69
70
  /**
70
- * ARM response for a properly formed delete request, with no resource found
71
+ * @dev ARM response for a properly formed delete request, with no resource found
71
72
  */
72
73
  model ArmDeletedNoContentResponse is ArmNoContentResponse<"Resource deleted successfully.">;
73
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-resource-manager",
3
- "version": "0.32.0-dev.8",
3
+ "version": "0.32.0",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Resource Manager library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -42,30 +42,30 @@
42
42
  "!dist/test/**"
43
43
  ],
44
44
  "peerDependencies": {
45
- "@typespec/compiler": "~0.45.2 || >=0.46.0-dev <0.46.0",
46
- "@azure-tools/typespec-azure-core": "~0.31.0 || >=0.32.0-dev <0.32.0",
47
- "@azure-tools/typespec-autorest": "~0.31.0 || >=0.32.0-dev <0.32.0",
48
- "@typespec/openapi": "~0.45.0 || >=0.46.0-dev <0.46.0",
49
- "@typespec/rest": "~0.45.0 || >=0.46.0-dev <0.46.0",
50
- "@typespec/http": "~0.45.0 || >=0.46.0-dev <0.46.0",
51
- "@typespec/versioning": "~0.45.0 || >=0.46.0-dev <0.46.0"
45
+ "@typespec/compiler": "~0.46.0",
46
+ "@azure-tools/typespec-azure-core": "~0.32.0",
47
+ "@azure-tools/typespec-autorest": "~0.32.0",
48
+ "@typespec/openapi": "~0.46.0",
49
+ "@typespec/rest": "~0.46.0",
50
+ "@typespec/http": "~0.46.0",
51
+ "@typespec/versioning": "~0.46.0"
52
52
  },
53
53
  "dependencies": {
54
- "@typespec/lint": "~0.45.0 || >=0.46.0-dev <0.46.0"
54
+ "@typespec/lint": "~0.46.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@typespec/compiler": "~0.45.2 || >=0.46.0-dev <0.46.0",
58
- "@typespec/openapi": "~0.45.0 || >=0.46.0-dev <0.46.0",
59
- "@azure-tools/typespec-azure-core": "~0.31.0 || >=0.32.0-dev <0.32.0",
60
- "@azure-tools/typespec-autorest": "~0.31.0 || >=0.32.0-dev <0.32.0",
61
- "@typespec/rest": "~0.45.0 || >=0.46.0-dev <0.46.0",
62
- "@typespec/http": "~0.45.0 || >=0.46.0-dev <0.46.0",
63
- "@typespec/versioning": "~0.45.0 || >=0.46.0-dev <0.46.0",
57
+ "@typespec/compiler": "~0.46.0",
58
+ "@typespec/openapi": "~0.46.0",
59
+ "@azure-tools/typespec-azure-core": "~0.32.0",
60
+ "@azure-tools/typespec-autorest": "~0.32.0",
61
+ "@typespec/rest": "~0.46.0",
62
+ "@typespec/http": "~0.46.0",
63
+ "@typespec/versioning": "~0.46.0",
64
64
  "@types/mocha": "~10.0.1",
65
65
  "@types/node": "~18.11.9",
66
- "@typespec/eslint-config-typespec": "~0.7.0 || >=0.8.0-dev <0.8.0",
67
- "@typespec/library-linter": "~0.45.0 || >=0.46.0-dev <0.46.0",
68
- "@typespec/eslint-plugin": "~0.45.0 || >=0.46.0-dev <0.46.0",
66
+ "@typespec/eslint-config-typespec": "~0.46.0",
67
+ "@typespec/library-linter": "~0.46.0",
68
+ "@typespec/eslint-plugin": "~0.46.0",
69
69
  "eslint": "^8.42.0",
70
70
  "mocha": "~10.2.0",
71
71
  "mocha-junit-reporter": "~2.2.0",