ia-common 1.0.1-beta.2 → 1.0.1-beta.20

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.
Files changed (74) hide show
  1. package/build/@enum.d.ts +2 -0
  2. package/build/@enum.js +2 -0
  3. package/build/@model.d.ts +3 -0
  4. package/build/@model.js +19 -0
  5. package/build/@type.d.ts +1 -0
  6. package/build/@type.js +1 -0
  7. package/build/@utils.d.ts +2 -0
  8. package/build/@utils.js +18 -0
  9. package/build/enum/organization-status.enum.d.ts +6 -1
  10. package/build/enum/organization-status.enum.js +5 -0
  11. package/build/enum/pricing-plan-status.enum.d.ts +4 -0
  12. package/build/enum/pricing-plan-status.enum.js +8 -0
  13. package/build/enum/registration-status.enum.d.ts +6 -1
  14. package/build/enum/registration-status.enum.js +5 -0
  15. package/build/enum/subscription-status.enum.d.ts +11 -0
  16. package/build/enum/subscription-status.enum.js +15 -0
  17. package/build/enum/user-status.enum.d.ts +5 -1
  18. package/build/enum/user-status.enum.js +4 -0
  19. package/build/exception/app-badrequest.exception.d.ts +4 -0
  20. package/build/exception/app-badrequest.exception.js +28 -0
  21. package/build/interface/api/create-bank-details.interface.d.ts +22 -0
  22. package/build/interface/api/create-bank-details.interface.js +2 -0
  23. package/build/interface/api/create-pricing-plan.interface.d.ts +20 -0
  24. package/build/interface/api/create-pricing-plan.interface.js +2 -0
  25. package/build/interface/api/create-registration.interface.d.ts +2 -2
  26. package/build/interface/api/create-subscription.interface.d.ts +7 -0
  27. package/build/interface/api/create-subscription.interface.js +2 -0
  28. package/build/interface/api/get-bank-details.interface.d.ts +7 -0
  29. package/build/interface/api/get-bank-details.interface.js +2 -0
  30. package/build/interface/api/get-pricing-plan-by-date.interface.d.ts +14 -0
  31. package/build/interface/api/get-pricing-plan-by-date.interface.js +2 -0
  32. package/build/interface/api/get-registration-by-id.interface.d.ts +15 -0
  33. package/build/interface/api/get-registration-by-id.interface.js +2 -0
  34. package/build/interface/api/get-registration-with-organization-owners.interface.d.ts +12 -0
  35. package/build/interface/api/get-registration-with-organization-owners.interface.js +2 -0
  36. package/build/interface/api/index.d.ts +14 -0
  37. package/build/interface/api/index.js +14 -0
  38. package/build/interface/api/login.interface.d.ts +22 -0
  39. package/build/interface/api/login.interface.js +2 -0
  40. package/build/interface/api/remove-bank-details-by-id.interface.d.ts +7 -0
  41. package/build/interface/api/remove-bank-details-by-id.interface.js +2 -0
  42. package/build/interface/api/remove-pricing-plan-by-id.interface.d.ts +6 -0
  43. package/build/interface/api/remove-pricing-plan-by-id.interface.js +2 -0
  44. package/build/interface/api/update-bank-details.interface.d.ts +18 -0
  45. package/build/interface/api/update-bank-details.interface.js +2 -0
  46. package/build/interface/api/update-pricing-plan-by-id.interface.d.ts +18 -0
  47. package/build/interface/api/update-pricing-plan-by-id.interface.js +2 -0
  48. package/build/interface/api/update-pricing-plan.interface.d.ts +13 -0
  49. package/build/interface/api/update-pricing-plan.interface.js +2 -0
  50. package/build/interface/api/update-subscription.interface.d.ts +11 -0
  51. package/build/interface/api/update-subscription.interface.js +2 -0
  52. package/build/interface/app-badrequest-exception.type.d.ts +4 -0
  53. package/build/interface/app-badrequest-exception.type.js +2 -0
  54. package/build/interface/entity/bank-details-entity.interface.d.ts +12 -0
  55. package/build/interface/entity/bank-details-entity.interface.js +2 -0
  56. package/build/interface/entity/index.d.ts +3 -0
  57. package/build/interface/entity/index.js +3 -0
  58. package/build/interface/entity/pricing-plan-entity.interface.d.ts +10 -0
  59. package/build/interface/entity/pricing-plan-entity.interface.js +2 -0
  60. package/build/interface/entity/subscription-entity.interface.d.ts +17 -0
  61. package/build/interface/entity/subscription-entity.interface.js +2 -0
  62. package/build/interface/key-value.interface.d.ts +3 -0
  63. package/build/interface/key-value.interface.js +2 -0
  64. package/build/interface/user-entity-without-password.interface.d.ts +3 -0
  65. package/build/interface/user-entity-without-password.interface.js +2 -0
  66. package/build/model/pricing-plan-entity-model.d.ts +65 -0
  67. package/build/model/pricing-plan-entity-model.js +86 -0
  68. package/build/model/subscribed-pricing-plan-model.d.ts +20 -0
  69. package/build/model/subscribed-pricing-plan-model.js +63 -0
  70. package/build/utils/date-util.d.ts +8 -0
  71. package/build/utils/date-util.js +42 -0
  72. package/build/utils/string-to-date-conversion-methods.d.ts +19 -0
  73. package/build/utils/string-to-date-conversion-methods.js +48 -0
  74. package/package.json +4 -1
package/build/@enum.d.ts CHANGED
@@ -3,3 +3,5 @@ export * from "./enum/organization-type.enum";
3
3
  export * from "./enum/user-status.enum";
4
4
  export * from "./enum/user-type.enum";
5
5
  export * from "./enum/registration-status.enum";
6
+ export * from "./enum/pricing-plan-status.enum";
7
+ export * from "./enum/subscription-status.enum";
package/build/@enum.js CHANGED
@@ -19,3 +19,5 @@ __exportStar(require("./enum/organization-type.enum"), exports);
19
19
  __exportStar(require("./enum/user-status.enum"), exports);
20
20
  __exportStar(require("./enum/user-type.enum"), exports);
21
21
  __exportStar(require("./enum/registration-status.enum"), exports);
22
+ __exportStar(require("./enum/pricing-plan-status.enum"), exports);
23
+ __exportStar(require("./enum/subscription-status.enum"), exports);
@@ -0,0 +1,3 @@
1
+ export * from "./model/pricing-plan-entity-model";
2
+ export * from "./model/subscribed-pricing-plan-model";
3
+ export * from "./exception/app-badrequest.exception";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./model/pricing-plan-entity-model"), exports);
18
+ __exportStar(require("./model/subscribed-pricing-plan-model"), exports);
19
+ __exportStar(require("./exception/app-badrequest.exception"), exports);
package/build/@type.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from "./interface/without-token-registration-entity.interface";
6
6
  export * from "./interface/modify-entity.interface";
7
7
  export * from "./interface/modify.interface";
8
8
  export * from "./interface/update-user-info.interface";
9
+ export * from "./interface/user-entity-without-password.interface";
package/build/@type.js CHANGED
@@ -22,3 +22,4 @@ __exportStar(require("./interface/without-token-registration-entity.interface"),
22
22
  __exportStar(require("./interface/modify-entity.interface"), exports);
23
23
  __exportStar(require("./interface/modify.interface"), exports);
24
24
  __exportStar(require("./interface/update-user-info.interface"), exports);
25
+ __exportStar(require("./interface/user-entity-without-password.interface"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./utils/string-to-date-conversion-methods";
2
+ export * from "./utils/string-utils";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./utils/string-to-date-conversion-methods"), exports);
18
+ __exportStar(require("./utils/string-utils"), exports);
@@ -1,3 +1,8 @@
1
1
  export declare enum OrganizationStatus {
2
- REGISTRATION_APPROVED = "registration_approved"
2
+ REGISTRATION_APPROVED = "registration_approved",
3
+ SETUP_DONE = "setup_done",
4
+ ACTIVE = "active",
5
+ SETUP_INVALID = "setup_invalid",
6
+ PAYMENT_INVALID = "payment_invalid",
7
+ ACCOUNT_SUSPENDED = "account_suspended"
3
8
  }
@@ -4,4 +4,9 @@ exports.OrganizationStatus = void 0;
4
4
  var OrganizationStatus;
5
5
  (function (OrganizationStatus) {
6
6
  OrganizationStatus["REGISTRATION_APPROVED"] = "registration_approved";
7
+ OrganizationStatus["SETUP_DONE"] = "setup_done";
8
+ OrganizationStatus["ACTIVE"] = "active";
9
+ OrganizationStatus["SETUP_INVALID"] = "setup_invalid";
10
+ OrganizationStatus["PAYMENT_INVALID"] = "payment_invalid";
11
+ OrganizationStatus["ACCOUNT_SUSPENDED"] = "account_suspended";
7
12
  })(OrganizationStatus || (exports.OrganizationStatus = OrganizationStatus = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum PricingPlanStatus {
2
+ ACTIVE = "active",
3
+ DEACTIVE = "deactive"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PricingPlanStatus = void 0;
4
+ var PricingPlanStatus;
5
+ (function (PricingPlanStatus) {
6
+ PricingPlanStatus["ACTIVE"] = "active";
7
+ PricingPlanStatus["DEACTIVE"] = "deactive";
8
+ })(PricingPlanStatus || (exports.PricingPlanStatus = PricingPlanStatus = {}));
@@ -1,3 +1,8 @@
1
1
  export declare enum RegistrationStatus {
2
- REGISTRATION_APPROVED = "registration_approved"
2
+ REGISTRATION_APPROVED = "registration_approved",
3
+ SETUP_DONE = "setup_done",
4
+ ACTIVE = "active",
5
+ SETUP_INVALID = "setup_invalid",
6
+ PAYMENT_INVALID = "payment_invalid",
7
+ ACCOUNT_SUSPENDED = "account_suspended"
3
8
  }
@@ -4,4 +4,9 @@ exports.RegistrationStatus = void 0;
4
4
  var RegistrationStatus;
5
5
  (function (RegistrationStatus) {
6
6
  RegistrationStatus["REGISTRATION_APPROVED"] = "registration_approved";
7
+ RegistrationStatus["SETUP_DONE"] = "setup_done";
8
+ RegistrationStatus["ACTIVE"] = "active";
9
+ RegistrationStatus["SETUP_INVALID"] = "setup_invalid";
10
+ RegistrationStatus["PAYMENT_INVALID"] = "payment_invalid";
11
+ RegistrationStatus["ACCOUNT_SUSPENDED"] = "account_suspended";
7
12
  })(RegistrationStatus || (exports.RegistrationStatus = RegistrationStatus = {}));
@@ -0,0 +1,11 @@
1
+ export declare enum SubscriptionStatus {
2
+ ACTIVE = "active",
3
+ DEACTIVE = "deactive",
4
+ PAYMENT_DONE = "payment_done",
5
+ PAYMENT_PENDING = "payment_pending",
6
+ REJECT = "reject",
7
+ SETUP_INVALID = "setup_invalid",
8
+ SETUP_DONE = "setup_done",
9
+ PAYMENT_INVALID = "payment_invalid",
10
+ ACCOUNT_SUSPENDED = "account_suspended"
11
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionStatus = void 0;
4
+ var SubscriptionStatus;
5
+ (function (SubscriptionStatus) {
6
+ SubscriptionStatus["ACTIVE"] = "active";
7
+ SubscriptionStatus["DEACTIVE"] = "deactive";
8
+ SubscriptionStatus["PAYMENT_DONE"] = "payment_done";
9
+ SubscriptionStatus["PAYMENT_PENDING"] = "payment_pending";
10
+ SubscriptionStatus["REJECT"] = "reject";
11
+ SubscriptionStatus["SETUP_INVALID"] = "setup_invalid";
12
+ SubscriptionStatus["SETUP_DONE"] = "setup_done";
13
+ SubscriptionStatus["PAYMENT_INVALID"] = "payment_invalid";
14
+ SubscriptionStatus["ACCOUNT_SUSPENDED"] = "account_suspended";
15
+ })(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
@@ -1,5 +1,9 @@
1
1
  export declare enum UserStatus {
2
2
  ACTIVE = "active",
3
3
  DEACTIVE = "deactive",
4
- REGISTRATION_APPROVED = "registration_approved"
4
+ REGISTRATION_APPROVED = "registration_approved",
5
+ SETUP_DONE = "setup_done",
6
+ SETUP_INVALID = "setup_invalid",
7
+ PAYMENT_INVALID = "payment_invalid",
8
+ ACCOUNT_SUSPENDED = "account_suspended"
5
9
  }
@@ -6,4 +6,8 @@ var UserStatus;
6
6
  UserStatus["ACTIVE"] = "active";
7
7
  UserStatus["DEACTIVE"] = "deactive";
8
8
  UserStatus["REGISTRATION_APPROVED"] = "registration_approved";
9
+ UserStatus["SETUP_DONE"] = "setup_done";
10
+ UserStatus["SETUP_INVALID"] = "setup_invalid";
11
+ UserStatus["PAYMENT_INVALID"] = "payment_invalid";
12
+ UserStatus["ACCOUNT_SUSPENDED"] = "account_suspended";
9
13
  })(UserStatus || (exports.UserStatus = UserStatus = {}));
@@ -0,0 +1,4 @@
1
+ import { IAppBadRequestException } from "../interface/app-badrequest-exception.type";
2
+ export declare class AppBadRequestException extends Error {
3
+ constructor(appBadRequestException: IAppBadRequestException);
4
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.AppBadRequestException = void 0;
19
+ var AppBadRequestException = /** @class */ (function (_super) {
20
+ __extends(AppBadRequestException, _super);
21
+ function AppBadRequestException(appBadRequestException) {
22
+ var _this = _super.call(this) || this;
23
+ _this.message = appBadRequestException.message.join(",");
24
+ return _this;
25
+ }
26
+ return AppBadRequestException;
27
+ }(Error));
28
+ exports.AppBadRequestException = AppBadRequestException;
@@ -0,0 +1,22 @@
1
+ import { IBankDetailEntity, IUploadedMulterFile, Modify } from "../../@type";
2
+ export interface ICreateBankDetailResponse extends Modify<IBankDetailEntity, {
3
+ createdOn: string;
4
+ updatedOn: string;
5
+ }> {
6
+ }
7
+ export interface ICreateBankDetailRequest {
8
+ qrCode?: IUploadedMulterFile;
9
+ bankName: string;
10
+ accountName: string;
11
+ accountNo: string;
12
+ ifscCode: string;
13
+ upiId?: string;
14
+ bankAddress?: string;
15
+ branch: string;
16
+ files: IFiles[];
17
+ }
18
+ export interface IFiles {
19
+ key: string;
20
+ value: File;
21
+ name: string;
22
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ import { IPricingPlanEntity, Modify } from "../../@type";
2
+ export interface ICreatePricingPlanRequest {
3
+ effectiveFromDate: number;
4
+ effectiveToDate?: number;
5
+ basePrice: number;
6
+ billingCycle: IBillingCycle;
7
+ }
8
+ export interface IBillingCycle {
9
+ [key: string]: IBilling;
10
+ }
11
+ export interface IBilling {
12
+ noOfMonths: number;
13
+ discount: string;
14
+ name: string;
15
+ }
16
+ export interface ICreatePricingPlanResponse extends Modify<IPricingPlanEntity, {
17
+ createdOn: string;
18
+ updatedOn: string;
19
+ }> {
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { OrganizationStatus } from "../../@enum";
1
+ import { RegistrationStatus } from "../../@enum";
2
2
  import { IModifyEntity, IWithoutTokenRegistrationEntity } from "../../@type";
3
3
  export interface ICreateRegistrationResponse extends IModifyEntity<IWithoutTokenRegistrationEntity> {
4
4
  }
@@ -6,6 +6,6 @@ export interface ICreateRegistrationRequest {
6
6
  name: string;
7
7
  contact: string;
8
8
  email: string;
9
- status: OrganizationStatus;
9
+ status: RegistrationStatus;
10
10
  comments?: string;
11
11
  }
@@ -0,0 +1,7 @@
1
+ import { ISubscriptionEntity } from "../entity";
2
+ import { Modify } from "../modify.interface";
3
+ export interface ICreateSubscriptionResponse extends Modify<ISubscriptionEntity, {
4
+ createdOn: string;
5
+ updatedOn: string;
6
+ }> {
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { IBankDetailEntity } from "../entity";
2
+ import { Modify } from "../modify.interface";
3
+ export interface IGetBankDetailsEntitiesResponse extends Modify<IBankDetailEntity, {
4
+ createdOn: string;
5
+ updatedOn: string;
6
+ }> {
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ export interface IGetPricingPlanByDateResponse {
2
+ id: number;
3
+ effectiveFromDate: number;
4
+ effectiveToDate: number;
5
+ basePrice: number;
6
+ billingCycle: {
7
+ [key: string]: {
8
+ noOfMonths: number;
9
+ discount: string;
10
+ name: string;
11
+ key: string;
12
+ };
13
+ };
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { IModifyEntity, IOrganizationEntity, IRegistrationEntity, ISubscriptionEntity, IUserEntityWithoutPassword } from "../../@type";
2
+ export interface IOrganizationWithOwners extends IModifyEntity<IOrganizationEntity> {
3
+ owners: {
4
+ [userId: string]: IModifyEntity<IUserEntityWithoutPassword>;
5
+ };
6
+ }
7
+ export interface IGetRegistrationById {
8
+ registration: IRegistrationEntity;
9
+ organization: {
10
+ [id: string]: IOrganizationWithOwners;
11
+ };
12
+ subscription: {
13
+ [id: string]: IModifyEntity<ISubscriptionEntity>;
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { IModifyEntity, IOrganizationWithOwners, IRegistrationEntity, ISubscriptionEntity } from "../../@type";
2
+ export interface IGetRegistrationResponse {
3
+ [registrationId: string]: {
4
+ registration: IRegistrationEntity;
5
+ organization: {
6
+ [id: string]: IOrganizationWithOwners;
7
+ };
8
+ subscription: {
9
+ [id: string]: IModifyEntity<ISubscriptionEntity>;
10
+ };
11
+ };
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,17 @@
1
1
  export * from "./update-organization.interface";
2
2
  export * from "./create-registration.interface";
3
3
  export * from "./update-organization.interface";
4
+ export * from "./create-bank-details.interface";
5
+ export * from "./create-pricing-plan.interface";
6
+ export * from "./create-subscription.interface";
7
+ export * from "./remove-pricing-plan-by-id.interface";
8
+ export * from "./update-bank-details.interface";
9
+ export * from "./update-pricing-plan.interface";
10
+ export * from "./update-subscription.interface";
11
+ export * from "./get-pricing-plan-by-date.interface";
12
+ export * from "./get-bank-details.interface";
13
+ export * from "./get-registration-by-id.interface";
14
+ export * from "./get-registration-with-organization-owners.interface";
15
+ export * from "./remove-bank-details-by-id.interface";
16
+ export * from "./update-pricing-plan-by-id.interface";
17
+ export * from "./login.interface";
@@ -17,3 +17,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./update-organization.interface"), exports);
18
18
  __exportStar(require("./create-registration.interface"), exports);
19
19
  __exportStar(require("./update-organization.interface"), exports);
20
+ __exportStar(require("./create-bank-details.interface"), exports);
21
+ __exportStar(require("./create-pricing-plan.interface"), exports);
22
+ __exportStar(require("./create-subscription.interface"), exports);
23
+ __exportStar(require("./remove-pricing-plan-by-id.interface"), exports);
24
+ __exportStar(require("./update-bank-details.interface"), exports);
25
+ __exportStar(require("./update-pricing-plan.interface"), exports);
26
+ __exportStar(require("./update-subscription.interface"), exports);
27
+ __exportStar(require("./get-pricing-plan-by-date.interface"), exports);
28
+ __exportStar(require("./get-bank-details.interface"), exports);
29
+ __exportStar(require("./get-registration-by-id.interface"), exports);
30
+ __exportStar(require("./get-registration-with-organization-owners.interface"), exports);
31
+ __exportStar(require("./remove-bank-details-by-id.interface"), exports);
32
+ __exportStar(require("./update-pricing-plan-by-id.interface"), exports);
33
+ __exportStar(require("./login.interface"), exports);
@@ -0,0 +1,22 @@
1
+ export interface ILoginResponse {
2
+ UIMessage: string;
3
+ tokenType: string;
4
+ accessToken: string;
5
+ id: string;
6
+ firstname: string;
7
+ status: string;
8
+ requireNewPassword: boolean;
9
+ userId: number;
10
+ role: string;
11
+ email: string | null;
12
+ imageUrl: string | null;
13
+ userPermissions: string[];
14
+ registrationId: number;
15
+ organizationId: number;
16
+ subscriptionStatus: string | null;
17
+ contact: string;
18
+ }
19
+ export interface ILoginRequest {
20
+ username: string;
21
+ password: string;
22
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { IBankDetailEntity } from "../entity";
2
+ import { Modify } from "../modify.interface";
3
+ export interface IRemoveBankDetailsById extends Modify<IBankDetailEntity, {
4
+ createdOn: string;
5
+ updatedOn: string;
6
+ }> {
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { IPricingPlanEntity, Modify } from "../../@type";
2
+ export interface IRemovePricingPlanById extends Modify<IPricingPlanEntity, {
3
+ createdOn: string;
4
+ updatedOn: string;
5
+ }> {
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { IBankDetailEntity, IUploadedMulterFile, Modify } from "../../@type";
2
+ import { IFiles } from "./create-bank-details.interface";
3
+ export interface IUpdateBankDetailResponse extends Modify<IBankDetailEntity, {
4
+ createdOn: string;
5
+ updatedOn: string;
6
+ }> {
7
+ }
8
+ export interface IUpdateBankDetailRequest {
9
+ qrCode?: IUploadedMulterFile;
10
+ bankName?: string;
11
+ accountName?: string;
12
+ accountNo?: string;
13
+ ifscCode?: string;
14
+ upiId?: string;
15
+ bankAddress?: string;
16
+ branch?: string;
17
+ files: IFiles[];
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { IPricingPlanEntity } from "../entity";
2
+ import { Modify } from "../modify.interface";
3
+ export interface IUpdatePricingPlanByIdResponse extends Modify<IPricingPlanEntity, {
4
+ createdOn: string;
5
+ updatedOn: string;
6
+ }> {
7
+ }
8
+ export interface IUpdatePricingPlanByIdRequest {
9
+ effectiveFromDate?: number;
10
+ effectiveToDate?: number;
11
+ basePrice?: number;
12
+ billingCycle?: IBillingCycleDto;
13
+ }
14
+ export interface IBillingCycleDto {
15
+ noOfMonths: number;
16
+ discount: string;
17
+ name: string;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { IPricingPlanEntity, Modify } from "../../@type";
2
+ import { IBillingCycle } from "./create-pricing-plan.interface";
3
+ export interface IUpdatePricingPlanRequest {
4
+ effectiveFromDate?: number;
5
+ effectiveToDate?: number;
6
+ basePrice?: number;
7
+ billingCycle?: IBillingCycle;
8
+ }
9
+ export interface IUpdatePricingPlanResponse extends Modify<IPricingPlanEntity, {
10
+ createdOn: string;
11
+ updatedOn: string;
12
+ }> {
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { ISubscriptionEntity, Modify } from "../../@type";
2
+ export interface IUpdateSubscriptionResponse extends Modify<ISubscriptionEntity, {
3
+ createdOn: string;
4
+ updatedOn: string;
5
+ }> {
6
+ advanceAmount?: number;
7
+ }
8
+ export interface IUpdateSubscriptionRequest {
9
+ advanceAmount?: number;
10
+ remarks?: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export type IAppBadRequestException = {
2
+ key: string;
3
+ message: string[];
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.interface";
2
+ export interface IBankDetailEntity extends IEntityAuditColumn {
3
+ id: number;
4
+ bankName: string;
5
+ accountNo: string;
6
+ ifscCode: string;
7
+ upiId: string;
8
+ qrCode: string | null;
9
+ bankAddress: string;
10
+ branch: string;
11
+ accountName: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,3 +2,6 @@ export * from "./entity-audit-column.interface";
2
2
  export * from "./organization-entity.interface";
3
3
  export * from "./user-entity.interface";
4
4
  export * from "./registration-entity";
5
+ export * from "./bank-details-entity.interface";
6
+ export * from "./pricing-plan-entity.interface";
7
+ export * from "./subscription-entity.interface";
@@ -18,3 +18,6 @@ __exportStar(require("./entity-audit-column.interface"), exports);
18
18
  __exportStar(require("./organization-entity.interface"), exports);
19
19
  __exportStar(require("./user-entity.interface"), exports);
20
20
  __exportStar(require("./registration-entity"), exports);
21
+ __exportStar(require("./bank-details-entity.interface"), exports);
22
+ __exportStar(require("./pricing-plan-entity.interface"), exports);
23
+ __exportStar(require("./subscription-entity.interface"), exports);
@@ -0,0 +1,10 @@
1
+ import { PricingPlanStatus } from "../../@enum";
2
+ import { IEntityAuditColumn } from "./entity-audit-column.interface";
3
+ export interface IPricingPlanEntity extends IEntityAuditColumn {
4
+ id: number;
5
+ effectiveFrom: number;
6
+ effectiveTo: number;
7
+ status: PricingPlanStatus;
8
+ basePrice: number;
9
+ billingCycle: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { SubscriptionStatus } from "../../@enum";
2
+ import { IEntityAuditColumn } from "./entity-audit-column.interface";
3
+ export interface ISubscriptionEntity extends IEntityAuditColumn {
4
+ id: number;
5
+ fromDateCode: number;
6
+ toDateCode: number;
7
+ organizationId: number;
8
+ type: string;
9
+ grossAmount: number;
10
+ discount: string;
11
+ netAmount: number;
12
+ amountPaid: number;
13
+ status: SubscriptionStatus;
14
+ remarks: string;
15
+ registrationId: number;
16
+ pricingPlanId: number;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface IKeyValue<T> {
2
+ [key: string]: T;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IUserEntity } from "./entity";
2
+ export interface IUserEntityWithoutPassword extends Omit<IUserEntity, "password"> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,65 @@
1
+ import { PricingPlanStatus } from "../@enum";
2
+ import { IGetPricingPlanByDateResponse, IPricingPlanEntity } from "../@type";
3
+ export declare class PricingPlanEntityModel {
4
+ id: number;
5
+ effectiveFrom: number;
6
+ effectiveTo: number;
7
+ status: PricingPlanStatus;
8
+ createdBy: number;
9
+ createdOn: Date;
10
+ updatedBy: number;
11
+ updatedOn: Date;
12
+ basePrice: number;
13
+ billingCycle: string;
14
+ constructor(data: IPricingPlanEntity);
15
+ toObject(): IGetPricingPlanByDateResponse;
16
+ }
17
+ export declare class BillingCycleModel {
18
+ code: string;
19
+ noOfMonths: number;
20
+ discount: string;
21
+ name: string;
22
+ key: string;
23
+ constructor(code: string);
24
+ parse(): BillingCycleModel;
25
+ getDiscount(): number;
26
+ getKey(): string;
27
+ }
28
+ export interface IPricingPlanModel {
29
+ id: number;
30
+ effectiveFromDate: number;
31
+ effectiveToDate: number;
32
+ basePrice: number;
33
+ billingCycle: {
34
+ [key: string]: {
35
+ noOfMonths: number;
36
+ discount: string;
37
+ name: string;
38
+ key: string;
39
+ };
40
+ };
41
+ }
42
+ export declare class PricingPlanModel implements IPricingPlanModel {
43
+ id: number;
44
+ effectiveFromDate: number;
45
+ effectiveToDate: number;
46
+ basePrice: number;
47
+ billingCycle: {
48
+ [key: string]: {
49
+ noOfMonths: number;
50
+ discount: string;
51
+ name: string;
52
+ key: string;
53
+ };
54
+ };
55
+ constructor(data: IGetPricingPlanByDateResponse);
56
+ getBillingCycleKeys(): string[];
57
+ getNoOfSubscriptionDays(type: string): number;
58
+ getBillCycleByKey(type: string): {
59
+ noOfMonths: number;
60
+ discount: string;
61
+ name: string;
62
+ key: string;
63
+ };
64
+ validateBillingCycleKey(key: string): void;
65
+ }
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PricingPlanModel = exports.BillingCycleModel = exports.PricingPlanEntityModel = void 0;
4
+ var app_badrequest_exception_1 = require("../exception/app-badrequest.exception");
5
+ var PricingPlanEntityModel = /** @class */ (function () {
6
+ function PricingPlanEntityModel(data) {
7
+ Object.assign(this, data);
8
+ }
9
+ PricingPlanEntityModel.prototype.toObject = function () {
10
+ var responseObj = {
11
+ id: this.id,
12
+ effectiveFromDate: 0,
13
+ effectiveToDate: 0,
14
+ basePrice: 0,
15
+ billingCycle: {},
16
+ };
17
+ var billingCycle = this.billingCycle.split(",");
18
+ billingCycle.forEach(function (billing, index) {
19
+ var billingArray = billing.split("_");
20
+ responseObj.billingCycle[index] = {
21
+ noOfMonths: Number(billingArray[0]),
22
+ discount: billingArray[1],
23
+ name: billingArray.slice(2).join("_"),
24
+ key: billingArray.slice(2).join("-").toLowerCase().replace(/ /g, "-"),
25
+ };
26
+ });
27
+ responseObj.effectiveFromDate = this.effectiveFrom;
28
+ responseObj.effectiveToDate = this.effectiveTo;
29
+ responseObj.basePrice = this.basePrice;
30
+ return responseObj;
31
+ };
32
+ return PricingPlanEntityModel;
33
+ }());
34
+ exports.PricingPlanEntityModel = PricingPlanEntityModel;
35
+ var BillingCycleModel = /** @class */ (function () {
36
+ function BillingCycleModel(code) {
37
+ this.code = code;
38
+ this.parse();
39
+ }
40
+ BillingCycleModel.prototype.parse = function () {
41
+ var billingCycleComponents = this.code.split("_");
42
+ this.noOfMonths = Number(billingCycleComponents[0]);
43
+ this.discount = billingCycleComponents[1];
44
+ this.name = billingCycleComponents[2];
45
+ this.key = this.getKey();
46
+ return this;
47
+ };
48
+ BillingCycleModel.prototype.getDiscount = function () {
49
+ if (this.discount.indexOf("P") > -1) {
50
+ return parseFloat(this.discount.replace("P", ""));
51
+ }
52
+ return 0;
53
+ };
54
+ BillingCycleModel.prototype.getKey = function () {
55
+ return this.name.toLowerCase().replace(" ", "-");
56
+ };
57
+ return BillingCycleModel;
58
+ }());
59
+ exports.BillingCycleModel = BillingCycleModel;
60
+ var PricingPlanModel = /** @class */ (function () {
61
+ function PricingPlanModel(data) {
62
+ Object.assign(this, data);
63
+ }
64
+ PricingPlanModel.prototype.getBillingCycleKeys = function () {
65
+ return Object.values(this.billingCycle).map(function (billingCycleObj) { return billingCycleObj.key; });
66
+ };
67
+ PricingPlanModel.prototype.getNoOfSubscriptionDays = function (type) {
68
+ var billingCycleModel = this.getBillCycleByKey(type);
69
+ return billingCycleModel.noOfMonths * 30 - 1;
70
+ };
71
+ PricingPlanModel.prototype.getBillCycleByKey = function (type) {
72
+ return Object.values(this.billingCycle).filter(function (billingCycleObj) { return billingCycleObj.key === type; })[0];
73
+ };
74
+ PricingPlanModel.prototype.validateBillingCycleKey = function (key) {
75
+ if (!this.getBillingCycleKeys().includes(key)) {
76
+ throw new app_badrequest_exception_1.AppBadRequestException({
77
+ key: "type",
78
+ message: [
79
+ "subscription with type:'".concat(key, "' is wrong,type should be one of the ").concat(this.getBillingCycleKeys()),
80
+ ],
81
+ });
82
+ }
83
+ };
84
+ return PricingPlanModel;
85
+ }());
86
+ exports.PricingPlanModel = PricingPlanModel;
@@ -0,0 +1,20 @@
1
+ import { PricingPlanModel } from "./pricing-plan-entity-model";
2
+ export declare class SubscribedPricingPlanModel extends PricingPlanModel {
3
+ billingCycleKey: string;
4
+ selectedBillingCycle: {
5
+ noOfMonths: number;
6
+ discount: string;
7
+ name: string;
8
+ key: string;
9
+ };
10
+ selectedPitchSlabBasePrice: number;
11
+ constructor(data: PricingPlanModel, billingCycleKey: string);
12
+ getBasePrice(): number;
13
+ getGrossAmount(config?: {
14
+ roundDown: boolean;
15
+ }): number;
16
+ getNetAmount(config?: {
17
+ roundDown: boolean;
18
+ }): number;
19
+ getBillingDiscount(): number;
20
+ }
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.SubscribedPricingPlanModel = void 0;
19
+ var pricing_plan_entity_model_1 = require("./pricing-plan-entity-model");
20
+ var SubscribedPricingPlanModel = /** @class */ (function (_super) {
21
+ __extends(SubscribedPricingPlanModel, _super);
22
+ function SubscribedPricingPlanModel(data, billingCycleKey) {
23
+ var _this = _super.call(this, data) || this;
24
+ _this.billingCycleKey = billingCycleKey;
25
+ _this.selectedBillingCycle = data.getBillCycleByKey(billingCycleKey);
26
+ return _this;
27
+ }
28
+ SubscribedPricingPlanModel.prototype.getBasePrice = function () {
29
+ return this.selectedPitchSlabBasePrice;
30
+ };
31
+ SubscribedPricingPlanModel.prototype.getGrossAmount = function (config) {
32
+ if (config === void 0) { config = { roundDown: false }; }
33
+ var roundDown = config.roundDown;
34
+ if (roundDown) {
35
+ return Math.floor(this.basePrice * this.selectedBillingCycle.noOfMonths);
36
+ }
37
+ else {
38
+ return Math.round(this.basePrice * this.selectedBillingCycle.noOfMonths);
39
+ }
40
+ };
41
+ SubscribedPricingPlanModel.prototype.getNetAmount = function (config) {
42
+ if (config === void 0) { config = { roundDown: false }; }
43
+ var roundDown = config.roundDown;
44
+ if (roundDown) {
45
+ return Math.floor(this.basePrice *
46
+ (1 - this.getBillingDiscount() / 100) *
47
+ this.selectedBillingCycle.noOfMonths);
48
+ }
49
+ else {
50
+ return Math.round(this.basePrice *
51
+ (1 - this.getBillingDiscount() / 100) *
52
+ this.selectedBillingCycle.noOfMonths);
53
+ }
54
+ };
55
+ SubscribedPricingPlanModel.prototype.getBillingDiscount = function () {
56
+ if (this.selectedBillingCycle.discount.indexOf("P") > -1) {
57
+ return parseFloat(this.selectedBillingCycle.discount.replace("P", ""));
58
+ }
59
+ return 0;
60
+ };
61
+ return SubscribedPricingPlanModel;
62
+ }(pricing_plan_entity_model_1.PricingPlanModel));
63
+ exports.SubscribedPricingPlanModel = SubscribedPricingPlanModel;
@@ -0,0 +1,8 @@
1
+ export declare class DateUtil {
2
+ static isValidDate(dateCode: string): boolean;
3
+ getDateCode(date: Date): string;
4
+ convertStringToDate(dateString: string, format?: string): Date;
5
+ addNDaysToDate(date: Date, n: number): Date;
6
+ addNDaysToDateCode(dateCode: string, n: number): string;
7
+ }
8
+ export declare const dateUtil: DateUtil;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dateUtil = exports.DateUtil = void 0;
4
+ var date_fns_1 = require("date-fns");
5
+ var DateUtil = /** @class */ (function () {
6
+ function DateUtil() {
7
+ }
8
+ DateUtil.isValidDate = function (dateCode) {
9
+ if (dateCode.length !== 6)
10
+ return false;
11
+ // Date format: YYMMDD
12
+ function isDate(dateString) {
13
+ var separators = ["\\.", "\\-", "\\/"];
14
+ var stringBits = dateString.split(new RegExp(separators.join("|"), "g"));
15
+ var intBits = stringBits.map(function (bit) { return parseInt(bit); });
16
+ var parsedDate = new Date(intBits[0], intBits[1] - 1, intBits[2]);
17
+ return (parsedDate.getFullYear() === intBits[0] &&
18
+ parsedDate.getMonth() + 1 === intBits[1] &&
19
+ parsedDate.getDate() === intBits[2]);
20
+ }
21
+ return isDate("20".concat(dateCode.slice(0, 2), ".").concat(dateCode.slice(2, 4), ".").concat(dateCode.slice(4, 6)));
22
+ };
23
+ DateUtil.prototype.getDateCode = function (date) {
24
+ return (0, date_fns_1.format)(date, "yyMMdd");
25
+ };
26
+ DateUtil.prototype.convertStringToDate = function (dateString, format) {
27
+ if (format === void 0) { format = "yyMMdd"; }
28
+ var parsedDate = (0, date_fns_1.parse)(dateString, format, new Date());
29
+ // IST has a fixed offset of UTC+5:30
30
+ var indianDate = new Date(parsedDate.getTime() + 330 * 60 * 1000);
31
+ return indianDate;
32
+ };
33
+ DateUtil.prototype.addNDaysToDate = function (date, n) {
34
+ return (0, date_fns_1.add)(date, { days: n });
35
+ };
36
+ DateUtil.prototype.addNDaysToDateCode = function (dateCode, n) {
37
+ return this.getDateCode(this.addNDaysToDate(this.convertStringToDate(dateCode, "yyMMdd"), n));
38
+ };
39
+ return DateUtil;
40
+ }());
41
+ exports.DateUtil = DateUtil;
42
+ exports.dateUtil = new DateUtil();
@@ -0,0 +1,19 @@
1
+ import { IModifyEntity, Modify } from "../@type";
2
+ import { IKeyValue } from "../interface/key-value.interface";
3
+ export declare function ConvertCommonEntries<T extends {
4
+ createdOn: Date;
5
+ updatedOn: Date;
6
+ }>(inputObject: {
7
+ [key: string]: T;
8
+ }): IKeyValue<IModifyEntity<T>>;
9
+ export declare function ConvertToCommonEntities<T extends {
10
+ createdOn: Date;
11
+ updatedOn: Date;
12
+ }>(inputObject: T[]): IModifyEntity<T>[];
13
+ export declare function ConvertToCommonEntity<T extends {
14
+ createdOn: Date;
15
+ updatedOn: Date;
16
+ }, R extends Modify<T, {
17
+ createdOn: string;
18
+ updatedOn: string;
19
+ }>>(obj: T): R;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ConvertToCommonEntity = exports.ConvertToCommonEntities = exports.ConvertCommonEntries = void 0;
26
+ //key - value converter
27
+ function ConvertCommonEntries(inputObject) {
28
+ return Object.entries(inputObject).reduce(function (acc, _a) {
29
+ var key = _a[0], value = _a[1];
30
+ acc[key] = ConvertToCommonEntity(value);
31
+ return acc;
32
+ }, {});
33
+ }
34
+ exports.ConvertCommonEntries = ConvertCommonEntries;
35
+ function ConvertToCommonEntities(inputObject) {
36
+ return inputObject.reduce(function (acc, value) {
37
+ var modifiedEntity = ConvertToCommonEntity(value);
38
+ acc.push(modifiedEntity);
39
+ return acc;
40
+ }, []);
41
+ }
42
+ exports.ConvertToCommonEntities = ConvertToCommonEntities;
43
+ function ConvertToCommonEntity(obj) {
44
+ var _a, _b;
45
+ var _ = obj.createdOn, __ = obj.updatedOn, objectToAssign = __rest(obj, ["createdOn", "updatedOn"]);
46
+ return __assign({ createdOn: (_a = obj.createdOn) === null || _a === void 0 ? void 0 : _a.toISOString(), updatedOn: (_b = obj.updatedOn) === null || _b === void 0 ? void 0 : _b.toISOString() }, objectToAssign);
47
+ }
48
+ exports.ConvertToCommonEntity = ConvertToCommonEntity;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ia-common",
3
- "version": "1.0.1-beta.2",
3
+ "version": "1.0.1-beta.20",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -30,5 +30,8 @@
30
30
  "del-cli": "^5.1.0",
31
31
  "eslint": "^8.56.0",
32
32
  "typescript": "^5.3.3"
33
+ },
34
+ "dependencies": {
35
+ "date-fns": "^3.3.1"
33
36
  }
34
37
  }