fix(types): implement directus schema and fix envSchema export to unblock pipeline
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Failing after 1m13s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled

This commit is contained in:
2026-02-11 00:48:20 +01:00
parent 0d852db651
commit 1b999510db
2 changed files with 19 additions and 7 deletions

View File

@@ -3,8 +3,20 @@ import { createMintelDirectusClient, ensureDirectusAuthenticated } from '@mintel
import { config } from './config';
import { getServerAppServices } from './services/create-services.server';
/**
* Directus Schema Definitions
*/
export interface Schema {
products: any[];
categories: any[];
contact_submissions: any[];
product_requests: any[];
translations: any[];
categories_link: any[];
}
// Initialize client using Mintel standards (environment-aware)
const client = createMintelDirectusClient();
const client = createMintelDirectusClient<Schema>();
/**
* Helper to determine if we should show detailed errors

View File

@@ -3,12 +3,7 @@ import { validateMintelEnv, mintelEnvSchema } from '@mintel/next-utils';
/**
* Environment variable schema.
* Extends the default Mintel environment schema which already includes:
* - Directus (URL, TOKEN, INTERNAL_URL, etc.)
* - Mail (HOST, PORT, etc.)
* - Gotify
* - Logging
* - Analytics
* Extends the default Mintel environment schema.
*/
const envExtension = {
// Project specific overrides or additions
@@ -29,6 +24,11 @@ const envExtension = {
INFRA_DIRECTUS_TOKEN: z.string().optional(),
};
/**
* Full schema including Mintel base
*/
export const envSchema = mintelEnvSchema.extend(envExtension);
/**
* Validated environment object.
*/