UNPKG

@mft/moneyhub-api-client

Version:
36 lines 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = ({ config, request }) => { const { resourceServerUrl } = config; return { getRentalRecords: async ({ userId }, options) => request(`${resourceServerUrl}/rental-records`, { cc: { scope: "rental_records:read", sub: userId, }, options, }), createRentalRecord: async ({ userId, rentalData }, options) => { return await request(`${resourceServerUrl}/rental-records`, { method: "POST", cc: { scope: "rental_records:write", sub: userId, }, body: rentalData, options, }); }, deleteRentalRecord: async ({ userId, rentalId }, options) => { return await request(`${resourceServerUrl}/rental-records/${rentalId}`, { method: "DELETE", cc: { scope: "rental_records:write", sub: userId, }, options, }); }, }; }; //# sourceMappingURL=rental-records.js.map