@@ -49,6 +49,10 @@ struct SAuthenticateRequest {
4949 // Optional custom properties to update with this call.
5050 // If not set, properties are left as they are on the server.
5151 std::unordered_map<std::string, std::string> custom_properties;
52+ // Optional no_session modifies the request to only create/update
53+ // an identity without creating a new session. If set to 'true'
54+ // the response won't include a token and a refresh token.
55+ bool no_session = false ;
5256};
5357
5458// A single event. Usually, but not necessarily, part of a batch.
@@ -64,6 +68,14 @@ struct SEvent {
6468 std::string value;
6569 // The time when the event was triggered on the producer side. Unit is unix time milliseconds
6670 Nakama::NTimestamp timestamp;
71+ // The identity id associated with the event. Ignored if the event is published as part of a session.
72+ std::string identity_id;
73+ // The session id associated with the event. Ignored if the event is published as part of a session.
74+ std::string session_id;
75+ // The session issued at associated with the event. Ignored if the event is published as part of a session.
76+ int64_t session_issued_at;
77+ // The session expires at associated with the event. Ignored if the event is published as part of a session.
78+ int64_t session_expires_at;
6779};
6880
6981// Publish an event to the server
@@ -78,6 +90,8 @@ struct SExperiment {
7890 std::string name;
7991 // Value associated with this Experiment.
8092 std::string value;
93+ // The labels associated with this experiment.
94+ std::vector<std::string> labels;
8195};
8296
8397// All experiments that this identity is involved with.
@@ -106,6 +120,8 @@ struct SFlag {
106120 bool condition_changed = false ;
107121 // The origin of change on the flag value returned.
108122 SValueChangeReason change_reason;
123+ // The labels associated with this flag.
124+ std::vector<std::string> labels;
109125};
110126
111127// All flags available to the identity
@@ -141,6 +157,8 @@ struct SFlagOverride {
141157 std::string flag_name;
142158 // The list of configuration that affect the value of the flag.
143159 std::vector<SValue> overrides;
160+ // The labels associated with this flag.
161+ std::vector<std::string> labels;
144162};
145163
146164// All flags available to the identity and their value overrides
@@ -151,20 +169,43 @@ struct SFlagOverrideList {
151169
152170// Request to get all experiments data.
153171struct SGetExperimentsRequest {
154- // Experiment names; if empty string all experiments are returned.
172+ // Experiment names; if empty string, all experiments are returned based on the remaining filters .
155173 std::vector<std::string> names;
174+ // Label names that must be defined for each Experiment; if empty string, all experiments are returned based on the
175+ // remaining filters.
176+ std::vector<std::string> labels;
156177};
157178
158179// Request to get all flags data.
159180struct SGetFlagsRequest {
160- // Flag names; if empty string all flags are returned.
181+ // Flag names; if empty string, all flags are returned based on the remaining filters .
161182 std::vector<std::string> names;
183+ // Label names that must be defined for each Flag; if empty string, all flags are returned based on the remaining
184+ // filters.
185+ std::vector<std::string> labels;
162186};
163187
164188// Request to get all live events.
165189struct SGetLiveEventsRequest {
166- // Live event names; if empty string all live events are returned.
190+ // Live event names; if empty string, all live events are returned based on the remaining filters .
167191 std::vector<std::string> names;
192+ // Label names that must be defined for each Live Event; if empty string, all live events are returned based on the
193+ // remaining filters.
194+ std::vector<std::string> labels;
195+ // The maximum number of past event runs to return for each live event.
196+ int32_t past_run_count;
197+ // The maximum number of future event runs to return for each live event.
198+ int32_t future_run_count;
199+ // Start time of the time window filter to apply.
200+ int64_t start_time_sec;
201+ // End time of the time window filter to apply.
202+ int64_t end_time_sec;
203+ };
204+
205+ // Request to join a 'explicit join' live event.
206+ struct SJoinLiveEventRequest {
207+ // Live event id to join.
208+ std::string id;
168209};
169210
170211// Enrich/replace the current session with a new ID.
@@ -181,6 +222,8 @@ struct SIdentifyRequest {
181222
182223// A single live event.
183224struct SLiveEvent {
225+ // The status variants of a live event.
226+ enum SStatus { UNKNOWN = 0 , ACTIVE = 1 , UPCOMING = 2 , TERMINATED = 3 };
184227 // Name.
185228 std::string name;
186229 // Description.
@@ -201,12 +244,18 @@ struct SLiveEvent {
201244 int64_t duration_sec;
202245 // Reset CRON schedule, if configured.
203246 std::string reset_cron;
247+ // The status of this live event run.
248+ SStatus status;
249+ // The labels associated with this live event.
250+ std::vector<std::string> labels;
204251};
205252
206253// List of Live events.
207254struct SLiveEventList {
208255 // Live events.
209256 std::vector<SLiveEvent> live_events;
257+ // Live events that require explicit join.
258+ std::vector<SLiveEvent> explicit_join_live_events;
210259};
211260
212261// Properties associated with an identity.
0 commit comments