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

@basis-theory/basis-theory-elements-interfaces

Package Overview
Dependencies
Maintainers
9
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@basis-theory/basis-theory-elements-interfaces - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

elements/elements.d.ts

3

index.d.ts

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

export * from './types';
export * from './styles';
export {};

@@ -5,28 +5,2 @@ "use strict";

value: true
});
var _types = require("./types");
Object.keys(_types).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _types[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _types[key];
}
});
});
var _styles = require("./styles");
Object.keys(_styles).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _styles[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _styles[key];
}
});
});
{
"name": "@basis-theory/basis-theory-elements-interfaces",
"version": "1.2.0",
"version": "2.0.0",
"repository": "https://github.com/Basis-Theory/basis-theory-elements-interfaces",

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

@@ -6,6 +6,66 @@ # Basis Theory Elements Interfaces

The [Basis Theory](https://basistheory.com/) Elements Interfaces exposes common types/constants used for development against the Basis Theory Elements package
This package exposes TypeScript definitions for [Basis Theory JS SDK](https://github.com/Basis-Theory/basis-theory-js) features, including [Elements](https://docs.basistheory.com/elements).
## Documentation
## Installation
For a complete guide with examples, please refer to our [Elements docs](https://docs.basistheory.com/elements).
Using [Node Package Manager](https://docs.npmjs.com/)
```sh
npm install --save-dev @basis-theory/basis-theory-elements-interfaces
```
Using [Yarn](https://classic.yarnpkg.com/en/docs/)
```sh
yarn add --dev @basis-theory/basis-theory-elements-interfaces
```
## Usage
Types are exported from the following locations.
### Models
```typescript
import { BasisTheory } from '@basis-theory/basis-theory-js';
import type { Application } from '@basis-theory/basis-theory-elements-interfaces/models'; // <- models root
const bt = await new BasisTheory().init('key_N88mVGsp3sCXkykyN2EFED'); // replace with your application key
const application: Application = await bt.applications.retrieve('fe1f9ba4-474e-44b9-b949-110cdba9d662');
```
### SDK
```typescript
import { BasisTheory } from '@basis-theory/basis-theory-js';
import type { PaginatedList, ListLogQuery } from '@basis-theory/basis-theory-elements-interfaces/sdk'; // <- sdk root
import type { Log } from '@basis-theory/basis-theory-elements-interfaces/models';
const bt = await new BasisTheory().init('key_N88mVGsp3sCXkykyN2EFED'); // replace with your application key
let query: ListLogQuery = {
entityType: 'application'
};
if (someCondition) {
query = {
...query,
entityId: '3f86930c-18f3-4a2d-b033-b738e59d419e'
}
}
const logs: PaginatedList<Log> = await bt.logs.list(query);
```
### Elements
```typescript
import { BasisTheory } from '@basis-theory/basis-theory-js';
import type { TextElement } from '@basis-theory/basis-theory-elements-interfaces/elements'; // <- elements root
const bt = await new BasisTheory().init('key_N88mVGsp3sCXkykyN2EFED', { elements: true }); // replace with your application key
const myInput = bt.createElement('text', { targetId: 'myInputId' });
```
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