@open-captable-protocol/canton 0.2.190 → 0.2.192

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 (208) hide show
  1. package/dist/functions/OpenCapTable/capTable/damlToOcf.d.ts +4 -0
  2. package/dist/functions/OpenCapTable/capTable/damlToOcf.d.ts.map +1 -1
  3. package/dist/functions/OpenCapTable/capTable/damlToOcf.js +73 -140
  4. package/dist/functions/OpenCapTable/capTable/damlToOcf.js.map +1 -1
  5. package/dist/functions/OpenCapTable/capTable/ocfToDaml.d.ts +4 -0
  6. package/dist/functions/OpenCapTable/capTable/ocfToDaml.d.ts.map +1 -1
  7. package/dist/functions/OpenCapTable/capTable/ocfToDaml.js +43 -351
  8. package/dist/functions/OpenCapTable/capTable/ocfToDaml.js.map +1 -1
  9. package/dist/functions/OpenCapTable/convertibleConversion/convertibleConversionDataToDaml.d.ts +13 -0
  10. package/dist/functions/OpenCapTable/convertibleConversion/convertibleConversionDataToDaml.d.ts.map +1 -0
  11. package/dist/functions/OpenCapTable/convertibleConversion/convertibleConversionDataToDaml.js +33 -0
  12. package/dist/functions/OpenCapTable/convertibleConversion/convertibleConversionDataToDaml.js.map +1 -0
  13. package/dist/functions/OpenCapTable/convertibleConversion/damlToOcf.d.ts +25 -0
  14. package/dist/functions/OpenCapTable/convertibleConversion/damlToOcf.d.ts.map +1 -0
  15. package/dist/functions/OpenCapTable/convertibleConversion/damlToOcf.js +25 -0
  16. package/dist/functions/OpenCapTable/convertibleConversion/damlToOcf.js.map +1 -0
  17. package/dist/functions/OpenCapTable/convertibleConversion/index.d.ts +2 -0
  18. package/dist/functions/OpenCapTable/convertibleConversion/index.d.ts.map +1 -1
  19. package/dist/functions/OpenCapTable/convertibleConversion/index.js +2 -0
  20. package/dist/functions/OpenCapTable/convertibleConversion/index.js.map +1 -1
  21. package/dist/functions/OpenCapTable/convertibleRetraction/convertibleRetractionDataToDaml.d.ts +13 -0
  22. package/dist/functions/OpenCapTable/convertibleRetraction/convertibleRetractionDataToDaml.d.ts.map +1 -0
  23. package/dist/functions/OpenCapTable/convertibleRetraction/convertibleRetractionDataToDaml.js +31 -0
  24. package/dist/functions/OpenCapTable/convertibleRetraction/convertibleRetractionDataToDaml.js.map +1 -0
  25. package/dist/functions/OpenCapTable/convertibleRetraction/damlToOcf.d.ts +23 -0
  26. package/dist/functions/OpenCapTable/convertibleRetraction/damlToOcf.d.ts.map +1 -0
  27. package/dist/functions/OpenCapTable/convertibleRetraction/damlToOcf.js +23 -0
  28. package/dist/functions/OpenCapTable/convertibleRetraction/damlToOcf.js.map +1 -0
  29. package/dist/functions/OpenCapTable/convertibleRetraction/index.d.ts +3 -0
  30. package/dist/functions/OpenCapTable/convertibleRetraction/index.d.ts.map +1 -0
  31. package/dist/functions/OpenCapTable/convertibleRetraction/index.js +8 -0
  32. package/dist/functions/OpenCapTable/convertibleRetraction/index.js.map +1 -0
  33. package/dist/functions/OpenCapTable/document/createDocument.d.ts.map +1 -1
  34. package/dist/functions/OpenCapTable/document/createDocument.js +3 -15
  35. package/dist/functions/OpenCapTable/document/createDocument.js.map +1 -1
  36. package/dist/functions/OpenCapTable/equityCompensationRelease/damlToOcf.d.ts +27 -0
  37. package/dist/functions/OpenCapTable/equityCompensationRelease/damlToOcf.d.ts.map +1 -0
  38. package/dist/functions/OpenCapTable/equityCompensationRelease/damlToOcf.js +27 -0
  39. package/dist/functions/OpenCapTable/equityCompensationRelease/damlToOcf.js.map +1 -0
  40. package/dist/functions/OpenCapTable/equityCompensationRelease/equityCompensationReleaseDataToDaml.d.ts +13 -0
  41. package/dist/functions/OpenCapTable/equityCompensationRelease/equityCompensationReleaseDataToDaml.d.ts.map +1 -0
  42. package/dist/functions/OpenCapTable/equityCompensationRelease/equityCompensationReleaseDataToDaml.js +35 -0
  43. package/dist/functions/OpenCapTable/equityCompensationRelease/equityCompensationReleaseDataToDaml.js.map +1 -0
  44. package/dist/functions/OpenCapTable/equityCompensationRelease/index.d.ts +3 -0
  45. package/dist/functions/OpenCapTable/equityCompensationRelease/index.d.ts.map +1 -0
  46. package/dist/functions/OpenCapTable/equityCompensationRelease/index.js +8 -0
  47. package/dist/functions/OpenCapTable/equityCompensationRelease/index.js.map +1 -0
  48. package/dist/functions/OpenCapTable/equityCompensationRepricing/damlToOcf.d.ts +23 -0
  49. package/dist/functions/OpenCapTable/equityCompensationRepricing/damlToOcf.d.ts.map +1 -0
  50. package/dist/functions/OpenCapTable/equityCompensationRepricing/damlToOcf.js +23 -0
  51. package/dist/functions/OpenCapTable/equityCompensationRepricing/damlToOcf.js.map +1 -0
  52. package/dist/functions/OpenCapTable/equityCompensationRepricing/equityCompensationRepricingDataToDaml.d.ts +13 -0
  53. package/dist/functions/OpenCapTable/equityCompensationRepricing/equityCompensationRepricingDataToDaml.d.ts.map +1 -0
  54. package/dist/functions/OpenCapTable/equityCompensationRepricing/equityCompensationRepricingDataToDaml.js +31 -0
  55. package/dist/functions/OpenCapTable/equityCompensationRepricing/equityCompensationRepricingDataToDaml.js.map +1 -0
  56. package/dist/functions/OpenCapTable/equityCompensationRepricing/index.d.ts +3 -0
  57. package/dist/functions/OpenCapTable/equityCompensationRepricing/index.d.ts.map +1 -0
  58. package/dist/functions/OpenCapTable/equityCompensationRepricing/index.js +8 -0
  59. package/dist/functions/OpenCapTable/equityCompensationRepricing/index.js.map +1 -0
  60. package/dist/functions/OpenCapTable/equityCompensationRetraction/damlToOcf.d.ts +23 -0
  61. package/dist/functions/OpenCapTable/equityCompensationRetraction/damlToOcf.d.ts.map +1 -0
  62. package/dist/functions/OpenCapTable/equityCompensationRetraction/damlToOcf.js +23 -0
  63. package/dist/functions/OpenCapTable/equityCompensationRetraction/damlToOcf.js.map +1 -0
  64. package/dist/functions/OpenCapTable/equityCompensationRetraction/equityCompensationRetractionDataToDaml.d.ts +13 -0
  65. package/dist/functions/OpenCapTable/equityCompensationRetraction/equityCompensationRetractionDataToDaml.d.ts.map +1 -0
  66. package/dist/functions/OpenCapTable/equityCompensationRetraction/equityCompensationRetractionDataToDaml.js +31 -0
  67. package/dist/functions/OpenCapTable/equityCompensationRetraction/equityCompensationRetractionDataToDaml.js.map +1 -0
  68. package/dist/functions/OpenCapTable/equityCompensationRetraction/index.d.ts +3 -0
  69. package/dist/functions/OpenCapTable/equityCompensationRetraction/index.d.ts.map +1 -0
  70. package/dist/functions/OpenCapTable/equityCompensationRetraction/index.js +8 -0
  71. package/dist/functions/OpenCapTable/equityCompensationRetraction/index.js.map +1 -0
  72. package/dist/functions/OpenCapTable/index.d.ts +9 -0
  73. package/dist/functions/OpenCapTable/index.d.ts.map +1 -1
  74. package/dist/functions/OpenCapTable/index.js +9 -0
  75. package/dist/functions/OpenCapTable/index.js.map +1 -1
  76. package/dist/functions/OpenCapTable/issuer/createIssuer.d.ts.map +1 -1
  77. package/dist/functions/OpenCapTable/issuer/createIssuer.js +3 -7
  78. package/dist/functions/OpenCapTable/issuer/createIssuer.js.map +1 -1
  79. package/dist/functions/OpenCapTable/planSecurityExercise/index.d.ts +2 -0
  80. package/dist/functions/OpenCapTable/planSecurityExercise/index.d.ts.map +1 -0
  81. package/dist/functions/OpenCapTable/planSecurityExercise/index.js +6 -0
  82. package/dist/functions/OpenCapTable/planSecurityExercise/index.js.map +1 -0
  83. package/dist/functions/OpenCapTable/planSecurityExercise/planSecurityExerciseDataToDaml.d.ts +21 -0
  84. package/dist/functions/OpenCapTable/planSecurityExercise/planSecurityExerciseDataToDaml.d.ts.map +1 -0
  85. package/dist/functions/OpenCapTable/planSecurityExercise/planSecurityExerciseDataToDaml.js +41 -0
  86. package/dist/functions/OpenCapTable/planSecurityExercise/planSecurityExerciseDataToDaml.js.map +1 -0
  87. package/dist/functions/OpenCapTable/planSecurityIssuance/index.d.ts +2 -0
  88. package/dist/functions/OpenCapTable/planSecurityIssuance/index.d.ts.map +1 -0
  89. package/dist/functions/OpenCapTable/planSecurityIssuance/index.js +6 -0
  90. package/dist/functions/OpenCapTable/planSecurityIssuance/index.js.map +1 -0
  91. package/dist/functions/OpenCapTable/planSecurityIssuance/planSecurityIssuanceDataToDaml.d.ts +17 -0
  92. package/dist/functions/OpenCapTable/planSecurityIssuance/planSecurityIssuanceDataToDaml.d.ts.map +1 -0
  93. package/dist/functions/OpenCapTable/planSecurityIssuance/planSecurityIssuanceDataToDaml.js +79 -0
  94. package/dist/functions/OpenCapTable/planSecurityIssuance/planSecurityIssuanceDataToDaml.js.map +1 -0
  95. package/dist/functions/OpenCapTable/stakeholder/stakeholderDataToDaml.d.ts.map +1 -1
  96. package/dist/functions/OpenCapTable/stakeholder/stakeholderDataToDaml.js +3 -7
  97. package/dist/functions/OpenCapTable/stakeholder/stakeholderDataToDaml.js.map +1 -1
  98. package/dist/functions/OpenCapTable/stockClass/stockClassDataToDaml.d.ts.map +1 -1
  99. package/dist/functions/OpenCapTable/stockClass/stockClassDataToDaml.js +3 -7
  100. package/dist/functions/OpenCapTable/stockClass/stockClassDataToDaml.js.map +1 -1
  101. package/dist/functions/OpenCapTable/stockConversion/damlToOcf.d.ts +25 -0
  102. package/dist/functions/OpenCapTable/stockConversion/damlToOcf.d.ts.map +1 -0
  103. package/dist/functions/OpenCapTable/stockConversion/damlToOcf.js +25 -0
  104. package/dist/functions/OpenCapTable/stockConversion/damlToOcf.js.map +1 -0
  105. package/dist/functions/OpenCapTable/stockConversion/index.d.ts +2 -0
  106. package/dist/functions/OpenCapTable/stockConversion/index.d.ts.map +1 -1
  107. package/dist/functions/OpenCapTable/stockConversion/index.js +2 -0
  108. package/dist/functions/OpenCapTable/stockConversion/index.js.map +1 -1
  109. package/dist/functions/OpenCapTable/stockConversion/stockConversionDataToDaml.d.ts +13 -0
  110. package/dist/functions/OpenCapTable/stockConversion/stockConversionDataToDaml.d.ts.map +1 -0
  111. package/dist/functions/OpenCapTable/stockConversion/stockConversionDataToDaml.js +33 -0
  112. package/dist/functions/OpenCapTable/stockConversion/stockConversionDataToDaml.js.map +1 -0
  113. package/dist/functions/OpenCapTable/stockIssuance/createStockIssuance.d.ts.map +1 -1
  114. package/dist/functions/OpenCapTable/stockIssuance/createStockIssuance.js +3 -30
  115. package/dist/functions/OpenCapTable/stockIssuance/createStockIssuance.js.map +1 -1
  116. package/dist/functions/OpenCapTable/stockPlanReturnToPool/damlToOcf.d.ts +24 -0
  117. package/dist/functions/OpenCapTable/stockPlanReturnToPool/damlToOcf.d.ts.map +1 -0
  118. package/dist/functions/OpenCapTable/stockPlanReturnToPool/damlToOcf.js +24 -0
  119. package/dist/functions/OpenCapTable/stockPlanReturnToPool/damlToOcf.js.map +1 -0
  120. package/dist/functions/OpenCapTable/stockPlanReturnToPool/index.d.ts +3 -0
  121. package/dist/functions/OpenCapTable/stockPlanReturnToPool/index.d.ts.map +1 -0
  122. package/dist/functions/OpenCapTable/stockPlanReturnToPool/index.js +8 -0
  123. package/dist/functions/OpenCapTable/stockPlanReturnToPool/index.js.map +1 -0
  124. package/dist/functions/OpenCapTable/stockPlanReturnToPool/stockPlanReturnToPoolDataToDaml.d.ts +13 -0
  125. package/dist/functions/OpenCapTable/stockPlanReturnToPool/stockPlanReturnToPoolDataToDaml.d.ts.map +1 -0
  126. package/dist/functions/OpenCapTable/stockPlanReturnToPool/stockPlanReturnToPoolDataToDaml.js +32 -0
  127. package/dist/functions/OpenCapTable/stockPlanReturnToPool/stockPlanReturnToPoolDataToDaml.js.map +1 -0
  128. package/dist/functions/OpenCapTable/stockRetraction/damlToOcf.d.ts +23 -0
  129. package/dist/functions/OpenCapTable/stockRetraction/damlToOcf.d.ts.map +1 -0
  130. package/dist/functions/OpenCapTable/stockRetraction/damlToOcf.js +23 -0
  131. package/dist/functions/OpenCapTable/stockRetraction/damlToOcf.js.map +1 -0
  132. package/dist/functions/OpenCapTable/stockRetraction/index.d.ts +3 -0
  133. package/dist/functions/OpenCapTable/stockRetraction/index.d.ts.map +1 -0
  134. package/dist/functions/OpenCapTable/stockRetraction/index.js +8 -0
  135. package/dist/functions/OpenCapTable/stockRetraction/index.js.map +1 -0
  136. package/dist/functions/OpenCapTable/stockRetraction/stockRetractionDataToDaml.d.ts +13 -0
  137. package/dist/functions/OpenCapTable/stockRetraction/stockRetractionDataToDaml.d.ts.map +1 -0
  138. package/dist/functions/OpenCapTable/stockRetraction/stockRetractionDataToDaml.js +31 -0
  139. package/dist/functions/OpenCapTable/stockRetraction/stockRetractionDataToDaml.js.map +1 -0
  140. package/dist/functions/OpenCapTable/valuation/index.d.ts +1 -0
  141. package/dist/functions/OpenCapTable/valuation/index.d.ts.map +1 -1
  142. package/dist/functions/OpenCapTable/valuation/index.js +1 -0
  143. package/dist/functions/OpenCapTable/valuation/index.js.map +1 -1
  144. package/dist/functions/OpenCapTable/valuation/valuationDataToDaml.d.ts +13 -0
  145. package/dist/functions/OpenCapTable/valuation/valuationDataToDaml.d.ts.map +1 -0
  146. package/dist/functions/OpenCapTable/valuation/valuationDataToDaml.js +39 -0
  147. package/dist/functions/OpenCapTable/valuation/valuationDataToDaml.js.map +1 -0
  148. package/dist/functions/OpenCapTable/vestingAcceleration/index.d.ts +1 -0
  149. package/dist/functions/OpenCapTable/vestingAcceleration/index.d.ts.map +1 -1
  150. package/dist/functions/OpenCapTable/vestingAcceleration/index.js +1 -0
  151. package/dist/functions/OpenCapTable/vestingAcceleration/index.js.map +1 -1
  152. package/dist/functions/OpenCapTable/vestingAcceleration/vestingAccelerationDataToDaml.d.ts +13 -0
  153. package/dist/functions/OpenCapTable/vestingAcceleration/vestingAccelerationDataToDaml.d.ts.map +1 -0
  154. package/dist/functions/OpenCapTable/vestingAcceleration/vestingAccelerationDataToDaml.js +32 -0
  155. package/dist/functions/OpenCapTable/vestingAcceleration/vestingAccelerationDataToDaml.js.map +1 -0
  156. package/dist/functions/OpenCapTable/vestingEvent/index.d.ts +1 -0
  157. package/dist/functions/OpenCapTable/vestingEvent/index.d.ts.map +1 -1
  158. package/dist/functions/OpenCapTable/vestingEvent/index.js +1 -0
  159. package/dist/functions/OpenCapTable/vestingEvent/index.js.map +1 -1
  160. package/dist/functions/OpenCapTable/vestingEvent/vestingEventDataToDaml.d.ts +13 -0
  161. package/dist/functions/OpenCapTable/vestingEvent/vestingEventDataToDaml.d.ts.map +1 -0
  162. package/dist/functions/OpenCapTable/vestingEvent/vestingEventDataToDaml.js +31 -0
  163. package/dist/functions/OpenCapTable/vestingEvent/vestingEventDataToDaml.js.map +1 -0
  164. package/dist/functions/OpenCapTable/vestingStart/index.d.ts +1 -0
  165. package/dist/functions/OpenCapTable/vestingStart/index.d.ts.map +1 -1
  166. package/dist/functions/OpenCapTable/vestingStart/index.js +1 -0
  167. package/dist/functions/OpenCapTable/vestingStart/index.js.map +1 -1
  168. package/dist/functions/OpenCapTable/vestingStart/vestingStartDataToDaml.d.ts +13 -0
  169. package/dist/functions/OpenCapTable/vestingStart/vestingStartDataToDaml.d.ts.map +1 -0
  170. package/dist/functions/OpenCapTable/vestingStart/vestingStartDataToDaml.js +31 -0
  171. package/dist/functions/OpenCapTable/vestingStart/vestingStartDataToDaml.js.map +1 -0
  172. package/dist/functions/OpenCapTable/warrantExercise/damlToOcf.d.ts +26 -0
  173. package/dist/functions/OpenCapTable/warrantExercise/damlToOcf.d.ts.map +1 -0
  174. package/dist/functions/OpenCapTable/warrantExercise/damlToOcf.js +26 -0
  175. package/dist/functions/OpenCapTable/warrantExercise/damlToOcf.js.map +1 -0
  176. package/dist/functions/OpenCapTable/warrantExercise/index.d.ts +2 -0
  177. package/dist/functions/OpenCapTable/warrantExercise/index.d.ts.map +1 -1
  178. package/dist/functions/OpenCapTable/warrantExercise/index.js +2 -0
  179. package/dist/functions/OpenCapTable/warrantExercise/index.js.map +1 -1
  180. package/dist/functions/OpenCapTable/warrantExercise/warrantExerciseDataToDaml.d.ts +13 -0
  181. package/dist/functions/OpenCapTable/warrantExercise/warrantExerciseDataToDaml.d.ts.map +1 -0
  182. package/dist/functions/OpenCapTable/warrantExercise/warrantExerciseDataToDaml.js +34 -0
  183. package/dist/functions/OpenCapTable/warrantExercise/warrantExerciseDataToDaml.js.map +1 -0
  184. package/dist/functions/OpenCapTable/warrantRetraction/damlToOcf.d.ts +23 -0
  185. package/dist/functions/OpenCapTable/warrantRetraction/damlToOcf.d.ts.map +1 -0
  186. package/dist/functions/OpenCapTable/warrantRetraction/damlToOcf.js +23 -0
  187. package/dist/functions/OpenCapTable/warrantRetraction/damlToOcf.js.map +1 -0
  188. package/dist/functions/OpenCapTable/warrantRetraction/index.d.ts +3 -0
  189. package/dist/functions/OpenCapTable/warrantRetraction/index.d.ts.map +1 -0
  190. package/dist/functions/OpenCapTable/warrantRetraction/index.js +8 -0
  191. package/dist/functions/OpenCapTable/warrantRetraction/index.js.map +1 -0
  192. package/dist/functions/OpenCapTable/warrantRetraction/warrantRetractionDataToDaml.d.ts +13 -0
  193. package/dist/functions/OpenCapTable/warrantRetraction/warrantRetractionDataToDaml.d.ts.map +1 -0
  194. package/dist/functions/OpenCapTable/warrantRetraction/warrantRetractionDataToDaml.js +31 -0
  195. package/dist/functions/OpenCapTable/warrantRetraction/warrantRetractionDataToDaml.js.map +1 -0
  196. package/dist/utils/entityValidators.d.ts +144 -0
  197. package/dist/utils/entityValidators.d.ts.map +1 -0
  198. package/dist/utils/entityValidators.js +581 -0
  199. package/dist/utils/entityValidators.js.map +1 -0
  200. package/dist/utils/index.d.ts +1 -0
  201. package/dist/utils/index.d.ts.map +1 -1
  202. package/dist/utils/index.js +1 -0
  203. package/dist/utils/index.js.map +1 -1
  204. package/dist/utils/validation.d.ts +19 -25
  205. package/dist/utils/validation.d.ts.map +1 -1
  206. package/dist/utils/validation.js +125 -50
  207. package/dist/utils/validation.js.map +1 -1
  208. package/package.json +1 -1
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * OCF to DAML converter for VestingEvent entities.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.vestingEventDataToDaml = vestingEventDataToDaml;
7
+ const errors_1 = require("../../../errors");
8
+ const typeConversions_1 = require("../../../utils/typeConversions");
9
+ /**
10
+ * Convert native OCF VestingEvent data to DAML format.
11
+ *
12
+ * @param d - The native OCF vesting event data object
13
+ * @returns The DAML-formatted vesting event data
14
+ * @throws OcpValidationError if required fields are missing
15
+ */
16
+ function vestingEventDataToDaml(d) {
17
+ if (!d.id) {
18
+ throw new errors_1.OcpValidationError('vestingEvent.id', 'Required field is missing or empty', {
19
+ expectedType: 'string',
20
+ receivedValue: d.id,
21
+ });
22
+ }
23
+ return {
24
+ id: d.id,
25
+ date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
26
+ security_id: d.security_id,
27
+ vesting_condition_id: d.vesting_condition_id,
28
+ comments: (0, typeConversions_1.cleanComments)(d.comments),
29
+ };
30
+ }
31
+ //# sourceMappingURL=vestingEventDataToDaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vestingEventDataToDaml.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/vestingEvent/vestingEventDataToDaml.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAaH,wDAcC;AAzBD,4CAAqD;AAErD,oEAAqF;AAErF;;;;;;GAMG;AACH,SAAgB,sBAAsB,CAAC,CAAkB;IACvD,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACV,MAAM,IAAI,2BAAkB,CAAC,iBAAiB,EAAE,oCAAoC,EAAE;YACpF,YAAY,EAAE,QAAQ;YACtB,aAAa,EAAE,CAAC,CAAC,EAAE;SACpB,CAAC,CAAC;IACL,CAAC;IACD,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,IAAA,sCAAoB,EAAC,CAAC,CAAC,IAAI,CAAC;QAClC,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,oBAAoB,EAAE,CAAC,CAAC,oBAAoB;QAC5C,QAAQ,EAAE,IAAA,+BAAa,EAAC,CAAC,CAAC,QAAQ,CAAC;KACpC,CAAC;AACJ,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './damlToOcf';
2
2
  export * from './getVestingStartAsOcf';
3
+ export * from './vestingStartDataToDaml';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/vestingStart/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/vestingStart/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./damlToOcf"), exports);
18
18
  __exportStar(require("./getVestingStartAsOcf"), exports);
19
+ __exportStar(require("./vestingStartDataToDaml"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/vestingStart/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/vestingStart/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yDAAuC;AACvC,2DAAyC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * OCF to DAML converter for VestingStart entities.
3
+ */
4
+ import type { OcfVestingStart } from '../../../types';
5
+ /**
6
+ * Convert native OCF VestingStart data to DAML format.
7
+ *
8
+ * @param d - The native OCF vesting start data object
9
+ * @returns The DAML-formatted vesting start data
10
+ * @throws OcpValidationError if required fields are missing
11
+ */
12
+ export declare function vestingStartDataToDaml(d: OcfVestingStart): Record<string, unknown>;
13
+ //# sourceMappingURL=vestingStartDataToDaml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vestingStartDataToDaml.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/vestingStart/vestingStartDataToDaml.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAclF"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * OCF to DAML converter for VestingStart entities.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.vestingStartDataToDaml = vestingStartDataToDaml;
7
+ const errors_1 = require("../../../errors");
8
+ const typeConversions_1 = require("../../../utils/typeConversions");
9
+ /**
10
+ * Convert native OCF VestingStart data to DAML format.
11
+ *
12
+ * @param d - The native OCF vesting start data object
13
+ * @returns The DAML-formatted vesting start data
14
+ * @throws OcpValidationError if required fields are missing
15
+ */
16
+ function vestingStartDataToDaml(d) {
17
+ if (!d.id) {
18
+ throw new errors_1.OcpValidationError('vestingStart.id', 'Required field is missing or empty', {
19
+ expectedType: 'string',
20
+ receivedValue: d.id,
21
+ });
22
+ }
23
+ return {
24
+ id: d.id,
25
+ date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
26
+ security_id: d.security_id,
27
+ vesting_condition_id: d.vesting_condition_id,
28
+ comments: (0, typeConversions_1.cleanComments)(d.comments),
29
+ };
30
+ }
31
+ //# sourceMappingURL=vestingStartDataToDaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vestingStartDataToDaml.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/vestingStart/vestingStartDataToDaml.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAaH,wDAcC;AAzBD,4CAAqD;AAErD,oEAAqF;AAErF;;;;;;GAMG;AACH,SAAgB,sBAAsB,CAAC,CAAkB;IACvD,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACV,MAAM,IAAI,2BAAkB,CAAC,iBAAiB,EAAE,oCAAoC,EAAE;YACpF,YAAY,EAAE,QAAQ;YACtB,aAAa,EAAE,CAAC,CAAC,EAAE;SACpB,CAAC,CAAC;IACL,CAAC;IACD,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,IAAA,sCAAoB,EAAC,CAAC,CAAC,IAAI,CAAC;QAClC,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,oBAAoB,EAAE,CAAC,CAAC,oBAAoB;QAC5C,QAAQ,EAAE,IAAA,+BAAa,EAAC,CAAC,CAAC,QAAQ,CAAC;KACpC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * DAML to OCF converters for WarrantExercise entities.
3
+ */
4
+ import type { OcfWarrantExercise } from '../../../types';
5
+ /**
6
+ * DAML WarrantExercise data structure.
7
+ * This matches the shape of data returned from DAML contracts.
8
+ */
9
+ export interface DamlWarrantExerciseData {
10
+ id: string;
11
+ date: string;
12
+ security_id: string;
13
+ quantity: string;
14
+ resulting_security_ids: string[];
15
+ balance_security_id?: string | null;
16
+ consideration_text?: string | null;
17
+ comments: string[];
18
+ }
19
+ /**
20
+ * Convert DAML WarrantExercise data to native OCF format.
21
+ *
22
+ * @param d - The DAML warrant exercise data object
23
+ * @returns The native OCF WarrantExercise object
24
+ */
25
+ export declare function damlWarrantExerciseToNative(d: DamlWarrantExerciseData): OcfWarrantExercise;
26
+ //# sourceMappingURL=damlToOcf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"damlToOcf.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantExercise/damlToOcf.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGzD;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,uBAAuB,GAAG,kBAAkB,CAW1F"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * DAML to OCF converters for WarrantExercise entities.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.damlWarrantExerciseToNative = damlWarrantExerciseToNative;
7
+ const typeConversions_1 = require("../../../utils/typeConversions");
8
+ /**
9
+ * Convert DAML WarrantExercise data to native OCF format.
10
+ *
11
+ * @param d - The DAML warrant exercise data object
12
+ * @returns The native OCF WarrantExercise object
13
+ */
14
+ function damlWarrantExerciseToNative(d) {
15
+ return {
16
+ id: d.id,
17
+ date: (0, typeConversions_1.damlTimeToDateString)(d.date),
18
+ security_id: d.security_id,
19
+ quantity: (0, typeConversions_1.normalizeNumericString)(d.quantity),
20
+ resulting_security_ids: d.resulting_security_ids,
21
+ ...(d.balance_security_id && { balance_security_id: d.balance_security_id }),
22
+ ...(d.consideration_text && { consideration_text: d.consideration_text }),
23
+ ...(d.comments.length > 0 && { comments: d.comments }),
24
+ };
25
+ }
26
+ //# sourceMappingURL=damlToOcf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"damlToOcf.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantExercise/damlToOcf.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA0BH,kEAWC;AAlCD,oEAA8F;AAiB9F;;;;;GAKG;AACH,SAAgB,2BAA2B,CAAC,CAA0B;IACpE,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,IAAA,sCAAoB,EAAC,CAAC,CAAC,IAAI,CAAC;QAClC,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,QAAQ,EAAE,IAAA,wCAAsB,EAAC,CAAC,CAAC,QAAQ,CAAC;QAC5C,sBAAsB,EAAE,CAAC,CAAC,sBAAsB;QAChD,GAAG,CAAC,CAAC,CAAC,mBAAmB,IAAI,EAAE,mBAAmB,EAAE,CAAC,CAAC,mBAAmB,EAAE,CAAC;QAC5E,GAAG,CAAC,CAAC,CAAC,kBAAkB,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC,kBAAkB,EAAE,CAAC;QACzE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;KACvD,CAAC;AACJ,CAAC"}
@@ -1,2 +1,4 @@
1
+ export * from './damlToOcf';
1
2
  export * from './getWarrantExerciseAsOcf';
3
+ export * from './warrantExerciseDataToDaml';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantExercise/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantExercise/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC"}
@@ -14,5 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./damlToOcf"), exports);
17
18
  __exportStar(require("./getWarrantExerciseAsOcf"), exports);
19
+ __exportStar(require("./warrantExerciseDataToDaml"), exports);
18
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantExercise/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantExercise/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,4DAA0C;AAC1C,8DAA4C"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * OCF to DAML converter for WarrantExercise entities.
3
+ */
4
+ import type { OcfWarrantExercise } from '../../../types';
5
+ /**
6
+ * Convert native OCF WarrantExercise data to DAML format.
7
+ *
8
+ * @param d - The native OCF warrant exercise data object
9
+ * @returns The DAML-formatted warrant exercise data
10
+ * @throws OcpValidationError if required fields are missing
11
+ */
12
+ export declare function warrantExerciseDataToDaml(d: OcfWarrantExercise): Record<string, unknown>;
13
+ //# sourceMappingURL=warrantExerciseDataToDaml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warrantExerciseDataToDaml.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantExercise/warrantExerciseDataToDaml.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGzD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAiBxF"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /**
3
+ * OCF to DAML converter for WarrantExercise entities.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.warrantExerciseDataToDaml = warrantExerciseDataToDaml;
7
+ const errors_1 = require("../../../errors");
8
+ const typeConversions_1 = require("../../../utils/typeConversions");
9
+ /**
10
+ * Convert native OCF WarrantExercise data to DAML format.
11
+ *
12
+ * @param d - The native OCF warrant exercise data object
13
+ * @returns The DAML-formatted warrant exercise data
14
+ * @throws OcpValidationError if required fields are missing
15
+ */
16
+ function warrantExerciseDataToDaml(d) {
17
+ if (!d.id) {
18
+ throw new errors_1.OcpValidationError('warrantExercise.id', 'Required field is missing or empty', {
19
+ expectedType: 'string',
20
+ receivedValue: d.id,
21
+ });
22
+ }
23
+ return {
24
+ id: d.id,
25
+ date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
26
+ security_id: d.security_id,
27
+ quantity: (0, typeConversions_1.numberToString)(d.quantity),
28
+ resulting_security_ids: d.resulting_security_ids,
29
+ balance_security_id: (0, typeConversions_1.optionalString)(d.balance_security_id),
30
+ consideration_text: (0, typeConversions_1.optionalString)(d.consideration_text),
31
+ comments: (0, typeConversions_1.cleanComments)(d.comments),
32
+ };
33
+ }
34
+ //# sourceMappingURL=warrantExerciseDataToDaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warrantExerciseDataToDaml.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantExercise/warrantExerciseDataToDaml.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAaH,8DAiBC;AA5BD,4CAAqD;AAErD,oEAAqH;AAErH;;;;;;GAMG;AACH,SAAgB,yBAAyB,CAAC,CAAqB;IAC7D,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACV,MAAM,IAAI,2BAAkB,CAAC,oBAAoB,EAAE,oCAAoC,EAAE;YACvF,YAAY,EAAE,QAAQ;YACtB,aAAa,EAAE,CAAC,CAAC,EAAE;SACpB,CAAC,CAAC;IACL,CAAC;IACD,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,IAAA,sCAAoB,EAAC,CAAC,CAAC,IAAI,CAAC;QAClC,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,QAAQ,EAAE,IAAA,gCAAc,EAAC,CAAC,CAAC,QAAQ,CAAC;QACpC,sBAAsB,EAAE,CAAC,CAAC,sBAAsB;QAChD,mBAAmB,EAAE,IAAA,gCAAc,EAAC,CAAC,CAAC,mBAAmB,CAAC;QAC1D,kBAAkB,EAAE,IAAA,gCAAc,EAAC,CAAC,CAAC,kBAAkB,CAAC;QACxD,QAAQ,EAAE,IAAA,+BAAa,EAAC,CAAC,CAAC,QAAQ,CAAC;KACpC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * DAML to OCF converters for WarrantRetraction entities.
3
+ */
4
+ import type { OcfWarrantRetraction } from '../../../types';
5
+ /**
6
+ * DAML WarrantRetraction data structure.
7
+ * This matches the shape of data returned from DAML contracts.
8
+ */
9
+ export interface DamlWarrantRetractionData {
10
+ id: string;
11
+ date: string;
12
+ security_id: string;
13
+ reason_text: string;
14
+ comments: string[];
15
+ }
16
+ /**
17
+ * Convert DAML WarrantRetraction data to native OCF format.
18
+ *
19
+ * @param d - The DAML warrant retraction data object
20
+ * @returns The native OCF WarrantRetraction object
21
+ */
22
+ export declare function damlWarrantRetractionToNative(d: DamlWarrantRetractionData): OcfWarrantRetraction;
23
+ //# sourceMappingURL=damlToOcf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"damlToOcf.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantRetraction/damlToOcf.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,yBAAyB,GAAG,oBAAoB,CAQhG"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * DAML to OCF converters for WarrantRetraction entities.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.damlWarrantRetractionToNative = damlWarrantRetractionToNative;
7
+ const typeConversions_1 = require("../../../utils/typeConversions");
8
+ /**
9
+ * Convert DAML WarrantRetraction data to native OCF format.
10
+ *
11
+ * @param d - The DAML warrant retraction data object
12
+ * @returns The native OCF WarrantRetraction object
13
+ */
14
+ function damlWarrantRetractionToNative(d) {
15
+ return {
16
+ id: d.id,
17
+ date: (0, typeConversions_1.damlTimeToDateString)(d.date),
18
+ security_id: d.security_id,
19
+ reason_text: d.reason_text,
20
+ ...(d.comments.length > 0 && { comments: d.comments }),
21
+ };
22
+ }
23
+ //# sourceMappingURL=damlToOcf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"damlToOcf.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantRetraction/damlToOcf.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAuBH,sEAQC;AA5BD,oEAAsE;AActE;;;;;GAKG;AACH,SAAgB,6BAA6B,CAAC,CAA4B;IACxE,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,IAAA,sCAAoB,EAAC,CAAC,CAAC,IAAI,CAAC;QAClC,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;KACvD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { damlWarrantRetractionToNative, type DamlWarrantRetractionData } from './damlToOcf';
2
+ export { warrantRetractionDataToDaml } from './warrantRetractionDataToDaml';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantRetraction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.warrantRetractionDataToDaml = exports.damlWarrantRetractionToNative = void 0;
4
+ var damlToOcf_1 = require("./damlToOcf");
5
+ Object.defineProperty(exports, "damlWarrantRetractionToNative", { enumerable: true, get: function () { return damlToOcf_1.damlWarrantRetractionToNative; } });
6
+ var warrantRetractionDataToDaml_1 = require("./warrantRetractionDataToDaml");
7
+ Object.defineProperty(exports, "warrantRetractionDataToDaml", { enumerable: true, get: function () { return warrantRetractionDataToDaml_1.warrantRetractionDataToDaml; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantRetraction/index.ts"],"names":[],"mappings":";;;AAAA,yCAA4F;AAAnF,0HAAA,6BAA6B,OAAA;AACtC,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * OCF to DAML converter for WarrantRetraction entities.
3
+ */
4
+ import type { OcfWarrantRetraction } from '../../../types';
5
+ /**
6
+ * Convert native OCF WarrantRetraction data to DAML format.
7
+ *
8
+ * @param d - The native OCF warrant retraction data object
9
+ * @returns The DAML-formatted warrant retraction data
10
+ * @throws OcpValidationError if required fields are missing
11
+ */
12
+ export declare function warrantRetractionDataToDaml(d: OcfWarrantRetraction): Record<string, unknown>;
13
+ //# sourceMappingURL=warrantRetractionDataToDaml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warrantRetractionDataToDaml.d.ts","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantRetraction/warrantRetractionDataToDaml.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAc5F"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * OCF to DAML converter for WarrantRetraction entities.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.warrantRetractionDataToDaml = warrantRetractionDataToDaml;
7
+ const errors_1 = require("../../../errors");
8
+ const typeConversions_1 = require("../../../utils/typeConversions");
9
+ /**
10
+ * Convert native OCF WarrantRetraction data to DAML format.
11
+ *
12
+ * @param d - The native OCF warrant retraction data object
13
+ * @returns The DAML-formatted warrant retraction data
14
+ * @throws OcpValidationError if required fields are missing
15
+ */
16
+ function warrantRetractionDataToDaml(d) {
17
+ if (!d.id) {
18
+ throw new errors_1.OcpValidationError('warrantRetraction.id', 'Required field is missing or empty', {
19
+ expectedType: 'string',
20
+ receivedValue: d.id,
21
+ });
22
+ }
23
+ return {
24
+ id: d.id,
25
+ date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
26
+ security_id: d.security_id,
27
+ reason_text: d.reason_text,
28
+ comments: (0, typeConversions_1.cleanComments)(d.comments),
29
+ };
30
+ }
31
+ //# sourceMappingURL=warrantRetractionDataToDaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warrantRetractionDataToDaml.js","sourceRoot":"","sources":["../../../../src/functions/OpenCapTable/warrantRetraction/warrantRetractionDataToDaml.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAaH,kEAcC;AAzBD,4CAAqD;AAErD,oEAAqF;AAErF;;;;;;GAMG;AACH,SAAgB,2BAA2B,CAAC,CAAuB;IACjE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACV,MAAM,IAAI,2BAAkB,CAAC,sBAAsB,EAAE,oCAAoC,EAAE;YACzF,YAAY,EAAE,QAAQ;YACtB,aAAa,EAAE,CAAC,CAAC,EAAE;SACpB,CAAC,CAAC;IACL,CAAC;IACD,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,IAAA,sCAAoB,EAAC,CAAC,CAAC,IAAI,CAAC;QAClC,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,QAAQ,EAAE,IAAA,+BAAa,EAAC,CAAC,CAAC,QAAQ,CAAC;KACpC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Entity-specific validators for OCF types.
3
+ *
4
+ * These validators provide comprehensive input validation for common OCF entity types,
5
+ * ensuring data integrity before sending to DAML contracts.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { validateIssuerData, validateStakeholderData } from './entityValidators';
10
+ *
11
+ * // Validates and throws OcpValidationError if invalid
12
+ * validateIssuerData(issuerData, 'issuer');
13
+ * validateStakeholderData(stakeholderData, 'stakeholder');
14
+ * ```
15
+ */
16
+ import type { Address, Email, Monetary, Phone } from '../types';
17
+ /**
18
+ * Validate an Email object.
19
+ */
20
+ export declare function validateEmail(value: unknown, fieldPath: string): void;
21
+ /**
22
+ * Validate an optional Email object.
23
+ */
24
+ export declare function validateOptionalEmail(value: unknown, fieldPath: string): Email | null;
25
+ /**
26
+ * Validate a Phone object.
27
+ */
28
+ export declare function validatePhone(value: unknown, fieldPath: string): void;
29
+ /**
30
+ * Validate an optional Phone object.
31
+ */
32
+ export declare function validateOptionalPhone(value: unknown, fieldPath: string): Phone | null;
33
+ /**
34
+ * Validate an Address object.
35
+ */
36
+ export declare function validateAddress(value: unknown, fieldPath: string): void;
37
+ /**
38
+ * Validate an optional Address object.
39
+ */
40
+ export declare function validateOptionalAddress(value: unknown, fieldPath: string): Address | null;
41
+ /**
42
+ * Validate a TaxId object.
43
+ */
44
+ export declare function validateTaxId(value: unknown, fieldPath: string): void;
45
+ /**
46
+ * Validate a Monetary object (entity-specific version).
47
+ * Delegates to validateRequiredMonetary from validation.ts.
48
+ */
49
+ export declare function validateMonetaryObject(value: unknown, fieldPath: string): void;
50
+ /**
51
+ * Validate an optional Monetary object.
52
+ */
53
+ export declare function validateOptionalMonetaryObject(value: unknown, fieldPath: string): Monetary | null;
54
+ /**
55
+ * Validate a Name object.
56
+ */
57
+ export declare function validateName(value: unknown, fieldPath: string): void;
58
+ /**
59
+ * Validate a ContactInfo object.
60
+ */
61
+ export declare function validateContactInfo(value: unknown, fieldPath: string): void;
62
+ /**
63
+ * Validate a ContactInfoWithoutName object.
64
+ */
65
+ export declare function validateContactInfoWithoutName(value: unknown, fieldPath: string): void;
66
+ /**
67
+ * Validate OcfIssuer data.
68
+ *
69
+ * Validates all required fields and structure of an issuer object.
70
+ * Throws OcpValidationError with detailed field path on validation failure.
71
+ *
72
+ * @param data - The issuer data to validate
73
+ * @param fieldPath - Base path for error messages (e.g., 'issuer')
74
+ * @throws {OcpValidationError} if validation fails
75
+ */
76
+ export declare function validateIssuerData(data: unknown, fieldPath: string): void;
77
+ /**
78
+ * Validate OcfStakeholder data.
79
+ *
80
+ * Validates all required fields and structure of a stakeholder object.
81
+ * Throws OcpValidationError with detailed field path on validation failure.
82
+ *
83
+ * @param data - The stakeholder data to validate
84
+ * @param fieldPath - Base path for error messages (e.g., 'stakeholder')
85
+ * @throws {OcpValidationError} if validation fails
86
+ */
87
+ export declare function validateStakeholderData(data: unknown, fieldPath: string): void;
88
+ /**
89
+ * Validate OcfStockClass data.
90
+ *
91
+ * Validates all required fields and structure of a stock class object.
92
+ * Throws OcpValidationError with detailed field path on validation failure.
93
+ *
94
+ * @param data - The stock class data to validate
95
+ * @param fieldPath - Base path for error messages (e.g., 'stockClass')
96
+ * @throws {OcpValidationError} if validation fails
97
+ */
98
+ export declare function validateStockClassData(data: unknown, fieldPath: string): void;
99
+ /**
100
+ * Validate OcfStockIssuance data.
101
+ *
102
+ * Validates all required fields and structure of a stock issuance object.
103
+ * Throws OcpValidationError with detailed field path on validation failure.
104
+ *
105
+ * @param data - The stock issuance data to validate
106
+ * @param fieldPath - Base path for error messages (e.g., 'stockIssuance')
107
+ * @throws {OcpValidationError} if validation fails
108
+ */
109
+ export declare function validateStockIssuanceData(data: unknown, fieldPath: string): void;
110
+ /**
111
+ * Validate OcfValuation data.
112
+ *
113
+ * Validates all required fields and structure of a valuation object.
114
+ * Throws OcpValidationError with detailed field path on validation failure.
115
+ *
116
+ * @param data - The valuation data to validate
117
+ * @param fieldPath - Base path for error messages (e.g., 'valuation')
118
+ * @throws {OcpValidationError} if validation fails
119
+ */
120
+ export declare function validateValuationData(data: unknown, fieldPath: string): void;
121
+ /**
122
+ * Validate OcfDocument data.
123
+ *
124
+ * Validates all required fields and structure of a document object.
125
+ * Throws OcpValidationError with detailed field path on validation failure.
126
+ *
127
+ * @param data - The document data to validate
128
+ * @param fieldPath - Base path for error messages (e.g., 'document')
129
+ * @throws {OcpValidationError} if validation fails
130
+ */
131
+ export declare function validateDocumentData(data: unknown, fieldPath: string): void;
132
+ /**
133
+ * Validate common transaction fields.
134
+ * This is a helper function for transaction-specific validators.
135
+ */
136
+ export declare function validateTransactionBase(value: Record<string, unknown>, path: string, options?: {
137
+ requireSecurityId?: boolean;
138
+ requireQuantity?: boolean;
139
+ }): void;
140
+ /**
141
+ * Validate resulting_security_ids array (must be non-empty for certain transactions).
142
+ */
143
+ export declare function validateResultingSecurityIds(value: unknown, fieldPath: string): void;
144
+ //# sourceMappingURL=entityValidators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entityValidators.d.ts","sourceRoot":"","sources":["../../src/utils/entityValidators.ts"],"names":[],"mappings":"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"}