gs2 1.4.110 → 1.4.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/account/rest.js +130 -564
- package/account/rest.js.map +1 -1
- package/adReward/rest.js +44 -203
- package/adReward/rest.js.map +1 -1
- package/auth/rest.js +10 -52
- package/auth/rest.js.map +1 -1
- package/buff/rest.js +56 -249
- package/buff/rest.js.map +1 -1
- package/chat/rest.js +108 -463
- package/chat/rest.js.map +1 -1
- package/core/AbstractGs2RestClient.d.ts +9 -0
- package/core/AbstractGs2RestClient.js +48 -0
- package/core/AbstractGs2RestClient.js.map +1 -1
- package/core/model.d.ts +9 -1
- package/core/model.js +4 -1
- package/core/model.js.map +1 -1
- package/datastore/rest.js +78 -370
- package/datastore/rest.js.map +1 -1
- package/deploy/rest.js +48 -209
- package/deploy/rest.js.map +1 -1
- package/dictionary/rest.js +102 -450
- package/dictionary/rest.js.map +1 -1
- package/distributor/rest.js +96 -465
- package/distributor/rest.js.map +1 -1
- package/enchant/rest.js +112 -497
- package/enchant/rest.js.map +1 -1
- package/enhance/rest.js +100 -455
- package/enhance/rest.js.map +1 -1
- package/exchange/rest.js +108 -491
- package/exchange/rest.js.map +1 -1
- package/experience/rest.js +120 -561
- package/experience/rest.js.map +1 -1
- package/formation/rest.js +158 -686
- package/formation/rest.js.map +1 -1
- package/freeze/rest.js +12 -51
- package/freeze/rest.js.map +1 -1
- package/friend/rest.js +118 -490
- package/friend/rest.js.map +1 -1
- package/gateway/rest.js +56 -245
- package/gateway/rest.js.map +1 -1
- package/grade/rest.js +96 -449
- package/grade/rest.js.map +1 -1
- package/guard/rest.js +14 -58
- package/guard/rest.js.map +1 -1
- package/guild/rest.js +186 -840
- package/guild/rest.js.map +1 -1
- package/identifier/rest.js +60 -259
- package/identifier/rest.js.map +1 -1
- package/idle/rest.js +84 -387
- package/idle/rest.js.map +1 -1
- package/inbox/rest.js +96 -437
- package/inbox/rest.js.map +1 -1
- package/inventory/rest.js +270 -1206
- package/inventory/rest.js.map +1 -1
- package/jobQueue/rest.js +50 -220
- package/jobQueue/rest.js.map +1 -1
- package/key/rest.js +38 -166
- package/key/rest.js.map +1 -1
- package/limit/rest.js +80 -361
- package/limit/rest.js.map +1 -1
- package/lock/rest.js +28 -123
- package/lock/rest.js.map +1 -1
- package/log/rest.js +46 -186
- package/log/rest.js.map +1 -1
- package/loginReward/rest.js +82 -376
- package/loginReward/rest.js.map +1 -1
- package/lottery/rest.js +100 -427
- package/lottery/rest.js.map +1 -1
- package/matchmaking/rest.js +146 -644
- package/matchmaking/rest.js.map +1 -1
- package/megaField/rest.js +68 -307
- package/megaField/rest.js.map +1 -1
- package/mission/rest.js +158 -726
- package/mission/rest.js.map +1 -1
- package/money/rest.js +58 -264
- package/money/rest.js.map +1 -1
- package/money2/rest.js +126 -542
- package/money2/rest.js.map +1 -1
- package/news/rest.js +36 -147
- package/news/rest.js.map +1 -1
- package/package.json +5 -5
- package/project/request/WaitCleanUserDataRequest.d.ts +0 -4
- package/project/request/WaitCleanUserDataRequest.js +0 -14
- package/project/request/WaitCleanUserDataRequest.js.map +1 -1
- package/project/request/WaitDumpUserDataRequest.d.ts +0 -4
- package/project/request/WaitDumpUserDataRequest.js +0 -14
- package/project/request/WaitDumpUserDataRequest.js.map +1 -1
- package/project/request/WaitImportUserDataRequest.d.ts +0 -4
- package/project/request/WaitImportUserDataRequest.js +0 -14
- package/project/request/WaitImportUserDataRequest.js.map +1 -1
- package/project/rest.js +91 -411
- package/project/rest.js.map +1 -1
- package/quest/rest.js +100 -431
- package/quest/rest.js.map +1 -1
- package/ranking/rest.js +92 -387
- package/ranking/rest.js.map +1 -1
- package/ranking2/rest.js +220 -939
- package/ranking2/rest.js.map +1 -1
- package/realtime/rest.js +24 -97
- package/realtime/rest.js.map +1 -1
- package/schedule/rest.js +94 -418
- package/schedule/rest.js.map +1 -1
- package/script/rest.js +34 -156
- package/script/rest.js.map +1 -1
- package/seasonRating/rest.js +70 -314
- package/seasonRating/rest.js.map +1 -1
- package/serialKey/rest.js +84 -383
- package/serialKey/rest.js.map +1 -1
- package/showcase/rest.js +116 -515
- package/showcase/rest.js.map +1 -1
- package/skillTree/rest.js +82 -372
- package/skillTree/rest.js.map +1 -1
- package/stamina/rest.js +166 -798
- package/stamina/rest.js.map +1 -1
- package/stateMachine/rest.js +62 -270
- package/stateMachine/rest.js.map +1 -1
- package/version/rest.js +78 -346
- package/version/rest.js.map +1 -1
- package/watch/rest.js +156 -563
- package/watch/rest.js.map +1 -1
package/chat/rest.js
CHANGED
|
@@ -19,7 +19,6 @@ var tslib_1 = require("tslib");
|
|
|
19
19
|
var AbstractGs2RestClient_1 = tslib_1.__importDefault(require("../core/AbstractGs2RestClient"));
|
|
20
20
|
var model_1 = require("../core/model");
|
|
21
21
|
var Result = tslib_1.__importStar(require("./result"));
|
|
22
|
-
var axios_1 = tslib_1.__importDefault(require("axios"));
|
|
23
22
|
var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
24
23
|
tslib_1.__extends(Gs2ChatRestClient, _super);
|
|
25
24
|
function Gs2ChatRestClient(session) {
|
|
@@ -40,13 +39,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
40
39
|
'pageToken': String((_d = request.getPageToken()) !== null && _d !== void 0 ? _d : null),
|
|
41
40
|
'limit': String((_e = request.getLimit()) !== null && _e !== void 0 ? _e : null),
|
|
42
41
|
};
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
headers: headers,
|
|
46
|
-
}).then(function (response) {
|
|
47
|
-
return Result.DescribeNamespacesResult.fromDict(response.data);
|
|
48
|
-
}).catch(function (error) {
|
|
49
|
-
throw JSON.parse(error.response.data.message);
|
|
42
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
43
|
+
return Result.DescribeNamespacesResult.fromDict(data);
|
|
50
44
|
});
|
|
51
45
|
};
|
|
52
46
|
Gs2ChatRestClient.prototype.createNamespace = function (request) {
|
|
@@ -73,17 +67,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
73
67
|
'postNotification': (_v = (_u = request.getPostNotification()) === null || _u === void 0 ? void 0 : _u.toDict()) !== null && _v !== void 0 ? _v : null,
|
|
74
68
|
'logSetting': (_x = (_w = request.getLogSetting()) === null || _w === void 0 ? void 0 : _w.toDict()) !== null && _x !== void 0 ? _x : null,
|
|
75
69
|
};
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
}).then(function (response) {
|
|
79
|
-
return Result.CreateNamespaceResult.fromDict(response.data);
|
|
80
|
-
}).catch(function (error) {
|
|
81
|
-
if (error.response) {
|
|
82
|
-
throw JSON.parse(error.response.data.message);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
throw [];
|
|
86
|
-
}
|
|
70
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
71
|
+
return Result.CreateNamespaceResult.fromDict(data);
|
|
87
72
|
});
|
|
88
73
|
};
|
|
89
74
|
Gs2ChatRestClient.prototype.getNamespaceStatus = function (request) {
|
|
@@ -99,13 +84,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
99
84
|
var params = {
|
|
100
85
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
101
86
|
};
|
|
102
|
-
return
|
|
103
|
-
|
|
104
|
-
headers: headers,
|
|
105
|
-
}).then(function (response) {
|
|
106
|
-
return Result.GetNamespaceStatusResult.fromDict(response.data);
|
|
107
|
-
}).catch(function (error) {
|
|
108
|
-
throw JSON.parse(error.response.data.message);
|
|
87
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
88
|
+
return Result.GetNamespaceStatusResult.fromDict(data);
|
|
109
89
|
});
|
|
110
90
|
};
|
|
111
91
|
Gs2ChatRestClient.prototype.getNamespace = function (request) {
|
|
@@ -121,13 +101,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
121
101
|
var params = {
|
|
122
102
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
123
103
|
};
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
headers: headers,
|
|
127
|
-
}).then(function (response) {
|
|
128
|
-
return Result.GetNamespaceResult.fromDict(response.data);
|
|
129
|
-
}).catch(function (error) {
|
|
130
|
-
throw JSON.parse(error.response.data.message);
|
|
104
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
105
|
+
return Result.GetNamespaceResult.fromDict(data);
|
|
131
106
|
});
|
|
132
107
|
};
|
|
133
108
|
Gs2ChatRestClient.prototype.updateNamespace = function (request) {
|
|
@@ -154,17 +129,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
154
129
|
'postNotification': (_w = (_v = request.getPostNotification()) === null || _v === void 0 ? void 0 : _v.toDict()) !== null && _w !== void 0 ? _w : null,
|
|
155
130
|
'logSetting': (_y = (_x = request.getLogSetting()) === null || _x === void 0 ? void 0 : _x.toDict()) !== null && _y !== void 0 ? _y : null,
|
|
156
131
|
};
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
}).then(function (response) {
|
|
160
|
-
return Result.UpdateNamespaceResult.fromDict(response.data);
|
|
161
|
-
}).catch(function (error) {
|
|
162
|
-
if (error.response) {
|
|
163
|
-
throw JSON.parse(error.response.data.message);
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
throw [];
|
|
167
|
-
}
|
|
132
|
+
return this.request('PUT', url, headers, undefined, body).then(function (data) {
|
|
133
|
+
return Result.UpdateNamespaceResult.fromDict(data);
|
|
168
134
|
});
|
|
169
135
|
};
|
|
170
136
|
Gs2ChatRestClient.prototype.deleteNamespace = function (request) {
|
|
@@ -180,13 +146,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
180
146
|
var params = {
|
|
181
147
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
182
148
|
};
|
|
183
|
-
return
|
|
184
|
-
|
|
185
|
-
headers: headers,
|
|
186
|
-
}).then(function (response) {
|
|
187
|
-
return Result.DeleteNamespaceResult.fromDict(response.data);
|
|
188
|
-
}).catch(function (error) {
|
|
189
|
-
throw JSON.parse(error.response.data.message);
|
|
149
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
150
|
+
return Result.DeleteNamespaceResult.fromDict(data);
|
|
190
151
|
});
|
|
191
152
|
};
|
|
192
153
|
Gs2ChatRestClient.prototype.getServiceVersion = function (request) {
|
|
@@ -201,13 +162,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
201
162
|
var params = {
|
|
202
163
|
'contextStack': (_b = request.getContextStack()) !== null && _b !== void 0 ? _b : null,
|
|
203
164
|
};
|
|
204
|
-
return
|
|
205
|
-
|
|
206
|
-
headers: headers,
|
|
207
|
-
}).then(function (response) {
|
|
208
|
-
return Result.GetServiceVersionResult.fromDict(response.data);
|
|
209
|
-
}).catch(function (error) {
|
|
210
|
-
throw JSON.parse(error.response.data.message);
|
|
165
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
166
|
+
return Result.GetServiceVersionResult.fromDict(data);
|
|
211
167
|
});
|
|
212
168
|
};
|
|
213
169
|
Gs2ChatRestClient.prototype.dumpUserDataByUserId = function (request) {
|
|
@@ -226,17 +182,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
226
182
|
var body = {
|
|
227
183
|
'contextStack': (_e = request.getContextStack()) !== null && _e !== void 0 ? _e : null,
|
|
228
184
|
};
|
|
229
|
-
return
|
|
230
|
-
|
|
231
|
-
}).then(function (response) {
|
|
232
|
-
return Result.DumpUserDataByUserIdResult.fromDict(response.data);
|
|
233
|
-
}).catch(function (error) {
|
|
234
|
-
if (error.response) {
|
|
235
|
-
throw JSON.parse(error.response.data.message);
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
throw [];
|
|
239
|
-
}
|
|
185
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
186
|
+
return Result.DumpUserDataByUserIdResult.fromDict(data);
|
|
240
187
|
});
|
|
241
188
|
};
|
|
242
189
|
Gs2ChatRestClient.prototype.checkDumpUserDataByUserId = function (request) {
|
|
@@ -255,13 +202,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
255
202
|
var params = {
|
|
256
203
|
'contextStack': (_e = request.getContextStack()) !== null && _e !== void 0 ? _e : null,
|
|
257
204
|
};
|
|
258
|
-
return
|
|
259
|
-
|
|
260
|
-
headers: headers,
|
|
261
|
-
}).then(function (response) {
|
|
262
|
-
return Result.CheckDumpUserDataByUserIdResult.fromDict(response.data);
|
|
263
|
-
}).catch(function (error) {
|
|
264
|
-
throw JSON.parse(error.response.data.message);
|
|
205
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
206
|
+
return Result.CheckDumpUserDataByUserIdResult.fromDict(data);
|
|
265
207
|
});
|
|
266
208
|
};
|
|
267
209
|
Gs2ChatRestClient.prototype.cleanUserDataByUserId = function (request) {
|
|
@@ -280,17 +222,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
280
222
|
var body = {
|
|
281
223
|
'contextStack': (_e = request.getContextStack()) !== null && _e !== void 0 ? _e : null,
|
|
282
224
|
};
|
|
283
|
-
return
|
|
284
|
-
|
|
285
|
-
}).then(function (response) {
|
|
286
|
-
return Result.CleanUserDataByUserIdResult.fromDict(response.data);
|
|
287
|
-
}).catch(function (error) {
|
|
288
|
-
if (error.response) {
|
|
289
|
-
throw JSON.parse(error.response.data.message);
|
|
290
|
-
}
|
|
291
|
-
else {
|
|
292
|
-
throw [];
|
|
293
|
-
}
|
|
225
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
226
|
+
return Result.CleanUserDataByUserIdResult.fromDict(data);
|
|
294
227
|
});
|
|
295
228
|
};
|
|
296
229
|
Gs2ChatRestClient.prototype.checkCleanUserDataByUserId = function (request) {
|
|
@@ -309,13 +242,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
309
242
|
var params = {
|
|
310
243
|
'contextStack': (_e = request.getContextStack()) !== null && _e !== void 0 ? _e : null,
|
|
311
244
|
};
|
|
312
|
-
return
|
|
313
|
-
|
|
314
|
-
headers: headers,
|
|
315
|
-
}).then(function (response) {
|
|
316
|
-
return Result.CheckCleanUserDataByUserIdResult.fromDict(response.data);
|
|
317
|
-
}).catch(function (error) {
|
|
318
|
-
throw JSON.parse(error.response.data.message);
|
|
245
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
246
|
+
return Result.CheckCleanUserDataByUserIdResult.fromDict(data);
|
|
319
247
|
});
|
|
320
248
|
};
|
|
321
249
|
Gs2ChatRestClient.prototype.prepareImportUserDataByUserId = function (request) {
|
|
@@ -334,17 +262,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
334
262
|
var body = {
|
|
335
263
|
'contextStack': (_e = request.getContextStack()) !== null && _e !== void 0 ? _e : null,
|
|
336
264
|
};
|
|
337
|
-
return
|
|
338
|
-
|
|
339
|
-
}).then(function (response) {
|
|
340
|
-
return Result.PrepareImportUserDataByUserIdResult.fromDict(response.data);
|
|
341
|
-
}).catch(function (error) {
|
|
342
|
-
if (error.response) {
|
|
343
|
-
throw JSON.parse(error.response.data.message);
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
throw [];
|
|
347
|
-
}
|
|
265
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
266
|
+
return Result.PrepareImportUserDataByUserIdResult.fromDict(data);
|
|
348
267
|
});
|
|
349
268
|
};
|
|
350
269
|
Gs2ChatRestClient.prototype.importUserDataByUserId = function (request) {
|
|
@@ -364,17 +283,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
364
283
|
'contextStack': (_e = request.getContextStack()) !== null && _e !== void 0 ? _e : null,
|
|
365
284
|
'uploadToken': (_f = request.getUploadToken()) !== null && _f !== void 0 ? _f : null,
|
|
366
285
|
};
|
|
367
|
-
return
|
|
368
|
-
|
|
369
|
-
}).then(function (response) {
|
|
370
|
-
return Result.ImportUserDataByUserIdResult.fromDict(response.data);
|
|
371
|
-
}).catch(function (error) {
|
|
372
|
-
if (error.response) {
|
|
373
|
-
throw JSON.parse(error.response.data.message);
|
|
374
|
-
}
|
|
375
|
-
else {
|
|
376
|
-
throw [];
|
|
377
|
-
}
|
|
286
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
287
|
+
return Result.ImportUserDataByUserIdResult.fromDict(data);
|
|
378
288
|
});
|
|
379
289
|
};
|
|
380
290
|
Gs2ChatRestClient.prototype.checkImportUserDataByUserId = function (request) {
|
|
@@ -394,13 +304,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
394
304
|
var params = {
|
|
395
305
|
'contextStack': (_g = request.getContextStack()) !== null && _g !== void 0 ? _g : null,
|
|
396
306
|
};
|
|
397
|
-
return
|
|
398
|
-
|
|
399
|
-
headers: headers,
|
|
400
|
-
}).then(function (response) {
|
|
401
|
-
return Result.CheckImportUserDataByUserIdResult.fromDict(response.data);
|
|
402
|
-
}).catch(function (error) {
|
|
403
|
-
throw JSON.parse(error.response.data.message);
|
|
307
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
308
|
+
return Result.CheckImportUserDataByUserIdResult.fromDict(data);
|
|
404
309
|
});
|
|
405
310
|
};
|
|
406
311
|
Gs2ChatRestClient.prototype.describeRooms = function (request) {
|
|
@@ -419,13 +324,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
419
324
|
'pageToken': String((_f = request.getPageToken()) !== null && _f !== void 0 ? _f : null),
|
|
420
325
|
'limit': String((_g = request.getLimit()) !== null && _g !== void 0 ? _g : null),
|
|
421
326
|
};
|
|
422
|
-
return
|
|
423
|
-
|
|
424
|
-
headers: headers,
|
|
425
|
-
}).then(function (response) {
|
|
426
|
-
return Result.DescribeRoomsResult.fromDict(response.data);
|
|
427
|
-
}).catch(function (error) {
|
|
428
|
-
throw JSON.parse(error.response.data.message);
|
|
327
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
328
|
+
return Result.DescribeRoomsResult.fromDict(data);
|
|
429
329
|
});
|
|
430
330
|
};
|
|
431
331
|
Gs2ChatRestClient.prototype.createRoom = function (request) {
|
|
@@ -451,17 +351,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
451
351
|
'password': (_j = request.getPassword()) !== null && _j !== void 0 ? _j : null,
|
|
452
352
|
'whiteListUserIds': (_k = request.getWhiteListUserIds()) !== null && _k !== void 0 ? _k : null,
|
|
453
353
|
};
|
|
454
|
-
return
|
|
455
|
-
|
|
456
|
-
}).then(function (response) {
|
|
457
|
-
return Result.CreateRoomResult.fromDict(response.data);
|
|
458
|
-
}).catch(function (error) {
|
|
459
|
-
if (error.response) {
|
|
460
|
-
throw JSON.parse(error.response.data.message);
|
|
461
|
-
}
|
|
462
|
-
else {
|
|
463
|
-
throw [];
|
|
464
|
-
}
|
|
354
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
355
|
+
return Result.CreateRoomResult.fromDict(data);
|
|
465
356
|
});
|
|
466
357
|
};
|
|
467
358
|
Gs2ChatRestClient.prototype.createRoomFromBackend = function (request) {
|
|
@@ -488,17 +379,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
488
379
|
'password': (_k = request.getPassword()) !== null && _k !== void 0 ? _k : null,
|
|
489
380
|
'whiteListUserIds': (_l = request.getWhiteListUserIds()) !== null && _l !== void 0 ? _l : null,
|
|
490
381
|
};
|
|
491
|
-
return
|
|
492
|
-
|
|
493
|
-
}).then(function (response) {
|
|
494
|
-
return Result.CreateRoomFromBackendResult.fromDict(response.data);
|
|
495
|
-
}).catch(function (error) {
|
|
496
|
-
if (error.response) {
|
|
497
|
-
throw JSON.parse(error.response.data.message);
|
|
498
|
-
}
|
|
499
|
-
else {
|
|
500
|
-
throw [];
|
|
501
|
-
}
|
|
382
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
383
|
+
return Result.CreateRoomFromBackendResult.fromDict(data);
|
|
502
384
|
});
|
|
503
385
|
};
|
|
504
386
|
Gs2ChatRestClient.prototype.getRoom = function (request) {
|
|
@@ -515,13 +397,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
515
397
|
var params = {
|
|
516
398
|
'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
|
|
517
399
|
};
|
|
518
|
-
return
|
|
519
|
-
|
|
520
|
-
headers: headers,
|
|
521
|
-
}).then(function (response) {
|
|
522
|
-
return Result.GetRoomResult.fromDict(response.data);
|
|
523
|
-
}).catch(function (error) {
|
|
524
|
-
throw JSON.parse(error.response.data.message);
|
|
400
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
401
|
+
return Result.GetRoomResult.fromDict(data);
|
|
525
402
|
});
|
|
526
403
|
};
|
|
527
404
|
Gs2ChatRestClient.prototype.updateRoom = function (request) {
|
|
@@ -547,17 +424,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
547
424
|
'password': (_k = request.getPassword()) !== null && _k !== void 0 ? _k : null,
|
|
548
425
|
'whiteListUserIds': (_l = request.getWhiteListUserIds()) !== null && _l !== void 0 ? _l : null,
|
|
549
426
|
};
|
|
550
|
-
return
|
|
551
|
-
|
|
552
|
-
}).then(function (response) {
|
|
553
|
-
return Result.UpdateRoomResult.fromDict(response.data);
|
|
554
|
-
}).catch(function (error) {
|
|
555
|
-
if (error.response) {
|
|
556
|
-
throw JSON.parse(error.response.data.message);
|
|
557
|
-
}
|
|
558
|
-
else {
|
|
559
|
-
throw [];
|
|
560
|
-
}
|
|
427
|
+
return this.request('PUT', url, headers, undefined, body).then(function (data) {
|
|
428
|
+
return Result.UpdateRoomResult.fromDict(data);
|
|
561
429
|
});
|
|
562
430
|
};
|
|
563
431
|
Gs2ChatRestClient.prototype.updateRoomFromBackend = function (request) {
|
|
@@ -584,17 +452,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
584
452
|
'whiteListUserIds': (_l = request.getWhiteListUserIds()) !== null && _l !== void 0 ? _l : null,
|
|
585
453
|
'userId': (_m = request.getUserId()) !== null && _m !== void 0 ? _m : null,
|
|
586
454
|
};
|
|
587
|
-
return
|
|
588
|
-
|
|
589
|
-
}).then(function (response) {
|
|
590
|
-
return Result.UpdateRoomFromBackendResult.fromDict(response.data);
|
|
591
|
-
}).catch(function (error) {
|
|
592
|
-
if (error.response) {
|
|
593
|
-
throw JSON.parse(error.response.data.message);
|
|
594
|
-
}
|
|
595
|
-
else {
|
|
596
|
-
throw [];
|
|
597
|
-
}
|
|
455
|
+
return this.request('PUT', url, headers, undefined, body).then(function (data) {
|
|
456
|
+
return Result.UpdateRoomFromBackendResult.fromDict(data);
|
|
598
457
|
});
|
|
599
458
|
};
|
|
600
459
|
Gs2ChatRestClient.prototype.deleteRoom = function (request) {
|
|
@@ -617,13 +476,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
617
476
|
var params = {
|
|
618
477
|
'contextStack': (_h = request.getContextStack()) !== null && _h !== void 0 ? _h : null,
|
|
619
478
|
};
|
|
620
|
-
return
|
|
621
|
-
|
|
622
|
-
headers: headers,
|
|
623
|
-
}).then(function (response) {
|
|
624
|
-
return Result.DeleteRoomResult.fromDict(response.data);
|
|
625
|
-
}).catch(function (error) {
|
|
626
|
-
throw JSON.parse(error.response.data.message);
|
|
479
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
480
|
+
return Result.DeleteRoomResult.fromDict(data);
|
|
627
481
|
});
|
|
628
482
|
};
|
|
629
483
|
Gs2ChatRestClient.prototype.deleteRoomFromBackend = function (request) {
|
|
@@ -647,13 +501,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
647
501
|
'contextStack': (_h = request.getContextStack()) !== null && _h !== void 0 ? _h : null,
|
|
648
502
|
'userId': String((_j = request.getUserId()) !== null && _j !== void 0 ? _j : null),
|
|
649
503
|
};
|
|
650
|
-
return
|
|
651
|
-
|
|
652
|
-
headers: headers,
|
|
653
|
-
}).then(function (response) {
|
|
654
|
-
return Result.DeleteRoomFromBackendResult.fromDict(response.data);
|
|
655
|
-
}).catch(function (error) {
|
|
656
|
-
throw JSON.parse(error.response.data.message);
|
|
504
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
505
|
+
return Result.DeleteRoomFromBackendResult.fromDict(data);
|
|
657
506
|
});
|
|
658
507
|
};
|
|
659
508
|
Gs2ChatRestClient.prototype.describeMessages = function (request) {
|
|
@@ -677,13 +526,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
677
526
|
'startAt': String((_k = request.getStartAt()) !== null && _k !== void 0 ? _k : null),
|
|
678
527
|
'limit': String((_l = request.getLimit()) !== null && _l !== void 0 ? _l : null),
|
|
679
528
|
};
|
|
680
|
-
return
|
|
681
|
-
|
|
682
|
-
headers: headers,
|
|
683
|
-
}).then(function (response) {
|
|
684
|
-
return Result.DescribeMessagesResult.fromDict(response.data);
|
|
685
|
-
}).catch(function (error) {
|
|
686
|
-
throw JSON.parse(error.response.data.message);
|
|
529
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
530
|
+
return Result.DescribeMessagesResult.fromDict(data);
|
|
687
531
|
});
|
|
688
532
|
};
|
|
689
533
|
Gs2ChatRestClient.prototype.describeMessagesByUserId = function (request) {
|
|
@@ -708,13 +552,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
708
552
|
'startAt': String((_l = request.getStartAt()) !== null && _l !== void 0 ? _l : null),
|
|
709
553
|
'limit': String((_m = request.getLimit()) !== null && _m !== void 0 ? _m : null),
|
|
710
554
|
};
|
|
711
|
-
return
|
|
712
|
-
|
|
713
|
-
headers: headers,
|
|
714
|
-
}).then(function (response) {
|
|
715
|
-
return Result.DescribeMessagesByUserIdResult.fromDict(response.data);
|
|
716
|
-
}).catch(function (error) {
|
|
717
|
-
throw JSON.parse(error.response.data.message);
|
|
555
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
556
|
+
return Result.DescribeMessagesByUserIdResult.fromDict(data);
|
|
718
557
|
});
|
|
719
558
|
};
|
|
720
559
|
Gs2ChatRestClient.prototype.describeLatestMessages = function (request) {
|
|
@@ -738,13 +577,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
738
577
|
'pageToken': String((_k = request.getPageToken()) !== null && _k !== void 0 ? _k : null),
|
|
739
578
|
'limit': String((_l = request.getLimit()) !== null && _l !== void 0 ? _l : null),
|
|
740
579
|
};
|
|
741
|
-
return
|
|
742
|
-
|
|
743
|
-
headers: headers,
|
|
744
|
-
}).then(function (response) {
|
|
745
|
-
return Result.DescribeLatestMessagesResult.fromDict(response.data);
|
|
746
|
-
}).catch(function (error) {
|
|
747
|
-
throw JSON.parse(error.response.data.message);
|
|
580
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
581
|
+
return Result.DescribeLatestMessagesResult.fromDict(data);
|
|
748
582
|
});
|
|
749
583
|
};
|
|
750
584
|
Gs2ChatRestClient.prototype.describeLatestMessagesByUserId = function (request) {
|
|
@@ -769,13 +603,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
769
603
|
'pageToken': String((_l = request.getPageToken()) !== null && _l !== void 0 ? _l : null),
|
|
770
604
|
'limit': String((_m = request.getLimit()) !== null && _m !== void 0 ? _m : null),
|
|
771
605
|
};
|
|
772
|
-
return
|
|
773
|
-
|
|
774
|
-
headers: headers,
|
|
775
|
-
}).then(function (response) {
|
|
776
|
-
return Result.DescribeLatestMessagesByUserIdResult.fromDict(response.data);
|
|
777
|
-
}).catch(function (error) {
|
|
778
|
-
throw JSON.parse(error.response.data.message);
|
|
606
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
607
|
+
return Result.DescribeLatestMessagesByUserIdResult.fromDict(data);
|
|
779
608
|
});
|
|
780
609
|
};
|
|
781
610
|
Gs2ChatRestClient.prototype.post = function (request) {
|
|
@@ -801,17 +630,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
801
630
|
'metadata': (_k = request.getMetadata()) !== null && _k !== void 0 ? _k : null,
|
|
802
631
|
'password': (_l = request.getPassword()) !== null && _l !== void 0 ? _l : null,
|
|
803
632
|
};
|
|
804
|
-
return
|
|
805
|
-
|
|
806
|
-
}).then(function (response) {
|
|
807
|
-
return Result.PostResult.fromDict(response.data);
|
|
808
|
-
}).catch(function (error) {
|
|
809
|
-
if (error.response) {
|
|
810
|
-
throw JSON.parse(error.response.data.message);
|
|
811
|
-
}
|
|
812
|
-
else {
|
|
813
|
-
throw [];
|
|
814
|
-
}
|
|
633
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
634
|
+
return Result.PostResult.fromDict(data);
|
|
815
635
|
});
|
|
816
636
|
};
|
|
817
637
|
Gs2ChatRestClient.prototype.postByUserId = function (request) {
|
|
@@ -838,17 +658,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
838
658
|
'metadata': (_m = request.getMetadata()) !== null && _m !== void 0 ? _m : null,
|
|
839
659
|
'password': (_o = request.getPassword()) !== null && _o !== void 0 ? _o : null,
|
|
840
660
|
};
|
|
841
|
-
return
|
|
842
|
-
|
|
843
|
-
}).then(function (response) {
|
|
844
|
-
return Result.PostByUserIdResult.fromDict(response.data);
|
|
845
|
-
}).catch(function (error) {
|
|
846
|
-
if (error.response) {
|
|
847
|
-
throw JSON.parse(error.response.data.message);
|
|
848
|
-
}
|
|
849
|
-
else {
|
|
850
|
-
throw [];
|
|
851
|
-
}
|
|
661
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
662
|
+
return Result.PostByUserIdResult.fromDict(data);
|
|
852
663
|
});
|
|
853
664
|
};
|
|
854
665
|
Gs2ChatRestClient.prototype.getMessage = function (request) {
|
|
@@ -870,13 +681,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
870
681
|
'contextStack': (_j = request.getContextStack()) !== null && _j !== void 0 ? _j : null,
|
|
871
682
|
'password': String((_k = request.getPassword()) !== null && _k !== void 0 ? _k : null),
|
|
872
683
|
};
|
|
873
|
-
return
|
|
874
|
-
|
|
875
|
-
headers: headers,
|
|
876
|
-
}).then(function (response) {
|
|
877
|
-
return Result.GetMessageResult.fromDict(response.data);
|
|
878
|
-
}).catch(function (error) {
|
|
879
|
-
throw JSON.parse(error.response.data.message);
|
|
684
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
685
|
+
return Result.GetMessageResult.fromDict(data);
|
|
880
686
|
});
|
|
881
687
|
};
|
|
882
688
|
Gs2ChatRestClient.prototype.getMessageByUserId = function (request) {
|
|
@@ -899,13 +705,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
899
705
|
'password': String((_k = request.getPassword()) !== null && _k !== void 0 ? _k : null),
|
|
900
706
|
'userId': String((_l = request.getUserId()) !== null && _l !== void 0 ? _l : null),
|
|
901
707
|
};
|
|
902
|
-
return
|
|
903
|
-
|
|
904
|
-
headers: headers,
|
|
905
|
-
}).then(function (response) {
|
|
906
|
-
return Result.GetMessageByUserIdResult.fromDict(response.data);
|
|
907
|
-
}).catch(function (error) {
|
|
908
|
-
throw JSON.parse(error.response.data.message);
|
|
708
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
709
|
+
return Result.GetMessageByUserIdResult.fromDict(data);
|
|
909
710
|
});
|
|
910
711
|
};
|
|
911
712
|
Gs2ChatRestClient.prototype.deleteMessage = function (request) {
|
|
@@ -930,13 +731,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
930
731
|
'contextStack': (_k = request.getContextStack()) !== null && _k !== void 0 ? _k : null,
|
|
931
732
|
'userId': String((_l = request.getUserId()) !== null && _l !== void 0 ? _l : null),
|
|
932
733
|
};
|
|
933
|
-
return
|
|
934
|
-
|
|
935
|
-
headers: headers,
|
|
936
|
-
}).then(function (response) {
|
|
937
|
-
return Result.DeleteMessageResult.fromDict(response.data);
|
|
938
|
-
}).catch(function (error) {
|
|
939
|
-
throw JSON.parse(error.response.data.message);
|
|
734
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
735
|
+
return Result.DeleteMessageResult.fromDict(data);
|
|
940
736
|
});
|
|
941
737
|
};
|
|
942
738
|
Gs2ChatRestClient.prototype.describeSubscribes = function (request) {
|
|
@@ -958,13 +754,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
958
754
|
'pageToken': String((_g = request.getPageToken()) !== null && _g !== void 0 ? _g : null),
|
|
959
755
|
'limit': String((_h = request.getLimit()) !== null && _h !== void 0 ? _h : null),
|
|
960
756
|
};
|
|
961
|
-
return
|
|
962
|
-
|
|
963
|
-
headers: headers,
|
|
964
|
-
}).then(function (response) {
|
|
965
|
-
return Result.DescribeSubscribesResult.fromDict(response.data);
|
|
966
|
-
}).catch(function (error) {
|
|
967
|
-
throw JSON.parse(error.response.data.message);
|
|
757
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
758
|
+
return Result.DescribeSubscribesResult.fromDict(data);
|
|
968
759
|
});
|
|
969
760
|
};
|
|
970
761
|
Gs2ChatRestClient.prototype.describeSubscribesByUserId = function (request) {
|
|
@@ -987,13 +778,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
987
778
|
'pageToken': String((_j = request.getPageToken()) !== null && _j !== void 0 ? _j : null),
|
|
988
779
|
'limit': String((_k = request.getLimit()) !== null && _k !== void 0 ? _k : null),
|
|
989
780
|
};
|
|
990
|
-
return
|
|
991
|
-
|
|
992
|
-
headers: headers,
|
|
993
|
-
}).then(function (response) {
|
|
994
|
-
return Result.DescribeSubscribesByUserIdResult.fromDict(response.data);
|
|
995
|
-
}).catch(function (error) {
|
|
996
|
-
throw JSON.parse(error.response.data.message);
|
|
781
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
782
|
+
return Result.DescribeSubscribesByUserIdResult.fromDict(data);
|
|
997
783
|
});
|
|
998
784
|
};
|
|
999
785
|
Gs2ChatRestClient.prototype.describeSubscribesByRoomName = function (request) {
|
|
@@ -1012,13 +798,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1012
798
|
'pageToken': String((_g = request.getPageToken()) !== null && _g !== void 0 ? _g : null),
|
|
1013
799
|
'limit': String((_h = request.getLimit()) !== null && _h !== void 0 ? _h : null),
|
|
1014
800
|
};
|
|
1015
|
-
return
|
|
1016
|
-
|
|
1017
|
-
headers: headers,
|
|
1018
|
-
}).then(function (response) {
|
|
1019
|
-
return Result.DescribeSubscribesByRoomNameResult.fromDict(response.data);
|
|
1020
|
-
}).catch(function (error) {
|
|
1021
|
-
throw JSON.parse(error.response.data.message);
|
|
801
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
802
|
+
return Result.DescribeSubscribesByRoomNameResult.fromDict(data);
|
|
1022
803
|
});
|
|
1023
804
|
};
|
|
1024
805
|
Gs2ChatRestClient.prototype.subscribe = function (request) {
|
|
@@ -1042,17 +823,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1042
823
|
'contextStack': (_h = request.getContextStack()) !== null && _h !== void 0 ? _h : null,
|
|
1043
824
|
'notificationTypes': (_k = (_j = request.getNotificationTypes()) === null || _j === void 0 ? void 0 : _j.map(function (item) { return item.toDict(); })) !== null && _k !== void 0 ? _k : null,
|
|
1044
825
|
};
|
|
1045
|
-
return
|
|
1046
|
-
|
|
1047
|
-
}).then(function (response) {
|
|
1048
|
-
return Result.SubscribeResult.fromDict(response.data);
|
|
1049
|
-
}).catch(function (error) {
|
|
1050
|
-
if (error.response) {
|
|
1051
|
-
throw JSON.parse(error.response.data.message);
|
|
1052
|
-
}
|
|
1053
|
-
else {
|
|
1054
|
-
throw [];
|
|
1055
|
-
}
|
|
826
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
827
|
+
return Result.SubscribeResult.fromDict(data);
|
|
1056
828
|
});
|
|
1057
829
|
};
|
|
1058
830
|
Gs2ChatRestClient.prototype.subscribeByUserId = function (request) {
|
|
@@ -1077,17 +849,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1077
849
|
'contextStack': (_k = request.getContextStack()) !== null && _k !== void 0 ? _k : null,
|
|
1078
850
|
'notificationTypes': (_m = (_l = request.getNotificationTypes()) === null || _l === void 0 ? void 0 : _l.map(function (item) { return item.toDict(); })) !== null && _m !== void 0 ? _m : null,
|
|
1079
851
|
};
|
|
1080
|
-
return
|
|
1081
|
-
|
|
1082
|
-
}).then(function (response) {
|
|
1083
|
-
return Result.SubscribeByUserIdResult.fromDict(response.data);
|
|
1084
|
-
}).catch(function (error) {
|
|
1085
|
-
if (error.response) {
|
|
1086
|
-
throw JSON.parse(error.response.data.message);
|
|
1087
|
-
}
|
|
1088
|
-
else {
|
|
1089
|
-
throw [];
|
|
1090
|
-
}
|
|
852
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
853
|
+
return Result.SubscribeByUserIdResult.fromDict(data);
|
|
1091
854
|
});
|
|
1092
855
|
};
|
|
1093
856
|
Gs2ChatRestClient.prototype.getSubscribe = function (request) {
|
|
@@ -1107,13 +870,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1107
870
|
var params = {
|
|
1108
871
|
'contextStack': (_g = request.getContextStack()) !== null && _g !== void 0 ? _g : null,
|
|
1109
872
|
};
|
|
1110
|
-
return
|
|
1111
|
-
|
|
1112
|
-
headers: headers,
|
|
1113
|
-
}).then(function (response) {
|
|
1114
|
-
return Result.GetSubscribeResult.fromDict(response.data);
|
|
1115
|
-
}).catch(function (error) {
|
|
1116
|
-
throw JSON.parse(error.response.data.message);
|
|
873
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
874
|
+
return Result.GetSubscribeResult.fromDict(data);
|
|
1117
875
|
});
|
|
1118
876
|
};
|
|
1119
877
|
Gs2ChatRestClient.prototype.getSubscribeByUserId = function (request) {
|
|
@@ -1134,13 +892,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1134
892
|
var params = {
|
|
1135
893
|
'contextStack': (_j = request.getContextStack()) !== null && _j !== void 0 ? _j : null,
|
|
1136
894
|
};
|
|
1137
|
-
return
|
|
1138
|
-
|
|
1139
|
-
headers: headers,
|
|
1140
|
-
}).then(function (response) {
|
|
1141
|
-
return Result.GetSubscribeByUserIdResult.fromDict(response.data);
|
|
1142
|
-
}).catch(function (error) {
|
|
1143
|
-
throw JSON.parse(error.response.data.message);
|
|
895
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
896
|
+
return Result.GetSubscribeByUserIdResult.fromDict(data);
|
|
1144
897
|
});
|
|
1145
898
|
};
|
|
1146
899
|
Gs2ChatRestClient.prototype.updateNotificationType = function (request) {
|
|
@@ -1164,17 +917,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1164
917
|
'contextStack': (_h = request.getContextStack()) !== null && _h !== void 0 ? _h : null,
|
|
1165
918
|
'notificationTypes': (_k = (_j = request.getNotificationTypes()) === null || _j === void 0 ? void 0 : _j.map(function (item) { return item.toDict(); })) !== null && _k !== void 0 ? _k : null,
|
|
1166
919
|
};
|
|
1167
|
-
return
|
|
1168
|
-
|
|
1169
|
-
}).then(function (response) {
|
|
1170
|
-
return Result.UpdateNotificationTypeResult.fromDict(response.data);
|
|
1171
|
-
}).catch(function (error) {
|
|
1172
|
-
if (error.response) {
|
|
1173
|
-
throw JSON.parse(error.response.data.message);
|
|
1174
|
-
}
|
|
1175
|
-
else {
|
|
1176
|
-
throw [];
|
|
1177
|
-
}
|
|
920
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
921
|
+
return Result.UpdateNotificationTypeResult.fromDict(data);
|
|
1178
922
|
});
|
|
1179
923
|
};
|
|
1180
924
|
Gs2ChatRestClient.prototype.updateNotificationTypeByUserId = function (request) {
|
|
@@ -1199,17 +943,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1199
943
|
'contextStack': (_k = request.getContextStack()) !== null && _k !== void 0 ? _k : null,
|
|
1200
944
|
'notificationTypes': (_m = (_l = request.getNotificationTypes()) === null || _l === void 0 ? void 0 : _l.map(function (item) { return item.toDict(); })) !== null && _m !== void 0 ? _m : null,
|
|
1201
945
|
};
|
|
1202
|
-
return
|
|
1203
|
-
|
|
1204
|
-
}).then(function (response) {
|
|
1205
|
-
return Result.UpdateNotificationTypeByUserIdResult.fromDict(response.data);
|
|
1206
|
-
}).catch(function (error) {
|
|
1207
|
-
if (error.response) {
|
|
1208
|
-
throw JSON.parse(error.response.data.message);
|
|
1209
|
-
}
|
|
1210
|
-
else {
|
|
1211
|
-
throw [];
|
|
1212
|
-
}
|
|
946
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
947
|
+
return Result.UpdateNotificationTypeByUserIdResult.fromDict(data);
|
|
1213
948
|
});
|
|
1214
949
|
};
|
|
1215
950
|
Gs2ChatRestClient.prototype.unsubscribe = function (request) {
|
|
@@ -1232,13 +967,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1232
967
|
var params = {
|
|
1233
968
|
'contextStack': (_h = request.getContextStack()) !== null && _h !== void 0 ? _h : null,
|
|
1234
969
|
};
|
|
1235
|
-
return
|
|
1236
|
-
|
|
1237
|
-
headers: headers,
|
|
1238
|
-
}).then(function (response) {
|
|
1239
|
-
return Result.UnsubscribeResult.fromDict(response.data);
|
|
1240
|
-
}).catch(function (error) {
|
|
1241
|
-
throw JSON.parse(error.response.data.message);
|
|
970
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
971
|
+
return Result.UnsubscribeResult.fromDict(data);
|
|
1242
972
|
});
|
|
1243
973
|
};
|
|
1244
974
|
Gs2ChatRestClient.prototype.unsubscribeByUserId = function (request) {
|
|
@@ -1262,13 +992,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1262
992
|
var params = {
|
|
1263
993
|
'contextStack': (_k = request.getContextStack()) !== null && _k !== void 0 ? _k : null,
|
|
1264
994
|
};
|
|
1265
|
-
return
|
|
1266
|
-
|
|
1267
|
-
headers: headers,
|
|
1268
|
-
}).then(function (response) {
|
|
1269
|
-
return Result.UnsubscribeByUserIdResult.fromDict(response.data);
|
|
1270
|
-
}).catch(function (error) {
|
|
1271
|
-
throw JSON.parse(error.response.data.message);
|
|
995
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
996
|
+
return Result.UnsubscribeByUserIdResult.fromDict(data);
|
|
1272
997
|
});
|
|
1273
998
|
};
|
|
1274
999
|
Gs2ChatRestClient.prototype.describeCategoryModels = function (request) {
|
|
@@ -1284,13 +1009,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1284
1009
|
var params = {
|
|
1285
1010
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
1286
1011
|
};
|
|
1287
|
-
return
|
|
1288
|
-
|
|
1289
|
-
headers: headers,
|
|
1290
|
-
}).then(function (response) {
|
|
1291
|
-
return Result.DescribeCategoryModelsResult.fromDict(response.data);
|
|
1292
|
-
}).catch(function (error) {
|
|
1293
|
-
throw JSON.parse(error.response.data.message);
|
|
1012
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
1013
|
+
return Result.DescribeCategoryModelsResult.fromDict(data);
|
|
1294
1014
|
});
|
|
1295
1015
|
};
|
|
1296
1016
|
Gs2ChatRestClient.prototype.getCategoryModel = function (request) {
|
|
@@ -1307,13 +1027,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1307
1027
|
var params = {
|
|
1308
1028
|
'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
|
|
1309
1029
|
};
|
|
1310
|
-
return
|
|
1311
|
-
|
|
1312
|
-
headers: headers,
|
|
1313
|
-
}).then(function (response) {
|
|
1314
|
-
return Result.GetCategoryModelResult.fromDict(response.data);
|
|
1315
|
-
}).catch(function (error) {
|
|
1316
|
-
throw JSON.parse(error.response.data.message);
|
|
1030
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
1031
|
+
return Result.GetCategoryModelResult.fromDict(data);
|
|
1317
1032
|
});
|
|
1318
1033
|
};
|
|
1319
1034
|
Gs2ChatRestClient.prototype.describeCategoryModelMasters = function (request) {
|
|
@@ -1331,13 +1046,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1331
1046
|
'pageToken': String((_e = request.getPageToken()) !== null && _e !== void 0 ? _e : null),
|
|
1332
1047
|
'limit': String((_f = request.getLimit()) !== null && _f !== void 0 ? _f : null),
|
|
1333
1048
|
};
|
|
1334
|
-
return
|
|
1335
|
-
|
|
1336
|
-
headers: headers,
|
|
1337
|
-
}).then(function (response) {
|
|
1338
|
-
return Result.DescribeCategoryModelMastersResult.fromDict(response.data);
|
|
1339
|
-
}).catch(function (error) {
|
|
1340
|
-
throw JSON.parse(error.response.data.message);
|
|
1049
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
1050
|
+
return Result.DescribeCategoryModelMastersResult.fromDict(data);
|
|
1341
1051
|
});
|
|
1342
1052
|
};
|
|
1343
1053
|
Gs2ChatRestClient.prototype.createCategoryModelMaster = function (request) {
|
|
@@ -1356,17 +1066,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1356
1066
|
'description': (_f = request.getDescription()) !== null && _f !== void 0 ? _f : null,
|
|
1357
1067
|
'rejectAccessTokenPost': (_g = request.getRejectAccessTokenPost()) !== null && _g !== void 0 ? _g : null,
|
|
1358
1068
|
};
|
|
1359
|
-
return
|
|
1360
|
-
|
|
1361
|
-
}).then(function (response) {
|
|
1362
|
-
return Result.CreateCategoryModelMasterResult.fromDict(response.data);
|
|
1363
|
-
}).catch(function (error) {
|
|
1364
|
-
if (error.response) {
|
|
1365
|
-
throw JSON.parse(error.response.data.message);
|
|
1366
|
-
}
|
|
1367
|
-
else {
|
|
1368
|
-
throw [];
|
|
1369
|
-
}
|
|
1069
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
1070
|
+
return Result.CreateCategoryModelMasterResult.fromDict(data);
|
|
1370
1071
|
});
|
|
1371
1072
|
};
|
|
1372
1073
|
Gs2ChatRestClient.prototype.getCategoryModelMaster = function (request) {
|
|
@@ -1383,13 +1084,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1383
1084
|
var params = {
|
|
1384
1085
|
'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
|
|
1385
1086
|
};
|
|
1386
|
-
return
|
|
1387
|
-
|
|
1388
|
-
headers: headers,
|
|
1389
|
-
}).then(function (response) {
|
|
1390
|
-
return Result.GetCategoryModelMasterResult.fromDict(response.data);
|
|
1391
|
-
}).catch(function (error) {
|
|
1392
|
-
throw JSON.parse(error.response.data.message);
|
|
1087
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
1088
|
+
return Result.GetCategoryModelMasterResult.fromDict(data);
|
|
1393
1089
|
});
|
|
1394
1090
|
};
|
|
1395
1091
|
Gs2ChatRestClient.prototype.updateCategoryModelMaster = function (request) {
|
|
@@ -1408,17 +1104,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1408
1104
|
'description': (_g = request.getDescription()) !== null && _g !== void 0 ? _g : null,
|
|
1409
1105
|
'rejectAccessTokenPost': (_h = request.getRejectAccessTokenPost()) !== null && _h !== void 0 ? _h : null,
|
|
1410
1106
|
};
|
|
1411
|
-
return
|
|
1412
|
-
|
|
1413
|
-
}).then(function (response) {
|
|
1414
|
-
return Result.UpdateCategoryModelMasterResult.fromDict(response.data);
|
|
1415
|
-
}).catch(function (error) {
|
|
1416
|
-
if (error.response) {
|
|
1417
|
-
throw JSON.parse(error.response.data.message);
|
|
1418
|
-
}
|
|
1419
|
-
else {
|
|
1420
|
-
throw [];
|
|
1421
|
-
}
|
|
1107
|
+
return this.request('PUT', url, headers, undefined, body).then(function (data) {
|
|
1108
|
+
return Result.UpdateCategoryModelMasterResult.fromDict(data);
|
|
1422
1109
|
});
|
|
1423
1110
|
};
|
|
1424
1111
|
Gs2ChatRestClient.prototype.deleteCategoryModelMaster = function (request) {
|
|
@@ -1435,13 +1122,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1435
1122
|
var params = {
|
|
1436
1123
|
'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
|
|
1437
1124
|
};
|
|
1438
|
-
return
|
|
1439
|
-
|
|
1440
|
-
headers: headers,
|
|
1441
|
-
}).then(function (response) {
|
|
1442
|
-
return Result.DeleteCategoryModelMasterResult.fromDict(response.data);
|
|
1443
|
-
}).catch(function (error) {
|
|
1444
|
-
throw JSON.parse(error.response.data.message);
|
|
1125
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
1126
|
+
return Result.DeleteCategoryModelMasterResult.fromDict(data);
|
|
1445
1127
|
});
|
|
1446
1128
|
};
|
|
1447
1129
|
Gs2ChatRestClient.prototype.exportMaster = function (request) {
|
|
@@ -1457,13 +1139,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1457
1139
|
var params = {
|
|
1458
1140
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
1459
1141
|
};
|
|
1460
|
-
return
|
|
1461
|
-
|
|
1462
|
-
headers: headers,
|
|
1463
|
-
}).then(function (response) {
|
|
1464
|
-
return Result.ExportMasterResult.fromDict(response.data);
|
|
1465
|
-
}).catch(function (error) {
|
|
1466
|
-
throw JSON.parse(error.response.data.message);
|
|
1142
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
1143
|
+
return Result.ExportMasterResult.fromDict(data);
|
|
1467
1144
|
});
|
|
1468
1145
|
};
|
|
1469
1146
|
Gs2ChatRestClient.prototype.getCurrentModelMaster = function (request) {
|
|
@@ -1479,13 +1156,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1479
1156
|
var params = {
|
|
1480
1157
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
1481
1158
|
};
|
|
1482
|
-
return
|
|
1483
|
-
|
|
1484
|
-
headers: headers,
|
|
1485
|
-
}).then(function (response) {
|
|
1486
|
-
return Result.GetCurrentModelMasterResult.fromDict(response.data);
|
|
1487
|
-
}).catch(function (error) {
|
|
1488
|
-
throw JSON.parse(error.response.data.message);
|
|
1159
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
1160
|
+
return Result.GetCurrentModelMasterResult.fromDict(data);
|
|
1489
1161
|
});
|
|
1490
1162
|
};
|
|
1491
1163
|
Gs2ChatRestClient.prototype.preUpdateCurrentModelMaster = function (request) {
|
|
@@ -1501,17 +1173,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1501
1173
|
var body = {
|
|
1502
1174
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
1503
1175
|
};
|
|
1504
|
-
return
|
|
1505
|
-
|
|
1506
|
-
}).then(function (response) {
|
|
1507
|
-
return Result.PreUpdateCurrentModelMasterResult.fromDict(response.data);
|
|
1508
|
-
}).catch(function (error) {
|
|
1509
|
-
if (error.response) {
|
|
1510
|
-
throw JSON.parse(error.response.data.message);
|
|
1511
|
-
}
|
|
1512
|
-
else {
|
|
1513
|
-
throw [];
|
|
1514
|
-
}
|
|
1176
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
1177
|
+
return Result.PreUpdateCurrentModelMasterResult.fromDict(data);
|
|
1515
1178
|
});
|
|
1516
1179
|
};
|
|
1517
1180
|
Gs2ChatRestClient.prototype.updateCurrentModelMaster = function (request) {
|
|
@@ -1530,17 +1193,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1530
1193
|
'settings': (_f = request.getSettings()) !== null && _f !== void 0 ? _f : null,
|
|
1531
1194
|
'uploadToken': (_g = request.getUploadToken()) !== null && _g !== void 0 ? _g : null,
|
|
1532
1195
|
};
|
|
1533
|
-
return
|
|
1534
|
-
|
|
1535
|
-
}).then(function (response) {
|
|
1536
|
-
return Result.UpdateCurrentModelMasterResult.fromDict(response.data);
|
|
1537
|
-
}).catch(function (error) {
|
|
1538
|
-
if (error.response) {
|
|
1539
|
-
throw JSON.parse(error.response.data.message);
|
|
1540
|
-
}
|
|
1541
|
-
else {
|
|
1542
|
-
throw [];
|
|
1543
|
-
}
|
|
1196
|
+
return this.request('PUT', url, headers, undefined, body).then(function (data) {
|
|
1197
|
+
return Result.UpdateCurrentModelMasterResult.fromDict(data);
|
|
1544
1198
|
});
|
|
1545
1199
|
};
|
|
1546
1200
|
Gs2ChatRestClient.prototype.updateCurrentModelMasterFromGitHub = function (request) {
|
|
@@ -1557,17 +1211,8 @@ var Gs2ChatRestClient = /** @class */ (function (_super) {
|
|
|
1557
1211
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
1558
1212
|
'checkoutSetting': (_f = (_e = request.getCheckoutSetting()) === null || _e === void 0 ? void 0 : _e.toDict()) !== null && _f !== void 0 ? _f : null,
|
|
1559
1213
|
};
|
|
1560
|
-
return
|
|
1561
|
-
|
|
1562
|
-
}).then(function (response) {
|
|
1563
|
-
return Result.UpdateCurrentModelMasterFromGitHubResult.fromDict(response.data);
|
|
1564
|
-
}).catch(function (error) {
|
|
1565
|
-
if (error.response) {
|
|
1566
|
-
throw JSON.parse(error.response.data.message);
|
|
1567
|
-
}
|
|
1568
|
-
else {
|
|
1569
|
-
throw [];
|
|
1570
|
-
}
|
|
1214
|
+
return this.request('PUT', url, headers, undefined, body).then(function (data) {
|
|
1215
|
+
return Result.UpdateCurrentModelMasterFromGitHubResult.fromDict(data);
|
|
1571
1216
|
});
|
|
1572
1217
|
};
|
|
1573
1218
|
Gs2ChatRestClient.ENDPOINT_HOST = null;
|