Commit c87d05e5 authored by Fernando Takagi's avatar Fernando Takagi Committed by Andrei Mihu
Browse files

Extended filtering options to devconsole Matches view.

parent fcd00730
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
- Add subscription validation APIs and runtime functions for Google and Apple.
- Chat Messages devconsole view.
- Chat Messages listing and deletion Console API endpoints.
- Extended filtering options to devconsole Matches view.

### Changed
- Improve runtime handling of non-persisted purchases and subscriptions.
+1626 −1325

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -2162,7 +2162,7 @@ var (
)

func request_Console_ListMatches_0(ctx context.Context, marshaler runtime.Marshaler, client ConsoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
	var protoReq api.ListMatchesRequest
	var protoReq ListMatchesRequest
	var metadata runtime.ServerMetadata

	if err := req.ParseForm(); err != nil {
@@ -2178,7 +2178,7 @@ func request_Console_ListMatches_0(ctx context.Context, marshaler runtime.Marsha
}

func local_request_Console_ListMatches_0(ctx context.Context, marshaler runtime.Marshaler, server ConsoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
	var protoReq api.ListMatchesRequest
	var protoReq ListMatchesRequest
	var metadata runtime.ServerMetadata

	if err := req.ParseForm(); err != nil {
+32 −1
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ service Console {
  }

  // List ongoing matches
  rpc ListMatches (nakama.api.ListMatchesRequest) returns (api.MatchList) {
  rpc ListMatches (ListMatchesRequest) returns (MatchList) {
    option (google.api.http).get = "/v2/console/match";
  }

@@ -493,6 +493,17 @@ message GroupExport {
  repeated nakama.api.GroupUserList.GroupUser members = 2;
}

// A list of realtime matches, with their node names.
message MatchList {
  message Match {
    // The API match
    api.Match api_match = 1;
    // The node name
    string node = 2;
  }
  repeated Match matches = 1;
}


// Add a new console user
message AddUserRequest {
@@ -726,6 +737,26 @@ message ListGroupsRequest {
  string cursor = 2;
}

// List realtime matches.
message ListMatchesRequest {
  // Limit the number of returned matches.
  google.protobuf.Int32Value limit = 1;
  // Authoritative or relayed matches, or null for both.
  google.protobuf.BoolValue authoritative = 2;
  // Label filter.
  google.protobuf.StringValue label = 3;
  // Minimum user count.
  google.protobuf.Int32Value min_size = 4;
  // Maximum user count.
  google.protobuf.Int32Value max_size = 5;
  // Match ID.
  string match_id = 6;
  // Arbitrary label query.
  google.protobuf.StringValue query = 7;
  // Node name filter, optional.
  google.protobuf.StringValue node = 8;
}

// List validated purchases.
message ListPurchasesRequest {
  // User ID to filter purchases for
+41 −15
Original line number Diff line number Diff line
@@ -1700,7 +1700,7 @@
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/apiMatchList"
              "$ref": "#/definitions/nakamaconsoleMatchList"
            }
          },
          "default": {
@@ -1721,7 +1721,7 @@
          },
          {
            "name": "authoritative",
            "description": "Authoritative or relayed matches.",
            "description": "Authoritative or relayed matches, or null for both.",
            "in": "query",
            "required": false,
            "type": "boolean"
@@ -1749,12 +1749,26 @@
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "match_id",
            "description": "Match ID.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "query",
            "description": "Arbitrary label query.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "node",
            "description": "Node name filter, optional.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
@@ -2748,19 +2762,6 @@
      },
      "description": "A set of leaderboard records, may be part of a leaderboard records page or a batch of individual records."
    },
    "apiMatchList": {
      "type": "object",
      "properties": {
        "matches": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/nakamaapiMatch"
          },
          "description": "A number of matches corresponding to a list operation."
        }
      },
      "description": "A list of realtime matches."
    },
    "apiNotification": {
      "type": "object",
      "properties": {
@@ -3277,6 +3278,19 @@
      ],
      "default": "UNKNOWN"
    },
    "consoleMatchListMatch": {
      "type": "object",
      "properties": {
        "api_match": {
          "$ref": "#/definitions/nakamaapiMatch",
          "title": "The API match"
        },
        "node": {
          "type": "string",
          "title": "The node name"
        }
      }
    },
    "consoleMatchState": {
      "type": "object",
      "properties": {
@@ -3876,6 +3890,18 @@
      },
      "description": "A list of leaderboards."
    },
    "nakamaconsoleMatchList": {
      "type": "object",
      "properties": {
        "matches": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/consoleMatchListMatch"
          }
        }
      },
      "description": "A list of realtime matches, with their node names."
    },
    "protobufAny": {
      "type": "object",
      "properties": {
Loading