diff --git a/VERSION b/VERSION index b54cee0..6b684ba 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2024-05-13-00 +2024-08-01-00 diff --git a/buf.yaml b/buf.yaml index 69baf0f..3edc46e 100644 --- a/buf.yaml +++ b/buf.yaml @@ -3,7 +3,7 @@ deps: - buf.build/googleapis/googleapis breaking: use: - - FILE + - WIRE lint: use: - DEFAULT diff --git a/temporal/api/cloud/cloudservice/v1/request_response.proto b/temporal/api/cloud/cloudservice/v1/request_response.proto index 176889d..c441201 100644 --- a/temporal/api/cloud/cloudservice/v1/request_response.proto +++ b/temporal/api/cloud/cloudservice/v1/request_response.proto @@ -269,6 +269,66 @@ message GetRegionResponse { temporal.api.cloud.region.v1.Region region = 1; } +message GetSearchAttributesRequest { + // The namespace to get search attributes for. + string namespace = 1; + // The requested size of the page to retrieve - optional. + // Cannot exceed 1000. Defaults to 100. + int32 page_size = 2; + // The page token if this is continuing from another response - optional. + string page_token = 3; +} + +message GetSearchAttributesResponse { + // The list of search attributes in ascending name order. + repeated temporal.api.cloud.namespace.v1.SearchAttribute search_attributes = 1; + // The next page's token. + string next_page_token = 2; +} + +message GetSearchAttributeRequest { + // The namespace to get the search attribute for. + string namespace = 1; + // The name of the search attribute to get. + string name = 2; +} + +message GetSearchAttributeResponse { + // The search attribute. + temporal.api.cloud.namespace.v1.SearchAttribute search_attribute = 1; +} + +message AddSearchAttributeRequest { + // The namespace to add the search attribute to. + string namespace = 1; + // The search attribute to add. + temporal.api.cloud.namespace.v1.SearchAttributeSpec spec = 2; + // The id to use for this async operation - optional. + string async_operation_id = 3; +} + +message AddSearchAttributeResponse { + // The name of the search attribute that was added. + string name = 1; + // The async operation. + temporal.api.cloud.operation.v1.AsyncOperation async_operation = 2; +} + +message RenameSearchAttributeRequest { + // The namespace to rename the search attribute for. + string namespace = 1; + // The name of the existing search attribute to be renamed. + string name = 2; + // The new name of the search attribute. + string new_name = 3; + // The id to use for this async operation - optional. + string async_operation_id = 5; +} + +message RenameSearchAttributeResponse { + // The async operation. + temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1; +} message GetApiKeysRequest { // The requested size of the page to retrieve - optional. @@ -280,7 +340,10 @@ message GetApiKeysRequest { string owner_id = 3; // Filter api keys by owner type - optional. // Possible values: user, service-account - string owner_type = 4; + string owner_type_deprecated = 4 [deprecated = true]; + // Filter api keys by owner type - optional. + // temporal:enums:replaces=owner_type_deprecated + temporal.api.cloud.identity.v1.OwnerType owner_type = 5; } message GetApiKeysResponse { diff --git a/temporal/api/cloud/cloudservice/v1/service.proto b/temporal/api/cloud/cloudservice/v1/service.proto index f37e673..7a00f50 100644 --- a/temporal/api/cloud/cloudservice/v1/service.proto +++ b/temporal/api/cloud/cloudservice/v1/service.proto @@ -98,12 +98,43 @@ service CloudService { } // Rename an existing customer search attribute + // Deprecated: Use RenameSearchAttribute instead rpc RenameCustomSearchAttribute (RenameCustomSearchAttributeRequest) returns (RenameCustomSearchAttributeResponse) { option (google.api.http) = { post: "/cloud/namespaces/{namespace}/rename-custom-search-attribute", body: "*" }; } + + // Get all search attributes registered for a namespace. + rpc GetSearchAttributes (GetSearchAttributesRequest) returns (GetSearchAttributesResponse) { + option (google.api.http) = { + get: "/cloud/namespaces/{namespace}/search-attributes", + }; + } + + // Get a search attribute registered for a namespace. + rpc GetSearchAttribute (GetSearchAttributeRequest) returns (GetSearchAttributeResponse) { + option (google.api.http) = { + get: "/cloud/namespaces/{namespace}/search-attribute/{name}", + }; + } + + // Add a new search attribute to a namespace. + rpc AddSearchAttribute(AddSearchAttributeRequest) returns (AddSearchAttributeResponse) { + option (google.api.http) = { + post: "/cloud/namespaces/{namespace}/search-attributes", + body: "*" + }; + } + + // Rename an existing search attribute. + rpc RenameSearchAttribute (RenameSearchAttributeRequest) returns (RenameSearchAttributeResponse) { + option (google.api.http) = { + post: "/cloud/namespaces/{namespace}/search-attribute/{name}/rename", + body: "*" + }; + } // Delete a namespace rpc DeleteNamespace (DeleteNamespaceRequest) returns (DeleteNamespaceResponse) { diff --git a/temporal/api/cloud/common/v1/message.proto b/temporal/api/cloud/common/v1/message.proto new file mode 100644 index 0000000..94b71ac --- /dev/null +++ b/temporal/api/cloud/common/v1/message.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package temporal.api.cloud.common.v1; + +option go_package = "go.temporal.io/api/cloud/common/v1;common"; +option java_package = "io.temporal.api.cloud.common.v1"; +option java_multiple_files = true; +option java_outer_classname = "MessageProto"; +option ruby_package = "Temporalio::Api::Cloud::Common::V1"; +option csharp_namespace = "Temporalio.Api.Cloud.Common.V1"; + + +enum ResourceState { + RESOURCE_STATE_UNSPECIFIED = 0; + RESOURCE_STATE_ACTIVATING = 1; // The resource is being activated. + RESOURCE_STATE_ACTIVATION_FAILED = 2; // The resource failed to activate. This is an error state. Reach out to support for remediation. + RESOURCE_STATE_ACTIVE = 3; // The resource is active and ready to use. + RESOURCE_STATE_UPDATING = 4; // The resource is being updated. + RESOURCE_STATE_UPDATE_FAILED = 5; // The resource failed to update. This is an error state. Reach out to support for remediation. + RESOURCE_STATE_DELETING = 6; // The resource is being deleted. + RESOURCE_STATE_DELETE_FAILED = 7; // The resource failed to delete. This is an error state. Reach out to support for remediation. + RESOURCE_STATE_DELETED = 8; // The resource has been deleted. + RESOURCE_STATE_SUSPENDED = 9; // The resource is suspended and not available for use. Reach out to support for remediation. +} diff --git a/temporal/api/cloud/identity/v1/message.proto b/temporal/api/cloud/identity/v1/message.proto index 7db0cae..74c98d6 100644 --- a/temporal/api/cloud/identity/v1/message.proto +++ b/temporal/api/cloud/identity/v1/message.proto @@ -9,6 +9,7 @@ option java_outer_classname = "MessageProto"; option ruby_package = "Temporalio::Api::Cloud::Identity::V1"; option csharp_namespace = "Temporalio.Api.Cloud.Identity.V1"; +import "temporal/api/cloud/common/v1/message.proto"; import "google/protobuf/timestamp.proto"; message AccountAccess { @@ -16,7 +17,18 @@ message AccountAccess { // admin - gives full access the account, including users and namespaces // developer - gives access to create namespaces on the account // read - gives read only access to the account - string role = 1; + // Deprecated: Use role field instead. + string role_deprecated = 1 [deprecated = true]; + // The role on the account. + // temporal:enums:replaces=role_deprecated + Role role = 2; + + enum Role { + ROLE_UNSPECIFIED = 0; + ROLE_ADMIN = 1; // Gives full access to the account, including users and namespaces. + ROLE_DEVELOPER = 2; // Gives access to create namespaces on the account. + ROLE_READ = 3; // Gives read only access to the account. + } } message NamespaceAccess { @@ -24,7 +36,25 @@ message NamespaceAccess { // admin - gives full access to the namespace, including assigning namespace access to other users // write - gives write access to the namespace configuration and workflows within the namespace // read - gives read only access to the namespace configuration and workflows within the namespace - string permission = 1; + // Deprecated: Use permission field instead. + string permission_deprecated = 1 [deprecated = true]; + + // The permission to the namespace. + // temporal:enums:replaces=permission_deprecated + Permission permission = 2; + + enum Permission { + PERMISSION_UNSPECIFIED = 0; + PERMISSION_ADMIN = 1; // Gives full access to the namespace, including assigning namespace access to other users. + PERMISSION_WRITE = 2; // Gives write access to the namespace configuration and workflows within the namespace. + PERMISSION_READ = 3; // Gives read only access to the namespace configuration and workflows within the namespace. + } +} + +enum OwnerType { + OWNER_TYPE_UNSPECIFIED = 0; + OWNER_TYPE_USER = 1; // The owner is a user. + OWNER_TYPE_SERVICE_ACCOUNT = 2; // The owner is a service account. } message Access { @@ -58,7 +88,12 @@ message User { // The user specification UserSpec spec = 3; // The current state of the user - string state = 4; + // Deprecated: Use state field instead. + string state_deprecated = 4 [deprecated = true]; + // The current state of the user. + // For any failed state, reach out to Temporal Cloud support for remediation. + // temporal:enums:replaces=state_deprecated + temporal.api.cloud.common.v1.ResourceState state = 9; // The id of the async operation that is creating/updating/deleting the user, if any string async_operation_id = 5; // The details of the open invitation sent to the user, if any @@ -94,8 +129,13 @@ message UserGroup { string resource_version = 2; // The group specification UserGroupSpec spec = 3; - // The current state of the group - string state = 4; + // The current state of the group. + // Deprecated: Use state field instead. + string state_deprecated = 4 [deprecated = true]; + // The current state of the group. + // For any failed state, reach out to Temporal Cloud support for remediation. + // temporal:enums:replaces=state_deprecated + temporal.api.cloud.common.v1.ResourceState state = 8; // The id of the async operation that is creating/updating/deleting the group, if any string async_operation_id = 5; // The date and time when the group was created @@ -116,7 +156,12 @@ message ServiceAccount { // The current state of the service account. // Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended. // For any failed state, reach out to Temporal Cloud support for remediation. - string state = 4; + // Deprecated: Use state field instead. + string state_deprecated = 4 [deprecated = true]; + // The current state of the service account. + // For any failed state, reach out to Temporal Cloud support for remediation. + // temporal:enums:replaces=state_deprecated + temporal.api.cloud.common.v1.ResourceState state = 8; // The id of the async operation that is creating/updating/deleting the service account, if any. string async_operation_id = 5; // The date and time when the service account was created. @@ -150,7 +195,11 @@ message ApiKey { // The current state of the API key. // Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended. // For any failed state, reach out to Temporal Cloud support for remediation. - string state = 4; + // Deprecated: Use state field instead. + string state_deprecated = 4 [deprecated = true]; + // The current state of the API key. + // temporal:enums:replaces=state_deprecated + temporal.api.cloud.common.v1.ResourceState state = 8; // The id of the async operation that is creating/updating/deleting the API key, if any. string async_operation_id = 5; // The date and time when the API key was created. @@ -163,13 +212,17 @@ message ApiKey { message ApiKeySpec { // The id of the owner to create the API key for. // The owner id is immutable. Once set during creation, it cannot be changed. - // The owner id is the id of the user when the owner type is 'user'. - // The owner id is the id of the service account when the owner type is 'service-account'. + // The owner id is the id of the user when the owner type is user. + // The owner id is the id of the service account when the owner type is service account. string owner_id = 1; // The type of the owner to create the API key for. // The owner type is immutable. Once set during creation, it cannot be changed. // Possible values: user, service-account. - string owner_type = 2; + // Deprecated: Use owner_type field instead. + string owner_type_deprecated = 2 [deprecated = true]; + // The type of the owner to create the API key for. + // temporal:enums:replaces=owner_type_deprecated + OwnerType owner_type = 7; // The display name of the API key. string display_name = 3; // The description of the API key. diff --git a/temporal/api/cloud/namespace/v1/message.proto b/temporal/api/cloud/namespace/v1/message.proto index 4fec2bb..a358ce8 100644 --- a/temporal/api/cloud/namespace/v1/message.proto +++ b/temporal/api/cloud/namespace/v1/message.proto @@ -9,6 +9,7 @@ option java_outer_classname = "MessageProto"; option ruby_package = "Temporalio::Api::Cloud::Namespace::V1"; option csharp_namespace = "Temporalio.Api.Cloud.Namespace.V1"; +import "temporal/api/cloud/common/v1/message.proto"; import "google/protobuf/timestamp.proto"; message CertificateFilterSpec { @@ -87,7 +88,9 @@ message NamespaceSpec { // Supported attribute types: text, keyword, int, double, bool, datetime, keyword_list. // NOTE: currently deleting a search attribute is not supported. // Optional, default is empty. - map custom_search_attributes = 5; + // Deprecated: Use the AddSearchAttribute, RenameSearchAttribute operations instead to manage search attributes. + // temporal:versioning:max_version=2024-05-13-00 + map custom_search_attributes = 5 [deprecated = true]; // Codec server spec used by UI to decode payloads for all users interacting with this namespace. // Optional, default is unset. CodecServerSpec codec_server = 6; @@ -133,7 +136,12 @@ message Namespace { // The namespace specification. NamespaceSpec spec = 3; // The current state of the namespace. - string state = 4; + // Deprecated: Use state instead. + string state_deprecated = 4 [deprecated = true]; + // The current state of the namespace. + // For any failed state, reach out to Temporal Cloud support for remediation. + // temporal:enums:replaces=state_deprecated + temporal.api.cloud.common.v1.ResourceState state = 13; // The id of the async operation that is creating/updating/deleting the namespace, if any. string async_operation_id = 5; // The endpoints for the namespace. @@ -158,7 +166,61 @@ message NamespaceRegionStatus { // The current state of the namespace region. // Possible values: adding, active, passive, removing, failed. // For any failed state, reach out to Temporal Cloud support for remediation. - string state = 1; + // Deprecated: Use state instead. + string state_deprecated = 1 [deprecated = true]; + // The current state of the namespace region. + // temporal:enums:replaces=state_deprecated + State state = 3; // The id of the async operation that is making changes to where the namespace is available, if any. string async_operation_id = 2; + + enum State { + STATE_UNSPECIFIED = 0; + STATE_ADDING= 1; // The region is being added to the namespace. + STATE_ACTIVE= 2; // The namespace is active in this region. + STATE_PASSIVE = 3; // The namespace is passive in this region. + STATE_REMOVING = 4; // The region is being removed from the namespace. + STATE_FAILED = 5; // The region failed to be added/removed, check failure_reason in the last async_operation status for more details. + } +} + +message SearchAttributeSpec { + // The name of the search attribute. + // Once created, the name can be changed using the RenameSearchAttribute operation. + string name = 1; + // The type of the search attribute. + // The type of the search attribute cannot be changed once set. + SearchAttributeType type = 2; + + enum SearchAttributeType { + SEARCH_ATTRIBUTE_TYPE_UNSPECIFIED = 0; + SEARCH_ATTRIBUTE_TYPE_TEXT = 1; + SEARCH_ATTRIBUTE_TYPE_KEYWORD = 2; + SEARCH_ATTRIBUTE_TYPE_INT = 3; + SEARCH_ATTRIBUTE_TYPE_DOUBLE = 4; + SEARCH_ATTRIBUTE_TYPE_BOOL = 5; + SEARCH_ATTRIBUTE_TYPE_DATETIME = 6; + SEARCH_ATTRIBUTE_TYPE_KEYWORD_LIST = 7; + } +} + +message SearchAttribute { + // The search attribute specification. + SearchAttributeSpec spec = 1; + // Whether the search attribute is system defined. + // System defined search attributes cannot be modified or deleted. + bool system = 2; + // The current state of the search attribute. + State state = 3; + // The id of the async operation that is making changes to the search attribute, if any. + string async_operation_id = 4; + + enum State { + STATE_UNSPECIFIED = 0; + STATE_ADDING = 1; // The search attribute is being added. + STATE_ADD_FAILED = 2; // The search attribute failed to be added, check failure_reason for more details. + STATE_READY = 3; // The search attribute is ready for use. + STATE_RENAMING = 4; // The search attribute is being renamed. + STATE_RENAME_FAILED = 5; // The search attribute failed to be renamed, check failure_reason for more details. + } } diff --git a/temporal/api/cloud/operation/v1/message.proto b/temporal/api/cloud/operation/v1/message.proto index 8d0e89e..ada08a3 100644 --- a/temporal/api/cloud/operation/v1/message.proto +++ b/temporal/api/cloud/operation/v1/message.proto @@ -18,7 +18,11 @@ message AsyncOperation { string id = 1; // The current state of this operation // Possible values are: pending, in_progress, failed, cancelled, fulfilled - string state = 2; + // Deprecated: Use the state field instead. + string state_deprecated = 2 [deprecated = true]; + // The current state of this operation. + // temporal:enums:replaces=state_deprecated + State state = 9; // The recommended duration to check back for an update in the operation's state google.protobuf.Duration check_duration = 3; // The type of operation being performed @@ -33,4 +37,13 @@ message AsyncOperation { google.protobuf.Timestamp started_time = 7; // The date and time when the operation completed google.protobuf.Timestamp finished_time = 8; + + enum State { + STATE_UNSPECIFIED = 0; + STATE_PENDING = 1; // The operation is pending. + STATE_IN_PROGRESS = 2; // The operation is in progress. + STATE_FAILED = 3; // The operation failed, check failure_reason for more details. + STATE_CANCELLED = 4; // The operation was cancelled. + STATE_FULFILLED = 5; // The operation was fulfilled. + } } diff --git a/temporal/api/cloud/region/v1/message.proto b/temporal/api/cloud/region/v1/message.proto index 25c8b13..3f9ffae 100644 --- a/temporal/api/cloud/region/v1/message.proto +++ b/temporal/api/cloud/region/v1/message.proto @@ -14,9 +14,20 @@ message Region { string id = 1; // The name of the cloud provider that's hosting the region. // Currently only "aws" is supported. - string cloud_provider = 2; + // Deprecated: Use cloud_provider instead. + string cloud_provider_deprecated = 2 [deprecated = true]; + // The cloud provider that's hosting the region. + // temporal:enums:replaces=cloud_provider_deprecated + CloudProvider cloud_provider = 5; // The region identifier as defined by the cloud provider. string cloud_provider_region = 3; // The human readable location of the region. string location = 4; + + // The cloud provider that's hosting the region. + enum CloudProvider { + CLOUD_PROVIDER_UNSPECIFIED = 0; + CLOUD_PROVIDER_AWS = 1; + CLOUD_PROVIDER_GCP = 2; + } }