@azure/web-pubsub 1.1.0-alpha.20221107.1 → 1.1.0-alpha.20221121.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/README.md +31 -0
  2. package/dist/index.js +443 -294
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/generated/generatedClient.js +51 -3
  5. package/dist-esm/src/generated/generatedClient.js.map +1 -1
  6. package/dist-esm/src/generated/index.js +0 -1
  7. package/dist-esm/src/generated/index.js.map +1 -1
  8. package/dist-esm/src/generated/models/index.js +2 -0
  9. package/dist-esm/src/generated/models/index.js.map +1 -1
  10. package/dist-esm/src/generated/models/mappers.js +58 -44
  11. package/dist-esm/src/generated/models/mappers.js.map +1 -1
  12. package/dist-esm/src/generated/models/parameters.js +70 -31
  13. package/dist-esm/src/generated/models/parameters.js.map +1 -1
  14. package/dist-esm/src/generated/operations/healthApi.js.map +1 -1
  15. package/dist-esm/src/generated/operations/webPubSub.js +217 -185
  16. package/dist-esm/src/generated/operations/webPubSub.js.map +1 -1
  17. package/dist-esm/src/generated/operationsInterfaces/webPubSub.js.map +1 -1
  18. package/dist-esm/src/groupClient.js.map +1 -1
  19. package/dist-esm/src/hubClient.js +12 -2
  20. package/dist-esm/src/hubClient.js.map +1 -1
  21. package/dist-esm/src/index.js +1 -0
  22. package/dist-esm/src/index.js.map +1 -1
  23. package/dist-esm/src/utils.js +44 -0
  24. package/dist-esm/src/utils.js.map +1 -1
  25. package/dist-esm/test/groups.spec.js +23 -0
  26. package/dist-esm/test/groups.spec.js.map +1 -1
  27. package/dist-esm/test/hubs.spec.js +59 -7
  28. package/dist-esm/test/hubs.spec.js.map +1 -1
  29. package/dist-esm/test/integration.spec.js +99 -7
  30. package/dist-esm/test/integration.spec.js.map +1 -1
  31. package/dist-esm/test/odata.spec.js +15 -0
  32. package/dist-esm/test/odata.spec.js.map +1 -0
  33. package/package.json +3 -2
  34. package/types/web-pubsub.d.ts +56 -3
@@ -18,22 +18,22 @@ export class WebPubSubImpl {
18
18
  this.client = client;
19
19
  }
20
20
  /**
21
- * Generate token for the client to connect Azure Web PubSub service.
21
+ * Close the connections in the hub.
22
22
  * @param hub Target hub name, which should start with alphabetic characters and only contain
23
23
  * alpha-numeric characters or underscore.
24
24
  * @param options The options parameters.
25
25
  */
26
- generateClientToken(hub, options) {
27
- return this.client.sendOperationRequest({ hub, options }, generateClientTokenOperationSpec);
26
+ closeAllConnections(hub, options) {
27
+ return this.client.sendOperationRequest({ hub, options }, closeAllConnectionsOperationSpec);
28
28
  }
29
29
  /**
30
- * Close the connections in the hub.
30
+ * Generate token for the client to connect Azure Web PubSub service.
31
31
  * @param hub Target hub name, which should start with alphabetic characters and only contain
32
32
  * alpha-numeric characters or underscore.
33
33
  * @param options The options parameters.
34
34
  */
35
- closeAllConnections(hub, options) {
36
- return this.client.sendOperationRequest({ hub, options }, closeAllConnectionsOperationSpec);
35
+ generateClientToken(hub, options) {
36
+ return this.client.sendOperationRequest({ hub, options }, generateClientTokenOperationSpec);
37
37
  }
38
38
  /**
39
39
  * Broadcast content inside request body to all the connected client connections.
@@ -71,24 +71,24 @@ export class WebPubSubImpl {
71
71
  return this.client.sendOperationRequest(operationArguments, operationSpec);
72
72
  }
73
73
  /**
74
- * Check if the connection with the given connectionId exists.
74
+ * Close the client connection.
75
75
  * @param hub Target hub name, which should start with alphabetic characters and only contain
76
76
  * alpha-numeric characters or underscore.
77
- * @param connectionId The connection Id.
77
+ * @param connectionId Target connection Id.
78
78
  * @param options The options parameters.
79
79
  */
80
- connectionExists(hub, connectionId, options) {
81
- return this.client.sendOperationRequest({ hub, connectionId, options }, connectionExistsOperationSpec);
80
+ closeConnection(hub, connectionId, options) {
81
+ return this.client.sendOperationRequest({ hub, connectionId, options }, closeConnectionOperationSpec);
82
82
  }
83
83
  /**
84
- * Close the client connection.
84
+ * Check if the connection with the given connectionId exists.
85
85
  * @param hub Target hub name, which should start with alphabetic characters and only contain
86
86
  * alpha-numeric characters or underscore.
87
- * @param connectionId Target connection Id.
87
+ * @param connectionId The connection Id.
88
88
  * @param options The options parameters.
89
89
  */
90
- closeConnection(hub, connectionId, options) {
91
- return this.client.sendOperationRequest({ hub, connectionId, options }, closeConnectionOperationSpec);
90
+ connectionExists(hub, connectionId, options) {
91
+ return this.client.sendOperationRequest({ hub, connectionId, options }, connectionExistsOperationSpec);
92
92
  }
93
93
  /**
94
94
  * Send content inside request body to the specific connection.
@@ -127,6 +127,16 @@ export class WebPubSubImpl {
127
127
  operationArguments.options = options || {};
128
128
  return this.client.sendOperationRequest(operationArguments, operationSpec);
129
129
  }
130
+ /**
131
+ * Remove a connection from all groups.
132
+ * @param hub Target hub name, which should start with alphabetic characters and only contain
133
+ * alpha-numeric characters or underscore.
134
+ * @param connectionId Target connection Id.
135
+ * @param options The options parameters.
136
+ */
137
+ removeConnectionFromAllGroups(hub, connectionId, options) {
138
+ return this.client.sendOperationRequest({ hub, connectionId, options }, removeConnectionFromAllGroupsOperationSpec);
139
+ }
130
140
  /**
131
141
  * Check if there are any client connections inside the given group
132
142
  * @param hub Target hub name, which should start with alphabetic characters and only contain
@@ -184,6 +194,17 @@ export class WebPubSubImpl {
184
194
  operationArguments.options = options || {};
185
195
  return this.client.sendOperationRequest(operationArguments, operationSpec);
186
196
  }
197
+ /**
198
+ * Remove a connection from the target group.
199
+ * @param hub Target hub name, which should start with alphabetic characters and only contain
200
+ * alpha-numeric characters or underscore.
201
+ * @param group Target group name, which length should be greater than 0 and less than 1025.
202
+ * @param connectionId Target connection Id.
203
+ * @param options The options parameters.
204
+ */
205
+ removeConnectionFromGroup(hub, group, connectionId, options) {
206
+ return this.client.sendOperationRequest({ hub, group, connectionId, options }, removeConnectionFromGroupOperationSpec);
207
+ }
187
208
  /**
188
209
  * Add a connection to the target group.
189
210
  * @param hub Target hub name, which should start with alphabetic characters and only contain
@@ -196,15 +217,37 @@ export class WebPubSubImpl {
196
217
  return this.client.sendOperationRequest({ hub, group, connectionId, options }, addConnectionToGroupOperationSpec);
197
218
  }
198
219
  /**
199
- * Remove a connection from the target group.
220
+ * Revoke permission for the connection.
200
221
  * @param hub Target hub name, which should start with alphabetic characters and only contain
201
222
  * alpha-numeric characters or underscore.
202
- * @param group Target group name, which length should be greater than 0 and less than 1025.
223
+ * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.
203
224
  * @param connectionId Target connection Id.
204
225
  * @param options The options parameters.
205
226
  */
206
- removeConnectionFromGroup(hub, group, connectionId, options) {
207
- return this.client.sendOperationRequest({ hub, group, connectionId, options }, removeConnectionFromGroupOperationSpec);
227
+ revokePermission(hub, permission, connectionId, options) {
228
+ return this.client.sendOperationRequest({ hub, permission, connectionId, options }, revokePermissionOperationSpec);
229
+ }
230
+ /**
231
+ * Check if a connection has permission to the specified action.
232
+ * @param hub Target hub name, which should start with alphabetic characters and only contain
233
+ * alpha-numeric characters or underscore.
234
+ * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.
235
+ * @param connectionId Target connection Id.
236
+ * @param options The options parameters.
237
+ */
238
+ checkPermission(hub, permission, connectionId, options) {
239
+ return this.client.sendOperationRequest({ hub, permission, connectionId, options }, checkPermissionOperationSpec);
240
+ }
241
+ /**
242
+ * Grant permission to the connection.
243
+ * @param hub Target hub name, which should start with alphabetic characters and only contain
244
+ * alpha-numeric characters or underscore.
245
+ * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.
246
+ * @param connectionId Target connection Id.
247
+ * @param options The options parameters.
248
+ */
249
+ grantPermission(hub, permission, connectionId, options) {
250
+ return this.client.sendOperationRequest({ hub, permission, connectionId, options }, grantPermissionOperationSpec);
208
251
  }
209
252
  /**
210
253
  * Check if there are any client connections connected for the given user.
@@ -264,15 +307,14 @@ export class WebPubSubImpl {
264
307
  return this.client.sendOperationRequest(operationArguments, operationSpec);
265
308
  }
266
309
  /**
267
- * Add a user to the target group.
310
+ * Remove a user from all groups.
268
311
  * @param hub Target hub name, which should start with alphabetic characters and only contain
269
312
  * alpha-numeric characters or underscore.
270
- * @param group Target group name, which length should be greater than 0 and less than 1025.
271
313
  * @param userId Target user Id.
272
314
  * @param options The options parameters.
273
315
  */
274
- addUserToGroup(hub, group, userId, options) {
275
- return this.client.sendOperationRequest({ hub, group, userId, options }, addUserToGroupOperationSpec);
316
+ removeUserFromAllGroups(hub, userId, options) {
317
+ return this.client.sendOperationRequest({ hub, userId, options }, removeUserFromAllGroupsOperationSpec);
276
318
  }
277
319
  /**
278
320
  * Remove a user from the target group.
@@ -286,90 +328,59 @@ export class WebPubSubImpl {
286
328
  return this.client.sendOperationRequest({ hub, group, userId, options }, removeUserFromGroupOperationSpec);
287
329
  }
288
330
  /**
289
- * Remove a user from all groups.
331
+ * Add a user to the target group.
290
332
  * @param hub Target hub name, which should start with alphabetic characters and only contain
291
333
  * alpha-numeric characters or underscore.
334
+ * @param group Target group name, which length should be greater than 0 and less than 1025.
292
335
  * @param userId Target user Id.
293
336
  * @param options The options parameters.
294
337
  */
295
- removeUserFromAllGroups(hub, userId, options) {
296
- return this.client.sendOperationRequest({ hub, userId, options }, removeUserFromAllGroupsOperationSpec);
297
- }
298
- /**
299
- * Grant permission to the connection.
300
- * @param hub Target hub name, which should start with alphabetic characters and only contain
301
- * alpha-numeric characters or underscore.
302
- * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.
303
- * @param connectionId Target connection Id.
304
- * @param options The options parameters.
305
- */
306
- grantPermission(hub, permission, connectionId, options) {
307
- return this.client.sendOperationRequest({ hub, permission, connectionId, options }, grantPermissionOperationSpec);
308
- }
309
- /**
310
- * Revoke permission for the connection.
311
- * @param hub Target hub name, which should start with alphabetic characters and only contain
312
- * alpha-numeric characters or underscore.
313
- * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.
314
- * @param connectionId Target connection Id.
315
- * @param options The options parameters.
316
- */
317
- revokePermission(hub, permission, connectionId, options) {
318
- return this.client.sendOperationRequest({ hub, permission, connectionId, options }, revokePermissionOperationSpec);
319
- }
320
- /**
321
- * Check if a connection has permission to the specified action.
322
- * @param hub Target hub name, which should start with alphabetic characters and only contain
323
- * alpha-numeric characters or underscore.
324
- * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.
325
- * @param connectionId Target connection Id.
326
- * @param options The options parameters.
327
- */
328
- checkPermission(hub, permission, connectionId, options) {
329
- return this.client.sendOperationRequest({ hub, permission, connectionId, options }, checkPermissionOperationSpec);
338
+ addUserToGroup(hub, group, userId, options) {
339
+ return this.client.sendOperationRequest({ hub, group, userId, options }, addUserToGroupOperationSpec);
330
340
  }
331
341
  }
332
342
  // Operation Specifications
333
343
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
334
- const generateClientTokenOperationSpec = {
335
- path: "/api/hubs/{hub}/:generateToken",
344
+ const closeAllConnectionsOperationSpec = {
345
+ path: "/api/hubs/{hub}/:closeConnections",
336
346
  httpMethod: "POST",
337
347
  responses: {
338
- 200: {
339
- bodyMapper: Mappers.ClientTokenResponse
340
- },
348
+ 204: {},
341
349
  default: {
342
350
  bodyMapper: Mappers.ErrorDetail,
343
- headersMapper: Mappers.WebPubSubGenerateClientTokenExceptionHeaders
351
+ headersMapper: Mappers.WebPubSubCloseAllConnectionsExceptionHeaders
344
352
  }
345
353
  },
346
354
  queryParameters: [
347
355
  Parameters.apiVersion,
348
- Parameters.userId,
349
- Parameters.roles,
350
- Parameters.expirationTimeInMinutes
356
+ Parameters.excluded,
357
+ Parameters.reason
351
358
  ],
352
359
  urlParameters: [Parameters.endpoint, Parameters.hub],
353
360
  headerParameters: [Parameters.accept],
354
361
  serializer
355
362
  };
356
- const closeAllConnectionsOperationSpec = {
357
- path: "/api/hubs/{hub}/:closeConnections",
363
+ const generateClientTokenOperationSpec = {
364
+ path: "/api/hubs/{hub}/:generateToken",
358
365
  httpMethod: "POST",
359
366
  responses: {
360
- 204: {},
367
+ 200: {
368
+ bodyMapper: Mappers.ClientTokenResponse
369
+ },
361
370
  default: {
362
371
  bodyMapper: Mappers.ErrorDetail,
363
- headersMapper: Mappers.WebPubSubCloseAllConnectionsExceptionHeaders
372
+ headersMapper: Mappers.WebPubSubGenerateClientTokenExceptionHeaders
364
373
  }
365
374
  },
366
375
  queryParameters: [
367
376
  Parameters.apiVersion,
368
- Parameters.excluded,
369
- Parameters.reason
377
+ Parameters.userId,
378
+ Parameters.roles,
379
+ Parameters.expirationTimeInMinutes,
380
+ Parameters.groups
370
381
  ],
371
382
  urlParameters: [Parameters.endpoint, Parameters.hub],
372
- headerParameters: [Parameters.accept],
383
+ headerParameters: [Parameters.accept1],
373
384
  serializer
374
385
  };
375
386
  const sendToAll$binaryOperationSpec = {
@@ -383,9 +394,13 @@ const sendToAll$binaryOperationSpec = {
383
394
  }
384
395
  },
385
396
  requestBody: Parameters.message,
386
- queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
397
+ queryParameters: [
398
+ Parameters.apiVersion,
399
+ Parameters.excludedConnections,
400
+ Parameters.filter
401
+ ],
387
402
  urlParameters: [Parameters.endpoint, Parameters.hub],
388
- headerParameters: [Parameters.contentType, Parameters.accept1],
403
+ headerParameters: [Parameters.contentType, Parameters.accept2],
389
404
  mediaType: "binary",
390
405
  serializer
391
406
  };
@@ -400,41 +415,43 @@ const sendToAll$textOperationSpec = {
400
415
  }
401
416
  },
402
417
  requestBody: Parameters.message1,
403
- queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
418
+ queryParameters: [
419
+ Parameters.apiVersion,
420
+ Parameters.excludedConnections,
421
+ Parameters.filter
422
+ ],
404
423
  urlParameters: [Parameters.endpoint, Parameters.hub],
405
- headerParameters: [Parameters.contentType1, Parameters.accept2],
424
+ headerParameters: [Parameters.contentType1, Parameters.accept3],
406
425
  mediaType: "text",
407
426
  serializer
408
427
  };
409
- const connectionExistsOperationSpec = {
428
+ const closeConnectionOperationSpec = {
410
429
  path: "/api/hubs/{hub}/connections/{connectionId}",
411
- httpMethod: "HEAD",
430
+ httpMethod: "DELETE",
412
431
  responses: {
413
- 200: {},
414
- 404: {},
432
+ 204: {},
415
433
  default: {
416
434
  bodyMapper: Mappers.ErrorDetail,
417
- headersMapper: Mappers.WebPubSubConnectionExistsExceptionHeaders
435
+ headersMapper: Mappers.WebPubSubCloseConnectionExceptionHeaders
418
436
  }
419
437
  },
420
- queryParameters: [Parameters.apiVersion],
438
+ queryParameters: [Parameters.apiVersion, Parameters.reason],
421
439
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
422
440
  headerParameters: [Parameters.accept],
423
441
  serializer
424
442
  };
425
- const closeConnectionOperationSpec = {
443
+ const connectionExistsOperationSpec = {
426
444
  path: "/api/hubs/{hub}/connections/{connectionId}",
427
- httpMethod: "DELETE",
445
+ httpMethod: "HEAD",
428
446
  responses: {
429
- 204: {},
447
+ 200: {},
448
+ 404: {},
430
449
  default: {
431
- bodyMapper: Mappers.ErrorDetail,
432
- headersMapper: Mappers.WebPubSubCloseConnectionExceptionHeaders
450
+ headersMapper: Mappers.WebPubSubConnectionExistsExceptionHeaders
433
451
  }
434
452
  },
435
- queryParameters: [Parameters.apiVersion, Parameters.reason],
453
+ queryParameters: [Parameters.apiVersion],
436
454
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
437
- headerParameters: [Parameters.accept],
438
455
  serializer
439
456
  };
440
457
  const sendToConnection$binaryOperationSpec = {
@@ -450,7 +467,7 @@ const sendToConnection$binaryOperationSpec = {
450
467
  requestBody: Parameters.message,
451
468
  queryParameters: [Parameters.apiVersion],
452
469
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
453
- headerParameters: [Parameters.contentType, Parameters.accept1],
470
+ headerParameters: [Parameters.contentType, Parameters.accept2],
454
471
  mediaType: "binary",
455
472
  serializer
456
473
  };
@@ -467,10 +484,25 @@ const sendToConnection$textOperationSpec = {
467
484
  requestBody: Parameters.message1,
468
485
  queryParameters: [Parameters.apiVersion],
469
486
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
470
- headerParameters: [Parameters.contentType1, Parameters.accept2],
487
+ headerParameters: [Parameters.contentType1, Parameters.accept3],
471
488
  mediaType: "text",
472
489
  serializer
473
490
  };
491
+ const removeConnectionFromAllGroupsOperationSpec = {
492
+ path: "/api/hubs/{hub}/connections/{connectionId}/groups",
493
+ httpMethod: "DELETE",
494
+ responses: {
495
+ 204: {},
496
+ default: {
497
+ bodyMapper: Mappers.ErrorDetail,
498
+ headersMapper: Mappers.WebPubSubRemoveConnectionFromAllGroupsExceptionHeaders
499
+ }
500
+ },
501
+ queryParameters: [Parameters.apiVersion],
502
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
503
+ headerParameters: [Parameters.accept],
504
+ serializer
505
+ };
474
506
  const groupExistsOperationSpec = {
475
507
  path: "/api/hubs/{hub}/groups/{group}",
476
508
  httpMethod: "HEAD",
@@ -478,13 +510,11 @@ const groupExistsOperationSpec = {
478
510
  200: {},
479
511
  404: {},
480
512
  default: {
481
- bodyMapper: Mappers.ErrorDetail,
482
513
  headersMapper: Mappers.WebPubSubGroupExistsExceptionHeaders
483
514
  }
484
515
  },
485
516
  queryParameters: [Parameters.apiVersion],
486
517
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
487
- headerParameters: [Parameters.accept],
488
518
  serializer
489
519
  };
490
520
  const closeGroupConnectionsOperationSpec = {
@@ -517,9 +547,13 @@ const sendToGroup$binaryOperationSpec = {
517
547
  }
518
548
  },
519
549
  requestBody: Parameters.message,
520
- queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
550
+ queryParameters: [
551
+ Parameters.apiVersion,
552
+ Parameters.excludedConnections,
553
+ Parameters.filter
554
+ ],
521
555
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
522
- headerParameters: [Parameters.contentType, Parameters.accept1],
556
+ headerParameters: [Parameters.contentType, Parameters.accept2],
523
557
  mediaType: "binary",
524
558
  serializer
525
559
  };
@@ -534,18 +568,41 @@ const sendToGroup$textOperationSpec = {
534
568
  }
535
569
  },
536
570
  requestBody: Parameters.message1,
537
- queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
571
+ queryParameters: [
572
+ Parameters.apiVersion,
573
+ Parameters.excludedConnections,
574
+ Parameters.filter
575
+ ],
538
576
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
539
- headerParameters: [Parameters.contentType1, Parameters.accept2],
577
+ headerParameters: [Parameters.contentType1, Parameters.accept3],
540
578
  mediaType: "text",
541
579
  serializer
542
580
  };
581
+ const removeConnectionFromGroupOperationSpec = {
582
+ path: "/api/hubs/{hub}/groups/{group}/connections/{connectionId}",
583
+ httpMethod: "DELETE",
584
+ responses: {
585
+ 204: {},
586
+ default: {
587
+ bodyMapper: Mappers.ErrorDetail,
588
+ headersMapper: Mappers.WebPubSubRemoveConnectionFromGroupExceptionHeaders
589
+ }
590
+ },
591
+ queryParameters: [Parameters.apiVersion],
592
+ urlParameters: [
593
+ Parameters.endpoint,
594
+ Parameters.hub,
595
+ Parameters.connectionId,
596
+ Parameters.group
597
+ ],
598
+ headerParameters: [Parameters.accept],
599
+ serializer
600
+ };
543
601
  const addConnectionToGroupOperationSpec = {
544
602
  path: "/api/hubs/{hub}/groups/{group}/connections/{connectionId}",
545
603
  httpMethod: "PUT",
546
604
  responses: {
547
605
  200: {},
548
- 404: {},
549
606
  default: {
550
607
  bodyMapper: Mappers.ErrorDetail,
551
608
  headersMapper: Mappers.WebPubSubAddConnectionToGroupExceptionHeaders
@@ -561,22 +618,61 @@ const addConnectionToGroupOperationSpec = {
561
618
  headerParameters: [Parameters.accept],
562
619
  serializer
563
620
  };
564
- const removeConnectionFromGroupOperationSpec = {
565
- path: "/api/hubs/{hub}/groups/{group}/connections/{connectionId}",
621
+ const revokePermissionOperationSpec = {
622
+ path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
566
623
  httpMethod: "DELETE",
567
624
  responses: {
568
625
  204: {},
569
626
  default: {
570
627
  bodyMapper: Mappers.ErrorDetail,
571
- headersMapper: Mappers.WebPubSubRemoveConnectionFromGroupExceptionHeaders
628
+ headersMapper: Mappers.WebPubSubRevokePermissionExceptionHeaders
572
629
  }
573
630
  },
574
- queryParameters: [Parameters.apiVersion],
631
+ queryParameters: [Parameters.apiVersion, Parameters.targetName],
575
632
  urlParameters: [
576
633
  Parameters.endpoint,
577
634
  Parameters.hub,
578
635
  Parameters.connectionId,
579
- Parameters.group
636
+ Parameters.permission
637
+ ],
638
+ headerParameters: [Parameters.accept],
639
+ serializer
640
+ };
641
+ const checkPermissionOperationSpec = {
642
+ path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
643
+ httpMethod: "HEAD",
644
+ responses: {
645
+ 200: {},
646
+ 404: {},
647
+ default: {
648
+ headersMapper: Mappers.WebPubSubCheckPermissionExceptionHeaders
649
+ }
650
+ },
651
+ queryParameters: [Parameters.apiVersion, Parameters.targetName],
652
+ urlParameters: [
653
+ Parameters.endpoint,
654
+ Parameters.hub,
655
+ Parameters.connectionId,
656
+ Parameters.permission
657
+ ],
658
+ serializer
659
+ };
660
+ const grantPermissionOperationSpec = {
661
+ path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
662
+ httpMethod: "PUT",
663
+ responses: {
664
+ 200: {},
665
+ default: {
666
+ bodyMapper: Mappers.ErrorDetail,
667
+ headersMapper: Mappers.WebPubSubGrantPermissionExceptionHeaders
668
+ }
669
+ },
670
+ queryParameters: [Parameters.apiVersion, Parameters.targetName],
671
+ urlParameters: [
672
+ Parameters.endpoint,
673
+ Parameters.hub,
674
+ Parameters.connectionId,
675
+ Parameters.permission
580
676
  ],
581
677
  headerParameters: [Parameters.accept],
582
678
  serializer
@@ -588,13 +684,11 @@ const userExistsOperationSpec = {
588
684
  200: {},
589
685
  404: {},
590
686
  default: {
591
- bodyMapper: Mappers.ErrorDetail,
592
687
  headersMapper: Mappers.WebPubSubUserExistsExceptionHeaders
593
688
  }
594
689
  },
595
690
  queryParameters: [Parameters.apiVersion],
596
691
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
597
- headerParameters: [Parameters.accept],
598
692
  serializer
599
693
  };
600
694
  const closeUserConnectionsOperationSpec = {
@@ -627,9 +721,9 @@ const sendToUser$binaryOperationSpec = {
627
721
  }
628
722
  },
629
723
  requestBody: Parameters.message,
630
- queryParameters: [Parameters.apiVersion],
724
+ queryParameters: [Parameters.apiVersion, Parameters.filter],
631
725
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
632
- headerParameters: [Parameters.contentType, Parameters.accept1],
726
+ headerParameters: [Parameters.contentType, Parameters.accept2],
633
727
  mediaType: "binary",
634
728
  serializer
635
729
  };
@@ -644,30 +738,24 @@ const sendToUser$textOperationSpec = {
644
738
  }
645
739
  },
646
740
  requestBody: Parameters.message1,
647
- queryParameters: [Parameters.apiVersion],
741
+ queryParameters: [Parameters.apiVersion, Parameters.filter],
648
742
  urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
649
- headerParameters: [Parameters.contentType1, Parameters.accept2],
743
+ headerParameters: [Parameters.contentType1, Parameters.accept3],
650
744
  mediaType: "text",
651
745
  serializer
652
746
  };
653
- const addUserToGroupOperationSpec = {
654
- path: "/api/hubs/{hub}/users/{userId}/groups/{group}",
655
- httpMethod: "PUT",
747
+ const removeUserFromAllGroupsOperationSpec = {
748
+ path: "/api/hubs/{hub}/users/{userId}/groups",
749
+ httpMethod: "DELETE",
656
750
  responses: {
657
- 200: {},
658
- 404: {},
751
+ 204: {},
659
752
  default: {
660
753
  bodyMapper: Mappers.ErrorDetail,
661
- headersMapper: Mappers.WebPubSubAddUserToGroupExceptionHeaders
754
+ headersMapper: Mappers.WebPubSubRemoveUserFromAllGroupsExceptionHeaders
662
755
  }
663
756
  },
664
757
  queryParameters: [Parameters.apiVersion],
665
- urlParameters: [
666
- Parameters.endpoint,
667
- Parameters.hub,
668
- Parameters.group,
669
- Parameters.userId1
670
- ],
758
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
671
759
  headerParameters: [Parameters.accept],
672
760
  serializer
673
761
  };
@@ -691,78 +779,22 @@ const removeUserFromGroupOperationSpec = {
691
779
  headerParameters: [Parameters.accept],
692
780
  serializer
693
781
  };
694
- const removeUserFromAllGroupsOperationSpec = {
695
- path: "/api/hubs/{hub}/users/{userId}/groups",
696
- httpMethod: "DELETE",
697
- responses: {
698
- 204: {},
699
- default: {
700
- bodyMapper: Mappers.ErrorDetail,
701
- headersMapper: Mappers.WebPubSubRemoveUserFromAllGroupsExceptionHeaders
702
- }
703
- },
704
- queryParameters: [Parameters.apiVersion],
705
- urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
706
- headerParameters: [Parameters.accept],
707
- serializer
708
- };
709
- const grantPermissionOperationSpec = {
710
- path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
782
+ const addUserToGroupOperationSpec = {
783
+ path: "/api/hubs/{hub}/users/{userId}/groups/{group}",
711
784
  httpMethod: "PUT",
712
785
  responses: {
713
786
  200: {},
714
787
  default: {
715
788
  bodyMapper: Mappers.ErrorDetail,
716
- headersMapper: Mappers.WebPubSubGrantPermissionExceptionHeaders
717
- }
718
- },
719
- queryParameters: [Parameters.apiVersion, Parameters.targetName],
720
- urlParameters: [
721
- Parameters.endpoint,
722
- Parameters.hub,
723
- Parameters.connectionId,
724
- Parameters.permission
725
- ],
726
- headerParameters: [Parameters.accept],
727
- serializer
728
- };
729
- const revokePermissionOperationSpec = {
730
- path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
731
- httpMethod: "DELETE",
732
- responses: {
733
- 204: {},
734
- default: {
735
- bodyMapper: Mappers.ErrorDetail,
736
- headersMapper: Mappers.WebPubSubRevokePermissionExceptionHeaders
737
- }
738
- },
739
- queryParameters: [Parameters.apiVersion, Parameters.targetName],
740
- urlParameters: [
741
- Parameters.endpoint,
742
- Parameters.hub,
743
- Parameters.connectionId,
744
- Parameters.permission
745
- ],
746
- headerParameters: [Parameters.accept],
747
- serializer
748
- };
749
- const checkPermissionOperationSpec = {
750
- path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
751
- httpMethod: "HEAD",
752
- responses: {
753
- 200: {},
754
- 404: {},
755
- default: {
756
- bodyMapper: Mappers.ErrorDetail,
757
- headersMapper: Mappers.WebPubSubCheckPermissionExceptionHeaders
789
+ headersMapper: Mappers.WebPubSubAddUserToGroupExceptionHeaders
758
790
  }
759
791
  },
760
- queryParameters: [Parameters.apiVersion, Parameters.targetName],
792
+ queryParameters: [Parameters.apiVersion],
761
793
  urlParameters: [
762
794
  Parameters.endpoint,
763
795
  Parameters.hub,
764
- Parameters.connectionId,
765
- Parameters.permission
796
+ Parameters.group,
797
+ Parameters.userId1
766
798
  ],
767
799
  headerParameters: [Parameters.accept],
768
800
  serializer