Release Connectors v0.1.22 with service-desk federation
Module Package Release / publish-packages (push) Successful in 12s
Module Package Release / publish-packages (push) Successful in 12s
This commit is contained in:
@@ -632,6 +632,187 @@ class ConnectorKnowledgeSyncRun(Base, TimestampMixin):
|
||||
finished_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
|
||||
|
||||
class ConnectorServiceDeskProfile(Base, TimestampMixin):
|
||||
__tablename__ = "connector_service_desk_profiles"
|
||||
__table_args__ = (
|
||||
UniqueConstraint(
|
||||
"tenant_id",
|
||||
"configuration_id",
|
||||
name="uq_connector_service_desk_profile_configuration",
|
||||
),
|
||||
Index(
|
||||
"ix_connector_service_desk_profiles_tenant_status",
|
||||
"tenant_id",
|
||||
"status",
|
||||
),
|
||||
)
|
||||
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=new_uuid)
|
||||
tenant_id: Mapped[str] = mapped_column(String(36), nullable=False, index=True)
|
||||
configuration_id: Mapped[str] = mapped_column(
|
||||
ForeignKey("connector_configurations.id", ondelete="RESTRICT"),
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
status: Mapped[str] = mapped_column(
|
||||
String(30), default="active", nullable=False, index=True
|
||||
)
|
||||
integration_mode: Mapped[str] = mapped_column(
|
||||
String(30), default="synchronize", nullable=False, index=True
|
||||
)
|
||||
product: Mapped[str] = mapped_column(
|
||||
String(50), default="unknown", nullable=False, index=True
|
||||
)
|
||||
product_version: Mapped[str | None] = mapped_column(String(100))
|
||||
desired_maturity: Mapped[str] = mapped_column(
|
||||
String(30), default="synchronize", nullable=False
|
||||
)
|
||||
discovered_maturity: Mapped[str] = mapped_column(
|
||||
String(30), default="discover", nullable=False
|
||||
)
|
||||
source_authority_mode: Mapped[str] = mapped_column(
|
||||
String(40), default="external_authoritative", nullable=False
|
||||
)
|
||||
default_visibility: Mapped[str] = mapped_column(
|
||||
String(30), default="restricted", nullable=False
|
||||
)
|
||||
default_acl_tokens: Mapped[list[str]] = mapped_column(
|
||||
JSON, default=list, nullable=False
|
||||
)
|
||||
routes: Mapped[dict[str, Any]] = mapped_column(JSON, default=dict, nullable=False)
|
||||
queue_mappings: Mapped[list[dict[str, Any]]] = mapped_column(
|
||||
JSON, default=list, nullable=False
|
||||
)
|
||||
dynamic_field_mappings: Mapped[list[dict[str, Any]]] = mapped_column(
|
||||
JSON, default=list, nullable=False
|
||||
)
|
||||
capabilities: Mapped[list[str]] = mapped_column(JSON, default=list, nullable=False)
|
||||
discovery_revision: Mapped[str | None] = mapped_column(String(255), index=True)
|
||||
discovered_configuration_revision: Mapped[int | None] = mapped_column(Integer)
|
||||
discovered_configuration_hash: Mapped[str | None] = mapped_column(String(64))
|
||||
discovery_evidence: Mapped[dict[str, Any]] = mapped_column(
|
||||
JSON, default=dict, nullable=False
|
||||
)
|
||||
health_status: Mapped[str] = mapped_column(
|
||||
String(30), default="unknown", nullable=False, index=True
|
||||
)
|
||||
health_details: Mapped[dict[str, Any]] = mapped_column(
|
||||
JSON, default=dict, nullable=False
|
||||
)
|
||||
discovered_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
last_sync_cursor: Mapped[str | None] = mapped_column(String(4000))
|
||||
last_high_watermark: Mapped[str | None] = mapped_column(String(500))
|
||||
resource_revision: Mapped[int] = mapped_column(Integer, default=1, nullable=False)
|
||||
updated_by: Mapped[str | None] = mapped_column(String(255), index=True)
|
||||
|
||||
|
||||
class ConnectorServiceDeskObject(Base, TimestampMixin):
|
||||
__tablename__ = "connector_service_desk_objects"
|
||||
__table_args__ = (
|
||||
UniqueConstraint(
|
||||
"profile_id",
|
||||
"object_type",
|
||||
"external_id",
|
||||
name="uq_connector_service_desk_object_identity",
|
||||
),
|
||||
Index(
|
||||
"ix_connector_service_desk_objects_tenant_profile_status",
|
||||
"tenant_id",
|
||||
"profile_id",
|
||||
"status",
|
||||
),
|
||||
Index(
|
||||
"ix_connector_service_desk_objects_tenant_updated",
|
||||
"tenant_id",
|
||||
"source_updated_at",
|
||||
),
|
||||
)
|
||||
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=new_uuid)
|
||||
tenant_id: Mapped[str] = mapped_column(String(36), nullable=False, index=True)
|
||||
profile_id: Mapped[str] = mapped_column(
|
||||
ForeignKey("connector_service_desk_profiles.id", ondelete="CASCADE"),
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
object_type: Mapped[str] = mapped_column(String(40), nullable=False, index=True)
|
||||
external_id: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
external_ticket_number: Mapped[str | None] = mapped_column(String(255), index=True)
|
||||
title: Mapped[str] = mapped_column(String(500), nullable=False)
|
||||
canonical_url: Mapped[str | None] = mapped_column(String(1500))
|
||||
status: Mapped[str] = mapped_column(
|
||||
String(30), default="active", nullable=False, index=True
|
||||
)
|
||||
source_revision: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
content_hash: Mapped[str] = mapped_column(String(64), nullable=False, index=True)
|
||||
visibility: Mapped[str] = mapped_column(
|
||||
String(30), default="restricted", nullable=False
|
||||
)
|
||||
acl_tokens: Mapped[list[str]] = mapped_column(JSON, default=list, nullable=False)
|
||||
mapped_data: Mapped[dict[str, Any]] = mapped_column(
|
||||
JSON, default=dict, nullable=False
|
||||
)
|
||||
provenance: Mapped[dict[str, Any]] = mapped_column(
|
||||
JSON, default=dict, nullable=False
|
||||
)
|
||||
change_cursor: Mapped[str | None] = mapped_column(String(4000), index=True)
|
||||
source_updated_at: Mapped[datetime | None] = mapped_column(
|
||||
DateTime(timezone=True), index=True
|
||||
)
|
||||
observed_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), nullable=False, index=True
|
||||
)
|
||||
resource_revision: Mapped[int] = mapped_column(Integer, default=1, nullable=False)
|
||||
|
||||
|
||||
class ConnectorServiceDeskSyncRun(Base, TimestampMixin):
|
||||
__tablename__ = "connector_service_desk_sync_runs"
|
||||
__table_args__ = (
|
||||
UniqueConstraint(
|
||||
"tenant_id",
|
||||
"profile_id",
|
||||
"idempotency_key",
|
||||
name="uq_connector_service_desk_sync_run_idempotency",
|
||||
),
|
||||
Index(
|
||||
"ix_connector_service_desk_runs_profile_started",
|
||||
"tenant_id",
|
||||
"profile_id",
|
||||
"started_at",
|
||||
),
|
||||
)
|
||||
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=new_uuid)
|
||||
tenant_id: Mapped[str] = mapped_column(String(36), nullable=False, index=True)
|
||||
profile_id: Mapped[str] = mapped_column(
|
||||
ForeignKey("connector_service_desk_profiles.id", ondelete="CASCADE"),
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
mode: Mapped[str] = mapped_column(String(40), nullable=False, index=True)
|
||||
idempotency_key: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
request_hash: Mapped[str] = mapped_column(String(64), nullable=False)
|
||||
status: Mapped[str] = mapped_column(String(30), nullable=False, index=True)
|
||||
cursor_before: Mapped[str | None] = mapped_column(String(4000))
|
||||
cursor_after: Mapped[str | None] = mapped_column(String(4000))
|
||||
high_watermark: Mapped[str | None] = mapped_column(String(500))
|
||||
counts: Mapped[dict[str, Any]] = mapped_column(JSON, default=dict, nullable=False)
|
||||
effects: Mapped[list[dict[str, Any]]] = mapped_column(
|
||||
JSON, default=list, nullable=False
|
||||
)
|
||||
diagnostics: Mapped[list[dict[str, Any]]] = mapped_column(
|
||||
JSON, default=list, nullable=False
|
||||
)
|
||||
provenance: Mapped[dict[str, Any]] = mapped_column(
|
||||
JSON, default=dict, nullable=False
|
||||
)
|
||||
created_by: Mapped[str | None] = mapped_column(String(255), index=True)
|
||||
started_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), nullable=False, index=True
|
||||
)
|
||||
finished_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
|
||||
|
||||
__all__ = [
|
||||
"ConnectorConfiguration",
|
||||
"ConnectorDefinition",
|
||||
@@ -639,6 +820,9 @@ __all__ = [
|
||||
"ConnectorKnowledgeObject",
|
||||
"ConnectorKnowledgeProfile",
|
||||
"ConnectorKnowledgeSyncRun",
|
||||
"ConnectorServiceDeskObject",
|
||||
"ConnectorServiceDeskProfile",
|
||||
"ConnectorServiceDeskSyncRun",
|
||||
"ConnectorSanctionsAcquisitionRun",
|
||||
"ConnectorSanctionsSnapshot",
|
||||
"ConnectorSimulationRun",
|
||||
|
||||
Reference in New Issue
Block a user