Inventory Service Events 1.0.0 documentation
備考
In this document, PUB
means "publish" and SUB
means "subscribe". This refers to the "publish/subscribe" (pub/sub) messaging framework, where "publish" means that the service sends data to Kafka topics, and "subscribe" means the service acts as a consumer that subscribes to specific Kafka topics to receive data.
- Specification ID:
http://inventory-service
- Protobuf File Spec: inventory.proto
- Default content type: application/json
Table of Contents
Operations
PUB inventoryItem
Operation
Event fired when an item is saved in user inventory
Message inventoryItemSaved
Payload
Name | Type | Description | Value | Constraints | Notes |
---|---|---|---|---|---|
(root) | object allOf | - | - | - | additional properties are allowed |
payload | object | - | - | - | additional properties are allowed |
payload.id | string | id of the saved item | - | - | - |
payload.namespace | string | namespace origin of saved item | - | - | - |
payload.userId | string | userId that owns the item | - | - | - |
payload.inventoryId | string | inventoryId where the item is saved | - | - | - |
payload.slotId | string | slotId of the item in the inventory | - | - | - |
payload.slotUsed | integer | slotUsed of the item in the inventory | - | - | - |
payload.sourceItemId | string | sourceItemId of the item | - | - | - |
payload.type | string | type of the item | - | - | - |
payload.source | string | source of the item | - | - | - |
payload.qty | integer | quantity of the item being added to the inventory | - | - | - |
payload.finalQty | integer | total quantity, sum of existing quantity and newly added quantity | - | - | - |
payload.sourceOrigin | string | sourceOrigin where the item saving request is coming from | allowed ("entitlement" , "inventory" ) | - | - |
0 (allOf item) | object | - | - | - | additional properties are allowed |
id | string | - | - | - | - |
version | integer | - | - | - | - |
name | string | - | - | - | - |
namespace | string | - | - | - | - |
parentNamespace | string | - | - | - | - |
timestamp | string | - | - | format (date-time ) | - |
clientId | string | - | - | - | - |
userId | string | UserId of the operator for this event (optional) | - | - | - |
traceId | string | - | - | - | - |
sessionId | string | - | - | - | - |
Examples of payload (generated)
{
"payload": {
"id": "string",
"namespace": "string",
"userId": "string",
"inventoryId": "string",
"slotId": "string",
"slotUsed": 0,
"sourceItemId": "string",
"type": "string",
"source": "string",
"qty": 0,
"finalQty": 0,
"sourceOrigin": "entitlement"
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}