@cloudcommerce/app-discounts 0.0.50 → 0.0.53
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/.turbo/turbo-build.log +5 -5
- package/lib/discounts.config.d.ts +14 -0
- package/lib/discounts.config.js +19 -0
- package/lib/discounts.config.js.map +1 -0
- package/lib/discounts.d.ts +2 -0
- package/lib/discounts.js +7 -0
- package/lib/discounts.js.map +1 -0
- package/lib/index.d.ts +1 -3
- package/lib/index.js +1 -8
- package/lib/index.js.map +1 -1
- package/package.json +5 -4
- package/src/discounts.config.ts +25 -0
- package/src/discounts.ts +8 -0
- package/src/index.ts +1 -9
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
1
|
+
[35m@cloudcommerce/app-discounts:build[0m: cache hit, replaying output [2ma0c98d2c53b0210b[0m
|
|
2
|
+
[35m@cloudcommerce/app-discounts:build: [0m
|
|
3
|
+
[35m@cloudcommerce/app-discounts:build: [0m> @cloudcommerce/app-discounts@0.0.52 build /home/leo/code/ecomplus/cloud-commerce/packages/apps/discounts
|
|
4
|
+
[35m@cloudcommerce/app-discounts:build: [0m> sh ../../../scripts/build-lib.sh
|
|
5
|
+
[35m@cloudcommerce/app-discounts:build: [0m
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import config from '@cloudcommerce/firebase/lib/config';
|
|
2
|
+
|
|
3
|
+
export default () => {
|
|
4
|
+
const { lang, apps: { discounts: { appId } } } = config.get();
|
|
5
|
+
return {
|
|
6
|
+
app_id: appId,
|
|
7
|
+
title: lang.startsWith('en') ? 'Campaigns and discounts' : 'Campanhas e descontos',
|
|
8
|
+
slug: 'discounts',
|
|
9
|
+
type: 'external',
|
|
10
|
+
state: 'active',
|
|
11
|
+
modules: {
|
|
12
|
+
apply_discount: {
|
|
13
|
+
enabled: true,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
admin_settings: {},
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
// # sourceMappingURL=discounts.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discounts.config.js","sourceRoot":"","sources":["../src/discounts.config.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oCAAoC,CAAC;AAExD,eAAe,GAAG,EAAE;IAClB,MAAM,EACJ,IAAI,EACJ,IAAI,EAAE,EACJ,SAAS,EAAE,EAAE,KAAK,EAAE,GACrB,GACF,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;IAEjB,OAAO;QACL,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,uBAAuB;QAClF,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE;YACP,cAAc,EAAE;gBACd,OAAO,EAAE,IAAI;aACd;SACF;QACD,cAAc,EAAE,EACf;KACF,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/discounts.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discounts.js","sourceRoot":"","sources":["../src/discounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,OAAsB,EAAE,EAAE;IAC5D,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrB,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-discounts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.53",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for complex discount rules",
|
|
6
|
-
"main": "lib/
|
|
6
|
+
"main": "lib/discounts.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/ecomplus/cloud-commerce.git",
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/ecomplus/cloud-commerce/tree/main/packages/apps/discounts#readme",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@cloudcommerce/api": "0.0.
|
|
19
|
+
"@cloudcommerce/api": "0.0.53",
|
|
20
|
+
"@cloudcommerce/firebase": "0.0.53",
|
|
20
21
|
"firebase-admin": "^11.0.1",
|
|
21
22
|
"firebase-functions": "^3.22.0"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
|
-
"@cloudcommerce/types": "0.0.
|
|
25
|
+
"@cloudcommerce/types": "0.0.53",
|
|
25
26
|
"@firebase/app-types": "^0.7.0"
|
|
26
27
|
},
|
|
27
28
|
"scripts": {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import config from '@cloudcommerce/firebase/lib/config';
|
|
2
|
+
|
|
3
|
+
export default () => {
|
|
4
|
+
const {
|
|
5
|
+
lang,
|
|
6
|
+
apps: {
|
|
7
|
+
discounts: { appId },
|
|
8
|
+
},
|
|
9
|
+
} = config.get();
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
app_id: appId,
|
|
13
|
+
title: lang.startsWith('en') ? 'Campaigns and discounts' : 'Campanhas e descontos',
|
|
14
|
+
slug: 'discounts',
|
|
15
|
+
type: 'external',
|
|
16
|
+
state: 'active',
|
|
17
|
+
modules: {
|
|
18
|
+
apply_discount: {
|
|
19
|
+
enabled: true,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
admin_settings: {
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
};
|
package/src/discounts.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
2
|
+
import type { AppModuleBody } from '@cloudcommerce/types';
|
|
3
|
+
import { logger } from 'firebase-functions';
|
|
4
|
+
|
|
5
|
+
export const applyDiscount = async (modBody: AppModuleBody) => {
|
|
6
|
+
logger.info(modBody);
|
|
7
|
+
return {};
|
|
8
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { logger } from 'firebase-functions';
|
|
3
|
-
|
|
4
|
-
export const events: AppEventsTopic[] = [];
|
|
5
|
-
|
|
6
|
-
export const applyDiscount = async () => {
|
|
7
|
-
logger.info('Hello discounts app');
|
|
8
|
-
return {};
|
|
9
|
-
};
|
|
1
|
+
export * from './discounts';
|