@carlosdiazz/lottodiz-shared 3.3.9 → 3.4.0

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 (34) hide show
  1. package/dist/enum/index.d.ts +1 -1
  2. package/dist/enum/index.js +1 -1
  3. package/dist/enum/operation-type.enum.d.ts +14 -0
  4. package/dist/enum/operation-type.enum.js +19 -0
  5. package/dist/models/account_type/account-type.base.d.ts +3 -1
  6. package/dist/models/account_type/create-account-type.base.d.ts +6 -4
  7. package/dist/models/financial_transaction/financial_transaction.service.d.ts +19 -0
  8. package/dist/models/financial_transaction/financial_transaction.service.js +2 -0
  9. package/dist/models/financial_transaction/index.d.ts +1 -0
  10. package/dist/models/financial_transaction/index.js +17 -0
  11. package/dist/models/index.d.ts +2 -0
  12. package/dist/models/index.js +2 -0
  13. package/dist/models/leader_entries/create-leader_entries.base.d.ts +1 -7
  14. package/dist/models/leader_entries/leader_entries.base.d.ts +3 -7
  15. package/dist/models/leader_entries/params-leader_entries.base.d.ts +0 -2
  16. package/dist/models/operation/create-operation.base.d.ts +16 -0
  17. package/dist/models/operation/create-operation.base.js +2 -0
  18. package/dist/models/operation/index.d.ts +8 -0
  19. package/dist/models/operation/index.js +24 -0
  20. package/dist/models/operation/operation.base.d.ts +15 -0
  21. package/dist/models/operation/operation.base.js +2 -0
  22. package/dist/models/operation/operation.controller.d.ts +7 -0
  23. package/dist/models/operation/operation.controller.js +2 -0
  24. package/dist/models/operation/operation.datasource.d.ts +7 -0
  25. package/dist/models/operation/operation.datasource.js +2 -0
  26. package/dist/models/operation/operation.resolver.d.ts +8 -0
  27. package/dist/models/operation/operation.resolver.js +2 -0
  28. package/dist/models/operation/operation.service.d.ts +9 -0
  29. package/dist/models/operation/operation.service.js +2 -0
  30. package/dist/models/operation/params-operation.base.d.ts +11 -0
  31. package/dist/models/operation/params-operation.base.js +2 -0
  32. package/dist/models/operation/response-operation.base.d.ts +5 -0
  33. package/dist/models/operation/response-operation.base.js +2 -0
  34. package/package.json +1 -1
@@ -3,6 +3,6 @@ export * from "./method-obs";
3
3
  export * from "./method-valid";
4
4
  export * from "./permission-valid";
5
5
  export * from "./valid-job.enum";
6
- export * from "./transaction-type.enum";
6
+ export * from "./operation-type.enum";
7
7
  export * from "./ticket-status.enum";
8
8
  export * from "./wallet-mode.enum";
@@ -19,6 +19,6 @@ __exportStar(require("./method-obs"), exports);
19
19
  __exportStar(require("./method-valid"), exports);
20
20
  __exportStar(require("./permission-valid"), exports);
21
21
  __exportStar(require("./valid-job.enum"), exports);
22
- __exportStar(require("./transaction-type.enum"), exports);
22
+ __exportStar(require("./operation-type.enum"), exports);
23
23
  __exportStar(require("./ticket-status.enum"), exports);
24
24
  __exportStar(require("./wallet-mode.enum"), exports);
@@ -0,0 +1,14 @@
1
+ export declare enum OperationType {
2
+ TICKET_SALE = "TICKET_SALE",
3
+ PRIZE_PAYMENT = "PRIZE_PAYMENT",
4
+ RECHARGE = "RECHARGE",
5
+ WITHDRAWAL = "WITHDRAWAL",
6
+ TRANSFER_GROUP = "TRANSFER_GROUP",
7
+ TRANSFER_COMPANY = "TRANSFER_COMPANY"
8
+ }
9
+ export declare enum LeaderStatus {
10
+ PENDING = "PENDING",
11
+ CONFIRMED = "CONFIRMED",
12
+ REVERSED = "REVERSED",
13
+ CANCELLED = "CANCELLED"
14
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LeaderStatus = exports.OperationType = void 0;
4
+ var OperationType;
5
+ (function (OperationType) {
6
+ OperationType["TICKET_SALE"] = "TICKET_SALE";
7
+ OperationType["PRIZE_PAYMENT"] = "PRIZE_PAYMENT";
8
+ OperationType["RECHARGE"] = "RECHARGE";
9
+ OperationType["WITHDRAWAL"] = "WITHDRAWAL";
10
+ OperationType["TRANSFER_GROUP"] = "TRANSFER_GROUP";
11
+ OperationType["TRANSFER_COMPANY"] = "TRANSFER_COMPANY";
12
+ })(OperationType || (exports.OperationType = OperationType = {}));
13
+ var LeaderStatus;
14
+ (function (LeaderStatus) {
15
+ LeaderStatus["PENDING"] = "PENDING";
16
+ LeaderStatus["CONFIRMED"] = "CONFIRMED";
17
+ LeaderStatus["REVERSED"] = "REVERSED";
18
+ LeaderStatus["CANCELLED"] = "CANCELLED";
19
+ })(LeaderStatus || (exports.LeaderStatus = LeaderStatus = {}));
@@ -5,8 +5,10 @@ export interface AccountTypeInterface {
5
5
  code: string;
6
6
  description?: string;
7
7
  allows_negative_balance: boolean;
8
- requires_preload: boolean;
9
8
  allows_withdrawal: boolean;
9
+ allows_sale: boolean;
10
+ allows_prize: boolean;
11
+ allows_transfers: boolean;
10
12
  active: boolean;
11
13
  account?: AccountInterface[];
12
14
  create_at: Date;
@@ -1,9 +1,11 @@
1
1
  export interface CreateAccountTypeInterface {
2
2
  name: string;
3
3
  code: string;
4
- description?: string;
5
- allows_negative_balance?: boolean;
6
- requires_preload?: boolean;
7
- allows_withdrawal?: boolean;
4
+ description: string;
5
+ allows_negative_balance: boolean;
6
+ allows_sale: boolean;
7
+ allows_prize: boolean;
8
+ allows_transfers: boolean;
9
+ allows_withdrawal: boolean;
8
10
  active?: boolean;
9
11
  }
@@ -0,0 +1,19 @@
1
+ import { CompanyInterface } from "../company";
2
+ import { GroupInterface } from "../group";
3
+ import { PosInterface } from "../pos";
4
+ import { PosUserInterface } from "../pos_user";
5
+ import { CreateTicketDetailInterface, TicketInterface } from "../ticket";
6
+ export interface ProcessTicketSaleInterface {
7
+ details_ticket: CreateTicketDetailInterface[];
8
+ id_draw: number;
9
+ id_template_draw: number;
10
+ id_lottery: number;
11
+ id_country: number;
12
+ company: CompanyInterface;
13
+ group: GroupInterface;
14
+ pos: PosInterface;
15
+ pos_user: PosUserInterface;
16
+ }
17
+ export interface FinancialTransactionServiceInterface {
18
+ processTickeSale(dto: ProcessTicketSaleInterface): Promise<TicketInterface>;
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './financial_transaction.service';
@@ -0,0 +1,17 @@
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("./financial_transaction.service"), exports);
@@ -41,3 +41,5 @@ export * from "./leader_entries";
41
41
  export * from "./user";
42
42
  export * from "./webscraping";
43
43
  export * from "./youtube";
44
+ export * from "./operation";
45
+ export * from "./financial_transaction";
@@ -57,3 +57,5 @@ __exportStar(require("./leader_entries"), exports);
57
57
  __exportStar(require("./user"), exports);
58
58
  __exportStar(require("./webscraping"), exports);
59
59
  __exportStar(require("./youtube"), exports);
60
+ __exportStar(require("./operation"), exports);
61
+ __exportStar(require("./financial_transaction"), exports);
@@ -1,11 +1,5 @@
1
- import { TransactionType } from "../../enum";
2
1
  export interface CreateLeaderEntriesInterface {
3
2
  amount: number;
4
- transaction_type: TransactionType;
5
- id_company?: string;
6
- id_group?: string;
7
- id_pos?: string;
3
+ status: "CONFIRMED" | "REVERSED";
8
4
  description: string;
9
- reference_id: string;
10
- operator_id?: string;
11
5
  }
@@ -1,15 +1,11 @@
1
- import { TransactionType } from "../../enum";
1
+ import { OperationInterface } from "../operation";
2
2
  import { LeaderLinesInterface } from "./leader_lines.base";
3
3
  export interface LeaderEntriesInterface {
4
4
  id: string;
5
5
  sequence_number: number;
6
- transaction_type: TransactionType;
6
+ operation: OperationInterface;
7
7
  leader_lines: LeaderLinesInterface[];
8
- id_company?: string;
9
- id_group?: string;
10
- id_pos?: string;
8
+ status: "CONFIRMED" | "REVERSED";
11
9
  description: string;
12
- reference_id: string;
13
- operator_id?: string;
14
10
  create_at: Date;
15
11
  }
@@ -1,8 +1,6 @@
1
- import { TransactionType } from "../../enum";
2
1
  import { PaginationInterface } from "../common";
3
2
  export interface ParamsLeaderEntriesInterface extends PaginationInterface {
4
3
  offset: number;
5
4
  limit: number;
6
5
  active: boolean;
7
- transaction_type?: TransactionType;
8
6
  }
@@ -0,0 +1,16 @@
1
+ import { OperationType } from "../../enum";
2
+ import { LeaderEntriesInterface } from "../leader_entries";
3
+ export interface CreateOperationInterfcae {
4
+ id_company: string;
5
+ id_group: string;
6
+ id_pos: string;
7
+ id_pos_user?: string;
8
+ reference_type: string;
9
+ reference_id: string;
10
+ amount: string;
11
+ description: string;
12
+ type: OperationType;
13
+ leader_entries: LeaderEntriesInterface[];
14
+ status: "CONFIRMED" | "REVERSED";
15
+ create_at: Date;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export * from "./operation.base";
2
+ export * from "./create-operation.base";
3
+ export * from "./params-operation.base";
4
+ export * from "./response-operation.base";
5
+ export * from "./operation.controller";
6
+ export * from "./operation.service";
7
+ export * from "./operation.resolver";
8
+ export * from "./operation.datasource";
@@ -0,0 +1,24 @@
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("./operation.base"), exports);
18
+ __exportStar(require("./create-operation.base"), exports);
19
+ __exportStar(require("./params-operation.base"), exports);
20
+ __exportStar(require("./response-operation.base"), exports);
21
+ __exportStar(require("./operation.controller"), exports);
22
+ __exportStar(require("./operation.service"), exports);
23
+ __exportStar(require("./operation.resolver"), exports);
24
+ __exportStar(require("./operation.datasource"), exports);
@@ -0,0 +1,15 @@
1
+ import { OperationType } from "../../enum";
2
+ export interface OperationInterface {
3
+ id: string;
4
+ id_company: string;
5
+ id_group: string;
6
+ id_pos: string;
7
+ id_pos_user?: string;
8
+ reference_type: string;
9
+ reference_id: string;
10
+ amount: string;
11
+ description: string;
12
+ type: OperationType;
13
+ status: "CONFIRMED" | "REVERSED";
14
+ create_at: Date;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { OperationInterface } from "./operation.base";
2
+ import { ParamsOperationInterface } from "./params-operation.base";
3
+ import { ResponseOperationInterface } from "./response-operation.base";
4
+ export interface OperationControllerInterface {
5
+ findAll(pagination: ParamsOperationInterface): Promise<ResponseOperationInterface>;
6
+ findOne(id: string): Promise<OperationInterface>;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { OperationInterface } from "./operation.base";
2
+ import { ParamsOperationInterface } from "./params-operation.base";
3
+ import { ResponseOperationInterface } from "./response-operation.base";
4
+ export interface OperationDatasourceInterface {
5
+ findAll(pagination: ParamsOperationInterface): Promise<ResponseOperationInterface>;
6
+ findOne(id: string): Promise<OperationInterface>;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { UserInterface } from "../user";
2
+ import { OperationInterface } from "./operation.base";
3
+ import { ParamsOperationInterface } from "./params-operation.base";
4
+ import { ResponseOperationInterface } from "./response-operation.base";
5
+ export interface OperationResolverInterface {
6
+ findAll(pagination: ParamsOperationInterface, user?: UserInterface): Promise<ResponseOperationInterface>;
7
+ findOne(id: string, user?: UserInterface): Promise<OperationInterface>;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { CreateOperationInterfcae } from "./create-operation.base";
2
+ import { OperationInterface } from "./operation.base";
3
+ import { ParamsOperationInterface } from "./params-operation.base";
4
+ import { ResponseOperationInterface } from "./response-operation.base";
5
+ export interface OperationServiceInterface {
6
+ createOperation(dto: CreateOperationInterfcae): Promise<OperationInterface>;
7
+ findAll(pagination: ParamsOperationInterface): Promise<ResponseOperationInterface>;
8
+ findOne(id: string): Promise<OperationInterface>;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { OperationType } from "../../enum";
2
+ import { PaginationInterface } from "../common";
3
+ export interface ParamsOperationInterface extends PaginationInterface {
4
+ offset: number;
5
+ limit: number;
6
+ active: boolean;
7
+ type?: OperationType;
8
+ id_company?: string;
9
+ id_group?: string;
10
+ id_pos?: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { OperationInterface } from "./operation.base";
2
+ export interface ResponseOperationInterface {
3
+ items: OperationInterface[];
4
+ total: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carlosdiazz/lottodiz-shared",
3
- "version": "3.3.9",
3
+ "version": "3.4.0",
4
4
  "description": "Shared Dtos, models, constants and utils",
5
5
  "main": "dist/index.js",
6
6
  "private": false,