@experts_hub/shared 1.0.675 → 1.0.676
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/entities/index.d.ts +3 -2
- package/dist/entities/plan-feature.entity.d.ts +10 -0
- package/dist/entities/plan-pricing.entity.d.ts +22 -0
- package/dist/entities/plan.entity.d.ts +11 -7
- package/dist/index.d.mts +43 -15
- package/dist/index.d.ts +43 -15
- package/dist/index.js +347 -175
- package/dist/index.mjs +296 -101
- package/package.json +1 -1
- package/dist/entities/feature.entity.d.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -86,6 +86,7 @@ __export(index_exports, {
|
|
|
86
86
|
BankAccountTypeEnum: () => BankAccountTypeEnum,
|
|
87
87
|
BankDetail: () => BankDetail,
|
|
88
88
|
BaseEntity: () => BaseEntity,
|
|
89
|
+
BillingCycle: () => BillingCycle,
|
|
89
90
|
BillingCycleEnum: () => BillingCycleEnum,
|
|
90
91
|
CALENDLY_PATTERN: () => CALENDLY_PATTERN,
|
|
91
92
|
CITY_PATTERN: () => CITY_PATTERN,
|
|
@@ -202,7 +203,6 @@ __export(index_exports, {
|
|
|
202
203
|
FREELANCER_EXPERIENCE_PATTERN: () => FREELANCER_EXPERIENCE_PATTERN,
|
|
203
204
|
FREELANCER_PROJECT_PATTERN: () => FREELANCER_PROJECT_PATTERN,
|
|
204
205
|
FREELANCER_SKILL_PATTERN: () => FREELANCER_SKILL_PATTERN,
|
|
205
|
-
Feature: () => Feature,
|
|
206
206
|
FetchClientInfoForChatDto: () => FetchClientInfoForChatDto,
|
|
207
207
|
FetchFreelancerInfoForChatDto: () => FetchFreelancerInfoForChatDto,
|
|
208
208
|
ForgotPasswordDto: () => ForgotPasswordDto,
|
|
@@ -322,6 +322,8 @@ __export(index_exports, {
|
|
|
322
322
|
PROFILE_PATTERN: () => PROFILE_PATTERN,
|
|
323
323
|
Permission: () => Permission,
|
|
324
324
|
Plan: () => Plan,
|
|
325
|
+
PlanFeature: () => PlanFeature,
|
|
326
|
+
PlanPricing: () => PlanPricing,
|
|
325
327
|
PreCheckoutCalculationDto: () => PreCheckoutCalculationDto,
|
|
326
328
|
ProjectDto: () => ProjectDto,
|
|
327
329
|
Provider: () => Provider,
|
|
@@ -13016,71 +13018,28 @@ JobRoles = __decorateClass([
|
|
|
13016
13018
|
(0, import_typeorm72.Entity)("job_roles")
|
|
13017
13019
|
], JobRoles);
|
|
13018
13020
|
|
|
13019
|
-
// src/entities/plan.entity.ts
|
|
13020
|
-
var import_typeorm74 = require("typeorm");
|
|
13021
|
-
|
|
13022
|
-
// src/entities/feature.entity.ts
|
|
13023
|
-
var import_typeorm73 = require("typeorm");
|
|
13024
|
-
var Feature = class extends BaseEntity {
|
|
13025
|
-
};
|
|
13026
|
-
__decorateClass([
|
|
13027
|
-
(0, import_typeorm73.Column)({ name: "name", type: "varchar", unique: true })
|
|
13028
|
-
], Feature.prototype, "name", 2);
|
|
13029
|
-
__decorateClass([
|
|
13030
|
-
(0, import_typeorm73.ManyToMany)(() => Plan, (plan) => plan.features)
|
|
13031
|
-
], Feature.prototype, "plans", 2);
|
|
13032
|
-
Feature = __decorateClass([
|
|
13033
|
-
(0, import_typeorm73.Entity)("features")
|
|
13034
|
-
], Feature);
|
|
13035
|
-
|
|
13036
|
-
// src/entities/plan.entity.ts
|
|
13037
|
-
var Plan = class extends BaseEntity {
|
|
13038
|
-
};
|
|
13039
|
-
__decorateClass([
|
|
13040
|
-
(0, import_typeorm74.Column)({ name: "name", type: "varchar", unique: true })
|
|
13041
|
-
], Plan.prototype, "name", 2);
|
|
13042
|
-
__decorateClass([
|
|
13043
|
-
(0, import_typeorm74.Column)({ name: "description", type: "varchar", nullable: true })
|
|
13044
|
-
], Plan.prototype, "description", 2);
|
|
13045
|
-
__decorateClass([
|
|
13046
|
-
(0, import_typeorm74.Column)({ name: "price", type: "decimal", precision: 10, scale: 2 })
|
|
13047
|
-
], Plan.prototype, "price", 2);
|
|
13048
|
-
__decorateClass([
|
|
13049
|
-
(0, import_typeorm74.Column)({ name: "billing_period", type: "varchar" })
|
|
13050
|
-
], Plan.prototype, "billingPeriod", 2);
|
|
13051
|
-
__decorateClass([
|
|
13052
|
-
(0, import_typeorm74.Column)({ name: "is_current", type: "boolean", default: false })
|
|
13053
|
-
], Plan.prototype, "isCurrent", 2);
|
|
13054
|
-
__decorateClass([
|
|
13055
|
-
(0, import_typeorm74.ManyToMany)(() => Feature, (feature) => feature.plans, { cascade: true }),
|
|
13056
|
-
(0, import_typeorm74.JoinTable)()
|
|
13057
|
-
], Plan.prototype, "features", 2);
|
|
13058
|
-
Plan = __decorateClass([
|
|
13059
|
-
(0, import_typeorm74.Entity)("plans")
|
|
13060
|
-
], Plan);
|
|
13061
|
-
|
|
13062
13021
|
// src/entities/cms.entity.ts
|
|
13063
|
-
var
|
|
13022
|
+
var import_typeorm73 = require("typeorm");
|
|
13064
13023
|
var Cms = class extends BaseEntity {
|
|
13065
13024
|
};
|
|
13066
13025
|
__decorateClass([
|
|
13067
|
-
(0,
|
|
13026
|
+
(0, import_typeorm73.Column)({ name: "title", type: "varchar", nullable: true })
|
|
13068
13027
|
], Cms.prototype, "title", 2);
|
|
13069
13028
|
__decorateClass([
|
|
13070
|
-
(0,
|
|
13029
|
+
(0, import_typeorm73.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
|
|
13071
13030
|
], Cms.prototype, "slug", 2);
|
|
13072
13031
|
__decorateClass([
|
|
13073
|
-
(0,
|
|
13032
|
+
(0, import_typeorm73.Column)({ name: "content", type: "varchar", nullable: true })
|
|
13074
13033
|
], Cms.prototype, "content", 2);
|
|
13075
13034
|
__decorateClass([
|
|
13076
|
-
(0,
|
|
13035
|
+
(0, import_typeorm73.Column)({ name: "is_active", type: "boolean", default: true })
|
|
13077
13036
|
], Cms.prototype, "isActive", 2);
|
|
13078
13037
|
Cms = __decorateClass([
|
|
13079
|
-
(0,
|
|
13038
|
+
(0, import_typeorm73.Entity)("cms")
|
|
13080
13039
|
], Cms);
|
|
13081
13040
|
|
|
13082
13041
|
// src/entities/lead.entity.ts
|
|
13083
|
-
var
|
|
13042
|
+
var import_typeorm74 = require("typeorm");
|
|
13084
13043
|
var CategoryEmum = /* @__PURE__ */ ((CategoryEmum2) => {
|
|
13085
13044
|
CategoryEmum2["BUSINESS"] = "BUSINESS";
|
|
13086
13045
|
CategoryEmum2["FREELANCER"] = "FREELANCER";
|
|
@@ -13089,22 +13048,22 @@ var CategoryEmum = /* @__PURE__ */ ((CategoryEmum2) => {
|
|
|
13089
13048
|
var Lead = class extends BaseEntity {
|
|
13090
13049
|
};
|
|
13091
13050
|
__decorateClass([
|
|
13092
|
-
(0,
|
|
13051
|
+
(0, import_typeorm74.Column)({ name: "name", type: "varchar", nullable: true })
|
|
13093
13052
|
], Lead.prototype, "name", 2);
|
|
13094
13053
|
__decorateClass([
|
|
13095
|
-
(0,
|
|
13054
|
+
(0, import_typeorm74.Column)({ name: "mobile_code", type: "varchar", nullable: true })
|
|
13096
13055
|
], Lead.prototype, "mobileCode", 2);
|
|
13097
13056
|
__decorateClass([
|
|
13098
|
-
(0,
|
|
13057
|
+
(0, import_typeorm74.Column)({ name: "mobile", type: "varchar", nullable: true })
|
|
13099
13058
|
], Lead.prototype, "mobile", 2);
|
|
13100
13059
|
__decorateClass([
|
|
13101
|
-
(0,
|
|
13060
|
+
(0, import_typeorm74.Column)({ name: "email", type: "varchar", nullable: true })
|
|
13102
13061
|
], Lead.prototype, "email", 2);
|
|
13103
13062
|
__decorateClass([
|
|
13104
|
-
(0,
|
|
13063
|
+
(0, import_typeorm74.Column)({ name: "description", type: "varchar", nullable: true })
|
|
13105
13064
|
], Lead.prototype, "description", 2);
|
|
13106
13065
|
__decorateClass([
|
|
13107
|
-
(0,
|
|
13066
|
+
(0, import_typeorm74.Column)({
|
|
13108
13067
|
name: "category",
|
|
13109
13068
|
type: "enum",
|
|
13110
13069
|
enum: CategoryEmum,
|
|
@@ -13112,129 +13071,129 @@ __decorateClass([
|
|
|
13112
13071
|
})
|
|
13113
13072
|
], Lead.prototype, "category", 2);
|
|
13114
13073
|
Lead = __decorateClass([
|
|
13115
|
-
(0,
|
|
13074
|
+
(0, import_typeorm74.Entity)("leads")
|
|
13116
13075
|
], Lead);
|
|
13117
13076
|
|
|
13118
13077
|
// src/entities/job-freelancer-recommendation.entity.ts
|
|
13119
|
-
var
|
|
13078
|
+
var import_typeorm75 = require("typeorm");
|
|
13120
13079
|
var JobFreelancerRecommendation = class {
|
|
13121
13080
|
};
|
|
13122
13081
|
__decorateClass([
|
|
13123
|
-
(0,
|
|
13082
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_id" })
|
|
13124
13083
|
], JobFreelancerRecommendation.prototype, "jobId", 2);
|
|
13125
13084
|
__decorateClass([
|
|
13126
|
-
(0,
|
|
13085
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_uuid" })
|
|
13127
13086
|
], JobFreelancerRecommendation.prototype, "jobUuid", 2);
|
|
13128
13087
|
__decorateClass([
|
|
13129
|
-
(0,
|
|
13088
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_unique_id" })
|
|
13130
13089
|
], JobFreelancerRecommendation.prototype, "jobUniqueId", 2);
|
|
13131
13090
|
__decorateClass([
|
|
13132
|
-
(0,
|
|
13091
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_role" })
|
|
13133
13092
|
], JobFreelancerRecommendation.prototype, "jobRole", 2);
|
|
13134
13093
|
__decorateClass([
|
|
13135
|
-
(0,
|
|
13094
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_openings" })
|
|
13136
13095
|
], JobFreelancerRecommendation.prototype, "jobOpenings", 2);
|
|
13137
13096
|
__decorateClass([
|
|
13138
|
-
(0,
|
|
13097
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_location" })
|
|
13139
13098
|
], JobFreelancerRecommendation.prototype, "jobLocation", 2);
|
|
13140
13099
|
__decorateClass([
|
|
13141
|
-
(0,
|
|
13100
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_currency" })
|
|
13142
13101
|
], JobFreelancerRecommendation.prototype, "jobCurrency", 2);
|
|
13143
13102
|
__decorateClass([
|
|
13144
|
-
(0,
|
|
13103
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_salary_from" })
|
|
13145
13104
|
], JobFreelancerRecommendation.prototype, "jobSalaryFrom", 2);
|
|
13146
13105
|
__decorateClass([
|
|
13147
|
-
(0,
|
|
13106
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_salary_to" })
|
|
13148
13107
|
], JobFreelancerRecommendation.prototype, "jobSalaryTo", 2);
|
|
13149
13108
|
__decorateClass([
|
|
13150
|
-
(0,
|
|
13109
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_employment_type" })
|
|
13151
13110
|
], JobFreelancerRecommendation.prototype, "jobEmploymentType", 2);
|
|
13152
13111
|
__decorateClass([
|
|
13153
|
-
(0,
|
|
13112
|
+
(0, import_typeorm75.ViewColumn)({ name: "application_received" })
|
|
13154
13113
|
], JobFreelancerRecommendation.prototype, "applicationReceived", 2);
|
|
13155
13114
|
__decorateClass([
|
|
13156
|
-
(0,
|
|
13115
|
+
(0, import_typeorm75.ViewColumn)({ name: "job_posted_at" })
|
|
13157
13116
|
], JobFreelancerRecommendation.prototype, "jobPostedAt", 2);
|
|
13158
13117
|
__decorateClass([
|
|
13159
|
-
(0,
|
|
13118
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_id" })
|
|
13160
13119
|
], JobFreelancerRecommendation.prototype, "freelancerId", 2);
|
|
13161
13120
|
__decorateClass([
|
|
13162
|
-
(0,
|
|
13121
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_uuid" })
|
|
13163
13122
|
], JobFreelancerRecommendation.prototype, "freelancerUuid", 2);
|
|
13164
13123
|
__decorateClass([
|
|
13165
|
-
(0,
|
|
13124
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_unique_id" })
|
|
13166
13125
|
], JobFreelancerRecommendation.prototype, "freelancerUniqueId", 2);
|
|
13167
13126
|
__decorateClass([
|
|
13168
|
-
(0,
|
|
13127
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_first_name" })
|
|
13169
13128
|
], JobFreelancerRecommendation.prototype, "freelancerFirstName", 2);
|
|
13170
13129
|
__decorateClass([
|
|
13171
|
-
(0,
|
|
13130
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_last_name" })
|
|
13172
13131
|
], JobFreelancerRecommendation.prototype, "freelancerLastName", 2);
|
|
13173
13132
|
__decorateClass([
|
|
13174
|
-
(0,
|
|
13133
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_email" })
|
|
13175
13134
|
], JobFreelancerRecommendation.prototype, "freelancerEmail", 2);
|
|
13176
13135
|
__decorateClass([
|
|
13177
|
-
(0,
|
|
13136
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_profile_picture" })
|
|
13178
13137
|
], JobFreelancerRecommendation.prototype, "freelancerProfilePicture", 2);
|
|
13179
13138
|
__decorateClass([
|
|
13180
|
-
(0,
|
|
13139
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_is_social" })
|
|
13181
13140
|
], JobFreelancerRecommendation.prototype, "freelancerIsSocial", 2);
|
|
13182
13141
|
__decorateClass([
|
|
13183
|
-
(0,
|
|
13142
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_created_at" })
|
|
13184
13143
|
], JobFreelancerRecommendation.prototype, "freelancerCreatedAt", 2);
|
|
13185
13144
|
__decorateClass([
|
|
13186
|
-
(0,
|
|
13145
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_designation" })
|
|
13187
13146
|
], JobFreelancerRecommendation.prototype, "freelancerDesignation", 2);
|
|
13188
13147
|
__decorateClass([
|
|
13189
|
-
(0,
|
|
13148
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_experience" })
|
|
13190
13149
|
], JobFreelancerRecommendation.prototype, "freelancerExperience", 2);
|
|
13191
13150
|
__decorateClass([
|
|
13192
|
-
(0,
|
|
13151
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_expertshub_verified" })
|
|
13193
13152
|
], JobFreelancerRecommendation.prototype, "freelancerExpertshubVerified", 2);
|
|
13194
13153
|
__decorateClass([
|
|
13195
|
-
(0,
|
|
13154
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_hourly_compensation" })
|
|
13196
13155
|
], JobFreelancerRecommendation.prototype, "freelancerHourlyCompensation", 2);
|
|
13197
13156
|
__decorateClass([
|
|
13198
|
-
(0,
|
|
13157
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_country_name" })
|
|
13199
13158
|
], JobFreelancerRecommendation.prototype, "freelancerCountryName", 2);
|
|
13200
13159
|
__decorateClass([
|
|
13201
|
-
(0,
|
|
13160
|
+
(0, import_typeorm75.ViewColumn)({ name: "freelancer_country_iso_code" })
|
|
13202
13161
|
], JobFreelancerRecommendation.prototype, "freelancerCountryIsoCode", 2);
|
|
13203
13162
|
__decorateClass([
|
|
13204
|
-
(0,
|
|
13163
|
+
(0, import_typeorm75.ViewColumn)({ name: "client_id" })
|
|
13205
13164
|
], JobFreelancerRecommendation.prototype, "clientId", 2);
|
|
13206
13165
|
__decorateClass([
|
|
13207
|
-
(0,
|
|
13166
|
+
(0, import_typeorm75.ViewColumn)({ name: "client_uuid" })
|
|
13208
13167
|
], JobFreelancerRecommendation.prototype, "clientUuid", 2);
|
|
13209
13168
|
__decorateClass([
|
|
13210
|
-
(0,
|
|
13169
|
+
(0, import_typeorm75.ViewColumn)({ name: "client_first_name" })
|
|
13211
13170
|
], JobFreelancerRecommendation.prototype, "clientFirstName", 2);
|
|
13212
13171
|
__decorateClass([
|
|
13213
|
-
(0,
|
|
13172
|
+
(0, import_typeorm75.ViewColumn)({ name: "client_last_name" })
|
|
13214
13173
|
], JobFreelancerRecommendation.prototype, "clientLastName", 2);
|
|
13215
13174
|
__decorateClass([
|
|
13216
|
-
(0,
|
|
13175
|
+
(0, import_typeorm75.ViewColumn)({ name: "client_email" })
|
|
13217
13176
|
], JobFreelancerRecommendation.prototype, "clientEmail", 2);
|
|
13218
13177
|
__decorateClass([
|
|
13219
|
-
(0,
|
|
13178
|
+
(0, import_typeorm75.ViewColumn)({ name: "client_company_logo" })
|
|
13220
13179
|
], JobFreelancerRecommendation.prototype, "clientCompanyLogo", 2);
|
|
13221
13180
|
__decorateClass([
|
|
13222
|
-
(0,
|
|
13181
|
+
(0, import_typeorm75.ViewColumn)({ name: "client_company_name" })
|
|
13223
13182
|
], JobFreelancerRecommendation.prototype, "clientCompanyName", 2);
|
|
13224
13183
|
__decorateClass([
|
|
13225
|
-
(0,
|
|
13184
|
+
(0, import_typeorm75.ViewColumn)({ name: "matching_skills" })
|
|
13226
13185
|
], JobFreelancerRecommendation.prototype, "matchingSkills", 2);
|
|
13227
13186
|
__decorateClass([
|
|
13228
|
-
(0,
|
|
13187
|
+
(0, import_typeorm75.ViewColumn)({ name: "matching_skills_count" })
|
|
13229
13188
|
], JobFreelancerRecommendation.prototype, "matchingSkillsCount", 2);
|
|
13230
13189
|
__decorateClass([
|
|
13231
|
-
(0,
|
|
13190
|
+
(0, import_typeorm75.ViewColumn)({ name: "required_skills" })
|
|
13232
13191
|
], JobFreelancerRecommendation.prototype, "requiredSkills", 2);
|
|
13233
13192
|
__decorateClass([
|
|
13234
|
-
(0,
|
|
13193
|
+
(0, import_typeorm75.ViewColumn)({ name: "required_skills_count" })
|
|
13235
13194
|
], JobFreelancerRecommendation.prototype, "requiredSkillsCount", 2);
|
|
13236
13195
|
JobFreelancerRecommendation = __decorateClass([
|
|
13237
|
-
(0,
|
|
13196
|
+
(0, import_typeorm75.ViewEntity)({
|
|
13238
13197
|
name: "job_freelancer_recommendations",
|
|
13239
13198
|
materialized: true,
|
|
13240
13199
|
synchronize: false
|
|
@@ -13243,32 +13202,32 @@ JobFreelancerRecommendation = __decorateClass([
|
|
|
13243
13202
|
], JobFreelancerRecommendation);
|
|
13244
13203
|
|
|
13245
13204
|
// src/entities/job-freelancer-recommendation-v2.entity.ts
|
|
13246
|
-
var
|
|
13205
|
+
var import_typeorm76 = require("typeorm");
|
|
13247
13206
|
var JobFreelancerRecommendationV2 = class {
|
|
13248
13207
|
};
|
|
13249
13208
|
__decorateClass([
|
|
13250
|
-
(0,
|
|
13209
|
+
(0, import_typeorm76.ViewColumn)({ name: "job_id" })
|
|
13251
13210
|
], JobFreelancerRecommendationV2.prototype, "jobId", 2);
|
|
13252
13211
|
__decorateClass([
|
|
13253
|
-
(0,
|
|
13212
|
+
(0, import_typeorm76.ViewColumn)({ name: "job_owner_id" })
|
|
13254
13213
|
], JobFreelancerRecommendationV2.prototype, "jobOwnerId", 2);
|
|
13255
13214
|
__decorateClass([
|
|
13256
|
-
(0,
|
|
13215
|
+
(0, import_typeorm76.ViewColumn)({ name: "freelancer_id" })
|
|
13257
13216
|
], JobFreelancerRecommendationV2.prototype, "freelancerId", 2);
|
|
13258
13217
|
__decorateClass([
|
|
13259
|
-
(0,
|
|
13218
|
+
(0, import_typeorm76.ViewColumn)({ name: "matching_skills" })
|
|
13260
13219
|
], JobFreelancerRecommendationV2.prototype, "matchingSkills", 2);
|
|
13261
13220
|
__decorateClass([
|
|
13262
|
-
(0,
|
|
13221
|
+
(0, import_typeorm76.ViewColumn)({ name: "matching_skills_count" })
|
|
13263
13222
|
], JobFreelancerRecommendationV2.prototype, "matchingSkillsCount", 2);
|
|
13264
13223
|
__decorateClass([
|
|
13265
|
-
(0,
|
|
13224
|
+
(0, import_typeorm76.ViewColumn)({ name: "required_skills" })
|
|
13266
13225
|
], JobFreelancerRecommendationV2.prototype, "requiredSkills", 2);
|
|
13267
13226
|
__decorateClass([
|
|
13268
|
-
(0,
|
|
13227
|
+
(0, import_typeorm76.ViewColumn)({ name: "required_skills_count" })
|
|
13269
13228
|
], JobFreelancerRecommendationV2.prototype, "requiredSkillsCount", 2);
|
|
13270
13229
|
JobFreelancerRecommendationV2 = __decorateClass([
|
|
13271
|
-
(0,
|
|
13230
|
+
(0, import_typeorm76.ViewEntity)({
|
|
13272
13231
|
name: "job_freelancer_recommendations_v2",
|
|
13273
13232
|
materialized: true,
|
|
13274
13233
|
synchronize: false
|
|
@@ -13277,74 +13236,74 @@ JobFreelancerRecommendationV2 = __decorateClass([
|
|
|
13277
13236
|
], JobFreelancerRecommendationV2);
|
|
13278
13237
|
|
|
13279
13238
|
// src/entities/client-freelancer-recommendation.entity.ts
|
|
13280
|
-
var
|
|
13239
|
+
var import_typeorm77 = require("typeorm");
|
|
13281
13240
|
var ClientFreelancerRecommendation = class {
|
|
13282
13241
|
};
|
|
13283
13242
|
__decorateClass([
|
|
13284
|
-
(0,
|
|
13243
|
+
(0, import_typeorm77.ViewColumn)({ name: "client_id" })
|
|
13285
13244
|
], ClientFreelancerRecommendation.prototype, "clientId", 2);
|
|
13286
13245
|
__decorateClass([
|
|
13287
|
-
(0,
|
|
13246
|
+
(0, import_typeorm77.ViewColumn)({ name: "client_uuid" })
|
|
13288
13247
|
], ClientFreelancerRecommendation.prototype, "clientUuid", 2);
|
|
13289
13248
|
__decorateClass([
|
|
13290
|
-
(0,
|
|
13249
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_id" })
|
|
13291
13250
|
], ClientFreelancerRecommendation.prototype, "freelancerId", 2);
|
|
13292
13251
|
__decorateClass([
|
|
13293
|
-
(0,
|
|
13252
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_uuid" })
|
|
13294
13253
|
], ClientFreelancerRecommendation.prototype, "freelancerUuid", 2);
|
|
13295
13254
|
__decorateClass([
|
|
13296
|
-
(0,
|
|
13255
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_unique_id" })
|
|
13297
13256
|
], ClientFreelancerRecommendation.prototype, "freelancerUniqueId", 2);
|
|
13298
13257
|
__decorateClass([
|
|
13299
|
-
(0,
|
|
13258
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_first_name" })
|
|
13300
13259
|
], ClientFreelancerRecommendation.prototype, "freelancerFirstName", 2);
|
|
13301
13260
|
__decorateClass([
|
|
13302
|
-
(0,
|
|
13261
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_last_name" })
|
|
13303
13262
|
], ClientFreelancerRecommendation.prototype, "freelancerLastName", 2);
|
|
13304
13263
|
__decorateClass([
|
|
13305
|
-
(0,
|
|
13264
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_email" })
|
|
13306
13265
|
], ClientFreelancerRecommendation.prototype, "freelancerEmail", 2);
|
|
13307
13266
|
__decorateClass([
|
|
13308
|
-
(0,
|
|
13267
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_profile_picture" })
|
|
13309
13268
|
], ClientFreelancerRecommendation.prototype, "freelancerProfilePicture", 2);
|
|
13310
13269
|
__decorateClass([
|
|
13311
|
-
(0,
|
|
13270
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_is_social" })
|
|
13312
13271
|
], ClientFreelancerRecommendation.prototype, "freelancerIsSocial", 2);
|
|
13313
13272
|
__decorateClass([
|
|
13314
|
-
(0,
|
|
13273
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_created_at" })
|
|
13315
13274
|
], ClientFreelancerRecommendation.prototype, "freelancerCreatedAt", 2);
|
|
13316
13275
|
__decorateClass([
|
|
13317
|
-
(0,
|
|
13276
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_designation" })
|
|
13318
13277
|
], ClientFreelancerRecommendation.prototype, "freelancerDesignation", 2);
|
|
13319
13278
|
__decorateClass([
|
|
13320
|
-
(0,
|
|
13279
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_experience" })
|
|
13321
13280
|
], ClientFreelancerRecommendation.prototype, "freelancerExperience", 2);
|
|
13322
13281
|
__decorateClass([
|
|
13323
|
-
(0,
|
|
13282
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_expertshub_verified" })
|
|
13324
13283
|
], ClientFreelancerRecommendation.prototype, "freelancerExpertshubVerified", 2);
|
|
13325
13284
|
__decorateClass([
|
|
13326
|
-
(0,
|
|
13285
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_hourly_compensation" })
|
|
13327
13286
|
], ClientFreelancerRecommendation.prototype, "freelancerHourlyCompensation", 2);
|
|
13328
13287
|
__decorateClass([
|
|
13329
|
-
(0,
|
|
13288
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_country_name" })
|
|
13330
13289
|
], ClientFreelancerRecommendation.prototype, "freelancerCountryName", 2);
|
|
13331
13290
|
__decorateClass([
|
|
13332
|
-
(0,
|
|
13291
|
+
(0, import_typeorm77.ViewColumn)({ name: "freelancer_country_iso_code" })
|
|
13333
13292
|
], ClientFreelancerRecommendation.prototype, "freelancerCountryIsoCode", 2);
|
|
13334
13293
|
__decorateClass([
|
|
13335
|
-
(0,
|
|
13294
|
+
(0, import_typeorm77.ViewColumn)({ name: "matching_skills" })
|
|
13336
13295
|
], ClientFreelancerRecommendation.prototype, "matchingSkills", 2);
|
|
13337
13296
|
__decorateClass([
|
|
13338
|
-
(0,
|
|
13297
|
+
(0, import_typeorm77.ViewColumn)({ name: "matching_skills_count" })
|
|
13339
13298
|
], ClientFreelancerRecommendation.prototype, "matchingSkillsCount", 2);
|
|
13340
13299
|
__decorateClass([
|
|
13341
|
-
(0,
|
|
13300
|
+
(0, import_typeorm77.ViewColumn)({ name: "required_skills" })
|
|
13342
13301
|
], ClientFreelancerRecommendation.prototype, "requiredSkills", 2);
|
|
13343
13302
|
__decorateClass([
|
|
13344
|
-
(0,
|
|
13303
|
+
(0, import_typeorm77.ViewColumn)({ name: "required_skills_count" })
|
|
13345
13304
|
], ClientFreelancerRecommendation.prototype, "requiredSkillsCount", 2);
|
|
13346
13305
|
ClientFreelancerRecommendation = __decorateClass([
|
|
13347
|
-
(0,
|
|
13306
|
+
(0, import_typeorm77.ViewEntity)({
|
|
13348
13307
|
name: "client_freelancer_recommendations",
|
|
13349
13308
|
materialized: true,
|
|
13350
13309
|
synchronize: false
|
|
@@ -13353,7 +13312,7 @@ ClientFreelancerRecommendation = __decorateClass([
|
|
|
13353
13312
|
], ClientFreelancerRecommendation);
|
|
13354
13313
|
|
|
13355
13314
|
// src/entities/commission.entity.ts
|
|
13356
|
-
var
|
|
13315
|
+
var import_typeorm78 = require("typeorm");
|
|
13357
13316
|
var CommissionTypeEnum = /* @__PURE__ */ ((CommissionTypeEnum2) => {
|
|
13358
13317
|
CommissionTypeEnum2["PERCENTAGE"] = "PERCENTAGE";
|
|
13359
13318
|
CommissionTypeEnum2["FLAT"] = "FLAT";
|
|
@@ -13362,7 +13321,7 @@ var CommissionTypeEnum = /* @__PURE__ */ ((CommissionTypeEnum2) => {
|
|
|
13362
13321
|
var Commission = class extends BaseEntity {
|
|
13363
13322
|
};
|
|
13364
13323
|
__decorateClass([
|
|
13365
|
-
(0,
|
|
13324
|
+
(0, import_typeorm78.Column)({
|
|
13366
13325
|
name: "freelancer_commission_type",
|
|
13367
13326
|
type: "enum",
|
|
13368
13327
|
enum: CommissionTypeEnum,
|
|
@@ -13370,10 +13329,10 @@ __decorateClass([
|
|
|
13370
13329
|
})
|
|
13371
13330
|
], Commission.prototype, "freelancerCommissionType", 2);
|
|
13372
13331
|
__decorateClass([
|
|
13373
|
-
(0,
|
|
13332
|
+
(0, import_typeorm78.Column)({ name: "freelancer_commission", type: "integer", default: 0 })
|
|
13374
13333
|
], Commission.prototype, "freelancerCommission", 2);
|
|
13375
13334
|
__decorateClass([
|
|
13376
|
-
(0,
|
|
13335
|
+
(0, import_typeorm78.Column)({
|
|
13377
13336
|
name: "client_commission_type",
|
|
13378
13337
|
type: "enum",
|
|
13379
13338
|
enum: CommissionTypeEnum,
|
|
@@ -13381,50 +13340,50 @@ __decorateClass([
|
|
|
13381
13340
|
})
|
|
13382
13341
|
], Commission.prototype, "clientCommissionType", 2);
|
|
13383
13342
|
__decorateClass([
|
|
13384
|
-
(0,
|
|
13343
|
+
(0, import_typeorm78.Column)({ name: "client_commission", type: "integer", default: 0 })
|
|
13385
13344
|
], Commission.prototype, "clientCommission", 2);
|
|
13386
13345
|
Commission = __decorateClass([
|
|
13387
|
-
(0,
|
|
13346
|
+
(0, import_typeorm78.Entity)("commissions")
|
|
13388
13347
|
], Commission);
|
|
13389
13348
|
|
|
13390
13349
|
// src/entities/calendly-meeting-log.entity.ts
|
|
13391
|
-
var
|
|
13350
|
+
var import_typeorm79 = require("typeorm");
|
|
13392
13351
|
var CalendlyMeetingLog = class extends BaseEntity {
|
|
13393
13352
|
};
|
|
13394
13353
|
__decorateClass([
|
|
13395
|
-
(0,
|
|
13396
|
-
(0,
|
|
13354
|
+
(0, import_typeorm79.Column)({ name: "calendly_event_id", type: "varchar", nullable: true }),
|
|
13355
|
+
(0, import_typeorm79.Index)()
|
|
13397
13356
|
], CalendlyMeetingLog.prototype, "calendlyEventId", 2);
|
|
13398
13357
|
__decorateClass([
|
|
13399
|
-
(0,
|
|
13358
|
+
(0, import_typeorm79.Column)({ name: "calendly_event_type", type: "varchar", nullable: true })
|
|
13400
13359
|
], CalendlyMeetingLog.prototype, "calendlyEventType", 2);
|
|
13401
13360
|
__decorateClass([
|
|
13402
|
-
(0,
|
|
13361
|
+
(0, import_typeorm79.Column)({ name: "raw_webhook_data", type: "jsonb", nullable: true })
|
|
13403
13362
|
], CalendlyMeetingLog.prototype, "rawWebhookData", 2);
|
|
13404
13363
|
CalendlyMeetingLog = __decorateClass([
|
|
13405
|
-
(0,
|
|
13364
|
+
(0, import_typeorm79.Entity)("calendly_meeting_logs")
|
|
13406
13365
|
], CalendlyMeetingLog);
|
|
13407
13366
|
|
|
13408
13367
|
// src/entities/zoom-meeting-log.entity.ts
|
|
13409
|
-
var
|
|
13368
|
+
var import_typeorm80 = require("typeorm");
|
|
13410
13369
|
var ZoomMeetingLog = class extends BaseEntity {
|
|
13411
13370
|
};
|
|
13412
13371
|
__decorateClass([
|
|
13413
|
-
(0,
|
|
13414
|
-
(0,
|
|
13372
|
+
(0, import_typeorm80.Column)({ name: "zoom_meeting_id", type: "varchar", nullable: true }),
|
|
13373
|
+
(0, import_typeorm80.Index)()
|
|
13415
13374
|
], ZoomMeetingLog.prototype, "zoomMeetingId", 2);
|
|
13416
13375
|
__decorateClass([
|
|
13417
|
-
(0,
|
|
13376
|
+
(0, import_typeorm80.Column)({ name: "zoom_event_type", type: "varchar", nullable: true })
|
|
13418
13377
|
], ZoomMeetingLog.prototype, "zoomEventType", 2);
|
|
13419
13378
|
__decorateClass([
|
|
13420
|
-
(0,
|
|
13379
|
+
(0, import_typeorm80.Column)({ name: "raw_webhook_data", type: "jsonb", nullable: true })
|
|
13421
13380
|
], ZoomMeetingLog.prototype, "rawWebhookData", 2);
|
|
13422
13381
|
ZoomMeetingLog = __decorateClass([
|
|
13423
|
-
(0,
|
|
13382
|
+
(0, import_typeorm80.Entity)("zoom_meeting_logs")
|
|
13424
13383
|
], ZoomMeetingLog);
|
|
13425
13384
|
|
|
13426
13385
|
// src/entities/docuseal.entity.ts
|
|
13427
|
-
var
|
|
13386
|
+
var import_typeorm81 = require("typeorm");
|
|
13428
13387
|
var DocuSealTypeEnum = /* @__PURE__ */ ((DocuSealTypeEnum2) => {
|
|
13429
13388
|
DocuSealTypeEnum2["FREELANCER_SERVICE_AGGREMENT"] = "FREELANCER_SERVICE_AGGREMENT";
|
|
13430
13389
|
DocuSealTypeEnum2["CLIENT_SERVICE_AGGREMENT"] = "CLIENT_SERVICE_AGGREMENT";
|
|
@@ -13434,87 +13393,298 @@ var DocuSealTypeEnum = /* @__PURE__ */ ((DocuSealTypeEnum2) => {
|
|
|
13434
13393
|
var DocuSeal = class extends BaseEntity {
|
|
13435
13394
|
};
|
|
13436
13395
|
__decorateClass([
|
|
13437
|
-
(0,
|
|
13438
|
-
(0,
|
|
13396
|
+
(0, import_typeorm81.Column)({ name: "reference_id", type: "integer", nullable: false }),
|
|
13397
|
+
(0, import_typeorm81.Index)()
|
|
13439
13398
|
], DocuSeal.prototype, "referenceId", 2);
|
|
13440
13399
|
__decorateClass([
|
|
13441
|
-
(0,
|
|
13442
|
-
(0,
|
|
13400
|
+
(0, import_typeorm81.Column)({ name: "submitter_id", type: "integer", nullable: true }),
|
|
13401
|
+
(0, import_typeorm81.Index)()
|
|
13443
13402
|
], DocuSeal.prototype, "submitterId", 2);
|
|
13444
13403
|
__decorateClass([
|
|
13445
|
-
(0,
|
|
13404
|
+
(0, import_typeorm81.Column)({ name: "submitter_response", type: "jsonb", nullable: true })
|
|
13446
13405
|
], DocuSeal.prototype, "submitterResponse", 2);
|
|
13447
13406
|
__decorateClass([
|
|
13448
|
-
(0,
|
|
13407
|
+
(0, import_typeorm81.Column)({ name: "webhook_response", type: "jsonb", nullable: true })
|
|
13449
13408
|
], DocuSeal.prototype, "webhookResponse", 2);
|
|
13450
13409
|
__decorateClass([
|
|
13451
|
-
(0,
|
|
13410
|
+
(0, import_typeorm81.Column)({ name: "type", type: "enum", enum: DocuSealTypeEnum, nullable: true })
|
|
13452
13411
|
], DocuSeal.prototype, "type", 2);
|
|
13453
13412
|
DocuSeal = __decorateClass([
|
|
13454
|
-
(0,
|
|
13413
|
+
(0, import_typeorm81.Entity)("docuseal")
|
|
13455
13414
|
], DocuSeal);
|
|
13456
13415
|
|
|
13457
13416
|
// src/entities/stripe-logs.entity.ts
|
|
13458
|
-
var
|
|
13417
|
+
var import_typeorm82 = require("typeorm");
|
|
13459
13418
|
var StripeLog = class extends BaseEntity {
|
|
13460
13419
|
};
|
|
13461
13420
|
__decorateClass([
|
|
13462
|
-
(0,
|
|
13421
|
+
(0, import_typeorm82.Column)({ name: "stripe_event_id", type: "varchar", nullable: true })
|
|
13463
13422
|
], StripeLog.prototype, "stripeEventId", 2);
|
|
13464
13423
|
__decorateClass([
|
|
13465
|
-
(0,
|
|
13424
|
+
(0, import_typeorm82.Column)({ name: "event_type", type: "varchar", nullable: true })
|
|
13466
13425
|
], StripeLog.prototype, "eventType", 2);
|
|
13467
13426
|
__decorateClass([
|
|
13468
|
-
(0,
|
|
13427
|
+
(0, import_typeorm82.Column)({ name: "stripe_account_id", type: "varchar", nullable: true })
|
|
13469
13428
|
], StripeLog.prototype, "stripeAccountId", 2);
|
|
13470
13429
|
__decorateClass([
|
|
13471
|
-
(0,
|
|
13430
|
+
(0, import_typeorm82.Column)({ name: "raw_webhook_data", type: "jsonb", nullable: true })
|
|
13472
13431
|
], StripeLog.prototype, "rawWebhookData", 2);
|
|
13473
13432
|
StripeLog = __decorateClass([
|
|
13474
|
-
(0,
|
|
13433
|
+
(0, import_typeorm82.Entity)("stripe_logs")
|
|
13475
13434
|
], StripeLog);
|
|
13476
13435
|
|
|
13477
13436
|
// src/entities/recommendation-weightage-config.entity.ts
|
|
13478
|
-
var
|
|
13437
|
+
var import_typeorm83 = require("typeorm");
|
|
13479
13438
|
var RecommendationWeightageConfig = class extends BaseEntity {
|
|
13480
13439
|
};
|
|
13481
13440
|
__decorateClass([
|
|
13482
|
-
(0,
|
|
13441
|
+
(0, import_typeorm83.Column)({
|
|
13483
13442
|
type: "varchar",
|
|
13484
13443
|
length: 100,
|
|
13485
13444
|
unique: true,
|
|
13486
13445
|
comment: "Unique key identifier (e.g., full_time_weights, hourly_weights)"
|
|
13487
13446
|
}),
|
|
13488
|
-
(0,
|
|
13447
|
+
(0, import_typeorm83.Index)()
|
|
13489
13448
|
], RecommendationWeightageConfig.prototype, "key", 2);
|
|
13490
13449
|
__decorateClass([
|
|
13491
|
-
(0,
|
|
13450
|
+
(0, import_typeorm83.Column)({
|
|
13492
13451
|
type: "jsonb",
|
|
13493
13452
|
comment: "JSON object containing weight values",
|
|
13494
13453
|
nullable: true
|
|
13495
13454
|
})
|
|
13496
13455
|
], RecommendationWeightageConfig.prototype, "value", 2);
|
|
13497
13456
|
__decorateClass([
|
|
13498
|
-
(0,
|
|
13457
|
+
(0, import_typeorm83.Column)({ name: "is_active", type: "boolean", default: true })
|
|
13499
13458
|
], RecommendationWeightageConfig.prototype, "isActive", 2);
|
|
13500
13459
|
RecommendationWeightageConfig = __decorateClass([
|
|
13501
|
-
(0,
|
|
13460
|
+
(0, import_typeorm83.Entity)("recommendation_weightage_configs")
|
|
13502
13461
|
], RecommendationWeightageConfig);
|
|
13503
13462
|
|
|
13504
13463
|
// src/entities/global-setting.entity.ts
|
|
13505
|
-
var
|
|
13464
|
+
var import_typeorm84 = require("typeorm");
|
|
13506
13465
|
var GlobalSetting = class extends BaseEntity {
|
|
13507
13466
|
};
|
|
13508
13467
|
__decorateClass([
|
|
13509
|
-
(0,
|
|
13468
|
+
(0, import_typeorm84.Column)({ name: "key", type: "varchar", length: 255, nullable: false, unique: true })
|
|
13510
13469
|
], GlobalSetting.prototype, "key", 2);
|
|
13511
13470
|
__decorateClass([
|
|
13512
|
-
(0,
|
|
13471
|
+
(0, import_typeorm84.Column)({ name: "value", type: "text", nullable: false })
|
|
13513
13472
|
], GlobalSetting.prototype, "value", 2);
|
|
13514
13473
|
GlobalSetting = __decorateClass([
|
|
13515
|
-
(0,
|
|
13516
|
-
(0,
|
|
13474
|
+
(0, import_typeorm84.Entity)("global_settings"),
|
|
13475
|
+
(0, import_typeorm84.Index)(["key"], { unique: true })
|
|
13517
13476
|
], GlobalSetting);
|
|
13477
|
+
|
|
13478
|
+
// src/entities/plan.entity.ts
|
|
13479
|
+
var import_typeorm87 = require("typeorm");
|
|
13480
|
+
|
|
13481
|
+
// src/entities/plan-feature.entity.ts
|
|
13482
|
+
var import_typeorm85 = require("typeorm");
|
|
13483
|
+
var PlanFeature = class extends BaseEntity {
|
|
13484
|
+
};
|
|
13485
|
+
// individual index to find features by plan
|
|
13486
|
+
__decorateClass([
|
|
13487
|
+
(0, import_typeorm85.Column)({ name: "plan_id", type: "integer", nullable: false }),
|
|
13488
|
+
(0, import_typeorm85.Index)()
|
|
13489
|
+
], PlanFeature.prototype, "planId", 2);
|
|
13490
|
+
__decorateClass([
|
|
13491
|
+
(0, import_typeorm85.ManyToOne)(() => Plan, (plan) => plan.features, {
|
|
13492
|
+
onDelete: "CASCADE",
|
|
13493
|
+
nullable: false
|
|
13494
|
+
}),
|
|
13495
|
+
(0, import_typeorm85.JoinColumn)({ name: "plan_id" })
|
|
13496
|
+
], PlanFeature.prototype, "plan", 2);
|
|
13497
|
+
__decorateClass([
|
|
13498
|
+
(0, import_typeorm85.Column)({ name: "label", type: "varchar", length: 200 })
|
|
13499
|
+
], PlanFeature.prototype, "label", 2);
|
|
13500
|
+
__decorateClass([
|
|
13501
|
+
(0, import_typeorm85.Column)({ name: "tooltip", type: "varchar", length: 300, nullable: true })
|
|
13502
|
+
], PlanFeature.prototype, "tooltip", 2);
|
|
13503
|
+
__decorateClass([
|
|
13504
|
+
(0, import_typeorm85.Column)({ name: "sort_order", type: "smallint", default: 0 })
|
|
13505
|
+
], PlanFeature.prototype, "sortOrder", 2);
|
|
13506
|
+
__decorateClass([
|
|
13507
|
+
(0, import_typeorm85.Column)({ name: "is_active", type: "boolean", default: true })
|
|
13508
|
+
], PlanFeature.prototype, "isActive", 2);
|
|
13509
|
+
PlanFeature = __decorateClass([
|
|
13510
|
+
(0, import_typeorm85.Entity)("plan_features"),
|
|
13511
|
+
(0, import_typeorm85.Index)("idx_plan_features_plan_id", ["plan"]),
|
|
13512
|
+
(0, import_typeorm85.Index)("idx_plan_features_plan_sort", ["plan", "sort_order"]),
|
|
13513
|
+
(0, import_typeorm85.Check)("chk_plan_features_sort_order_positive", '"sort_order" >= 0')
|
|
13514
|
+
], PlanFeature);
|
|
13515
|
+
|
|
13516
|
+
// src/entities/plan-pricing.entity.ts
|
|
13517
|
+
var import_typeorm86 = require("typeorm");
|
|
13518
|
+
var BillingCycle = /* @__PURE__ */ ((BillingCycle2) => {
|
|
13519
|
+
BillingCycle2["MONTHLY"] = "monthly";
|
|
13520
|
+
BillingCycle2["YEARLY"] = "yearly";
|
|
13521
|
+
return BillingCycle2;
|
|
13522
|
+
})(BillingCycle || {});
|
|
13523
|
+
var PlanPricing = class extends BaseEntity {
|
|
13524
|
+
sanitize() {
|
|
13525
|
+
if (this.currency) {
|
|
13526
|
+
this.currency = this.currency.toUpperCase().trim();
|
|
13527
|
+
}
|
|
13528
|
+
if (this.price !== void 0 && this.price !== null) {
|
|
13529
|
+
this.price = parseFloat(this.price);
|
|
13530
|
+
}
|
|
13531
|
+
if (this.originalPrice !== void 0 && this.originalPrice !== null) {
|
|
13532
|
+
this.originalPrice = parseFloat(
|
|
13533
|
+
this.originalPrice
|
|
13534
|
+
);
|
|
13535
|
+
}
|
|
13536
|
+
if (this.isFree) {
|
|
13537
|
+
this.price = 0;
|
|
13538
|
+
this.originalPrice = null;
|
|
13539
|
+
this.discountPct = null;
|
|
13540
|
+
this.stripePriceId = null;
|
|
13541
|
+
}
|
|
13542
|
+
}
|
|
13543
|
+
/**
|
|
13544
|
+
* Returns the per-month display price regardless of billing cycle.
|
|
13545
|
+
* Use this in the frontend transform layer or API response DTOs.
|
|
13546
|
+
*
|
|
13547
|
+
* monthly → price (e.g. $29.99)
|
|
13548
|
+
* yearly → price / 12 (e.g. $22.79)
|
|
13549
|
+
*
|
|
13550
|
+
* Returns null for free plans.
|
|
13551
|
+
*/
|
|
13552
|
+
get monthlyEquivalent() {
|
|
13553
|
+
if (this.isFree) return null;
|
|
13554
|
+
if (this.billingCycle === "yearly" /* YEARLY */) {
|
|
13555
|
+
return Math.round(this.price / 12 * 100) / 100;
|
|
13556
|
+
}
|
|
13557
|
+
return this.price;
|
|
13558
|
+
}
|
|
13559
|
+
/**
|
|
13560
|
+
* Returns the absolute saving vs original_price for this cycle.
|
|
13561
|
+
* Returns null if no original_price is set.
|
|
13562
|
+
*/
|
|
13563
|
+
get savingsAmount() {
|
|
13564
|
+
if (this.originalPrice === null || this.originalPrice === void 0) {
|
|
13565
|
+
return null;
|
|
13566
|
+
}
|
|
13567
|
+
return Math.round((this.originalPrice - this.price) * 100) / 100;
|
|
13568
|
+
}
|
|
13569
|
+
};
|
|
13570
|
+
// individual index to find pricing by plan
|
|
13571
|
+
__decorateClass([
|
|
13572
|
+
(0, import_typeorm86.Column)({ name: "plan_id", type: "integer", nullable: false }),
|
|
13573
|
+
(0, import_typeorm86.Index)()
|
|
13574
|
+
], PlanPricing.prototype, "planId", 2);
|
|
13575
|
+
__decorateClass([
|
|
13576
|
+
(0, import_typeorm86.ManyToOne)(() => Plan, (plan) => plan.pricing, {
|
|
13577
|
+
onDelete: "CASCADE",
|
|
13578
|
+
nullable: false
|
|
13579
|
+
}),
|
|
13580
|
+
(0, import_typeorm86.JoinColumn)({ name: "plan_id" })
|
|
13581
|
+
], PlanPricing.prototype, "plan", 2);
|
|
13582
|
+
__decorateClass([
|
|
13583
|
+
(0, import_typeorm86.Column)({
|
|
13584
|
+
name: "billing_cycle",
|
|
13585
|
+
type: "enum",
|
|
13586
|
+
enum: BillingCycle
|
|
13587
|
+
})
|
|
13588
|
+
], PlanPricing.prototype, "billingCycle", 2);
|
|
13589
|
+
__decorateClass([
|
|
13590
|
+
(0, import_typeorm86.Column)({ name: "price", type: "decimal", precision: 10, scale: 2, default: 0 })
|
|
13591
|
+
], PlanPricing.prototype, "price", 2);
|
|
13592
|
+
__decorateClass([
|
|
13593
|
+
(0, import_typeorm86.Column)({ name: "original_price", type: "decimal", precision: 10, scale: 2, nullable: true })
|
|
13594
|
+
], PlanPricing.prototype, "originalPrice", 2);
|
|
13595
|
+
__decorateClass([
|
|
13596
|
+
(0, import_typeorm86.Column)({ name: "discount_pct", type: "smallint", nullable: true })
|
|
13597
|
+
], PlanPricing.prototype, "discountPct", 2);
|
|
13598
|
+
__decorateClass([
|
|
13599
|
+
(0, import_typeorm86.Column)({ name: "currency", type: "varchar", length: 3, default: "USD" })
|
|
13600
|
+
], PlanPricing.prototype, "currency", 2);
|
|
13601
|
+
__decorateClass([
|
|
13602
|
+
(0, import_typeorm86.Column)({ name: "is_free", type: "boolean", default: false })
|
|
13603
|
+
], PlanPricing.prototype, "isFree", 2);
|
|
13604
|
+
__decorateClass([
|
|
13605
|
+
(0, import_typeorm86.Column)({ name: "stripe_price_id", type: "varchar", length: 100, nullable: true, unique: true })
|
|
13606
|
+
], PlanPricing.prototype, "stripePriceId", 2);
|
|
13607
|
+
__decorateClass([
|
|
13608
|
+
(0, import_typeorm86.Column)({ name: "trial_days", type: "smallint", default: 0 })
|
|
13609
|
+
], PlanPricing.prototype, "trialDays", 2);
|
|
13610
|
+
__decorateClass([
|
|
13611
|
+
(0, import_typeorm86.Column)({ name: "is_active", type: "boolean", default: true })
|
|
13612
|
+
], PlanPricing.prototype, "isActive", 2);
|
|
13613
|
+
__decorateClass([
|
|
13614
|
+
(0, import_typeorm86.BeforeInsert)(),
|
|
13615
|
+
(0, import_typeorm86.BeforeUpdate)()
|
|
13616
|
+
], PlanPricing.prototype, "sanitize", 1);
|
|
13617
|
+
PlanPricing = __decorateClass([
|
|
13618
|
+
(0, import_typeorm86.Entity)("plan_pricings"),
|
|
13619
|
+
(0, import_typeorm86.Unique)("uq_plan_pricings_plan_cycle", ["planId", "billingCycle"]),
|
|
13620
|
+
(0, import_typeorm86.Index)("idx_plan_pricings_plan_id", ["planId"]),
|
|
13621
|
+
(0, import_typeorm86.Index)("idx_plan_pricings_active", ["isActive", "billingCycle"]),
|
|
13622
|
+
(0, import_typeorm86.Check)("chk_plan_pricings_price_non_negative", '"price" >= 0'),
|
|
13623
|
+
(0, import_typeorm86.Check)(
|
|
13624
|
+
"chk_plan_pricings_original_price_non_negative",
|
|
13625
|
+
'"originalPrice" IS NULL OR "originalPrice" >= 0'
|
|
13626
|
+
),
|
|
13627
|
+
(0, import_typeorm86.Check)(
|
|
13628
|
+
"chk_plan_pricings_original_gte_price",
|
|
13629
|
+
'"originalPrice" IS NULL OR "originalPrice" >= "price"'
|
|
13630
|
+
),
|
|
13631
|
+
(0, import_typeorm86.Check)(
|
|
13632
|
+
"chk_plan_pricings_discount_range",
|
|
13633
|
+
'"discountPct" IS NULL OR ("discountPct" >= 1 AND "discountPct" <= 99)'
|
|
13634
|
+
),
|
|
13635
|
+
(0, import_typeorm86.Check)("chk_plan_pricings_trial_days_non_negative", '"trialDays" >= 0'),
|
|
13636
|
+
(0, import_typeorm86.Check)(
|
|
13637
|
+
"chk_plan_pricings_free_price_zero",
|
|
13638
|
+
'("isFree" = false) OR ("isFree" = true AND "price" = 0)'
|
|
13639
|
+
)
|
|
13640
|
+
], PlanPricing);
|
|
13641
|
+
|
|
13642
|
+
// src/entities/plan.entity.ts
|
|
13643
|
+
var Plan = class extends BaseEntity {
|
|
13644
|
+
createSlug() {
|
|
13645
|
+
if (!this.slug && this.name) {
|
|
13646
|
+
this.slug = this.name.toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
13647
|
+
}
|
|
13648
|
+
}
|
|
13649
|
+
};
|
|
13650
|
+
__decorateClass([
|
|
13651
|
+
(0, import_typeorm87.Column)({ name: "name", type: "varchar", length: 100 })
|
|
13652
|
+
], Plan.prototype, "name", 2);
|
|
13653
|
+
__decorateClass([
|
|
13654
|
+
(0, import_typeorm87.Column)({ name: "slug", type: "varchar", length: 100 })
|
|
13655
|
+
], Plan.prototype, "slug", 2);
|
|
13656
|
+
__decorateClass([
|
|
13657
|
+
(0, import_typeorm87.Column)({ name: "badge_label", type: "varchar", length: 60, nullable: true })
|
|
13658
|
+
], Plan.prototype, "badgeLabel", 2);
|
|
13659
|
+
__decorateClass([
|
|
13660
|
+
(0, import_typeorm87.Column)({ name: "sort_order", type: "smallint", default: 0 })
|
|
13661
|
+
], Plan.prototype, "sortOrder", 2);
|
|
13662
|
+
__decorateClass([
|
|
13663
|
+
(0, import_typeorm87.Column)({ name: "is_active", type: "boolean", default: true })
|
|
13664
|
+
], Plan.prototype, "isActive", 2);
|
|
13665
|
+
__decorateClass([
|
|
13666
|
+
(0, import_typeorm87.Column)({ name: "metadata", type: "jsonb", default: {} })
|
|
13667
|
+
], Plan.prototype, "metadata", 2);
|
|
13668
|
+
__decorateClass([
|
|
13669
|
+
(0, import_typeorm87.BeforeInsert)(),
|
|
13670
|
+
(0, import_typeorm87.BeforeUpdate)()
|
|
13671
|
+
], Plan.prototype, "createSlug", 1);
|
|
13672
|
+
__decorateClass([
|
|
13673
|
+
(0, import_typeorm87.OneToMany)(() => PlanFeature, (feature) => feature.plan, {
|
|
13674
|
+
cascade: ["insert", "update"]
|
|
13675
|
+
})
|
|
13676
|
+
], Plan.prototype, "features", 2);
|
|
13677
|
+
__decorateClass([
|
|
13678
|
+
(0, import_typeorm87.OneToMany)(() => PlanPricing, (pricing) => pricing.plan, {
|
|
13679
|
+
cascade: ["insert", "update"]
|
|
13680
|
+
})
|
|
13681
|
+
], Plan.prototype, "pricing", 2);
|
|
13682
|
+
Plan = __decorateClass([
|
|
13683
|
+
(0, import_typeorm87.Entity)("plans"),
|
|
13684
|
+
(0, import_typeorm87.Index)("idx_plans_slug", ["slug"], { unique: true, where: '"is_deleted" IS FALSE' }),
|
|
13685
|
+
(0, import_typeorm87.Index)("idx_plans_active_sort", ["isActive", "sortOrder"]),
|
|
13686
|
+
(0, import_typeorm87.Check)("chk_plans_sort_order_positive", '"sortOrder" >= 0')
|
|
13687
|
+
], Plan);
|
|
13518
13688
|
// Annotate the CommonJS export names for ESM import in node:
|
|
13519
13689
|
0 && (module.exports = {
|
|
13520
13690
|
ADMIN_FREELANCER_PATTERN,
|
|
@@ -13566,6 +13736,7 @@ GlobalSetting = __decorateClass([
|
|
|
13566
13736
|
BankAccountTypeEnum,
|
|
13567
13737
|
BankDetail,
|
|
13568
13738
|
BaseEntity,
|
|
13739
|
+
BillingCycle,
|
|
13569
13740
|
BillingCycleEnum,
|
|
13570
13741
|
CALENDLY_PATTERN,
|
|
13571
13742
|
CITY_PATTERN,
|
|
@@ -13682,7 +13853,6 @@ GlobalSetting = __decorateClass([
|
|
|
13682
13853
|
FREELANCER_EXPERIENCE_PATTERN,
|
|
13683
13854
|
FREELANCER_PROJECT_PATTERN,
|
|
13684
13855
|
FREELANCER_SKILL_PATTERN,
|
|
13685
|
-
Feature,
|
|
13686
13856
|
FetchClientInfoForChatDto,
|
|
13687
13857
|
FetchFreelancerInfoForChatDto,
|
|
13688
13858
|
ForgotPasswordDto,
|
|
@@ -13802,6 +13972,8 @@ GlobalSetting = __decorateClass([
|
|
|
13802
13972
|
PROFILE_PATTERN,
|
|
13803
13973
|
Permission,
|
|
13804
13974
|
Plan,
|
|
13975
|
+
PlanFeature,
|
|
13976
|
+
PlanPricing,
|
|
13805
13977
|
PreCheckoutCalculationDto,
|
|
13806
13978
|
ProjectDto,
|
|
13807
13979
|
Provider,
|