@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,59 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfPopularCategoryDto = instanceOfPopularCategoryDto;
17
+ exports.PopularCategoryDtoFromJSON = PopularCategoryDtoFromJSON;
18
+ exports.PopularCategoryDtoFromJSONTyped = PopularCategoryDtoFromJSONTyped;
19
+ exports.PopularCategoryDtoToJSON = PopularCategoryDtoToJSON;
20
+ exports.PopularCategoryDtoToJSONTyped = PopularCategoryDtoToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the PopularCategoryDto interface.
23
+ */
24
+ function instanceOfPopularCategoryDto(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('name' in value) || value['name'] === undefined)
28
+ return false;
29
+ if (!('domainCount' in value) || value['domainCount'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function PopularCategoryDtoFromJSON(json) {
34
+ return PopularCategoryDtoFromJSONTyped(json, false);
35
+ }
36
+ function PopularCategoryDtoFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'id': json['id'],
42
+ 'name': json['name'],
43
+ 'domainCount': json['domainCount'],
44
+ };
45
+ }
46
+ function PopularCategoryDtoToJSON(json) {
47
+ return PopularCategoryDtoToJSONTyped(json, false);
48
+ }
49
+ function PopularCategoryDtoToJSONTyped(value, ignoreDiscriminator) {
50
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'id': value['id'],
56
+ 'name': value['name'],
57
+ 'domainCount': value['domainCount'],
58
+ };
59
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Nameshift
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { CommissionFactor } from './CommissionFactor';
13
+ import type { CommissionPercentageRangeInput } from './CommissionPercentageRangeInput';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface SalesCountCommissionPayloadSimulationInput
18
+ */
19
+ export interface SalesCountCommissionPayloadSimulationInput {
20
+ /**
21
+ *
22
+ * @type {CommissionFactor}
23
+ * @memberof SalesCountCommissionPayloadSimulationInput
24
+ */
25
+ factor: CommissionFactor;
26
+ /**
27
+ * Commission tiers based on monthly sales count
28
+ * @type {Array<CommissionPercentageRangeInput>}
29
+ * @memberof SalesCountCommissionPayloadSimulationInput
30
+ */
31
+ value: Array<CommissionPercentageRangeInput>;
32
+ }
33
+ /**
34
+ * Check if a given object implements the SalesCountCommissionPayloadSimulationInput interface.
35
+ */
36
+ export declare function instanceOfSalesCountCommissionPayloadSimulationInput(value: object): value is SalesCountCommissionPayloadSimulationInput;
37
+ export declare function SalesCountCommissionPayloadSimulationInputFromJSON(json: any): SalesCountCommissionPayloadSimulationInput;
38
+ export declare function SalesCountCommissionPayloadSimulationInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): SalesCountCommissionPayloadSimulationInput;
39
+ export declare function SalesCountCommissionPayloadSimulationInputToJSON(json: any): SalesCountCommissionPayloadSimulationInput;
40
+ export declare function SalesCountCommissionPayloadSimulationInputToJSONTyped(value?: SalesCountCommissionPayloadSimulationInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSalesCountCommissionPayloadSimulationInput = instanceOfSalesCountCommissionPayloadSimulationInput;
17
+ exports.SalesCountCommissionPayloadSimulationInputFromJSON = SalesCountCommissionPayloadSimulationInputFromJSON;
18
+ exports.SalesCountCommissionPayloadSimulationInputFromJSONTyped = SalesCountCommissionPayloadSimulationInputFromJSONTyped;
19
+ exports.SalesCountCommissionPayloadSimulationInputToJSON = SalesCountCommissionPayloadSimulationInputToJSON;
20
+ exports.SalesCountCommissionPayloadSimulationInputToJSONTyped = SalesCountCommissionPayloadSimulationInputToJSONTyped;
21
+ var CommissionFactor_1 = require("./CommissionFactor");
22
+ var CommissionPercentageRangeInput_1 = require("./CommissionPercentageRangeInput");
23
+ /**
24
+ * Check if a given object implements the SalesCountCommissionPayloadSimulationInput interface.
25
+ */
26
+ function instanceOfSalesCountCommissionPayloadSimulationInput(value) {
27
+ if (!('factor' in value) || value['factor'] === undefined)
28
+ return false;
29
+ if (!('value' in value) || value['value'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function SalesCountCommissionPayloadSimulationInputFromJSON(json) {
34
+ return SalesCountCommissionPayloadSimulationInputFromJSONTyped(json, false);
35
+ }
36
+ function SalesCountCommissionPayloadSimulationInputFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'factor': (0, CommissionFactor_1.CommissionFactorFromJSON)(json['factor']),
42
+ 'value': (json['value'].map(CommissionPercentageRangeInput_1.CommissionPercentageRangeInputFromJSON)),
43
+ };
44
+ }
45
+ function SalesCountCommissionPayloadSimulationInputToJSON(json) {
46
+ return SalesCountCommissionPayloadSimulationInputToJSONTyped(json, false);
47
+ }
48
+ function SalesCountCommissionPayloadSimulationInputToJSONTyped(value, ignoreDiscriminator) {
49
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'factor': (0, CommissionFactor_1.CommissionFactorToJSON)(value['factor']),
55
+ 'value': (value['value'].map(CommissionPercentageRangeInput_1.CommissionPercentageRangeInputToJSON)),
56
+ };
57
+ }
@@ -89,6 +89,12 @@ export interface SellerLeadDetails {
89
89
  * @memberof SellerLeadDetails
90
90
  */
91
91
  unreadSellerMessagesNumber: number;
92
+ /**
93
+ * Maximum number of consecutive messages one side can send before waiting for a reply.
94
+ * @type {number}
95
+ * @memberof SellerLeadDetails
96
+ */
97
+ messagesInRowLimit: number;
92
98
  /**
93
99
  * URL for completing order payment, if available.
94
100
  * @type {string}
@@ -90,6 +90,8 @@ function instanceOfSellerLeadDetails(value) {
90
90
  return false;
91
91
  if (!('unreadSellerMessagesNumber' in value) || value['unreadSellerMessagesNumber'] === undefined)
92
92
  return false;
93
+ if (!('messagesInRowLimit' in value) || value['messagesInRowLimit'] === undefined)
94
+ return false;
93
95
  if (!('orderPaymentUrl' in value) || value['orderPaymentUrl'] === undefined)
94
96
  return false;
95
97
  if (!('isPriceNegotiatorAgentPaused' in value) || value['isPriceNegotiatorAgentPaused'] === undefined)
@@ -139,6 +141,7 @@ function SellerLeadDetailsFromJSONTyped(json, ignoreDiscriminator) {
139
141
  'domain': (0, IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto_1.IntersectionDomainDtoWithAccountDtoWithAuctionInfoDtoFromJSON)(json['domain']),
140
142
  'unreadBuyerMessagesNumber': json['unreadBuyerMessagesNumber'],
141
143
  'unreadSellerMessagesNumber': json['unreadSellerMessagesNumber'],
144
+ 'messagesInRowLimit': json['messagesInRowLimit'],
142
145
  'orderPaymentUrl': json['orderPaymentUrl'],
143
146
  'isPriceNegotiatorAgentPaused': json['isPriceNegotiatorAgentPaused'],
144
147
  'manualType': json['manualType'],
@@ -175,6 +178,7 @@ function SellerLeadDetailsToJSONTyped(value, ignoreDiscriminator) {
175
178
  'domain': (0, IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto_1.IntersectionDomainDtoWithAccountDtoWithAuctionInfoDtoToJSON)(value['domain']),
176
179
  'unreadBuyerMessagesNumber': value['unreadBuyerMessagesNumber'],
177
180
  'unreadSellerMessagesNumber': value['unreadSellerMessagesNumber'],
181
+ 'messagesInRowLimit': value['messagesInRowLimit'],
178
182
  'orderPaymentUrl': value['orderPaymentUrl'],
179
183
  'isPriceNegotiatorAgentPaused': value['isPriceNegotiatorAgentPaused'],
180
184
  'manualType': value['manualType'],
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Nameshift
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { CommissionSimulationItemInput } from './CommissionSimulationItemInput';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SimulateCommissionInput
17
+ */
18
+ export interface SimulateCommissionInput {
19
+ /**
20
+ * Seller account ID for the simulation, or null.
21
+ * @type {string}
22
+ * @memberof SimulateCommissionInput
23
+ */
24
+ account: string | null;
25
+ /**
26
+ * Simulation date (YYYY-MM-DD).
27
+ * @type {Date}
28
+ * @memberof SimulateCommissionInput
29
+ */
30
+ date: Date;
31
+ /**
32
+ * Domain extension used for the simulation (for example: "be").
33
+ * @type {string}
34
+ * @memberof SimulateCommissionInput
35
+ */
36
+ tld: string;
37
+ /**
38
+ * Commission subtype.
39
+ * @type {string}
40
+ * @memberof SimulateCommissionInput
41
+ */
42
+ subtype: SimulateCommissionInputSubtypeEnum;
43
+ /**
44
+ * Full commission rule set to evaluate.
45
+ * @type {Array<CommissionSimulationItemInput>}
46
+ * @memberof SimulateCommissionInput
47
+ */
48
+ commissions: Array<CommissionSimulationItemInput>;
49
+ }
50
+ /**
51
+ * @export
52
+ */
53
+ export declare const SimulateCommissionInputSubtypeEnum: {
54
+ readonly POINTING: "pointing";
55
+ readonly NOT_POINTING: "not_pointing";
56
+ readonly MANUAL_LEAD: "manual_lead";
57
+ readonly AUCTION: "auction";
58
+ };
59
+ export type SimulateCommissionInputSubtypeEnum = typeof SimulateCommissionInputSubtypeEnum[keyof typeof SimulateCommissionInputSubtypeEnum];
60
+ /**
61
+ * Check if a given object implements the SimulateCommissionInput interface.
62
+ */
63
+ export declare function instanceOfSimulateCommissionInput(value: object): value is SimulateCommissionInput;
64
+ export declare function SimulateCommissionInputFromJSON(json: any): SimulateCommissionInput;
65
+ export declare function SimulateCommissionInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): SimulateCommissionInput;
66
+ export declare function SimulateCommissionInputToJSON(json: any): SimulateCommissionInput;
67
+ export declare function SimulateCommissionInputToJSONTyped(value?: SimulateCommissionInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.SimulateCommissionInputSubtypeEnum = void 0;
17
+ exports.instanceOfSimulateCommissionInput = instanceOfSimulateCommissionInput;
18
+ exports.SimulateCommissionInputFromJSON = SimulateCommissionInputFromJSON;
19
+ exports.SimulateCommissionInputFromJSONTyped = SimulateCommissionInputFromJSONTyped;
20
+ exports.SimulateCommissionInputToJSON = SimulateCommissionInputToJSON;
21
+ exports.SimulateCommissionInputToJSONTyped = SimulateCommissionInputToJSONTyped;
22
+ var CommissionSimulationItemInput_1 = require("./CommissionSimulationItemInput");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.SimulateCommissionInputSubtypeEnum = {
27
+ POINTING: 'pointing',
28
+ NOT_POINTING: 'not_pointing',
29
+ MANUAL_LEAD: 'manual_lead',
30
+ AUCTION: 'auction'
31
+ };
32
+ /**
33
+ * Check if a given object implements the SimulateCommissionInput interface.
34
+ */
35
+ function instanceOfSimulateCommissionInput(value) {
36
+ if (!('account' in value) || value['account'] === undefined)
37
+ return false;
38
+ if (!('date' in value) || value['date'] === undefined)
39
+ return false;
40
+ if (!('tld' in value) || value['tld'] === undefined)
41
+ return false;
42
+ if (!('subtype' in value) || value['subtype'] === undefined)
43
+ return false;
44
+ if (!('commissions' in value) || value['commissions'] === undefined)
45
+ return false;
46
+ return true;
47
+ }
48
+ function SimulateCommissionInputFromJSON(json) {
49
+ return SimulateCommissionInputFromJSONTyped(json, false);
50
+ }
51
+ function SimulateCommissionInputFromJSONTyped(json, ignoreDiscriminator) {
52
+ if (json == null) {
53
+ return json;
54
+ }
55
+ return {
56
+ 'account': json['account'],
57
+ 'date': (new Date(json['date'])),
58
+ 'tld': json['tld'],
59
+ 'subtype': json['subtype'],
60
+ 'commissions': (json['commissions'].map(CommissionSimulationItemInput_1.CommissionSimulationItemInputFromJSON)),
61
+ };
62
+ }
63
+ function SimulateCommissionInputToJSON(json) {
64
+ return SimulateCommissionInputToJSONTyped(json, false);
65
+ }
66
+ function SimulateCommissionInputToJSONTyped(value, ignoreDiscriminator) {
67
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
68
+ if (value == null) {
69
+ return value;
70
+ }
71
+ return {
72
+ 'account': value['account'],
73
+ 'date': ((value['date']).toISOString().substring(0, 10)),
74
+ 'tld': value['tld'],
75
+ 'subtype': value['subtype'],
76
+ 'commissions': (value['commissions'].map(CommissionSimulationItemInput_1.CommissionSimulationItemInputToJSON)),
77
+ };
78
+ }
@@ -138,6 +138,8 @@ export * from './CommissionAddUpdateActionInput';
138
138
  export * from './CommissionConfigurationDto';
139
139
  export * from './CommissionConfigurationDtoPayload';
140
140
  export * from './CommissionConfigurationInput';
141
+ export * from './CommissionConfigurationSimulationInput';
142
+ export * from './CommissionConfigurationSimulationInputPayload';
141
143
  export * from './CommissionDeleteActionInput';
142
144
  export * from './CommissionDto';
143
145
  export * from './CommissionFactor';
@@ -149,6 +151,8 @@ export * from './CommissionPercentageRangeInput';
149
151
  export * from './CommissionReasonConfigDto';
150
152
  export * from './CommissionReasonConfigDtoPayload';
151
153
  export * from './CommissionReasonDto';
154
+ export * from './CommissionSimulationItemInput';
155
+ export * from './CommissionSimulationResultDto';
152
156
  export * from './CommissionsStatsDto';
153
157
  export * from './CompanyInformationDto';
154
158
  export * from './CompanyTaxIdDto';
@@ -216,6 +220,7 @@ export * from './EppBatchUpdateInput';
216
220
  export * from './FeatureFlagListItemDto';
217
221
  export * from './FixedCommissionPayloadDto';
218
222
  export * from './FixedCommissionPayloadInput';
223
+ export * from './FixedCommissionPayloadSimulationInput';
219
224
  export * from './FixedCommissionReasonPayloadDto';
220
225
  export * from './ForgotPasswordRequestInput';
221
226
  export * from './GetAccountChallengeRewardUsagesListDto';
@@ -349,6 +354,7 @@ export * from './PartnerAuctionDto';
349
354
  export * from './PartnerDomainFindDto';
350
355
  export * from './PayAccountPaymentInput';
351
356
  export * from './PaymentMethodsStatsDto';
357
+ export * from './PopularCategoryDto';
352
358
  export * from './PrivateAccountGetMeResponse';
353
359
  export * from './PublicAccountInformationDto';
354
360
  export * from './PublicAuctionListItemDto';
@@ -383,6 +389,7 @@ export * from './RequestEmailOtpInput';
383
389
  export * from './RequestUserEmailChangeOtpInput';
384
390
  export * from './SalesCountCommissionPayloadDto';
385
391
  export * from './SalesCountCommissionPayloadInput';
392
+ export * from './SalesCountCommissionPayloadSimulationInput';
386
393
  export * from './SalesCountCommissionReasonPayloadDto';
387
394
  export * from './SeBankAccountDetails';
388
395
  export * from './SellerAccountReferralListItemDto';
@@ -422,6 +429,7 @@ export * from './SepaBankAccountDetails';
422
429
  export * from './SetDomainTransferConfirmationInput';
423
430
  export * from './SetNewPasswordInput';
424
431
  export * from './SetPayoutProviderInput';
432
+ export * from './SimulateCommissionInput';
425
433
  export * from './StartAuctionInput';
426
434
  export * from './StateDto';
427
435
  export * from './StatsFilterInputDateRange';
@@ -156,6 +156,8 @@ __exportStar(require("./CommissionAddUpdateActionInput"), exports);
156
156
  __exportStar(require("./CommissionConfigurationDto"), exports);
157
157
  __exportStar(require("./CommissionConfigurationDtoPayload"), exports);
158
158
  __exportStar(require("./CommissionConfigurationInput"), exports);
159
+ __exportStar(require("./CommissionConfigurationSimulationInput"), exports);
160
+ __exportStar(require("./CommissionConfigurationSimulationInputPayload"), exports);
159
161
  __exportStar(require("./CommissionDeleteActionInput"), exports);
160
162
  __exportStar(require("./CommissionDto"), exports);
161
163
  __exportStar(require("./CommissionFactor"), exports);
@@ -167,6 +169,8 @@ __exportStar(require("./CommissionPercentageRangeInput"), exports);
167
169
  __exportStar(require("./CommissionReasonConfigDto"), exports);
168
170
  __exportStar(require("./CommissionReasonConfigDtoPayload"), exports);
169
171
  __exportStar(require("./CommissionReasonDto"), exports);
172
+ __exportStar(require("./CommissionSimulationItemInput"), exports);
173
+ __exportStar(require("./CommissionSimulationResultDto"), exports);
170
174
  __exportStar(require("./CommissionsStatsDto"), exports);
171
175
  __exportStar(require("./CompanyInformationDto"), exports);
172
176
  __exportStar(require("./CompanyTaxIdDto"), exports);
@@ -234,6 +238,7 @@ __exportStar(require("./EppBatchUpdateInput"), exports);
234
238
  __exportStar(require("./FeatureFlagListItemDto"), exports);
235
239
  __exportStar(require("./FixedCommissionPayloadDto"), exports);
236
240
  __exportStar(require("./FixedCommissionPayloadInput"), exports);
241
+ __exportStar(require("./FixedCommissionPayloadSimulationInput"), exports);
237
242
  __exportStar(require("./FixedCommissionReasonPayloadDto"), exports);
238
243
  __exportStar(require("./ForgotPasswordRequestInput"), exports);
239
244
  __exportStar(require("./GetAccountChallengeRewardUsagesListDto"), exports);
@@ -367,6 +372,7 @@ __exportStar(require("./PartnerAuctionDto"), exports);
367
372
  __exportStar(require("./PartnerDomainFindDto"), exports);
368
373
  __exportStar(require("./PayAccountPaymentInput"), exports);
369
374
  __exportStar(require("./PaymentMethodsStatsDto"), exports);
375
+ __exportStar(require("./PopularCategoryDto"), exports);
370
376
  __exportStar(require("./PrivateAccountGetMeResponse"), exports);
371
377
  __exportStar(require("./PublicAccountInformationDto"), exports);
372
378
  __exportStar(require("./PublicAuctionListItemDto"), exports);
@@ -401,6 +407,7 @@ __exportStar(require("./RequestEmailOtpInput"), exports);
401
407
  __exportStar(require("./RequestUserEmailChangeOtpInput"), exports);
402
408
  __exportStar(require("./SalesCountCommissionPayloadDto"), exports);
403
409
  __exportStar(require("./SalesCountCommissionPayloadInput"), exports);
410
+ __exportStar(require("./SalesCountCommissionPayloadSimulationInput"), exports);
404
411
  __exportStar(require("./SalesCountCommissionReasonPayloadDto"), exports);
405
412
  __exportStar(require("./SeBankAccountDetails"), exports);
406
413
  __exportStar(require("./SellerAccountReferralListItemDto"), exports);
@@ -440,6 +447,7 @@ __exportStar(require("./SepaBankAccountDetails"), exports);
440
447
  __exportStar(require("./SetDomainTransferConfirmationInput"), exports);
441
448
  __exportStar(require("./SetNewPasswordInput"), exports);
442
449
  __exportStar(require("./SetPayoutProviderInput"), exports);
450
+ __exportStar(require("./SimulateCommissionInput"), exports);
443
451
  __exportStar(require("./StartAuctionInput"), exports);
444
452
  __exportStar(require("./StateDto"), exports);
445
453
  __exportStar(require("./StatsFilterInputDateRange"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.445",
3
+ "version": "0.0.447",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -655,7 +655,7 @@ export class AccountsApi extends runtime.BaseAPI {
655
655
  }
656
656
 
657
657
  /**
658
- * Returns current commission percentages by subtype and active commission schedules.
658
+ * Returns Nameshift commission percentages and schedules for the current account.
659
659
  * Get Nameshift commissions
660
660
  */
661
661
  async getNameshiftCommissionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAccountNameshiftCommissionsResponseDto>> {
@@ -682,7 +682,7 @@ export class AccountsApi extends runtime.BaseAPI {
682
682
  }
683
683
 
684
684
  /**
685
- * Returns current commission percentages by subtype and active commission schedules.
685
+ * Returns Nameshift commission percentages and schedules for the current account.
686
686
  * Get Nameshift commissions
687
687
  */
688
688
  async getNameshiftCommissions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountNameshiftCommissionsResponseDto> {
@@ -31,6 +31,7 @@ import type {
31
31
  ChangeOrderStatusInput,
32
32
  ChangeSubscriptionStatusInput,
33
33
  CommissionListDto,
34
+ CommissionSimulationResultDto,
34
35
  ConflictException,
35
36
  CreateChallengeInput,
36
37
  DomainLockDto,
@@ -59,6 +60,7 @@ import type {
59
60
  SellerSalesByTldStatsItemDto,
60
61
  SellerSalesCountStatsItemDto,
61
62
  SendAdminLeadAiPriceNegotiatorAgentChatMessageInput,
63
+ SimulateCommissionInput,
62
64
  SubscriptionDetailsDto,
63
65
  UpdateAccountChallengeRewardBalanceInput,
64
66
  UpdateChallengeInput,
@@ -98,6 +100,8 @@ import {
98
100
  ChangeSubscriptionStatusInputToJSON,
99
101
  CommissionListDtoFromJSON,
100
102
  CommissionListDtoToJSON,
103
+ CommissionSimulationResultDtoFromJSON,
104
+ CommissionSimulationResultDtoToJSON,
101
105
  ConflictExceptionFromJSON,
102
106
  ConflictExceptionToJSON,
103
107
  CreateChallengeInputFromJSON,
@@ -154,6 +158,8 @@ import {
154
158
  SellerSalesCountStatsItemDtoToJSON,
155
159
  SendAdminLeadAiPriceNegotiatorAgentChatMessageInputFromJSON,
156
160
  SendAdminLeadAiPriceNegotiatorAgentChatMessageInputToJSON,
161
+ SimulateCommissionInputFromJSON,
162
+ SimulateCommissionInputToJSON,
157
163
  SubscriptionDetailsDtoFromJSON,
158
164
  SubscriptionDetailsDtoToJSON,
159
165
  UpdateAccountChallengeRewardBalanceInputFromJSON,
@@ -446,6 +452,10 @@ export interface AdminApiRemoveDomainLockRequest {
446
452
  lockId: string;
447
453
  }
448
454
 
455
+ export interface AdminApiSimulateCommissionRequest {
456
+ simulateCommissionInput: SimulateCommissionInput;
457
+ }
458
+
449
459
  export interface AdminApiSyncAccountStatsRequest {
450
460
  accountId: string;
451
461
  }
@@ -1180,7 +1190,7 @@ export class AdminApi extends runtime.BaseAPI {
1180
1190
  }
1181
1191
 
1182
1192
  /**
1183
- * Returns all commission percentages by Nameshift subtype for the account.
1193
+ * Returns Nameshift commission percentages and schedules for the account.
1184
1194
  * Get Nameshift commissions
1185
1195
  */
1186
1196
  async getAccountNameshiftCommissionsRaw(requestParameters: AdminApiGetAccountNameshiftCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountNameshiftCommissionByTypeDto>> {
@@ -1214,7 +1224,7 @@ export class AdminApi extends runtime.BaseAPI {
1214
1224
  }
1215
1225
 
1216
1226
  /**
1217
- * Returns all commission percentages by Nameshift subtype for the account.
1227
+ * Returns Nameshift commission percentages and schedules for the account.
1218
1228
  * Get Nameshift commissions
1219
1229
  */
1220
1230
  async getAccountNameshiftCommissions(requestParameters: AdminApiGetAccountNameshiftCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountNameshiftCommissionByTypeDto> {
@@ -3053,6 +3063,52 @@ export class AdminApi extends runtime.BaseAPI {
3053
3063
  await this.removeDomainLockRaw(requestParameters, initOverrides);
3054
3064
  }
3055
3065
 
3066
+ /**
3067
+ * Evaluates the commission percentage for a given scenario without persisting any changes.
3068
+ * Simulate commission percentage
3069
+ */
3070
+ async simulateCommissionRaw(requestParameters: AdminApiSimulateCommissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommissionSimulationResultDto>> {
3071
+ if (requestParameters['simulateCommissionInput'] == null) {
3072
+ throw new runtime.RequiredError(
3073
+ 'simulateCommissionInput',
3074
+ 'Required parameter "simulateCommissionInput" was null or undefined when calling simulateCommission().'
3075
+ );
3076
+ }
3077
+
3078
+ const queryParameters: any = {};
3079
+
3080
+ const headerParameters: runtime.HTTPHeaders = {};
3081
+
3082
+ headerParameters['Content-Type'] = 'application/json';
3083
+
3084
+ if (this.configuration && this.configuration.accessToken) {
3085
+ const token = this.configuration.accessToken;
3086
+ const tokenString = await token("bearer", []);
3087
+
3088
+ if (tokenString) {
3089
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3090
+ }
3091
+ }
3092
+ const response = await this.request({
3093
+ path: `/admin/commissions/simulate`,
3094
+ method: 'POST',
3095
+ headers: headerParameters,
3096
+ query: queryParameters,
3097
+ body: SimulateCommissionInputToJSON(requestParameters['simulateCommissionInput']),
3098
+ }, initOverrides);
3099
+
3100
+ return new runtime.JSONApiResponse(response, (jsonValue) => CommissionSimulationResultDtoFromJSON(jsonValue));
3101
+ }
3102
+
3103
+ /**
3104
+ * Evaluates the commission percentage for a given scenario without persisting any changes.
3105
+ * Simulate commission percentage
3106
+ */
3107
+ async simulateCommission(requestParameters: AdminApiSimulateCommissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommissionSimulationResultDto> {
3108
+ const response = await this.simulateCommissionRaw(requestParameters, initOverrides);
3109
+ return await response.value();
3110
+ }
3111
+
3056
3112
  /**
3057
3113
  * Triggers a synchronization of account metrics and statistics.
3058
3114
  * Sync account statistics