@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.
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 +10 -0
  34. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +9 -1
  35. package/dist/models/PrivateAccountGetMeResponse.d.ts +10 -0
  36. package/dist/models/PrivateAccountGetMeResponse.js +9 -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 +20 -1
  62. package/src/models/PrivateAccountGetMeResponse.ts +20 -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
@@ -27,6 +27,13 @@ import {
27
27
  AccountOnboardingDtoToJSON,
28
28
  AccountOnboardingDtoToJSONTyped,
29
29
  } from './AccountOnboardingDto';
30
+ import type { ChallengeRewardBalanceDto } from './ChallengeRewardBalanceDto';
31
+ import {
32
+ ChallengeRewardBalanceDtoFromJSON,
33
+ ChallengeRewardBalanceDtoFromJSONTyped,
34
+ ChallengeRewardBalanceDtoToJSON,
35
+ ChallengeRewardBalanceDtoToJSONTyped,
36
+ } from './ChallengeRewardBalanceDto';
30
37
  import type { AccountMetricsDto } from './AccountMetricsDto';
31
38
  import {
32
39
  AccountMetricsDtoFromJSON,
@@ -60,6 +67,12 @@ export interface AccountDto {
60
67
  * @memberof AccountDto
61
68
  */
62
69
  identifier: string;
70
+ /**
71
+ * Challenge reward balance (available and used).
72
+ * @type {ChallengeRewardBalanceDto}
73
+ * @memberof AccountDto
74
+ */
75
+ challengeRewardBalance: ChallengeRewardBalanceDto;
63
76
  /**
64
77
  *
65
78
  * @type {string}
@@ -110,6 +123,7 @@ export interface AccountDto {
110
123
  export function instanceOfAccountDto(value: object): value is AccountDto {
111
124
  if (!('id' in value) || value['id'] === undefined) return false;
112
125
  if (!('identifier' in value) || value['identifier'] === undefined) return false;
126
+ if (!('challengeRewardBalance' in value) || value['challengeRewardBalance'] === undefined) return false;
113
127
  if (!('name' in value) || value['name'] === undefined) return false;
114
128
  if (!('metrics' in value) || value['metrics'] === undefined) return false;
115
129
  if (!('onboarding' in value) || value['onboarding'] === undefined) return false;
@@ -132,6 +146,7 @@ export function AccountDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
132
146
 
133
147
  'id': json['id'],
134
148
  'identifier': json['identifier'],
149
+ 'challengeRewardBalance': ChallengeRewardBalanceDtoFromJSON(json['challengeRewardBalance']),
135
150
  'name': json['name'],
136
151
  'metrics': AccountMetricsDtoFromJSON(json['metrics']),
137
152
  'onboarding': AccountOnboardingDtoFromJSON(json['onboarding']),
@@ -155,6 +170,7 @@ export function AccountDtoToJSONTyped(value?: AccountDto | null, ignoreDiscrimin
155
170
 
156
171
  'id': value['id'],
157
172
  'identifier': value['identifier'],
173
+ 'challengeRewardBalance': ChallengeRewardBalanceDtoToJSON(value['challengeRewardBalance']),
158
174
  'name': value['name'],
159
175
  'metrics': AccountMetricsDtoToJSON(value['metrics']),
160
176
  'onboarding': AccountOnboardingDtoToJSON(value['onboarding']),
@@ -55,6 +55,12 @@ export interface AccountMetricsDto {
55
55
  * @memberof AccountMetricsDto
56
56
  */
57
57
  soldDomainsNumber: number;
58
+ /**
59
+ * Total of pending challenges to collect number
60
+ * @type {number}
61
+ * @memberof AccountMetricsDto
62
+ */
63
+ pendingChallengesToCollectNumber: number;
58
64
  }
59
65
 
60
66
  /**
@@ -67,6 +73,7 @@ export function instanceOfAccountMetricsDto(value: object): value is AccountMetr
67
73
  if (!('activeDomainTransfersNumber' in value) || value['activeDomainTransfersNumber'] === undefined) return false;
68
74
  if (!('tasksNumber' in value) || value['tasksNumber'] === undefined) return false;
69
75
  if (!('soldDomainsNumber' in value) || value['soldDomainsNumber'] === undefined) return false;
76
+ if (!('pendingChallengesToCollectNumber' in value) || value['pendingChallengesToCollectNumber'] === undefined) return false;
70
77
  return true;
71
78
  }
72
79
 
@@ -86,6 +93,7 @@ export function AccountMetricsDtoFromJSONTyped(json: any, ignoreDiscriminator: b
86
93
  'activeDomainTransfersNumber': json['activeDomainTransfersNumber'],
87
94
  'tasksNumber': json['tasksNumber'],
88
95
  'soldDomainsNumber': json['soldDomainsNumber'],
96
+ 'pendingChallengesToCollectNumber': json['pendingChallengesToCollectNumber'],
89
97
  };
90
98
  }
91
99
 
@@ -106,6 +114,7 @@ export function AccountMetricsDtoToJSONTyped(value?: AccountMetricsDto | null, i
106
114
  'activeDomainTransfersNumber': value['activeDomainTransfersNumber'],
107
115
  'tasksNumber': value['tasksNumber'],
108
116
  'soldDomainsNumber': value['soldDomainsNumber'],
117
+ 'pendingChallengesToCollectNumber': value['pendingChallengesToCollectNumber'],
109
118
  };
110
119
  }
111
120
 
@@ -0,0 +1,74 @@
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 { AdminChallengeListItemDto } from './AdminChallengeListItemDto';
17
+ import {
18
+ AdminChallengeListItemDtoFromJSON,
19
+ AdminChallengeListItemDtoFromJSONTyped,
20
+ AdminChallengeListItemDtoToJSON,
21
+ AdminChallengeListItemDtoToJSONTyped,
22
+ } from './AdminChallengeListItemDto';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AdminChallengeListDto
28
+ */
29
+ export interface AdminChallengeListDto {
30
+ /**
31
+ *
32
+ * @type {Array<AdminChallengeListItemDto>}
33
+ * @memberof AdminChallengeListDto
34
+ */
35
+ challenges: Array<AdminChallengeListItemDto>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the AdminChallengeListDto interface.
40
+ */
41
+ export function instanceOfAdminChallengeListDto(value: object): value is AdminChallengeListDto {
42
+ if (!('challenges' in value) || value['challenges'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function AdminChallengeListDtoFromJSON(json: any): AdminChallengeListDto {
47
+ return AdminChallengeListDtoFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function AdminChallengeListDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminChallengeListDto {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'challenges': ((json['challenges'] as Array<any>).map(AdminChallengeListItemDtoFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function AdminChallengeListDtoToJSON(json: any): AdminChallengeListDto {
61
+ return AdminChallengeListDtoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function AdminChallengeListDtoToJSONTyped(value?: AdminChallengeListDto | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'challenges': ((value['challenges'] as Array<any>).map(AdminChallengeListItemDtoToJSON)),
72
+ };
73
+ }
74
+
@@ -0,0 +1,185 @@
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 AdminChallengeListItemDto
20
+ */
21
+ export interface AdminChallengeListItemDto {
22
+ /**
23
+ * Challenge id
24
+ * @type {string}
25
+ * @memberof AdminChallengeListItemDto
26
+ */
27
+ id: string;
28
+ /**
29
+ * Challenge type
30
+ * @type {string}
31
+ * @memberof AdminChallengeListItemDto
32
+ */
33
+ type: AdminChallengeListItemDtoTypeEnum;
34
+ /**
35
+ * Challenge category
36
+ * @type {string}
37
+ * @memberof AdminChallengeListItemDto
38
+ */
39
+ category: AdminChallengeListItemDtoCategoryEnum;
40
+ /**
41
+ * Time scope (e.g. one_time)
42
+ * @type {string}
43
+ * @memberof AdminChallengeListItemDto
44
+ */
45
+ timeScope: AdminChallengeListItemDtoTimeScopeEnum;
46
+ /**
47
+ * Reward type (target or scale)
48
+ * @type {string}
49
+ * @memberof AdminChallengeListItemDto
50
+ */
51
+ rewardType: AdminChallengeListItemDtoRewardTypeEnum;
52
+ /**
53
+ * Target count to complete the challenge
54
+ * @type {number}
55
+ * @memberof AdminChallengeListItemDto
56
+ */
57
+ targetCount: number;
58
+ /**
59
+ * Reward points
60
+ * @type {number}
61
+ * @memberof AdminChallengeListItemDto
62
+ */
63
+ rewardPoints: number;
64
+ /**
65
+ * Scale (threshold -> reward points); only when rewardType is scale
66
+ * @type {object}
67
+ * @memberof AdminChallengeListItemDto
68
+ */
69
+ scale?: object;
70
+ }
71
+
72
+
73
+ /**
74
+ * @export
75
+ */
76
+ export const AdminChallengeListItemDtoTypeEnum = {
77
+ NEW_POINTING_DOMAINS: 'new_pointing_domains',
78
+ ADD_FIRST_DOMAIN: 'add_first_domain',
79
+ NEW_VERIFIED_DOMAINS: 'new_verified_domains',
80
+ KEEP_POINTING_DOMAINS: 'keep_pointing_domains',
81
+ ADD_BANK_ACCOUNT: 'add_bank_account',
82
+ VERIFY_BANK_ACCOUNT: 'verify_bank_account',
83
+ SET_ACCOUNT_AVATAR: 'set_account_avatar',
84
+ SET_ACCOUNT_SHORT_DESCRIPTION: 'set_account_short_description',
85
+ SET_SIDN: 'set_sidn',
86
+ CONFIGURE_FAST_PAYOUT_FOR_TRANSFERS: 'configure_fast_payout_for_transfers',
87
+ RECEIVE_FIRST_PAYOUT: 'receive_first_payout',
88
+ FIRST_SALE_BY_LEAD: 'first_sale_by_lead',
89
+ FIRST_SALE_BY_IMPORTED_LEAD: 'first_sale_by_imported_lead',
90
+ FIRST_SALE_BY_LEASE_TO_OWN: 'first_sale_by_lease_to_own',
91
+ FIRST_SALE_BY_RENT: 'first_sale_by_rent',
92
+ FIRST_SALE_BY_AUCTION: 'first_sale_by_auction',
93
+ NEW_PAID_AUCTIONS: 'new_paid_auctions'
94
+ } as const;
95
+ export type AdminChallengeListItemDtoTypeEnum = typeof AdminChallengeListItemDtoTypeEnum[keyof typeof AdminChallengeListItemDtoTypeEnum];
96
+
97
+ /**
98
+ * @export
99
+ */
100
+ export const AdminChallengeListItemDtoCategoryEnum = {
101
+ DOMAINS: 'domains',
102
+ ACCOUNT: 'account',
103
+ AUCTIONS: 'auctions',
104
+ SALES: 'sales'
105
+ } as const;
106
+ export type AdminChallengeListItemDtoCategoryEnum = typeof AdminChallengeListItemDtoCategoryEnum[keyof typeof AdminChallengeListItemDtoCategoryEnum];
107
+
108
+ /**
109
+ * @export
110
+ */
111
+ export const AdminChallengeListItemDtoTimeScopeEnum = {
112
+ ONE_TIME: 'one_time',
113
+ WEEKLY: 'weekly',
114
+ MONTHLY: 'monthly',
115
+ YEARLY: 'yearly'
116
+ } as const;
117
+ export type AdminChallengeListItemDtoTimeScopeEnum = typeof AdminChallengeListItemDtoTimeScopeEnum[keyof typeof AdminChallengeListItemDtoTimeScopeEnum];
118
+
119
+ /**
120
+ * @export
121
+ */
122
+ export const AdminChallengeListItemDtoRewardTypeEnum = {
123
+ TARGET: 'target',
124
+ SCALE: 'scale'
125
+ } as const;
126
+ export type AdminChallengeListItemDtoRewardTypeEnum = typeof AdminChallengeListItemDtoRewardTypeEnum[keyof typeof AdminChallengeListItemDtoRewardTypeEnum];
127
+
128
+
129
+ /**
130
+ * Check if a given object implements the AdminChallengeListItemDto interface.
131
+ */
132
+ export function instanceOfAdminChallengeListItemDto(value: object): value is AdminChallengeListItemDto {
133
+ if (!('id' in value) || value['id'] === undefined) return false;
134
+ if (!('type' in value) || value['type'] === undefined) return false;
135
+ if (!('category' in value) || value['category'] === undefined) return false;
136
+ if (!('timeScope' in value) || value['timeScope'] === undefined) return false;
137
+ if (!('rewardType' in value) || value['rewardType'] === undefined) return false;
138
+ if (!('targetCount' in value) || value['targetCount'] === undefined) return false;
139
+ if (!('rewardPoints' in value) || value['rewardPoints'] === undefined) return false;
140
+ return true;
141
+ }
142
+
143
+ export function AdminChallengeListItemDtoFromJSON(json: any): AdminChallengeListItemDto {
144
+ return AdminChallengeListItemDtoFromJSONTyped(json, false);
145
+ }
146
+
147
+ export function AdminChallengeListItemDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminChallengeListItemDto {
148
+ if (json == null) {
149
+ return json;
150
+ }
151
+ return {
152
+
153
+ 'id': json['id'],
154
+ 'type': json['type'],
155
+ 'category': json['category'],
156
+ 'timeScope': json['timeScope'],
157
+ 'rewardType': json['rewardType'],
158
+ 'targetCount': json['targetCount'],
159
+ 'rewardPoints': json['rewardPoints'],
160
+ 'scale': json['scale'] == null ? undefined : json['scale'],
161
+ };
162
+ }
163
+
164
+ export function AdminChallengeListItemDtoToJSON(json: any): AdminChallengeListItemDto {
165
+ return AdminChallengeListItemDtoToJSONTyped(json, false);
166
+ }
167
+
168
+ export function AdminChallengeListItemDtoToJSONTyped(value?: AdminChallengeListItemDto | null, ignoreDiscriminator: boolean = false): any {
169
+ if (value == null) {
170
+ return value;
171
+ }
172
+
173
+ return {
174
+
175
+ 'id': value['id'],
176
+ 'type': value['type'],
177
+ 'category': value['category'],
178
+ 'timeScope': value['timeScope'],
179
+ 'rewardType': value['rewardType'],
180
+ 'targetCount': value['targetCount'],
181
+ 'rewardPoints': value['rewardPoints'],
182
+ 'scale': value['scale'],
183
+ };
184
+ }
185
+
@@ -20,6 +20,13 @@ import {
20
20
  ListAccountMetricsDtoToJSON,
21
21
  ListAccountMetricsDtoToJSONTyped,
22
22
  } from './ListAccountMetricsDto';
23
+ import type { ChallengeRewardBalanceDto } from './ChallengeRewardBalanceDto';
24
+ import {
25
+ ChallengeRewardBalanceDtoFromJSON,
26
+ ChallengeRewardBalanceDtoFromJSONTyped,
27
+ ChallengeRewardBalanceDtoToJSON,
28
+ ChallengeRewardBalanceDtoToJSONTyped,
29
+ } from './ChallengeRewardBalanceDto';
23
30
  import type { ListAccountPortfolioSizeDto } from './ListAccountPortfolioSizeDto';
24
31
  import {
25
32
  ListAccountPortfolioSizeDtoFromJSON,
@@ -95,6 +102,12 @@ export interface AdminListAccountDto {
95
102
  * @memberof AdminListAccountDto
96
103
  */
97
104
  companyName: string | null;
105
+ /**
106
+ * Challenge reward balance (available and used).
107
+ * @type {ChallengeRewardBalanceDto}
108
+ * @memberof AdminListAccountDto
109
+ */
110
+ challengeRewardBalance: ChallengeRewardBalanceDto;
98
111
  /**
99
112
  *
100
113
  * @type {string}
@@ -182,6 +195,7 @@ export function instanceOfAdminListAccountDto(value: object): value is AdminList
182
195
  if (!('affiliateId' in value) || value['affiliateId'] === undefined) return false;
183
196
  if (!('portfolioSize' in value) || value['portfolioSize'] === undefined) return false;
184
197
  if (!('companyName' in value) || value['companyName'] === undefined) return false;
198
+ if (!('challengeRewardBalance' in value) || value['challengeRewardBalance'] === undefined) return false;
185
199
  if (!('identifier' in value) || value['identifier'] === undefined) return false;
186
200
  if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
187
201
  if (!('name' in value) || value['name'] === undefined) return false;
@@ -211,6 +225,7 @@ export function AdminListAccountDtoFromJSONTyped(json: any, ignoreDiscriminator:
211
225
  'affiliateId': json['affiliateId'],
212
226
  'portfolioSize': ListAccountPortfolioSizeDtoFromJSON(json['portfolioSize']),
213
227
  'companyName': json['companyName'],
228
+ 'challengeRewardBalance': ChallengeRewardBalanceDtoFromJSON(json['challengeRewardBalance']),
214
229
  'identifier': json['identifier'],
215
230
  'createdAt': (new Date(json['createdAt'])),
216
231
  'name': json['name'],
@@ -241,6 +256,7 @@ export function AdminListAccountDtoToJSONTyped(value?: AdminListAccountDto | nul
241
256
  'affiliateId': value['affiliateId'],
242
257
  'portfolioSize': ListAccountPortfolioSizeDtoToJSON(value['portfolioSize']),
243
258
  'companyName': value['companyName'],
259
+ 'challengeRewardBalance': ChallengeRewardBalanceDtoToJSON(value['challengeRewardBalance']),
244
260
  'identifier': value['identifier'],
245
261
  'createdAt': ((value['createdAt']).toISOString()),
246
262
  'name': value['name'],
@@ -0,0 +1,75 @@
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 ChallengeRewardBalanceDto
20
+ */
21
+ export interface ChallengeRewardBalanceDto {
22
+ /**
23
+ * Available challenge reward balance (points) that can be applied to reduce commission.
24
+ * @type {number}
25
+ * @memberof ChallengeRewardBalanceDto
26
+ */
27
+ balancePoints: number;
28
+ /**
29
+ * Challenge reward balance (points) already used to reduce commission.
30
+ * @type {number}
31
+ * @memberof ChallengeRewardBalanceDto
32
+ */
33
+ usedPoints: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ChallengeRewardBalanceDto interface.
38
+ */
39
+ export function instanceOfChallengeRewardBalanceDto(value: object): value is ChallengeRewardBalanceDto {
40
+ if (!('balancePoints' in value) || value['balancePoints'] === undefined) return false;
41
+ if (!('usedPoints' in value) || value['usedPoints'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function ChallengeRewardBalanceDtoFromJSON(json: any): ChallengeRewardBalanceDto {
46
+ return ChallengeRewardBalanceDtoFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function ChallengeRewardBalanceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChallengeRewardBalanceDto {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'balancePoints': json['balancePoints'],
56
+ 'usedPoints': json['usedPoints'],
57
+ };
58
+ }
59
+
60
+ export function ChallengeRewardBalanceDtoToJSON(json: any): ChallengeRewardBalanceDto {
61
+ return ChallengeRewardBalanceDtoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function ChallengeRewardBalanceDtoToJSONTyped(value?: ChallengeRewardBalanceDto | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'balancePoints': value['balancePoints'],
72
+ 'usedPoints': value['usedPoints'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,109 @@
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 CreateChallengeInput
20
+ */
21
+ export interface CreateChallengeInput {
22
+ /**
23
+ * Challenge type
24
+ * @type {string}
25
+ * @memberof CreateChallengeInput
26
+ */
27
+ type: CreateChallengeInputTypeEnum;
28
+ /**
29
+ * Reward points
30
+ * @type {number}
31
+ * @memberof CreateChallengeInput
32
+ */
33
+ rewardPoints: number;
34
+ /**
35
+ * Target count (required for multi-count challenge types: new_pointing_domains, new_verified_domains, new_paid_auctions)
36
+ * @type {number}
37
+ * @memberof CreateChallengeInput
38
+ */
39
+ targetCount?: number;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const CreateChallengeInputTypeEnum = {
47
+ NEW_POINTING_DOMAINS: 'new_pointing_domains',
48
+ ADD_FIRST_DOMAIN: 'add_first_domain',
49
+ NEW_VERIFIED_DOMAINS: 'new_verified_domains',
50
+ KEEP_POINTING_DOMAINS: 'keep_pointing_domains',
51
+ ADD_BANK_ACCOUNT: 'add_bank_account',
52
+ VERIFY_BANK_ACCOUNT: 'verify_bank_account',
53
+ SET_ACCOUNT_AVATAR: 'set_account_avatar',
54
+ SET_ACCOUNT_SHORT_DESCRIPTION: 'set_account_short_description',
55
+ SET_SIDN: 'set_sidn',
56
+ CONFIGURE_FAST_PAYOUT_FOR_TRANSFERS: 'configure_fast_payout_for_transfers',
57
+ RECEIVE_FIRST_PAYOUT: 'receive_first_payout',
58
+ FIRST_SALE_BY_LEAD: 'first_sale_by_lead',
59
+ FIRST_SALE_BY_IMPORTED_LEAD: 'first_sale_by_imported_lead',
60
+ FIRST_SALE_BY_LEASE_TO_OWN: 'first_sale_by_lease_to_own',
61
+ FIRST_SALE_BY_RENT: 'first_sale_by_rent',
62
+ FIRST_SALE_BY_AUCTION: 'first_sale_by_auction',
63
+ NEW_PAID_AUCTIONS: 'new_paid_auctions'
64
+ } as const;
65
+ export type CreateChallengeInputTypeEnum = typeof CreateChallengeInputTypeEnum[keyof typeof CreateChallengeInputTypeEnum];
66
+
67
+
68
+ /**
69
+ * Check if a given object implements the CreateChallengeInput interface.
70
+ */
71
+ export function instanceOfCreateChallengeInput(value: object): value is CreateChallengeInput {
72
+ if (!('type' in value) || value['type'] === undefined) return false;
73
+ if (!('rewardPoints' in value) || value['rewardPoints'] === undefined) return false;
74
+ return true;
75
+ }
76
+
77
+ export function CreateChallengeInputFromJSON(json: any): CreateChallengeInput {
78
+ return CreateChallengeInputFromJSONTyped(json, false);
79
+ }
80
+
81
+ export function CreateChallengeInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateChallengeInput {
82
+ if (json == null) {
83
+ return json;
84
+ }
85
+ return {
86
+
87
+ 'type': json['type'],
88
+ 'rewardPoints': json['rewardPoints'],
89
+ 'targetCount': json['targetCount'] == null ? undefined : json['targetCount'],
90
+ };
91
+ }
92
+
93
+ export function CreateChallengeInputToJSON(json: any): CreateChallengeInput {
94
+ return CreateChallengeInputToJSONTyped(json, false);
95
+ }
96
+
97
+ export function CreateChallengeInputToJSONTyped(value?: CreateChallengeInput | null, ignoreDiscriminator: boolean = false): any {
98
+ if (value == null) {
99
+ return value;
100
+ }
101
+
102
+ return {
103
+
104
+ 'type': value['type'],
105
+ 'rewardPoints': value['rewardPoints'],
106
+ 'targetCount': value['targetCount'],
107
+ };
108
+ }
109
+
@@ -0,0 +1,74 @@
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 { AccountChallengeRewardUsageListItemDto } from './AccountChallengeRewardUsageListItemDto';
17
+ import {
18
+ AccountChallengeRewardUsageListItemDtoFromJSON,
19
+ AccountChallengeRewardUsageListItemDtoFromJSONTyped,
20
+ AccountChallengeRewardUsageListItemDtoToJSON,
21
+ AccountChallengeRewardUsageListItemDtoToJSONTyped,
22
+ } from './AccountChallengeRewardUsageListItemDto';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface GetAccountChallengeRewardUsagesListDto
28
+ */
29
+ export interface GetAccountChallengeRewardUsagesListDto {
30
+ /**
31
+ *
32
+ * @type {Array<AccountChallengeRewardUsageListItemDto>}
33
+ * @memberof GetAccountChallengeRewardUsagesListDto
34
+ */
35
+ usages: Array<AccountChallengeRewardUsageListItemDto>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the GetAccountChallengeRewardUsagesListDto interface.
40
+ */
41
+ export function instanceOfGetAccountChallengeRewardUsagesListDto(value: object): value is GetAccountChallengeRewardUsagesListDto {
42
+ if (!('usages' in value) || value['usages'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function GetAccountChallengeRewardUsagesListDtoFromJSON(json: any): GetAccountChallengeRewardUsagesListDto {
47
+ return GetAccountChallengeRewardUsagesListDtoFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function GetAccountChallengeRewardUsagesListDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAccountChallengeRewardUsagesListDto {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'usages': ((json['usages'] as Array<any>).map(AccountChallengeRewardUsageListItemDtoFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function GetAccountChallengeRewardUsagesListDtoToJSON(json: any): GetAccountChallengeRewardUsagesListDto {
61
+ return GetAccountChallengeRewardUsagesListDtoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function GetAccountChallengeRewardUsagesListDtoToJSONTyped(value?: GetAccountChallengeRewardUsagesListDto | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'usages': ((value['usages'] as Array<any>).map(AccountChallengeRewardUsageListItemDtoToJSON)),
72
+ };
73
+ }
74
+