UNPKG

tipi-services

Version:

Node.js library to access wrapping REST API of tipi backend services

33 lines (24 loc) 929 B
const Service = require('../../../Service') const Endpoints = require('./Endpoints') class StaffEmailsService extends Service { constructor (baseUrl) { super() this.endpoints = Endpoints(baseUrl) } async getByEmail (email) { return this.sendRequest({ endpoint: this.endpoints.getByEmail, params: { email } }) } async resendInvitation (email) { return this.sendRequest({ endpoint: this.endpoints.resendInvitation, params: { email } }) } async resendVerification (email) { return this.sendRequest({ endpoint: this.endpoints.resendVerification, params: { email } }) } async resetToken (email) { return this.sendRequest({ endpoint: this.endpoints.resetToken, params: { email } }) } async reset (email, data) { return this.sendRequest({ endpoint: this.endpoints.reset, params: { email }, body: data }) } } module.exports = StaffEmailsService