New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@basis-theory/basis-theory-js

Package Overview
Dependencies
Maintainers
11
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@basis-theory/basis-theory-js - npm Package Compare versions

Comparing version 1.29.0 to 1.30.0

3

BasisTheory.d.ts

@@ -1,2 +0,2 @@

import type { AtomicBanks as ElementsAtomicBanks, AtomicCards as ElementsAtomicCards, BasisTheoryElements, CardElement, CardExpirationDateElement, CreateCardElementOptions, CreateCardExpirationDateElementOptions, CreateTextElementOptions, TextElement, TokenizeData as ElementsTokenizeData, Tokens as ElementsTokens } from '@/types/elements';
import type { AtomicBanks as ElementsAtomicBanks, AtomicCards as ElementsAtomicCards, BasisTheoryElements, CardElement, CardExpirationDateElement, CardVerificationCodeElement, CreateCardElementOptions, CreateCardExpirationDateElementOptions, CreateCardVerificationCodeElementOptions, CreateTextElementOptions, TextElement, TokenizeData as ElementsTokenizeData, Tokens as ElementsTokens } from '@/types/elements';
import type { TokenizeData } from '@/types/models';

@@ -23,2 +23,3 @@ import type { Applications, AtomicBanks, AtomicCards, BasisTheory as IBasisTheory, BasisTheoryInit, Logs, Permissions, ReactorFormulas, Reactors, RequestOptions, Tenants, Tokens, BasisTheoryInitOptions, BasisTheoryInitOptionsWithElements, BasisTheoryInitOptionsWithoutElements } from '@/types/sdk';

createElement(type: 'cardExpirationDate', options: CreateCardExpirationDateElementOptions): CardExpirationDateElement;
createElement(type: 'cardVerificationCode', options: CreateCardVerificationCodeElementOptions): CardVerificationCodeElement;
tokenize(tokens: TokenizeData & ElementsTokenizeData, options?: RequestOptions): Promise<TokenizeData>;

@@ -25,0 +26,0 @@ private loadElements;

@@ -5,2 +5,3 @@ declare const ELEMENTS_INIT_ERROR_MESSAGE = "BasisTheory Elements was not properly initialized.";

declare const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = "There was an unknown error when loading BasisTheoryElements";
export { ELEMENTS_INIT_ERROR_MESSAGE, ELEMENTS_NOM_DOM_ERROR_MESSAGE, ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE, ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE, };
declare const CARD_BRANDS: readonly ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
export { ELEMENTS_INIT_ERROR_MESSAGE, ELEMENTS_NOM_DOM_ERROR_MESSAGE, ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE, ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE, CARD_BRANDS, };

@@ -6,3 +6,3 @@ "use strict";

});
exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = exports.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = exports.ELEMENTS_NOM_DOM_ERROR_MESSAGE = exports.ELEMENTS_INIT_ERROR_MESSAGE = void 0;
exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = exports.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = exports.ELEMENTS_NOM_DOM_ERROR_MESSAGE = exports.ELEMENTS_INIT_ERROR_MESSAGE = exports.CARD_BRANDS = void 0;
const ELEMENTS_INIT_ERROR_MESSAGE = 'BasisTheory Elements was not properly initialized.';

@@ -15,2 +15,4 @@ exports.ELEMENTS_INIT_ERROR_MESSAGE = ELEMENTS_INIT_ERROR_MESSAGE;

const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = 'There was an unknown error when loading BasisTheoryElements';
exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE;
exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE;
const CARD_BRANDS = ['visa', 'mastercard', 'american-express', 'discover', 'diners-club', 'jcb', 'unionpay', 'maestro', 'elo', 'hiper', 'hipercard', 'mir', 'unknown'];
exports.CARD_BRANDS = CARD_BRANDS;
{
"name": "@basis-theory/basis-theory-js",
"version": "1.29.0",
"version": "1.30.0",
"repository": "https://github.com/Basis-Theory/basis-theory-js",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -1,4 +0,3 @@

import type { ElementEventListener, EventType, Subscription, TextElementEvents, CardElementEvents } from './events';
import { CardExpirationDateElementEvents } from './events';
import type { CreateCardElementOptions, CreateCardExpirationDateElementOptions, CreateTextElementOptions, UpdateCardElementOptions, UpdateCardExpirationDateElementOptions, UpdateTextElementOptions } from './options';
import type { ElementEventListener, EventType, Subscription, TextElementEvents, CardElementEvents, CardExpirationDateElementEvents, CardVerificationCodeElementEvents } from './events';
import type { CreateCardElementOptions, CreateCardExpirationDateElementOptions, CreateCardVerificationCodeElementOptions, CreateTextElementOptions, UpdateCardElementOptions, UpdateCardExpirationDateElementOptions, UpdateCardVerificationCodeElementOptions, UpdateTextElementOptions } from './options';
import type { AtomicBanks, AtomicCards, Tokenize, Tokens } from './services';

@@ -19,2 +18,3 @@ interface BaseElement<UpdateOptions, ElementEvents> {

};
declare type CardVerificationCodeElement = BaseElement<UpdateCardVerificationCodeElementOptions, CardVerificationCodeElementEvents>;
declare type ElementWrapper<T extends BaseElement<any, any> = BaseElement<any, any>> = {

@@ -24,3 +24,3 @@ element: T;

};
declare type ElementValue = TextElement | CardElement | CardExpirationDateElement | ElementWrapper;
declare type ElementValue = TextElement | CardElement | CardExpirationDateElement | CardVerificationCodeElement | ElementWrapper;
interface BasisTheoryElements extends Tokenize {

@@ -39,2 +39,3 @@ /**

createElement(type: 'cardExpirationDate', options: CreateCardExpirationDateElementOptions): CardExpirationDateElement;
createElement(type: 'cardVerificationCode', options: CreateCardVerificationCodeElementOptions): CardVerificationCodeElement;
}

@@ -50,2 +51,2 @@ interface BasisTheoryElementsInternal extends BasisTheoryElements {

}
export type { BaseElement, CardElement, TextElement, CardExpirationDateElement, ElementWrapper, ElementValue, BasisTheoryElements, BasisTheoryElementsInternal, };
export type { BaseElement, CardElement, TextElement, CardExpirationDateElement, CardVerificationCodeElement, ElementWrapper, ElementValue, BasisTheoryElements, BasisTheoryElementsInternal, };

@@ -24,2 +24,3 @@ import type { Brand, FieldError, ListenableKey, Targeted } from './shared';

declare type CardExpirationDateElementEvents = BaseElementEvents | ChangeEvent;
declare type CardVerificationCodeElementEvents = BaseElementEvents | ChangeEvent;
/**

@@ -35,2 +36,2 @@ * Utility type that helps find a Union type based on a `type` property

}
export type { EventType, BaseEvent, ReadyEvent, ChangeEvent, CardChangeEvent, InputFocusEvent, InputBlurEvent, InputKeydownEvent, BaseElementEvents, TextElementEvents, CardElementEvents, CardExpirationDateElementEvents, ElementEventListener, Subscription, };
export type { EventType, BaseEvent, ReadyEvent, ChangeEvent, CardChangeEvent, InputFocusEvent, InputBlurEvent, InputKeydownEvent, BaseElementEvents, TextElementEvents, CardElementEvents, CardExpirationDateElementEvents, CardVerificationCodeElementEvents, ElementEventListener, Subscription, };
import type { ElementStyle } from './styles';
declare const ELEMENTS_TYPES: readonly ["card", "text", "cardExpirationDate"];
declare const ELEMENTS_TYPES: readonly ["card", "text", "cardExpirationDate", "cardVerificationCode"];
declare type ElementType = typeof ELEMENTS_TYPES[number];

@@ -19,2 +19,3 @@ interface ElementInternalOptions {

ariaLabel?: string;
cardBrand?: string;
}

@@ -37,3 +38,7 @@ declare type ElementOptions = ElementInternalOptions & SanitizedElementOptions;

declare type UpdateCardExpirationDateElementOptions = Omit<CreateCardExpirationDateElementOptions, 'targetId'>;
export type { ElementInternalOptions, ElementType, ElementOptions, SanitizedElementOptions, Transform, CustomizableElementOptions, CreateCardElementOptions, UpdateCardElementOptions, CreateTextElementOptions, UpdateTextElementOptions, CreateCardExpirationDateElementOptions, UpdateCardExpirationDateElementOptions, };
declare type CreateCardVerificationCodeElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'placeholder' | 'cardBrand'> & Required<Pick<ElementOptions, 'targetId'>> & {
'aria-label'?: string;
};
declare type UpdateCardVerificationCodeElementOptions = Omit<CreateCardVerificationCodeElementOptions, 'targetId'>;
export type { ElementInternalOptions, ElementType, ElementOptions, SanitizedElementOptions, Transform, CustomizableElementOptions, CreateCardElementOptions, UpdateCardElementOptions, CreateTextElementOptions, UpdateTextElementOptions, CreateCardExpirationDateElementOptions, UpdateCardExpirationDateElementOptions, CreateCardVerificationCodeElementOptions, UpdateCardVerificationCodeElementOptions, };
export { ELEMENTS_TYPES };

@@ -7,3 +7,3 @@ "use strict";

exports.ELEMENTS_TYPES = void 0;
const ELEMENTS_TYPES = ['card', 'text', 'cardExpirationDate'];
const ELEMENTS_TYPES = ['card', 'text', 'cardExpirationDate', 'cardVerificationCode'];
exports.ELEMENTS_TYPES = ELEMENTS_TYPES;

@@ -0,1 +1,2 @@

import { CARD_BRANDS } from '@/elements/constants';
declare type FieldErrorType = 'incomplete' | 'invalid';

@@ -21,3 +22,3 @@ declare type ConfigErrorType = 'missing-configuration' | 'missing-permission' | 'invalid-configuration';

*/
declare type Brand = 'visa' | 'mastercard' | 'american-express' | 'discover' | 'diners-club' | 'jcb' | 'unionpay' | 'maestro' | 'elo' | 'hiper' | 'hipercard' | 'mir' | 'unknown';
declare type Brand = typeof CARD_BRANDS[number];
export type { FieldErrorType, ConfigErrorType, ConfigError, Targeted, ListenableKey, FieldError, PropertyError, Brand, };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc