Settings variables

As a property value, you can assign the value of a settings variable. To access the settings properties, use the variable @togoSettings(interface ITogoSettings) between braces {@togoSettings.<propertyName>}.

Example

{
  "name": "commandBar",
  "type": "CommandBar",
  "editMode": true,
  "editForm": "edit",
  "cancelForm": "display",
  "visible": "{base.isContributor}",
  "endpointName": "commandBar",
  "allowLanguageSelector": {
    "endpointResponse": "{base.translation.active}"
  },
  "removeEndpoint": "{@togoSettings.apiEndpoints.provisioning}/AddonContent/Remove?uniqueId={uniqueId}",
  "additionalActionItems": [
    {
      "key": "Translate",
      "name": {
        "en-US": "Translation",
        "es-ES": "Traducción"
      },
      "iconName": "LocaleLanguage",
      "onClick": {
        "type": "Translate"
      },
      "propertyName": "translate",
      "visible": "{base.translation.active}"
    }
  ]
}

Interface

interface ITogoSettings {
  tenant: string;
  backendAppClientId: string;
  sharepointAppClientId: string;
  authType?: AuthType;
  authCacheLocation?: BrowserCacheLocation;
  redirectUri: string;
  relativeUrlTogoAdminSite: string;
  ocpApimSubscriptionKey: string;
  apiEndpoints: {
    [prop in Syntphony_API_ENDPOINTS]: string;
  };
  cdnUrl: string;
}
enum AuthType {
  WITHOUT_TOKEN = "WITHOUT_TOKEN",
  AADHTTPCLIENT = "AADHTTPCLIENT",
  MSAL2 = "MSAL2",
}
enum BrowserCacheLocation {
  LocalStorage = "localStorage",
  SessionStorage = "sessionStorage",
  MemoryStorage = "memoryStorage",
}
enum Syntphony_API_ENDPOINTS {
  actions = "actions",
  contents = "contents",
  provisioning = "provisioning",
  notifications = "notifications",
  myAssistant = "myAssistant",
  analytics = "analytics",
  social = "social",
  open = "open",
  marketplace = "marketplace",
  setup = "setup",
  search = "search",
  addons = "addons",
  navigation = "navigation",
  userProfile = "userProfile",
}