@labdigital/commercetools-mock 2.60.0 → 2.61.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/dist/{index.d.ts → index.d.mts} +154 -275
- package/dist/{index.js → index.mjs} +241 -349
- package/dist/index.mjs.map +1 -0
- package/package.json +30 -18
- package/src/config.ts +1 -1
- package/src/ctMock.test.ts +1 -1
- package/src/ctMock.ts +22 -21
- package/src/index.test.ts +1 -1
- package/src/index.ts +3 -3
- package/src/lib/haversine.test.ts +2 -2
- package/src/lib/masking.ts +1 -1
- package/src/lib/parser.ts +2 -2
- package/src/lib/password.ts +1 -1
- package/src/lib/predicateParser.test.ts +1 -1
- package/src/lib/predicateParser.ts +4 -4
- package/src/lib/product-review-statistics.test.ts +4 -8
- package/src/lib/productSearchFilter.test.ts +3 -3
- package/src/lib/productSearchFilter.ts +6 -6
- package/src/lib/projectionSearchFilter.test.ts +3 -3
- package/src/lib/projectionSearchFilter.ts +4 -4
- package/src/lib/review-statistics.ts +1 -1
- package/src/lib/searchQueryTypeChecker.test.ts +3 -3
- package/src/lib/searchQueryTypeChecker.ts +8 -4
- package/src/lib/tax.test.ts +3 -3
- package/src/lib/tax.ts +3 -3
- package/src/oauth/server.test.ts +7 -7
- package/src/oauth/server.ts +7 -7
- package/src/priceSelector.test.ts +1 -1
- package/src/priceSelector.ts +2 -2
- package/src/product-projection-search.ts +10 -12
- package/src/product-search-availability.test.ts +1 -1
- package/src/product-search.ts +6 -7
- package/src/projectAPI.test.ts +1 -1
- package/src/projectAPI.ts +7 -7
- package/src/repositories/abstract.ts +8 -10
- package/src/repositories/as-associate.test.ts +4 -4
- package/src/repositories/as-associate.ts +3 -3
- package/src/repositories/associate-role.ts +7 -9
- package/src/repositories/attribute-group.test.ts +3 -3
- package/src/repositories/attribute-group.ts +5 -5
- package/src/repositories/business-unit.test.ts +6 -6
- package/src/repositories/business-unit.ts +21 -23
- package/src/repositories/cart/actions.ts +12 -15
- package/src/repositories/cart/helpers.ts +5 -5
- package/src/repositories/cart/index.test.ts +5 -10
- package/src/repositories/cart/index.ts +13 -18
- package/src/repositories/cart-discount/actions.ts +5 -6
- package/src/repositories/cart-discount/index.ts +5 -5
- package/src/repositories/category/actions.ts +4 -4
- package/src/repositories/category/index.test.ts +3 -3
- package/src/repositories/category/index.ts +8 -8
- package/src/repositories/channel.test.ts +4 -4
- package/src/repositories/channel.ts +6 -6
- package/src/repositories/custom-object.ts +11 -8
- package/src/repositories/customer/actions.ts +9 -9
- package/src/repositories/customer/index.test.ts +3 -3
- package/src/repositories/customer/index.ts +12 -9
- package/src/repositories/customer-group.test.ts +4 -4
- package/src/repositories/customer-group.ts +6 -6
- package/src/repositories/discount-code/actions.ts +4 -4
- package/src/repositories/discount-code/index.ts +5 -5
- package/src/repositories/discount-group/actions.ts +3 -4
- package/src/repositories/discount-group/index.ts +4 -4
- package/src/repositories/errors.ts +1 -1
- package/src/repositories/extension.test.ts +3 -3
- package/src/repositories/extension.ts +6 -6
- package/src/repositories/helpers.ts +9 -12
- package/src/repositories/index.test.ts +3 -3
- package/src/repositories/index.ts +43 -43
- package/src/repositories/inventory-entry/actions.ts +15 -3
- package/src/repositories/inventory-entry/index.ts +5 -5
- package/src/repositories/my-customer.ts +5 -5
- package/src/repositories/my-order.ts +2 -2
- package/src/repositories/my-quote-request.ts +1 -1
- package/src/repositories/order/actions.ts +8 -9
- package/src/repositories/order/index.test.ts +8 -9
- package/src/repositories/order/index.ts +16 -17
- package/src/repositories/order-edit.ts +4 -4
- package/src/repositories/payment/actions.ts +6 -6
- package/src/repositories/payment/helpers.ts +3 -3
- package/src/repositories/payment/index.ts +7 -7
- package/src/repositories/product/actions.ts +7 -7
- package/src/repositories/product/helpers.ts +4 -4
- package/src/repositories/product/index.ts +13 -13
- package/src/repositories/product-discount.ts +9 -6
- package/src/repositories/product-projection.ts +7 -7
- package/src/repositories/product-selection.ts +9 -6
- package/src/repositories/product-tailoring.ts +6 -3
- package/src/repositories/product-type.ts +8 -5
- package/src/repositories/project.ts +5 -5
- package/src/repositories/quote/actions.ts +6 -6
- package/src/repositories/quote/index.ts +5 -5
- package/src/repositories/quote-request/actions.ts +6 -6
- package/src/repositories/quote-request/index.test.ts +3 -3
- package/src/repositories/quote-request/index.ts +5 -5
- package/src/repositories/quote-staged/actions.ts +6 -6
- package/src/repositories/quote-staged/index.ts +5 -5
- package/src/repositories/recurrence-policy/actions.ts +3 -3
- package/src/repositories/recurrence-policy/index.ts +4 -8
- package/src/repositories/recurring-order/actions.ts +3 -3
- package/src/repositories/recurring-order/index.ts +5 -5
- package/src/repositories/review.test.ts +5 -5
- package/src/repositories/review.ts +10 -9
- package/src/repositories/shipping-method/actions.ts +7 -9
- package/src/repositories/shipping-method/helpers.ts +1 -1
- package/src/repositories/shipping-method/index.ts +8 -8
- package/src/repositories/shopping-list/actions.ts +5 -5
- package/src/repositories/shopping-list/index.ts +7 -7
- package/src/repositories/standalone-price.ts +9 -6
- package/src/repositories/state.ts +9 -6
- package/src/repositories/store.ts +10 -7
- package/src/repositories/subscription.test.ts +3 -3
- package/src/repositories/subscription.ts +9 -6
- package/src/repositories/tax-category/actions.ts +4 -4
- package/src/repositories/tax-category/index.ts +6 -6
- package/src/repositories/type/actions.ts +4 -4
- package/src/repositories/type/index.ts +5 -5
- package/src/repositories/zone.test.ts +3 -3
- package/src/repositories/zone.ts +8 -5
- package/src/server.ts +4 -3
- package/src/services/abstract.ts +5 -5
- package/src/services/as-associate-cart.test.ts +1 -1
- package/src/services/as-associate-cart.ts +2 -2
- package/src/services/as-associate-order.test.ts +1 -1
- package/src/services/as-associate-order.ts +2 -2
- package/src/services/as-associate-quote-request.ts +2 -3
- package/src/services/as-associate.test.ts +1 -1
- package/src/services/as-associate.ts +4 -4
- package/src/services/associate-roles.test.ts +1 -1
- package/src/services/associate-roles.ts +2 -2
- package/src/services/attribute-group.test.ts +1 -1
- package/src/services/attribute-group.ts +2 -2
- package/src/services/business-units.test.ts +5 -5
- package/src/services/business-units.ts +2 -2
- package/src/services/cart-discount.ts +2 -2
- package/src/services/cart.test.ts +2 -2
- package/src/services/cart.ts +4 -5
- package/src/services/category.test.ts +1 -1
- package/src/services/category.ts +2 -2
- package/src/services/channel.test.ts +1 -1
- package/src/services/channel.ts +2 -2
- package/src/services/custom-object.test.ts +2 -2
- package/src/services/custom-object.ts +3 -3
- package/src/services/customer-group.test.ts +1 -1
- package/src/services/customer-group.ts +2 -2
- package/src/services/customer.test.ts +3 -3
- package/src/services/customer.ts +4 -5
- package/src/services/discount-code.test.ts +1 -1
- package/src/services/discount-code.ts +2 -2
- package/src/services/discount-group.test.ts +1 -1
- package/src/services/discount-group.ts +2 -2
- package/src/services/extension.test.ts +1 -1
- package/src/services/extension.ts +2 -2
- package/src/services/index.ts +44 -44
- package/src/services/inventory-entry.test.ts +16 -1
- package/src/services/inventory-entry.ts +2 -2
- package/src/services/my-business-unit.test.ts +1 -1
- package/src/services/my-business-unit.ts +2 -2
- package/src/services/my-cart.test.ts +1 -1
- package/src/services/my-cart.ts +2 -2
- package/src/services/my-customer.test.ts +2 -2
- package/src/services/my-customer.ts +6 -6
- package/src/services/my-order.ts +2 -2
- package/src/services/my-payment.test.ts +1 -1
- package/src/services/my-payment.ts +2 -2
- package/src/services/my-shopping-list.ts +2 -2
- package/src/services/order.test.ts +4 -11
- package/src/services/order.ts +4 -4
- package/src/services/payment.test.ts +1 -1
- package/src/services/payment.ts +2 -2
- package/src/services/product-discount.test.ts +1 -1
- package/src/services/product-discount.ts +2 -2
- package/src/services/product-projection.test.ts +2 -2
- package/src/services/product-projection.ts +4 -4
- package/src/services/product-selection.test.ts +1 -1
- package/src/services/product-selection.ts +2 -2
- package/src/services/product-type.test.ts +1 -1
- package/src/services/product-type.ts +2 -2
- package/src/services/product.test.ts +1 -1
- package/src/services/product.ts +3 -3
- package/src/services/project.test.ts +1 -1
- package/src/services/project.ts +4 -4
- package/src/services/quote-request.test.ts +2 -2
- package/src/services/quote-request.ts +2 -2
- package/src/services/quote-staged.ts +2 -2
- package/src/services/quote.ts +2 -2
- package/src/services/recurrence-policy.test.ts +1 -1
- package/src/services/recurrence-policy.ts +2 -2
- package/src/services/recurring-order.test.ts +1 -1
- package/src/services/recurring-order.ts +2 -2
- package/src/services/reviews.test.ts +1 -1
- package/src/services/reviews.ts +2 -2
- package/src/services/shipping-method.test.ts +2 -2
- package/src/services/shipping-method.ts +4 -4
- package/src/services/shopping-list.test.ts +1 -1
- package/src/services/shopping-list.ts +2 -2
- package/src/services/standalone-price.test.ts +1 -1
- package/src/services/standalone-price.ts +2 -2
- package/src/services/state.test.ts +1 -1
- package/src/services/state.ts +2 -2
- package/src/services/store.test.ts +1 -1
- package/src/services/store.ts +2 -2
- package/src/services/subscription.test.ts +1 -1
- package/src/services/subscription.ts +2 -2
- package/src/services/tax-category.test.ts +1 -1
- package/src/services/tax-category.ts +2 -2
- package/src/services/type.test.ts +1 -1
- package/src/services/type.ts +2 -2
- package/src/services/zone.test.ts +1 -1
- package/src/services/zone.ts +2 -2
- package/src/shipping.test.ts +1 -1
- package/src/shipping.ts +8 -8
- package/src/storage/abstract.ts +1 -1
- package/src/storage/in-memory.ts +15 -17
- package/src/storage/index.ts +2 -2
- package/src/testing/business-unit.ts +1 -2
- package/src/testing/customer.ts +1 -1
- package/src/testing/type.ts +1 -1
- package/src/types.ts +1 -1
- package/src/validate.ts +1 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -2,14 +2,11 @@ import assert from "node:assert";
|
|
|
2
2
|
import type {
|
|
3
3
|
Cart,
|
|
4
4
|
CartReference,
|
|
5
|
-
CentPrecisionMoney,
|
|
6
5
|
CustomLineItem,
|
|
7
6
|
CustomLineItemImportDraft,
|
|
8
7
|
GeneralError,
|
|
9
|
-
InvalidOperationError,
|
|
10
8
|
LineItem,
|
|
11
9
|
LineItemImportDraft,
|
|
12
|
-
MissingTaxRateForCountryError,
|
|
13
10
|
Order,
|
|
14
11
|
OrderFromCartDraft,
|
|
15
12
|
OrderImportDraft,
|
|
@@ -19,21 +16,24 @@ import type {
|
|
|
19
16
|
ShippingInfo,
|
|
20
17
|
ShippingMethodDoesNotMatchCartError,
|
|
21
18
|
ShippingMethodReference,
|
|
22
|
-
TaxPortion,
|
|
23
|
-
TaxedItemPrice,
|
|
24
19
|
} from "@commercetools/platform-sdk";
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
import type { Config } from "#src/config.ts";
|
|
21
|
+
import { CommercetoolsError } from "#src/exceptions.ts";
|
|
22
|
+
import {
|
|
23
|
+
generateRandomString,
|
|
24
|
+
getBaseResourceProperties,
|
|
25
|
+
} from "#src/helpers.ts";
|
|
26
|
+
import {
|
|
27
|
+
calculateTaxedPriceFromRate,
|
|
28
|
+
calculateTaxTotals,
|
|
29
|
+
} from "#src/lib/tax.ts";
|
|
30
30
|
import {
|
|
31
31
|
createShippingInfoFromMethod,
|
|
32
32
|
getShippingMethodsMatchingCart,
|
|
33
|
-
} from "
|
|
34
|
-
import type { Writable } from "
|
|
35
|
-
import type { RepositoryContext } from "../abstract";
|
|
36
|
-
import { AbstractResourceRepository, type QueryParams } from "../abstract";
|
|
33
|
+
} from "#src/shipping.ts";
|
|
34
|
+
import type { Writable } from "#src/types.ts";
|
|
35
|
+
import type { RepositoryContext } from "../abstract.ts";
|
|
36
|
+
import { AbstractResourceRepository, type QueryParams } from "../abstract.ts";
|
|
37
37
|
import {
|
|
38
38
|
createAddress,
|
|
39
39
|
createCentPrecisionMoney,
|
|
@@ -41,9 +41,8 @@ import {
|
|
|
41
41
|
createPrice,
|
|
42
42
|
createTypedMoney,
|
|
43
43
|
resolveStoreReference,
|
|
44
|
-
|
|
45
|
-
} from "
|
|
46
|
-
import { OrderUpdateHandler } from "./actions";
|
|
44
|
+
} from "../helpers.ts";
|
|
45
|
+
import { OrderUpdateHandler } from "./actions.ts";
|
|
47
46
|
|
|
48
47
|
export class OrderRepository extends AbstractResourceRepository<"order"> {
|
|
49
48
|
constructor(config: Config) {
|
|
@@ -3,10 +3,10 @@ import type {
|
|
|
3
3
|
OrderEditDraft,
|
|
4
4
|
OrderEditResult,
|
|
5
5
|
} from "@commercetools/platform-sdk";
|
|
6
|
-
import type { Config } from "
|
|
7
|
-
import { getBaseResourceProperties } from "../helpers";
|
|
8
|
-
import type { RepositoryContext } from "./abstract";
|
|
9
|
-
import { AbstractResourceRepository } from "./abstract";
|
|
6
|
+
import type { Config } from "#src/config.ts";
|
|
7
|
+
import { getBaseResourceProperties } from "../helpers.ts";
|
|
8
|
+
import type { RepositoryContext } from "./abstract.ts";
|
|
9
|
+
import { AbstractResourceRepository } from "./abstract.ts";
|
|
10
10
|
|
|
11
11
|
export class OrderEditRepository extends AbstractResourceRepository<"order-edit"> {
|
|
12
12
|
constructor(config: Config) {
|
|
@@ -8,9 +8,9 @@ import type {
|
|
|
8
8
|
PaymentChangeTransactionStateAction,
|
|
9
9
|
PaymentChangeTransactionTimestampAction,
|
|
10
10
|
PaymentSetAnonymousIdAction,
|
|
11
|
+
PaymentSetCustomerAction,
|
|
11
12
|
PaymentSetCustomFieldAction,
|
|
12
13
|
PaymentSetCustomTypeAction,
|
|
13
|
-
PaymentSetCustomerAction,
|
|
14
14
|
PaymentSetInterfaceIdAction,
|
|
15
15
|
PaymentSetKeyAction,
|
|
16
16
|
PaymentSetMethodInfoAction,
|
|
@@ -30,15 +30,15 @@ import type {
|
|
|
30
30
|
State,
|
|
31
31
|
Transaction,
|
|
32
32
|
} from "@commercetools/platform-sdk";
|
|
33
|
-
import type { Writable } from "
|
|
34
|
-
import type { RepositoryContext, UpdateHandlerInterface } from "../abstract";
|
|
35
|
-
import { AbstractUpdateHandler } from "../abstract";
|
|
33
|
+
import type { Writable } from "#src/types.ts";
|
|
34
|
+
import type { RepositoryContext, UpdateHandlerInterface } from "../abstract.ts";
|
|
35
|
+
import { AbstractUpdateHandler } from "../abstract.ts";
|
|
36
36
|
import {
|
|
37
37
|
createCentPrecisionMoney,
|
|
38
38
|
createCustomFields,
|
|
39
39
|
getReferenceFromResourceIdentifier,
|
|
40
|
-
} from "../helpers";
|
|
41
|
-
import { transactionFromTransactionDraft } from "./helpers";
|
|
40
|
+
} from "../helpers.ts";
|
|
41
|
+
import { transactionFromTransactionDraft } from "./helpers.ts";
|
|
42
42
|
|
|
43
43
|
export class PaymentUpdateHandler
|
|
44
44
|
extends AbstractUpdateHandler
|
|
@@ -3,9 +3,9 @@ import type {
|
|
|
3
3
|
TransactionDraft,
|
|
4
4
|
} from "@commercetools/platform-sdk";
|
|
5
5
|
import { v4 as uuidv4 } from "uuid";
|
|
6
|
-
import type { AbstractStorage } from "
|
|
7
|
-
import type { RepositoryContext } from "../abstract";
|
|
8
|
-
import { createCentPrecisionMoney, createCustomFields } from "../helpers";
|
|
6
|
+
import type { AbstractStorage } from "#src/storage/index.ts";
|
|
7
|
+
import type { RepositoryContext } from "../abstract.ts";
|
|
8
|
+
import { createCentPrecisionMoney, createCustomFields } from "../helpers.ts";
|
|
9
9
|
|
|
10
10
|
export const transactionFromTransactionDraft = (
|
|
11
11
|
context: RepositoryContext,
|
|
@@ -3,17 +3,17 @@ import type {
|
|
|
3
3
|
PaymentDraft,
|
|
4
4
|
StateReference,
|
|
5
5
|
} from "@commercetools/platform-sdk";
|
|
6
|
-
import type { Config } from "
|
|
7
|
-
import { getBaseResourceProperties } from "
|
|
8
|
-
import type { RepositoryContext } from "../abstract";
|
|
9
|
-
import { AbstractResourceRepository } from "../abstract";
|
|
6
|
+
import type { Config } from "#src/config.ts";
|
|
7
|
+
import { getBaseResourceProperties } from "#src/helpers.ts";
|
|
8
|
+
import type { RepositoryContext } from "../abstract.ts";
|
|
9
|
+
import { AbstractResourceRepository } from "../abstract.ts";
|
|
10
10
|
import {
|
|
11
11
|
createCentPrecisionMoney,
|
|
12
12
|
createCustomFields,
|
|
13
13
|
getReferenceFromResourceIdentifier,
|
|
14
|
-
} from "../helpers";
|
|
15
|
-
import { PaymentUpdateHandler } from "./actions";
|
|
16
|
-
import { transactionFromTransactionDraft } from "./helpers";
|
|
14
|
+
} from "../helpers.ts";
|
|
15
|
+
import { PaymentUpdateHandler } from "./actions.ts";
|
|
16
|
+
import { transactionFromTransactionDraft } from "./helpers.ts";
|
|
17
17
|
|
|
18
18
|
export class PaymentRepository extends AbstractResourceRepository<"payment"> {
|
|
19
19
|
constructor(config: Config) {
|
|
@@ -35,19 +35,19 @@ import type {
|
|
|
35
35
|
StateReference,
|
|
36
36
|
TaxCategoryReference,
|
|
37
37
|
} from "@commercetools/platform-sdk";
|
|
38
|
-
import { CommercetoolsError } from "
|
|
39
|
-
import type { Writable } from "
|
|
40
|
-
import { AbstractUpdateHandler, type RepositoryContext } from "../abstract";
|
|
38
|
+
import { CommercetoolsError } from "#src/exceptions.ts";
|
|
39
|
+
import type { Writable } from "#src/types.ts";
|
|
40
|
+
import { AbstractUpdateHandler, type RepositoryContext } from "../abstract.ts";
|
|
41
41
|
import {
|
|
42
42
|
createCustomFields,
|
|
43
43
|
getReferenceFromResourceIdentifier,
|
|
44
|
-
} from "../helpers";
|
|
44
|
+
} from "../helpers.ts";
|
|
45
45
|
import {
|
|
46
46
|
checkForStagedChanges,
|
|
47
47
|
getVariant,
|
|
48
48
|
priceFromDraft,
|
|
49
49
|
variantFromDraft,
|
|
50
|
-
} from "./helpers";
|
|
50
|
+
} from "./helpers.ts";
|
|
51
51
|
|
|
52
52
|
type ProductUpdateHandlerMethod<T> = (
|
|
53
53
|
context: RepositoryContext,
|
|
@@ -944,7 +944,7 @@ export class ProductUpdateHandler
|
|
|
944
944
|
resource: Writable<Product>,
|
|
945
945
|
{ taxCategory }: ProductSetTaxCategoryAction,
|
|
946
946
|
) {
|
|
947
|
-
let taxCategoryReference: TaxCategoryReference | undefined
|
|
947
|
+
let taxCategoryReference: TaxCategoryReference | undefined;
|
|
948
948
|
if (taxCategory) {
|
|
949
949
|
taxCategoryReference =
|
|
950
950
|
getReferenceFromResourceIdentifier<TaxCategoryReference>(
|
|
@@ -972,7 +972,7 @@ export class ProductUpdateHandler
|
|
|
972
972
|
resource: Writable<Product>,
|
|
973
973
|
{ state, force }: ProductTransitionStateAction,
|
|
974
974
|
) {
|
|
975
|
-
let productStateReference: StateReference | undefined
|
|
975
|
+
let productStateReference: StateReference | undefined;
|
|
976
976
|
if (state) {
|
|
977
977
|
productStateReference =
|
|
978
978
|
getReferenceFromResourceIdentifier<StateReference>(
|
|
@@ -11,14 +11,14 @@ import type {
|
|
|
11
11
|
ProductVariantDraft,
|
|
12
12
|
} from "@commercetools/platform-sdk";
|
|
13
13
|
import { v4 as uuidv4 } from "uuid";
|
|
14
|
-
import type { AbstractStorage } from "
|
|
15
|
-
import type { Writable } from "
|
|
16
|
-
import type { RepositoryContext } from "../abstract";
|
|
14
|
+
import type { AbstractStorage } from "#src/storage/index.ts";
|
|
15
|
+
import type { Writable } from "#src/types.ts";
|
|
16
|
+
import type { RepositoryContext } from "../abstract.ts";
|
|
17
17
|
import {
|
|
18
18
|
createCustomFields,
|
|
19
19
|
createTypedMoney,
|
|
20
20
|
getReferenceFromResourceIdentifier,
|
|
21
|
-
} from "../helpers";
|
|
21
|
+
} from "../helpers.ts";
|
|
22
22
|
|
|
23
23
|
interface VariantResult {
|
|
24
24
|
variant: Writable<ProductVariant> | undefined;
|
|
@@ -10,16 +10,16 @@ import type {
|
|
|
10
10
|
StateReference,
|
|
11
11
|
TaxCategoryReference,
|
|
12
12
|
} from "@commercetools/platform-sdk";
|
|
13
|
-
import type { Config } from "
|
|
14
|
-
import { CommercetoolsError } from "
|
|
15
|
-
import { getBaseResourceProperties } from "
|
|
16
|
-
import { ReviewStatisticsService } from "
|
|
17
|
-
import { ProductSearch } from "
|
|
18
|
-
import type { GetParams, RepositoryContext } from "../abstract";
|
|
19
|
-
import { AbstractResourceRepository } from "../abstract";
|
|
20
|
-
import { getReferenceFromResourceIdentifier } from "../helpers";
|
|
21
|
-
import { ProductUpdateHandler } from "./actions";
|
|
22
|
-
import { variantFromDraft } from "./helpers";
|
|
13
|
+
import type { Config } from "#src/config.ts";
|
|
14
|
+
import { CommercetoolsError } from "#src/exceptions.ts";
|
|
15
|
+
import { getBaseResourceProperties } from "#src/helpers.ts";
|
|
16
|
+
import { ReviewStatisticsService } from "#src/lib/review-statistics.ts";
|
|
17
|
+
import { ProductSearch } from "#src/product-search.ts";
|
|
18
|
+
import type { GetParams, RepositoryContext } from "../abstract.ts";
|
|
19
|
+
import { AbstractResourceRepository } from "../abstract.ts";
|
|
20
|
+
import { getReferenceFromResourceIdentifier } from "../helpers.ts";
|
|
21
|
+
import { ProductUpdateHandler } from "./actions.ts";
|
|
22
|
+
import { variantFromDraft } from "./helpers.ts";
|
|
23
23
|
|
|
24
24
|
export class ProductRepository extends AbstractResourceRepository<"product"> {
|
|
25
25
|
protected _searchService: ProductSearch;
|
|
@@ -37,7 +37,7 @@ export class ProductRepository extends AbstractResourceRepository<"product"> {
|
|
|
37
37
|
throw new Error("Missing master variant");
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
let productType: ProductTypeReference | undefined
|
|
40
|
+
let productType: ProductTypeReference | undefined;
|
|
41
41
|
try {
|
|
42
42
|
productType = getReferenceFromResourceIdentifier<ProductTypeReference>(
|
|
43
43
|
draft.productType,
|
|
@@ -83,7 +83,7 @@ export class ProductRepository extends AbstractResourceRepository<"product"> {
|
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
// Resolve Tax category
|
|
86
|
-
let taxCategoryReference: TaxCategoryReference | undefined
|
|
86
|
+
let taxCategoryReference: TaxCategoryReference | undefined;
|
|
87
87
|
if (draft.taxCategory) {
|
|
88
88
|
taxCategoryReference =
|
|
89
89
|
getReferenceFromResourceIdentifier<TaxCategoryReference>(
|
|
@@ -94,7 +94,7 @@ export class ProductRepository extends AbstractResourceRepository<"product"> {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
// Resolve Product State
|
|
97
|
-
let productStateReference: StateReference | undefined
|
|
97
|
+
let productStateReference: StateReference | undefined;
|
|
98
98
|
if (draft.state) {
|
|
99
99
|
productStateReference =
|
|
100
100
|
getReferenceFromResourceIdentifier<StateReference>(
|
|
@@ -18,12 +18,15 @@ import type {
|
|
|
18
18
|
ProductDiscountValueExternal,
|
|
19
19
|
ProductDiscountValueRelative,
|
|
20
20
|
} from "@commercetools/platform-sdk";
|
|
21
|
-
import type { Config } from "
|
|
22
|
-
import { getBaseResourceProperties } from "../helpers";
|
|
23
|
-
import type { Writable } from "../types";
|
|
24
|
-
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract";
|
|
25
|
-
import {
|
|
26
|
-
|
|
21
|
+
import type { Config } from "#src/config.ts";
|
|
22
|
+
import { getBaseResourceProperties } from "../helpers.ts";
|
|
23
|
+
import type { Writable } from "../types.ts";
|
|
24
|
+
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract.ts";
|
|
25
|
+
import {
|
|
26
|
+
AbstractResourceRepository,
|
|
27
|
+
AbstractUpdateHandler,
|
|
28
|
+
} from "./abstract.ts";
|
|
29
|
+
import { createTypedMoney } from "./helpers.ts";
|
|
27
30
|
|
|
28
31
|
export class ProductDiscountRepository extends AbstractResourceRepository<"product-discount"> {
|
|
29
32
|
constructor(config: Config) {
|
|
@@ -4,13 +4,13 @@ import type {
|
|
|
4
4
|
ProductProjection,
|
|
5
5
|
QueryParam,
|
|
6
6
|
} from "@commercetools/platform-sdk";
|
|
7
|
-
import type { Config } from "
|
|
8
|
-
import { CommercetoolsError } from "
|
|
9
|
-
import { parseQueryExpression } from "../lib/predicateParser";
|
|
10
|
-
import { applyPriceSelector } from "../priceSelector";
|
|
11
|
-
import { ProductProjectionSearch } from "../product-projection-search";
|
|
12
|
-
import type { GetParams, RepositoryContext } from "./abstract";
|
|
13
|
-
import { AbstractResourceRepository } from "./abstract";
|
|
7
|
+
import type { Config } from "#src/config.ts";
|
|
8
|
+
import { CommercetoolsError } from "#src/exceptions.ts";
|
|
9
|
+
import { parseQueryExpression } from "../lib/predicateParser.ts";
|
|
10
|
+
import { applyPriceSelector } from "../priceSelector.ts";
|
|
11
|
+
import { ProductProjectionSearch } from "../product-projection-search.ts";
|
|
12
|
+
import type { GetParams, RepositoryContext } from "./abstract.ts";
|
|
13
|
+
import { AbstractResourceRepository } from "./abstract.ts";
|
|
14
14
|
|
|
15
15
|
export type ProductProjectionQueryParams = {
|
|
16
16
|
staged?: boolean;
|
|
@@ -5,12 +5,15 @@ import type {
|
|
|
5
5
|
ProductSelectionSetCustomTypeAction,
|
|
6
6
|
ProductSelectionUpdateAction,
|
|
7
7
|
} from "@commercetools/platform-sdk";
|
|
8
|
-
import type { Config } from "
|
|
9
|
-
import { createCustomFields } from "
|
|
10
|
-
import { getBaseResourceProperties } from "../helpers";
|
|
11
|
-
import type { Writable } from "../types";
|
|
12
|
-
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract";
|
|
13
|
-
import {
|
|
8
|
+
import type { Config } from "#src/config.ts";
|
|
9
|
+
import { createCustomFields } from "#src/repositories/helpers.ts";
|
|
10
|
+
import { getBaseResourceProperties } from "../helpers.ts";
|
|
11
|
+
import type { Writable } from "../types.ts";
|
|
12
|
+
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract.ts";
|
|
13
|
+
import {
|
|
14
|
+
AbstractResourceRepository,
|
|
15
|
+
AbstractUpdateHandler,
|
|
16
|
+
} from "./abstract.ts";
|
|
14
17
|
|
|
15
18
|
export class ProductSelectionRepository extends AbstractResourceRepository<"product-selection"> {
|
|
16
19
|
constructor(config: Config) {
|
|
@@ -2,9 +2,12 @@ import type {
|
|
|
2
2
|
ProductTailoring,
|
|
3
3
|
ProductTailoringUpdateAction,
|
|
4
4
|
} from "@commercetools/platform-sdk";
|
|
5
|
-
import type { Config } from "
|
|
6
|
-
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract";
|
|
7
|
-
import {
|
|
5
|
+
import type { Config } from "#src/config.ts";
|
|
6
|
+
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract.ts";
|
|
7
|
+
import {
|
|
8
|
+
AbstractResourceRepository,
|
|
9
|
+
AbstractUpdateHandler,
|
|
10
|
+
} from "./abstract.ts";
|
|
8
11
|
|
|
9
12
|
export class ProductTailoringRepository extends AbstractResourceRepository<"product-tailoring"> {
|
|
10
13
|
constructor(config: Config) {
|
|
@@ -12,11 +12,14 @@ import type {
|
|
|
12
12
|
ProductTypeRemoveEnumValuesAction,
|
|
13
13
|
ProductTypeUpdateAction,
|
|
14
14
|
} from "@commercetools/platform-sdk";
|
|
15
|
-
import type { Config } from "
|
|
16
|
-
import { getBaseResourceProperties } from "../helpers";
|
|
17
|
-
import type { Writable } from "../types";
|
|
18
|
-
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract";
|
|
19
|
-
import {
|
|
15
|
+
import type { Config } from "#src/config.ts";
|
|
16
|
+
import { getBaseResourceProperties } from "../helpers.ts";
|
|
17
|
+
import type { Writable } from "../types.ts";
|
|
18
|
+
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract.ts";
|
|
19
|
+
import {
|
|
20
|
+
AbstractResourceRepository,
|
|
21
|
+
AbstractUpdateHandler,
|
|
22
|
+
} from "./abstract.ts";
|
|
20
23
|
|
|
21
24
|
export class ProductTypeRepository extends AbstractResourceRepository<"product-type"> {
|
|
22
25
|
constructor(config: Config) {
|
|
@@ -20,11 +20,11 @@ import type {
|
|
|
20
20
|
ProjectUpdateAction,
|
|
21
21
|
} from "@commercetools/platform-sdk";
|
|
22
22
|
import type { ProjectSetBusinessUnitAssociateRoleOnCreationAction } from "@commercetools/platform-sdk/dist/declarations/src/generated/models/project";
|
|
23
|
-
import type { Config } from "
|
|
24
|
-
import { maskSecretValue } from "../lib/masking";
|
|
25
|
-
import type { Writable } from "../types";
|
|
26
|
-
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract";
|
|
27
|
-
import { AbstractRepository, AbstractUpdateHandler } from "./abstract";
|
|
23
|
+
import type { Config } from "#src/config.ts";
|
|
24
|
+
import { maskSecretValue } from "../lib/masking.ts";
|
|
25
|
+
import type { Writable } from "../types.ts";
|
|
26
|
+
import type { RepositoryContext, UpdateHandlerInterface } from "./abstract.ts";
|
|
27
|
+
import { AbstractRepository, AbstractUpdateHandler } from "./abstract.ts";
|
|
28
28
|
|
|
29
29
|
export class ProjectRepository extends AbstractRepository<Project> {
|
|
30
30
|
constructor(config: Config) {
|
|
@@ -7,11 +7,11 @@ import type {
|
|
|
7
7
|
QuoteUpdateAction,
|
|
8
8
|
StateReference,
|
|
9
9
|
} from "@commercetools/platform-sdk";
|
|
10
|
-
import { CommercetoolsError } from "
|
|
11
|
-
import type { Writable } from "
|
|
12
|
-
import type { RepositoryContext, UpdateHandlerInterface } from "../abstract";
|
|
13
|
-
import { AbstractUpdateHandler } from "../abstract";
|
|
14
|
-
import { getReferenceFromResourceIdentifier } from "../helpers";
|
|
10
|
+
import { CommercetoolsError } from "#src/exceptions.ts";
|
|
11
|
+
import type { Writable } from "#src/types.ts";
|
|
12
|
+
import type { RepositoryContext, UpdateHandlerInterface } from "../abstract.ts";
|
|
13
|
+
import { AbstractUpdateHandler } from "../abstract.ts";
|
|
14
|
+
import { getReferenceFromResourceIdentifier } from "../helpers.ts";
|
|
15
15
|
|
|
16
16
|
export class QuoteUpdateHandler
|
|
17
17
|
extends AbstractUpdateHandler
|
|
@@ -59,7 +59,7 @@ export class QuoteUpdateHandler
|
|
|
59
59
|
resource: Writable<Quote>,
|
|
60
60
|
{ state, force }: QuoteTransitionStateAction,
|
|
61
61
|
) {
|
|
62
|
-
let stateReference: StateReference | undefined
|
|
62
|
+
let stateReference: StateReference | undefined;
|
|
63
63
|
if (state) {
|
|
64
64
|
stateReference = getReferenceFromResourceIdentifier<StateReference>(
|
|
65
65
|
state,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Quote, QuoteDraft } from "@commercetools/platform-sdk";
|
|
2
|
-
import type { Config } from "
|
|
3
|
-
import { getBaseResourceProperties } from "
|
|
4
|
-
import type { RepositoryContext } from "../abstract";
|
|
5
|
-
import { AbstractResourceRepository } from "../abstract";
|
|
6
|
-
import { QuoteUpdateHandler } from "./actions";
|
|
2
|
+
import type { Config } from "#src/config.ts";
|
|
3
|
+
import { getBaseResourceProperties } from "#src/helpers.ts";
|
|
4
|
+
import type { RepositoryContext } from "../abstract.ts";
|
|
5
|
+
import { AbstractResourceRepository } from "../abstract.ts";
|
|
6
|
+
import { QuoteUpdateHandler } from "./actions.ts";
|
|
7
7
|
|
|
8
8
|
export class QuoteRepository extends AbstractResourceRepository<"quote"> {
|
|
9
9
|
constructor(config: Config) {
|
|
@@ -7,11 +7,11 @@ import type {
|
|
|
7
7
|
QuoteRequestUpdateAction,
|
|
8
8
|
StateReference,
|
|
9
9
|
} from "@commercetools/platform-sdk";
|
|
10
|
-
import { CommercetoolsError } from "
|
|
11
|
-
import type { Writable } from "
|
|
12
|
-
import type { RepositoryContext, UpdateHandlerInterface } from "../abstract";
|
|
13
|
-
import { AbstractUpdateHandler } from "../abstract";
|
|
14
|
-
import { getReferenceFromResourceIdentifier } from "../helpers";
|
|
10
|
+
import { CommercetoolsError } from "#src/exceptions.ts";
|
|
11
|
+
import type { Writable } from "#src/types.ts";
|
|
12
|
+
import type { RepositoryContext, UpdateHandlerInterface } from "../abstract.ts";
|
|
13
|
+
import { AbstractUpdateHandler } from "../abstract.ts";
|
|
14
|
+
import { getReferenceFromResourceIdentifier } from "../helpers.ts";
|
|
15
15
|
|
|
16
16
|
export class QuoteRequestUpdateHandler
|
|
17
17
|
extends AbstractUpdateHandler
|
|
@@ -60,7 +60,7 @@ export class QuoteRequestUpdateHandler
|
|
|
60
60
|
resource: Writable<QuoteRequest>,
|
|
61
61
|
{ state, force }: QuoteRequestTransitionStateAction,
|
|
62
62
|
) {
|
|
63
|
-
let stateReference: StateReference | undefined
|
|
63
|
+
let stateReference: StateReference | undefined;
|
|
64
64
|
if (state) {
|
|
65
65
|
stateReference = getReferenceFromResourceIdentifier<StateReference>(
|
|
66
66
|
state,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Cart, LineItem } from "@commercetools/platform-sdk";
|
|
2
2
|
import { describe, expect, test } from "vitest";
|
|
3
|
-
import type { Config } from "
|
|
4
|
-
import { InMemoryStorage } from "
|
|
5
|
-
import { QuoteRequestRepository } from ".";
|
|
3
|
+
import type { Config } from "#src/config.ts";
|
|
4
|
+
import { InMemoryStorage } from "#src/storage/index.ts";
|
|
5
|
+
import { QuoteRequestRepository } from "./index.ts";
|
|
6
6
|
|
|
7
7
|
describe("QuoteRequest repository", () => {
|
|
8
8
|
const storage = new InMemoryStorage();
|
|
@@ -6,11 +6,11 @@ import type {
|
|
|
6
6
|
QuoteRequest,
|
|
7
7
|
QuoteRequestDraft,
|
|
8
8
|
} from "@commercetools/platform-sdk";
|
|
9
|
-
import type { Config } from "
|
|
10
|
-
import { getBaseResourceProperties } from "
|
|
11
|
-
import type { RepositoryContext } from "../abstract";
|
|
12
|
-
import { AbstractResourceRepository } from "../abstract";
|
|
13
|
-
import { QuoteRequestUpdateHandler } from "./actions";
|
|
9
|
+
import type { Config } from "#src/config.ts";
|
|
10
|
+
import { getBaseResourceProperties } from "#src/helpers.ts";
|
|
11
|
+
import type { RepositoryContext } from "../abstract.ts";
|
|
12
|
+
import { AbstractResourceRepository } from "../abstract.ts";
|
|
13
|
+
import { QuoteRequestUpdateHandler } from "./actions.ts";
|
|
14
14
|
|
|
15
15
|
export class QuoteRequestRepository extends AbstractResourceRepository<"quote-request"> {
|
|
16
16
|
constructor(config: Config) {
|
|
@@ -7,11 +7,11 @@ import type {
|
|
|
7
7
|
StagedQuoteUpdateAction,
|
|
8
8
|
StateReference,
|
|
9
9
|
} from "@commercetools/platform-sdk";
|
|
10
|
-
import { CommercetoolsError } from "
|
|
11
|
-
import type { Writable } from "
|
|
12
|
-
import type { RepositoryContext, UpdateHandlerInterface } from "../abstract";
|
|
13
|
-
import { AbstractUpdateHandler } from "../abstract";
|
|
14
|
-
import { getReferenceFromResourceIdentifier } from "../helpers";
|
|
10
|
+
import { CommercetoolsError } from "#src/exceptions.ts";
|
|
11
|
+
import type { Writable } from "#src/types.ts";
|
|
12
|
+
import type { RepositoryContext, UpdateHandlerInterface } from "../abstract.ts";
|
|
13
|
+
import { AbstractUpdateHandler } from "../abstract.ts";
|
|
14
|
+
import { getReferenceFromResourceIdentifier } from "../helpers.ts";
|
|
15
15
|
|
|
16
16
|
export class StagedQuoteUpdateHandler
|
|
17
17
|
extends AbstractUpdateHandler
|
|
@@ -60,7 +60,7 @@ export class StagedQuoteUpdateHandler
|
|
|
60
60
|
resource: Writable<StagedQuote>,
|
|
61
61
|
{ state, force }: StagedQuoteTransitionStateAction,
|
|
62
62
|
) {
|
|
63
|
-
let stateReference: StateReference | undefined
|
|
63
|
+
let stateReference: StateReference | undefined;
|
|
64
64
|
if (state) {
|
|
65
65
|
stateReference = getReferenceFromResourceIdentifier<StateReference>(
|
|
66
66
|
state,
|
|
@@ -2,11 +2,11 @@ import type {
|
|
|
2
2
|
StagedQuote,
|
|
3
3
|
StagedQuoteDraft,
|
|
4
4
|
} from "@commercetools/platform-sdk";
|
|
5
|
-
import type { Config } from "
|
|
6
|
-
import { getBaseResourceProperties } from "
|
|
7
|
-
import type { RepositoryContext } from "../abstract";
|
|
8
|
-
import { AbstractResourceRepository } from "../abstract";
|
|
9
|
-
import { StagedQuoteUpdateHandler } from "./actions";
|
|
5
|
+
import type { Config } from "#src/config.ts";
|
|
6
|
+
import { getBaseResourceProperties } from "#src/helpers.ts";
|
|
7
|
+
import type { RepositoryContext } from "../abstract.ts";
|
|
8
|
+
import { AbstractResourceRepository } from "../abstract.ts";
|
|
9
|
+
import { StagedQuoteUpdateHandler } from "./actions.ts";
|
|
10
10
|
|
|
11
11
|
export class StagedQuoteRepository extends AbstractResourceRepository<"staged-quote"> {
|
|
12
12
|
constructor(config: Config) {
|
|
@@ -6,9 +6,9 @@ import type {
|
|
|
6
6
|
RecurrencePolicySetScheduleAction,
|
|
7
7
|
RecurrencePolicyUpdateAction,
|
|
8
8
|
} from "@commercetools/platform-sdk";
|
|
9
|
-
import type { Writable } from "
|
|
10
|
-
import type { UpdateHandlerInterface } from "../abstract";
|
|
11
|
-
import { AbstractUpdateHandler, type RepositoryContext } from "../abstract";
|
|
9
|
+
import type { Writable } from "#src/types.ts";
|
|
10
|
+
import type { UpdateHandlerInterface } from "../abstract.ts";
|
|
11
|
+
import { AbstractUpdateHandler, type RepositoryContext } from "../abstract.ts";
|
|
12
12
|
|
|
13
13
|
export class RecurrencePolicyUpdateHandler
|
|
14
14
|
extends AbstractUpdateHandler
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import assert from "node:assert";
|
|
2
1
|
import type {
|
|
3
2
|
RecurrencePolicy,
|
|
4
3
|
RecurrencePolicyDraft,
|
|
5
|
-
RecurringOrder,
|
|
6
|
-
RecurringOrderDraft,
|
|
7
4
|
} from "@commercetools/platform-sdk";
|
|
8
|
-
import type { Config } from "
|
|
9
|
-
import { getBaseResourceProperties } from "
|
|
5
|
+
import type { Config } from "#src/config.ts";
|
|
6
|
+
import { getBaseResourceProperties } from "#src/helpers.ts";
|
|
10
7
|
import {
|
|
11
8
|
AbstractResourceRepository,
|
|
12
9
|
type RepositoryContext,
|
|
13
|
-
} from "../abstract";
|
|
14
|
-
import {
|
|
15
|
-
import { RecurrencePolicyUpdateHandler } from "./actions";
|
|
10
|
+
} from "../abstract.ts";
|
|
11
|
+
import { RecurrencePolicyUpdateHandler } from "./actions.ts";
|
|
16
12
|
|
|
17
13
|
export class RecurrencePolicyRepository extends AbstractResourceRepository<"recurrence-policy"> {
|
|
18
14
|
constructor(config: Config) {
|
|
@@ -11,9 +11,9 @@ import type {
|
|
|
11
11
|
RecurringOrderTransitionStateAction,
|
|
12
12
|
RecurringOrderUpdateAction,
|
|
13
13
|
} from "@commercetools/platform-sdk";
|
|
14
|
-
import type { Writable } from "
|
|
15
|
-
import type { UpdateHandlerInterface } from "../abstract";
|
|
16
|
-
import { AbstractUpdateHandler, type RepositoryContext } from "../abstract";
|
|
14
|
+
import type { Writable } from "#src/types.ts";
|
|
15
|
+
import type { UpdateHandlerInterface } from "../abstract.ts";
|
|
16
|
+
import { AbstractUpdateHandler, type RepositoryContext } from "../abstract.ts";
|
|
17
17
|
|
|
18
18
|
export class RecurringOrderUpdateHandler
|
|
19
19
|
extends AbstractUpdateHandler
|
|
@@ -3,14 +3,14 @@ import type {
|
|
|
3
3
|
RecurringOrder,
|
|
4
4
|
RecurringOrderDraft,
|
|
5
5
|
} from "@commercetools/platform-sdk";
|
|
6
|
-
import type { Config } from "
|
|
7
|
-
import { getBaseResourceProperties } from "
|
|
6
|
+
import type { Config } from "#src/config.ts";
|
|
7
|
+
import { getBaseResourceProperties } from "#src/helpers.ts";
|
|
8
8
|
import {
|
|
9
9
|
AbstractResourceRepository,
|
|
10
10
|
type RepositoryContext,
|
|
11
|
-
} from "../abstract";
|
|
12
|
-
import { OrderRepository } from "../order";
|
|
13
|
-
import { RecurringOrderUpdateHandler } from "./actions";
|
|
11
|
+
} from "../abstract.ts";
|
|
12
|
+
import { OrderRepository } from "../order/index.ts";
|
|
13
|
+
import { RecurringOrderUpdateHandler } from "./actions.ts";
|
|
14
14
|
|
|
15
15
|
export class RecurringOrderRepository extends AbstractResourceRepository<"recurring-order"> {
|
|
16
16
|
constructor(config: Config) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
ReviewDraft,
|
|
3
3
|
ReviewSetAuthorNameAction,
|
|
4
|
+
ReviewSetCustomerAction,
|
|
4
5
|
ReviewSetCustomFieldAction,
|
|
5
6
|
ReviewSetCustomTypeAction,
|
|
6
|
-
ReviewSetCustomerAction,
|
|
7
7
|
ReviewSetKeyAction,
|
|
8
8
|
ReviewSetLocaleAction,
|
|
9
9
|
ReviewSetRatingAction,
|
|
@@ -13,10 +13,10 @@ import type {
|
|
|
13
13
|
ReviewTransitionStateAction,
|
|
14
14
|
} from "@commercetools/platform-sdk";
|
|
15
15
|
import { describe, expect, test } from "vitest";
|
|
16
|
-
import type { Config } from "
|
|
17
|
-
import { getBaseResourceProperties } from "
|
|
18
|
-
import { InMemoryStorage } from "
|
|
19
|
-
import { ReviewRepository } from "./review";
|
|
16
|
+
import type { Config } from "#src/config.ts";
|
|
17
|
+
import { getBaseResourceProperties } from "#src/helpers.ts";
|
|
18
|
+
import { InMemoryStorage } from "#src/storage/index.ts";
|
|
19
|
+
import { ReviewRepository } from "./review.ts";
|
|
20
20
|
|
|
21
21
|
describe("Review Repository", () => {
|
|
22
22
|
const storage = new InMemoryStorage();
|