chitose.tools.ozone.communication package#

Submodules#

chitose.tools.ozone.communication.create_template module#

chitose.tools.ozone.communication.defs module#

class chitose.tools.ozone.communication.defs.TemplateView(id: str, name: str, content_markdown: str, disabled: bool, last_updated_by: str, created_at: str, updated_at: str, subject: str | None = None, lang: str | None = None)#

Bases: Object

Parameters:
  • name – Name of the template.

  • content_markdown – Subject of the message, used in emails.

  • last_updated_by – DID of the user who last updated the template.

  • subject – Content of the template, can contain markdown and variable placeholders.

  • lang – Message language.

to_dict() dict[str, Any]#

chitose.tools.ozone.communication.delete_template module#

chitose.tools.ozone.communication.list_templates module#

chitose.tools.ozone.communication.update_template module#

Module contents#

class chitose.tools.ozone.communication.Communication_(call: Callable[[str, list[tuple[str, str | None | int | list[str]]], bytes | dict[str, Any] | None, dict[str, str]], bytes], subscribe: Callable[[str, list[tuple[str, str | None | int | list[str]]], Callable[[str | bytes], None]], None])#

Bases: object

We recommend calling methods in this class via the chitose.BskyAgent class instead of creating instances of this class directly.

create_template(name: str, content_markdown: str, subject: str, lang: str | None = None, created_by: str | None = None) bytes#

Administrative action to create a new, re-usable communication (email for now) template.

Parameters:
  • name – Name of the template.

  • content_markdown – Content of the template, markdown supported, can contain variable placeholders.

  • subject – Subject of the message, used in emails.

  • lang – Message language.

  • created_by – DID of the user who is creating the template.

delete_template(id: str) bytes#

Delete a communication template.

list_templates() bytes#

Get list of all communication templates.

update_template(id: str, name: str | None = None, lang: str | None = None, content_markdown: str | None = None, subject: str | None = None, updated_by: str | None = None, disabled: bool | None = None) bytes#

Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.

Parameters:
  • id – ID of the template to be updated.

  • name – Name of the template.

  • lang – Message language.

  • content_markdown – Content of the template, markdown supported, can contain variable placeholders.

  • subject – Subject of the message, used in emails.

  • updated_by – DID of the user who is updating the template.