fix(core): update
This commit is contained in:
@@ -1 +1,53 @@
|
||||
import * as plugins from './tink.plugins';
|
||||
import * as plugins from './tink.plugins';
|
||||
|
||||
import { TinkAccount } from './tink.classes.tinkaccount';
|
||||
|
||||
export class TinkUser {
|
||||
// STATIC
|
||||
public static async createNewTinkUser (tinkaccountArg: TinkAccount, externalUserIdArg: string) {
|
||||
const response = await tinkaccountArg.request({
|
||||
externalUserId: null,
|
||||
urlArg: '/api/v1/user/create',
|
||||
methodArg: 'POST',
|
||||
scopeArg: 'user:create',
|
||||
payloadArg: {
|
||||
"external_user_id": externalUserIdArg,
|
||||
"market": "GB",
|
||||
"locale": "en_US"
|
||||
}
|
||||
});
|
||||
|
||||
console.log(response);
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
public tinkAccountRef: TinkAccount;
|
||||
public tinkUserId: string;
|
||||
public externalUserIdArg: string;
|
||||
|
||||
public authorizationToken: string
|
||||
|
||||
constructor(tinkAccountrefArg: TinkAccount, tinkUserIdArg: string, externalUserIdArg: string) {
|
||||
this.tinkAccountRef = tinkAccountrefArg;
|
||||
this.tinkUserId = tinkUserIdArg;
|
||||
this.externalUserIdArg = externalUserIdArg;
|
||||
}
|
||||
|
||||
public async authorize() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* deletes the user
|
||||
*/
|
||||
public async delete() {
|
||||
const response = await this.tinkAccountRef.request({
|
||||
externalUserId: this.externalUserIdArg,
|
||||
methodArg: 'POST',
|
||||
payloadArg: {},
|
||||
scopeArg: 'user:delete',
|
||||
urlArg: '/api/v1/user/delete'
|
||||
});
|
||||
console.log(response);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user