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

Integrations support + Prejournal, Tiki #65

Merged
merged 10 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 177 additions & 0 deletions architecture/integration/img/integration.class.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions architecture/integration/integration.class.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
@startuml
'https://plantuml.com/class-diagram

hide circle
allowmixing

abstract class Account <<subject>> {
timesheet : Timesheet [*]
project : Project [*]
integration : IntegrationExtension [*]
}

class Timesheet <<domain>> <<subject>> {
project : Project [*]
external : Reference [0..1]
}
note left of Timesheet::external
The original
system of record
end note

Account *--> "*" Timesheet

class IntegrationExtension <<subject>> {
module : string
appliesTo : Timesheet | Project [*]
}
note top of IntegrationExtension
Represents another system
whose language we speak,
for the limited purpose
of pushing //updates// and
responding //snapshots//
end note

note right of IntegrationExtension::module
NodeJS ESM import of
Integration class
end note

note right of IntegrationExtension::appliesTo
Selection of account-
owned data
end note

IntegrationExtension -- "*" Timesheet

Account *--> "*" IntegrationExtension

abstract class Integration <<javascript>> {
{static} configKey : string
{static} contentType : string
constructor(config, ext)
entryUpdate(tsId, update, state)
reportTimesheet(tsId, state) : Stream
accountUpdate(update)
}
note right of Integration::constructor
passed configuration (inc. secrets)
and extension, can have properties
storing additional data
end note

note right of Integration::entryUpdate
Update of Timesheet Entries.
Provided with the Timesheet
ID, raw m-ld update, the
current Timesheet state
end note

note right of Integration::accountUpdate
Limited account updates e.g.
create/delete Timesheet
end note

IntegrationExtension -- "implementation" Integration

@enduml
12 changes: 12 additions & 0 deletions architecture/use-case/administration.use-case.puml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ package "Account administration" {
project must exist
end note

usecase integrations as ([list | add | rm] ts or project integration)
User --> integrations
note right of integrations
≪constraint≫
timesheet or project must exist
end note
note right of integrations
≪trigger≫
garbage collect integration
stored data
end note

' TODO
User --> (revoke all device access)
note right
Expand Down
46 changes: 35 additions & 11 deletions architecture/use-case/img/administration.use-case.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading