Giter Site home page Giter Site logo

ekkolon / gelato-admin-node Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 3.0 803 KB

Node.js API for Gelato's print-on-demand services.

Home Page: https://ekkolon.github.io/gelato-admin-node/

License: Apache License 2.0

TypeScript 98.48% JavaScript 1.52%
api api-client gelato gelato-api javascript nodejs print-on-demand typescript

gelato-admin-node's People

Contributors

dependabot[bot] avatar ekkolon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gelato-admin-node's Issues

Improve README

Some paragraphs in the README file are either redundant or need semantic improvements.

[Bug] e2e test fail at `ordersAPI#getOrders`

Which gelato/* package(s) are the source of the bug?

orders

Is this a regression?

No

Description

All E2E test pass, except ordersAPI#getOrders.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

`AxiosError: Request failed with status code 405`

Please provide the environment you discovered this bug in

Node: 18.16.1
Package Manager: yarn 1.22.19
OS: Debian (WSL)

Gelato SDK: 1.1.5

Anything else?

  • In earlier versions test DID pass.
  • A 405 http error code suggest, we are using an disallowed HTTP method.

Add Webhooks event handlers

Which Gelato package(s) are relevant/related to the feature request?

No response

Description

It would be great to provide a way to intercept the request/response cycle of http servers (express + fastify). The interceptor should provide a callable function signature users can import from the library.

Proposed solution

TBA

Alternatives considered

N/A

Add v3 legacy support

Which Gelato package(s) are relevant/related to the feature request?

orders

Description

The current release only targets the latest API version of Gelato's orders API (v4).
We can confidently assume that there are still many systems relying on the v3 legacy version.

There are two main reasons for providing legacy support:

  1. Maintain compatibility: There may be existing applications that rely on the v3 functionality.
    In many cases it would be undesirable to force consumers of this library to migrate to v4.
  2. Expand user base: By adding legacy support, we appeal to a broader range of users.

Proposed solution

Due to Gelato's API design, it makes sense to keep this libraries namespaces in sync with it.
For example, we can use gelato-admin/v3/orders as the go to namespace for the orders API.

In any case, besides some changes in the return types for endpoints targeting the orders API,
we must provide two additional endpoints:

  1. Get shipping address
  2. Update shipping address

This feature must not introduce any breaking changes, since it should use the same design patterns and parent container (GelatoClient) as the latest orders API version.

Alternatives considered

N/A

Unable to eslint workspace

Which gelato/* package(s) are the source of the bug?

orders, products, shipment

Is this a regression?

No

Description

yarn lint or yarn lint:fix fail to execute on Windows machines.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No files matching the pattern "'**/*.ts'" were found.
Please check for typing mistakes in the pattern.

Please provide the environment you discovered this bug in

Node: v18.16.1
Package Manager: yarn 1.22.19
OS: windows 11

Gelato SDK: 1.1.0
-------------------------------------------------------------
ESLint: 8.48.0

Anything else?

The issue comes from the following lines in the package.json file:

https://github.com/ekkolon/gelato-admin-node/blob/105008b114a98063bc10db45bad19904bae4b6c6/package.json#L14C1-L15C42

I suspect the error is caused by using single quotes instead of escaped double quotes.


The following changes should fix this issue:

BEFORE:

"lint": "eslint '**/*.ts'",
"lint:fix": "eslint --fix '**/*.ts'",

AFTER:

"lint": "eslint \"**/*.ts\""
"lint:fix": "eslint --fix \"**/*.ts\""

[Feature Request] Add support for new `Ecommerce` API feature

Which Gelato package(s) are relevant/related to the feature request?

No response

Description

Gelato added a new Ecommerce API feature that is currently missing in this repo.

Proposed solution

Add support for Ecommerce feature.

Alternatives considered

N/A

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.