@goweekdays/core 0.0.17 → 0.0.18

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @goweekdays/core
2
2
 
3
+ ## 0.0.18
4
+
5
+ ### Patch Changes
6
+
7
+ - 9cecd15: Revise subscription management
8
+
3
9
  ## 0.0.17
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -875,19 +875,21 @@ declare function useSubscriptionRepo(): {
875
875
  failed?: boolean | undefined;
876
876
  }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
877
877
  markSubscriptionAsCanceled: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
878
- updateSeatsById: ({ _id, currentSeats, maxSeats, paidSeats, amount, promoCode }?: {
878
+ updateSeatsById: ({ _id, currentSeats, maxSeats, paidSeats, amount, status, nextBillingDate, }?: {
879
879
  _id: string | ObjectId;
880
880
  currentSeats: number;
881
881
  maxSeats: number;
882
882
  paidSeats?: number | undefined;
883
883
  amount: number;
884
- promoCode?: string | undefined;
884
+ status?: string | undefined;
885
+ nextBillingDate?: string | undefined;
885
886
  }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
886
887
  updateMaxSeatsById: ({ _id, seats }?: {
887
888
  _id: string | ObjectId;
888
889
  seats: number;
889
890
  }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
890
891
  updateStatusById: (_id: string | ObjectId, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
892
+ updatePromoCodeById: (_id: string | ObjectId, promoCode: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
891
893
  };
892
894
 
893
895
  type TOrg = {
@@ -899,6 +901,7 @@ type TOrg = {
899
901
  contact?: string;
900
902
  busInst?: string;
901
903
  status?: string;
904
+ xenditCustomerId?: string;
902
905
  createdAt?: string;
903
906
  updatedAt?: string;
904
907
  deletedAt?: string;
@@ -964,7 +967,6 @@ declare function useSubscriptionService(): {
964
967
  updateSeatsById: (value: {
965
968
  subscriptionId: string;
966
969
  seats: number;
967
- promoCode?: string | undefined;
968
970
  amount: number;
969
971
  }) => Promise<void>;
970
972
  };
@@ -980,6 +982,8 @@ declare function useSubscriptionController(): {
980
982
  createAffiliateSubscription: (req: Request, res: Response, next: NextFunction) => Promise<void>;
981
983
  createOrgSubscription: (req: Request, res: Response, next: NextFunction) => Promise<void>;
982
984
  updateSubscriptionSeats: (req: Request, res: Response, next: NextFunction) => Promise<void>;
985
+ updatePromoCodeById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
986
+ updateStatusById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
983
987
  };
984
988
 
985
989
  declare const CustomerSchema: z.ZodEffects<z.ZodObject<{
@@ -1471,6 +1475,7 @@ declare function usePaymentMethodController(): {
1471
1475
  getByUser: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1472
1476
  getByOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1473
1477
  linkOnly: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1478
+ getPaymentMethodById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1474
1479
  };
1475
1480
 
1476
1481
  declare function useAddressRepo(): {
@@ -1934,6 +1939,7 @@ declare function useInvoiceService(): {
1934
1939
  declare function useInvoiceController(): {
1935
1940
  getBySubscriptionId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1936
1941
  getByNumber: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1942
+ getByDueDateStatus: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1937
1943
  };
1938
1944
 
1939
1945
  declare const TPaymentMethod: z.ZodEnum<["CARD", "DIRECT_DEBIT", "VIRTUAL_ACCOUNT", "EWALLET", "OVER_THE_COUNTER", "QR_CODE"]>;