UNPKG

@glec/mcp-server

Version:

GLEC API MCP Server for Claude Desktop - Carbon emission calculation for logistics and transportation

363 lines 12.6 kB
import { z } from 'zod'; export interface GLECConfig { apiKey: string; bearerToken?: string; baseUrl: string; timeout: number; retries: number; } export type TransportMode = 'road' | 'rail' | 'air' | 'sea'; export type VehicleSize = 'small' | 'medium' | 'large'; export declare const RoadTransportSchema: z.ZodObject<{ transportMode: z.ZodString; startLocation: z.ZodOptional<z.ZodString>; endLocation: z.ZodOptional<z.ZodString>; distance: z.ZodNumber; weight: z.ZodNumber; transportDate: z.ZodOptional<z.ZodString>; distanceUnit: z.ZodDefault<z.ZodOptional<z.ZodString>>; weightUnit: z.ZodDefault<z.ZodOptional<z.ZodString>>; vehicleType: z.ZodOptional<z.ZodString>; fuelType: z.ZodOptional<z.ZodString>; loadFactor: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { transportMode: string; distance: number; weight: number; distanceUnit: string; weightUnit: string; startLocation?: string | undefined; endLocation?: string | undefined; transportDate?: string | undefined; vehicleType?: string | undefined; fuelType?: string | undefined; loadFactor?: number | undefined; }, { transportMode: string; distance: number; weight: number; startLocation?: string | undefined; endLocation?: string | undefined; transportDate?: string | undefined; distanceUnit?: string | undefined; weightUnit?: string | undefined; vehicleType?: string | undefined; fuelType?: string | undefined; loadFactor?: number | undefined; }>; export declare const RailTransportSchema: z.ZodObject<{ transportMode: z.ZodString; startLocation: z.ZodOptional<z.ZodString>; endLocation: z.ZodOptional<z.ZodString>; distance: z.ZodNumber; weight: z.ZodNumber; transportDate: z.ZodOptional<z.ZodString>; distanceUnit: z.ZodDefault<z.ZodOptional<z.ZodString>>; weightUnit: z.ZodDefault<z.ZodOptional<z.ZodString>>; trainType: z.ZodOptional<z.ZodString>; electrification: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { transportMode: string; distance: number; weight: number; distanceUnit: string; weightUnit: string; startLocation?: string | undefined; endLocation?: string | undefined; transportDate?: string | undefined; trainType?: string | undefined; electrification?: string | undefined; }, { transportMode: string; distance: number; weight: number; startLocation?: string | undefined; endLocation?: string | undefined; transportDate?: string | undefined; distanceUnit?: string | undefined; weightUnit?: string | undefined; trainType?: string | undefined; electrification?: string | undefined; }>; export declare const AirTransportSchema: z.ZodObject<{ transportMode: z.ZodString; startLocation: z.ZodOptional<z.ZodString>; endLocation: z.ZodOptional<z.ZodString>; distance: z.ZodNumber; weight: z.ZodNumber; transportDate: z.ZodOptional<z.ZodString>; distanceUnit: z.ZodDefault<z.ZodOptional<z.ZodString>>; weightUnit: z.ZodDefault<z.ZodOptional<z.ZodString>>; aircraftType: z.ZodOptional<z.ZodString>; flightType: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { transportMode: string; distance: number; weight: number; distanceUnit: string; weightUnit: string; startLocation?: string | undefined; endLocation?: string | undefined; transportDate?: string | undefined; aircraftType?: string | undefined; flightType?: string | undefined; }, { transportMode: string; distance: number; weight: number; startLocation?: string | undefined; endLocation?: string | undefined; transportDate?: string | undefined; distanceUnit?: string | undefined; weightUnit?: string | undefined; aircraftType?: string | undefined; flightType?: string | undefined; }>; export declare const SeaTransportSchema: z.ZodObject<{ transportMode: z.ZodString; startLocation: z.ZodOptional<z.ZodString>; endLocation: z.ZodOptional<z.ZodString>; distance: z.ZodNumber; weight: z.ZodNumber; transportDate: z.ZodOptional<z.ZodString>; distanceUnit: z.ZodDefault<z.ZodOptional<z.ZodString>>; weightUnit: z.ZodDefault<z.ZodOptional<z.ZodString>>; shipType: z.ZodOptional<z.ZodString>; containerType: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { transportMode: string; distance: number; weight: number; distanceUnit: string; weightUnit: string; startLocation?: string | undefined; endLocation?: string | undefined; transportDate?: string | undefined; shipType?: string | undefined; containerType?: string | undefined; }, { transportMode: string; distance: number; weight: number; startLocation?: string | undefined; endLocation?: string | undefined; transportDate?: string | undefined; distanceUnit?: string | undefined; weightUnit?: string | undefined; shipType?: string | undefined; containerType?: string | undefined; }>; export declare const ShipperCreateSchema: z.ZodObject<{ name: z.ZodString; email: z.ZodOptional<z.ZodString>; phone: z.ZodOptional<z.ZodString>; address: z.ZodOptional<z.ZodString>; country: z.ZodOptional<z.ZodString>; industry: z.ZodOptional<z.ZodString>; companySize: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; email?: string | undefined; phone?: string | undefined; address?: string | undefined; country?: string | undefined; industry?: string | undefined; companySize?: string | undefined; }, { name: string; email?: string | undefined; phone?: string | undefined; address?: string | undefined; country?: string | undefined; industry?: string | undefined; companySize?: string | undefined; }>; export declare const ShipperUpdateSchema: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; email: z.ZodOptional<z.ZodOptional<z.ZodString>>; phone: z.ZodOptional<z.ZodOptional<z.ZodString>>; address: z.ZodOptional<z.ZodOptional<z.ZodString>>; country: z.ZodOptional<z.ZodOptional<z.ZodString>>; industry: z.ZodOptional<z.ZodOptional<z.ZodString>>; companySize: z.ZodOptional<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { name?: string | undefined; email?: string | undefined; phone?: string | undefined; address?: string | undefined; country?: string | undefined; industry?: string | undefined; companySize?: string | undefined; }, { name?: string | undefined; email?: string | undefined; phone?: string | undefined; address?: string | undefined; country?: string | undefined; industry?: string | undefined; companySize?: string | undefined; }>; export declare const ESGReportSchema: z.ZodObject<{ reportType: z.ZodLiteral<"esg">; format: z.ZodEnum<["pdf", "excel", "json"]>; startDate: z.ZodString; endDate: z.ZodString; scope: z.ZodOptional<z.ZodEnum<["1", "2", "3", "1,2", "1,3", "2,3", "1,2,3"]>>; language: z.ZodDefault<z.ZodOptional<z.ZodString>>; includeCharts: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; includeDetails: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; certificationStandard: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { reportType: "esg"; format: "pdf" | "excel" | "json"; startDate: string; endDate: string; language: string; includeCharts: boolean; includeDetails: boolean; scope?: "1" | "2" | "3" | "1,2" | "1,3" | "2,3" | "1,2,3" | undefined; certificationStandard?: string | undefined; }, { reportType: "esg"; format: "pdf" | "excel" | "json"; startDate: string; endDate: string; scope?: "1" | "2" | "3" | "1,2" | "1,3" | "2,3" | "1,2,3" | undefined; language?: string | undefined; includeCharts?: boolean | undefined; includeDetails?: boolean | undefined; certificationStandard?: string | undefined; }>; export declare const ComplianceReportSchema: z.ZodObject<{ reportType: z.ZodLiteral<"compliance">; format: z.ZodEnum<["pdf", "excel", "json"]>; startDate: z.ZodString; endDate: z.ZodString; regulatoryFramework: z.ZodEnum<["EU_CSRD", "SEC_Climate", "TCFD", "GRI"]>; language: z.ZodDefault<z.ZodOptional<z.ZodString>>; auditTrail: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; digitalSignature: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; }, "strip", z.ZodTypeAny, { reportType: "compliance"; format: "pdf" | "excel" | "json"; startDate: string; endDate: string; language: string; regulatoryFramework: "EU_CSRD" | "SEC_Climate" | "TCFD" | "GRI"; auditTrail: boolean; digitalSignature: boolean; }, { reportType: "compliance"; format: "pdf" | "excel" | "json"; startDate: string; endDate: string; regulatoryFramework: "EU_CSRD" | "SEC_Climate" | "TCFD" | "GRI"; language?: string | undefined; auditTrail?: boolean | undefined; digitalSignature?: boolean | undefined; }>; export declare const CustomReportSchema: z.ZodObject<{ reportType: z.ZodLiteral<"custom">; format: z.ZodEnum<["pdf", "excel", "json"]>; startDate: z.ZodString; endDate: z.ZodString; customFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; groupingCriteria: z.ZodOptional<z.ZodEnum<["daily", "weekly", "monthly", "quarterly", "yearly"]>>; aggregationLevel: z.ZodOptional<z.ZodEnum<["summary", "detailed", "comprehensive"]>>; language: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { reportType: "custom"; format: "pdf" | "excel" | "json"; startDate: string; endDate: string; language: string; customFields?: string[] | undefined; groupingCriteria?: "daily" | "weekly" | "monthly" | "quarterly" | "yearly" | undefined; aggregationLevel?: "summary" | "detailed" | "comprehensive" | undefined; }, { reportType: "custom"; format: "pdf" | "excel" | "json"; startDate: string; endDate: string; language?: string | undefined; customFields?: string[] | undefined; groupingCriteria?: "daily" | "weekly" | "monthly" | "quarterly" | "yearly" | undefined; aggregationLevel?: "summary" | "detailed" | "comprehensive" | undefined; }>; export interface GLECApiResponse<T = any> { success: boolean; data?: T; error?: { code: string; message: string; details?: any; }; metadata?: { requestId: string; timestamp: string; version: string; }; } export interface EmissionCalculationResult { totalEmissions: number; unit: string; breakdown: { transportMode: string; distance: number; weight: number; emissionFactor: number; calculationMethod: string; }; metadata: { calculationDate: string; standard: string; version: string; }; } export interface ShipperInfo { id: string; name: string; email?: string; phone?: string; address?: string; country?: string; industry?: string; companySize?: string; createdAt: string; updatedAt: string; } export interface EmissionCode { code: string; name: string; description: string; category: string; emissionFactor: number; unit: string; standard: string; } export declare class GLECApiError extends Error { code: string; statusCode: number; details?: any | undefined; constructor(code: string, message: string, statusCode: number, details?: any | undefined); } export declare class ValidationError extends Error { field: string; constructor(message: string, field: string); } export declare class AuthenticationError extends Error { constructor(message?: string); } export declare class RateLimitError extends Error { constructor(message?: string); } export type RoadTransportRequest = z.infer<typeof RoadTransportSchema>; export type RailTransportRequest = z.infer<typeof RailTransportSchema>; export type AirTransportRequest = z.infer<typeof AirTransportSchema>; export type SeaTransportRequest = z.infer<typeof SeaTransportSchema>; export type ShipperCreateRequest = z.infer<typeof ShipperCreateSchema>; export type ShipperUpdateRequest = z.infer<typeof ShipperUpdateSchema>; export type ESGReportRequest = z.infer<typeof ESGReportSchema>; export type ComplianceReportRequest = z.infer<typeof ComplianceReportSchema>; export type CustomReportRequest = z.infer<typeof CustomReportSchema>; //# sourceMappingURL=index.d.ts.map