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

Implement function chaining #18

Open
kelvissu opened this issue Jul 15, 2024 · 3 comments
Open

Implement function chaining #18

kelvissu opened this issue Jul 15, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@kelvissu
Copy link

Currently, only the indexing option on the projects collections object supports returning of the correct project response.

When performing a create or search on the collection of objects, these do not get an equivalent response.

image

@haydenbleasel
Copy link
Contributor

@kelvissu I'm seeing the following in the types:

projects.create returns:

{
  id: string;
  name?: string | null;
  settings?: components["schemas"]["ProjectSettings"];
  quotas?: components["schemas"]["ProjectQuota"];
  quotasUsed?: components["schemas"]["ProjectUsage"];
}

projects.search returns:

{
  id: string;
  name?: string | null;
  settings?: components["schemas"]["ProjectSettings"];
  quotas?: components["schemas"]["ProjectQuota"];
  quotasUsed?: components["schemas"]["ProjectUsage"];
} | undefined

projects.list returns:

{
    id: string;
    name?: string | null;
    settings?: components["schemas"]["ProjectSettings"];
    quotas?: components["schemas"]["ProjectQuota"];
    quotasUsed?: components["schemas"]["ProjectUsage"];
}[]

Which endpoints do you reckon are out of sync?

@kelvissu
Copy link
Author

kelvissu commented Jul 15, 2024

I guess I'm trying to call .update on a .create object. I suppose I can try to set the quota: {cores:} property instead?

Edit: Doesn't seem to work. Is there a way to update the cores of the project after it has been added?

Edit 2: I guess if I ever wanted to edit, this is the only way to do it?

const id = chosenProject!.id; chosenProject?.quotas?.cores! >= 6 || await corellium.project(id).update({id:id, quotas: {cores: 6}});

@haydenbleasel haydenbleasel changed the title Responses for project should be equivalent on search, create, and indexing statements Implement function chaining Jul 16, 2024
@haydenbleasel
Copy link
Contributor

Note from call: Asking if we can do something like

await corellium.project.create({ ... }).update({ ... }).delete()

@haydenbleasel haydenbleasel added the enhancement New feature or request label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants