@azure/web-pubsub 1.0.0-beta.3 → 1.0.1-alpha.20220103.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +107 -33
  3. package/dist/index.js +1048 -233
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/samples-dev/directMessage.js +1 -1
  6. package/dist-esm/samples-dev/directMessage.js.map +1 -1
  7. package/dist-esm/src/generated/generatedClient.js +3 -3
  8. package/dist-esm/src/generated/generatedClient.js.map +1 -1
  9. package/dist-esm/src/generated/generatedClientContext.js +8 -8
  10. package/dist-esm/src/generated/generatedClientContext.js.map +1 -1
  11. package/dist-esm/src/generated/models/index.js +6 -1
  12. package/dist-esm/src/generated/models/index.js.map +1 -1
  13. package/dist-esm/src/generated/models/mappers.js +368 -0
  14. package/dist-esm/src/generated/models/mappers.js.map +1 -0
  15. package/dist-esm/src/generated/models/parameters.js +105 -23
  16. package/dist-esm/src/generated/models/parameters.js.map +1 -1
  17. package/dist-esm/src/generated/operations/healthApi.js +4 -3
  18. package/dist-esm/src/generated/operations/healthApi.js.map +1 -1
  19. package/dist-esm/src/generated/operations/webPubSub.js +315 -59
  20. package/dist-esm/src/generated/operations/webPubSub.js.map +1 -1
  21. package/dist-esm/src/generated/operationsInterfaces/webPubSub.js.map +1 -1
  22. package/dist-esm/src/groupClient.js +32 -21
  23. package/dist-esm/src/groupClient.js.map +1 -1
  24. package/dist-esm/src/hubClient.js +162 -107
  25. package/dist-esm/src/hubClient.js.map +1 -1
  26. package/dist-esm/src/index.js +1 -1
  27. package/dist-esm/src/index.js.map +1 -1
  28. package/dist-esm/src/logger.js +1 -1
  29. package/dist-esm/src/logger.js.map +1 -1
  30. package/dist-esm/src/parseConnectionString.js +3 -1
  31. package/dist-esm/src/parseConnectionString.js.map +1 -1
  32. package/dist-esm/src/reverseProxyPolicy.js +21 -0
  33. package/dist-esm/src/reverseProxyPolicy.js.map +1 -0
  34. package/dist-esm/src/tracing.js +1 -1
  35. package/dist-esm/src/tracing.js.map +1 -1
  36. package/dist-esm/src/utils.js +2 -0
  37. package/dist-esm/src/utils.js.map +1 -1
  38. package/dist-esm/src/webPubSubCredentialPolicy.js +2 -2
  39. package/dist-esm/src/webPubSubCredentialPolicy.js.map +1 -1
  40. package/dist-esm/test/conn.spec.js +2 -2
  41. package/dist-esm/test/conn.spec.js.map +1 -1
  42. package/dist-esm/test/groups.spec.js +14 -6
  43. package/dist-esm/test/groups.spec.js.map +1 -1
  44. package/dist-esm/test/hubs.spec.js +53 -10
  45. package/dist-esm/test/hubs.spec.js.map +1 -1
  46. package/dist-esm/test/integration.spec.js +128 -0
  47. package/dist-esm/test/integration.spec.js.map +1 -0
  48. package/dist-esm/test/testEnv.js +6 -2
  49. package/dist-esm/test/testEnv.js.map +1 -1
  50. package/package.json +32 -32
  51. package/types/web-pubsub.d.ts +165 -109
  52. package/dist-esm/src/normalizeOptions.js +0 -8
  53. package/dist-esm/src/normalizeOptions.js.map +0 -1
@@ -6,8 +6,9 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
  import * as coreClient from "@azure/core-client";
9
+ import * as Mappers from "../models/mappers";
9
10
  import * as Parameters from "../models/parameters";
10
- /** Class representing a WebPubSub. */
11
+ /** Class containing WebPubSub operations. */
11
12
  export class WebPubSubImpl {
12
13
  /**
13
14
  * Initialize a new instance of the class WebPubSub class.
@@ -16,6 +17,24 @@ export class WebPubSubImpl {
16
17
  constructor(client) {
17
18
  this.client = client;
18
19
  }
20
+ /**
21
+ * Generate token for the client to connect Azure Web PubSub service.
22
+ * @param hub Target hub name, which should start with alphabetic characters and only contain
23
+ * alpha-numeric characters or underscore.
24
+ * @param options The options parameters.
25
+ */
26
+ generateClientToken(hub, options) {
27
+ return this.client.sendOperationRequest({ hub, options }, generateClientTokenOperationSpec);
28
+ }
29
+ /**
30
+ * Close the connections in the hub.
31
+ * @param hub Target hub name, which should start with alphabetic characters and only contain
32
+ * alpha-numeric characters or underscore.
33
+ * @param options The options parameters.
34
+ */
35
+ closeAllConnections(hub, options) {
36
+ return this.client.sendOperationRequest({ hub, options }, closeAllConnectionsOperationSpec);
37
+ }
19
38
  /**
20
39
  * Broadcast content inside request body to all the connected client connections.
21
40
  * @param args Includes all the parameters for this operation.
@@ -68,8 +87,8 @@ export class WebPubSubImpl {
68
87
  * @param connectionId Target connection Id.
69
88
  * @param options The options parameters.
70
89
  */
71
- closeClientConnection(hub, connectionId, options) {
72
- return this.client.sendOperationRequest({ hub, connectionId, options }, closeClientConnectionOperationSpec);
90
+ closeConnection(hub, connectionId, options) {
91
+ return this.client.sendOperationRequest({ hub, connectionId, options }, closeConnectionOperationSpec);
73
92
  }
74
93
  /**
75
94
  * Send content inside request body to the specific connection.
@@ -118,6 +137,16 @@ export class WebPubSubImpl {
118
137
  groupExists(hub, group, options) {
119
138
  return this.client.sendOperationRequest({ hub, group, options }, groupExistsOperationSpec);
120
139
  }
140
+ /**
141
+ * Close connections in the specific group.
142
+ * @param hub Target hub name, which should start with alphabetic characters and only contain
143
+ * alpha-numeric characters or underscore.
144
+ * @param group Target group name, which length should be greater than 0 and less than 1025.
145
+ * @param options The options parameters.
146
+ */
147
+ closeGroupConnections(hub, group, options) {
148
+ return this.client.sendOperationRequest({ hub, group, options }, closeGroupConnectionsOperationSpec);
149
+ }
121
150
  /**
122
151
  * Send content inside request body to a group of connections.
123
152
  * @param args Includes all the parameters for this operation.
@@ -187,6 +216,16 @@ export class WebPubSubImpl {
187
216
  userExists(hub, userId, options) {
188
217
  return this.client.sendOperationRequest({ hub, userId, options }, userExistsOperationSpec);
189
218
  }
219
+ /**
220
+ * Close connections for the specific user.
221
+ * @param hub Target hub name, which should start with alphabetic characters and only contain
222
+ * alpha-numeric characters or underscore.
223
+ * @param userId The user Id.
224
+ * @param options The options parameters.
225
+ */
226
+ closeUserConnections(hub, userId, options) {
227
+ return this.client.sendOperationRequest({ hub, userId, options }, closeUserConnectionsOperationSpec);
228
+ }
190
229
  /**
191
230
  * Send content inside request body to the specific user.
192
231
  * @param args Includes all the parameters for this operation.
@@ -291,224 +330,441 @@ export class WebPubSubImpl {
291
330
  }
292
331
  }
293
332
  // Operation Specifications
294
- const serializer = coreClient.createSerializer({}, /* isXml */ false);
333
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
334
+ const generateClientTokenOperationSpec = {
335
+ path: "/api/hubs/{hub}/:generateToken",
336
+ httpMethod: "POST",
337
+ responses: {
338
+ 200: {
339
+ bodyMapper: Mappers.ClientTokenResponse
340
+ },
341
+ default: {
342
+ bodyMapper: Mappers.ErrorDetail,
343
+ headersMapper: Mappers.WebPubSubGenerateClientTokenExceptionHeaders
344
+ }
345
+ },
346
+ queryParameters: [
347
+ Parameters.apiVersion,
348
+ Parameters.userId,
349
+ Parameters.roles,
350
+ Parameters.expirationTimeInMinutes
351
+ ],
352
+ urlParameters: [Parameters.endpoint, Parameters.hub],
353
+ headerParameters: [Parameters.accept],
354
+ serializer
355
+ };
356
+ const closeAllConnectionsOperationSpec = {
357
+ path: "/api/hubs/{hub}/:closeConnections",
358
+ httpMethod: "POST",
359
+ responses: {
360
+ 204: {},
361
+ default: {
362
+ bodyMapper: Mappers.ErrorDetail,
363
+ headersMapper: Mappers.WebPubSubCloseAllConnectionsExceptionHeaders
364
+ }
365
+ },
366
+ queryParameters: [
367
+ Parameters.apiVersion,
368
+ Parameters.excluded,
369
+ Parameters.reason
370
+ ],
371
+ urlParameters: [Parameters.endpoint, Parameters.hub],
372
+ headerParameters: [Parameters.accept],
373
+ serializer
374
+ };
295
375
  const sendToAll$binaryOperationSpec = {
296
376
  path: "/api/hubs/{hub}/:send",
297
377
  httpMethod: "POST",
298
- responses: { 202: {}, default: {} },
378
+ responses: {
379
+ 202: {},
380
+ default: {
381
+ bodyMapper: Mappers.ErrorDetail,
382
+ headersMapper: Mappers.WebPubSubSendToAllExceptionHeaders
383
+ }
384
+ },
299
385
  requestBody: Parameters.message,
300
- queryParameters: [Parameters.apiVersion, Parameters.excluded],
301
- urlParameters: [Parameters.$host, Parameters.hub],
302
- headerParameters: [Parameters.contentType],
386
+ queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
387
+ urlParameters: [Parameters.endpoint, Parameters.hub],
388
+ headerParameters: [Parameters.contentType, Parameters.accept1],
303
389
  mediaType: "binary",
304
390
  serializer
305
391
  };
306
392
  const sendToAll$textOperationSpec = {
307
393
  path: "/api/hubs/{hub}/:send",
308
394
  httpMethod: "POST",
309
- responses: { 202: {}, default: {} },
395
+ responses: {
396
+ 202: {},
397
+ default: {
398
+ bodyMapper: Mappers.ErrorDetail,
399
+ headersMapper: Mappers.WebPubSubSendToAllExceptionHeaders
400
+ }
401
+ },
310
402
  requestBody: Parameters.message1,
311
- queryParameters: [Parameters.apiVersion, Parameters.excluded],
312
- urlParameters: [Parameters.$host, Parameters.hub],
313
- headerParameters: [Parameters.contentType1],
403
+ queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
404
+ urlParameters: [Parameters.endpoint, Parameters.hub],
405
+ headerParameters: [Parameters.contentType1, Parameters.accept2],
314
406
  mediaType: "text",
315
407
  serializer
316
408
  };
317
409
  const connectionExistsOperationSpec = {
318
410
  path: "/api/hubs/{hub}/connections/{connectionId}",
319
411
  httpMethod: "HEAD",
320
- responses: { 200: {}, 404: {}, default: {} },
412
+ responses: {
413
+ 200: {},
414
+ 404: {},
415
+ default: {
416
+ bodyMapper: Mappers.ErrorDetail,
417
+ headersMapper: Mappers.WebPubSubConnectionExistsExceptionHeaders
418
+ }
419
+ },
321
420
  queryParameters: [Parameters.apiVersion],
322
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],
421
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
422
+ headerParameters: [Parameters.accept],
323
423
  serializer
324
424
  };
325
- const closeClientConnectionOperationSpec = {
425
+ const closeConnectionOperationSpec = {
326
426
  path: "/api/hubs/{hub}/connections/{connectionId}",
327
427
  httpMethod: "DELETE",
328
- responses: { 200: {}, default: {} },
428
+ responses: {
429
+ 204: {},
430
+ default: {
431
+ bodyMapper: Mappers.ErrorDetail,
432
+ headersMapper: Mappers.WebPubSubCloseConnectionExceptionHeaders
433
+ }
434
+ },
329
435
  queryParameters: [Parameters.apiVersion, Parameters.reason],
330
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],
436
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
437
+ headerParameters: [Parameters.accept],
331
438
  serializer
332
439
  };
333
440
  const sendToConnection$binaryOperationSpec = {
334
441
  path: "/api/hubs/{hub}/connections/{connectionId}/:send",
335
442
  httpMethod: "POST",
336
- responses: { 202: {}, default: {} },
443
+ responses: {
444
+ 202: {},
445
+ default: {
446
+ bodyMapper: Mappers.ErrorDetail,
447
+ headersMapper: Mappers.WebPubSubSendToConnectionExceptionHeaders
448
+ }
449
+ },
337
450
  requestBody: Parameters.message,
338
451
  queryParameters: [Parameters.apiVersion],
339
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],
340
- headerParameters: [Parameters.contentType],
452
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
453
+ headerParameters: [Parameters.contentType, Parameters.accept1],
341
454
  mediaType: "binary",
342
455
  serializer
343
456
  };
344
457
  const sendToConnection$textOperationSpec = {
345
458
  path: "/api/hubs/{hub}/connections/{connectionId}/:send",
346
459
  httpMethod: "POST",
347
- responses: { 202: {}, default: {} },
460
+ responses: {
461
+ 202: {},
462
+ default: {
463
+ bodyMapper: Mappers.ErrorDetail,
464
+ headersMapper: Mappers.WebPubSubSendToConnectionExceptionHeaders
465
+ }
466
+ },
348
467
  requestBody: Parameters.message1,
349
468
  queryParameters: [Parameters.apiVersion],
350
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],
351
- headerParameters: [Parameters.contentType1],
469
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
470
+ headerParameters: [Parameters.contentType1, Parameters.accept2],
352
471
  mediaType: "text",
353
472
  serializer
354
473
  };
355
474
  const groupExistsOperationSpec = {
356
475
  path: "/api/hubs/{hub}/groups/{group}",
357
476
  httpMethod: "HEAD",
358
- responses: { 200: {}, 404: {}, default: {} },
477
+ responses: {
478
+ 200: {},
479
+ 404: {},
480
+ default: {
481
+ bodyMapper: Mappers.ErrorDetail,
482
+ headersMapper: Mappers.WebPubSubGroupExistsExceptionHeaders
483
+ }
484
+ },
359
485
  queryParameters: [Parameters.apiVersion],
360
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.group],
486
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
487
+ headerParameters: [Parameters.accept],
488
+ serializer
489
+ };
490
+ const closeGroupConnectionsOperationSpec = {
491
+ path: "/api/hubs/{hub}/groups/{group}/:closeConnections",
492
+ httpMethod: "POST",
493
+ responses: {
494
+ 204: {},
495
+ default: {
496
+ bodyMapper: Mappers.ErrorDetail,
497
+ headersMapper: Mappers.WebPubSubCloseGroupConnectionsExceptionHeaders
498
+ }
499
+ },
500
+ queryParameters: [
501
+ Parameters.apiVersion,
502
+ Parameters.excluded,
503
+ Parameters.reason
504
+ ],
505
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
506
+ headerParameters: [Parameters.accept],
361
507
  serializer
362
508
  };
363
509
  const sendToGroup$binaryOperationSpec = {
364
510
  path: "/api/hubs/{hub}/groups/{group}/:send",
365
511
  httpMethod: "POST",
366
- responses: { 202: {}, default: {} },
512
+ responses: {
513
+ 202: {},
514
+ default: {
515
+ bodyMapper: Mappers.ErrorDetail,
516
+ headersMapper: Mappers.WebPubSubSendToGroupExceptionHeaders
517
+ }
518
+ },
367
519
  requestBody: Parameters.message,
368
- queryParameters: [Parameters.apiVersion, Parameters.excluded],
369
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.group],
370
- headerParameters: [Parameters.contentType],
520
+ queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
521
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
522
+ headerParameters: [Parameters.contentType, Parameters.accept1],
371
523
  mediaType: "binary",
372
524
  serializer
373
525
  };
374
526
  const sendToGroup$textOperationSpec = {
375
527
  path: "/api/hubs/{hub}/groups/{group}/:send",
376
528
  httpMethod: "POST",
377
- responses: { 202: {}, default: {} },
529
+ responses: {
530
+ 202: {},
531
+ default: {
532
+ bodyMapper: Mappers.ErrorDetail,
533
+ headersMapper: Mappers.WebPubSubSendToGroupExceptionHeaders
534
+ }
535
+ },
378
536
  requestBody: Parameters.message1,
379
- queryParameters: [Parameters.apiVersion, Parameters.excluded],
380
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.group],
381
- headerParameters: [Parameters.contentType1],
537
+ queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
538
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
539
+ headerParameters: [Parameters.contentType1, Parameters.accept2],
382
540
  mediaType: "text",
383
541
  serializer
384
542
  };
385
543
  const addConnectionToGroupOperationSpec = {
386
544
  path: "/api/hubs/{hub}/groups/{group}/connections/{connectionId}",
387
545
  httpMethod: "PUT",
388
- responses: { 200: {}, 404: {}, default: {} },
546
+ responses: {
547
+ 200: {},
548
+ 404: {},
549
+ default: {
550
+ bodyMapper: Mappers.ErrorDetail,
551
+ headersMapper: Mappers.WebPubSubAddConnectionToGroupExceptionHeaders
552
+ }
553
+ },
389
554
  queryParameters: [Parameters.apiVersion],
390
555
  urlParameters: [
391
- Parameters.$host,
556
+ Parameters.endpoint,
392
557
  Parameters.hub,
393
558
  Parameters.connectionId,
394
559
  Parameters.group
395
560
  ],
561
+ headerParameters: [Parameters.accept],
396
562
  serializer
397
563
  };
398
564
  const removeConnectionFromGroupOperationSpec = {
399
565
  path: "/api/hubs/{hub}/groups/{group}/connections/{connectionId}",
400
566
  httpMethod: "DELETE",
401
- responses: { 200: {}, default: {} },
567
+ responses: {
568
+ 204: {},
569
+ default: {
570
+ bodyMapper: Mappers.ErrorDetail,
571
+ headersMapper: Mappers.WebPubSubRemoveConnectionFromGroupExceptionHeaders
572
+ }
573
+ },
402
574
  queryParameters: [Parameters.apiVersion],
403
575
  urlParameters: [
404
- Parameters.$host,
576
+ Parameters.endpoint,
405
577
  Parameters.hub,
406
578
  Parameters.connectionId,
407
579
  Parameters.group
408
580
  ],
581
+ headerParameters: [Parameters.accept],
409
582
  serializer
410
583
  };
411
584
  const userExistsOperationSpec = {
412
585
  path: "/api/hubs/{hub}/users/{userId}",
413
586
  httpMethod: "HEAD",
414
- responses: { 200: {}, 404: {}, default: {} },
587
+ responses: {
588
+ 200: {},
589
+ 404: {},
590
+ default: {
591
+ bodyMapper: Mappers.ErrorDetail,
592
+ headersMapper: Mappers.WebPubSubUserExistsExceptionHeaders
593
+ }
594
+ },
415
595
  queryParameters: [Parameters.apiVersion],
416
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],
596
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
597
+ headerParameters: [Parameters.accept],
598
+ serializer
599
+ };
600
+ const closeUserConnectionsOperationSpec = {
601
+ path: "/api/hubs/{hub}/users/{userId}/:closeConnections",
602
+ httpMethod: "POST",
603
+ responses: {
604
+ 204: {},
605
+ default: {
606
+ bodyMapper: Mappers.ErrorDetail,
607
+ headersMapper: Mappers.WebPubSubCloseUserConnectionsExceptionHeaders
608
+ }
609
+ },
610
+ queryParameters: [
611
+ Parameters.apiVersion,
612
+ Parameters.excluded,
613
+ Parameters.reason
614
+ ],
615
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
616
+ headerParameters: [Parameters.accept],
417
617
  serializer
418
618
  };
419
619
  const sendToUser$binaryOperationSpec = {
420
620
  path: "/api/hubs/{hub}/users/{userId}/:send",
421
621
  httpMethod: "POST",
422
- responses: { 202: {}, default: {} },
622
+ responses: {
623
+ 202: {},
624
+ default: {
625
+ bodyMapper: Mappers.ErrorDetail,
626
+ headersMapper: Mappers.WebPubSubSendToUserExceptionHeaders
627
+ }
628
+ },
423
629
  requestBody: Parameters.message,
424
630
  queryParameters: [Parameters.apiVersion],
425
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],
426
- headerParameters: [Parameters.contentType],
631
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
632
+ headerParameters: [Parameters.contentType, Parameters.accept1],
427
633
  mediaType: "binary",
428
634
  serializer
429
635
  };
430
636
  const sendToUser$textOperationSpec = {
431
637
  path: "/api/hubs/{hub}/users/{userId}/:send",
432
638
  httpMethod: "POST",
433
- responses: { 202: {}, default: {} },
639
+ responses: {
640
+ 202: {},
641
+ default: {
642
+ bodyMapper: Mappers.ErrorDetail,
643
+ headersMapper: Mappers.WebPubSubSendToUserExceptionHeaders
644
+ }
645
+ },
434
646
  requestBody: Parameters.message1,
435
647
  queryParameters: [Parameters.apiVersion],
436
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],
437
- headerParameters: [Parameters.contentType1],
648
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
649
+ headerParameters: [Parameters.contentType1, Parameters.accept2],
438
650
  mediaType: "text",
439
651
  serializer
440
652
  };
441
653
  const addUserToGroupOperationSpec = {
442
654
  path: "/api/hubs/{hub}/users/{userId}/groups/{group}",
443
655
  httpMethod: "PUT",
444
- responses: { 200: {}, 404: {}, default: {} },
656
+ responses: {
657
+ 200: {},
658
+ 404: {},
659
+ default: {
660
+ bodyMapper: Mappers.ErrorDetail,
661
+ headersMapper: Mappers.WebPubSubAddUserToGroupExceptionHeaders
662
+ }
663
+ },
445
664
  queryParameters: [Parameters.apiVersion],
446
665
  urlParameters: [
447
- Parameters.$host,
666
+ Parameters.endpoint,
448
667
  Parameters.hub,
449
668
  Parameters.group,
450
- Parameters.userId
669
+ Parameters.userId1
451
670
  ],
671
+ headerParameters: [Parameters.accept],
452
672
  serializer
453
673
  };
454
674
  const removeUserFromGroupOperationSpec = {
455
675
  path: "/api/hubs/{hub}/users/{userId}/groups/{group}",
456
676
  httpMethod: "DELETE",
457
- responses: { 200: {}, default: {} },
677
+ responses: {
678
+ 204: {},
679
+ default: {
680
+ bodyMapper: Mappers.ErrorDetail,
681
+ headersMapper: Mappers.WebPubSubRemoveUserFromGroupExceptionHeaders
682
+ }
683
+ },
458
684
  queryParameters: [Parameters.apiVersion],
459
685
  urlParameters: [
460
- Parameters.$host,
686
+ Parameters.endpoint,
461
687
  Parameters.hub,
462
688
  Parameters.group,
463
- Parameters.userId
689
+ Parameters.userId1
464
690
  ],
691
+ headerParameters: [Parameters.accept],
465
692
  serializer
466
693
  };
467
694
  const removeUserFromAllGroupsOperationSpec = {
468
695
  path: "/api/hubs/{hub}/users/{userId}/groups",
469
696
  httpMethod: "DELETE",
470
- responses: { 200: {}, default: {} },
697
+ responses: {
698
+ 204: {},
699
+ default: {
700
+ bodyMapper: Mappers.ErrorDetail,
701
+ headersMapper: Mappers.WebPubSubRemoveUserFromAllGroupsExceptionHeaders
702
+ }
703
+ },
471
704
  queryParameters: [Parameters.apiVersion],
472
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],
705
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
706
+ headerParameters: [Parameters.accept],
473
707
  serializer
474
708
  };
475
709
  const grantPermissionOperationSpec = {
476
710
  path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
477
711
  httpMethod: "PUT",
478
- responses: { 200: {}, default: {} },
712
+ responses: {
713
+ 200: {},
714
+ default: {
715
+ bodyMapper: Mappers.ErrorDetail,
716
+ headersMapper: Mappers.WebPubSubGrantPermissionExceptionHeaders
717
+ }
718
+ },
479
719
  queryParameters: [Parameters.apiVersion, Parameters.targetName],
480
720
  urlParameters: [
481
- Parameters.$host,
721
+ Parameters.endpoint,
482
722
  Parameters.hub,
483
723
  Parameters.connectionId,
484
724
  Parameters.permission
485
725
  ],
726
+ headerParameters: [Parameters.accept],
486
727
  serializer
487
728
  };
488
729
  const revokePermissionOperationSpec = {
489
730
  path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
490
731
  httpMethod: "DELETE",
491
- responses: { 200: {}, default: {} },
732
+ responses: {
733
+ 204: {},
734
+ default: {
735
+ bodyMapper: Mappers.ErrorDetail,
736
+ headersMapper: Mappers.WebPubSubRevokePermissionExceptionHeaders
737
+ }
738
+ },
492
739
  queryParameters: [Parameters.apiVersion, Parameters.targetName],
493
740
  urlParameters: [
494
- Parameters.$host,
741
+ Parameters.endpoint,
495
742
  Parameters.hub,
496
743
  Parameters.connectionId,
497
744
  Parameters.permission
498
745
  ],
746
+ headerParameters: [Parameters.accept],
499
747
  serializer
500
748
  };
501
749
  const checkPermissionOperationSpec = {
502
750
  path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
503
751
  httpMethod: "HEAD",
504
- responses: { 200: {}, 404: {}, default: {} },
752
+ responses: {
753
+ 200: {},
754
+ 404: {},
755
+ default: {
756
+ bodyMapper: Mappers.ErrorDetail,
757
+ headersMapper: Mappers.WebPubSubCheckPermissionExceptionHeaders
758
+ }
759
+ },
505
760
  queryParameters: [Parameters.apiVersion, Parameters.targetName],
506
761
  urlParameters: [
507
- Parameters.$host,
762
+ Parameters.endpoint,
508
763
  Parameters.hub,
509
764
  Parameters.connectionId,
510
765
  Parameters.permission
511
766
  ],
767
+ headerParameters: [Parameters.accept],
512
768
  serializer
513
769
  };
514
770
  //# sourceMappingURL=webPubSub.js.map