KolaPoint-schema-sdk 2.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.4
2
+ Name: KolaPoint-schema-sdk
3
+ Version: 2.7.0
4
+ Summary: KolaPoint Schema Registry — Shared Python enums and Pydantic v2 event models (Envelope V2)
5
+ Author-email: Kingsley Simeon <formulaking07@gmail.com>
6
+ License: UNLICENSED
7
+ Project-URL: Repository, https://github.com/KolaPoint-africa/KolaPoint-schema-registry
8
+ Keywords: KolaPoint,schema,events,pydantic
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: pydantic>=2.0.0
12
+
13
+ # KolaPoint-schema-sdk
14
+
15
+ KolaPoint Schema Registry — Shared Python enums and Pydantic v2 event models for all KolaPoint domain events across 20 modules (134 events).
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install KolaPoint-schema-sdk==1.0.0
21
+ ```
22
+
23
+ Always pin to an exact version. Do **not** use `>=` or `~=` — this is a contract package.
24
+
25
+ ## Requirements
26
+
27
+ - Python ≥ 3.10
28
+ - pydantic ≥ 2.0.0
29
+
30
+ ## Usage
31
+
32
+ ```python
33
+ from KolaPoint_schema.generated.models import OrderCreatedEvent, BuyerBehaviorRecordedEvent
34
+ from KolaPoint_schema.shared_enums import OrderStatus, VendorStatus
35
+
36
+ # Validate an inbound event
37
+ raw = {
38
+ "eventType": "order.created.v1",
39
+ "correlationId": "req-abc-123",
40
+ "timestamp": "2026-05-25T10:00:00Z",
41
+ "payload": {
42
+ "orderId": "order-xyz",
43
+ "userId": "user-abc",
44
+ "storeIds": ["store-1"],
45
+ "totalKobo": 25000,
46
+ "itemCount": 2,
47
+ "isQrOrder": False,
48
+ "checkoutSessionId": "chk-def",
49
+ }
50
+ }
51
+ event = OrderCreatedEvent(**raw)
52
+ print(event.payload.order_id) # "order-xyz"
53
+ print(event.payload.total_kobo) # 25000
54
+
55
+ # Use enums
56
+ status = OrderStatus.PENDING
57
+ assert status == "PENDING" # str enum
58
+ ```
59
+
60
+ ## Top-level import (convenience)
61
+
62
+ ```python
63
+ # Import everything from the top-level package
64
+ from KolaPoint_schema import OrderCreatedEvent, OrderStatus
65
+ ```
66
+
67
+ ## Available Exports
68
+
69
+ ### `KolaPoint_schema.shared_enums`
70
+
71
+ All Prisma enums as Python `str, Enum` subclasses (JSON-safe serialization):
72
+
73
+ - `OrderStatus` — PENDING, CONFIRMED, PREPARING, READY_FOR_PICKUP, OUT_FOR_DELIVERY, COMPLETED, CANCELLED, FAILED, REFUNDED
74
+ - `VendorStatus` — PENDING, ACTIVE, SUSPENDED, REJECTED
75
+ - `UserRole` — BUYER, VENDOR, ADMIN, SUPER_ADMIN, SUPPORT
76
+ - `ProductStatus` — DRAFT, ACTIVE, ARCHIVED
77
+ - `DeliveryStatus` — PENDING, ASSIGNED, PICKED_UP, IN_TRANSIT, DELIVERED, FAILED, RETURNED
78
+ - `NotificationChannel` — PUSH, IN_APP, EMAIL, SMS
79
+ - 20+ additional enums — see `KolaPoint_schema/shared_enums/__init__.py`
80
+
81
+ ### `KolaPoint_schema.generated.models`
82
+
83
+ Pydantic v2 models with `Field(alias="camelCase")` + `populate_by_name: True`:
84
+
85
+ | Class | Event type |
86
+ |-------|-----------|
87
+ | `OrderCreatedEvent` | `order.created.v1` |
88
+ | `OrderCompletedEvent` | `order.completed.v1` |
89
+ | `OrderCancelledEvent` | `order.cancelled.v1` |
90
+ | `BuyerBehaviorRecordedEvent` | `buyer.behavior.recorded.v1` |
91
+ | `BuyerAffinityUpdatedEvent` | `buyer.affinity.updated.v1` |
92
+ | `BuyerStreakUpdatedEvent` | `buyer.streak.updated.v1` |
93
+ | `InventoryStockUpdatedEvent` | `inventory.stock.updated.v1` |
94
+ | `InventoryOutOfStockEvent` | `inventory.product.out_of_stock.v1` |
95
+ | `IntelligenceIntentSignalEvent` | `intelligence.intent.signal.generated.v1` |
96
+ | `IntelligenceAffinityUpdatedEvent` | `intelligence.affinity.updated.v1` |
97
+ | `AuthLoginSucceededEvent` | `auth.login.succeeded.v1` |
98
+ | `LogisticsDispatchCreatedEvent` | `logistics.dispatch.created.v1` |
99
+ | `LogisticsDeliveryCompletedEvent` | `logistics.delivery.completed.v1` |
100
+ | `CommunityViralSignalEvent` | `community.viral_signal.generated.v1` |
101
+
102
+ ### Union Types
103
+
104
+ ```python
105
+ from KolaPoint_schema.generated.models import AnyOrderEvent, AnyInventoryEvent, AnyIntelligenceEvent
106
+ ```
107
+
108
+ ## Field Naming Convention
109
+
110
+ All models use camelCase JSON aliases with snake_case Python attributes:
111
+
112
+ ```python
113
+ event = OrderCreatedEvent(**json_data)
114
+ event.payload.order_id # snake_case Python access
115
+ event.payload.model_dump(by_alias=True)["orderId"] # camelCase JSON output
116
+ ```
117
+
118
+ ## Version Policy
119
+
120
+ This package follows the KolaPoint Schema Registry semver rules:
121
+
122
+ - **MAJOR** — breaking change (field removed, type changed, event removed)
123
+ - **MINOR** — additive change (new event, new optional field)
124
+ - **PATCH** — editorial (description updates, constraint relaxation)
125
+
126
+ ## Source
127
+
128
+ Generated from: `contracts/events/` in [KolaPoint-schema-registry](https://github.com/KolaPoint-africa/KolaPoint-schema-registry)
129
+
130
+ Do not edit generated files directly — raise a PR in the schema registry instead.
@@ -0,0 +1,7 @@
1
+ README.md
2
+ pyproject.toml
3
+ KolaPoint_schema_sdk.egg-info/PKG-INFO
4
+ KolaPoint_schema_sdk.egg-info/SOURCES.txt
5
+ KolaPoint_schema_sdk.egg-info/dependency_links.txt
6
+ KolaPoint_schema_sdk.egg-info/requires.txt
7
+ KolaPoint_schema_sdk.egg-info/top_level.txt
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.4
2
+ Name: KolaPoint-schema-sdk
3
+ Version: 2.7.0
4
+ Summary: KolaPoint Schema Registry — Shared Python enums and Pydantic v2 event models (Envelope V2)
5
+ Author-email: Kingsley Simeon <formulaking07@gmail.com>
6
+ License: UNLICENSED
7
+ Project-URL: Repository, https://github.com/KolaPoint-africa/KolaPoint-schema-registry
8
+ Keywords: KolaPoint,schema,events,pydantic
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: pydantic>=2.0.0
12
+
13
+ # KolaPoint-schema-sdk
14
+
15
+ KolaPoint Schema Registry — Shared Python enums and Pydantic v2 event models for all KolaPoint domain events across 20 modules (134 events).
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install KolaPoint-schema-sdk==1.0.0
21
+ ```
22
+
23
+ Always pin to an exact version. Do **not** use `>=` or `~=` — this is a contract package.
24
+
25
+ ## Requirements
26
+
27
+ - Python ≥ 3.10
28
+ - pydantic ≥ 2.0.0
29
+
30
+ ## Usage
31
+
32
+ ```python
33
+ from KolaPoint_schema.generated.models import OrderCreatedEvent, BuyerBehaviorRecordedEvent
34
+ from KolaPoint_schema.shared_enums import OrderStatus, VendorStatus
35
+
36
+ # Validate an inbound event
37
+ raw = {
38
+ "eventType": "order.created.v1",
39
+ "correlationId": "req-abc-123",
40
+ "timestamp": "2026-05-25T10:00:00Z",
41
+ "payload": {
42
+ "orderId": "order-xyz",
43
+ "userId": "user-abc",
44
+ "storeIds": ["store-1"],
45
+ "totalKobo": 25000,
46
+ "itemCount": 2,
47
+ "isQrOrder": False,
48
+ "checkoutSessionId": "chk-def",
49
+ }
50
+ }
51
+ event = OrderCreatedEvent(**raw)
52
+ print(event.payload.order_id) # "order-xyz"
53
+ print(event.payload.total_kobo) # 25000
54
+
55
+ # Use enums
56
+ status = OrderStatus.PENDING
57
+ assert status == "PENDING" # str enum
58
+ ```
59
+
60
+ ## Top-level import (convenience)
61
+
62
+ ```python
63
+ # Import everything from the top-level package
64
+ from KolaPoint_schema import OrderCreatedEvent, OrderStatus
65
+ ```
66
+
67
+ ## Available Exports
68
+
69
+ ### `KolaPoint_schema.shared_enums`
70
+
71
+ All Prisma enums as Python `str, Enum` subclasses (JSON-safe serialization):
72
+
73
+ - `OrderStatus` — PENDING, CONFIRMED, PREPARING, READY_FOR_PICKUP, OUT_FOR_DELIVERY, COMPLETED, CANCELLED, FAILED, REFUNDED
74
+ - `VendorStatus` — PENDING, ACTIVE, SUSPENDED, REJECTED
75
+ - `UserRole` — BUYER, VENDOR, ADMIN, SUPER_ADMIN, SUPPORT
76
+ - `ProductStatus` — DRAFT, ACTIVE, ARCHIVED
77
+ - `DeliveryStatus` — PENDING, ASSIGNED, PICKED_UP, IN_TRANSIT, DELIVERED, FAILED, RETURNED
78
+ - `NotificationChannel` — PUSH, IN_APP, EMAIL, SMS
79
+ - 20+ additional enums — see `KolaPoint_schema/shared_enums/__init__.py`
80
+
81
+ ### `KolaPoint_schema.generated.models`
82
+
83
+ Pydantic v2 models with `Field(alias="camelCase")` + `populate_by_name: True`:
84
+
85
+ | Class | Event type |
86
+ |-------|-----------|
87
+ | `OrderCreatedEvent` | `order.created.v1` |
88
+ | `OrderCompletedEvent` | `order.completed.v1` |
89
+ | `OrderCancelledEvent` | `order.cancelled.v1` |
90
+ | `BuyerBehaviorRecordedEvent` | `buyer.behavior.recorded.v1` |
91
+ | `BuyerAffinityUpdatedEvent` | `buyer.affinity.updated.v1` |
92
+ | `BuyerStreakUpdatedEvent` | `buyer.streak.updated.v1` |
93
+ | `InventoryStockUpdatedEvent` | `inventory.stock.updated.v1` |
94
+ | `InventoryOutOfStockEvent` | `inventory.product.out_of_stock.v1` |
95
+ | `IntelligenceIntentSignalEvent` | `intelligence.intent.signal.generated.v1` |
96
+ | `IntelligenceAffinityUpdatedEvent` | `intelligence.affinity.updated.v1` |
97
+ | `AuthLoginSucceededEvent` | `auth.login.succeeded.v1` |
98
+ | `LogisticsDispatchCreatedEvent` | `logistics.dispatch.created.v1` |
99
+ | `LogisticsDeliveryCompletedEvent` | `logistics.delivery.completed.v1` |
100
+ | `CommunityViralSignalEvent` | `community.viral_signal.generated.v1` |
101
+
102
+ ### Union Types
103
+
104
+ ```python
105
+ from KolaPoint_schema.generated.models import AnyOrderEvent, AnyInventoryEvent, AnyIntelligenceEvent
106
+ ```
107
+
108
+ ## Field Naming Convention
109
+
110
+ All models use camelCase JSON aliases with snake_case Python attributes:
111
+
112
+ ```python
113
+ event = OrderCreatedEvent(**json_data)
114
+ event.payload.order_id # snake_case Python access
115
+ event.payload.model_dump(by_alias=True)["orderId"] # camelCase JSON output
116
+ ```
117
+
118
+ ## Version Policy
119
+
120
+ This package follows the KolaPoint Schema Registry semver rules:
121
+
122
+ - **MAJOR** — breaking change (field removed, type changed, event removed)
123
+ - **MINOR** — additive change (new event, new optional field)
124
+ - **PATCH** — editorial (description updates, constraint relaxation)
125
+
126
+ ## Source
127
+
128
+ Generated from: `contracts/events/` in [KolaPoint-schema-registry](https://github.com/KolaPoint-africa/KolaPoint-schema-registry)
129
+
130
+ Do not edit generated files directly — raise a PR in the schema registry instead.
@@ -0,0 +1,118 @@
1
+ # KolaPoint-schema-sdk
2
+
3
+ KolaPoint Schema Registry — Shared Python enums and Pydantic v2 event models for all KolaPoint domain events across 20 modules (134 events).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install KolaPoint-schema-sdk==1.0.0
9
+ ```
10
+
11
+ Always pin to an exact version. Do **not** use `>=` or `~=` — this is a contract package.
12
+
13
+ ## Requirements
14
+
15
+ - Python ≥ 3.10
16
+ - pydantic ≥ 2.0.0
17
+
18
+ ## Usage
19
+
20
+ ```python
21
+ from KolaPoint_schema.generated.models import OrderCreatedEvent, BuyerBehaviorRecordedEvent
22
+ from KolaPoint_schema.shared_enums import OrderStatus, VendorStatus
23
+
24
+ # Validate an inbound event
25
+ raw = {
26
+ "eventType": "order.created.v1",
27
+ "correlationId": "req-abc-123",
28
+ "timestamp": "2026-05-25T10:00:00Z",
29
+ "payload": {
30
+ "orderId": "order-xyz",
31
+ "userId": "user-abc",
32
+ "storeIds": ["store-1"],
33
+ "totalKobo": 25000,
34
+ "itemCount": 2,
35
+ "isQrOrder": False,
36
+ "checkoutSessionId": "chk-def",
37
+ }
38
+ }
39
+ event = OrderCreatedEvent(**raw)
40
+ print(event.payload.order_id) # "order-xyz"
41
+ print(event.payload.total_kobo) # 25000
42
+
43
+ # Use enums
44
+ status = OrderStatus.PENDING
45
+ assert status == "PENDING" # str enum
46
+ ```
47
+
48
+ ## Top-level import (convenience)
49
+
50
+ ```python
51
+ # Import everything from the top-level package
52
+ from KolaPoint_schema import OrderCreatedEvent, OrderStatus
53
+ ```
54
+
55
+ ## Available Exports
56
+
57
+ ### `KolaPoint_schema.shared_enums`
58
+
59
+ All Prisma enums as Python `str, Enum` subclasses (JSON-safe serialization):
60
+
61
+ - `OrderStatus` — PENDING, CONFIRMED, PREPARING, READY_FOR_PICKUP, OUT_FOR_DELIVERY, COMPLETED, CANCELLED, FAILED, REFUNDED
62
+ - `VendorStatus` — PENDING, ACTIVE, SUSPENDED, REJECTED
63
+ - `UserRole` — BUYER, VENDOR, ADMIN, SUPER_ADMIN, SUPPORT
64
+ - `ProductStatus` — DRAFT, ACTIVE, ARCHIVED
65
+ - `DeliveryStatus` — PENDING, ASSIGNED, PICKED_UP, IN_TRANSIT, DELIVERED, FAILED, RETURNED
66
+ - `NotificationChannel` — PUSH, IN_APP, EMAIL, SMS
67
+ - 20+ additional enums — see `KolaPoint_schema/shared_enums/__init__.py`
68
+
69
+ ### `KolaPoint_schema.generated.models`
70
+
71
+ Pydantic v2 models with `Field(alias="camelCase")` + `populate_by_name: True`:
72
+
73
+ | Class | Event type |
74
+ |-------|-----------|
75
+ | `OrderCreatedEvent` | `order.created.v1` |
76
+ | `OrderCompletedEvent` | `order.completed.v1` |
77
+ | `OrderCancelledEvent` | `order.cancelled.v1` |
78
+ | `BuyerBehaviorRecordedEvent` | `buyer.behavior.recorded.v1` |
79
+ | `BuyerAffinityUpdatedEvent` | `buyer.affinity.updated.v1` |
80
+ | `BuyerStreakUpdatedEvent` | `buyer.streak.updated.v1` |
81
+ | `InventoryStockUpdatedEvent` | `inventory.stock.updated.v1` |
82
+ | `InventoryOutOfStockEvent` | `inventory.product.out_of_stock.v1` |
83
+ | `IntelligenceIntentSignalEvent` | `intelligence.intent.signal.generated.v1` |
84
+ | `IntelligenceAffinityUpdatedEvent` | `intelligence.affinity.updated.v1` |
85
+ | `AuthLoginSucceededEvent` | `auth.login.succeeded.v1` |
86
+ | `LogisticsDispatchCreatedEvent` | `logistics.dispatch.created.v1` |
87
+ | `LogisticsDeliveryCompletedEvent` | `logistics.delivery.completed.v1` |
88
+ | `CommunityViralSignalEvent` | `community.viral_signal.generated.v1` |
89
+
90
+ ### Union Types
91
+
92
+ ```python
93
+ from KolaPoint_schema.generated.models import AnyOrderEvent, AnyInventoryEvent, AnyIntelligenceEvent
94
+ ```
95
+
96
+ ## Field Naming Convention
97
+
98
+ All models use camelCase JSON aliases with snake_case Python attributes:
99
+
100
+ ```python
101
+ event = OrderCreatedEvent(**json_data)
102
+ event.payload.order_id # snake_case Python access
103
+ event.payload.model_dump(by_alias=True)["orderId"] # camelCase JSON output
104
+ ```
105
+
106
+ ## Version Policy
107
+
108
+ This package follows the KolaPoint Schema Registry semver rules:
109
+
110
+ - **MAJOR** — breaking change (field removed, type changed, event removed)
111
+ - **MINOR** — additive change (new event, new optional field)
112
+ - **PATCH** — editorial (description updates, constraint relaxation)
113
+
114
+ ## Source
115
+
116
+ Generated from: `contracts/events/` in [KolaPoint-schema-registry](https://github.com/KolaPoint-africa/KolaPoint-schema-registry)
117
+
118
+ Do not edit generated files directly — raise a PR in the schema registry instead.
@@ -0,0 +1,30 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "KolaPoint-schema-sdk"
7
+ version = "2.7.0"
8
+ description = "KolaPoint Schema Registry — Shared Python enums and Pydantic v2 event models (Envelope V2)"
9
+ authors = [{ name = "Kingsley Simeon", email = "formulaking07@gmail.com" }]
10
+ readme = "README.md"
11
+ license = { text = "UNLICENSED" }
12
+ requires-python = ">=3.10"
13
+ dependencies = [
14
+ "pydantic>=2.0.0",
15
+ ]
16
+ keywords = ["KolaPoint", "schema", "events", "pydantic"]
17
+
18
+ [project.urls]
19
+ Repository = "https://github.com/KolaPoint-africa/KolaPoint-schema-registry"
20
+
21
+ # Package layout:
22
+ # sdk/python/ ← build root (python -m build sdk/python)
23
+ # sdk/python/KolaPoint_schema/ ← top-level package
24
+ # sdk/python/KolaPoint_schema/__init__.py
25
+ # sdk/python/KolaPoint_schema/generated/models.py
26
+ # sdk/python/KolaPoint_schema/shared_enums/__init__.py
27
+
28
+ [tool.setuptools.packages.find]
29
+ where = ["."]
30
+ include = ["KolaPoint_schema", "KolaPoint_schema.*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+