@oatfi/oatfi-sdk-ts 0.12.2 → 0.12.3

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 (264) hide show
  1. package/FUNCTIONS.md +7 -77
  2. package/README.md +39 -386
  3. package/dist/commonjs/funcs/ledgerEntriesCreate.d.ts +15 -0
  4. package/dist/commonjs/funcs/ledgerEntriesCreate.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/ledgerEntriesCreate.js +126 -0
  6. package/dist/commonjs/funcs/ledgerEntriesCreate.js.map +1 -0
  7. package/dist/commonjs/funcs/ledgerEntriesGet.d.ts +15 -0
  8. package/dist/commonjs/funcs/ledgerEntriesGet.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/ledgerEntriesGet.js +128 -0
  10. package/dist/commonjs/funcs/ledgerEntriesGet.js.map +1 -0
  11. package/dist/commonjs/funcs/ledgerEntriesUpdate.d.ts +15 -0
  12. package/dist/commonjs/funcs/ledgerEntriesUpdate.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/ledgerEntriesUpdate.js +132 -0
  14. package/dist/commonjs/funcs/ledgerEntriesUpdate.js.map +1 -0
  15. package/dist/commonjs/funcs/onboardingTermsAgreementAssignmentInternalControllerCreate.d.ts +1 -1
  16. package/dist/commonjs/funcs/onboardingTermsAgreementAssignmentInternalControllerCreate.js +1 -1
  17. package/dist/commonjs/funcs/onboardingTermsCreate.d.ts +1 -1
  18. package/dist/commonjs/funcs/onboardingTermsCreate.js +1 -1
  19. package/dist/commonjs/funcs/platformComponentsGet.js +1 -1
  20. package/dist/commonjs/funcs/platformComponentsGet.js.map +1 -1
  21. package/dist/commonjs/lib/config.d.ts +3 -3
  22. package/dist/commonjs/lib/config.js +3 -3
  23. package/dist/commonjs/models/appscope.d.ts +1 -1
  24. package/dist/commonjs/models/appscope.js +1 -1
  25. package/dist/commonjs/models/appscope.js.map +1 -1
  26. package/dist/commonjs/models/brandingconfigdto.d.ts +3 -0
  27. package/dist/commonjs/models/brandingconfigdto.d.ts.map +1 -1
  28. package/dist/commonjs/models/brandingconfigdto.js +6 -0
  29. package/dist/commonjs/models/brandingconfigdto.js.map +1 -1
  30. package/dist/commonjs/models/brandingconfigurationdto.d.ts +15 -0
  31. package/dist/commonjs/models/brandingconfigurationdto.d.ts.map +1 -1
  32. package/dist/commonjs/models/brandingconfigurationdto.js +12 -0
  33. package/dist/commonjs/models/brandingconfigurationdto.js.map +1 -1
  34. package/dist/commonjs/models/brandingresponsedto.d.ts +0 -3
  35. package/dist/commonjs/models/brandingresponsedto.d.ts.map +1 -1
  36. package/dist/commonjs/models/brandingresponsedto.js +0 -7
  37. package/dist/commonjs/models/brandingresponsedto.js.map +1 -1
  38. package/dist/commonjs/models/createagreementassignmentdto.d.ts +3 -3
  39. package/dist/commonjs/models/createagreementassignmentdto.d.ts.map +1 -1
  40. package/dist/commonjs/models/createagreementassignmentdto.js +1 -1
  41. package/dist/commonjs/models/createagreementassignmentdto.js.map +1 -1
  42. package/dist/commonjs/models/createledgerentrydto.d.ts +79 -0
  43. package/dist/commonjs/models/createledgerentrydto.d.ts.map +1 -0
  44. package/dist/commonjs/models/createledgerentrydto.js +78 -0
  45. package/dist/commonjs/models/createledgerentrydto.js.map +1 -0
  46. package/dist/commonjs/models/createpartneragreementassignmentdto.d.ts +3 -3
  47. package/dist/commonjs/models/createpartneragreementassignmentdto.d.ts.map +1 -1
  48. package/dist/commonjs/models/createpartneragreementassignmentdto.js +1 -1
  49. package/dist/commonjs/models/createpartneragreementassignmentdto.js.map +1 -1
  50. package/dist/commonjs/models/createplatformsettingsdto.d.ts +0 -15
  51. package/dist/commonjs/models/createplatformsettingsdto.d.ts.map +1 -1
  52. package/dist/commonjs/models/createplatformsettingsdto.js +0 -6
  53. package/dist/commonjs/models/createplatformsettingsdto.js.map +1 -1
  54. package/dist/commonjs/models/index.d.ts +3 -0
  55. package/dist/commonjs/models/index.d.ts.map +1 -1
  56. package/dist/commonjs/models/index.js +3 -0
  57. package/dist/commonjs/models/index.js.map +1 -1
  58. package/dist/commonjs/models/ledgerentryresponsedto.d.ts +76 -0
  59. package/dist/commonjs/models/ledgerentryresponsedto.d.ts.map +1 -0
  60. package/dist/commonjs/models/ledgerentryresponsedto.js +77 -0
  61. package/dist/commonjs/models/ledgerentryresponsedto.js.map +1 -0
  62. package/dist/commonjs/models/networkpurchaseinfo.d.ts +5 -0
  63. package/dist/commonjs/models/networkpurchaseinfo.d.ts.map +1 -1
  64. package/dist/commonjs/models/networkpurchaseinfo.js +8 -1
  65. package/dist/commonjs/models/networkpurchaseinfo.js.map +1 -1
  66. package/dist/commonjs/models/operations/index.d.ts +3 -0
  67. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/index.js +3 -0
  69. package/dist/commonjs/models/operations/index.js.map +1 -1
  70. package/dist/commonjs/models/operations/ledgerentriescontrollercreate.d.ts +18 -0
  71. package/dist/commonjs/models/operations/ledgerentriescontrollercreate.d.ts.map +1 -0
  72. package/dist/commonjs/models/operations/ledgerentriescontrollercreate.js +57 -0
  73. package/dist/commonjs/models/operations/ledgerentriescontrollercreate.js.map +1 -0
  74. package/dist/commonjs/models/operations/ledgerentriescontrollerfindone.d.ts +15 -0
  75. package/dist/commonjs/models/operations/ledgerentriescontrollerfindone.d.ts.map +1 -0
  76. package/dist/commonjs/models/operations/ledgerentriescontrollerfindone.js +49 -0
  77. package/dist/commonjs/models/operations/ledgerentriescontrollerfindone.js.map +1 -0
  78. package/dist/commonjs/models/operations/ledgerentriescontrollerupdate.d.ts +23 -0
  79. package/dist/commonjs/models/operations/ledgerentriescontrollerupdate.d.ts.map +1 -0
  80. package/dist/commonjs/models/operations/ledgerentriescontrollerupdate.js +58 -0
  81. package/dist/commonjs/models/operations/ledgerentriescontrollerupdate.js.map +1 -0
  82. package/dist/commonjs/models/operations/platformscontrollergetscopes.d.ts +1 -1
  83. package/dist/commonjs/models/operations/platformscontrollergetscopes.js +1 -1
  84. package/dist/commonjs/models/operations/platformscontrollergetscopes.js.map +1 -1
  85. package/dist/commonjs/models/originationdto.d.ts +5 -0
  86. package/dist/commonjs/models/originationdto.d.ts.map +1 -1
  87. package/dist/commonjs/models/originationdto.js +3 -0
  88. package/dist/commonjs/models/originationdto.js.map +1 -1
  89. package/dist/commonjs/models/paymentinformationdto.d.ts +2 -2
  90. package/dist/commonjs/models/paymentinformationdto.d.ts.map +1 -1
  91. package/dist/commonjs/models/paymentinformationdto.js +2 -2
  92. package/dist/commonjs/models/paymentinformationdto.js.map +1 -1
  93. package/dist/commonjs/models/platformcomponentsdto.d.ts +2 -2
  94. package/dist/commonjs/models/platformsettingsdto.d.ts +0 -12
  95. package/dist/commonjs/models/platformsettingsdto.d.ts.map +1 -1
  96. package/dist/commonjs/models/platformsettingsdto.js +0 -6
  97. package/dist/commonjs/models/platformsettingsdto.js.map +1 -1
  98. package/dist/commonjs/models/updateledgerentrydto.d.ts +55 -0
  99. package/dist/commonjs/models/updateledgerentrydto.d.ts.map +1 -0
  100. package/dist/commonjs/models/updateledgerentrydto.js +66 -0
  101. package/dist/commonjs/models/updateledgerentrydto.js.map +1 -0
  102. package/dist/commonjs/models/updateoriginationdto.d.ts +6 -0
  103. package/dist/commonjs/models/updateoriginationdto.d.ts.map +1 -1
  104. package/dist/commonjs/models/updateoriginationdto.js +3 -0
  105. package/dist/commonjs/models/updateoriginationdto.js.map +1 -1
  106. package/dist/commonjs/sdk/ledgerentries.d.ts +18 -0
  107. package/dist/commonjs/sdk/ledgerentries.d.ts.map +1 -0
  108. package/dist/commonjs/sdk/ledgerentries.js +33 -0
  109. package/dist/commonjs/sdk/ledgerentries.js.map +1 -0
  110. package/dist/commonjs/sdk/onboardingterms.d.ts +2 -2
  111. package/dist/commonjs/sdk/onboardingterms.js +2 -2
  112. package/dist/commonjs/sdk/sdk.d.ts +5 -2
  113. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  114. package/dist/commonjs/sdk/sdk.js +7 -3
  115. package/dist/commonjs/sdk/sdk.js.map +1 -1
  116. package/dist/esm/funcs/ledgerEntriesCreate.d.ts +15 -0
  117. package/dist/esm/funcs/ledgerEntriesCreate.d.ts.map +1 -0
  118. package/dist/esm/funcs/ledgerEntriesCreate.js +90 -0
  119. package/dist/esm/funcs/ledgerEntriesCreate.js.map +1 -0
  120. package/dist/esm/funcs/ledgerEntriesGet.d.ts +15 -0
  121. package/dist/esm/funcs/ledgerEntriesGet.d.ts.map +1 -0
  122. package/dist/esm/funcs/ledgerEntriesGet.js +92 -0
  123. package/dist/esm/funcs/ledgerEntriesGet.js.map +1 -0
  124. package/dist/esm/funcs/ledgerEntriesUpdate.d.ts +15 -0
  125. package/dist/esm/funcs/ledgerEntriesUpdate.d.ts.map +1 -0
  126. package/dist/esm/funcs/ledgerEntriesUpdate.js +96 -0
  127. package/dist/esm/funcs/ledgerEntriesUpdate.js.map +1 -0
  128. package/dist/esm/funcs/onboardingTermsAgreementAssignmentInternalControllerCreate.d.ts +1 -1
  129. package/dist/esm/funcs/onboardingTermsAgreementAssignmentInternalControllerCreate.js +1 -1
  130. package/dist/esm/funcs/onboardingTermsCreate.d.ts +1 -1
  131. package/dist/esm/funcs/onboardingTermsCreate.js +1 -1
  132. package/dist/esm/funcs/platformComponentsGet.js +1 -1
  133. package/dist/esm/funcs/platformComponentsGet.js.map +1 -1
  134. package/dist/esm/lib/config.d.ts +3 -3
  135. package/dist/esm/lib/config.js +3 -3
  136. package/dist/esm/models/appscope.d.ts +1 -1
  137. package/dist/esm/models/appscope.js +1 -1
  138. package/dist/esm/models/appscope.js.map +1 -1
  139. package/dist/esm/models/brandingconfigdto.d.ts +3 -0
  140. package/dist/esm/models/brandingconfigdto.d.ts.map +1 -1
  141. package/dist/esm/models/brandingconfigdto.js +6 -0
  142. package/dist/esm/models/brandingconfigdto.js.map +1 -1
  143. package/dist/esm/models/brandingconfigurationdto.d.ts +15 -0
  144. package/dist/esm/models/brandingconfigurationdto.d.ts.map +1 -1
  145. package/dist/esm/models/brandingconfigurationdto.js +12 -0
  146. package/dist/esm/models/brandingconfigurationdto.js.map +1 -1
  147. package/dist/esm/models/brandingresponsedto.d.ts +0 -3
  148. package/dist/esm/models/brandingresponsedto.d.ts.map +1 -1
  149. package/dist/esm/models/brandingresponsedto.js +0 -7
  150. package/dist/esm/models/brandingresponsedto.js.map +1 -1
  151. package/dist/esm/models/createagreementassignmentdto.d.ts +3 -3
  152. package/dist/esm/models/createagreementassignmentdto.d.ts.map +1 -1
  153. package/dist/esm/models/createagreementassignmentdto.js +1 -1
  154. package/dist/esm/models/createagreementassignmentdto.js.map +1 -1
  155. package/dist/esm/models/createledgerentrydto.d.ts +79 -0
  156. package/dist/esm/models/createledgerentrydto.d.ts.map +1 -0
  157. package/dist/esm/models/createledgerentrydto.js +41 -0
  158. package/dist/esm/models/createledgerentrydto.js.map +1 -0
  159. package/dist/esm/models/createpartneragreementassignmentdto.d.ts +3 -3
  160. package/dist/esm/models/createpartneragreementassignmentdto.d.ts.map +1 -1
  161. package/dist/esm/models/createpartneragreementassignmentdto.js +1 -1
  162. package/dist/esm/models/createpartneragreementassignmentdto.js.map +1 -1
  163. package/dist/esm/models/createplatformsettingsdto.d.ts +0 -15
  164. package/dist/esm/models/createplatformsettingsdto.d.ts.map +1 -1
  165. package/dist/esm/models/createplatformsettingsdto.js +0 -6
  166. package/dist/esm/models/createplatformsettingsdto.js.map +1 -1
  167. package/dist/esm/models/index.d.ts +3 -0
  168. package/dist/esm/models/index.d.ts.map +1 -1
  169. package/dist/esm/models/index.js +3 -0
  170. package/dist/esm/models/index.js.map +1 -1
  171. package/dist/esm/models/ledgerentryresponsedto.d.ts +76 -0
  172. package/dist/esm/models/ledgerentryresponsedto.d.ts.map +1 -0
  173. package/dist/esm/models/ledgerentryresponsedto.js +40 -0
  174. package/dist/esm/models/ledgerentryresponsedto.js.map +1 -0
  175. package/dist/esm/models/networkpurchaseinfo.d.ts +5 -0
  176. package/dist/esm/models/networkpurchaseinfo.d.ts.map +1 -1
  177. package/dist/esm/models/networkpurchaseinfo.js +6 -0
  178. package/dist/esm/models/networkpurchaseinfo.js.map +1 -1
  179. package/dist/esm/models/operations/index.d.ts +3 -0
  180. package/dist/esm/models/operations/index.d.ts.map +1 -1
  181. package/dist/esm/models/operations/index.js +3 -0
  182. package/dist/esm/models/operations/index.js.map +1 -1
  183. package/dist/esm/models/operations/ledgerentriescontrollercreate.d.ts +18 -0
  184. package/dist/esm/models/operations/ledgerentriescontrollercreate.d.ts.map +1 -0
  185. package/dist/esm/models/operations/ledgerentriescontrollercreate.js +20 -0
  186. package/dist/esm/models/operations/ledgerentriescontrollercreate.js.map +1 -0
  187. package/dist/esm/models/operations/ledgerentriescontrollerfindone.d.ts +15 -0
  188. package/dist/esm/models/operations/ledgerentriescontrollerfindone.d.ts.map +1 -0
  189. package/dist/esm/models/operations/ledgerentriescontrollerfindone.js +12 -0
  190. package/dist/esm/models/operations/ledgerentriescontrollerfindone.js.map +1 -0
  191. package/dist/esm/models/operations/ledgerentriescontrollerupdate.d.ts +23 -0
  192. package/dist/esm/models/operations/ledgerentriescontrollerupdate.d.ts.map +1 -0
  193. package/dist/esm/models/operations/ledgerentriescontrollerupdate.js +21 -0
  194. package/dist/esm/models/operations/ledgerentriescontrollerupdate.js.map +1 -0
  195. package/dist/esm/models/operations/platformscontrollergetscopes.d.ts +1 -1
  196. package/dist/esm/models/operations/platformscontrollergetscopes.js +1 -1
  197. package/dist/esm/models/operations/platformscontrollergetscopes.js.map +1 -1
  198. package/dist/esm/models/originationdto.d.ts +5 -0
  199. package/dist/esm/models/originationdto.d.ts.map +1 -1
  200. package/dist/esm/models/originationdto.js +3 -0
  201. package/dist/esm/models/originationdto.js.map +1 -1
  202. package/dist/esm/models/paymentinformationdto.d.ts +2 -2
  203. package/dist/esm/models/paymentinformationdto.d.ts.map +1 -1
  204. package/dist/esm/models/paymentinformationdto.js +2 -2
  205. package/dist/esm/models/paymentinformationdto.js.map +1 -1
  206. package/dist/esm/models/platformcomponentsdto.d.ts +2 -2
  207. package/dist/esm/models/platformsettingsdto.d.ts +0 -12
  208. package/dist/esm/models/platformsettingsdto.d.ts.map +1 -1
  209. package/dist/esm/models/platformsettingsdto.js +0 -6
  210. package/dist/esm/models/platformsettingsdto.js.map +1 -1
  211. package/dist/esm/models/updateledgerentrydto.d.ts +55 -0
  212. package/dist/esm/models/updateledgerentrydto.d.ts.map +1 -0
  213. package/dist/esm/models/updateledgerentrydto.js +29 -0
  214. package/dist/esm/models/updateledgerentrydto.js.map +1 -0
  215. package/dist/esm/models/updateoriginationdto.d.ts +6 -0
  216. package/dist/esm/models/updateoriginationdto.d.ts.map +1 -1
  217. package/dist/esm/models/updateoriginationdto.js +3 -0
  218. package/dist/esm/models/updateoriginationdto.js.map +1 -1
  219. package/dist/esm/sdk/ledgerentries.d.ts +18 -0
  220. package/dist/esm/sdk/ledgerentries.d.ts.map +1 -0
  221. package/dist/esm/sdk/ledgerentries.js +29 -0
  222. package/dist/esm/sdk/ledgerentries.js.map +1 -0
  223. package/dist/esm/sdk/onboardingterms.d.ts +2 -2
  224. package/dist/esm/sdk/onboardingterms.js +2 -2
  225. package/dist/esm/sdk/sdk.d.ts +5 -2
  226. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  227. package/dist/esm/sdk/sdk.js +7 -3
  228. package/dist/esm/sdk/sdk.js.map +1 -1
  229. package/examples/onboardingTermsCreate.example.ts +33 -0
  230. package/jsr.json +1 -1
  231. package/package.json +1 -1
  232. package/src/funcs/ledgerEntriesCreate.ts +180 -0
  233. package/src/funcs/ledgerEntriesGet.ts +178 -0
  234. package/src/funcs/ledgerEntriesUpdate.ts +186 -0
  235. package/src/funcs/onboardingTermsAgreementAssignmentInternalControllerCreate.ts +1 -1
  236. package/src/funcs/onboardingTermsCreate.ts +1 -1
  237. package/src/funcs/platformComponentsGet.ts +1 -1
  238. package/src/lib/config.ts +3 -3
  239. package/src/models/appscope.ts +1 -1
  240. package/src/models/brandingconfigdto.ts +9 -0
  241. package/src/models/brandingconfigurationdto.ts +27 -0
  242. package/src/models/brandingresponsedto.ts +0 -10
  243. package/src/models/createagreementassignmentdto.ts +4 -4
  244. package/src/models/createledgerentrydto.ts +124 -0
  245. package/src/models/createpartneragreementassignmentdto.ts +4 -4
  246. package/src/models/createplatformsettingsdto.ts +0 -21
  247. package/src/models/index.ts +3 -0
  248. package/src/models/ledgerentryresponsedto.ts +124 -0
  249. package/src/models/networkpurchaseinfo.ts +18 -0
  250. package/src/models/operations/index.ts +3 -0
  251. package/src/models/operations/ledgerentriescontrollercreate.ts +46 -0
  252. package/src/models/operations/ledgerentriescontrollerfindone.ts +36 -0
  253. package/src/models/operations/ledgerentriescontrollerupdate.ts +52 -0
  254. package/src/models/operations/platformscontrollergetscopes.ts +1 -1
  255. package/src/models/originationdto.ts +10 -0
  256. package/src/models/paymentinformationdto.ts +4 -4
  257. package/src/models/platformcomponentsdto.ts +2 -2
  258. package/src/models/platformsettingsdto.ts +0 -18
  259. package/src/models/updateledgerentrydto.ts +91 -0
  260. package/src/models/updateoriginationdto.ts +12 -0
  261. package/src/sdk/ledgerentries.ts +55 -0
  262. package/src/sdk/onboardingterms.ts +2 -2
  263. package/src/sdk/sdk.ts +11 -5
  264. package/examples/businessesCreate.example.ts +0 -105
@@ -14,6 +14,10 @@ import {
14
14
  InstallmentDto,
15
15
  InstallmentDto$inboundSchema,
16
16
  } from "./installmentdto.js";
17
+ import {
18
+ NetworkPurchaseInfo,
19
+ NetworkPurchaseInfo$inboundSchema,
20
+ } from "./networkpurchaseinfo.js";
17
21
  import {
18
22
  OriginationBalancesDto,
19
23
  OriginationBalancesDto$inboundSchema,
@@ -199,6 +203,10 @@ export type OriginationDto = {
199
203
  * Date the origination was sold, if applicable. Absent on originations that have not been sold.
200
204
  */
201
205
  saleDate?: Date | undefined;
206
+ /**
207
+ * Net Terms network purchase details. Present only on loans from network programs.
208
+ */
209
+ networkPurchase?: NetworkPurchaseInfo | undefined;
202
210
  /**
203
211
  * Timestamp of when the origination was created.
204
212
  */
@@ -336,6 +344,7 @@ export const OriginationDto$inboundSchema: z.ZodType<
336
344
  cadence: types.optional(OriginationDtoCadence$inboundSchema),
337
345
  offer: types.optional(types.string()),
338
346
  sale_date: types.optional(types.date()),
347
+ network_purchase: types.optional(NetworkPurchaseInfo$inboundSchema),
339
348
  created_at: types.date(),
340
349
  updated_at: types.date(),
341
350
  }).transform((v) => {
@@ -353,6 +362,7 @@ export const OriginationDto$inboundSchema: z.ZodType<
353
362
  "payment_intent_pdf_file": "paymentIntentPdfFile",
354
363
  "repayment_financial_account": "repaymentFinancialAccount",
355
364
  "sale_date": "saleDate",
365
+ "network_purchase": "networkPurchase",
356
366
  "created_at": "createdAt",
357
367
  "updated_at": "updatedAt",
358
368
  });
@@ -139,11 +139,11 @@ export type PaymentInformationDto = {
139
139
  /**
140
140
  * The date when the payment information was created
141
141
  */
142
- createdAt: Date;
142
+ createdAt?: Date | undefined;
143
143
  /**
144
144
  * The date when the payment information was last updated
145
145
  */
146
- updatedAt: Date;
146
+ updatedAt?: Date | undefined;
147
147
  };
148
148
 
149
149
  /** @internal */
@@ -185,8 +185,8 @@ export const PaymentInformationDto$inboundSchema: z.ZodType<
185
185
  ),
186
186
  third_party_transfer_id: types.optional(types.string()),
187
187
  error_message: types.optional(types.string()),
188
- created_at: types.date(),
189
- updated_at: types.date(),
188
+ created_at: types.optional(types.date()),
189
+ updated_at: types.optional(types.date()),
190
190
  }).transform((v) => {
191
191
  return remap$(v, {
192
192
  "payment_intent": "paymentIntent",
@@ -10,7 +10,7 @@ import * as types from "../types/primitives.js";
10
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
11
11
 
12
12
  /**
13
- * Additional data
13
+ * Component bundle and branding data. Includes a `branding_configuration` object with the partner branding.
14
14
  */
15
15
  export type PlatformComponentsDtoData = {};
16
16
 
@@ -28,7 +28,7 @@ export type PlatformComponentsDto = {
28
28
  */
29
29
  id: string;
30
30
  /**
31
- * Additional data
31
+ * Component bundle and branding data. Includes a `branding_configuration` object with the partner branding.
32
32
  */
33
33
  data: PlatformComponentsDtoData;
34
34
  };
@@ -46,18 +46,6 @@ export type PlatformSettingsDto = {
46
46
  * Platform ID associated with these settings
47
47
  */
48
48
  platform: string;
49
- /**
50
- * Primary brand color
51
- */
52
- primaryColor?: string | undefined;
53
- /**
54
- * Secondary brand color
55
- */
56
- secondaryColor?: string | undefined;
57
- /**
58
- * Logo URL
59
- */
60
- logoUrl?: string | undefined;
61
49
  /**
62
50
  * Webhook URL for notifications
63
51
  */
@@ -241,9 +229,6 @@ export const PlatformSettingsDto$inboundSchema: z.ZodType<
241
229
  object: types.string(),
242
230
  id: types.string(),
243
231
  platform: types.string(),
244
- primary_color: types.optional(types.string()),
245
- secondary_color: types.optional(types.string()),
246
- logo_url: types.optional(types.string()),
247
232
  webhook_url: types.optional(types.string()),
248
233
  stripe_account: types.optional(types.string()),
249
234
  stripe_api_key: types.optional(types.string()),
@@ -299,9 +284,6 @@ export const PlatformSettingsDto$inboundSchema: z.ZodType<
299
284
  updated_at: types.optional(types.date()),
300
285
  }).transform((v) => {
301
286
  return remap$(v, {
302
- "primary_color": "primaryColor",
303
- "secondary_color": "secondaryColor",
304
- "logo_url": "logoUrl",
305
287
  "webhook_url": "webhookUrl",
306
288
  "stripe_account": "stripeAccount",
307
289
  "stripe_api_key": "stripeApiKey",
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+
8
+ export type UpdateLedgerEntryDto = {
9
+ /**
10
+ * Updated amount of the ledger entry, in cents. Must be a positive integer.
11
+ */
12
+ amount?: number | undefined;
13
+ /**
14
+ * Amount that has been paid for this ledger entry, in cents. Must be a positive integer.
15
+ */
16
+ paidAmount?: number | undefined;
17
+ /**
18
+ * Updated date when the ledger entry is due (ISO 8601 format).
19
+ */
20
+ dueDate?: string | undefined;
21
+ /**
22
+ * Date when the ledger entry was paid (ISO 8601 format).
23
+ */
24
+ paymentDate?: string | undefined;
25
+ /**
26
+ * Date when the ledger entry was created (ISO 8601 format).
27
+ */
28
+ createdDate?: string | undefined;
29
+ /**
30
+ * Ledger entry approved by Payor.
31
+ */
32
+ approvedByPayor?: boolean | undefined;
33
+ /**
34
+ * Updated textual description of the ledger entry.
35
+ */
36
+ description?: string | undefined;
37
+ /**
38
+ * Updated Mongo ID of the payor organization.
39
+ */
40
+ payor?: string | undefined;
41
+ /**
42
+ * Updated Mongo ID of the payee organization.
43
+ */
44
+ payee?: string | undefined;
45
+ };
46
+
47
+ /** @internal */
48
+ export type UpdateLedgerEntryDto$Outbound = {
49
+ amount?: number | undefined;
50
+ paid_amount?: number | undefined;
51
+ due_date?: string | undefined;
52
+ payment_date?: string | undefined;
53
+ created_date?: string | undefined;
54
+ approved_by_payor?: boolean | undefined;
55
+ description?: string | undefined;
56
+ payor?: string | undefined;
57
+ payee?: string | undefined;
58
+ };
59
+
60
+ /** @internal */
61
+ export const UpdateLedgerEntryDto$outboundSchema: z.ZodType<
62
+ UpdateLedgerEntryDto$Outbound,
63
+ z.ZodTypeDef,
64
+ UpdateLedgerEntryDto
65
+ > = z.object({
66
+ amount: z.number().optional(),
67
+ paidAmount: z.number().optional(),
68
+ dueDate: z.string().optional(),
69
+ paymentDate: z.string().optional(),
70
+ createdDate: z.string().optional(),
71
+ approvedByPayor: z.boolean().optional(),
72
+ description: z.string().optional(),
73
+ payor: z.string().optional(),
74
+ payee: z.string().optional(),
75
+ }).transform((v) => {
76
+ return remap$(v, {
77
+ paidAmount: "paid_amount",
78
+ dueDate: "due_date",
79
+ paymentDate: "payment_date",
80
+ createdDate: "created_date",
81
+ approvedByPayor: "approved_by_payor",
82
+ });
83
+ });
84
+
85
+ export function updateLedgerEntryDtoToJSON(
86
+ updateLedgerEntryDto: UpdateLedgerEntryDto,
87
+ ): string {
88
+ return JSON.stringify(
89
+ UpdateLedgerEntryDto$outboundSchema.parse(updateLedgerEntryDto),
90
+ );
91
+ }
@@ -4,6 +4,11 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
+ import {
8
+ NetworkPurchaseInfo,
9
+ NetworkPurchaseInfo$Outbound,
10
+ NetworkPurchaseInfo$outboundSchema,
11
+ } from "./networkpurchaseinfo.js";
7
12
 
8
13
  export type UpdateOriginationDto = {
9
14
  /**
@@ -22,6 +27,10 @@ export type UpdateOriginationDto = {
22
27
  * URL to an invoice PDF
23
28
  */
24
29
  invoicePdfUrl?: string | undefined;
30
+ /**
31
+ * Net Terms network purchase details. Updatable by INTERNAL scopes only, and only before funding (or for non-cash funded loans, before the first payment is received).
32
+ */
33
+ networkPurchase?: NetworkPurchaseInfo | undefined;
25
34
  };
26
35
 
27
36
  /** @internal */
@@ -30,6 +39,7 @@ export type UpdateOriginationDto$Outbound = {
30
39
  repayment_financial_account?: string | undefined;
31
40
  scheduled_repayment_date?: number | undefined;
32
41
  invoice_pdf_url?: string | undefined;
42
+ network_purchase?: NetworkPurchaseInfo$Outbound | undefined;
33
43
  };
34
44
 
35
45
  /** @internal */
@@ -42,12 +52,14 @@ export const UpdateOriginationDto$outboundSchema: z.ZodType<
42
52
  repaymentFinancialAccount: z.string().optional(),
43
53
  scheduledRepaymentDate: z.number().optional(),
44
54
  invoicePdfUrl: z.string().optional(),
55
+ networkPurchase: NetworkPurchaseInfo$outboundSchema.optional(),
45
56
  }).transform((v) => {
46
57
  return remap$(v, {
47
58
  fundingFinancialAccount: "funding_financial_account",
48
59
  repaymentFinancialAccount: "repayment_financial_account",
49
60
  scheduledRepaymentDate: "scheduled_repayment_date",
50
61
  invoicePdfUrl: "invoice_pdf_url",
62
+ networkPurchase: "network_purchase",
51
63
  });
52
64
  });
53
65
 
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { ledgerEntriesCreate } from "../funcs/ledgerEntriesCreate.js";
6
+ import { ledgerEntriesGet } from "../funcs/ledgerEntriesGet.js";
7
+ import { ledgerEntriesUpdate } from "../funcs/ledgerEntriesUpdate.js";
8
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
9
+ import * as models from "../models/index.js";
10
+ import * as operations from "../models/operations/index.js";
11
+ import { unwrapAsync } from "../types/fp.js";
12
+
13
+ export class LedgerEntries extends ClientSDK {
14
+ /**
15
+ * Create a new Ledger Entry
16
+ */
17
+ async create(
18
+ request: operations.LedgerEntriesControllerCreateRequest,
19
+ options?: RequestOptions,
20
+ ): Promise<models.LedgerEntryResponseDto> {
21
+ return unwrapAsync(ledgerEntriesCreate(
22
+ this,
23
+ request,
24
+ options,
25
+ ));
26
+ }
27
+
28
+ /**
29
+ * Retrieve a Ledger Entry by ID
30
+ */
31
+ async get(
32
+ request: operations.LedgerEntriesControllerFindOneRequest,
33
+ options?: RequestOptions,
34
+ ): Promise<models.LedgerEntryResponseDto> {
35
+ return unwrapAsync(ledgerEntriesGet(
36
+ this,
37
+ request,
38
+ options,
39
+ ));
40
+ }
41
+
42
+ /**
43
+ * Update a Ledger Entry by ID
44
+ */
45
+ async update(
46
+ request: operations.LedgerEntriesControllerUpdateRequest,
47
+ options?: RequestOptions,
48
+ ): Promise<models.LedgerEntryResponseDto> {
49
+ return unwrapAsync(ledgerEntriesUpdate(
50
+ this,
51
+ request,
52
+ options,
53
+ ));
54
+ }
55
+ }
@@ -18,7 +18,7 @@ export class OnboardingTerms extends ClientSDK {
18
18
  * Create an onboarding terms acceptance for a business
19
19
  *
20
20
  * @remarks
21
- * Creates a new agreement assignment record for the given business. The acceptance source is always recorded as `PARTNER_API`. The caller MUST send `user_accepted` to attest whether the borrower actually accepted the terms. A webhook event `agreement_acceptance.created` is emitted to the partner's configured webhook endpoint.
21
+ * Creates a new agreement assignment record for the given business. The acceptance source is always recorded as `PARTNER_API`. The caller MAY send `user_accepted` to attest whether the borrower actually accepted the terms; it defaults to true when omitted. A webhook event `agreement_acceptance.created` is emitted to the partner's configured webhook endpoint.
22
22
  */
23
23
  async create(
24
24
  request: operations.BusinessAgreementAssignmentsControllerCreateRequest,
@@ -72,7 +72,7 @@ export class OnboardingTerms extends ClientSDK {
72
72
  * Create a new onboarding terms assignment record
73
73
  *
74
74
  * @remarks
75
- * Creates a new agreement assignment record. When a business entity accepts onboarding terms (via hosted flow or embedded component), a webhook event `agreement_acceptance.created` is automatically emitted to the partner's configured webhook endpoint. The event payload includes the business external ID, timestamp of acceptance, terms version identifier, and terms file URL.
75
+ * Creates a new agreement assignment record. When a business entity accepts onboarding terms (via hosted flow or embedded component), a webhook event `agreement_acceptance.created` is automatically emitted to the partner's configured webhook endpoint. The event payload includes the business Mongo id, timestamp of acceptance, and terms version identifier.
76
76
  */
77
77
  async agreementAssignmentInternalControllerCreate(
78
78
  request: models.CreateAgreementAssignmentDto,
package/src/sdk/sdk.ts CHANGED
@@ -23,6 +23,7 @@ import { FinancialAccounts } from "./financialaccounts.js";
23
23
  import { Holds } from "./holds.js";
24
24
  import { IncreaseTransactions } from "./increasetransactions.js";
25
25
  import { InternalProgramSettings } from "./internalprogramsettings.js";
26
+ import { LedgerEntries } from "./ledgerentries.js";
26
27
  import { OnboardingTerms } from "./onboardingterms.js";
27
28
  import { Originations } from "./originations.js";
28
29
  import { PaymentIntents } from "./paymentintents.js";
@@ -53,6 +54,11 @@ import {
53
54
  // #endregion imports
54
55
 
55
56
  export class OatFiSDK extends ClientSDK {
57
+ private _onboardingTerms?: OnboardingTerms;
58
+ get onboardingTerms(): OnboardingTerms {
59
+ return (this._onboardingTerms ??= new OnboardingTerms(this._options));
60
+ }
61
+
56
62
  private _businesses?: Businesses;
57
63
  get businesses(): Businesses {
58
64
  return (this._businesses ??= new Businesses(this._options));
@@ -198,11 +204,6 @@ export class OatFiSDK extends ClientSDK {
198
204
  ));
199
205
  }
200
206
 
201
- private _onboardingTerms?: OnboardingTerms;
202
- get onboardingTerms(): OnboardingTerms {
203
- return (this._onboardingTerms ??= new OnboardingTerms(this._options));
204
- }
205
-
206
207
  private _stateDisclosures?: StateDisclosures;
207
208
  get stateDisclosures(): StateDisclosures {
208
209
  return (this._stateDisclosures ??= new StateDisclosures(this._options));
@@ -253,6 +254,11 @@ export class OatFiSDK extends ClientSDK {
253
254
  ));
254
255
  }
255
256
 
257
+ private _ledgerEntries?: LedgerEntries;
258
+ get ledgerEntries(): LedgerEntries {
259
+ return (this._ledgerEntries ??= new LedgerEntries(this._options));
260
+ }
261
+
256
262
  // #region sdk-class-body
257
263
 
258
264
  /**
@@ -1,105 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import dotenv from "dotenv";
6
- dotenv.config();
7
- /**
8
- * Example usage of the @oatfi/oatfi-sdk-ts SDK
9
- *
10
- * To run this example from the examples directory:
11
- * npm run build && npx tsx businessesCreate.example.ts
12
- */
13
-
14
- import { OatFiSDK } from "@oatfi/oatfi-sdk-ts";
15
-
16
- const oatFiSDK = new OatFiSDK({
17
- bearer: process.env["OATFISDK_BEARER"] ?? "",
18
- });
19
-
20
- async function main() {
21
- const result = await oatFiSDK.businesses.create({
22
- idempotencyKey: "<value>",
23
- createBusinessDto: {
24
- externalId: "ext_123456",
25
- name: "Acme Corporation",
26
- dbaName: "Acme",
27
- taxId: "123456789",
28
- address: {
29
- line1: "123 Main St",
30
- line2: "Suite 100",
31
- city: "San Francisco",
32
- state: "CA",
33
- postalCode: "94105",
34
- },
35
- contactFirstName: "John",
36
- contactLastName: "Doe",
37
- contactEmail: "john.doe@acme.com",
38
- contactPhone: "+14155552671",
39
- businessStartDateMonth: "January",
40
- businessStartDateYear: "2020",
41
- businessEntityType: "LLC",
42
- application: "507f1f77bcf86cd799439011",
43
- users: [
44
- "507f1f77bcf86cd799439011",
45
- "507f1f77bcf86cd799439012",
46
- ],
47
- primaryUser: "507f1f77bcf86cd799439011",
48
- achToken: "ACH20c64a3d71cb-4400-8225-6d19918aa183",
49
- webhookUrl: "https://my.webhook.com/post",
50
- plaidToken: "20c64a3d-71cb-4400-8225-6d19918aa183",
51
- plaidTokens: [
52
- {
53
- alias: "Default Token",
54
- token: "access-sandbox-43bb37eb-954c-45e8-b0be-391b1d2c06fc",
55
- },
56
- ],
57
- heronId: "heron_123456",
58
- paymentSettings: [
59
- {
60
- partner: "62eaf2133147bd1b70da07d2",
61
- business: "62eaf2133147bd1b70da07d2",
62
- data: {
63
- accountId: "acct_1J876rQjaww8b42s",
64
- customerId: "cus_sdfsdfsd1J876rQjawghghw8b42s",
65
- paymentMethodId: "pm_ssej45jawghghw8b42s",
66
- accountNumber: "21565234545",
67
- routingNumber: "1572515454",
68
- directDebitAuthorization:
69
- "{\"authorized\": true, \"type\": \"PLAID\", \"account_id\": \"000123456789\", \"owner\": \"Business Owner\", \"created_at\": \"2023-01-01T00:00:00.000Z\"}",
70
- fundingSourceId:
71
- "H6U1rvcYcDybNwKykiyM28of0mPdOnh9yCJPIa5MJEdSRD5846",
72
- moovPaymentMethodId: "0ff91950-3333-4444-5555-b071f5550795",
73
- unitAccountId: "21565234545",
74
- swiftCode: "1572515454",
75
- remittanceInformation: "Payment for {year}-{month}-{day}",
76
- lockboxAddress: "123 Main St",
77
- accountNumberId: "account_number_i6kffj1pvwhmhi7okasb",
78
- oatfiAccountNumber: "21565234545",
79
- oatfiRoutingNumber: "21565234545",
80
- },
81
- scheduledRepayment: false,
82
- isDefault: true,
83
- type: "UNIT",
84
- },
85
- ],
86
- codatCompanyId: "20c64a3d-71cb-4400-8225-6d19918aa183",
87
- consumerInvoices: false,
88
- onboardingSource: "API",
89
- requestedLimitSource: "Customer",
90
- requestedCreditLimit: 10000,
91
- metadata: {
92
- mcNumber: "20c64a3d-71cb-4400-8225-6d19918aa183",
93
- avgMonthlySpend: "10000",
94
- orderProductSelection: "20c64a3d-71cb-4400-8225-6d19918aa183",
95
- requestedCreditLimit: 10000,
96
- plaidData: "{\"accounts\":[...],\"institution\":{...}}",
97
- annualRevenue: 100000000,
98
- },
99
- },
100
- });
101
-
102
- console.log(result);
103
- }
104
-
105
- main().catch(console.error);