Skip to main content

IntegrationEvent

Struct IntegrationEvent 

Source
pub struct IntegrationEvent {
    pub id: Uuid,
    pub connector_id: Uuid,
    pub event_type: String,
    pub external_id: String,
    pub business_key: String,
    pub status: IntegrationStatus,
    pub payload: String,
    pub mapped_ref_type: Option<String>,
    pub mapped_ref_id: Option<Uuid>,
    pub error_detail: Option<String>,
    pub metadata: AuditMetadata,
}

Fields§

§id: Uuid§connector_id: Uuid§event_type: String§external_id: String§business_key: String§status: IntegrationStatus§payload: String§mapped_ref_type: Option<String>§mapped_ref_id: Option<Uuid>§error_detail: Option<String>§metadata: AuditMetadata

Implementations§

Source§

impl IntegrationEvent

Source

pub fn builder() -> IntegrationEventBuilder

Create a builder for IntegrationEvent

Source

pub fn new( connector_id: Uuid, event_type: String, external_id: String, business_key: String, status: IntegrationStatus, payload: String, ) -> Self

Create a new IntegrationEvent with required fields

Source

pub fn id(&self) -> &Uuid

Get the entity’s unique identifier

Source

pub fn typed_id(&self) -> IntegrationEventId

Get a strongly-typed ID for this entity

Source

pub fn created_at(&self) -> Option<&DateTime<Utc>>

Get when this entity was created

Source

pub fn updated_at(&self) -> Option<&DateTime<Utc>>

Get when this entity was last updated

Source

pub fn is_deleted(&self) -> bool

Check if this entity is soft deleted

Source

pub fn is_active(&self) -> bool

Check if this entity is active (not deleted)

Source

pub fn deleted_at(&self) -> Option<&DateTime<Utc>>

Get when this entity was deleted

Source

pub fn created_by(&self) -> Option<&Uuid>

Get who created this entity

Source

pub fn updated_by(&self) -> Option<&Uuid>

Get who last updated this entity

Source

pub fn deleted_by(&self) -> Option<&Uuid>

Get who deleted this entity

Source

pub fn status(&self) -> &IntegrationStatus

Get the current status

Source

pub fn with_mapped_ref_type(self, value: String) -> Self

Set the mapped_ref_type field (chainable)

Source

pub fn with_mapped_ref_id(self, value: Uuid) -> Self

Set the mapped_ref_id field (chainable)

Source

pub fn with_error_detail(self, value: String) -> Self

Set the error_detail field (chainable)

Source

pub fn apply_patch(&mut self, fields: HashMap<String, Value>)

Apply partial updates from a map of field name to JSON value

Trait Implementations§

Source§

impl ApplyUpdateDto<UpdateIntegrationEventDto> for IntegrationEvent

Source§

impl Clone for IntegrationEvent

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CrudRepository<IntegrationEvent> for IntegrationEventRepository

Hydrate ?include= relations: fetch rows from table by id list, as JSON (raw row_to_json). table comes from EntityRepoMeta::relations() (generator-emitted), never client input. Default: no expansion. The Postgres-backed generated repos override this via impl_crud_repository!.
Source§

fn create<'life0, 'async_trait>( &'life0 self, entity: IntegrationEvent, ) -> Pin<Box<dyn Future<Output = Result<IntegrationEvent, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a new entity
Source§

fn find_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<IntegrationEvent>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find entity by ID (excluding soft-deleted)
Source§

fn find_by_id_including_deleted<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<IntegrationEvent>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find entity by ID (including soft-deleted, for trash operations)
Source§

fn update<'life0, 'async_trait>( &'life0 self, entity: IntegrationEvent, ) -> Pin<Box<dyn Future<Output = Result<IntegrationEvent, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update an existing entity
Source§

fn soft_delete<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Soft delete an entity
Source§

fn restore<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<IntegrationEvent>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Restore a soft-deleted entity
Source§

fn hard_delete<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Permanently delete an entity
Source§

fn list<'life0, 'async_trait>( &'life0 self, page: u32, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<(Vec<IntegrationEvent>, u64), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List entities with pagination (excluding soft-deleted)
Source§

fn list_filtered<'life0, 'async_trait>( &'life0 self, page: u32, limit: u32, filters: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<(Vec<IntegrationEvent>, u64), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List entities with pagination and filters (excluding soft-deleted) Read more
Source§

fn list_filtered_with_info<'life0, 'async_trait>( &'life0 self, page: u32, limit: u32, filters: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<(Vec<IntegrationEvent>, PaginationInfo), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

list_filtered, carrying the pagination info (cursor positions included) so the HTTP layer can surface keyset paging. Default: the tuple form with the cursor fields absent; the generated Postgres repositories override this with the real keyset walk.
Source§

fn table_name(&self) -> Option<&str>

Group and reduce entities under the same filters as list_filtered. Read more
Source§

fn aggregate_filtered<'life0, 'life1, 'async_trait>( &'life0 self, spec: &'life1 AggregateSpec, filters: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<AggregateResult, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_deleted<'life0, 'async_trait>( &'life0 self, page: u32, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<(Vec<IntegrationEvent>, u64), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List soft-deleted entities with pagination
Source§

fn count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Count all entities (excluding soft-deleted)
Source§

fn count_deleted<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Count soft-deleted entities
Source§

fn bulk_create<'life0, 'async_trait>( &'life0 self, entities: Vec<IntegrationEvent>, ) -> Pin<Box<dyn Future<Output = Result<Vec<IntegrationEvent>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Bulk create entities
Source§

fn empty_trash<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Permanently delete all soft-deleted entities
Source§

fn bulk_soft_delete<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Soft-delete many entities by id. Returns the number affected.
Source§

fn bulk_restore<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<Vec<IntegrationEvent>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Restore many soft-deleted entities by id. Returns the restored entities.
Source§

fn bulk_hard_delete<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Permanently delete many entities by id. Returns the number affected.
Source§

fn restore_all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<IntegrationEvent>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Restore every soft-deleted entity. Returns the restored entities.
Source§

fn bulk_update<'life0, 'async_trait>( &'life0 self, entities: Vec<IntegrationEvent>, ) -> Pin<Box<dyn Future<Output = Result<Vec<IntegrationEvent>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update many entities atomically. Returns the updated entities.
Source§

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool, RepositoryError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Check if an entity exists by ID
Source§

impl Debug for IntegrationEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for IntegrationEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Entity for IntegrationEvent

Source§

type Id = Uuid

The type of the entity’s unique identifier
Source§

fn entity_id(&self) -> &Self::Id

Get the entity’s unique identifier
Source§

fn entity_type() -> &'static str

Get the entity type name
Source§

impl EntityRepoMeta for IntegrationEvent

Source§

fn column_types() -> HashMap<String, String>

PostgreSQL type hints for filter/sort (e.g. {"id": "uuid"}).
Source§

fn search_fields() -> &'static [&'static str]

Text columns to include in full-text / ILIKE search.
Source§

fn private_fields() -> &'static [&'static str]

Response fields visible only to the row owner and platform/root callers (@private). Stripped for everyone else.
Source§

fn owner_field() -> Option<&'static str>

The response field (camelCase) holding the owner/company id (@owner), compared against the caller’s access scope to decide private-field visibility. None = the entity has no owner concept.
Source§

fn company_field() -> Option<&'static str>

The DB column that scopes rows to a company (snake_case, e.g. company_id). None = the entity is global (reference data) and is not fenced. Read more
Source§

fn relations() -> &'static [(&'static str, &'static str, &'static str)]

To-one relations expandable via ?include=<name>, as (relation_name, target_table, local_fk_field) — all response keys (relation_name/local_fk in camelCase; target_table is the DB table). Default: none.
Source§

impl From<&IntegrationEvent> for IntegrationEventResponseDto

Source§

fn from(entity: &IntegrationEvent) -> Self

Converts to this type from the input type.
Source§

impl From<CreateIntegrationEventDto> for IntegrationEvent

Source§

fn from(dto: CreateIntegrationEventDto) -> Self

Converts to this type from the input type.
Source§

impl From<IntegrationEvent> for IntegrationEventResponseDto

Source§

fn from(entity: IntegrationEvent) -> Self

Converts to this type from the input type.
Source§

impl From<IntegrationEvent> for IntegrationEventSummaryDto

Source§

fn from(entity: IntegrationEvent) -> Self

Converts to this type from the input type.
Source§

impl FromCreateDto<CreateIntegrationEventDto> for IntegrationEvent

Source§

impl<'a, R: Row> FromRow<'a, R> for IntegrationEvent

Source§

fn from_row(__row: &'a R) -> Result<Self>

Source§

impl PersistentEntity for IntegrationEvent

Source§

fn entity_id(&self) -> String

Get the entity’s unique identifier
Source§

fn set_entity_id(&mut self, id: String)

Set the entity’s unique identifier
Source§

fn created_at(&self) -> Option<DateTime<Utc>>

Get creation timestamp
Source§

fn set_created_at(&mut self, ts: DateTime<Utc>)

Set creation timestamp
Source§

fn updated_at(&self) -> Option<DateTime<Utc>>

Get last update timestamp
Source§

fn set_updated_at(&mut self, ts: DateTime<Utc>)

Set last update timestamp
Source§

fn deleted_at(&self) -> Option<DateTime<Utc>>

Get soft delete timestamp (None if not deleted)
Source§

fn set_deleted_at(&mut self, ts: Option<DateTime<Utc>>)

Set soft delete timestamp
Source§

fn is_deleted(&self) -> bool

Check if entity is soft-deleted
Source§

fn mark_deleted(&mut self)

Mark entity as deleted (soft delete)
Source§

fn restore(&mut self)

Restore a soft-deleted entity
Source§

fn touch(&mut self)

Touch the entity (update timestamp)
Source§

fn generate_id() -> String

Generate a new ID for this entity type
Source§

impl Serialize for IntegrationEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more