Connector file structure
Attached is a file tree to demonstrate how are connectors' files organized as a TypeScript project.
Files whose name ends up with
^ refer to an optional file, otherwise are required.
Based on the connector file structure, let's go through each file and figure out how they work together as a whole system.
package.json contains configurations of this connector repo. It will be merged with a sharing
package.json, which contains common dependencies and attributes.
README.md is an elaborated guide for setting up the connector's config.
logo.svg is a file that stores the connector's logo in vector image format.
logo-dark.svg file contains vector graphic of connector's dark mode logo.
See connector logo to know more about the relationship between
index.ts is the file for connector class implementation.
index.test.ts is a file containing corresponding unit tests (UTs) for implementations in
types.ts is where you should define variables' types.
constant.ts is where you should put constants related to the connector, including endpoints, connector metadata, etc.
mock.ts is the file you may put mocked values for testing purposes.
utils.ts is the file where developers put utility functions, and
utils.test.ts should contain relating UTs.