2.1.2 • Published 4 months ago

@jeliq/app-sdk-core v2.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Jeliq App SDK Core

This is the core package for the Jeliq App SDK. It provides core modules and type definitions common to applications generated with Jeliq.

Installation

$ pnpm add @jeliq/app-sdk-core

Core Package Structure

Exported Modules (src/index.ts)

  • Error Handling

    • ApiError: Class for handling API errors
  • API Related

    • api: API instance
    • generateExpressOpenAPIOperations: For express-openapi initialization
    • generateExpressOpenAPIErrorMiddleware: For express-openapi initialization
    • generateExpressOpenAPIDoc: For express-openapi initialization
    • removeExampleKeys: Functionality for express-openapi-validator
    • mswHandlers: Handlers for Mock Service Worker
  • Providers

    • AppContextProvider: Application context provider
    • NavigationProvider: Navigation functionality provider
    • UIProvider: UI-related functionality provider
    • APIClientProvider: API client functionality provider
    • IframeControllerProvider: Provider for iframe control
    • MessageProvider: Message functionality provider
    • AuthProvider: Authentication functionality provider
  • Hooks

    • useNavigation: Hook for navigation
    • useAppContext: Hook for application context
    • useUIContext: Hook for UI-related functionality
    • useAuthContext: Hook for authentication functionality
    • useMutation: Hook for data updates
    • useQuery: Hook for data fetching
  • Authentication Features

    • getAccessToken: Access token retrieval
    • storeAccessToken: Access token storage
    • resetAccessToken: Access token reset
  • Routing

    • getAuthRoute: Get authentication route
    • flattenRoutes: Route flattening
    • isPublicRoute: Public route determination
    • getRouteNameFromRoute: Route name retrieval
    • joinPath: Path joining

Scripts (bin/*)

  • API Auto-generation
    • gen-api-client: Generate TypeScript client code from OpenAPI/Swagger specification
    • gen-api-server: Generate Express server code from OpenAPI/Swagger specification

Type Definitions (types/*)

  • router.ts: Routing-related type definitions
  • dataModel.ts: Data model-related type definitions
  • theme.ts: Theme-related type definitions
  • locale.ts: Internationalization-related type definitions
  • ui.ts: UI-related type definitions
  • api.ts: API-related type definitions
  • conditions.ts: Type definitions for data search conditions
  • typeConverter.ts: Type conversion utilities
  • error.ts: Error-related type definitions

Required Environment Variables

  • API Endpoint: NEXT_PUBLIC_API_ENDPOINT or API_ENDPOINT
  • Preview iframe Origin: NEXT_PUBLIC_JELIQ_PREVIEW_ORIGIN or JELIQ_PREVIEW_ORIGIN

License

MIT

Related Links

2.1.3

4 months ago

2.1.2

5 months ago

2.1.1

7 months ago

2.1.0

7 months ago

2.0.0

7 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago