social / pragma.order /

Package pragma.order #

Types #

NameSummary

OrderService

class OrderService(pragmaNode: PragmaNode, instanceId: UUID, orderManager: OrderManager = OrderManager(), orderSectionsBuilder: OrderSectionsBuilder = OrderSectionsBuilder(), timeProxy: TimeProxy = TimeProxy()) : DistributedService, ConfigHandler<OrderServiceConfig>

OrderService is responsible for Pragma order syncing and management.

UnsafeOrderDaoNodeService

class UnsafeOrderDaoNodeService(pragmaNode: PragmaNode, databaseValidator: DatabaseValidator = pragmaNode.databaseValidator, dbComponentFactory: DatabaseConnectionComponentFactory = DatabaseConnectionComponentFactory(), uuidProxy: UUIDProxy = UUIDProxy(), timeProxy: TimeProxy = TimeProxy()) : UnpartitionedDaoNodeService<UnsafeOrderDaoNodeService.UnsafeOrderDaoConfig>

DAO node service for the unsafe_orders table: append-only grants made by UnsafeOrderRoutePlugin, keyed by pragmaSocialId. Multiple grants can exist per pragmaSocialId, one row per grant.

UnsafeOrderProviderPlugin

class UnsafeOrderProviderPlugin(service: Service, contentDataNodeService: ContentDataNodeService, httpClient: TimedHttpClient, random: RandomProxy, logger: Logger) : OrderProviderPlugin, ConfigurablePlugin<UnsafeOrderProviderPlugin.Config>

OrderProviderPlugin requires auth from IdProvider.UNSAFE_VALUE. chanceToErrorPerThousand is checked on every sync. It then checks UnsafeOrderRoutePlugin for any grants pending sync and, if there are any, grants exactly those and returns. Only when there’s nothing pending does it fall back to the chance-based random receive/revoke behavior (chanceToReceivePerThousand/chanceToRevokePerThousand) — both effectively disabled by default (chance 0).

UnsafeOrderRoutePlugin

class UnsafeOrderRoutePlugin(service: Service, contentDataNodeService: ContentDataNodeService) : RoutePlugin, ConfigurablePlugin<UnsafeOrderRoutePlugin.Config>

Stand-in third-party storefront for testing the order/fulfillment pipeline without a real provider. Trusts the caller-supplied pragmaSocialId with no additional authorization check - this is a test/dev-only endpoint, not a production route. Grants/lists are persisted through UnsafeOrderService over the RPC bus rather than touching UnsafeOrderDaoNodeService directly.

UnsafeOrderService

class UnsafeOrderService(pragmaNode: PragmaNode, instanceId: UUID) : DistributedService

Thin distributed service wrapping UnsafeOrderDaoNodeService, so callers such as UnsafeOrderRoutePlugin reach the DAO over the RPC bus rather than in-process.