@randock/nameshift-api-client 0.0.376 → 0.0.377

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 (30) hide show
  1. package/.openapi-generator/FILES +5 -0
  2. package/README.md +3 -3
  3. package/dist/apis/AccountsApi.d.ts +9 -1
  4. package/dist/apis/AccountsApi.js +50 -0
  5. package/dist/models/AccountNameshiftCommissionBySubtypePercentagesDto.d.ts +51 -0
  6. package/dist/models/AccountNameshiftCommissionBySubtypePercentagesDto.js +64 -0
  7. package/dist/models/AccountNameshiftCommissionByTypeDto.d.ts +7 -0
  8. package/dist/models/AccountNameshiftCommissionByTypeDto.js +5 -0
  9. package/dist/models/AccountNameshiftCommissionItemDto.d.ts +73 -0
  10. package/dist/models/AccountNameshiftCommissionItemDto.js +82 -0
  11. package/dist/models/AccountNameshiftCommissionReasonDto.d.ts +112 -0
  12. package/dist/models/AccountNameshiftCommissionReasonDto.js +88 -0
  13. package/dist/models/AccountNameshiftCommissionSubtypeCurrentDto.d.ts +39 -0
  14. package/dist/models/AccountNameshiftCommissionSubtypeCurrentDto.js +56 -0
  15. package/dist/models/CommissionReasonDto.d.ts +6 -0
  16. package/dist/models/CommissionReasonDto.js +2 -0
  17. package/dist/models/GetAccountNameshiftCommissionsResponseDto.d.ts +40 -0
  18. package/dist/models/GetAccountNameshiftCommissionsResponseDto.js +57 -0
  19. package/dist/models/index.d.ts +5 -0
  20. package/dist/models/index.js +5 -0
  21. package/package.json +1 -1
  22. package/src/apis/AccountsApi.ts +37 -0
  23. package/src/models/AccountNameshiftCommissionBySubtypePercentagesDto.ts +101 -0
  24. package/src/models/AccountNameshiftCommissionByTypeDto.ts +16 -0
  25. package/src/models/AccountNameshiftCommissionItemDto.ts +132 -0
  26. package/src/models/AccountNameshiftCommissionReasonDto.ts +182 -0
  27. package/src/models/AccountNameshiftCommissionSubtypeCurrentDto.ts +83 -0
  28. package/src/models/CommissionReasonDto.ts +8 -0
  29. package/src/models/GetAccountNameshiftCommissionsResponseDto.ts +90 -0
  30. package/src/models/index.ts +5 -0
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { AccountNameshiftCommissionReasonDto } from './AccountNameshiftCommissionReasonDto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AccountNameshiftCommissionSubtypeCurrentDto
17
+ */
18
+ export interface AccountNameshiftCommissionSubtypeCurrentDto {
19
+ /**
20
+ * Commission percentage
21
+ * @type {number}
22
+ * @memberof AccountNameshiftCommissionSubtypeCurrentDto
23
+ */
24
+ percentage: number;
25
+ /**
26
+ * Reason for this commission (e.g. label, date range, config)
27
+ * @type {AccountNameshiftCommissionReasonDto}
28
+ * @memberof AccountNameshiftCommissionSubtypeCurrentDto
29
+ */
30
+ reason: AccountNameshiftCommissionReasonDto | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the AccountNameshiftCommissionSubtypeCurrentDto interface.
34
+ */
35
+ export declare function instanceOfAccountNameshiftCommissionSubtypeCurrentDto(value: object): value is AccountNameshiftCommissionSubtypeCurrentDto;
36
+ export declare function AccountNameshiftCommissionSubtypeCurrentDtoFromJSON(json: any): AccountNameshiftCommissionSubtypeCurrentDto;
37
+ export declare function AccountNameshiftCommissionSubtypeCurrentDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountNameshiftCommissionSubtypeCurrentDto;
38
+ export declare function AccountNameshiftCommissionSubtypeCurrentDtoToJSON(json: any): AccountNameshiftCommissionSubtypeCurrentDto;
39
+ export declare function AccountNameshiftCommissionSubtypeCurrentDtoToJSONTyped(value?: AccountNameshiftCommissionSubtypeCurrentDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift API
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAccountNameshiftCommissionSubtypeCurrentDto = instanceOfAccountNameshiftCommissionSubtypeCurrentDto;
17
+ exports.AccountNameshiftCommissionSubtypeCurrentDtoFromJSON = AccountNameshiftCommissionSubtypeCurrentDtoFromJSON;
18
+ exports.AccountNameshiftCommissionSubtypeCurrentDtoFromJSONTyped = AccountNameshiftCommissionSubtypeCurrentDtoFromJSONTyped;
19
+ exports.AccountNameshiftCommissionSubtypeCurrentDtoToJSON = AccountNameshiftCommissionSubtypeCurrentDtoToJSON;
20
+ exports.AccountNameshiftCommissionSubtypeCurrentDtoToJSONTyped = AccountNameshiftCommissionSubtypeCurrentDtoToJSONTyped;
21
+ var AccountNameshiftCommissionReasonDto_1 = require("./AccountNameshiftCommissionReasonDto");
22
+ /**
23
+ * Check if a given object implements the AccountNameshiftCommissionSubtypeCurrentDto interface.
24
+ */
25
+ function instanceOfAccountNameshiftCommissionSubtypeCurrentDto(value) {
26
+ if (!('percentage' in value) || value['percentage'] === undefined)
27
+ return false;
28
+ if (!('reason' in value) || value['reason'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function AccountNameshiftCommissionSubtypeCurrentDtoFromJSON(json) {
33
+ return AccountNameshiftCommissionSubtypeCurrentDtoFromJSONTyped(json, false);
34
+ }
35
+ function AccountNameshiftCommissionSubtypeCurrentDtoFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'percentage': json['percentage'],
41
+ 'reason': (0, AccountNameshiftCommissionReasonDto_1.AccountNameshiftCommissionReasonDtoFromJSON)(json['reason']),
42
+ };
43
+ }
44
+ function AccountNameshiftCommissionSubtypeCurrentDtoToJSON(json) {
45
+ return AccountNameshiftCommissionSubtypeCurrentDtoToJSONTyped(json, false);
46
+ }
47
+ function AccountNameshiftCommissionSubtypeCurrentDtoToJSONTyped(value, ignoreDiscriminator) {
48
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'percentage': value['percentage'],
54
+ 'reason': (0, AccountNameshiftCommissionReasonDto_1.AccountNameshiftCommissionReasonDtoToJSON)(value['reason']),
55
+ };
56
+ }
@@ -17,6 +17,12 @@ import type { CommissionPercentageRangeDto } from './CommissionPercentageRangeDt
17
17
  * @interface CommissionReasonDto
18
18
  */
19
19
  export interface CommissionReasonDto {
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof CommissionReasonDto
24
+ */
25
+ commissionId?: string;
20
26
  /**
21
27
  *
22
28
  * @type {string}
@@ -51,6 +51,7 @@ function CommissionReasonDtoFromJSONTyped(json, ignoreDiscriminator) {
51
51
  return json;
52
52
  }
53
53
  return {
54
+ 'commissionId': json['commissionId'] == null ? undefined : json['commissionId'],
54
55
  'text': json['text'] == null ? undefined : json['text'],
55
56
  'type': json['type'] == null ? undefined : json['type'],
56
57
  'subtype': json['subtype'] == null ? undefined : json['subtype'],
@@ -73,6 +74,7 @@ function CommissionReasonDtoToJSONTyped(value, ignoreDiscriminator) {
73
74
  return value;
74
75
  }
75
76
  return {
77
+ 'commissionId': value['commissionId'],
76
78
  'text': value['text'],
77
79
  'type': value['type'],
78
80
  'subtype': value['subtype'],
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { AccountNameshiftCommissionItemDto } from './AccountNameshiftCommissionItemDto';
13
+ import type { AccountNameshiftCommissionBySubtypePercentagesDto } from './AccountNameshiftCommissionBySubtypePercentagesDto';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface GetAccountNameshiftCommissionsResponseDto
18
+ */
19
+ export interface GetAccountNameshiftCommissionsResponseDto {
20
+ /**
21
+ * Current commission percentage by subtype
22
+ * @type {AccountNameshiftCommissionBySubtypePercentagesDto}
23
+ * @memberof GetAccountNameshiftCommissionsResponseDto
24
+ */
25
+ current: AccountNameshiftCommissionBySubtypePercentagesDto;
26
+ /**
27
+ * List of nameshift commissions (not expired or not yet started)
28
+ * @type {Array<AccountNameshiftCommissionItemDto>}
29
+ * @memberof GetAccountNameshiftCommissionsResponseDto
30
+ */
31
+ details: Array<AccountNameshiftCommissionItemDto>;
32
+ }
33
+ /**
34
+ * Check if a given object implements the GetAccountNameshiftCommissionsResponseDto interface.
35
+ */
36
+ export declare function instanceOfGetAccountNameshiftCommissionsResponseDto(value: object): value is GetAccountNameshiftCommissionsResponseDto;
37
+ export declare function GetAccountNameshiftCommissionsResponseDtoFromJSON(json: any): GetAccountNameshiftCommissionsResponseDto;
38
+ export declare function GetAccountNameshiftCommissionsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAccountNameshiftCommissionsResponseDto;
39
+ export declare function GetAccountNameshiftCommissionsResponseDtoToJSON(json: any): GetAccountNameshiftCommissionsResponseDto;
40
+ export declare function GetAccountNameshiftCommissionsResponseDtoToJSONTyped(value?: GetAccountNameshiftCommissionsResponseDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift API
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfGetAccountNameshiftCommissionsResponseDto = instanceOfGetAccountNameshiftCommissionsResponseDto;
17
+ exports.GetAccountNameshiftCommissionsResponseDtoFromJSON = GetAccountNameshiftCommissionsResponseDtoFromJSON;
18
+ exports.GetAccountNameshiftCommissionsResponseDtoFromJSONTyped = GetAccountNameshiftCommissionsResponseDtoFromJSONTyped;
19
+ exports.GetAccountNameshiftCommissionsResponseDtoToJSON = GetAccountNameshiftCommissionsResponseDtoToJSON;
20
+ exports.GetAccountNameshiftCommissionsResponseDtoToJSONTyped = GetAccountNameshiftCommissionsResponseDtoToJSONTyped;
21
+ var AccountNameshiftCommissionItemDto_1 = require("./AccountNameshiftCommissionItemDto");
22
+ var AccountNameshiftCommissionBySubtypePercentagesDto_1 = require("./AccountNameshiftCommissionBySubtypePercentagesDto");
23
+ /**
24
+ * Check if a given object implements the GetAccountNameshiftCommissionsResponseDto interface.
25
+ */
26
+ function instanceOfGetAccountNameshiftCommissionsResponseDto(value) {
27
+ if (!('current' in value) || value['current'] === undefined)
28
+ return false;
29
+ if (!('details' in value) || value['details'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function GetAccountNameshiftCommissionsResponseDtoFromJSON(json) {
34
+ return GetAccountNameshiftCommissionsResponseDtoFromJSONTyped(json, false);
35
+ }
36
+ function GetAccountNameshiftCommissionsResponseDtoFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'current': (0, AccountNameshiftCommissionBySubtypePercentagesDto_1.AccountNameshiftCommissionBySubtypePercentagesDtoFromJSON)(json['current']),
42
+ 'details': (json['details'].map(AccountNameshiftCommissionItemDto_1.AccountNameshiftCommissionItemDtoFromJSON)),
43
+ };
44
+ }
45
+ function GetAccountNameshiftCommissionsResponseDtoToJSON(json) {
46
+ return GetAccountNameshiftCommissionsResponseDtoToJSONTyped(json, false);
47
+ }
48
+ function GetAccountNameshiftCommissionsResponseDtoToJSONTyped(value, ignoreDiscriminator) {
49
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'current': (0, AccountNameshiftCommissionBySubtypePercentagesDto_1.AccountNameshiftCommissionBySubtypePercentagesDtoToJSON)(value['current']),
55
+ 'details': (value['details'].map(AccountNameshiftCommissionItemDto_1.AccountNameshiftCommissionItemDtoToJSON)),
56
+ };
57
+ }
@@ -7,7 +7,11 @@ export * from './AccountCountryStatsDto';
7
7
  export * from './AccountDto';
8
8
  export * from './AccountMetricsDto';
9
9
  export * from './AccountNameshiftCommissionBySubtypeDto';
10
+ export * from './AccountNameshiftCommissionBySubtypePercentagesDto';
10
11
  export * from './AccountNameshiftCommissionByTypeDto';
12
+ export * from './AccountNameshiftCommissionItemDto';
13
+ export * from './AccountNameshiftCommissionReasonDto';
14
+ export * from './AccountNameshiftCommissionSubtypeCurrentDto';
11
15
  export * from './AccountNotificationDto';
12
16
  export * from './AccountNotificationReadStatusDto';
13
17
  export * from './AccountOnboardingDto';
@@ -187,6 +191,7 @@ export * from './FixedCommissionPayloadDto';
187
191
  export * from './FixedCommissionPayloadInput';
188
192
  export * from './FixedCommissionReasonPayloadDto';
189
193
  export * from './ForgotPasswordRequestInput';
194
+ export * from './GetAccountNameshiftCommissionsResponseDto';
190
195
  export * from './GetAllAffiliateCommissions200Response';
191
196
  export * from './GetAllAuctions200Response';
192
197
  export * from './GetAllAuctions200Response1';
@@ -25,7 +25,11 @@ __exportStar(require("./AccountCountryStatsDto"), exports);
25
25
  __exportStar(require("./AccountDto"), exports);
26
26
  __exportStar(require("./AccountMetricsDto"), exports);
27
27
  __exportStar(require("./AccountNameshiftCommissionBySubtypeDto"), exports);
28
+ __exportStar(require("./AccountNameshiftCommissionBySubtypePercentagesDto"), exports);
28
29
  __exportStar(require("./AccountNameshiftCommissionByTypeDto"), exports);
30
+ __exportStar(require("./AccountNameshiftCommissionItemDto"), exports);
31
+ __exportStar(require("./AccountNameshiftCommissionReasonDto"), exports);
32
+ __exportStar(require("./AccountNameshiftCommissionSubtypeCurrentDto"), exports);
29
33
  __exportStar(require("./AccountNotificationDto"), exports);
30
34
  __exportStar(require("./AccountNotificationReadStatusDto"), exports);
31
35
  __exportStar(require("./AccountOnboardingDto"), exports);
@@ -205,6 +209,7 @@ __exportStar(require("./FixedCommissionPayloadDto"), exports);
205
209
  __exportStar(require("./FixedCommissionPayloadInput"), exports);
206
210
  __exportStar(require("./FixedCommissionReasonPayloadDto"), exports);
207
211
  __exportStar(require("./ForgotPasswordRequestInput"), exports);
212
+ __exportStar(require("./GetAccountNameshiftCommissionsResponseDto"), exports);
208
213
  __exportStar(require("./GetAllAffiliateCommissions200Response"), exports);
209
214
  __exportStar(require("./GetAllAuctions200Response"), exports);
210
215
  __exportStar(require("./GetAllAuctions200Response1"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.376",
3
+ "version": "0.0.377",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -23,6 +23,7 @@ import type {
23
23
  BadRequestException,
24
24
  CreateAccountPaymentInput,
25
25
  CreateAccountPaymentManualTransactionInput,
26
+ GetAccountNameshiftCommissionsResponseDto,
26
27
  GetAllAffiliateCommissions200Response,
27
28
  GetAllReferrals200Response,
28
29
  MoneyDto,
@@ -51,6 +52,8 @@ import {
51
52
  CreateAccountPaymentInputToJSON,
52
53
  CreateAccountPaymentManualTransactionInputFromJSON,
53
54
  CreateAccountPaymentManualTransactionInputToJSON,
55
+ GetAccountNameshiftCommissionsResponseDtoFromJSON,
56
+ GetAccountNameshiftCommissionsResponseDtoToJSON,
54
57
  GetAllAffiliateCommissions200ResponseFromJSON,
55
58
  GetAllAffiliateCommissions200ResponseToJSON,
56
59
  GetAllReferrals200ResponseFromJSON,
@@ -623,6 +626,40 @@ export class AccountsApi extends runtime.BaseAPI {
623
626
  return await response.value();
624
627
  }
625
628
 
629
+ /**
630
+ *
631
+ */
632
+ async getNameshiftCommissionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAccountNameshiftCommissionsResponseDto>> {
633
+ const queryParameters: any = {};
634
+
635
+ const headerParameters: runtime.HTTPHeaders = {};
636
+
637
+ if (this.configuration && this.configuration.accessToken) {
638
+ const token = this.configuration.accessToken;
639
+ const tokenString = await token("bearer", []);
640
+
641
+ if (tokenString) {
642
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
643
+ }
644
+ }
645
+ const response = await this.request({
646
+ path: `/private/accounts/me/nameshift-commissions`,
647
+ method: 'GET',
648
+ headers: headerParameters,
649
+ query: queryParameters,
650
+ }, initOverrides);
651
+
652
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetAccountNameshiftCommissionsResponseDtoFromJSON(jsonValue));
653
+ }
654
+
655
+ /**
656
+ *
657
+ */
658
+ async getNameshiftCommissions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountNameshiftCommissionsResponseDto> {
659
+ const response = await this.getNameshiftCommissionsRaw(initOverrides);
660
+ return await response.value();
661
+ }
662
+
626
663
  /**
627
664
  *
628
665
  */
@@ -0,0 +1,101 @@
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 { AccountNameshiftCommissionSubtypeCurrentDto } from './AccountNameshiftCommissionSubtypeCurrentDto';
17
+ import {
18
+ AccountNameshiftCommissionSubtypeCurrentDtoFromJSON,
19
+ AccountNameshiftCommissionSubtypeCurrentDtoFromJSONTyped,
20
+ AccountNameshiftCommissionSubtypeCurrentDtoToJSON,
21
+ AccountNameshiftCommissionSubtypeCurrentDtoToJSONTyped,
22
+ } from './AccountNameshiftCommissionSubtypeCurrentDto';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AccountNameshiftCommissionBySubtypePercentagesDto
28
+ */
29
+ export interface AccountNameshiftCommissionBySubtypePercentagesDto {
30
+ /**
31
+ * Current commission for pointing subtype
32
+ * @type {AccountNameshiftCommissionSubtypeCurrentDto}
33
+ * @memberof AccountNameshiftCommissionBySubtypePercentagesDto
34
+ */
35
+ pointing: AccountNameshiftCommissionSubtypeCurrentDto;
36
+ /**
37
+ * Current commission for not_pointing subtype
38
+ * @type {AccountNameshiftCommissionSubtypeCurrentDto}
39
+ * @memberof AccountNameshiftCommissionBySubtypePercentagesDto
40
+ */
41
+ notPointing: AccountNameshiftCommissionSubtypeCurrentDto;
42
+ /**
43
+ * Current commission for manual_lead subtype
44
+ * @type {AccountNameshiftCommissionSubtypeCurrentDto}
45
+ * @memberof AccountNameshiftCommissionBySubtypePercentagesDto
46
+ */
47
+ manualLead: AccountNameshiftCommissionSubtypeCurrentDto;
48
+ /**
49
+ * Current commission for auction subtype
50
+ * @type {AccountNameshiftCommissionSubtypeCurrentDto}
51
+ * @memberof AccountNameshiftCommissionBySubtypePercentagesDto
52
+ */
53
+ auction: AccountNameshiftCommissionSubtypeCurrentDto;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the AccountNameshiftCommissionBySubtypePercentagesDto interface.
58
+ */
59
+ export function instanceOfAccountNameshiftCommissionBySubtypePercentagesDto(value: object): value is AccountNameshiftCommissionBySubtypePercentagesDto {
60
+ if (!('pointing' in value) || value['pointing'] === undefined) return false;
61
+ if (!('notPointing' in value) || value['notPointing'] === undefined) return false;
62
+ if (!('manualLead' in value) || value['manualLead'] === undefined) return false;
63
+ if (!('auction' in value) || value['auction'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function AccountNameshiftCommissionBySubtypePercentagesDtoFromJSON(json: any): AccountNameshiftCommissionBySubtypePercentagesDto {
68
+ return AccountNameshiftCommissionBySubtypePercentagesDtoFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function AccountNameshiftCommissionBySubtypePercentagesDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountNameshiftCommissionBySubtypePercentagesDto {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'pointing': AccountNameshiftCommissionSubtypeCurrentDtoFromJSON(json['pointing']),
78
+ 'notPointing': AccountNameshiftCommissionSubtypeCurrentDtoFromJSON(json['notPointing']),
79
+ 'manualLead': AccountNameshiftCommissionSubtypeCurrentDtoFromJSON(json['manualLead']),
80
+ 'auction': AccountNameshiftCommissionSubtypeCurrentDtoFromJSON(json['auction']),
81
+ };
82
+ }
83
+
84
+ export function AccountNameshiftCommissionBySubtypePercentagesDtoToJSON(json: any): AccountNameshiftCommissionBySubtypePercentagesDto {
85
+ return AccountNameshiftCommissionBySubtypePercentagesDtoToJSONTyped(json, false);
86
+ }
87
+
88
+ export function AccountNameshiftCommissionBySubtypePercentagesDtoToJSONTyped(value?: AccountNameshiftCommissionBySubtypePercentagesDto | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'pointing': AccountNameshiftCommissionSubtypeCurrentDtoToJSON(value['pointing']),
96
+ 'notPointing': AccountNameshiftCommissionSubtypeCurrentDtoToJSON(value['notPointing']),
97
+ 'manualLead': AccountNameshiftCommissionSubtypeCurrentDtoToJSON(value['manualLead']),
98
+ 'auction': AccountNameshiftCommissionSubtypeCurrentDtoToJSON(value['auction']),
99
+ };
100
+ }
101
+
@@ -20,6 +20,13 @@ import {
20
20
  AccountNameshiftCommissionBySubtypeDtoToJSON,
21
21
  AccountNameshiftCommissionBySubtypeDtoToJSONTyped,
22
22
  } from './AccountNameshiftCommissionBySubtypeDto';
23
+ import type { AccountNameshiftCommissionItemDto } from './AccountNameshiftCommissionItemDto';
24
+ import {
25
+ AccountNameshiftCommissionItemDtoFromJSON,
26
+ AccountNameshiftCommissionItemDtoFromJSONTyped,
27
+ AccountNameshiftCommissionItemDtoToJSON,
28
+ AccountNameshiftCommissionItemDtoToJSONTyped,
29
+ } from './AccountNameshiftCommissionItemDto';
23
30
 
24
31
  /**
25
32
  *
@@ -33,6 +40,12 @@ export interface AccountNameshiftCommissionByTypeDto {
33
40
  * @memberof AccountNameshiftCommissionByTypeDto
34
41
  */
35
42
  commissions: Array<AccountNameshiftCommissionBySubtypeDto>;
43
+ /**
44
+ * List of nameshift commissions (not expired or not yet started)
45
+ * @type {Array<AccountNameshiftCommissionItemDto>}
46
+ * @memberof AccountNameshiftCommissionByTypeDto
47
+ */
48
+ details: Array<AccountNameshiftCommissionItemDto>;
36
49
  }
37
50
 
38
51
  /**
@@ -40,6 +53,7 @@ export interface AccountNameshiftCommissionByTypeDto {
40
53
  */
41
54
  export function instanceOfAccountNameshiftCommissionByTypeDto(value: object): value is AccountNameshiftCommissionByTypeDto {
42
55
  if (!('commissions' in value) || value['commissions'] === undefined) return false;
56
+ if (!('details' in value) || value['details'] === undefined) return false;
43
57
  return true;
44
58
  }
45
59
 
@@ -54,6 +68,7 @@ export function AccountNameshiftCommissionByTypeDtoFromJSONTyped(json: any, igno
54
68
  return {
55
69
 
56
70
  'commissions': ((json['commissions'] as Array<any>).map(AccountNameshiftCommissionBySubtypeDtoFromJSON)),
71
+ 'details': ((json['details'] as Array<any>).map(AccountNameshiftCommissionItemDtoFromJSON)),
57
72
  };
58
73
  }
59
74
 
@@ -69,6 +84,7 @@ export function AccountNameshiftCommissionByTypeDtoToJSONTyped(value?: AccountNa
69
84
  return {
70
85
 
71
86
  'commissions': ((value['commissions'] as Array<any>).map(AccountNameshiftCommissionBySubtypeDtoToJSON)),
87
+ 'details': ((value['details'] as Array<any>).map(AccountNameshiftCommissionItemDtoToJSON)),
72
88
  };
73
89
  }
74
90
 
@@ -0,0 +1,132 @@
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 { CommissionConfigurationDto } from './CommissionConfigurationDto';
17
+ import {
18
+ CommissionConfigurationDtoFromJSON,
19
+ CommissionConfigurationDtoFromJSONTyped,
20
+ CommissionConfigurationDtoToJSON,
21
+ CommissionConfigurationDtoToJSONTyped,
22
+ } from './CommissionConfigurationDto';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AccountNameshiftCommissionItemDto
28
+ */
29
+ export interface AccountNameshiftCommissionItemDto {
30
+ /**
31
+ * Commission id
32
+ * @type {string}
33
+ * @memberof AccountNameshiftCommissionItemDto
34
+ */
35
+ id: string;
36
+ /**
37
+ * Commission subtype
38
+ * @type {string}
39
+ * @memberof AccountNameshiftCommissionItemDto
40
+ */
41
+ subtype: AccountNameshiftCommissionItemDtoSubtypeEnum;
42
+ /**
43
+ * Commission label
44
+ * @type {string}
45
+ * @memberof AccountNameshiftCommissionItemDto
46
+ */
47
+ label: string;
48
+ /**
49
+ * Commission configuration (factor and payload)
50
+ * @type {CommissionConfigurationDto}
51
+ * @memberof AccountNameshiftCommissionItemDto
52
+ */
53
+ config: CommissionConfigurationDto | null;
54
+ /**
55
+ * Start date of the commission period
56
+ * @type {Date}
57
+ * @memberof AccountNameshiftCommissionItemDto
58
+ */
59
+ dateStart: Date;
60
+ /**
61
+ * End date of the commission period, or null if ongoing
62
+ * @type {Date}
63
+ * @memberof AccountNameshiftCommissionItemDto
64
+ */
65
+ dateEnd: Date | null;
66
+ }
67
+
68
+
69
+ /**
70
+ * @export
71
+ */
72
+ export const AccountNameshiftCommissionItemDtoSubtypeEnum = {
73
+ POINTING: 'pointing',
74
+ NOT_POINTING: 'not_pointing',
75
+ MANUAL_LEAD: 'manual_lead',
76
+ AUCTION: 'auction'
77
+ } as const;
78
+ export type AccountNameshiftCommissionItemDtoSubtypeEnum = typeof AccountNameshiftCommissionItemDtoSubtypeEnum[keyof typeof AccountNameshiftCommissionItemDtoSubtypeEnum];
79
+
80
+
81
+ /**
82
+ * Check if a given object implements the AccountNameshiftCommissionItemDto interface.
83
+ */
84
+ export function instanceOfAccountNameshiftCommissionItemDto(value: object): value is AccountNameshiftCommissionItemDto {
85
+ if (!('id' in value) || value['id'] === undefined) return false;
86
+ if (!('subtype' in value) || value['subtype'] === undefined) return false;
87
+ if (!('label' in value) || value['label'] === undefined) return false;
88
+ if (!('config' in value) || value['config'] === undefined) return false;
89
+ if (!('dateStart' in value) || value['dateStart'] === undefined) return false;
90
+ if (!('dateEnd' in value) || value['dateEnd'] === undefined) return false;
91
+ return true;
92
+ }
93
+
94
+ export function AccountNameshiftCommissionItemDtoFromJSON(json: any): AccountNameshiftCommissionItemDto {
95
+ return AccountNameshiftCommissionItemDtoFromJSONTyped(json, false);
96
+ }
97
+
98
+ export function AccountNameshiftCommissionItemDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountNameshiftCommissionItemDto {
99
+ if (json == null) {
100
+ return json;
101
+ }
102
+ return {
103
+
104
+ 'id': json['id'],
105
+ 'subtype': json['subtype'],
106
+ 'label': json['label'],
107
+ 'config': CommissionConfigurationDtoFromJSON(json['config']),
108
+ 'dateStart': (new Date(json['dateStart'])),
109
+ 'dateEnd': (json['dateEnd'] == null ? null : new Date(json['dateEnd'])),
110
+ };
111
+ }
112
+
113
+ export function AccountNameshiftCommissionItemDtoToJSON(json: any): AccountNameshiftCommissionItemDto {
114
+ return AccountNameshiftCommissionItemDtoToJSONTyped(json, false);
115
+ }
116
+
117
+ export function AccountNameshiftCommissionItemDtoToJSONTyped(value?: AccountNameshiftCommissionItemDto | null, ignoreDiscriminator: boolean = false): any {
118
+ if (value == null) {
119
+ return value;
120
+ }
121
+
122
+ return {
123
+
124
+ 'id': value['id'],
125
+ 'subtype': value['subtype'],
126
+ 'label': value['label'],
127
+ 'config': CommissionConfigurationDtoToJSON(value['config']),
128
+ 'dateStart': ((value['dateStart']).toISOString()),
129
+ 'dateEnd': (value['dateEnd'] == null ? null : (value['dateEnd'] as any).toISOString()),
130
+ };
131
+ }
132
+