@sixtyninecommerce/admin 0.10.0 → 0.12.0
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/README.md +5772 -118
- package/dist/auth/index.d.ts +7 -1
- package/dist/auth/index.js +8 -1
- package/dist/catalog/assets.d.ts +120 -8
- package/dist/catalog/assets.js +98 -12
- package/dist/catalog/collections.d.ts +279 -14
- package/dist/catalog/collections.js +246 -15
- package/dist/catalog/documents.d.ts +142 -0
- package/dist/catalog/documents.js +114 -0
- package/dist/catalog/index.d.ts +54 -6
- package/dist/catalog/index.js +10 -1
- package/dist/catalog/metadata.d.ts +244 -0
- package/dist/catalog/metadata.js +220 -0
- package/dist/catalog/products.d.ts +159 -19
- package/dist/catalog/products.js +88 -13
- package/dist/catalog/properties.d.ts +140 -14
- package/dist/catalog/properties.js +65 -1
- package/dist/catalog/recommendations.d.ts +288 -0
- package/dist/catalog/recommendations.js +237 -0
- package/dist/catalog/reviews.d.ts +381 -0
- package/dist/catalog/reviews.js +325 -0
- package/dist/catalog/types.d.ts +17 -1
- package/dist/catalog/types.js +10 -0
- package/dist/catalog/variant-find.d.ts +136 -0
- package/dist/catalog/variant-find.js +239 -0
- package/dist/catalog/variants.d.ts +293 -26
- package/dist/catalog/variants.js +164 -7
- package/dist/catalog/visibility.d.ts +38 -7
- package/dist/catalog/visibility.js +19 -1
- package/dist/client.d.ts +121 -9
- package/dist/client.js +53 -14
- package/dist/content/assets.d.ts +285 -0
- package/dist/content/assets.js +181 -0
- package/dist/content/forms.d.ts +332 -1
- package/dist/content/forms.js +140 -4
- package/dist/content/items.d.ts +292 -0
- package/dist/content/items.js +170 -0
- package/dist/content/menus.d.ts +254 -0
- package/dist/content/menus.js +70 -0
- package/dist/content/strings.d.ts +137 -0
- package/dist/content/strings.js +82 -0
- package/dist/content/types.d.ts +282 -0
- package/dist/content/types.js +100 -0
- package/dist/customers/age-verification.d.ts +66 -0
- package/dist/customers/age-verification.js +79 -0
- package/dist/customers/credit.d.ts +263 -0
- package/dist/customers/credit.js +244 -0
- package/dist/customers/delivery-preferences.d.ts +120 -0
- package/dist/customers/delivery-preferences.js +97 -0
- package/dist/customers/delivery-terms.d.ts +44 -0
- package/dist/customers/delivery-terms.js +32 -0
- package/dist/customers/groups.d.ts +207 -0
- package/dist/customers/groups.js +438 -0
- package/dist/customers/index.d.ts +462 -37
- package/dist/customers/index.js +317 -40
- package/dist/customers/invitation-status.d.ts +57 -0
- package/dist/customers/invitation-status.js +21 -0
- package/dist/customers/notes.d.ts +67 -0
- package/dist/customers/notes.js +51 -0
- package/dist/customers/notification-recipients.d.ts +97 -0
- package/dist/customers/notification-recipients.js +84 -0
- package/dist/customers/saved-lists.d.ts +42 -0
- package/dist/customers/saved-lists.js +61 -0
- package/dist/customers/vat.d.ts +83 -0
- package/dist/customers/vat.js +46 -0
- package/dist/customers/wire.d.ts +20 -0
- package/dist/customers/wire.js +35 -0
- package/dist/documents/ar.d.ts +307 -0
- package/dist/documents/ar.js +254 -0
- package/dist/documents/emails.d.ts +150 -0
- package/dist/documents/emails.js +220 -0
- package/dist/documents/index.d.ts +744 -21
- package/dist/documents/index.js +438 -24
- package/dist/documents/pdf.d.ts +2 -0
- package/dist/documents/pdf.js +11 -0
- package/dist/fulfillments/create.d.ts +167 -0
- package/dist/fulfillments/create.js +216 -0
- package/dist/fulfillments/index.d.ts +163 -11
- package/dist/fulfillments/index.js +135 -6
- package/dist/fulfillments/payment-policy.d.ts +64 -0
- package/dist/fulfillments/payment-policy.js +140 -0
- package/dist/fulfillments/warehouse.d.ts +724 -0
- package/dist/fulfillments/warehouse.js +914 -0
- package/dist/geo/index.d.ts +119 -0
- package/dist/geo/index.js +107 -0
- package/dist/index.d.ts +147 -39
- package/dist/index.js +51 -12
- package/dist/integrations/afas-actions.d.ts +234 -0
- package/dist/integrations/afas-actions.js +310 -0
- package/dist/integrations/afas-types.d.ts +483 -0
- package/dist/integrations/afas-types.js +5 -0
- package/dist/integrations/afas.d.ts +234 -0
- package/dist/integrations/afas.js +290 -0
- package/dist/integrations/connections.d.ts +103 -0
- package/dist/integrations/connections.js +55 -0
- package/dist/integrations/esp.d.ts +313 -0
- package/dist/integrations/esp.js +169 -0
- package/dist/integrations/exact-online-types.d.ts +965 -0
- package/dist/integrations/exact-online-types.js +6 -0
- package/dist/integrations/exact-online.d.ts +784 -0
- package/dist/integrations/exact-online.js +1089 -0
- package/dist/integrations/index.d.ts +44 -3
- package/dist/integrations/index.js +23 -3
- package/dist/integrations/pipeline-discoveries.d.ts +65 -0
- package/dist/integrations/pipeline-discoveries.js +65 -0
- package/dist/integrations/pipeline-keys.d.ts +13 -0
- package/dist/integrations/pipeline-keys.js +22 -0
- package/dist/integrations/pipeline-runs.d.ts +119 -0
- package/dist/integrations/pipeline-runs.js +87 -0
- package/dist/integrations/pipelines.d.ts +87 -15
- package/dist/integrations/pipelines.js +41 -22
- package/dist/integrations/price-import.d.ts +223 -0
- package/dist/integrations/price-import.js +124 -0
- package/dist/integrations/types.d.ts +367 -3
- package/dist/integrations/types.js +4 -3
- package/dist/locations/index.d.ts +66 -0
- package/dist/locations/index.js +31 -0
- package/dist/meta/index.d.ts +172 -0
- package/dist/metafields/index.d.ts +8 -1
- package/dist/metafields/index.js +10 -0
- package/dist/orders/cancel-with-money.d.ts +237 -0
- package/dist/orders/cancel-with-money.js +155 -0
- package/dist/orders/commit-edit.d.ts +23 -1
- package/dist/orders/commit-edit.js +19 -2
- package/dist/orders/deposit-policy.d.ts +3 -1
- package/dist/orders/drafts.d.ts +800 -0
- package/dist/orders/drafts.js +771 -0
- package/dist/orders/fields.d.ts +245 -0
- package/dist/orders/fields.js +188 -0
- package/dist/orders/get.d.ts +29 -19
- package/dist/orders/get.js +17 -8
- package/dist/orders/index.d.ts +66 -15
- package/dist/orders/index.js +25 -2
- package/dist/orders/lifecycle.d.ts +128 -0
- package/dist/orders/lifecycle.js +158 -0
- package/dist/orders/line-price-preview.d.ts +7 -2
- package/dist/orders/list.d.ts +243 -0
- package/dist/orders/list.js +487 -0
- package/dist/orders/manual-discounts.d.ts +13 -5
- package/dist/orders/manual-pricing.d.ts +5 -0
- package/dist/orders/money-view.d.ts +149 -0
- package/dist/orders/money-view.js +99 -0
- package/dist/orders/order-entry.d.ts +20 -7
- package/dist/orders/plan-edit.d.ts +34 -2
- package/dist/orders/plan-edit.js +112 -11
- package/dist/orders/settings.d.ts +201 -0
- package/dist/orders/settings.js +325 -0
- package/dist/orders/status.d.ts +159 -13
- package/dist/orders/status.js +21 -0
- package/dist/orders/surcharges.d.ts +20 -1
- package/dist/orders/surcharges.js +37 -11
- package/dist/payments/account-credit.d.ts +46 -0
- package/dist/payments/account-credit.js +42 -0
- package/dist/payments/ar.d.ts +292 -0
- package/dist/payments/ar.js +223 -0
- package/dist/payments/connected-account.d.ts +47 -0
- package/dist/payments/connected-account.js +61 -0
- package/dist/payments/credit-noted-fields.d.ts +19 -0
- package/dist/payments/credit-noted-fields.js +69 -0
- package/dist/payments/customer-consent.d.ts +30 -0
- package/dist/payments/customer-consent.js +49 -0
- package/dist/payments/index.d.ts +340 -19
- package/dist/payments/index.js +151 -1
- package/dist/payments/methods.d.ts +303 -8
- package/dist/payments/methods.js +337 -7
- package/dist/payments/mollie-methods.d.ts +159 -0
- package/dist/payments/mollie-methods.js +141 -0
- package/dist/payments/payment-links.d.ts +180 -0
- package/dist/payments/payment-links.js +97 -0
- package/dist/payments/provider-keys.d.ts +150 -0
- package/dist/payments/provider-keys.js +118 -0
- package/dist/payments/providers.d.ts +86 -11
- package/dist/payments/providers.js +29 -0
- package/dist/payments/requests.d.ts +147 -0
- package/dist/payments/requests.js +93 -0
- package/dist/payments/store-credit-fields.d.ts +15 -0
- package/dist/payments/store-credit-fields.js +51 -0
- package/dist/pickups/index.d.ts +106 -0
- package/dist/pickups/index.js +108 -0
- package/dist/platform/channels.d.ts +132 -0
- package/dist/platform/channels.js +128 -0
- package/dist/platform/email-gateways.d.ts +165 -0
- package/dist/platform/email-gateways.js +78 -0
- package/dist/platform/geo.d.ts +123 -0
- package/dist/platform/geo.js +144 -0
- package/dist/platform/tax.d.ts +162 -0
- package/dist/platform/tax.js +169 -0
- package/dist/pos/anomalies.d.ts +158 -0
- package/dist/pos/anomalies.js +64 -0
- package/dist/pos/assisted-selling.d.ts +79 -0
- package/dist/pos/assisted-selling.js +38 -0
- package/dist/pos/exchanges.d.ts +108 -0
- package/dist/pos/exchanges.js +22 -0
- package/dist/pos/gift-cards.d.ts +135 -0
- package/dist/pos/gift-cards.js +47 -0
- package/dist/pos/index.d.ts +2370 -58
- package/dist/pos/index.js +854 -7
- package/dist/pos/no-receipt.d.ts +94 -0
- package/dist/pos/no-receipt.js +25 -0
- package/dist/pos/offline-sales.d.ts +228 -0
- package/dist/pos/offline-sales.js +170 -0
- package/dist/pos/pay-by-link.d.ts +143 -0
- package/dist/pos/pay-by-link.js +57 -0
- package/dist/pos/quick-keys.d.ts +103 -0
- package/dist/pos/quick-keys.js +45 -0
- package/dist/pos/reports.d.ts +360 -0
- package/dist/pos/reports.js +62 -0
- package/dist/pos/returns.d.ts +244 -0
- package/dist/pos/returns.js +83 -0
- package/dist/pricing/bulk-coupons.d.ts +139 -0
- package/dist/pricing/bulk-coupons.js +112 -0
- package/dist/pricing/index.d.ts +174 -4
- package/dist/pricing/index.js +174 -1
- package/dist/pricing/price-lists.d.ts +606 -0
- package/dist/pricing/price-lists.js +600 -0
- package/dist/purchasing/alerts.d.ts +104 -0
- package/dist/purchasing/alerts.js +88 -0
- package/dist/purchasing/backorders.d.ts +61 -0
- package/dist/purchasing/backorders.js +92 -0
- package/dist/purchasing/cost.d.ts +110 -0
- package/dist/purchasing/cost.js +86 -0
- package/dist/purchasing/index.d.ts +54 -0
- package/dist/purchasing/index.js +24 -0
- package/dist/purchasing/links.d.ts +263 -0
- package/dist/purchasing/links.js +192 -0
- package/dist/purchasing/purchase-orders.d.ts +551 -0
- package/dist/purchasing/purchase-orders.js +491 -0
- package/dist/purchasing/receipts.d.ts +396 -0
- package/dist/purchasing/receipts.js +287 -0
- package/dist/purchasing/replenishment.d.ts +281 -0
- package/dist/purchasing/replenishment.js +240 -0
- package/dist/purchasing/returns.d.ts +273 -0
- package/dist/purchasing/returns.js +229 -0
- package/dist/purchasing/settings.d.ts +152 -0
- package/dist/purchasing/settings.js +181 -0
- package/dist/purchasing/suppliers.d.ts +476 -0
- package/dist/purchasing/suppliers.js +438 -0
- package/dist/quotes/index.d.ts +518 -0
- package/dist/quotes/index.js +439 -0
- package/dist/reports/index.d.ts +71 -8
- package/dist/reports/index.js +74 -11
- package/dist/returns/index.d.ts +675 -21
- package/dist/returns/index.js +756 -11
- package/dist/search/index.d.ts +76 -1
- package/dist/search/index.js +63 -0
- package/dist/seo/config.d.ts +128 -0
- package/dist/seo/config.js +95 -0
- package/dist/seo/redirects.d.ts +125 -0
- package/dist/seo/redirects.js +60 -1
- package/dist/seo/settings.d.ts +147 -0
- package/dist/seo/settings.js +209 -0
- package/dist/shipping/definitions.d.ts +29 -0
- package/dist/shipping/definitions.js +47 -0
- package/dist/shipping/fulfillment-profiles.d.ts +174 -0
- package/dist/shipping/fulfillment-profiles.js +104 -0
- package/dist/shipping/hendriks.d.ts +97 -0
- package/dist/shipping/hendriks.js +50 -0
- package/dist/shipping/index.d.ts +54 -0
- package/dist/shipping/index.js +27 -0
- package/dist/shipping/methods.d.ts +205 -0
- package/dist/shipping/methods.js +240 -0
- package/dist/shipping/myparcel.d.ts +668 -0
- package/dist/shipping/myparcel.js +466 -0
- package/dist/shipping/parcel-count-suggestion.d.ts +2 -0
- package/dist/shipping/parcel-rule.d.ts +6 -5
- package/dist/shipping/parcel-rule.js +21 -23
- package/dist/shipping/rate-tables.d.ts +324 -0
- package/dist/shipping/rate-tables.js +390 -0
- package/dist/shipping/ship-to-countries.d.ts +75 -0
- package/dist/shipping/ship-to-countries.js +47 -0
- package/dist/stock/by-location.d.ts +86 -0
- package/dist/stock/by-location.js +94 -0
- package/dist/stock/index.d.ts +18 -4
- package/dist/stock/index.js +7 -0
- package/dist/stock/locations.d.ts +144 -0
- package/dist/stock/locations.js +168 -0
- package/dist/stock/settings.d.ts +106 -0
- package/dist/stock/settings.js +103 -0
- package/dist/stock/transfers.d.ts +386 -52
- package/dist/stock/transfers.js +222 -17
- package/dist/stored-value/index.d.ts +312 -11
- package/dist/stored-value/index.js +223 -4
- package/dist/subscriptions/index.d.ts +682 -0
- package/dist/subscriptions/index.js +815 -0
- package/dist/tax/display-policy.d.ts +105 -0
- package/dist/tax/display-policy.js +84 -0
- package/dist/tax/index.d.ts +79 -1
- package/dist/tax/index.js +52 -0
- package/dist/tenant/email-style.d.ts +102 -0
- package/dist/tenant/email-style.js +72 -0
- package/dist/tenant/email-templates.d.ts +287 -0
- package/dist/tenant/email-templates.js +271 -0
- package/dist/tenant/notifications.d.ts +23 -17
- package/dist/tenant/settings-sources.d.ts +1 -1
- package/dist/tenant/time-zone.d.ts +17 -0
- package/dist/tenant/time-zone.js +11 -0
- package/dist/types.d.ts +50 -3
- package/dist/users/index.d.ts +3 -0
- package/dist/users/index.js +2 -0
- package/dist/users/warehouses.d.ts +50 -0
- package/dist/users/warehouses.js +51 -0
- package/package.json +2 -2
package/dist/payments/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Transport } from '@sixtyninecommerce/core';
|
|
2
|
+
import type { InvoiceCorrectionLedger } from '../documents/index.js';
|
|
2
3
|
import type { Call } from '../types.js';
|
|
3
4
|
import { type AccountCreditModule } from './account-credit.js';
|
|
5
|
+
import { type ArPaymentsModule } from './ar.js';
|
|
4
6
|
import { type PaymentMethodsModule } from './methods.js';
|
|
7
|
+
import { type PaymentLinksModule } from './payment-links.js';
|
|
5
8
|
import { type ProvidersModule } from './providers.js';
|
|
9
|
+
import { type PaymentRequestsModule } from './requests.js';
|
|
6
10
|
/**
|
|
7
11
|
* What an order has actually been paid, in minor units of its own currency.
|
|
8
12
|
*
|
|
@@ -10,7 +14,11 @@ import { type ProvidersModule } from './providers.js';
|
|
|
10
14
|
* is a second source of truth that drifts the first time a refund lands.
|
|
11
15
|
*/
|
|
12
16
|
export interface OrderPaymentPosition {
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The order's own gross total, carrying the order's rounding rule. 0 for a `Cancelled` order:
|
|
19
|
+
* a cancelled order bills nothing. A credit note does not change it: see `creditNoted` and
|
|
20
|
+
* `owed`.
|
|
21
|
+
*/
|
|
14
22
|
total: number;
|
|
15
23
|
/** Settled plus authorized, less refunds: what is accounted for. */
|
|
16
24
|
covered: number;
|
|
@@ -24,24 +32,65 @@ export interface OrderPaymentPosition {
|
|
|
24
32
|
* counted here, though it is taken off `settled` like one.
|
|
25
33
|
*/
|
|
26
34
|
refunded: number;
|
|
27
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* What the order's credit notes took off what it bills: `total` less what its invoices bill net
|
|
37
|
+
* of their credit notes (a part credited, an invoice voided with no replacement), never more
|
|
38
|
+
* than `total`; 0 for an order with no invoice. A correction never restates the order, so
|
|
39
|
+
* `total` keeps reading what it first billed. Taken off `owed` only.
|
|
40
|
+
*
|
|
41
|
+
* Read by {@link PaymentsModule.position}, `orders.paymentPosition` and the cancel-with-money
|
|
42
|
+
* preview and answer. Against an engine that does not serve it those calls resend their document
|
|
43
|
+
* without it (`creditNotedAware`), so it is absent and reads as zero; absent from a settlement's
|
|
44
|
+
* position too.
|
|
45
|
+
*/
|
|
46
|
+
creditNoted?: number;
|
|
47
|
+
/**
|
|
48
|
+
* What the customer still owes once the credit notes are counted: `total - creditNoted -
|
|
49
|
+
* covered`, floored at zero. A refund that went back with a credit note is owed by nobody.
|
|
50
|
+
* Equals `outstanding` when nothing was credited. Read by the same calls as `creditNoted`; where
|
|
51
|
+
* it is absent, the customer owes `outstanding`.
|
|
52
|
+
*/
|
|
53
|
+
owed?: number;
|
|
54
|
+
/**
|
|
55
|
+
* What the order's SETTLED money must reach before it counts as paid: `total` less what a live
|
|
56
|
+
* invoice's credit notes took off it. An order paid down to what its invoice bills net of its
|
|
57
|
+
* credit notes is paid in full: `orders.settle`, the staff move into `PaymentSettled` and the
|
|
58
|
+
* platform's own settlement all measure this figure. Equals `total` when nothing was credited,
|
|
59
|
+
* and also when the order's only invoice was cancelled with nothing in its place (it owes
|
|
60
|
+
* nothing more, `owed`, but counts as paid only once it is invoiced again or cancelled). Read by
|
|
61
|
+
* {@link PaymentsModule.position} and `orders.paymentPosition`; against an engine that does not
|
|
62
|
+
* serve it those calls resend without it, and an absent `payable` reads as `total`.
|
|
63
|
+
*/
|
|
64
|
+
payable?: number;
|
|
65
|
+
/**
|
|
66
|
+
* `total - covered`, floored at zero: what the payments are short of the order's total. On an
|
|
67
|
+
* order whose credit notes took part of its bill off, `owed` is what the customer still owes,
|
|
68
|
+
* and what `record` caps a payment at.
|
|
69
|
+
*/
|
|
28
70
|
outstanding: number;
|
|
29
71
|
/**
|
|
30
72
|
* `covered - total`, floored at zero. Over-payment is refused at the door, so
|
|
31
73
|
* this is non-zero only for imported history, rows predating the guard, a
|
|
32
|
-
* refund that landed after a second payment,
|
|
33
|
-
* total of a paid order
|
|
74
|
+
* refund that landed after a second payment, an edit that lowered the
|
|
75
|
+
* total of a paid order, or money kept on a cancelled order (a cancelled
|
|
76
|
+
* order bills nothing; `orders.cancelWithMoney` with `retain`), which can
|
|
77
|
+
* still be credited to the account. Money moved to the customer's account
|
|
34
78
|
* (`payments.accountCredit.creditOverpayment`) no longer counts here.
|
|
35
79
|
*/
|
|
36
80
|
overpaid: number;
|
|
37
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* What a further payment may take: what is still owed once the credit notes are counted
|
|
83
|
+
* (`owed`; `outstanding` when nothing was credited). An engine before the credit-noted caps
|
|
84
|
+
* answers `outstanding` here.
|
|
85
|
+
*/
|
|
38
86
|
availableToCharge: number;
|
|
39
87
|
}
|
|
40
88
|
/** Money the merchant HAS, recorded against an order. */
|
|
41
89
|
export interface RecordPaymentInput {
|
|
42
90
|
/**
|
|
43
|
-
* Minor units of the order's currency. Greater than zero, and at most the
|
|
44
|
-
* order's `outstanding`
|
|
91
|
+
* Minor units of the order's currency. Greater than zero, and at most what the
|
|
92
|
+
* order still owes (its position's `owed`: `outstanding` less what its credit
|
|
93
|
+
* notes took off its bill) — an over-payment is refused rather than accepted,
|
|
45
94
|
* and the refusal carries the position so a till can correct itself without a
|
|
46
95
|
* second round trip.
|
|
47
96
|
*/
|
|
@@ -81,7 +130,10 @@ export interface RefundablePayment {
|
|
|
81
130
|
/**
|
|
82
131
|
* `amount - refunded`, less what of this payment is on the customer's account
|
|
83
132
|
* (`payments.accountCredit.onOrder`), when this payment took money; floored
|
|
84
|
-
* at zero, else zero.
|
|
133
|
+
* at zero, else zero. Less, too, this payment's share of what the gift cards
|
|
134
|
+
* sold on the order hold: a live card's value, and a voided card's spent (or
|
|
135
|
+
* expired) value, which stays held for good. How much, and on which payment:
|
|
136
|
+
* {@link PaymentsModule.refundGiftCardHold}.
|
|
85
137
|
*/
|
|
86
138
|
refundable: number;
|
|
87
139
|
/**
|
|
@@ -118,11 +170,43 @@ export interface OrderRefundPosition {
|
|
|
118
170
|
* Money moved to the customer's account as unapplied cash IS deducted: it is
|
|
119
171
|
* paid back from the account (`payments.accountCredit.refund`), never from
|
|
120
172
|
* the order a second time.
|
|
173
|
+
*
|
|
174
|
+
* What the gift cards sold on the order hold is deducted too: a live card's
|
|
175
|
+
* value, and a voided card's spent (or expired) value, which stays held for
|
|
176
|
+
* good. A refund of it is refused `REFUND_HELD_BY_GIFT_CARD`;
|
|
177
|
+
* {@link PaymentsModule.refundGiftCardHold} says how much, and on which payment.
|
|
121
178
|
*/
|
|
122
179
|
refundable: number;
|
|
123
180
|
/** Every payment on the order, NEWEST FIRST, with its own headroom. */
|
|
124
181
|
perPayment: RefundablePayment[];
|
|
125
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* What the gift cards sold on an order hold of its money: why its refund position's `refundable`
|
|
185
|
+
* is lower than what its payments took ({@link PaymentsModule.refundGiftCardHold}).
|
|
186
|
+
*/
|
|
187
|
+
export interface RefundGiftCardHold {
|
|
188
|
+
/** The order's currency. Every amount here is in its minor units. */
|
|
189
|
+
currencyCode: string;
|
|
190
|
+
/**
|
|
191
|
+
* What the cards hold: each card its face value less what a void released, and a void releases
|
|
192
|
+
* at most what the card had not spent, so a card's spent (or expired) value stays held for good.
|
|
193
|
+
* Already counted out of `refundable`, so `refundable` plus this is what the payments would hand
|
|
194
|
+
* back with no card. A refund of it is refused `REFUND_HELD_BY_GIFT_CARD`. 0 when no card holds
|
|
195
|
+
* any.
|
|
196
|
+
*/
|
|
197
|
+
giftCardHold: number;
|
|
198
|
+
/**
|
|
199
|
+
* How many of the cards sold on the order are still live (not voided); null while
|
|
200
|
+
* `giftCardHold` is 0. Above 0, voiding a card releases what it has not spent; 0 means every
|
|
201
|
+
* card is voided, and what they hold is spent value that stays with the store.
|
|
202
|
+
*/
|
|
203
|
+
liveGiftCards: number | null;
|
|
204
|
+
/** Each payment's share of the hold, NEWEST FIRST, as `refundPosition` lists them. */
|
|
205
|
+
perPayment: Array<{
|
|
206
|
+
paymentId: string;
|
|
207
|
+
giftCardHold: number;
|
|
208
|
+
}>;
|
|
209
|
+
}
|
|
126
210
|
/**
|
|
127
211
|
* A refund whose outcome is unknown: it reached its payment provider and was
|
|
128
212
|
* never confirmed (a timeout, a dropped connection, a server error), so the
|
|
@@ -139,6 +223,30 @@ export interface UnreconciledRefund {
|
|
|
139
223
|
/** ISO-8601 with offset. */
|
|
140
224
|
createdAt: string | null;
|
|
141
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* The invoice a refund of an order must go through, so a credit note says what the money was for
|
|
228
|
+
* (see {@link PaymentsModule.refundCreditNoteRequirement}).
|
|
229
|
+
*/
|
|
230
|
+
export interface RefundCreditNoteRequirement {
|
|
231
|
+
/** The live invoice billing the order: plan and commit the correction on it. */
|
|
232
|
+
invoiceId: string;
|
|
233
|
+
/** As printed on the invoice. */
|
|
234
|
+
invoiceNumber: string;
|
|
235
|
+
/**
|
|
236
|
+
* The ledger to plan the correction on (`documents.planCorrection({ ledger, invoiceId })`).
|
|
237
|
+
* `RETAIL` is named first when the order has both: its correction can carry the refund.
|
|
238
|
+
*/
|
|
239
|
+
ledger: InvoiceCorrectionLedger;
|
|
240
|
+
/**
|
|
241
|
+
* Minor units of the order's currency: what its payments hold over what it bills (a duplicate
|
|
242
|
+
* payment, say), net of every refund. "What it bills" is the larger of the order's total and
|
|
243
|
+
* what its live invoices bill. {@link PaymentsModule.refund} gives back up to this much
|
|
244
|
+
* without a credit note, recorded as an overpayment refund (the invoice never billed it); a
|
|
245
|
+
* larger refund goes through the correction. `0` when the order is not overpaid. Only payments
|
|
246
|
+
* that took money count, and a refund of unknown outcome stays reserved.
|
|
247
|
+
*/
|
|
248
|
+
refundableOverpayment: number;
|
|
249
|
+
}
|
|
142
250
|
/** What the payment provider says happened to a refund whose outcome was unknown. */
|
|
143
251
|
export type RefundProviderOutcome = 'MADE' | 'NOT_MADE';
|
|
144
252
|
/** The provider's answer for a refund whose outcome is unknown. */
|
|
@@ -202,6 +310,48 @@ export interface PaidOrder {
|
|
|
202
310
|
total: number;
|
|
203
311
|
totalWithTax: number;
|
|
204
312
|
}
|
|
313
|
+
/** A payment, as {@link PaymentsModule.settle} and {@link PaymentsModule.cancel} answer it. */
|
|
314
|
+
export interface OrderPaymentRecord {
|
|
315
|
+
id: string;
|
|
316
|
+
/** Vendure's payment state: `Settled` after a capture, `Cancelled` after a void. */
|
|
317
|
+
state: string;
|
|
318
|
+
/** The payment method code. */
|
|
319
|
+
method: string;
|
|
320
|
+
/** Minor units of the order's currency. */
|
|
321
|
+
amount: number;
|
|
322
|
+
/** The provider's reference for the payment, when it gave one. */
|
|
323
|
+
transactionId: string | null;
|
|
324
|
+
}
|
|
325
|
+
/** A coded refusal "mark as paid" would answer now ({@link PaymentsModule.settlePreview}). */
|
|
326
|
+
export interface PaymentSettleRefusal {
|
|
327
|
+
/**
|
|
328
|
+
* `PAYMENT_CAPTURE_EXCEEDS_BILLED`, `ORDER_CANCELLED_PAYMENT_CONFLICT` or
|
|
329
|
+
* `PAYMENT_STATE_TRANSITION_ERROR`: the code {@link PaymentsModule.settle} would throw.
|
|
330
|
+
*/
|
|
331
|
+
code: string;
|
|
332
|
+
/** The engine's sentence for staff: why, and what to do instead. */
|
|
333
|
+
message: string;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* What {@link PaymentsModule.settle} would do to an authorized payment as its order stands now
|
|
337
|
+
* ({@link PaymentsModule.settlePreview}). Nothing was written. Minor units of the order's currency.
|
|
338
|
+
*/
|
|
339
|
+
export interface PaymentSettlePreview {
|
|
340
|
+
paymentId: string;
|
|
341
|
+
/** The payment's amount as it stands: what it authorized. */
|
|
342
|
+
authorized: number;
|
|
343
|
+
/**
|
|
344
|
+
* What the capture records now: `authorized`, or less on an order whose credit notes lowered
|
|
345
|
+
* what it bills (the rest of a promise whose money moves by hand is dropped). 0 when refused.
|
|
346
|
+
*/
|
|
347
|
+
records: number;
|
|
348
|
+
/** What the order's credit notes took off what it bills; 0 when the capture is whole. */
|
|
349
|
+
creditNoted: number;
|
|
350
|
+
/** The numbers of the credit notes behind `records` or the refusal, oldest first. */
|
|
351
|
+
creditNotes: string[];
|
|
352
|
+
/** Null when the capture may run; else the coded refusal it would answer now. */
|
|
353
|
+
refusal: PaymentSettleRefusal | null;
|
|
354
|
+
}
|
|
205
355
|
/** What a payment app reports happened to a payment it took (`reportAppPayment`). */
|
|
206
356
|
export type AppPaymentReportState = 'Authorized' | 'Settled' | 'Declined' | 'Cancelled';
|
|
207
357
|
/** An app's report on one of its payments. */
|
|
@@ -285,11 +435,27 @@ export interface PaymentsModule {
|
|
|
285
435
|
* to an invoice, pay it back.
|
|
286
436
|
*/
|
|
287
437
|
accountCredit: AccountCreditModule;
|
|
438
|
+
/**
|
|
439
|
+
* Money on the accounts-receivable ledger: customer payments against AR invoices, the ledger,
|
|
440
|
+
* prepaid drawdowns and SEPA direct debit collection.
|
|
441
|
+
*/
|
|
442
|
+
ar: ArPaymentsModule;
|
|
288
443
|
/**
|
|
289
444
|
* The store's payment methods, as staff choose one: the `method` code
|
|
290
445
|
* {@link PaymentsModule.record} takes, and the codes a deposit policy names.
|
|
291
446
|
*/
|
|
292
447
|
methods: PaymentMethodsModule;
|
|
448
|
+
/**
|
|
449
|
+
* Hosted payment requests: ask the customer to pay a chosen amount of a held
|
|
450
|
+
* order or a committed draft through a stable link that opens the payment
|
|
451
|
+
* provider's checkout. See {@link PaymentRequestsModule}.
|
|
452
|
+
*/
|
|
453
|
+
requests: PaymentRequestsModule;
|
|
454
|
+
/**
|
|
455
|
+
* The store's payment links (Tikkie): the connection's settings and checks, and the links an
|
|
456
|
+
* order was sent by invoice e-mail. See {@link PaymentLinksModule}.
|
|
457
|
+
*/
|
|
458
|
+
paymentLinks: PaymentLinksModule;
|
|
293
459
|
/**
|
|
294
460
|
* Record part (or all) of what an order owes, and return the order.
|
|
295
461
|
*
|
|
@@ -297,15 +463,27 @@ export interface PaymentsModule {
|
|
|
297
463
|
* argument, so a retry under the same key returns the first call's order
|
|
298
464
|
* rather than taking the money twice. Use a fresh key per intended payment.
|
|
299
465
|
*
|
|
300
|
-
* Refusals: `AMOUNT_EXCEEDS_OUTSTANDING` (
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
466
|
+
* Refusals: `AMOUNT_EXCEEDS_OUTSTANDING` (more than the order still owes,
|
|
467
|
+
* `owed`, with the position attached; its message names the credit notes that
|
|
468
|
+
* lowered it), `AMOUNT_NOT_POSITIVE`, `ORDER_NOT_RECORDABLE` (the order's state
|
|
469
|
+
* cannot take a payment), `DEPOSITS_NOT_ENABLED` — a PARTIAL payment (less
|
|
470
|
+
* than `owed`) on a store that has not turned deposits on; paying all it owes
|
|
471
|
+
* is not a deposit and always works, and neither is a stored-value payment (a
|
|
472
|
+
* gift card or store credit) on an order still arranging payment: that part is
|
|
473
|
+
* taken whatever the deposit policy, and the order is placed only once its
|
|
474
|
+
* money covers it — `METADATA_KEY_RESERVED`,
|
|
305
475
|
* `PAYMENT_METHOD_NOT_FOUND`, `ORDER_NOT_FOUND`.
|
|
476
|
+
*
|
|
477
|
+
* @effect money
|
|
306
478
|
*/
|
|
307
479
|
record(orderId: string, input: RecordPaymentInput, options?: Call): Promise<PaidOrder>;
|
|
308
|
-
/**
|
|
480
|
+
/**
|
|
481
|
+
* Read an order's payment position: what it bills, what was paid and refunded, what its credit
|
|
482
|
+
* notes took off (`creditNoted`), what the customer still owes after them (`owed`) and what its
|
|
483
|
+
* settled money must reach before it counts as paid (`payable`).
|
|
484
|
+
*
|
|
485
|
+
* @effect read
|
|
486
|
+
*/
|
|
309
487
|
position(orderId: string, options?: Call): Promise<OrderPaymentPosition>;
|
|
310
488
|
/**
|
|
311
489
|
* Hand money back to a customer, never more than the order took.
|
|
@@ -379,10 +557,141 @@ export interface PaymentsModule {
|
|
|
379
557
|
* order has been read carries that order's position in
|
|
380
558
|
* `extensions.refundPosition`, so a till can correct itself without a second
|
|
381
559
|
* round trip.
|
|
560
|
+
*
|
|
561
|
+
* **An invoiced order is refunded through its invoice, not here.** While the
|
|
562
|
+
* order has a live invoice, this refuses `REFUND_REQUIRES_CREDIT_NOTE` (a
|
|
563
|
+
* `ConflictError`, 409) before anything else: a refund made here issues no
|
|
564
|
+
* document, and the invoice would stand with no credit note for the money.
|
|
565
|
+
* Ask {@link refundCreditNoteRequirement} first; it names the invoice, and
|
|
566
|
+
* `documents.commitCorrection` on it issues the credit note and then refunds.
|
|
567
|
+
* Not refused: an amount within the order's overpayment
|
|
568
|
+
* (`refundableOverpayment`, money the invoice never billed), refunded here
|
|
569
|
+
* and recorded as an overpayment refund; and a customer with a credit
|
|
570
|
+
* account on a store that keeps the accounts-receivable ledger, whose refund
|
|
571
|
+
* is documented when it settles: by an AR credit note for what an invoice
|
|
572
|
+
* billed, and by none for money no invoice billed (a duplicate payment given
|
|
573
|
+
* back), which is recorded as an overpayment refund. The refusal's `details`
|
|
574
|
+
* name the invoice and the overpayment still refundable. Needs an engine that knows
|
|
575
|
+
* the rule (vendure-server deployed first); an older one refunds as before.
|
|
576
|
+
*
|
|
577
|
+
* @effect money
|
|
382
578
|
*/
|
|
383
579
|
refund(input: RefundPaymentInput, options?: Call): Promise<IssuedRefund>;
|
|
580
|
+
/**
|
|
581
|
+
* Capture an authorized payment at its provider ("mark as paid"), and return the payment.
|
|
582
|
+
*
|
|
583
|
+
* At most once per payment, whoever asks and however often: the engine keys every capture of a
|
|
584
|
+
* payment under ONE key of its own (`payment:<id>:capture`), so this method takes no
|
|
585
|
+
* `idempotencyKey`. A repeat while the payment is `Settled` captures nothing and is refused
|
|
586
|
+
* `PAYMENT_STATE_TRANSITION_ERROR` ("already settled"); a repeat while the first capture is
|
|
587
|
+
* still running is refused `IDEMPOTENCY_IN_PROGRESS`. A capture whose answer was lost after it
|
|
588
|
+
* reached the provider is refused `IDEMPOTENCY_OUTCOME_UNKNOWN` (`error.outcomeUnknown`) on
|
|
589
|
+
* that call and on every capture for the key's retention (24 hours): check the payment with the
|
|
590
|
+
* provider before doing anything else with it, and never retry this blind. Once the key is
|
|
591
|
+
* swept a capture asks the provider again, so an automatic retry after a day can capture a
|
|
592
|
+
* second time; the provider's own report (`reportAppPayment`) still settles it meanwhile.
|
|
593
|
+
*
|
|
594
|
+
* Refusals, as coded errors (the Admin API answers some as a result union; this method throws
|
|
595
|
+
* every one):
|
|
596
|
+
* - `PAYMENT_SETTLE_DECLINED` (`BusinessRuleError`, 422): the provider declined the capture.
|
|
597
|
+
* The message is the provider's reason. Nothing was captured, and a later capture may be
|
|
598
|
+
* tried.
|
|
599
|
+
* - `PAYMENT_STATE_TRANSITION_ERROR` (422): the payment is not `Authorized` (settled, cancelled
|
|
600
|
+
* or declined already). The message says which.
|
|
601
|
+
* - `ORDER_STATE_TRANSITION_ERROR` (422): the capture went through the provider's gate but the
|
|
602
|
+
* order could not move on as it stands.
|
|
603
|
+
* - `ORDER_CANCELLED_PAYMENT_CONFLICT` (409): the payment's order is cancelled, and a cancelled
|
|
604
|
+
* order is never paid. Cancel the payment instead to release it.
|
|
605
|
+
* - `PAYMENT_CAPTURE_EXCEEDS_BILLED` (422): the order's credit notes lowered what it bills, and
|
|
606
|
+
* the payment would take more: its provider can only capture it in full, the order's other
|
|
607
|
+
* payments already cover the bill, or its only invoice was cancelled with nothing in its
|
|
608
|
+
* place. Nothing was captured; the error's `extensions.leftToPay` is what is left to pay
|
|
609
|
+
* without this payment (the bill after its credit notes, less the order's other payments),
|
|
610
|
+
* and the message names the credit notes and what to do instead.
|
|
611
|
+
* - `PAYMENT_SETTLE_CONFLICT` (409): the payment moved while it was being captured. Read it
|
|
612
|
+
* again.
|
|
613
|
+
* - `ENTITY_NOT_FOUND` (404): no payment of an order of this store has that id.
|
|
614
|
+
*
|
|
615
|
+
* On such an order, a promise whose money moves by hand (bank transfer, invoice, net terms) is
|
|
616
|
+
* recorded at what the order still bills: the returned payment's `amount` is that figure, and
|
|
617
|
+
* the rest of the promise is dropped. {@link settlePreview} says which before you call this.
|
|
618
|
+
*
|
|
619
|
+
* Needs `UpdateOrder`.
|
|
620
|
+
*
|
|
621
|
+
* @effect money
|
|
622
|
+
*/
|
|
623
|
+
settle(paymentId: string, options?: Call): Promise<OrderPaymentRecord>;
|
|
624
|
+
/**
|
|
625
|
+
* What {@link settle} would do to this authorized payment now, without doing it: the amount it
|
|
626
|
+
* records, or the coded refusal it would answer (`refusal`). Nothing is written, nothing is
|
|
627
|
+
* locked and no provider is asked, so {@link settle} still judges again (and the provider may
|
|
628
|
+
* still decline it).
|
|
629
|
+
*
|
|
630
|
+
* Refuses `ENTITY_NOT_FOUND` (404) for a payment of no order of this store. An engine older
|
|
631
|
+
* than this method answers a GraphQL validation error: treat that as "no preview" and let
|
|
632
|
+
* {@link settle} judge. Needs `ReadOrder`.
|
|
633
|
+
*
|
|
634
|
+
* @effect read
|
|
635
|
+
*/
|
|
636
|
+
settlePreview(paymentId: string, options?: Call): Promise<PaymentSettlePreview>;
|
|
637
|
+
/**
|
|
638
|
+
* Void an authorized payment (release the hold), and return the payment.
|
|
639
|
+
*
|
|
640
|
+
* A cancel takes turns with the payment's capture: one that reaches a payment that is no
|
|
641
|
+
* longer authorized, or one whose capture may have reached its provider with no answer, is
|
|
642
|
+
* refused `PAYMENT_CANCEL_CONFLICT` (409) and nothing is asked of the provider. A `Settled`
|
|
643
|
+
* payment is never voided: its money was taken, so it is refunded ({@link refund}).
|
|
644
|
+
*
|
|
645
|
+
* Other refusals, as coded errors:
|
|
646
|
+
* - `PAYMENT_CANCEL_DECLINED` (`BusinessRuleError`, 422): the provider refused the void. The
|
|
647
|
+
* message is the provider's reason; the hold may still stand at the provider.
|
|
648
|
+
* - `PAYMENT_STATE_TRANSITION_ERROR` (422): the payment cannot move to `Cancelled` from where
|
|
649
|
+
* it is.
|
|
650
|
+
* - `ENTITY_NOT_FOUND` (404): no payment of an order of this store has that id.
|
|
651
|
+
*
|
|
652
|
+
* Needs `UpdateOrder`.
|
|
653
|
+
*
|
|
654
|
+
* @effect money
|
|
655
|
+
*/
|
|
656
|
+
cancel(paymentId: string, options?: Call): Promise<OrderPaymentRecord>;
|
|
657
|
+
/**
|
|
658
|
+
* Whether {@link refund} (and core's `refundOrder`, and the till's refund) is
|
|
659
|
+
* refused for this order with `REFUND_REQUIRES_CREDIT_NOTE`, and which invoice
|
|
660
|
+
* the refund goes through instead; `null` when a plain refund may go ahead.
|
|
661
|
+
*
|
|
662
|
+
* The order has a live invoice in this store, so a refund needs a credit note
|
|
663
|
+
* saying what it is for, beyond `refundableOverpayment` (what the order was
|
|
664
|
+
* paid over what it bills, which {@link refund} still gives back). Plan the
|
|
665
|
+
* correction with
|
|
666
|
+
* `documents.planCorrection({ ledger, invoiceId, outcome, refundPaymentId })` and
|
|
667
|
+
* issue it with `documents.commitCorrection`: the credit note is issued, then
|
|
668
|
+
* the money refunded. `null` for an order with no live invoice, and for a
|
|
669
|
+
* customer with a credit account on a store that keeps the
|
|
670
|
+
* accounts-receivable ledger (their refunds are documented when they settle:
|
|
671
|
+
* by an AR credit note, except the part no invoice billed, which gets none).
|
|
672
|
+
* Needs `ReadOrder`.
|
|
673
|
+
*
|
|
674
|
+
* Its own query rather than a field of {@link refundPosition}, so a release of
|
|
675
|
+
* this SDK reading an older engine fails only this call. The answer is read
|
|
676
|
+
* without a lock: the refund doors judge again when they run.
|
|
677
|
+
*
|
|
678
|
+
* @effect read
|
|
679
|
+
*/
|
|
680
|
+
refundCreditNoteRequirement(orderId: string, options?: Call): Promise<RefundCreditNoteRequirement | null>;
|
|
384
681
|
/** Read what an order may still hand back. */
|
|
385
682
|
refundPosition(orderId: string, options?: Call): Promise<OrderRefundPosition>;
|
|
683
|
+
/**
|
|
684
|
+
* What the gift cards sold on an order hold of its money, on the order and per payment, and
|
|
685
|
+
* how many of them are still live: why {@link refundPosition}'s `refundable` is lower than the
|
|
686
|
+
* money taken. Needs `ReadOrder`.
|
|
687
|
+
*
|
|
688
|
+
* Its own query rather than fields of {@link refundPosition}, so a release of this SDK reading
|
|
689
|
+
* an older engine fails only this call. Needs an engine that serves
|
|
690
|
+
* `OrderRefundPosition.giftCardHold`.
|
|
691
|
+
*
|
|
692
|
+
* @effect read
|
|
693
|
+
*/
|
|
694
|
+
refundGiftCardHold(orderId: string, options?: Call): Promise<RefundGiftCardHold>;
|
|
386
695
|
/**
|
|
387
696
|
* The order's refunds whose outcome is unknown, oldest first — the ones
|
|
388
697
|
* {@link reconcileRefund} resolves. Each one's amount is already reserved in
|
|
@@ -418,6 +727,8 @@ export interface PaymentsModule {
|
|
|
418
727
|
*
|
|
419
728
|
* `options.idempotencyKey` is honoured: a repeat under the same key returns
|
|
420
729
|
* the first call's refund.
|
|
730
|
+
*
|
|
731
|
+
* @effect money
|
|
421
732
|
*/
|
|
422
733
|
reconcileRefund(input: ReconcileRefundInput, options?: Call): Promise<IssuedRefund>;
|
|
423
734
|
/**
|
|
@@ -463,14 +774,24 @@ export interface PaymentsModule {
|
|
|
463
774
|
appPayments(orderId: string, options?: Call): Promise<AppPayment[]>;
|
|
464
775
|
}
|
|
465
776
|
export declare const RECORD_ORDER_PAYMENT_MUTATION = "\n mutation RecordOrderPayment($orderId: ID!, $input: RecordPaymentInput!, $idempotencyKey: String) {\n recordOrderPayment(orderId: $orderId, input: $input, idempotencyKey: $idempotencyKey) {\n \n id\n code\n state\n currencyCode\n total\n totalWithTax\n\n }\n }\n";
|
|
466
|
-
export declare const ORDER_PAYMENT_POSITION_QUERY = "\n query OrderPaymentPosition($orderId: ID!) {\n orderPaymentPosition(orderId: $orderId) {\n \n total\n covered\n settled\n authorized\n refunded\n outstanding\n overpaid\n availableToCharge\n\n }\n }\n";
|
|
777
|
+
export declare const ORDER_PAYMENT_POSITION_QUERY = "\n query OrderPaymentPosition($orderId: ID!) {\n orderPaymentPosition(orderId: $orderId) {\n \n total\n covered\n settled\n authorized\n refunded\n creditNoted\n owed\n payable\n outstanding\n overpaid\n availableToCharge\n\n }\n }\n";
|
|
467
778
|
export declare const ORDER_REFUND_POSITION_QUERY = "\n query OrderRefundPosition($orderId: ID!) {\n orderRefundPosition(orderId: $orderId) {\n \n currencyCode\n refunded\n refundable\n perPayment {\n paymentId\n state\n method\n amount\n refunded\n refundable\n tookMoney\n }\n\n }\n }\n";
|
|
468
779
|
export declare const REFUND_ORDER_PAYMENT_MUTATION = "\n mutation RefundOrderPayment($input: RefundPaymentInput!, $idempotencyKey: String) {\n refundOrderPayment(input: $input, idempotencyKey: $idempotencyKey) {\n id\n total\n state\n method\n transactionId\n reason\n }\n }\n";
|
|
469
780
|
export declare const UNRECONCILED_REFUNDS_QUERY = "\n query UnreconciledRefunds($orderId: ID!) {\n orderRefundPosition(orderId: $orderId) {\n unreconciled {\n refundId\n paymentId\n amount\n createdAt\n }\n }\n }\n";
|
|
781
|
+
export declare const REFUND_GIFT_CARD_HOLD_QUERY = "\n query RefundGiftCardHold($orderId: ID!) {\n orderRefundPosition(orderId: $orderId) {\n currencyCode\n giftCardHold\n liveGiftCards\n perPayment {\n paymentId\n giftCardHold\n }\n }\n }\n";
|
|
782
|
+
export declare const REFUND_CREDIT_NOTE_REQUIREMENT_QUERY = "\n query RefundCreditNoteRequirement($orderId: ID!) {\n orderRefundPosition(orderId: $orderId) {\n creditNoteRequired {\n invoiceId\n invoiceNumber\n ledger\n refundableOverpayment\n }\n }\n }\n";
|
|
470
783
|
export declare const RECONCILE_REFUND_OUTCOME_MUTATION = "\n mutation ReconcileRefundOutcome($input: ReconcileRefundOutcomeInput!, $idempotencyKey: String) {\n reconcileRefundOutcome(input: $input, idempotencyKey: $idempotencyKey) {\n id\n total\n state\n method\n transactionId\n reason\n }\n }\n";
|
|
784
|
+
export declare const SETTLE_PAYMENT_MUTATION = "\n mutation SettlePayment($id: ID!) {\n settlePayment(id: $id) {\n __typename\n ... on Payment {\n \n id\n state\n method\n amount\n transactionId\n\n }\n ... on SettlePaymentError {\n paymentErrorMessage\n }\n ... on PaymentStateTransitionError {\n transitionError\n }\n ... on OrderStateTransitionError {\n transitionError\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n";
|
|
785
|
+
export declare const CANCEL_PAYMENT_MUTATION = "\n mutation CancelPayment($id: ID!) {\n cancelPayment(id: $id) {\n __typename\n ... on Payment {\n \n id\n state\n method\n amount\n transactionId\n\n }\n ... on CancelPaymentError {\n paymentErrorMessage\n }\n ... on PaymentStateTransitionError {\n transitionError\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n";
|
|
786
|
+
export declare const SETTLE_PAYMENT_PREVIEW_QUERY = "\n query SettlePaymentPreview($paymentId: ID!) {\n settlePaymentPreview(paymentId: $paymentId) {\n paymentId\n authorized\n records\n creditNoted\n creditNotes\n refusal {\n code\n message\n }\n }\n }\n";
|
|
471
787
|
export declare const REPORT_APP_PAYMENT_MUTATION = "\n mutation ReportAppPayment(\n $paymentId: ID!\n $input: ReportAppPaymentInput!\n $idempotencyKey: String!\n ) {\n reportAppPayment(paymentId: $paymentId, input: $input, idempotencyKey: $idempotencyKey) {\n id\n state\n amount\n method\n transactionId\n }\n }\n";
|
|
472
788
|
export declare const APP_PAYMENTS_QUERY = "\n query AppPayments($orderId: ID!) {\n appPayments(orderId: $orderId) {\n id\n orderId\n orderCode\n state\n amount\n currencyCode\n providerReference\n methodCode\n outcomeUnknown\n createdAt\n }\n }\n";
|
|
473
789
|
export declare function createPaymentsModule(transport: Transport): PaymentsModule;
|
|
474
|
-
export type { AccountCreditModule, ApplyUnappliedCashInput, CreditOverpaymentInput, OrderMoneyOnAccount, RefundUnappliedCashInput, UnappliedCash, UnappliedCashRefund, } from './account-credit.js';
|
|
475
|
-
export type {
|
|
476
|
-
export type {
|
|
790
|
+
export type { AccountCreditModule, ApplyUnappliedCashInput, CreditOverpaymentInput, CreditOverpaymentToStoreCreditCall, OrderMoneyOnAccount, RefundUnappliedCashInput, StoreCreditMove, UnappliedCash, UnappliedCashRefund, } from './account-credit.js';
|
|
791
|
+
export type { ConnectedAccountModule, StripeConnectedAccount, } from './connected-account.js';
|
|
792
|
+
export type { CreatePaymentMethodInput, PaymentMethod, PaymentMethodCredential, PaymentMethodCredentialPath, PaymentMethodsModule, PaymentMethodTranslation, PaymentMethodTranslationInput, UpdatePaymentMethodInput, } from './methods.js';
|
|
793
|
+
export type { MollieDiagnosis, MollieDiagnosisMethod, MollieDiagnosisVerdict, MollieDirectDebitDiagnosis, MollieMethod, MollieMethodList, MollieMethodsModule, MollieProbeError, MollieProbeErrorKind, SetMollieMethodsInput, } from './mollie-methods.js';
|
|
794
|
+
export type { PaymentProviderKey, ProviderKeyProvider, ProviderKeysModule, ProviderKeyTest, SetProviderKeyInput, } from './provider-keys.js';
|
|
795
|
+
export type { PaymentProviderAccount, ProviderConnection, ProviderCredentialPath, ProviderOnboardingStart, ProviderReadiness, ProvidersModule, ProviderTerminal, ProviderTerminalsModule, ProvisionTerminalInput, ReadinessOptions, } from './providers.js';
|
|
796
|
+
export type { CreatePaymentRequestInput, PaymentRequest, PaymentRequestCloseReason, PaymentRequestStatus, PaymentRequestsModule, } from './requests.js';
|
|
797
|
+
export { PAYMENT_REQUEST_CLOSE_REASONS, PAYMENT_REQUEST_DEFAULT_EXPIRY_DAYS, PAYMENT_REQUEST_MAX_EXPIRY_DAYS, PAYMENT_REQUEST_STATUSES, } from './requests.js';
|