From 258bce8474f1311cdaaa07a68a58ed3e1393d24c Mon Sep 17 00:00:00 2001 From: Kristofer Date: Fri, 18 Aug 2023 09:54:50 +0200 Subject: [PATCH 1/8] Adds /communities/current endpoint --- packages/api-types/out/schema.ts | 743 ++++++++---------- packages/api/openapi.json | 2 +- .../api/src/community/community.controller.ts | 25 +- .../api/src/community/community.service.ts | 11 +- .../src/community/dto/find-all-query.dto.ts | 13 + ...-model.dto.ts => find-all-response.dto.ts} | 2 +- 6 files changed, 373 insertions(+), 423 deletions(-) create mode 100644 packages/api/src/community/dto/find-all-query.dto.ts rename packages/api/src/community/dto/{community-pagination-model.dto.ts => find-all-response.dto.ts} (81%) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index c9f856a66..9984f1cfa 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -3,253 +3,257 @@ * 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/current": { + get: operations["CommunityController_current"]; }; - '/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 +278,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 +287,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 +310,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 +326,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 +345,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 +353,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 +380,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 +399,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 +424,7 @@ export interface components { finishedCount: number; /** @example 1 */ praiseCount: number; - quantifications: components['schemas']['Quantification'][]; + quantifications: (components["schemas"]["Quantification"])[]; }; PeriodDetailsGiverReceiverDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -489,16 +454,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 +508,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 +519,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 +550,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 +581,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 +590,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 +629,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 +640,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 +664,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 +694,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 +706,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 +718,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 +739,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 +772,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 +792,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 +804,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 +822,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 +856,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 +877,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; }; @@ -978,7 +898,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; /** @example oiujoiuoo8u */ @@ -986,7 +906,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,9 +921,9 @@ export interface components { * "0x345.." * ] */ - owners?: string[]; + owners?: (string)[]; }; - CommunityPaginatedResponseDto: { + CommunityFindAllResponseDto: { /** @example 1200 */ totalDocs: number; /** @example 10 */ @@ -1022,7 +942,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 +960,7 @@ export interface components { duplicatePraise?: string; }; QuantifyMultipleInputDto: { - params: components['schemas']['QuantifyInputDto']; + params: components["schemas"]["QuantifyInputDto"]; /** * @example [ * "639b178f19296ee0f2d0585d", @@ -1048,59 +968,59 @@ export interface components { * "639b178f19296ee0f2d0585f" * ] */ - praiseIds: string[]; + praiseIds: (string)[]; }; ConfigurationValueItemsDto: { /** - * @description Allowed array types - * @example string + * @description Allowed array types + * @example string * @enum {string} */ - type: 'string' | 'number'; + type: "string" | "number"; }; ConfigurationValueDto: { /** - * @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 666 */ - default: number | string | boolean | number[] | string[]; + default: number | string | boolean | (number)[] | (string)[]; /** - * @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)[]; /** @description Defines the type of items for array settings */ - items?: components['schemas']['ConfigurationValueItemsDto']; + items?: components["schemas"]["ConfigurationValueItemsDto"]; }; ReportManifestDto: { /** @example https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json */ @@ -1129,18 +1049,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']['ConfigurationValueDto'] - | undefined; + [key: string]: components["schemas"]["ConfigurationValueDto"] | undefined; }; }; }; @@ -1154,23 +1072,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"]; }; }; }; @@ -1180,7 +1099,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1190,7 +1109,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1200,7 +1119,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1210,7 +1129,7 @@ export interface operations { /** @description All users */ 200: { content: { - 'application/json': components['schemas']['User'][]; + "application/json": (components["schemas"]["User"])[]; }; }; }; @@ -1225,7 +1144,7 @@ export interface operations { /** @description A single user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1239,14 +1158,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"]; }; }; }; @@ -1259,14 +1178,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"]; }; }; }; @@ -1279,14 +1198,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"]; }; }; }; @@ -1296,7 +1215,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1306,7 +1225,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1316,7 +1235,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1330,14 +1249,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"]; }; }; }; @@ -1346,19 +1265,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"]; }; }; }; @@ -1374,7 +1293,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1388,14 +1307,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"]; }; }; }; @@ -1411,7 +1330,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1427,7 +1346,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1444,7 +1363,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1461,7 +1380,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1478,7 +1397,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1494,7 +1413,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['VerifyQuantifierPoolSizeDto']; + "application/json": components["schemas"]["VerifyQuantifierPoolSizeDto"]; }; }; }; @@ -1510,7 +1429,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1524,14 +1443,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"]; }; }; }; @@ -1545,16 +1464,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"]; }; }; }; @@ -1565,7 +1484,7 @@ export interface operations { /** @description Event log types */ 200: { content: { - 'application/json': components['schemas']['EventLogType'][]; + "application/json": (components["schemas"]["EventLogType"])[]; }; }; }; @@ -1576,17 +1495,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 */ @@ -1597,7 +1506,7 @@ export interface operations { /** @description All settings. */ 200: { content: { - 'application/json': components['schemas']['Setting'][]; + "application/json": (components["schemas"]["Setting"])[]; }; }; }; @@ -1613,7 +1522,7 @@ export interface operations { /** @description Setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1627,14 +1536,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"]; }; }; }; @@ -1650,7 +1559,7 @@ export interface operations { /** @description Updated setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1665,7 +1574,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': Record; + "application/json": Record; }; }; }; @@ -1681,7 +1590,7 @@ export interface operations { /** @description All period settings */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting'][]; + "application/json": (components["schemas"]["PeriodSetting"])[]; }; }; }; @@ -1698,7 +1607,7 @@ export interface operations { /** @description Period setting */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting']; + "application/json": components["schemas"]["PeriodSetting"]; }; }; }; @@ -1713,14 +1622,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"]; }; }; }; @@ -1734,7 +1643,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; giver?: string; receiver?: string; }; @@ -1743,7 +1652,7 @@ export interface operations { /** @description Paginated praise items */ 200: { content: { - 'application/json': components['schemas']['PraisePaginatedResponseDto']; + "application/json": components["schemas"]["PraisePaginatedResponseDto"]; }; }; }; @@ -1752,19 +1661,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"])[]; }; }; }; @@ -1780,7 +1689,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1796,7 +1705,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1812,7 +1721,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1828,7 +1737,7 @@ export interface operations { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; }; @@ -1837,19 +1746,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"])[]; }; }; }; @@ -1869,7 +1778,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1878,13 +1787,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"]; }; }; }; @@ -1894,7 +1803,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1904,7 +1813,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1914,7 +1823,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1930,7 +1839,7 @@ export interface operations { /** @description UserAccount */ 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1939,13 +1848,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"]; }; }; }; @@ -1956,7 +1865,7 @@ export interface operations { /** @description Array of API keys */ 200: { content: { - 'application/json': components['schemas']['ApiKey'][]; + "application/json": (components["schemas"]["ApiKey"])[]; }; }; }; @@ -1965,14 +1874,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"]; }; }; }; @@ -1988,7 +1897,7 @@ export interface operations { /** @description An API key */ 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -2002,19 +1911,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"]; }; }; }; @@ -2029,13 +1938,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"]; }; }; }; @@ -2045,14 +1954,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"]; }; }; }; @@ -2065,20 +1974,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"]; }; }; }; @@ -2092,14 +2001,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"]; }; }; }; @@ -2112,14 +2021,16 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; + /** @example hostname.givepraise.xyz */ + hostname?: string; }; }; responses: { /** @description All communities */ 200: { content: { - 'application/json': components['schemas']['CommunityPaginatedResponseDto']; + "application/json": components["schemas"]["CommunityFindAllResponseDto"]; }; }; }; @@ -2128,19 +2039,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"]; }; }; }; @@ -2155,7 +2066,7 @@ export interface operations { /** @description A single Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2164,14 +2075,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"]; }; }; }; @@ -2187,7 +2098,17 @@ export interface operations { /** @description Checking whether the community name is available */ 200: { content: { - 'application/json': components['schemas']['IsNameAvailableResponseDto']; + "application/json": components["schemas"]["IsNameAvailableResponseDto"]; + }; + }; + }; + }; + CommunityController_current: { + responses: { + /** @description Returns the current community, based on hostname */ + 200: { + content: { + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2196,14 +2117,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"]; }; }; }; @@ -2219,7 +2140,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2235,7 +2156,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -2251,7 +2172,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -2260,14 +2181,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"])[]; }; }; }; @@ -2281,14 +2202,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"])[]; }; }; }; @@ -2299,7 +2220,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 */ @@ -2317,7 +2238,7 @@ export interface operations { /** @description A receiver bio */ 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2333,7 +2254,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 e769b1828..fe8359baa 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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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"]},"ConfigurationValueItemsDto":{"type":"object","properties":{"type":{"type":"string","description":"Allowed array types","enum":["string","number"],"example":"string"}},"required":["type"]},"ConfigurationValueDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"description":"Default value for the setting","example":666,"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"number"}},{"type":"array","items":{"type":"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":{"description":"Defines the type of items for array settings","allOf":[{"$ref":"#/components/schemas/ConfigurationValueItemsDto"}]}},"required":["type","default","description"]},"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/ConfigurationValueDto"}]}}},"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":2,"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"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityFindAllResponseDto"}}}}},"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/current":{"get":{"operationId":"CommunityController_current","parameters":[],"responses":{"200":{"description":"Returns the current community, based on hostname","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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"}}}},"CommunityFindAllResponseDto":{"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"]},"ConfigurationValueItemsDto":{"type":"object","properties":{"type":{"type":"string","description":"Allowed array types","enum":["string","number"],"example":"string"}},"required":["type"]},"ConfigurationValueDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"description":"Default value for the setting","example":666,"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"number"}},{"type":"array","items":{"type":"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":{"description":"Defines the type of items for array settings","allOf":[{"$ref":"#/components/schemas/ConfigurationValueItemsDto"}]}},"required":["type","default","description"]},"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/ConfigurationValueDto"}]}}},"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/community/community.controller.ts b/packages/api/src/community/community.controller.ts index 5a4e241d9..8f279d89c 100644 --- a/packages/api/src/community/community.controller.ts +++ b/packages/api/src/community/community.controller.ts @@ -6,6 +6,7 @@ import { Patch, Post, Query, + Req, SerializeOptions, UseInterceptors, } from '@nestjs/common'; @@ -15,8 +16,7 @@ import { Permission } from '../auth/enums/permission.enum'; import { Community } from './schemas/community.schema'; import { MongooseClassSerializerInterceptor } from '../shared/interceptors/mongoose-class-serializer.interceptor'; import { ObjectIdPipe } from '../shared/pipes/object-id.pipe'; -import { CommunityPaginatedResponseDto } from './dto/community-pagination-model.dto'; -import { PaginatedQueryDto } from '../shared/dto/pagination-query.dto'; +import { CommunityFindAllResponseDto } from './dto/find-all-response.dto'; import { ObjectId, Types } from 'mongoose'; import { Permissions } from '../auth/decorators/permissions.decorator'; import { CreateCommunityInputDto } from './dto/create-community-input.dto'; @@ -29,6 +29,9 @@ import { IsNameAvailableResponseDto } from './dto/is-name-available-response-dto import { IsNameAvailableRequestDto } from './dto/is-name-available-request-dto'; import { EventLogService } from '../event-log/event-log.service'; import { EventLogTypeKey } from '../event-log/enums/event-log-type-key'; +import { CommunityFindAllQueryDto } from './dto/find-all-query.dto'; +import { Public } from '../shared/decorators/public.decorator'; +import { Request } from 'express'; @Controller('communities') @ApiTags('Communities') @@ -78,12 +81,12 @@ export class CommunityController { @ApiResponse({ status: 200, description: 'All communities', - type: CommunityPaginatedResponseDto, + type: CommunityFindAllResponseDto, }) @UseInterceptors(MongooseClassSerializerInterceptor(Community)) async findAll( - @Query() options: PaginatedQueryDto, - ): Promise { + @Query() options: CommunityFindAllQueryDto, + ): Promise { return this.communityService.findAllPaginated(options); } @@ -99,6 +102,18 @@ export class CommunityController { return await this.communityService.isCommunityNameAvailable(options.name); } + @Get('/current') + @Public() + @ApiResponse({ + status: 200, + description: 'Returns the current community, based on hostname', + type: Community, + }) + @UseInterceptors(MongooseClassSerializerInterceptor(Community)) + async current(@Req() req: Request): Promise { + return this.communityService.findOne({ host: req.hostname }); + } + @Get(':id') @Permissions(Permission.CommunitiesView) @ApiResponse({ diff --git a/packages/api/src/community/community.service.ts b/packages/api/src/community/community.service.ts index 484fd1c08..d7568baf2 100644 --- a/packages/api/src/community/community.service.ts +++ b/packages/api/src/community/community.service.ts @@ -3,8 +3,7 @@ import { InjectConnection, InjectModel } from '@nestjs/mongoose'; import { Connection, Types } from 'mongoose'; import { ApiException } from '../shared/exceptions/api-exception'; import { Community } from './schemas/community.schema'; -import { PaginatedQueryDto } from '../shared/dto/pagination-query.dto'; -import { CommunityPaginatedResponseDto } from './dto/community-pagination-model.dto'; +import { CommunityFindAllResponseDto } from './dto/find-all-response.dto'; import { CreateCommunityInputDto } from './dto/create-community-input.dto'; import { UpdateCommunityInputDto } from './dto/update-community-input.dto'; import { LinkDiscordBotDto } from './dto/link-discord-bot.dto'; @@ -20,6 +19,7 @@ import { databaseExists } from '../database/utils/database-exists'; import { hostNameToDbName } from '../database/utils/host-name-to-db-name'; import { PaginateModel } from '../shared/interfaces/paginate-model.interface'; import { IsNameAvailableResponseDto } from './dto/is-name-available-response-dto'; +import { CommunityFindAllQueryDto } from './dto/find-all-query.dto'; @Injectable() export class CommunityService { @@ -56,10 +56,11 @@ export class CommunityService { * @returns */ async findAllPaginated( - options: PaginatedQueryDto, - ): Promise { + options: CommunityFindAllQueryDto, + ): Promise { const { sortColumn, sortType } = options; - const query = {} as any; + const { hostname } = options; + const query = options.hostname ? { hostname } : {}; // Sorting - defaults to descending const sort = diff --git a/packages/api/src/community/dto/find-all-query.dto.ts b/packages/api/src/community/dto/find-all-query.dto.ts new file mode 100644 index 000000000..a459858a8 --- /dev/null +++ b/packages/api/src/community/dto/find-all-query.dto.ts @@ -0,0 +1,13 @@ +import { ApiProperty } from '@nestjs/swagger'; +import { PaginatedQueryDto } from '../../shared/dto/pagination-query.dto'; +import { IsOptional } from 'class-validator'; + +export class CommunityFindAllQueryDto extends PaginatedQueryDto { + @ApiProperty({ + required: false, + type: 'string', + example: 'hostname.givepraise.xyz', + }) + @IsOptional() + hostname?: string; +} diff --git a/packages/api/src/community/dto/community-pagination-model.dto.ts b/packages/api/src/community/dto/find-all-response.dto.ts similarity index 81% rename from packages/api/src/community/dto/community-pagination-model.dto.ts rename to packages/api/src/community/dto/find-all-response.dto.ts index b59e639e7..465a7bb4b 100644 --- a/packages/api/src/community/dto/community-pagination-model.dto.ts +++ b/packages/api/src/community/dto/find-all-response.dto.ts @@ -3,7 +3,7 @@ import { Type } from 'class-transformer'; import { PaginatedResponseDto } from '../../shared/dto/paginated-response.dto'; import { Community } from '../schemas/community.schema'; -export class CommunityPaginatedResponseDto extends PaginatedResponseDto { +export class CommunityFindAllResponseDto extends PaginatedResponseDto { @ApiResponseProperty({ type: [Community], }) From 4c0975610223d7d473ee3f5f5f31bc0b67ecdb4a Mon Sep 17 00:00:00 2001 From: Kristofer Date: Fri, 18 Aug 2023 10:19:28 +0200 Subject: [PATCH 2/8] Add recoils selectors for current community --- .../frontend/src/model/community/community.ts | 26 +++++++++++++++++++ .../src/model/community/dto/community.dto.ts | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 packages/frontend/src/model/community/community.ts create mode 100644 packages/frontend/src/model/community/dto/community.dto.ts diff --git a/packages/frontend/src/model/community/community.ts b/packages/frontend/src/model/community/community.ts new file mode 100644 index 000000000..bf15ac07f --- /dev/null +++ b/packages/frontend/src/model/community/community.ts @@ -0,0 +1,26 @@ +import { AxiosError, AxiosResponse } from 'axios'; +import { selector } from 'recoil'; +import { ApiGet, isResponseOk } from '../api'; +import { Community } from './dto/community.dto'; + +export const CurrentCommunityQuery = selector({ + key: 'CurrentCommunity', + get: ({ get }): AxiosResponse | AxiosError => { + return get(ApiGet({ url: '/communities/current' })) as + | AxiosResponse + | AxiosError; + }, +}); + +export const CurrentCommunity = selector({ + key: 'AllReports', + get: ({ get }): Community | undefined => { + const response = get(CurrentCommunityQuery); + + if (isResponseOk(response)) { + return response.data; + } + + return; + }, +}); diff --git a/packages/frontend/src/model/community/dto/community.dto.ts b/packages/frontend/src/model/community/dto/community.dto.ts new file mode 100644 index 000000000..1a2898b44 --- /dev/null +++ b/packages/frontend/src/model/community/dto/community.dto.ts @@ -0,0 +1,3 @@ +import { components } from 'api-types'; + +export type Community = components['schemas']['Community']; From ba4bd16143543c361756456fc1163ea43cb58161 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Fri, 18 Aug 2023 10:20:00 +0200 Subject: [PATCH 3/8] Display community details on settings page --- .../components/ApplicationSettings.tsx | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/pages/Settings/components/ApplicationSettings.tsx b/packages/frontend/src/pages/Settings/components/ApplicationSettings.tsx index e51b81070..bb646b4c2 100644 --- a/packages/frontend/src/pages/Settings/components/ApplicationSettings.tsx +++ b/packages/frontend/src/pages/Settings/components/ApplicationSettings.tsx @@ -4,6 +4,8 @@ import { Box } from '@/components/ui/Box'; import { SettingsSubgroup } from './SettingsSubgroup'; import ApplicationSettingsApiKeys from './ApplicationSettingsApiKeys'; import { Setting as SettingDto } from '@/model/settings/dto/setting.dto'; +import { useRecoilValue } from 'recoil'; +import { CurrentCommunity } from '../../../model/community/community'; interface Params { settings: SettingDto[] | undefined; @@ -16,13 +18,29 @@ export const ApplicationSettings = ({ settings, parentOnSubmit, }: Params): JSX.Element | null => { + const community = useRecoilValue(CurrentCommunity); if (!settings) return null; - return ( <> - + <> +
+
+ +
{community?.creator}
+
+
+ +
+ {community?.owners.map((owner) => ( +
{owner}
+ ))} +
+
+
+ +
From 8d479c24884d5dbd1a5a7573a3080e800de81cdc Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 18 Aug 2023 08:25:53 +0000 Subject: [PATCH 4/8] Build openapi schema --- packages/api-types/out/schema.ts | 732 +++++++++++++++++-------------- 1 file changed, 413 insertions(+), 319 deletions(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index 9984f1cfa..406045fd3 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -3,257 +3,256 @@ * 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/current": { - get: operations["CommunityController_current"]; + '/api/communities/current': { + get: operations['CommunityController_current']; }; - "/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']; }; } @@ -278,7 +277,17 @@ 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 */ @@ -287,7 +296,7 @@ export interface components { UserAccount: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components["schemas"]["UserNoUserAccountsDto"]; + user?: components['schemas']['UserNoUserAccountsDto']; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -310,8 +319,18 @@ 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 */ @@ -326,8 +345,18 @@ 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 */ @@ -345,7 +374,16 @@ 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 */ @@ -353,7 +391,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 */ @@ -380,7 +418,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly (components["schemas"]["Period"])[]; + docs: readonly components['schemas']['Period'][]; meta?: Record; }; Quantification: { @@ -399,12 +437,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; @@ -424,7 +462,7 @@ export interface components { finishedCount: number; /** @example 1 */ praiseCount: number; - quantifications: (components["schemas"]["Quantification"])[]; + quantifications: components['schemas']['Quantification'][]; }; PeriodDetailsGiverReceiverDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -454,16 +492,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; }; @@ -508,10 +546,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 */ @@ -519,12 +557,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; @@ -550,18 +588,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 */ @@ -581,7 +619,15 @@ 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 */ @@ -590,22 +636,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; @@ -629,7 +675,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly (components["schemas"]["EventLog"])[]; + docs: readonly components['schemas']['EventLog'][]; meta?: Record; }; Setting: { @@ -640,11 +686,21 @@ 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? */ @@ -664,12 +720,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 */ @@ -694,7 +750,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly (components["schemas"]["Praise"])[]; + docs: readonly components['schemas']['Praise'][]; meta?: Record; }; PraiseCreateInputDto: { @@ -706,8 +762,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 */ @@ -718,9 +774,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 */ @@ -739,7 +795,7 @@ export interface components { CreateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components["schemas"]["UserNoUserAccountsDto"]; + user?: components['schemas']['UserNoUserAccountsDto']; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -772,7 +828,7 @@ export interface components { UpdateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components["schemas"]["UserNoUserAccountsDto"]; + user?: components['schemas']['UserNoUserAccountsDto']; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -792,7 +848,16 @@ 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 */ @@ -804,7 +869,16 @@ 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 */ @@ -822,7 +896,16 @@ 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 */ @@ -856,7 +939,7 @@ export interface components { identityEthAddress: string; /** @example bearer */ tokenType: string; - user: components["schemas"]["User"]; + user: components['schemas']['User']; }; GenerateTokenDto: { /** @example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA */ @@ -877,7 +960,7 @@ export interface components { * "0x345.." * ] */ - owners: (string)[]; + owners: string[]; /** @example 0980987846534 */ discordGuildId?: string; }; @@ -898,7 +981,7 @@ export interface components { * "0x345.." * ] */ - owners: (string)[]; + owners: string[]; /** @example 0980987846534 */ discordGuildId?: string; /** @example oiujoiuoo8u */ @@ -906,7 +989,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 */ @@ -921,7 +1004,7 @@ export interface components { * "0x345.." * ] */ - owners?: (string)[]; + owners?: string[]; }; CommunityFindAllResponseDto: { /** @example 1200 */ @@ -942,7 +1025,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly (components["schemas"]["Community"])[]; + docs: readonly components['schemas']['Community'][]; meta?: Record; }; IsNameAvailableResponseDto: { @@ -960,7 +1043,7 @@ export interface components { duplicatePraise?: string; }; QuantifyMultipleInputDto: { - params: components["schemas"]["QuantifyInputDto"]; + params: components['schemas']['QuantifyInputDto']; /** * @example [ * "639b178f19296ee0f2d0585d", @@ -968,59 +1051,59 @@ export interface components { * "639b178f19296ee0f2d0585f" * ] */ - praiseIds: (string)[]; + praiseIds: string[]; }; ConfigurationValueItemsDto: { /** - * @description Allowed array types - * @example string + * @description Allowed array types + * @example string * @enum {string} */ - type: "string" | "number"; + type: 'string' | 'number'; }; ConfigurationValueDto: { /** - * @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 666 */ - default: number | string | boolean | (number)[] | (string)[]; + default: number | string | boolean | number[] | string[]; /** - * @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[]; /** @description Defines the type of items for array settings */ - items?: components["schemas"]["ConfigurationValueItemsDto"]; + items?: components['schemas']['ConfigurationValueItemsDto']; }; ReportManifestDto: { /** @example https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json */ @@ -1049,16 +1132,18 @@ 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"]["ConfigurationValueDto"] | undefined; + [key: string]: + | components['schemas']['ConfigurationValueDto'] + | undefined; }; }; }; @@ -1072,24 +1157,23 @@ 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']; }; }; }; @@ -1099,7 +1183,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -1109,7 +1193,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -1119,7 +1203,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -1129,7 +1213,7 @@ export interface operations { /** @description All users */ 200: { content: { - "application/json": (components["schemas"]["User"])[]; + 'application/json': components['schemas']['User'][]; }; }; }; @@ -1144,7 +1228,7 @@ export interface operations { /** @description A single user */ 200: { content: { - "application/json": components["schemas"]["UserWithStatsDto"]; + 'application/json': components['schemas']['UserWithStatsDto']; }; }; }; @@ -1158,14 +1242,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']; }; }; }; @@ -1178,14 +1262,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']; }; }; }; @@ -1198,14 +1282,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']; }; }; }; @@ -1215,7 +1299,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -1225,7 +1309,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -1235,7 +1319,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -1249,14 +1333,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']; }; }; }; @@ -1265,19 +1349,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']; }; }; }; @@ -1293,7 +1377,7 @@ export interface operations { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["PeriodDetailsDto"]; + 'application/json': components['schemas']['PeriodDetailsDto']; }; }; }; @@ -1307,14 +1391,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']; }; }; }; @@ -1330,7 +1414,7 @@ export interface operations { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["PeriodDetailsDto"]; + 'application/json': components['schemas']['PeriodDetailsDto']; }; }; }; @@ -1346,7 +1430,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; + 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; }; }; }; @@ -1363,7 +1447,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; + 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; }; }; }; @@ -1380,7 +1464,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; + 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; }; }; }; @@ -1397,7 +1481,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; + 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; }; }; }; @@ -1413,7 +1497,7 @@ export interface operations { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["VerifyQuantifierPoolSizeDto"]; + 'application/json': components['schemas']['VerifyQuantifierPoolSizeDto']; }; }; }; @@ -1429,7 +1513,7 @@ export interface operations { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["PeriodDetailsDto"]; + 'application/json': components['schemas']['PeriodDetailsDto']; }; }; }; @@ -1443,14 +1527,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']; }; }; }; @@ -1464,16 +1548,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']; }; }; }; @@ -1484,7 +1568,7 @@ export interface operations { /** @description Event log types */ 200: { content: { - "application/json": (components["schemas"]["EventLogType"])[]; + 'application/json': components['schemas']['EventLogType'][]; }; }; }; @@ -1495,7 +1579,17 @@ 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 */ @@ -1506,7 +1600,7 @@ export interface operations { /** @description All settings. */ 200: { content: { - "application/json": (components["schemas"]["Setting"])[]; + 'application/json': components['schemas']['Setting'][]; }; }; }; @@ -1522,7 +1616,7 @@ export interface operations { /** @description Setting. */ 200: { content: { - "application/json": components["schemas"]["Setting"]; + 'application/json': components['schemas']['Setting']; }; }; }; @@ -1536,14 +1630,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']; }; }; }; @@ -1559,7 +1653,7 @@ export interface operations { /** @description Updated setting. */ 200: { content: { - "application/json": components["schemas"]["Setting"]; + 'application/json': components['schemas']['Setting']; }; }; }; @@ -1574,7 +1668,7 @@ export interface operations { responses: { 200: { content: { - "application/json": Record; + 'application/json': Record; }; }; }; @@ -1590,7 +1684,7 @@ export interface operations { /** @description All period settings */ 200: { content: { - "application/json": (components["schemas"]["PeriodSetting"])[]; + 'application/json': components['schemas']['PeriodSetting'][]; }; }; }; @@ -1607,7 +1701,7 @@ export interface operations { /** @description Period setting */ 200: { content: { - "application/json": components["schemas"]["PeriodSetting"]; + 'application/json': components['schemas']['PeriodSetting']; }; }; }; @@ -1622,14 +1716,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']; }; }; }; @@ -1643,7 +1737,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: "asc" | "desc"; + sortType?: 'asc' | 'desc'; giver?: string; receiver?: string; }; @@ -1652,7 +1746,7 @@ export interface operations { /** @description Paginated praise items */ 200: { content: { - "application/json": components["schemas"]["PraisePaginatedResponseDto"]; + 'application/json': components['schemas']['PraisePaginatedResponseDto']; }; }; }; @@ -1661,19 +1755,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'][]; }; }; }; @@ -1689,7 +1783,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -1705,7 +1799,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -1721,7 +1815,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -1737,7 +1831,7 @@ export interface operations { /** @description Praise item */ 200: { content: { - "application/json": components["schemas"]["Praise"]; + 'application/json': components['schemas']['Praise']; }; }; }; @@ -1746,19 +1840,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'][]; }; }; }; @@ -1778,7 +1872,7 @@ export interface operations { responses: { 200: { content: { - "application/json": components["schemas"]["UserAccount"]; + 'application/json': components['schemas']['UserAccount']; }; }; }; @@ -1787,13 +1881,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']; }; }; }; @@ -1803,7 +1897,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -1813,7 +1907,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -1823,7 +1917,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -1839,7 +1933,7 @@ export interface operations { /** @description UserAccount */ 200: { content: { - "application/json": components["schemas"]["UserAccount"]; + 'application/json': components['schemas']['UserAccount']; }; }; }; @@ -1848,13 +1942,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']; }; }; }; @@ -1865,7 +1959,7 @@ export interface operations { /** @description Array of API keys */ 200: { content: { - "application/json": (components["schemas"]["ApiKey"])[]; + 'application/json': components['schemas']['ApiKey'][]; }; }; }; @@ -1874,14 +1968,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']; }; }; }; @@ -1897,7 +1991,7 @@ export interface operations { /** @description An API key */ 200: { content: { - "application/json": components["schemas"]["ApiKey"]; + 'application/json': components['schemas']['ApiKey']; }; }; }; @@ -1911,19 +2005,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']; }; }; }; @@ -1938,13 +2032,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']; }; }; }; @@ -1954,14 +2048,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']; }; }; }; @@ -1974,20 +2068,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']; }; }; }; @@ -2001,14 +2095,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']; }; }; }; @@ -2021,7 +2115,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: "asc" | "desc"; + sortType?: 'asc' | 'desc'; /** @example hostname.givepraise.xyz */ hostname?: string; }; @@ -2030,7 +2124,7 @@ export interface operations { /** @description All communities */ 200: { content: { - "application/json": components["schemas"]["CommunityFindAllResponseDto"]; + 'application/json': components['schemas']['CommunityFindAllResponseDto']; }; }; }; @@ -2039,19 +2133,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']; }; }; }; @@ -2066,7 +2160,7 @@ export interface operations { /** @description A single Community */ 200: { content: { - "application/json": components["schemas"]["Community"]; + 'application/json': components['schemas']['Community']; }; }; }; @@ -2075,14 +2169,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']; }; }; }; @@ -2098,7 +2192,7 @@ export interface operations { /** @description Checking whether the community name is available */ 200: { content: { - "application/json": components["schemas"]["IsNameAvailableResponseDto"]; + 'application/json': components['schemas']['IsNameAvailableResponseDto']; }; }; }; @@ -2108,7 +2202,7 @@ export interface operations { /** @description Returns the current community, based on hostname */ 200: { content: { - "application/json": components["schemas"]["Community"]; + 'application/json': components['schemas']['Community']; }; }; }; @@ -2117,14 +2211,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']; }; }; }; @@ -2140,7 +2234,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -2156,7 +2250,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -2172,7 +2266,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -2181,14 +2275,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'][]; }; }; }; @@ -2202,14 +2296,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'][]; }; }; }; @@ -2220,7 +2314,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 */ @@ -2238,7 +2332,7 @@ export interface operations { /** @description A receiver bio */ 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -2254,7 +2348,7 @@ export interface operations { /** @description Comma separated list of labels, 7 max */ 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; From 22fb5e5337f259ac4213dd96aa0648d1e637a901 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Fri, 18 Aug 2023 10:37:58 +0200 Subject: [PATCH 5/8] Add explanatory texts --- .../components/ApplicationSettings.tsx | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/pages/Settings/components/ApplicationSettings.tsx b/packages/frontend/src/pages/Settings/components/ApplicationSettings.tsx index bb646b4c2..989047354 100644 --- a/packages/frontend/src/pages/Settings/components/ApplicationSettings.tsx +++ b/packages/frontend/src/pages/Settings/components/ApplicationSettings.tsx @@ -6,6 +6,7 @@ import ApplicationSettingsApiKeys from './ApplicationSettingsApiKeys'; import { Setting as SettingDto } from '@/model/settings/dto/setting.dto'; import { useRecoilValue } from 'recoil'; import { CurrentCommunity } from '../../../model/community/community'; +import { Jazzicon } from '@ukstv/jazzicon-react'; interface Params { settings: SettingDto[] | undefined; @@ -28,13 +29,39 @@ export const ApplicationSettings = ({
-
{community?.creator}
+
+ The creator address is the address that represents this + community onchain. To be able to create attestations or + distribute tokens from this address, it should be a{' '} + + Safe + {' '} + address. +
+
+ {' '} + {community?.creator} +
+
+ The owner addresses represent the identities that will allways + have adin permissions in this Praise community. +
{community?.owners.map((owner) => ( -
{owner}
+
+ {' '} + {owner} +
))}
From dd021c7377ac332b7c8735ee9df6f4b96f7b39d2 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Fri, 18 Aug 2023 10:49:32 +0200 Subject: [PATCH 6/8] Add support for "features" to Community. Features can be used to limit what functionality each community has access to. --- packages/api-types/out/schema.ts | 6 ++++++ packages/api/openapi.json | 2 +- .../src/community/schemas/community.schema.ts | 16 ++++++++++++++++ .../api/src/community/types/features.type.ts | 6 ++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 packages/api/src/community/types/features.type.ts diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index 9984f1cfa..eb818800f 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -907,6 +907,12 @@ export interface components { isPublic: boolean; /** @enum {string} */ discordLinkState: "NOT_SET" | "PENDING" | "ACTIVE" | "DEACTIVE"; + /** + * @example { + * "attestations": true + * } + */ + features: Record; }; UpdateCommunityInputDto: { /** @example banklessdao.givepraise.xyz */ diff --git a/packages/api/openapi.json b/packages/api/openapi.json index fe8359baa..ce1718a09 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":2,"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"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityFindAllResponseDto"}}}}},"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/current":{"get":{"operationId":"CommunityController_current","parameters":[],"responses":{"200":{"description":"Returns the current community, based on hostname","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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"}}}},"CommunityFindAllResponseDto":{"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"]},"ConfigurationValueItemsDto":{"type":"object","properties":{"type":{"type":"string","description":"Allowed array types","enum":["string","number"],"example":"string"}},"required":["type"]},"ConfigurationValueDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"description":"Default value for the setting","example":666,"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"number"}},{"type":"array","items":{"type":"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":{"description":"Defines the type of items for array settings","allOf":[{"$ref":"#/components/schemas/ConfigurationValueItemsDto"}]}},"required":["type","default","description"]},"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/ConfigurationValueDto"}]}}},"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":2,"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"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityFindAllResponseDto"}}}}},"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/current":{"get":{"operationId":"CommunityController_current","parameters":[],"responses":{"200":{"description":"Returns the current community, based on hostname","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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":2,"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"]},"features":{"type":"object","example":{"attestations":true}}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState","features"]},"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"}}}},"CommunityFindAllResponseDto":{"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"]},"ConfigurationValueItemsDto":{"type":"object","properties":{"type":{"type":"string","description":"Allowed array types","enum":["string","number"],"example":"string"}},"required":["type"]},"ConfigurationValueDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"description":"Default value for the setting","example":666,"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"number"}},{"type":"array","items":{"type":"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":{"description":"Defines the type of items for array settings","allOf":[{"$ref":"#/components/schemas/ConfigurationValueItemsDto"}]}},"required":["type","default","description"]},"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/ConfigurationValueDto"}]}}},"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/community/schemas/community.schema.ts b/packages/api/src/community/schemas/community.schema.ts index 45d7e3427..750d738a6 100644 --- a/packages/api/src/community/schemas/community.schema.ts +++ b/packages/api/src/community/schemas/community.schema.ts @@ -17,6 +17,7 @@ import { isValidCommunityName } from '../utils/is-valid-community-name'; import { isValidOwners } from '../utils/is-valid-owners'; import { isValidHostname } from '../utils/is-valid-hostname'; import mongoosePaginate from 'mongoose-paginate-v2'; +import { Features } from '../types/features.type'; export type CommunityDocument = Community & Document; @@ -144,6 +145,21 @@ export class Community { required: true, }) discordLinkState: string; + + @ApiProperty({ + example: { + attestations: true, + }, + }) + @IsOptional() + @Prop({ + type: Object, + required: false, + default: { + attestations: false, + }, + }) + features?: Features; } export const CommunitySchema = SchemaFactory.createForClass(Community); diff --git a/packages/api/src/community/types/features.type.ts b/packages/api/src/community/types/features.type.ts new file mode 100644 index 000000000..2b2ccc6e4 --- /dev/null +++ b/packages/api/src/community/types/features.type.ts @@ -0,0 +1,6 @@ +/** + * The features object is used to enable or disable features for a community. + */ +export type Features = { + attestations: boolean; +}; From b104792338fee250bb0768dee3e9e891d764e089 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 18 Aug 2023 08:51:59 +0000 Subject: [PATCH 7/8] Build openapi schema --- packages/api-types/out/schema.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index df8de9d0a..bedbbc096 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -989,17 +989,13 @@ export interface components { /** @example true */ isPublic: boolean; /** @enum {string} */ -<<<<<<< HEAD - discordLinkState: "NOT_SET" | "PENDING" | "ACTIVE" | "DEACTIVE"; + discordLinkState: 'NOT_SET' | 'PENDING' | 'ACTIVE' | 'DEACTIVE'; /** * @example { * "attestations": true * } */ features: Record; -======= - discordLinkState: 'NOT_SET' | 'PENDING' | 'ACTIVE' | 'DEACTIVE'; ->>>>>>> 8d479c24884d5dbd1a5a7573a3080e800de81cdc }; UpdateCommunityInputDto: { /** @example banklessdao.givepraise.xyz */ From c804e30d1c93ea9a89ed0ac4b755ac65e58b41df Mon Sep 17 00:00:00 2001 From: Kristofer Date: Fri, 18 Aug 2023 10:52:18 +0200 Subject: [PATCH 8/8] Rebuild schema --- packages/api-types/out/schema.ts | 734 +++++++++++++------------------ 1 file changed, 318 insertions(+), 416 deletions(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index df8de9d0a..eb818800f 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -3,256 +3,257 @@ * 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/current': { - get: operations['CommunityController_current']; + "/api/communities/current": { + get: operations["CommunityController_current"]; }; - '/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"]; }; } @@ -277,17 +278,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 */ @@ -296,7 +287,7 @@ export interface components { UserAccount: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -319,18 +310,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 */ @@ -345,18 +326,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 */ @@ -374,16 +345,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 */ @@ -391,7 +353,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 */ @@ -418,7 +380,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Period'][]; + docs: readonly (components["schemas"]["Period"])[]; meta?: Record; }; Quantification: { @@ -437,12 +399,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; @@ -462,7 +424,7 @@ export interface components { finishedCount: number; /** @example 1 */ praiseCount: number; - quantifications: components['schemas']['Quantification'][]; + quantifications: (components["schemas"]["Quantification"])[]; }; PeriodDetailsGiverReceiverDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -492,16 +454,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; }; @@ -546,10 +508,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 */ @@ -557,12 +519,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; @@ -588,18 +550,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 */ @@ -619,15 +581,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 */ @@ -636,22 +590,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; @@ -675,7 +629,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['EventLog'][]; + docs: readonly (components["schemas"]["EventLog"])[]; meta?: Record; }; Setting: { @@ -686,21 +640,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? */ @@ -720,12 +664,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 */ @@ -750,7 +694,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Praise'][]; + docs: readonly (components["schemas"]["Praise"])[]; meta?: Record; }; PraiseCreateInputDto: { @@ -762,8 +706,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 */ @@ -774,9 +718,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 */ @@ -795,7 +739,7 @@ export interface components { CreateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -828,7 +772,7 @@ export interface components { UpdateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -848,16 +792,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 */ @@ -869,16 +804,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 */ @@ -896,16 +822,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 */ @@ -939,7 +856,7 @@ export interface components { identityEthAddress: string; /** @example bearer */ tokenType: string; - user: components['schemas']['User']; + user: components["schemas"]["User"]; }; GenerateTokenDto: { /** @example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA */ @@ -960,7 +877,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; }; @@ -981,7 +898,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; /** @example oiujoiuoo8u */ @@ -989,7 +906,6 @@ export interface components { /** @example true */ isPublic: boolean; /** @enum {string} */ -<<<<<<< HEAD discordLinkState: "NOT_SET" | "PENDING" | "ACTIVE" | "DEACTIVE"; /** * @example { @@ -997,9 +913,6 @@ export interface components { * } */ features: Record; -======= - discordLinkState: 'NOT_SET' | 'PENDING' | 'ACTIVE' | 'DEACTIVE'; ->>>>>>> 8d479c24884d5dbd1a5a7573a3080e800de81cdc }; UpdateCommunityInputDto: { /** @example banklessdao.givepraise.xyz */ @@ -1014,7 +927,7 @@ export interface components { * "0x345.." * ] */ - owners?: string[]; + owners?: (string)[]; }; CommunityFindAllResponseDto: { /** @example 1200 */ @@ -1035,7 +948,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Community'][]; + docs: readonly (components["schemas"]["Community"])[]; meta?: Record; }; IsNameAvailableResponseDto: { @@ -1053,7 +966,7 @@ export interface components { duplicatePraise?: string; }; QuantifyMultipleInputDto: { - params: components['schemas']['QuantifyInputDto']; + params: components["schemas"]["QuantifyInputDto"]; /** * @example [ * "639b178f19296ee0f2d0585d", @@ -1061,59 +974,59 @@ export interface components { * "639b178f19296ee0f2d0585f" * ] */ - praiseIds: string[]; + praiseIds: (string)[]; }; ConfigurationValueItemsDto: { /** - * @description Allowed array types - * @example string + * @description Allowed array types + * @example string * @enum {string} */ - type: 'string' | 'number'; + type: "string" | "number"; }; ConfigurationValueDto: { /** - * @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 666 */ - default: number | string | boolean | number[] | string[]; + default: number | string | boolean | (number)[] | (string)[]; /** - * @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)[]; /** @description Defines the type of items for array settings */ - items?: components['schemas']['ConfigurationValueItemsDto']; + items?: components["schemas"]["ConfigurationValueItemsDto"]; }; ReportManifestDto: { /** @example https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json */ @@ -1142,18 +1055,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']['ConfigurationValueDto'] - | undefined; + [key: string]: components["schemas"]["ConfigurationValueDto"] | undefined; }; }; }; @@ -1167,23 +1078,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"]; }; }; }; @@ -1193,7 +1105,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1203,7 +1115,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1213,7 +1125,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1223,7 +1135,7 @@ export interface operations { /** @description All users */ 200: { content: { - 'application/json': components['schemas']['User'][]; + "application/json": (components["schemas"]["User"])[]; }; }; }; @@ -1238,7 +1150,7 @@ export interface operations { /** @description A single user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1252,14 +1164,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"]; }; }; }; @@ -1272,14 +1184,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"]; }; }; }; @@ -1292,14 +1204,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"]; }; }; }; @@ -1309,7 +1221,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1319,7 +1231,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1329,7 +1241,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1343,14 +1255,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"]; }; }; }; @@ -1359,19 +1271,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"]; }; }; }; @@ -1387,7 +1299,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1401,14 +1313,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"]; }; }; }; @@ -1424,7 +1336,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1440,7 +1352,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1457,7 +1369,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1474,7 +1386,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1491,7 +1403,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1507,7 +1419,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['VerifyQuantifierPoolSizeDto']; + "application/json": components["schemas"]["VerifyQuantifierPoolSizeDto"]; }; }; }; @@ -1523,7 +1435,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1537,14 +1449,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"]; }; }; }; @@ -1558,16 +1470,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"]; }; }; }; @@ -1578,7 +1490,7 @@ export interface operations { /** @description Event log types */ 200: { content: { - 'application/json': components['schemas']['EventLogType'][]; + "application/json": (components["schemas"]["EventLogType"])[]; }; }; }; @@ -1589,17 +1501,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 */ @@ -1610,7 +1512,7 @@ export interface operations { /** @description All settings. */ 200: { content: { - 'application/json': components['schemas']['Setting'][]; + "application/json": (components["schemas"]["Setting"])[]; }; }; }; @@ -1626,7 +1528,7 @@ export interface operations { /** @description Setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1640,14 +1542,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"]; }; }; }; @@ -1663,7 +1565,7 @@ export interface operations { /** @description Updated setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1678,7 +1580,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': Record; + "application/json": Record; }; }; }; @@ -1694,7 +1596,7 @@ export interface operations { /** @description All period settings */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting'][]; + "application/json": (components["schemas"]["PeriodSetting"])[]; }; }; }; @@ -1711,7 +1613,7 @@ export interface operations { /** @description Period setting */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting']; + "application/json": components["schemas"]["PeriodSetting"]; }; }; }; @@ -1726,14 +1628,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"]; }; }; }; @@ -1747,7 +1649,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; giver?: string; receiver?: string; }; @@ -1756,7 +1658,7 @@ export interface operations { /** @description Paginated praise items */ 200: { content: { - 'application/json': components['schemas']['PraisePaginatedResponseDto']; + "application/json": components["schemas"]["PraisePaginatedResponseDto"]; }; }; }; @@ -1765,19 +1667,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"])[]; }; }; }; @@ -1793,7 +1695,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1809,7 +1711,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1825,7 +1727,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1841,7 +1743,7 @@ export interface operations { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; }; @@ -1850,19 +1752,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"])[]; }; }; }; @@ -1882,7 +1784,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1891,13 +1793,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"]; }; }; }; @@ -1907,7 +1809,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1917,7 +1819,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1927,7 +1829,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1943,7 +1845,7 @@ export interface operations { /** @description UserAccount */ 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1952,13 +1854,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"]; }; }; }; @@ -1969,7 +1871,7 @@ export interface operations { /** @description Array of API keys */ 200: { content: { - 'application/json': components['schemas']['ApiKey'][]; + "application/json": (components["schemas"]["ApiKey"])[]; }; }; }; @@ -1978,14 +1880,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"]; }; }; }; @@ -2001,7 +1903,7 @@ export interface operations { /** @description An API key */ 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -2015,19 +1917,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"]; }; }; }; @@ -2042,13 +1944,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"]; }; }; }; @@ -2058,14 +1960,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"]; }; }; }; @@ -2078,20 +1980,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"]; }; }; }; @@ -2105,14 +2007,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"]; }; }; }; @@ -2125,7 +2027,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; /** @example hostname.givepraise.xyz */ hostname?: string; }; @@ -2134,7 +2036,7 @@ export interface operations { /** @description All communities */ 200: { content: { - 'application/json': components['schemas']['CommunityFindAllResponseDto']; + "application/json": components["schemas"]["CommunityFindAllResponseDto"]; }; }; }; @@ -2143,19 +2045,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"]; }; }; }; @@ -2170,7 +2072,7 @@ export interface operations { /** @description A single Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2179,14 +2081,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"]; }; }; }; @@ -2202,7 +2104,7 @@ export interface operations { /** @description Checking whether the community name is available */ 200: { content: { - 'application/json': components['schemas']['IsNameAvailableResponseDto']; + "application/json": components["schemas"]["IsNameAvailableResponseDto"]; }; }; }; @@ -2212,7 +2114,7 @@ export interface operations { /** @description Returns the current community, based on hostname */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2221,14 +2123,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"]; }; }; }; @@ -2244,7 +2146,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2260,7 +2162,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -2276,7 +2178,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -2285,14 +2187,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"])[]; }; }; }; @@ -2306,14 +2208,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"])[]; }; }; }; @@ -2324,7 +2226,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 */ @@ -2342,7 +2244,7 @@ export interface operations { /** @description A receiver bio */ 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2358,7 +2260,7 @@ export interface operations { /** @description Comma separated list of labels, 7 max */ 200: { content: { - 'application/json': string; + "application/json": string; }; }; };