@dalmore/api-contracts 1.0.1 → 1.0.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 (304) hide show
  1. package/README.md +12 -7
  2. package/clients/index.mjs +10970 -0
  3. package/compliance/index.mjs +20016 -0
  4. package/compliance-apikey/index.mjs +9795 -0
  5. package/helpers/index.mjs +146 -0
  6. package/index.mjs +28607 -0
  7. package/investors/index.mjs +12844 -0
  8. package/issuers/index.mjs +16168 -0
  9. package/package.json +42 -31
  10. package/secondaries/index.mjs +10282 -0
  11. package/src/common/helpers/index.ts +205 -0
  12. package/{common → src/common}/types/batch-jobs.types.ts +0 -1
  13. package/{common → src/common}/types/common.types.ts +1 -1
  14. package/src/common/types/contract-helpers.ts +205 -0
  15. package/{common → src/common}/types/page.types.ts +1 -1
  16. package/{common → src/common}/types/queue.types.ts +0 -1
  17. package/{common → src/common}/types/trade.types.ts +4 -2
  18. package/{common → src/common}/types/zip.type.ts +1 -1
  19. package/types/index.mjs +10320 -0
  20. package/common/helpers/index.ts +0 -88
  21. package/common/types/contract-helpers.ts +0 -88
  22. package/common/types/reminder-config.types.ts +0 -40
  23. /package/{common → src/common}/types/account-contact.types.ts +0 -0
  24. /package/{common → src/common}/types/account-detail.types.ts +0 -0
  25. /package/{common → src/common}/types/account-integration.types.ts +0 -0
  26. /package/{common → src/common}/types/account-manager.types.ts +0 -0
  27. /package/{common → src/common}/types/account.types.ts +0 -0
  28. /package/{common → src/common}/types/activity.types.ts +0 -0
  29. /package/{common → src/common}/types/address.types.ts +0 -0
  30. /package/{common → src/common}/types/aic.types.ts +0 -0
  31. /package/{common → src/common}/types/aml.types.ts +0 -0
  32. /package/{common → src/common}/types/api-key-logs.types.ts +0 -0
  33. /package/{common → src/common}/types/api-keys.types.ts +0 -0
  34. /package/{common → src/common}/types/asset.types.ts +0 -0
  35. /package/{common → src/common}/types/auth.types.ts +0 -0
  36. /package/{common → src/common}/types/bonus-tier.types.ts +0 -0
  37. /package/{common → src/common}/types/cart.types.ts +0 -0
  38. /package/{common → src/common}/types/checklist-items.types.ts +0 -0
  39. /package/{common → src/common}/types/checklist.types.ts +0 -0
  40. /package/{common → src/common}/types/comply-advantage-api.types.ts +0 -0
  41. /package/{common → src/common}/types/comply-advantage.types.ts +0 -0
  42. /package/{common → src/common}/types/contact-us.types.ts +0 -0
  43. /package/{common → src/common}/types/countries.types.ts +0 -0
  44. /package/{common → src/common}/types/covered-person.types.ts +0 -0
  45. /package/{common → src/common}/types/dashboard.types.ts +0 -0
  46. /package/{common → src/common}/types/data-record.types.ts +0 -0
  47. /package/{common → src/common}/types/data-room.types.ts +0 -0
  48. /package/{common → src/common}/types/default-theme-config.types.ts +0 -0
  49. /package/{common → src/common}/types/disbursement-adjustment.types.ts +0 -0
  50. /package/{common → src/common}/types/disbursement-approval-user.types.ts +0 -0
  51. /package/{common → src/common}/types/disbursement-review.types.ts +0 -0
  52. /package/{common → src/common}/types/disbursement-transaction.types.ts +0 -0
  53. /package/{common → src/common}/types/disbursements.types.ts +0 -0
  54. /package/{common → src/common}/types/domain-filter.types.ts +0 -0
  55. /package/{common → src/common}/types/email-theme.types.ts +0 -0
  56. /package/{common → src/common}/types/entity.types.ts +0 -0
  57. /package/{common → src/common}/types/error-responses.types.ts +0 -0
  58. /package/{common → src/common}/types/escrow-account.types.ts +0 -0
  59. /package/{common → src/common}/types/exchange-api-key.types.ts +0 -0
  60. /package/{common → src/common}/types/exchange-import.types.ts +0 -0
  61. /package/{common → src/common}/types/exchange-provider.types.ts +0 -0
  62. /package/{common → src/common}/types/file.types.ts +0 -0
  63. /package/{common → src/common}/types/health.types.ts +0 -0
  64. /package/{common → src/common}/types/index.ts +0 -0
  65. /package/{common → src/common}/types/individuals.types.ts +0 -0
  66. /package/{common → src/common}/types/investor-account.types.ts +0 -0
  67. /package/{common → src/common}/types/investorAccountIdSchema.type.ts +0 -0
  68. /package/{common → src/common}/types/investors-offering.types.ts +0 -0
  69. /package/{common → src/common}/types/invite.types.ts +0 -0
  70. /package/{common → src/common}/types/issuer-bank-account.types.ts +0 -0
  71. /package/{common → src/common}/types/issuer-offering.types.ts +0 -0
  72. /package/{common → src/common}/types/issuer-payment-method.types.ts +0 -0
  73. /package/{common → src/common}/types/issuer.types.ts +0 -0
  74. /package/{common → src/common}/types/job-item.types.ts +0 -0
  75. /package/{common → src/common}/types/jobs.types.ts +0 -0
  76. /package/{common → src/common}/types/kyb.types.ts +0 -0
  77. /package/{common → src/common}/types/kyc.types.ts +0 -0
  78. /package/{common → src/common}/types/legal-entity.types.ts +0 -0
  79. /package/{common → src/common}/types/login-history.types.ts +0 -0
  80. /package/{common → src/common}/types/mail-template.types.ts +0 -0
  81. /package/{common → src/common}/types/north-cap-integration.types.ts +0 -0
  82. /package/{common → src/common}/types/note.types.ts +0 -0
  83. /package/{common → src/common}/types/notification.types.ts +0 -0
  84. /package/{common → src/common}/types/notion-api.types.ts +0 -0
  85. /package/{common → src/common}/types/notion-database.types.ts +0 -0
  86. /package/{common → src/common}/types/notion-page.types.ts +0 -0
  87. /package/{common → src/common}/types/offering-reports.types.ts +0 -0
  88. /package/{common → src/common}/types/offering-submission.types.ts +0 -0
  89. /package/{common → src/common}/types/offering.types.ts +0 -0
  90. /package/{common → src/common}/types/page-revision.types.ts +0 -0
  91. /package/{common → src/common}/types/password.type.ts +0 -0
  92. /package/{common → src/common}/types/payment-methods.types.ts +0 -0
  93. /package/{common → src/common}/types/phone.type.ts +0 -0
  94. /package/{common → src/common}/types/portfolio.types.ts +0 -0
  95. /package/{common → src/common}/types/privacy-policy-and-tos.types.ts +0 -0
  96. /package/{common → src/common}/types/registered-reps.types.ts +0 -0
  97. /package/{common → src/common}/types/rejection-reasons.types.ts +0 -0
  98. /package/{common → src/common}/types/review.types.ts +0 -0
  99. /package/{common → src/common}/types/role.types.ts +0 -0
  100. /package/{common → src/common}/types/secondary-customer.types.ts +0 -0
  101. /package/{common → src/common}/types/secondary-issuer.types.ts +0 -0
  102. /package/{common → src/common}/types/secondary-order.types.ts +0 -0
  103. /package/{common → src/common}/types/secondary-security.types.ts +0 -0
  104. /package/{common → src/common}/types/secondary-trade.entity.ts +0 -0
  105. /package/{common → src/common}/types/secondary-trade.types.ts +0 -0
  106. /package/{common → src/common}/types/secure-request.types.ts +0 -0
  107. /package/{common → src/common}/types/signer.types.ts +0 -0
  108. /package/{common → src/common}/types/site-link.types.ts +0 -0
  109. /package/{common → src/common}/types/site-settings.types.ts +0 -0
  110. /package/{common → src/common}/types/site.types.ts +0 -0
  111. /package/{common → src/common}/types/sms.types.ts +0 -0
  112. /package/{common → src/common}/types/state-machine.types.ts +0 -0
  113. /package/{common → src/common}/types/states.types.ts +0 -0
  114. /package/{common → src/common}/types/subdoc-preview.types.ts +0 -0
  115. /package/{common → src/common}/types/task.types.ts +0 -0
  116. /package/{common → src/common}/types/trade-adjustment.type.ts +0 -0
  117. /package/{common → src/common}/types/trade-line-item.type.ts +0 -0
  118. /package/{common → src/common}/types/transaction.types.ts +0 -0
  119. /package/{common → src/common}/types/trusted-contact.types.ts +0 -0
  120. /package/{common → src/common}/types/typography.types.ts +0 -0
  121. /package/{common → src/common}/types/user-manual.types.ts +0 -0
  122. /package/{common → src/common}/types/user-setting.types.ts +0 -0
  123. /package/{common → src/common}/types/user.types.ts +0 -0
  124. /package/{common → src/common}/types/webhook.types.ts +0 -0
  125. /package/{contracts → src/contracts}/clients/accounts/index.ts +0 -0
  126. /package/{contracts → src/contracts}/clients/aic/index.ts +0 -0
  127. /package/{contracts → src/contracts}/clients/api-key-logs/index.ts +0 -0
  128. /package/{contracts → src/contracts}/clients/api-keys/index.ts +0 -0
  129. /package/{contracts → src/contracts}/clients/assets/index.ts +0 -0
  130. /package/{contracts → src/contracts}/clients/auth/index.ts +0 -0
  131. /package/{contracts → src/contracts}/clients/files/index.ts +0 -0
  132. /package/{contracts → src/contracts}/clients/files-public/index.ts +0 -0
  133. /package/{contracts → src/contracts}/clients/index.ts +0 -0
  134. /package/{contracts → src/contracts}/clients/individuals/index.ts +0 -0
  135. /package/{contracts → src/contracts}/clients/investor-accounts/index.ts +0 -0
  136. /package/{contracts → src/contracts}/clients/issuers/index.ts +0 -0
  137. /package/{contracts → src/contracts}/clients/legal-entities/index.ts +0 -0
  138. /package/{contracts → src/contracts}/clients/offerings/index.ts +0 -0
  139. /package/{contracts → src/contracts}/clients/secure-requests/index.ts +0 -0
  140. /package/{contracts → src/contracts}/clients/sites/index.ts +0 -0
  141. /package/{contracts → src/contracts}/clients/trades/index.ts +0 -0
  142. /package/{contracts → src/contracts}/compliance/account-contacts/index.ts +0 -0
  143. /package/{contracts → src/contracts}/compliance/account-managers/index.ts +0 -0
  144. /package/{contracts → src/contracts}/compliance/accounts/index.ts +0 -0
  145. /package/{contracts → src/contracts}/compliance/activities/index.ts +0 -0
  146. /package/{contracts → src/contracts}/compliance/aic/index.ts +0 -0
  147. /package/{contracts → src/contracts}/compliance/api-keys/index.ts +0 -0
  148. /package/{contracts → src/contracts}/compliance/assets/index.ts +0 -0
  149. /package/{contracts → src/contracts}/compliance/auth/index.ts +0 -0
  150. /package/{contracts → src/contracts}/compliance/batch-jobs/index.ts +0 -0
  151. /package/{contracts → src/contracts}/compliance/bonus-tiers/index.ts +0 -0
  152. /package/{contracts → src/contracts}/compliance/checklist/index.ts +0 -0
  153. /package/{contracts → src/contracts}/compliance/checklist-items/index.ts +0 -0
  154. /package/{contracts → src/contracts}/compliance/covered-persons/index.ts +0 -0
  155. /package/{contracts → src/contracts}/compliance/dashboard/index.ts +0 -0
  156. /package/{contracts → src/contracts}/compliance/data-records/index.ts +0 -0
  157. /package/{contracts → src/contracts}/compliance/data-rooms/index.ts +0 -0
  158. /package/{contracts → src/contracts}/compliance/default-theme-configs/index.ts +0 -0
  159. /package/{contracts → src/contracts}/compliance/disbursement/index.ts +0 -0
  160. /package/{contracts → src/contracts}/compliance/disbursement-approval-users/index.ts +0 -0
  161. /package/{contracts → src/contracts}/compliance/disbursement-transactions/index.ts +0 -0
  162. /package/{contracts → src/contracts}/compliance/domain-filters/index.ts +0 -0
  163. /package/{contracts → src/contracts}/compliance/email-themes/index.ts +0 -0
  164. /package/{contracts → src/contracts}/compliance/escrow-accounts/index.ts +0 -0
  165. /package/{contracts → src/contracts}/compliance/exchange-api-keys/index.ts +0 -0
  166. /package/{contracts → src/contracts}/compliance/exchange-imports/index.ts +0 -0
  167. /package/{contracts → src/contracts}/compliance/files/index.ts +0 -0
  168. /package/{contracts → src/contracts}/compliance/files-public/index.ts +0 -0
  169. /package/{contracts → src/contracts}/compliance/health/index.ts +0 -0
  170. /package/{contracts → src/contracts}/compliance/index.ts +0 -0
  171. /package/{contracts → src/contracts}/compliance/individuals/index.ts +0 -0
  172. /package/{contracts → src/contracts}/compliance/investor-accounts/index.ts +0 -0
  173. /package/{contracts → src/contracts}/compliance/invites/index.ts +0 -0
  174. /package/{contracts → src/contracts}/compliance/issuer-bank-accounts/index.ts +0 -0
  175. /package/{contracts → src/contracts}/compliance/issuer-payment-methods/index.ts +0 -0
  176. /package/{contracts → src/contracts}/compliance/issuers/index.ts +0 -0
  177. /package/{contracts → src/contracts}/compliance/job-items/index.ts +0 -0
  178. /package/{contracts → src/contracts}/compliance/jobs/index.ts +0 -0
  179. /package/{contracts → src/contracts}/compliance/kyb/index.ts +0 -0
  180. /package/{contracts → src/contracts}/compliance/kyc/index.ts +0 -0
  181. /package/{contracts → src/contracts}/compliance/legal-entities/index.ts +0 -0
  182. /package/{contracts → src/contracts}/compliance/login-histories/index.ts +0 -0
  183. /package/{contracts → src/contracts}/compliance/notes/index.ts +0 -0
  184. /package/{contracts → src/contracts}/compliance/notion-databases/index.ts +0 -0
  185. /package/{contracts → src/contracts}/compliance/notion-pages/index.ts +0 -0
  186. /package/{contracts → src/contracts}/compliance/offering-reports/index.ts +0 -0
  187. /package/{contracts → src/contracts}/compliance/offerings/index.ts +0 -0
  188. /package/{contracts → src/contracts}/compliance/pages/index.ts +0 -0
  189. /package/{contracts → src/contracts}/compliance/payment-methods/index.ts +0 -0
  190. /package/{contracts → src/contracts}/compliance/rejection-reasons/index.ts +0 -0
  191. /package/{contracts → src/contracts}/compliance/review/index.ts +0 -0
  192. /package/{contracts → src/contracts}/compliance/roles/index.ts +0 -0
  193. /package/{contracts → src/contracts}/compliance/secondary-customers/index.ts +0 -0
  194. /package/{contracts → src/contracts}/compliance/secondary-orders/index.ts +0 -0
  195. /package/{contracts → src/contracts}/compliance/secondary-trades/index.ts +0 -0
  196. /package/{contracts → src/contracts}/compliance/secure-requests/index.ts +0 -0
  197. /package/{contracts → src/contracts}/compliance/signer/index.ts +0 -0
  198. /package/{contracts → src/contracts}/compliance/site-links/index.ts +0 -0
  199. /package/{contracts → src/contracts}/compliance/site-settings/index.ts +0 -0
  200. /package/{contracts → src/contracts}/compliance/sites/index.ts +0 -0
  201. /package/{contracts → src/contracts}/compliance/state-machine/index.ts +0 -0
  202. /package/{contracts → src/contracts}/compliance/tasks/index.ts +0 -0
  203. /package/{contracts → src/contracts}/compliance/third-parties/index.ts +0 -0
  204. /package/{contracts → src/contracts}/compliance/trade-line-items/index.ts +0 -0
  205. /package/{contracts → src/contracts}/compliance/trades/index.ts +0 -0
  206. /package/{contracts → src/contracts}/compliance/transactions/index.ts +0 -0
  207. /package/{contracts → src/contracts}/compliance/user-manuals/index.ts +0 -0
  208. /package/{contracts → src/contracts}/compliance/user-settings/index.ts +0 -0
  209. /package/{contracts → src/contracts}/compliance/users/index.ts +0 -0
  210. /package/{contracts → src/contracts}/compliance/webhooks/index.ts +0 -0
  211. /package/{contracts → src/contracts}/compliance-apikey/accounts/index.ts +0 -0
  212. /package/{contracts → src/contracts}/compliance-apikey/index.ts +0 -0
  213. /package/{contracts → src/contracts}/index.ts +0 -0
  214. /package/{contracts → src/contracts}/investors/account-contacts/index.ts +0 -0
  215. /package/{contracts → src/contracts}/investors/aic/index.ts +0 -0
  216. /package/{contracts → src/contracts}/investors/assets/index.ts +0 -0
  217. /package/{contracts → src/contracts}/investors/auth/index.ts +0 -0
  218. /package/{contracts → src/contracts}/investors/bonus-tiers/index.ts +0 -0
  219. /package/{contracts → src/contracts}/investors/cart/index.ts +0 -0
  220. /package/{contracts → src/contracts}/investors/contact-us/index.ts +0 -0
  221. /package/{contracts → src/contracts}/investors/data-records/index.ts +0 -0
  222. /package/{contracts → src/contracts}/investors/data-rooms/index.ts +0 -0
  223. /package/{contracts → src/contracts}/investors/files/index.ts +0 -0
  224. /package/{contracts → src/contracts}/investors/files-public/index.ts +0 -0
  225. /package/{contracts → src/contracts}/investors/index.ts +0 -0
  226. /package/{contracts → src/contracts}/investors/individuals/index.ts +0 -0
  227. /package/{contracts → src/contracts}/investors/investor-accounts/index.ts +0 -0
  228. /package/{contracts → src/contracts}/investors/issuer-payment-methods/index.ts +0 -0
  229. /package/{contracts → src/contracts}/investors/issuers/index.ts +0 -0
  230. /package/{contracts → src/contracts}/investors/legal-entities/index.ts +0 -0
  231. /package/{contracts → src/contracts}/investors/notes/index.ts +0 -0
  232. /package/{contracts → src/contracts}/investors/offerings/index.ts +0 -0
  233. /package/{contracts → src/contracts}/investors/pages/index.ts +0 -0
  234. /package/{contracts → src/contracts}/investors/payment-methods/index.ts +0 -0
  235. /package/{contracts → src/contracts}/investors/portfolios/index.ts +0 -0
  236. /package/{contracts → src/contracts}/investors/sites/index.ts +0 -0
  237. /package/{contracts → src/contracts}/investors/tasks/index.ts +0 -0
  238. /package/{contracts → src/contracts}/investors/trade-line-items/index.ts +0 -0
  239. /package/{contracts → src/contracts}/investors/trades/index.ts +0 -0
  240. /package/{contracts → src/contracts}/investors/transactions/index.ts +0 -0
  241. /package/{contracts → src/contracts}/investors/trusted-contacts/index.ts +0 -0
  242. /package/{contracts → src/contracts}/investors/user-manuals/index.ts +0 -0
  243. /package/{contracts → src/contracts}/investors/user-settings/index.ts +0 -0
  244. /package/{contracts → src/contracts}/investors/users/index.ts +0 -0
  245. /package/{contracts → src/contracts}/investors/webhooks/index.ts +0 -0
  246. /package/{contracts → src/contracts}/issuers/account-contacts/index.ts +0 -0
  247. /package/{contracts → src/contracts}/issuers/account-integrations/index.ts +0 -0
  248. /package/{contracts → src/contracts}/issuers/accounts/index.ts +0 -0
  249. /package/{contracts → src/contracts}/issuers/activities/index.ts +0 -0
  250. /package/{contracts → src/contracts}/issuers/aic/index.ts +0 -0
  251. /package/{contracts → src/contracts}/issuers/api-key-logs/index.ts +0 -0
  252. /package/{contracts → src/contracts}/issuers/api-keys/index.ts +0 -0
  253. /package/{contracts → src/contracts}/issuers/assets/index.ts +0 -0
  254. /package/{contracts → src/contracts}/issuers/auth/index.ts +0 -0
  255. /package/{contracts → src/contracts}/issuers/bonus-tiers/index.ts +0 -0
  256. /package/{contracts → src/contracts}/issuers/contact-us/index.ts +0 -0
  257. /package/{contracts → src/contracts}/issuers/covered-persons/index.ts +0 -0
  258. /package/{contracts → src/contracts}/issuers/dashboard/index.ts +0 -0
  259. /package/{contracts → src/contracts}/issuers/data-records/index.ts +0 -0
  260. /package/{contracts → src/contracts}/issuers/data-rooms/index.ts +0 -0
  261. /package/{contracts → src/contracts}/issuers/disbursement-approval-users/index.ts +0 -0
  262. /package/{contracts → src/contracts}/issuers/disbursement-transactions/index.ts +0 -0
  263. /package/{contracts → src/contracts}/issuers/disbursements/index.ts +0 -0
  264. /package/{contracts → src/contracts}/issuers/email-themes/index.ts +0 -0
  265. /package/{contracts → src/contracts}/issuers/escrow-accounts/index.ts +0 -0
  266. /package/{contracts → src/contracts}/issuers/exchange-api-keys/index.ts +0 -0
  267. /package/{contracts → src/contracts}/issuers/files/index.ts +0 -0
  268. /package/{contracts → src/contracts}/issuers/files-public/index.ts +0 -0
  269. /package/{contracts → src/contracts}/issuers/health/index.ts +0 -0
  270. /package/{contracts → src/contracts}/issuers/index.ts +0 -0
  271. /package/{contracts → src/contracts}/issuers/investor-accounts/index.ts +0 -0
  272. /package/{contracts → src/contracts}/issuers/invites/index.ts +0 -0
  273. /package/{contracts → src/contracts}/issuers/issuer/index.ts +0 -0
  274. /package/{contracts → src/contracts}/issuers/issuer-bank-accounts/index.ts +0 -0
  275. /package/{contracts → src/contracts}/issuers/issuer-payment-methods/index.ts +0 -0
  276. /package/{contracts → src/contracts}/issuers/kyc/index.ts +0 -0
  277. /package/{contracts → src/contracts}/issuers/login-histories/index.ts +0 -0
  278. /package/{contracts → src/contracts}/issuers/notes/index.ts +0 -0
  279. /package/{contracts → src/contracts}/issuers/offerings/index.ts +0 -0
  280. /package/{contracts → src/contracts}/issuers/pages/index.ts +0 -0
  281. /package/{contracts → src/contracts}/issuers/payment-methods/index.ts +0 -0
  282. /package/{contracts → src/contracts}/issuers/portfolios/index.ts +0 -0
  283. /package/{contracts → src/contracts}/issuers/rejection-reasons/index.ts +0 -0
  284. /package/{contracts → src/contracts}/issuers/review/index.ts +0 -0
  285. /package/{contracts → src/contracts}/issuers/secondary-customers/index.ts +0 -0
  286. /package/{contracts → src/contracts}/issuers/secondary-orders/index.ts +0 -0
  287. /package/{contracts → src/contracts}/issuers/secondary-trades/index.ts +0 -0
  288. /package/{contracts → src/contracts}/issuers/secure-requests/index.ts +0 -0
  289. /package/{contracts → src/contracts}/issuers/site-links/index.ts +0 -0
  290. /package/{contracts → src/contracts}/issuers/site-settings/index.ts +0 -0
  291. /package/{contracts → src/contracts}/issuers/sites/index.ts +0 -0
  292. /package/{contracts → src/contracts}/issuers/tasks/index.ts +0 -0
  293. /package/{contracts → src/contracts}/issuers/trades/index.ts +0 -0
  294. /package/{contracts → src/contracts}/issuers/transactions/index.ts +0 -0
  295. /package/{contracts → src/contracts}/issuers/user-manuals/index.ts +0 -0
  296. /package/{contracts → src/contracts}/issuers/user-settings/index.ts +0 -0
  297. /package/{contracts → src/contracts}/issuers/users/index.ts +0 -0
  298. /package/{contracts → src/contracts}/secondaries/accounts/index.ts +0 -0
  299. /package/{contracts → src/contracts}/secondaries/index.ts +0 -0
  300. /package/{contracts → src/contracts}/secondaries/secondary-customers/index.ts +0 -0
  301. /package/{contracts → src/contracts}/secondaries/secondary-issuers/index.ts +0 -0
  302. /package/{contracts → src/contracts}/secondaries/secondary-orders/index.ts +0 -0
  303. /package/{contracts → src/contracts}/secondaries/secondary-securities/index.ts +0 -0
  304. /package/{contracts → src/contracts}/secondaries/secondary-trades/index.ts +0 -0
@@ -0,0 +1,205 @@
1
+ /**
2
+ * Contract helpers - minimal subset for API contracts package
3
+ * This file is copied directly to @dalmore/api-contracts
4
+ */
5
+ import { HttpStatus } from '@nestjs/common';
6
+ import parsePhoneNumberFromString, {
7
+ CountryCode,
8
+ PhoneNumber,
9
+ } from 'libphonenumber-js';
10
+ import { err, ok, Result } from 'neverthrow';
11
+ import { ErrorResult } from '../types/common.types';
12
+
13
+ /**
14
+ * Validates a US zip code format (12345 or 12345-6789)
15
+ */
16
+ export const validateUSZipCode = (zipCode: string): boolean => {
17
+ const regex = /^[0-9]{5}(?:-[0-9]{4})?$/;
18
+ return regex.test(zipCode);
19
+ };
20
+
21
+ /**
22
+ * Validates a Canadian postal code format (A1A 1A1)
23
+ */
24
+ export const validateCanadaZipCode = (zipCode: string): boolean => {
25
+ const regex = /^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/;
26
+ return regex.test(zipCode);
27
+ };
28
+
29
+ /**
30
+ * Normalizes a short date string (M/D/YY or M/D/YYYY) to MM/DD/YYYY format
31
+ */
32
+ export function normalizeShortDate(input: string): string {
33
+ const [month, day, year] = input.split('/');
34
+
35
+ if (!month || !day || !year) {
36
+ throw new Error('Invalid date format');
37
+ }
38
+
39
+ const paddedMonth = month.padStart(2, '0');
40
+ const paddedDay = day.padStart(2, '0');
41
+ const fullYear = year.length === 2 ? `20${year}` : year;
42
+
43
+ return `${paddedMonth}/${paddedDay}/${fullYear}`;
44
+ }
45
+
46
+ /**
47
+ * Converts a string into a URL-safe slug
48
+ */
49
+ export function slugify(input: string, exclude: boolean = false): string {
50
+ if (exclude) {
51
+ const excludeWords = ['llc', 'inc', 'corp', 'co'];
52
+ const negativeWordsList = [
53
+ 'www',
54
+ 'api',
55
+ 'admin',
56
+ 'dashboard',
57
+ 'auth',
58
+ 'cdn',
59
+ 'static',
60
+ 'blog',
61
+ 'support',
62
+ 'status',
63
+ 'mail',
64
+ 'smtp',
65
+ 'ftp',
66
+ 'ssh',
67
+ 'login',
68
+ 'register',
69
+ 'signup',
70
+ 'account',
71
+ 'accounts',
72
+ 'user',
73
+ 'users',
74
+ 'profile',
75
+ 'settings',
76
+ 'help',
77
+ 'docs',
78
+ 'documentation',
79
+ 'developer',
80
+ 'developers',
81
+ 'app',
82
+ 'apps',
83
+ 'test',
84
+ 'demo',
85
+ 'staging',
86
+ 'dev',
87
+ 'prod',
88
+ 'production',
89
+ 'beta',
90
+ 'alpha',
91
+ 'portal',
92
+ 'portals',
93
+ 'client',
94
+ 'clients',
95
+ 'investor',
96
+ 'investors',
97
+ 'issuer',
98
+ 'issuers',
99
+ 'compliance',
100
+ 'offering',
101
+ 'offerings',
102
+ 'trade',
103
+ 'trades',
104
+ ];
105
+
106
+ let slug = input
107
+ .toLowerCase()
108
+ .replace(/[^\w\s-]/g, '')
109
+ .replace(/[\s_-]+/g, '-')
110
+ .replace(/^-+|-+$/g, '');
111
+
112
+ excludeWords.forEach((word) => {
113
+ slug = slug.replace(new RegExp(`-${word}$`, 'i'), '');
114
+ });
115
+
116
+ if (negativeWordsList.includes(slug)) {
117
+ return 'new-account';
118
+ }
119
+
120
+ return slug;
121
+ }
122
+
123
+ return input
124
+ .toLowerCase()
125
+ .replace(/[^\w\s-]/g, '')
126
+ .replace(/[\s_-]+/g, '-')
127
+ .replace(/^-+|-+$/g, '');
128
+ }
129
+
130
+ type CurlOptions = {
131
+ query?: Record<string, string>;
132
+ headers?: Record<string, string>;
133
+ body?: Record<string, unknown>;
134
+ formData?: Record<string, string>;
135
+ };
136
+
137
+ export const authHeader: CurlOptions['headers'] = {
138
+ Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
139
+ };
140
+
141
+ const generateCurlExample = (
142
+ method: string,
143
+ path: string,
144
+ options: CurlOptions,
145
+ ) => {
146
+ const baseUrl = 'https://dalmore-client-portal-api-prod.onrender.com/api/v1';
147
+ let curl = `curl -X ${method.toUpperCase()} '${baseUrl}${path}`;
148
+ if (options.query) {
149
+ const queryString = new URLSearchParams(options.query).toString();
150
+ curl += `?${queryString}`;
151
+ }
152
+ curl += "'";
153
+ if (options.headers) {
154
+ Object.entries(options.headers).forEach(([key, value]) => {
155
+ curl += ` \\\n --header '${key}: ${value}'`;
156
+ });
157
+ }
158
+ if (options.body) {
159
+ curl += ` \\\n --header 'Content-Type: application/json'`;
160
+ curl += ` \\\n --data '${JSON.stringify(options.body)}'`;
161
+ }
162
+ if (options.formData) {
163
+ Object.entries(options.formData).forEach(([key, value]) => {
164
+ curl += ` \\\n --form '${key}=${value}'`;
165
+ });
166
+ }
167
+ return curl;
168
+ };
169
+
170
+ export const generateApiDescription = (
171
+ summary: string,
172
+ method: string,
173
+ path: string,
174
+ options: CurlOptions,
175
+ ) => {
176
+ const curlExample = generateCurlExample(method, path, options);
177
+ return `${summary}
178
+
179
+ ### Example curl request
180
+
181
+ \`\`\`bash
182
+ ${curlExample}
183
+ \`\`\``;
184
+ };
185
+
186
+ /**
187
+ * Normalizes a phone number to E.164 format
188
+ */
189
+ export function normalizePhoneNumber(
190
+ phoneNumber: string,
191
+ countryCode: CountryCode,
192
+ ): Result<PhoneNumber, ErrorResult> {
193
+ const parsedPhoneNumber = parsePhoneNumberFromString(
194
+ phoneNumber,
195
+ countryCode,
196
+ );
197
+
198
+ if (!parsedPhoneNumber || !parsedPhoneNumber.isValid()) {
199
+ return err({
200
+ status: HttpStatus.BAD_REQUEST,
201
+ message: 'Invalid phone number. Only numbers',
202
+ });
203
+ }
204
+ return ok(parsedPhoneNumber);
205
+ }
@@ -5,7 +5,6 @@ import { dateSchema, IPaginationMeta, UserRole } from './common.types';
5
5
  import { userIdSchema } from './user.types';
6
6
  import { accountIdSchema } from './account.types';
7
7
  import { IBaseEntity } from './entity.types';
8
- import { JobsOptions } from 'bullmq';
9
8
 
10
9
  extendZodWithOpenApi(z);
11
10
 
@@ -4,7 +4,7 @@ import { z } from 'zod';
4
4
  import { TypeID } from 'typeid-js';
5
5
  import { ErrorHttpStatusCode } from '@ts-rest/core';
6
6
  import { TwoFactorMethod } from './sms.types';
7
- import { normalizeShortDate } from '../helpers';
7
+ import { normalizeShortDate } from './contract-helpers';
8
8
  import { HttpStatus } from '@nestjs/common';
9
9
 
10
10
  extendZodWithOpenApi(z);
@@ -0,0 +1,205 @@
1
+ /**
2
+ * Contract helpers - minimal subset for API contracts package
3
+ * This file is copied directly to @dalmore/api-contracts
4
+ */
5
+ import { HttpStatus } from '@nestjs/common';
6
+ import parsePhoneNumberFromString, {
7
+ CountryCode,
8
+ PhoneNumber,
9
+ } from 'libphonenumber-js';
10
+ import { err, ok, Result } from 'neverthrow';
11
+ import { ErrorResult } from './common.types';
12
+
13
+ /**
14
+ * Validates a US zip code format (12345 or 12345-6789)
15
+ */
16
+ export const validateUSZipCode = (zipCode: string): boolean => {
17
+ const regex = /^[0-9]{5}(?:-[0-9]{4})?$/;
18
+ return regex.test(zipCode);
19
+ };
20
+
21
+ /**
22
+ * Validates a Canadian postal code format (A1A 1A1)
23
+ */
24
+ export const validateCanadaZipCode = (zipCode: string): boolean => {
25
+ const regex = /^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/;
26
+ return regex.test(zipCode);
27
+ };
28
+
29
+ /**
30
+ * Normalizes a short date string (M/D/YY or M/D/YYYY) to MM/DD/YYYY format
31
+ */
32
+ export function normalizeShortDate(input: string): string {
33
+ const [month, day, year] = input.split('/');
34
+
35
+ if (!month || !day || !year) {
36
+ throw new Error('Invalid date format');
37
+ }
38
+
39
+ const paddedMonth = month.padStart(2, '0');
40
+ const paddedDay = day.padStart(2, '0');
41
+ const fullYear = year.length === 2 ? `20${year}` : year;
42
+
43
+ return `${paddedMonth}/${paddedDay}/${fullYear}`;
44
+ }
45
+
46
+ /**
47
+ * Converts a string into a URL-safe slug
48
+ */
49
+ export function slugify(input: string, exclude: boolean = false): string {
50
+ if (exclude) {
51
+ const excludeWords = ['llc', 'inc', 'corp', 'co'];
52
+ const negativeWordsList = [
53
+ 'www',
54
+ 'api',
55
+ 'admin',
56
+ 'dashboard',
57
+ 'auth',
58
+ 'cdn',
59
+ 'static',
60
+ 'blog',
61
+ 'support',
62
+ 'status',
63
+ 'mail',
64
+ 'smtp',
65
+ 'ftp',
66
+ 'ssh',
67
+ 'login',
68
+ 'register',
69
+ 'signup',
70
+ 'account',
71
+ 'accounts',
72
+ 'user',
73
+ 'users',
74
+ 'profile',
75
+ 'settings',
76
+ 'help',
77
+ 'docs',
78
+ 'documentation',
79
+ 'developer',
80
+ 'developers',
81
+ 'app',
82
+ 'apps',
83
+ 'test',
84
+ 'demo',
85
+ 'staging',
86
+ 'dev',
87
+ 'prod',
88
+ 'production',
89
+ 'beta',
90
+ 'alpha',
91
+ 'portal',
92
+ 'portals',
93
+ 'client',
94
+ 'clients',
95
+ 'investor',
96
+ 'investors',
97
+ 'issuer',
98
+ 'issuers',
99
+ 'compliance',
100
+ 'offering',
101
+ 'offerings',
102
+ 'trade',
103
+ 'trades',
104
+ ];
105
+
106
+ let slug = input
107
+ .toLowerCase()
108
+ .replace(/[^\w\s-]/g, '')
109
+ .replace(/[\s_-]+/g, '-')
110
+ .replace(/^-+|-+$/g, '');
111
+
112
+ excludeWords.forEach((word) => {
113
+ slug = slug.replace(new RegExp(`-${word}$`, 'i'), '');
114
+ });
115
+
116
+ if (negativeWordsList.includes(slug)) {
117
+ return 'new-account';
118
+ }
119
+
120
+ return slug;
121
+ }
122
+
123
+ return input
124
+ .toLowerCase()
125
+ .replace(/[^\w\s-]/g, '')
126
+ .replace(/[\s_-]+/g, '-')
127
+ .replace(/^-+|-+$/g, '');
128
+ }
129
+
130
+ type CurlOptions = {
131
+ query?: Record<string, string>;
132
+ headers?: Record<string, string>;
133
+ body?: Record<string, unknown>;
134
+ formData?: Record<string, string>;
135
+ };
136
+
137
+ export const authHeader: CurlOptions['headers'] = {
138
+ Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
139
+ };
140
+
141
+ const generateCurlExample = (
142
+ method: string,
143
+ path: string,
144
+ options: CurlOptions,
145
+ ) => {
146
+ const baseUrl = 'https://dalmore-client-portal-api-prod.onrender.com/api/v1';
147
+ let curl = `curl -X ${method.toUpperCase()} '${baseUrl}${path}`;
148
+ if (options.query) {
149
+ const queryString = new URLSearchParams(options.query).toString();
150
+ curl += `?${queryString}`;
151
+ }
152
+ curl += "'";
153
+ if (options.headers) {
154
+ Object.entries(options.headers).forEach(([key, value]) => {
155
+ curl += ` \\\n --header '${key}: ${value}'`;
156
+ });
157
+ }
158
+ if (options.body) {
159
+ curl += ` \\\n --header 'Content-Type: application/json'`;
160
+ curl += ` \\\n --data '${JSON.stringify(options.body)}'`;
161
+ }
162
+ if (options.formData) {
163
+ Object.entries(options.formData).forEach(([key, value]) => {
164
+ curl += ` \\\n --form '${key}=${value}'`;
165
+ });
166
+ }
167
+ return curl;
168
+ };
169
+
170
+ export const generateApiDescription = (
171
+ summary: string,
172
+ method: string,
173
+ path: string,
174
+ options: CurlOptions,
175
+ ) => {
176
+ const curlExample = generateCurlExample(method, path, options);
177
+ return `${summary}
178
+
179
+ ### Example curl request
180
+
181
+ \`\`\`bash
182
+ ${curlExample}
183
+ \`\`\``;
184
+ };
185
+
186
+ /**
187
+ * Normalizes a phone number to E.164 format
188
+ */
189
+ export function normalizePhoneNumber(
190
+ phoneNumber: string,
191
+ countryCode: CountryCode,
192
+ ): Result<PhoneNumber, ErrorResult> {
193
+ const parsedPhoneNumber = parsePhoneNumberFromString(
194
+ phoneNumber,
195
+ countryCode,
196
+ );
197
+
198
+ if (!parsedPhoneNumber || !parsedPhoneNumber.isValid()) {
199
+ return err({
200
+ status: HttpStatus.BAD_REQUEST,
201
+ message: 'Invalid phone number. Only numbers',
202
+ });
203
+ }
204
+ return ok(parsedPhoneNumber);
205
+ }
@@ -14,7 +14,7 @@ import {
14
14
  UrlSchema,
15
15
  } from './common.types';
16
16
  import { accountIdSchema } from './account.types';
17
- import { slugify } from '../helpers';
17
+ import { slugify } from './contract-helpers';
18
18
  import { fileIdSchema } from './file.types';
19
19
 
20
20
  extendZodWithOpenApi(z);
@@ -1,4 +1,3 @@
1
- import { JobsOptions } from 'bullmq';
2
1
  import { typeid } from 'typeid-js';
3
2
 
4
3
  export enum QueueFrequency {
@@ -53,8 +53,10 @@ import {
53
53
  SecondaryTrade,
54
54
  SecondaryTradeFiltersZod,
55
55
  } from './secondary-trade.types';
56
- import { InvestorAccount } from '../../investor-accounts/entities/investor-account.entity';
57
- import { Trade } from '../../trades/entities/trade.entity';
56
+
57
+ // Stub types for backend entities (not included in contracts package)
58
+ type InvestorAccount = Record<string, unknown>;
59
+ type Trade = Record<string, unknown>;
58
60
 
59
61
  extendZodWithOpenApi(z);
60
62
  export const CheckResultsSchema = z.object({
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { validateCanadaZipCode, validateUSZipCode } from '../helpers';
2
+ import { validateCanadaZipCode, validateUSZipCode } from './contract-helpers';
3
3
  import { CountryCode, CountryEnumSchema } from './countries.types';
4
4
 
5
5
  export function refineAddressZip(