@things-factory/marketplace-base 5.0.0 → 5.0.7
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/resolvers/marketplace-product/upsert-marketplace-product.js +2 -1
- package/dist-server/graphql/resolvers/marketplace-product/upsert-marketplace-product.js.map +1 -1
- package/package.json +6 -6
- package/server/graphql/resolvers/marketplace-product/upsert-marketplace-product.ts +5 -2
|
@@ -22,8 +22,9 @@ exports.upsertMarketplaceProduct = {
|
|
|
22
22
|
const attachments = file.map(attachment => {
|
|
23
23
|
return {
|
|
24
24
|
file: attachment,
|
|
25
|
+
refType: constants_1.ATTACHMENT_TYPE.MARKETPLACE_PRODUCT,
|
|
25
26
|
refBy: foundProd.id,
|
|
26
|
-
category: constants_1.ATTACHMENT_TYPE.MARKETPLACE_PRODUCT
|
|
27
|
+
category: constants_1.ATTACHMENT_TYPE.MARKETPLACE_PRODUCT /* TODO use refType */
|
|
27
28
|
};
|
|
28
29
|
});
|
|
29
30
|
await (0, attachment_base_1.createAttachments)(_, { attachments }, context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert-marketplace-product.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/marketplace-product/upsert-marketplace-product.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"upsert-marketplace-product.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/marketplace-product/upsert-marketplace-product.ts"],"names":[],"mappings":";;;AAEA,qEAA+E;AAI/E,kDAAoD;AACpD,gDAAsD;AACtD,6EAAuE;AACvE,6EAAuE;AAE1D,QAAA,wBAAwB,GAAG;IACtC,KAAK,CAAC,wBAAwB,CAAC,CAAM,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,OAAY;QAC/E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAE7F,IAAI,YAAgC,CAAA;QACpC,YAAY,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,6BAAkB,CAAC,CAAC,OAAO,CAAC;YAChE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAAE;SAChF,CAAC,CAAA;QAEF,IAAI,YAAY,EAAE;YAChB,MAAM,IAAA,qDAAwB,EAAC,YAAY,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;SAC3E;aAAM;YACL,MAAM,SAAS,GAAuB,MAAM,IAAA,qDAAwB,EAAC,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;YAE1G,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,EAAE;gBAChB,MAAM,WAAW,GAAiB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;oBACtD,OAAO;wBACL,IAAI,EAAE,UAAU;wBAChB,OAAO,EAAE,2BAAe,CAAC,mBAAmB;wBAC5C,KAAK,EAAE,SAAS,CAAC,EAAE;wBACnB,QAAQ,EAAE,2BAAe,CAAC,mBAAmB,CAAC,sBAAsB;qBACrE,CAAA;gBACH,CAAC,CAAC,CAAA;gBACF,MAAM,IAAA,mCAAiB,EAAC,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,CAAC,CAAA;aACrD;SACF;IACH,CAAC;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/marketplace-base",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.7",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@things-factory/env": "^5.0.0",
|
|
28
|
-
"@things-factory/integration-fulfillment": "^5.0.
|
|
29
|
-
"@things-factory/integration-marketplace": "^5.0.
|
|
30
|
-
"@things-factory/product-base": "^5.0.
|
|
31
|
-
"@things-factory/shell": "^5.0.
|
|
28
|
+
"@things-factory/integration-fulfillment": "^5.0.7",
|
|
29
|
+
"@things-factory/integration-marketplace": "^5.0.7",
|
|
30
|
+
"@things-factory/product-base": "^5.0.7",
|
|
31
|
+
"@things-factory/shell": "^5.0.7"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "1c7c7618e2e3c9ef8b07d730c3df84c8bc01b35f"
|
|
34
34
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm'
|
|
2
|
+
|
|
1
3
|
import { Attachment, createAttachments } from '@things-factory/attachment-base'
|
|
2
4
|
import { User } from '@things-factory/auth-base'
|
|
3
5
|
import { Domain } from '@things-factory/shell'
|
|
4
|
-
|
|
6
|
+
|
|
5
7
|
import { ATTACHMENT_TYPE } from '../../../constants'
|
|
6
8
|
import { MarketplaceProduct } from '../../../entities'
|
|
7
9
|
import { createMarketplaceProduct } from './create-marketplace-product'
|
|
@@ -25,8 +27,9 @@ export const upsertMarketplaceProduct = {
|
|
|
25
27
|
const attachments: Attachment[] = file.map(attachment => {
|
|
26
28
|
return {
|
|
27
29
|
file: attachment,
|
|
30
|
+
refType: ATTACHMENT_TYPE.MARKETPLACE_PRODUCT,
|
|
28
31
|
refBy: foundProd.id,
|
|
29
|
-
category: ATTACHMENT_TYPE.MARKETPLACE_PRODUCT
|
|
32
|
+
category: ATTACHMENT_TYPE.MARKETPLACE_PRODUCT /* TODO use refType */
|
|
30
33
|
}
|
|
31
34
|
})
|
|
32
35
|
await createAttachments(_, { attachments }, context)
|