Skip to content

Releases: Topsort/topsort.js

v0.3.2

19 Sep 14:22
2359972
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.1...v0.3.2

v0.3.1

15 Aug 16:25
ab1fdb6
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.0...v0.3.1

v0.3.0

13 Aug 18:15
f375926
Compare
Choose a tag to compare

What's Changed

As part of the new implementation, a Topsort Client that embeds all functions is now initialized by receiving a config. Additionally, some type names have been renamed:

  • TopsortAuction > Auction
  • TopsortEvents > Event

Migration steps:

Auctions - Before

import { TopsortAuction, Config, createAuction } from "@topsort/sdk";

const auction: TopsortAuction = {
    //...
};

const config: Config = {
  apiKey: "API_KEY",
};

createAuction(config, auction)
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

Auctions - After

import { Auction, Config, TopsortClient } from "@topsort/sdk";

const auction: Auction = {
    //...
};

const config: Config = {
  apiKey: "API_KEY",
};

const topsortClient = new TopsortClient(config);

topsortClient.createAuction(auction)
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

Events - Before

import { TopsortEvent, Config, reportEvent } from "@topsort/sdk";

const event: TopsortEvent = {
    //...
};

const config: Config = {
  apiKey: "API_KEY",
};

reportEvent(config, event)
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

Events - After

import { Event, Config, TopsortClient } from "@topsort/sdk";

const event: Event = {
    //...
};

const config: Config = {
  apiKey: "API_KEY",
};

const topsortClient = new TopsortClient(config);

topsortClient.reportEvent(event)
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

Full Changelog: v0.2.1...v0.3.0

v0.2.1

05 Aug 20:07
81f178e
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.2.0...v0.2.1