@sixtyninecommerce/admin 0.12.0 → 0.14.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 +8 -5
- package/dist/customers/groups.d.ts +16 -5
- package/dist/customers/groups.js +6 -2
- package/dist/documents/emails.d.ts +5 -1
- package/dist/fulfillments/create.d.ts +1 -1
- package/dist/fulfillments/create.js +5 -2
- package/dist/fulfillments/warehouse.d.ts +29 -17
- package/dist/fulfillments/warehouse.js +32 -1
- package/dist/index.d.ts +2 -1
- package/dist/pricing/exchange-rates.d.ts +91 -0
- package/dist/pricing/exchange-rates.js +60 -0
- package/dist/pricing/index.d.ts +6 -0
- package/dist/pricing/index.js +2 -0
- package/dist/purchasing/index.d.ts +2 -2
- package/dist/purchasing/index.js +5 -2
- package/dist/purchasing/links.d.ts +3 -3
- package/dist/purchasing/links.js +9 -4
- package/dist/purchasing/purchase-orders.d.ts +71 -27
- package/dist/purchasing/purchase-orders.js +99 -5
- package/dist/purchasing/replenishment.d.ts +2 -2
- package/dist/purchasing/replenishment.js +6 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pageFromVendureList, readOffsetCursor, } from '@sixtyninecommerce/core';
|
|
2
|
-
import { PURCHASE_ORDER_FIELDS } from './purchase-orders.js';
|
|
2
|
+
import { PURCHASE_ORDER_FIELDS, sentReferenceAware, withSentReferences, } from './purchase-orders.js';
|
|
3
3
|
export const REPLENISHMENT_RULE_FIELDS = /* GraphQL */ `
|
|
4
4
|
id
|
|
5
5
|
scopeId
|
|
@@ -135,7 +135,9 @@ function picked(input, fields) {
|
|
|
135
135
|
}
|
|
136
136
|
return out;
|
|
137
137
|
}
|
|
138
|
-
export function createPurchasingReplenishmentModule(
|
|
138
|
+
export function createPurchasingReplenishmentModule(baseTransport) {
|
|
139
|
+
// `suggestions.createDrafts` answers its drafts through PURCHASE_ORDER_FIELDS (`sentReference`).
|
|
140
|
+
const transport = sentReferenceAware(baseTransport);
|
|
139
141
|
const rulesPage = async (skip, take, options) => {
|
|
140
142
|
const filters = options ? picked(options, RULE_FILTERS) : {};
|
|
141
143
|
const data = await transport.graphql({
|
|
@@ -233,7 +235,8 @@ export function createPurchasingReplenishmentModule(transport) {
|
|
|
233
235
|
idempotencyKey: call?.idempotencyKey,
|
|
234
236
|
},
|
|
235
237
|
}, call);
|
|
236
|
-
|
|
238
|
+
const drafts = data.createReplenishmentDrafts;
|
|
239
|
+
return { ...drafts, purchaseOrders: drafts.purchaseOrders.map(withSentReferences) };
|
|
237
240
|
},
|
|
238
241
|
},
|
|
239
242
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sixtyninecommerce/admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Back-office SDK for sixtynine-commerce: every capability of the platform as a method",
|
|
5
5
|
"homepage": "https://github.com/SIXTYNINE-digital/sixtynine-commerce-engine/tree/main/packages/admin-client#readme",
|
|
6
6
|
"repository": {
|