@mft/moneyhub-api-client 6.94.0 → 6.97.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.
Files changed (164) hide show
  1. package/.idea/codeStyles/Project.xml +21 -0
  2. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  3. package/.idea/dbnavigator.xml +450 -0
  4. package/.idea/git_toolbox_blame.xml +6 -0
  5. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  6. package/.idea/jsLinters/eslint.xml +6 -0
  7. package/.idea/modules.xml +8 -0
  8. package/.idea/moneyhub-api-client.iml +12 -0
  9. package/.idea/prettier.xml +6 -0
  10. package/.idea/vcs.xml +6 -0
  11. package/.idea/workspace.xml +337 -0
  12. package/CHANGELOG.md +18 -1
  13. package/dist/discovery.d.ts +75 -0
  14. package/dist/discovery.d.ts.map +1 -0
  15. package/dist/discovery.js +169 -0
  16. package/dist/discovery.js.map +1 -0
  17. package/dist/index.d.ts +55 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +61 -24
  20. package/dist/index.js.map +1 -1
  21. package/dist/oidc-config.d.ts +17 -0
  22. package/dist/oidc-config.d.ts.map +1 -0
  23. package/dist/oidc-config.js +44 -0
  24. package/dist/oidc-config.js.map +1 -0
  25. package/dist/request.d.ts +11 -3
  26. package/dist/request.d.ts.map +1 -1
  27. package/dist/request.js +38 -7
  28. package/dist/request.js.map +1 -1
  29. package/dist/requests/caas/accounts.d.ts +5 -0
  30. package/dist/requests/caas/accounts.d.ts.map +1 -0
  31. package/dist/requests/caas/accounts.js +18 -0
  32. package/dist/requests/caas/accounts.js.map +1 -0
  33. package/dist/requests/caas/categories.d.ts +5 -0
  34. package/dist/requests/caas/categories.d.ts.map +1 -0
  35. package/dist/requests/caas/categories.js +26 -0
  36. package/dist/requests/caas/categories.js.map +1 -0
  37. package/dist/requests/caas/counterparties.d.ts +5 -0
  38. package/dist/requests/caas/counterparties.d.ts.map +1 -0
  39. package/dist/requests/caas/counterparties.js +18 -0
  40. package/dist/requests/caas/counterparties.js.map +1 -0
  41. package/dist/requests/caas/enhanced-transactions.d.ts +5 -0
  42. package/dist/requests/caas/enhanced-transactions.d.ts.map +1 -0
  43. package/dist/requests/caas/enhanced-transactions.js +17 -0
  44. package/dist/requests/caas/enhanced-transactions.js.map +1 -0
  45. package/dist/requests/caas/geotags.d.ts +5 -0
  46. package/dist/requests/caas/geotags.d.ts.map +1 -0
  47. package/dist/requests/caas/geotags.js +18 -0
  48. package/dist/requests/caas/geotags.js.map +1 -0
  49. package/dist/requests/caas/regular-transactions.d.ts +5 -0
  50. package/dist/requests/caas/regular-transactions.d.ts.map +1 -0
  51. package/dist/requests/caas/regular-transactions.js +16 -0
  52. package/dist/requests/caas/regular-transactions.js.map +1 -0
  53. package/dist/requests/caas/transaction-splits.d.ts +5 -0
  54. package/dist/requests/caas/transaction-splits.d.ts.map +1 -0
  55. package/dist/requests/caas/transaction-splits.js +28 -0
  56. package/dist/requests/caas/transaction-splits.js.map +1 -0
  57. package/dist/requests/caas/transactions.d.ts +5 -0
  58. package/dist/requests/caas/transactions.d.ts.map +1 -0
  59. package/dist/requests/caas/transactions.js +48 -0
  60. package/dist/requests/caas/transactions.js.map +1 -0
  61. package/dist/requests/caas/types/accounts.d.ts +7 -0
  62. package/dist/requests/caas/types/accounts.d.ts.map +1 -0
  63. package/dist/requests/{types/reseller.js → caas/types/accounts.js} +1 -1
  64. package/dist/requests/caas/types/accounts.js.map +1 -0
  65. package/dist/requests/caas/types/categories.d.ts +22 -0
  66. package/dist/requests/caas/types/categories.d.ts.map +1 -0
  67. package/dist/{schema/payment-link.js → requests/caas/types/categories.js} +1 -1
  68. package/dist/requests/caas/types/categories.js.map +1 -0
  69. package/dist/requests/caas/types/counterparties.d.ts +9 -0
  70. package/dist/requests/caas/types/counterparties.d.ts.map +1 -0
  71. package/dist/requests/caas/types/counterparties.js +3 -0
  72. package/dist/requests/caas/types/counterparties.js.map +1 -0
  73. package/dist/requests/caas/types/enhanced-transactions.d.ts +250 -0
  74. package/dist/requests/caas/types/enhanced-transactions.d.ts.map +1 -0
  75. package/dist/requests/caas/types/enhanced-transactions.js +3 -0
  76. package/dist/requests/caas/types/enhanced-transactions.js.map +1 -0
  77. package/dist/requests/caas/types/geotags.d.ts +8 -0
  78. package/dist/requests/caas/types/geotags.d.ts.map +1 -0
  79. package/dist/requests/{types/payment-links.js → caas/types/geotags.js} +1 -1
  80. package/dist/requests/caas/types/geotags.js.map +1 -0
  81. package/dist/requests/caas/types/regular-transactions.d.ts +49 -0
  82. package/dist/requests/caas/types/regular-transactions.d.ts.map +1 -0
  83. package/dist/requests/caas/types/regular-transactions.js +3 -0
  84. package/dist/requests/caas/types/regular-transactions.js.map +1 -0
  85. package/dist/requests/caas/types/transaction-splits.d.ts +23 -0
  86. package/dist/requests/caas/types/transaction-splits.d.ts.map +1 -0
  87. package/dist/requests/caas/types/transaction-splits.js +3 -0
  88. package/dist/requests/caas/types/transaction-splits.js.map +1 -0
  89. package/dist/requests/caas/types/transactions.d.ts +110 -0
  90. package/dist/requests/caas/types/transactions.d.ts.map +1 -0
  91. package/dist/requests/caas/types/transactions.js +3 -0
  92. package/dist/requests/caas/types/transactions.js.map +1 -0
  93. package/dist/requests/caas/types/users.d.ts +7 -0
  94. package/dist/requests/caas/types/users.d.ts.map +1 -0
  95. package/dist/requests/caas/types/users.js +3 -0
  96. package/dist/requests/caas/types/users.js.map +1 -0
  97. package/dist/requests/caas/users.d.ts +5 -0
  98. package/dist/requests/caas/users.d.ts.map +1 -0
  99. package/dist/requests/caas/users.js +18 -0
  100. package/dist/requests/caas/users.js.map +1 -0
  101. package/dist/requests/consent-history.d.ts +5 -0
  102. package/dist/requests/consent-history.d.ts.map +1 -0
  103. package/dist/requests/consent-history.js +17 -0
  104. package/dist/requests/consent-history.js.map +1 -0
  105. package/dist/requests/index.d.ts +55 -0
  106. package/dist/requests/index.d.ts.map +1 -1
  107. package/dist/requests/index.js +20 -0
  108. package/dist/requests/index.js.map +1 -1
  109. package/dist/requests/recurring-payments.d.ts.map +1 -1
  110. package/dist/requests/recurring-payments.js +8 -0
  111. package/dist/requests/recurring-payments.js.map +1 -1
  112. package/dist/requests/types/consent-history.d.ts +6 -0
  113. package/dist/requests/types/consent-history.d.ts.map +1 -0
  114. package/dist/requests/types/consent-history.js +3 -0
  115. package/dist/requests/types/consent-history.js.map +1 -0
  116. package/dist/requests/types/recurring-payments.d.ts +5 -1
  117. package/dist/requests/types/recurring-payments.d.ts.map +1 -1
  118. package/dist/requests/unauthenticated.d.ts.map +1 -1
  119. package/dist/requests/unauthenticated.js +2 -2
  120. package/dist/requests/unauthenticated.js.map +1 -1
  121. package/dist/requests/users-and-connections.d.ts.map +1 -1
  122. package/dist/requests/users-and-connections.js +2 -1
  123. package/dist/requests/users-and-connections.js.map +1 -1
  124. package/dist/schema/config.d.ts +13 -0
  125. package/dist/schema/config.d.ts.map +1 -1
  126. package/dist/schema/consent-history.d.ts +31 -0
  127. package/dist/schema/consent-history.d.ts.map +1 -0
  128. package/dist/schema/consent-history.js +3 -0
  129. package/dist/schema/consent-history.js.map +1 -0
  130. package/dist/schema/counterparty.d.ts +25 -5
  131. package/dist/schema/counterparty.d.ts.map +1 -1
  132. package/dist/schema/payment.d.ts +11 -0
  133. package/dist/schema/payment.d.ts.map +1 -1
  134. package/dist/schema/scim-user.d.ts +4 -0
  135. package/dist/schema/scim-user.d.ts.map +1 -1
  136. package/dist/schema/statement.d.ts.map +1 -1
  137. package/dist/schema/statement.js +1 -0
  138. package/dist/schema/statement.js.map +1 -1
  139. package/dist/tokens.js +1 -1
  140. package/dist/tokens.js.map +1 -1
  141. package/package.json +15 -4
  142. package/readme.md +274 -9
  143. package/scripts/assert-github-actions-publish.js +10 -0
  144. package/dist/get-payment-link.d.ts +0 -15
  145. package/dist/get-payment-link.d.ts.map +0 -1
  146. package/dist/get-payment-link.js +0 -61
  147. package/dist/get-payment-link.js.map +0 -1
  148. package/dist/requests/payment-links.d.ts +0 -5
  149. package/dist/requests/payment-links.d.ts.map +0 -1
  150. package/dist/requests/payment-links.js +0 -32
  151. package/dist/requests/payment-links.js.map +0 -1
  152. package/dist/requests/reseller.d.ts +0 -5
  153. package/dist/requests/reseller.d.ts.map +0 -1
  154. package/dist/requests/reseller.js +0 -21
  155. package/dist/requests/reseller.js.map +0 -1
  156. package/dist/requests/types/payment-links.d.ts +0 -23
  157. package/dist/requests/types/payment-links.d.ts.map +0 -1
  158. package/dist/requests/types/payment-links.js.map +0 -1
  159. package/dist/requests/types/reseller.d.ts +0 -10
  160. package/dist/requests/types/reseller.d.ts.map +0 -1
  161. package/dist/requests/types/reseller.js.map +0 -1
  162. package/dist/schema/payment-link.d.ts +0 -18
  163. package/dist/schema/payment-link.d.ts.map +0 -1
  164. package/dist/schema/payment-link.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consent-history.js","sourceRoot":"","sources":["../../src/schema/consent-history.ts"],"names":[],"mappings":""}
@@ -15,16 +15,36 @@ export interface Counterparty {
15
15
  export interface GlobalCounterpartiesSearchParams extends SearchParams {
16
16
  counterpartiesVersion?: "v2" | "v3";
17
17
  }
18
- export interface GlobalCounterparty {
18
+ /** Global counterparty shape returned by the v2 API (id format: "global:...") */
19
+ export interface GlobalCounterpartyV2 {
19
20
  id: string;
20
21
  label: string;
21
- companyName: string;
22
- logo: string;
23
- website: string;
24
- mcc: {
22
+ type: CounterpartyType;
23
+ companyName?: string;
24
+ logo?: string;
25
+ website?: string;
26
+ mcc?: {
25
27
  code?: string;
26
28
  name?: string;
27
29
  };
28
30
  }
31
+ export interface GlobalCounterpartyV3 {
32
+ id: string;
33
+ name: string;
34
+ parentId?: string;
35
+ parentName?: string;
36
+ fullCompanyName?: string | null;
37
+ logoUrl?: string | null;
38
+ website?: string | null;
39
+ merchantCategoryCode?: string | null;
40
+ merchantCategoryDescription?: string | null;
41
+ registeredLocation?: string | null;
42
+ categoryId?: string;
43
+ analyticalCategory?: string;
44
+ transactionCategoryId?: string;
45
+ transactionCategory?: string;
46
+ }
47
+ /** Global counterparty in either v2 or v3 API format. */
48
+ export declare type GlobalCounterparty = GlobalCounterpartyV2 | GlobalCounterpartyV3;
29
49
  export {};
30
50
  //# sourceMappingURL=counterparty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"counterparty.d.ts","sourceRoot":"","sources":["../../src/schema/counterparty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAE5C,aAAK,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE1C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,gBAAgB,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,MAAM,WAAW,gCAAiC,SAAQ,YAAY;IACpE,qBAAqB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE;QACH,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF"}
1
+ {"version":3,"file":"counterparty.d.ts","sourceRoot":"","sources":["../../src/schema/counterparty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAE5C,aAAK,gBAAgB,GA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EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,yDAAyD;AACzD,oBAAY,kBAAkB,GAAG,oBAAoB,GAAG,oBAAoB,CAAA"}
@@ -112,5 +112,16 @@ export interface RecurringPaymentRequest {
112
112
  authRequestId: string;
113
113
  revokedAt?: string;
114
114
  }
115
+ export interface FundsConfirmationRequest {
116
+ amount: string;
117
+ currency: string;
118
+ }
119
+ export interface FundsConfirmationResponse {
120
+ fundsAvailable: boolean;
121
+ fundsAvailableAt: string;
122
+ amount: string;
123
+ currency: string;
124
+ recurringPaymentId: string;
125
+ }
115
126
  export {};
116
127
  //# sourceMappingURL=payment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/schema/payment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AAEpC,oBAAY,gBAAgB,GAAG,WAAW,GAAG,iBAAiB,CAAA;AAE9D,oBAAY,SAAS,GAAG,WAAW,GAAG,iBAAiB,CAAA;AAEvD,oBAAY,cAAc,GAAG,OAAO,GAAG,cAAc,GAAG,aAAa,CAAA;AAErE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,SAAS,CAAC,E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AAc,EAAE,sBAAsB,CAAA;IACtC,MAAM,EAAE,aAAa,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,kBAAkB,EAAE,MAAM,CAAA;CAC3B"}
@@ -8,6 +8,10 @@ export interface SCIMUser {
8
8
  givenName: string;
9
9
  };
10
10
  emails?: Emails[];
11
+ subtenant?: {
12
+ name: string;
13
+ providerId: string;
14
+ };
11
15
  }
12
16
  export {};
13
17
  //# sourceMappingURL=scim-user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scim-user.d.ts","sourceRoot":"","sources":["../../src/schema/scim-user.ts"],"names":[],"mappings":"AAAA,UAAU,MAAM;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAEH,MAAM,WAAW,QAAQ;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE;QACL,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB"}
1
+ {"version":3,"file":"scim-user.d.ts","sourceRoot":"","sources":["../../src/schema/scim-user.ts"],"names":[],"mappings":"AAAA,UAAU,MAAM;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAEH,MAAM,WAAW,QAAQ;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE;QACL,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,SAAS,CAAC,EAAE;QACV,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"statement.d.ts","sourceRoot":"","sources":["../../src/schema/statement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAE/B,oBAAY,aAAa;IACvB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,eAAe,oBAAoB;CACpC;AAED,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,oBAAY,qBAAqB;IAC/B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,wBAAwB,6BAA6B;IACrD,SAAS,cAAc;IACvB,gBAAgB,qBAAqB;IACrC,MAAM,WAAW;CAClB;AAED,oBAAY,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,qBAAqB,CAAA;IACjC,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,oBAAY,yBAAyB;IACnC,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,oBAAoB,yBAAyB;IAC7C,GAAG,QAAQ;CACZ;AAED,oBAAY,0BAA0B;IACpC,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,iBAAiB,GAA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ACpB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,gBAAgB,EAAE,CAAA;IAC5B,IAAI,EAAE,YAAY,EAAE,CAAA;IACpB,QAAQ,EAAE,iBAAiB,EAAE,CAAA;IAC7B,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,KAAK,EAAE,aAAa,EAAE,CAAA;IACtB,KAAK,EAAE,aAAa,EAAE,CAAA;IACtB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StatementInterestFrequency = exports.StatementInterestRateType = exports.StatementFeeFrequency = exports.StatementType = void 0;
4
+ /* eslint-disable no-shadow -- enum declarations trigger no-shadow with TypeScript's dual type/value emit */
4
5
  var StatementType;
5
6
  (function (StatementType) {
6
7
  StatementType["AccountClosure"] = "AccountClosure";
@@ -1 +1 @@
1
- {"version":3,"file":"statement.js","sourceRoot":"","sources":["../../src/schema/statement.ts"],"names":[],"mappings":";;;AAEA,IAAY,aAMX;AAND,WAAY,aAAa;IACvB,kDAAiC,CAAA;IACjC,kDAAiC,CAAA;IACjC,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;IACnB,oDAAmC,CAAA;AACrC,CAAC,EANW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAMxB;AAOD,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,0DAAiC,CAAA;IACjC,sEAA6C,CAAA;IAC7C,8EAAqD,CAAA;IACrD,gDAAuB,CAAA;IACvB,8DAAqC,CAAA;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAPW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAOhC;AAYD,IAAY,yBAMX;AAND,WAAY,yBAAyB;IACnC,wDAA2B,CAAA;IAC3B,oDAAuB,CAAA;IACvB,4CAAe,CAAA;IACf,0EAA6C,CAAA;IAC7C,wCAAW,CAAA;AACb,CAAC,EANW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAMpC;AAED,IAAY,0BAQX;AARD,WAAY,0BAA0B;IACpC,6CAAe,CAAA;IACf,uDAAyB,CAAA;IACzB,iDAAmB,CAAA;IACnB,mEAAqC,CAAA;IACrC,qDAAuB,CAAA;IACvB,+CAAiB,CAAA;IACjB,+CAAiB,CAAA;AACnB,CAAC,EARW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAQrC"}
1
+ {"version":3,"file":"statement.js","sourceRoot":"","sources":["../../src/schema/statement.ts"],"names":[],"mappings":";;;AAEA,4GAA4G;AAC5G,IAAY,aAMX;AAND,WAAY,aAAa;IACvB,kDAAiC,CAAA;IACjC,kDAAiC,CAAA;IACjC,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;IACnB,oDAAmC,CAAA;AACrC,CAAC,EANW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAMxB;AAOD,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,0DAAiC,CAAA;IACjC,sEAA6C,CAAA;IAC7C,8EAAqD,CAAA;IACrD,gDAAuB,CAAA;IACvB,8DAAqC,CAAA;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAPW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAOhC;AAYD,IAAY,yBAMX;AAND,WAAY,yBAAyB;IACnC,wDAA2B,CAAA;IAC3B,oDAAuB,CAAA;IACvB,4CAAe,CAAA;IACf,0EAA6C,CAAA;IAC7C,wCAAW,CAAA;AACb,CAAC,EANW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAMpC;AAED,IAAY,0BAQX;AARD,WAAY,0BAA0B;IACpC,6CAAe,CAAA;IACf,uDAAyB,CAAA;IACzB,iDAAmB,CAAA;IACnB,mEAAqC,CAAA;IACrC,qDAAuB,CAAA;IACvB,+CAAiB,CAAA;IACjB,+CAAiB,CAAA;AACnB,CAAC,EARW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAQrC"}
package/dist/tokens.js CHANGED
@@ -30,7 +30,7 @@ const R = __importStar(require("ramda"));
30
30
  const jose = __importStar(require("jose"));
31
31
  const crypto = __importStar(require("crypto"));
32
32
  const exchange_code_for_token_1 = __importDefault(require("./exchange-code-for-token"));
33
- const random = (length = 32) => jose.base64url.encode(crypto.randomBytes(length));
33
+ const random = (length = 32) => jose.base64url.encode(new Uint8Array(crypto.randomBytes(length)));
34
34
  const createSignedJWT = async ({ alg, kid, audience, issuer, sub, privateKey, expirationTime = "10m", }) => new jose.SignJWT({})
35
35
  .setProtectedHeader({ alg, kid })
36
36
  .setSubject(sub)
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAA0B;AAC1B,2CAA4B;AAG5B,+CAAgC;AAChC,wFAAoE;AAEpE,MAAM,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,EAAE,EAAE,CAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAA;AAEnD,MAAM,eAAe,GAAG,KAAK,EAAE,EAC7B,GAAG,EACH,GAAG,EACH,QAAQ,EACR,MAAM,EACN,GAAG,EACH,UAAU,EACV,cAAc,GAAG,KAAK,GASrB,EAAE,EAAE,CACL,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;KACjB,kBAAkB,CAAC,EAAC,GAAG,EAAE,GAAG,EAAC,CAAC;KAC9B,UAAU,CAAC,GAAG,CAAC;KACf,WAAW,CAAC,QAAQ,CAAC;KACrB,SAAS,CAAC,MAAM,CAAC;KACjB,MAAM,CAAC,MAAM,EAAE,CAAC;KAChB,WAAW,EAAE;KACb,iBAAiB,CAAC,cAAc,CAAC;KACjC,IAAI,CAAC,UAAU,CAAC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kB,EAAE,WAAW,EAAC,CAAC,CAAA;QACjE,CAAC;QAED,aAAa,EAAE,CAAC,EAAC,YAAY,EAAoC,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC;QAElG,yBAAyB,EAAE,CAAC,EAAC,KAAK,EAAE,GAAG,EAAgC,EAAE,EAAE,CACzE,MAAM,CAAC,KAAK,CAAC;YACX,UAAU,EAAE,oBAAoB;YAChC,KAAK;YACL,GAAG;SACJ,CAAC;QAEJ,iBAAiB,EAAE,KAAK,EAAE,EAAC,KAAK,EAAE,GAAG,EAA+B,EAAE,EAAE;YAEtE,OAAO,MAAM,CAAC,KAAK,CAAC;gBAClB,UAAU,EAAE,6CAA6C;gBACzD,KAAK;gBACL,SAAS,EAAE,MAAM,yBAAyB,CAAC,GAAG,CAAC;aAChD,CAAC,CAAA;QACJ,CAAC;QAED,yBAAyB;KAC1B,CAAA;AACH,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,16 +1,20 @@
1
1
  {
2
2
  "name": "@mft/moneyhub-api-client",
3
- "version": "6.94.0",
3
+ "version": "6.97.0",
4
4
  "description": "Node.JS client for the Moneyhub API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "lint": "eslint src/ ",
9
+ "lint-fix": "eslint src/ --fix",
9
10
  "test": "mocha --require ts-node/register --config test/opts/integration.json",
10
- "test-ci": "mocha --require ts-node/register --config test/opts/integration-ci.json || true",
11
+ "test-ci": "mocha --require ts-node/register --config test/opts/integration-ci.json",
12
+ "test-caas": "mocha --require ts-node/register --config test/opts/integration-caas.json",
13
+ "test-caas-ci": "mocha --require ts-node/register --config test/opts/integration-caas-ci.json",
11
14
  "prepare": "husky install",
12
- "prepublishOnly": "npm run build",
15
+ "prepublishOnly": "node scripts/assert-github-actions-publish.js && npm run build",
13
16
  "build": "tsc",
17
+ "create-jwks": "node examples/jwks/create-jwks.js",
14
18
  "ts-node": "ts-node",
15
19
  "snyk-ci": "snyk test --fail-on=all --severity-threshold=high",
16
20
  "snyk": "snyk test"
@@ -30,6 +34,7 @@
30
34
  "node": ">= 12.0.0"
31
35
  },
32
36
  "dependencies": {
37
+ "@isaacs/ttlcache": "^2.1.4",
33
38
  "form-data": "^3.0.4",
34
39
  "got": "^11.8.5",
35
40
  "jose": "^5.2.3",
@@ -37,6 +42,9 @@
37
42
  "query-string": "^7.1.1",
38
43
  "ramda": "^0.27.2"
39
44
  },
45
+ "overrides": {
46
+ "serialize-javascript": "^7.0.5"
47
+ },
40
48
  "devDependencies": {
41
49
  "@mft/eslint-config-momentumft": "^8.0.0",
42
50
  "@types/chai": "^4.3.1",
@@ -44,11 +52,13 @@
44
52
  "@types/ramda": "^0.28.13",
45
53
  "@typescript-eslint/eslint-plugin": "^5.30.7",
46
54
  "@typescript-eslint/parser": "^5.30.7",
55
+ "ajv": "^8.18.0",
56
+ "ajv-formats": "^3.0.1",
47
57
  "body-parser": "^1.19.2",
48
58
  "chai": "^4.3.6",
49
59
  "command-line-args": "^5.2.1",
50
60
  "command-line-usage": "^6.1.1",
51
- "config": "^3.3.7",
61
+ "config": "^4.2.0",
52
62
  "eslint": "^8.20.0",
53
63
  "expect-type": "^0.13.0",
54
64
  "express": "^4.17.3",
@@ -56,6 +66,7 @@
56
66
  "mocha": "^10.0.0",
57
67
  "mocha-junit-reporter": "^2.0.2",
58
68
  "snyk": "^1.1041.0",
69
+ "ts-json-schema-generator": "^2.9.0",
59
70
  "ts-node": "^10.8.0",
60
71
  "typescript": "^4.7.2"
61
72
  }
package/readme.md CHANGED
@@ -26,6 +26,7 @@ This is an Node.JS client for the [Moneyhub API](https://docs.moneyhubenterprise
26
26
  - Get a tax return for a subset of transactions
27
27
  - Get the regular transactions on an account
28
28
  - Get beneficiaries
29
+ - CAAS (Categorisation as a Service) API for advanced transaction enrichment and categorisation
29
30
 
30
31
  Currently this library supports `client_secret_basic`, `client_secret_jwt` and `private_key_jwt` authentication.
31
32
 
@@ -35,7 +36,7 @@ The breaking changes when upgrading are outlined below:
35
36
 
36
37
  - Normalisation of all methods to use object destructuring to pass parameters. Please refer to the docs of each method when migrating to this version
37
38
 
38
- - Delete methods only return the status code when succesful
39
+ - Delete methods only return the status code when successful
39
40
 
40
41
  - All methods to retrieve data return the body response as json, on previous versions some methods were returning the full response from the got library.
41
42
 
@@ -61,6 +62,14 @@ const {Moneyhub} = require("@mft/moneyhub-api-client")
61
62
 
62
63
  [Learn about the latest improvements and breaking changes](CHANGELOG.md).
63
64
 
65
+ ## Publishing (maintainers)
66
+
67
+ Official releases are published to npm by **GitHub Actions** when a [GitHub Release](https://github.com/moneyhub/moneyhub-api-client/releases) is published (see `.github/workflows/publish.yml`). Do not rely on publishing from a developer machine.
68
+
69
+ The `prepublishOnly` lifecycle script runs **`scripts/assert-github-actions-publish.js`** before the build. It exits with an error unless `GITHUB_ACTIONS` is set (as it is in GitHub Actions), so a normal local `npm publish` is blocked. That reduces accidental publishes; it is **not** a security boundary on its own—npm access control and trusted publishing still matter.
70
+
71
+ To bypass the check in a **documented emergency** only, you can run `npm publish --ignore-scripts` (this skips all lifecycle scripts, including the build step in `prepublishOnly`, so you must ensure the package is already built and correct).
72
+
64
73
  ## Prerequisites
65
74
 
66
75
  To use this API client you will need:
@@ -73,6 +82,23 @@ To use this API client you will need:
73
82
 
74
83
  `npm install @mft/moneyhub-api-client`
75
84
 
85
+ ## Creating JWKS
86
+
87
+ If you need to generate JWKS (JSON Web Key Set) for authentication with `private_key_jwt`, you can use the provided script:
88
+
89
+ ```bash
90
+ npm run create-jwks -- --key-alg RS256 --key-size 2048 --key-use sig --alg RS256
91
+ ```
92
+
93
+ ### Options
94
+
95
+ - `--key-alg`: The key algorithm (default: uses the value from `--alg`)
96
+ - `--key-size`: The key size in bits (default: 2048)
97
+ - `--key-use`: The key usage, typically `sig` for signing (default: sig)
98
+ - `--alg`: The signing algorithm, e.g., `RS256`, `RS384`, `RS512` (default: RS256)
99
+
100
+ This will generate both public and private JWKS. The public keys should be added to your API client configuration in the Moneyhub Admin portal, and the private keys should be used as the `keys` value when configuring the Moneyhub API client.
101
+
76
102
  ## Usage
77
103
 
78
104
  This module exposes a single factory function that accepts the following configuration:
@@ -158,6 +184,63 @@ At least one of the following parameters needs to be passed in to any api call t
158
184
  - **token**: The token will be added as bearer authorization header
159
185
  - **Authorization header**: The full authorisation header can be passed in
160
186
 
187
+ ## Using the client behind a gateway
188
+
189
+ The client keeps the original resource URLs in config (`resourceServerUrl`, `identityServiceUrl`, `caasResourceServerUrl`, `osipResourceServerUrl`, `accountConnectUrl`). You can optionally set a **gateway URL** for each resource (`gatewayResourceServerUrl`, `gatewayIdentityServiceUrl`, `gatewayCaasResourceServerUrl`, `gatewayOsipResourceServerUrl`, `gatewayAccountConnectUrl`). **Only when a gateway URL is set** for a resource does the client use that URL for requests to that resource and rewrite responses to it. If you only route one resource through a gateway, set only that resource’s gateway URL; the others stay on the original URLs and no rewriting occurs for them. Example:
190
+
191
+ ```javascript
192
+ const moneyhub = await Moneyhub({
193
+ resourceServerUrl: "https://api.moneyhub.co.uk/v3",
194
+ identityServiceUrl: "https://identity.moneyhub.co.uk",
195
+ gatewayResourceServerUrl: "https://my-gateway.example.com/moneyhub/v3",
196
+ gatewayIdentityServiceUrl: "https://my-gateway.example.com/moneyhub/identity",
197
+ options: {
198
+ openIdConfigCacheTtlMs: 3600000, // optional; default 1 hour
199
+ },
200
+ client: { /* ... */ },
201
+ })
202
+ ```
203
+
204
+ Behaviour:
205
+
206
+ - **Identity**: When `gatewayIdentityServiceUrl` is set, the client fetches the OpenID discovery document from that URL and rewrites endpoint URLs in the document to use it, so that authorization, token exchange, and JWKS requests go through the gateway. When it is not set, discovery is fetched from `identityServiceUrl` and no rewriting is applied.
207
+ - **Resource server**: When `gatewayResourceServerUrl` (or `gatewayCaasResourceServerUrl` or `gatewayOsipResourceServerUrl`) is set, the client uses that URL for requests to that API and rewrites link URLs in responses (e.g. `links.self`, `links.next`, `links.prev`) to that base. When no gateway URL is set for that resource, the client uses the original URL and does not rewrite response links.
208
+
209
+ **Verifying behaviour**: Run the unit tests for the rewrite logic with `npx mocha --require ts-node/register "src/__tests__/discovery.ts"`; run the integration tests for gateway rewriting with `npm run test -- -g "Gateway URL rewriting"` (or run the full test suite as described in [Running Tests](#running-tests)); in production, check your gateway access logs to confirm identity and API requests hit the gateway, or inspect `getOpenIdConfig()` and any `response.links` to see gateway URLs.
210
+
211
+ ### Security considerations
212
+
213
+ The following points are intended for security review (e.g. by banks or regulated entities).
214
+
215
+ - **Rewrite target is always a configured gateway URL**
216
+ URLs are rewritten only to the gateway base URLs you supply (`gatewayIdentityServiceUrl`, `gatewayResourceServerUrl`, etc.). The client never uses a URL from a response or discovery document as the *target* of the rewrite. An attacker who could influence response content cannot cause the client to send traffic to an arbitrary or malicious host.
217
+
218
+ - **TLS and certificates**
219
+ The client validates TLS only to the configured base (the gateway). The gateway is responsible for TLS to the upstream identity and API services. No new certificate or trust store requirements are introduced by the library.
220
+
221
+ - **OIDC issuer claim and discovery `issuer`**
222
+ ID tokens from the identity provider carry an `iss` (issuer) claim. Many OIDC clients validate that the token’s `iss` matches the Issuer’s `issuer` from discovery. When using a gateway, the implementation may leave the discovery `issuer` field unchanged so that token validation continues to expect the IdP’s canonical `iss`; or the identity service behind the gateway may be configured to issue tokens with `iss` equal to the gateway URL. See the release notes or implementation docs for the chosen behaviour so you can align with your IdP and validation policies.
223
+
224
+ - **Response body integrity**
225
+ The client modifies response bodies (e.g. `links`) for resource server responses. If you sign or checksum the *full* response body elsewhere, rewriting URL fields would invalidate that. Treat the client as the consumer of the API for integrity purposes, or apply signing after the client (e.g. at the gateway) so the signed payload is the rewritten one.
226
+
227
+ - **Secrets**
228
+ Client credentials, keys, and tokens are used as in the standard flow. No new storage, logging, or transmission of secrets is introduced by the gateway rewrite logic.
229
+
230
+ ### Governance considerations
231
+
232
+ - **Change control and risk**
233
+ The gateway feature alters outbound request behaviour (discovery used for the Issuer) and response bodies (resource server links). Release notes and CHANGELOG describe the change. Summary: enables gateway-only routing; no new external dependency; rewrite targets are config-only; considerations include issuer claim alignment and response body integrity as above.
234
+
235
+ - **Audit and assurance**
236
+ To demonstrate that traffic to Moneyhub goes through your approved gateway, set the relevant gateway URLs and use the verification steps above (tests, gateway logs, inspection of `getOpenIdConfig()` and `response.links`). Internal or external audit can rely on config plus these verification steps.
237
+
238
+ - **Third-party and supply chain**
239
+ The client uses `@isaacs/ttlcache` for OIDC discovery caching. Rewrite targets are never taken from responses or discovery documents.
240
+
241
+ - **Regulatory and outsourcing**
242
+ Use of a gateway is your architectural choice; this feature makes it possible for the client to honour that choice. Regulatory implications (e.g. outsourcing, record-keeping) remain with your use of the gateway and the Moneyhub service, not with the library change itself.
243
+
161
244
  ## API
162
245
  Once the api client has been initialised it provides a simple promise based interface with the following methods:
163
246
 
@@ -364,10 +447,10 @@ const defaultClaims = {
364
447
  #### `exchangeCodeForTokensLegacy`
365
448
 
366
449
  This is a legacy method to get tokens for a user.
367
- After a user has succesfully authorised they will be redirected to your redirect_uri with an authorization code. You can use this to retrieve access, refresh and id tokens for the user.
450
+ After a user has successfully authorised they will be redirected to your redirect_uri with an authorization code. You can use this to retrieve access, refresh and id tokens for the user.
368
451
 
369
452
  ```javascript
370
- const tokens = await moneyhub.exchangeCodeForTokens({
453
+ const tokens = await moneyhub.exchangeCodeForTokensLegacy({
371
454
  code: "the authorization code",
372
455
  nonce: "your nonce value", // optional
373
456
  state: "your state value", // optional
@@ -377,7 +460,7 @@ const tokens = await moneyhub.exchangeCodeForTokens({
377
460
 
378
461
  #### `exchangeCodeForTokens`
379
462
 
380
- After a user has succesfully authorised they will be redirected to your redirect_uri with an authorization code. You can use this method to retrieve access, refresh and id tokens for the user.
463
+ After a user has successfully authorised they will be redirected to your redirect_uri with an authorization code. You can use this method to retrieve access, refresh and id tokens for the user.
381
464
 
382
465
  The signature for this method changed in v3.
383
466
  The previous function is available at 'exchangeCodeForTokensLegacy'
@@ -531,7 +614,7 @@ const tokens = await moneyhub.createAuthRequest({
531
614
 
532
615
  #### `completeAuthRequest`
533
616
 
534
- Completes an auth request succesfully
617
+ Completes an auth request successfully
535
618
 
536
619
  ```javascript
537
620
  const tokens = await moneyhub.completeAuthRequest({
@@ -2138,6 +2221,185 @@ const resellerCheck = await moneyhub.createResellerCheckRequest({
2138
2221
  }, options);
2139
2222
  ```
2140
2223
 
2224
+ ### CAAS API
2225
+
2226
+ The CAAS (Categorisation as a Service) API provides advanced transaction enrichment, categorisation, and management capabilities. All CAAS endpoints use dedicated scopes prefixed with `caas:`.
2227
+
2228
+ #### `caasEnrichTransactions`
2229
+
2230
+ Enrich transactions with detailed categorisation, counterparty information, and geolocation data. This function uses the scope `caas:transactions:write`.
2231
+
2232
+ ```javascript
2233
+ const transactions = [
2234
+ {
2235
+ userId: "0a1327eb-26b9-4abc-b932-ff61cb27b227",
2236
+ accountId: "10ed62b0-05f7-4a24-8ed1-0c503fc58924",
2237
+ transactionId: "a8b7c6d5-e4f3-2a1b-3c4d-5e6f7a8b9c01",
2238
+ accountType: "cash",
2239
+ txCode: "",
2240
+ date: "2025-12-01T00:00:00.000Z",
2241
+ status: "posted",
2242
+ description: "Tesco Milton Keynes",
2243
+ amount: -125.67,
2244
+ currency: "GBP",
2245
+ merchantCategoryCode: "5411",
2246
+ cardPresent: true,
2247
+ },
2248
+ ];
2249
+
2250
+ const result = await moneyhub.caasEnrichTransactions({
2251
+ transactions: transactions,
2252
+ }, options);
2253
+ ```
2254
+
2255
+ #### `caasGetTransactions`
2256
+
2257
+ Get transactions from the CAAS API with optional filtering by user and limit. This function uses the scope `caas:transactions:read`.
2258
+
2259
+ ```javascript
2260
+ const result = await moneyhub.caasGetTransactions({
2261
+ accountId: "accountId",
2262
+ userId: "userId", // optional
2263
+ limit: 50, // optional
2264
+ }, options);
2265
+ ```
2266
+
2267
+ #### `caasGetEnhancedTransaction`
2268
+
2269
+ Retrieves Google Places–backed enhanced location and merchant data for a single CAAS transaction. Uses scope `caas:enhanced_transactions:read`. This is a premium endpoint and incurs a cost per request. Responses must not be cached or persisted when the data is sourced from Google (see API documentation).
2270
+
2271
+ Optional query `includeFieldTiers` controls which field sets are returned (each tier is cumulative). Allowed values: `basic` (default), `search_pro`, `search_enterprise`, `search_enterprise_plus`.
2272
+
2273
+ ```javascript
2274
+ const result = await moneyhub.caasGetEnhancedTransaction({
2275
+ accountId: "accountId",
2276
+ transactionId: "transactionId",
2277
+ includeFieldTiers: "search_pro",
2278
+ }, options);
2279
+ ```
2280
+
2281
+ The response follows the usual API envelope: the enhanced transaction is `result.data` (optional `links` / `meta` may also be present).
2282
+
2283
+ #### `caasPatchTransaction`
2284
+
2285
+ Update a transaction category via the CAAS endpoint. This function uses the scope `caas:transactions:write` and returns the updated transaction data under `data`.
2286
+
2287
+ ```javascript
2288
+ const result = await moneyhub.caasPatchTransaction({
2289
+ accountId: "accountId",
2290
+ transactionId: "transactionId",
2291
+ l2CategoryId: "21",
2292
+ }, options);
2293
+ ```
2294
+
2295
+ #### `caasDeleteTransaction`
2296
+
2297
+ Delete a transaction via the CAAS endpoint. This function uses the scope `caas:transactions:delete`.
2298
+
2299
+ ```javascript
2300
+ await moneyhub.caasDeleteTransaction({
2301
+ accountId: "accountId",
2302
+ transactionId: "transactionId",
2303
+ }, options);
2304
+ ```
2305
+
2306
+ #### `caasPutTransactionSplits`
2307
+
2308
+ Create or replace all splits for a transaction. Requires between 2 and 10 splits; split amounts must sum to the parent transaction `amount`. Uses scope `caas:transaction_splits:write`. Returns the upserted splits under `data`.
2309
+
2310
+ ```javascript
2311
+ const result = await moneyhub.caasPutTransactionSplits({
2312
+ accountId: "accountId",
2313
+ transactionId: "transactionId",
2314
+ splits: [
2315
+ {amount: -40, userCategoryId: "22", description: "Food"},
2316
+ {amount: -20, userCategoryId: "44", description: "Gift"},
2317
+ ],
2318
+ }, options);
2319
+ ```
2320
+
2321
+ Example script: `npm run ts-node -- examples/caas/put-transaction-splits.js -a accTestQA123 -t testQA123 -d '[{"amount":4,"userCategoryId":"2d6078a1-06db-4c9c-b559-f36cec9e4fc1","description":"Food"},{"amount":6,"userCategoryId":"22","description":"Gift"}]'` (split amounts must sum to the parent transaction amount).
2322
+
2323
+ #### `caasDeleteTransactionSplits`
2324
+
2325
+ Remove all splits from a transaction. Uses scope `caas:transaction_splits:delete`. Resolves with HTTP status `204`.
2326
+
2327
+ ```javascript
2328
+ const status = await moneyhub.caasDeleteTransactionSplits({
2329
+ accountId: "accountId",
2330
+ transactionId: "transactionId",
2331
+ }, options);
2332
+ ```
2333
+
2334
+ Example script: `node examples/caas/delete-transaction-splits.js -a accountId -t transactionId`.
2335
+
2336
+ #### `caasGetCategories`
2337
+
2338
+ Get all available CAAS categories. This function uses the scope `caas:categories:read`.
2339
+
2340
+ ```javascript
2341
+ const result = await moneyhub.caasGetCategories(options);
2342
+ ```
2343
+
2344
+ #### `caasGetCategoryGroups`
2345
+
2346
+ Get all available CAAS category groups. This function uses the scope `caas:categories:read`.
2347
+
2348
+ ```javascript
2349
+ const result = await moneyhub.caasGetCategoryGroups(options);
2350
+ ```
2351
+
2352
+ #### `caasGetCounterparties`
2353
+
2354
+ Get counterparties with optional pagination. This function uses the scope `caas:transactions:read`.
2355
+
2356
+ ```javascript
2357
+ const result = await moneyhub.caasGetCounterparties({
2358
+ limit: 50, // optional
2359
+ offset: 0, // optional
2360
+ }, options);
2361
+ ```
2362
+
2363
+ #### `caasGetGeotags`
2364
+
2365
+ Get geotag information for specific geotag IDs. This function uses the scope `caas:transactions:read`.
2366
+
2367
+ ```javascript
2368
+ const result = await moneyhub.caasGetGeotags({
2369
+ geotagIds: ["geotag-id-1", "geotag-id-2"],
2370
+ }, options);
2371
+ ```
2372
+
2373
+ #### `caasGetRegularTransactions`
2374
+
2375
+ Get regular transaction series for an account from the CaaS API. This function uses the scope `caas:regular_transactions:read`.
2376
+
2377
+ ```javascript
2378
+ const result = await moneyhub.caasGetRegularTransactions({
2379
+ accountId: "accountId",
2380
+ }, options);
2381
+ ```
2382
+
2383
+ #### `caasDeleteAccount`
2384
+
2385
+ Delete an account via the CAAS endpoint. This function uses the scope `caas:users:delete`.
2386
+
2387
+ ```javascript
2388
+ await moneyhub.caasDeleteAccount({
2389
+ accountId: "accountId",
2390
+ }, options);
2391
+ ```
2392
+
2393
+ #### `caasDeleteUser`
2394
+
2395
+ Delete a user via the CAAS endpoint. This function uses the scope `caas:users:delete`.
2396
+
2397
+ ```javascript
2398
+ await moneyhub.caasDeleteUser({
2399
+ userId: "userId",
2400
+ }, options);
2401
+ ```
2402
+
2141
2403
  ### Financial Connections
2142
2404
 
2143
2405
  #### `listConnections`
@@ -2184,10 +2446,13 @@ const availableConnections = await moneyhub.listPaymentsConnections();
2184
2446
 
2185
2447
  #### `getOpenIdConfig`
2186
2448
 
2187
- This method will resolve with our open id configuration.
2449
+ Returns the OpenID Connect discovery document (e.g. `issuer`, `authorization_endpoint`, `token_endpoint`, `jwks_uri`).
2450
+
2451
+ > [!IMPORTANT]
2452
+ > When `gatewayIdentityServiceUrl` is set, endpoint URLs in the discovery document are rewritten to that base; the result is cached for `openIdConfigCacheTtlMs` (default 1 hour). See [Using the client behind a gateway](#using-the-client-behind-a-gateway).
2188
2453
 
2189
2454
  ```javascript
2190
- const availableConnections = await moneyhub.getOpenIdConfig();
2455
+ const openIdConfig = await moneyhub.getOpenIdConfig();
2191
2456
  ```
2192
2457
 
2193
2458
  ### Examples
@@ -2210,7 +2475,7 @@ The tests use root level Mocha hooks to set up and teardown test data. When addi
2210
2475
 
2211
2476
  ### Troubleshooting tests
2212
2477
 
2213
- - If any errors occurr during test setup or teardown, this should appear as happening in the "before all" or "after all" hook in `"{root}"` with the error.
2478
+ - If any errors occur during test setup or teardown, this should appear as happening in the "before all" or "after all" hook in `"{root}"` with the error.
2214
2479
  - Errors in the `before all` hook can cause errors in the `after all` hook as it won't be able to find data to clear up.
2215
2480
 
2216
2481
  ## TypeScript
@@ -2226,4 +2491,4 @@ const getAccounts = ({userId}) => {
2226
2491
  }
2227
2492
  ```
2228
2493
 
2229
- The default export is of the Moneyhub constructor that takes in an argument of the config. You can use `ApiClientConfig` to type that config. The client object that is returned from the constructor can then be used to make API calls. The methods are available with arguments and returns typed.
2494
+ The named export `Moneyhub` is the factory function that creates the client; it takes your config (typed with `ApiClientConfig`) and returns a promise of the client instance. The client object can then be used to make API calls, with methods, arguments and return types all typed.
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ // prepublishOnly guard; emergency bypass: npm publish --ignore-scripts
3
+ if (process.env.GITHUB_ACTIONS !== "true") {
4
+ console.error(
5
+ "Publishing this package is restricted to GitHub Actions. " +
6
+ "Create a GitHub Release to trigger the publish workflow. " +
7
+ "For a documented emergency bypass, use npm publish --ignore-scripts."
8
+ );
9
+ process.exit(1);
10
+ }
@@ -1,15 +0,0 @@
1
- import { Client } from "openid-client";
2
- import { ApiClientConfig } from "./schema/config";
3
- declare const _default: ({ config }: {
4
- client: Client;
5
- config: ApiClientConfig;
6
- }) => {
7
- createPaymentLinkUrl: ({ expirationTime, params, url, }: {
8
- url?: string | undefined;
9
- expirationTime: string | number;
10
- params: Record<string, any>;
11
- type: "widget";
12
- }) => Promise<string>;
13
- };
14
- export default _default;
15
- //# sourceMappingURL=get-payment-link.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-payment-link.d.ts","sourceRoot":"","sources":["../src/get-payment-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAA;AAGpC,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAA;;YAEZ,MAAM;YAAU,eAAe;;;;wBAyD9C,MAAM,GAAG,MAAM;gBACvB,OAAO,MAAM,EAAE,GAAG,CAAC;cACrB,QAAQ;;;AA3DlB,wBAoEC"}