Skip to content

Commit 62e8984

Browse files
committed
Add sample of onboarding script for connecting with backoffice
1 parent 7993c7c commit 62e8984

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

actions/commerce/generic/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
/**
2+
* Extremely simple example of runtime action, which
3+
* can be used to call external APIs, receiving events
4+
* from Adobe Commerce or anything else.
5+
*/
6+
17
// eslint-disable-next-line no-unused-vars
28
export const main = (params) => {
39
let result
410

511
try {
6-
// let's do something
12+
// @todo let's do something
713
result = {
814
success: true
915
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"type": "module",
77
"scripts": {
88
"lint": "eslint",
9-
"lint:fix": "eslint --fix"
9+
"lint:fix": "eslint --fix",
10+
"onboarding": "node ./scripts/onboarding/index.js"
1011
},
1112
"engines": {
1213
"node": ">=20"

scripts/onboarding/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* The purpose of the onboarding script primarily is
3+
* to create new entities in Adobe I/O Events
4+
* or registering the app in the backoffice.
5+
*/
6+
7+
console.log('You are onboarding!')

0 commit comments

Comments
 (0)