Skip to content

Commit

Permalink
RID-4054 ESlint - reformat some of the files
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszszafran committed Oct 19, 2023
1 parent dd3e8d7 commit 29946d1
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 57 deletions.
9 changes: 5 additions & 4 deletions projects/ngx-ts-riskid/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
},
platformBrowserDynamicTesting(),
{
teardown: { destroyAfterEach: false },
}
);
109 changes: 56 additions & 53 deletions projects/ngx-ts-riskid/src/types/web_sdk.ts
Original file line number Diff line number Diff line change
@@ -1,67 +1,70 @@
export interface ActionResponse {
/** The token return by the SDK when the action was reported */
actionToken?: string;
/** The token return by the SDK when the action was reported */
actionToken?: string;
}
export interface InitOptions {
/** Opaque identifier of the user in your system */
userId?: string;
/** Opaque identifier of the user in your system */
userId?: string;
}
/**
* Initial parameters for SDK
*/
export interface ConstructorOptions {
/** Print logs to console */
verbose?: boolean;
/**
* Your server URL
*
* Default value is https://collect.riskid.security
*/
serverPath?: string;
/** Print logs to console */
verbose?: boolean;
/**
* Your server URL
*
* Default value is https://collect.riskid.security
*/
serverPath?: string;
}
export interface ActionEventOptions {
/** Any ID that could help relate the action with external context or session */
correlationId?: string;
/**
* User ID of the not yet authenticated user, used to enhance risk and
* trust assessments. Once the user is authenticated,
* {@link TSAccountProtection.setAuthenticatedUser} should be called.
*/
claimedUserId?: string;
/** Any ID that could help relate the action with external context or session */
correlationId?: string;
/**
* User ID of the not yet authenticated user, used to enhance risk and
* trust assessments. Once the user is authenticated,
* {@link TSAccountProtection.setAuthenticatedUser} should be called.
*/
claimedUserId?: string;
}

export declare class TSAccountProtection {
/**
*
* Creates a new Account Protection SDK instance with your client context
* @param clientId Your AccountProtection client identifier
* @param options SDK configuration options
*/
constructor(clientId: string, options?: ConstructorOptions);
/**
* Initializes the AccountProtection SDK, which starts automatically tracking and submitting info of the user journey
* @param options Init options
* @returns Indicates if the call succeeded
*/
init(options?: InitOptions): Promise<boolean>;
/**
* Reports a user action event to the SDK
* @param actionType Type of user action event that was predefined in the Transmit Security server
* @returns Indicates if the call succeeded
*/
triggerActionEvent(actionType: string, options?: ActionEventOptions): Promise<ActionResponse>;
/**
* Sets the user context for all subsequent events in the browser session (or until the user is explicitly cleared)
* It should be set only after you've fully authenticated the user (including, for example, any 2FA that was required)
* @param userId Opaque identifier of the user in your system
* @param options Reserved for future use
* @returns Indicates if the call succeeded
*/
setAuthenticatedUser(userId: string, options?: {}): Promise<boolean>;
/**
* Clears the user context for all subsequent events in the browser session
* @param options Reserved for future use
* @returns Indicates if the call succeeded
*/
clearUser(options?: {}): Promise<boolean>;
/**
*
* Creates a new Account Protection SDK instance with your client context
* @param clientId Your AccountProtection client identifier
* @param options SDK configuration options
*/
constructor(clientId: string, options?: ConstructorOptions);
/**
* Initializes the AccountProtection SDK, which starts automatically tracking and submitting info of the user journey
* @param options Init options
* @returns Indicates if the call succeeded
*/
init(options?: InitOptions): Promise<boolean>;
/**
* Reports a user action event to the SDK
* @param actionType Type of user action event that was predefined in the Transmit Security server
* @returns Indicates if the call succeeded
*/
triggerActionEvent(
actionType: string,
options?: ActionEventOptions
): Promise<ActionResponse>;
/**
* Sets the user context for all subsequent events in the browser session (or until the user is explicitly cleared)
* It should be set only after you've fully authenticated the user (including, for example, any 2FA that was required)
* @param userId Opaque identifier of the user in your system
* @param options Reserved for future use
* @returns Indicates if the call succeeded
*/
setAuthenticatedUser(userId: string, options?: {}): Promise<boolean>;
/**
* Clears the user context for all subsequent events in the browser session
* @param options Reserved for future use
* @returns Indicates if the call succeeded
*/
clearUser(options?: {}): Promise<boolean>;
}

0 comments on commit 29946d1

Please sign in to comment.