@xyo-network/payment-payload-plugins 5.3.2 → 5.3.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 (290) hide show
  1. package/dist/neutral/Amount/Iso4217Currency.d.ts +14 -0
  2. package/dist/neutral/Amount/Iso4217Currency.d.ts.map +1 -0
  3. package/dist/neutral/Amount/Payload.d.ts +27 -0
  4. package/dist/neutral/Amount/Payload.d.ts.map +1 -0
  5. package/dist/neutral/Amount/index.d.ts +3 -0
  6. package/dist/neutral/Amount/index.d.ts.map +1 -0
  7. package/dist/neutral/Billing/Address/Address.d.ts +42 -0
  8. package/dist/neutral/Billing/Address/Address.d.ts.map +1 -0
  9. package/dist/neutral/Billing/Address/Schema.d.ts +5 -0
  10. package/dist/neutral/Billing/Address/Schema.d.ts.map +1 -0
  11. package/dist/neutral/Billing/Address/index.d.ts +3 -0
  12. package/dist/neutral/Billing/Address/index.d.ts.map +1 -0
  13. package/dist/neutral/Billing/Schema.d.ts +5 -0
  14. package/dist/neutral/Billing/Schema.d.ts.map +1 -0
  15. package/dist/neutral/Billing/index.d.ts +3 -0
  16. package/dist/neutral/Billing/index.d.ts.map +1 -0
  17. package/dist/neutral/Currency.d.ts +2 -0
  18. package/dist/neutral/Currency.d.ts.map +1 -0
  19. package/dist/neutral/Discount/Config.d.ts +25 -0
  20. package/dist/neutral/Discount/Config.d.ts.map +1 -0
  21. package/dist/neutral/Discount/Params.d.ts +11 -0
  22. package/dist/neutral/Discount/Params.d.ts.map +1 -0
  23. package/dist/neutral/Discount/Payload/Coupon/Conditions/AppraisalAmountCondition.d.ts +8 -0
  24. package/dist/neutral/Discount/Payload/Coupon/Conditions/AppraisalAmountCondition.d.ts.map +1 -0
  25. package/dist/neutral/Discount/Payload/Coupon/Conditions/AssetQuantityCondition.d.ts +8 -0
  26. package/dist/neutral/Discount/Payload/Coupon/Conditions/AssetQuantityCondition.d.ts.map +1 -0
  27. package/dist/neutral/Discount/Payload/Coupon/Conditions/BuyerCondition.d.ts +34 -0
  28. package/dist/neutral/Discount/Payload/Coupon/Conditions/BuyerCondition.d.ts.map +1 -0
  29. package/dist/neutral/Discount/Payload/Coupon/Conditions/index.d.ts +4 -0
  30. package/dist/neutral/Discount/Payload/Coupon/Conditions/index.d.ts.map +1 -0
  31. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +26 -0
  32. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -0
  33. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +26 -0
  34. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -0
  35. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +26 -0
  36. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -0
  37. package/dist/neutral/Discount/Payload/Coupon/Coupons/index.d.ts +4 -0
  38. package/dist/neutral/Discount/Payload/Coupon/Coupons/index.d.ts.map +1 -0
  39. package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts +16 -0
  40. package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts.map +1 -0
  41. package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts +5 -0
  42. package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts.map +1 -0
  43. package/dist/neutral/Discount/Payload/Coupon/index.d.ts +6 -0
  44. package/dist/neutral/Discount/Payload/Coupon/index.d.ts.map +1 -0
  45. package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts +16 -0
  46. package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts.map +1 -0
  47. package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts +16 -0
  48. package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts.map +1 -0
  49. package/dist/neutral/Discount/Payload/Coupon/types/index.d.ts +4 -0
  50. package/dist/neutral/Discount/Payload/Coupon/types/index.d.ts.map +1 -0
  51. package/dist/neutral/Discount/Payload/Coupon/types/isStackable.d.ts +5 -0
  52. package/dist/neutral/Discount/Payload/Coupon/types/isStackable.d.ts.map +1 -0
  53. package/dist/neutral/Discount/Payload/Discount.d.ts +25 -0
  54. package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -0
  55. package/dist/neutral/Discount/Payload/NoDiscount.d.ts +3 -0
  56. package/dist/neutral/Discount/Payload/NoDiscount.d.ts.map +1 -0
  57. package/dist/neutral/Discount/Payload/index.d.ts +4 -0
  58. package/dist/neutral/Discount/Payload/index.d.ts.map +1 -0
  59. package/dist/neutral/Discount/index.d.ts +4 -0
  60. package/dist/neutral/Discount/index.d.ts.map +1 -0
  61. package/dist/neutral/Escrow/Outcome.d.ts +31 -0
  62. package/dist/neutral/Escrow/Outcome.d.ts.map +1 -0
  63. package/dist/neutral/Escrow/Schema.d.ts +5 -0
  64. package/dist/neutral/Escrow/Schema.d.ts.map +1 -0
  65. package/{src/Escrow/Terms/Party.ts → dist/neutral/Escrow/Terms/Party.d.ts} +3 -3
  66. package/dist/neutral/Escrow/Terms/Party.d.ts.map +1 -0
  67. package/dist/neutral/Escrow/Terms/PartySecret.d.ts +6 -0
  68. package/dist/neutral/Escrow/Terms/PartySecret.d.ts.map +1 -0
  69. package/dist/neutral/Escrow/Terms/Terms.d.ts +73 -0
  70. package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -0
  71. package/dist/neutral/Escrow/Terms/index.d.ts +4 -0
  72. package/dist/neutral/Escrow/Terms/index.d.ts.map +1 -0
  73. package/dist/neutral/Escrow/index.d.ts +6 -0
  74. package/dist/neutral/Escrow/index.d.ts.map +1 -0
  75. package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts +12 -0
  76. package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts.map +1 -0
  77. package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts +13 -0
  78. package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts.map +1 -0
  79. package/dist/neutral/Escrow/util/appraisal/index.d.ts +3 -0
  80. package/dist/neutral/Escrow/util/appraisal/index.d.ts.map +1 -0
  81. package/dist/neutral/Escrow/util/index.d.ts +3 -0
  82. package/dist/neutral/Escrow/util/index.d.ts.map +1 -0
  83. package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts +31 -0
  84. package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts.map +1 -0
  85. package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts +13 -0
  86. package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts.map +1 -0
  87. package/dist/neutral/Escrow/util/secret/getEscrowSecret.d.ts +7 -0
  88. package/dist/neutral/Escrow/util/secret/getEscrowSecret.d.ts.map +1 -0
  89. package/dist/neutral/Escrow/util/secret/index.d.ts +5 -0
  90. package/dist/neutral/Escrow/util/secret/index.d.ts.map +1 -0
  91. package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts +33 -0
  92. package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts.map +1 -0
  93. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.ts +2 -0
  94. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.ts.map +1 -0
  95. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts +22 -0
  96. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts.map +1 -0
  97. package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts +10 -0
  98. package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts.map +1 -0
  99. package/dist/neutral/Escrow/validators/common/SecretValidators/index.d.ts +2 -0
  100. package/dist/neutral/Escrow/validators/common/SecretValidators/index.d.ts.map +1 -0
  101. package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.ts +2 -0
  102. package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.ts.map +1 -0
  103. package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.ts +6 -0
  104. package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.ts.map +1 -0
  105. package/dist/neutral/Escrow/validators/common/index.d.ts +4 -0
  106. package/dist/neutral/Escrow/validators/common/index.d.ts.map +1 -0
  107. package/dist/neutral/Escrow/validators/escrow/agent.d.ts +5 -0
  108. package/dist/neutral/Escrow/validators/escrow/agent.d.ts.map +1 -0
  109. package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts +29 -0
  110. package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts.map +1 -0
  111. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts +10 -0
  112. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts.map +1 -0
  113. package/dist/neutral/Escrow/validators/escrow/assets.d.ts +8 -0
  114. package/dist/neutral/Escrow/validators/escrow/assets.d.ts.map +1 -0
  115. package/dist/neutral/Escrow/validators/escrow/buyer.d.ts +8 -0
  116. package/dist/neutral/Escrow/validators/escrow/buyer.d.ts.map +1 -0
  117. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts +21 -0
  118. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts.map +1 -0
  119. package/dist/neutral/Escrow/validators/escrow/index.d.ts +11 -0
  120. package/dist/neutral/Escrow/validators/escrow/index.d.ts.map +1 -0
  121. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts +4 -0
  122. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts.map +1 -0
  123. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts +5 -0
  124. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts.map +1 -0
  125. package/dist/neutral/Escrow/validators/escrow/seller.d.ts +8 -0
  126. package/dist/neutral/Escrow/validators/escrow/seller.d.ts.map +1 -0
  127. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts +21 -0
  128. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts.map +1 -0
  129. package/dist/neutral/Escrow/validators/index.d.ts +3 -0
  130. package/dist/neutral/Escrow/validators/index.d.ts.map +1 -0
  131. package/dist/neutral/Invoice/Invoice.d.ts +17 -0
  132. package/dist/neutral/Invoice/Invoice.d.ts.map +1 -0
  133. package/dist/neutral/Invoice/index.d.ts +2 -0
  134. package/dist/neutral/Invoice/index.d.ts.map +1 -0
  135. package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +44 -0
  136. package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -0
  137. package/dist/neutral/Payment/Instrument/Card/Schema.d.ts +5 -0
  138. package/dist/neutral/Payment/Instrument/Card/Schema.d.ts.map +1 -0
  139. package/dist/neutral/Payment/Instrument/Card/index.d.ts +3 -0
  140. package/dist/neutral/Payment/Instrument/Card/index.d.ts.map +1 -0
  141. package/dist/neutral/Payment/Instrument/Schema.d.ts +5 -0
  142. package/dist/neutral/Payment/Instrument/Schema.d.ts.map +1 -0
  143. package/dist/neutral/Payment/Instrument/index.d.ts +3 -0
  144. package/dist/neutral/Payment/Instrument/index.d.ts.map +1 -0
  145. package/dist/neutral/Payment/Payload.d.ts +30 -0
  146. package/dist/neutral/Payment/Payload.d.ts.map +1 -0
  147. package/dist/neutral/Payment/Schema.d.ts +5 -0
  148. package/dist/neutral/Payment/Schema.d.ts.map +1 -0
  149. package/dist/neutral/Payment/Status/Payload.d.ts +29 -0
  150. package/dist/neutral/Payment/Status/Payload.d.ts.map +1 -0
  151. package/dist/neutral/Payment/Status/Schema.d.ts +5 -0
  152. package/dist/neutral/Payment/Status/Schema.d.ts.map +1 -0
  153. package/dist/neutral/Payment/Status/index.d.ts +3 -0
  154. package/dist/neutral/Payment/Status/index.d.ts.map +1 -0
  155. package/dist/neutral/Payment/index.d.ts +5 -0
  156. package/dist/neutral/Payment/index.d.ts.map +1 -0
  157. package/dist/neutral/Purchase/Payload.d.ts +31 -0
  158. package/dist/neutral/Purchase/Payload.d.ts.map +1 -0
  159. package/dist/neutral/Purchase/Schema.d.ts +5 -0
  160. package/dist/neutral/Purchase/Schema.d.ts.map +1 -0
  161. package/dist/neutral/Purchase/index.d.ts +3 -0
  162. package/dist/neutral/Purchase/index.d.ts.map +1 -0
  163. package/dist/neutral/Receipt/Payload.d.ts +30 -0
  164. package/dist/neutral/Receipt/Payload.d.ts.map +1 -0
  165. package/dist/neutral/Receipt/Schema.d.ts +5 -0
  166. package/dist/neutral/Receipt/Schema.d.ts.map +1 -0
  167. package/dist/neutral/Receipt/index.d.ts +3 -0
  168. package/dist/neutral/Receipt/index.d.ts.map +1 -0
  169. package/dist/neutral/Schema.d.ts +5 -0
  170. package/dist/neutral/Schema.d.ts.map +1 -0
  171. package/dist/neutral/Subtotal/Diviner/Config.d.ts +10 -0
  172. package/dist/neutral/Subtotal/Diviner/Config.d.ts.map +1 -0
  173. package/dist/neutral/Subtotal/Diviner/Params.d.ts +5 -0
  174. package/dist/neutral/Subtotal/Diviner/Params.d.ts.map +1 -0
  175. package/dist/neutral/Subtotal/Diviner/Payload.d.ts +25 -0
  176. package/dist/neutral/Subtotal/Diviner/Payload.d.ts.map +1 -0
  177. package/dist/neutral/Subtotal/Diviner/index.d.ts +4 -0
  178. package/dist/neutral/Subtotal/Diviner/index.d.ts.map +1 -0
  179. package/dist/neutral/Subtotal/index.d.ts +2 -0
  180. package/dist/neutral/Subtotal/index.d.ts.map +1 -0
  181. package/dist/neutral/Total/Diviner/Config.d.ts +20 -0
  182. package/dist/neutral/Total/Diviner/Config.d.ts.map +1 -0
  183. package/dist/neutral/Total/Diviner/Params.d.ts +5 -0
  184. package/dist/neutral/Total/Diviner/Params.d.ts.map +1 -0
  185. package/dist/neutral/Total/Diviner/Payload.d.ts +25 -0
  186. package/dist/neutral/Total/Diviner/Payload.d.ts.map +1 -0
  187. package/dist/neutral/Total/Diviner/index.d.ts +4 -0
  188. package/dist/neutral/Total/Diviner/index.d.ts.map +1 -0
  189. package/dist/neutral/Total/index.d.ts +2 -0
  190. package/dist/neutral/Total/index.d.ts.map +1 -0
  191. package/dist/neutral/index.d.ts +12 -0
  192. package/dist/neutral/index.d.ts.map +1 -0
  193. package/dist/neutral/index.mjs +1097 -0
  194. package/dist/neutral/index.mjs.map +1 -0
  195. package/package.json +18 -6
  196. package/src/Amount/Iso4217Currency.ts +0 -557
  197. package/src/Amount/Payload.ts +0 -36
  198. package/src/Amount/index.ts +0 -2
  199. package/src/Billing/Address/Address.ts +0 -48
  200. package/src/Billing/Address/Schema.ts +0 -6
  201. package/src/Billing/Address/index.ts +0 -2
  202. package/src/Billing/Schema.ts +0 -6
  203. package/src/Billing/index.ts +0 -2
  204. package/src/Currency.ts +0 -3
  205. package/src/Discount/Config.ts +0 -35
  206. package/src/Discount/Params.ts +0 -14
  207. package/src/Discount/Payload/Coupon/Conditions/AppraisalAmountCondition.ts +0 -43
  208. package/src/Discount/Payload/Coupon/Conditions/AssetQuantityCondition.ts +0 -25
  209. package/src/Discount/Payload/Coupon/Conditions/BuyerCondition.ts +0 -50
  210. package/src/Discount/Payload/Coupon/Conditions/index.ts +0 -3
  211. package/src/Discount/Payload/Coupon/Coupons/FixedAmount.ts +0 -35
  212. package/src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts +0 -36
  213. package/src/Discount/Payload/Coupon/Coupons/FixedPrice.ts +0 -35
  214. package/src/Discount/Payload/Coupon/Coupons/index.ts +0 -3
  215. package/src/Discount/Payload/Coupon/Payload.ts +0 -37
  216. package/src/Discount/Payload/Coupon/Schema.ts +0 -4
  217. package/src/Discount/Payload/Coupon/index.ts +0 -5
  218. package/src/Discount/Payload/Coupon/types/Condition.ts +0 -21
  219. package/src/Discount/Payload/Coupon/types/CouponFields.ts +0 -16
  220. package/src/Discount/Payload/Coupon/types/index.ts +0 -3
  221. package/src/Discount/Payload/Coupon/types/isStackable.ts +0 -6
  222. package/src/Discount/Payload/Discount.ts +0 -33
  223. package/src/Discount/Payload/NoDiscount.ts +0 -8
  224. package/src/Discount/Payload/index.ts +0 -3
  225. package/src/Discount/index.ts +0 -3
  226. package/src/Escrow/Outcome.ts +0 -42
  227. package/src/Escrow/Schema.ts +0 -4
  228. package/src/Escrow/Terms/PartySecret.ts +0 -6
  229. package/src/Escrow/Terms/Terms.ts +0 -82
  230. package/src/Escrow/Terms/index.ts +0 -3
  231. package/src/Escrow/index.ts +0 -5
  232. package/src/Escrow/util/appraisal/getAppraisalsByAsset.ts +0 -32
  233. package/src/Escrow/util/appraisal/getSignaturesByAppraisal.ts +0 -40
  234. package/src/Escrow/util/appraisal/index.ts +0 -2
  235. package/src/Escrow/util/index.ts +0 -2
  236. package/src/Escrow/util/secret/createEscrowIntent.ts +0 -17
  237. package/src/Escrow/util/secret/findEscrowPartySecretSignatures.ts +0 -47
  238. package/src/Escrow/util/secret/getEscrowSecret.ts +0 -11
  239. package/src/Escrow/util/secret/index.ts +0 -4
  240. package/src/Escrow/util/secret/updateEscrowTermsWithSecret.ts +0 -37
  241. package/src/Escrow/validators/common/ModuleInstanceValidators/index.ts +0 -1
  242. package/src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts +0 -48
  243. package/src/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.ts +0 -46
  244. package/src/Escrow/validators/common/SecretValidators/index.ts +0 -1
  245. package/src/Escrow/validators/common/TemporalValidators/index.ts +0 -1
  246. package/src/Escrow/validators/common/TemporalValidators/validateWithinWindow.ts +0 -6
  247. package/src/Escrow/validators/common/index.ts +0 -3
  248. package/src/Escrow/validators/escrow/agent.ts +0 -17
  249. package/src/Escrow/validators/escrow/appraisal.ts +0 -114
  250. package/src/Escrow/validators/escrow/appraisalAuthorities.ts +0 -37
  251. package/src/Escrow/validators/escrow/assets.ts +0 -19
  252. package/src/Escrow/validators/escrow/buyer.ts +0 -25
  253. package/src/Escrow/validators/escrow/buyerSecret.ts +0 -49
  254. package/src/Escrow/validators/escrow/index.ts +0 -10
  255. package/src/Escrow/validators/escrow/nbfExp.ts +0 -19
  256. package/src/Escrow/validators/escrow/paymentAuthorities.ts +0 -17
  257. package/src/Escrow/validators/escrow/seller.ts +0 -25
  258. package/src/Escrow/validators/escrow/sellerSecret.ts +0 -49
  259. package/src/Escrow/validators/index.ts +0 -2
  260. package/src/Invoice/Invoice.ts +0 -19
  261. package/src/Invoice/index.ts +0 -1
  262. package/src/Payment/Instrument/Card/Payload.ts +0 -50
  263. package/src/Payment/Instrument/Card/Schema.ts +0 -6
  264. package/src/Payment/Instrument/Card/index.ts +0 -2
  265. package/src/Payment/Instrument/Schema.ts +0 -6
  266. package/src/Payment/Instrument/index.ts +0 -2
  267. package/src/Payment/Payload.ts +0 -39
  268. package/src/Payment/Schema.ts +0 -6
  269. package/src/Payment/Status/Payload.ts +0 -39
  270. package/src/Payment/Status/Schema.ts +0 -6
  271. package/src/Payment/Status/index.ts +0 -2
  272. package/src/Payment/index.ts +0 -4
  273. package/src/Purchase/Payload.ts +0 -40
  274. package/src/Purchase/Schema.ts +0 -6
  275. package/src/Purchase/index.ts +0 -2
  276. package/src/Receipt/Payload.ts +0 -39
  277. package/src/Receipt/Schema.ts +0 -6
  278. package/src/Receipt/index.ts +0 -2
  279. package/src/Schema.ts +0 -4
  280. package/src/Subtotal/Diviner/Config.ts +0 -14
  281. package/src/Subtotal/Diviner/Params.ts +0 -8
  282. package/src/Subtotal/Diviner/Payload.ts +0 -33
  283. package/src/Subtotal/Diviner/index.ts +0 -3
  284. package/src/Subtotal/index.ts +0 -1
  285. package/src/Total/Diviner/Config.ts +0 -25
  286. package/src/Total/Diviner/Params.ts +0 -8
  287. package/src/Total/Diviner/Payload.ts +0 -33
  288. package/src/Total/Diviner/index.ts +0 -3
  289. package/src/Total/index.ts +0 -1
  290. package/src/index.ts +0 -11
@@ -1,50 +0,0 @@
1
- import { AsObjectFactory } from '@xylabs/sdk-js'
2
- import type { Payload, WithSources } from '@xyo-network/payload-model'
3
- import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'
4
-
5
- import { PaymentCardSchema } from './Schema.ts'
6
-
7
- /**
8
- * The fields describing a payment card.
9
- */
10
- export interface PaymentCardFields {
11
- /**
12
- * Card Number (PAN) of the payment card. This value is required to perform a payment.
13
- */
14
- cardNumber: string
15
- /**
16
- * The name as it appears on the payment card.
17
- */
18
- cardholderName?: string
19
- /**
20
- * Card Verification Value (CVV/CVC) of the payment card.
21
- */
22
- cvv: string
23
- /**
24
- * Expiration month of the payment card.
25
- */
26
- expMonth: number
27
- /**
28
- * Expiration year of the payment card.
29
- */
30
- expYear: number
31
- }
32
-
33
- /**
34
- * A PaymentCard Payload
35
- */
36
- export type PaymentCard = Payload<PaymentCardFields, PaymentCardSchema>
37
-
38
- /**
39
- * Identity function for determine if an object is a PaymentCard
40
- */
41
- export const isPaymentCard = isPayloadOfSchemaType<PaymentCard>(PaymentCardSchema)
42
- export const asPaymentCard = AsObjectFactory.create<PaymentCard>(isPaymentCard)
43
- export const asOptionalPaymentCard = AsObjectFactory.createOptional<PaymentCard>(isPaymentCard)
44
-
45
- /**
46
- * Identity function for determine if an object is a PaymentCard with sources
47
- */
48
- export const isPaymentCardWithSources = isPayloadOfSchemaTypeWithSources<PaymentCard>(PaymentCardSchema)
49
- export const asPaymentCardWithSources = AsObjectFactory.create<WithSources<PaymentCard>>(isPaymentCardWithSources)
50
- export const asOptionalPaymentCardWithSources = AsObjectFactory.createOptional<WithSources<PaymentCard>>(isPaymentCardWithSources)
@@ -1,6 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- import { PaymentInstrumentSchema } from '../Schema.ts'
4
-
5
- export const PaymentCardSchema = asSchema(`${PaymentInstrumentSchema}.card`, true)
6
- export type PaymentCardSchema = typeof PaymentCardSchema
@@ -1,2 +0,0 @@
1
- export * from './Payload.ts'
2
- export * from './Schema.ts'
@@ -1,6 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- import { PaymentSchema } from '../Schema.ts'
4
-
5
- export const PaymentInstrumentSchema = asSchema(`${PaymentSchema}.instrument`, true)
6
- export type PaymentInstrumentSchema = typeof PaymentInstrumentSchema
@@ -1,2 +0,0 @@
1
- export * from './Card/index.ts'
2
- export * from './Schema.ts'
@@ -1,39 +0,0 @@
1
- import { AsObjectFactory } from '@xylabs/sdk-js'
2
- import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
3
- import {
4
- isPayloadOfSchemaType,
5
- isPayloadOfSchemaTypeWithSources,
6
- } from '@xyo-network/payload-model'
7
-
8
- import type { SupportedCurrency } from '../Currency.ts'
9
- import { PaymentSchema } from './Schema.ts'
10
-
11
- export interface PaymentFields {
12
- /**
13
- * The amount paid
14
- */
15
- amount: number
16
- /**
17
- * The currency of the amount paid
18
- */
19
- currency: SupportedCurrency
20
- }
21
-
22
- /**
23
- * A payment is a record of an amount to be paid
24
- */
25
- export type Payment = PayloadWithSources<PaymentFields, PaymentSchema>
26
-
27
- /**
28
- * Identity function for determine if an object is a Payment
29
- */
30
- export const isPayment = isPayloadOfSchemaType<Payment>(PaymentSchema)
31
- export const asPayment = AsObjectFactory.create<Payment>(isPayment)
32
- export const asOptionalPayment = AsObjectFactory.createOptional<Payment>(isPayment)
33
-
34
- /**
35
- * Identity function for determine if an object is a Payment with sources
36
- */
37
- export const isPaymentWithSources = isPayloadOfSchemaTypeWithSources<Payment>(PaymentSchema)
38
- export const asPaymentWithSources = AsObjectFactory.create<WithSources<Payment>>(isPaymentWithSources)
39
- export const asOptionalPaymentWithSources = AsObjectFactory.createOptional<WithSources<Payment>>(isPaymentWithSources)
@@ -1,6 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- import { PaymentsSchema } from '../Schema.ts'
4
-
5
- export const PaymentSchema = asSchema(`${PaymentsSchema}.payment`, true)
6
- export type PaymentSchema = typeof PaymentSchema
@@ -1,39 +0,0 @@
1
- import { AsObjectFactory } from '@xylabs/sdk-js'
2
- import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
3
- import {
4
- isPayloadOfSchemaType,
5
- isPayloadOfSchemaTypeWithSources,
6
- } from '@xyo-network/payload-model'
7
-
8
- import { PaymentStatusSchema } from './Schema.ts'
9
-
10
- export interface PaymentStatusFields {
11
- /**
12
- * The result of the payment (i.e. declined)
13
- */
14
- result?: string
15
-
16
- /**
17
- * The status of the payment (i.e. completed)
18
- */
19
- status: string
20
- }
21
-
22
- /**
23
- * A payment status is the outcome of a payment attempt
24
- */
25
- export type PaymentStatus = PayloadWithSources<PaymentStatusFields, PaymentStatusSchema>
26
-
27
- /**
28
- * Identity function for determine if an object is a PaymentStatus
29
- */
30
- export const isPaymentStatus = isPayloadOfSchemaType<PaymentStatus>(PaymentStatusSchema)
31
- export const asPaymentStatus = AsObjectFactory.create<PaymentStatus>(isPaymentStatus)
32
- export const asOptionalPaymentStatus = AsObjectFactory.createOptional<PaymentStatus>(isPaymentStatus)
33
-
34
- /**
35
- * Identity function for determine if an object is a PaymentStatus with sources
36
- */
37
- export const isPaymentStatusWithSources = isPayloadOfSchemaTypeWithSources<PaymentStatus>(PaymentStatusSchema)
38
- export const asPaymentStatusWithSources = AsObjectFactory.create<WithSources<PaymentStatus>>(isPaymentStatusWithSources)
39
- export const asOptionalPaymentStatusWithSources = AsObjectFactory.createOptional<WithSources<PaymentStatus>>(isPaymentStatusWithSources)
@@ -1,6 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- import { PaymentSchema } from '../Schema.ts'
4
-
5
- export const PaymentStatusSchema = asSchema(`${PaymentSchema}.status`, true)
6
- export type PaymentStatusSchema = typeof PaymentStatusSchema
@@ -1,2 +0,0 @@
1
- export * from './Payload.ts'
2
- export * from './Schema.ts'
@@ -1,4 +0,0 @@
1
- export * from './Instrument/index.ts'
2
- export * from './Payload.ts'
3
- export * from './Schema.ts'
4
- export * from './Status/index.ts'
@@ -1,40 +0,0 @@
1
- import type { Hash } from '@xylabs/sdk-js'
2
- import { AsObjectFactory } from '@xylabs/sdk-js'
3
- import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
4
- import {
5
- isPayloadOfSchemaType,
6
- isPayloadOfSchemaTypeWithSources,
7
- } from '@xyo-network/payload-model'
8
-
9
- import { PurchaseSchema } from './Schema.ts'
10
-
11
- export interface PurchaseFields {
12
- /**
13
- * The things that were purchased
14
- */
15
- assets: Hash[]
16
- /**
17
- * The receipts for payments for this purchase. Array to allow for multiple payments
18
- * for a single quote.
19
- */
20
- receipts: Hash[]
21
- }
22
-
23
- /**
24
- * A purchase ties a payment made to a quote
25
- */
26
- export type Purchase = PayloadWithSources<PurchaseFields, PurchaseSchema>
27
-
28
- /**
29
- * Identity function for determine if an object is a Purchase
30
- */
31
- export const isPurchase = isPayloadOfSchemaType<Purchase>(PurchaseSchema)
32
- export const asPurchase = AsObjectFactory.create<Purchase>(isPurchase)
33
- export const asOptionalPurchase = AsObjectFactory.createOptional<Purchase>(isPurchase)
34
-
35
- /**
36
- * Identity function for determine if an object is a Purchase with sources
37
- */
38
- export const isPurchaseWithSources = isPayloadOfSchemaTypeWithSources<Purchase>(PurchaseSchema)
39
- export const asPurchaseWithSources = AsObjectFactory.create<WithSources<Purchase>>(isPurchaseWithSources)
40
- export const asOptionalPurchaseWithSources = AsObjectFactory.createOptional<WithSources<Purchase>>(isPurchaseWithSources)
@@ -1,6 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- import { PaymentsSchema } from '../Schema.ts'
4
-
5
- export const PurchaseSchema = asSchema(`${PaymentsSchema}.purchase`, true)
6
- export type PurchaseSchema = typeof PurchaseSchema
@@ -1,2 +0,0 @@
1
- export * from './Payload.ts'
2
- export * from './Schema.ts'
@@ -1,39 +0,0 @@
1
- import { AsObjectFactory } from '@xylabs/sdk-js'
2
- import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
3
- import {
4
- isPayloadOfSchemaType,
5
- isPayloadOfSchemaTypeWithSources,
6
- } from '@xyo-network/payload-model'
7
-
8
- import type { SupportedCurrency } from '../Currency.ts'
9
- import { ReceiptSchema } from './Schema.ts'
10
-
11
- export interface ReceiptFields {
12
- /**
13
- * The amount paid
14
- */
15
- amount: number
16
- /**
17
- * The currency of the amount paid
18
- */
19
- currency: SupportedCurrency
20
- }
21
-
22
- /**
23
- * A receipt is a record of a payment made
24
- */
25
- export type Receipt = PayloadWithSources<ReceiptFields, ReceiptSchema>
26
-
27
- /**
28
- * Identity function for determine if an object is a Receipt
29
- */
30
- export const isReceipt = isPayloadOfSchemaType<Receipt>(ReceiptSchema)
31
- export const asReceipt = AsObjectFactory.create<Receipt>(isReceipt)
32
- export const asOptionalReceipt = AsObjectFactory.createOptional<Receipt>(isReceipt)
33
-
34
- /**
35
- * Identity function for determine if an object is a Receipt with sources
36
- */
37
- export const isReceiptWithSources = isPayloadOfSchemaTypeWithSources<Receipt>(ReceiptSchema)
38
- export const asReceiptWithSources = AsObjectFactory.create<WithSources<Receipt>>(isReceiptWithSources)
39
- export const asOptionalReceiptWithSources = AsObjectFactory.createOptional<WithSources<Receipt>>(isReceiptWithSources)
@@ -1,6 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- import { PaymentsSchema } from '../Schema.ts'
4
-
5
- export const ReceiptSchema = asSchema(`${PaymentsSchema}.receipt`, true)
6
- export type ReceiptSchema = typeof ReceiptSchema
@@ -1,2 +0,0 @@
1
- export * from './Payload.ts'
2
- export * from './Schema.ts'
package/src/Schema.ts DELETED
@@ -1,4 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- export const PaymentsSchema = asSchema('network.xyo.payments', true)
4
- export type PaymentsSchema = typeof PaymentsSchema
@@ -1,14 +0,0 @@
1
- // import type { Hash } from '@xylabs/sdk-js'
2
- import type { DivinerConfig } from '@xyo-network/diviner-model'
3
- import { asSchema } from '@xyo-network/payload-model'
4
-
5
- export const PaymentSubtotalDivinerConfigSchema = asSchema('network.xyo.diviner.payments.subtotal.config', true)
6
- export type PaymentSubtotalDivinerConfigSchema = typeof PaymentSubtotalDivinerConfigSchema
7
-
8
- /**
9
- * The configuration for the Coupon Subtotal Diviner
10
- */
11
- export type PaymentSubtotalDivinerConfig = DivinerConfig<
12
- {},
13
- PaymentSubtotalDivinerConfigSchema
14
- >
@@ -1,8 +0,0 @@
1
- import type { DivinerParams } from '@xyo-network/diviner-model'
2
- import type { AnyConfigSchema } from '@xyo-network/module-model'
3
-
4
- import type { PaymentSubtotalDivinerConfig } from './Config.ts'
5
-
6
- export type PaymentSubtotalDivinerParams<
7
- TConfig extends AnyConfigSchema<PaymentSubtotalDivinerConfig> = AnyConfigSchema<PaymentSubtotalDivinerConfig>,
8
- > = DivinerParams<TConfig>
@@ -1,33 +0,0 @@
1
- import { AsObjectFactory } from '@xylabs/sdk-js'
2
- import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
3
- import {
4
- asSchema,
5
- isPayloadOfSchemaType,
6
- isPayloadOfSchemaTypeWithSources,
7
- } from '@xyo-network/payload-model'
8
-
9
- import type { AmountFields } from '../../Amount/index.ts'
10
-
11
- export const SubtotalSchema = asSchema('network.xyo.payments.subtotal', true)
12
- export type SubtotalSchema = typeof SubtotalSchema
13
-
14
- export interface SubtotalFields extends AmountFields {}
15
-
16
- /**
17
- * The result of a subtotal
18
- */
19
- export type Subtotal = PayloadWithSources<SubtotalFields, SubtotalSchema>
20
-
21
- /**
22
- * Identity function for determining if an object is an Subtotal
23
- */
24
- export const isSubtotal = isPayloadOfSchemaType<Subtotal>(SubtotalSchema)
25
- export const asSubtotal = AsObjectFactory.create<Subtotal>(isSubtotal)
26
- export const asOptionalSubtotal = AsObjectFactory.createOptional<Subtotal>(isSubtotal)
27
-
28
- /**
29
- * Identity function for determining if an object is an Subtotal with sources
30
- */
31
- export const isSubtotalWithSources = isPayloadOfSchemaTypeWithSources<Subtotal>(SubtotalSchema)
32
- export const asSubtotalWithSources = AsObjectFactory.create<WithSources<Subtotal>>(isSubtotalWithSources)
33
- export const asOptionalSubtotalWithSources = AsObjectFactory.createOptional<WithSources<Subtotal>>(isSubtotalWithSources)
@@ -1,3 +0,0 @@
1
- export * from './Config.ts'
2
- export * from './Params.ts'
3
- export * from './Payload.ts'
@@ -1 +0,0 @@
1
- export * from './Diviner/index.ts'
@@ -1,25 +0,0 @@
1
- // import type { Hash } from '@xylabs/sdk-js'
2
- import type { DivinerConfig } from '@xyo-network/diviner-model'
3
- import type { ModuleIdentifier } from '@xyo-network/module-model'
4
- import { asSchema } from '@xyo-network/payload-model'
5
-
6
- export const PaymentTotalDivinerConfigSchema = asSchema('network.xyo.diviner.payments.total.config', true)
7
- export type PaymentTotalDivinerConfigSchema = typeof PaymentTotalDivinerConfigSchema
8
-
9
- /**
10
- * The configuration for the Total Diviner
11
- */
12
- export type PaymentTotalDivinerConfig = DivinerConfig<
13
- {
14
- /**
15
- * The Diviner that will be used to determine the discount
16
- */
17
- paymentDiscountDiviner?: ModuleIdentifier
18
-
19
- /**
20
- * The Diviner that will be used to determine the subtotal
21
- */
22
- paymentSubtotalDiviner?: ModuleIdentifier
23
- },
24
- PaymentTotalDivinerConfigSchema
25
- >
@@ -1,8 +0,0 @@
1
- import type { DivinerParams } from '@xyo-network/diviner-model'
2
- import type { AnyConfigSchema } from '@xyo-network/module-model'
3
-
4
- import type { PaymentTotalDivinerConfig } from './Config.ts'
5
-
6
- export type PaymentTotalDivinerParams<
7
- TConfig extends AnyConfigSchema<PaymentTotalDivinerConfig> = AnyConfigSchema<PaymentTotalDivinerConfig>,
8
- > = DivinerParams<TConfig>
@@ -1,33 +0,0 @@
1
- import { AsObjectFactory } from '@xylabs/sdk-js'
2
- import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
3
- import {
4
- asSchema,
5
- isPayloadOfSchemaType,
6
- isPayloadOfSchemaTypeWithSources,
7
- } from '@xyo-network/payload-model'
8
-
9
- import type { AmountFields } from '../../Amount/index.ts'
10
-
11
- export const TotalSchema = asSchema('network.xyo.payments.total', true)
12
- export type TotalSchema = typeof TotalSchema
13
-
14
- export interface TotalFields extends AmountFields {}
15
-
16
- /**
17
- * The result of a total
18
- */
19
- export type Total = PayloadWithSources<TotalFields, TotalSchema>
20
-
21
- /**
22
- * Identity function for determining if an object is an Total
23
- */
24
- export const isTotal = isPayloadOfSchemaType<Total>(TotalSchema)
25
- export const asTotal = AsObjectFactory.create<Total>(isTotal)
26
- export const asOptionalTotal = AsObjectFactory.createOptional<Total>(isTotal)
27
-
28
- /**
29
- * Identity function for determining if an object is an Total with sources
30
- */
31
- export const isTotalWithSources = isPayloadOfSchemaTypeWithSources<Total>(TotalSchema)
32
- export const asTotalWithSources = AsObjectFactory.create<WithSources<Total>>(isTotalWithSources)
33
- export const asOptionalTotalWithSources = AsObjectFactory.createOptional<WithSources<Total>>(isTotalWithSources)
@@ -1,3 +0,0 @@
1
- export * from './Config.ts'
2
- export * from './Params.ts'
3
- export * from './Payload.ts'
@@ -1 +0,0 @@
1
- export * from './Diviner/index.ts'
package/src/index.ts DELETED
@@ -1,11 +0,0 @@
1
- export * from './Amount/index.ts'
2
- export * from './Billing/index.ts'
3
- export * from './Currency.ts'
4
- export * from './Discount/index.ts'
5
- export * from './Escrow/index.ts'
6
- export * from './Invoice/index.ts'
7
- export * from './Payment/index.ts'
8
- export * from './Purchase/index.ts'
9
- export * from './Receipt/index.ts'
10
- export * from './Subtotal/index.ts'
11
- export * from './Total/index.ts'