From 0c58a33c8d9f4c9003def0b27c831f83b95f27bd Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 21 Jul 2023 10:50:18 +0200 Subject: [PATCH 1/7] Rename isResponseAxiosError --- packages/frontend/src/model/api.ts | 4 ++-- packages/frontend/src/model/periods/periods.ts | 4 ++-- packages/frontend/src/model/praise/praise.ts | 7 ++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/frontend/src/model/api.ts b/packages/frontend/src/model/api.ts index cfb391e22..3d67fda87 100644 --- a/packages/frontend/src/model/api.ts +++ b/packages/frontend/src/model/api.ts @@ -34,7 +34,7 @@ export const isResponseOk = ( return axiosResponse.status === 200 || axiosResponse.status === 201; }; -export const isApiResponseAxiosError = ( +export const isResponseAxiosError = ( axiosResponse: AxiosResponse | AxiosError | null | unknown ): axiosResponse is AxiosError => { return ( @@ -47,7 +47,7 @@ export const isApiResponseValidationError = ( axiosResponse: AxiosResponse | AxiosError | null | unknown ): axiosResponse is AxiosError => { if ( - isApiResponseAxiosError(axiosResponse) && + isResponseAxiosError(axiosResponse) && axiosResponse.response?.status === 400 && axiosResponse.response.data.errors ) diff --git a/packages/frontend/src/model/periods/periods.ts b/packages/frontend/src/model/periods/periods.ts index b482b4590..fca4a366e 100644 --- a/packages/frontend/src/model/periods/periods.ts +++ b/packages/frontend/src/model/periods/periods.ts @@ -16,7 +16,7 @@ import { periodReceiverPraiseListKey, } from '@/utils/periods'; import { useApiAuthClient } from '@/utils/api'; -import { ApiGet, isApiResponseAxiosError, isResponseOk } from '../api'; +import { ApiGet, isResponseAxiosError, isResponseOk } from '../api'; import { ActiveUserId } from '../auth/auth'; import { AllPraiseList, PraiseIdList, SinglePraise } from '../praise/praise'; import { Praise } from '../praise/praise.dto'; @@ -405,7 +405,7 @@ export const useAssignQuantifiers = ( setPeriod(updatedPeriod); return response as AxiosResponse; } - if (isApiResponseAxiosError(response)) { + if (isResponseAxiosError(response)) { throw response; } return response as AxiosResponse | AxiosError; diff --git a/packages/frontend/src/model/praise/praise.ts b/packages/frontend/src/model/praise/praise.ts index b1a497265..17c4e12d6 100644 --- a/packages/frontend/src/model/praise/praise.ts +++ b/packages/frontend/src/model/praise/praise.ts @@ -10,7 +10,7 @@ import { useRecoilValue, useSetRecoilState, } from 'recoil'; -import { ApiGet, isApiResponseAxiosError, isResponseOk } from '../api'; +import { ApiGet, isResponseAxiosError, isResponseOk } from '../api'; import { PaginatedResponseBody } from 'shared/interfaces/paginated-response-body.interface'; /** @@ -200,10 +200,7 @@ export const useAllPraise = ( ); React.useEffect(() => { - if ( - !allPraiseQueryResponse || - isApiResponseAxiosError(allPraiseQueryResponse) - ) + if (!allPraiseQueryResponse || isResponseAxiosError(allPraiseQueryResponse)) return; const paginatedResponse = allPraiseQueryResponse.data; From db923ce7150cbc91ac041eaad0e6290d980a9bdf Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 21 Jul 2023 10:50:50 +0200 Subject: [PATCH 2/7] Styling fix --- .../frontend/src/components/report/DatePeriodRange.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/report/DatePeriodRange.tsx b/packages/frontend/src/components/report/DatePeriodRange.tsx index 16b55425a..3b4b4cd29 100644 --- a/packages/frontend/src/components/report/DatePeriodRange.tsx +++ b/packages/frontend/src/components/report/DatePeriodRange.tsx @@ -107,8 +107,10 @@ export const DatePeriodRange: React.FC = () => { options={periodOptions} className="text-sm min-w-[200px]" /> -
-
or dates:
+
+ or dates: +
+
{ disabled={allPeriods.length === 0} />
+
); From cf7a6ddb8a6dab4378a23b0815af949742eb2486 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 21 Jul 2023 12:47:39 +0200 Subject: [PATCH 3/7] Include manifestUrl in returned manifest --- packages/api-types/out/schema.ts | 716 ++++++++---------- packages/api/openapi.json | 2 +- .../src/reports/dto/report-manifest.dto.ts | 8 + packages/api/src/reports/reports.service.ts | 7 +- 4 files changed, 327 insertions(+), 406 deletions(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index d361a374b..0deb9bae8 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -3,253 +3,254 @@ * Do not make direct changes to the file. */ + export interface paths { - '/api/activate': { + "/api/activate": { /** Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists. */ - post: operations['ActivateController_activate']; + post: operations["ActivateController_activate"]; }; - '/api/users/export/json': { + "/api/users/export/json": { /** Export users document to json */ - get: operations['UsersController_exportJson']; + get: operations["UsersController_exportJson"]; }; - '/api/users/export/csv': { + "/api/users/export/csv": { /** Export users document to csv */ - get: operations['UsersController_exportCsv']; + get: operations["UsersController_exportCsv"]; }; - '/api/users/export/parquet': { + "/api/users/export/parquet": { /** Export users document to parquet */ - get: operations['UsersController_exportParquet']; + get: operations["UsersController_exportParquet"]; }; - '/api/users': { - get: operations['UsersController_findAll']; + "/api/users": { + get: operations["UsersController_findAll"]; }; - '/api/users/{id}': { - get: operations['UsersController_findOne']; + "/api/users/{id}": { + get: operations["UsersController_findOne"]; /** Updates a user */ - patch: operations['UsersController_update']; + patch: operations["UsersController_update"]; }; - '/api/users/{id}/addRole': { - patch: operations['UsersController_addRole']; + "/api/users/{id}/addRole": { + patch: operations["UsersController_addRole"]; }; - '/api/users/{id}/removeRole': { - patch: operations['UsersController_removeRole']; + "/api/users/{id}/removeRole": { + patch: operations["UsersController_removeRole"]; }; - '/api/periods/export/json': { + "/api/periods/export/json": { /** Export periods document to json */ - get: operations['PeriodsController_exportJson']; + get: operations["PeriodsController_exportJson"]; }; - '/api/periods/export/csv': { + "/api/periods/export/csv": { /** Export periods document to csv */ - get: operations['PeriodsController_exportCsv']; + get: operations["PeriodsController_exportCsv"]; }; - '/api/periods/export/parquet': { + "/api/periods/export/parquet": { /** Export periods document to parquet */ - get: operations['PeriodsController_exportParquet']; + get: operations["PeriodsController_exportParquet"]; }; - '/api/periods': { + "/api/periods": { /** List all periods */ - get: operations['PeriodsController_findAllPaginated']; + get: operations["PeriodsController_findAllPaginated"]; /** Create a new period */ - post: operations['PeriodsController_create']; + post: operations["PeriodsController_create"]; }; - '/api/periods/{id}': { + "/api/periods/{id}": { /** Find period by id */ - get: operations['PeriodsController_findOne']; + get: operations["PeriodsController_findOne"]; /** Update a period */ - patch: operations['PeriodsController_update']; + patch: operations["PeriodsController_update"]; }; - '/api/periods/{id}/close': { + "/api/periods/{id}/close": { /** Close a period */ - patch: operations['PeriodsController_close']; + patch: operations["PeriodsController_close"]; }; - '/api/periods/{id}/praise': { + "/api/periods/{id}/praise": { /** Fetch all Praise in a period */ - get: operations['PeriodsController_praise']; + get: operations["PeriodsController_praise"]; }; - '/api/periods/{periodId}/praise/receiver/{receiverId}': { + "/api/periods/{periodId}/praise/receiver/{receiverId}": { /** Fetch all Praise in a period for a given receiver */ - get: operations['PeriodsController_praiseByReceiver']; + get: operations["PeriodsController_praiseByReceiver"]; }; - '/api/periods/{periodId}/praise/giver/{giverId}': { + "/api/periods/{periodId}/praise/giver/{giverId}": { /** Fetch all Praise in a period for a given giver */ - get: operations['PeriodsController_praiseByGiver']; + get: operations["PeriodsController_praiseByGiver"]; }; - '/api/periods/{periodId}/praise/quantifier/{quantifierId}': { + "/api/periods/{periodId}/praise/quantifier/{quantifierId}": { /** Fetch all Praise in a period for a given quantifier */ - get: operations['PeriodsController_praiseByQuantifier']; + get: operations["PeriodsController_praiseByQuantifier"]; }; - '/api/periods/{id}/verifyQuantifierPoolSize': { + "/api/periods/{id}/verifyQuantifierPoolSize": { /** Verify quantifier pool size */ - get: operations['PeriodsController_verifyQuantifierPoolSize']; + get: operations["PeriodsController_verifyQuantifierPoolSize"]; }; - '/api/periods/{id}/assignQuantifiers': { + "/api/periods/{id}/assignQuantifiers": { /** Assign quantifiers to period */ - patch: operations['PeriodsController_assignQuantifiers']; + patch: operations["PeriodsController_assignQuantifiers"]; }; - '/api/periods/{id}/replaceQuantifier': { + "/api/periods/{id}/replaceQuantifier": { /** Replace quantifier in period */ - patch: operations['PeriodsController_replaceQuantifier']; + patch: operations["PeriodsController_replaceQuantifier"]; }; - '/api/event-log': { + "/api/event-log": { /** List event logs, paginated results */ - get: operations['EventLogController_findAllPaginated']; + get: operations["EventLogController_findAllPaginated"]; }; - '/api/event-log/types': { + "/api/event-log/types": { /** List event log types */ - get: operations['EventLogController_types']; + get: operations["EventLogController_types"]; }; - '/api/settings': { + "/api/settings": { /** List all settings. */ - get: operations['SettingsController_findAll']; + get: operations["SettingsController_findAll"]; }; - '/api/settings/{id}': { + "/api/settings/{id}": { /** Get a setting. */ - get: operations['SettingsController_findOne']; + get: operations["SettingsController_findOne"]; /** Set a value for a setting. */ - patch: operations['SettingsController_set']; + patch: operations["SettingsController_set"]; }; - '/api/settings/{id}/upload': { + "/api/settings/{id}/upload": { /** Upload a file for a setting */ - patch: operations['SettingsController_setWithUpload']; + patch: operations["SettingsController_setWithUpload"]; }; - '/api/settings/uploads/{file}': { + "/api/settings/uploads/{file}": { /** Serve an uploaded settings file. */ - get: operations['SettingsController_serveUpload']; + get: operations["SettingsController_serveUpload"]; }; - '/api/periods/{periodId}/settings': { + "/api/periods/{periodId}/settings": { /** List all period settings. */ - get: operations['PeriodSettingsController_findAll']; + get: operations["PeriodSettingsController_findAll"]; }; - '/api/periods/{periodId}/settings/{settingId}': { + "/api/periods/{periodId}/settings/{settingId}": { /** Get a period setting. */ - get: operations['PeriodSettingsController_findOne']; + get: operations["PeriodSettingsController_findOne"]; /** Set value for a period setting. */ - patch: operations['PeriodSettingsController_set']; + patch: operations["PeriodSettingsController_set"]; }; - '/api/praise': { + "/api/praise": { /** List praise items, paginated results */ - get: operations['PraiseController_findAllPaginated']; + get: operations["PraiseController_findAllPaginated"]; /** Create praise item */ - post: operations['PraiseController_praise']; + post: operations["PraiseController_praise"]; }; - '/api/praise/export/json': { + "/api/praise/export/json": { /** Export praise document to json */ - get: operations['PraiseController_exportJson']; + get: operations["PraiseController_exportJson"]; }; - '/api/praise/export/csv': { + "/api/praise/export/csv": { /** Export praise document to csv */ - get: operations['PraiseController_exportCsv']; + get: operations["PraiseController_exportCsv"]; }; - '/api/praise/export/parquet': { + "/api/praise/export/parquet": { /** Export praise document to parquet */ - get: operations['PraiseController_exportParquet']; + get: operations["PraiseController_exportParquet"]; }; - '/api/praise/{id}': { + "/api/praise/{id}": { /** Find praise item by id */ - get: operations['PraiseController_findOne']; + get: operations["PraiseController_findOne"]; }; - '/api/praise/forward': { + "/api/praise/forward": { /** Forward praise item */ - post: operations['PraiseController_forward']; + post: operations["PraiseController_forward"]; }; - '/api/useraccounts': { + "/api/useraccounts": { /** UserAccount list */ - get: operations['UserAccountsController_findAll']; + get: operations["UserAccountsController_findAll"]; /** Create a UserAccount */ - post: operations['UserAccountsController_create']; + post: operations["UserAccountsController_create"]; }; - '/api/useraccounts/export/json': { + "/api/useraccounts/export/json": { /** Export userAccounts document to json */ - get: operations['UserAccountsController_exportJson']; + get: operations["UserAccountsController_exportJson"]; }; - '/api/useraccounts/export/csv': { + "/api/useraccounts/export/csv": { /** Export userAccounts document to csv */ - get: operations['UserAccountsController_exportCsv']; + get: operations["UserAccountsController_exportCsv"]; }; - '/api/useraccounts/export/parquet': { + "/api/useraccounts/export/parquet": { /** Export userAccounts document to parquet */ - get: operations['UserAccountsController_exportParquet']; + get: operations["UserAccountsController_exportParquet"]; }; - '/api/useraccounts/{id}': { + "/api/useraccounts/{id}": { /** Get a UserAccount. */ - get: operations['UserAccountsController_findOne']; + get: operations["UserAccountsController_findOne"]; /** Update UserAccount */ - patch: operations['UserAccountsController_update']; + patch: operations["UserAccountsController_update"]; }; - '/api/api-key': { + "/api/api-key": { /** List all API keys */ - get: operations['ApiKeyController_findAll']; + get: operations["ApiKeyController_findAll"]; /** Create API key */ - post: operations['ApiKeyController_createApiKey']; + post: operations["ApiKeyController_createApiKey"]; }; - '/api/api-key/{id}': { + "/api/api-key/{id}": { /** Get API key by ID */ - get: operations['ApiKeyController_findOne']; + get: operations["ApiKeyController_findOne"]; /** Update API key description */ - put: operations['ApiKeyController_updateApiKeyDescription']; + put: operations["ApiKeyController_updateApiKeyDescription"]; /** Revoke API key */ - delete: operations['ApiKeyController_revokeApiKey']; + delete: operations["ApiKeyController_revokeApiKey"]; }; - '/api/auth/eth-signature/nonce': { + "/api/auth/eth-signature/nonce": { /** Generates a nonce for the user and returns it */ - post: operations['EthSignatureController_nonce']; + post: operations["EthSignatureController_nonce"]; }; - '/api/auth/eth-signature/login': { + "/api/auth/eth-signature/login": { /** Verifies a user's signature and returns a JWT token */ - post: operations['EthSignatureController_login']; + post: operations["EthSignatureController_login"]; }; - '/api/auth/eth-signature/refresh': { + "/api/auth/eth-signature/refresh": { /** Verifies a refreshToken and returns a JWT token */ - post: operations['EthSignatureController_token']; + post: operations["EthSignatureController_token"]; }; - '/api/communities': { - get: operations['CommunityController_findAll']; + "/api/communities": { + get: operations["CommunityController_findAll"]; /** Create a new community */ - post: operations['CommunityController_create']; + post: operations["CommunityController_create"]; }; - '/api/communities/{id}': { - get: operations['CommunityController_findOne']; + "/api/communities/{id}": { + get: operations["CommunityController_findOne"]; /** Update community */ - patch: operations['CommunityController_update']; + patch: operations["CommunityController_update"]; }; - '/api/communities/isNameAvailable': { - get: operations['CommunityController_isNameAvailable']; + "/api/communities/isNameAvailable": { + get: operations["CommunityController_isNameAvailable"]; }; - '/api/communities/{id}/discord/link': { + "/api/communities/{id}/discord/link": { /** Link discord to community */ - patch: operations['CommunityController_linkDiscord']; + patch: operations["CommunityController_linkDiscord"]; }; - '/api/quantifications/export/json': { + "/api/quantifications/export/json": { /** Export quantifications document to json */ - get: operations['QuantificationsController_exportJson']; + get: operations["QuantificationsController_exportJson"]; }; - '/api/quantifications/export/csv': { + "/api/quantifications/export/csv": { /** Export quantifications document to csv */ - get: operations['QuantificationsController_exportCsv']; + get: operations["QuantificationsController_exportCsv"]; }; - '/api/quantifications/export/parquet': { + "/api/quantifications/export/parquet": { /** Export quantifications document to parquet */ - get: operations['QuantificationsController_exportParquet']; + get: operations["QuantificationsController_exportParquet"]; }; - '/api/quantifications/multiple': { + "/api/quantifications/multiple": { /** Quantify multiple praise items */ - patch: operations['QuantificationsController_quantifyMultiple']; + patch: operations["QuantificationsController_quantifyMultiple"]; }; - '/api/quantifications/{id}': { + "/api/quantifications/{id}": { /** Quantify praise item by id */ - patch: operations['QuantificationsController_quantify']; + patch: operations["QuantificationsController_quantify"]; }; - '/api/reports': { + "/api/reports": { /** List all report manifests */ - get: operations['ReportsController_listAllReports']; + get: operations["ReportsController_listAllReports"]; }; - '/api/reports/receiverBio/{userAccountId}': { + "/api/reports/receiverBio/{userAccountId}": { /** Get one AI generated receiver bio */ - get: operations['ReportsController_receiverBio']; + get: operations["ReportsController_receiverBio"]; }; - '/api/reports/receiverLabels/{userAccountId}': { + "/api/reports/receiverLabels/{userAccountId}": { /** AI generated labels describing a praise receiver. */ - get: operations['ReportsController_receiverLabels']; + get: operations["ReportsController_receiverLabels"]; }; } @@ -274,17 +275,7 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ( - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB' - )[]; + roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -293,7 +284,7 @@ export interface components { UserAccount: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -316,18 +307,8 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ( - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB' - )[]; - accounts: readonly components['schemas']['UserAccount'][]; + roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; + accounts: readonly (components["schemas"]["UserAccount"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -342,18 +323,8 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ( - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB' - )[]; - accounts: readonly components['schemas']['UserAccount'][]; + roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; + accounts: readonly (components["schemas"]["UserAccount"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -371,16 +342,7 @@ export interface components { }; UpdateUserRoleInputDto: { /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; }; Period: { /** @example 621f802b813dbdba9eeaf7d7 */ @@ -388,7 +350,7 @@ export interface components { /** @example June 2021 */ name: string; /** @enum {string} */ - status: 'OPEN' | 'QUANTIFY' | 'CLOSED'; + status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ endDate: string; /** Format: date-time */ @@ -415,7 +377,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Period'][]; + docs: readonly (components["schemas"]["Period"])[]; meta?: Record; }; Quantification: { @@ -434,12 +396,12 @@ export interface components { /** @example 639b178f19296ee0f2d0585d */ praise: string; /** - * Format: date-time + * Format: date-time * @example 2021-06-01T00:00:00.000Z */ createdAt: string; /** - * Format: date-time + * Format: date-time * @example 2021-06-01T00:00:00.000Z */ updatedAt: string; @@ -459,7 +421,7 @@ export interface components { finishedCount: number; /** @example 1 */ praiseCount: number; - quantifications: components['schemas']['Quantification'][]; + quantifications: (components["schemas"]["Quantification"])[]; }; PeriodDetailsGiverReceiverDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -489,16 +451,16 @@ export interface components { /** @example June 2021 */ name: string; /** @enum {string} */ - status: 'OPEN' | 'QUANTIFY' | 'CLOSED'; + status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ endDate: string; /** Format: date-time */ createdAt: string; /** Format: date-time */ updatedAt: string; - quantifiers?: readonly components['schemas']['PeriodDetailsQuantifierDto'][]; - givers?: readonly components['schemas']['PeriodDetailsGiverReceiverDto'][]; - receivers?: readonly components['schemas']['PeriodDetailsGiverReceiverDto'][]; + quantifiers?: readonly (components["schemas"]["PeriodDetailsQuantifierDto"])[]; + givers?: readonly (components["schemas"]["PeriodDetailsGiverReceiverDto"])[]; + receivers?: readonly (components["schemas"]["PeriodDetailsGiverReceiverDto"])[]; /** @example 543 */ numberOfPraise: number; }; @@ -543,10 +505,10 @@ export interface components { sourceName: string; /** @example 144 */ score: number; - receiver: components['schemas']['UserAccountWithUserRefDto']; - giver: components['schemas']['UserAccountWithUserRefDto']; - forwarder?: components['schemas']['UserAccountWithUserRefDto']; - quantifications: readonly components['schemas']['Quantification'][]; + receiver: components["schemas"]["UserAccountWithUserRefDto"]; + giver: components["schemas"]["UserAccountWithUserRefDto"]; + forwarder?: components["schemas"]["UserAccountWithUserRefDto"]; + quantifications: readonly (components["schemas"]["Quantification"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -554,12 +516,12 @@ export interface components { }; VerifyQuantifierPoolSizeDto: { /** - * @description The number of quantifiers in the pool + * @description The number of quantifiers in the pool * @example 10 */ quantifierPoolSize: number; /** - * @description The number of quantifiers needed in the pool + * @description The number of quantifiers needed in the pool * @example 10 */ quantifierPoolSizeNeeded: number; @@ -585,18 +547,18 @@ export interface components { sourceName: string; /** @example 144 */ score: number; - receiver: components['schemas']['UserAccount']; - giver: components['schemas']['UserAccount']; - forwarder?: components['schemas']['UserAccount']; - quantifications: readonly components['schemas']['Quantification'][]; + receiver: components["schemas"]["UserAccount"]; + giver: components["schemas"]["UserAccount"]; + forwarder?: components["schemas"]["UserAccount"]; + quantifications: readonly (components["schemas"]["Quantification"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ updatedAt: string; }; ReplaceQuantifierResponseDto: { - praises: readonly components['schemas']['Praise'][]; - period: components['schemas']['PeriodDetailsDto']; + praises: readonly (components["schemas"]["Praise"])[]; + period: components["schemas"]["PeriodDetailsDto"]; }; UserAccountNoUserId: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -616,15 +578,7 @@ export interface components { }; EventLogType: { /** @enum {string} */ - key: - | 'PERMISSION' - | 'AUTHENTICATION' - | 'PERIOD' - | 'PRAISE' - | 'QUANTIFICATION' - | 'SETTING' - | 'USER_ACCOUNT' - | 'COMMUNITY'; + key: "PERMISSION" | "AUTHENTICATION" | "PERIOD" | "PRAISE" | "QUANTIFICATION" | "SETTING" | "USER_ACCOUNT" | "COMMUNITY"; /** @example An action that changes user permissions */ label: string; /** @example A user's permissions were changed */ @@ -633,22 +587,22 @@ export interface components { EventLog: { /** @example 621f802b813dbdba9eeaf7d7 */ _id: string; - user?: components['schemas']['User']; - useraccount?: components['schemas']['UserAccountNoUserId']; + user?: components["schemas"]["User"]; + useraccount?: components["schemas"]["UserAccountNoUserId"]; /** @example 621f802b813dbdba9eeaf7d7 */ apiKey?: string; /** @example 621f802b813dbdba9eeaf7d7 */ period?: string; - type: components['schemas']['EventLogType']; + type: components["schemas"]["EventLogType"]; /** @example A description of the event */ description: string; /** - * Format: date-time + * Format: date-time * @example 2023-03-01T22:51:20.012Z */ createdAt: string; /** - * Format: date-time + * Format: date-time * @example 2023-03-01T22:51:20.012Z */ updatedAt: string; @@ -672,7 +626,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['EventLog'][]; + docs: readonly (components["schemas"]["EventLog"])[]; meta?: Record; }; Setting: { @@ -683,21 +637,11 @@ export interface components { /** @example 666 */ value: string; /** @example 666 */ - valueRealized: string | string[] | boolean | number | number[]; + valueRealized: string | (string)[] | boolean | number | (number)[]; /** @example 555 */ defaultValue: string; /** @enum {string} */ - type: - | 'Integer' - | 'Float' - | 'String' - | 'Textarea' - | 'Boolean' - | 'IntegerList' - | 'StringList' - | 'Image' - | 'Radio' - | 'JSON'; + type: "Integer" | "Float" | "String" | "Textarea" | "Boolean" | "IntegerList" | "StringList" | "Image" | "Radio" | "JSON"; /** @example Quantifiers Per Praise */ label: string; /** @example How many redundant quantifications are assigned to each praise? */ @@ -717,12 +661,12 @@ export interface components { PeriodSetting: { /** @example 62291b7ea8b1619f78818524 */ _id: string; - period: components['schemas']['Period']; - setting: components['schemas']['Setting']; + period: components["schemas"]["Period"]; + setting: components["schemas"]["Setting"]; /** @example 666 */ value: string; /** @example 666 */ - valueRealized: string | string[] | boolean | number | number[]; + valueRealized: string | (string)[] | boolean | number | (number)[]; }; SetPeriodSettingDto: { /** @example 666 */ @@ -747,7 +691,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Praise'][]; + docs: readonly (components["schemas"]["Praise"])[]; meta?: Record; }; PraiseCreateInputDto: { @@ -759,8 +703,8 @@ export interface components { sourceId: string; /** @example DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise */ sourceName: string; - receiverIds: string[]; - giver: components['schemas']['UserAccount']; + receiverIds: (string)[]; + giver: components["schemas"]["UserAccount"]; }; PraiseForwardInputDto: { /** @example for making edits in the welcome text */ @@ -771,9 +715,9 @@ export interface components { sourceId: string; /** @example DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise */ sourceName: string; - receiverIds: string[]; - giver: components['schemas']['UserAccount']; - forwarder: components['schemas']['UserAccount']; + receiverIds: (string)[]; + giver: components["schemas"]["UserAccount"]; + forwarder: components["schemas"]["UserAccount"]; }; CreateUserAccountInputDto: { /** @example 098098098098098 */ @@ -792,7 +736,7 @@ export interface components { CreateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -825,7 +769,7 @@ export interface components { UpdateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -845,16 +789,7 @@ export interface components { /** @example My API Key */ description: string; /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; }; CreateApiKeyResponseDto: { /** @example 639b178f19296ee0f2d0585d */ @@ -866,16 +801,7 @@ export interface components { /** @example $2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i */ hash: string; /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -893,16 +819,7 @@ export interface components { /** @example $2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i */ hash: string; /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -936,7 +853,7 @@ export interface components { identityEthAddress: string; /** @example bearer */ tokenType: string; - user: components['schemas']['User']; + user: components["schemas"]["User"]; }; GenerateTokenDto: { /** @example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA */ @@ -957,7 +874,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; }; @@ -978,7 +895,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; /** @example oiujoiuoo8u */ @@ -986,7 +903,7 @@ export interface components { /** @example true */ isPublic: boolean; /** @enum {string} */ - discordLinkState: 'NOT_SET' | 'PENDING' | 'ACTIVE' | 'DEACTIVE'; + discordLinkState: "NOT_SET" | "PENDING" | "ACTIVE" | "DEACTIVE"; }; UpdateCommunityInputDto: { /** @example banklessdao.givepraise.xyz */ @@ -1001,7 +918,7 @@ export interface components { * "0x345.." * ] */ - owners?: string[]; + owners?: (string)[]; }; CommunityPaginatedResponseDto: { /** @example 1200 */ @@ -1022,7 +939,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Community'][]; + docs: readonly (components["schemas"]["Community"])[]; meta?: Record; }; IsNameAvailableResponseDto: { @@ -1040,7 +957,7 @@ export interface components { duplicatePraise?: string; }; QuantifyMultipleInputDto: { - params: components['schemas']['QuantifyInputDto']; + params: components["schemas"]["QuantifyInputDto"]; /** * @example [ * "639b178f19296ee0f2d0585d", @@ -1048,54 +965,56 @@ export interface components { * "639b178f19296ee0f2d0585f" * ] */ - praiseIds: string[]; + praiseIds: (string)[]; }; SettingDto: { /** - * @description Type of the setting - * @example string + * @description Type of the setting + * @example string * @enum {string} */ - type: 'string' | 'number' | 'boolean' | 'array'; + type: "string" | "number" | "boolean" | "array"; /** - * @description Default value for the setting + * @description Default value for the setting * @example Some string */ default: Record; /** - * @description Description of the setting + * @description Description of the setting * @example Description of the string setting */ description: string; /** - * @description Markdown description of the setting + * @description Markdown description of the setting * @example Description of the string setting */ markdownDescription: string; /** - * @description Edit presentation style - * @example multiline + * @description Edit presentation style + * @example multiline * @enum {string} */ - editPresentation?: 'multiline'; + editPresentation?: "multiline"; /** - * @description Order of the setting + * @description Order of the setting * @example 1 */ order: number; /** - * @description Enum values for string type settings + * @description Enum values for string type settings * @example [ * "left", * "right" * ] */ - enum?: string[]; + enum?: (string)[]; items: { type?: Record; }; }; ReportManifestDto: { + /** @example https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json */ + manifestUrl?: string; /** @example simple-report */ name: string; /** @example Simple Report */ @@ -1120,16 +1039,16 @@ export interface components { * "Praise receiver reports" * ] */ - categories: string[]; + categories: (string)[]; /** * @example [ * "toplist" * ] */ - keywords: string[]; + keywords: (string)[]; /** @description Configuration settings for the report */ configuration: { - [key: string]: components['schemas']['SettingDto'] | undefined; + [key: string]: components["schemas"]["SettingDto"] | undefined; }; }; }; @@ -1143,23 +1062,24 @@ export interface components { export type external = Record; export interface operations { + /** Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists. */ ActivateController_activate: { requestBody: { content: { - 'application/json': components['schemas']['ActivateInputDto']; + "application/json": components["schemas"]["ActivateInputDto"]; }; }; responses: { /** @description The created (or updated) user. */ 200: { content: { - 'application/json': components['schemas']['User']; + "application/json": components["schemas"]["User"]; }; }; 201: { content: { - 'application/json': components['schemas']['User']; + "application/json": components["schemas"]["User"]; }; }; }; @@ -1169,7 +1089,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1179,7 +1099,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1189,7 +1109,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1199,7 +1119,7 @@ export interface operations { /** @description All users */ 200: { content: { - 'application/json': components['schemas']['User'][]; + "application/json": (components["schemas"]["User"])[]; }; }; }; @@ -1214,7 +1134,7 @@ export interface operations { /** @description A single user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1228,14 +1148,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateUserRequestDto']; + "application/json": components["schemas"]["UpdateUserRequestDto"]; }; }; responses: { /** @description Updated user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1248,14 +1168,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateUserRoleInputDto']; + "application/json": components["schemas"]["UpdateUserRoleInputDto"]; }; }; responses: { /** @description The updated user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1268,14 +1188,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateUserRoleInputDto']; + "application/json": components["schemas"]["UpdateUserRoleInputDto"]; }; }; responses: { /** @description The updated user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1285,7 +1205,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1295,7 +1215,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1305,7 +1225,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1319,14 +1239,14 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; }; }; responses: { /** @description Periods */ 200: { content: { - 'application/json': components['schemas']['PeriodPaginatedResponseDto']; + "application/json": components["schemas"]["PeriodPaginatedResponseDto"]; }; }; }; @@ -1335,19 +1255,19 @@ export interface operations { PeriodsController_create: { requestBody: { content: { - 'application/json': components['schemas']['CreatePeriodInputDto']; + "application/json": components["schemas"]["CreatePeriodInputDto"]; }; }; responses: { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; 201: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1363,7 +1283,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1377,14 +1297,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdatePeriodInputDto']; + "application/json": components["schemas"]["UpdatePeriodInputDto"]; }; }; responses: { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1400,7 +1320,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1416,7 +1336,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1433,7 +1353,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1450,7 +1370,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1467,7 +1387,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1483,7 +1403,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['VerifyQuantifierPoolSizeDto']; + "application/json": components["schemas"]["VerifyQuantifierPoolSizeDto"]; }; }; }; @@ -1499,7 +1419,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1513,14 +1433,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['ReplaceQuantifierInputDto']; + "application/json": components["schemas"]["ReplaceQuantifierInputDto"]; }; }; responses: { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['ReplaceQuantifierResponseDto']; + "application/json": components["schemas"]["ReplaceQuantifierResponseDto"]; }; }; }; @@ -1534,16 +1454,16 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; search?: string; - types?: string[]; + types?: (string)[]; }; }; responses: { /** @description Paginated event logs */ 200: { content: { - 'application/json': components['schemas']['EventLogPaginatedResponseDto']; + "application/json": components["schemas"]["EventLogPaginatedResponseDto"]; }; }; }; @@ -1554,7 +1474,7 @@ export interface operations { /** @description Event log types */ 200: { content: { - 'application/json': components['schemas']['EventLogType'][]; + "application/json": (components["schemas"]["EventLogType"])[]; }; }; }; @@ -1565,17 +1485,7 @@ export interface operations { query?: { /** @example SETTING_KEY */ key?: string; - type?: - | 'Integer' - | 'Float' - | 'String' - | 'Textarea' - | 'Boolean' - | 'IntegerList' - | 'StringList' - | 'Image' - | 'Radio' - | 'JSON'; + type?: "Integer" | "Float" | "String" | "Textarea" | "Boolean" | "IntegerList" | "StringList" | "Image" | "Radio" | "JSON"; /** @example 0 */ group?: number; /** @example 0 */ @@ -1586,7 +1496,7 @@ export interface operations { /** @description All settings. */ 200: { content: { - 'application/json': components['schemas']['Setting'][]; + "application/json": (components["schemas"]["Setting"])[]; }; }; }; @@ -1602,7 +1512,7 @@ export interface operations { /** @description Setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1616,14 +1526,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['SetSettingDto']; + "application/json": components["schemas"]["SetSettingDto"]; }; }; responses: { /** @description Updated setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1639,7 +1549,7 @@ export interface operations { /** @description Updated setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1654,7 +1564,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': Record; + "application/json": Record; }; }; }; @@ -1670,7 +1580,7 @@ export interface operations { /** @description All period settings */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting'][]; + "application/json": (components["schemas"]["PeriodSetting"])[]; }; }; }; @@ -1687,7 +1597,7 @@ export interface operations { /** @description Period setting */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting']; + "application/json": components["schemas"]["PeriodSetting"]; }; }; }; @@ -1702,14 +1612,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['SetPeriodSettingDto']; + "application/json": components["schemas"]["SetPeriodSettingDto"]; }; }; responses: { /** @description Updated period setting */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting']; + "application/json": components["schemas"]["PeriodSetting"]; }; }; }; @@ -1723,7 +1633,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; giver?: string; receiver?: string; }; @@ -1732,7 +1642,7 @@ export interface operations { /** @description Paginated praise items */ 200: { content: { - 'application/json': components['schemas']['PraisePaginatedResponseDto']; + "application/json": components["schemas"]["PraisePaginatedResponseDto"]; }; }; }; @@ -1741,19 +1651,19 @@ export interface operations { PraiseController_praise: { requestBody: { content: { - 'application/json': components['schemas']['PraiseCreateInputDto']; + "application/json": components["schemas"]["PraiseCreateInputDto"]; }; }; responses: { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; 201: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -1769,7 +1679,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1785,7 +1695,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1801,7 +1711,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1817,7 +1727,7 @@ export interface operations { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; }; @@ -1826,19 +1736,19 @@ export interface operations { PraiseController_forward: { requestBody: { content: { - 'application/json': components['schemas']['PraiseForwardInputDto']; + "application/json": components["schemas"]["PraiseForwardInputDto"]; }; }; responses: { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; 201: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -1858,7 +1768,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1867,13 +1777,13 @@ export interface operations { UserAccountsController_create: { requestBody: { content: { - 'application/json': components['schemas']['CreateUserAccountInputDto']; + "application/json": components["schemas"]["CreateUserAccountInputDto"]; }; }; responses: { 201: { content: { - 'application/json': components['schemas']['CreateUserAccountResponseDto']; + "application/json": components["schemas"]["CreateUserAccountResponseDto"]; }; }; }; @@ -1883,7 +1793,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1893,7 +1803,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1903,7 +1813,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1919,7 +1829,7 @@ export interface operations { /** @description UserAccount */ 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1928,13 +1838,13 @@ export interface operations { UserAccountsController_update: { requestBody: { content: { - 'application/json': components['schemas']['UpdateUserAccountInputDto']; + "application/json": components["schemas"]["UpdateUserAccountInputDto"]; }; }; responses: { 200: { content: { - 'application/json': components['schemas']['UpdateUserAccountResponseDto']; + "application/json": components["schemas"]["UpdateUserAccountResponseDto"]; }; }; }; @@ -1945,7 +1855,7 @@ export interface operations { /** @description Array of API keys */ 200: { content: { - 'application/json': components['schemas']['ApiKey'][]; + "application/json": (components["schemas"]["ApiKey"])[]; }; }; }; @@ -1954,14 +1864,14 @@ export interface operations { ApiKeyController_createApiKey: { requestBody: { content: { - 'application/json': components['schemas']['CreateApiKeyInputDto']; + "application/json": components["schemas"]["CreateApiKeyInputDto"]; }; }; responses: { /** @description API key created */ 201: { content: { - 'application/json': components['schemas']['CreateApiKeyResponseDto']; + "application/json": components["schemas"]["CreateApiKeyResponseDto"]; }; }; }; @@ -1977,7 +1887,7 @@ export interface operations { /** @description An API key */ 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -1991,19 +1901,19 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateDescriptionInputDto']; + "application/json": components["schemas"]["UpdateDescriptionInputDto"]; }; }; responses: { 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; /** @description API key with updated description */ 201: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -2018,13 +1928,13 @@ export interface operations { responses: { 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; /** @description Revoked API key */ 201: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -2034,14 +1944,14 @@ export interface operations { /** @description A request containing the user identityEthAddress */ requestBody: { content: { - 'application/json': components['schemas']['NonceInputDto']; + "application/json": components["schemas"]["NonceInputDto"]; }; }; responses: { /** @description Nonce generated successfully */ 201: { content: { - 'application/json': components['schemas']['NonceResponseDto']; + "application/json": components["schemas"]["NonceResponseDto"]; }; }; }; @@ -2054,20 +1964,20 @@ export interface operations { }; }; /** - * @description A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: - * + * @description A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: + * * ```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\n\nADDRESS:\n[identityEthAddress]\n\nNONCE:\n[nonce]``` */ requestBody: { content: { - 'application/json': components['schemas']['LoginInputDto']; + "application/json": components["schemas"]["LoginInputDto"]; }; }; responses: { /** @description User authenticated successfully */ 201: { content: { - 'application/json': components['schemas']['LoginResponseDto']; + "application/json": components["schemas"]["LoginResponseDto"]; }; }; }; @@ -2081,14 +1991,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['GenerateTokenDto']; + "application/json": components["schemas"]["GenerateTokenDto"]; }; }; responses: { /** @description Tokens generated successfully */ 201: { content: { - 'application/json': components['schemas']['LoginResponseDto']; + "application/json": components["schemas"]["LoginResponseDto"]; }; }; }; @@ -2101,14 +2011,14 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; }; }; responses: { /** @description All communities */ 200: { content: { - 'application/json': components['schemas']['CommunityPaginatedResponseDto']; + "application/json": components["schemas"]["CommunityPaginatedResponseDto"]; }; }; }; @@ -2117,19 +2027,19 @@ export interface operations { CommunityController_create: { requestBody: { content: { - 'application/json': components['schemas']['CreateCommunityInputDto']; + "application/json": components["schemas"]["CreateCommunityInputDto"]; }; }; responses: { /** @description Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; 201: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2144,7 +2054,7 @@ export interface operations { /** @description A single Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2153,14 +2063,14 @@ export interface operations { CommunityController_update: { requestBody: { content: { - 'application/json': components['schemas']['UpdateCommunityInputDto']; + "application/json": components["schemas"]["UpdateCommunityInputDto"]; }; }; responses: { /** @description Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2176,7 +2086,7 @@ export interface operations { /** @description Checking whether the community name is available */ 200: { content: { - 'application/json': components['schemas']['IsNameAvailableResponseDto']; + "application/json": components["schemas"]["IsNameAvailableResponseDto"]; }; }; }; @@ -2185,14 +2095,14 @@ export interface operations { CommunityController_linkDiscord: { requestBody: { content: { - 'application/json': components['schemas']['LinkDiscordBotDto']; + "application/json": components["schemas"]["LinkDiscordBotDto"]; }; }; responses: { /** @description Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2208,7 +2118,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2224,7 +2134,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -2240,7 +2150,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -2249,14 +2159,14 @@ export interface operations { QuantificationsController_quantifyMultiple: { requestBody: { content: { - 'application/json': components['schemas']['QuantifyMultipleInputDto']; + "application/json": components["schemas"]["QuantifyMultipleInputDto"]; }; }; responses: { /** @description Praise items */ 200: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -2270,14 +2180,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['QuantifyInputDto']; + "application/json": components["schemas"]["QuantifyInputDto"]; }; }; responses: { /** @description Praise items */ 200: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -2288,7 +2198,7 @@ export interface operations { /** @description A list of report manifests */ 200: { content: { - 'application/json': components['schemas']['ReportManifestDto'][]; + "application/json": (components["schemas"]["ReportManifestDto"])[]; }; }; /** @description An error occurred while fetching report manifests */ @@ -2306,7 +2216,7 @@ export interface operations { /** @description A receiver bio */ 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2322,7 +2232,7 @@ export interface operations { /** @description Comma separated list of labels, 7 max */ 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; diff --git a/packages/api/openapi.json b/packages/api/openapi.json index c5934dc6d..77684788b 100644 --- a/packages/api/openapi.json +++ b/packages/api/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file +{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file diff --git a/packages/api/src/reports/dto/report-manifest.dto.ts b/packages/api/src/reports/dto/report-manifest.dto.ts index b15ca366f..04993cb1a 100644 --- a/packages/api/src/reports/dto/report-manifest.dto.ts +++ b/packages/api/src/reports/dto/report-manifest.dto.ts @@ -3,6 +3,14 @@ import { SettingDto } from './setting.dto'; @ApiExtraModels(SettingDto) export class ReportManifestDto { + @ApiProperty({ + example: + 'https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json', + type: String, + required: false, + }) + manifestUrl: string; + @ApiProperty({ example: 'simple-report', type: String, diff --git a/packages/api/src/reports/reports.service.ts b/packages/api/src/reports/reports.service.ts index 89255af65..d43730391 100644 --- a/packages/api/src/reports/reports.service.ts +++ b/packages/api/src/reports/reports.service.ts @@ -53,10 +53,11 @@ export class ReportsService { .filter((item: { type: string }) => item.type === 'dir') .map(async (dir: { name: any }) => { try { + const manifestPath = `${this.basePath}/${dir.name}/manifest.json`; const manifest = await this.octokit.repos.getContent({ owner: this.owner, repo: this.repo, - path: `${this.basePath}/${dir.name}/manifest.json`, + path: manifestPath, }); const content = Buffer.from( @@ -64,7 +65,9 @@ export class ReportsService { 'base64', ).toString(); - return JSON.parse(content); + const manifestDto = JSON.parse(content) as ReportManifestDto; + manifestDto.manifestUrl = `https://raw.githubusercontent.com/${this.owner}/${this.repo}/main/${manifestPath}`; + return manifestDto; } catch (error) { throw new ApiException( errorMessages.REPORTS_LIST_ERROR, From de6d3e6e932c0968a4b6f54008c8b06ad69cbb2f Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 21 Jul 2023 12:48:00 +0200 Subject: [PATCH 4/7] Custom report dialog etc --- .../src/model/report/hooks/use-report.hook.ts | 18 ++- .../report/types/use-report-input.type.ts | 2 +- .../src/pages/Reports/ReportsPage.tsx | 77 +++++++++--- .../src/pages/Reports/ReportsRunPage.tsx | 4 +- .../src/pages/Reports/RewardsPage.tsx | 37 +++--- .../Reports/components/CustomReportDialog.tsx | 110 ++++++++++++++++++ .../Reports/components/ReportConfigDialog.tsx | 58 ++++----- .../pages/Reports/components/ReportsTable.tsx | 4 +- 8 files changed, 236 insertions(+), 74 deletions(-) create mode 100644 packages/frontend/src/pages/Reports/components/CustomReportDialog.tsx diff --git a/packages/frontend/src/model/report/hooks/use-report.hook.ts b/packages/frontend/src/model/report/hooks/use-report.hook.ts index 9ba4eefd2..9e26d5eee 100644 --- a/packages/frontend/src/model/report/hooks/use-report.hook.ts +++ b/packages/frontend/src/model/report/hooks/use-report.hook.ts @@ -15,31 +15,26 @@ import { ReportManifestDto } from '../dto/report-manifest.dto'; //lockdown(); -export function useReport(input: useReportInput): UseReportReturn { - const { url: reportUrl, periodId, startDate, endDate } = input; +export function useReport(reportInput: useReportInput): UseReportReturn { + const { manifestUrl, periodId, startDate, endDate } = reportInput; const duckDb = useDuckDbFiltered({ periodId, startDate, endDate }); const periods = useRecoilValue(AllPeriods); const { create: createCompartment } = useCompartment(); const manifest = async (): Promise => { - if (!reportUrl) return; + if (!manifestUrl) return; // Create secure compartment to run report in const compartment = createCompartment(); - // Import report from url - const manifestUrl = `${reportUrl.substring( - 0, - reportUrl.lastIndexOf('/') - )}/manifest.json`; const { namespace } = await compartment.import(manifestUrl); return namespace.default as ReportManifestDto; }; const run = async ( - input: useReportRunInput + runInput: useReportRunInput ): Promise => { - if (!reportUrl) return; - const { format, config: configInput } = input; + if (!manifestUrl) return; + const { format, config: configInput } = runInput; if (!duckDb || !duckDb.db) { throw new Error('DuckDb has not be loaded'); } @@ -69,6 +64,7 @@ export function useReport(input: useReportInput): UseReportReturn { const compartment = createCompartment(); // Import report from url + const reportUrl = manifestUrl.replace('manifest.json', 'report.js'); const { namespace } = await compartment.import(reportUrl); // Create report instance, supplying config and db query object diff --git a/packages/frontend/src/model/report/types/use-report-input.type.ts b/packages/frontend/src/model/report/types/use-report-input.type.ts index a84b2f292..0f5f512fd 100644 --- a/packages/frontend/src/model/report/types/use-report-input.type.ts +++ b/packages/frontend/src/model/report/types/use-report-input.type.ts @@ -1,5 +1,5 @@ export type useReportInput = { - url?: string; + manifestUrl?: string; periodId?: string; startDate?: string; endDate?: string; diff --git a/packages/frontend/src/pages/Reports/ReportsPage.tsx b/packages/frontend/src/pages/Reports/ReportsPage.tsx index 52cd7240c..7a7f3d9e3 100644 --- a/packages/frontend/src/pages/Reports/ReportsPage.tsx +++ b/packages/frontend/src/pages/Reports/ReportsPage.tsx @@ -1,4 +1,4 @@ -import { faTableList } from '@fortawesome/free-solid-svg-icons'; +import { faCogs, faTableList } from '@fortawesome/free-solid-svg-icons'; import { Dialog } from '@headlessui/react'; import React from 'react'; import { Link, useHistory } from 'react-router-dom'; @@ -10,12 +10,15 @@ import { } from '../../components/report/DatePeriodRange'; import { BreadCrumb } from '../../components/ui/BreadCrumb'; import { Page } from '../../components/ui/Page'; -import { SingleReport } from '../../model/report/reports'; import { ReportConfigDialog } from './components/ReportConfigDialog'; import { ReportsTable } from './components/ReportsTable'; import { AllPeriods } from '../../model/periods/periods'; import * as check from 'wasm-check'; import toast from 'react-hot-toast'; +import { Button } from '../../components/ui/Button'; +import { CustomReportDialog } from './components/CustomReportDialog'; +import { ReportManifestDto } from '../../model/report/dto/report-manifest.dto'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; const NoPeriodsMessage = (): JSX.Element | null => { const allPeriods = useRecoilValue(AllPeriods); @@ -30,31 +33,44 @@ const NoPeriodsMessage = (): JSX.Element | null => { const ReportsPage = (): JSX.Element | null => { const [isConfigDialogOpen, setIsConfigDialogOpen] = React.useState(false); - const [selectedReportName, setSelectedReportName] = React.useState(); + const [isCustomReportDialogOpen, setIsCustomReportDialogOpen] = + React.useState(false); const allPeriods = useRecoilValue(AllPeriods); const startDate = useRecoilValue(DatePeriodRangeStartDate); const endDate = useRecoilValue(DatePeriodRangeEndDate); - const report = useRecoilValue(SingleReport(selectedReportName)); + const [reportManifest, setReportManifest] = React.useState< + ReportManifestDto | undefined + >(undefined); + const [manifestUrl, setManifestUrl] = React.useState(''); const history = useHistory(); - const handleReportClick = (name: string) => (): void => { - if (allPeriods.length === 0) return; + const handleReportClick = (manifest: ReportManifestDto) => (): void => { + if (allPeriods.length === 0 || !manifest || !manifest.manifestUrl) return; if (!check.support()) { toast.error( 'Your browser does not support WebAssembly which is required to run reports. Please try a different browser.' ); return; } - setSelectedReportName(name); + setReportManifest(manifest); + setManifestUrl(manifest.manifestUrl); + }; + + const handleCustomReportLoad = ( + url: string, + manifest: ReportManifestDto + ): void => { + setReportManifest(manifest); + setManifestUrl(url); }; const runReport = React.useCallback( - (name: string, config: Record) => { + (manifestUrl: string, config: Record) => { if (!startDate || !endDate) return; const qs = new URLSearchParams({ - report: name, + manifestUrl, ...config, startDate: startDate.toISOString(), endDate: endDate.toISOString(), @@ -65,13 +81,16 @@ const ReportsPage = (): JSX.Element | null => { ); React.useEffect(() => { - if (!selectedReportName || !report) return; - if (report.configuration && Object.keys(report.configuration).length > 0) { + if (!reportManifest) return; + if ( + reportManifest.configuration && + Object.keys(reportManifest.configuration).length > 0 + ) { setIsConfigDialogOpen(true); return; } - runReport(selectedReportName, {}); - }, [endDate, history, selectedReportName, startDate, report, runReport]); + runReport(manifestUrl, {}); + }, [endDate, history, startDate, reportManifest, manifestUrl, runReport]); return ( @@ -79,6 +98,16 @@ const ReportsPage = (): JSX.Element | null => { +
+ +
+
@@ -92,14 +121,30 @@ const ReportsPage = (): JSX.Element | null => {
{ - setSelectedReportName(undefined); + setReportManifest(undefined); + setManifestUrl(''); setIsConfigDialogOpen(false); }} onRun={(config): void => { - runReport(selectedReportName || '', config); + runReport(manifestUrl, config); + }} + /> +
+ + + setIsCustomReportDialogOpen(false)} + className="fixed inset-0 z-10 overflow-y-auto" + > +
+ { + setIsCustomReportDialogOpen(false); }} + onRun={handleCustomReportLoad} />
diff --git a/packages/frontend/src/pages/Reports/ReportsRunPage.tsx b/packages/frontend/src/pages/Reports/ReportsRunPage.tsx index 94f92efd4..f73a97c80 100644 --- a/packages/frontend/src/pages/Reports/ReportsRunPage.tsx +++ b/packages/frontend/src/pages/Reports/ReportsRunPage.tsx @@ -27,9 +27,7 @@ const ReportsRunPage = (): JSX.Element | null => { const report = useReport({ startDate: qs.get('startDate') || undefined, endDate: qs.get('endDate') || undefined, - url: `https://raw.githubusercontent.com/givepraise/reports/main/reports/${qs.get( - 'report' - )}/report.js`, + manifestUrl: `${qs.get('manifestUrl')}`, }); // Run report when report is loaded diff --git a/packages/frontend/src/pages/Reports/RewardsPage.tsx b/packages/frontend/src/pages/Reports/RewardsPage.tsx index 31c119cd4..41afa5b2e 100644 --- a/packages/frontend/src/pages/Reports/RewardsPage.tsx +++ b/packages/frontend/src/pages/Reports/RewardsPage.tsx @@ -16,6 +16,7 @@ import { ReportsTable } from './components/ReportsTable'; import { AllPeriods } from '../../model/periods/periods'; import * as check from 'wasm-check'; import toast from 'react-hot-toast'; +import { ReportManifestDto } from '../../model/report/dto/report-manifest.dto'; const NoPeriodsMessage = (): JSX.Element | null => { const allPeriods = useRecoilValue(AllPeriods); @@ -30,31 +31,33 @@ const NoPeriodsMessage = (): JSX.Element | null => { const RewardsPage = (): JSX.Element | null => { const [isConfigDialogOpen, setIsConfigDialogOpen] = React.useState(false); - const [selectedReportName, setSelectedReportName] = React.useState(); const allPeriods = useRecoilValue(AllPeriods); - const startDate = useRecoilValue(DatePeriodRangeStartDate); const endDate = useRecoilValue(DatePeriodRangeEndDate); - const report = useRecoilValue(SingleReport(selectedReportName)); + const [reportManifest, setReportManifest] = React.useState< + ReportManifestDto | undefined + >(undefined); + const [manifestUrl, setManifestUrl] = React.useState(''); const history = useHistory(); - const handleReportClick = (name: string) => (): void => { - if (allPeriods.length === 0) return; + const handleReportClick = (manifest: ReportManifestDto) => (): void => { + if (allPeriods.length === 0 || !manifest || !manifest.manifestUrl) return; if (!check.support()) { toast.error( 'Your browser does not support WebAssembly which is required to run reports. Please try a different browser.' ); return; } - setSelectedReportName(name); + setReportManifest(manifest); + setManifestUrl(manifest.manifestUrl); }; const runReport = React.useCallback( - (name: string, config: Record) => { + (manifestUrl: string, config: Record) => { if (!startDate || !endDate) return; const qs = new URLSearchParams({ - report: name, + manifestUrl, ...config, startDate: startDate.toISOString(), endDate: endDate.toISOString(), @@ -65,13 +68,16 @@ const RewardsPage = (): JSX.Element | null => { ); React.useEffect(() => { - if (!selectedReportName || !report) return; - if (report.configuration && Object.keys(report.configuration).length > 0) { + if (!reportManifest || !manifestUrl) return; + if ( + reportManifest.configuration && + Object.keys(reportManifest.configuration).length > 0 + ) { setIsConfigDialogOpen(true); return; } - runReport(selectedReportName, {}); - }, [endDate, history, selectedReportName, startDate, report, runReport]); + runReport(manifestUrl, {}); + }, [endDate, history, startDate, reportManifest, manifestUrl, runReport]); return ( @@ -93,13 +99,14 @@ const RewardsPage = (): JSX.Element | null => {
{ - setSelectedReportName(undefined); + setReportManifest(undefined); + setManifestUrl(''); setIsConfigDialogOpen(false); }} onRun={(config): void => { - runReport(selectedReportName || '', config); + runReport(manifestUrl, config); }} />
diff --git a/packages/frontend/src/pages/Reports/components/CustomReportDialog.tsx b/packages/frontend/src/pages/Reports/components/CustomReportDialog.tsx new file mode 100644 index 000000000..eb2b972d7 --- /dev/null +++ b/packages/frontend/src/pages/Reports/components/CustomReportDialog.tsx @@ -0,0 +1,110 @@ +import { + faCogs, + faFileDownload, + faTimes, +} from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { Dialog } from '@headlessui/react'; +import React from 'react'; +import { Button } from '@/components/ui/Button'; +import { makeClient } from '../../../utils/axios'; +import { ReportManifestDto } from '../../../model/report/dto/report-manifest.dto'; +import { isResponseAxiosError } from '../../../model/api'; + +interface ReportConfigDialogProps { + onClose(): void; + onRun(url: string, manifest: ReportManifestDto): void; +} + +export const CustomReportDialog = ({ + onClose, + onRun, +}: ReportConfigDialogProps): JSX.Element => { + const [url, setUrl] = React.useState(''); + const [error, setError] = React.useState(''); + + const handleUrlChange = (event): void => { + setUrl(event.target.value); + }; + + const onButtonClick = async (): Promise => { + setError(''); + const client = makeClient(); + const response = await client.get(url); + if (isResponseAxiosError(response)) { + setError( + `Unabe to load report. ${response.response?.status || ''} ${ + response.response?.statusText || '' + } ` + ); + return; + } + if (!response.data || !response.data.configuration || !response.data.name) { + setError('Invalid report manifest.'); + return; + } + onRun(url, response.data); + onClose(); + }; + + return ( +
+ +
+
+ +
+
+
+ +
+ + Run Custom Report + + +
+ You can run custom reports by providing a full manifest url. The{' '} + report.js is assumed to be located in the same + directory as the manifest file. The easiest way to get started + creating custom reports is to fork the{' '} + + Praise reports repository + + . +
+
+ + + {error &&
{error}
} +
+ +
+ +
+
+
+
+ ); +}; diff --git a/packages/frontend/src/pages/Reports/components/ReportConfigDialog.tsx b/packages/frontend/src/pages/Reports/components/ReportConfigDialog.tsx index ed0cec650..d547e5f30 100644 --- a/packages/frontend/src/pages/Reports/components/ReportConfigDialog.tsx +++ b/packages/frontend/src/pages/Reports/components/ReportConfigDialog.tsx @@ -11,23 +11,21 @@ import { Link } from 'react-router-dom'; import { Button } from '@/components/ui/Button'; import { SingleSetting } from '@/model/settings/settings'; import toast from 'react-hot-toast'; -import { SingleReport } from '../../../model/report/reports'; +import { ReportManifestDto } from '../../../model/report/dto/report-manifest.dto'; interface ReportConfigDialogProps { title: string; - reportName?: string; + manifest?: ReportManifestDto; onClose(): void; onRun(config: Record): void; } export const ReportConfigDialog = ({ title, - reportName, + manifest, onClose, onRun, }: ReportConfigDialogProps): JSX.Element => { - const report = useRecoilValue(SingleReport(reportName)); - // Store local changes to the config const [config, setConfig] = React.useState(); @@ -38,16 +36,16 @@ export const ReportConfigDialog = ({ // Set local state when default export context has been loaded React.useEffect(() => { - if (!report) return; + if (!manifest) return; // eslint-disable-next-line @typescript-eslint/no-explicit-any const reportDefaults = {} as any; - Object.keys(report.configuration).forEach((key) => { - reportDefaults[key] = report.configuration[key]?.default; + Object.keys(manifest.configuration).forEach((key) => { + reportDefaults[key] = manifest.configuration[key]?.default; }); setConfig(JSON.stringify(reportDefaults, null, 2)); - }, [report]); + }, [manifest]); // How much of the distribution should go to the development team const csSupportPercentage = useRecoilValue( @@ -71,7 +69,7 @@ export const ReportConfigDialog = ({ return (
-
+