@yuno-payments/sdk-web-types 1.8.0 → 1.9.0-beta.2

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/dist/index.d.ts CHANGED
@@ -248,6 +248,7 @@ type OnChangeArgs = {
248
248
  isInstallmentLoading: boolean;
249
249
  };
250
250
  };
251
+ type ValidationTypeSecureFields = 'on_change' | 'on_blur' | 'on_blur_full';
251
252
  type Create = {
252
253
  name: Name;
253
254
  options: {
@@ -260,6 +261,8 @@ type Create = {
260
261
  styles?: string;
261
262
  placeholder?: string;
262
263
  errorMessage?: string;
264
+ requiredErrorMessage?: string;
265
+ validationType?: ValidationTypeSecureFields;
263
266
  };
264
267
  };
265
268
  type GetElement = {
@@ -332,12 +335,12 @@ interface VaultedToken {
332
335
  type CardType = 'CREDIT' | 'DEBIT';
333
336
  interface SecureField {
334
337
  render(elementSelector: string): Promise<void>;
335
- focus(): void;
336
- validate(): void;
337
- unmountSync(): void;
338
- clearValue(): void;
339
- setError(errorMessage: string): void;
340
- setCardType(cardType: CardType): void;
338
+ focus(): Promise<void>;
339
+ validate(): Promise<void>;
340
+ unmountSync(): Promise<void>;
341
+ clearValue(): Promise<void>;
342
+ setError(errorMessage: string): Promise<void>;
343
+ setCardType(cardType: CardType): Promise<void>;
341
344
  }
342
345
  interface SecureFields {
343
346
  create({ name, options }: Create): SecureField;
package/dist/types.ts CHANGED
@@ -248,6 +248,7 @@ type OnChangeArgs = {
248
248
  isInstallmentLoading: boolean;
249
249
  };
250
250
  };
251
+ type ValidationTypeSecureFields = 'on_change' | 'on_blur' | 'on_blur_full';
251
252
  type Create = {
252
253
  name: Name;
253
254
  options: {
@@ -260,6 +261,8 @@ type Create = {
260
261
  styles?: string;
261
262
  placeholder?: string;
262
263
  errorMessage?: string;
264
+ requiredErrorMessage?: string;
265
+ validationType?: ValidationTypeSecureFields;
263
266
  };
264
267
  };
265
268
  type GetElement = {
@@ -332,12 +335,12 @@ interface VaultedToken {
332
335
  type CardType = 'CREDIT' | 'DEBIT';
333
336
  interface SecureField {
334
337
  render(elementSelector: string): Promise<void>;
335
- focus(): void;
336
- validate(): void;
337
- unmountSync(): void;
338
- clearValue(): void;
339
- setError(errorMessage: string): void;
340
- setCardType(cardType: CardType): void;
338
+ focus(): Promise<void>;
339
+ validate(): Promise<void>;
340
+ unmountSync(): Promise<void>;
341
+ clearValue(): Promise<void>;
342
+ setError(errorMessage: string): Promise<void>;
343
+ setCardType(cardType: CardType): Promise<void>;
341
344
  }
342
345
  interface SecureFields {
343
346
  create({ name, options }: Create): SecureField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuno-payments/sdk-web-types",
3
- "version": "1.8.0",
3
+ "version": "1.9.0-beta.2",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/types.ts",
6
6
  "type": "commonjs",