@randock/nameshift-api-client 0.0.366 → 0.0.368
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 +29 -1
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +45 -1
- package/dist/apis/AdminApi.js +211 -0
- package/dist/models/AccountNameshiftCommissionBySubtypeDto.d.ts +55 -0
- package/dist/models/AccountNameshiftCommissionBySubtypeDto.js +70 -0
- package/dist/models/AccountNameshiftCommissionByTypeDto.d.ts +33 -0
- package/dist/models/AccountNameshiftCommissionByTypeDto.js +52 -0
- package/dist/models/AdminListAccountDto.d.ts +137 -0
- package/dist/models/{IntersectionListAccountDtoWithAccountCommissionDto.js → AdminListAccountDto.js} +17 -25
- package/dist/models/BulkCommissionActionsInput.d.ts +33 -0
- package/dist/models/BulkCommissionActionsInput.js +52 -0
- package/dist/models/BulkCommissionActionsInputActionsInner.d.ts +29 -0
- package/dist/models/BulkCommissionActionsInputActionsInner.js +58 -0
- package/dist/models/CommissionAccountDto.d.ts +44 -0
- package/dist/models/CommissionAccountDto.js +59 -0
- package/dist/models/CommissionAction.d.ts +26 -0
- package/dist/models/CommissionAction.js +52 -0
- package/dist/models/CommissionAddUpdateActionInput.d.ts +40 -0
- package/dist/models/CommissionAddUpdateActionInput.js +57 -0
- package/dist/models/CommissionConfigurationDto.d.ts +33 -0
- package/dist/models/CommissionConfigurationDto.js +52 -0
- package/dist/models/CommissionConfigurationDtoPayload.d.ts +27 -0
- package/dist/models/CommissionConfigurationDtoPayload.js +54 -0
- package/dist/models/CommissionConfigurationInput.d.ts +39 -0
- package/dist/models/CommissionConfigurationInput.js +56 -0
- package/dist/models/CommissionDeleteActionInput.d.ts +40 -0
- package/dist/models/CommissionDeleteActionInput.js +57 -0
- package/dist/models/CommissionDto.d.ts +112 -0
- package/dist/models/CommissionDto.js +110 -0
- package/dist/models/CommissionFactor.d.ts +25 -0
- package/dist/models/CommissionFactor.js +51 -0
- package/dist/models/CommissionListDto.d.ts +33 -0
- package/dist/models/CommissionListDto.js +52 -0
- package/dist/models/CommissionPayloadIdInput.d.ts +32 -0
- package/dist/models/CommissionPayloadIdInput.js +51 -0
- package/dist/models/CommissionPayloadInput.d.ts +99 -0
- package/dist/models/CommissionPayloadInput.js +101 -0
- package/dist/models/CommissionPercentageRangeDto.d.ts +44 -0
- package/dist/models/CommissionPercentageRangeDto.js +59 -0
- package/dist/models/CommissionPercentageRangeInput.d.ts +44 -0
- package/dist/models/CommissionPercentageRangeInput.js +59 -0
- package/dist/models/CommissionReasonConfigDto.d.ts +47 -0
- package/dist/models/CommissionReasonConfigDto.js +64 -0
- package/dist/models/CommissionReasonConfigDtoPayload.d.ts +27 -0
- package/dist/models/CommissionReasonConfigDtoPayload.js +54 -0
- package/dist/models/CommissionReasonDto.d.ts +112 -0
- package/dist/models/CommissionReasonDto.js +88 -0
- package/dist/models/FixedCommissionPayloadDto.d.ts +39 -0
- package/dist/models/FixedCommissionPayloadDto.js +56 -0
- package/dist/models/FixedCommissionPayloadInput.d.ts +32 -0
- package/dist/models/FixedCommissionPayloadInput.js +51 -0
- package/dist/models/FixedCommissionReasonPayloadDto.d.ts +39 -0
- package/dist/models/FixedCommissionReasonPayloadDto.js +56 -0
- package/dist/models/LedgerMutationAttachmentDto.d.ts +38 -0
- package/dist/models/LedgerMutationAttachmentDto.js +55 -0
- package/dist/models/LedgerMutationDto.d.ts +7 -0
- package/dist/models/LedgerMutationDto.js +5 -0
- package/dist/models/ListAccounts200Response.d.ts +3 -3
- package/dist/models/ListAccounts200Response.js +3 -3
- package/dist/models/SalesCountCommissionPayloadDto.d.ts +40 -0
- package/dist/models/SalesCountCommissionPayloadDto.js +57 -0
- package/dist/models/SalesCountCommissionPayloadInput.d.ts +33 -0
- package/dist/models/SalesCountCommissionPayloadInput.js +52 -0
- package/dist/models/SalesCountCommissionReasonPayloadDto.d.ts +40 -0
- package/dist/models/SalesCountCommissionReasonPayloadDto.js +57 -0
- package/dist/models/index.d.ts +29 -1
- package/dist/models/index.js +29 -1
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +187 -0
- package/src/models/AccountNameshiftCommissionBySubtypeDto.ts +105 -0
- package/src/models/AccountNameshiftCommissionByTypeDto.ts +74 -0
- package/src/models/{IntersectionListAccountDtoWithAccountCommissionDto.ts → AdminListAccountDto.ts} +33 -51
- package/src/models/BulkCommissionActionsInput.ts +74 -0
- package/src/models/BulkCommissionActionsInputActionsInner.ts +77 -0
- package/src/models/CommissionAccountDto.ts +84 -0
- package/src/models/CommissionAction.ts +54 -0
- package/src/models/CommissionAddUpdateActionInput.ts +92 -0
- package/src/models/CommissionConfigurationDto.ts +74 -0
- package/src/models/CommissionConfigurationDtoPayload.ts +73 -0
- package/src/models/CommissionConfigurationInput.ts +85 -0
- package/src/models/CommissionDeleteActionInput.ts +92 -0
- package/src/models/CommissionDto.ts +193 -0
- package/src/models/CommissionFactor.ts +53 -0
- package/src/models/CommissionListDto.ts +74 -0
- package/src/models/CommissionPayloadIdInput.ts +66 -0
- package/src/models/CommissionPayloadInput.ts +168 -0
- package/src/models/CommissionPercentageRangeDto.ts +84 -0
- package/src/models/CommissionPercentageRangeInput.ts +84 -0
- package/src/models/CommissionReasonConfigDto.ts +94 -0
- package/src/models/CommissionReasonConfigDtoPayload.ts +73 -0
- package/src/models/CommissionReasonDto.ts +182 -0
- package/src/models/FixedCommissionPayloadDto.ts +85 -0
- package/src/models/FixedCommissionPayloadInput.ts +66 -0
- package/src/models/FixedCommissionReasonPayloadDto.ts +85 -0
- package/src/models/LedgerMutationAttachmentDto.ts +75 -0
- package/src/models/LedgerMutationDto.ts +17 -0
- package/src/models/ListAccounts200Response.ts +10 -10
- package/src/models/SalesCountCommissionPayloadDto.ts +92 -0
- package/src/models/SalesCountCommissionPayloadInput.ts +74 -0
- package/src/models/SalesCountCommissionReasonPayloadDto.ts +92 -0
- package/src/models/index.ts +29 -1
- package/dist/models/IntersectionListAccountDtoWithAccountCommissionDto.d.ts +0 -149
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CommissionPercentageRangeDto
|
|
20
|
+
*/
|
|
21
|
+
export interface CommissionPercentageRangeDto {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CommissionPercentageRangeDto
|
|
26
|
+
*/
|
|
27
|
+
min: number | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof CommissionPercentageRangeDto
|
|
32
|
+
*/
|
|
33
|
+
max: number | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof CommissionPercentageRangeDto
|
|
38
|
+
*/
|
|
39
|
+
value: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CommissionPercentageRangeDto interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCommissionPercentageRangeDto(value: object): value is CommissionPercentageRangeDto {
|
|
46
|
+
if (!('min' in value) || value['min'] === undefined) return false;
|
|
47
|
+
if (!('max' in value) || value['max'] === undefined) return false;
|
|
48
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function CommissionPercentageRangeDtoFromJSON(json: any): CommissionPercentageRangeDto {
|
|
53
|
+
return CommissionPercentageRangeDtoFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function CommissionPercentageRangeDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionPercentageRangeDto {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'min': json['min'],
|
|
63
|
+
'max': json['max'],
|
|
64
|
+
'value': json['value'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CommissionPercentageRangeDtoToJSON(json: any): CommissionPercentageRangeDto {
|
|
69
|
+
return CommissionPercentageRangeDtoToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CommissionPercentageRangeDtoToJSONTyped(value?: CommissionPercentageRangeDto | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'min': value['min'],
|
|
80
|
+
'max': value['max'],
|
|
81
|
+
'value': value['value'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CommissionPercentageRangeInput
|
|
20
|
+
*/
|
|
21
|
+
export interface CommissionPercentageRangeInput {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CommissionPercentageRangeInput
|
|
26
|
+
*/
|
|
27
|
+
min: number | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof CommissionPercentageRangeInput
|
|
32
|
+
*/
|
|
33
|
+
max: number | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof CommissionPercentageRangeInput
|
|
38
|
+
*/
|
|
39
|
+
value: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CommissionPercentageRangeInput interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCommissionPercentageRangeInput(value: object): value is CommissionPercentageRangeInput {
|
|
46
|
+
if (!('min' in value) || value['min'] === undefined) return false;
|
|
47
|
+
if (!('max' in value) || value['max'] === undefined) return false;
|
|
48
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function CommissionPercentageRangeInputFromJSON(json: any): CommissionPercentageRangeInput {
|
|
53
|
+
return CommissionPercentageRangeInputFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function CommissionPercentageRangeInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionPercentageRangeInput {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'min': json['min'],
|
|
63
|
+
'max': json['max'],
|
|
64
|
+
'value': json['value'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CommissionPercentageRangeInputToJSON(json: any): CommissionPercentageRangeInput {
|
|
69
|
+
return CommissionPercentageRangeInputToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CommissionPercentageRangeInputToJSONTyped(value?: CommissionPercentageRangeInput | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'min': value['min'],
|
|
80
|
+
'max': value['max'],
|
|
81
|
+
'value': value['value'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CommissionReasonConfigDtoPayload } from './CommissionReasonConfigDtoPayload';
|
|
17
|
+
import {
|
|
18
|
+
CommissionReasonConfigDtoPayloadFromJSON,
|
|
19
|
+
CommissionReasonConfigDtoPayloadFromJSONTyped,
|
|
20
|
+
CommissionReasonConfigDtoPayloadToJSON,
|
|
21
|
+
CommissionReasonConfigDtoPayloadToJSONTyped,
|
|
22
|
+
} from './CommissionReasonConfigDtoPayload';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CommissionReasonConfigDto
|
|
28
|
+
*/
|
|
29
|
+
export interface CommissionReasonConfigDto {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {CommissionReasonConfigDtoPayload}
|
|
33
|
+
* @memberof CommissionReasonConfigDto
|
|
34
|
+
*/
|
|
35
|
+
payload: CommissionReasonConfigDtoPayload | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CommissionReasonConfigDto
|
|
40
|
+
*/
|
|
41
|
+
factor: CommissionReasonConfigDtoFactorEnum;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export const CommissionReasonConfigDtoFactorEnum = {
|
|
49
|
+
FIXED: 'fixed',
|
|
50
|
+
MONTHLY_SALES_COUNT: 'monthly_sales_count'
|
|
51
|
+
} as const;
|
|
52
|
+
export type CommissionReasonConfigDtoFactorEnum = typeof CommissionReasonConfigDtoFactorEnum[keyof typeof CommissionReasonConfigDtoFactorEnum];
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the CommissionReasonConfigDto interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfCommissionReasonConfigDto(value: object): value is CommissionReasonConfigDto {
|
|
59
|
+
if (!('payload' in value) || value['payload'] === undefined) return false;
|
|
60
|
+
if (!('factor' in value) || value['factor'] === undefined) return false;
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function CommissionReasonConfigDtoFromJSON(json: any): CommissionReasonConfigDto {
|
|
65
|
+
return CommissionReasonConfigDtoFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CommissionReasonConfigDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionReasonConfigDto {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'payload': CommissionReasonConfigDtoPayloadFromJSON(json['payload']),
|
|
75
|
+
'factor': json['factor'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function CommissionReasonConfigDtoToJSON(json: any): CommissionReasonConfigDto {
|
|
80
|
+
return CommissionReasonConfigDtoToJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function CommissionReasonConfigDtoToJSONTyped(value?: CommissionReasonConfigDto | null, ignoreDiscriminator: boolean = false): any {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'payload': CommissionReasonConfigDtoPayloadToJSON(value['payload']),
|
|
91
|
+
'factor': value['factor'],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { FixedCommissionReasonPayloadDto } from './FixedCommissionReasonPayloadDto';
|
|
16
|
+
import {
|
|
17
|
+
instanceOfFixedCommissionReasonPayloadDto,
|
|
18
|
+
FixedCommissionReasonPayloadDtoFromJSON,
|
|
19
|
+
FixedCommissionReasonPayloadDtoFromJSONTyped,
|
|
20
|
+
FixedCommissionReasonPayloadDtoToJSON,
|
|
21
|
+
} from './FixedCommissionReasonPayloadDto';
|
|
22
|
+
import type { SalesCountCommissionReasonPayloadDto } from './SalesCountCommissionReasonPayloadDto';
|
|
23
|
+
import {
|
|
24
|
+
instanceOfSalesCountCommissionReasonPayloadDto,
|
|
25
|
+
SalesCountCommissionReasonPayloadDtoFromJSON,
|
|
26
|
+
SalesCountCommissionReasonPayloadDtoFromJSONTyped,
|
|
27
|
+
SalesCountCommissionReasonPayloadDtoToJSON,
|
|
28
|
+
} from './SalesCountCommissionReasonPayloadDto';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type CommissionReasonConfigDtoPayload
|
|
32
|
+
* For FIXED factor: object with factor and value properties. For MONTHLY_SALES_COUNT factor: object with factor and value array properties.
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export type CommissionReasonConfigDtoPayload = { factor: 'fixed' } & FixedCommissionReasonPayloadDto | { factor: 'monthly_sales_count' } & SalesCountCommissionReasonPayloadDto;
|
|
36
|
+
|
|
37
|
+
export function CommissionReasonConfigDtoPayloadFromJSON(json: any): CommissionReasonConfigDtoPayload {
|
|
38
|
+
return CommissionReasonConfigDtoPayloadFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function CommissionReasonConfigDtoPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionReasonConfigDtoPayload {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
switch (json['factor']) {
|
|
46
|
+
case 'fixed':
|
|
47
|
+
return Object.assign({}, FixedCommissionReasonPayloadDtoFromJSONTyped(json, true), { factor: 'fixed' } as const);
|
|
48
|
+
case 'monthly_sales_count':
|
|
49
|
+
return Object.assign({}, SalesCountCommissionReasonPayloadDtoFromJSONTyped(json, true), { factor: 'monthly_sales_count' } as const);
|
|
50
|
+
default:
|
|
51
|
+
throw new Error(`No variant of CommissionReasonConfigDtoPayload exists with 'factor=${json['factor']}'`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CommissionReasonConfigDtoPayloadToJSON(json: any): any {
|
|
56
|
+
return CommissionReasonConfigDtoPayloadToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CommissionReasonConfigDtoPayloadToJSONTyped(value?: CommissionReasonConfigDtoPayload | null, ignoreDiscriminator: boolean = false): any {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
switch (value['factor']) {
|
|
64
|
+
case 'fixed':
|
|
65
|
+
return Object.assign({}, FixedCommissionReasonPayloadDtoToJSON(value), { factor: 'fixed' } as const);
|
|
66
|
+
case 'monthly_sales_count':
|
|
67
|
+
return Object.assign({}, SalesCountCommissionReasonPayloadDtoToJSON(value), { factor: 'monthly_sales_count' } as const);
|
|
68
|
+
default:
|
|
69
|
+
throw new Error(`No variant of CommissionReasonConfigDtoPayload exists with 'factor=${value['factor']}'`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CommissionReasonConfigDto } from './CommissionReasonConfigDto';
|
|
17
|
+
import {
|
|
18
|
+
CommissionReasonConfigDtoFromJSON,
|
|
19
|
+
CommissionReasonConfigDtoFromJSONTyped,
|
|
20
|
+
CommissionReasonConfigDtoToJSON,
|
|
21
|
+
CommissionReasonConfigDtoToJSONTyped,
|
|
22
|
+
} from './CommissionReasonConfigDto';
|
|
23
|
+
import type { CommissionPercentageRangeDto } from './CommissionPercentageRangeDto';
|
|
24
|
+
import {
|
|
25
|
+
CommissionPercentageRangeDtoFromJSON,
|
|
26
|
+
CommissionPercentageRangeDtoFromJSONTyped,
|
|
27
|
+
CommissionPercentageRangeDtoToJSON,
|
|
28
|
+
CommissionPercentageRangeDtoToJSONTyped,
|
|
29
|
+
} from './CommissionPercentageRangeDto';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface CommissionReasonDto
|
|
35
|
+
*/
|
|
36
|
+
export interface CommissionReasonDto {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof CommissionReasonDto
|
|
41
|
+
*/
|
|
42
|
+
text?: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof CommissionReasonDto
|
|
47
|
+
*/
|
|
48
|
+
type?: CommissionReasonDtoTypeEnum;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof CommissionReasonDto
|
|
53
|
+
*/
|
|
54
|
+
subtype?: CommissionReasonDtoSubtypeEnum;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof CommissionReasonDto
|
|
59
|
+
*/
|
|
60
|
+
label?: string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {CommissionReasonConfigDto}
|
|
64
|
+
* @memberof CommissionReasonDto
|
|
65
|
+
*/
|
|
66
|
+
config?: CommissionReasonConfigDto | null;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof CommissionReasonDto
|
|
71
|
+
*/
|
|
72
|
+
dateStart?: string;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof CommissionReasonDto
|
|
77
|
+
*/
|
|
78
|
+
dateEnd?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Array<string>}
|
|
82
|
+
* @memberof CommissionReasonDto
|
|
83
|
+
*/
|
|
84
|
+
excludedAccountIds?: Array<string>;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof CommissionReasonDto
|
|
89
|
+
*/
|
|
90
|
+
selectedValue?: number;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {CommissionPercentageRangeDto}
|
|
94
|
+
* @memberof CommissionReasonDto
|
|
95
|
+
*/
|
|
96
|
+
selectedTier?: CommissionPercentageRangeDto | null;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @type {number}
|
|
100
|
+
* @memberof CommissionReasonDto
|
|
101
|
+
*/
|
|
102
|
+
factorCountResult?: number | null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @export
|
|
108
|
+
*/
|
|
109
|
+
export const CommissionReasonDtoTypeEnum = {
|
|
110
|
+
NAMESHIFT_COMMISSIONS: 'nameshift_commissions',
|
|
111
|
+
AFFILIATE_COMMISSIONS: 'affiliate_commissions'
|
|
112
|
+
} as const;
|
|
113
|
+
export type CommissionReasonDtoTypeEnum = typeof CommissionReasonDtoTypeEnum[keyof typeof CommissionReasonDtoTypeEnum];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @export
|
|
117
|
+
*/
|
|
118
|
+
export const CommissionReasonDtoSubtypeEnum = {
|
|
119
|
+
POINTING: 'pointing',
|
|
120
|
+
NOT_POINTING: 'not_pointing',
|
|
121
|
+
MANUAL_LEAD: 'manual_lead',
|
|
122
|
+
AUCTION: 'auction'
|
|
123
|
+
} as const;
|
|
124
|
+
export type CommissionReasonDtoSubtypeEnum = typeof CommissionReasonDtoSubtypeEnum[keyof typeof CommissionReasonDtoSubtypeEnum];
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Check if a given object implements the CommissionReasonDto interface.
|
|
129
|
+
*/
|
|
130
|
+
export function instanceOfCommissionReasonDto(value: object): value is CommissionReasonDto {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function CommissionReasonDtoFromJSON(json: any): CommissionReasonDto {
|
|
135
|
+
return CommissionReasonDtoFromJSONTyped(json, false);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function CommissionReasonDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionReasonDto {
|
|
139
|
+
if (json == null) {
|
|
140
|
+
return json;
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
|
|
144
|
+
'text': json['text'] == null ? undefined : json['text'],
|
|
145
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
146
|
+
'subtype': json['subtype'] == null ? undefined : json['subtype'],
|
|
147
|
+
'label': json['label'] == null ? undefined : json['label'],
|
|
148
|
+
'config': json['config'] == null ? undefined : CommissionReasonConfigDtoFromJSON(json['config']),
|
|
149
|
+
'dateStart': json['dateStart'] == null ? undefined : json['dateStart'],
|
|
150
|
+
'dateEnd': json['dateEnd'] == null ? undefined : json['dateEnd'],
|
|
151
|
+
'excludedAccountIds': json['excludedAccountIds'] == null ? undefined : json['excludedAccountIds'],
|
|
152
|
+
'selectedValue': json['selectedValue'] == null ? undefined : json['selectedValue'],
|
|
153
|
+
'selectedTier': json['selectedTier'] == null ? undefined : CommissionPercentageRangeDtoFromJSON(json['selectedTier']),
|
|
154
|
+
'factorCountResult': json['factorCountResult'] == null ? undefined : json['factorCountResult'],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function CommissionReasonDtoToJSON(json: any): CommissionReasonDto {
|
|
159
|
+
return CommissionReasonDtoToJSONTyped(json, false);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function CommissionReasonDtoToJSONTyped(value?: CommissionReasonDto | null, ignoreDiscriminator: boolean = false): any {
|
|
163
|
+
if (value == null) {
|
|
164
|
+
return value;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
|
|
169
|
+
'text': value['text'],
|
|
170
|
+
'type': value['type'],
|
|
171
|
+
'subtype': value['subtype'],
|
|
172
|
+
'label': value['label'],
|
|
173
|
+
'config': CommissionReasonConfigDtoToJSON(value['config']),
|
|
174
|
+
'dateStart': value['dateStart'],
|
|
175
|
+
'dateEnd': value['dateEnd'],
|
|
176
|
+
'excludedAccountIds': value['excludedAccountIds'],
|
|
177
|
+
'selectedValue': value['selectedValue'],
|
|
178
|
+
'selectedTier': CommissionPercentageRangeDtoToJSON(value['selectedTier']),
|
|
179
|
+
'factorCountResult': value['factorCountResult'],
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CommissionFactor } from './CommissionFactor';
|
|
17
|
+
import {
|
|
18
|
+
CommissionFactorFromJSON,
|
|
19
|
+
CommissionFactorFromJSONTyped,
|
|
20
|
+
CommissionFactorToJSON,
|
|
21
|
+
CommissionFactorToJSONTyped,
|
|
22
|
+
} from './CommissionFactor';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface FixedCommissionPayloadDto
|
|
28
|
+
*/
|
|
29
|
+
export interface FixedCommissionPayloadDto {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {CommissionFactor}
|
|
33
|
+
* @memberof FixedCommissionPayloadDto
|
|
34
|
+
*/
|
|
35
|
+
factor: CommissionFactor;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof FixedCommissionPayloadDto
|
|
40
|
+
*/
|
|
41
|
+
value: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the FixedCommissionPayloadDto interface.
|
|
48
|
+
*/
|
|
49
|
+
export function instanceOfFixedCommissionPayloadDto(value: object): value is FixedCommissionPayloadDto {
|
|
50
|
+
if (!('factor' in value) || value['factor'] === undefined) return false;
|
|
51
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function FixedCommissionPayloadDtoFromJSON(json: any): FixedCommissionPayloadDto {
|
|
56
|
+
return FixedCommissionPayloadDtoFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function FixedCommissionPayloadDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): FixedCommissionPayloadDto {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'factor': CommissionFactorFromJSON(json['factor']),
|
|
66
|
+
'value': json['value'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function FixedCommissionPayloadDtoToJSON(json: any): FixedCommissionPayloadDto {
|
|
71
|
+
return FixedCommissionPayloadDtoToJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function FixedCommissionPayloadDtoToJSONTyped(value?: FixedCommissionPayloadDto | null, ignoreDiscriminator: boolean = false): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'factor': CommissionFactorToJSON(value['factor']),
|
|
82
|
+
'value': value['value'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface FixedCommissionPayloadInput
|
|
20
|
+
*/
|
|
21
|
+
export interface FixedCommissionPayloadInput {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof FixedCommissionPayloadInput
|
|
26
|
+
*/
|
|
27
|
+
value: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the FixedCommissionPayloadInput interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfFixedCommissionPayloadInput(value: object): value is FixedCommissionPayloadInput {
|
|
34
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function FixedCommissionPayloadInputFromJSON(json: any): FixedCommissionPayloadInput {
|
|
39
|
+
return FixedCommissionPayloadInputFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function FixedCommissionPayloadInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): FixedCommissionPayloadInput {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'value': json['value'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function FixedCommissionPayloadInputToJSON(json: any): FixedCommissionPayloadInput {
|
|
53
|
+
return FixedCommissionPayloadInputToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function FixedCommissionPayloadInputToJSONTyped(value?: FixedCommissionPayloadInput | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'value': value['value'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|