@basis-theory/basis-theory-js
Advanced tools
Comparing version 2.3.2 to 2.4.0
{ | ||
"name": "@basis-theory/basis-theory-js", | ||
"version": "2.3.2", | ||
"version": "2.4.0", | ||
"repository": "https://github.com/Basis-Theory/basis-theory-js", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
import { BasisTheoryService } from '../service'; | ||
import type { Permission } from '../types/models'; | ||
import type { RequestOptions } from '../types/sdk'; | ||
import type { ListPermissionsQuery, RequestOptions } from '../types/sdk'; | ||
export declare class BasisTheoryPermissions extends BasisTheoryService { | ||
list(options?: RequestOptions): Promise<Permission[]>; | ||
list(query?: ListPermissionsQuery, options?: RequestOptions): Promise<Permission[]>; | ||
} |
@@ -13,4 +13,5 @@ "use strict"; | ||
class BasisTheoryPermissions extends _service.BasisTheoryService { | ||
list(options) { | ||
return this.client.get('/', (0, _common.createRequestConfig)(options)).then(_common.dataExtractor); | ||
list(query, options) { | ||
const url = `/${(0, _common.getQueryParams)(query)}`; | ||
return this.client.get(url, (0, _common.createRequestConfig)(options)).then(_common.dataExtractor); | ||
} | ||
@@ -17,0 +18,0 @@ |
import type { Permission } from '../../../types/models'; | ||
import { ApplicationType } from '../../../types/models'; | ||
import type { RequestOptions } from './shared'; | ||
interface ListPermissionsQuery { | ||
applicationType?: ApplicationType; | ||
} | ||
interface Permissions { | ||
list(options?: RequestOptions): Promise<Permission[]>; | ||
list(query?: ListPermissionsQuery, options?: RequestOptions): Promise<Permission[]>; | ||
} | ||
export type { Permissions }; | ||
export type { Permissions, ListPermissionsQuery }; |
156721
3415