@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.
- package/dist/neutral/Amount/Iso4217Currency.d.ts +14 -0
- package/dist/neutral/Amount/Iso4217Currency.d.ts.map +1 -0
- package/dist/neutral/Amount/Payload.d.ts +27 -0
- package/dist/neutral/Amount/Payload.d.ts.map +1 -0
- package/dist/neutral/Amount/index.d.ts +3 -0
- package/dist/neutral/Amount/index.d.ts.map +1 -0
- package/dist/neutral/Billing/Address/Address.d.ts +42 -0
- package/dist/neutral/Billing/Address/Address.d.ts.map +1 -0
- package/dist/neutral/Billing/Address/Schema.d.ts +5 -0
- package/dist/neutral/Billing/Address/Schema.d.ts.map +1 -0
- package/dist/neutral/Billing/Address/index.d.ts +3 -0
- package/dist/neutral/Billing/Address/index.d.ts.map +1 -0
- package/dist/neutral/Billing/Schema.d.ts +5 -0
- package/dist/neutral/Billing/Schema.d.ts.map +1 -0
- package/dist/neutral/Billing/index.d.ts +3 -0
- package/dist/neutral/Billing/index.d.ts.map +1 -0
- package/dist/neutral/Currency.d.ts +2 -0
- package/dist/neutral/Currency.d.ts.map +1 -0
- package/dist/neutral/Discount/Config.d.ts +25 -0
- package/dist/neutral/Discount/Config.d.ts.map +1 -0
- package/dist/neutral/Discount/Params.d.ts +11 -0
- package/dist/neutral/Discount/Params.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/AppraisalAmountCondition.d.ts +8 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/AppraisalAmountCondition.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/AssetQuantityCondition.d.ts +8 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/AssetQuantityCondition.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/BuyerCondition.d.ts +34 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/BuyerCondition.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +26 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +26 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +26 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts +16 -0
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts +5 -0
- package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/index.d.ts +6 -0
- package/dist/neutral/Discount/Payload/Coupon/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts +16 -0
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts +16 -0
- package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/Coupon/types/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/isStackable.d.ts +5 -0
- package/dist/neutral/Discount/Payload/Coupon/types/isStackable.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Discount.d.ts +25 -0
- package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/NoDiscount.d.ts +3 -0
- package/dist/neutral/Discount/Payload/NoDiscount.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/index.d.ts.map +1 -0
- package/dist/neutral/Discount/index.d.ts +4 -0
- package/dist/neutral/Discount/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/Outcome.d.ts +31 -0
- package/dist/neutral/Escrow/Outcome.d.ts.map +1 -0
- package/dist/neutral/Escrow/Schema.d.ts +5 -0
- package/dist/neutral/Escrow/Schema.d.ts.map +1 -0
- package/{src/Escrow/Terms/Party.ts → dist/neutral/Escrow/Terms/Party.d.ts} +3 -3
- package/dist/neutral/Escrow/Terms/Party.d.ts.map +1 -0
- package/dist/neutral/Escrow/Terms/PartySecret.d.ts +6 -0
- package/dist/neutral/Escrow/Terms/PartySecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/Terms/Terms.d.ts +73 -0
- package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -0
- package/dist/neutral/Escrow/Terms/index.d.ts +4 -0
- package/dist/neutral/Escrow/Terms/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/index.d.ts +6 -0
- package/dist/neutral/Escrow/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts +12 -0
- package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts +13 -0
- package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/appraisal/index.d.ts +3 -0
- package/dist/neutral/Escrow/util/appraisal/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/index.d.ts +3 -0
- package/dist/neutral/Escrow/util/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts +31 -0
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts +13 -0
- package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/getEscrowSecret.d.ts +7 -0
- package/dist/neutral/Escrow/util/secret/getEscrowSecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/index.d.ts +5 -0
- package/dist/neutral/Escrow/util/secret/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts +33 -0
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.ts +2 -0
- package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts +22 -0
- package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts +10 -0
- package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/SecretValidators/index.d.ts +2 -0
- package/dist/neutral/Escrow/validators/common/SecretValidators/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.ts +2 -0
- package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.ts +6 -0
- package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/index.d.ts +4 -0
- package/dist/neutral/Escrow/validators/common/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/agent.d.ts +5 -0
- package/dist/neutral/Escrow/validators/escrow/agent.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts +29 -0
- package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts +10 -0
- package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/assets.d.ts +8 -0
- package/dist/neutral/Escrow/validators/escrow/assets.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/buyer.d.ts +8 -0
- package/dist/neutral/Escrow/validators/escrow/buyer.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts +21 -0
- package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/index.d.ts +11 -0
- package/dist/neutral/Escrow/validators/escrow/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts +4 -0
- package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts +5 -0
- package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/seller.d.ts +8 -0
- package/dist/neutral/Escrow/validators/escrow/seller.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts +21 -0
- package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/index.d.ts +3 -0
- package/dist/neutral/Escrow/validators/index.d.ts.map +1 -0
- package/dist/neutral/Invoice/Invoice.d.ts +17 -0
- package/dist/neutral/Invoice/Invoice.d.ts.map +1 -0
- package/dist/neutral/Invoice/index.d.ts +2 -0
- package/dist/neutral/Invoice/index.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +44 -0
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/Card/Schema.d.ts +5 -0
- package/dist/neutral/Payment/Instrument/Card/Schema.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/Card/index.d.ts +3 -0
- package/dist/neutral/Payment/Instrument/Card/index.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/Schema.d.ts +5 -0
- package/dist/neutral/Payment/Instrument/Schema.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/index.d.ts +3 -0
- package/dist/neutral/Payment/Instrument/index.d.ts.map +1 -0
- package/dist/neutral/Payment/Payload.d.ts +30 -0
- package/dist/neutral/Payment/Payload.d.ts.map +1 -0
- package/dist/neutral/Payment/Schema.d.ts +5 -0
- package/dist/neutral/Payment/Schema.d.ts.map +1 -0
- package/dist/neutral/Payment/Status/Payload.d.ts +29 -0
- package/dist/neutral/Payment/Status/Payload.d.ts.map +1 -0
- package/dist/neutral/Payment/Status/Schema.d.ts +5 -0
- package/dist/neutral/Payment/Status/Schema.d.ts.map +1 -0
- package/dist/neutral/Payment/Status/index.d.ts +3 -0
- package/dist/neutral/Payment/Status/index.d.ts.map +1 -0
- package/dist/neutral/Payment/index.d.ts +5 -0
- package/dist/neutral/Payment/index.d.ts.map +1 -0
- package/dist/neutral/Purchase/Payload.d.ts +31 -0
- package/dist/neutral/Purchase/Payload.d.ts.map +1 -0
- package/dist/neutral/Purchase/Schema.d.ts +5 -0
- package/dist/neutral/Purchase/Schema.d.ts.map +1 -0
- package/dist/neutral/Purchase/index.d.ts +3 -0
- package/dist/neutral/Purchase/index.d.ts.map +1 -0
- package/dist/neutral/Receipt/Payload.d.ts +30 -0
- package/dist/neutral/Receipt/Payload.d.ts.map +1 -0
- package/dist/neutral/Receipt/Schema.d.ts +5 -0
- package/dist/neutral/Receipt/Schema.d.ts.map +1 -0
- package/dist/neutral/Receipt/index.d.ts +3 -0
- package/dist/neutral/Receipt/index.d.ts.map +1 -0
- package/dist/neutral/Schema.d.ts +5 -0
- package/dist/neutral/Schema.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/Config.d.ts +10 -0
- package/dist/neutral/Subtotal/Diviner/Config.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/Params.d.ts +5 -0
- package/dist/neutral/Subtotal/Diviner/Params.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts +25 -0
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/index.d.ts +4 -0
- package/dist/neutral/Subtotal/Diviner/index.d.ts.map +1 -0
- package/dist/neutral/Subtotal/index.d.ts +2 -0
- package/dist/neutral/Subtotal/index.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/Config.d.ts +20 -0
- package/dist/neutral/Total/Diviner/Config.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/Params.d.ts +5 -0
- package/dist/neutral/Total/Diviner/Params.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/Payload.d.ts +25 -0
- package/dist/neutral/Total/Diviner/Payload.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/index.d.ts +4 -0
- package/dist/neutral/Total/Diviner/index.d.ts.map +1 -0
- package/dist/neutral/Total/index.d.ts +2 -0
- package/dist/neutral/Total/index.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +12 -0
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +1097 -0
- package/dist/neutral/index.mjs.map +1 -0
- package/package.json +18 -6
- package/src/Amount/Iso4217Currency.ts +0 -557
- package/src/Amount/Payload.ts +0 -36
- package/src/Amount/index.ts +0 -2
- package/src/Billing/Address/Address.ts +0 -48
- package/src/Billing/Address/Schema.ts +0 -6
- package/src/Billing/Address/index.ts +0 -2
- package/src/Billing/Schema.ts +0 -6
- package/src/Billing/index.ts +0 -2
- package/src/Currency.ts +0 -3
- package/src/Discount/Config.ts +0 -35
- package/src/Discount/Params.ts +0 -14
- package/src/Discount/Payload/Coupon/Conditions/AppraisalAmountCondition.ts +0 -43
- package/src/Discount/Payload/Coupon/Conditions/AssetQuantityCondition.ts +0 -25
- package/src/Discount/Payload/Coupon/Conditions/BuyerCondition.ts +0 -50
- package/src/Discount/Payload/Coupon/Conditions/index.ts +0 -3
- package/src/Discount/Payload/Coupon/Coupons/FixedAmount.ts +0 -35
- package/src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts +0 -36
- package/src/Discount/Payload/Coupon/Coupons/FixedPrice.ts +0 -35
- package/src/Discount/Payload/Coupon/Coupons/index.ts +0 -3
- package/src/Discount/Payload/Coupon/Payload.ts +0 -37
- package/src/Discount/Payload/Coupon/Schema.ts +0 -4
- package/src/Discount/Payload/Coupon/index.ts +0 -5
- package/src/Discount/Payload/Coupon/types/Condition.ts +0 -21
- package/src/Discount/Payload/Coupon/types/CouponFields.ts +0 -16
- package/src/Discount/Payload/Coupon/types/index.ts +0 -3
- package/src/Discount/Payload/Coupon/types/isStackable.ts +0 -6
- package/src/Discount/Payload/Discount.ts +0 -33
- package/src/Discount/Payload/NoDiscount.ts +0 -8
- package/src/Discount/Payload/index.ts +0 -3
- package/src/Discount/index.ts +0 -3
- package/src/Escrow/Outcome.ts +0 -42
- package/src/Escrow/Schema.ts +0 -4
- package/src/Escrow/Terms/PartySecret.ts +0 -6
- package/src/Escrow/Terms/Terms.ts +0 -82
- package/src/Escrow/Terms/index.ts +0 -3
- package/src/Escrow/index.ts +0 -5
- package/src/Escrow/util/appraisal/getAppraisalsByAsset.ts +0 -32
- package/src/Escrow/util/appraisal/getSignaturesByAppraisal.ts +0 -40
- package/src/Escrow/util/appraisal/index.ts +0 -2
- package/src/Escrow/util/index.ts +0 -2
- package/src/Escrow/util/secret/createEscrowIntent.ts +0 -17
- package/src/Escrow/util/secret/findEscrowPartySecretSignatures.ts +0 -47
- package/src/Escrow/util/secret/getEscrowSecret.ts +0 -11
- package/src/Escrow/util/secret/index.ts +0 -4
- package/src/Escrow/util/secret/updateEscrowTermsWithSecret.ts +0 -37
- package/src/Escrow/validators/common/ModuleInstanceValidators/index.ts +0 -1
- package/src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts +0 -48
- package/src/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.ts +0 -46
- package/src/Escrow/validators/common/SecretValidators/index.ts +0 -1
- package/src/Escrow/validators/common/TemporalValidators/index.ts +0 -1
- package/src/Escrow/validators/common/TemporalValidators/validateWithinWindow.ts +0 -6
- package/src/Escrow/validators/common/index.ts +0 -3
- package/src/Escrow/validators/escrow/agent.ts +0 -17
- package/src/Escrow/validators/escrow/appraisal.ts +0 -114
- package/src/Escrow/validators/escrow/appraisalAuthorities.ts +0 -37
- package/src/Escrow/validators/escrow/assets.ts +0 -19
- package/src/Escrow/validators/escrow/buyer.ts +0 -25
- package/src/Escrow/validators/escrow/buyerSecret.ts +0 -49
- package/src/Escrow/validators/escrow/index.ts +0 -10
- package/src/Escrow/validators/escrow/nbfExp.ts +0 -19
- package/src/Escrow/validators/escrow/paymentAuthorities.ts +0 -17
- package/src/Escrow/validators/escrow/seller.ts +0 -25
- package/src/Escrow/validators/escrow/sellerSecret.ts +0 -49
- package/src/Escrow/validators/index.ts +0 -2
- package/src/Invoice/Invoice.ts +0 -19
- package/src/Invoice/index.ts +0 -1
- package/src/Payment/Instrument/Card/Payload.ts +0 -50
- package/src/Payment/Instrument/Card/Schema.ts +0 -6
- package/src/Payment/Instrument/Card/index.ts +0 -2
- package/src/Payment/Instrument/Schema.ts +0 -6
- package/src/Payment/Instrument/index.ts +0 -2
- package/src/Payment/Payload.ts +0 -39
- package/src/Payment/Schema.ts +0 -6
- package/src/Payment/Status/Payload.ts +0 -39
- package/src/Payment/Status/Schema.ts +0 -6
- package/src/Payment/Status/index.ts +0 -2
- package/src/Payment/index.ts +0 -4
- package/src/Purchase/Payload.ts +0 -40
- package/src/Purchase/Schema.ts +0 -6
- package/src/Purchase/index.ts +0 -2
- package/src/Receipt/Payload.ts +0 -39
- package/src/Receipt/Schema.ts +0 -6
- package/src/Receipt/index.ts +0 -2
- package/src/Schema.ts +0 -4
- package/src/Subtotal/Diviner/Config.ts +0 -14
- package/src/Subtotal/Diviner/Params.ts +0 -8
- package/src/Subtotal/Diviner/Payload.ts +0 -33
- package/src/Subtotal/Diviner/index.ts +0 -3
- package/src/Subtotal/index.ts +0 -1
- package/src/Total/Diviner/Config.ts +0 -25
- package/src/Total/Diviner/Params.ts +0 -8
- package/src/Total/Diviner/Payload.ts +0 -33
- package/src/Total/Diviner/index.ts +0 -3
- package/src/Total/index.ts +0 -1
- 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)
|
package/src/Payment/Payload.ts
DELETED
|
@@ -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)
|
package/src/Payment/Schema.ts
DELETED
|
@@ -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)
|
package/src/Payment/index.ts
DELETED
package/src/Purchase/Payload.ts
DELETED
|
@@ -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)
|
package/src/Purchase/Schema.ts
DELETED
package/src/Purchase/index.ts
DELETED
package/src/Receipt/Payload.ts
DELETED
|
@@ -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)
|
package/src/Receipt/Schema.ts
DELETED
package/src/Receipt/index.ts
DELETED
package/src/Schema.ts
DELETED
|
@@ -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)
|
package/src/Subtotal/index.ts
DELETED
|
@@ -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)
|
package/src/Total/index.ts
DELETED
|
@@ -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'
|