@xyo-network/payment-payload-plugins 3.1.2 → 3.2.0-rc.2

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 (80) hide show
  1. package/dist/neutral/Amount/Payload.d.ts +0 -4
  2. package/dist/neutral/Amount/Payload.d.ts.map +1 -1
  3. package/dist/neutral/Billing/Address/Address.d.ts +46 -10
  4. package/dist/neutral/Billing/Address/Address.d.ts.map +1 -1
  5. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +44 -8
  6. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -1
  7. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +40 -8
  8. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -1
  9. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +44 -8
  10. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -1
  11. package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts +101 -5
  12. package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts.map +1 -1
  13. package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts +68 -9
  14. package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts.map +1 -1
  15. package/dist/neutral/Discount/Payload/Discount.d.ts +7 -7
  16. package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -1
  17. package/dist/neutral/Escrow/Outcome.d.ts +0 -4
  18. package/dist/neutral/Escrow/Outcome.d.ts.map +1 -1
  19. package/dist/neutral/Escrow/Terms/Terms.d.ts +28 -10
  20. package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -1
  21. package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts +2 -2
  22. package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts.map +1 -1
  23. package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts +2 -2
  24. package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts.map +1 -1
  25. package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts +32 -11
  26. package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts.map +1 -1
  27. package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts +3 -3
  28. package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts.map +1 -1
  29. package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts +32 -11
  30. package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts.map +1 -1
  31. package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts +2 -2
  32. package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts.map +1 -1
  33. package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts +4 -4
  34. package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts.map +1 -1
  35. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts +3 -3
  36. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts.map +1 -1
  37. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts +3 -3
  38. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts.map +1 -1
  39. package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +22 -10
  40. package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -1
  41. package/dist/neutral/Payment/Payload.d.ts +0 -4
  42. package/dist/neutral/Payment/Payload.d.ts.map +1 -1
  43. package/dist/neutral/Payment/Status/Payload.d.ts +0 -4
  44. package/dist/neutral/Payment/Status/Payload.d.ts.map +1 -1
  45. package/dist/neutral/Purchase/Payload.d.ts +0 -4
  46. package/dist/neutral/Purchase/Payload.d.ts.map +1 -1
  47. package/dist/neutral/Receipt/Payload.d.ts +0 -4
  48. package/dist/neutral/Receipt/Payload.d.ts.map +1 -1
  49. package/dist/neutral/Subtotal/Diviner/Payload.d.ts +0 -4
  50. package/dist/neutral/Subtotal/Diviner/Payload.d.ts.map +1 -1
  51. package/dist/neutral/Total/Diviner/Payload.d.ts +0 -4
  52. package/dist/neutral/Total/Diviner/Payload.d.ts.map +1 -1
  53. package/dist/neutral/index.mjs +39 -76
  54. package/dist/neutral/index.mjs.map +1 -1
  55. package/package.json +25 -23
  56. package/src/Amount/Payload.ts +0 -6
  57. package/src/Billing/Address/Address.ts +1 -8
  58. package/src/Discount/Payload/Coupon/Coupons/FixedAmount.ts +6 -9
  59. package/src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts +6 -9
  60. package/src/Discount/Payload/Coupon/Coupons/FixedPrice.ts +6 -9
  61. package/src/Discount/Payload/Coupon/Payload.ts +5 -11
  62. package/src/Discount/Payload/Coupon/types/Condition.ts +6 -10
  63. package/src/Discount/Payload/Discount.ts +2 -8
  64. package/src/Escrow/Outcome.ts +0 -6
  65. package/src/Escrow/Terms/Terms.ts +1 -8
  66. package/src/Escrow/util/appraisal/getAppraisalsByAsset.ts +5 -7
  67. package/src/Escrow/util/appraisal/getSignaturesByAppraisal.ts +7 -7
  68. package/src/Escrow/util/secret/createEscrowIntent.ts +1 -1
  69. package/src/Escrow/util/secret/findEscrowPartySecretSignatures.ts +4 -5
  70. package/src/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.ts +2 -4
  71. package/src/Escrow/validators/escrow/appraisal.ts +8 -9
  72. package/src/Escrow/validators/escrow/buyerSecret.ts +3 -3
  73. package/src/Escrow/validators/escrow/sellerSecret.ts +3 -3
  74. package/src/Payment/Instrument/Card/Payload.ts +1 -8
  75. package/src/Payment/Payload.ts +0 -6
  76. package/src/Payment/Status/Payload.ts +0 -6
  77. package/src/Purchase/Payload.ts +0 -6
  78. package/src/Receipt/Payload.ts +0 -6
  79. package/src/Subtotal/Diviner/Payload.ts +0 -6
  80. package/src/Total/Diviner/Payload.ts +0 -6
@@ -18,8 +18,4 @@ export declare const isAmount: (x?: unknown | null) => x is Amount;
18
18
  * Identity function for determining if an object is an Amount with sources
19
19
  */
20
20
  export declare const isAmountWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<Amount>;
21
- /**
22
- * Identity function for determining if an object is an Amount with meta
23
- */
24
- export declare const isAmountWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<Amount>;
25
21
  //# sourceMappingURL=Payload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../src/Amount/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAOpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAEnE,eAAO,MAAM,YAAY,EAAG,6BAAsC,CAAA;AAClE,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAA;AAE9C,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,uBAAuB,CAAA;CAClC;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,kBAAkB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,QAAQ,qCAA8C,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,mBAAmB,uFAAyD,CAAA;AAEzF;;GAEG;AACH,eAAO,MAAM,gBAAgB,oFAAsD,CAAA"}
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../src/Amount/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAMpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAEnE,eAAO,MAAM,YAAY,EAAG,6BAAsC,CAAA;AAClE,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAA;AAE9C,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,uBAAuB,CAAA;CAClC;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,kBAAkB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,QAAQ,qCAA8C,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,mBAAmB,uFAAyD,CAAA"}
@@ -30,19 +30,55 @@ export type BillingAddress = Payload<BillingAddressFields, BillingAddressSchema>
30
30
  /**
31
31
  * Identity function for determine if an object is a BillingAddress
32
32
  */
33
- export declare const isBillingAddress: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & BillingAddressFields & {
34
- schema: "network.xyo.payments.billing.address";
35
- };
36
- /**
37
- * Identity function for determine if an object is a BillingAddress with sources
38
- */
39
- export declare const isBillingAddressWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & BillingAddressFields & {
33
+ export declare const isBillingAddress: (x?: unknown | null) => x is import("@xylabs/object").DeepRestrictToStringKeys<{
40
34
  schema: "network.xyo.payments.billing.address";
35
+ address?: string
36
+ /** Street address line 2. */
37
+ | undefined;
38
+ address2?: string | null
39
+ /** City of the billing address. */
40
+ | undefined;
41
+ city?: string
42
+ /** Country code of the billing address, ISO 3166-1 alpha-2 code. */
43
+ | undefined;
44
+ country?: string
45
+ /** First name */
46
+ | undefined;
47
+ firstName: string;
48
+ lastName: string;
49
+ organization?: string | null
50
+ /** Postal or ZIP code of the billing address. */
51
+ | undefined;
52
+ postalCode?: string
53
+ /** State or region of the billing address. */
54
+ | undefined;
55
+ region?: string | undefined;
41
56
  }>;
42
57
  /**
43
- * Identity function for determine if an object is a BillingAddress with meta
58
+ * Identity function for determine if an object is a BillingAddress with sources
44
59
  */
45
- export declare const isBillingAddressWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & BillingAddressFields & {
60
+ export declare const isBillingAddressWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<import("@xylabs/object").DeepRestrictToStringKeys<{
46
61
  schema: "network.xyo.payments.billing.address";
47
- }>;
62
+ address?: string
63
+ /** Street address line 2. */
64
+ | undefined;
65
+ address2?: string | null
66
+ /** City of the billing address. */
67
+ | undefined;
68
+ city?: string
69
+ /** Country code of the billing address, ISO 3166-1 alpha-2 code. */
70
+ | undefined;
71
+ country?: string
72
+ /** First name */
73
+ | undefined;
74
+ firstName: string;
75
+ lastName: string;
76
+ organization?: string | null
77
+ /** Postal or ZIP code of the billing address. */
78
+ | undefined;
79
+ postalCode?: string
80
+ /** State or region of the billing address. */
81
+ | undefined;
82
+ region?: string | undefined;
83
+ }>>;
48
84
  //# sourceMappingURL=Address.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../src/Billing/Address/Address.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAKzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAA8D,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,2BAA2B;;EAAyE,CAAA;AAEjH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAAsE,CAAA"}
1
+ {"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../src/Billing/Address/Address.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;cA3BjB,MAAM;IAChB,6BAA6B;;eAClB,MAAM,GAAG,IAAI;IACxB,mCAAmC;;WAC5B,MAAM;IACb,oEAAoE;;cAC1D,MAAM;IAChB,iBAAiB;;eACN,MAAM;cAEP,MAAM;mBAED,MAAM,GAAG,IAAI;IAC5B,iDAAiD;;iBACpC,MAAM;IACnB,8CAA8C;;aACrC,MAAM;EAW0E,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,2BAA2B;;cAhC5B,MAAM;IAChB,6BAA6B;;eAClB,MAAM,GAAG,IAAI;IACxB,mCAAmC;;WAC5B,MAAM;IACb,oEAAoE;;cAC1D,MAAM;IAChB,iBAAiB;;eACN,MAAM;cAEP,MAAM;mBAED,MAAM,GAAG,IAAI;IAC5B,iDAAiD;;iBACpC,MAAM;IACnB,8CAA8C;;aACrC,MAAM;GAgBgG,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { PayloadWithSources } from '@xyo-network/payload-model';
1
+ import type { PayloadWithOptionalSources } from '@xyo-network/payload-model';
2
2
  import type { AmountFields } from '../../../../Amount/index.ts';
3
3
  import type { CouponFields } from '../types/index.ts';
4
4
  export declare const FixedAmountCouponSchema: "network.xyo.payments.coupon.fixed.amount";
@@ -8,17 +8,53 @@ export interface FixedAmountCouponFields extends CouponFields, AmountFields {
8
8
  /**
9
9
  * A coupon that provides a fixed discount amount
10
10
  */
11
- export type FixedAmountCoupon = PayloadWithSources<FixedAmountCouponFields, FixedAmountCouponSchema>;
11
+ export type FixedAmountCoupon = PayloadWithOptionalSources<FixedAmountCouponFields, FixedAmountCouponSchema>;
12
12
  /**
13
13
  * Identity function for determining if an object is an FixedAmountCoupon
14
14
  */
15
15
  export declare const isFixedAmountCoupon: (x?: unknown | null) => x is FixedAmountCoupon;
16
+ export declare const asFixedAmountCoupon: {
17
+ <TType extends FixedAmountCoupon>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
18
+ <TType extends FixedAmountCoupon>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<FixedAmountCoupon>, config?: import("@xylabs/object").TypeCheckConfig): TType;
19
+ };
16
20
  /**
17
21
  * Identity function for determining if an object is an FixedAmountCoupon with sources
18
- */
19
- export declare const isFixedAmountCouponWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<FixedAmountCoupon>;
20
- /**
21
- * Identity function for determining if an object is an FixedAmountCoupon with meta
22
- */
23
- export declare const isFixedAmountCouponWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<FixedAmountCoupon>;
22
+ */
23
+ export declare const isFixedAmountCouponWithSources: (x?: unknown | null) => x is import("@xylabs/object").DeepRestrictToStringKeys<{
24
+ schema: "network.xyo.payments.coupon.fixed.amount";
25
+ conditions?: Lowercase<string>[] | undefined;
26
+ stackable?: boolean | undefined;
27
+ exp: number;
28
+ nbf: number;
29
+ amount: number;
30
+ currency: import("../../../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
31
+ }> & import("@xyo-network/payload-model").SourcesMetaField;
32
+ export declare const asFixedAmountCouponWithSources: {
33
+ <TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
34
+ schema: "network.xyo.payments.coupon.fixed.amount";
35
+ conditions?: Lowercase<string>[] | undefined;
36
+ stackable?: boolean | undefined;
37
+ exp: number;
38
+ nbf: number;
39
+ amount: number;
40
+ currency: import("../../../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
41
+ }> & import("@xyo-network/payload-model").SourcesMetaField>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
42
+ <TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
43
+ schema: "network.xyo.payments.coupon.fixed.amount";
44
+ conditions?: Lowercase<string>[] | undefined;
45
+ stackable?: boolean | undefined;
46
+ exp: number;
47
+ nbf: number;
48
+ amount: number;
49
+ currency: import("../../../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
50
+ }> & import("@xyo-network/payload-model").SourcesMetaField>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
51
+ schema: "network.xyo.payments.coupon.fixed.amount";
52
+ conditions?: Lowercase<string>[] | undefined;
53
+ stackable?: boolean | undefined;
54
+ exp: number;
55
+ nbf: number;
56
+ amount: number;
57
+ currency: import("../../../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
58
+ }> & import("@xyo-network/payload-model").SourcesMetaField>, config?: import("@xylabs/object").TypeCheckConfig): TType;
59
+ };
24
60
  //# sourceMappingURL=FixedAmount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FixedAmount.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/Coupons/FixedAmount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAOpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,eAAO,MAAM,uBAAuB,4CAA0C,CAAA;AAC9E,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,MAAM,WAAW,uBAAwB,SAAQ,YAAY,EAAE,YAAY;CAAG;AAE9E;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAA;AAEpG;;GAEG;AACH,eAAO,MAAM,mBAAmB,gDAAoE,CAAA;AAEpG;;GAEG;AACH,eAAO,MAAM,8BAA8B,kGAA+E,CAAA;AAE1H;;GAEG;AACH,eAAO,MAAM,2BAA2B,+FAA4E,CAAA"}
1
+ {"version":3,"file":"FixedAmount.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/Coupons/FixedAmount.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AAM5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,eAAO,MAAM,uBAAuB,4CAA0C,CAAA;AAC9E,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,MAAM,WAAW,uBAAwB,SAAQ,YAAY,EAAE,YAAY;CAAG;AAE9E;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,0BAA0B,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAA;AAE5G;;GAEG;AACH,eAAO,MAAM,mBAAmB,gDAAoE,CAAA;AACpG,eAAO,MAAM,mBAAmB;oDAlBf,sDAAiB,iCAC/B,gBAAoB;oDAGpB,sDAAiB,4GACkB,gBAAmB;CAaqB,CAAA;AAE9E;;EAEE;AACF,eAAO,MAAM,8BAA8B;;;;;;;;0DAA+E,CAAA;AAC1H,eAAO,MAAM,8BAA8B;;;;;;;;;8EAxB1B,sDAAiB,iCAC/B,gBAAoB;;;;;;;;;8EAGpB,sDAAiB;;;;;;;;iFACkB,gBAAmB;CAmB2C,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { PayloadWithSources } from '@xyo-network/payload-model';
1
+ import type { Payload, PayloadWithOptionalSources } from '@xyo-network/payload-model';
2
2
  import type { CouponFields } from '../types/index.ts';
3
3
  export declare const FixedPercentageCouponSchema: "network.xyo.payments.coupon.fixed.percentage";
4
4
  export type FixedPercentageCouponSchema = typeof FixedPercentageCouponSchema;
@@ -8,17 +8,49 @@ export interface FixedPercentageCouponFields extends CouponFields {
8
8
  /**
9
9
  * A coupon that provides a fixed discount amount
10
10
  */
11
- export type FixedPercentageCoupon = PayloadWithSources<FixedPercentageCouponFields, FixedPercentageCouponSchema>;
11
+ export type FixedPercentageCoupon = PayloadWithOptionalSources<Payload<FixedPercentageCouponFields, FixedPercentageCouponSchema>>;
12
12
  /**
13
13
  * Identity function for determining if an object is an FixedPercentageCoupon
14
14
  */
15
15
  export declare const isFixedPercentageCoupon: (x?: unknown | null) => x is FixedPercentageCoupon;
16
+ export declare const asFixedPercentageCoupon: {
17
+ <TType extends FixedPercentageCoupon>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
18
+ <TType extends FixedPercentageCoupon>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<FixedPercentageCoupon>, config?: import("@xylabs/object").TypeCheckConfig): TType;
19
+ };
16
20
  /**
17
21
  * Identity function for determining if an object is an FixedPercentageCoupon with sources
18
- */
19
- export declare const isFixedPercentageCouponWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<FixedPercentageCoupon>;
20
- /**
21
- * Identity function for determining if an object is an FixedPercentageCoupon with meta
22
- */
23
- export declare const isFixedPercentageCouponWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<FixedPercentageCoupon>;
22
+ */
23
+ export declare const isFixedPercentageCouponWithSources: (x?: unknown | null) => x is import("@xylabs/object").DeepRestrictToStringKeys<{
24
+ schema: "network.xyo.payments.coupon.fixed.percentage";
25
+ percentage: number;
26
+ conditions?: Lowercase<string>[] | undefined;
27
+ stackable?: boolean | undefined;
28
+ exp: number;
29
+ nbf: number;
30
+ }> & import("@xyo-network/payload-model").SourcesMetaField;
31
+ export declare const asFixedPercentageCouponWithSources: {
32
+ <TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
33
+ schema: "network.xyo.payments.coupon.fixed.percentage";
34
+ percentage: number;
35
+ conditions?: Lowercase<string>[] | undefined;
36
+ stackable?: boolean | undefined;
37
+ exp: number;
38
+ nbf: number;
39
+ }> & import("@xyo-network/payload-model").SourcesMetaField>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
40
+ <TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
41
+ schema: "network.xyo.payments.coupon.fixed.percentage";
42
+ percentage: number;
43
+ conditions?: Lowercase<string>[] | undefined;
44
+ stackable?: boolean | undefined;
45
+ exp: number;
46
+ nbf: number;
47
+ }> & import("@xyo-network/payload-model").SourcesMetaField>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
48
+ schema: "network.xyo.payments.coupon.fixed.percentage";
49
+ percentage: number;
50
+ conditions?: Lowercase<string>[] | undefined;
51
+ stackable?: boolean | undefined;
52
+ exp: number;
53
+ nbf: number;
54
+ }> & import("@xyo-network/payload-model").SourcesMetaField>, config?: import("@xylabs/object").TypeCheckConfig): TType;
55
+ };
24
56
  //# sourceMappingURL=FixedPercentage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FixedPercentage.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAQpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,eAAO,MAAM,2BAA2B,gDAA8C,CAAA;AACtF,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E,MAAM,WAAW,2BAA4B,SAAQ,YAAY;IAC/D,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,2BAA2B,EAAE,2BAA2B,CAAC,CAAA;AAEhH;;GAEG;AACH,eAAO,MAAM,uBAAuB,oDAA4E,CAAA;AAEhH;;GAEG;AACH,eAAO,MAAM,kCAAkC,sGAAuF,CAAA;AAEtI;;GAEG;AACH,eAAO,MAAM,+BAA+B,mGAAoF,CAAA"}
1
+ {"version":3,"file":"FixedPercentage.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AAOrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,eAAO,MAAM,2BAA2B,gDAA8C,CAAA;AACtF,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E,MAAM,WAAW,2BAA4B,SAAQ,YAAY;IAC/D,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,CAAC,OAAO,CAAC,2BAA2B,EAAE,2BAA2B,CAAC,CAAC,CAAA;AAEjI;;GAEG;AACH,eAAO,MAAM,uBAAuB,oDAA4E,CAAA;AAChH,eAAO,MAAM,uBAAuB;wDAnB3B,sDAAgB,iCACX,gBAAoB;wDAEwB,sDAAiB,gHAGpE,gBAAmB;CAa4D,CAAA;AAEtF;;EAEE;AACF,eAAO,MAAM,kCAAkC;;gBAjBjC,MAAM;;;;;0DAiBkH,CAAA;AACtI,eAAO,MAAM,kCAAkC;;;oBAlBjC,MAAM;;;;;8EAPX,sDAAgB,iCACX,gBAAoB;;;oBAMpB,MAAM;;;;;8EAJsC,sDAAiB;;oBAI7D,MAAM;;;;;iFADb,gBAAmB;CAmBkF,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { PayloadWithSources } from '@xyo-network/payload-model';
1
+ import type { PayloadWithOptionalSources } from '@xyo-network/payload-model';
2
2
  import type { AmountFields } from '../../../../Amount/index.ts';
3
3
  import type { CouponFields } from '../types/index.ts';
4
4
  export declare const FixedPriceCouponSchema: "network.xyo.payments.coupon.fixed.price";
@@ -8,17 +8,53 @@ export interface FixedPriceCouponFields extends CouponFields, AmountFields {
8
8
  /**
9
9
  * A coupon that provides a fixed total price
10
10
  */
11
- export type FixedPriceCoupon = PayloadWithSources<FixedPriceCouponFields, FixedPriceCouponSchema>;
11
+ export type FixedPriceCoupon = PayloadWithOptionalSources<FixedPriceCouponFields, FixedPriceCouponSchema>;
12
12
  /**
13
13
  * Identity function for determining if an object is an FixedPriceCoupon
14
14
  */
15
15
  export declare const isFixedPriceCoupon: (x?: unknown | null) => x is FixedPriceCoupon;
16
+ export declare const asFixedPriceCoupon: {
17
+ <TType extends FixedPriceCoupon>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
18
+ <TType extends FixedPriceCoupon>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<FixedPriceCoupon>, config?: import("@xylabs/object").TypeCheckConfig): TType;
19
+ };
16
20
  /**
17
21
  * Identity function for determining if an object is an FixedPriceCoupon with sources
18
- */
19
- export declare const isFixedPriceCouponWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<FixedPriceCoupon>;
20
- /**
21
- * Identity function for determining if an object is an FixedPriceCoupon with meta
22
- */
23
- export declare const isFixedPriceCouponWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<FixedPriceCoupon>;
22
+ */
23
+ export declare const isFixedPriceCouponWithSources: (x?: unknown | null) => x is import("@xylabs/object").DeepRestrictToStringKeys<{
24
+ schema: "network.xyo.payments.coupon.fixed.price";
25
+ conditions?: Lowercase<string>[] | undefined;
26
+ stackable?: boolean | undefined;
27
+ exp: number;
28
+ nbf: number;
29
+ amount: number;
30
+ currency: import("../../../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
31
+ }> & import("@xyo-network/payload-model").SourcesMetaField;
32
+ export declare const asFixedPriceCouponWithSources: {
33
+ <TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
34
+ schema: "network.xyo.payments.coupon.fixed.price";
35
+ conditions?: Lowercase<string>[] | undefined;
36
+ stackable?: boolean | undefined;
37
+ exp: number;
38
+ nbf: number;
39
+ amount: number;
40
+ currency: import("../../../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
41
+ }> & import("@xyo-network/payload-model").SourcesMetaField>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
42
+ <TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
43
+ schema: "network.xyo.payments.coupon.fixed.price";
44
+ conditions?: Lowercase<string>[] | undefined;
45
+ stackable?: boolean | undefined;
46
+ exp: number;
47
+ nbf: number;
48
+ amount: number;
49
+ currency: import("../../../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
50
+ }> & import("@xyo-network/payload-model").SourcesMetaField>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
51
+ schema: "network.xyo.payments.coupon.fixed.price";
52
+ conditions?: Lowercase<string>[] | undefined;
53
+ stackable?: boolean | undefined;
54
+ exp: number;
55
+ nbf: number;
56
+ amount: number;
57
+ currency: import("../../../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
58
+ }> & import("@xyo-network/payload-model").SourcesMetaField>, config?: import("@xylabs/object").TypeCheckConfig): TType;
59
+ };
24
60
  //# sourceMappingURL=FixedPrice.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FixedPrice.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/Coupons/FixedPrice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAOpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,eAAO,MAAM,sBAAsB,2CAAyC,CAAA;AAC5E,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAA;AAElE,MAAM,WAAW,sBAAuB,SAAQ,YAAY,EAAE,YAAY;CAAI;AAE9E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAA;AAEjG;;GAEG;AACH,eAAO,MAAM,kBAAkB,+CAAkE,CAAA;AAEjG;;GAEG;AACH,eAAO,MAAM,6BAA6B,iGAA6E,CAAA;AAEvH;;GAEG;AACH,eAAO,MAAM,0BAA0B,8FAA0E,CAAA"}
1
+ {"version":3,"file":"FixedPrice.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/Coupons/FixedPrice.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AAM5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,eAAO,MAAM,sBAAsB,2CAAyC,CAAA;AAC5E,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAA;AAElE,MAAM,WAAW,sBAAuB,SAAQ,YAAY,EAAE,YAAY;CAAI;AAE9E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,0BAA0B,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAA;AAEzG;;GAEG;AACH,eAAO,MAAM,kBAAkB,+CAAkE,CAAA;AACjG,eAAO,MAAM,kBAAkB;mDAlBd,sDAAiB,iCAC/B,gBAAoB;mDAGpB,sDAAiB,2GACmB,gBAAoB;CAaiB,CAAA;AAE5E;;EAEE;AACF,eAAO,MAAM,6BAA6B;;;;;;;;0DAA6E,CAAA;AACvH,eAAO,MAAM,6BAA6B;;;;;;;;;8EAxBzB,sDAAiB,iCAC/B,gBAAoB;;;;;;;;;8EAGpB,sDAAiB;;;;;;;;iFACmB,gBAAoB;CAmBuC,CAAA"}
@@ -7,12 +7,108 @@ export type Coupon = FixedAmountCoupon | FixedPercentageCoupon | FixedPriceCoupo
7
7
  * Identity function for determining if an object is an Coupon
8
8
  */
9
9
  export declare const isCoupon: (x?: unknown | null) => x is FixedAmountCoupon | FixedPercentageCoupon | FixedPriceCoupon;
10
+ export declare const asCoupon: {
11
+ <TType extends FixedAmountCoupon | FixedPercentageCoupon | FixedPriceCoupon>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
12
+ <TType extends FixedAmountCoupon | FixedPercentageCoupon | FixedPriceCoupon>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<FixedAmountCoupon | FixedPercentageCoupon | FixedPriceCoupon>, config?: import("@xylabs/object").TypeCheckConfig): TType;
13
+ };
10
14
  /**
11
15
  * Identity function for determining if an object is an Coupon with sources
12
16
  */
13
- export declare const isCouponWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<FixedAmountCoupon> | import("@xyo-network/payload-model").WithSources<FixedPercentageCoupon> | import("@xyo-network/payload-model").WithSources<FixedPriceCoupon>;
14
- /**
15
- * Identity function for determining if an object is an Coupon with meta
16
- */
17
- export declare const isCouponWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<FixedAmountCoupon> | import("@xyo-network/payload-model").WithMeta<FixedPercentageCoupon> | import("@xyo-network/payload-model").WithMeta<FixedPriceCoupon>;
17
+ export declare const isCouponWithSources: (x?: unknown | null) => x is (import("@xylabs/object").DeepRestrictToStringKeys<{
18
+ schema: "network.xyo.payments.coupon.fixed.amount";
19
+ conditions?: Lowercase<string>[] | undefined;
20
+ stackable?: boolean | undefined;
21
+ exp: number;
22
+ nbf: number;
23
+ amount: number;
24
+ currency: import("../../../index.ts").Iso4217AlphabeticalCode;
25
+ }> & import("@xyo-network/payload-model").SourcesMetaField) | (import("@xylabs/object").DeepRestrictToStringKeys<{
26
+ schema: "network.xyo.payments.coupon.fixed.percentage";
27
+ percentage: number;
28
+ conditions?: Lowercase<string>[] | undefined;
29
+ stackable?: boolean | undefined;
30
+ exp: number;
31
+ nbf: number;
32
+ }> & import("@xyo-network/payload-model").SourcesMetaField) | (import("@xylabs/object").DeepRestrictToStringKeys<{
33
+ schema: "network.xyo.payments.coupon.fixed.price";
34
+ conditions?: Lowercase<string>[] | undefined;
35
+ stackable?: boolean | undefined;
36
+ exp: number;
37
+ nbf: number;
38
+ amount: number;
39
+ currency: import("../../../index.ts").Iso4217AlphabeticalCode;
40
+ }> & import("@xyo-network/payload-model").SourcesMetaField);
41
+ export declare const asCouponWithSources: {
42
+ <TType extends (import("@xylabs/object").DeepRestrictToStringKeys<{
43
+ schema: "network.xyo.payments.coupon.fixed.amount";
44
+ conditions?: Lowercase<string>[] | undefined;
45
+ stackable?: boolean | undefined;
46
+ exp: number;
47
+ nbf: number;
48
+ amount: number;
49
+ currency: import("../../../index.ts").Iso4217AlphabeticalCode;
50
+ }> & import("@xyo-network/payload-model").SourcesMetaField) | (import("@xylabs/object").DeepRestrictToStringKeys<{
51
+ schema: "network.xyo.payments.coupon.fixed.percentage";
52
+ percentage: number;
53
+ conditions?: Lowercase<string>[] | undefined;
54
+ stackable?: boolean | undefined;
55
+ exp: number;
56
+ nbf: number;
57
+ }> & import("@xyo-network/payload-model").SourcesMetaField) | (import("@xylabs/object").DeepRestrictToStringKeys<{
58
+ schema: "network.xyo.payments.coupon.fixed.price";
59
+ conditions?: Lowercase<string>[] | undefined;
60
+ stackable?: boolean | undefined;
61
+ exp: number;
62
+ nbf: number;
63
+ amount: number;
64
+ currency: import("../../../index.ts").Iso4217AlphabeticalCode;
65
+ }> & import("@xyo-network/payload-model").SourcesMetaField)>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
66
+ <TType extends (import("@xylabs/object").DeepRestrictToStringKeys<{
67
+ schema: "network.xyo.payments.coupon.fixed.amount";
68
+ conditions?: Lowercase<string>[] | undefined;
69
+ stackable?: boolean | undefined;
70
+ exp: number;
71
+ nbf: number;
72
+ amount: number;
73
+ currency: import("../../../index.ts").Iso4217AlphabeticalCode;
74
+ }> & import("@xyo-network/payload-model").SourcesMetaField) | (import("@xylabs/object").DeepRestrictToStringKeys<{
75
+ schema: "network.xyo.payments.coupon.fixed.percentage";
76
+ percentage: number;
77
+ conditions?: Lowercase<string>[] | undefined;
78
+ stackable?: boolean | undefined;
79
+ exp: number;
80
+ nbf: number;
81
+ }> & import("@xyo-network/payload-model").SourcesMetaField) | (import("@xylabs/object").DeepRestrictToStringKeys<{
82
+ schema: "network.xyo.payments.coupon.fixed.price";
83
+ conditions?: Lowercase<string>[] | undefined;
84
+ stackable?: boolean | undefined;
85
+ exp: number;
86
+ nbf: number;
87
+ amount: number;
88
+ currency: import("../../../index.ts").Iso4217AlphabeticalCode;
89
+ }> & import("@xyo-network/payload-model").SourcesMetaField)>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<(import("@xylabs/object").DeepRestrictToStringKeys<{
90
+ schema: "network.xyo.payments.coupon.fixed.amount";
91
+ conditions?: Lowercase<string>[] | undefined;
92
+ stackable?: boolean | undefined;
93
+ exp: number;
94
+ nbf: number;
95
+ amount: number;
96
+ currency: import("../../../index.ts").Iso4217AlphabeticalCode;
97
+ }> & import("@xyo-network/payload-model").SourcesMetaField) | (import("@xylabs/object").DeepRestrictToStringKeys<{
98
+ schema: "network.xyo.payments.coupon.fixed.percentage";
99
+ percentage: number;
100
+ conditions?: Lowercase<string>[] | undefined;
101
+ stackable?: boolean | undefined;
102
+ exp: number;
103
+ nbf: number;
104
+ }> & import("@xyo-network/payload-model").SourcesMetaField) | (import("@xylabs/object").DeepRestrictToStringKeys<{
105
+ schema: "network.xyo.payments.coupon.fixed.price";
106
+ conditions?: Lowercase<string>[] | undefined;
107
+ stackable?: boolean | undefined;
108
+ exp: number;
109
+ nbf: number;
110
+ amount: number;
111
+ currency: import("../../../index.ts").Iso4217AlphabeticalCode;
112
+ }> & import("@xyo-network/payload-model").SourcesMetaField)>, config?: import("@xylabs/object").TypeCheckConfig): TType;
113
+ };
18
114
  //# sourceMappingURL=Payload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../../src/Discount/Payload/Coupon/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAAE,KAAK,gBAAgB,EAO1E,MAAM,oBAAoB,CAAA;AAE3B;;GAEG;AACH,MAAM,MAAM,MAAM,GAChB,iBAAiB,GACf,qBAAqB,GACrB,gBAAgB,CAAA;AAEpB;;GAEG;AACH,eAAO,MAAM,QAAQ,OAAQ,OAAO,GAAG,IAAI,sEAGjB,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,mBAAmB,OAAQ,OAAO,GAAG,IAAI,4NAGjB,CAAA;AAErC;;GAEG;AACH,eAAO,MAAM,gBAAgB,OAAQ,OAAO,GAAG,IAAI,mNAGjB,CAAA"}
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../../src/Discount/Payload/Coupon/Payload.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAAE,KAAK,gBAAgB,EAK1E,MAAM,oBAAoB,CAAA;AAE3B;;GAEG;AACH,MAAM,MAAM,MAAM,GAChB,iBAAiB,GACf,qBAAqB,GACrB,gBAAgB,CAAA;AAEpB;;GAEG;AACH,eAAO,MAAM,QAAQ,OAAQ,OAAO,GAAG,IAAI,sEAGjB,CAAA;AAC1B,eAAO,MAAM,QAAQ;+FApBa,sDACrB,iCACW,gBACb;+FAMF,sDACH,uJAI4C,gBAE/C;CAIqD,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,mBAAmB,OAAQ,OAAO,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;2DAGjB,CAAA;AACrC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;+EA7BE,sDACrB,iCACW,gBACb;;;;;;;;;;;;;;;;;;;;;;;;+EAMF,sDACH;;;;;;;;;;;;;;;;;;;;;;;kFAI4C,gBAE/C;CAa2E,CAAA"}
@@ -1,19 +1,78 @@
1
- import { type WithMeta, type WithOptionalMeta } from '@xyo-network/payload-model';
2
1
  import { type SchemaPayload } from '@xyo-network/schema-payload-plugin';
3
2
  /**
4
3
  * The payloads that can be used as conditions for a coupon
5
4
  */
6
- export type Condition = SchemaPayload | WithOptionalMeta<SchemaPayload> | WithMeta<SchemaPayload>;
5
+ export type Condition = SchemaPayload;
7
6
  /**
8
7
  * Identity function for determining if an object is a Condition payload
9
8
  */
10
- export declare const isCondition: (x?: unknown | null) => x is Condition;
9
+ export declare const isCondition: (x?: unknown | null) => x is import("@xylabs/object").DeepRestrictToStringKeys<{
10
+ schema: "network.xyo.schema";
11
+ definition: {
12
+ [x: string]: unknown;
13
+ };
14
+ extends?: string | undefined;
15
+ name?: string | undefined;
16
+ }>;
17
+ export declare const asCondition: {
18
+ <TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
19
+ schema: "network.xyo.schema";
20
+ definition: {
21
+ [x: string]: unknown;
22
+ };
23
+ extends?: string | undefined;
24
+ name?: string | undefined;
25
+ }>>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
26
+ <TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
27
+ schema: "network.xyo.schema";
28
+ definition: {
29
+ [x: string]: unknown;
30
+ };
31
+ extends?: string | undefined;
32
+ name?: string | undefined;
33
+ }>>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
34
+ schema: "network.xyo.schema";
35
+ definition: {
36
+ [x: string]: unknown;
37
+ };
38
+ extends?: string | undefined;
39
+ name?: string | undefined;
40
+ }>>, config?: import("@xylabs/object").TypeCheckConfig): TType;
41
+ };
11
42
  /**
12
43
  * Identity function for determining if an object is a Condition payload with sources
13
- */
14
- export declare const isConditionWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<Condition>;
15
- /**
16
- * Identity function for determining if an object is a Condition payload with meta
17
- */
18
- export declare const isConditionWithMeta: (x?: unknown | null) => x is WithMeta<Condition>;
44
+ */
45
+ export declare const isConditionWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<import("@xylabs/object").DeepRestrictToStringKeys<{
46
+ schema: "network.xyo.schema";
47
+ definition: {
48
+ [x: string]: unknown;
49
+ };
50
+ extends?: string | undefined;
51
+ name?: string | undefined;
52
+ }>>;
53
+ export declare const asConditionWithSources: {
54
+ <TType extends import("@xyo-network/payload-model").WithSources<import("@xylabs/object").DeepRestrictToStringKeys<{
55
+ schema: "network.xyo.schema";
56
+ definition: {
57
+ [x: string]: unknown;
58
+ };
59
+ extends?: string | undefined;
60
+ name?: string | undefined;
61
+ }>>>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
62
+ <TType extends import("@xyo-network/payload-model").WithSources<import("@xylabs/object").DeepRestrictToStringKeys<{
63
+ schema: "network.xyo.schema";
64
+ definition: {
65
+ [x: string]: unknown;
66
+ };
67
+ extends?: string | undefined;
68
+ name?: string | undefined;
69
+ }>>>(value: import(".store/@xylabs-promise-npm-4.4.24-9401eba71a/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xyo-network/payload-model").WithSources<import("@xylabs/object").DeepRestrictToStringKeys<{
70
+ schema: "network.xyo.schema";
71
+ definition: {
72
+ [x: string]: unknown;
73
+ };
74
+ extends?: string | undefined;
75
+ name?: string | undefined;
76
+ }>>>, config?: import("@xylabs/object").TypeCheckConfig): TType;
77
+ };
19
78
  //# sourceMappingURL=Condition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Condition.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/types/Condition.ts"],"names":[],"mappings":"AAAA,OAAO,EACmF,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAC7H,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,oCAAoC,CAAA;AAErF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,gBAAgB,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA;AAEjG;;GAEG;AACH,eAAO,MAAM,WAAW,wCAAiD,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,sBAAsB,0FAA4D,CAAA;AAE/F;;GAEG;AACH,eAAO,MAAM,mBAAmB,kDAAyD,CAAA"}
1
+ {"version":3,"file":"Condition.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/types/Condition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,oCAAoC,CAAA;AAErF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,CAAA;AAErC;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;EAAiD,CAAA;AACzE,eAAO,MAAM,WAAW;;;;;;;;sBARf,sDAAiB,iCACzB,gBACc;;;;;;;;sBAGoC,sDAAiB;;;;;;;yBAGvD,gBAAoB;CAA6B,CAAA;AAE9D;;EAEE;AACF,eAAO,MAAM,sBAAsB;;;;;;;GAA4D,CAAA;AAC/F,eAAO,MAAM,sBAAsB;;;;;;;;uBAd1B,sDAAiB,iCACzB,gBACc;;;;;;;;uBAGoC,sDAAiB;;;;;;;0BAGvD,gBAAoB;CAMmD,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { PayloadWithSources } from '@xyo-network/payload-model';
1
+ import type { PayloadWithOptionalSources } from '@xyo-network/payload-model';
2
2
  import type { AmountFields } from '../../Amount/index.ts';
3
3
  export declare const DiscountSchema: "network.xyo.payments.discount";
4
4
  export type DiscountSchema = typeof DiscountSchema;
@@ -7,7 +7,7 @@ export interface DiscountFields extends AmountFields {
7
7
  /**
8
8
  * The result of a discount
9
9
  */
10
- export type Discount = PayloadWithSources<DiscountFields, DiscountSchema>;
10
+ export type Discount = PayloadWithOptionalSources<DiscountFields, DiscountSchema>;
11
11
  /**
12
12
  * Identity function for determining if an object is an Discount
13
13
  */
@@ -15,9 +15,9 @@ export declare const isDiscount: (x?: unknown | null) => x is Discount;
15
15
  /**
16
16
  * Identity function for determining if an object is an Discount with sources
17
17
  */
18
- export declare const isDiscountWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<Discount>;
19
- /**
20
- * Identity function for determining if an object is an Discount with meta
21
- */
22
- export declare const isDiscountWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<Discount>;
18
+ export declare const isDiscountWithSources: (x?: unknown | null) => x is import("@xylabs/object").DeepRestrictToStringKeys<{
19
+ schema: "network.xyo.payments.discount";
20
+ amount: number;
21
+ currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
22
+ }> & import("@xyo-network/payload-model").SourcesMetaField;
23
23
  //# sourceMappingURL=Discount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Discount.d.ts","sourceRoot":"","sources":["../../../../src/Discount/Payload/Discount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAOpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,eAAO,MAAM,cAAc,EAAG,+BAAwC,CAAA;AACtE,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAA;AAElD,MAAM,WAAW,cAAe,SAAQ,YAAY;CAAI;AAExD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,kBAAkB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,UAAU,uCAAkD,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,qBAAqB,yFAA6D,CAAA;AAE/F;;GAEG;AACH,eAAO,MAAM,kBAAkB,sFAA0D,CAAA"}
1
+ {"version":3,"file":"Discount.d.ts","sourceRoot":"","sources":["../../../../src/Discount/Payload/Discount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AAM5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,eAAO,MAAM,cAAc,EAAG,+BAAwC,CAAA;AACtE,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAA;AAElD,MAAM,WAAW,cAAe,SAAQ,YAAY;CAAI;AAExD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,0BAA0B,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA;AAEjF;;GAEG;AACH,eAAO,MAAM,UAAU,uCAAkD,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;0DAA6D,CAAA"}
@@ -22,8 +22,4 @@ export declare const isEscrowOutcome: (x?: unknown | null) => x is EscrowOutcome
22
22
  * Identity function for determining if an object is an EscrowOutcome with sources
23
23
  */
24
24
  export declare const isEscrowOutcomeWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<EscrowOutcome>;
25
- /**
26
- * Identity function for determining if an object is an EscrowOutcome with meta
27
- */
28
- export declare const isEscrowOutcomeWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<EscrowOutcome>;
29
25
  //# sourceMappingURL=Outcome.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Outcome.d.ts","sourceRoot":"","sources":["../../../src/Escrow/Outcome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AASpE,eAAO,MAAM,mBAAmB,8BAAqC,CAAA;AACrE,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,SAAS,CAAA;AAEpD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,cAAc,CAAA;IACvB,KAAK,EAAE,IAAI,CAAA;CACZ;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,eAAe,4CAA4D,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,0BAA0B,8FAAuE,CAAA;AAE9G;;GAEG;AACH,eAAO,MAAM,uBAAuB,2FAAoE,CAAA"}
1
+ {"version":3,"file":"Outcome.d.ts","sourceRoot":"","sources":["../../../src/Escrow/Outcome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAQpE,eAAO,MAAM,mBAAmB,8BAAqC,CAAA;AACrE,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,SAAS,CAAA;AAEpD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,cAAc,CAAA;IACvB,KAAK,EAAE,IAAI,CAAA;CACZ;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,eAAe,4CAA4D,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,0BAA0B,8FAAuE,CAAA"}