Giter Club home page Giter Club logo

client's Issues

Fixing errors

The master code still contains around 20 errors, so please any contributor or member, finish out them so it could be published.

setup cezerin2 client

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.

Errors on src/restClient.ts

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.

Errors on index.ts

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 })

Small errors

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
~~~~~~~~~~~~~~~~~~~

Errors on src/webstoreClient.ts

src/webstoreClient.ts:19:18 - error TS2339: Property 'returnStatusAndJson' does not exist on type 'typeof RestClient'.

19 RestClient.returnStatusAndJson

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.