@things-factory/product-base 3.7.13 → 3.8.3
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/graphql/types/product-detail/product-detail.js +1 -0
- package/dist-server/graphql/types/product-detail/product-detail.js.map +1 -1
- package/dist-server/index.js +1 -2
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/index.js +62 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/product/index.js +9 -0
- package/dist-server/service/product/index.js.map +1 -0
- package/dist-server/service/product/product-mutation.js +357 -0
- package/dist-server/service/product/product-mutation.js.map +1 -0
- package/dist-server/service/product/product-query.js +275 -0
- package/dist-server/service/product/product-query.js.map +1 -0
- package/dist-server/service/product/product-types.js +501 -0
- package/dist-server/service/product/product-types.js.map +1 -0
- package/dist-server/{entities → service/product}/product.js +119 -6
- package/dist-server/service/product/product.js.map +1 -0
- package/dist-server/{graphql/resolvers → service}/product/validate-product.js +2 -2
- package/dist-server/service/product/validate-product.js.map +1 -0
- package/dist-server/service/product-bundle/index.js +9 -0
- package/dist-server/service/product-bundle/index.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle-mutation.js +130 -0
- package/dist-server/service/product-bundle/product-bundle-mutation.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle-query.js +128 -0
- package/dist-server/service/product-bundle/product-bundle-query.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle-types.js +85 -0
- package/dist-server/service/product-bundle/product-bundle-types.js.map +1 -0
- package/dist-server/{entities → service/product-bundle}/product-bundle.js +34 -4
- package/dist-server/service/product-bundle/product-bundle.js.map +1 -0
- package/dist-server/service/product-bundle-setting/index.js +9 -0
- package/dist-server/service/product-bundle-setting/index.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js +165 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js +111 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js +69 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js.map +1 -0
- package/dist-server/{entities → service/product-bundle-setting}/product-bundle-setting.js +25 -9
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js.map +1 -0
- package/dist-server/service/product-combination/index.js +9 -0
- package/dist-server/service/product-combination/index.js.map +1 -0
- package/dist-server/service/product-combination/product-combination-mutation.js +137 -0
- package/dist-server/service/product-combination/product-combination-mutation.js.map +1 -0
- package/dist-server/service/product-combination/product-combination-query.js +86 -0
- package/dist-server/service/product-combination/product-combination-query.js.map +1 -0
- package/dist-server/service/product-combination/product-combination-type.js +83 -0
- package/dist-server/service/product-combination/product-combination-type.js.map +1 -0
- package/dist-server/service/product-combination/product-combination.js +133 -0
- package/dist-server/service/product-combination/product-combination.js.map +1 -0
- package/dist-server/service/product-combination-setting/index.js +9 -0
- package/dist-server/service/product-combination-setting/index.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js +221 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js +177 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js +75 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js.map +1 -0
- package/dist-server/{entities → service/product-combination-setting}/product-combination-setting.js +27 -8
- package/dist-server/service/product-combination-setting/product-combination-setting.js.map +1 -0
- package/dist-server/service/product-detail/index.js +9 -0
- package/dist-server/service/product-detail/index.js.map +1 -0
- package/dist-server/{graphql/resolvers/product-detail/update-multiple-product-detail.js → service/product-detail/product-detail-mutation.js} +106 -13
- package/dist-server/service/product-detail/product-detail-mutation.js.map +1 -0
- package/dist-server/{graphql/resolvers → service}/product-detail/product-detail-query.js +90 -30
- package/dist-server/service/product-detail/product-detail-query.js.map +1 -0
- package/dist-server/service/product-detail/product-detail-types.js +387 -0
- package/dist-server/service/product-detail/product-detail-types.js.map +1 -0
- package/dist-server/{entities → service/product-detail}/product-detail.js +92 -4
- package/dist-server/service/product-detail/product-detail.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/index.js +9 -0
- package/dist-server/service/product-detail-bizplace-setting/index.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js +114 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js +107 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js +99 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js.map +1 -0
- package/dist-server/{entities → service/product-detail-bizplace-setting}/product-detail-bizplace-setting.js +35 -6
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js.map +1 -0
- package/dist-server/service/product-set/index.js +9 -0
- package/dist-server/service/product-set/index.js.map +1 -0
- package/dist-server/service/product-set/product-set-mutation.js +146 -0
- package/dist-server/service/product-set/product-set-mutation.js.map +1 -0
- package/dist-server/service/product-set/product-set-query.js +136 -0
- package/dist-server/service/product-set/product-set-query.js.map +1 -0
- package/dist-server/service/product-set/product-set-types.js +77 -0
- package/dist-server/service/product-set/product-set-types.js.map +1 -0
- package/dist-server/{entities → service/product-set}/product-set.js +35 -7
- package/dist-server/service/product-set/product-set.js.map +1 -0
- package/package.json +3 -3
- package/server/graphql/types/product-detail/product-detail.ts +1 -0
- package/server/index.ts +1 -2
- package/server/service/index.ts +61 -0
- package/server/service/product/index.ts +6 -0
- package/server/service/product/product-mutation.ts +375 -0
- package/server/service/product/product-query.ts +283 -0
- package/server/service/product/product-types.ts +364 -0
- package/server/{entities → service/product}/product.ts +105 -2
- package/server/{graphql/resolvers → service}/product/validate-product.ts +1 -1
- package/server/service/product-bundle/index.ts +6 -0
- package/server/service/product-bundle/product-bundle-mutation.ts +137 -0
- package/server/{graphql/resolvers/product-bundle/my-bizplace-product-bundles.ts → service/product-bundle/product-bundle-query.ts} +46 -8
- package/server/service/product-bundle/product-bundle-types.ts +51 -0
- package/server/{entities → service/product-bundle}/product-bundle.ts +33 -7
- package/server/service/product-bundle-setting/index.ts +6 -0
- package/server/{graphql/resolvers/product-bundle-setting/link-product-bundle.ts → service/product-bundle-setting/product-bundle-setting-mutation.ts} +80 -5
- package/server/{graphql/resolvers/product-bundle-setting/product-bundle-sets.ts → service/product-bundle-setting/product-bundle-setting-query.ts} +49 -20
- package/server/service/product-bundle-setting/product-bundle-setting-types.ts +41 -0
- package/server/service/product-bundle-setting/product-bundle-setting.ts +45 -0
- package/server/service/product-combination/index.ts +6 -0
- package/server/service/product-combination/product-combination-mutation.ts +142 -0
- package/server/service/product-combination/product-combination-query.ts +46 -0
- package/server/service/product-combination/product-combination-type.ts +50 -0
- package/server/service/product-combination/product-combination.ts +116 -0
- package/server/service/product-combination-setting/index.ts +6 -0
- package/server/service/product-combination-setting/product-combination-setting-mutation.ts +247 -0
- package/server/{graphql/resolvers/product-combination-setting/product-combination-sets.ts → service/product-combination-setting/product-combination-setting-query.ts} +55 -5
- package/server/service/product-combination-setting/product-combination-setting-type.ts +44 -0
- package/server/service/product-combination-setting/product-combination-setting.ts +48 -0
- package/server/service/product-detail/index.ts +6 -0
- package/server/service/product-detail/product-detail-mutation.ts +233 -0
- package/server/{graphql/resolvers → service}/product-detail/product-detail-query.ts +52 -38
- package/server/service/product-detail/product-detail-types.ts +280 -0
- package/server/{entities → service/product-detail}/product-detail.ts +83 -2
- package/server/service/product-detail-bizplace-setting/index.ts +6 -0
- package/server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.ts +113 -0
- package/server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.ts +87 -0
- package/server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.ts +62 -0
- package/server/{entities → service/product-detail-bizplace-setting}/product-detail-bizplace-setting.ts +49 -12
- package/server/service/product-set/index.ts +6 -0
- package/server/service/product-set/product-set-mutation.ts +141 -0
- package/server/service/product-set/product-set-query.ts +106 -0
- package/server/service/product-set/product-set-types.ts +45 -0
- package/server/service/product-set/product-set.ts +95 -0
- package/dist-server/entities/index.js +0 -30
- package/dist-server/entities/index.js.map +0 -1
- package/dist-server/entities/product-bundle-setting.js.map +0 -1
- package/dist-server/entities/product-bundle.js.map +0 -1
- package/dist-server/entities/product-combination-setting.js.map +0 -1
- package/dist-server/entities/product-combination.js +0 -91
- package/dist-server/entities/product-combination.js.map +0 -1
- package/dist-server/entities/product-detail-bizplace-setting.js.map +0 -1
- package/dist-server/entities/product-detail.js.map +0 -1
- package/dist-server/entities/product-set.js.map +0 -1
- package/dist-server/entities/product.js.map +0 -1
- package/dist-server/graphql/index.js +0 -30
- package/dist-server/graphql/index.js.map +0 -1
- package/dist-server/graphql/resolvers/index.js +0 -21
- package/dist-server/graphql/resolvers/index.js.map +0 -1
- package/dist-server/graphql/resolvers/product/create-product.js +0 -60
- package/dist-server/graphql/resolvers/product/create-product.js.map +0 -1
- package/dist-server/graphql/resolvers/product/create-products.js +0 -24
- package/dist-server/graphql/resolvers/product/create-products.js.map +0 -1
- package/dist-server/graphql/resolvers/product/delete-product.js +0 -14
- package/dist-server/graphql/resolvers/product/delete-product.js.map +0 -1
- package/dist-server/graphql/resolvers/product/delete-products.js +0 -17
- package/dist-server/graphql/resolvers/product/delete-products.js.map +0 -1
- package/dist-server/graphql/resolvers/product/import-multiple-product.js +0 -35
- package/dist-server/graphql/resolvers/product/import-multiple-product.js.map +0 -1
- package/dist-server/graphql/resolvers/product/index.js +0 -20
- package/dist-server/graphql/resolvers/product/index.js.map +0 -1
- package/dist-server/graphql/resolvers/product/link-product.js +0 -41
- package/dist-server/graphql/resolvers/product/link-product.js.map +0 -1
- package/dist-server/graphql/resolvers/product/my-bizplace-products.js +0 -47
- package/dist-server/graphql/resolvers/product/my-bizplace-products.js.map +0 -1
- package/dist-server/graphql/resolvers/product/product-query.js +0 -94
- package/dist-server/graphql/resolvers/product/product-query.js.map +0 -1
- package/dist-server/graphql/resolvers/product/products-by-bizplace.js +0 -60
- package/dist-server/graphql/resolvers/product/products-by-bizplace.js.map +0 -1
- package/dist-server/graphql/resolvers/product/undelete-products.js +0 -17
- package/dist-server/graphql/resolvers/product/undelete-products.js.map +0 -1
- package/dist-server/graphql/resolvers/product/update-multiple-product.js +0 -33
- package/dist-server/graphql/resolvers/product/update-multiple-product.js.map +0 -1
- package/dist-server/graphql/resolvers/product/update-product.js +0 -58
- package/dist-server/graphql/resolvers/product/update-product.js.map +0 -1
- package/dist-server/graphql/resolvers/product/validate-product.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle/create-product-bundle.js +0 -12
- package/dist-server/graphql/resolvers/product-bundle/create-product-bundle.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle/delete-product-bundle.js +0 -13
- package/dist-server/graphql/resolvers/product-bundle/delete-product-bundle.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle/delete-product-bundles.js +0 -19
- package/dist-server/graphql/resolvers/product-bundle/delete-product-bundles.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle/index.js +0 -15
- package/dist-server/graphql/resolvers/product-bundle/index.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle/my-bizplace-product-bundles.js +0 -43
- package/dist-server/graphql/resolvers/product-bundle/my-bizplace-product-bundles.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle/product-bundle-query.js +0 -21
- package/dist-server/graphql/resolvers/product-bundle/product-bundle-query.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle/update-multiple-product-bundle.js +0 -50
- package/dist-server/graphql/resolvers/product-bundle/update-multiple-product-bundle.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle/update-product-bundle.js +0 -16
- package/dist-server/graphql/resolvers/product-bundle/update-product-bundle.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle-setting/create-product-bundle-setting.js +0 -12
- package/dist-server/graphql/resolvers/product-bundle-setting/create-product-bundle-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle-setting/delete-product-bundle-setting.js +0 -12
- package/dist-server/graphql/resolvers/product-bundle-setting/delete-product-bundle-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle-setting/delete-product-bundle-settings.js +0 -14
- package/dist-server/graphql/resolvers/product-bundle-setting/delete-product-bundle-settings.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle-setting/index.js +0 -15
- package/dist-server/graphql/resolvers/product-bundle-setting/index.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle-setting/link-product-bundle.js +0 -77
- package/dist-server/graphql/resolvers/product-bundle-setting/link-product-bundle.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle-setting/product-bundle-sets.js +0 -75
- package/dist-server/graphql/resolvers/product-bundle-setting/product-bundle-sets.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle-setting/product-bundle-setting-query.js +0 -14
- package/dist-server/graphql/resolvers/product-bundle-setting/product-bundle-setting-query.js.map +0 -1
- package/dist-server/graphql/resolvers/product-bundle-setting/update-multiple-product-bundle-setting.js +0 -33
- package/dist-server/graphql/resolvers/product-bundle-setting/update-multiple-product-bundle-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination/create-product-combination.js +0 -12
- package/dist-server/graphql/resolvers/product-combination/create-product-combination.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination/delete-product-combination.js +0 -13
- package/dist-server/graphql/resolvers/product-combination/delete-product-combination.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination/delete-product-combinations.js +0 -19
- package/dist-server/graphql/resolvers/product-combination/delete-product-combinations.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination/index.js +0 -14
- package/dist-server/graphql/resolvers/product-combination/index.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination/product-combination-query.js +0 -21
- package/dist-server/graphql/resolvers/product-combination/product-combination-query.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination/update-multiple-product-combination.js +0 -44
- package/dist-server/graphql/resolvers/product-combination/update-multiple-product-combination.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination/update-product-combination.js +0 -16
- package/dist-server/graphql/resolvers/product-combination/update-product-combination.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination-setting/create-product-combination-setting.js +0 -12
- package/dist-server/graphql/resolvers/product-combination-setting/create-product-combination-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination-setting/delete-product-combination-setting.js +0 -12
- package/dist-server/graphql/resolvers/product-combination-setting/delete-product-combination-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination-setting/delete-product-combination-settings.js +0 -14
- package/dist-server/graphql/resolvers/product-combination-setting/delete-product-combination-settings.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination-setting/index.js +0 -15
- package/dist-server/graphql/resolvers/product-combination-setting/index.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination-setting/link-product-combination.js +0 -73
- package/dist-server/graphql/resolvers/product-combination-setting/link-product-combination.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination-setting/product-combination-sets.js +0 -87
- package/dist-server/graphql/resolvers/product-combination-setting/product-combination-sets.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination-setting/product-combination-setting-query.js +0 -16
- package/dist-server/graphql/resolvers/product-combination-setting/product-combination-setting-query.js.map +0 -1
- package/dist-server/graphql/resolvers/product-combination-setting/update-multiple-product-combination-setting.js +0 -33
- package/dist-server/graphql/resolvers/product-combination-setting/update-multiple-product-combination-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail/create-product-detail.js +0 -17
- package/dist-server/graphql/resolvers/product-detail/create-product-detail.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail/delete-product-detail.js +0 -13
- package/dist-server/graphql/resolvers/product-detail/delete-product-detail.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail/delete-product-details.js +0 -16
- package/dist-server/graphql/resolvers/product-detail/delete-product-details.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail/index.js +0 -15
- package/dist-server/graphql/resolvers/product-detail/index.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail/product-detail-query.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail/update-multiple-product-detail.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail/update-product-detail.js +0 -20
- package/dist-server/graphql/resolvers/product-detail/update-product-detail.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/create-product-detail-bizplace-setting.js +0 -12
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/create-product-detail-bizplace-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/delete-product-detail-bizplace-setting.js +0 -13
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/delete-product-detail-bizplace-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/delete-product-detail-bizplace-settings.js +0 -16
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/delete-product-detail-bizplace-settings.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/index.js +0 -15
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/index.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js +0 -56
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/update-multiple-product-detail-bizplace-setting.js +0 -35
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/update-multiple-product-detail-bizplace-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/update-product-detail-bizplace-setting.js +0 -16
- package/dist-server/graphql/resolvers/product-detail-bizplace-setting/update-product-detail-bizplace-setting.js.map +0 -1
- package/dist-server/graphql/resolvers/product-set/create-product-set.js +0 -27
- package/dist-server/graphql/resolvers/product-set/create-product-set.js.map +0 -1
- package/dist-server/graphql/resolvers/product-set/delete-product-set.js +0 -14
- package/dist-server/graphql/resolvers/product-set/delete-product-set.js.map +0 -1
- package/dist-server/graphql/resolvers/product-set/delete-product-sets.js +0 -20
- package/dist-server/graphql/resolvers/product-set/delete-product-sets.js.map +0 -1
- package/dist-server/graphql/resolvers/product-set/index.js +0 -15
- package/dist-server/graphql/resolvers/product-set/index.js.map +0 -1
- package/dist-server/graphql/resolvers/product-set/my-bizplace-product-sets.js +0 -39
- package/dist-server/graphql/resolvers/product-set/my-bizplace-product-sets.js.map +0 -1
- package/dist-server/graphql/resolvers/product-set/product-set-query.js +0 -30
- package/dist-server/graphql/resolvers/product-set/product-set-query.js.map +0 -1
- package/dist-server/graphql/resolvers/product-set/update-multiple-product-set.js +0 -28
- package/dist-server/graphql/resolvers/product-set/update-multiple-product-set.js.map +0 -1
- package/dist-server/graphql/resolvers/product-set/update-product-set.js +0 -23
- package/dist-server/graphql/resolvers/product-set/update-product-set.js.map +0 -1
- package/dist-server/graphql/types/index.js +0 -21
- package/dist-server/graphql/types/index.js.map +0 -1
- package/dist-server/graphql/types/product/index.js +0 -61
- package/dist-server/graphql/types/product/index.js.map +0 -1
- package/dist-server/graphql/types/product/new-product.js +0 -67
- package/dist-server/graphql/types/product/new-product.js.map +0 -1
- package/dist-server/graphql/types/product/product-list.js +0 -14
- package/dist-server/graphql/types/product/product-list.js.map +0 -1
- package/dist-server/graphql/types/product/product-patch.js +0 -71
- package/dist-server/graphql/types/product/product-patch.js.map +0 -1
- package/dist-server/graphql/types/product/product.js +0 -74
- package/dist-server/graphql/types/product/product.js.map +0 -1
- package/dist-server/graphql/types/product-bundle/index.js +0 -37
- package/dist-server/graphql/types/product-bundle/index.js.map +0 -1
- package/dist-server/graphql/types/product-bundle/new-product-bundle.js +0 -14
- package/dist-server/graphql/types/product-bundle/new-product-bundle.js.map +0 -1
- package/dist-server/graphql/types/product-bundle/product-bundle-list.js +0 -14
- package/dist-server/graphql/types/product-bundle/product-bundle-list.js.map +0 -1
- package/dist-server/graphql/types/product-bundle/product-bundle-patch.js +0 -21
- package/dist-server/graphql/types/product-bundle/product-bundle-patch.js.map +0 -1
- package/dist-server/graphql/types/product-bundle/product-bundle.js +0 -26
- package/dist-server/graphql/types/product-bundle/product-bundle.js.map +0 -1
- package/dist-server/graphql/types/product-bundle-setting/index.js +0 -38
- package/dist-server/graphql/types/product-bundle-setting/index.js.map +0 -1
- package/dist-server/graphql/types/product-bundle-setting/new-product-bundle-setting.js +0 -14
- package/dist-server/graphql/types/product-bundle-setting/new-product-bundle-setting.js.map +0 -1
- package/dist-server/graphql/types/product-bundle-setting/product-bundle-setting-list.js +0 -14
- package/dist-server/graphql/types/product-bundle-setting/product-bundle-setting-list.js.map +0 -1
- package/dist-server/graphql/types/product-bundle-setting/product-bundle-setting-patch.js +0 -21
- package/dist-server/graphql/types/product-bundle-setting/product-bundle-setting-patch.js.map +0 -1
- package/dist-server/graphql/types/product-bundle-setting/product-bundle-setting.js +0 -36
- package/dist-server/graphql/types/product-bundle-setting/product-bundle-setting.js.map +0 -1
- package/dist-server/graphql/types/product-combination/index.js +0 -39
- package/dist-server/graphql/types/product-combination/index.js.map +0 -1
- package/dist-server/graphql/types/product-combination/new-product-combination.js +0 -15
- package/dist-server/graphql/types/product-combination/new-product-combination.js.map +0 -1
- package/dist-server/graphql/types/product-combination/product-combination-list.js +0 -14
- package/dist-server/graphql/types/product-combination/product-combination-list.js.map +0 -1
- package/dist-server/graphql/types/product-combination/product-combination-patch.js +0 -19
- package/dist-server/graphql/types/product-combination/product-combination-patch.js.map +0 -1
- package/dist-server/graphql/types/product-combination/product-combination.js +0 -26
- package/dist-server/graphql/types/product-combination/product-combination.js.map +0 -1
- package/dist-server/graphql/types/product-combination-setting/index.js +0 -44
- package/dist-server/graphql/types/product-combination-setting/index.js.map +0 -1
- package/dist-server/graphql/types/product-combination-setting/new-product-combination-setting.js +0 -14
- package/dist-server/graphql/types/product-combination-setting/new-product-combination-setting.js.map +0 -1
- package/dist-server/graphql/types/product-combination-setting/product-combination-setting-list.js +0 -14
- package/dist-server/graphql/types/product-combination-setting/product-combination-setting-list.js.map +0 -1
- package/dist-server/graphql/types/product-combination-setting/product-combination-setting-patch.js +0 -18
- package/dist-server/graphql/types/product-combination-setting/product-combination-setting-patch.js.map +0 -1
- package/dist-server/graphql/types/product-combination-setting/product-combination-setting.js +0 -33
- package/dist-server/graphql/types/product-combination-setting/product-combination-setting.js.map +0 -1
- package/dist-server/graphql/types/product-detail/index.js +0 -36
- package/dist-server/graphql/types/product-detail/index.js.map +0 -1
- package/dist-server/graphql/types/product-detail/new-product-detail.js +0 -55
- package/dist-server/graphql/types/product-detail/new-product-detail.js.map +0 -1
- package/dist-server/graphql/types/product-detail/product-detail-list.js +0 -14
- package/dist-server/graphql/types/product-detail/product-detail-list.js.map +0 -1
- package/dist-server/graphql/types/product-detail/product-detail-patch.js +0 -57
- package/dist-server/graphql/types/product-detail/product-detail-patch.js.map +0 -1
- package/dist-server/graphql/types/product-detail-bizplace-setting/index.js +0 -36
- package/dist-server/graphql/types/product-detail-bizplace-setting/index.js.map +0 -1
- package/dist-server/graphql/types/product-detail-bizplace-setting/new-product-detail-bizplace-setting.js +0 -18
- package/dist-server/graphql/types/product-detail-bizplace-setting/new-product-detail-bizplace-setting.js.map +0 -1
- package/dist-server/graphql/types/product-detail-bizplace-setting/product-detail-bizplace-setting-list.js +0 -14
- package/dist-server/graphql/types/product-detail-bizplace-setting/product-detail-bizplace-setting-list.js.map +0 -1
- package/dist-server/graphql/types/product-detail-bizplace-setting/product-detail-bizplace-setting-patch.js +0 -20
- package/dist-server/graphql/types/product-detail-bizplace-setting/product-detail-bizplace-setting-patch.js.map +0 -1
- package/dist-server/graphql/types/product-detail-bizplace-setting/product-detail-bizplace-setting.js +0 -30
- package/dist-server/graphql/types/product-detail-bizplace-setting/product-detail-bizplace-setting.js.map +0 -1
- package/dist-server/graphql/types/product-set/index.js +0 -52
- package/dist-server/graphql/types/product-set/index.js.map +0 -1
- package/dist-server/graphql/types/product-set/new-product-set.js +0 -16
- package/dist-server/graphql/types/product-set/new-product-set.js.map +0 -1
- package/dist-server/graphql/types/product-set/product-set-list.js +0 -14
- package/dist-server/graphql/types/product-set/product-set-list.js.map +0 -1
- package/dist-server/graphql/types/product-set/product-set-patch.js +0 -17
- package/dist-server/graphql/types/product-set/product-set-patch.js.map +0 -1
- package/dist-server/graphql/types/product-set/product-set.js +0 -24
- package/dist-server/graphql/types/product-set/product-set.js.map +0 -1
- package/server/entities/index.ts +0 -30
- package/server/entities/product-bundle-setting.ts +0 -31
- package/server/entities/product-combination-setting.ts +0 -32
- package/server/entities/product-combination.ts +0 -78
- package/server/entities/product-set.ts +0 -65
- package/server/graphql/index.ts +0 -9
- package/server/graphql/resolvers/index.ts +0 -8
- package/server/graphql/resolvers/product/create-product.ts +0 -78
- package/server/graphql/resolvers/product/create-products.ts +0 -21
- package/server/graphql/resolvers/product/delete-product.ts +0 -19
- package/server/graphql/resolvers/product/delete-products.ts +0 -21
- package/server/graphql/resolvers/product/import-multiple-product.ts +0 -34
- package/server/graphql/resolvers/product/index.ts +0 -32
- package/server/graphql/resolvers/product/link-product.ts +0 -46
- package/server/graphql/resolvers/product/my-bizplace-products.ts +0 -66
- package/server/graphql/resolvers/product/product-query.ts +0 -117
- package/server/graphql/resolvers/product/products-by-bizplace.ts +0 -79
- package/server/graphql/resolvers/product/undelete-products.ts +0 -21
- package/server/graphql/resolvers/product/update-multiple-product.ts +0 -33
- package/server/graphql/resolvers/product/update-product.ts +0 -75
- package/server/graphql/resolvers/product-bundle/create-product-bundle.ts +0 -16
- package/server/graphql/resolvers/product-bundle/delete-product-bundle.ts +0 -13
- package/server/graphql/resolvers/product-bundle/delete-product-bundles.ts +0 -26
- package/server/graphql/resolvers/product-bundle/index.ts +0 -22
- package/server/graphql/resolvers/product-bundle/product-bundle-query.ts +0 -24
- package/server/graphql/resolvers/product-bundle/update-multiple-product-bundle.ts +0 -68
- package/server/graphql/resolvers/product-bundle/update-product-bundle.ts +0 -19
- package/server/graphql/resolvers/product-bundle-setting/create-product-bundle-setting.ts +0 -15
- package/server/graphql/resolvers/product-bundle-setting/delete-product-bundle-setting.ts +0 -11
- package/server/graphql/resolvers/product-bundle-setting/delete-product-bundle-settings.ts +0 -14
- package/server/graphql/resolvers/product-bundle-setting/index.ts +0 -22
- package/server/graphql/resolvers/product-bundle-setting/product-bundle-setting-query.ts +0 -14
- package/server/graphql/resolvers/product-bundle-setting/update-multiple-product-bundle-setting.ts +0 -47
- package/server/graphql/resolvers/product-combination/create-product-combination.ts +0 -16
- package/server/graphql/resolvers/product-combination/delete-product-combination.ts +0 -13
- package/server/graphql/resolvers/product-combination/delete-product-combinations.ts +0 -28
- package/server/graphql/resolvers/product-combination/index.ts +0 -19
- package/server/graphql/resolvers/product-combination/product-combination-query.ts +0 -25
- package/server/graphql/resolvers/product-combination/update-multiple-product-combination.ts +0 -63
- package/server/graphql/resolvers/product-combination/update-product-combination.ts +0 -20
- package/server/graphql/resolvers/product-combination-setting/create-product-combination-setting.ts +0 -15
- package/server/graphql/resolvers/product-combination-setting/delete-product-combination-setting.ts +0 -11
- package/server/graphql/resolvers/product-combination-setting/delete-product-combination-settings.ts +0 -13
- package/server/graphql/resolvers/product-combination-setting/index.ts +0 -21
- package/server/graphql/resolvers/product-combination-setting/link-product-combination.ts +0 -88
- package/server/graphql/resolvers/product-combination-setting/product-combination-setting-query.ts +0 -16
- package/server/graphql/resolvers/product-combination-setting/update-multiple-product-combination-setting.ts +0 -47
- package/server/graphql/resolvers/product-detail/create-product-detail.ts +0 -27
- package/server/graphql/resolvers/product-detail/delete-product-detail.ts +0 -13
- package/server/graphql/resolvers/product-detail/delete-product-details.ts +0 -16
- package/server/graphql/resolvers/product-detail/index.ts +0 -19
- package/server/graphql/resolvers/product-detail/update-multiple-product-detail.ts +0 -157
- package/server/graphql/resolvers/product-detail/update-product-detail.ts +0 -26
- package/server/graphql/resolvers/product-detail-bizplace-setting/create-product-detail-bizplace-setting.ts +0 -16
- package/server/graphql/resolvers/product-detail-bizplace-setting/delete-product-detail-bizplace-setting.ts +0 -13
- package/server/graphql/resolvers/product-detail-bizplace-setting/delete-product-detail-bizplace-settings.ts +0 -16
- package/server/graphql/resolvers/product-detail-bizplace-setting/index.ts +0 -19
- package/server/graphql/resolvers/product-detail-bizplace-setting/product-detail-bizplace-setting-query.ts +0 -74
- package/server/graphql/resolvers/product-detail-bizplace-setting/update-multiple-product-detail-bizplace-setting.ts +0 -57
- package/server/graphql/resolvers/product-detail-bizplace-setting/update-product-detail-bizplace-setting.ts +0 -19
- package/server/graphql/resolvers/product-set/create-product-set.ts +0 -33
- package/server/graphql/resolvers/product-set/delete-product-set.ts +0 -18
- package/server/graphql/resolvers/product-set/delete-product-sets.ts +0 -28
- package/server/graphql/resolvers/product-set/index.ts +0 -22
- package/server/graphql/resolvers/product-set/my-bizplace-product-sets.ts +0 -52
- package/server/graphql/resolvers/product-set/product-set-query.ts +0 -37
- package/server/graphql/resolvers/product-set/update-multiple-product-set.ts +0 -31
- package/server/graphql/resolvers/product-set/update-product-set.ts +0 -28
- package/server/graphql/types/index.ts +0 -8
- package/server/graphql/types/product/index.ts +0 -46
- package/server/graphql/types/product/new-product.ts +0 -61
- package/server/graphql/types/product/product-list.ts +0 -8
- package/server/graphql/types/product/product-patch.ts +0 -65
- package/server/graphql/types/product/product.ts +0 -68
- package/server/graphql/types/product-bundle/index.ts +0 -22
- package/server/graphql/types/product-bundle/new-product-bundle.ts +0 -8
- package/server/graphql/types/product-bundle/product-bundle-list.ts +0 -8
- package/server/graphql/types/product-bundle/product-bundle-patch.ts +0 -15
- package/server/graphql/types/product-bundle/product-bundle.ts +0 -20
- package/server/graphql/types/product-bundle-setting/index.ts +0 -23
- package/server/graphql/types/product-bundle-setting/new-product-bundle-setting.ts +0 -8
- package/server/graphql/types/product-bundle-setting/product-bundle-setting-list.ts +0 -8
- package/server/graphql/types/product-bundle-setting/product-bundle-setting-patch.ts +0 -15
- package/server/graphql/types/product-bundle-setting/product-bundle-setting.ts +0 -30
- package/server/graphql/types/product-combination/index.ts +0 -24
- package/server/graphql/types/product-combination/new-product-combination.ts +0 -9
- package/server/graphql/types/product-combination/product-combination-list.ts +0 -8
- package/server/graphql/types/product-combination/product-combination-patch.ts +0 -13
- package/server/graphql/types/product-combination/product-combination.ts +0 -20
- package/server/graphql/types/product-combination-setting/index.ts +0 -29
- package/server/graphql/types/product-combination-setting/new-product-combination-setting.ts +0 -8
- package/server/graphql/types/product-combination-setting/product-combination-setting-list.ts +0 -8
- package/server/graphql/types/product-combination-setting/product-combination-setting-patch.ts +0 -12
- package/server/graphql/types/product-combination-setting/product-combination-setting.ts +0 -27
- package/server/graphql/types/product-detail/index.ts +0 -21
- package/server/graphql/types/product-detail/new-product-detail.ts +0 -49
- package/server/graphql/types/product-detail/product-detail-list.ts +0 -8
- package/server/graphql/types/product-detail/product-detail-patch.ts +0 -51
- package/server/graphql/types/product-detail-bizplace-setting/index.ts +0 -21
- package/server/graphql/types/product-detail-bizplace-setting/new-product-detail-bizplace-setting.ts +0 -12
- package/server/graphql/types/product-detail-bizplace-setting/product-detail-bizplace-setting-list.ts +0 -8
- package/server/graphql/types/product-detail-bizplace-setting/product-detail-bizplace-setting-patch.ts +0 -14
- package/server/graphql/types/product-detail-bizplace-setting/product-detail-bizplace-setting.ts +0 -24
- package/server/graphql/types/product-set/index.ts +0 -37
- package/server/graphql/types/product-set/new-product-set.ts +0 -10
- package/server/graphql/types/product-set/product-set-list.ts +0 -8
- package/server/graphql/types/product-set/product-set-patch.ts +0 -11
- package/server/graphql/types/product-set/product-set.ts +0 -18
|
@@ -11,287 +11,400 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var Product_1, _a, _b, _c, _d;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.Product = void 0;
|
|
14
|
+
const type_graphql_1 = require("type-graphql");
|
|
14
15
|
const typeorm_1 = require("typeorm");
|
|
15
16
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
16
17
|
const biz_base_1 = require("@things-factory/biz-base");
|
|
17
18
|
const shell_1 = require("@things-factory/shell");
|
|
18
|
-
const
|
|
19
|
+
const product_detail_1 = require("../product-detail/product-detail");
|
|
20
|
+
const product_set_1 = require("../product-set/product-set");
|
|
19
21
|
let Product = Product_1 = class Product {
|
|
20
22
|
};
|
|
21
23
|
__decorate([
|
|
22
24
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
25
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
23
26
|
__metadata("design:type", String)
|
|
24
27
|
], Product.prototype, "id", void 0);
|
|
25
28
|
__decorate([
|
|
26
29
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
30
|
+
(0, type_graphql_1.Field)(),
|
|
27
31
|
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
28
32
|
], Product.prototype, "domain", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.RelationId)((product) => product.domain),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Product.prototype, "domainId", void 0);
|
|
29
37
|
__decorate([
|
|
30
38
|
(0, typeorm_1.ManyToOne)(type => biz_base_1.Bizplace),
|
|
39
|
+
(0, type_graphql_1.Field)(),
|
|
31
40
|
__metadata("design:type", typeof (_b = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _b : Object)
|
|
32
41
|
], Product.prototype, "bizplace", void 0);
|
|
33
42
|
__decorate([
|
|
34
43
|
(0, typeorm_1.Column)({ default: false }),
|
|
44
|
+
(0, type_graphql_1.Field)(),
|
|
35
45
|
__metadata("design:type", Boolean)
|
|
36
46
|
], Product.prototype, "isCompany", void 0);
|
|
37
47
|
__decorate([
|
|
38
48
|
(0, typeorm_1.Column)(),
|
|
49
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
50
|
__metadata("design:type", String)
|
|
40
51
|
], Product.prototype, "sku", void 0);
|
|
41
52
|
__decorate([
|
|
42
53
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
54
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
43
55
|
__metadata("design:type", String)
|
|
44
56
|
], Product.prototype, "brandSku", void 0);
|
|
45
57
|
__decorate([
|
|
46
58
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
59
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
47
60
|
__metadata("design:type", String)
|
|
48
61
|
], Product.prototype, "brand", void 0);
|
|
49
62
|
__decorate([
|
|
50
63
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
64
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
51
65
|
__metadata("design:type", String)
|
|
52
66
|
], Product.prototype, "subBrand", void 0);
|
|
53
67
|
__decorate([
|
|
54
68
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
69
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
55
70
|
__metadata("design:type", String)
|
|
56
71
|
], Product.prototype, "gtin", void 0);
|
|
57
72
|
__decorate([
|
|
58
73
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
74
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
75
|
__metadata("design:type", String)
|
|
60
76
|
], Product.prototype, "caseGtin", void 0);
|
|
61
77
|
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)(),
|
|
78
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
79
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
80
|
__metadata("design:type", String)
|
|
64
81
|
], Product.prototype, "name", void 0);
|
|
65
82
|
__decorate([
|
|
66
83
|
(0, typeorm_1.Column)(),
|
|
84
|
+
(0, type_graphql_1.Field)(),
|
|
67
85
|
__metadata("design:type", String)
|
|
68
86
|
], Product.prototype, "type", void 0);
|
|
69
87
|
__decorate([
|
|
70
88
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
89
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
71
90
|
__metadata("design:type", String)
|
|
72
91
|
], Product.prototype, "packingType", void 0);
|
|
73
92
|
__decorate([
|
|
74
93
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
94
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
75
95
|
__metadata("design:type", String)
|
|
76
96
|
], Product.prototype, "description", void 0);
|
|
77
97
|
__decorate([
|
|
78
|
-
(0, typeorm_1.OneToMany)(type =>
|
|
98
|
+
(0, typeorm_1.OneToMany)(type => product_detail_1.ProductDetail, productDetails => productDetails.product, { nullable: true }),
|
|
99
|
+
(0, type_graphql_1.Field)(type => [product_detail_1.ProductDetail], { nullable: true }),
|
|
79
100
|
__metadata("design:type", Array)
|
|
80
101
|
], Product.prototype, "productDetails", void 0);
|
|
81
102
|
__decorate([
|
|
82
103
|
(0, typeorm_1.ManyToOne)(type => Product_1, { nullable: true }),
|
|
104
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
83
105
|
__metadata("design:type", Product
|
|
84
106
|
//// To be removed ////
|
|
85
107
|
)
|
|
86
108
|
], Product.prototype, "productRef", void 0);
|
|
87
109
|
__decorate([
|
|
88
110
|
(0, typeorm_1.ManyToOne)(type => Product_1, { nullable: true }),
|
|
111
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
89
112
|
__metadata("design:type", Product
|
|
90
113
|
//// To be removed ////
|
|
91
114
|
)
|
|
92
115
|
], Product.prototype, "parentProductRef", void 0);
|
|
93
116
|
__decorate([
|
|
94
117
|
(0, typeorm_1.OneToMany)(type => Product_1, product => product.parentProductRef, { nullable: true }),
|
|
118
|
+
(0, type_graphql_1.Field)(type => [Product_1], { nullable: true }),
|
|
95
119
|
__metadata("design:type", Array)
|
|
96
120
|
], Product.prototype, "childProducts", void 0);
|
|
97
121
|
__decorate([
|
|
98
122
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
123
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
99
124
|
__metadata("design:type", Number)
|
|
100
125
|
], Product.prototype, "bundleQty", void 0);
|
|
101
126
|
__decorate([
|
|
102
127
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
128
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
103
129
|
__metadata("design:type", Number)
|
|
104
130
|
], Product.prototype, "expirationPeriod", void 0);
|
|
105
131
|
__decorate([
|
|
106
132
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
133
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
107
134
|
__metadata("design:type", String)
|
|
108
135
|
], Product.prototype, "weightUnit", void 0);
|
|
109
136
|
__decorate([
|
|
110
137
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
138
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
111
139
|
__metadata("design:type", Number)
|
|
112
140
|
], Product.prototype, "weight", void 0);
|
|
113
141
|
__decorate([
|
|
114
142
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
143
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
115
144
|
__metadata("design:type", Number)
|
|
116
145
|
], Product.prototype, "grossWeight", void 0);
|
|
117
146
|
__decorate([
|
|
118
147
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
148
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
119
149
|
__metadata("design:type", Number)
|
|
120
150
|
], Product.prototype, "caseWeight", void 0);
|
|
121
151
|
__decorate([
|
|
122
152
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
153
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
123
154
|
__metadata("design:type", Number)
|
|
124
155
|
], Product.prototype, "caseGrossWeight", void 0);
|
|
125
156
|
__decorate([
|
|
126
157
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
158
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
127
159
|
__metadata("design:type", Number)
|
|
128
160
|
], Product.prototype, "density", void 0);
|
|
129
161
|
__decorate([
|
|
130
162
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
163
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
131
164
|
__metadata("design:type", String)
|
|
132
165
|
], Product.prototype, "lengthUnit", void 0);
|
|
133
166
|
__decorate([
|
|
134
167
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
168
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
135
169
|
__metadata("design:type", Number)
|
|
136
170
|
], Product.prototype, "costPrice", void 0);
|
|
137
171
|
__decorate([
|
|
138
172
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
173
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
139
174
|
__metadata("design:type", Number)
|
|
140
175
|
], Product.prototype, "mrpPrice", void 0);
|
|
141
176
|
__decorate([
|
|
142
177
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
178
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
143
179
|
__metadata("design:type", Number)
|
|
144
180
|
], Product.prototype, "sellPrice", void 0);
|
|
145
181
|
__decorate([
|
|
146
182
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
183
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
147
184
|
__metadata("design:type", Number)
|
|
148
185
|
], Product.prototype, "afterTaxCostPrice", void 0);
|
|
149
186
|
__decorate([
|
|
150
187
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
188
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
151
189
|
__metadata("design:type", Number)
|
|
152
190
|
], Product.prototype, "afterTaxSalesPrice", void 0);
|
|
153
191
|
__decorate([
|
|
154
192
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
193
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
155
194
|
__metadata("design:type", Number)
|
|
156
195
|
], Product.prototype, "width", void 0);
|
|
157
196
|
__decorate([
|
|
158
197
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
198
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
159
199
|
__metadata("design:type", Number)
|
|
160
200
|
], Product.prototype, "depth", void 0);
|
|
161
201
|
__decorate([
|
|
162
202
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
203
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
163
204
|
__metadata("design:type", Number)
|
|
164
205
|
], Product.prototype, "height", void 0);
|
|
165
206
|
__decorate([
|
|
166
207
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
208
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
167
209
|
__metadata("design:type", Number)
|
|
168
210
|
], Product.prototype, "volume", void 0);
|
|
169
211
|
__decorate([
|
|
170
212
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
213
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
171
214
|
__metadata("design:type", Number)
|
|
172
215
|
], Product.prototype, "caseWidth", void 0);
|
|
173
216
|
__decorate([
|
|
174
217
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
218
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
175
219
|
__metadata("design:type", Number)
|
|
176
220
|
], Product.prototype, "caseDepth", void 0);
|
|
177
221
|
__decorate([
|
|
178
222
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
223
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
179
224
|
__metadata("design:type", Number)
|
|
180
225
|
], Product.prototype, "caseHeight", void 0);
|
|
181
226
|
__decorate([
|
|
182
227
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
228
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
183
229
|
__metadata("design:type", Number)
|
|
184
230
|
], Product.prototype, "caseVolume", void 0);
|
|
185
231
|
__decorate([
|
|
186
232
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
233
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
187
234
|
__metadata("design:type", String)
|
|
188
235
|
], Product.prototype, "volumeSize", void 0);
|
|
189
236
|
__decorate([
|
|
190
237
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
238
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
191
239
|
__metadata("design:type", String)
|
|
192
240
|
], Product.prototype, "primaryUnit", void 0);
|
|
193
241
|
__decorate([
|
|
194
242
|
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
243
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
195
244
|
__metadata("design:type", Number)
|
|
196
245
|
], Product.prototype, "primaryValue", void 0);
|
|
197
246
|
__decorate([
|
|
198
247
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
248
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
199
249
|
__metadata("design:type", String)
|
|
200
250
|
], Product.prototype, "auxUnit1", void 0);
|
|
201
251
|
__decorate([
|
|
202
252
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
253
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
203
254
|
__metadata("design:type", String)
|
|
204
255
|
], Product.prototype, "auxValue1", void 0);
|
|
205
256
|
__decorate([
|
|
206
257
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
258
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
207
259
|
__metadata("design:type", String)
|
|
208
260
|
], Product.prototype, "auxUnit2", void 0);
|
|
209
261
|
__decorate([
|
|
210
262
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
263
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
211
264
|
__metadata("design:type", String)
|
|
212
265
|
], Product.prototype, "auxValue2", void 0);
|
|
213
266
|
__decorate([
|
|
214
267
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
268
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
215
269
|
__metadata("design:type", String)
|
|
216
270
|
], Product.prototype, "auxUnit3", void 0);
|
|
217
271
|
__decorate([
|
|
218
272
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
273
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
219
274
|
__metadata("design:type", String)
|
|
220
275
|
], Product.prototype, "auxValue3", void 0);
|
|
221
276
|
__decorate([
|
|
222
277
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
278
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
223
279
|
__metadata("design:type", String)
|
|
224
280
|
], Product.prototype, "inventoryAccountCode", void 0);
|
|
225
281
|
__decorate([
|
|
226
282
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
283
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
227
284
|
__metadata("design:type", String)
|
|
228
285
|
], Product.prototype, "cogsAccountCode", void 0);
|
|
229
286
|
__decorate([
|
|
230
|
-
(0, typeorm_1.ManyToOne)(type =>
|
|
231
|
-
|
|
287
|
+
(0, typeorm_1.ManyToOne)(type => product_set_1.ProductSet, productSet => productSet.product, { nullable: true }),
|
|
288
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
289
|
+
__metadata("design:type", product_set_1.ProductSet
|
|
232
290
|
//// To be removed ////
|
|
233
291
|
)
|
|
234
292
|
], Product.prototype, "productSet", void 0);
|
|
235
293
|
__decorate([
|
|
236
294
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
295
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
237
296
|
__metadata("design:type", String)
|
|
238
297
|
], Product.prototype, "movement", void 0);
|
|
239
298
|
__decorate([
|
|
240
299
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
300
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
241
301
|
__metadata("design:type", Number)
|
|
242
302
|
], Product.prototype, "bufferQty", void 0);
|
|
243
303
|
__decorate([
|
|
244
304
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
305
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
245
306
|
__metadata("design:type", Number)
|
|
246
307
|
], Product.prototype, "minQty", void 0);
|
|
247
308
|
__decorate([
|
|
248
309
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
310
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
249
311
|
__metadata("design:type", Number)
|
|
250
312
|
], Product.prototype, "maxQty", void 0);
|
|
251
313
|
__decorate([
|
|
252
314
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
315
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
253
316
|
__metadata("design:type", Number)
|
|
254
317
|
], Product.prototype, "discountId", void 0);
|
|
255
318
|
__decorate([
|
|
256
319
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
320
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
257
321
|
__metadata("design:type", String)
|
|
258
322
|
], Product.prototype, "status", void 0);
|
|
259
323
|
__decorate([
|
|
260
324
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
325
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
261
326
|
__metadata("design:type", Boolean)
|
|
262
327
|
], Product.prototype, "isTrackedAsInventory", void 0);
|
|
263
328
|
__decorate([
|
|
264
329
|
(0, typeorm_1.Column)({ default: false }),
|
|
330
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
265
331
|
__metadata("design:type", Boolean)
|
|
266
332
|
], Product.prototype, "isRequiredCheckExpiry", void 0);
|
|
267
333
|
__decorate([
|
|
268
334
|
(0, typeorm_1.Column)({ default: false }),
|
|
335
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
269
336
|
__metadata("design:type", Boolean)
|
|
270
337
|
], Product.prototype, "isRequireSerialNumberScanning", void 0);
|
|
271
338
|
__decorate([
|
|
272
339
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
340
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
273
341
|
__metadata("design:type", Date)
|
|
274
342
|
], Product.prototype, "deletedAt", void 0);
|
|
343
|
+
__decorate([
|
|
344
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
345
|
+
__metadata("design:type", String)
|
|
346
|
+
], Product.prototype, "refCode", void 0);
|
|
347
|
+
__decorate([
|
|
348
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
349
|
+
__metadata("design:type", Number)
|
|
350
|
+
], Product.prototype, "nettWeight", void 0);
|
|
351
|
+
__decorate([
|
|
352
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
353
|
+
__metadata("design:type", String)
|
|
354
|
+
], Product.prototype, "uom", void 0);
|
|
355
|
+
__decorate([
|
|
356
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
357
|
+
__metadata("design:type", Number)
|
|
358
|
+
], Product.prototype, "uomValue", void 0);
|
|
359
|
+
__decorate([
|
|
360
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
361
|
+
__metadata("design:type", String)
|
|
362
|
+
], Product.prototype, "auxUnit4", void 0);
|
|
363
|
+
__decorate([
|
|
364
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
365
|
+
__metadata("design:type", String)
|
|
366
|
+
], Product.prototype, "auxValue4", void 0);
|
|
367
|
+
__decorate([
|
|
368
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
369
|
+
__metadata("design:type", String)
|
|
370
|
+
], Product.prototype, "auxUnit5", void 0);
|
|
371
|
+
__decorate([
|
|
372
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
373
|
+
__metadata("design:type", String)
|
|
374
|
+
], Product.prototype, "auxValue5", void 0);
|
|
275
375
|
__decorate([
|
|
276
376
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
377
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
277
378
|
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
278
379
|
], Product.prototype, "creator", void 0);
|
|
380
|
+
__decorate([
|
|
381
|
+
(0, typeorm_1.RelationId)((product) => product.creator),
|
|
382
|
+
__metadata("design:type", String)
|
|
383
|
+
], Product.prototype, "creatorId", void 0);
|
|
279
384
|
__decorate([
|
|
280
385
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
386
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
281
387
|
__metadata("design:type", typeof (_d = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _d : Object)
|
|
282
388
|
], Product.prototype, "updater", void 0);
|
|
389
|
+
__decorate([
|
|
390
|
+
(0, typeorm_1.RelationId)((product) => product.updater),
|
|
391
|
+
__metadata("design:type", String)
|
|
392
|
+
], Product.prototype, "updaterId", void 0);
|
|
283
393
|
__decorate([
|
|
284
394
|
(0, typeorm_1.CreateDateColumn)(),
|
|
395
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
285
396
|
__metadata("design:type", Date)
|
|
286
397
|
], Product.prototype, "createdAt", void 0);
|
|
287
398
|
__decorate([
|
|
288
399
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
400
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
289
401
|
__metadata("design:type", Date)
|
|
290
402
|
], Product.prototype, "updatedAt", void 0);
|
|
291
403
|
Product = Product_1 = __decorate([
|
|
292
404
|
(0, typeorm_1.Entity)(),
|
|
293
405
|
(0, typeorm_1.Index)('ix_product_0', (product) => [product.domain, product.bizplace, product.name, product.description, product.weight], { unique: true }),
|
|
294
|
-
(0, typeorm_1.Index)('ix_product_1', (product) => [product.bizplace])
|
|
406
|
+
(0, typeorm_1.Index)('ix_product_1', (product) => [product.bizplace]),
|
|
407
|
+
(0, type_graphql_1.ObjectType)()
|
|
295
408
|
], Product);
|
|
296
409
|
exports.Product = Product;
|
|
297
410
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f;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACf,IAAI;0CAAA;AAtVJ,OAAO;IARnB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,cAAc,EACd,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,EAC3G,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EAAC,cAAc,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/D,IAAA,yBAAU,GAAE;GACA,OAAO,CAuVnB;AAvVY,0BAAO"}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.validateProduct = void 0;
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
const typeorm_1 = require("typeorm");
|
|
9
|
-
const
|
|
9
|
+
const product_1 = require("./product");
|
|
10
10
|
async function validateProduct(product, context) {
|
|
11
11
|
const { tx } = context.state;
|
|
12
12
|
let errors = [];
|
|
@@ -19,7 +19,7 @@ async function validateProduct(product, context) {
|
|
|
19
19
|
if (lodash_1.default.isEmpty(product.type) || '') {
|
|
20
20
|
errors.push('Product type is required');
|
|
21
21
|
}
|
|
22
|
-
if ((await tx.getRepository(
|
|
22
|
+
if ((await tx.getRepository(product_1.Product).count({
|
|
23
23
|
where: {
|
|
24
24
|
sku: product.sku,
|
|
25
25
|
bizplace: product.bizplace,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-product.js","sourceRoot":"","sources":["../../../server/service/product/validate-product.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAsB;AACtB,qCAAoD;AAKpD,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AjCD,0CAiCC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const product_bundle_1 = require("./product-bundle");
|
|
5
|
+
const product_bundle_mutation_1 = require("./product-bundle-mutation");
|
|
6
|
+
const product_bundle_query_1 = require("./product-bundle-query");
|
|
7
|
+
exports.entities = [product_bundle_1.ProductBundle];
|
|
8
|
+
exports.resolvers = [product_bundle_query_1.ProductBundleQuery, product_bundle_mutation_1.ProductBundleMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/product-bundle/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAChD,uEAAiE;AACjE,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,8BAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,CAAC,yCAAkB,EAAE,+CAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ProductBundleMutation = void 0;
|
|
16
|
+
const type_graphql_1 = require("type-graphql");
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
19
|
+
const constants_1 = require("../../constants");
|
|
20
|
+
const product_bundle_1 = require("./product-bundle");
|
|
21
|
+
const product_bundle_types_1 = require("./product-bundle-types");
|
|
22
|
+
let ProductBundleMutation = class ProductBundleMutation {
|
|
23
|
+
async createProductBundle(productBundle, context) {
|
|
24
|
+
const { domain, user } = context.state;
|
|
25
|
+
return await (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle).save(Object.assign(Object.assign({}, productBundle), { domain, creator: user, updater: user }));
|
|
26
|
+
}
|
|
27
|
+
async updateProductBundle(name, patch, context) {
|
|
28
|
+
const { domain, user } = context.state;
|
|
29
|
+
const repository = (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle);
|
|
30
|
+
const productBundle = await repository.findOne({
|
|
31
|
+
where: { domain, name }
|
|
32
|
+
});
|
|
33
|
+
return await repository.save(Object.assign(Object.assign(Object.assign({}, productBundle), patch), { updater: user }));
|
|
34
|
+
}
|
|
35
|
+
async updateMultipleProductBundle(patches, context) {
|
|
36
|
+
const { domain, user } = context.state;
|
|
37
|
+
let results = [];
|
|
38
|
+
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
39
|
+
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
40
|
+
const productBundleRepo = (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle);
|
|
41
|
+
const bizplaceRepo = (0, typeorm_1.getRepository)(biz_base_1.Bizplace);
|
|
42
|
+
let bizplace;
|
|
43
|
+
if (_createRecords.length > 0) {
|
|
44
|
+
for (let i = 0; i < _createRecords.length; i++) {
|
|
45
|
+
let newRecord = _createRecords[i];
|
|
46
|
+
let status = newRecord.status || '';
|
|
47
|
+
bizplace = await bizplaceRepo.findOne({ where: { name: domain.name } });
|
|
48
|
+
if (!newRecord.status || newRecord.status === '') {
|
|
49
|
+
newRecord.status = constants_1.PRODUCT_BUNDLE_STATUS.INACTIVE;
|
|
50
|
+
}
|
|
51
|
+
const result = await productBundleRepo.save(Object.assign(Object.assign({}, newRecord), { domain,
|
|
52
|
+
bizplace, status: newRecord.status.toUpperCase(), creator: user, updater: user }));
|
|
53
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (_updateRecords.length > 0) {
|
|
57
|
+
for (let i = 0; i < _updateRecords.length; i++) {
|
|
58
|
+
const newRecord = _updateRecords[i];
|
|
59
|
+
const productBundle = await productBundleRepo.findOne({ domain, id: newRecord.id });
|
|
60
|
+
if (newRecord.status) {
|
|
61
|
+
newRecord.status = newRecord.status.toUpperCase();
|
|
62
|
+
}
|
|
63
|
+
const result = await productBundleRepo.save(Object.assign(Object.assign(Object.assign({}, productBundle), newRecord), { updater: user }));
|
|
64
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return results;
|
|
68
|
+
}
|
|
69
|
+
async deleteProductBundle(name, context) {
|
|
70
|
+
const { domain, user } = context.state;
|
|
71
|
+
await (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle).delete({ domain, name });
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
async deleteProductBundles(ids, context) {
|
|
75
|
+
const { tx, user } = context.state;
|
|
76
|
+
const productBundleRepo = (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle) || tx.getRepository(product_bundle_1.ProductBundle);
|
|
77
|
+
let productBundles = await productBundleRepo.find({ where: { id: (0, typeorm_1.In)(ids) } });
|
|
78
|
+
for (let i = 0; i < productBundles.length; i++) {
|
|
79
|
+
const product = productBundles[i];
|
|
80
|
+
const result = await productBundleRepo.save(Object.assign(Object.assign({}, product), { status: constants_1.PRODUCT_BUNDLE_STATUS.DELETED, updater: user }));
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, type_graphql_1.Mutation)(returns => product_bundle_1.ProductBundle),
|
|
87
|
+
__param(0, (0, type_graphql_1.Arg)('productBundle')),
|
|
88
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", [product_bundle_types_1.NewProductBundle, Object]),
|
|
91
|
+
__metadata("design:returntype", Promise)
|
|
92
|
+
], ProductBundleMutation.prototype, "createProductBundle", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, type_graphql_1.Mutation)(returns => product_bundle_1.ProductBundle),
|
|
95
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
96
|
+
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
97
|
+
__param(2, (0, type_graphql_1.Ctx)()),
|
|
98
|
+
__metadata("design:type", Function),
|
|
99
|
+
__metadata("design:paramtypes", [String, product_bundle_types_1.ProductBundlePatch, Object]),
|
|
100
|
+
__metadata("design:returntype", Promise)
|
|
101
|
+
], ProductBundleMutation.prototype, "updateProductBundle", null);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, type_graphql_1.Mutation)(returns => [product_bundle_1.ProductBundle]),
|
|
104
|
+
__param(0, (0, type_graphql_1.Arg)('patches', type => [product_bundle_types_1.ProductBundlePatch])),
|
|
105
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
106
|
+
__metadata("design:type", Function),
|
|
107
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
108
|
+
__metadata("design:returntype", Promise)
|
|
109
|
+
], ProductBundleMutation.prototype, "updateMultipleProductBundle", null);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
112
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
113
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
114
|
+
__metadata("design:type", Function),
|
|
115
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
116
|
+
__metadata("design:returntype", Promise)
|
|
117
|
+
], ProductBundleMutation.prototype, "deleteProductBundle", null);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
120
|
+
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
121
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
122
|
+
__metadata("design:type", Function),
|
|
123
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
124
|
+
__metadata("design:returntype", Promise)
|
|
125
|
+
], ProductBundleMutation.prototype, "deleteProductBundles", null);
|
|
126
|
+
ProductBundleMutation = __decorate([
|
|
127
|
+
(0, type_graphql_1.Resolver)(product_bundle_1.ProductBundle)
|
|
128
|
+
], ProductBundleMutation);
|
|
129
|
+
exports.ProductBundleMutation = ProductBundleMutation;
|
|
130
|
+
//# sourceMappingURL=product-bundle-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-bundle-mutation.js","sourceRoot":"","sources":["../../../server/service/product-bundle/product-bundle-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,qCAAsE;AAGtE,uDAAmD;AAEnD,+CAAuD;AACvD,qDAAgD;AAChD,iEAA6E;AAG7E,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;IAEhC,KAAK,CAAC,mBAAmB,CACD,aAA+B,EAC9C,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEtC,OAAO,MAAM,IAAA,uBAAa,EAAC,8BAAa,CAAC,CAAC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