syntax = "proto3";

package devvit.gateway.app_info.v1alpha;

import "google/protobuf/timestamp.proto";

option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/gateway/appinfo";

// AppInfoService provides read-only information about apps, fetched by slug.
service AppInfoService {
  // GetAppInfoBySlug returns minimal information about an app identified by slug.
  rpc GetAppInfoBySlug(GetAppInfoBySlugRequest) returns (GetAppInfoBySlugResponse);
}

message GetAppInfoBySlugRequest {
  string slug = 1; // app slug
}

message GetAppInfoBySlugResponse {
  AppInfo app = 1;
}

message AppInfo {
  // UUID of the app
  string id = 1;
  // App account T2 ID
  optional string app_account_id = 2;
  // Base part of the slug before uniquifying
  string slug_base = 3;
  // Unique app slug
  string slug = 4;
  // Human-readable name
  string name = 5;
  // App description
  string description = 6;
  // NSFW flag
  bool is_nsfw = 7;
  // Delisted flag
  bool is_delisted = 8;
  // Archived flag
  bool is_archived = 9;
  // First-party flag
  bool is_first_party = 10;
  // Moderation/flagged status
  bool is_flagged = 11;
  // Created at
  google.protobuf.Timestamp created_at = 12;
  // Owner ID
  string owner_id = 13;
  // Disabled flag
  bool is_disabled = 14;
}
