@mft/moneyhub-api-client 5.7.0 → 5.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ 5.7.0 / 2023-09-11
2
+ ==================
3
+
4
+ **Features**
5
+
6
+ * Add OSIP methods
7
+
1
8
  5.6.1 / 2023-09-06
2
9
  ==================
3
10
 
package/dist/index.d.ts CHANGED
@@ -131,11 +131,12 @@ declare const _Moneyhub: (apiClientConfig: ApiClientConfig) => Promise<{
131
131
  userId?: string | undefined;
132
132
  params?: Taxes.TaxSearchParams | undefined;
133
133
  }, options?: import("./request").ExtraOptions | undefined) => Promise<import("./request").ApiResponse<Taxes.Tax>>;
134
- syncUserConnection: ({ userId, connectionId, customerIpAddress, customerLastLoggedTime, }: {
134
+ syncUserConnection: ({ userId, connectionId, customerIpAddress, customerLastLoggedTime, enableAsync, }: {
135
135
  userId?: string | undefined;
136
136
  connectionId: string;
137
137
  customerIpAddress?: string | undefined;
138
138
  customerLastLoggedTime?: string | undefined;
139
+ enableAsync?: boolean | undefined;
139
140
  }, options?: import("./request").ExtraOptions | undefined) => Promise<import("./request").ApiResponse<Syncs.SyncResponse>>;
140
141
  getStandingOrder: ({ id }: {
141
142
  id: string;
@@ -282,6 +283,22 @@ declare const _Moneyhub: (apiClientConfig: ApiClientConfig) => Promise<{
282
283
  getPayee: ({ id }: {
283
284
  id: string;
284
285
  }, options?: import("./request").ExtraOptions | undefined) => Promise<import("./request").ApiResponse<Payees.Payee>>;
286
+ getOsipAccounts: ({ userId, params }: {
287
+ userId?: string | undefined;
288
+ params?: import("./request").SearchParams | undefined;
289
+ }, options?: import("./request").ExtraOptions | undefined) => Promise<Omit<import("./request").ApiResponse<Osip.OsipAccount[]>, "links">>;
290
+ getOsipAccount: ({ userId, accountId }: {
291
+ userId?: string | undefined;
292
+ accountId: string;
293
+ }, options?: import("./request").ExtraOptions | undefined) => Promise<Omit<import("./request").ApiResponse<Osip.OsipAccount>, "links">>;
294
+ getOsipAccountHoldings: ({ userId, accountId, }: {
295
+ userId?: string | undefined;
296
+ accountId: string;
297
+ }, options?: import("./request").ExtraOptions | undefined) => Promise<import("./request").ApiResponse<Osip.OsipHolding[]>>;
298
+ getOsipAccountTransactions: ({ userId, accountId, }: {
299
+ userId?: string | undefined;
300
+ accountId: string;
301
+ }, options?: import("./request").ExtraOptions | undefined) => Promise<import("./request").ApiResponse<Osip.OsipTransaction[]>>;
285
302
  getNotificationThresholds: ({}: {
286
303
  userId?: string | undefined;
287
304
  accountId: string;
@@ -663,6 +680,7 @@ import type * as Categories from "./schema/category";
663
680
  import type * as Counterparties from "./schema/counterparty";
664
681
  import type * as Holdings from "./schema/holding";
665
682
  import type * as NotificationThresholds from "./schema/notification-threshold";
683
+ import type * as Osip from "./schema/osip";
666
684
  import type * as Payees from "./schema/payee";
667
685
  import type * as Payments from "./schema/payment";
668
686
  import type * as Projects from "./schema/project";
@@ -676,5 +694,5 @@ import type * as Syncs from "./schema/sync";
676
694
  import type * as Taxes from "./schema/tax";
677
695
  import type * as Transactions from "./schema/transaction";
678
696
  import type * as Users from "./schema/user";
679
- export { Accounts, Affordability, AuthRequests, Balances, Beneficiaries, Categories, Counterparties, Holdings, NotificationThresholds, Payees, Payments, Projects, RegularTransactions, RentalRecords, SavingsGoals, SpendingAnalysis, SpendingGoals, StandingOrders, Syncs, Taxes, Transactions, Users, ApiClientConfig, Moneyhub, };
697
+ export { Accounts, Affordability, AuthRequests, Balances, Beneficiaries, Categories, Counterparties, Holdings, NotificationThresholds, Osip, Payees, Payments, Projects, RegularTransactions, RentalRecords, SavingsGoals, SpendingAnalysis, SpendingGoals, StandingOrders, Syncs, Taxes, Transactions, Users, ApiClientConfig, Moneyhub, };
680
698
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO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CAAA;AAE3C,OAAO,EACL,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,UAAU,EACV,cAAc,EACd,QAAQ,EACR,sBAAsB,EACtB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,KAAK,EACL,KAAK,EACL,YAAY,EACZ,KAAK,EACL,eAAe,EACf,QAAQ,GACT,CAAA"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAwD;AACxD,oEAAgD;AAChD,sDAAuC;AACvC,0DAAwC;AACxC,yCAA0B;AAC1B,wDAA2B;AAE3B,MAAM,eAAe,GAAG,KAAK,CAAA;AAE7B,MAAM,SAAS,GAAG,KAAK,EAAE,eAAgC,EAAE,EAAE;IAC3D,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CACrB;QACE,kBAAkB,EAAE,CAAC,GAA0C,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;KAC7F,EACD,eAAe,CAChB,CAAA;IAED,MAAM,EACJ,kBAAkB,EAClB,OAAO,GAAG,EAAE,EACZ,MAAM,EAAE,EACN,SAAS,EACT,aAAa,EACb,4BAA4B,EAC5B,0BAA0B,EAC1B,YAAY,EACZ,IAAI,EACJ,0BAA0B,GAC3B,GACF,GAAG,MAAM,CAAA;IAEV,MAAM,EAAC,OAAO,GAAG,eAAe,EAAC,GAAG,OAAO,CAAA;IAE3C,sBAAM,CAAC,sBAAsB,CAAC;QAC5B,OAAO;KACR,CAAC,CAAA;IAEF,MAAM,cAAc,GAAG,MAAM,sBAAM,CAAC,QAAQ,CAAC,kBAAkB,GAAG,OAAO,CAAC,CAAA;IAE1E,MAAM,MAA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CAAC,CAAA;AAGD,MAAM,QAAQ,GAAoE,SAAS,CAAA;AAmDzF,4BAAQ"}
package/dist/request.d.ts CHANGED
@@ -17,6 +17,7 @@ interface Links {
17
17
  prev?: string;
18
18
  self: string;
19
19
  }
20
+ declare type Version = "v2.0" | "v2" | "v3";
20
21
  export declare type Request = <T>(url: string, opts?: RequestOptions) => Promise<T>;
21
22
  export interface RequestsParams {
22
23
  config: ApiClientConfig;
@@ -37,7 +38,9 @@ export interface ApiResponse<T> {
37
38
  export interface ExtraOptions {
38
39
  token?: string;
39
40
  headers?: Headers;
41
+ version?: Version;
40
42
  }
43
+ export declare const addVersionToUrl: (url: string, version?: Version) => string;
41
44
  declare const _default: ({ client, options: { timeout }, }: {
42
45
  client: Client;
43
46
  options: {
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA,OAAY,EAAC,OAAO,EAAE,OAAO,EAA4B,MAAM,KAAK,CAAA;AACpE,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAA;AAIpC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAA;AAEpD,UAAU,cAAe,SAAQ,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,SAAS,GAAG,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;IACrG,YAAY,CAAC,EAAE,GAAG,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,EAAE,CAAC,EAAE;QACH,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;IACD,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB;AAED,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CA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/request.js CHANGED
@@ -26,6 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.addVersionToUrl = void 0;
29
30
  const got_1 = __importDefault(require("got"));
30
31
  const query_string_1 = __importDefault(require("query-string"));
31
32
  const R = __importStar(require("ramda"));
@@ -47,21 +48,28 @@ const attachErrorDetails = (err) => {
47
48
  err.error_details = details;
48
49
  throw err;
49
50
  };
51
+ const addVersionToUrl = (url, version = "v3") => {
52
+ if (url.includes("identity"))
53
+ return url;
54
+ return /\/v.+/g.test(url) ? url : `${url}/${version}`;
55
+ };
56
+ exports.addVersionToUrl = addVersionToUrl;
50
57
  exports.default = ({ client, options: { timeout }, }) => async (url, opts = {}) => {
51
- var _a, _b, _c;
58
+ var _a, _b, _c, _d;
52
59
  const gotOpts = {
53
60
  method: opts.method || "GET",
54
61
  headers: opts.headers || {},
55
62
  searchParams: query_string_1.default.stringify(opts.searchParams),
56
63
  timeout,
57
64
  };
58
- if ((_a = opts.options) === null || _a === void 0 ? void 0 : _a.token) {
65
+ const formattedUrl = (0, exports.addVersionToUrl)(url, (_a = opts.options) === null || _a === void 0 ? void 0 : _a.version);
66
+ if ((_b = opts.options) === null || _b === void 0 ? void 0 : _b.token) {
59
67
  gotOpts.headers = R.assoc("Authorization", `Bearer ${opts.options.token}`, gotOpts.headers);
60
68
  }
61
- if ((_b = opts.options) === null || _b === void 0 ? void 0 : _b.headers) {
69
+ if ((_c = opts.options) === null || _c === void 0 ? void 0 : _c.headers) {
62
70
  gotOpts.headers = R.mergeDeepRight(gotOpts.headers || {}, opts.options.headers);
63
71
  }
64
- if (!((_c = gotOpts.headers) === null || _c === void 0 ? void 0 : _c.Authorization) && opts.cc) {
72
+ if (!((_d = gotOpts.headers) === null || _d === void 0 ? void 0 : _d.Authorization) && opts.cc) {
65
73
  const { access_token } = await client.grant({
66
74
  grant_type: "client_credentials",
67
75
  scope: opts.cc.scope,
@@ -78,7 +86,7 @@ exports.default = ({ client, options: { timeout }, }) => async (url, opts = {})
78
86
  if (opts.formData) {
79
87
  gotOpts.body = opts.formData;
80
88
  }
81
- const req = (0, got_1.default)(url, gotOpts);
89
+ const req = (0, got_1.default)(formattedUrl, gotOpts);
82
90
  if (opts.returnStatus) {
83
91
  return req.then((res) => res.statusCode)
84
92
  .catch(attachErrorDetails);
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAoE;AAEpE,gEAA6B;AAC7B,yCAA0B;AAgD1B,MAAM,eAAe,GAAG,CAAC,GAAY,EAAE,EAAE;IACvC,IAAI,IAAI,GAIJ,EAAE,CAAA;IACN,IAAI;QACF,MAAM,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QACtF,IAAI,GAAG,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAC,CAAA;KACjG;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,GAAG,EAAE,CAAA;KACV;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG,CAAC,GAAY,EAAE,EAAE;IAC1C,MAAM,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,GAAG,eAAe,CAAC,GAAG,CAAC,CACpD;IAAC,GAAW,CAAC,KAAK,GAAG,IAAI,CACzB;IAAC,GAAW,CAAC,iBAAiB,GAAG,OAAO,CACxC;IAAC,GAAW,CAAC,aAAa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AAE,CAAC,GAAG,CAAC,UAAU,CAAC;aACnD,KAAK,CAAC,kBAAkB,CAAC,CAAA;KAC7B;IAED,OAAQ,GAAW,CAAC,IAAI,EAAE;SACvB,KAAK,CAAC,kBAAkB,CAAC,CAAA;AAC9B,CAAC,CAAA"}
@@ -126,11 +126,12 @@ declare const _default: ({ config, request }: RequestsParams) => {
126
126
  userId?: string | undefined;
127
127
  params?: import("../schema/tax").TaxSearchParams | undefined;
128
128
  }, options?: import("../request").ExtraOptions | undefined) => Promise<import("../request").ApiResponse<import("../schema/tax").Tax>>;
129
- syncUserConnection: ({ userId, connectionId, customerIpAddress, customerLastLoggedTime, }: {
129
+ syncUserConnection: ({ userId, connectionId, customerIpAddress, customerLastLoggedTime, enableAsync, }: {
130
130
  userId?: string | undefined;
131
131
  connectionId: string;
132
132
  customerIpAddress?: string | undefined;
133
133
  customerLastLoggedTime?: string | undefined;
134
+ enableAsync?: boolean | undefined;
134
135
  }, options?: import("../request").ExtraOptions | undefined) => Promise<import("../request").ApiResponse<import("../schema/sync").SyncResponse>>;
135
136
  getStandingOrder: ({ id }: {
136
137
  id: string;
@@ -277,6 +278,22 @@ declare const _default: ({ config, request }: RequestsParams) => {
277
278
  getPayee: ({ id }: {
278
279
  id: string;
279
280
  }, options?: import("../request").ExtraOptions | undefined) => Promise<import("../request").ApiResponse<import("../schema/payee").Payee>>;
281
+ getOsipAccounts: ({ userId, params }: {
282
+ userId?: string | undefined;
283
+ params?: import("../request").SearchParams | undefined;
284
+ }, options?: import("../request").ExtraOptions | undefined) => Promise<Omit<import("../request").ApiResponse<import("../schema/osip").OsipAccount[]>, "links">>;
285
+ getOsipAccount: ({ userId, accountId }: {
286
+ userId?: string | undefined;
287
+ accountId: string;
288
+ }, options?: import("../request").ExtraOptions | undefined) => Promise<Omit<import("../request").ApiResponse<import("../schema/osip").OsipAccount>, "links">>;
289
+ getOsipAccountHoldings: ({ userId, accountId, }: {
290
+ userId?: string | undefined;
291
+ accountId: string;
292
+ }, options?: import("../request").ExtraOptions | undefined) => Promise<import("../request").ApiResponse<import("../schema/osip").OsipHolding[]>>;
293
+ getOsipAccountTransactions: ({ userId, accountId, }: {
294
+ userId?: string | undefined;
295
+ accountId: string;
296
+ }, options?: import("../request").ExtraOptions | undefined) => Promise<import("../request").ApiResponse<import("../schema/osip").OsipTransaction[]>>;
280
297
  getNotificationThresholds: ({}: {
281
298
  userId?: string | undefined;
282
299
  accountId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/requests/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAA;8CA0BN,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAjD,wBA0BC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/requests/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAA;8CA2BN,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAjD,wBA2BC"}
@@ -9,6 +9,7 @@ const auth_requests_1 = __importDefault(require("./auth-requests"));
9
9
  const beneficiaries_1 = __importDefault(require("./beneficiaries"));
10
10
  const categories_1 = __importDefault(require("./categories"));
11
11
  const notification_thresholds_1 = __importDefault(require("./notification-thresholds"));
12
+ const osip_1 = __importDefault(require("./osip"));
12
13
  const payees_1 = __importDefault(require("./payees"));
13
14
  const payments_1 = __importDefault(require("./payments"));
14
15
  const projects_1 = __importDefault(require("./projects"));
@@ -34,6 +35,7 @@ exports.default = ({ config, request }) => {
34
35
  ...(0, beneficiaries_1.default)({ config, request }),
35
36
  ...(0, categories_1.default)({ config, request }),
36
37
  ...(0, notification_thresholds_1.default)({ config, request }),
38
+ ...(0, osip_1.default)({ config, request }),
37
39
  ...(0, payees_1.default)({ config, request }),
38
40
  ...(0, payments_1.default)({ config, request }),
39
41
  ...(0, projects_1.default)({ config, request }),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/requests/index.ts"],"names":[],"mappings":";;;;;AAEA,0DAAiC;AACjC,oEAA2C;AAC3C,oEAA0C;AAC1C,oEAA2C;AAC3C,8DAAqC;AACrC,wFAA8D;AAC9D,sDAA6B;AAC7B,0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C;QACzB,GAAG,IAAA,2BAAgB,EAAC,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC;QACtC,GAAG,IAAA,4BAAiB,EAAC,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC;QACvC,GAAG,IAAA,sBAAY,EAAC,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC;QAClC,GAAG,IAAA,yBAAe,EAAC,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC;QACrC,GAAG,IAAA,+BAAmB,EAAC,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC;KAC1C,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { RequestsParams } from "../request";
2
+ import type { OsipRequests } from "./types/osip";
3
+ declare const _default: ({ config, request, }: RequestsParams) => OsipRequests;
4
+ export default _default;
5
+ //# sourceMappingURL=osip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osip.d.ts","sourceRoot":"","sources":["../../src/requests/osip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,cAAc,CAAA;+CAK3C,cAAc,KAAG,YAAY;AAHhC,wBA+CC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = ({ config, request, }) => {
4
+ const { osipResourceServerUrl } = config;
5
+ return {
6
+ getOsipAccounts: async ({ userId, params = {} }, options) => request(`${osipResourceServerUrl}/accounts`, {
7
+ searchParams: params,
8
+ cc: {
9
+ scope: "osip:read",
10
+ sub: userId,
11
+ },
12
+ options,
13
+ }),
14
+ getOsipAccount: async ({ userId, accountId }, options) => request(`${osipResourceServerUrl}/accounts/${accountId}`, {
15
+ cc: {
16
+ scope: "osip:read",
17
+ sub: userId,
18
+ },
19
+ options,
20
+ }),
21
+ getOsipAccountHoldings: async ({ userId, accountId }, options) => request(`${osipResourceServerUrl}/accounts/${accountId}/holdings`, {
22
+ cc: {
23
+ scope: "osip:read",
24
+ sub: userId,
25
+ },
26
+ options,
27
+ }),
28
+ getOsipAccountTransactions: async ({ userId, accountId }, options) => request(`${osipResourceServerUrl}/accounts/${accountId}/transactions`, {
29
+ cc: {
30
+ scope: "osip:read",
31
+ sub: userId,
32
+ },
33
+ options,
34
+ }),
35
+ };
36
+ };
37
+ //# sourceMappingURL=osip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osip.js","sourceRoot":"","sources":["../../src/requests/osip.ts"],"names":[],"mappings":";;AAGA,kBAAe,CAAC,EACd,MAAM,EACN,OAAO,GACQ,EAAgB,EAAE;IACjC,MAAM,EAAC,qBAAqB,EAAC,GAAG,MAAM,CAAA;IAEtC,OAAO;QACL,eAAe,EAAE,KAAK,EAAE,EAAC,MAAM,EAAE,MAAM,GAAG,EAAE,EAAC,EAAE,OAAO,EAAE,EAAE,CACxD,OAAO,CAAC,GAAG,qBAAqB,WAAW,EAAE;YAC3C,YAAY,EAAE,MAAM;YACpB,EAAE,EAAE;gBACF,KAAK,EAAE,WAAW;gBAClB,GAAG,EAAE,MAAM;aACZ;YACD,OAAO;SACR,CAAC;QAEJ,cAAc,EAAE,KAAK,EAAE,EAAC,MAAM,EAAE,SAAS,EAAC,EAAE,OAAO,EAAE,EAAE,CACrD,OAAO,CAAC,GAAG,qBAAqB,aAAa,SAAS,EAAE,EAAE;YACxD,EAAE,EAAE;gBACF,KAAK,EAAE,WAAW;gBAClB,GAAG,EAAE,MAAM;aACZ;YACD,OAAO;SACR,CAAC;QAEJ,sBAAsB,EAAE,KAAK,EAAE,EAAC,MAAM,EAAE,SAAS,EAAC,EAAE,OAAO,EAAE,EAAE,CAC7D,OAAO,CAAC,GAAG,qBAAqB,aAAa,SAAS,WAAW,EAAE;YACjE,EAAE,EAAE;gBACF,KAAK,EAAE,WAAW;gBAClB,GAAG,EAAE,MAAM;aACZ;YACD,OAAO;SACR,CAAC;QAEJ,0BAA0B,EAAE,KAAK,EAAE,EAAC,MAAM,EAAE,SAAS,EAAC,EAAE,OAAO,EAAE,EAAE,CACjE,OAAO,CACL,GAAG,qBAAqB,aAAa,SAAS,eAAe,EAC7D;YACE,EAAE,EAAE;gBACF,KAAK,EAAE,WAAW;gBAClB,GAAG,EAAE,MAAM;aACZ;YACD,OAAO;SACR,CACF;KACJ,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/requests/sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAA;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAA;8CAGN,cAAc,KAAG,YAAY;AAAhE,wBAoBC"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/requests/sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAA;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAA;8CAGN,cAAc,KAAG,YAAY;AAAhE,wBAqBC"}
@@ -28,9 +28,9 @@ const filterUndefined = R.reject(R.isNil);
28
28
  exports.default = ({ config, request }) => {
29
29
  const { resourceServerUrl } = config;
30
30
  return {
31
- syncUserConnection: ({ userId, connectionId, customerIpAddress, customerLastLoggedTime, }, options) => request(`${resourceServerUrl}/sync/${connectionId}`, {
31
+ syncUserConnection: ({ userId, connectionId, customerIpAddress, customerLastLoggedTime, enableAsync, }, options) => request(`${resourceServerUrl}/sync/${connectionId}`, {
32
32
  method: "POST",
33
- body: filterUndefined({ customerIpAddress, customerLastLoggedTime }),
33
+ body: filterUndefined({ customerIpAddress, customerLastLoggedTime, enableAsync }),
34
34
  cc: {
35
35
  scope: "accounts:read accounts:write:all",
36
36
  sub: userId,
@@ -1 +1 @@
1
- {"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/requests/sync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;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;gBACF,KAAK,EAAE,kCAAkC;gBACzC,GAAG,EAAE,MAAM;aACZ;YACD,OAAO;SACR,CAAC;KACL,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { ApiResponse, ExtraOptions, SearchParams } from "../../request";
2
+ import type { OsipAccount, OsipHolding, OsipTransaction } from "../../schema/osip";
3
+ export interface OsipRequests {
4
+ getOsipAccounts: ({ userId, params }: {
5
+ userId?: string;
6
+ params?: SearchParams;
7
+ }, options?: ExtraOptions) => Promise<Omit<ApiResponse<OsipAccount[]>, "links">>;
8
+ getOsipAccount: ({ userId, accountId }: {
9
+ userId?: string;
10
+ accountId: string;
11
+ }, options?: ExtraOptions) => Promise<Omit<ApiResponse<OsipAccount>, "links">>;
12
+ getOsipAccountHoldings: ({ userId, accountId, }: {
13
+ userId?: string;
14
+ accountId: string;
15
+ }, options?: ExtraOptions) => Promise<ApiResponse<OsipHolding[]>>;
16
+ getOsipAccountTransactions: ({ userId, accountId, }: {
17
+ userId?: string;
18
+ accountId: string;
19
+ }, options?: ExtraOptions) => Promise<ApiResponse<OsipTransaction[]>>;
20
+ }
21
+ //# sourceMappingURL=osip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osip.d.ts","sourceRoot":"","sources":["../../../src/requests/types/osip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAE,YAAY,EAAE,YAAY,EAAC,MAAM,eAAe,CAAA;AAC1E,OAAO,KAAK,EAAC,WAAW,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAA;AAGhF,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,CAAC,EAAC,MAAM,EAAE,MAAM,EAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;IAC7J,cAAc,EAAE,CAAC,EAAC,MAAM,EAAE,SAAS,EAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;IACzJ,sBAAsB,EAAE,CAAC,EACvB,MAAM,EACN,SAAS,GACV,EAAE;QACD,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;IACjE,0BAA0B,EAAE,CAAC,EAC3B,MAAM,EACN,SAAS,GACV,EAAE;QACD,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC,CAAC,CAAA;CACtE"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=osip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osip.js","sourceRoot":"","sources":["../../../src/requests/types/osip.ts"],"names":[],"mappings":""}
@@ -1,11 +1,12 @@
1
1
  import type { ApiResponse, ExtraOptions } from "../../request";
2
2
  import type { SyncResponse } from "../../schema/sync";
3
3
  export interface SyncRequests {
4
- syncUserConnection: ({ userId, connectionId, customerIpAddress, customerLastLoggedTime, }: {
4
+ syncUserConnection: ({ userId, connectionId, customerIpAddress, customerLastLoggedTime, enableAsync, }: {
5
5
  userId?: string;
6
6
  connectionId: string;
7
7
  customerIpAddress?: string;
8
8
  customerLastLoggedTime?: string;
9
+ enableAsync?: boolean;
9
10
  }, options?: ExtraOptions) => Promise<ApiResponse<SyncResponse>>;
10
11
  }
11
12
  //# sourceMappingURL=sync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/requests/types/sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAE,YAAY,EAAC,MAAM,eAAe,CAAA;AAC5D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAA;AAEnD,MAAM,WAAW,YAAY;IAC3B,kBAAkB,EAAE,CAAC,EACnB,MAAM,EACN,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,GACvB,EAAE;QACD,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAA;KAChC,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAA;CACjE"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/requests/types/sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAE,YAAY,EAAC,MAAM,eAAe,CAAA;AAC5D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAA;AAEnD,MAAM,WAAW,YAAY;IAC3B,kBAAkB,EAAE,CAAC,EACnB,MAAM,EACN,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,WAAW,GACZ,EAAE;QACD,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAA;QAC/B,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAA;CACjE"}
@@ -47,6 +47,7 @@ export declare type ResponseType = "code" | "token" | "id_token" | "code token"
47
47
  export declare type TokenEndpointAuthMethod = "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt";
48
48
  export interface ApiClientConfig {
49
49
  resourceServerUrl: string;
50
+ osipResourceServerUrl?: string;
50
51
  identityServiceUrl: string;
51
52
  accountConnectUrl?: string;
52
53
  options?: {
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/schema/config.ts"],"names":[],"mappings":"AAAA,oBAAY,GAAG,GAAG,KAAK,GAAG,KAAK,CAAC;AAChC,oBAAY,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;AAC7G,oBAAY,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAChE,oBAAY,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC/D,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB;AACD,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,SAAU,SAAQ,eAAe;IAChD,GAAG,EAAE,KAAK,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,QAAS,SAAQ,aAAa;IAC7C,GAAG,EAAE,IAAI,CAAA;IACT,GAAG,EAAE,OAAO,CAAA;IACZ,CAAC,EA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;QACR,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAA;QACjB,aAAa,EAAE,MAAM,CAAA;QACrB,0BAA0B,EAAE,uBAAuB,CAAA;QACnD,4BAA4B,EAAE,qBAAqB,CAAA;QACnD,0BAA0B,EAAE,qBAAqB,CAAA;QACjD,YAAY,EAAE,MAAM,CAAA;QACpB,aAAa,EAAE,YAAY,CAAA;QAC3B,IAAI,EAAE,UAAU,EAAE,CAAA;KACnB,CAAA;CACF"}
@@ -0,0 +1,65 @@
1
+ declare type PortfolioType = "LISA" | "ISA" | "SIPP" | "GIA";
2
+ interface Valuation {
3
+ dateUpdated: string;
4
+ amount: number;
5
+ currency: string;
6
+ }
7
+ interface Quantity {
8
+ dateUpdate: string;
9
+ settledQuantity: number;
10
+ }
11
+ interface Product {
12
+ name: string;
13
+ type: "ISIN" | "SEDOL" | "Citi Code" | "CUSIP" | "Fund Code" | "Ticker Code";
14
+ id: string;
15
+ secondaryType: string;
16
+ secondaryId: string;
17
+ }
18
+ declare type TransactionType = "Redemption" | "Subscription" | "Subscription Savings Plan" | "Redemption Withdrawing Plan" | "Transfer In" | "Transfer Out" | "Switch In" | "Switch Out" | "Subscription Asset Allocation" | "Redemption Asset Allocation";
19
+ declare type CorporateActionType = "Dividend Reinvestment" | "Capital Gains Distribution" | "Cash Dividend" | "Dividend Option Stock Dividend" | "Liquidation" | "Merger" | "Name Change" | "Spin Off" | "Stock Split" | "Reverse Stock Split" | "Tender" | "Bonus Issue" | "Rights Distribution" | "Call On Rights" | "Change Redenomination" | "Exchange Option" | "Exchange Offer" | "Decrease In Value";
20
+ interface TransactionCost {
21
+ costType: string;
22
+ amount: number;
23
+ currency: string;
24
+ }
25
+ interface Transactions {
26
+ id: string;
27
+ tradeDate: string;
28
+ settlementDate: string;
29
+ orderDate: string;
30
+ quantity: number;
31
+ tradingCurrency: string;
32
+ executionPrice: number;
33
+ exchangeRate: number;
34
+ grossAmount: number;
35
+ transactionType: TransactionType;
36
+ corporateActionType: CorporateActionType;
37
+ bookingText: string;
38
+ transactionCosts: TransactionCost[];
39
+ }
40
+ export interface OsipAccount {
41
+ id: string;
42
+ name: string;
43
+ portfolioType: PortfolioType;
44
+ portfolioId: string;
45
+ valuation: Valuation;
46
+ }
47
+ export interface OsipHolding {
48
+ id: string;
49
+ date: string;
50
+ quantity: Quantity;
51
+ product: Product;
52
+ price: Valuation;
53
+ valuatuion: Valuation;
54
+ }
55
+ export interface OsipTransaction {
56
+ id: string;
57
+ date: string;
58
+ quantity: Quantity;
59
+ product: Product;
60
+ price: Valuation;
61
+ valuation: Valuation;
62
+ transactions: Transactions;
63
+ }
64
+ export {};
65
+ //# sourceMappingURL=osip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osip.d.ts","sourceRoot":"","sources":["../../src/schema/osip.ts"],"names":[],"mappings":"AAAA,aAAK,aAAa,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAA;AAEpD,UAAU,SAAS;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,UAAU,QAAQ;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,UAAU,OAAO;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,aAAa,CAAA;IAC5E,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,aAAK,eAAe,GAAG,YAAY,GAAG,cAAc,GAAG,2BAA2B,GAAG,6BAA6B,GAAG,aAAa,GAAG,cAAc,GAAG,WAAW,GAAG,YAAY,GAAG,+BAA+B,GAAG,6BAA6B,CAAA;AAElP,aA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,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,QAAQ,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;IACpB,YAAY,EAAE,YAAY,CAAA;CAC3B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=osip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osip.js","sourceRoot":"","sources":["../../src/schema/osip.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mft/moneyhub-api-client",
3
- "version": "5.7.0",
3
+ "version": "5.9.0",
4
4
  "description": "Node.JS client for the Moneyhub API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Moneyhub API Client
2
2
 
3
- ### Introduction
3
+ ## Introduction
4
4
 
5
5
  This is an Node.JS client for the [Moneyhub API](https://docs.moneyhubenterprise.com/docs). It currently supports the following features:
6
6
 
@@ -27,7 +27,7 @@ This is an Node.JS client for the [Moneyhub API](https://docs.moneyhubenterprise
27
27
 
28
28
  Currently this library supports `client_secret_basic`, `client_secret_jwt` and `private_key_jwt` authentication.
29
29
 
30
- ### Upgrading from 3.x
30
+ ## Upgrading from 3.x
31
31
 
32
32
  The breaking changes when upgrading are outlined below:
33
33
 
@@ -43,7 +43,7 @@ The breaking changes when upgrading are outlined below:
43
43
 
44
44
  For the full list of changes please refer to the [changelog](CHANGELOG.md)
45
45
 
46
- ### Upgrading from 4.x
46
+ ## Upgrading from 4.x
47
47
 
48
48
  The major upgrade from version 4.x is that the library now caters for TypeScript. To allow for this, the factory method that creates the client instance is now a named export rather than a default export.
49
49
 
@@ -55,11 +55,11 @@ const Moneyhub = require("@mft/moneyhub-api-client")
55
55
  const {Moneyhub} = require("@mft/moneyhub-api-client")
56
56
  ```
57
57
 
58
- ### Changelog
58
+ ## Changelog
59
59
 
60
60
  [Learn about the latest improvements and breaking changes](CHANGELOG.md).
61
61
 
62
- ### Prerequisites
62
+ ## Prerequisites
63
63
 
64
64
  To use this API client you will need:
65
65
 
@@ -67,11 +67,11 @@ To use this API client you will need:
67
67
  - The url of the Moneyhub identity service for the environment you are connecting to (https://identity.moneyhub.co.uk)
68
68
  - The url for the API gateway for the environment that you are connecting to (https://api.moneyhub.co.uk/v2.0)
69
69
 
70
- ### To install
70
+ ## To install
71
71
 
72
72
  `npm install @mft/moneyhub-api-client`
73
73
 
74
- ### Usage
74
+ ## Usage
75
75
 
76
76
  This module exposes a single factory function that accepts the following configuration:
77
77
 
@@ -97,7 +97,7 @@ const moneyhub = await Moneyhub({
97
97
  },
98
98
  })
99
99
  ```
100
-
100
+ ## Options
101
101
  When making calls to our methods that require authentication, you can provide an extra argument at the end of these methods. This argument must be an object with these optional keys:
102
102
 
103
103
  ```js
@@ -108,7 +108,36 @@ When making calls to our methods that require authentication, you can provide an
108
108
  }
109
109
  }
110
110
  ```
111
+ Example usages
112
+
113
+ ```javascript
114
+ const accounts = await moneyhub.getAccounts({
115
+ userId: "user-id",
116
+ params: {},
117
+ }, {});
118
+
119
+ const accounts = await moneyhub.getAccounts({
120
+ params: {},
121
+ }, {
122
+ token: "full.access.token"
123
+ });
124
+
125
+ const accounts = await moneyhub.getAccounts({
126
+ params: {},
127
+ }, {
128
+ headers: {
129
+ Authorization: "Bearer full.access.token"
130
+ }
131
+ });
132
+ ```
133
+
134
+ At least one of the following parameters needs to be passed in to any api call that requires user authentication:
135
+
136
+ - **userId**: Automatically requests a token for this userId with the correct scopes
137
+ - **token**: The token will be added as bearer authorization header
138
+ - **Authorization header**: The full authorisation header can be passed in
111
139
 
140
+ ## API
112
141
  Once the api client has been initialised it provides a simple promise based interface with the following methods:
113
142
 
114
143
  ### Auth API
@@ -576,7 +605,7 @@ Helper method that gets the correct client credentials access token and then get
576
605
  ```javascript
577
606
  const user = await moneyhub.getUserConnections({
578
607
  userId: "user-id",
579
- });
608
+ }, options);
580
609
  ```
581
610
 
582
611
  #### `syncUserConnection`
@@ -589,7 +618,8 @@ const tokens = await moneyhub.syncUserConnection({
589
618
  connectionId,
590
619
  customerIpAddress, // optional
591
620
  customerLastLoggedTime, // optional
592
- });
621
+ enableAsync, // optional
622
+ }, options);
593
623
  ```
594
624
 
595
625
  #### `deleteUserConnection`
@@ -600,7 +630,7 @@ Helper method that gets the correct client credentials access token and then del
600
630
  const user = await moneyhub.deleteUserConnection({
601
631
  userId: "user-id",
602
632
  connectionId: "connection-id",
603
- });
633
+ }, options);
604
634
  ```
605
635
 
606
636
  #### `getConnectionSyncs`
@@ -615,7 +645,7 @@ const syncs = await moneyhub.getConnectionSyncs({
615
645
  limit: 10,
616
646
  offset: 0,
617
647
  },
618
- });
648
+ }, options);
619
649
  ```
620
650
 
621
651
  #### `getUserSyncs`
@@ -629,7 +659,7 @@ const syncs = await moneyhub.getUserSyncs({
629
659
  limit: 10,
630
660
  offset: 0,
631
661
  },
632
- });
662
+ }, options);
633
663
  ```
634
664
 
635
665
  #### `getSync`
@@ -640,7 +670,7 @@ Retrieve the syncs for the given sync ID.
640
670
  const syncs = await moneyhub.getSync({
641
671
  userId: "user-id",
642
672
  syncId: "sync-id",
643
- });
673
+ }, options);
644
674
  ```
645
675
 
646
676
  #### `updateUserConnection`
@@ -652,7 +682,7 @@ const user = await moneyhub.updateUserConnection({
652
682
  userId: "user-id",
653
683
  connectionId: "connection-id",
654
684
  expiresAt: "2022-06-26T09:43:16.318+00:00"
655
- })
685
+ }, options)
656
686
  ```
657
687
 
658
688
  ### Data API
@@ -666,7 +696,7 @@ const queryParams = { limit: 10, offset: 5 , showTransacionData: false, showPerf
666
696
  const accounts = await moneyhub.getAccounts({
667
697
  userId: "userId",
668
698
  params: queryParams,
669
- });
699
+ }, options);
670
700
  ```
671
701
 
672
702
  #### `getAccountsWithDetails`
@@ -678,7 +708,7 @@ const queryParams = { limit: 10, offset: 5 };
678
708
  const accounts = await moneyhub.getAccountsWithDetails({
679
709
  userId: "userId",
680
710
  params: queryParams,
681
- });
711
+ }, options);
682
712
  ```
683
713
 
684
714
  #### `getAccountsList`
@@ -690,7 +720,7 @@ const queryParams = { limit: 10, offset: 5 , showTransacionData: false, showPerf
690
720
  const accounts = await moneyhub.getAccounts({
691
721
  userId: "userId",
692
722
  params: queryParams,
693
- });
723
+ }, options);
694
724
  ```
695
725
 
696
726
  #### `getAccountsListWithDetails`
@@ -702,7 +732,7 @@ const queryParams = { limit: 10, offset: 5 };
702
732
  const accounts = await moneyhub.getAccountsWithDetails({
703
733
  userId: "userId",
704
734
  params: queryParams,
705
- });
735
+ }, options);
706
736
  ```
707
737
 
708
738
  #### `getAccount`
@@ -713,7 +743,7 @@ Get a single account for a user by the accountId. This function uses the scope `
713
743
  const account = await moneyhub.getAccount({
714
744
  userId: "userId",
715
745
  accountId: "accountId",
716
- });
746
+ }, options);
717
747
  ```
718
748
 
719
749
  #### `getAccountWithDetails`
@@ -724,7 +754,7 @@ Get a single account for a user by the accountId including extra details (sort c
724
754
  const account = await moneyhub.getAccountWithDetails({
725
755
  userId: "userId",
726
756
  accountId: "accountId",
727
- });
757
+ }, options);
728
758
  ```
729
759
 
730
760
  #### `getAccountBalances`
@@ -735,7 +765,7 @@ Get account balances for a user. This function uses the scope `accounts:read`.
735
765
  const account = await moneyhub.getAccountBalances({
736
766
  userId: "userId",
737
767
  accountId: "accountId",
738
- });
768
+ }, options);
739
769
  ```
740
770
 
741
771
  #### `getAccountHoldings`
@@ -746,7 +776,7 @@ Get account holdings for a user. This function uses the scope `accounts:read`.
746
776
  const account = await moneyhub.getAccountHoldings({
747
777
  userId: "userId",
748
778
  accountId: "accountId",
749
- });
779
+ }, options);
750
780
  ```
751
781
 
752
782
  #### `getAccountHoldingsWithMatches`
@@ -757,7 +787,7 @@ Get account holdings with ISIN codes matchers for a user. This function uses the
757
787
  const account = await moneyhub.getAccountHoldingsWithMatches({
758
788
  userId: "userId",
759
789
  accountId: "accountId",
760
- });
790
+ }, options);
761
791
  ```
762
792
 
763
793
  #### `getAccountHolding`
@@ -769,7 +799,7 @@ const account = await moneyhub.getAccountHolding({
769
799
  userId: "userId",
770
800
  accountId: "accountId",
771
801
  holdingId: "holdingId",
772
- });
802
+ }, options);
773
803
  ```
774
804
 
775
805
  #### `getAccountCounterparties`
@@ -783,7 +813,7 @@ const account = await moneyhub.getAccountCounterparties({
783
813
  params: {
784
814
  counterpartiesVersion: "v3",
785
815
  },
786
- });
816
+ }, options);
787
817
  ```
788
818
 
789
819
  #### `getAccountRecurringTransactions`
@@ -794,7 +824,7 @@ Get account recurring transactions for a user. This function uses the scope `acc
794
824
  const account = await moneyhub.getAccountRecurringTransactions({
795
825
  userId: "userId",
796
826
  accountId: "accountId",
797
- });
827
+ }, options);
798
828
  ```
799
829
 
800
830
  #### `getAccountStandingOrders`
@@ -805,7 +835,7 @@ Get the standing orders for an account. This function uses the scope `standing_o
805
835
  const standingOrders = await moneyhub.getAccountStandingOrders({
806
836
  userId: "userId",
807
837
  accountId: "accountId",
808
- });
838
+ }, options);
809
839
  ```
810
840
 
811
841
  #### `getAccountStandingOrdersWithDetail`
@@ -816,7 +846,7 @@ Get the standing orders with detail (payee information) for an account. This fun
816
846
  const standingOrders = await moneyhub.getAccountStandingOrdersWithDetail({
817
847
  userId: "userId",
818
848
  accountId: "accountId",
819
- });
849
+ }, options);
820
850
  ```
821
851
 
822
852
  #### `createAccount`
@@ -838,7 +868,7 @@ const account = await moneyhub.createAccount({
838
868
  },
839
869
  },
840
870
  },
841
- });
871
+ }, options);
842
872
  ```
843
873
 
844
874
  #### `deleteAccount`
@@ -849,7 +879,7 @@ Delete a manual account for a user. This function uses the scope `accounts:write
849
879
  const result = await moneyhub.deleteAccount({
850
880
  userId: "userId",
851
881
  accountId: "accountId",
852
- });
882
+ }, options);
853
883
  ```
854
884
 
855
885
  #### `addAccountBalance`
@@ -866,7 +896,7 @@ const result = await moneyhub.addAccountBalance({
866
896
  },
867
897
  date: "2022-01-01",
868
898
  }
869
- });
899
+ }, options);
870
900
  ```
871
901
 
872
902
  #### `updateAccount`
@@ -882,7 +912,7 @@ const result = await moneyhub.updateAccount({
882
912
  providerName: "providerName"
883
913
  details: {}
884
914
  }
885
- });
915
+ }, options);
886
916
  ```
887
917
 
888
918
  #### `getTransactions`
@@ -894,7 +924,7 @@ const queryParams = { limit: 10, offset: 5 };
894
924
  const transactions = await moneyhub.getTransactions({
895
925
  userId: "userId",
896
926
  params: queryParams,
897
- });
927
+ }, options);
898
928
  ```
899
929
 
900
930
  #### `getTransaction`
@@ -905,7 +935,7 @@ Get a transaction by ID for a user. This function uses the scope `transactions:r
905
935
  const transactions = await moneyhub.getTransaction({
906
936
  userId: "userId",
907
937
  transactionId: "transactionId",
908
- });
938
+ }, options);
909
939
  ```
910
940
 
911
941
  #### `updateTransaction`
@@ -921,7 +951,7 @@ const transactions = await moneyhub.updateTransaction({
921
951
  value: 10,
922
952
  },
923
953
  },
924
- });
954
+ }, options);
925
955
  ```
926
956
 
927
957
  #### `addTransaction`
@@ -936,7 +966,7 @@ const transactions = await moneyhub.addTransaction({
936
966
  value: 10,
937
967
  },
938
968
  },
939
- });
969
+ }, options);
940
970
  ```
941
971
 
942
972
  #### `addTransactions`
@@ -961,7 +991,7 @@ const transactions = await moneyhub.addTransactions({
961
991
  params: {
962
992
  categorise: true, // optional - enable categorisatio for transactions
963
993
  },
964
- });
994
+ }, options);
965
995
  ```
966
996
 
967
997
  #### `deleteTransaction`
@@ -972,7 +1002,7 @@ Delete a transaction for a user. This function uses the scopes `transactions:wri
972
1002
  const result = await moneyhub.deleteTransaction({
973
1003
  userId: "userId",
974
1004
  id: "transactionId",
975
- });
1005
+ }, options);
976
1006
  ```
977
1007
 
978
1008
  #### `getBeneficiaries`
@@ -984,7 +1014,7 @@ const queryParams = { limit: 10, offset: 5 };
984
1014
  const beneficiaries = await moneyhub.getBeneficiaries({
985
1015
  userId: "userId",
986
1016
  params: queryParams,
987
- });
1017
+ }, options);
988
1018
  ```
989
1019
 
990
1020
  #### `getBeneficiariesWithDetail`
@@ -996,7 +1026,7 @@ const queryParams = { limit: 10, offset: 5 };
996
1026
  const beneficiaries = await moneyhub.getBeneficiariesWithDetail({
997
1027
  userId: "userId",
998
1028
  params: queryParams,
999
- });
1029
+ }, options);
1000
1030
  ```
1001
1031
 
1002
1032
  #### `getBeneficiary`
@@ -1007,7 +1037,7 @@ Get a beneficiary for a user. This function uses the scope `beneficiaries:read`
1007
1037
  const beneficiary = await moneyhub.getBeneficiary({
1008
1038
  userId: "userId",
1009
1039
  id: "beneficiaryId",
1010
- });
1040
+ }, options);
1011
1041
  ```
1012
1042
 
1013
1043
  #### `getBeneficiaryWithDetail`
@@ -1018,7 +1048,7 @@ Get a beneficiary for a user, including beneficiary detail. This function uses t
1018
1048
  const beneficiary = await moneyhub.getBeneficiaryWithDetail({
1019
1049
  userId: "userId",
1020
1050
  id: "beneficiaryId",
1021
- });
1051
+ }, options);
1022
1052
  ```
1023
1053
 
1024
1054
  #### `addFileToTransaction`
@@ -1031,7 +1061,7 @@ const file = await money.addFileToTransaction({
1031
1061
  transactionId: "transactionId",
1032
1062
  fileName: "file-name",
1033
1063
  fileData: fs.createReadStream("path/to/file.png"),
1034
- });
1064
+ }, options);
1035
1065
  ```
1036
1066
 
1037
1067
  #### `getTransactionFiles`
@@ -1042,7 +1072,7 @@ Get all attachments associated with a transaction. This call requires an access
1042
1072
  const files = await money.getTransactionFiles({
1043
1073
  userId: "userId",
1044
1074
  transactionId: "transactionId",
1045
- });
1075
+ }, options);
1046
1076
  ```
1047
1077
 
1048
1078
  #### `getTransactionFile`
@@ -1054,7 +1084,7 @@ const files = await money.getTransactionFile({
1054
1084
  userId: "userId",
1055
1085
  transactionId: "transactionId",
1056
1086
  fileId: "fileId",
1057
- });
1087
+ }, options);
1058
1088
  ```
1059
1089
 
1060
1090
  #### `deleteTransactionFile`
@@ -1066,7 +1096,7 @@ await money.deleteTransactionFile({
1066
1096
  userId: "userId",
1067
1097
  transactionId: "transactionId",
1068
1098
  fileId: "fileId",
1069
- });
1099
+ }, options);
1070
1100
  ```
1071
1101
 
1072
1102
  #### `splitTransaction`
@@ -1089,7 +1119,7 @@ const splits = await moneyhub.splitTransaction({
1089
1119
  amount: -4000,
1090
1120
  },
1091
1121
  ],
1092
- });
1122
+ }, options);
1093
1123
  ```
1094
1124
 
1095
1125
  #### `getTransactionSplits`
@@ -1100,7 +1130,7 @@ Get a transactions splits.
1100
1130
  const splits = await moneyhub.getTransactionSplits({
1101
1131
  userId: "userId",
1102
1132
  transactionId: "transactionId",
1103
- });
1133
+ }, options);
1104
1134
  ```
1105
1135
 
1106
1136
  #### `patchTransactionSplit`
@@ -1114,7 +1144,7 @@ const splits = await moneyhub.patchTransactionSplit({
1114
1144
  split: {
1115
1145
  description: "New description",
1116
1146
  },
1117
- });
1147
+ }, options);
1118
1148
  ```
1119
1149
 
1120
1150
  #### `deleteTransactionSplits`
@@ -1125,6 +1155,57 @@ Delete a transaction's splits and merge them back together.
1125
1155
  const splits = await moneyhub.deleteTransactionSplits({
1126
1156
  userId: "userId",
1127
1157
  transactionId: "transactionId",
1158
+ }, options);
1159
+ ```
1160
+
1161
+ #### `getOsipAccounts`
1162
+
1163
+ Get all accounts for a user. This function uses the scope `osip:read`.
1164
+
1165
+ ```javascript
1166
+ const queryParams = { limit: 10, offset: 5 };
1167
+ const accounts = await moneyhub.getOsipAccounts({
1168
+ userId: "userId",
1169
+ params: queryParams,
1170
+ });
1171
+ ```
1172
+
1173
+ #### `getOsipAccount`
1174
+
1175
+ Get an account for a user. This function uses the scope `osip:read`.
1176
+
1177
+ ```javascript
1178
+ const queryParams = { limit: 10, offset: 5 };
1179
+ const accounts = await moneyhub.getOsipAccounts({
1180
+ userId: "userId",
1181
+ accountId: "accountId",
1182
+ params: queryParams,
1183
+ });
1184
+ ```
1185
+
1186
+ #### `getOsipAccountHoldings`
1187
+
1188
+ Get account holdings for an account. This function uses the scope `osip:read`.
1189
+
1190
+ ```javascript
1191
+ const queryParams = { limit: 10, offset: 5 };
1192
+ const accounts = await moneyhub.getOsipAccounts({
1193
+ userId: "userId",
1194
+ accountId: "accountId",
1195
+ params: queryParams,
1196
+ });
1197
+ ```
1198
+
1199
+ #### `getOsipAccountTransactions`
1200
+
1201
+ Get account transactions. This function uses the scope `osip:read`.
1202
+
1203
+ ```javascript
1204
+ const queryParams = { limit: 10, offset: 5 };
1205
+ const accounts = await moneyhub.getOsipAccounts({
1206
+ userId: "userId",
1207
+ accountId: "accountId",
1208
+ params: queryParams,
1128
1209
  });
1129
1210
  ```
1130
1211
 
@@ -1146,7 +1227,7 @@ const categories = await moneyhub.getCategories({
1146
1227
  params: {
1147
1228
  type: "personal", // optional personal|business
1148
1229
  },
1149
- });
1230
+ }, options);
1150
1231
  ```
1151
1232
 
1152
1233
  #### `getCategory`
@@ -1157,7 +1238,7 @@ Get a single category for a user. This function uses the scope `categories:read`
1157
1238
  const category = await moneyhub.getCategory({
1158
1239
  userId: "userId",
1159
1240
  categoryId: "categoryId",
1160
- });
1241
+ }, options);
1161
1242
  ```
1162
1243
 
1163
1244
  #### `getCategoryGroups`
@@ -1170,7 +1251,7 @@ const categoryGroups = await moneyhub.getCategoryGroups({
1170
1251
  params: {
1171
1252
  type: "personal", // optional personal|business
1172
1253
  },
1173
- });
1254
+ }, options);
1174
1255
  ```
1175
1256
 
1176
1257
  #### `getStandardCategories`
@@ -1182,7 +1263,7 @@ const categories = await moneyhub.getStandardCategories({
1182
1263
  params: {
1183
1264
  type: "personal", // optional personal|business|all
1184
1265
  },
1185
- });
1266
+ }, options);
1186
1267
  ```
1187
1268
 
1188
1269
  #### `getStandardCategoryGroups`
@@ -1194,7 +1275,7 @@ const categoryGroups = await moneyhub.getStandardCategoryGroups({
1194
1275
  params: {
1195
1276
  type: "personal", // optional personal|business|all
1196
1277
  },
1197
- });
1278
+ }, options);
1198
1279
  ```
1199
1280
 
1200
1281
  #### `createCustomCategory`
@@ -1209,7 +1290,7 @@ const category = await moneyhub.createCustomCategory({
1209
1290
  group: "group:1"
1210
1291
  name: "custom-category",
1211
1292
  },
1212
- })
1293
+ }, options)
1213
1294
  ```
1214
1295
 
1215
1296
  ### Spending analysis
@@ -1235,7 +1316,7 @@ const projects = await moneyhub.getSpendingAnalysis({
1235
1316
  ],
1236
1317
  accountIds: ["ac9bd177-d01e-449c-9f29-d3656d2edc2e"], // optional
1237
1318
  categoryIds: ["std:338d2636-7f88-491d-8129-255c98da1eb8"], // optional
1238
- });
1319
+ }, options);
1239
1320
  ```
1240
1321
 
1241
1322
  ### Projects
@@ -1251,7 +1332,7 @@ const projects = await moneyhub.getProjects({
1251
1332
  limit: "limit", // optional
1252
1333
  offset: "offset", // optional
1253
1334
  }, // optional
1254
- });
1335
+ }, options);
1255
1336
  ```
1256
1337
 
1257
1338
  #### `getProject`
@@ -1262,7 +1343,7 @@ Get a single project for a user by the projectId. This function uses the scope `
1262
1343
  const project = await moneyhub.getProject({
1263
1344
  userId: "userId",
1264
1345
  projectId: "projectId",
1265
- });
1346
+ }, options);
1266
1347
  ```
1267
1348
 
1268
1349
  #### `addProject`
@@ -1277,7 +1358,7 @@ const project = await moneyhub.addProject({
1277
1358
  accountIds: "id1,id2", // comma-separated list of account IDs
1278
1359
  type: "PropertyProject",
1279
1360
  },
1280
- });
1361
+ }, options);
1281
1362
  ```
1282
1363
 
1283
1364
  #### `updateProject`
@@ -1294,7 +1375,7 @@ const project = await moneyhub.updateProject({
1294
1375
  type: "PropertyProject",
1295
1376
  archived: false,
1296
1377
  },
1297
- });
1378
+ }, options);
1298
1379
  ```
1299
1380
 
1300
1381
  #### `deleteProject`
@@ -1323,7 +1404,7 @@ const result = await moneyhub.getTaxReturn({
1323
1404
  accountId: "accountId",
1324
1405
  projectId: "projectId",
1325
1406
  },
1326
- });
1407
+ }, options);
1327
1408
  ```
1328
1409
 
1329
1410
  ### Payments
@@ -1701,7 +1782,7 @@ const queryParams = { accountID };
1701
1782
  const regulartransactions = await moneyhub.getRegularTransactions({
1702
1783
  userId: "userId",
1703
1784
  params: queryParams,
1704
- });
1785
+ }, options);
1705
1786
  ```
1706
1787
 
1707
1788
  ### Rental records
@@ -1713,7 +1794,7 @@ This method will return the rental record for the user. Requires the scope `rent
1713
1794
  ```javascript
1714
1795
  const getRentalRecordResponse = await moneyhub.getRentalRecords({
1715
1796
  userId: "user-id",
1716
- });
1797
+ }, options);
1717
1798
  const rentalRecord = getRentalRecordResponse.data[0];
1718
1799
  ```
1719
1800
 
@@ -1740,7 +1821,7 @@ const createRentalRecordResponse = await moneyhub.createRentalRecord({
1740
1821
  },
1741
1822
  rentalFrequency: "monthly",
1742
1823
  },
1743
- });
1824
+ }, options);
1744
1825
  const createdRentalRecord = createRentalRecordResponse.data;
1745
1826
  ```
1746
1827
 
@@ -1752,7 +1833,7 @@ This method deletes the rental record for a user.
1752
1833
  await moneyhub.deleteRentalRecord({
1753
1834
  userId: "user-id",
1754
1835
  rentalId: "rental-id",
1755
- });
1836
+ }, options);
1756
1837
  ```
1757
1838
 
1758
1839
  ### Spending Goals
@@ -1768,7 +1849,7 @@ const spendingGoal = await moneyhub.createSpendingGoal({
1768
1849
  periodStart: "20",
1769
1850
  periodType: "monthly",
1770
1851
  userId: "user-id",
1771
- });
1852
+ }, options);
1772
1853
  ```
1773
1854
 
1774
1855
  #### `getSpendingGoals`
@@ -1780,7 +1861,7 @@ const spendingGoals = await moneyhub.getSpendingGoals({
1780
1861
  userId: "user-id",
1781
1862
  limit: 1,
1782
1863
  offset: 0,
1783
- });
1864
+ }, options);
1784
1865
  const spendingGoal = spendingGoals.data[0];
1785
1866
  ```
1786
1867
 
@@ -1792,7 +1873,7 @@ This method will return the specified spending goal for the user. Requires the s
1792
1873
  const spendingGoals = await moneyhub.getSpendingGoal({
1793
1874
  userId: "user-id",
1794
1875
  goalId: "goal-id",
1795
- });
1876
+ }, options);
1796
1877
  ```
1797
1878
 
1798
1879
  #### `updateSpendingGoal`
@@ -1805,7 +1886,7 @@ const spendingGoals = await moneyhub.updateSpendingGoal({
1805
1886
  goalId: "goal-id",
1806
1887
  categoryId: "id",
1807
1888
  amount: { value: 302 },
1808
- });
1889
+ }, options);
1809
1890
  ```
1810
1891
 
1811
1892
  #### `deleteSpendingGoal`
@@ -1816,7 +1897,7 @@ This method will delete the specified spending goal for the user. Requires the s
1816
1897
  const spendingGoals = await moneyhub.deleteSpendingGoal({
1817
1898
  userId: "user-id",
1818
1899
  goalId: "goal-id",
1819
- });
1900
+ }, options);
1820
1901
  ```
1821
1902
 
1822
1903
  ### Savings Goals
@@ -1833,7 +1914,7 @@ const savingsGoal = await moneyhub.createSavingsGoal({
1833
1914
  notes: "lots'o'money",
1834
1915
  userId: "user-id",
1835
1916
  accounts: [{ id: "1234" }],
1836
- });
1917
+ }, options);
1837
1918
  ```
1838
1919
 
1839
1920
  #### `getSavingsGoals`
@@ -1845,7 +1926,7 @@ const savingsGoals = await moneyhub.getSavingsGoals({
1845
1926
  userId: "user-id",
1846
1927
  limit: 1,
1847
1928
  offset: 0,
1848
- });
1929
+ }, options);
1849
1930
  const savingsGoal = savingsGoals.data[0];
1850
1931
  ```
1851
1932
 
@@ -1857,7 +1938,7 @@ This method will return the specified savings goal for the user. Requires the sc
1857
1938
  const savingsGoals = await moneyhub.getSavingsGoal({
1858
1939
  userId: "user-id",
1859
1940
  goalId: "goal-id",
1860
- });
1941
+ }, options);
1861
1942
  ```
1862
1943
 
1863
1944
  #### `updateSavingsGoal`
@@ -1871,7 +1952,7 @@ const savingsGoals = await moneyhub.updateSavingsGoal({
1871
1952
  name: "new-name",
1872
1953
  amount: { value: 302 },
1873
1954
  accounts: [{ id: "1234" }],
1874
- });
1955
+ }, options);
1875
1956
  ```
1876
1957
 
1877
1958
  #### `deleteSavingsGoal`
@@ -1882,7 +1963,7 @@ This method will delete the specified savings goal for the user. Requires the sc
1882
1963
  const savingsGoals = await moneyhub.deleteSavingsGoal({
1883
1964
  userId: "user-id",
1884
1965
  goalId: "goal-id",
1885
- });
1966
+ }, options);
1886
1967
  ```
1887
1968
 
1888
1969
  ### Financial Connections