semantics
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// #region GitServiceContractTests [C:3] [TYPE Module] [SEMANTICS git, service, test, contract, api]
|
||||
// @BRIEF API client tests ensuring correct endpoints are called per contract for Git service operations.
|
||||
// @RELATION DEPENDS_ON -> [GitServiceClient]
|
||||
// @RELATION DEPENDS_ON -> [EXT:frontend:GitServiceClient]
|
||||
|
||||
// #region gitServiceContractTests:Module [TYPE Function]
|
||||
// @SEMANTICS: git-service, api-client, contract-tests
|
||||
// @RELATION: DEPENDS_ON -> [GitServiceClient]
|
||||
// @RELATION DEPENDS_ON -> [EXT:frontend:GitServiceClient]
|
||||
// @PURPOSE: API client tests ensuring correct endpoints are called per contract
|
||||
// @LAYER: Infra (Tests)
|
||||
// @LAYER Tests
|
||||
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { gitService } from '../gitService';
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
//
|
||||
// @SEMANTICS: admin, users, roles, ad-mappings, api
|
||||
// @PURPOSE: Service for Admin-related API calls (User and Role management).
|
||||
// @LAYER: Service
|
||||
// @RELATION: DEPENDS_ON -> api_module
|
||||
// @LAYER Service
|
||||
// @RELATION DEPENDS_ON -> [EXT:frontend:api_module]
|
||||
//
|
||||
// @INVARIANT: All requests must include valid Admin JWT token (handled by api client).
|
||||
|
||||
@@ -22,7 +22,7 @@ import { api } from '../lib/api';
|
||||
* @pre User must be authenticated with Admin privileges.
|
||||
* @post Returns an array of user objects.
|
||||
* @returns {Promise<Array>}
|
||||
* @relation CALLS -> backend.src.api.routes.admin.list_users
|
||||
* @relation CALLS -> [EXT:path:backend.src.api.routes.admin.list_users]
|
||||
*/
|
||||
async function getUsers() {
|
||||
console.log('[getUsers][Entry]');
|
||||
@@ -44,7 +44,7 @@ async function getUsers() {
|
||||
* @param {Object} userData - User details (username, email, password, roles, is_active).
|
||||
* @post New user record created in auth.db.
|
||||
* @returns {Promise<Object>}
|
||||
* @relation CALLS -> backend.src.api.routes.admin.create_user
|
||||
* @relation CALLS -> [EXT:path:backend.src.api.routes.admin.create_user]
|
||||
*/
|
||||
async function createUser(userData) {
|
||||
console.log('[createUser][Entry]');
|
||||
@@ -65,7 +65,7 @@ async function createUser(userData) {
|
||||
* @pre User must be authenticated with Admin privileges.
|
||||
* @post Returns an array of role objects.
|
||||
* @returns {Promise<Array>}
|
||||
* @relation CALLS -> backend.src.api.routes.admin.list_roles
|
||||
* @relation CALLS -> [EXT:path:backend.src.api.routes.admin.list_roles]
|
||||
*/
|
||||
async function getRoles() {
|
||||
console.log('[getRoles][Entry]');
|
||||
@@ -244,7 +244,7 @@ async function getPermissions() {
|
||||
/**
|
||||
* @purpose Fetches current logging configuration.
|
||||
* @returns {Promise<Object>} - Logging config with level, task_log_level, enable_belief_state.
|
||||
* @relation CALLS -> backend.src.api.routes.settings.get_logging_config
|
||||
* @relation CALLS -> [EXT:path:backend.src.api.routes.settings.get_logging_config]
|
||||
*/
|
||||
async function getLoggingConfig() {
|
||||
console.log('[getLoggingConfig][Entry]');
|
||||
@@ -264,7 +264,7 @@ async function getLoggingConfig() {
|
||||
* @purpose Updates logging configuration.
|
||||
* @param {Object} configData - Logging config (level, task_log_level, enable_belief_state).
|
||||
* @returns {Promise<Object>}
|
||||
* @relation CALLS -> backend.src.api.routes.settings.update_logging_config
|
||||
* @relation CALLS -> [EXT:path:backend.src.api.routes.settings.update_logging_config]
|
||||
*/
|
||||
async function updateLoggingConfig(configData) {
|
||||
console.log('[updateLoggingConfig][Entry]');
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
/**
|
||||
* @SEMANTICS: git, service, api, client
|
||||
* @PURPOSE: API client for Git operations, managing the communication between frontend and backend.
|
||||
* @LAYER: Service
|
||||
* @RELATION: DEPENDS_ON -> specs/011-git-integration-dashboard/contracts/api.md
|
||||
* @LAYER Service
|
||||
* @RELATION DEPENDS_ON -> specs/011-git-integration-dashboard/contracts/api.md
|
||||
*/
|
||||
|
||||
import { requestApi } from '../lib/api';
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
// #region storageService:Module [TYPE Function]
|
||||
// @PURPOSE: Default purpose
|
||||
// @RELATION: USES -> App
|
||||
// @RELATION USES -> [EXT:frontend:App]
|
||||
/**
|
||||
* @purpose Frontend API client for file storage management.
|
||||
* @layer Service
|
||||
* @relation DEPENDS_ON -> backend.api.storage
|
||||
* @relation DEPENDS_ON -> [EXT:path:backend.api.storage]
|
||||
* @SEMANTICS: storage, api, client
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user