skyflow-js 2.3.3 → 2.4.0
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.
- package/CHANGELOG.md +22 -0
- package/dist/sdkNodeBuild/index.js +1 -1
- package/dist/sdkNodeBuild/index.js.gz +0 -0
- package/package.json +1 -1
- package/types/core/external/collect/collect-container.d.ts +4 -24
- package/types/core/external/collect/collect-element.d.ts +4 -4
- package/types/core/external/collect/compose-collect-container.d.ts +5 -25
- package/types/core/external/collect/compose-collect-element.d.ts +3 -2
- package/types/core/external/reveal/reveal-container.d.ts +2 -2
- package/types/core/external/reveal/reveal-element.d.ts +4 -4
- package/types/core/external/skyflow-container.d.ts +6 -6
- package/types/core-utils/reveal.d.ts +2 -7
- package/types/index-node.d.ts +12 -0
- package/types/skyflow.d.ts +9 -9
- package/types/utils/common/index.d.ts +142 -1
- package/types/utils/validators/index.d.ts +1 -2
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,32 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IValidationRule, IInsertRecordInput } from '../../../utils/common';
|
|
3
|
-
import { ElementType } from '../../constants';
|
|
1
|
+
import { CollectElementInput, CollectElementOptions, CollectResponse, ICollectOptions, UploadFilesResponse } from '../../../utils/common';
|
|
4
2
|
import Container from '../common/container';
|
|
5
3
|
import CollectElement from './collect-element';
|
|
6
|
-
export interface CollectElementInput {
|
|
7
|
-
table?: string;
|
|
8
|
-
column?: string;
|
|
9
|
-
inputStyles?: object;
|
|
10
|
-
label?: string;
|
|
11
|
-
labelStyles?: object;
|
|
12
|
-
errorTextStyles?: object;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
type: ElementType;
|
|
15
|
-
altText?: string;
|
|
16
|
-
validations?: IValidationRule[];
|
|
17
|
-
skyflowID?: string;
|
|
18
|
-
}
|
|
19
|
-
interface ICollectOptions {
|
|
20
|
-
tokens?: boolean;
|
|
21
|
-
additionalFields?: IInsertRecordInput;
|
|
22
|
-
upsert?: Array<IUpsertOptions>;
|
|
23
|
-
}
|
|
24
4
|
declare class CollectContainer extends Container {
|
|
25
5
|
#private;
|
|
26
6
|
type: string;
|
|
27
7
|
constructor(options: any, metaData: any, skyflowElements: any, context: any);
|
|
28
|
-
create: (input: CollectElementInput, options?:
|
|
29
|
-
collect: (options?: ICollectOptions) => Promise<
|
|
30
|
-
uploadFiles: (options:
|
|
8
|
+
create: (input: CollectElementInput, options?: CollectElementOptions) => CollectElement;
|
|
9
|
+
collect: (options?: ICollectOptions) => Promise<CollectResponse>;
|
|
10
|
+
uploadFiles: (options: ICollectOptions) => Promise<UploadFilesResponse>;
|
|
31
11
|
}
|
|
32
12
|
export default CollectContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EventEmitter from '../../../event-emitter';
|
|
2
|
-
import { Context } from '../../../utils/common';
|
|
2
|
+
import { CollectElementUpdateOptions, Context } from '../../../utils/common';
|
|
3
3
|
import SkyflowElement from '../common/skyflow-element';
|
|
4
4
|
declare class CollectElement extends SkyflowElement {
|
|
5
5
|
#private;
|
|
@@ -9,11 +9,11 @@ declare class CollectElement extends SkyflowElement {
|
|
|
9
9
|
resizeObserver: ResizeObserver | null;
|
|
10
10
|
constructor(elementId: string, elementGroup: any, metaData: any, container: any, isSingleElementAPI: boolean | undefined, destroyCallback: Function, updateCallback: Function, context: Context, groupEventEmitter?: EventEmitter);
|
|
11
11
|
getID: () => string;
|
|
12
|
-
mount: (domElement:
|
|
12
|
+
mount: (domElement: HTMLElement | string) => void;
|
|
13
13
|
unmount: () => void;
|
|
14
14
|
updateElementGroup: (group: any) => void;
|
|
15
15
|
updateElement: (elementOptions: any) => void;
|
|
16
|
-
update: (options:
|
|
16
|
+
update: (options: CollectElementUpdateOptions) => void;
|
|
17
17
|
getState: () => {
|
|
18
18
|
isEmpty: boolean;
|
|
19
19
|
isComplete: boolean;
|
|
@@ -24,7 +24,7 @@ declare class CollectElement extends SkyflowElement {
|
|
|
24
24
|
selectedCardScheme: string;
|
|
25
25
|
};
|
|
26
26
|
getOptions: () => any;
|
|
27
|
-
on(eventName: string, handler:
|
|
27
|
+
on(eventName: string, handler: Function): void;
|
|
28
28
|
iframeName(): string;
|
|
29
29
|
isMounted(): boolean;
|
|
30
30
|
isUpdateCalled(): boolean;
|
|
@@ -1,34 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IValidationRule, IInsertRecordInput } from '../../../utils/common';
|
|
3
|
-
import { ElementType } from '../../constants';
|
|
1
|
+
import { CollectElementInput, CollectElementOptions, ICollectOptions, CollectResponse } from '../../../utils/common';
|
|
4
2
|
import Container from '../common/container';
|
|
5
3
|
import ComposableElement from './compose-collect-element';
|
|
6
|
-
export interface CollectElementInput {
|
|
7
|
-
table?: string;
|
|
8
|
-
column?: string;
|
|
9
|
-
inputStyles?: object;
|
|
10
|
-
label?: string;
|
|
11
|
-
labelStyles?: object;
|
|
12
|
-
errorTextStyles?: object;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
type: ElementType;
|
|
15
|
-
altText?: string;
|
|
16
|
-
validations?: IValidationRule[];
|
|
17
|
-
skyflowID?: string;
|
|
18
|
-
}
|
|
19
|
-
interface ICollectOptions {
|
|
20
|
-
tokens?: boolean;
|
|
21
|
-
additionalFields?: IInsertRecordInput;
|
|
22
|
-
upsert?: Array<IUpsertOptions>;
|
|
23
|
-
}
|
|
24
4
|
declare class ComposableContainer extends Container {
|
|
25
5
|
#private;
|
|
26
6
|
type: string;
|
|
27
7
|
constructor(options: any, metaData: any, skyflowElements: any, context: any);
|
|
28
|
-
create: (input: CollectElementInput, options?:
|
|
29
|
-
on: (eventName: string, handler:
|
|
30
|
-
mount: (domElement:
|
|
8
|
+
create: (input: CollectElementInput, options?: CollectElementOptions) => ComposableElement;
|
|
9
|
+
on: (eventName: string, handler: Function) => void;
|
|
10
|
+
mount: (domElement: HTMLElement | string) => void;
|
|
31
11
|
unmount: () => void;
|
|
32
|
-
collect: (options?: ICollectOptions) => Promise<
|
|
12
|
+
collect: (options?: ICollectOptions) => Promise<CollectResponse>;
|
|
33
13
|
}
|
|
34
14
|
export default ComposableContainer;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { CollectElementUpdateOptions } from '../../../utils/common';
|
|
1
2
|
declare class ComposableElement {
|
|
2
3
|
#private;
|
|
3
4
|
type: string;
|
|
4
5
|
constructor(name: any, eventEmitter: any, iframeName: any);
|
|
5
|
-
on(eventName: string, handler:
|
|
6
|
+
on(eventName: string, handler: Function): void;
|
|
6
7
|
iframeName(): string;
|
|
7
8
|
getID(): string;
|
|
8
|
-
update: (options:
|
|
9
|
+
update: (options: CollectElementUpdateOptions) => void;
|
|
9
10
|
}
|
|
10
11
|
export default ComposableElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RedactionType } from '../../../utils/common';
|
|
1
|
+
import { RedactionType, RevealResponse } from '../../../utils/common';
|
|
2
2
|
import Container from '../common/container';
|
|
3
3
|
import RevealElement from './reveal-element';
|
|
4
4
|
export interface IRevealElementInput {
|
|
@@ -23,6 +23,6 @@ declare class RevealContainer extends Container {
|
|
|
23
23
|
type: string;
|
|
24
24
|
constructor(metaData: any, skyflowElements: any, context: any, options?: {});
|
|
25
25
|
create(record: IRevealElementInput, options?: IRevealElementOptions): RevealElement;
|
|
26
|
-
reveal(): Promise<
|
|
26
|
+
reveal(): Promise<RevealResponse>;
|
|
27
27
|
}
|
|
28
28
|
export default RevealContainer;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Context } from '../../../utils/common';
|
|
1
|
+
import { Context, RenderFileResponse } from '../../../utils/common';
|
|
2
2
|
import SkyflowElement from '../common/skyflow-element';
|
|
3
3
|
import { IRevealElementInput, IRevealElementOptions } from './reveal-container';
|
|
4
4
|
declare class RevealElement extends SkyflowElement {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(record: IRevealElementInput, options: IRevealElementOptions | undefined, metaData: any, container: any, elementId: string, context: Context);
|
|
7
7
|
getID(): string;
|
|
8
|
-
mount(domElementSelector:
|
|
9
|
-
renderFile(): Promise<
|
|
8
|
+
mount(domElementSelector: HTMLElement | string): void;
|
|
9
|
+
renderFile(): Promise<RenderFileResponse>;
|
|
10
10
|
iframeName(): string;
|
|
11
11
|
isMounted(): boolean;
|
|
12
12
|
hasToken(): boolean;
|
|
@@ -19,6 +19,6 @@ declare class RevealElement extends SkyflowElement {
|
|
|
19
19
|
clearAltText(): void;
|
|
20
20
|
setToken(token: string): void;
|
|
21
21
|
unmount(): void;
|
|
22
|
-
update(options:
|
|
22
|
+
update(options: IRevealElementInput): void;
|
|
23
23
|
}
|
|
24
24
|
export default RevealElement;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IDetokenizeInput, IGetInput, IGetByIdInput, IInsertOptions, IDeleteOptions, IDeleteRecordInput, IGetOptions } from '../../utils/common';
|
|
1
|
+
import { IDetokenizeInput, IGetInput, IGetByIdInput, IInsertOptions, IDeleteOptions, IDeleteRecordInput, IGetOptions, InsertResponse, GetByIdResponse, GetResponse, DeleteResponse, IInsertRecordInput, DetokenizeResponse } from '../../utils/common';
|
|
2
2
|
declare class SkyflowContainer {
|
|
3
3
|
#private;
|
|
4
4
|
isControllerFrameReady: boolean;
|
|
5
5
|
constructor(client: any, context: any);
|
|
6
|
-
detokenize(detokenizeInput: IDetokenizeInput): Promise<
|
|
7
|
-
insert(records:
|
|
8
|
-
getById(getByIdInput: IGetByIdInput): Promise<
|
|
9
|
-
get(getInput: IGetInput, options?: IGetOptions): Promise<
|
|
10
|
-
delete(records: IDeleteRecordInput, options?: IDeleteOptions): Promise<
|
|
6
|
+
detokenize(detokenizeInput: IDetokenizeInput): Promise<DetokenizeResponse>;
|
|
7
|
+
insert(records: IInsertRecordInput, options?: IInsertOptions): Promise<InsertResponse>;
|
|
8
|
+
getById(getByIdInput: IGetByIdInput): Promise<GetByIdResponse>;
|
|
9
|
+
get(getInput: IGetInput, options?: IGetOptions): Promise<GetResponse>;
|
|
10
|
+
delete(records: IDeleteRecordInput, options?: IDeleteOptions): Promise<DeleteResponse>;
|
|
11
11
|
}
|
|
12
12
|
export default SkyflowContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Client from '../client';
|
|
2
|
-
import { IRevealRecord, IRevealResponseType, IGetRecord, ISkyflowIdRecord, IRenderResponseType, IGetOptions } from '../utils/common';
|
|
2
|
+
import { IRevealRecord, IRevealResponseType, IGetRecord, ISkyflowIdRecord, IRenderResponseType, IGetOptions, RenderFileResponse } from '../utils/common';
|
|
3
3
|
export declare const getFileURLForRender: (skyflowIdRecord: IRevealRecord, client: Client, authToken: string) => Promise<any>;
|
|
4
4
|
export declare const getFileURLFromVaultBySkyflowID: (skyflowIdRecord: IRevealRecord, client: Client) => Promise<IRenderResponseType>;
|
|
5
5
|
export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client) => Promise<IRevealResponseType>;
|
|
@@ -9,12 +9,7 @@ export declare const formatRecordsForRender: (response: IRenderResponseType, col
|
|
|
9
9
|
skyflowID: any;
|
|
10
10
|
url: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const formatForRenderClient: (response: IRenderResponseType, column: string) =>
|
|
13
|
-
success: {
|
|
14
|
-
skyflow_id: any;
|
|
15
|
-
column: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
12
|
+
export declare const formatForRenderClient: (response: IRenderResponseType, column: string) => RenderFileResponse;
|
|
18
13
|
export declare const formatRecordsForClient: (response: IRevealResponseType) => {
|
|
19
14
|
success: {
|
|
20
15
|
token: string;
|
package/types/index-node.d.ts
CHANGED
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
import Skyflow from './skyflow';
|
|
2
|
+
export { IInsertRecordInput as InsertRequest, IInsertRecord as InsertRecord, IInsertOptions as InsertOptions, InsertResponse, IDetokenizeInput as DetokenizeRequest, DetokenizeRecord, DetokenizeResponse, IDeleteRecordInput as DeleteRequest, IDeleteRecord as DeleteRecord, IDeleteOptions as DeleteOptions, DeleteResponse, IGetInput as GetRequest, IGetRecord as GetRecord, IGetOptions as GetOptions, GetResponse, IGetByIdInput as GetByIdRequest, GetByIdResponse, ContainerOptions, CollectElementInput, CollectElementUpdateOptions, CollectElementOptions, ICollectOptions as CollectOptions, CollectResponse, UploadFilesResponse, CardMetadata, InputStyles, LabelStyles, ErrorTextStyles, RedactionType, IRevealRecord as RevealRecord, RevealResponse, RenderFileResponse, IValidationRule as ValidationRule, ValidationRuleType, EventName, LogLevel, Env, ElementState, } from './utils/common';
|
|
3
|
+
export { IRevealElementInput as RevealElementInput, IRevealElementOptions as RevealElementOptions, } from './core/external/reveal/reveal-container';
|
|
4
|
+
export { ThreeDSBrowserDetails } from './core/external/threeds/threeds';
|
|
5
|
+
export { CardType, ElementType, } from './core/constants';
|
|
6
|
+
export { ContainerType, ISkyflow as SkyflowConfig, } from './skyflow';
|
|
7
|
+
export { default as CollectElement } from './core/external/collect/collect-element';
|
|
8
|
+
export { default as CollectContainer } from './core/external/collect/collect-container';
|
|
9
|
+
export { default as ComposableContainer } from './core/external/collect/compose-collect-container';
|
|
10
|
+
export { default as ComposableElement } from './core/external/collect/compose-collect-element';
|
|
11
|
+
export { default as RevealContainer } from './core/external/reveal/reveal-container';
|
|
12
|
+
export { default as RevealElement } from './core/external/reveal/reveal-element';
|
|
13
|
+
export { default as ThreeDS } from './core/external/threeds/threeds';
|
|
2
14
|
export default Skyflow;
|
package/types/skyflow.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ElementType, CardType } from './core/constants';
|
|
|
2
2
|
import RevealContainer from './core/external/reveal/reveal-container';
|
|
3
3
|
import CollectContainer from './core/external/collect/collect-container';
|
|
4
4
|
import SkyflowError from './libs/skyflow-error';
|
|
5
|
-
import {
|
|
5
|
+
import { RequestMethod, IInsertRecordInput, IDetokenizeInput, IGetInput, RedactionType, EventName, Env, LogLevel, ValidationRuleType, IGetByIdInput, IInsertOptions, IDeleteRecordInput, IDeleteOptions, IGetOptions, InsertResponse, GetResponse, GetByIdResponse, DeleteResponse, ContainerOptions, DetokenizeResponse } from './utils/common';
|
|
6
6
|
import ComposableContainer from './core/external/collect/compose-collect-container';
|
|
7
7
|
import ThreeDS from './core/external/threeds/threeds';
|
|
8
8
|
export declare enum ContainerType {
|
|
@@ -20,14 +20,14 @@ declare class Skyflow {
|
|
|
20
20
|
#private;
|
|
21
21
|
constructor(config: ISkyflow);
|
|
22
22
|
static init(config: ISkyflow): Skyflow;
|
|
23
|
-
container(type: ContainerType.COLLECT, options?:
|
|
24
|
-
container(type: ContainerType.COMPOSABLE, options?:
|
|
25
|
-
container(type: ContainerType.REVEAL, options?:
|
|
26
|
-
insert(records: IInsertRecordInput, options?: IInsertOptions): Promise<
|
|
27
|
-
detokenize(detokenizeInput: IDetokenizeInput): Promise<
|
|
28
|
-
getById(getByIdInput: IGetByIdInput): Promise<
|
|
29
|
-
get(getInput: IGetInput, options?: IGetOptions): Promise<
|
|
30
|
-
delete(records: IDeleteRecordInput, options?: IDeleteOptions): Promise<
|
|
23
|
+
container(type: ContainerType.COLLECT, options?: ContainerOptions): CollectContainer;
|
|
24
|
+
container(type: ContainerType.COMPOSABLE, options?: ContainerOptions): ComposableContainer;
|
|
25
|
+
container(type: ContainerType.REVEAL, options?: ContainerOptions): RevealContainer;
|
|
26
|
+
insert(records: IInsertRecordInput, options?: IInsertOptions): Promise<InsertResponse>;
|
|
27
|
+
detokenize(detokenizeInput: IDetokenizeInput): Promise<DetokenizeResponse>;
|
|
28
|
+
getById(getByIdInput: IGetByIdInput): Promise<GetByIdResponse>;
|
|
29
|
+
get(getInput: IGetInput, options?: IGetOptions): Promise<GetResponse>;
|
|
30
|
+
delete(records: IDeleteRecordInput, options?: IDeleteOptions): Promise<DeleteResponse>;
|
|
31
31
|
static get ContainerType(): typeof ContainerType;
|
|
32
32
|
static get ElementType(): typeof ElementType;
|
|
33
33
|
static get RedactionType(): typeof RedactionType;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IUpsertOptions } from '../../core-utils/collect';
|
|
2
|
+
import { CardType, ElementType } from '../../core/constants';
|
|
1
3
|
declare global {
|
|
2
4
|
interface Window {
|
|
3
5
|
CoralogixRum: any;
|
|
@@ -121,7 +123,6 @@ export interface IDeleteRecord {
|
|
|
121
123
|
export interface IDeleteOptions {
|
|
122
124
|
}
|
|
123
125
|
export interface IDeleteRecordInput {
|
|
124
|
-
options?: IDeleteOptions;
|
|
125
126
|
records: IDeleteRecord[];
|
|
126
127
|
}
|
|
127
128
|
export interface IDeleteResponseType {
|
|
@@ -153,3 +154,143 @@ export interface MeticsObjectType {
|
|
|
153
154
|
export interface SharedMeticsObjectType {
|
|
154
155
|
records: MeticsObjectType[];
|
|
155
156
|
}
|
|
157
|
+
export interface InsertResponse {
|
|
158
|
+
records?: InsertResponseRecords[];
|
|
159
|
+
errors?: ErrorRecord[];
|
|
160
|
+
}
|
|
161
|
+
export interface CollectResponse extends InsertResponse {
|
|
162
|
+
}
|
|
163
|
+
export interface DetokenizeRecord extends IRevealRecord {
|
|
164
|
+
}
|
|
165
|
+
export interface DetokenizeResponse extends IRevealResponseType {
|
|
166
|
+
}
|
|
167
|
+
export interface InsertResponseRecords {
|
|
168
|
+
fields: Record<string, any>;
|
|
169
|
+
table: string;
|
|
170
|
+
}
|
|
171
|
+
export interface ErrorRecord {
|
|
172
|
+
code: number;
|
|
173
|
+
description: string;
|
|
174
|
+
}
|
|
175
|
+
export interface GetByIdResponse {
|
|
176
|
+
records?: GetByIdResponseRecord[];
|
|
177
|
+
errors?: ErrorRecord[];
|
|
178
|
+
}
|
|
179
|
+
export interface GetByIdResponseRecord {
|
|
180
|
+
fields: Record<string, any>;
|
|
181
|
+
table: string;
|
|
182
|
+
}
|
|
183
|
+
export interface GetResponse {
|
|
184
|
+
records?: GetResponseRecord[];
|
|
185
|
+
errors?: ErrorRecord[];
|
|
186
|
+
}
|
|
187
|
+
export interface GetResponseRecord {
|
|
188
|
+
fields: Record<string, any>;
|
|
189
|
+
table: string;
|
|
190
|
+
}
|
|
191
|
+
export interface DeleteResponse {
|
|
192
|
+
records?: DeleteResponseRecord[];
|
|
193
|
+
errors?: DeleteErrorRecords[];
|
|
194
|
+
}
|
|
195
|
+
export interface DeleteResponseRecord {
|
|
196
|
+
skyflow_id: string;
|
|
197
|
+
deleted: boolean;
|
|
198
|
+
}
|
|
199
|
+
export interface DeleteErrorRecords {
|
|
200
|
+
id: string;
|
|
201
|
+
error: ErrorRecord;
|
|
202
|
+
}
|
|
203
|
+
export interface ContainerOptions {
|
|
204
|
+
layout: number[];
|
|
205
|
+
styles?: InputStyles;
|
|
206
|
+
errorTextStyles?: ErrorTextStyles;
|
|
207
|
+
}
|
|
208
|
+
export interface ErrorTextStyles {
|
|
209
|
+
base?: Record<string, string>;
|
|
210
|
+
global?: Record<string, string>;
|
|
211
|
+
}
|
|
212
|
+
export interface LabelStyles extends ErrorTextStyles {
|
|
213
|
+
focus?: Record<string, string>;
|
|
214
|
+
requiredAsterisk?: Record<string, string>;
|
|
215
|
+
}
|
|
216
|
+
export interface InputStyles extends ErrorTextStyles {
|
|
217
|
+
focus?: Record<string, string>;
|
|
218
|
+
complete?: Record<string, string>;
|
|
219
|
+
empty?: Record<string, string>;
|
|
220
|
+
invalid?: Record<string, string>;
|
|
221
|
+
cardIcon?: Record<string, string>;
|
|
222
|
+
copyIcon?: Record<string, string>;
|
|
223
|
+
}
|
|
224
|
+
export interface CollectElementOptions {
|
|
225
|
+
required?: boolean;
|
|
226
|
+
format?: string;
|
|
227
|
+
translation?: Record<string, string>;
|
|
228
|
+
enableCardIcon?: boolean;
|
|
229
|
+
enableCopy?: boolean;
|
|
230
|
+
cardMetadata?: CardMetadata;
|
|
231
|
+
preserveFileName?: boolean;
|
|
232
|
+
allowedFileType?: string[];
|
|
233
|
+
blockEmptyFiles?: boolean;
|
|
234
|
+
masking?: boolean;
|
|
235
|
+
maskingChar?: string;
|
|
236
|
+
}
|
|
237
|
+
export interface CardMetadata {
|
|
238
|
+
scheme: CardType[];
|
|
239
|
+
}
|
|
240
|
+
export interface CollectElementUpdateOptions {
|
|
241
|
+
table?: string;
|
|
242
|
+
column?: string;
|
|
243
|
+
label?: string;
|
|
244
|
+
inputStyles?: InputStyles;
|
|
245
|
+
labelStyles?: LabelStyles;
|
|
246
|
+
errorTextStyles?: ErrorTextStyles;
|
|
247
|
+
placeholder?: string;
|
|
248
|
+
altText?: string;
|
|
249
|
+
validations?: IValidationRule[];
|
|
250
|
+
skyflowID?: string;
|
|
251
|
+
}
|
|
252
|
+
export interface CollectElementInput extends CollectElementUpdateOptions {
|
|
253
|
+
type: ElementType;
|
|
254
|
+
}
|
|
255
|
+
export interface ICollectOptions {
|
|
256
|
+
tokens?: boolean;
|
|
257
|
+
additionalFields?: IInsertRecordInput;
|
|
258
|
+
upsert?: Array<IUpsertOptions>;
|
|
259
|
+
}
|
|
260
|
+
export interface UploadFilesResponse {
|
|
261
|
+
fileUploadResponse: [{
|
|
262
|
+
skyflow_id: string;
|
|
263
|
+
}];
|
|
264
|
+
errorResponse: [{
|
|
265
|
+
error: ErrorRecord;
|
|
266
|
+
}];
|
|
267
|
+
}
|
|
268
|
+
export interface RevealResponse {
|
|
269
|
+
success?: {
|
|
270
|
+
token: string;
|
|
271
|
+
valueType: string;
|
|
272
|
+
};
|
|
273
|
+
errors?: {
|
|
274
|
+
error: ErrorRecord;
|
|
275
|
+
token: string;
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
export interface RenderFileResponse {
|
|
279
|
+
success?: {
|
|
280
|
+
skyflow_id: string;
|
|
281
|
+
column: string;
|
|
282
|
+
};
|
|
283
|
+
errors?: {
|
|
284
|
+
skyflowId: string;
|
|
285
|
+
error: ErrorRecord;
|
|
286
|
+
column: string;
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
export interface ElementState {
|
|
290
|
+
isEmpty: boolean;
|
|
291
|
+
isValid: boolean;
|
|
292
|
+
isFocused: boolean;
|
|
293
|
+
value: string | Object | Blob | undefined;
|
|
294
|
+
isRequired: boolean;
|
|
295
|
+
selectedCardScheme?: string;
|
|
296
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { CardType } from '../../core/constants';
|
|
2
|
-
import { CollectElementInput } from '../../core/external/collect/collect-container';
|
|
3
2
|
import { IRevealElementInput } from '../../core/external/reveal/reveal-container';
|
|
4
3
|
import { ISkyflow } from '../../skyflow';
|
|
5
|
-
import { IInsertRecordInput, IDetokenizeInput, IGetInput, IGetByIdInput, IDeleteRecordInput, IGetOptions } from '../common';
|
|
4
|
+
import { IInsertRecordInput, IDetokenizeInput, IGetInput, IGetByIdInput, IDeleteRecordInput, IGetOptions, CollectElementInput } from '../common';
|
|
6
5
|
export declare const validateCreditCardNumber: (cardNumber: string) => boolean;
|
|
7
6
|
export declare const detectCardType: (cardNumber?: string) => CardType.DEFAULT;
|
|
8
7
|
export declare const validateExpiryDate: (date: string, format: string) => boolean;
|