introduce EmployeeAccount

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov
2021-09-10 11:47:38 +02:00
parent f1f254b104
commit 12e49add3f
3 changed files with 22 additions and 9 deletions
+4 -3
View File
@@ -103,14 +103,15 @@ program
const url = new URL(`/${token}`, transactorUrl)
const contrib = await createContributingClient(url.href)
const txop = new TxOperations(contrib, core.account.System)
await txop.createDoc(contact.class.Employee, contact.space.Employee, {
const employee = await txop.createDoc(contact.class.Employee, contact.space.Employee, {
firstName: account.first,
lastName: account.last,
city: 'Mountain View',
channels: []
})
await txop.createDoc(core.class.Account, core.space.Model, {
email
await txop.createDoc(contact.class.EmployeeAccount, core.space.Model, {
email,
employee
})
})
})