@unchainedshop/plugins 2.0.0-beta3 → 2.0.0-beta5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/delivery/pick-mup.js +2 -2
- package/lib/delivery/pick-mup.js.map +1 -1
- package/lib/delivery/post.js +2 -2
- package/lib/delivery/post.js.map +1 -1
- package/lib/delivery/send-message.js +2 -2
- package/lib/delivery/send-message.js.map +1 -1
- package/lib/delivery/stores.js +2 -2
- package/lib/delivery/stores.js.map +1 -1
- package/lib/enrollments/licensed.js +1 -1
- package/lib/enrollments/licensed.js.map +1 -1
- package/lib/files/gridfs/gridfs-adapter.js +1 -1
- package/lib/files/gridfs/gridfs-adapter.js.map +1 -1
- package/lib/files/minio/minio-adapter.js +1 -1
- package/lib/files/minio/minio-adapter.js.map +1 -1
- package/lib/filters/local-search.js +1 -1
- package/lib/filters/local-search.js.map +1 -1
- package/lib/filters/strict-equal.js +1 -1
- package/lib/filters/strict-equal.js.map +1 -1
- package/lib/payment/apple-iap/adapter.js +1 -1
- package/lib/payment/apple-iap/adapter.js.map +1 -1
- package/lib/payment/bity/adapter.js +1 -1
- package/lib/payment/bity/adapter.js.map +1 -1
- package/lib/payment/braintree.js +1 -1
- package/lib/payment/braintree.js.map +1 -1
- package/lib/payment/cryptopay/plugin.js +1 -1
- package/lib/payment/cryptopay/plugin.js.map +1 -1
- package/lib/payment/datatrans-v2/index.js +1 -1
- package/lib/payment/datatrans-v2/index.js.map +1 -1
- package/lib/payment/invoice-prepaid.js +2 -2
- package/lib/payment/invoice-prepaid.js.map +1 -1
- package/lib/payment/invoice.js +2 -2
- package/lib/payment/invoice.js.map +1 -1
- package/lib/payment/paypal-checkout.js +2 -2
- package/lib/payment/paypal-checkout.js.map +1 -1
- package/lib/payment/postfinance-checkout/index.js +1 -1
- package/lib/payment/postfinance-checkout/index.js.map +1 -1
- package/lib/payment/stripe.js +1 -1
- package/lib/payment/stripe.js.map +1 -1
- package/lib/payment/worldline-saferpay/index.js +1 -1
- package/lib/payment/worldline-saferpay/index.js.map +1 -1
- package/lib/pricing/delivery-swiss-tax.js +1 -1
- package/lib/pricing/delivery-swiss-tax.js.map +1 -1
- package/lib/pricing/discount-100-off.js +1 -1
- package/lib/pricing/discount-100-off.js.map +1 -1
- package/lib/pricing/discount-half-price-manual.js +2 -2
- package/lib/pricing/discount-half-price-manual.js.map +1 -1
- package/lib/pricing/discount-half-price.js +1 -1
- package/lib/pricing/discount-half-price.js.map +1 -1
- package/lib/pricing/free-delivery.js +1 -1
- package/lib/pricing/free-delivery.js.map +1 -1
- package/lib/pricing/free-payment.js +1 -1
- package/lib/pricing/free-payment.js.map +1 -1
- package/lib/pricing/order-delivery.js +1 -1
- package/lib/pricing/order-delivery.js.map +1 -1
- package/lib/pricing/order-discount.js +1 -1
- package/lib/pricing/order-discount.js.map +1 -1
- package/lib/pricing/order-items-discount.js +1 -1
- package/lib/pricing/order-items-discount.js.map +1 -1
- package/lib/pricing/order-items.js +1 -1
- package/lib/pricing/order-items.js.map +1 -1
- package/lib/pricing/order-payment.js +1 -1
- package/lib/pricing/order-payment.js.map +1 -1
- package/lib/pricing/product-catalog-price.js +1 -1
- package/lib/pricing/product-catalog-price.js.map +1 -1
- package/lib/pricing/product-discount.js +1 -1
- package/lib/pricing/product-discount.js.map +1 -1
- package/lib/pricing/product-price-rateconversion.js +1 -1
- package/lib/pricing/product-price-rateconversion.js.map +1 -1
- package/lib/pricing/product-price-round.js +1 -1
- package/lib/pricing/product-price-round.js.map +1 -1
- package/lib/pricing/product-swiss-tax.js +1 -1
- package/lib/pricing/product-swiss-tax.js.map +1 -1
- package/lib/quotations/manual.js +1 -1
- package/lib/quotations/manual.js.map +1 -1
- package/lib/warehousing/{infinite-minter.d.ts → eth-minter.d.ts} +0 -0
- package/lib/warehousing/eth-minter.js +124 -0
- package/lib/warehousing/eth-minter.js.map +1 -0
- package/lib/warehousing/google-sheets.js +1 -1
- package/lib/warehousing/google-sheets.js.map +1 -1
- package/lib/warehousing/store.js +1 -1
- package/lib/warehousing/store.js.map +1 -1
- package/lib/worker/{BulkImportWorker.d.ts → bulk-import.d.ts} +0 -0
- package/lib/worker/{BulkImportWorker.js → bulk-import.js} +2 -2
- package/lib/worker/bulk-import.js.map +1 -0
- package/lib/worker/email.js +1 -1
- package/lib/worker/email.js.map +1 -1
- package/lib/worker/{GenerateOrderWorker.d.ts → enrollment-order-generator.d.ts} +0 -0
- package/lib/worker/{GenerateOrderWorker.js → enrollment-order-generator.js} +2 -2
- package/lib/worker/enrollment-order-generator.js.map +1 -0
- package/lib/worker/export-token.js +1 -1
- package/lib/worker/export-token.js.map +1 -1
- package/lib/worker/external.js +1 -1
- package/lib/worker/external.js.map +1 -1
- package/lib/worker/heartbeat.js +1 -1
- package/lib/worker/heartbeat.js.map +1 -1
- package/lib/worker/http-request.js +1 -1
- package/lib/worker/http-request.js.map +1 -1
- package/lib/worker/{MessageWorker.d.ts → message.d.ts} +0 -0
- package/lib/worker/{MessageWorker.js → message.js} +2 -2
- package/lib/worker/message.js.map +1 -0
- package/lib/worker/sms.js +1 -1
- package/lib/worker/sms.js.map +1 -1
- package/lib/worker/update-coinbase-rates.js +1 -1
- package/lib/worker/update-coinbase-rates.js.map +1 -1
- package/lib/worker/update-ecb-rates.js +1 -1
- package/lib/worker/update-ecb-rates.js.map +1 -1
- package/lib/worker/update-token-ownership.js +2 -2
- package/lib/worker/update-token-ownership.js.map +1 -1
- package/lib/worker/{ZombieKillerWorker.d.ts → zombie-killer.d.ts} +0 -0
- package/lib/worker/{ZombieKillerWorker.js → zombie-killer.js} +2 -2
- package/lib/worker/zombie-killer.js.map +1 -0
- package/package.json +27 -20
- package/src/delivery/pick-mup.ts +2 -2
- package/src/delivery/post.ts +2 -2
- package/src/delivery/send-message.ts +2 -2
- package/src/delivery/stores.ts +2 -2
- package/src/enrollments/licensed.ts +1 -1
- package/src/files/gridfs/gridfs-adapter.ts +1 -1
- package/src/files/minio/minio-adapter.ts +1 -1
- package/src/filters/local-search.ts +1 -1
- package/src/filters/strict-equal.ts +1 -1
- package/src/payment/apple-iap/adapter.ts +1 -1
- package/src/payment/bity/adapter.ts +1 -1
- package/src/payment/braintree.ts +1 -1
- package/src/payment/cryptopay/module/configureCryptopayModule.ts +1 -1
- package/src/payment/cryptopay/plugin.ts +1 -1
- package/src/payment/datatrans-v2/index.ts +1 -1
- package/src/payment/invoice-prepaid.ts +2 -2
- package/src/payment/invoice.ts +2 -2
- package/src/payment/paypal-checkout.ts +2 -2
- package/src/payment/postfinance-checkout/index.ts +1 -1
- package/src/payment/stripe.ts +1 -1
- package/src/payment/worldline-saferpay/index.ts +1 -1
- package/src/pricing/delivery-swiss-tax.ts +1 -1
- package/src/pricing/discount-100-off.ts +1 -1
- package/src/pricing/discount-half-price-manual.ts +2 -2
- package/src/pricing/discount-half-price.ts +1 -1
- package/src/pricing/free-delivery.ts +1 -1
- package/src/pricing/free-payment.ts +1 -1
- package/src/pricing/order-delivery.ts +1 -1
- package/src/pricing/order-discount.ts +1 -1
- package/src/pricing/order-items-discount.ts +1 -1
- package/src/pricing/order-items.ts +1 -1
- package/src/pricing/order-payment.ts +1 -1
- package/src/pricing/product-catalog-price.ts +1 -1
- package/src/pricing/product-discount.ts +1 -1
- package/src/pricing/product-price-rateconversion.ts +1 -1
- package/src/pricing/product-price-round.ts +1 -1
- package/src/pricing/product-swiss-tax.ts +1 -1
- package/src/quotations/manual.ts +1 -1
- package/src/warehousing/eth-minter.ts +153 -0
- package/src/warehousing/google-sheets.ts +1 -1
- package/src/warehousing/store.ts +1 -1
- package/src/worker/{BulkImportWorker.ts → bulk-import.ts} +1 -1
- package/src/worker/email.ts +1 -1
- package/src/worker/{GenerateOrderWorker.ts → enrollment-order-generator.ts} +1 -1
- package/src/worker/export-token.ts +1 -1
- package/src/worker/external.ts +1 -1
- package/src/worker/heartbeat.ts +1 -1
- package/src/worker/http-request.ts +1 -1
- package/src/worker/{MessageWorker.ts → message.ts} +1 -1
- package/src/worker/sms.ts +1 -1
- package/src/worker/update-coinbase-rates.ts +1 -1
- package/src/worker/update-ecb-rates.ts +1 -1
- package/src/worker/update-token-ownership.ts +2 -2
- package/src/worker/{ZombieKillerWorker.ts → zombie-killer.ts} +1 -1
- package/lib/warehousing/infinite-minter.js +0 -50
- package/lib/warehousing/infinite-minter.js.map +0 -1
- package/lib/worker/BulkImportWorker.js.map +0 -1
- package/lib/worker/GenerateOrderWorker.js.map +0 -1
- package/lib/worker/MessageWorker.js.map +0 -1
- package/lib/worker/ZombieKillerWorker.js.map +0 -1
- package/src/warehousing/infinite-minter.ts +0 -66
|
@@ -5,8 +5,8 @@ const SendMessage: IDeliveryAdapter = {
|
|
|
5
5
|
...DeliveryAdapter,
|
|
6
6
|
|
|
7
7
|
key: 'shop.unchained.delivery.send-message',
|
|
8
|
-
label: 'Forward
|
|
9
|
-
version: '1.0',
|
|
8
|
+
label: 'Forward via Messaging',
|
|
9
|
+
version: '1.0.0',
|
|
10
10
|
|
|
11
11
|
initialConfiguration: [
|
|
12
12
|
{ key: 'from', value: '' },
|
package/src/delivery/stores.ts
CHANGED
|
@@ -5,8 +5,8 @@ const PickMup: IDeliveryAdapter = {
|
|
|
5
5
|
...DeliveryAdapter,
|
|
6
6
|
|
|
7
7
|
key: 'shop.unchained.stores',
|
|
8
|
-
label: '
|
|
9
|
-
version: '1.0',
|
|
8
|
+
label: 'Pre-configured Stores',
|
|
9
|
+
version: '1.0.0',
|
|
10
10
|
|
|
11
11
|
typeSupported: (type) => {
|
|
12
12
|
return type === DeliveryProviderType.PICKUP;
|
|
@@ -109,7 +109,7 @@ const getExpiryDate = () => new Date(new Date().getTime() + PUT_URL_EXPIRY);
|
|
|
109
109
|
export const MinioAdapter: IFileAdapter = {
|
|
110
110
|
key: 'shop.unchained.file-upload-plugin.minio',
|
|
111
111
|
label: 'Uploads files into an S3 bucket using minio',
|
|
112
|
-
version: '1.0',
|
|
112
|
+
version: '1.0.0',
|
|
113
113
|
|
|
114
114
|
...FileAdapter,
|
|
115
115
|
|
package/src/payment/braintree.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface CryptopayModule {
|
|
|
20
20
|
currency: string;
|
|
21
21
|
orderPaymentId: string;
|
|
22
22
|
}) => Promise<CryptopayTransaction>;
|
|
23
|
-
getNextDerivationNumber: (currency: string) => Promise<number
|
|
23
|
+
getNextDerivationNumber: (currency: string) => Promise<number>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export const configureCryptopayModule = ({ db }: { db: Db }): CryptopayModule => {
|
package/src/payment/invoice.ts
CHANGED
package/src/payment/stripe.ts
CHANGED
|
@@ -5,8 +5,8 @@ const HalfPriceManual: IDiscountAdapter = {
|
|
|
5
5
|
...OrderDiscountAdapter,
|
|
6
6
|
|
|
7
7
|
key: 'shop.unchained.discount.half-price-manual',
|
|
8
|
-
label: 'Half Price',
|
|
9
|
-
version: '1.0',
|
|
8
|
+
label: 'Half Price Manual',
|
|
9
|
+
version: '1.0.0',
|
|
10
10
|
orderIndex: 2,
|
|
11
11
|
|
|
12
12
|
// return true if a discount is allowed to get added manually by a user
|
|
@@ -5,7 +5,7 @@ const ProductPriceRateConversion: IProductPricingAdapter = {
|
|
|
5
5
|
...ProductPricingAdapter,
|
|
6
6
|
|
|
7
7
|
key: 'shop.unchained.pricing.rate-conversion',
|
|
8
|
-
version: '1.0',
|
|
8
|
+
version: '1.0.0',
|
|
9
9
|
label: 'Generic rate conversion plugin that converts between rates if entry in DB exists.',
|
|
10
10
|
orderIndex: 1,
|
|
11
11
|
|
package/src/quotations/manual.ts
CHANGED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WarehousingDirector,
|
|
3
|
+
WarehousingAdapter,
|
|
4
|
+
WarehousingProviderType,
|
|
5
|
+
} from '@unchainedshop/core-warehousing';
|
|
6
|
+
import { ProductType, ProductContractStandard } from '@unchainedshop/types/products';
|
|
7
|
+
import { IWarehousingAdapter, WarehousingError } from '@unchainedshop/types/warehousing';
|
|
8
|
+
import { generateDbObjectId, systemLocale } from '@unchainedshop/utils';
|
|
9
|
+
|
|
10
|
+
const { MINTER_TOKEN_OFFSET = '0' } = process.env;
|
|
11
|
+
|
|
12
|
+
const ETHMinter: IWarehousingAdapter = {
|
|
13
|
+
...WarehousingAdapter,
|
|
14
|
+
|
|
15
|
+
key: 'shop.unchained.warehousing.infinite-minter',
|
|
16
|
+
version: '1.0',
|
|
17
|
+
label: 'Infinite Minter',
|
|
18
|
+
orderIndex: 0,
|
|
19
|
+
|
|
20
|
+
initialConfiguration: [{ key: 'chainId', value: '0' }],
|
|
21
|
+
|
|
22
|
+
typeSupported: (type) => {
|
|
23
|
+
return type === WarehousingProviderType.VIRTUAL;
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
actions: (configuration, context) => {
|
|
27
|
+
const { product, orderPosition, token, modules, localeContext } = context;
|
|
28
|
+
return {
|
|
29
|
+
...WarehousingAdapter.actions(configuration, context),
|
|
30
|
+
|
|
31
|
+
isActive() {
|
|
32
|
+
return product?.type === ProductType.TokenizedProduct;
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
configurationError() {
|
|
36
|
+
return null as any as WarehousingError;
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
stock: async () => {
|
|
40
|
+
const existingTokens = await modules.warehousing.findTokens(
|
|
41
|
+
product.tokenization.contractStandard === 'ERC721'
|
|
42
|
+
? { contractAddress: product.tokenization.contractAddress }
|
|
43
|
+
: {
|
|
44
|
+
contractAddress: product.tokenization.contractAddress,
|
|
45
|
+
chainTokenId: product.tokenization.tokenId,
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
const tokensCreated = existingTokens.reduce((acc, curToken) => {
|
|
49
|
+
return acc + curToken.quantity;
|
|
50
|
+
}, 0);
|
|
51
|
+
|
|
52
|
+
return product?.tokenization?.supply ? product.tokenization.supply - tokensCreated : 0;
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
tokenize: async () => {
|
|
56
|
+
// Upload Image to IPFS
|
|
57
|
+
// Upload Metadata to IPFS
|
|
58
|
+
// Prepare metadata
|
|
59
|
+
|
|
60
|
+
const chainId = configuration.find(({ key }) => key === 'chainId')?.value || undefined;
|
|
61
|
+
const { contractAddress, contractStandard, tokenId } = product?.tokenization || {};
|
|
62
|
+
const _id = generateDbObjectId();
|
|
63
|
+
const meta = { contractStandard };
|
|
64
|
+
|
|
65
|
+
const existingTokens = await modules.warehousing.findTokens(
|
|
66
|
+
product.tokenization.contractStandard === 'ERC721'
|
|
67
|
+
? { contractAddress: product.tokenization.contractAddress }
|
|
68
|
+
: {
|
|
69
|
+
contractAddress: product.tokenization.contractAddress,
|
|
70
|
+
chainTokenId: product.tokenization.tokenId,
|
|
71
|
+
},
|
|
72
|
+
);
|
|
73
|
+
const tokensCreated = existingTokens.reduce((acc, curToken) => {
|
|
74
|
+
return acc + curToken.quantity;
|
|
75
|
+
}, 0);
|
|
76
|
+
|
|
77
|
+
if (contractStandard === 'ERC721') {
|
|
78
|
+
// ERC721 is non-fungible, thus every _id unique!
|
|
79
|
+
return new Array(orderPosition?.quantity).fill(null).map((_, i) => ({
|
|
80
|
+
_id,
|
|
81
|
+
chainTokenId: Number(parseInt(MINTER_TOKEN_OFFSET, 10) + tokensCreated + (i + 1)).toString(),
|
|
82
|
+
contractAddress,
|
|
83
|
+
quantity: 1,
|
|
84
|
+
chainId,
|
|
85
|
+
meta,
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
// ERC1155 is fungible, allow the same tokenId
|
|
89
|
+
return [
|
|
90
|
+
{
|
|
91
|
+
_id,
|
|
92
|
+
chainTokenId: tokenId,
|
|
93
|
+
contractAddress,
|
|
94
|
+
quantity: orderPosition?.quantity,
|
|
95
|
+
chainId,
|
|
96
|
+
meta,
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
tokenMetadata: async () => {
|
|
102
|
+
// if ERC721 -> tokenUri
|
|
103
|
+
// if ERC1155 -> uri
|
|
104
|
+
// -> use the contract to get the correct metadata uri from tokenId
|
|
105
|
+
|
|
106
|
+
// depending on the ERC, build the correct metadata json schema
|
|
107
|
+
// https://eips.ethereum.org/EIPS/eip-1155
|
|
108
|
+
// https://eips.ethereum.org/EIPS/eip-721
|
|
109
|
+
|
|
110
|
+
const allLanguages = await modules.languages.findLanguages({
|
|
111
|
+
includeInactive: false,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const [firstMedia] = await modules.products.media.findProductMedias({
|
|
115
|
+
productId: product._id,
|
|
116
|
+
limit: 1,
|
|
117
|
+
});
|
|
118
|
+
const file = firstMedia && (await modules.files.findFile({ fileId: firstMedia.mediaId }));
|
|
119
|
+
const url = file && (await modules.files.getUrl(file, {}));
|
|
120
|
+
const text = await modules.products.texts.findLocalizedText({
|
|
121
|
+
productId: product._id,
|
|
122
|
+
locale: localeContext.normalized,
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
if (product.tokenization.contractStandard === ProductContractStandard.ERC1155) {
|
|
126
|
+
const isDefaultLanguageActive = localeContext.language === systemLocale.language;
|
|
127
|
+
const localization = isDefaultLanguageActive
|
|
128
|
+
? {
|
|
129
|
+
uri: `${process.env.ROOT_URL}/erc-metadata/${product._id}/{locale}/${product.tokenization.tokenId}.json`,
|
|
130
|
+
default: systemLocale.language,
|
|
131
|
+
locales: allLanguages.map((lang) => lang.isoCode),
|
|
132
|
+
}
|
|
133
|
+
: undefined;
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
name: `${text.title} #${token.chainTokenId}`,
|
|
137
|
+
description: text.description,
|
|
138
|
+
image: url,
|
|
139
|
+
properties: product.meta,
|
|
140
|
+
localization,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
name: text.title,
|
|
145
|
+
description: text.description,
|
|
146
|
+
image: url,
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
WarehousingDirector.registerAdapter(ETHMinter);
|
|
@@ -109,8 +109,8 @@ const GoogleSheets: IWarehousingAdapter = {
|
|
|
109
109
|
...WarehousingAdapter,
|
|
110
110
|
|
|
111
111
|
key: 'shop.unchained.warehousing.google-sheets',
|
|
112
|
-
version: '1.0',
|
|
113
112
|
label: 'Google Sheets',
|
|
113
|
+
version: '1.0.0',
|
|
114
114
|
orderIndex: 0,
|
|
115
115
|
|
|
116
116
|
typeSupported: (type) => {
|
package/src/warehousing/store.ts
CHANGED
|
@@ -51,7 +51,7 @@ export const BulkImportWorker: IWorkerAdapter<any, Record<string, unknown>> = {
|
|
|
51
51
|
|
|
52
52
|
key: 'shop.unchained.worker-plugin.bulk-import',
|
|
53
53
|
label: 'Bulk Import',
|
|
54
|
-
version: '1.0',
|
|
54
|
+
version: '1.0.0',
|
|
55
55
|
type: 'BULK_IMPORT',
|
|
56
56
|
|
|
57
57
|
doWork: async (rawPayload, unchainedAPI) => {
|
package/src/worker/email.ts
CHANGED
|
@@ -83,7 +83,7 @@ const GenerateOrderWorker: IWorkerAdapter<any, any> = {
|
|
|
83
83
|
|
|
84
84
|
key: 'shop.unchained.worker-plugin.generate-enrollment-orders',
|
|
85
85
|
label: 'Generates new Orders from Enrollments',
|
|
86
|
-
version: '1.0',
|
|
86
|
+
version: '1.0.0',
|
|
87
87
|
type: 'ENROLLMENT_ORDER_GENERATOR',
|
|
88
88
|
|
|
89
89
|
doWork: async (input, requestContext) => {
|
|
@@ -7,7 +7,7 @@ export const ExportTokenWorker: IWorkerAdapter<void, void> = {
|
|
|
7
7
|
|
|
8
8
|
key: 'shop.unchained.worker-plugin.export-token',
|
|
9
9
|
label: 'External worker to hold the state of the minting/export process of tokens',
|
|
10
|
-
version: '1.0',
|
|
10
|
+
version: '1.0.0',
|
|
11
11
|
type: 'EXPORT_TOKEN',
|
|
12
12
|
external: true,
|
|
13
13
|
|
package/src/worker/external.ts
CHANGED
|
@@ -6,7 +6,7 @@ export const ExternalWorkerPlugin: IWorkerAdapter<void, void> = {
|
|
|
6
6
|
|
|
7
7
|
key: 'shop.unchained.worker-plugin.external',
|
|
8
8
|
label: 'External plugin as a placeholder for workers who interact with the system only via GraphQL',
|
|
9
|
-
version: '1.0',
|
|
9
|
+
version: '1.0.0',
|
|
10
10
|
type: 'EXTERNAL',
|
|
11
11
|
external: true,
|
|
12
12
|
|
package/src/worker/heartbeat.ts
CHANGED
|
@@ -26,7 +26,7 @@ const HttpRequestWorkerPlugin: IWorkerAdapter<
|
|
|
26
26
|
|
|
27
27
|
key: 'shop.unchained.worker-plugin.http-request',
|
|
28
28
|
label: 'Request a resource via http request. 200 = success',
|
|
29
|
-
version: '1.0',
|
|
29
|
+
version: '1.0.0',
|
|
30
30
|
type: 'HTTP_REQUEST',
|
|
31
31
|
|
|
32
32
|
async doWork({ url, data = {}, headers, method = 'POST' } = { method: 'POST' }) {
|
|
@@ -14,7 +14,7 @@ export const MessageWorker: IWorkerAdapter<
|
|
|
14
14
|
|
|
15
15
|
key: 'shop.unchained.worker-plugin.message',
|
|
16
16
|
label: 'Send Message by combining payload with a template and start concrete jobs',
|
|
17
|
-
version: '1.0',
|
|
17
|
+
version: '1.0.0',
|
|
18
18
|
type: 'MESSAGE',
|
|
19
19
|
|
|
20
20
|
doWork: async ({ template, ...payload }, requestContext, workId) => {
|