@randock/nameshift-api-client 0.0.444 → 0.0.446
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +8 -0
- package/README.md +3 -3
- package/dist/apis/AccountsApi.d.ts +2 -2
- package/dist/apis/AccountsApi.js +2 -2
- package/dist/apis/AdminApi.d.ts +30 -3
- package/dist/apis/AdminApi.js +117 -2
- package/dist/models/AccountNameshiftCommissionBySubtypeDto.d.ts +6 -0
- package/dist/models/AccountNameshiftCommissionBySubtypeDto.js +4 -0
- package/dist/models/AccountNameshiftCommissionByTypeDto.d.ts +2 -2
- package/dist/models/AccountNameshiftCommissionItemDto.d.ts +12 -0
- package/dist/models/AccountNameshiftCommissionItemDto.js +8 -0
- package/dist/models/AccountNameshiftCommissionReasonDto.d.ts +21 -0
- package/dist/models/AccountNameshiftCommissionReasonDto.js +13 -1
- package/dist/models/ChangeInvoiceStatusInput.d.ts +42 -0
- package/dist/models/ChangeInvoiceStatusInput.js +61 -0
- package/dist/models/CommissionConfigurationSimulationInput.d.ts +33 -0
- package/dist/models/CommissionConfigurationSimulationInput.js +52 -0
- package/dist/models/CommissionConfigurationSimulationInputPayload.d.ts +27 -0
- package/dist/models/CommissionConfigurationSimulationInputPayload.js +54 -0
- package/dist/models/CommissionDto.d.ts +12 -0
- package/dist/models/CommissionDto.js +8 -0
- package/dist/models/CommissionFactor.d.ts +1 -1
- package/dist/models/CommissionFactor.js +1 -1
- package/dist/models/CommissionPayloadInput.d.ts +12 -0
- package/dist/models/CommissionPayloadInput.js +4 -0
- package/dist/models/CommissionReasonDto.d.ts +33 -0
- package/dist/models/CommissionReasonDto.js +17 -1
- package/dist/models/CommissionSimulationItemInput.d.ts +123 -0
- package/dist/models/CommissionSimulationItemInput.js +113 -0
- package/dist/models/CommissionSimulationResultDto.d.ts +39 -0
- package/dist/models/CommissionSimulationResultDto.js +56 -0
- package/dist/models/FixedCommissionPayloadSimulationInput.d.ts +39 -0
- package/dist/models/FixedCommissionPayloadSimulationInput.js +56 -0
- package/dist/models/GetAccountNameshiftCommissionsResponseDto.d.ts +1 -1
- package/dist/models/MozMetrics.d.ts +6 -0
- package/dist/models/MozMetrics.js +4 -0
- package/dist/models/SalesCountCommissionPayloadSimulationInput.d.ts +40 -0
- package/dist/models/SalesCountCommissionPayloadSimulationInput.js +57 -0
- package/dist/models/SimulateCommissionInput.d.ts +67 -0
- package/dist/models/SimulateCommissionInput.js +78 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +2 -2
- package/src/apis/AdminApi.ts +118 -2
- package/src/models/AccountNameshiftCommissionBySubtypeDto.ts +9 -0
- package/src/models/AccountNameshiftCommissionByTypeDto.ts +2 -2
- package/src/models/AccountNameshiftCommissionItemDto.ts +18 -0
- package/src/models/AccountNameshiftCommissionReasonDto.ts +26 -0
- package/src/models/ChangeInvoiceStatusInput.ts +79 -0
- package/src/models/CommissionConfigurationSimulationInput.ts +74 -0
- package/src/models/CommissionConfigurationSimulationInputPayload.ts +73 -0
- package/src/models/CommissionDto.ts +18 -0
- package/src/models/CommissionFactor.ts +1 -1
- package/src/models/CommissionPayloadInput.ts +16 -0
- package/src/models/CommissionReasonDto.ts +42 -0
- package/src/models/CommissionSimulationItemInput.ts +202 -0
- package/src/models/CommissionSimulationResultDto.ts +83 -0
- package/src/models/FixedCommissionPayloadSimulationInput.ts +85 -0
- package/src/models/GetAccountNameshiftCommissionsResponseDto.ts +1 -1
- package/src/models/MozMetrics.ts +9 -0
- package/src/models/SalesCountCommissionPayloadSimulationInput.ts +92 -0
- package/src/models/SimulateCommissionInput.ts +123 -0
- package/src/models/index.ts +8 -0
package/src/apis/AdminApi.ts
CHANGED
|
@@ -27,9 +27,11 @@ import type {
|
|
|
27
27
|
AdminGetAllDomainTransfers200Response,
|
|
28
28
|
BadRequestException,
|
|
29
29
|
BulkCommissionActionsInput,
|
|
30
|
+
ChangeInvoiceStatusInput,
|
|
30
31
|
ChangeOrderStatusInput,
|
|
31
32
|
ChangeSubscriptionStatusInput,
|
|
32
33
|
CommissionListDto,
|
|
34
|
+
CommissionSimulationResultDto,
|
|
33
35
|
ConflictException,
|
|
34
36
|
CreateChallengeInput,
|
|
35
37
|
DomainLockDto,
|
|
@@ -58,6 +60,7 @@ import type {
|
|
|
58
60
|
SellerSalesByTldStatsItemDto,
|
|
59
61
|
SellerSalesCountStatsItemDto,
|
|
60
62
|
SendAdminLeadAiPriceNegotiatorAgentChatMessageInput,
|
|
63
|
+
SimulateCommissionInput,
|
|
61
64
|
SubscriptionDetailsDto,
|
|
62
65
|
UpdateAccountChallengeRewardBalanceInput,
|
|
63
66
|
UpdateChallengeInput,
|
|
@@ -89,12 +92,16 @@ import {
|
|
|
89
92
|
BadRequestExceptionToJSON,
|
|
90
93
|
BulkCommissionActionsInputFromJSON,
|
|
91
94
|
BulkCommissionActionsInputToJSON,
|
|
95
|
+
ChangeInvoiceStatusInputFromJSON,
|
|
96
|
+
ChangeInvoiceStatusInputToJSON,
|
|
92
97
|
ChangeOrderStatusInputFromJSON,
|
|
93
98
|
ChangeOrderStatusInputToJSON,
|
|
94
99
|
ChangeSubscriptionStatusInputFromJSON,
|
|
95
100
|
ChangeSubscriptionStatusInputToJSON,
|
|
96
101
|
CommissionListDtoFromJSON,
|
|
97
102
|
CommissionListDtoToJSON,
|
|
103
|
+
CommissionSimulationResultDtoFromJSON,
|
|
104
|
+
CommissionSimulationResultDtoToJSON,
|
|
98
105
|
ConflictExceptionFromJSON,
|
|
99
106
|
ConflictExceptionToJSON,
|
|
100
107
|
CreateChallengeInputFromJSON,
|
|
@@ -151,6 +158,8 @@ import {
|
|
|
151
158
|
SellerSalesCountStatsItemDtoToJSON,
|
|
152
159
|
SendAdminLeadAiPriceNegotiatorAgentChatMessageInputFromJSON,
|
|
153
160
|
SendAdminLeadAiPriceNegotiatorAgentChatMessageInputToJSON,
|
|
161
|
+
SimulateCommissionInputFromJSON,
|
|
162
|
+
SimulateCommissionInputToJSON,
|
|
154
163
|
SubscriptionDetailsDtoFromJSON,
|
|
155
164
|
SubscriptionDetailsDtoToJSON,
|
|
156
165
|
UpdateAccountChallengeRewardBalanceInputFromJSON,
|
|
@@ -184,6 +193,11 @@ export interface AdminApiCancelDomainTransferRequest {
|
|
|
184
193
|
transferId: string;
|
|
185
194
|
}
|
|
186
195
|
|
|
196
|
+
export interface AdminApiChangeInvoiceStatusRequest {
|
|
197
|
+
invoiceId: string;
|
|
198
|
+
changeInvoiceStatusInput: ChangeInvoiceStatusInput;
|
|
199
|
+
}
|
|
200
|
+
|
|
187
201
|
export interface AdminApiChangeOrderStatusRequest {
|
|
188
202
|
orderId: string;
|
|
189
203
|
changeOrderStatusInput: ChangeOrderStatusInput;
|
|
@@ -438,6 +452,10 @@ export interface AdminApiRemoveDomainLockRequest {
|
|
|
438
452
|
lockId: string;
|
|
439
453
|
}
|
|
440
454
|
|
|
455
|
+
export interface AdminApiSimulateCommissionRequest {
|
|
456
|
+
simulateCommissionInput: SimulateCommissionInput;
|
|
457
|
+
}
|
|
458
|
+
|
|
441
459
|
export interface AdminApiSyncAccountStatsRequest {
|
|
442
460
|
accountId: string;
|
|
443
461
|
}
|
|
@@ -672,6 +690,58 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
672
690
|
await this.cancelDomainTransferRaw(requestParameters, initOverrides);
|
|
673
691
|
}
|
|
674
692
|
|
|
693
|
+
/**
|
|
694
|
+
* Updates the status of an existing invoice.
|
|
695
|
+
* Change invoice status
|
|
696
|
+
*/
|
|
697
|
+
async changeInvoiceStatusRaw(requestParameters: AdminApiChangeInvoiceStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
698
|
+
if (requestParameters['invoiceId'] == null) {
|
|
699
|
+
throw new runtime.RequiredError(
|
|
700
|
+
'invoiceId',
|
|
701
|
+
'Required parameter "invoiceId" was null or undefined when calling changeInvoiceStatus().'
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
if (requestParameters['changeInvoiceStatusInput'] == null) {
|
|
706
|
+
throw new runtime.RequiredError(
|
|
707
|
+
'changeInvoiceStatusInput',
|
|
708
|
+
'Required parameter "changeInvoiceStatusInput" was null or undefined when calling changeInvoiceStatus().'
|
|
709
|
+
);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
const queryParameters: any = {};
|
|
713
|
+
|
|
714
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
715
|
+
|
|
716
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
717
|
+
|
|
718
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
719
|
+
const token = this.configuration.accessToken;
|
|
720
|
+
const tokenString = await token("bearer", []);
|
|
721
|
+
|
|
722
|
+
if (tokenString) {
|
|
723
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
const response = await this.request({
|
|
727
|
+
path: `/admin/invoices/{invoiceId}/status`.replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))),
|
|
728
|
+
method: 'PATCH',
|
|
729
|
+
headers: headerParameters,
|
|
730
|
+
query: queryParameters,
|
|
731
|
+
body: ChangeInvoiceStatusInputToJSON(requestParameters['changeInvoiceStatusInput']),
|
|
732
|
+
}, initOverrides);
|
|
733
|
+
|
|
734
|
+
return new runtime.VoidApiResponse(response);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Updates the status of an existing invoice.
|
|
739
|
+
* Change invoice status
|
|
740
|
+
*/
|
|
741
|
+
async changeInvoiceStatus(requestParameters: AdminApiChangeInvoiceStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
742
|
+
await this.changeInvoiceStatusRaw(requestParameters, initOverrides);
|
|
743
|
+
}
|
|
744
|
+
|
|
675
745
|
/**
|
|
676
746
|
* Updates the invoice status of an existing order.
|
|
677
747
|
* Change order status
|
|
@@ -1120,7 +1190,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1120
1190
|
}
|
|
1121
1191
|
|
|
1122
1192
|
/**
|
|
1123
|
-
* Returns
|
|
1193
|
+
* Returns Nameshift commission percentages and schedules for the account.
|
|
1124
1194
|
* Get Nameshift commissions
|
|
1125
1195
|
*/
|
|
1126
1196
|
async getAccountNameshiftCommissionsRaw(requestParameters: AdminApiGetAccountNameshiftCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountNameshiftCommissionByTypeDto>> {
|
|
@@ -1154,7 +1224,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1154
1224
|
}
|
|
1155
1225
|
|
|
1156
1226
|
/**
|
|
1157
|
-
* Returns
|
|
1227
|
+
* Returns Nameshift commission percentages and schedules for the account.
|
|
1158
1228
|
* Get Nameshift commissions
|
|
1159
1229
|
*/
|
|
1160
1230
|
async getAccountNameshiftCommissions(requestParameters: AdminApiGetAccountNameshiftCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountNameshiftCommissionByTypeDto> {
|
|
@@ -2993,6 +3063,52 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
2993
3063
|
await this.removeDomainLockRaw(requestParameters, initOverrides);
|
|
2994
3064
|
}
|
|
2995
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
|
+
|
|
2996
3112
|
/**
|
|
2997
3113
|
* Triggers a synchronization of account metrics and statistics.
|
|
2998
3114
|
* Sync account statistics
|
|
@@ -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
|
-
*
|
|
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
|
-
*
|
|
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,79 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ChangeInvoiceStatusInput
|
|
20
|
+
*/
|
|
21
|
+
export interface ChangeInvoiceStatusInput {
|
|
22
|
+
/**
|
|
23
|
+
* New status to apply to the invoice
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ChangeInvoiceStatusInput
|
|
26
|
+
*/
|
|
27
|
+
status: ChangeInvoiceStatusInputStatusEnum;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export const ChangeInvoiceStatusInputStatusEnum = {
|
|
35
|
+
DRAFT: 'draft',
|
|
36
|
+
PENDING_PAYMENT: 'pending_payment',
|
|
37
|
+
PAID: 'paid',
|
|
38
|
+
CANCELLED: 'cancelled'
|
|
39
|
+
} as const;
|
|
40
|
+
export type ChangeInvoiceStatusInputStatusEnum = typeof ChangeInvoiceStatusInputStatusEnum[keyof typeof ChangeInvoiceStatusInputStatusEnum];
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ChangeInvoiceStatusInput interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfChangeInvoiceStatusInput(value: object): value is ChangeInvoiceStatusInput {
|
|
47
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ChangeInvoiceStatusInputFromJSON(json: any): ChangeInvoiceStatusInput {
|
|
52
|
+
return ChangeInvoiceStatusInputFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ChangeInvoiceStatusInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeInvoiceStatusInput {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'status': json['status'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ChangeInvoiceStatusInputToJSON(json: any): ChangeInvoiceStatusInput {
|
|
66
|
+
return ChangeInvoiceStatusInputToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ChangeInvoiceStatusInputToJSONTyped(value?: ChangeInvoiceStatusInput | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'status': value['status'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
@@ -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
|
};
|
|
@@ -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
|
|