@relentless-identity/sdk 1.0.0
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/README.md +163 -0
- package/dist/apis/AccountApi.d.ts +82 -0
- package/dist/apis/AccountApi.js +190 -0
- package/dist/apis/FinderApi.d.ts +35 -0
- package/dist/apis/FinderApi.js +81 -0
- package/dist/apis/JobsApi.d.ts +167 -0
- package/dist/apis/JobsApi.js +434 -0
- package/dist/apis/ProbeApi.d.ts +52 -0
- package/dist/apis/ProbeApi.js +130 -0
- package/dist/apis/index.d.ts +4 -0
- package/dist/apis/index.js +22 -0
- package/dist/esm/apis/AccountApi.d.ts +82 -0
- package/dist/esm/apis/AccountApi.js +186 -0
- package/dist/esm/apis/FinderApi.d.ts +35 -0
- package/dist/esm/apis/FinderApi.js +77 -0
- package/dist/esm/apis/JobsApi.d.ts +167 -0
- package/dist/esm/apis/JobsApi.js +430 -0
- package/dist/esm/apis/ProbeApi.d.ts +52 -0
- package/dist/esm/apis/ProbeApi.js +126 -0
- package/dist/esm/apis/index.d.ts +4 -0
- package/dist/esm/apis/index.js +6 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/index.d.ts +1265 -0
- package/dist/esm/models/index.js +110 -0
- package/dist/esm/runtime.d.ts +181 -0
- package/dist/esm/runtime.js +342 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/index.d.ts +1265 -0
- package/dist/models/index.js +113 -0
- package/dist/runtime.d.ts +181 -0
- package/dist/runtime.js +357 -0
- package/package.json +18 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relentless Identity API
|
|
3
|
+
* Public client API for Finder and Probe workflows. This spec is generated from the FastAPI app, then narrowed to the supported bearer-authenticated routes used by SDKs and the API reference.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.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 * as runtime from '../runtime';
|
|
13
|
+
import type { ClientBackgroundJobDetailResponse, ClientBackgroundJobPageResponse, ClientBackgroundJobResponse, FinderBatchJobRequest, ProbeBatchJobBackgroundRequest } from '../models/index';
|
|
14
|
+
export interface GetJobRequest {
|
|
15
|
+
jobId: string;
|
|
16
|
+
page?: number;
|
|
17
|
+
pageSize?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface GetJobInputsTextRequest {
|
|
20
|
+
jobId: string;
|
|
21
|
+
ifNoneMatch?: string | null;
|
|
22
|
+
ifModifiedSince?: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface GetJobResultsJsonRequest {
|
|
25
|
+
jobId: string;
|
|
26
|
+
ifNoneMatch?: string | null;
|
|
27
|
+
ifModifiedSince?: string | null;
|
|
28
|
+
}
|
|
29
|
+
export interface GetJobResultsTextRequest {
|
|
30
|
+
jobId: string;
|
|
31
|
+
ifNoneMatch?: string | null;
|
|
32
|
+
ifModifiedSince?: string | null;
|
|
33
|
+
}
|
|
34
|
+
export interface ListJobsRequest {
|
|
35
|
+
page?: number;
|
|
36
|
+
pageSize?: number;
|
|
37
|
+
jobType?: ListJobsJobTypeEnum;
|
|
38
|
+
status?: ListJobsStatusEnum;
|
|
39
|
+
}
|
|
40
|
+
export interface ScheduleFinderBatchRequest {
|
|
41
|
+
finderBatchJobRequest: FinderBatchJobRequest;
|
|
42
|
+
}
|
|
43
|
+
export interface ScheduleProbeBatchRequest {
|
|
44
|
+
probeBatchJobBackgroundRequest: ProbeBatchJobBackgroundRequest;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
export declare class JobsApi extends runtime.BaseAPI {
|
|
50
|
+
/**
|
|
51
|
+
* Creates request options for getJob without sending the request
|
|
52
|
+
*/
|
|
53
|
+
getJobRequestOpts(requestParameters: GetJobRequest): Promise<runtime.RequestOpts>;
|
|
54
|
+
/**
|
|
55
|
+
* Return the current status and paginated results for one background job.
|
|
56
|
+
* Get background job
|
|
57
|
+
*/
|
|
58
|
+
getJobRaw(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientBackgroundJobDetailResponse>>;
|
|
59
|
+
/**
|
|
60
|
+
* Return the current status and paginated results for one background job.
|
|
61
|
+
* Get background job
|
|
62
|
+
*/
|
|
63
|
+
getJob(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientBackgroundJobDetailResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Creates request options for getJobInputsText without sending the request
|
|
66
|
+
*/
|
|
67
|
+
getJobInputsTextRequestOpts(requestParameters: GetJobInputsTextRequest): Promise<runtime.RequestOpts>;
|
|
68
|
+
/**
|
|
69
|
+
* Return the original background job inputs as plain text when the payload is still retained.
|
|
70
|
+
* Download job inputs
|
|
71
|
+
*/
|
|
72
|
+
getJobInputsTextRaw(requestParameters: GetJobInputsTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
73
|
+
/**
|
|
74
|
+
* Return the original background job inputs as plain text when the payload is still retained.
|
|
75
|
+
* Download job inputs
|
|
76
|
+
*/
|
|
77
|
+
getJobInputsText(requestParameters: GetJobInputsTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for getJobResultsJson without sending the request
|
|
80
|
+
*/
|
|
81
|
+
getJobResultsJsonRequestOpts(requestParameters: GetJobResultsJsonRequest): Promise<runtime.RequestOpts>;
|
|
82
|
+
/**
|
|
83
|
+
* Return the canonical immutable background job results artifact as JSON.
|
|
84
|
+
* Download job results as JSON
|
|
85
|
+
*/
|
|
86
|
+
getJobResultsJsonRaw(requestParameters: GetJobResultsJsonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
87
|
+
/**
|
|
88
|
+
* Return the canonical immutable background job results artifact as JSON.
|
|
89
|
+
* Download job results as JSON
|
|
90
|
+
*/
|
|
91
|
+
getJobResultsJson(requestParameters: GetJobResultsJsonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
92
|
+
/**
|
|
93
|
+
* Creates request options for getJobResultsText without sending the request
|
|
94
|
+
*/
|
|
95
|
+
getJobResultsTextRequestOpts(requestParameters: GetJobResultsTextRequest): Promise<runtime.RequestOpts>;
|
|
96
|
+
/**
|
|
97
|
+
* Return the canonical background job results in a readable plain-text format.
|
|
98
|
+
* Download job results as text
|
|
99
|
+
*/
|
|
100
|
+
getJobResultsTextRaw(requestParameters: GetJobResultsTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
101
|
+
/**
|
|
102
|
+
* Return the canonical background job results in a readable plain-text format.
|
|
103
|
+
* Download job results as text
|
|
104
|
+
*/
|
|
105
|
+
getJobResultsText(requestParameters: GetJobResultsTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
106
|
+
/**
|
|
107
|
+
* Creates request options for listJobs without sending the request
|
|
108
|
+
*/
|
|
109
|
+
listJobsRequestOpts(requestParameters: ListJobsRequest): Promise<runtime.RequestOpts>;
|
|
110
|
+
/**
|
|
111
|
+
* Return the authenticated user\'s paginated background job history.
|
|
112
|
+
* List background jobs
|
|
113
|
+
*/
|
|
114
|
+
listJobsRaw(requestParameters: ListJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientBackgroundJobPageResponse>>;
|
|
115
|
+
/**
|
|
116
|
+
* Return the authenticated user\'s paginated background job history.
|
|
117
|
+
* List background jobs
|
|
118
|
+
*/
|
|
119
|
+
listJobs(requestParameters?: ListJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientBackgroundJobPageResponse>;
|
|
120
|
+
/**
|
|
121
|
+
* Creates request options for scheduleFinderBatch without sending the request
|
|
122
|
+
*/
|
|
123
|
+
scheduleFinderBatchRequestOpts(requestParameters: ScheduleFinderBatchRequest): Promise<runtime.RequestOpts>;
|
|
124
|
+
/**
|
|
125
|
+
* Queue a background finder batch job with an optional deadline and callback URL.
|
|
126
|
+
* Schedule a finder batch
|
|
127
|
+
*/
|
|
128
|
+
scheduleFinderBatchRaw(requestParameters: ScheduleFinderBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientBackgroundJobResponse>>;
|
|
129
|
+
/**
|
|
130
|
+
* Queue a background finder batch job with an optional deadline and callback URL.
|
|
131
|
+
* Schedule a finder batch
|
|
132
|
+
*/
|
|
133
|
+
scheduleFinderBatch(requestParameters: ScheduleFinderBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientBackgroundJobResponse>;
|
|
134
|
+
/**
|
|
135
|
+
* Creates request options for scheduleProbeBatch without sending the request
|
|
136
|
+
*/
|
|
137
|
+
scheduleProbeBatchRequestOpts(requestParameters: ScheduleProbeBatchRequest): Promise<runtime.RequestOpts>;
|
|
138
|
+
/**
|
|
139
|
+
* Queue a background probe batch job with an optional deadline and callback URL.
|
|
140
|
+
* Schedule a probe batch
|
|
141
|
+
*/
|
|
142
|
+
scheduleProbeBatchRaw(requestParameters: ScheduleProbeBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientBackgroundJobResponse>>;
|
|
143
|
+
/**
|
|
144
|
+
* Queue a background probe batch job with an optional deadline and callback URL.
|
|
145
|
+
* Schedule a probe batch
|
|
146
|
+
*/
|
|
147
|
+
scheduleProbeBatch(requestParameters: ScheduleProbeBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientBackgroundJobResponse>;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @export
|
|
151
|
+
*/
|
|
152
|
+
export declare const ListJobsJobTypeEnum: {
|
|
153
|
+
readonly FinderBatch: "finder_batch";
|
|
154
|
+
readonly ProbeBatch: "probe_batch";
|
|
155
|
+
};
|
|
156
|
+
export type ListJobsJobTypeEnum = typeof ListJobsJobTypeEnum[keyof typeof ListJobsJobTypeEnum];
|
|
157
|
+
/**
|
|
158
|
+
* @export
|
|
159
|
+
*/
|
|
160
|
+
export declare const ListJobsStatusEnum: {
|
|
161
|
+
readonly Queued: "queued";
|
|
162
|
+
readonly Processing: "processing";
|
|
163
|
+
readonly Completed: "completed";
|
|
164
|
+
readonly Failed: "failed";
|
|
165
|
+
readonly Canceled: "canceled";
|
|
166
|
+
};
|
|
167
|
+
export type ListJobsStatusEnum = typeof ListJobsStatusEnum[keyof typeof ListJobsStatusEnum];
|
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Relentless Identity API
|
|
6
|
+
* Public client API for Finder and Probe workflows. This spec is generated from the FastAPI app, then narrowed to the supported bearer-authenticated routes used by SDKs and the API reference.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ListJobsStatusEnum = exports.ListJobsJobTypeEnum = exports.JobsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
class JobsApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Creates request options for getJob without sending the request
|
|
33
|
+
*/
|
|
34
|
+
getJobRequestOpts(requestParameters) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (requestParameters['jobId'] == null) {
|
|
37
|
+
throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling getJob().');
|
|
38
|
+
}
|
|
39
|
+
const queryParameters = {};
|
|
40
|
+
if (requestParameters['page'] != null) {
|
|
41
|
+
queryParameters['page'] = requestParameters['page'];
|
|
42
|
+
}
|
|
43
|
+
if (requestParameters['pageSize'] != null) {
|
|
44
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
45
|
+
}
|
|
46
|
+
const headerParameters = {};
|
|
47
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
48
|
+
const token = this.configuration.accessToken;
|
|
49
|
+
const tokenString = yield token("bearerAuth", []);
|
|
50
|
+
if (tokenString) {
|
|
51
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
let urlPath = `/client/jobs/{job_id}`;
|
|
55
|
+
urlPath = urlPath.replace(`{${"job_id"}}`, encodeURIComponent(String(requestParameters['jobId'])));
|
|
56
|
+
return {
|
|
57
|
+
path: urlPath,
|
|
58
|
+
method: 'GET',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Return the current status and paginated results for one background job.
|
|
66
|
+
* Get background job
|
|
67
|
+
*/
|
|
68
|
+
getJobRaw(requestParameters, initOverrides) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const requestOptions = yield this.getJobRequestOpts(requestParameters);
|
|
71
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
72
|
+
return new runtime.JSONApiResponse(response);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Return the current status and paginated results for one background job.
|
|
77
|
+
* Get background job
|
|
78
|
+
*/
|
|
79
|
+
getJob(requestParameters, initOverrides) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const response = yield this.getJobRaw(requestParameters, initOverrides);
|
|
82
|
+
return yield response.value();
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Creates request options for getJobInputsText without sending the request
|
|
87
|
+
*/
|
|
88
|
+
getJobInputsTextRequestOpts(requestParameters) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
if (requestParameters['jobId'] == null) {
|
|
91
|
+
throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling getJobInputsText().');
|
|
92
|
+
}
|
|
93
|
+
const queryParameters = {};
|
|
94
|
+
const headerParameters = {};
|
|
95
|
+
if (requestParameters['ifNoneMatch'] != null) {
|
|
96
|
+
headerParameters['if-none-match'] = String(requestParameters['ifNoneMatch']);
|
|
97
|
+
}
|
|
98
|
+
if (requestParameters['ifModifiedSince'] != null) {
|
|
99
|
+
headerParameters['if-modified-since'] = String(requestParameters['ifModifiedSince']);
|
|
100
|
+
}
|
|
101
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
102
|
+
const token = this.configuration.accessToken;
|
|
103
|
+
const tokenString = yield token("bearerAuth", []);
|
|
104
|
+
if (tokenString) {
|
|
105
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
let urlPath = `/client/jobs/{job_id}/inputs.txt`;
|
|
109
|
+
urlPath = urlPath.replace(`{${"job_id"}}`, encodeURIComponent(String(requestParameters['jobId'])));
|
|
110
|
+
return {
|
|
111
|
+
path: urlPath,
|
|
112
|
+
method: 'GET',
|
|
113
|
+
headers: headerParameters,
|
|
114
|
+
query: queryParameters,
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Return the original background job inputs as plain text when the payload is still retained.
|
|
120
|
+
* Download job inputs
|
|
121
|
+
*/
|
|
122
|
+
getJobInputsTextRaw(requestParameters, initOverrides) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
const requestOptions = yield this.getJobInputsTextRequestOpts(requestParameters);
|
|
125
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
126
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
127
|
+
return new runtime.JSONApiResponse(response);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
return new runtime.TextApiResponse(response);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Return the original background job inputs as plain text when the payload is still retained.
|
|
136
|
+
* Download job inputs
|
|
137
|
+
*/
|
|
138
|
+
getJobInputsText(requestParameters, initOverrides) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
const response = yield this.getJobInputsTextRaw(requestParameters, initOverrides);
|
|
141
|
+
return yield response.value();
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Creates request options for getJobResultsJson without sending the request
|
|
146
|
+
*/
|
|
147
|
+
getJobResultsJsonRequestOpts(requestParameters) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
if (requestParameters['jobId'] == null) {
|
|
150
|
+
throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling getJobResultsJson().');
|
|
151
|
+
}
|
|
152
|
+
const queryParameters = {};
|
|
153
|
+
const headerParameters = {};
|
|
154
|
+
if (requestParameters['ifNoneMatch'] != null) {
|
|
155
|
+
headerParameters['if-none-match'] = String(requestParameters['ifNoneMatch']);
|
|
156
|
+
}
|
|
157
|
+
if (requestParameters['ifModifiedSince'] != null) {
|
|
158
|
+
headerParameters['if-modified-since'] = String(requestParameters['ifModifiedSince']);
|
|
159
|
+
}
|
|
160
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
161
|
+
const token = this.configuration.accessToken;
|
|
162
|
+
const tokenString = yield token("bearerAuth", []);
|
|
163
|
+
if (tokenString) {
|
|
164
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
let urlPath = `/client/jobs/{job_id}/results.json`;
|
|
168
|
+
urlPath = urlPath.replace(`{${"job_id"}}`, encodeURIComponent(String(requestParameters['jobId'])));
|
|
169
|
+
return {
|
|
170
|
+
path: urlPath,
|
|
171
|
+
method: 'GET',
|
|
172
|
+
headers: headerParameters,
|
|
173
|
+
query: queryParameters,
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Return the canonical immutable background job results artifact as JSON.
|
|
179
|
+
* Download job results as JSON
|
|
180
|
+
*/
|
|
181
|
+
getJobResultsJsonRaw(requestParameters, initOverrides) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
const requestOptions = yield this.getJobResultsJsonRequestOpts(requestParameters);
|
|
184
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
185
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
186
|
+
return new runtime.JSONApiResponse(response);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
return new runtime.TextApiResponse(response);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Return the canonical immutable background job results artifact as JSON.
|
|
195
|
+
* Download job results as JSON
|
|
196
|
+
*/
|
|
197
|
+
getJobResultsJson(requestParameters, initOverrides) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
const response = yield this.getJobResultsJsonRaw(requestParameters, initOverrides);
|
|
200
|
+
return yield response.value();
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Creates request options for getJobResultsText without sending the request
|
|
205
|
+
*/
|
|
206
|
+
getJobResultsTextRequestOpts(requestParameters) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
if (requestParameters['jobId'] == null) {
|
|
209
|
+
throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling getJobResultsText().');
|
|
210
|
+
}
|
|
211
|
+
const queryParameters = {};
|
|
212
|
+
const headerParameters = {};
|
|
213
|
+
if (requestParameters['ifNoneMatch'] != null) {
|
|
214
|
+
headerParameters['if-none-match'] = String(requestParameters['ifNoneMatch']);
|
|
215
|
+
}
|
|
216
|
+
if (requestParameters['ifModifiedSince'] != null) {
|
|
217
|
+
headerParameters['if-modified-since'] = String(requestParameters['ifModifiedSince']);
|
|
218
|
+
}
|
|
219
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
220
|
+
const token = this.configuration.accessToken;
|
|
221
|
+
const tokenString = yield token("bearerAuth", []);
|
|
222
|
+
if (tokenString) {
|
|
223
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
let urlPath = `/client/jobs/{job_id}/results.txt`;
|
|
227
|
+
urlPath = urlPath.replace(`{${"job_id"}}`, encodeURIComponent(String(requestParameters['jobId'])));
|
|
228
|
+
return {
|
|
229
|
+
path: urlPath,
|
|
230
|
+
method: 'GET',
|
|
231
|
+
headers: headerParameters,
|
|
232
|
+
query: queryParameters,
|
|
233
|
+
};
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Return the canonical background job results in a readable plain-text format.
|
|
238
|
+
* Download job results as text
|
|
239
|
+
*/
|
|
240
|
+
getJobResultsTextRaw(requestParameters, initOverrides) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
const requestOptions = yield this.getJobResultsTextRequestOpts(requestParameters);
|
|
243
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
244
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
245
|
+
return new runtime.JSONApiResponse(response);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
return new runtime.TextApiResponse(response);
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Return the canonical background job results in a readable plain-text format.
|
|
254
|
+
* Download job results as text
|
|
255
|
+
*/
|
|
256
|
+
getJobResultsText(requestParameters, initOverrides) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
const response = yield this.getJobResultsTextRaw(requestParameters, initOverrides);
|
|
259
|
+
return yield response.value();
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Creates request options for listJobs without sending the request
|
|
264
|
+
*/
|
|
265
|
+
listJobsRequestOpts(requestParameters) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
const queryParameters = {};
|
|
268
|
+
if (requestParameters['page'] != null) {
|
|
269
|
+
queryParameters['page'] = requestParameters['page'];
|
|
270
|
+
}
|
|
271
|
+
if (requestParameters['pageSize'] != null) {
|
|
272
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
273
|
+
}
|
|
274
|
+
if (requestParameters['jobType'] != null) {
|
|
275
|
+
queryParameters['job_type'] = requestParameters['jobType'];
|
|
276
|
+
}
|
|
277
|
+
if (requestParameters['status'] != null) {
|
|
278
|
+
queryParameters['status'] = requestParameters['status'];
|
|
279
|
+
}
|
|
280
|
+
const headerParameters = {};
|
|
281
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
282
|
+
const token = this.configuration.accessToken;
|
|
283
|
+
const tokenString = yield token("bearerAuth", []);
|
|
284
|
+
if (tokenString) {
|
|
285
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
let urlPath = `/client/jobs`;
|
|
289
|
+
return {
|
|
290
|
+
path: urlPath,
|
|
291
|
+
method: 'GET',
|
|
292
|
+
headers: headerParameters,
|
|
293
|
+
query: queryParameters,
|
|
294
|
+
};
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Return the authenticated user\'s paginated background job history.
|
|
299
|
+
* List background jobs
|
|
300
|
+
*/
|
|
301
|
+
listJobsRaw(requestParameters, initOverrides) {
|
|
302
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
+
const requestOptions = yield this.listJobsRequestOpts(requestParameters);
|
|
304
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
305
|
+
return new runtime.JSONApiResponse(response);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Return the authenticated user\'s paginated background job history.
|
|
310
|
+
* List background jobs
|
|
311
|
+
*/
|
|
312
|
+
listJobs() {
|
|
313
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
314
|
+
const response = yield this.listJobsRaw(requestParameters, initOverrides);
|
|
315
|
+
return yield response.value();
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Creates request options for scheduleFinderBatch without sending the request
|
|
320
|
+
*/
|
|
321
|
+
scheduleFinderBatchRequestOpts(requestParameters) {
|
|
322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
323
|
+
if (requestParameters['finderBatchJobRequest'] == null) {
|
|
324
|
+
throw new runtime.RequiredError('finderBatchJobRequest', 'Required parameter "finderBatchJobRequest" was null or undefined when calling scheduleFinderBatch().');
|
|
325
|
+
}
|
|
326
|
+
const queryParameters = {};
|
|
327
|
+
const headerParameters = {};
|
|
328
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
329
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
330
|
+
const token = this.configuration.accessToken;
|
|
331
|
+
const tokenString = yield token("bearerAuth", []);
|
|
332
|
+
if (tokenString) {
|
|
333
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
let urlPath = `/client/jobs/finder`;
|
|
337
|
+
return {
|
|
338
|
+
path: urlPath,
|
|
339
|
+
method: 'POST',
|
|
340
|
+
headers: headerParameters,
|
|
341
|
+
query: queryParameters,
|
|
342
|
+
body: requestParameters['finderBatchJobRequest'],
|
|
343
|
+
};
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Queue a background finder batch job with an optional deadline and callback URL.
|
|
348
|
+
* Schedule a finder batch
|
|
349
|
+
*/
|
|
350
|
+
scheduleFinderBatchRaw(requestParameters, initOverrides) {
|
|
351
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
352
|
+
const requestOptions = yield this.scheduleFinderBatchRequestOpts(requestParameters);
|
|
353
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
354
|
+
return new runtime.JSONApiResponse(response);
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Queue a background finder batch job with an optional deadline and callback URL.
|
|
359
|
+
* Schedule a finder batch
|
|
360
|
+
*/
|
|
361
|
+
scheduleFinderBatch(requestParameters, initOverrides) {
|
|
362
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
363
|
+
const response = yield this.scheduleFinderBatchRaw(requestParameters, initOverrides);
|
|
364
|
+
return yield response.value();
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Creates request options for scheduleProbeBatch without sending the request
|
|
369
|
+
*/
|
|
370
|
+
scheduleProbeBatchRequestOpts(requestParameters) {
|
|
371
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
372
|
+
if (requestParameters['probeBatchJobBackgroundRequest'] == null) {
|
|
373
|
+
throw new runtime.RequiredError('probeBatchJobBackgroundRequest', 'Required parameter "probeBatchJobBackgroundRequest" was null or undefined when calling scheduleProbeBatch().');
|
|
374
|
+
}
|
|
375
|
+
const queryParameters = {};
|
|
376
|
+
const headerParameters = {};
|
|
377
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
378
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
379
|
+
const token = this.configuration.accessToken;
|
|
380
|
+
const tokenString = yield token("bearerAuth", []);
|
|
381
|
+
if (tokenString) {
|
|
382
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
let urlPath = `/client/jobs/probe-batch`;
|
|
386
|
+
return {
|
|
387
|
+
path: urlPath,
|
|
388
|
+
method: 'POST',
|
|
389
|
+
headers: headerParameters,
|
|
390
|
+
query: queryParameters,
|
|
391
|
+
body: requestParameters['probeBatchJobBackgroundRequest'],
|
|
392
|
+
};
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Queue a background probe batch job with an optional deadline and callback URL.
|
|
397
|
+
* Schedule a probe batch
|
|
398
|
+
*/
|
|
399
|
+
scheduleProbeBatchRaw(requestParameters, initOverrides) {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
const requestOptions = yield this.scheduleProbeBatchRequestOpts(requestParameters);
|
|
402
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
403
|
+
return new runtime.JSONApiResponse(response);
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Queue a background probe batch job with an optional deadline and callback URL.
|
|
408
|
+
* Schedule a probe batch
|
|
409
|
+
*/
|
|
410
|
+
scheduleProbeBatch(requestParameters, initOverrides) {
|
|
411
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
412
|
+
const response = yield this.scheduleProbeBatchRaw(requestParameters, initOverrides);
|
|
413
|
+
return yield response.value();
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
exports.JobsApi = JobsApi;
|
|
418
|
+
/**
|
|
419
|
+
* @export
|
|
420
|
+
*/
|
|
421
|
+
exports.ListJobsJobTypeEnum = {
|
|
422
|
+
FinderBatch: 'finder_batch',
|
|
423
|
+
ProbeBatch: 'probe_batch'
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* @export
|
|
427
|
+
*/
|
|
428
|
+
exports.ListJobsStatusEnum = {
|
|
429
|
+
Queued: 'queued',
|
|
430
|
+
Processing: 'processing',
|
|
431
|
+
Completed: 'completed',
|
|
432
|
+
Failed: 'failed',
|
|
433
|
+
Canceled: 'canceled'
|
|
434
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relentless Identity API
|
|
3
|
+
* Public client API for Finder and Probe workflows. This spec is generated from the FastAPI app, then narrowed to the supported bearer-authenticated routes used by SDKs and the API reference.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.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 * as runtime from '../runtime';
|
|
13
|
+
import type { ClientBatchIdentityResponse, ClientIdentityResponse, ProbeBatchRequest, ProbeRequest } from '../models/index';
|
|
14
|
+
export interface ProbeBatchOperationRequest {
|
|
15
|
+
probeBatchRequest: ProbeBatchRequest;
|
|
16
|
+
}
|
|
17
|
+
export interface ProbeEmailRequest {
|
|
18
|
+
probeRequest: ProbeRequest;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export declare class ProbeApi extends runtime.BaseAPI {
|
|
24
|
+
/**
|
|
25
|
+
* Creates request options for probeBatch without sending the request
|
|
26
|
+
*/
|
|
27
|
+
probeBatchRequestOpts(requestParameters: ProbeBatchOperationRequest): Promise<runtime.RequestOpts>;
|
|
28
|
+
/**
|
|
29
|
+
* Send many known email addresses and receive compact per-item identity results plus a batch summary.
|
|
30
|
+
* Verify many email addresses
|
|
31
|
+
*/
|
|
32
|
+
probeBatchRaw(requestParameters: ProbeBatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientBatchIdentityResponse>>;
|
|
33
|
+
/**
|
|
34
|
+
* Send many known email addresses and receive compact per-item identity results plus a batch summary.
|
|
35
|
+
* Verify many email addresses
|
|
36
|
+
*/
|
|
37
|
+
probeBatch(requestParameters: ProbeBatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientBatchIdentityResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Creates request options for probeEmail without sending the request
|
|
40
|
+
*/
|
|
41
|
+
probeEmailRequestOpts(requestParameters: ProbeEmailRequest): Promise<runtime.RequestOpts>;
|
|
42
|
+
/**
|
|
43
|
+
* Send a single email address to verify it directly.
|
|
44
|
+
* Verify an email address
|
|
45
|
+
*/
|
|
46
|
+
probeEmailRaw(requestParameters: ProbeEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientIdentityResponse>>;
|
|
47
|
+
/**
|
|
48
|
+
* Send a single email address to verify it directly.
|
|
49
|
+
* Verify an email address
|
|
50
|
+
*/
|
|
51
|
+
probeEmail(requestParameters: ProbeEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientIdentityResponse>;
|
|
52
|
+
}
|