tracker-api
Version:
A comprehensive JavaScript/TypeScript library for user behavior tracking and analytics
45 lines • 1.22 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomerClient = void 0;
// customer-client.ts - Customer management API client
const base_client_1 = require("./base-client");
class CustomerClient extends base_client_1.BaseClient {
/**
* Register a new customer
*/
async register(data) {
return this.post('/api/customers/register', data);
}
/**
* Login customer
*/
async login(data) {
return this.post('/api/customers/login', data);
}
/**
* Get customer profile
*/
async getProfile(token) {
return this.get('/api/customers/profile', token);
}
/**
* Update customer profile
*/
async updateProfile(token, data) {
return this.put('/api/customers/profile', data, token);
}
/**
* Change password
*/
async changePassword(token, data) {
return this.post('/api/customers/change-password', data, token);
}
/**
* Get all customers (Admin only)
*/
async getAllCustomers(token) {
return this.get('/api/customers', token);
}
}
exports.CustomerClient = CustomerClient;
//# sourceMappingURL=customer-client.js.map