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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +118 -31
  3. package/dist/index.js +1315 -567
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/samples-dev/broadcasting.js +16 -16
  6. package/dist-esm/samples-dev/broadcasting.js.map +1 -1
  7. package/dist-esm/samples-dev/directMessage.js +9 -9
  8. package/dist-esm/samples-dev/directMessage.js.map +1 -1
  9. package/dist-esm/samples-dev/managingGroups.js +11 -12
  10. package/dist-esm/samples-dev/managingGroups.js.map +1 -1
  11. package/dist-esm/src/generated/generatedClient.js +23 -0
  12. package/dist-esm/src/generated/generatedClient.js.map +1 -0
  13. package/dist-esm/src/generated/generatedClientContext.js +41 -0
  14. package/dist-esm/src/generated/generatedClientContext.js.map +1 -0
  15. package/dist-esm/src/generated/index.js +10 -2
  16. package/dist-esm/src/generated/index.js.map +1 -1
  17. package/dist-esm/src/generated/models/index.js +13 -1
  18. package/dist-esm/src/generated/models/index.js.map +1 -1
  19. package/dist-esm/src/generated/models/mappers.js +368 -0
  20. package/dist-esm/src/generated/models/mappers.js.map +1 -0
  21. package/dist-esm/src/generated/models/parameters.js +124 -43
  22. package/dist-esm/src/generated/models/parameters.js.map +1 -1
  23. package/dist-esm/src/generated/operations/healthApi.js +16 -11
  24. package/dist-esm/src/generated/operations/healthApi.js.map +1 -1
  25. package/dist-esm/src/generated/operations/index.js +7 -0
  26. package/dist-esm/src/generated/operations/index.js.map +1 -1
  27. package/dist-esm/src/generated/operations/webPubSub.js +341 -175
  28. package/dist-esm/src/generated/operations/webPubSub.js.map +1 -1
  29. package/dist-esm/src/generated/operationsInterfaces/healthApi.js +9 -0
  30. package/dist-esm/src/generated/operationsInterfaces/healthApi.js.map +1 -0
  31. package/dist-esm/src/generated/operationsInterfaces/index.js +10 -0
  32. package/dist-esm/src/generated/operationsInterfaces/index.js.map +1 -0
  33. package/dist-esm/src/generated/operationsInterfaces/webPubSub.js +9 -0
  34. package/dist-esm/src/generated/operationsInterfaces/webPubSub.js.map +1 -0
  35. package/dist-esm/src/groupClient.js +74 -92
  36. package/dist-esm/src/groupClient.js.map +1 -1
  37. package/dist-esm/src/hubClient.js +280 -196
  38. package/dist-esm/src/hubClient.js.map +1 -1
  39. package/dist-esm/src/index.js.map +1 -1
  40. package/dist-esm/src/logger.js +1 -1
  41. package/dist-esm/src/logger.js.map +1 -1
  42. package/dist-esm/src/parseConnectionString.js +3 -1
  43. package/dist-esm/src/parseConnectionString.js.map +1 -1
  44. package/dist-esm/src/reverseProxyPolicy.js +21 -0
  45. package/dist-esm/src/reverseProxyPolicy.js.map +1 -0
  46. package/dist-esm/src/utils.js +8 -6
  47. package/dist-esm/src/utils.js.map +1 -1
  48. package/dist-esm/src/webPubSubCredentialPolicy.js +18 -18
  49. package/dist-esm/src/webPubSubCredentialPolicy.js.map +1 -1
  50. package/dist-esm/test/conn.spec.js +7 -8
  51. package/dist-esm/test/conn.spec.js.map +1 -1
  52. package/dist-esm/test/groups.spec.js +39 -38
  53. package/dist-esm/test/groups.spec.js.map +1 -1
  54. package/dist-esm/test/hubs.spec.js +95 -49
  55. package/dist-esm/test/hubs.spec.js.map +1 -1
  56. package/dist-esm/test/integration.spec.js +128 -0
  57. package/dist-esm/test/integration.spec.js.map +1 -0
  58. package/dist-esm/test/testEnv.js +5 -1
  59. package/dist-esm/test/testEnv.js.map +1 -1
  60. package/package.json +37 -36
  61. package/types/web-pubsub.d.ts +186 -138
  62. package/dist-esm/src/generated/azureWebPubSubServiceRestAPI.js +0 -15
  63. package/dist-esm/src/generated/azureWebPubSubServiceRestAPI.js.map +0 -1
  64. package/dist-esm/src/generated/azureWebPubSubServiceRestAPIContext.js +0 -34
  65. package/dist-esm/src/generated/azureWebPubSubServiceRestAPIContext.js.map +0 -1
  66. package/dist-esm/src/normalizeOptions.js +0 -8
  67. package/dist-esm/src/normalizeOptions.js.map +0 -1
@@ -1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QACvB,UAAU,CAAC,WAAW;KACvB;IACD,UAAU;CACX,CAAC","sourcesContent":["import * as coreHttp from \"@azure/core-http\";\nimport * as Parameters from \"../models/parameters\";\nimport { AzureWebPubSubServiceRestAPIContext } from \"../azureWebPubSubServiceRestAPIContext\";\nimport {\n ContentType,\n WebPubSubSendToAll$binaryOptionalParams,\n WebPubSubSendToAll$textOptionalParams,\n WebPubSubCloseClientConnectionOptionalParams,\n WebPubSubSendToGroup$binaryOptionalParams,\n WebPubSubSendToGroup$textOptionalParams,\n Enum0,\n WebPubSubGrantPermissionOptionalParams,\n Enum1,\n WebPubSubRevokePermissionOptionalParams,\n Enum2,\n WebPubSubCheckPermissionOptionalParams\n} from \"../models\";\n\n/** Class representing a WebPubSub. */\nexport class WebPubSub {\n private readonly client: AzureWebPubSubServiceRestAPIContext;\n\n /**\n * Initialize a new instance of the class WebPubSub class.\n * @param client Reference to the service client\n */\n constructor(client: AzureWebPubSubServiceRestAPIContext) {\n this.client = client;\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: coreHttp.HttpRequestBody,\n options?: WebPubSubSendToAll$binaryOptionalParams\n ): Promise<coreHttp.RestResponse>;\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<coreHttp.RestResponse>;\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 coreHttp.HttpRequestBody,\n WebPubSubSendToAll$binaryOptionalParams?\n ]\n | [string, \"text/plain\", string, WebPubSubSendToAll$textOptionalParams?]\n ): Promise<coreHttp.RestResponse> {\n let operationSpec: coreHttp.OperationSpec;\n let operationArguments: coreHttp.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 = coreHttp.operationOptionsToRequestOptionsBase(\n options || {}\n );\n return this.client.sendOperationRequest(\n operationArguments,\n operationSpec\n ) as Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n connectionId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n connectionExistsOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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 closeClientConnection(\n hub: string,\n connectionId: string,\n options?: WebPubSubCloseClientConnectionOptionalParams\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n connectionId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n closeClientConnectionOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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: coreHttp.HttpRequestBody,\n options?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse>;\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 coreHttp.HttpRequestBody,\n coreHttp.OperationOptions?\n ]\n | [string, string, \"text/plain\", string, coreHttp.OperationOptions?]\n ): Promise<coreHttp.RestResponse> {\n let operationSpec: coreHttp.OperationSpec;\n let operationArguments: coreHttp.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 = coreHttp.operationOptionsToRequestOptionsBase(\n options || {}\n );\n return this.client.sendOperationRequest(\n operationArguments,\n operationSpec\n ) as Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n group,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n groupExistsOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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: coreHttp.HttpRequestBody,\n options?: WebPubSubSendToGroup$binaryOptionalParams\n ): Promise<coreHttp.RestResponse>;\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<coreHttp.RestResponse>;\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 coreHttp.HttpRequestBody,\n WebPubSubSendToGroup$binaryOptionalParams?\n ]\n | [\n string,\n string,\n \"text/plain\",\n string,\n WebPubSubSendToGroup$textOptionalParams?\n ]\n ): Promise<coreHttp.RestResponse> {\n let operationSpec: coreHttp.OperationSpec;\n let operationArguments: coreHttp.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 = coreHttp.operationOptionsToRequestOptionsBase(\n options || {}\n );\n return this.client.sendOperationRequest(\n operationArguments,\n operationSpec\n ) as Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n group,\n connectionId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n addConnectionToGroupOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n group,\n connectionId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n removeConnectionFromGroupOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n userId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n userExistsOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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: coreHttp.HttpRequestBody,\n options?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse>;\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 coreHttp.HttpRequestBody,\n coreHttp.OperationOptions?\n ]\n | [string, string, \"text/plain\", string, coreHttp.OperationOptions?]\n ): Promise<coreHttp.RestResponse> {\n let operationSpec: coreHttp.OperationSpec;\n let operationArguments: coreHttp.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 = coreHttp.operationOptionsToRequestOptionsBase(\n options || {}\n );\n return this.client.sendOperationRequest(\n operationArguments,\n operationSpec\n ) as Promise<coreHttp.RestResponse>;\n }\n\n /**\n * Check whether a user exists in 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 userExistsInGroup(\n hub: string,\n group: string,\n userId: string,\n options?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n group,\n userId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n userExistsInGroupOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n group,\n userId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n addUserToGroupOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n group,\n userId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n removeUserFromGroupOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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?: coreHttp.OperationOptions\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n userId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n removeUserFromAllGroupsOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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: Enum0,\n connectionId: string,\n options?: WebPubSubGrantPermissionOptionalParams\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n permission,\n connectionId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n grantPermissionOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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: Enum1,\n connectionId: string,\n options?: WebPubSubRevokePermissionOptionalParams\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n permission,\n connectionId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n revokePermissionOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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: Enum2,\n connectionId: string,\n options?: WebPubSubCheckPermissionOptionalParams\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n hub,\n permission,\n connectionId,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n checkPermissionOperationSpec\n ) as Promise<coreHttp.RestResponse>;\n }\n}\n// Operation Specifications\nconst serializer = new coreHttp.Serializer({}, /* isXml */ false);\n\nconst sendToAll$binaryOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/:send\",\n httpMethod: \"POST\",\n responses: { 202: {}, default: {} },\n requestBody: Parameters.message,\n queryParameters: [Parameters.apiVersion, Parameters.excluded],\n urlParameters: [Parameters.$host, Parameters.hub],\n headerParameters: [Parameters.contentType],\n mediaType: \"binary\",\n serializer\n};\nconst sendToAll$textOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/:send\",\n httpMethod: \"POST\",\n responses: { 202: {}, default: {} },\n requestBody: Parameters.message1,\n queryParameters: [Parameters.apiVersion, Parameters.excluded],\n urlParameters: [Parameters.$host, Parameters.hub],\n headerParameters: [Parameters.contentType1],\n mediaType: \"text\",\n serializer\n};\nconst connectionExistsOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/connections/{connectionId}\",\n httpMethod: \"HEAD\",\n responses: { 200: {}, 404: {}, default: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],\n serializer\n};\nconst closeClientConnectionOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/connections/{connectionId}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, default: {} },\n queryParameters: [Parameters.apiVersion, Parameters.reason],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],\n serializer\n};\nconst sendToConnection$binaryOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/connections/{connectionId}/:send\",\n httpMethod: \"POST\",\n responses: { 202: {}, default: {} },\n requestBody: Parameters.message,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],\n headerParameters: [Parameters.contentType],\n mediaType: \"binary\",\n serializer\n};\nconst sendToConnection$textOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/connections/{connectionId}/:send\",\n httpMethod: \"POST\",\n responses: { 202: {}, default: {} },\n requestBody: Parameters.message1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.connectionId],\n headerParameters: [Parameters.contentType1],\n mediaType: \"text\",\n serializer\n};\nconst groupExistsOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}\",\n httpMethod: \"HEAD\",\n responses: { 200: {}, 404: {}, default: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.group],\n serializer\n};\nconst sendToGroup$binaryOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/:send\",\n httpMethod: \"POST\",\n responses: { 202: {}, default: {} },\n requestBody: Parameters.message,\n queryParameters: [Parameters.apiVersion, Parameters.excluded],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.group],\n headerParameters: [Parameters.contentType],\n mediaType: \"binary\",\n serializer\n};\nconst sendToGroup$textOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/:send\",\n httpMethod: \"POST\",\n responses: { 202: {}, default: {} },\n requestBody: Parameters.message1,\n queryParameters: [Parameters.apiVersion, Parameters.excluded],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.group],\n headerParameters: [Parameters.contentType1],\n mediaType: \"text\",\n serializer\n};\nconst addConnectionToGroupOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/connections/{connectionId}\",\n httpMethod: \"PUT\",\n responses: { 200: {}, 404: {}, default: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.group\n ],\n serializer\n};\nconst removeConnectionFromGroupOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/connections/{connectionId}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, 404: {}, default: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.group\n ],\n serializer\n};\nconst userExistsOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}\",\n httpMethod: \"HEAD\",\n responses: { 200: {}, 404: {}, default: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],\n serializer\n};\nconst sendToUser$binaryOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/:send\",\n httpMethod: \"POST\",\n responses: { 202: {}, default: {} },\n requestBody: Parameters.message,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],\n headerParameters: [Parameters.contentType],\n mediaType: \"binary\",\n serializer\n};\nconst sendToUser$textOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/:send\",\n httpMethod: \"POST\",\n responses: { 202: {}, default: {} },\n requestBody: Parameters.message1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],\n headerParameters: [Parameters.contentType1],\n mediaType: \"text\",\n serializer\n};\nconst userExistsInGroupOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/groups/{group}\",\n httpMethod: \"HEAD\",\n responses: { 200: {}, 404: {}, default: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.hub,\n Parameters.group,\n Parameters.userId\n ],\n serializer\n};\nconst addUserToGroupOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/groups/{group}\",\n httpMethod: \"PUT\",\n responses: { 200: {}, default: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.hub,\n Parameters.group,\n Parameters.userId\n ],\n serializer\n};\nconst removeUserFromGroupOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/groups/{group}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, default: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.hub,\n Parameters.group,\n Parameters.userId\n ],\n serializer\n};\nconst removeUserFromAllGroupsOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/groups\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, default: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.hub, Parameters.userId],\n serializer\n};\nconst grantPermissionOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}\",\n httpMethod: \"PUT\",\n responses: { 200: {}, default: {} },\n queryParameters: [Parameters.apiVersion, Parameters.targetName],\n urlParameters: [\n Parameters.$host,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.permission\n ],\n serializer\n};\nconst revokePermissionOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, default: {} },\n queryParameters: [Parameters.apiVersion, Parameters.targetName],\n urlParameters: [\n Parameters.$host,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.permission1\n ],\n serializer\n};\nconst checkPermissionOperationSpec: coreHttp.OperationSpec = {\n path: \"/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}\",\n httpMethod: \"HEAD\",\n responses: { 200: {}, 404: {}, default: {} },\n queryParameters: [Parameters.apiVersion, Parameters.targetName],\n urlParameters: [\n Parameters.$host,\n Parameters.hub,\n Parameters.connectionId,\n Parameters.permission2\n ],\n serializer\n};\n"]}
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;AAgCnD,6CAA6C;AAC7C,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,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,CAAC;IAED;;;;;OAKG;IACH,mBAAmB,CACjB,GAAW,EACX,OAAoD;QAEpD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,GAAG,EAAE,OAAO,EAAE,EACh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\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 { GeneratedClientContext } from \"../generatedClientContext\";\nimport {\n WebPubSubGenerateClientTokenOptionalParams,\n WebPubSubGenerateClientTokenResponse,\n WebPubSubCloseAllConnectionsOptionalParams,\n ContentType,\n WebPubSubSendToAll$binaryOptionalParams,\n WebPubSubSendToAll$textOptionalParams,\n WebPubSubConnectionExistsOptionalParams,\n WebPubSubCloseConnectionOptionalParams,\n WebPubSubSendToConnection$binaryOptionalParams,\n WebPubSubSendToConnection$textOptionalParams,\n WebPubSubGroupExistsOptionalParams,\n WebPubSubCloseGroupConnectionsOptionalParams,\n WebPubSubSendToGroup$binaryOptionalParams,\n WebPubSubSendToGroup$textOptionalParams,\n WebPubSubAddConnectionToGroupOptionalParams,\n WebPubSubRemoveConnectionFromGroupOptionalParams,\n WebPubSubUserExistsOptionalParams,\n WebPubSubCloseUserConnectionsOptionalParams,\n WebPubSubSendToUser$binaryOptionalParams,\n WebPubSubSendToUser$textOptionalParams,\n WebPubSubAddUserToGroupOptionalParams,\n WebPubSubRemoveUserFromGroupOptionalParams,\n WebPubSubRemoveUserFromAllGroupsOptionalParams,\n WebPubSubPermission,\n WebPubSubGrantPermissionOptionalParams,\n WebPubSubRevokePermissionOptionalParams,\n WebPubSubCheckPermissionOptionalParams\n} from \"../models\";\n\n/** Class containing WebPubSub operations. */\nexport class WebPubSubImpl implements WebPubSub {\n private readonly client: GeneratedClientContext;\n\n /**\n * Initialize a new instance of the class WebPubSub class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClientContext) {\n this.client = client;\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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 /**\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 * 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 * 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 * 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// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\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 ],\n urlParameters: [Parameters.endpoint, Parameters.hub],\n headerParameters: [Parameters.accept],\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 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: [Parameters.apiVersion, Parameters.excludedConnections],\n urlParameters: [Parameters.endpoint, Parameters.hub],\n headerParameters: [Parameters.contentType, Parameters.accept1],\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: [Parameters.apiVersion, Parameters.excludedConnections],\n urlParameters: [Parameters.endpoint, Parameters.hub],\n headerParameters: [Parameters.contentType1, Parameters.accept2],\n mediaType: \"text\",\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 bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubConnectionExistsExceptionHeaders\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],\n headerParameters: [Parameters.accept],\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 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],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],\n headerParameters: [Parameters.contentType, Parameters.accept1],\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],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],\n headerParameters: [Parameters.contentType1, Parameters.accept2],\n mediaType: \"text\",\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 bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubGroupExistsExceptionHeaders\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],\n headerParameters: [Parameters.accept],\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: [Parameters.apiVersion, Parameters.excludedConnections],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],\n headerParameters: [Parameters.contentType, Parameters.accept1],\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: [Parameters.apiVersion, Parameters.excludedConnections],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],\n headerParameters: [Parameters.contentType1, Parameters.accept2],\n mediaType: \"text\",\n serializer\n};\nconst addConnectionToGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/groups/{group}/connections/{connectionId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {},\n 404: {},\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 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 userExistsOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorDetail,\n headersMapper: Mappers.WebPubSubUserExistsExceptionHeaders\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],\n headerParameters: [Parameters.accept],\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: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],\n headerParameters: [Parameters.contentType, Parameters.accept1],\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: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],\n headerParameters: [Parameters.contentType1, Parameters.accept2],\n mediaType: \"text\",\n serializer\n};\nconst addUserToGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/api/hubs/{hub}/users/{userId}/groups/{group}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {},\n 404: {},\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};\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 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 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 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 bodyMapper: Mappers.ErrorDetail,\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 headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=healthApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthApi.js","sourceRoot":"","sources":["../../../../src/generated/operationsInterfaces/healthApi.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 { HealthApiGetServiceStatusOptionalParams } from \"../models\";\n\n/** Interface representing a HealthApi. */\nexport interface HealthApi {\n /**\n * Get service health status.\n * @param options The options parameters.\n */\n getServiceStatus(\n options?: HealthApiGetServiceStatusOptionalParams\n ): Promise<void>;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export * from "./healthApi";
9
+ export * from "./webPubSub";
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=webPubSub.js.map
@@ -0,0 +1 @@
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 WebPubSubGenerateClientTokenOptionalParams,\n WebPubSubGenerateClientTokenResponse,\n WebPubSubCloseAllConnectionsOptionalParams,\n ContentType,\n WebPubSubSendToAll$binaryOptionalParams,\n WebPubSubSendToAll$textOptionalParams,\n WebPubSubConnectionExistsOptionalParams,\n WebPubSubCloseConnectionOptionalParams,\n WebPubSubSendToConnection$binaryOptionalParams,\n WebPubSubSendToConnection$textOptionalParams,\n WebPubSubGroupExistsOptionalParams,\n WebPubSubCloseGroupConnectionsOptionalParams,\n WebPubSubSendToGroup$binaryOptionalParams,\n WebPubSubSendToGroup$textOptionalParams,\n WebPubSubAddConnectionToGroupOptionalParams,\n WebPubSubRemoveConnectionFromGroupOptionalParams,\n WebPubSubUserExistsOptionalParams,\n WebPubSubCloseUserConnectionsOptionalParams,\n WebPubSubSendToUser$binaryOptionalParams,\n WebPubSubSendToUser$textOptionalParams,\n WebPubSubAddUserToGroupOptionalParams,\n WebPubSubRemoveUserFromGroupOptionalParams,\n WebPubSubRemoveUserFromAllGroupsOptionalParams,\n WebPubSubPermission,\n WebPubSubGrantPermissionOptionalParams,\n WebPubSubRevokePermissionOptionalParams,\n WebPubSubCheckPermissionOptionalParams\n} from \"../models\";\n\n/** Interface representing a WebPubSub. */\nexport interface WebPubSub {\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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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"]}
@@ -1,16 +1,13 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- import { __awaiter } from "tslib";
4
- import { RestError } from "@azure/core-http";
3
+ import { RestError } from "@azure/core-rest-pipeline";
5
4
  import { createSpan } from "./tracing";
6
- import normalizeSendToAllOptions from "./normalizeOptions";
7
- import { getContentTypeForMessage } from "./utils";
5
+ import { getPayloadForMessage } from "./utils";
8
6
  /**
9
7
  * @hidden
10
8
  */
11
9
  export class WebPubSubGroupImpl {
12
10
  /**
13
- * @private
14
11
  * @internal
15
12
  */
16
13
  constructor(client, hubName, groupName) {
@@ -25,115 +22,100 @@ export class WebPubSubGroupImpl {
25
22
  /**
26
23
  * Add a specific connection to this group
27
24
  *
28
- * @param connectionId The connection id to add to this group
29
- * @param options Additional options
25
+ * @param connectionId - The connection id to add to this group
26
+ * @param options - Additional options
30
27
  */
31
- addConnection(connectionId, options = {}) {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-addConnection", options);
34
- try {
35
- const res = yield this.client.webPubSub.addConnectionToGroup(this.hubName, this.groupName, connectionId, updatedOptions);
36
- if (res._response.status === 404) {
37
- throw new RestError(`Connection id '${connectionId}' doesn't exist`, undefined, res._response.status, res._response.request, res._response);
38
- }
39
- return res;
28
+ async addConnection(connectionId, options = {}) {
29
+ const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-addConnection", options);
30
+ let response;
31
+ function onResponse(rawResponse, flatResponse) {
32
+ response = rawResponse;
33
+ if (updatedOptions.onResponse) {
34
+ updatedOptions.onResponse(rawResponse, flatResponse);
40
35
  }
41
- finally {
42
- span.end();
36
+ }
37
+ try {
38
+ await this.client.webPubSub.addConnectionToGroup(this.hubName, this.groupName, connectionId, Object.assign(Object.assign({}, updatedOptions), { onResponse }));
39
+ if (response.status === 404) {
40
+ throw new RestError(`Connection id '${connectionId}' doesn't exist`, {
41
+ statusCode: response === null || response === void 0 ? void 0 : response.status,
42
+ request: response === null || response === void 0 ? void 0 : response.request,
43
+ response: response
44
+ });
43
45
  }
44
- });
46
+ }
47
+ finally {
48
+ span.end();
49
+ }
45
50
  }
46
51
  /**
47
52
  * Remove a specific connection from this group
48
53
  *
49
- * @param connectionId The connection id to remove from this group
50
- * @param options Additional options
54
+ * @param connectionId - The connection id to remove from this group
55
+ * @param options - Additional options
51
56
  */
52
- removeConnection(connectionId, options = {}) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-removeConnection", options);
55
- try {
56
- const res = yield this.client.webPubSub.removeConnectionFromGroup(this.hubName, this.groupName, connectionId, updatedOptions);
57
- return res;
58
- }
59
- finally {
60
- span.end();
61
- }
62
- });
57
+ async removeConnection(connectionId, options = {}) {
58
+ const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-removeConnection", options);
59
+ try {
60
+ await this.client.webPubSub.removeConnectionFromGroup(this.hubName, this.groupName, connectionId, updatedOptions);
61
+ }
62
+ finally {
63
+ span.end();
64
+ }
63
65
  }
64
66
  /**
65
- * Add a user to this group
67
+ * Close all connections to this group
66
68
  *
67
- * @param username The user name to add
68
- * @param options Additional options
69
+ * @param options - Additional options
69
70
  */
70
- addUser(username, options = {}) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-addUser", options);
73
- try {
74
- return yield this.client.webPubSub.addUserToGroup(this.hubName, this.groupName, username, updatedOptions);
75
- }
76
- finally {
77
- span.end();
78
- }
79
- });
71
+ async closeAllConnections(options = {}) {
72
+ const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-closeAllConnections", options);
73
+ try {
74
+ return await this.client.webPubSub.closeGroupConnections(this.hubName, this.groupName, updatedOptions);
75
+ }
76
+ finally {
77
+ span.end();
78
+ }
80
79
  }
81
80
  /**
82
- * Check if a user is in this group
81
+ * Add a user to this group
83
82
  *
84
- * @param username The user name to check for
85
- * @param options Additional options
83
+ * @param username - The user name to add
84
+ * @param options - Additional options
86
85
  */
87
- hasUser(username, options = {}) {
88
- return __awaiter(this, void 0, void 0, function* () {
89
- const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-hasUser", options);
90
- try {
91
- const res = yield this.client.webPubSub.userExistsInGroup(this.hubName, this.groupName, username, updatedOptions);
92
- if (res._response.status === 200) {
93
- return true;
94
- }
95
- else if (res._response.status === 404) {
96
- return false;
97
- }
98
- else {
99
- // this is sad - wish this was handled by autorest.
100
- throw new RestError(res._response.bodyAsText, undefined, res._response.status, res._response.request, res._response);
101
- }
102
- }
103
- finally {
104
- span.end();
105
- }
106
- });
86
+ async addUser(username, options = {}) {
87
+ const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-addUser", options);
88
+ try {
89
+ await this.client.webPubSub.addUserToGroup(this.hubName, this.groupName, username, updatedOptions);
90
+ }
91
+ finally {
92
+ span.end();
93
+ }
107
94
  }
108
95
  /**
109
96
  * Remove a user from this group
110
97
  *
111
- * @param username The user name to remove
112
- * @param options Additional options
98
+ * @param username - The user name to remove
99
+ * @param options - Additional options
113
100
  */
114
- removeUser(username, options = {}) {
115
- return __awaiter(this, void 0, void 0, function* () {
116
- const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-removeUser", options);
117
- try {
118
- return yield this.client.webPubSub.removeUserFromGroup(this.hubName, this.groupName, username, updatedOptions);
119
- }
120
- finally {
121
- span.end();
122
- }
123
- });
101
+ async removeUser(username, options = {}) {
102
+ const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-removeUser", options);
103
+ try {
104
+ await this.client.webPubSub.removeUserFromGroup(this.hubName, this.groupName, username, updatedOptions);
105
+ }
106
+ finally {
107
+ span.end();
108
+ }
124
109
  }
125
- sendToAll(message, options = {}) {
126
- return __awaiter(this, void 0, void 0, function* () {
127
- const normalizedOptions = normalizeSendToAllOptions(options);
128
- const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-sendToAll", normalizedOptions);
129
- const contentType = getContentTypeForMessage(message, updatedOptions);
130
- try {
131
- return yield this.client.webPubSub.sendToGroup(this.hubName, this.groupName, contentType, contentType === "application/json" ? JSON.stringify(message) : message, updatedOptions);
132
- }
133
- finally {
134
- span.end();
135
- }
136
- });
110
+ async sendToAll(message, options = {}) {
111
+ const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-sendToAll", options);
112
+ const { contentType, payload } = getPayloadForMessage(message, updatedOptions);
113
+ try {
114
+ await this.client.webPubSub.sendToGroup(this.hubName, this.groupName, contentType, payload, updatedOptions);
115
+ }
116
+ finally {
117
+ span.end();
118
+ }
137
119
  }
138
120
  }
139
121
  //# sourceMappingURL=groupClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"groupClient.js","sourceRoot":"","sources":["../../src/groupClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAGL,SAAS,EAGV,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,yBAAyB,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AA6InD;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAuB7B;;;OAGG;IACH,YAAY,MAAuB,EAAE,OAAe,EAAE,SAAiB;QAdvE;;WAEG;QACa,eAAU,GAAW,YAAY,CAAC;QAYhD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACU,aAAa,CACxB,YAAoB,EACpB,UAAqC,EAAE;;YAEvC,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,UAAU,CACzC,4CAA4C,EAC5C,OAAO,CACR,CAAC;YAEF,IAAI;gBACF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,S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D,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,OAAO,CAAC,CAAC;YAC7D,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,UAAU,CACzC,wCAAwC,EACxC,iBAAiB,CAClB,CAAC;YAEF,MAAM,WAAW,GAAG,wBAAwB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YAEtE,IAAI;gBACF,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAC5C,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,SAAS,EACd,WAAkB,EAClB,WAAW,KAAK,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EACtE,cAAc,CACf,CAAC;aACH;oBAAS;gBACR,IAAI,CAAC,GAAG,EAAE,CAAC;aACZ;QACH,CAAC;KAAA;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n OperationOptions,\n RestResponse,\n RestError,\n HttpRequestBody,\n PipelineOptions\n} from \"@azure/core-http\";\nimport { AzureWebPubSubServiceRestAPI as GeneratedClient } from \"./generated/azureWebPubSubServiceRestAPI\";\nimport { createSpan } from \"./tracing\";\nimport normalizeSendToAllOptions from \"./normalizeOptions\";\nimport { getContentTypeForMessage } from \"./utils\";\nimport { JSONTypes } from \"./hubClient\";\n\n/**\n * Options for constructing a GroupAdmin client.\n */\nexport interface GroupAdminClientOptions extends PipelineOptions {}\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\n/**\n * Options for sending text messages to a group..\n */\nexport interface GroupSendTextToAllOptions extends OperationOptions {\n /**\n * Connection ids to exclude from receiving this message.\n */\n excludedConnections?: string[];\n contentType: \"text/plain\";\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<RestResponse>;\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(\n connectionId: string,\n options?: GroupRemoveConnectionOptions\n ): Promise<RestResponse>;\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<RestResponse>;\n\n /**\n * Check if a user is in this group\n *\n * @param username The user name to check for\n * @param options Additional options\n */\n hasUser(username: string, options?: GroupHasUserOptions): Promise<boolean>;\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<RestResponse>;\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<RestResponse>;\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<RestResponse>;\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: HttpRequestBody, options?: GroupSendToAllOptions): Promise<RestResponse>;\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 * @private\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<RestResponse> {\n const { span, updatedOptions } = createSpan(\n \"WebPubSubServiceClient-group-addConnection\",\n options\n );\n\n try {\n const res = await this.client.webPubSub.addConnectionToGroup(\n this.hubName,\n this.groupName,\n connectionId,\n updatedOptions\n );\n\n if (res._response.status === 404) {\n throw new RestError(\n `Connection id '${connectionId}' doesn't exist`,\n undefined,\n res._response.status,\n res._response.request,\n res._response\n );\n }\n\n return res;\n } finally {\n span.end();\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<RestResponse> {\n const { span, updatedOptions } = createSpan(\n \"WebPubSubServiceClient-group-removeConnection\",\n options\n );\n\n try {\n const res = await this.client.webPubSub.removeConnectionFromGroup(\n this.hubName,\n this.groupName,\n connectionId,\n updatedOptions\n );\n\n return res;\n } finally {\n span.end();\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<RestResponse> {\n const { span, updatedOptions } = createSpan(\"WebPubSubServiceClient-group-addUser\", options);\n\n try {\n return await this.client.webPubSub.addUserToGroup(\n this.hubName,\n this.groupName,\n username,\n updatedOptions\n );\n } finally {\n span.end();\n }\n }\n\n /**\n * Check if a user is in this group\n *\n * @param username The user name to check for\n * @param options Additional options\n */\n public async hasUser(username: string, options: GroupHasUserOptions = {}): Promise<boolean> {\n const { span, updatedOptions } = createSpan(\"WebPubSubServiceClient-group-hasUser\", options);\n\n try {\n const res = await this.client.webPubSub.userExistsInGroup(\n this.hubName,\n this.groupName,\n username,\n updatedOptions\n );\n\n if (res._response.status === 200) {\n return true;\n } else if (res._response.status === 404) {\n return false;\n } else {\n // this is sad - wish this was handled by autorest.\n throw new RestError(\n res._response.bodyAsText!,\n undefined,\n res._response.status,\n res._response.request,\n res._response\n );\n }\n } finally {\n span.end();\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(\n username: string,\n options: GroupRemoveUserOptions = {}\n ): Promise<RestResponse> {\n const { span, updatedOptions } = createSpan(\"WebPubSubServiceClient-group-removeUser\", options);\n\n try {\n return await this.client.webPubSub.removeUserFromGroup(\n this.hubName,\n this.groupName,\n username,\n updatedOptions\n );\n } finally {\n span.end();\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(\n message: string,\n options: GroupSendTextToAllOptions\n ): Promise<RestResponse>;\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(\n message: JSONTypes,\n options?: GroupSendToAllOptions\n ): Promise<RestResponse>;\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(\n message: HttpRequestBody,\n options?: GroupSendToAllOptions\n ): Promise<RestResponse>;\n\n public async sendToAll(\n message: string | HttpRequestBody,\n options: GroupSendToAllOptions | GroupSendTextToAllOptions = {}\n ): Promise<RestResponse> {\n const normalizedOptions = normalizeSendToAllOptions(options);\n const { span, updatedOptions } = createSpan(\n \"WebPubSubServiceClient-group-sendToAll\",\n normalizedOptions\n );\n\n const contentType = getContentTypeForMessage(message, updatedOptions);\n\n try {\n return await this.client.webPubSub.sendToGroup(\n this.hubName,\n this.groupName,\n contentType as any,\n contentType === \"application/json\" ? JSON.stringify(message) : message,\n updatedOptions\n );\n } finally {\n span.end();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"groupClient.js","sourceRoot":"","sources":["../../src/groupClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAmB,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAmJ/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,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,UAAU,CACzC,4CAA4C,EAC5C,OAAO,CACR,CAAC;QAEF,IAAI,QAA2C,CAAC;QAChD,SAAS,UAAU,CAAC,WAAkC,EAAE,YAAqB;YAC3E,QAAQ,GAAG,WAAW,CAAC;YACvB,IAAI,cAAc,CAAC,UAAU,EAAE;gBAC7B,cAAc,CAAC,UAAU,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;aACtD;QACH,CAAC;QAED,IAAI;YACF,MAAM,IAAI,CAAC,MAAM,CAAC,SAA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oft Corporation.\n// Licensed under the MIT license.\n\nimport { CommonClientOptions, FullOperationResponse, OperationOptions } from \"@azure/core-client\";\nimport { RestError, RequestBodyType } from \"@azure/core-rest-pipeline\";\nimport { GeneratedClient } from \"./generated/generatedClient\";\nimport { createSpan } from \"./tracing\";\nimport { getPayloadForMessage } from \"./utils\";\nimport { 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\n/**\n * Options for sending text messages to a group..\n */\nexport interface GroupSendTextToAllOptions extends OperationOptions {\n /**\n * Connection ids to exclude from receiving this message.\n */\n excludedConnections?: string[];\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 const { span, updatedOptions } = createSpan(\n \"WebPubSubServiceClient-group-addConnection\",\n options\n );\n\n let response: FullOperationResponse | undefined;\n function onResponse(rawResponse: FullOperationResponse, flatResponse: unknown): void {\n response = rawResponse;\n if (updatedOptions.onResponse) {\n updatedOptions.onResponse(rawResponse, flatResponse);\n }\n }\n\n try {\n await this.client.webPubSub.addConnectionToGroup(this.hubName, this.groupName, connectionId, {\n ...updatedOptions,\n onResponse\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 } finally {\n span.end();\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 const { span, updatedOptions } = createSpan(\n \"WebPubSubServiceClient-group-removeConnection\",\n options\n );\n\n try {\n await this.client.webPubSub.removeConnectionFromGroup(\n this.hubName,\n this.groupName,\n connectionId,\n updatedOptions\n );\n } finally {\n span.end();\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 const { span, updatedOptions } = createSpan(\n \"WebPubSubServiceClient-group-closeAllConnections\",\n options\n );\n\n try {\n return await this.client.webPubSub.closeGroupConnections(\n this.hubName,\n this.groupName,\n updatedOptions\n );\n } finally {\n span.end();\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 const { span, updatedOptions } = createSpan(\"WebPubSubServiceClient-group-addUser\", options);\n\n try {\n await this.client.webPubSub.addUserToGroup(\n this.hubName,\n this.groupName,\n username,\n updatedOptions\n );\n } finally {\n span.end();\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 const { span, updatedOptions } = createSpan(\"WebPubSubServiceClient-group-removeUser\", options);\n\n try {\n await this.client.webPubSub.removeUserFromGroup(\n this.hubName,\n this.groupName,\n username,\n updatedOptions\n );\n } finally {\n span.end();\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 const { span, updatedOptions } = createSpan(\"WebPubSubServiceClient-group-sendToAll\", options);\n\n const { contentType, payload } = getPayloadForMessage(message, updatedOptions);\n\n try {\n await this.client.webPubSub.sendToGroup(\n this.hubName,\n this.groupName,\n contentType,\n payload as any,\n updatedOptions\n );\n } finally {\n span.end();\n }\n }\n}\n"]}