@xyo-network/payment-plugin 5.3.2 → 5.3.4

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 (51) hide show
  1. package/dist/neutral/Discount/Diviner.d.ts +44 -0
  2. package/dist/neutral/Discount/Diviner.d.ts.map +1 -0
  3. package/dist/neutral/Discount/index.d.ts +3 -0
  4. package/dist/neutral/Discount/index.d.ts.map +1 -0
  5. package/dist/neutral/Discount/lib/applyCoupons.d.ts +4 -0
  6. package/dist/neutral/Discount/lib/applyCoupons.d.ts.map +1 -0
  7. package/dist/neutral/Discount/lib/findUnfulfilledConditions.d.ts +20 -0
  8. package/dist/neutral/Discount/lib/findUnfulfilledConditions.d.ts.map +1 -0
  9. package/dist/neutral/Discount/lib/index.d.ts +3 -0
  10. package/dist/neutral/Discount/lib/index.d.ts.map +1 -0
  11. package/dist/neutral/Invoice/getInvoiceForEscrow.d.ts +10 -0
  12. package/dist/neutral/Invoice/getInvoiceForEscrow.d.ts.map +1 -0
  13. package/dist/neutral/Invoice/index.d.ts +2 -0
  14. package/dist/neutral/Invoice/index.d.ts.map +1 -0
  15. package/dist/neutral/Subtotal/Diviner.d.ts +19 -0
  16. package/dist/neutral/Subtotal/Diviner.d.ts.map +1 -0
  17. package/dist/neutral/Subtotal/index.d.ts +2 -0
  18. package/dist/neutral/Subtotal/index.d.ts.map +1 -0
  19. package/dist/neutral/Subtotal/lib/appraisalValidators.d.ts +3 -0
  20. package/dist/neutral/Subtotal/lib/appraisalValidators.d.ts.map +1 -0
  21. package/dist/neutral/Subtotal/lib/durationValidators.d.ts +9 -0
  22. package/dist/neutral/Subtotal/lib/durationValidators.d.ts.map +1 -0
  23. package/dist/neutral/Subtotal/lib/index.d.ts +3 -0
  24. package/dist/neutral/Subtotal/lib/index.d.ts.map +1 -0
  25. package/dist/neutral/Subtotal/lib/termsValidators.d.ts +4 -0
  26. package/dist/neutral/Subtotal/lib/termsValidators.d.ts.map +1 -0
  27. package/dist/neutral/Total/Diviner.d.ts +18 -0
  28. package/dist/neutral/Total/Diviner.d.ts.map +1 -0
  29. package/dist/neutral/Total/index.d.ts +2 -0
  30. package/dist/neutral/Total/index.d.ts.map +1 -0
  31. package/dist/neutral/index.d.ts +5 -0
  32. package/dist/neutral/index.d.ts.map +1 -0
  33. package/dist/neutral/index.mjs +439 -0
  34. package/dist/neutral/index.mjs.map +1 -0
  35. package/package.json +17 -8
  36. package/src/Discount/Diviner.ts +0 -205
  37. package/src/Discount/index.ts +0 -2
  38. package/src/Discount/lib/applyCoupons.ts +0 -95
  39. package/src/Discount/lib/findUnfulfilledConditions.ts +0 -72
  40. package/src/Discount/lib/index.ts +0 -2
  41. package/src/Invoice/getInvoiceForEscrow.ts +0 -40
  42. package/src/Invoice/index.ts +0 -1
  43. package/src/Subtotal/Diviner.ts +0 -65
  44. package/src/Subtotal/index.ts +0 -1
  45. package/src/Subtotal/lib/appraisalValidators.ts +0 -40
  46. package/src/Subtotal/lib/durationValidators.ts +0 -17
  47. package/src/Subtotal/lib/index.ts +0 -2
  48. package/src/Subtotal/lib/termsValidators.ts +0 -17
  49. package/src/Total/Diviner.ts +0 -67
  50. package/src/Total/index.ts +0 -1
  51. package/src/index.ts +0 -4
@@ -0,0 +1,44 @@
1
+ import { Address, Hash } from '@xylabs/sdk-js';
2
+ import { ArchivistInstance } from '@xyo-network/archivist-model';
3
+ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
4
+ import { HashLeaseEstimate } from '@xyo-network/diviner-hash-lease';
5
+ import { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
6
+ import { Payload } from '@xyo-network/payload-model';
7
+ import { Condition, Coupon, Discount, EscrowTerms, PaymentDiscountDivinerParams } from '@xyo-network/payment-payload-plugins';
8
+ export type PaymentDiscountDivinerInputType = EscrowTerms | Coupon | HashLeaseEstimate | Payload;
9
+ export declare class PaymentDiscountDiviner<TParams extends PaymentDiscountDivinerParams = PaymentDiscountDivinerParams, TIn extends PaymentDiscountDivinerInputType = PaymentDiscountDivinerInputType, TOut extends Discount = Discount, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
10
+ static readonly configSchemas: ("network.xyo.diviner.payments.discount.config" & {
11
+ readonly __schema: true;
12
+ })[];
13
+ static readonly defaultConfigSchema: "network.xyo.diviner.payments.discount.config" & {
14
+ readonly __schema: true;
15
+ };
16
+ protected get couponAuthorities(): Address[];
17
+ protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
18
+ /**
19
+ * Filters the supplied list of coupons to only those that are signed by
20
+ * addresses specified in the couponAuthorities
21
+ * @param coupons The list of coupons to filter
22
+ * @returns The filtered list of coupons that are signed by the couponAuthorities
23
+ */
24
+ protected filterToSigned(coupons: Coupon[]): Promise<Coupon[]>;
25
+ protected getDiscountsArchivist(): Promise<ArchivistInstance>;
26
+ protected getDiscountsBoundWitnessDiviner(): Promise<DivinerInstance>;
27
+ /**
28
+ * Finds the appraisals specified by the escrow terms from the supplied payloads
29
+ * @param terms The escrow terms
30
+ * @param payloads The payloads to search for the appraisals
31
+ * @returns The appraisals found in the payloads
32
+ */
33
+ protected getEscrowAppraisals(terms: EscrowTerms, hashMap: Record<Hash, Payload>): HashLeaseEstimate[];
34
+ /**
35
+ * Finds the discounts specified by the escrow terms from the supplied payloads
36
+ * @param terms The escrow terms
37
+ * @param hashMap The payloads to search for the discounts
38
+ * @returns A tuple containing all the escrow coupons and conditions referenced in those coupons
39
+ * that were found in the either the supplied payloads or the archivist
40
+ */
41
+ protected getEscrowDiscounts(terms: EscrowTerms, hashMap: Record<Hash, Payload>): Promise<[Coupon[], Condition[]]>;
42
+ protected isCouponCurrent(coupon: Coupon): boolean;
43
+ }
44
+ //# sourceMappingURL=Diviner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Diviner.d.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O,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;cAqBpD,qBAAqB,IAAI,OAAO,CAAC,iBAAiB,CAAC;cAMnD,+BAA+B,IAAI,OAAO,CAAC,eAAe,CAAC;IAM3E;;;;;OAKG;IACH,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,iBAAiB,EAAE;IAMtG;;;;;;OAMG;cACa,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAiDxH,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAInD"}
@@ -0,0 +1,3 @@
1
+ export * from './Diviner.ts';
2
+ export * from './lib/index.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Discount/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { HashLeaseEstimate } from '@xyo-network/diviner-hash-lease';
2
+ import type { Coupon, Discount } from '@xyo-network/payment-payload-plugins';
3
+ export declare const applyCoupons: (appraisals: HashLeaseEstimate[], coupons: Coupon[]) => Discount;
4
+ //# sourceMappingURL=applyCoupons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyCoupons.d.ts","sourceRoot":"","sources":["../../../../src/Discount/lib/applyCoupons.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EAEV,MAAM,EAAE,QAAQ,EAGjB,MAAM,sCAAsC,CAAA;AAQ7C,eAAO,MAAM,YAAY,GAAI,YAAY,iBAAiB,EAAE,EAAE,SAAS,MAAM,EAAE,KAAG,QAiDjF,CAAA"}
@@ -0,0 +1,20 @@
1
+ import type { Hash } from '@xylabs/sdk-js';
2
+ import type { Payload } from '@xyo-network/payload-model';
3
+ import type { Condition, Coupon } from '@xyo-network/payment-payload-plugins';
4
+ /**
5
+ * Validates the conditions of a coupon against the provided payloads
6
+ * @param coupon The coupon to check
7
+ * @param conditions The conditions associated with the coupon
8
+ * @param payloads The associated payloads (containing the conditions and data to validate the conditions against)
9
+ * @returns True if all conditions are fulfilled, false otherwise
10
+ */
11
+ export declare const areConditionsFulfilled: (coupon: Coupon, conditions?: Condition[], payloads?: Payload[]) => Promise<boolean>;
12
+ /**
13
+ * Validates the conditions of a coupon against the provided payloads
14
+ * @param coupon The coupon to check
15
+ * @param conditions The conditions associated with the coupon
16
+ * @param payloads The associated payloads (containing the conditions and data to validate the conditions against)
17
+ * @returns The unfulfilled condition hashes
18
+ */
19
+ export declare const findUnfulfilledConditions: (coupon: Coupon, conditions?: Condition[], payloads?: Payload[]) => Promise<Hash[]>;
20
+ //# sourceMappingURL=findUnfulfilledConditions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findUnfulfilledConditions.d.ts","sourceRoot":"","sources":["../../../../src/Discount/lib/findUnfulfilledConditions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAA;AAY7E;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAU,QAAQ,MAAM,EAAE,aAAY,SAAS,EAAO,EAAE,WAAU,OAAO,EAAO,KAAG,OAAO,CAAC,OAAO,CACvD,CAAA;AAE9E;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAU,QAAQ,MAAM,EAAE,aAAY,SAAS,EAAO,EAAE,WAAU,OAAO,EAAO,KAAG,OAAO,CAAC,IAAI,EAAE,CAwCtI,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './applyCoupons.ts';
2
+ export * from './findUnfulfilledConditions.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Discount/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,gCAAgC,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { Hash } from '@xylabs/sdk-js';
2
+ import type { DivinerInstance } from '@xyo-network/diviner-model';
3
+ import type { Payload } from '@xyo-network/payload-model';
4
+ import type { EscrowTerms, Invoice } from '@xyo-network/payment-payload-plugins';
5
+ /**
6
+ * Validates the escrow terms to ensure they are valid for a purchase
7
+ * @returns A payment if the terms are valid for a purchase, undefined otherwise
8
+ */
9
+ export declare const getInvoiceForEscrow: (terms: EscrowTerms, dataHashMap: Record<Hash, Payload>, paymentTotalDiviner: DivinerInstance) => Promise<Invoice | undefined>;
10
+ //# sourceMappingURL=getInvoiceForEscrow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInvoiceForEscrow.d.ts","sourceRoot":"","sources":["../../../src/Invoice/getInvoiceForEscrow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EACA,WAAW,EAAE,OAAO,EAE/B,MAAM,sCAAsC,CAAA;AAM7C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,WAAW,EAClB,aAAa,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,EAClC,qBAAqB,eAAe,KACnC,OAAO,CAAC,OAAO,GAAG,SAAS,CAc7B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './getInvoiceForEscrow.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Invoice/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
2
+ import { HashLeaseEstimate } from '@xyo-network/diviner-hash-lease';
3
+ import { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
4
+ import { Payload } from '@xyo-network/payload-model';
5
+ import { EscrowTerms, PaymentSubtotalDivinerParams, Subtotal } from '@xyo-network/payment-payload-plugins';
6
+ /**
7
+ * Escrow terms that contain all the valid fields for calculating a subtotal
8
+ */
9
+ export type PaymentSubtotalDivinerInputType = EscrowTerms | HashLeaseEstimate | Payload;
10
+ export declare class PaymentSubtotalDiviner<TParams extends PaymentSubtotalDivinerParams = PaymentSubtotalDivinerParams, TIn extends PaymentSubtotalDivinerInputType = PaymentSubtotalDivinerInputType, TOut extends Subtotal = Subtotal, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
11
+ static readonly configSchemas: ("network.xyo.diviner.payments.subtotal.config" & {
12
+ readonly __schema: true;
13
+ })[];
14
+ static readonly defaultConfigSchema: "network.xyo.diviner.payments.subtotal.config" & {
15
+ readonly __schema: true;
16
+ };
17
+ protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
18
+ }
19
+ //# sourceMappingURL=Diviner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Subtotal/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAuB,MAAM,iCAAiC,CAAA;AACxF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAEpF,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EACL,WAAW,EAAqD,4BAA4B,EAAE,QAAQ,EACvG,MAAM,sCAAsC,CAAA;AAS7C;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,GAAG,iBAAiB,GAAG,OAAO,CAAA;AAEvF,qBACa,sBAAsB,CACjC,OAAO,SAAS,4BAA4B,GAAG,4BAA4B,EAC3E,GAAG,SAAS,+BAA+B,GAAG,+BAA+B,EAC7E,IAAI,SAAS,QAAQ,GAAG,QAAQ,EAChC,UAAU,SAAS,sBAAsB,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAChH,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EACnC,GAAG,EACH,IAAI,CACL,CACD,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;IACvD,gBAAyB,aAAa;;SAAuC;IAC7E,gBAAyB,mBAAmB;;MAAqC;cAEjE,aAAa,CAAC,QAAQ,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAwBrE"}
@@ -0,0 +1,2 @@
1
+ export * from './Diviner.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Subtotal/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { HashLeaseEstimate } from '@xyo-network/diviner-hash-lease';
2
+ export declare const appraisalValidators: ((appraisals: HashLeaseEstimate[]) => boolean)[];
3
+ //# sourceMappingURL=appraisalValidators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appraisalValidators.d.ts","sourceRoot":"","sources":["../../../../src/Subtotal/lib/appraisalValidators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAkCxE,eAAO,MAAM,mBAAmB,gBA7Ba,iBAAiB,EAAE,KAAG,OAAO,GAkCzE,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { DurationFields } from '@xyo-network/xns-record-payload-plugins';
2
+ /**
3
+ * Validates that the current time is within the duration window, within a configurable a buffer
4
+ * @param value The duration value
5
+ * @param windowMs The window in milliseconds to allow for a buffer
6
+ * @returns True if the duration is valid, false otherwise
7
+ */
8
+ export declare const validateDuration: (value: Partial<DurationFields>, windowMs?: number) => boolean;
9
+ //# sourceMappingURL=durationValidators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"durationValidators.d.ts","sourceRoot":"","sources":["../../../../src/Subtotal/lib/durationValidators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AAI7E;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,CAAC,cAAc,CAAC,EAAE,iBAAuB,KAAG,OAM1F,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './appraisalValidators.ts';
2
+ export * from './termsValidators.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Subtotal/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { EscrowTerms } from '@xyo-network/payment-payload-plugins';
2
+ export type ValidEscrowTerms = Required<EscrowTerms>;
3
+ export declare const termsValidators: ((terms: EscrowTerms) => boolean)[];
4
+ //# sourceMappingURL=termsValidators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"termsValidators.d.ts","sourceRoot":"","sources":["../../../../src/Subtotal/lib/termsValidators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAIvE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;AAQpD,eAAO,MAAM,eAAe,WAFQ,WAAW,KAAG,OAAO,GAKxD,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
2
+ import { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
3
+ import { Discount, PaymentTotalDivinerConfigSchema, PaymentTotalDivinerParams, Subtotal, Total } from '@xyo-network/payment-payload-plugins';
4
+ import { PaymentDiscountDiviner, PaymentDiscountDivinerInputType } from '../Discount/index.ts';
5
+ import { PaymentSubtotalDiviner, PaymentSubtotalDivinerInputType } from '../Subtotal/index.ts';
6
+ type InputType = PaymentDiscountDivinerInputType | PaymentSubtotalDivinerInputType;
7
+ type OutputType = Subtotal | Discount | Total;
8
+ export declare class PaymentTotalDiviner<TParams extends PaymentTotalDivinerParams = PaymentTotalDivinerParams, TIn extends InputType = InputType, TOut extends OutputType = OutputType, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
9
+ static readonly configSchemas: ("network.xyo.diviner.payments.total.config" & {
10
+ readonly __schema: true;
11
+ })[];
12
+ static readonly defaultConfigSchema: PaymentTotalDivinerConfigSchema;
13
+ protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
14
+ protected getPaymentDiscountsDiviner(): Promise<PaymentDiscountDiviner>;
15
+ protected getPaymentSubtotalDiviner(): Promise<PaymentSubtotalDiviner>;
16
+ }
17
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AM7D,yBAAyB,IAAI,OAAO,CAAC,sBAAsB,CAAC;CAK7E"}
@@ -0,0 +1,2 @@
1
+ export * from './Diviner.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Total/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './Discount/index.ts';
2
+ export * from './Invoice/index.ts';
3
+ export * from './Subtotal/index.ts';
4
+ export * from './Total/index.ts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}