Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions knockapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,18 @@ def notify(self, key, actor, recipients, data={}, cancellation_key=None, tenant=

Args:
key (str): The key of the workflow to invoke.
actor (str or dict): An optional reference for who/what performed the action.
recipients (array): An array of recipient identifiers of who/what should be notified.

actor (str | dict[str, Any]): An optional reference for who/what performed the action. This can be A) a user
id, B) an object reference, or C) a dictionary with data to identify a user or object.

recipients (list[str | dict[str, Any]]): A list of recipients that should be notified. This can be a list of
A) user ids, B) object references, C) dictionaries with data to identify a user or object, or D) a
combination thereof.

data (dict): Any data to be passed to the notify call.
tenant (str): An optional identifier for the tenant object that the notifications
belong to.

tenant (str): An optional identifier for the tenant object that the notifications belong to.

cancellation_key (str): A key used to cancel this notify.

Returns:
Expand Down
15 changes: 11 additions & 4 deletions knockapi/resources/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@ def trigger(self, key, actor, recipients, data={}, cancellation_key=None, tenant

Args:
key (str): The key of the workflow to invoke.
actor (str or dict): An optional reference for who/what performed the action.
recipients (array): An array of recipient identifiers of who/what should be notified.

actor (str | dict[str, Any]): An optional reference for who/what performed the action. This can be A) a user
id, B) an object reference, or C) a dictionary with data to identify a user or object.

recipients (list[str | dict[str, Any]]): A list of recipients that should be notified. This can be a list of
A) user ids, B) object references, C) dictionaries with data to identify a user or object, or D) a
combination thereof.

data (dict): Any data to be passed to the notify call.
tenant (str): An optional identifier for the tenant object that the notifications
belong to.

tenant (str): An optional identifier for the tenant object that the notifications belong to.

cancellation_key (str): A key used to cancel this notify.

Returns:
Expand Down