gs2 1.4.110 → 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.
- 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 +1 -1
- 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/identifier/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 Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
24
23
|
tslib_1.__extends(Gs2IdentifierRestClient, _super);
|
|
25
24
|
function Gs2IdentifierRestClient(session) {
|
|
@@ -39,13 +38,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
39
38
|
'pageToken': String((_c = request.getPageToken()) !== null && _c !== void 0 ? _c : null),
|
|
40
39
|
'limit': String((_d = request.getLimit()) !== null && _d !== void 0 ? _d : null),
|
|
41
40
|
};
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
headers: headers,
|
|
45
|
-
}).then(function (response) {
|
|
46
|
-
return Result.DescribeUsersResult.fromDict(response.data);
|
|
47
|
-
}).catch(function (error) {
|
|
48
|
-
throw JSON.parse(error.response.data.message);
|
|
41
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
42
|
+
return Result.DescribeUsersResult.fromDict(data);
|
|
49
43
|
});
|
|
50
44
|
};
|
|
51
45
|
Gs2IdentifierRestClient.prototype.createUser = function (request) {
|
|
@@ -62,17 +56,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
62
56
|
'name': (_c = request.getName()) !== null && _c !== void 0 ? _c : null,
|
|
63
57
|
'description': (_d = request.getDescription()) !== null && _d !== void 0 ? _d : null,
|
|
64
58
|
};
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
}).then(function (response) {
|
|
68
|
-
return Result.CreateUserResult.fromDict(response.data);
|
|
69
|
-
}).catch(function (error) {
|
|
70
|
-
if (error.response) {
|
|
71
|
-
throw JSON.parse(error.response.data.message);
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
throw [];
|
|
75
|
-
}
|
|
59
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
60
|
+
return Result.CreateUserResult.fromDict(data);
|
|
76
61
|
});
|
|
77
62
|
};
|
|
78
63
|
Gs2IdentifierRestClient.prototype.updateUser = function (request) {
|
|
@@ -89,17 +74,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
89
74
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
90
75
|
'description': (_e = request.getDescription()) !== null && _e !== void 0 ? _e : null,
|
|
91
76
|
};
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
}).then(function (response) {
|
|
95
|
-
return Result.UpdateUserResult.fromDict(response.data);
|
|
96
|
-
}).catch(function (error) {
|
|
97
|
-
if (error.response) {
|
|
98
|
-
throw JSON.parse(error.response.data.message);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
throw [];
|
|
102
|
-
}
|
|
77
|
+
return this.request('PUT', url, headers, undefined, body).then(function (data) {
|
|
78
|
+
return Result.UpdateUserResult.fromDict(data);
|
|
103
79
|
});
|
|
104
80
|
};
|
|
105
81
|
Gs2IdentifierRestClient.prototype.getUser = function (request) {
|
|
@@ -115,13 +91,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
115
91
|
var params = {
|
|
116
92
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
117
93
|
};
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
headers: headers,
|
|
121
|
-
}).then(function (response) {
|
|
122
|
-
return Result.GetUserResult.fromDict(response.data);
|
|
123
|
-
}).catch(function (error) {
|
|
124
|
-
throw JSON.parse(error.response.data.message);
|
|
94
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
95
|
+
return Result.GetUserResult.fromDict(data);
|
|
125
96
|
});
|
|
126
97
|
};
|
|
127
98
|
Gs2IdentifierRestClient.prototype.deleteUser = function (request) {
|
|
@@ -137,13 +108,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
137
108
|
var params = {
|
|
138
109
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
139
110
|
};
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
headers: headers,
|
|
143
|
-
}).then(function (response) {
|
|
144
|
-
return Result.DeleteUserResult.fromDict(response.data);
|
|
145
|
-
}).catch(function (error) {
|
|
146
|
-
throw JSON.parse(error.response.data.message);
|
|
111
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
112
|
+
return Result.DeleteUserResult.fromDict(data);
|
|
147
113
|
});
|
|
148
114
|
};
|
|
149
115
|
Gs2IdentifierRestClient.prototype.describeSecurityPolicies = function (request) {
|
|
@@ -160,13 +126,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
160
126
|
'pageToken': String((_c = request.getPageToken()) !== null && _c !== void 0 ? _c : null),
|
|
161
127
|
'limit': String((_d = request.getLimit()) !== null && _d !== void 0 ? _d : null),
|
|
162
128
|
};
|
|
163
|
-
return
|
|
164
|
-
|
|
165
|
-
headers: headers,
|
|
166
|
-
}).then(function (response) {
|
|
167
|
-
return Result.DescribeSecurityPoliciesResult.fromDict(response.data);
|
|
168
|
-
}).catch(function (error) {
|
|
169
|
-
throw JSON.parse(error.response.data.message);
|
|
129
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
130
|
+
return Result.DescribeSecurityPoliciesResult.fromDict(data);
|
|
170
131
|
});
|
|
171
132
|
};
|
|
172
133
|
Gs2IdentifierRestClient.prototype.describeCommonSecurityPolicies = function (request) {
|
|
@@ -183,13 +144,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
183
144
|
'pageToken': String((_c = request.getPageToken()) !== null && _c !== void 0 ? _c : null),
|
|
184
145
|
'limit': String((_d = request.getLimit()) !== null && _d !== void 0 ? _d : null),
|
|
185
146
|
};
|
|
186
|
-
return
|
|
187
|
-
|
|
188
|
-
headers: headers,
|
|
189
|
-
}).then(function (response) {
|
|
190
|
-
return Result.DescribeCommonSecurityPoliciesResult.fromDict(response.data);
|
|
191
|
-
}).catch(function (error) {
|
|
192
|
-
throw JSON.parse(error.response.data.message);
|
|
147
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
148
|
+
return Result.DescribeCommonSecurityPoliciesResult.fromDict(data);
|
|
193
149
|
});
|
|
194
150
|
};
|
|
195
151
|
Gs2IdentifierRestClient.prototype.createSecurityPolicy = function (request) {
|
|
@@ -207,17 +163,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
207
163
|
'description': (_d = request.getDescription()) !== null && _d !== void 0 ? _d : null,
|
|
208
164
|
'policy': (_e = request.getPolicy()) !== null && _e !== void 0 ? _e : null,
|
|
209
165
|
};
|
|
210
|
-
return
|
|
211
|
-
|
|
212
|
-
}).then(function (response) {
|
|
213
|
-
return Result.CreateSecurityPolicyResult.fromDict(response.data);
|
|
214
|
-
}).catch(function (error) {
|
|
215
|
-
if (error.response) {
|
|
216
|
-
throw JSON.parse(error.response.data.message);
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
throw [];
|
|
220
|
-
}
|
|
166
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
167
|
+
return Result.CreateSecurityPolicyResult.fromDict(data);
|
|
221
168
|
});
|
|
222
169
|
};
|
|
223
170
|
Gs2IdentifierRestClient.prototype.updateSecurityPolicy = function (request) {
|
|
@@ -235,17 +182,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
235
182
|
'description': (_e = request.getDescription()) !== null && _e !== void 0 ? _e : null,
|
|
236
183
|
'policy': (_f = request.getPolicy()) !== null && _f !== void 0 ? _f : null,
|
|
237
184
|
};
|
|
238
|
-
return
|
|
239
|
-
|
|
240
|
-
}).then(function (response) {
|
|
241
|
-
return Result.UpdateSecurityPolicyResult.fromDict(response.data);
|
|
242
|
-
}).catch(function (error) {
|
|
243
|
-
if (error.response) {
|
|
244
|
-
throw JSON.parse(error.response.data.message);
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
throw [];
|
|
248
|
-
}
|
|
185
|
+
return this.request('PUT', url, headers, undefined, body).then(function (data) {
|
|
186
|
+
return Result.UpdateSecurityPolicyResult.fromDict(data);
|
|
249
187
|
});
|
|
250
188
|
};
|
|
251
189
|
Gs2IdentifierRestClient.prototype.getSecurityPolicy = function (request) {
|
|
@@ -261,13 +199,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
261
199
|
var params = {
|
|
262
200
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
263
201
|
};
|
|
264
|
-
return
|
|
265
|
-
|
|
266
|
-
headers: headers,
|
|
267
|
-
}).then(function (response) {
|
|
268
|
-
return Result.GetSecurityPolicyResult.fromDict(response.data);
|
|
269
|
-
}).catch(function (error) {
|
|
270
|
-
throw JSON.parse(error.response.data.message);
|
|
202
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
203
|
+
return Result.GetSecurityPolicyResult.fromDict(data);
|
|
271
204
|
});
|
|
272
205
|
};
|
|
273
206
|
Gs2IdentifierRestClient.prototype.deleteSecurityPolicy = function (request) {
|
|
@@ -283,13 +216,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
283
216
|
var params = {
|
|
284
217
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
285
218
|
};
|
|
286
|
-
return
|
|
287
|
-
|
|
288
|
-
headers: headers,
|
|
289
|
-
}).then(function (response) {
|
|
290
|
-
return Result.DeleteSecurityPolicyResult.fromDict(response.data);
|
|
291
|
-
}).catch(function (error) {
|
|
292
|
-
throw JSON.parse(error.response.data.message);
|
|
219
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
220
|
+
return Result.DeleteSecurityPolicyResult.fromDict(data);
|
|
293
221
|
});
|
|
294
222
|
};
|
|
295
223
|
Gs2IdentifierRestClient.prototype.describeIdentifiers = function (request) {
|
|
@@ -307,13 +235,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
307
235
|
'pageToken': String((_e = request.getPageToken()) !== null && _e !== void 0 ? _e : null),
|
|
308
236
|
'limit': String((_f = request.getLimit()) !== null && _f !== void 0 ? _f : null),
|
|
309
237
|
};
|
|
310
|
-
return
|
|
311
|
-
|
|
312
|
-
headers: headers,
|
|
313
|
-
}).then(function (response) {
|
|
314
|
-
return Result.DescribeIdentifiersResult.fromDict(response.data);
|
|
315
|
-
}).catch(function (error) {
|
|
316
|
-
throw JSON.parse(error.response.data.message);
|
|
238
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
239
|
+
return Result.DescribeIdentifiersResult.fromDict(data);
|
|
317
240
|
});
|
|
318
241
|
};
|
|
319
242
|
Gs2IdentifierRestClient.prototype.createIdentifier = function (request) {
|
|
@@ -329,17 +252,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
329
252
|
var body = {
|
|
330
253
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
331
254
|
};
|
|
332
|
-
return
|
|
333
|
-
|
|
334
|
-
}).then(function (response) {
|
|
335
|
-
return Result.CreateIdentifierResult.fromDict(response.data);
|
|
336
|
-
}).catch(function (error) {
|
|
337
|
-
if (error.response) {
|
|
338
|
-
throw JSON.parse(error.response.data.message);
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
throw [];
|
|
342
|
-
}
|
|
255
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
256
|
+
return Result.CreateIdentifierResult.fromDict(data);
|
|
343
257
|
});
|
|
344
258
|
};
|
|
345
259
|
Gs2IdentifierRestClient.prototype.getIdentifier = function (request) {
|
|
@@ -356,13 +270,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
356
270
|
var params = {
|
|
357
271
|
'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
|
|
358
272
|
};
|
|
359
|
-
return
|
|
360
|
-
|
|
361
|
-
headers: headers,
|
|
362
|
-
}).then(function (response) {
|
|
363
|
-
return Result.GetIdentifierResult.fromDict(response.data);
|
|
364
|
-
}).catch(function (error) {
|
|
365
|
-
throw JSON.parse(error.response.data.message);
|
|
273
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
274
|
+
return Result.GetIdentifierResult.fromDict(data);
|
|
366
275
|
});
|
|
367
276
|
};
|
|
368
277
|
Gs2IdentifierRestClient.prototype.deleteIdentifier = function (request) {
|
|
@@ -379,13 +288,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
379
288
|
var params = {
|
|
380
289
|
'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
|
|
381
290
|
};
|
|
382
|
-
return
|
|
383
|
-
|
|
384
|
-
headers: headers,
|
|
385
|
-
}).then(function (response) {
|
|
386
|
-
return Result.DeleteIdentifierResult.fromDict(response.data);
|
|
387
|
-
}).catch(function (error) {
|
|
388
|
-
throw JSON.parse(error.response.data.message);
|
|
291
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
292
|
+
return Result.DeleteIdentifierResult.fromDict(data);
|
|
389
293
|
});
|
|
390
294
|
};
|
|
391
295
|
Gs2IdentifierRestClient.prototype.describeAttachedGuards = function (request) {
|
|
@@ -402,13 +306,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
402
306
|
var params = {
|
|
403
307
|
'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
|
|
404
308
|
};
|
|
405
|
-
return
|
|
406
|
-
|
|
407
|
-
headers: headers,
|
|
408
|
-
}).then(function (response) {
|
|
409
|
-
return Result.DescribeAttachedGuardsResult.fromDict(response.data);
|
|
410
|
-
}).catch(function (error) {
|
|
411
|
-
throw JSON.parse(error.response.data.message);
|
|
309
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
310
|
+
return Result.DescribeAttachedGuardsResult.fromDict(data);
|
|
412
311
|
});
|
|
413
312
|
};
|
|
414
313
|
Gs2IdentifierRestClient.prototype.attachGuard = function (request) {
|
|
@@ -426,17 +325,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
426
325
|
'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
|
|
427
326
|
'guardNamespaceId': (_g = request.getGuardNamespaceId()) !== null && _g !== void 0 ? _g : null,
|
|
428
327
|
};
|
|
429
|
-
return
|
|
430
|
-
|
|
431
|
-
}).then(function (response) {
|
|
432
|
-
return Result.AttachGuardResult.fromDict(response.data);
|
|
433
|
-
}).catch(function (error) {
|
|
434
|
-
if (error.response) {
|
|
435
|
-
throw JSON.parse(error.response.data.message);
|
|
436
|
-
}
|
|
437
|
-
else {
|
|
438
|
-
throw [];
|
|
439
|
-
}
|
|
328
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
329
|
+
return Result.AttachGuardResult.fromDict(data);
|
|
440
330
|
});
|
|
441
331
|
};
|
|
442
332
|
Gs2IdentifierRestClient.prototype.detachGuard = function (request) {
|
|
@@ -454,13 +344,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
454
344
|
var params = {
|
|
455
345
|
'contextStack': (_h = request.getContextStack()) !== null && _h !== void 0 ? _h : null,
|
|
456
346
|
};
|
|
457
|
-
return
|
|
458
|
-
|
|
459
|
-
headers: headers,
|
|
460
|
-
}).then(function (response) {
|
|
461
|
-
return Result.DetachGuardResult.fromDict(response.data);
|
|
462
|
-
}).catch(function (error) {
|
|
463
|
-
throw JSON.parse(error.response.data.message);
|
|
347
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
348
|
+
return Result.DetachGuardResult.fromDict(data);
|
|
464
349
|
});
|
|
465
350
|
};
|
|
466
351
|
Gs2IdentifierRestClient.prototype.getServiceVersion = function (request) {
|
|
@@ -475,13 +360,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
475
360
|
var params = {
|
|
476
361
|
'contextStack': (_b = request.getContextStack()) !== null && _b !== void 0 ? _b : null,
|
|
477
362
|
};
|
|
478
|
-
return
|
|
479
|
-
|
|
480
|
-
headers: headers,
|
|
481
|
-
}).then(function (response) {
|
|
482
|
-
return Result.GetServiceVersionResult.fromDict(response.data);
|
|
483
|
-
}).catch(function (error) {
|
|
484
|
-
throw JSON.parse(error.response.data.message);
|
|
363
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
364
|
+
return Result.GetServiceVersionResult.fromDict(data);
|
|
485
365
|
});
|
|
486
366
|
};
|
|
487
367
|
Gs2IdentifierRestClient.prototype.createPassword = function (request) {
|
|
@@ -498,17 +378,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
498
378
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
499
379
|
'password': (_e = request.getPassword()) !== null && _e !== void 0 ? _e : null,
|
|
500
380
|
};
|
|
501
|
-
return
|
|
502
|
-
|
|
503
|
-
}).then(function (response) {
|
|
504
|
-
return Result.CreatePasswordResult.fromDict(response.data);
|
|
505
|
-
}).catch(function (error) {
|
|
506
|
-
if (error.response) {
|
|
507
|
-
throw JSON.parse(error.response.data.message);
|
|
508
|
-
}
|
|
509
|
-
else {
|
|
510
|
-
throw [];
|
|
511
|
-
}
|
|
381
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
382
|
+
return Result.CreatePasswordResult.fromDict(data);
|
|
512
383
|
});
|
|
513
384
|
};
|
|
514
385
|
Gs2IdentifierRestClient.prototype.getPassword = function (request) {
|
|
@@ -524,13 +395,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
524
395
|
var params = {
|
|
525
396
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
526
397
|
};
|
|
527
|
-
return
|
|
528
|
-
|
|
529
|
-
headers: headers,
|
|
530
|
-
}).then(function (response) {
|
|
531
|
-
return Result.GetPasswordResult.fromDict(response.data);
|
|
532
|
-
}).catch(function (error) {
|
|
533
|
-
throw JSON.parse(error.response.data.message);
|
|
398
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
399
|
+
return Result.GetPasswordResult.fromDict(data);
|
|
534
400
|
});
|
|
535
401
|
};
|
|
536
402
|
Gs2IdentifierRestClient.prototype.enableMfa = function (request) {
|
|
@@ -546,17 +412,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
546
412
|
var body = {
|
|
547
413
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
548
414
|
};
|
|
549
|
-
return
|
|
550
|
-
|
|
551
|
-
}).then(function (response) {
|
|
552
|
-
return Result.EnableMfaResult.fromDict(response.data);
|
|
553
|
-
}).catch(function (error) {
|
|
554
|
-
if (error.response) {
|
|
555
|
-
throw JSON.parse(error.response.data.message);
|
|
556
|
-
}
|
|
557
|
-
else {
|
|
558
|
-
throw [];
|
|
559
|
-
}
|
|
415
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
416
|
+
return Result.EnableMfaResult.fromDict(data);
|
|
560
417
|
});
|
|
561
418
|
};
|
|
562
419
|
Gs2IdentifierRestClient.prototype.challengeMfa = function (request) {
|
|
@@ -573,17 +430,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
573
430
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
574
431
|
'passcode': (_e = request.getPasscode()) !== null && _e !== void 0 ? _e : null,
|
|
575
432
|
};
|
|
576
|
-
return
|
|
577
|
-
|
|
578
|
-
}).then(function (response) {
|
|
579
|
-
return Result.ChallengeMfaResult.fromDict(response.data);
|
|
580
|
-
}).catch(function (error) {
|
|
581
|
-
if (error.response) {
|
|
582
|
-
throw JSON.parse(error.response.data.message);
|
|
583
|
-
}
|
|
584
|
-
else {
|
|
585
|
-
throw [];
|
|
586
|
-
}
|
|
433
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
434
|
+
return Result.ChallengeMfaResult.fromDict(data);
|
|
587
435
|
});
|
|
588
436
|
};
|
|
589
437
|
Gs2IdentifierRestClient.prototype.disableMfa = function (request) {
|
|
@@ -599,13 +447,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
599
447
|
var params = {
|
|
600
448
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
601
449
|
};
|
|
602
|
-
return
|
|
603
|
-
|
|
604
|
-
headers: headers,
|
|
605
|
-
}).then(function (response) {
|
|
606
|
-
return Result.DisableMfaResult.fromDict(response.data);
|
|
607
|
-
}).catch(function (error) {
|
|
608
|
-
throw JSON.parse(error.response.data.message);
|
|
450
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
451
|
+
return Result.DisableMfaResult.fromDict(data);
|
|
609
452
|
});
|
|
610
453
|
};
|
|
611
454
|
Gs2IdentifierRestClient.prototype.deletePassword = function (request) {
|
|
@@ -621,13 +464,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
621
464
|
var params = {
|
|
622
465
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
623
466
|
};
|
|
624
|
-
return
|
|
625
|
-
|
|
626
|
-
headers: headers,
|
|
627
|
-
}).then(function (response) {
|
|
628
|
-
return Result.DeletePasswordResult.fromDict(response.data);
|
|
629
|
-
}).catch(function (error) {
|
|
630
|
-
throw JSON.parse(error.response.data.message);
|
|
467
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
468
|
+
return Result.DeletePasswordResult.fromDict(data);
|
|
631
469
|
});
|
|
632
470
|
};
|
|
633
471
|
Gs2IdentifierRestClient.prototype.getHasSecurityPolicy = function (request) {
|
|
@@ -643,13 +481,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
643
481
|
var params = {
|
|
644
482
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
645
483
|
};
|
|
646
|
-
return
|
|
647
|
-
|
|
648
|
-
headers: headers,
|
|
649
|
-
}).then(function (response) {
|
|
650
|
-
return Result.GetHasSecurityPolicyResult.fromDict(response.data);
|
|
651
|
-
}).catch(function (error) {
|
|
652
|
-
throw JSON.parse(error.response.data.message);
|
|
484
|
+
return this.request('GET', url, headers, params, undefined).then(function (data) {
|
|
485
|
+
return Result.GetHasSecurityPolicyResult.fromDict(data);
|
|
653
486
|
});
|
|
654
487
|
};
|
|
655
488
|
Gs2IdentifierRestClient.prototype.attachSecurityPolicy = function (request) {
|
|
@@ -666,17 +499,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
666
499
|
'contextStack': (_d = request.getContextStack()) !== null && _d !== void 0 ? _d : null,
|
|
667
500
|
'securityPolicyId': (_e = request.getSecurityPolicyId()) !== null && _e !== void 0 ? _e : null,
|
|
668
501
|
};
|
|
669
|
-
return
|
|
670
|
-
|
|
671
|
-
}).then(function (response) {
|
|
672
|
-
return Result.AttachSecurityPolicyResult.fromDict(response.data);
|
|
673
|
-
}).catch(function (error) {
|
|
674
|
-
if (error.response) {
|
|
675
|
-
throw JSON.parse(error.response.data.message);
|
|
676
|
-
}
|
|
677
|
-
else {
|
|
678
|
-
throw [];
|
|
679
|
-
}
|
|
502
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
503
|
+
return Result.AttachSecurityPolicyResult.fromDict(data);
|
|
680
504
|
});
|
|
681
505
|
};
|
|
682
506
|
Gs2IdentifierRestClient.prototype.detachSecurityPolicy = function (request) {
|
|
@@ -693,13 +517,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
693
517
|
var params = {
|
|
694
518
|
'contextStack': (_f = request.getContextStack()) !== null && _f !== void 0 ? _f : null,
|
|
695
519
|
};
|
|
696
|
-
return
|
|
697
|
-
|
|
698
|
-
headers: headers,
|
|
699
|
-
}).then(function (response) {
|
|
700
|
-
return Result.DetachSecurityPolicyResult.fromDict(response.data);
|
|
701
|
-
}).catch(function (error) {
|
|
702
|
-
throw JSON.parse(error.response.data.message);
|
|
520
|
+
return this.request('DELETE', url, headers, params, undefined).then(function (data) {
|
|
521
|
+
return Result.DetachSecurityPolicyResult.fromDict(data);
|
|
703
522
|
});
|
|
704
523
|
};
|
|
705
524
|
Gs2IdentifierRestClient.prototype.login = function (request) {
|
|
@@ -716,17 +535,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
716
535
|
'client_id': (_c = request.getClientId()) !== null && _c !== void 0 ? _c : null,
|
|
717
536
|
'client_secret': (_d = request.getClientSecret()) !== null && _d !== void 0 ? _d : null,
|
|
718
537
|
};
|
|
719
|
-
return
|
|
720
|
-
|
|
721
|
-
}).then(function (response) {
|
|
722
|
-
return Result.LoginResult.fromDict(response.data);
|
|
723
|
-
}).catch(function (error) {
|
|
724
|
-
if (error.response) {
|
|
725
|
-
throw JSON.parse(error.response.data.message);
|
|
726
|
-
}
|
|
727
|
-
else {
|
|
728
|
-
throw [];
|
|
729
|
-
}
|
|
538
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
539
|
+
return Result.LoginResult.fromDict(data);
|
|
730
540
|
});
|
|
731
541
|
};
|
|
732
542
|
Gs2IdentifierRestClient.prototype.loginByUser = function (request) {
|
|
@@ -744,17 +554,8 @@ var Gs2IdentifierRestClient = /** @class */ (function (_super) {
|
|
|
744
554
|
'password': (_d = request.getPassword()) !== null && _d !== void 0 ? _d : null,
|
|
745
555
|
'otp': (_e = request.getOtp()) !== null && _e !== void 0 ? _e : null,
|
|
746
556
|
};
|
|
747
|
-
return
|
|
748
|
-
|
|
749
|
-
}).then(function (response) {
|
|
750
|
-
return Result.LoginByUserResult.fromDict(response.data);
|
|
751
|
-
}).catch(function (error) {
|
|
752
|
-
if (error.response) {
|
|
753
|
-
throw JSON.parse(error.response.data.message);
|
|
754
|
-
}
|
|
755
|
-
else {
|
|
756
|
-
throw [];
|
|
757
|
-
}
|
|
557
|
+
return this.request('POST', url, headers, undefined, body).then(function (data) {
|
|
558
|
+
return Result.LoginByUserResult.fromDict(data);
|
|
758
559
|
});
|
|
759
560
|
};
|
|
760
561
|
Gs2IdentifierRestClient.ENDPOINT_HOST = null;
|