mirror of
				https://github.com/lingble/twenty.git
				synced 2025-11-03 22:27:57 +00:00 
			
		
		
		
	feat: server lint import & order (#750)
This commit is contained in:
		
							
								
								
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							@@ -37,5 +37,6 @@
 | 
				
			|||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "cSpell.words": [
 | 
					  "cSpell.words": [
 | 
				
			||||||
    "twentyhq"
 | 
					    "twentyhq"
 | 
				
			||||||
  ]
 | 
					  ],
 | 
				
			||||||
 | 
					  "typescript.preferences.importModuleSpecifier": "project-relative"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -5,7 +5,7 @@ module.exports = {
 | 
				
			|||||||
    tsconfigRootDir : __dirname, 
 | 
					    tsconfigRootDir : __dirname, 
 | 
				
			||||||
    sourceType: 'module',
 | 
					    sourceType: 'module',
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  plugins: ['@typescript-eslint/eslint-plugin'],
 | 
					  plugins: ['@typescript-eslint/eslint-plugin', 'import'],
 | 
				
			||||||
  extends: [
 | 
					  extends: [
 | 
				
			||||||
    'plugin:@typescript-eslint/recommended',
 | 
					    'plugin:@typescript-eslint/recommended',
 | 
				
			||||||
    'plugin:prettier/recommended',
 | 
					    'plugin:prettier/recommended',
 | 
				
			||||||
@@ -22,5 +22,57 @@ module.exports = {
 | 
				
			|||||||
    '@typescript-eslint/explicit-module-boundary-types': 'off',
 | 
					    '@typescript-eslint/explicit-module-boundary-types': 'off',
 | 
				
			||||||
    '@typescript-eslint/no-explicit-any': 'off',
 | 
					    '@typescript-eslint/no-explicit-any': 'off',
 | 
				
			||||||
    'func-style':['error', 'declaration', { 'allowArrowFunctions': true }],
 | 
					    'func-style':['error', 'declaration', { 'allowArrowFunctions': true }],
 | 
				
			||||||
 | 
					    'no-restricted-imports': [
 | 
				
			||||||
 | 
					      'error',
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        'patterns': [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            'group': ['**../'],
 | 
				
			||||||
 | 
					            'message': 'Relative imports are not allowed.',
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    'import/order': [
 | 
				
			||||||
 | 
					      'error',
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        'newlines-between': 'always',
 | 
				
			||||||
 | 
					        groups: [
 | 
				
			||||||
 | 
					          'builtin',
 | 
				
			||||||
 | 
					          'external',
 | 
				
			||||||
 | 
					          'internal',
 | 
				
			||||||
 | 
					          'type',
 | 
				
			||||||
 | 
					          'parent',
 | 
				
			||||||
 | 
					          'sibling',
 | 
				
			||||||
 | 
					          'object',
 | 
				
			||||||
 | 
					          'index',
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        pathGroups: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            pattern: '@nestjs/**',
 | 
				
			||||||
 | 
					            group: 'builtin',
 | 
				
			||||||
 | 
					            position: 'before',
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            pattern: '**/interfaces/**',
 | 
				
			||||||
 | 
					            group: 'type',
 | 
				
			||||||
 | 
					            position: 'before',
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            pattern: 'src/**',
 | 
				
			||||||
 | 
					            group: 'parent',
 | 
				
			||||||
 | 
					            position: 'before',
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            pattern: './*',
 | 
				
			||||||
 | 
					            group: 'sibling',
 | 
				
			||||||
 | 
					            position: 'before',
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        distinctGroup: true,
 | 
				
			||||||
 | 
					        warnOnUnassignedImports: true,
 | 
				
			||||||
 | 
					        pathGroupsExcludedImportTypes: ['@nestjs/**'],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -97,6 +97,7 @@
 | 
				
			|||||||
    "@typescript-eslint/parser": "^5.0.0",
 | 
					    "@typescript-eslint/parser": "^5.0.0",
 | 
				
			||||||
    "eslint": "^8.0.1",
 | 
					    "eslint": "^8.0.1",
 | 
				
			||||||
    "eslint-config-prettier": "^8.3.0",
 | 
					    "eslint-config-prettier": "^8.3.0",
 | 
				
			||||||
 | 
					    "eslint-plugin-import": "^2.27.5",
 | 
				
			||||||
    "eslint-plugin-prettier": "^4.0.0",
 | 
					    "eslint-plugin-prettier": "^4.0.0",
 | 
				
			||||||
    "jest": "28.1.3",
 | 
					    "jest": "28.1.3",
 | 
				
			||||||
    "prettier": "^2.3.2",
 | 
					    "prettier": "^2.3.2",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,7 @@
 | 
				
			|||||||
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PureAbility, AbilityBuilder } from '@casl/ability';
 | 
					import { PureAbility, AbilityBuilder } from '@casl/ability';
 | 
				
			||||||
import { createPrismaAbility, PrismaQuery, Subjects } from '@casl/prisma';
 | 
					import { createPrismaAbility, PrismaQuery, Subjects } from '@casl/prisma';
 | 
				
			||||||
import { Injectable } from '@nestjs/common';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  CommentThread,
 | 
					  CommentThread,
 | 
				
			||||||
  Company,
 | 
					  Company,
 | 
				
			||||||
@@ -16,6 +17,7 @@ import {
 | 
				
			|||||||
  PipelineProgress,
 | 
					  PipelineProgress,
 | 
				
			||||||
  Attachment,
 | 
					  Attachment,
 | 
				
			||||||
} from '@prisma/client';
 | 
					} from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AbilityAction } from './ability.action';
 | 
					import { AbilityAction } from './ability.action';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type SubjectsAbility = Subjects<{
 | 
					type SubjectsAbility = Subjects<{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,8 @@
 | 
				
			|||||||
import { Global, Module } from '@nestjs/common';
 | 
					import { Global, Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AbilityFactory } from 'src/ability/ability.factory';
 | 
					import { AbilityFactory } from 'src/ability/ability.factory';
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  CreateUserAbilityHandler,
 | 
					  CreateUserAbilityHandler,
 | 
				
			||||||
  DeleteUserAbilityHandler,
 | 
					  DeleteUserAbilityHandler,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,17 +1,20 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  ForbiddenException,
 | 
					  ForbiddenException,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class AttachmentArgs {
 | 
					class AttachmentArgs {
 | 
				
			||||||
  activityId?: string;
 | 
					  activityId?: string;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,17 +1,20 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { CommentThreadTargetWhereInput } from 'src/core/@generated/comment-thread-target/comment-thread-target-where.input';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { CommentThreadTargetWhereInput } from 'src/core/@generated/comment-thread-target/comment-thread-target-where.input';
 | 
				
			||||||
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class CommentThreadTargetArgs {
 | 
					class CommentThreadTargetArgs {
 | 
				
			||||||
  where?: CommentThreadTargetWhereInput;
 | 
					  where?: CommentThreadTargetWhereInput;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,19 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
import { CommentThreadWhereInput } from 'src/core/@generated/comment-thread/comment-thread-where.input';
 | 
					import { CommentThreadWhereInput } from 'src/core/@generated/comment-thread/comment-thread-where.input';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
class CommentThreadArgs {
 | 
					class CommentThreadArgs {
 | 
				
			||||||
  where?: CommentThreadWhereInput;
 | 
					  where?: CommentThreadWhereInput;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,15 +1,18 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					 | 
				
			||||||
import { CommentWhereInput } from 'src/core/@generated/comment/comment-where.input';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { CommentWhereInput } from 'src/core/@generated/comment/comment-where.input';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class CommentArgs {
 | 
					class CommentArgs {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,17 +1,20 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { CompanyWhereInput } from 'src/core/@generated/company/company-where.input';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { CompanyWhereInput } from 'src/core/@generated/company/company-where.input';
 | 
				
			||||||
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class CompanyArgs {
 | 
					class CompanyArgs {
 | 
				
			||||||
  where?: CompanyWhereInput;
 | 
					  where?: CompanyWhereInput;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,17 +1,20 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { PersonWhereInput } from 'src/core/@generated/person/person-where.input';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { PersonWhereInput } from 'src/core/@generated/person/person-where.input';
 | 
				
			||||||
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PersonArgs {
 | 
					class PersonArgs {
 | 
				
			||||||
  where?: PersonWhereInput;
 | 
					  where?: PersonWhereInput;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,15 +1,18 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
import { PipelineProgressWhereInput } from 'src/core/@generated/pipeline-progress/pipeline-progress-where.input';
 | 
					import { PipelineProgressWhereInput } from 'src/core/@generated/pipeline-progress/pipeline-progress-where.input';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PipelineProgressArgs {
 | 
					class PipelineProgressArgs {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,17 +1,20 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { PipelineStageWhereInput } from 'src/core/@generated/pipeline-stage/pipeline-stage-where.input';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { PipelineStageWhereInput } from 'src/core/@generated/pipeline-stage/pipeline-stage-where.input';
 | 
				
			||||||
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PipelineStageArgs {
 | 
					class PipelineStageArgs {
 | 
				
			||||||
  where?: PipelineStageWhereInput;
 | 
					  where?: PipelineStageWhereInput;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,17 +1,20 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { PipelineWhereInput } from 'src/core/@generated/pipeline/pipeline-where.input';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { PipelineWhereInput } from 'src/core/@generated/pipeline/pipeline-where.input';
 | 
				
			||||||
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PipelineArgs {
 | 
					class PipelineArgs {
 | 
				
			||||||
  where?: PipelineWhereInput;
 | 
					  where?: PipelineWhereInput;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,15 +1,18 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					 | 
				
			||||||
import { RefreshTokenWhereInput } from 'src/core/@generated/refresh-token/refresh-token-where.input';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { RefreshTokenWhereInput } from 'src/core/@generated/refresh-token/refresh-token-where.input';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class RefreshTokenArgs {
 | 
					class RefreshTokenArgs {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,19 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
import { UserWhereInput } from 'src/core/@generated/user/user-where.input';
 | 
					import { UserWhereInput } from 'src/core/@generated/user/user-where.input';
 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UserArgs {
 | 
					class UserArgs {
 | 
				
			||||||
  where?: UserWhereInput;
 | 
					  where?: UserWhereInput;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,15 +1,18 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					 | 
				
			||||||
import { WorkspaceMemberWhereInput } from 'src/core/@generated/workspace-member/workspace-member-where.input';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { WorkspaceMemberWhereInput } from 'src/core/@generated/workspace-member/workspace-member-where.input';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WorksapceMemberArgs {
 | 
					class WorksapceMemberArgs {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,19 @@
 | 
				
			|||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { AbilityAction } from '../ability.action';
 | 
					 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					 | 
				
			||||||
import { IAbilityHandler } from '../interfaces/ability-handler.interface';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  ExecutionContext,
 | 
					  ExecutionContext,
 | 
				
			||||||
  ForbiddenException,
 | 
					  ForbiddenException,
 | 
				
			||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { subject } from '@casl/ability';
 | 
					 | 
				
			||||||
import { WorkspaceWhereInput } from 'src/core/@generated/workspace/workspace-where.input';
 | 
					 | 
				
			||||||
import { GqlExecutionContext } from '@nestjs/graphql';
 | 
					import { GqlExecutionContext } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { subject } from '@casl/ability';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { IAbilityHandler } from 'src/ability/interfaces/ability-handler.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { AbilityAction } from 'src/ability/ability.action';
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					import { WorkspaceWhereInput } from 'src/core/@generated/workspace/workspace-where.input';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
import { getRequest } from 'src/utils/extract-request';
 | 
					import { getRequest } from 'src/utils/extract-request';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,6 @@
 | 
				
			|||||||
import { ExecutionContext, Type } from '@nestjs/common';
 | 
					import { ExecutionContext, Type } from '@nestjs/common';
 | 
				
			||||||
import { AppAbility } from '../ability.factory';
 | 
					
 | 
				
			||||||
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IAbilityHandler {
 | 
					export interface IAbilityHandler {
 | 
				
			||||||
  handle(
 | 
					  handle(
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,17 +1,19 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
import { GraphQLModule } from '@nestjs/graphql';
 | 
					import { GraphQLModule } from '@nestjs/graphql';
 | 
				
			||||||
import { AppService } from './app.service';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import { ConfigModule } from '@nestjs/config';
 | 
					import { ConfigModule } from '@nestjs/config';
 | 
				
			||||||
import { CoreModule } from './core/core.module';
 | 
					 | 
				
			||||||
import { IntegrationsModule } from './integrations/integrations.module';
 | 
					 | 
				
			||||||
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
 | 
					import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ApolloServerPluginLandingPageLocalDefault } from '@apollo/server/plugin/landingPage/default';
 | 
					import { ApolloServerPluginLandingPageLocalDefault } from '@apollo/server/plugin/landingPage/default';
 | 
				
			||||||
import { GraphQLError } from 'graphql';
 | 
					import { GraphQLError } from 'graphql';
 | 
				
			||||||
 | 
					import GraphQLJSON from 'graphql-type-json';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { AppService } from './app.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CoreModule } from './core/core.module';
 | 
				
			||||||
 | 
					import { IntegrationsModule } from './integrations/integrations.module';
 | 
				
			||||||
import { PrismaModule } from './database/prisma.module';
 | 
					import { PrismaModule } from './database/prisma.module';
 | 
				
			||||||
import { HealthModule } from './health/health.module';
 | 
					import { HealthModule } from './health/health.module';
 | 
				
			||||||
import { AbilityModule } from './ability/ability.module';
 | 
					import { AbilityModule } from './ability/ability.module';
 | 
				
			||||||
import GraphQLJSON from 'graphql-type-json';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Module({
 | 
					@Module({
 | 
				
			||||||
  imports: [
 | 
					  imports: [
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { FileFolder } from 'src/core/file/interfaces/file-folder.interface';
 | 
					import { FileFolder } from 'src/core/file/interfaces/file-folder.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ShortCropSize } from 'src/utils/image';
 | 
					import { ShortCropSize } from 'src/utils/image';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type ValueOfFileFolder = `${FileFolder}`;
 | 
					type ValueOfFileFolder = `${FileFolder}`;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AnalyticsService } from './analytics.service';
 | 
					import { AnalyticsService } from './analytics.service';
 | 
				
			||||||
import { AnalyticsResolver } from './analytics.resolver';
 | 
					import { AnalyticsResolver } from './analytics.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,9 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AnalyticsResolver } from './analytics.resolver';
 | 
					import { AnalyticsResolver } from './analytics.resolver';
 | 
				
			||||||
import { AnalyticsService } from './analytics.service';
 | 
					import { AnalyticsService } from './analytics.service';
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('AnalyticsResolver', () => {
 | 
					describe('AnalyticsResolver', () => {
 | 
				
			||||||
  let resolver: AnalyticsResolver;
 | 
					  let resolver: AnalyticsResolver;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,12 +1,16 @@
 | 
				
			|||||||
import { Resolver, Mutation, Args } from '@nestjs/graphql';
 | 
					import { Resolver, Mutation, Args } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { User, Workspace } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { OptionalJwtAuthGuard } from 'src/guards/optional-jwt.auth.guard';
 | 
				
			||||||
 | 
					import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator';
 | 
				
			||||||
 | 
					import { AuthUser } from 'src/decorators/auth-user.decorator';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AnalyticsService } from './analytics.service';
 | 
					import { AnalyticsService } from './analytics.service';
 | 
				
			||||||
import { Analytics } from './analytics.entity';
 | 
					import { Analytics } from './analytics.entity';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { CreateAnalyticsInput } from './dto/create-analytics.input';
 | 
					import { CreateAnalyticsInput } from './dto/create-analytics.input';
 | 
				
			||||||
import { OptionalJwtAuthGuard } from 'src/guards/optional-jwt.auth.guard';
 | 
					 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					 | 
				
			||||||
import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator';
 | 
					 | 
				
			||||||
import { User, Workspace } from '@prisma/client';
 | 
					 | 
				
			||||||
import { AuthUser } from 'src/decorators/auth-user.decorator';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@UseGuards(OptionalJwtAuthGuard)
 | 
					@UseGuards(OptionalJwtAuthGuard)
 | 
				
			||||||
@Resolver(() => Analytics)
 | 
					@Resolver(() => Analytics)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,9 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { AnalyticsService } from './analytics.service';
 | 
					
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { AnalyticsService } from './analytics.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('AnalyticsService', () => {
 | 
					describe('AnalyticsService', () => {
 | 
				
			||||||
  let service: AnalyticsService;
 | 
					  let service: AnalyticsService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,13 @@
 | 
				
			|||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { User, Workspace } from '@prisma/client';
 | 
					import { User, Workspace } from '@prisma/client';
 | 
				
			||||||
import axios, { AxiosInstance } from 'axios';
 | 
					import axios, { AxiosInstance } from 'axios';
 | 
				
			||||||
import { CreateAnalyticsInput } from './dto/create-analytics.input';
 | 
					
 | 
				
			||||||
import { anonymize } from 'src/utils/anonymize';
 | 
					import { anonymize } from 'src/utils/anonymize';
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CreateAnalyticsInput } from './dto/create-analytics.input';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
export class AnalyticsService {
 | 
					export class AnalyticsService {
 | 
				
			||||||
  private readonly httpService: AxiosInstance;
 | 
					  private readonly httpService: AxiosInstance;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { ArgsType, Field } from '@nestjs/graphql';
 | 
					import { ArgsType, Field } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import GraphQLJSON from 'graphql-type-json';
 | 
					import GraphQLJSON from 'graphql-type-json';
 | 
				
			||||||
import { IsNotEmpty, IsString, IsObject } from 'class-validator';
 | 
					import { IsNotEmpty, IsString, IsObject } from 'class-validator';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,8 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileUploadService } from 'src/core/file/services/file-upload.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AttachmentResolver } from './resolvers/attachment.resolver';
 | 
					import { AttachmentResolver } from './resolvers/attachment.resolver';
 | 
				
			||||||
import { FileUploadService } from '../file/services/file-upload.service';
 | 
					 | 
				
			||||||
import { AttachmentService } from './services/attachment.service';
 | 
					import { AttachmentService } from './services/attachment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Module({
 | 
					@Module({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,11 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { AttachmentResolver } from './attachment.resolver';
 | 
					
 | 
				
			||||||
import { FileUploadService } from 'src/core/file/services/file-upload.service';
 | 
					import { FileUploadService } from 'src/core/file/services/file-upload.service';
 | 
				
			||||||
import { AttachmentService } from '../services/attachment.service';
 | 
					import { AttachmentService } from 'src/core/attachment/services/attachment.service';
 | 
				
			||||||
import { AbilityFactory } from 'src/ability/ability.factory';
 | 
					import { AbilityFactory } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { AttachmentResolver } from './attachment.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('AttachmentResolver', () => {
 | 
					describe('AttachmentResolver', () => {
 | 
				
			||||||
  let resolver: AttachmentResolver;
 | 
					  let resolver: AttachmentResolver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,14 +1,17 @@
 | 
				
			|||||||
import { Resolver, Args, Mutation } from '@nestjs/graphql';
 | 
					import { Resolver, Args, Mutation } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { User, Workspace } from '@prisma/client';
 | 
					import { User, Workspace } from '@prisma/client';
 | 
				
			||||||
import { GraphQLUpload, FileUpload } from 'graphql-upload';
 | 
					import { GraphQLUpload, FileUpload } from 'graphql-upload';
 | 
				
			||||||
 | 
					import { v4 as uuidV4 } from 'uuid';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileFolder } from 'src/core/file/interfaces/file-folder.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AuthUser } from 'src/decorators/auth-user.decorator';
 | 
					import { AuthUser } from 'src/decorators/auth-user.decorator';
 | 
				
			||||||
import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator';
 | 
					import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator';
 | 
				
			||||||
import { streamToBuffer } from 'src/utils/stream-to-buffer';
 | 
					import { streamToBuffer } from 'src/utils/stream-to-buffer';
 | 
				
			||||||
import { v4 as uuidV4 } from 'uuid';
 | 
					import { AttachmentService } from 'src/core/attachment/services/attachment.service';
 | 
				
			||||||
import { AttachmentService } from '../services/attachment.service';
 | 
					 | 
				
			||||||
import { FileUploadService } from 'src/core/file/services/file-upload.service';
 | 
					import { FileUploadService } from 'src/core/file/services/file-upload.service';
 | 
				
			||||||
import { FileFolder } from 'src/core/file/interfaces/file-folder.interface';
 | 
					 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					 | 
				
			||||||
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
					import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
				
			||||||
import { Attachment } from 'src/core/@generated/attachment/attachment.model';
 | 
					import { Attachment } from 'src/core/@generated/attachment/attachment.model';
 | 
				
			||||||
import { AbilityGuard } from 'src/guards/ability.guard';
 | 
					import { AbilityGuard } from 'src/guards/ability.guard';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,8 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
					import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AttachmentService } from './attachment.service';
 | 
					import { AttachmentService } from './attachment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('AttachmentService', () => {
 | 
					describe('AttachmentService', () => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,7 @@
 | 
				
			|||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AttachmentType } from '@prisma/client';
 | 
					import { AttachmentType } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,15 +1,18 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
import { JwtModule } from '@nestjs/jwt';
 | 
					import { JwtModule } from '@nestjs/jwt';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { UserModule } from 'src/core/user/user.module';
 | 
				
			||||||
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					import { WorkspaceModule } from 'src/core/workspace/workspace.module';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { AuthResolver } from './auth.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { JwtAuthStrategy } from './strategies/jwt.auth.strategy';
 | 
					import { JwtAuthStrategy } from './strategies/jwt.auth.strategy';
 | 
				
			||||||
import { AuthService } from './services/auth.service';
 | 
					import { AuthService } from './services/auth.service';
 | 
				
			||||||
import { GoogleAuthController } from './controllers/google-auth.controller';
 | 
					import { GoogleAuthController } from './controllers/google-auth.controller';
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { UserModule } from '../user/user.module';
 | 
					 | 
				
			||||||
import { VerifyAuthController } from './controllers/verify-auth.controller';
 | 
					import { VerifyAuthController } from './controllers/verify-auth.controller';
 | 
				
			||||||
import { TokenService } from './services/token.service';
 | 
					import { TokenService } from './services/token.service';
 | 
				
			||||||
import { AuthResolver } from './auth.resolver';
 | 
					 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					 | 
				
			||||||
import { WorkspaceModule } from '../workspace/workspace.module';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const jwtModule = JwtModule.registerAsync({
 | 
					const jwtModule = JwtModule.registerAsync({
 | 
				
			||||||
  useFactory: async (environmentService: EnvironmentService) => {
 | 
					  useFactory: async (environmentService: EnvironmentService) => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,7 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AuthResolver } from './auth.resolver';
 | 
					import { AuthResolver } from './auth.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { TokenService } from './services/token.service';
 | 
					import { TokenService } from './services/token.service';
 | 
				
			||||||
import { AuthService } from './services/auth.service';
 | 
					import { AuthService } from './services/auth.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,18 +1,21 @@
 | 
				
			|||||||
import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
 | 
					import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					import { BadRequestException } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { Prisma } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import {
 | 
				
			||||||
 | 
					  PrismaSelect,
 | 
				
			||||||
 | 
					  PrismaSelector,
 | 
				
			||||||
 | 
					} from 'src/decorators/prisma-select.decorator';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AuthTokens } from './dto/token.entity';
 | 
					import { AuthTokens } from './dto/token.entity';
 | 
				
			||||||
import { TokenService } from './services/token.service';
 | 
					import { TokenService } from './services/token.service';
 | 
				
			||||||
import { RefreshTokenInput } from './dto/refresh-token.input';
 | 
					import { RefreshTokenInput } from './dto/refresh-token.input';
 | 
				
			||||||
import { BadRequestException } from '@nestjs/common';
 | 
					 | 
				
			||||||
import { Verify } from './dto/verify.entity';
 | 
					import { Verify } from './dto/verify.entity';
 | 
				
			||||||
import { VerifyInput } from './dto/verify.input';
 | 
					import { VerifyInput } from './dto/verify.input';
 | 
				
			||||||
import { AuthService } from './services/auth.service';
 | 
					import { AuthService } from './services/auth.service';
 | 
				
			||||||
import { LoginToken } from './dto/login-token.entity';
 | 
					import { LoginToken } from './dto/login-token.entity';
 | 
				
			||||||
import { ChallengeInput } from './dto/challenge.input';
 | 
					import { ChallengeInput } from './dto/challenge.input';
 | 
				
			||||||
import {
 | 
					 | 
				
			||||||
  PrismaSelect,
 | 
					 | 
				
			||||||
  PrismaSelector,
 | 
					 | 
				
			||||||
} from 'src/decorators/prisma-select.decorator';
 | 
					 | 
				
			||||||
import { Prisma } from '@prisma/client';
 | 
					 | 
				
			||||||
import { UserExists } from './dto/user-exists.entity';
 | 
					import { UserExists } from './dto/user-exists.entity';
 | 
				
			||||||
import { CheckUserExistsInput } from './dto/user-exists.input';
 | 
					import { CheckUserExistsInput } from './dto/user-exists.input';
 | 
				
			||||||
import { WorkspaceInviteHashValid } from './dto/workspace-invite-hash-valid.entity';
 | 
					import { WorkspaceInviteHashValid } from './dto/workspace-invite-hash-valid.entity';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,11 +7,13 @@ import {
 | 
				
			|||||||
  UseGuards,
 | 
					  UseGuards,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { AuthGuard } from '@nestjs/passport';
 | 
					import { AuthGuard } from '@nestjs/passport';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { Response } from 'express';
 | 
					import { Response } from 'express';
 | 
				
			||||||
import { GoogleRequest } from '../strategies/google.auth.strategy';
 | 
					
 | 
				
			||||||
import { UserService } from '../../user/user.service';
 | 
					import { GoogleRequest } from 'src/core/auth/strategies/google.auth.strategy';
 | 
				
			||||||
import { TokenService } from '../services/token.service';
 | 
					import { UserService } from 'src/core/user/user.service';
 | 
				
			||||||
import { GoogleProviderEnabledGuard } from '../guards/google-provider-enabled.guard';
 | 
					import { TokenService } from 'src/core/auth/services/token.service';
 | 
				
			||||||
 | 
					import { GoogleProviderEnabledGuard } from 'src/core/auth/guards/google-provider-enabled.guard';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Controller('auth/google')
 | 
					@Controller('auth/google')
 | 
				
			||||||
export class GoogleAuthController {
 | 
					export class GoogleAuthController {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,9 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { AuthService } from 'src/core/auth/services/auth.service';
 | 
				
			||||||
 | 
					import { TokenService } from 'src/core/auth/services/token.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { VerifyAuthController } from './verify-auth.controller';
 | 
					import { VerifyAuthController } from './verify-auth.controller';
 | 
				
			||||||
import { AuthService } from '../services/auth.service';
 | 
					 | 
				
			||||||
import { TokenService } from '../services/token.service';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('VerifyAuthController', () => {
 | 
					describe('VerifyAuthController', () => {
 | 
				
			||||||
  let controller: VerifyAuthController;
 | 
					  let controller: VerifyAuthController;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,9 @@
 | 
				
			|||||||
import { Body, Controller, Post } from '@nestjs/common';
 | 
					import { Body, Controller, Post } from '@nestjs/common';
 | 
				
			||||||
import { AuthService } from '../services/auth.service';
 | 
					
 | 
				
			||||||
import { VerifyInput } from '../dto/verify.input';
 | 
					import { AuthService } from 'src/core/auth/services/auth.service';
 | 
				
			||||||
import { Verify } from '../dto/verify.entity';
 | 
					import { VerifyInput } from 'src/core/auth/dto/verify.input';
 | 
				
			||||||
import { TokenService } from '../services/token.service';
 | 
					import { Verify } from 'src/core/auth/dto/verify.entity';
 | 
				
			||||||
 | 
					import { TokenService } from 'src/core/auth/services/token.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Controller('auth/verify')
 | 
					@Controller('auth/verify')
 | 
				
			||||||
export class VerifyAuthController {
 | 
					export class VerifyAuthController {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { ArgsType, Field } from '@nestjs/graphql';
 | 
					import { ArgsType, Field } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { IsEmail, IsNotEmpty, IsString } from 'class-validator';
 | 
					import { IsEmail, IsNotEmpty, IsString } from 'class-validator';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ArgsType()
 | 
					@ArgsType()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Field, ObjectType } from '@nestjs/graphql';
 | 
					import { Field, ObjectType } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { AuthToken } from './token.entity';
 | 
					import { AuthToken } from './token.entity';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ObjectType()
 | 
					@ObjectType()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { ArgsType, Field } from '@nestjs/graphql';
 | 
					import { ArgsType, Field } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { IsNotEmpty, IsString } from 'class-validator';
 | 
					import { IsNotEmpty, IsString } from 'class-validator';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ArgsType()
 | 
					@ArgsType()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { ArgsType, Field } from '@nestjs/graphql';
 | 
					import { ArgsType, Field } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { IsEmail, IsNotEmpty, IsOptional, IsString } from 'class-validator';
 | 
					import { IsEmail, IsNotEmpty, IsOptional, IsString } from 'class-validator';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ArgsType()
 | 
					@ArgsType()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { ArgsType, Field } from '@nestjs/graphql';
 | 
					import { ArgsType, Field } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { IsNotEmpty, IsString } from 'class-validator';
 | 
					import { IsNotEmpty, IsString } from 'class-validator';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ArgsType()
 | 
					@ArgsType()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,9 @@
 | 
				
			|||||||
import { Field, ObjectType } from '@nestjs/graphql';
 | 
					import { Field, ObjectType } from '@nestjs/graphql';
 | 
				
			||||||
import { AuthTokens } from './token.entity';
 | 
					
 | 
				
			||||||
import { User } from 'src/core/@generated/user/user.model';
 | 
					import { User } from 'src/core/@generated/user/user.model';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { AuthTokens } from './token.entity';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ObjectType()
 | 
					@ObjectType()
 | 
				
			||||||
export class Verify extends AuthTokens {
 | 
					export class Verify extends AuthTokens {
 | 
				
			||||||
  @Field(() => User)
 | 
					  @Field(() => User)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { ArgsType, Field } from '@nestjs/graphql';
 | 
					import { ArgsType, Field } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { IsNotEmpty, IsString } from 'class-validator';
 | 
					import { IsNotEmpty, IsString } from 'class-validator';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ArgsType()
 | 
					@ArgsType()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { ArgsType, Field } from '@nestjs/graphql';
 | 
					import { ArgsType, Field } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { IsNotEmpty, IsString, MinLength } from 'class-validator';
 | 
					import { IsNotEmpty, IsString, MinLength } from 'class-validator';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ArgsType()
 | 
					@ArgsType()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,9 @@
 | 
				
			|||||||
import { Injectable, CanActivate, NotFoundException } from '@nestjs/common';
 | 
					import { Injectable, CanActivate, NotFoundException } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { Observable } from 'rxjs';
 | 
					import { Observable } from 'rxjs';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
import { GoogleStrategy } from '../strategies/google.auth.strategy';
 | 
					import { GoogleStrategy } from 'src/core/auth/strategies/google.auth.strategy';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
export class GoogleProviderEnabledGuard implements CanActivate {
 | 
					export class GoogleProviderEnabledGuard implements CanActivate {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,11 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { AuthService } from './auth.service';
 | 
					
 | 
				
			||||||
import { TokenService } from './token.service';
 | 
					 | 
				
			||||||
import { UserService } from 'src/core/user/user.service';
 | 
					import { UserService } from 'src/core/user/user.service';
 | 
				
			||||||
import { WorkspaceService } from 'src/core/workspace/services/workspace.service';
 | 
					import { WorkspaceService } from 'src/core/workspace/services/workspace.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { AuthService } from './auth.service';
 | 
				
			||||||
 | 
					import { TokenService } from './token.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('AuthService', () => {
 | 
					describe('AuthService', () => {
 | 
				
			||||||
  let service: AuthService;
 | 
					  let service: AuthService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,17 +4,24 @@ import {
 | 
				
			|||||||
  Injectable,
 | 
					  Injectable,
 | 
				
			||||||
  NotFoundException,
 | 
					  NotFoundException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { ChallengeInput } from '../dto/challenge.input';
 | 
					
 | 
				
			||||||
 | 
					import { Prisma } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { ChallengeInput } from 'src/core/auth/dto/challenge.input';
 | 
				
			||||||
import { UserService } from 'src/core/user/user.service';
 | 
					import { UserService } from 'src/core/user/user.service';
 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
import { PASSWORD_REGEX, compareHash, hashPassword } from '../auth.util';
 | 
					import {
 | 
				
			||||||
import { Verify } from '../dto/verify.entity';
 | 
					  PASSWORD_REGEX,
 | 
				
			||||||
import { TokenService } from './token.service';
 | 
					  compareHash,
 | 
				
			||||||
import { Prisma } from '@prisma/client';
 | 
					  hashPassword,
 | 
				
			||||||
import { UserExists } from '../dto/user-exists.entity';
 | 
					} from 'src/core/auth/auth.util';
 | 
				
			||||||
 | 
					import { Verify } from 'src/core/auth/dto/verify.entity';
 | 
				
			||||||
 | 
					import { UserExists } from 'src/core/auth/dto/user-exists.entity';
 | 
				
			||||||
import { WorkspaceService } from 'src/core/workspace/services/workspace.service';
 | 
					import { WorkspaceService } from 'src/core/workspace/services/workspace.service';
 | 
				
			||||||
import { WorkspaceInviteHashValid } from '../dto/workspace-invite-hash-valid.entity';
 | 
					import { WorkspaceInviteHashValid } from 'src/core/auth/dto/workspace-invite-hash-valid.entity';
 | 
				
			||||||
import { SignUpInput } from '../dto/sign-up.input';
 | 
					import { SignUpInput } from 'src/core/auth/dto/sign-up.input';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { TokenService } from './token.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export type UserPayload = {
 | 
					export type UserPayload = {
 | 
				
			||||||
  firstName: string;
 | 
					  firstName: string;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,12 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { TokenService } from './token.service';
 | 
					import { JwtService } from '@nestjs/jwt';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
					import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
				
			||||||
import { JwtService } from '@nestjs/jwt';
 | 
					 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { TokenService } from './token.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('TokenService', () => {
 | 
					describe('TokenService', () => {
 | 
				
			||||||
  let service: TokenService;
 | 
					  let service: TokenService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,13 +7,15 @@ import {
 | 
				
			|||||||
  UnprocessableEntityException,
 | 
					  UnprocessableEntityException,
 | 
				
			||||||
} from '@nestjs/common';
 | 
					} from '@nestjs/common';
 | 
				
			||||||
import { JwtService } from '@nestjs/jwt';
 | 
					import { JwtService } from '@nestjs/jwt';
 | 
				
			||||||
import { JwtPayload } from '../strategies/jwt.auth.strategy';
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					 | 
				
			||||||
import { assert } from 'src/utils/assert';
 | 
					 | 
				
			||||||
import { addMilliseconds } from 'date-fns';
 | 
					import { addMilliseconds } from 'date-fns';
 | 
				
			||||||
import ms from 'ms';
 | 
					import ms from 'ms';
 | 
				
			||||||
import { AuthToken } from '../dto/token.entity';
 | 
					 | 
				
			||||||
import { TokenExpiredError } from 'jsonwebtoken';
 | 
					import { TokenExpiredError } from 'jsonwebtoken';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { JwtPayload } from 'src/core/auth/strategies/jwt.auth.strategy';
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					import { assert } from 'src/utils/assert';
 | 
				
			||||||
 | 
					import { AuthToken } from 'src/core/auth/dto/token.entity';
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,9 @@
 | 
				
			|||||||
import { PassportStrategy } from '@nestjs/passport';
 | 
					import { PassportStrategy } from '@nestjs/passport';
 | 
				
			||||||
import { Strategy, VerifyCallback } from 'passport-google-oauth20';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { Strategy, VerifyCallback } from 'passport-google-oauth20';
 | 
				
			||||||
import { Request } from 'express';
 | 
					import { Request } from 'express';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export type GoogleRequest = Request & {
 | 
					export type GoogleRequest = Request & {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Strategy, ExtractJwt } from 'passport-jwt';
 | 
					 | 
				
			||||||
import { PassportStrategy } from '@nestjs/passport';
 | 
					import { PassportStrategy } from '@nestjs/passport';
 | 
				
			||||||
import { Injectable, UnauthorizedException } from '@nestjs/common';
 | 
					import { Injectable, UnauthorizedException } from '@nestjs/common';
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					
 | 
				
			||||||
 | 
					import { Strategy, ExtractJwt } from 'passport-jwt';
 | 
				
			||||||
import { User, Workspace } from '@prisma/client';
 | 
					import { User, Workspace } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export type JwtPayload = { sub: string; workspaceId: string };
 | 
					export type JwtPayload = { sub: string; workspaceId: string };
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ClientConfigResolver } from './client-config.resolver';
 | 
					import { ClientConfigResolver } from './client-config.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Module({
 | 
					@Module({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,9 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { ClientConfigResolver } from './client-config.resolver';
 | 
					
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { ClientConfigResolver } from './client-config.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('ClientConfigResolver', () => {
 | 
					describe('ClientConfigResolver', () => {
 | 
				
			||||||
  let resolver: ClientConfigResolver;
 | 
					  let resolver: ClientConfigResolver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,7 @@
 | 
				
			|||||||
import { Resolver, Query } from '@nestjs/graphql';
 | 
					import { Resolver, Query } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ClientConfig } from './client-config.entity';
 | 
					import { ClientConfig } from './client-config.entity';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Resolver()
 | 
					@Resolver()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { CommentService } from './services/comment.service';
 | 
					import { CommentService } from './services/comment.service';
 | 
				
			||||||
import { CommentResolver } from './resolvers/comment.resolver';
 | 
					import { CommentResolver } from './resolvers/comment.resolver';
 | 
				
			||||||
import { CommentThreadTargetService } from './services/comment-thread-target.service';
 | 
					import { CommentThreadTargetService } from './services/comment-thread-target.service';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,13 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { CommentThreadResolver } from './comment-thread.resolver';
 | 
					 | 
				
			||||||
import { CommentThreadService } from '../services/comment-thread.service';
 | 
					 | 
				
			||||||
import { CanActivate } from '@nestjs/common';
 | 
					import { CanActivate } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentThreadService } from 'src/core/comment/services/comment-thread.service';
 | 
				
			||||||
import { CreateOneCommentGuard } from 'src/guards/create-one-comment.guard';
 | 
					import { CreateOneCommentGuard } from 'src/guards/create-one-comment.guard';
 | 
				
			||||||
import { CreateOneCommentThreadGuard } from 'src/guards/create-one-comment-thread.guard';
 | 
					import { CreateOneCommentThreadGuard } from 'src/guards/create-one-comment-thread.guard';
 | 
				
			||||||
import { AbilityFactory } from 'src/ability/ability.factory';
 | 
					import { AbilityFactory } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentThreadResolver } from './comment-thread.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('CommentThreadResolver', () => {
 | 
					describe('CommentThreadResolver', () => {
 | 
				
			||||||
  let resolver: CommentThreadResolver;
 | 
					  let resolver: CommentThreadResolver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,13 +1,17 @@
 | 
				
			|||||||
import { Resolver, Args, Mutation, Query } from '@nestjs/graphql';
 | 
					import { Resolver, Args, Mutation, Query } from '@nestjs/graphql';
 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { accessibleBy } from '@casl/prisma';
 | 
				
			||||||
 | 
					import { Prisma } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
					import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
				
			||||||
import { Workspace } from '../../../core/@generated/workspace/workspace.model';
 | 
					import { Workspace } from 'src/core/@generated/workspace/workspace.model';
 | 
				
			||||||
import { AuthWorkspace } from '../../../decorators/auth-workspace.decorator';
 | 
					import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator';
 | 
				
			||||||
import { CommentThread } from '../../../core/@generated/comment-thread/comment-thread.model';
 | 
					import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model';
 | 
				
			||||||
import { CreateOneCommentThreadArgs } from '../../../core/@generated/comment-thread/create-one-comment-thread.args';
 | 
					import { CreateOneCommentThreadArgs } from 'src/core/@generated/comment-thread/create-one-comment-thread.args';
 | 
				
			||||||
import { CreateOneCommentThreadGuard } from '../../../guards/create-one-comment-thread.guard';
 | 
					import { CreateOneCommentThreadGuard } from 'src/guards/create-one-comment-thread.guard';
 | 
				
			||||||
import { FindManyCommentThreadArgs } from '../../../core/@generated/comment-thread/find-many-comment-thread.args';
 | 
					import { FindManyCommentThreadArgs } from 'src/core/@generated/comment-thread/find-many-comment-thread.args';
 | 
				
			||||||
import { CommentThreadService } from '../services/comment-thread.service';
 | 
					import { CommentThreadService } from 'src/core/comment/services/comment-thread.service';
 | 
				
			||||||
import { UpdateOneCommentThreadArgs } from 'src/core/@generated/comment-thread/update-one-comment-thread.args';
 | 
					import { UpdateOneCommentThreadArgs } from 'src/core/@generated/comment-thread/update-one-comment-thread.args';
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  PrismaSelector,
 | 
					  PrismaSelector,
 | 
				
			||||||
@@ -23,10 +27,8 @@ import {
 | 
				
			|||||||
} from 'src/ability/handlers/comment-thread.ability-handler';
 | 
					} from 'src/ability/handlers/comment-thread.ability-handler';
 | 
				
			||||||
import { UserAbility } from 'src/decorators/user-ability.decorator';
 | 
					import { UserAbility } from 'src/decorators/user-ability.decorator';
 | 
				
			||||||
import { AppAbility } from 'src/ability/ability.factory';
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
import { accessibleBy } from '@casl/prisma';
 | 
					 | 
				
			||||||
import { AffectedRows } from 'src/core/@generated/prisma/affected-rows.output';
 | 
					import { AffectedRows } from 'src/core/@generated/prisma/affected-rows.output';
 | 
				
			||||||
import { DeleteManyCommentThreadArgs } from 'src/core/@generated/comment-thread/delete-many-comment-thread.args';
 | 
					import { DeleteManyCommentThreadArgs } from 'src/core/@generated/comment-thread/delete-many-comment-thread.args';
 | 
				
			||||||
import { Prisma } from '@prisma/client';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@UseGuards(JwtAuthGuard)
 | 
					@UseGuards(JwtAuthGuard)
 | 
				
			||||||
@Resolver(() => CommentThread)
 | 
					@Resolver(() => CommentThread)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,12 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { CommentResolver } from './comment.resolver';
 | 
					 | 
				
			||||||
import { CommentService } from '../services/comment.service';
 | 
					 | 
				
			||||||
import { CreateOneCommentGuard } from 'src/guards/create-one-comment.guard';
 | 
					 | 
				
			||||||
import { CanActivate } from '@nestjs/common';
 | 
					import { CanActivate } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentService } from 'src/core/comment/services/comment.service';
 | 
				
			||||||
 | 
					import { CreateOneCommentGuard } from 'src/guards/create-one-comment.guard';
 | 
				
			||||||
import { AbilityFactory } from 'src/ability/ability.factory';
 | 
					import { AbilityFactory } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentResolver } from './comment.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('CommentResolver', () => {
 | 
					describe('CommentResolver', () => {
 | 
				
			||||||
  let resolver: CommentResolver;
 | 
					  let resolver: CommentResolver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,12 +1,15 @@
 | 
				
			|||||||
import { Resolver, Args, Mutation } from '@nestjs/graphql';
 | 
					import { Resolver, Args, Mutation } from '@nestjs/graphql';
 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { Prisma } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
					import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
				
			||||||
import { Workspace } from '../../../core/@generated/workspace/workspace.model';
 | 
					import { Workspace } from 'src/core/@generated/workspace/workspace.model';
 | 
				
			||||||
import { AuthWorkspace } from '../../../decorators/auth-workspace.decorator';
 | 
					import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator';
 | 
				
			||||||
import { CreateOneCommentArgs } from '../../../core/@generated/comment/create-one-comment.args';
 | 
					import { CreateOneCommentArgs } from 'src/core/@generated/comment/create-one-comment.args';
 | 
				
			||||||
import { Comment } from '../../../core/@generated/comment/comment.model';
 | 
					import { Comment } from 'src/core/@generated/comment/comment.model';
 | 
				
			||||||
import { CreateOneCommentGuard } from '../../../guards/create-one-comment.guard';
 | 
					import { CreateOneCommentGuard } from 'src/guards/create-one-comment.guard';
 | 
				
			||||||
import { CommentService } from '../services/comment.service';
 | 
					import { CommentService } from 'src/core/comment/services/comment.service';
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  PrismaSelector,
 | 
					  PrismaSelector,
 | 
				
			||||||
  PrismaSelect,
 | 
					  PrismaSelect,
 | 
				
			||||||
@@ -16,7 +19,6 @@ import { CheckAbilities } from 'src/decorators/check-abilities.decorator';
 | 
				
			|||||||
import { CreateCommentAbilityHandler } from 'src/ability/handlers/comment.ability-handler';
 | 
					import { CreateCommentAbilityHandler } from 'src/ability/handlers/comment.ability-handler';
 | 
				
			||||||
import { AuthUser } from 'src/decorators/auth-user.decorator';
 | 
					import { AuthUser } from 'src/decorators/auth-user.decorator';
 | 
				
			||||||
import { User } from 'src/core/@generated/user/user.model';
 | 
					import { User } from 'src/core/@generated/user/user.model';
 | 
				
			||||||
import { Prisma } from '@prisma/client';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@UseGuards(JwtAuthGuard)
 | 
					@UseGuards(JwtAuthGuard)
 | 
				
			||||||
@Resolver(() => Comment)
 | 
					@Resolver(() => Comment)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { CommentThreadTargetService } from './comment-thread-target.service';
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
					import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentThreadTargetService } from './comment-thread-target.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('CommentThreadTargetService', () => {
 | 
					describe('CommentThreadTargetService', () => {
 | 
				
			||||||
  let service: CommentThreadTargetService;
 | 
					  let service: CommentThreadTargetService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { CommentThreadService } from './comment-thread.service';
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
					import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentThreadService } from './comment-thread.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('CommentThreadService', () => {
 | 
					describe('CommentThreadService', () => {
 | 
				
			||||||
  let service: CommentThreadService;
 | 
					  let service: CommentThreadService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { CommentService } from './comment.service';
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
					import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentService } from './comment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('CommentService', () => {
 | 
					describe('CommentService', () => {
 | 
				
			||||||
  let service: CommentService;
 | 
					  let service: CommentService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentThreadService } from 'src/core/comment/services/comment-thread.service';
 | 
				
			||||||
 | 
					import { CommentService } from 'src/core/comment/services/comment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { CompanyRelationsResolver } from './company-relations.resolver';
 | 
					import { CompanyRelationsResolver } from './company-relations.resolver';
 | 
				
			||||||
import { CompanyService } from './company.service';
 | 
					import { CompanyService } from './company.service';
 | 
				
			||||||
import { CommentThreadService } from '../comment/services/comment-thread.service';
 | 
					 | 
				
			||||||
import { CommentService } from '../comment/services/comment.service';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('CompanyRelationsResolver', () => {
 | 
					describe('CompanyRelationsResolver', () => {
 | 
				
			||||||
  let resolver: CompanyRelationsResolver;
 | 
					  let resolver: CompanyRelationsResolver;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,10 @@
 | 
				
			|||||||
import { Resolver, ResolveField, Root, Int } from '@nestjs/graphql';
 | 
					import { Resolver, ResolveField, Root, Int } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model';
 | 
					import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model';
 | 
				
			||||||
import { Comment } from 'src/core/@generated/comment/comment.model';
 | 
					import { Comment } from 'src/core/@generated/comment/comment.model';
 | 
				
			||||||
import { Company } from 'src/core/@generated/company/company.model';
 | 
					import { Company } from 'src/core/@generated/company/company.model';
 | 
				
			||||||
import { CommentThreadService } from '../comment/services/comment-thread.service';
 | 
					import { CommentThreadService } from 'src/core/comment/services/comment-thread.service';
 | 
				
			||||||
import { CommentService } from '../comment/services/comment.service';
 | 
					import { CommentService } from 'src/core/comment/services/comment.service';
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  PrismaSelect,
 | 
					  PrismaSelect,
 | 
				
			||||||
  PrismaSelector,
 | 
					  PrismaSelector,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentModule } from 'src/core/comment/comment.module';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { CompanyService } from './company.service';
 | 
					import { CompanyService } from './company.service';
 | 
				
			||||||
import { CompanyResolver } from './company.resolver';
 | 
					import { CompanyResolver } from './company.resolver';
 | 
				
			||||||
import { CompanyRelationsResolver } from './company-relations.resolver';
 | 
					import { CompanyRelationsResolver } from './company-relations.resolver';
 | 
				
			||||||
import { CommentModule } from '../comment/comment.module';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Module({
 | 
					@Module({
 | 
				
			||||||
  imports: [CommentModule],
 | 
					  imports: [CommentModule],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,12 +1,14 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { CompanyResolver } from './company.resolver';
 | 
					 | 
				
			||||||
import { CompanyService } from './company.service';
 | 
					 | 
				
			||||||
import { UpdateOneGuard } from 'src/guards/update-one.guard';
 | 
					 | 
				
			||||||
import { CanActivate } from '@nestjs/common';
 | 
					import { CanActivate } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { UpdateOneGuard } from 'src/guards/update-one.guard';
 | 
				
			||||||
import { DeleteManyGuard } from 'src/guards/delete-many.guard';
 | 
					import { DeleteManyGuard } from 'src/guards/delete-many.guard';
 | 
				
			||||||
import { CreateOneGuard } from 'src/guards/create-one.guard';
 | 
					import { CreateOneGuard } from 'src/guards/create-one.guard';
 | 
				
			||||||
import { AbilityFactory } from 'src/ability/ability.factory';
 | 
					import { AbilityFactory } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CompanyService } from './company.service';
 | 
				
			||||||
 | 
					import { CompanyResolver } from './company.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('CompanyResolver', () => {
 | 
					describe('CompanyResolver', () => {
 | 
				
			||||||
  let resolver: CompanyResolver;
 | 
					  let resolver: CompanyResolver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,18 +1,20 @@
 | 
				
			|||||||
import { Resolver, Query, Args, Mutation } from '@nestjs/graphql';
 | 
					import { Resolver, Query, Args, Mutation } from '@nestjs/graphql';
 | 
				
			||||||
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
					 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
import { AuthWorkspace } from '../../decorators/auth-workspace.decorator';
 | 
					
 | 
				
			||||||
import { Company } from '../../core/@generated/company/company.model';
 | 
					 | 
				
			||||||
import { FindManyCompanyArgs } from '../../core/@generated/company/find-many-company.args';
 | 
					 | 
				
			||||||
import { UpdateOneCompanyArgs } from '../../core/@generated/company/update-one-company.args';
 | 
					 | 
				
			||||||
import { CreateOneCompanyArgs } from '../../core/@generated/company/create-one-company.args';
 | 
					 | 
				
			||||||
import { AffectedRows } from '../../core/@generated/prisma/affected-rows.output';
 | 
					 | 
				
			||||||
import { DeleteManyCompanyArgs } from '../../core/@generated/company/delete-many-company.args';
 | 
					 | 
				
			||||||
import { Prisma, Workspace } from '@prisma/client';
 | 
					import { Prisma, Workspace } from '@prisma/client';
 | 
				
			||||||
import { UpdateOneGuard } from '../../guards/update-one.guard';
 | 
					import { accessibleBy } from '@casl/prisma';
 | 
				
			||||||
import { DeleteManyGuard } from '../../guards/delete-many.guard';
 | 
					
 | 
				
			||||||
import { CreateOneGuard } from '../../guards/create-one.guard';
 | 
					import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
				
			||||||
import { CompanyService } from './company.service';
 | 
					import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator';
 | 
				
			||||||
 | 
					import { Company } from 'src/core/@generated/company/company.model';
 | 
				
			||||||
 | 
					import { FindManyCompanyArgs } from 'src/core/@generated/company/find-many-company.args';
 | 
				
			||||||
 | 
					import { UpdateOneCompanyArgs } from 'src/core/@generated/company/update-one-company.args';
 | 
				
			||||||
 | 
					import { CreateOneCompanyArgs } from 'src/core/@generated/company/create-one-company.args';
 | 
				
			||||||
 | 
					import { AffectedRows } from 'src/core/@generated/prisma/affected-rows.output';
 | 
				
			||||||
 | 
					import { DeleteManyCompanyArgs } from 'src/core/@generated/company/delete-many-company.args';
 | 
				
			||||||
 | 
					import { UpdateOneGuard } from 'src/guards/update-one.guard';
 | 
				
			||||||
 | 
					import { DeleteManyGuard } from 'src/guards/delete-many.guard';
 | 
				
			||||||
 | 
					import { CreateOneGuard } from 'src/guards/create-one.guard';
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  PrismaSelect,
 | 
					  PrismaSelect,
 | 
				
			||||||
  PrismaSelector,
 | 
					  PrismaSelector,
 | 
				
			||||||
@@ -27,7 +29,8 @@ import {
 | 
				
			|||||||
} from 'src/ability/handlers/company.ability-handler';
 | 
					} from 'src/ability/handlers/company.ability-handler';
 | 
				
			||||||
import { UserAbility } from 'src/decorators/user-ability.decorator';
 | 
					import { UserAbility } from 'src/decorators/user-ability.decorator';
 | 
				
			||||||
import { AppAbility } from 'src/ability/ability.factory';
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
import { accessibleBy } from '@casl/prisma';
 | 
					
 | 
				
			||||||
 | 
					import { CompanyService } from './company.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@UseGuards(JwtAuthGuard)
 | 
					@UseGuards(JwtAuthGuard)
 | 
				
			||||||
@Resolver(() => Company)
 | 
					@Resolver(() => Company)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { CompanyService } from './company.service';
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
					import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CompanyService } from './company.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('CompanyService', () => {
 | 
					describe('CompanyService', () => {
 | 
				
			||||||
  let service: CompanyService;
 | 
					  let service: CompanyService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { UserModule } from './user/user.module';
 | 
					import { UserModule } from './user/user.module';
 | 
				
			||||||
import { CommentModule } from './comment/comment.module';
 | 
					import { CommentModule } from './comment/comment.module';
 | 
				
			||||||
import { CompanyModule } from './company/company.module';
 | 
					import { CompanyModule } from './company/company.module';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,8 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileService } from 'src/core/file/services/file.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { FileController } from './file.controller';
 | 
					import { FileController } from './file.controller';
 | 
				
			||||||
import { FileService } from '../services/file.service';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('FileController', () => {
 | 
					describe('FileController', () => {
 | 
				
			||||||
  let controller: FileController;
 | 
					  let controller: FileController;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,9 @@
 | 
				
			|||||||
import { Controller, Get, Param, Res } from '@nestjs/common';
 | 
					import { Controller, Get, Param, Res } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { Response } from 'express';
 | 
					import { Response } from 'express';
 | 
				
			||||||
import { checkFilePath, checkFilename } from '../file.utils';
 | 
					
 | 
				
			||||||
import { FileService } from '../services/file.service';
 | 
					import { checkFilePath, checkFilename } from 'src/core/file/file.utils';
 | 
				
			||||||
 | 
					import { FileService } from 'src/core/file/services/file.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// TODO: Add cookie authentication
 | 
					// TODO: Add cookie authentication
 | 
				
			||||||
@Controller('files')
 | 
					@Controller('files')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { FileService } from './services/file.service';
 | 
					import { FileService } from './services/file.service';
 | 
				
			||||||
import { FileUploadService } from './services/file-upload.service';
 | 
					import { FileUploadService } from './services/file-upload.service';
 | 
				
			||||||
import { FileUploadResolver } from './resolvers/file-upload.resolver';
 | 
					import { FileUploadResolver } from './resolvers/file-upload.resolver';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,14 @@
 | 
				
			|||||||
import { kebabCase } from 'src/utils/kebab-case';
 | 
					 | 
				
			||||||
import { FileFolder } from './interfaces/file-folder.interface';
 | 
					 | 
				
			||||||
import { KebabCase } from 'type-fest';
 | 
					 | 
				
			||||||
import { BadRequestException } from '@nestjs/common';
 | 
					import { BadRequestException } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { basename } from 'path';
 | 
					import { basename } from 'path';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { KebabCase } from 'type-fest';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { kebabCase } from 'src/utils/kebab-case';
 | 
				
			||||||
import { settings } from 'src/constants/settings';
 | 
					import { settings } from 'src/constants/settings';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileFolder } from './interfaces/file-folder.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type AllowedFolders = KebabCase<keyof typeof FileFolder>;
 | 
					type AllowedFolders = KebabCase<keyof typeof FileFolder>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function checkFilePath(filePath: string): string {
 | 
					export function checkFilePath(filePath: string): string {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,8 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileUploadService } from 'src/core/file/services/file-upload.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { FileUploadResolver } from './file-upload.resolver';
 | 
					import { FileUploadResolver } from './file-upload.resolver';
 | 
				
			||||||
import { FileUploadService } from '../services/file-upload.service';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('FileUploadResolver', () => {
 | 
					describe('FileUploadResolver', () => {
 | 
				
			||||||
  let resolver: FileUploadResolver;
 | 
					  let resolver: FileUploadResolver;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,13 @@
 | 
				
			|||||||
import { Args, Mutation, Resolver } from '@nestjs/graphql';
 | 
					import { Args, Mutation, Resolver } from '@nestjs/graphql';
 | 
				
			||||||
import { GraphQLUpload, FileUpload } from 'graphql-upload';
 | 
					 | 
				
			||||||
import { FileUploadService } from '../services/file-upload.service';
 | 
					 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { GraphQLUpload, FileUpload } from 'graphql-upload';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileFolder } from 'src/core/file/interfaces/file-folder.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileUploadService } from 'src/core/file/services/file-upload.service';
 | 
				
			||||||
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
					import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
				
			||||||
import { streamToBuffer } from 'src/utils/stream-to-buffer';
 | 
					import { streamToBuffer } from 'src/utils/stream-to-buffer';
 | 
				
			||||||
import { FileFolder } from '../interfaces/file-folder.interface';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@UseGuards(JwtAuthGuard)
 | 
					@UseGuards(JwtAuthGuard)
 | 
				
			||||||
@Resolver()
 | 
					@Resolver()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { FileUploadService } from './file-upload.service';
 | 
					
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
import { FileStorageService } from 'src/integrations/file-storage/file-storage.service';
 | 
					import { FileStorageService } from 'src/integrations/file-storage/file-storage.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileUploadService } from './file-upload.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('FileUploadService', () => {
 | 
					describe('FileUploadService', () => {
 | 
				
			||||||
  let service: FileUploadService;
 | 
					  let service: FileUploadService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,13 @@
 | 
				
			|||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import sharp from 'sharp';
 | 
					import sharp from 'sharp';
 | 
				
			||||||
 | 
					import { v4 as uuidV4 } from 'uuid';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileFolder } from 'src/core/file/interfaces/file-folder.interface';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { getCropSize } from 'src/utils/image';
 | 
					import { getCropSize } from 'src/utils/image';
 | 
				
			||||||
import { settings } from 'src/constants/settings';
 | 
					import { settings } from 'src/constants/settings';
 | 
				
			||||||
import { FileFolder } from '../interfaces/file-folder.interface';
 | 
					 | 
				
			||||||
import { FileStorageService } from 'src/integrations/file-storage/file-storage.service';
 | 
					import { FileStorageService } from 'src/integrations/file-storage/file-storage.service';
 | 
				
			||||||
import { v4 as uuidV4 } from 'uuid';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
export class FileUploadService {
 | 
					export class FileUploadService {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { FileService } from './file.service';
 | 
					
 | 
				
			||||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
					import { EnvironmentService } from 'src/integrations/environment/environment.service';
 | 
				
			||||||
import { FileStorageService } from 'src/integrations/file-storage/file-storage.service';
 | 
					import { FileStorageService } from 'src/integrations/file-storage/file-storage.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { FileService } from './file.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('FileService', () => {
 | 
					describe('FileService', () => {
 | 
				
			||||||
  let service: FileService;
 | 
					  let service: FileService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { FileStorageService } from 'src/integrations/file-storage/file-storage.service';
 | 
					import { FileStorageService } from 'src/integrations/file-storage/file-storage.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentThreadService } from 'src/core/comment/services/comment-thread.service';
 | 
				
			||||||
 | 
					import { CommentService } from 'src/core/comment/services/comment.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PersonRelationsResolver } from './person-relations.resolver';
 | 
					import { PersonRelationsResolver } from './person-relations.resolver';
 | 
				
			||||||
import { PersonService } from './person.service';
 | 
					import { PersonService } from './person.service';
 | 
				
			||||||
import { CommentThreadService } from '../comment/services/comment-thread.service';
 | 
					 | 
				
			||||||
import { CommentService } from '../comment/services/comment.service';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('PersonRelationsResolver', () => {
 | 
					describe('PersonRelationsResolver', () => {
 | 
				
			||||||
  let resolver: PersonRelationsResolver;
 | 
					  let resolver: PersonRelationsResolver;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,10 @@
 | 
				
			|||||||
import { Resolver, Root, ResolveField, Int } from '@nestjs/graphql';
 | 
					import { Resolver, Root, ResolveField, Int } from '@nestjs/graphql';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model';
 | 
					import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model';
 | 
				
			||||||
import { Comment } from 'src/core/@generated/comment/comment.model';
 | 
					import { Comment } from 'src/core/@generated/comment/comment.model';
 | 
				
			||||||
import { Person } from 'src/core/@generated/person/person.model';
 | 
					import { Person } from 'src/core/@generated/person/person.model';
 | 
				
			||||||
import { CommentThreadService } from '../comment/services/comment-thread.service';
 | 
					import { CommentThreadService } from 'src/core/comment/services/comment-thread.service';
 | 
				
			||||||
import { CommentService } from '../comment/services/comment.service';
 | 
					import { CommentService } from 'src/core/comment/services/comment.service';
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  PrismaSelect,
 | 
					  PrismaSelect,
 | 
				
			||||||
  PrismaSelector,
 | 
					  PrismaSelector,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { CommentModule } from 'src/core/comment/comment.module';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PersonService } from './person.service';
 | 
					import { PersonService } from './person.service';
 | 
				
			||||||
import { PersonResolver } from './person.resolver';
 | 
					import { PersonResolver } from './person.resolver';
 | 
				
			||||||
import { PersonRelationsResolver } from './person-relations.resolver';
 | 
					import { PersonRelationsResolver } from './person-relations.resolver';
 | 
				
			||||||
import { CommentModule } from '../comment/comment.module';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Module({
 | 
					@Module({
 | 
				
			||||||
  imports: [CommentModule, CommentModule],
 | 
					  imports: [CommentModule, CommentModule],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,12 +1,14 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { PersonResolver } from './person.resolver';
 | 
					 | 
				
			||||||
import { PersonService } from './person.service';
 | 
					 | 
				
			||||||
import { UpdateOneGuard } from 'src/guards/update-one.guard';
 | 
					 | 
				
			||||||
import { CanActivate } from '@nestjs/common';
 | 
					import { CanActivate } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { UpdateOneGuard } from 'src/guards/update-one.guard';
 | 
				
			||||||
import { DeleteManyGuard } from 'src/guards/delete-many.guard';
 | 
					import { DeleteManyGuard } from 'src/guards/delete-many.guard';
 | 
				
			||||||
import { CreateOneGuard } from 'src/guards/create-one.guard';
 | 
					import { CreateOneGuard } from 'src/guards/create-one.guard';
 | 
				
			||||||
import { AbilityFactory } from 'src/ability/ability.factory';
 | 
					import { AbilityFactory } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PersonService } from './person.service';
 | 
				
			||||||
 | 
					import { PersonResolver } from './person.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('PersonResolver', () => {
 | 
					describe('PersonResolver', () => {
 | 
				
			||||||
  let resolver: PersonResolver;
 | 
					  let resolver: PersonResolver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,19 +7,22 @@ import {
 | 
				
			|||||||
  Parent,
 | 
					  Parent,
 | 
				
			||||||
} from '@nestjs/graphql';
 | 
					} from '@nestjs/graphql';
 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { accessibleBy } from '@casl/prisma';
 | 
				
			||||||
 | 
					import { Prisma } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
					import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
				
			||||||
import { Person } from '../../core/@generated/person/person.model';
 | 
					import { Person } from 'src/core/@generated/person/person.model';
 | 
				
			||||||
import { FindManyPersonArgs } from '../../core/@generated/person/find-many-person.args';
 | 
					import { FindManyPersonArgs } from 'src/core/@generated/person/find-many-person.args';
 | 
				
			||||||
import { UpdateOnePersonArgs } from '../../core/@generated/person/update-one-person.args';
 | 
					import { UpdateOnePersonArgs } from 'src/core/@generated/person/update-one-person.args';
 | 
				
			||||||
import { CreateOnePersonArgs } from '../../core/@generated/person/create-one-person.args';
 | 
					import { CreateOnePersonArgs } from 'src/core/@generated/person/create-one-person.args';
 | 
				
			||||||
import { AffectedRows } from '../../core/@generated/prisma/affected-rows.output';
 | 
					import { AffectedRows } from 'src/core/@generated/prisma/affected-rows.output';
 | 
				
			||||||
import { DeleteManyPersonArgs } from '../../core/@generated/person/delete-many-person.args';
 | 
					import { DeleteManyPersonArgs } from 'src/core/@generated/person/delete-many-person.args';
 | 
				
			||||||
import { Workspace } from '../../core/@generated/workspace/workspace.model';
 | 
					import { Workspace } from 'src/core/@generated/workspace/workspace.model';
 | 
				
			||||||
import { AuthWorkspace } from '../../decorators/auth-workspace.decorator';
 | 
					import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator';
 | 
				
			||||||
import { UpdateOneGuard } from '../../guards/update-one.guard';
 | 
					import { UpdateOneGuard } from 'src/guards/update-one.guard';
 | 
				
			||||||
import { DeleteManyGuard } from '../../guards/delete-many.guard';
 | 
					import { DeleteManyGuard } from 'src/guards/delete-many.guard';
 | 
				
			||||||
import { CreateOneGuard } from '../../guards/create-one.guard';
 | 
					import { CreateOneGuard } from 'src/guards/create-one.guard';
 | 
				
			||||||
import { PersonService } from './person.service';
 | 
					 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  PrismaSelect,
 | 
					  PrismaSelect,
 | 
				
			||||||
  PrismaSelector,
 | 
					  PrismaSelector,
 | 
				
			||||||
@@ -34,8 +37,8 @@ import {
 | 
				
			|||||||
} from 'src/ability/handlers/person.ability-handler';
 | 
					} from 'src/ability/handlers/person.ability-handler';
 | 
				
			||||||
import { UserAbility } from 'src/decorators/user-ability.decorator';
 | 
					import { UserAbility } from 'src/decorators/user-ability.decorator';
 | 
				
			||||||
import { AppAbility } from 'src/ability/ability.factory';
 | 
					import { AppAbility } from 'src/ability/ability.factory';
 | 
				
			||||||
import { accessibleBy } from '@casl/prisma';
 | 
					
 | 
				
			||||||
import { Prisma } from '@prisma/client';
 | 
					import { PersonService } from './person.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@UseGuards(JwtAuthGuard)
 | 
					@UseGuards(JwtAuthGuard)
 | 
				
			||||||
@Resolver(() => Person)
 | 
					@Resolver(() => Person)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { PersonService } from './person.service';
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
					import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PersonService } from './person.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('PersonService', () => {
 | 
					describe('PersonService', () => {
 | 
				
			||||||
  let service: PersonService;
 | 
					  let service: PersonService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Injectable } from '@nestjs/common';
 | 
					import { Injectable } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Injectable()
 | 
					@Injectable()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { Module } from '@nestjs/common';
 | 
					import { Module } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { PipelineService } from './services/pipeline.service';
 | 
					import { PipelineService } from './services/pipeline.service';
 | 
				
			||||||
import { PipelineResolver } from './resolvers/pipeline.resolver';
 | 
					import { PipelineResolver } from './resolvers/pipeline.resolver';
 | 
				
			||||||
import { PipelineStageResolver } from './resolvers/pipeline-stage.resolver';
 | 
					import { PipelineStageResolver } from './resolvers/pipeline-stage.resolver';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { PipelineProgressResolver } from './pipeline-progress.resolver';
 | 
					
 | 
				
			||||||
import { PipelineProgressService } from '../services/pipeline-progress.service';
 | 
					import { PipelineProgressService } from 'src/core/pipeline/services/pipeline-progress.service';
 | 
				
			||||||
import { AbilityFactory } from 'src/ability/ability.factory';
 | 
					import { AbilityFactory } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PipelineProgressResolver } from './pipeline-progress.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('PipelineProgressResolver', () => {
 | 
					describe('PipelineProgressResolver', () => {
 | 
				
			||||||
  let resolver: PipelineProgressResolver;
 | 
					  let resolver: PipelineProgressResolver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,19 @@
 | 
				
			|||||||
import { Resolver, Args, Query, Mutation } from '@nestjs/graphql';
 | 
					import { Resolver, Args, Query, Mutation } from '@nestjs/graphql';
 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { accessibleBy } from '@casl/prisma';
 | 
					import { accessibleBy } from '@casl/prisma';
 | 
				
			||||||
 | 
					import { Prisma } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
					import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
				
			||||||
import { Workspace } from '../../../core/@generated/workspace/workspace.model';
 | 
					import { Workspace } from 'src/core/@generated/workspace/workspace.model';
 | 
				
			||||||
import { AuthWorkspace } from '../../../decorators/auth-workspace.decorator';
 | 
					import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator';
 | 
				
			||||||
import { FindManyPipelineProgressArgs } from '../../@generated/pipeline-progress/find-many-pipeline-progress.args';
 | 
					import { FindManyPipelineProgressArgs } from 'src/core/@generated/pipeline-progress/find-many-pipeline-progress.args';
 | 
				
			||||||
import { PipelineProgress } from '../../@generated/pipeline-progress/pipeline-progress.model';
 | 
					import { PipelineProgress } from 'src/core/@generated/pipeline-progress/pipeline-progress.model';
 | 
				
			||||||
import { UpdateOnePipelineProgressArgs } from '../../@generated/pipeline-progress/update-one-pipeline-progress.args';
 | 
					import { UpdateOnePipelineProgressArgs } from 'src/core/@generated/pipeline-progress/update-one-pipeline-progress.args';
 | 
				
			||||||
import { AffectedRows } from '../../@generated/prisma/affected-rows.output';
 | 
					import { AffectedRows } from 'src/core/@generated/prisma/affected-rows.output';
 | 
				
			||||||
import { DeleteManyPipelineProgressArgs } from '../../@generated/pipeline-progress/delete-many-pipeline-progress.args';
 | 
					import { DeleteManyPipelineProgressArgs } from 'src/core/@generated/pipeline-progress/delete-many-pipeline-progress.args';
 | 
				
			||||||
import { CreateOnePipelineProgressArgs } from '../../@generated/pipeline-progress/create-one-pipeline-progress.args';
 | 
					import { CreateOnePipelineProgressArgs } from 'src/core/@generated/pipeline-progress/create-one-pipeline-progress.args';
 | 
				
			||||||
import { PipelineProgressService } from '../services/pipeline-progress.service';
 | 
					import { PipelineProgressService } from 'src/core/pipeline/services/pipeline-progress.service';
 | 
				
			||||||
import { AbilityGuard } from 'src/guards/ability.guard';
 | 
					import { AbilityGuard } from 'src/guards/ability.guard';
 | 
				
			||||||
import { CheckAbilities } from 'src/decorators/check-abilities.decorator';
 | 
					import { CheckAbilities } from 'src/decorators/check-abilities.decorator';
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
@@ -25,7 +28,6 @@ import {
 | 
				
			|||||||
  PrismaSelector,
 | 
					  PrismaSelector,
 | 
				
			||||||
  PrismaSelect,
 | 
					  PrismaSelect,
 | 
				
			||||||
} from 'src/decorators/prisma-select.decorator';
 | 
					} from 'src/decorators/prisma-select.decorator';
 | 
				
			||||||
import { Prisma } from '@prisma/client';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@UseGuards(JwtAuthGuard)
 | 
					@UseGuards(JwtAuthGuard)
 | 
				
			||||||
@Resolver(() => PipelineProgress)
 | 
					@Resolver(() => PipelineProgress)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { PipelineStageResolver } from './pipeline-stage.resolver';
 | 
					
 | 
				
			||||||
import { PipelineStageService } from '../services/pipeline-stage.service';
 | 
					import { PipelineStageService } from 'src/core/pipeline/services/pipeline-stage.service';
 | 
				
			||||||
import { AbilityFactory } from 'src/ability/ability.factory';
 | 
					import { AbilityFactory } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PipelineStageResolver } from './pipeline-stage.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('PipelineStageResolver', () => {
 | 
					describe('PipelineStageResolver', () => {
 | 
				
			||||||
  let resolver: PipelineStageResolver;
 | 
					  let resolver: PipelineStageResolver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,13 @@
 | 
				
			|||||||
import { Resolver, Args, Query, Mutation } from '@nestjs/graphql';
 | 
					import { Resolver, Args, Query, Mutation } from '@nestjs/graphql';
 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { accessibleBy } from '@casl/prisma';
 | 
					import { accessibleBy } from '@casl/prisma';
 | 
				
			||||||
 | 
					import { Prisma } from '@prisma/client';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
					import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
				
			||||||
import { PipelineStage } from '../../../core/@generated/pipeline-stage/pipeline-stage.model';
 | 
					import { PipelineStage } from 'src/core/@generated/pipeline-stage/pipeline-stage.model';
 | 
				
			||||||
import { FindManyPipelineStageArgs } from '../../../core/@generated/pipeline-stage/find-many-pipeline-stage.args';
 | 
					import { FindManyPipelineStageArgs } from 'src/core/@generated/pipeline-stage/find-many-pipeline-stage.args';
 | 
				
			||||||
import { PipelineStageService } from '../services/pipeline-stage.service';
 | 
					import { PipelineStageService } from 'src/core/pipeline/services/pipeline-stage.service';
 | 
				
			||||||
import { AbilityGuard } from 'src/guards/ability.guard';
 | 
					import { AbilityGuard } from 'src/guards/ability.guard';
 | 
				
			||||||
import { CheckAbilities } from 'src/decorators/check-abilities.decorator';
 | 
					import { CheckAbilities } from 'src/decorators/check-abilities.decorator';
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
@@ -18,7 +21,6 @@ import {
 | 
				
			|||||||
  PrismaSelect,
 | 
					  PrismaSelect,
 | 
				
			||||||
} from 'src/decorators/prisma-select.decorator';
 | 
					} from 'src/decorators/prisma-select.decorator';
 | 
				
			||||||
import { UpdateOnePipelineStageArgs } from 'src/core/@generated/pipeline-stage/update-one-pipeline-stage.args';
 | 
					import { UpdateOnePipelineStageArgs } from 'src/core/@generated/pipeline-stage/update-one-pipeline-stage.args';
 | 
				
			||||||
import { Prisma } from '@prisma/client';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@UseGuards(JwtAuthGuard)
 | 
					@UseGuards(JwtAuthGuard)
 | 
				
			||||||
@Resolver(() => PipelineStage)
 | 
					@Resolver(() => PipelineStage)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { PipelineResolver } from './pipeline.resolver';
 | 
					
 | 
				
			||||||
import { PipelineService } from '../services/pipeline.service';
 | 
					import { PipelineService } from 'src/core/pipeline/services/pipeline.service';
 | 
				
			||||||
import { AbilityFactory } from 'src/ability/ability.factory';
 | 
					import { AbilityFactory } from 'src/ability/ability.factory';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PipelineResolver } from './pipeline.resolver';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('PipelineResolver', () => {
 | 
					describe('PipelineResolver', () => {
 | 
				
			||||||
  let resolver: PipelineResolver;
 | 
					  let resolver: PipelineResolver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,12 @@
 | 
				
			|||||||
import { Resolver, Args, Query } from '@nestjs/graphql';
 | 
					import { Resolver, Args, Query } from '@nestjs/graphql';
 | 
				
			||||||
import { UseGuards } from '@nestjs/common';
 | 
					import { UseGuards } from '@nestjs/common';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { accessibleBy } from '@casl/prisma';
 | 
					import { accessibleBy } from '@casl/prisma';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
					import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
 | 
				
			||||||
import { Pipeline } from '../../@generated/pipeline/pipeline.model';
 | 
					import { Pipeline } from 'src/core/@generated/pipeline/pipeline.model';
 | 
				
			||||||
import { FindManyPipelineArgs } from '../../@generated/pipeline/find-many-pipeline.args';
 | 
					import { FindManyPipelineArgs } from 'src/core/@generated/pipeline/find-many-pipeline.args';
 | 
				
			||||||
import { PipelineService } from '../services/pipeline.service';
 | 
					import { PipelineService } from 'src/core/pipeline/services/pipeline.service';
 | 
				
			||||||
import { AbilityGuard } from 'src/guards/ability.guard';
 | 
					import { AbilityGuard } from 'src/guards/ability.guard';
 | 
				
			||||||
import { CheckAbilities } from 'src/decorators/check-abilities.decorator';
 | 
					import { CheckAbilities } from 'src/decorators/check-abilities.decorator';
 | 
				
			||||||
import { ReadPipelineAbilityHandler } from 'src/ability/handlers/pipeline.ability-handler';
 | 
					import { ReadPipelineAbilityHandler } from 'src/ability/handlers/pipeline.ability-handler';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,10 @@
 | 
				
			|||||||
import { Test, TestingModule } from '@nestjs/testing';
 | 
					import { Test, TestingModule } from '@nestjs/testing';
 | 
				
			||||||
import { PipelineProgressService } from './pipeline-progress.service';
 | 
					
 | 
				
			||||||
import { PrismaService } from 'src/database/prisma.service';
 | 
					import { PrismaService } from 'src/database/prisma.service';
 | 
				
			||||||
import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
					import { prismaMock } from 'src/database/client-mock/jest-prisma-singleton';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { PipelineProgressService } from './pipeline-progress.service';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('PipelineProgressService', () => {
 | 
					describe('PipelineProgressService', () => {
 | 
				
			||||||
  let service: PipelineProgressService;
 | 
					  let service: PipelineProgressService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user