Twake
⬅️ Go on twake
  • ☀️ Twake
  • Getting started
    • ▶️Use Twake on twake.app
    • 🏗️Install on your server
      • 🎡Scale with Twake
    • ⚙️Configuration
      • 🔒Security
      • 🔗Custom domain + HTTPS
        • Apache2 configuration
      • 💌Configure mail server
      • 🎨Customisation
      • 🔌Connectors and plugins
      • 👨‍💻 Authentication modes
        • Using Keycloak (LDAP, OpenID and more)
        • Installing Twake with LemonLDAP (LDAP, OpenID and more)
  • How to use it
    • 👋Welcome to Twake !
    • 🧰Console
      • Users
    • 🏢Company & workspace
      • Invite user from Chat
      • Rights
    • 💠Applications
      • 💬Chat
        • Channels
        • Message
      • 📂Drive
        • File and folder
        • Share file with public link
      • 📆Calendar
      • ✅Tasks
      • 🔃Connectors
        • n8n
    • 🖥️Desktop and mobile app
    • 🔒Privacy
  • Developers API
    • 🏠Home
    • 🥇Getting started
      • Create your first application
      • Authenticate with Postman
      • Send a message with your application
      • Trigger action from command
    • ⚙️Application settings
      • Api
      • Display
      • Privileges
      • Identity
    • 📖API Reference
      • Webhook
      • Drive
      • Message
        • DELETE Request
        • POST Request
      • Authentication
    • 🧱Blocks
  • Internal Documentation
    • 🥇Get started
    • 🎨Twake Ecosystem Guidelines
    • 📚Our stack
    • 🧱Backend and APIs
      • 🔑(WIP) Authentication
      • 👥Users and workspaces
      • 🍎Applications
        • Database models
        • REST APIs
      • 🎩Channels and tabs
        • Database models
      • 💬Messages
        • Database models
      • 📄Files
        • Database models
        • REST APIs
        • Resumable.js
      • 📲Notifications
        • Database models
      • 🛠️Twake service development
        • What is a service in Twake ?
        • Create a new service
        • Platform/Technical services
          • Database ORM platform service
    • 🖥️Web, desktop and mobile
      • Table
      • ObjectModal
        • ObjectModalTitle
        • ObjectModalSeparator
        • ObjectModalSectionTitle
        • ObjectModalFormTitle
      • UserListManager
      • MediumPopupManager
      • MenuManager
    • 🎭Translation
Powered by GitBook
On this page

Was this helpful?

  1. Developers API
  2. Application settings

Display

This is a JSON parameter to define where your app should appear

Latest version

{
  twake: {
    version: 1;

    files?: {
      preview?: {
        url: string; //Url to preview file (full screen or inline)
        inline?: boolean;
        main_ext?: string[]; //Main extensions app can read
        other_ext?: string[]; //Secondary extensions app can read
      };
      actions?: //List of action that can apply on a file
      {
        name: string;
        id: string;
      }[];
    };

    //Chat plugin
    chat: {
      input?:
        | true
        | {
            icon?: string; //If defined replace original icon url of your app
            type?: "file" | "call"; //To add in existing apps folder / default icon
          };
      commands?: {
        command: string; // my_app mycommand
        description: string;
      }[];
      actions?: //List of action that can apply on a message
      {
        name: string;
        id: string;
      }[];
    };

    //Allow app to appear as a bot user in direct chat
    direct?:
      | true
      | {
          name?: string;
          icon?: string; //If defined replace original icon url of your app
        };

    //Display app as a standalone application in a tab
    tab?: {
      url: string;
    };

    //Display app as a standalone application on the left bar
    standalone?: {
      url: string;
    };

    //Define where the app can be configured from
    configuration: ("global" | "channel")[];
  };
};

Legacy format

type ApplicationDisplay = {
  twake: 
    {
      "version": 0, //Legacy
      "tasks_module" : {
        "can_connect_to_tasks": true
    	},
      "calendar_module" : {
        "can_connect_to_calendar": true
    	}
    	"drive_module" : {
        "can_connect_to_directory": true,
        "can_open_files": {
    			"url": "", //Une url à appeler pour éditer le fichier (ouvert dans un onglet)
    			"preview_url": "", //Une url à appeler pour prévisualiser un fichier (iframe)
    			"main_ext": ["docx", "xlsx"], //Extensions principales
    			"other_ext": ["txt", "html"] //Extensions secondaires
    		},
    		"can_create_files": [
    			{
    				"url": "https://[...]/empty.docx",
    				"filename": "Untitled.docx",
    				"name": "Word Document"
    			},
          {
    				"url": "https://[...]/empty.xlsx",
    				"filename": "Untitled.xlsx",
    				"name": "Excel Document"
    			}
    		]
      },
      "member_app": true, // Si défini, votre application génèrera un membre
                          // virtuel dans l'espace de travail avec lequel les
                          // utilisateurs pourront discuter.
      "messages_module": {
        "in_plus": {
          "should_wait_for_popup": true
        },
        "right_icon": {
    			"icon_url": "", //If defined replace original icon url of your app 
          "should_wait_for_popup": true,
          "type": "file" //"file" | "call"
        },
        "action": {
          "should_wait_for_popup": true,
          "description": "fdsqfds" //Description de l'action, sinon remplacé par le nom de l'app
        },
        "commands": [
    			{
    				"command": "mycommand", // my_app mycommand
            "description": "fdsqfds"
    			}
    		]
      },
      "channel": {
        "can_connect_to_channel": ""
      },
      "channel_tab": {
        "iframe": ""
      },
      "app": {
        "iframe": "",
        "plus_btn": {
          "should_wait_for_popup": true
        }
      },
      "configuration": {
        "can_configure_in_workspace": true,
        "can_configure_in_channel": true,
    		"can_configure_in_calendar": true,
    		"can_configure_in_tasks": true,
        //"can_configure_in_directory": true
      }
    }
  }
}
PreviousApiNextPrivileges

Last updated 3 years ago

Was this helpful?

⚙️