@virusis/api-client 0.1.5 → 0.1.6

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.
@@ -55,6 +55,7 @@ export declare function getServices(): {
55
55
  threatRuleConceptsService: import("./index.js").ThreatRuleConceptsClient;
56
56
  threatRulesService: import("./index.js").ThreatRulesClient;
57
57
  threatRuleVersionsService: import("./index.js").ThreatRuleVersionsClient;
58
+ anonService: import("./index.js").AnonClient;
58
59
  trialAuthService: import("./index.js").TrialAuthClient;
59
60
  trialUserOperationClaimsService: import("./index.js").TrialUserOperationClaimsClient;
60
61
  trialUsersService: import("./index.js").TrialUsersClient;
@@ -111,6 +112,7 @@ export declare function getServicesRx(): {
111
112
  threatRuleConceptsService: import("./index.js").ThreatRuleConceptsClient;
112
113
  threatRulesService: import("./index.js").ThreatRulesClient;
113
114
  threatRuleVersionsService: import("./index.js").ThreatRuleVersionsClient;
115
+ anonService: import("./index.js").AnonClient;
114
116
  trialAuthService: import("./index.js").TrialAuthClient;
115
117
  trialUserOperationClaimsService: import("./index.js").TrialUserOperationClaimsClient;
116
118
  trialUsersService: import("./index.js").TrialUsersClient;
@@ -168,6 +170,7 @@ export declare function getServicesByMode(mode?: ClientMode): {
168
170
  threatRuleConceptsService: import("./index.js").ThreatRuleConceptsClient;
169
171
  threatRulesService: import("./index.js").ThreatRulesClient;
170
172
  threatRuleVersionsService: import("./index.js").ThreatRuleVersionsClient;
173
+ anonService: import("./index.js").AnonClient;
171
174
  trialAuthService: import("./index.js").TrialAuthClient;
172
175
  trialUserOperationClaimsService: import("./index.js").TrialUserOperationClaimsClient;
173
176
  trialUsersService: import("./index.js").TrialUsersClient;
@@ -0,0 +1,2 @@
1
+ export { AnonClient, AnonClient as AnonService, IAnonClient } from "../index.js";
2
+ export { AnonClient as anonService, IAnonClient as iAnonClient } from "../index.js";
@@ -0,0 +1,2 @@
1
+ export { AnonClient, AnonClient as AnonService } from "../index.js";
2
+ export { AnonClient as anonService } from "../index.js";
@@ -42,6 +42,7 @@ export * from "./threat-frameworks-service.js";
42
42
  export * from "./threat-rule-concepts-service.js";
43
43
  export * from "./threat-rules-service.js";
44
44
  export * from "./threat-rule-versions-service.js";
45
+ export * from "./anon-service.js";
45
46
  export * from "./trial-auth-service.js";
46
47
  export * from "./trial-user-operation-claims-service.js";
47
48
  export * from "./trial-users-service.js";
@@ -42,6 +42,7 @@ export * from "./threat-frameworks-service.js";
42
42
  export * from "./threat-rule-concepts-service.js";
43
43
  export * from "./threat-rules-service.js";
44
44
  export * from "./threat-rule-versions-service.js";
45
+ export * from "./anon-service.js";
45
46
  export * from "./trial-auth-service.js";
46
47
  export * from "./trial-user-operation-claims-service.js";
47
48
  export * from "./trial-users-service.js";
@@ -0,0 +1,16 @@
1
+ import { AnonClient } from "../index.js";
2
+ import type { ApiClientConfig } from "../../base.js";
3
+ export declare function createAnonServiceRx(config: ApiClientConfig, baseUrl?: string, http?: {
4
+ fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
5
+ }): import("../../rx.js").Rxified<AnonClient>;
6
+ export type AnonServiceRx = ReturnType<typeof createAnonServiceRx>;
7
+ export declare const anonServiceRx: (config: ApiClientConfig, baseUrl?: string, http?: {
8
+ fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
9
+ }) => import("../../rx.js").Rxified<AnonClient>;
10
+ export declare class AnonServiceRxClass {
11
+ constructor(config: ApiClientConfig, baseUrl?: string, http?: {
12
+ fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
13
+ });
14
+ }
15
+ export interface AnonServiceRxClass extends AnonServiceRx {
16
+ }
@@ -0,0 +1,12 @@
1
+ import { AnonClient } from "../index.js";
2
+ import { rxifyClient } from "../../rx.js";
3
+ export function createAnonServiceRx(config, baseUrl, http) {
4
+ return rxifyClient(new AnonClient(config, baseUrl, http));
5
+ }
6
+ export const anonServiceRx = (config, baseUrl, http) => createAnonServiceRx(config, baseUrl, http);
7
+ // Angular DI icin: class token kullandiginda Observable donen wrapper
8
+ export class AnonServiceRxClass {
9
+ constructor(config, baseUrl, http) {
10
+ return createAnonServiceRx(config, baseUrl, http);
11
+ }
12
+ }
@@ -42,6 +42,7 @@ export * from "./threat-frameworks-service-rx.js";
42
42
  export * from "./threat-rule-concepts-service-rx.js";
43
43
  export * from "./threat-rules-service-rx.js";
44
44
  export * from "./threat-rule-versions-service-rx.js";
45
+ export * from "./anon-service-rx.js";
45
46
  export * from "./trial-auth-service-rx.js";
46
47
  export * from "./trial-user-operation-claims-service-rx.js";
47
48
  export * from "./trial-users-service-rx.js";
@@ -42,6 +42,7 @@ export * from "./threat-frameworks-service-rx.js";
42
42
  export * from "./threat-rule-concepts-service-rx.js";
43
43
  export * from "./threat-rules-service-rx.js";
44
44
  export * from "./threat-rule-versions-service-rx.js";
45
+ export * from "./anon-service-rx.js";
45
46
  export * from "./trial-auth-service-rx.js";
46
47
  export * from "./trial-user-operation-claims-service-rx.js";
47
48
  export * from "./trial-users-service-rx.js";
@@ -5079,20 +5079,48 @@ export declare class ThreatRuleVersionsClient extends BaseApiClient implements I
5079
5079
  getFiltersBase(body?: ThreatRuleVersionForTableFilterDataTableQuery | undefined, signal?: AbortSignal): Promise<ThreatRuleVersionForTableDtoListResultFilterIDataResult>;
5080
5080
  protected processGetFiltersBase(response: Response): Promise<ThreatRuleVersionForTableDtoListResultFilterIDataResult>;
5081
5081
  }
5082
- export interface ITrialAuthClient extends IEntity {
5082
+ export interface IAnonClient extends IEntity {
5083
5083
  /**
5084
5084
  * @param body (optional)
5085
5085
  * @return OK
5086
5086
  */
5087
- trialer(body?: TrialUserForTrialerDto | undefined, signal?: AbortSignal): Promise<any>;
5087
+ link(body?: TrialAnonAuthLinkDto | undefined, signal?: AbortSignal): Promise<any>;
5088
5088
  /**
5089
+ * @param body (optional)
5089
5090
  * @return OK
5090
5091
  */
5091
- me(signal?: AbortSignal): Promise<any>;
5092
+ finalize(body?: TrialAnonFinalizeDto | undefined, signal?: AbortSignal): Promise<any>;
5093
+ }
5094
+ export declare class AnonClient extends BaseApiClient implements IAnonClient {
5095
+ private http;
5096
+ private baseUrl;
5097
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
5098
+ constructor(configuration: ApiClientConfig, baseUrl?: string, http?: {
5099
+ fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
5100
+ });
5092
5101
  /**
5102
+ * @param body (optional)
5103
+ * @return OK
5104
+ */
5105
+ link(body?: TrialAnonAuthLinkDto | undefined, signal?: AbortSignal): Promise<any>;
5106
+ protected processLink(response: Response): Promise<any>;
5107
+ /**
5108
+ * @param body (optional)
5093
5109
  * @return OK
5094
5110
  */
5095
- logout(signal?: AbortSignal): Promise<any>;
5111
+ finalize(body?: TrialAnonFinalizeDto | undefined, signal?: AbortSignal): Promise<any>;
5112
+ protected processFinalize(response: Response): Promise<any>;
5113
+ }
5114
+ export interface ITrialAuthClient extends IEntity {
5115
+ /**
5116
+ * @param dh (optional)
5117
+ * @return OK
5118
+ */
5119
+ trk(dh?: string | undefined, signal?: AbortSignal): Promise<any>;
5120
+ /**
5121
+ * @return OK
5122
+ */
5123
+ me(signal?: AbortSignal): Promise<any>;
5096
5124
  }
5097
5125
  export declare class TrialAuthClient extends BaseApiClient implements ITrialAuthClient {
5098
5126
  private http;
@@ -5102,21 +5130,16 @@ export declare class TrialAuthClient extends BaseApiClient implements ITrialAuth
5102
5130
  fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
5103
5131
  });
5104
5132
  /**
5105
- * @param body (optional)
5133
+ * @param dh (optional)
5106
5134
  * @return OK
5107
5135
  */
5108
- trialer(body?: TrialUserForTrialerDto | undefined, signal?: AbortSignal): Promise<any>;
5109
- protected processTrialer(response: Response): Promise<any>;
5136
+ trk(dh?: string | undefined, signal?: AbortSignal): Promise<any>;
5137
+ protected processTrk(response: Response): Promise<any>;
5110
5138
  /**
5111
5139
  * @return OK
5112
5140
  */
5113
5141
  me(signal?: AbortSignal): Promise<any>;
5114
5142
  protected processMe(response: Response): Promise<any>;
5115
- /**
5116
- * @return OK
5117
- */
5118
- logout(signal?: AbortSignal): Promise<any>;
5119
- protected processLogout(response: Response): Promise<any>;
5120
5143
  }
5121
5144
  export interface ITrialUserOperationClaimsClient extends IEntity {
5122
5145
  /**
@@ -9142,6 +9165,16 @@ export interface ThreatRuleVersionListIDataResult extends IEntity {
9142
9165
  readonly message?: string | undefined;
9143
9166
  readonly data?: ThreatRuleVersion[] | undefined;
9144
9167
  }
9168
+ export interface TrialAnonAuthLinkDto extends IDto {
9169
+ dh?: string | undefined;
9170
+ trk?: string;
9171
+ anon?: string | undefined;
9172
+ redirectUri?: string | undefined;
9173
+ }
9174
+ export interface TrialAnonFinalizeDto extends IDto {
9175
+ code?: string | undefined;
9176
+ state?: string | undefined;
9177
+ }
9145
9178
  export interface TrialUser extends IEntity {
9146
9179
  id?: number;
9147
9180
  baseUserId?: number;
@@ -9191,13 +9224,6 @@ export interface TrialUserForTableFilterDataTableQuery extends IFilter {
9191
9224
  skip?: number;
9192
9225
  take?: number;
9193
9226
  }
9194
- export interface TrialUserForTrialerDto extends IDto {
9195
- trackingId?: string;
9196
- viewKey?: string;
9197
- nickName?: string | undefined;
9198
- email?: string | undefined;
9199
- deviceInfo?: DeviceInfoDto;
9200
- }
9201
9227
  export interface TrialUserIDataResult extends IEntity {
9202
9228
  readonly success?: boolean;
9203
9229
  readonly message?: string | undefined;
@@ -18178,7 +18178,7 @@ export class ThreatRuleVersionsClient extends BaseApiClient {
18178
18178
  return Promise.resolve(null);
18179
18179
  }
18180
18180
  }
18181
- export class TrialAuthClient extends BaseApiClient {
18181
+ export class AnonClient extends BaseApiClient {
18182
18182
  constructor(configuration, baseUrl, http) {
18183
18183
  super(configuration);
18184
18184
  this.jsonParseReviver = undefined;
@@ -18189,8 +18189,8 @@ export class TrialAuthClient extends BaseApiClient {
18189
18189
  * @param body (optional)
18190
18190
  * @return OK
18191
18191
  */
18192
- trialer(body, signal) {
18193
- let url_ = this.baseUrl + "/api/TrialAuth/Trialer";
18192
+ link(body, signal) {
18193
+ let url_ = this.baseUrl + "/api/TrialAuth/anon/link";
18194
18194
  url_ = url_.replace(/[?&]$/, "");
18195
18195
  const content_ = JSON.stringify(body);
18196
18196
  let options_ = {
@@ -18202,10 +18202,10 @@ export class TrialAuthClient extends BaseApiClient {
18202
18202
  }
18203
18203
  };
18204
18204
  return this.http.fetch(url_, options_).then((_response) => {
18205
- return this.processTrialer(_response);
18205
+ return this.processLink(_response);
18206
18206
  });
18207
18207
  }
18208
- processTrialer(response) {
18208
+ processLink(response) {
18209
18209
  const status = response.status;
18210
18210
  let _headers = {};
18211
18211
  if (response.headers && response.headers.forEach) {
@@ -18226,10 +18226,63 @@ export class TrialAuthClient extends BaseApiClient {
18226
18226
  return Promise.resolve(null);
18227
18227
  }
18228
18228
  /**
18229
+ * @param body (optional)
18229
18230
  * @return OK
18230
18231
  */
18231
- me(signal) {
18232
- let url_ = this.baseUrl + "/api/TrialAuth/Me";
18232
+ finalize(body, signal) {
18233
+ let url_ = this.baseUrl + "/api/TrialAuth/anon/finalize";
18234
+ url_ = url_.replace(/[?&]$/, "");
18235
+ const content_ = JSON.stringify(body);
18236
+ let options_ = {
18237
+ body: content_,
18238
+ method: "POST",
18239
+ signal,
18240
+ headers: {
18241
+ "Content-Type": "application/json",
18242
+ }
18243
+ };
18244
+ return this.http.fetch(url_, options_).then((_response) => {
18245
+ return this.processFinalize(_response);
18246
+ });
18247
+ }
18248
+ processFinalize(response) {
18249
+ const status = response.status;
18250
+ let _headers = {};
18251
+ if (response.headers && response.headers.forEach) {
18252
+ response.headers.forEach((v, k) => _headers[k] = v);
18253
+ }
18254
+ ;
18255
+ if (status === 200) {
18256
+ return response.text().then((_responseText) => {
18257
+ const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
18258
+ return result200;
18259
+ });
18260
+ }
18261
+ else if (status !== 200 && status !== 204) {
18262
+ return response.text().then((_responseText) => {
18263
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
18264
+ });
18265
+ }
18266
+ return Promise.resolve(null);
18267
+ }
18268
+ }
18269
+ export class TrialAuthClient extends BaseApiClient {
18270
+ constructor(configuration, baseUrl, http) {
18271
+ super(configuration);
18272
+ this.jsonParseReviver = undefined;
18273
+ this.http = http ? http : { fetch: buildAuthFetch(configuration) };
18274
+ this.baseUrl = (baseUrl ?? configuration.baseUrl ?? "").replace(/\/+$/, "").replace(/\/api$/, "");
18275
+ }
18276
+ /**
18277
+ * @param dh (optional)
18278
+ * @return OK
18279
+ */
18280
+ trk(dh, signal) {
18281
+ let url_ = this.baseUrl + "/api/TrialAuth/Trk?";
18282
+ if (dh === null)
18283
+ throw new globalThis.Error("The parameter 'dh' cannot be null.");
18284
+ else if (dh !== undefined)
18285
+ url_ += "dh=" + encodeURIComponent("" + dh) + "&";
18233
18286
  url_ = url_.replace(/[?&]$/, "");
18234
18287
  let options_ = {
18235
18288
  method: "GET",
@@ -18237,10 +18290,10 @@ export class TrialAuthClient extends BaseApiClient {
18237
18290
  headers: {}
18238
18291
  };
18239
18292
  return this.http.fetch(url_, options_).then((_response) => {
18240
- return this.processMe(_response);
18293
+ return this.processTrk(_response);
18241
18294
  });
18242
18295
  }
18243
- processMe(response) {
18296
+ processTrk(response) {
18244
18297
  const status = response.status;
18245
18298
  let _headers = {};
18246
18299
  if (response.headers && response.headers.forEach) {
@@ -18263,19 +18316,19 @@ export class TrialAuthClient extends BaseApiClient {
18263
18316
  /**
18264
18317
  * @return OK
18265
18318
  */
18266
- logout(signal) {
18267
- let url_ = this.baseUrl + "/api/TrialAuth/Logout";
18319
+ me(signal) {
18320
+ let url_ = this.baseUrl + "/api/TrialAuth/Me";
18268
18321
  url_ = url_.replace(/[?&]$/, "");
18269
18322
  let options_ = {
18270
- method: "POST",
18323
+ method: "GET",
18271
18324
  signal,
18272
18325
  headers: {}
18273
18326
  };
18274
18327
  return this.http.fetch(url_, options_).then((_response) => {
18275
- return this.processLogout(_response);
18328
+ return this.processMe(_response);
18276
18329
  });
18277
18330
  }
18278
- processLogout(response) {
18331
+ processMe(response) {
18279
18332
  const status = response.status;
18280
18333
  let _headers = {};
18281
18334
  if (response.headers && response.headers.forEach) {
@@ -467,6 +467,8 @@ export * from "./threat-rule-version-for-table-filter.js";
467
467
  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
+ export * from "./trial-anon-auth-link-dto.js";
471
+ export * from "./trial-anon-finalize-dto.js";
470
472
  export * from "./trial-user.js";
471
473
  export * from "./trial-user-for-table-dto.js";
472
474
  export * from "./trial-user-for-table-dto-list-i-data-result.js";
@@ -474,7 +476,6 @@ export * from "./trial-user-for-table-dto-list-result-filter.js";
474
476
  export * from "./trial-user-for-table-dto-list-result-filter-i-data-result.js";
475
477
  export * from "./trial-user-for-table-filter.js";
476
478
  export * from "./trial-user-for-table-filter-data-table-query.js";
477
- export * from "./trial-user-for-trialer-dto.js";
478
479
  export * from "./trial-user-i-data-result.js";
479
480
  export * from "./trial-user-list-i-data-result.js";
480
481
  export * from "./trial-user-operation-claim.js";
@@ -467,6 +467,8 @@ export * from "./threat-rule-version-for-table-filter.js";
467
467
  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
+ export * from "./trial-anon-auth-link-dto.js";
471
+ export * from "./trial-anon-finalize-dto.js";
470
472
  export * from "./trial-user.js";
471
473
  export * from "./trial-user-for-table-dto.js";
472
474
  export * from "./trial-user-for-table-dto-list-i-data-result.js";
@@ -474,7 +476,6 @@ export * from "./trial-user-for-table-dto-list-result-filter.js";
474
476
  export * from "./trial-user-for-table-dto-list-result-filter-i-data-result.js";
475
477
  export * from "./trial-user-for-table-filter.js";
476
478
  export * from "./trial-user-for-table-filter-data-table-query.js";
477
- export * from "./trial-user-for-trialer-dto.js";
478
479
  export * from "./trial-user-i-data-result.js";
479
480
  export * from "./trial-user-list-i-data-result.js";
480
481
  export * from "./trial-user-operation-claim.js";
@@ -0,0 +1,4 @@
1
+ import type { TrialAnonAuthLinkDto as __TrialAnonAuthLinkDto } from "../index.js";
2
+ export declare const TrialAnonAuthLinkDto: __TrialAnonAuthLinkDto;
3
+ export type TrialAnonAuthLinkDto = __TrialAnonAuthLinkDto;
4
+ export type trialAnonAuthLinkDto = __TrialAnonAuthLinkDto;
@@ -0,0 +1 @@
1
+ export const TrialAnonAuthLinkDto = {};
@@ -0,0 +1,4 @@
1
+ import type { TrialAnonFinalizeDto as __TrialAnonFinalizeDto } from "../index.js";
2
+ export declare const TrialAnonFinalizeDto: __TrialAnonFinalizeDto;
3
+ export type TrialAnonFinalizeDto = __TrialAnonFinalizeDto;
4
+ export type trialAnonFinalizeDto = __TrialAnonFinalizeDto;
@@ -0,0 +1 @@
1
+ export const TrialAnonFinalizeDto = {};
package/dist/rx.d.ts CHANGED
@@ -147,6 +147,9 @@ export declare function createAllClients(cfg: ApiClientConfig, baseUrl?: string,
147
147
  ThreatRuleVersionsClient: ClientCtors.ThreatRuleVersionsClient;
148
148
  ThreatRuleVersionsService: ClientCtors.ThreatRuleVersionsClient;
149
149
  threatRuleVersionsService: ClientCtors.ThreatRuleVersionsClient;
150
+ AnonClient: ClientCtors.AnonClient;
151
+ AnonService: ClientCtors.AnonClient;
152
+ anonService: ClientCtors.AnonClient;
150
153
  TrialAuthClient: ClientCtors.TrialAuthClient;
151
154
  TrialAuthService: ClientCtors.TrialAuthClient;
152
155
  trialAuthService: ClientCtors.TrialAuthClient;
@@ -311,6 +314,9 @@ export declare function createAllRxClients(cfg: ApiClientConfig, baseUrl?: strin
311
314
  ThreatRuleVersionsClient: Rxified<ClientCtors.ThreatRuleVersionsClient>;
312
315
  ThreatRuleVersionsService: Rxified<ClientCtors.ThreatRuleVersionsClient>;
313
316
  threatRuleVersionsService: Rxified<ClientCtors.ThreatRuleVersionsClient>;
317
+ AnonClient: Rxified<ClientCtors.AnonClient>;
318
+ AnonService: Rxified<ClientCtors.AnonClient>;
319
+ anonService: Rxified<ClientCtors.AnonClient>;
314
320
  TrialAuthClient: Rxified<ClientCtors.TrialAuthClient>;
315
321
  TrialAuthService: Rxified<ClientCtors.TrialAuthClient>;
316
322
  trialAuthService: Rxified<ClientCtors.TrialAuthClient>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virusis/api-client",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",