Skip to content

Commit 6838c84

Browse files
committed
Minor changes
1 parent d47199f commit 6838c84

6 files changed

Lines changed: 18 additions & 19 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Header and Footer currently have a support to variables (Only 1 actualy)
197197

198198
### Dynamic variables
199199

200-
Variables are defined using double curly braces (`{{ }}`) and correspond to fields in the Magento GraphQL product output. For example, `{{sku}}` will be replaced with the product's SKU.
200+
Variables are defined using double curly braces (`{{ }}`) and correspond to fields in the Adobe Commerce GraphQL product output. For example, `{{sku}}` will be replaced with the product's SKU.
201201

202202
##### Additonal parameters
203203

@@ -281,9 +281,9 @@ Regenerate Feed - will trigger the event “generate.feed” for a particular fe
281281

282282
Action will be invoked when `feed.generate` event added.
283283

284-
* `getGqlSchema` - retrieve graphql schema from target magento app.
284+
* `getGqlSchema` - retrieve graphql schema from target Adobe Commerce.
285285

286-
* `getAllStores` - get all Magento stores by API
286+
* `getAllStores` - get all Adobe Commerce Stores by API
287287

288288
* `generateByCron` - trigger feed generation by OpenWisk alarms.
289289

@@ -310,7 +310,7 @@ Action is running every 30 minutes and checking by feed settings if it have to b
310310
* Feed Item: Big text field to have XML | JSON there with feed item body
311311
* Feed Header
312312
* Feed Footer
313-
* Store View - select with list of available store views on Magento (websites also have to be there, but it is not possible to select them)
313+
* Store View - select with list of available store views on Adobe Commerce (websites also have to be there, but it is not possible to select them)
314314

315315
After saving the form, it saved into key/value storage and user have to be redirected to dashboard. Success message have to be shown there.
316316

adobe-api/mesh/mesh.json.dist

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@
77
"graphql": {
88
"endpoint": "AC-URL/graphql",
99
"operationHeaders": {
10-
"store": "{context.headers['store']}",
11-
"Content-Type": "application/json"
10+
"Content-Type": "application/json",
11+
"Magento-Environment-Id": "{context.headers['Magento-Environment-Id']}",
12+
"Magento-Website-Code": "{context.headers['Magento-Website-Code']}",
13+
"Magento-Store-View-Code": "{context.headers['Magento-Store-View-Code']}",
14+
"Magento-Store-Code": "{context.headers['Magento-Store-Code']}",
15+
"Magento-Customer-Group": "{context.headers['Magento-Customer-Group']}",
16+
"x-api-key": "{context.headers['x-api-key']}",
17+
"Authorization": "{context.headers['Authorization']}",
18+
"store": "{context.headers['store']}"
1219
}
1320
}
1421
}

env.dist

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ AC_DEFAULT_STORE_CODE=default
1010
OAUTH_BASE_URL=https://ims-na1.adobelogin.com/ims/token/
1111
IO_MANAGEMENT_BASE_URL=https://api.adobe.io/events/
1212

13-
13+
# Event provider for feed generation
1414
FEED_GENERATOR_PROVIDER_ID=
1515

1616
# Rest API URL. Commerce base URL should finish with slash '/'
@@ -24,7 +24,9 @@ COMMERCE_CONSUMER_SECRET=
2424
COMMERCE_ACCESS_TOKEN=
2525
COMMERCE_ACCESS_TOKEN_SECRET=
2626

27-
# OAuth configs
27+
# OAuth configs for SaaS (IMS)
28+
## More info: https://developer.adobe.com/developer-console/docs/guides/authentication/ServerToServerAuthentication/implementation
29+
2830
OAUTH_CLIENT_ID=
2931
OAUTH_CLIENT_SECRET=
3032
OAUTH_TECHNICAL_ACCOUNT_ID=

extension-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"id": "feedGenerator",
44
"description": "Feed Generator - Extension that allow to create different product feed files from Adobe Commerce products",
55
"displayName": "Feed Generator - Extension that allow to create different product feed files from Adobe Commerce products",
6-
"version": "1.0.0",
6+
"version": "2.0.0",
77
"platform": "web"
88
}

src/commerce-backend-ui-1/actions/acGqlLib/schema.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
const {getIntrospectionQuery} = require("graphql");
22
const {errorResponse} = require("./../utils.js");
3-
const { Core } = require('@adobe/aio-sdk');
4-
53
/**
64
* Return GQL schema or throw error
75
*
@@ -10,16 +8,9 @@ const { Core } = require('@adobe/aio-sdk');
108
*/
119
async function getSchema(params) {
1210

13-
const logger = Core.Logger('main', { level: params.LOG_LEVEL || 'info' })
14-
1511
const gqlUrl = params['AC_GRAPHQL_URL']
16-
17-
logger.error('Debug getSchema')
18-
logger.error(gqlUrl)
1912
const introspectionQuery = getIntrospectionQuery();
2013

21-
logger.error(introspectionQuery)
22-
2314
const result = await fetch(gqlUrl, {
2415
method: 'POST',
2516
headers: {

src/commerce-backend-ui-1/actions/magentoActions/getGqlSchema.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ async function main (params) {
1010

1111
try {
1212

13-
logger.info('Debug getGqlSchema')
1413
let schema = await getSchema(params)
1514
const responseData = JSON.stringify(schema)
1615

0 commit comments

Comments
 (0)