@unchainedshop/api 3.0.0-rc7 → 3.0.0-rc8
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/lib/resolvers/type/delivery-provider-types.d.ts +0 -1
- package/lib/resolvers/type/delivery-provider-types.d.ts.map +1 -1
- package/lib/resolvers/type/delivery-provider-types.js +0 -2
- package/lib/resolvers/type/delivery-provider-types.js.map +1 -1
- package/lib/resolvers/type/index.d.ts +11 -42
- package/lib/resolvers/type/index.d.ts.map +1 -1
- package/lib/resolvers/type/index.js +0 -4
- package/lib/resolvers/type/index.js.map +1 -1
- package/lib/resolvers/type/order/order-delivery-discount-types.d.ts +2 -3
- package/lib/resolvers/type/order/order-delivery-discount-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-delivery-discount-types.js +1 -3
- package/lib/resolvers/type/order/order-delivery-discount-types.js.map +1 -1
- package/lib/resolvers/type/order/order-global-discount-types.d.ts +2 -3
- package/lib/resolvers/type/order/order-global-discount-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-global-discount-types.js +1 -3
- package/lib/resolvers/type/order/order-global-discount-types.js.map +1 -1
- package/lib/resolvers/type/order/order-item-discount-types.d.ts +2 -3
- package/lib/resolvers/type/order/order-item-discount-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-item-discount-types.js +1 -3
- package/lib/resolvers/type/order/order-item-discount-types.js.map +1 -1
- package/lib/resolvers/type/order/order-item-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-item-types.js +2 -11
- package/lib/resolvers/type/order/order-item-types.js.map +1 -1
- package/lib/resolvers/type/order/order-payment-discount-types.d.ts +2 -3
- package/lib/resolvers/type/order/order-payment-discount-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-payment-discount-types.js +1 -7
- package/lib/resolvers/type/order/order-payment-discount-types.js.map +1 -1
- package/lib/resolvers/type/order/order-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-types.js +2 -7
- package/lib/resolvers/type/order/order-types.js.map +1 -1
- package/lib/resolvers/type/payment/payment-provider-types.d.ts +0 -1
- package/lib/resolvers/type/payment/payment-provider-types.d.ts.map +1 -1
- package/lib/resolvers/type/payment/payment-provider-types.js +0 -2
- package/lib/resolvers/type/payment/payment-provider-types.js.map +1 -1
- package/lib/resolvers/type/price-types.d.ts +0 -1
- package/lib/resolvers/type/price-types.d.ts.map +1 -1
- package/lib/resolvers/type/price-types.js.map +1 -1
- package/lib/resolvers/type/product/product-configurable-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-configurable-types.js +2 -31
- package/lib/resolvers/type/product/product-configurable-types.js.map +1 -1
- package/lib/resolvers/type/product/product-discount.d.ts +2 -3
- package/lib/resolvers/type/product/product-discount.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-discount.js +2 -4
- package/lib/resolvers/type/product/product-discount.js.map +1 -1
- package/lib/resolvers/type/product/product-plan-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-plan-types.js +0 -2
- package/lib/resolvers/type/product/product-plan-types.js.map +1 -1
- package/lib/resolvers/type/product/product-simple-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-simple-types.js.map +1 -1
- package/lib/resolvers/type/product/product-tokenized-types.d.ts.map +1 -1
- package/lib/schema/inputTypes.d.ts.map +1 -1
- package/lib/schema/inputTypes.js +0 -1
- package/lib/schema/inputTypes.js.map +1 -1
- package/lib/schema/types/dispatch.d.ts.map +1 -1
- package/lib/schema/types/dispatch.js +0 -1
- package/lib/schema/types/dispatch.js.map +1 -1
- package/lib/schema/types/price.d.ts.map +1 -1
- package/lib/schema/types/price.js +0 -2
- package/lib/schema/types/price.js.map +1 -1
- package/lib/schema/types/stock.d.ts.map +1 -1
- package/lib/schema/types/stock.js +0 -1
- package/lib/schema/types/stock.js.map +1 -1
- package/package.json +6 -6
- package/src/resolvers/type/delivery-provider-types.ts +0 -3
- package/src/resolvers/type/index.ts +0 -4
- package/src/resolvers/type/order/order-delivery-discount-types.ts +1 -3
- package/src/resolvers/type/order/order-global-discount-types.ts +2 -3
- package/src/resolvers/type/order/order-item-discount-types.ts +1 -3
- package/src/resolvers/type/order/order-item-types.ts +3 -11
- package/src/resolvers/type/order/order-payment-discount-types.ts +2 -9
- package/src/resolvers/type/order/order-types.ts +3 -7
- package/src/resolvers/type/payment/payment-provider-types.ts +0 -2
- package/src/resolvers/type/price-types.ts +0 -1
- package/src/resolvers/type/product/product-configurable-types.ts +2 -39
- package/src/resolvers/type/product/product-discount.ts +2 -4
- package/src/resolvers/type/product/product-plan-types.ts +0 -4
- package/src/resolvers/type/product/product-simple-types.ts +0 -1
- package/src/schema/inputTypes.ts +0 -1
- package/src/schema/types/dispatch.ts +0 -1
- package/src/schema/types/price.ts +0 -2
- package/src/schema/types/stock.ts +0 -1
- package/src/resolvers/type/dispatch-types.ts +0 -27
- package/src/resolvers/type/stock-types.ts +0 -25
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
} from '@unchainedshop/core-products';
|
|
6
6
|
import { Context } from '../../../context.js';
|
|
7
7
|
import { Product } from './product-types.js';
|
|
8
|
-
import { sha256 } from '@unchainedshop/utils';
|
|
9
8
|
|
|
10
9
|
export const PlanProduct = {
|
|
11
10
|
...Product,
|
|
@@ -56,9 +55,6 @@ export const PlanProduct = {
|
|
|
56
55
|
const unitPrice = pricing.unitPrice({ useNetPrice });
|
|
57
56
|
|
|
58
57
|
return {
|
|
59
|
-
_id: await sha256(
|
|
60
|
-
[obj._id, countryContext, quantity, useNetPrice, user ? user._id : 'ANONYMOUS'].join(''),
|
|
61
|
-
),
|
|
62
58
|
...unitPrice,
|
|
63
59
|
isNetPrice: useNetPrice,
|
|
64
60
|
isTaxable: pricing.taxSum() > 0,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Product, ProductSupply } from '@unchainedshop/core-products';
|
|
2
|
-
import { WarehousingContext, WarehousingDirector } from '@unchainedshop/core';
|
|
3
2
|
import { Context } from '../../../context.js';
|
|
4
3
|
import { DeliveryProviderType } from '@unchainedshop/core-delivery';
|
|
5
4
|
import { DeliveryProvider } from '@unchainedshop/core-delivery';
|
package/src/schema/inputTypes.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export default [
|
|
2
2
|
/* GraphQL */ `
|
|
3
3
|
type Price @cacheControl(maxAge: 60) {
|
|
4
|
-
_id: ID!
|
|
5
4
|
isTaxable: Boolean!
|
|
6
5
|
isNetPrice: Boolean!
|
|
7
6
|
amount: Int!
|
|
@@ -9,7 +8,6 @@ export default [
|
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
type PriceRange @cacheControl(maxAge: 60) {
|
|
12
|
-
_id: ID!
|
|
13
11
|
minPrice: Price!
|
|
14
12
|
maxPrice: Price!
|
|
15
13
|
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { DeliveryProvider } from '@unchainedshop/core-delivery';
|
|
2
|
-
import { Product } from '@unchainedshop/core-products';
|
|
3
|
-
import { WarehousingProvider } from '@unchainedshop/core-warehousing';
|
|
4
|
-
import { sha256 } from '@unchainedshop/utils';
|
|
5
|
-
|
|
6
|
-
export const Dispatch = {
|
|
7
|
-
_id: async (params: {
|
|
8
|
-
product: Product;
|
|
9
|
-
deliveryProvider: DeliveryProvider;
|
|
10
|
-
warehousingProvider: WarehousingProvider;
|
|
11
|
-
referenceDate: Date;
|
|
12
|
-
quantity: number;
|
|
13
|
-
country: string;
|
|
14
|
-
userId?: string;
|
|
15
|
-
}) =>
|
|
16
|
-
await sha256(
|
|
17
|
-
[
|
|
18
|
-
params.product._id,
|
|
19
|
-
params.deliveryProvider._id,
|
|
20
|
-
params.warehousingProvider._id,
|
|
21
|
-
params.referenceDate,
|
|
22
|
-
params.quantity,
|
|
23
|
-
params.country,
|
|
24
|
-
params.userId || 'ANONYMOUS',
|
|
25
|
-
].join(''),
|
|
26
|
-
),
|
|
27
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { DeliveryProvider } from '@unchainedshop/core-delivery';
|
|
2
|
-
import { Product } from '@unchainedshop/core-products';
|
|
3
|
-
import { WarehousingProvider } from '@unchainedshop/core-warehousing';
|
|
4
|
-
import { sha256 } from '@unchainedshop/utils';
|
|
5
|
-
|
|
6
|
-
export const Stock = {
|
|
7
|
-
_id: async (params: {
|
|
8
|
-
product: Product;
|
|
9
|
-
deliveryProvider: DeliveryProvider;
|
|
10
|
-
warehousingProvider: WarehousingProvider;
|
|
11
|
-
referenceDate: Date;
|
|
12
|
-
country: string;
|
|
13
|
-
userId?: string;
|
|
14
|
-
}) =>
|
|
15
|
-
await sha256(
|
|
16
|
-
[
|
|
17
|
-
params.product._id,
|
|
18
|
-
params.deliveryProvider._id,
|
|
19
|
-
params.warehousingProvider._id,
|
|
20
|
-
params.referenceDate,
|
|
21
|
-
params.country,
|
|
22
|
-
params.userId || 'ANONYMOUS',
|
|
23
|
-
].join(''),
|
|
24
|
-
),
|
|
25
|
-
};
|