cezerin2 / client Goto Github PK
View Code? Open in Web Editor NEWJavaScript client for Cezerin REST API
License: MIT License
JavaScript client for Cezerin REST API
License: MIT License
The master code still contains around 20 errors, so please any contributor or member, finish out them so it could be published.
current there is no cezerin2-client, this needs to be set up and linked to this repo. All documentation should be updated to reflect new npm setup.
src/restClient.ts:22:14 - error TS2339: Property 'body' does not exist on type '{ method: string; headers: { "Content-Type": string; Authorization: string; }; }'.
22 config.body = JSON.stringify(data)
~~~~
src/restClient.ts:49:59 - error TS2345: Argument of type 'string' is not assignable to parameter of type '{ [key: string]: any; }'.
49 ${this.baseUrl}${endpoint}?${queryString.stringify(filter)}
,
~~~~~~
src/restClient.ts:50:35 - error TS2554: Expected 2 arguments, but got 3.
50 this.getConfig("get", null, cookie)
~~~~~~
src/restClient.ts:74:48 - error TS2554: Expected 2 arguments, but got 1.
74 return fetch(this.baseUrl + endpoint, this.getConfig("delete")).then(
~~~~~~~~~~~~~~~~~~~
src/restClient.ts:12:29
12 getConfig(method: string, data: string) {
~~~~~~~~~~~~
An argument for 'data' was not provided.
Customer registration, login, password recovery!
src/index.ts:111:7 - error TS2322: Type '{}' is not assignable to type 'string'.
111 baseUrl: this.apiBaseUrl,
src/index.ts:118:19 - error TS2339: Property 'options' does not exist on type 'Products'.
118 this.products.options = new ProductOptions(apiClient)
~~~~~~~
src/index.ts:119:19 - error TS2339: Property 'options' does not exist on type 'Products'.
119 this.products.options.values = new ProductOptionValues(apiClient)
~~~~~~~
src/index.ts:120:19 - error TS2339: Property 'variants' does not exist on type 'Products'.
120 this.products.variants = new ProductVariants(apiClient)
~~~~~~~~
src/index.ts:121:19 - error TS2339: Property 'images' does not exist on type 'Products'.
121 this.products.images = new ProductImages(apiClient)
~~~~~~
src/index.ts:125:17 - error TS2339: Property 'discounts' does not exist on type 'Orders'.
125 this.orders.discounts = new OrderDiscounts(apiClient)
~~~~~~~~~
src/index.ts:126:17 - error TS2339: Property 'transactions' does not exist on type 'Orders'.
126 this.orders.transactions = new OrderTransactions(apiClient)
~~~~~~~~~~~~
src/index.ts:127:17 - error TS2339: Property 'items' does not exist on type 'Orders'.
127 this.orders.items = new OrderItems(apiClient)
~~~~~
src/index.ts:135:16 - error TS2339: Property 'settings' does not exist on type 'Theme'.
135 this.theme.settings = new ThemeSettings(apiClient)
~~~~~~~~
src/index.ts:136:16 - error TS2339: Property 'assets' does not exist on type 'Theme'.
136 this.theme.assets = new ThemeAssets(apiClient)
~~~~~~
src/index.ts:137:16 - error TS2339: Property 'placeholders' does not exist on type 'Theme'.
137 this.theme.placeholders = new ThemePlaceholders(apiClient)
~~~~~~~~~~~~
src/index.ts:189:5 - error TS2739: Type 'WebStoreServices' is missing the following properties from type '{ settings: {}; actions: {}; logs: {}; }': settings, actions, logs
189
src/index.ts:115:49 - error TS2322: Type '{}' is not assignable to type 'string'.
115 const webstoreClient = new WebStoreClient({ token: this.webstoreToken })
src/ajaxClient.ts:4:3 - error TS2416: Property 'getConfig' in type 'AjaxClient' is not assignable to the same property in base type 'RestClient'.
Type '(method: string, data: string, cookie: string) => { credentials: string; method: string; headers: { "Content-Type": string; }; }' is not assignable to type '(method: string, data: string) => { method: string; headers: { "Content-Type": string; Authorization: string; }; }'.
4 getConfig(method: string, data: string, cookie: string) {
~~~~~~~~~
src/ajaxClient.ts:14:22 - error TS2339: Property 'Cookie' does not exist on type '{ "Content-Type": string; }'.
14 config.headers.Cookie = cookie
~~~~~~
src/ajaxClient.ts:18:14 - error TS2339: Property 'body' does not exist on type '{ credentials: string; method: string; headers: { "Content-Type": string; }; }'.
18 config.body = JSON.stringify(data)
~~~~
src/apiClient.ts:14:18 - error TS2339: Property 'returnStatusAndJson' does not exist on type 'typeof RestClient'.
14 RestClient.returnStatusAndJson
~~~~~~~~~~~~~~~~~~~
src/webstoreClient.ts:19:18 - error TS2339: Property 'returnStatusAndJson' does not exist on type 'typeof RestClient'.
19 RestClient.returnStatusAndJson
Customer data form at account page, when you want to edit shipping, billing address not saved.
I have PR for this issue
Setup CircleCI for client repo
https://circleci.com/
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.