pub struct EventType<'a> { /* private fields */ }
Implementations§
Source§impl<'a> EventType<'a>
impl<'a> EventType<'a>
Sourcepub async fn list(
&self,
options: Option<EventTypeListOptions>,
) -> Result<ListResponseEventTypeOut>
pub async fn list( &self, options: Option<EventTypeListOptions>, ) -> Result<ListResponseEventTypeOut>
Return the list of event types.
Sourcepub async fn create(
&self,
event_type_in: EventTypeIn,
options: Option<PostOptions>,
) -> Result<EventTypeOut>
pub async fn create( &self, event_type_in: EventTypeIn, options: Option<PostOptions>, ) -> Result<EventTypeOut>
Create new or unarchive existing event type.
Unarchiving an event type will allow endpoints to filter on it and messages to be sent with it. Endpoints filtering on the event type before archival will continue to filter on it. This operation does not preserve the description and schemas.
Sourcepub async fn get(&self, event_type_name: String) -> Result<EventTypeOut>
pub async fn get(&self, event_type_name: String) -> Result<EventTypeOut>
Get an event type.
Sourcepub async fn update(
&self,
event_type_name: String,
event_type_update: EventTypeUpdate,
) -> Result<EventTypeOut>
pub async fn update( &self, event_type_name: String, event_type_update: EventTypeUpdate, ) -> Result<EventTypeOut>
Update an event type.
Sourcepub async fn patch(
&self,
event_type_name: String,
event_type_patch: EventTypePatch,
) -> Result<EventTypeOut>
pub async fn patch( &self, event_type_name: String, event_type_patch: EventTypePatch, ) -> Result<EventTypeOut>
Partially update an event type.
Sourcepub async fn delete(&self, event_type_name: String) -> Result<()>
pub async fn delete(&self, event_type_name: String) -> Result<()>
Archive an event type.
Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the create operation.
Sourcepub async fn import_openapi(
&self,
event_type_import_open_api_in: EventTypeImportOpenApiIn,
options: Option<PostOptions>,
) -> Result<EventTypeImportOpenApiOut>
pub async fn import_openapi( &self, event_type_import_open_api_in: EventTypeImportOpenApiIn, options: Option<PostOptions>, ) -> Result<EventTypeImportOpenApiOut>
Given an OpenAPI spec, create new or update existing event types.
If an existing archived
event type is updated, it will be unarchived.
The importer will convert all webhooks found in the either the
webhooks
or x-webhooks
top-level.