UNPKG

@worktif/purews

Version:

Work TIF TypeScript-based AWS infrastructure toolkit featuring DynamoDB integration, AppSync support, SES functionality, and GraphQL capabilities with comprehensive audit logging and AWS Signature V4 authentication.

67 lines (66 loc) 2.88 kB
import 'reflect-metadata'; import { z } from 'zod'; import { EnvConfigDefault, Maybe } from '@worktif/utils'; /** * Schema definition for the environment configuration object using Zod. * This schema validates the structure of the `envConfigSchema` object, * ensuring that all expected environment configuration entries adhere to the specified structure and data types. * * The schema primarily includes configuration settings for AWS services: * - DynamoDB * - S3 Bucket * - Simple Email Service (SES) * * The configuration object is organized hierarchically: * - `aws.resources`: Contains nested configurations for each AWS resource. * - Subsections within `resources`, such as `dynamoDb`, `appSync`, `s3Bucket`, and `ses`, define specific settings for each resource. */ export declare const envConfigPurewsSchema: z.ZodObject<{ aws: z.ZodObject<{ resources: z.ZodObject<{ ses: z.ZodObject<{ SES_NOTIFICATION_EMAIL: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>; /** * The EnvConfigLocal class extends the EnvConfig class, providing configurations * tailored for the local environment setup. This class retrieves and validates * environment variable values and integrates them into the application configuration. * * It includes definitions for DynamoDB settings, AWS configurations, and default environment settings. */ export declare class EnvConfigPurews extends EnvConfigDefault { /** * Represents the AWS configuration for a given environment. This configuration * includes various AWS services and their respective properties required for the * application's integration. * * Properties: * - `appSync`: Configuration details for the AWS AppSync service. * - `appId`: The unique identifier of the AppSync application. * - `apiKey`: The API key used for accessing the AppSync API. * - `appUrl`: The URL of the AppSync API. * - `appRealTimeUrl`: The real-time URL of the AppSync API. * * - `ses`: Configuration details for the AWS Simple Email Service (SES). * - `notificationEmail`: The email address used for sending notifications. * * - `s3`: Configuration details for the AWS Simple Storage Service (S3). * - `website`: The endpoint of the S3 bucket used for website hosting. */ aws: EnvConfigDefault['defaults']['aws'] & { ses: { notificationEmail?: Maybe<string>; }; }; /** * Constructs a new instance of the class. * * Retrieves configuration values from the environment variables, validates them, and sets them as properties. * * @throws {ZodError} - If the validation of environment variables fails. */ constructor(support?: boolean); }