@mft/moneyhub-api-client
Version:
Node.JS client for the Moneyhub API
37 lines • 1.32 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ({ config, request, }) => {
const { osipResourceServerUrl } = config;
return {
getOsipAccounts: async ({ userId, params = {} }, options) => request(`${osipResourceServerUrl}/accounts`, {
searchParams: params,
cc: {
scope: "osip:read",
sub: userId,
},
options,
}),
getOsipAccount: async ({ userId, accountId }, options) => request(`${osipResourceServerUrl}/accounts/${accountId}`, {
cc: {
scope: "osip:read",
sub: userId,
},
options,
}),
getOsipAccountHoldings: async ({ userId, accountId }, options) => request(`${osipResourceServerUrl}/accounts/${accountId}/holdings`, {
cc: {
scope: "osip:read",
sub: userId,
},
options,
}),
getOsipAccountTransactions: async ({ userId, accountId }, options) => request(`${osipResourceServerUrl}/accounts/${accountId}/transactions`, {
cc: {
scope: "osip:read",
sub: userId,
},
options,
}),
};
};
//# sourceMappingURL=osip.js.map