@randock/nameshift-api-client 0.0.484 → 0.0.486
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 +1 -0
- package/README.md +3 -3
- package/dist/apis/DomainsApi.d.ts +6 -5
- package/dist/apis/DomainsApi.js +10 -5
- package/dist/apis/JobsApi.d.ts +17 -4
- package/dist/apis/JobsApi.js +65 -4
- package/dist/models/BuyerNotificationDto.d.ts +1 -0
- package/dist/models/BuyerNotificationDto.js +1 -0
- package/dist/models/BuyerNotificationListItemDto.d.ts +1 -0
- package/dist/models/BuyerNotificationListItemDto.js +1 -0
- package/dist/models/ImportDomainsResponseDto.d.ts +33 -0
- package/dist/models/ImportDomainsResponseDto.js +52 -0
- package/dist/models/JobDto.d.ts +21 -1
- package/dist/models/JobDto.js +11 -0
- package/dist/models/JobFailureDto.d.ts +1 -1
- package/dist/models/JobType.d.ts +1 -0
- package/dist/models/JobType.js +2 -1
- package/dist/models/ListLeadMessagesDto.d.ts +6 -0
- package/dist/models/ListLeadMessagesDto.js +4 -0
- package/dist/models/UserNotificationDto.d.ts +1 -0
- package/dist/models/UserNotificationDto.js +1 -0
- package/dist/models/UserNotificationListItemDto.d.ts +1 -0
- package/dist/models/UserNotificationListItemDto.js +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/DomainsApi.ts +15 -6
- package/src/apis/JobsApi.ts +57 -4
- package/src/models/BuyerNotificationDto.ts +1 -0
- package/src/models/BuyerNotificationListItemDto.ts +1 -0
- package/src/models/ImportDomainsResponseDto.ts +74 -0
- package/src/models/JobDto.ts +27 -1
- package/src/models/JobFailureDto.ts +1 -1
- package/src/models/JobType.ts +2 -1
- package/src/models/ListLeadMessagesDto.ts +9 -0
- package/src/models/UserNotificationDto.ts +1 -0
- package/src/models/UserNotificationListItemDto.ts +1 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -315,6 +315,7 @@ src/models/GetSellerChallengesListDto.ts
|
|
|
315
315
|
src/models/GetSellerChallengesListDtoChallengesInner.ts
|
|
316
316
|
src/models/HistoricalMetrics.ts
|
|
317
317
|
src/models/HttpException.ts
|
|
318
|
+
src/models/ImportDomainsResponseDto.ts
|
|
318
319
|
src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts
|
|
319
320
|
src/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.ts
|
|
320
321
|
src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.486
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @randock/nameshift-api-client@0.0.
|
|
39
|
+
npm install @randock/nameshift-api-client@0.0.486 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
|
|
|
44
44
|
```
|
|
45
45
|
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
46
|
```
|
|
47
|
-
|
|
47
|
+
f29b6d7edb528b035bf08f552355713baff1d1d22e2e249d91eb6ba0095797383a73fb4181bcdd194c893a86f7ace1c2
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ApplyDomainEditInput, BatchImportPreviewDto, BatchUpdateDomainsInput, BulkUpdateDomainsWithFiltersInput, CheckDomainsNsInput, DeleteDomainsInput, DomainEditPreviewDto, DomainExchangeRateDto, DomainFiltersDto, DomainSearchTranslationDto, DomainUrlDto, DomainVerificationStatusDto, GetAllDomainTransfers200Response, IntersectionDomainDtoWithHijackerDtoWithAccountDto, JobDto, List200Response2, PreviewDomainEditInput, SellerDomainAffiliateCommissionDto, SellerDomainTransferDto, StartAuctionInput, TranslateDomainSearchInput, UpdateDomainInput, UpdateDomainTransferAuthCodeInput, UpdateDomainTransferIpsTagInput } from '../models/index';
|
|
13
|
+
import type { ApplyDomainEditInput, BatchImportPreviewDto, BatchUpdateDomainsInput, BulkUpdateDomainsWithFiltersInput, CheckDomainsNsInput, DeleteDomainsInput, DomainEditPreviewDto, DomainExchangeRateDto, DomainFiltersDto, DomainSearchTranslationDto, DomainUrlDto, DomainVerificationStatusDto, GetAllDomainTransfers200Response, ImportDomainsResponseDto, IntersectionDomainDtoWithHijackerDtoWithAccountDto, JobDto, List200Response2, PreviewDomainEditInput, SellerDomainAffiliateCommissionDto, SellerDomainTransferDto, StartAuctionInput, TranslateDomainSearchInput, UpdateDomainInput, UpdateDomainTransferAuthCodeInput, UpdateDomainTransferIpsTagInput } from '../models/index';
|
|
14
14
|
export interface DomainsApiApplyDomainEditRequest {
|
|
15
15
|
applyDomainEditInput: ApplyDomainEditInput;
|
|
16
16
|
searchFilter?: string;
|
|
@@ -21,6 +21,7 @@ export interface DomainsApiApplyDomainEditRequest {
|
|
|
21
21
|
export interface DomainsApiBatchImportRequest {
|
|
22
22
|
domains?: Array<string>;
|
|
23
23
|
file?: Blob | null;
|
|
24
|
+
notifyByEmail?: boolean;
|
|
24
25
|
}
|
|
25
26
|
export interface DomainsApiBatchImportPreviewRequest {
|
|
26
27
|
file?: Blob | null;
|
|
@@ -135,15 +136,15 @@ export declare class DomainsApi extends runtime.BaseAPI {
|
|
|
135
136
|
*/
|
|
136
137
|
applyDomainEdit(requestParameters: DomainsApiApplyDomainEditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto>;
|
|
137
138
|
/**
|
|
138
|
-
* Imports domains from an uploaded file or a list of domain names and
|
|
139
|
+
* Imports domains from an uploaded file or a list of domain names. A list is imported before the response is sent, and answered with 201. A file is imported in the background: 1. The upload is answered with 202 and the job, which the `Location` header points at as well. The id to poll is at `job.id`. 2. Poll `GET /private/jobs/{jobId}` until its `status` is `finished` or `failed`. 3. Download the outcome of every row from `GET /private/jobs/{jobId}/result`, which redirects to a CSV on a public host. Follow the redirect without the `apikey` header, which the file does not need. With an API key, starting an import needs the `DOMAINS_WRITE` scope, while polling the job and downloading its result need `DOMAINS_READ`. Scopes are matched exactly, so a key that imports files needs both. `notifyByEmail` decides whether the user who started a file import is emailed about how it ended: when it has failed, or when it has finished after running for longer than 30 seconds. It defaults to true. An integration that polls the job usually sets it to false, which skips both emails. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
139
140
|
* Import domains
|
|
140
141
|
*/
|
|
141
|
-
batchImportRaw(requestParameters: DomainsApiBatchImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
142
|
+
batchImportRaw(requestParameters: DomainsApiBatchImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportDomainsResponseDto>>;
|
|
142
143
|
/**
|
|
143
|
-
* Imports domains from an uploaded file or a list of domain names and
|
|
144
|
+
* Imports domains from an uploaded file or a list of domain names. A list is imported before the response is sent, and answered with 201. A file is imported in the background: 1. The upload is answered with 202 and the job, which the `Location` header points at as well. The id to poll is at `job.id`. 2. Poll `GET /private/jobs/{jobId}` until its `status` is `finished` or `failed`. 3. Download the outcome of every row from `GET /private/jobs/{jobId}/result`, which redirects to a CSV on a public host. Follow the redirect without the `apikey` header, which the file does not need. With an API key, starting an import needs the `DOMAINS_WRITE` scope, while polling the job and downloading its result need `DOMAINS_READ`. Scopes are matched exactly, so a key that imports files needs both. `notifyByEmail` decides whether the user who started a file import is emailed about how it ended: when it has failed, or when it has finished after running for longer than 30 seconds. It defaults to true. An integration that polls the job usually sets it to false, which skips both emails. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
144
145
|
* Import domains
|
|
145
146
|
*/
|
|
146
|
-
batchImport(requestParameters?: DomainsApiBatchImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
147
|
+
batchImport(requestParameters?: DomainsApiBatchImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportDomainsResponseDto>;
|
|
147
148
|
/**
|
|
148
149
|
* Uploads a domain import file and returns a preview of parsed domains before import. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
149
150
|
* Preview domain import
|
package/dist/apis/DomainsApi.js
CHANGED
|
@@ -147,7 +147,7 @@ var DomainsApi = /** @class */ (function (_super) {
|
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
149
|
/**
|
|
150
|
-
* Imports domains from an uploaded file or a list of domain names and
|
|
150
|
+
* Imports domains from an uploaded file or a list of domain names. A list is imported before the response is sent, and answered with 201. A file is imported in the background: 1. The upload is answered with 202 and the job, which the `Location` header points at as well. The id to poll is at `job.id`. 2. Poll `GET /private/jobs/{jobId}` until its `status` is `finished` or `failed`. 3. Download the outcome of every row from `GET /private/jobs/{jobId}/result`, which redirects to a CSV on a public host. Follow the redirect without the `apikey` header, which the file does not need. With an API key, starting an import needs the `DOMAINS_WRITE` scope, while polling the job and downloading its result need `DOMAINS_READ`. Scopes are matched exactly, so a key that imports files needs both. `notifyByEmail` decides whether the user who started a file import is emailed about how it ended: when it has failed, or when it has finished after running for longer than 30 seconds. It defaults to true. An integration that polls the job usually sets it to false, which skips both emails. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
151
151
|
* Import domains
|
|
152
152
|
*/
|
|
153
153
|
DomainsApi.prototype.batchImportRaw = function (requestParameters, initOverrides) {
|
|
@@ -195,6 +195,9 @@ var DomainsApi = /** @class */ (function (_super) {
|
|
|
195
195
|
if (requestParameters['file'] != null) {
|
|
196
196
|
formParams.append('file', requestParameters['file']);
|
|
197
197
|
}
|
|
198
|
+
if (requestParameters['notifyByEmail'] != null) {
|
|
199
|
+
formParams.append('notifyByEmail', requestParameters['notifyByEmail']);
|
|
200
|
+
}
|
|
198
201
|
return [4 /*yield*/, this.request({
|
|
199
202
|
path: "/private/domains",
|
|
200
203
|
method: 'POST',
|
|
@@ -204,24 +207,26 @@ var DomainsApi = /** @class */ (function (_super) {
|
|
|
204
207
|
}, initOverrides)];
|
|
205
208
|
case 5:
|
|
206
209
|
response = _c.sent();
|
|
207
|
-
return [2 /*return*/, new runtime.
|
|
210
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ImportDomainsResponseDtoFromJSON)(jsonValue); })];
|
|
208
211
|
}
|
|
209
212
|
});
|
|
210
213
|
});
|
|
211
214
|
};
|
|
212
215
|
/**
|
|
213
|
-
* Imports domains from an uploaded file or a list of domain names and
|
|
216
|
+
* Imports domains from an uploaded file or a list of domain names. A list is imported before the response is sent, and answered with 201. A file is imported in the background: 1. The upload is answered with 202 and the job, which the `Location` header points at as well. The id to poll is at `job.id`. 2. Poll `GET /private/jobs/{jobId}` until its `status` is `finished` or `failed`. 3. Download the outcome of every row from `GET /private/jobs/{jobId}/result`, which redirects to a CSV on a public host. Follow the redirect without the `apikey` header, which the file does not need. With an API key, starting an import needs the `DOMAINS_WRITE` scope, while polling the job and downloading its result need `DOMAINS_READ`. Scopes are matched exactly, so a key that imports files needs both. `notifyByEmail` decides whether the user who started a file import is emailed about how it ended: when it has failed, or when it has finished after running for longer than 30 seconds. It defaults to true. An integration that polls the job usually sets it to false, which skips both emails. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
214
217
|
* Import domains
|
|
215
218
|
*/
|
|
216
219
|
DomainsApi.prototype.batchImport = function () {
|
|
217
220
|
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
221
|
+
var response;
|
|
218
222
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
219
223
|
return __generator(this, function (_a) {
|
|
220
224
|
switch (_a.label) {
|
|
221
225
|
case 0: return [4 /*yield*/, this.batchImportRaw(requestParameters, initOverrides)];
|
|
222
226
|
case 1:
|
|
223
|
-
_a.sent();
|
|
224
|
-
return [
|
|
227
|
+
response = _a.sent();
|
|
228
|
+
return [4 /*yield*/, response.value()];
|
|
229
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
225
230
|
}
|
|
226
231
|
});
|
|
227
232
|
});
|
package/dist/apis/JobsApi.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ import type { JobDto, ListJobs200Response } from '../models/index';
|
|
|
14
14
|
export interface JobsApiGetJobRequest {
|
|
15
15
|
jobId: string;
|
|
16
16
|
}
|
|
17
|
+
export interface JobsApiGetJobResultRequest {
|
|
18
|
+
jobId: string;
|
|
19
|
+
}
|
|
17
20
|
export interface JobsApiListJobsRequest {
|
|
18
21
|
filter?: {
|
|
19
22
|
[key: string]: string;
|
|
@@ -29,22 +32,32 @@ export interface JobsApiListJobsRequest {
|
|
|
29
32
|
*/
|
|
30
33
|
export declare class JobsApi extends runtime.BaseAPI {
|
|
31
34
|
/**
|
|
32
|
-
* Progress and result of one job belonging to the account. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
35
|
+
* Progress and result of one job belonging to the account. A finished import links the outcome of every row in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
33
36
|
* Get a background job
|
|
34
37
|
*/
|
|
35
38
|
getJobRaw(requestParameters: JobsApiGetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>>;
|
|
36
39
|
/**
|
|
37
|
-
* Progress and result of one job belonging to the account. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
40
|
+
* Progress and result of one job belonging to the account. A finished import links the outcome of every row in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
38
41
|
* Get a background job
|
|
39
42
|
*/
|
|
40
43
|
getJob(requestParameters: JobsApiGetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto>;
|
|
41
44
|
/**
|
|
42
|
-
*
|
|
45
|
+
* Redirects to the CSV with the outcome of every row of a finished import: the file the job\'s `resultFileUrl` links, which anyone who has the link can download. Follow the redirect without the `apikey` header: the file does not need it, and most HTTP clients, `curl -L` among them, keep sending a custom header when a redirect takes them to another host. Downloading `resultFileUrl` itself avoids the redirect altogether. The file can expire: when the bucket has a retention rule, the file is removed once it has run out, and the link then answers 404. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
46
|
+
* Download the result file of a background job
|
|
47
|
+
*/
|
|
48
|
+
getJobResultRaw(requestParameters: JobsApiGetJobResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
49
|
+
/**
|
|
50
|
+
* Redirects to the CSV with the outcome of every row of a finished import: the file the job\'s `resultFileUrl` links, which anyone who has the link can download. Follow the redirect without the `apikey` header: the file does not need it, and most HTTP clients, `curl -L` among them, keep sending a custom header when a redirect takes them to another host. Downloading `resultFileUrl` itself avoids the redirect altogether. The file can expire: when the bucket has a retention rule, the file is removed once it has run out, and the link then answers 404. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
51
|
+
* Download the result file of a background job
|
|
52
|
+
*/
|
|
53
|
+
getJobResult(requestParameters: JobsApiGetJobResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. A finished job that wrote a result file links it in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
43
56
|
* List background jobs
|
|
44
57
|
*/
|
|
45
58
|
listJobsRaw(requestParameters: JobsApiListJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListJobs200Response>>;
|
|
46
59
|
/**
|
|
47
|
-
* The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
60
|
+
* The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. A finished job that wrote a result file links it in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
48
61
|
* List background jobs
|
|
49
62
|
*/
|
|
50
63
|
listJobs(requestParameters?: JobsApiListJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListJobs200Response>;
|
package/dist/apis/JobsApi.js
CHANGED
|
@@ -76,7 +76,7 @@ var JobsApi = /** @class */ (function (_super) {
|
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Progress and result of one job belonging to the account. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
79
|
+
* Progress and result of one job belonging to the account. A finished import links the outcome of every row in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
80
80
|
* Get a background job
|
|
81
81
|
*/
|
|
82
82
|
JobsApi.prototype.getJobRaw = function (requestParameters, initOverrides) {
|
|
@@ -121,7 +121,7 @@ var JobsApi = /** @class */ (function (_super) {
|
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
123
|
/**
|
|
124
|
-
* Progress and result of one job belonging to the account. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
124
|
+
* Progress and result of one job belonging to the account. A finished import links the outcome of every row in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
125
125
|
* Get a background job
|
|
126
126
|
*/
|
|
127
127
|
JobsApi.prototype.getJob = function (requestParameters, initOverrides) {
|
|
@@ -139,7 +139,68 @@ var JobsApi = /** @class */ (function (_super) {
|
|
|
139
139
|
});
|
|
140
140
|
};
|
|
141
141
|
/**
|
|
142
|
-
*
|
|
142
|
+
* Redirects to the CSV with the outcome of every row of a finished import: the file the job\'s `resultFileUrl` links, which anyone who has the link can download. Follow the redirect without the `apikey` header: the file does not need it, and most HTTP clients, `curl -L` among them, keep sending a custom header when a redirect takes them to another host. Downloading `resultFileUrl` itself avoids the redirect altogether. The file can expire: when the bucket has a retention rule, the file is removed once it has run out, and the link then answers 404. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
143
|
+
* Download the result file of a background job
|
|
144
|
+
*/
|
|
145
|
+
JobsApi.prototype.getJobResultRaw = function (requestParameters, initOverrides) {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
147
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
148
|
+
return __generator(this, function (_c) {
|
|
149
|
+
switch (_c.label) {
|
|
150
|
+
case 0:
|
|
151
|
+
if (requestParameters['jobId'] == null) {
|
|
152
|
+
throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling getJobResult().');
|
|
153
|
+
}
|
|
154
|
+
queryParameters = {};
|
|
155
|
+
headerParameters = {};
|
|
156
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
157
|
+
_a = headerParameters;
|
|
158
|
+
_b = "apikey";
|
|
159
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
160
|
+
case 1:
|
|
161
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
162
|
+
_c.label = 2;
|
|
163
|
+
case 2:
|
|
164
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
165
|
+
token = this.configuration.accessToken;
|
|
166
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
167
|
+
case 3:
|
|
168
|
+
tokenString = _c.sent();
|
|
169
|
+
if (tokenString) {
|
|
170
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
171
|
+
}
|
|
172
|
+
_c.label = 4;
|
|
173
|
+
case 4: return [4 /*yield*/, this.request({
|
|
174
|
+
path: "/private/jobs/{jobId}/result".replace("{".concat("jobId", "}"), encodeURIComponent(String(requestParameters['jobId']))),
|
|
175
|
+
method: 'GET',
|
|
176
|
+
headers: headerParameters,
|
|
177
|
+
query: queryParameters,
|
|
178
|
+
}, initOverrides)];
|
|
179
|
+
case 5:
|
|
180
|
+
response = _c.sent();
|
|
181
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Redirects to the CSV with the outcome of every row of a finished import: the file the job\'s `resultFileUrl` links, which anyone who has the link can download. Follow the redirect without the `apikey` header: the file does not need it, and most HTTP clients, `curl -L` among them, keep sending a custom header when a redirect takes them to another host. Downloading `resultFileUrl` itself avoids the redirect altogether. The file can expire: when the bucket has a retention rule, the file is removed once it has run out, and the link then answers 404. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
188
|
+
* Download the result file of a background job
|
|
189
|
+
*/
|
|
190
|
+
JobsApi.prototype.getJobResult = function (requestParameters, initOverrides) {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
192
|
+
return __generator(this, function (_a) {
|
|
193
|
+
switch (_a.label) {
|
|
194
|
+
case 0: return [4 /*yield*/, this.getJobResultRaw(requestParameters, initOverrides)];
|
|
195
|
+
case 1:
|
|
196
|
+
_a.sent();
|
|
197
|
+
return [2 /*return*/];
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. A finished job that wrote a result file links it in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
143
204
|
* List background jobs
|
|
144
205
|
*/
|
|
145
206
|
JobsApi.prototype.listJobsRaw = function (requestParameters, initOverrides) {
|
|
@@ -199,7 +260,7 @@ var JobsApi = /** @class */ (function (_super) {
|
|
|
199
260
|
});
|
|
200
261
|
};
|
|
201
262
|
/**
|
|
202
|
-
* The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
263
|
+
* The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. A finished job that wrote a result file links it in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
203
264
|
* List background jobs
|
|
204
265
|
*/
|
|
205
266
|
JobsApi.prototype.listJobs = function () {
|
|
@@ -95,6 +95,7 @@ export declare const BuyerNotificationDtoTypeEnum: {
|
|
|
95
95
|
readonly REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: "request_ips_tag_to_seller_ips_tag_invalid";
|
|
96
96
|
readonly EXPORT_COMPLETED: "export_completed";
|
|
97
97
|
readonly DOMAIN_IMPORT_FINISHED: "domain_import_finished";
|
|
98
|
+
readonly DOMAIN_IMPORT_FAILED: "domain_import_failed";
|
|
98
99
|
readonly DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: "domain_offer_verified_buyer_access_link_email";
|
|
99
100
|
readonly DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: "domain_offer_received_buyer_access_link_email";
|
|
100
101
|
readonly DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: "domain_offer_accepted_continue_order_email";
|
|
@@ -56,6 +56,7 @@ exports.BuyerNotificationDtoTypeEnum = {
|
|
|
56
56
|
REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: 'request_ips_tag_to_seller_ips_tag_invalid',
|
|
57
57
|
EXPORT_COMPLETED: 'export_completed',
|
|
58
58
|
DOMAIN_IMPORT_FINISHED: 'domain_import_finished',
|
|
59
|
+
DOMAIN_IMPORT_FAILED: 'domain_import_failed',
|
|
59
60
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
60
61
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
61
62
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
@@ -88,6 +88,7 @@ export declare const BuyerNotificationListItemDtoTypeEnum: {
|
|
|
88
88
|
readonly REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: "request_ips_tag_to_seller_ips_tag_invalid";
|
|
89
89
|
readonly EXPORT_COMPLETED: "export_completed";
|
|
90
90
|
readonly DOMAIN_IMPORT_FINISHED: "domain_import_finished";
|
|
91
|
+
readonly DOMAIN_IMPORT_FAILED: "domain_import_failed";
|
|
91
92
|
readonly DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: "domain_offer_verified_buyer_access_link_email";
|
|
92
93
|
readonly DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: "domain_offer_received_buyer_access_link_email";
|
|
93
94
|
readonly DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: "domain_offer_accepted_continue_order_email";
|
|
@@ -55,6 +55,7 @@ exports.BuyerNotificationListItemDtoTypeEnum = {
|
|
|
55
55
|
REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: 'request_ips_tag_to_seller_ips_tag_invalid',
|
|
56
56
|
EXPORT_COMPLETED: 'export_completed',
|
|
57
57
|
DOMAIN_IMPORT_FINISHED: 'domain_import_finished',
|
|
58
|
+
DOMAIN_IMPORT_FAILED: 'domain_import_failed',
|
|
58
59
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
59
60
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
60
61
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nameshift
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { JobDto } from './JobDto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ImportDomainsResponseDto
|
|
17
|
+
*/
|
|
18
|
+
export interface ImportDomainsResponseDto {
|
|
19
|
+
/**
|
|
20
|
+
* The background job importing the uploaded file. Null for a list of domain names, which is imported before the response is sent.
|
|
21
|
+
* @type {JobDto}
|
|
22
|
+
* @memberof ImportDomainsResponseDto
|
|
23
|
+
*/
|
|
24
|
+
job: JobDto | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ImportDomainsResponseDto interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfImportDomainsResponseDto(value: object): value is ImportDomainsResponseDto;
|
|
30
|
+
export declare function ImportDomainsResponseDtoFromJSON(json: any): ImportDomainsResponseDto;
|
|
31
|
+
export declare function ImportDomainsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportDomainsResponseDto;
|
|
32
|
+
export declare function ImportDomainsResponseDtoToJSON(json: any): ImportDomainsResponseDto;
|
|
33
|
+
export declare function ImportDomainsResponseDtoToJSONTyped(value?: ImportDomainsResponseDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfImportDomainsResponseDto = instanceOfImportDomainsResponseDto;
|
|
17
|
+
exports.ImportDomainsResponseDtoFromJSON = ImportDomainsResponseDtoFromJSON;
|
|
18
|
+
exports.ImportDomainsResponseDtoFromJSONTyped = ImportDomainsResponseDtoFromJSONTyped;
|
|
19
|
+
exports.ImportDomainsResponseDtoToJSON = ImportDomainsResponseDtoToJSON;
|
|
20
|
+
exports.ImportDomainsResponseDtoToJSONTyped = ImportDomainsResponseDtoToJSONTyped;
|
|
21
|
+
var JobDto_1 = require("./JobDto");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ImportDomainsResponseDto interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfImportDomainsResponseDto(value) {
|
|
26
|
+
if (!('job' in value) || value['job'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function ImportDomainsResponseDtoFromJSON(json) {
|
|
31
|
+
return ImportDomainsResponseDtoFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function ImportDomainsResponseDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'job': (0, JobDto_1.JobDtoFromJSON)(json['job']),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function ImportDomainsResponseDtoToJSON(json) {
|
|
42
|
+
return ImportDomainsResponseDtoToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function ImportDomainsResponseDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
45
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'job': (0, JobDto_1.JobDtoToJSON)(value['job']),
|
|
51
|
+
};
|
|
52
|
+
}
|
package/dist/models/JobDto.d.ts
CHANGED
|
@@ -66,12 +66,32 @@ export interface JobDto {
|
|
|
66
66
|
* @memberof JobDto
|
|
67
67
|
*/
|
|
68
68
|
failures: Array<JobFailureDto>;
|
|
69
|
+
/**
|
|
70
|
+
* How many items ended which way, for a kind of job whose items can end in more than two ways. An import counts created, updated, unchanged, deleted, hijack, ignored and error. Unchanged is a domain the account already had exactly as its row describes it, which the import leaves as it was. Null for a job that keeps no breakdown.
|
|
71
|
+
* @type {{ [key: string]: number; }}
|
|
72
|
+
* @memberof JobDto
|
|
73
|
+
*/
|
|
74
|
+
result: {
|
|
75
|
+
[key: string]: number;
|
|
76
|
+
} | null;
|
|
77
|
+
/**
|
|
78
|
+
* A CSV with the outcome of every item, once a job that writes one has finished. The link is public: anyone who has it can download the file.
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof JobDto
|
|
81
|
+
*/
|
|
82
|
+
resultFileUrl: string | null;
|
|
69
83
|
/**
|
|
70
84
|
* Why the job as a whole stopped. Never a per-item problem.
|
|
71
85
|
* @type {string}
|
|
72
86
|
* @memberof JobDto
|
|
73
87
|
*/
|
|
74
88
|
failureReason: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the user who started the job is emailed when it has failed, or when it has finished after running for longer than 30 seconds. False for a file import started with `notifyByEmail` set to false; true for every other job.
|
|
91
|
+
* @type {boolean}
|
|
92
|
+
* @memberof JobDto
|
|
93
|
+
*/
|
|
94
|
+
readonly notifyByEmail: boolean;
|
|
75
95
|
/**
|
|
76
96
|
*
|
|
77
97
|
* @type {Date}
|
|
@@ -98,4 +118,4 @@ export declare function instanceOfJobDto(value: object): value is JobDto;
|
|
|
98
118
|
export declare function JobDtoFromJSON(json: any): JobDto;
|
|
99
119
|
export declare function JobDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobDto;
|
|
100
120
|
export declare function JobDtoToJSON(json: any): JobDto;
|
|
101
|
-
export declare function JobDtoToJSONTyped(value?: JobDto | null, ignoreDiscriminator?: boolean): any;
|
|
121
|
+
export declare function JobDtoToJSONTyped(value?: Omit<JobDto, 'notifyByEmail'> | null, ignoreDiscriminator?: boolean): any;
|
package/dist/models/JobDto.js
CHANGED
|
@@ -41,8 +41,14 @@ function instanceOfJobDto(value) {
|
|
|
41
41
|
return false;
|
|
42
42
|
if (!('failures' in value) || value['failures'] === undefined)
|
|
43
43
|
return false;
|
|
44
|
+
if (!('result' in value) || value['result'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('resultFileUrl' in value) || value['resultFileUrl'] === undefined)
|
|
47
|
+
return false;
|
|
44
48
|
if (!('failureReason' in value) || value['failureReason'] === undefined)
|
|
45
49
|
return false;
|
|
50
|
+
if (!('notifyByEmail' in value) || value['notifyByEmail'] === undefined)
|
|
51
|
+
return false;
|
|
46
52
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
47
53
|
return false;
|
|
48
54
|
if (!('startedAt' in value) || value['startedAt'] === undefined)
|
|
@@ -67,7 +73,10 @@ function JobDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
67
73
|
'succeeded': json['succeeded'],
|
|
68
74
|
'failed': json['failed'],
|
|
69
75
|
'failures': (json['failures'].map(JobFailureDto_1.JobFailureDtoFromJSON)),
|
|
76
|
+
'result': json['result'],
|
|
77
|
+
'resultFileUrl': json['resultFileUrl'],
|
|
70
78
|
'failureReason': json['failureReason'],
|
|
79
|
+
'notifyByEmail': json['notifyByEmail'],
|
|
71
80
|
'createdAt': (new Date(json['createdAt'])),
|
|
72
81
|
'startedAt': (json['startedAt'] == null ? null : new Date(json['startedAt'])),
|
|
73
82
|
'finishedAt': (json['finishedAt'] == null ? null : new Date(json['finishedAt'])),
|
|
@@ -90,6 +99,8 @@ function JobDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
90
99
|
'succeeded': value['succeeded'],
|
|
91
100
|
'failed': value['failed'],
|
|
92
101
|
'failures': (value['failures'].map(JobFailureDto_1.JobFailureDtoToJSON)),
|
|
102
|
+
'result': value['result'],
|
|
103
|
+
'resultFileUrl': value['resultFileUrl'],
|
|
93
104
|
'failureReason': value['failureReason'],
|
|
94
105
|
'createdAt': ((value['createdAt']).toISOString()),
|
|
95
106
|
'startedAt': (value['startedAt'] == null ? null : value['startedAt'].toISOString()),
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface JobFailureDto {
|
|
18
18
|
/**
|
|
19
|
-
* What the failure was about
|
|
19
|
+
* What the failure was about, usually a domain name: the domain a bulk edit refused, or an import row as it was uploaded.
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof JobFailureDto
|
|
22
22
|
*/
|
package/dist/models/JobType.d.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const JobType: {
|
|
17
17
|
readonly BULK_EDIT_DOMAINS: "bulk_edit_domains";
|
|
18
|
+
readonly IMPORT_DOMAINS: "import_domains";
|
|
18
19
|
};
|
|
19
20
|
export type JobType = typeof JobType[keyof typeof JobType];
|
|
20
21
|
export declare function instanceOfJobType(value: any): boolean;
|
package/dist/models/JobType.js
CHANGED
|
@@ -24,7 +24,8 @@ exports.JobTypeToJSONTyped = JobTypeToJSONTyped;
|
|
|
24
24
|
* @export
|
|
25
25
|
*/
|
|
26
26
|
exports.JobType = {
|
|
27
|
-
BULK_EDIT_DOMAINS: 'bulk_edit_domains'
|
|
27
|
+
BULK_EDIT_DOMAINS: 'bulk_edit_domains',
|
|
28
|
+
IMPORT_DOMAINS: 'import_domains'
|
|
28
29
|
};
|
|
29
30
|
function instanceOfJobType(value) {
|
|
30
31
|
for (var key in exports.JobType) {
|
|
@@ -22,6 +22,12 @@ export interface ListLeadMessagesDto {
|
|
|
22
22
|
* @memberof ListLeadMessagesDto
|
|
23
23
|
*/
|
|
24
24
|
messages: Array<LeadMessageDto>;
|
|
25
|
+
/**
|
|
26
|
+
* How many more messages the seller can still send in a row before the buyer has to reply. At 0, new messages, offers and offer acceptances are rejected with MESSAGE_LIMIT_REACHED; only withdrawing or rejecting an offer is still allowed.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof ListLeadMessagesDto
|
|
29
|
+
*/
|
|
30
|
+
messagesInRowRemaining: number;
|
|
25
31
|
}
|
|
26
32
|
/**
|
|
27
33
|
* Check if a given object implements the ListLeadMessagesDto interface.
|
|
@@ -25,6 +25,8 @@ var LeadMessageDto_1 = require("./LeadMessageDto");
|
|
|
25
25
|
function instanceOfListLeadMessagesDto(value) {
|
|
26
26
|
if (!('messages' in value) || value['messages'] === undefined)
|
|
27
27
|
return false;
|
|
28
|
+
if (!('messagesInRowRemaining' in value) || value['messagesInRowRemaining'] === undefined)
|
|
29
|
+
return false;
|
|
28
30
|
return true;
|
|
29
31
|
}
|
|
30
32
|
function ListLeadMessagesDtoFromJSON(json) {
|
|
@@ -36,6 +38,7 @@ function ListLeadMessagesDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
38
|
}
|
|
37
39
|
return {
|
|
38
40
|
'messages': (json['messages'].map(LeadMessageDto_1.LeadMessageDtoFromJSON)),
|
|
41
|
+
'messagesInRowRemaining': json['messagesInRowRemaining'],
|
|
39
42
|
};
|
|
40
43
|
}
|
|
41
44
|
function ListLeadMessagesDtoToJSON(json) {
|
|
@@ -48,5 +51,6 @@ function ListLeadMessagesDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
48
51
|
}
|
|
49
52
|
return {
|
|
50
53
|
'messages': (value['messages'].map(LeadMessageDto_1.LeadMessageDtoToJSON)),
|
|
54
|
+
'messagesInRowRemaining': value['messagesInRowRemaining'],
|
|
51
55
|
};
|
|
52
56
|
}
|
|
@@ -95,6 +95,7 @@ export declare const UserNotificationDtoTypeEnum: {
|
|
|
95
95
|
readonly REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: "request_ips_tag_to_seller_ips_tag_invalid";
|
|
96
96
|
readonly EXPORT_COMPLETED: "export_completed";
|
|
97
97
|
readonly DOMAIN_IMPORT_FINISHED: "domain_import_finished";
|
|
98
|
+
readonly DOMAIN_IMPORT_FAILED: "domain_import_failed";
|
|
98
99
|
readonly DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: "domain_offer_verified_buyer_access_link_email";
|
|
99
100
|
readonly DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: "domain_offer_received_buyer_access_link_email";
|
|
100
101
|
readonly DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: "domain_offer_accepted_continue_order_email";
|
|
@@ -56,6 +56,7 @@ exports.UserNotificationDtoTypeEnum = {
|
|
|
56
56
|
REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: 'request_ips_tag_to_seller_ips_tag_invalid',
|
|
57
57
|
EXPORT_COMPLETED: 'export_completed',
|
|
58
58
|
DOMAIN_IMPORT_FINISHED: 'domain_import_finished',
|
|
59
|
+
DOMAIN_IMPORT_FAILED: 'domain_import_failed',
|
|
59
60
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
60
61
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
61
62
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
@@ -88,6 +88,7 @@ export declare const UserNotificationListItemDtoTypeEnum: {
|
|
|
88
88
|
readonly REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: "request_ips_tag_to_seller_ips_tag_invalid";
|
|
89
89
|
readonly EXPORT_COMPLETED: "export_completed";
|
|
90
90
|
readonly DOMAIN_IMPORT_FINISHED: "domain_import_finished";
|
|
91
|
+
readonly DOMAIN_IMPORT_FAILED: "domain_import_failed";
|
|
91
92
|
readonly DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: "domain_offer_verified_buyer_access_link_email";
|
|
92
93
|
readonly DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: "domain_offer_received_buyer_access_link_email";
|
|
93
94
|
readonly DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: "domain_offer_accepted_continue_order_email";
|
|
@@ -55,6 +55,7 @@ exports.UserNotificationListItemDtoTypeEnum = {
|
|
|
55
55
|
REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: 'request_ips_tag_to_seller_ips_tag_invalid',
|
|
56
56
|
EXPORT_COMPLETED: 'export_completed',
|
|
57
57
|
DOMAIN_IMPORT_FINISHED: 'domain_import_finished',
|
|
58
|
+
DOMAIN_IMPORT_FAILED: 'domain_import_failed',
|
|
58
59
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
59
60
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
60
61
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
package/dist/models/index.d.ts
CHANGED
|
@@ -274,6 +274,7 @@ export * from './GetSellerChallengesListDto';
|
|
|
274
274
|
export * from './GetSellerChallengesListDtoChallengesInner';
|
|
275
275
|
export * from './HistoricalMetrics';
|
|
276
276
|
export * from './HttpException';
|
|
277
|
+
export * from './ImportDomainsResponseDto';
|
|
277
278
|
export * from './IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto';
|
|
278
279
|
export * from './IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto';
|
|
279
280
|
export * from './IntersectionDomainDtoWithHijackerDtoWithAccountDto';
|
package/dist/models/index.js
CHANGED
|
@@ -292,6 +292,7 @@ __exportStar(require("./GetSellerChallengesListDto"), exports);
|
|
|
292
292
|
__exportStar(require("./GetSellerChallengesListDtoChallengesInner"), exports);
|
|
293
293
|
__exportStar(require("./HistoricalMetrics"), exports);
|
|
294
294
|
__exportStar(require("./HttpException"), exports);
|
|
295
|
+
__exportStar(require("./ImportDomainsResponseDto"), exports);
|
|
295
296
|
__exportStar(require("./IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto"), exports);
|
|
296
297
|
__exportStar(require("./IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto"), exports);
|
|
297
298
|
__exportStar(require("./IntersectionDomainDtoWithHijackerDtoWithAccountDto"), exports);
|
package/package.json
CHANGED
package/src/apis/DomainsApi.ts
CHANGED
|
@@ -30,6 +30,7 @@ import type {
|
|
|
30
30
|
DomainVerificationStatusDto,
|
|
31
31
|
ForbiddenException,
|
|
32
32
|
GetAllDomainTransfers200Response,
|
|
33
|
+
ImportDomainsResponseDto,
|
|
33
34
|
IntersectionDomainDtoWithHijackerDtoWithAccountDto,
|
|
34
35
|
JobDto,
|
|
35
36
|
List200Response2,
|
|
@@ -75,6 +76,8 @@ import {
|
|
|
75
76
|
ForbiddenExceptionToJSON,
|
|
76
77
|
GetAllDomainTransfers200ResponseFromJSON,
|
|
77
78
|
GetAllDomainTransfers200ResponseToJSON,
|
|
79
|
+
ImportDomainsResponseDtoFromJSON,
|
|
80
|
+
ImportDomainsResponseDtoToJSON,
|
|
78
81
|
IntersectionDomainDtoWithHijackerDtoWithAccountDtoFromJSON,
|
|
79
82
|
IntersectionDomainDtoWithHijackerDtoWithAccountDtoToJSON,
|
|
80
83
|
JobDtoFromJSON,
|
|
@@ -112,6 +115,7 @@ export interface DomainsApiApplyDomainEditRequest {
|
|
|
112
115
|
export interface DomainsApiBatchImportRequest {
|
|
113
116
|
domains?: Array<string>;
|
|
114
117
|
file?: Blob | null;
|
|
118
|
+
notifyByEmail?: boolean;
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
export interface DomainsApiBatchImportPreviewRequest {
|
|
@@ -292,10 +296,10 @@ export class DomainsApi extends runtime.BaseAPI {
|
|
|
292
296
|
}
|
|
293
297
|
|
|
294
298
|
/**
|
|
295
|
-
* Imports domains from an uploaded file or a list of domain names and
|
|
299
|
+
* Imports domains from an uploaded file or a list of domain names. A list is imported before the response is sent, and answered with 201. A file is imported in the background: 1. The upload is answered with 202 and the job, which the `Location` header points at as well. The id to poll is at `job.id`. 2. Poll `GET /private/jobs/{jobId}` until its `status` is `finished` or `failed`. 3. Download the outcome of every row from `GET /private/jobs/{jobId}/result`, which redirects to a CSV on a public host. Follow the redirect without the `apikey` header, which the file does not need. With an API key, starting an import needs the `DOMAINS_WRITE` scope, while polling the job and downloading its result need `DOMAINS_READ`. Scopes are matched exactly, so a key that imports files needs both. `notifyByEmail` decides whether the user who started a file import is emailed about how it ended: when it has failed, or when it has finished after running for longer than 30 seconds. It defaults to true. An integration that polls the job usually sets it to false, which skips both emails. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
296
300
|
* Import domains
|
|
297
301
|
*/
|
|
298
|
-
async batchImportRaw(requestParameters: DomainsApiBatchImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
302
|
+
async batchImportRaw(requestParameters: DomainsApiBatchImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportDomainsResponseDto>> {
|
|
299
303
|
const queryParameters: any = {};
|
|
300
304
|
|
|
301
305
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -336,6 +340,10 @@ export class DomainsApi extends runtime.BaseAPI {
|
|
|
336
340
|
formParams.append('file', requestParameters['file'] as any);
|
|
337
341
|
}
|
|
338
342
|
|
|
343
|
+
if (requestParameters['notifyByEmail'] != null) {
|
|
344
|
+
formParams.append('notifyByEmail', requestParameters['notifyByEmail'] as any);
|
|
345
|
+
}
|
|
346
|
+
|
|
339
347
|
const response = await this.request({
|
|
340
348
|
path: `/private/domains`,
|
|
341
349
|
method: 'POST',
|
|
@@ -344,15 +352,16 @@ export class DomainsApi extends runtime.BaseAPI {
|
|
|
344
352
|
body: formParams,
|
|
345
353
|
}, initOverrides);
|
|
346
354
|
|
|
347
|
-
return new runtime.
|
|
355
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ImportDomainsResponseDtoFromJSON(jsonValue));
|
|
348
356
|
}
|
|
349
357
|
|
|
350
358
|
/**
|
|
351
|
-
* Imports domains from an uploaded file or a list of domain names and
|
|
359
|
+
* Imports domains from an uploaded file or a list of domain names. A list is imported before the response is sent, and answered with 201. A file is imported in the background: 1. The upload is answered with 202 and the job, which the `Location` header points at as well. The id to poll is at `job.id`. 2. Poll `GET /private/jobs/{jobId}` until its `status` is `finished` or `failed`. 3. Download the outcome of every row from `GET /private/jobs/{jobId}/result`, which redirects to a CSV on a public host. Follow the redirect without the `apikey` header, which the file does not need. With an API key, starting an import needs the `DOMAINS_WRITE` scope, while polling the job and downloading its result need `DOMAINS_READ`. Scopes are matched exactly, so a key that imports files needs both. `notifyByEmail` decides whether the user who started a file import is emailed about how it ended: when it has failed, or when it has finished after running for longer than 30 seconds. It defaults to true. An integration that polls the job usually sets it to false, which skips both emails. **API key scope required:** `DOMAINS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
352
360
|
* Import domains
|
|
353
361
|
*/
|
|
354
|
-
async batchImport(requestParameters: DomainsApiBatchImportRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
355
|
-
await this.batchImportRaw(requestParameters, initOverrides);
|
|
362
|
+
async batchImport(requestParameters: DomainsApiBatchImportRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportDomainsResponseDto> {
|
|
363
|
+
const response = await this.batchImportRaw(requestParameters, initOverrides);
|
|
364
|
+
return await response.value();
|
|
356
365
|
}
|
|
357
366
|
|
|
358
367
|
/**
|
package/src/apis/JobsApi.ts
CHANGED
|
@@ -15,12 +15,15 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
ConflictException,
|
|
18
19
|
JobDto,
|
|
19
20
|
ListJobs200Response,
|
|
20
21
|
NotFoundException,
|
|
21
22
|
ValidationException,
|
|
22
23
|
} from '../models/index';
|
|
23
24
|
import {
|
|
25
|
+
ConflictExceptionFromJSON,
|
|
26
|
+
ConflictExceptionToJSON,
|
|
24
27
|
JobDtoFromJSON,
|
|
25
28
|
JobDtoToJSON,
|
|
26
29
|
ListJobs200ResponseFromJSON,
|
|
@@ -35,6 +38,10 @@ export interface JobsApiGetJobRequest {
|
|
|
35
38
|
jobId: string;
|
|
36
39
|
}
|
|
37
40
|
|
|
41
|
+
export interface JobsApiGetJobResultRequest {
|
|
42
|
+
jobId: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
38
45
|
export interface JobsApiListJobsRequest {
|
|
39
46
|
filter?: { [key: string]: string; };
|
|
40
47
|
page?: number;
|
|
@@ -50,7 +57,7 @@ export interface JobsApiListJobsRequest {
|
|
|
50
57
|
export class JobsApi extends runtime.BaseAPI {
|
|
51
58
|
|
|
52
59
|
/**
|
|
53
|
-
* Progress and result of one job belonging to the account. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
60
|
+
* Progress and result of one job belonging to the account. A finished import links the outcome of every row in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
54
61
|
* Get a background job
|
|
55
62
|
*/
|
|
56
63
|
async getJobRaw(requestParameters: JobsApiGetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>> {
|
|
@@ -88,7 +95,7 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
/**
|
|
91
|
-
* Progress and result of one job belonging to the account. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
98
|
+
* Progress and result of one job belonging to the account. A finished import links the outcome of every row in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
92
99
|
* Get a background job
|
|
93
100
|
*/
|
|
94
101
|
async getJob(requestParameters: JobsApiGetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto> {
|
|
@@ -97,7 +104,53 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
97
104
|
}
|
|
98
105
|
|
|
99
106
|
/**
|
|
100
|
-
*
|
|
107
|
+
* Redirects to the CSV with the outcome of every row of a finished import: the file the job\'s `resultFileUrl` links, which anyone who has the link can download. Follow the redirect without the `apikey` header: the file does not need it, and most HTTP clients, `curl -L` among them, keep sending a custom header when a redirect takes them to another host. Downloading `resultFileUrl` itself avoids the redirect altogether. The file can expire: when the bucket has a retention rule, the file is removed once it has run out, and the link then answers 404. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
108
|
+
* Download the result file of a background job
|
|
109
|
+
*/
|
|
110
|
+
async getJobResultRaw(requestParameters: JobsApiGetJobResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
111
|
+
if (requestParameters['jobId'] == null) {
|
|
112
|
+
throw new runtime.RequiredError(
|
|
113
|
+
'jobId',
|
|
114
|
+
'Required parameter "jobId" was null or undefined when calling getJobResult().'
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const queryParameters: any = {};
|
|
119
|
+
|
|
120
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
121
|
+
|
|
122
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
123
|
+
headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
127
|
+
const token = this.configuration.accessToken;
|
|
128
|
+
const tokenString = await token("bearer", []);
|
|
129
|
+
|
|
130
|
+
if (tokenString) {
|
|
131
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const response = await this.request({
|
|
135
|
+
path: `/private/jobs/{jobId}/result`.replace(`{${"jobId"}}`, encodeURIComponent(String(requestParameters['jobId']))),
|
|
136
|
+
method: 'GET',
|
|
137
|
+
headers: headerParameters,
|
|
138
|
+
query: queryParameters,
|
|
139
|
+
}, initOverrides);
|
|
140
|
+
|
|
141
|
+
return new runtime.VoidApiResponse(response);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Redirects to the CSV with the outcome of every row of a finished import: the file the job\'s `resultFileUrl` links, which anyone who has the link can download. Follow the redirect without the `apikey` header: the file does not need it, and most HTTP clients, `curl -L` among them, keep sending a custom header when a redirect takes them to another host. Downloading `resultFileUrl` itself avoids the redirect altogether. The file can expire: when the bucket has a retention rule, the file is removed once it has run out, and the link then answers 404. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
146
|
+
* Download the result file of a background job
|
|
147
|
+
*/
|
|
148
|
+
async getJobResult(requestParameters: JobsApiGetJobResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
149
|
+
await this.getJobResultRaw(requestParameters, initOverrides);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. A finished job that wrote a result file links it in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
101
154
|
* List background jobs
|
|
102
155
|
*/
|
|
103
156
|
async listJobsRaw(requestParameters: JobsApiListJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListJobs200Response>> {
|
|
@@ -152,7 +205,7 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
152
205
|
}
|
|
153
206
|
|
|
154
207
|
/**
|
|
155
|
-
* The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
208
|
+
* The account\'s own background jobs, newest first. Filter on status while polling, so watching a run costs nothing however long the history is. A finished job that wrote a result file links it in `resultFileUrl`. **API key scope required:** `DOMAINS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
156
209
|
* List background jobs
|
|
157
210
|
*/
|
|
158
211
|
async listJobs(requestParameters: JobsApiListJobsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListJobs200Response> {
|
|
@@ -108,6 +108,7 @@ export const BuyerNotificationDtoTypeEnum = {
|
|
|
108
108
|
REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: 'request_ips_tag_to_seller_ips_tag_invalid',
|
|
109
109
|
EXPORT_COMPLETED: 'export_completed',
|
|
110
110
|
DOMAIN_IMPORT_FINISHED: 'domain_import_finished',
|
|
111
|
+
DOMAIN_IMPORT_FAILED: 'domain_import_failed',
|
|
111
112
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
112
113
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
113
114
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
@@ -94,6 +94,7 @@ export const BuyerNotificationListItemDtoTypeEnum = {
|
|
|
94
94
|
REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: 'request_ips_tag_to_seller_ips_tag_invalid',
|
|
95
95
|
EXPORT_COMPLETED: 'export_completed',
|
|
96
96
|
DOMAIN_IMPORT_FINISHED: 'domain_import_finished',
|
|
97
|
+
DOMAIN_IMPORT_FAILED: 'domain_import_failed',
|
|
97
98
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
98
99
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
99
100
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { JobDto } from './JobDto';
|
|
17
|
+
import {
|
|
18
|
+
JobDtoFromJSON,
|
|
19
|
+
JobDtoFromJSONTyped,
|
|
20
|
+
JobDtoToJSON,
|
|
21
|
+
JobDtoToJSONTyped,
|
|
22
|
+
} from './JobDto';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ImportDomainsResponseDto
|
|
28
|
+
*/
|
|
29
|
+
export interface ImportDomainsResponseDto {
|
|
30
|
+
/**
|
|
31
|
+
* The background job importing the uploaded file. Null for a list of domain names, which is imported before the response is sent.
|
|
32
|
+
* @type {JobDto}
|
|
33
|
+
* @memberof ImportDomainsResponseDto
|
|
34
|
+
*/
|
|
35
|
+
job: JobDto | null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ImportDomainsResponseDto interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfImportDomainsResponseDto(value: object): value is ImportDomainsResponseDto {
|
|
42
|
+
if (!('job' in value) || value['job'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function ImportDomainsResponseDtoFromJSON(json: any): ImportDomainsResponseDto {
|
|
47
|
+
return ImportDomainsResponseDtoFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function ImportDomainsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportDomainsResponseDto {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'job': JobDtoFromJSON(json['job']),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ImportDomainsResponseDtoToJSON(json: any): ImportDomainsResponseDto {
|
|
61
|
+
return ImportDomainsResponseDtoToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ImportDomainsResponseDtoToJSONTyped(value?: ImportDomainsResponseDto | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'job': JobDtoToJSON(value['job']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
package/src/models/JobDto.ts
CHANGED
|
@@ -89,12 +89,30 @@ export interface JobDto {
|
|
|
89
89
|
* @memberof JobDto
|
|
90
90
|
*/
|
|
91
91
|
failures: Array<JobFailureDto>;
|
|
92
|
+
/**
|
|
93
|
+
* How many items ended which way, for a kind of job whose items can end in more than two ways. An import counts created, updated, unchanged, deleted, hijack, ignored and error. Unchanged is a domain the account already had exactly as its row describes it, which the import leaves as it was. Null for a job that keeps no breakdown.
|
|
94
|
+
* @type {{ [key: string]: number; }}
|
|
95
|
+
* @memberof JobDto
|
|
96
|
+
*/
|
|
97
|
+
result: { [key: string]: number; } | null;
|
|
98
|
+
/**
|
|
99
|
+
* A CSV with the outcome of every item, once a job that writes one has finished. The link is public: anyone who has it can download the file.
|
|
100
|
+
* @type {string}
|
|
101
|
+
* @memberof JobDto
|
|
102
|
+
*/
|
|
103
|
+
resultFileUrl: string | null;
|
|
92
104
|
/**
|
|
93
105
|
* Why the job as a whole stopped. Never a per-item problem.
|
|
94
106
|
* @type {string}
|
|
95
107
|
* @memberof JobDto
|
|
96
108
|
*/
|
|
97
109
|
failureReason: string | null;
|
|
110
|
+
/**
|
|
111
|
+
* Whether the user who started the job is emailed when it has failed, or when it has finished after running for longer than 30 seconds. False for a file import started with `notifyByEmail` set to false; true for every other job.
|
|
112
|
+
* @type {boolean}
|
|
113
|
+
* @memberof JobDto
|
|
114
|
+
*/
|
|
115
|
+
readonly notifyByEmail: boolean;
|
|
98
116
|
/**
|
|
99
117
|
*
|
|
100
118
|
* @type {Date}
|
|
@@ -129,7 +147,10 @@ export function instanceOfJobDto(value: object): value is JobDto {
|
|
|
129
147
|
if (!('succeeded' in value) || value['succeeded'] === undefined) return false;
|
|
130
148
|
if (!('failed' in value) || value['failed'] === undefined) return false;
|
|
131
149
|
if (!('failures' in value) || value['failures'] === undefined) return false;
|
|
150
|
+
if (!('result' in value) || value['result'] === undefined) return false;
|
|
151
|
+
if (!('resultFileUrl' in value) || value['resultFileUrl'] === undefined) return false;
|
|
132
152
|
if (!('failureReason' in value) || value['failureReason'] === undefined) return false;
|
|
153
|
+
if (!('notifyByEmail' in value) || value['notifyByEmail'] === undefined) return false;
|
|
133
154
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
134
155
|
if (!('startedAt' in value) || value['startedAt'] === undefined) return false;
|
|
135
156
|
if (!('finishedAt' in value) || value['finishedAt'] === undefined) return false;
|
|
@@ -154,7 +175,10 @@ export function JobDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): Jo
|
|
|
154
175
|
'succeeded': json['succeeded'],
|
|
155
176
|
'failed': json['failed'],
|
|
156
177
|
'failures': ((json['failures'] as Array<any>).map(JobFailureDtoFromJSON)),
|
|
178
|
+
'result': json['result'],
|
|
179
|
+
'resultFileUrl': json['resultFileUrl'],
|
|
157
180
|
'failureReason': json['failureReason'],
|
|
181
|
+
'notifyByEmail': json['notifyByEmail'],
|
|
158
182
|
'createdAt': (new Date(json['createdAt'])),
|
|
159
183
|
'startedAt': (json['startedAt'] == null ? null : new Date(json['startedAt'])),
|
|
160
184
|
'finishedAt': (json['finishedAt'] == null ? null : new Date(json['finishedAt'])),
|
|
@@ -165,7 +189,7 @@ export function JobDtoToJSON(json: any): JobDto {
|
|
|
165
189
|
return JobDtoToJSONTyped(json, false);
|
|
166
190
|
}
|
|
167
191
|
|
|
168
|
-
export function JobDtoToJSONTyped(value?: JobDto | null, ignoreDiscriminator: boolean = false): any {
|
|
192
|
+
export function JobDtoToJSONTyped(value?: Omit<JobDto, 'notifyByEmail'> | null, ignoreDiscriminator: boolean = false): any {
|
|
169
193
|
if (value == null) {
|
|
170
194
|
return value;
|
|
171
195
|
}
|
|
@@ -180,6 +204,8 @@ export function JobDtoToJSONTyped(value?: JobDto | null, ignoreDiscriminator: bo
|
|
|
180
204
|
'succeeded': value['succeeded'],
|
|
181
205
|
'failed': value['failed'],
|
|
182
206
|
'failures': ((value['failures'] as Array<any>).map(JobFailureDtoToJSON)),
|
|
207
|
+
'result': value['result'],
|
|
208
|
+
'resultFileUrl': value['resultFileUrl'],
|
|
183
209
|
'failureReason': value['failureReason'],
|
|
184
210
|
'createdAt': ((value['createdAt']).toISOString()),
|
|
185
211
|
'startedAt': (value['startedAt'] == null ? null : (value['startedAt'] as any).toISOString()),
|
|
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface JobFailureDto {
|
|
22
22
|
/**
|
|
23
|
-
* What the failure was about
|
|
23
|
+
* What the failure was about, usually a domain name: the domain a bulk edit refused, or an import row as it was uploaded.
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof JobFailureDto
|
|
26
26
|
*/
|
package/src/models/JobType.ts
CHANGED
|
@@ -33,6 +33,12 @@ export interface ListLeadMessagesDto {
|
|
|
33
33
|
* @memberof ListLeadMessagesDto
|
|
34
34
|
*/
|
|
35
35
|
messages: Array<LeadMessageDto>;
|
|
36
|
+
/**
|
|
37
|
+
* How many more messages the seller can still send in a row before the buyer has to reply. At 0, new messages, offers and offer acceptances are rejected with MESSAGE_LIMIT_REACHED; only withdrawing or rejecting an offer is still allowed.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ListLeadMessagesDto
|
|
40
|
+
*/
|
|
41
|
+
messagesInRowRemaining: number;
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
/**
|
|
@@ -40,6 +46,7 @@ export interface ListLeadMessagesDto {
|
|
|
40
46
|
*/
|
|
41
47
|
export function instanceOfListLeadMessagesDto(value: object): value is ListLeadMessagesDto {
|
|
42
48
|
if (!('messages' in value) || value['messages'] === undefined) return false;
|
|
49
|
+
if (!('messagesInRowRemaining' in value) || value['messagesInRowRemaining'] === undefined) return false;
|
|
43
50
|
return true;
|
|
44
51
|
}
|
|
45
52
|
|
|
@@ -54,6 +61,7 @@ export function ListLeadMessagesDtoFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
54
61
|
return {
|
|
55
62
|
|
|
56
63
|
'messages': ((json['messages'] as Array<any>).map(LeadMessageDtoFromJSON)),
|
|
64
|
+
'messagesInRowRemaining': json['messagesInRowRemaining'],
|
|
57
65
|
};
|
|
58
66
|
}
|
|
59
67
|
|
|
@@ -69,6 +77,7 @@ export function ListLeadMessagesDtoToJSONTyped(value?: ListLeadMessagesDto | nul
|
|
|
69
77
|
return {
|
|
70
78
|
|
|
71
79
|
'messages': ((value['messages'] as Array<any>).map(LeadMessageDtoToJSON)),
|
|
80
|
+
'messagesInRowRemaining': value['messagesInRowRemaining'],
|
|
72
81
|
};
|
|
73
82
|
}
|
|
74
83
|
|
|
@@ -108,6 +108,7 @@ export const UserNotificationDtoTypeEnum = {
|
|
|
108
108
|
REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: 'request_ips_tag_to_seller_ips_tag_invalid',
|
|
109
109
|
EXPORT_COMPLETED: 'export_completed',
|
|
110
110
|
DOMAIN_IMPORT_FINISHED: 'domain_import_finished',
|
|
111
|
+
DOMAIN_IMPORT_FAILED: 'domain_import_failed',
|
|
111
112
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
112
113
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
113
114
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
|
@@ -94,6 +94,7 @@ export const UserNotificationListItemDtoTypeEnum = {
|
|
|
94
94
|
REQUEST_IPS_TAG_TO_SELLER_IPS_TAG_INVALID: 'request_ips_tag_to_seller_ips_tag_invalid',
|
|
95
95
|
EXPORT_COMPLETED: 'export_completed',
|
|
96
96
|
DOMAIN_IMPORT_FINISHED: 'domain_import_finished',
|
|
97
|
+
DOMAIN_IMPORT_FAILED: 'domain_import_failed',
|
|
97
98
|
DOMAIN_OFFER_VERIFIED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_verified_buyer_access_link_email',
|
|
98
99
|
DOMAIN_OFFER_RECEIVED_BUYER_ACCESS_LINK_EMAIL: 'domain_offer_received_buyer_access_link_email',
|
|
99
100
|
DOMAIN_OFFER_ACCEPTED_CONTINUE_ORDER_EMAIL: 'domain_offer_accepted_continue_order_email',
|
package/src/models/index.ts
CHANGED
|
@@ -276,6 +276,7 @@ export * from './GetSellerChallengesListDto';
|
|
|
276
276
|
export * from './GetSellerChallengesListDtoChallengesInner';
|
|
277
277
|
export * from './HistoricalMetrics';
|
|
278
278
|
export * from './HttpException';
|
|
279
|
+
export * from './ImportDomainsResponseDto';
|
|
279
280
|
export * from './IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto';
|
|
280
281
|
export * from './IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto';
|
|
281
282
|
export * from './IntersectionDomainDtoWithHijackerDtoWithAccountDto';
|