@randock/nameshift-api-client 0.0.538 → 0.0.540
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 +20 -0
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +36 -1
- package/dist/apis/AdminApi.js +136 -0
- package/dist/apis/BrokeredLeadsApi.d.ts +195 -0
- package/dist/apis/BrokeredLeadsApi.js +912 -0
- package/dist/apis/BrokeredLeadsPublicApi.d.ts +31 -0
- package/dist/apis/BrokeredLeadsPublicApi.js +126 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/models/AccountBrokerSettingsInput.d.ts +38 -0
- package/dist/models/AccountBrokerSettingsInput.js +51 -0
- package/dist/models/AccountDto.d.ts +12 -0
- package/dist/models/AccountDto.js +8 -0
- package/dist/models/AccountNameshiftCommissionBySubtypeDto.d.ts +1 -0
- package/dist/models/AccountNameshiftCommissionBySubtypeDto.js +2 -1
- package/dist/models/AccountNameshiftCommissionItemDto.d.ts +1 -0
- package/dist/models/AccountNameshiftCommissionItemDto.js +2 -1
- package/dist/models/AccountNameshiftCommissionReasonDto.d.ts +1 -0
- package/dist/models/AccountNameshiftCommissionReasonDto.js +2 -1
- package/dist/models/AccountNotificationDto.d.ts +1 -0
- package/dist/models/AccountNotificationDto.js +2 -1
- package/dist/models/AccountSettingsBrokerDto.d.ts +38 -0
- package/dist/models/AccountSettingsBrokerDto.js +55 -0
- package/dist/models/AccountSettingsDto.d.ts +7 -0
- package/dist/models/AccountSettingsDto.js +5 -0
- package/dist/models/AccountSettingsInput.d.ts +7 -0
- package/dist/models/AccountSettingsInput.js +3 -0
- package/dist/models/AdminBrokeredLeadDto.d.ts +248 -0
- package/dist/models/AdminBrokeredLeadDto.js +204 -0
- package/dist/models/AdminListBrokeredLeads200Response.d.ts +47 -0
- package/dist/models/AdminListBrokeredLeads200Response.js +62 -0
- package/dist/models/ApiKeyDto.d.ts +2 -0
- package/dist/models/ApiKeyDto.js +2 -0
- package/dist/models/ApiKeyScopeDto.d.ts +2 -0
- package/dist/models/ApiKeyScopeDto.js +2 -0
- package/dist/models/BrokerBrokeredLeadDto.d.ts +189 -0
- package/dist/models/BrokerBrokeredLeadDto.js +162 -0
- package/dist/models/BrokerCommissionInput.d.ts +52 -0
- package/dist/models/BrokerCommissionInput.js +63 -0
- package/dist/models/BrokeredLeadBreakdownDto.d.ts +58 -0
- package/dist/models/BrokeredLeadBreakdownDto.js +69 -0
- package/dist/models/BrokeredLeadBuyerContactDto.d.ts +50 -0
- package/dist/models/BrokeredLeadBuyerContactDto.js +63 -0
- package/dist/models/BrokeredLeadBuyerInput.d.ts +50 -0
- package/dist/models/BrokeredLeadBuyerInput.js +63 -0
- package/dist/models/BrokeredLeadCommissionDto.d.ts +71 -0
- package/dist/models/BrokeredLeadCommissionDto.js +80 -0
- package/dist/models/BrokeredLeadInvitationDto.d.ts +57 -0
- package/dist/models/BrokeredLeadInvitationDto.js +68 -0
- package/dist/models/BuyerInvoiceDto.d.ts +6 -0
- package/dist/models/BuyerInvoiceDto.js +4 -0
- package/dist/models/BuyerNotificationDto.d.ts +6 -0
- package/dist/models/BuyerNotificationDto.js +7 -1
- package/dist/models/BuyerNotificationListItemDto.d.ts +6 -0
- package/dist/models/BuyerNotificationListItemDto.js +7 -1
- package/dist/models/CommissionDto.d.ts +1 -0
- package/dist/models/CommissionDto.js +2 -1
- package/dist/models/CommissionPayloadInput.d.ts +1 -0
- package/dist/models/CommissionPayloadInput.js +2 -1
- package/dist/models/CommissionReasonDto.d.ts +1 -0
- package/dist/models/CommissionReasonDto.js +2 -1
- package/dist/models/CommissionSimulationItemInput.d.ts +1 -0
- package/dist/models/CommissionSimulationItemInput.js +2 -1
- package/dist/models/CreateApiKeyInput.d.ts +2 -0
- package/dist/models/CreateApiKeyInput.js +2 -0
- package/dist/models/CreateBrokeredLeadInput.d.ts +59 -0
- package/dist/models/CreateBrokeredLeadInput.js +68 -0
- package/dist/models/CreatedApiKeyDto.d.ts +2 -0
- package/dist/models/CreatedApiKeyDto.js +2 -0
- package/dist/models/CustomerSuccessListAccountDto.d.ts +6 -0
- package/dist/models/CustomerSuccessListAccountDto.js +4 -0
- package/dist/models/CustomerSuccessListAccountMetricsDto.d.ts +6 -0
- package/dist/models/CustomerSuccessListAccountMetricsDto.js +4 -0
- package/dist/models/DeclineBrokeredLeadInput.d.ts +32 -0
- package/dist/models/DeclineBrokeredLeadInput.js +49 -0
- package/dist/models/FeatureFlagListItemDto.d.ts +1 -0
- package/dist/models/FeatureFlagListItemDto.js +1 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +13 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +9 -0
- package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.d.ts +1 -1
- package/dist/models/InvoiceDto.d.ts +6 -0
- package/dist/models/InvoiceDto.js +4 -0
- package/dist/models/LeadBrokeredDealDto.d.ts +39 -0
- package/dist/models/LeadBrokeredDealDto.js +56 -0
- package/dist/models/ListAccountMetricsDto.d.ts +6 -0
- package/dist/models/ListAccountMetricsDto.js +4 -0
- package/dist/models/ListBrokerLeads200Response.d.ts +47 -0
- package/dist/models/ListBrokerLeads200Response.js +62 -0
- package/dist/models/ListLeadsResultItem.d.ts +7 -0
- package/dist/models/ListLeadsResultItem.js +5 -0
- package/dist/models/ManualLeadDetails.d.ts +7 -0
- package/dist/models/ManualLeadDetails.js +5 -0
- package/dist/models/OverrideBrokeredLeadNameshiftCommissionInput.d.ts +38 -0
- package/dist/models/OverrideBrokeredLeadNameshiftCommissionInput.js +55 -0
- package/dist/models/PrivateAccountGetMeResponse.d.ts +19 -0
- package/dist/models/PrivateAccountGetMeResponse.js +13 -0
- package/dist/models/RegisterAccountInput.d.ts +6 -0
- package/dist/models/RegisterAccountInput.js +2 -0
- package/dist/models/SellerBrokeredLeadDto.d.ts +114 -0
- package/dist/models/SellerBrokeredLeadDto.js +111 -0
- package/dist/models/SellerBrokeredLeadVerificationDto.d.ts +44 -0
- package/dist/models/SellerBrokeredLeadVerificationDto.js +59 -0
- package/dist/models/SellerInvoiceDto.d.ts +6 -0
- package/dist/models/SellerInvoiceDto.js +4 -0
- package/dist/models/SimulateCommissionInput.d.ts +1 -0
- package/dist/models/SimulateCommissionInput.js +2 -1
- package/dist/models/UpdateApiKeyInput.d.ts +2 -0
- package/dist/models/UpdateApiKeyInput.js +2 -0
- package/dist/models/UserNotificationDto.d.ts +6 -0
- package/dist/models/UserNotificationDto.js +7 -1
- package/dist/models/UserNotificationListItemDto.d.ts +6 -0
- package/dist/models/UserNotificationListItemDto.js +7 -1
- package/dist/models/WithSettingsInner.d.ts +11 -4
- package/dist/models/WithSettingsInner.js +9 -4
- package/dist/models/index.d.ts +18 -0
- package/dist/models/index.js +18 -0
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +145 -0
- package/src/apis/BrokeredLeadsApi.ts +740 -0
- package/src/apis/BrokeredLeadsPublicApi.ts +69 -0
- package/src/apis/index.ts +2 -0
- package/src/models/AccountBrokerSettingsInput.ts +73 -0
- package/src/models/AccountDto.ts +18 -0
- package/src/models/AccountNameshiftCommissionBySubtypeDto.ts +2 -1
- package/src/models/AccountNameshiftCommissionItemDto.ts +2 -1
- package/src/models/AccountNameshiftCommissionReasonDto.ts +2 -1
- package/src/models/AccountNotificationDto.ts +2 -1
- package/src/models/AccountSettingsBrokerDto.ts +75 -0
- package/src/models/AccountSettingsDto.ts +16 -0
- package/src/models/AccountSettingsInput.ts +15 -0
- package/src/models/AdminBrokeredLeadDto.ts +404 -0
- package/src/models/AdminListBrokeredLeads200Response.ts +106 -0
- package/src/models/ApiKeyDto.ts +2 -0
- package/src/models/ApiKeyScopeDto.ts +2 -0
- package/src/models/BrokerBrokeredLeadDto.ts +320 -0
- package/src/models/BrokerCommissionInput.ts +93 -0
- package/src/models/BrokeredLeadBreakdownDto.ts +117 -0
- package/src/models/BrokeredLeadBuyerContactDto.ts +93 -0
- package/src/models/BrokeredLeadBuyerInput.ts +93 -0
- package/src/models/BrokeredLeadCommissionDto.ts +130 -0
- package/src/models/BrokeredLeadInvitationDto.ts +110 -0
- package/src/models/BuyerInvoiceDto.ts +9 -0
- package/src/models/BuyerNotificationDto.ts +7 -1
- package/src/models/BuyerNotificationListItemDto.ts +7 -1
- package/src/models/CommissionDto.ts +2 -1
- package/src/models/CommissionPayloadInput.ts +2 -1
- package/src/models/CommissionReasonDto.ts +2 -1
- package/src/models/CommissionSimulationItemInput.ts +2 -1
- package/src/models/CreateApiKeyInput.ts +2 -0
- package/src/models/CreateBrokeredLeadInput.ts +123 -0
- package/src/models/CreatedApiKeyDto.ts +2 -0
- package/src/models/CustomerSuccessListAccountDto.ts +9 -0
- package/src/models/CustomerSuccessListAccountMetricsDto.ts +9 -0
- package/src/models/DeclineBrokeredLeadInput.ts +65 -0
- package/src/models/FeatureFlagListItemDto.ts +1 -0
- package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +19 -0
- package/src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts +1 -1
- package/src/models/InvoiceDto.ts +9 -0
- package/src/models/LeadBrokeredDealDto.ts +83 -0
- package/src/models/ListAccountMetricsDto.ts +9 -0
- package/src/models/ListBrokerLeads200Response.ts +106 -0
- package/src/models/ListLeadsResultItem.ts +16 -0
- package/src/models/ManualLeadDetails.ts +16 -0
- package/src/models/OverrideBrokeredLeadNameshiftCommissionInput.ts +75 -0
- package/src/models/PrivateAccountGetMeResponse.ts +28 -0
- package/src/models/RegisterAccountInput.ts +8 -0
- package/src/models/SellerBrokeredLeadDto.ts +215 -0
- package/src/models/SellerBrokeredLeadVerificationDto.ts +84 -0
- package/src/models/SellerInvoiceDto.ts +9 -0
- package/src/models/SimulateCommissionInput.ts +2 -1
- package/src/models/UpdateApiKeyInput.ts +2 -0
- package/src/models/UserNotificationDto.ts +7 -1
- package/src/models/UserNotificationListItemDto.ts +7 -1
- package/src/models/WithSettingsInner.ts +44 -28
- package/src/models/index.ts +18 -0
|
@@ -0,0 +1,912 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Nameshift
|
|
6
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
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
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
41
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
+
function step(op) {
|
|
44
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
+
switch (op[0]) {
|
|
49
|
+
case 0: case 1: t = op; break;
|
|
50
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
+
default:
|
|
54
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
+
if (t[2]) _.ops.pop();
|
|
59
|
+
_.trys.pop(); continue;
|
|
60
|
+
}
|
|
61
|
+
op = body.call(thisArg, _);
|
|
62
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.BrokeredLeadsApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var BrokeredLeadsApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(BrokeredLeadsApi, _super);
|
|
75
|
+
function BrokeredLeadsApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The seller agrees to the deal. It becomes a lead the buyer can pay as soon as the domain is verified as the seller’s and the seller account is verified; the domain is checked right away. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
80
|
+
* Approve a brokered deal
|
|
81
|
+
*/
|
|
82
|
+
BrokeredLeadsApi.prototype.approveSellerBrokeredLeadRaw = function (requestParameters, initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
85
|
+
return __generator(this, function (_c) {
|
|
86
|
+
switch (_c.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
if (requestParameters['brokeredLeadId'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('brokeredLeadId', 'Required parameter "brokeredLeadId" was null or undefined when calling approveSellerBrokeredLead().');
|
|
90
|
+
}
|
|
91
|
+
queryParameters = {};
|
|
92
|
+
headerParameters = {};
|
|
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];
|
|
102
|
+
token = this.configuration.accessToken;
|
|
103
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
104
|
+
case 3:
|
|
105
|
+
tokenString = _c.sent();
|
|
106
|
+
if (tokenString) {
|
|
107
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
108
|
+
}
|
|
109
|
+
_c.label = 4;
|
|
110
|
+
case 4: return [4 /*yield*/, this.request({
|
|
111
|
+
path: "/private/brokered-leads/{brokeredLeadId}/approve".replace("{".concat("brokeredLeadId", "}"), encodeURIComponent(String(requestParameters['brokeredLeadId']))),
|
|
112
|
+
method: 'POST',
|
|
113
|
+
headers: headerParameters,
|
|
114
|
+
query: queryParameters,
|
|
115
|
+
}, initOverrides)];
|
|
116
|
+
case 5:
|
|
117
|
+
response = _c.sent();
|
|
118
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* The seller agrees to the deal. It becomes a lead the buyer can pay as soon as the domain is verified as the seller’s and the seller account is verified; the domain is checked right away. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
125
|
+
* Approve a brokered deal
|
|
126
|
+
*/
|
|
127
|
+
BrokeredLeadsApi.prototype.approveSellerBrokeredLead = function (requestParameters, initOverrides) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
129
|
+
return __generator(this, function (_a) {
|
|
130
|
+
switch (_a.label) {
|
|
131
|
+
case 0: return [4 /*yield*/, this.approveSellerBrokeredLeadRaw(requestParameters, initOverrides)];
|
|
132
|
+
case 1:
|
|
133
|
+
_a.sent();
|
|
134
|
+
return [2 /*return*/];
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Withdraws a deal the seller has not completed yet. The seller signup link stops working. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
141
|
+
* Cancel a deal
|
|
142
|
+
*/
|
|
143
|
+
BrokeredLeadsApi.prototype.cancelBrokerLeadRaw = function (requestParameters, initOverrides) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
145
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
146
|
+
return __generator(this, function (_c) {
|
|
147
|
+
switch (_c.label) {
|
|
148
|
+
case 0:
|
|
149
|
+
if (requestParameters['brokeredLeadId'] == null) {
|
|
150
|
+
throw new runtime.RequiredError('brokeredLeadId', 'Required parameter "brokeredLeadId" was null or undefined when calling cancelBrokerLead().');
|
|
151
|
+
}
|
|
152
|
+
queryParameters = {};
|
|
153
|
+
headerParameters = {};
|
|
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];
|
|
163
|
+
token = this.configuration.accessToken;
|
|
164
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
165
|
+
case 3:
|
|
166
|
+
tokenString = _c.sent();
|
|
167
|
+
if (tokenString) {
|
|
168
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
169
|
+
}
|
|
170
|
+
_c.label = 4;
|
|
171
|
+
case 4: return [4 /*yield*/, this.request({
|
|
172
|
+
path: "/private/broker/leads/{brokeredLeadId}/cancel".replace("{".concat("brokeredLeadId", "}"), encodeURIComponent(String(requestParameters['brokeredLeadId']))),
|
|
173
|
+
method: 'POST',
|
|
174
|
+
headers: headerParameters,
|
|
175
|
+
query: queryParameters,
|
|
176
|
+
}, initOverrides)];
|
|
177
|
+
case 5:
|
|
178
|
+
response = _c.sent();
|
|
179
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Withdraws a deal the seller has not completed yet. The seller signup link stops working. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
186
|
+
* Cancel a deal
|
|
187
|
+
*/
|
|
188
|
+
BrokeredLeadsApi.prototype.cancelBrokerLead = function (requestParameters, initOverrides) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
190
|
+
return __generator(this, function (_a) {
|
|
191
|
+
switch (_a.label) {
|
|
192
|
+
case 0: return [4 /*yield*/, this.cancelBrokerLeadRaw(requestParameters, initOverrides)];
|
|
193
|
+
case 1:
|
|
194
|
+
_a.sent();
|
|
195
|
+
return [2 /*return*/];
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* For a seller who already has an account: the deal behind the link joins this account’s brokered deals and waits for the seller’s review. The domain is added to the account when no account has it. When another account holds it, this account claims it, and the domain moves over once its DNS names this account. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
202
|
+
* Take up a broker’s signup link with this account
|
|
203
|
+
*/
|
|
204
|
+
BrokeredLeadsApi.prototype.claimSellerBrokeredLeadInvitationRaw = function (requestParameters, initOverrides) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
206
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
207
|
+
return __generator(this, function (_c) {
|
|
208
|
+
switch (_c.label) {
|
|
209
|
+
case 0:
|
|
210
|
+
if (requestParameters['token'] == null) {
|
|
211
|
+
throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling claimSellerBrokeredLeadInvitation().');
|
|
212
|
+
}
|
|
213
|
+
queryParameters = {};
|
|
214
|
+
headerParameters = {};
|
|
215
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
216
|
+
_a = headerParameters;
|
|
217
|
+
_b = "apikey";
|
|
218
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
219
|
+
case 1:
|
|
220
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
221
|
+
_c.label = 2;
|
|
222
|
+
case 2:
|
|
223
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
224
|
+
token = this.configuration.accessToken;
|
|
225
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
226
|
+
case 3:
|
|
227
|
+
tokenString = _c.sent();
|
|
228
|
+
if (tokenString) {
|
|
229
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
230
|
+
}
|
|
231
|
+
_c.label = 4;
|
|
232
|
+
case 4: return [4 /*yield*/, this.request({
|
|
233
|
+
path: "/private/brokered-leads/invitations/{token}/claim".replace("{".concat("token", "}"), encodeURIComponent(String(requestParameters['token']))),
|
|
234
|
+
method: 'POST',
|
|
235
|
+
headers: headerParameters,
|
|
236
|
+
query: queryParameters,
|
|
237
|
+
}, initOverrides)];
|
|
238
|
+
case 5:
|
|
239
|
+
response = _c.sent();
|
|
240
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* For a seller who already has an account: the deal behind the link joins this account’s brokered deals and waits for the seller’s review. The domain is added to the account when no account has it. When another account holds it, this account claims it, and the domain moves over once its DNS names this account. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
247
|
+
* Take up a broker’s signup link with this account
|
|
248
|
+
*/
|
|
249
|
+
BrokeredLeadsApi.prototype.claimSellerBrokeredLeadInvitation = function (requestParameters, initOverrides) {
|
|
250
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
251
|
+
return __generator(this, function (_a) {
|
|
252
|
+
switch (_a.label) {
|
|
253
|
+
case 0: return [4 /*yield*/, this.claimSellerBrokeredLeadInvitationRaw(requestParameters, initOverrides)];
|
|
254
|
+
case 1:
|
|
255
|
+
_a.sent();
|
|
256
|
+
return [2 /*return*/];
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Records a sale the broker arranged. When the account that holds the domain has verified it through DNS, that seller finds the deal waiting for review. For any other domain the deal carries a link for the seller: whoever takes it up has to show through DNS that the domain is theirs. Nobody is emailed until the broker asks for it. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
263
|
+
* Bring in a deal as a broker
|
|
264
|
+
*/
|
|
265
|
+
BrokeredLeadsApi.prototype.createBrokerLeadRaw = function (requestParameters, initOverrides) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
267
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
268
|
+
return __generator(this, function (_c) {
|
|
269
|
+
switch (_c.label) {
|
|
270
|
+
case 0:
|
|
271
|
+
if (requestParameters['createBrokeredLeadInput'] == null) {
|
|
272
|
+
throw new runtime.RequiredError('createBrokeredLeadInput', 'Required parameter "createBrokeredLeadInput" was null or undefined when calling createBrokerLead().');
|
|
273
|
+
}
|
|
274
|
+
queryParameters = {};
|
|
275
|
+
headerParameters = {};
|
|
276
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
277
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
278
|
+
_a = headerParameters;
|
|
279
|
+
_b = "apikey";
|
|
280
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
281
|
+
case 1:
|
|
282
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
283
|
+
_c.label = 2;
|
|
284
|
+
case 2:
|
|
285
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
286
|
+
token = this.configuration.accessToken;
|
|
287
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
288
|
+
case 3:
|
|
289
|
+
tokenString = _c.sent();
|
|
290
|
+
if (tokenString) {
|
|
291
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
292
|
+
}
|
|
293
|
+
_c.label = 4;
|
|
294
|
+
case 4: return [4 /*yield*/, this.request({
|
|
295
|
+
path: "/private/broker/leads",
|
|
296
|
+
method: 'POST',
|
|
297
|
+
headers: headerParameters,
|
|
298
|
+
query: queryParameters,
|
|
299
|
+
body: (0, index_1.CreateBrokeredLeadInputToJSON)(requestParameters['createBrokeredLeadInput']),
|
|
300
|
+
}, initOverrides)];
|
|
301
|
+
case 5:
|
|
302
|
+
response = _c.sent();
|
|
303
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ObjectIdFromJSON)(jsonValue); })];
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Records a sale the broker arranged. When the account that holds the domain has verified it through DNS, that seller finds the deal waiting for review. For any other domain the deal carries a link for the seller: whoever takes it up has to show through DNS that the domain is theirs. Nobody is emailed until the broker asks for it. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
310
|
+
* Bring in a deal as a broker
|
|
311
|
+
*/
|
|
312
|
+
BrokeredLeadsApi.prototype.createBrokerLead = function (requestParameters, initOverrides) {
|
|
313
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
314
|
+
var response;
|
|
315
|
+
return __generator(this, function (_a) {
|
|
316
|
+
switch (_a.label) {
|
|
317
|
+
case 0: return [4 /*yield*/, this.createBrokerLeadRaw(requestParameters, initOverrides)];
|
|
318
|
+
case 1:
|
|
319
|
+
response = _a.sent();
|
|
320
|
+
return [4 /*yield*/, response.value()];
|
|
321
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* Declines a deal under review, or backs out of an approved deal that still waits for verification. The broker is told, along with the reason if given. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
328
|
+
* Decline a brokered deal
|
|
329
|
+
*/
|
|
330
|
+
BrokeredLeadsApi.prototype.declineSellerBrokeredLeadRaw = function (requestParameters, initOverrides) {
|
|
331
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
332
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
333
|
+
return __generator(this, function (_c) {
|
|
334
|
+
switch (_c.label) {
|
|
335
|
+
case 0:
|
|
336
|
+
if (requestParameters['brokeredLeadId'] == null) {
|
|
337
|
+
throw new runtime.RequiredError('brokeredLeadId', 'Required parameter "brokeredLeadId" was null or undefined when calling declineSellerBrokeredLead().');
|
|
338
|
+
}
|
|
339
|
+
if (requestParameters['declineBrokeredLeadInput'] == null) {
|
|
340
|
+
throw new runtime.RequiredError('declineBrokeredLeadInput', 'Required parameter "declineBrokeredLeadInput" was null or undefined when calling declineSellerBrokeredLead().');
|
|
341
|
+
}
|
|
342
|
+
queryParameters = {};
|
|
343
|
+
headerParameters = {};
|
|
344
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
345
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
346
|
+
_a = headerParameters;
|
|
347
|
+
_b = "apikey";
|
|
348
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
349
|
+
case 1:
|
|
350
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
351
|
+
_c.label = 2;
|
|
352
|
+
case 2:
|
|
353
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
354
|
+
token = this.configuration.accessToken;
|
|
355
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
356
|
+
case 3:
|
|
357
|
+
tokenString = _c.sent();
|
|
358
|
+
if (tokenString) {
|
|
359
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
360
|
+
}
|
|
361
|
+
_c.label = 4;
|
|
362
|
+
case 4: return [4 /*yield*/, this.request({
|
|
363
|
+
path: "/private/brokered-leads/{brokeredLeadId}/decline".replace("{".concat("brokeredLeadId", "}"), encodeURIComponent(String(requestParameters['brokeredLeadId']))),
|
|
364
|
+
method: 'POST',
|
|
365
|
+
headers: headerParameters,
|
|
366
|
+
query: queryParameters,
|
|
367
|
+
body: (0, index_1.DeclineBrokeredLeadInputToJSON)(requestParameters['declineBrokeredLeadInput']),
|
|
368
|
+
}, initOverrides)];
|
|
369
|
+
case 5:
|
|
370
|
+
response = _c.sent();
|
|
371
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
});
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* Declines a deal under review, or backs out of an approved deal that still waits for verification. The broker is told, along with the reason if given. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
378
|
+
* Decline a brokered deal
|
|
379
|
+
*/
|
|
380
|
+
BrokeredLeadsApi.prototype.declineSellerBrokeredLead = function (requestParameters, initOverrides) {
|
|
381
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
382
|
+
return __generator(this, function (_a) {
|
|
383
|
+
switch (_a.label) {
|
|
384
|
+
case 0: return [4 /*yield*/, this.declineSellerBrokeredLeadRaw(requestParameters, initOverrides)];
|
|
385
|
+
case 1:
|
|
386
|
+
_a.sent();
|
|
387
|
+
return [2 /*return*/];
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* **API key scope required:** `BROKERED_LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
394
|
+
* Get a deal brought in as a broker
|
|
395
|
+
*/
|
|
396
|
+
BrokeredLeadsApi.prototype.getBrokerLeadRaw = function (requestParameters, initOverrides) {
|
|
397
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
398
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
399
|
+
return __generator(this, function (_c) {
|
|
400
|
+
switch (_c.label) {
|
|
401
|
+
case 0:
|
|
402
|
+
if (requestParameters['brokeredLeadId'] == null) {
|
|
403
|
+
throw new runtime.RequiredError('brokeredLeadId', 'Required parameter "brokeredLeadId" was null or undefined when calling getBrokerLead().');
|
|
404
|
+
}
|
|
405
|
+
queryParameters = {};
|
|
406
|
+
headerParameters = {};
|
|
407
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
408
|
+
_a = headerParameters;
|
|
409
|
+
_b = "apikey";
|
|
410
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
411
|
+
case 1:
|
|
412
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
413
|
+
_c.label = 2;
|
|
414
|
+
case 2:
|
|
415
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
416
|
+
token = this.configuration.accessToken;
|
|
417
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
418
|
+
case 3:
|
|
419
|
+
tokenString = _c.sent();
|
|
420
|
+
if (tokenString) {
|
|
421
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
422
|
+
}
|
|
423
|
+
_c.label = 4;
|
|
424
|
+
case 4: return [4 /*yield*/, this.request({
|
|
425
|
+
path: "/private/broker/leads/{brokeredLeadId}".replace("{".concat("brokeredLeadId", "}"), encodeURIComponent(String(requestParameters['brokeredLeadId']))),
|
|
426
|
+
method: 'GET',
|
|
427
|
+
headers: headerParameters,
|
|
428
|
+
query: queryParameters,
|
|
429
|
+
}, initOverrides)];
|
|
430
|
+
case 5:
|
|
431
|
+
response = _c.sent();
|
|
432
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.BrokerBrokeredLeadDtoFromJSON)(jsonValue); })];
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
});
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* **API key scope required:** `BROKERED_LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
439
|
+
* Get a deal brought in as a broker
|
|
440
|
+
*/
|
|
441
|
+
BrokeredLeadsApi.prototype.getBrokerLead = function (requestParameters, initOverrides) {
|
|
442
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
443
|
+
var response;
|
|
444
|
+
return __generator(this, function (_a) {
|
|
445
|
+
switch (_a.label) {
|
|
446
|
+
case 0: return [4 /*yield*/, this.getBrokerLeadRaw(requestParameters, initOverrides)];
|
|
447
|
+
case 1:
|
|
448
|
+
response = _a.sent();
|
|
449
|
+
return [4 /*yield*/, response.value()];
|
|
450
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
});
|
|
454
|
+
};
|
|
455
|
+
/**
|
|
456
|
+
* **API key scope required:** `BROKERED_LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
457
|
+
* Get a brokered deal on one of the seller’s domains
|
|
458
|
+
*/
|
|
459
|
+
BrokeredLeadsApi.prototype.getSellerBrokeredLeadRaw = function (requestParameters, initOverrides) {
|
|
460
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
461
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
462
|
+
return __generator(this, function (_c) {
|
|
463
|
+
switch (_c.label) {
|
|
464
|
+
case 0:
|
|
465
|
+
if (requestParameters['brokeredLeadId'] == null) {
|
|
466
|
+
throw new runtime.RequiredError('brokeredLeadId', 'Required parameter "brokeredLeadId" was null or undefined when calling getSellerBrokeredLead().');
|
|
467
|
+
}
|
|
468
|
+
queryParameters = {};
|
|
469
|
+
headerParameters = {};
|
|
470
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
471
|
+
_a = headerParameters;
|
|
472
|
+
_b = "apikey";
|
|
473
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
474
|
+
case 1:
|
|
475
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
476
|
+
_c.label = 2;
|
|
477
|
+
case 2:
|
|
478
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
479
|
+
token = this.configuration.accessToken;
|
|
480
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
481
|
+
case 3:
|
|
482
|
+
tokenString = _c.sent();
|
|
483
|
+
if (tokenString) {
|
|
484
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
485
|
+
}
|
|
486
|
+
_c.label = 4;
|
|
487
|
+
case 4: return [4 /*yield*/, this.request({
|
|
488
|
+
path: "/private/brokered-leads/{brokeredLeadId}".replace("{".concat("brokeredLeadId", "}"), encodeURIComponent(String(requestParameters['brokeredLeadId']))),
|
|
489
|
+
method: 'GET',
|
|
490
|
+
headers: headerParameters,
|
|
491
|
+
query: queryParameters,
|
|
492
|
+
}, initOverrides)];
|
|
493
|
+
case 5:
|
|
494
|
+
response = _c.sent();
|
|
495
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SellerBrokeredLeadDtoFromJSON)(jsonValue); })];
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
});
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* **API key scope required:** `BROKERED_LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
502
|
+
* Get a brokered deal on one of the seller’s domains
|
|
503
|
+
*/
|
|
504
|
+
BrokeredLeadsApi.prototype.getSellerBrokeredLead = function (requestParameters, initOverrides) {
|
|
505
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
506
|
+
var response;
|
|
507
|
+
return __generator(this, function (_a) {
|
|
508
|
+
switch (_a.label) {
|
|
509
|
+
case 0: return [4 /*yield*/, this.getSellerBrokeredLeadRaw(requestParameters, initOverrides)];
|
|
510
|
+
case 1:
|
|
511
|
+
response = _a.sent();
|
|
512
|
+
return [4 /*yield*/, response.value()];
|
|
513
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
});
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* Lists the deals this account brought in as a broker, newest first, with their status, commission and the links to share. **API key scope required:** `BROKERED_LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
520
|
+
* List the deals brought in as a broker
|
|
521
|
+
*/
|
|
522
|
+
BrokeredLeadsApi.prototype.listBrokerLeadsRaw = function (requestParameters, initOverrides) {
|
|
523
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
524
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
525
|
+
return __generator(this, function (_c) {
|
|
526
|
+
switch (_c.label) {
|
|
527
|
+
case 0:
|
|
528
|
+
queryParameters = {};
|
|
529
|
+
if (requestParameters['filter'] != null) {
|
|
530
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
531
|
+
}
|
|
532
|
+
if (requestParameters['page'] != null) {
|
|
533
|
+
queryParameters['page'] = requestParameters['page'];
|
|
534
|
+
}
|
|
535
|
+
if (requestParameters['limit'] != null) {
|
|
536
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
537
|
+
}
|
|
538
|
+
if (requestParameters['sortBy'] != null) {
|
|
539
|
+
queryParameters['sortBy'] = requestParameters['sortBy'];
|
|
540
|
+
}
|
|
541
|
+
if (requestParameters['filterStatus'] != null) {
|
|
542
|
+
queryParameters['filter[status]'] = requestParameters['filterStatus'];
|
|
543
|
+
}
|
|
544
|
+
if (requestParameters['filterBrokerStatus'] != null) {
|
|
545
|
+
queryParameters['filter[broker_status]'] = requestParameters['filterBrokerStatus'];
|
|
546
|
+
}
|
|
547
|
+
if (requestParameters['filterSearchTerm'] != null) {
|
|
548
|
+
queryParameters['filter[search_term]'] = requestParameters['filterSearchTerm'];
|
|
549
|
+
}
|
|
550
|
+
if (requestParameters['filterCreatedAtFrom'] != null) {
|
|
551
|
+
queryParameters['filter[createdAtFrom]'] = requestParameters['filterCreatedAtFrom'];
|
|
552
|
+
}
|
|
553
|
+
if (requestParameters['filterCreatedAtTo'] != null) {
|
|
554
|
+
queryParameters['filter[createdAtTo]'] = requestParameters['filterCreatedAtTo'];
|
|
555
|
+
}
|
|
556
|
+
headerParameters = {};
|
|
557
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
558
|
+
_a = headerParameters;
|
|
559
|
+
_b = "apikey";
|
|
560
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
561
|
+
case 1:
|
|
562
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
563
|
+
_c.label = 2;
|
|
564
|
+
case 2:
|
|
565
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
566
|
+
token = this.configuration.accessToken;
|
|
567
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
568
|
+
case 3:
|
|
569
|
+
tokenString = _c.sent();
|
|
570
|
+
if (tokenString) {
|
|
571
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
572
|
+
}
|
|
573
|
+
_c.label = 4;
|
|
574
|
+
case 4: return [4 /*yield*/, this.request({
|
|
575
|
+
path: "/private/broker/leads",
|
|
576
|
+
method: 'GET',
|
|
577
|
+
headers: headerParameters,
|
|
578
|
+
query: queryParameters,
|
|
579
|
+
}, initOverrides)];
|
|
580
|
+
case 5:
|
|
581
|
+
response = _c.sent();
|
|
582
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ListBrokerLeads200ResponseFromJSON)(jsonValue); })];
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
});
|
|
586
|
+
};
|
|
587
|
+
/**
|
|
588
|
+
* Lists the deals this account brought in as a broker, newest first, with their status, commission and the links to share. **API key scope required:** `BROKERED_LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
589
|
+
* List the deals brought in as a broker
|
|
590
|
+
*/
|
|
591
|
+
BrokeredLeadsApi.prototype.listBrokerLeads = function () {
|
|
592
|
+
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
593
|
+
var response;
|
|
594
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
595
|
+
return __generator(this, function (_a) {
|
|
596
|
+
switch (_a.label) {
|
|
597
|
+
case 0: return [4 /*yield*/, this.listBrokerLeadsRaw(requestParameters, initOverrides)];
|
|
598
|
+
case 1:
|
|
599
|
+
response = _a.sent();
|
|
600
|
+
return [4 /*yield*/, response.value()];
|
|
601
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* Deals brokers brought in for this account’s domains that wait for approval or for the domain and account to be verified. **API key scope required:** `BROKERED_LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
608
|
+
* List the brokered deals waiting on the seller
|
|
609
|
+
*/
|
|
610
|
+
BrokeredLeadsApi.prototype.listSellerBrokeredLeadsRaw = function (initOverrides) {
|
|
611
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
612
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
613
|
+
return __generator(this, function (_c) {
|
|
614
|
+
switch (_c.label) {
|
|
615
|
+
case 0:
|
|
616
|
+
queryParameters = {};
|
|
617
|
+
headerParameters = {};
|
|
618
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
619
|
+
_a = headerParameters;
|
|
620
|
+
_b = "apikey";
|
|
621
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
622
|
+
case 1:
|
|
623
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
624
|
+
_c.label = 2;
|
|
625
|
+
case 2:
|
|
626
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
627
|
+
token = this.configuration.accessToken;
|
|
628
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
629
|
+
case 3:
|
|
630
|
+
tokenString = _c.sent();
|
|
631
|
+
if (tokenString) {
|
|
632
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
633
|
+
}
|
|
634
|
+
_c.label = 4;
|
|
635
|
+
case 4: return [4 /*yield*/, this.request({
|
|
636
|
+
path: "/private/brokered-leads",
|
|
637
|
+
method: 'GET',
|
|
638
|
+
headers: headerParameters,
|
|
639
|
+
query: queryParameters,
|
|
640
|
+
}, initOverrides)];
|
|
641
|
+
case 5:
|
|
642
|
+
response = _c.sent();
|
|
643
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.SellerBrokeredLeadDtoFromJSON); })];
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* Deals brokers brought in for this account’s domains that wait for approval or for the domain and account to be verified. **API key scope required:** `BROKERED_LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
650
|
+
* List the brokered deals waiting on the seller
|
|
651
|
+
*/
|
|
652
|
+
BrokeredLeadsApi.prototype.listSellerBrokeredLeads = function (initOverrides) {
|
|
653
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
654
|
+
var response;
|
|
655
|
+
return __generator(this, function (_a) {
|
|
656
|
+
switch (_a.label) {
|
|
657
|
+
case 0: return [4 /*yield*/, this.listSellerBrokeredLeadsRaw(initOverrides)];
|
|
658
|
+
case 1:
|
|
659
|
+
response = _a.sent();
|
|
660
|
+
return [4 /*yield*/, response.value()];
|
|
661
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
});
|
|
665
|
+
};
|
|
666
|
+
/**
|
|
667
|
+
* Emails the buyer a reminder with the payment link, while the deal waits for payment. Once a week at most. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
668
|
+
* Email the buyer the payment link
|
|
669
|
+
*/
|
|
670
|
+
BrokeredLeadsApi.prototype.notifyBrokerLeadBuyerRaw = function (requestParameters, initOverrides) {
|
|
671
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
672
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
673
|
+
return __generator(this, function (_c) {
|
|
674
|
+
switch (_c.label) {
|
|
675
|
+
case 0:
|
|
676
|
+
if (requestParameters['brokeredLeadId'] == null) {
|
|
677
|
+
throw new runtime.RequiredError('brokeredLeadId', 'Required parameter "brokeredLeadId" was null or undefined when calling notifyBrokerLeadBuyer().');
|
|
678
|
+
}
|
|
679
|
+
queryParameters = {};
|
|
680
|
+
headerParameters = {};
|
|
681
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
682
|
+
_a = headerParameters;
|
|
683
|
+
_b = "apikey";
|
|
684
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
685
|
+
case 1:
|
|
686
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
687
|
+
_c.label = 2;
|
|
688
|
+
case 2:
|
|
689
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
690
|
+
token = this.configuration.accessToken;
|
|
691
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
692
|
+
case 3:
|
|
693
|
+
tokenString = _c.sent();
|
|
694
|
+
if (tokenString) {
|
|
695
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
696
|
+
}
|
|
697
|
+
_c.label = 4;
|
|
698
|
+
case 4: return [4 /*yield*/, this.request({
|
|
699
|
+
path: "/private/broker/leads/{brokeredLeadId}/notify-buyer".replace("{".concat("brokeredLeadId", "}"), encodeURIComponent(String(requestParameters['brokeredLeadId']))),
|
|
700
|
+
method: 'POST',
|
|
701
|
+
headers: headerParameters,
|
|
702
|
+
query: queryParameters,
|
|
703
|
+
}, initOverrides)];
|
|
704
|
+
case 5:
|
|
705
|
+
response = _c.sent();
|
|
706
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
});
|
|
710
|
+
};
|
|
711
|
+
/**
|
|
712
|
+
* Emails the buyer a reminder with the payment link, while the deal waits for payment. Once a week at most. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
713
|
+
* Email the buyer the payment link
|
|
714
|
+
*/
|
|
715
|
+
BrokeredLeadsApi.prototype.notifyBrokerLeadBuyer = function (requestParameters, initOverrides) {
|
|
716
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
717
|
+
return __generator(this, function (_a) {
|
|
718
|
+
switch (_a.label) {
|
|
719
|
+
case 0: return [4 /*yield*/, this.notifyBrokerLeadBuyerRaw(requestParameters, initOverrides)];
|
|
720
|
+
case 1:
|
|
721
|
+
_a.sent();
|
|
722
|
+
return [2 /*return*/];
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
});
|
|
726
|
+
};
|
|
727
|
+
/**
|
|
728
|
+
* Emails a seller with an account to review the deal, or invites a seller without one to sign up. Once a week at most. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
729
|
+
* Email the seller about the deal
|
|
730
|
+
*/
|
|
731
|
+
BrokeredLeadsApi.prototype.notifyBrokerLeadSellerRaw = function (requestParameters, initOverrides) {
|
|
732
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
733
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
734
|
+
return __generator(this, function (_c) {
|
|
735
|
+
switch (_c.label) {
|
|
736
|
+
case 0:
|
|
737
|
+
if (requestParameters['brokeredLeadId'] == null) {
|
|
738
|
+
throw new runtime.RequiredError('brokeredLeadId', 'Required parameter "brokeredLeadId" was null or undefined when calling notifyBrokerLeadSeller().');
|
|
739
|
+
}
|
|
740
|
+
queryParameters = {};
|
|
741
|
+
headerParameters = {};
|
|
742
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
743
|
+
_a = headerParameters;
|
|
744
|
+
_b = "apikey";
|
|
745
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
746
|
+
case 1:
|
|
747
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
748
|
+
_c.label = 2;
|
|
749
|
+
case 2:
|
|
750
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
751
|
+
token = this.configuration.accessToken;
|
|
752
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
753
|
+
case 3:
|
|
754
|
+
tokenString = _c.sent();
|
|
755
|
+
if (tokenString) {
|
|
756
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
757
|
+
}
|
|
758
|
+
_c.label = 4;
|
|
759
|
+
case 4: return [4 /*yield*/, this.request({
|
|
760
|
+
path: "/private/broker/leads/{brokeredLeadId}/notify-seller".replace("{".concat("brokeredLeadId", "}"), encodeURIComponent(String(requestParameters['brokeredLeadId']))),
|
|
761
|
+
method: 'POST',
|
|
762
|
+
headers: headerParameters,
|
|
763
|
+
query: queryParameters,
|
|
764
|
+
}, initOverrides)];
|
|
765
|
+
case 5:
|
|
766
|
+
response = _c.sent();
|
|
767
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
768
|
+
}
|
|
769
|
+
});
|
|
770
|
+
});
|
|
771
|
+
};
|
|
772
|
+
/**
|
|
773
|
+
* Emails a seller with an account to review the deal, or invites a seller without one to sign up. Once a week at most. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
774
|
+
* Email the seller about the deal
|
|
775
|
+
*/
|
|
776
|
+
BrokeredLeadsApi.prototype.notifyBrokerLeadSeller = function (requestParameters, initOverrides) {
|
|
777
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
778
|
+
return __generator(this, function (_a) {
|
|
779
|
+
switch (_a.label) {
|
|
780
|
+
case 0: return [4 /*yield*/, this.notifyBrokerLeadSellerRaw(requestParameters, initOverrides)];
|
|
781
|
+
case 1:
|
|
782
|
+
_a.sent();
|
|
783
|
+
return [2 /*return*/];
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* Checks the domain DNS again and completes the deal if the domain and the account are verified by now. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
790
|
+
* Check the verification of an approved brokered deal again
|
|
791
|
+
*/
|
|
792
|
+
BrokeredLeadsApi.prototype.recheckSellerBrokeredLeadVerificationRaw = function (requestParameters, initOverrides) {
|
|
793
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
794
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
795
|
+
return __generator(this, function (_c) {
|
|
796
|
+
switch (_c.label) {
|
|
797
|
+
case 0:
|
|
798
|
+
if (requestParameters['brokeredLeadId'] == null) {
|
|
799
|
+
throw new runtime.RequiredError('brokeredLeadId', 'Required parameter "brokeredLeadId" was null or undefined when calling recheckSellerBrokeredLeadVerification().');
|
|
800
|
+
}
|
|
801
|
+
queryParameters = {};
|
|
802
|
+
headerParameters = {};
|
|
803
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
804
|
+
_a = headerParameters;
|
|
805
|
+
_b = "apikey";
|
|
806
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
807
|
+
case 1:
|
|
808
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
809
|
+
_c.label = 2;
|
|
810
|
+
case 2:
|
|
811
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
812
|
+
token = this.configuration.accessToken;
|
|
813
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
814
|
+
case 3:
|
|
815
|
+
tokenString = _c.sent();
|
|
816
|
+
if (tokenString) {
|
|
817
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
818
|
+
}
|
|
819
|
+
_c.label = 4;
|
|
820
|
+
case 4: return [4 /*yield*/, this.request({
|
|
821
|
+
path: "/private/brokered-leads/{brokeredLeadId}/verification".replace("{".concat("brokeredLeadId", "}"), encodeURIComponent(String(requestParameters['brokeredLeadId']))),
|
|
822
|
+
method: 'POST',
|
|
823
|
+
headers: headerParameters,
|
|
824
|
+
query: queryParameters,
|
|
825
|
+
}, initOverrides)];
|
|
826
|
+
case 5:
|
|
827
|
+
response = _c.sent();
|
|
828
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
829
|
+
}
|
|
830
|
+
});
|
|
831
|
+
});
|
|
832
|
+
};
|
|
833
|
+
/**
|
|
834
|
+
* Checks the domain DNS again and completes the deal if the domain and the account are verified by now. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
835
|
+
* Check the verification of an approved brokered deal again
|
|
836
|
+
*/
|
|
837
|
+
BrokeredLeadsApi.prototype.recheckSellerBrokeredLeadVerification = function (requestParameters, initOverrides) {
|
|
838
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
839
|
+
return __generator(this, function (_a) {
|
|
840
|
+
switch (_a.label) {
|
|
841
|
+
case 0: return [4 /*yield*/, this.recheckSellerBrokeredLeadVerificationRaw(requestParameters, initOverrides)];
|
|
842
|
+
case 1:
|
|
843
|
+
_a.sent();
|
|
844
|
+
return [2 /*return*/];
|
|
845
|
+
}
|
|
846
|
+
});
|
|
847
|
+
});
|
|
848
|
+
};
|
|
849
|
+
/**
|
|
850
|
+
* Issues a new link for a seller who has not taken up the deal yet, e.g. once the previous one expired. The previous link stops working. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
851
|
+
* Renew the seller signup link
|
|
852
|
+
*/
|
|
853
|
+
BrokeredLeadsApi.prototype.renewBrokerLeadSellerLinkRaw = function (requestParameters, initOverrides) {
|
|
854
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
855
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
856
|
+
return __generator(this, function (_c) {
|
|
857
|
+
switch (_c.label) {
|
|
858
|
+
case 0:
|
|
859
|
+
if (requestParameters['brokeredLeadId'] == null) {
|
|
860
|
+
throw new runtime.RequiredError('brokeredLeadId', 'Required parameter "brokeredLeadId" was null or undefined when calling renewBrokerLeadSellerLink().');
|
|
861
|
+
}
|
|
862
|
+
queryParameters = {};
|
|
863
|
+
headerParameters = {};
|
|
864
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
865
|
+
_a = headerParameters;
|
|
866
|
+
_b = "apikey";
|
|
867
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
868
|
+
case 1:
|
|
869
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
870
|
+
_c.label = 2;
|
|
871
|
+
case 2:
|
|
872
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
873
|
+
token = this.configuration.accessToken;
|
|
874
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
875
|
+
case 3:
|
|
876
|
+
tokenString = _c.sent();
|
|
877
|
+
if (tokenString) {
|
|
878
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
879
|
+
}
|
|
880
|
+
_c.label = 4;
|
|
881
|
+
case 4: return [4 /*yield*/, this.request({
|
|
882
|
+
path: "/private/broker/leads/{brokeredLeadId}/seller-link".replace("{".concat("brokeredLeadId", "}"), encodeURIComponent(String(requestParameters['brokeredLeadId']))),
|
|
883
|
+
method: 'POST',
|
|
884
|
+
headers: headerParameters,
|
|
885
|
+
query: queryParameters,
|
|
886
|
+
}, initOverrides)];
|
|
887
|
+
case 5:
|
|
888
|
+
response = _c.sent();
|
|
889
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
});
|
|
893
|
+
};
|
|
894
|
+
/**
|
|
895
|
+
* Issues a new link for a seller who has not taken up the deal yet, e.g. once the previous one expired. The previous link stops working. **API key scope required:** `BROKERED_LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
896
|
+
* Renew the seller signup link
|
|
897
|
+
*/
|
|
898
|
+
BrokeredLeadsApi.prototype.renewBrokerLeadSellerLink = function (requestParameters, initOverrides) {
|
|
899
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
900
|
+
return __generator(this, function (_a) {
|
|
901
|
+
switch (_a.label) {
|
|
902
|
+
case 0: return [4 /*yield*/, this.renewBrokerLeadSellerLinkRaw(requestParameters, initOverrides)];
|
|
903
|
+
case 1:
|
|
904
|
+
_a.sent();
|
|
905
|
+
return [2 /*return*/];
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
});
|
|
909
|
+
};
|
|
910
|
+
return BrokeredLeadsApi;
|
|
911
|
+
}(runtime.BaseAPI));
|
|
912
|
+
exports.BrokeredLeadsApi = BrokeredLeadsApi;
|