Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions cli/beamable.common/Runtime/OpenApi/BeamAnalytics.gs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,56 @@ namespace Beamable.Api.Autogenerated.Analytics

public partial interface IBeamAnalyticsApi
{
/// <summary>
/// Every analytics event this realm has actually EMITTED, with the param keys seen on each.
///
///The counterpart to M:BeamableGateway.Controllers.AnalyticsController.ListSchemas(BeamableShared.Services.Beamo.ManifestIndexCacheService): schemas say what a realm DECLARED, this
///says what it has actually sent. It is the only one of the two that works outside a deployed
///environment — a local realm registers no schemas and has no Athena — and it reports real field
///names, because they are the flattened keys a goal condition is evaluated against.
///Empty until the realm emits something. That is honest rather than unhelpful: a fresh realm
///genuinely has no events, and the caller pairs this with the platform's own known events.
///
/// GET call to `/api/analytics/events` endpoint.
/// </summary>
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
/// <returns>A promise containing the <see cref="AnalyticsObservedEventsResponse"/></returns>
Promise<AnalyticsObservedEventsResponse> GetEvents([System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
/// <summary>
/// Every analytics event this realm has a schema for: the ones it registered, plus the platform's
///own built-ins. This is what lets the campaign builder offer a real event list, with real field
///types, instead of a hard-coded guess.
///
///The built-ins are unioned in rather than used only as a fallback, because the two sets
///answer different questions — a realm that registers schemas for its game's events still emits
///`session` and `hard_purchase`, and should be able to build goals on them. A realm that
///registers its own `beamable/analytics/*` name appears once, not twice, and
///M:BeamableShared.Services.Analytics.AnalyticsSchemaLookup.Resolve(System.String,BeamableShared.Utils.RealmInfo) hands back the realm's document for it.
///A failure to read the realm's registrations never 500s. A realm with no manifest has
///registered nothing, which is a legitimate state; a realm whose manifest store is unreachable is
///a real fault, but one where answering with the built-ins is far better than answering with
///nothing — an empty list empties the campaign builder's event picker entirely.
///
/// GET call to `/api/analytics/schemas` endpoint.
/// </summary>
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
/// <returns>A promise containing the <see cref="AnalyticsSchemaListResponse"/></returns>
Promise<AnalyticsSchemaListResponse> GetSchemas([System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
/// <summary>
/// One event's fields and their types, flattened to the dot-noted keys the params actually carry
///(see BeamableShared.Services.Analytics.AnalyticsSchemaProperties), so a campaign goal can constrain a value and be
///evaluated against the real event at match time.
///
///A catch-all route token, deliberately: schema names are multi-segment by design
///(`beamable/analytics/commerce/purchase`), and a plain `{event}` would 404 on exactly
///the names this exists to serve.
///
/// GET call to `/api/analytics/schemas/{event}` endpoint.
/// </summary>
/// <param name="event"></param>
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
/// <returns>A promise containing the <see cref="AnalyticsSchemaResponse"/></returns>
Promise<AnalyticsSchemaResponse> GetSchemas(string @event, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
/// <summary>
/// POST call to `/api/analytics/query` endpoint.
/// </summary>
Expand All @@ -20,6 +70,72 @@ public partial interface IBeamAnalyticsApi
}
public partial class BeamAnalyticsApi : IBeamAnalyticsApi
{
/// <summary>
/// Every analytics event this realm has actually EMITTED, with the param keys seen on each.
///
///The counterpart to M:BeamableGateway.Controllers.AnalyticsController.ListSchemas(BeamableShared.Services.Beamo.ManifestIndexCacheService): schemas say what a realm DECLARED, this
///says what it has actually sent. It is the only one of the two that works outside a deployed
///environment — a local realm registers no schemas and has no Athena — and it reports real field
///names, because they are the flattened keys a goal condition is evaluated against.
///Empty until the realm emits something. That is honest rather than unhelpful: a fresh realm
///genuinely has no events, and the caller pairs this with the platform's own known events.
///
/// GET call to `/api/analytics/events` endpoint.
/// </summary>
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
/// <returns>A promise containing the <see cref="AnalyticsObservedEventsResponse"/></returns>
public virtual Promise<AnalyticsObservedEventsResponse> GetEvents([System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
{
string gsUrl = "/api/analytics/events";
// make the request and return the result
return _requester.Request<AnalyticsObservedEventsResponse>(Method.GET, gsUrl, default(object), includeAuthHeader, this.Serialize<AnalyticsObservedEventsResponse>);
}
/// <summary>
/// Every analytics event this realm has a schema for: the ones it registered, plus the platform's
///own built-ins. This is what lets the campaign builder offer a real event list, with real field
///types, instead of a hard-coded guess.
///
///The built-ins are unioned in rather than used only as a fallback, because the two sets
///answer different questions — a realm that registers schemas for its game's events still emits
///`session` and `hard_purchase`, and should be able to build goals on them. A realm that
///registers its own `beamable/analytics/*` name appears once, not twice, and
///M:BeamableShared.Services.Analytics.AnalyticsSchemaLookup.Resolve(System.String,BeamableShared.Utils.RealmInfo) hands back the realm's document for it.
///A failure to read the realm's registrations never 500s. A realm with no manifest has
///registered nothing, which is a legitimate state; a realm whose manifest store is unreachable is
///a real fault, but one where answering with the built-ins is far better than answering with
///nothing — an empty list empties the campaign builder's event picker entirely.
///
/// GET call to `/api/analytics/schemas` endpoint.
/// </summary>
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
/// <returns>A promise containing the <see cref="AnalyticsSchemaListResponse"/></returns>
public virtual Promise<AnalyticsSchemaListResponse> GetSchemas([System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
{
string gsUrl = "/api/analytics/schemas";
// make the request and return the result
return _requester.Request<AnalyticsSchemaListResponse>(Method.GET, gsUrl, default(object), includeAuthHeader, this.Serialize<AnalyticsSchemaListResponse>);
}
/// <summary>
/// One event's fields and their types, flattened to the dot-noted keys the params actually carry
///(see BeamableShared.Services.Analytics.AnalyticsSchemaProperties), so a campaign goal can constrain a value and be
///evaluated against the real event at match time.
///
///A catch-all route token, deliberately: schema names are multi-segment by design
///(`beamable/analytics/commerce/purchase`), and a plain `{event}` would 404 on exactly
///the names this exists to serve.
///
/// GET call to `/api/analytics/schemas/{event}` endpoint.
/// </summary>
/// <param name="event"></param>
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
/// <returns>A promise containing the <see cref="AnalyticsSchemaResponse"/></returns>
public virtual Promise<AnalyticsSchemaResponse> GetSchemas(string @event, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
{
string gsUrl = "/api/analytics/schemas/{event}";
gsUrl = gsUrl.Replace("{event}", _requester.EscapeURL(@event.ToString()));
// make the request and return the result
return _requester.Request<AnalyticsSchemaResponse>(Method.GET, gsUrl, default(object), includeAuthHeader, this.Serialize<AnalyticsSchemaResponse>);
}
/// <summary>
/// POST call to `/api/analytics/query` endpoint.
/// </summary>
Expand Down
18 changes: 9 additions & 9 deletions cli/beamable.common/Runtime/OpenApi/BeamBeamootel.gs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ namespace Beamable.Api.Autogenerated.Beamootel
public partial interface IBeamBeamootelApi
{
/// <summary>
/// Get available OpenTelemetry views for a specific player.
/// Get available OpenTelemetry views for a specific account.
///
/// GET call to `/api/beamo/otel/views` endpoint.
/// </summary>
/// <param name="playerId">Player ID to retrieve views for.</param>
/// <param name="accountId">Account ID to retrieve views for.</param>
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
/// <returns>A promise containing the <see cref="OtelViewsResponse"/></returns>
Promise<OtelViewsResponse> GetOtelViews([System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<string> playerId, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
Promise<OtelViewsResponse> GetOtelViews([System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<string> accountId, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
/// <summary>
/// Save or update an OpenTelemetry view configuration.
///
Expand Down Expand Up @@ -67,22 +67,22 @@ public partial interface IBeamBeamootelApi
public partial class BeamBeamootelApi : IBeamBeamootelApi
{
/// <summary>
/// Get available OpenTelemetry views for a specific player.
/// Get available OpenTelemetry views for a specific account.
///
/// GET call to `/api/beamo/otel/views` endpoint.
/// </summary>
/// <param name="playerId">Player ID to retrieve views for.</param>
/// <param name="accountId">Account ID to retrieve views for.</param>
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
/// <returns>A promise containing the <see cref="OtelViewsResponse"/></returns>
public virtual Promise<OtelViewsResponse> GetOtelViews([System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<string> playerId, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
public virtual Promise<OtelViewsResponse> GetOtelViews([System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<string> accountId, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
{
string gsUrl = "/api/beamo/otel/views";
string gsQuery = "?";
System.Collections.Generic.List<string> gsQueries = new System.Collections.Generic.List<string>();
if (((playerId != default(OptionalString))
&& playerId.HasValue))
if (((accountId != default(OptionalString))
&& accountId.HasValue))
{
gsQueries.Add(string.Concat("playerId=", playerId.Value.ToString()));
gsQueries.Add(string.Concat("accountId=", accountId.Value.ToString()));
}
if ((gsQueries.Count > 0))
{
Expand Down
Loading
Loading