zalando-incubator / atlas-js-core Goto Github PK
View Code? Open in Web Editor NEWJavaScript SDK Core for Zalando Checkout, Guest Checkout, and Catalog APIs
License: Other
JavaScript SDK Core for Zalando Checkout, Guest Checkout, and Catalog APIs
License: Other
We need to get config info, e.g. clientId, salesChannel
Create Confirm Order API Call
Fix bug if no payment was selected due to an error or user clicks cancel/back
Add gn-pages setup and link to docs
We need to have a method to get country code based on sales_channel
For us poor souls who are using an IDE ;)
TypeError: undefined is not an object
anonymous
fillFetchHeaders
initializeFetchRequest
[native code]
fetch
c — index-a74b11c5dfc0928bb4e9.js:23038
configure — index-a74b11c5dfc0928bb4e9.js:23253
(anonymous function) — index-a74b11c5dfc0928bb4e9.js:30831
t — index-a74b11c5dfc0928bb4e9.js:10
(anonymous function) — index-a74b11c5dfc0928bb4e9.js:34
t — index-a74b11c5dfc0928bb4e9.js:10
(anonymous function) — index-a74b11c5dfc0928bb4e9.js:13
Global Code — index-a74b11c5dfc0928bb4e9.js:14
We have an urgent bug in Travis CI config which prevents producing new versions (https://travis-ci.org/zalando-incubator/atlas-js-core/jobs/248732762):
npm ERR! publish Failed PUT 401
npm ERR! Linux 4.8.12-040812-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v7.10.0/bin/node" "/home/travis/.nvm/versions/node/v7.10.0/bin/npm" "publish"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code E401
npm ERR! You must be logged in to publish packages : atlas-sdk-core
It might be connected with NPM API key format changes. Check http://docs.travis-ci.com/user/deployment/npm/
Setup new project
SDK cannot be used in Node.js env, var atlasSdkCore = require("atlas-sdk-core")
causes the following error:
ReferenceError: self is not defined.
Try to reproduce: https://runkit.com/589c3bd8c90f930014b5d6b3/589c3bd8c90f930014b5d6b4
Adapt to Catalog-API new changes
Right now, we use the saleschannel provided by a client. We should use the configuration provides by the config API instead.
We need to implemented something similar to https://github.com/Moya/Moya approach to make API calls
Remove Image 360 as a predefined image format as it is not supported yet
We need to implemented something similar to https://github.com/Moya/Moya approach to make API calls
Handle redirect back to update guest checkout and handle tokens:
Since we have a so called lifecycle inside our SDK we need to have possibility to extend it. Let's create a very simple callback hooks.
As example let's create the plugin for Sentry
catalog-api is changing the mapping for images and videos
Add LICENSE for individual dependencies
This software is licensed under the MIT license (see below), unless otherwise stated in the license files in higher directories (if any).
Support ArticleURL field in the article object that points to the main website
We need to support reviews for the Catalog API.
create models for checkout api
In order to have optimized size image for mobile devices we need a new resolution: 480px width will be enough.
Mock config-api so the API URLs can be pointed to localhost.
The first time you call catalog recommendations, you dont have the tracking string. The response will have it then and then you use it for every further call.
Therefore we need the tracking string in the model (see catalog swagger) and have it optional.
Figure out if we want to recommend partner items.
Use correct values in zappr yaml to enforce correct approval flow.
Hi. I'm trying to launch SDK example but getting the following error:
Error: Model validation error: atlas-catalog-api is not of type object. The value is undefined
.
I use this code:
import AtlasSDK from 'atlas-sdk-core';
AtlasSDK.configure({
client_id: 'xxxxx_xxxxxx',
sales_channel: 'xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx',
}).then((sdk) => {
// sdk instance is ready to use
const article = sdk.getArticle('AD112B0F6-A11');
console.log('Article name: ' + article.name);
}).catch((error) => {
console.error(error);
});
Can anybody help me?
Fix for optional recommendation in some clients, if backend does not return recommendation array
Add Product Recommendation Endpoint to Core
The config is an array but not implemented as one
We should provide a full URL on media items and not only a product path.
Handle media item type: (360 Image or Video, etc..)
Redirect to Payment Gateway if 'Location' header is present
All possible SalesChannel are configured in the config API. We should use the values from there and client using the sdk can choose from the existing channels instead of confuguring their own
Setup Codecov for the project
We are using plain old JSON for making API requests. Our models should be used instead.
There is a case when no payment method is provided while using Guest Checkout. In this case CreateOrderRedirectResponse should be returned with only one field: redirectURL.
We need to rethink AtlasSDK#configure() again: maybe go with Soundcloud approach https://developers.soundcloud.com/docs/api/sdks#javascript
Since there are different recommendation configurations, we need to supply our config params to the endpoint via header (here).
The headers are the following:
X_RECO_TYPE // the reco type
X_RECO_LOCATION // the reco location (pdp, order confirmation, ...)
X_CHANNEL // the channel (similiar, personalized, ...)
As of now, catalog has a fallback and will supply default values if no headers are present.
The defaults will be removed in the near future, so treat this as breaking changes in catalog!
Article Reviews are optional now.
Send tracking_string: '' with the first call getRecomendation()
Create GuestCheckout GET call using encrypted tokens
Investigate why do we have a final, minimized bundle size >100kb.
Update Webpack to the version 2.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.