Code Monkey home page Code Monkey logo

backlog-js's People

Contributors

dependabot[bot] avatar inokappa avatar mmktomato avatar mongolyy avatar netebakari avatar odanado avatar ohyama avatar pdehaan avatar toshimaru avatar vvatanabe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

backlog-js's Issues

Missing endpoints

new old (deprecated)
https://developer.nulab.com/docs/backlog/api/2/get-status-list-of-project/ https://developer.nulab.com/docs/backlog/api/2/get-status-list/
https://developer.nulab.com/docs/backlog/api/2/get-list-of-teams/ https://developer.nulab.com/docs/backlog/api/2/get-list-of-groups/
https://developer.nulab.com/docs/backlog/api/2/add-team/ https://developer.nulab.com/docs/backlog/api/2/add-group/
https://developer.nulab.com/docs/backlog/api/2/get-team/ https://developer.nulab.com/docs/backlog/api/2/get-group/
https://developer.nulab.com/docs/backlog/api/2/update-team/ https://developer.nulab.com/docs/backlog/api/2/update-group/
https://developer.nulab.com/docs/backlog/api/2/delete-team/ https://developer.nulab.com/docs/backlog/api/2/delete-group/
https://developer.nulab.com/docs/backlog/api/2/get-team-icon/ https://developer.nulab.com/docs/backlog/api/2/get-group-icon/
https://developer.nulab.com/docs/backlog/api/2/get-project-team-list/ https://developer.nulab.com/docs/backlog/api/2/get-project-group-list/
https://developer.nulab.com/docs/backlog/api/2/add-project-team/ https://developer.nulab.com/docs/backlog/api/2/add-project-group/
https://developer.nulab.com/docs/backlog/api/2/delete-project-team/ https://developer.nulab.com/docs/backlog/api/2/delete-project-group/

Cannot find name 'IResponse'. on TypeScript compile

I'm trying to use backlog-js in TypeScript project.

When I run tsc, I get an error:

node_modules/backlog-js/dist/backlog.d.ts:20:19 - error TS2304: Cannot find name 'IResponse'.

20       }): Promise<IResponse>;

How can I resolve this issue?

Remove es6-promise

es6-promise can be removed after IE11 retirement (June 15, 2022) as we can expect Promise exists in most environments.
es6-promise is currently in:

  • README.md
  • package.json
  • package-lock.json
  • test/test.ts

0.9.1 ใ‹ใ‚‰ 0.10.0ใธใฎใƒใƒผใ‚ธใƒงใƒณใ‚ขใƒƒใƒ—ใซใ‚ˆใ‚‹่ชฒ้กŒ็™ป้Œฒใ‚จใƒฉใƒผ

Backlog APIใ‚’ไฝฟใ‚ใ›ใฆใ„ใŸใ ใ„ใฆใ„ใ‚‹ใฎใงใ™ใŒใ€
backlog-jsใฎใƒใƒผใ‚ธใƒงใƒณใ‚’ 0.9.1 ใ‹ใ‚‰ 0.10.0 ใซใ‚ขใƒƒใƒ—ใƒ‡ใƒผใƒˆใ™ใ‚‹ใจใ€
Backlogใธไธ‹่จ˜ๆ–‡ๅญ—ๅˆ—ใ‚’ๅซใ‚“ใ ่ชฒ้กŒใ‚’ๆŠ•็จฟใ™ใ‚‹ใจใ€ๅคฑๆ•—ใ™ใ‚‹ใ‚ˆใ†ใซใชใ‚Šใพใ—ใŸใ€‚

''&color(#ffffff, #ff0000) { ่ตค่ƒŒๆ™ฏ็™ฝๆ–‡ๅญ— }''

ๅ›ž้ฟ็ญ–ใชใฉใŒใ‚ใ‚Œใฐๆ•™ใˆใฆใ„ใŸใ ใ‘ใพใ™ใงใ—ใ‚‡ใ†ใ‹ใ€‚
ใ‚ˆใ‚ใ—ใใŠ้ก˜ใ„ใ—ใพใ™ใ€‚

Remove Travis CI settings

I have confirmed our GitHub Actions CI worked fine in the pull request:
#30

So we can remove Travis CI settings.

  • Remove .travis.yml.
  • Status badge in README.md.

c.f. #19

Compile error occurred when using noImplicitAny

I tried backlog-js in my Angular project and I got some compile errors.

Error: node_modules/backlog-js/dist/backlog.d.ts:178:5 - error TS7010: 'postWatchingListItem', which lacks return-type annotation, implicitly has an 'any' return type.

178     postWatchingListItem(params: any);
        ~~~~~~~~~~~~~~~~~~~~

Error: node_modules/backlog-js/dist/backlog.d.ts:180:5 - error TS7010: 'deletehWatchingListItem', which lacks return-type annotation, implicitly has an 'any' return type.

180     deletehWatchingListItem(watchId: number);
        ~~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/backlog-js/dist/backlog.d.ts:183:5 - error TS7010: 'getProjectGroupList', which lacks return-type annotation, implicitly has an 'any' return type.

183     getProjectGroupList(projectIdOrKey: string | number);
        ~~~~~~~~~~~~~~~~~~~

Error: node_modules/backlog-js/dist/backlog.d.ts:185:5 - error TS7010: 'postProjectGroup', which lacks return-type annotation, implicitly has an 'any' return type.

185     postProjectGroup(projectIdOrKey: string | number, params: any);
        ~~~~~~~~~~~~~~~~

Error: node_modules/backlog-js/dist/backlog.d.ts:187:5 - error TS7010: 'deleteProjectGroup', which lacks return-type annotation, implicitly has an 'any' return type.

187     deleteProjectGroup(projectIdOrKey: string | number);

These errors occurred when I enabled noImplicitAny option in tsconfig.json.
And noImplicitAny option is enabled by default in Angular projects.

I think it's better to add types to the return value of these functions.

Wrong url and parameter

Form data is not defined

Hello. I using a code example for oauth2. After I click allow and redirect to my web. This is my function handled callback.

app.get('/callback', async (req, res) => {
    const code = req.query.code;
    try {
        const accessToken = await oauth2.getAccessToken({ host, code, redirectUri });
        console.log('Access Token:', accessToken);

        // save access token.

        const myself = await new backlogjs.Backlog({
            host, accessToken: accessToken.access_token
        }).getMyself();
        console.log('Myself:', myself);

        res.redirect('/');
    } catch (e) {
        console.log('Access Token Error:', e.message);
        res.redirect('/login');
    }
});

I got an error: Access Token Error: FormData is not defined.
This exception throw in this line: const accessToken = await oauth2.getAccessToken({ host, code, redirectUri });

Error on postIssue with categoryId

When posting the following issue:

{
  categoryId: 22853
  description: "Test 2"
  issueTypeId: 87099
  priorityId: 2
  projectId: 20805
  summary: "Test 2"
}

The following error is returned:

{
  message: "error.unknownParameter : categoryId",
  code: 7,
  moreInfo: ""
}

After removing the categoryId parameter, the issue is successfully posted.

Some unused paramters

In src/backlog.ts:

Generate d.ts automatically

Problem

I have to edit dist/backlog.d.ts by myself if I change a type in src/. There's some problems:

  • Risks of forgetting or making a mistake to edit dist/backlog.d.ts.
  • Annoying.

Goal

No manually editing dist/backlog.d.ts.

Idea

npm run build-tsd creates declaration files in dist/src/*.d.ts. I want to use the files instead of dist/backlog.d.ts. Can "types": "dist/src/index.d.ts" in package.json do it?

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.