@azure/web-pubsub 1.1.4-alpha.20241118.1 → 1.1.4-alpha.20241120.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. package/dist/commonjs/generated/generatedClient.d.ts +19 -0
  2. package/dist/commonjs/generated/generatedClient.d.ts.map +1 -0
  3. package/dist/commonjs/generated/generatedClient.js +76 -0
  4. package/dist/commonjs/generated/generatedClient.js.map +1 -0
  5. package/dist/commonjs/generated/generatedClientContext.d.ts +14 -0
  6. package/dist/commonjs/generated/generatedClientContext.d.ts.map +1 -0
  7. package/dist/commonjs/generated/generatedClientContext.js +46 -0
  8. package/dist/commonjs/generated/generatedClientContext.js.map +1 -0
  9. package/dist/commonjs/generated/index.d.ts +4 -0
  10. package/dist/commonjs/generated/index.d.ts.map +1 -0
  11. package/dist/commonjs/generated/index.js +16 -0
  12. package/dist/commonjs/generated/index.js.map +1 -0
  13. package/dist/commonjs/generated/models/index.d.ts +323 -0
  14. package/dist/commonjs/generated/models/index.d.ts.map +1 -0
  15. package/dist/commonjs/generated/models/index.js +27 -0
  16. package/dist/commonjs/generated/models/index.js.map +1 -0
  17. package/dist/commonjs/generated/models/mappers.d.ts +30 -0
  18. package/dist/commonjs/generated/models/mappers.d.ts.map +1 -0
  19. package/dist/commonjs/generated/models/mappers.js +463 -0
  20. package/dist/commonjs/generated/models/mappers.js.map +1 -0
  21. package/dist/commonjs/generated/models/parameters.d.ts +31 -0
  22. package/dist/commonjs/generated/models/parameters.d.ts.map +1 -0
  23. package/dist/commonjs/generated/models/parameters.js +335 -0
  24. package/dist/commonjs/generated/models/parameters.js.map +1 -0
  25. package/dist/commonjs/generated/operations/healthApi.d.ts +18 -0
  26. package/dist/commonjs/generated/operations/healthApi.d.ts.map +1 -0
  27. package/dist/commonjs/generated/operations/healthApi.js +43 -0
  28. package/dist/commonjs/generated/operations/healthApi.js.map +1 -0
  29. package/dist/commonjs/generated/operations/index.d.ts +3 -0
  30. package/dist/commonjs/generated/operations/index.d.ts.map +1 -0
  31. package/dist/commonjs/generated/operations/index.js +13 -0
  32. package/dist/commonjs/generated/operations/index.js.map +1 -0
  33. package/dist/commonjs/generated/operations/webPubSub.d.ts +249 -0
  34. package/dist/commonjs/generated/operations/webPubSub.d.ts.map +1 -0
  35. package/dist/commonjs/generated/operations/webPubSub.js +874 -0
  36. package/dist/commonjs/generated/operations/webPubSub.js.map +1 -0
  37. package/dist/commonjs/generated/operationsInterfaces/healthApi.d.ts +10 -0
  38. package/dist/commonjs/generated/operationsInterfaces/healthApi.d.ts.map +1 -0
  39. package/dist/commonjs/generated/operationsInterfaces/healthApi.js +10 -0
  40. package/dist/commonjs/generated/operationsInterfaces/healthApi.js.map +1 -0
  41. package/dist/commonjs/generated/operationsInterfaces/index.d.ts +3 -0
  42. package/dist/commonjs/generated/operationsInterfaces/index.d.ts.map +1 -0
  43. package/dist/commonjs/generated/operationsInterfaces/index.js +13 -0
  44. package/dist/commonjs/generated/operationsInterfaces/index.js.map +1 -0
  45. package/dist/commonjs/generated/operationsInterfaces/webPubSub.d.ts +224 -0
  46. package/dist/commonjs/generated/operationsInterfaces/webPubSub.d.ts.map +1 -0
  47. package/dist/commonjs/generated/operationsInterfaces/webPubSub.js +10 -0
  48. package/dist/commonjs/generated/operationsInterfaces/webPubSub.js.map +1 -0
  49. package/dist/commonjs/groupClient.d.ts +232 -0
  50. package/dist/commonjs/groupClient.d.ts.map +1 -0
  51. package/dist/commonjs/groupClient.js +101 -0
  52. package/dist/commonjs/groupClient.js.map +1 -0
  53. package/dist/commonjs/hubClient.d.ts +478 -0
  54. package/dist/commonjs/hubClient.d.ts.map +1 -0
  55. package/dist/commonjs/hubClient.js +372 -0
  56. package/dist/commonjs/hubClient.js.map +1 -0
  57. package/dist/commonjs/index.d.ts +5 -0
  58. package/dist/commonjs/index.d.ts.map +1 -0
  59. package/dist/commonjs/index.js +12 -0
  60. package/dist/commonjs/index.js.map +1 -0
  61. package/dist/commonjs/logger.d.ts +5 -0
  62. package/dist/commonjs/logger.d.ts.map +1 -0
  63. package/dist/commonjs/logger.js +11 -0
  64. package/dist/commonjs/logger.js.map +1 -0
  65. package/dist/commonjs/package.json +3 -0
  66. package/dist/commonjs/parseConnectionString.d.ts +8 -0
  67. package/dist/commonjs/parseConnectionString.d.ts.map +1 -0
  68. package/dist/commonjs/parseConnectionString.js +34 -0
  69. package/dist/commonjs/parseConnectionString.js.map +1 -0
  70. package/dist/commonjs/reverseProxyPolicy.d.ts +9 -0
  71. package/dist/commonjs/reverseProxyPolicy.d.ts.map +1 -0
  72. package/dist/commonjs/reverseProxyPolicy.js +25 -0
  73. package/dist/commonjs/reverseProxyPolicy.js.map +1 -0
  74. package/dist/commonjs/tracing.d.ts +3 -0
  75. package/dist/commonjs/tracing.d.ts.map +1 -0
  76. package/dist/commonjs/tracing.js +12 -0
  77. package/dist/commonjs/tracing.js.map +1 -0
  78. package/dist/commonjs/tsdoc-metadata.json +11 -0
  79. package/dist/commonjs/utils.d.ts +29 -0
  80. package/dist/commonjs/utils.d.ts.map +1 -0
  81. package/dist/commonjs/utils.js +73 -0
  82. package/dist/commonjs/utils.js.map +1 -0
  83. package/dist/commonjs/webPubSubCredentialPolicy.d.ts +13 -0
  84. package/dist/commonjs/webPubSubCredentialPolicy.d.ts.map +1 -0
  85. package/dist/commonjs/webPubSubCredentialPolicy.js +32 -0
  86. package/dist/commonjs/webPubSubCredentialPolicy.js.map +1 -0
  87. package/dist/esm/generated/generatedClient.d.ts +19 -0
  88. package/dist/esm/generated/generatedClient.d.ts.map +1 -0
  89. package/{dist-esm/src → dist/esm}/generated/generatedClient.js +1 -1
  90. package/dist/esm/generated/generatedClient.js.map +1 -0
  91. package/dist/esm/generated/generatedClientContext.d.ts +14 -0
  92. package/dist/esm/generated/generatedClientContext.d.ts.map +1 -0
  93. package/dist/esm/generated/generatedClientContext.js.map +1 -0
  94. package/dist/esm/generated/index.d.ts +4 -0
  95. package/dist/esm/generated/index.d.ts.map +1 -0
  96. package/{dist-esm/src → dist/esm}/generated/index.js +3 -3
  97. package/dist/esm/generated/index.js.map +1 -0
  98. package/dist/esm/generated/models/index.d.ts +323 -0
  99. package/dist/esm/generated/models/index.d.ts.map +1 -0
  100. package/dist/esm/generated/models/mappers.d.ts +30 -0
  101. package/dist/esm/generated/models/mappers.d.ts.map +1 -0
  102. package/dist/esm/generated/models/parameters.d.ts +31 -0
  103. package/dist/esm/generated/models/parameters.d.ts.map +1 -0
  104. package/{dist-esm/src → dist/esm}/generated/models/parameters.js +1 -1
  105. package/dist/esm/generated/models/parameters.js.map +1 -0
  106. package/dist/esm/generated/operations/healthApi.d.ts +18 -0
  107. package/dist/esm/generated/operations/healthApi.d.ts.map +1 -0
  108. package/{dist-esm/src → dist/esm}/generated/operations/healthApi.js +2 -2
  109. package/dist/esm/generated/operations/healthApi.js.map +1 -0
  110. package/dist/esm/generated/operations/index.d.ts +3 -0
  111. package/dist/esm/generated/operations/index.d.ts.map +1 -0
  112. package/{dist-esm/src/generated/operationsInterfaces → dist/esm/generated/operations}/index.js +2 -2
  113. package/dist/esm/generated/operations/index.js.map +1 -0
  114. package/dist/esm/generated/operations/webPubSub.d.ts +249 -0
  115. package/dist/esm/generated/operations/webPubSub.d.ts.map +1 -0
  116. package/{dist-esm/src → dist/esm}/generated/operations/webPubSub.js +2 -2
  117. package/dist/esm/generated/operations/webPubSub.js.map +1 -0
  118. package/dist/esm/generated/operationsInterfaces/healthApi.d.ts +10 -0
  119. package/dist/esm/generated/operationsInterfaces/healthApi.d.ts.map +1 -0
  120. package/{dist-esm/src → dist/esm}/generated/operationsInterfaces/healthApi.js.map +1 -1
  121. package/dist/esm/generated/operationsInterfaces/index.d.ts +3 -0
  122. package/dist/esm/generated/operationsInterfaces/index.d.ts.map +1 -0
  123. package/{dist-esm/src/generated/operations → dist/esm/generated/operationsInterfaces}/index.js +2 -2
  124. package/dist/esm/generated/operationsInterfaces/index.js.map +1 -0
  125. package/dist/esm/generated/operationsInterfaces/webPubSub.d.ts +224 -0
  126. package/dist/esm/generated/operationsInterfaces/webPubSub.d.ts.map +1 -0
  127. package/dist/esm/generated/operationsInterfaces/webPubSub.js.map +1 -0
  128. package/dist/esm/groupClient.d.ts +232 -0
  129. package/dist/esm/groupClient.d.ts.map +1 -0
  130. package/{dist-esm/src → dist/esm}/groupClient.js +2 -2
  131. package/dist/esm/groupClient.js.map +1 -0
  132. package/dist/esm/hubClient.d.ts +478 -0
  133. package/dist/esm/hubClient.d.ts.map +1 -0
  134. package/{dist-esm/src → dist/esm}/hubClient.js +9 -9
  135. package/dist/esm/hubClient.js.map +1 -0
  136. package/dist/esm/index.d.ts +5 -0
  137. package/dist/esm/index.d.ts.map +1 -0
  138. package/{dist-esm/src → dist/esm}/index.js +2 -2
  139. package/dist/esm/index.js.map +1 -0
  140. package/dist/esm/logger.d.ts +5 -0
  141. package/dist/esm/logger.d.ts.map +1 -0
  142. package/dist/esm/package.json +3 -0
  143. package/dist/esm/parseConnectionString.d.ts +8 -0
  144. package/dist/esm/parseConnectionString.d.ts.map +1 -0
  145. package/dist/esm/reverseProxyPolicy.d.ts +9 -0
  146. package/dist/esm/reverseProxyPolicy.d.ts.map +1 -0
  147. package/dist/esm/tracing.d.ts +3 -0
  148. package/dist/esm/tracing.d.ts.map +1 -0
  149. package/dist/esm/utils.d.ts +29 -0
  150. package/dist/esm/utils.d.ts.map +1 -0
  151. package/dist/esm/webPubSubCredentialPolicy.d.ts +13 -0
  152. package/dist/esm/webPubSubCredentialPolicy.d.ts.map +1 -0
  153. package/package.json +56 -52
  154. package/dist/index.js +0 -2441
  155. package/dist/index.js.map +0 -1
  156. package/dist-esm/samples-dev/broadcasting.js +0 -27
  157. package/dist-esm/samples-dev/broadcasting.js.map +0 -1
  158. package/dist-esm/samples-dev/directMessage.js +0 -20
  159. package/dist-esm/samples-dev/directMessage.js.map +0 -1
  160. package/dist-esm/samples-dev/managingGroups.js +0 -23
  161. package/dist-esm/samples-dev/managingGroups.js.map +0 -1
  162. package/dist-esm/src/generated/generatedClient.js.map +0 -1
  163. package/dist-esm/src/generated/generatedClientContext.js.map +0 -1
  164. package/dist-esm/src/generated/index.js.map +0 -1
  165. package/dist-esm/src/generated/models/parameters.js.map +0 -1
  166. package/dist-esm/src/generated/operations/healthApi.js.map +0 -1
  167. package/dist-esm/src/generated/operations/index.js.map +0 -1
  168. package/dist-esm/src/generated/operations/webPubSub.js.map +0 -1
  169. package/dist-esm/src/generated/operationsInterfaces/index.js.map +0 -1
  170. package/dist-esm/src/generated/operationsInterfaces/webPubSub.js.map +0 -1
  171. package/dist-esm/src/groupClient.js.map +0 -1
  172. package/dist-esm/src/hubClient.js.map +0 -1
  173. package/dist-esm/src/index.js.map +0 -1
  174. package/dist-esm/test/conn.spec.js +0 -23
  175. package/dist-esm/test/conn.spec.js.map +0 -1
  176. package/dist-esm/test/groups.spec.js +0 -138
  177. package/dist-esm/test/groups.spec.js.map +0 -1
  178. package/dist-esm/test/hubs.spec.js +0 -270
  179. package/dist-esm/test/hubs.spec.js.map +0 -1
  180. package/dist-esm/test/integration.spec.js +0 -299
  181. package/dist-esm/test/integration.spec.js.map +0 -1
  182. package/dist-esm/test/odata.spec.js +0 -15
  183. package/dist-esm/test/odata.spec.js.map +0 -1
  184. package/dist-esm/test/testEnv.js +0 -23
  185. package/dist-esm/test/testEnv.js.map +0 -1
  186. /package/{dist-esm/src → dist/esm}/generated/generatedClientContext.js +0 -0
  187. /package/{dist-esm/src → dist/esm}/generated/models/index.js +0 -0
  188. /package/{dist-esm/src → dist/esm}/generated/models/index.js.map +0 -0
  189. /package/{dist-esm/src → dist/esm}/generated/models/mappers.js +0 -0
  190. /package/{dist-esm/src → dist/esm}/generated/models/mappers.js.map +0 -0
  191. /package/{dist-esm/src → dist/esm}/generated/operationsInterfaces/healthApi.js +0 -0
  192. /package/{dist-esm/src → dist/esm}/generated/operationsInterfaces/webPubSub.js +0 -0
  193. /package/{dist-esm/src → dist/esm}/logger.js +0 -0
  194. /package/{dist-esm/src → dist/esm}/logger.js.map +0 -0
  195. /package/{dist-esm/src → dist/esm}/parseConnectionString.js +0 -0
  196. /package/{dist-esm/src → dist/esm}/parseConnectionString.js.map +0 -0
  197. /package/{dist-esm/src → dist/esm}/reverseProxyPolicy.js +0 -0
  198. /package/{dist-esm/src → dist/esm}/reverseProxyPolicy.js.map +0 -0
  199. /package/{dist-esm/src → dist/esm}/tracing.js +0 -0
  200. /package/{dist-esm/src → dist/esm}/tracing.js.map +0 -0
  201. /package/{dist-esm/src → dist/esm}/utils.js +0 -0
  202. /package/{dist-esm/src → dist/esm}/utils.js.map +0 -0
  203. /package/{dist-esm/src → dist/esm}/webPubSubCredentialPolicy.js +0 -0
  204. /package/{dist-esm/src → dist/esm}/webPubSubCredentialPolicy.js.map +0 -0
  205. /package/{types → dist}/web-pubsub.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"webPubSub.js","sourceRoot":"","sources":["../../../../src/generated/operations/webPubSub.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAqCnD,6CAA6C;AAC7C,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,sBAAsB,CACpB,GAAW,EACX,WAA+B,EAC/B,OAAuD;QAEvD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,EAC7B,mCAAmC,CACpC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,mBAAmB,CACjB,GAAW,EACX,OAAoD;QAEpD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,GAAG,EAAE,OAAO,EAAE,EAChB,gCAAgC,CACjC,CAAC;IACJ,CA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AE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;YAC/B,aAAa,EAAE,OAAO,CAAC,4CAA4C;SACpE;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,GAAG;QACd,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,OAAO;KACnB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,2BAA2B,GAA6B;IAC5D,IAAI,EAAE,+CAA+C;IACrD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;YAC/B,aAAa,EAAE,OAAO,CAAC,uCAAuC;SAC/D;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,GAAG;QACd,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,OAAO;KACnB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { WebPubSub } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n AddToGroupsRequest,\n WebPubSubAddConnectionsToGroupsOptionalParams,\n WebPubSubCloseAllConnectionsOptionalParams,\n WebPubSubGenerateClientTokenOptionalParams,\n WebPubSubGenerateClientTokenResponse,\n RemoveFromGroupsRequest,\n WebPubSubRemoveConnectionsFromGroupsOptionalParams,\n ContentType,\n WebPubSubSendToAll$binaryOptionalParams,\n WebPubSubSendToAll$textOptionalParams,\n WebPubSubCloseConnectionOptionalParams,\n WebPubSubConnectionExistsOptionalParams,\n WebPubSubSendToConnection$binaryOptionalParams,\n WebPubSubSendToConnection$textOptionalParams,\n WebPubSubRemoveConnectionFromAllGroupsOptionalParams,\n WebPubSubGroupExistsOptionalParams,\n WebPubSubCloseGroupConnectionsOptionalParams,\n WebPubSubSendToGroup$binaryOptionalParams,\n WebPubSubSendToGroup$textOptionalParams,\n WebPubSubRemoveConnectionFromGroupOptionalParams,\n WebPubSubAddConnectionToGroupOptionalParams,\n WebPubSubPermission,\n WebPubSubRevokePermissionOptionalParams,\n WebPubSubCheckPermissionOptionalParams,\n WebPubSubGrantPermissionOptionalParams,\n WebPubSubUserExistsOptionalParams,\n WebPubSubCloseUserConnectionsOptionalParams,\n WebPubSubSendToUser$binaryOptionalParams,\n WebPubSubSendToUser$textOptionalParams,\n WebPubSubRemoveUserFromAllGroupsOptionalParams,\n WebPubSubRemoveUserFromGroupOptionalParams,\n WebPubSubAddUserToGroupOptionalParams,\n} from \"../models\";\n\n/** Class containing WebPubSub operations. */\nexport class WebPubSubImpl implements WebPubSub {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class WebPubSub class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Add filtered connections to multiple groups.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param groupsToAdd Target groups and connection filter.\n * @param options The options parameters.\n */\n addConnectionsToGroups(\n hub: string,\n groupsToAdd: AddToGroupsRequest,\n options?: WebPubSubAddConnectionsToGroupsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, groupsToAdd, options },\n addConnectionsToGroupsOperationSpec,\n );\n }\n\n /**\n * Close the connections in the hub.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param options The options parameters.\n */\n closeAllConnections(\n hub: string,\n options?: WebPubSubCloseAllConnectionsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, options },\n closeAllConnectionsOperationSpec,\n );\n }\n\n /**\n * Generate token for the client to connect Azure Web PubSub service.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param options The options parameters.\n */\n generateClientToken(\n hub: string,\n options?: WebPubSubGenerateClientTokenOptionalParams,\n ): Promise<WebPubSubGenerateClientTokenResponse> {\n return this.client.sendOperationRequest(\n { hub, options },\n generateClientTokenOperationSpec,\n );\n }\n\n /**\n * Remove filtered connections from multiple groups.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param groupsToRemove Target groups and connection filter.\n * @param options The options parameters.\n */\n removeConnectionsFromGroups(\n hub: string,\n groupsToRemove: RemoveFromGroupsRequest,\n options?: WebPubSubRemoveConnectionsFromGroupsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, groupsToRemove, options },\n removeConnectionsFromGroupsOperationSpec,\n );\n }\n\n /**\n * Broadcast content inside request body to all the connected client connections.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param contentType Upload file type\n * @param message The payload body.\n * @param options The options parameters.\n */\n sendToAll(\n hub: string,\n contentType: ContentType,\n message: coreRestPipeline.RequestBodyType,\n options?: WebPubSubSendToAll$binaryOptionalParams,\n ): Promise<void>;\n /**\n * Broadcast content inside request body to all the connected client connections.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param contentType Upload file type\n * @param message The payload body.\n * @param options The options parameters.\n */\n sendToAll(\n hub: string,\n contentType: \"text/plain\",\n message: string,\n options?: WebPubSubSendToAll$textOptionalParams,\n ): Promise<void>;\n /**\n * Broadcast content inside request body to all the connected client connections.\n * @param args Includes all the parameters for this operation.\n */\n sendToAll(\n ...args:\n | [\n string,\n ContentType,\n coreRestPipeline.RequestBodyType,\n WebPubSubSendToAll$binaryOptionalParams?,\n ]\n | [string, \"text/plain\", string, WebPubSubSendToAll$textOptionalParams?]\n ): Promise<void> {\n let operationSpec: coreClient.OperationSpec;\n let operationArguments: coreClient.OperationArguments;\n let options;\n if (\n args[1] === \"application/json\" ||\n args[1] === \"application/octet-stream\"\n ) {\n operationSpec = sendToAll$binaryOperationSpec;\n operationArguments = {\n hub: args[0],\n contentType: args[1],\n message: args[2],\n options: args[3],\n };\n options = args[3];\n } else if (args[1] === \"text/plain\") {\n operationSpec = sendToAll$textOperationSpec;\n operationArguments = {\n hub: args[0],\n contentType: args[1],\n message: args[2],\n options: args[3],\n };\n options = args[3];\n } else {\n throw new TypeError(\n `\"contentType\" must be a valid value but instead was \"${args[1]}\".`,\n );\n }\n operationArguments.options = options || {};\n return this.client.sendOperationRequest(operationArguments, operationSpec);\n }\n\n /**\n * Close the client connection.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n closeConnection(\n hub: string,\n connectionId: string,\n options?: WebPubSubCloseConnectionOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, connectionId, options },\n closeConnectionOperationSpec,\n );\n }\n\n /**\n * Check if the connection with the given connectionId exists.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param connectionId The connection Id.\n * @param options The options parameters.\n */\n connectionExists(\n hub: string,\n connectionId: string,\n options?: WebPubSubConnectionExistsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, connectionId, options },\n connectionExistsOperationSpec,\n );\n }\n\n /**\n * Send content inside request body to the specific connection.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param connectionId The connection Id.\n * @param contentType Upload file type\n * @param message The payload body.\n * @param options The options parameters.\n */\n sendToConnection(\n hub: string,\n connectionId: string,\n contentType: ContentType,\n message: coreRestPipeline.RequestBodyType,\n options?: WebPubSubSendToConnection$binaryOptionalParams,\n ): Promise<void>;\n /**\n * Send content inside request body to the specific connection.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param connectionId The connection Id.\n * @param contentType Upload file type\n * @param message The payload body.\n * @param options The options parameters.\n */\n sendToConnection(\n hub: string,\n connectionId: string,\n contentType: \"text/plain\",\n message: string,\n options?: WebPubSubSendToConnection$textOptionalParams,\n ): Promise<void>;\n /**\n * Send content inside request body to the specific connection.\n * @param args Includes all the parameters for this operation.\n */\n sendToConnection(\n ...args:\n | [\n string,\n string,\n ContentType,\n coreRestPipeline.RequestBodyType,\n WebPubSubSendToConnection$binaryOptionalParams?,\n ]\n | [\n string,\n string,\n \"text/plain\",\n string,\n WebPubSubSendToConnection$textOptionalParams?,\n ]\n ): Promise<void> {\n let operationSpec: coreClient.OperationSpec;\n let operationArguments: coreClient.OperationArguments;\n let options;\n if (\n args[2] === \"application/json\" ||\n args[2] === \"application/octet-stream\"\n ) {\n operationSpec = sendToConnection$binaryOperationSpec;\n operationArguments = {\n hub: args[0],\n connectionId: args[1],\n contentType: args[2],\n message: args[3],\n options: args[4],\n };\n options = args[4];\n } else if (args[2] === \"text/plain\") {\n operationSpec = sendToConnection$textOperationSpec;\n operationArguments = {\n hub: args[0],\n connectionId: args[1],\n contentType: args[2],\n message: args[3],\n options: args[4],\n };\n options = args[4];\n } else {\n throw new TypeError(\n `\"contentType\" must be a valid value but instead was \"${args[2]}\".`,\n );\n }\n operationArguments.options = options || {};\n return this.client.sendOperationRequest(operationArguments, operationSpec);\n }\n\n /**\n * Remove a connection from all groups.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n removeConnectionFromAllGroups(\n hub: string,\n connectionId: string,\n options?: WebPubSubRemoveConnectionFromAllGroupsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, connectionId, options },\n removeConnectionFromAllGroupsOperationSpec,\n );\n }\n\n /**\n * Check if there are any client connections inside the given group\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param options The options parameters.\n */\n groupExists(\n hub: string,\n group: string,\n options?: WebPubSubGroupExistsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, group, options },\n groupExistsOperationSpec,\n );\n }\n\n /**\n * Close connections in the specific group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param options The options parameters.\n */\n closeGroupConnections(\n hub: string,\n group: string,\n options?: WebPubSubCloseGroupConnectionsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, group, options },\n closeGroupConnectionsOperationSpec,\n );\n }\n\n /**\n * Send content inside request body to a group of connections.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param contentType Upload file type\n * @param message The payload body.\n * @param options The options parameters.\n */\n sendToGroup(\n hub: string,\n group: string,\n contentType: ContentType,\n message: coreRestPipeline.RequestBodyType,\n options?: WebPubSubSendToGroup$binaryOptionalParams,\n ): Promise<void>;\n /**\n * Send content inside request body to a group of connections.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param contentType Upload file type\n * @param message The payload body.\n * @param options The options parameters.\n */\n sendToGroup(\n hub: string,\n group: string,\n contentType: \"text/plain\",\n message: string,\n options?: WebPubSubSendToGroup$textOptionalParams,\n ): Promise<void>;\n /**\n * Send content inside request body to a group of connections.\n * @param args Includes all the parameters for this operation.\n */\n sendToGroup(\n ...args:\n | [\n string,\n string,\n ContentType,\n coreRestPipeline.RequestBodyType,\n WebPubSubSendToGroup$binaryOptionalParams?,\n ]\n | [\n string,\n string,\n \"text/plain\",\n string,\n WebPubSubSendToGroup$textOptionalParams?,\n ]\n ): Promise<void> {\n let operationSpec: coreClient.OperationSpec;\n let operationArguments: coreClient.OperationArguments;\n let options;\n if (\n args[2] === \"application/json\" ||\n args[2] === \"application/octet-stream\"\n ) {\n operationSpec = sendToGroup$binaryOperationSpec;\n operationArguments = {\n hub: args[0],\n group: args[1],\n contentType: args[2],\n message: args[3],\n options: args[4],\n };\n options = args[4];\n } else if (args[2] === \"text/plain\") {\n operationSpec = sendToGroup$textOperationSpec;\n operationArguments = {\n hub: args[0],\n group: args[1],\n contentType: args[2],\n message: args[3],\n options: args[4],\n };\n options = args[4];\n } else {\n throw new TypeError(\n `\"contentType\" must be a valid value but instead was \"${args[2]}\".`,\n );\n }\n operationArguments.options = options || {};\n return this.client.sendOperationRequest(operationArguments, operationSpec);\n }\n\n /**\n * Remove a connection from the target group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n removeConnectionFromGroup(\n hub: string,\n group: string,\n connectionId: string,\n options?: WebPubSubRemoveConnectionFromGroupOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, group, connectionId, options },\n removeConnectionFromGroupOperationSpec,\n );\n }\n\n /**\n * Add a connection to the target group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param connectionId Target connection Id\n * @param options The options parameters.\n */\n addConnectionToGroup(\n hub: string,\n group: string,\n connectionId: string,\n options?: WebPubSubAddConnectionToGroupOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, group, connectionId, options },\n addConnectionToGroupOperationSpec,\n );\n }\n\n /**\n * Revoke permission for the connection.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n revokePermission(\n hub: string,\n permission: WebPubSubPermission,\n connectionId: string,\n options?: WebPubSubRevokePermissionOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, permission, connectionId, options },\n revokePermissionOperationSpec,\n );\n }\n\n /**\n * Check if a connection has permission to the specified action.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n checkPermission(\n hub: string,\n permission: WebPubSubPermission,\n connectionId: string,\n options?: WebPubSubCheckPermissionOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, permission, connectionId, options },\n checkPermissionOperationSpec,\n );\n }\n\n /**\n * Grant permission to the connection.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n grantPermission(\n hub: string,\n permission: WebPubSubPermission,\n connectionId: string,\n options?: WebPubSubGrantPermissionOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, permission, connectionId, options },\n grantPermissionOperationSpec,\n );\n }\n\n /**\n * Check if there are any client connections connected for the given user.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param userId Target user Id.\n * @param options The options parameters.\n */\n userExists(\n hub: string,\n userId: string,\n options?: WebPubSubUserExistsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, userId, options },\n userExistsOperationSpec,\n );\n }\n\n /**\n * Close connections for the specific user.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param userId The user Id.\n * @param options The options parameters.\n */\n closeUserConnections(\n hub: string,\n userId: string,\n options?: WebPubSubCloseUserConnectionsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, userId, options },\n closeUserConnectionsOperationSpec,\n );\n }\n\n /**\n * Send content inside request body to the specific user.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param userId The user Id.\n * @param contentType Upload file type\n * @param message The payload body.\n * @param options The options parameters.\n */\n sendToUser(\n hub: string,\n userId: string,\n contentType: ContentType,\n message: coreRestPipeline.RequestBodyType,\n options?: WebPubSubSendToUser$binaryOptionalParams,\n ): Promise<void>;\n /**\n * Send content inside request body to the specific user.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param userId The user Id.\n * @param contentType Upload file type\n * @param message The payload body.\n * @param options The options parameters.\n */\n sendToUser(\n hub: string,\n userId: string,\n contentType: \"text/plain\",\n message: string,\n options?: WebPubSubSendToUser$textOptionalParams,\n ): Promise<void>;\n /**\n * Send content inside request body to the specific user.\n * @param args Includes all the parameters for this operation.\n */\n sendToUser(\n ...args:\n | [\n string,\n string,\n ContentType,\n coreRestPipeline.RequestBodyType,\n WebPubSubSendToUser$binaryOptionalParams?,\n ]\n | [\n string,\n string,\n \"text/plain\",\n string,\n WebPubSubSendToUser$textOptionalParams?,\n ]\n ): Promise<void> {\n let operationSpec: coreClient.OperationSpec;\n let operationArguments: coreClient.OperationArguments;\n let options;\n if (\n args[2] === \"application/json\" ||\n args[2] === \"application/octet-stream\"\n ) {\n operationSpec = sendToUser$binaryOperationSpec;\n operationArguments = {\n hub: args[0],\n userId: args[1],\n contentType: args[2],\n message: args[3],\n options: args[4],\n };\n options = args[4];\n } else if (args[2] === \"text/plain\") {\n operationSpec = sendToUser$textOperationSpec;\n operationArguments = {\n hub: args[0],\n userId: args[1],\n contentType: args[2],\n message: args[3],\n options: args[4],\n };\n options = args[4];\n } else {\n throw new TypeError(\n `\"contentType\" must be a valid value but instead was \"${args[2]}\".`,\n );\n }\n operationArguments.options = options || {};\n return this.client.sendOperationRequest(operationArguments, operationSpec);\n }\n\n /**\n * Remove a user from all groups.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param userId Target user Id.\n * @param options The options parameters.\n */\n removeUserFromAllGroups(\n hub: string,\n userId: string,\n options?: WebPubSubRemoveUserFromAllGroupsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, userId, options },\n removeUserFromAllGroupsOperationSpec,\n );\n }\n\n /**\n * Remove a user from the target group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param userId Target user Id.\n * @param options The options parameters.\n */\n removeUserFromGroup(\n hub: string,\n group: string,\n userId: string,\n options?: WebPubSubRemoveUserFromGroupOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, group, userId, options },\n removeUserFromGroupOperationSpec,\n );\n }\n\n /**\n * Add a user to the target group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param userId Target user Id.\n * @param options The options parameters.\n */\n addUserToGroup(\n hub: string,\n group: string,\n userId: string,\n options?: WebPubSubAddUserToGroupOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { hub, group, userId, options },\n addUserToGroupOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst addConnectionsToGroupsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/:addToGroups\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubAddConnectionsToGroupsExceptionHeaders,\n },\n },\n requestBody: Parameters.groupsToAdd,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst closeAllConnectionsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/:closeConnections\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubCloseAllConnectionsExceptionHeaders,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.excluded,\n Parameters.reason,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst generateClientTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/:generateToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ClientTokenResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubGenerateClientTokenExceptionHeaders,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.userId,\n Parameters.roles,\n Parameters.expirationTimeInMinutes,\n Parameters.groups,\n Parameters.clientType,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub],\n headerParameters: [Parameters.accept1],\n serializer,\n};\nconst removeConnectionsFromGroupsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/:removeFromGroups\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper:\n Mappers.WebPubSubRemoveConnectionsFromGroupsExceptionHeaders,\n },\n },\n requestBody: Parameters.groupsToRemove,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst sendToAll$binaryOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/:send\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubSendToAllExceptionHeaders,\n },\n },\n requestBody: Parameters.message,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.excludedConnections,\n Parameters.filter,\n Parameters.messageTtlSeconds,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub],\n headerParameters: [Parameters.contentType1, Parameters.accept2],\n mediaType: \"binary\",\n serializer,\n};\nconst sendToAll$textOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/:send\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubSendToAllExceptionHeaders,\n },\n },\n requestBody: Parameters.message1,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.excludedConnections,\n Parameters.filter,\n Parameters.messageTtlSeconds,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub],\n headerParameters: [Parameters.contentType2, Parameters.accept3],\n mediaType: \"text\",\n serializer,\n};\nconst closeConnectionOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/connections/{connectionId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubCloseConnectionExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.reason],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst connectionExistsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/connections/{connectionId}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {},\n 404: {},\n default: {\n headersMapper: Mappers.WebPubSubConnectionExistsExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],\n serializer,\n};\nconst sendToConnection$binaryOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/connections/{connectionId}/:send\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubSendToConnectionExceptionHeaders,\n },\n },\n requestBody: Parameters.message,\n queryParameters: [Parameters.apiVersion, Parameters.messageTtlSeconds],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],\n headerParameters: [Parameters.contentType1, Parameters.accept2],\n mediaType: \"binary\",\n serializer,\n};\nconst sendToConnection$textOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/connections/{connectionId}/:send\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubSendToConnectionExceptionHeaders,\n },\n },\n requestBody: Parameters.message1,\n queryParameters: [Parameters.apiVersion, Parameters.messageTtlSeconds],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],\n headerParameters: [Parameters.contentType2, Parameters.accept3],\n mediaType: \"text\",\n serializer,\n};\nconst removeConnectionFromAllGroupsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/connections/{connectionId}/groups\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper:\n Mappers.WebPubSubRemoveConnectionFromAllGroupsExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst groupExistsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {},\n 404: {},\n default: {\n headersMapper: Mappers.WebPubSubGroupExistsExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],\n serializer,\n};\nconst closeGroupConnectionsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/:closeConnections\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubCloseGroupConnectionsExceptionHeaders,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.excluded,\n Parameters.reason,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst sendToGroup$binaryOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/:send\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubSendToGroupExceptionHeaders,\n },\n },\n requestBody: Parameters.message,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.excludedConnections,\n Parameters.filter,\n Parameters.messageTtlSeconds,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],\n headerParameters: [Parameters.contentType1, Parameters.accept2],\n mediaType: \"binary\",\n serializer,\n};\nconst sendToGroup$textOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/:send\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubSendToGroupExceptionHeaders,\n },\n },\n requestBody: Parameters.message1,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.excludedConnections,\n Parameters.filter,\n Parameters.messageTtlSeconds,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],\n headerParameters: [Parameters.contentType2, Parameters.accept3],\n mediaType: \"text\",\n serializer,\n};\nconst removeConnectionFromGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/connections/{connectionId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubRemoveConnectionFromGroupExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.group,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst addConnectionToGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/connections/{connectionId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubAddConnectionToGroupExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.group,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst revokePermissionOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubRevokePermissionExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.targetName],\n urlParameters: [\n Parameters.endpoint,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.permission,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst checkPermissionOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {},\n 404: {},\n default: {\n headersMapper: Mappers.WebPubSubCheckPermissionExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.targetName],\n urlParameters: [\n Parameters.endpoint,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.permission,\n ],\n serializer,\n};\nconst grantPermissionOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubGrantPermissionExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.targetName],\n urlParameters: [\n Parameters.endpoint,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.permission,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst userExistsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {},\n 404: {},\n default: {\n headersMapper: Mappers.WebPubSubUserExistsExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],\n serializer,\n};\nconst closeUserConnectionsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/:closeConnections\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubCloseUserConnectionsExceptionHeaders,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.excluded,\n Parameters.reason,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst sendToUser$binaryOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/:send\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubSendToUserExceptionHeaders,\n },\n },\n requestBody: Parameters.message,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.messageTtlSeconds,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],\n headerParameters: [Parameters.contentType1, Parameters.accept2],\n mediaType: \"binary\",\n serializer,\n};\nconst sendToUser$textOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/:send\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubSendToUserExceptionHeaders,\n },\n },\n requestBody: Parameters.message1,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.messageTtlSeconds,\n ],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],\n headerParameters: [Parameters.contentType2, Parameters.accept3],\n mediaType: \"text\",\n serializer,\n};\nconst removeUserFromAllGroupsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/groups\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubRemoveUserFromAllGroupsExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst removeUserFromGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/groups/{group}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubRemoveUserFromGroupExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.hub,\n Parameters.group,\n Parameters.userId1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst addUserToGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/groups/{group}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubAddUserToGroupExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.hub,\n Parameters.group,\n Parameters.userId1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./healthApi\";\nexport * from \"./webPubSub\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"webPubSub.js","sourceRoot":"","sources":["../../../../src/generated/operationsInterfaces/webPubSub.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n AddToGroupsRequest,\n WebPubSubAddConnectionsToGroupsOptionalParams,\n WebPubSubCloseAllConnectionsOptionalParams,\n WebPubSubGenerateClientTokenOptionalParams,\n WebPubSubGenerateClientTokenResponse,\n RemoveFromGroupsRequest,\n WebPubSubRemoveConnectionsFromGroupsOptionalParams,\n ContentType,\n WebPubSubSendToAll$binaryOptionalParams,\n WebPubSubSendToAll$textOptionalParams,\n WebPubSubCloseConnectionOptionalParams,\n WebPubSubConnectionExistsOptionalParams,\n WebPubSubSendToConnection$binaryOptionalParams,\n WebPubSubSendToConnection$textOptionalParams,\n WebPubSubRemoveConnectionFromAllGroupsOptionalParams,\n WebPubSubGroupExistsOptionalParams,\n WebPubSubCloseGroupConnectionsOptionalParams,\n WebPubSubSendToGroup$binaryOptionalParams,\n WebPubSubSendToGroup$textOptionalParams,\n WebPubSubRemoveConnectionFromGroupOptionalParams,\n WebPubSubAddConnectionToGroupOptionalParams,\n WebPubSubPermission,\n WebPubSubRevokePermissionOptionalParams,\n WebPubSubCheckPermissionOptionalParams,\n WebPubSubGrantPermissionOptionalParams,\n WebPubSubUserExistsOptionalParams,\n WebPubSubCloseUserConnectionsOptionalParams,\n WebPubSubSendToUser$binaryOptionalParams,\n WebPubSubSendToUser$textOptionalParams,\n WebPubSubRemoveUserFromAllGroupsOptionalParams,\n WebPubSubRemoveUserFromGroupOptionalParams,\n WebPubSubAddUserToGroupOptionalParams,\n} from \"../models\";\n\n/** Interface representing a WebPubSub. */\nexport interface WebPubSub {\n /**\n * Add filtered connections to multiple groups.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param groupsToAdd Target groups and connection filter.\n * @param options The options parameters.\n */\n addConnectionsToGroups(\n hub: string,\n groupsToAdd: AddToGroupsRequest,\n options?: WebPubSubAddConnectionsToGroupsOptionalParams,\n ): Promise<void>;\n /**\n * Close the connections in the hub.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param options The options parameters.\n */\n closeAllConnections(\n hub: string,\n options?: WebPubSubCloseAllConnectionsOptionalParams,\n ): Promise<void>;\n /**\n * Generate token for the client to connect Azure Web PubSub service.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param options The options parameters.\n */\n generateClientToken(\n hub: string,\n options?: WebPubSubGenerateClientTokenOptionalParams,\n ): Promise<WebPubSubGenerateClientTokenResponse>;\n /**\n * Remove filtered connections from multiple groups.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param groupsToRemove Target groups and connection filter.\n * @param options The options parameters.\n */\n removeConnectionsFromGroups(\n hub: string,\n groupsToRemove: RemoveFromGroupsRequest,\n options?: WebPubSubRemoveConnectionsFromGroupsOptionalParams,\n ): Promise<void>;\n /**\n * Broadcast content inside request body to all the connected client connections.\n * @param args Includes all the parameters for this operation.\n */\n sendToAll(\n ...args:\n | [\n string,\n ContentType,\n coreRestPipeline.RequestBodyType,\n WebPubSubSendToAll$binaryOptionalParams?,\n ]\n | [string, \"text/plain\", string, WebPubSubSendToAll$textOptionalParams?]\n ): Promise<void>;\n /**\n * Close the client connection.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n closeConnection(\n hub: string,\n connectionId: string,\n options?: WebPubSubCloseConnectionOptionalParams,\n ): Promise<void>;\n /**\n * Check if the connection with the given connectionId exists.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param connectionId The connection Id.\n * @param options The options parameters.\n */\n connectionExists(\n hub: string,\n connectionId: string,\n options?: WebPubSubConnectionExistsOptionalParams,\n ): Promise<void>;\n /**\n * Send content inside request body to the specific connection.\n * @param args Includes all the parameters for this operation.\n */\n sendToConnection(\n ...args:\n | [\n string,\n string,\n ContentType,\n coreRestPipeline.RequestBodyType,\n WebPubSubSendToConnection$binaryOptionalParams?,\n ]\n | [\n string,\n string,\n \"text/plain\",\n string,\n WebPubSubSendToConnection$textOptionalParams?,\n ]\n ): Promise<void>;\n /**\n * Remove a connection from all groups.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n removeConnectionFromAllGroups(\n hub: string,\n connectionId: string,\n options?: WebPubSubRemoveConnectionFromAllGroupsOptionalParams,\n ): Promise<void>;\n /**\n * Check if there are any client connections inside the given group\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param options The options parameters.\n */\n groupExists(\n hub: string,\n group: string,\n options?: WebPubSubGroupExistsOptionalParams,\n ): Promise<void>;\n /**\n * Close connections in the specific group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param options The options parameters.\n */\n closeGroupConnections(\n hub: string,\n group: string,\n options?: WebPubSubCloseGroupConnectionsOptionalParams,\n ): Promise<void>;\n /**\n * Send content inside request body to a group of connections.\n * @param args Includes all the parameters for this operation.\n */\n sendToGroup(\n ...args:\n | [\n string,\n string,\n ContentType,\n coreRestPipeline.RequestBodyType,\n WebPubSubSendToGroup$binaryOptionalParams?,\n ]\n | [\n string,\n string,\n \"text/plain\",\n string,\n WebPubSubSendToGroup$textOptionalParams?,\n ]\n ): Promise<void>;\n /**\n * Remove a connection from the target group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n removeConnectionFromGroup(\n hub: string,\n group: string,\n connectionId: string,\n options?: WebPubSubRemoveConnectionFromGroupOptionalParams,\n ): Promise<void>;\n /**\n * Add a connection to the target group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param connectionId Target connection Id\n * @param options The options parameters.\n */\n addConnectionToGroup(\n hub: string,\n group: string,\n connectionId: string,\n options?: WebPubSubAddConnectionToGroupOptionalParams,\n ): Promise<void>;\n /**\n * Revoke permission for the connection.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n revokePermission(\n hub: string,\n permission: WebPubSubPermission,\n connectionId: string,\n options?: WebPubSubRevokePermissionOptionalParams,\n ): Promise<void>;\n /**\n * Check if a connection has permission to the specified action.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n checkPermission(\n hub: string,\n permission: WebPubSubPermission,\n connectionId: string,\n options?: WebPubSubCheckPermissionOptionalParams,\n ): Promise<void>;\n /**\n * Grant permission to the connection.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.\n * @param connectionId Target connection Id.\n * @param options The options parameters.\n */\n grantPermission(\n hub: string,\n permission: WebPubSubPermission,\n connectionId: string,\n options?: WebPubSubGrantPermissionOptionalParams,\n ): Promise<void>;\n /**\n * Check if there are any client connections connected for the given user.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param userId Target user Id.\n * @param options The options parameters.\n */\n userExists(\n hub: string,\n userId: string,\n options?: WebPubSubUserExistsOptionalParams,\n ): Promise<void>;\n /**\n * Close connections for the specific user.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param userId The user Id.\n * @param options The options parameters.\n */\n closeUserConnections(\n hub: string,\n userId: string,\n options?: WebPubSubCloseUserConnectionsOptionalParams,\n ): Promise<void>;\n /**\n * Send content inside request body to the specific user.\n * @param args Includes all the parameters for this operation.\n */\n sendToUser(\n ...args:\n | [\n string,\n string,\n ContentType,\n coreRestPipeline.RequestBodyType,\n WebPubSubSendToUser$binaryOptionalParams?,\n ]\n | [\n string,\n string,\n \"text/plain\",\n string,\n WebPubSubSendToUser$textOptionalParams?,\n ]\n ): Promise<void>;\n /**\n * Remove a user from all groups.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param userId Target user Id.\n * @param options The options parameters.\n */\n removeUserFromAllGroups(\n hub: string,\n userId: string,\n options?: WebPubSubRemoveUserFromAllGroupsOptionalParams,\n ): Promise<void>;\n /**\n * Remove a user from the target group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param userId Target user Id.\n * @param options The options parameters.\n */\n removeUserFromGroup(\n hub: string,\n group: string,\n userId: string,\n options?: WebPubSubRemoveUserFromGroupOptionalParams,\n ): Promise<void>;\n /**\n * Add a user to the target group.\n * @param hub Target hub name, which should start with alphabetic characters and only contain\n * alpha-numeric characters or underscore.\n * @param group Target group name, which length should be greater than 0 and less than 1025.\n * @param userId Target user Id.\n * @param options The options parameters.\n */\n addUserToGroup(\n hub: string,\n group: string,\n userId: string,\n options?: WebPubSubAddUserToGroupOptionalParams,\n ): Promise<void>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"groupClient.js","sourceRoot":"","sources":["../../src/groupClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAkK/C;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAuB7B;;OAEG;IACH,YAAY,MAAuB,EAAE,OAAe,EAAE,SAAiB;QAbvE;;WAEG;QACa,eAAU,GAAW,YAAY,CAAC;QAWhD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,aAAa,CACxB,YAAoB,EACpB,UAAqC,EAAE;QAEvC,IAAI,QAA2C,CAAC;QAChD,SAAS,UAAU,CAAC,WAAkC,EAAE,YAAqB;YAC3E,QAAQ,GAAG,WAAW,CAAC;YACvB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gBACvB,OAAO,CAAC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,\n FullOperationResponse,\n OperationOptions,\n} from \"@azure/core-client\";\nimport type { RequestBodyType } from \"@azure/core-rest-pipeline\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport type { GeneratedClient } from \"./generated/generatedClient\";\nimport { tracingClient } from \"./tracing\";\nimport { getPayloadForMessage } from \"./utils\";\nimport type { JSONTypes } from \"./hubClient\";\n\n/**\n * Options for constructing a GroupAdmin client.\n */\nexport interface GroupAdminClientOptions extends CommonClientOptions {}\n\n/**\n * Options for adding a connection to a group.\n */\nexport interface GroupAddConnectionOptions extends OperationOptions {}\n\n/**\n * Options for adding a user to a group.\n */\nexport interface GroupAddUserOptions extends OperationOptions {}\n\n/**\n * Options for checking if a user is in a group\n */\nexport interface GroupHasUserOptions extends OperationOptions {}\n\n/**\n * Options for removing a user from a group\n */\nexport interface GroupRemoveUserOptions extends OperationOptions {}\n\n/**\n * Options for removing a connection from a group\n */\nexport interface GroupRemoveConnectionOptions extends OperationOptions {}\n\n/**\n * Options for sending messages to a group.\n */\nexport interface GroupSendToAllOptions extends OperationOptions {\n /**\n * Connection ids to exclude from receiving this message.\n */\n excludedConnections?: string[];\n /**\n * The filter syntax to filter out the connections to send the messages to following OData filter syntax.\n * Examples:\n * * Exclude connections from `user1` and `user2`: `userId ne 'user1' and userId ne 'user2'`\n * * Exclude connections in `group1`: `not('group1' in groups)`\n * Details about `filter` syntax please see [OData filter syntax for Azure Web PubSub](https://aka.ms/awps/filter-syntax).\n */\n filter?: string;\n /**\n * The time-to-live (TTL) value in seconds for messages sent to the service.\n * 0 is the default value, which means the message never expires.\n * 300 is the maximum value.\n * If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service.\n * This parameter can help when the client's bandwidth is limited.\n */\n messageTtlSeconds?: number;\n}\n\n/**\n * Options for sending text messages to a group..\n */\nexport interface GroupSendTextToAllOptions extends GroupSendToAllOptions {\n /**\n * The content will be sent to the clients in plain text.\n */\n contentType: \"text/plain\";\n}\n\n/**\n * Options for closing all connections to a group.\n */\nexport interface GroupCloseAllConnectionsOptions extends OperationOptions {\n /**\n * Reason the connection is being closed.\n */\n reason?: string;\n}\n\nexport interface WebPubSubGroup {\n /**\n * The name of this group\n */\n readonly groupName: string;\n\n /**\n * The name of the hub this group belongs to\n */\n readonly hubName: string;\n\n /**\n * The Web PubSub API version being used by this client\n */\n readonly apiVersion: string;\n\n /**\n * The Web PubSub endpoint this client is connected to\n */\n readonly endpoint: string;\n\n /**\n * Add a specific connection to this group\n *\n * @param connectionId - The connection id to add to this group\n * @param options - Additional options\n */\n addConnection(connectionId: string, options?: GroupAddConnectionOptions): Promise<void>;\n\n /**\n * Remove a specific connection from this group\n *\n * @param connectionId - The connection id to remove from this group\n * @param options - Additional options\n */\n removeConnection(connectionId: string, options?: GroupRemoveConnectionOptions): Promise<void>;\n\n /**\n * Close all connections to the group\n *\n * @param options - Additional options\n */\n closeAllConnections(options?: GroupCloseAllConnectionsOptions): Promise<void>;\n\n /**\n * Add a user to this group\n *\n * @param username - The user name to add\n * @param options - Additional options\n */\n addUser(username: string, options?: GroupAddUserOptions): Promise<void>;\n\n /**\n * Remove a user from this group\n *\n * @param username - The user name to remove\n * @param options - Additional options\n */\n removeUser(username: string, options?: GroupRemoveUserOptions): Promise<void>;\n\n /**\n * Send a text message to every connection in this group\n *\n * @param message - The message to send\n * @param options - Additional options\n */\n sendToAll(message: string, options: GroupSendTextToAllOptions): Promise<void>;\n /**\n * Send a json message to every connection in this group\n *\n * @param message - The message to send\n * @param options - Additional options\n */\n sendToAll(message: JSONTypes, options?: GroupSendToAllOptions): Promise<void>;\n /**\n * Send a binary message to every connection in this group\n *\n * @param message - The binary message to send\n * @param options - Additional options\n */\n sendToAll(message: RequestBodyType, options?: GroupSendToAllOptions): Promise<void>;\n}\n\n/**\n * @hidden\n */\nexport class WebPubSubGroupImpl implements WebPubSubGroup {\n private client!: GeneratedClient;\n\n /**\n * The name of this group\n */\n public readonly groupName: string;\n\n /**\n * The name of the hub this group belongs to\n */\n public readonly hubName: string;\n\n /**\n * The Web PubSub API version being used by this client\n */\n public readonly apiVersion: string = \"2020-10-01\";\n\n /**\n * The Web PubSub endpoint this client is connected to\n */\n public endpoint!: string;\n\n /**\n * @internal\n */\n constructor(client: GeneratedClient, hubName: string, groupName: string) {\n this.client = client;\n this.groupName = groupName;\n this.hubName = hubName;\n }\n /**\n * Add a specific connection to this group\n *\n * @param connectionId - The connection id to add to this group\n * @param options - Additional options\n */\n public async addConnection(\n connectionId: string,\n options: GroupAddConnectionOptions = {},\n ): Promise<void> {\n let response: FullOperationResponse | undefined;\n function onResponse(rawResponse: FullOperationResponse, flatResponse: unknown): void {\n response = rawResponse;\n if (options.onResponse) {\n options.onResponse(rawResponse, flatResponse);\n }\n }\n\n return tracingClient.withSpan(\n \"WebPubSubGroupClient.addConnection\",\n options,\n async (updatedOptions) => {\n await this.client.webPubSub.addConnectionToGroup(\n this.hubName,\n this.groupName,\n connectionId,\n {\n ...updatedOptions,\n onResponse,\n },\n );\n\n if (response!.status === 404) {\n throw new RestError(`Connection id '${connectionId}' doesn't exist`, {\n statusCode: response?.status,\n request: response?.request,\n response: response,\n });\n }\n },\n );\n }\n\n /**\n * Remove a specific connection from this group\n *\n * @param connectionId - The connection id to remove from this group\n * @param options - Additional options\n */\n public async removeConnection(\n connectionId: string,\n options: GroupRemoveConnectionOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubGroupClient.removeConnection\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.removeConnectionFromGroup(\n this.hubName,\n this.groupName,\n connectionId,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Close all connections to this group\n *\n * @param options - Additional options\n */\n public async closeAllConnections(options: GroupCloseAllConnectionsOptions = {}): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubGroupClient.closeAllConnections\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.closeGroupConnections(\n this.hubName,\n this.groupName,\n updatedOptions,\n );\n },\n );\n }\n /**\n * Add a user to this group\n *\n * @param username - The user name to add\n * @param options - Additional options\n */\n public async addUser(username: string, options: GroupAddUserOptions = {}): Promise<void> {\n return tracingClient.withSpan(\"WebPubSubGroupClient.addUser\", options, (updatedOptions) => {\n return this.client.webPubSub.addUserToGroup(\n this.hubName,\n this.groupName,\n username,\n updatedOptions,\n );\n });\n }\n\n /**\n * Remove a user from this group\n *\n * @param username - The user name to remove\n * @param options - Additional options\n */\n public async removeUser(username: string, options: GroupRemoveUserOptions = {}): Promise<void> {\n return tracingClient.withSpan(\"WebPubSubGroupClient.removeUser\", options, (updatedOptions) => {\n return this.client.webPubSub.removeUserFromGroup(\n this.hubName,\n this.groupName,\n username,\n updatedOptions,\n );\n });\n }\n\n /**\n * Send a text message to every connection in this group\n *\n * @param message - The message to send\n * @param options - Additional options\n */\n public async sendToAll(message: string, options: GroupSendTextToAllOptions): Promise<void>;\n /**\n * Send a json message to every connection in this group\n *\n * @param message - The message to send\n * @param options - Additional options\n */\n public async sendToAll(message: JSONTypes, options?: GroupSendToAllOptions): Promise<void>;\n /**\n * Send a binary message to every connection in this group\n *\n * @param message - The binary message to send\n * @param options - Additional options\n */\n public async sendToAll(message: RequestBodyType, options?: GroupSendToAllOptions): Promise<void>;\n\n public async sendToAll(\n message: JSONTypes | RequestBodyType,\n options: GroupSendToAllOptions | GroupSendTextToAllOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\"WebPubSubGroupClient.sendToAll\", options, (updatedOptions) => {\n const { contentType, payload } = getPayloadForMessage(message, updatedOptions);\n return this.client.webPubSub.sendToGroup(\n this.hubName,\n this.groupName,\n contentType,\n payload as any,\n updatedOptions,\n );\n });\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"hubClient.js","sourceRoot":"","sources":["../../src/hubClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE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C/C,CAAC;gBACD,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC;YAC9C,CAAC;YAED,OAAO;gBACL,KAAK;gBACL,OAAO;gBACP,GAAG,EAAE,GAAG,OAAO,iBAAiB,KAAK,EAAE;aACxC,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n CommonClientOptions,\n FullOperationResponse,\n OperationOptions,\n} from \"@azure/core-client\";\nimport type { RequestBodyType } from \"@azure/core-rest-pipeline\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { GeneratedClient } from \"./generated/generatedClient\";\nimport type {\n WebPubSubGroup,\n GroupAddConnectionOptions,\n GroupRemoveConnectionOptions,\n} from \"./groupClient\";\nimport { WebPubSubGroupImpl } from \"./groupClient\";\nimport type { AzureKeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { webPubSubKeyCredentialPolicy } from \"./webPubSubCredentialPolicy\";\nimport { tracingClient } from \"./tracing\";\nimport { logger } from \"./logger\";\nimport { parseConnectionString } from \"./parseConnectionString\";\nimport jwt from \"jsonwebtoken\";\nimport { getPayloadForMessage } from \"./utils\";\nimport type {\n GeneratedClientOptionalParams,\n AddToGroupsRequest,\n RemoveFromGroupsRequest,\n} from \"./generated\";\nimport { webPubSubReverseProxyPolicy } from \"./reverseProxyPolicy\";\n\n/**\n * Options for closing a connection to a hub.\n */\nexport interface HubCloseConnectionOptions extends OperationOptions {\n /**\n * Reason the connection is being closed.\n */\n reason?: string;\n}\n\n/**\n * Options for closing all connections to a hub.\n */\nexport interface HubCloseAllConnectionsOptions extends OperationOptions {\n /**\n * Reason the connection is being closed.\n */\n reason?: string;\n}\n\n/**\n * Options for closing all of a user's connections to a hub.\n */\nexport interface HubCloseUserConnectionsOptions extends OperationOptions {\n /**\n * Reason the connection is being closed.\n */\n reason?: string;\n}\n\n/**\n * Options for sending messages to hubs.\n */\nexport interface HubSendToAllOptions extends OperationOptions {\n /**\n * Connection ids to exclude from receiving this message.\n */\n excludedConnections?: string[];\n /**\n * The filter syntax to filter out the connections to send the messages to following OData filter syntax.\n * Examples:\n * * Exclude connections from `user1` and `user2`: `userId ne 'user1' and userId ne 'user2'`\n * * Exclude connections in `group1`: `not('group1' in groups)`\n * Details about `filter` syntax please see [OData filter syntax for Azure Web PubSub](https://aka.ms/awps/filter-syntax).\n */\n filter?: string;\n /**\n * The time-to-live (TTL) value in seconds for messages sent to the service.\n * 0 is the default value, which means the message never expires.\n * 300 is the maximum value.\n * If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service.\n * This parameter can help when the client's bandwidth is limited.\n */\n messageTtlSeconds?: number;\n}\n\n/**\n * Options for sending text messages to hubs.\n */\nexport interface HubSendTextToAllOptions extends HubSendToAllOptions {\n /**\n * The content will be sent to the clients in plain text.\n */\n contentType: \"text/plain\";\n}\n\n/**\n * Types which can be serialized and sent as JSON.\n */\nexport type JSONTypes = string | number | boolean | object;\n\n/**\n * Options for constructing a HubAdmin client.\n */\nexport interface WebPubSubServiceClientOptions extends CommonClientOptions {\n /**\n * Reverse proxy endpoint (for example, your Azure API management endpoint)\n */\n reverseProxyEndpoint?: string;\n /**\n * Options to configure the logging options.\n */\n loggingOptions?: WebPubSubServiceClientLogOptions;\n}\n\n/**\n * Options to configure the logging options.\n */\nexport declare interface WebPubSubServiceClientLogOptions {\n /**\n * Header names whose values will be logged when logging is enabled.\n * Defaults include a list of well-known safe headers. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n */\n additionalAllowedHeaderNames?: string[];\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n */\n additionalAllowedQueryParameters?: string[];\n}\n\n/**\n * Options for checking if a connection exists.\n */\nexport interface HasConnectionOptions extends OperationOptions {}\n\n/**\n * Options for checking if a group exists.\n */\nexport interface HubHasGroupOptions extends OperationOptions {}\n\n/**\n * Options for checking if a user exists.\n */\nexport interface HubHasUserOptions extends OperationOptions {}\n\n/**\n * Options for removing a user from all groups.\n */\nexport interface HubRemoveUserFromAllGroupsOptions extends HubCloseConnectionOptions {}\n\n/**\n * Options for sending a message to a specific connection.\n */\nexport interface HubSendToConnectionOptions extends OperationOptions {\n /**\n * The time-to-live (TTL) value in seconds for messages sent to the service.\n * 0 is the default value, which means the message never expires.\n * 300 is the maximum value.\n * If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service.\n * This parameter can help when the client's bandwidth is limited.\n */\n messageTtlSeconds?: number;\n}\n\n/**\n * Options for sending a text message to a connection.\n */\nexport interface HubSendTextToConnectionOptions extends HubSendToConnectionOptions {\n contentType: \"text/plain\";\n}\n\n/**\n * Options for sending a message to a user.\n */\nexport interface HubSendToUserOptions extends OperationOptions {\n /**\n * The filter syntax to filter out the connections to send the messages to following OData filter syntax.\n * Examples:\n * * Exclude connections in `group1`: `not('group1' in groups)`\n * * Send to connections in `group1` or `group2`: `'group1' in groups or `group2` in groups`\n * Details about `filter` syntax please see [OData filter syntax for Azure Web PubSub](https://aka.ms/awps/filter-syntax).\n */\n filter?: string;\n /**\n * The time-to-live (TTL) value in seconds for messages sent to the service.\n * 0 is the default value, which means the message never expires.\n * 300 is the maximum value.\n * If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service.\n * This parameter can help when the client's bandwidth is limited.\n */\n messageTtlSeconds?: number;\n}\n\n/**\n * Options for sending a text message to a user.\n */\nexport interface HubSendTextToUserOptions extends HubSendToUserOptions {\n /**\n * The content will be sent to the clients in plain text.\n */\n contentType: \"text/plain\";\n}\n\nexport type Permission = \"joinLeaveGroup\" | \"sendToGroup\";\n\n/**\n * Options for grant permissions to a connection\n */\nexport interface HubGrantPermissionOptions extends OperationOptions {\n /**\n * The meaning of the target depends on the specific permission.\n * For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.\n */\n targetName?: string;\n}\n\n/**\n * Options for revoke permissions from a connection\n */\nexport interface HubRevokePermissionOptions extends OperationOptions {\n /**\n * The meaning of the target depends on the specific permission.\n * For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.\n */\n targetName?: string;\n}\n\n/**\n * Options for checking if a connection has the specified permission\n */\nexport interface HubHasPermissionOptions extends OperationOptions {\n /**\n * The meaning of the target depends on the specific permission.\n * For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.\n */\n targetName?: string;\n}\n\n/**\n * The type of client endpoint that is being requested.\n */\nexport type WebPubSubClientProtocol = \"default\" | \"mqtt\" | \"socketio\";\n\n/**\n * Options for generating a token to connect a client to the Azure Web Pubsub service.\n */\nexport interface GenerateClientTokenOptions extends OperationOptions {\n /**\n * The userId for the client.\n */\n userId?: string;\n\n /**\n * The roles that the connection with the generated token will have.\n * Roles give the client initial permissions to leave, join, or publish to groups when using PubSub subprotocol\n * * `webpubsub.joinLeaveGroup`: the client can join or leave any group\n * * `webpubsub.sendToGroup`: the client can send messages to any group\n * * `webpubsub.joinLeaveGroup.<group>`: the client can join or leave group `<group>`\n * * `webpubsub.sendToGroup.<group>`: the client can send messages to group `<group>`\n *\n * {@link https://azure.github.io/azure-webpubsub/references/pubsub-websocket-subprotocol#permissions}\n */\n roles?: string[];\n\n /**\n * Minutes until the token expires.\n */\n expirationTimeInMinutes?: number;\n\n /**\n * The groups to join when the client connects\n */\n groups?: string[];\n\n /**\n * The protocol type of the client\n * * `default`: Default WebPubSub Client. Example Client Connection URL: _wss://exampleHost.com/client/hubs/exampleHub_\n * * `mqtt`: MQTT Client. Example Client Connection URL: _wss://exampleHost.com/client/mqtt/hubs/exampleHub_\n */\n clientProtocol?: WebPubSubClientProtocol;\n}\n\n/**\n * A response containing the client token.\n */\nexport interface ClientTokenResponse {\n /**\n * The client token.\n */\n token: string;\n /**\n * The URL client connects to\n */\n baseUrl: string;\n /**\n * The URL client connects to with access_token query string\n */\n url: string;\n}\n\n/**\n * Client for connecting to a Web PubSub hub\n */\nexport class WebPubSubServiceClient {\n private readonly client: GeneratedClient;\n private credential!: AzureKeyCredential | TokenCredential;\n private readonly clientOptions?: WebPubSubServiceClientOptions;\n\n /**\n * The name of the hub this client is connected to\n */\n public readonly hubName: string;\n /**\n * The Web PubSub API version being used by this client\n */\n public readonly apiVersion: string = \"2024-01-01\";\n\n /**\n * The Web PubSub endpoint this client is connected to\n */\n public endpoint!: string;\n\n /**\n * Creates an instance of a WebPubSubServiceClient for sending messages and managing groups, connections, and users.\n *\n * Example usage:\n * ```ts\n * import { WebPubSubServiceClient } from \"@azure/web-pubsub\";\n * const connectionString = process.env['WEB_PUBSUB_CONNECTION_STRING'];\n * const client = new WebPubSubServiceClient(connectionString, 'chat');\n * ```\n *\n * @param connectionString - The connection string\n * @param hubName - The name of the hub to connect to. If omitted, '_default' is used.\n * @param options - Options to configure the http pipeline\n */\n constructor(connectionString: string, hubName: string, options?: WebPubSubServiceClientOptions);\n\n /**\n * Creates an instance of a WebPubSubServiceClient for sending messages and managing groups, connections, and users.\n *\n * Example usage:\n * ```ts\n * import { WebPubSubServiceClient, AzureKeyCredential } from \"@azure/web-pubsub\";\n * const cred = new AzureKeyCredential(\"<your web pubsub api key>\");\n * const endpoint = \"https://xxxx.webpubsubdev.azure.com\"\n * const client = new WebPubSubServiceClient(endpoint, cred, 'chat');\n * ```\n *\n * @param endpoint - The endpoint to connect to\n * @param credential - An AzureKeyCredential holding your service key\n * @param hubName - The name of the hub to connect to.\n * @param options - Options to configure the http pipeline\n */\n constructor(\n endpoint: string,\n credential: AzureKeyCredential | TokenCredential,\n hubName: string,\n options?: WebPubSubServiceClientOptions,\n );\n constructor(\n endpointOrConnectionString: string,\n credsOrHubName?: AzureKeyCredential | TokenCredential | string,\n hubNameOrOpts?: string | WebPubSubServiceClientOptions,\n opts?: WebPubSubServiceClientOptions,\n ) {\n // unpack constructor arguments\n if (typeof credsOrHubName === \"object\") {\n this.endpoint = endpointOrConnectionString;\n this.hubName = hubNameOrOpts as string;\n this.clientOptions = opts;\n this.credential = credsOrHubName;\n } else {\n const parsedCs = parseConnectionString(endpointOrConnectionString);\n this.endpoint = parsedCs.endpoint;\n this.credential = parsedCs.credential;\n this.hubName = credsOrHubName as string;\n this.clientOptions = hubNameOrOpts as WebPubSubServiceClientOptions;\n }\n\n const internalPipelineOptions: GeneratedClientOptionalParams = {\n ...this.clientOptions,\n ...{\n apiVersion: this.apiVersion,\n loggingOptions: {\n additionalAllowedHeaderNames:\n this.clientOptions?.loggingOptions?.additionalAllowedHeaderNames,\n additionalAllowedQueryParameters:\n this.clientOptions?.loggingOptions?.additionalAllowedQueryParameters,\n logger: logger.info,\n },\n },\n ...(isTokenCredential(this.credential)\n ? {\n credential: this.credential,\n credentialScopes: [\"https://webpubsub.azure.com/.default\"],\n }\n : {}),\n };\n\n this.client = new GeneratedClient(this.endpoint, internalPipelineOptions);\n\n if (!isTokenCredential(this.credential)) {\n this.client.pipeline.addPolicy(webPubSubKeyCredentialPolicy(this.credential));\n }\n\n if (this.clientOptions?.reverseProxyEndpoint) {\n this.client.pipeline.addPolicy(\n webPubSubReverseProxyPolicy(this.clientOptions?.reverseProxyEndpoint),\n );\n }\n }\n\n /**\n * Get a client for a group\n * @param groupName - The name of the group to connect to.\n */\n public group(groupName: string): WebPubSubGroup {\n return new WebPubSubGroupImpl(this.client, this.hubName, groupName);\n }\n\n /**\n * Broadcast a text message to all connections on this hub.\n *\n * @param message - The text message to send\n * @param options - Additional options\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n public async sendToAll(message: string, options: HubSendTextToAllOptions): Promise<void>;\n /**\n * Broadcast a JSON message to all connections on this hub.\n *\n * @param message - The JSON message to send\n * @param options - Additional options\n */\n public async sendToAll(message: JSONTypes, options?: HubSendToAllOptions): Promise<void>;\n /**\n * Broadcast a binary message to all connections on this hub.\n *\n * @param message - The message to send\n * @param options - Additional options\n */\n public async sendToAll(message: RequestBodyType, options?: HubSendToAllOptions): Promise<void>;\n\n public async sendToAll(\n message: RequestBodyType | JSONTypes,\n options: HubSendToAllOptions | HubSendTextToAllOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\"WebPubSubServiceClient.sendToAll\", options, (updatedOptions) => {\n const { contentType, payload } = getPayloadForMessage(message, updatedOptions);\n return this.client.webPubSub.sendToAll(\n this.hubName,\n contentType,\n payload as any,\n updatedOptions,\n );\n });\n }\n\n /**\n * Send a text message to a specific user\n *\n * @param username - User name to send to\n * @param message - The text message to send\n * @param options - Additional options\n */\n public async sendToUser(\n username: string,\n message: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: HubSendTextToUserOptions,\n ): Promise<void>;\n\n /**\n * Send a JSON message to a specific user\n *\n * @param username - User name to send to\n * @param message - The josn message to send\n * @param options - Additional options\n */\n public async sendToUser(\n username: string,\n message: JSONTypes,\n options?: HubSendToUserOptions,\n ): Promise<void>;\n\n /**\n * Send a binary message to a specific user\n *\n * @param username - The user name to send to\n * @param message - The binary message to send\n * @param options - Additional options\n */\n public async sendToUser(\n username: string,\n message: RequestBodyType,\n options?: HubSendToUserOptions | HubSendTextToUserOptions,\n ): Promise<void>;\n public async sendToUser(\n username: string,\n message: RequestBodyType | JSONTypes,\n options: HubSendToUserOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.sendToUser\",\n options,\n (updatedOptions) => {\n const { contentType, payload } = getPayloadForMessage(message, updatedOptions);\n return this.client.webPubSub.sendToUser(\n this.hubName,\n username,\n contentType,\n payload as any,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Send a text message to a specific connection\n *\n * @param connectionId - Connection id to send to\n * @param message - The text message\n * @param options - Additional options\n */\n public async sendToConnection(\n connectionId: string,\n message: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: HubSendTextToConnectionOptions,\n ): Promise<void>;\n\n /**\n * Send a binary message to a specific connection\n *\n * @param connectionId - Connection id to send to\n * @param message - The JSON message\n * @param options - Additional options\n */\n public async sendToConnection(\n connectionId: string,\n message: JSONTypes,\n options?: HubSendToConnectionOptions,\n ): Promise<void>;\n\n /**\n * Send a binary message to a specific connection\n *\n * @param connectionId - Connection id to send to\n * @param message - The binary message\n * @param options - Additional options\n */\n public async sendToConnection(\n connectionId: string,\n message: RequestBodyType,\n options?: HubSendToConnectionOptions | HubSendTextToConnectionOptions,\n ): Promise<void>;\n public async sendToConnection(\n connectionId: string,\n message: RequestBodyType | JSONTypes,\n options: HubSendToConnectionOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.sendToConnection\",\n options,\n (updatedOptions) => {\n const { contentType, payload } = getPayloadForMessage(message, updatedOptions);\n\n return this.client.webPubSub.sendToConnection(\n this.hubName,\n connectionId,\n contentType,\n payload as any,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Check if a specific connection is connected to this hub\n *\n * @param connectionId - Connection id to check\n * @param options - Additional options\n */\n public async connectionExists(\n connectionId: string,\n options: HasConnectionOptions = {},\n ): Promise<boolean> {\n let response: FullOperationResponse | undefined;\n function onResponse(rawResponse: FullOperationResponse, flatResponse: unknown): void {\n response = rawResponse;\n if (options.onResponse) {\n options.onResponse(rawResponse, flatResponse);\n }\n }\n\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.connectionExists\",\n options,\n async (updatedOptions) => {\n await this.client.webPubSub.connectionExists(this.hubName, connectionId, {\n ...updatedOptions,\n onResponse,\n });\n\n if (response!.status === 200) {\n return true;\n } else if (response!.status === 404) {\n return false;\n } else {\n // this is sad - wish this was handled by autorest.\n throw new RestError(response!.bodyAsText!, {\n statusCode: response?.status,\n request: response?.request,\n response: response,\n });\n }\n },\n );\n }\n\n /**\n * Close a specific connection to this hub\n *\n * @param connectionId - Connection id to close\n * @param options - Additional options\n */\n public async closeConnection(\n connectionId: string,\n options: HubCloseConnectionOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.closeConnection\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.closeConnection(this.hubName, connectionId, updatedOptions);\n },\n );\n }\n\n /**\n * Close all connections to this hub\n *\n * @param options - Additional options\n */\n public async closeAllConnections(options: HubCloseAllConnectionsOptions = {}): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.closeAllConnections\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.closeAllConnections(this.hubName, updatedOptions);\n },\n );\n }\n\n /**\n * Close all connections with the given user id\n *\n * @param user - User id to close\n * @param options - Additional options\n */\n public async closeUserConnections(\n userId: string,\n options: HubCloseUserConnectionsOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.closeUserConnections\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.closeUserConnections(this.hubName, userId, updatedOptions);\n },\n );\n }\n\n /**\n * Remove a specific user from all groups they are joined to\n * @param userId - The user id to remove from all groups\n * @param options - Additional options\n */\n public async removeUserFromAllGroups(\n userId: string,\n options: HubCloseConnectionOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.removeUserFromAllGroups\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.removeUserFromAllGroups(this.hubName, userId, updatedOptions);\n },\n );\n }\n\n /**\n * Remove a specific connection from all groups they are joined to\n * @param connectionId - The connection id to remove from all groups\n * @param options - Additional options\n */\n public async removeConnectionFromAllGroups(\n connectionId: string,\n options: HubCloseConnectionOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.removeConnectionFromAllGroups\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.removeConnectionFromAllGroups(\n this.hubName,\n connectionId,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Add filtered connections to multiple groups\n * @param groups - A list of groups which target connections will be added into\n * @param filter - An OData filter which target connections satisfy\n * @param options - Additional options\n */\n public async addConnectionsToGroups(\n groups: string[],\n filter: string,\n options: GroupAddConnectionOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.addConnectionsToGroups\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.addConnectionsToGroups(\n this.hubName,\n {\n groups: groups,\n filter: filter,\n } as AddToGroupsRequest,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Remove filtered connections from multiple groups\n * @param groups - A list of groups which target connections will be removed from\n * @param filter - An OData filter which target connections satisfy\n * @param options - Additional options\n */\n public async removeConnectionsFromGroups(\n groups: string[],\n filter: string,\n options: GroupRemoveConnectionOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.removeConnectionsFromGroups\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.removeConnectionsFromGroups(\n this.hubName,\n {\n groups: groups,\n filter: filter,\n } as RemoveFromGroupsRequest,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Check if a particular group exists (i.e. has active connections).\n *\n * @param groupName - The group name to check for\n * @param options - Additional options\n */\n public async groupExists(groupName: string, options: HubHasGroupOptions = {}): Promise<boolean> {\n let response: FullOperationResponse | undefined;\n function onResponse(rawResponse: FullOperationResponse, flatResponse: unknown): void {\n response = rawResponse;\n if (options.onResponse) {\n options.onResponse(rawResponse, flatResponse);\n }\n }\n\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.groupExists\",\n options,\n async (updatedOptions) => {\n await this.client.webPubSub.groupExists(this.hubName, groupName, {\n ...updatedOptions,\n onResponse,\n });\n\n if (response!.status === 200) {\n return true;\n } else if (response!.status === 404) {\n return false;\n } else {\n throw new RestError(response!.bodyAsText!, {\n statusCode: response?.status,\n request: response?.request,\n response: response,\n });\n }\n },\n );\n }\n\n /**\n * Check if a particular user is connected to this hub.\n *\n * @param username - The user name to check for\n * @param options - Additional options\n */\n public async userExists(username: string, options: HubHasUserOptions = {}): Promise<boolean> {\n let response: FullOperationResponse | undefined;\n function onResponse(rawResponse: FullOperationResponse, flatResponse: unknown): void {\n response = rawResponse;\n if (options.onResponse) {\n options.onResponse(rawResponse, flatResponse);\n }\n }\n\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.userExists\",\n options,\n async (updatedOptions) => {\n await this.client.webPubSub.userExists(this.hubName, username, {\n ...updatedOptions,\n onResponse,\n });\n\n if (response!.status === 200) {\n return true;\n } else if (response!.status === 404) {\n return false;\n } else {\n // this is sad - wish this was handled by autorest.\n throw new RestError(response!.bodyAsText!, {\n statusCode: response?.status,\n request: response?.request,\n response: response,\n });\n }\n },\n );\n }\n\n /**\n * Grant permissions to a connection\n *\n * @param connectionId - The connection id to grant permissions to\n * @param Permission - The permission to grant\n * @param options - Additional options\n */\n public async grantPermission(\n connectionId: string,\n permission: Permission,\n options: HubGrantPermissionOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.grantPermission\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.grantPermission(\n this.hubName,\n permission,\n connectionId,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Revoke permissions from a connection\n *\n * @param connectionId - The connection id to revoke permissions from\n * @param Permission - The permission to revoke\n * @param options - Additional options\n */\n public async revokePermission(\n connectionId: string,\n permission: Permission,\n options: HubRevokePermissionOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.revokePermission\",\n options,\n (updatedOptions) => {\n return this.client.webPubSub.revokePermission(\n this.hubName,\n permission,\n connectionId,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Check if the connection has the specified permission\n *\n * @param connectionId - The connection id to check permission\n * @param Permission - The permission to check\n * @param options - Additional options\n */\n public async hasPermission(\n connectionId: string,\n permission: Permission,\n options: HubHasPermissionOptions = {},\n ): Promise<boolean> {\n let response: FullOperationResponse | undefined;\n function onResponse(rawResponse: FullOperationResponse, flatResponse: unknown): void {\n response = rawResponse;\n if (options.onResponse) {\n options.onResponse(rawResponse, flatResponse);\n }\n }\n\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.hasPermission\",\n options,\n async (updatedOptions) => {\n await this.client.webPubSub.checkPermission(this.hubName, permission, connectionId, {\n ...updatedOptions,\n onResponse,\n });\n\n if (response!.status === 200) {\n return true;\n } else if (response!.status === 404) {\n return false;\n } else {\n // this is sad - wish this was handled by autorest.\n throw new RestError(response!.bodyAsText!, {\n statusCode: response?.status,\n request: response?.request,\n response: response,\n });\n }\n },\n );\n }\n\n /**\n * Generate a token for a client to connect to the Azure Web PubSub service.\n *\n * @param options - Additional options\n */\n public async getClientAccessToken(\n options: GenerateClientTokenOptions = {},\n ): Promise<ClientTokenResponse> {\n return tracingClient.withSpan(\n \"WebPubSubServiceClient.getClientAccessToken\",\n options,\n async (updatedOptions) => {\n const endpoint = this.endpoint.endsWith(\"/\") ? this.endpoint : this.endpoint + \"/\";\n const clientEndpoint = endpoint.replace(/(http)(s?:\\/\\/)/gi, \"ws$2\");\n const clientProtocol = updatedOptions.clientProtocol;\n let clientPath = `client/hubs/${this.hubName}`;\n switch (clientProtocol) {\n case \"mqtt\":\n clientPath = `clients/mqtt/hubs/${this.hubName}`;\n break;\n case \"socketio\":\n clientPath = `clients/socketio/hubs/${this.hubName}`;\n }\n const baseUrl = clientEndpoint + clientPath;\n\n let token: string;\n if (isTokenCredential(this.credential)) {\n const response = await this.client.webPubSub.generateClientToken(\n this.hubName,\n updatedOptions,\n );\n token = response.token!;\n } else {\n const key = this.credential.key;\n const audience = endpoint + clientPath;\n const payload = {\n role: updatedOptions?.roles,\n \"webpubsub.group\": updatedOptions?.groups,\n };\n const signOptions: jwt.SignOptions = {\n audience: audience,\n expiresIn:\n updatedOptions?.expirationTimeInMinutes === undefined\n ? \"1h\"\n : `${updatedOptions.expirationTimeInMinutes}m`,\n algorithm: \"HS256\",\n };\n if (updatedOptions?.userId) {\n signOptions.subject = updatedOptions?.userId;\n }\n token = jwt.sign(payload, key, signOptions);\n }\n\n return {\n token,\n baseUrl,\n url: `${baseUrl}?access_token=${token}`,\n };\n },\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EACL,sBAAsB,GAwBvB,MAAM,aAAa,CAAC;AAarB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport {\n WebPubSubServiceClient,\n HubSendToAllOptions,\n ClientTokenResponse,\n HubCloseConnectionOptions,\n HubCloseAllConnectionsOptions,\n HubCloseUserConnectionsOptions,\n GenerateClientTokenOptions,\n HasConnectionOptions,\n HubHasGroupOptions,\n HubHasUserOptions,\n WebPubSubServiceClientOptions,\n WebPubSubServiceClientLogOptions,\n HubRemoveUserFromAllGroupsOptions,\n HubSendToConnectionOptions,\n HubSendToUserOptions,\n HubGrantPermissionOptions,\n HubRevokePermissionOptions,\n HubHasPermissionOptions,\n HubSendTextToAllOptions,\n HubSendTextToConnectionOptions,\n HubSendTextToUserOptions,\n JSONTypes,\n Permission,\n WebPubSubClientProtocol,\n} from \"./hubClient\";\nexport {\n WebPubSubGroup,\n GroupAddConnectionOptions,\n GroupCloseAllConnectionsOptions,\n GroupAddUserOptions,\n GroupAdminClientOptions,\n GroupHasUserOptions,\n GroupRemoveConnectionOptions,\n GroupRemoveUserOptions,\n GroupSendTextToAllOptions,\n GroupSendToAllOptions,\n} from \"./groupClient\";\nexport { odata } from \"./utils\";\n"]}
@@ -1,23 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- /* eslint-disable no-invalid-this */
4
- import { parseConnectionString } from "../src/parseConnectionString";
5
- import { assert } from "chai";
6
- describe("Can parse connection string", function () {
7
- it("can parse valid connection string", async () => {
8
- let conn = "Endpoint=http://localhost;AccessKey=ABC;Port=8080;Version=1.0;";
9
- let parsed = parseConnectionString(conn);
10
- assert.equal(parsed.credential.key, "ABC");
11
- assert.equal(parsed.endpoint, "http://localhost:8080/");
12
- conn = "Endpoint=http://localhost;AccessKey=ABC;";
13
- parsed = parseConnectionString(conn);
14
- assert.equal(parsed.credential.key, "ABC");
15
- assert.equal(parsed.endpoint, "http://localhost/");
16
- });
17
- it("can throw with invalid connection string", async () => {
18
- assert.throws(() => parseConnectionString("Endpoint=http://localhost;"));
19
- assert.throws(() => parseConnectionString("http://localhost;"));
20
- assert.throws(() => parseConnectionString("localhost;"));
21
- });
22
- });
23
- //# sourceMappingURL=conn.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conn.spec.js","sourceRoot":"","sources":["../../test/conn.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,QAAQ,CAAC,6BAA6B,EAAE;IACtC,EAAE,CAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;QACjD,IAAI,IAAI,GAAG,gEAAgE,CAAC;QAC5E,IAAI,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;QACxD,IAAI,GAAG,0CAA0C,CAAC;QAClD,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;QACxD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,4BAA4B,CAAC,CAAC,CAAC;QACzE,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAAC;QAChE,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* eslint-disable no-invalid-this */\nimport { parseConnectionString } from \"../src/parseConnectionString\";\nimport { assert } from \"chai\";\n\ndescribe(\"Can parse connection string\", function () {\n it(\"can parse valid connection string\", async () => {\n let conn = \"Endpoint=http://localhost;AccessKey=ABC;Port=8080;Version=1.0;\";\n let parsed = parseConnectionString(conn);\n assert.equal(parsed.credential.key, \"ABC\");\n assert.equal(parsed.endpoint, \"http://localhost:8080/\");\n conn = \"Endpoint=http://localhost;AccessKey=ABC;\";\n parsed = parseConnectionString(conn);\n assert.equal(parsed.credential.key, \"ABC\");\n assert.equal(parsed.endpoint, \"http://localhost/\");\n });\n it(\"can throw with invalid connection string\", async () => {\n assert.throws(() => parseConnectionString(\"Endpoint=http://localhost;\"));\n assert.throws(() => parseConnectionString(\"http://localhost;\"));\n assert.throws(() => parseConnectionString(\"localhost;\"));\n });\n});\n"]}
@@ -1,138 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- /* eslint-disable no-invalid-this */
4
- import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder";
5
- import { WebPubSubServiceClient } from "../src";
6
- import { assert } from "chai";
7
- import recorderOptions from "./testEnv";
8
- /* eslint-disable @typescript-eslint/no-invalid-this */
9
- describe("Group client working with a group", function () {
10
- let recorder;
11
- let client;
12
- let lastResponse;
13
- function onResponse(response) {
14
- lastResponse = response;
15
- }
16
- beforeEach(async function () {
17
- recorder = new Recorder(this.currentTest);
18
- await recorder.start(recorderOptions);
19
- const hubClient = new WebPubSubServiceClient(assertEnvironmentVariable("WPS_CONNECTION_STRING"), "simplechat", recorder.configureClientOptions({}));
20
- client = hubClient.group("group");
21
- });
22
- it("can broadcast to groups", async () => {
23
- await client.sendToAll("hello", { contentType: "text/plain", onResponse });
24
- assert.equal(lastResponse === null || lastResponse === void 0 ? void 0 : lastResponse.status, 202);
25
- await client.sendToAll({ x: 1, y: 2 }, { onResponse });
26
- assert.equal(lastResponse === null || lastResponse === void 0 ? void 0 : lastResponse.status, 202);
27
- const binaryMessage = new Uint8Array(10);
28
- await client.sendToAll(binaryMessage.buffer, { onResponse });
29
- assert.equal(lastResponse === null || lastResponse === void 0 ? void 0 : lastResponse.status, 202);
30
- });
31
- it("can broadcast to group with filter", async () => {
32
- await client.sendToAll("hello", {
33
- contentType: "text/plain",
34
- filter: "userId ne 'user1'",
35
- messageTtlSeconds: 60,
36
- onResponse,
37
- });
38
- assert.equal(lastResponse === null || lastResponse === void 0 ? void 0 : lastResponse.status, 202);
39
- let error;
40
- try {
41
- await client.sendToAll("hello", {
42
- contentType: "text/plain",
43
- filter: "invalid filter",
44
- });
45
- }
46
- catch (e) {
47
- if (e.name !== "RestError") {
48
- throw e;
49
- }
50
- error = e;
51
- }
52
- assert.equal(error.statusCode, 400);
53
- assert.equal(JSON.parse(error.message).message, "Invalid syntax for 'invalid filter': Syntax error at position 14 in 'invalid filter'. (Parameter 'filter')");
54
- });
55
- it("can manage connections", async () => {
56
- // this endpoint returns 404 for connections not on the hub
57
- let error;
58
- try {
59
- await client.addConnection("xxxx");
60
- }
61
- catch (e) {
62
- error = e;
63
- }
64
- assert.exists(error);
65
- assert.strictEqual(error === null || error === void 0 ? void 0 : error.name, "RestError");
66
- try {
67
- await client.removeConnection("xxxx", { onResponse });
68
- }
69
- catch (e) {
70
- assert.exists(error);
71
- assert.strictEqual(error === null || error === void 0 ? void 0 : error.name, "RestError");
72
- }
73
- });
74
- // skipping until we can record better tests with an actual user active.
75
- it.skip("can manage users", async () => {
76
- // service returns 404, this should likely be raised as an error but isn't
77
- // due to the swagger design
78
- await client.addUser("brian");
79
- // service returns 404 and this throws.
80
- await client.removeUser("brian");
81
- });
82
- afterEach(async function () {
83
- await recorder.stop();
84
- });
85
- });
86
- describe("client working with multiple groups", function () {
87
- let recorder;
88
- let lastResponse;
89
- let hubClient;
90
- function onResponse(response) {
91
- lastResponse = response;
92
- }
93
- beforeEach(async function () {
94
- recorder = new Recorder(this.currentTest);
95
- await recorder.start(recorderOptions);
96
- hubClient = new WebPubSubServiceClient(assertEnvironmentVariable("WPS_CONNECTION_STRING"), "simplechat", recorder.configureClientOptions({}));
97
- });
98
- afterEach(async function () {
99
- await recorder.stop();
100
- });
101
- it("can join multiple groups with filter", async () => {
102
- await hubClient.addConnectionsToGroups(["group1", "group2"], "userId eq 'user 1'", {
103
- onResponse,
104
- });
105
- assert.equal(lastResponse === null || lastResponse === void 0 ? void 0 : lastResponse.status, 200);
106
- let error;
107
- try {
108
- await hubClient.addConnectionsToGroups(["group1", "group2"], "invalid filter");
109
- }
110
- catch (e) {
111
- if (e.name !== "RestError") {
112
- throw e;
113
- }
114
- error = e;
115
- }
116
- assert.equal(error.statusCode, 400);
117
- assert.equal(JSON.parse(error.message).message, "Invalid syntax for 'invalid filter': Syntax error at position 14 in 'invalid filter'. (Parameter 'filter')");
118
- });
119
- it("can leave multiple groups with filter", async () => {
120
- await hubClient.removeConnectionsFromGroups(["group1", "group2"], "userId eq 'user 1'", {
121
- onResponse,
122
- });
123
- assert.equal(lastResponse === null || lastResponse === void 0 ? void 0 : lastResponse.status, 200);
124
- let error;
125
- try {
126
- await hubClient.removeConnectionsFromGroups(["group1", "group2"], "invalid filter");
127
- }
128
- catch (e) {
129
- if (e.name !== "RestError") {
130
- throw e;
131
- }
132
- error = e;
133
- }
134
- assert.equal(error.statusCode, 400);
135
- assert.equal(JSON.parse(error.message).message, "Invalid syntax for 'invalid filter': Syntax error at position 14 in 'invalid filter'. (Parameter 'filter')");
136
- });
137
- });
138
- //# sourceMappingURL=groups.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.spec.js","sourceRoot":"","sources":["../../test/groups.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,eAAe,MAAM,WAAW,CAAC;AAGxC,uDAAuD;AAEvD,QAAQ,CAAC,mCAAmC,EAAE;IAC5C,IAAI,QAAkB,CAAC;IACvB,IAAI,MAAsB,CAAC;IAC3B,IAAI,YAA+C,CAAC;IACpD,SAAS,UAAU,CAAC,QAA+B;QACjD,YAAY,GAAG,QAAQ,CAAC;IAC1B,CAAC;IACD,UAAU,CAAC,KAAK;QACd,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACtC,MAAM,SAAS,GAAG,IAAI,sBAAsB,CAC1C,yBAAyB,CAAC,uBAAuB,CAAC,EAClD,YAAY,EACZ,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC,CACpC,CAAC;QAEF,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,CAAC;QAC3E,MA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ACD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QACpC,MAAM,CAAC,KAAK,CACV,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,EACjC,4GAA4G,CAC7G,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,SAAS,CAAC,2BAA2B,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,oBAAoB,EAAE;YACtF,UAAU;SACX,CAAC,CAAC;QACH,MAAM,CAAC,KAAK,CAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QAExC,IAAI,KAAK,CAAC;QACV,IAAI,CAAC;YACH,MAAM,SAAS,CAAC,2BAA2B,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,gBAAgB,CAAC,CAAC;QACtF,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,IAAI,CAAC,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;gBAC3B,MAAM,CAAC,CAAC;YACV,CAAC;YAED,KAAK,GAAG,CAAC,CAAC;QACZ,CAAC;QACD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QACpC,MAAM,CAAC,KAAK,CACV,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,EACjC,4GAA4G,CAC7G,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* eslint-disable no-invalid-this */\nimport { Recorder, assertEnvironmentVariable } from \"@azure-tools/test-recorder\";\nimport type { WebPubSubGroup } from \"../src\";\nimport { WebPubSubServiceClient } from \"../src\";\nimport { assert } from \"chai\";\nimport recorderOptions from \"./testEnv\";\nimport type { FullOperationResponse } from \"@azure/core-client\";\nimport type { RestError } from \"@azure/core-rest-pipeline\";\n/* eslint-disable @typescript-eslint/no-invalid-this */\n\ndescribe(\"Group client working with a group\", function () {\n let recorder: Recorder;\n let client: WebPubSubGroup;\n let lastResponse: FullOperationResponse | undefined;\n function onResponse(response: FullOperationResponse): void {\n lastResponse = response;\n }\n beforeEach(async function () {\n recorder = new Recorder(this.currentTest);\n await recorder.start(recorderOptions);\n const hubClient = new WebPubSubServiceClient(\n assertEnvironmentVariable(\"WPS_CONNECTION_STRING\"),\n \"simplechat\",\n recorder.configureClientOptions({}),\n );\n\n client = hubClient.group(\"group\");\n });\n\n it(\"can broadcast to groups\", async () => {\n await client.sendToAll(\"hello\", { contentType: \"text/plain\", onResponse });\n assert.equal(lastResponse?.status, 202);\n\n await client.sendToAll({ x: 1, y: 2 }, { onResponse });\n assert.equal(lastResponse?.status, 202);\n\n const binaryMessage = new Uint8Array(10);\n await client.sendToAll(binaryMessage.buffer, { onResponse });\n assert.equal(lastResponse?.status, 202);\n });\n\n it(\"can broadcast to group with filter\", async () => {\n await client.sendToAll(\"hello\", {\n contentType: \"text/plain\",\n filter: \"userId ne 'user1'\",\n messageTtlSeconds: 60,\n onResponse,\n });\n assert.equal(lastResponse?.status, 202);\n\n let error;\n try {\n await client.sendToAll(\"hello\", {\n contentType: \"text/plain\",\n filter: \"invalid filter\",\n });\n } catch (e: any) {\n if (e.name !== \"RestError\") {\n throw e;\n }\n\n error = e;\n }\n assert.equal(error.statusCode, 400);\n assert.equal(\n JSON.parse(error.message).message,\n \"Invalid syntax for 'invalid filter': Syntax error at position 14 in 'invalid filter'. (Parameter 'filter')\",\n );\n });\n\n it(\"can manage connections\", async () => {\n // this endpoint returns 404 for connections not on the hub\n let error: RestError | undefined;\n try {\n await client.addConnection(\"xxxx\");\n } catch (e: any) {\n error = e;\n }\n\n assert.exists(error);\n assert.strictEqual(error?.name, \"RestError\");\n\n try {\n await client.removeConnection(\"xxxx\", { onResponse });\n } catch (e: any) {\n assert.exists(error);\n assert.strictEqual(error?.name, \"RestError\");\n }\n });\n\n // skipping until we can record better tests with an actual user active.\n it.skip(\"can manage users\", async () => {\n // service returns 404, this should likely be raised as an error but isn't\n // due to the swagger design\n await client.addUser(\"brian\");\n\n // service returns 404 and this throws.\n await client.removeUser(\"brian\");\n });\n\n afterEach(async function () {\n await recorder.stop();\n });\n});\n\ndescribe(\"client working with multiple groups\", function () {\n let recorder: Recorder;\n let lastResponse: FullOperationResponse | undefined;\n let hubClient: WebPubSubServiceClient;\n function onResponse(response: FullOperationResponse): void {\n lastResponse = response;\n }\n beforeEach(async function () {\n recorder = new Recorder(this.currentTest);\n await recorder.start(recorderOptions);\n hubClient = new WebPubSubServiceClient(\n assertEnvironmentVariable(\"WPS_CONNECTION_STRING\"),\n \"simplechat\",\n recorder.configureClientOptions({}),\n );\n });\n\n afterEach(async function () {\n await recorder.stop();\n });\n\n it(\"can join multiple groups with filter\", async (): Promise<void> => {\n await hubClient.addConnectionsToGroups([\"group1\", \"group2\"], \"userId eq 'user 1'\", {\n onResponse,\n });\n assert.equal(lastResponse?.status, 200);\n\n let error;\n try {\n await hubClient.addConnectionsToGroups([\"group1\", \"group2\"], \"invalid filter\");\n } catch (e: any) {\n if (e.name !== \"RestError\") {\n throw e;\n }\n\n error = e;\n }\n assert.equal(error.statusCode, 400);\n assert.equal(\n JSON.parse(error.message).message,\n \"Invalid syntax for 'invalid filter': Syntax error at position 14 in 'invalid filter'. (Parameter 'filter')\",\n );\n });\n\n it(\"can leave multiple groups with filter\", async () => {\n await hubClient.removeConnectionsFromGroups([\"group1\", \"group2\"], \"userId eq 'user 1'\", {\n onResponse,\n });\n assert.equal(lastResponse?.status, 200);\n\n let error;\n try {\n await hubClient.removeConnectionsFromGroups([\"group1\", \"group2\"], \"invalid filter\");\n } catch (e: any) {\n if (e.name !== \"RestError\") {\n throw e;\n }\n\n error = e;\n }\n assert.equal(error.statusCode, 400);\n assert.equal(\n JSON.parse(error.message).message,\n \"Invalid syntax for 'invalid filter': Syntax error at position 14 in 'invalid filter'. (Parameter 'filter')\",\n );\n });\n});\n"]}