@basis-theory/basis-theory-js
Advanced tools
Comparing version 1.0.0-alpha.24 to 1.0.0-alpha.25
@@ -13,3 +13,3 @@ import type { Application, ApplicationQuery, CreateApplicationModel } from './types'; | ||
}; | ||
} & (new (...args: any[]) => import("../service/CrudBuilder").ICreate<Application, CreateApplicationModel>) & (new (...args: any[]) => import("../service/CrudBuilder").IRetrieve<Application>) & (new (...args: any[]) => import("../service/CrudBuilder").IUpdate<Application, Partial<Pick<Application, "name" | "permissions">>>) & (new (...args: any[]) => import("../service/CrudBuilder").IDelete) & (new (...args: any[]) => import("../service/CrudBuilder").IList<Application, ApplicationQuery>); | ||
} & (new (...args: any[]) => import("../service/CrudBuilder").ICreate<Application, CreateApplicationModel>) & (new (...args: any[]) => import("../service/CrudBuilder").IRetrieve<Application>) & (new (...args: any[]) => import("../service/CrudBuilder").IUpdate<Application, Partial<Pick<Application, "permissions" | "name">>>) & (new (...args: any[]) => import("../service/CrudBuilder").IDelete) & (new (...args: any[]) => import("../service/CrudBuilder").IList<Application, ApplicationQuery>); | ||
export declare type BasisTheoryApplications = InstanceType<typeof BasisTheoryApplications>; |
@@ -7,2 +7,3 @@ import { BasisTheoryAtomic } from './atomic'; | ||
import type { BasisTheoryElements } from './elements'; | ||
import { BasisTheoryPermissions } from './permissions'; | ||
export declare const defaultInitOptions: Required<BasisTheoryInitOptions>; | ||
@@ -17,2 +18,3 @@ export declare class BasisTheory { | ||
private _applications?; | ||
private _permissions?; | ||
init(apiKey: string, options?: BasisTheoryInitOptions): Promise<BasisTheory>; | ||
@@ -27,2 +29,3 @@ private loadElements; | ||
get applications(): BasisTheoryApplications; | ||
get permissions(): BasisTheoryPermissions; | ||
} |
@@ -18,2 +18,4 @@ "use strict"; | ||
var _permissions = require("./permissions"); | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -42,2 +44,4 @@ | ||
_defineProperty(this, "_applications", void 0); | ||
_defineProperty(this, "_permissions", void 0); | ||
} | ||
@@ -68,2 +72,6 @@ | ||
}); | ||
this._permissions = new _permissions.BasisTheoryPermissions({ | ||
apiKey, | ||
baseURL: _common.SERVICES.permissions[this._initOptions.environment] | ||
}); | ||
this._encryption = new _BasisTheoryEncryptionAdapters.BasisTheoryEncryptionAdapters(); | ||
@@ -118,4 +126,8 @@ | ||
get permissions() { | ||
return (0, _common.assertInit)(this._permissions); | ||
} | ||
} | ||
exports.BasisTheory = BasisTheory; |
@@ -22,2 +22,7 @@ "use strict"; | ||
local: `http://${"localhost:3333"}/applications` | ||
}, | ||
permissions: { | ||
production: `https://${"api.basistheory.com"}/permissions`, | ||
sandbox: `https://${"api-dev.basistheory.com"}/permissions`, | ||
local: `http://${"localhost:3333"}/permissions` | ||
} | ||
@@ -24,0 +29,0 @@ }; |
{ | ||
"name": "@basis-theory/basis-theory-js", | ||
"version": "1.0.0-alpha.24", | ||
"version": "1.0.0-alpha.25", | ||
"repository": "https://github.com/Basis-Theory/basis-theory-js", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -7,3 +7,3 @@ import type { BasisTheoryElements } from './elements'; | ||
}; | ||
export declare type Services = 'tokens' | 'atomic' | 'applications'; | ||
export declare type Services = 'tokens' | 'atomic' | 'applications' | 'permissions'; | ||
export declare type ServicesMap = { | ||
@@ -10,0 +10,0 @@ [key in Services]: ServiceUrlMap; |
Sorry, the diff of this file is too big to display
133122
70
1454