import BaseAPI from './BaseAPI' ; class AppsPermissions extends BaseAPI { public resouces ; public scopes ; public users ; constructor ( token , retries_limit ) { super ( token , retries_limit ) ; this . resouces = new AppsPermissionsResouces ( token , retries_limit ) ; this . scopes = new AppsPermissionsScopes ( token , retries_limit ) ; this . users = new AppsPermissionsUsers ( token , retries_limit ) ; } public info ( extraArgs = { } ) { const args = { ... extraArgs } ; return this . _get ( 'apps.permissions.info' , args ) ; } public request ( scopes , trigger_id , extraArgs = { } ) { const args = { ... { scopes , trigger_id } , ... extraArgs } ; return this . _get ( 'apps.permissions.request' , args ) ; } } class AppsPermissionsResouces extends BaseAPI { public list ( cursor = null , limit = null , extraArgs = { } ) { const args = { ... { cursor , limit } , ... extraArgs } ; return this . _get ( 'apps.permissions.resouces.list' , args ) ; } } class AppsPermissionsScopes extends BaseAPI { public list ( extraArgs = { } ) { const args = { ... extraArgs } ; return this . _get ( 'apps.permissions.scopes.list' , args ) ; } } class AppsPermissionsUsers extends BaseAPI { public list ( cursor = null , limit = null , extraArgs = { } ) { const args = { cursor , limit , ... extraArgs } ; return this . _get ( 'apps.permissions.users.list' , args ) ; } public request ( scopes , trigger_id , user , extraArgs = { } ) { const args = { scopes , trigger_id , user , ... extraArgs } ; return this . _get ( 'apps.permissions.users.request' , args ) ; } } export default class Apps extends BaseAPI { public permissions : AppsPermissions ; constructor ( token , retries_limit ) { super ( token , retries_limit ) ; this . permissions = new AppsPermissions ( token , retries_limit ) ; } public uninstall ( client_id , client_secret , options = { } ) { const args = { client_id , client_secret , ... options } ; return this . _get ( 'apps.permissions.users.request' , args ) ; } }