@randock/nameshift-api-client 0.0.382 → 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.
- package/.openapi-generator/FILES +13 -0
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +54 -1
- package/dist/apis/AdminApi.js +263 -0
- package/dist/apis/ChallengesApi.d.ts +46 -0
- package/dist/apis/ChallengesApi.js +234 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AccountChallengeRewardUsageListItemDto.d.ts +63 -0
- package/dist/models/AccountChallengeRewardUsageListItemDto.js +72 -0
- package/dist/models/AccountChallengeRewardUsageListItemDtoMetadata.d.ts +32 -0
- package/dist/models/AccountChallengeRewardUsageListItemDtoMetadata.js +49 -0
- package/dist/models/AccountDto.d.ts +7 -0
- package/dist/models/AccountDto.js +5 -0
- package/dist/models/AccountMetricsDto.d.ts +6 -0
- package/dist/models/AccountMetricsDto.js +4 -0
- package/dist/models/AdminChallengeListDto.d.ts +33 -0
- package/dist/models/AdminChallengeListDto.js +52 -0
- package/dist/models/AdminChallengeListItemDto.d.ts +125 -0
- package/dist/models/AdminChallengeListItemDto.js +125 -0
- package/dist/models/AdminListAccountDto.d.ts +7 -0
- package/dist/models/AdminListAccountDto.js +5 -0
- package/dist/models/ChallengeRewardBalanceDto.d.ts +38 -0
- package/dist/models/ChallengeRewardBalanceDto.js +55 -0
- package/dist/models/CreateChallengeInput.d.ts +67 -0
- package/dist/models/CreateChallengeInput.js +80 -0
- package/dist/models/GetAccountChallengeRewardUsagesListDto.d.ts +33 -0
- package/dist/models/GetAccountChallengeRewardUsagesListDto.js +52 -0
- package/dist/models/GetSellerChallengesListDto.d.ts +33 -0
- package/dist/models/GetSellerChallengesListDto.js +52 -0
- package/dist/models/GetSellerChallengesListDtoChallengesInner.d.ts +27 -0
- package/dist/models/GetSellerChallengesListDtoChallengesInner.js +54 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +10 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +9 -1
- package/dist/models/PrivateAccountGetMeResponse.d.ts +10 -0
- package/dist/models/PrivateAccountGetMeResponse.js +9 -1
- package/dist/models/SellerScaleChallengeListItemDto.d.ts +148 -0
- package/dist/models/SellerScaleChallengeListItemDto.js +142 -0
- package/dist/models/SellerTargetChallengeListItemDto.d.ts +154 -0
- package/dist/models/SellerTargetChallengeListItemDto.js +146 -0
- package/dist/models/UpdateChallengeInput.d.ts +44 -0
- package/dist/models/UpdateChallengeInput.js +53 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +240 -0
- package/src/apis/ChallengesApi.ts +156 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AccountChallengeRewardUsageListItemDto.ts +119 -0
- package/src/models/AccountChallengeRewardUsageListItemDtoMetadata.ts +65 -0
- package/src/models/AccountDto.ts +16 -0
- package/src/models/AccountMetricsDto.ts +9 -0
- package/src/models/AdminChallengeListDto.ts +74 -0
- package/src/models/AdminChallengeListItemDto.ts +185 -0
- package/src/models/AdminListAccountDto.ts +16 -0
- package/src/models/ChallengeRewardBalanceDto.ts +75 -0
- package/src/models/CreateChallengeInput.ts +109 -0
- package/src/models/GetAccountChallengeRewardUsagesListDto.ts +74 -0
- package/src/models/GetSellerChallengesListDto.ts +74 -0
- package/src/models/GetSellerChallengesListDtoChallengesInner.ts +73 -0
- package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +20 -1
- package/src/models/PrivateAccountGetMeResponse.ts +20 -1
- package/src/models/SellerScaleChallengeListItemDto.ts +221 -0
- package/src/models/SellerTargetChallengeListItemDto.ts +230 -0
- package/src/models/UpdateChallengeInput.ts +81 -0
- package/src/models/index.ts +12 -0
package/src/apis/AdminApi.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
AdminAccountLoginDto,
|
|
22
22
|
AdminAccountSettingsInput,
|
|
23
23
|
AdminBuyerLoginDto,
|
|
24
|
+
AdminChallengeListDto,
|
|
24
25
|
AdminCompanyStatsDto,
|
|
25
26
|
AdminDashboardStatsDto,
|
|
26
27
|
AdminGetAllDomainTransfers200Response,
|
|
@@ -29,8 +30,11 @@ import type {
|
|
|
29
30
|
ChangeOrderStatusInput,
|
|
30
31
|
ChangeSubscriptionStatusInput,
|
|
31
32
|
CommissionListDto,
|
|
33
|
+
ConflictException,
|
|
34
|
+
CreateChallengeInput,
|
|
32
35
|
DomainLockDto,
|
|
33
36
|
DomainTransferDetailsDto,
|
|
37
|
+
GetAccountChallengeRewardUsagesListDto,
|
|
34
38
|
GetAllAuctions200Response,
|
|
35
39
|
GetAllInvoices200Response,
|
|
36
40
|
GetAllOrders200Response,
|
|
@@ -47,6 +51,7 @@ import type {
|
|
|
47
51
|
SellerSalesCountStatsItemDto,
|
|
48
52
|
SendAdminLeadAiPriceNegotiatorAgentChatMessageInput,
|
|
49
53
|
SubscriptionDetailsDto,
|
|
54
|
+
UpdateChallengeInput,
|
|
50
55
|
ValidationException,
|
|
51
56
|
} from '../models/index';
|
|
52
57
|
import {
|
|
@@ -62,6 +67,8 @@ import {
|
|
|
62
67
|
AdminAccountSettingsInputToJSON,
|
|
63
68
|
AdminBuyerLoginDtoFromJSON,
|
|
64
69
|
AdminBuyerLoginDtoToJSON,
|
|
70
|
+
AdminChallengeListDtoFromJSON,
|
|
71
|
+
AdminChallengeListDtoToJSON,
|
|
65
72
|
AdminCompanyStatsDtoFromJSON,
|
|
66
73
|
AdminCompanyStatsDtoToJSON,
|
|
67
74
|
AdminDashboardStatsDtoFromJSON,
|
|
@@ -78,10 +85,16 @@ import {
|
|
|
78
85
|
ChangeSubscriptionStatusInputToJSON,
|
|
79
86
|
CommissionListDtoFromJSON,
|
|
80
87
|
CommissionListDtoToJSON,
|
|
88
|
+
ConflictExceptionFromJSON,
|
|
89
|
+
ConflictExceptionToJSON,
|
|
90
|
+
CreateChallengeInputFromJSON,
|
|
91
|
+
CreateChallengeInputToJSON,
|
|
81
92
|
DomainLockDtoFromJSON,
|
|
82
93
|
DomainLockDtoToJSON,
|
|
83
94
|
DomainTransferDetailsDtoFromJSON,
|
|
84
95
|
DomainTransferDetailsDtoToJSON,
|
|
96
|
+
GetAccountChallengeRewardUsagesListDtoFromJSON,
|
|
97
|
+
GetAccountChallengeRewardUsagesListDtoToJSON,
|
|
85
98
|
GetAllAuctions200ResponseFromJSON,
|
|
86
99
|
GetAllAuctions200ResponseToJSON,
|
|
87
100
|
GetAllInvoices200ResponseFromJSON,
|
|
@@ -114,6 +127,8 @@ import {
|
|
|
114
127
|
SendAdminLeadAiPriceNegotiatorAgentChatMessageInputToJSON,
|
|
115
128
|
SubscriptionDetailsDtoFromJSON,
|
|
116
129
|
SubscriptionDetailsDtoToJSON,
|
|
130
|
+
UpdateChallengeInputFromJSON,
|
|
131
|
+
UpdateChallengeInputToJSON,
|
|
117
132
|
ValidationExceptionFromJSON,
|
|
118
133
|
ValidationExceptionToJSON,
|
|
119
134
|
} from '../models/index';
|
|
@@ -139,14 +154,26 @@ export interface AdminApiChangeSubscriptionStatusRequest {
|
|
|
139
154
|
changeSubscriptionStatusInput: ChangeSubscriptionStatusInput;
|
|
140
155
|
}
|
|
141
156
|
|
|
157
|
+
export interface AdminApiCreateChallengeRequest {
|
|
158
|
+
createChallengeInput: CreateChallengeInput;
|
|
159
|
+
}
|
|
160
|
+
|
|
142
161
|
export interface AdminApiCreateNegativeInvoiceRequest {
|
|
143
162
|
invoiceId: string;
|
|
144
163
|
}
|
|
145
164
|
|
|
165
|
+
export interface AdminApiDeleteChallengeRequest {
|
|
166
|
+
id: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
146
169
|
export interface AdminApiDownloadInvoiceRequest {
|
|
147
170
|
invoiceId: string;
|
|
148
171
|
}
|
|
149
172
|
|
|
173
|
+
export interface AdminApiGetAccountChallengeRewardUsagesByAccountIdRequest {
|
|
174
|
+
accountId: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
150
177
|
export interface AdminApiGetAccountMeRequest {
|
|
151
178
|
accountId: string;
|
|
152
179
|
}
|
|
@@ -303,6 +330,11 @@ export interface AdminApiUpdateAccountSettingsRequest {
|
|
|
303
330
|
adminAccountSettingsInput: AdminAccountSettingsInput;
|
|
304
331
|
}
|
|
305
332
|
|
|
333
|
+
export interface AdminApiUpdateChallengeRequest {
|
|
334
|
+
id: string;
|
|
335
|
+
updateChallengeInput: UpdateChallengeInput;
|
|
336
|
+
}
|
|
337
|
+
|
|
306
338
|
export interface AdminApiVerifyAccountAliasRequest {
|
|
307
339
|
accountId: string;
|
|
308
340
|
}
|
|
@@ -509,6 +541,49 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
509
541
|
await this.changeSubscriptionStatusRaw(requestParameters, initOverrides);
|
|
510
542
|
}
|
|
511
543
|
|
|
544
|
+
/**
|
|
545
|
+
*
|
|
546
|
+
*/
|
|
547
|
+
async createChallengeRaw(requestParameters: AdminApiCreateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
548
|
+
if (requestParameters['createChallengeInput'] == null) {
|
|
549
|
+
throw new runtime.RequiredError(
|
|
550
|
+
'createChallengeInput',
|
|
551
|
+
'Required parameter "createChallengeInput" was null or undefined when calling createChallenge().'
|
|
552
|
+
);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
const queryParameters: any = {};
|
|
556
|
+
|
|
557
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
558
|
+
|
|
559
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
560
|
+
|
|
561
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
562
|
+
const token = this.configuration.accessToken;
|
|
563
|
+
const tokenString = await token("bearer", []);
|
|
564
|
+
|
|
565
|
+
if (tokenString) {
|
|
566
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
const response = await this.request({
|
|
570
|
+
path: `/admin/challenges`,
|
|
571
|
+
method: 'POST',
|
|
572
|
+
headers: headerParameters,
|
|
573
|
+
query: queryParameters,
|
|
574
|
+
body: CreateChallengeInputToJSON(requestParameters['createChallengeInput']),
|
|
575
|
+
}, initOverrides);
|
|
576
|
+
|
|
577
|
+
return new runtime.VoidApiResponse(response);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
*
|
|
582
|
+
*/
|
|
583
|
+
async createChallenge(requestParameters: AdminApiCreateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
584
|
+
await this.createChallengeRaw(requestParameters, initOverrides);
|
|
585
|
+
}
|
|
586
|
+
|
|
512
587
|
/**
|
|
513
588
|
*
|
|
514
589
|
*/
|
|
@@ -550,6 +625,46 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
550
625
|
return await response.value();
|
|
551
626
|
}
|
|
552
627
|
|
|
628
|
+
/**
|
|
629
|
+
*
|
|
630
|
+
*/
|
|
631
|
+
async deleteChallengeRaw(requestParameters: AdminApiDeleteChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
632
|
+
if (requestParameters['id'] == null) {
|
|
633
|
+
throw new runtime.RequiredError(
|
|
634
|
+
'id',
|
|
635
|
+
'Required parameter "id" was null or undefined when calling deleteChallenge().'
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
const queryParameters: any = {};
|
|
640
|
+
|
|
641
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
642
|
+
|
|
643
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
644
|
+
const token = this.configuration.accessToken;
|
|
645
|
+
const tokenString = await token("bearer", []);
|
|
646
|
+
|
|
647
|
+
if (tokenString) {
|
|
648
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
const response = await this.request({
|
|
652
|
+
path: `/admin/challenges/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
653
|
+
method: 'DELETE',
|
|
654
|
+
headers: headerParameters,
|
|
655
|
+
query: queryParameters,
|
|
656
|
+
}, initOverrides);
|
|
657
|
+
|
|
658
|
+
return new runtime.VoidApiResponse(response);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
*
|
|
663
|
+
*/
|
|
664
|
+
async deleteChallenge(requestParameters: AdminApiDeleteChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
665
|
+
await this.deleteChallengeRaw(requestParameters, initOverrides);
|
|
666
|
+
}
|
|
667
|
+
|
|
553
668
|
/**
|
|
554
669
|
*
|
|
555
670
|
*/
|
|
@@ -591,6 +706,47 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
591
706
|
return await response.value();
|
|
592
707
|
}
|
|
593
708
|
|
|
709
|
+
/**
|
|
710
|
+
*
|
|
711
|
+
*/
|
|
712
|
+
async getAccountChallengeRewardUsagesByAccountIdRaw(requestParameters: AdminApiGetAccountChallengeRewardUsagesByAccountIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAccountChallengeRewardUsagesListDto>> {
|
|
713
|
+
if (requestParameters['accountId'] == null) {
|
|
714
|
+
throw new runtime.RequiredError(
|
|
715
|
+
'accountId',
|
|
716
|
+
'Required parameter "accountId" was null or undefined when calling getAccountChallengeRewardUsagesByAccountId().'
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
const queryParameters: any = {};
|
|
721
|
+
|
|
722
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
723
|
+
|
|
724
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
725
|
+
const token = this.configuration.accessToken;
|
|
726
|
+
const tokenString = await token("bearer", []);
|
|
727
|
+
|
|
728
|
+
if (tokenString) {
|
|
729
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
const response = await this.request({
|
|
733
|
+
path: `/admin/challenges/accounts/{accountId}/reward-usages`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
734
|
+
method: 'GET',
|
|
735
|
+
headers: headerParameters,
|
|
736
|
+
query: queryParameters,
|
|
737
|
+
}, initOverrides);
|
|
738
|
+
|
|
739
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetAccountChallengeRewardUsagesListDtoFromJSON(jsonValue));
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
*
|
|
744
|
+
*/
|
|
745
|
+
async getAccountChallengeRewardUsagesByAccountId(requestParameters: AdminApiGetAccountChallengeRewardUsagesByAccountIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountChallengeRewardUsagesListDto> {
|
|
746
|
+
const response = await this.getAccountChallengeRewardUsagesByAccountIdRaw(requestParameters, initOverrides);
|
|
747
|
+
return await response.value();
|
|
748
|
+
}
|
|
749
|
+
|
|
594
750
|
/**
|
|
595
751
|
*
|
|
596
752
|
*/
|
|
@@ -1291,6 +1447,40 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1291
1447
|
return await response.value();
|
|
1292
1448
|
}
|
|
1293
1449
|
|
|
1450
|
+
/**
|
|
1451
|
+
*
|
|
1452
|
+
*/
|
|
1453
|
+
async listAllChallengesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminChallengeListDto>> {
|
|
1454
|
+
const queryParameters: any = {};
|
|
1455
|
+
|
|
1456
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1457
|
+
|
|
1458
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1459
|
+
const token = this.configuration.accessToken;
|
|
1460
|
+
const tokenString = await token("bearer", []);
|
|
1461
|
+
|
|
1462
|
+
if (tokenString) {
|
|
1463
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
const response = await this.request({
|
|
1467
|
+
path: `/admin/challenges`,
|
|
1468
|
+
method: 'GET',
|
|
1469
|
+
headers: headerParameters,
|
|
1470
|
+
query: queryParameters,
|
|
1471
|
+
}, initOverrides);
|
|
1472
|
+
|
|
1473
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminChallengeListDtoFromJSON(jsonValue));
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
*
|
|
1478
|
+
*/
|
|
1479
|
+
async listAllChallenges(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminChallengeListDto> {
|
|
1480
|
+
const response = await this.listAllChallengesRaw(initOverrides);
|
|
1481
|
+
return await response.value();
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1294
1484
|
/**
|
|
1295
1485
|
*
|
|
1296
1486
|
*/
|
|
@@ -1985,6 +2175,56 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1985
2175
|
await this.updateAccountSettingsRaw(requestParameters, initOverrides);
|
|
1986
2176
|
}
|
|
1987
2177
|
|
|
2178
|
+
/**
|
|
2179
|
+
*
|
|
2180
|
+
*/
|
|
2181
|
+
async updateChallengeRaw(requestParameters: AdminApiUpdateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
2182
|
+
if (requestParameters['id'] == null) {
|
|
2183
|
+
throw new runtime.RequiredError(
|
|
2184
|
+
'id',
|
|
2185
|
+
'Required parameter "id" was null or undefined when calling updateChallenge().'
|
|
2186
|
+
);
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
if (requestParameters['updateChallengeInput'] == null) {
|
|
2190
|
+
throw new runtime.RequiredError(
|
|
2191
|
+
'updateChallengeInput',
|
|
2192
|
+
'Required parameter "updateChallengeInput" was null or undefined when calling updateChallenge().'
|
|
2193
|
+
);
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
const queryParameters: any = {};
|
|
2197
|
+
|
|
2198
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2199
|
+
|
|
2200
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2201
|
+
|
|
2202
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2203
|
+
const token = this.configuration.accessToken;
|
|
2204
|
+
const tokenString = await token("bearer", []);
|
|
2205
|
+
|
|
2206
|
+
if (tokenString) {
|
|
2207
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
const response = await this.request({
|
|
2211
|
+
path: `/admin/challenges/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
2212
|
+
method: 'PATCH',
|
|
2213
|
+
headers: headerParameters,
|
|
2214
|
+
query: queryParameters,
|
|
2215
|
+
body: UpdateChallengeInputToJSON(requestParameters['updateChallengeInput']),
|
|
2216
|
+
}, initOverrides);
|
|
2217
|
+
|
|
2218
|
+
return new runtime.VoidApiResponse(response);
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
/**
|
|
2222
|
+
*
|
|
2223
|
+
*/
|
|
2224
|
+
async updateChallenge(requestParameters: AdminApiUpdateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
2225
|
+
await this.updateChallengeRaw(requestParameters, initOverrides);
|
|
2226
|
+
}
|
|
2227
|
+
|
|
1988
2228
|
/**
|
|
1989
2229
|
*
|
|
1990
2230
|
*/
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
GetAccountChallengeRewardUsagesListDto,
|
|
19
|
+
GetSellerChallengesListDto,
|
|
20
|
+
ValidationException,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
GetAccountChallengeRewardUsagesListDtoFromJSON,
|
|
24
|
+
GetAccountChallengeRewardUsagesListDtoToJSON,
|
|
25
|
+
GetSellerChallengesListDtoFromJSON,
|
|
26
|
+
GetSellerChallengesListDtoToJSON,
|
|
27
|
+
ValidationExceptionFromJSON,
|
|
28
|
+
ValidationExceptionToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface ChallengesApiCollectChallengeRewardRequest {
|
|
32
|
+
challengeId: string;
|
|
33
|
+
progressId: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
export class ChallengesApi extends runtime.BaseAPI {
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
async collectChallengeRewardRaw(requestParameters: ChallengesApiCollectChallengeRewardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
45
|
+
if (requestParameters['challengeId'] == null) {
|
|
46
|
+
throw new runtime.RequiredError(
|
|
47
|
+
'challengeId',
|
|
48
|
+
'Required parameter "challengeId" was null or undefined when calling collectChallengeReward().'
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (requestParameters['progressId'] == null) {
|
|
53
|
+
throw new runtime.RequiredError(
|
|
54
|
+
'progressId',
|
|
55
|
+
'Required parameter "progressId" was null or undefined when calling collectChallengeReward().'
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const queryParameters: any = {};
|
|
60
|
+
|
|
61
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
62
|
+
|
|
63
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
64
|
+
const token = this.configuration.accessToken;
|
|
65
|
+
const tokenString = await token("bearer", []);
|
|
66
|
+
|
|
67
|
+
if (tokenString) {
|
|
68
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const response = await this.request({
|
|
72
|
+
path: `/private/challenges/{challengeId}/progress/{progressId}/collect`.replace(`{${"challengeId"}}`, encodeURIComponent(String(requestParameters['challengeId']))).replace(`{${"progressId"}}`, encodeURIComponent(String(requestParameters['progressId']))),
|
|
73
|
+
method: 'POST',
|
|
74
|
+
headers: headerParameters,
|
|
75
|
+
query: queryParameters,
|
|
76
|
+
}, initOverrides);
|
|
77
|
+
|
|
78
|
+
return new runtime.VoidApiResponse(response);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
async collectChallengeReward(requestParameters: ChallengesApiCollectChallengeRewardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
85
|
+
await this.collectChallengeRewardRaw(requestParameters, initOverrides);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
async getAccountChallengeRewardUsagesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAccountChallengeRewardUsagesListDto>> {
|
|
92
|
+
const queryParameters: any = {};
|
|
93
|
+
|
|
94
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
95
|
+
|
|
96
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
97
|
+
const token = this.configuration.accessToken;
|
|
98
|
+
const tokenString = await token("bearer", []);
|
|
99
|
+
|
|
100
|
+
if (tokenString) {
|
|
101
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const response = await this.request({
|
|
105
|
+
path: `/private/challenges/reward-usages`,
|
|
106
|
+
method: 'GET',
|
|
107
|
+
headers: headerParameters,
|
|
108
|
+
query: queryParameters,
|
|
109
|
+
}, initOverrides);
|
|
110
|
+
|
|
111
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetAccountChallengeRewardUsagesListDtoFromJSON(jsonValue));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
async getAccountChallengeRewardUsages(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountChallengeRewardUsagesListDto> {
|
|
118
|
+
const response = await this.getAccountChallengeRewardUsagesRaw(initOverrides);
|
|
119
|
+
return await response.value();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
*/
|
|
125
|
+
async getChallengesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSellerChallengesListDto>> {
|
|
126
|
+
const queryParameters: any = {};
|
|
127
|
+
|
|
128
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
129
|
+
|
|
130
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
131
|
+
const token = this.configuration.accessToken;
|
|
132
|
+
const tokenString = await token("bearer", []);
|
|
133
|
+
|
|
134
|
+
if (tokenString) {
|
|
135
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const response = await this.request({
|
|
139
|
+
path: `/private/challenges`,
|
|
140
|
+
method: 'GET',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
}, initOverrides);
|
|
144
|
+
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetSellerChallengesListDtoFromJSON(jsonValue));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
async getChallenges(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSellerChallengesListDto> {
|
|
152
|
+
const response = await this.getChallengesRaw(initOverrides);
|
|
153
|
+
return await response.value();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './AuctionsPublicApi';
|
|
|
8
8
|
export * from './BankAccountsApi';
|
|
9
9
|
export * from './BuyersApi';
|
|
10
10
|
export * from './BuyersPublicApi';
|
|
11
|
+
export * from './ChallengesApi';
|
|
11
12
|
export * from './DomainTransfersApi';
|
|
12
13
|
export * from './DomainsApi';
|
|
13
14
|
export * from './DomainsPublicApi';
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { AccountChallengeRewardUsageListItemDtoMetadata } from './AccountChallengeRewardUsageListItemDtoMetadata';
|
|
17
|
+
import {
|
|
18
|
+
AccountChallengeRewardUsageListItemDtoMetadataFromJSON,
|
|
19
|
+
AccountChallengeRewardUsageListItemDtoMetadataFromJSONTyped,
|
|
20
|
+
AccountChallengeRewardUsageListItemDtoMetadataToJSON,
|
|
21
|
+
AccountChallengeRewardUsageListItemDtoMetadataToJSONTyped,
|
|
22
|
+
} from './AccountChallengeRewardUsageListItemDtoMetadata';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AccountChallengeRewardUsageListItemDto
|
|
28
|
+
*/
|
|
29
|
+
export interface AccountChallengeRewardUsageListItemDto {
|
|
30
|
+
/**
|
|
31
|
+
* Usage id
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AccountChallengeRewardUsageListItemDto
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Invoice id where the reward was applied
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof AccountChallengeRewardUsageListItemDto
|
|
40
|
+
*/
|
|
41
|
+
invoiceId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Invoice number (human-readable)
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof AccountChallengeRewardUsageListItemDto
|
|
46
|
+
*/
|
|
47
|
+
invoiceNumber: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Reward points used for this invoice
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof AccountChallengeRewardUsageListItemDto
|
|
52
|
+
*/
|
|
53
|
+
usedPoints: number;
|
|
54
|
+
/**
|
|
55
|
+
* Date when the reward was used
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof AccountChallengeRewardUsageListItemDto
|
|
58
|
+
*/
|
|
59
|
+
date: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {AccountChallengeRewardUsageListItemDtoMetadata}
|
|
63
|
+
* @memberof AccountChallengeRewardUsageListItemDto
|
|
64
|
+
*/
|
|
65
|
+
metadata: AccountChallengeRewardUsageListItemDtoMetadata;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given object implements the AccountChallengeRewardUsageListItemDto interface.
|
|
70
|
+
*/
|
|
71
|
+
export function instanceOfAccountChallengeRewardUsageListItemDto(value: object): value is AccountChallengeRewardUsageListItemDto {
|
|
72
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
73
|
+
if (!('invoiceId' in value) || value['invoiceId'] === undefined) return false;
|
|
74
|
+
if (!('invoiceNumber' in value) || value['invoiceNumber'] === undefined) return false;
|
|
75
|
+
if (!('usedPoints' in value) || value['usedPoints'] === undefined) return false;
|
|
76
|
+
if (!('date' in value) || value['date'] === undefined) return false;
|
|
77
|
+
if (!('metadata' in value) || value['metadata'] === undefined) return false;
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function AccountChallengeRewardUsageListItemDtoFromJSON(json: any): AccountChallengeRewardUsageListItemDto {
|
|
82
|
+
return AccountChallengeRewardUsageListItemDtoFromJSONTyped(json, false);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function AccountChallengeRewardUsageListItemDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountChallengeRewardUsageListItemDto {
|
|
86
|
+
if (json == null) {
|
|
87
|
+
return json;
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
|
|
91
|
+
'id': json['id'],
|
|
92
|
+
'invoiceId': json['invoiceId'],
|
|
93
|
+
'invoiceNumber': json['invoiceNumber'],
|
|
94
|
+
'usedPoints': json['usedPoints'],
|
|
95
|
+
'date': json['date'],
|
|
96
|
+
'metadata': AccountChallengeRewardUsageListItemDtoMetadataFromJSON(json['metadata']),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function AccountChallengeRewardUsageListItemDtoToJSON(json: any): AccountChallengeRewardUsageListItemDto {
|
|
101
|
+
return AccountChallengeRewardUsageListItemDtoToJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function AccountChallengeRewardUsageListItemDtoToJSONTyped(value?: AccountChallengeRewardUsageListItemDto | null, ignoreDiscriminator: boolean = false): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'id': value['id'],
|
|
112
|
+
'invoiceId': value['invoiceId'],
|
|
113
|
+
'invoiceNumber': value['invoiceNumber'],
|
|
114
|
+
'usedPoints': value['usedPoints'],
|
|
115
|
+
'date': value['date'],
|
|
116
|
+
'metadata': AccountChallengeRewardUsageListItemDtoMetadataToJSON(value['metadata']),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AccountChallengeRewardUsageListItemDtoMetadata
|
|
20
|
+
*/
|
|
21
|
+
export interface AccountChallengeRewardUsageListItemDtoMetadata {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AccountChallengeRewardUsageListItemDtoMetadata
|
|
26
|
+
*/
|
|
27
|
+
initialCommissionPercentage?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the AccountChallengeRewardUsageListItemDtoMetadata interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfAccountChallengeRewardUsageListItemDtoMetadata(value: object): value is AccountChallengeRewardUsageListItemDtoMetadata {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function AccountChallengeRewardUsageListItemDtoMetadataFromJSON(json: any): AccountChallengeRewardUsageListItemDtoMetadata {
|
|
38
|
+
return AccountChallengeRewardUsageListItemDtoMetadataFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function AccountChallengeRewardUsageListItemDtoMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountChallengeRewardUsageListItemDtoMetadata {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'initialCommissionPercentage': json['initialCommissionPercentage'] == null ? undefined : json['initialCommissionPercentage'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function AccountChallengeRewardUsageListItemDtoMetadataToJSON(json: any): AccountChallengeRewardUsageListItemDtoMetadata {
|
|
52
|
+
return AccountChallengeRewardUsageListItemDtoMetadataToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function AccountChallengeRewardUsageListItemDtoMetadataToJSONTyped(value?: AccountChallengeRewardUsageListItemDtoMetadata | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'initialCommissionPercentage': value['initialCommissionPercentage'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|