mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 16:01:42 +00:00
feat: teams workspace scripts (#5238)
* backend and clients * adding teams_team_name to workspace_settings * openapi.yaml adding teams workspace settings endpoints * teams workspace settings frontend * workspaces router * build ce * ee gate * ee oauth * update client * workspace error handler * remove log * ce * point to new hub scripts * updating hubPaths * updating hubPaths * cleanup * merge * schedule teams error * polish, reactivity * sqlx compilewarning * sqlx migrate * make it build * router * fix * remove sqlx workaround * Update ee-repo-ref.txt * simplify some logic * sqlx * latest ee ref * latest ee ref --------- Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
@@ -708,6 +708,13 @@ class Windmill:
|
||||
Indeed, in the viewer context WM_USERNAME is set to the username of the viewer but WM_EMAIL is set to the email of the creator of the app.
|
||||
"""
|
||||
return self.get(f"/w/{self.workspace}/users/username_to_email/{username}").text
|
||||
|
||||
|
||||
def send_teams_message(self, conversation_id: str, text: str, success: bool = True, card_block: dict = None):
|
||||
"""
|
||||
Send a message to a Microsoft Teams conversation with conversation_id, where success is used to style the message
|
||||
"""
|
||||
return self.post(f"/teams/activities", json={"conversation_id": conversation_id, "text": text, "success": success, "card_block": card_block})
|
||||
|
||||
|
||||
def init_global_client(f):
|
||||
@@ -1068,6 +1075,10 @@ def request_interactive_slack_approval(
|
||||
dynamic_enums_json=dynamic_enums_json,
|
||||
)
|
||||
|
||||
@init_global_client
|
||||
def send_teams_message(conversation_id: str, text: str, success: bool, card_block: dict = None):
|
||||
return _client.send_teams_message(conversation_id, text, success, card_block)
|
||||
|
||||
@init_global_client
|
||||
def cancel_running() -> dict:
|
||||
"""Cancel currently running executions of the same script."""
|
||||
|
||||
Reference in New Issue
Block a user