subscription.proto¶
SubscriptionRequest¶
Used by the client to subscribe to a subset of events from the shop
On success responds with a subscription_id in the payload of GenericResponse
Field |
Type |
Label |
Description |
---|---|---|---|
start_shop_seq_no |
The relay will send events from the shop log starting from this sequence number. |
||
shop_id |
The id of the shop that is being subscribed to. If an objectType is not specified then the relay will return all the events for the shop given the current level of authentication. |
||
filters |
repeated |
Filter can be applied to return only a subset of events |
SubscriptionRequest.Filter¶
Field |
Type |
Label |
Description |
---|---|---|---|
object_type |
Which object is being subscribed to. Subscribing to an object will return a stream of events that modify that object type. For example subscribing to LISTING will return a stream of all the events that modify listings in the shop. |
||
object_id |
optional_object_id |
Optional subscribe to only events that modify a single item. We assume object_id is only unique for a given object_type, so object_type is required. |
SubscriptionPushRequest¶
Used by the relay to push events to the client. Will not send more events until the client has acknowledged the last batch.
Client sends a GenericResponse without an error to acknowledge recption. To close a subscription, respond with ERROR_CODES_CLOSE_SUBSCRIPTION
Field |
Type |
Label |
Description |
---|---|---|---|
subscription_id |
|||
sets |
repeated |
SubscriptionPushRequest.SequencedPartialPatchSet¶
Field |
Type |
Label |
Description |
---|---|---|---|
shop_seq_no |
sequence number of the patchSet in the shop log |
||
patch_leaf_index |
index of the patch in the patch set |
||
header |
cbor patchSet header data (see go/cbor/patches.go) |
||
signature |
eip191 signature of the above |
||
patches |
repeated |
array of cbor patch data |
|
proofs |
repeated |
array of cbor proof data [index, tree_size, [proof1, proof2, …]] |
SubscriptionCancelRequest¶
Used by a client to stop a relay from sending more events for a given subscription
Field |
Type |
Label |
Description |
---|---|---|---|
subscription_id |
ObjectType¶
The types of objects that events affect
Name |
Number |
Description |
---|---|---|
OBJECT_TYPE_UNSPECIFIED |
0 |
invalid |
OBJECT_TYPE_LISTING |
1 |
|
OBJECT_TYPE_TAG |
2 |
|
OBJECT_TYPE_ORDER |
3 |
|
OBJECT_TYPE_ACCOUNT |
4 |
accounts refer to keycard enrollments and customer accounts |
OBJECT_TYPE_MANIFEST |
5 |
|
OBJECT_TYPE_INVENTORY |
6 |
inventory is separated since you must first authenticate to get the events |