cloudcommerce 0.0.62 → 0.0.65
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/.eslintrc.cjs +1 -1
- package/CHANGELOG.md +34 -0
- package/package.json +1 -1
- package/packages/api/lib/api.d.ts +8 -8
- package/packages/api/lib/types/applications.d.ts +2 -2
- package/packages/api/package.json +1 -1
- package/packages/api/src/types/applications.d.ts +2 -2
- package/packages/apps/correios/CHANGELOG.md +1 -0
- package/packages/apps/correios/README.md +1 -0
- package/packages/apps/correios/lib/correios.d.ts +2 -0
- package/packages/apps/correios/lib/correios.js +6 -0
- package/packages/apps/correios/lib/correios.js.map +1 -0
- package/packages/apps/correios/lib/index.d.ts +1 -0
- package/packages/apps/correios/lib/index.js +2 -0
- package/packages/apps/correios/lib/index.js.map +1 -0
- package/packages/apps/correios/lib-mjs/calculate-correios.mjs +470 -0
- package/packages/apps/correios/lib-mjs/correios-ws.mjs +154 -0
- package/packages/apps/correios/package.json +29 -0
- package/packages/apps/correios/src/correios.ts +7 -0
- package/packages/apps/correios/src/index.ts +1 -0
- package/packages/apps/correios/tsconfig.json +6 -0
- package/packages/apps/custom-shipping/CHANGELOG.md +1 -0
- package/packages/apps/custom-shipping/README.md +1 -0
- package/packages/apps/custom-shipping/lib/custom-shipping.d.ts +2 -0
- package/packages/apps/custom-shipping/lib/custom-shipping.js +6 -0
- package/packages/apps/custom-shipping/lib/custom-shipping.js.map +1 -0
- package/packages/apps/custom-shipping/lib/index.d.ts +1 -0
- package/packages/apps/custom-shipping/lib/index.js +2 -0
- package/packages/apps/custom-shipping/lib/index.js.map +1 -0
- package/packages/apps/custom-shipping/lib-mjs/calculate-custom-shipping.mjs +251 -0
- package/packages/apps/custom-shipping/package.json +27 -0
- package/packages/apps/custom-shipping/src/custom-shipping.ts +7 -0
- package/packages/apps/custom-shipping/src/index.ts +1 -0
- package/packages/apps/custom-shipping/tsconfig.json +6 -0
- package/packages/apps/discounts/lib/index.js +1 -1
- package/packages/apps/discounts/package.json +3 -7
- package/packages/apps/tiny-erp/README.md +1 -1
- package/packages/apps/tiny-erp/lib/event-to-tiny.js +0 -2
- package/packages/apps/tiny-erp/lib/event-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/index.js +1 -1
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +9 -6
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/tiny-erp.js +6 -5
- package/packages/apps/tiny-erp/lib/tiny-erp.js.map +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/tiny-erp/src/event-to-tiny.ts +0 -2
- package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +9 -6
- package/packages/apps/tiny-erp/src/tiny-erp.ts +9 -7
- package/packages/cli/package.json +1 -1
- package/packages/events/lib/firebase.js.map +1 -1
- package/packages/events/package.json +1 -1
- package/packages/events/src/firebase.ts +0 -1
- package/packages/firebase/lib/config.d.ts +6 -0
- package/packages/firebase/lib/config.js +6 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/lib/index.js.map +1 -1
- package/packages/firebase/lib/init.js.map +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/config.ts +6 -0
- package/packages/firebase/src/index.ts +0 -1
- package/packages/firebase/src/init.ts +0 -1
- package/packages/modules/lib/firebase/call-app-module.js +33 -13
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/lib/firebase.js.map +1 -1
- package/packages/modules/package.json +3 -1
- package/packages/modules/src/firebase/call-app-module.ts +34 -14
- package/packages/modules/src/firebase.ts +0 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase.js.map +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/ssr/src/firebase.ts +0 -1
- package/packages/storefront/astro.config.mjs +20 -0
- package/packages/storefront/dist/client/assets/_...0b5ebd52.css +1 -0
- package/packages/storefront/dist/client/assets/_...d4aa8aff.css +1 -0
- package/packages/storefront/dist/client/assets/index.5608ba47.css +1 -0
- package/packages/storefront/dist/client/client.dbac84dd.js +1 -0
- package/packages/storefront/dist/client/favicon.ico +0 -0
- package/packages/storefront/dist/client/page.3aa82516.js +1 -0
- package/packages/storefront/dist/client/~partytown/partytown-atomics.js +2 -0
- package/packages/storefront/dist/client/~partytown/partytown-media.js +2 -0
- package/packages/storefront/dist/client/~partytown/partytown-sw.js +2 -0
- package/packages/storefront/dist/client/~partytown/partytown.js +2 -0
- package/packages/storefront/dist/server/entry.mjs +1674 -0
- package/packages/storefront/package.json +7 -3
- package/packages/storefront/public/favicon.ico +0 -0
- package/packages/storefront/src/components/Card.astro +74 -0
- package/packages/storefront/src/layouts/Layout.astro +56 -0
- package/packages/storefront/src/pages/[...slug].astro +76 -0
- package/packages/storefront/src/pages/index.astro +82 -0
- package/packages/storefront/tsconfig.json +3 -0
- package/packages/types/package.json +1 -1
- package/packages/apps/_app.config.js +0 -80
- package/packages/apps/discounts/lib/discounts.config.d.ts +0 -14
- package/packages/apps/discounts/lib/discounts.config.js +0 -19
- package/packages/apps/discounts/lib/discounts.config.js.map +0 -1
- package/packages/apps/discounts/src/discounts.config.ts +0 -25
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.65",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/ecomplus/cloud-commerce/tree/main/packages/storefront#readme",
|
|
18
18
|
"scripts": {
|
|
19
|
-
"
|
|
19
|
+
"dev": "astro dev",
|
|
20
|
+
"start": "astro dev",
|
|
21
|
+
"build": "astro build",
|
|
22
|
+
"preview": "astro preview",
|
|
23
|
+
"astro": "astro"
|
|
20
24
|
},
|
|
21
25
|
"dependencies": {
|
|
22
|
-
"@astrojs/mdx": "^0.10.2",
|
|
23
26
|
"@astrojs/node": "^1.0.0",
|
|
24
27
|
"@astrojs/partytown": "^1.0.0",
|
|
25
28
|
"@astrojs/prefetch": "^0.0.7",
|
|
@@ -31,6 +34,7 @@
|
|
|
31
34
|
"rollup": "^2.78.1",
|
|
32
35
|
"unocss": "^0.45.13",
|
|
33
36
|
"vite": "^3.0.9",
|
|
37
|
+
"vite-plugin-pwa": "^0.12.6",
|
|
34
38
|
"vue": "^3.2.37"
|
|
35
39
|
}
|
|
36
40
|
}
|
|
Binary file
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
export interface Props {
|
|
3
|
+
title: string,
|
|
4
|
+
body: string,
|
|
5
|
+
href: string,
|
|
6
|
+
}
|
|
7
|
+
const {href, title, body} = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
<li class="link-card">
|
|
10
|
+
<a href={href}>
|
|
11
|
+
<h2>
|
|
12
|
+
{title}
|
|
13
|
+
<span>→</span>
|
|
14
|
+
</h2>
|
|
15
|
+
<p>
|
|
16
|
+
{body}
|
|
17
|
+
</p>
|
|
18
|
+
</a>
|
|
19
|
+
</li>
|
|
20
|
+
<style>
|
|
21
|
+
|
|
22
|
+
:root {
|
|
23
|
+
--link-gradient: linear-gradient(45deg, #4F39FA, #DA62C4 30%, var(--color-border) 60%);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.link-card {
|
|
27
|
+
list-style: none;
|
|
28
|
+
display: flex;
|
|
29
|
+
padding: 0.15rem;
|
|
30
|
+
background-image: var(--link-gradient);
|
|
31
|
+
background-size: 400%;
|
|
32
|
+
border-radius: 0.5rem;
|
|
33
|
+
background-position: 100%;
|
|
34
|
+
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.link-card > a {
|
|
38
|
+
width: 100%;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
line-height: 1.4;
|
|
41
|
+
padding: 1em 1.3em;
|
|
42
|
+
border-radius: 0.35rem;
|
|
43
|
+
color: var(--text-color);
|
|
44
|
+
background-color: white;
|
|
45
|
+
opacity: 0.8;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
h2 {
|
|
49
|
+
margin: 0;
|
|
50
|
+
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
p {
|
|
54
|
+
margin-top: 0.75rem;
|
|
55
|
+
margin-bottom: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
h2 span {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.link-card:is(:hover, :focus-within) {
|
|
64
|
+
background-position: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.link-card:is(:hover, :focus-within) h2 {
|
|
68
|
+
color: #4F39FA;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.link-card:is(:hover, :focus-within) h2 span {
|
|
72
|
+
transform: translateX(2px);
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
export interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const { title } = Astro.props as Props;
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!DOCTYPE html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="UTF-8">
|
|
13
|
+
<meta name="viewport" content="width=device-width">
|
|
14
|
+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
15
|
+
<title>{title}</title>
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<slot />
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
:root {
|
|
24
|
+
--font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem);
|
|
25
|
+
--font-size-lg: clamp(1.2rem, 0.7vw + 1.2rem, 1.5rem);
|
|
26
|
+
--font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem);
|
|
27
|
+
|
|
28
|
+
--color-text: hsl(12, 5%, 4%);
|
|
29
|
+
--color-bg: hsl(10, 21%, 95%);
|
|
30
|
+
--color-border: hsl(17, 24%, 90%);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
html {
|
|
34
|
+
font-family: system-ui, sans-serif;
|
|
35
|
+
font-size: var(--font-size-base);
|
|
36
|
+
color: var(--color-text);
|
|
37
|
+
background-color: var(--color-bg);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
body {
|
|
41
|
+
margin: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:global(h1) {
|
|
45
|
+
font-size: var(--font-size-xl);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:global(h2) {
|
|
49
|
+
font-size: var(--font-size-lg);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:global(code) {
|
|
53
|
+
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
|
54
|
+
Bitstream Vera Sans Mono, Courier New, monospace;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
import api from '@cloudcommerce/api';
|
|
3
|
+
import Layout from '../layouts/Layout.astro';
|
|
4
|
+
|
|
5
|
+
const { slug } = Astro.params;
|
|
6
|
+
const { data: { resource, doc } } = await api.get(`slugs/${slug}`, {
|
|
7
|
+
storeId: 1056,
|
|
8
|
+
fetch,
|
|
9
|
+
});
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<Layout title={doc.name}>
|
|
13
|
+
<main>
|
|
14
|
+
<h1>Hello <span class="text-gradient">{doc.name}</span></h1>
|
|
15
|
+
<hr>
|
|
16
|
+
<div class="mt-3">
|
|
17
|
+
<mark>{doc._id}</mark> from <i>{resource}</i>
|
|
18
|
+
<p>{Math.random()}</p>
|
|
19
|
+
<em>Lorem ipsum dolor sit amet</em>
|
|
20
|
+
</div>
|
|
21
|
+
</main>
|
|
22
|
+
</Layout>
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
:root {
|
|
26
|
+
--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
h1 {
|
|
30
|
+
margin: 2rem 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
main {
|
|
34
|
+
margin: auto;
|
|
35
|
+
padding: 1em;
|
|
36
|
+
max-width: 60ch;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.text-gradient {
|
|
40
|
+
font-weight: 900;
|
|
41
|
+
background-image: var(--astro-gradient);
|
|
42
|
+
-webkit-background-clip: text;
|
|
43
|
+
-webkit-text-fill-color: transparent;
|
|
44
|
+
background-size: 100% 200%;
|
|
45
|
+
background-position-y: 100%;
|
|
46
|
+
border-radius: 0.4rem;
|
|
47
|
+
animation: pulse 4s ease-in-out infinite;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes pulse {
|
|
51
|
+
0%, 100% { background-position-y: 0%; }
|
|
52
|
+
50% { background-position-y: 80%; }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.instructions {
|
|
56
|
+
line-height: 1.6;
|
|
57
|
+
margin: 1rem 0;
|
|
58
|
+
background: #4F39FA;
|
|
59
|
+
padding: 1.0rem;
|
|
60
|
+
border-radius: 0.4rem;
|
|
61
|
+
color: var(--color-bg);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.instructions code {
|
|
65
|
+
font-size: 0.875em;
|
|
66
|
+
border: 0.1em solid var(--color-border);
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
padding: 0.15em 0.25em;
|
|
69
|
+
}
|
|
70
|
+
.link-card-grid {
|
|
71
|
+
display: grid;
|
|
72
|
+
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
|
|
73
|
+
gap: 1rem;
|
|
74
|
+
padding: 0;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Layout from '../layouts/Layout.astro';
|
|
3
|
+
import Card from '../components/Card.astro';
|
|
4
|
+
|
|
5
|
+
const fetchingProducts = await fetch('https://ecomplus.io/v2/:1056/products');
|
|
6
|
+
const products = (await fetchingProducts.json()).result;
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<Layout title="Welcome to Astro.">
|
|
10
|
+
<main>
|
|
11
|
+
<h1>Welcome to <span class="text-gradient">Astro</span></h1>
|
|
12
|
+
<p class="instructions">
|
|
13
|
+
Check out the <code>src/pages</code> directory to get started.<br/>
|
|
14
|
+
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
15
|
+
</p>
|
|
16
|
+
<ul role="list" class="link-card-grid">
|
|
17
|
+
<Card href="https://docs.astro.build/" title="Documentation" body="Learn how Astro works and explore the official API docs." />
|
|
18
|
+
<Card href="https://astro.build/integrations/" title="Integrations" body="Supercharge your project with new frameworks and libraries." />
|
|
19
|
+
<Card href="https://astro.build/themes/" title="Themes" body="Explore a galaxy of community-built starter themes." />
|
|
20
|
+
<Card href="https://astro.build/chat/" title="Chat" body="Come say hi to our amazing Discord community. ❤️" />
|
|
21
|
+
</ul>
|
|
22
|
+
<ul role="list" class="mt-3 fs-20">
|
|
23
|
+
{products.map((product) => <li>
|
|
24
|
+
<a href={`/${product.slug}`}>{product.sku}</a>
|
|
25
|
+
</li>)}
|
|
26
|
+
</ul>
|
|
27
|
+
</main>
|
|
28
|
+
</Layout>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
:root {
|
|
32
|
+
--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
h1 {
|
|
36
|
+
margin: 2rem 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
main {
|
|
40
|
+
margin: auto;
|
|
41
|
+
padding: 1em;
|
|
42
|
+
max-width: 60ch;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.text-gradient {
|
|
46
|
+
font-weight: 900;
|
|
47
|
+
background-image: var(--astro-gradient);
|
|
48
|
+
-webkit-background-clip: text;
|
|
49
|
+
-webkit-text-fill-color: transparent;
|
|
50
|
+
background-size: 100% 200%;
|
|
51
|
+
background-position-y: 100%;
|
|
52
|
+
border-radius: 0.4rem;
|
|
53
|
+
animation: pulse 4s ease-in-out infinite;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes pulse {
|
|
57
|
+
0%, 100% { background-position-y: 0%; }
|
|
58
|
+
50% { background-position-y: 80%; }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.instructions {
|
|
62
|
+
line-height: 1.6;
|
|
63
|
+
margin: 1rem 0;
|
|
64
|
+
background: #4F39FA;
|
|
65
|
+
padding: 1.0rem;
|
|
66
|
+
border-radius: 0.4rem;
|
|
67
|
+
color: var(--color-bg);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.instructions code {
|
|
71
|
+
font-size: 0.875em;
|
|
72
|
+
border: 0.1em solid var(--color-border);
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
padding: 0.15em 0.25em;
|
|
75
|
+
}
|
|
76
|
+
.link-card-grid {
|
|
77
|
+
display: grid;
|
|
78
|
+
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
|
|
79
|
+
gap: 1rem;
|
|
80
|
+
padding: 0;
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/* eslint-disable comma-dangle, no-multi-spaces, key-spacing, max-len */
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Edit base E-Com Plus Application object here.
|
|
5
|
-
* Ref.: https://developers.e-com.plus/docs/api/#/store/applications/
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export default () => {
|
|
9
|
-
return {
|
|
10
|
-
app_id: 9000,
|
|
11
|
-
title: 'My Awesome E-Com Plus App',
|
|
12
|
-
slug: 'my-awesome-app',
|
|
13
|
-
type: 'external',
|
|
14
|
-
state: 'active',
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Uncomment modules above to work with E-Com Plus Mods API on Storefront.
|
|
18
|
-
* Ref.: https://developers.e-com.plus/modules-api/
|
|
19
|
-
*/
|
|
20
|
-
modules: {
|
|
21
|
-
/**
|
|
22
|
-
* Triggered to calculate shipping options, must return values and deadlines.
|
|
23
|
-
* Start editing `routes/ecom/modules/calculate-shipping.js`
|
|
24
|
-
*/
|
|
25
|
-
// calculate_shipping: { enabled: true },
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Triggered to validate and apply discount value, must return discount and conditions.
|
|
29
|
-
* Start editing `routes/ecom/modules/apply-discount.js`
|
|
30
|
-
*/
|
|
31
|
-
// apply_discount: { enabled: true },
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Triggered when listing payments, must return available payment methods.
|
|
35
|
-
* Start editing `routes/ecom/modules/list-payments.js`
|
|
36
|
-
*/
|
|
37
|
-
// list_payments: { enabled: true },
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Triggered when order is being closed, must create payment transaction and return info.
|
|
41
|
-
* Start editing `routes/ecom/modules/create-transaction.js`
|
|
42
|
-
*/
|
|
43
|
-
// create_transaction: { enabled: true },
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
admin_settings: {
|
|
47
|
-
/**
|
|
48
|
-
* JSON schema based fields to be configured by merchant and saved to app `data` / `hidden_data`, such as:
|
|
49
|
-
|
|
50
|
-
webhook_uri: {
|
|
51
|
-
schema: {
|
|
52
|
-
type: 'string',
|
|
53
|
-
maxLength: 255,
|
|
54
|
-
format: 'uri',
|
|
55
|
-
title: 'Notifications URI',
|
|
56
|
-
description: 'Unique notifications URI available on your Custom App dashboard'
|
|
57
|
-
},
|
|
58
|
-
hide: true
|
|
59
|
-
},
|
|
60
|
-
token: {
|
|
61
|
-
schema: {
|
|
62
|
-
type: 'string',
|
|
63
|
-
maxLength: 50,
|
|
64
|
-
title: 'App token'
|
|
65
|
-
},
|
|
66
|
-
hide: true
|
|
67
|
-
},
|
|
68
|
-
opt_in: {
|
|
69
|
-
schema: {
|
|
70
|
-
type: 'boolean',
|
|
71
|
-
default: false,
|
|
72
|
-
title: 'Some config option'
|
|
73
|
-
},
|
|
74
|
-
hide: false
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
*/
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
};
|