Skip to content

Commit d7638b1

Browse files
committed
moved shared-constants.ts to src
1 parent 9b14179 commit d7638b1

File tree

13 files changed

+66
-12
lines changed

13 files changed

+66
-12
lines changed

ai_env.example

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
### OBP-API Configuration ###
2+
VITE_OBP_API_PORTAL_HOST=http://127.0.0.1:8080 # OBP API Portal URL (for "Portal Home" navigation link)
3+
VITE_OBP_API_HOST=http://127.0.0.1:8080 # OBP API server base URL (for all backend API requests)
4+
# VITE_OBP_API_VERSION is NO LONGER USED - hardcoded to v5.1.0 in shared-constants.ts for stability
5+
VITE_OBP_API_MANAGER_HOST=https://apimanagersandbox.openbankproject.com # OBP API Manager URL (optional - for navigation link)
6+
VITE_OBP_API_EXPLORER_HOST=http://localhost:5173 # API Explorer application URL (used for OAuth2 redirects and internal routing)
7+
VITE_OPB_SERVER_SESSION_PASSWORD=your-secret-session-password-here # Secret key for session encryption (keep this secure!)
8+
VITE_SHOW_API_MANAGER_BUTTON=false # Show/hide API Manager button in navigation (true/false)
9+
10+
### Redis Configuration ###
11+
VITE_OBP_REDIS_URL=redis://127.0.0.1:6379 # Redis connection string for session storage (format: redis://host:port)
12+
13+
### Opey Configuration ###
14+
VITE_CHATBOT_ENABLED=false # Enable/disable Opey chatbot widget (true/false)
15+
VITE_CHATBOT_URL=http://localhost:5000 # Opey chatbot service URL (only needed if chatbot is enabled)
16+
17+
### OAuth2/OIDC Configuration ###
18+
VITE_OBP_OAUTH2_CLIENT_ID=48ac28e9-9ee3-47fd-8448-69a62764b779 # OAuth2 client ID (UUID - must match OIDC server registration)
19+
VITE_OBP_OAUTH2_CLIENT_SECRET=fOTQF7jfg8C74u7ZhSjVQpoBYvD0KpWfM5UsEZBSFFM # OAuth2 client secret (keep this secure!)
20+
VITE_OBP_OAUTH2_REDIRECT_URL=http://localhost:5173/api/oauth2/callback # OAuth2 callback URL (must exactly match OIDC client registration)
21+
VITE_OBP_OAUTH2_WELL_KNOWN_URL=http://localhost:9000/obp-oidc/.well-known/openid-configuration # OIDC discovery endpoint URL
22+
VITE_OBP_OAUTH2_TOKEN_REFRESH_THRESHOLD=300 # Seconds before token expiry to trigger refresh (default: 300)
23+
24+
### Resource Documentation Version (Optional) ###
25+
# VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv5.1.0 # Default resource docs version for frontend URLs (format: OBPv5.1.0 - with OBP prefix, auto-constructed if not set)
26+
27+
### Session Configuration (Optional) ###
28+
# VITE_SESSION_MAX_AGE=3600 # Session timeout in seconds (default: 3600 = 1 hour)
29+
30+
### Styling Configuration (Optional) ###
31+
# VITE_OBP_LOGO_URL=https://example.com/logo.png # Custom logo image URL (uses default OBP logo if not set)
32+
# VITE_OBP_LINKS_COLOR=#3c8dbc # Primary link color (CSS color value)
33+
# VITE_OBP_HEADER_LINKS_COLOR=#39455f # Header navigation link color
34+
# VITE_OBP_HEADER_LINKS_HOVER_COLOR=#39455f # Header navigation link hover color
35+
# VITE_OBP_HEADER_LINKS_BACKGROUND_COLOR=#eef0f4 # Header navigation active link background color
36+
37+
################################################################################
38+
# POTENTIALLY UNUSED ENVIRONMENT VARIABLES
39+
################################################################################
40+
# The following variable appears in this file but was NOT found in the codebase.
41+
# It may be unused and safe to remove, or it might be used in a way that wasn't
42+
# detected by code search.
43+
################################################################################
44+
45+
# VITE_OBP_OAUTH2_TOKEN_REFRESH_THRESHOLD=300
46+
# ⚠️ NOT FOUND IN CODE - This variable is defined above but does not appear to
47+
# be referenced anywhere in the application code. It may have been intended for
48+
# a feature that was not implemented or was removed.
49+
# Consider removing this unless you know it's needed for a specific use case.
50+
51+
################################################################################
52+
# Note: The comment "VITE_OBP_API_VERSION is NO LONGER USED" on line 3 is
53+
# correct - this variable was replaced by hardcoded version in shared-constants.ts
54+
################################################################################

server/controllers/StatusController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
RESOURCE_DOCS_API_VERSION,
3737
MESSAGE_DOCS_API_VERSION,
3838
API_VERSIONS_LIST_API_VERSION
39-
} from '../../shared-constants'
39+
} from '../../src/shared-constants'
4040

4141
@Service()
4242
@Controller('/status')

server/controllers/UserController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { Request, Response } from 'express'
3030
import OBPClientService from '../services/OBPClientService'
3131
import { Service, Container } from 'typedi'
3232
import { OAuth2Service } from '../services/OAuth2Service'
33-
import { DEFAULT_OBP_API_VERSION } from '../../shared-constants'
33+
import { DEFAULT_OBP_API_VERSION } from '../../src/shared-constants'
3434

3535
@Service()
3636
@Controller('/user')

server/middlewares/OAuth2CallbackMiddleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { ExpressMiddlewareInterface } from 'routing-controllers'
2929
import { Request, Response } from 'express'
3030
import { Service, Container } from 'typedi'
3131
import { OAuth2Service } from '../services/OAuth2Service'
32-
import { DEFAULT_OBP_API_VERSION } from '../../shared-constants'
32+
import { DEFAULT_OBP_API_VERSION } from '../../src/shared-constants'
3333
import jwt from 'jsonwebtoken'
3434

3535
/**

server/services/OBPClientService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727

2828
import { Service } from 'typedi'
29-
import { DEFAULT_OBP_API_VERSION } from '../../shared-constants'
29+
import { DEFAULT_OBP_API_VERSION } from '../../src/shared-constants'
3030

3131
// Custom error class to preserve HTTP status codes
3232
class OBPAPIError extends Error {

server/services/OBPConsentsService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import OBPClientService from './OBPClientService'
1212
import { AxiosResponse } from 'axios'
1313
import axios from 'axios'
1414
import { Session } from 'express-session'
15-
import { DEFAULT_OBP_API_VERSION } from '../../shared-constants'
15+
import { DEFAULT_OBP_API_VERSION } from '../../src/shared-constants'
1616

1717
@Service()
1818
/**

src/components/AutoLogout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { ElNotification, NotificationHandle } from 'element-plus';
33
import { ref, computed, h, onMounted, onBeforeUnmount } from 'vue';
4-
import { DEFAULT_OBP_API_VERSION } from '../../shared-constants';
4+
import { DEFAULT_OBP_API_VERSION } from '../shared-constants';
55
66
// Props can be defined with defineProps
77
const props = defineProps({

src/obp/api-version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727

2828
import { get } from '../obp'
29-
import { API_VERSIONS_LIST_API_VERSION } from '../../shared-constants'
29+
import { API_VERSIONS_LIST_API_VERSION } from '../shared-constants'
3030

3131
// Get API Versions
3232
export async function getOBPAPIVersions(): Promise<any> {

src/obp/glossary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
import { get } from '../obp'
2929
import { updateLoadingInfoMessage } from './common-functions'
30-
import { GLOSSARY_API_VERSION } from '../../shared-constants'
30+
import { GLOSSARY_API_VERSION } from '../shared-constants'
3131

3232
// Get Glossary
3333
export async function getOBPGlossary(): Promise<any> {

src/obp/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727

2828
import superagent from 'superagent'
29-
import { DEFAULT_OBP_API_VERSION } from '../../shared-constants'
29+
import { DEFAULT_OBP_API_VERSION } from '../shared-constants'
3030

3131
// Always use v5.1.0 for application infrastructure - stable and debuggable
3232
export const OBP_API_VERSION = DEFAULT_OBP_API_VERSION

0 commit comments

Comments
 (0)