@experts_hub/shared 1.0.459 → 1.0.461

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.
@@ -1,6 +1,7 @@
1
1
  import { BaseEntity } from "./base.entity";
2
2
  import { Interview } from "./interview.entity";
3
3
  import { User } from "./user.entity";
4
+ import { Job } from "./job.entity";
4
5
  export declare enum InterviewInviteStatusEnum {
5
6
  PENDING = "PENDING",
6
7
  ACCEPTED = "ACCEPTED",
@@ -12,6 +13,8 @@ export declare class InterviewInvite extends BaseEntity {
12
13
  interview: Interview;
13
14
  userId: number;
14
15
  user: User;
16
+ jobId: number;
17
+ job: Job;
15
18
  fullName: string;
16
19
  email: string;
17
20
  status: InterviewInviteStatusEnum;
@@ -13,6 +13,7 @@ import { TimesheetLine } from "./timesheet-line.entity";
13
13
  import { ClientCandidatePreference } from "./client-candidate-preference.entity";
14
14
  import { Invoice } from "./invoice.entity";
15
15
  import { F2FInterview } from "./f2f-interview.entity";
16
+ import { InterviewInvite } from "./interview-invite.entity";
16
17
  export declare enum JobLocationEnum {
17
18
  ONSITE = "ONSITE",
18
19
  REMOTE = "REMOTE",
@@ -87,6 +88,7 @@ export declare class Job extends BaseEntity {
87
88
  applicationCount: number;
88
89
  isContractSigned: boolean;
89
90
  isInterviewCreated: boolean;
91
+ interviewInvites: InterviewInvite[];
90
92
  jobSkills: JobSkill[];
91
93
  jobApplications: JobApplication[];
92
94
  interviews: Interview[];
@@ -10,33 +10,37 @@ export declare enum StripeTransactionTypeEnum {
10
10
  export declare enum StripeTransactionStatusEnum {
11
11
  PENDING = "PENDING",
12
12
  PROCESSING = "PROCESSING",
13
- SUCCESS = "SUCCESS",
13
+ COMPLETED = "COMPLETED",
14
14
  FAILED = "FAILED",
15
- EXPIRED = "EXPIRED"
15
+ EXPIRED = "EXPIRED",
16
+ CANCELLED = "CANCELLED"
16
17
  }
17
18
  export declare class StripeTransaction extends BaseEntity {
18
19
  userId: number;
19
20
  user: User;
20
- amount: number;
21
- currency: string;
22
- type: StripeTransactionTypeEnum;
23
- status: StripeTransactionStatusEnum;
24
21
  stripeSessionId: string;
25
22
  stripePaymentIntentId: string;
26
- description: string;
27
- depositAmountCents: number;
28
- platformFeeCents: number;
29
- taxCents: number;
30
- stripeFeeCents: number;
31
- totalPaidCents: number;
32
- netReceivedCents: number;
33
23
  stripeChargeId: string;
34
24
  stripeReceiptUrl: string;
35
25
  stripeBalanceTransactionId: string;
26
+ stripePaymentMethod: string | null;
27
+ stripePaymentStatus: string | null;
28
+ type: StripeTransactionTypeEnum;
29
+ currency: string;
30
+ desiredDepositCents: number;
31
+ platformFeeCents: number;
32
+ taxCents: number | null;
33
+ estimatedStripeFee: number | null;
34
+ estimatedTotalCents: number | null;
35
+ actualStripeFee: number | null;
36
+ actualTotalPaidCents: number | null;
37
+ netReceivedCents: number | null;
38
+ description: string;
39
+ status: StripeTransactionStatusEnum;
36
40
  checkoutSessionCompletedAt: Date;
37
41
  completedAt: Date;
38
- rawSessionPayload: Record<string, any> | null;
39
- rawSessionResponse: Record<string, any> | null;
40
42
  billingDetails: Record<string, any> | null;
41
43
  paymentMethodDetails: Record<string, any> | null;
44
+ rawSessionPayload: Record<string, any> | null;
45
+ rawSessionResponse: Record<string, any> | null;
42
46
  }
package/dist/index.d.mts CHANGED
@@ -905,6 +905,8 @@ declare class InterviewInvite extends BaseEntity {
905
905
  interview: Interview;
906
906
  userId: number;
907
907
  user: User;
908
+ jobId: number;
909
+ job: Job;
908
910
  fullName: string;
909
911
  email: string;
910
912
  status: InterviewInviteStatusEnum;
@@ -1335,6 +1337,7 @@ declare class Job extends BaseEntity {
1335
1337
  applicationCount: number;
1336
1338
  isContractSigned: boolean;
1337
1339
  isInterviewCreated: boolean;
1340
+ interviewInvites: InterviewInvite[];
1338
1341
  jobSkills: JobSkill[];
1339
1342
  jobApplications: JobApplication[];
1340
1343
  interviews: Interview[];
@@ -1634,35 +1637,39 @@ declare enum StripeTransactionTypeEnum {
1634
1637
  declare enum StripeTransactionStatusEnum {
1635
1638
  PENDING = "PENDING",
1636
1639
  PROCESSING = "PROCESSING",
1637
- SUCCESS = "SUCCESS",
1640
+ COMPLETED = "COMPLETED",
1638
1641
  FAILED = "FAILED",
1639
- EXPIRED = "EXPIRED"
1642
+ EXPIRED = "EXPIRED",
1643
+ CANCELLED = "CANCELLED"
1640
1644
  }
1641
1645
  declare class StripeTransaction extends BaseEntity {
1642
1646
  userId: number;
1643
1647
  user: User;
1644
- amount: number;
1645
- currency: string;
1646
- type: StripeTransactionTypeEnum;
1647
- status: StripeTransactionStatusEnum;
1648
1648
  stripeSessionId: string;
1649
1649
  stripePaymentIntentId: string;
1650
- description: string;
1651
- depositAmountCents: number;
1652
- platformFeeCents: number;
1653
- taxCents: number;
1654
- stripeFeeCents: number;
1655
- totalPaidCents: number;
1656
- netReceivedCents: number;
1657
1650
  stripeChargeId: string;
1658
1651
  stripeReceiptUrl: string;
1659
1652
  stripeBalanceTransactionId: string;
1653
+ stripePaymentMethod: string | null;
1654
+ stripePaymentStatus: string | null;
1655
+ type: StripeTransactionTypeEnum;
1656
+ currency: string;
1657
+ desiredDepositCents: number;
1658
+ platformFeeCents: number;
1659
+ taxCents: number | null;
1660
+ estimatedStripeFee: number | null;
1661
+ estimatedTotalCents: number | null;
1662
+ actualStripeFee: number | null;
1663
+ actualTotalPaidCents: number | null;
1664
+ netReceivedCents: number | null;
1665
+ description: string;
1666
+ status: StripeTransactionStatusEnum;
1660
1667
  checkoutSessionCompletedAt: Date;
1661
1668
  completedAt: Date;
1662
- rawSessionPayload: Record<string, any> | null;
1663
- rawSessionResponse: Record<string, any> | null;
1664
1669
  billingDetails: Record<string, any> | null;
1665
1670
  paymentMethodDetails: Record<string, any> | null;
1671
+ rawSessionPayload: Record<string, any> | null;
1672
+ rawSessionResponse: Record<string, any> | null;
1666
1673
  }
1667
1674
 
1668
1675
  declare enum WalletTransactionTypeEnum {
package/dist/index.d.ts CHANGED
@@ -905,6 +905,8 @@ declare class InterviewInvite extends BaseEntity {
905
905
  interview: Interview;
906
906
  userId: number;
907
907
  user: User;
908
+ jobId: number;
909
+ job: Job;
908
910
  fullName: string;
909
911
  email: string;
910
912
  status: InterviewInviteStatusEnum;
@@ -1335,6 +1337,7 @@ declare class Job extends BaseEntity {
1335
1337
  applicationCount: number;
1336
1338
  isContractSigned: boolean;
1337
1339
  isInterviewCreated: boolean;
1340
+ interviewInvites: InterviewInvite[];
1338
1341
  jobSkills: JobSkill[];
1339
1342
  jobApplications: JobApplication[];
1340
1343
  interviews: Interview[];
@@ -1634,35 +1637,39 @@ declare enum StripeTransactionTypeEnum {
1634
1637
  declare enum StripeTransactionStatusEnum {
1635
1638
  PENDING = "PENDING",
1636
1639
  PROCESSING = "PROCESSING",
1637
- SUCCESS = "SUCCESS",
1640
+ COMPLETED = "COMPLETED",
1638
1641
  FAILED = "FAILED",
1639
- EXPIRED = "EXPIRED"
1642
+ EXPIRED = "EXPIRED",
1643
+ CANCELLED = "CANCELLED"
1640
1644
  }
1641
1645
  declare class StripeTransaction extends BaseEntity {
1642
1646
  userId: number;
1643
1647
  user: User;
1644
- amount: number;
1645
- currency: string;
1646
- type: StripeTransactionTypeEnum;
1647
- status: StripeTransactionStatusEnum;
1648
1648
  stripeSessionId: string;
1649
1649
  stripePaymentIntentId: string;
1650
- description: string;
1651
- depositAmountCents: number;
1652
- platformFeeCents: number;
1653
- taxCents: number;
1654
- stripeFeeCents: number;
1655
- totalPaidCents: number;
1656
- netReceivedCents: number;
1657
1650
  stripeChargeId: string;
1658
1651
  stripeReceiptUrl: string;
1659
1652
  stripeBalanceTransactionId: string;
1653
+ stripePaymentMethod: string | null;
1654
+ stripePaymentStatus: string | null;
1655
+ type: StripeTransactionTypeEnum;
1656
+ currency: string;
1657
+ desiredDepositCents: number;
1658
+ platformFeeCents: number;
1659
+ taxCents: number | null;
1660
+ estimatedStripeFee: number | null;
1661
+ estimatedTotalCents: number | null;
1662
+ actualStripeFee: number | null;
1663
+ actualTotalPaidCents: number | null;
1664
+ netReceivedCents: number | null;
1665
+ description: string;
1666
+ status: StripeTransactionStatusEnum;
1660
1667
  checkoutSessionCompletedAt: Date;
1661
1668
  completedAt: Date;
1662
- rawSessionPayload: Record<string, any> | null;
1663
- rawSessionResponse: Record<string, any> | null;
1664
1669
  billingDetails: Record<string, any> | null;
1665
1670
  paymentMethodDetails: Record<string, any> | null;
1671
+ rawSessionPayload: Record<string, any> | null;
1672
+ rawSessionResponse: Record<string, any> | null;
1666
1673
  }
1667
1674
 
1668
1675
  declare enum WalletTransactionTypeEnum {
package/dist/index.js CHANGED
@@ -2564,6 +2564,19 @@ __decorateClass([
2564
2564
  (0, import_typeorm14.ManyToOne)(() => User),
2565
2565
  (0, import_typeorm14.JoinColumn)({ name: "user_id" })
2566
2566
  ], InterviewInvite.prototype, "user", 2);
2567
+ __decorateClass([
2568
+ (0, import_typeorm14.Column)({
2569
+ name: "job_id",
2570
+ type: "integer",
2571
+ comment: "Column to specify job id",
2572
+ nullable: true
2573
+ }),
2574
+ (0, import_typeorm14.Index)()
2575
+ ], InterviewInvite.prototype, "jobId", 2);
2576
+ __decorateClass([
2577
+ (0, import_typeorm14.ManyToOne)(() => Job),
2578
+ (0, import_typeorm14.JoinColumn)({ name: "job_id" })
2579
+ ], InterviewInvite.prototype, "job", 2);
2567
2580
  __decorateClass([
2568
2581
  (0, import_typeorm14.Column)({
2569
2582
  name: "full_name",
@@ -3908,6 +3921,9 @@ __decorateClass([
3908
3921
  __decorateClass([
3909
3922
  (0, import_typeorm28.Column)({ name: "is_interview_created", type: "boolean", default: false })
3910
3923
  ], Job.prototype, "isInterviewCreated", 2);
3924
+ __decorateClass([
3925
+ (0, import_typeorm28.OneToMany)(() => InterviewInvite, (interviewInvite) => interviewInvite.job, { cascade: true })
3926
+ ], Job.prototype, "interviewInvites", 2);
3911
3927
  __decorateClass([
3912
3928
  (0, import_typeorm28.OneToMany)(() => JobSkill, (jobSkill) => jobSkill.job, { cascade: true })
3913
3929
  ], Job.prototype, "jobSkills", 2);
@@ -4857,13 +4873,14 @@ var StripeTransactionTypeEnum = /* @__PURE__ */ ((StripeTransactionTypeEnum2) =>
4857
4873
  var StripeTransactionStatusEnum = /* @__PURE__ */ ((StripeTransactionStatusEnum2) => {
4858
4874
  StripeTransactionStatusEnum2["PENDING"] = "PENDING";
4859
4875
  StripeTransactionStatusEnum2["PROCESSING"] = "PROCESSING";
4860
- StripeTransactionStatusEnum2["SUCCESS"] = "SUCCESS";
4876
+ StripeTransactionStatusEnum2["COMPLETED"] = "COMPLETED";
4861
4877
  StripeTransactionStatusEnum2["FAILED"] = "FAILED";
4862
4878
  StripeTransactionStatusEnum2["EXPIRED"] = "EXPIRED";
4879
+ StripeTransactionStatusEnum2["CANCELLED"] = "CANCELLED";
4863
4880
  return StripeTransactionStatusEnum2;
4864
4881
  })(StripeTransactionStatusEnum || {});
4865
4882
  var StripeTransaction = class extends BaseEntity {
4866
- // Full Stripe payment method details response
4883
+ // Full Stripe session response
4867
4884
  };
4868
4885
  __decorateClass([
4869
4886
  (0, import_typeorm55.Column)({ name: "user_id", type: "integer", nullable: true }),
@@ -4873,18 +4890,6 @@ __decorateClass([
4873
4890
  (0, import_typeorm55.ManyToOne)(() => User, (user) => user.stripeTransactions),
4874
4891
  (0, import_typeorm55.JoinColumn)({ name: "user_id" })
4875
4892
  ], StripeTransaction.prototype, "user", 2);
4876
- __decorateClass([
4877
- (0, import_typeorm55.Column)({ name: "amount", type: "bigint", nullable: true })
4878
- ], StripeTransaction.prototype, "amount", 2);
4879
- __decorateClass([
4880
- (0, import_typeorm55.Column)({ name: "currency", type: "varchar", nullable: true })
4881
- ], StripeTransaction.prototype, "currency", 2);
4882
- __decorateClass([
4883
- (0, import_typeorm55.Column)({ name: "type", type: "enum", enum: StripeTransactionTypeEnum })
4884
- ], StripeTransaction.prototype, "type", 2);
4885
- __decorateClass([
4886
- (0, import_typeorm55.Column)({ name: "status", type: "enum", enum: StripeTransactionStatusEnum, default: "PENDING" /* PENDING */ })
4887
- ], StripeTransaction.prototype, "status", 2);
4888
4893
  __decorateClass([
4889
4894
  (0, import_typeorm55.Column)({ name: "stripe_session_id", type: "varchar", nullable: true })
4890
4895
  ], StripeTransaction.prototype, "stripeSessionId", 2);
@@ -4892,53 +4897,74 @@ __decorateClass([
4892
4897
  (0, import_typeorm55.Column)({ name: "stripe_payment_intent_id", type: "varchar", nullable: true })
4893
4898
  ], StripeTransaction.prototype, "stripePaymentIntentId", 2);
4894
4899
  __decorateClass([
4895
- (0, import_typeorm55.Column)({ name: "description", type: "text", nullable: true })
4896
- ], StripeTransaction.prototype, "description", 2);
4900
+ (0, import_typeorm55.Column)({ name: "stripe_charge_id", type: "varchar", nullable: true })
4901
+ ], StripeTransaction.prototype, "stripeChargeId", 2);
4897
4902
  __decorateClass([
4898
- (0, import_typeorm55.Column)({ name: "deposit_amount_cents", type: "bigint", default: 0 })
4899
- ], StripeTransaction.prototype, "depositAmountCents", 2);
4903
+ (0, import_typeorm55.Column)({ name: "stripe_receipt_url", type: "varchar", nullable: true })
4904
+ ], StripeTransaction.prototype, "stripeReceiptUrl", 2);
4900
4905
  __decorateClass([
4901
- (0, import_typeorm55.Column)({ name: "platform_fee_cents", type: "bigint", default: 0 })
4906
+ (0, import_typeorm55.Column)({ name: "stripe_balance_transaction_id", type: "varchar", nullable: true })
4907
+ ], StripeTransaction.prototype, "stripeBalanceTransactionId", 2);
4908
+ __decorateClass([
4909
+ (0, import_typeorm55.Column)({ name: "stripe_payment_method", type: "varchar", nullable: true })
4910
+ ], StripeTransaction.prototype, "stripePaymentMethod", 2);
4911
+ __decorateClass([
4912
+ (0, import_typeorm55.Column)({ name: "stripe_payment_status", type: "varchar", nullable: true })
4913
+ ], StripeTransaction.prototype, "stripePaymentStatus", 2);
4914
+ __decorateClass([
4915
+ (0, import_typeorm55.Column)({ name: "type", type: "enum", enum: StripeTransactionTypeEnum })
4916
+ ], StripeTransaction.prototype, "type", 2);
4917
+ __decorateClass([
4918
+ (0, import_typeorm55.Column)({ name: "currency", type: "varchar", nullable: true })
4919
+ ], StripeTransaction.prototype, "currency", 2);
4920
+ __decorateClass([
4921
+ (0, import_typeorm55.Column)({ name: "desired_deposit_cents", type: "bigint", nullable: true, comment: "Amount user wants in their wallet. Example: 10000 cents = $100.00. This is what gets credited to wallet" })
4922
+ ], StripeTransaction.prototype, "desiredDepositCents", 2);
4923
+ __decorateClass([
4924
+ (0, import_typeorm55.Column)({ name: "platform_fee_cents", type: "bigint", default: 0, comment: "Your platform commission Example: 500 cents = $5.00 (5% of $100)" })
4902
4925
  ], StripeTransaction.prototype, "platformFeeCents", 2);
4903
4926
  __decorateClass([
4904
- (0, import_typeorm55.Column)({ name: "tax_cents", type: "bigint", default: 0 })
4927
+ (0, import_typeorm55.Column)({ name: "tax_cents", type: "bigint", nullable: true, comment: "Sales tax collected by Stripe" })
4905
4928
  ], StripeTransaction.prototype, "taxCents", 2);
4906
4929
  __decorateClass([
4907
- (0, import_typeorm55.Column)({ name: "stripe_fee_cents", type: "bigint", default: 0 })
4908
- ], StripeTransaction.prototype, "stripeFeeCents", 2);
4930
+ (0, import_typeorm55.Column)({ name: "estimated_stripe_fee_cents", type: "bigint", nullable: true, comment: "Your calculated estimate of Stripe fee, Example: 371 cents = $3.71" })
4931
+ ], StripeTransaction.prototype, "estimatedStripeFee", 2);
4909
4932
  __decorateClass([
4910
- (0, import_typeorm55.Column)({ name: "total_paid_cents", type: "bigint", default: 0 })
4911
- ], StripeTransaction.prototype, "totalPaidCents", 2);
4933
+ (0, import_typeorm55.Column)({ name: "estimated_total_cents", type: "bigint", nullable: true, comment: "Your calculated total to charge, Example: 11386 cents = $113.86, desired_deposit_cents + platform_fee_cents + estimated_stripe_fee" })
4934
+ ], StripeTransaction.prototype, "estimatedTotalCents", 2);
4912
4935
  __decorateClass([
4913
- (0, import_typeorm55.Column)({ name: "net_received_cents", type: "bigint", default: 0 })
4914
- ], StripeTransaction.prototype, "netReceivedCents", 2);
4936
+ (0, import_typeorm55.Column)({ name: "actual_stripe_fee_cents", type: "bigint", nullable: true, comment: "ACTUAL Stripe fee charged, Example: 371 cents = $3.71" })
4937
+ ], StripeTransaction.prototype, "actualStripeFee", 2);
4915
4938
  __decorateClass([
4916
- (0, import_typeorm55.Column)({ name: "stripe_charge_id", type: "varchar", nullable: true })
4917
- ], StripeTransaction.prototype, "stripeChargeId", 2);
4939
+ (0, import_typeorm55.Column)({ name: "actual_total_paid_cents", type: "bigint", nullable: true, comment: "What customer ACTUALLY paid, Example: 11757 cents = $117.57, May differ from estimate" })
4940
+ ], StripeTransaction.prototype, "actualTotalPaidCents", 2);
4918
4941
  __decorateClass([
4919
- (0, import_typeorm55.Column)({ name: "stripe_receipt_url", type: "varchar", nullable: true })
4920
- ], StripeTransaction.prototype, "stripeReceiptUrl", 2);
4942
+ (0, import_typeorm55.Column)({ name: "net_received_cents", type: "bigint", nullable: true, comment: "What customer ACTUALLY paid, Example: 11757 cents = $117.57, May differ from estimate" })
4943
+ ], StripeTransaction.prototype, "netReceivedCents", 2);
4921
4944
  __decorateClass([
4922
- (0, import_typeorm55.Column)({ name: "stripe_balance_transaction_id", type: "varchar", nullable: true })
4923
- ], StripeTransaction.prototype, "stripeBalanceTransactionId", 2);
4945
+ (0, import_typeorm55.Column)({ name: "description", type: "text", nullable: true })
4946
+ ], StripeTransaction.prototype, "description", 2);
4947
+ __decorateClass([
4948
+ (0, import_typeorm55.Column)({ name: "status", type: "enum", enum: StripeTransactionStatusEnum, default: "PENDING" /* PENDING */ })
4949
+ ], StripeTransaction.prototype, "status", 2);
4924
4950
  __decorateClass([
4925
4951
  (0, import_typeorm55.Column)({ name: "checkout_session_completed_at", type: "timestamptz", nullable: true })
4926
4952
  ], StripeTransaction.prototype, "checkoutSessionCompletedAt", 2);
4927
4953
  __decorateClass([
4928
4954
  (0, import_typeorm55.Column)({ name: "completed_at", type: "timestamptz", nullable: true })
4929
4955
  ], StripeTransaction.prototype, "completedAt", 2);
4930
- __decorateClass([
4931
- (0, import_typeorm55.Column)({ name: "raw_session_payload", type: "jsonb", nullable: true })
4932
- ], StripeTransaction.prototype, "rawSessionPayload", 2);
4933
- __decorateClass([
4934
- (0, import_typeorm55.Column)({ name: "raw_session_response", type: "jsonb", nullable: true })
4935
- ], StripeTransaction.prototype, "rawSessionResponse", 2);
4936
4956
  __decorateClass([
4937
4957
  (0, import_typeorm55.Column)({ name: "billing_details", type: "jsonb", nullable: true })
4938
4958
  ], StripeTransaction.prototype, "billingDetails", 2);
4939
4959
  __decorateClass([
4940
4960
  (0, import_typeorm55.Column)({ name: "payment_method_details", type: "jsonb", nullable: true })
4941
4961
  ], StripeTransaction.prototype, "paymentMethodDetails", 2);
4962
+ __decorateClass([
4963
+ (0, import_typeorm55.Column)({ name: "raw_session_payload", type: "jsonb", nullable: true })
4964
+ ], StripeTransaction.prototype, "rawSessionPayload", 2);
4965
+ __decorateClass([
4966
+ (0, import_typeorm55.Column)({ name: "raw_session_response", type: "jsonb", nullable: true })
4967
+ ], StripeTransaction.prototype, "rawSessionResponse", 2);
4942
4968
  StripeTransaction = __decorateClass([
4943
4969
  (0, import_typeorm55.Entity)("stripe_transactions")
4944
4970
  ], StripeTransaction);
package/dist/index.mjs CHANGED
@@ -2455,6 +2455,19 @@ __decorateClass([
2455
2455
  ManyToOne12(() => User),
2456
2456
  JoinColumn12({ name: "user_id" })
2457
2457
  ], InterviewInvite.prototype, "user", 2);
2458
+ __decorateClass([
2459
+ Column14({
2460
+ name: "job_id",
2461
+ type: "integer",
2462
+ comment: "Column to specify job id",
2463
+ nullable: true
2464
+ }),
2465
+ Index9()
2466
+ ], InterviewInvite.prototype, "jobId", 2);
2467
+ __decorateClass([
2468
+ ManyToOne12(() => Job),
2469
+ JoinColumn12({ name: "job_id" })
2470
+ ], InterviewInvite.prototype, "job", 2);
2458
2471
  __decorateClass([
2459
2472
  Column14({
2460
2473
  name: "full_name",
@@ -3831,6 +3844,9 @@ __decorateClass([
3831
3844
  __decorateClass([
3832
3845
  Column28({ name: "is_interview_created", type: "boolean", default: false })
3833
3846
  ], Job.prototype, "isInterviewCreated", 2);
3847
+ __decorateClass([
3848
+ OneToMany10(() => InterviewInvite, (interviewInvite) => interviewInvite.job, { cascade: true })
3849
+ ], Job.prototype, "interviewInvites", 2);
3834
3850
  __decorateClass([
3835
3851
  OneToMany10(() => JobSkill, (jobSkill) => jobSkill.job, { cascade: true })
3836
3852
  ], Job.prototype, "jobSkills", 2);
@@ -4884,13 +4900,14 @@ var StripeTransactionTypeEnum = /* @__PURE__ */ ((StripeTransactionTypeEnum2) =>
4884
4900
  var StripeTransactionStatusEnum = /* @__PURE__ */ ((StripeTransactionStatusEnum2) => {
4885
4901
  StripeTransactionStatusEnum2["PENDING"] = "PENDING";
4886
4902
  StripeTransactionStatusEnum2["PROCESSING"] = "PROCESSING";
4887
- StripeTransactionStatusEnum2["SUCCESS"] = "SUCCESS";
4903
+ StripeTransactionStatusEnum2["COMPLETED"] = "COMPLETED";
4888
4904
  StripeTransactionStatusEnum2["FAILED"] = "FAILED";
4889
4905
  StripeTransactionStatusEnum2["EXPIRED"] = "EXPIRED";
4906
+ StripeTransactionStatusEnum2["CANCELLED"] = "CANCELLED";
4890
4907
  return StripeTransactionStatusEnum2;
4891
4908
  })(StripeTransactionStatusEnum || {});
4892
4909
  var StripeTransaction = class extends BaseEntity {
4893
- // Full Stripe payment method details response
4910
+ // Full Stripe session response
4894
4911
  };
4895
4912
  __decorateClass([
4896
4913
  Column55({ name: "user_id", type: "integer", nullable: true }),
@@ -4900,18 +4917,6 @@ __decorateClass([
4900
4917
  ManyToOne49(() => User, (user) => user.stripeTransactions),
4901
4918
  JoinColumn49({ name: "user_id" })
4902
4919
  ], StripeTransaction.prototype, "user", 2);
4903
- __decorateClass([
4904
- Column55({ name: "amount", type: "bigint", nullable: true })
4905
- ], StripeTransaction.prototype, "amount", 2);
4906
- __decorateClass([
4907
- Column55({ name: "currency", type: "varchar", nullable: true })
4908
- ], StripeTransaction.prototype, "currency", 2);
4909
- __decorateClass([
4910
- Column55({ name: "type", type: "enum", enum: StripeTransactionTypeEnum })
4911
- ], StripeTransaction.prototype, "type", 2);
4912
- __decorateClass([
4913
- Column55({ name: "status", type: "enum", enum: StripeTransactionStatusEnum, default: "PENDING" /* PENDING */ })
4914
- ], StripeTransaction.prototype, "status", 2);
4915
4920
  __decorateClass([
4916
4921
  Column55({ name: "stripe_session_id", type: "varchar", nullable: true })
4917
4922
  ], StripeTransaction.prototype, "stripeSessionId", 2);
@@ -4919,53 +4924,74 @@ __decorateClass([
4919
4924
  Column55({ name: "stripe_payment_intent_id", type: "varchar", nullable: true })
4920
4925
  ], StripeTransaction.prototype, "stripePaymentIntentId", 2);
4921
4926
  __decorateClass([
4922
- Column55({ name: "description", type: "text", nullable: true })
4923
- ], StripeTransaction.prototype, "description", 2);
4927
+ Column55({ name: "stripe_charge_id", type: "varchar", nullable: true })
4928
+ ], StripeTransaction.prototype, "stripeChargeId", 2);
4924
4929
  __decorateClass([
4925
- Column55({ name: "deposit_amount_cents", type: "bigint", default: 0 })
4926
- ], StripeTransaction.prototype, "depositAmountCents", 2);
4930
+ Column55({ name: "stripe_receipt_url", type: "varchar", nullable: true })
4931
+ ], StripeTransaction.prototype, "stripeReceiptUrl", 2);
4927
4932
  __decorateClass([
4928
- Column55({ name: "platform_fee_cents", type: "bigint", default: 0 })
4933
+ Column55({ name: "stripe_balance_transaction_id", type: "varchar", nullable: true })
4934
+ ], StripeTransaction.prototype, "stripeBalanceTransactionId", 2);
4935
+ __decorateClass([
4936
+ Column55({ name: "stripe_payment_method", type: "varchar", nullable: true })
4937
+ ], StripeTransaction.prototype, "stripePaymentMethod", 2);
4938
+ __decorateClass([
4939
+ Column55({ name: "stripe_payment_status", type: "varchar", nullable: true })
4940
+ ], StripeTransaction.prototype, "stripePaymentStatus", 2);
4941
+ __decorateClass([
4942
+ Column55({ name: "type", type: "enum", enum: StripeTransactionTypeEnum })
4943
+ ], StripeTransaction.prototype, "type", 2);
4944
+ __decorateClass([
4945
+ Column55({ name: "currency", type: "varchar", nullable: true })
4946
+ ], StripeTransaction.prototype, "currency", 2);
4947
+ __decorateClass([
4948
+ Column55({ name: "desired_deposit_cents", type: "bigint", nullable: true, comment: "Amount user wants in their wallet. Example: 10000 cents = $100.00. This is what gets credited to wallet" })
4949
+ ], StripeTransaction.prototype, "desiredDepositCents", 2);
4950
+ __decorateClass([
4951
+ Column55({ name: "platform_fee_cents", type: "bigint", default: 0, comment: "Your platform commission Example: 500 cents = $5.00 (5% of $100)" })
4929
4952
  ], StripeTransaction.prototype, "platformFeeCents", 2);
4930
4953
  __decorateClass([
4931
- Column55({ name: "tax_cents", type: "bigint", default: 0 })
4954
+ Column55({ name: "tax_cents", type: "bigint", nullable: true, comment: "Sales tax collected by Stripe" })
4932
4955
  ], StripeTransaction.prototype, "taxCents", 2);
4933
4956
  __decorateClass([
4934
- Column55({ name: "stripe_fee_cents", type: "bigint", default: 0 })
4935
- ], StripeTransaction.prototype, "stripeFeeCents", 2);
4957
+ Column55({ name: "estimated_stripe_fee_cents", type: "bigint", nullable: true, comment: "Your calculated estimate of Stripe fee, Example: 371 cents = $3.71" })
4958
+ ], StripeTransaction.prototype, "estimatedStripeFee", 2);
4936
4959
  __decorateClass([
4937
- Column55({ name: "total_paid_cents", type: "bigint", default: 0 })
4938
- ], StripeTransaction.prototype, "totalPaidCents", 2);
4960
+ Column55({ name: "estimated_total_cents", type: "bigint", nullable: true, comment: "Your calculated total to charge, Example: 11386 cents = $113.86, desired_deposit_cents + platform_fee_cents + estimated_stripe_fee" })
4961
+ ], StripeTransaction.prototype, "estimatedTotalCents", 2);
4939
4962
  __decorateClass([
4940
- Column55({ name: "net_received_cents", type: "bigint", default: 0 })
4941
- ], StripeTransaction.prototype, "netReceivedCents", 2);
4963
+ Column55({ name: "actual_stripe_fee_cents", type: "bigint", nullable: true, comment: "ACTUAL Stripe fee charged, Example: 371 cents = $3.71" })
4964
+ ], StripeTransaction.prototype, "actualStripeFee", 2);
4942
4965
  __decorateClass([
4943
- Column55({ name: "stripe_charge_id", type: "varchar", nullable: true })
4944
- ], StripeTransaction.prototype, "stripeChargeId", 2);
4966
+ Column55({ name: "actual_total_paid_cents", type: "bigint", nullable: true, comment: "What customer ACTUALLY paid, Example: 11757 cents = $117.57, May differ from estimate" })
4967
+ ], StripeTransaction.prototype, "actualTotalPaidCents", 2);
4945
4968
  __decorateClass([
4946
- Column55({ name: "stripe_receipt_url", type: "varchar", nullable: true })
4947
- ], StripeTransaction.prototype, "stripeReceiptUrl", 2);
4969
+ Column55({ name: "net_received_cents", type: "bigint", nullable: true, comment: "What customer ACTUALLY paid, Example: 11757 cents = $117.57, May differ from estimate" })
4970
+ ], StripeTransaction.prototype, "netReceivedCents", 2);
4948
4971
  __decorateClass([
4949
- Column55({ name: "stripe_balance_transaction_id", type: "varchar", nullable: true })
4950
- ], StripeTransaction.prototype, "stripeBalanceTransactionId", 2);
4972
+ Column55({ name: "description", type: "text", nullable: true })
4973
+ ], StripeTransaction.prototype, "description", 2);
4974
+ __decorateClass([
4975
+ Column55({ name: "status", type: "enum", enum: StripeTransactionStatusEnum, default: "PENDING" /* PENDING */ })
4976
+ ], StripeTransaction.prototype, "status", 2);
4951
4977
  __decorateClass([
4952
4978
  Column55({ name: "checkout_session_completed_at", type: "timestamptz", nullable: true })
4953
4979
  ], StripeTransaction.prototype, "checkoutSessionCompletedAt", 2);
4954
4980
  __decorateClass([
4955
4981
  Column55({ name: "completed_at", type: "timestamptz", nullable: true })
4956
4982
  ], StripeTransaction.prototype, "completedAt", 2);
4957
- __decorateClass([
4958
- Column55({ name: "raw_session_payload", type: "jsonb", nullable: true })
4959
- ], StripeTransaction.prototype, "rawSessionPayload", 2);
4960
- __decorateClass([
4961
- Column55({ name: "raw_session_response", type: "jsonb", nullable: true })
4962
- ], StripeTransaction.prototype, "rawSessionResponse", 2);
4963
4983
  __decorateClass([
4964
4984
  Column55({ name: "billing_details", type: "jsonb", nullable: true })
4965
4985
  ], StripeTransaction.prototype, "billingDetails", 2);
4966
4986
  __decorateClass([
4967
4987
  Column55({ name: "payment_method_details", type: "jsonb", nullable: true })
4968
4988
  ], StripeTransaction.prototype, "paymentMethodDetails", 2);
4989
+ __decorateClass([
4990
+ Column55({ name: "raw_session_payload", type: "jsonb", nullable: true })
4991
+ ], StripeTransaction.prototype, "rawSessionPayload", 2);
4992
+ __decorateClass([
4993
+ Column55({ name: "raw_session_response", type: "jsonb", nullable: true })
4994
+ ], StripeTransaction.prototype, "rawSessionResponse", 2);
4969
4995
  StripeTransaction = __decorateClass([
4970
4996
  Entity54("stripe_transactions")
4971
4997
  ], StripeTransaction);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experts_hub/shared",
3
- "version": "1.0.459",
3
+ "version": "1.0.461",
4
4
  "description": "Shared DTOs, interfaces, and utilities for experts hub applications",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",