@azure/web-pubsub 1.1.4-alpha.20241119.1 → 1.1.4-alpha.20241120.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/commonjs/generated/generatedClient.d.ts +19 -0
- package/dist/commonjs/generated/generatedClient.d.ts.map +1 -0
- package/dist/commonjs/generated/generatedClient.js +76 -0
- package/dist/commonjs/generated/generatedClient.js.map +1 -0
- package/dist/commonjs/generated/generatedClientContext.d.ts +14 -0
- package/dist/commonjs/generated/generatedClientContext.d.ts.map +1 -0
- package/dist/commonjs/generated/generatedClientContext.js +46 -0
- package/dist/commonjs/generated/generatedClientContext.js.map +1 -0
- package/dist/commonjs/generated/index.d.ts +4 -0
- package/dist/commonjs/generated/index.d.ts.map +1 -0
- package/dist/commonjs/generated/index.js +16 -0
- package/dist/commonjs/generated/index.js.map +1 -0
- package/dist/commonjs/generated/models/index.d.ts +323 -0
- package/dist/commonjs/generated/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/models/index.js +27 -0
- package/dist/commonjs/generated/models/index.js.map +1 -0
- package/dist/commonjs/generated/models/mappers.d.ts +30 -0
- package/dist/commonjs/generated/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/models/mappers.js +463 -0
- package/dist/commonjs/generated/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/models/parameters.d.ts +31 -0
- package/dist/commonjs/generated/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/models/parameters.js +335 -0
- package/dist/commonjs/generated/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/operations/healthApi.d.ts +18 -0
- package/dist/commonjs/generated/operations/healthApi.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/healthApi.js +43 -0
- package/dist/commonjs/generated/operations/healthApi.js.map +1 -0
- package/dist/commonjs/generated/operations/index.d.ts +3 -0
- package/dist/commonjs/generated/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/index.js +13 -0
- package/dist/commonjs/generated/operations/index.js.map +1 -0
- package/dist/commonjs/generated/operations/webPubSub.d.ts +249 -0
- package/dist/commonjs/generated/operations/webPubSub.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/webPubSub.js +874 -0
- package/dist/commonjs/generated/operations/webPubSub.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/healthApi.d.ts +10 -0
- package/dist/commonjs/generated/operationsInterfaces/healthApi.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/healthApi.js +10 -0
- package/dist/commonjs/generated/operationsInterfaces/healthApi.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/index.d.ts +3 -0
- package/dist/commonjs/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/index.js +13 -0
- package/dist/commonjs/generated/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/webPubSub.d.ts +224 -0
- package/dist/commonjs/generated/operationsInterfaces/webPubSub.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/webPubSub.js +10 -0
- package/dist/commonjs/generated/operationsInterfaces/webPubSub.js.map +1 -0
- package/dist/commonjs/groupClient.d.ts +232 -0
- package/dist/commonjs/groupClient.d.ts.map +1 -0
- package/dist/commonjs/groupClient.js +101 -0
- package/dist/commonjs/groupClient.js.map +1 -0
- package/dist/commonjs/hubClient.d.ts +478 -0
- package/dist/commonjs/hubClient.d.ts.map +1 -0
- package/dist/commonjs/hubClient.js +372 -0
- package/dist/commonjs/hubClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts +5 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +11 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/parseConnectionString.d.ts +8 -0
- package/dist/commonjs/parseConnectionString.d.ts.map +1 -0
- package/dist/commonjs/parseConnectionString.js +34 -0
- package/dist/commonjs/parseConnectionString.js.map +1 -0
- package/dist/commonjs/reverseProxyPolicy.d.ts +9 -0
- package/dist/commonjs/reverseProxyPolicy.d.ts.map +1 -0
- package/dist/commonjs/reverseProxyPolicy.js +25 -0
- package/dist/commonjs/reverseProxyPolicy.js.map +1 -0
- package/dist/commonjs/tracing.d.ts +3 -0
- package/dist/commonjs/tracing.d.ts.map +1 -0
- package/dist/commonjs/tracing.js +12 -0
- package/dist/commonjs/tracing.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/utils.d.ts +29 -0
- package/dist/commonjs/utils.d.ts.map +1 -0
- package/dist/commonjs/utils.js +73 -0
- package/dist/commonjs/utils.js.map +1 -0
- package/dist/commonjs/webPubSubCredentialPolicy.d.ts +13 -0
- package/dist/commonjs/webPubSubCredentialPolicy.d.ts.map +1 -0
- package/dist/commonjs/webPubSubCredentialPolicy.js +32 -0
- package/dist/commonjs/webPubSubCredentialPolicy.js.map +1 -0
- package/dist/esm/generated/generatedClient.d.ts +19 -0
- package/dist/esm/generated/generatedClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/generated/generatedClient.js +1 -1
- package/dist/esm/generated/generatedClient.js.map +1 -0
- package/dist/esm/generated/generatedClientContext.d.ts +14 -0
- package/dist/esm/generated/generatedClientContext.d.ts.map +1 -0
- package/dist/esm/generated/generatedClientContext.js.map +1 -0
- package/dist/esm/generated/index.d.ts +4 -0
- package/dist/esm/generated/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/generated/index.js +3 -3
- package/dist/esm/generated/index.js.map +1 -0
- package/dist/esm/generated/models/index.d.ts +323 -0
- package/dist/esm/generated/models/index.d.ts.map +1 -0
- package/dist/esm/generated/models/mappers.d.ts +30 -0
- package/dist/esm/generated/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/models/parameters.d.ts +31 -0
- package/dist/esm/generated/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/generated/models/parameters.js +1 -1
- package/dist/esm/generated/models/parameters.js.map +1 -0
- package/dist/esm/generated/operations/healthApi.d.ts +18 -0
- package/dist/esm/generated/operations/healthApi.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/generated/operations/healthApi.js +2 -2
- package/dist/esm/generated/operations/healthApi.js.map +1 -0
- package/dist/esm/generated/operations/index.d.ts +3 -0
- package/dist/esm/generated/operations/index.d.ts.map +1 -0
- package/{dist-esm/src/generated/operationsInterfaces → dist/esm/generated/operations}/index.js +2 -2
- package/dist/esm/generated/operations/index.js.map +1 -0
- package/dist/esm/generated/operations/webPubSub.d.ts +249 -0
- package/dist/esm/generated/operations/webPubSub.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/generated/operations/webPubSub.js +2 -2
- package/dist/esm/generated/operations/webPubSub.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/healthApi.d.ts +10 -0
- package/dist/esm/generated/operationsInterfaces/healthApi.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/generated/operationsInterfaces/healthApi.js.map +1 -1
- package/dist/esm/generated/operationsInterfaces/index.d.ts +3 -0
- package/dist/esm/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/{dist-esm/src/generated/operations → dist/esm/generated/operationsInterfaces}/index.js +2 -2
- package/dist/esm/generated/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/webPubSub.d.ts +224 -0
- package/dist/esm/generated/operationsInterfaces/webPubSub.d.ts.map +1 -0
- package/dist/esm/generated/operationsInterfaces/webPubSub.js.map +1 -0
- package/dist/esm/groupClient.d.ts +232 -0
- package/dist/esm/groupClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/groupClient.js +2 -2
- package/dist/esm/groupClient.js.map +1 -0
- package/dist/esm/hubClient.d.ts +478 -0
- package/dist/esm/hubClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/hubClient.js +9 -9
- package/dist/esm/hubClient.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/index.js +2 -2
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +5 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/parseConnectionString.d.ts +8 -0
- package/dist/esm/parseConnectionString.d.ts.map +1 -0
- package/dist/esm/reverseProxyPolicy.d.ts +9 -0
- package/dist/esm/reverseProxyPolicy.d.ts.map +1 -0
- package/dist/esm/tracing.d.ts +3 -0
- package/dist/esm/tracing.d.ts.map +1 -0
- package/dist/esm/utils.d.ts +29 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/webPubSubCredentialPolicy.d.ts +13 -0
- package/dist/esm/webPubSubCredentialPolicy.d.ts.map +1 -0
- package/package.json +56 -52
- package/dist/index.js +0 -2441
- package/dist/index.js.map +0 -1
- package/dist-esm/samples-dev/broadcasting.js +0 -27
- package/dist-esm/samples-dev/broadcasting.js.map +0 -1
- package/dist-esm/samples-dev/directMessage.js +0 -20
- package/dist-esm/samples-dev/directMessage.js.map +0 -1
- package/dist-esm/samples-dev/managingGroups.js +0 -23
- package/dist-esm/samples-dev/managingGroups.js.map +0 -1
- package/dist-esm/src/generated/generatedClient.js.map +0 -1
- package/dist-esm/src/generated/generatedClientContext.js.map +0 -1
- package/dist-esm/src/generated/index.js.map +0 -1
- package/dist-esm/src/generated/models/parameters.js.map +0 -1
- package/dist-esm/src/generated/operations/healthApi.js.map +0 -1
- package/dist-esm/src/generated/operations/index.js.map +0 -1
- package/dist-esm/src/generated/operations/webPubSub.js.map +0 -1
- package/dist-esm/src/generated/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/generated/operationsInterfaces/webPubSub.js.map +0 -1
- package/dist-esm/src/groupClient.js.map +0 -1
- package/dist-esm/src/hubClient.js.map +0 -1
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/test/conn.spec.js +0 -23
- package/dist-esm/test/conn.spec.js.map +0 -1
- package/dist-esm/test/groups.spec.js +0 -138
- package/dist-esm/test/groups.spec.js.map +0 -1
- package/dist-esm/test/hubs.spec.js +0 -270
- package/dist-esm/test/hubs.spec.js.map +0 -1
- package/dist-esm/test/integration.spec.js +0 -299
- package/dist-esm/test/integration.spec.js.map +0 -1
- package/dist-esm/test/odata.spec.js +0 -15
- package/dist-esm/test/odata.spec.js.map +0 -1
- package/dist-esm/test/testEnv.js +0 -23
- package/dist-esm/test/testEnv.js.map +0 -1
- /package/{dist-esm/src → dist/esm}/generated/generatedClientContext.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/models/index.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/models/index.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/generated/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/models/mappers.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/generated/operationsInterfaces/healthApi.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/operationsInterfaces/webPubSub.js +0 -0
- /package/{dist-esm/src → dist/esm}/logger.js +0 -0
- /package/{dist-esm/src → dist/esm}/logger.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/parseConnectionString.js +0 -0
- /package/{dist-esm/src → dist/esm}/parseConnectionString.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/reverseProxyPolicy.js +0 -0
- /package/{dist-esm/src → dist/esm}/reverseProxyPolicy.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/tracing.js +0 -0
- /package/{dist-esm/src → dist/esm}/tracing.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/utils.js +0 -0
- /package/{dist-esm/src → dist/esm}/utils.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/webPubSubCredentialPolicy.js +0 -0
- /package/{dist-esm/src → dist/esm}/webPubSubCredentialPolicy.js.map +0 -0
- /package/{types → dist}/web-pubsub.d.ts +0 -0
@@ -0,0 +1,874 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.WebPubSubImpl = void 0;
|
11
|
+
const tslib_1 = require("tslib");
|
12
|
+
const coreClient = tslib_1.__importStar(require("@azure/core-client"));
|
13
|
+
const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
14
|
+
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
15
|
+
/** Class containing WebPubSub operations. */
|
16
|
+
class WebPubSubImpl {
|
17
|
+
/**
|
18
|
+
* Initialize a new instance of the class WebPubSub class.
|
19
|
+
* @param client Reference to the service client
|
20
|
+
*/
|
21
|
+
constructor(client) {
|
22
|
+
this.client = client;
|
23
|
+
}
|
24
|
+
/**
|
25
|
+
* Add filtered connections to multiple groups.
|
26
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
27
|
+
* alpha-numeric characters or underscore.
|
28
|
+
* @param groupsToAdd Target groups and connection filter.
|
29
|
+
* @param options The options parameters.
|
30
|
+
*/
|
31
|
+
addConnectionsToGroups(hub, groupsToAdd, options) {
|
32
|
+
return this.client.sendOperationRequest({ hub, groupsToAdd, options }, addConnectionsToGroupsOperationSpec);
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Close the connections in the hub.
|
36
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
37
|
+
* alpha-numeric characters or underscore.
|
38
|
+
* @param options The options parameters.
|
39
|
+
*/
|
40
|
+
closeAllConnections(hub, options) {
|
41
|
+
return this.client.sendOperationRequest({ hub, options }, closeAllConnectionsOperationSpec);
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* Generate token for the client to connect Azure Web PubSub service.
|
45
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
46
|
+
* alpha-numeric characters or underscore.
|
47
|
+
* @param options The options parameters.
|
48
|
+
*/
|
49
|
+
generateClientToken(hub, options) {
|
50
|
+
return this.client.sendOperationRequest({ hub, options }, generateClientTokenOperationSpec);
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* Remove filtered connections from multiple groups.
|
54
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
55
|
+
* alpha-numeric characters or underscore.
|
56
|
+
* @param groupsToRemove Target groups and connection filter.
|
57
|
+
* @param options The options parameters.
|
58
|
+
*/
|
59
|
+
removeConnectionsFromGroups(hub, groupsToRemove, options) {
|
60
|
+
return this.client.sendOperationRequest({ hub, groupsToRemove, options }, removeConnectionsFromGroupsOperationSpec);
|
61
|
+
}
|
62
|
+
/**
|
63
|
+
* Broadcast content inside request body to all the connected client connections.
|
64
|
+
* @param args Includes all the parameters for this operation.
|
65
|
+
*/
|
66
|
+
sendToAll(...args) {
|
67
|
+
let operationSpec;
|
68
|
+
let operationArguments;
|
69
|
+
let options;
|
70
|
+
if (args[1] === "application/json" ||
|
71
|
+
args[1] === "application/octet-stream") {
|
72
|
+
operationSpec = sendToAll$binaryOperationSpec;
|
73
|
+
operationArguments = {
|
74
|
+
hub: args[0],
|
75
|
+
contentType: args[1],
|
76
|
+
message: args[2],
|
77
|
+
options: args[3],
|
78
|
+
};
|
79
|
+
options = args[3];
|
80
|
+
}
|
81
|
+
else if (args[1] === "text/plain") {
|
82
|
+
operationSpec = sendToAll$textOperationSpec;
|
83
|
+
operationArguments = {
|
84
|
+
hub: args[0],
|
85
|
+
contentType: args[1],
|
86
|
+
message: args[2],
|
87
|
+
options: args[3],
|
88
|
+
};
|
89
|
+
options = args[3];
|
90
|
+
}
|
91
|
+
else {
|
92
|
+
throw new TypeError(`"contentType" must be a valid value but instead was "${args[1]}".`);
|
93
|
+
}
|
94
|
+
operationArguments.options = options || {};
|
95
|
+
return this.client.sendOperationRequest(operationArguments, operationSpec);
|
96
|
+
}
|
97
|
+
/**
|
98
|
+
* Close the client connection.
|
99
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
100
|
+
* alpha-numeric characters or underscore.
|
101
|
+
* @param connectionId Target connection Id.
|
102
|
+
* @param options The options parameters.
|
103
|
+
*/
|
104
|
+
closeConnection(hub, connectionId, options) {
|
105
|
+
return this.client.sendOperationRequest({ hub, connectionId, options }, closeConnectionOperationSpec);
|
106
|
+
}
|
107
|
+
/**
|
108
|
+
* Check if the connection with the given connectionId exists.
|
109
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
110
|
+
* alpha-numeric characters or underscore.
|
111
|
+
* @param connectionId The connection Id.
|
112
|
+
* @param options The options parameters.
|
113
|
+
*/
|
114
|
+
connectionExists(hub, connectionId, options) {
|
115
|
+
return this.client.sendOperationRequest({ hub, connectionId, options }, connectionExistsOperationSpec);
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Send content inside request body to the specific connection.
|
119
|
+
* @param args Includes all the parameters for this operation.
|
120
|
+
*/
|
121
|
+
sendToConnection(...args) {
|
122
|
+
let operationSpec;
|
123
|
+
let operationArguments;
|
124
|
+
let options;
|
125
|
+
if (args[2] === "application/json" ||
|
126
|
+
args[2] === "application/octet-stream") {
|
127
|
+
operationSpec = sendToConnection$binaryOperationSpec;
|
128
|
+
operationArguments = {
|
129
|
+
hub: args[0],
|
130
|
+
connectionId: args[1],
|
131
|
+
contentType: args[2],
|
132
|
+
message: args[3],
|
133
|
+
options: args[4],
|
134
|
+
};
|
135
|
+
options = args[4];
|
136
|
+
}
|
137
|
+
else if (args[2] === "text/plain") {
|
138
|
+
operationSpec = sendToConnection$textOperationSpec;
|
139
|
+
operationArguments = {
|
140
|
+
hub: args[0],
|
141
|
+
connectionId: args[1],
|
142
|
+
contentType: args[2],
|
143
|
+
message: args[3],
|
144
|
+
options: args[4],
|
145
|
+
};
|
146
|
+
options = args[4];
|
147
|
+
}
|
148
|
+
else {
|
149
|
+
throw new TypeError(`"contentType" must be a valid value but instead was "${args[2]}".`);
|
150
|
+
}
|
151
|
+
operationArguments.options = options || {};
|
152
|
+
return this.client.sendOperationRequest(operationArguments, operationSpec);
|
153
|
+
}
|
154
|
+
/**
|
155
|
+
* Remove a connection from all groups.
|
156
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
157
|
+
* alpha-numeric characters or underscore.
|
158
|
+
* @param connectionId Target connection Id.
|
159
|
+
* @param options The options parameters.
|
160
|
+
*/
|
161
|
+
removeConnectionFromAllGroups(hub, connectionId, options) {
|
162
|
+
return this.client.sendOperationRequest({ hub, connectionId, options }, removeConnectionFromAllGroupsOperationSpec);
|
163
|
+
}
|
164
|
+
/**
|
165
|
+
* Check if there are any client connections inside the given group
|
166
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
167
|
+
* alpha-numeric characters or underscore.
|
168
|
+
* @param group Target group name, which length should be greater than 0 and less than 1025.
|
169
|
+
* @param options The options parameters.
|
170
|
+
*/
|
171
|
+
groupExists(hub, group, options) {
|
172
|
+
return this.client.sendOperationRequest({ hub, group, options }, groupExistsOperationSpec);
|
173
|
+
}
|
174
|
+
/**
|
175
|
+
* Close connections in the specific group.
|
176
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
177
|
+
* alpha-numeric characters or underscore.
|
178
|
+
* @param group Target group name, which length should be greater than 0 and less than 1025.
|
179
|
+
* @param options The options parameters.
|
180
|
+
*/
|
181
|
+
closeGroupConnections(hub, group, options) {
|
182
|
+
return this.client.sendOperationRequest({ hub, group, options }, closeGroupConnectionsOperationSpec);
|
183
|
+
}
|
184
|
+
/**
|
185
|
+
* Send content inside request body to a group of connections.
|
186
|
+
* @param args Includes all the parameters for this operation.
|
187
|
+
*/
|
188
|
+
sendToGroup(...args) {
|
189
|
+
let operationSpec;
|
190
|
+
let operationArguments;
|
191
|
+
let options;
|
192
|
+
if (args[2] === "application/json" ||
|
193
|
+
args[2] === "application/octet-stream") {
|
194
|
+
operationSpec = sendToGroup$binaryOperationSpec;
|
195
|
+
operationArguments = {
|
196
|
+
hub: args[0],
|
197
|
+
group: args[1],
|
198
|
+
contentType: args[2],
|
199
|
+
message: args[3],
|
200
|
+
options: args[4],
|
201
|
+
};
|
202
|
+
options = args[4];
|
203
|
+
}
|
204
|
+
else if (args[2] === "text/plain") {
|
205
|
+
operationSpec = sendToGroup$textOperationSpec;
|
206
|
+
operationArguments = {
|
207
|
+
hub: args[0],
|
208
|
+
group: args[1],
|
209
|
+
contentType: args[2],
|
210
|
+
message: args[3],
|
211
|
+
options: args[4],
|
212
|
+
};
|
213
|
+
options = args[4];
|
214
|
+
}
|
215
|
+
else {
|
216
|
+
throw new TypeError(`"contentType" must be a valid value but instead was "${args[2]}".`);
|
217
|
+
}
|
218
|
+
operationArguments.options = options || {};
|
219
|
+
return this.client.sendOperationRequest(operationArguments, operationSpec);
|
220
|
+
}
|
221
|
+
/**
|
222
|
+
* Remove a connection from the target group.
|
223
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
224
|
+
* alpha-numeric characters or underscore.
|
225
|
+
* @param group Target group name, which length should be greater than 0 and less than 1025.
|
226
|
+
* @param connectionId Target connection Id.
|
227
|
+
* @param options The options parameters.
|
228
|
+
*/
|
229
|
+
removeConnectionFromGroup(hub, group, connectionId, options) {
|
230
|
+
return this.client.sendOperationRequest({ hub, group, connectionId, options }, removeConnectionFromGroupOperationSpec);
|
231
|
+
}
|
232
|
+
/**
|
233
|
+
* Add a connection to the target group.
|
234
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
235
|
+
* alpha-numeric characters or underscore.
|
236
|
+
* @param group Target group name, which length should be greater than 0 and less than 1025.
|
237
|
+
* @param connectionId Target connection Id
|
238
|
+
* @param options The options parameters.
|
239
|
+
*/
|
240
|
+
addConnectionToGroup(hub, group, connectionId, options) {
|
241
|
+
return this.client.sendOperationRequest({ hub, group, connectionId, options }, addConnectionToGroupOperationSpec);
|
242
|
+
}
|
243
|
+
/**
|
244
|
+
* Revoke permission for the connection.
|
245
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
246
|
+
* alpha-numeric characters or underscore.
|
247
|
+
* @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.
|
248
|
+
* @param connectionId Target connection Id.
|
249
|
+
* @param options The options parameters.
|
250
|
+
*/
|
251
|
+
revokePermission(hub, permission, connectionId, options) {
|
252
|
+
return this.client.sendOperationRequest({ hub, permission, connectionId, options }, revokePermissionOperationSpec);
|
253
|
+
}
|
254
|
+
/**
|
255
|
+
* Check if a connection has permission to the specified action.
|
256
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
257
|
+
* alpha-numeric characters or underscore.
|
258
|
+
* @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.
|
259
|
+
* @param connectionId Target connection Id.
|
260
|
+
* @param options The options parameters.
|
261
|
+
*/
|
262
|
+
checkPermission(hub, permission, connectionId, options) {
|
263
|
+
return this.client.sendOperationRequest({ hub, permission, connectionId, options }, checkPermissionOperationSpec);
|
264
|
+
}
|
265
|
+
/**
|
266
|
+
* Grant permission to the connection.
|
267
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
268
|
+
* alpha-numeric characters or underscore.
|
269
|
+
* @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup.
|
270
|
+
* @param connectionId Target connection Id.
|
271
|
+
* @param options The options parameters.
|
272
|
+
*/
|
273
|
+
grantPermission(hub, permission, connectionId, options) {
|
274
|
+
return this.client.sendOperationRequest({ hub, permission, connectionId, options }, grantPermissionOperationSpec);
|
275
|
+
}
|
276
|
+
/**
|
277
|
+
* Check if there are any client connections connected for the given user.
|
278
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
279
|
+
* alpha-numeric characters or underscore.
|
280
|
+
* @param userId Target user Id.
|
281
|
+
* @param options The options parameters.
|
282
|
+
*/
|
283
|
+
userExists(hub, userId, options) {
|
284
|
+
return this.client.sendOperationRequest({ hub, userId, options }, userExistsOperationSpec);
|
285
|
+
}
|
286
|
+
/**
|
287
|
+
* Close connections for the specific user.
|
288
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
289
|
+
* alpha-numeric characters or underscore.
|
290
|
+
* @param userId The user Id.
|
291
|
+
* @param options The options parameters.
|
292
|
+
*/
|
293
|
+
closeUserConnections(hub, userId, options) {
|
294
|
+
return this.client.sendOperationRequest({ hub, userId, options }, closeUserConnectionsOperationSpec);
|
295
|
+
}
|
296
|
+
/**
|
297
|
+
* Send content inside request body to the specific user.
|
298
|
+
* @param args Includes all the parameters for this operation.
|
299
|
+
*/
|
300
|
+
sendToUser(...args) {
|
301
|
+
let operationSpec;
|
302
|
+
let operationArguments;
|
303
|
+
let options;
|
304
|
+
if (args[2] === "application/json" ||
|
305
|
+
args[2] === "application/octet-stream") {
|
306
|
+
operationSpec = sendToUser$binaryOperationSpec;
|
307
|
+
operationArguments = {
|
308
|
+
hub: args[0],
|
309
|
+
userId: args[1],
|
310
|
+
contentType: args[2],
|
311
|
+
message: args[3],
|
312
|
+
options: args[4],
|
313
|
+
};
|
314
|
+
options = args[4];
|
315
|
+
}
|
316
|
+
else if (args[2] === "text/plain") {
|
317
|
+
operationSpec = sendToUser$textOperationSpec;
|
318
|
+
operationArguments = {
|
319
|
+
hub: args[0],
|
320
|
+
userId: args[1],
|
321
|
+
contentType: args[2],
|
322
|
+
message: args[3],
|
323
|
+
options: args[4],
|
324
|
+
};
|
325
|
+
options = args[4];
|
326
|
+
}
|
327
|
+
else {
|
328
|
+
throw new TypeError(`"contentType" must be a valid value but instead was "${args[2]}".`);
|
329
|
+
}
|
330
|
+
operationArguments.options = options || {};
|
331
|
+
return this.client.sendOperationRequest(operationArguments, operationSpec);
|
332
|
+
}
|
333
|
+
/**
|
334
|
+
* Remove a user from all groups.
|
335
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
336
|
+
* alpha-numeric characters or underscore.
|
337
|
+
* @param userId Target user Id.
|
338
|
+
* @param options The options parameters.
|
339
|
+
*/
|
340
|
+
removeUserFromAllGroups(hub, userId, options) {
|
341
|
+
return this.client.sendOperationRequest({ hub, userId, options }, removeUserFromAllGroupsOperationSpec);
|
342
|
+
}
|
343
|
+
/**
|
344
|
+
* Remove a user from the target group.
|
345
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
346
|
+
* alpha-numeric characters or underscore.
|
347
|
+
* @param group Target group name, which length should be greater than 0 and less than 1025.
|
348
|
+
* @param userId Target user Id.
|
349
|
+
* @param options The options parameters.
|
350
|
+
*/
|
351
|
+
removeUserFromGroup(hub, group, userId, options) {
|
352
|
+
return this.client.sendOperationRequest({ hub, group, userId, options }, removeUserFromGroupOperationSpec);
|
353
|
+
}
|
354
|
+
/**
|
355
|
+
* Add a user to the target group.
|
356
|
+
* @param hub Target hub name, which should start with alphabetic characters and only contain
|
357
|
+
* alpha-numeric characters or underscore.
|
358
|
+
* @param group Target group name, which length should be greater than 0 and less than 1025.
|
359
|
+
* @param userId Target user Id.
|
360
|
+
* @param options The options parameters.
|
361
|
+
*/
|
362
|
+
addUserToGroup(hub, group, userId, options) {
|
363
|
+
return this.client.sendOperationRequest({ hub, group, userId, options }, addUserToGroupOperationSpec);
|
364
|
+
}
|
365
|
+
}
|
366
|
+
exports.WebPubSubImpl = WebPubSubImpl;
|
367
|
+
// Operation Specifications
|
368
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
369
|
+
const addConnectionsToGroupsOperationSpec = {
|
370
|
+
path: "/api/hubs/{hub}/:addToGroups",
|
371
|
+
httpMethod: "POST",
|
372
|
+
responses: {
|
373
|
+
200: {},
|
374
|
+
default: {
|
375
|
+
bodyMapper: Mappers.ErrorDetail,
|
376
|
+
headersMapper: Mappers.WebPubSubAddConnectionsToGroupsExceptionHeaders,
|
377
|
+
},
|
378
|
+
},
|
379
|
+
requestBody: Parameters.groupsToAdd,
|
380
|
+
queryParameters: [Parameters.apiVersion],
|
381
|
+
urlParameters: [Parameters.endpoint, Parameters.hub],
|
382
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
383
|
+
mediaType: "json",
|
384
|
+
serializer,
|
385
|
+
};
|
386
|
+
const closeAllConnectionsOperationSpec = {
|
387
|
+
path: "/api/hubs/{hub}/:closeConnections",
|
388
|
+
httpMethod: "POST",
|
389
|
+
responses: {
|
390
|
+
204: {},
|
391
|
+
default: {
|
392
|
+
bodyMapper: Mappers.ErrorDetail,
|
393
|
+
headersMapper: Mappers.WebPubSubCloseAllConnectionsExceptionHeaders,
|
394
|
+
},
|
395
|
+
},
|
396
|
+
queryParameters: [
|
397
|
+
Parameters.apiVersion,
|
398
|
+
Parameters.excluded,
|
399
|
+
Parameters.reason,
|
400
|
+
],
|
401
|
+
urlParameters: [Parameters.endpoint, Parameters.hub],
|
402
|
+
headerParameters: [Parameters.accept],
|
403
|
+
serializer,
|
404
|
+
};
|
405
|
+
const generateClientTokenOperationSpec = {
|
406
|
+
path: "/api/hubs/{hub}/:generateToken",
|
407
|
+
httpMethod: "POST",
|
408
|
+
responses: {
|
409
|
+
200: {
|
410
|
+
bodyMapper: Mappers.ClientTokenResponse,
|
411
|
+
},
|
412
|
+
default: {
|
413
|
+
bodyMapper: Mappers.ErrorDetail,
|
414
|
+
headersMapper: Mappers.WebPubSubGenerateClientTokenExceptionHeaders,
|
415
|
+
},
|
416
|
+
},
|
417
|
+
queryParameters: [
|
418
|
+
Parameters.apiVersion,
|
419
|
+
Parameters.userId,
|
420
|
+
Parameters.roles,
|
421
|
+
Parameters.expirationTimeInMinutes,
|
422
|
+
Parameters.groups,
|
423
|
+
Parameters.clientType,
|
424
|
+
],
|
425
|
+
urlParameters: [Parameters.endpoint, Parameters.hub],
|
426
|
+
headerParameters: [Parameters.accept1],
|
427
|
+
serializer,
|
428
|
+
};
|
429
|
+
const removeConnectionsFromGroupsOperationSpec = {
|
430
|
+
path: "/api/hubs/{hub}/:removeFromGroups",
|
431
|
+
httpMethod: "POST",
|
432
|
+
responses: {
|
433
|
+
200: {},
|
434
|
+
default: {
|
435
|
+
bodyMapper: Mappers.ErrorDetail,
|
436
|
+
headersMapper: Mappers.WebPubSubRemoveConnectionsFromGroupsExceptionHeaders,
|
437
|
+
},
|
438
|
+
},
|
439
|
+
requestBody: Parameters.groupsToRemove,
|
440
|
+
queryParameters: [Parameters.apiVersion],
|
441
|
+
urlParameters: [Parameters.endpoint, Parameters.hub],
|
442
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
443
|
+
mediaType: "json",
|
444
|
+
serializer,
|
445
|
+
};
|
446
|
+
const sendToAll$binaryOperationSpec = {
|
447
|
+
path: "/api/hubs/{hub}/:send",
|
448
|
+
httpMethod: "POST",
|
449
|
+
responses: {
|
450
|
+
202: {},
|
451
|
+
default: {
|
452
|
+
bodyMapper: Mappers.ErrorDetail,
|
453
|
+
headersMapper: Mappers.WebPubSubSendToAllExceptionHeaders,
|
454
|
+
},
|
455
|
+
},
|
456
|
+
requestBody: Parameters.message,
|
457
|
+
queryParameters: [
|
458
|
+
Parameters.apiVersion,
|
459
|
+
Parameters.excludedConnections,
|
460
|
+
Parameters.filter,
|
461
|
+
Parameters.messageTtlSeconds,
|
462
|
+
],
|
463
|
+
urlParameters: [Parameters.endpoint, Parameters.hub],
|
464
|
+
headerParameters: [Parameters.contentType1, Parameters.accept2],
|
465
|
+
mediaType: "binary",
|
466
|
+
serializer,
|
467
|
+
};
|
468
|
+
const sendToAll$textOperationSpec = {
|
469
|
+
path: "/api/hubs/{hub}/:send",
|
470
|
+
httpMethod: "POST",
|
471
|
+
responses: {
|
472
|
+
202: {},
|
473
|
+
default: {
|
474
|
+
bodyMapper: Mappers.ErrorDetail,
|
475
|
+
headersMapper: Mappers.WebPubSubSendToAllExceptionHeaders,
|
476
|
+
},
|
477
|
+
},
|
478
|
+
requestBody: Parameters.message1,
|
479
|
+
queryParameters: [
|
480
|
+
Parameters.apiVersion,
|
481
|
+
Parameters.excludedConnections,
|
482
|
+
Parameters.filter,
|
483
|
+
Parameters.messageTtlSeconds,
|
484
|
+
],
|
485
|
+
urlParameters: [Parameters.endpoint, Parameters.hub],
|
486
|
+
headerParameters: [Parameters.contentType2, Parameters.accept3],
|
487
|
+
mediaType: "text",
|
488
|
+
serializer,
|
489
|
+
};
|
490
|
+
const closeConnectionOperationSpec = {
|
491
|
+
path: "/api/hubs/{hub}/connections/{connectionId}",
|
492
|
+
httpMethod: "DELETE",
|
493
|
+
responses: {
|
494
|
+
204: {},
|
495
|
+
default: {
|
496
|
+
bodyMapper: Mappers.ErrorDetail,
|
497
|
+
headersMapper: Mappers.WebPubSubCloseConnectionExceptionHeaders,
|
498
|
+
},
|
499
|
+
},
|
500
|
+
queryParameters: [Parameters.apiVersion, Parameters.reason],
|
501
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
|
502
|
+
headerParameters: [Parameters.accept],
|
503
|
+
serializer,
|
504
|
+
};
|
505
|
+
const connectionExistsOperationSpec = {
|
506
|
+
path: "/api/hubs/{hub}/connections/{connectionId}",
|
507
|
+
httpMethod: "HEAD",
|
508
|
+
responses: {
|
509
|
+
200: {},
|
510
|
+
404: {},
|
511
|
+
default: {
|
512
|
+
headersMapper: Mappers.WebPubSubConnectionExistsExceptionHeaders,
|
513
|
+
},
|
514
|
+
},
|
515
|
+
queryParameters: [Parameters.apiVersion],
|
516
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
|
517
|
+
serializer,
|
518
|
+
};
|
519
|
+
const sendToConnection$binaryOperationSpec = {
|
520
|
+
path: "/api/hubs/{hub}/connections/{connectionId}/:send",
|
521
|
+
httpMethod: "POST",
|
522
|
+
responses: {
|
523
|
+
202: {},
|
524
|
+
default: {
|
525
|
+
bodyMapper: Mappers.ErrorDetail,
|
526
|
+
headersMapper: Mappers.WebPubSubSendToConnectionExceptionHeaders,
|
527
|
+
},
|
528
|
+
},
|
529
|
+
requestBody: Parameters.message,
|
530
|
+
queryParameters: [Parameters.apiVersion, Parameters.messageTtlSeconds],
|
531
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
|
532
|
+
headerParameters: [Parameters.contentType1, Parameters.accept2],
|
533
|
+
mediaType: "binary",
|
534
|
+
serializer,
|
535
|
+
};
|
536
|
+
const sendToConnection$textOperationSpec = {
|
537
|
+
path: "/api/hubs/{hub}/connections/{connectionId}/:send",
|
538
|
+
httpMethod: "POST",
|
539
|
+
responses: {
|
540
|
+
202: {},
|
541
|
+
default: {
|
542
|
+
bodyMapper: Mappers.ErrorDetail,
|
543
|
+
headersMapper: Mappers.WebPubSubSendToConnectionExceptionHeaders,
|
544
|
+
},
|
545
|
+
},
|
546
|
+
requestBody: Parameters.message1,
|
547
|
+
queryParameters: [Parameters.apiVersion, Parameters.messageTtlSeconds],
|
548
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
|
549
|
+
headerParameters: [Parameters.contentType2, Parameters.accept3],
|
550
|
+
mediaType: "text",
|
551
|
+
serializer,
|
552
|
+
};
|
553
|
+
const removeConnectionFromAllGroupsOperationSpec = {
|
554
|
+
path: "/api/hubs/{hub}/connections/{connectionId}/groups",
|
555
|
+
httpMethod: "DELETE",
|
556
|
+
responses: {
|
557
|
+
204: {},
|
558
|
+
default: {
|
559
|
+
bodyMapper: Mappers.ErrorDetail,
|
560
|
+
headersMapper: Mappers.WebPubSubRemoveConnectionFromAllGroupsExceptionHeaders,
|
561
|
+
},
|
562
|
+
},
|
563
|
+
queryParameters: [Parameters.apiVersion],
|
564
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.connectionId],
|
565
|
+
headerParameters: [Parameters.accept],
|
566
|
+
serializer,
|
567
|
+
};
|
568
|
+
const groupExistsOperationSpec = {
|
569
|
+
path: "/api/hubs/{hub}/groups/{group}",
|
570
|
+
httpMethod: "HEAD",
|
571
|
+
responses: {
|
572
|
+
200: {},
|
573
|
+
404: {},
|
574
|
+
default: {
|
575
|
+
headersMapper: Mappers.WebPubSubGroupExistsExceptionHeaders,
|
576
|
+
},
|
577
|
+
},
|
578
|
+
queryParameters: [Parameters.apiVersion],
|
579
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
|
580
|
+
serializer,
|
581
|
+
};
|
582
|
+
const closeGroupConnectionsOperationSpec = {
|
583
|
+
path: "/api/hubs/{hub}/groups/{group}/:closeConnections",
|
584
|
+
httpMethod: "POST",
|
585
|
+
responses: {
|
586
|
+
204: {},
|
587
|
+
default: {
|
588
|
+
bodyMapper: Mappers.ErrorDetail,
|
589
|
+
headersMapper: Mappers.WebPubSubCloseGroupConnectionsExceptionHeaders,
|
590
|
+
},
|
591
|
+
},
|
592
|
+
queryParameters: [
|
593
|
+
Parameters.apiVersion,
|
594
|
+
Parameters.excluded,
|
595
|
+
Parameters.reason,
|
596
|
+
],
|
597
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
|
598
|
+
headerParameters: [Parameters.accept],
|
599
|
+
serializer,
|
600
|
+
};
|
601
|
+
const sendToGroup$binaryOperationSpec = {
|
602
|
+
path: "/api/hubs/{hub}/groups/{group}/:send",
|
603
|
+
httpMethod: "POST",
|
604
|
+
responses: {
|
605
|
+
202: {},
|
606
|
+
default: {
|
607
|
+
bodyMapper: Mappers.ErrorDetail,
|
608
|
+
headersMapper: Mappers.WebPubSubSendToGroupExceptionHeaders,
|
609
|
+
},
|
610
|
+
},
|
611
|
+
requestBody: Parameters.message,
|
612
|
+
queryParameters: [
|
613
|
+
Parameters.apiVersion,
|
614
|
+
Parameters.excludedConnections,
|
615
|
+
Parameters.filter,
|
616
|
+
Parameters.messageTtlSeconds,
|
617
|
+
],
|
618
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
|
619
|
+
headerParameters: [Parameters.contentType1, Parameters.accept2],
|
620
|
+
mediaType: "binary",
|
621
|
+
serializer,
|
622
|
+
};
|
623
|
+
const sendToGroup$textOperationSpec = {
|
624
|
+
path: "/api/hubs/{hub}/groups/{group}/:send",
|
625
|
+
httpMethod: "POST",
|
626
|
+
responses: {
|
627
|
+
202: {},
|
628
|
+
default: {
|
629
|
+
bodyMapper: Mappers.ErrorDetail,
|
630
|
+
headersMapper: Mappers.WebPubSubSendToGroupExceptionHeaders,
|
631
|
+
},
|
632
|
+
},
|
633
|
+
requestBody: Parameters.message1,
|
634
|
+
queryParameters: [
|
635
|
+
Parameters.apiVersion,
|
636
|
+
Parameters.excludedConnections,
|
637
|
+
Parameters.filter,
|
638
|
+
Parameters.messageTtlSeconds,
|
639
|
+
],
|
640
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.group],
|
641
|
+
headerParameters: [Parameters.contentType2, Parameters.accept3],
|
642
|
+
mediaType: "text",
|
643
|
+
serializer,
|
644
|
+
};
|
645
|
+
const removeConnectionFromGroupOperationSpec = {
|
646
|
+
path: "/api/hubs/{hub}/groups/{group}/connections/{connectionId}",
|
647
|
+
httpMethod: "DELETE",
|
648
|
+
responses: {
|
649
|
+
204: {},
|
650
|
+
default: {
|
651
|
+
bodyMapper: Mappers.ErrorDetail,
|
652
|
+
headersMapper: Mappers.WebPubSubRemoveConnectionFromGroupExceptionHeaders,
|
653
|
+
},
|
654
|
+
},
|
655
|
+
queryParameters: [Parameters.apiVersion],
|
656
|
+
urlParameters: [
|
657
|
+
Parameters.endpoint,
|
658
|
+
Parameters.hub,
|
659
|
+
Parameters.connectionId,
|
660
|
+
Parameters.group,
|
661
|
+
],
|
662
|
+
headerParameters: [Parameters.accept],
|
663
|
+
serializer,
|
664
|
+
};
|
665
|
+
const addConnectionToGroupOperationSpec = {
|
666
|
+
path: "/api/hubs/{hub}/groups/{group}/connections/{connectionId}",
|
667
|
+
httpMethod: "PUT",
|
668
|
+
responses: {
|
669
|
+
200: {},
|
670
|
+
default: {
|
671
|
+
bodyMapper: Mappers.ErrorDetail,
|
672
|
+
headersMapper: Mappers.WebPubSubAddConnectionToGroupExceptionHeaders,
|
673
|
+
},
|
674
|
+
},
|
675
|
+
queryParameters: [Parameters.apiVersion],
|
676
|
+
urlParameters: [
|
677
|
+
Parameters.endpoint,
|
678
|
+
Parameters.hub,
|
679
|
+
Parameters.connectionId,
|
680
|
+
Parameters.group,
|
681
|
+
],
|
682
|
+
headerParameters: [Parameters.accept],
|
683
|
+
serializer,
|
684
|
+
};
|
685
|
+
const revokePermissionOperationSpec = {
|
686
|
+
path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
|
687
|
+
httpMethod: "DELETE",
|
688
|
+
responses: {
|
689
|
+
204: {},
|
690
|
+
default: {
|
691
|
+
bodyMapper: Mappers.ErrorDetail,
|
692
|
+
headersMapper: Mappers.WebPubSubRevokePermissionExceptionHeaders,
|
693
|
+
},
|
694
|
+
},
|
695
|
+
queryParameters: [Parameters.apiVersion, Parameters.targetName],
|
696
|
+
urlParameters: [
|
697
|
+
Parameters.endpoint,
|
698
|
+
Parameters.hub,
|
699
|
+
Parameters.connectionId,
|
700
|
+
Parameters.permission,
|
701
|
+
],
|
702
|
+
headerParameters: [Parameters.accept],
|
703
|
+
serializer,
|
704
|
+
};
|
705
|
+
const checkPermissionOperationSpec = {
|
706
|
+
path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
|
707
|
+
httpMethod: "HEAD",
|
708
|
+
responses: {
|
709
|
+
200: {},
|
710
|
+
404: {},
|
711
|
+
default: {
|
712
|
+
headersMapper: Mappers.WebPubSubCheckPermissionExceptionHeaders,
|
713
|
+
},
|
714
|
+
},
|
715
|
+
queryParameters: [Parameters.apiVersion, Parameters.targetName],
|
716
|
+
urlParameters: [
|
717
|
+
Parameters.endpoint,
|
718
|
+
Parameters.hub,
|
719
|
+
Parameters.connectionId,
|
720
|
+
Parameters.permission,
|
721
|
+
],
|
722
|
+
serializer,
|
723
|
+
};
|
724
|
+
const grantPermissionOperationSpec = {
|
725
|
+
path: "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}",
|
726
|
+
httpMethod: "PUT",
|
727
|
+
responses: {
|
728
|
+
200: {},
|
729
|
+
default: {
|
730
|
+
bodyMapper: Mappers.ErrorDetail,
|
731
|
+
headersMapper: Mappers.WebPubSubGrantPermissionExceptionHeaders,
|
732
|
+
},
|
733
|
+
},
|
734
|
+
queryParameters: [Parameters.apiVersion, Parameters.targetName],
|
735
|
+
urlParameters: [
|
736
|
+
Parameters.endpoint,
|
737
|
+
Parameters.hub,
|
738
|
+
Parameters.connectionId,
|
739
|
+
Parameters.permission,
|
740
|
+
],
|
741
|
+
headerParameters: [Parameters.accept],
|
742
|
+
serializer,
|
743
|
+
};
|
744
|
+
const userExistsOperationSpec = {
|
745
|
+
path: "/api/hubs/{hub}/users/{userId}",
|
746
|
+
httpMethod: "HEAD",
|
747
|
+
responses: {
|
748
|
+
200: {},
|
749
|
+
404: {},
|
750
|
+
default: {
|
751
|
+
headersMapper: Mappers.WebPubSubUserExistsExceptionHeaders,
|
752
|
+
},
|
753
|
+
},
|
754
|
+
queryParameters: [Parameters.apiVersion],
|
755
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
|
756
|
+
serializer,
|
757
|
+
};
|
758
|
+
const closeUserConnectionsOperationSpec = {
|
759
|
+
path: "/api/hubs/{hub}/users/{userId}/:closeConnections",
|
760
|
+
httpMethod: "POST",
|
761
|
+
responses: {
|
762
|
+
204: {},
|
763
|
+
default: {
|
764
|
+
bodyMapper: Mappers.ErrorDetail,
|
765
|
+
headersMapper: Mappers.WebPubSubCloseUserConnectionsExceptionHeaders,
|
766
|
+
},
|
767
|
+
},
|
768
|
+
queryParameters: [
|
769
|
+
Parameters.apiVersion,
|
770
|
+
Parameters.excluded,
|
771
|
+
Parameters.reason,
|
772
|
+
],
|
773
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
|
774
|
+
headerParameters: [Parameters.accept],
|
775
|
+
serializer,
|
776
|
+
};
|
777
|
+
const sendToUser$binaryOperationSpec = {
|
778
|
+
path: "/api/hubs/{hub}/users/{userId}/:send",
|
779
|
+
httpMethod: "POST",
|
780
|
+
responses: {
|
781
|
+
202: {},
|
782
|
+
default: {
|
783
|
+
bodyMapper: Mappers.ErrorDetail,
|
784
|
+
headersMapper: Mappers.WebPubSubSendToUserExceptionHeaders,
|
785
|
+
},
|
786
|
+
},
|
787
|
+
requestBody: Parameters.message,
|
788
|
+
queryParameters: [
|
789
|
+
Parameters.apiVersion,
|
790
|
+
Parameters.filter,
|
791
|
+
Parameters.messageTtlSeconds,
|
792
|
+
],
|
793
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
|
794
|
+
headerParameters: [Parameters.contentType1, Parameters.accept2],
|
795
|
+
mediaType: "binary",
|
796
|
+
serializer,
|
797
|
+
};
|
798
|
+
const sendToUser$textOperationSpec = {
|
799
|
+
path: "/api/hubs/{hub}/users/{userId}/:send",
|
800
|
+
httpMethod: "POST",
|
801
|
+
responses: {
|
802
|
+
202: {},
|
803
|
+
default: {
|
804
|
+
bodyMapper: Mappers.ErrorDetail,
|
805
|
+
headersMapper: Mappers.WebPubSubSendToUserExceptionHeaders,
|
806
|
+
},
|
807
|
+
},
|
808
|
+
requestBody: Parameters.message1,
|
809
|
+
queryParameters: [
|
810
|
+
Parameters.apiVersion,
|
811
|
+
Parameters.filter,
|
812
|
+
Parameters.messageTtlSeconds,
|
813
|
+
],
|
814
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
|
815
|
+
headerParameters: [Parameters.contentType2, Parameters.accept3],
|
816
|
+
mediaType: "text",
|
817
|
+
serializer,
|
818
|
+
};
|
819
|
+
const removeUserFromAllGroupsOperationSpec = {
|
820
|
+
path: "/api/hubs/{hub}/users/{userId}/groups",
|
821
|
+
httpMethod: "DELETE",
|
822
|
+
responses: {
|
823
|
+
204: {},
|
824
|
+
default: {
|
825
|
+
bodyMapper: Mappers.ErrorDetail,
|
826
|
+
headersMapper: Mappers.WebPubSubRemoveUserFromAllGroupsExceptionHeaders,
|
827
|
+
},
|
828
|
+
},
|
829
|
+
queryParameters: [Parameters.apiVersion],
|
830
|
+
urlParameters: [Parameters.endpoint, Parameters.hub, Parameters.userId1],
|
831
|
+
headerParameters: [Parameters.accept],
|
832
|
+
serializer,
|
833
|
+
};
|
834
|
+
const removeUserFromGroupOperationSpec = {
|
835
|
+
path: "/api/hubs/{hub}/users/{userId}/groups/{group}",
|
836
|
+
httpMethod: "DELETE",
|
837
|
+
responses: {
|
838
|
+
204: {},
|
839
|
+
default: {
|
840
|
+
bodyMapper: Mappers.ErrorDetail,
|
841
|
+
headersMapper: Mappers.WebPubSubRemoveUserFromGroupExceptionHeaders,
|
842
|
+
},
|
843
|
+
},
|
844
|
+
queryParameters: [Parameters.apiVersion],
|
845
|
+
urlParameters: [
|
846
|
+
Parameters.endpoint,
|
847
|
+
Parameters.hub,
|
848
|
+
Parameters.group,
|
849
|
+
Parameters.userId1,
|
850
|
+
],
|
851
|
+
headerParameters: [Parameters.accept],
|
852
|
+
serializer,
|
853
|
+
};
|
854
|
+
const addUserToGroupOperationSpec = {
|
855
|
+
path: "/api/hubs/{hub}/users/{userId}/groups/{group}",
|
856
|
+
httpMethod: "PUT",
|
857
|
+
responses: {
|
858
|
+
200: {},
|
859
|
+
default: {
|
860
|
+
bodyMapper: Mappers.ErrorDetail,
|
861
|
+
headersMapper: Mappers.WebPubSubAddUserToGroupExceptionHeaders,
|
862
|
+
},
|
863
|
+
},
|
864
|
+
queryParameters: [Parameters.apiVersion],
|
865
|
+
urlParameters: [
|
866
|
+
Parameters.endpoint,
|
867
|
+
Parameters.hub,
|
868
|
+
Parameters.group,
|
869
|
+
Parameters.userId1,
|
870
|
+
],
|
871
|
+
headerParameters: [Parameters.accept],
|
872
|
+
serializer,
|
873
|
+
};
|
874
|
+
//# sourceMappingURL=webPubSub.js.map
|