Now Paging Maciej

    @nmshd/connector-sdk
    TypeScript icon, indicating that this package has built-in type declarations

    2.1.1 • Public • Published

    Installation

    npm i @nmshd/connector-sdk
    

    Usage

    1. Initialize the ConnectorClient

      const connectorClient = ConnectorClient.create({
          baseUrl: "https://<INSERT_YOUR_CONNECTOR_DOMAIN_HERE>",
          apiKey: "<INSERT_YOUR_API_KEY_HERE>"
      });
    2. Start using the client

      const FILE_PATH = "path-to-file";
      const uploadOwnFileResponse = await client.files.uploadOwnFile({
          title: "My awesome file",
          description: "Test file",
          expiresAt: "2023-01-01T00:00:00Z",
          file: await fs.promises.readFile(FILE_PATH),
          filename: "my-awesome-file.txt"
      });
      
      if (uploadOwnFileResponse.isSuccess) {
          console.log(uploadOwnFileResponse.result);
      } else {
          console.log(uploadOwnFileResponse.error);
      }

    Documentation

    For a description of the different methods you can look at one of the OpenAPI UIs, which are hosted on your Connector:

    • SwaggerUI: https://<INSERT_YOUR_CONNECTOR_DOMAIN_HERE>/docs/swagger
    • SwaggerUI: https://<INSERT_YOUR_CONNECTOR_DOMAIN_HERE>/docs/rapidoc

    Install

    npm i @nmshd/connector-sdk

    DownloadsWeekly Downloads

    95

    Version

    2.1.1

    License

    MIT

    Unpacked Size

    220 kB

    Total Files

    360

    Last publish

    Collaborators

    • js-soft_ci