@things-factory/marketplace-base 8.0.0-beta.9 → 8.0.2
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-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/constants/attachment.ts +3 -0
- package/server/constants/index.ts +4 -0
- package/server/constants/order.ts +11 -0
- package/server/constants/platform.ts +7 -0
- package/server/constants/product.ts +5 -0
- package/server/constants/reserve-qty-order-statuses.ts +7 -0
- package/server/controllers/index.ts +0 -0
- package/server/entities/index.ts +45 -0
- package/server/entities/marketplace-order-item.ts +137 -0
- package/server/entities/marketplace-order-shipping-item.ts +55 -0
- package/server/entities/marketplace-order-shipping.ts +168 -0
- package/server/entities/marketplace-order.ts +141 -0
- package/server/entities/marketplace-product-attribute.ts +83 -0
- package/server/entities/marketplace-product-category.ts +53 -0
- package/server/entities/marketplace-product-variation-price.ts +63 -0
- package/server/entities/marketplace-product-variation.ts +147 -0
- package/server/entities/marketplace-product.ts +164 -0
- package/server/entities/marketplace-refund-order-item.ts +56 -0
- package/server/entities/marketplace-refund-order.ts +51 -0
- package/server/entities/marketplace-setting.ts +49 -0
- package/server/entities/store-replenishment-item.ts +48 -0
- package/server/entities/store-replenishment.ts +79 -0
- package/server/graphql/index.ts +9 -0
- package/server/graphql/resolvers/index.ts +14 -0
- package/server/graphql/resolvers/marketplace-order/auto-initialise-logistics-by-batch.ts +164 -0
- package/server/graphql/resolvers/marketplace-order/auto-update-order-ready-to-ship.ts +136 -0
- package/server/graphql/resolvers/marketplace-order/cancel-marketplace-order.ts +64 -0
- package/server/graphql/resolvers/marketplace-order/create-marketplace-order-note.ts +21 -0
- package/server/graphql/resolvers/marketplace-order/dashboard-marketplace-orders.ts +82 -0
- package/server/graphql/resolvers/marketplace-order/dashboard-marketplace-sales-average.ts +82 -0
- package/server/graphql/resolvers/marketplace-order/dashboard-marketplace-sales.ts +93 -0
- package/server/graphql/resolvers/marketplace-order/delete-marketplace-orders.ts +17 -0
- package/server/graphql/resolvers/marketplace-order/generate-marketplace-order.ts +180 -0
- package/server/graphql/resolvers/marketplace-order/get-address-list.ts +9 -0
- package/server/graphql/resolvers/marketplace-order/get-branch-list.ts +9 -0
- package/server/graphql/resolvers/marketplace-order/get-etrax-order-document.ts +49 -0
- package/server/graphql/resolvers/marketplace-order/get-logistics-param.ts +47 -0
- package/server/graphql/resolvers/marketplace-order/get-order-document.ts +149 -0
- package/server/graphql/resolvers/marketplace-order/get-store-logistics.ts +9 -0
- package/server/graphql/resolvers/marketplace-order/get-time-slot.ts +9 -0
- package/server/graphql/resolvers/marketplace-order/index.ts +75 -0
- package/server/graphql/resolvers/marketplace-order/initialise-lazada-logistics-by-batch.ts +165 -0
- package/server/graphql/resolvers/marketplace-order/initialise-logistics-by-batch.ts +41 -0
- package/server/graphql/resolvers/marketplace-order/initialise-logistics.ts +29 -0
- package/server/graphql/resolvers/marketplace-order/initialise-shopee-logistics-by-batch.ts +97 -0
- package/server/graphql/resolvers/marketplace-order/marketplace-order.ts +12 -0
- package/server/graphql/resolvers/marketplace-order/marketplace-orders-for-batch-init.ts +52 -0
- package/server/graphql/resolvers/marketplace-order/marketplace-orders-for-export.ts +63 -0
- package/server/graphql/resolvers/marketplace-order/marketplace-orders.ts +56 -0
- package/server/graphql/resolvers/marketplace-order/set-marketplace-order-delivered.ts +25 -0
- package/server/graphql/resolvers/marketplace-order/set-marketplace-order-failed-delivery.ts +25 -0
- package/server/graphql/resolvers/marketplace-order/set-own-shipping-provider-by-orders.ts +39 -0
- package/server/graphql/resolvers/marketplace-order/split-orders-by-batch.ts +245 -0
- package/server/graphql/resolvers/marketplace-order/sync-all-marketplace-order.ts +39 -0
- package/server/graphql/resolvers/marketplace-order/sync-marketplace-order.ts +940 -0
- package/server/graphql/resolvers/marketplace-order/sync-marketplace-orders-by-platform.ts +31 -0
- package/server/graphql/resolvers/marketplace-order/sync-shopee-awb.ts +49 -0
- package/server/graphql/resolvers/marketplace-order/update-marketplace-order.ts +35 -0
- package/server/graphql/resolvers/marketplace-order/update-order-ready-to-ship.ts +142 -0
- package/server/graphql/resolvers/marketplace-order-item/create-marketplace-order-item.ts +14 -0
- package/server/graphql/resolvers/marketplace-order-item/delete-marketplace-order-item.ts +10 -0
- package/server/graphql/resolvers/marketplace-order-item/delete-marketplace-order-items.ts +17 -0
- package/server/graphql/resolvers/marketplace-order-item/index.ts +22 -0
- package/server/graphql/resolvers/marketplace-order-item/marketplace-order-item.ts +14 -0
- package/server/graphql/resolvers/marketplace-order-item/marketplace-order-items.ts +15 -0
- package/server/graphql/resolvers/marketplace-order-item/update-marketplace-order-item.ts +18 -0
- package/server/graphql/resolvers/marketplace-order-item/update-multiple-marketplace-order-item.ts +44 -0
- package/server/graphql/resolvers/marketplace-order-shipping/create-marketplace-order-shipping.ts +14 -0
- package/server/graphql/resolvers/marketplace-order-shipping/delete-marketplace-order-shipping.ts +10 -0
- package/server/graphql/resolvers/marketplace-order-shipping/delete-marketplace-order-shippings.ts +17 -0
- package/server/graphql/resolvers/marketplace-order-shipping/index.ts +23 -0
- package/server/graphql/resolvers/marketplace-order-shipping/marketplace-order-shipping.ts +25 -0
- package/server/graphql/resolvers/marketplace-order-shipping/marketplace-order-shippings-for-batch-init.ts +88 -0
- package/server/graphql/resolvers/marketplace-order-shipping/marketplace-order-shippings.ts +43 -0
- package/server/graphql/resolvers/marketplace-order-shipping/update-marketplace-order-shipping.ts +32 -0
- package/server/graphql/resolvers/marketplace-order-shipping/update-multiple-marketplace-order-shipping.ts +44 -0
- package/server/graphql/resolvers/marketplace-order-shipping-item/create-marketplace-order-shipping-item.ts +14 -0
- package/server/graphql/resolvers/marketplace-order-shipping-item/delete-marketplace-order-shipping-item.ts +10 -0
- package/server/graphql/resolvers/marketplace-order-shipping-item/delete-marketplace-order-shipping-items.ts +15 -0
- package/server/graphql/resolvers/marketplace-order-shipping-item/index.ts +20 -0
- package/server/graphql/resolvers/marketplace-order-shipping-item/marketplace-order-shipping-item.ts +21 -0
- package/server/graphql/resolvers/marketplace-order-shipping-item/marketplace-order-shipping-items.ts +14 -0
- package/server/graphql/resolvers/marketplace-order-shipping-item/update-marketplace-order-shipping-item.ts +18 -0
- package/server/graphql/resolvers/marketplace-order-shipping-item/update-multiple-marketplace-order-shipping-item.ts +44 -0
- package/server/graphql/resolvers/marketplace-product/create-marketplace-product.ts +35 -0
- package/server/graphql/resolvers/marketplace-product/delete-marketplace-product.ts +10 -0
- package/server/graphql/resolvers/marketplace-product/delete-marketplace-products.ts +17 -0
- package/server/graphql/resolvers/marketplace-product/index.ts +27 -0
- package/server/graphql/resolvers/marketplace-product/marketplace-product.ts +24 -0
- package/server/graphql/resolvers/marketplace-product/marketplace-products.ts +23 -0
- package/server/graphql/resolvers/marketplace-product/sync-all-marketplace-store-products.ts +225 -0
- package/server/graphql/resolvers/marketplace-product/sync-marketplace-store-products.ts +222 -0
- package/server/graphql/resolvers/marketplace-product/update-marketplace-product.ts +24 -0
- package/server/graphql/resolvers/marketplace-product/upsert-marketplace-product.ts +39 -0
- package/server/graphql/resolvers/marketplace-product-attribute/create-marketplace-product-attribute.ts +14 -0
- package/server/graphql/resolvers/marketplace-product-attribute/delete-marketplace-product-attribute.ts +10 -0
- package/server/graphql/resolvers/marketplace-product-attribute/delete-marketplace-product-attributes.ts +17 -0
- package/server/graphql/resolvers/marketplace-product-attribute/index.ts +22 -0
- package/server/graphql/resolvers/marketplace-product-attribute/marketplace-product-attribute.ts +14 -0
- package/server/graphql/resolvers/marketplace-product-attribute/marketplace-product-attributes.ts +14 -0
- package/server/graphql/resolvers/marketplace-product-attribute/update-marketplace-product-attribute.ts +18 -0
- package/server/graphql/resolvers/marketplace-product-attribute/update-multiple-marketplace-product-attribute.ts +44 -0
- package/server/graphql/resolvers/marketplace-product-category/create-marketplace-product-category.ts +14 -0
- package/server/graphql/resolvers/marketplace-product-category/delete-marketplace-product-categories.ts +17 -0
- package/server/graphql/resolvers/marketplace-product-category/delete-marketplace-product-category.ts +10 -0
- package/server/graphql/resolvers/marketplace-product-category/index.ts +22 -0
- package/server/graphql/resolvers/marketplace-product-category/marketplace-product-categories.ts +14 -0
- package/server/graphql/resolvers/marketplace-product-category/marketplace-product-category.ts +14 -0
- package/server/graphql/resolvers/marketplace-product-category/update-marketplace-product-category.ts +18 -0
- package/server/graphql/resolvers/marketplace-product-category/update-multiple-marketplace-product-category.ts +44 -0
- package/server/graphql/resolvers/marketplace-product-variation/create-marketplace-product-variation.ts +14 -0
- package/server/graphql/resolvers/marketplace-product-variation/delete-marketplace-product-variation.ts +10 -0
- package/server/graphql/resolvers/marketplace-product-variation/delete-marketplace-product-variations.ts +17 -0
- package/server/graphql/resolvers/marketplace-product-variation/index.ts +30 -0
- package/server/graphql/resolvers/marketplace-product-variation/link-warehouse-marketplace-product-variations.ts +59 -0
- package/server/graphql/resolvers/marketplace-product-variation/marketplace-product-variation.ts +14 -0
- package/server/graphql/resolvers/marketplace-product-variation/marketplace-product-variations.ts +79 -0
- package/server/graphql/resolvers/marketplace-product-variation/update-marketplace-product-variation.ts +32 -0
- package/server/graphql/resolvers/marketplace-product-variation/update-multiple-marketplace-product-variation-quantity.ts +76 -0
- package/server/graphql/resolvers/marketplace-product-variation/update-multiple-marketplace-product-variations.ts +49 -0
- package/server/graphql/resolvers/marketplace-product-variation-price/create-marketplace-product-variation-price.ts +16 -0
- package/server/graphql/resolvers/marketplace-product-variation-price/delete-marketplace-product-variation-price.ts +13 -0
- package/server/graphql/resolvers/marketplace-product-variation-price/delete-marketplace-product-variation-prices.ts +18 -0
- package/server/graphql/resolvers/marketplace-product-variation-price/index.ts +19 -0
- package/server/graphql/resolvers/marketplace-product-variation-price/marketplace-product-variation-price-query.ts +52 -0
- package/server/graphql/resolvers/marketplace-product-variation-price/update-marketplace-product-variation-price.ts +20 -0
- package/server/graphql/resolvers/marketplace-product-variation-price/update-multiple-marketplace-product-variation-price.ts +49 -0
- package/server/graphql/resolvers/marketplace-refund-order/index.ts +9 -0
- package/server/graphql/resolvers/marketplace-refund-order/sync-all-marketplace-refund-orders.ts +122 -0
- package/server/graphql/resolvers/marketplace-refund-order/sync-marketplace-refund-orders.ts +106 -0
- package/server/graphql/resolvers/marketplace-report/index.ts +7 -0
- package/server/graphql/resolvers/marketplace-report/marketplace-sales-report.ts +143 -0
- package/server/graphql/resolvers/store-replenishment/create-store-replenishment.ts +16 -0
- package/server/graphql/resolvers/store-replenishment/delete-store-replenishment.ts +13 -0
- package/server/graphql/resolvers/store-replenishment/delete-store-replenishments.ts +18 -0
- package/server/graphql/resolvers/store-replenishment/index.ts +19 -0
- package/server/graphql/resolvers/store-replenishment/store-replenishment-query.ts +52 -0
- package/server/graphql/resolvers/store-replenishment/update-multiple-store-replenishment.ts +49 -0
- package/server/graphql/resolvers/store-replenishment/update-store-replenishment.ts +20 -0
- package/server/graphql/resolvers/store-replenishment-item/create-store-replenishment-item.ts +16 -0
- package/server/graphql/resolvers/store-replenishment-item/delete-store-replenishment-item.ts +13 -0
- package/server/graphql/resolvers/store-replenishment-item/delete-store-replenishment-items.ts +18 -0
- package/server/graphql/resolvers/store-replenishment-item/index.ts +19 -0
- package/server/graphql/resolvers/store-replenishment-item/store-replenishment-item-query.ts +52 -0
- package/server/graphql/resolvers/store-replenishment-item/update-multiple-store-replenishment-item.ts +49 -0
- package/server/graphql/resolvers/store-replenishment-item/update-store-replenishment-item.ts +20 -0
- package/server/graphql/types/index.ts +13 -0
- package/server/graphql/types/marketplace-order/dashboard-order.ts +13 -0
- package/server/graphql/types/marketplace-order/full-logistics-detail.ts +10 -0
- package/server/graphql/types/marketplace-order/index.ts +69 -0
- package/server/graphql/types/marketplace-order/logistics-detail.ts +8 -0
- package/server/graphql/types/marketplace-order/logistics-info.ts +27 -0
- package/server/graphql/types/marketplace-order/logistics-init.ts +9 -0
- package/server/graphql/types/marketplace-order/logistics-time.ts +9 -0
- package/server/graphql/types/marketplace-order/logistics.ts +21 -0
- package/server/graphql/types/marketplace-order/marketplace-logistics.ts +11 -0
- package/server/graphql/types/marketplace-order/marketplace-order-export.ts +19 -0
- package/server/graphql/types/marketplace-order/marketplace-order-list.ts +8 -0
- package/server/graphql/types/marketplace-order/marketplace-order-patch.ts +14 -0
- package/server/graphql/types/marketplace-order/marketplace-order.ts +40 -0
- package/server/graphql/types/marketplace-order/new-marketplace-order.ts +22 -0
- package/server/graphql/types/marketplace-order/order-address.ts +16 -0
- package/server/graphql/types/marketplace-order/order-document.ts +13 -0
- package/server/graphql/types/marketplace-order-item/index.ts +21 -0
- package/server/graphql/types/marketplace-order-item/marketplace-order-item-list.ts +8 -0
- package/server/graphql/types/marketplace-order-item/marketplace-order-item-patch.ts +10 -0
- package/server/graphql/types/marketplace-order-item/marketplace-order-item.ts +32 -0
- package/server/graphql/types/marketplace-order-item/new-marketplace-order-item.ts +17 -0
- package/server/graphql/types/marketplace-order-shipping/index.ts +31 -0
- package/server/graphql/types/marketplace-order-shipping/marketplace-order-shipping-list.ts +8 -0
- package/server/graphql/types/marketplace-order-shipping/marketplace-order-shipping-patch.ts +45 -0
- package/server/graphql/types/marketplace-order-shipping/marketplace-order-shipping.ts +59 -0
- package/server/graphql/types/marketplace-order-shipping/new-marketplace-order-shipping.ts +44 -0
- package/server/graphql/types/marketplace-order-shipping-item/index.ts +32 -0
- package/server/graphql/types/marketplace-order-shipping-item/marketplace-order-shipping-item-list.ts +8 -0
- package/server/graphql/types/marketplace-order-shipping-item/marketplace-order-shipping-item-patch.ts +13 -0
- package/server/graphql/types/marketplace-order-shipping-item/marketplace-order-shipping-item.ts +16 -0
- package/server/graphql/types/marketplace-order-shipping-item/new-marketplace-order-shipping-item.ts +12 -0
- package/server/graphql/types/marketplace-product/index.ts +28 -0
- package/server/graphql/types/marketplace-product/marketplace-product-list.ts +8 -0
- package/server/graphql/types/marketplace-product/marketplace-product-patch.ts +24 -0
- package/server/graphql/types/marketplace-product/marketplace-product.ts +30 -0
- package/server/graphql/types/marketplace-product/new-marketplace-product.ts +24 -0
- package/server/graphql/types/marketplace-product-attribute/index.ts +35 -0
- package/server/graphql/types/marketplace-product-attribute/marketplace-product-attribute-list.ts +8 -0
- package/server/graphql/types/marketplace-product-attribute/marketplace-product-attribute-patch.ts +10 -0
- package/server/graphql/types/marketplace-product-attribute/marketplace-product-attribute.ts +20 -0
- package/server/graphql/types/marketplace-product-attribute/new-marketplace-product-attribute.ts +13 -0
- package/server/graphql/types/marketplace-product-category/index.ts +28 -0
- package/server/graphql/types/marketplace-product-category/marketplace-product-category-list.ts +8 -0
- package/server/graphql/types/marketplace-product-category/marketplace-product-category-patch.ts +10 -0
- package/server/graphql/types/marketplace-product-category/marketplace-product-category.ts +17 -0
- package/server/graphql/types/marketplace-product-category/new-marketplace-product-category.ts +10 -0
- package/server/graphql/types/marketplace-product-variation/index.ts +47 -0
- package/server/graphql/types/marketplace-product-variation/marketplace-product-variation-list.ts +8 -0
- package/server/graphql/types/marketplace-product-variation/marketplace-product-variation-patch.ts +32 -0
- package/server/graphql/types/marketplace-product-variation/marketplace-product-variation.ts +35 -0
- package/server/graphql/types/marketplace-product-variation/new-marketplace-product-variation.ts +26 -0
- package/server/graphql/types/marketplace-product-variation/warehouse-product.ts +9 -0
- package/server/graphql/types/marketplace-product-variation-price/index.ts +21 -0
- package/server/graphql/types/marketplace-product-variation-price/marketplace-product-variation-price-list.ts +8 -0
- package/server/graphql/types/marketplace-product-variation-price/marketplace-product-variation-price-patch.ts +17 -0
- package/server/graphql/types/marketplace-product-variation-price/marketplace-product-variation-price.ts +21 -0
- package/server/graphql/types/marketplace-product-variation-price/new-marketplace-product-variation-price.ts +14 -0
- package/server/graphql/types/marketplace-refund-order/index.ts +16 -0
- package/server/graphql/types/marketplace-refund-order/marketplace-refund-order-list.ts +8 -0
- package/server/graphql/types/marketplace-refund-order/marketplace-refund-order.ts +17 -0
- package/server/graphql/types/marketplace-report/index.ts +10 -0
- package/server/graphql/types/marketplace-report/marketplace-sales-report-list.ts +8 -0
- package/server/graphql/types/marketplace-report/marketplace-sales-report.ts +67 -0
- package/server/graphql/types/store-replenishment/index.ts +21 -0
- package/server/graphql/types/store-replenishment/new-store-replenishment.ts +8 -0
- package/server/graphql/types/store-replenishment/store-replenishment-list.ts +8 -0
- package/server/graphql/types/store-replenishment/store-replenishment-patch.ts +10 -0
- package/server/graphql/types/store-replenishment/store-replenishment.ts +24 -0
- package/server/graphql/types/store-replenishment-item/index.ts +21 -0
- package/server/graphql/types/store-replenishment-item/new-store-replenishment-item.ts +8 -0
- package/server/graphql/types/store-replenishment-item/store-replenishment-item-list.ts +8 -0
- package/server/graphql/types/store-replenishment-item/store-replenishment-item-patch.ts +10 -0
- package/server/graphql/types/store-replenishment-item/store-replenishment-item.ts +15 -0
- package/server/index.ts +6 -0
- package/server/middlewares/index.ts +3 -0
- package/server/migrations/index.ts +9 -0
- package/server/routes.ts +26 -0
- package/server/utils/index.ts +1 -0
- package/server/utils/no-generator.ts +25 -0
- package/tsconfig.json +9 -0
package/server/graphql/types/marketplace-order-shipping-item/new-marketplace-order-shipping-item.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const NewMarketplaceOrderShippingItem = gql`
|
|
4
|
+
input NewMarketplaceOrderShippingItem {
|
|
5
|
+
id: String
|
|
6
|
+
name: String
|
|
7
|
+
marketplaceOrderItem: ObjectRef
|
|
8
|
+
marketplaceOrderShipping: ObjectRef
|
|
9
|
+
product: ObjectRef
|
|
10
|
+
qty: Int
|
|
11
|
+
}
|
|
12
|
+
`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export * from './marketplace-product'
|
|
4
|
+
export * from './new-marketplace-product'
|
|
5
|
+
export * from './marketplace-product-list'
|
|
6
|
+
export * from './marketplace-product-patch'
|
|
7
|
+
|
|
8
|
+
export const MarketplaceProductResolver = gql`
|
|
9
|
+
extend type Mutation {
|
|
10
|
+
createMarketplaceProduct(marketplaceProduct: NewMarketplaceProduct!): MarketplaceProduct @transaction
|
|
11
|
+
updateMarketplaceProduct(
|
|
12
|
+
foundProduct: NewMarketplaceProduct!
|
|
13
|
+
marketplaceProduct: MarketplaceProductPatch!
|
|
14
|
+
file: Upload
|
|
15
|
+
): MarketplaceProduct @transaction
|
|
16
|
+
upsertMarketplaceProduct(marketplaceProduct: MarketplaceProductPatch!, file: Upload): MarketplaceProduct
|
|
17
|
+
@transaction
|
|
18
|
+
deleteMarketplaceProduct(name: String!): Boolean
|
|
19
|
+
deleteMarketplaceProducts(names: [String]!): Boolean
|
|
20
|
+
syncMarketplaceStoreProducts(storeId: String!): Boolean
|
|
21
|
+
syncAllMarketplaceStoreProducts(filters: [Filter], pagination: Pagination, sortings: [Sorting]): Boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
extend type Query {
|
|
25
|
+
marketplaceProducts(filters: [Filter], pagination: Pagination, sortings: [Sorting]): MarketplaceProductList
|
|
26
|
+
marketplaceProduct(name: String!, isku: String!): MarketplaceProduct
|
|
27
|
+
}
|
|
28
|
+
`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const MarketplaceProductPatch = gql`
|
|
4
|
+
input MarketplaceProductPatch {
|
|
5
|
+
id: String
|
|
6
|
+
marketplaceStore: ObjectRef
|
|
7
|
+
marketplaceProductCategory: ObjectRef
|
|
8
|
+
marketplaceProductVariations: [ObjectRef]
|
|
9
|
+
itemId: String
|
|
10
|
+
isku: String
|
|
11
|
+
status: String
|
|
12
|
+
name: String
|
|
13
|
+
description: String
|
|
14
|
+
type: String
|
|
15
|
+
currency: String
|
|
16
|
+
hasVariation: Boolean
|
|
17
|
+
categoryId: String
|
|
18
|
+
storageType: String
|
|
19
|
+
condition: String
|
|
20
|
+
daysToShip: String
|
|
21
|
+
discountId: String
|
|
22
|
+
isPreOrder: Boolean
|
|
23
|
+
}
|
|
24
|
+
`
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const MarketplaceProduct = gql`
|
|
4
|
+
type MarketplaceProduct {
|
|
5
|
+
id: String
|
|
6
|
+
domain: Domain
|
|
7
|
+
marketplaceStore: MarketplaceStore
|
|
8
|
+
marketplaceProductCategory: MarketplaceProductCategory
|
|
9
|
+
marketplaceProductVariations: [MarketplaceProductVariation]
|
|
10
|
+
itemId: String
|
|
11
|
+
isku: String
|
|
12
|
+
status: String
|
|
13
|
+
name: String
|
|
14
|
+
type: String
|
|
15
|
+
storageType: String
|
|
16
|
+
description: String
|
|
17
|
+
currency: String
|
|
18
|
+
hasVariation: Boolean
|
|
19
|
+
categoryId: String
|
|
20
|
+
condition: String
|
|
21
|
+
daysToShip: String
|
|
22
|
+
discountId: String
|
|
23
|
+
isPreOrder: Boolean
|
|
24
|
+
attachment: [Attachment]
|
|
25
|
+
updater: User
|
|
26
|
+
creator: User
|
|
27
|
+
updatedAt: String
|
|
28
|
+
createdAt: String
|
|
29
|
+
}
|
|
30
|
+
`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const NewMarketplaceProduct = gql`
|
|
4
|
+
input NewMarketplaceProduct {
|
|
5
|
+
id: String
|
|
6
|
+
name: String
|
|
7
|
+
description: String
|
|
8
|
+
type: String
|
|
9
|
+
marketplaceProductVariations: [NewMarketplaceProductVariation]
|
|
10
|
+
marketplaceProductAttribute: NewMarketplaceProductAttribute
|
|
11
|
+
marketplaceProductCategory: NewMarketplaceProductCategory
|
|
12
|
+
itemId: String
|
|
13
|
+
isku: String
|
|
14
|
+
status: String
|
|
15
|
+
currency: String
|
|
16
|
+
hasVariation: Boolean
|
|
17
|
+
categoryId: String
|
|
18
|
+
condition: String
|
|
19
|
+
storageType: String
|
|
20
|
+
daysToShip: String
|
|
21
|
+
discountId: String
|
|
22
|
+
isPreOrder: Boolean
|
|
23
|
+
}
|
|
24
|
+
`
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export * from './marketplace-product-attribute'
|
|
4
|
+
export * from './new-marketplace-product-attribute'
|
|
5
|
+
export * from './marketplace-product-attribute-list'
|
|
6
|
+
export * from './marketplace-product-attribute-patch'
|
|
7
|
+
|
|
8
|
+
export const MarketplaceProductAttributeResolver = gql`
|
|
9
|
+
extend type Mutation {
|
|
10
|
+
createMarketplaceProductAttribute(
|
|
11
|
+
marketplaceProductAttribute: NewMarketplaceProductAttribute!
|
|
12
|
+
): MarketplaceProductAttribute
|
|
13
|
+
|
|
14
|
+
updateMarketplaceProductAttribute(
|
|
15
|
+
name: String!
|
|
16
|
+
patch: MarketplaceProductAttributePatch!
|
|
17
|
+
): MarketplaceProductAttribute
|
|
18
|
+
|
|
19
|
+
updateMultipleMarketplaceProductAttribute(
|
|
20
|
+
patches: [MarketplaceProductAttributePatch]!
|
|
21
|
+
): [MarketplaceProductAttribute]
|
|
22
|
+
|
|
23
|
+
deleteMarketplaceProductAttribute(name: String!): Boolean
|
|
24
|
+
deleteMarketplaceProductAttributes(names: [String]!): Boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
extend type Query {
|
|
28
|
+
marketplaceProductAttributes(
|
|
29
|
+
filters: [Filter]
|
|
30
|
+
pagination: Pagination
|
|
31
|
+
sortings: [Sorting]
|
|
32
|
+
): MarketplaceProductAttributeList
|
|
33
|
+
marketplaceProductAttribute(name: String!): MarketplaceProductAttribute
|
|
34
|
+
}
|
|
35
|
+
`
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const MarketplaceProductAttribute = gql`
|
|
4
|
+
type MarketplaceProductAttribute {
|
|
5
|
+
id: String
|
|
6
|
+
name: String
|
|
7
|
+
domain: Domain
|
|
8
|
+
marketplaceProduct: MarketplaceProduct
|
|
9
|
+
attributeId: String
|
|
10
|
+
isMandatory: Boolean
|
|
11
|
+
attributeType: String
|
|
12
|
+
option: String
|
|
13
|
+
originalValue: String
|
|
14
|
+
description: String
|
|
15
|
+
updater: User
|
|
16
|
+
creator: User
|
|
17
|
+
updatedAt: String
|
|
18
|
+
createdAt: String
|
|
19
|
+
}
|
|
20
|
+
`
|
package/server/graphql/types/marketplace-product-attribute/new-marketplace-product-attribute.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const NewMarketplaceProductAttribute = gql`
|
|
4
|
+
input NewMarketplaceProductAttribute {
|
|
5
|
+
name: String
|
|
6
|
+
description: String
|
|
7
|
+
attributeId: String
|
|
8
|
+
isMandatory: Boolean
|
|
9
|
+
attributeType: String
|
|
10
|
+
option: String
|
|
11
|
+
originalValue: String
|
|
12
|
+
}
|
|
13
|
+
`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export * from './marketplace-product-category'
|
|
4
|
+
export * from './marketplace-product-category-list'
|
|
5
|
+
export * from './marketplace-product-category-patch'
|
|
6
|
+
export * from './new-marketplace-product-category'
|
|
7
|
+
|
|
8
|
+
export const MarketplaceProductCategoryResolver = gql`
|
|
9
|
+
extend type Mutation {
|
|
10
|
+
createMarketplaceProductCategory(
|
|
11
|
+
marketplaceProductCategory: NewMarketplaceProductCategory!
|
|
12
|
+
): MarketplaceProductCategory
|
|
13
|
+
|
|
14
|
+
updateMarketplaceProductCategory(name: String!, patch: MarketplaceProductCategoryPatch!): MarketplaceProductCategory
|
|
15
|
+
updateMultipleMarketplaceProductCategory(patches: [MarketplaceProductCategoryPatch]!): [MarketplaceProductCategory]
|
|
16
|
+
deleteMarketplaceProductCategory(name: String!): Boolean
|
|
17
|
+
deleteMarketplaceProductCategories(names: [String]!): Boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
extend type Query {
|
|
21
|
+
marketplaceProductCategories(
|
|
22
|
+
filters: [Filter]
|
|
23
|
+
pagination: Pagination
|
|
24
|
+
sortings: [Sorting]
|
|
25
|
+
): MarketplaceProductCategoryList
|
|
26
|
+
marketplaceProductCategory(name: String!): MarketplaceProductCategory
|
|
27
|
+
}
|
|
28
|
+
`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const MarketplaceProductCategory = gql`
|
|
4
|
+
type MarketplaceProductCategory {
|
|
5
|
+
id: String
|
|
6
|
+
name: String
|
|
7
|
+
domain: Domain
|
|
8
|
+
marketplaceProduct: MarketplaceProduct
|
|
9
|
+
categoryId: String
|
|
10
|
+
childCategory: Boolean
|
|
11
|
+
description: String
|
|
12
|
+
updater: User
|
|
13
|
+
creator: User
|
|
14
|
+
updatedAt: String
|
|
15
|
+
createdAt: String
|
|
16
|
+
}
|
|
17
|
+
`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export * from './marketplace-product-variation'
|
|
4
|
+
export * from './marketplace-product-variation-list'
|
|
5
|
+
export * from './marketplace-product-variation-patch'
|
|
6
|
+
export * from './new-marketplace-product-variation'
|
|
7
|
+
|
|
8
|
+
export const MarketplaceProductVariationResolver = gql`
|
|
9
|
+
extend type Mutation {
|
|
10
|
+
createMarketplaceProductVariation(
|
|
11
|
+
marketplaceProductVariation: NewMarketplaceProductVariation!
|
|
12
|
+
): MarketplaceProductVariation
|
|
13
|
+
|
|
14
|
+
updateMarketplaceProductVariation(
|
|
15
|
+
name: String!
|
|
16
|
+
patch: MarketplaceProductVariationPatch!
|
|
17
|
+
): MarketplaceProductVariation
|
|
18
|
+
|
|
19
|
+
upsertMarketplaceProductVariation(
|
|
20
|
+
marketplaceProductVariation: MarketplaceProductVariationPatch!
|
|
21
|
+
productInfo: MarketplaceProductPatch
|
|
22
|
+
): Boolean
|
|
23
|
+
|
|
24
|
+
deleteMarketplaceProductVariation(name: String!): Boolean
|
|
25
|
+
deleteMarketplaceProductVariations(names: [String]!): Boolean
|
|
26
|
+
|
|
27
|
+
updateMultipleMarketplaceProductVariationQuantity(patches: [MarketplaceProductVariationPatch]!): Boolean
|
|
28
|
+
@transaction
|
|
29
|
+
|
|
30
|
+
updateMultipleMarketplaceProductVariations(patches: [MarketplaceProductVariationPatch]!): Boolean @transaction
|
|
31
|
+
|
|
32
|
+
linkWarehouseMarketplaceProductVariations(
|
|
33
|
+
marketplaceStoreId: String!
|
|
34
|
+
sku: String!
|
|
35
|
+
patches: [MarketplaceProductVariationPatch]!
|
|
36
|
+
): Boolean @transaction
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
extend type Query {
|
|
40
|
+
marketplaceProductVariations(
|
|
41
|
+
filters: [Filter]
|
|
42
|
+
pagination: Pagination
|
|
43
|
+
sortings: [Sorting]
|
|
44
|
+
): MarketplaceProductVariationList
|
|
45
|
+
marketplaceProductVariation(name: String!): MarketplaceProductVariation
|
|
46
|
+
}
|
|
47
|
+
`
|
package/server/graphql/types/marketplace-product-variation/marketplace-product-variation-patch.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const MarketplaceProductVariationPatch = gql`
|
|
4
|
+
input MarketplaceProductVariationPatch {
|
|
5
|
+
id: String
|
|
6
|
+
marketplaceProduct: ObjectRef
|
|
7
|
+
marketplaceProductVariationPrices: [ObjectRef]
|
|
8
|
+
variationId: String
|
|
9
|
+
variationSku: String
|
|
10
|
+
variationName: String
|
|
11
|
+
sku: String
|
|
12
|
+
channelSku: String
|
|
13
|
+
name: String
|
|
14
|
+
type: String
|
|
15
|
+
description: String
|
|
16
|
+
qty: Float
|
|
17
|
+
reserveQty: Float
|
|
18
|
+
bufferQty: Float
|
|
19
|
+
thresholdQty: Float
|
|
20
|
+
costPrice: Float
|
|
21
|
+
sellPrice: Float
|
|
22
|
+
mrpPrice: Float
|
|
23
|
+
discountId: String
|
|
24
|
+
status: String
|
|
25
|
+
marketplaceStatus: String
|
|
26
|
+
afterTaxCostPrice: Float
|
|
27
|
+
afterTaxSalesPrice: Float
|
|
28
|
+
primaryUnit: String
|
|
29
|
+
primaryUnitValue: Float
|
|
30
|
+
cuFlag: String
|
|
31
|
+
}
|
|
32
|
+
`
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const MarketplaceProductVariation = gql`
|
|
4
|
+
type MarketplaceProductVariation {
|
|
5
|
+
id: String
|
|
6
|
+
domain: Domain
|
|
7
|
+
sku: String
|
|
8
|
+
marketplaceProduct: MarketplaceProduct
|
|
9
|
+
marketplaceProductVariationPrices: [MarketplaceProductVariationPrice]
|
|
10
|
+
variationId: String
|
|
11
|
+
variationSku: String
|
|
12
|
+
channelSku: String
|
|
13
|
+
qty: Float
|
|
14
|
+
reserveQty: Float
|
|
15
|
+
bufferQty: Float
|
|
16
|
+
thresholdQty: Float
|
|
17
|
+
name: String
|
|
18
|
+
type: String
|
|
19
|
+
description: String
|
|
20
|
+
costPrice: Float
|
|
21
|
+
sellPrice: Float
|
|
22
|
+
mrpPrice: Float
|
|
23
|
+
discountId: String
|
|
24
|
+
status: String
|
|
25
|
+
marketplaceStatus: String
|
|
26
|
+
afterTaxCostPrice: Float
|
|
27
|
+
afterTaxSalesPrice: Float
|
|
28
|
+
primaryUnit: String
|
|
29
|
+
primaryUnitValue: Float
|
|
30
|
+
updater: User
|
|
31
|
+
creator: User
|
|
32
|
+
updatedAt: String
|
|
33
|
+
createdAt: String
|
|
34
|
+
}
|
|
35
|
+
`
|
package/server/graphql/types/marketplace-product-variation/new-marketplace-product-variation.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const NewMarketplaceProductVariation = gql`
|
|
4
|
+
input NewMarketplaceProductVariation {
|
|
5
|
+
variationId: String
|
|
6
|
+
sku: String
|
|
7
|
+
name: String
|
|
8
|
+
type: String
|
|
9
|
+
description: String
|
|
10
|
+
variationSku: String
|
|
11
|
+
channelSku: String
|
|
12
|
+
qty: Float
|
|
13
|
+
reserveQty: Float
|
|
14
|
+
bufferQty: Float
|
|
15
|
+
thresholdQty: Float
|
|
16
|
+
costPrice: Float
|
|
17
|
+
sellPrice: Float
|
|
18
|
+
mrpPrice: Float
|
|
19
|
+
discountId: String
|
|
20
|
+
status: String
|
|
21
|
+
afterTaxCostPrice: Float
|
|
22
|
+
afterTaxSalesPrice: Float
|
|
23
|
+
primaryUnit: String
|
|
24
|
+
primaryUnitValue: Float
|
|
25
|
+
}
|
|
26
|
+
`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export * from './marketplace-product-variation-price'
|
|
4
|
+
export * from './new-marketplace-product-variation-price'
|
|
5
|
+
export * from './marketplace-product-variation-price-patch'
|
|
6
|
+
export * from './marketplace-product-variation-price-list'
|
|
7
|
+
|
|
8
|
+
export const MarketplaceProductVariationPriceResolver = gql`
|
|
9
|
+
extend type Mutation {
|
|
10
|
+
createMarketplaceProductVariationPrice (marketplaceProductVariationPrice: NewMarketplaceProductVariationPrice!): MarketplaceProductVariationPrice
|
|
11
|
+
updateMarketplaceProductVariationPrice (name: String! patch: MarketplaceProductVariationPricePatch!): MarketplaceProductVariationPrice
|
|
12
|
+
updateMultipleMarketplaceProductVariationPrice (patches: [MarketplaceProductVariationPricePatch]!): [MarketplaceProductVariationPrice]
|
|
13
|
+
deleteMarketplaceProductVariationPrice (name: String!): Boolean
|
|
14
|
+
deleteMarketplaceProductVariationPrices (names: [String]!): Boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
extend type Query {
|
|
18
|
+
marketplaceProductVariationPrices(filters: [Filter], pagination: Pagination, sortings: [Sorting]): MarketplaceProductVariationPriceList
|
|
19
|
+
marketplaceProductVariationPrice(name: String!): MarketplaceProductVariationPrice
|
|
20
|
+
}
|
|
21
|
+
`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const MarketplaceProductVariationPricePatch = gql`
|
|
4
|
+
input MarketplaceProductVariationPricePatch {
|
|
5
|
+
id: String
|
|
6
|
+
name: String
|
|
7
|
+
description: String
|
|
8
|
+
currency: String
|
|
9
|
+
marketplaceProductVariation: ObjectRef
|
|
10
|
+
mrpPrice: Float
|
|
11
|
+
costPrice: Float
|
|
12
|
+
sellPrice: Float
|
|
13
|
+
afterTaxCostPrice: Float
|
|
14
|
+
afterTaxSalesPrice: Float
|
|
15
|
+
cuFlag: String
|
|
16
|
+
}
|
|
17
|
+
`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const MarketplaceProductVariationPrice = gql`
|
|
4
|
+
type MarketplaceProductVariationPrice {
|
|
5
|
+
id: String
|
|
6
|
+
name: String
|
|
7
|
+
domain: Domain
|
|
8
|
+
description: String
|
|
9
|
+
currency: String
|
|
10
|
+
marketplaceProductVariation: MarketplaceProductVariation
|
|
11
|
+
mrpPrice: Float
|
|
12
|
+
costPrice: Float
|
|
13
|
+
sellPrice: Float
|
|
14
|
+
afterTaxCostPrice: Float
|
|
15
|
+
afterTaxSalesPrice: Float
|
|
16
|
+
updater: User
|
|
17
|
+
creator: User
|
|
18
|
+
updatedAt: String
|
|
19
|
+
createdAt: String
|
|
20
|
+
}
|
|
21
|
+
`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const NewMarketplaceProductVariationPrice = gql`
|
|
4
|
+
input NewMarketplaceProductVariationPrice {
|
|
5
|
+
name: String!
|
|
6
|
+
description: String
|
|
7
|
+
currency: String
|
|
8
|
+
mrpPrice: Float
|
|
9
|
+
costPrice: Float
|
|
10
|
+
sellPrice: Float
|
|
11
|
+
afterTaxCostPrice: Float
|
|
12
|
+
afterTaxSalesPrice: Float
|
|
13
|
+
}
|
|
14
|
+
`
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export * from './marketplace-refund-order'
|
|
4
|
+
export * from './marketplace-refund-order-list'
|
|
5
|
+
|
|
6
|
+
export const MarketplaceRefundOrderResolver = gql`
|
|
7
|
+
extend type Mutation {
|
|
8
|
+
syncMarketplaceRefundOrders(storeId: String!, fromDate: String, toDate: String): Boolean @transaction
|
|
9
|
+
syncAllMarketplaceRefundOrders(
|
|
10
|
+
companyDomainId: String
|
|
11
|
+
fromDate: String
|
|
12
|
+
toDate: String
|
|
13
|
+
blackListStores: [String]
|
|
14
|
+
): Boolean
|
|
15
|
+
}
|
|
16
|
+
`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const MarketplaceRefundOrder = gql`
|
|
4
|
+
type MarketplaceRefundOrder {
|
|
5
|
+
id: String
|
|
6
|
+
name: String
|
|
7
|
+
domain: Domain
|
|
8
|
+
originalOrderNo: String
|
|
9
|
+
orderNo: String
|
|
10
|
+
amount: Int
|
|
11
|
+
status: String
|
|
12
|
+
updater: User
|
|
13
|
+
creator: User
|
|
14
|
+
updatedAt: String
|
|
15
|
+
createdAt: String
|
|
16
|
+
}
|
|
17
|
+
`
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export * from './marketplace-sales-report'
|
|
4
|
+
export * from './marketplace-sales-report-list'
|
|
5
|
+
|
|
6
|
+
export const MarketplaceReportResolver = gql`
|
|
7
|
+
extend type Query {
|
|
8
|
+
marketplaceSalesReports(filters: [Filter], pagination: Pagination, sortings: [Sorting]): MarketplaceSalesReportList
|
|
9
|
+
}
|
|
10
|
+
`
|