@basis-theory/basis-theory-js
Advanced tools
Comparing version 1.3.0 to 1.4.0
{ | ||
"name": "@basis-theory/basis-theory-js", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"repository": "https://github.com/Basis-Theory/basis-theory-js", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
import { BasisTheoryServiceOptions, PaginatedList, RequestOptions } from '../service'; | ||
import type { Token, CreateTokenModel, ListTokensQuery, RetrieveTokenQuery, ListTokensQueryDecrypted, TokenData } from './types'; | ||
import type { Token, CreateTokenModel, ListTokensQuery, RetrieveTokenQuery, ListTokensQueryDecrypted } from './types'; | ||
export declare const BasisTheoryTokens: { | ||
new (options: BasisTheoryServiceOptions): { | ||
/** | ||
* @deprecated use {@link create} instead | ||
*/ | ||
createToken(data: TokenData): Promise<Token>; | ||
/** | ||
* @deprecated use {@link retrieve} instead | ||
*/ | ||
getToken(id: string): Promise<Token>; | ||
/** | ||
* @deprecated use {@link delete} instead | ||
*/ | ||
deleteToken(id: string): Promise<void>; | ||
retrieve(id: string, query?: RetrieveTokenQuery, options?: RequestOptions): Promise<Token>; | ||
@@ -18,0 +6,0 @@ retrieveDecrypted(id: string, query?: RetrieveTokenQuery, options?: RequestOptions): Promise<Token>; |
@@ -25,29 +25,3 @@ "use strict"; | ||
} | ||
/** | ||
* @deprecated use {@link create} instead | ||
*/ | ||
createToken(data) { | ||
return this.client.post('/', { | ||
data | ||
}).then(_utils.dataExtractor); | ||
} | ||
/** | ||
* @deprecated use {@link retrieve} instead | ||
*/ | ||
getToken(id) { | ||
return this.client.get(id).then(_utils.dataExtractor); | ||
} | ||
/** | ||
* @deprecated use {@link delete} instead | ||
*/ | ||
async deleteToken(id) { | ||
await this.client.delete(id); | ||
} | ||
retrieve(id, query = {}, options = {}) { | ||
@@ -54,0 +28,0 @@ const url = `/${id}${(0, _common.getQueryParams)(query)}`; |
@@ -20,3 +20,3 @@ import type { PaginatedQuery } from '../service'; | ||
tenantId: string; | ||
type?: TokenType; | ||
type: TokenType; | ||
data: TokenData; | ||
@@ -23,0 +23,0 @@ fingerprint?: string; |
96965
2033