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

Refactor AppModels according to refined API spec #5

Merged
merged 3 commits into from
Nov 30, 2024

Conversation

Arlodotexe
Copy link
Member

@Arlodotexe Arlodotexe commented Nov 30, 2024

Related to #4

Refactor AppModels to align with the refined API specification.

  • Add IReadOnlyEntity interface with common properties and events.
  • Add IModifiableEntity interface with common methods for updating properties.
  • Modify IReadOnlyUser to inherit from IReadOnlyEntity, remove MarkdownAboutMe and Icon properties, add ExtendedDescription property, and add methods for retrieving publishers and projects along with their roles.
  • Modify IModifiableUser to inherit from IModifiableEntity, remove UpdateMarkdownAboutMeAsync and UpdateIconAsync methods, and add methods for adding/removing publishers and projects along with their roles.
  • Modify IReadOnlyPublisher to inherit from IReadOnlyEntity, remove Owner, ContactEmail, and Icon properties, add ExtendedDescription and ForgetMe properties, add methods for retrieving users along with their roles, and add properties for Connections and Links.
  • Modify IModifiablePublisher to inherit from IModifiableEntity, remove UpdateOwnerAsync and UpdateIconAsync methods, add methods for adding/removing users along with their roles, and add methods for adding/removing connections and links.
  • Modify IReadOnlyProject to inherit from IReadOnlyEntity, remove HeroImage, CreatedAt, and Icon properties, add ExtendedDescription property, and replace Cid and DagCid with IReadOnlyConnection.
  • Modify IModifiableProject to inherit from IModifiableEntity, remove UpdateHeroImageAsync and UpdateIconAsync methods, add methods for adding/removing connections, and replace Cid and DagCid with IReadOnlyConnection.
  • Add IReadOnlyConnection interface with properties Key and Value, and event handlers for ValueChanged.
  • Add IModifiableConnection interface with methods for updating Key and Value.

For more details, open the Copilot Workspace session.

Related to #4

Refactor AppModels to align with the refined API specification.

* Add `IReadOnlyEntity` interface with common properties and events.
* Add `IModifiableEntity` interface with common methods for updating properties.
* Modify `IReadOnlyUser` to inherit from `IReadOnlyEntity`, remove `MarkdownAboutMe` and `Icon` properties, add `ExtendedDescription` property, and add methods for retrieving publishers and projects along with their roles.
* Modify `IModifiableUser` to inherit from `IModifiableEntity`, remove `UpdateMarkdownAboutMeAsync` and `UpdateIconAsync` methods, and add methods for adding/removing publishers and projects along with their roles.
* Modify `IReadOnlyPublisher` to inherit from `IReadOnlyEntity`, remove `Owner`, `ContactEmail`, and `Icon` properties, add `ExtendedDescription` and `ForgetMe` properties, add methods for retrieving users along with their roles, and add properties for Connections and Links.
* Modify `IModifiablePublisher` to inherit from `IModifiableEntity`, remove `UpdateOwnerAsync` and `UpdateIconAsync` methods, add methods for adding/removing users along with their roles, and add methods for adding/removing connections and links.
* Modify `IReadOnlyProject` to inherit from `IReadOnlyEntity`, remove `HeroImage`, `CreatedAt`, and `Icon` properties, add `ExtendedDescription` property, and replace `Cid` and `DagCid` with `IReadOnlyConnection`.
* Modify `IModifiableProject` to inherit from `IModifiableEntity`, remove `UpdateHeroImageAsync` and `UpdateIconAsync` methods, add methods for adding/removing connections, and replace `Cid` and `DagCid` with `IReadOnlyConnection`.
* Add `IReadOnlyConnection` interface with properties `Key` and `Value`, and event handlers for ValueChanged.
* Add `IModifiableConnection` interface with methods for updating `Key` and `Value`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/WindowsAppCommunity/WinAppCommunity.Sdk/issues/4?shareId=XXXX-XXXX-XXXX-XXXX).
@Arlodotexe
Copy link
Member Author

Arlodotexe commented Nov 30, 2024

Hit quota before I could finish, still needs:

Create common interfaces (one read-only, one modifiable) for collections of IReadOnlyConnection

Will do the remaining work offline.

@Arlodotexe Arlodotexe merged commit 81806e0 into main Nov 30, 2024
1 check passed
@Arlodotexe Arlodotexe deleted the Arlodotexe/refactor-appmodels branch November 30, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant