@randock/nameshift-api-client 0.0.291 → 0.0.293

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.
@@ -129,6 +129,7 @@ src/models/DomainTransferWorkflowDto.ts
129
129
  src/models/DomainUrlDto.ts
130
130
  src/models/EppBatchUpdateInput.ts
131
131
  src/models/ForgotPasswordRequestInput.ts
132
+ src/models/GetAllAffiliateCommissions200Response.ts
132
133
  src/models/GetAllDomainTransfers200Response.ts
133
134
  src/models/GetAllInvoices200Response.ts
134
135
  src/models/GetAllOrders200Response.ts
@@ -225,6 +226,7 @@ src/models/RentConfigurationPresetsDto.ts
225
226
  src/models/RentDto.ts
226
227
  src/models/RequestAccessTokenInput.ts
227
228
  src/models/SellerAccountReferralListItemDto.ts
229
+ src/models/SellerAffiliateCommissionDto.ts
228
230
  src/models/SellerDomainTransferAuthCodeDto.ts
229
231
  src/models/SellerDomainTransferDomainDto.ts
230
232
  src/models/SellerDomainTransferDto.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.291
1
+ ## @randock/nameshift-api-client@0.0.293
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.291 --save
39
+ npm install @randock/nameshift-api-client@0.0.293 --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
- 6cb2ace7dcd6347a0d2ee9d31380a440b0e78c59ea5d6f98a0ea0afbad9c42ec0afd422c2e95e7a5fde66e40ca2c4ec0
47
+ ada359e92e3b3cc51a19ae5aef9025728616a83c1ac85bcf6ff71c00007e80c83ce63e0332bb97007152e5a9a78fd9b2
@@ -10,10 +10,16 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AccountOnboardingSessionDto, AccountSettingsDto, AccountSettingsInput, GetAllReferrals200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, SetPayoutProviderInput, UpdateAccountBillingInformationInput } from '../models/index';
13
+ import type { AccountOnboardingSessionDto, AccountSettingsDto, AccountSettingsInput, GetAllAffiliateCommissions200Response, GetAllReferrals200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, SetPayoutProviderInput, UpdateAccountBillingInformationInput } from '../models/index';
14
14
  export interface AccountsApiGetAccountPaymentProviderSessionRequest {
15
15
  accountId: string;
16
16
  }
17
+ export interface AccountsApiGetAllAffiliateCommissionsRequest {
18
+ filter?: object;
19
+ page?: number;
20
+ limit?: number;
21
+ sortBy?: Array<string>;
22
+ }
17
23
  export interface AccountsApiGetAllReferralsRequest {
18
24
  filter?: object;
19
25
  page?: number;
@@ -68,6 +74,14 @@ export declare class AccountsApi extends runtime.BaseAPI {
68
74
  *
69
75
  */
70
76
  getAccountSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountSettingsDto>;
77
+ /**
78
+ *
79
+ */
80
+ getAllAffiliateCommissionsRaw(requestParameters: AccountsApiGetAllAffiliateCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAllAffiliateCommissions200Response>>;
81
+ /**
82
+ *
83
+ */
84
+ getAllAffiliateCommissions(requestParameters?: AccountsApiGetAllAffiliateCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllAffiliateCommissions200Response>;
71
85
  /**
72
86
  *
73
87
  */
@@ -226,6 +226,69 @@ var AccountsApi = /** @class */ (function (_super) {
226
226
  });
227
227
  });
228
228
  };
229
+ /**
230
+ *
231
+ */
232
+ AccountsApi.prototype.getAllAffiliateCommissionsRaw = function (requestParameters, initOverrides) {
233
+ return __awaiter(this, void 0, void 0, function () {
234
+ var queryParameters, headerParameters, token, tokenString, response;
235
+ return __generator(this, function (_a) {
236
+ switch (_a.label) {
237
+ case 0:
238
+ queryParameters = {};
239
+ if (requestParameters['filter'] != null) {
240
+ queryParameters['filter'] = requestParameters['filter'];
241
+ }
242
+ if (requestParameters['page'] != null) {
243
+ queryParameters['page'] = requestParameters['page'];
244
+ }
245
+ if (requestParameters['limit'] != null) {
246
+ queryParameters['limit'] = requestParameters['limit'];
247
+ }
248
+ if (requestParameters['sortBy'] != null) {
249
+ queryParameters['sortBy'] = requestParameters['sortBy'];
250
+ }
251
+ headerParameters = {};
252
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
253
+ token = this.configuration.accessToken;
254
+ return [4 /*yield*/, token("bearer", [])];
255
+ case 1:
256
+ tokenString = _a.sent();
257
+ if (tokenString) {
258
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
259
+ }
260
+ _a.label = 2;
261
+ case 2: return [4 /*yield*/, this.request({
262
+ path: "/private/accounts/{accountId}/affiliate-commissions",
263
+ method: 'GET',
264
+ headers: headerParameters,
265
+ query: queryParameters,
266
+ }, initOverrides)];
267
+ case 3:
268
+ response = _a.sent();
269
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetAllAffiliateCommissions200ResponseFromJSON)(jsonValue); })];
270
+ }
271
+ });
272
+ });
273
+ };
274
+ /**
275
+ *
276
+ */
277
+ AccountsApi.prototype.getAllAffiliateCommissions = function () {
278
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
279
+ var response;
280
+ if (requestParameters === void 0) { requestParameters = {}; }
281
+ return __generator(this, function (_a) {
282
+ switch (_a.label) {
283
+ case 0: return [4 /*yield*/, this.getAllAffiliateCommissionsRaw(requestParameters, initOverrides)];
284
+ case 1:
285
+ response = _a.sent();
286
+ return [4 /*yield*/, response.value()];
287
+ case 2: return [2 /*return*/, _a.sent()];
288
+ }
289
+ });
290
+ });
291
+ };
229
292
  /**
230
293
  *
231
294
  */
@@ -0,0 +1,47 @@
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 { PaginateResponseLinks } from './PaginateResponseLinks';
13
+ import type { PaginateResponseMeta } from './PaginateResponseMeta';
14
+ import type { SellerAffiliateCommissionDto } from './SellerAffiliateCommissionDto';
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface GetAllAffiliateCommissions200Response
19
+ */
20
+ export interface GetAllAffiliateCommissions200Response {
21
+ /**
22
+ *
23
+ * @type {Array<SellerAffiliateCommissionDto>}
24
+ * @memberof GetAllAffiliateCommissions200Response
25
+ */
26
+ data: Array<SellerAffiliateCommissionDto>;
27
+ /**
28
+ *
29
+ * @type {PaginateResponseMeta}
30
+ * @memberof GetAllAffiliateCommissions200Response
31
+ */
32
+ meta: PaginateResponseMeta;
33
+ /**
34
+ *
35
+ * @type {PaginateResponseLinks}
36
+ * @memberof GetAllAffiliateCommissions200Response
37
+ */
38
+ links: PaginateResponseLinks;
39
+ }
40
+ /**
41
+ * Check if a given object implements the GetAllAffiliateCommissions200Response interface.
42
+ */
43
+ export declare function instanceOfGetAllAffiliateCommissions200Response(value: object): value is GetAllAffiliateCommissions200Response;
44
+ export declare function GetAllAffiliateCommissions200ResponseFromJSON(json: any): GetAllAffiliateCommissions200Response;
45
+ export declare function GetAllAffiliateCommissions200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAllAffiliateCommissions200Response;
46
+ export declare function GetAllAffiliateCommissions200ResponseToJSON(json: any): GetAllAffiliateCommissions200Response;
47
+ export declare function GetAllAffiliateCommissions200ResponseToJSONTyped(value?: GetAllAffiliateCommissions200Response | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,62 @@
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.instanceOfGetAllAffiliateCommissions200Response = instanceOfGetAllAffiliateCommissions200Response;
17
+ exports.GetAllAffiliateCommissions200ResponseFromJSON = GetAllAffiliateCommissions200ResponseFromJSON;
18
+ exports.GetAllAffiliateCommissions200ResponseFromJSONTyped = GetAllAffiliateCommissions200ResponseFromJSONTyped;
19
+ exports.GetAllAffiliateCommissions200ResponseToJSON = GetAllAffiliateCommissions200ResponseToJSON;
20
+ exports.GetAllAffiliateCommissions200ResponseToJSONTyped = GetAllAffiliateCommissions200ResponseToJSONTyped;
21
+ var PaginateResponseLinks_1 = require("./PaginateResponseLinks");
22
+ var PaginateResponseMeta_1 = require("./PaginateResponseMeta");
23
+ var SellerAffiliateCommissionDto_1 = require("./SellerAffiliateCommissionDto");
24
+ /**
25
+ * Check if a given object implements the GetAllAffiliateCommissions200Response interface.
26
+ */
27
+ function instanceOfGetAllAffiliateCommissions200Response(value) {
28
+ if (!('data' in value) || value['data'] === undefined)
29
+ return false;
30
+ if (!('meta' in value) || value['meta'] === undefined)
31
+ return false;
32
+ if (!('links' in value) || value['links'] === undefined)
33
+ return false;
34
+ return true;
35
+ }
36
+ function GetAllAffiliateCommissions200ResponseFromJSON(json) {
37
+ return GetAllAffiliateCommissions200ResponseFromJSONTyped(json, false);
38
+ }
39
+ function GetAllAffiliateCommissions200ResponseFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'data': (json['data'].map(SellerAffiliateCommissionDto_1.SellerAffiliateCommissionDtoFromJSON)),
45
+ 'meta': (0, PaginateResponseMeta_1.PaginateResponseMetaFromJSON)(json['meta']),
46
+ 'links': (0, PaginateResponseLinks_1.PaginateResponseLinksFromJSON)(json['links']),
47
+ };
48
+ }
49
+ function GetAllAffiliateCommissions200ResponseToJSON(json) {
50
+ return GetAllAffiliateCommissions200ResponseToJSONTyped(json, false);
51
+ }
52
+ function GetAllAffiliateCommissions200ResponseToJSONTyped(value, ignoreDiscriminator) {
53
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'data': (value['data'].map(SellerAffiliateCommissionDto_1.SellerAffiliateCommissionDtoToJSON)),
59
+ 'meta': (0, PaginateResponseMeta_1.PaginateResponseMetaToJSON)(value['meta']),
60
+ 'links': (0, PaginateResponseLinks_1.PaginateResponseLinksToJSON)(value['links']),
61
+ };
62
+ }
@@ -15,6 +15,12 @@
15
15
  * @interface RegisterAccountInput
16
16
  */
17
17
  export interface RegisterAccountInput {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof RegisterAccountInput
22
+ */
23
+ affiliateIdentifier?: string | null;
18
24
  /**
19
25
  *
20
26
  * @type {string}
@@ -69,12 +75,6 @@ export interface RegisterAccountInput {
69
75
  * @memberof RegisterAccountInput
70
76
  */
71
77
  timezone?: string;
72
- /**
73
- *
74
- * @type {object}
75
- * @memberof RegisterAccountInput
76
- */
77
- affiliateIdentifier?: object | null;
78
78
  }
79
79
  /**
80
80
  * @export
@@ -51,6 +51,7 @@ function RegisterAccountInputFromJSONTyped(json, ignoreDiscriminator) {
51
51
  return json;
52
52
  }
53
53
  return {
54
+ 'affiliateIdentifier': json['affiliateIdentifier'] == null ? undefined : json['affiliateIdentifier'],
54
55
  'locale': json['locale'],
55
56
  'firstname': json['firstname'],
56
57
  'lastname': json['lastname'],
@@ -60,7 +61,6 @@ function RegisterAccountInputFromJSONTyped(json, ignoreDiscriminator) {
60
61
  'adProgram': json['adProgram'] == null ? undefined : json['adProgram'],
61
62
  'adId': json['adId'] == null ? undefined : json['adId'],
62
63
  'timezone': json['timezone'] == null ? undefined : json['timezone'],
63
- 'affiliateIdentifier': json['affiliateIdentifier'] == null ? undefined : json['affiliateIdentifier'],
64
64
  };
65
65
  }
66
66
  function RegisterAccountInputToJSON(json) {
@@ -72,6 +72,7 @@ function RegisterAccountInputToJSONTyped(value, ignoreDiscriminator) {
72
72
  return value;
73
73
  }
74
74
  return {
75
+ 'affiliateIdentifier': value['affiliateIdentifier'],
75
76
  'locale': value['locale'],
76
77
  'firstname': value['firstname'],
77
78
  'lastname': value['lastname'],
@@ -81,6 +82,5 @@ function RegisterAccountInputToJSONTyped(value, ignoreDiscriminator) {
81
82
  'adProgram': value['adProgram'],
82
83
  'adId': value['adId'],
83
84
  'timezone': value['timezone'],
84
- 'affiliateIdentifier': value['affiliateIdentifier'],
85
85
  };
86
86
  }
@@ -0,0 +1,66 @@
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 { MoneyDto } from './MoneyDto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SellerAffiliateCommissionDto
17
+ */
18
+ export interface SellerAffiliateCommissionDto {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof SellerAffiliateCommissionDto
23
+ */
24
+ id: string;
25
+ /**
26
+ * Commission percentage as a decimal
27
+ * @type {number}
28
+ * @memberof SellerAffiliateCommissionDto
29
+ */
30
+ commissionPercentage: number;
31
+ /**
32
+ * Commission amount
33
+ * @type {MoneyDto}
34
+ * @memberof SellerAffiliateCommissionDto
35
+ */
36
+ commissionAmount: MoneyDto;
37
+ /**
38
+ *
39
+ * @type {Date}
40
+ * @memberof SellerAffiliateCommissionDto
41
+ */
42
+ createdAt: Date;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof SellerAffiliateCommissionDto
47
+ */
48
+ status: SellerAffiliateCommissionDtoStatusEnum;
49
+ }
50
+ /**
51
+ * @export
52
+ */
53
+ export declare const SellerAffiliateCommissionDtoStatusEnum: {
54
+ readonly PENDING: "pending";
55
+ readonly PAID: "paid";
56
+ readonly CANCELLED: "cancelled";
57
+ };
58
+ export type SellerAffiliateCommissionDtoStatusEnum = typeof SellerAffiliateCommissionDtoStatusEnum[keyof typeof SellerAffiliateCommissionDtoStatusEnum];
59
+ /**
60
+ * Check if a given object implements the SellerAffiliateCommissionDto interface.
61
+ */
62
+ export declare function instanceOfSellerAffiliateCommissionDto(value: object): value is SellerAffiliateCommissionDto;
63
+ export declare function SellerAffiliateCommissionDtoFromJSON(json: any): SellerAffiliateCommissionDto;
64
+ export declare function SellerAffiliateCommissionDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SellerAffiliateCommissionDto;
65
+ export declare function SellerAffiliateCommissionDtoToJSON(json: any): SellerAffiliateCommissionDto;
66
+ export declare function SellerAffiliateCommissionDtoToJSONTyped(value?: SellerAffiliateCommissionDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,77 @@
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.SellerAffiliateCommissionDtoStatusEnum = void 0;
17
+ exports.instanceOfSellerAffiliateCommissionDto = instanceOfSellerAffiliateCommissionDto;
18
+ exports.SellerAffiliateCommissionDtoFromJSON = SellerAffiliateCommissionDtoFromJSON;
19
+ exports.SellerAffiliateCommissionDtoFromJSONTyped = SellerAffiliateCommissionDtoFromJSONTyped;
20
+ exports.SellerAffiliateCommissionDtoToJSON = SellerAffiliateCommissionDtoToJSON;
21
+ exports.SellerAffiliateCommissionDtoToJSONTyped = SellerAffiliateCommissionDtoToJSONTyped;
22
+ var MoneyDto_1 = require("./MoneyDto");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.SellerAffiliateCommissionDtoStatusEnum = {
27
+ PENDING: 'pending',
28
+ PAID: 'paid',
29
+ CANCELLED: 'cancelled'
30
+ };
31
+ /**
32
+ * Check if a given object implements the SellerAffiliateCommissionDto interface.
33
+ */
34
+ function instanceOfSellerAffiliateCommissionDto(value) {
35
+ if (!('id' in value) || value['id'] === undefined)
36
+ return false;
37
+ if (!('commissionPercentage' in value) || value['commissionPercentage'] === undefined)
38
+ return false;
39
+ if (!('commissionAmount' in value) || value['commissionAmount'] === undefined)
40
+ return false;
41
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
42
+ return false;
43
+ if (!('status' in value) || value['status'] === undefined)
44
+ return false;
45
+ return true;
46
+ }
47
+ function SellerAffiliateCommissionDtoFromJSON(json) {
48
+ return SellerAffiliateCommissionDtoFromJSONTyped(json, false);
49
+ }
50
+ function SellerAffiliateCommissionDtoFromJSONTyped(json, ignoreDiscriminator) {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+ 'id': json['id'],
56
+ 'commissionPercentage': json['commissionPercentage'],
57
+ 'commissionAmount': (0, MoneyDto_1.MoneyDtoFromJSON)(json['commissionAmount']),
58
+ 'createdAt': (new Date(json['createdAt'])),
59
+ 'status': json['status'],
60
+ };
61
+ }
62
+ function SellerAffiliateCommissionDtoToJSON(json) {
63
+ return SellerAffiliateCommissionDtoToJSONTyped(json, false);
64
+ }
65
+ function SellerAffiliateCommissionDtoToJSONTyped(value, ignoreDiscriminator) {
66
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
67
+ if (value == null) {
68
+ return value;
69
+ }
70
+ return {
71
+ 'id': value['id'],
72
+ 'commissionPercentage': value['commissionPercentage'],
73
+ 'commissionAmount': (0, MoneyDto_1.MoneyDtoToJSON)(value['commissionAmount']),
74
+ 'createdAt': ((value['createdAt']).toISOString()),
75
+ 'status': value['status'],
76
+ };
77
+ }
@@ -101,6 +101,7 @@ export * from './DomainTransferWorkflowDto';
101
101
  export * from './DomainUrlDto';
102
102
  export * from './EppBatchUpdateInput';
103
103
  export * from './ForgotPasswordRequestInput';
104
+ export * from './GetAllAffiliateCommissions200Response';
104
105
  export * from './GetAllDomainTransfers200Response';
105
106
  export * from './GetAllInvoices200Response';
106
107
  export * from './GetAllOrders200Response';
@@ -197,6 +198,7 @@ export * from './RentConfigurationPresetsDto';
197
198
  export * from './RentDto';
198
199
  export * from './RequestAccessTokenInput';
199
200
  export * from './SellerAccountReferralListItemDto';
201
+ export * from './SellerAffiliateCommissionDto';
200
202
  export * from './SellerDomainTransferAuthCodeDto';
201
203
  export * from './SellerDomainTransferDomainDto';
202
204
  export * from './SellerDomainTransferDto';
@@ -119,6 +119,7 @@ __exportStar(require("./DomainTransferWorkflowDto"), exports);
119
119
  __exportStar(require("./DomainUrlDto"), exports);
120
120
  __exportStar(require("./EppBatchUpdateInput"), exports);
121
121
  __exportStar(require("./ForgotPasswordRequestInput"), exports);
122
+ __exportStar(require("./GetAllAffiliateCommissions200Response"), exports);
122
123
  __exportStar(require("./GetAllDomainTransfers200Response"), exports);
123
124
  __exportStar(require("./GetAllInvoices200Response"), exports);
124
125
  __exportStar(require("./GetAllOrders200Response"), exports);
@@ -215,6 +216,7 @@ __exportStar(require("./RentConfigurationPresetsDto"), exports);
215
216
  __exportStar(require("./RentDto"), exports);
216
217
  __exportStar(require("./RequestAccessTokenInput"), exports);
217
218
  __exportStar(require("./SellerAccountReferralListItemDto"), exports);
219
+ __exportStar(require("./SellerAffiliateCommissionDto"), exports);
218
220
  __exportStar(require("./SellerDomainTransferAuthCodeDto"), exports);
219
221
  __exportStar(require("./SellerDomainTransferDomainDto"), exports);
220
222
  __exportStar(require("./SellerDomainTransferDto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.291",
3
+ "version": "0.0.293",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -19,6 +19,7 @@ import type {
19
19
  AccountSettingsDto,
20
20
  AccountSettingsInput,
21
21
  BadRequestException,
22
+ GetAllAffiliateCommissions200Response,
22
23
  GetAllReferrals200Response,
23
24
  IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto,
24
25
  NotFoundException,
@@ -36,6 +37,8 @@ import {
36
37
  AccountSettingsInputToJSON,
37
38
  BadRequestExceptionFromJSON,
38
39
  BadRequestExceptionToJSON,
40
+ GetAllAffiliateCommissions200ResponseFromJSON,
41
+ GetAllAffiliateCommissions200ResponseToJSON,
39
42
  GetAllReferrals200ResponseFromJSON,
40
43
  GetAllReferrals200ResponseToJSON,
41
44
  IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoFromJSON,
@@ -56,6 +59,13 @@ export interface AccountsApiGetAccountPaymentProviderSessionRequest {
56
59
  accountId: string;
57
60
  }
58
61
 
62
+ export interface AccountsApiGetAllAffiliateCommissionsRequest {
63
+ filter?: object;
64
+ page?: number;
65
+ limit?: number;
66
+ sortBy?: Array<string>;
67
+ }
68
+
59
69
  export interface AccountsApiGetAllReferralsRequest {
60
70
  filter?: object;
61
71
  page?: number;
@@ -201,6 +211,56 @@ export class AccountsApi extends runtime.BaseAPI {
201
211
  return await response.value();
202
212
  }
203
213
 
214
+ /**
215
+ *
216
+ */
217
+ async getAllAffiliateCommissionsRaw(requestParameters: AccountsApiGetAllAffiliateCommissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAllAffiliateCommissions200Response>> {
218
+ const queryParameters: any = {};
219
+
220
+ if (requestParameters['filter'] != null) {
221
+ queryParameters['filter'] = requestParameters['filter'];
222
+ }
223
+
224
+ if (requestParameters['page'] != null) {
225
+ queryParameters['page'] = requestParameters['page'];
226
+ }
227
+
228
+ if (requestParameters['limit'] != null) {
229
+ queryParameters['limit'] = requestParameters['limit'];
230
+ }
231
+
232
+ if (requestParameters['sortBy'] != null) {
233
+ queryParameters['sortBy'] = requestParameters['sortBy'];
234
+ }
235
+
236
+ const headerParameters: runtime.HTTPHeaders = {};
237
+
238
+ if (this.configuration && this.configuration.accessToken) {
239
+ const token = this.configuration.accessToken;
240
+ const tokenString = await token("bearer", []);
241
+
242
+ if (tokenString) {
243
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
244
+ }
245
+ }
246
+ const response = await this.request({
247
+ path: `/private/accounts/{accountId}/affiliate-commissions`,
248
+ method: 'GET',
249
+ headers: headerParameters,
250
+ query: queryParameters,
251
+ }, initOverrides);
252
+
253
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetAllAffiliateCommissions200ResponseFromJSON(jsonValue));
254
+ }
255
+
256
+ /**
257
+ *
258
+ */
259
+ async getAllAffiliateCommissions(requestParameters: AccountsApiGetAllAffiliateCommissionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllAffiliateCommissions200Response> {
260
+ const response = await this.getAllAffiliateCommissionsRaw(requestParameters, initOverrides);
261
+ return await response.value();
262
+ }
263
+
204
264
  /**
205
265
  *
206
266
  */
@@ -0,0 +1,106 @@
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 { PaginateResponseLinks } from './PaginateResponseLinks';
17
+ import {
18
+ PaginateResponseLinksFromJSON,
19
+ PaginateResponseLinksFromJSONTyped,
20
+ PaginateResponseLinksToJSON,
21
+ PaginateResponseLinksToJSONTyped,
22
+ } from './PaginateResponseLinks';
23
+ import type { PaginateResponseMeta } from './PaginateResponseMeta';
24
+ import {
25
+ PaginateResponseMetaFromJSON,
26
+ PaginateResponseMetaFromJSONTyped,
27
+ PaginateResponseMetaToJSON,
28
+ PaginateResponseMetaToJSONTyped,
29
+ } from './PaginateResponseMeta';
30
+ import type { SellerAffiliateCommissionDto } from './SellerAffiliateCommissionDto';
31
+ import {
32
+ SellerAffiliateCommissionDtoFromJSON,
33
+ SellerAffiliateCommissionDtoFromJSONTyped,
34
+ SellerAffiliateCommissionDtoToJSON,
35
+ SellerAffiliateCommissionDtoToJSONTyped,
36
+ } from './SellerAffiliateCommissionDto';
37
+
38
+ /**
39
+ *
40
+ * @export
41
+ * @interface GetAllAffiliateCommissions200Response
42
+ */
43
+ export interface GetAllAffiliateCommissions200Response {
44
+ /**
45
+ *
46
+ * @type {Array<SellerAffiliateCommissionDto>}
47
+ * @memberof GetAllAffiliateCommissions200Response
48
+ */
49
+ data: Array<SellerAffiliateCommissionDto>;
50
+ /**
51
+ *
52
+ * @type {PaginateResponseMeta}
53
+ * @memberof GetAllAffiliateCommissions200Response
54
+ */
55
+ meta: PaginateResponseMeta;
56
+ /**
57
+ *
58
+ * @type {PaginateResponseLinks}
59
+ * @memberof GetAllAffiliateCommissions200Response
60
+ */
61
+ links: PaginateResponseLinks;
62
+ }
63
+
64
+ /**
65
+ * Check if a given object implements the GetAllAffiliateCommissions200Response interface.
66
+ */
67
+ export function instanceOfGetAllAffiliateCommissions200Response(value: object): value is GetAllAffiliateCommissions200Response {
68
+ if (!('data' in value) || value['data'] === undefined) return false;
69
+ if (!('meta' in value) || value['meta'] === undefined) return false;
70
+ if (!('links' in value) || value['links'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function GetAllAffiliateCommissions200ResponseFromJSON(json: any): GetAllAffiliateCommissions200Response {
75
+ return GetAllAffiliateCommissions200ResponseFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function GetAllAffiliateCommissions200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAllAffiliateCommissions200Response {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'data': ((json['data'] as Array<any>).map(SellerAffiliateCommissionDtoFromJSON)),
85
+ 'meta': PaginateResponseMetaFromJSON(json['meta']),
86
+ 'links': PaginateResponseLinksFromJSON(json['links']),
87
+ };
88
+ }
89
+
90
+ export function GetAllAffiliateCommissions200ResponseToJSON(json: any): GetAllAffiliateCommissions200Response {
91
+ return GetAllAffiliateCommissions200ResponseToJSONTyped(json, false);
92
+ }
93
+
94
+ export function GetAllAffiliateCommissions200ResponseToJSONTyped(value?: GetAllAffiliateCommissions200Response | null, ignoreDiscriminator: boolean = false): any {
95
+ if (value == null) {
96
+ return value;
97
+ }
98
+
99
+ return {
100
+
101
+ 'data': ((value['data'] as Array<any>).map(SellerAffiliateCommissionDtoToJSON)),
102
+ 'meta': PaginateResponseMetaToJSON(value['meta']),
103
+ 'links': PaginateResponseLinksToJSON(value['links']),
104
+ };
105
+ }
106
+
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
19
19
  * @interface RegisterAccountInput
20
20
  */
21
21
  export interface RegisterAccountInput {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof RegisterAccountInput
26
+ */
27
+ affiliateIdentifier?: string | null;
22
28
  /**
23
29
  *
24
30
  * @type {string}
@@ -73,12 +79,6 @@ export interface RegisterAccountInput {
73
79
  * @memberof RegisterAccountInput
74
80
  */
75
81
  timezone?: string;
76
- /**
77
- *
78
- * @type {object}
79
- * @memberof RegisterAccountInput
80
- */
81
- affiliateIdentifier?: object | null;
82
82
  }
83
83
 
84
84
 
@@ -115,6 +115,7 @@ export function RegisterAccountInputFromJSONTyped(json: any, ignoreDiscriminator
115
115
  }
116
116
  return {
117
117
 
118
+ 'affiliateIdentifier': json['affiliateIdentifier'] == null ? undefined : json['affiliateIdentifier'],
118
119
  'locale': json['locale'],
119
120
  'firstname': json['firstname'],
120
121
  'lastname': json['lastname'],
@@ -124,7 +125,6 @@ export function RegisterAccountInputFromJSONTyped(json: any, ignoreDiscriminator
124
125
  'adProgram': json['adProgram'] == null ? undefined : json['adProgram'],
125
126
  'adId': json['adId'] == null ? undefined : json['adId'],
126
127
  'timezone': json['timezone'] == null ? undefined : json['timezone'],
127
- 'affiliateIdentifier': json['affiliateIdentifier'] == null ? undefined : json['affiliateIdentifier'],
128
128
  };
129
129
  }
130
130
 
@@ -139,6 +139,7 @@ export function RegisterAccountInputToJSONTyped(value?: RegisterAccountInput | n
139
139
 
140
140
  return {
141
141
 
142
+ 'affiliateIdentifier': value['affiliateIdentifier'],
142
143
  'locale': value['locale'],
143
144
  'firstname': value['firstname'],
144
145
  'lastname': value['lastname'],
@@ -148,7 +149,6 @@ export function RegisterAccountInputToJSONTyped(value?: RegisterAccountInput | n
148
149
  'adProgram': value['adProgram'],
149
150
  'adId': value['adId'],
150
151
  'timezone': value['timezone'],
151
- 'affiliateIdentifier': value['affiliateIdentifier'],
152
152
  };
153
153
  }
154
154
 
@@ -0,0 +1,122 @@
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 { MoneyDto } from './MoneyDto';
17
+ import {
18
+ MoneyDtoFromJSON,
19
+ MoneyDtoFromJSONTyped,
20
+ MoneyDtoToJSON,
21
+ MoneyDtoToJSONTyped,
22
+ } from './MoneyDto';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface SellerAffiliateCommissionDto
28
+ */
29
+ export interface SellerAffiliateCommissionDto {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof SellerAffiliateCommissionDto
34
+ */
35
+ id: string;
36
+ /**
37
+ * Commission percentage as a decimal
38
+ * @type {number}
39
+ * @memberof SellerAffiliateCommissionDto
40
+ */
41
+ commissionPercentage: number;
42
+ /**
43
+ * Commission amount
44
+ * @type {MoneyDto}
45
+ * @memberof SellerAffiliateCommissionDto
46
+ */
47
+ commissionAmount: MoneyDto;
48
+ /**
49
+ *
50
+ * @type {Date}
51
+ * @memberof SellerAffiliateCommissionDto
52
+ */
53
+ createdAt: Date;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof SellerAffiliateCommissionDto
58
+ */
59
+ status: SellerAffiliateCommissionDtoStatusEnum;
60
+ }
61
+
62
+
63
+ /**
64
+ * @export
65
+ */
66
+ export const SellerAffiliateCommissionDtoStatusEnum = {
67
+ PENDING: 'pending',
68
+ PAID: 'paid',
69
+ CANCELLED: 'cancelled'
70
+ } as const;
71
+ export type SellerAffiliateCommissionDtoStatusEnum = typeof SellerAffiliateCommissionDtoStatusEnum[keyof typeof SellerAffiliateCommissionDtoStatusEnum];
72
+
73
+
74
+ /**
75
+ * Check if a given object implements the SellerAffiliateCommissionDto interface.
76
+ */
77
+ export function instanceOfSellerAffiliateCommissionDto(value: object): value is SellerAffiliateCommissionDto {
78
+ if (!('id' in value) || value['id'] === undefined) return false;
79
+ if (!('commissionPercentage' in value) || value['commissionPercentage'] === undefined) return false;
80
+ if (!('commissionAmount' in value) || value['commissionAmount'] === undefined) return false;
81
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
82
+ if (!('status' in value) || value['status'] === undefined) return false;
83
+ return true;
84
+ }
85
+
86
+ export function SellerAffiliateCommissionDtoFromJSON(json: any): SellerAffiliateCommissionDto {
87
+ return SellerAffiliateCommissionDtoFromJSONTyped(json, false);
88
+ }
89
+
90
+ export function SellerAffiliateCommissionDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SellerAffiliateCommissionDto {
91
+ if (json == null) {
92
+ return json;
93
+ }
94
+ return {
95
+
96
+ 'id': json['id'],
97
+ 'commissionPercentage': json['commissionPercentage'],
98
+ 'commissionAmount': MoneyDtoFromJSON(json['commissionAmount']),
99
+ 'createdAt': (new Date(json['createdAt'])),
100
+ 'status': json['status'],
101
+ };
102
+ }
103
+
104
+ export function SellerAffiliateCommissionDtoToJSON(json: any): SellerAffiliateCommissionDto {
105
+ return SellerAffiliateCommissionDtoToJSONTyped(json, false);
106
+ }
107
+
108
+ export function SellerAffiliateCommissionDtoToJSONTyped(value?: SellerAffiliateCommissionDto | null, ignoreDiscriminator: boolean = false): any {
109
+ if (value == null) {
110
+ return value;
111
+ }
112
+
113
+ return {
114
+
115
+ 'id': value['id'],
116
+ 'commissionPercentage': value['commissionPercentage'],
117
+ 'commissionAmount': MoneyDtoToJSON(value['commissionAmount']),
118
+ 'createdAt': ((value['createdAt']).toISOString()),
119
+ 'status': value['status'],
120
+ };
121
+ }
122
+
@@ -103,6 +103,7 @@ export * from './DomainTransferWorkflowDto';
103
103
  export * from './DomainUrlDto';
104
104
  export * from './EppBatchUpdateInput';
105
105
  export * from './ForgotPasswordRequestInput';
106
+ export * from './GetAllAffiliateCommissions200Response';
106
107
  export * from './GetAllDomainTransfers200Response';
107
108
  export * from './GetAllInvoices200Response';
108
109
  export * from './GetAllOrders200Response';
@@ -199,6 +200,7 @@ export * from './RentConfigurationPresetsDto';
199
200
  export * from './RentDto';
200
201
  export * from './RequestAccessTokenInput';
201
202
  export * from './SellerAccountReferralListItemDto';
203
+ export * from './SellerAffiliateCommissionDto';
202
204
  export * from './SellerDomainTransferAuthCodeDto';
203
205
  export * from './SellerDomainTransferDomainDto';
204
206
  export * from './SellerDomainTransferDto';