syntax = "proto3";

package devvit.service;

import "devvit/runtime/bundle.proto";
import "google/protobuf/empty.proto";

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

// Fetch a bundle
message BundleRequest {
  // Must be an identifier for the bundle, i.e. an app ID (UUID) in prod, or "untitled-1234567890" from play
  string actor_id = 1;
}

service BundleService {
  // Upload a bundle to the bundle repo
  rpc Upload(devvit.runtime.LinkedBundle) returns (google.protobuf.Empty);

  // Retrieve a bundle from the bundle repo
  rpc Fetch(BundleRequest) returns (devvit.runtime.LinkedBundle);
}
