From c8633faf6315736d13849dbdeba30e28fb4c2db4 Mon Sep 17 00:00:00 2001 From: Sismobot <94460392+sismobot@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:29:33 +0200 Subject: [PATCH] [factory]: Adding new corrected-version group (#2226) --- .../generators/corrected-version/index.ts | 38 +++++++++++++++++++ group-generators/generators/index.ts | 2 + 2 files changed, 40 insertions(+) create mode 100644 group-generators/generators/corrected-version/index.ts diff --git a/group-generators/generators/corrected-version/index.ts b/group-generators/generators/corrected-version/index.ts new file mode 100644 index 000000000..ff3640252 --- /dev/null +++ b/group-generators/generators/corrected-version/index.ts @@ -0,0 +1,38 @@ + +import { dataProviders } from "@group-generators/helpers/data-providers"; +import { Tags, ValueType, GroupWithData } from "topics/group"; +import { + GenerationContext, + GenerationFrequency, + GroupGenerator, +} from "topics/group-generator"; + +// Generated from factory.sismo.io + +const generator: GroupGenerator = { + + generationFrequency: GenerationFrequency.Daily, + + generate: async (context: GenerationContext): Promise => { + + const restProvider = new dataProviders.RestProvider(); + + const restProviderData0 = await restProvider.getAccountsFromAPI({ + url: "https://front-git-feature-sismo-way2pay.vercel.app/api/sismo/recurring" + }); + + return [ + { + name: "corrected-version", + timestamp: context.timestamp, + description: "All users of the platform", + specs: "It will fetch a list of people who have interacted successfully with our API", + data: restProviderData0, + valueType: ValueType.Score, + tags: [Tags.Factory], + }, + ]; + }, +}; + +export default generator; diff --git a/group-generators/generators/index.ts b/group-generators/generators/index.ts index 5d9d7c78a..0e33f3082 100644 --- a/group-generators/generators/index.ts +++ b/group-generators/generators/index.ts @@ -118,6 +118,7 @@ import consensysDemoLock from "./consensys-demo-lock"; import contributors from "./contributors"; import contributorsOfDataverseCda from "./contributors-of-dataverse-cda"; import cookingRoom from "./cooking-room"; +import correctedVersion from "./corrected-version"; import cowHolders from "./cow-holders"; import cowTraders from "./cow-traders"; import cowTradersAndHolders from "./cow-traders-and-holders"; @@ -1011,6 +1012,7 @@ export const groupGenerators: GroupGeneratorsLibrary = { "contributors": contributors, "contributors-of-dataverse-cda": contributorsOfDataverseCda, "cooking-room": cookingRoom, + "corrected-version": correctedVersion, "cow-holders": cowHolders, "cow-traders": cowTraders, "cow-traders-and-holders": cowTradersAndHolders,