WP Kernel API / core/src
core/src
WP Kernel - Core Framework Package
Rails-like framework for building modern WordPress products where JavaScript is the source of truth and PHP is a thin contract.
Examples
ts
import { fetch } from '@wpkernel/core/http';
import { defineResource } from '@wpkernel/core/resource';
import { KernelError } from '@wpkernel/core/error';
ts
import { http, resource, error } from '@wpkernel/core';
await http.fetch({ path: '/my-plugin/v1/things' });
resource.defineResource({ name: 'thing', routes: {...} });
throw new error.KernelError('ValidationError', {...});
ts
import { fetch, defineResource, KernelError } from '@wpkernel/core';
Modules
Namespaces
Classes
Interfaces
- KernelUIConfig
- ConfigureKernelOptions
- UIIntegrationOptions
- KernelUIPolicyRuntime
- KernelInstance
- ResourceDataViewsMenuConfig
- ResourceDataViewsScreenConfig
- ResourceDataViewsUIConfig
- ResourceAdminUIConfig
- ResourceUIConfig
Type Aliases
- ActionOptions
- WaitOptions
- ActionJobs
- ActionStartEvent
- ActionCompleteEvent
- ActionErrorEvent
- ActionLifecycleEvent
- ActionContext
- ActionFn
- ActionConfig
- DefinedAction
- NoticeStatus
- KernelRegistry
- KernelUIAttach
- ErrorCode
- ErrorContext
- ErrorData
- SerializedError
- ResourceDefinedEvent
- ActionDefinedEvent
- ActionDomainEvent
- CacheInvalidatedEvent
- CustomKernelEvent
- KernelEventMap
- HttpMethod
- TransportMeta
- TransportRequest
- TransportResponse
- ResourceRequestEvent
- ResourceResponseEvent
- ResourceErrorEvent
- NamespaceDetectionMode
- NamespaceRuntimeContext
- NamespaceDetectionOptions
- NamespaceDetectionResult
- PolicyReporter
- PolicyRule
- PolicyMap
- ParamsOf
- PolicyCacheOptions
- PolicyCache
- PolicyContext
- PolicyOptions
- PolicyDefinitionConfig
- PolicyHelpers
- PolicyDeniedEvent
- ReporterLevel
- ReporterOptions
- Reporter
- CacheKeyPattern
- PathParams
- InvalidateOptions
- ResourceRoute
- ResourceIdentityConfig
- ResourcePostMetaDescriptor
- ResourceStorageConfig
- ResourceRoutes
- CacheKeyFn
- CacheKeys
- ResourceQueryParamDescriptor
- ResourceQueryParams
- ResourceStoreOptions
- ResourceConfig
- ListResponse
- ResourceClient
- ResourceObject
- ResourceState
- ResourceActions
- ResourceSelectors
- ResourceResolvers
- ResourceStoreConfig
- ResourceStore
Variables
Functions
- defineAction
- createActionMiddleware
- invokeAction
- configureKernel
- kernelEventsPlugin
- registerKernelStore
- getKernelEventBus
- setKernelEventBus
- getRegisteredResources
- getRegisteredActions
- clearRegisteredResources
- clearRegisteredActions
- fetch
- sanitizeNamespace
- detectNamespace
- getNamespace
- isValidNamespace
- createPolicyProxy
- definePolicy
- setKernelReporter
- getKernelReporter
- clearKernelReporter
- createReporter
- createNoopReporter
- normalizeCacheKey
- interpolatePath
- invalidate
- defineResource
- createStore
References
ACTION_LIFECYCLE_PHASES
Re-exports ACTION_LIFECYCLE_PHASES
WPK_EXIT_CODES
Re-exports WPK_EXIT_CODES
serializeKernelError
Re-exports serializeKernelError
ActionLifecyclePhase
Re-exports ActionLifecyclePhase
WPKExitCode
Re-exports WPKExitCode
KernelUIRuntime
Re-exports KernelUIRuntime