Skip to content

Commit 80414a3

Browse files
dtscalacLynxLynxxdamian-molinskikukkok3stevenj
authored
feat(cat-voices): document property validation (#1476)
* feat(cat-voices): In-page Information Cards (#1242) * feat: add InPageInformationCard widget and campaign information model for displaying campaign details and status updates * feat: update InPageInformationCard to dynamically display button text based on campaign stage and add corresponding localization entries * fix: add missing line for better formatting in InPageInformationCard widget definition * fix: spelling * fix: import intl * fix: theme in tests * fix: add campaign date formatting utility and integrate it in information cards * refactor: improve date formatting utility and integrate localized date handling in information cards * fix: spelling * fix: to early check if information is DateTimeMixin --------- Co-authored-by: Damian Moliński <[email protected]> * chore(general): merge main into mve3 (#1282) * Feat: update testplan template (#1243) * chore: update testplan * fix * fix * fix * fix * fix: testplan template (#1245) * feat(cat-gateway): Finliaze CIP36 Endpoint Cleanup (#1241) * fix: api endpoint draft Signed-off-by: bkioshn <[email protected]> * fix: api health endpoint v1 Signed-off-by: bkioshn <[email protected]> * fix: remove bad request from errorResponses Signed-off-by: bkioshn <[email protected]> * fix: add bad req to get /registration Signed-off-by: bkioshn <[email protected]> * fix: error logging Signed-off-by: bkioshn <[email protected]> * fix: remove validation error Signed-off-by: bkioshn <[email protected]> * fix: registration get error name Signed-off-by: bkioshn <[email protected]> * chore:format Signed-off-by: bkioshn <[email protected]> * fix: get json schema from openapi spec Signed-off-by: bkioshn <[email protected]> * fix: move schema utils Signed-off-by: bkioshn <[email protected]> * fix: optional field Signed-off-by: bkioshn <[email protected]> * fix: config key Signed-off-by: bkioshn <[email protected]> * fix: cat-gateway code gen Signed-off-by: bkioshn <[email protected]> * fix: api name in cat-voice Signed-off-by: bkioshn <[email protected]> * fix: cat-voice format Signed-off-by: bkioshn <[email protected]> * chore: fix spacing Signed-off-by: bkioshn <[email protected]> * chore: fix spacing Signed-off-by: bkioshn <[email protected]> * chore: change tag config description * test: add test for default validator * fix: add spectral ruleset Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Sort the spelling words, and use latest deny.toml * fix(cat-gateway): Fix broken pre-push justfile target * docs(cat-gateway): cleanup * docs(cat-gateway): Fix API Groups and document them better * docs(cat-gateway): Add documentation to the health/inspection endpoint * docs(cat-gateway): Add descriptions for cardano/cip36/latest_registration/stake_addr * docs(cat-gateway): Document stake key hash and vote key endpoints for cardano * docs(cat-gateway): add documentation to config/frontend * docs(cat-gateway): Add api docs for frontend schema * docs(cat-gateway): Move legacy registration endpoints into the Legacy TAG. * docs(cat-gateway): Remaining documentable entities documented * fix: update openapi linter Signed-off-by: bkioshn <[email protected]> * docs(cat-gateway): Add more constraints to parameters and json bodies * fix: openapi lint FUNCTION name Signed-off-by: bkioshn <[email protected]> * fix: CIP36 example and description Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): cleanup error handling, and add a global 429 response to all endpoints. * fix: config endpoint example, desc, and return Signed-off-by: bkioshn <[email protected]> * chore: remove todo Signed-off-by: bkioshn <[email protected]> * fix: move config object Signed-off-by: bkioshn <[email protected]> * fix: move cip36 object Signed-off-by: bkioshn <[email protected]> * docs(cat-gateway): Add missing headers to responses * docs(cat-gateway): Cleanup the rest of the documentation in the api * fix(cat-gateway): Fix OpenAPI linting and add autogenerated api file for dart. * refactor(cat-gateway): Better generalize the OpenAPI simple string type creation macro. * fix(cat-gateway): Add APIKey and CatToken auth to some endpoints. Add 401 and 403 common responses. * fix(cat-gateway): Add universal 422 response to all endpoints, and try and make all endpoint validation use it. * fix: add cardano stake address type Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): stake address type Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Refactor the RBAC Token auth, so it's easier to maintain. * fix(cat-gateway): stake address name Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Add no auth and no-auth+rbac auth schemes * fix(cat-gateway): format + stake addr example Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): code format * fix(cat-gateway): openapi spectral example rules Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Move legacy registration endpoint under Legacy Tag * fix(cat-gateway): Add Auth to all endpoints * fix(docs): Remove obsolete lint config file * fix(cat-gateway): Make config.toml match upstream * docs(docs): update project dictionary * feat(cat-gateway): add target to make it quick to check openapi lints locally * fix(cat-gateway): Remove reference to hermes * fix(cat-gateway): Add auth to rbac endpoints * docs(cat-gateway): Add full docs for v1/votes/plan/account-votes * docs(cat-gateway): Add example for ip address query argument * fix(cat-gateway): Define and abstract Ed25519 Public Keys as hex encoded parameters * fix(cat-gateway): Make sure string api types do not directly expose the internal string * fix(cat-gateway): Make conversion from a Ed25519 pub key hex value to a Verifyingkey infallible * fix(cat-gateway): Fix native asset response types * docs(cat-gateway): fix comments * fix(cat-gateway): Autogenerate flutter files * fix(cat-gateway): Exclude legacy endpoints from needing api examples * fix(cat-gateway): WIP improving cip36 endpoint docs * fix(docs): Make targets to re-check the generated schema easy. * fix: spectral ruleset for linting query params description * feat: parameter rule * fix: debug function * docs(cat-gateway): Make schema lint accept description inside a schema in a query parameter * fix(cat-gateway): remove debug logic from api docs lint * fix(cat-gateway): Don't put expanded program into git * Make error response comments consistent * test(cat-gateway): Add local operation to easily expand macros in the service code * fix(cat-gateway): CIP36 Structured endpoint * fix: speling * fix(rust): cleanup/normalize nonce validation * fix(rust): code format * Update catalyst-gateway/bin/src/service/common/types/cardano/cip19_shelley_address.rs Co-authored-by: bkioshn <[email protected]> * Update catalyst-gateway/bin/src/service/common/types/cardano/cip19_shelley_address.rs Co-authored-by: bkioshn <[email protected]> --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: Dominik Toton <[email protected]> Co-authored-by: Apisit Ritreungroj <[email protected]> * Revert "Merge branch 'mve3' into main" This reverts commit 01db066, reversing changes made to 3bf0ccf. * fix(cat-voices): equatable lint issue fix (#1280) * fix: resolve equatable lint issue * fix: missing override --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: Stefano Cunego <[email protected]> Co-authored-by: Steven Johnson <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: Apisit Ritreungroj <[email protected]> Co-authored-by: Oleksandr Prokhorenko <[email protected]> * feat(cat-voices): discovery page mve3 (#1281) * Feat: update testplan template (#1243) * chore: update testplan * fix * fix * fix * fix * fix: testplan template (#1245) * feat(cat-gateway): Finliaze CIP36 Endpoint Cleanup (#1241) * fix: api endpoint draft Signed-off-by: bkioshn <[email protected]> * fix: api health endpoint v1 Signed-off-by: bkioshn <[email protected]> * fix: remove bad request from errorResponses Signed-off-by: bkioshn <[email protected]> * fix: add bad req to get /registration Signed-off-by: bkioshn <[email protected]> * fix: error logging Signed-off-by: bkioshn <[email protected]> * fix: remove validation error Signed-off-by: bkioshn <[email protected]> * fix: registration get error name Signed-off-by: bkioshn <[email protected]> * chore:format Signed-off-by: bkioshn <[email protected]> * fix: get json schema from openapi spec Signed-off-by: bkioshn <[email protected]> * fix: move schema utils Signed-off-by: bkioshn <[email protected]> * fix: optional field Signed-off-by: bkioshn <[email protected]> * fix: config key Signed-off-by: bkioshn <[email protected]> * fix: cat-gateway code gen Signed-off-by: bkioshn <[email protected]> * fix: api name in cat-voice Signed-off-by: bkioshn <[email protected]> * fix: cat-voice format Signed-off-by: bkioshn <[email protected]> * chore: fix spacing Signed-off-by: bkioshn <[email protected]> * chore: fix spacing Signed-off-by: bkioshn <[email protected]> * chore: change tag config description * test: add test for default validator * fix: add spectral ruleset Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Sort the spelling words, and use latest deny.toml * fix(cat-gateway): Fix broken pre-push justfile target * docs(cat-gateway): cleanup * docs(cat-gateway): Fix API Groups and document them better * docs(cat-gateway): Add documentation to the health/inspection endpoint * docs(cat-gateway): Add descriptions for cardano/cip36/latest_registration/stake_addr * docs(cat-gateway): Document stake key hash and vote key endpoints for cardano * docs(cat-gateway): add documentation to config/frontend * docs(cat-gateway): Add api docs for frontend schema * docs(cat-gateway): Move legacy registration endpoints into the Legacy TAG. * docs(cat-gateway): Remaining documentable entities documented * fix: update openapi linter Signed-off-by: bkioshn <[email protected]> * docs(cat-gateway): Add more constraints to parameters and json bodies * fix: openapi lint FUNCTION name Signed-off-by: bkioshn <[email protected]> * fix: CIP36 example and description Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): cleanup error handling, and add a global 429 response to all endpoints. * fix: config endpoint example, desc, and return Signed-off-by: bkioshn <[email protected]> * chore: remove todo Signed-off-by: bkioshn <[email protected]> * fix: move config object Signed-off-by: bkioshn <[email protected]> * fix: move cip36 object Signed-off-by: bkioshn <[email protected]> * docs(cat-gateway): Add missing headers to responses * docs(cat-gateway): Cleanup the rest of the documentation in the api * fix(cat-gateway): Fix OpenAPI linting and add autogenerated api file for dart. * refactor(cat-gateway): Better generalize the OpenAPI simple string type creation macro. * fix(cat-gateway): Add APIKey and CatToken auth to some endpoints. Add 401 and 403 common responses. * fix(cat-gateway): Add universal 422 response to all endpoints, and try and make all endpoint validation use it. * fix: add cardano stake address type Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): stake address type Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Refactor the RBAC Token auth, so it's easier to maintain. * fix(cat-gateway): stake address name Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Add no auth and no-auth+rbac auth schemes * fix(cat-gateway): format + stake addr example Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): code format * fix(cat-gateway): openapi spectral example rules Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Move legacy registration endpoint under Legacy Tag * fix(cat-gateway): Add Auth to all endpoints * fix(docs): Remove obsolete lint config file * fix(cat-gateway): Make config.toml match upstream * docs(docs): update project dictionary * feat(cat-gateway): add target to make it quick to check openapi lints locally * fix(cat-gateway): Remove reference to hermes * fix(cat-gateway): Add auth to rbac endpoints * docs(cat-gateway): Add full docs for v1/votes/plan/account-votes * docs(cat-gateway): Add example for ip address query argument * fix(cat-gateway): Define and abstract Ed25519 Public Keys as hex encoded parameters * fix(cat-gateway): Make sure string api types do not directly expose the internal string * fix(cat-gateway): Make conversion from a Ed25519 pub key hex value to a Verifyingkey infallible * fix(cat-gateway): Fix native asset response types * docs(cat-gateway): fix comments * fix(cat-gateway): Autogenerate flutter files * fix(cat-gateway): Exclude legacy endpoints from needing api examples * fix(cat-gateway): WIP improving cip36 endpoint docs * fix(docs): Make targets to re-check the generated schema easy. * fix: spectral ruleset for linting query params description * feat: parameter rule * fix: debug function * docs(cat-gateway): Make schema lint accept description inside a schema in a query parameter * fix(cat-gateway): remove debug logic from api docs lint * fix(cat-gateway): Don't put expanded program into git * Make error response comments consistent * test(cat-gateway): Add local operation to easily expand macros in the service code * fix(cat-gateway): CIP36 Structured endpoint * fix: speling * fix(rust): cleanup/normalize nonce validation * fix(rust): code format * Update catalyst-gateway/bin/src/service/common/types/cardano/cip19_shelley_address.rs Co-authored-by: bkioshn <[email protected]> * Update catalyst-gateway/bin/src/service/common/types/cardano/cip19_shelley_address.rs Co-authored-by: bkioshn <[email protected]> --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: Dominik Toton <[email protected]> Co-authored-by: Apisit Ritreungroj <[email protected]> * feat: update segment names * feat: add new discovery page * feat: add empty state for proposals * fix: rename * feat: add proposals cubit * feat: add tests * chore: spelling * chore: cleanup * chore: cleanup * chore: revert unwanted changes * chore: revert merge conflicts * fix: formatting --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: Stefano Cunego <[email protected]> Co-authored-by: Steven Johnson <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: Apisit Ritreungroj <[email protected]> * feat(cat-voices): campaign modal (#1289) * refactor: remove onCancel function and define typedef for upload success * feat: basic details dialog * fix: header title color * fix: modal constraints * fix: details tile categories subtitle * chore: dialog test data * feat: dialog border * feat: CampaignDetails bloc and models * feat: header gradient overlay * fix: modal background color * refactor: rename LoadCampaign to LoadCampaignEvent * refactor: update Campaign details dialog path * feat: DiscoveryPage launched CampaignDetailsDialog * feat: introduce CampaignRepository * feat(cat-voices): Date & Time input widget (#1224) * feat: ui widget for date picker commponent * feat: custom controller for date picker widget * feat: adding validation to textfields * feat: enhance date picker with improved validation and error handling messages * feat: improve overlay management in date picker and enhance scroll controller handling in text fields * fix: overlay switch between date and time * chore: remove cached gitignore files * fix: update OK button text in VoicesCalendarDatePicker for localization consistency * feat: refactor date and time pickers to use DateTime for better consistency and state management across the application * feat: implement new date and time picker modules with validation and controllers for better UI interaction * fix: static-analytics * refactor: date time text field (#1293) * refactor: date time text field * fix: doc reference * feat: add date/time input formatting to date and time fields * fix: late final in voices_date_field.dart * fix: late final in voices_time_field.dart * fix: formatting --------- Co-authored-by: Dominik Toton <[email protected]> Co-authored-by: Damian Moliński <[email protected]> * feat(cat-voices): admin preview tools (#1309) * chore: rename in-page-card to campaign preview card, extract campaign status to catalyst_voices_models * feat: add translations * fix: typo * feat: add admin preview tools * feat: add views section to switch between auth user states * chore: split into multiple files * style: spelling * fix: browser resize shouldn't reset the dialog offset * chore: cleanup * style: spelling * feat(cat-voices): Campaign managment status UI (#1314) * feat: campaign managment status * fix: structure of the project * fix: earthfile * docs: adding docs for campaign enums * fix: whitespacing * refactor(cat-voices): Move UI models to view_model to models package (#1317) * refactor: Move FundedProposal and PendingProposal to view_model package and introduce general Proposal in models package * refactor: move coin formatting to inside models from view_models package * refactor: move coin formatting to inside models from view_models package * feat(cat-voices): vit ss endpoints generating (#1302) * feat: vit-ss openapi specs + code generating * chore: bump chopper and chopper_generator * refactor: rename from vitss_openapi to vit * fix: exclude openapi from spellchecking * fix: missing cat_gateway_api * refactor: rename generated/catalyst-gateway to generated/api + generated CatGatewayApi to CatGateway * feat(cat-voices): Campaign info dialog on discovery (#1321) * chore: rename in-page-card to campaign preview card, extract campaign status to catalyst_voices_models * feat: add translations * fix: typo * feat: add admin preview tools * feat: add views section to switch between auth user states * chore: split into multiple files * style: spelling * fix: browser resize shouldn't reset the dialog offset * chore: cleanup * style: spelling * feat: add border * chore: reorganize members * chore: rename campaign stage cart * feat: add campaign info dialog on discovery page * feat: calculate campaign stage * fix: tests * chore: add tests * chore: cleanup * feat: add campaign service * fix: convert campaign info into simple class instead of enum * fix: tests * fix: campaign info state * feat(cat-voices): admin tools events timer (#1323) * chore: rename in-page-card to campaign preview card, extract campaign status to catalyst_voices_models * feat: add translations * fix: typo * feat: add admin preview tools * feat: add views section to switch between auth user states * chore: split into multiple files * style: spelling * fix: browser resize shouldn't reset the dialog offset * chore: cleanup * style: spelling * feat: add border * chore: reorganize members * chore: rename campaign stage cart * feat: add campaign info dialog on discovery page * feat: calculate campaign stage * fix: tests * chore: add tests * chore: cleanup * feat: implement timer logic * feat: add campaign service * fix: convert campaign info into simple class instead of enum * fix: tests * fix: campaign info state * feat(cat-voices): Merge main into mve3 (#1334) * Feat: update testplan template (#1243) * chore: update testplan * fix * fix * fix * fix * fix: testplan template (#1245) * feat(cat-gateway): Finliaze CIP36 Endpoint Cleanup (#1241) * fix: api endpoint draft Signed-off-by: bkioshn <[email protected]> * fix: api health endpoint v1 Signed-off-by: bkioshn <[email protected]> * fix: remove bad request from errorResponses Signed-off-by: bkioshn <[email protected]> * fix: add bad req to get /registration Signed-off-by: bkioshn <[email protected]> * fix: error logging Signed-off-by: bkioshn <[email protected]> * fix: remove validation error Signed-off-by: bkioshn <[email protected]> * fix: registration get error name Signed-off-by: bkioshn <[email protected]> * chore:format Signed-off-by: bkioshn <[email protected]> * fix: get json schema from openapi spec Signed-off-by: bkioshn <[email protected]> * fix: move schema utils Signed-off-by: bkioshn <[email protected]> * fix: optional field Signed-off-by: bkioshn <[email protected]> * fix: config key Signed-off-by: bkioshn <[email protected]> * fix: cat-gateway code gen Signed-off-by: bkioshn <[email protected]> * fix: api name in cat-voice Signed-off-by: bkioshn <[email protected]> * fix: cat-voice format Signed-off-by: bkioshn <[email protected]> * chore: fix spacing Signed-off-by: bkioshn <[email protected]> * chore: fix spacing Signed-off-by: bkioshn <[email protected]> * chore: change tag config description * test: add test for default validator * fix: add spectral ruleset Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Sort the spelling words, and use latest deny.toml * fix(cat-gateway): Fix broken pre-push justfile target * docs(cat-gateway): cleanup * docs(cat-gateway): Fix API Groups and document them better * docs(cat-gateway): Add documentation to the health/inspection endpoint * docs(cat-gateway): Add descriptions for cardano/cip36/latest_registration/stake_addr * docs(cat-gateway): Document stake key hash and vote key endpoints for cardano * docs(cat-gateway): add documentation to config/frontend * docs(cat-gateway): Add api docs for frontend schema * docs(cat-gateway): Move legacy registration endpoints into the Legacy TAG. * docs(cat-gateway): Remaining documentable entities documented * fix: update openapi linter Signed-off-by: bkioshn <[email protected]> * docs(cat-gateway): Add more constraints to parameters and json bodies * fix: openapi lint FUNCTION name Signed-off-by: bkioshn <[email protected]> * fix: CIP36 example and description Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): cleanup error handling, and add a global 429 response to all endpoints. * fix: config endpoint example, desc, and return Signed-off-by: bkioshn <[email protected]> * chore: remove todo Signed-off-by: bkioshn <[email protected]> * fix: move config object Signed-off-by: bkioshn <[email protected]> * fix: move cip36 object Signed-off-by: bkioshn <[email protected]> * docs(cat-gateway): Add missing headers to responses * docs(cat-gateway): Cleanup the rest of the documentation in the api * fix(cat-gateway): Fix OpenAPI linting and add autogenerated api file for dart. * refactor(cat-gateway): Better generalize the OpenAPI simple string type creation macro. * fix(cat-gateway): Add APIKey and CatToken auth to some endpoints. Add 401 and 403 common responses. * fix(cat-gateway): Add universal 422 response to all endpoints, and try and make all endpoint validation use it. * fix: add cardano stake address type Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): stake address type Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Refactor the RBAC Token auth, so it's easier to maintain. * fix(cat-gateway): stake address name Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Add no auth and no-auth+rbac auth schemes * fix(cat-gateway): format + stake addr example Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): code format * fix(cat-gateway): openapi spectral example rules Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): Move legacy registration endpoint under Legacy Tag * fix(cat-gateway): Add Auth to all endpoints * fix(docs): Remove obsolete lint config file * fix(cat-gateway): Make config.toml match upstream * docs(docs): update project dictionary * feat(cat-gateway): add target to make it quick to check openapi lints locally * fix(cat-gateway): Remove reference to hermes * fix(cat-gateway): Add auth to rbac endpoints * docs(cat-gateway): Add full docs for v1/votes/plan/account-votes * docs(cat-gateway): Add example for ip address query argument * fix(cat-gateway): Define and abstract Ed25519 Public Keys as hex encoded parameters * fix(cat-gateway): Make sure string api types do not directly expose the internal string * fix(cat-gateway): Make conversion from a Ed25519 pub key hex value to a Verifyingkey infallible * fix(cat-gateway): Fix native asset response types * docs(cat-gateway): fix comments * fix(cat-gateway): Autogenerate flutter files * fix(cat-gateway): Exclude legacy endpoints from needing api examples * fix(cat-gateway): WIP improving cip36 endpoint docs * fix(docs): Make targets to re-check the generated schema easy. * fix: spectral ruleset for linting query params description * feat: parameter rule * fix: debug function * docs(cat-gateway): Make schema lint accept description inside a schema in a query parameter * fix(cat-gateway): remove debug logic from api docs lint * fix(cat-gateway): Don't put expanded program into git * Make error response comments consistent * test(cat-gateway): Add local operation to easily expand macros in the service code * fix(cat-gateway): CIP36 Structured endpoint * fix: speling * fix(rust): cleanup/normalize nonce validation * fix(rust): code format * Update catalyst-gateway/bin/src/service/common/types/cardano/cip19_shelley_address.rs Co-authored-by: bkioshn <[email protected]> * Update catalyst-gateway/bin/src/service/common/types/cardano/cip19_shelley_address.rs Co-authored-by: bkioshn <[email protected]> --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: Dominik Toton <[email protected]> Co-authored-by: Apisit Ritreungroj <[email protected]> * Revert "Merge branch 'mve3' into main" This reverts commit 01db066, reversing changes made to 3bf0ccf. * fix(cat-voices): equatable lint issue fix (#1280) * fix: resolve equatable lint issue * fix: missing override * fix(flutter/catalyst_key_derivation): Accept non extended public key for rbac (#1288) * fix(flutter/catalyst_key_derivation): Accept non extended public key for rbac * fix: unit tests * chore: rename * fix(dart/catalyst_cardano_serialization): remove key reference from RBAC, use local key ref instead (#1292) * fix(dart/catalyst_cardano_serialization): remove key reference from RBAC, use local key ref * fix: update RBAC issuer properties, catalyst users don't have any of these identifiable * fix: payment key should refer to the first transaction output which is the change address * chore: rename keyOffset to offset * chore: bump version (#1297) * fix(cat-gateway): Fix native asset indexing to be more flexible (#1150) * refactor: rename schema to asset * refactor: vector asset * chore: rename asset fields * refactor: object mapping structs * chore: minor rename * fix: update operation cql * fix: schema version * chore: change asset_id back to policy_id * chore: find rename * fix: schema version * fix: i128 * feat: asset value from i128 * refactor: change &[u8] for asset name * refactor: try from asset value * fix: import * chore: fmtfix * Update catalyst-gateway/bin/src/db/index/block/txo/insert_txo_asset.rs Co-authored-by: Steven Johnson <[email protected]> * revert: i128 to bigint * fix: unused import * feat: api test * chore: cspell fix * chore: cspell fix * chore: fmtfix --------- Co-authored-by: Oleksandr Prokhorenko <[email protected]> Co-authored-by: Steven Johnson <[email protected]> * feat(docs): Document the key derivation path for Project Catalyst ED25519 Keys (#1300) * feat(docs): Document the key derivation path for Project Catalyst ED25519 keys * fix(docs): Fix and reference historical dates for accuracy * fix(dart/catalyst_cardano_serialization): x509 distinguished name structure (#1290) * fix: x509 distinguished name structure Signed-off-by: bkioshn <[email protected]> * fix: format Signed-off-by: bkioshn <[email protected]> * feat: make it possible to override ASN1 tag for subject alt name in the x509 cert * fix: static analysis issue --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: Dominik Toton <[email protected]> Co-authored-by: Dominik Toton <[email protected]> * feat: additional just functions for faster startup (#1310) * fix(cat-voices): update key derivation path (#1301) * fix(cat-voices): update key derivation path * docs: add source * chore: code cleanup * docs: move relevant docs * chore: extract account constant Co-authored-by: Steven Johnson <[email protected]> * chore: reformat --------- Co-authored-by: Steven Johnson <[email protected]> * fix: frb unexpected cfg (#1320) Signed-off-by: bkioshn <[email protected]> * fix(cat-gateway): bump `scylla` to v0.15.0 (#1316) * refactor: initial * fix: arc type * fix: query iter * fix: functions * fix: final * chore: fmtfix * chore: remove lints * chore: remove lint from database object * chore: remove result wrapper * feat(cat-gateway): Add a signed documents repository storage table in the Event DB (#1322) * refactor(cat-gateway): Move unused schemas out of the main schema directory * feat(cat-gateway): Add signed documents repository table to the postgresql DB. * feat(cat-gateway): Add author, and more indexes to the signed docs repository table * fix(cat-gateway): BYTEA not BLOB * fix(cat-gateway): move unused migrations out of the migrations folder * fix(cat-gateway): Fix comment annotations to refer to correct table * fix(cat-gateway): fix index names in the comments * feat(docs): Define signed document metadata fields (#1315) * feat(docs): Define signed document metadata fields * docs(docs): Fix spelling * feat(cat-voices): Integration tests using flutter_driver (#1304) * custom driver for integration tests * feat: working voices test driver * feat: creating internal lib for voices driver * fix: remove unused import * fix: check-spelling * fix: static analysis * fix: test file * refactor: skiping test for know * fix: adding packages to melos * fix: whitespacing * Update catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/example/test_driver/app_test.dart Co-authored-by: Dominik Toton <[email protected]> * feat: add extension to driver * fix: remove unused function * fix: add files to gitignore --------- Co-authored-by: Dominik Toton <[email protected]> Co-authored-by: bkioshn <[email protected]> * fix: importing proper menuitem * fix: missing comma in cspell.json --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: Stefano Cunego <[email protected]> Co-authored-by: Steven Johnson <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: Dominik Toton <[email protected]> Co-authored-by: Apisit Ritreungroj <[email protected]> Co-authored-by: Oleksandr Prokhorenko <[email protected]> Co-authored-by: Apisit Ritruengroj <[email protected]> Co-authored-by: Dominik Toton <[email protected]> Co-authored-by: Damian Moliński <[email protected]> * feat(cat-voices): Admin view for overall spaces menu (#1326) * feat: overall spaces admin configuration * feat: additional access control base on user roles * fix: spelling * fix: access controll state check * fix: whitespace in dependecies.dart * fix: missing trailling comma * refactor: simplify account access in UserAccessGuard and AdminAccessGuard, add extension for session state handling --------- Co-authored-by: Dominik Toton <[email protected]> * feat(cat-voices): proposal editor template data flow (#1335) * chore: remove workspace test data * chore: workspace bloc * refactor: use MarkdownString instead of DocumentJson * feat: MarkdownCodec * chore: markdown convert lib * refactor: use MarkdownString * feat: updating sections dynamically * fix: section step title wrapping * feat: ProposalSection * feat: saving proposal step answer * refactor: move WorkspaceBloc to app.dart * chore: guidances * chore: use const in constructor * fix: workspace page event order * refactor: rename MarkdownString to MarkdownData * refactor: extract _mapProposalSection * refactor(cat-voices): move api to repository package (#1336) * refactor: move api to repository package * refactor: move storage/crypto related classes to shared package * refactor: rename VaultCryptoService to LocalCryptoService * fix: melos build_runner script * fix: justfile package comment * fix: remove unused deps from services * fix: bring back path dep * chore: remove legacy documentation / code * fix: readme formatting * feat(cat-voices): admin tools mocked data (#1356) * feat: add proposal service * refactor: limit rebuilds in spaces shell page * chore: cleanup code * feat: sync available spaces in admin tools * chore: cleanup * feat: register with RBAC as proposer * feat: use overlay for admin tools to show it above everything else * chore: remove unused code * feat: add admin tools cubit * feat: override session state by admin tools * chore: cleanup * feat: update campaign info dialog to mock the campaign stage * chore: cleanup dummy user service * feat: mock proposals * chore: code cleanup * chore: cleanup and tests * chore: cleanup * chore: campaign info cubit tests * chore: add tests for proposals cubit * style: reformat code * fix: tests * chore: code review feedback * chore: cleanup dummy user factory * chore: simplify proposal view model * Missing autofocus param (#1361) Co-authored-by: Dominik Toton <[email protected]> * draft for setup segment * fix: delete unused files * feat: dtos for properties * feat(dart/catalyst_cardano_serialization): replace ulid by UUID in auth token (#1368) * feat: replace ulid by uuid v7 * fix: encode uuid as bytes not as string * feat: add cbor tag for uuid * fix: missing scaffold for global snackbars (#1373) * feat(dart/catalyst_cose): Catalyst COSE_SIGN support (#1374) * refactor!: extract signer and verifier algorithms * feat: add new COSE_SIGN1 implementation * feat: add COSE_SIGN structure * style: spelling * fix: tests * chore: code cleanup * feat(cat-voices): Cached vault unlock state (#1372) * feat: local storage * refactor: local storage clear * feat: add allowList to LocalStorage * feat: SecureStorageVault accepts key with default value * feat: MemoryStorage * chore: export LocalStorage and MemoryStorage * feat: TtlCache * refactor: Delete keychain_metadata in favour of internal initialization value inside SecureStorageVault * chore: fix previous commit files * feat: keychain uses ttl cache for unlock * feat: DependencyProvider instanceName properties * fix: use effective key for secure storage cache * feat: Add SecureStorageVaultCache * fix: LocalTtlCache now extends from now only * chore: make SecureStorageVaultCache private * feat: vault active flag + extending unlocked state * feat: extend last unlock expireDate state when vault becomes inactive * feat: make unlockTtl a optional parameter * feat: AppActiveStateListener and ActiveAware interface * feat: UserService implements ActiveAware * chore: do not sync isUnlocked when building stream * fix: sync unlock state on stream watch * fix: remove unnecessary import * fix: failing tests * docs: AppActiveStateListener * chore: typo * refactor: require storages FlutterSecureStorage/SharedPreferencesAsync to be more explicit about dependencies * feat(cat-voices): app config model (#1378) * feat: app config model * feat: dynamic app config * chore: missing AppConfig params * fix: exclude generated files from analyze * fix: exclude dart_tool from melos analyze script * chore: formatting * refactor: move json_converters to shared package * fix: pubspec libs sorting * feat(cat-voices): caching user (#1391) * chore: wip * feat: caching user model * refactor: move json_converters to shared package * feat: UserDto and AppConfigDto * refactor: move Keychain to shared package * refactor: simplify UserService. Expose only Accounts and User * feat: lockable lastIsUnlocked * fix: typos * fix: typo * refactor: reorder getUser/saveUser in UserRepository * feat(cat-voices): setup campaign stage dates (#1396) * feat: edit campaign stage dates * chore: code cleanup * fix: disable overscroll * chore: cleanup code * chore: cleanup * feat:creating dtos for proposal schema * feat: creating toModels * feat: sort section/elements by xorder * feat: adding missing toModels for definitions * fix: delete unused property from element class * feat: creating generic_proposal.json * feat(cat-voices): multi proposal workspace (#1409) * refactor: rename WorkspacePage to WorkspaceEditorPage * feat: workspace page * refactor: rename WorkspaceEditor to ProposalEditor * feat: Workspace header * chore: workspace bloc/state in progress * refactor: different test draft id * feat: workspace page states widgets * feat: workspace states selectors * feat: Mocked workspace bloc * docs: more todo-s * refactor: rename ProposalEditor to ProposalBuilder * fix: use ellipsis in search string * refactor: Add public selectors widgets for workspace widgets * test: adding unit tests * feat: range class for easier representation for max min values * feat: adding proper from/to Json for proposal_builder class * feat: change name of the files to make it more generic -document- * feat: change name of the document property widget * feat: adding equatable for classes * chore: update chain follower * feat: sortingBy order * chore: missing build_runner for repository, restore wrongly deleted file * feat(cat-voices): proposal template models (#1363) * draft for setup segment * fix: delete unused files * feat: dtos for properties * feat:creating dtos for proposal schema * feat: creating toModels * feat: sort section/elements by xorder * feat: adding missing toModels for definitions * fix: delete unused property from element class * feat: creating generic_proposal.json * test: adding unit tests * feat: range class for easier representation for max min values * feat: adding proper from/to Json for proposal_builder class * feat: change name of the files to make it more generic -document- * feat: change name of the document property widget * feat: adding equatable for classes * chore: update chain follower * feat: sortingBy order * chore: revert merge conflicts --------- Co-authored-by: Dominik Toton <[email protected]> * chore: code cleanup * feat(cat-voices): encode/decode cose documents (#1408) * feat: addd melos build_runner_repository to justfile * feat: update cose sign to support multiple different signatures and algs * feat: add document manager that handles signed documents (COSE_SIGN) * fix: kid should be encoded as Uint8List, not as string * style: typo * fix: collection equality * chore: review feedback * feat: add content type * chore: rename document to binary document, export document manager * chore: copyWith fix * fix: json content type * fix: put default alg in top-level headers if all signatures use the same alg * chore: refactor reference uuid to give it a more meaningful name * chore: get rid of equatable from SignedDocument interface * fix: do not put alg in top-level protected headers for COSE_SIGN * chore: update field name * feat: add document node for identifying properties * feat: add document that holds document builder values * chore: convert document node id to a class * chore: rename proposal builder to document builder * chore: rename DocumentParser to BinaryDocumentParser * chore: format * chore: cleanup code * chore: rename DocumentBuilder to Document * chore: rename DocumentManager to SignedDocumentManager * chore: code cleanup * chore: simplify document parsing * chore: cleanup json schema parsing * chore: rename DocumentElement to DocumentProperty * feat: editing property in document * feat: enqueue document changes and render it in a section placeholder * chore: todos * fix: add missing config after solving merge conflicts * chore: cleanup code, make fields optional * feat: make default value optional object * chore: extract properties parsing into converters, parse if-then-else condition * chore: remove equatable from dtos, extract code to separate files * chore: move sorting to model * chore: add default value * chore: add default value * Revert "chore: add default value" This reverts commit 019f6ff. * chore: code cleanup * feat: logic for document checkbox builder widget state * fix: check spelling * chore: revert optional types * fix: cleanup unused files * fix: delete duplicated files * feat: adding final keyword to definition classes * feat: extracting only properties that widgets needs * fix: dart comment style * feat: type casting for value in DocumentPropertyDto * feat: adding select widget * feat: adding markdown support in doc schema and checkbox widget * feat: adding value parsing, and new language definition * feat: adding null check * Update catalyst_voices/packages/internal/catalyst_voices_repositories/lib/src/utils/json_converters.dart Co-authored-by: Dominik Toton <[email protected]> * feat: add type safety for document builder * fix: code cleanup for not necessary override methods * feat: edit and save mode on hole section not single property * feat: adding parsing data in DocuemntPropertyDto toJson * chore: making fields private * feat: creating MarkdownText and UrlLauncher * chore: validate that the property is cast by the correct definition * docs: adding todo for future error handling * fix: exposing selectable in MarkdownText * fix: making markdownText param as not named * fix: dependency fix in pubspec * chore: add validation for document properties * feat: add localized document validation result * chore: cleanup * fix: value change callback name change * feat: add validation to document property * chore: use correct key * feat: add validation to document section * style: formatting * chore: move definition file to the parent folder * feat: add validation to single_grouped_tag_selector_definition.dart * feat: parse grouped tags selection from/toJson * chore: fix typo * chore: document parsing tests * fix: document property casting for TokenValueCardanoAdaDefinition widget * chore: align code * chore: docs * chore: update naming * style: improve formatting for docs * chore: code review changes * chore: split property validation to accept schema and value separately * chore: cache property validation result * chore: add isValid getter to Document section * fix: missing equatable property * fix: document schema parsing --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: Ryszard Schossler <[email protected]> Co-authored-by: Damian Moliński <[email protected]> Co-authored-by: Stefano Cunego <[email protected]> Co-authored-by: Steven Johnson <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: bkioshn <[email protected]> Co-authored-by: Apisit Ritreungroj <[email protected]> Co-authored-by: Oleksandr Prokhorenko <[email protected]> Co-authored-by: Apisit Ritruengroj <[email protected]> Co-authored-by: Ryszard Schossler <[email protected]>
1 parent 3ef4a42 commit 80414a3

File tree

39 files changed

+1365
-617
lines changed

39 files changed

+1365
-617
lines changed

catalyst_voices/apps/voices/lib/widgets/document_builder/single_grouped_tag_selector_widget.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class SingleGroupedTagSelectorWidget extends StatefulWidget {
3232

3333
class _SingleGroupedTagSelectorWidgetState
3434
extends State<SingleGroupedTagSelectorWidget> {
35-
GroupedTagsSelection _selection = const GroupedTagsSelection();
35+
late GroupedTagsSelection _selection;
3636

3737
@override
3838
void initState() {

catalyst_voices/apps/voices/lib/widgets/tiles/document_builder_section_tile.dart

+25-46
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,13 @@ class _DocumentBuilderSectionTileState
4040
final _pendingChanges = <DocumentChange>[];
4141

4242
bool _isEditMode = false;
43-
bool _isValid = false;
4443

4544
@override
4645
void initState() {
4746
super.initState();
4847

4948
_editedSection = widget.section;
5049
_builder = _editedSection.toBuilder();
51-
52-
// TODO(damian-molinski): validation
53-
_isValid = _editedSection.properties.every(_dummyValidation);
5450
}
5551

5652
@override
@@ -61,9 +57,6 @@ class _DocumentBuilderSectionTileState
6157
_editedSection = widget.section;
6258
_builder = _editedSection.toBuilder();
6359
_pendingChanges.clear();
64-
65-
// TODO(damian-molinski): validation
66-
_isValid = _editedSection.properties.every(_dummyValidation);
6760
}
6861
}
6962

@@ -86,7 +79,7 @@ class _DocumentBuilderSectionTileState
8679
for (final property in widget.section.properties) ...[
8780
const SizedBox(height: 8),
8881
_PropertyBuilder(
89-
key: ObjectKey(property.schema.nodeId),
82+
key: ValueKey(property.schema.nodeId),
9083
property: property,
9184
isEditMode: _isEditMode,
9285
onChanged: _handlePropertyChange,
@@ -95,7 +88,7 @@ class _DocumentBuilderSectionTileState
9588
if (_isEditMode) ...[
9689
const SizedBox(height: 12),
9790
_Footer(
98-
isValid: _isValid,
91+
isValid: _editedSection.isValid,
9992
onSave: _saveChanges,
10093
),
10194
],
@@ -127,20 +120,8 @@ class _DocumentBuilderSectionTileState
127120
_builder.addChange(change);
128121
_editedSection = _builder.build();
129122
_pendingChanges.add(change);
130-
131-
// TODO(damian-molinski): validation
132-
_isValid = _editedSection.properties.every(_dummyValidation);
133123
});
134124
}
135-
136-
bool _dummyValidation(DocumentProperty property) {
137-
final value = property.value;
138-
if (value is GroupedTagsSelection) {
139-
return value.isValid;
140-
}
141-
142-
return value != null;
143-
}
144125
}
145126

146127
class _Header extends StatelessWidget {
@@ -215,6 +196,7 @@ class _PropertyBuilder extends StatelessWidget {
215196
@override
216197
Widget build(BuildContext context) {
217198
final definition = property.schema.definition;
199+
218200
switch (definition) {
219201
case SegmentDefinition():
220202
case SectionDefinition():
@@ -233,47 +215,44 @@ class _PropertyBuilder extends StatelessWidget {
233215
case SingleLineHttpsURLEntryListDefinition():
234216
case NestedQuestionsListDefinition():
235217
case NestedQuestionsDefinition():
236-
case SingleGroupedTagSelectorDefinition():
237-
final value = property.value;
238-
239-
final selection = value is GroupedTagsSelection
240-
? value
241-
: const GroupedTagsSelection();
242-
243-
return SingleGroupedTagSelectorWidget(
244-
id: property.schema.nodeId,
245-
selection: selection,
246-
groupedTags: property.groupedTags(),
247-
isEditMode: isEditMode,
248-
onChanged: onChanged,
249-
isRequired: property.schema.isRequired,
250-
);
251218
case TagGroupDefinition():
252219
case TagSelectionDefinition():
253220
case DurationInMonthsDefinition():
254221
case YesNoChoiceDefinition():
255222
case SPDXLicenceOrUrlDefinition():
256223
case LanguageCodeDefinition():
257-
throw UnimplementedError();
224+
throw UnimplementedError('${definition.type} not implemented');
225+
case SingleGroupedTagSelectorDefinition():
226+
final castProperty = definition.castProperty(property);
227+
return SingleGroupedTagSelectorWidget(
228+
id: castProperty.schema.nodeId,
229+
selection: castProperty.value ?? const GroupedTagsSelection(),
230+
groupedTags: definition.groupedTags(castProperty.schema),
231+
isEditMode: isEditMode,
232+
onChanged: onChanged,
233+
isRequired: castProperty.schema.isRequired,
234+
);
258235
case AgreementConfirmationDefinition():
236+
final castProperty = definition.castProperty(property);
259237
return AgreementConfirmationWidget(
260-
value: definition.castProperty(property).value,
238+
value: castProperty.value,
261239
definition: definition,
262-
nodeId: property.schema.nodeId,
263-
description: property.schema.description ?? '',
264-
title: property.schema.title ?? '',
240+
nodeId: castProperty.schema.nodeId,
241+
description: castProperty.schema.description ?? '',
242+
title: castProperty.schema.title ?? '',
265243
isEditMode: isEditMode,
266244
onChanged: onChanged,
267245
);
268246
case TokenValueCardanoADADefinition():
247+
final castProperty = definition.castProperty(property);
269248
return DocumentTokenValueWidget(
270-
id: property.schema.nodeId,
271-
label: property.schema.title ?? '',
272-
value: property.value is int ? property.value! as int : null,
249+
id: castProperty.schema.nodeId,
250+
label: castProperty.schema.title ?? '',
251+
value: castProperty.value,
273252
currency: const Currency.ada(),
274-
range: property.schema.range,
253+
range: castProperty.schema.numRange,
275254
isEditMode: isEditMode,
276-
isRequired: property.schema.isRequired,
255+
isRequired: castProperty.schema.isRequired,
277256
onChanged: onChanged,
278257
);
279258
}

catalyst_voices/packages/internal/catalyst_voices_models/lib/src/catalyst_voices_models.dart

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export 'document/document_change.dart';
1414
export 'document/document_definitions.dart';
1515
export 'document/document_node_id.dart';
1616
export 'document/document_schema.dart';
17+
export 'document/document_validator.dart';
1718
export 'errors/errors.dart';
1819
export 'file/voices_file.dart';
1920
export 'markdown_data.dart';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
part of '../document_definitions.dart';
2+
3+
final class AgreementConfirmationDefinition
4+
extends BaseDocumentDefinition<bool> {
5+
final DocumentDefinitionsFormat format;
6+
final bool defaultValue;
7+
final bool constValue;
8+
9+
const AgreementConfirmationDefinition({
10+
required super.type,
11+
required super.note,
12+
required this.format,
13+
required this.defaultValue,
14+
required this.constValue,
15+
});
16+
17+
@override
18+
DocumentValidationResult validatePropertyValue(
19+
DocumentSchemaProperty<bool> schema,
20+
bool? value,
21+
) {
22+
return DocumentValidator.validateBool(schema, value);
23+
}
24+
25+
@override
26+
List<Object?> get props => [
27+
format,
28+
defaultValue,
29+
constValue,
30+
type,
31+
note,
32+
];
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
part of '../document_definitions.dart';
2+
3+
final class DropDownSingleSelectDefinition
4+
extends BaseDocumentDefinition<String> {
5+
final DocumentDefinitionsFormat format;
6+
final DocumentDefinitionsContentMediaType contentMediaType;
7+
final String pattern;
8+
9+
const DropDownSingleSelectDefinition({
10+
required super.type,
11+
required super.note,
12+
required this.format,
13+
required this.contentMediaType,
14+
required this.pattern,
15+
});
16+
17+
@override
18+
DocumentValidationResult validatePropertyValue(
19+
DocumentSchemaProperty<String> schema,
20+
String? value,
21+
) {
22+
return DocumentValidator.validateString(schema, value);
23+
}
24+
25+
@override
26+
List<Object?> get props => [
27+
format,
28+
contentMediaType,
29+
pattern,
30+
type,
31+
note,
32+
];
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
part of '../document_definitions.dart';
2+
3+
final class DurationInMonthsDefinition extends BaseDocumentDefinition<int> {
4+
final DocumentDefinitionsFormat format;
5+
6+
const DurationInMonthsDefinition({
7+
required super.type,
8+
required super.note,
9+
required this.format,
10+
});
11+
12+
@override
13+
DocumentValidationResult validatePropertyValue(
14+
DocumentSchemaProperty<int> schema,
15+
int? value,
16+
) {
17+
return DocumentValidator.validateNum(schema, value);
18+
}
19+
20+
@override
21+
List<Object?> get props => [
22+
type,
23+
note,
24+
format,
25+
];
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
part of '../document_definitions.dart';
2+
3+
final class LanguageCodeDefinition extends BaseDocumentDefinition<String> {
4+
final String defaultValue;
5+
final List<String> enumValues;
6+
7+
const LanguageCodeDefinition({
8+
required super.type,
9+
required super.note,
10+
required this.defaultValue,
11+
required this.enumValues,
12+
});
13+
14+
@override
15+
DocumentValidationResult validatePropertyValue(
16+
DocumentSchemaProperty<String> schema,
17+
String? value,
18+
) {
19+
return DocumentValidator.validateString(schema, value);
20+
}
21+
22+
@override
23+
List<Object?> get props => [
24+
defaultValue,
25+
enumValues,
26+
note,
27+
type,
28+
];
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
part of '../document_definitions.dart';
2+
3+
final class MultiLineTextEntryDefinition
4+
extends BaseDocumentDefinition<String> {
5+
final DocumentDefinitionsContentMediaType contentMediaType;
6+
final String pattern;
7+
8+
const MultiLineTextEntryDefinition({
9+
required super.type,
10+
required super.note,
11+
required this.contentMediaType,
12+
required this.pattern,
13+
});
14+
15+
@override
16+
DocumentValidationResult validatePropertyValue(
17+
DocumentSchemaProperty<String> schema,
18+
String? value,
19+
) {
20+
return DocumentValidator.validateString(schema, value);
21+
}
22+
23+
@override
24+
List<Object?> get props => [
25+
contentMediaType,
26+
pattern,
27+
type,
28+
note,
29+
];
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
part of '../document_definitions.dart';
2+
3+
final class MultiLineTextEntryListMarkdownDefinition
4+
extends BaseDocumentDefinition<List<String>> {
5+
final DocumentDefinitionsFormat format;
6+
final bool uniqueItems;
7+
final List<String> defaultValue;
8+
final Map<String, dynamic> items;
9+
10+
const MultiLineTextEntryListMarkdownDefinition({
11+
required super.type,
12+
required super.note,
13+
required this.format,
14+
required this.uniqueItems,
15+
required this.defaultValue,
16+
required this.items,
17+
});
18+
19+
@override
20+
DocumentValidationResult validatePropertyValue(
21+
DocumentSchemaProperty<List<String>> schema,
22+
List<String>? value,
23+
) {
24+
return DocumentValidator.validateList(schema, value);
25+
}
26+
27+
@override
28+
List<Object?> get props => [
29+
format,
30+
uniqueItems,
31+
type,
32+
note,
33+
defaultValue,
34+
items,
35+
];
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
part of '../document_definitions.dart';
2+
3+
final class MultiLineTextEntryMarkdownDefinition
4+
extends BaseDocumentDefinition<String> {
5+
final DocumentDefinitionsContentMediaType contentMediaType;
6+
final String pattern;
7+
8+
const MultiLineTextEntryMarkdownDefinition({
9+
required super.type,
10+
required super.note,
11+
required this.contentMediaType,
12+
required this.pattern,
13+
});
14+
15+
@override
16+
DocumentValidationResult validatePropertyValue(
17+
DocumentSchemaProperty<String> schema,
18+
String? value,
19+
) {
20+
return DocumentValidator.validateString(schema, value);
21+
}
22+
23+
@override
24+
List<Object?> get props => [
25+
contentMediaType,
26+
pattern,
27+
type,
28+
note,
29+
];
30+
}

0 commit comments

Comments
 (0)