diff --git a/typespec/einnsyn.arkiv.models.tsp b/typespec/einnsyn.arkiv.models.tsp index 9d59f12..4bfa9b1 100644 --- a/typespec/einnsyn.arkiv.models.tsp +++ b/typespec/einnsyn.arkiv.models.tsp @@ -83,7 +83,7 @@ namespace Arkiv { namespace Arkivdel { /** - * Arkivdel + * Represents a subdivision of an archive (Arkiv). In the Noark 5 standard, an archive can be divided into one or more archive parts. */ @extension("x-idPrefix", "arkd") model Arkivdel extends ArkivBase.ArkivBase { @@ -103,19 +103,23 @@ namespace Arkivdel { namespace Behandlingsprotokoll { /** - * Behandlingsprotokoll + * Represents a record of proceedings, often related to a decision-making process in a meeting. */ @extension("x-idPrefix", "bp") model Behandlingsprotokoll extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Behandlingsprotokoll"; + + /** The content of the protocol. */ tekstInnhold: string; + + /** The format of the content (e.g., "text/html"). */ tekstFormat: string; } } namespace Dokumentbeskrivelse { /** - * Dokumentbeskrivelse + * Represents the metadata for a document. It is connected to a registry entry and describes a single document. */ @extension("x-idPrefix", "db") model Dokumentbeskrivelse extends ArkivBase.ArkivBase { @@ -131,28 +135,48 @@ namespace Dokumentbeskrivelse { */ tittelSensitiv: string; + /** The document number within the parent registry entry. */ dokumentnummer: integer; + + /** The type of document (e.g., 'letter', 'invoice'). */ dokumenttype?: string; + + /** Describes the document's role in relation to the registry entry (e.g., 'main document', 'attachment'). */ tilknyttetRegistreringSom: string; + + /** The associated electronic document(s). */ dokumentobjekt?: ExpandableField[]; } } namespace Dokumentobjekt { + /** + * Represents an electronic document or file. It contains information needed to locate and render the document. + */ @extension("x-idPrefix", "do") model Dokumentobjekt extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Dokumentobjekt"; + + /** A reference (URL) to the document file. */ referanseDokumentfil: url; + + /** The file format of the document (e.g., 'PDF/A'). */ format?: string; + + /** The checksum of the document file, for integrity verification. */ sjekksum?: string; + + /** The algorithm used to calculate the checksum (e.g., 'SHA-256'). */ sjekksumAlgoritme?: string; + + /** The document description this object belongs to. */ dokumentbeskrivelse?: ExpandableField; } } namespace Enhet { /** - * eInnsyn Enhet + * Represents an organizational unit within the public sector, such as a municipality, a government agency, or a department. This is a central model for identifying the public entities that own and manage the information in eInnsyn. */ @extension("x-idPrefix", "enh") model Enhet extends Base.Base { @@ -163,83 +187,157 @@ namespace Enhet { */ @pattern("^[a-z0-9\\-]+$") slug?: string; + /** The official name of the unit in Norwegian bokmål. */ navn: string; + + /** The name of the unit in Norwegian nynorsk. */ navnNynorsk?: string; + + /** The name of the unit in English. */ navnEngelsk?: string; + + /** The name of the unit in Sami. */ navnSami?: string; + + /** The 9-digit organization number from the Brønnøysund Register Centre. */ @pattern("^[0-9]{9}$") orgnummer: string; + + /** An internal code or identifier for the unit. */ enhetskode?: string; + + /** The postal address for the unit's contact point. */ kontaktpunktAdresse?: string; + + /** The primary contact email address for the unit. */ @format("email") kontaktpunktEpost: string; + + /** The primary contact phone number for the unit. */ kontaktpunktTelefon?: string; + + /** The dedicated email address for receiving Freedom of Information (FOI) requests. */ @format("email") innsynskravEpost: string; + + /** The type of the organizational unit. */ @oneOf enhetstype: - | "ADMINISTRATIVENHET" - | "AVDELING" - | "BYDEL" - | "DUMMYENHET" - | "FYLKE" - | "KOMMUNE" - | "ORGAN" - | "SEKSJON" - | "UTVALG" - | "VIRKSOMHET"; + | "ADMINISTRATIVENHET" // Administrative unit + | "AVDELING" // Department + | "BYDEL" // Borough + | "DUMMYENHET" // Dummy unit for technical purposes + | "FYLKE" // County + | "KOMMUNE" // Municipality + | "ORGAN" // A board or committee + | "SEKSJON" // Section + | "UTVALG" // Committee or board + | "VIRKSOMHET"; // Agency or enterprise + + /** The date when the unit was officially dissolved or became inactive. */ avsluttetDato?: plainDate; + + /** If true, this unit should be hidden from public view. */ skjult?: boolean; + + /** If true, this unit is configured to use the eFormidling platform for digital communication. */ eFormidling?: boolean; + + /** If true, this is a technical or system-internal unit, not a real-world organizational unit. */ teknisk?: boolean; + + /** A flag indicating if legacy identifiers for this unit should be converted. */ skalKonvertereId?: boolean; + + /** A flag indicating if the unit should receive receipts for submissions. */ skalMottaKvittering?: boolean; + + /** A UI hint to display this unit as a top-level node in a hierarchy. */ visToppnode?: boolean; + + /** The version of the order XML format used by this unit. */ orderXmlVersjon?: integer; + + /** A list of sub-units belonging to this unit. */ underenhet?: ExpandableField[]; + + /** The unit that is responsible for handling tasks on behalf of this unit. */ handteresAv?: ExpandableField; + + /** The parent unit in the organizational hierarchy. */ parent?: ExpandableField; } } namespace Identifikator { /** - * Identifikator + * Represents an identifier for a person, such as a case officer or an author. */ @extension("x-idPrefix", "ide") model Identifikator extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Identifikator"; + + /** The full name of the person. */ navn: string; + + /** A unique identifier for the person, often a username or an employee ID. */ identifikator: string; + + /** The initials of the person. */ initialer: string; + + /** The email address of the person. */ @format("email") epostadresse: string; } } namespace Journalpost { /** - * Journalpost + * Represents a registry entry for a document, corresponding to the Journalpost in the Noark 5 standard. It is a record of an incoming, outgoing, or internal document. */ @extension("x-idPrefix", "jp") model Journalpost extends Registrering.Registrering { @visibility(Lifecycle.Read) entity: "Journalpost"; + + /** The year the registry entry was created. */ @minValue(1700) journalaar: integer; + + /** The sequence number of the registry entry within the journal year. */ @minValue(0) journalsekvensnummer: integer; + + /** The post number within the journal. */ @minValue(0) journalpostnummer: integer; + + /** The type of registry entry. */ journalposttype: - | "inngaaende_dokument" - | "utgaaende_dokument" - | "organinternt_dokument_uten_oppfoelging" - | "organinternt_dokument_for_oppfoelging" - | "saksframlegg" - | "sakskart" - | "moeteprotokoll" - | "moetebok" - | "ukjent"; + | "inngaaende_dokument" // Incoming document + | "utgaaende_dokument" // Outgoing document + | "organinternt_dokument_uten_oppfoelging" // Internal document without follow-up + | "organinternt_dokument_for_oppfoelging" // Internal document for follow-up + | "saksframlegg" // Case presentation + | "sakskart" // Case map + | "moeteprotokoll" // Meeting protocol + | "moetebok" // Meeting book + | "ukjent"; // Unknown + + /** The date the registry entry was recorded. */ journaldato: plainDate; + + /** The date of the document itself. */ dokumentetsDato?: plainDate; + + /** Access control information for the registry entry. */ skjerming?: ExpandableField; + + /** Legacy field for the journal post type. */ legacyJournalposttype?: string; + + /** Legacy field for references to related cases. */ legacyFoelgsakenReferanse?: string[]; + + /** The identifier of the administrative unit responsible for the registry entry. */ administrativEnhet?: string; + + /** The full administrative unit object responsible for the registry entry (expandable reference). */ administrativEnhetObjekt?: ExpandableField; + /** The case this record belongs to. */ @visibility(Lifecycle.Read, Lifecycle.Update) saksmappe?: ExpandableField; } @@ -277,11 +375,13 @@ namespace Klasse { namespace Klassifikasjonssystem { /** - * Klassifikasjonssystem + * Represents a classification system used to organize and retrieve cases and documents. */ @extension("x-idPrefix", "ksys") model Klassifikasjonssystem extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Klassifikasjonssystem"; + + /** The title of the classification system. */ tittel: string; /** @@ -293,7 +393,7 @@ namespace Klassifikasjonssystem { namespace Korrespondansepart { /** - * Korrespondansepart + * Represents a correspondent, which is a sender or recipient of a document. */ @extension("x-idPrefix", "kp") model Korrespondansepart extends ArkivBase.ArkivBase { @@ -309,10 +409,19 @@ namespace Korrespondansepart { */ korrespondansepartNavnSensitiv: string; + /** The type of correspondent (e.g., 'sender', 'recipient'). */ korrespondanseparttype: string; + + /** The case officer associated with this correspondent. */ saksbehandler?: string; + + /** The email address of the correspondent. */ epostadresse?: string; + + /** The postal code of the correspondent. */ postnummer?: string; + + /** Indicates if the correspondent is the data controller. */ erBehandlingsansvarlig?: boolean; /** @@ -341,7 +450,7 @@ namespace Korrespondansepart { namespace Mappe { /** - * Mappe + * An abstract base model for case files (Saksmappe) and meeting records (Moetemappe). It contains common properties for these folder-like structures. */ model Mappe extends ArkivBase.ArkivBase { /** @@ -398,57 +507,91 @@ namespace Mappe { namespace Moetedeltaker { /** - * Moetedeltaker + * Represents a participant in a meeting. */ @extension("x-idPrefix", "md") model Moetedeltaker extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Moetedeltaker"; + + /** The name of the meeting participant. */ moetedeltakerNavn: string; + + /** The function or role of the participant in the meeting (e.g., 'Chairperson'). */ moetedeltakerFunksjon?: string; } } namespace Moetedokument { /** - * Moetedokument + * Represents a document related to a meeting, such as an agenda or minutes. */ @extension("x-idPrefix", "mdok") model Moetedokument extends Registrering.Registrering { @visibility(Lifecycle.Read) entity: "Moetedokument"; + + /** The type of meeting document (e.g., 'Agenda', 'Minutes'). */ moetedokumenttype: string; + + /** The case officer responsible for the document. */ saksbehandler?: string; + + /** The case officer responsible for the document, including sensitive information. */ saksbehandlerSensitiv?: string; + + /** The meeting this document belongs to. */ moetemappe?: ExpandableField; } } namespace Moetemappe { /** - * Moetemappe + * Represents a meeting, containing information about a specific meeting. */ @extension("x-idPrefix", "mm") model Moetemappe extends Mappe.Mappe { @visibility(Lifecycle.Read) entity: "Moetemappe"; + + /** A unique number or identifier for the meeting. */ moetenummer: string; + + /** The name of the committee or board holding the meeting. */ utvalg: string; + + /** The committee or board holding the meeting. */ @visibility(Lifecycle.Read) utvalgObjekt: ExpandableField; + + /** The date and time of the meeting. */ moetedato: utcDateTime; + + /** The location of the meeting. */ moetested?: string; + + /** A link to a video recording of the meeting. */ @maxLength(5000) videoLink?: string; + + /** A reference to the previous meeting. */ referanseForrigeMoete?: ExpandableField; + + /** A reference to the next meeting. */ referanseNesteMoete?: ExpandableField; + + /** Documents associated with the meeting. */ moetedokument?: ExpandableField[]; + + /** Cases discussed in the meeting. */ moetesak?: ExpandableField[]; } } namespace Moetesak { /** - * Moetesak + * Represents a case discussed in a meeting. */ @extension("x-idPrefix", "ms") model Moetesak extends Registrering.Registrering { @visibility(Lifecycle.Read) entity: "Moetesak"; + + /** The type of meeting case. */ moetesakstype: | "moete" | "politisk" @@ -458,35 +601,61 @@ namespace Moetesak { | "orientering" | "referat" | "annet"; + + /** The year of the meeting case. */ @minValue(1700) moetesaksaar?: integer; + + /** The sequence number of the meeting case within the year. */ @minValue(0) moetesakssekvensnummer?: integer; + + /** The name of the committee or board handling the case. */ utvalg?: string; + + /** The committee or board handling the case. */ @visibility(Lifecycle.Read) utvalgObjekt: ExpandableField; + + /** A link to a video recording of the case discussion. */ videoLink?: string; + + /** The report or investigation related to the case. */ utredning?: ExpandableField; + + /** The recommendation or proposition for the case. */ innstilling?: ExpandableField; + + /** The decision made in the case. */ vedtak?: ExpandableField; + + /** The meeting record this case belongs to. */ moetemappe?: ExpandableField; + + /** Legacy field for the meeting case type. */ legacyMoetesakstype?: string; + + /** Legacy field for a reference to another meeting case. */ legacyReferanseTilMoetesak?: string; } } namespace Moetesaksbeskrivelse { /** - * Moetesaksbeskrivelse + * Represents a textual description related to a meeting case, such as a recommendation or a report. */ @extension("x-idPrefix", "msb") model Moetesaksbeskrivelse extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Moetesaksbeskrivelse"; + + /** The text content of the description. */ tekstInnhold: string; + + /** The format of the text content (e.g., "text/html"). */ tekstFormat: string; } } namespace Registrering { /** - * Registrering + * An abstract base model for registry entries, such as journal entries (Journalpost) and meeting-related entries (Moetesak, Moetedokument). */ model Registrering extends ArkivBase.ArkivBase { /** @@ -528,7 +697,7 @@ namespace Registrering { namespace Saksmappe { /** - * Saksmappe + * Represents a case file, which is a folder for collecting all documents related to a specific case. */ @extension("x-idPrefix", "sm") model Saksmappe extends Mappe.Mappe { @@ -560,53 +729,79 @@ namespace Saksmappe { namespace Skjerming { /** - * Skjerming + * Represents access control information for a resource, specifying restrictions and the legal basis for them. */ @extension("x-idPrefix", "skj") model Skjerming extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Skjerming"; + + /** The code for the access restriction. */ tilgangsrestriksjon: string; + + /** The legal basis for the access restriction (a reference to a law or regulation). */ skjermingshjemmel?: string; } } namespace Utredning { /** - * Utredning + * Represents a report or investigation related to a meeting case. */ @extension("x-idPrefix", "utr") model Utredning extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Utredning"; + + /** The description of the case. */ saksbeskrivelse: ExpandableField; + + /** The recommendation or proposition. */ innstilling: ExpandableField; + + /** Documents that are part of the investigation. */ utredningsdokument?: ExpandableField[]; } } namespace Vedtak { /** - * Vedtak + * Represents a decision made in a meeting case. */ @extension("x-idPrefix", "ved") model Vedtak extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Vedtak"; + + /** The text of the decision. */ vedtakstekst: ExpandableField; + + /** The voting results related to the decision. */ votering?: ExpandableField[]; + + /** The protocol of proceedings for the decision. */ behandlingsprotokoll?: ExpandableField; + + /** The document containing the decision. */ vedtaksdokument?: ExpandableField[]; + + /** The date the decision was made. */ dato: plainDate; } } namespace Votering { /** - * Votering + * Represents a vote cast by a participant in a meeting. */ @extension("x-idPrefix", "vot") model Votering extends ArkivBase.ArkivBase { @visibility(Lifecycle.Read) entity: "Votering"; + + /** The meeting participant who cast the vote. */ moetedeltaker: ExpandableField; + + /** The vote cast ('Ja' for yes, 'Nei' for no, 'Blankt' for blank). */ stemme: "Ja" | "Nei" | "Blankt"; + + /** The person or party the participant is representing, if applicable. */ representerer?: ExpandableField; } } diff --git a/typespec/einnsyn.web.models.tsp b/typespec/einnsyn.web.models.tsp index 6f2fb77..139bdae 100644 --- a/typespec/einnsyn.web.models.tsp +++ b/typespec/einnsyn.web.models.tsp @@ -58,37 +58,57 @@ namespace Bruker { namespace Innsynskrav { /** - * Innsynskrav + * Represents a request for access to a specific registry entry (Journalpost). */ @extension("x-idPrefix", "ikd") model Innsynskrav extends Base.Base { @visibility(Lifecycle.Read) entity: "Innsynskrav"; + + /** The order containing this access request. */ innsynskravBestilling?: ExpandableField; + + /** The registry entry being requested. */ journalpost: ExpandableField; + + /** The public authority responsible for handling the request. */ enhet?: ExpandableField; + + /** The email address of the requester. */ @visibility(Lifecycle.Read) @format("email") email?: string; + + /** The timestamp when the request was sent to the public authority. */ sent?: utcDateTime; } } namespace InnsynskravBestilling { /** - * Innsynskrav + * Represents an order containing one or more access requests (Innsynskrav). */ @extension("x-idPrefix", "ik") model InnsynskravBestilling extends Base.Base { @visibility(Lifecycle.Read) entity: "InnsynskravBestilling"; + + /** The email address of the person who placed the order. */ @format("email") email: string; + + /** The list of individual access requests in this order. */ innsynskrav: ExpandableField[]; + + /** Indicates whether the email address has been verified. */ @visibility(Lifecycle.Read) verified?: boolean; + + /** The user who placed the order, if authenticated. */ @visibility(Lifecycle.Read) bruker?: ExpandableField; + + /** The preferred language for communication. */ language?: "nb" | "nn" | "en" | "se" = "nb"; } } namespace LagretSak { /** - * LagretSak + * Represents a case file (Saksmappe or Moetemappe) that a user has saved for quick access. */ @extension("x-idPrefix", "lsak") model LagretSak extends Base.Base { @@ -118,40 +138,80 @@ namespace LagretSak { namespace LagretSoek { /** - * LagretSoek + * Represents a search query saved by a user. */ @extension("x-idPrefix", "lsoek") model LagretSoek extends Base.Base { @visibility(Lifecycle.Read) entity: "LagretSoek"; + + /** The user who saved the search. */ bruker?: ExpandableField; + + /** A user-defined label for the saved search. */ label: string; + + /** Specifies whether the user wants to receive notifications for new results matching this search. */ subscribe?: boolean; + + /** The parameters of the saved search. */ searchParameters?: Search.SearchParameters; + + /** A legacy field for storing the raw query string. */ legacyQuery?: string; } } namespace Tilbakemelding { /** - * Tilbakemelding + * Represents user feedback submitted through the application. */ @extension("x-idPrefix", "tbm") model Tilbakemelding extends Base.Base { @visibility(Lifecycle.Read) entity: "Tilbakemelding"; + + /** The feedback message from the user. */ messageFromUser?: string; + + /** The path of the page where the feedback was submitted. */ path?: string; + + /** The referer URL. */ referer?: string; + + /** The user agent string of the user's browser. */ userAgent?: string; + + /** The screen height of the user's device. */ screenHeight?: integer; + + /** The screen width of the user's device. */ screenWidth?: integer; + + /** The document height of the page. */ docHeight?: integer; + + /** The document width of the page. */ docWidth?: integer; + + /** The window height of the browser. */ winHeight?: integer; + + /** The window width of the browser. */ winWidth?: integer; + + /** The horizontal scroll position. */ scrollX?: integer; + + /** The vertical scroll position. */ scrollY?: integer; + + /** Indicates whether the user was satisfied. */ userSatisfied?: boolean; + + /** Indicates whether the feedback has been handled by an administrator. */ handledByAdmin?: boolean; + + /** A comment from the administrator who handled the feedback. */ adminComment?: string; } }