@optimatech88/titomeet-shared-lib 1.0.5 → 1.0.7
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.
- package/.github/workflows/npm-publish.yml +34 -34
- package/.prettierrc +4 -4
- package/package.json +4 -2
- package/prisma/schema.prisma +38 -0
- package/src/auth/admin.middleware.ts +20 -0
- package/src/auth/auth.guard.ts +98 -96
- package/src/auth/auth.module.ts +24 -24
- package/src/cache/cache.module.ts +25 -25
- package/src/cache/cache.service.ts +19 -19
- package/src/index.ts +29 -20
- package/src/prisma/prisma.module.ts +9 -9
- package/src/prisma/prisma.service.ts +13 -13
- package/src/types/index.ts +12 -12
- package/src/utils/api/endpoints.ts +6 -6
- package/src/utils/constants.ts +13 -13
- package/src/utils/events.ts +7 -7
- package/src/utils/index.ts +11 -11
- package/tsconfig.json +24 -24
- package/dist/auth/auth.guard.d.ts +0 -17
- package/dist/auth/auth.guard.d.ts.map +0 -1
- package/dist/auth/auth.guard.js +0 -89
- package/dist/auth/auth.guard.js.map +0 -1
- package/dist/auth/auth.module.d.ts +0 -9
- package/dist/auth/auth.module.d.ts.map +0 -1
- package/dist/auth/auth.module.js +0 -32
- package/dist/auth/auth.module.js.map +0 -1
- package/dist/cache/cache.module.d.ts +0 -5
- package/dist/cache/cache.module.d.ts.map +0 -1
- package/dist/cache/cache.module.js +0 -41
- package/dist/cache/cache.module.js.map +0 -1
- package/dist/cache/cache.service.d.ts +0 -9
- package/dist/cache/cache.service.d.ts.map +0 -1
- package/dist/cache/cache.service.js +0 -38
- package/dist/cache/cache.service.js.map +0 -1
- package/dist/index.d.ts +0 -14
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -38
- package/dist/index.js.map +0 -1
- package/dist/prisma/prisma.module.d.ts +0 -3
- package/dist/prisma/prisma.module.d.ts.map +0 -1
- package/dist/prisma/prisma.module.js +0 -22
- package/dist/prisma/prisma.module.js.map +0 -1
- package/dist/prisma/prisma.service.d.ts +0 -7
- package/dist/prisma/prisma.service.d.ts.map +0 -1
- package/dist/prisma/prisma.service.js +0 -24
- package/dist/prisma/prisma.service.js.map +0 -1
- package/dist/prisma/prisma.service.spec.d.ts +0 -2
- package/dist/prisma/prisma.service.spec.d.ts.map +0 -1
- package/dist/prisma/prisma.service.spec.js +0 -17
- package/dist/prisma/prisma.service.spec.js.map +0 -1
- package/dist/types/index.d.ts +0 -12
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -3
- package/dist/types/index.js.map +0 -1
- package/dist/utils/api/endpoints.d.ts +0 -7
- package/dist/utils/api/endpoints.d.ts.map +0 -1
- package/dist/utils/api/endpoints.js +0 -10
- package/dist/utils/api/endpoints.js.map +0 -1
- package/dist/utils/constants.d.ts +0 -3
- package/dist/utils/constants.d.ts.map +0 -1
- package/dist/utils/constants.js +0 -15
- package/dist/utils/constants.js.map +0 -1
- package/dist/utils/events.d.ts +0 -7
- package/dist/utils/events.d.ts.map +0 -1
- package/dist/utils/events.js +0 -10
- package/dist/utils/events.js.map +0 -1
- package/dist/utils/index.d.ts +0 -8
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -14
- package/dist/utils/index.js.map +0 -1
package/src/utils/constants.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export const DEFAULT_AVATAR_IMAGE =
|
|
2
|
-
'https://immob-bucket-2.s3.us-east-2.amazonaws.com/pictures/images.png';
|
|
3
|
-
|
|
4
|
-
export const TEMPORARY_EMAIL_DOMAINS = [
|
|
5
|
-
'10minutemail.com',
|
|
6
|
-
'guerrillamail.com',
|
|
7
|
-
'mailinator.com',
|
|
8
|
-
'dispostable.com',
|
|
9
|
-
'yopmail.com',
|
|
10
|
-
'trashmail.com',
|
|
11
|
-
'tempmail.com',
|
|
12
|
-
'temp-mail.org',
|
|
13
|
-
];
|
|
1
|
+
export const DEFAULT_AVATAR_IMAGE =
|
|
2
|
+
'https://immob-bucket-2.s3.us-east-2.amazonaws.com/pictures/images.png';
|
|
3
|
+
|
|
4
|
+
export const TEMPORARY_EMAIL_DOMAINS = [
|
|
5
|
+
'10minutemail.com',
|
|
6
|
+
'guerrillamail.com',
|
|
7
|
+
'mailinator.com',
|
|
8
|
+
'dispostable.com',
|
|
9
|
+
'yopmail.com',
|
|
10
|
+
'trashmail.com',
|
|
11
|
+
'tempmail.com',
|
|
12
|
+
'temp-mail.org',
|
|
13
|
+
];
|
package/src/utils/events.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const SOCKET_EVENTS = {
|
|
2
|
-
INBOX_OPENED: 'events.sockets.inboxOpened',
|
|
3
|
-
INBOX_CHANGED: 'events.sockets.inboxChanged',
|
|
4
|
-
NEW_MESSAGE: 'events.sockets.newMessage',
|
|
5
|
-
GET_UNREAD_MESSAGES_COUNT: 'events.sockets.getUnreadMessagesCount',
|
|
6
|
-
}
|
|
7
|
-
|
|
1
|
+
export const SOCKET_EVENTS = {
|
|
2
|
+
INBOX_OPENED: 'events.sockets.inboxOpened',
|
|
3
|
+
INBOX_CHANGED: 'events.sockets.inboxChanged',
|
|
4
|
+
NEW_MESSAGE: 'events.sockets.newMessage',
|
|
5
|
+
GET_UNREAD_MESSAGES_COUNT: 'events.sockets.getUnreadMessagesCount',
|
|
6
|
+
}
|
|
7
|
+
|
package/src/utils/index.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { PaginationQuery } from "@/types";
|
|
2
|
-
|
|
3
|
-
export const getPaginationData = (query: PaginationQuery) => {
|
|
4
|
-
const page = query.page as string;
|
|
5
|
-
const PAGE = parseInt(page, 10) || 1;
|
|
6
|
-
const LIMIT = Number(query.limit) || 10;
|
|
7
|
-
const SKIP = (PAGE - 1) * LIMIT;
|
|
8
|
-
|
|
9
|
-
return { page: PAGE, skip: SKIP, limit: LIMIT };
|
|
10
|
-
};
|
|
11
|
-
|
|
1
|
+
import { PaginationQuery } from "@/types";
|
|
2
|
+
|
|
3
|
+
export const getPaginationData = (query: PaginationQuery) => {
|
|
4
|
+
const page = query.page as string;
|
|
5
|
+
const PAGE = parseInt(page, 10) || 1;
|
|
6
|
+
const LIMIT = Number(query.limit) || 10;
|
|
7
|
+
const SKIP = (PAGE - 1) * LIMIT;
|
|
8
|
+
|
|
9
|
+
return { page: PAGE, skip: SKIP, limit: LIMIT };
|
|
10
|
+
};
|
|
11
|
+
|
|
12
12
|
export const getUserChannel = (userId: string) => `channels-user-${userId}`;
|
package/tsconfig.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"removeComments": true,
|
|
6
|
-
"emitDecoratorMetadata": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"target": "ES2017",
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"outDir": "./dist",
|
|
11
|
-
"baseUrl": ".",
|
|
12
|
-
"rootDir": "./src",
|
|
13
|
-
"paths": {
|
|
14
|
-
"@/*": ["./src/*"]
|
|
15
|
-
},
|
|
16
|
-
"strict": true,
|
|
17
|
-
"strictNullChecks": false,
|
|
18
|
-
"esModuleInterop": true,
|
|
19
|
-
"declarationMap": true,
|
|
20
|
-
"resolveJsonModule": true,
|
|
21
|
-
},
|
|
22
|
-
"include": ["src/**/*.ts"],
|
|
23
|
-
"exclude": ["node_modules", "dist"]
|
|
24
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"removeComments": true,
|
|
6
|
+
"emitDecoratorMetadata": true,
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"target": "ES2017",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"baseUrl": ".",
|
|
12
|
+
"rootDir": "./src",
|
|
13
|
+
"paths": {
|
|
14
|
+
"@/*": ["./src/*"]
|
|
15
|
+
},
|
|
16
|
+
"strict": true,
|
|
17
|
+
"strictNullChecks": false,
|
|
18
|
+
"esModuleInterop": true,
|
|
19
|
+
"declarationMap": true,
|
|
20
|
+
"resolveJsonModule": true,
|
|
21
|
+
},
|
|
22
|
+
"include": ["src/**/*.ts"],
|
|
23
|
+
"exclude": ["node_modules", "dist"]
|
|
24
|
+
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
|
2
|
-
import { JwtService } from '@nestjs/jwt';
|
|
3
|
-
export declare class AuthGuard implements CanActivate {
|
|
4
|
-
private jwtService;
|
|
5
|
-
private prisma;
|
|
6
|
-
constructor(jwtService: JwtService);
|
|
7
|
-
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
8
|
-
private extractTokenFromHeader;
|
|
9
|
-
}
|
|
10
|
-
export declare class OptionalAuthGuard implements CanActivate {
|
|
11
|
-
private jwtService;
|
|
12
|
-
private prisma;
|
|
13
|
-
constructor(jwtService: JwtService);
|
|
14
|
-
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
15
|
-
private extractTokenFromHeader;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=auth.guard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.guard.d.ts","sourceRoot":"","sources":["../../src/auth/auth.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAGjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC,qBACa,SAAU,YAAW,WAAW;IAIzC,OAAO,CAAC,UAAU;IAHpB,OAAO,CAAC,MAAM,CAAe;gBAGnB,UAAU,EAAE,UAAU;IAK1B,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IA0B9D,OAAO,CAAC,sBAAsB;CAI/B;AAED,qBACa,iBAAkB,YAAW,WAAW;IAIjD,OAAO,CAAC,UAAU;IAHnB,OAAO,CAAC,MAAM,CAAe;gBAGpB,UAAU,EAAE,UAAU;IAK1B,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IA4B9D,OAAO,CAAC,sBAAsB;CAI/B"}
|
package/dist/auth/auth.guard.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.OptionalAuthGuard = exports.AuthGuard = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const jwt_1 = require("@nestjs/jwt");
|
|
15
|
-
const client_1 = require("@prisma/client");
|
|
16
|
-
let AuthGuard = class AuthGuard {
|
|
17
|
-
constructor(jwtService) {
|
|
18
|
-
this.jwtService = jwtService;
|
|
19
|
-
this.prisma = new client_1.PrismaClient();
|
|
20
|
-
}
|
|
21
|
-
async canActivate(context) {
|
|
22
|
-
const request = context.switchToHttp().getRequest();
|
|
23
|
-
const token = this.extractTokenFromHeader(request);
|
|
24
|
-
if (!token) {
|
|
25
|
-
throw new common_1.UnauthorizedException();
|
|
26
|
-
}
|
|
27
|
-
try {
|
|
28
|
-
const payload = (await this.jwtService.verifyAsync(token));
|
|
29
|
-
const user = await this.prisma.user.findUnique({
|
|
30
|
-
where: { id: payload.userId }
|
|
31
|
-
});
|
|
32
|
-
if (!user) {
|
|
33
|
-
throw new common_1.UnauthorizedException();
|
|
34
|
-
}
|
|
35
|
-
request['user'] = user;
|
|
36
|
-
}
|
|
37
|
-
catch (_a) {
|
|
38
|
-
throw new common_1.UnauthorizedException();
|
|
39
|
-
}
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
extractTokenFromHeader(request) {
|
|
43
|
-
var _a, _b;
|
|
44
|
-
const [type, token] = (_b = (_a = request.headers.authorization) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
45
|
-
return type === 'Bearer' ? token : undefined;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
exports.AuthGuard = AuthGuard;
|
|
49
|
-
exports.AuthGuard = AuthGuard = __decorate([
|
|
50
|
-
(0, common_1.Injectable)(),
|
|
51
|
-
__metadata("design:paramtypes", [jwt_1.JwtService])
|
|
52
|
-
], AuthGuard);
|
|
53
|
-
let OptionalAuthGuard = class OptionalAuthGuard {
|
|
54
|
-
constructor(jwtService) {
|
|
55
|
-
this.jwtService = jwtService;
|
|
56
|
-
this.prisma = new client_1.PrismaClient();
|
|
57
|
-
}
|
|
58
|
-
async canActivate(context) {
|
|
59
|
-
const request = context.switchToHttp().getRequest();
|
|
60
|
-
const token = this.extractTokenFromHeader(request);
|
|
61
|
-
if (!token) {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
try {
|
|
65
|
-
const payload = (await this.jwtService.verifyAsync(token));
|
|
66
|
-
const user = await this.prisma.user.findUnique({
|
|
67
|
-
where: { id: payload.userId }
|
|
68
|
-
});
|
|
69
|
-
if (!user) {
|
|
70
|
-
throw new common_1.UnauthorizedException();
|
|
71
|
-
}
|
|
72
|
-
request['user'] = user;
|
|
73
|
-
}
|
|
74
|
-
catch (_a) {
|
|
75
|
-
}
|
|
76
|
-
return true;
|
|
77
|
-
}
|
|
78
|
-
extractTokenFromHeader(request) {
|
|
79
|
-
var _a, _b;
|
|
80
|
-
const [type, token] = (_b = (_a = request.headers.authorization) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
81
|
-
return type === 'Bearer' ? token : undefined;
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
exports.OptionalAuthGuard = OptionalAuthGuard;
|
|
85
|
-
exports.OptionalAuthGuard = OptionalAuthGuard = __decorate([
|
|
86
|
-
(0, common_1.Injectable)(),
|
|
87
|
-
__metadata("design:paramtypes", [jwt_1.JwtService])
|
|
88
|
-
], OptionalAuthGuard);
|
|
89
|
-
//# sourceMappingURL=auth.guard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../src/auth/auth.guard.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DynamicModule } from '@nestjs/common';
|
|
2
|
-
export interface AuthModuleOptions {
|
|
3
|
-
jwtSecret: string;
|
|
4
|
-
jwtExpiresIn?: string | number;
|
|
5
|
-
}
|
|
6
|
-
export declare class AuthModule {
|
|
7
|
-
static forRoot(options: AuthModuleOptions): DynamicModule;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=auth.module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.d.ts","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAG/D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AAED,qBAEa,UAAU;IACrB,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,GAAG,aAAa;CAY1D"}
|
package/dist/auth/auth.module.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var AuthModule_1;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.AuthModule = void 0;
|
|
11
|
-
const common_1 = require("@nestjs/common");
|
|
12
|
-
const jwt_1 = require("@nestjs/jwt");
|
|
13
|
-
let AuthModule = AuthModule_1 = class AuthModule {
|
|
14
|
-
static forRoot(options) {
|
|
15
|
-
return {
|
|
16
|
-
module: AuthModule_1,
|
|
17
|
-
imports: [
|
|
18
|
-
jwt_1.JwtModule.register({
|
|
19
|
-
secret: options.jwtSecret,
|
|
20
|
-
signOptions: { expiresIn: options.jwtExpiresIn || '7d' },
|
|
21
|
-
}),
|
|
22
|
-
],
|
|
23
|
-
exports: [jwt_1.JwtModule],
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.AuthModule = AuthModule;
|
|
28
|
-
exports.AuthModule = AuthModule = AuthModule_1 = __decorate([
|
|
29
|
-
(0, common_1.Global)(),
|
|
30
|
-
(0, common_1.Module)({})
|
|
31
|
-
], AuthModule);
|
|
32
|
-
//# sourceMappingURL=auth.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,qCAAwC;AASjC,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACrB,MAAM,CAAC,OAAO,CAAC,OAA0B;QACvC,OAAO;YACL,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE;gBACP,eAAS,CAAC,QAAQ,CAAC;oBACjB,MAAM,EAAE,OAAO,CAAC,SAAS;oBACzB,WAAW,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,YAAY,IAAI,IAAI,EAAE;iBACzD,CAAC;aACH;YACD,OAAO,EAAE,CAAC,eAAS,CAAC;SACrB,CAAC;IACJ,CAAC;CACF,CAAA;AAbY,gCAAU;qBAAV,UAAU;IAFtB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,UAAU,CAatB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.module.d.ts","sourceRoot":"","sources":["../../src/cache/cache.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAK/D,qBAEa,WAAW;IACtB,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa;CAgBhD"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
var CacheModule_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.CacheModule = void 0;
|
|
14
|
-
const common_1 = require("@nestjs/common");
|
|
15
|
-
const cacheable_1 = require("cacheable");
|
|
16
|
-
const cache_service_1 = require("./cache.service");
|
|
17
|
-
const redis_1 = __importDefault(require("@keyv/redis"));
|
|
18
|
-
let CacheModule = CacheModule_1 = class CacheModule {
|
|
19
|
-
static forRoot(redisUrl) {
|
|
20
|
-
return {
|
|
21
|
-
module: CacheModule_1,
|
|
22
|
-
providers: [
|
|
23
|
-
{
|
|
24
|
-
provide: 'CACHE_INSTANCE',
|
|
25
|
-
useFactory: () => {
|
|
26
|
-
const secondary = new redis_1.default(redisUrl);
|
|
27
|
-
return new cacheable_1.Cacheable({ secondary, ttl: '1h' });
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
cache_service_1.CacheService,
|
|
31
|
-
],
|
|
32
|
-
exports: ['CACHE_INSTANCE', cache_service_1.CacheService],
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
exports.CacheModule = CacheModule;
|
|
37
|
-
exports.CacheModule = CacheModule = CacheModule_1 = __decorate([
|
|
38
|
-
(0, common_1.Global)(),
|
|
39
|
-
(0, common_1.Module)({})
|
|
40
|
-
], CacheModule);
|
|
41
|
-
//# sourceMappingURL=cache.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.module.js","sourceRoot":"","sources":["../../src/cache/cache.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,yCAAsC;AACtC,mDAA+C;AAC/C,wDAAoC;AAI7B,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACtB,MAAM,CAAC,OAAO,CAAC,QAAgB;QAC7B,OAAO;YACL,MAAM,EAAE,aAAW;YACnB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,gBAAgB;oBACzB,UAAU,EAAE,GAAG,EAAE;wBACf,MAAM,SAAS,GAAG,IAAI,eAAS,CAAC,QAAQ,CAAC,CAAC;wBAC1C,OAAO,IAAI,qBAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;oBACjD,CAAC;iBACF;gBACD,4BAAY;aACb;YACD,OAAO,EAAE,CAAC,gBAAgB,EAAE,4BAAY,CAAC;SAC1C,CAAC;IACJ,CAAC;CACF,CAAA;AAjBY,kCAAW;sBAAX,WAAW;IAFvB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,WAAW,CAiBvB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Cacheable } from 'cacheable';
|
|
2
|
-
export declare class CacheService<T> {
|
|
3
|
-
private readonly cache;
|
|
4
|
-
constructor(cache: Cacheable);
|
|
5
|
-
get<T>(key: string): Promise<T>;
|
|
6
|
-
set(key: string, value: T, ttl?: number | string): Promise<void>;
|
|
7
|
-
delete(key: string): Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=cache.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.service.d.ts","sourceRoot":"","sources":["../../src/cache/cache.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,qBACa,YAAY,CAAC,CAAC;IACa,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,SAAS;IAEjE,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAI/B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CacheService = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const cacheable_1 = require("cacheable");
|
|
18
|
-
let CacheService = class CacheService {
|
|
19
|
-
constructor(cache) {
|
|
20
|
-
this.cache = cache;
|
|
21
|
-
}
|
|
22
|
-
async get(key) {
|
|
23
|
-
return await this.cache.get(key);
|
|
24
|
-
}
|
|
25
|
-
async set(key, value, ttl) {
|
|
26
|
-
await this.cache.set(key, value, ttl);
|
|
27
|
-
}
|
|
28
|
-
async delete(key) {
|
|
29
|
-
await this.cache.delete(key);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
exports.CacheService = CacheService;
|
|
33
|
-
exports.CacheService = CacheService = __decorate([
|
|
34
|
-
(0, common_1.Injectable)(),
|
|
35
|
-
__param(0, (0, common_1.Inject)('CACHE_INSTANCE')),
|
|
36
|
-
__metadata("design:paramtypes", [cacheable_1.Cacheable])
|
|
37
|
-
], CacheService);
|
|
38
|
-
//# sourceMappingURL=cache.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.service.js","sourceRoot":"","sources":["../../src/cache/cache.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,yCAAsC;AAG/B,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,YAAuD,KAAgB;QAAhB,UAAK,GAAL,KAAK,CAAW;IAAG,CAAC;IAE3E,KAAK,CAAC,GAAG,CAAI,GAAW;QACtB,OAAO,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAW,EAAE,KAAQ,EAAE,GAAqB;QACpD,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAW;QACtB,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;CACF,CAAA;AAdY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAEE,WAAA,IAAA,eAAM,EAAC,gBAAgB,CAAC,CAAA;qCAAyB,qBAAS;GAD5D,YAAY,CAcxB"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './auth/auth.guard';
|
|
2
|
-
export { PrismaClient, User, Account, UserRole, Event, EventAccess, EventVisibility, EventStatus, EventPrice, Address, Participant, ParticipantStatus } from '@prisma/client';
|
|
3
|
-
export * from './auth/auth.guard';
|
|
4
|
-
export * from './auth/auth.module';
|
|
5
|
-
export * from './cache/cache.module';
|
|
6
|
-
export * from './cache/cache.service';
|
|
7
|
-
export * from './prisma/prisma.module';
|
|
8
|
-
export * from './prisma/prisma.service';
|
|
9
|
-
export * from './types';
|
|
10
|
-
export * from './utils';
|
|
11
|
-
export * from './utils/api/endpoints';
|
|
12
|
-
export * from './utils/events';
|
|
13
|
-
export { JwtService } from "@nestjs/jwt";
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAG9K,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAExC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.JwtService = exports.ParticipantStatus = exports.EventStatus = exports.EventVisibility = exports.EventAccess = exports.UserRole = exports.PrismaClient = void 0;
|
|
18
|
-
__exportStar(require("./auth/auth.guard"), exports);
|
|
19
|
-
var client_1 = require("@prisma/client");
|
|
20
|
-
Object.defineProperty(exports, "PrismaClient", { enumerable: true, get: function () { return client_1.PrismaClient; } });
|
|
21
|
-
Object.defineProperty(exports, "UserRole", { enumerable: true, get: function () { return client_1.UserRole; } });
|
|
22
|
-
Object.defineProperty(exports, "EventAccess", { enumerable: true, get: function () { return client_1.EventAccess; } });
|
|
23
|
-
Object.defineProperty(exports, "EventVisibility", { enumerable: true, get: function () { return client_1.EventVisibility; } });
|
|
24
|
-
Object.defineProperty(exports, "EventStatus", { enumerable: true, get: function () { return client_1.EventStatus; } });
|
|
25
|
-
Object.defineProperty(exports, "ParticipantStatus", { enumerable: true, get: function () { return client_1.ParticipantStatus; } });
|
|
26
|
-
__exportStar(require("./auth/auth.guard"), exports);
|
|
27
|
-
__exportStar(require("./auth/auth.module"), exports);
|
|
28
|
-
__exportStar(require("./cache/cache.module"), exports);
|
|
29
|
-
__exportStar(require("./cache/cache.service"), exports);
|
|
30
|
-
__exportStar(require("./prisma/prisma.module"), exports);
|
|
31
|
-
__exportStar(require("./prisma/prisma.service"), exports);
|
|
32
|
-
__exportStar(require("./types"), exports);
|
|
33
|
-
__exportStar(require("./utils"), exports);
|
|
34
|
-
__exportStar(require("./utils/api/endpoints"), exports);
|
|
35
|
-
__exportStar(require("./utils/events"), exports);
|
|
36
|
-
var jwt_1 = require("@nestjs/jwt");
|
|
37
|
-
Object.defineProperty(exports, "JwtService", { enumerable: true, get: function () { return jwt_1.JwtService; } });
|
|
38
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,yCAA8K;AAArK,sGAAA,YAAY,OAAA;AAAiB,kGAAA,QAAQ,OAAA;AAAS,qGAAA,WAAW,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAoC,2GAAA,iBAAiB,OAAA;AAGrJ,oDAAkC;AAClC,qDAAmC;AAGnC,uDAAqC;AACrC,wDAAsC;AAGtC,yDAAuC;AACvC,0DAAwC;AAExC,0CAAwB;AACxB,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAE/B,mCAAyC;AAAhC,iGAAA,UAAU,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.module.d.ts","sourceRoot":"","sources":["../../src/prisma/prisma.module.ts"],"names":[],"mappings":"AAGA,qBAKa,YAAY;CAAG"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.PrismaModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const prisma_service_1 = require("./prisma.service");
|
|
12
|
-
let PrismaModule = class PrismaModule {
|
|
13
|
-
};
|
|
14
|
-
exports.PrismaModule = PrismaModule;
|
|
15
|
-
exports.PrismaModule = PrismaModule = __decorate([
|
|
16
|
-
(0, common_1.Global)(),
|
|
17
|
-
(0, common_1.Module)({
|
|
18
|
-
providers: [prisma_service_1.PrismaService],
|
|
19
|
-
exports: [prisma_service_1.PrismaService],
|
|
20
|
-
})
|
|
21
|
-
], PrismaModule);
|
|
22
|
-
//# sourceMappingURL=prisma.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.module.js","sourceRoot":"","sources":["../../src/prisma/prisma.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAgD;AAChD,qDAAiD;AAO1C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IALxB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,8BAAa,CAAC;QAC1B,OAAO,EAAE,CAAC,8BAAa,CAAC;KACzB,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OnModuleDestroy, OnModuleInit } from '@nestjs/common';
|
|
2
|
-
import { PrismaClient } from '@prisma/client';
|
|
3
|
-
export declare class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
|
|
4
|
-
onModuleInit(): Promise<void>;
|
|
5
|
-
onModuleDestroy(): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=prisma.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.service.d.ts","sourceRoot":"","sources":["../../src/prisma/prisma.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBACa,aAAc,SAAQ,YAAa,YAAW,YAAY,EAAE,eAAe;IAChF,YAAY;IAIZ,eAAe;CAGtB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.PrismaService = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const client_1 = require("@prisma/client");
|
|
12
|
-
let PrismaService = class PrismaService extends client_1.PrismaClient {
|
|
13
|
-
async onModuleInit() {
|
|
14
|
-
await this.$connect();
|
|
15
|
-
}
|
|
16
|
-
async onModuleDestroy() {
|
|
17
|
-
await this.$disconnect();
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
exports.PrismaService = PrismaService;
|
|
21
|
-
exports.PrismaService = PrismaService = __decorate([
|
|
22
|
-
(0, common_1.Injectable)()
|
|
23
|
-
], PrismaService);
|
|
24
|
-
//# sourceMappingURL=prisma.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.service.js","sourceRoot":"","sources":["../../src/prisma/prisma.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA2E;AAC3E,2CAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qBAAY;IAC7C,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;IAC3B,CAAC;CACF,CAAA;AARY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAQzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.service.spec.d.ts","sourceRoot":"","sources":["../../src/prisma/prisma.service.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const testing_1 = require("@nestjs/testing");
|
|
4
|
-
const prisma_service_1 = require("./prisma.service");
|
|
5
|
-
describe('PrismaService', () => {
|
|
6
|
-
let service;
|
|
7
|
-
beforeEach(async () => {
|
|
8
|
-
const module = await testing_1.Test.createTestingModule({
|
|
9
|
-
providers: [prisma_service_1.PrismaService],
|
|
10
|
-
}).compile();
|
|
11
|
-
service = module.get(prisma_service_1.PrismaService);
|
|
12
|
-
});
|
|
13
|
-
it('should be defined', () => {
|
|
14
|
-
expect(service).toBeDefined();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=prisma.service.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.service.spec.js","sourceRoot":"","sources":["../../src/prisma/prisma.service.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,qDAAiD;AAEjD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,OAAsB,CAAC;IAE3B,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,SAAS,EAAE,CAAC,8BAAa,CAAC;SAC3B,CAAC,CAAC,OAAO,EAAE,CAAC;QAEb,OAAO,GAAG,MAAM,CAAC,GAAG,CAAgB,8BAAa,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
package/dist/types/index.js
DELETED
package/dist/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../src/utils/api/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAoB,CAAA;AAC/C,eAAO,MAAM,kBAAkB,EAAE,MAAyB,CAAA;AAE1D,eAAO,MAAM,aAAa;;;CAGzB,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_ENDPOINTS = exports.PROPERTIES_API_URL = exports.CHAT_API_URL = void 0;
|
|
4
|
-
exports.CHAT_API_URL = "api/chats";
|
|
5
|
-
exports.PROPERTIES_API_URL = "api/properties";
|
|
6
|
-
exports.API_ENDPOINTS = {
|
|
7
|
-
CHAT: 'api/chats',
|
|
8
|
-
PROPERTIES_API_URL: 'api/properties',
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=endpoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../src/utils/api/endpoints.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAW,WAAW,CAAA;AAClC,QAAA,kBAAkB,GAAW,gBAAgB,CAAA;AAE7C,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE,WAAW;IACjB,kBAAkB,EAAE,gBAAgB;CACrC,CAAA"}
|