@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,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { BulkCommissionActionsInputActionsInner } from './BulkCommissionActionsInputActionsInner';
|
|
17
|
+
import {
|
|
18
|
+
BulkCommissionActionsInputActionsInnerFromJSON,
|
|
19
|
+
BulkCommissionActionsInputActionsInnerFromJSONTyped,
|
|
20
|
+
BulkCommissionActionsInputActionsInnerToJSON,
|
|
21
|
+
BulkCommissionActionsInputActionsInnerToJSONTyped,
|
|
22
|
+
} from './BulkCommissionActionsInputActionsInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface BulkCommissionActionsInput
|
|
28
|
+
*/
|
|
29
|
+
export interface BulkCommissionActionsInput {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<BulkCommissionActionsInputActionsInner>}
|
|
33
|
+
* @memberof BulkCommissionActionsInput
|
|
34
|
+
*/
|
|
35
|
+
actions: Array<BulkCommissionActionsInputActionsInner>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the BulkCommissionActionsInput interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfBulkCommissionActionsInput(value: object): value is BulkCommissionActionsInput {
|
|
42
|
+
if (!('actions' in value) || value['actions'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function BulkCommissionActionsInputFromJSON(json: any): BulkCommissionActionsInput {
|
|
47
|
+
return BulkCommissionActionsInputFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function BulkCommissionActionsInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkCommissionActionsInput {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'actions': ((json['actions'] as Array<any>).map(BulkCommissionActionsInputActionsInnerFromJSON)),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function BulkCommissionActionsInputToJSON(json: any): BulkCommissionActionsInput {
|
|
61
|
+
return BulkCommissionActionsInputToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function BulkCommissionActionsInputToJSONTyped(value?: BulkCommissionActionsInput | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'actions': ((value['actions'] as Array<any>).map(BulkCommissionActionsInputActionsInnerToJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
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 { CommissionAddUpdateActionInput } from './CommissionAddUpdateActionInput';
|
|
16
|
+
import {
|
|
17
|
+
instanceOfCommissionAddUpdateActionInput,
|
|
18
|
+
CommissionAddUpdateActionInputFromJSON,
|
|
19
|
+
CommissionAddUpdateActionInputFromJSONTyped,
|
|
20
|
+
CommissionAddUpdateActionInputToJSON,
|
|
21
|
+
} from './CommissionAddUpdateActionInput';
|
|
22
|
+
import type { CommissionDeleteActionInput } from './CommissionDeleteActionInput';
|
|
23
|
+
import {
|
|
24
|
+
instanceOfCommissionDeleteActionInput,
|
|
25
|
+
CommissionDeleteActionInputFromJSON,
|
|
26
|
+
CommissionDeleteActionInputFromJSONTyped,
|
|
27
|
+
CommissionDeleteActionInputToJSON,
|
|
28
|
+
} from './CommissionDeleteActionInput';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type BulkCommissionActionsInputActionsInner
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export type BulkCommissionActionsInputActionsInner = { action: 'add' } & CommissionAddUpdateActionInput | { action: 'delete' } & CommissionDeleteActionInput | { action: 'update' } & CommissionAddUpdateActionInput;
|
|
36
|
+
|
|
37
|
+
export function BulkCommissionActionsInputActionsInnerFromJSON(json: any): BulkCommissionActionsInputActionsInner {
|
|
38
|
+
return BulkCommissionActionsInputActionsInnerFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function BulkCommissionActionsInputActionsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkCommissionActionsInputActionsInner {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
switch (json['action']) {
|
|
46
|
+
case 'add':
|
|
47
|
+
return Object.assign({}, CommissionAddUpdateActionInputFromJSONTyped(json, true), { action: 'add' } as const);
|
|
48
|
+
case 'delete':
|
|
49
|
+
return Object.assign({}, CommissionDeleteActionInputFromJSONTyped(json, true), { action: 'delete' } as const);
|
|
50
|
+
case 'update':
|
|
51
|
+
return Object.assign({}, CommissionAddUpdateActionInputFromJSONTyped(json, true), { action: 'update' } as const);
|
|
52
|
+
default:
|
|
53
|
+
throw new Error(`No variant of BulkCommissionActionsInputActionsInner exists with 'action=${json['action']}'`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function BulkCommissionActionsInputActionsInnerToJSON(json: any): any {
|
|
58
|
+
return BulkCommissionActionsInputActionsInnerToJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function BulkCommissionActionsInputActionsInnerToJSONTyped(value?: BulkCommissionActionsInputActionsInner | null, ignoreDiscriminator: boolean = false): any {
|
|
62
|
+
if (value == null) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
switch (value['action']) {
|
|
66
|
+
case 'add':
|
|
67
|
+
return Object.assign({}, CommissionAddUpdateActionInputToJSON(value), { action: 'add' } as const);
|
|
68
|
+
case 'delete':
|
|
69
|
+
return Object.assign({}, CommissionDeleteActionInputToJSON(value), { action: 'delete' } as const);
|
|
70
|
+
case 'update':
|
|
71
|
+
return Object.assign({}, CommissionAddUpdateActionInputToJSON(value), { action: 'update' } as const);
|
|
72
|
+
default:
|
|
73
|
+
throw new Error(`No variant of BulkCommissionActionsInputActionsInner exists with 'action=${value['action']}'`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
|
|
@@ -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 CommissionAccountDto
|
|
20
|
+
*/
|
|
21
|
+
export interface CommissionAccountDto {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CommissionAccountDto
|
|
26
|
+
*/
|
|
27
|
+
id: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CommissionAccountDto
|
|
32
|
+
*/
|
|
33
|
+
identifier: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CommissionAccountDto
|
|
38
|
+
*/
|
|
39
|
+
name: string | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CommissionAccountDto interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCommissionAccountDto(value: object): value is CommissionAccountDto {
|
|
46
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
47
|
+
if (!('identifier' in value) || value['identifier'] === undefined) return false;
|
|
48
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function CommissionAccountDtoFromJSON(json: any): CommissionAccountDto {
|
|
53
|
+
return CommissionAccountDtoFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function CommissionAccountDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionAccountDto {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'id': json['id'],
|
|
63
|
+
'identifier': json['identifier'],
|
|
64
|
+
'name': json['name'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CommissionAccountDtoToJSON(json: any): CommissionAccountDto {
|
|
69
|
+
return CommissionAccountDtoToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CommissionAccountDtoToJSONTyped(value?: CommissionAccountDto | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'id': value['id'],
|
|
80
|
+
'identifier': value['identifier'],
|
|
81
|
+
'name': value['name'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CommissionAction = {
|
|
21
|
+
ADD: 'add',
|
|
22
|
+
UPDATE: 'update',
|
|
23
|
+
DELETE: 'delete'
|
|
24
|
+
} as const;
|
|
25
|
+
export type CommissionAction = typeof CommissionAction[keyof typeof CommissionAction];
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export function instanceOfCommissionAction(value: any): boolean {
|
|
29
|
+
for (const key in CommissionAction) {
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(CommissionAction, key)) {
|
|
31
|
+
if (CommissionAction[key as keyof typeof CommissionAction] === value) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function CommissionActionFromJSON(json: any): CommissionAction {
|
|
40
|
+
return CommissionActionFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function CommissionActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionAction {
|
|
44
|
+
return json as CommissionAction;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function CommissionActionToJSON(value?: CommissionAction | null): any {
|
|
48
|
+
return value as any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CommissionActionToJSONTyped(value: any, ignoreDiscriminator: boolean): CommissionAction {
|
|
52
|
+
return value as CommissionAction;
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { CommissionAction } from './CommissionAction';
|
|
17
|
+
import {
|
|
18
|
+
CommissionActionFromJSON,
|
|
19
|
+
CommissionActionFromJSONTyped,
|
|
20
|
+
CommissionActionToJSON,
|
|
21
|
+
CommissionActionToJSONTyped,
|
|
22
|
+
} from './CommissionAction';
|
|
23
|
+
import type { CommissionPayloadInput } from './CommissionPayloadInput';
|
|
24
|
+
import {
|
|
25
|
+
CommissionPayloadInputFromJSON,
|
|
26
|
+
CommissionPayloadInputFromJSONTyped,
|
|
27
|
+
CommissionPayloadInputToJSON,
|
|
28
|
+
CommissionPayloadInputToJSONTyped,
|
|
29
|
+
} from './CommissionPayloadInput';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface CommissionAddUpdateActionInput
|
|
35
|
+
*/
|
|
36
|
+
export interface CommissionAddUpdateActionInput {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {CommissionAction}
|
|
40
|
+
* @memberof CommissionAddUpdateActionInput
|
|
41
|
+
*/
|
|
42
|
+
action: CommissionAction;
|
|
43
|
+
/**
|
|
44
|
+
* Commission data for add/update actions
|
|
45
|
+
* @type {CommissionPayloadInput}
|
|
46
|
+
* @memberof CommissionAddUpdateActionInput
|
|
47
|
+
*/
|
|
48
|
+
payload: CommissionPayloadInput;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the CommissionAddUpdateActionInput interface.
|
|
55
|
+
*/
|
|
56
|
+
export function instanceOfCommissionAddUpdateActionInput(value: object): value is CommissionAddUpdateActionInput {
|
|
57
|
+
if (!('action' in value) || value['action'] === undefined) return false;
|
|
58
|
+
if (!('payload' in value) || value['payload'] === undefined) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function CommissionAddUpdateActionInputFromJSON(json: any): CommissionAddUpdateActionInput {
|
|
63
|
+
return CommissionAddUpdateActionInputFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CommissionAddUpdateActionInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionAddUpdateActionInput {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'action': CommissionActionFromJSON(json['action']),
|
|
73
|
+
'payload': CommissionPayloadInputFromJSON(json['payload']),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function CommissionAddUpdateActionInputToJSON(json: any): CommissionAddUpdateActionInput {
|
|
78
|
+
return CommissionAddUpdateActionInputToJSONTyped(json, false);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function CommissionAddUpdateActionInputToJSONTyped(value?: CommissionAddUpdateActionInput | null, ignoreDiscriminator: boolean = false): any {
|
|
82
|
+
if (value == null) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'action': CommissionActionToJSON(value['action']),
|
|
89
|
+
'payload': CommissionPayloadInputToJSON(value['payload']),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CommissionConfigurationDtoPayload } from './CommissionConfigurationDtoPayload';
|
|
17
|
+
import {
|
|
18
|
+
CommissionConfigurationDtoPayloadFromJSON,
|
|
19
|
+
CommissionConfigurationDtoPayloadFromJSONTyped,
|
|
20
|
+
CommissionConfigurationDtoPayloadToJSON,
|
|
21
|
+
CommissionConfigurationDtoPayloadToJSONTyped,
|
|
22
|
+
} from './CommissionConfigurationDtoPayload';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CommissionConfigurationDto
|
|
28
|
+
*/
|
|
29
|
+
export interface CommissionConfigurationDto {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {CommissionConfigurationDtoPayload}
|
|
33
|
+
* @memberof CommissionConfigurationDto
|
|
34
|
+
*/
|
|
35
|
+
payload: CommissionConfigurationDtoPayload | null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CommissionConfigurationDto interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCommissionConfigurationDto(value: object): value is CommissionConfigurationDto {
|
|
42
|
+
if (!('payload' in value) || value['payload'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CommissionConfigurationDtoFromJSON(json: any): CommissionConfigurationDto {
|
|
47
|
+
return CommissionConfigurationDtoFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CommissionConfigurationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionConfigurationDto {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'payload': CommissionConfigurationDtoPayloadFromJSON(json['payload']),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function CommissionConfigurationDtoToJSON(json: any): CommissionConfigurationDto {
|
|
61
|
+
return CommissionConfigurationDtoToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function CommissionConfigurationDtoToJSONTyped(value?: CommissionConfigurationDto | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'payload': CommissionConfigurationDtoPayloadToJSON(value['payload']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -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 { FixedCommissionPayloadDto } from './FixedCommissionPayloadDto';
|
|
16
|
+
import {
|
|
17
|
+
instanceOfFixedCommissionPayloadDto,
|
|
18
|
+
FixedCommissionPayloadDtoFromJSON,
|
|
19
|
+
FixedCommissionPayloadDtoFromJSONTyped,
|
|
20
|
+
FixedCommissionPayloadDtoToJSON,
|
|
21
|
+
} from './FixedCommissionPayloadDto';
|
|
22
|
+
import type { SalesCountCommissionPayloadDto } from './SalesCountCommissionPayloadDto';
|
|
23
|
+
import {
|
|
24
|
+
instanceOfSalesCountCommissionPayloadDto,
|
|
25
|
+
SalesCountCommissionPayloadDtoFromJSON,
|
|
26
|
+
SalesCountCommissionPayloadDtoFromJSONTyped,
|
|
27
|
+
SalesCountCommissionPayloadDtoToJSON,
|
|
28
|
+
} from './SalesCountCommissionPayloadDto';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type CommissionConfigurationDtoPayload
|
|
32
|
+
* For FIXED factor: object with factor and value properties. For SALES_COUNT factor: object with factor and value array properties.
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export type CommissionConfigurationDtoPayload = { factor: 'fixed' } & FixedCommissionPayloadDto | { factor: 'monthly_sales_count' } & SalesCountCommissionPayloadDto;
|
|
36
|
+
|
|
37
|
+
export function CommissionConfigurationDtoPayloadFromJSON(json: any): CommissionConfigurationDtoPayload {
|
|
38
|
+
return CommissionConfigurationDtoPayloadFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function CommissionConfigurationDtoPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionConfigurationDtoPayload {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
switch (json['factor']) {
|
|
46
|
+
case 'fixed':
|
|
47
|
+
return Object.assign({}, FixedCommissionPayloadDtoFromJSONTyped(json, true), { factor: 'fixed' } as const);
|
|
48
|
+
case 'monthly_sales_count':
|
|
49
|
+
return Object.assign({}, SalesCountCommissionPayloadDtoFromJSONTyped(json, true), { factor: 'monthly_sales_count' } as const);
|
|
50
|
+
default:
|
|
51
|
+
throw new Error(`No variant of CommissionConfigurationDtoPayload exists with 'factor=${json['factor']}'`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CommissionConfigurationDtoPayloadToJSON(json: any): any {
|
|
56
|
+
return CommissionConfigurationDtoPayloadToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CommissionConfigurationDtoPayloadToJSONTyped(value?: CommissionConfigurationDtoPayload | null, ignoreDiscriminator: boolean = false): any {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
switch (value['factor']) {
|
|
64
|
+
case 'fixed':
|
|
65
|
+
return Object.assign({}, FixedCommissionPayloadDtoToJSON(value), { factor: 'fixed' } as const);
|
|
66
|
+
case 'monthly_sales_count':
|
|
67
|
+
return Object.assign({}, SalesCountCommissionPayloadDtoToJSON(value), { factor: 'monthly_sales_count' } as const);
|
|
68
|
+
default:
|
|
69
|
+
throw new Error(`No variant of CommissionConfigurationDtoPayload exists with 'factor=${value['factor']}'`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -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 CommissionConfigurationInput
|
|
28
|
+
*/
|
|
29
|
+
export interface CommissionConfigurationInput {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {CommissionFactor}
|
|
33
|
+
* @memberof CommissionConfigurationInput
|
|
34
|
+
*/
|
|
35
|
+
factor: CommissionFactor;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {object}
|
|
39
|
+
* @memberof CommissionConfigurationInput
|
|
40
|
+
*/
|
|
41
|
+
payload: object;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the CommissionConfigurationInput interface.
|
|
48
|
+
*/
|
|
49
|
+
export function instanceOfCommissionConfigurationInput(value: object): value is CommissionConfigurationInput {
|
|
50
|
+
if (!('factor' in value) || value['factor'] === undefined) return false;
|
|
51
|
+
if (!('payload' in value) || value['payload'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CommissionConfigurationInputFromJSON(json: any): CommissionConfigurationInput {
|
|
56
|
+
return CommissionConfigurationInputFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CommissionConfigurationInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionConfigurationInput {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'factor': CommissionFactorFromJSON(json['factor']),
|
|
66
|
+
'payload': json['payload'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function CommissionConfigurationInputToJSON(json: any): CommissionConfigurationInput {
|
|
71
|
+
return CommissionConfigurationInputToJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function CommissionConfigurationInputToJSONTyped(value?: CommissionConfigurationInput | null, ignoreDiscriminator: boolean = false): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'factor': CommissionFactorToJSON(value['factor']),
|
|
82
|
+
'payload': value['payload'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|