@basis-theory/basis-theory-js 1.42.0 → 1.44.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/BasisTheory.d.ts +2 -12
- package/BasisTheory.js +0 -26
- package/common/constants.js +0 -2
- package/elements/constants.d.ts +2 -2
- package/elements/constants.js +2 -2
- package/elements/services/index.d.ts +0 -2
- package/elements/services/index.js +0 -26
- package/package.json +1 -1
- package/types/elements/elements.d.ts +1 -9
- package/types/elements/services/index.d.ts +0 -2
- package/types/elements/services/index.js +0 -26
- package/types/models/index.d.ts +0 -2
- package/types/models/index.js +0 -26
- package/types/models/tokens.d.ts +2 -1
- package/types/sdk/sdk.d.ts +1 -9
- package/types/sdk/services/index.d.ts +0 -2
- package/types/sdk/services/index.js +0 -26
- package/atomic/banks/BasisTheoryAtomicBanks.d.ts +0 -10
- package/atomic/banks/BasisTheoryAtomicBanks.js +0 -30
- package/atomic/banks/index.d.ts +0 -1
- package/atomic/banks/index.js +0 -13
- package/atomic/cards/BasisTheoryAtomicCards.d.ts +0 -10
- package/atomic/cards/BasisTheoryAtomicCards.js +0 -32
- package/atomic/cards/index.d.ts +0 -1
- package/atomic/cards/index.js +0 -13
- package/atomic/index.d.ts +0 -2
- package/atomic/index.js +0 -31
- package/elements/services/banks.d.ts +0 -5
- package/elements/services/banks.js +0 -21
- package/elements/services/cards.d.ts +0 -5
- package/elements/services/cards.js +0 -21
- package/types/elements/services/banks.d.ts +0 -11
- package/types/elements/services/banks.js +0 -1
- package/types/elements/services/cards.d.ts +0 -13
- package/types/elements/services/cards.js +0 -1
- package/types/models/banks.d.ts +0 -14
- package/types/models/banks.js +0 -1
- package/types/models/cards.d.ts +0 -15
- package/types/models/cards.js +0 -1
- package/types/sdk/services/banks.d.ts +0 -5
- package/types/sdk/services/banks.js +0 -1
- package/types/sdk/services/cards.d.ts +0 -5
- package/types/sdk/services/cards.js +0 -1
package/BasisTheory.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BasisTheoryElements, CardElement, CardNumberElement, CardExpirationDateElement, CardVerificationCodeElement, CreateCardElementOptions, CreateCardNumberElementOptions, CreateCardExpirationDateElementOptions, CreateCardVerificationCodeElementOptions, CreateTextElementOptions, TextElement, TokenizeData as ElementsTokenizeData, Tokens as ElementsTokens } from '@/types/elements';
|
|
2
2
|
import type { TokenizeData } from '@/types/models';
|
|
3
|
-
import type { Applications,
|
|
3
|
+
import type { Applications, BasisTheory as IBasisTheory, BasisTheoryInit, Logs, Permissions, ReactorFormulas, Reactors, RequestOptions, Tenants, Tokens, BasisTheoryInitOptions, BasisTheoryInitOptionsWithElements, BasisTheoryInitOptionsWithoutElements, Proxies } from '@/types/sdk';
|
|
4
4
|
export declare class BasisTheory implements BasisTheoryInit, IBasisTheory, BasisTheoryElements {
|
|
5
5
|
private _initStatus;
|
|
6
6
|
private _initOptions?;
|
|
@@ -12,8 +12,6 @@ export declare class BasisTheory implements BasisTheoryInit, IBasisTheory, Basis
|
|
|
12
12
|
private _logs?;
|
|
13
13
|
private _reactorFormulas?;
|
|
14
14
|
private _reactors?;
|
|
15
|
-
private _atomicBanks?;
|
|
16
|
-
private _atomicCards?;
|
|
17
15
|
private _permissions?;
|
|
18
16
|
private _proxies?;
|
|
19
17
|
init(apiKey: string, options?: BasisTheoryInitOptionsWithoutElements): Promise<IBasisTheory>;
|
|
@@ -32,14 +30,6 @@ export declare class BasisTheory implements BasisTheoryInit, IBasisTheory, Basis
|
|
|
32
30
|
get logs(): Logs;
|
|
33
31
|
get reactorFormulas(): ReactorFormulas;
|
|
34
32
|
get reactors(): Reactors;
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated use {@link tokens} or {@link tokenize}
|
|
37
|
-
*/
|
|
38
|
-
get atomicBanks(): AtomicBanks & ElementsAtomicBanks;
|
|
39
|
-
/**
|
|
40
|
-
* @deprecated use {@link tokens} or {@link tokenize}
|
|
41
|
-
*/
|
|
42
|
-
get atomicCards(): AtomicCards & ElementsAtomicCards;
|
|
43
33
|
get permissions(): Permissions;
|
|
44
34
|
get proxies(): Proxies;
|
|
45
35
|
/**
|
package/BasisTheory.js
CHANGED
|
@@ -106,16 +106,6 @@ class BasisTheory {
|
|
|
106
106
|
baseURL: new URL(_common.CLIENT_BASE_PATHS.reactors, baseUrl).toString(),
|
|
107
107
|
appInfo
|
|
108
108
|
});
|
|
109
|
-
this._atomicBanks = new ((0, _elements.delegateAtomicBanks)(this._elements))({
|
|
110
|
-
apiKey,
|
|
111
|
-
baseURL: new URL(_common.CLIENT_BASE_PATHS.atomicBanks, baseUrl).toString(),
|
|
112
|
-
appInfo
|
|
113
|
-
});
|
|
114
|
-
this._atomicCards = new ((0, _elements.delegateAtomicCards)(this._elements))({
|
|
115
|
-
apiKey,
|
|
116
|
-
baseURL: new URL(_common.CLIENT_BASE_PATHS.atomicCards, baseUrl).toString(),
|
|
117
|
-
appInfo
|
|
118
|
-
});
|
|
119
109
|
this._permissions = new _permissions.BasisTheoryPermissions({
|
|
120
110
|
apiKey,
|
|
121
111
|
baseURL: new URL(_common.CLIENT_BASE_PATHS.permissions, baseUrl).toString(),
|
|
@@ -191,22 +181,6 @@ class BasisTheory {
|
|
|
191
181
|
get reactors() {
|
|
192
182
|
return (0, _common.assertInit)(this._reactors);
|
|
193
183
|
}
|
|
194
|
-
/**
|
|
195
|
-
* @deprecated use {@link tokens} or {@link tokenize}
|
|
196
|
-
*/
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
get atomicBanks() {
|
|
200
|
-
return (0, _common.assertInit)(this._atomicBanks);
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* @deprecated use {@link tokens} or {@link tokenize}
|
|
204
|
-
*/
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
get atomicCards() {
|
|
208
|
-
return (0, _common.assertInit)(this._atomicCards);
|
|
209
|
-
}
|
|
210
184
|
|
|
211
185
|
get permissions() {
|
|
212
186
|
return (0, _common.assertInit)(this._permissions);
|
package/common/constants.js
CHANGED
package/elements/constants.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const ELEMENTS_INIT_ERROR_MESSAGE = "BasisTheory Elements was not properly initialized.";
|
|
2
2
|
declare const ELEMENTS_NOM_DOM_ERROR_MESSAGE = "Tried to load BasisTheoryElements in a non-DOM environment.";
|
|
3
|
-
declare const ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = "
|
|
4
|
-
declare const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = "There was an unknown error when loading
|
|
3
|
+
declare const ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = "Basis Theory Elements did not load properly.";
|
|
4
|
+
declare const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = "There was an unknown error when loading Basis Theory Elements. Check the console for details.";
|
|
5
5
|
declare const CARD_BRANDS: readonly ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
|
|
6
6
|
declare const CARD_ICON_POSITIONS: readonly ["left", "right", "none"];
|
|
7
7
|
declare const AUTOCOMPLETE_VALUES: readonly ["off", "on"];
|
package/elements/constants.js
CHANGED
|
@@ -8,9 +8,9 @@ const ELEMENTS_INIT_ERROR_MESSAGE = 'BasisTheory Elements was not properly initi
|
|
|
8
8
|
exports.ELEMENTS_INIT_ERROR_MESSAGE = ELEMENTS_INIT_ERROR_MESSAGE;
|
|
9
9
|
const ELEMENTS_NOM_DOM_ERROR_MESSAGE = 'Tried to load BasisTheoryElements in a non-DOM environment.';
|
|
10
10
|
exports.ELEMENTS_NOM_DOM_ERROR_MESSAGE = ELEMENTS_NOM_DOM_ERROR_MESSAGE;
|
|
11
|
-
const ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = '
|
|
11
|
+
const ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = 'Basis Theory Elements did not load properly.';
|
|
12
12
|
exports.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE;
|
|
13
|
-
const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = 'There was an unknown error when loading
|
|
13
|
+
const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = 'There was an unknown error when loading Basis Theory Elements. Check the console for details.';
|
|
14
14
|
exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE;
|
|
15
15
|
const CARD_BRANDS = ['visa', 'mastercard', 'american-express', 'discover', 'diners-club', 'jcb', 'unionpay', 'maestro', 'elo', 'hiper', 'hipercard', 'mir', 'unknown'];
|
|
16
16
|
exports.CARD_BRANDS = CARD_BRANDS;
|
|
@@ -4,19 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var _cards = require("./cards");
|
|
8
|
-
|
|
9
|
-
Object.keys(_cards).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] === _cards[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _cards[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
7
|
var _tokenize = require("./tokenize");
|
|
21
8
|
|
|
22
9
|
Object.keys(_tokenize).forEach(function (key) {
|
|
@@ -30,19 +17,6 @@ Object.keys(_tokenize).forEach(function (key) {
|
|
|
30
17
|
});
|
|
31
18
|
});
|
|
32
19
|
|
|
33
|
-
var _banks = require("./banks");
|
|
34
|
-
|
|
35
|
-
Object.keys(_banks).forEach(function (key) {
|
|
36
|
-
if (key === "default" || key === "__esModule") return;
|
|
37
|
-
if (key in exports && exports[key] === _banks[key]) return;
|
|
38
|
-
Object.defineProperty(exports, key, {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _banks[key];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
20
|
var _tokens = require("./tokens");
|
|
47
21
|
|
|
48
22
|
Object.keys(_tokens).forEach(function (key) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ElementEventListener, EventType, Subscription, TextElementEvents, CardElementEvents, CardNumberElementEvents, CardExpirationDateElementEvents, CardVerificationCodeElementEvents } from './events';
|
|
2
2
|
import type { CreateCardElementOptions, CreateCardExpirationDateElementOptions, CreateCardVerificationCodeElementOptions, CreateTextElementOptions, UpdateCardElementOptions, CreateCardNumberElementOptions, UpdateCardNumberElementOptions, UpdateCardExpirationDateElementOptions, UpdateCardVerificationCodeElementOptions, UpdateTextElementOptions } from './options';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Tokenize, Tokens } from './services';
|
|
4
4
|
interface BaseElement<UpdateOptions, ElementEvents> {
|
|
5
5
|
readonly mounted: boolean;
|
|
6
6
|
mount(selector: string): Promise<void>;
|
|
@@ -23,14 +23,6 @@ declare type ElementWrapper<T extends BaseElement<any, any> = BaseElement<any, a
|
|
|
23
23
|
};
|
|
24
24
|
declare type ElementValue = TextElement | CardElement | CardNumberElement | CardExpirationDateElement | CardVerificationCodeElement | ElementWrapper;
|
|
25
25
|
interface BasisTheoryElements extends Tokenize {
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated use {@link tokens} or {@link tokenize}
|
|
28
|
-
*/
|
|
29
|
-
atomicBanks: AtomicBanks;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated use {@link tokens} or {@link tokenize}
|
|
32
|
-
*/
|
|
33
|
-
atomicCards: AtomicCards;
|
|
34
26
|
tokens: Tokens;
|
|
35
27
|
createElement(type: 'card', options?: CreateCardElementOptions): CardElement;
|
|
36
28
|
createElement(type: 'text', options: CreateTextElementOptions): TextElement;
|
|
@@ -4,32 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var _banks = require("./banks");
|
|
8
|
-
|
|
9
|
-
Object.keys(_banks).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] === _banks[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _banks[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
var _cards = require("./cards");
|
|
21
|
-
|
|
22
|
-
Object.keys(_cards).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (key in exports && exports[key] === _cards[key]) return;
|
|
25
|
-
Object.defineProperty(exports, key, {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return _cards[key];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
7
|
var _tokenize = require("./tokenize");
|
|
34
8
|
|
|
35
9
|
Object.keys(_tokenize).forEach(function (key) {
|
package/types/models/index.d.ts
CHANGED
package/types/models/index.js
CHANGED
|
@@ -30,32 +30,6 @@ Object.keys(_shared).forEach(function (key) {
|
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
var _cards = require("./cards");
|
|
34
|
-
|
|
35
|
-
Object.keys(_cards).forEach(function (key) {
|
|
36
|
-
if (key === "default" || key === "__esModule") return;
|
|
37
|
-
if (key in exports && exports[key] === _cards[key]) return;
|
|
38
|
-
Object.defineProperty(exports, key, {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _cards[key];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
var _banks = require("./banks");
|
|
47
|
-
|
|
48
|
-
Object.keys(_banks).forEach(function (key) {
|
|
49
|
-
if (key === "default" || key === "__esModule") return;
|
|
50
|
-
if (key in exports && exports[key] === _banks[key]) return;
|
|
51
|
-
Object.defineProperty(exports, key, {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
get: function () {
|
|
54
|
-
return _banks[key];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
|
|
59
33
|
var _applications = require("./applications");
|
|
60
34
|
|
|
61
35
|
Object.keys(_applications).forEach(function (key) {
|
package/types/models/tokens.d.ts
CHANGED
|
@@ -35,8 +35,9 @@ interface Token<DataType = Primitive> extends TokenBase {
|
|
|
35
35
|
searchIndexes?: string[];
|
|
36
36
|
fingerprintExpression?: string;
|
|
37
37
|
mask?: TokenMask;
|
|
38
|
+
expiresAt?: string;
|
|
38
39
|
}
|
|
39
|
-
declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask'> & {
|
|
40
|
+
declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression' | 'mask' | 'expiresAt'> & {
|
|
40
41
|
deduplicateToken?: boolean;
|
|
41
42
|
id?: string;
|
|
42
43
|
};
|
package/types/sdk/sdk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BasisTheoryElements } from '@/types/elements';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Tokens, Tokenize, Applications, Tenants, Logs, ReactorFormulas, Reactors, Permissions, Proxies } from './services';
|
|
3
3
|
interface ApplicationInfo {
|
|
4
4
|
name?: string;
|
|
5
5
|
version?: string;
|
|
@@ -21,14 +21,6 @@ interface BasisTheoryInit {
|
|
|
21
21
|
init(apiKey: string, options: BasisTheoryInitOptionsWithElements): Promise<BasisTheory & BasisTheoryElements>;
|
|
22
22
|
}
|
|
23
23
|
interface BasisTheory extends Tokenize {
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated use {@link tokens} or {@link tokenize}
|
|
26
|
-
*/
|
|
27
|
-
atomicBanks: AtomicBanks;
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated use {@link tokens} or {@link tokenize}
|
|
30
|
-
*/
|
|
31
|
-
atomicCards: AtomicCards;
|
|
32
24
|
tokens: Tokens;
|
|
33
25
|
applications: Applications;
|
|
34
26
|
tenants: Tenants;
|
|
@@ -17,32 +17,6 @@ Object.keys(_shared).forEach(function (key) {
|
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
var _banks = require("./banks");
|
|
21
|
-
|
|
22
|
-
Object.keys(_banks).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (key in exports && exports[key] === _banks[key]) return;
|
|
25
|
-
Object.defineProperty(exports, key, {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return _banks[key];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
var _cards = require("./cards");
|
|
34
|
-
|
|
35
|
-
Object.keys(_cards).forEach(function (key) {
|
|
36
|
-
if (key === "default" || key === "__esModule") return;
|
|
37
|
-
if (key in exports && exports[key] === _cards[key]) return;
|
|
38
|
-
Object.defineProperty(exports, key, {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _cards[key];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
20
|
var _tokens = require("./tokens");
|
|
47
21
|
|
|
48
22
|
Object.keys(_tokens).forEach(function (key) {
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BasisTheoryServiceOptions } from '@/service';
|
|
2
|
-
import type { AtomicBank, UpdateAtomicBank } from '@/types/models';
|
|
3
|
-
import type { PaginatedQuery, RequestOptions } from '@/types/sdk';
|
|
4
|
-
export declare const BasisTheoryAtomicBanks: {
|
|
5
|
-
new (options: BasisTheoryServiceOptions): {
|
|
6
|
-
update(id: string, request: UpdateAtomicBank, options?: RequestOptions | undefined): Promise<AtomicBank>;
|
|
7
|
-
readonly client: import("axios").AxiosInstance;
|
|
8
|
-
};
|
|
9
|
-
} & (new (...args: any[]) => import("../../types/sdk/services/shared").Create<AtomicBank, Pick<AtomicBank, "bank" | "metadata">>) & (new (...args: any[]) => import("../../types/sdk/services/shared").Retrieve<AtomicBank>) & (new (...args: any[]) => import("../../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../../types/sdk/services/shared").List<AtomicBank, PaginatedQuery>);
|
|
10
|
-
export declare type BasisTheoryAtomicBanks = InstanceType<typeof BasisTheoryAtomicBanks>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BasisTheoryAtomicBanks = void 0;
|
|
7
|
-
|
|
8
|
-
var _common = require("./../../common");
|
|
9
|
-
|
|
10
|
-
var _service = require("./../../service");
|
|
11
|
-
|
|
12
|
-
var _CrudBuilder = require("./../../service/CrudBuilder");
|
|
13
|
-
|
|
14
|
-
const BasisTheoryAtomicBanks = new _CrudBuilder.CrudBuilder(class BasisTheoryAtomicBanks extends _service.BasisTheoryService {
|
|
15
|
-
constructor(options) {
|
|
16
|
-
const _options = { ...options
|
|
17
|
-
}; // eslint-disable-next-line unicorn/prefer-spread
|
|
18
|
-
|
|
19
|
-
_options.transformRequest = [].concat(_common.transformAtomicRequestSnakeCase, options.transformRequest || []); // eslint-disable-next-line unicorn/prefer-spread
|
|
20
|
-
|
|
21
|
-
_options.transformResponse = [].concat(_common.transformAtomicResponseCamelCase, options.transformResponse || []);
|
|
22
|
-
super(_options);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
update(id, request, options) {
|
|
26
|
-
return this.client.patch(`/${id}`, request, (0, _common.createRequestConfig)(options)).then(_common.dataExtractor);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
}).create().retrieve().delete().list().build();
|
|
30
|
-
exports.BasisTheoryAtomicBanks = BasisTheoryAtomicBanks;
|
package/atomic/banks/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BasisTheoryAtomicBanks } from './BasisTheoryAtomicBanks';
|
package/atomic/banks/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "BasisTheoryAtomicBanks", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _BasisTheoryAtomicBanks.BasisTheoryAtomicBanks;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
var _BasisTheoryAtomicBanks = require("./BasisTheoryAtomicBanks");
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BasisTheoryServiceOptions } from '@/service';
|
|
2
|
-
import type { AtomicCard, UpdateAtomicCard } from '@/types/models';
|
|
3
|
-
import type { PaginatedQuery, RequestOptions } from '@/types/sdk';
|
|
4
|
-
export declare const BasisTheoryAtomicCards: {
|
|
5
|
-
new (options: BasisTheoryServiceOptions): {
|
|
6
|
-
update(id: string, request: UpdateAtomicCard, options?: RequestOptions | undefined): Promise<AtomicCard>;
|
|
7
|
-
readonly client: import("axios").AxiosInstance;
|
|
8
|
-
};
|
|
9
|
-
} & (new (...args: any[]) => import("../../types/sdk/services/shared").Create<AtomicCard, Pick<AtomicCard, "card" | "metadata">>) & (new (...args: any[]) => import("../../types/sdk/services/shared").Retrieve<AtomicCard>) & (new (...args: any[]) => import("../../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../../types/sdk/services/shared").List<AtomicCard, PaginatedQuery>);
|
|
10
|
-
export declare type BasisTheoryAtomicCards = InstanceType<typeof BasisTheoryAtomicCards>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BasisTheoryAtomicCards = void 0;
|
|
7
|
-
|
|
8
|
-
var _common = require("./../../common");
|
|
9
|
-
|
|
10
|
-
var _utils = require("./../../common/utils");
|
|
11
|
-
|
|
12
|
-
var _service = require("./../../service");
|
|
13
|
-
|
|
14
|
-
var _CrudBuilder = require("./../../service/CrudBuilder");
|
|
15
|
-
|
|
16
|
-
const BasisTheoryAtomicCards = new _CrudBuilder.CrudBuilder(class BasisTheoryAtomicCards extends _service.BasisTheoryService {
|
|
17
|
-
constructor(options) {
|
|
18
|
-
const _options = { ...options
|
|
19
|
-
}; // eslint-disable-next-line unicorn/prefer-spread
|
|
20
|
-
|
|
21
|
-
_options.transformRequest = [].concat(_utils.transformAtomicRequestSnakeCase, options.transformRequest || []); // eslint-disable-next-line unicorn/prefer-spread
|
|
22
|
-
|
|
23
|
-
_options.transformResponse = [].concat(_utils.transformAtomicResponseCamelCase, options.transformResponse || []);
|
|
24
|
-
super(_options);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
update(id, request, options) {
|
|
28
|
-
return this.client.patch(`/${id}`, request, (0, _common.createRequestConfig)(options)).then(_common.dataExtractor);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
}).create().retrieve().delete().list().build();
|
|
32
|
-
exports.BasisTheoryAtomicCards = BasisTheoryAtomicCards;
|
package/atomic/cards/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BasisTheoryAtomicCards } from './BasisTheoryAtomicCards';
|
package/atomic/cards/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "BasisTheoryAtomicCards", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _BasisTheoryAtomicCards.BasisTheoryAtomicCards;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
var _BasisTheoryAtomicCards = require("./BasisTheoryAtomicCards");
|
package/atomic/index.d.ts
DELETED
package/atomic/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _banks = require("./banks");
|
|
8
|
-
|
|
9
|
-
Object.keys(_banks).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] === _banks[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _banks[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
var _cards = require("./cards");
|
|
21
|
-
|
|
22
|
-
Object.keys(_cards).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (key in exports && exports[key] === _cards[key]) return;
|
|
25
|
-
Object.defineProperty(exports, key, {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return _cards[key];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { BasisTheoryAtomicBanks } from '@/atomic';
|
|
2
|
-
import type { AtomicBanks as ElementsAtomicBanks, BasisTheoryElementsInternal } from '@/types/elements';
|
|
3
|
-
import type { AtomicBanks } from '@/types/sdk';
|
|
4
|
-
declare const delegateAtomicBanks: (elements?: BasisTheoryElementsInternal | undefined) => new (options: import("../../service/types").BasisTheoryServiceOptions) => ElementsAtomicBanks & AtomicBanks;
|
|
5
|
-
export { delegateAtomicBanks };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.delegateAtomicBanks = void 0;
|
|
7
|
-
|
|
8
|
-
var _atomic = require("./../../atomic");
|
|
9
|
-
|
|
10
|
-
const delegateAtomicBanks = elements => class BasisTheoryAtomicBanksElementsDelegate extends _atomic.BasisTheoryAtomicBanks {
|
|
11
|
-
create(payload, requestOptions) {
|
|
12
|
-
if (elements !== null && elements !== void 0 && elements.hasElement(payload)) {
|
|
13
|
-
return elements.atomicBanks.create(payload, requestOptions);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return super.create(payload, requestOptions);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.delegateAtomicBanks = delegateAtomicBanks;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { BasisTheoryAtomicCards } from '@/atomic';
|
|
2
|
-
import type { AtomicCards as ElementsAtomicCards, BasisTheoryElementsInternal } from '@/types/elements';
|
|
3
|
-
import type { AtomicCards } from '@/types/sdk';
|
|
4
|
-
declare const delegateAtomicCards: (elements?: BasisTheoryElementsInternal | undefined) => new (options: import("../../service/types").BasisTheoryServiceOptions) => ElementsAtomicCards & AtomicCards;
|
|
5
|
-
export { delegateAtomicCards };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.delegateAtomicCards = void 0;
|
|
7
|
-
|
|
8
|
-
var _atomic = require("./../../atomic");
|
|
9
|
-
|
|
10
|
-
const delegateAtomicCards = elements => class BasisTheoryAtomicCardsElementsDelegate extends _atomic.BasisTheoryAtomicCards {
|
|
11
|
-
create(payload, requestOptions) {
|
|
12
|
-
if (elements !== null && elements !== void 0 && elements.hasElement(payload)) {
|
|
13
|
-
return elements.atomicCards.create(payload, requestOptions);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return super.create(payload, requestOptions);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.delegateAtomicCards = delegateAtomicCards;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TextElement } from '@/types/elements';
|
|
2
|
-
import type { Bank, CreateAtomicBank as CreateAtomicBankModel, AtomicBank } from '@/types/models';
|
|
3
|
-
import type { Create } from '@/types/sdk';
|
|
4
|
-
interface CreateAtomicBank extends Pick<CreateAtomicBankModel, 'metadata'> {
|
|
5
|
-
bank: {
|
|
6
|
-
routingNumber: Bank['routingNumber'] | TextElement;
|
|
7
|
-
accountNumber: Bank['accountNumber'] | TextElement;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
declare type AtomicBanks = Create<AtomicBank, CreateAtomicBank>;
|
|
11
|
-
export type { AtomicBanks, CreateAtomicBank };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { CardElement, TextElement } from '@/types/elements';
|
|
2
|
-
import type { CreateAtomicCard as CreateAtomicCardModel, AtomicCard, Card } from '@/types/models';
|
|
3
|
-
import type { Create } from '@/types/sdk';
|
|
4
|
-
interface CreateAtomicCard extends Pick<CreateAtomicCardModel, 'metadata'> {
|
|
5
|
-
card: CardElement | {
|
|
6
|
-
number: Card['number'] | TextElement;
|
|
7
|
-
expirationMonth: Card['expirationMonth'] | TextElement;
|
|
8
|
-
expirationYear: Card['expirationYear'] | TextElement;
|
|
9
|
-
cvc: Card['cvc'] | TextElement;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
declare type AtomicCards = Create<AtomicCard, CreateAtomicCard>;
|
|
13
|
-
export type { AtomicCards, CreateAtomicCard };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/types/models/banks.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { TokenBase } from './shared';
|
|
2
|
-
interface Bank {
|
|
3
|
-
routingNumber: string;
|
|
4
|
-
accountNumber: string;
|
|
5
|
-
}
|
|
6
|
-
interface AtomicBank extends TokenBase {
|
|
7
|
-
type: 'bank';
|
|
8
|
-
bank: Bank;
|
|
9
|
-
}
|
|
10
|
-
declare type CreateAtomicBank = Pick<AtomicBank, 'bank' | 'metadata'>;
|
|
11
|
-
interface UpdateAtomicBank {
|
|
12
|
-
bank: Partial<Bank>;
|
|
13
|
-
}
|
|
14
|
-
export type { Bank, AtomicBank, CreateAtomicBank, UpdateAtomicBank };
|
package/types/models/banks.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/types/models/cards.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TokenBase } from './shared';
|
|
2
|
-
interface Card {
|
|
3
|
-
number: string;
|
|
4
|
-
expirationMonth?: number;
|
|
5
|
-
expirationYear?: number;
|
|
6
|
-
cvc?: string;
|
|
7
|
-
}
|
|
8
|
-
interface AtomicCard extends TokenBase {
|
|
9
|
-
card: Card;
|
|
10
|
-
}
|
|
11
|
-
declare type CreateAtomicCard = Pick<AtomicCard, 'card' | 'metadata'>;
|
|
12
|
-
interface UpdateAtomicCard {
|
|
13
|
-
card?: Partial<Card>;
|
|
14
|
-
}
|
|
15
|
-
export type { AtomicCard, Card, CreateAtomicCard, UpdateAtomicCard };
|
package/types/models/cards.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { AtomicBank, CreateAtomicBank, UpdateAtomicBank } from '@/types/models';
|
|
2
|
-
import type { Create, Retrieve, Update, Delete, List } from './shared';
|
|
3
|
-
interface AtomicBanks extends Create<AtomicBank, CreateAtomicBank>, Retrieve<AtomicBank>, Update<AtomicBank, UpdateAtomicBank>, Delete, List<AtomicBank> {
|
|
4
|
-
}
|
|
5
|
-
export type { AtomicBanks };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { AtomicCard, CreateAtomicCard, UpdateAtomicCard } from '@/types/models';
|
|
2
|
-
import type { Create, Retrieve, Update, Delete, List } from './shared';
|
|
3
|
-
interface AtomicCards extends Create<AtomicCard, CreateAtomicCard>, Retrieve<AtomicCard>, Update<AtomicCard, UpdateAtomicCard>, Delete, List<AtomicCard> {
|
|
4
|
-
}
|
|
5
|
-
export type { AtomicCards };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|