From 50bb513a600c689de9d79697fe6954c1c184bb94 Mon Sep 17 00:00:00 2001 From: kamal-skyflow Date: Wed, 19 Jul 2023 18:24:40 +0530 Subject: [PATCH] chore: made suggested changes in js sdk comments --- .../external/collect/collect-container.ts | 48 +++++------ src/core/external/collect/collect-element.ts | 26 +++--- .../collect/compose-collect-container.ts | 20 ++--- .../collect/compose-collect-element.ts | 10 +-- src/core/external/reveal/reveal-container.ts | 32 +++---- src/core/external/reveal/reveal-element.ts | 18 ++-- src/skyflow.ts | 56 ++++++------- src/utils/common/index.ts | 84 +++++++++---------- 8 files changed, 147 insertions(+), 147 deletions(-) diff --git a/src/core/external/collect/collect-container.ts b/src/core/external/collect/collect-container.ts index 2fbbc8a4..0ffbe2dd 100644 --- a/src/core/external/collect/collect-container.ts +++ b/src/core/external/collect/collect-container.ts @@ -33,35 +33,35 @@ import { import Container from '../common/container'; import CollectElement from './collect-element'; -/** Type of Skyflow element. */ +/** Type of Skyflow Element. */ export interface CollectElementInput { - /** The table this data belongs to */ + /** Table this data belongs to */ table?: string; - /** The data should be inserted into the column. */ + /** Data should be inserted into the column. */ column?: string; - /** The styles should be applied to the form element. */ + /** Styles should be applied to the form element. */ inputStyles?: object; - /** The label for the form element. */ + /** Label for the form element. */ label?: string; - /** The styles applied to the label of the collect element. */ + /** Styles applied to the label of the collect element. */ labelStyles?: object; - /** The styles that apply to the error text of the collect element will be added. */ + /** Styles that apply to the error text of the collect element will be added. */ errorTextStyles?: object; - /** This is a placeholder for the form element. */ + /** A placeholder for the form element. */ placeholder?: string; /** Skyflow.ElementType enum */ type: ElementType; - /** The string acts as an initial value for the collect element. */ + /** It string acts as an initial value for the Collect Element. */ altText?: string; - /** A set of validations for collect element. */ + /** A set of validations for Collect Element. */ validations?: IValidationRule[] - /** The element's SkyflowID. */ + /** SkyflowID fo the element. */ skyflowID?: string; } -/** This class wraps the options for the Collect method. */ +/** Wraps the options for the Collect method. */ export interface ICollectOptions { - /** The property indicates whether to return tokens for the collected data. It defaults to 'true'. */ + /** Indicates whether to return tokens for the collected data. It defaults to 'true'. */ tokens?: boolean; /** Insert the non-PCI elements data into the vault in the format of the records object. */ additionalFields?: IInsertRecordInput; @@ -71,7 +71,7 @@ export interface ICollectOptions { const CLASS_NAME = 'CollectContainer'; /** - * @class This class wraps all collect elements. + * @class Wraps all collect elements. */ class CollectContainer extends Container { #containerId: string; @@ -83,7 +83,7 @@ class CollectContainer extends Container { #context:Context; #skyflowElements:any; - /** The type of the container. */ + /** Type of the container. */ type:string = ContainerType.COLLECT; /** @internal */ @@ -128,10 +128,10 @@ class CollectContainer extends Container { } /** - * We call this method to create the Skyflow Collect element. - * @param input Collect element input. - * @param options Collect element options. - * @returns The method returns the collect element. + * Creates the Skyflow Collect Element. + * @param input Collect Element input. + * @param options Collect Element options. + * @returns Returns the collect element. */ create = (input: CollectElementInput, options: any = { required: false, @@ -272,9 +272,9 @@ class CollectContainer extends Container { }; /** - * This method collects the data and sends it to the vault. - * @param options It collects the data and sends it to the vault. - * @returns It returns the inserted data or the error. + * Collects the data and sends it to the vault. + * @param options Collects the data and sends it to the vault. + * @returns Returns the inserted data or the error. */ collect = (options: ICollectOptions = { tokens: true }) => new Promise((resolve, reject) => { try { @@ -326,8 +326,8 @@ class CollectContainer extends Container { }); /** - * This method inserts file type data into the vault. - * @returns It returns the inserted data. + * Inserts file type data into the vault. + * @returns Returns the inserted data. */ uploadFiles = (options) => new Promise((resolve, reject) => { try { diff --git a/src/core/external/collect/collect-element.ts b/src/core/external/collect/collect-element.ts index e742a60c..74eb19e7 100644 --- a/src/core/external/collect/collect-element.ts +++ b/src/core/external/collect/collect-element.ts @@ -33,17 +33,17 @@ import { ContainerType } from '../../../skyflow'; const CLASS_NAME = 'Element'; /** - * The create method returns the type of Skyflow collect elements. + * The create method returns the type of Skyflow Collect Elements. * @class CollectElement */ class CollectElement extends SkyflowElement { - /** The type of collect element. */ + /** Type of the Collect Element. */ elementType: string; - /** The type of container. */ + /** Type of the container. */ type: string = ContainerType.COLLECT; #elementId: string; - /** The id of the container. */ + /** Id of the container. */ containerId: string; #isSingleElementAPI: boolean = false; @@ -143,7 +143,7 @@ class CollectElement extends SkyflowElement { getID = () => this.#elementId; /** - * This method inserts the element into the specified div. + * Inserts the element into the specified div. * @param domElement The native HTML element that mounts inside the iframe. */ mount = (domElement) => { @@ -187,7 +187,7 @@ class CollectElement extends SkyflowElement { }; /** - * This method resets any collect element to its initial state. + * Resets any collect element to its initial state. */ unmount = () => { this.#iframe.unmount(); @@ -331,8 +331,8 @@ class CollectElement extends SkyflowElement { // listening to element events and error messages on iframe // todo: off methods /** - * This method communicates with Skyflow elements/iframes by listening to an event. - * @param eventName The name of the event. + * Communicates with Skyflow elements/iframes by listening to an event. + * @param eventName Name of the event. * @param handler You provide a callback function that gets called when the event is fired with the state. */ on(eventName: string, handler) { @@ -493,8 +493,8 @@ class CollectElement extends SkyflowElement { } /** - * This method sets the error text for the element, overriding all current errors on the element with the custom error message passed. - * @param clientErrorText The error text value. + * Sets the error text for the element, overriding all current errors on the element with the custom error message passed. + * @param clientErrorText Error text value. */ setError(clientErrorText:string) { this.#bus.emit(ELEMENT_EVENTS_TO_IFRAME.COLLECT_ELEMENT_SET_ERROR, @@ -506,7 +506,7 @@ class CollectElement extends SkyflowElement { } /** - * This method clears the custom error message that is set using setError. + * Clears the custom error message that is set using setError. */ resetError() { this.#bus.emit(ELEMENT_EVENTS_TO_IFRAME.COLLECT_ELEMENT_SET_ERROR, @@ -517,7 +517,7 @@ class CollectElement extends SkyflowElement { } /** - * This method sets the value of the element. + * Sets the value of the element. * @param elementValue Any value for the element. */ setValue(elementValue:string) { @@ -540,7 +540,7 @@ class CollectElement extends SkyflowElement { } /** - * This method resets the value of the element. + * Resets the value of the element. */ clearValue() { if (this.#context.env === Env.PROD) { diff --git a/src/core/external/collect/compose-collect-container.ts b/src/core/external/collect/compose-collect-container.ts index 7e296476..6fd9ee52 100644 --- a/src/core/external/collect/compose-collect-container.ts +++ b/src/core/external/collect/compose-collect-container.ts @@ -60,7 +60,7 @@ interface ICollectOptions { const CLASS_NAME = 'CollectContainer'; /** - * This container wraps all the composable elements. + * Wraps all the Composable Elements. * @class ComposableContainer */ class ComposableContainer extends Container { @@ -85,7 +85,7 @@ class ComposableContainer extends Container { #options: any; #containerElement:any; - /** The type of container. */ + /** Type of the container. */ type:string = ContainerType.COMPOSABLE; #containerMounted: boolean = false; @@ -143,10 +143,10 @@ class ComposableContainer extends Container { } /** - * This method creates the skyflow collect element. + * Creates the Skyflow Collect Element. * @param input Collect element input. * @param options Collect element options. - * @returns This method returns the collect element. + * @returns Returns the collect element. */ create = (input: CollectElementInput, options: any = { required: false, @@ -265,8 +265,8 @@ class ComposableContainer extends Container { }; /** - * This method helps to communicate with Skyflow elements/iframes by listening to an event. - * @param eventName The name of the event. + * Helps to communicate with Skyflow elements/iframes by listening to an event. + * @param eventName Name of the event. * @param handler You provide a callback function that gets called when the event is fired with the state. */ on = (eventName:string, handler:any) => { @@ -298,7 +298,7 @@ class ComposableContainer extends Container { }; /** - * This method inserts the element into the specified div. + * Inserts the element into the specified div. * @param domElement The native HTML element that mounts inside the iframe. */ mount = (domElement) => { @@ -353,16 +353,16 @@ class ComposableContainer extends Container { }; /** - * This method resets any collect element to its initial state. + * Resets any collect element to its initial state. */ unmount = () => { this.#containerElement.unmount(); }; /** - * This method collects the data and sends it to the vault. + * Collects the data and sends it to the vault. * @param options Takes collect options as input. - * @returns This method returns the inserted data or the error. + * @returns Returns the inserted data or the error. */ collect = (options: ICollectOptions = { tokens: true }) => new Promise((resolve, reject) => { try { diff --git a/src/core/external/collect/compose-collect-element.ts b/src/core/external/collect/compose-collect-element.ts index 2d5bf715..879da9c5 100644 --- a/src/core/external/collect/compose-collect-element.ts +++ b/src/core/external/collect/compose-collect-element.ts @@ -9,7 +9,7 @@ import SKYFLOW_ERROR_CODE from '../../../utils/constants'; import { ELEMENT_EVENTS_TO_CLIENT, ELEMENT_EVENTS_TO_IFRAME } from '../../constants'; /** - * The create method returns an instance of Skyflow composable elements. + * The create method returns an instance of Skyflow Composable Elements. * @class ComposableElement */ class ComposableElement { @@ -33,8 +33,8 @@ class ComposableElement { } /** - * This method helps to communicate with Skyflow elements/iframes by listening to an event. - * @param eventName The name of the event. + * Helps to communicate with Skyflow elements/iframes by listening to an event. + * @param eventName Name of the event. * @param handler You provide a callback function that gets called when the event is fired with the state. */ on(eventName: string, handler: any) { @@ -71,8 +71,8 @@ class ComposableElement { } /** - * The configuration of elements inside the composable container is updated. - * @param options This parameter takes an object for the insertion. + * Updates the configuration of elements inside the composable container. + * @param options Takes an object for the insertion. */ update = (options) => { this.#isUpdateCalled = true; diff --git a/src/core/external/reveal/reveal-container.ts b/src/core/external/reveal/reveal-container.ts index 9345dae9..5e73dd96 100644 --- a/src/core/external/reveal/reveal-container.ts +++ b/src/core/external/reveal/reveal-container.ts @@ -23,38 +23,38 @@ import { import Container from '../common/container'; import RevealElement from './reveal-element'; -/** This configuration handles skyflow reveal elements. */ +/** This configuration handles Skyflow Reveal Elements. */ export interface IRevealElementInput { /** A Skyflow token that would be detokenised. */ token?: string; - /** The redaction type of the revealed data. */ + /** Redaction type of the revealed data. */ redaction?: RedactionType; - /** The styles for the input in reveal element. */ + /** Styles for the input in reveal element. */ inputStyles?: object; - /** The label value for the reveal elements. */ + /** Label value for the reveal elements. */ label?: string; - /** The styles for the label in reveal element. */ + /** Styles for the label in reveal element. */ labelStyles?: object; /** An alternate text for the reveal element. */ altText?: string; - /** The styles for the error text in the reveal element. */ + /** Styles for the error text in the reveal element. */ errorTextStyles?: object; } -/** This provides additional configuration options for the reveal element. */ +/** Provides an additional configuration options for the reveal element. */ export interface IRevealElementOptions { - /** The copy icon enables revealing elements to copy text to the clipboard. It defaults to 'false'. */ + /** Copy icon enables revealing elements to copy text to the clipboard. It defaults to 'false'. */ enableCopy?: boolean; - /** Tohe format for the element. */ + /** Format for the element. */ format?: string; - /** This property indicates the allowed data type value for the format. */ + /** It indicates the allowed data type value for the format. */ translation?:Record } const CLASS_NAME = 'RevealContainer'; /** - * The container wraps all the Skyflow reveal elements. + * Wraps all the Skyflow reveal elements. * @class RevealContainer */ class RevealContainer extends Container { @@ -77,7 +77,7 @@ class RevealContainer extends Container { #context: Context; #skyflowElements: any; - /** The type of the container. */ + /** Type of the container. */ type:string = ContainerType.REVEAL; /** @internal */ @@ -148,8 +148,8 @@ class RevealContainer extends Container { } /** - * This method creates a skyflow reveal element. - * @param record The input configuration for the reveal element. + * Creates a skyflow reveal element. + * @param record Input configuration for the reveal element. * @param options An additional configuration for reveal element. * @returns This method returns the reveal element. */ @@ -165,8 +165,8 @@ class RevealContainer extends Container { } /** - * The method is called when the sensitive data is ready to retrieve and reveal. - * @returns It returns the retrieved and revealed data. + * Called when the sensitive data is ready to retrieve and reveal. + * @returns Returns the retrieved and revealed data. */ reveal() { this.#isRevealCalled = true; diff --git a/src/core/external/reveal/reveal-element.ts b/src/core/external/reveal/reveal-element.ts index 7ecf8f4a..e0d8f1ad 100644 --- a/src/core/external/reveal/reveal-element.ts +++ b/src/core/external/reveal/reveal-element.ts @@ -24,7 +24,7 @@ import { formatRevealElementOptions } from '../../../utils/helpers'; const CLASS_NAME = 'RevealElement'; /** - * The create method returns the type of Skyflow reveal elements. + * The create method returns the type of Skyflow Reveal Elements. * @class RevealElement */ class RevealElement extends SkyflowElement { @@ -72,7 +72,7 @@ class RevealElement extends SkyflowElement { } /** - * This method inserts the element into the specified div. + * Inserts the element into the specified div. * @param domElementSelector The native HTML element that mounts inside the iframe. */ mount(domElementSelector) { @@ -134,8 +134,8 @@ class RevealElement extends SkyflowElement { } /** - * This method sets the error text for the element, overriding all current errors on the element with the custom error message passed. - * @param clientErrorText The error text value. + * Sets the error text for the element, overriding all current errors on the element with the custom error message passed. + * @param clientErrorText Error text value. */ setError(clientErrorText:string) { bus.emit(ELEMENT_EVENTS_TO_IFRAME.REVEAL_ELEMENT_SET_ERROR, { @@ -147,7 +147,7 @@ class RevealElement extends SkyflowElement { } /** - * This method clears the custom error message that is set using setError. + * Clears the custom error message that is set using setError. */ resetError() { bus.emit(ELEMENT_EVENTS_TO_IFRAME.REVEAL_ELEMENT_SET_ERROR, { @@ -158,7 +158,7 @@ class RevealElement extends SkyflowElement { } /** - * The method sets the altText of the reveal element, displaying it in the UI. + * Sets the altText of the reveal element, displaying it in the UI. * @param altText Set an alt text value. */ setAltText(altText:string) { @@ -170,7 +170,7 @@ class RevealElement extends SkyflowElement { } /** - * This method clears the altText, causing the element to display the token or actual value of the element. If the element has no token, the element becomes empty. + * Clears the altText, causing the element to display the token or actual value of the element. If the element has no token, the element becomes empty. */ clearAltText() { bus.emit(ELEMENT_EVENTS_TO_IFRAME.REVEAL_ELEMENT_UPDATE_OPTIONS, { @@ -181,7 +181,7 @@ class RevealElement extends SkyflowElement { } /** - * This method sets the token of the reveal element. + * Sets the token of the reveal element. * @param token Set the value of the Skyflow token. */ setToken(token:string) { @@ -197,7 +197,7 @@ class RevealElement extends SkyflowElement { } /** - * This method resets any collect element to its initial state. + * Resets any collect element to its initial state. */ unmount() { this.#iframe.unmount(); diff --git a/src/skyflow.ts b/src/skyflow.ts index 8ba8a9fc..03f89292 100644 --- a/src/skyflow.ts +++ b/src/skyflow.ts @@ -43,7 +43,7 @@ import ComposableContainer from './core/external/collect/compose-collect-contain import { validateComposableContainerOptions } from './utils/validators'; /** - * Supported Container types. + * Supported container types. */ export enum ContainerType { COLLECT = 'COLLECT', @@ -51,21 +51,21 @@ export enum ContainerType { COMPOSABLE = 'COMPOSABLE', } -/** This interface wraps the parameters required by Skyflow. */ +/** Wraps the parameters required by Skyflow. */ export interface ISkyflow { - /** The client should connect to the vault ID. */ + /** Client should connect to the vault ID. */ vaultID?: string; - /** The client should connect to the URL of the vault. */ + /** Client should connect to the URL of the vault. */ vaultURL?: string; /** This helper function retrieves a Skyflow bearer token from your backend. */ getBearerToken: () => Promise; - /** The optional object contains keys such as env and loglevel. */ + /** Contains keys such as env and loglevel. */ options?: Record; } const CLASS_NAME = 'Skyflow'; /** - * The parent Skyflow class consists of all the methods exposed to the client. + * Parent Skyflow class consists of all the methods exposed to the client. * @class Skyflow */ class Skyflow { @@ -151,10 +151,10 @@ class Skyflow { } /** - * This method initializes the Skyflow client. + * Initializes the Skyflow client. * @public - * @param config The configuration for the skyflow client. - * @returns This method returns an instance of the Skyflow client. + * @param config Configuration for the skyflow client. + * @returns Returns an instance of the Skyflow client. */ static init(config: ISkyflow): Skyflow { const logLevel = config?.options?.logLevel || LogLevel.ERROR; @@ -170,11 +170,11 @@ class Skyflow { } /** - * This method creates the skyflow container. + * Creates the sSyflow container. * @public - * @param type The type of Skyflow container to create is specified. - * @param options This is an additional parameter for the container. - * @returns This method returns the skyflow container of the specified type. + * @param type Type of Skyflow container to create is specified. + * @param options An additional parameter for the container. + * @returns Returns the skyflow container of the specified type. */ container(type: ContainerType, options?: Record) { switch (type) { @@ -228,11 +228,11 @@ class Skyflow { } /** - * This method inserts data into the vault. + * Inserts data into the vault. * @public - * @param records This parameter accepts a JSON object that represents the records to be inserted in the following format. - * @param options This parameter accepts an object containing optional parameters for the insertion. - * @returns This method returns the insert response. + * @param records Accepts a JSON object that represents the records to be inserted in the following format. + * @param options Accepts an object containing optional parameters for the insertion. + * @returns Returns the insert response. */ insert( records: IInsertRecordInput, @@ -244,10 +244,10 @@ class Skyflow { } /** - * This method returns records that correspond to the specified tokens. + * Returns records that correspond to the specified tokens. * @public * @param detokenizeInput The detokenize method requires input. - * @returns This method returns detokenized values that correspond to the specified tokens. + * @returns Returns detokenized values that correspond to the specified tokens. */ detokenize(detokenizeInput: IDetokenizeInput): Promise { printLog(parameterizedString(logs.infoLogs.DETOKENIZE_TRIGGERED, CLASS_NAME), @@ -256,10 +256,10 @@ class Skyflow { } /** - * This method reveals elements by using Skyflow IDs. + * Reveals elements by using Skyflow IDs. * @public * @param getByIdInput The getById method requires input. - * @returns This method returns the records fetched by Skyflow IDs and also returns any errors encountered. + * @returns Returns the records fetched by Skyflow IDs and also returns any errors encountered. */ getById(getByIdInput: IGetByIdInput) { printLog(logs.warnLogs.GET_BY_ID_DEPRECATED, MessageType.WARN, this.#logLevel); @@ -269,10 +269,10 @@ class Skyflow { } /** - * This method fetches records either by Skyflow IDs or by column values. + * Fetches records either by Skyflow IDs or by column values. * @public - * @param getInput This method requires input for the get operation. - * @returns This method returns an array of fetched records or errors if any. + * @param getInput Requires input for the get operation. + * @returns Returns an array of fetched records or errors if any. */ get(getInput: IGetInput) { printLog(parameterizedString(logs.infoLogs.GET_TRIGGERED, CLASS_NAME), @@ -281,11 +281,11 @@ class Skyflow { } /** - * This method deletes data from the vault. + * Deletes data from the vault. * @public - * @param records This parameter takes an array of records in the following format for deletion. - * @param options This parameter accepts an object containing deletion parameters. - * @returns This method returns an array of deleted records or errors if any. + * @param records Takes an array of records in the following format for deletion. + * @param options Accepts an object containing deletion parameters. + * @returns Returns an array of deleted records or errors if any. */ delete(records: IDeleteRecordInput, options: IDeleteOptions) { printLog(parameterizedString(logs.infoLogs.DELETE_TRIGGERED, CLASS_NAME), MessageType.LOG, diff --git a/src/utils/common/index.ts b/src/utils/common/index.ts index 5827ff1f..3f78620e 100644 --- a/src/utils/common/index.ts +++ b/src/utils/common/index.ts @@ -49,7 +49,7 @@ export enum LogLevel{ } /** - * Supported Envs. + * Supported envs. */ export enum Env{ DEV = 'DEV', @@ -74,67 +74,67 @@ export enum ValidationRuleType { ELEMENT_VALUE_MATCH_RULE = 'ELEMENT_VALUE_MATCH_RULE', } -/** This interface wraps the parameters required for the insert record input. */ +/** Wraps the parameters required for the insert record input. */ export interface IInsertRecordInput { /** An array of insert records */ records: IInsertRecord[]; } -/** This interface wraps the parameters required for inserting a record. */ +/** Wraps the parameters required for inserting a record. */ export interface IInsertRecord { - /** The data belongs to the table. */ + /** Data belongs to the table. */ table: string; - /** The fields need to be inserted. */ + /** Fields need to be inserted. */ fields: Record; - /** The record requires the SkyflowID for update. */ + /** Record requires the SkyflowID for update. */ skyflowID?: string; } -/** This interface wraps the parameters required by the Reveal record. */ +/** Wraps the parameters required by the Reveal record. */ export interface IRevealRecord { /** The token of the revealed data. */ token: string; - /** The redaction type applies to the data, and if not provided, the RedactionType.PLAIN_TEXT will be applied. */ + /** Redaction type applies to the data, and if not provided, the RedactionType.PLAIN_TEXT will be applied. */ redaction?: RedactionType; } -/** This interface wraps the parameters required for an insert response. */ +/** Wraps the parameters required for an insert response. */ export interface IInsertResponse { /** An array of insert response records. */ records: IInsertResponseReocrds[]; } -/** This interface wraps the parameters required for an insert response record. */ +/** Wraps the parameters required for an insert response record. */ export interface IInsertResponseReocrds { - /** This data belongs to the table. */ + /** Data belongs to the table. */ table: string; - /** The inserted fields. */ + /** Inserted fields. */ fields?: Record; - /** The inserted record's SkyflowID. */ + /** Inserted record's SkyflowID. */ skyflowID?: string; } -/** This interface wraps the parameters required by the reveal response. */ +/** Wraps the parameters required by the reveal response. */ export interface IRevealResponseType { - /** The array of records reveals if there are any. */ + /** Array of records reveals if there are any. */ records?: Record[]; - /** The array of errors, if there are any. */ + /** Array of errors, if there are any. */ errors?: Record[]; } -/** This interface wraps the parameters required for detokenizing input. */ +/** Wraps the parameters required for detokenizing input. */ export interface IDetokenizeInput { - /** The array of reveal records */ + /** Array of reveal records */ records: IRevealRecord[]; } -/** This interface serves as a wrapper for the parameters required to retrieve records. */ +/** Wrapper for the parameters required to retrieve records. */ export interface IGetRecord { - /** The Skyflow IDs of the records. */ + /** Skyflow IDs of the records. */ ids?: string[]; - /** The fetched records undergo redaction. */ + /** Fetched records undergo redaction. */ redaction: RedactionType; - /** The data belongs to the table. */ + /** Data belongs to the table. */ table: string; /** Name of the unique column. */ columnName?:string; @@ -142,53 +142,53 @@ export interface IGetRecord { columnValues?: string[]; } -/** This interface serves as a wrapper for the parameters that are required to retrieve input. */ +/** Wrapper for the parameters that are required to retrieve input. */ export interface IGetInput { - /** The array contains get records. */ + /** Array contains get records. */ records: IGetRecord[]; } -/** This interface serves as a wrapper for the parameters required by Skyflow ID record. */ +/** Wrapper for the parameters required by Skyflow ID record. */ export interface ISkyflowIdRecord { /** An array of skyflow ids of the records to fetch. */ ids: string[]; - /** The fetched records are redacted. */ + /** Fetched records are redacted. */ redaction: RedactionType; - /** The data belongs to the table. */ + /** Data belongs to the table. */ table: string; } -/** This interface serves as a wrapper for the parameters that are required by the getbyid input. */ +/** Wrapper for the parameters that are required by the getbyid input. */ export interface IGetByIdInput { /** An array of skyflow id records. */ records: ISkyflowIdRecord[]; } -/** This interface serves as a wrapper for parameters required by context. */ +/** Wrapper for parameters required by context. */ export interface Context{ - /** The log level to be applied. */ + /** Log level to be applied. */ logLevel:LogLevel - /** The type of environment. */ + /** Type of environment. */ env:Env } -/** This interface serves as a wrapper for parameters required by validation rule. */ +/** Wrapper for parameters required by validation rule. */ export interface IValidationRule { - /** The type of skyflow validation rule. */ + /** Type of skyflow validation rule. */ type: ValidationRuleType; /** Any additional parameters supported by validation rule. */ params: any; } -/** This interface serves as a wrapper for parameters required by upsert option. */ +/** Wrapper for parameters required by upsert option. */ export interface IUpsertOption { - /** The data belongs to the table. */ + /** Data belongs to the table. */ table : string; /** Name of the unique column. */ column: string; } -/** This interface serves as a wrapper for parameters required by insert options. */ +/** Wrapper for parameters required by insert options. */ export interface IInsertOptions{ /** Indicates whether tokens for the collected data should be returned. */ tokens?: boolean; @@ -196,18 +196,18 @@ export interface IInsertOptions{ upsert?: IUpsertOption[]; } -/** This interface serves as a wrapper for parameters required by delete record. */ +/** Wrapper for parameters required by delete record. */ export interface IDeleteRecord { - /** The Skyflow id of the record. */ + /** Skyflow id of the record. */ id: String; - /** The data belongs to the table. */ + /** Data belongs to the table. */ table: String; } -/** This interface serves as a wrapper for parameters required by delete options. */ +/** Wrapper for parameters required by delete options. */ export interface IDeleteOptions {} -/** This interface serves as a wrapper for parameters required by delete record input. */ +/** Wrapper for parameters required by delete record input. */ export interface IDeleteRecordInput { /** Additional configuration options for delete record input. */ options?: IDeleteOptions; @@ -215,7 +215,7 @@ export interface IDeleteRecordInput { records: IDeleteRecord[]; } -/** This interface serves as a wrapper for parameters required by delete response type. */ +/** Wrapper for parameters required by delete response type. */ export interface IDeleteResponseType { /** Array of deleted records, if any. */ records?: Record[];