GitHub

TeamsChatService

API reference for TeamsChatService.

The Teams side of the adapter.

call sends one Connector request, with the bot's token, for what the adapter has no op for. path starts with /v3/ and has its segments encoded. A service_url routes it to an inbound activity's Connector, after the allowlist check. A write is never retried once sent, and a failure that may have landed is uncertain.

Attributes

AttributeTypeDescription
app_idstr

The bot's Microsoft App id.

tenant_idstr

The tenant the layer works in.

cloudCloud

The cloud the layer talks to.

Functions

__init__

__init__(*, app_id, tenant_id, cloud, connector, interactions) -> None
ParameterTypeDescription
app_idstr
tenant_idstr
cloudCloud
connector_connector.Connector
interactions_interactions.Options
def __init__(
    self,
    *,
    app_id: str,
    tenant_id: str,
    cloud: Cloud,
    connector: _connector.Connector,
    interactions: _interactions.Options,
) -> None:
    self._app_id = app_id
    self._tenant_id = tenant_id
    self._cloud = cloud
    self._connector = connector
    # What ``layer_webhook`` needs from the layer that registered the adapter.
    self._interactions = interactions

call

call(method, path, body=None, *, write=False, service_url=None, query=None) -> Effect[JsonValue | None, ChatError]

One Connector request; see the class.

ParameterTypeDescription
methodMethod
pathstr
bodyobject = None
writebool = False
service_urlstr | None = None
queryMapping[str, str] | None = None

Returns Effect[JsonValue | None, ChatError]

def call(
    self,
    method: Method,
    path: str,
    body: object = None,
    *,
    write: bool = False,
    service_url: str | None = None,
    query: Mapping[str, str] | None = None,
) -> Effect[JsonValue | None, ChatError]:
    """One Connector request; see the class."""
    return self._connector.call(
        method, path, body, write=write, service_url=service_url, query=query
    )