﻿{
  "AppSettings": {
    "AppInsights": true
  },
  "ApplicationInsights": {
    "ConnectionString": "InstrumentationKey=<Your-Key>;IngestionEndpoint=<URL>;LiveEndpoint=<URL>",
    "LogLevel": {
      "Default": "Information"
    }
  },
  "BatchTenant": {
    "BatchTenantId": "<GUID-OF-BATCH-TENANT>"
  },
  "BatchClient": {
    "Url": "<URL>",
    "Port": 443,
    "HttpMode": "Https",
    "TokenEndpoint": "<URL-SERVER-TOKEN-ENDPOINT>",
    "ClientId": "<OAuth2.0-ID>",
    "ClientSecret": "OAuth2.0-SECRET",
    "Scope": "DocFusion"
  },
  "BatchStatusFolder": {
    "InputFolder": "/temp/batch/batches-state/in",
    "OutputFolder": "/temp/batch/batches-state/out",
    "AutoApproveWhenNeeded": true,
    "RecordBlockSize": 20, // TODO:
    "RetryCount": 5,
    "RetryBackoffSeconds": 5,
    "Schedule": "*/1 * * * * *"
  },
  "BatchFolderMonitors": {
    "FolderMonitors": [
      
      {
        "Enabled": true,
        "Name": "Rewards Statement",
        "BatchTypeId": "<CHAIN-GUID>",
        "Schedule": "*/10 * * * * *",
        "InputFolder": "/temp/batch/in",
        "OutputFolder": "/temp/batch/out",
        "OutputFileExtension": ".pdf",
        "FilePattern": "*.xml",
        "ChunkSize": 10,
        "RecordProcessedExtension": ".processed",
        "FileNameTemplate": "{RecordId}_{RecordIdentifier}_{FileName}.pdf" // {RecordId} {RecordIdentifier} {FullFileName} {FileName} {FileExtension}
      }
    ]
  },
  "Logging": {
    "LogLevel": {
      "Default": "Trace"
    },
    "Console": {
      "FormatterName": "simple-console",
      "FormatterOptions": {
        "SingleLine": false,
        "IncludeScopes": true,
        "TimestampFormat": "yyyy/MM/dd HH:mm:ss "
      }
    }
  },
  "Serilog": {
    "Using": [
      "Serilog.Sinks.Console",
      "Serilog.Sinks.File",
      "Serilog.Sinks.ApplicationInsights"
    ],
    "_MinimumLevel": "Verbose", // Debug, Information, Warning, Error, Fatal
    "MinimumLevel": {
      "Default": "Verbose",
      "Override": {
        "Microsoft": "Warning",
        "System": "Warning"
      }
    },
    "WriteTo": [
      {
        "Name": "Console"
      },
      {
        "Name": "File",
        "Args": {
          "path": "logs/log-.txt",
          "rollingInterval": "Day",
          "fileSizeLimitBytes": 5242880,
          "rollOnFileSizeLimit": true,
          "retainedFileCountLimit": 31
        }
      },
      {
        "Name": "ApplicationInsights",
        "Args": {
          "connectionString": "InstrumentationKey=<Your-Key>;IngestionEndpoint=<URL>;LiveEndpoint=<URL>",
          "telemetryConverter": "Serilog.Sinks.ApplicationInsights.TelemetryConverters.TraceTelemetryConverter, Serilog.Sinks.ApplicationInsights",
          "restrictedToMinimumLevel": "Warning"
        }
      }
    ]
  }
}
