@randock/nameshift-api-client 0.0.445 → 0.0.447

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 (82) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/README.md +3 -3
  3. package/dist/apis/AccountsApi.d.ts +2 -2
  4. package/dist/apis/AccountsApi.js +2 -2
  5. package/dist/apis/AdminApi.d.ts +16 -3
  6. package/dist/apis/AdminApi.js +59 -2
  7. package/dist/apis/MarketApi.d.ts +71 -0
  8. package/dist/apis/MarketApi.js +299 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/models/AccountNameshiftCommissionBySubtypeDto.d.ts +6 -0
  12. package/dist/models/AccountNameshiftCommissionBySubtypeDto.js +4 -0
  13. package/dist/models/AccountNameshiftCommissionByTypeDto.d.ts +2 -2
  14. package/dist/models/AccountNameshiftCommissionItemDto.d.ts +12 -0
  15. package/dist/models/AccountNameshiftCommissionItemDto.js +8 -0
  16. package/dist/models/AccountNameshiftCommissionReasonDto.d.ts +21 -0
  17. package/dist/models/AccountNameshiftCommissionReasonDto.js +13 -1
  18. package/dist/models/CommissionConfigurationSimulationInput.d.ts +33 -0
  19. package/dist/models/CommissionConfigurationSimulationInput.js +52 -0
  20. package/dist/models/CommissionConfigurationSimulationInputPayload.d.ts +27 -0
  21. package/dist/models/CommissionConfigurationSimulationInputPayload.js +54 -0
  22. package/dist/models/CommissionDto.d.ts +12 -0
  23. package/dist/models/CommissionDto.js +8 -0
  24. package/dist/models/CommissionFactor.d.ts +1 -1
  25. package/dist/models/CommissionFactor.js +1 -1
  26. package/dist/models/CommissionPayloadInput.d.ts +12 -0
  27. package/dist/models/CommissionPayloadInput.js +4 -0
  28. package/dist/models/CommissionReasonDto.d.ts +33 -0
  29. package/dist/models/CommissionReasonDto.js +17 -1
  30. package/dist/models/CommissionSimulationItemInput.d.ts +123 -0
  31. package/dist/models/CommissionSimulationItemInput.js +113 -0
  32. package/dist/models/CommissionSimulationResultDto.d.ts +39 -0
  33. package/dist/models/CommissionSimulationResultDto.js +56 -0
  34. package/dist/models/FixedCommissionPayloadSimulationInput.d.ts +39 -0
  35. package/dist/models/FixedCommissionPayloadSimulationInput.js +56 -0
  36. package/dist/models/GetAccountNameshiftCommissionsResponseDto.d.ts +1 -1
  37. package/dist/models/IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDto.d.ts +6 -0
  38. package/dist/models/IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDto.js +4 -0
  39. package/dist/models/LeadDto.d.ts +6 -0
  40. package/dist/models/LeadDto.js +4 -0
  41. package/dist/models/ListLeadsResultItem.d.ts +6 -0
  42. package/dist/models/ListLeadsResultItem.js +4 -0
  43. package/dist/models/MozMetrics.d.ts +6 -0
  44. package/dist/models/MozMetrics.js +4 -0
  45. package/dist/models/PopularCategoryDto.d.ts +44 -0
  46. package/dist/models/PopularCategoryDto.js +59 -0
  47. package/dist/models/SalesCountCommissionPayloadSimulationInput.d.ts +40 -0
  48. package/dist/models/SalesCountCommissionPayloadSimulationInput.js +57 -0
  49. package/dist/models/SellerLeadDetails.d.ts +6 -0
  50. package/dist/models/SellerLeadDetails.js +4 -0
  51. package/dist/models/SimulateCommissionInput.d.ts +67 -0
  52. package/dist/models/SimulateCommissionInput.js +78 -0
  53. package/dist/models/index.d.ts +8 -0
  54. package/dist/models/index.js +8 -0
  55. package/package.json +1 -1
  56. package/src/apis/AccountsApi.ts +2 -2
  57. package/src/apis/AdminApi.ts +58 -2
  58. package/src/apis/MarketApi.ts +204 -0
  59. package/src/apis/index.ts +1 -0
  60. package/src/models/AccountNameshiftCommissionBySubtypeDto.ts +9 -0
  61. package/src/models/AccountNameshiftCommissionByTypeDto.ts +2 -2
  62. package/src/models/AccountNameshiftCommissionItemDto.ts +18 -0
  63. package/src/models/AccountNameshiftCommissionReasonDto.ts +26 -0
  64. package/src/models/CommissionConfigurationSimulationInput.ts +74 -0
  65. package/src/models/CommissionConfigurationSimulationInputPayload.ts +73 -0
  66. package/src/models/CommissionDto.ts +18 -0
  67. package/src/models/CommissionFactor.ts +1 -1
  68. package/src/models/CommissionPayloadInput.ts +16 -0
  69. package/src/models/CommissionReasonDto.ts +42 -0
  70. package/src/models/CommissionSimulationItemInput.ts +202 -0
  71. package/src/models/CommissionSimulationResultDto.ts +83 -0
  72. package/src/models/FixedCommissionPayloadSimulationInput.ts +85 -0
  73. package/src/models/GetAccountNameshiftCommissionsResponseDto.ts +1 -1
  74. package/src/models/IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDto.ts +9 -0
  75. package/src/models/LeadDto.ts +9 -0
  76. package/src/models/ListLeadsResultItem.ts +9 -0
  77. package/src/models/MozMetrics.ts +9 -0
  78. package/src/models/PopularCategoryDto.ts +84 -0
  79. package/src/models/SalesCountCommissionPayloadSimulationInput.ts +92 -0
  80. package/src/models/SellerLeadDetails.ts +9 -0
  81. package/src/models/SimulateCommissionInput.ts +123 -0
  82. package/src/models/index.ts +8 -0
@@ -0,0 +1,204 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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
+ PopularCategoryDto,
19
+ PublicDomainDto,
20
+ PublicSaleDto,
21
+ ValidationException,
22
+ } from '../models/index';
23
+ import {
24
+ PopularCategoryDtoFromJSON,
25
+ PopularCategoryDtoToJSON,
26
+ PublicDomainDtoFromJSON,
27
+ PublicDomainDtoToJSON,
28
+ PublicSaleDtoFromJSON,
29
+ PublicSaleDtoToJSON,
30
+ ValidationExceptionFromJSON,
31
+ ValidationExceptionToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface MarketApiListPopularCategoriesRequest {
35
+ limit?: number;
36
+ }
37
+
38
+ export interface MarketApiListRecentSalesRequest {
39
+ limit?: number;
40
+ }
41
+
42
+ export interface MarketApiListShowcaseDomainsRequest {
43
+ limit?: number;
44
+ }
45
+
46
+ export interface MarketApiListTopSalesRequest {
47
+ limit?: number;
48
+ months?: number;
49
+ }
50
+
51
+ /**
52
+ *
53
+ */
54
+ export class MarketApi extends runtime.BaseAPI {
55
+
56
+ /**
57
+ * Returns the categories with the most linked domains, most popular first.
58
+ * List popular domain categories
59
+ */
60
+ async listPopularCategoriesRaw(requestParameters: MarketApiListPopularCategoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PopularCategoryDto>>> {
61
+ const queryParameters: any = {};
62
+
63
+ if (requestParameters['limit'] != null) {
64
+ queryParameters['limit'] = requestParameters['limit'];
65
+ }
66
+
67
+ const headerParameters: runtime.HTTPHeaders = {};
68
+
69
+ if (this.configuration && this.configuration.apiKey) {
70
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
71
+ }
72
+
73
+ const response = await this.request({
74
+ path: `/market/categories/popular`,
75
+ method: 'GET',
76
+ headers: headerParameters,
77
+ query: queryParameters,
78
+ }, initOverrides);
79
+
80
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PopularCategoryDtoFromJSON));
81
+ }
82
+
83
+ /**
84
+ * Returns the categories with the most linked domains, most popular first.
85
+ * List popular domain categories
86
+ */
87
+ async listPopularCategories(requestParameters: MarketApiListPopularCategoriesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PopularCategoryDto>> {
88
+ const response = await this.listPopularCategoriesRaw(requestParameters, initOverrides);
89
+ return await response.value();
90
+ }
91
+
92
+ /**
93
+ * Returns the latest sales on the platform (buy-now and subscription starts), newest first.
94
+ * List recent sales
95
+ */
96
+ async listRecentSalesRaw(requestParameters: MarketApiListRecentSalesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PublicSaleDto>>> {
97
+ const queryParameters: any = {};
98
+
99
+ if (requestParameters['limit'] != null) {
100
+ queryParameters['limit'] = requestParameters['limit'];
101
+ }
102
+
103
+ const headerParameters: runtime.HTTPHeaders = {};
104
+
105
+ if (this.configuration && this.configuration.apiKey) {
106
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
107
+ }
108
+
109
+ const response = await this.request({
110
+ path: `/market/sales/recent`,
111
+ method: 'GET',
112
+ headers: headerParameters,
113
+ query: queryParameters,
114
+ }, initOverrides);
115
+
116
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PublicSaleDtoFromJSON));
117
+ }
118
+
119
+ /**
120
+ * Returns the latest sales on the platform (buy-now and subscription starts), newest first.
121
+ * List recent sales
122
+ */
123
+ async listRecentSales(requestParameters: MarketApiListRecentSalesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublicSaleDto>> {
124
+ const response = await this.listRecentSalesRaw(requestParameters, initOverrides);
125
+ return await response.value();
126
+ }
127
+
128
+ /**
129
+ * Returns a showcase of listed domains: the public catalogue in its default ranking (domain authority).
130
+ * List showcase domains
131
+ */
132
+ async listShowcaseDomainsRaw(requestParameters: MarketApiListShowcaseDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PublicDomainDto>>> {
133
+ const queryParameters: any = {};
134
+
135
+ if (requestParameters['limit'] != null) {
136
+ queryParameters['limit'] = requestParameters['limit'];
137
+ }
138
+
139
+ const headerParameters: runtime.HTTPHeaders = {};
140
+
141
+ if (this.configuration && this.configuration.apiKey) {
142
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
143
+ }
144
+
145
+ const response = await this.request({
146
+ path: `/market/showcase`,
147
+ method: 'GET',
148
+ headers: headerParameters,
149
+ query: queryParameters,
150
+ }, initOverrides);
151
+
152
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PublicDomainDtoFromJSON));
153
+ }
154
+
155
+ /**
156
+ * Returns a showcase of listed domains: the public catalogue in its default ranking (domain authority).
157
+ * List showcase domains
158
+ */
159
+ async listShowcaseDomains(requestParameters: MarketApiListShowcaseDomainsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublicDomainDto>> {
160
+ const response = await this.listShowcaseDomainsRaw(requestParameters, initOverrides);
161
+ return await response.value();
162
+ }
163
+
164
+ /**
165
+ * Returns the platform’s own highest-priced buy-now sales within the window, ranked by the EUR-normalized ex-VAT total, highest first.
166
+ * List top sales
167
+ */
168
+ async listTopSalesRaw(requestParameters: MarketApiListTopSalesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PublicSaleDto>>> {
169
+ const queryParameters: any = {};
170
+
171
+ if (requestParameters['limit'] != null) {
172
+ queryParameters['limit'] = requestParameters['limit'];
173
+ }
174
+
175
+ if (requestParameters['months'] != null) {
176
+ queryParameters['months'] = requestParameters['months'];
177
+ }
178
+
179
+ const headerParameters: runtime.HTTPHeaders = {};
180
+
181
+ if (this.configuration && this.configuration.apiKey) {
182
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
183
+ }
184
+
185
+ const response = await this.request({
186
+ path: `/market/sales/top`,
187
+ method: 'GET',
188
+ headers: headerParameters,
189
+ query: queryParameters,
190
+ }, initOverrides);
191
+
192
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PublicSaleDtoFromJSON));
193
+ }
194
+
195
+ /**
196
+ * Returns the platform’s own highest-priced buy-now sales within the window, ranked by the EUR-normalized ex-VAT total, highest first.
197
+ * List top sales
198
+ */
199
+ async listTopSales(requestParameters: MarketApiListTopSalesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublicSaleDto>> {
200
+ const response = await this.listTopSalesRaw(requestParameters, initOverrides);
201
+ return await response.value();
202
+ }
203
+
204
+ }
package/src/apis/index.ts CHANGED
@@ -17,6 +17,7 @@ export * from './EppApi';
17
17
  export * from './InvoicesApi';
18
18
  export * from './LeadsApi';
19
19
  export * from './LeadsPublicApi';
20
+ export * from './MarketApi';
20
21
  export * from './MarketingApi';
21
22
  export * from './NotificationsApi';
22
23
  export * from './OrdersPublicApi';
@@ -33,6 +33,12 @@ export interface AccountNameshiftCommissionBySubtypeDto {
33
33
  * @memberof AccountNameshiftCommissionBySubtypeDto
34
34
  */
35
35
  subtype: AccountNameshiftCommissionBySubtypeDtoSubtypeEnum;
36
+ /**
37
+ * Domain extensions this current commission applies to. Null means all other extensions.
38
+ * @type {Array<string>}
39
+ * @memberof AccountNameshiftCommissionBySubtypeDto
40
+ */
41
+ tlds: Array<string> | null;
36
42
  /**
37
43
  * Effective commission percentage.
38
44
  * @type {number}
@@ -65,6 +71,7 @@ export type AccountNameshiftCommissionBySubtypeDtoSubtypeEnum = typeof AccountNa
65
71
  */
66
72
  export function instanceOfAccountNameshiftCommissionBySubtypeDto(value: object): value is AccountNameshiftCommissionBySubtypeDto {
67
73
  if (!('subtype' in value) || value['subtype'] === undefined) return false;
74
+ if (!('tlds' in value) || value['tlds'] === undefined) return false;
68
75
  if (!('percentage' in value) || value['percentage'] === undefined) return false;
69
76
  if (!('reason' in value) || value['reason'] === undefined) return false;
70
77
  return true;
@@ -81,6 +88,7 @@ export function AccountNameshiftCommissionBySubtypeDtoFromJSONTyped(json: any, i
81
88
  return {
82
89
 
83
90
  'subtype': json['subtype'],
91
+ 'tlds': json['tlds'] == null ? null : json['tlds'],
84
92
  'percentage': json['percentage'],
85
93
  'reason': CommissionReasonDtoFromJSON(json['reason']),
86
94
  };
@@ -98,6 +106,7 @@ export function AccountNameshiftCommissionBySubtypeDtoToJSONTyped(value?: Accoun
98
106
  return {
99
107
 
100
108
  'subtype': value['subtype'],
109
+ 'tlds': value['tlds'],
101
110
  'percentage': value['percentage'],
102
111
  'reason': CommissionReasonDtoToJSON(value['reason']),
103
112
  };
@@ -35,13 +35,13 @@ import {
35
35
  */
36
36
  export interface AccountNameshiftCommissionByTypeDto {
37
37
  /**
38
- * Commissions grouped by subtype.
38
+ * Current commissions by subtype and domain extension group.
39
39
  * @type {Array<AccountNameshiftCommissionBySubtypeDto>}
40
40
  * @memberof AccountNameshiftCommissionByTypeDto
41
41
  */
42
42
  commissions: Array<AccountNameshiftCommissionBySubtypeDto>;
43
43
  /**
44
- * List of nameshift commissions (not expired or not yet started)
44
+ * Commission schedules for the account.
45
45
  * @type {Array<AccountNameshiftCommissionItemDto>}
46
46
  * @memberof AccountNameshiftCommissionByTypeDto
47
47
  */
@@ -63,6 +63,18 @@ export interface AccountNameshiftCommissionItemDto {
63
63
  * @memberof AccountNameshiftCommissionItemDto
64
64
  */
65
65
  dateEnd: Date | null;
66
+ /**
67
+ * Domain extensions this commission applies to. When empty, the commission applies to all extensions.
68
+ * @type {Array<string>}
69
+ * @memberof AccountNameshiftCommissionItemDto
70
+ */
71
+ tlds: Array<string>;
72
+ /**
73
+ * Domain extensions excluded from this commission.
74
+ * @type {Array<string>}
75
+ * @memberof AccountNameshiftCommissionItemDto
76
+ */
77
+ excludedTlds: Array<string>;
66
78
  }
67
79
 
68
80
 
@@ -88,6 +100,8 @@ export function instanceOfAccountNameshiftCommissionItemDto(value: object): valu
88
100
  if (!('config' in value) || value['config'] === undefined) return false;
89
101
  if (!('dateStart' in value) || value['dateStart'] === undefined) return false;
90
102
  if (!('dateEnd' in value) || value['dateEnd'] === undefined) return false;
103
+ if (!('tlds' in value) || value['tlds'] === undefined) return false;
104
+ if (!('excludedTlds' in value) || value['excludedTlds'] === undefined) return false;
91
105
  return true;
92
106
  }
93
107
 
@@ -107,6 +121,8 @@ export function AccountNameshiftCommissionItemDtoFromJSONTyped(json: any, ignore
107
121
  'config': CommissionConfigurationDtoFromJSON(json['config']),
108
122
  'dateStart': (new Date(json['dateStart'])),
109
123
  'dateEnd': (json['dateEnd'] == null ? null : new Date(json['dateEnd'])),
124
+ 'tlds': json['tlds'],
125
+ 'excludedTlds': json['excludedTlds'],
110
126
  };
111
127
  }
112
128
 
@@ -127,6 +143,8 @@ export function AccountNameshiftCommissionItemDtoToJSONTyped(value?: AccountName
127
143
  'config': CommissionConfigurationDtoToJSON(value['config']),
128
144
  'dateStart': ((value['dateStart']).toISOString()),
129
145
  'dateEnd': (value['dateEnd'] == null ? null : (value['dateEnd'] as any).toISOString()),
146
+ 'tlds': value['tlds'],
147
+ 'excludedTlds': value['excludedTlds'],
130
148
  };
131
149
  }
132
150
 
@@ -100,6 +100,18 @@ export interface AccountNameshiftCommissionReasonDto {
100
100
  * @memberof AccountNameshiftCommissionReasonDto
101
101
  */
102
102
  factorCountResult?: number | null;
103
+ /**
104
+ * How the commission was selected for the domain extension.
105
+ * @type {string}
106
+ * @memberof AccountNameshiftCommissionReasonDto
107
+ */
108
+ tldMatchType?: AccountNameshiftCommissionReasonDtoTldMatchTypeEnum;
109
+ /**
110
+ * Domain extension used to select the commission, if any.
111
+ * @type {string}
112
+ * @memberof AccountNameshiftCommissionReasonDto
113
+ */
114
+ tldMatchedValue?: string | null;
103
115
  }
104
116
 
105
117
 
@@ -123,6 +135,16 @@ export const AccountNameshiftCommissionReasonDtoSubtypeEnum = {
123
135
  } as const;
124
136
  export type AccountNameshiftCommissionReasonDtoSubtypeEnum = typeof AccountNameshiftCommissionReasonDtoSubtypeEnum[keyof typeof AccountNameshiftCommissionReasonDtoSubtypeEnum];
125
137
 
138
+ /**
139
+ * @export
140
+ */
141
+ export const AccountNameshiftCommissionReasonDtoTldMatchTypeEnum = {
142
+ NULL_TLD_DEFAULT: 'null_tld_default',
143
+ INCLUDED_TLD_LIST: 'included_tld_list',
144
+ ALL_TLDS_DEFAULT: 'all_tlds_default'
145
+ } as const;
146
+ export type AccountNameshiftCommissionReasonDtoTldMatchTypeEnum = typeof AccountNameshiftCommissionReasonDtoTldMatchTypeEnum[keyof typeof AccountNameshiftCommissionReasonDtoTldMatchTypeEnum];
147
+
126
148
 
127
149
  /**
128
150
  * Check if a given object implements the AccountNameshiftCommissionReasonDto interface.
@@ -152,6 +174,8 @@ export function AccountNameshiftCommissionReasonDtoFromJSONTyped(json: any, igno
152
174
  'selectedValue': json['selectedValue'] == null ? undefined : json['selectedValue'],
153
175
  'selectedTier': json['selectedTier'] == null ? undefined : CommissionPercentageRangeDtoFromJSON(json['selectedTier']),
154
176
  'factorCountResult': json['factorCountResult'] == null ? undefined : json['factorCountResult'],
177
+ 'tldMatchType': json['tldMatchType'] == null ? undefined : json['tldMatchType'],
178
+ 'tldMatchedValue': json['tldMatchedValue'] == null ? undefined : json['tldMatchedValue'],
155
179
  };
156
180
  }
157
181
 
@@ -177,6 +201,8 @@ export function AccountNameshiftCommissionReasonDtoToJSONTyped(value?: AccountNa
177
201
  'selectedValue': value['selectedValue'],
178
202
  'selectedTier': CommissionPercentageRangeDtoToJSON(value['selectedTier']),
179
203
  'factorCountResult': value['factorCountResult'],
204
+ 'tldMatchType': value['tldMatchType'],
205
+ 'tldMatchedValue': value['tldMatchedValue'],
180
206
  };
181
207
  }
182
208
 
@@ -0,0 +1,74 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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 { CommissionConfigurationSimulationInputPayload } from './CommissionConfigurationSimulationInputPayload';
17
+ import {
18
+ CommissionConfigurationSimulationInputPayloadFromJSON,
19
+ CommissionConfigurationSimulationInputPayloadFromJSONTyped,
20
+ CommissionConfigurationSimulationInputPayloadToJSON,
21
+ CommissionConfigurationSimulationInputPayloadToJSONTyped,
22
+ } from './CommissionConfigurationSimulationInputPayload';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CommissionConfigurationSimulationInput
28
+ */
29
+ export interface CommissionConfigurationSimulationInput {
30
+ /**
31
+ *
32
+ * @type {CommissionConfigurationSimulationInputPayload}
33
+ * @memberof CommissionConfigurationSimulationInput
34
+ */
35
+ payload: CommissionConfigurationSimulationInputPayload;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the CommissionConfigurationSimulationInput interface.
40
+ */
41
+ export function instanceOfCommissionConfigurationSimulationInput(value: object): value is CommissionConfigurationSimulationInput {
42
+ if (!('payload' in value) || value['payload'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function CommissionConfigurationSimulationInputFromJSON(json: any): CommissionConfigurationSimulationInput {
47
+ return CommissionConfigurationSimulationInputFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function CommissionConfigurationSimulationInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionConfigurationSimulationInput {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'payload': CommissionConfigurationSimulationInputPayloadFromJSON(json['payload']),
57
+ };
58
+ }
59
+
60
+ export function CommissionConfigurationSimulationInputToJSON(json: any): CommissionConfigurationSimulationInput {
61
+ return CommissionConfigurationSimulationInputToJSONTyped(json, false);
62
+ }
63
+
64
+ export function CommissionConfigurationSimulationInputToJSONTyped(value?: CommissionConfigurationSimulationInput | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'payload': CommissionConfigurationSimulationInputPayloadToJSON(value['payload']),
72
+ };
73
+ }
74
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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 type { FixedCommissionPayloadSimulationInput } from './FixedCommissionPayloadSimulationInput';
16
+ import {
17
+ instanceOfFixedCommissionPayloadSimulationInput,
18
+ FixedCommissionPayloadSimulationInputFromJSON,
19
+ FixedCommissionPayloadSimulationInputFromJSONTyped,
20
+ FixedCommissionPayloadSimulationInputToJSON,
21
+ } from './FixedCommissionPayloadSimulationInput';
22
+ import type { SalesCountCommissionPayloadSimulationInput } from './SalesCountCommissionPayloadSimulationInput';
23
+ import {
24
+ instanceOfSalesCountCommissionPayloadSimulationInput,
25
+ SalesCountCommissionPayloadSimulationInputFromJSON,
26
+ SalesCountCommissionPayloadSimulationInputFromJSONTyped,
27
+ SalesCountCommissionPayloadSimulationInputToJSON,
28
+ } from './SalesCountCommissionPayloadSimulationInput';
29
+
30
+ /**
31
+ * @type CommissionConfigurationSimulationInputPayload
32
+ * Commission configuration payload. Shape depends on `factor`.
33
+ * @export
34
+ */
35
+ export type CommissionConfigurationSimulationInputPayload = { factor: 'fixed' } & FixedCommissionPayloadSimulationInput | { factor: 'monthly_sales_count' } & SalesCountCommissionPayloadSimulationInput;
36
+
37
+ export function CommissionConfigurationSimulationInputPayloadFromJSON(json: any): CommissionConfigurationSimulationInputPayload {
38
+ return CommissionConfigurationSimulationInputPayloadFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function CommissionConfigurationSimulationInputPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionConfigurationSimulationInputPayload {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ switch (json['factor']) {
46
+ case 'fixed':
47
+ return Object.assign({}, FixedCommissionPayloadSimulationInputFromJSONTyped(json, true), { factor: 'fixed' } as const);
48
+ case 'monthly_sales_count':
49
+ return Object.assign({}, SalesCountCommissionPayloadSimulationInputFromJSONTyped(json, true), { factor: 'monthly_sales_count' } as const);
50
+ default:
51
+ throw new Error(`No variant of CommissionConfigurationSimulationInputPayload exists with 'factor=${json['factor']}'`);
52
+ }
53
+ }
54
+
55
+ export function CommissionConfigurationSimulationInputPayloadToJSON(json: any): any {
56
+ return CommissionConfigurationSimulationInputPayloadToJSONTyped(json, false);
57
+ }
58
+
59
+ export function CommissionConfigurationSimulationInputPayloadToJSONTyped(value?: CommissionConfigurationSimulationInputPayload | null, ignoreDiscriminator: boolean = false): any {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ switch (value['factor']) {
64
+ case 'fixed':
65
+ return Object.assign({}, FixedCommissionPayloadSimulationInputToJSON(value), { factor: 'fixed' } as const);
66
+ case 'monthly_sales_count':
67
+ return Object.assign({}, SalesCountCommissionPayloadSimulationInputToJSON(value), { factor: 'monthly_sales_count' } as const);
68
+ default:
69
+ throw new Error(`No variant of CommissionConfigurationSimulationInputPayload exists with 'factor=${value['factor']}'`);
70
+ }
71
+
72
+ }
73
+
@@ -88,6 +88,18 @@ export interface CommissionDto {
88
88
  * @memberof CommissionDto
89
89
  */
90
90
  excludedAccountIds: Array<string>;
91
+ /**
92
+ * Domain extensions this commission applies to. When empty, the commission applies to all extensions.
93
+ * @type {Array<string>}
94
+ * @memberof CommissionDto
95
+ */
96
+ tlds: Array<string>;
97
+ /**
98
+ * Domain extensions excluded from this commission.
99
+ * @type {Array<string>}
100
+ * @memberof CommissionDto
101
+ */
102
+ excludedTlds: Array<string>;
91
103
  /**
92
104
  * Commission creation date.
93
105
  * @type {Date}
@@ -137,6 +149,8 @@ export function instanceOfCommissionDto(value: object): value is CommissionDto {
137
149
  if (!('dateStart' in value) || value['dateStart'] === undefined) return false;
138
150
  if (!('dateEnd' in value) || value['dateEnd'] === undefined) return false;
139
151
  if (!('excludedAccountIds' in value) || value['excludedAccountIds'] === undefined) return false;
152
+ if (!('tlds' in value) || value['tlds'] === undefined) return false;
153
+ if (!('excludedTlds' in value) || value['excludedTlds'] === undefined) return false;
140
154
  if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
141
155
  if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
142
156
  return true;
@@ -161,6 +175,8 @@ export function CommissionDtoFromJSONTyped(json: any, ignoreDiscriminator: boole
161
175
  'dateStart': (new Date(json['dateStart'])),
162
176
  'dateEnd': (json['dateEnd'] == null ? null : new Date(json['dateEnd'])),
163
177
  'excludedAccountIds': json['excludedAccountIds'],
178
+ 'tlds': json['tlds'],
179
+ 'excludedTlds': json['excludedTlds'],
164
180
  'createdAt': (new Date(json['createdAt'])),
165
181
  'updatedAt': (new Date(json['updatedAt'])),
166
182
  };
@@ -186,6 +202,8 @@ export function CommissionDtoToJSONTyped(value?: CommissionDto | null, ignoreDis
186
202
  'dateStart': ((value['dateStart']).toISOString()),
187
203
  'dateEnd': (value['dateEnd'] == null ? null : (value['dateEnd'] as any).toISOString()),
188
204
  'excludedAccountIds': value['excludedAccountIds'],
205
+ 'tlds': value['tlds'],
206
+ 'excludedTlds': value['excludedTlds'],
189
207
  'createdAt': ((value['createdAt']).toISOString()),
190
208
  'updatedAt': ((value['updatedAt']).toISOString()),
191
209
  };
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
  /**
17
- * Factor that determines how the commission is calculated
17
+ * Commission factor (MONTHLY_SALES_COUNT)
18
18
  * @export
19
19
  */
20
20
  export const CommissionFactor = {
@@ -81,6 +81,18 @@ export interface CommissionPayloadInput {
81
81
  * @memberof CommissionPayloadInput
82
82
  */
83
83
  excludedAccountIds: Array<string>;
84
+ /**
85
+ * Domain extensions this commission applies to (for example: "com", "net"). When empty, the commission applies to all extensions.
86
+ * @type {Array<string>}
87
+ * @memberof CommissionPayloadInput
88
+ */
89
+ tlds?: Array<string>;
90
+ /**
91
+ * Domain extensions excluded from this commission.
92
+ * @type {Array<string>}
93
+ * @memberof CommissionPayloadInput
94
+ */
95
+ excludedTlds?: Array<string>;
84
96
  }
85
97
 
86
98
 
@@ -140,6 +152,8 @@ export function CommissionPayloadInputFromJSONTyped(json: any, ignoreDiscriminat
140
152
  'dateStart': (new Date(json['dateStart'])),
141
153
  'dateEnd': (json['dateEnd'] == null ? null : new Date(json['dateEnd'])),
142
154
  'excludedAccountIds': json['excludedAccountIds'],
155
+ 'tlds': json['tlds'] == null ? undefined : json['tlds'],
156
+ 'excludedTlds': json['excludedTlds'] == null ? undefined : json['excludedTlds'],
143
157
  };
144
158
  }
145
159
 
@@ -163,6 +177,8 @@ export function CommissionPayloadInputToJSONTyped(value?: CommissionPayloadInput
163
177
  'dateStart': ((value['dateStart']).toISOString()),
164
178
  'dateEnd': (value['dateEnd'] == null ? null : (value['dateEnd'] as any).toISOString()),
165
179
  'excludedAccountIds': value['excludedAccountIds'],
180
+ 'tlds': value['tlds'],
181
+ 'excludedTlds': value['excludedTlds'],
166
182
  };
167
183
  }
168
184