@win2win/shared 1.0.84 → 1.0.86

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,24 @@
1
+ import { Uuid } from "../shared";
2
+ export interface EstadoRule {
3
+ ID_ESTADO_RULE: string;
4
+ ID_ESTADO: string;
5
+ ID_FLAG: string;
6
+ OPERATOR: string;
7
+ VALUE_TYPE: RuleValueType;
8
+ VALUE: string;
9
+ CREATED_AT: Date;
10
+ UPDATED_AT: Date;
11
+ }
12
+ export declare const ESTADO_RULE_OPERATORS: readonly [">", "<", "=", "!=", ">=", "<=", "in", "not in", "like"];
13
+ export type EstadoRuleOperator = (typeof ESTADO_RULE_OPERATORS)[number];
14
+ export interface EstadoRuleModel {
15
+ id?: string;
16
+ idFlag: Uuid;
17
+ operator: EstadoRuleOperator;
18
+ valueType: RuleValueType;
19
+ value: any;
20
+ }
21
+ export declare enum RuleValueType {
22
+ CONST = "const",
23
+ FLAG = "flag"
24
+ }
@@ -1,11 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RuleValueType = exports.ESTADO_RULE_OPERATORS = exports.GamaFlagType = void 0;
4
- var GamaFlagType;
5
- (function (GamaFlagType) {
6
- GamaFlagType["FIELD"] = "field";
7
- GamaFlagType["QUERY"] = "query";
8
- })(GamaFlagType || (exports.GamaFlagType = GamaFlagType = {}));
3
+ exports.RuleValueType = exports.ESTADO_RULE_OPERATORS = void 0;
9
4
  exports.ESTADO_RULE_OPERATORS = [
10
5
  ">",
11
6
  "<",
@@ -0,0 +1,26 @@
1
+ import { Id, Uuid } from "../shared";
2
+ import { EstadoRuleModel } from "./estado-rule";
3
+ export interface Estado {
4
+ ID_ESTADO: Uuid;
5
+ ID_GAMA: number;
6
+ NAME: string;
7
+ COLOR?: string;
8
+ CODE: number;
9
+ ROOT_OPERATOR: JoinOperator;
10
+ DESCRIPTION?: string;
11
+ ICON?: string;
12
+ CREATED_AT: Date;
13
+ UPDATED_AT: Date;
14
+ }
15
+ export interface EstadoModel {
16
+ id?: string;
17
+ idGama: Id | null;
18
+ name: string;
19
+ code: number | null;
20
+ color: string;
21
+ icon: string;
22
+ description: string;
23
+ rules: EstadoRuleModel[];
24
+ rootOperator: JoinOperator;
25
+ }
26
+ export type JoinOperator = "AND" | "OR";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { Id, Uuid } from "../shared";
2
+ export interface Flag {
3
+ ID_FLAG: Uuid;
4
+ ID_GAMA: Id;
5
+ NAME: string;
6
+ DESCRIPTION: string;
7
+ TYPE: 'field' | 'query';
8
+ VALUE: string;
9
+ CREATED_AT: Date;
10
+ UPDATED_AT: Date;
11
+ }
12
+ export interface FlagModel {
13
+ id?: string;
14
+ idGama: Id | null;
15
+ name: string;
16
+ type: FlagType;
17
+ value?: string;
18
+ description: string;
19
+ }
20
+ export declare enum FlagType {
21
+ FIELD = "field",
22
+ QUERY = "query"
23
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlagType = void 0;
4
+ var FlagType;
5
+ (function (FlagType) {
6
+ FlagType["FIELD"] = "field";
7
+ FlagType["QUERY"] = "query";
8
+ })(FlagType || (exports.FlagType = FlagType = {}));
@@ -1 +1,3 @@
1
- export * from './estados';
1
+ export * from './estado';
2
+ export * from './estado-rule';
3
+ export * from './flag';
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./estados"), exports);
17
+ __exportStar(require("./estado"), exports);
18
+ __exportStar(require("./estado-rule"), exports);
19
+ __exportStar(require("./flag"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@win2win/shared",
3
- "version": "1.0.84",
3
+ "version": "1.0.86",
4
4
  "description": "Tipos, interfaces, funciones, constantes, clases y enums compartidos por todos los proyectos de Win2Win",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,51 +0,0 @@
1
- import { Id, Uuid } from "../shared";
2
- export interface GamaEstadoModel {
3
- id?: string;
4
- idGama: Id | null;
5
- name: string;
6
- code: number | null;
7
- color: string;
8
- icon: string;
9
- description: string;
10
- rules: EstadoRuleModel[];
11
- rootOperator: JoinOperator;
12
- }
13
- export type JoinOperator = "AND" | "OR";
14
- export interface GamaFlagModel {
15
- id?: string;
16
- idGama: Id | null;
17
- name: string;
18
- type: GamaFlagType;
19
- field?: string | null;
20
- query?: GamaFlagQuery | null | string;
21
- description: string;
22
- }
23
- export declare enum GamaFlagType {
24
- FIELD = "field",
25
- QUERY = "query"
26
- }
27
- export type GamaFlagField = GamaFlagModel & {
28
- type: "field";
29
- field: string;
30
- };
31
- export type GamaFlagQuery = GamaFlagModel & {
32
- type: "query";
33
- query: FlagQuery;
34
- };
35
- export interface FlagQuery {
36
- url: string;
37
- params?: Record<string, any>;
38
- }
39
- export declare const ESTADO_RULE_OPERATORS: readonly [">", "<", "=", "!=", ">=", "<=", "in", "not in", "like"];
40
- export type EstadoRuleOperator = (typeof ESTADO_RULE_OPERATORS)[number];
41
- export interface EstadoRuleModel {
42
- id?: string;
43
- idFlag: Uuid;
44
- operator: EstadoRuleOperator;
45
- valueType: RuleValueType;
46
- value: any;
47
- }
48
- export declare enum RuleValueType {
49
- CONST = "const",
50
- FLAG = "flag"
51
- }