freescout2ant/Config/config.php
Claude 6eb4e8dfc2
Add API selection between MitarbeiterWebservice and Customer Archives/Stocks
Introduces an "Archive API" setting that switches both reads and writes
between the legacy MitarbeiterWebservice API and the new Customer Archives
(write) + Stocks (read) APIs.

- New write strategy (ArchiveWriterInterface + factory): legacy header-based
  writer and a Customer Archives JSON writer (CreateArchiveRequestDto, files as
  base64 data URIs, one entry per attachment), backed by CustomerArchivesApiClient.
- New read strategy (CrmReadClientInterface + factory): legacy delegate and a
  StocksReadClient that normalizes Stocks responses (customers/names,
  communications, contracts, contract lines/states) to the legacy shape so the
  controller/frontend stay unchanged.
- Hybrid: customer lookup by e-mail stays on MitarbeiterWebservice because the
  Stocks API cannot search by e-mail.
- Settings: ameise_api + ameise_archive_is_public dropdowns, env-backed base
  URLs for both new APIs (test/live), German translations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KfJdbw4dRvJdcihTkKt69T
2026-06-25 13:23:16 +00:00

32 lines
1.8 KiB
PHP

<?php
return [
'name' => 'AmeiseModule',
'ameise_client_secret' => env('AMEISE_CLIENT_SECRET'),
'ameise_mode' => env('AMEISE_MODE', 'test'), // test or live
'ameise_response_type' => env('AMEISE_RESPONSE_TYPE', 'code'),
'ameise_client_id' => env('AMEISE_CLIENT_ID'),
'ameise_state' => env('AMEISE_STATE', 'freescout'),
'ameise_scope' => env('AMEISE_SCOPE', 'ameise/mitarbeiterwebservice offline'),
'ameise_redirect_uri' => env('AMEISE_REDIRECT_URI', '/crm/auth'),
// Verbose logging can quickly grow the FreeScout activity_logs table.
// Disable by default and allow opt-in via AMEISE_LOG_STATUS=true.
'ameise_log_status' => env('AMEISE_LOG_STATUS', false),
// Selects which Ameise API stack is used for reading and writing.
// 'mitarbeiterwebservice' => legacy MitarbeiterWebservice REST API (default)
// 'customer_archives' => new stack: Stocks API (reads) + Customer Archives API (writes)
'ameise_api' => env('AMEISE_API', 'mitarbeiterwebservice'),
// Visibility of archive entries created via the Customer Archives API.
'ameise_archive_is_public' => env('AMEISE_ARCHIVE_IS_PUBLIC', false),
// Base URLs for the Customer Archives API (write), switched by ameise_mode.
'ameise_archive_base_url_test' => env('AMEISE_ARCHIVE_BASE_URL_TEST', 'https://customer-archives-ameiseapis.inte.dionera.dev'),
'ameise_archive_base_url_live' => env('AMEISE_ARCHIVE_BASE_URL_LIVE', 'https://customer-archives.ameiseapis.com'),
// Base URLs for the Stocks API (read), switched by ameise_mode.
'ameise_stocks_base_url_test' => env('AMEISE_STOCKS_BASE_URL_TEST', 'https://stocks-ameiseapis.inte.dionera.dev'),
'ameise_stocks_base_url_live' => env('AMEISE_STOCKS_BASE_URL_LIVE', 'https://stocks.ameiseapis.com'),
];