@virusis/api-client 0.1.1 → 0.1.4
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.
|
@@ -277,6 +277,10 @@ export interface IAuthClient extends IEntity {
|
|
|
277
277
|
* @return OK
|
|
278
278
|
*/
|
|
279
279
|
forgotPassword(email?: string | undefined, signal?: AbortSignal): Promise<any>;
|
|
280
|
+
/**
|
|
281
|
+
* @return OK
|
|
282
|
+
*/
|
|
283
|
+
csrfToken(signal?: AbortSignal): Promise<any>;
|
|
280
284
|
}
|
|
281
285
|
export declare class AuthClient extends BaseApiClient implements IAuthClient {
|
|
282
286
|
private http;
|
|
@@ -321,6 +325,11 @@ export declare class AuthClient extends BaseApiClient implements IAuthClient {
|
|
|
321
325
|
*/
|
|
322
326
|
forgotPassword(email?: string | undefined, signal?: AbortSignal): Promise<any>;
|
|
323
327
|
protected processForgotPassword(response: Response): Promise<any>;
|
|
328
|
+
/**
|
|
329
|
+
* @return OK
|
|
330
|
+
*/
|
|
331
|
+
csrfToken(signal?: AbortSignal): Promise<any>;
|
|
332
|
+
protected processCsrfToken(response: Response): Promise<any>;
|
|
324
333
|
}
|
|
325
334
|
export interface IBaseUserDevicesClient extends IEntity {
|
|
326
335
|
/**
|
|
@@ -5071,16 +5080,6 @@ export declare class ThreatRuleVersionsClient extends BaseApiClient implements I
|
|
|
5071
5080
|
protected processGetFiltersBase(response: Response): Promise<ThreatRuleVersionForTableDtoListResultFilterIDataResult>;
|
|
5072
5081
|
}
|
|
5073
5082
|
export interface ITrialAuthClient extends IEntity {
|
|
5074
|
-
/**
|
|
5075
|
-
* @param body (optional)
|
|
5076
|
-
* @return OK
|
|
5077
|
-
*/
|
|
5078
|
-
login(body?: TrialUserForLoginDto | undefined, signal?: AbortSignal): Promise<any>;
|
|
5079
|
-
/**
|
|
5080
|
-
* @param body (optional)
|
|
5081
|
-
* @return OK
|
|
5082
|
-
*/
|
|
5083
|
-
register(body?: TrialUserForRegisterDto | undefined, signal?: AbortSignal): Promise<any>;
|
|
5084
5083
|
/**
|
|
5085
5084
|
* @param body (optional)
|
|
5086
5085
|
* @return OK
|
|
@@ -5094,18 +5093,6 @@ export declare class TrialAuthClient extends BaseApiClient implements ITrialAuth
|
|
|
5094
5093
|
constructor(configuration: ApiClientConfig, baseUrl?: string, http?: {
|
|
5095
5094
|
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
5096
5095
|
});
|
|
5097
|
-
/**
|
|
5098
|
-
* @param body (optional)
|
|
5099
|
-
* @return OK
|
|
5100
|
-
*/
|
|
5101
|
-
login(body?: TrialUserForLoginDto | undefined, signal?: AbortSignal): Promise<any>;
|
|
5102
|
-
protected processLogin(response: Response): Promise<any>;
|
|
5103
|
-
/**
|
|
5104
|
-
* @param body (optional)
|
|
5105
|
-
* @return OK
|
|
5106
|
-
*/
|
|
5107
|
-
register(body?: TrialUserForRegisterDto | undefined, signal?: AbortSignal): Promise<any>;
|
|
5108
|
-
protected processRegister(response: Response): Promise<any>;
|
|
5109
5096
|
/**
|
|
5110
5097
|
* @param body (optional)
|
|
5111
5098
|
* @return OK
|
|
@@ -9144,18 +9131,6 @@ export interface TrialUser extends IEntity {
|
|
|
9144
9131
|
updateTime?: Date | undefined;
|
|
9145
9132
|
status?: boolean | undefined;
|
|
9146
9133
|
}
|
|
9147
|
-
export interface TrialUserForLoginDto extends IDto {
|
|
9148
|
-
email?: string | undefined;
|
|
9149
|
-
password?: string | undefined;
|
|
9150
|
-
deviceInfo?: DeviceInfoDto;
|
|
9151
|
-
}
|
|
9152
|
-
export interface TrialUserForRegisterDto extends IDto {
|
|
9153
|
-
email?: string | undefined;
|
|
9154
|
-
password?: string | undefined;
|
|
9155
|
-
nickName?: string | undefined;
|
|
9156
|
-
trackingId?: string;
|
|
9157
|
-
deviceInfo?: DeviceInfoDto;
|
|
9158
|
-
}
|
|
9159
9134
|
export interface TrialUserForTableDto extends IDto {
|
|
9160
9135
|
id?: number;
|
|
9161
9136
|
nickName?: string | undefined;
|
|
@@ -9199,8 +9174,11 @@ export interface TrialUserForTableFilterDataTableQuery extends IFilter {
|
|
|
9199
9174
|
take?: number;
|
|
9200
9175
|
}
|
|
9201
9176
|
export interface TrialUserForTrialerDto extends IDto {
|
|
9202
|
-
|
|
9203
|
-
|
|
9177
|
+
trackingId?: string;
|
|
9178
|
+
viewKey?: string;
|
|
9179
|
+
nickName?: string | undefined;
|
|
9180
|
+
email?: string | undefined;
|
|
9181
|
+
deviceInfo?: DeviceInfoDto;
|
|
9204
9182
|
}
|
|
9205
9183
|
export interface TrialUserIDataResult extends IEntity {
|
|
9206
9184
|
readonly success?: boolean;
|
package/dist/generated/index.js
CHANGED
|
@@ -897,7 +897,8 @@ export class AuthClient extends BaseApiClient {
|
|
|
897
897
|
;
|
|
898
898
|
if (status === 200) {
|
|
899
899
|
return response.text().then((_responseText) => {
|
|
900
|
-
|
|
900
|
+
const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
901
|
+
return result200;
|
|
901
902
|
});
|
|
902
903
|
}
|
|
903
904
|
else if (status !== 200 && status !== 204) {
|
|
@@ -936,7 +937,8 @@ export class AuthClient extends BaseApiClient {
|
|
|
936
937
|
;
|
|
937
938
|
if (status === 200) {
|
|
938
939
|
return response.text().then((_responseText) => {
|
|
939
|
-
|
|
940
|
+
const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
941
|
+
return result200;
|
|
940
942
|
});
|
|
941
943
|
}
|
|
942
944
|
else if (status !== 200 && status !== 204) {
|
|
@@ -975,7 +977,8 @@ export class AuthClient extends BaseApiClient {
|
|
|
975
977
|
;
|
|
976
978
|
if (status === 200) {
|
|
977
979
|
return response.text().then((_responseText) => {
|
|
978
|
-
|
|
980
|
+
const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
981
|
+
return result200;
|
|
979
982
|
});
|
|
980
983
|
}
|
|
981
984
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1014,7 +1017,8 @@ export class AuthClient extends BaseApiClient {
|
|
|
1014
1017
|
;
|
|
1015
1018
|
if (status === 200) {
|
|
1016
1019
|
return response.text().then((_responseText) => {
|
|
1017
|
-
|
|
1020
|
+
const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1021
|
+
return result200;
|
|
1018
1022
|
});
|
|
1019
1023
|
}
|
|
1020
1024
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1053,7 +1057,8 @@ export class AuthClient extends BaseApiClient {
|
|
|
1053
1057
|
;
|
|
1054
1058
|
if (status === 200) {
|
|
1055
1059
|
return response.text().then((_responseText) => {
|
|
1056
|
-
|
|
1060
|
+
const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1061
|
+
return result200;
|
|
1057
1062
|
});
|
|
1058
1063
|
}
|
|
1059
1064
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1092,7 +1097,43 @@ export class AuthClient extends BaseApiClient {
|
|
|
1092
1097
|
;
|
|
1093
1098
|
if (status === 200) {
|
|
1094
1099
|
return response.text().then((_responseText) => {
|
|
1095
|
-
|
|
1100
|
+
const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1101
|
+
return result200;
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
else if (status !== 200 && status !== 204) {
|
|
1105
|
+
return response.text().then((_responseText) => {
|
|
1106
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
return Promise.resolve(null);
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* @return OK
|
|
1113
|
+
*/
|
|
1114
|
+
csrfToken(signal) {
|
|
1115
|
+
let url_ = this.baseUrl + "/api/Auth/CsrfToken";
|
|
1116
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1117
|
+
let options_ = {
|
|
1118
|
+
method: "GET",
|
|
1119
|
+
signal,
|
|
1120
|
+
headers: {}
|
|
1121
|
+
};
|
|
1122
|
+
return this.http.fetch(url_, options_).then((_response) => {
|
|
1123
|
+
return this.processCsrfToken(_response);
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
processCsrfToken(response) {
|
|
1127
|
+
const status = response.status;
|
|
1128
|
+
let _headers = {};
|
|
1129
|
+
if (response.headers && response.headers.forEach) {
|
|
1130
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
1131
|
+
}
|
|
1132
|
+
;
|
|
1133
|
+
if (status === 200) {
|
|
1134
|
+
return response.text().then((_responseText) => {
|
|
1135
|
+
const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1136
|
+
return result200;
|
|
1096
1137
|
});
|
|
1097
1138
|
}
|
|
1098
1139
|
else if (status !== 200 && status !== 204) {
|
|
@@ -18144,84 +18185,6 @@ export class TrialAuthClient extends BaseApiClient {
|
|
|
18144
18185
|
this.http = http ? http : { fetch: buildAuthFetch(configuration) };
|
|
18145
18186
|
this.baseUrl = (baseUrl ?? configuration.baseUrl ?? "").replace(/\/+$/, "").replace(/\/api$/, "");
|
|
18146
18187
|
}
|
|
18147
|
-
/**
|
|
18148
|
-
* @param body (optional)
|
|
18149
|
-
* @return OK
|
|
18150
|
-
*/
|
|
18151
|
-
login(body, signal) {
|
|
18152
|
-
let url_ = this.baseUrl + "/api/TrialAuth/Login";
|
|
18153
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
18154
|
-
const content_ = JSON.stringify(body);
|
|
18155
|
-
let options_ = {
|
|
18156
|
-
body: content_,
|
|
18157
|
-
method: "POST",
|
|
18158
|
-
signal,
|
|
18159
|
-
headers: {
|
|
18160
|
-
"Content-Type": "application/json",
|
|
18161
|
-
}
|
|
18162
|
-
};
|
|
18163
|
-
return this.http.fetch(url_, options_).then((_response) => {
|
|
18164
|
-
return this.processLogin(_response);
|
|
18165
|
-
});
|
|
18166
|
-
}
|
|
18167
|
-
processLogin(response) {
|
|
18168
|
-
const status = response.status;
|
|
18169
|
-
let _headers = {};
|
|
18170
|
-
if (response.headers && response.headers.forEach) {
|
|
18171
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
18172
|
-
}
|
|
18173
|
-
;
|
|
18174
|
-
if (status === 200) {
|
|
18175
|
-
return response.text().then((_responseText) => {
|
|
18176
|
-
return;
|
|
18177
|
-
});
|
|
18178
|
-
}
|
|
18179
|
-
else if (status !== 200 && status !== 204) {
|
|
18180
|
-
return response.text().then((_responseText) => {
|
|
18181
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
18182
|
-
});
|
|
18183
|
-
}
|
|
18184
|
-
return Promise.resolve(null);
|
|
18185
|
-
}
|
|
18186
|
-
/**
|
|
18187
|
-
* @param body (optional)
|
|
18188
|
-
* @return OK
|
|
18189
|
-
*/
|
|
18190
|
-
register(body, signal) {
|
|
18191
|
-
let url_ = this.baseUrl + "/api/TrialAuth/Register";
|
|
18192
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
18193
|
-
const content_ = JSON.stringify(body);
|
|
18194
|
-
let options_ = {
|
|
18195
|
-
body: content_,
|
|
18196
|
-
method: "POST",
|
|
18197
|
-
signal,
|
|
18198
|
-
headers: {
|
|
18199
|
-
"Content-Type": "application/json",
|
|
18200
|
-
}
|
|
18201
|
-
};
|
|
18202
|
-
return this.http.fetch(url_, options_).then((_response) => {
|
|
18203
|
-
return this.processRegister(_response);
|
|
18204
|
-
});
|
|
18205
|
-
}
|
|
18206
|
-
processRegister(response) {
|
|
18207
|
-
const status = response.status;
|
|
18208
|
-
let _headers = {};
|
|
18209
|
-
if (response.headers && response.headers.forEach) {
|
|
18210
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
18211
|
-
}
|
|
18212
|
-
;
|
|
18213
|
-
if (status === 200) {
|
|
18214
|
-
return response.text().then((_responseText) => {
|
|
18215
|
-
return;
|
|
18216
|
-
});
|
|
18217
|
-
}
|
|
18218
|
-
else if (status !== 200 && status !== 204) {
|
|
18219
|
-
return response.text().then((_responseText) => {
|
|
18220
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
18221
|
-
});
|
|
18222
|
-
}
|
|
18223
|
-
return Promise.resolve(null);
|
|
18224
|
-
}
|
|
18225
18188
|
/**
|
|
18226
18189
|
* @param body (optional)
|
|
18227
18190
|
* @return OK
|
|
@@ -18251,7 +18214,8 @@ export class TrialAuthClient extends BaseApiClient {
|
|
|
18251
18214
|
;
|
|
18252
18215
|
if (status === 200) {
|
|
18253
18216
|
return response.text().then((_responseText) => {
|
|
18254
|
-
|
|
18217
|
+
const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
18218
|
+
return result200;
|
|
18255
18219
|
});
|
|
18256
18220
|
}
|
|
18257
18221
|
else if (status !== 200 && status !== 204) {
|
|
@@ -468,8 +468,6 @@ export * from "./threat-rule-version-for-table-filter-data-table-query.js";
|
|
|
468
468
|
export * from "./threat-rule-version-i-data-result.js";
|
|
469
469
|
export * from "./threat-rule-version-list-i-data-result.js";
|
|
470
470
|
export * from "./trial-user.js";
|
|
471
|
-
export * from "./trial-user-for-login-dto.js";
|
|
472
|
-
export * from "./trial-user-for-register-dto.js";
|
|
473
471
|
export * from "./trial-user-for-table-dto.js";
|
|
474
472
|
export * from "./trial-user-for-table-dto-list-i-data-result.js";
|
|
475
473
|
export * from "./trial-user-for-table-dto-list-result-filter.js";
|
|
@@ -468,8 +468,6 @@ export * from "./threat-rule-version-for-table-filter-data-table-query.js";
|
|
|
468
468
|
export * from "./threat-rule-version-i-data-result.js";
|
|
469
469
|
export * from "./threat-rule-version-list-i-data-result.js";
|
|
470
470
|
export * from "./trial-user.js";
|
|
471
|
-
export * from "./trial-user-for-login-dto.js";
|
|
472
|
-
export * from "./trial-user-for-register-dto.js";
|
|
473
471
|
export * from "./trial-user-for-table-dto.js";
|
|
474
472
|
export * from "./trial-user-for-table-dto-list-i-data-result.js";
|
|
475
473
|
export * from "./trial-user-for-table-dto-list-result-filter.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@virusis/api-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"build": "tsc -p tsconfig.json",
|
|
30
30
|
"test": "vitest run",
|
|
31
31
|
"ci": "npm run generate && npm run build && npm test",
|
|
32
|
-
"release": "npm run ci && npm publish --access=
|
|
32
|
+
"release": "npm run ci && npm publish --access=public",
|
|
33
33
|
"pack:local": "node -e \"require('fs').mkdirSync('packages',{recursive:true});\" && npm pack --pack-destination ./packages",
|
|
34
34
|
"fetch:spec": "node scripts/fetch-spec.mjs",
|
|
35
|
-
"gen:python": "npm run fetch:spec && npx openapi-generator-cli generate -g python -i specs/openapi.json -o out/python --package-name virusis_api_client",
|
|
36
|
-
"gen:flutter": "npm run fetch:spec && npx openapi-generator-cli generate -g dart-dio
|
|
35
|
+
"gen:python": "npm run fetch:spec && npx @openapitools/openapi-generator-cli generate -g python -i specs/openapi.json -o out/python --package-name virusis_api_client",
|
|
36
|
+
"gen:flutter": "npm run fetch:spec && npx @openapitools/openapi-generator-cli generate -g dart-dio -i specs/openapi.json -o out/flutter --additional-properties=pubName=virusis_api_client",
|
|
37
37
|
"gen:all": "npm run gen:python && npm run gen:flutter",
|
|
38
38
|
"version:auto": "standard-version --skip.tag --skip.commit"
|
|
39
39
|
},
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"dist"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"openapi-generator-cli": "^1.0.0",
|
|
45
44
|
"rxjs": "^7.8.2"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
47
|
+
"@openapitools/openapi-generator-cli": "^7.6.0",
|
|
48
48
|
"standard-version": "^9.5.0",
|
|
49
49
|
"typescript": "^5.4.0",
|
|
50
50
|
"vitest": "^4.0.15"
|