@randock/nameshift-api-client 0.0.383 → 0.0.385
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 +16 -0
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +80 -1
- package/dist/apis/AdminApi.js +382 -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/FeatureFlagListItemDto.d.ts +93 -0
- package/dist/models/FeatureFlagListItemDto.js +100 -0
- package/dist/models/GetAccountChallengeRewardUsagesListDto.d.ts +33 -0
- package/dist/models/GetAccountChallengeRewardUsagesListDto.js +52 -0
- package/dist/models/GetAllFeatureFlags200Response.d.ts +47 -0
- package/dist/models/GetAllFeatureFlags200Response.js +62 -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 +9 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +8 -1
- package/dist/models/ListAccountMetricsDto.d.ts +6 -0
- package/dist/models/ListAccountMetricsDto.js +4 -0
- package/dist/models/PrivateAccountGetMeResponse.d.ts +9 -0
- package/dist/models/PrivateAccountGetMeResponse.js +8 -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/UpdateFeatureFlagInput.d.ts +44 -0
- package/dist/models/UpdateFeatureFlagInput.js +53 -0
- package/dist/models/index.d.ts +15 -0
- package/dist/models/index.js +15 -0
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +358 -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/FeatureFlagListItemDto.ts +148 -0
- package/src/models/GetAccountChallengeRewardUsagesListDto.ts +74 -0
- package/src/models/GetAllFeatureFlags200Response.ts +106 -0
- package/src/models/GetSellerChallengesListDto.ts +74 -0
- package/src/models/GetSellerChallengesListDtoChallengesInner.ts +73 -0
- package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +19 -1
- package/src/models/ListAccountMetricsDto.ts +9 -0
- package/src/models/PrivateAccountGetMeResponse.ts +19 -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/UpdateFeatureFlagInput.ts +81 -0
- package/src/models/index.ts +15 -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,9 +30,13 @@ 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,
|
|
39
|
+
GetAllFeatureFlags200Response,
|
|
35
40
|
GetAllInvoices200Response,
|
|
36
41
|
GetAllOrders200Response,
|
|
37
42
|
GetAllOwnedDomains200Response,
|
|
@@ -47,6 +52,8 @@ import type {
|
|
|
47
52
|
SellerSalesCountStatsItemDto,
|
|
48
53
|
SendAdminLeadAiPriceNegotiatorAgentChatMessageInput,
|
|
49
54
|
SubscriptionDetailsDto,
|
|
55
|
+
UpdateChallengeInput,
|
|
56
|
+
UpdateFeatureFlagInput,
|
|
50
57
|
ValidationException,
|
|
51
58
|
} from '../models/index';
|
|
52
59
|
import {
|
|
@@ -62,6 +69,8 @@ import {
|
|
|
62
69
|
AdminAccountSettingsInputToJSON,
|
|
63
70
|
AdminBuyerLoginDtoFromJSON,
|
|
64
71
|
AdminBuyerLoginDtoToJSON,
|
|
72
|
+
AdminChallengeListDtoFromJSON,
|
|
73
|
+
AdminChallengeListDtoToJSON,
|
|
65
74
|
AdminCompanyStatsDtoFromJSON,
|
|
66
75
|
AdminCompanyStatsDtoToJSON,
|
|
67
76
|
AdminDashboardStatsDtoFromJSON,
|
|
@@ -78,12 +87,20 @@ import {
|
|
|
78
87
|
ChangeSubscriptionStatusInputToJSON,
|
|
79
88
|
CommissionListDtoFromJSON,
|
|
80
89
|
CommissionListDtoToJSON,
|
|
90
|
+
ConflictExceptionFromJSON,
|
|
91
|
+
ConflictExceptionToJSON,
|
|
92
|
+
CreateChallengeInputFromJSON,
|
|
93
|
+
CreateChallengeInputToJSON,
|
|
81
94
|
DomainLockDtoFromJSON,
|
|
82
95
|
DomainLockDtoToJSON,
|
|
83
96
|
DomainTransferDetailsDtoFromJSON,
|
|
84
97
|
DomainTransferDetailsDtoToJSON,
|
|
98
|
+
GetAccountChallengeRewardUsagesListDtoFromJSON,
|
|
99
|
+
GetAccountChallengeRewardUsagesListDtoToJSON,
|
|
85
100
|
GetAllAuctions200ResponseFromJSON,
|
|
86
101
|
GetAllAuctions200ResponseToJSON,
|
|
102
|
+
GetAllFeatureFlags200ResponseFromJSON,
|
|
103
|
+
GetAllFeatureFlags200ResponseToJSON,
|
|
87
104
|
GetAllInvoices200ResponseFromJSON,
|
|
88
105
|
GetAllInvoices200ResponseToJSON,
|
|
89
106
|
GetAllOrders200ResponseFromJSON,
|
|
@@ -114,6 +131,10 @@ import {
|
|
|
114
131
|
SendAdminLeadAiPriceNegotiatorAgentChatMessageInputToJSON,
|
|
115
132
|
SubscriptionDetailsDtoFromJSON,
|
|
116
133
|
SubscriptionDetailsDtoToJSON,
|
|
134
|
+
UpdateChallengeInputFromJSON,
|
|
135
|
+
UpdateChallengeInputToJSON,
|
|
136
|
+
UpdateFeatureFlagInputFromJSON,
|
|
137
|
+
UpdateFeatureFlagInputToJSON,
|
|
117
138
|
ValidationExceptionFromJSON,
|
|
118
139
|
ValidationExceptionToJSON,
|
|
119
140
|
} from '../models/index';
|
|
@@ -139,14 +160,26 @@ export interface AdminApiChangeSubscriptionStatusRequest {
|
|
|
139
160
|
changeSubscriptionStatusInput: ChangeSubscriptionStatusInput;
|
|
140
161
|
}
|
|
141
162
|
|
|
163
|
+
export interface AdminApiCreateChallengeRequest {
|
|
164
|
+
createChallengeInput: CreateChallengeInput;
|
|
165
|
+
}
|
|
166
|
+
|
|
142
167
|
export interface AdminApiCreateNegativeInvoiceRequest {
|
|
143
168
|
invoiceId: string;
|
|
144
169
|
}
|
|
145
170
|
|
|
171
|
+
export interface AdminApiDeleteChallengeRequest {
|
|
172
|
+
id: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
146
175
|
export interface AdminApiDownloadInvoiceRequest {
|
|
147
176
|
invoiceId: string;
|
|
148
177
|
}
|
|
149
178
|
|
|
179
|
+
export interface AdminApiGetAccountChallengeRewardUsagesByAccountIdRequest {
|
|
180
|
+
accountId: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
150
183
|
export interface AdminApiGetAccountMeRequest {
|
|
151
184
|
accountId: string;
|
|
152
185
|
}
|
|
@@ -182,6 +215,13 @@ export interface AdminApiGetAllAuctionsRequest {
|
|
|
182
215
|
sortBy?: Array<string>;
|
|
183
216
|
}
|
|
184
217
|
|
|
218
|
+
export interface AdminApiGetAllFeatureFlagsRequest {
|
|
219
|
+
filter?: object;
|
|
220
|
+
page?: number;
|
|
221
|
+
limit?: number;
|
|
222
|
+
sortBy?: Array<string>;
|
|
223
|
+
}
|
|
224
|
+
|
|
185
225
|
export interface AdminApiGetAllInvoicesRequest {
|
|
186
226
|
filter?: object;
|
|
187
227
|
page?: number;
|
|
@@ -303,6 +343,16 @@ export interface AdminApiUpdateAccountSettingsRequest {
|
|
|
303
343
|
adminAccountSettingsInput: AdminAccountSettingsInput;
|
|
304
344
|
}
|
|
305
345
|
|
|
346
|
+
export interface AdminApiUpdateChallengeRequest {
|
|
347
|
+
id: string;
|
|
348
|
+
updateChallengeInput: UpdateChallengeInput;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export interface AdminApiUpdateFeatureFlagRequest {
|
|
352
|
+
featureFlagId: string;
|
|
353
|
+
updateFeatureFlagInput: UpdateFeatureFlagInput;
|
|
354
|
+
}
|
|
355
|
+
|
|
306
356
|
export interface AdminApiVerifyAccountAliasRequest {
|
|
307
357
|
accountId: string;
|
|
308
358
|
}
|
|
@@ -509,6 +559,49 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
509
559
|
await this.changeSubscriptionStatusRaw(requestParameters, initOverrides);
|
|
510
560
|
}
|
|
511
561
|
|
|
562
|
+
/**
|
|
563
|
+
*
|
|
564
|
+
*/
|
|
565
|
+
async createChallengeRaw(requestParameters: AdminApiCreateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
566
|
+
if (requestParameters['createChallengeInput'] == null) {
|
|
567
|
+
throw new runtime.RequiredError(
|
|
568
|
+
'createChallengeInput',
|
|
569
|
+
'Required parameter "createChallengeInput" was null or undefined when calling createChallenge().'
|
|
570
|
+
);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
const queryParameters: any = {};
|
|
574
|
+
|
|
575
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
576
|
+
|
|
577
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
578
|
+
|
|
579
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
580
|
+
const token = this.configuration.accessToken;
|
|
581
|
+
const tokenString = await token("bearer", []);
|
|
582
|
+
|
|
583
|
+
if (tokenString) {
|
|
584
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
const response = await this.request({
|
|
588
|
+
path: `/admin/challenges`,
|
|
589
|
+
method: 'POST',
|
|
590
|
+
headers: headerParameters,
|
|
591
|
+
query: queryParameters,
|
|
592
|
+
body: CreateChallengeInputToJSON(requestParameters['createChallengeInput']),
|
|
593
|
+
}, initOverrides);
|
|
594
|
+
|
|
595
|
+
return new runtime.VoidApiResponse(response);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
*
|
|
600
|
+
*/
|
|
601
|
+
async createChallenge(requestParameters: AdminApiCreateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
602
|
+
await this.createChallengeRaw(requestParameters, initOverrides);
|
|
603
|
+
}
|
|
604
|
+
|
|
512
605
|
/**
|
|
513
606
|
*
|
|
514
607
|
*/
|
|
@@ -550,6 +643,46 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
550
643
|
return await response.value();
|
|
551
644
|
}
|
|
552
645
|
|
|
646
|
+
/**
|
|
647
|
+
*
|
|
648
|
+
*/
|
|
649
|
+
async deleteChallengeRaw(requestParameters: AdminApiDeleteChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
650
|
+
if (requestParameters['id'] == null) {
|
|
651
|
+
throw new runtime.RequiredError(
|
|
652
|
+
'id',
|
|
653
|
+
'Required parameter "id" was null or undefined when calling deleteChallenge().'
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
const queryParameters: any = {};
|
|
658
|
+
|
|
659
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
660
|
+
|
|
661
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
662
|
+
const token = this.configuration.accessToken;
|
|
663
|
+
const tokenString = await token("bearer", []);
|
|
664
|
+
|
|
665
|
+
if (tokenString) {
|
|
666
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
const response = await this.request({
|
|
670
|
+
path: `/admin/challenges/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
671
|
+
method: 'DELETE',
|
|
672
|
+
headers: headerParameters,
|
|
673
|
+
query: queryParameters,
|
|
674
|
+
}, initOverrides);
|
|
675
|
+
|
|
676
|
+
return new runtime.VoidApiResponse(response);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
*
|
|
681
|
+
*/
|
|
682
|
+
async deleteChallenge(requestParameters: AdminApiDeleteChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
683
|
+
await this.deleteChallengeRaw(requestParameters, initOverrides);
|
|
684
|
+
}
|
|
685
|
+
|
|
553
686
|
/**
|
|
554
687
|
*
|
|
555
688
|
*/
|
|
@@ -591,6 +724,47 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
591
724
|
return await response.value();
|
|
592
725
|
}
|
|
593
726
|
|
|
727
|
+
/**
|
|
728
|
+
*
|
|
729
|
+
*/
|
|
730
|
+
async getAccountChallengeRewardUsagesByAccountIdRaw(requestParameters: AdminApiGetAccountChallengeRewardUsagesByAccountIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAccountChallengeRewardUsagesListDto>> {
|
|
731
|
+
if (requestParameters['accountId'] == null) {
|
|
732
|
+
throw new runtime.RequiredError(
|
|
733
|
+
'accountId',
|
|
734
|
+
'Required parameter "accountId" was null or undefined when calling getAccountChallengeRewardUsagesByAccountId().'
|
|
735
|
+
);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
const queryParameters: any = {};
|
|
739
|
+
|
|
740
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
741
|
+
|
|
742
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
743
|
+
const token = this.configuration.accessToken;
|
|
744
|
+
const tokenString = await token("bearer", []);
|
|
745
|
+
|
|
746
|
+
if (tokenString) {
|
|
747
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
const response = await this.request({
|
|
751
|
+
path: `/admin/challenges/accounts/{accountId}/reward-usages`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
752
|
+
method: 'GET',
|
|
753
|
+
headers: headerParameters,
|
|
754
|
+
query: queryParameters,
|
|
755
|
+
}, initOverrides);
|
|
756
|
+
|
|
757
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetAccountChallengeRewardUsagesListDtoFromJSON(jsonValue));
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
*
|
|
762
|
+
*/
|
|
763
|
+
async getAccountChallengeRewardUsagesByAccountId(requestParameters: AdminApiGetAccountChallengeRewardUsagesByAccountIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountChallengeRewardUsagesListDto> {
|
|
764
|
+
const response = await this.getAccountChallengeRewardUsagesByAccountIdRaw(requestParameters, initOverrides);
|
|
765
|
+
return await response.value();
|
|
766
|
+
}
|
|
767
|
+
|
|
594
768
|
/**
|
|
595
769
|
*
|
|
596
770
|
*/
|
|
@@ -922,6 +1096,56 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
922
1096
|
return await response.value();
|
|
923
1097
|
}
|
|
924
1098
|
|
|
1099
|
+
/**
|
|
1100
|
+
*
|
|
1101
|
+
*/
|
|
1102
|
+
async getAllFeatureFlagsRaw(requestParameters: AdminApiGetAllFeatureFlagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAllFeatureFlags200Response>> {
|
|
1103
|
+
const queryParameters: any = {};
|
|
1104
|
+
|
|
1105
|
+
if (requestParameters['filter'] != null) {
|
|
1106
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
if (requestParameters['page'] != null) {
|
|
1110
|
+
queryParameters['page'] = requestParameters['page'];
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
if (requestParameters['limit'] != null) {
|
|
1114
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
if (requestParameters['sortBy'] != null) {
|
|
1118
|
+
queryParameters['sortBy'] = requestParameters['sortBy'];
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1122
|
+
|
|
1123
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1124
|
+
const token = this.configuration.accessToken;
|
|
1125
|
+
const tokenString = await token("bearer", []);
|
|
1126
|
+
|
|
1127
|
+
if (tokenString) {
|
|
1128
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
const response = await this.request({
|
|
1132
|
+
path: `/admin/feature-flags`,
|
|
1133
|
+
method: 'GET',
|
|
1134
|
+
headers: headerParameters,
|
|
1135
|
+
query: queryParameters,
|
|
1136
|
+
}, initOverrides);
|
|
1137
|
+
|
|
1138
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetAllFeatureFlags200ResponseFromJSON(jsonValue));
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
*
|
|
1143
|
+
*/
|
|
1144
|
+
async getAllFeatureFlags(requestParameters: AdminApiGetAllFeatureFlagsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllFeatureFlags200Response> {
|
|
1145
|
+
const response = await this.getAllFeatureFlagsRaw(requestParameters, initOverrides);
|
|
1146
|
+
return await response.value();
|
|
1147
|
+
}
|
|
1148
|
+
|
|
925
1149
|
/**
|
|
926
1150
|
*
|
|
927
1151
|
*/
|
|
@@ -1291,6 +1515,40 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1291
1515
|
return await response.value();
|
|
1292
1516
|
}
|
|
1293
1517
|
|
|
1518
|
+
/**
|
|
1519
|
+
*
|
|
1520
|
+
*/
|
|
1521
|
+
async listAllChallengesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminChallengeListDto>> {
|
|
1522
|
+
const queryParameters: any = {};
|
|
1523
|
+
|
|
1524
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1525
|
+
|
|
1526
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1527
|
+
const token = this.configuration.accessToken;
|
|
1528
|
+
const tokenString = await token("bearer", []);
|
|
1529
|
+
|
|
1530
|
+
if (tokenString) {
|
|
1531
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
const response = await this.request({
|
|
1535
|
+
path: `/admin/challenges`,
|
|
1536
|
+
method: 'GET',
|
|
1537
|
+
headers: headerParameters,
|
|
1538
|
+
query: queryParameters,
|
|
1539
|
+
}, initOverrides);
|
|
1540
|
+
|
|
1541
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminChallengeListDtoFromJSON(jsonValue));
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
*
|
|
1546
|
+
*/
|
|
1547
|
+
async listAllChallenges(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminChallengeListDto> {
|
|
1548
|
+
const response = await this.listAllChallengesRaw(initOverrides);
|
|
1549
|
+
return await response.value();
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1294
1552
|
/**
|
|
1295
1553
|
*
|
|
1296
1554
|
*/
|
|
@@ -1985,6 +2243,106 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1985
2243
|
await this.updateAccountSettingsRaw(requestParameters, initOverrides);
|
|
1986
2244
|
}
|
|
1987
2245
|
|
|
2246
|
+
/**
|
|
2247
|
+
*
|
|
2248
|
+
*/
|
|
2249
|
+
async updateChallengeRaw(requestParameters: AdminApiUpdateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
2250
|
+
if (requestParameters['id'] == null) {
|
|
2251
|
+
throw new runtime.RequiredError(
|
|
2252
|
+
'id',
|
|
2253
|
+
'Required parameter "id" was null or undefined when calling updateChallenge().'
|
|
2254
|
+
);
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
if (requestParameters['updateChallengeInput'] == null) {
|
|
2258
|
+
throw new runtime.RequiredError(
|
|
2259
|
+
'updateChallengeInput',
|
|
2260
|
+
'Required parameter "updateChallengeInput" was null or undefined when calling updateChallenge().'
|
|
2261
|
+
);
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
const queryParameters: any = {};
|
|
2265
|
+
|
|
2266
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2267
|
+
|
|
2268
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2269
|
+
|
|
2270
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2271
|
+
const token = this.configuration.accessToken;
|
|
2272
|
+
const tokenString = await token("bearer", []);
|
|
2273
|
+
|
|
2274
|
+
if (tokenString) {
|
|
2275
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
const response = await this.request({
|
|
2279
|
+
path: `/admin/challenges/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
2280
|
+
method: 'PATCH',
|
|
2281
|
+
headers: headerParameters,
|
|
2282
|
+
query: queryParameters,
|
|
2283
|
+
body: UpdateChallengeInputToJSON(requestParameters['updateChallengeInput']),
|
|
2284
|
+
}, initOverrides);
|
|
2285
|
+
|
|
2286
|
+
return new runtime.VoidApiResponse(response);
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
*
|
|
2291
|
+
*/
|
|
2292
|
+
async updateChallenge(requestParameters: AdminApiUpdateChallengeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
2293
|
+
await this.updateChallengeRaw(requestParameters, initOverrides);
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
/**
|
|
2297
|
+
*
|
|
2298
|
+
*/
|
|
2299
|
+
async updateFeatureFlagRaw(requestParameters: AdminApiUpdateFeatureFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
2300
|
+
if (requestParameters['featureFlagId'] == null) {
|
|
2301
|
+
throw new runtime.RequiredError(
|
|
2302
|
+
'featureFlagId',
|
|
2303
|
+
'Required parameter "featureFlagId" was null or undefined when calling updateFeatureFlag().'
|
|
2304
|
+
);
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
if (requestParameters['updateFeatureFlagInput'] == null) {
|
|
2308
|
+
throw new runtime.RequiredError(
|
|
2309
|
+
'updateFeatureFlagInput',
|
|
2310
|
+
'Required parameter "updateFeatureFlagInput" was null or undefined when calling updateFeatureFlag().'
|
|
2311
|
+
);
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2314
|
+
const queryParameters: any = {};
|
|
2315
|
+
|
|
2316
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2317
|
+
|
|
2318
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2319
|
+
|
|
2320
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2321
|
+
const token = this.configuration.accessToken;
|
|
2322
|
+
const tokenString = await token("bearer", []);
|
|
2323
|
+
|
|
2324
|
+
if (tokenString) {
|
|
2325
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
const response = await this.request({
|
|
2329
|
+
path: `/admin/feature-flags/{featureFlagId}`.replace(`{${"featureFlagId"}}`, encodeURIComponent(String(requestParameters['featureFlagId']))),
|
|
2330
|
+
method: 'PATCH',
|
|
2331
|
+
headers: headerParameters,
|
|
2332
|
+
query: queryParameters,
|
|
2333
|
+
body: UpdateFeatureFlagInputToJSON(requestParameters['updateFeatureFlagInput']),
|
|
2334
|
+
}, initOverrides);
|
|
2335
|
+
|
|
2336
|
+
return new runtime.VoidApiResponse(response);
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
/**
|
|
2340
|
+
*
|
|
2341
|
+
*/
|
|
2342
|
+
async updateFeatureFlag(requestParameters: AdminApiUpdateFeatureFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
2343
|
+
await this.updateFeatureFlagRaw(requestParameters, initOverrides);
|
|
2344
|
+
}
|
|
2345
|
+
|
|
1988
2346
|
/**
|
|
1989
2347
|
*
|
|
1990
2348
|
*/
|
|
@@ -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';
|