@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
|
@@ -1,313 +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.ChangeUserPasswordDto = exports.CreateStepFiveFormDto = exports.CreateStepFourFormDto = exports.CreateStepThreeFormDto = exports.CreateStepTwoFormDto = exports.CreateStepOneFormDto = exports.UpdateMyProfileDto = exports.ValidatePasswordResetTokenDTO = exports.SetNewPasswordWithOTPRequestDTO = exports.SetNewPasswordRequestDTO = exports.OnlyEmailDTO = exports.OnlyOTPVerificationDTO = exports.EmailVerificationDTO = exports.LoginUserDto = exports.RegisterUserDto = void 0;
|
|
13
|
-
const tsoa_1 = require("tsoa");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const UserEnums_1 = require("../enums/UserEnums");
|
|
16
|
-
const class_transformer_1 = require("class-transformer");
|
|
17
|
-
const CommonDto_1 = require("./CommonDto");
|
|
18
|
-
class RegisterUserDto {
|
|
19
|
-
email;
|
|
20
|
-
full_name;
|
|
21
|
-
phone;
|
|
22
|
-
password;
|
|
23
|
-
confirm_password;
|
|
24
|
-
terms_and_conditions;
|
|
25
|
-
}
|
|
26
|
-
exports.RegisterUserDto = RegisterUserDto;
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_validator_1.IsString)({
|
|
29
|
-
message: "Email is required",
|
|
30
|
-
}),
|
|
31
|
-
(0, tsoa_1.Example)("boniface.dev@aurispectrum.com"),
|
|
32
|
-
(0, class_validator_1.IsEmail)(),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], RegisterUserDto.prototype, "email", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, class_validator_1.IsString)({
|
|
37
|
-
message: "Your firstname is required",
|
|
38
|
-
}),
|
|
39
|
-
(0, tsoa_1.Example)("Agbo Boniface"),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], RegisterUserDto.prototype, "full_name", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, class_validator_1.IsString)({
|
|
44
|
-
message: "Your valid phone number is required",
|
|
45
|
-
}),
|
|
46
|
-
(0, class_validator_1.IsOptional)(),
|
|
47
|
-
(0, tsoa_1.Example)("+2348099966655"),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], RegisterUserDto.prototype, "phone", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, class_validator_1.IsStrongPassword)({ minLength: 8, minLowercase: 1, minUppercase: 1, minNumbers: 1, minSymbols: 1 }, { message: "Password should be a minimum of 8 characters, with at least 1 uppercase, 1 lowercase, 1 number and 1 special character" }),
|
|
52
|
-
(0, tsoa_1.Example)("aurispectrum.123@"),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], RegisterUserDto.prototype, "password", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, class_validator_1.IsStrongPassword)({ minLength: 8, minLowercase: 1, minUppercase: 1, minNumbers: 1, minSymbols: 1 }, { message: "Password should be a minimum of 8 characters, with at least 1 uppercase, 1 lowercase, 1 number and 1 special character" }),
|
|
57
|
-
(0, tsoa_1.Example)("aurispectrum.123@"),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], RegisterUserDto.prototype, "confirm_password", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, class_validator_1.IsBoolean)({ message: "You must agree to the terms and conditions" }),
|
|
62
|
-
(0, tsoa_1.Example)(true),
|
|
63
|
-
__metadata("design:type", Boolean)
|
|
64
|
-
], RegisterUserDto.prototype, "terms_and_conditions", void 0);
|
|
65
|
-
class LoginUserDto {
|
|
66
|
-
email;
|
|
67
|
-
password;
|
|
68
|
-
}
|
|
69
|
-
exports.LoginUserDto = LoginUserDto;
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, class_validator_1.IsString)({
|
|
72
|
-
message: "Email is required",
|
|
73
|
-
}),
|
|
74
|
-
(0, tsoa_1.Example)("boniface.dev@aurispectrum.com"),
|
|
75
|
-
(0, class_validator_1.IsEmail)(),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], LoginUserDto.prototype, "email", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, class_validator_1.IsString)({
|
|
80
|
-
message: "Password is required",
|
|
81
|
-
}),
|
|
82
|
-
(0, tsoa_1.Example)("aurispectrum.123@"),
|
|
83
|
-
__metadata("design:type", String)
|
|
84
|
-
], LoginUserDto.prototype, "password", void 0);
|
|
85
|
-
class EmailVerificationDTO {
|
|
86
|
-
verification_token;
|
|
87
|
-
hash;
|
|
88
|
-
ref;
|
|
89
|
-
}
|
|
90
|
-
exports.EmailVerificationDTO = EmailVerificationDTO;
|
|
91
|
-
__decorate([
|
|
92
|
-
(0, class_validator_1.IsString)({ message: "Verification token is required" }),
|
|
93
|
-
(0, tsoa_1.Example)("gdhjjgaklal;"),
|
|
94
|
-
__metadata("design:type", String)
|
|
95
|
-
], EmailVerificationDTO.prototype, "verification_token", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
(0, class_validator_1.IsString)({ message: "Verification hash is required" }),
|
|
98
|
-
(0, tsoa_1.Example)("8ada7a06-956f-488f-90c3-92ff6955393a"),
|
|
99
|
-
__metadata("design:type", String)
|
|
100
|
-
], EmailVerificationDTO.prototype, "hash", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
(0, class_validator_1.IsString)({ message: "Verification ref is required" }),
|
|
103
|
-
(0, tsoa_1.Example)("8ada7a06-956f-488f-90c3-92ff6955393a"),
|
|
104
|
-
__metadata("design:type", String)
|
|
105
|
-
], EmailVerificationDTO.prototype, "ref", void 0);
|
|
106
|
-
class OnlyOTPVerificationDTO {
|
|
107
|
-
otp;
|
|
108
|
-
}
|
|
109
|
-
exports.OnlyOTPVerificationDTO = OnlyOTPVerificationDTO;
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, class_validator_1.IsString)({ message: "Otp is required" }),
|
|
112
|
-
(0, tsoa_1.Example)("09996"),
|
|
113
|
-
__metadata("design:type", String)
|
|
114
|
-
], OnlyOTPVerificationDTO.prototype, "otp", void 0);
|
|
115
|
-
class OnlyEmailDTO {
|
|
116
|
-
email;
|
|
117
|
-
}
|
|
118
|
-
exports.OnlyEmailDTO = OnlyEmailDTO;
|
|
119
|
-
__decorate([
|
|
120
|
-
(0, class_validator_1.IsString)({ message: "Email is required" }),
|
|
121
|
-
(0, tsoa_1.Example)("boniface.dev@Aurispectrum.com"),
|
|
122
|
-
__metadata("design:type", String)
|
|
123
|
-
], OnlyEmailDTO.prototype, "email", void 0);
|
|
124
|
-
class SetNewPasswordRequestDTO {
|
|
125
|
-
confirm_password;
|
|
126
|
-
new_password;
|
|
127
|
-
}
|
|
128
|
-
exports.SetNewPasswordRequestDTO = SetNewPasswordRequestDTO;
|
|
129
|
-
__decorate([
|
|
130
|
-
(0, class_validator_1.IsString)({ message: "Confirm password is required" }),
|
|
131
|
-
(0, tsoa_1.Example)("Aurispectrum.123@"),
|
|
132
|
-
__metadata("design:type", String)
|
|
133
|
-
], SetNewPasswordRequestDTO.prototype, "confirm_password", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
(0, class_validator_1.IsString)({ message: "New password is required" }),
|
|
136
|
-
(0, tsoa_1.Example)("Aurispectrum.123@"),
|
|
137
|
-
__metadata("design:type", String)
|
|
138
|
-
], SetNewPasswordRequestDTO.prototype, "new_password", void 0);
|
|
139
|
-
class SetNewPasswordWithOTPRequestDTO extends SetNewPasswordRequestDTO {
|
|
140
|
-
otp;
|
|
141
|
-
}
|
|
142
|
-
exports.SetNewPasswordWithOTPRequestDTO = SetNewPasswordWithOTPRequestDTO;
|
|
143
|
-
__decorate([
|
|
144
|
-
(0, class_validator_1.IsString)({ message: "Otp is required" }),
|
|
145
|
-
(0, tsoa_1.Example)("09996"),
|
|
146
|
-
__metadata("design:type", String)
|
|
147
|
-
], SetNewPasswordWithOTPRequestDTO.prototype, "otp", void 0);
|
|
148
|
-
class ValidatePasswordResetTokenDTO {
|
|
149
|
-
password_reset_token;
|
|
150
|
-
}
|
|
151
|
-
exports.ValidatePasswordResetTokenDTO = ValidatePasswordResetTokenDTO;
|
|
152
|
-
__decorate([
|
|
153
|
-
(0, class_validator_1.IsString)({ message: "Password reset token is required" }),
|
|
154
|
-
(0, tsoa_1.Example)("gdhjjgaklal;"),
|
|
155
|
-
__metadata("design:type", String)
|
|
156
|
-
], ValidatePasswordResetTokenDTO.prototype, "password_reset_token", void 0);
|
|
157
|
-
class UpdateMyProfileDto {
|
|
158
|
-
full_name;
|
|
159
|
-
phone;
|
|
160
|
-
show_full_name;
|
|
161
|
-
show_profile_tags;
|
|
162
|
-
}
|
|
163
|
-
exports.UpdateMyProfileDto = UpdateMyProfileDto;
|
|
164
|
-
__decorate([
|
|
165
|
-
(0, class_validator_1.IsString)(),
|
|
166
|
-
(0, tsoa_1.Example)("Boniface Ebuka"),
|
|
167
|
-
__metadata("design:type", String)
|
|
168
|
-
], UpdateMyProfileDto.prototype, "full_name", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
(0, class_validator_1.IsOptional)(),
|
|
171
|
-
(0, tsoa_1.Example)("+2348099966655"),
|
|
172
|
-
__metadata("design:type", String)
|
|
173
|
-
], UpdateMyProfileDto.prototype, "phone", void 0);
|
|
174
|
-
__decorate([
|
|
175
|
-
(0, class_validator_1.IsBoolean)(),
|
|
176
|
-
(0, tsoa_1.Example)(false),
|
|
177
|
-
__metadata("design:type", Boolean)
|
|
178
|
-
], UpdateMyProfileDto.prototype, "show_full_name", void 0);
|
|
179
|
-
__decorate([
|
|
180
|
-
(0, class_validator_1.IsBoolean)(),
|
|
181
|
-
(0, tsoa_1.Example)(true),
|
|
182
|
-
__metadata("design:type", Boolean)
|
|
183
|
-
], UpdateMyProfileDto.prototype, "show_profile_tags", void 0);
|
|
184
|
-
class CreateStepOneFormDto {
|
|
185
|
-
diagnosis_level;
|
|
186
|
-
user_relationship;
|
|
187
|
-
interest;
|
|
188
|
-
date_of_birth;
|
|
189
|
-
}
|
|
190
|
-
exports.CreateStepOneFormDto = CreateStepOneFormDto;
|
|
191
|
-
__decorate([
|
|
192
|
-
(0, class_validator_1.IsString)({
|
|
193
|
-
message: "Diagnosis level is required",
|
|
194
|
-
}),
|
|
195
|
-
(0, tsoa_1.Example)("9d102761-99e7-41db-8938-f7436d8ab7a7"),
|
|
196
|
-
__metadata("design:type", String)
|
|
197
|
-
], CreateStepOneFormDto.prototype, "diagnosis_level", void 0);
|
|
198
|
-
__decorate([
|
|
199
|
-
(0, class_validator_1.IsString)({
|
|
200
|
-
message: "Relationship is required",
|
|
201
|
-
}),
|
|
202
|
-
(0, tsoa_1.Example)("CHILD"),
|
|
203
|
-
__metadata("design:type", String)
|
|
204
|
-
], CreateStepOneFormDto.prototype, "user_relationship", void 0);
|
|
205
|
-
__decorate([
|
|
206
|
-
(0, class_validator_1.IsString)({
|
|
207
|
-
message: "Interest is required",
|
|
208
|
-
}),
|
|
209
|
-
(0, tsoa_1.Example)("91348d20-aefb-42ee-8201-28d37bd4b229"),
|
|
210
|
-
__metadata("design:type", String)
|
|
211
|
-
], CreateStepOneFormDto.prototype, "interest", void 0);
|
|
212
|
-
__decorate([
|
|
213
|
-
(0, class_validator_1.IsDate)({ message: "Date of birth is required" }),
|
|
214
|
-
(0, tsoa_1.Example)("1990-12-12"),
|
|
215
|
-
__metadata("design:type", Date)
|
|
216
|
-
], CreateStepOneFormDto.prototype, "date_of_birth", void 0);
|
|
217
|
-
class CreateStepTwoFormDto {
|
|
218
|
-
gender;
|
|
219
|
-
speech;
|
|
220
|
-
}
|
|
221
|
-
exports.CreateStepTwoFormDto = CreateStepTwoFormDto;
|
|
222
|
-
__decorate([
|
|
223
|
-
(0, class_validator_1.IsString)({
|
|
224
|
-
message: "Gender is required",
|
|
225
|
-
}),
|
|
226
|
-
(0, tsoa_1.Example)(UserEnums_1.GENDER.MALE),
|
|
227
|
-
__metadata("design:type", String)
|
|
228
|
-
], CreateStepTwoFormDto.prototype, "gender", void 0);
|
|
229
|
-
__decorate([
|
|
230
|
-
(0, class_validator_1.IsString)({
|
|
231
|
-
message: "Speech is required",
|
|
232
|
-
}),
|
|
233
|
-
(0, tsoa_1.Example)("23d309f3-9255-4741-ab41-4376c0d130ab"),
|
|
234
|
-
__metadata("design:type", String)
|
|
235
|
-
], CreateStepTwoFormDto.prototype, "speech", void 0);
|
|
236
|
-
class CreateStepThreeFormDto {
|
|
237
|
-
education;
|
|
238
|
-
challenges_selections;
|
|
239
|
-
other_challenges;
|
|
240
|
-
}
|
|
241
|
-
exports.CreateStepThreeFormDto = CreateStepThreeFormDto;
|
|
242
|
-
__decorate([
|
|
243
|
-
(0, class_validator_1.IsString)({ message: 'Education level is required' }),
|
|
244
|
-
(0, class_validator_1.IsUUID)('4', { message: 'Education must be a valid UUID' }),
|
|
245
|
-
(0, tsoa_1.Example)("eb496149-01a3-4cf6-bb48-610870c18a83"),
|
|
246
|
-
__metadata("design:type", String)
|
|
247
|
-
], CreateStepThreeFormDto.prototype, "education", void 0);
|
|
248
|
-
__decorate([
|
|
249
|
-
(0, class_validator_1.IsArray)({ message: 'Challenges must be an array' }),
|
|
250
|
-
(0, class_validator_1.ArrayNotEmpty)({ message: 'At least one challenge is required' }),
|
|
251
|
-
(0, class_validator_1.IsUUID)('4', { each: true, message: 'Each challenge must be a valid UUID' }),
|
|
252
|
-
(0, tsoa_1.Example)(["3a5497a6-7480-42ee-905d-3afb4425bfd5"]),
|
|
253
|
-
__metadata("design:type", Array)
|
|
254
|
-
], CreateStepThreeFormDto.prototype, "challenges_selections", void 0);
|
|
255
|
-
__decorate([
|
|
256
|
-
(0, class_validator_1.IsArray)({ message: 'Challenges must be an array' }),
|
|
257
|
-
(0, class_validator_1.IsUUID)('4', { each: true, message: 'Each challenge must be a valid UUID' }),
|
|
258
|
-
(0, tsoa_1.Example)(["Starmmering"]),
|
|
259
|
-
(0, class_validator_1.IsOptional)(),
|
|
260
|
-
__metadata("design:type", Array)
|
|
261
|
-
], CreateStepThreeFormDto.prototype, "other_challenges", void 0);
|
|
262
|
-
class CreateStepFourFormDto {
|
|
263
|
-
goals;
|
|
264
|
-
}
|
|
265
|
-
exports.CreateStepFourFormDto = CreateStepFourFormDto;
|
|
266
|
-
__decorate([
|
|
267
|
-
(0, class_validator_1.IsArray)({ message: 'Goals must be an array' }),
|
|
268
|
-
(0, class_validator_1.IsUUID)('4', { each: true, message: 'Each goal must be a valid UUID' }),
|
|
269
|
-
(0, tsoa_1.Example)(["4d087fc3-2594-4cb8-aaa7-37c030531888"]),
|
|
270
|
-
__metadata("design:type", Array)
|
|
271
|
-
], CreateStepFourFormDto.prototype, "goals", void 0);
|
|
272
|
-
class CreateStepFiveFormDto {
|
|
273
|
-
city;
|
|
274
|
-
country;
|
|
275
|
-
state;
|
|
276
|
-
coordinates;
|
|
277
|
-
}
|
|
278
|
-
exports.CreateStepFiveFormDto = CreateStepFiveFormDto;
|
|
279
|
-
__decorate([
|
|
280
|
-
(0, class_validator_1.IsString)({ message: 'City is required' }),
|
|
281
|
-
(0, tsoa_1.Example)("Ikeja"),
|
|
282
|
-
__metadata("design:type", String)
|
|
283
|
-
], CreateStepFiveFormDto.prototype, "city", void 0);
|
|
284
|
-
__decorate([
|
|
285
|
-
(0, tsoa_1.Example)("Nigeria"),
|
|
286
|
-
(0, class_validator_1.IsString)({ message: 'Country is required' }),
|
|
287
|
-
__metadata("design:type", String)
|
|
288
|
-
], CreateStepFiveFormDto.prototype, "country", void 0);
|
|
289
|
-
__decorate([
|
|
290
|
-
(0, tsoa_1.Example)("Lagos"),
|
|
291
|
-
(0, class_validator_1.IsString)({ message: 'State is required' }),
|
|
292
|
-
__metadata("design:type", String)
|
|
293
|
-
], CreateStepFiveFormDto.prototype, "state", void 0);
|
|
294
|
-
__decorate([
|
|
295
|
-
(0, class_validator_1.ValidateNested)(),
|
|
296
|
-
(0, class_transformer_1.Type)(() => CommonDto_1.UserCoordinatesDto),
|
|
297
|
-
__metadata("design:type", CommonDto_1.UserCoordinatesDto)
|
|
298
|
-
], CreateStepFiveFormDto.prototype, "coordinates", void 0);
|
|
299
|
-
class ChangeUserPasswordDto {
|
|
300
|
-
new_password;
|
|
301
|
-
confirm_password;
|
|
302
|
-
}
|
|
303
|
-
exports.ChangeUserPasswordDto = ChangeUserPasswordDto;
|
|
304
|
-
__decorate([
|
|
305
|
-
(0, class_validator_1.IsStrongPassword)({ minLength: 8, minLowercase: 1, minUppercase: 1, minNumbers: 1, minSymbols: 1 }, { message: "Password should be a minimum of 8 characters, with at least 1 uppercase, 1 lowercase, 1 number and 1 special character" }),
|
|
306
|
-
(0, tsoa_1.Example)("aurispectrum.123@"),
|
|
307
|
-
__metadata("design:type", String)
|
|
308
|
-
], ChangeUserPasswordDto.prototype, "new_password", void 0);
|
|
309
|
-
__decorate([
|
|
310
|
-
(0, class_validator_1.IsStrongPassword)({ minLength: 8, minLowercase: 1, minUppercase: 1, minNumbers: 1, minSymbols: 1 }, { message: "Password should be a minimum of 8 characters, with at least 1 uppercase, 1 lowercase, 1 number and 1 special character" }),
|
|
311
|
-
(0, tsoa_1.Example)("aurispectrum.123@"),
|
|
312
|
-
__metadata("design:type", String)
|
|
313
|
-
], ChangeUserPasswordDto.prototype, "confirm_password", void 0);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ObjectLiteral } from "typeorm";
|
|
2
|
-
export interface IPagination<T extends ObjectLiteral = any> {
|
|
3
|
-
page?: number;
|
|
4
|
-
limit?: number;
|
|
5
|
-
baseQuery: string;
|
|
6
|
-
countQuery: string;
|
|
7
|
-
params: any[];
|
|
8
|
-
}
|
|
9
|
-
export interface IPaginator {
|
|
10
|
-
data: any[];
|
|
11
|
-
total: number;
|
|
12
|
-
currentPage: number;
|
|
13
|
-
perPage: number;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=IPagination.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IPagination.d.ts","sourceRoot":"","sources":["../../../src/common/types/IPagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,SAAS,CAAC;AAEpD,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,aAAa,GAAG,GAAG;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1,26 +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
|
-
exports.makeApiCall = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const logger_1 = require("../configs/logger");
|
|
9
|
-
const makeApiCall = async (url, options = {}) => {
|
|
10
|
-
try {
|
|
11
|
-
const res = await (0, axios_1.default)({
|
|
12
|
-
url,
|
|
13
|
-
method: options.method || 'GET',
|
|
14
|
-
params: options.params,
|
|
15
|
-
data: options.data,
|
|
16
|
-
headers: options.headers,
|
|
17
|
-
timeout: 10000,
|
|
18
|
-
});
|
|
19
|
-
return res.data;
|
|
20
|
-
}
|
|
21
|
-
catch (error) {
|
|
22
|
-
logger_1.logger.error('API Error:', error);
|
|
23
|
-
throw error.message;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.makeApiCall = makeApiCall;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.socketEventHandler = void 0;
|
|
4
|
-
const socketErrorHandlerMiddlware_1 = require("@/middlewares/socketErrorHandlerMiddlware");
|
|
5
|
-
const socketEventHandler = (socket, handler) => {
|
|
6
|
-
return async (...args) => {
|
|
7
|
-
const next = args[args.length - 1];
|
|
8
|
-
try {
|
|
9
|
-
await handler(...args);
|
|
10
|
-
}
|
|
11
|
-
catch (err) {
|
|
12
|
-
(0, socketErrorHandlerMiddlware_1.socketErrorHandlerMiddlware)(err, socket);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
exports.socketEventHandler = socketEventHandler;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommunityDataSeeder = CommunityDataSeeder;
|
|
4
|
-
const TopicRepository_1 = require("../../repositories/TopicRepository");
|
|
5
|
-
async function CommunityDataSeeder() {
|
|
6
|
-
const topicRepository = new TopicRepository_1.TopicRepository();
|
|
7
|
-
const community_topics = [
|
|
8
|
-
{
|
|
9
|
-
name: "Support"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: "Therapy"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: "Advocacy"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: "Learning"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: "Resources"
|
|
22
|
-
}, {
|
|
23
|
-
name: "Wellness"
|
|
24
|
-
}, {
|
|
25
|
-
name: "Learning"
|
|
26
|
-
}, {
|
|
27
|
-
name: "Daily living & Routines"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'Events & meetups'
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
for (const community_topic of community_topics) {
|
|
34
|
-
const { name } = community_topic;
|
|
35
|
-
const exists = await topicRepository.basicFindOneByConditions({
|
|
36
|
-
name
|
|
37
|
-
});
|
|
38
|
-
if (!exists) {
|
|
39
|
-
await topicRepository.create({
|
|
40
|
-
name,
|
|
41
|
-
});
|
|
42
|
-
console.log(`✅ Community topic "${community_topic.name}" seeded`);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
console.log(`⚡ Community topic "${community_topic.name}" already exists, skipping`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EventDataSeeder = EventDataSeeder;
|
|
4
|
-
const EventTypeRepository_1 = require("../../repositories/EventTypeRepository");
|
|
5
|
-
async function EventDataSeeder() {
|
|
6
|
-
const eventTypeRepository = new EventTypeRepository_1.EventTypeRepository();
|
|
7
|
-
const event_types = [
|
|
8
|
-
{
|
|
9
|
-
name: "Playdate"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: "Sensory Play"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: "Community Meetup"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: "Caregivers Meetup"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: "Experience Sharing Session"
|
|
22
|
-
}, {
|
|
23
|
-
name: "Emotional Support Meetup"
|
|
24
|
-
}, {
|
|
25
|
-
name: "Support Circle"
|
|
26
|
-
}, {
|
|
27
|
-
name: "Weekend Play Meetup"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'Indoor Play Session'
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'Parenting Tips Session'
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: 'Family Hangout'
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
for (const event_type of event_types) {
|
|
40
|
-
const { name } = event_type;
|
|
41
|
-
const exists = await eventTypeRepository.basicFindOneByConditions({
|
|
42
|
-
name
|
|
43
|
-
});
|
|
44
|
-
if (!exists) {
|
|
45
|
-
await eventTypeRepository.create({
|
|
46
|
-
name,
|
|
47
|
-
});
|
|
48
|
-
console.log(`✅ Event type "${event_type.name}" seeded`);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
console.log(`⚡ Event type "${event_type.name}" already exists, skipping`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FeatureSeeder = FeatureSeeder;
|
|
4
|
-
const PlanRepository_1 = require("../../repositories/PlanRepository");
|
|
5
|
-
const PlanFeatureRepository_1 = require("../../repositories/PlanFeatureRepository");
|
|
6
|
-
const FeatureRepository_1 = require("../../repositories/FeatureRepository");
|
|
7
|
-
async function FeatureSeeder() {
|
|
8
|
-
const featureRepository = new FeatureRepository_1.FeatureRepository();
|
|
9
|
-
const planRepository = new PlanRepository_1.PlanRepository();
|
|
10
|
-
const planFeatureRepository = new PlanFeatureRepository_1.PlanFeatureRepository();
|
|
11
|
-
const free_plan_features = [
|
|
12
|
-
{
|
|
13
|
-
name: "Access to Only basic things",
|
|
14
|
-
description: "Access to Only basic things",
|
|
15
|
-
code: "access_to_basic_things",
|
|
16
|
-
},
|
|
17
|
-
];
|
|
18
|
-
for (const feature of free_plan_features) {
|
|
19
|
-
let free_plan_feature = await featureRepository.basicFindOneByConditions({
|
|
20
|
-
code: feature.code
|
|
21
|
-
});
|
|
22
|
-
if (!free_plan_feature) {
|
|
23
|
-
free_plan_feature = await featureRepository.create(feature);
|
|
24
|
-
console.log(`✅ Feature "${feature.name}" seeded`);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
console.log(`⚡ Feature "${feature.name}" already exists, skipping`);
|
|
28
|
-
}
|
|
29
|
-
// Free plan
|
|
30
|
-
const freePlan = await planRepository.basicFindOneByConditions({
|
|
31
|
-
name: "Free",
|
|
32
|
-
});
|
|
33
|
-
if (freePlan) {
|
|
34
|
-
// Check if feature is already in plan
|
|
35
|
-
const planFeature = await planFeatureRepository.basicFindOneByConditions({
|
|
36
|
-
plan_id: freePlan.id,
|
|
37
|
-
feature_id: free_plan_feature.id,
|
|
38
|
-
});
|
|
39
|
-
if (planFeature) {
|
|
40
|
-
console.log(`⚡ Feature "${feature.name}" already in Free plan, skipping`);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
await planFeatureRepository.create({
|
|
44
|
-
plan: freePlan,
|
|
45
|
-
feature: free_plan_feature,
|
|
46
|
-
});
|
|
47
|
-
console.log(`✅ Feature "${feature.name}" seeded`);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const care_circle_plan_features = [
|
|
52
|
-
{
|
|
53
|
-
name: "Everything in Free",
|
|
54
|
-
description: "Everything in Free",
|
|
55
|
-
code: "everything_in_free",
|
|
56
|
-
}
|
|
57
|
-
];
|
|
58
|
-
for (const feature of care_circle_plan_features) {
|
|
59
|
-
let care_circle_plan_feature = await featureRepository.basicFindOneByConditions({
|
|
60
|
-
code: feature.code
|
|
61
|
-
});
|
|
62
|
-
if (!care_circle_plan_feature) {
|
|
63
|
-
care_circle_plan_feature = await featureRepository.create(feature);
|
|
64
|
-
console.log(`✅ Feature "${feature.name}" seeded`);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
console.log(`⚡ Feature "${feature.name}" already exists, skipping`);
|
|
68
|
-
}
|
|
69
|
-
// Free plan
|
|
70
|
-
const plan = await planRepository.basicFindOneByConditions({
|
|
71
|
-
name: "Care Circle Plan",
|
|
72
|
-
});
|
|
73
|
-
if (plan) {
|
|
74
|
-
// Check if feature is already in plan
|
|
75
|
-
const planFeature = await planFeatureRepository.basicFindOneByConditions({
|
|
76
|
-
plan_id: plan.id,
|
|
77
|
-
feature_id: care_circle_plan_feature.id,
|
|
78
|
-
});
|
|
79
|
-
if (planFeature) {
|
|
80
|
-
console.log(`⚡ Feature "${feature.name}" already in Care Circle plan, skipping`);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
await planFeatureRepository.create({
|
|
84
|
-
plan: plan,
|
|
85
|
-
feature: care_circle_plan_feature,
|
|
86
|
-
});
|
|
87
|
-
console.log(`✅ Feature "${feature.name}" seeded`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
const impact_pro_plan_features = [
|
|
92
|
-
{
|
|
93
|
-
name: "Everything in Free + Care Circle plan",
|
|
94
|
-
description: "Everything in Free + Care Circle plan",
|
|
95
|
-
code: "everything_in_free_plus_care_circle",
|
|
96
|
-
},
|
|
97
|
-
];
|
|
98
|
-
for (const feature of impact_pro_plan_features) {
|
|
99
|
-
let impact_pro_plan_feature = await featureRepository.basicFindOneByConditions({
|
|
100
|
-
code: feature.code
|
|
101
|
-
});
|
|
102
|
-
if (!impact_pro_plan_feature) {
|
|
103
|
-
impact_pro_plan_feature = await featureRepository.create(feature);
|
|
104
|
-
console.log(`✅ Feature "${feature.name}" seeded`);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
console.log(`⚡ Feature "${feature.name}" already exists, skipping`);
|
|
108
|
-
}
|
|
109
|
-
// Free plan
|
|
110
|
-
const plan = await planRepository.basicFindOneByConditions({
|
|
111
|
-
name: "Impact pro plan",
|
|
112
|
-
});
|
|
113
|
-
if (plan) {
|
|
114
|
-
// Check if feature is already in plan
|
|
115
|
-
const planFeature = await planFeatureRepository.basicFindOneByConditions({
|
|
116
|
-
plan_id: plan.id,
|
|
117
|
-
feature_id: impact_pro_plan_feature.id,
|
|
118
|
-
});
|
|
119
|
-
if (planFeature) {
|
|
120
|
-
console.log(`⚡ Feature "${feature.name}" already in Impact pro plan, skipping`);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
await planFeatureRepository.create({
|
|
124
|
-
plan: plan,
|
|
125
|
-
feature: impact_pro_plan_feature,
|
|
126
|
-
});
|
|
127
|
-
console.log(`✅ Feature "${feature.name}" seeded`);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|