@aurispec/core-backend 1.0.4 → 1.0.5
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/dist/database/migrations/1772984882048-modified_reviews_table.d.ts +7 -0
- package/dist/database/migrations/1772984882048-modified_reviews_table.d.ts.map +1 -0
- package/dist/database/migrations/1772984882048-modified_reviews_table.js +61 -0
- package/dist/models/BusinessModel.d.ts +2 -0
- package/dist/models/BusinessModel.d.ts.map +1 -1
- package/dist/models/BusinessModel.js +9 -0
- package/dist/models/ReviewModel.d.ts +5 -0
- package/dist/models/ReviewModel.d.ts.map +1 -1
- package/dist/models/ReviewModel.js +19 -0
- package/dist/models/UserModel.d.ts +2 -0
- package/dist/models/UserModel.d.ts.map +1 -1
- package/dist/models/UserModel.js +9 -0
- package/package.json +1 -1
- package/dist/app.js +0 -59
- package/dist/common/configs/express.js +0 -29
- package/dist/common/configs/websocket.js +0 -17
- package/dist/common/constants/chat.d.ts +0 -18
- package/dist/common/constants/chat.d.ts.map +0 -1
- package/dist/common/constants/chat.js +0 -20
- package/dist/common/constants/messages/admin.messages.d.ts +0 -33
- package/dist/common/constants/messages/admin.messages.d.ts.map +0 -1
- package/dist/common/constants/messages/admin.messages.js +0 -35
- package/dist/common/constants/messages/user.messages.d.ts +0 -33
- package/dist/common/constants/messages/user.messages.d.ts.map +0 -1
- package/dist/common/constants/messages/user.messages.js +0 -35
- package/dist/common/dtos/AdminDto.d.ts +0 -5
- package/dist/common/dtos/AdminDto.d.ts.map +0 -1
- package/dist/common/dtos/AdminDto.js +0 -30
- package/dist/common/dtos/ArticleDto.d.ts +0 -11
- package/dist/common/dtos/ArticleDto.d.ts.map +0 -1
- package/dist/common/dtos/ArticleDto.js +0 -61
- package/dist/common/dtos/BusinessDto.d.ts +0 -12
- package/dist/common/dtos/BusinessDto.d.ts.map +0 -1
- package/dist/common/dtos/BusinessDto.js +0 -59
- package/dist/common/dtos/ChatDto.d.ts +0 -17
- package/dist/common/dtos/ChatDto.d.ts.map +0 -1
- package/dist/common/dtos/ChatDto.js +0 -89
- package/dist/common/dtos/CommonDto.d.ts +0 -13
- package/dist/common/dtos/CommonDto.d.ts.map +0 -1
- package/dist/common/dtos/CommonDto.js +0 -59
- package/dist/common/dtos/CommunityDto.d.ts +0 -10
- package/dist/common/dtos/CommunityDto.d.ts.map +0 -1
- package/dist/common/dtos/CommunityDto.js +0 -72
- package/dist/common/dtos/EventDto.d.ts +0 -24
- package/dist/common/dtos/EventDto.d.ts.map +0 -1
- package/dist/common/dtos/EventDto.js +0 -72
- package/dist/common/dtos/IPaginator.d.ts +0 -15
- package/dist/common/dtos/IPaginator.d.ts.map +0 -1
- package/dist/common/dtos/IPaginator.js +0 -40
- package/dist/common/dtos/Plan.dto.d.ts +0 -10
- package/dist/common/dtos/Plan.dto.d.ts.map +0 -1
- package/dist/common/dtos/Plan.dto.js +0 -66
- package/dist/common/dtos/PostDto.d.ts +0 -13
- package/dist/common/dtos/PostDto.d.ts.map +0 -1
- package/dist/common/dtos/PostDto.js +0 -75
- package/dist/common/dtos/ProductDto.d.ts +0 -13
- package/dist/common/dtos/ProductDto.d.ts.map +0 -1
- package/dist/common/dtos/ProductDto.js +0 -66
- package/dist/common/dtos/ServiceDto.d.ts +0 -19
- package/dist/common/dtos/ServiceDto.d.ts.map +0 -1
- package/dist/common/dtos/ServiceDto.js +0 -93
- package/dist/common/dtos/UserDto.d.ts +0 -70
- package/dist/common/dtos/UserDto.d.ts.map +0 -1
- package/dist/common/dtos/UserDto.js +0 -313
- package/dist/common/types/IPagination.d.ts +0 -15
- package/dist/common/types/IPagination.d.ts.map +0 -1
- package/dist/common/types/IPagination.js +0 -2
- package/dist/common/utils/axios.js +0 -26
- package/dist/common/utils/socket.js +0 -16
- package/dist/database/seeds/CommunityDataSeeder.js +0 -48
- package/dist/database/seeds/EventDataSeeder.js +0 -54
- package/dist/database/seeds/FeatureSeeder.js +0 -131
- package/dist/database/seeds/MarketplaceDataSeeder.js +0 -95
- package/dist/database/seeds/PlanSeeder.js +0 -78
- package/dist/database/seeds/UserProfileDataSeeder.js +0 -215
- package/dist/database/seeds/index.js +0 -39
- package/dist/services/StripeService.js +0 -288
- package/dist/services/mobile/ArticleCommentService.js +0 -479
- package/dist/services/mobile/ArticleService.js +0 -507
- package/dist/services/mobile/AuthService.js +0 -362
- package/dist/services/mobile/BusinessService.js +0 -267
- package/dist/services/mobile/BusinessServiceService.js +0 -383
- package/dist/services/mobile/CardService.js +0 -249
- package/dist/services/mobile/ChatService.js +0 -324
- package/dist/services/mobile/CommunityMemberService.js +0 -193
- package/dist/services/mobile/CommunityService.js +0 -561
- package/dist/services/mobile/CompleteProfileService.js +0 -308
- package/dist/services/mobile/ConnectionService.js +0 -338
- package/dist/services/mobile/EventAttendanceService.js +0 -343
- package/dist/services/mobile/EventService.js +0 -540
- package/dist/services/mobile/NotificationService.js +0 -89
- package/dist/services/mobile/PasswordResetService.js +0 -168
- package/dist/services/mobile/PlanService.js +0 -85
- package/dist/services/mobile/PostCommentService.js +0 -611
- package/dist/services/mobile/PostService.js +0 -640
- package/dist/services/mobile/ProductService.js +0 -360
- package/dist/services/mobile/RedisService.js +0 -16
- package/dist/services/mobile/TransactionService.js +0 -51
- package/dist/services/mobile/UploadService.js +0 -110
- package/dist/services/mobile/UserService.js +0 -128
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class ModifiedReviewsTable1772984882048 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1772984882048-modified_reviews_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1772984882048-modified_reviews_table.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1772984882048-modified_reviews_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,iCAAkC,YAAW,kBAAkB;IACxE,IAAI,SAAsC;IAE7B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA4B3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CA4B7D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiedReviewsTable1772984882048 = void 0;
|
|
4
|
+
class ModifiedReviewsTable1772984882048 {
|
|
5
|
+
name = 'ModifiedReviewsTable1772984882048';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "businesses" DROP CONSTRAINT "FK_c10f41eb0df06ab08531b0063a0"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "services" DROP CONSTRAINT "FK_2ce208b0cc2c75ae5a2a66ea26d"`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "service_providers" DROP CONSTRAINT "FK_ae58b48b1c2bed83a44905a6c19"`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "service_providers" DROP CONSTRAINT "FK_cfd42ebd841b9cac17185db0885"`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "products" DROP CONSTRAINT "FK_6706ea94d32be01f9272ccc3512"`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "product_images" DROP CONSTRAINT "FK_2212515ba306c79f42c46a99db7"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "subscription_histories" DROP CONSTRAINT "FK_78e38c65d2924846d905b2ee13d"`);
|
|
14
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_fd3de68508608d771a40fb9c70"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "subscription_histories" DROP COLUMN "status"`);
|
|
16
|
+
await queryRunner.query(`DROP TYPE "public"."subscription_histories_status_enum"`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "subscription_histories" DROP COLUMN "payment_ref"`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "reviews" ADD "business_id" integer NOT NULL`);
|
|
19
|
+
await queryRunner.query(`ALTER TYPE "public"."subscription_histories_payment_provider_enum" RENAME TO "subscription_histories_payment_provider_enum_old"`);
|
|
20
|
+
await queryRunner.query(`CREATE TYPE "public"."subscription_histories_payment_provider_enum" AS ENUM('SHOPIFY_BILLING_API', 'STRIPE', 'PAYPAL')`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "subscription_histories" ALTER COLUMN "payment_provider" TYPE "public"."subscription_histories_payment_provider_enum" USING "payment_provider"::"text"::"public"."subscription_histories_payment_provider_enum"`);
|
|
22
|
+
await queryRunner.query(`DROP TYPE "public"."subscription_histories_payment_provider_enum_old"`);
|
|
23
|
+
await queryRunner.query(`CREATE INDEX "IDX_6ca9503d77ae39b4b5a6cc3ba8" ON "user_profiles" ("user_id") `);
|
|
24
|
+
await queryRunner.query(`ALTER TABLE "reviews" ADD CONSTRAINT "FK_728447781a30bc3fcfe5c2f1cdf" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE "reviews" ADD CONSTRAINT "FK_5487461baf5ad075430309fb8e7" FOREIGN KEY ("business_id") REFERENCES "businesses"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "businesses" ADD CONSTRAINT "FK_c10f41eb0df06ab08531b0063a0" FOREIGN KEY ("business_id_image_id") REFERENCES "uploads"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE "services" ADD CONSTRAINT "FK_2ce208b0cc2c75ae5a2a66ea26d" FOREIGN KEY ("provider_info_id") REFERENCES "service_providers"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE "service_providers" ADD CONSTRAINT "FK_cfd42ebd841b9cac17185db0885" FOREIGN KEY ("profile_image_id") REFERENCES "uploads"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
|
|
29
|
+
await queryRunner.query(`ALTER TABLE "service_providers" ADD CONSTRAINT "FK_ae58b48b1c2bed83a44905a6c19" FOREIGN KEY ("business_id") REFERENCES "businesses"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
30
|
+
await queryRunner.query(`ALTER TABLE "products" ADD CONSTRAINT "FK_6706ea94d32be01f9272ccc3512" FOREIGN KEY ("business_id") REFERENCES "businesses"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
31
|
+
await queryRunner.query(`ALTER TABLE "product_images" ADD CONSTRAINT "FK_2212515ba306c79f42c46a99db7" FOREIGN KEY ("image_id") REFERENCES "uploads"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
32
|
+
}
|
|
33
|
+
async down(queryRunner) {
|
|
34
|
+
await queryRunner.query(`ALTER TABLE "product_images" DROP CONSTRAINT "FK_2212515ba306c79f42c46a99db7"`);
|
|
35
|
+
await queryRunner.query(`ALTER TABLE "products" DROP CONSTRAINT "FK_6706ea94d32be01f9272ccc3512"`);
|
|
36
|
+
await queryRunner.query(`ALTER TABLE "service_providers" DROP CONSTRAINT "FK_ae58b48b1c2bed83a44905a6c19"`);
|
|
37
|
+
await queryRunner.query(`ALTER TABLE "service_providers" DROP CONSTRAINT "FK_cfd42ebd841b9cac17185db0885"`);
|
|
38
|
+
await queryRunner.query(`ALTER TABLE "services" DROP CONSTRAINT "FK_2ce208b0cc2c75ae5a2a66ea26d"`);
|
|
39
|
+
await queryRunner.query(`ALTER TABLE "businesses" DROP CONSTRAINT "FK_c10f41eb0df06ab08531b0063a0"`);
|
|
40
|
+
await queryRunner.query(`ALTER TABLE "reviews" DROP CONSTRAINT "FK_5487461baf5ad075430309fb8e7"`);
|
|
41
|
+
await queryRunner.query(`ALTER TABLE "reviews" DROP CONSTRAINT "FK_728447781a30bc3fcfe5c2f1cdf"`);
|
|
42
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_6ca9503d77ae39b4b5a6cc3ba8"`);
|
|
43
|
+
await queryRunner.query(`CREATE TYPE "public"."subscription_histories_payment_provider_enum_old" AS ENUM('STRIPE', 'PAYPAL')`);
|
|
44
|
+
await queryRunner.query(`ALTER TABLE "subscription_histories" ALTER COLUMN "payment_provider" TYPE "public"."subscription_histories_payment_provider_enum_old" USING "payment_provider"::"text"::"public"."subscription_histories_payment_provider_enum_old"`);
|
|
45
|
+
await queryRunner.query(`DROP TYPE "public"."subscription_histories_payment_provider_enum"`);
|
|
46
|
+
await queryRunner.query(`ALTER TYPE "public"."subscription_histories_payment_provider_enum_old" RENAME TO "subscription_histories_payment_provider_enum"`);
|
|
47
|
+
await queryRunner.query(`ALTER TABLE "reviews" DROP COLUMN "business_id"`);
|
|
48
|
+
await queryRunner.query(`ALTER TABLE "subscription_histories" ADD "payment_ref" character varying NOT NULL`);
|
|
49
|
+
await queryRunner.query(`CREATE TYPE "public"."subscription_histories_status_enum" AS ENUM('ACTIVE', 'INACTIVE', 'CANCELLED')`);
|
|
50
|
+
await queryRunner.query(`ALTER TABLE "subscription_histories" ADD "status" "public"."subscription_histories_status_enum" NOT NULL`);
|
|
51
|
+
await queryRunner.query(`CREATE INDEX "IDX_fd3de68508608d771a40fb9c70" ON "user_profiles" ("date_of_birth", "user_id") `);
|
|
52
|
+
await queryRunner.query(`ALTER TABLE "subscription_histories" ADD CONSTRAINT "FK_78e38c65d2924846d905b2ee13d" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
53
|
+
await queryRunner.query(`ALTER TABLE "product_images" ADD CONSTRAINT "FK_2212515ba306c79f42c46a99db7" FOREIGN KEY ("image_id") REFERENCES "uploads"("id") ON DELETE SET NULL ON UPDATE CASCADE`);
|
|
54
|
+
await queryRunner.query(`ALTER TABLE "products" ADD CONSTRAINT "FK_6706ea94d32be01f9272ccc3512" FOREIGN KEY ("business_id") REFERENCES "businesses"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
55
|
+
await queryRunner.query(`ALTER TABLE "service_providers" ADD CONSTRAINT "FK_cfd42ebd841b9cac17185db0885" FOREIGN KEY ("profile_image_id") REFERENCES "uploads"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
56
|
+
await queryRunner.query(`ALTER TABLE "service_providers" ADD CONSTRAINT "FK_ae58b48b1c2bed83a44905a6c19" FOREIGN KEY ("business_id") REFERENCES "businesses"("id") ON DELETE SET NULL ON UPDATE CASCADE`);
|
|
57
|
+
await queryRunner.query(`ALTER TABLE "services" ADD CONSTRAINT "FK_2ce208b0cc2c75ae5a2a66ea26d" FOREIGN KEY ("provider_info_id") REFERENCES "service_providers"("id") ON DELETE SET NULL ON UPDATE CASCADE`);
|
|
58
|
+
await queryRunner.query(`ALTER TABLE "businesses" ADD CONSTRAINT "FK_c10f41eb0df06ab08531b0063a0" FOREIGN KEY ("business_id_image_id") REFERENCES "uploads"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.ModifiedReviewsTable1772984882048 = ModifiedReviewsTable1772984882048;
|
|
@@ -4,6 +4,7 @@ import { BusinessStatus } from "../common/enums/MarketplaceEnum";
|
|
|
4
4
|
import { BusinessCategoryModel } from "./BusinessCategoryModel";
|
|
5
5
|
import { UploadModel } from "./UploadModel";
|
|
6
6
|
import { BusinessIdCategoryModel } from "./BusinessIdCategoryModel";
|
|
7
|
+
import { ReviewModel } from "./ReviewModel";
|
|
7
8
|
export declare class BusinessModel extends BaseModel {
|
|
8
9
|
user_id: number;
|
|
9
10
|
category_id: number;
|
|
@@ -18,5 +19,6 @@ export declare class BusinessModel extends BaseModel {
|
|
|
18
19
|
category: BusinessCategoryModel;
|
|
19
20
|
business_id_category: BusinessIdCategoryModel;
|
|
20
21
|
business_id_image?: UploadModel;
|
|
22
|
+
reviews?: ReviewModel[];
|
|
21
23
|
}
|
|
22
24
|
//# sourceMappingURL=BusinessModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BusinessModel.d.ts","sourceRoot":"","sources":["../../src/models/BusinessModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"BusinessModel.d.ts","sourceRoot":"","sources":["../../src/models/BusinessModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAEa,aAAc,SAAQ,SAAS;IAE1C,OAAO,EAAG,MAAM,CAAC;IAGjB,WAAW,EAAG,MAAM,CAAC;IAGrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAG9B,uBAAuB,EAAG,MAAM,CAAC;IAGjC,QAAQ,EAAG,GAAG,CAAC;IAOf,WAAW,EAAG,MAAM,CAAC;IAGrB,WAAW,EAAG,MAAM,CAAC;IAGrB,IAAI,EAAG,MAAM,CAAC;IAOd,MAAM,EAAG,cAAc,CAAC;IAIxB,IAAI,EAAG,SAAS,CAAC;IAIjB,QAAQ,EAAG,qBAAqB,CAAC;IAIjC,oBAAoB,EAAG,uBAAuB,CAAC;IAI/C,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAQhC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB"}
|
|
@@ -17,6 +17,7 @@ const MarketplaceEnum_1 = require("../common/enums/MarketplaceEnum");
|
|
|
17
17
|
const BusinessCategoryModel_1 = require("./BusinessCategoryModel");
|
|
18
18
|
const UploadModel_1 = require("./UploadModel");
|
|
19
19
|
const BusinessIdCategoryModel_1 = require("./BusinessIdCategoryModel");
|
|
20
|
+
const ReviewModel_1 = require("./ReviewModel");
|
|
20
21
|
let BusinessModel = class BusinessModel extends BaseModel_1.BaseModel {
|
|
21
22
|
user_id;
|
|
22
23
|
category_id;
|
|
@@ -31,6 +32,7 @@ let BusinessModel = class BusinessModel extends BaseModel_1.BaseModel {
|
|
|
31
32
|
category;
|
|
32
33
|
business_id_category;
|
|
33
34
|
business_id_image;
|
|
35
|
+
reviews;
|
|
34
36
|
};
|
|
35
37
|
exports.BusinessModel = BusinessModel;
|
|
36
38
|
__decorate([
|
|
@@ -97,6 +99,13 @@ __decorate([
|
|
|
97
99
|
(0, typeorm_1.JoinColumn)({ name: "business_id_image_id", referencedColumnName: "id" }),
|
|
98
100
|
__metadata("design:type", UploadModel_1.UploadModel)
|
|
99
101
|
], BusinessModel.prototype, "business_id_image", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.OneToMany)(() => ReviewModel_1.ReviewModel, (reviews) => reviews.user, {
|
|
104
|
+
onDelete: "SET NULL",
|
|
105
|
+
onUpdate: "CASCADE",
|
|
106
|
+
}),
|
|
107
|
+
__metadata("design:type", Array)
|
|
108
|
+
], BusinessModel.prototype, "reviews", void 0);
|
|
100
109
|
exports.BusinessModel = BusinessModel = __decorate([
|
|
101
110
|
(0, typeorm_1.Entity)({ name: "businesses" }),
|
|
102
111
|
(0, typeorm_1.Index)(["category_id", "user_id"])
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { UserModel } from "./UserModel";
|
|
3
|
+
import { BusinessModel } from "./BusinessModel";
|
|
2
4
|
export declare class ReviewModel extends BaseModel {
|
|
3
5
|
user_id: number;
|
|
6
|
+
business_id: number;
|
|
4
7
|
rating: number;
|
|
5
8
|
review_body?: string;
|
|
9
|
+
user: UserModel;
|
|
10
|
+
business: BusinessModel;
|
|
6
11
|
}
|
|
7
12
|
//# sourceMappingURL=ReviewModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewModel.d.ts","sourceRoot":"","sources":["../../src/models/ReviewModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ReviewModel.d.ts","sourceRoot":"","sources":["../../src/models/ReviewModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAGa,WAAY,SAAQ,SAAS;IAExC,OAAO,EAAG,MAAM,CAAC;IAGjB,WAAW,EAAG,MAAM,CAAC;IAGrB,MAAM,EAAG,MAAM,CAAC;IAGhB,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,IAAI,EAAG,SAAS,CAAC;IAIjB,QAAQ,EAAG,aAAa,CAAC;CAC1B"}
|
|
@@ -12,16 +12,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ReviewModel = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const UserModel_1 = require("./UserModel");
|
|
16
|
+
const BusinessModel_1 = require("./BusinessModel");
|
|
15
17
|
let ReviewModel = class ReviewModel extends BaseModel_1.BaseModel {
|
|
16
18
|
user_id;
|
|
19
|
+
business_id;
|
|
17
20
|
rating;
|
|
18
21
|
review_body;
|
|
22
|
+
user;
|
|
23
|
+
business;
|
|
19
24
|
};
|
|
20
25
|
exports.ReviewModel = ReviewModel;
|
|
21
26
|
__decorate([
|
|
22
27
|
(0, typeorm_1.Column)(),
|
|
23
28
|
__metadata("design:type", Number)
|
|
24
29
|
], ReviewModel.prototype, "user_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)(),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], ReviewModel.prototype, "business_id", void 0);
|
|
25
34
|
__decorate([
|
|
26
35
|
(0, typeorm_1.Column)(),
|
|
27
36
|
__metadata("design:type", Number)
|
|
@@ -30,6 +39,16 @@ __decorate([
|
|
|
30
39
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
31
40
|
__metadata("design:type", String)
|
|
32
41
|
], ReviewModel.prototype, "review_body", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.ManyToOne)(() => UserModel_1.UserModel, (user) => user.posted_reviews),
|
|
44
|
+
(0, typeorm_1.JoinColumn)({ name: "user_id", referencedColumnName: "id" }),
|
|
45
|
+
__metadata("design:type", UserModel_1.UserModel)
|
|
46
|
+
], ReviewModel.prototype, "user", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.ManyToOne)(() => BusinessModel_1.BusinessModel, (business) => business.reviews),
|
|
49
|
+
(0, typeorm_1.JoinColumn)({ name: "business_id", referencedColumnName: "id" }),
|
|
50
|
+
__metadata("design:type", BusinessModel_1.BusinessModel)
|
|
51
|
+
], ReviewModel.prototype, "business", void 0);
|
|
33
52
|
exports.ReviewModel = ReviewModel = __decorate([
|
|
34
53
|
(0, typeorm_1.Entity)({ name: "reviews" }),
|
|
35
54
|
(0, typeorm_1.Index)(["user_id"])
|
|
@@ -11,6 +11,7 @@ import { CommentModel } from "./CommentModel";
|
|
|
11
11
|
import { LikeModel } from "./LikeModel";
|
|
12
12
|
import { EventAttendanceModel } from "./EventAttendanceModel";
|
|
13
13
|
import { ConnectionModel } from "./ConnectionModel";
|
|
14
|
+
import { ReviewModel } from "./ReviewModel";
|
|
14
15
|
export declare class UserModel extends BaseModel {
|
|
15
16
|
full_name: string;
|
|
16
17
|
terms_and_conditions: boolean;
|
|
@@ -43,5 +44,6 @@ export declare class UserModel extends BaseModel {
|
|
|
43
44
|
event_attending?: EventAttendanceModel[];
|
|
44
45
|
sent_connections?: ConnectionModel[];
|
|
45
46
|
received_connections?: ConnectionModel[];
|
|
47
|
+
posted_reviews?: ReviewModel[];
|
|
46
48
|
}
|
|
47
49
|
//# sourceMappingURL=UserModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserModel.d.ts","sourceRoot":"","sources":["../../src/models/UserModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAQ,EAAC,YAAY,EAAC,MAAO,gBAAgB,CAAC;AAC9C,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"UserModel.d.ts","sourceRoot":"","sources":["../../src/models/UserModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAQ,EAAC,YAAY,EAAC,MAAO,gBAAgB,CAAC;AAC9C,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAEa,SAAU,SAAQ,SAAS;IAEpC,SAAS,EAAG,MAAM,CAAC;IAGnB,oBAAoB,EAAG,OAAO,CAAC;IAG/B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGjC,uBAAuB,CAAC,EAAE,IAAI,GAAE,IAAI,CAAC;IAGrC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,sBAAsB,CAAC,EAAE,IAAI,GAAE,IAAI,CAAC;IAGpC,KAAK,EAAG,MAAM,CAAC;IAGf,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,WAAW,EAAG,OAAO,CAAC;IAGtB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB,SAAS,CAAC,EAAE,IAAI,CAAC;IAOf,WAAW,EAAG,aAAa,CAAC;IAO5B,aAAa,EAAG,YAAY,CAAC;IAO7B,eAAe,EAAG,iBAAiB,CAAC;IAOpC,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAGxB,eAAe,CAAC,EAAE,IAAI,CAAC;IAUvB,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAUpC,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAMlC,YAAY,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAUvC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IAQtB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IAQpB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAS/B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAQzB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IAQpB,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAQzC,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IAQrC,oBAAoB,CAAC,EAAE,eAAe,EAAE,CAAC;IAQzC,cAAc,CAAC,EAAE,WAAW,EAAE,CAAC;CAClC"}
|
package/dist/models/UserModel.js
CHANGED
|
@@ -24,6 +24,7 @@ const CommentModel_1 = require("./CommentModel");
|
|
|
24
24
|
const LikeModel_1 = require("./LikeModel");
|
|
25
25
|
const EventAttendanceModel_1 = require("./EventAttendanceModel");
|
|
26
26
|
const ConnectionModel_1 = require("./ConnectionModel");
|
|
27
|
+
const ReviewModel_1 = require("./ReviewModel");
|
|
27
28
|
let UserModel = class UserModel extends BaseModel_1.BaseModel {
|
|
28
29
|
full_name;
|
|
29
30
|
terms_and_conditions;
|
|
@@ -56,6 +57,7 @@ let UserModel = class UserModel extends BaseModel_1.BaseModel {
|
|
|
56
57
|
event_attending;
|
|
57
58
|
sent_connections;
|
|
58
59
|
received_connections;
|
|
60
|
+
posted_reviews;
|
|
59
61
|
};
|
|
60
62
|
exports.UserModel = UserModel;
|
|
61
63
|
__decorate([
|
|
@@ -231,6 +233,13 @@ __decorate([
|
|
|
231
233
|
}),
|
|
232
234
|
__metadata("design:type", Array)
|
|
233
235
|
], UserModel.prototype, "received_connections", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
(0, typeorm_1.OneToMany)(() => ReviewModel_1.ReviewModel, (posted_reviews) => posted_reviews.user, {
|
|
238
|
+
onDelete: "SET NULL",
|
|
239
|
+
onUpdate: "CASCADE",
|
|
240
|
+
}),
|
|
241
|
+
__metadata("design:type", Array)
|
|
242
|
+
], UserModel.prototype, "posted_reviews", void 0);
|
|
234
243
|
exports.UserModel = UserModel = __decorate([
|
|
235
244
|
(0, typeorm_1.Entity)({ name: "users" }),
|
|
236
245
|
(0, typeorm_1.Index)(["email", "phone", "plan_id", "verification_token", "verification_otp", "reset_token", "reset_otp"])
|
package/package.json
CHANGED
package/dist/app.js
DELETED
|
@@ -1,59 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.app = app;
|
|
40
|
-
require("reflect-metadata");
|
|
41
|
-
const express_1 = __importDefault(require("express"));
|
|
42
|
-
const express_2 = __importDefault(require("./common/configs/express"));
|
|
43
|
-
const swagger_ui_express_1 = __importDefault(require("swagger-ui-express"));
|
|
44
|
-
const swaggerDocument = __importStar(require("./swagger/swagger.json"));
|
|
45
|
-
const errorHandlerMiddleware_1 = require("./middlewares/errorHandlerMiddleware");
|
|
46
|
-
const attachExpressReqAndRes_1 = require("./middlewares/attachExpressReqAndRes");
|
|
47
|
-
async function app() {
|
|
48
|
-
const app = (0, express_1.default)();
|
|
49
|
-
// if (!CONFIGS.IS_PRODUCTION) {
|
|
50
|
-
app.use('/swagger/api', swagger_ui_express_1.default.serve, swagger_ui_express_1.default.setup(swaggerDocument));
|
|
51
|
-
// }
|
|
52
|
-
app.use(attachExpressReqAndRes_1.attachExpressReqAndRes);
|
|
53
|
-
await (0, express_2.default)(app);
|
|
54
|
-
// if(CONFIGS.IS_PRODUCTION){
|
|
55
|
-
// app.use(gatewayMiddleware);
|
|
56
|
-
// }
|
|
57
|
-
app.use(errorHandlerMiddleware_1.errorHandlerMiddlware);
|
|
58
|
-
return app;
|
|
59
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const express_1 = require("express");
|
|
7
|
-
const express_rate_limit_1 = __importDefault(require("express-rate-limit"));
|
|
8
|
-
const postgres_1 = require("./postgres");
|
|
9
|
-
const routes_1 = require("../../swagger/routes/routes");
|
|
10
|
-
const _1 = require(".");
|
|
11
|
-
const limiter = (0, express_rate_limit_1.default)({
|
|
12
|
-
windowMs: 1 * 60 * 1000,
|
|
13
|
-
max: 50
|
|
14
|
-
});
|
|
15
|
-
const expressConfig = async (app) => {
|
|
16
|
-
// app.use(cors(corsOptions));
|
|
17
|
-
// app.use(limiter);
|
|
18
|
-
app.use((0, express_1.urlencoded)({ extended: true }));
|
|
19
|
-
app.use((req, res, next) => {
|
|
20
|
-
if (req.url.startsWith(_1.CONFIGS.WEBHOOK_URL)) {
|
|
21
|
-
return next();
|
|
22
|
-
}
|
|
23
|
-
return (0, express_1.json)()(req, res, next);
|
|
24
|
-
});
|
|
25
|
-
// app.use(json());
|
|
26
|
-
await (0, postgres_1.postgresLoader)();
|
|
27
|
-
(0, routes_1.RegisterRoutes)(app);
|
|
28
|
-
};
|
|
29
|
-
exports.default = expressConfig;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.websocketConfig = websocketConfig;
|
|
4
|
-
const socket_io_1 = require("socket.io");
|
|
5
|
-
const _1 = require(".");
|
|
6
|
-
function websocketConfig(server) {
|
|
7
|
-
const io = new socket_io_1.Server(server, {
|
|
8
|
-
cors: {
|
|
9
|
-
origin: '*', //CONFIGS.FRONT_ENDS || '*',
|
|
10
|
-
methods: _1.CONFIGS.WEBSOCKET_METHODS,
|
|
11
|
-
credentials: true
|
|
12
|
-
},
|
|
13
|
-
pingTimeout: 60000,
|
|
14
|
-
pingInterval: 25000
|
|
15
|
-
});
|
|
16
|
-
return io;
|
|
17
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const CHAT_EVENTS: {
|
|
2
|
-
SEND_CHAT_MESSAGE: string;
|
|
3
|
-
UPDATE_CHAT_MESSAGE: string;
|
|
4
|
-
UPDATED_CHAT_MESSAGE: string;
|
|
5
|
-
DELETE_CHAT_MESSAGE: string;
|
|
6
|
-
DELETED_CHAT_MESSAGE: string;
|
|
7
|
-
GET_CHAT_ID: string;
|
|
8
|
-
CONVERSATION_READY: string;
|
|
9
|
-
LOAD_CHAT_MESSAGE: string;
|
|
10
|
-
LOADED_CHAT_MESSAGE: string;
|
|
11
|
-
TYPING: string;
|
|
12
|
-
MESSAGE_DELIVERED: string;
|
|
13
|
-
MESSAGE_STATUS_CHANGED: string;
|
|
14
|
-
MESSAGE_READ: string;
|
|
15
|
-
NEW_MESSAGE: string;
|
|
16
|
-
ERROR: string;
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/common/constants/chat.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;CAgBvB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CHAT_EVENTS = void 0;
|
|
4
|
-
exports.CHAT_EVENTS = {
|
|
5
|
-
SEND_CHAT_MESSAGE: "send_chat_message",
|
|
6
|
-
UPDATE_CHAT_MESSAGE: "update_chat_message",
|
|
7
|
-
UPDATED_CHAT_MESSAGE: "updated_chat_message",
|
|
8
|
-
DELETE_CHAT_MESSAGE: "delete_chat_message",
|
|
9
|
-
DELETED_CHAT_MESSAGE: "deleted_chat_message",
|
|
10
|
-
GET_CHAT_ID: "get_chat_id",
|
|
11
|
-
CONVERSATION_READY: "conversation_ready",
|
|
12
|
-
LOAD_CHAT_MESSAGE: "load_chat_messages",
|
|
13
|
-
LOADED_CHAT_MESSAGE: "loaded_chat_messages",
|
|
14
|
-
TYPING: "typing",
|
|
15
|
-
MESSAGE_DELIVERED: "message_delivered",
|
|
16
|
-
MESSAGE_STATUS_CHANGED: "message_status_changed",
|
|
17
|
-
MESSAGE_READ: "message_read",
|
|
18
|
-
NEW_MESSAGE: "new_message",
|
|
19
|
-
ERROR: "error",
|
|
20
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const ADMIN_MESSAGES: {
|
|
2
|
-
ACCOUNT: {
|
|
3
|
-
NOT_FOUND: string;
|
|
4
|
-
INVALID_CREDENTIALS: string;
|
|
5
|
-
INVALID_ACCOUNT: string;
|
|
6
|
-
INACTIVE_ACCOUNT: string;
|
|
7
|
-
DISABLED_ACCOUNT: string;
|
|
8
|
-
user_ACCOUNT_FETCHED: string;
|
|
9
|
-
};
|
|
10
|
-
EMAIL_VERIFICATION: {
|
|
11
|
-
SUCCESS: string;
|
|
12
|
-
FAILED: string;
|
|
13
|
-
EXPIRED: string;
|
|
14
|
-
ALREADY_ACTIVATED: string;
|
|
15
|
-
INVALID: string;
|
|
16
|
-
};
|
|
17
|
-
AUTH: {
|
|
18
|
-
LOGIN: {
|
|
19
|
-
INVALID_LOGIN: string;
|
|
20
|
-
JWT_GENERATED: string;
|
|
21
|
-
LOGIN_SUCCESSFUL: string;
|
|
22
|
-
};
|
|
23
|
-
REGISTRATION: {
|
|
24
|
-
SUCCESSFUL: string;
|
|
25
|
-
};
|
|
26
|
-
PASSWWORD_RESET: {
|
|
27
|
-
EXPIRED: string;
|
|
28
|
-
DISABLED_ACCOUNT: string;
|
|
29
|
-
INACTIVE_ACCOUNT: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=admin.messages.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin.messages.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/messages/admin.messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC1B,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ADMIN_MESSAGES = void 0;
|
|
4
|
-
exports.ADMIN_MESSAGES = {
|
|
5
|
-
ACCOUNT: {
|
|
6
|
-
NOT_FOUND: "Admin account was not found!",
|
|
7
|
-
INVALID_CREDENTIALS: "Invalid email or password",
|
|
8
|
-
INVALID_ACCOUNT: "Admin account not validated. Please check your email for further instructions",
|
|
9
|
-
INACTIVE_ACCOUNT: "Admin account is inactive. Please contact support",
|
|
10
|
-
DISABLED_ACCOUNT: "Admin account is disabled. Please contact support",
|
|
11
|
-
user_ACCOUNT_FETCHED: "Admin account info was fetched!",
|
|
12
|
-
},
|
|
13
|
-
EMAIL_VERIFICATION: {
|
|
14
|
-
SUCCESS: "Admin email was successfully verified",
|
|
15
|
-
FAILED: "Admin email verification failed",
|
|
16
|
-
EXPIRED: "Email verification token has expired",
|
|
17
|
-
ALREADY_ACTIVATED: "Admin account is already activated",
|
|
18
|
-
INVALID: "Invalid account activation request",
|
|
19
|
-
},
|
|
20
|
-
AUTH: {
|
|
21
|
-
LOGIN: {
|
|
22
|
-
INVALID_LOGIN: "Invalid login credentials",
|
|
23
|
-
JWT_GENERATED: "Admin JWT was generated",
|
|
24
|
-
LOGIN_SUCCESSFUL: "Login was successful",
|
|
25
|
-
},
|
|
26
|
-
REGISTRATION: {
|
|
27
|
-
SUCCESSFUL: "Admin registration was successful",
|
|
28
|
-
},
|
|
29
|
-
PASSWWORD_RESET: {
|
|
30
|
-
EXPIRED: "Password reset token has expired",
|
|
31
|
-
DISABLED_ACCOUNT: "You can only reset the password of an enabled account",
|
|
32
|
-
INACTIVE_ACCOUNT: "You can only reset the password of an active account",
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const USER_MESSAGES: {
|
|
2
|
-
ACCOUNT: {
|
|
3
|
-
NOT_FOUND: string;
|
|
4
|
-
INVALID_CREDENTIALS: string;
|
|
5
|
-
INVALID_ACCOUNT: string;
|
|
6
|
-
INACTIVE_ACCOUNT: string;
|
|
7
|
-
DISABLED_ACCOUNT: string;
|
|
8
|
-
user_ACCOUNT_FETCHED: string;
|
|
9
|
-
};
|
|
10
|
-
EMAIL_VERIFICATION: {
|
|
11
|
-
SUCCESS: string;
|
|
12
|
-
FAILED: string;
|
|
13
|
-
EXPIRED: string;
|
|
14
|
-
ALREADY_ACTIVATED: string;
|
|
15
|
-
INVALID: string;
|
|
16
|
-
};
|
|
17
|
-
AUTH: {
|
|
18
|
-
LOGIN: {
|
|
19
|
-
INVALID_LOGIN: string;
|
|
20
|
-
JWT_GENERATED: string;
|
|
21
|
-
LOGIN_SUCCESSFUL: string;
|
|
22
|
-
};
|
|
23
|
-
REGISTRATION: {
|
|
24
|
-
SUCCESSFUL: string;
|
|
25
|
-
};
|
|
26
|
-
PASSWWORD_RESET: {
|
|
27
|
-
EXPIRED: string;
|
|
28
|
-
DISABLED_ACCOUNT: string;
|
|
29
|
-
INACTIVE_ACCOUNT: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=user.messages.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.messages.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/messages/user.messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCzB,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.USER_MESSAGES = void 0;
|
|
4
|
-
exports.USER_MESSAGES = {
|
|
5
|
-
ACCOUNT: {
|
|
6
|
-
NOT_FOUND: "User account was not found!",
|
|
7
|
-
INVALID_CREDENTIALS: "Invalid email or password",
|
|
8
|
-
INVALID_ACCOUNT: "User account not validated. Please check your email for further instructions",
|
|
9
|
-
INACTIVE_ACCOUNT: "User account is inactive. Please contact support",
|
|
10
|
-
DISABLED_ACCOUNT: "User account is disabled. Please contact support",
|
|
11
|
-
user_ACCOUNT_FETCHED: "User account info was fetched!",
|
|
12
|
-
},
|
|
13
|
-
EMAIL_VERIFICATION: {
|
|
14
|
-
SUCCESS: "User email was successfully verified",
|
|
15
|
-
FAILED: "User email verification failed",
|
|
16
|
-
EXPIRED: "Email verification token has expired",
|
|
17
|
-
ALREADY_ACTIVATED: "User account is already activated",
|
|
18
|
-
INVALID: "Invalid account activation request",
|
|
19
|
-
},
|
|
20
|
-
AUTH: {
|
|
21
|
-
LOGIN: {
|
|
22
|
-
INVALID_LOGIN: "Invalid login credentials",
|
|
23
|
-
JWT_GENERATED: "User JWT was generated",
|
|
24
|
-
LOGIN_SUCCESSFUL: "Login was successful",
|
|
25
|
-
},
|
|
26
|
-
REGISTRATION: {
|
|
27
|
-
SUCCESSFUL: "User registration was successful",
|
|
28
|
-
},
|
|
29
|
-
PASSWWORD_RESET: {
|
|
30
|
-
EXPIRED: "Password reset token has expired",
|
|
31
|
-
DISABLED_ACCOUNT: "You can only reset the password of an enabled account",
|
|
32
|
-
INACTIVE_ACCOUNT: "You can only reset the password of an active account",
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AdminDto.d.ts","sourceRoot":"","sources":["../../../src/common/dtos/AdminDto.ts"],"names":[],"mappings":"AAIA,qBAAa,uBAAuB;IAGhC,UAAU,EAAG,MAAM,CAAC;IAIpB,SAAS,EAAG,MAAM,CAAC;CACtB"}
|
|
@@ -1,30 +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.UpdateMyAdminProfileDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
// import { UpdateMyProfileDto } from "./User.dto";
|
|
15
|
-
const tsoa_1 = require("tsoa");
|
|
16
|
-
class UpdateMyAdminProfileDto {
|
|
17
|
-
first_name;
|
|
18
|
-
last_name;
|
|
19
|
-
}
|
|
20
|
-
exports.UpdateMyAdminProfileDto = UpdateMyAdminProfileDto;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_validator_1.IsString)(),
|
|
23
|
-
(0, tsoa_1.Example)("Boniface"),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], UpdateMyAdminProfileDto.prototype, "first_name", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, class_validator_1.IsString)(),
|
|
28
|
-
(0, tsoa_1.Example)("Ebuka"),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], UpdateMyAdminProfileDto.prototype, "last_name", void 0);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CommunityPostVisibility } from "../enums/CommunityEnum";
|
|
2
|
-
export declare class ArticleBodyDto {
|
|
3
|
-
title?: string;
|
|
4
|
-
visibility?: CommunityPostVisibility;
|
|
5
|
-
is_sensitive?: boolean;
|
|
6
|
-
description: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class ArticleDto extends ArticleBodyDto {
|
|
9
|
-
article_images?: Express.Multer.File[];
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=ArticleDto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleDto.d.ts","sourceRoot":"","sources":["../../../src/common/dtos/ArticleDto.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAGjE,qBAAa,cAAc;IAMzB,KAAK,CAAC,EAAE,MAAM,CAAC;IAOf,UAAU,CAAC,EAAE,uBAAuB,CAAC;IAMrC,YAAY,CAAC,EAAE,OAAO,CAAC;IAIvB,WAAW,EAAG,MAAM,CAAC;CACtB;AAED,qBAAa,UAAW,SAAQ,cAAc;IAI5C,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;CACxC"}
|