@goweekdays/core 2.15.4 → 2.15.6
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/CHANGELOG.md +12 -0
- package/dist/index.js +37 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +268 -304
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -11080,19 +11080,6 @@ function useOrgService() {
|
|
|
11080
11080
|
},
|
|
11081
11081
|
session
|
|
11082
11082
|
);
|
|
11083
|
-
await addJobStatusConfig(
|
|
11084
|
-
{
|
|
11085
|
-
org: String(org),
|
|
11086
|
-
statusTransitions: DEFAULT_JOB_STATUS_SETUP
|
|
11087
|
-
},
|
|
11088
|
-
session
|
|
11089
|
-
);
|
|
11090
|
-
await addJobSummary(
|
|
11091
|
-
{
|
|
11092
|
-
org: String(org)
|
|
11093
|
-
},
|
|
11094
|
-
session
|
|
11095
|
-
);
|
|
11096
11083
|
await useCustomerRepo().add(
|
|
11097
11084
|
{
|
|
11098
11085
|
org: String(org),
|
|
@@ -11113,22 +11100,23 @@ function useOrgService() {
|
|
|
11113
11100
|
},
|
|
11114
11101
|
filePath
|
|
11115
11102
|
});
|
|
11116
|
-
mailer.sendMail({
|
|
11103
|
+
await mailer.sendMail({
|
|
11117
11104
|
to: verification.email,
|
|
11118
11105
|
subject: "Welcome to GoWeekdays - Your Organization is Ready",
|
|
11119
11106
|
from: `"GoWeekdays" <support@goweekdays.com>`,
|
|
11120
11107
|
html: emailContent
|
|
11121
|
-
}).catch((error2) => {
|
|
11122
|
-
import_utils58.logger.log({
|
|
11123
|
-
level: "error",
|
|
11124
|
-
message: `Error sending user invite email: ${error2}`
|
|
11125
|
-
});
|
|
11126
11108
|
});
|
|
11127
11109
|
await session?.commitTransaction();
|
|
11128
11110
|
return "Successfully created organization with verification.";
|
|
11129
11111
|
} catch (error2) {
|
|
11130
11112
|
await session?.abortTransaction();
|
|
11131
|
-
|
|
11113
|
+
if (error2 instanceof import_utils58.AppError) {
|
|
11114
|
+
throw error2;
|
|
11115
|
+
} else {
|
|
11116
|
+
throw new import_utils58.InternalServerError(
|
|
11117
|
+
"Failed to create organization with verification."
|
|
11118
|
+
);
|
|
11119
|
+
}
|
|
11132
11120
|
} finally {
|
|
11133
11121
|
await session?.endSession();
|
|
11134
11122
|
}
|
|
@@ -11217,19 +11205,6 @@ function useOrgService() {
|
|
|
11217
11205
|
},
|
|
11218
11206
|
session
|
|
11219
11207
|
);
|
|
11220
|
-
await addJobStatusConfig(
|
|
11221
|
-
{
|
|
11222
|
-
org: String(org),
|
|
11223
|
-
statusTransitions: DEFAULT_JOB_STATUS_SETUP
|
|
11224
|
-
},
|
|
11225
|
-
session
|
|
11226
|
-
);
|
|
11227
|
-
await addJobSummary(
|
|
11228
|
-
{
|
|
11229
|
-
org: String(org)
|
|
11230
|
-
},
|
|
11231
|
-
session
|
|
11232
|
-
);
|
|
11233
11208
|
await useCustomerRepo().add(
|
|
11234
11209
|
{
|
|
11235
11210
|
org: String(org),
|
|
@@ -11250,22 +11225,23 @@ function useOrgService() {
|
|
|
11250
11225
|
},
|
|
11251
11226
|
filePath
|
|
11252
11227
|
});
|
|
11253
|
-
mailer.sendMail({
|
|
11228
|
+
await mailer.sendMail({
|
|
11254
11229
|
to: verification.email,
|
|
11255
11230
|
subject: "Welcome to GoWeekdays - Your Organization is Ready",
|
|
11256
11231
|
from: `"GoWeekdays" <support@goweekdays.com>`,
|
|
11257
11232
|
html: emailContent
|
|
11258
|
-
}).catch((error2) => {
|
|
11259
|
-
import_utils58.logger.log({
|
|
11260
|
-
level: "error",
|
|
11261
|
-
message: `Error sending user invite email: ${error2}`
|
|
11262
|
-
});
|
|
11263
11233
|
});
|
|
11264
11234
|
await session?.commitTransaction();
|
|
11265
11235
|
return "Successfully created organization with verification.";
|
|
11266
11236
|
} catch (error2) {
|
|
11267
11237
|
await session?.abortTransaction();
|
|
11268
|
-
|
|
11238
|
+
if (error2 instanceof import_utils58.AppError) {
|
|
11239
|
+
throw error2;
|
|
11240
|
+
} else {
|
|
11241
|
+
throw new import_utils58.InternalServerError(
|
|
11242
|
+
"Failed to create organization with verification."
|
|
11243
|
+
);
|
|
11244
|
+
}
|
|
11269
11245
|
} finally {
|
|
11270
11246
|
await session?.endSession();
|
|
11271
11247
|
}
|
|
@@ -12159,16 +12135,11 @@ function useVerificationService() {
|
|
|
12159
12135
|
},
|
|
12160
12136
|
filePath: filePath2
|
|
12161
12137
|
});
|
|
12162
|
-
mailer.sendMail({
|
|
12138
|
+
await mailer.sendMail({
|
|
12163
12139
|
to: email,
|
|
12164
12140
|
subject: "Member Invite",
|
|
12165
12141
|
html: emailContent2,
|
|
12166
12142
|
from: `"GoWeekdays" <support@goweekdays.com>`
|
|
12167
|
-
}).catch((error) => {
|
|
12168
|
-
import_utils62.logger.log({
|
|
12169
|
-
level: "error",
|
|
12170
|
-
message: `Error sending user invite email: ${error}`
|
|
12171
|
-
});
|
|
12172
12143
|
});
|
|
12173
12144
|
return res2;
|
|
12174
12145
|
}
|
|
@@ -12181,20 +12152,19 @@ function useVerificationService() {
|
|
|
12181
12152
|
},
|
|
12182
12153
|
filePath
|
|
12183
12154
|
});
|
|
12184
|
-
mailer.sendMail({
|
|
12155
|
+
await mailer.sendMail({
|
|
12185
12156
|
to: email,
|
|
12186
12157
|
subject: "User Invite",
|
|
12187
12158
|
html: emailContent,
|
|
12188
12159
|
from: `"GoWeekdays" <support@goweekdays.com>`
|
|
12189
|
-
}).catch((error) => {
|
|
12190
|
-
import_utils62.logger.log({
|
|
12191
|
-
level: "error",
|
|
12192
|
-
message: `Error sending user invite email: ${error}`
|
|
12193
|
-
});
|
|
12194
12160
|
});
|
|
12195
12161
|
return res;
|
|
12196
12162
|
} catch (error) {
|
|
12197
|
-
|
|
12163
|
+
if (error instanceof import_utils62.AppError) {
|
|
12164
|
+
throw error;
|
|
12165
|
+
} else {
|
|
12166
|
+
throw new import_utils62.InternalServerError("Failed to create user invitation.");
|
|
12167
|
+
}
|
|
12198
12168
|
}
|
|
12199
12169
|
}
|
|
12200
12170
|
async function createForgetPassword(email) {
|
|
@@ -12216,20 +12186,19 @@ function useVerificationService() {
|
|
|
12216
12186
|
},
|
|
12217
12187
|
filePath
|
|
12218
12188
|
});
|
|
12219
|
-
mailer.sendMail({
|
|
12189
|
+
await mailer.sendMail({
|
|
12220
12190
|
to: email,
|
|
12221
12191
|
subject: "Forget Password",
|
|
12222
12192
|
from: `"GoWeekdays" <support@goweekdays.com>`,
|
|
12223
12193
|
html: emailContent
|
|
12224
|
-
}).catch((error) => {
|
|
12225
|
-
import_utils62.logger.log({
|
|
12226
|
-
level: "error",
|
|
12227
|
-
message: `Error sending forget password email: ${error}`
|
|
12228
|
-
});
|
|
12229
12194
|
});
|
|
12230
12195
|
return "Successfully created a link to reset password. Please check your email.";
|
|
12231
12196
|
} catch (error) {
|
|
12232
|
-
|
|
12197
|
+
if (error instanceof import_utils62.AppError) {
|
|
12198
|
+
throw error;
|
|
12199
|
+
} else {
|
|
12200
|
+
throw new import_utils62.InternalServerError("Failed to create forget password link.");
|
|
12201
|
+
}
|
|
12233
12202
|
}
|
|
12234
12203
|
}
|
|
12235
12204
|
async function getById(id) {
|
|
@@ -12406,20 +12375,19 @@ function useVerificationService() {
|
|
|
12406
12375
|
},
|
|
12407
12376
|
filePath
|
|
12408
12377
|
});
|
|
12409
|
-
mailer.sendMail({
|
|
12378
|
+
await mailer.sendMail({
|
|
12410
12379
|
to: email,
|
|
12411
12380
|
subject: "Sign Up Verification",
|
|
12412
12381
|
html: emailContent,
|
|
12413
12382
|
from: `"GoWeekdays" <support@goweekdays.com>`
|
|
12414
|
-
}).catch((error) => {
|
|
12415
|
-
import_utils62.logger.log({
|
|
12416
|
-
level: "error",
|
|
12417
|
-
message: `Error sending user invite email: ${error}`
|
|
12418
|
-
});
|
|
12419
12383
|
});
|
|
12420
12384
|
return res;
|
|
12421
12385
|
} catch (error) {
|
|
12422
|
-
|
|
12386
|
+
if (error instanceof import_utils62.AppError) {
|
|
12387
|
+
throw error;
|
|
12388
|
+
} else {
|
|
12389
|
+
throw new import_utils62.InternalServerError("Failed to create sign up verification.");
|
|
12390
|
+
}
|
|
12423
12391
|
}
|
|
12424
12392
|
}
|
|
12425
12393
|
const { getByOrg } = useSubscriptionRepo();
|
|
@@ -12498,16 +12466,11 @@ function useVerificationService() {
|
|
|
12498
12466
|
},
|
|
12499
12467
|
filePath: filePath2
|
|
12500
12468
|
});
|
|
12501
|
-
mailer.sendMail({
|
|
12469
|
+
await mailer.sendMail({
|
|
12502
12470
|
to: value.email,
|
|
12503
12471
|
subject: "Member Invite",
|
|
12504
12472
|
html: emailContent2,
|
|
12505
12473
|
from: `"GoWeekdays" <support@goweekdays.com>`
|
|
12506
|
-
}).catch((error2) => {
|
|
12507
|
-
import_utils62.logger.log({
|
|
12508
|
-
level: "error",
|
|
12509
|
-
message: `Error sending user invite email: ${error2}`
|
|
12510
|
-
});
|
|
12511
12474
|
});
|
|
12512
12475
|
return verificationId2;
|
|
12513
12476
|
}
|
|
@@ -12520,7 +12483,7 @@ function useVerificationService() {
|
|
|
12520
12483
|
},
|
|
12521
12484
|
filePath
|
|
12522
12485
|
});
|
|
12523
|
-
mailer.sendMail({
|
|
12486
|
+
await mailer.sendMail({
|
|
12524
12487
|
to: value.email,
|
|
12525
12488
|
subject: "User Invite",
|
|
12526
12489
|
html: emailContent,
|