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

Document list options #89

Closed
peterpeterparker opened this issue Jan 26, 2024 · 7 comments
Closed

Document list options #89

peterpeterparker opened this issue Jan 26, 2024 · 7 comments
Labels
good first issue Good for newcomers

Comments

@peterpeterparker
Copy link
Contributor

The various options available to listDocs and listAssets - the parameters - are not documented well enough on the website.

This feature request as for goal to improve their documentation including usage/example.

This is the TS code of the parameters.

export interface ListPaginate {
  startAfter?: string;
  limit?: number;
}

export type ListOrderField = 'keys' | 'updated_at' | 'created_at';

export interface ListOrder {
  desc: boolean;
  field: ListOrderField;
}

export type ListOwner = string | Principal;

export interface ListMatcher {
  key?: string;
  description?: string;
}

export interface ListParams {
  matcher?: ListMatcher;
  paginate?: ListPaginate;
  order?: ListOrder;
  owner?: ListOwner;
}
@peterpeterparker peterpeterparker added the good first issue Good for newcomers label Jan 26, 2024
@Etette
Copy link

Etette commented Jan 27, 2024

can you assign me this?

@peterpeterparker
Copy link
Contributor Author

Sure thanks!

The pages/sections to improve are the following: listDocs and listAssets

Let me know if you have questions.

@Demali-876
Copy link
Contributor

Hello has this issue been resolved?

@peterpeterparker
Copy link
Contributor Author

@Demali-876 thanks. Yes it's still available! If you can take care of it that would be wonderful.

@Demali-876
Copy link
Contributor

@peterpeterparker No problem, how/where do i have access to make the changes? Are there guidelines to follow?

@peterpeterparker
Copy link
Contributor Author

@Demali-876 there is no guidelines but, nothing particular to know. Standard contribution flow.

  1. Fork this repo
  2. Clone the project afterwards on your machine
  3. Edit the changes
  4. Create a branch and commit your changes
  5. Provide the changes as a PR

You can find the options to describe in this declarations file: https://github.com/junobuild/juno-js/blob/f2456fde5e2c9e6e7abe66c7f13323fc4c33ddd3/packages/core/src/types/list.types.ts#L110

The options have to be documented in the "List" chapter of following page, maybe in form of a table:

Datastore: https://github.com/junobuild/docs/blob/main/docs/build/datastore.md#list-documents

Storage: https://github.com/junobuild/docs/blob/main/docs/build/storage.md#list-assets

Let me know if you have more questions and thanks!

@peterpeterparker
Copy link
Contributor Author

Resolved by @Demali-876 in #135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants