@randock/nameshift-api-client 0.0.383 → 0.0.384

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 (66) hide show
  1. package/.openapi-generator/FILES +13 -0
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +54 -1
  4. package/dist/apis/AdminApi.js +263 -0
  5. package/dist/apis/ChallengesApi.d.ts +46 -0
  6. package/dist/apis/ChallengesApi.js +234 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/models/AccountChallengeRewardUsageListItemDto.d.ts +63 -0
  10. package/dist/models/AccountChallengeRewardUsageListItemDto.js +72 -0
  11. package/dist/models/AccountChallengeRewardUsageListItemDtoMetadata.d.ts +32 -0
  12. package/dist/models/AccountChallengeRewardUsageListItemDtoMetadata.js +49 -0
  13. package/dist/models/AccountDto.d.ts +7 -0
  14. package/dist/models/AccountDto.js +5 -0
  15. package/dist/models/AccountMetricsDto.d.ts +6 -0
  16. package/dist/models/AccountMetricsDto.js +4 -0
  17. package/dist/models/AdminChallengeListDto.d.ts +33 -0
  18. package/dist/models/AdminChallengeListDto.js +52 -0
  19. package/dist/models/AdminChallengeListItemDto.d.ts +125 -0
  20. package/dist/models/AdminChallengeListItemDto.js +125 -0
  21. package/dist/models/AdminListAccountDto.d.ts +7 -0
  22. package/dist/models/AdminListAccountDto.js +5 -0
  23. package/dist/models/ChallengeRewardBalanceDto.d.ts +38 -0
  24. package/dist/models/ChallengeRewardBalanceDto.js +55 -0
  25. package/dist/models/CreateChallengeInput.d.ts +67 -0
  26. package/dist/models/CreateChallengeInput.js +80 -0
  27. package/dist/models/GetAccountChallengeRewardUsagesListDto.d.ts +33 -0
  28. package/dist/models/GetAccountChallengeRewardUsagesListDto.js +52 -0
  29. package/dist/models/GetSellerChallengesListDto.d.ts +33 -0
  30. package/dist/models/GetSellerChallengesListDto.js +52 -0
  31. package/dist/models/GetSellerChallengesListDtoChallengesInner.d.ts +27 -0
  32. package/dist/models/GetSellerChallengesListDtoChallengesInner.js +54 -0
  33. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +9 -0
  34. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +8 -1
  35. package/dist/models/PrivateAccountGetMeResponse.d.ts +9 -0
  36. package/dist/models/PrivateAccountGetMeResponse.js +8 -1
  37. package/dist/models/SellerScaleChallengeListItemDto.d.ts +148 -0
  38. package/dist/models/SellerScaleChallengeListItemDto.js +142 -0
  39. package/dist/models/SellerTargetChallengeListItemDto.d.ts +154 -0
  40. package/dist/models/SellerTargetChallengeListItemDto.js +146 -0
  41. package/dist/models/UpdateChallengeInput.d.ts +44 -0
  42. package/dist/models/UpdateChallengeInput.js +53 -0
  43. package/dist/models/index.d.ts +12 -0
  44. package/dist/models/index.js +12 -0
  45. package/package.json +1 -1
  46. package/src/apis/AdminApi.ts +240 -0
  47. package/src/apis/ChallengesApi.ts +156 -0
  48. package/src/apis/index.ts +1 -0
  49. package/src/models/AccountChallengeRewardUsageListItemDto.ts +119 -0
  50. package/src/models/AccountChallengeRewardUsageListItemDtoMetadata.ts +65 -0
  51. package/src/models/AccountDto.ts +16 -0
  52. package/src/models/AccountMetricsDto.ts +9 -0
  53. package/src/models/AdminChallengeListDto.ts +74 -0
  54. package/src/models/AdminChallengeListItemDto.ts +185 -0
  55. package/src/models/AdminListAccountDto.ts +16 -0
  56. package/src/models/ChallengeRewardBalanceDto.ts +75 -0
  57. package/src/models/CreateChallengeInput.ts +109 -0
  58. package/src/models/GetAccountChallengeRewardUsagesListDto.ts +74 -0
  59. package/src/models/GetSellerChallengesListDto.ts +74 -0
  60. package/src/models/GetSellerChallengesListDtoChallengesInner.ts +73 -0
  61. package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +19 -1
  62. package/src/models/PrivateAccountGetMeResponse.ts +19 -1
  63. package/src/models/SellerScaleChallengeListItemDto.ts +221 -0
  64. package/src/models/SellerTargetChallengeListItemDto.ts +230 -0
  65. package/src/models/UpdateChallengeInput.ts +81 -0
  66. package/src/models/index.ts +12 -0
@@ -11,6 +11,7 @@ src/apis/AuctionsPublicApi.ts
11
11
  src/apis/BankAccountsApi.ts
12
12
  src/apis/BuyersApi.ts
13
13
  src/apis/BuyersPublicApi.ts
14
+ src/apis/ChallengesApi.ts
14
15
  src/apis/DomainTransfersApi.ts
15
16
  src/apis/DomainsApi.ts
16
17
  src/apis/DomainsPublicApi.ts
@@ -37,6 +38,8 @@ src/models/AccountAliasDto.ts
37
38
  src/models/AccountAliasInput.ts
38
39
  src/models/AccountBankAccountDto.ts
39
40
  src/models/AccountBankAccountDtoDetails.ts
41
+ src/models/AccountChallengeRewardUsageListItemDto.ts
42
+ src/models/AccountChallengeRewardUsageListItemDtoMetadata.ts
40
43
  src/models/AccountCommissionByDateRangeDto.ts
41
44
  src/models/AccountCountryStatsDto.ts
42
45
  src/models/AccountDto.ts
@@ -77,6 +80,8 @@ src/models/AdminAuctionCommissionByDateRangeInput.ts
77
80
  src/models/AdminAuctionConfigurationInput.ts
78
81
  src/models/AdminBankAccountDto.ts
79
82
  src/models/AdminBuyerLoginDto.ts
83
+ src/models/AdminChallengeListDto.ts
84
+ src/models/AdminChallengeListItemDto.ts
80
85
  src/models/AdminCompanyStatsDto.ts
81
86
  src/models/AdminCompanyStatsLedger.ts
82
87
  src/models/AdminDashboardStatsDto.ts
@@ -147,6 +152,7 @@ src/models/BuyerSubscriptionListItemDto.ts
147
152
  src/models/BuyerSubscriptionListItemDtoDomainInformation.ts
148
153
  src/models/BuyerTaskDetailsDto.ts
149
154
  src/models/CaBankAccountDetails.ts
155
+ src/models/ChallengeRewardBalanceDto.ts
150
156
  src/models/ChangeOrderStatusInput.ts
151
157
  src/models/ChangeSubscriptionStatusInput.ts
152
158
  src/models/ChartDataPoint.ts
@@ -176,6 +182,7 @@ src/models/CreateAccountPaymentInput.ts
176
182
  src/models/CreateAccountPaymentManualTransactionInput.ts
177
183
  src/models/CreateBankAccountInput.ts
178
184
  src/models/CreateBuyerLeadMessageInput.ts
185
+ src/models/CreateChallengeInput.ts
179
186
  src/models/CreateLeadInput.ts
180
187
  src/models/CreateLeadMessageInput.ts
181
188
  src/models/CreateManualLeadInput.ts
@@ -230,6 +237,7 @@ src/models/FixedCommissionPayloadDto.ts
230
237
  src/models/FixedCommissionPayloadInput.ts
231
238
  src/models/FixedCommissionReasonPayloadDto.ts
232
239
  src/models/ForgotPasswordRequestInput.ts
240
+ src/models/GetAccountChallengeRewardUsagesListDto.ts
233
241
  src/models/GetAccountNameshiftCommissionsResponseDto.ts
234
242
  src/models/GetAllAffiliateCommissions200Response.ts
235
243
  src/models/GetAllAuctions200Response.ts
@@ -247,6 +255,8 @@ src/models/GetBuyerLeads200Response.ts
247
255
  src/models/GetBuyerSubscriptions200Response.ts
248
256
  src/models/GetBuyerTransfers200Response.ts
249
257
  src/models/GetInvoices200Response.ts
258
+ src/models/GetSellerChallengesListDto.ts
259
+ src/models/GetSellerChallengesListDtoChallengesInner.ts
250
260
  src/models/HistoricalMetrics.ts
251
261
  src/models/HttpException.ts
252
262
  src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts
@@ -390,10 +400,12 @@ src/models/SellerLeadDetails.ts
390
400
  src/models/SellerPendingPayoutsByCurrencyStatsItemDto.ts
391
401
  src/models/SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto.ts
392
402
  src/models/SellerSalesCountStatsItemDto.ts
403
+ src/models/SellerScaleChallengeListItemDto.ts
393
404
  src/models/SellerSecurityUserAccountDto.ts
394
405
  src/models/SellerSecurityUserDto.ts
395
406
  src/models/SellerSubscriptionListItemDto.ts
396
407
  src/models/SellerSubscriptionListItemDtoDomainInformation.ts
408
+ src/models/SellerTargetChallengeListItemDto.ts
397
409
  src/models/SellerTotalEarningsByCurrencyOverTimeStatsItemDto.ts
398
410
  src/models/SellerTotalEarningsByCurrencyStatsItemDto.ts
399
411
  src/models/SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto.ts
@@ -441,6 +453,7 @@ src/models/UpdateAccountBillingInformationInput.ts
441
453
  src/models/UpdateAuctionMuteStatusInput.ts
442
454
  src/models/UpdateBuyerDomainTransferIpsTagInputDto.ts
443
455
  src/models/UpdateBuyerNotificationSettingsInput.ts
456
+ src/models/UpdateChallengeInput.ts
444
457
  src/models/UpdateDomainInput.ts
445
458
  src/models/UpdateDomainTransferAuthCodeInput.ts
446
459
  src/models/UpdateDomainTransferIpsTagInput.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.383
1
+ ## @randock/nameshift-api-client@0.0.384
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @randock/nameshift-api-client@0.0.383 --save
39
+ npm install @randock/nameshift-api-client@0.0.384 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
44
44
  ```
45
45
  npm install PATH_TO_GENERATED_PACKAGE --save
46
46
  ```
47
- a3022f90af2a2b3a7397528d1412f47f8b2729a0eb5e24ba736d5e5d6b867268e681fd96de6641e1d8ce64298fa40826
47
+ 1107f93abae916de19cb348443624a0c2c6902d14f289eff3822f0402740a1c0016a613ceea0b150e2e6c741f671c487
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AccountNameshiftCommissionByTypeDto, AccountPaymentMethodProfileDto, AccountSettingsDto, AdminAccountLoginDto, AdminAccountSettingsInput, AdminBuyerLoginDto, AdminCompanyStatsDto, AdminDashboardStatsDto, AdminGetAllDomainTransfers200Response, BulkCommissionActionsInput, ChangeOrderStatusInput, ChangeSubscriptionStatusInput, CommissionListDto, DomainLockDto, DomainTransferDetailsDto, GetAllAuctions200Response, GetAllInvoices200Response, GetAllOrders200Response, GetAllOwnedDomains200Response, GetAllSubscriptions200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, LeadMessageDto, LedgerMutationsDto, ListAccounts200Response, ListBankAccounts200Response, ListDomains200Response, ObjectId, SellerSalesCountStatsItemDto, SendAdminLeadAiPriceNegotiatorAgentChatMessageInput, SubscriptionDetailsDto } from '../models/index';
13
+ import type { AccountNameshiftCommissionByTypeDto, AccountPaymentMethodProfileDto, AccountSettingsDto, AdminAccountLoginDto, AdminAccountSettingsInput, AdminBuyerLoginDto, AdminChallengeListDto, AdminCompanyStatsDto, AdminDashboardStatsDto, AdminGetAllDomainTransfers200Response, BulkCommissionActionsInput, ChangeOrderStatusInput, ChangeSubscriptionStatusInput, CommissionListDto, CreateChallengeInput, DomainLockDto, DomainTransferDetailsDto, GetAccountChallengeRewardUsagesListDto, GetAllAuctions200Response, GetAllInvoices200Response, GetAllOrders200Response, GetAllOwnedDomains200Response, GetAllSubscriptions200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, LeadMessageDto, LedgerMutationsDto, ListAccounts200Response, ListBankAccounts200Response, ListDomains200Response, ObjectId, SellerSalesCountStatsItemDto, SendAdminLeadAiPriceNegotiatorAgentChatMessageInput, SubscriptionDetailsDto, UpdateChallengeInput } from '../models/index';
14
14
  export interface AdminApiAdminGetAllDomainTransfersRequest {
15
15
  filter?: object;
16
16
  page?: number;
@@ -28,12 +28,21 @@ export interface AdminApiChangeSubscriptionStatusRequest {
28
28
  subscriptionId: string;
29
29
  changeSubscriptionStatusInput: ChangeSubscriptionStatusInput;
30
30
  }
31
+ export interface AdminApiCreateChallengeRequest {
32
+ createChallengeInput: CreateChallengeInput;
33
+ }
31
34
  export interface AdminApiCreateNegativeInvoiceRequest {
32
35
  invoiceId: string;
33
36
  }
37
+ export interface AdminApiDeleteChallengeRequest {
38
+ id: string;
39
+ }
34
40
  export interface AdminApiDownloadInvoiceRequest {
35
41
  invoiceId: string;
36
42
  }
43
+ export interface AdminApiGetAccountChallengeRewardUsagesByAccountIdRequest {
44
+ accountId: string;
45
+ }
37
46
  export interface AdminApiGetAccountMeRequest {
38
47
  accountId: string;
39
48
  }
@@ -159,6 +168,10 @@ export interface AdminApiUpdateAccountSettingsRequest {
159
168
  accountId: string;
160
169
  adminAccountSettingsInput: AdminAccountSettingsInput;
161
170
  }
171
+ export interface AdminApiUpdateChallengeRequest {
172
+ id: string;
173
+ updateChallengeInput: UpdateChallengeInput;
174
+ }
162
175
  export interface AdminApiVerifyAccountAliasRequest {
163
176
  accountId: string;
164
177
  }
@@ -201,6 +214,14 @@ export declare class AdminApi extends runtime.BaseAPI {
201
214
  *
202
215
  */
203
216
  changeSubscriptionStatus(requestParameters: AdminApiChangeSubscriptionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
217
+ /**
218
+ *
219
+ */
220
+ createChallengeRaw(requestParameters: AdminApiCreateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
221
+ /**
222
+ *
223
+ */
224
+ createChallenge(requestParameters: AdminApiCreateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
204
225
  /**
205
226
  *
206
227
  */
@@ -209,6 +230,14 @@ export declare class AdminApi extends runtime.BaseAPI {
209
230
  *
210
231
  */
211
232
  createNegativeInvoice(requestParameters: AdminApiCreateNegativeInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId>;
233
+ /**
234
+ *
235
+ */
236
+ deleteChallengeRaw(requestParameters: AdminApiDeleteChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
237
+ /**
238
+ *
239
+ */
240
+ deleteChallenge(requestParameters: AdminApiDeleteChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
212
241
  /**
213
242
  *
214
243
  */
@@ -217,6 +246,14 @@ export declare class AdminApi extends runtime.BaseAPI {
217
246
  *
218
247
  */
219
248
  downloadInvoice(requestParameters: AdminApiDownloadInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
249
+ /**
250
+ *
251
+ */
252
+ getAccountChallengeRewardUsagesByAccountIdRaw(requestParameters: AdminApiGetAccountChallengeRewardUsagesByAccountIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAccountChallengeRewardUsagesListDto>>;
253
+ /**
254
+ *
255
+ */
256
+ getAccountChallengeRewardUsagesByAccountId(requestParameters: AdminApiGetAccountChallengeRewardUsagesByAccountIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountChallengeRewardUsagesListDto>;
220
257
  /**
221
258
  *
222
259
  */
@@ -345,6 +382,14 @@ export declare class AdminApi extends runtime.BaseAPI {
345
382
  *
346
383
  */
347
384
  listAccounts(requestParameters?: AdminApiListAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAccounts200Response>;
385
+ /**
386
+ *
387
+ */
388
+ listAllChallengesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminChallengeListDto>>;
389
+ /**
390
+ *
391
+ */
392
+ listAllChallenges(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminChallengeListDto>;
348
393
  /**
349
394
  *
350
395
  */
@@ -465,6 +510,14 @@ export declare class AdminApi extends runtime.BaseAPI {
465
510
  *
466
511
  */
467
512
  updateAccountSettings(requestParameters: AdminApiUpdateAccountSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
513
+ /**
514
+ *
515
+ */
516
+ updateChallengeRaw(requestParameters: AdminApiUpdateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
517
+ /**
518
+ *
519
+ */
520
+ updateChallenge(requestParameters: AdminApiUpdateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
468
521
  /**
469
522
  *
470
523
  */
@@ -303,6 +303,59 @@ var AdminApi = /** @class */ (function (_super) {
303
303
  });
304
304
  });
305
305
  };
306
+ /**
307
+ *
308
+ */
309
+ AdminApi.prototype.createChallengeRaw = function (requestParameters, initOverrides) {
310
+ return __awaiter(this, void 0, void 0, function () {
311
+ var queryParameters, headerParameters, token, tokenString, response;
312
+ return __generator(this, function (_a) {
313
+ switch (_a.label) {
314
+ case 0:
315
+ if (requestParameters['createChallengeInput'] == null) {
316
+ throw new runtime.RequiredError('createChallengeInput', 'Required parameter "createChallengeInput" was null or undefined when calling createChallenge().');
317
+ }
318
+ queryParameters = {};
319
+ headerParameters = {};
320
+ headerParameters['Content-Type'] = 'application/json';
321
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
322
+ token = this.configuration.accessToken;
323
+ return [4 /*yield*/, token("bearer", [])];
324
+ case 1:
325
+ tokenString = _a.sent();
326
+ if (tokenString) {
327
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
328
+ }
329
+ _a.label = 2;
330
+ case 2: return [4 /*yield*/, this.request({
331
+ path: "/admin/challenges",
332
+ method: 'POST',
333
+ headers: headerParameters,
334
+ query: queryParameters,
335
+ body: (0, index_1.CreateChallengeInputToJSON)(requestParameters['createChallengeInput']),
336
+ }, initOverrides)];
337
+ case 3:
338
+ response = _a.sent();
339
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
340
+ }
341
+ });
342
+ });
343
+ };
344
+ /**
345
+ *
346
+ */
347
+ AdminApi.prototype.createChallenge = function (requestParameters, initOverrides) {
348
+ return __awaiter(this, void 0, void 0, function () {
349
+ return __generator(this, function (_a) {
350
+ switch (_a.label) {
351
+ case 0: return [4 /*yield*/, this.createChallengeRaw(requestParameters, initOverrides)];
352
+ case 1:
353
+ _a.sent();
354
+ return [2 /*return*/];
355
+ }
356
+ });
357
+ });
358
+ };
306
359
  /**
307
360
  *
308
361
  */
@@ -356,6 +409,57 @@ var AdminApi = /** @class */ (function (_super) {
356
409
  });
357
410
  });
358
411
  };
412
+ /**
413
+ *
414
+ */
415
+ AdminApi.prototype.deleteChallengeRaw = function (requestParameters, initOverrides) {
416
+ return __awaiter(this, void 0, void 0, function () {
417
+ var queryParameters, headerParameters, token, tokenString, response;
418
+ return __generator(this, function (_a) {
419
+ switch (_a.label) {
420
+ case 0:
421
+ if (requestParameters['id'] == null) {
422
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteChallenge().');
423
+ }
424
+ queryParameters = {};
425
+ headerParameters = {};
426
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
427
+ token = this.configuration.accessToken;
428
+ return [4 /*yield*/, token("bearer", [])];
429
+ case 1:
430
+ tokenString = _a.sent();
431
+ if (tokenString) {
432
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
433
+ }
434
+ _a.label = 2;
435
+ case 2: return [4 /*yield*/, this.request({
436
+ path: "/admin/challenges/{id}".replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id']))),
437
+ method: 'DELETE',
438
+ headers: headerParameters,
439
+ query: queryParameters,
440
+ }, initOverrides)];
441
+ case 3:
442
+ response = _a.sent();
443
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
444
+ }
445
+ });
446
+ });
447
+ };
448
+ /**
449
+ *
450
+ */
451
+ AdminApi.prototype.deleteChallenge = function (requestParameters, initOverrides) {
452
+ return __awaiter(this, void 0, void 0, function () {
453
+ return __generator(this, function (_a) {
454
+ switch (_a.label) {
455
+ case 0: return [4 /*yield*/, this.deleteChallengeRaw(requestParameters, initOverrides)];
456
+ case 1:
457
+ _a.sent();
458
+ return [2 /*return*/];
459
+ }
460
+ });
461
+ });
462
+ };
359
463
  /**
360
464
  *
361
465
  */
@@ -409,6 +513,59 @@ var AdminApi = /** @class */ (function (_super) {
409
513
  });
410
514
  });
411
515
  };
516
+ /**
517
+ *
518
+ */
519
+ AdminApi.prototype.getAccountChallengeRewardUsagesByAccountIdRaw = function (requestParameters, initOverrides) {
520
+ return __awaiter(this, void 0, void 0, function () {
521
+ var queryParameters, headerParameters, token, tokenString, response;
522
+ return __generator(this, function (_a) {
523
+ switch (_a.label) {
524
+ case 0:
525
+ if (requestParameters['accountId'] == null) {
526
+ throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAccountChallengeRewardUsagesByAccountId().');
527
+ }
528
+ queryParameters = {};
529
+ headerParameters = {};
530
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
531
+ token = this.configuration.accessToken;
532
+ return [4 /*yield*/, token("bearer", [])];
533
+ case 1:
534
+ tokenString = _a.sent();
535
+ if (tokenString) {
536
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
537
+ }
538
+ _a.label = 2;
539
+ case 2: return [4 /*yield*/, this.request({
540
+ path: "/admin/challenges/accounts/{accountId}/reward-usages".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
541
+ method: 'GET',
542
+ headers: headerParameters,
543
+ query: queryParameters,
544
+ }, initOverrides)];
545
+ case 3:
546
+ response = _a.sent();
547
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetAccountChallengeRewardUsagesListDtoFromJSON)(jsonValue); })];
548
+ }
549
+ });
550
+ });
551
+ };
552
+ /**
553
+ *
554
+ */
555
+ AdminApi.prototype.getAccountChallengeRewardUsagesByAccountId = function (requestParameters, initOverrides) {
556
+ return __awaiter(this, void 0, void 0, function () {
557
+ var response;
558
+ return __generator(this, function (_a) {
559
+ switch (_a.label) {
560
+ case 0: return [4 /*yield*/, this.getAccountChallengeRewardUsagesByAccountIdRaw(requestParameters, initOverrides)];
561
+ case 1:
562
+ response = _a.sent();
563
+ return [4 /*yield*/, response.value()];
564
+ case 2: return [2 /*return*/, _a.sent()];
565
+ }
566
+ });
567
+ });
568
+ };
412
569
  /**
413
570
  *
414
571
  */
@@ -1318,6 +1475,56 @@ var AdminApi = /** @class */ (function (_super) {
1318
1475
  });
1319
1476
  });
1320
1477
  };
1478
+ /**
1479
+ *
1480
+ */
1481
+ AdminApi.prototype.listAllChallengesRaw = function (initOverrides) {
1482
+ return __awaiter(this, void 0, void 0, function () {
1483
+ var queryParameters, headerParameters, token, tokenString, response;
1484
+ return __generator(this, function (_a) {
1485
+ switch (_a.label) {
1486
+ case 0:
1487
+ queryParameters = {};
1488
+ headerParameters = {};
1489
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1490
+ token = this.configuration.accessToken;
1491
+ return [4 /*yield*/, token("bearer", [])];
1492
+ case 1:
1493
+ tokenString = _a.sent();
1494
+ if (tokenString) {
1495
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
1496
+ }
1497
+ _a.label = 2;
1498
+ case 2: return [4 /*yield*/, this.request({
1499
+ path: "/admin/challenges",
1500
+ method: 'GET',
1501
+ headers: headerParameters,
1502
+ query: queryParameters,
1503
+ }, initOverrides)];
1504
+ case 3:
1505
+ response = _a.sent();
1506
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AdminChallengeListDtoFromJSON)(jsonValue); })];
1507
+ }
1508
+ });
1509
+ });
1510
+ };
1511
+ /**
1512
+ *
1513
+ */
1514
+ AdminApi.prototype.listAllChallenges = function (initOverrides) {
1515
+ return __awaiter(this, void 0, void 0, function () {
1516
+ var response;
1517
+ return __generator(this, function (_a) {
1518
+ switch (_a.label) {
1519
+ case 0: return [4 /*yield*/, this.listAllChallengesRaw(initOverrides)];
1520
+ case 1:
1521
+ response = _a.sent();
1522
+ return [4 /*yield*/, response.value()];
1523
+ case 2: return [2 /*return*/, _a.sent()];
1524
+ }
1525
+ });
1526
+ });
1527
+ };
1321
1528
  /**
1322
1529
  *
1323
1530
  */
@@ -2157,6 +2364,62 @@ var AdminApi = /** @class */ (function (_super) {
2157
2364
  });
2158
2365
  });
2159
2366
  };
2367
+ /**
2368
+ *
2369
+ */
2370
+ AdminApi.prototype.updateChallengeRaw = function (requestParameters, initOverrides) {
2371
+ return __awaiter(this, void 0, void 0, function () {
2372
+ var queryParameters, headerParameters, token, tokenString, response;
2373
+ return __generator(this, function (_a) {
2374
+ switch (_a.label) {
2375
+ case 0:
2376
+ if (requestParameters['id'] == null) {
2377
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateChallenge().');
2378
+ }
2379
+ if (requestParameters['updateChallengeInput'] == null) {
2380
+ throw new runtime.RequiredError('updateChallengeInput', 'Required parameter "updateChallengeInput" was null or undefined when calling updateChallenge().');
2381
+ }
2382
+ queryParameters = {};
2383
+ headerParameters = {};
2384
+ headerParameters['Content-Type'] = 'application/json';
2385
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
2386
+ token = this.configuration.accessToken;
2387
+ return [4 /*yield*/, token("bearer", [])];
2388
+ case 1:
2389
+ tokenString = _a.sent();
2390
+ if (tokenString) {
2391
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
2392
+ }
2393
+ _a.label = 2;
2394
+ case 2: return [4 /*yield*/, this.request({
2395
+ path: "/admin/challenges/{id}".replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id']))),
2396
+ method: 'PATCH',
2397
+ headers: headerParameters,
2398
+ query: queryParameters,
2399
+ body: (0, index_1.UpdateChallengeInputToJSON)(requestParameters['updateChallengeInput']),
2400
+ }, initOverrides)];
2401
+ case 3:
2402
+ response = _a.sent();
2403
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
2404
+ }
2405
+ });
2406
+ });
2407
+ };
2408
+ /**
2409
+ *
2410
+ */
2411
+ AdminApi.prototype.updateChallenge = function (requestParameters, initOverrides) {
2412
+ return __awaiter(this, void 0, void 0, function () {
2413
+ return __generator(this, function (_a) {
2414
+ switch (_a.label) {
2415
+ case 0: return [4 /*yield*/, this.updateChallengeRaw(requestParameters, initOverrides)];
2416
+ case 1:
2417
+ _a.sent();
2418
+ return [2 /*return*/];
2419
+ }
2420
+ });
2421
+ });
2422
+ };
2160
2423
  /**
2161
2424
  *
2162
2425
  */
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { GetAccountChallengeRewardUsagesListDto, GetSellerChallengesListDto } from '../models/index';
14
+ export interface ChallengesApiCollectChallengeRewardRequest {
15
+ challengeId: string;
16
+ progressId: string;
17
+ }
18
+ /**
19
+ *
20
+ */
21
+ export declare class ChallengesApi extends runtime.BaseAPI {
22
+ /**
23
+ *
24
+ */
25
+ collectChallengeRewardRaw(requestParameters: ChallengesApiCollectChallengeRewardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
26
+ /**
27
+ *
28
+ */
29
+ collectChallengeReward(requestParameters: ChallengesApiCollectChallengeRewardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
30
+ /**
31
+ *
32
+ */
33
+ getAccountChallengeRewardUsagesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAccountChallengeRewardUsagesListDto>>;
34
+ /**
35
+ *
36
+ */
37
+ getAccountChallengeRewardUsages(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountChallengeRewardUsagesListDto>;
38
+ /**
39
+ *
40
+ */
41
+ getChallengesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSellerChallengesListDto>>;
42
+ /**
43
+ *
44
+ */
45
+ getChallenges(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSellerChallengesListDto>;
46
+ }