@skroz/profile-api 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { TypeOrmBaseEntity } from './TypeOrmBaseEntity';
|
|
2
|
+
/**
|
|
3
|
+
* Поля БЕЗ @Field() — они чувствительные или требуют access control.
|
|
4
|
+
* Их нужно раскрывать через @FieldResolver в резолвере конкретного проекта,
|
|
5
|
+
* чтобы контролировать доступ (например, отдавать только самому пользователю).
|
|
6
|
+
* Пример: ProfileResolver.ts в vikneska-ai-api.
|
|
7
|
+
*
|
|
8
|
+
* Поля С @Field() — публичные, безопасно раскрывать всем без ограничений.
|
|
9
|
+
*/
|
|
2
10
|
export declare abstract class TypeOrmBaseUser extends TypeOrmBaseEntity {
|
|
3
11
|
static config: {
|
|
4
12
|
isOnlineSeconds: number;
|
|
@@ -14,6 +14,14 @@ exports.TypeOrmBaseUser = void 0;
|
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
15
|
const type_graphql_1 = require("type-graphql");
|
|
16
16
|
const TypeOrmBaseEntity_1 = require("./TypeOrmBaseEntity");
|
|
17
|
+
/**
|
|
18
|
+
* Поля БЕЗ @Field() — они чувствительные или требуют access control.
|
|
19
|
+
* Их нужно раскрывать через @FieldResolver в резолвере конкретного проекта,
|
|
20
|
+
* чтобы контролировать доступ (например, отдавать только самому пользователю).
|
|
21
|
+
* Пример: ProfileResolver.ts в vikneska-ai-api.
|
|
22
|
+
*
|
|
23
|
+
* Поля С @Field() — публичные, безопасно раскрывать всем без ограничений.
|
|
24
|
+
*/
|
|
17
25
|
let TypeOrmBaseUser = TypeOrmBaseUser_1 = class TypeOrmBaseUser extends TypeOrmBaseEntity_1.TypeOrmBaseEntity {
|
|
18
26
|
checkOnline(seconds) {
|
|
19
27
|
if (!this.lastSeenAt)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skroz/profile-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "git@gitlab.com:skroz/libs/utils.git",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"type-graphql": "^1.1.1",
|
|
45
45
|
"typeorm": "^0.2.45"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "105a08c62e1935692e81544ebb66e0a2b51e594e"
|
|
48
48
|
}
|
|
@@ -2,6 +2,14 @@ import { Column } from 'typeorm';
|
|
|
2
2
|
import { Field, ObjectType, GraphQLTimestamp } from 'type-graphql';
|
|
3
3
|
import { TypeOrmBaseEntity } from './TypeOrmBaseEntity';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Поля БЕЗ @Field() — они чувствительные или требуют access control.
|
|
7
|
+
* Их нужно раскрывать через @FieldResolver в резолвере конкретного проекта,
|
|
8
|
+
* чтобы контролировать доступ (например, отдавать только самому пользователю).
|
|
9
|
+
* Пример: ProfileResolver.ts в vikneska-ai-api.
|
|
10
|
+
*
|
|
11
|
+
* Поля С @Field() — публичные, безопасно раскрывать всем без ограничений.
|
|
12
|
+
*/
|
|
5
13
|
@ObjectType({ isAbstract: true })
|
|
6
14
|
export abstract class TypeOrmBaseUser extends TypeOrmBaseEntity {
|
|
7
15
|
public static config = {
|