@xyo-network/payment-payload-plugins 5.2.3 → 5.3.1
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/Payload.d.ts +5 -3
- package/dist/neutral/Amount/Payload.d.ts.map +1 -1
- package/dist/neutral/Billing/Address/Address.d.ts +2 -2
- package/dist/neutral/Billing/Address/Address.d.ts.map +1 -1
- package/dist/neutral/Billing/Address/Schema.d.ts +3 -1
- package/dist/neutral/Billing/Address/Schema.d.ts.map +1 -1
- package/dist/neutral/Billing/Schema.d.ts +3 -1
- package/dist/neutral/Billing/Schema.d.ts.map +1 -1
- package/dist/neutral/Discount/Config.d.ts +3 -1
- package/dist/neutral/Discount/Config.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +5 -3
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +5 -3
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +5 -3
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts +3 -1
- package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Discount.d.ts +5 -3
- package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -1
- package/dist/neutral/Escrow/Outcome.d.ts +6 -4
- package/dist/neutral/Escrow/Outcome.d.ts.map +1 -1
- package/dist/neutral/Escrow/Schema.d.ts +3 -1
- package/dist/neutral/Escrow/Schema.d.ts.map +1 -1
- package/dist/neutral/Escrow/Terms/Terms.d.ts +5 -3
- package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts +18 -8
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts +18 -8
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts.map +1 -1
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +2 -2
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -1
- package/dist/neutral/Payment/Instrument/Card/Schema.d.ts +3 -1
- package/dist/neutral/Payment/Instrument/Card/Schema.d.ts.map +1 -1
- package/dist/neutral/Payment/Instrument/Schema.d.ts +3 -1
- package/dist/neutral/Payment/Instrument/Schema.d.ts.map +1 -1
- package/dist/neutral/Payment/Payload.d.ts +2 -2
- package/dist/neutral/Payment/Payload.d.ts.map +1 -1
- package/dist/neutral/Payment/Schema.d.ts +3 -1
- package/dist/neutral/Payment/Schema.d.ts.map +1 -1
- package/dist/neutral/Payment/Status/Payload.d.ts +2 -2
- package/dist/neutral/Payment/Status/Payload.d.ts.map +1 -1
- package/dist/neutral/Payment/Status/Schema.d.ts +3 -1
- package/dist/neutral/Payment/Status/Schema.d.ts.map +1 -1
- package/dist/neutral/Purchase/Payload.d.ts +2 -2
- package/dist/neutral/Purchase/Payload.d.ts.map +1 -1
- package/dist/neutral/Purchase/Schema.d.ts +3 -1
- package/dist/neutral/Purchase/Schema.d.ts.map +1 -1
- package/dist/neutral/Receipt/Payload.d.ts +2 -2
- package/dist/neutral/Receipt/Payload.d.ts.map +1 -1
- package/dist/neutral/Receipt/Schema.d.ts +3 -1
- package/dist/neutral/Receipt/Schema.d.ts.map +1 -1
- package/dist/neutral/Schema.d.ts +3 -1
- package/dist/neutral/Schema.d.ts.map +1 -1
- package/dist/neutral/Subtotal/Diviner/Config.d.ts +3 -1
- package/dist/neutral/Subtotal/Diviner/Config.d.ts.map +1 -1
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts +5 -3
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts.map +1 -1
- package/dist/neutral/Total/Diviner/Config.d.ts +3 -1
- package/dist/neutral/Total/Diviner/Config.d.ts.map +1 -1
- package/dist/neutral/Total/Diviner/Payload.d.ts +5 -3
- package/dist/neutral/Total/Diviner/Payload.d.ts.map +1 -1
- package/dist/neutral/index.mjs +58 -24
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/Amount/Payload.ts +2 -1
- package/src/Billing/Address/Schema.ts +3 -1
- package/src/Billing/Schema.ts +3 -1
- package/src/Discount/Config.ts +2 -1
- package/src/Discount/Payload/Coupon/Coupons/FixedAmount.ts +2 -1
- package/src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts +2 -1
- package/src/Discount/Payload/Coupon/Coupons/FixedPrice.ts +2 -1
- package/src/Discount/Payload/Coupon/Schema.ts +3 -1
- package/src/Discount/Payload/Discount.ts +2 -1
- package/src/Escrow/Outcome.ts +2 -1
- package/src/Escrow/Schema.ts +3 -1
- package/src/Escrow/Terms/Terms.ts +4 -2
- package/src/Payment/Instrument/Card/Schema.ts +3 -1
- package/src/Payment/Instrument/Schema.ts +3 -1
- package/src/Payment/Schema.ts +3 -1
- package/src/Payment/Status/Schema.ts +3 -1
- package/src/Purchase/Schema.ts +3 -1
- package/src/Receipt/Schema.ts +3 -1
- package/src/Schema.ts +3 -1
- package/src/Subtotal/Diviner/Config.ts +2 -1
- package/src/Subtotal/Diviner/Payload.ts +2 -1
- package/src/Total/Diviner/Config.ts +2 -1
- package/src/Total/Diviner/Payload.ts +2 -1
package/src/Discount/Config.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import type { Address } from '@xylabs/hex'
|
|
3
3
|
import type { DivinerConfig } from '@xyo-network/diviner-model'
|
|
4
4
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
5
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
5
6
|
|
|
6
|
-
export const PaymentDiscountDivinerConfigSchema = 'network.xyo.diviner.payments.discount.config'
|
|
7
|
+
export const PaymentDiscountDivinerConfigSchema = asSchema('network.xyo.diviner.payments.discount.config', true)
|
|
7
8
|
export type PaymentDiscountDivinerConfigSchema = typeof PaymentDiscountDivinerConfigSchema
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
2
|
import type { Payload, WithSources } from '@xyo-network/payload-model'
|
|
3
3
|
import {
|
|
4
|
+
asSchema,
|
|
4
5
|
isPayloadOfSchemaType,
|
|
5
6
|
isPayloadOfSchemaTypeWithSources,
|
|
6
7
|
} from '@xyo-network/payload-model'
|
|
@@ -9,7 +10,7 @@ import type { AmountFields } from '../../../../Amount/index.ts'
|
|
|
9
10
|
import { CouponSchema } from '../Schema.ts'
|
|
10
11
|
import type { CouponFields } from '../types/index.ts'
|
|
11
12
|
|
|
12
|
-
export const FixedAmountCouponSchema = `${CouponSchema}.fixed.amount
|
|
13
|
+
export const FixedAmountCouponSchema = asSchema(`${CouponSchema}.fixed.amount`, true)
|
|
13
14
|
export type FixedAmountCouponSchema = typeof FixedAmountCouponSchema
|
|
14
15
|
|
|
15
16
|
export interface FixedAmountCouponFields extends CouponFields, AmountFields {}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
2
|
import type { Payload, WithSources } from '@xyo-network/payload-model'
|
|
3
3
|
import {
|
|
4
|
+
asSchema,
|
|
4
5
|
isPayloadOfSchemaType,
|
|
5
6
|
isPayloadOfSchemaTypeWithSources,
|
|
6
7
|
} from '@xyo-network/payload-model'
|
|
@@ -8,7 +9,7 @@ import {
|
|
|
8
9
|
import { CouponSchema } from '../Schema.ts'
|
|
9
10
|
import type { CouponFields } from '../types/index.ts'
|
|
10
11
|
|
|
11
|
-
export const FixedPercentageCouponSchema = `${CouponSchema}.fixed.percentage
|
|
12
|
+
export const FixedPercentageCouponSchema = asSchema(`${CouponSchema}.fixed.percentage`, true)
|
|
12
13
|
export type FixedPercentageCouponSchema = typeof FixedPercentageCouponSchema
|
|
13
14
|
|
|
14
15
|
export interface FixedPercentageCouponFields extends CouponFields {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
2
|
import type { Payload, WithSources } from '@xyo-network/payload-model'
|
|
3
3
|
import {
|
|
4
|
+
asSchema,
|
|
4
5
|
isPayloadOfSchemaType,
|
|
5
6
|
isPayloadOfSchemaTypeWithSources,
|
|
6
7
|
} from '@xyo-network/payload-model'
|
|
@@ -9,7 +10,7 @@ import type { AmountFields } from '../../../../Amount/index.ts'
|
|
|
9
10
|
import { CouponSchema } from '../Schema.ts'
|
|
10
11
|
import type { CouponFields } from '../types/index.ts'
|
|
11
12
|
|
|
12
|
-
export const FixedPriceCouponSchema = `${CouponSchema}.fixed.price
|
|
13
|
+
export const FixedPriceCouponSchema = asSchema(`${CouponSchema}.fixed.price`, true)
|
|
13
14
|
export type FixedPriceCouponSchema = typeof FixedPriceCouponSchema
|
|
14
15
|
|
|
15
16
|
export interface FixedPriceCouponFields extends CouponFields, AmountFields { }
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
2
|
import type { Payload, WithSources } from '@xyo-network/payload-model'
|
|
3
3
|
import {
|
|
4
|
+
asSchema,
|
|
4
5
|
isPayloadOfSchemaType,
|
|
5
6
|
isPayloadOfSchemaTypeWithSources,
|
|
6
7
|
} from '@xyo-network/payload-model'
|
|
7
8
|
|
|
8
9
|
import type { AmountFields } from '../../Amount/index.ts'
|
|
9
10
|
|
|
10
|
-
export const DiscountSchema = 'network.xyo.payments.discount'
|
|
11
|
+
export const DiscountSchema = asSchema('network.xyo.payments.discount', true)
|
|
11
12
|
export type DiscountSchema = typeof DiscountSchema
|
|
12
13
|
|
|
13
14
|
export interface DiscountFields extends AmountFields { }
|
package/src/Escrow/Outcome.ts
CHANGED
|
@@ -2,13 +2,14 @@ import type { Hash } from '@xylabs/hex'
|
|
|
2
2
|
import { AsObjectFactory } from '@xylabs/object'
|
|
3
3
|
import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
|
|
4
4
|
import {
|
|
5
|
+
asSchema,
|
|
5
6
|
isPayloadOfSchemaType,
|
|
6
7
|
isPayloadOfSchemaTypeWithSources,
|
|
7
8
|
} from '@xyo-network/payload-model'
|
|
8
9
|
|
|
9
10
|
import { EscrowSchema } from './Schema.ts'
|
|
10
11
|
|
|
11
|
-
export const EscrowOutcomeSchema = `${EscrowSchema}.outcome
|
|
12
|
+
export const EscrowOutcomeSchema = asSchema(`${EscrowSchema}.outcome`, true)
|
|
12
13
|
export type EscrowOutcomeSchema = typeof EscrowOutcomeSchema
|
|
13
14
|
|
|
14
15
|
/**
|
package/src/Escrow/Schema.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { Address, Hash } from '@xylabs/hex'
|
|
2
2
|
import { AsObjectFactory } from '@xylabs/object'
|
|
3
3
|
import type { Payload } from '@xyo-network/payload-model'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
asSchema, isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources,
|
|
6
|
+
} from '@xyo-network/payload-model'
|
|
5
7
|
|
|
6
8
|
import { EscrowSchema } from '../Schema.ts'
|
|
7
9
|
|
|
8
|
-
export const EscrowTermsSchema = `${EscrowSchema}.terms
|
|
10
|
+
export const EscrowTermsSchema = asSchema(`${EscrowSchema}.terms`, true)
|
|
9
11
|
export type EscrowTermsSchema = typeof EscrowTermsSchema
|
|
10
12
|
|
|
11
13
|
// TODO: Include escrow agent in escrow terms
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
2
|
+
|
|
1
3
|
import { PaymentInstrumentSchema } from '../Schema.ts'
|
|
2
4
|
|
|
3
|
-
export const PaymentCardSchema = `${PaymentInstrumentSchema}.card
|
|
5
|
+
export const PaymentCardSchema = asSchema(`${PaymentInstrumentSchema}.card`, true)
|
|
4
6
|
export type PaymentCardSchema = typeof PaymentCardSchema
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
2
|
+
|
|
1
3
|
import { PaymentSchema } from '../Schema.ts'
|
|
2
4
|
|
|
3
|
-
export const PaymentInstrumentSchema = `${PaymentSchema}.instrument
|
|
5
|
+
export const PaymentInstrumentSchema = asSchema(`${PaymentSchema}.instrument`, true)
|
|
4
6
|
export type PaymentInstrumentSchema = typeof PaymentInstrumentSchema
|
package/src/Payment/Schema.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
2
|
+
|
|
1
3
|
import { PaymentsSchema } from '../Schema.ts'
|
|
2
4
|
|
|
3
|
-
export const PaymentSchema = `${PaymentsSchema}.payment
|
|
5
|
+
export const PaymentSchema = asSchema(`${PaymentsSchema}.payment`, true)
|
|
4
6
|
export type PaymentSchema = typeof PaymentSchema
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
2
|
+
|
|
1
3
|
import { PaymentSchema } from '../Schema.ts'
|
|
2
4
|
|
|
3
|
-
export const PaymentStatusSchema = `${PaymentSchema}.status
|
|
5
|
+
export const PaymentStatusSchema = asSchema(`${PaymentSchema}.status`, true)
|
|
4
6
|
export type PaymentStatusSchema = typeof PaymentStatusSchema
|
package/src/Purchase/Schema.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
2
|
+
|
|
1
3
|
import { PaymentsSchema } from '../Schema.ts'
|
|
2
4
|
|
|
3
|
-
export const PurchaseSchema = `${PaymentsSchema}.purchase
|
|
5
|
+
export const PurchaseSchema = asSchema(`${PaymentsSchema}.purchase`, true)
|
|
4
6
|
export type PurchaseSchema = typeof PurchaseSchema
|
package/src/Receipt/Schema.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
2
|
+
|
|
1
3
|
import { PaymentsSchema } from '../Schema.ts'
|
|
2
4
|
|
|
3
|
-
export const ReceiptSchema = `${PaymentsSchema}.receipt
|
|
5
|
+
export const ReceiptSchema = asSchema(`${PaymentsSchema}.receipt`, true)
|
|
4
6
|
export type ReceiptSchema = typeof ReceiptSchema
|
package/src/Schema.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// import type { Hash } from '@xylabs/hex'
|
|
2
2
|
import type { DivinerConfig } from '@xyo-network/diviner-model'
|
|
3
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
3
4
|
|
|
4
|
-
export const PaymentSubtotalDivinerConfigSchema = 'network.xyo.diviner.payments.subtotal.config'
|
|
5
|
+
export const PaymentSubtotalDivinerConfigSchema = asSchema('network.xyo.diviner.payments.subtotal.config', true)
|
|
5
6
|
export type PaymentSubtotalDivinerConfigSchema = typeof PaymentSubtotalDivinerConfigSchema
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
2
|
import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
|
|
3
3
|
import {
|
|
4
|
+
asSchema,
|
|
4
5
|
isPayloadOfSchemaType,
|
|
5
6
|
isPayloadOfSchemaTypeWithSources,
|
|
6
7
|
} from '@xyo-network/payload-model'
|
|
7
8
|
|
|
8
9
|
import type { AmountFields } from '../../Amount/index.ts'
|
|
9
10
|
|
|
10
|
-
export const SubtotalSchema = 'network.xyo.payments.subtotal'
|
|
11
|
+
export const SubtotalSchema = asSchema('network.xyo.payments.subtotal', true)
|
|
11
12
|
export type SubtotalSchema = typeof SubtotalSchema
|
|
12
13
|
|
|
13
14
|
export interface SubtotalFields extends AmountFields {}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// import type { Hash } from '@xylabs/hex'
|
|
2
2
|
import type { DivinerConfig } from '@xyo-network/diviner-model'
|
|
3
3
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
4
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
4
5
|
|
|
5
|
-
export const PaymentTotalDivinerConfigSchema = 'network.xyo.diviner.payments.total.config'
|
|
6
|
+
export const PaymentTotalDivinerConfigSchema = asSchema('network.xyo.diviner.payments.total.config', true)
|
|
6
7
|
export type PaymentTotalDivinerConfigSchema = typeof PaymentTotalDivinerConfigSchema
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
2
|
import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
|
|
3
3
|
import {
|
|
4
|
+
asSchema,
|
|
4
5
|
isPayloadOfSchemaType,
|
|
5
6
|
isPayloadOfSchemaTypeWithSources,
|
|
6
7
|
} from '@xyo-network/payload-model'
|
|
7
8
|
|
|
8
9
|
import type { AmountFields } from '../../Amount/index.ts'
|
|
9
10
|
|
|
10
|
-
export const TotalSchema = 'network.xyo.payments.total'
|
|
11
|
+
export const TotalSchema = asSchema('network.xyo.payments.total', true)
|
|
11
12
|
export type TotalSchema = typeof TotalSchema
|
|
12
13
|
|
|
13
14
|
export interface TotalFields extends AmountFields {}
|