AugusteVN.Modules.Commerce._Shared
1.0.8
dotnet add package AugusteVN.Modules.Commerce._Shared --version 1.0.8
NuGet\Install-Package AugusteVN.Modules.Commerce._Shared -Version 1.0.8
<PackageReference Include="AugusteVN.Modules.Commerce._Shared" Version="1.0.8" />
<PackageVersion Include="AugusteVN.Modules.Commerce._Shared" Version="1.0.8" />
<PackageReference Include="AugusteVN.Modules.Commerce._Shared" />
paket add AugusteVN.Modules.Commerce._Shared --version 1.0.8
#r "nuget: AugusteVN.Modules.Commerce._Shared, 1.0.8"
#:package AugusteVN.Modules.Commerce._Shared@1.0.8
#addin nuget:?package=AugusteVN.Modules.Commerce._Shared&version=1.0.8
#tool nuget:?package=AugusteVN.Modules.Commerce._Shared&version=1.0.8
AugusteVN.Modules.Commerce._Shared
Contracts, DTOs, route constants, validators, and permission definitions for the Commerce module.
Part of the AugusteVN Modules collection.
Key Types
Permissions (Permissions)
Flags enum used to authorize Commerce API endpoints via the .RequirePermission() endpoint filter.
| Member | Value | Description |
|---|---|---|
None |
0 |
No access |
ManageCommerce |
1 |
Create/update products and manage shop order statuses |
All |
~None |
All permissions combined |
ApiRoutes
Static route constants used by the API layer to register endpoint groups.
| Constant | Value | Used By |
|---|---|---|
Products |
"Products" |
Product CRUD endpoints |
LeadMagnet |
"Products/LeadMagnet" |
Lead magnet product retrieval |
ShopOrders |
"ShopOrders" |
Shop order endpoints |
ShopOrderStatuses
String constants for the order lifecycle. Exposed as StatusList for validation.
| Status | Description |
|---|---|
Pending |
Order created, awaiting processing |
Processed |
Order fulfilled and delivered |
Canceled |
Order canceled by admin or customer |
InReview |
Under manual review |
Expired |
Payment window expired |
NonExistingPayment |
Payment reference not found |
PartiallyProcessed |
Some line items fulfilled |
DeliveryFailure |
Delivery failed (e.g. email bounce, download error) |
PaymentFailure |
Payment processing failed |
DTOs
ProductResponse
| Property | Type | Description |
|---|---|---|
Id |
Guid |
Unique product identifier |
Title |
string |
Display title |
CoverPhotoUrl |
string |
Cover image URL |
BodyAsMarkdown |
string |
Description in Markdown |
BodyAsHtml |
string |
Description in HTML |
BodyAsPlainText |
string? |
Plain-text description (SEO) |
Slug |
string |
URL-friendly slug |
IsAvailable |
bool |
Available for purchase |
IsPinned |
bool |
Pinned to top of listings |
IsLeadMagnet |
bool |
Free lead magnet product |
IsDigital |
bool |
Digital download (not physical) |
Downloadable |
DownloadableResponse? |
Attached downloadable file |
AmountInStock |
int |
Stock quantity |
Price |
double |
Regular price |
Discounted |
DiscountedResponse |
Discounted price info |
CreatedAt |
DateTime |
Creation timestamp |
DiscountedResponse
| Property | Type | Description |
|---|---|---|
Price |
double |
Discounted price amount |
ExpiresAt |
DateTime? |
Expiration date or null if permanent |
ShopOrderResponse
| Property | Type | Description |
|---|---|---|
Id |
Guid |
Unique order identifier |
Email |
string |
Customer email address |
Address |
string? |
Optional shipping address |
PaymentRefId |
Guid? |
Payment reference ID |
Products |
List<ShopOrderProductResponse> |
Line items |
CreatedAt |
DateTime |
Creation timestamp |
Status |
string |
Current order status |
TotalPrice |
double? |
Calculated total price |
ShopOrderProductResponse
| Property | Type | Description |
|---|---|---|
Quantity |
int |
Ordered quantity |
Product |
ProductResponse |
Full product details |
Title |
string |
Product title at time of order |
CommerceMetadataMessage
Service Bus message payload for order processing workflows.
| Property | Type | Description |
|---|---|---|
Entity |
SubEntityResponse? |
Entity reference (Id, Type, Slug) |
Type |
string |
Message entity type |
Action |
string? |
Action that triggered the message |
QueueOrTopicName |
string? |
Target Service Bus queue/topic |
PaymentRefId |
Guid? |
Associated payment reference |
EmailAddressesToNotify |
string[]? |
Recipients for order notifications |
Request DTOs
| Request | Key Properties | Validator |
|---|---|---|
UpsertProductRequest |
Id?, Title, CoverPhotoUrl, BodyAsMarkdown, BodyAsHtml, Slug, IsAvailable, IsPinned, IsDigital, IsLeadMagnet, Downloadable?, AmountInStock, Price, Discounted |
UpsertProductRequestValidator |
CreateShopOrderRequest |
Email, Address?, Products (list of ShopOrderProductRequest) |
CreateShopOrderRequestValidator |
UpdateShopOrderStatusRequest |
Id, Status |
UpdateShopOrderStatusRequestValidator |
GetProductForSlugRequest |
Slug |
GetProductForSlugRequestValidator |
GetProductsRequest |
* |
— |
GetShopOrdersRequest |
* |
— |
GetShopOrderByIdRequest |
* |
— |
GetShopOrdersForUserRequest |
* |
— |
GetProductsByIdsRequest |
ProductIds |
— |
Validators
| Validator | Rules |
|---|---|
UpsertProductRequestValidator |
Title not empty, CoverPhotoUrl not empty, BodyAsMarkdown not empty, BodyAsHtml not empty, Price > Discounted.Price (when both > 0) |
CreateShopOrderRequestValidator |
Email not empty and valid email format |
UpdateShopOrderStatusRequestValidator |
Id not empty, Status must be one of ShopOrderStatuses.StatusList |
GetProductForSlugRequestValidator |
Slug not empty, matches pattern ^[a-z0-9_-]+$ |
Installation
dotnet add package AugusteVN.Modules.Commerce._Shared
Links
- Commerce module overview
- Commerce.Api
- Commerce.Database
- Commerce.Features
- Commerce.Templates
- Commerce._Shared.Spa
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AugusteVN._Shared.Contracts (>= 1.1.0)
- FluentValidation (>= 11.11.0)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on AugusteVN.Modules.Commerce._Shared:
| Package | Downloads |
|---|---|
|
AugusteVN.Modules.Commerce.Domain
Domain entities and provider-agnostic interfaces for commerce |
|
|
AugusteVN.Modules.Commerce.Features
CQRS handlers for product and shop order operations |
|
|
AugusteVN.Modules.Commerce.Database.EfCore
EF Core DbContext and entities for products and orders |
|
|
AugusteVN.Modules.Commerce.Api
Minimal API endpoints for products and shop orders |
|
|
AugusteVN.Modules.Commerce.Templates
Razor email templates for order confirmations and digital downloads |
GitHub repositories
This package is not used by any popular GitHub repositories.