plac-micro-common 1.3.60 → 1.3.61

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.
@@ -0,0 +1,10 @@
1
+ import { ExchangeRateSourceType, ExchangeRateSyncStatus } from "../../../types";
2
+ import { _BaseEntity } from "../../_base_entity";
3
+ export declare class ExchangeRateSyncLogEntity extends _BaseEntity {
4
+ id: string;
5
+ source: ExchangeRateSourceType;
6
+ status: ExchangeRateSyncStatus;
7
+ synced_at: Date;
8
+ raw_response?: Record<string, any> | null;
9
+ error_message?: string | null;
10
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ExchangeRateSyncLogEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const types_1 = require("../../../types");
15
+ const utils_1 = require("../../../utils");
16
+ const _base_entity_1 = require("../../_base_entity");
17
+ let ExchangeRateSyncLogEntity = class ExchangeRateSyncLogEntity extends _base_entity_1._BaseEntity {
18
+ };
19
+ exports.ExchangeRateSyncLogEntity = ExchangeRateSyncLogEntity;
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
22
+ __metadata("design:type", String)
23
+ ], ExchangeRateSyncLogEntity.prototype, "id", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.Column)({
26
+ type: "varchar",
27
+ length: 20,
28
+ comment: (0, utils_1.enumToCommentString)(types_1.ExchangeRateSourceType),
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], ExchangeRateSyncLogEntity.prototype, "source", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({
34
+ type: "varchar",
35
+ length: 20,
36
+ comment: (0, utils_1.enumToCommentString)(types_1.ExchangeRateSyncStatus),
37
+ }),
38
+ __metadata("design:type", String)
39
+ ], ExchangeRateSyncLogEntity.prototype, "status", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: "timestamptz" }),
42
+ __metadata("design:type", Date)
43
+ ], ExchangeRateSyncLogEntity.prototype, "synced_at", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], ExchangeRateSyncLogEntity.prototype, "raw_response", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: "varchar", length: 1000, nullable: true }),
50
+ __metadata("design:type", Object)
51
+ ], ExchangeRateSyncLogEntity.prototype, "error_message", void 0);
52
+ exports.ExchangeRateSyncLogEntity = ExchangeRateSyncLogEntity = __decorate([
53
+ (0, typeorm_1.Entity)({ schema: "core", name: "exchange_rate_sync_logs" }),
54
+ (0, typeorm_1.Index)("ix_exchange_rate_sync_logs_source", ["source"]),
55
+ (0, typeorm_1.Index)("ix_exchange_rate_sync_logs_synced_at", ["synced_at"]),
56
+ (0, typeorm_1.Index)("ix_exchange_rate_sync_logs_status", ["status"])
57
+ ], ExchangeRateSyncLogEntity);
@@ -1,4 +1,5 @@
1
1
  import { ExchangeRateEntity } from "./exchange_rate.entity";
2
2
  import { ExchangeRateLogEntity } from "./exchange_rate_log.entity";
3
- export declare const FINANCE_ENTITIES: readonly [typeof ExchangeRateEntity, typeof ExchangeRateLogEntity];
4
- export { ExchangeRateEntity, ExchangeRateLogEntity };
3
+ import { ExchangeRateSyncLogEntity } from "./exchange_rate_sync_log.entity";
4
+ export declare const FINANCE_ENTITIES: readonly [typeof ExchangeRateEntity, typeof ExchangeRateLogEntity, typeof ExchangeRateSyncLogEntity];
5
+ export { ExchangeRateEntity, ExchangeRateLogEntity, ExchangeRateSyncLogEntity };
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExchangeRateLogEntity = exports.ExchangeRateEntity = exports.FINANCE_ENTITIES = void 0;
3
+ exports.ExchangeRateSyncLogEntity = exports.ExchangeRateLogEntity = exports.ExchangeRateEntity = exports.FINANCE_ENTITIES = void 0;
4
4
  const exchange_rate_entity_1 = require("./exchange_rate.entity");
5
5
  Object.defineProperty(exports, "ExchangeRateEntity", { enumerable: true, get: function () { return exchange_rate_entity_1.ExchangeRateEntity; } });
6
6
  const exchange_rate_log_entity_1 = require("./exchange_rate_log.entity");
7
7
  Object.defineProperty(exports, "ExchangeRateLogEntity", { enumerable: true, get: function () { return exchange_rate_log_entity_1.ExchangeRateLogEntity; } });
8
+ const exchange_rate_sync_log_entity_1 = require("./exchange_rate_sync_log.entity");
9
+ Object.defineProperty(exports, "ExchangeRateSyncLogEntity", { enumerable: true, get: function () { return exchange_rate_sync_log_entity_1.ExchangeRateSyncLogEntity; } });
8
10
  exports.FINANCE_ENTITIES = [
9
11
  exchange_rate_entity_1.ExchangeRateEntity,
10
12
  exchange_rate_log_entity_1.ExchangeRateLogEntity,
13
+ exchange_rate_sync_log_entity_1.ExchangeRateSyncLogEntity,
11
14
  ];
@@ -18,7 +18,7 @@ import { RelationshipEntity } from "./relationship.entity";
18
18
  import { StaffEntity } from "./staffs.entity";
19
19
  import { PaymentMethodEntity } from "./payment_method.entity";
20
20
  import { OrgReferralEntity } from "./org_referral.entity";
21
- export declare const CORE_ENTITIES: readonly [typeof GeoProvinceEntity, typeof GeoDistrictEntity, typeof GeoCommuneEntity, typeof GeoVillageEntity, typeof MaritalStatusEntity, typeof NationalityEntity, typeof NumberSeriesEntity, typeof OrganizationEntity, typeof OrganizationBranchEntity, typeof OrganizationChannelEntity, typeof OrganizationDepartmentEntity, typeof OrganizationPositionEntity, typeof OrganizationStaffEntity, typeof OrganizationStaffBranchEntity, typeof OrganizationStaffReportingLineEntity, typeof OrgReferralEntity, typeof OccupationEntity, typeof PaymentMethodEntity, typeof RelationshipEntity, typeof StaffEntity, typeof import("./product").CashValueEntity, typeof import("./product").PaymentModeEntity, typeof import("./product").PremiumRateConditionEntity, typeof import("./product").PremiumRateValueEntity, typeof import("./product").ProductEntity, typeof import("./product").ProductOrgEntity, typeof import("./product").ProductTypeEntity, typeof import("./product").ProductPaymentModeEntity, typeof import("./product").ProductRiderEntity, typeof import("./product").ProductTermEntity, typeof import("./product").ProductPlanEntity, typeof import("./product").PromotionEntity, typeof import("./product").PromotionOrgEntity, typeof import("./product").PromotionProductEntity, typeof import("./product").RiderEntity, typeof import("./product").TermEntity, typeof import("./finance").ExchangeRateEntity, typeof import("./finance").ExchangeRateLogEntity];
21
+ export declare const CORE_ENTITIES: readonly [typeof GeoProvinceEntity, typeof GeoDistrictEntity, typeof GeoCommuneEntity, typeof GeoVillageEntity, typeof MaritalStatusEntity, typeof NationalityEntity, typeof NumberSeriesEntity, typeof OrganizationEntity, typeof OrganizationBranchEntity, typeof OrganizationChannelEntity, typeof OrganizationDepartmentEntity, typeof OrganizationPositionEntity, typeof OrganizationStaffEntity, typeof OrganizationStaffBranchEntity, typeof OrganizationStaffReportingLineEntity, typeof OrgReferralEntity, typeof OccupationEntity, typeof PaymentMethodEntity, typeof RelationshipEntity, typeof StaffEntity, typeof import("./product").CashValueEntity, typeof import("./product").PaymentModeEntity, typeof import("./product").PremiumRateConditionEntity, typeof import("./product").PremiumRateValueEntity, typeof import("./product").ProductEntity, typeof import("./product").ProductOrgEntity, typeof import("./product").ProductTypeEntity, typeof import("./product").ProductPaymentModeEntity, typeof import("./product").ProductRiderEntity, typeof import("./product").ProductTermEntity, typeof import("./product").ProductPlanEntity, typeof import("./product").PromotionEntity, typeof import("./product").PromotionOrgEntity, typeof import("./product").PromotionProductEntity, typeof import("./product").RiderEntity, typeof import("./product").TermEntity, typeof import("./finance").ExchangeRateEntity, typeof import("./finance").ExchangeRateLogEntity, typeof import("./finance").ExchangeRateSyncLogEntity];
22
22
  export { GeoProvinceEntity, GeoDistrictEntity, GeoCommuneEntity, GeoVillageEntity, MaritalStatusEntity, NationalityEntity, NumberSeriesEntity, OrganizationEntity, OrganizationBranchEntity, OrganizationChannelEntity, OrganizationDepartmentEntity, OrganizationPositionEntity, OrganizationStaffEntity, OrganizationStaffBranchEntity, OrganizationStaffReportingLineEntity, OrgReferralEntity, OccupationEntity, PaymentMethodEntity, RelationshipEntity, StaffEntity, };
23
23
  export * from "./product";
24
24
  export * from "./finance";
@@ -4,3 +4,7 @@ export declare enum ExchangeRateSourceType {
4
4
  NationalBank = "national_bank",
5
5
  System = "system"
6
6
  }
7
+ export declare enum ExchangeRateSyncStatus {
8
+ Success = "success",
9
+ Failed = "failed"
10
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExchangeRateSourceType = void 0;
3
+ exports.ExchangeRateSyncStatus = exports.ExchangeRateSourceType = void 0;
4
4
  var ExchangeRateSourceType;
5
5
  (function (ExchangeRateSourceType) {
6
6
  ExchangeRateSourceType["Manual"] = "manual";
@@ -8,3 +8,8 @@ var ExchangeRateSourceType;
8
8
  ExchangeRateSourceType["NationalBank"] = "national_bank";
9
9
  ExchangeRateSourceType["System"] = "system";
10
10
  })(ExchangeRateSourceType || (exports.ExchangeRateSourceType = ExchangeRateSourceType = {}));
11
+ var ExchangeRateSyncStatus;
12
+ (function (ExchangeRateSyncStatus) {
13
+ ExchangeRateSyncStatus["Success"] = "success";
14
+ ExchangeRateSyncStatus["Failed"] = "failed";
15
+ })(ExchangeRateSyncStatus || (exports.ExchangeRateSyncStatus = ExchangeRateSyncStatus = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plac-micro-common",
3
- "version": "1.3.60",
3
+ "version": "1.3.61",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {