woocommerce / woocommerce-rest-api-js-lib

New JavaScript library for WooCommerce REST API
https://www.npmjs.com/package/@woocommerce/woocommerce-rest-api
MIT License
272 stars 77 forks source link

Typescript definitions not included in npm package #71

Open florianbepunkt opened 4 years ago

florianbepunkt commented 4 years ago

Although merged in #35 npm package does not include ts definitions. Version 1.0.1

package.json from installed module for reference:

{
  "_from": "@woocommerce/woocommerce-rest-api",
  "_id": "@woocommerce/woocommerce-rest-api@1.0.1",
  "_inBundle": false,
  "_integrity": "sha512-YBk3EEYE0zax/egx6Rhpbu6hcCFyZpYQrjH9JO4NUGU3n3T0W9Edn7oAUbjL/c7Oezcg+UaQluCaKjY/B3zwxg==",
  "_location": "/@woocommerce/woocommerce-rest-api",
  "_phantomChildren": {},
  "_requested": {
    "type": "tag",
    "registry": true,
    "raw": "@woocommerce/woocommerce-rest-api",
    "name": "@woocommerce/woocommerce-rest-api",
    "escapedName": "@woocommerce%2fwoocommerce-rest-api",
    "scope": "@woocommerce",
    "rawSpec": "",
    "saveSpec": null,
    "fetchSpec": "latest"
  },
  "_requiredBy": [
    "#USER",
    "/"
  ],
  "_resolved": "https://registry.npmjs.org/@woocommerce/woocommerce-rest-api/-/woocommerce-rest-api-1.0.1.tgz",
  "_shasum": "112b998e8e3758203a71d5e3e0b24efcb1cff842",
  "_spec": "@woocommerce/woocommerce-rest-api",
  "_where": "/Users/florian/Github Repositories/jarvis-serverless",
  "author": {
    "name": "Automattic"
  },
  "bugs": {
    "url": "https://github.com/woocommerce/woocommerce-rest-api-js/issues"
  },
  "bundleDependencies": false,
  "dependencies": {
    "axios": "^0.19.0",
    "create-hmac": "^1.1.7",
    "oauth-1.0a": "^2.2.6",
    "url-parse": "^1.4.7"
  },
  "deprecated": false,
  "description": "WooCommerce REST API - JavaScript Library",
  "devDependencies": {
    "@babel/cli": "7.5.5",
    "@babel/core": "7.5.5",
    "@babel/plugin-transform-modules-commonjs": "7.5.0",
    "@babel/preset-env": "7.5.5",
    "babel-jest": "24.8.0",
    "del-cli": "2.0.0",
    "eslint": "6.1.0",
    "eslint-config-prettier": "6.0.0",
    "eslint-config-standard": "13.0.1",
    "eslint-plugin-import": "2.18.2",
    "eslint-plugin-jest": "22.14.1",
    "eslint-plugin-node": "9.1.0",
    "eslint-plugin-prettier": "3.1.0",
    "eslint-plugin-promise": "4.2.1",
    "eslint-plugin-standard": "4.0.0",
    "husky": "3.0.2",
    "jest": "24.8.0",
    "lint-staged": "9.2.1",
    "nock": "10.0.6",
    "prettier": "1.18.2"
  },
  "engines": {
    "node": ">=8.0.0"
  },
  "files": [
    "index.js",
    "index.mjs"
  ],
  "homepage": "https://github.com/woocommerce/woocommerce-rest-api-js-lib",
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "keywords": [
    "wordpress",
    "woocommerce",
    "rest",
    "promise",
    "node"
  ],
  "license": "MIT",
  "lint-staged": {
    "*.{js,mjs}": [
      "eslint --fix",
      "prettier --write",
      "git add"
    ]
  },
  "main": "index",
  "name": "@woocommerce/woocommerce-rest-api",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/woocommerce/woocommerce-rest-api-js.git"
  },
  "scripts": {
    "build": "del index.js && babel index.mjs --out-dir .",
    "format": "prettier --write \"*.mjs\" \"test.js\"",
    "lint": "eslint *.mjs",
    "postversion": "git push && git push --tags",
    "prepare": "npm run build",
    "prepublishOnly": "npm test && npm run lint",
    "preversion": "npm run lint",
    "test": "jest",
    "version": "npm run format && git add -A"
  },
  "version": "1.0.1"
}
climba03003 commented 4 years ago

You can check in npmjs.com. Version 1.0.1 is published a year ago. The new version still haven't published. I am thinking of publish the typing in @DefinitelyTyped instead of waiting this package to be updated.

illestomas commented 3 years ago

@climba03003 that would be awesome

climba03003 commented 3 years ago

Published at https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46123

illestomas commented 3 years ago

Hi @climba03003,

I've just checked out the package, it's fine for now, but there are a lot of missing types for example request params and data.

climba03003 commented 3 years ago

I cant make all of those params and data because all endpoint share the same function.