@payrails/web-sdk 5.7.4 → 5.8.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payrails/web-sdk",
3
- "version": "5.7.4",
3
+ "version": "5.8.1",
4
4
  "description": "SDK providing tokenization options on the client for merchants",
5
5
  "main": "index.js",
6
6
  "types": "payrails.d.ts",
package/payrails.d.ts CHANGED
@@ -262,27 +262,6 @@ interface IInsertRecord {
262
262
  fields: Record<string, any>;
263
263
  skyflowID?: string;
264
264
  }
265
- interface IGetRecord {
266
- ids?: string[];
267
- redaction?: RedactionType;
268
- table: string;
269
- columnName?: string;
270
- columnValues?: string[];
271
- }
272
- interface IGetInput {
273
- records: IGetRecord[];
274
- }
275
- interface IGetOptions {
276
- tokens?: boolean;
277
- }
278
- interface ISkyflowIdRecord {
279
- ids: string[];
280
- redaction: RedactionType;
281
- table: string;
282
- }
283
- interface IGetByIdInput {
284
- records: ISkyflowIdRecord[];
285
- }
286
265
  interface Context {
287
266
  logLevel: LogLevel;
288
267
  env: Env;
@@ -290,24 +269,6 @@ interface Context {
290
269
  interface IValidationRule {
291
270
  type: ValidationRuleType;
292
271
  params: any;
293
- }
294
- interface IUpsertOption {
295
- table: string;
296
- column: string;
297
- }
298
- interface IInsertOptions {
299
- tokens?: boolean;
300
- upsert?: IUpsertOption[];
301
- }
302
- interface IDeleteRecord {
303
- id: String;
304
- table: String;
305
- }
306
- interface IDeleteOptions {
307
- }
308
- interface IDeleteRecordInput {
309
- options?: IDeleteOptions;
310
- records: IDeleteRecord[];
311
272
  }
312
273
 
313
274
  interface IUpsertOptions {
@@ -393,9 +354,11 @@ declare class CollectContainer extends Container {
393
354
  #private;
394
355
  type: string;
395
356
  private bus;
357
+ private iframe;
396
358
  constructor(options: any, metaData: any, skyflowElements: any, context: any);
397
359
  create: (input: CollectElementInput$1, options?: any) => CollectElement;
398
360
  collect: (options?: ICollectOptions$1) => Promise<unknown>;
361
+ unmount: () => void;
399
362
  }
400
363
 
401
364
  declare class ComposableElement {
@@ -428,6 +391,7 @@ declare class ComposableContainer extends Container {
428
391
  #private;
429
392
  type: string;
430
393
  private bus;
394
+ private iframe;
431
395
  constructor(options: any, metaData: any, skyflowElements: any, context: any);
432
396
  create: (input: CollectElementInput, options?: any) => ComposableElement;
433
397
  on: (eventName: string, handler: any) => void;
@@ -452,10 +416,6 @@ declare class Skyflow {
452
416
  constructor(config: ISkyflow);
453
417
  static init(config: ISkyflow): Skyflow;
454
418
  container(type: ContainerType, options?: Record<string, any>): CollectContainer | ComposableContainer;
455
- insert(records: IInsertRecordInput, options?: IInsertOptions): Promise<any>;
456
- getById(getByIdInput: IGetByIdInput): Promise<unknown>;
457
- get(getInput: IGetInput, options?: IGetOptions): Promise<unknown>;
458
- delete(records: IDeleteRecordInput, options?: IDeleteOptions): Promise<unknown>;
459
419
  static get ContainerType(): typeof ContainerType;
460
420
  static get ElementType(): typeof ElementType$1;
461
421
  static get RedactionType(): typeof RedactionType;
@@ -491,6 +451,7 @@ declare class PayrailsElement implements Mountable {
491
451
  get parentElement(): HTMLElement | null;
492
452
  get selector(): string;
493
453
  mount(location: string): void;
454
+ private clean;
494
455
  unmount(): void;
495
456
  }
496
457
 
@@ -771,7 +732,6 @@ declare class GenericRedirectButton extends PayrailsElement {
771
732
  private buildRedirectButton;
772
733
  private paymentExecutor;
773
734
  private onClick;
774
- mount(location: string): void;
775
735
  }
776
736
 
777
737
  interface GenericRedirectDropinOptions {
@@ -915,6 +875,8 @@ interface DropinOptions {
915
875
  cardForm?: CardFormOptions['styles'];
916
876
  cardPaymentButton?: CardPaymentButtonOptions['styles'];
917
877
  mercadoPago?: ButtonOptions['styles'];
878
+ authSuccess?: Partial<CSSStyleDeclaration>;
879
+ authFailed?: Partial<CSSStyleDeclaration>;
918
880
  };
919
881
  }
920
882
 
@@ -980,6 +942,7 @@ declare class Payrails {
980
942
  private __fraudNet;
981
943
  private __paypalButton;
982
944
  private __genericRedirectButton;
945
+ private __dropin;
983
946
  static preloadCardForm: typeof SdkLoader.preloadCardForm;
984
947
  static init(initResponse: InitOptions, options?: PayrailsClientOptions): Payrails;
985
948
  update(amount: PayrailsAmount): void;
@@ -1116,11 +1079,13 @@ declare class PayrailsCollectContainer implements Mountable {
1116
1079
  private sdkConfig;
1117
1080
  bin: string;
1118
1081
  readonly id = "payrails-container-wrapper";
1082
+ private static instance;
1119
1083
  private readonly __container;
1120
1084
  private element;
1121
1085
  private readonly cardTableName;
1122
1086
  private readonly containerType;
1123
1087
  constructor(__client: Skyflow, options: CollectContainerOptions, sdkConfig: SdkConfiguration);
1088
+ static init(vaultClient: Skyflow, options: CollectContainerOptions, sdkConfig: SdkConfiguration): PayrailsCollectContainer;
1124
1089
  createCollectElement(options: CollectElementOptions): PayrailsSecureField;
1125
1090
  mount(selector: string): void;
1126
1091
  unmount(): void;