syntax = "proto3";

import "common.proto";

package startup;


// ==== signUp capability ====

message SetSignUpServerRequestBody {
	string service_url = 1;
}

// --- signUp.getAvailableAddresses ---
// Reply body is common.StringArrayValue
message GetAvailableAddressesRequestBody {
	string name = 1;
	common.StringValue token = 2;
}

// --- signUp.getAvailableDomians ---
// Reply body is common.StringArrayValue
message GetAvailableDomainsRequestBody {
	common.StringValue token = 2;
}

// --- signUp.addUser ---
// Reply body is common.BooleanValue
message AddUserRequestBody {
	string user_id = 1;
	common.StringValue token = 2;
}

// --- signUp.isActivated ---
// Reply body is common.BooleanValue
message IsActivatedRequestBody {
	string user_id = 1;
}

// --- signUp.createUserParams ---
// Its an observable call, and initial request is PassOnlyRequestBody.
// Intermediate values are ProgressValue.

message PassOnlyRequestBody {
	string pass = 1;
}


// ==== signIn capability ====

// --- signIn.getUsersOnDisk ---
// Request body is empty
// Reply body is common.StringArrayValue

// --- signIn.startLoginToRemoteStorage ---
// Reply body is common.BooleanValue
message StartLoginToRemoteStorageRequestBody {
	string address = 1;
}

// --- signIn.completeLoginAndLocalSetup ---
// Its an observable call, and initial request is PassOnlyRequestBody.
// Intermediate values are ProgressValue.

message ProgressValue {
	float p = 1;
	common.BooleanValue decr_result = 2;
}

// --- signIn.useExistingStorage ---
// Its an observable call, and initial request is UseExistingStorageRequestBody.
// Intermediate values are ProgressValue.
message UseExistingStorageRequestBody {
	string address = 1;
	string pass = 2;
}
