Learning Book Discontinued
A learning book was discontinued and left the catalog. cna-one's pricing consumer removes its prices from current and future price tables.
Overview
Fact: a learning book reached the status DISCONTINUED. Same payload as Learning Book PublishedLearning Book PublishedEventv1.0.0A learning book was published and is on sale. cna-one's pricing consumer opens a pending price for it in every current a...Ownercna-platformSchemaMapView docs.
When it is published. CNA OneCNA OneServicev1.0.0Franchise operating system (franchises and employees, pricing, products and learning books, school operations). Publishe...PublishesGrantApplicationAccess, EmployeeCreated +6SubscribesInviteUser, FranchiseCreated +9Ownercna-platformMapRepoView docs, in franchisorUpdateLearningBookStatus, when the new status is DISCONTINUED, after the status and its history row are written.
What the consumer does. Same handler as Learning Book DraftedLearning Book DraftedEventv1.0.0A learning book was created as a draft or moved back to draft, so it is not on sale. cna-one's pricing consumer removes ...Ownercna-platformSchemaMapView docs (syncLearningBookUnavailableToPrices): soft-deletes every price of the book in the default groups of current and future price tables. Idempotent by construction.
Kafka
Topic (aggregateRoot) | LearningBook |
Message key (routingKey) | payload.id |
| Contract owner | ONE |
metadata.event | LearningBookDiscontinued |
| Consumer group | pricing-price-events |
Payload schema
Same payload type as LearningBookPublished (LearningBookPayload); status is DISCONTINUED.
Source of truth
import { LearningBookPayload } from "events/one/learningBook/LearningBookPublished";
class LearningBookDiscontinued extends Event<LearningBookPayload> { public static owner = "ONE"; public static aggregateRoot = "LearningBook"; public static routingKey = "id";}Custom properties
| Property | Value |
|---|---|
| Contract Ownerx-contract-owner | ONE |
| Kafka Topicx-kafka-topic | LearningBook |
| Message Keyx-message-key | id |
| Sourcex-source | cna-one api/app/events/one/learningBook/LearningBookDiscontinued.ts |
Learning book id (UUID). Kafka message key.
Product the edition belongs to (product.products, type LEARNING_BOOK).
Publisher id (product.publishers).
Edition number.
Id in the Protheus ERP (4 characters).
ISBN (13 characters), or null.
URL of the digital book, or null.
Cover image URL, or null.
Whether digital content is available.
Publication status (cna-one LearningBookStatus). Matches the event: PUBLISHED, DRAFT or DISCONTINUED; UNDER_REVIEW never reaches the topic.
DRAFT PUBLISHED DISCONTINUED UNDER_REVIEW