@randock/nameshift-api-client 0.0.447 → 0.0.449
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/.openapi-generator/FILES +6 -0
- package/README.md +3 -3
- package/dist/apis/APIKeysApi.d.ts +78 -0
- package/dist/apis/APIKeysApi.js +354 -0
- package/dist/apis/AccountsApi.d.ts +36 -36
- package/dist/apis/AccountsApi.js +360 -216
- package/dist/apis/AdminApi.d.ts +26 -0
- package/dist/apis/AdminApi.js +106 -0
- package/dist/apis/AuctionsApi.d.ts +4 -4
- package/dist/apis/AuctionsApi.js +40 -24
- package/dist/apis/BankAccountsApi.d.ts +10 -10
- package/dist/apis/BankAccountsApi.js +100 -60
- package/dist/apis/ChallengesApi.d.ts +6 -6
- package/dist/apis/ChallengesApi.js +60 -36
- package/dist/apis/DomainTransfersApi.d.ts +2 -2
- package/dist/apis/DomainTransfersApi.js +20 -12
- package/dist/apis/DomainsApi.d.ts +44 -44
- package/dist/apis/DomainsApi.js +440 -264
- package/dist/apis/EppApi.d.ts +2 -2
- package/dist/apis/EppApi.js +20 -12
- package/dist/apis/InvoicesApi.d.ts +6 -6
- package/dist/apis/InvoicesApi.js +60 -36
- package/dist/apis/LeadsApi.d.ts +38 -38
- package/dist/apis/LeadsApi.js +380 -228
- package/dist/apis/MarketApi.d.ts +2 -2
- package/dist/apis/MarketApi.js +2 -2
- package/dist/apis/NotificationsApi.d.ts +8 -8
- package/dist/apis/NotificationsApi.js +80 -48
- package/dist/apis/StatsApi.d.ts +14 -14
- package/dist/apis/StatsApi.js +140 -84
- package/dist/apis/SubscriptionsApi.d.ts +2 -2
- package/dist/apis/SubscriptionsApi.js +20 -12
- package/dist/apis/TasksApi.d.ts +6 -6
- package/dist/apis/TasksApi.js +60 -36
- package/dist/apis/UsersApi.d.ts +10 -10
- package/dist/apis/UsersApi.js +100 -60
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AdminDomainListItemDto.d.ts +6 -0
- package/dist/models/AdminDomainListItemDto.js +4 -0
- package/dist/models/ApiKeyDto.d.ts +107 -0
- package/dist/models/ApiKeyDto.js +114 -0
- package/dist/models/ApiKeyScopeDto.d.ts +83 -0
- package/dist/models/ApiKeyScopeDto.js +98 -0
- package/dist/models/CreateApiKeyInput.d.ts +83 -0
- package/dist/models/CreateApiKeyInput.js +96 -0
- package/dist/models/CreatedApiKeyDto.d.ts +113 -0
- package/dist/models/CreatedApiKeyDto.js +118 -0
- package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.js +4 -0
- package/dist/models/UpdateApiKeyInput.d.ts +77 -0
- package/dist/models/UpdateApiKeyInput.js +90 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/package.json +1 -1
- package/src/apis/APIKeysApi.ts +271 -0
- package/src/apis/AccountsApi.ts +108 -36
- package/src/apis/AdminApi.ts +92 -0
- package/src/apis/AuctionsApi.ts +12 -4
- package/src/apis/BankAccountsApi.ts +30 -10
- package/src/apis/ChallengesApi.ts +18 -6
- package/src/apis/DomainTransfersApi.ts +6 -2
- package/src/apis/DomainsApi.ts +132 -44
- package/src/apis/EppApi.ts +6 -2
- package/src/apis/InvoicesApi.ts +18 -6
- package/src/apis/LeadsApi.ts +114 -38
- package/src/apis/MarketApi.ts +2 -2
- package/src/apis/NotificationsApi.ts +24 -8
- package/src/apis/StatsApi.ts +42 -14
- package/src/apis/SubscriptionsApi.ts +6 -2
- package/src/apis/TasksApi.ts +18 -6
- package/src/apis/UsersApi.ts +30 -10
- package/src/apis/index.ts +1 -0
- package/src/models/AdminDomainListItemDto.ts +9 -0
- package/src/models/ApiKeyDto.ts +162 -0
- package/src/models/ApiKeyScopeDto.ts +126 -0
- package/src/models/CreateApiKeyInput.ts +125 -0
- package/src/models/CreatedApiKeyDto.ts +171 -0
- package/src/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithSeoMetricsDto.ts +9 -0
- package/src/models/UpdateApiKeyInput.ts +115 -0
- package/src/models/index.ts +5 -0
package/dist/apis/LeadsApi.js
CHANGED
|
@@ -76,44 +76,52 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Accepts the current buyer offer on the lead and advances the negotiation.
|
|
79
|
+
* Accepts the current buyer offer on the lead and advances the negotiation. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
80
80
|
* Accept the buyer offer
|
|
81
81
|
*/
|
|
82
82
|
LeadsApi.prototype.acceptLeadOfferRaw = function (requestParameters, initOverrides) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
85
|
-
return __generator(this, function (
|
|
86
|
-
switch (
|
|
84
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
85
|
+
return __generator(this, function (_c) {
|
|
86
|
+
switch (_c.label) {
|
|
87
87
|
case 0:
|
|
88
88
|
if (requestParameters['leadId'] == null) {
|
|
89
89
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling acceptLeadOffer().');
|
|
90
90
|
}
|
|
91
91
|
queryParameters = {};
|
|
92
92
|
headerParameters = {};
|
|
93
|
-
if (!(this.configuration && this.configuration.
|
|
93
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
94
|
+
_a = headerParameters;
|
|
95
|
+
_b = "apikey";
|
|
96
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
97
|
+
case 1:
|
|
98
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
99
|
+
_c.label = 2;
|
|
100
|
+
case 2:
|
|
101
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
94
102
|
token = this.configuration.accessToken;
|
|
95
103
|
return [4 /*yield*/, token("bearer", [])];
|
|
96
|
-
case
|
|
97
|
-
tokenString =
|
|
104
|
+
case 3:
|
|
105
|
+
tokenString = _c.sent();
|
|
98
106
|
if (tokenString) {
|
|
99
107
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
100
108
|
}
|
|
101
|
-
|
|
102
|
-
case
|
|
109
|
+
_c.label = 4;
|
|
110
|
+
case 4: return [4 /*yield*/, this.request({
|
|
103
111
|
path: "/private/leads/{leadId}/status/accept".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
104
112
|
method: 'POST',
|
|
105
113
|
headers: headerParameters,
|
|
106
114
|
query: queryParameters,
|
|
107
115
|
}, initOverrides)];
|
|
108
|
-
case
|
|
109
|
-
response =
|
|
116
|
+
case 5:
|
|
117
|
+
response = _c.sent();
|
|
110
118
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
111
119
|
}
|
|
112
120
|
});
|
|
113
121
|
});
|
|
114
122
|
};
|
|
115
123
|
/**
|
|
116
|
-
* Accepts the current buyer offer on the lead and advances the negotiation.
|
|
124
|
+
* Accepts the current buyer offer on the lead and advances the negotiation. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
117
125
|
* Accept the buyer offer
|
|
118
126
|
*/
|
|
119
127
|
LeadsApi.prototype.acceptLeadOffer = function (requestParameters, initOverrides) {
|
|
@@ -129,44 +137,52 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
129
137
|
});
|
|
130
138
|
};
|
|
131
139
|
/**
|
|
132
|
-
* Archives the lead for the seller, hiding it from the active leads list.
|
|
140
|
+
* Archives the lead for the seller, hiding it from the active leads list. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
133
141
|
* Archive a lead
|
|
134
142
|
*/
|
|
135
143
|
LeadsApi.prototype.archiveLeadRaw = function (requestParameters, initOverrides) {
|
|
136
144
|
return __awaiter(this, void 0, void 0, function () {
|
|
137
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
138
|
-
return __generator(this, function (
|
|
139
|
-
switch (
|
|
145
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
146
|
+
return __generator(this, function (_c) {
|
|
147
|
+
switch (_c.label) {
|
|
140
148
|
case 0:
|
|
141
149
|
if (requestParameters['leadId'] == null) {
|
|
142
150
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling archiveLead().');
|
|
143
151
|
}
|
|
144
152
|
queryParameters = {};
|
|
145
153
|
headerParameters = {};
|
|
146
|
-
if (!(this.configuration && this.configuration.
|
|
154
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
155
|
+
_a = headerParameters;
|
|
156
|
+
_b = "apikey";
|
|
157
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
158
|
+
case 1:
|
|
159
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
160
|
+
_c.label = 2;
|
|
161
|
+
case 2:
|
|
162
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
147
163
|
token = this.configuration.accessToken;
|
|
148
164
|
return [4 /*yield*/, token("bearer", [])];
|
|
149
|
-
case
|
|
150
|
-
tokenString =
|
|
165
|
+
case 3:
|
|
166
|
+
tokenString = _c.sent();
|
|
151
167
|
if (tokenString) {
|
|
152
168
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
153
169
|
}
|
|
154
|
-
|
|
155
|
-
case
|
|
170
|
+
_c.label = 4;
|
|
171
|
+
case 4: return [4 /*yield*/, this.request({
|
|
156
172
|
path: "/private/leads/{leadId}/status/archive-for-seller".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
157
173
|
method: 'POST',
|
|
158
174
|
headers: headerParameters,
|
|
159
175
|
query: queryParameters,
|
|
160
176
|
}, initOverrides)];
|
|
161
|
-
case
|
|
162
|
-
response =
|
|
177
|
+
case 5:
|
|
178
|
+
response = _c.sent();
|
|
163
179
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
164
180
|
}
|
|
165
181
|
});
|
|
166
182
|
});
|
|
167
183
|
};
|
|
168
184
|
/**
|
|
169
|
-
* Archives the lead for the seller, hiding it from the active leads list.
|
|
185
|
+
* Archives the lead for the seller, hiding it from the active leads list. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
170
186
|
* Archive a lead
|
|
171
187
|
*/
|
|
172
188
|
LeadsApi.prototype.archiveLead = function (requestParameters, initOverrides) {
|
|
@@ -182,14 +198,14 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
182
198
|
});
|
|
183
199
|
};
|
|
184
200
|
/**
|
|
185
|
-
* Marks multiple lead messages as read for the seller account.
|
|
201
|
+
* Marks multiple lead messages as read for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
186
202
|
* Mark lead messages as read
|
|
187
203
|
*/
|
|
188
204
|
LeadsApi.prototype.bulkReadSellerLeadMessageRaw = function (requestParameters, initOverrides) {
|
|
189
205
|
return __awaiter(this, void 0, void 0, function () {
|
|
190
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
191
|
-
return __generator(this, function (
|
|
192
|
-
switch (
|
|
206
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
207
|
+
return __generator(this, function (_c) {
|
|
208
|
+
switch (_c.label) {
|
|
193
209
|
case 0:
|
|
194
210
|
if (requestParameters['leadId'] == null) {
|
|
195
211
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling bulkReadSellerLeadMessage().');
|
|
@@ -200,31 +216,39 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
200
216
|
queryParameters = {};
|
|
201
217
|
headerParameters = {};
|
|
202
218
|
headerParameters['Content-Type'] = 'application/json';
|
|
203
|
-
if (!(this.configuration && this.configuration.
|
|
219
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
220
|
+
_a = headerParameters;
|
|
221
|
+
_b = "apikey";
|
|
222
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
223
|
+
case 1:
|
|
224
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
225
|
+
_c.label = 2;
|
|
226
|
+
case 2:
|
|
227
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
204
228
|
token = this.configuration.accessToken;
|
|
205
229
|
return [4 /*yield*/, token("bearer", [])];
|
|
206
|
-
case
|
|
207
|
-
tokenString =
|
|
230
|
+
case 3:
|
|
231
|
+
tokenString = _c.sent();
|
|
208
232
|
if (tokenString) {
|
|
209
233
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
210
234
|
}
|
|
211
|
-
|
|
212
|
-
case
|
|
235
|
+
_c.label = 4;
|
|
236
|
+
case 4: return [4 /*yield*/, this.request({
|
|
213
237
|
path: "/private/leads/{leadId}/messages/read".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
214
238
|
method: 'POST',
|
|
215
239
|
headers: headerParameters,
|
|
216
240
|
query: queryParameters,
|
|
217
241
|
body: (0, index_1.BatchReadSellerLeadMessageInputToJSON)(requestParameters['batchReadSellerLeadMessageInput']),
|
|
218
242
|
}, initOverrides)];
|
|
219
|
-
case
|
|
220
|
-
response =
|
|
243
|
+
case 5:
|
|
244
|
+
response = _c.sent();
|
|
221
245
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
222
246
|
}
|
|
223
247
|
});
|
|
224
248
|
});
|
|
225
249
|
};
|
|
226
250
|
/**
|
|
227
|
-
* Marks multiple lead messages as read for the seller account.
|
|
251
|
+
* Marks multiple lead messages as read for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
228
252
|
* Mark lead messages as read
|
|
229
253
|
*/
|
|
230
254
|
LeadsApi.prototype.bulkReadSellerLeadMessage = function (requestParameters, initOverrides) {
|
|
@@ -240,44 +264,52 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
240
264
|
});
|
|
241
265
|
};
|
|
242
266
|
/**
|
|
243
|
-
* Closes an active lead negotiation. Cannot close a lead accepted too recently.
|
|
267
|
+
* Closes an active lead negotiation. Cannot close a lead accepted too recently. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
244
268
|
* Close an active lead
|
|
245
269
|
*/
|
|
246
270
|
LeadsApi.prototype.closeLeadRaw = function (requestParameters, initOverrides) {
|
|
247
271
|
return __awaiter(this, void 0, void 0, function () {
|
|
248
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
249
|
-
return __generator(this, function (
|
|
250
|
-
switch (
|
|
272
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
273
|
+
return __generator(this, function (_c) {
|
|
274
|
+
switch (_c.label) {
|
|
251
275
|
case 0:
|
|
252
276
|
if (requestParameters['leadId'] == null) {
|
|
253
277
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling closeLead().');
|
|
254
278
|
}
|
|
255
279
|
queryParameters = {};
|
|
256
280
|
headerParameters = {};
|
|
257
|
-
if (!(this.configuration && this.configuration.
|
|
281
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
282
|
+
_a = headerParameters;
|
|
283
|
+
_b = "apikey";
|
|
284
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
285
|
+
case 1:
|
|
286
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
287
|
+
_c.label = 2;
|
|
288
|
+
case 2:
|
|
289
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
258
290
|
token = this.configuration.accessToken;
|
|
259
291
|
return [4 /*yield*/, token("bearer", [])];
|
|
260
|
-
case
|
|
261
|
-
tokenString =
|
|
292
|
+
case 3:
|
|
293
|
+
tokenString = _c.sent();
|
|
262
294
|
if (tokenString) {
|
|
263
295
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
264
296
|
}
|
|
265
|
-
|
|
266
|
-
case
|
|
297
|
+
_c.label = 4;
|
|
298
|
+
case 4: return [4 /*yield*/, this.request({
|
|
267
299
|
path: "/private/leads/{leadId}/status/close".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
268
300
|
method: 'POST',
|
|
269
301
|
headers: headerParameters,
|
|
270
302
|
query: queryParameters,
|
|
271
303
|
}, initOverrides)];
|
|
272
|
-
case
|
|
273
|
-
response =
|
|
304
|
+
case 5:
|
|
305
|
+
response = _c.sent();
|
|
274
306
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
275
307
|
}
|
|
276
308
|
});
|
|
277
309
|
});
|
|
278
310
|
};
|
|
279
311
|
/**
|
|
280
|
-
* Closes an active lead negotiation. Cannot close a lead accepted too recently.
|
|
312
|
+
* Closes an active lead negotiation. Cannot close a lead accepted too recently. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
281
313
|
* Close an active lead
|
|
282
314
|
*/
|
|
283
315
|
LeadsApi.prototype.closeLead = function (requestParameters, initOverrides) {
|
|
@@ -293,14 +325,14 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
293
325
|
});
|
|
294
326
|
};
|
|
295
327
|
/**
|
|
296
|
-
* Creates a lead manually on behalf of a buyer for a domain in the seller account.
|
|
328
|
+
* Creates a lead manually on behalf of a buyer for a domain in the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
297
329
|
* Create a manual lead
|
|
298
330
|
*/
|
|
299
331
|
LeadsApi.prototype.createManualLeadRaw = function (requestParameters, initOverrides) {
|
|
300
332
|
return __awaiter(this, void 0, void 0, function () {
|
|
301
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
302
|
-
return __generator(this, function (
|
|
303
|
-
switch (
|
|
333
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
334
|
+
return __generator(this, function (_c) {
|
|
335
|
+
switch (_c.label) {
|
|
304
336
|
case 0:
|
|
305
337
|
if (requestParameters['createManualLeadInput'] == null) {
|
|
306
338
|
throw new runtime.RequiredError('createManualLeadInput', 'Required parameter "createManualLeadInput" was null or undefined when calling createManualLead().');
|
|
@@ -308,31 +340,39 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
308
340
|
queryParameters = {};
|
|
309
341
|
headerParameters = {};
|
|
310
342
|
headerParameters['Content-Type'] = 'application/json';
|
|
311
|
-
if (!(this.configuration && this.configuration.
|
|
343
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
344
|
+
_a = headerParameters;
|
|
345
|
+
_b = "apikey";
|
|
346
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
347
|
+
case 1:
|
|
348
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
349
|
+
_c.label = 2;
|
|
350
|
+
case 2:
|
|
351
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
312
352
|
token = this.configuration.accessToken;
|
|
313
353
|
return [4 /*yield*/, token("bearer", [])];
|
|
314
|
-
case
|
|
315
|
-
tokenString =
|
|
354
|
+
case 3:
|
|
355
|
+
tokenString = _c.sent();
|
|
316
356
|
if (tokenString) {
|
|
317
357
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
318
358
|
}
|
|
319
|
-
|
|
320
|
-
case
|
|
359
|
+
_c.label = 4;
|
|
360
|
+
case 4: return [4 /*yield*/, this.request({
|
|
321
361
|
path: "/private/leads/manual",
|
|
322
362
|
method: 'POST',
|
|
323
363
|
headers: headerParameters,
|
|
324
364
|
query: queryParameters,
|
|
325
365
|
body: (0, index_1.CreateManualLeadInputToJSON)(requestParameters['createManualLeadInput']),
|
|
326
366
|
}, initOverrides)];
|
|
327
|
-
case
|
|
328
|
-
response =
|
|
367
|
+
case 5:
|
|
368
|
+
response = _c.sent();
|
|
329
369
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
330
370
|
}
|
|
331
371
|
});
|
|
332
372
|
});
|
|
333
373
|
};
|
|
334
374
|
/**
|
|
335
|
-
* Creates a lead manually on behalf of a buyer for a domain in the seller account.
|
|
375
|
+
* Creates a lead manually on behalf of a buyer for a domain in the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
336
376
|
* Create a manual lead
|
|
337
377
|
*/
|
|
338
378
|
LeadsApi.prototype.createManualLead = function (requestParameters, initOverrides) {
|
|
@@ -348,14 +388,14 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
348
388
|
});
|
|
349
389
|
};
|
|
350
390
|
/**
|
|
351
|
-
* Sends a message from the seller in the lead conversation thread.
|
|
391
|
+
* Sends a message from the seller in the lead conversation thread. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
352
392
|
* Create a lead message
|
|
353
393
|
*/
|
|
354
394
|
LeadsApi.prototype.createMessageRaw = function (requestParameters, initOverrides) {
|
|
355
395
|
return __awaiter(this, void 0, void 0, function () {
|
|
356
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
357
|
-
return __generator(this, function (
|
|
358
|
-
switch (
|
|
396
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
397
|
+
return __generator(this, function (_c) {
|
|
398
|
+
switch (_c.label) {
|
|
359
399
|
case 0:
|
|
360
400
|
if (requestParameters['leadId'] == null) {
|
|
361
401
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling createMessage().');
|
|
@@ -366,31 +406,39 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
366
406
|
queryParameters = {};
|
|
367
407
|
headerParameters = {};
|
|
368
408
|
headerParameters['Content-Type'] = 'application/json';
|
|
369
|
-
if (!(this.configuration && this.configuration.
|
|
409
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
410
|
+
_a = headerParameters;
|
|
411
|
+
_b = "apikey";
|
|
412
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
413
|
+
case 1:
|
|
414
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
415
|
+
_c.label = 2;
|
|
416
|
+
case 2:
|
|
417
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
370
418
|
token = this.configuration.accessToken;
|
|
371
419
|
return [4 /*yield*/, token("bearer", [])];
|
|
372
|
-
case
|
|
373
|
-
tokenString =
|
|
420
|
+
case 3:
|
|
421
|
+
tokenString = _c.sent();
|
|
374
422
|
if (tokenString) {
|
|
375
423
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
376
424
|
}
|
|
377
|
-
|
|
378
|
-
case
|
|
425
|
+
_c.label = 4;
|
|
426
|
+
case 4: return [4 /*yield*/, this.request({
|
|
379
427
|
path: "/private/leads/{leadId}/messages".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
380
428
|
method: 'POST',
|
|
381
429
|
headers: headerParameters,
|
|
382
430
|
query: queryParameters,
|
|
383
431
|
body: (0, index_1.CreateLeadMessageInputToJSON)(requestParameters['createLeadMessageInput']),
|
|
384
432
|
}, initOverrides)];
|
|
385
|
-
case
|
|
386
|
-
response =
|
|
433
|
+
case 5:
|
|
434
|
+
response = _c.sent();
|
|
387
435
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ObjectIdFromJSON)(jsonValue); })];
|
|
388
436
|
}
|
|
389
437
|
});
|
|
390
438
|
});
|
|
391
439
|
};
|
|
392
440
|
/**
|
|
393
|
-
* Sends a message from the seller in the lead conversation thread.
|
|
441
|
+
* Sends a message from the seller in the lead conversation thread. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
394
442
|
* Create a lead message
|
|
395
443
|
*/
|
|
396
444
|
LeadsApi.prototype.createMessage = function (requestParameters, initOverrides) {
|
|
@@ -408,44 +456,52 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
408
456
|
});
|
|
409
457
|
};
|
|
410
458
|
/**
|
|
411
|
-
* Returns lead information. Requires account ownership.
|
|
459
|
+
* Returns lead information. Requires account ownership. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
412
460
|
* Get lead details
|
|
413
461
|
*/
|
|
414
462
|
LeadsApi.prototype.getLeadRaw = function (requestParameters, initOverrides) {
|
|
415
463
|
return __awaiter(this, void 0, void 0, function () {
|
|
416
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
417
|
-
return __generator(this, function (
|
|
418
|
-
switch (
|
|
464
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
465
|
+
return __generator(this, function (_c) {
|
|
466
|
+
switch (_c.label) {
|
|
419
467
|
case 0:
|
|
420
468
|
if (requestParameters['leadId'] == null) {
|
|
421
469
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling getLead().');
|
|
422
470
|
}
|
|
423
471
|
queryParameters = {};
|
|
424
472
|
headerParameters = {};
|
|
425
|
-
if (!(this.configuration && this.configuration.
|
|
473
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
474
|
+
_a = headerParameters;
|
|
475
|
+
_b = "apikey";
|
|
476
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
477
|
+
case 1:
|
|
478
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
479
|
+
_c.label = 2;
|
|
480
|
+
case 2:
|
|
481
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
426
482
|
token = this.configuration.accessToken;
|
|
427
483
|
return [4 /*yield*/, token("bearer", [])];
|
|
428
|
-
case
|
|
429
|
-
tokenString =
|
|
484
|
+
case 3:
|
|
485
|
+
tokenString = _c.sent();
|
|
430
486
|
if (tokenString) {
|
|
431
487
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
432
488
|
}
|
|
433
|
-
|
|
434
|
-
case
|
|
489
|
+
_c.label = 4;
|
|
490
|
+
case 4: return [4 /*yield*/, this.request({
|
|
435
491
|
path: "/private/leads/{leadId}".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
436
492
|
method: 'GET',
|
|
437
493
|
headers: headerParameters,
|
|
438
494
|
query: queryParameters,
|
|
439
495
|
}, initOverrides)];
|
|
440
|
-
case
|
|
441
|
-
response =
|
|
496
|
+
case 5:
|
|
497
|
+
response = _c.sent();
|
|
442
498
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SellerLeadDetailsFromJSON)(jsonValue); })];
|
|
443
499
|
}
|
|
444
500
|
});
|
|
445
501
|
});
|
|
446
502
|
};
|
|
447
503
|
/**
|
|
448
|
-
* Returns lead information. Requires account ownership.
|
|
504
|
+
* Returns lead information. Requires account ownership. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
449
505
|
* Get lead details
|
|
450
506
|
*/
|
|
451
507
|
LeadsApi.prototype.getLead = function (requestParameters, initOverrides) {
|
|
@@ -463,41 +519,49 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
463
519
|
});
|
|
464
520
|
};
|
|
465
521
|
/**
|
|
466
|
-
* Returns configuration presets for lead offers.
|
|
522
|
+
* Returns configuration presets for lead offers. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
467
523
|
* Get lease-to-own configuration presets
|
|
468
524
|
*/
|
|
469
525
|
LeadsApi.prototype.getLeadLeaseToOwnConfigurationPresetsRaw = function (initOverrides) {
|
|
470
526
|
return __awaiter(this, void 0, void 0, function () {
|
|
471
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
472
|
-
return __generator(this, function (
|
|
473
|
-
switch (
|
|
527
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
528
|
+
return __generator(this, function (_c) {
|
|
529
|
+
switch (_c.label) {
|
|
474
530
|
case 0:
|
|
475
531
|
queryParameters = {};
|
|
476
532
|
headerParameters = {};
|
|
477
|
-
if (!(this.configuration && this.configuration.
|
|
533
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
534
|
+
_a = headerParameters;
|
|
535
|
+
_b = "apikey";
|
|
536
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
537
|
+
case 1:
|
|
538
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
539
|
+
_c.label = 2;
|
|
540
|
+
case 2:
|
|
541
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
478
542
|
token = this.configuration.accessToken;
|
|
479
543
|
return [4 /*yield*/, token("bearer", [])];
|
|
480
|
-
case
|
|
481
|
-
tokenString =
|
|
544
|
+
case 3:
|
|
545
|
+
tokenString = _c.sent();
|
|
482
546
|
if (tokenString) {
|
|
483
547
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
484
548
|
}
|
|
485
|
-
|
|
486
|
-
case
|
|
549
|
+
_c.label = 4;
|
|
550
|
+
case 4: return [4 /*yield*/, this.request({
|
|
487
551
|
path: "/private/leads/lease-to-own-configuration-presets",
|
|
488
552
|
method: 'GET',
|
|
489
553
|
headers: headerParameters,
|
|
490
554
|
query: queryParameters,
|
|
491
555
|
}, initOverrides)];
|
|
492
|
-
case
|
|
493
|
-
response =
|
|
556
|
+
case 5:
|
|
557
|
+
response = _c.sent();
|
|
494
558
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LeadLeaseToOwnAndRentConfigurationPresetsDtoFromJSON)(jsonValue); })];
|
|
495
559
|
}
|
|
496
560
|
});
|
|
497
561
|
});
|
|
498
562
|
};
|
|
499
563
|
/**
|
|
500
|
-
* Returns configuration presets for lead offers.
|
|
564
|
+
* Returns configuration presets for lead offers. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
501
565
|
* Get lease-to-own configuration presets
|
|
502
566
|
*/
|
|
503
567
|
LeadsApi.prototype.getLeadLeaseToOwnConfigurationPresets = function (initOverrides) {
|
|
@@ -515,44 +579,52 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
515
579
|
});
|
|
516
580
|
};
|
|
517
581
|
/**
|
|
518
|
-
* Returns manual lead information. Requires account ownership.
|
|
582
|
+
* Returns manual lead information. Requires account ownership. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
519
583
|
* Get manual lead details
|
|
520
584
|
*/
|
|
521
585
|
LeadsApi.prototype.getManualLeadRaw = function (requestParameters, initOverrides) {
|
|
522
586
|
return __awaiter(this, void 0, void 0, function () {
|
|
523
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
524
|
-
return __generator(this, function (
|
|
525
|
-
switch (
|
|
587
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
588
|
+
return __generator(this, function (_c) {
|
|
589
|
+
switch (_c.label) {
|
|
526
590
|
case 0:
|
|
527
591
|
if (requestParameters['leadId'] == null) {
|
|
528
592
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling getManualLead().');
|
|
529
593
|
}
|
|
530
594
|
queryParameters = {};
|
|
531
595
|
headerParameters = {};
|
|
532
|
-
if (!(this.configuration && this.configuration.
|
|
596
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
597
|
+
_a = headerParameters;
|
|
598
|
+
_b = "apikey";
|
|
599
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
600
|
+
case 1:
|
|
601
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
602
|
+
_c.label = 2;
|
|
603
|
+
case 2:
|
|
604
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
533
605
|
token = this.configuration.accessToken;
|
|
534
606
|
return [4 /*yield*/, token("bearer", [])];
|
|
535
|
-
case
|
|
536
|
-
tokenString =
|
|
607
|
+
case 3:
|
|
608
|
+
tokenString = _c.sent();
|
|
537
609
|
if (tokenString) {
|
|
538
610
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
539
611
|
}
|
|
540
|
-
|
|
541
|
-
case
|
|
612
|
+
_c.label = 4;
|
|
613
|
+
case 4: return [4 /*yield*/, this.request({
|
|
542
614
|
path: "/private/leads/manual/{leadId}".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
543
615
|
method: 'GET',
|
|
544
616
|
headers: headerParameters,
|
|
545
617
|
query: queryParameters,
|
|
546
618
|
}, initOverrides)];
|
|
547
|
-
case
|
|
548
|
-
response =
|
|
619
|
+
case 5:
|
|
620
|
+
response = _c.sent();
|
|
549
621
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDtoFromJSON)(jsonValue); })];
|
|
550
622
|
}
|
|
551
623
|
});
|
|
552
624
|
});
|
|
553
625
|
};
|
|
554
626
|
/**
|
|
555
|
-
* Returns manual lead information. Requires account ownership.
|
|
627
|
+
* Returns manual lead information. Requires account ownership. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
556
628
|
* Get manual lead details
|
|
557
629
|
*/
|
|
558
630
|
LeadsApi.prototype.getManualLead = function (requestParameters, initOverrides) {
|
|
@@ -570,44 +642,52 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
570
642
|
});
|
|
571
643
|
};
|
|
572
644
|
/**
|
|
573
|
-
* Lists messages in the lead conversation. Requires account ownership.
|
|
645
|
+
* Lists messages in the lead conversation. Requires account ownership. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
574
646
|
* List lead messages
|
|
575
647
|
*/
|
|
576
648
|
LeadsApi.prototype.getMessagesRaw = function (requestParameters, initOverrides) {
|
|
577
649
|
return __awaiter(this, void 0, void 0, function () {
|
|
578
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
579
|
-
return __generator(this, function (
|
|
580
|
-
switch (
|
|
650
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
651
|
+
return __generator(this, function (_c) {
|
|
652
|
+
switch (_c.label) {
|
|
581
653
|
case 0:
|
|
582
654
|
if (requestParameters['leadId'] == null) {
|
|
583
655
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling getMessages().');
|
|
584
656
|
}
|
|
585
657
|
queryParameters = {};
|
|
586
658
|
headerParameters = {};
|
|
587
|
-
if (!(this.configuration && this.configuration.
|
|
659
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
660
|
+
_a = headerParameters;
|
|
661
|
+
_b = "apikey";
|
|
662
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
663
|
+
case 1:
|
|
664
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
665
|
+
_c.label = 2;
|
|
666
|
+
case 2:
|
|
667
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
588
668
|
token = this.configuration.accessToken;
|
|
589
669
|
return [4 /*yield*/, token("bearer", [])];
|
|
590
|
-
case
|
|
591
|
-
tokenString =
|
|
670
|
+
case 3:
|
|
671
|
+
tokenString = _c.sent();
|
|
592
672
|
if (tokenString) {
|
|
593
673
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
594
674
|
}
|
|
595
|
-
|
|
596
|
-
case
|
|
675
|
+
_c.label = 4;
|
|
676
|
+
case 4: return [4 /*yield*/, this.request({
|
|
597
677
|
path: "/private/leads/{leadId}/messages".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
598
678
|
method: 'GET',
|
|
599
679
|
headers: headerParameters,
|
|
600
680
|
query: queryParameters,
|
|
601
681
|
}, initOverrides)];
|
|
602
|
-
case
|
|
603
|
-
response =
|
|
682
|
+
case 5:
|
|
683
|
+
response = _c.sent();
|
|
604
684
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ListLeadMessagesDtoFromJSON)(jsonValue); })];
|
|
605
685
|
}
|
|
606
686
|
});
|
|
607
687
|
});
|
|
608
688
|
};
|
|
609
689
|
/**
|
|
610
|
-
* Lists messages in the lead conversation. Requires account ownership.
|
|
690
|
+
* Lists messages in the lead conversation. Requires account ownership. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
611
691
|
* List lead messages
|
|
612
692
|
*/
|
|
613
693
|
LeadsApi.prototype.getMessages = function (requestParameters, initOverrides) {
|
|
@@ -625,14 +705,14 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
625
705
|
});
|
|
626
706
|
};
|
|
627
707
|
/**
|
|
628
|
-
* Lists leads for the seller account.
|
|
708
|
+
* Lists leads for the seller account. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
629
709
|
* List seller leads
|
|
630
710
|
*/
|
|
631
711
|
LeadsApi.prototype.listRaw = function (requestParameters, initOverrides) {
|
|
632
712
|
return __awaiter(this, void 0, void 0, function () {
|
|
633
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
634
|
-
return __generator(this, function (
|
|
635
|
-
switch (
|
|
713
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
714
|
+
return __generator(this, function (_c) {
|
|
715
|
+
switch (_c.label) {
|
|
636
716
|
case 0:
|
|
637
717
|
queryParameters = {};
|
|
638
718
|
if (requestParameters['filter'] != null) {
|
|
@@ -657,30 +737,38 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
657
737
|
queryParameters['filter[domainId]'] = requestParameters['filterDomainId'];
|
|
658
738
|
}
|
|
659
739
|
headerParameters = {};
|
|
660
|
-
if (!(this.configuration && this.configuration.
|
|
740
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
741
|
+
_a = headerParameters;
|
|
742
|
+
_b = "apikey";
|
|
743
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
744
|
+
case 1:
|
|
745
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
746
|
+
_c.label = 2;
|
|
747
|
+
case 2:
|
|
748
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
661
749
|
token = this.configuration.accessToken;
|
|
662
750
|
return [4 /*yield*/, token("bearer", [])];
|
|
663
|
-
case
|
|
664
|
-
tokenString =
|
|
751
|
+
case 3:
|
|
752
|
+
tokenString = _c.sent();
|
|
665
753
|
if (tokenString) {
|
|
666
754
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
667
755
|
}
|
|
668
|
-
|
|
669
|
-
case
|
|
756
|
+
_c.label = 4;
|
|
757
|
+
case 4: return [4 /*yield*/, this.request({
|
|
670
758
|
path: "/private/leads",
|
|
671
759
|
method: 'GET',
|
|
672
760
|
headers: headerParameters,
|
|
673
761
|
query: queryParameters,
|
|
674
762
|
}, initOverrides)];
|
|
675
|
-
case
|
|
676
|
-
response =
|
|
763
|
+
case 5:
|
|
764
|
+
response = _c.sent();
|
|
677
765
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.List200ResponseFromJSON)(jsonValue); })];
|
|
678
766
|
}
|
|
679
767
|
});
|
|
680
768
|
});
|
|
681
769
|
};
|
|
682
770
|
/**
|
|
683
|
-
* Lists leads for the seller account.
|
|
771
|
+
* Lists leads for the seller account. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
684
772
|
* List seller leads
|
|
685
773
|
*/
|
|
686
774
|
LeadsApi.prototype.list = function () {
|
|
@@ -699,14 +787,14 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
699
787
|
});
|
|
700
788
|
};
|
|
701
789
|
/**
|
|
702
|
-
* Lists leads related to the specified lead.
|
|
790
|
+
* Lists leads related to the specified lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
703
791
|
* List related leads
|
|
704
792
|
*/
|
|
705
793
|
LeadsApi.prototype.listRelatedLeadsRaw = function (requestParameters, initOverrides) {
|
|
706
794
|
return __awaiter(this, void 0, void 0, function () {
|
|
707
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
708
|
-
return __generator(this, function (
|
|
709
|
-
switch (
|
|
795
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
796
|
+
return __generator(this, function (_c) {
|
|
797
|
+
switch (_c.label) {
|
|
710
798
|
case 0:
|
|
711
799
|
if (requestParameters['leadId'] == null) {
|
|
712
800
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling listRelatedLeads().');
|
|
@@ -728,30 +816,38 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
728
816
|
queryParameters['filter[status]'] = requestParameters['filterStatus'];
|
|
729
817
|
}
|
|
730
818
|
headerParameters = {};
|
|
731
|
-
if (!(this.configuration && this.configuration.
|
|
819
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
820
|
+
_a = headerParameters;
|
|
821
|
+
_b = "apikey";
|
|
822
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
823
|
+
case 1:
|
|
824
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
825
|
+
_c.label = 2;
|
|
826
|
+
case 2:
|
|
827
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
732
828
|
token = this.configuration.accessToken;
|
|
733
829
|
return [4 /*yield*/, token("bearer", [])];
|
|
734
|
-
case
|
|
735
|
-
tokenString =
|
|
830
|
+
case 3:
|
|
831
|
+
tokenString = _c.sent();
|
|
736
832
|
if (tokenString) {
|
|
737
833
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
738
834
|
}
|
|
739
|
-
|
|
740
|
-
case
|
|
835
|
+
_c.label = 4;
|
|
836
|
+
case 4: return [4 /*yield*/, this.request({
|
|
741
837
|
path: "/private/leads/{leadId}/related".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
742
838
|
method: 'GET',
|
|
743
839
|
headers: headerParameters,
|
|
744
840
|
query: queryParameters,
|
|
745
841
|
}, initOverrides)];
|
|
746
|
-
case
|
|
747
|
-
response =
|
|
842
|
+
case 5:
|
|
843
|
+
response = _c.sent();
|
|
748
844
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ListRelatedLeads200ResponseFromJSON)(jsonValue); })];
|
|
749
845
|
}
|
|
750
846
|
});
|
|
751
847
|
});
|
|
752
848
|
};
|
|
753
849
|
/**
|
|
754
|
-
* Lists leads related to the specified lead.
|
|
850
|
+
* Lists leads related to the specified lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
755
851
|
* List related leads
|
|
756
852
|
*/
|
|
757
853
|
LeadsApi.prototype.listRelatedLeads = function (requestParameters, initOverrides) {
|
|
@@ -769,44 +865,52 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
769
865
|
});
|
|
770
866
|
};
|
|
771
867
|
/**
|
|
772
|
-
* Pauses the AI price negotiator agent for the lead.
|
|
868
|
+
* Pauses the AI price negotiator agent for the lead. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
773
869
|
* Pause AI price negotiator
|
|
774
870
|
*/
|
|
775
871
|
LeadsApi.prototype.pauseLeadPriceNegotiatorAgentRaw = function (requestParameters, initOverrides) {
|
|
776
872
|
return __awaiter(this, void 0, void 0, function () {
|
|
777
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
778
|
-
return __generator(this, function (
|
|
779
|
-
switch (
|
|
873
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
874
|
+
return __generator(this, function (_c) {
|
|
875
|
+
switch (_c.label) {
|
|
780
876
|
case 0:
|
|
781
877
|
if (requestParameters['leadId'] == null) {
|
|
782
878
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling pauseLeadPriceNegotiatorAgent().');
|
|
783
879
|
}
|
|
784
880
|
queryParameters = {};
|
|
785
881
|
headerParameters = {};
|
|
786
|
-
if (!(this.configuration && this.configuration.
|
|
882
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
883
|
+
_a = headerParameters;
|
|
884
|
+
_b = "apikey";
|
|
885
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
886
|
+
case 1:
|
|
887
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
888
|
+
_c.label = 2;
|
|
889
|
+
case 2:
|
|
890
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
787
891
|
token = this.configuration.accessToken;
|
|
788
892
|
return [4 /*yield*/, token("bearer", [])];
|
|
789
|
-
case
|
|
790
|
-
tokenString =
|
|
893
|
+
case 3:
|
|
894
|
+
tokenString = _c.sent();
|
|
791
895
|
if (tokenString) {
|
|
792
896
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
793
897
|
}
|
|
794
|
-
|
|
795
|
-
case
|
|
898
|
+
_c.label = 4;
|
|
899
|
+
case 4: return [4 /*yield*/, this.request({
|
|
796
900
|
path: "/private/leads/{leadId}/price-negotiator-agent/pause".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
797
901
|
method: 'POST',
|
|
798
902
|
headers: headerParameters,
|
|
799
903
|
query: queryParameters,
|
|
800
904
|
}, initOverrides)];
|
|
801
|
-
case
|
|
802
|
-
response =
|
|
905
|
+
case 5:
|
|
906
|
+
response = _c.sent();
|
|
803
907
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
804
908
|
}
|
|
805
909
|
});
|
|
806
910
|
});
|
|
807
911
|
};
|
|
808
912
|
/**
|
|
809
|
-
* Pauses the AI price negotiator agent for the lead.
|
|
913
|
+
* Pauses the AI price negotiator agent for the lead. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
810
914
|
* Pause AI price negotiator
|
|
811
915
|
*/
|
|
812
916
|
LeadsApi.prototype.pauseLeadPriceNegotiatorAgent = function (requestParameters, initOverrides) {
|
|
@@ -822,14 +926,14 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
822
926
|
});
|
|
823
927
|
};
|
|
824
928
|
/**
|
|
825
|
-
* Sets or updates the seller counter-offer on a lead.
|
|
929
|
+
* Sets or updates the seller counter-offer on a lead. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
826
930
|
* Submit a seller counter-offer
|
|
827
931
|
*/
|
|
828
932
|
LeadsApi.prototype.putOfferRaw = function (requestParameters, initOverrides) {
|
|
829
933
|
return __awaiter(this, void 0, void 0, function () {
|
|
830
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
831
|
-
return __generator(this, function (
|
|
832
|
-
switch (
|
|
934
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
935
|
+
return __generator(this, function (_c) {
|
|
936
|
+
switch (_c.label) {
|
|
833
937
|
case 0:
|
|
834
938
|
if (requestParameters['leadId'] == null) {
|
|
835
939
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling putOffer().');
|
|
@@ -840,31 +944,39 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
840
944
|
queryParameters = {};
|
|
841
945
|
headerParameters = {};
|
|
842
946
|
headerParameters['Content-Type'] = 'application/json';
|
|
843
|
-
if (!(this.configuration && this.configuration.
|
|
947
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
948
|
+
_a = headerParameters;
|
|
949
|
+
_b = "apikey";
|
|
950
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
951
|
+
case 1:
|
|
952
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
953
|
+
_c.label = 2;
|
|
954
|
+
case 2:
|
|
955
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
844
956
|
token = this.configuration.accessToken;
|
|
845
957
|
return [4 /*yield*/, token("bearer", [])];
|
|
846
|
-
case
|
|
847
|
-
tokenString =
|
|
958
|
+
case 3:
|
|
959
|
+
tokenString = _c.sent();
|
|
848
960
|
if (tokenString) {
|
|
849
961
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
850
962
|
}
|
|
851
|
-
|
|
852
|
-
case
|
|
963
|
+
_c.label = 4;
|
|
964
|
+
case 4: return [4 /*yield*/, this.request({
|
|
853
965
|
path: "/private/leads/{leadId}/offer".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
854
966
|
method: 'PUT',
|
|
855
967
|
headers: headerParameters,
|
|
856
968
|
query: queryParameters,
|
|
857
969
|
body: (0, index_1.PutLeadOfferInputToJSON)(requestParameters['putLeadOfferInput']),
|
|
858
970
|
}, initOverrides)];
|
|
859
|
-
case
|
|
860
|
-
response =
|
|
971
|
+
case 5:
|
|
972
|
+
response = _c.sent();
|
|
861
973
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
862
974
|
}
|
|
863
975
|
});
|
|
864
976
|
});
|
|
865
977
|
};
|
|
866
978
|
/**
|
|
867
|
-
* Sets or updates the seller counter-offer on a lead.
|
|
979
|
+
* Sets or updates the seller counter-offer on a lead. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
868
980
|
* Submit a seller counter-offer
|
|
869
981
|
*/
|
|
870
982
|
LeadsApi.prototype.putOffer = function (requestParameters, initOverrides) {
|
|
@@ -880,44 +992,52 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
880
992
|
});
|
|
881
993
|
};
|
|
882
994
|
/**
|
|
883
|
-
* Resumes a paused AI price negotiator agent for the lead.
|
|
995
|
+
* Resumes a paused AI price negotiator agent for the lead. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
884
996
|
* Resume AI price negotiator
|
|
885
997
|
*/
|
|
886
998
|
LeadsApi.prototype.resumeLeadPriceNegotiatorAgentRaw = function (requestParameters, initOverrides) {
|
|
887
999
|
return __awaiter(this, void 0, void 0, function () {
|
|
888
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
889
|
-
return __generator(this, function (
|
|
890
|
-
switch (
|
|
1000
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1001
|
+
return __generator(this, function (_c) {
|
|
1002
|
+
switch (_c.label) {
|
|
891
1003
|
case 0:
|
|
892
1004
|
if (requestParameters['leadId'] == null) {
|
|
893
1005
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling resumeLeadPriceNegotiatorAgent().');
|
|
894
1006
|
}
|
|
895
1007
|
queryParameters = {};
|
|
896
1008
|
headerParameters = {};
|
|
897
|
-
if (!(this.configuration && this.configuration.
|
|
1009
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1010
|
+
_a = headerParameters;
|
|
1011
|
+
_b = "apikey";
|
|
1012
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1013
|
+
case 1:
|
|
1014
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1015
|
+
_c.label = 2;
|
|
1016
|
+
case 2:
|
|
1017
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
898
1018
|
token = this.configuration.accessToken;
|
|
899
1019
|
return [4 /*yield*/, token("bearer", [])];
|
|
900
|
-
case
|
|
901
|
-
tokenString =
|
|
1020
|
+
case 3:
|
|
1021
|
+
tokenString = _c.sent();
|
|
902
1022
|
if (tokenString) {
|
|
903
1023
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
904
1024
|
}
|
|
905
|
-
|
|
906
|
-
case
|
|
1025
|
+
_c.label = 4;
|
|
1026
|
+
case 4: return [4 /*yield*/, this.request({
|
|
907
1027
|
path: "/private/leads/{leadId}/price-negotiator-agent/resume".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
908
1028
|
method: 'POST',
|
|
909
1029
|
headers: headerParameters,
|
|
910
1030
|
query: queryParameters,
|
|
911
1031
|
}, initOverrides)];
|
|
912
|
-
case
|
|
913
|
-
response =
|
|
1032
|
+
case 5:
|
|
1033
|
+
response = _c.sent();
|
|
914
1034
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
915
1035
|
}
|
|
916
1036
|
});
|
|
917
1037
|
});
|
|
918
1038
|
};
|
|
919
1039
|
/**
|
|
920
|
-
* Resumes a paused AI price negotiator agent for the lead.
|
|
1040
|
+
* Resumes a paused AI price negotiator agent for the lead. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
921
1041
|
* Resume AI price negotiator
|
|
922
1042
|
*/
|
|
923
1043
|
LeadsApi.prototype.resumeLeadPriceNegotiatorAgent = function (requestParameters, initOverrides) {
|
|
@@ -933,44 +1053,52 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
933
1053
|
});
|
|
934
1054
|
};
|
|
935
1055
|
/**
|
|
936
|
-
* Restores a previously archived lead to the seller active leads list.
|
|
1056
|
+
* Restores a previously archived lead to the seller active leads list. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
937
1057
|
* Unarchive a lead
|
|
938
1058
|
*/
|
|
939
1059
|
LeadsApi.prototype.unarchiveLeadRaw = function (requestParameters, initOverrides) {
|
|
940
1060
|
return __awaiter(this, void 0, void 0, function () {
|
|
941
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
942
|
-
return __generator(this, function (
|
|
943
|
-
switch (
|
|
1061
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1062
|
+
return __generator(this, function (_c) {
|
|
1063
|
+
switch (_c.label) {
|
|
944
1064
|
case 0:
|
|
945
1065
|
if (requestParameters['leadId'] == null) {
|
|
946
1066
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling unarchiveLead().');
|
|
947
1067
|
}
|
|
948
1068
|
queryParameters = {};
|
|
949
1069
|
headerParameters = {};
|
|
950
|
-
if (!(this.configuration && this.configuration.
|
|
1070
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1071
|
+
_a = headerParameters;
|
|
1072
|
+
_b = "apikey";
|
|
1073
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1074
|
+
case 1:
|
|
1075
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1076
|
+
_c.label = 2;
|
|
1077
|
+
case 2:
|
|
1078
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
951
1079
|
token = this.configuration.accessToken;
|
|
952
1080
|
return [4 /*yield*/, token("bearer", [])];
|
|
953
|
-
case
|
|
954
|
-
tokenString =
|
|
1081
|
+
case 3:
|
|
1082
|
+
tokenString = _c.sent();
|
|
955
1083
|
if (tokenString) {
|
|
956
1084
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
957
1085
|
}
|
|
958
|
-
|
|
959
|
-
case
|
|
1086
|
+
_c.label = 4;
|
|
1087
|
+
case 4: return [4 /*yield*/, this.request({
|
|
960
1088
|
path: "/private/leads/{leadId}/status/unarchive-for-seller".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
961
1089
|
method: 'POST',
|
|
962
1090
|
headers: headerParameters,
|
|
963
1091
|
query: queryParameters,
|
|
964
1092
|
}, initOverrides)];
|
|
965
|
-
case
|
|
966
|
-
response =
|
|
1093
|
+
case 5:
|
|
1094
|
+
response = _c.sent();
|
|
967
1095
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
968
1096
|
}
|
|
969
1097
|
});
|
|
970
1098
|
});
|
|
971
1099
|
};
|
|
972
1100
|
/**
|
|
973
|
-
* Restores a previously archived lead to the seller active leads list.
|
|
1101
|
+
* Restores a previously archived lead to the seller active leads list. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
974
1102
|
* Unarchive a lead
|
|
975
1103
|
*/
|
|
976
1104
|
LeadsApi.prototype.unarchiveLead = function (requestParameters, initOverrides) {
|
|
@@ -986,14 +1114,14 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
986
1114
|
});
|
|
987
1115
|
};
|
|
988
1116
|
/**
|
|
989
|
-
* Updates the domain lock settings applied while the lead is active.
|
|
1117
|
+
* Updates the domain lock settings applied while the lead is active. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
990
1118
|
* Update domain lock configuration
|
|
991
1119
|
*/
|
|
992
1120
|
LeadsApi.prototype.updateLeadDomainLockConfigurationRaw = function (requestParameters, initOverrides) {
|
|
993
1121
|
return __awaiter(this, void 0, void 0, function () {
|
|
994
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
995
|
-
return __generator(this, function (
|
|
996
|
-
switch (
|
|
1122
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1123
|
+
return __generator(this, function (_c) {
|
|
1124
|
+
switch (_c.label) {
|
|
997
1125
|
case 0:
|
|
998
1126
|
if (requestParameters['leadId'] == null) {
|
|
999
1127
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling updateLeadDomainLockConfiguration().');
|
|
@@ -1004,31 +1132,39 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
1004
1132
|
queryParameters = {};
|
|
1005
1133
|
headerParameters = {};
|
|
1006
1134
|
headerParameters['Content-Type'] = 'application/json';
|
|
1007
|
-
if (!(this.configuration && this.configuration.
|
|
1135
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1136
|
+
_a = headerParameters;
|
|
1137
|
+
_b = "apikey";
|
|
1138
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1139
|
+
case 1:
|
|
1140
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1141
|
+
_c.label = 2;
|
|
1142
|
+
case 2:
|
|
1143
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
1008
1144
|
token = this.configuration.accessToken;
|
|
1009
1145
|
return [4 /*yield*/, token("bearer", [])];
|
|
1010
|
-
case
|
|
1011
|
-
tokenString =
|
|
1146
|
+
case 3:
|
|
1147
|
+
tokenString = _c.sent();
|
|
1012
1148
|
if (tokenString) {
|
|
1013
1149
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1014
1150
|
}
|
|
1015
|
-
|
|
1016
|
-
case
|
|
1151
|
+
_c.label = 4;
|
|
1152
|
+
case 4: return [4 /*yield*/, this.request({
|
|
1017
1153
|
path: "/private/leads/{leadId}/domain-lock-configuration".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
1018
1154
|
method: 'PUT',
|
|
1019
1155
|
headers: headerParameters,
|
|
1020
1156
|
query: queryParameters,
|
|
1021
1157
|
body: (0, index_1.LockConfigurationInputToJSON)(requestParameters['lockConfigurationInput']),
|
|
1022
1158
|
}, initOverrides)];
|
|
1023
|
-
case
|
|
1024
|
-
response =
|
|
1159
|
+
case 5:
|
|
1160
|
+
response = _c.sent();
|
|
1025
1161
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
1026
1162
|
}
|
|
1027
1163
|
});
|
|
1028
1164
|
});
|
|
1029
1165
|
};
|
|
1030
1166
|
/**
|
|
1031
|
-
* Updates the domain lock settings applied while the lead is active.
|
|
1167
|
+
* Updates the domain lock settings applied while the lead is active. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1032
1168
|
* Update domain lock configuration
|
|
1033
1169
|
*/
|
|
1034
1170
|
LeadsApi.prototype.updateLeadDomainLockConfiguration = function (requestParameters, initOverrides) {
|
|
@@ -1044,14 +1180,14 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
1044
1180
|
});
|
|
1045
1181
|
};
|
|
1046
1182
|
/**
|
|
1047
|
-
* Updates whether the lead is muted for the seller user.
|
|
1183
|
+
* Updates whether the lead is muted for the seller user. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1048
1184
|
* Mute or unmute a lead
|
|
1049
1185
|
*/
|
|
1050
1186
|
LeadsApi.prototype.updateLeadMuteStatusRaw = function (requestParameters, initOverrides) {
|
|
1051
1187
|
return __awaiter(this, void 0, void 0, function () {
|
|
1052
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
1053
|
-
return __generator(this, function (
|
|
1054
|
-
switch (
|
|
1188
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1189
|
+
return __generator(this, function (_c) {
|
|
1190
|
+
switch (_c.label) {
|
|
1055
1191
|
case 0:
|
|
1056
1192
|
if (requestParameters['leadId'] == null) {
|
|
1057
1193
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling updateLeadMuteStatus().');
|
|
@@ -1062,31 +1198,39 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
1062
1198
|
queryParameters = {};
|
|
1063
1199
|
headerParameters = {};
|
|
1064
1200
|
headerParameters['Content-Type'] = 'application/json';
|
|
1065
|
-
if (!(this.configuration && this.configuration.
|
|
1201
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1202
|
+
_a = headerParameters;
|
|
1203
|
+
_b = "apikey";
|
|
1204
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1205
|
+
case 1:
|
|
1206
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1207
|
+
_c.label = 2;
|
|
1208
|
+
case 2:
|
|
1209
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
1066
1210
|
token = this.configuration.accessToken;
|
|
1067
1211
|
return [4 /*yield*/, token("bearer", [])];
|
|
1068
|
-
case
|
|
1069
|
-
tokenString =
|
|
1212
|
+
case 3:
|
|
1213
|
+
tokenString = _c.sent();
|
|
1070
1214
|
if (tokenString) {
|
|
1071
1215
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1072
1216
|
}
|
|
1073
|
-
|
|
1074
|
-
case
|
|
1217
|
+
_c.label = 4;
|
|
1218
|
+
case 4: return [4 /*yield*/, this.request({
|
|
1075
1219
|
path: "/private/leads/{leadId}/status/mute-for-seller".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
1076
1220
|
method: 'PUT',
|
|
1077
1221
|
headers: headerParameters,
|
|
1078
1222
|
query: queryParameters,
|
|
1079
1223
|
body: (0, index_1.UpdateLeadMuteStatusInputToJSON)(requestParameters['updateLeadMuteStatusInput']),
|
|
1080
1224
|
}, initOverrides)];
|
|
1081
|
-
case
|
|
1082
|
-
response =
|
|
1225
|
+
case 5:
|
|
1226
|
+
response = _c.sent();
|
|
1083
1227
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
1084
1228
|
}
|
|
1085
1229
|
});
|
|
1086
1230
|
});
|
|
1087
1231
|
};
|
|
1088
1232
|
/**
|
|
1089
|
-
* Updates whether the lead is muted for the seller user.
|
|
1233
|
+
* Updates whether the lead is muted for the seller user. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1090
1234
|
* Mute or unmute a lead
|
|
1091
1235
|
*/
|
|
1092
1236
|
LeadsApi.prototype.updateLeadMuteStatus = function (requestParameters, initOverrides) {
|
|
@@ -1102,14 +1246,14 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
1102
1246
|
});
|
|
1103
1247
|
};
|
|
1104
1248
|
/**
|
|
1105
|
-
* Updates when unanswered offers on the lead automatically expire.
|
|
1249
|
+
* Updates when unanswered offers on the lead automatically expire. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1106
1250
|
* Update offer expiration configuration
|
|
1107
1251
|
*/
|
|
1108
1252
|
LeadsApi.prototype.updateLeadOfferExpirationConfigurationRaw = function (requestParameters, initOverrides) {
|
|
1109
1253
|
return __awaiter(this, void 0, void 0, function () {
|
|
1110
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
1111
|
-
return __generator(this, function (
|
|
1112
|
-
switch (
|
|
1254
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1255
|
+
return __generator(this, function (_c) {
|
|
1256
|
+
switch (_c.label) {
|
|
1113
1257
|
case 0:
|
|
1114
1258
|
if (requestParameters['leadId'] == null) {
|
|
1115
1259
|
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling updateLeadOfferExpirationConfiguration().');
|
|
@@ -1120,31 +1264,39 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
1120
1264
|
queryParameters = {};
|
|
1121
1265
|
headerParameters = {};
|
|
1122
1266
|
headerParameters['Content-Type'] = 'application/json';
|
|
1123
|
-
if (!(this.configuration && this.configuration.
|
|
1267
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1268
|
+
_a = headerParameters;
|
|
1269
|
+
_b = "apikey";
|
|
1270
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1271
|
+
case 1:
|
|
1272
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1273
|
+
_c.label = 2;
|
|
1274
|
+
case 2:
|
|
1275
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
1124
1276
|
token = this.configuration.accessToken;
|
|
1125
1277
|
return [4 /*yield*/, token("bearer", [])];
|
|
1126
|
-
case
|
|
1127
|
-
tokenString =
|
|
1278
|
+
case 3:
|
|
1279
|
+
tokenString = _c.sent();
|
|
1128
1280
|
if (tokenString) {
|
|
1129
1281
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1130
1282
|
}
|
|
1131
|
-
|
|
1132
|
-
case
|
|
1283
|
+
_c.label = 4;
|
|
1284
|
+
case 4: return [4 /*yield*/, this.request({
|
|
1133
1285
|
path: "/private/leads/{leadId}/offer-expiration-configuration".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
1134
1286
|
method: 'PUT',
|
|
1135
1287
|
headers: headerParameters,
|
|
1136
1288
|
query: queryParameters,
|
|
1137
1289
|
body: (0, index_1.LeadOfferExpirationConfigurationInputToJSON)(requestParameters['leadOfferExpirationConfigurationInput']),
|
|
1138
1290
|
}, initOverrides)];
|
|
1139
|
-
case
|
|
1140
|
-
response =
|
|
1291
|
+
case 5:
|
|
1292
|
+
response = _c.sent();
|
|
1141
1293
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
1142
1294
|
}
|
|
1143
1295
|
});
|
|
1144
1296
|
});
|
|
1145
1297
|
};
|
|
1146
1298
|
/**
|
|
1147
|
-
* Updates when unanswered offers on the lead automatically expire.
|
|
1299
|
+
* Updates when unanswered offers on the lead automatically expire. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1148
1300
|
* Update offer expiration configuration
|
|
1149
1301
|
*/
|
|
1150
1302
|
LeadsApi.prototype.updateLeadOfferExpirationConfiguration = function (requestParameters, initOverrides) {
|