diff --git a/lib/api/generated/api/catalog_api.dart b/lib/api/generated/api/catalog_api.dart index 6dfcc6b..feeb097 100644 --- a/lib/api/generated/api/catalog_api.dart +++ b/lib/api/generated/api/catalog_api.dart @@ -420,7 +420,7 @@ class CatalogApi { /// Carries the variants with their prices and stock and the seller summary. A listing that was never public — `draft` or `pending` — is readable only by its owner and by staff. One that is `hidden` or soft-deleted is readable by anyone, because a cart or an order that references it still has to render; `status` and `deleted_at` say that it cannot be bought. /// /// Parameters: - /// * [id] - The listing's opaque id or its slug. A slug is lowercase, hyphen-separated and never contains an underscore, so it cannot be mistaken for an id — but only the id is accepted today; resolving a slug needs a lookup this route does not have yet. + /// * [id] - The listing's opaque id or the slug a link carries. A slug is lowercase, hyphen-separated and never contains an underscore, so it cannot be mistaken for an id; it resolves without a lookup, because it carries the id on the end. /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -502,7 +502,7 @@ class CatalogApi { } /// Edit a listing - /// An edit to a draft applies immediately. An edit to a live listing that trips the prohibited-goods filter is held as a pending edit and applied only when a moderator approves it, so the version buyers see never changes into unreviewed content. The slug is fixed at creation. Renaming a listing leaves it alone: there is no redirect table, so a new slug would only turn every link already shared into a 404, and `GET /listings/{id}` takes the id as well. + /// An edit to a draft applies immediately. An edit to a live listing that trips the prohibited-goods filter is held as a pending edit and applied only when a moderator approves it, so the version buyers see never changes into unreviewed content. The slug's readable half is fixed at creation. Renaming a listing leaves it alone, so a link shared before the rename keeps saying what it said then — and it would resolve either way, since the id it carries is what addresses the listing. /// /// Parameters: /// * [id] - The opaque id. A write addresses the listing, never its public slug. diff --git a/lib/api/generated/deserialize.dart b/lib/api/generated/deserialize.dart index 6d09fd2..0d1f1a1 100644 --- a/lib/api/generated/deserialize.dart +++ b/lib/api/generated/deserialize.dart @@ -231,8 +231,6 @@ ReturnType deserialize( bool growable = true, }) { switch (targetType) { - case 'String': - return '$value' as ReturnType; case 'int': return (value is int ? value : int.parse('$value')) as ReturnType; case 'bool': diff --git a/lib/api/generated/model/listing.dart b/lib/api/generated/model/listing.dart index ba24b0d..d717edc 100644 --- a/lib/api/generated/model/listing.dart +++ b/lib/api/generated/model/listing.dart @@ -129,7 +129,7 @@ class Listing { @JsonKey(name: r'seller', required: true, includeIfNull: false) final AccountSummary seller; - /// URL-friendly, globally unique and fixed at creation. + /// The slug a link carries: the listing's name, slugified and frozen at creation, with the listing's id on the end. The text in front is for the person reading the link and is not matched — renaming a listing does not rewrite links already shared, and a stale one still resolves because the id behind the last hyphen is what addresses the listing. It never contains an underscore, which is how `GET /listings/{id}` tells it from a `ListingID` and accepts either. A name that slugifies to nothing leaves the id alone. @JsonKey(name: r'slug', required: true, includeIfNull: false) final String slug; diff --git a/lib/api/generated/model/listing_detail.dart b/lib/api/generated/model/listing_detail.dart index 0d671d3..9148e68 100644 --- a/lib/api/generated/model/listing_detail.dart +++ b/lib/api/generated/model/listing_detail.dart @@ -146,6 +146,7 @@ class ListingDetail { @JsonKey(name: r'seller', required: true, includeIfNull: false) final AccountSummary seller; + /// The slug a link carries: the listing's name, slugified and frozen at creation, with the listing's id on the end. The text in front is for the person reading the link and is not matched — renaming a listing does not rewrite links already shared, and a stale one still resolves because the id behind the last hyphen is what addresses the listing. It never contains an underscore, which is how `GET /listings/{id}` tells it from a `ListingID` and accepts either. A name that slugifies to nothing leaves the id alone. @JsonKey(name: r'slug', required: true, includeIfNull: false) final String slug; diff --git a/lib/features/auth/presentation/providers/auth_provider.g.dart b/lib/features/auth/presentation/providers/auth_provider.g.dart index 561c3a2..7ea39b6 100644 --- a/lib/features/auth/presentation/providers/auth_provider.g.dart +++ b/lib/features/auth/presentation/providers/auth_provider.g.dart @@ -41,7 +41,7 @@ final class AuthNotifierProvider } } -String _$authNotifierHash() => r'ca2a9efa27409be3254e2a512e2b9542d4151a23'; +String _$authNotifierHash() => r'b2e5ce59d4d17725098f65f1f6b01b9eebf18b60'; abstract class _$AuthNotifier extends $Notifier { AuthState build(); diff --git a/lib/features/checkout/presentation/providers/checkout_provider.dart b/lib/features/checkout/presentation/providers/checkout_provider.dart index b112f94..5d60f3f 100644 --- a/lib/features/checkout/presentation/providers/checkout_provider.dart +++ b/lib/features/checkout/presentation/providers/checkout_provider.dart @@ -65,6 +65,7 @@ abstract class CheckoutState with _$CheckoutState { /// checkout that breaks the day an operator retires that rail. @Default([]) List