{
  "description": "Microsoft Graph connector schema for LEGALDIGM legal sources. Created in the customer's Microsoft 365 tenant after admin consent (ExternalConnection.ReadWrite.OwnedBy, ExternalItem.ReadWrite.OwnedBy). Items are pushed from LEGALDIGM's licensed API; access follows the customer's LEGALDIGM licence.",
  "connection": {
    "id": "legaldigm",
    "name": "LEGALDIGM",
    "description": "Swedish and EU statutes, court judgments, preparatory works and contract templates from LEGALDIGM. Use for legal questions about Swedish law, case law (NJA, HFD, AD) and EU law.",
    "activitySettings": { "urlToItemResolvers": [ { "@odata.type": "#microsoft.graph.externalConnectors.itemIdResolver", "priority": 1, "itemId": "{id}", "urlMatchInfo": { "baseUrls": ["https://legaldigm.se"], "urlPattern": "/(lagtexter|rattsfall)/(?<id>[^/]+)" } } ] }
  },
  "schema": {
    "baseType": "microsoft.graph.externalItem",
    "properties": [
      { "name": "title", "type": "String", "isSearchable": true, "isRetrievable": true, "labels": ["title"] },
      { "name": "reference", "type": "String", "isSearchable": true, "isQueryable": true, "isRetrievable": true, "aliases": ["sfs", "caseNumber"] },
      { "name": "kind", "type": "String", "isQueryable": true, "isRetrievable": true, "isRefinable": true },
      { "name": "court", "type": "String", "isQueryable": true, "isRetrievable": true, "isRefinable": true },
      { "name": "jurisdiction", "type": "String", "isQueryable": true, "isRetrievable": true, "isRefinable": true },
      { "name": "decisionDate", "type": "DateTime", "isQueryable": true, "isRetrievable": true, "labels": ["lastModifiedDateTime"] },
      { "name": "textSource", "type": "String", "isRetrievable": true },
      { "name": "url", "type": "String", "isRetrievable": true, "labels": ["url"] }
    ]
  },
  "exampleItem": {
    "id": "sfs-1915-218-36",
    "acl": [ { "type": "everyone", "value": "everyone", "accessType": "grant" } ],
    "properties": { "title": "Lag (1915:218) om avtal – 36 §", "reference": "1915:218 36 §", "kind": "statute_section", "jurisdiction": "SE", "textSource": "riksdagen", "url": "https://legaldigm.se/lagtexter/1915:218" },
    "content": { "type": "text", "value": "Verbatim statutory text from the official source." }
  }
}
