Skip to content
Merged
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
6 changes: 5 additions & 1 deletion apis/datasets/v1/collections.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// Proto messages and service definition for the APIs related to creating and managing collections.

syntax = "proto3";
edition = "2023";

package datasets.v1;

import "datasets/v1/core.proto";
import "google/protobuf/go_features.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// CreateCollectionRequest is used to create a new collection.
message CreateCollectionRequest {
Expand Down
22 changes: 13 additions & 9 deletions apis/datasets/v1/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@
- e.g. message Collections contains a list of Collection messages.
*/

syntax = "proto3";
edition = "2023";

package datasets.v1;

import "datasets/v1/dataset_type.proto";
import "google/protobuf/go_features.proto";
// https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp
import "google/protobuf/timestamp.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

/*
* General, multi purpose messages
*/
Expand Down Expand Up @@ -58,19 +62,19 @@ message DatapointInterval {
// LegacyPagination - used for backwards compatibility, will be removed as soon as all datasets are migrated
message LegacyPagination {
// The maximum number of entries to return.
optional int64 limit = 1;
int64 limit = 1 [features.field_presence = EXPLICIT];
// Return entries starting after this entry.
// This is the id of the last entry returned in the previous page as the next parameter in each paginated query.
optional string starting_after = 2;
string starting_after = 2 [features.field_presence = EXPLICIT];
}

// Pagination information for paginated queries
message Pagination {
// The maximum number of entries to return.
optional int64 limit = 1;
int64 limit = 1 [features.field_presence = EXPLICIT];
// Return entries starting after this entry.
// This is the id of the last entry returned in the previous page as the next parameter in each paginated query.
optional ID starting_after = 2;
ID starting_after = 2 [features.field_presence = EXPLICIT];
}

// Any is a message that can hold any other message as bytes.
Expand Down Expand Up @@ -98,7 +102,7 @@ message RepeatedAny {
message DatapointMetadata {
google.protobuf.Timestamp event_time = 1; // The time the message was received by the on-board computer.
google.protobuf.Timestamp ingestion_time = 2; // The time the message was ingested by Tilebox.
optional string id = 3; // The external id of the datapoint.
string id = 3 [features.field_presence = EXPLICIT]; // The external id of the datapoint.
}

// Datapoints is a list of datapoints in a Tilebox dataset, with all data points sharing the same type.
Expand All @@ -111,7 +115,7 @@ message Datapoints {
message DatapointPage {
repeated DatapointMetadata meta = 1; // A metadata for a datapoint.
RepeatedAny data = 2; // The datapoints.
optional LegacyPagination next_page = 3; // The pagination parameters for the next page.
LegacyPagination next_page = 3 [features.field_presence = EXPLICIT]; // The pagination parameters for the next page.
}

// Datapoint is a single datapoint in a Tilebox Dataset
Expand All @@ -130,8 +134,8 @@ message Collection {
// CollectionInfo contains information about the data available in a dataset collection
message CollectionInfo {
Collection collection = 1;
optional TimeInterval availability = 2; // The time interval for which data is available.
optional uint64 count = 3; // Number of entries in the dataset.
TimeInterval availability = 2 [features.field_presence = EXPLICIT]; // The time interval for which data is available.
uint64 count = 3 [features.field_presence = EXPLICIT]; // Number of entries in the dataset.
}

// CollectionInfos contains a list of CollectionInfo messages.
Expand Down
12 changes: 8 additions & 4 deletions apis/datasets/v1/data_access.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
// Proto messages and service definition for the APIs related to querying data.

syntax = "proto3";
edition = "2023";

package datasets.v1;

import "datasets/v1/core.proto";
import "datasets/v1/well_known_types.proto";
import "google/protobuf/go_features.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// Legacy message, to be removed in the future.
// GetDatasetForIntervalRequest contains the request parameters for retrieving data for a time interval.
Expand All @@ -16,7 +20,7 @@ message GetDatasetForIntervalRequest {
TimeInterval time_interval = 2; // The time interval for which data is requested.
DatapointInterval datapoint_interval = 6; // The datapoint interval for which data is requested.

optional LegacyPagination page = 3; // The pagination parameters for this request.
LegacyPagination page = 3 [features.field_presence = EXPLICIT]; // The pagination parameters for this request.
bool skip_data = 4; // If true, the datapoint data is not returned.
// If true, the datapoint metadata is not returned.
// If both skip_data and skip_meta are true,
Expand Down Expand Up @@ -77,14 +81,14 @@ message QueryRequest {
repeated ID collection_ids = 1; // collection ids to query.
QueryFilters filters = 2; // Filters to apply to the query.

optional Pagination page = 3; // The pagination parameters for this request.
Pagination page = 3 [features.field_presence = EXPLICIT]; // The pagination parameters for this request.
bool skip_data = 4; // If true, only datapoint metadata, such as id, time and ingestion_time are returned.
}

// QueryResultPage is a single page of data points of a Tilebox dataset
message QueryResultPage {
RepeatedAny data = 1; // The datapoints.
optional Pagination next_page = 2; // The pagination parameters for the next page.
Pagination next_page = 2 [features.field_presence = EXPLICIT]; // The pagination parameters for the next page.
}

// DataAccessService provides data access and querying capabilities for Tilebox datasets.
Expand Down
6 changes: 5 additions & 1 deletion apis/datasets/v1/data_ingestion.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// Proto messages and service definition for the APIs related to ingesting and deleting datapoints.

syntax = "proto3";
edition = "2023";

package datasets.v1;

import "datasets/v1/core.proto";
import "google/protobuf/go_features.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// Legacy ingest request
// IngestDatapointsRequest is used to ingest one or multiple datapoints into a collection.
Expand Down
6 changes: 5 additions & 1 deletion apis/datasets/v1/dataset_type.proto
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
// This file contains the proto messages describing a dataset type. A dataset type is akin to a protobuf message type,
// and can be converted to it.

syntax = "proto3";
edition = "2023";
package datasets.v1;

import "datasets/v1/well_known_types.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/go_features.proto";
import "google/protobuf/timestamp.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// Field describes a field of a dataset.
message Field {
// The descriptor contains the name of the field, the type, optional labels (e.g. repeated) and other information.
Expand Down
8 changes: 6 additions & 2 deletions apis/datasets/v1/datasets.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
// Proto messages and service definition for the APIs related to creating and managing datasets.

syntax = "proto3";
edition = "2023";

package datasets.v1;

import "datasets/v1/core.proto";
import "datasets/v1/dataset_type.proto";
import "google/protobuf/go_features.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// CreateDatasetRequest is used to create a new dataset.
message CreateDatasetRequest {
Expand Down Expand Up @@ -95,7 +99,7 @@ message ListDatasetsResponse {
// Number of datasets that the users organization is the owner of
int64 owned_datasets = 4;
// Maximum number of datasets that can be created and therefore owned by the organization. Nil means unlimited.
optional int64 maximum_owned_datasets = 5;
int64 maximum_owned_datasets = 5 [features.field_presence = EXPLICIT];
}

// DatasetsService is the CRUD service for Tilebox datasets.
Expand Down
6 changes: 5 additions & 1 deletion apis/datasets/v1/timeseries.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
// Timeseries types for workflows

syntax = "proto3";
edition = "2023";

package datasets.v1;

import "datasets/v1/core.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/go_features.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// TimeseriesDatasetChunk is a message that represents a chunk of a timeseries dataset.
// used by workflow tasks that are executed once for each datapoint in a timeseries dataset
Expand Down
6 changes: 5 additions & 1 deletion apis/datasets/v1/well_known_types.proto
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// This file contains some well-known types that are available to use for all dataset protobuf messages.
// They are specially handled in our client libraries and converted to the corresponding representations.

syntax = "proto3";
edition = "2023";
package datasets.v1;

// in addition to the well-known types defined here, we also include Timestamp and Duration
// buf:lint:ignore IMPORT_USED
import "google/protobuf/duration.proto";
import "google/protobuf/go_features.proto";
// buf:lint:ignore IMPORT_USED
import "google/protobuf/timestamp.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// Bytes field (in message)
message UUID {
bytes uuid = 1;
Expand Down
7 changes: 6 additions & 1 deletion apis/examples/v1/workflow.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// A sample tree workflow.

syntax = "proto3";
edition = "2023";

package examples.v1;

import "google/protobuf/go_features.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// SpawnWorkflowTreeTask is a task that spawns a tree of tasks.
message SpawnWorkflowTreeTask {
int64 current_level = 1;
Expand Down
6 changes: 5 additions & 1 deletion apis/workflows/v1/automation.proto
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
// The external API for managing automations in the Workflows service.

syntax = "proto3";
edition = "2023";

package workflows.v1;

import "google/protobuf/empty.proto";
import "google/protobuf/go_features.proto";
import "google/protobuf/timestamp.proto";
import "workflows/v1/core.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// StorageType specifies a kind of storage bucket that we support.
enum StorageType {
STORAGE_TYPE_UNSPECIFIED = 0;
Expand Down
14 changes: 9 additions & 5 deletions apis/workflows/v1/core.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
// Core types for workflows.

syntax = "proto3";
edition = "2023";

package workflows.v1;

import "google/protobuf/duration.proto";
import "google/protobuf/go_features.proto";
import "google/protobuf/timestamp.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// A cluster is a grouping of tasks that are related.
message Cluster {
// 1 is reserved for a potential id field in the future.
Expand Down Expand Up @@ -57,9 +61,9 @@ message Task {
// Unique identifier for the task. Used by runners to match tasks to specific functions.
TaskIdentifier identifier = 2;
TaskState state = 3; // The current state of the task.
optional bytes input = 4; // The serialized input parameters for the task in the format that this task expects.
bytes input = 4 [features.field_presence = EXPLICIT]; // The serialized input parameters for the task in the format that this task expects.
// Display is a human readable representation of the Task used for printing or visualizations
optional string display = 5;
string display = 5 [features.field_presence = EXPLICIT];
Job job = 6; // The job that this task belongs to.
UUID parent_id = 7; // The id of the parent task.
repeated UUID depends_on = 8; // The ids of the tasks that this task depends on.
Expand Down Expand Up @@ -147,8 +151,8 @@ message IDInterval {
// Pagination information for paginated queries
message Pagination {
// The maximum number of entries to return.
optional int64 limit = 1;
int64 limit = 1 [features.field_presence = EXPLICIT];
// Return entries starting after this entry.
// This is the id of the last entry returned in the previous page as the next parameter in each paginated query.
optional UUID starting_after = 2;
UUID starting_after = 2 [features.field_presence = EXPLICIT];
}
9 changes: 7 additions & 2 deletions apis/workflows/v1/diagram.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// Diagram service for rendering diagrams

syntax = "proto3";
edition = "2023";

package workflows.v1;

import "google/protobuf/go_features.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// Request to render a diagram
message RenderDiagramRequest {
string diagram = 1; // The diagram graph in the D2 syntax
Expand All @@ -17,7 +22,7 @@ message RenderOptions {
string layout = 1;

// The D2 theme to use when rendering the diagram: https://d2lang.com/tour/themes/
optional int64 theme_id = 2;
int64 theme_id = 2 [features.field_presence = EXPLICIT];

// Whether to render the diagram in a sketchy (hand-drawn) style
bool sketchy = 3;
Expand Down
12 changes: 8 additions & 4 deletions apis/workflows/v1/job.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
// The externally facing API allowing users to interact with jobs.

syntax = "proto3";
edition = "2023";

package workflows.v1;

import "google/protobuf/go_features.proto";
import "workflows/v1/core.proto";
import "workflows/v1/diagram.proto";

option features.(pb.go).api_level = API_OPAQUE;
option features.field_presence = IMPLICIT;

// SubmitJobRequest submits and schedules a job for execution. The job can have multiple root tasks.
message SubmitJobRequest {
// The root tasks for the job.
Expand Down Expand Up @@ -81,23 +85,23 @@ message QueryFilters {
}

// Filter jobs by automation id.
optional UUID automation_id = 3;
UUID automation_id = 3 [features.field_presence = EXPLICIT];
}

// QueryJobsRequest requests a list of jobs.
message QueryJobsRequest {
// Filters to apply to the query.
QueryFilters filters = 1;
// The pagination parameters for this request.
optional Pagination page = 2;
Pagination page = 2 [features.field_presence = EXPLICIT];
}

// A list of jobs.
message QueryJobsResponse {
// The jobs.
repeated Job jobs = 1;
// The pagination parameters for the next page.
optional Pagination next_page = 3;
Pagination next_page = 3 [features.field_presence = EXPLICIT];
}

// GetJobPrototypeRequest requests a clone prototype of a job.
Expand Down
Loading