Skip to content

Conversation

@atkinchris
Copy link

This adds support for typed methods, by generating endpoint and method types. This is largely taken from scripts in @octokit/plugin-rest-endpoint-methods.

As @octokit/types does not support GHEC types, we cannot import endpoint types directly. Instead, we generate them for this package from @octokit/openapi-types-ghec.

This adds support for typed methods, by generating endpoint and method types. This is largely taken from scripts in "@octokit/plugin-rest-endpoint-methods".

As "@octokit/types" does not support GHEC types, we cannot import endpoint types directly. Instead, we generate them for this package from "@octokit/openapi-types-ghec".
@github-actions
Copy link
Contributor

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@atkinchris
Copy link
Author

Bizarrely, I'm seeing a TS2339 error for some of the Endpoint keys - which looks like a false positive. As an example:

image

deleteUserFromEnterprise: {
parameters: RequestParameters &
Endpoints["DELETE /scim/v2/enterprises/{enterprise}/users/{scim_user_id}"]["parameters"];
response: Endpoints["DELETE /scim/v2/enterprises/{enterprise}/users/{scim_user_id}"]["response"];
};

However, it does exist!

/**
* @see https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#delete-a-scim-user-from-an-enterprise
*/
"DELETE /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": Operation<
"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}",
"delete"
>;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

1 participant