@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.
Files changed (103) hide show
  1. package/.openapi-generator/FILES +29 -1
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +45 -1
  4. package/dist/apis/AdminApi.js +211 -0
  5. package/dist/models/AccountNameshiftCommissionBySubtypeDto.d.ts +55 -0
  6. package/dist/models/AccountNameshiftCommissionBySubtypeDto.js +70 -0
  7. package/dist/models/AccountNameshiftCommissionByTypeDto.d.ts +33 -0
  8. package/dist/models/AccountNameshiftCommissionByTypeDto.js +52 -0
  9. package/dist/models/AdminListAccountDto.d.ts +137 -0
  10. package/dist/models/{IntersectionListAccountDtoWithAccountCommissionDto.js → AdminListAccountDto.js} +17 -25
  11. package/dist/models/BulkCommissionActionsInput.d.ts +33 -0
  12. package/dist/models/BulkCommissionActionsInput.js +52 -0
  13. package/dist/models/BulkCommissionActionsInputActionsInner.d.ts +29 -0
  14. package/dist/models/BulkCommissionActionsInputActionsInner.js +58 -0
  15. package/dist/models/CommissionAccountDto.d.ts +44 -0
  16. package/dist/models/CommissionAccountDto.js +59 -0
  17. package/dist/models/CommissionAction.d.ts +26 -0
  18. package/dist/models/CommissionAction.js +52 -0
  19. package/dist/models/CommissionAddUpdateActionInput.d.ts +40 -0
  20. package/dist/models/CommissionAddUpdateActionInput.js +57 -0
  21. package/dist/models/CommissionConfigurationDto.d.ts +33 -0
  22. package/dist/models/CommissionConfigurationDto.js +52 -0
  23. package/dist/models/CommissionConfigurationDtoPayload.d.ts +27 -0
  24. package/dist/models/CommissionConfigurationDtoPayload.js +54 -0
  25. package/dist/models/CommissionConfigurationInput.d.ts +39 -0
  26. package/dist/models/CommissionConfigurationInput.js +56 -0
  27. package/dist/models/CommissionDeleteActionInput.d.ts +40 -0
  28. package/dist/models/CommissionDeleteActionInput.js +57 -0
  29. package/dist/models/CommissionDto.d.ts +112 -0
  30. package/dist/models/CommissionDto.js +110 -0
  31. package/dist/models/CommissionFactor.d.ts +25 -0
  32. package/dist/models/CommissionFactor.js +51 -0
  33. package/dist/models/CommissionListDto.d.ts +33 -0
  34. package/dist/models/CommissionListDto.js +52 -0
  35. package/dist/models/CommissionPayloadIdInput.d.ts +32 -0
  36. package/dist/models/CommissionPayloadIdInput.js +51 -0
  37. package/dist/models/CommissionPayloadInput.d.ts +99 -0
  38. package/dist/models/CommissionPayloadInput.js +101 -0
  39. package/dist/models/CommissionPercentageRangeDto.d.ts +44 -0
  40. package/dist/models/CommissionPercentageRangeDto.js +59 -0
  41. package/dist/models/CommissionPercentageRangeInput.d.ts +44 -0
  42. package/dist/models/CommissionPercentageRangeInput.js +59 -0
  43. package/dist/models/CommissionReasonConfigDto.d.ts +47 -0
  44. package/dist/models/CommissionReasonConfigDto.js +64 -0
  45. package/dist/models/CommissionReasonConfigDtoPayload.d.ts +27 -0
  46. package/dist/models/CommissionReasonConfigDtoPayload.js +54 -0
  47. package/dist/models/CommissionReasonDto.d.ts +112 -0
  48. package/dist/models/CommissionReasonDto.js +88 -0
  49. package/dist/models/FixedCommissionPayloadDto.d.ts +39 -0
  50. package/dist/models/FixedCommissionPayloadDto.js +56 -0
  51. package/dist/models/FixedCommissionPayloadInput.d.ts +32 -0
  52. package/dist/models/FixedCommissionPayloadInput.js +51 -0
  53. package/dist/models/FixedCommissionReasonPayloadDto.d.ts +39 -0
  54. package/dist/models/FixedCommissionReasonPayloadDto.js +56 -0
  55. package/dist/models/LedgerMutationAttachmentDto.d.ts +38 -0
  56. package/dist/models/LedgerMutationAttachmentDto.js +55 -0
  57. package/dist/models/LedgerMutationDto.d.ts +7 -0
  58. package/dist/models/LedgerMutationDto.js +5 -0
  59. package/dist/models/ListAccounts200Response.d.ts +3 -3
  60. package/dist/models/ListAccounts200Response.js +3 -3
  61. package/dist/models/SalesCountCommissionPayloadDto.d.ts +40 -0
  62. package/dist/models/SalesCountCommissionPayloadDto.js +57 -0
  63. package/dist/models/SalesCountCommissionPayloadInput.d.ts +33 -0
  64. package/dist/models/SalesCountCommissionPayloadInput.js +52 -0
  65. package/dist/models/SalesCountCommissionReasonPayloadDto.d.ts +40 -0
  66. package/dist/models/SalesCountCommissionReasonPayloadDto.js +57 -0
  67. package/dist/models/index.d.ts +29 -1
  68. package/dist/models/index.js +29 -1
  69. package/package.json +1 -1
  70. package/src/apis/AdminApi.ts +187 -0
  71. package/src/models/AccountNameshiftCommissionBySubtypeDto.ts +105 -0
  72. package/src/models/AccountNameshiftCommissionByTypeDto.ts +74 -0
  73. package/src/models/{IntersectionListAccountDtoWithAccountCommissionDto.ts → AdminListAccountDto.ts} +33 -51
  74. package/src/models/BulkCommissionActionsInput.ts +74 -0
  75. package/src/models/BulkCommissionActionsInputActionsInner.ts +77 -0
  76. package/src/models/CommissionAccountDto.ts +84 -0
  77. package/src/models/CommissionAction.ts +54 -0
  78. package/src/models/CommissionAddUpdateActionInput.ts +92 -0
  79. package/src/models/CommissionConfigurationDto.ts +74 -0
  80. package/src/models/CommissionConfigurationDtoPayload.ts +73 -0
  81. package/src/models/CommissionConfigurationInput.ts +85 -0
  82. package/src/models/CommissionDeleteActionInput.ts +92 -0
  83. package/src/models/CommissionDto.ts +193 -0
  84. package/src/models/CommissionFactor.ts +53 -0
  85. package/src/models/CommissionListDto.ts +74 -0
  86. package/src/models/CommissionPayloadIdInput.ts +66 -0
  87. package/src/models/CommissionPayloadInput.ts +168 -0
  88. package/src/models/CommissionPercentageRangeDto.ts +84 -0
  89. package/src/models/CommissionPercentageRangeInput.ts +84 -0
  90. package/src/models/CommissionReasonConfigDto.ts +94 -0
  91. package/src/models/CommissionReasonConfigDtoPayload.ts +73 -0
  92. package/src/models/CommissionReasonDto.ts +182 -0
  93. package/src/models/FixedCommissionPayloadDto.ts +85 -0
  94. package/src/models/FixedCommissionPayloadInput.ts +66 -0
  95. package/src/models/FixedCommissionReasonPayloadDto.ts +85 -0
  96. package/src/models/LedgerMutationAttachmentDto.ts +75 -0
  97. package/src/models/LedgerMutationDto.ts +17 -0
  98. package/src/models/ListAccounts200Response.ts +10 -10
  99. package/src/models/SalesCountCommissionPayloadDto.ts +92 -0
  100. package/src/models/SalesCountCommissionPayloadInput.ts +74 -0
  101. package/src/models/SalesCountCommissionReasonPayloadDto.ts +92 -0
  102. package/src/models/index.ts +29 -1
  103. package/dist/models/IntersectionListAccountDtoWithAccountCommissionDto.d.ts +0 -149
@@ -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 { CommissionPayloadIdInput } from './CommissionPayloadIdInput';
24
+ import {
25
+ CommissionPayloadIdInputFromJSON,
26
+ CommissionPayloadIdInputFromJSONTyped,
27
+ CommissionPayloadIdInputToJSON,
28
+ CommissionPayloadIdInputToJSONTyped,
29
+ } from './CommissionPayloadIdInput';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface CommissionDeleteActionInput
35
+ */
36
+ export interface CommissionDeleteActionInput {
37
+ /**
38
+ *
39
+ * @type {CommissionAction}
40
+ * @memberof CommissionDeleteActionInput
41
+ */
42
+ action: CommissionAction;
43
+ /**
44
+ * Commission ID for delete action
45
+ * @type {CommissionPayloadIdInput}
46
+ * @memberof CommissionDeleteActionInput
47
+ */
48
+ payload: CommissionPayloadIdInput;
49
+ }
50
+
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the CommissionDeleteActionInput interface.
55
+ */
56
+ export function instanceOfCommissionDeleteActionInput(value: object): value is CommissionDeleteActionInput {
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 CommissionDeleteActionInputFromJSON(json: any): CommissionDeleteActionInput {
63
+ return CommissionDeleteActionInputFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function CommissionDeleteActionInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionDeleteActionInput {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'action': CommissionActionFromJSON(json['action']),
73
+ 'payload': CommissionPayloadIdInputFromJSON(json['payload']),
74
+ };
75
+ }
76
+
77
+ export function CommissionDeleteActionInputToJSON(json: any): CommissionDeleteActionInput {
78
+ return CommissionDeleteActionInputToJSONTyped(json, false);
79
+ }
80
+
81
+ export function CommissionDeleteActionInputToJSONTyped(value?: CommissionDeleteActionInput | null, ignoreDiscriminator: boolean = false): any {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+
86
+ return {
87
+
88
+ 'action': CommissionActionToJSON(value['action']),
89
+ 'payload': CommissionPayloadIdInputToJSON(value['payload']),
90
+ };
91
+ }
92
+
@@ -0,0 +1,193 @@
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 { CommissionAccountDto } from './CommissionAccountDto';
17
+ import {
18
+ CommissionAccountDtoFromJSON,
19
+ CommissionAccountDtoFromJSONTyped,
20
+ CommissionAccountDtoToJSON,
21
+ CommissionAccountDtoToJSONTyped,
22
+ } from './CommissionAccountDto';
23
+ import type { CommissionConfigurationDto } from './CommissionConfigurationDto';
24
+ import {
25
+ CommissionConfigurationDtoFromJSON,
26
+ CommissionConfigurationDtoFromJSONTyped,
27
+ CommissionConfigurationDtoToJSON,
28
+ CommissionConfigurationDtoToJSONTyped,
29
+ } from './CommissionConfigurationDto';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface CommissionDto
35
+ */
36
+ export interface CommissionDto {
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof CommissionDto
41
+ */
42
+ id: string;
43
+ /**
44
+ * Account information for this commission
45
+ * @type {CommissionAccountDto}
46
+ * @memberof CommissionDto
47
+ */
48
+ account: CommissionAccountDto | null;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof CommissionDto
53
+ */
54
+ type: CommissionDtoTypeEnum;
55
+ /**
56
+ *
57
+ * @type {string}
58
+ * @memberof CommissionDto
59
+ */
60
+ subtype: CommissionDtoSubtypeEnum;
61
+ /**
62
+ *
63
+ * @type {string}
64
+ * @memberof CommissionDto
65
+ */
66
+ label: string;
67
+ /**
68
+ * Commission configuration wrapping factor and payload
69
+ * @type {CommissionConfigurationDto}
70
+ * @memberof CommissionDto
71
+ */
72
+ config: CommissionConfigurationDto | null;
73
+ /**
74
+ *
75
+ * @type {Date}
76
+ * @memberof CommissionDto
77
+ */
78
+ dateStart: Date;
79
+ /**
80
+ *
81
+ * @type {Date}
82
+ * @memberof CommissionDto
83
+ */
84
+ dateEnd: Date | null;
85
+ /**
86
+ *
87
+ * @type {Array<string>}
88
+ * @memberof CommissionDto
89
+ */
90
+ excludedAccountIds: Array<string>;
91
+ /**
92
+ *
93
+ * @type {Date}
94
+ * @memberof CommissionDto
95
+ */
96
+ createdAt: Date;
97
+ /**
98
+ *
99
+ * @type {Date}
100
+ * @memberof CommissionDto
101
+ */
102
+ updatedAt: Date;
103
+ }
104
+
105
+
106
+ /**
107
+ * @export
108
+ */
109
+ export const CommissionDtoTypeEnum = {
110
+ NAMESHIFT_COMMISSIONS: 'nameshift_commissions',
111
+ AFFILIATE_COMMISSIONS: 'affiliate_commissions'
112
+ } as const;
113
+ export type CommissionDtoTypeEnum = typeof CommissionDtoTypeEnum[keyof typeof CommissionDtoTypeEnum];
114
+
115
+ /**
116
+ * @export
117
+ */
118
+ export const CommissionDtoSubtypeEnum = {
119
+ POINTING: 'pointing',
120
+ NOT_POINTING: 'not_pointing',
121
+ MANUAL_LEAD: 'manual_lead',
122
+ AUCTION: 'auction'
123
+ } as const;
124
+ export type CommissionDtoSubtypeEnum = typeof CommissionDtoSubtypeEnum[keyof typeof CommissionDtoSubtypeEnum];
125
+
126
+
127
+ /**
128
+ * Check if a given object implements the CommissionDto interface.
129
+ */
130
+ export function instanceOfCommissionDto(value: object): value is CommissionDto {
131
+ if (!('id' in value) || value['id'] === undefined) return false;
132
+ if (!('account' in value) || value['account'] === undefined) return false;
133
+ if (!('type' in value) || value['type'] === undefined) return false;
134
+ if (!('subtype' in value) || value['subtype'] === undefined) return false;
135
+ if (!('label' in value) || value['label'] === undefined) return false;
136
+ if (!('config' in value) || value['config'] === undefined) return false;
137
+ if (!('dateStart' in value) || value['dateStart'] === undefined) return false;
138
+ if (!('dateEnd' in value) || value['dateEnd'] === undefined) return false;
139
+ if (!('excludedAccountIds' in value) || value['excludedAccountIds'] === undefined) return false;
140
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
141
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
142
+ return true;
143
+ }
144
+
145
+ export function CommissionDtoFromJSON(json: any): CommissionDto {
146
+ return CommissionDtoFromJSONTyped(json, false);
147
+ }
148
+
149
+ export function CommissionDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionDto {
150
+ if (json == null) {
151
+ return json;
152
+ }
153
+ return {
154
+
155
+ 'id': json['id'],
156
+ 'account': CommissionAccountDtoFromJSON(json['account']),
157
+ 'type': json['type'],
158
+ 'subtype': json['subtype'],
159
+ 'label': json['label'],
160
+ 'config': CommissionConfigurationDtoFromJSON(json['config']),
161
+ 'dateStart': (new Date(json['dateStart'])),
162
+ 'dateEnd': (json['dateEnd'] == null ? null : new Date(json['dateEnd'])),
163
+ 'excludedAccountIds': json['excludedAccountIds'],
164
+ 'createdAt': (new Date(json['createdAt'])),
165
+ 'updatedAt': (new Date(json['updatedAt'])),
166
+ };
167
+ }
168
+
169
+ export function CommissionDtoToJSON(json: any): CommissionDto {
170
+ return CommissionDtoToJSONTyped(json, false);
171
+ }
172
+
173
+ export function CommissionDtoToJSONTyped(value?: CommissionDto | null, ignoreDiscriminator: boolean = false): any {
174
+ if (value == null) {
175
+ return value;
176
+ }
177
+
178
+ return {
179
+
180
+ 'id': value['id'],
181
+ 'account': CommissionAccountDtoToJSON(value['account']),
182
+ 'type': value['type'],
183
+ 'subtype': value['subtype'],
184
+ 'label': value['label'],
185
+ 'config': CommissionConfigurationDtoToJSON(value['config']),
186
+ 'dateStart': ((value['dateStart']).toISOString()),
187
+ 'dateEnd': (value['dateEnd'] == null ? null : (value['dateEnd'] as any).toISOString()),
188
+ 'excludedAccountIds': value['excludedAccountIds'],
189
+ 'createdAt': ((value['createdAt']).toISOString()),
190
+ 'updatedAt': ((value['updatedAt']).toISOString()),
191
+ };
192
+ }
193
+
@@ -0,0 +1,53 @@
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 CommissionFactor = {
21
+ FIXED: 'fixed',
22
+ MONTHLY_SALES_COUNT: 'monthly_sales_count'
23
+ } as const;
24
+ export type CommissionFactor = typeof CommissionFactor[keyof typeof CommissionFactor];
25
+
26
+
27
+ export function instanceOfCommissionFactor(value: any): boolean {
28
+ for (const key in CommissionFactor) {
29
+ if (Object.prototype.hasOwnProperty.call(CommissionFactor, key)) {
30
+ if (CommissionFactor[key as keyof typeof CommissionFactor] === value) {
31
+ return true;
32
+ }
33
+ }
34
+ }
35
+ return false;
36
+ }
37
+
38
+ export function CommissionFactorFromJSON(json: any): CommissionFactor {
39
+ return CommissionFactorFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function CommissionFactorFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionFactor {
43
+ return json as CommissionFactor;
44
+ }
45
+
46
+ export function CommissionFactorToJSON(value?: CommissionFactor | null): any {
47
+ return value as any;
48
+ }
49
+
50
+ export function CommissionFactorToJSONTyped(value: any, ignoreDiscriminator: boolean): CommissionFactor {
51
+ return value as CommissionFactor;
52
+ }
53
+
@@ -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 { CommissionDto } from './CommissionDto';
17
+ import {
18
+ CommissionDtoFromJSON,
19
+ CommissionDtoFromJSONTyped,
20
+ CommissionDtoToJSON,
21
+ CommissionDtoToJSONTyped,
22
+ } from './CommissionDto';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CommissionListDto
28
+ */
29
+ export interface CommissionListDto {
30
+ /**
31
+ *
32
+ * @type {Array<CommissionDto>}
33
+ * @memberof CommissionListDto
34
+ */
35
+ data: Array<CommissionDto>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the CommissionListDto interface.
40
+ */
41
+ export function instanceOfCommissionListDto(value: object): value is CommissionListDto {
42
+ if (!('data' in value) || value['data'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function CommissionListDtoFromJSON(json: any): CommissionListDto {
47
+ return CommissionListDtoFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function CommissionListDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionListDto {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'data': ((json['data'] as Array<any>).map(CommissionDtoFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function CommissionListDtoToJSON(json: any): CommissionListDto {
61
+ return CommissionListDtoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function CommissionListDtoToJSONTyped(value?: CommissionListDto | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'data': ((value['data'] as Array<any>).map(CommissionDtoToJSON)),
72
+ };
73
+ }
74
+
@@ -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 CommissionPayloadIdInput
20
+ */
21
+ export interface CommissionPayloadIdInput {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof CommissionPayloadIdInput
26
+ */
27
+ id: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the CommissionPayloadIdInput interface.
32
+ */
33
+ export function instanceOfCommissionPayloadIdInput(value: object): value is CommissionPayloadIdInput {
34
+ if (!('id' in value) || value['id'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function CommissionPayloadIdInputFromJSON(json: any): CommissionPayloadIdInput {
39
+ return CommissionPayloadIdInputFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function CommissionPayloadIdInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionPayloadIdInput {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'id': json['id'],
49
+ };
50
+ }
51
+
52
+ export function CommissionPayloadIdInputToJSON(json: any): CommissionPayloadIdInput {
53
+ return CommissionPayloadIdInputToJSONTyped(json, false);
54
+ }
55
+
56
+ export function CommissionPayloadIdInputToJSONTyped(value?: CommissionPayloadIdInput | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'id': value['id'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,168 @@
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 { CommissionConfigurationInput } from './CommissionConfigurationInput';
17
+ import {
18
+ CommissionConfigurationInputFromJSON,
19
+ CommissionConfigurationInputFromJSONTyped,
20
+ CommissionConfigurationInputToJSON,
21
+ CommissionConfigurationInputToJSONTyped,
22
+ } from './CommissionConfigurationInput';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CommissionPayloadInput
28
+ */
29
+ export interface CommissionPayloadInput {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof CommissionPayloadInput
34
+ */
35
+ id: string | null;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof CommissionPayloadInput
40
+ */
41
+ accountId: string | null;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof CommissionPayloadInput
46
+ */
47
+ type: CommissionPayloadInputTypeEnum;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof CommissionPayloadInput
52
+ */
53
+ subtype: CommissionPayloadInputSubtypeEnum;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof CommissionPayloadInput
58
+ */
59
+ label: string;
60
+ /**
61
+ *
62
+ * @type {CommissionConfigurationInput}
63
+ * @memberof CommissionPayloadInput
64
+ */
65
+ config: CommissionConfigurationInput;
66
+ /**
67
+ *
68
+ * @type {Date}
69
+ * @memberof CommissionPayloadInput
70
+ */
71
+ dateStart: Date;
72
+ /**
73
+ *
74
+ * @type {Date}
75
+ * @memberof CommissionPayloadInput
76
+ */
77
+ dateEnd: Date | null;
78
+ /**
79
+ *
80
+ * @type {Array<string>}
81
+ * @memberof CommissionPayloadInput
82
+ */
83
+ excludedAccountIds: Array<string>;
84
+ }
85
+
86
+
87
+ /**
88
+ * @export
89
+ */
90
+ export const CommissionPayloadInputTypeEnum = {
91
+ NAMESHIFT_COMMISSIONS: 'nameshift_commissions',
92
+ AFFILIATE_COMMISSIONS: 'affiliate_commissions'
93
+ } as const;
94
+ export type CommissionPayloadInputTypeEnum = typeof CommissionPayloadInputTypeEnum[keyof typeof CommissionPayloadInputTypeEnum];
95
+
96
+ /**
97
+ * @export
98
+ */
99
+ export const CommissionPayloadInputSubtypeEnum = {
100
+ POINTING: 'pointing',
101
+ NOT_POINTING: 'not_pointing',
102
+ MANUAL_LEAD: 'manual_lead',
103
+ AUCTION: 'auction'
104
+ } as const;
105
+ export type CommissionPayloadInputSubtypeEnum = typeof CommissionPayloadInputSubtypeEnum[keyof typeof CommissionPayloadInputSubtypeEnum];
106
+
107
+
108
+ /**
109
+ * Check if a given object implements the CommissionPayloadInput interface.
110
+ */
111
+ export function instanceOfCommissionPayloadInput(value: object): value is CommissionPayloadInput {
112
+ if (!('id' in value) || value['id'] === undefined) return false;
113
+ if (!('accountId' in value) || value['accountId'] === undefined) return false;
114
+ if (!('type' in value) || value['type'] === undefined) return false;
115
+ if (!('subtype' in value) || value['subtype'] === undefined) return false;
116
+ if (!('label' in value) || value['label'] === undefined) return false;
117
+ if (!('config' in value) || value['config'] === undefined) return false;
118
+ if (!('dateStart' in value) || value['dateStart'] === undefined) return false;
119
+ if (!('dateEnd' in value) || value['dateEnd'] === undefined) return false;
120
+ if (!('excludedAccountIds' in value) || value['excludedAccountIds'] === undefined) return false;
121
+ return true;
122
+ }
123
+
124
+ export function CommissionPayloadInputFromJSON(json: any): CommissionPayloadInput {
125
+ return CommissionPayloadInputFromJSONTyped(json, false);
126
+ }
127
+
128
+ export function CommissionPayloadInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommissionPayloadInput {
129
+ if (json == null) {
130
+ return json;
131
+ }
132
+ return {
133
+
134
+ 'id': json['id'],
135
+ 'accountId': json['accountId'],
136
+ 'type': json['type'],
137
+ 'subtype': json['subtype'],
138
+ 'label': json['label'],
139
+ 'config': CommissionConfigurationInputFromJSON(json['config']),
140
+ 'dateStart': (new Date(json['dateStart'])),
141
+ 'dateEnd': (json['dateEnd'] == null ? null : new Date(json['dateEnd'])),
142
+ 'excludedAccountIds': json['excludedAccountIds'],
143
+ };
144
+ }
145
+
146
+ export function CommissionPayloadInputToJSON(json: any): CommissionPayloadInput {
147
+ return CommissionPayloadInputToJSONTyped(json, false);
148
+ }
149
+
150
+ export function CommissionPayloadInputToJSONTyped(value?: CommissionPayloadInput | null, ignoreDiscriminator: boolean = false): any {
151
+ if (value == null) {
152
+ return value;
153
+ }
154
+
155
+ return {
156
+
157
+ 'id': value['id'],
158
+ 'accountId': value['accountId'],
159
+ 'type': value['type'],
160
+ 'subtype': value['subtype'],
161
+ 'label': value['label'],
162
+ 'config': CommissionConfigurationInputToJSON(value['config']),
163
+ 'dateStart': ((value['dateStart']).toISOString()),
164
+ 'dateEnd': (value['dateEnd'] == null ? null : (value['dateEnd'] as any).toISOString()),
165
+ 'excludedAccountIds': value['excludedAccountIds'],
166
+ };
167
+ }
168
+