@sixtyninecommerce/admin 0.10.0 → 0.11.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 +4347 -171
- 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/index.d.ts +9 -2
- package/dist/catalog/index.js +4 -0
- package/dist/catalog/products.d.ts +159 -19
- package/dist/catalog/products.js +88 -13
- package/dist/catalog/properties.d.ts +102 -14
- package/dist/catalog/properties.js +13 -0
- package/dist/catalog/recommendations.d.ts +261 -0
- package/dist/catalog/recommendations.js +145 -0
- package/dist/catalog/reviews.d.ts +368 -0
- package/dist/catalog/reviews.js +318 -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 +233 -26
- package/dist/catalog/variants.js +125 -7
- package/dist/catalog/visibility.d.ts +20 -5
- package/dist/catalog/visibility.js +19 -1
- package/dist/client.d.ts +95 -9
- package/dist/client.js +35 -7
- package/dist/content/assets.d.ts +286 -0
- package/dist/content/assets.js +181 -0
- package/dist/content/items.d.ts +269 -0
- package/dist/content/items.js +170 -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/groups.d.ts +207 -0
- package/dist/customers/groups.js +438 -0
- package/dist/customers/index.d.ts +447 -37
- package/dist/customers/index.js +313 -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/index.d.ts +731 -21
- package/dist/documents/index.js +436 -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 +44 -10
- package/dist/fulfillments/index.js +11 -2
- 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 +123 -35
- package/dist/index.js +45 -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 +423 -0
- package/dist/integrations/exact-online-types.js +6 -0
- package/dist/integrations/exact-online.d.ts +248 -0
- package/dist/integrations/exact-online.js +376 -0
- package/dist/integrations/index.d.ts +29 -3
- package/dist/integrations/index.js +18 -3
- package/dist/integrations/pipeline-keys.d.ts +13 -0
- package/dist/integrations/pipeline-keys.js +22 -0
- package/dist/integrations/pipelines.d.ts +15 -14
- package/dist/integrations/pipelines.js +6 -22
- package/dist/integrations/types.d.ts +146 -0
- package/dist/locations/index.d.ts +66 -0
- package/dist/locations/index.js +31 -0
- package/dist/meta/index.d.ts +162 -0
- package/dist/orders/cancel-with-money.d.ts +227 -0
- package/dist/orders/cancel-with-money.js +153 -0
- package/dist/orders/commit-edit.d.ts +7 -1
- package/dist/orders/commit-edit.js +5 -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 +49 -9
- package/dist/orders/index.js +22 -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 +222 -0
- package/dist/orders/list.js +377 -0
- package/dist/orders/manual-pricing.d.ts +5 -0
- package/dist/orders/order-entry.d.ts +20 -7
- package/dist/orders/plan-edit.d.ts +1 -1
- package/dist/orders/plan-edit.js +4 -1
- 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 +8 -1
- package/dist/orders/surcharges.js +3 -2
- package/dist/payments/account-credit.d.ts +30 -0
- package/dist/payments/account-credit.js +19 -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 +12 -0
- package/dist/payments/credit-noted-fields.js +37 -0
- package/dist/payments/index.d.ts +257 -11
- package/dist/payments/index.js +131 -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 +144 -0
- package/dist/payments/requests.js +92 -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 +104 -0
- package/dist/pickups/index.js +105 -0
- package/dist/platform/channels.d.ts +132 -0
- package/dist/platform/channels.js +128 -0
- package/dist/platform/geo.d.ts +123 -0
- package/dist/platform/geo.js +144 -0
- package/dist/platform/tax.d.ts +154 -0
- package/dist/platform/tax.js +139 -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 +103 -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 +2125 -32
- package/dist/pos/index.js +742 -4
- package/dist/pos/no-receipt.d.ts +94 -0
- package/dist/pos/no-receipt.js +25 -0
- package/dist/pos/offline-sales.d.ts +187 -0
- package/dist/pos/offline-sales.js +116 -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 +217 -0
- package/dist/pos/returns.js +53 -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 +604 -0
- package/dist/pricing/price-lists.js +600 -0
- package/dist/purchasing/alerts.d.ts +89 -0
- package/dist/purchasing/alerts.js +62 -0
- package/dist/purchasing/cost.d.ts +110 -0
- package/dist/purchasing/cost.js +86 -0
- package/dist/purchasing/index.d.ts +36 -0
- package/dist/purchasing/index.js +16 -0
- package/dist/purchasing/purchase-orders.d.ts +548 -0
- package/dist/purchasing/purchase-orders.js +491 -0
- package/dist/purchasing/replenishment.d.ts +281 -0
- package/dist/purchasing/replenishment.js +240 -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 +501 -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 +614 -21
- package/dist/returns/index.js +695 -11
- package/dist/search/index.d.ts +76 -1
- package/dist/search/index.js +63 -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 +48 -0
- package/dist/shipping/index.js +25 -0
- package/dist/shipping/methods.d.ts +198 -0
- package/dist/shipping/methods.js +240 -0
- package/dist/shipping/myparcel.d.ts +254 -0
- package/dist/shipping/myparcel.js +178 -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 +179 -0
- package/dist/shipping/rate-tables.js +184 -0
- package/dist/stock/index.d.ts +10 -3
- package/dist/stock/index.js +3 -0
- package/dist/stock/locations.d.ts +144 -0
- package/dist/stock/locations.js +168 -0
- package/dist/stock/transfers.d.ts +216 -43
- package/dist/stock/transfers.js +140 -13
- package/dist/stored-value/index.d.ts +214 -4
- package/dist/stored-value/index.js +152 -0
- package/dist/subscriptions/index.d.ts +682 -0
- package/dist/subscriptions/index.js +815 -0
- package/dist/tax/index.d.ts +76 -1
- package/dist/tax/index.js +50 -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 +66 -0
- package/dist/tenant/email-templates.js +54 -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
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shapes of `admin.integrations.exactOnline` (headless W10-55): the store's Exact Online
|
|
3
|
+
* connection, its settings, the read-only structure probes of the connected division, and the
|
|
4
|
+
* calls-per-day estimate of a sync schedule.
|
|
5
|
+
*/
|
|
6
|
+
/** When an order auto-pushes to Exact, by lifecycle event (`off`: never). */
|
|
7
|
+
export type ExactAutoPushTrigger = 'off' | 'placed' | 'paid' | 'fulfilled';
|
|
8
|
+
export interface ExactAutoPushRule {
|
|
9
|
+
customerGroupId: string;
|
|
10
|
+
trigger: ExactAutoPushTrigger;
|
|
11
|
+
}
|
|
12
|
+
/** The store's automatic order push, per customer group: the first rule naming a group wins. */
|
|
13
|
+
export interface ExactAutoPushConfig {
|
|
14
|
+
/** Master switch: off, nothing auto-pushes whatever the rules say. */
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
/** The trigger of a customer no rule names. */
|
|
17
|
+
defaultTrigger: ExactAutoPushTrigger;
|
|
18
|
+
rules: ExactAutoPushRule[];
|
|
19
|
+
}
|
|
20
|
+
/** Inbound account filter: sales accounts only, or every account. */
|
|
21
|
+
export type ExactCustomerAccountFilter = 'sales' | 'all';
|
|
22
|
+
/** Which side wins when a customer differs between Exact and the platform. */
|
|
23
|
+
export type ExactCustomerOverwritePolicy = 'exact-authoritative' | 'last-writer-wins';
|
|
24
|
+
/** The store's customer sync, both ways. */
|
|
25
|
+
export interface ExactCustomerSyncConfig {
|
|
26
|
+
/** Master switch: off, neither direction runs. */
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
/** Inbound: an Accounts webhook from Exact starts a customer sync. */
|
|
29
|
+
webhookEnabled: boolean;
|
|
30
|
+
/** Outbound: a customer edited here is pushed to its Exact Account. */
|
|
31
|
+
pushEnabled: boolean;
|
|
32
|
+
accountFilter: ExactCustomerAccountFilter;
|
|
33
|
+
overwritePolicy: ExactCustomerOverwritePolicy;
|
|
34
|
+
/** The outbound fields. */
|
|
35
|
+
fields: {
|
|
36
|
+
name: boolean;
|
|
37
|
+
email: boolean;
|
|
38
|
+
address: boolean;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** A payment method of the store, mapped to the Exact condition orders paid with it carry. */
|
|
42
|
+
export interface ExactPaymentMethodCondition {
|
|
43
|
+
paymentMethodId: string;
|
|
44
|
+
conditionCode: string;
|
|
45
|
+
}
|
|
46
|
+
/** Exact-owned customer payment terms. */
|
|
47
|
+
export interface ExactPaymentTermsConfig {
|
|
48
|
+
/** The mirrored Exact condition is authoritative for checkout and pay-on-account orders. */
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
/** Mirror Exact's conditions and assignments, without changing checkout or orders. */
|
|
51
|
+
synchronizationEnabled: boolean;
|
|
52
|
+
/** The condition a brand-new Account the platform creates in Exact gets; never an existing one. */
|
|
53
|
+
newAccountPaymentConditionCode: string | null;
|
|
54
|
+
/** Prepaid payment-method overrides, applied when an order's terms are captured. */
|
|
55
|
+
paymentMethodConditions: ExactPaymentMethodCondition[];
|
|
56
|
+
}
|
|
57
|
+
/** Exact-owned customer delivery profiles. */
|
|
58
|
+
export interface ExactDeliveryTermsConfig {
|
|
59
|
+
enabled: boolean;
|
|
60
|
+
synchronizationEnabled: boolean;
|
|
61
|
+
/** Send the buyer's requested delivery day to Exact as the sales order's delivery date. */
|
|
62
|
+
forwardRequestedDeliveryDate: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Send where a pushed order ships as the sales order's delivery address. Optional here because
|
|
65
|
+
* a save that leaves it out keeps the stored switch; every read carries it.
|
|
66
|
+
*/
|
|
67
|
+
sendDeliveryAddress?: boolean;
|
|
68
|
+
/** The defaults below seed only a brand-new Account the platform creates in Exact. */
|
|
69
|
+
newAccountShippingMethodId: string | null;
|
|
70
|
+
newAccountIncotermCode: string | null;
|
|
71
|
+
newAccountIncotermVersion: number | null;
|
|
72
|
+
newAccountIncotermAddress: string | null;
|
|
73
|
+
/** Dispatch lead time in days, not a promised arrival. Zero is valid. */
|
|
74
|
+
newAccountShippingLeadDays: number | null;
|
|
75
|
+
/** Exact's DeliveryAdvice: 0 partial, 1 complete, 2 partial without backorder. */
|
|
76
|
+
newAccountDeliveryAdvice: 0 | 1 | 2 | null;
|
|
77
|
+
}
|
|
78
|
+
/** One scheduled sweep: whether it runs, and the minutes between runs. */
|
|
79
|
+
export interface ExactSyncWindow {
|
|
80
|
+
enabled: boolean;
|
|
81
|
+
intervalMinutes: number;
|
|
82
|
+
}
|
|
83
|
+
/** The store's scheduled Exact → platform sweeps, and the advisory daily call budget. */
|
|
84
|
+
export interface ExactSyncSchedule {
|
|
85
|
+
/** Near-real-time price delta. */
|
|
86
|
+
delta: ExactSyncWindow;
|
|
87
|
+
/** Items, stock, warehouses, shipping methods and pictures: the full reconciler. */
|
|
88
|
+
full: ExactSyncWindow;
|
|
89
|
+
/** Inbound sales orders. */
|
|
90
|
+
order: ExactSyncWindow;
|
|
91
|
+
/** Inbound purchase orders, feeding incoming stock (storefront restock dates). */
|
|
92
|
+
purchaseOrders: ExactSyncWindow;
|
|
93
|
+
/** Prunes incoming stock of purchase orders deleted in Exact (the sweep above never sees one). */
|
|
94
|
+
purchaseOrdersReconcile: ExactSyncWindow;
|
|
95
|
+
/** Accounts and their payment conditions. */
|
|
96
|
+
customers: ExactSyncWindow;
|
|
97
|
+
/** B2B price agreements and named price lists: the integration's heaviest reads. */
|
|
98
|
+
priceLists: ExactSyncWindow;
|
|
99
|
+
/** Advisory only (0: none set); see {@link ExactSyncEstimate.overBudget}. */
|
|
100
|
+
dailyCallBudget: number;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A schedule to save or estimate. `delta`, `full`, `order` and the budget are always sent; a
|
|
104
|
+
* window left out keeps the stored one, an explicit `null` window its default.
|
|
105
|
+
*/
|
|
106
|
+
export interface ExactSyncScheduleInput {
|
|
107
|
+
delta: ExactSyncWindow;
|
|
108
|
+
full: ExactSyncWindow;
|
|
109
|
+
order: ExactSyncWindow;
|
|
110
|
+
purchaseOrders?: ExactSyncWindow | null;
|
|
111
|
+
purchaseOrdersReconcile?: ExactSyncWindow | null;
|
|
112
|
+
customers?: ExactSyncWindow | null;
|
|
113
|
+
priceLists?: ExactSyncWindow | null;
|
|
114
|
+
dailyCallBudget: number;
|
|
115
|
+
}
|
|
116
|
+
/** What the catalogue import does with an Exact item that is not a stock item. */
|
|
117
|
+
export type ExactNonStockItemPolicy = 'public' | 'disabled' | 'skip';
|
|
118
|
+
/** What the catalogue import does with an Exact item with no usable sales price. */
|
|
119
|
+
export type ExactUnpricedItemPolicy = 'import' | 'disabled';
|
|
120
|
+
/** The tax basis Exact's prices arrive in: as the store keeps them, net or gross. */
|
|
121
|
+
export type ExactPriceBasis = 'channel' | 'net' | 'gross';
|
|
122
|
+
/** Whether, and how, Exact item pictures become product images. */
|
|
123
|
+
export type ExactPicturePolicy = 'off' | 'fill_missing' | 'exact_owns_featured';
|
|
124
|
+
/** Which Exact stock figure becomes on-hand: In stock, or Free stock (minus reserved). */
|
|
125
|
+
export type ExactStockBasis = 'in_stock' | 'free_stock';
|
|
126
|
+
/**
|
|
127
|
+
* Which Exact items may become publicly visible storefront products. Every read carries the
|
|
128
|
+
* RESOLVED policy: a store that never saved one reads the engine's defaults.
|
|
129
|
+
*/
|
|
130
|
+
export interface ExactCatalogueImportPolicy {
|
|
131
|
+
/** Import only items whose Exact `IsWebshopItem` flag is set. */
|
|
132
|
+
requireWebshopFlag: boolean;
|
|
133
|
+
nonStockItems: ExactNonStockItemPolicy;
|
|
134
|
+
unpricedItems: ExactUnpricedItemPolicy;
|
|
135
|
+
priceBasis: ExactPriceBasis;
|
|
136
|
+
pictures: ExactPicturePolicy;
|
|
137
|
+
stockBasis: ExactStockBasis;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* A catalogue-policy change, MERGED over the stored policy: a key left out keeps its value, an
|
|
141
|
+
* explicit `null` resets it to the default. Send only the keys that changed.
|
|
142
|
+
*/
|
|
143
|
+
export interface ExactCatalogueImportPolicyInput {
|
|
144
|
+
requireWebshopFlag?: boolean | null;
|
|
145
|
+
nonStockItems?: ExactNonStockItemPolicy | null;
|
|
146
|
+
unpricedItems?: ExactUnpricedItemPolicy | null;
|
|
147
|
+
priceBasis?: ExactPriceBasis | null;
|
|
148
|
+
pictures?: ExactPicturePolicy | null;
|
|
149
|
+
stockBasis?: ExactStockBasis | null;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* The store's Exact Online connection and settings. The client secret, the webhook secret and
|
|
153
|
+
* the OAuth tokens are write-only: no read returns them in any form.
|
|
154
|
+
*/
|
|
155
|
+
export interface ExactOnlineConfig {
|
|
156
|
+
id: string;
|
|
157
|
+
/** The integration's runtime switch (the scheduled sweeps and automatic pushes follow it). */
|
|
158
|
+
enabled: boolean;
|
|
159
|
+
/** An Exact division is connected (OAuth) and its refresh token is held. */
|
|
160
|
+
connected: boolean;
|
|
161
|
+
/** Where the Exact administration lives: `nl`, `be`, `de`, `uk`, `fr`, `es` or `com`. */
|
|
162
|
+
region: string;
|
|
163
|
+
division: string | null;
|
|
164
|
+
companyName: string | null;
|
|
165
|
+
/** The store's own Exact app client id. */
|
|
166
|
+
clientId: string | null;
|
|
167
|
+
/** The store has stored its Exact app's client id AND secret: it can connect. */
|
|
168
|
+
hasCustomCredentials: boolean;
|
|
169
|
+
hasWebhookSecret: boolean;
|
|
170
|
+
lastConnectedAt: string | null;
|
|
171
|
+
lastRefreshedAt: string | null;
|
|
172
|
+
accessTokenExpiresAt: string | null;
|
|
173
|
+
/** The Exact item the shipping-cost line of a pushed sales order is booked on. */
|
|
174
|
+
shippingItemCode: string | null;
|
|
175
|
+
/** The Exact item a pushed order's promotion discount is booked on; null folds it into prices. */
|
|
176
|
+
discountItemCode: string | null;
|
|
177
|
+
/** The Exact item externally priced order lines are booked on. */
|
|
178
|
+
externalLineItemCode: string | null;
|
|
179
|
+
/** A pushed sales order carries the order's surcharges, one line each. */
|
|
180
|
+
pushSurcharges: boolean;
|
|
181
|
+
surchargeItemCode: string | null;
|
|
182
|
+
negativeSurchargeItemCode: string | null;
|
|
183
|
+
/** Advice (never a refusal) when surcharges push while auto-push sends orders early. */
|
|
184
|
+
pushSurchargesWarning: string | null;
|
|
185
|
+
autoPush: ExactAutoPushConfig;
|
|
186
|
+
customerSync: ExactCustomerSyncConfig;
|
|
187
|
+
paymentTerms: ExactPaymentTermsConfig;
|
|
188
|
+
deliveryTerms: ExactDeliveryTermsConfig;
|
|
189
|
+
syncSchedule: ExactSyncSchedule;
|
|
190
|
+
catalogueImportPolicy: ExactCatalogueImportPolicy;
|
|
191
|
+
/** When each sweep was last QUEUED (null: never); how it ended is in the sync log. */
|
|
192
|
+
deltaLastEnqueuedAt: string | null;
|
|
193
|
+
fullLastEnqueuedAt: string | null;
|
|
194
|
+
orderLastEnqueuedAt: string | null;
|
|
195
|
+
purchaseOrderLastEnqueuedAt: string | null;
|
|
196
|
+
purchaseOrderReconcileLastEnqueuedAt: string | null;
|
|
197
|
+
customerLastEnqueuedAt: string | null;
|
|
198
|
+
priceListLastEnqueuedAt: string | null;
|
|
199
|
+
}
|
|
200
|
+
/** A payment-terms section to save; `paymentMethodConditions` left out keeps the stored list. */
|
|
201
|
+
export interface ExactPaymentTermsConfigInput {
|
|
202
|
+
enabled: boolean;
|
|
203
|
+
synchronizationEnabled?: boolean | null;
|
|
204
|
+
newAccountPaymentConditionCode?: string | null;
|
|
205
|
+
paymentMethodConditions?: ExactPaymentMethodCondition[] | null;
|
|
206
|
+
}
|
|
207
|
+
/** A delivery-terms section to save; `sendDeliveryAddress` left out keeps the stored switch. */
|
|
208
|
+
export interface ExactDeliveryTermsConfigInput {
|
|
209
|
+
enabled: boolean;
|
|
210
|
+
synchronizationEnabled?: boolean | null;
|
|
211
|
+
forwardRequestedDeliveryDate?: boolean | null;
|
|
212
|
+
sendDeliveryAddress?: boolean | null;
|
|
213
|
+
newAccountShippingMethodId?: string | null;
|
|
214
|
+
newAccountIncotermCode?: string | null;
|
|
215
|
+
newAccountIncotermVersion?: number | null;
|
|
216
|
+
newAccountIncotermAddress?: string | null;
|
|
217
|
+
newAccountShippingLeadDays?: number | null;
|
|
218
|
+
newAccountDeliveryAdvice?: number | null;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* A settings change: every key optional, a key left out keeps the stored value. `autoPush` and
|
|
222
|
+
* `customerSync` replace their whole setting (`null`: the default); `syncSchedule` and
|
|
223
|
+
* `catalogueImportPolicy` merge over the stored one. The OAuth connection and the app
|
|
224
|
+
* credentials have their own methods.
|
|
225
|
+
*
|
|
226
|
+
* `region`, `enabled`, `shippingItemCode`, `discountItemCode`, `paymentTerms` and `deliveryTerms`
|
|
227
|
+
* take no `null` (the engine cannot store one): the SDK refuses it before sending.
|
|
228
|
+
*/
|
|
229
|
+
export interface UpdateExactOnlineConfigInput {
|
|
230
|
+
region?: string;
|
|
231
|
+
enabled?: boolean;
|
|
232
|
+
/** Trimmed; blank clears it. */
|
|
233
|
+
shippingItemCode?: string;
|
|
234
|
+
/** Trimmed; blank clears it, folding promotions back into the line prices. */
|
|
235
|
+
discountItemCode?: string;
|
|
236
|
+
/** Trimmed; blank or `null` clears it; over 60 characters is refused `USER_INPUT_ERROR`. */
|
|
237
|
+
externalLineItemCode?: string | null;
|
|
238
|
+
/** `null` restores the default, off. */
|
|
239
|
+
pushSurcharges?: boolean | null;
|
|
240
|
+
/** Trimmed; blank or `null` clears it; over 60 characters is refused `USER_INPUT_ERROR`. */
|
|
241
|
+
surchargeItemCode?: string | null;
|
|
242
|
+
/** Trimmed; blank or `null` clears it; over 60 characters is refused `USER_INPUT_ERROR`. */
|
|
243
|
+
negativeSurchargeItemCode?: string | null;
|
|
244
|
+
autoPush?: ExactAutoPushConfig | null;
|
|
245
|
+
customerSync?: ExactCustomerSyncConfig | null;
|
|
246
|
+
paymentTerms?: ExactPaymentTermsConfigInput;
|
|
247
|
+
deliveryTerms?: ExactDeliveryTermsConfigInput;
|
|
248
|
+
syncSchedule?: ExactSyncScheduleInput | null;
|
|
249
|
+
catalogueImportPolicy?: ExactCatalogueImportPolicyInput | null;
|
|
250
|
+
}
|
|
251
|
+
/** The store's own Exact app, entered before connecting. */
|
|
252
|
+
export interface SetExactOnlineCredentialsInput {
|
|
253
|
+
clientId: string;
|
|
254
|
+
/** Write-only. Left out, or blank, the stored secret stays. */
|
|
255
|
+
clientSecret?: string | null;
|
|
256
|
+
/** Write-only. Left out, or blank, the stored secret stays. */
|
|
257
|
+
webhookSecret?: string | null;
|
|
258
|
+
}
|
|
259
|
+
/** One CRM Account of the connected division, read live. */
|
|
260
|
+
export interface ExactOnlineAccountPreview {
|
|
261
|
+
id: string;
|
|
262
|
+
code: string | null;
|
|
263
|
+
name: string | null;
|
|
264
|
+
city: string | null;
|
|
265
|
+
country: string | null;
|
|
266
|
+
email: string | null;
|
|
267
|
+
status: string | null;
|
|
268
|
+
}
|
|
269
|
+
/** One logistics Item of the connected division, read live. */
|
|
270
|
+
export interface ExactOnlineItemPreview {
|
|
271
|
+
id: string;
|
|
272
|
+
code: string | null;
|
|
273
|
+
description: string | null;
|
|
274
|
+
isSalesItem: boolean | null;
|
|
275
|
+
isStockItem: boolean | null;
|
|
276
|
+
}
|
|
277
|
+
export interface ExactItemGroupStat {
|
|
278
|
+
code: string | null;
|
|
279
|
+
description: string | null;
|
|
280
|
+
itemCount: number;
|
|
281
|
+
}
|
|
282
|
+
export interface ExactClassFieldStat {
|
|
283
|
+
field: string;
|
|
284
|
+
nonEmptyCount: number;
|
|
285
|
+
distinctCount: number;
|
|
286
|
+
}
|
|
287
|
+
export interface ExactCatalogueRow {
|
|
288
|
+
code: string | null;
|
|
289
|
+
description: string | null;
|
|
290
|
+
itemGroup: string | null;
|
|
291
|
+
}
|
|
292
|
+
/** How the division's items group, for designing the item → product grouping rule. */
|
|
293
|
+
export interface ExactCatalogueStructure {
|
|
294
|
+
sampledCount: number;
|
|
295
|
+
distinctItemGroupCount: number;
|
|
296
|
+
topItemGroups: ExactItemGroupStat[];
|
|
297
|
+
classFields: ExactClassFieldStat[];
|
|
298
|
+
rows: ExactCatalogueRow[];
|
|
299
|
+
}
|
|
300
|
+
export interface ExactClassificationValueStat {
|
|
301
|
+
id: string;
|
|
302
|
+
code: string | null;
|
|
303
|
+
description: string | null;
|
|
304
|
+
accountCount: number;
|
|
305
|
+
}
|
|
306
|
+
export interface ExactClassificationDimension {
|
|
307
|
+
sequence: number;
|
|
308
|
+
name: string;
|
|
309
|
+
slotField: string;
|
|
310
|
+
populatedCount: number;
|
|
311
|
+
distinctCount: number;
|
|
312
|
+
values: ExactClassificationValueStat[];
|
|
313
|
+
}
|
|
314
|
+
export interface ExactPriceListStat {
|
|
315
|
+
id: string;
|
|
316
|
+
code: string | null;
|
|
317
|
+
description: string | null;
|
|
318
|
+
accountCount: number;
|
|
319
|
+
}
|
|
320
|
+
export interface ExactAccountRow {
|
|
321
|
+
code: string | null;
|
|
322
|
+
name: string | null;
|
|
323
|
+
email: string | null;
|
|
324
|
+
city: string | null;
|
|
325
|
+
country: string | null;
|
|
326
|
+
isReseller: boolean;
|
|
327
|
+
classifications: string[];
|
|
328
|
+
priceList: string | null;
|
|
329
|
+
}
|
|
330
|
+
/** How the division's Accounts group, for designing the Account → customer group mapping. */
|
|
331
|
+
export interface ExactAccountStructure {
|
|
332
|
+
sampledCount: number;
|
|
333
|
+
withEmail: number;
|
|
334
|
+
withoutEmail: number;
|
|
335
|
+
withAddress: number;
|
|
336
|
+
resellerCount: number;
|
|
337
|
+
dimensions: ExactClassificationDimension[];
|
|
338
|
+
priceLists: ExactPriceListStat[];
|
|
339
|
+
rows: ExactAccountRow[];
|
|
340
|
+
}
|
|
341
|
+
export interface ExactPriceListInfo {
|
|
342
|
+
id: string;
|
|
343
|
+
code: string | null;
|
|
344
|
+
description: string | null;
|
|
345
|
+
currency: string | null;
|
|
346
|
+
}
|
|
347
|
+
export interface ExactPriceListItemSample {
|
|
348
|
+
itemCode: string | null;
|
|
349
|
+
itemDescription: string | null;
|
|
350
|
+
quantity: number | null;
|
|
351
|
+
newPrice: number | null;
|
|
352
|
+
discount: number | null;
|
|
353
|
+
entryMethod: number | null;
|
|
354
|
+
/** `set`: the list defines its own base price for the item; `standard`: the item's own. */
|
|
355
|
+
basePrice: 'set' | 'standard';
|
|
356
|
+
}
|
|
357
|
+
export interface ExactCustomerPriceSample {
|
|
358
|
+
itemCode: string | null;
|
|
359
|
+
accountName: string | null;
|
|
360
|
+
price: number | null;
|
|
361
|
+
quantity: number | null;
|
|
362
|
+
currency: string | null;
|
|
363
|
+
}
|
|
364
|
+
/** Named price lists against per-customer item prices in the division. */
|
|
365
|
+
export interface ExactPricingStructure {
|
|
366
|
+
priceLists: ExactPriceListInfo[];
|
|
367
|
+
priceListItemPriceCount: number;
|
|
368
|
+
priceListItemSamples: ExactPriceListItemSample[];
|
|
369
|
+
accountsWithDefaultPriceList: number;
|
|
370
|
+
customerPriceCount: number;
|
|
371
|
+
customerPriceDistinctAccounts: number;
|
|
372
|
+
customerPriceDistinctItems: number;
|
|
373
|
+
customerPriceSamples: ExactCustomerPriceSample[];
|
|
374
|
+
sampled: boolean;
|
|
375
|
+
}
|
|
376
|
+
/** One Exact webhook subscription live for the store. */
|
|
377
|
+
export interface ExactWebhookSubscription {
|
|
378
|
+
topic: string;
|
|
379
|
+
subscriptionId: string | null;
|
|
380
|
+
callbackUrl: string | null;
|
|
381
|
+
}
|
|
382
|
+
/** The store's Exact webhook subscriptions, read live. */
|
|
383
|
+
export interface ExactWebhookStatus {
|
|
384
|
+
/** A webhook secret is stored: real-time webhooks are possible. */
|
|
385
|
+
supported: boolean;
|
|
386
|
+
/** At least one of the platform's subscriptions is live in Exact. */
|
|
387
|
+
registered: boolean;
|
|
388
|
+
subscriptions: ExactWebhookSubscription[];
|
|
389
|
+
/** When this live read ran. */
|
|
390
|
+
checkedAt: string;
|
|
391
|
+
/** Set when the live read itself failed; the rest is then a best-effort answer. */
|
|
392
|
+
error: string | null;
|
|
393
|
+
}
|
|
394
|
+
/** One sweep's share of {@link ExactSyncEstimate}. */
|
|
395
|
+
export interface ExactSyncSweepEstimate {
|
|
396
|
+
enabled: boolean;
|
|
397
|
+
/** The interval the estimate used: the one asked for, rounded and clamped (what a save stores). */
|
|
398
|
+
intervalMinutes: number;
|
|
399
|
+
minIntervalMinutes: number;
|
|
400
|
+
maxIntervalMinutes: number;
|
|
401
|
+
/** Representative Exact calls one run makes; a lower bound for the sweeps that page. */
|
|
402
|
+
callsPerRun: number;
|
|
403
|
+
/** Whole runs a day at `intervalMinutes`. */
|
|
404
|
+
runsPerDay: number;
|
|
405
|
+
/** `runsPerDay × callsPerRun`; 0 when the sweep is off. */
|
|
406
|
+
callsPerDay: number;
|
|
407
|
+
}
|
|
408
|
+
/** The Exact API calls a day a sync schedule makes. Advice: nothing is ever capped by it. */
|
|
409
|
+
export interface ExactSyncEstimate {
|
|
410
|
+
delta: ExactSyncSweepEstimate;
|
|
411
|
+
full: ExactSyncSweepEstimate;
|
|
412
|
+
order: ExactSyncSweepEstimate;
|
|
413
|
+
purchaseOrders: ExactSyncSweepEstimate;
|
|
414
|
+
purchaseOrdersReconcile: ExactSyncSweepEstimate;
|
|
415
|
+
customers: ExactSyncSweepEstimate;
|
|
416
|
+
priceLists: ExactSyncSweepEstimate;
|
|
417
|
+
/** Every sweep's `callsPerDay`, summed. */
|
|
418
|
+
total: number;
|
|
419
|
+
/** The budget as a save stores it; 0 means none is set. */
|
|
420
|
+
dailyCallBudget: number;
|
|
421
|
+
/** A budget is set (above 0) and `total` exceeds it. */
|
|
422
|
+
overBudget: boolean;
|
|
423
|
+
}
|