@randock/nameshift-api-client 0.0.298 → 0.0.299
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/README.md +3 -3
- package/dist/apis/AccountsApi.d.ts +16 -3
- package/dist/apis/AccountsApi.js +65 -8
- package/dist/models/SellerAffiliateCommissionDto.d.ts +16 -0
- package/dist/models/SellerAffiliateCommissionDto.js +14 -1
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +68 -4
- package/src/models/SellerAffiliateCommissionDto.ts +20 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.299
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @randock/nameshift-api-client@0.0.
|
|
39
|
+
npm install @randock/nameshift-api-client@0.0.299 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
|
|
|
44
44
|
```
|
|
45
45
|
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
46
|
```
|
|
47
|
-
|
|
47
|
+
6d759dc128f5b65dc5e52ef3ff7b595712d90a19061fa1830da215fcd636901de9209232830df430bd7fc4642899b9ea
|
|
@@ -10,17 +10,22 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AccountOnboardingSessionDto, AccountSettingsDto, AccountSettingsInput, GetAllAffiliateCommissions200Response, GetAllReferrals200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, SetPayoutProviderInput, UpdateAccountBillingInformationInput } from '../models/index';
|
|
13
|
+
import type { AccountOnboardingSessionDto, AccountSettingsDto, AccountSettingsInput, GetAllAffiliateCommissions200Response, GetAllReferrals200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, MoneyDto, SetPayoutProviderInput, UpdateAccountBillingInformationInput } from '../models/index';
|
|
14
14
|
export interface AccountsApiGetAccountPaymentProviderSessionRequest {
|
|
15
15
|
accountId: string;
|
|
16
16
|
}
|
|
17
|
+
export interface AccountsApiGetAccountPendingAffiliateCommissionsSummaryRequest {
|
|
18
|
+
accountId: string;
|
|
19
|
+
}
|
|
17
20
|
export interface AccountsApiGetAllAffiliateCommissionsRequest {
|
|
21
|
+
accountId: string;
|
|
18
22
|
filter?: object;
|
|
19
23
|
page?: number;
|
|
20
24
|
limit?: number;
|
|
21
25
|
sortBy?: Array<string>;
|
|
22
26
|
}
|
|
23
27
|
export interface AccountsApiGetAllReferralsRequest {
|
|
28
|
+
accountId: string;
|
|
24
29
|
filter?: object;
|
|
25
30
|
page?: number;
|
|
26
31
|
limit?: number;
|
|
@@ -66,6 +71,14 @@ export declare class AccountsApi extends runtime.BaseAPI {
|
|
|
66
71
|
*
|
|
67
72
|
*/
|
|
68
73
|
getAccountPaymentProviderSession(requestParameters: AccountsApiGetAccountPaymentProviderSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountOnboardingSessionDto>;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
*/
|
|
77
|
+
getAccountPendingAffiliateCommissionsSummaryRaw(requestParameters: AccountsApiGetAccountPendingAffiliateCommissionsSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MoneyDto>>>;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
getAccountPendingAffiliateCommissionsSummary(requestParameters: AccountsApiGetAccountPendingAffiliateCommissionsSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MoneyDto>>;
|
|
69
82
|
/**
|
|
70
83
|
*
|
|
71
84
|
*/
|
|
@@ -81,7 +94,7 @@ export declare class AccountsApi extends runtime.BaseAPI {
|
|
|
81
94
|
/**
|
|
82
95
|
*
|
|
83
96
|
*/
|
|
84
|
-
getAllAffiliateCommissions(requestParameters
|
|
97
|
+
getAllAffiliateCommissions(requestParameters: AccountsApiGetAllAffiliateCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllAffiliateCommissions200Response>;
|
|
85
98
|
/**
|
|
86
99
|
*
|
|
87
100
|
*/
|
|
@@ -89,7 +102,7 @@ export declare class AccountsApi extends runtime.BaseAPI {
|
|
|
89
102
|
/**
|
|
90
103
|
*
|
|
91
104
|
*/
|
|
92
|
-
getAllReferrals(requestParameters
|
|
105
|
+
getAllReferrals(requestParameters: AccountsApiGetAllReferralsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllReferrals200Response>;
|
|
93
106
|
/**
|
|
94
107
|
*
|
|
95
108
|
*/
|
package/dist/apis/AccountsApi.js
CHANGED
|
@@ -176,6 +176,59 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
176
176
|
});
|
|
177
177
|
});
|
|
178
178
|
};
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
*/
|
|
182
|
+
AccountsApi.prototype.getAccountPendingAffiliateCommissionsSummaryRaw = function (requestParameters, initOverrides) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
184
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
185
|
+
return __generator(this, function (_a) {
|
|
186
|
+
switch (_a.label) {
|
|
187
|
+
case 0:
|
|
188
|
+
if (requestParameters['accountId'] == null) {
|
|
189
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAccountPendingAffiliateCommissionsSummary().');
|
|
190
|
+
}
|
|
191
|
+
queryParameters = {};
|
|
192
|
+
headerParameters = {};
|
|
193
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
194
|
+
token = this.configuration.accessToken;
|
|
195
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
196
|
+
case 1:
|
|
197
|
+
tokenString = _a.sent();
|
|
198
|
+
if (tokenString) {
|
|
199
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
200
|
+
}
|
|
201
|
+
_a.label = 2;
|
|
202
|
+
case 2: return [4 /*yield*/, this.request({
|
|
203
|
+
path: "/private/accounts/{accountId}/affiliate-commissions/summary".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
204
|
+
method: 'GET',
|
|
205
|
+
headers: headerParameters,
|
|
206
|
+
query: queryParameters,
|
|
207
|
+
}, initOverrides)];
|
|
208
|
+
case 3:
|
|
209
|
+
response = _a.sent();
|
|
210
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.MoneyDtoFromJSON); })];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
*/
|
|
218
|
+
AccountsApi.prototype.getAccountPendingAffiliateCommissionsSummary = function (requestParameters, initOverrides) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
220
|
+
var response;
|
|
221
|
+
return __generator(this, function (_a) {
|
|
222
|
+
switch (_a.label) {
|
|
223
|
+
case 0: return [4 /*yield*/, this.getAccountPendingAffiliateCommissionsSummaryRaw(requestParameters, initOverrides)];
|
|
224
|
+
case 1:
|
|
225
|
+
response = _a.sent();
|
|
226
|
+
return [4 /*yield*/, response.value()];
|
|
227
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
};
|
|
179
232
|
/**
|
|
180
233
|
*
|
|
181
234
|
*/
|
|
@@ -235,6 +288,9 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
235
288
|
return __generator(this, function (_a) {
|
|
236
289
|
switch (_a.label) {
|
|
237
290
|
case 0:
|
|
291
|
+
if (requestParameters['accountId'] == null) {
|
|
292
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAllAffiliateCommissions().');
|
|
293
|
+
}
|
|
238
294
|
queryParameters = {};
|
|
239
295
|
if (requestParameters['filter'] != null) {
|
|
240
296
|
queryParameters['filter'] = requestParameters['filter'];
|
|
@@ -259,7 +315,7 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
259
315
|
}
|
|
260
316
|
_a.label = 2;
|
|
261
317
|
case 2: return [4 /*yield*/, this.request({
|
|
262
|
-
path: "/private/accounts/{accountId}/affiliate-commissions",
|
|
318
|
+
path: "/private/accounts/{accountId}/affiliate-commissions".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
263
319
|
method: 'GET',
|
|
264
320
|
headers: headerParameters,
|
|
265
321
|
query: queryParameters,
|
|
@@ -274,10 +330,9 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
274
330
|
/**
|
|
275
331
|
*
|
|
276
332
|
*/
|
|
277
|
-
AccountsApi.prototype.getAllAffiliateCommissions = function () {
|
|
278
|
-
return __awaiter(this,
|
|
333
|
+
AccountsApi.prototype.getAllAffiliateCommissions = function (requestParameters, initOverrides) {
|
|
334
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
279
335
|
var response;
|
|
280
|
-
if (requestParameters === void 0) { requestParameters = {}; }
|
|
281
336
|
return __generator(this, function (_a) {
|
|
282
337
|
switch (_a.label) {
|
|
283
338
|
case 0: return [4 /*yield*/, this.getAllAffiliateCommissionsRaw(requestParameters, initOverrides)];
|
|
@@ -298,6 +353,9 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
298
353
|
return __generator(this, function (_a) {
|
|
299
354
|
switch (_a.label) {
|
|
300
355
|
case 0:
|
|
356
|
+
if (requestParameters['accountId'] == null) {
|
|
357
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAllReferrals().');
|
|
358
|
+
}
|
|
301
359
|
queryParameters = {};
|
|
302
360
|
if (requestParameters['filter'] != null) {
|
|
303
361
|
queryParameters['filter'] = requestParameters['filter'];
|
|
@@ -322,7 +380,7 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
322
380
|
}
|
|
323
381
|
_a.label = 2;
|
|
324
382
|
case 2: return [4 /*yield*/, this.request({
|
|
325
|
-
path: "/private/accounts/{accountId}/referrals",
|
|
383
|
+
path: "/private/accounts/{accountId}/referrals".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
326
384
|
method: 'GET',
|
|
327
385
|
headers: headerParameters,
|
|
328
386
|
query: queryParameters,
|
|
@@ -337,10 +395,9 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
337
395
|
/**
|
|
338
396
|
*
|
|
339
397
|
*/
|
|
340
|
-
AccountsApi.prototype.getAllReferrals = function () {
|
|
341
|
-
return __awaiter(this,
|
|
398
|
+
AccountsApi.prototype.getAllReferrals = function (requestParameters, initOverrides) {
|
|
399
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
342
400
|
var response;
|
|
343
|
-
if (requestParameters === void 0) { requestParameters = {}; }
|
|
344
401
|
return __generator(this, function (_a) {
|
|
345
402
|
switch (_a.label) {
|
|
346
403
|
case 0: return [4 /*yield*/, this.getAllReferralsRaw(requestParameters, initOverrides)];
|
|
@@ -47,6 +47,12 @@ export interface SellerAffiliateCommissionDto {
|
|
|
47
47
|
* @memberof SellerAffiliateCommissionDto
|
|
48
48
|
*/
|
|
49
49
|
status: SellerAffiliateCommissionDtoStatusEnum;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof SellerAffiliateCommissionDto
|
|
54
|
+
*/
|
|
55
|
+
invoiceStatus: SellerAffiliateCommissionDtoInvoiceStatusEnum | null;
|
|
50
56
|
/**
|
|
51
57
|
* Referral account
|
|
52
58
|
* @type {SellerAffiliateCommissionReferralDto}
|
|
@@ -63,6 +69,16 @@ export declare const SellerAffiliateCommissionDtoStatusEnum: {
|
|
|
63
69
|
readonly CANCELLED: "cancelled";
|
|
64
70
|
};
|
|
65
71
|
export type SellerAffiliateCommissionDtoStatusEnum = typeof SellerAffiliateCommissionDtoStatusEnum[keyof typeof SellerAffiliateCommissionDtoStatusEnum];
|
|
72
|
+
/**
|
|
73
|
+
* @export
|
|
74
|
+
*/
|
|
75
|
+
export declare const SellerAffiliateCommissionDtoInvoiceStatusEnum: {
|
|
76
|
+
readonly DRAFT: "draft";
|
|
77
|
+
readonly PENDING_PAYMENT: "pending_payment";
|
|
78
|
+
readonly PAID: "paid";
|
|
79
|
+
readonly CANCELLED: "cancelled";
|
|
80
|
+
};
|
|
81
|
+
export type SellerAffiliateCommissionDtoInvoiceStatusEnum = typeof SellerAffiliateCommissionDtoInvoiceStatusEnum[keyof typeof SellerAffiliateCommissionDtoInvoiceStatusEnum];
|
|
66
82
|
/**
|
|
67
83
|
* Check if a given object implements the SellerAffiliateCommissionDto interface.
|
|
68
84
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.SellerAffiliateCommissionDtoStatusEnum = void 0;
|
|
16
|
+
exports.SellerAffiliateCommissionDtoInvoiceStatusEnum = exports.SellerAffiliateCommissionDtoStatusEnum = void 0;
|
|
17
17
|
exports.instanceOfSellerAffiliateCommissionDto = instanceOfSellerAffiliateCommissionDto;
|
|
18
18
|
exports.SellerAffiliateCommissionDtoFromJSON = SellerAffiliateCommissionDtoFromJSON;
|
|
19
19
|
exports.SellerAffiliateCommissionDtoFromJSONTyped = SellerAffiliateCommissionDtoFromJSONTyped;
|
|
@@ -29,6 +29,15 @@ exports.SellerAffiliateCommissionDtoStatusEnum = {
|
|
|
29
29
|
INVOICED: 'invoiced',
|
|
30
30
|
CANCELLED: 'cancelled'
|
|
31
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
exports.SellerAffiliateCommissionDtoInvoiceStatusEnum = {
|
|
36
|
+
DRAFT: 'draft',
|
|
37
|
+
PENDING_PAYMENT: 'pending_payment',
|
|
38
|
+
PAID: 'paid',
|
|
39
|
+
CANCELLED: 'cancelled'
|
|
40
|
+
};
|
|
32
41
|
/**
|
|
33
42
|
* Check if a given object implements the SellerAffiliateCommissionDto interface.
|
|
34
43
|
*/
|
|
@@ -43,6 +52,8 @@ function instanceOfSellerAffiliateCommissionDto(value) {
|
|
|
43
52
|
return false;
|
|
44
53
|
if (!('status' in value) || value['status'] === undefined)
|
|
45
54
|
return false;
|
|
55
|
+
if (!('invoiceStatus' in value) || value['invoiceStatus'] === undefined)
|
|
56
|
+
return false;
|
|
46
57
|
if (!('referral' in value) || value['referral'] === undefined)
|
|
47
58
|
return false;
|
|
48
59
|
return true;
|
|
@@ -60,6 +71,7 @@ function SellerAffiliateCommissionDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
71
|
'commissionAmount': (0, MoneyDto_1.MoneyDtoFromJSON)(json['commissionAmount']),
|
|
61
72
|
'date': (new Date(json['date'])),
|
|
62
73
|
'status': json['status'],
|
|
74
|
+
'invoiceStatus': json['invoiceStatus'],
|
|
63
75
|
'referral': (0, SellerAffiliateCommissionReferralDto_1.SellerAffiliateCommissionReferralDtoFromJSON)(json['referral']),
|
|
64
76
|
};
|
|
65
77
|
}
|
|
@@ -77,6 +89,7 @@ function SellerAffiliateCommissionDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
77
89
|
'commissionAmount': (0, MoneyDto_1.MoneyDtoToJSON)(value['commissionAmount']),
|
|
78
90
|
'date': ((value['date']).toISOString()),
|
|
79
91
|
'status': value['status'],
|
|
92
|
+
'invoiceStatus': value['invoiceStatus'],
|
|
80
93
|
'referral': (0, SellerAffiliateCommissionReferralDto_1.SellerAffiliateCommissionReferralDtoToJSON)(value['referral']),
|
|
81
94
|
};
|
|
82
95
|
}
|
package/package.json
CHANGED
package/src/apis/AccountsApi.ts
CHANGED
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
GetAllAffiliateCommissions200Response,
|
|
23
23
|
GetAllReferrals200Response,
|
|
24
24
|
IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto,
|
|
25
|
+
MoneyDto,
|
|
25
26
|
NotFoundException,
|
|
26
27
|
SetPayoutProviderInput,
|
|
27
28
|
ThrottlerException,
|
|
@@ -43,6 +44,8 @@ import {
|
|
|
43
44
|
GetAllReferrals200ResponseToJSON,
|
|
44
45
|
IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoFromJSON,
|
|
45
46
|
IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoToJSON,
|
|
47
|
+
MoneyDtoFromJSON,
|
|
48
|
+
MoneyDtoToJSON,
|
|
46
49
|
NotFoundExceptionFromJSON,
|
|
47
50
|
NotFoundExceptionToJSON,
|
|
48
51
|
SetPayoutProviderInputFromJSON,
|
|
@@ -59,7 +62,12 @@ export interface AccountsApiGetAccountPaymentProviderSessionRequest {
|
|
|
59
62
|
accountId: string;
|
|
60
63
|
}
|
|
61
64
|
|
|
65
|
+
export interface AccountsApiGetAccountPendingAffiliateCommissionsSummaryRequest {
|
|
66
|
+
accountId: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
62
69
|
export interface AccountsApiGetAllAffiliateCommissionsRequest {
|
|
70
|
+
accountId: string;
|
|
63
71
|
filter?: object;
|
|
64
72
|
page?: number;
|
|
65
73
|
limit?: number;
|
|
@@ -67,6 +75,7 @@ export interface AccountsApiGetAllAffiliateCommissionsRequest {
|
|
|
67
75
|
}
|
|
68
76
|
|
|
69
77
|
export interface AccountsApiGetAllReferralsRequest {
|
|
78
|
+
accountId: string;
|
|
70
79
|
filter?: object;
|
|
71
80
|
page?: number;
|
|
72
81
|
limit?: number;
|
|
@@ -177,6 +186,47 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
177
186
|
return await response.value();
|
|
178
187
|
}
|
|
179
188
|
|
|
189
|
+
/**
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
async getAccountPendingAffiliateCommissionsSummaryRaw(requestParameters: AccountsApiGetAccountPendingAffiliateCommissionsSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MoneyDto>>> {
|
|
193
|
+
if (requestParameters['accountId'] == null) {
|
|
194
|
+
throw new runtime.RequiredError(
|
|
195
|
+
'accountId',
|
|
196
|
+
'Required parameter "accountId" was null or undefined when calling getAccountPendingAffiliateCommissionsSummary().'
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const queryParameters: any = {};
|
|
201
|
+
|
|
202
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
203
|
+
|
|
204
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
205
|
+
const token = this.configuration.accessToken;
|
|
206
|
+
const tokenString = await token("bearer", []);
|
|
207
|
+
|
|
208
|
+
if (tokenString) {
|
|
209
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const response = await this.request({
|
|
213
|
+
path: `/private/accounts/{accountId}/affiliate-commissions/summary`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
214
|
+
method: 'GET',
|
|
215
|
+
headers: headerParameters,
|
|
216
|
+
query: queryParameters,
|
|
217
|
+
}, initOverrides);
|
|
218
|
+
|
|
219
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MoneyDtoFromJSON));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
*
|
|
224
|
+
*/
|
|
225
|
+
async getAccountPendingAffiliateCommissionsSummary(requestParameters: AccountsApiGetAccountPendingAffiliateCommissionsSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MoneyDto>> {
|
|
226
|
+
const response = await this.getAccountPendingAffiliateCommissionsSummaryRaw(requestParameters, initOverrides);
|
|
227
|
+
return await response.value();
|
|
228
|
+
}
|
|
229
|
+
|
|
180
230
|
/**
|
|
181
231
|
*
|
|
182
232
|
*/
|
|
@@ -215,6 +265,13 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
215
265
|
*
|
|
216
266
|
*/
|
|
217
267
|
async getAllAffiliateCommissionsRaw(requestParameters: AccountsApiGetAllAffiliateCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAllAffiliateCommissions200Response>> {
|
|
268
|
+
if (requestParameters['accountId'] == null) {
|
|
269
|
+
throw new runtime.RequiredError(
|
|
270
|
+
'accountId',
|
|
271
|
+
'Required parameter "accountId" was null or undefined when calling getAllAffiliateCommissions().'
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
218
275
|
const queryParameters: any = {};
|
|
219
276
|
|
|
220
277
|
if (requestParameters['filter'] != null) {
|
|
@@ -244,7 +301,7 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
244
301
|
}
|
|
245
302
|
}
|
|
246
303
|
const response = await this.request({
|
|
247
|
-
path: `/private/accounts/{accountId}/affiliate-commissions`,
|
|
304
|
+
path: `/private/accounts/{accountId}/affiliate-commissions`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
248
305
|
method: 'GET',
|
|
249
306
|
headers: headerParameters,
|
|
250
307
|
query: queryParameters,
|
|
@@ -256,7 +313,7 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
256
313
|
/**
|
|
257
314
|
*
|
|
258
315
|
*/
|
|
259
|
-
async getAllAffiliateCommissions(requestParameters: AccountsApiGetAllAffiliateCommissionsRequest
|
|
316
|
+
async getAllAffiliateCommissions(requestParameters: AccountsApiGetAllAffiliateCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllAffiliateCommissions200Response> {
|
|
260
317
|
const response = await this.getAllAffiliateCommissionsRaw(requestParameters, initOverrides);
|
|
261
318
|
return await response.value();
|
|
262
319
|
}
|
|
@@ -265,6 +322,13 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
265
322
|
*
|
|
266
323
|
*/
|
|
267
324
|
async getAllReferralsRaw(requestParameters: AccountsApiGetAllReferralsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAllReferrals200Response>> {
|
|
325
|
+
if (requestParameters['accountId'] == null) {
|
|
326
|
+
throw new runtime.RequiredError(
|
|
327
|
+
'accountId',
|
|
328
|
+
'Required parameter "accountId" was null or undefined when calling getAllReferrals().'
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
268
332
|
const queryParameters: any = {};
|
|
269
333
|
|
|
270
334
|
if (requestParameters['filter'] != null) {
|
|
@@ -294,7 +358,7 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
294
358
|
}
|
|
295
359
|
}
|
|
296
360
|
const response = await this.request({
|
|
297
|
-
path: `/private/accounts/{accountId}/referrals`,
|
|
361
|
+
path: `/private/accounts/{accountId}/referrals`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
298
362
|
method: 'GET',
|
|
299
363
|
headers: headerParameters,
|
|
300
364
|
query: queryParameters,
|
|
@@ -306,7 +370,7 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
306
370
|
/**
|
|
307
371
|
*
|
|
308
372
|
*/
|
|
309
|
-
async getAllReferrals(requestParameters: AccountsApiGetAllReferralsRequest
|
|
373
|
+
async getAllReferrals(requestParameters: AccountsApiGetAllReferralsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllReferrals200Response> {
|
|
310
374
|
const response = await this.getAllReferralsRaw(requestParameters, initOverrides);
|
|
311
375
|
return await response.value();
|
|
312
376
|
}
|
|
@@ -64,6 +64,12 @@ export interface SellerAffiliateCommissionDto {
|
|
|
64
64
|
* @memberof SellerAffiliateCommissionDto
|
|
65
65
|
*/
|
|
66
66
|
status: SellerAffiliateCommissionDtoStatusEnum;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof SellerAffiliateCommissionDto
|
|
71
|
+
*/
|
|
72
|
+
invoiceStatus: SellerAffiliateCommissionDtoInvoiceStatusEnum | null;
|
|
67
73
|
/**
|
|
68
74
|
* Referral account
|
|
69
75
|
* @type {SellerAffiliateCommissionReferralDto}
|
|
@@ -83,6 +89,17 @@ export const SellerAffiliateCommissionDtoStatusEnum = {
|
|
|
83
89
|
} as const;
|
|
84
90
|
export type SellerAffiliateCommissionDtoStatusEnum = typeof SellerAffiliateCommissionDtoStatusEnum[keyof typeof SellerAffiliateCommissionDtoStatusEnum];
|
|
85
91
|
|
|
92
|
+
/**
|
|
93
|
+
* @export
|
|
94
|
+
*/
|
|
95
|
+
export const SellerAffiliateCommissionDtoInvoiceStatusEnum = {
|
|
96
|
+
DRAFT: 'draft',
|
|
97
|
+
PENDING_PAYMENT: 'pending_payment',
|
|
98
|
+
PAID: 'paid',
|
|
99
|
+
CANCELLED: 'cancelled'
|
|
100
|
+
} as const;
|
|
101
|
+
export type SellerAffiliateCommissionDtoInvoiceStatusEnum = typeof SellerAffiliateCommissionDtoInvoiceStatusEnum[keyof typeof SellerAffiliateCommissionDtoInvoiceStatusEnum];
|
|
102
|
+
|
|
86
103
|
|
|
87
104
|
/**
|
|
88
105
|
* Check if a given object implements the SellerAffiliateCommissionDto interface.
|
|
@@ -93,6 +110,7 @@ export function instanceOfSellerAffiliateCommissionDto(value: object): value is
|
|
|
93
110
|
if (!('commissionAmount' in value) || value['commissionAmount'] === undefined) return false;
|
|
94
111
|
if (!('date' in value) || value['date'] === undefined) return false;
|
|
95
112
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
113
|
+
if (!('invoiceStatus' in value) || value['invoiceStatus'] === undefined) return false;
|
|
96
114
|
if (!('referral' in value) || value['referral'] === undefined) return false;
|
|
97
115
|
return true;
|
|
98
116
|
}
|
|
@@ -112,6 +130,7 @@ export function SellerAffiliateCommissionDtoFromJSONTyped(json: any, ignoreDiscr
|
|
|
112
130
|
'commissionAmount': MoneyDtoFromJSON(json['commissionAmount']),
|
|
113
131
|
'date': (new Date(json['date'])),
|
|
114
132
|
'status': json['status'],
|
|
133
|
+
'invoiceStatus': json['invoiceStatus'],
|
|
115
134
|
'referral': SellerAffiliateCommissionReferralDtoFromJSON(json['referral']),
|
|
116
135
|
};
|
|
117
136
|
}
|
|
@@ -132,6 +151,7 @@ export function SellerAffiliateCommissionDtoToJSONTyped(value?: SellerAffiliateC
|
|
|
132
151
|
'commissionAmount': MoneyDtoToJSON(value['commissionAmount']),
|
|
133
152
|
'date': ((value['date']).toISOString()),
|
|
134
153
|
'status': value['status'],
|
|
154
|
+
'invoiceStatus': value['invoiceStatus'],
|
|
135
155
|
'referral': SellerAffiliateCommissionReferralDtoToJSON(value['referral']),
|
|
136
156
|
};
|
|
137
157
|
}
|