1.9.0 • Published 3 years ago
@firesquad/api-sdk v1.9.0
@firesquad/api-sdk
Properly integrate your Nodejs apps with firesquad usign this SDK.
Quick Start
For getting started, Create an API Integration on Firesquad. After that, you can use this firesquad package:
import { Firesquad, ConversationContentMessageType } from "@firesquad/api-sdk";
export const fs = new Firesquad(
  "https://<your-account>.api.firesquad.io",
  "<your-api-id>",
  "<your-api-key>"
);
/* You can use firesquad methods after creating the instance, such as: */
fs.PostConversationItem(
  {
    internal: false,
    content: {
      message: [
        {
          type: ConversationContentMessageType.Paragraph,
          children: [{ text: "Hello, World!" }],
        },
      ],
    },
  },
  "<your-conversation-id>"
)
  /* And wait for the response */
  .then((response) => console.log(response));