gs2 1.4.109 → 1.4.111

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.
Files changed (123) hide show
  1. package/account/request/FindPlatformIdByUserIdRequest.d.ts +4 -0
  2. package/account/request/FindPlatformIdByUserIdRequest.js +14 -0
  3. package/account/request/FindPlatformIdByUserIdRequest.js.map +1 -1
  4. package/account/rest.js +132 -565
  5. package/account/rest.js.map +1 -1
  6. package/adReward/rest.js +44 -203
  7. package/adReward/rest.js.map +1 -1
  8. package/auth/rest.js +10 -52
  9. package/auth/rest.js.map +1 -1
  10. package/buff/rest.js +56 -249
  11. package/buff/rest.js.map +1 -1
  12. package/chat/rest.js +108 -463
  13. package/chat/rest.js.map +1 -1
  14. package/core/AbstractGs2RestClient.d.ts +9 -0
  15. package/core/AbstractGs2RestClient.js +48 -0
  16. package/core/AbstractGs2RestClient.js.map +1 -1
  17. package/core/model.d.ts +9 -1
  18. package/core/model.js +4 -1
  19. package/core/model.js.map +1 -1
  20. package/datastore/rest.js +78 -370
  21. package/datastore/rest.js.map +1 -1
  22. package/deploy/rest.js +48 -209
  23. package/deploy/rest.js.map +1 -1
  24. package/dictionary/rest.js +102 -450
  25. package/dictionary/rest.js.map +1 -1
  26. package/distributor/rest.js +96 -465
  27. package/distributor/rest.js.map +1 -1
  28. package/enchant/rest.js +112 -497
  29. package/enchant/rest.js.map +1 -1
  30. package/enhance/rest.js +100 -455
  31. package/enhance/rest.js.map +1 -1
  32. package/exchange/rest.js +108 -491
  33. package/exchange/rest.js.map +1 -1
  34. package/experience/rest.js +120 -561
  35. package/experience/rest.js.map +1 -1
  36. package/formation/rest.js +158 -686
  37. package/formation/rest.js.map +1 -1
  38. package/freeze/rest.js +12 -51
  39. package/freeze/rest.js.map +1 -1
  40. package/friend/rest.js +118 -490
  41. package/friend/rest.js.map +1 -1
  42. package/gateway/rest.js +56 -245
  43. package/gateway/rest.js.map +1 -1
  44. package/grade/rest.js +96 -449
  45. package/grade/rest.js.map +1 -1
  46. package/guard/rest.js +14 -58
  47. package/guard/rest.js.map +1 -1
  48. package/guild/rest.js +186 -840
  49. package/guild/rest.js.map +1 -1
  50. package/identifier/rest.js +60 -259
  51. package/identifier/rest.js.map +1 -1
  52. package/idle/rest.js +84 -387
  53. package/idle/rest.js.map +1 -1
  54. package/inbox/rest.js +96 -437
  55. package/inbox/rest.js.map +1 -1
  56. package/inventory/rest.js +270 -1206
  57. package/inventory/rest.js.map +1 -1
  58. package/jobQueue/rest.js +50 -220
  59. package/jobQueue/rest.js.map +1 -1
  60. package/key/rest.js +38 -166
  61. package/key/rest.js.map +1 -1
  62. package/limit/rest.js +80 -361
  63. package/limit/rest.js.map +1 -1
  64. package/lock/rest.js +28 -123
  65. package/lock/rest.js.map +1 -1
  66. package/log/rest.js +46 -186
  67. package/log/rest.js.map +1 -1
  68. package/loginReward/rest.js +82 -376
  69. package/loginReward/rest.js.map +1 -1
  70. package/lottery/rest.js +100 -427
  71. package/lottery/rest.js.map +1 -1
  72. package/matchmaking/rest.js +146 -644
  73. package/matchmaking/rest.js.map +1 -1
  74. package/megaField/rest.js +68 -307
  75. package/megaField/rest.js.map +1 -1
  76. package/mission/rest.js +158 -726
  77. package/mission/rest.js.map +1 -1
  78. package/money/rest.js +58 -264
  79. package/money/rest.js.map +1 -1
  80. package/money2/rest.js +126 -542
  81. package/money2/rest.js.map +1 -1
  82. package/news/rest.js +36 -147
  83. package/news/rest.js.map +1 -1
  84. package/package.json +1 -1
  85. package/project/request/WaitCleanUserDataRequest.d.ts +0 -4
  86. package/project/request/WaitCleanUserDataRequest.js +0 -14
  87. package/project/request/WaitCleanUserDataRequest.js.map +1 -1
  88. package/project/request/WaitDumpUserDataRequest.d.ts +0 -4
  89. package/project/request/WaitDumpUserDataRequest.js +0 -14
  90. package/project/request/WaitDumpUserDataRequest.js.map +1 -1
  91. package/project/request/WaitImportUserDataRequest.d.ts +0 -4
  92. package/project/request/WaitImportUserDataRequest.js +0 -14
  93. package/project/request/WaitImportUserDataRequest.js.map +1 -1
  94. package/project/rest.js +91 -411
  95. package/project/rest.js.map +1 -1
  96. package/quest/rest.js +100 -431
  97. package/quest/rest.js.map +1 -1
  98. package/ranking/rest.js +92 -387
  99. package/ranking/rest.js.map +1 -1
  100. package/ranking2/rest.js +220 -939
  101. package/ranking2/rest.js.map +1 -1
  102. package/realtime/rest.js +24 -97
  103. package/realtime/rest.js.map +1 -1
  104. package/schedule/rest.js +94 -418
  105. package/schedule/rest.js.map +1 -1
  106. package/script/rest.js +34 -156
  107. package/script/rest.js.map +1 -1
  108. package/seasonRating/rest.js +70 -314
  109. package/seasonRating/rest.js.map +1 -1
  110. package/serialKey/rest.js +84 -383
  111. package/serialKey/rest.js.map +1 -1
  112. package/showcase/rest.js +116 -515
  113. package/showcase/rest.js.map +1 -1
  114. package/skillTree/rest.js +82 -372
  115. package/skillTree/rest.js.map +1 -1
  116. package/stamina/rest.js +166 -798
  117. package/stamina/rest.js.map +1 -1
  118. package/stateMachine/rest.js +62 -270
  119. package/stateMachine/rest.js.map +1 -1
  120. package/version/rest.js +78 -346
  121. package/version/rest.js.map +1 -1
  122. package/watch/rest.js +156 -563
  123. package/watch/rest.js.map +1 -1
@@ -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 Gs2DistributorRestClient = /** @class */ (function (_super) {
24
23
  tslib_1.__extends(Gs2DistributorRestClient, _super);
25
24
  function Gs2DistributorRestClient(session) {
@@ -40,13 +39,8 @@ var Gs2DistributorRestClient = /** @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 axios_1.default.get(url, {
44
- params: params,
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
  Gs2DistributorRestClient.prototype.createNamespace = function (request) {
@@ -68,17 +62,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
68
62
  'autoRunTransactionNotification': (_l = (_k = request.getAutoRunTransactionNotification()) === null || _k === void 0 ? void 0 : _k.toDict()) !== null && _l !== void 0 ? _l : null,
69
63
  'logSetting': (_o = (_m = request.getLogSetting()) === null || _m === void 0 ? void 0 : _m.toDict()) !== null && _o !== void 0 ? _o : null,
70
64
  };
71
- return axios_1.default.post(url, body, {
72
- headers: headers,
73
- }).then(function (response) {
74
- return Result.CreateNamespaceResult.fromDict(response.data);
75
- }).catch(function (error) {
76
- if (error.response) {
77
- throw JSON.parse(error.response.data.message);
78
- }
79
- else {
80
- throw [];
81
- }
65
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
66
+ return Result.CreateNamespaceResult.fromDict(data);
82
67
  });
83
68
  };
84
69
  Gs2DistributorRestClient.prototype.getNamespaceStatus = function (request) {
@@ -94,13 +79,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
94
79
  var params = {
95
80
  'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
96
81
  };
97
- return axios_1.default.get(url, {
98
- params: params,
99
- headers: headers,
100
- }).then(function (response) {
101
- return Result.GetNamespaceStatusResult.fromDict(response.data);
102
- }).catch(function (error) {
103
- throw JSON.parse(error.response.data.message);
82
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
83
+ return Result.GetNamespaceStatusResult.fromDict(data);
104
84
  });
105
85
  };
106
86
  Gs2DistributorRestClient.prototype.getNamespace = function (request) {
@@ -116,13 +96,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
116
96
  var params = {
117
97
  'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
118
98
  };
119
- return axios_1.default.get(url, {
120
- params: params,
121
- headers: headers,
122
- }).then(function (response) {
123
- return Result.GetNamespaceResult.fromDict(response.data);
124
- }).catch(function (error) {
125
- throw JSON.parse(error.response.data.message);
99
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
100
+ return Result.GetNamespaceResult.fromDict(data);
126
101
  });
127
102
  };
128
103
  Gs2DistributorRestClient.prototype.updateNamespace = function (request) {
@@ -144,17 +119,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
144
119
  'autoRunTransactionNotification': (_m = (_l = request.getAutoRunTransactionNotification()) === null || _l === void 0 ? void 0 : _l.toDict()) !== null && _m !== void 0 ? _m : null,
145
120
  'logSetting': (_p = (_o = request.getLogSetting()) === null || _o === void 0 ? void 0 : _o.toDict()) !== null && _p !== void 0 ? _p : null,
146
121
  };
147
- return axios_1.default.put(url, body, {
148
- headers: headers,
149
- }).then(function (response) {
150
- return Result.UpdateNamespaceResult.fromDict(response.data);
151
- }).catch(function (error) {
152
- if (error.response) {
153
- throw JSON.parse(error.response.data.message);
154
- }
155
- else {
156
- throw [];
157
- }
122
+ return this.request('PUT', url, headers, undefined, body).then(function (data) {
123
+ return Result.UpdateNamespaceResult.fromDict(data);
158
124
  });
159
125
  };
160
126
  Gs2DistributorRestClient.prototype.deleteNamespace = function (request) {
@@ -170,13 +136,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
170
136
  var params = {
171
137
  'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
172
138
  };
173
- return axios_1.default.delete(url, {
174
- params: params,
175
- headers: headers,
176
- }).then(function (response) {
177
- return Result.DeleteNamespaceResult.fromDict(response.data);
178
- }).catch(function (error) {
179
- throw JSON.parse(error.response.data.message);
139
+ return this.request('DELETE', url, headers, params, undefined).then(function (data) {
140
+ return Result.DeleteNamespaceResult.fromDict(data);
180
141
  });
181
142
  };
182
143
  Gs2DistributorRestClient.prototype.getServiceVersion = function (request) {
@@ -191,13 +152,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
191
152
  var params = {
192
153
  'contextStack': (_b = request.getContextStack()) !== null && _b !== void 0 ? _b : null,
193
154
  };
194
- return axios_1.default.get(url, {
195
- params: params,
196
- headers: headers,
197
- }).then(function (response) {
198
- return Result.GetServiceVersionResult.fromDict(response.data);
199
- }).catch(function (error) {
200
- throw JSON.parse(error.response.data.message);
155
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
156
+ return Result.GetServiceVersionResult.fromDict(data);
201
157
  });
202
158
  };
203
159
  Gs2DistributorRestClient.prototype.describeDistributorModelMasters = function (request) {
@@ -216,13 +172,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
216
172
  'pageToken': String((_f = request.getPageToken()) !== null && _f !== void 0 ? _f : null),
217
173
  'limit': String((_g = request.getLimit()) !== null && _g !== void 0 ? _g : null),
218
174
  };
219
- return axios_1.default.get(url, {
220
- params: params,
221
- headers: headers,
222
- }).then(function (response) {
223
- return Result.DescribeDistributorModelMastersResult.fromDict(response.data);
224
- }).catch(function (error) {
225
- throw JSON.parse(error.response.data.message);
175
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
176
+ return Result.DescribeDistributorModelMastersResult.fromDict(data);
226
177
  });
227
178
  };
228
179
  Gs2DistributorRestClient.prototype.createDistributorModelMaster = function (request) {
@@ -243,17 +194,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
243
194
  'inboxNamespaceId': (_h = request.getInboxNamespaceId()) !== null && _h !== void 0 ? _h : null,
244
195
  'whiteListTargetIds': (_j = request.getWhiteListTargetIds()) !== null && _j !== void 0 ? _j : null,
245
196
  };
246
- return axios_1.default.post(url, body, {
247
- headers: headers,
248
- }).then(function (response) {
249
- return Result.CreateDistributorModelMasterResult.fromDict(response.data);
250
- }).catch(function (error) {
251
- if (error.response) {
252
- throw JSON.parse(error.response.data.message);
253
- }
254
- else {
255
- throw [];
256
- }
197
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
198
+ return Result.CreateDistributorModelMasterResult.fromDict(data);
257
199
  });
258
200
  };
259
201
  Gs2DistributorRestClient.prototype.getDistributorModelMaster = function (request) {
@@ -270,13 +212,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
270
212
  var params = {
271
213
  'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
272
214
  };
273
- return axios_1.default.get(url, {
274
- params: params,
275
- headers: headers,
276
- }).then(function (response) {
277
- return Result.GetDistributorModelMasterResult.fromDict(response.data);
278
- }).catch(function (error) {
279
- throw JSON.parse(error.response.data.message);
215
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
216
+ return Result.GetDistributorModelMasterResult.fromDict(data);
280
217
  });
281
218
  };
282
219
  Gs2DistributorRestClient.prototype.updateDistributorModelMaster = function (request) {
@@ -297,17 +234,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
297
234
  'inboxNamespaceId': (_j = request.getInboxNamespaceId()) !== null && _j !== void 0 ? _j : null,
298
235
  'whiteListTargetIds': (_k = request.getWhiteListTargetIds()) !== null && _k !== void 0 ? _k : null,
299
236
  };
300
- return axios_1.default.put(url, body, {
301
- headers: headers,
302
- }).then(function (response) {
303
- return Result.UpdateDistributorModelMasterResult.fromDict(response.data);
304
- }).catch(function (error) {
305
- if (error.response) {
306
- throw JSON.parse(error.response.data.message);
307
- }
308
- else {
309
- throw [];
310
- }
237
+ return this.request('PUT', url, headers, undefined, body).then(function (data) {
238
+ return Result.UpdateDistributorModelMasterResult.fromDict(data);
311
239
  });
312
240
  };
313
241
  Gs2DistributorRestClient.prototype.deleteDistributorModelMaster = function (request) {
@@ -324,13 +252,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
324
252
  var params = {
325
253
  'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
326
254
  };
327
- return axios_1.default.delete(url, {
328
- params: params,
329
- headers: headers,
330
- }).then(function (response) {
331
- return Result.DeleteDistributorModelMasterResult.fromDict(response.data);
332
- }).catch(function (error) {
333
- throw JSON.parse(error.response.data.message);
255
+ return this.request('DELETE', url, headers, params, undefined).then(function (data) {
256
+ return Result.DeleteDistributorModelMasterResult.fromDict(data);
334
257
  });
335
258
  };
336
259
  Gs2DistributorRestClient.prototype.describeDistributorModels = function (request) {
@@ -346,13 +269,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
346
269
  var params = {
347
270
  'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
348
271
  };
349
- return axios_1.default.get(url, {
350
- params: params,
351
- headers: headers,
352
- }).then(function (response) {
353
- return Result.DescribeDistributorModelsResult.fromDict(response.data);
354
- }).catch(function (error) {
355
- throw JSON.parse(error.response.data.message);
272
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
273
+ return Result.DescribeDistributorModelsResult.fromDict(data);
356
274
  });
357
275
  };
358
276
  Gs2DistributorRestClient.prototype.getDistributorModel = function (request) {
@@ -369,13 +287,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
369
287
  var params = {
370
288
  'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
371
289
  };
372
- return axios_1.default.get(url, {
373
- params: params,
374
- headers: headers,
375
- }).then(function (response) {
376
- return Result.GetDistributorModelResult.fromDict(response.data);
377
- }).catch(function (error) {
378
- throw JSON.parse(error.response.data.message);
290
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
291
+ return Result.GetDistributorModelResult.fromDict(data);
379
292
  });
380
293
  };
381
294
  Gs2DistributorRestClient.prototype.exportMaster = function (request) {
@@ -391,13 +304,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
391
304
  var params = {
392
305
  'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
393
306
  };
394
- return axios_1.default.get(url, {
395
- params: params,
396
- headers: headers,
397
- }).then(function (response) {
398
- return Result.ExportMasterResult.fromDict(response.data);
399
- }).catch(function (error) {
400
- throw JSON.parse(error.response.data.message);
307
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
308
+ return Result.ExportMasterResult.fromDict(data);
401
309
  });
402
310
  };
403
311
  Gs2DistributorRestClient.prototype.getCurrentDistributorMaster = function (request) {
@@ -413,13 +321,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
413
321
  var params = {
414
322
  'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
415
323
  };
416
- return axios_1.default.get(url, {
417
- params: params,
418
- headers: headers,
419
- }).then(function (response) {
420
- return Result.GetCurrentDistributorMasterResult.fromDict(response.data);
421
- }).catch(function (error) {
422
- throw JSON.parse(error.response.data.message);
324
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
325
+ return Result.GetCurrentDistributorMasterResult.fromDict(data);
423
326
  });
424
327
  };
425
328
  Gs2DistributorRestClient.prototype.preUpdateCurrentDistributorMaster = function (request) {
@@ -435,17 +338,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
435
338
  var body = {
436
339
  'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
437
340
  };
438
- return axios_1.default.post(url, body, {
439
- headers: headers,
440
- }).then(function (response) {
441
- return Result.PreUpdateCurrentDistributorMasterResult.fromDict(response.data);
442
- }).catch(function (error) {
443
- if (error.response) {
444
- throw JSON.parse(error.response.data.message);
445
- }
446
- else {
447
- throw [];
448
- }
341
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
342
+ return Result.PreUpdateCurrentDistributorMasterResult.fromDict(data);
449
343
  });
450
344
  };
451
345
  Gs2DistributorRestClient.prototype.updateCurrentDistributorMaster = function (request) {
@@ -464,17 +358,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
464
358
  'settings': (_f = request.getSettings()) !== null && _f !== void 0 ? _f : null,
465
359
  'uploadToken': (_g = request.getUploadToken()) !== null && _g !== void 0 ? _g : null,
466
360
  };
467
- return axios_1.default.put(url, body, {
468
- headers: headers,
469
- }).then(function (response) {
470
- return Result.UpdateCurrentDistributorMasterResult.fromDict(response.data);
471
- }).catch(function (error) {
472
- if (error.response) {
473
- throw JSON.parse(error.response.data.message);
474
- }
475
- else {
476
- throw [];
477
- }
361
+ return this.request('PUT', url, headers, undefined, body).then(function (data) {
362
+ return Result.UpdateCurrentDistributorMasterResult.fromDict(data);
478
363
  });
479
364
  };
480
365
  Gs2DistributorRestClient.prototype.updateCurrentDistributorMasterFromGitHub = function (request) {
@@ -491,17 +376,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
491
376
  'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
492
377
  'checkoutSetting': (_f = (_e = request.getCheckoutSetting()) === null || _e === void 0 ? void 0 : _e.toDict()) !== null && _f !== void 0 ? _f : null,
493
378
  };
494
- return axios_1.default.put(url, body, {
495
- headers: headers,
496
- }).then(function (response) {
497
- return Result.UpdateCurrentDistributorMasterFromGitHubResult.fromDict(response.data);
498
- }).catch(function (error) {
499
- if (error.response) {
500
- throw JSON.parse(error.response.data.message);
501
- }
502
- else {
503
- throw [];
504
- }
379
+ return this.request('PUT', url, headers, undefined, body).then(function (data) {
380
+ return Result.UpdateCurrentDistributorMasterFromGitHubResult.fromDict(data);
505
381
  });
506
382
  };
507
383
  Gs2DistributorRestClient.prototype.distribute = function (request) {
@@ -526,17 +402,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
526
402
  'userId': (_j = request.getUserId()) !== null && _j !== void 0 ? _j : null,
527
403
  'distributeResource': (_l = (_k = request.getDistributeResource()) === null || _k === void 0 ? void 0 : _k.toDict()) !== null && _l !== void 0 ? _l : null,
528
404
  };
529
- return axios_1.default.post(url, body, {
530
- headers: headers,
531
- }).then(function (response) {
532
- return Result.DistributeResult.fromDict(response.data);
533
- }).catch(function (error) {
534
- if (error.response) {
535
- throw JSON.parse(error.response.data.message);
536
- }
537
- else {
538
- throw [];
539
- }
405
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
406
+ return Result.DistributeResult.fromDict(data);
540
407
  });
541
408
  };
542
409
  Gs2DistributorRestClient.prototype.distributeWithoutOverflowProcess = function (request) {
@@ -559,17 +426,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
559
426
  'userId': (_e = request.getUserId()) !== null && _e !== void 0 ? _e : null,
560
427
  'distributeResource': (_g = (_f = request.getDistributeResource()) === null || _f === void 0 ? void 0 : _f.toDict()) !== null && _g !== void 0 ? _g : null,
561
428
  };
562
- return axios_1.default.post(url, body, {
563
- headers: headers,
564
- }).then(function (response) {
565
- return Result.DistributeWithoutOverflowProcessResult.fromDict(response.data);
566
- }).catch(function (error) {
567
- if (error.response) {
568
- throw JSON.parse(error.response.data.message);
569
- }
570
- else {
571
- throw [];
572
- }
429
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
430
+ return Result.DistributeWithoutOverflowProcessResult.fromDict(data);
573
431
  });
574
432
  };
575
433
  Gs2DistributorRestClient.prototype.runVerifyTask = function (request) {
@@ -587,17 +445,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
587
445
  'verifyTask': (_e = request.getVerifyTask()) !== null && _e !== void 0 ? _e : null,
588
446
  'keyId': (_f = request.getKeyId()) !== null && _f !== void 0 ? _f : null,
589
447
  };
590
- return axios_1.default.post(url, body, {
591
- headers: headers,
592
- }).then(function (response) {
593
- return Result.RunVerifyTaskResult.fromDict(response.data);
594
- }).catch(function (error) {
595
- if (error.response) {
596
- throw JSON.parse(error.response.data.message);
597
- }
598
- else {
599
- throw [];
600
- }
448
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
449
+ return Result.RunVerifyTaskResult.fromDict(data);
601
450
  });
602
451
  };
603
452
  Gs2DistributorRestClient.prototype.runStampTask = function (request) {
@@ -615,17 +464,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
615
464
  'stampTask': (_e = request.getStampTask()) !== null && _e !== void 0 ? _e : null,
616
465
  'keyId': (_f = request.getKeyId()) !== null && _f !== void 0 ? _f : null,
617
466
  };
618
- return axios_1.default.post(url, body, {
619
- headers: headers,
620
- }).then(function (response) {
621
- return Result.RunStampTaskResult.fromDict(response.data);
622
- }).catch(function (error) {
623
- if (error.response) {
624
- throw JSON.parse(error.response.data.message);
625
- }
626
- else {
627
- throw [];
628
- }
467
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
468
+ return Result.RunStampTaskResult.fromDict(data);
629
469
  });
630
470
  };
631
471
  Gs2DistributorRestClient.prototype.runStampSheet = function (request) {
@@ -643,17 +483,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
643
483
  'stampSheet': (_e = request.getStampSheet()) !== null && _e !== void 0 ? _e : null,
644
484
  'keyId': (_f = request.getKeyId()) !== null && _f !== void 0 ? _f : null,
645
485
  };
646
- return axios_1.default.post(url, body, {
647
- headers: headers,
648
- }).then(function (response) {
649
- return Result.RunStampSheetResult.fromDict(response.data);
650
- }).catch(function (error) {
651
- if (error.response) {
652
- throw JSON.parse(error.response.data.message);
653
- }
654
- else {
655
- throw [];
656
- }
486
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
487
+ return Result.RunStampSheetResult.fromDict(data);
657
488
  });
658
489
  };
659
490
  Gs2DistributorRestClient.prototype.runStampSheetExpress = function (request) {
@@ -671,17 +502,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
671
502
  'stampSheet': (_e = request.getStampSheet()) !== null && _e !== void 0 ? _e : null,
672
503
  'keyId': (_f = request.getKeyId()) !== null && _f !== void 0 ? _f : null,
673
504
  };
674
- return axios_1.default.post(url, body, {
675
- headers: headers,
676
- }).then(function (response) {
677
- return Result.RunStampSheetExpressResult.fromDict(response.data);
678
- }).catch(function (error) {
679
- if (error.response) {
680
- throw JSON.parse(error.response.data.message);
681
- }
682
- else {
683
- throw [];
684
- }
505
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
506
+ return Result.RunStampSheetExpressResult.fromDict(data);
685
507
  });
686
508
  };
687
509
  Gs2DistributorRestClient.prototype.runVerifyTaskWithoutNamespace = function (request) {
@@ -698,17 +520,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
698
520
  'verifyTask': (_c = request.getVerifyTask()) !== null && _c !== void 0 ? _c : null,
699
521
  'keyId': (_d = request.getKeyId()) !== null && _d !== void 0 ? _d : null,
700
522
  };
701
- return axios_1.default.post(url, body, {
702
- headers: headers,
703
- }).then(function (response) {
704
- return Result.RunVerifyTaskWithoutNamespaceResult.fromDict(response.data);
705
- }).catch(function (error) {
706
- if (error.response) {
707
- throw JSON.parse(error.response.data.message);
708
- }
709
- else {
710
- throw [];
711
- }
523
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
524
+ return Result.RunVerifyTaskWithoutNamespaceResult.fromDict(data);
712
525
  });
713
526
  };
714
527
  Gs2DistributorRestClient.prototype.runStampTaskWithoutNamespace = function (request) {
@@ -725,17 +538,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
725
538
  'stampTask': (_c = request.getStampTask()) !== null && _c !== void 0 ? _c : null,
726
539
  'keyId': (_d = request.getKeyId()) !== null && _d !== void 0 ? _d : null,
727
540
  };
728
- return axios_1.default.post(url, body, {
729
- headers: headers,
730
- }).then(function (response) {
731
- return Result.RunStampTaskWithoutNamespaceResult.fromDict(response.data);
732
- }).catch(function (error) {
733
- if (error.response) {
734
- throw JSON.parse(error.response.data.message);
735
- }
736
- else {
737
- throw [];
738
- }
541
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
542
+ return Result.RunStampTaskWithoutNamespaceResult.fromDict(data);
739
543
  });
740
544
  };
741
545
  Gs2DistributorRestClient.prototype.runStampSheetWithoutNamespace = function (request) {
@@ -752,17 +556,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
752
556
  'stampSheet': (_c = request.getStampSheet()) !== null && _c !== void 0 ? _c : null,
753
557
  'keyId': (_d = request.getKeyId()) !== null && _d !== void 0 ? _d : null,
754
558
  };
755
- return axios_1.default.post(url, body, {
756
- headers: headers,
757
- }).then(function (response) {
758
- return Result.RunStampSheetWithoutNamespaceResult.fromDict(response.data);
759
- }).catch(function (error) {
760
- if (error.response) {
761
- throw JSON.parse(error.response.data.message);
762
- }
763
- else {
764
- throw [];
765
- }
559
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
560
+ return Result.RunStampSheetWithoutNamespaceResult.fromDict(data);
766
561
  });
767
562
  };
768
563
  Gs2DistributorRestClient.prototype.runStampSheetExpressWithoutNamespace = function (request) {
@@ -779,17 +574,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
779
574
  'stampSheet': (_c = request.getStampSheet()) !== null && _c !== void 0 ? _c : null,
780
575
  'keyId': (_d = request.getKeyId()) !== null && _d !== void 0 ? _d : null,
781
576
  };
782
- return axios_1.default.post(url, body, {
783
- headers: headers,
784
- }).then(function (response) {
785
- return Result.RunStampSheetExpressWithoutNamespaceResult.fromDict(response.data);
786
- }).catch(function (error) {
787
- if (error.response) {
788
- throw JSON.parse(error.response.data.message);
789
- }
790
- else {
791
- throw [];
792
- }
577
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
578
+ return Result.RunStampSheetExpressWithoutNamespaceResult.fromDict(data);
793
579
  });
794
580
  };
795
581
  Gs2DistributorRestClient.prototype.setTransactionDefaultConfig = function (request) {
@@ -811,17 +597,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
811
597
  'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
812
598
  'config': (_f = (_e = request.getConfig()) === null || _e === void 0 ? void 0 : _e.map(function (item) { return item.toDict(); })) !== null && _f !== void 0 ? _f : null,
813
599
  };
814
- return axios_1.default.post(url, body, {
815
- headers: headers,
816
- }).then(function (response) {
817
- return Result.SetTransactionDefaultConfigResult.fromDict(response.data);
818
- }).catch(function (error) {
819
- if (error.response) {
820
- throw JSON.parse(error.response.data.message);
821
- }
822
- else {
823
- throw [];
824
- }
600
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
601
+ return Result.SetTransactionDefaultConfigResult.fromDict(data);
825
602
  });
826
603
  };
827
604
  Gs2DistributorRestClient.prototype.setTransactionDefaultConfigByUserId = function (request) {
@@ -844,17 +621,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
844
621
  'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
845
622
  'config': (_h = (_g = request.getConfig()) === null || _g === void 0 ? void 0 : _g.map(function (item) { return item.toDict(); })) !== null && _h !== void 0 ? _h : null,
846
623
  };
847
- return axios_1.default.post(url, body, {
848
- headers: headers,
849
- }).then(function (response) {
850
- return Result.SetTransactionDefaultConfigByUserIdResult.fromDict(response.data);
851
- }).catch(function (error) {
852
- if (error.response) {
853
- throw JSON.parse(error.response.data.message);
854
- }
855
- else {
856
- throw [];
857
- }
624
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
625
+ return Result.SetTransactionDefaultConfigByUserIdResult.fromDict(data);
858
626
  });
859
627
  };
860
628
  Gs2DistributorRestClient.prototype.freezeMasterData = function (request) {
@@ -873,17 +641,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
873
641
  var body = {
874
642
  'contextStack': (_e = request.getContextStack()) !== null && _e !== void 0 ? _e : null,
875
643
  };
876
- return axios_1.default.post(url, body, {
877
- headers: headers,
878
- }).then(function (response) {
879
- return Result.FreezeMasterDataResult.fromDict(response.data);
880
- }).catch(function (error) {
881
- if (error.response) {
882
- throw JSON.parse(error.response.data.message);
883
- }
884
- else {
885
- throw [];
886
- }
644
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
645
+ return Result.FreezeMasterDataResult.fromDict(data);
887
646
  });
888
647
  };
889
648
  Gs2DistributorRestClient.prototype.freezeMasterDataByUserId = function (request) {
@@ -903,17 +662,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
903
662
  var body = {
904
663
  'contextStack': (_g = request.getContextStack()) !== null && _g !== void 0 ? _g : null,
905
664
  };
906
- return axios_1.default.post(url, body, {
907
- headers: headers,
908
- }).then(function (response) {
909
- return Result.FreezeMasterDataByUserIdResult.fromDict(response.data);
910
- }).catch(function (error) {
911
- if (error.response) {
912
- throw JSON.parse(error.response.data.message);
913
- }
914
- else {
915
- throw [];
916
- }
665
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
666
+ return Result.FreezeMasterDataByUserIdResult.fromDict(data);
917
667
  });
918
668
  };
919
669
  Gs2DistributorRestClient.prototype.signFreezeMasterDataTimestamp = function (request) {
@@ -931,17 +681,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
931
681
  'timestamp': (_e = request.getTimestamp()) !== null && _e !== void 0 ? _e : null,
932
682
  'keyId': (_f = request.getKeyId()) !== null && _f !== void 0 ? _f : null,
933
683
  };
934
- return axios_1.default.post(url, body, {
935
- headers: headers,
936
- }).then(function (response) {
937
- return Result.SignFreezeMasterDataTimestampResult.fromDict(response.data);
938
- }).catch(function (error) {
939
- if (error.response) {
940
- throw JSON.parse(error.response.data.message);
941
- }
942
- else {
943
- throw [];
944
- }
684
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
685
+ return Result.SignFreezeMasterDataTimestampResult.fromDict(data);
945
686
  });
946
687
  };
947
688
  Gs2DistributorRestClient.prototype.freezeMasterDataBySignedTimestamp = function (request) {
@@ -963,17 +704,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
963
704
  'signature': (_g = request.getSignature()) !== null && _g !== void 0 ? _g : null,
964
705
  'keyId': (_h = request.getKeyId()) !== null && _h !== void 0 ? _h : null,
965
706
  };
966
- return axios_1.default.post(url, body, {
967
- headers: headers,
968
- }).then(function (response) {
969
- return Result.FreezeMasterDataBySignedTimestampResult.fromDict(response.data);
970
- }).catch(function (error) {
971
- if (error.response) {
972
- throw JSON.parse(error.response.data.message);
973
- }
974
- else {
975
- throw [];
976
- }
707
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
708
+ return Result.FreezeMasterDataBySignedTimestampResult.fromDict(data);
977
709
  });
978
710
  };
979
711
  Gs2DistributorRestClient.prototype.freezeMasterDataByTimestamp = function (request) {
@@ -993,17 +725,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
993
725
  'contextStack': (_e = request.getContextStack()) !== null && _e !== void 0 ? _e : null,
994
726
  'timestamp': (_f = request.getTimestamp()) !== null && _f !== void 0 ? _f : null,
995
727
  };
996
- return axios_1.default.post(url, body, {
997
- headers: headers,
998
- }).then(function (response) {
999
- return Result.FreezeMasterDataByTimestampResult.fromDict(response.data);
1000
- }).catch(function (error) {
1001
- if (error.response) {
1002
- throw JSON.parse(error.response.data.message);
1003
- }
1004
- else {
1005
- throw [];
1006
- }
728
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
729
+ return Result.FreezeMasterDataByTimestampResult.fromDict(data);
1007
730
  });
1008
731
  };
1009
732
  Gs2DistributorRestClient.prototype.batchExecuteApi = function (request) {
@@ -1019,17 +742,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1019
742
  'contextStack': (_b = request.getContextStack()) !== null && _b !== void 0 ? _b : null,
1020
743
  'requestPayloads': (_d = (_c = request.getRequestPayloads()) === null || _c === void 0 ? void 0 : _c.map(function (item) { return item.toDict(); })) !== null && _d !== void 0 ? _d : null,
1021
744
  };
1022
- return axios_1.default.post(url, body, {
1023
- headers: headers,
1024
- }).then(function (response) {
1025
- return Result.BatchExecuteApiResult.fromDict(response.data);
1026
- }).catch(function (error) {
1027
- if (error.response) {
1028
- throw JSON.parse(error.response.data.message);
1029
- }
1030
- else {
1031
- throw [];
1032
- }
745
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
746
+ return Result.BatchExecuteApiResult.fromDict(data);
1033
747
  });
1034
748
  };
1035
749
  Gs2DistributorRestClient.prototype.ifExpressionByUserId = function (request) {
@@ -1056,17 +770,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1056
770
  'falseActions': (_o = (_m = request.getFalseActions()) === null || _m === void 0 ? void 0 : _m.map(function (item) { return item.toDict(); })) !== null && _o !== void 0 ? _o : null,
1057
771
  'multiplyValueSpecifyingQuantity': (_p = request.getMultiplyValueSpecifyingQuantity()) !== null && _p !== void 0 ? _p : null,
1058
772
  };
1059
- return axios_1.default.post(url, body, {
1060
- headers: headers,
1061
- }).then(function (response) {
1062
- return Result.IfExpressionByUserIdResult.fromDict(response.data);
1063
- }).catch(function (error) {
1064
- if (error.response) {
1065
- throw JSON.parse(error.response.data.message);
1066
- }
1067
- else {
1068
- throw [];
1069
- }
773
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
774
+ return Result.IfExpressionByUserIdResult.fromDict(data);
1070
775
  });
1071
776
  };
1072
777
  Gs2DistributorRestClient.prototype.andExpressionByUserId = function (request) {
@@ -1090,17 +795,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1090
795
  'userId': (_g = request.getUserId()) !== null && _g !== void 0 ? _g : null,
1091
796
  'actions': (_j = (_h = request.getActions()) === null || _h === void 0 ? void 0 : _h.map(function (item) { return item.toDict(); })) !== null && _j !== void 0 ? _j : null,
1092
797
  };
1093
- return axios_1.default.post(url, body, {
1094
- headers: headers,
1095
- }).then(function (response) {
1096
- return Result.AndExpressionByUserIdResult.fromDict(response.data);
1097
- }).catch(function (error) {
1098
- if (error.response) {
1099
- throw JSON.parse(error.response.data.message);
1100
- }
1101
- else {
1102
- throw [];
1103
- }
798
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
799
+ return Result.AndExpressionByUserIdResult.fromDict(data);
1104
800
  });
1105
801
  };
1106
802
  Gs2DistributorRestClient.prototype.orExpressionByUserId = function (request) {
@@ -1124,17 +820,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1124
820
  'userId': (_g = request.getUserId()) !== null && _g !== void 0 ? _g : null,
1125
821
  'actions': (_j = (_h = request.getActions()) === null || _h === void 0 ? void 0 : _h.map(function (item) { return item.toDict(); })) !== null && _j !== void 0 ? _j : null,
1126
822
  };
1127
- return axios_1.default.post(url, body, {
1128
- headers: headers,
1129
- }).then(function (response) {
1130
- return Result.OrExpressionByUserIdResult.fromDict(response.data);
1131
- }).catch(function (error) {
1132
- if (error.response) {
1133
- throw JSON.parse(error.response.data.message);
1134
- }
1135
- else {
1136
- throw [];
1137
- }
823
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
824
+ return Result.OrExpressionByUserIdResult.fromDict(data);
1138
825
  });
1139
826
  };
1140
827
  Gs2DistributorRestClient.prototype.ifExpressionByStampTask = function (request) {
@@ -1151,17 +838,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1151
838
  'stampTask': (_c = request.getStampTask()) !== null && _c !== void 0 ? _c : null,
1152
839
  'keyId': (_d = request.getKeyId()) !== null && _d !== void 0 ? _d : null,
1153
840
  };
1154
- return axios_1.default.post(url, body, {
1155
- headers: headers,
1156
- }).then(function (response) {
1157
- return Result.IfExpressionByStampTaskResult.fromDict(response.data);
1158
- }).catch(function (error) {
1159
- if (error.response) {
1160
- throw JSON.parse(error.response.data.message);
1161
- }
1162
- else {
1163
- throw [];
1164
- }
841
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
842
+ return Result.IfExpressionByStampTaskResult.fromDict(data);
1165
843
  });
1166
844
  };
1167
845
  Gs2DistributorRestClient.prototype.andExpressionByStampTask = function (request) {
@@ -1178,17 +856,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1178
856
  'stampTask': (_c = request.getStampTask()) !== null && _c !== void 0 ? _c : null,
1179
857
  'keyId': (_d = request.getKeyId()) !== null && _d !== void 0 ? _d : null,
1180
858
  };
1181
- return axios_1.default.post(url, body, {
1182
- headers: headers,
1183
- }).then(function (response) {
1184
- return Result.AndExpressionByStampTaskResult.fromDict(response.data);
1185
- }).catch(function (error) {
1186
- if (error.response) {
1187
- throw JSON.parse(error.response.data.message);
1188
- }
1189
- else {
1190
- throw [];
1191
- }
859
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
860
+ return Result.AndExpressionByStampTaskResult.fromDict(data);
1192
861
  });
1193
862
  };
1194
863
  Gs2DistributorRestClient.prototype.orExpressionByStampTask = function (request) {
@@ -1205,17 +874,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1205
874
  'stampTask': (_c = request.getStampTask()) !== null && _c !== void 0 ? _c : null,
1206
875
  'keyId': (_d = request.getKeyId()) !== null && _d !== void 0 ? _d : null,
1207
876
  };
1208
- return axios_1.default.post(url, body, {
1209
- headers: headers,
1210
- }).then(function (response) {
1211
- return Result.OrExpressionByStampTaskResult.fromDict(response.data);
1212
- }).catch(function (error) {
1213
- if (error.response) {
1214
- throw JSON.parse(error.response.data.message);
1215
- }
1216
- else {
1217
- throw [];
1218
- }
877
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
878
+ return Result.OrExpressionByStampTaskResult.fromDict(data);
1219
879
  });
1220
880
  };
1221
881
  Gs2DistributorRestClient.prototype.getStampSheetResult = function (request) {
@@ -1235,13 +895,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1235
895
  var params = {
1236
896
  'contextStack': (_g = request.getContextStack()) !== null && _g !== void 0 ? _g : null,
1237
897
  };
1238
- return axios_1.default.get(url, {
1239
- params: params,
1240
- headers: headers,
1241
- }).then(function (response) {
1242
- return Result.GetStampSheetResultResult.fromDict(response.data);
1243
- }).catch(function (error) {
1244
- throw JSON.parse(error.response.data.message);
898
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
899
+ return Result.GetStampSheetResultResult.fromDict(data);
1245
900
  });
1246
901
  };
1247
902
  Gs2DistributorRestClient.prototype.getStampSheetResultByUserId = function (request) {
@@ -1262,13 +917,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1262
917
  var params = {
1263
918
  'contextStack': (_j = request.getContextStack()) !== null && _j !== void 0 ? _j : null,
1264
919
  };
1265
- return axios_1.default.get(url, {
1266
- params: params,
1267
- headers: headers,
1268
- }).then(function (response) {
1269
- return Result.GetStampSheetResultByUserIdResult.fromDict(response.data);
1270
- }).catch(function (error) {
1271
- throw JSON.parse(error.response.data.message);
920
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
921
+ return Result.GetStampSheetResultByUserIdResult.fromDict(data);
1272
922
  });
1273
923
  };
1274
924
  Gs2DistributorRestClient.prototype.runTransaction = function (request) {
@@ -1293,17 +943,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1293
943
  'contextStack': (_k = request.getContextStack()) !== null && _k !== void 0 ? _k : null,
1294
944
  'transaction': (_l = request.getTransaction()) !== null && _l !== void 0 ? _l : null,
1295
945
  };
1296
- return axios_1.default.post(url, body, {
1297
- headers: headers,
1298
- }).then(function (response) {
1299
- return Result.RunTransactionResult.fromDict(response.data);
1300
- }).catch(function (error) {
1301
- if (error.response) {
1302
- throw JSON.parse(error.response.data.message);
1303
- }
1304
- else {
1305
- throw [];
1306
- }
946
+ return this.request('POST', url, headers, undefined, body).then(function (data) {
947
+ return Result.RunTransactionResult.fromDict(data);
1307
948
  });
1308
949
  };
1309
950
  Gs2DistributorRestClient.prototype.getTransactionResult = function (request) {
@@ -1323,13 +964,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1323
964
  var params = {
1324
965
  'contextStack': (_g = request.getContextStack()) !== null && _g !== void 0 ? _g : null,
1325
966
  };
1326
- return axios_1.default.get(url, {
1327
- params: params,
1328
- headers: headers,
1329
- }).then(function (response) {
1330
- return Result.GetTransactionResultResult.fromDict(response.data);
1331
- }).catch(function (error) {
1332
- throw JSON.parse(error.response.data.message);
967
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
968
+ return Result.GetTransactionResultResult.fromDict(data);
1333
969
  });
1334
970
  };
1335
971
  Gs2DistributorRestClient.prototype.getTransactionResultByUserId = function (request) {
@@ -1350,13 +986,8 @@ var Gs2DistributorRestClient = /** @class */ (function (_super) {
1350
986
  var params = {
1351
987
  'contextStack': (_j = request.getContextStack()) !== null && _j !== void 0 ? _j : null,
1352
988
  };
1353
- return axios_1.default.get(url, {
1354
- params: params,
1355
- headers: headers,
1356
- }).then(function (response) {
1357
- return Result.GetTransactionResultByUserIdResult.fromDict(response.data);
1358
- }).catch(function (error) {
1359
- throw JSON.parse(error.response.data.message);
989
+ return this.request('GET', url, headers, params, undefined).then(function (data) {
990
+ return Result.GetTransactionResultByUserIdResult.fromDict(data);
1360
991
  });
1361
992
  };
1362
993
  Gs2DistributorRestClient.ENDPOINT_HOST = null;