@randock/nameshift-api-client 0.0.156 → 0.0.157

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.
@@ -54,6 +54,7 @@ src/models/ConflictException.ts
54
54
  src/models/CreateBuyerLeadMessageInput.ts
55
55
  src/models/CreateLeadInput.ts
56
56
  src/models/CreateLeadMessageInput.ts
57
+ src/models/CreateManualLeadInput.ts
57
58
  src/models/CreateOrderInput.ts
58
59
  src/models/DeleteDomainsInput.ts
59
60
  src/models/DomainDto.ts
@@ -110,6 +111,7 @@ src/models/ListLeadMessagesDto.ts
110
111
  src/models/LoginDto.ts
111
112
  src/models/LoginInput.ts
112
113
  src/models/MoneyDto.ts
114
+ src/models/MoneyInput.ts
113
115
  src/models/NotFoundException.ts
114
116
  src/models/ObjectId.ts
115
117
  src/models/OrderCompanyInfoDto.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.156
1
+ ## @randock/nameshift-api-client@0.0.157
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.156 --save
39
+ npm install @randock/nameshift-api-client@0.0.157 --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
- d11af06e333ebe5163aab7a2a5f85272b12221b8b5f9aa06c72b18e3dabc5cce22a28db8d24f297f1272c6d174343cc5
47
+ 457322dbc1b1f81cd261ffe41d8a5d79ae43b426bca0f0f66df66082e006a9996e35da07585e84d4b5642c02d566b183
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { BatchReadSellerLeadMessageInput, CreateLeadMessageInput, IntersectionLeadDtoWithLeadDetailsDtoWithBuyerDetailsDto, List200Response, ListLeadMessagesDto, ObjectId, PutLeadOfferInput } from '../models/index';
13
+ import type { BatchReadSellerLeadMessageInput, CreateLeadMessageInput, CreateManualLeadInput, IntersectionLeadDtoWithLeadDetailsDtoWithBuyerDetailsDto, List200Response, ListLeadMessagesDto, ObjectId, PutLeadOfferInput } from '../models/index';
14
14
  export interface LeadsApiAcceptLeadOfferRequest {
15
15
  leadId: string;
16
16
  }
@@ -21,6 +21,9 @@ export interface LeadsApiBulkReadSellerLeadMessageRequest {
21
21
  leadId: string;
22
22
  batchReadSellerLeadMessageInput: BatchReadSellerLeadMessageInput;
23
23
  }
24
+ export interface LeadsApiCreateManualLeadRequest {
25
+ createManualLeadInput: CreateManualLeadInput;
26
+ }
24
27
  export interface LeadsApiCreateMessageRequest {
25
28
  leadId: string;
26
29
  createLeadMessageInput: CreateLeadMessageInput;
@@ -72,6 +75,14 @@ export declare class LeadsApi extends runtime.BaseAPI {
72
75
  *
73
76
  */
74
77
  bulkReadSellerLeadMessage(requestParameters: LeadsApiBulkReadSellerLeadMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
78
+ /**
79
+ *
80
+ */
81
+ createManualLeadRaw(requestParameters: LeadsApiCreateManualLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
82
+ /**
83
+ *
84
+ */
85
+ createManualLead(requestParameters: LeadsApiCreateManualLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
75
86
  /**
76
87
  *
77
88
  */
@@ -233,6 +233,59 @@ var LeadsApi = /** @class */ (function (_super) {
233
233
  });
234
234
  });
235
235
  };
236
+ /**
237
+ *
238
+ */
239
+ LeadsApi.prototype.createManualLeadRaw = function (requestParameters, initOverrides) {
240
+ return __awaiter(this, void 0, void 0, function () {
241
+ var queryParameters, headerParameters, token, tokenString, response;
242
+ return __generator(this, function (_a) {
243
+ switch (_a.label) {
244
+ case 0:
245
+ if (requestParameters['createManualLeadInput'] == null) {
246
+ throw new runtime.RequiredError('createManualLeadInput', 'Required parameter "createManualLeadInput" was null or undefined when calling createManualLead().');
247
+ }
248
+ queryParameters = {};
249
+ headerParameters = {};
250
+ headerParameters['Content-Type'] = 'application/json';
251
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
252
+ token = this.configuration.accessToken;
253
+ return [4 /*yield*/, token("bearer", [])];
254
+ case 1:
255
+ tokenString = _a.sent();
256
+ if (tokenString) {
257
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
258
+ }
259
+ _a.label = 2;
260
+ case 2: return [4 /*yield*/, this.request({
261
+ path: "/private/leads/manual",
262
+ method: 'POST',
263
+ headers: headerParameters,
264
+ query: queryParameters,
265
+ body: (0, index_1.CreateManualLeadInputToJSON)(requestParameters['createManualLeadInput']),
266
+ }, initOverrides)];
267
+ case 3:
268
+ response = _a.sent();
269
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
270
+ }
271
+ });
272
+ });
273
+ };
274
+ /**
275
+ *
276
+ */
277
+ LeadsApi.prototype.createManualLead = function (requestParameters, initOverrides) {
278
+ return __awaiter(this, void 0, void 0, function () {
279
+ return __generator(this, function (_a) {
280
+ switch (_a.label) {
281
+ case 0: return [4 /*yield*/, this.createManualLeadRaw(requestParameters, initOverrides)];
282
+ case 1:
283
+ _a.sent();
284
+ return [2 /*return*/];
285
+ }
286
+ });
287
+ });
288
+ };
236
289
  /**
237
290
  *
238
291
  */
@@ -0,0 +1,77 @@
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 { MoneyInput } from './MoneyInput';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CreateManualLeadInput
17
+ */
18
+ export interface CreateManualLeadInput {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof CreateManualLeadInput
23
+ */
24
+ type: CreateManualLeadInputTypeEnum;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof CreateManualLeadInput
29
+ */
30
+ domainName: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof CreateManualLeadInput
35
+ */
36
+ email: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof CreateManualLeadInput
41
+ */
42
+ firstname: string;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof CreateManualLeadInput
47
+ */
48
+ lastname: string;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof CreateManualLeadInput
53
+ */
54
+ locale: string;
55
+ /**
56
+ *
57
+ * @type {MoneyInput}
58
+ * @memberof CreateManualLeadInput
59
+ */
60
+ offer: MoneyInput;
61
+ }
62
+ /**
63
+ * @export
64
+ */
65
+ export declare const CreateManualLeadInputTypeEnum: {
66
+ readonly BUY_NOW: "buy_now";
67
+ readonly OFFER: "offer";
68
+ };
69
+ export type CreateManualLeadInputTypeEnum = typeof CreateManualLeadInputTypeEnum[keyof typeof CreateManualLeadInputTypeEnum];
70
+ /**
71
+ * Check if a given object implements the CreateManualLeadInput interface.
72
+ */
73
+ export declare function instanceOfCreateManualLeadInput(value: object): value is CreateManualLeadInput;
74
+ export declare function CreateManualLeadInputFromJSON(json: any): CreateManualLeadInput;
75
+ export declare function CreateManualLeadInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateManualLeadInput;
76
+ export declare function CreateManualLeadInputToJSON(json: any): CreateManualLeadInput;
77
+ export declare function CreateManualLeadInputToJSONTyped(value?: CreateManualLeadInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,84 @@
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.CreateManualLeadInputTypeEnum = void 0;
17
+ exports.instanceOfCreateManualLeadInput = instanceOfCreateManualLeadInput;
18
+ exports.CreateManualLeadInputFromJSON = CreateManualLeadInputFromJSON;
19
+ exports.CreateManualLeadInputFromJSONTyped = CreateManualLeadInputFromJSONTyped;
20
+ exports.CreateManualLeadInputToJSON = CreateManualLeadInputToJSON;
21
+ exports.CreateManualLeadInputToJSONTyped = CreateManualLeadInputToJSONTyped;
22
+ var MoneyInput_1 = require("./MoneyInput");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.CreateManualLeadInputTypeEnum = {
27
+ BUY_NOW: 'buy_now',
28
+ OFFER: 'offer'
29
+ };
30
+ /**
31
+ * Check if a given object implements the CreateManualLeadInput interface.
32
+ */
33
+ function instanceOfCreateManualLeadInput(value) {
34
+ if (!('type' in value) || value['type'] === undefined)
35
+ return false;
36
+ if (!('domainName' in value) || value['domainName'] === undefined)
37
+ return false;
38
+ if (!('email' in value) || value['email'] === undefined)
39
+ return false;
40
+ if (!('firstname' in value) || value['firstname'] === undefined)
41
+ return false;
42
+ if (!('lastname' in value) || value['lastname'] === undefined)
43
+ return false;
44
+ if (!('locale' in value) || value['locale'] === undefined)
45
+ return false;
46
+ if (!('offer' in value) || value['offer'] === undefined)
47
+ return false;
48
+ return true;
49
+ }
50
+ function CreateManualLeadInputFromJSON(json) {
51
+ return CreateManualLeadInputFromJSONTyped(json, false);
52
+ }
53
+ function CreateManualLeadInputFromJSONTyped(json, ignoreDiscriminator) {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+ 'type': json['type'],
59
+ 'domainName': json['domainName'],
60
+ 'email': json['email'],
61
+ 'firstname': json['firstname'],
62
+ 'lastname': json['lastname'],
63
+ 'locale': json['locale'],
64
+ 'offer': (0, MoneyInput_1.MoneyInputFromJSON)(json['offer']),
65
+ };
66
+ }
67
+ function CreateManualLeadInputToJSON(json) {
68
+ return CreateManualLeadInputToJSONTyped(json, false);
69
+ }
70
+ function CreateManualLeadInputToJSONTyped(value, ignoreDiscriminator) {
71
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+ return {
76
+ 'type': value['type'],
77
+ 'domainName': value['domainName'],
78
+ 'email': value['email'],
79
+ 'firstname': value['firstname'],
80
+ 'lastname': value['lastname'],
81
+ 'locale': value['locale'],
82
+ 'offer': (0, MoneyInput_1.MoneyInputToJSON)(value['offer']),
83
+ };
84
+ }
@@ -42,6 +42,18 @@ export interface IntersectionLeadDtoWithListFieldsDto {
42
42
  * @memberof IntersectionLeadDtoWithListFieldsDto
43
43
  */
44
44
  lastOfferBy: IntersectionLeadDtoWithListFieldsDtoLastOfferByEnum | null;
45
+ /**
46
+ *
47
+ * @type {string}
48
+ * @memberof IntersectionLeadDtoWithListFieldsDto
49
+ */
50
+ buyerInitials: string;
51
+ /**
52
+ *
53
+ * @type {string}
54
+ * @memberof IntersectionLeadDtoWithListFieldsDto
55
+ */
56
+ buyerIpCountryCode: string | null;
45
57
  /**
46
58
  *
47
59
  * @type {string}
@@ -102,24 +114,6 @@ export interface IntersectionLeadDtoWithListFieldsDto {
102
114
  * @memberof IntersectionLeadDtoWithListFieldsDto
103
115
  */
104
116
  orderPaymentUrl: string | null;
105
- /**
106
- *
107
- * @type {string}
108
- * @memberof IntersectionLeadDtoWithListFieldsDto
109
- */
110
- domainName: string;
111
- /**
112
- *
113
- * @type {string}
114
- * @memberof IntersectionLeadDtoWithListFieldsDto
115
- */
116
- buyerInitials: string;
117
- /**
118
- *
119
- * @type {string}
120
- * @memberof IntersectionLeadDtoWithListFieldsDto
121
- */
122
- buyerIpCountryCode: string | null;
123
117
  /**
124
118
  * The message in case lastMessageType === LeadMessageTypeEnum.MESSAGE
125
119
  * @type {string}
@@ -70,6 +70,10 @@ function instanceOfIntersectionLeadDtoWithListFieldsDto(value) {
70
70
  return false;
71
71
  if (!('lastOfferBy' in value) || value['lastOfferBy'] === undefined)
72
72
  return false;
73
+ if (!('buyerInitials' in value) || value['buyerInitials'] === undefined)
74
+ return false;
75
+ if (!('buyerIpCountryCode' in value) || value['buyerIpCountryCode'] === undefined)
76
+ return false;
73
77
  if (!('lastMessageFrom' in value) || value['lastMessageFrom'] === undefined)
74
78
  return false;
75
79
  if (!('lastMessageType' in value) || value['lastMessageType'] === undefined)
@@ -90,12 +94,6 @@ function instanceOfIntersectionLeadDtoWithListFieldsDto(value) {
90
94
  return false;
91
95
  if (!('orderPaymentUrl' in value) || value['orderPaymentUrl'] === undefined)
92
96
  return false;
93
- if (!('domainName' in value) || value['domainName'] === undefined)
94
- return false;
95
- if (!('buyerInitials' in value) || value['buyerInitials'] === undefined)
96
- return false;
97
- if (!('buyerIpCountryCode' in value) || value['buyerIpCountryCode'] === undefined)
98
- return false;
99
97
  if (!('lastMessageMessage' in value) || value['lastMessageMessage'] === undefined)
100
98
  return false;
101
99
  if (!('lastMessageDate' in value) || value['lastMessageDate'] === undefined)
@@ -114,6 +112,8 @@ function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json, ignoreDiscrimin
114
112
  'status': json['status'],
115
113
  'lastOffer': (0, MoneyDto_1.MoneyDtoFromJSON)(json['lastOffer']),
116
114
  'lastOfferBy': json['lastOfferBy'],
115
+ 'buyerInitials': json['buyerInitials'],
116
+ 'buyerIpCountryCode': json['buyerIpCountryCode'],
117
117
  'lastMessageFrom': json['lastMessageFrom'],
118
118
  'lastMessageType': json['lastMessageType'],
119
119
  'lastMessageData': (0, LeadMessageData_1.LeadMessageDataFromJSON)(json['lastMessageData']),
@@ -124,9 +124,6 @@ function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json, ignoreDiscrimin
124
124
  'unreadBuyerMessagesNumber': json['unreadBuyerMessagesNumber'],
125
125
  'unreadSellerMessagesNumber': json['unreadSellerMessagesNumber'],
126
126
  'orderPaymentUrl': json['orderPaymentUrl'],
127
- 'domainName': json['domainName'],
128
- 'buyerInitials': json['buyerInitials'],
129
- 'buyerIpCountryCode': json['buyerIpCountryCode'],
130
127
  'lastMessageMessage': json['lastMessageMessage'],
131
128
  'lastMessageDate': (new Date(json['lastMessageDate'])),
132
129
  };
@@ -144,6 +141,8 @@ function IntersectionLeadDtoWithListFieldsDtoToJSONTyped(value, ignoreDiscrimina
144
141
  'status': value['status'],
145
142
  'lastOffer': (0, MoneyDto_1.MoneyDtoToJSON)(value['lastOffer']),
146
143
  'lastOfferBy': value['lastOfferBy'],
144
+ 'buyerInitials': value['buyerInitials'],
145
+ 'buyerIpCountryCode': value['buyerIpCountryCode'],
147
146
  'lastMessageFrom': value['lastMessageFrom'],
148
147
  'lastMessageType': value['lastMessageType'],
149
148
  'lastMessageData': (0, LeadMessageData_1.LeadMessageDataToJSON)(value['lastMessageData']),
@@ -154,9 +153,6 @@ function IntersectionLeadDtoWithListFieldsDtoToJSONTyped(value, ignoreDiscrimina
154
153
  'unreadBuyerMessagesNumber': value['unreadBuyerMessagesNumber'],
155
154
  'unreadSellerMessagesNumber': value['unreadSellerMessagesNumber'],
156
155
  'orderPaymentUrl': value['orderPaymentUrl'],
157
- 'domainName': value['domainName'],
158
- 'buyerInitials': value['buyerInitials'],
159
- 'buyerIpCountryCode': value['buyerIpCountryCode'],
160
156
  'lastMessageMessage': value['lastMessageMessage'],
161
157
  'lastMessageDate': ((value['lastMessageDate']).toISOString()),
162
158
  };
@@ -27,6 +27,12 @@ export interface LeadDomainDto {
27
27
  * @memberof LeadDomainDto
28
28
  */
29
29
  name: string;
30
+ /**
31
+ * Domain name
32
+ * @type {string}
33
+ * @memberof LeadDomainDto
34
+ */
35
+ displayName: string;
30
36
  /**
31
37
  * Domain currency code
32
38
  * @type {string}
@@ -26,6 +26,8 @@ function instanceOfLeadDomainDto(value) {
26
26
  return false;
27
27
  if (!('name' in value) || value['name'] === undefined)
28
28
  return false;
29
+ if (!('displayName' in value) || value['displayName'] === undefined)
30
+ return false;
29
31
  if (!('currencyCode' in value) || value['currencyCode'] === undefined)
30
32
  return false;
31
33
  if (!('deletedAt' in value) || value['deletedAt'] === undefined)
@@ -42,6 +44,7 @@ function LeadDomainDtoFromJSONTyped(json, ignoreDiscriminator) {
42
44
  return {
43
45
  'id': json['id'],
44
46
  'name': json['name'],
47
+ 'displayName': json['displayName'],
45
48
  'currencyCode': json['currencyCode'],
46
49
  'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
47
50
  };
@@ -57,6 +60,7 @@ function LeadDomainDtoToJSONTyped(value, ignoreDiscriminator) {
57
60
  return {
58
61
  'id': value['id'],
59
62
  'name': value['name'],
63
+ 'displayName': value['displayName'],
60
64
  'currencyCode': value['currencyCode'],
61
65
  'deletedAt': (value['deletedAt'] == null ? null : value['deletedAt'].toISOString()),
62
66
  };
@@ -0,0 +1,38 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface MoneyInput
16
+ */
17
+ export interface MoneyInput {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof MoneyInput
22
+ */
23
+ amount: number;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof MoneyInput
28
+ */
29
+ currencyCode: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the MoneyInput interface.
33
+ */
34
+ export declare function instanceOfMoneyInput(value: object): value is MoneyInput;
35
+ export declare function MoneyInputFromJSON(json: any): MoneyInput;
36
+ export declare function MoneyInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyInput;
37
+ export declare function MoneyInputToJSON(json: any): MoneyInput;
38
+ export declare function MoneyInputToJSONTyped(value?: MoneyInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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.instanceOfMoneyInput = instanceOfMoneyInput;
17
+ exports.MoneyInputFromJSON = MoneyInputFromJSON;
18
+ exports.MoneyInputFromJSONTyped = MoneyInputFromJSONTyped;
19
+ exports.MoneyInputToJSON = MoneyInputToJSON;
20
+ exports.MoneyInputToJSONTyped = MoneyInputToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MoneyInput interface.
23
+ */
24
+ function instanceOfMoneyInput(value) {
25
+ if (!('amount' in value) || value['amount'] === undefined)
26
+ return false;
27
+ if (!('currencyCode' in value) || value['currencyCode'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function MoneyInputFromJSON(json) {
32
+ return MoneyInputFromJSONTyped(json, false);
33
+ }
34
+ function MoneyInputFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'amount': json['amount'],
40
+ 'currencyCode': json['currencyCode'],
41
+ };
42
+ }
43
+ function MoneyInputToJSON(json) {
44
+ return MoneyInputToJSONTyped(json, false);
45
+ }
46
+ function MoneyInputToJSONTyped(value, ignoreDiscriminator) {
47
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'amount': value['amount'],
53
+ 'currencyCode': value['currencyCode'],
54
+ };
55
+ }
@@ -32,6 +32,7 @@ export * from './ConflictException';
32
32
  export * from './CreateBuyerLeadMessageInput';
33
33
  export * from './CreateLeadInput';
34
34
  export * from './CreateLeadMessageInput';
35
+ export * from './CreateManualLeadInput';
35
36
  export * from './CreateOrderInput';
36
37
  export * from './DeleteDomainsInput';
37
38
  export * from './DomainDto';
@@ -88,6 +89,7 @@ export * from './ListLeadMessagesDto';
88
89
  export * from './LoginDto';
89
90
  export * from './LoginInput';
90
91
  export * from './MoneyDto';
92
+ export * from './MoneyInput';
91
93
  export * from './NotFoundException';
92
94
  export * from './ObjectId';
93
95
  export * from './OrderCompanyInfoDto';
@@ -50,6 +50,7 @@ __exportStar(require("./ConflictException"), exports);
50
50
  __exportStar(require("./CreateBuyerLeadMessageInput"), exports);
51
51
  __exportStar(require("./CreateLeadInput"), exports);
52
52
  __exportStar(require("./CreateLeadMessageInput"), exports);
53
+ __exportStar(require("./CreateManualLeadInput"), exports);
53
54
  __exportStar(require("./CreateOrderInput"), exports);
54
55
  __exportStar(require("./DeleteDomainsInput"), exports);
55
56
  __exportStar(require("./DomainDto"), exports);
@@ -106,6 +107,7 @@ __exportStar(require("./ListLeadMessagesDto"), exports);
106
107
  __exportStar(require("./LoginDto"), exports);
107
108
  __exportStar(require("./LoginInput"), exports);
108
109
  __exportStar(require("./MoneyDto"), exports);
110
+ __exportStar(require("./MoneyInput"), exports);
109
111
  __exportStar(require("./NotFoundException"), exports);
110
112
  __exportStar(require("./ObjectId"), exports);
111
113
  __exportStar(require("./OrderCompanyInfoDto"), exports);
package/dist/runtime.d.ts CHANGED
@@ -123,6 +123,7 @@ export interface RequestOpts {
123
123
  body?: HTTPBody;
124
124
  }
125
125
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
126
+ export declare function exists(json: any, key: string): boolean;
126
127
  export declare function mapValues(data: any, fn: (item: any) => any): {};
127
128
  export declare function canConsumeForm(consumes: Consume[]): boolean;
128
129
  export interface Consume {
package/dist/runtime.js CHANGED
@@ -77,6 +77,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
77
77
  Object.defineProperty(exports, "__esModule", { value: true });
78
78
  exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
79
79
  exports.querystring = querystring;
80
+ exports.exists = exists;
80
81
  exports.mapValues = mapValues;
81
82
  exports.canConsumeForm = canConsumeForm;
82
83
  exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
@@ -468,6 +469,10 @@ function querystringSingleKey(key, value, keyPrefix) {
468
469
  }
469
470
  return "".concat(encodeURIComponent(fullKey), "=").concat(encodeURIComponent(String(value)));
470
471
  }
472
+ function exists(json, key) {
473
+ var value = json[key];
474
+ return value !== null && value !== undefined;
475
+ }
471
476
  function mapValues(data, fn) {
472
477
  return Object.keys(data).reduce(function (acc, key) {
473
478
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.156",
3
+ "version": "0.0.157",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -18,6 +18,7 @@ import type {
18
18
  BadRequestException,
19
19
  BatchReadSellerLeadMessageInput,
20
20
  CreateLeadMessageInput,
21
+ CreateManualLeadInput,
21
22
  IntersectionLeadDtoWithLeadDetailsDtoWithBuyerDetailsDto,
22
23
  List200Response,
23
24
  ListLeadMessagesDto,
@@ -33,6 +34,8 @@ import {
33
34
  BatchReadSellerLeadMessageInputToJSON,
34
35
  CreateLeadMessageInputFromJSON,
35
36
  CreateLeadMessageInputToJSON,
37
+ CreateManualLeadInputFromJSON,
38
+ CreateManualLeadInputToJSON,
36
39
  IntersectionLeadDtoWithLeadDetailsDtoWithBuyerDetailsDtoFromJSON,
37
40
  IntersectionLeadDtoWithLeadDetailsDtoWithBuyerDetailsDtoToJSON,
38
41
  List200ResponseFromJSON,
@@ -62,6 +65,10 @@ export interface LeadsApiBulkReadSellerLeadMessageRequest {
62
65
  batchReadSellerLeadMessageInput: BatchReadSellerLeadMessageInput;
63
66
  }
64
67
 
68
+ export interface LeadsApiCreateManualLeadRequest {
69
+ createManualLeadInput: CreateManualLeadInput;
70
+ }
71
+
65
72
  export interface LeadsApiCreateMessageRequest {
66
73
  leadId: string;
67
74
  createLeadMessageInput: CreateLeadMessageInput;
@@ -226,6 +233,49 @@ export class LeadsApi extends runtime.BaseAPI {
226
233
  await this.bulkReadSellerLeadMessageRaw(requestParameters, initOverrides);
227
234
  }
228
235
 
236
+ /**
237
+ *
238
+ */
239
+ async createManualLeadRaw(requestParameters: LeadsApiCreateManualLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
240
+ if (requestParameters['createManualLeadInput'] == null) {
241
+ throw new runtime.RequiredError(
242
+ 'createManualLeadInput',
243
+ 'Required parameter "createManualLeadInput" was null or undefined when calling createManualLead().'
244
+ );
245
+ }
246
+
247
+ const queryParameters: any = {};
248
+
249
+ const headerParameters: runtime.HTTPHeaders = {};
250
+
251
+ headerParameters['Content-Type'] = 'application/json';
252
+
253
+ if (this.configuration && this.configuration.accessToken) {
254
+ const token = this.configuration.accessToken;
255
+ const tokenString = await token("bearer", []);
256
+
257
+ if (tokenString) {
258
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
259
+ }
260
+ }
261
+ const response = await this.request({
262
+ path: `/private/leads/manual`,
263
+ method: 'POST',
264
+ headers: headerParameters,
265
+ query: queryParameters,
266
+ body: CreateManualLeadInputToJSON(requestParameters['createManualLeadInput']),
267
+ }, initOverrides);
268
+
269
+ return new runtime.VoidApiResponse(response);
270
+ }
271
+
272
+ /**
273
+ *
274
+ */
275
+ async createManualLead(requestParameters: LeadsApiCreateManualLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
276
+ await this.createManualLeadRaw(requestParameters, initOverrides);
277
+ }
278
+
229
279
  /**
230
280
  *
231
281
  */
@@ -0,0 +1,139 @@
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 { MoneyInput } from './MoneyInput';
17
+ import {
18
+ MoneyInputFromJSON,
19
+ MoneyInputFromJSONTyped,
20
+ MoneyInputToJSON,
21
+ MoneyInputToJSONTyped,
22
+ } from './MoneyInput';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CreateManualLeadInput
28
+ */
29
+ export interface CreateManualLeadInput {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof CreateManualLeadInput
34
+ */
35
+ type: CreateManualLeadInputTypeEnum;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof CreateManualLeadInput
40
+ */
41
+ domainName: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof CreateManualLeadInput
46
+ */
47
+ email: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof CreateManualLeadInput
52
+ */
53
+ firstname: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof CreateManualLeadInput
58
+ */
59
+ lastname: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof CreateManualLeadInput
64
+ */
65
+ locale: string;
66
+ /**
67
+ *
68
+ * @type {MoneyInput}
69
+ * @memberof CreateManualLeadInput
70
+ */
71
+ offer: MoneyInput;
72
+ }
73
+
74
+
75
+ /**
76
+ * @export
77
+ */
78
+ export const CreateManualLeadInputTypeEnum = {
79
+ BUY_NOW: 'buy_now',
80
+ OFFER: 'offer'
81
+ } as const;
82
+ export type CreateManualLeadInputTypeEnum = typeof CreateManualLeadInputTypeEnum[keyof typeof CreateManualLeadInputTypeEnum];
83
+
84
+
85
+ /**
86
+ * Check if a given object implements the CreateManualLeadInput interface.
87
+ */
88
+ export function instanceOfCreateManualLeadInput(value: object): value is CreateManualLeadInput {
89
+ if (!('type' in value) || value['type'] === undefined) return false;
90
+ if (!('domainName' in value) || value['domainName'] === undefined) return false;
91
+ if (!('email' in value) || value['email'] === undefined) return false;
92
+ if (!('firstname' in value) || value['firstname'] === undefined) return false;
93
+ if (!('lastname' in value) || value['lastname'] === undefined) return false;
94
+ if (!('locale' in value) || value['locale'] === undefined) return false;
95
+ if (!('offer' in value) || value['offer'] === undefined) return false;
96
+ return true;
97
+ }
98
+
99
+ export function CreateManualLeadInputFromJSON(json: any): CreateManualLeadInput {
100
+ return CreateManualLeadInputFromJSONTyped(json, false);
101
+ }
102
+
103
+ export function CreateManualLeadInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateManualLeadInput {
104
+ if (json == null) {
105
+ return json;
106
+ }
107
+ return {
108
+
109
+ 'type': json['type'],
110
+ 'domainName': json['domainName'],
111
+ 'email': json['email'],
112
+ 'firstname': json['firstname'],
113
+ 'lastname': json['lastname'],
114
+ 'locale': json['locale'],
115
+ 'offer': MoneyInputFromJSON(json['offer']),
116
+ };
117
+ }
118
+
119
+ export function CreateManualLeadInputToJSON(json: any): CreateManualLeadInput {
120
+ return CreateManualLeadInputToJSONTyped(json, false);
121
+ }
122
+
123
+ export function CreateManualLeadInputToJSONTyped(value?: CreateManualLeadInput | null, ignoreDiscriminator: boolean = false): any {
124
+ if (value == null) {
125
+ return value;
126
+ }
127
+
128
+ return {
129
+
130
+ 'type': value['type'],
131
+ 'domainName': value['domainName'],
132
+ 'email': value['email'],
133
+ 'firstname': value['firstname'],
134
+ 'lastname': value['lastname'],
135
+ 'locale': value['locale'],
136
+ 'offer': MoneyInputToJSON(value['offer']),
137
+ };
138
+ }
139
+
@@ -65,6 +65,18 @@ export interface IntersectionLeadDtoWithListFieldsDto {
65
65
  * @memberof IntersectionLeadDtoWithListFieldsDto
66
66
  */
67
67
  lastOfferBy: IntersectionLeadDtoWithListFieldsDtoLastOfferByEnum | null;
68
+ /**
69
+ *
70
+ * @type {string}
71
+ * @memberof IntersectionLeadDtoWithListFieldsDto
72
+ */
73
+ buyerInitials: string;
74
+ /**
75
+ *
76
+ * @type {string}
77
+ * @memberof IntersectionLeadDtoWithListFieldsDto
78
+ */
79
+ buyerIpCountryCode: string | null;
68
80
  /**
69
81
  *
70
82
  * @type {string}
@@ -125,24 +137,6 @@ export interface IntersectionLeadDtoWithListFieldsDto {
125
137
  * @memberof IntersectionLeadDtoWithListFieldsDto
126
138
  */
127
139
  orderPaymentUrl: string | null;
128
- /**
129
- *
130
- * @type {string}
131
- * @memberof IntersectionLeadDtoWithListFieldsDto
132
- */
133
- domainName: string;
134
- /**
135
- *
136
- * @type {string}
137
- * @memberof IntersectionLeadDtoWithListFieldsDto
138
- */
139
- buyerInitials: string;
140
- /**
141
- *
142
- * @type {string}
143
- * @memberof IntersectionLeadDtoWithListFieldsDto
144
- */
145
- buyerIpCountryCode: string | null;
146
140
  /**
147
141
  * The message in case lastMessageType === LeadMessageTypeEnum.MESSAGE
148
142
  * @type {string}
@@ -211,6 +205,8 @@ export function instanceOfIntersectionLeadDtoWithListFieldsDto(value: object): v
211
205
  if (!('status' in value) || value['status'] === undefined) return false;
212
206
  if (!('lastOffer' in value) || value['lastOffer'] === undefined) return false;
213
207
  if (!('lastOfferBy' in value) || value['lastOfferBy'] === undefined) return false;
208
+ if (!('buyerInitials' in value) || value['buyerInitials'] === undefined) return false;
209
+ if (!('buyerIpCountryCode' in value) || value['buyerIpCountryCode'] === undefined) return false;
214
210
  if (!('lastMessageFrom' in value) || value['lastMessageFrom'] === undefined) return false;
215
211
  if (!('lastMessageType' in value) || value['lastMessageType'] === undefined) return false;
216
212
  if (!('lastMessageData' in value) || value['lastMessageData'] === undefined) return false;
@@ -221,9 +217,6 @@ export function instanceOfIntersectionLeadDtoWithListFieldsDto(value: object): v
221
217
  if (!('unreadBuyerMessagesNumber' in value) || value['unreadBuyerMessagesNumber'] === undefined) return false;
222
218
  if (!('unreadSellerMessagesNumber' in value) || value['unreadSellerMessagesNumber'] === undefined) return false;
223
219
  if (!('orderPaymentUrl' in value) || value['orderPaymentUrl'] === undefined) return false;
224
- if (!('domainName' in value) || value['domainName'] === undefined) return false;
225
- if (!('buyerInitials' in value) || value['buyerInitials'] === undefined) return false;
226
- if (!('buyerIpCountryCode' in value) || value['buyerIpCountryCode'] === undefined) return false;
227
220
  if (!('lastMessageMessage' in value) || value['lastMessageMessage'] === undefined) return false;
228
221
  if (!('lastMessageDate' in value) || value['lastMessageDate'] === undefined) return false;
229
222
  return true;
@@ -243,6 +236,8 @@ export function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json: any, ign
243
236
  'status': json['status'],
244
237
  'lastOffer': MoneyDtoFromJSON(json['lastOffer']),
245
238
  'lastOfferBy': json['lastOfferBy'],
239
+ 'buyerInitials': json['buyerInitials'],
240
+ 'buyerIpCountryCode': json['buyerIpCountryCode'],
246
241
  'lastMessageFrom': json['lastMessageFrom'],
247
242
  'lastMessageType': json['lastMessageType'],
248
243
  'lastMessageData': LeadMessageDataFromJSON(json['lastMessageData']),
@@ -253,9 +248,6 @@ export function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json: any, ign
253
248
  'unreadBuyerMessagesNumber': json['unreadBuyerMessagesNumber'],
254
249
  'unreadSellerMessagesNumber': json['unreadSellerMessagesNumber'],
255
250
  'orderPaymentUrl': json['orderPaymentUrl'],
256
- 'domainName': json['domainName'],
257
- 'buyerInitials': json['buyerInitials'],
258
- 'buyerIpCountryCode': json['buyerIpCountryCode'],
259
251
  'lastMessageMessage': json['lastMessageMessage'],
260
252
  'lastMessageDate': (new Date(json['lastMessageDate'])),
261
253
  };
@@ -276,6 +268,8 @@ export function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json: any, ign
276
268
  'status': value['status'],
277
269
  'lastOffer': MoneyDtoToJSON(value['lastOffer']),
278
270
  'lastOfferBy': value['lastOfferBy'],
271
+ 'buyerInitials': value['buyerInitials'],
272
+ 'buyerIpCountryCode': value['buyerIpCountryCode'],
279
273
  'lastMessageFrom': value['lastMessageFrom'],
280
274
  'lastMessageType': value['lastMessageType'],
281
275
  'lastMessageData': LeadMessageDataToJSON(value['lastMessageData']),
@@ -286,9 +280,6 @@ export function IntersectionLeadDtoWithListFieldsDtoFromJSONTyped(json: any, ign
286
280
  'unreadBuyerMessagesNumber': value['unreadBuyerMessagesNumber'],
287
281
  'unreadSellerMessagesNumber': value['unreadSellerMessagesNumber'],
288
282
  'orderPaymentUrl': value['orderPaymentUrl'],
289
- 'domainName': value['domainName'],
290
- 'buyerInitials': value['buyerInitials'],
291
- 'buyerIpCountryCode': value['buyerIpCountryCode'],
292
283
  'lastMessageMessage': value['lastMessageMessage'],
293
284
  'lastMessageDate': ((value['lastMessageDate']).toISOString()),
294
285
  };
@@ -31,6 +31,12 @@ export interface LeadDomainDto {
31
31
  * @memberof LeadDomainDto
32
32
  */
33
33
  name: string;
34
+ /**
35
+ * Domain name
36
+ * @type {string}
37
+ * @memberof LeadDomainDto
38
+ */
39
+ displayName: string;
34
40
  /**
35
41
  * Domain currency code
36
42
  * @type {string}
@@ -51,6 +57,7 @@ export interface LeadDomainDto {
51
57
  export function instanceOfLeadDomainDto(value: object): value is LeadDomainDto {
52
58
  if (!('id' in value) || value['id'] === undefined) return false;
53
59
  if (!('name' in value) || value['name'] === undefined) return false;
60
+ if (!('displayName' in value) || value['displayName'] === undefined) return false;
54
61
  if (!('currencyCode' in value) || value['currencyCode'] === undefined) return false;
55
62
  if (!('deletedAt' in value) || value['deletedAt'] === undefined) return false;
56
63
  return true;
@@ -68,6 +75,7 @@ export function LeadDomainDtoFromJSONTyped(json: any, ignoreDiscriminator: boole
68
75
 
69
76
  'id': json['id'],
70
77
  'name': json['name'],
78
+ 'displayName': json['displayName'],
71
79
  'currencyCode': json['currencyCode'],
72
80
  'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
73
81
  };
@@ -86,6 +94,7 @@ export function LeadDomainDtoFromJSONTyped(json: any, ignoreDiscriminator: boole
86
94
 
87
95
  'id': value['id'],
88
96
  'name': value['name'],
97
+ 'displayName': value['displayName'],
89
98
  'currencyCode': value['currencyCode'],
90
99
  'deletedAt': (value['deletedAt'] == null ? null : (value['deletedAt'] as any).toISOString()),
91
100
  };
@@ -0,0 +1,75 @@
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 MoneyInput
20
+ */
21
+ export interface MoneyInput {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof MoneyInput
26
+ */
27
+ amount: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof MoneyInput
32
+ */
33
+ currencyCode: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the MoneyInput interface.
38
+ */
39
+ export function instanceOfMoneyInput(value: object): value is MoneyInput {
40
+ if (!('amount' in value) || value['amount'] === undefined) return false;
41
+ if (!('currencyCode' in value) || value['currencyCode'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function MoneyInputFromJSON(json: any): MoneyInput {
46
+ return MoneyInputFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function MoneyInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyInput {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'amount': json['amount'],
56
+ 'currencyCode': json['currencyCode'],
57
+ };
58
+ }
59
+
60
+ export function MoneyInputToJSON(json: any): MoneyInput {
61
+ return MoneyInputToJSONTyped(json, false);
62
+ }
63
+
64
+ export function MoneyInputToJSONTyped(value?: MoneyInput | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'amount': value['amount'],
72
+ 'currencyCode': value['currencyCode'],
73
+ };
74
+ }
75
+
@@ -34,6 +34,7 @@ export * from './ConflictException';
34
34
  export * from './CreateBuyerLeadMessageInput';
35
35
  export * from './CreateLeadInput';
36
36
  export * from './CreateLeadMessageInput';
37
+ export * from './CreateManualLeadInput';
37
38
  export * from './CreateOrderInput';
38
39
  export * from './DeleteDomainsInput';
39
40
  export * from './DomainDto';
@@ -90,6 +91,7 @@ export * from './ListLeadMessagesDto';
90
91
  export * from './LoginDto';
91
92
  export * from './LoginInput';
92
93
  export * from './MoneyDto';
94
+ export * from './MoneyInput';
93
95
  export * from './NotFoundException';
94
96
  export * from './ObjectId';
95
97
  export * from './OrderCompanyInfoDto';
package/src/runtime.ts CHANGED
@@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
337
337
  return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
338
338
  }
339
339
 
340
+ export function exists(json: any, key: string) {
341
+ const value = json[key];
342
+ return value !== null && value !== undefined;
343
+ }
344
+
340
345
  export function mapValues(data: any, fn: (item: any) => any) {
341
346
  return Object.keys(data).reduce(
342
347
  (acc, key) => ({ ...acc, [key]: fn(data[key]) }),