Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api-client): auto-generated js api-client sdk #852

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

wibus-wee
Copy link
Member

@wibus-wee wibus-wee commented Sep 2, 2023

Unfinished tasks ❎

  • The interface with the path * cannot be compiled properly.
  • Critical type error.

Path *

If * is present in the path, TypeError: Unexpected MODIFIER at <NUMBER>, expected END is automatically returned at build time.

PS: After fixing this issue, some existing interfaces need to be added back.

Type

When I run pnpm build in package/api-client, the compiler returns a lot of errors:

Found 948 errors in 63 files.

Errors  Files
     2  ../../api-client/functional/aggregate/clear/index.ts:7
     2  ../../api-client/functional/aggregate/feed/index.ts:7
     3  ../../api-client/functional/aggregate/index.ts:7
     3  ../../api-client/functional/aggregate/sitemap/index.ts:7
     3  ../../api-client/functional/api/auth/token/index.ts:7
     3  ../../api-client/functional/category/index.ts:7
     2  ../../api-client/functional/comments/index.ts:7
     2  ../../api-client/functional/comments/pids/index.ts:7
     2  ../../api-client/functional/comments/post/index.ts:7
     3  ../../api-client/functional/comments/reaction/index.ts:7
     2  ../../api-client/functional/comments/reply/index.ts:7
     2  ../../api-client/functional/configs/index.ts:7
     2  ../../api-client/functional/console/index.ts:7
     6  ../../api-client/functional/friends/alive/index.ts:7
     6  ../../api-client/functional/friends/all/index.ts:7
     2  ../../api-client/functional/friends/check/index.ts:7
     2  ../../api-client/functional/friends/feeds/contents/index.ts:7
     2  ../../api-client/functional/friends/feeds/index.ts:7
     3  ../../api-client/functional/friends/index.ts:7
     3  ../../api-client/functional/friends/status/index.ts:7
     3  ../../api-client/functional/migrate/index.ts:7
     2  ../../api-client/functional/page/index.ts:7
     2  ../../api-client/functional/post/index.ts:7
     2  ../../api-client/functional/schedule/index.ts:7
     2  ../../api-client/functional/schedule/run/index.ts:7
     3  ../../api-client/functional/store/index.ts:7
     3  ../../api-client/functional/store/move/index.ts:7
     2  ../../api-client/functional/themes/config/index.ts:7
     2  ../../api-client/functional/themes/index.ts:7
     3  ../../api-client/functional/themes/manager/index.ts:7
     2  ../../api-client/functional/user/check/index.ts:7
     2  ../../api-client/functional/user/index.ts:7
     3  ../../api-client/functional/user/info/index.ts:7
     2  ../../api-client/functional/user/master/info/index.ts:7
     2  ../../api-client/functional/user/session/all/index.ts:7
     2  ../../api-client/functional/user/session/index.ts:7
     2  ../../api-client/functional/user/sessions/index.ts:7
     1  ../../api-client/HttpError.ts:1
     1  ../../api-client/IConnection.ts:1

I even saw some incorrect import methods:

import type { __type } from "./../../../../apps/core/src/modules/store/store.controller";
// But there is actually no `__type`

@wibus-wee wibus-wee added enhancement New feature or request breaking change WIP PRs in WIP labels Sep 2, 2023
@wibus-wee wibus-wee self-assigned this Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change enhancement New feature or request WIP PRs in WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant