@azure/web-pubsub 1.0.0-beta.2 → 1.0.1-alpha.20211215.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +118 -31
  3. package/dist/index.js +1315 -567
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/samples-dev/broadcasting.js +16 -16
  6. package/dist-esm/samples-dev/broadcasting.js.map +1 -1
  7. package/dist-esm/samples-dev/directMessage.js +9 -9
  8. package/dist-esm/samples-dev/directMessage.js.map +1 -1
  9. package/dist-esm/samples-dev/managingGroups.js +11 -12
  10. package/dist-esm/samples-dev/managingGroups.js.map +1 -1
  11. package/dist-esm/src/generated/generatedClient.js +23 -0
  12. package/dist-esm/src/generated/generatedClient.js.map +1 -0
  13. package/dist-esm/src/generated/generatedClientContext.js +41 -0
  14. package/dist-esm/src/generated/generatedClientContext.js.map +1 -0
  15. package/dist-esm/src/generated/index.js +10 -2
  16. package/dist-esm/src/generated/index.js.map +1 -1
  17. package/dist-esm/src/generated/models/index.js +13 -1
  18. package/dist-esm/src/generated/models/index.js.map +1 -1
  19. package/dist-esm/src/generated/models/mappers.js +368 -0
  20. package/dist-esm/src/generated/models/mappers.js.map +1 -0
  21. package/dist-esm/src/generated/models/parameters.js +124 -43
  22. package/dist-esm/src/generated/models/parameters.js.map +1 -1
  23. package/dist-esm/src/generated/operations/healthApi.js +16 -11
  24. package/dist-esm/src/generated/operations/healthApi.js.map +1 -1
  25. package/dist-esm/src/generated/operations/index.js +7 -0
  26. package/dist-esm/src/generated/operations/index.js.map +1 -1
  27. package/dist-esm/src/generated/operations/webPubSub.js +341 -175
  28. package/dist-esm/src/generated/operations/webPubSub.js.map +1 -1
  29. package/dist-esm/src/generated/operationsInterfaces/healthApi.js +9 -0
  30. package/dist-esm/src/generated/operationsInterfaces/healthApi.js.map +1 -0
  31. package/dist-esm/src/generated/operationsInterfaces/index.js +10 -0
  32. package/dist-esm/src/generated/operationsInterfaces/index.js.map +1 -0
  33. package/dist-esm/src/generated/operationsInterfaces/webPubSub.js +9 -0
  34. package/dist-esm/src/generated/operationsInterfaces/webPubSub.js.map +1 -0
  35. package/dist-esm/src/groupClient.js +74 -92
  36. package/dist-esm/src/groupClient.js.map +1 -1
  37. package/dist-esm/src/hubClient.js +280 -196
  38. package/dist-esm/src/hubClient.js.map +1 -1
  39. package/dist-esm/src/index.js.map +1 -1
  40. package/dist-esm/src/logger.js +1 -1
  41. package/dist-esm/src/logger.js.map +1 -1
  42. package/dist-esm/src/parseConnectionString.js +3 -1
  43. package/dist-esm/src/parseConnectionString.js.map +1 -1
  44. package/dist-esm/src/reverseProxyPolicy.js +21 -0
  45. package/dist-esm/src/reverseProxyPolicy.js.map +1 -0
  46. package/dist-esm/src/utils.js +8 -6
  47. package/dist-esm/src/utils.js.map +1 -1
  48. package/dist-esm/src/webPubSubCredentialPolicy.js +18 -18
  49. package/dist-esm/src/webPubSubCredentialPolicy.js.map +1 -1
  50. package/dist-esm/test/conn.spec.js +7 -8
  51. package/dist-esm/test/conn.spec.js.map +1 -1
  52. package/dist-esm/test/groups.spec.js +39 -38
  53. package/dist-esm/test/groups.spec.js.map +1 -1
  54. package/dist-esm/test/hubs.spec.js +95 -49
  55. package/dist-esm/test/hubs.spec.js.map +1 -1
  56. package/dist-esm/test/integration.spec.js +128 -0
  57. package/dist-esm/test/integration.spec.js.map +1 -0
  58. package/dist-esm/test/testEnv.js +5 -1
  59. package/dist-esm/test/testEnv.js.map +1 -1
  60. package/package.json +37 -36
  61. package/types/web-pubsub.d.ts +186 -138
  62. package/dist-esm/src/generated/azureWebPubSubServiceRestAPI.js +0 -15
  63. package/dist-esm/src/generated/azureWebPubSubServiceRestAPI.js.map +0 -1
  64. package/dist-esm/src/generated/azureWebPubSubServiceRestAPIContext.js +0 -34
  65. package/dist-esm/src/generated/azureWebPubSubServiceRestAPIContext.js.map +0 -1
  66. package/dist-esm/src/normalizeOptions.js +0 -8
  67. package/dist-esm/src/normalizeOptions.js.map +0 -1
@@ -1,7 +1,15 @@
1
- import * as coreHttp from "@azure/core-http";
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import * as coreClient from "@azure/core-client";
9
+ import * as Mappers from "../models/mappers";
2
10
  import * as Parameters from "../models/parameters";
3
- /** Class representing a WebPubSub. */
4
- export class WebPubSub {
11
+ /** Class containing WebPubSub operations. */
12
+ export class WebPubSubImpl {
5
13
  /**
6
14
  * Initialize a new instance of the class WebPubSub class.
7
15
  * @param client Reference to the service client
@@ -9,6 +17,24 @@ export class WebPubSub {
9
17
  constructor(client) {
10
18
  this.client = client;
11
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
+ }
12
38
  /**
13
39
  * Broadcast content inside request body to all the connected client connections.
14
40
  * @param args Includes all the parameters for this operation.
@@ -41,7 +67,7 @@ export class WebPubSub {
41
67
  else {
42
68
  throw new TypeError(`"contentType" must be a valid value but instead was "${args[1]}".`);
43
69
  }
44
- operationArguments.options = coreHttp.operationOptionsToRequestOptionsBase(options || {});
70
+ operationArguments.options = options || {};
45
71
  return this.client.sendOperationRequest(operationArguments, operationSpec);
46
72
  }
47
73
  /**
@@ -52,12 +78,7 @@ export class WebPubSub {
52
78
  * @param options The options parameters.
53
79
  */
54
80
  connectionExists(hub, connectionId, options) {
55
- const operationArguments = {
56
- hub,
57
- connectionId,
58
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
59
- };
60
- return this.client.sendOperationRequest(operationArguments, connectionExistsOperationSpec);
81
+ return this.client.sendOperationRequest({ hub, connectionId, options }, connectionExistsOperationSpec);
61
82
  }
62
83
  /**
63
84
  * Close the client connection.
@@ -66,13 +87,8 @@ export class WebPubSub {
66
87
  * @param connectionId Target connection Id.
67
88
  * @param options The options parameters.
68
89
  */
69
- closeClientConnection(hub, connectionId, options) {
70
- const operationArguments = {
71
- hub,
72
- connectionId,
73
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
74
- };
75
- return this.client.sendOperationRequest(operationArguments, closeClientConnectionOperationSpec);
90
+ closeConnection(hub, connectionId, options) {
91
+ return this.client.sendOperationRequest({ hub, connectionId, options }, closeConnectionOperationSpec);
76
92
  }
77
93
  /**
78
94
  * Send content inside request body to the specific connection.
@@ -108,7 +124,7 @@ export class WebPubSub {
108
124
  else {
109
125
  throw new TypeError(`"contentType" must be a valid value but instead was "${args[2]}".`);
110
126
  }
111
- operationArguments.options = coreHttp.operationOptionsToRequestOptionsBase(options || {});
127
+ operationArguments.options = options || {};
112
128
  return this.client.sendOperationRequest(operationArguments, operationSpec);
113
129
  }
114
130
  /**
@@ -119,12 +135,17 @@ export class WebPubSub {
119
135
  * @param options The options parameters.
120
136
  */
121
137
  groupExists(hub, group, options) {
122
- const operationArguments = {
123
- hub,
124
- group,
125
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
126
- };
127
- return this.client.sendOperationRequest(operationArguments, groupExistsOperationSpec);
138
+ return this.client.sendOperationRequest({ hub, group, options }, groupExistsOperationSpec);
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);
128
149
  }
129
150
  /**
130
151
  * Send content inside request body to a group of connections.
@@ -160,7 +181,7 @@ export class WebPubSub {
160
181
  else {
161
182
  throw new TypeError(`"contentType" must be a valid value but instead was "${args[2]}".`);
162
183
  }
163
- operationArguments.options = coreHttp.operationOptionsToRequestOptionsBase(options || {});
184
+ operationArguments.options = options || {};
164
185
  return this.client.sendOperationRequest(operationArguments, operationSpec);
165
186
  }
166
187
  /**
@@ -172,13 +193,7 @@ export class WebPubSub {
172
193
  * @param options The options parameters.
173
194
  */
174
195
  addConnectionToGroup(hub, group, connectionId, options) {
175
- const operationArguments = {
176
- hub,
177
- group,
178
- connectionId,
179
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
180
- };
181
- return this.client.sendOperationRequest(operationArguments, addConnectionToGroupOperationSpec);
196
+ return this.client.sendOperationRequest({ hub, group, connectionId, options }, addConnectionToGroupOperationSpec);
182
197
  }
183
198
  /**
184
199
  * Remove a connection from the target group.
@@ -189,13 +204,7 @@ export class WebPubSub {
189
204
  * @param options The options parameters.
190
205
  */
191
206
  removeConnectionFromGroup(hub, group, connectionId, options) {
192
- const operationArguments = {
193
- hub,
194
- group,
195
- connectionId,
196
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
197
- };
198
- return this.client.sendOperationRequest(operationArguments, removeConnectionFromGroupOperationSpec);
207
+ return this.client.sendOperationRequest({ hub, group, connectionId, options }, removeConnectionFromGroupOperationSpec);
199
208
  }
200
209
  /**
201
210
  * Check if there are any client connections connected for the given user.
@@ -205,12 +214,17 @@ export class WebPubSub {
205
214
  * @param options The options parameters.
206
215
  */
207
216
  userExists(hub, userId, options) {
208
- const operationArguments = {
209
- hub,
210
- userId,
211
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
212
- };
213
- return this.client.sendOperationRequest(operationArguments, userExistsOperationSpec);
217
+ return this.client.sendOperationRequest({ hub, userId, options }, userExistsOperationSpec);
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);
214
228
  }
215
229
  /**
216
230
  * Send content inside request body to the specific user.
@@ -246,26 +260,9 @@ export class WebPubSub {
246
260
  else {
247
261
  throw new TypeError(`"contentType" must be a valid value but instead was "${args[2]}".`);
248
262
  }
249
- operationArguments.options = coreHttp.operationOptionsToRequestOptionsBase(options || {});
263
+ operationArguments.options = options || {};
250
264
  return this.client.sendOperationRequest(operationArguments, operationSpec);
251
265
  }
252
- /**
253
- * Check whether a user exists in the target group.
254
- * @param hub Target hub name, which should start with alphabetic characters and only contain
255
- * alpha-numeric characters or underscore.
256
- * @param group Target group name, which length should be greater than 0 and less than 1025.
257
- * @param userId Target user Id.
258
- * @param options The options parameters.
259
- */
260
- userExistsInGroup(hub, group, userId, options) {
261
- const operationArguments = {
262
- hub,
263
- group,
264
- userId,
265
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
266
- };
267
- return this.client.sendOperationRequest(operationArguments, userExistsInGroupOperationSpec);
268
- }
269
266
  /**
270
267
  * Add a user to the target group.
271
268
  * @param hub Target hub name, which should start with alphabetic characters and only contain
@@ -275,13 +272,7 @@ export class WebPubSub {
275
272
  * @param options The options parameters.
276
273
  */
277
274
  addUserToGroup(hub, group, userId, options) {
278
- const operationArguments = {
279
- hub,
280
- group,
281
- userId,
282
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
283
- };
284
- return this.client.sendOperationRequest(operationArguments, addUserToGroupOperationSpec);
275
+ return this.client.sendOperationRequest({ hub, group, userId, options }, addUserToGroupOperationSpec);
285
276
  }
286
277
  /**
287
278
  * Remove a user from the target group.
@@ -292,13 +283,7 @@ export class WebPubSub {
292
283
  * @param options The options parameters.
293
284
  */
294
285
  removeUserFromGroup(hub, group, userId, options) {
295
- const operationArguments = {
296
- hub,
297
- group,
298
- userId,
299
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
300
- };
301
- return this.client.sendOperationRequest(operationArguments, removeUserFromGroupOperationSpec);
286
+ return this.client.sendOperationRequest({ hub, group, userId, options }, removeUserFromGroupOperationSpec);
302
287
  }
303
288
  /**
304
289
  * Remove a user from all groups.
@@ -308,12 +293,7 @@ export class WebPubSub {
308
293
  * @param options The options parameters.
309
294
  */
310
295
  removeUserFromAllGroups(hub, userId, options) {
311
- const operationArguments = {
312
- hub,
313
- userId,
314
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
315
- };
316
- return this.client.sendOperationRequest(operationArguments, removeUserFromAllGroupsOperationSpec);
296
+ return this.client.sendOperationRequest({ hub, userId, options }, removeUserFromAllGroupsOperationSpec);
317
297
  }
318
298
  /**
319
299
  * Grant permission to the connection.
@@ -324,13 +304,7 @@ export class WebPubSub {
324
304
  * @param options The options parameters.
325
305
  */
326
306
  grantPermission(hub, permission, connectionId, options) {
327
- const operationArguments = {
328
- hub,
329
- permission,
330
- connectionId,
331
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
332
- };
333
- return this.client.sendOperationRequest(operationArguments, grantPermissionOperationSpec);
307
+ return this.client.sendOperationRequest({ hub, permission, connectionId, options }, grantPermissionOperationSpec);
334
308
  }
335
309
  /**
336
310
  * Revoke permission for the connection.
@@ -341,13 +315,7 @@ export class WebPubSub {
341
315
  * @param options The options parameters.
342
316
  */
343
317
  revokePermission(hub, permission, connectionId, options) {
344
- const operationArguments = {
345
- hub,
346
- permission,
347
- connectionId,
348
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
349
- };
350
- return this.client.sendOperationRequest(operationArguments, revokePermissionOperationSpec);
318
+ return this.client.sendOperationRequest({ hub, permission, connectionId, options }, revokePermissionOperationSpec);
351
319
  }
352
320
  /**
353
321
  * Check if a connection has permission to the specified action.
@@ -358,247 +326,445 @@ export class WebPubSub {
358
326
  * @param options The options parameters.
359
327
  */
360
328
  checkPermission(hub, permission, connectionId, options) {
361
- const operationArguments = {
362
- hub,
363
- permission,
364
- connectionId,
365
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
366
- };
367
- return this.client.sendOperationRequest(operationArguments, checkPermissionOperationSpec);
329
+ return this.client.sendOperationRequest({ hub, permission, connectionId, options }, checkPermissionOperationSpec);
368
330
  }
369
331
  }
370
332
  // Operation Specifications
371
- const serializer = new coreHttp.Serializer({}, /* 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
+ };
372
375
  const sendToAll$binaryOperationSpec = {
373
376
  path: "/api/hubs/{hub}/:send",
374
377
  httpMethod: "POST",
375
- responses: { 202: {}, default: {} },
378
+ responses: {
379
+ 202: {},
380
+ default: {
381
+ bodyMapper: Mappers.ErrorDetail,
382
+ headersMapper: Mappers.WebPubSubSendToAllExceptionHeaders
383
+ }
384
+ },
376
385
  requestBody: Parameters.message,
377
- queryParameters: [Parameters.apiVersion, Parameters.excluded],
378
- urlParameters: [Parameters.$host, Parameters.hub],
379
- headerParameters: [Parameters.contentType],
386
+ queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
387
+ urlParameters: [Parameters.endpoint, Parameters.hub],
388
+ headerParameters: [Parameters.contentType, Parameters.accept1],
380
389
  mediaType: "binary",
381
390
  serializer
382
391
  };
383
392
  const sendToAll$textOperationSpec = {
384
393
  path: "/api/hubs/{hub}/:send",
385
394
  httpMethod: "POST",
386
- responses: { 202: {}, default: {} },
395
+ responses: {
396
+ 202: {},
397
+ default: {
398
+ bodyMapper: Mappers.ErrorDetail,
399
+ headersMapper: Mappers.WebPubSubSendToAllExceptionHeaders
400
+ }
401
+ },
387
402
  requestBody: Parameters.message1,
388
- queryParameters: [Parameters.apiVersion, Parameters.excluded],
389
- urlParameters: [Parameters.$host, Parameters.hub],
390
- headerParameters: [Parameters.contentType1],
403
+ queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
404
+ urlParameters: [Parameters.endpoint, Parameters.hub],
405
+ headerParameters: [Parameters.contentType1, Parameters.accept2],
391
406
  mediaType: "text",
392
407
  serializer
393
408
  };
394
409
  const connectionExistsOperationSpec = {
395
410
  path: "/api/hubs/{hub}/connections/{connectionId}",
396
411
  httpMethod: "HEAD",
397
- responses: { 200: {}, 404: {}, default: {} },
412
+ responses: {
413
+ 200: {},
414
+ 404: {},
415
+ default: {
416
+ bodyMapper: Mappers.ErrorDetail,
417
+ headersMapper: Mappers.WebPubSubConnectionExistsExceptionHeaders
418
+ }
419
+ },
398
420
  queryParameters: [Parameters.apiVersion],
399
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],
421
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
422
+ headerParameters: [Parameters.accept],
400
423
  serializer
401
424
  };
402
- const closeClientConnectionOperationSpec = {
425
+ const closeConnectionOperationSpec = {
403
426
  path: "/api/hubs/{hub}/connections/{connectionId}",
404
427
  httpMethod: "DELETE",
405
- responses: { 200: {}, default: {} },
428
+ responses: {
429
+ 204: {},
430
+ default: {
431
+ bodyMapper: Mappers.ErrorDetail,
432
+ headersMapper: Mappers.WebPubSubCloseConnectionExceptionHeaders
433
+ }
434
+ },
406
435
  queryParameters: [Parameters.apiVersion, Parameters.reason],
407
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],
436
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
437
+ headerParameters: [Parameters.accept],
408
438
  serializer
409
439
  };
410
440
  const sendToConnection$binaryOperationSpec = {
411
441
  path: "/api/hubs/{hub}/connections/{connectionId}/:send",
412
442
  httpMethod: "POST",
413
- responses: { 202: {}, default: {} },
443
+ responses: {
444
+ 202: {},
445
+ default: {
446
+ bodyMapper: Mappers.ErrorDetail,
447
+ headersMapper: Mappers.WebPubSubSendToConnectionExceptionHeaders
448
+ }
449
+ },
414
450
  requestBody: Parameters.message,
415
451
  queryParameters: [Parameters.apiVersion],
416
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],
417
- headerParameters: [Parameters.contentType],
452
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
453
+ headerParameters: [Parameters.contentType, Parameters.accept1],
418
454
  mediaType: "binary",
419
455
  serializer
420
456
  };
421
457
  const sendToConnection$textOperationSpec = {
422
458
  path: "/api/hubs/{hub}/connections/{connectionId}/:send",
423
459
  httpMethod: "POST",
424
- responses: { 202: {}, default: {} },
460
+ responses: {
461
+ 202: {},
462
+ default: {
463
+ bodyMapper: Mappers.ErrorDetail,
464
+ headersMapper: Mappers.WebPubSubSendToConnectionExceptionHeaders
465
+ }
466
+ },
425
467
  requestBody: Parameters.message1,
426
468
  queryParameters: [Parameters.apiVersion],
427
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],
428
- headerParameters: [Parameters.contentType1],
469
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
470
+ headerParameters: [Parameters.contentType1, Parameters.accept2],
429
471
  mediaType: "text",
430
472
  serializer
431
473
  };
432
474
  const groupExistsOperationSpec = {
433
475
  path: "/api/hubs/{hub}/groups/{group}",
434
476
  httpMethod: "HEAD",
435
- responses: { 200: {}, 404: {}, default: {} },
477
+ responses: {
478
+ 200: {},
479
+ 404: {},
480
+ default: {
481
+ bodyMapper: Mappers.ErrorDetail,
482
+ headersMapper: Mappers.WebPubSubGroupExistsExceptionHeaders
483
+ }
484
+ },
436
485
  queryParameters: [Parameters.apiVersion],
437
- 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],
438
507
  serializer
439
508
  };
440
509
  const sendToGroup$binaryOperationSpec = {
441
510
  path: "/api/hubs/{hub}/groups/{group}/:send",
442
511
  httpMethod: "POST",
443
- responses: { 202: {}, default: {} },
512
+ responses: {
513
+ 202: {},
514
+ default: {
515
+ bodyMapper: Mappers.ErrorDetail,
516
+ headersMapper: Mappers.WebPubSubSendToGroupExceptionHeaders
517
+ }
518
+ },
444
519
  requestBody: Parameters.message,
445
- queryParameters: [Parameters.apiVersion, Parameters.excluded],
446
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.group],
447
- headerParameters: [Parameters.contentType],
520
+ queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
521
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
522
+ headerParameters: [Parameters.contentType, Parameters.accept1],
448
523
  mediaType: "binary",
449
524
  serializer
450
525
  };
451
526
  const sendToGroup$textOperationSpec = {
452
527
  path: "/api/hubs/{hub}/groups/{group}/:send",
453
528
  httpMethod: "POST",
454
- responses: { 202: {}, default: {} },
529
+ responses: {
530
+ 202: {},
531
+ default: {
532
+ bodyMapper: Mappers.ErrorDetail,
533
+ headersMapper: Mappers.WebPubSubSendToGroupExceptionHeaders
534
+ }
535
+ },
455
536
  requestBody: Parameters.message1,
456
- queryParameters: [Parameters.apiVersion, Parameters.excluded],
457
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.group],
458
- headerParameters: [Parameters.contentType1],
537
+ queryParameters: [Parameters.apiVersion, Parameters.excludedConnections],
538
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
539
+ headerParameters: [Parameters.contentType1, Parameters.accept2],
459
540
  mediaType: "text",
460
541
  serializer
461
542
  };
462
543
  const addConnectionToGroupOperationSpec = {
463
544
  path: "/api/hubs/{hub}/groups/{group}/connections/{connectionId}",
464
545
  httpMethod: "PUT",
465
- responses: { 200: {}, 404: {}, default: {} },
546
+ responses: {
547
+ 200: {},
548
+ 404: {},
549
+ default: {
550
+ bodyMapper: Mappers.ErrorDetail,
551
+ headersMapper: Mappers.WebPubSubAddConnectionToGroupExceptionHeaders
552
+ }
553
+ },
466
554
  queryParameters: [Parameters.apiVersion],
467
555
  urlParameters: [
468
- Parameters.$host,
556
+ Parameters.endpoint,
469
557
  Parameters.hub,
470
558
  Parameters.connectionId,
471
559
  Parameters.group
472
560
  ],
561
+ headerParameters: [Parameters.accept],
473
562
  serializer
474
563
  };
475
564
  const removeConnectionFromGroupOperationSpec = {
476
565
  path: "/api/hubs/{hub}/groups/{group}/connections/{connectionId}",
477
566
  httpMethod: "DELETE",
478
- responses: { 200: {}, 404: {}, default: {} },
567
+ responses: {
568
+ 204: {},
569
+ default: {
570
+ bodyMapper: Mappers.ErrorDetail,
571
+ headersMapper: Mappers.WebPubSubRemoveConnectionFromGroupExceptionHeaders
572
+ }
573
+ },
479
574
  queryParameters: [Parameters.apiVersion],
480
575
  urlParameters: [
481
- Parameters.$host,
576
+ Parameters.endpoint,
482
577
  Parameters.hub,
483
578
  Parameters.connectionId,
484
579
  Parameters.group
485
580
  ],
581
+ headerParameters: [Parameters.accept],
486
582
  serializer
487
583
  };
488
584
  const userExistsOperationSpec = {
489
585
  path: "/api/hubs/{hub}/users/{userId}",
490
586
  httpMethod: "HEAD",
491
- responses: { 200: {}, 404: {}, default: {} },
587
+ responses: {
588
+ 200: {},
589
+ 404: {},
590
+ default: {
591
+ bodyMapper: Mappers.ErrorDetail,
592
+ headersMapper: Mappers.WebPubSubUserExistsExceptionHeaders
593
+ }
594
+ },
492
595
  queryParameters: [Parameters.apiVersion],
493
- 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],
494
617
  serializer
495
618
  };
496
619
  const sendToUser$binaryOperationSpec = {
497
620
  path: "/api/hubs/{hub}/users/{userId}/:send",
498
621
  httpMethod: "POST",
499
- responses: { 202: {}, default: {} },
622
+ responses: {
623
+ 202: {},
624
+ default: {
625
+ bodyMapper: Mappers.ErrorDetail,
626
+ headersMapper: Mappers.WebPubSubSendToUserExceptionHeaders
627
+ }
628
+ },
500
629
  requestBody: Parameters.message,
501
630
  queryParameters: [Parameters.apiVersion],
502
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],
503
- headerParameters: [Parameters.contentType],
631
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
632
+ headerParameters: [Parameters.contentType, Parameters.accept1],
504
633
  mediaType: "binary",
505
634
  serializer
506
635
  };
507
636
  const sendToUser$textOperationSpec = {
508
637
  path: "/api/hubs/{hub}/users/{userId}/:send",
509
638
  httpMethod: "POST",
510
- responses: { 202: {}, default: {} },
639
+ responses: {
640
+ 202: {},
641
+ default: {
642
+ bodyMapper: Mappers.ErrorDetail,
643
+ headersMapper: Mappers.WebPubSubSendToUserExceptionHeaders
644
+ }
645
+ },
511
646
  requestBody: Parameters.message1,
512
647
  queryParameters: [Parameters.apiVersion],
513
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],
514
- headerParameters: [Parameters.contentType1],
648
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
649
+ headerParameters: [Parameters.contentType1, Parameters.accept2],
515
650
  mediaType: "text",
516
651
  serializer
517
652
  };
518
- const userExistsInGroupOperationSpec = {
519
- path: "/api/hubs/{hub}/users/{userId}/groups/{group}",
520
- httpMethod: "HEAD",
521
- responses: { 200: {}, 404: {}, default: {} },
522
- queryParameters: [Parameters.apiVersion],
523
- urlParameters: [
524
- Parameters.$host,
525
- Parameters.hub,
526
- Parameters.group,
527
- Parameters.userId
528
- ],
529
- serializer
530
- };
531
653
  const addUserToGroupOperationSpec = {
532
654
  path: "/api/hubs/{hub}/users/{userId}/groups/{group}",
533
655
  httpMethod: "PUT",
534
- responses: { 200: {}, default: {} },
656
+ responses: {
657
+ 200: {},
658
+ 404: {},
659
+ default: {
660
+ bodyMapper: Mappers.ErrorDetail,
661
+ headersMapper: Mappers.WebPubSubAddUserToGroupExceptionHeaders
662
+ }
663
+ },
535
664
  queryParameters: [Parameters.apiVersion],
536
665
  urlParameters: [
537
- Parameters.$host,
666
+ Parameters.endpoint,
538
667
  Parameters.hub,
539
668
  Parameters.group,
540
- Parameters.userId
669
+ Parameters.userId1
541
670
  ],
671
+ headerParameters: [Parameters.accept],
542
672
  serializer
543
673
  };
544
674
  const removeUserFromGroupOperationSpec = {
545
675
  path: "/api/hubs/{hub}/users/{userId}/groups/{group}",
546
676
  httpMethod: "DELETE",
547
- responses: { 200: {}, default: {} },
677
+ responses: {
678
+ 204: {},
679
+ default: {
680
+ bodyMapper: Mappers.ErrorDetail,
681
+ headersMapper: Mappers.WebPubSubRemoveUserFromGroupExceptionHeaders
682
+ }
683
+ },
548
684
  queryParameters: [Parameters.apiVersion],
549
685
  urlParameters: [
550
- Parameters.$host,
686
+ Parameters.endpoint,
551
687
  Parameters.hub,
552
688
  Parameters.group,
553
- Parameters.userId
689
+ Parameters.userId1
554
690
  ],
691
+ headerParameters: [Parameters.accept],
555
692
  serializer
556
693
  };
557
694
  const removeUserFromAllGroupsOperationSpec = {
558
695
  path: "/api/hubs/{hub}/users/{userId}/groups",
559
696
  httpMethod: "DELETE",
560
- responses: { 200: {}, default: {} },
697
+ responses: {
698
+ 204: {},
699
+ default: {
700
+ bodyMapper: Mappers.ErrorDetail,
701
+ headersMapper: Mappers.WebPubSubRemoveUserFromAllGroupsExceptionHeaders
702
+ }
703
+ },
561
704
  queryParameters: [Parameters.apiVersion],
562
- urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],
705
+ urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
706
+ headerParameters: [Parameters.accept],
563
707
  serializer
564
708
  };
565
709
  const grantPermissionOperationSpec = {
566
710
  path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
567
711
  httpMethod: "PUT",
568
- responses: { 200: {}, default: {} },
712
+ responses: {
713
+ 200: {},
714
+ default: {
715
+ bodyMapper: Mappers.ErrorDetail,
716
+ headersMapper: Mappers.WebPubSubGrantPermissionExceptionHeaders
717
+ }
718
+ },
569
719
  queryParameters: [Parameters.apiVersion, Parameters.targetName],
570
720
  urlParameters: [
571
- Parameters.$host,
721
+ Parameters.endpoint,
572
722
  Parameters.hub,
573
723
  Parameters.connectionId,
574
724
  Parameters.permission
575
725
  ],
726
+ headerParameters: [Parameters.accept],
576
727
  serializer
577
728
  };
578
729
  const revokePermissionOperationSpec = {
579
730
  path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
580
731
  httpMethod: "DELETE",
581
- responses: { 200: {}, default: {} },
732
+ responses: {
733
+ 204: {},
734
+ default: {
735
+ bodyMapper: Mappers.ErrorDetail,
736
+ headersMapper: Mappers.WebPubSubRevokePermissionExceptionHeaders
737
+ }
738
+ },
582
739
  queryParameters: [Parameters.apiVersion, Parameters.targetName],
583
740
  urlParameters: [
584
- Parameters.$host,
741
+ Parameters.endpoint,
585
742
  Parameters.hub,
586
743
  Parameters.connectionId,
587
- Parameters.permission1
744
+ Parameters.permission
588
745
  ],
746
+ headerParameters: [Parameters.accept],
589
747
  serializer
590
748
  };
591
749
  const checkPermissionOperationSpec = {
592
750
  path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
593
751
  httpMethod: "HEAD",
594
- responses: { 200: {}, 404: {}, default: {} },
752
+ responses: {
753
+ 200: {},
754
+ 404: {},
755
+ default: {
756
+ bodyMapper: Mappers.ErrorDetail,
757
+ headersMapper: Mappers.WebPubSubCheckPermissionExceptionHeaders
758
+ }
759
+ },
595
760
  queryParameters: [Parameters.apiVersion, Parameters.targetName],
596
761
  urlParameters: [
597
- Parameters.$host,
762
+ Parameters.endpoint,
598
763
  Parameters.hub,
599
764
  Parameters.connectionId,
600
- Parameters.permission2
765
+ Parameters.permission
601
766
  ],
767
+ headerParameters: [Parameters.accept],
602
768
  serializer
603
769
  };
604
770
  //# sourceMappingURL=webPubSub.js.map