@virusis/api-client 0.1.5 → 0.1.7

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,12 +5079,44 @@ 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
+ /**
5084
+ * @param body (optional)
5085
+ * @return OK
5086
+ */
5087
+ link(body?: TrialAnonAuthLinkDto | undefined, signal?: AbortSignal): Promise<any>;
5088
+ /**
5089
+ * @param body (optional)
5090
+ * @return OK
5091
+ */
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
+ });
5083
5101
  /**
5084
5102
  * @param body (optional)
5085
5103
  * @return OK
5086
5104
  */
5087
- trialer(body?: TrialUserForTrialerDto | undefined, signal?: AbortSignal): Promise<any>;
5105
+ link(body?: TrialAnonAuthLinkDto | undefined, signal?: AbortSignal): Promise<any>;
5106
+ protected processLink(response: Response): Promise<any>;
5107
+ /**
5108
+ * @param body (optional)
5109
+ * @return OK
5110
+ */
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>;
5088
5120
  /**
5089
5121
  * @return OK
5090
5122
  */
@@ -5102,11 +5134,11 @@ export declare class TrialAuthClient extends BaseApiClient implements ITrialAuth
5102
5134
  fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
5103
5135
  });
5104
5136
  /**
5105
- * @param body (optional)
5137
+ * @param dh (optional)
5106
5138
  * @return OK
5107
5139
  */
5108
- trialer(body?: TrialUserForTrialerDto | undefined, signal?: AbortSignal): Promise<any>;
5109
- protected processTrialer(response: Response): Promise<any>;
5140
+ trk(dh?: string | undefined, signal?: AbortSignal): Promise<any>;
5141
+ protected processTrk(response: Response): Promise<any>;
5110
5142
  /**
5111
5143
  * @return OK
5112
5144
  */
@@ -9142,6 +9174,16 @@ export interface ThreatRuleVersionListIDataResult extends IEntity {
9142
9174
  readonly message?: string | undefined;
9143
9175
  readonly data?: ThreatRuleVersion[] | undefined;
9144
9176
  }
9177
+ export interface TrialAnonAuthLinkDto extends IDto {
9178
+ dh?: string | undefined;
9179
+ trk?: string;
9180
+ anon?: string | undefined;
9181
+ redirectUri?: string | undefined;
9182
+ }
9183
+ export interface TrialAnonFinalizeDto extends IDto {
9184
+ code?: string | undefined;
9185
+ state?: string | undefined;
9186
+ }
9145
9187
  export interface TrialUser extends IEntity {
9146
9188
  id?: number;
9147
9189
  baseUserId?: number;
@@ -9191,13 +9233,6 @@ export interface TrialUserForTableFilterDataTableQuery extends IFilter {
9191
9233
  skip?: number;
9192
9234
  take?: number;
9193
9235
  }
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
9236
  export interface TrialUserIDataResult extends IEntity {
9202
9237
  readonly success?: boolean;
9203
9238
  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,48 @@ 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
+ url_ = url_.replace(/[?&]$/, "");
18195
+ const content_ = JSON.stringify(body);
18196
+ let options_ = {
18197
+ body: content_,
18198
+ method: "POST",
18199
+ signal,
18200
+ headers: {
18201
+ "Content-Type": "application/json",
18202
+ }
18203
+ };
18204
+ return this.http.fetch(url_, options_).then((_response) => {
18205
+ return this.processLink(_response);
18206
+ });
18207
+ }
18208
+ processLink(response) {
18209
+ const status = response.status;
18210
+ let _headers = {};
18211
+ if (response.headers && response.headers.forEach) {
18212
+ response.headers.forEach((v, k) => _headers[k] = v);
18213
+ }
18214
+ ;
18215
+ if (status === 200) {
18216
+ return response.text().then((_responseText) => {
18217
+ const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
18218
+ return result200;
18219
+ });
18220
+ }
18221
+ else if (status !== 200 && status !== 204) {
18222
+ return response.text().then((_responseText) => {
18223
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
18224
+ });
18225
+ }
18226
+ return Promise.resolve(null);
18227
+ }
18228
+ /**
18229
+ * @param body (optional)
18230
+ * @return OK
18231
+ */
18232
+ finalize(body, signal) {
18233
+ let url_ = this.baseUrl + "/api/TrialAuth/anon/finalize";
18194
18234
  url_ = url_.replace(/[?&]$/, "");
18195
18235
  const content_ = JSON.stringify(body);
18196
18236
  let options_ = {
@@ -18202,10 +18242,58 @@ export class TrialAuthClient extends BaseApiClient {
18202
18242
  }
18203
18243
  };
18204
18244
  return this.http.fetch(url_, options_).then((_response) => {
18205
- return this.processTrialer(_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) + "&";
18286
+ url_ = url_.replace(/[?&]$/, "");
18287
+ let options_ = {
18288
+ method: "GET",
18289
+ signal,
18290
+ headers: {}
18291
+ };
18292
+ return this.http.fetch(url_, options_).then((_response) => {
18293
+ return this.processTrk(_response);
18206
18294
  });
18207
18295
  }
18208
- processTrialer(response) {
18296
+ processTrk(response) {
18209
18297
  const status = response.status;
18210
18298
  let _headers = {};
18211
18299
  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.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",