MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
941 stars 278 forks source link

Proposing ApiVersion enum #628

Closed TheRealFlyingCoder closed 9 months ago

TheRealFlyingCoder commented 10 months ago

It seems unusual to have the typescript definitions but leave API Version as string given there's a fixed set of options.

Unsure about your naming conventions, but this PR is just what i'd expect from a package:

  1. Export enum of available ApiVersion's
  2. Take string | ApiVersion enum, so you can still build if the enum becomes outdated with later releases.
import Shopify, { ApiVersion } from 'shopify-api-node';

const client = new Shopify({
    accessToken,
    shopName,
    apiVersion: ApiVersion.July23
})

Happy to make any tweaks

lpinca commented 10 months ago

Thank you but I don't find it very useful and keeping it is sync would be a maintenance burden.