@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
|
@@ -1,9 +1,41 @@
|
|
|
1
1
|
import { type Page, type Transport } from '@sixtyninecommerce/core';
|
|
2
2
|
import { type MyparcelUnretractedShipment } from '../fulfillments/index.js';
|
|
3
|
+
import type { StockLocationAddress } from '../locations/index.js';
|
|
3
4
|
import type { Call, ListOptions } from '../types.js';
|
|
4
5
|
export type StockTransferState = 'draft' | 'in_transit' | 'received' | 'cancelled';
|
|
5
6
|
/** A `transfer` moves stock between two locations; a `consumption` uses it up at one. */
|
|
6
7
|
export type StockTransferKind = 'transfer' | 'consumption';
|
|
8
|
+
/**
|
|
9
|
+
* Why the engine would refuse a cancel or a return of a transfer now.
|
|
10
|
+
*
|
|
11
|
+
* - `STATE`: the state has no way to it (a cancel of a received transfer or a posted consumption).
|
|
12
|
+
* - `CANCELLED`: the transfer is cancelled.
|
|
13
|
+
* - `PARTIALLY_RECEIVED`: a cancel once any unit was received; `close` it instead.
|
|
14
|
+
* - `DRAFT_NOT_SHIPPED`: a return of a draft: nothing has moved yet.
|
|
15
|
+
* - `NOT_YET_RECEIVED`: a return of a transfer in transit that has received nothing yet.
|
|
16
|
+
* - `NOTHING_RECEIVED`: a return of a received transfer that received nothing.
|
|
17
|
+
* - `ALL_ON_RETURNS`: every received unit is already on a return; cancelling one frees its units.
|
|
18
|
+
* - `CONSUMPTION`, `IS_RETURN`, `NO_DESTINATION`: a return of a consumption, of a return, or
|
|
19
|
+
* of a transfer with no destination.
|
|
20
|
+
*
|
|
21
|
+
* Codes may be added; treat an unknown one as a refusal.
|
|
22
|
+
*/
|
|
23
|
+
export type StockTransferActionRefusalCode = 'STATE' | 'CANCELLED' | 'PARTIALLY_RECEIVED' | 'DRAFT_NOT_SHIPPED' | 'NOT_YET_RECEIVED' | 'NOTHING_RECEIVED' | 'ALL_ON_RETURNS' | 'CONSUMPTION' | 'IS_RETURN' | 'NO_DESTINATION';
|
|
24
|
+
/**
|
|
25
|
+
* Whether an action on a transfer is available now, as the engine judges it, and why not.
|
|
26
|
+
* Advice only: the write judges again (with the caller's permission and locations), so a
|
|
27
|
+
* transfer that changed meanwhile is still refused.
|
|
28
|
+
*/
|
|
29
|
+
export interface StockTransferActionAvailability {
|
|
30
|
+
available: boolean;
|
|
31
|
+
/** Null exactly when `available`. */
|
|
32
|
+
reasonCode: StockTransferActionRefusalCode | null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* What `search` matches in `list`: the transfer code only (`code`, the engine's default), or the
|
|
36
|
+
* code or the label (`all`).
|
|
37
|
+
*/
|
|
38
|
+
export type StockTransferSearchMode = 'code' | 'all';
|
|
7
39
|
export interface StockTransferAddress {
|
|
8
40
|
contactName: string | null;
|
|
9
41
|
company: string | null;
|
|
@@ -31,6 +63,7 @@ export interface StockTransferLine {
|
|
|
31
63
|
id: string;
|
|
32
64
|
variantId: string;
|
|
33
65
|
sku: string;
|
|
66
|
+
variantName: string;
|
|
34
67
|
quantity: number;
|
|
35
68
|
receivedQuantity: number;
|
|
36
69
|
lostQuantity: number;
|
|
@@ -59,6 +92,10 @@ export interface StockTransfer {
|
|
|
59
92
|
note: string | null;
|
|
60
93
|
carrier: string | null;
|
|
61
94
|
trackingCode: string | null;
|
|
95
|
+
/**
|
|
96
|
+
* A calendar DAY, though it is stored as an instant: the dashboard records the day picked as
|
|
97
|
+
* that day's 00:00 UTC, so read it as the UTC day (`slice(0, 10)`), never in a local zone.
|
|
98
|
+
*/
|
|
62
99
|
estimatedArrivalAt: string | null;
|
|
63
100
|
shippedAt: string | null;
|
|
64
101
|
receivedAt: string | null;
|
|
@@ -67,11 +104,89 @@ export interface StockTransfer {
|
|
|
67
104
|
deliveryAddress: StockTransferAddress | null;
|
|
68
105
|
createdAt: string;
|
|
69
106
|
updatedAt: string;
|
|
107
|
+
/**
|
|
108
|
+
* Who created it. Null when the engine recorded nobody, or that administrator has since been
|
|
109
|
+
* deleted. An app or API key is not null here: it acts as its own administrator (see
|
|
110
|
+
* `StockTransferStaffRef`).
|
|
111
|
+
*/
|
|
112
|
+
initiatedBy: StockTransferStaffRef | null;
|
|
70
113
|
items: StockTransferLine[];
|
|
114
|
+
/** How many lines it has (`items.length`). */
|
|
115
|
+
totalLines: number;
|
|
71
116
|
totalQuantity: number;
|
|
72
117
|
totalReceivedQuantity: number;
|
|
73
118
|
totalLostQuantity: number;
|
|
74
119
|
}
|
|
120
|
+
/** A line as `get` and every write answer it: with its cost snapshot. */
|
|
121
|
+
export interface StockTransferDetailLine extends StockTransferLine {
|
|
122
|
+
/**
|
|
123
|
+
* The variant's standard cost per unit, in minor units of the store's currency, as posting a
|
|
124
|
+
* consumption snapshotted it. Null on a transfer's lines, and on a consumption line whose
|
|
125
|
+
* variant had no cost on file.
|
|
126
|
+
*/
|
|
127
|
+
unitCost: number | null;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* One transfer as `get` and every write answer it: the list's fields, plus who shipped and
|
|
131
|
+
* received it, its consumption value, its transfer note and how it was shipped.
|
|
132
|
+
*/
|
|
133
|
+
export interface StockTransferDetail extends Omit<StockTransfer, 'destinationLocation' | 'items'> {
|
|
134
|
+
/**
|
|
135
|
+
* Null for a consumption. `address` is the location's own postal address as stored (every
|
|
136
|
+
* field optional, as `locations` reads it), null when it has none: a shipment goes there
|
|
137
|
+
* unless `deliveryAddress` names another place.
|
|
138
|
+
*/
|
|
139
|
+
destinationLocation: {
|
|
140
|
+
id: string;
|
|
141
|
+
name: string;
|
|
142
|
+
address: StockLocationAddress | null;
|
|
143
|
+
} | null;
|
|
144
|
+
items: StockTransferDetailLine[];
|
|
145
|
+
/**
|
|
146
|
+
* Who shipped it, or posted the consumption. Null as `initiatedBy` is, and while it is not
|
|
147
|
+
* shipped (removing the shipment clears it).
|
|
148
|
+
*/
|
|
149
|
+
shippedBy: StockTransferStaffRef | null;
|
|
150
|
+
/**
|
|
151
|
+
* Who completed it: the receipt that took it to `received`, a close, or the consumption's
|
|
152
|
+
* post. Null as `initiatedBy` is, and until then: a partial receipt records nobody.
|
|
153
|
+
*/
|
|
154
|
+
receivedBy: StockTransferStaffRef | null;
|
|
155
|
+
/**
|
|
156
|
+
* A consumption's total standard-cost value, in minor units of the store's currency: the sum
|
|
157
|
+
* of its lines' `unitCost × quantity`, over the lines that have one. Null for a transfer. A
|
|
158
|
+
* draft consumption has no cost snapshot yet, so it reads 0 with `consumptionHasUnpricedLines`.
|
|
159
|
+
*/
|
|
160
|
+
consumptionTotalValue: number | null;
|
|
161
|
+
/**
|
|
162
|
+
* True when a line has no cost (a draft, or a variant with no cost on file when it was
|
|
163
|
+
* posted), so `consumptionTotalValue` understates it. Null for a transfer.
|
|
164
|
+
*/
|
|
165
|
+
consumptionHasUnpricedLines: boolean | null;
|
|
166
|
+
/** Where the transfer note PDF is stored; null until one was generated. */
|
|
167
|
+
pdfStorageKey: string | null;
|
|
168
|
+
/**
|
|
169
|
+
* The engine's fulfilment handler it shipped with (`manual-fulfillment`, `myparcel`,
|
|
170
|
+
* `hendriks-3pl`). Null while it is a draft. A cancelled transfer keeps it.
|
|
171
|
+
*/
|
|
172
|
+
fulfillmentHandlerCode: string | null;
|
|
173
|
+
/**
|
|
174
|
+
* The handler arguments the ship was given, as the handler stores them: a key/value object, or
|
|
175
|
+
* the `{ name, value }` list the fulfilment forms send. The handler owns their meaning.
|
|
176
|
+
*/
|
|
177
|
+
handlerArgs: Record<string, unknown> | StockTransferHandlerArg[] | null;
|
|
178
|
+
/** The first MyParcel parcel's shipment id; every parcel is on `parcels(id)`. */
|
|
179
|
+
myparcelShipmentId: number | null;
|
|
180
|
+
/** The first MyParcel parcel's barcode once it has one; every barcode is on `parcels(id)`. */
|
|
181
|
+
myparcelBarcode: string | null;
|
|
182
|
+
/** Where the Hendriks (3PL) export was uploaded; null until the export completed. */
|
|
183
|
+
hendriksRemotePath: string | null;
|
|
184
|
+
}
|
|
185
|
+
/** One handler argument in the list form the fulfilment forms send. */
|
|
186
|
+
export interface StockTransferHandlerArg {
|
|
187
|
+
name: string;
|
|
188
|
+
value: string;
|
|
189
|
+
}
|
|
75
190
|
export interface StockTransferLineInput {
|
|
76
191
|
variantId: string;
|
|
77
192
|
quantity: number;
|
|
@@ -86,27 +201,32 @@ export interface CreateStockTransferInput {
|
|
|
86
201
|
note?: string;
|
|
87
202
|
lines: StockTransferLineInput[];
|
|
88
203
|
}
|
|
89
|
-
/** A draft's fields; an omitted field is left as it is. */
|
|
204
|
+
/** A draft's fields; an omitted field is left as it is, and `null` clears one. */
|
|
90
205
|
export interface UpdateStockTransferInput {
|
|
91
206
|
sourceLocationId?: string;
|
|
92
207
|
destinationLocationId?: string;
|
|
93
|
-
label?: string;
|
|
94
|
-
note?: string;
|
|
208
|
+
label?: string | null;
|
|
209
|
+
note?: string | null;
|
|
95
210
|
/** Replaces every line. */
|
|
96
211
|
lines?: StockTransferLineInput[];
|
|
97
|
-
carrier?: string;
|
|
98
|
-
trackingCode?: string;
|
|
99
|
-
/** ISO 8601 with an explicit offset. */
|
|
100
|
-
estimatedArrivalAt?: string;
|
|
212
|
+
carrier?: string | null;
|
|
213
|
+
trackingCode?: string | null;
|
|
214
|
+
/** ISO 8601 with an explicit offset. A day is sent as its 00:00 UTC (see `estimatedArrivalAt`). */
|
|
215
|
+
estimatedArrivalAt?: string | null;
|
|
101
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* `carrier`, `trackingCode` and `estimatedArrivalAt`: an omitted field keeps what the draft
|
|
219
|
+
* holds, and `null` clears it.
|
|
220
|
+
*/
|
|
102
221
|
export interface ShipStockTransferInput {
|
|
103
|
-
carrier?: string;
|
|
104
|
-
trackingCode?: string;
|
|
105
|
-
/** ISO 8601 with an explicit offset. */
|
|
106
|
-
estimatedArrivalAt?: string;
|
|
107
|
-
/** The engine's fulfilment handler code;
|
|
108
|
-
fulfillmentHandlerCode?: string;
|
|
109
|
-
|
|
222
|
+
carrier?: string | null;
|
|
223
|
+
trackingCode?: string | null;
|
|
224
|
+
/** ISO 8601 with an explicit offset. A day is sent as its 00:00 UTC (see `estimatedArrivalAt`). */
|
|
225
|
+
estimatedArrivalAt?: string | null;
|
|
226
|
+
/** The engine's fulfilment handler code; omitted or null ships it by hand (manual). */
|
|
227
|
+
fulfillmentHandlerCode?: string | null;
|
|
228
|
+
/** The handler's arguments: a key/value object or the `{ name, value }` list; none when omitted. */
|
|
229
|
+
handlerArgs?: Record<string, unknown> | StockTransferHandlerArg[] | null;
|
|
110
230
|
/** Ship somewhere other than the destination's own address; null re-addresses it there. */
|
|
111
231
|
deliveryAddress?: StockTransferAddressInput | null;
|
|
112
232
|
}
|
|
@@ -170,6 +290,8 @@ export interface StockTransferFilter extends ListOptions {
|
|
|
170
290
|
/** ISO 8601 with an explicit offset. */
|
|
171
291
|
dateTo?: string;
|
|
172
292
|
search?: string;
|
|
293
|
+
/** What `search` matches; the engine's default (`code`) when omitted. */
|
|
294
|
+
searchMode?: StockTransferSearchMode;
|
|
173
295
|
/** Only the returns of this transfer. Needs an engine with returns. */
|
|
174
296
|
returnOfTransferId?: string;
|
|
175
297
|
/**
|
|
@@ -234,8 +356,18 @@ export interface StockTransferReturns {
|
|
|
234
356
|
* return, or a transfer with nothing received.
|
|
235
357
|
*/
|
|
236
358
|
returnableLines: StockTransferReturnableLine[];
|
|
359
|
+
/**
|
|
360
|
+
* Whether `createReturn` can make a return of it now, and why not (the engine's own rule).
|
|
361
|
+
* Null from an engine before the field: it says nothing either way, and `createReturn` still
|
|
362
|
+
* judges.
|
|
363
|
+
*/
|
|
364
|
+
returnAvailability: StockTransferActionAvailability | null;
|
|
237
365
|
}
|
|
238
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* The administrator who acted on a transfer. Usually a member of staff; an app installation or
|
|
368
|
+
* an API key acts as its own administrator, so it appears here too, with `firstName` "App" or
|
|
369
|
+
* "API Token" and its own name as `lastName`.
|
|
370
|
+
*/
|
|
239
371
|
export interface StockTransferStaffRef {
|
|
240
372
|
/** The administrator's id. */
|
|
241
373
|
id: string;
|
|
@@ -268,6 +400,11 @@ export interface StockTransferCancellation {
|
|
|
268
400
|
hendriksExport: {
|
|
269
401
|
bluJayOrderNumber: string | null;
|
|
270
402
|
} | null;
|
|
403
|
+
/**
|
|
404
|
+
* Whether `cancel` would accept it now, and why not (the engine's own rule). Null from an
|
|
405
|
+
* engine before the field: it says nothing either way, and `cancel` still judges.
|
|
406
|
+
*/
|
|
407
|
+
cancelAvailability: StockTransferActionAvailability | null;
|
|
271
408
|
}
|
|
272
409
|
/** One MyParcel parcel of a stock transfer: its own shipment, label and barcode. */
|
|
273
410
|
export interface StockTransferParcel {
|
|
@@ -330,6 +467,62 @@ export interface StockTransferLabel {
|
|
|
330
467
|
filename: string;
|
|
331
468
|
bytes: Uint8Array;
|
|
332
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* The format of a store's transfer codes: `{prefix}{year}-{number}{suffix}`, e.g. `ST-2026-0001`
|
|
472
|
+
* (the defaults, until the store first sets its own).
|
|
473
|
+
*/
|
|
474
|
+
export interface StockTransferNumberingConfig {
|
|
475
|
+
prefix: string;
|
|
476
|
+
suffix: string;
|
|
477
|
+
/** How many digits the number is padded to, 3 to 8. */
|
|
478
|
+
digits: number;
|
|
479
|
+
/**
|
|
480
|
+
* `none`, `short` (`26`) or `full` (`2026`). A row written before the engine checked it may
|
|
481
|
+
* hold another value, which prints like `none`.
|
|
482
|
+
*/
|
|
483
|
+
yearFormat: string;
|
|
484
|
+
/**
|
|
485
|
+
* Stored for the shared numbering contract only: the counter restarts each UTC year whenever
|
|
486
|
+
* the code shows the year, and never when it does not, whatever this says.
|
|
487
|
+
*/
|
|
488
|
+
yearReset: boolean;
|
|
489
|
+
}
|
|
490
|
+
/** A patch: a field left out keeps its value. */
|
|
491
|
+
export interface UpdateStockTransferNumberingConfigInput {
|
|
492
|
+
prefix?: string;
|
|
493
|
+
suffix?: string;
|
|
494
|
+
/** Clamped to 3..8. */
|
|
495
|
+
digits?: number;
|
|
496
|
+
/**
|
|
497
|
+
* `none`, `short` or `full`. Any other CHANGE is refused `NUMBERING_YEAR_FORMAT_INVALID`
|
|
498
|
+
* (→ `ValidationError`) and saves nothing; sending the stored value back always passes.
|
|
499
|
+
*/
|
|
500
|
+
yearFormat?: string;
|
|
501
|
+
yearReset?: boolean;
|
|
502
|
+
}
|
|
503
|
+
/** `admin.stock.transfers.numbering`: the format the store's transfer codes take. */
|
|
504
|
+
export interface StockTransferNumberingModule {
|
|
505
|
+
/**
|
|
506
|
+
* The format the store's NEXT transfer code takes. A store in an organization that shares its
|
|
507
|
+
* numbering formats (`settings.numbering_formats`) reads the organization's format; the counter
|
|
508
|
+
* is always the store's own. Needs `ReadStockLocation`.
|
|
509
|
+
*
|
|
510
|
+
* @effect read
|
|
511
|
+
* @permission ReadStockLocation
|
|
512
|
+
*/
|
|
513
|
+
get(options?: Call): Promise<StockTransferNumberingConfig>;
|
|
514
|
+
/**
|
|
515
|
+
* Change the format of the store's OWN row; codes already issued keep theirs, and the counter
|
|
516
|
+
* never changes. Answers that row, which is not what `get` reads while the store inherits the
|
|
517
|
+
* organization's format: read `get` again for the format in use. A store that inherits it is
|
|
518
|
+
* refused `ORGANIZATION_SETTINGS_INHERITED` until it overrides the group, and one whose
|
|
519
|
+
* organization locks the group `MANAGED_BY_ORGANIZATION`. Needs `UpdateStockLocation`.
|
|
520
|
+
*
|
|
521
|
+
* @effect write
|
|
522
|
+
* @permission UpdateStockLocation
|
|
523
|
+
*/
|
|
524
|
+
set(input: UpdateStockTransferNumberingConfigInput, options?: Call): Promise<StockTransferNumberingConfig>;
|
|
525
|
+
}
|
|
333
526
|
/**
|
|
334
527
|
* Stock transfers (the engine's stock-transfer module, wrapped): a draft is
|
|
335
528
|
* created, shipped (debiting the source), received line by line (crediting the
|
|
@@ -341,7 +534,9 @@ export interface StockTransferLabel {
|
|
|
341
534
|
* `stock.movements()`. Reads need `ReadStockLocation`; every write needs `AdjustStock`
|
|
342
535
|
* (or, for credentials minted before it existed, `UpdateStockLocation` — a transition a
|
|
343
536
|
* later release ends).
|
|
344
|
-
* None of these writes takes an idempotency key yet
|
|
537
|
+
* None of these writes takes an idempotency key yet, and the client never repeats one: a write
|
|
538
|
+
* whose answer was lost is read back with `get` before it is sent again (each method says what
|
|
539
|
+
* a repeat does).
|
|
345
540
|
*
|
|
346
541
|
* Every location and variant a transfer names must be the store's own:
|
|
347
542
|
* another store's location (or an id that does not exist) is refused
|
|
@@ -377,51 +572,128 @@ export interface StockTransferLabel {
|
|
|
377
572
|
* never by `get`: a caller ahead of the engine sees only those calls refused.
|
|
378
573
|
*/
|
|
379
574
|
export interface StockTransfersModule {
|
|
575
|
+
/**
|
|
576
|
+
* The store's transfers and consumptions, newest first, a page at a time (`limit`, default
|
|
577
|
+
* 25; `after` from a previous page). `search` matches the code, or the code or the label with
|
|
578
|
+
* `searchMode: 'all'`. A list row carries no detail fields: `get` one for those.
|
|
579
|
+
*
|
|
580
|
+
* @effect read
|
|
581
|
+
* @permission ReadStockLocation
|
|
582
|
+
*/
|
|
380
583
|
list(filter?: StockTransferFilter): Promise<Page<StockTransfer>>;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
584
|
+
/**
|
|
585
|
+
* One transfer with its detail fields, or `null` when this store has no such transfer.
|
|
586
|
+
*
|
|
587
|
+
* @effect read
|
|
588
|
+
* @permission ReadStockLocation
|
|
589
|
+
*/
|
|
590
|
+
get(id: string, options?: Call): Promise<StockTransferDetail | null>;
|
|
591
|
+
/**
|
|
592
|
+
* A draft transfer or consumption. Moves no stock.
|
|
593
|
+
*
|
|
594
|
+
* @effect write
|
|
595
|
+
* @permission AdjustStock
|
|
596
|
+
*/
|
|
597
|
+
create(input: CreateStockTransferInput, options?: Call): Promise<StockTransferDetail>;
|
|
598
|
+
/**
|
|
599
|
+
* Only a draft can be edited. Moves no stock.
|
|
600
|
+
*
|
|
601
|
+
* @effect write
|
|
602
|
+
* @permission AdjustStock
|
|
603
|
+
*/
|
|
604
|
+
update(id: string, input: UpdateStockTransferInput, options?: Call): Promise<StockTransferDetail>;
|
|
385
605
|
/**
|
|
386
606
|
* Draft → in transit: the source is debited. A MyParcel ship books every
|
|
387
|
-
* parcel at MyParcel before it answers, so it is
|
|
388
|
-
* `REQUEST_TIMEOUT` does not mean it failed — `get` it
|
|
607
|
+
* parcel at MyParcel before it answers and buys their labels, so it is
|
|
608
|
+
* allowed up to 120s; a `REQUEST_TIMEOUT` does not mean it failed — `get` it
|
|
609
|
+
* before shipping again. Shipping a transfer already in transit answers it
|
|
610
|
+
* unchanged: nothing is debited or booked twice. A Hendriks (3PL) ship
|
|
611
|
+
* uploads its export, which a later cancel does not withdraw.
|
|
612
|
+
*
|
|
613
|
+
* Refused `FIELD_GROUP_LOCKED` (`BusinessRuleError`) while an app or API key
|
|
614
|
+
* owns the store's Stock. A member store's Stock owner never locks the hub's
|
|
615
|
+
* warehouse (ruling U8).
|
|
616
|
+
*
|
|
617
|
+
* @effect money
|
|
618
|
+
* @permission AdjustStock
|
|
619
|
+
*/
|
|
620
|
+
ship(id: string, input?: ShipStockTransferInput, options?: Call): Promise<StockTransferDetail>;
|
|
621
|
+
/**
|
|
622
|
+
* Post a consumption: debit its location, snapshot each line's cost and
|
|
623
|
+
* complete the draft. Only a draft is posted, so a repeat is refused
|
|
624
|
+
* (`USER_INPUT_ERROR`, `ValidationError`) and debits nothing.
|
|
625
|
+
*
|
|
626
|
+
* Refused `FIELD_GROUP_LOCKED` (`BusinessRuleError`) while an app or API key
|
|
627
|
+
* owns the store's Stock. A member store's Stock owner never locks the hub's
|
|
628
|
+
* warehouse (ruling U8).
|
|
629
|
+
*
|
|
630
|
+
* @effect write
|
|
631
|
+
* @permission AdjustStock
|
|
632
|
+
*/
|
|
633
|
+
postConsumption(id: string, options?: Call): Promise<StockTransferDetail>;
|
|
634
|
+
/**
|
|
635
|
+
* Credit the destination with what arrived, and write off what was lost, per line. The
|
|
636
|
+
* quantities are each line's running TOTALS, never increments: a repeat of the same call
|
|
637
|
+
* credits nothing again, and a total lower than the line's is refused.
|
|
638
|
+
*
|
|
639
|
+
* Refused `FIELD_GROUP_LOCKED` (`BusinessRuleError`) while an app or API key
|
|
640
|
+
* owns the store's Stock. A member store's Stock owner never locks the hub's
|
|
641
|
+
* warehouse (ruling U8).
|
|
642
|
+
*
|
|
643
|
+
* @effect write
|
|
644
|
+
* @permission AdjustStock
|
|
389
645
|
*/
|
|
390
|
-
|
|
391
|
-
/** Post a consumption: debit its location and complete the draft. */
|
|
392
|
-
postConsumption(id: string, options?: Call): Promise<StockTransfer>;
|
|
393
|
-
/** Credit the destination with what arrived, and write off what was lost, per line. */
|
|
394
|
-
receive(id: string, lines: ReceiveStockTransferLineInput[], options?: Call): Promise<StockTransfer>;
|
|
646
|
+
receive(id: string, lines: ReceiveStockTransferLineInput[], options?: Call): Promise<StockTransferDetail>;
|
|
395
647
|
/**
|
|
396
648
|
* Close an in-transit transfer as received. Each line still short is settled
|
|
397
649
|
* as `shortfall` names it — `LOST`, or `RETURN_TO_SOURCE` (credited back to
|
|
398
650
|
* the source) — and a line it does not name is written off as lost only with
|
|
399
651
|
* `acceptShortfallAsLost`; otherwise the close is refused. Refused too: a
|
|
400
652
|
* line named twice, a line of another transfer, a line with nothing
|
|
401
|
-
* outstanding. Each refusal is a `ValidationError` and changes nothing.
|
|
653
|
+
* outstanding. Each refusal is a `ValidationError` and changes nothing. A
|
|
654
|
+
* close that sends a line back to the source is refused `FIELD_GROUP_LOCKED`
|
|
655
|
+
* (`BusinessRuleError`) while an app or API key owns the store's Stock.
|
|
656
|
+
*
|
|
657
|
+
* @effect write
|
|
658
|
+
* @permission AdjustStock
|
|
402
659
|
*/
|
|
403
|
-
close(id: string, options?: CloseStockTransferOptions): Promise<
|
|
660
|
+
close(id: string, options?: CloseStockTransferOptions): Promise<StockTransferDetail>;
|
|
404
661
|
/**
|
|
405
662
|
* Cancel a draft, or an in-transit transfer (unreceived stock returns to the
|
|
406
663
|
* source). An in-transit MyParcel shipment's parcels are voided at MyParcel
|
|
407
|
-
* inside the call, so it is allowed up to 120s.
|
|
664
|
+
* inside the call, so it is allowed up to 120s. A cancelled transfer is
|
|
665
|
+
* final: cancelling it again is refused (`ValidationError`) and restores
|
|
666
|
+
* nothing twice. Whether it would be accepted now, and why not, is
|
|
667
|
+
* `cancellation(id).cancelAvailability`. An in-transit cancel is refused `FIELD_GROUP_LOCKED`
|
|
668
|
+
* (`BusinessRuleError`) while an app or API key owns the store's Stock.
|
|
669
|
+
*
|
|
670
|
+
* @effect destructive
|
|
671
|
+
* @permission AdjustStock
|
|
408
672
|
*/
|
|
409
673
|
cancel(id: string, options?: Call & {
|
|
410
674
|
reason?: string;
|
|
411
|
-
}): Promise<
|
|
675
|
+
}): Promise<StockTransferDetail>;
|
|
412
676
|
/**
|
|
413
677
|
* Create a draft RETURN of transfer `id` (the original): its source is the
|
|
414
678
|
* original's destination, its lines capped per variant at what the original
|
|
415
679
|
* received minus its other returns that are not cancelled. Answers the
|
|
416
680
|
* return; ship and receive it like any transfer. A restricted credential
|
|
417
681
|
* must hold the return's source (the original's destination).
|
|
682
|
+
*
|
|
683
|
+
* @effect write
|
|
684
|
+
* @permission AdjustStock
|
|
418
685
|
*/
|
|
419
|
-
createReturn(id: string, input: CreateStockTransferReturnInput, options?: Call): Promise<
|
|
686
|
+
createReturn(id: string, input: CreateStockTransferReturnInput, options?: Call): Promise<StockTransferDetail>;
|
|
420
687
|
/**
|
|
421
688
|
* How transfer `id` is linked to returns — the transfer it returns from, its
|
|
422
|
-
* own returns,
|
|
423
|
-
*
|
|
424
|
-
* `
|
|
689
|
+
* own returns, what a new return may still take per variant, and whether
|
|
690
|
+
* `createReturn` can make one now (`returnAvailability`, the engine's own
|
|
691
|
+
* rule: `createReturn` judges again, per line) — or null when this store has
|
|
692
|
+
* no such transfer. Its own request, never part of `get`. Needs
|
|
693
|
+
* `ReadStockLocation`.
|
|
694
|
+
*
|
|
695
|
+
* @effect read
|
|
696
|
+
* @permission ReadStockLocation
|
|
425
697
|
*/
|
|
426
698
|
returns(id: string, options?: Call): Promise<StockTransferReturns | null>;
|
|
427
699
|
/**
|
|
@@ -434,10 +706,14 @@ export interface StockTransfersModule {
|
|
|
434
706
|
/**
|
|
435
707
|
* Who cancelled transfer `id`, why, and the Hendriks export a cancel leaves
|
|
436
708
|
* to be retracted by hand — or null when this store has no such transfer.
|
|
437
|
-
* Read it before `cancel` to warn about the export
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
709
|
+
* Read it before `cancel` to warn about the export and to know whether the
|
|
710
|
+
* cancel is offered (`cancelAvailability`, the engine's own rule: `cancel`
|
|
711
|
+
* judges again, with the caller's permission and locations), and after to
|
|
712
|
+
* show who did it. Its own request, never part of `get`: a caller deployed
|
|
713
|
+
* ahead of the engine sees only this call refused. Needs `ReadStockLocation`.
|
|
714
|
+
*
|
|
715
|
+
* @effect read
|
|
716
|
+
* @permission ReadStockLocation
|
|
441
717
|
*/
|
|
442
718
|
cancellation(id: string, options?: Call): Promise<StockTransferCancellation | null>;
|
|
443
719
|
/**
|
|
@@ -487,24 +763,82 @@ export interface StockTransfersModule {
|
|
|
487
763
|
* default timeout does not cover.
|
|
488
764
|
*/
|
|
489
765
|
myparcelLabel(id: string, format: StockTransferLabelFormat, options?: Call): Promise<StockTransferLabel>;
|
|
766
|
+
/**
|
|
767
|
+
* Void an in-transit shipment back to an editable draft, to correct a wrong handler or carrier
|
|
768
|
+
* and ship again. It undoes `ship`: the units go back to the source, every MyParcel parcel is
|
|
769
|
+
* voided at MyParcel inside the call, and the handler, its arguments, the carrier, tracking
|
|
770
|
+
* code, ETA, parcels and transfer note are cleared (the delivery address stays, for the
|
|
771
|
+
* re-ship). Answers the draft.
|
|
772
|
+
*
|
|
773
|
+
* MyParcel deletes only a concept: a parcel it keeps (a registered label) is named on
|
|
774
|
+
* `parcels(id).lastError`, recorded in `unretractedShipments` and never adopted by a re-ship.
|
|
775
|
+
* A Hendriks export, or any other handler's shipment, is NOT withdrawn: it is voided here only,
|
|
776
|
+
* and must be retracted at the 3PL by hand.
|
|
777
|
+
*
|
|
778
|
+
* Refused (`ValidationError`) for a transfer not in transit, so a repeat restores nothing
|
|
779
|
+
* twice, and once any unit was received or lost (close or cancel it instead). Refused
|
|
780
|
+
* `FIELD_GROUP_LOCKED` (`BusinessRuleError`) while an app or API key owns the store's Stock. A
|
|
781
|
+
* restricted credential must hold the source. The MyParcel calls make it allowed up to 120s;
|
|
782
|
+
* a `REQUEST_TIMEOUT` does not mean it failed, so `get` the transfer before trying again.
|
|
783
|
+
*
|
|
784
|
+
* @effect destructive
|
|
785
|
+
* @permission AdjustStock
|
|
786
|
+
*/
|
|
787
|
+
removeShipment(id: string, options?: Call): Promise<StockTransferDetail>;
|
|
788
|
+
/**
|
|
789
|
+
* Upload the Hendriks (BluJay) export again for an in-transit transfer shipped with Hendriks
|
|
790
|
+
* whose export did not land at ship time (`hendriksRemotePath` still null). It reuses the
|
|
791
|
+
* transfer's BluJay order number and moves no stock. Answers the transfer with its
|
|
792
|
+
* `hendriksRemotePath`; an upload that fails is thrown, in the engine's words.
|
|
793
|
+
*
|
|
794
|
+
* Refused (`ValidationError`) for a transfer not shipped with Hendriks, not in transit, or
|
|
795
|
+
* already exported: a second retry waits for the first under the transfer's lock and is then
|
|
796
|
+
* refused, so one transfer never sends Hendriks two orders. A store without the Hendriks plugin
|
|
797
|
+
* is refused (`ValidationError`) too; one whose Hendriks set-up is missing or switched off is
|
|
798
|
+
* refused with no code yet, so that arrives as a `GRAPHQL_ERROR` (status 500) in the engine's
|
|
799
|
+
* words, and nothing is uploaded. A restricted credential must hold the source. The
|
|
800
|
+
* upload makes it allowed up to 120s; a `REQUEST_TIMEOUT` does not mean it failed, so `get` the
|
|
801
|
+
* transfer and look at `hendriksRemotePath` before trying again.
|
|
802
|
+
*
|
|
803
|
+
* @effect irreversible
|
|
804
|
+
* @permission AdjustStock
|
|
805
|
+
*/
|
|
806
|
+
retryHendriksExport(id: string, options?: Call): Promise<StockTransferDetail>;
|
|
807
|
+
/**
|
|
808
|
+
* Generate the transfer's note (a consumption's: its consumption note) again and store it;
|
|
809
|
+
* answers the transfer with the new `pdfStorageKey`. Refused (`ValidationError`) for a draft.
|
|
810
|
+
* A store without document storage set up answers the transfer unchanged. A restricted
|
|
811
|
+
* credential must hold either end.
|
|
812
|
+
*
|
|
813
|
+
* @effect write
|
|
814
|
+
* @permission AdjustStock
|
|
815
|
+
*/
|
|
816
|
+
regeneratePdf(id: string, options?: Call): Promise<StockTransferDetail>;
|
|
817
|
+
/** The format of the store's transfer codes. */
|
|
818
|
+
numbering: StockTransferNumberingModule;
|
|
490
819
|
}
|
|
491
|
-
export declare const STOCK_TRANSFERS_QUERY = "\n query StockTransfers($options: StockTransferListOptions) {\n stockTransfers(options: $options) { items { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n } totalItems }\n }\n";
|
|
492
|
-
export declare const STOCK_TRANSFER_QUERY = "\n query StockTransfer($id: ID!) { stockTransfer(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n } }\n";
|
|
493
|
-
export declare const CREATE_STOCK_TRANSFER_MUTATION = "\n mutation CreateStockTransfer($input: CreateStockTransferInput!) {\n createStockTransfer(input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
494
|
-
export declare const UPDATE_STOCK_TRANSFER_MUTATION = "\n mutation UpdateStockTransfer($id: ID!, $input: UpdateStockTransferInput!) {\n updateStockTransfer(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
495
|
-
export declare const SHIP_STOCK_TRANSFER_MUTATION = "\n mutation ShipStockTransfer($id: ID!, $input: ShipStockTransferInput) {\n shipStockTransfer(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
496
|
-
export declare const POST_STOCK_TRANSFER_CONSUMPTION_MUTATION = "\n mutation PostStockTransferConsumption($id: ID!) {\n postStockTransferConsumption(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
497
|
-
export declare const RECEIVE_STOCK_TRANSFER_LINES_MUTATION = "\n mutation ReceiveStockTransferLines($id: ID!, $lines: [ReceiveStockTransferLineInput!]!) {\n receiveStockTransferLines(id: $id, lines: $lines) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
498
|
-
export declare const CLOSE_STOCK_TRANSFER_MUTATION = "\n mutation CloseStockTransfer($id: ID!, $acceptShortfallAsLost: Boolean) {\n closeStockTransfer(id: $id, acceptShortfallAsLost: $acceptShortfallAsLost) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
820
|
+
export declare const STOCK_TRANSFERS_QUERY = "\n query StockTransfers($options: StockTransferListOptions) {\n stockTransfers(options: $options) { items { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n } totalItems }\n }\n";
|
|
821
|
+
export declare const STOCK_TRANSFER_QUERY = "\n query StockTransfer($id: ID!) { stockTransfer(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n } }\n";
|
|
822
|
+
export declare const CREATE_STOCK_TRANSFER_MUTATION = "\n mutation CreateStockTransfer($input: CreateStockTransferInput!) {\n createStockTransfer(input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
823
|
+
export declare const UPDATE_STOCK_TRANSFER_MUTATION = "\n mutation UpdateStockTransfer($id: ID!, $input: UpdateStockTransferInput!) {\n updateStockTransfer(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
824
|
+
export declare const SHIP_STOCK_TRANSFER_MUTATION = "\n mutation ShipStockTransfer($id: ID!, $input: ShipStockTransferInput) {\n shipStockTransfer(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
825
|
+
export declare const POST_STOCK_TRANSFER_CONSUMPTION_MUTATION = "\n mutation PostStockTransferConsumption($id: ID!) {\n postStockTransferConsumption(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
826
|
+
export declare const RECEIVE_STOCK_TRANSFER_LINES_MUTATION = "\n mutation ReceiveStockTransferLines($id: ID!, $lines: [ReceiveStockTransferLineInput!]!) {\n receiveStockTransferLines(id: $id, lines: $lines) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
827
|
+
export declare const CLOSE_STOCK_TRANSFER_MUTATION = "\n mutation CloseStockTransfer($id: ID!, $acceptShortfallAsLost: Boolean) {\n closeStockTransfer(id: $id, acceptShortfallAsLost: $acceptShortfallAsLost) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
499
828
|
/**
|
|
500
829
|
* Its own document: it declares `$shortfall`, which an engine without per-line
|
|
501
830
|
* dispositions refuses as a whole. A close without dispositions keeps sending
|
|
502
831
|
* the document above.
|
|
503
832
|
*/
|
|
504
|
-
export declare const CLOSE_STOCK_TRANSFER_WITH_SHORTFALL_MUTATION = "\n mutation CloseStockTransferWithShortfall(\n $id: ID!\n $acceptShortfallAsLost: Boolean\n $shortfall: [StockTransferShortfallLineInput!]!\n ) {\n closeStockTransfer(\n id: $id\n acceptShortfallAsLost: $acceptShortfallAsLost\n shortfall: $shortfall\n ) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
505
|
-
export declare const CANCEL_STOCK_TRANSFER_MUTATION = "\n mutation CancelStockTransfer($id: ID!, $reason: String) {\n cancelStockTransfer(id: $id, reason: $reason) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
506
|
-
export declare const CREATE_STOCK_TRANSFER_RETURN_MUTATION = "\n mutation CreateStockTransferReturn($id: ID!, $input: CreateStockTransferReturnInput!) {\n createStockTransferReturn(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
507
|
-
export declare const
|
|
833
|
+
export declare const CLOSE_STOCK_TRANSFER_WITH_SHORTFALL_MUTATION = "\n mutation CloseStockTransferWithShortfall(\n $id: ID!\n $acceptShortfallAsLost: Boolean\n $shortfall: [StockTransferShortfallLineInput!]!\n ) {\n closeStockTransfer(\n id: $id\n acceptShortfallAsLost: $acceptShortfallAsLost\n shortfall: $shortfall\n ) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
834
|
+
export declare const CANCEL_STOCK_TRANSFER_MUTATION = "\n mutation CancelStockTransfer($id: ID!, $reason: String) {\n cancelStockTransfer(id: $id, reason: $reason) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
835
|
+
export declare const CREATE_STOCK_TRANSFER_RETURN_MUTATION = "\n mutation CreateStockTransferReturn($id: ID!, $input: CreateStockTransferReturnInput!) {\n createStockTransferReturn(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
836
|
+
export declare const REMOVE_STOCK_TRANSFER_SHIPMENT_MUTATION = "\n mutation RemoveStockTransferShipment($id: ID!) {\n removeStockTransferShipment(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
837
|
+
export declare const RETRY_STOCK_TRANSFER_HENDRIKS_EXPORT_MUTATION = "\n mutation RetryStockTransferHendriksExport($id: ID!) {\n retryStockTransferHendriksExport(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
838
|
+
export declare const REGENERATE_STOCK_TRANSFER_PDF_MUTATION = "\n mutation RegenerateStockTransferPdf($id: ID!) {\n regenerateStockTransferPdf(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
|
|
839
|
+
export declare const STOCK_TRANSFER_NUMBERING_QUERY = "\n query StockTransferNumberingConfig {\n stockTransferNumberingConfig { \n prefix\n suffix\n digits\n yearFormat\n yearReset\n }\n }\n";
|
|
840
|
+
export declare const UPDATE_STOCK_TRANSFER_NUMBERING_MUTATION = "\n mutation UpdateStockTransferNumberingConfig($input: UpdateStockTransferNumberingConfigInput!) {\n updateStockTransferNumberingConfig(input: $input) { \n prefix\n suffix\n digits\n yearFormat\n yearReset\n }\n }\n";
|
|
841
|
+
export declare const STOCK_TRANSFER_RETURNS_QUERY = "\n query StockTransferReturns($id: ID!) {\n stockTransfer(id: $id) {\n returnOfTransferId\n returnOf { \n id\n code\n state\n label\n sourceLocation { id name }\n destinationLocation { id name }\n createdAt\n totalQuantity\n }\n returns { \n id\n code\n state\n label\n sourceLocation { id name }\n destinationLocation { id name }\n createdAt\n totalQuantity\n }\n returnableLines {\n productVariantId\n productVariant { name sku }\n receivedQuantity\n returnedQuantity\n returnableQuantity\n }\n returnAvailability { available reasonCode }\n }\n }\n";
|
|
508
842
|
/** The per-line settlement fields, in a document of their own like the return fields. */
|
|
509
843
|
export declare const STOCK_TRANSFER_SHORTFALL_QUERY = "\n query StockTransferShortfall($id: ID!) {\n stockTransfer(id: $id) {\n id\n state\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n returnedToSourceQuantity\n outstandingQuantity\n }\n totalLostQuantity\n totalReturnedToSourceQuantity\n }\n }\n";
|
|
510
844
|
/**
|
|
@@ -512,7 +846,7 @@ export declare const STOCK_TRANSFER_SHORTFALL_QUERY = "\n query StockTransferSh
|
|
|
512
846
|
* parcel fields: `cancelledBy` is newer than the transfer module, and
|
|
513
847
|
* `get`/`list`/`cancel` keep working against an engine without it.
|
|
514
848
|
*/
|
|
515
|
-
export declare const STOCK_TRANSFER_CANCELLATION_QUERY = "\n query StockTransferCancellation($id: ID!) {\n stockTransfer(id: $id) {\n id\n state\n cancelledAt\n cancelReason\n cancelledBy { id firstName lastName }\n fulfillmentHandlerCode\n hendriksRemotePath\n hendriksBluJayOrderNumber\n }\n }\n";
|
|
849
|
+
export declare const STOCK_TRANSFER_CANCELLATION_QUERY = "\n query StockTransferCancellation($id: ID!) {\n stockTransfer(id: $id) {\n id\n state\n cancelledAt\n cancelReason\n cancelledBy { id firstName lastName }\n fulfillmentHandlerCode\n hendriksRemotePath\n hendriksBluJayOrderNumber\n cancelAvailability { available reasonCode }\n }\n }\n";
|
|
516
850
|
export declare const STOCK_TRANSFER_PARCELS_QUERY = "\n query StockTransferParcels($id: ID!) { stockTransfer(id: $id) { \n id\n state\n fulfillmentHandlerCode\n parcelCount\n myparcelParcels { ordinal shipmentId barcode labelReady lastError }\n trackingCodes\n myparcelBarcode\n myparcelLastError\n myparcelUnretractedShipments { \n shipmentId\n reference\n verdict\n status\n statusName\n billable\n hidden\n reason\n cause\n firstRecordedAt\n lastCheckedAt\n resolvedAt\n }\n } }\n";
|
|
517
851
|
export declare const RETRY_STOCK_TRANSFER_MYPARCEL_SHIPMENTS_MUTATION = "\n mutation RetryStockTransferMyparcelShipments($id: ID!) {\n retryStockTransferMyparcelShipments(id: $id) { \n id\n state\n fulfillmentHandlerCode\n parcelCount\n myparcelParcels { ordinal shipmentId barcode labelReady lastError }\n trackingCodes\n myparcelBarcode\n myparcelLastError\n myparcelUnretractedShipments { \n shipmentId\n reference\n verdict\n status\n statusName\n billable\n hidden\n reason\n cause\n firstRecordedAt\n lastCheckedAt\n resolvedAt\n }\n }\n }\n";
|
|
518
852
|
export declare const LABEL_STOCK_TRANSFER_MYPARCEL_PARCELS_MUTATION = "\n mutation LabelStockTransferMyparcelParcels($id: ID!) {\n labelStockTransferMyparcelParcels(id: $id) { \n id\n state\n fulfillmentHandlerCode\n parcelCount\n myparcelParcels { ordinal shipmentId barcode labelReady lastError }\n trackingCodes\n myparcelBarcode\n myparcelLastError\n myparcelUnretractedShipments { \n shipmentId\n reference\n verdict\n status\n statusName\n billable\n hidden\n reason\n cause\n firstRecordedAt\n lastCheckedAt\n resolvedAt\n }\n }\n }\n";
|