@xyo-network/payment-payload-plugins 3.2.5 → 3.2.7

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.
@@ -1,4 +1,4 @@
1
- import type { PayloadWithSources } from '@xyo-network/payload-model';
1
+ import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model';
2
2
  import type { AmountFields } from '../../Amount/index.ts';
3
3
  export declare const TotalSchema: "network.xyo.payments.total";
4
4
  export type TotalSchema = typeof TotalSchema;
@@ -12,8 +12,18 @@ export type Total = PayloadWithSources<TotalFields, TotalSchema>;
12
12
  * Identity function for determining if an object is an Total
13
13
  */
14
14
  export declare const isTotal: (x?: unknown | null) => x is Total;
15
+ export declare const asTotal: {
16
+ <TType extends Total>(value: import(".store/@xylabs-promise-npm-4.4.34-cc09f76696/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
17
+ <TType extends Total>(value: import(".store/@xylabs-promise-npm-4.4.34-cc09f76696/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<Total>, config?: import("@xylabs/object").TypeCheckConfig): TType;
18
+ };
19
+ export declare const asOptionalTotal: <TType extends Total>(value: import(".store/@xylabs-promise-npm-4.4.34-cc09f76696/package").AnyNonPromise) => TType | undefined;
15
20
  /**
16
21
  * Identity function for determining if an object is an Total with sources
17
22
  */
18
- export declare const isTotalWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<Total>;
23
+ export declare const isTotalWithSources: (x?: unknown | null) => x is WithSources<Total>;
24
+ export declare const asTotalWithSources: {
25
+ <TType extends WithSources<Total>>(value: import(".store/@xylabs-promise-npm-4.4.34-cc09f76696/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
26
+ <TType extends WithSources<Total>>(value: import(".store/@xylabs-promise-npm-4.4.34-cc09f76696/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<WithSources<Total>>, config?: import("@xylabs/object").TypeCheckConfig): TType;
27
+ };
28
+ export declare const asOptionalTotalWithSources: <TType extends WithSources<Total>>(value: import(".store/@xylabs-promise-npm-4.4.34-cc09f76696/package").AnyNonPromise) => TType | undefined;
19
29
  //# sourceMappingURL=Payload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Total/Diviner/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAMpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,eAAO,MAAM,WAAW,EAAG,4BAAqC,CAAA;AAChE,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA;AAE5C,MAAM,WAAW,WAAY,SAAQ,YAAY;CAAG;AAEpD;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AAEhE;;GAEG;AACH,eAAO,MAAM,OAAO,oCAA4C,CAAA;AAEhE;;GAEG;AACH,eAAO,MAAM,kBAAkB,sFAAuD,CAAA"}
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Total/Diviner/Payload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAMjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,eAAO,MAAM,WAAW,EAAG,4BAAqC,CAAA;AAChE,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA;AAE5C,MAAM,WAAW,WAAY,SAAQ,YAAY;CAAG;AAEpD;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AAEhE;;GAEG;AACH,eAAO,MAAM,OAAO,oCAA4C,CAAA;AAChE,eAAO,MAAM,OAAO;wCAhBR,sDAAiB,iCAE1B,gBAAoB;wCACc,sDAE7B,gGAKU,gBAAmB;CAMwB,CAAA;AAC7D,eAAO,MAAM,eAAe,sCAFW,sDAAiB,qCAEqB,CAAA;AAE7E;;GAEG;AACH,eAAO,MAAM,kBAAkB,iDAAuD,CAAA;AACtF,eAAO,MAAM,kBAAkB;qDAvBnB,sDAAiB,iCAE1B,gBAAoB;qDACc,sDAE7B,6GAKU,gBAAmB;CAa2D,CAAA;AAChG,eAAO,MAAM,0BAA0B,mDATA,sDAAiB,qCASwD,CAAA"}
@@ -806,15 +806,20 @@ var asPaymentCardWithSources = AsObjectFactory11.create(isPaymentCardWithSources
806
806
  var asOptionalPaymentCardWithSources = AsObjectFactory11.createOptional(isPaymentCardWithSources);
807
807
 
808
808
  // src/Payment/Payload.ts
809
+ import { AsObjectFactory as AsObjectFactory12 } from "@xylabs/object";
809
810
  import {
810
811
  isPayloadOfSchemaType as isPayloadOfSchemaType11,
811
812
  isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources11
812
813
  } from "@xyo-network/payload-model";
813
814
  var isPayment = isPayloadOfSchemaType11(PaymentSchema);
815
+ var asPayment = AsObjectFactory12.create(isPayment);
816
+ var asOptionalPayment = AsObjectFactory12.createOptional(isPayment);
814
817
  var isPaymentWithSources = isPayloadOfSchemaTypeWithSources11(PaymentSchema);
818
+ var asPaymentWithSources = AsObjectFactory12.create(isPaymentWithSources);
819
+ var asOptionalPaymentWithSources = AsObjectFactory12.createOptional(isPaymentWithSources);
815
820
 
816
821
  // src/Payment/Status/Payload.ts
817
- import { AsObjectFactory as AsObjectFactory12 } from "@xylabs/object";
822
+ import { AsObjectFactory as AsObjectFactory13 } from "@xylabs/object";
818
823
  import {
819
824
  isPayloadOfSchemaType as isPayloadOfSchemaType12,
820
825
  isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources12
@@ -825,14 +830,14 @@ var PaymentStatusSchema = `${PaymentSchema}.status`;
825
830
 
826
831
  // src/Payment/Status/Payload.ts
827
832
  var isPaymentStatus = isPayloadOfSchemaType12(PaymentStatusSchema);
828
- var asPaymentStatus = AsObjectFactory12.create(isPaymentStatus);
829
- var asOptionalPaymentStatus = AsObjectFactory12.createOptional(isPaymentStatus);
833
+ var asPaymentStatus = AsObjectFactory13.create(isPaymentStatus);
834
+ var asOptionalPaymentStatus = AsObjectFactory13.createOptional(isPaymentStatus);
830
835
  var isPaymentStatusWithSources = isPayloadOfSchemaTypeWithSources12(PaymentStatusSchema);
831
- var asPaymentStatusWithSources = AsObjectFactory12.create(isPaymentStatusWithSources);
832
- var asOptionalPaymentStatusWithSources = AsObjectFactory12.createOptional(isPaymentStatusWithSources);
836
+ var asPaymentStatusWithSources = AsObjectFactory13.create(isPaymentStatusWithSources);
837
+ var asOptionalPaymentStatusWithSources = AsObjectFactory13.createOptional(isPaymentStatusWithSources);
833
838
 
834
839
  // src/Purchase/Payload.ts
835
- import { AsObjectFactory as AsObjectFactory13 } from "@xylabs/object";
840
+ import { AsObjectFactory as AsObjectFactory14 } from "@xylabs/object";
836
841
  import {
837
842
  isPayloadOfSchemaType as isPayloadOfSchemaType13,
838
843
  isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources13
@@ -843,14 +848,14 @@ var PurchaseSchema = `${PaymentsSchema}.purchase`;
843
848
 
844
849
  // src/Purchase/Payload.ts
845
850
  var isPurchase = isPayloadOfSchemaType13(PurchaseSchema);
846
- var asPurchase = AsObjectFactory13.create(isPurchase);
847
- var asOptionalPurchase = AsObjectFactory13.createOptional(isPurchase);
851
+ var asPurchase = AsObjectFactory14.create(isPurchase);
852
+ var asOptionalPurchase = AsObjectFactory14.createOptional(isPurchase);
848
853
  var isPurchaseWithSources = isPayloadOfSchemaTypeWithSources13(PurchaseSchema);
849
- var asPurchaseWithSources = AsObjectFactory13.create(isPurchaseWithSources);
850
- var asOptionalPurchaseWithSources = AsObjectFactory13.createOptional(isPurchaseWithSources);
854
+ var asPurchaseWithSources = AsObjectFactory14.create(isPurchaseWithSources);
855
+ var asOptionalPurchaseWithSources = AsObjectFactory14.createOptional(isPurchaseWithSources);
851
856
 
852
857
  // src/Receipt/Payload.ts
853
- import { AsObjectFactory as AsObjectFactory14 } from "@xylabs/object";
858
+ import { AsObjectFactory as AsObjectFactory15 } from "@xylabs/object";
854
859
  import {
855
860
  isPayloadOfSchemaType as isPayloadOfSchemaType14,
856
861
  isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources14
@@ -861,35 +866,45 @@ var ReceiptSchema = `${PaymentsSchema}.receipt`;
861
866
 
862
867
  // src/Receipt/Payload.ts
863
868
  var isReceipt = isPayloadOfSchemaType14(ReceiptSchema);
864
- var asReceipt = AsObjectFactory14.create(isReceipt);
865
- var asOptionalReceipt = AsObjectFactory14.createOptional(isReceipt);
869
+ var asReceipt = AsObjectFactory15.create(isReceipt);
870
+ var asOptionalReceipt = AsObjectFactory15.createOptional(isReceipt);
866
871
  var isReceiptWithSources = isPayloadOfSchemaTypeWithSources14(ReceiptSchema);
867
- var asReceiptWithSources = AsObjectFactory14.create(isReceiptWithSources);
868
- var asOptionalReceiptWithSources = AsObjectFactory14.createOptional(isReceiptWithSources);
872
+ var asReceiptWithSources = AsObjectFactory15.create(isReceiptWithSources);
873
+ var asOptionalReceiptWithSources = AsObjectFactory15.createOptional(isReceiptWithSources);
869
874
 
870
875
  // src/Subtotal/Diviner/Config.ts
871
876
  var PaymentSubtotalDivinerConfigSchema = "network.xyo.diviner.payments.subtotal.config";
872
877
 
873
878
  // src/Subtotal/Diviner/Payload.ts
879
+ import { AsObjectFactory as AsObjectFactory16 } from "@xylabs/object";
874
880
  import {
875
881
  isPayloadOfSchemaType as isPayloadOfSchemaType15,
876
882
  isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources15
877
883
  } from "@xyo-network/payload-model";
878
- var SubtotalSchema = "network.xyo.payments.subtotal";
884
+ var SubtotalSchema = "network.xyo.Subtotals.subtotal";
879
885
  var isSubtotal = isPayloadOfSchemaType15(SubtotalSchema);
886
+ var asSubtotal = AsObjectFactory16.create(isSubtotal);
887
+ var asOptionalSubtotal = AsObjectFactory16.createOptional(isSubtotal);
880
888
  var isSubtotalWithSources = isPayloadOfSchemaTypeWithSources15(SubtotalSchema);
889
+ var asSubtotalWithSources = AsObjectFactory16.create(isSubtotalWithSources);
890
+ var asOptionalSubtotalWithSources = AsObjectFactory16.createOptional(isSubtotalWithSources);
881
891
 
882
892
  // src/Total/Diviner/Config.ts
883
893
  var PaymentTotalDivinerConfigSchema = "network.xyo.diviner.payments.total.config";
884
894
 
885
895
  // src/Total/Diviner/Payload.ts
896
+ import { AsObjectFactory as AsObjectFactory17 } from "@xylabs/object";
886
897
  import {
887
898
  isPayloadOfSchemaType as isPayloadOfSchemaType16,
888
899
  isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources16
889
900
  } from "@xyo-network/payload-model";
890
901
  var TotalSchema = "network.xyo.payments.total";
891
902
  var isTotal = isPayloadOfSchemaType16(TotalSchema);
903
+ var asTotal = AsObjectFactory17.create(isTotal);
904
+ var asOptionalTotal = AsObjectFactory17.createOptional(isTotal);
892
905
  var isTotalWithSources = isPayloadOfSchemaTypeWithSources16(TotalSchema);
906
+ var asTotalWithSources = AsObjectFactory17.create(isTotalWithSources);
907
+ var asOptionalTotalWithSources = AsObjectFactory17.createOptional(isTotalWithSources);
893
908
  export {
894
909
  AmountSchema,
895
910
  BillingAddressSchema,
@@ -953,22 +968,34 @@ export {
953
968
  asOptionalFixedPercentageCouponWithSources,
954
969
  asOptionalFixedPriceCoupon,
955
970
  asOptionalFixedPriceCouponWithSources,
971
+ asOptionalPayment,
956
972
  asOptionalPaymentCard,
957
973
  asOptionalPaymentCardWithSources,
958
974
  asOptionalPaymentStatus,
959
975
  asOptionalPaymentStatusWithSources,
976
+ asOptionalPaymentWithSources,
960
977
  asOptionalPurchase,
961
978
  asOptionalPurchaseWithSources,
962
979
  asOptionalReceipt,
963
980
  asOptionalReceiptWithSources,
981
+ asOptionalSubtotal,
982
+ asOptionalSubtotalWithSources,
983
+ asOptionalTotal,
984
+ asOptionalTotalWithSources,
985
+ asPayment,
964
986
  asPaymentCard,
965
987
  asPaymentCardWithSources,
966
988
  asPaymentStatus,
967
989
  asPaymentStatusWithSources,
990
+ asPaymentWithSources,
968
991
  asPurchase,
969
992
  asPurchaseWithSources,
970
993
  asReceipt,
971
994
  asReceiptWithSources,
995
+ asSubtotal,
996
+ asSubtotalWithSources,
997
+ asTotal,
998
+ asTotalWithSources,
972
999
  assetsExistValidator,
973
1000
  buyerExistsValidator,
974
1001
  buyerSecretExistsValidator,