@hestia-earth/api 0.25.72 → 0.25.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  import { BaseModel } from '../../db/model.base';
2
- import { status, pipelineStatus } from '../../files/model/model';
3
- export interface IAggregationMetadata {
4
- slackThreadTs?: string;
2
+ import { IFileMetadata, status, pipelineStatus } from '../../files/model/model';
3
+ export interface IAggregationMetadata extends IFileMetadata {
5
4
  totalIterations?: number;
6
5
  currentIterations?: number;
7
6
  missingIterations?: number[];
@@ -1,4 +1,4 @@
1
- import { ISourceJSONLD } from '@hestia-earth/schema';
1
+ import { ISourceJSONLD, NodeType } from '@hestia-earth/schema';
2
2
  import { BaseModel } from '../../db/model.base';
3
3
  import { User, UserRole } from '../../users/model/model';
4
4
  export declare const mb = 1048576;
@@ -100,6 +100,11 @@ export interface IFileTodoItem extends IFileComment {
100
100
  index: number;
101
101
  isChecked: boolean;
102
102
  }
103
+ export interface IFileMetadata {
104
+ slackThreadTs?: string;
105
+ nodesPerType?: Record<NodeType, number>;
106
+ recalculatedNodesPerType?: Record<NodeType, number>;
107
+ }
103
108
  export declare class File extends BaseModel {
104
109
  filename: string;
105
110
  filepath: string;
@@ -120,9 +125,7 @@ export declare class File extends BaseModel {
120
125
  glossaryOutdated?: boolean;
121
126
  comments?: IFileComment[];
122
127
  todos?: IFileTodoItem[];
123
- metadata?: {
124
- slackThreadTs?: string;
125
- };
128
+ metadata?: IFileMetadata;
126
129
  isPrivate?: boolean;
127
130
  skipValidation?: boolean;
128
131
  study?: File;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/api",
3
- "version": "0.25.72",
3
+ "version": "0.25.73",
4
4
  "description": "Hestia API definitions",
5
5
  "main": "dist/models.js",
6
6
  "typings": "dist/models.d.ts",
@@ -12,6 +12,7 @@
12
12
  "start": "npm run build && node index.js",
13
13
  "dev": "ts-node-dev --respawn --rs dev.ts --files --ignore-watch node_modules",
14
14
  "watch": "tsc --watch",
15
+ "webhooks:receive": "ts-node scripts/webhooks-receiver.ts",
15
16
  "lint": "eslint \"src/**/*.ts\"",
16
17
  "lint:fix": "npm run lint -- --fix",
17
18
  "test": "jest --runInBand --coverage --forceExit",