meta-enc 1.4.10 → 1.4.12

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="backend-plus" />
1
2
  import * as relEnc from "rel-enc";
2
3
  export * from "./types-meta-enc";
3
4
  import { MenuDefinition, Request, OptsClientPage } from "./types-meta-enc";
@@ -12,12 +13,12 @@ export declare function emergeAppMetaEnc<T extends Constructor<relEnc.AppRelEncT
12
13
  prepareGetTables(): void;
13
14
  clientIncludes(req: Request, hideBEPlusInclusions: OptsClientPage): relEnc.ClientModuleDefinition[];
14
15
  /* mixin-patch: addLoggedServices: (() => void) & (() => void) & (() => void); */
15
- tablasDatos: any[];
16
+ tablasDatos: relEnc.TablaDatos[];
16
17
  /* mixin-patch: cargarGenerados: ((client: relEnc.Client) => Promise<string>) & ((client: relEnc.Client) => Promise<string>); */
17
- /* mixin-patch: generateBaseTableDef: ((tablaDatos: any) => relEnc.TableDefinition) & ((tablaDatos: any) => relEnc.TableDefinition); */
18
+ /* mixin-patch: generateBaseTableDef: ((tablaDatos: relEnc.TablaDatos) => relEnc.TableDefinition) & ((tablaDatos: relEnc.TablaDatos) => relEnc.TableDefinition); */
18
19
  /* mixin-patch: getTableDefFunction: ((tableDef: relEnc.TableDefinition) => relEnc.TableDefinitionFunction) & ((tableDef: relEnc.TableDefinition) => relEnc.TableDefinitionFunction); */
19
20
  /* mixin-patch: loadTableDef: ((tableDef: relEnc.TableDefinition) => relEnc.TableDefinitionFunction) & ((tableDef: relEnc.TableDefinition) => relEnc.TableDefinitionFunction); */
20
- /* mixin-patch: generateAndLoadTableDef: ((tablaDatos: any) => relEnc.TableDefinitionFunction) & ((tablaDatos: any) => relEnc.TableDefinitionFunction); */
21
+ /* mixin-patch: generateAndLoadTableDef: ((tablaDatos: relEnc.TablaDatos) => relEnc.TableDefinitionFunction) & ((tablaDatos: relEnc.TablaDatos) => relEnc.TableDefinitionFunction); */
21
22
  procedures: relEnc.ProcedureDef[];
22
23
  procedure: {
23
24
  [key: string]: relEnc.ProcedureDef;
@@ -34,90 +35,136 @@ export declare function emergeAppMetaEnc<T extends Constructor<relEnc.AppRelEncT
34
35
  db: typeof import("pg-promise-strict");
35
36
  config: any;
36
37
  rootPath: string;
37
- /* mixin-patch: dumpDbSchemaPartial: ((partialTableStructures: relEnc.TableDefinitions, opts?: {
38
- complete?: boolean | undefined;
39
- skipEnance?: boolean | undefined;
40
- } | undefined) => Promise<{
41
- mainSql: string;
42
- enancePart: string;
43
- }>) & ((partialTableStructures: relEnc.TableDefinitions, opts?: {
44
- complete?: boolean | undefined;
45
- skipEnance?: boolean | undefined;
46
- } | undefined) => Promise<{
47
- mainSql: string;
48
- enancePart: string;
49
- }>) & ((partialTableStructures: relEnc.TableDefinitions, opts?: {
50
- complete?: boolean | undefined;
51
- skipEnance?: boolean | undefined;
52
- } | undefined) => Promise<{
53
- mainSql: string;
54
- enancePart: string;
55
- }>) & ((partialTableStructures: relEnc.TableDefinitions, opts?: relEnc.DumpOptions | undefined) => Promise<{
56
- mainSql: string;
57
- enancePart: string;
58
- }>); */
59
- caches: {
60
- procedures: {
61
- [k: string]: {
62
- timestamp: number;
63
- result: any;
64
- };
65
- };
66
- } & relEnc.Caches;
67
- /* mixin-patch: clearCaches: (() => void) & (() => void); */
68
- /* mixin-patch: postConfig: (() => Promise<void>) & ((...params: any[]) => Promise<void>); */
69
- /* mixin-patch: start: ((opts?: relEnc.StartOptions | undefined) => Promise<void>) & ((opts?: relEnc.StartOptions | undefined) => Promise<void>); */
70
- /* mixin-patch: appendToTableDefinition: ((tableName: string, appenderFunction: (tableDef: relEnc.TableDefinition, context?: relEnc.TableContext | undefined) => void) => void) & ((tableName: string, appenderFunction: (tableDef: relEnc.TableDefinition, context?: relEnc.TableContext | undefined) => void) => void); */
71
- /* mixin-patch: getContext: ((req: relEnc.Request) => relEnc.Context) & ((req: relEnc.Request) => relEnc.Context); */
72
- /* mixin-patch: addSchrödingerServices: ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void) & ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void); */
73
- /* mixin-patch: addUnloggedServices: ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void) & ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void); */
74
- /* mixin-patch: inDbClient: (<T_1>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T_1>) => Promise<T_1>) & (<T_2>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T_2>) => Promise<T_2>); */
75
- /* mixin-patch: inTransaction: (<T_1_1>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_1_1>) => Promise<T_1_1>) & (<T_3>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_3>) => Promise<T_3>); */
76
- /* mixin-patch: procedureDefCompleter: ((procedureDef: relEnc.ProcedureDef) => relEnc.ProcedureDef) & ((procedureDef: relEnc.ProcedureDef) => relEnc.ProcedureDef); */
77
- /* mixin-patch: tableDefAdapt: ((tableDef: relEnc.TableDefinition, context: relEnc.Context) => relEnc.TableDefinition) & ((tableDef: relEnc.TableDefinition, context: relEnc.Context) => relEnc.TableDefinition); */
78
- /* mixin-patch: pushApp: ((dirname: string) => void) & ((dirname: string) => void); */
79
- /* mixin-patch: getContextForDump: (() => relEnc.ContextForDump) & (() => relEnc.ContextForDump); */
80
- /* mixin-patch: getClientSetupForSendToFrontEnd: ((req: relEnc.Request) => relEnc.ClientSetup) & ((req: relEnc.Request) => Promise<relEnc.ClientSetup>); */
81
- /* mixin-patch: configList: (() => (string | object)[]) & (() => (string | object)[]); */
82
- /* mixin-patch: setStaticConfig: ((defConfigYamlString: string) => void) & ((defConfigYamlString: string) => void); */
38
+ caches: relEnc.Caches;
83
39
  fieldDomain: {
84
40
  [k: string]: Partial<relEnc.FieldDefinition>;
41
+ } & {
42
+ [k: string]: Partial<relEnc.FieldDefinition>;
43
+ } & {
44
+ [k: string]: Partial<relEnc.FieldDefinition>;
45
+ } & {
46
+ [k: string]: Partial<relEnc.FieldDefinition>;
85
47
  };
86
48
  exts: {
87
49
  img: string[];
88
50
  normal: string[];
51
+ } & {
52
+ img: string[];
53
+ normal: string[];
54
+ } & {
55
+ img: string[];
56
+ normal: string[];
57
+ } & {
58
+ img: string[];
59
+ normal: string[];
89
60
  };
90
61
  optsGenericForAll: {
91
62
  allowedExts?: string[] | undefined;
63
+ } & {
64
+ allowedExts?: string[] | undefined;
65
+ } & {
66
+ allowedExts?: string[] | undefined;
67
+ } & {
68
+ allowedExts?: string[] | undefined;
92
69
  };
93
70
  sqls: {
94
71
  [k: string]: string;
72
+ } & {
73
+ [k: string]: string;
74
+ } & {
75
+ [k: string]: string;
76
+ } & {
77
+ [k: string]: string;
95
78
  };
96
79
  messages: {
97
80
  [k: string]: string;
81
+ } & {
82
+ [k: string]: string;
83
+ } & {
84
+ [k: string]: string;
85
+ } & {
86
+ [k: string]: string;
98
87
  };
99
88
  dbUserNameExpr: string;
100
89
  dbUserRolExpr: string;
101
90
  specialValueWhenInsert: {
102
91
  [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
92
+ } & {
93
+ [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
94
+ } & {
95
+ [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
96
+ } & {
97
+ [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
103
98
  };
104
- isAdmin(): boolean;
105
- canChangePass(): Promise<boolean>;
106
- inTransactionProcedureContext<T_4>(req: relEnc.Request | null, coreFunction: (context: relEnc.ProcedureContext) => Promise<T_4>): Promise<T_4>;
107
- dumpDbTableFields(tableDefinition: relEnc.TableDefinition): string[];
108
- mainPage(req: {} | relEnc.Request, offlineMode?: boolean | undefined, opts?: relEnc.OptsClientPage | undefined): {
109
- toHtmlDoc: () => string;
110
- };
111
- isThisProcedureAllowed<T_5>(context: relEnc.Context, procedureDef: relEnc.ProcedureDef, params: {
112
- [key: string]: T_5;
113
- }): Promise<boolean>;
114
- checkDatabaseStructure(client: relEnc.Client): Promise<void>;
115
- getDbFunctions(opts: relEnc.DumpOptions): Promise<{
116
- dumpText: string;
117
- }[]>;
118
99
  i18n: {
119
100
  messages: Record<relEnc.LangId, Record<string, string>>;
101
+ } & {
102
+ messages: Record<relEnc.LangId, Record<string, string>>;
103
+ } & {
104
+ messages: Record<relEnc.LangId, Record<string, string>>;
105
+ } & {
106
+ messages: Record<relEnc.LangId, Record<string, string>>;
120
107
  };
108
+ /* mixin-patch: postConfig: (() => Promise<void>) & ((...params: any[]) => Promise<void>); */
109
+ /* mixin-patch: checkDatabaseStructure: ((client: relEnc.Client) => Promise<void>) & ((client: relEnc.Client) => Promise<void>); */
110
+ /* mixin-patch: getDbFunctions: ((opts: relEnc.DumpOptions) => Promise<{
111
+ dumpText: string;
112
+ }[]>) & ((opts: relEnc.DumpOptions) => Promise<{
113
+ dumpText: string;
114
+ }[]>); */
115
+ /* mixin-patch: clearCaches: (() => void) & (() => void); */
116
+ /* mixin-patch: start: ((opts?: relEnc.StartOptions | undefined) => Promise<void>) & ((opts?: relEnc.StartOptions | undefined) => Promise<void>); */
117
+ /* mixin-patch: appendToTableDefinition: ((tableName: string, appenderFunction: (tableDef: relEnc.TableDefinition, context?: relEnc.TableContext | undefined) => void) => void) & ((tableName: string, appenderFunction: (tableDef: relEnc.TableDefinition, context?: relEnc.TableContext | undefined) => void) => void); */
118
+ /* mixin-patch: getContext: ((req: relEnc.Request) => relEnc.Context) & ((req: relEnc.Request) => relEnc.Context); */
119
+ /* mixin-patch: addSchrödingerServices: ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void) & ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void); */
120
+ /* mixin-patch: addUnloggedServices: ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void) & ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void); */
121
+ /* mixin-patch: isAdmin: (() => boolean) & (() => boolean); */
122
+ /* mixin-patch: canChangePass: (() => Promise<boolean>) & (() => Promise<boolean>); */
123
+ /* mixin-patch: inDbClient: (<T_5>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T_5>) => Promise<T_5>) & (<T_1>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T_1>) => Promise<T_1>); */
124
+ /* mixin-patch: inTransaction: (<T_1_1>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_1_1>) => Promise<T_1_1>) & (<T_2>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_2>) => Promise<T_2>); */
125
+ /* mixin-patch: inTransactionProcedureContext: (<T_2_1>(req: relEnc.Request | null, coreFunction: (context: relEnc.ProcedureContext) => Promise<T_2_1>) => Promise<T_2_1>) & (<T_3>(req: relEnc.Request | null, coreFunction: (context: relEnc.ProcedureContext) => Promise<T_3>) => Promise<T_3>); */
126
+ /* mixin-patch: procedureDefCompleter: ((procedureDef: relEnc.ProcedureDef) => relEnc.ProcedureDef) & ((procedureDef: relEnc.ProcedureDef) => relEnc.ProcedureDef); */
127
+ /* mixin-patch: tableDefAdapt: ((tableDef: relEnc.TableDefinition, context: relEnc.Context) => relEnc.TableDefinition) & ((tableDef: relEnc.TableDefinition, context: relEnc.Context) => relEnc.TableDefinition); */
128
+ /* mixin-patch: pushApp: ((dirname: string) => void) & ((dirname: string) => void); */
129
+ /* mixin-patch: dumpDbTableFields: ((tableDefinition: relEnc.TableDefinition) => string[]) & ((tableDefinition: relEnc.TableDefinition) => string[]); */
130
+ /* mixin-patch: dumpDbSchemaPartial: ((partialTableStructures: relEnc.TableDefinitions, opts?: relEnc.DumpOptions | undefined) => Promise<{
131
+ mainSql: string;
132
+ enancePart: string;
133
+ }>) & ((partialTableStructures: relEnc.TableDefinitions, opts?: relEnc.DumpOptions | undefined) => Promise<{
134
+ mainSql: string;
135
+ enancePart: string;
136
+ }>); */
137
+ /* mixin-patch: getContextForDump: (() => relEnc.ContextForDump) & (() => relEnc.ContextForDump); */
138
+ /* mixin-patch: getClientSetupForSendToFrontEnd: ((req: relEnc.Request) => Promise<relEnc.ClientSetup>) & ((req: relEnc.Request) => Promise<relEnc.ClientSetup>); */
139
+ /* mixin-patch: configList: (() => (string | object)[]) & (() => (string | object)[]); */
140
+ /* mixin-patch: setStaticConfig: ((defConfigYamlString: string) => void) & ((defConfigYamlString: string) => void); */
141
+ /* mixin-patch: mainPage: ((req: {} | relEnc.Request, offlineMode?: boolean | undefined, opts?: relEnc.OptsClientPage | undefined) => {
142
+ toHtmlDoc: () => string;
143
+ }) & ((req: {} | relEnc.Request, offlineMode?: boolean | undefined, opts?: relEnc.OptsClientPage | undefined) => {
144
+ toHtmlDoc: () => string;
145
+ }); */
146
+ /* mixin-patch: isThisProcedureAllowed: (<T_3_1>(context: relEnc.Context, procedureDef: relEnc.ProcedureDef, params: {
147
+ [key: string]: T_3_1;
148
+ }) => Promise<boolean>) & (<T_4>(context: relEnc.Context, procedureDef: relEnc.ProcedureDef, params: {
149
+ [key: string]: T_4;
150
+ }) => Promise<boolean>); */
151
+ /* mixin-patch: shootDownBackend: (() => Promise<void>) & (() => Promise<void>); */
152
+ /* mixin-patch: setLog: ((opts: {
153
+ until: string;
154
+ results?: boolean | undefined;
155
+ }) => void) & ((opts: {
156
+ until: string;
157
+ results?: boolean | undefined;
158
+ }) => void); */
159
+ /* mixin-patch: getDataDumpTransformations: ((rawData: string) => Promise<{
160
+ rawData: string;
161
+ prepareTransformationSql: string[];
162
+ endTransformationSql: string[];
163
+ }>) & ((rawData: string) => Promise<{
164
+ rawData: string;
165
+ prepareTransformationSql: string[];
166
+ endTransformationSql: string[];
167
+ }>); */
121
168
  };
122
169
  } & T;
123
170
  export declare var AppMetaEnc: {
@@ -130,12 +177,12 @@ export declare var AppMetaEnc: {
130
177
  prepareGetTables(): void;
131
178
  clientIncludes(req: Request, hideBEPlusInclusions: OptsClientPage): relEnc.ClientModuleDefinition[];
132
179
  /* mixin-patch: addLoggedServices: (() => void) & (() => void) & (() => void); */
133
- tablasDatos: any[];
180
+ tablasDatos: relEnc.TablaDatos[];
134
181
  /* mixin-patch: cargarGenerados: ((client: relEnc.Client) => Promise<string>) & ((client: relEnc.Client) => Promise<string>); */
135
- /* mixin-patch: generateBaseTableDef: ((tablaDatos: any) => relEnc.TableDefinition) & ((tablaDatos: any) => relEnc.TableDefinition); */
182
+ /* mixin-patch: generateBaseTableDef: ((tablaDatos: relEnc.TablaDatos) => relEnc.TableDefinition) & ((tablaDatos: relEnc.TablaDatos) => relEnc.TableDefinition); */
136
183
  /* mixin-patch: getTableDefFunction: ((tableDef: relEnc.TableDefinition) => relEnc.TableDefinitionFunction) & ((tableDef: relEnc.TableDefinition) => relEnc.TableDefinitionFunction); */
137
184
  /* mixin-patch: loadTableDef: ((tableDef: relEnc.TableDefinition) => relEnc.TableDefinitionFunction) & ((tableDef: relEnc.TableDefinition) => relEnc.TableDefinitionFunction); */
138
- /* mixin-patch: generateAndLoadTableDef: ((tablaDatos: any) => relEnc.TableDefinitionFunction) & ((tablaDatos: any) => relEnc.TableDefinitionFunction); */
185
+ /* mixin-patch: generateAndLoadTableDef: ((tablaDatos: relEnc.TablaDatos) => relEnc.TableDefinitionFunction) & ((tablaDatos: relEnc.TablaDatos) => relEnc.TableDefinitionFunction); */
139
186
  procedures: relEnc.ProcedureDef[];
140
187
  procedure: {
141
188
  [key: string]: relEnc.ProcedureDef;
@@ -152,100 +199,146 @@ export declare var AppMetaEnc: {
152
199
  db: typeof import("pg-promise-strict");
153
200
  config: any;
154
201
  rootPath: string;
155
- /* mixin-patch: dumpDbSchemaPartial: ((partialTableStructures: relEnc.TableDefinitions, opts?: {
156
- complete?: boolean | undefined;
157
- skipEnance?: boolean | undefined;
158
- } | undefined) => Promise<{
159
- mainSql: string;
160
- enancePart: string;
161
- }>) & ((partialTableStructures: relEnc.TableDefinitions, opts?: {
162
- complete?: boolean | undefined;
163
- skipEnance?: boolean | undefined;
164
- } | undefined) => Promise<{
165
- mainSql: string;
166
- enancePart: string;
167
- }>) & ((partialTableStructures: relEnc.TableDefinitions, opts?: {
168
- complete?: boolean | undefined;
169
- skipEnance?: boolean | undefined;
170
- } | undefined) => Promise<{
171
- mainSql: string;
172
- enancePart: string;
173
- }>) & ((partialTableStructures: relEnc.TableDefinitions, opts?: relEnc.DumpOptions | undefined) => Promise<{
174
- mainSql: string;
175
- enancePart: string;
176
- }>); */
177
- caches: {
178
- procedures: {
179
- [k: string]: {
180
- timestamp: number;
181
- result: any;
182
- };
183
- };
184
- } & relEnc.Caches;
185
- /* mixin-patch: clearCaches: (() => void) & (() => void); */
186
- /* mixin-patch: postConfig: (() => Promise<void>) & ((...params: any[]) => Promise<void>); */
187
- /* mixin-patch: start: ((opts?: relEnc.StartOptions | undefined) => Promise<void>) & ((opts?: relEnc.StartOptions | undefined) => Promise<void>); */
188
- /* mixin-patch: appendToTableDefinition: ((tableName: string, appenderFunction: (tableDef: relEnc.TableDefinition, context?: relEnc.TableContext | undefined) => void) => void) & ((tableName: string, appenderFunction: (tableDef: relEnc.TableDefinition, context?: relEnc.TableContext | undefined) => void) => void); */
189
- /* mixin-patch: getContext: ((req: relEnc.Request) => relEnc.Context) & ((req: relEnc.Request) => relEnc.Context); */
190
- /* mixin-patch: addSchrödingerServices: ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void) & ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void); */
191
- /* mixin-patch: addUnloggedServices: ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void) & ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void); */
192
- /* mixin-patch: inDbClient: (<T_1>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T_1>) => Promise<T_1>) & (<T>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T>) => Promise<T>); */
193
- /* mixin-patch: inTransaction: (<T_1_1>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_1_1>) => Promise<T_1_1>) & (<T_2>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_2>) => Promise<T_2>); */
194
- /* mixin-patch: procedureDefCompleter: ((procedureDef: relEnc.ProcedureDef) => relEnc.ProcedureDef) & ((procedureDef: relEnc.ProcedureDef) => relEnc.ProcedureDef); */
195
- /* mixin-patch: tableDefAdapt: ((tableDef: relEnc.TableDefinition, context: relEnc.Context) => relEnc.TableDefinition) & ((tableDef: relEnc.TableDefinition, context: relEnc.Context) => relEnc.TableDefinition); */
196
- /* mixin-patch: pushApp: ((dirname: string) => void) & ((dirname: string) => void); */
197
- /* mixin-patch: getContextForDump: (() => relEnc.ContextForDump) & (() => relEnc.ContextForDump); */
198
- /* mixin-patch: getClientSetupForSendToFrontEnd: ((req: relEnc.Request) => relEnc.ClientSetup) & ((req: relEnc.Request) => Promise<relEnc.ClientSetup>); */
199
- /* mixin-patch: configList: (() => (string | object)[]) & (() => (string | object)[]); */
200
- /* mixin-patch: setStaticConfig: ((defConfigYamlString: string) => void) & ((defConfigYamlString: string) => void); */
202
+ caches: relEnc.Caches;
201
203
  fieldDomain: {
202
204
  [k: string]: Partial<relEnc.FieldDefinition>;
205
+ } & {
206
+ [k: string]: Partial<relEnc.FieldDefinition>;
207
+ } & {
208
+ [k: string]: Partial<relEnc.FieldDefinition>;
209
+ } & {
210
+ [k: string]: Partial<relEnc.FieldDefinition>;
203
211
  };
204
212
  exts: {
205
213
  img: string[];
206
214
  normal: string[];
215
+ } & {
216
+ img: string[];
217
+ normal: string[];
218
+ } & {
219
+ img: string[];
220
+ normal: string[];
221
+ } & {
222
+ img: string[];
223
+ normal: string[];
207
224
  };
208
225
  optsGenericForAll: {
209
226
  allowedExts?: string[] | undefined;
227
+ } & {
228
+ allowedExts?: string[] | undefined;
229
+ } & {
230
+ allowedExts?: string[] | undefined;
231
+ } & {
232
+ allowedExts?: string[] | undefined;
210
233
  };
211
234
  sqls: {
212
235
  [k: string]: string;
236
+ } & {
237
+ [k: string]: string;
238
+ } & {
239
+ [k: string]: string;
240
+ } & {
241
+ [k: string]: string;
213
242
  };
214
243
  messages: {
215
244
  [k: string]: string;
245
+ } & {
246
+ [k: string]: string;
247
+ } & {
248
+ [k: string]: string;
249
+ } & {
250
+ [k: string]: string;
216
251
  };
217
252
  dbUserNameExpr: string;
218
253
  dbUserRolExpr: string;
219
254
  specialValueWhenInsert: {
220
255
  [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
256
+ } & {
257
+ [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
258
+ } & {
259
+ [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
260
+ } & {
261
+ [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
221
262
  };
222
- isAdmin(): boolean;
223
- canChangePass(): Promise<boolean>;
224
- inTransactionProcedureContext<T_3>(req: relEnc.Request | null, coreFunction: (context: relEnc.ProcedureContext) => Promise<T_3>): Promise<T_3>;
225
- dumpDbTableFields(tableDefinition: relEnc.TableDefinition): string[];
226
- mainPage(req: {} | relEnc.Request, offlineMode?: boolean | undefined, opts?: relEnc.OptsClientPage | undefined): {
227
- toHtmlDoc: () => string;
228
- };
229
- isThisProcedureAllowed<T_4>(context: relEnc.Context, procedureDef: relEnc.ProcedureDef, params: {
230
- [key: string]: T_4;
231
- }): Promise<boolean>;
232
- checkDatabaseStructure(client: relEnc.Client): Promise<void>;
233
- getDbFunctions(opts: relEnc.DumpOptions): Promise<{
234
- dumpText: string;
235
- }[]>;
236
263
  i18n: {
237
264
  messages: Record<relEnc.LangId, Record<string, string>>;
265
+ } & {
266
+ messages: Record<relEnc.LangId, Record<string, string>>;
267
+ } & {
268
+ messages: Record<relEnc.LangId, Record<string, string>>;
269
+ } & {
270
+ messages: Record<relEnc.LangId, Record<string, string>>;
238
271
  };
272
+ /* mixin-patch: postConfig: (() => Promise<void>) & ((...params: any[]) => Promise<void>); */
273
+ /* mixin-patch: checkDatabaseStructure: ((client: relEnc.Client) => Promise<void>) & ((client: relEnc.Client) => Promise<void>); */
274
+ /* mixin-patch: getDbFunctions: ((opts: relEnc.DumpOptions) => Promise<{
275
+ dumpText: string;
276
+ }[]>) & ((opts: relEnc.DumpOptions) => Promise<{
277
+ dumpText: string;
278
+ }[]>); */
279
+ /* mixin-patch: clearCaches: (() => void) & (() => void); */
280
+ /* mixin-patch: start: ((opts?: relEnc.StartOptions | undefined) => Promise<void>) & ((opts?: relEnc.StartOptions | undefined) => Promise<void>); */
281
+ /* mixin-patch: appendToTableDefinition: ((tableName: string, appenderFunction: (tableDef: relEnc.TableDefinition, context?: relEnc.TableContext | undefined) => void) => void) & ((tableName: string, appenderFunction: (tableDef: relEnc.TableDefinition, context?: relEnc.TableContext | undefined) => void) => void); */
282
+ /* mixin-patch: getContext: ((req: relEnc.Request) => relEnc.Context) & ((req: relEnc.Request) => relEnc.Context); */
283
+ /* mixin-patch: addSchrödingerServices: ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void) & ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void); */
284
+ /* mixin-patch: addUnloggedServices: ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void) & ((mainApp: relEnc.ExpressPlus, baseUrl: string) => void); */
285
+ /* mixin-patch: isAdmin: (() => boolean) & (() => boolean); */
286
+ /* mixin-patch: canChangePass: (() => Promise<boolean>) & (() => Promise<boolean>); */
287
+ /* mixin-patch: inDbClient: (<T_5>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T_5>) => Promise<T_5>) & (<T>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T>) => Promise<T>); */
288
+ /* mixin-patch: inTransaction: (<T_1_1>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_1_1>) => Promise<T_1_1>) & (<T_1>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_1>) => Promise<T_1>); */
289
+ /* mixin-patch: inTransactionProcedureContext: (<T_2_1>(req: relEnc.Request | null, coreFunction: (context: relEnc.ProcedureContext) => Promise<T_2_1>) => Promise<T_2_1>) & (<T_2>(req: relEnc.Request | null, coreFunction: (context: relEnc.ProcedureContext) => Promise<T_2>) => Promise<T_2>); */
290
+ /* mixin-patch: procedureDefCompleter: ((procedureDef: relEnc.ProcedureDef) => relEnc.ProcedureDef) & ((procedureDef: relEnc.ProcedureDef) => relEnc.ProcedureDef); */
291
+ /* mixin-patch: tableDefAdapt: ((tableDef: relEnc.TableDefinition, context: relEnc.Context) => relEnc.TableDefinition) & ((tableDef: relEnc.TableDefinition, context: relEnc.Context) => relEnc.TableDefinition); */
292
+ /* mixin-patch: pushApp: ((dirname: string) => void) & ((dirname: string) => void); */
293
+ /* mixin-patch: dumpDbTableFields: ((tableDefinition: relEnc.TableDefinition) => string[]) & ((tableDefinition: relEnc.TableDefinition) => string[]); */
294
+ /* mixin-patch: dumpDbSchemaPartial: ((partialTableStructures: relEnc.TableDefinitions, opts?: relEnc.DumpOptions | undefined) => Promise<{
295
+ mainSql: string;
296
+ enancePart: string;
297
+ }>) & ((partialTableStructures: relEnc.TableDefinitions, opts?: relEnc.DumpOptions | undefined) => Promise<{
298
+ mainSql: string;
299
+ enancePart: string;
300
+ }>); */
301
+ /* mixin-patch: getContextForDump: (() => relEnc.ContextForDump) & (() => relEnc.ContextForDump); */
302
+ /* mixin-patch: getClientSetupForSendToFrontEnd: ((req: relEnc.Request) => Promise<relEnc.ClientSetup>) & ((req: relEnc.Request) => Promise<relEnc.ClientSetup>); */
303
+ /* mixin-patch: configList: (() => (string | object)[]) & (() => (string | object)[]); */
304
+ /* mixin-patch: setStaticConfig: ((defConfigYamlString: string) => void) & ((defConfigYamlString: string) => void); */
305
+ /* mixin-patch: mainPage: ((req: {} | relEnc.Request, offlineMode?: boolean | undefined, opts?: relEnc.OptsClientPage | undefined) => {
306
+ toHtmlDoc: () => string;
307
+ }) & ((req: {} | relEnc.Request, offlineMode?: boolean | undefined, opts?: relEnc.OptsClientPage | undefined) => {
308
+ toHtmlDoc: () => string;
309
+ }); */
310
+ /* mixin-patch: isThisProcedureAllowed: (<T_3_1>(context: relEnc.Context, procedureDef: relEnc.ProcedureDef, params: {
311
+ [key: string]: T_3_1;
312
+ }) => Promise<boolean>) & (<T_3>(context: relEnc.Context, procedureDef: relEnc.ProcedureDef, params: {
313
+ [key: string]: T_3;
314
+ }) => Promise<boolean>); */
315
+ /* mixin-patch: shootDownBackend: (() => Promise<void>) & (() => Promise<void>); */
316
+ /* mixin-patch: setLog: ((opts: {
317
+ until: string;
318
+ results?: boolean | undefined;
319
+ }) => void) & ((opts: {
320
+ until: string;
321
+ results?: boolean | undefined;
322
+ }) => void); */
323
+ /* mixin-patch: getDataDumpTransformations: ((rawData: string) => Promise<{
324
+ rawData: string;
325
+ prepareTransformationSql: string[];
326
+ endTransformationSql: string[];
327
+ }>) & ((rawData: string) => Promise<{
328
+ rawData: string;
329
+ prepareTransformationSql: string[];
330
+ endTransformationSql: string[];
331
+ }>); */
239
332
  };
240
333
  } & (new (...args: any[]) => {
241
- clientIncludes(req: relEnc.Request, hideBEPlusInclusions: any): relEnc.ClientModuleDefinition[];
334
+ clientIncludes(req: relEnc.Request, hideBEPlusInclusions: relEnc.OptsClientPage): relEnc.ClientModuleDefinition[];
242
335
  addLoggedServices(): void;
243
- tablasDatos: any[];
336
+ tablasDatos: relEnc.TablaDatos[];
244
337
  cargarGenerados(client: relEnc.Client): Promise<string>;
245
- generateBaseTableDef(tablaDatos: any): relEnc.TableDefinition;
338
+ generateBaseTableDef(tablaDatos: relEnc.TablaDatos): relEnc.TableDefinition;
246
339
  getTableDefFunction(tableDef: relEnc.TableDefinition): relEnc.TableDefinitionFunction;
247
340
  loadTableDef(tableDef: relEnc.TableDefinition): relEnc.TableDefinitionFunction;
248
- generateAndLoadTableDef(tablaDatos: any): relEnc.TableDefinitionFunction;
341
+ generateAndLoadTableDef(tablaDatos: relEnc.TablaDatos): relEnc.TableDefinitionFunction;
249
342
  procedures: relEnc.ProcedureDef[];
250
343
  procedure: {
251
344
  [key: string]: relEnc.ProcedureDef;
@@ -258,28 +351,46 @@ export declare var AppMetaEnc: {
258
351
  db: typeof import("pg-promise-strict");
259
352
  config: any;
260
353
  rootPath: string;
261
- dumpDbSchemaPartial: ((partialTableStructures: relEnc.TableDefinitions, opts?: {
262
- complete?: boolean | undefined;
263
- skipEnance?: boolean | undefined;
264
- } | undefined) => Promise<{
265
- mainSql: string;
266
- enancePart: string;
267
- }>) & ((partialTableStructures: relEnc.TableDefinitions, opts?: {
268
- complete?: boolean | undefined;
269
- skipEnance?: boolean | undefined;
270
- } | undefined) => Promise<{
271
- mainSql: string;
272
- enancePart: string;
273
- }>);
274
- caches: {
275
- procedures: {
276
- [k: string]: {
277
- timestamp: number;
278
- result: any;
279
- };
280
- };
354
+ caches: relEnc.Caches;
355
+ fieldDomain: {
356
+ [k: string]: Partial<relEnc.FieldDefinition>;
357
+ } & {
358
+ [k: string]: Partial<relEnc.FieldDefinition>;
359
+ };
360
+ exts: {
361
+ img: string[];
362
+ normal: string[];
363
+ } & {
364
+ img: string[];
365
+ normal: string[];
366
+ };
367
+ optsGenericForAll: {
368
+ allowedExts?: string[] | undefined;
369
+ } & {
370
+ allowedExts?: string[] | undefined;
371
+ };
372
+ sqls: {
373
+ [k: string]: string;
374
+ } & {
375
+ [k: string]: string;
376
+ };
377
+ messages: {
378
+ [k: string]: string;
379
+ } & {
380
+ [k: string]: string;
381
+ };
382
+ dbUserNameExpr: string;
383
+ dbUserRolExpr: string;
384
+ specialValueWhenInsert: {
385
+ [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
386
+ } & {
387
+ [k: string]: (context: relEnc.ProcedureContext, defField: relEnc.FieldDefinition, parameters: object) => any;
388
+ };
389
+ i18n: {
390
+ messages: Record<relEnc.LangId, Record<string, string>>;
391
+ } & {
392
+ messages: Record<relEnc.LangId, Record<string, string>>;
281
393
  };
282
- clearCaches(): void;
283
394
  }) & {
284
395
  new (...args: any[]): {
285
396
  tablasDatos: relEnc.TablaDatos[];
@@ -307,14 +418,7 @@ export declare var AppMetaEnc: {
307
418
  db: typeof import("pg-promise-strict");
308
419
  config: any;
309
420
  rootPath: string;
310
- caches: {
311
- procedures: {
312
- [k: string]: {
313
- timestamp: number;
314
- result: any;
315
- };
316
- };
317
- };
421
+ caches: relEnc.Caches;
318
422
  fieldDomain: {
319
423
  [k: string]: Partial<relEnc.FieldDefinition>;
320
424
  };
@@ -345,25 +449,42 @@ export declare var AppMetaEnc: {
345
449
  addUnloggedServices(mainApp: relEnc.ExpressPlus, baseUrl: string): void;
346
450
  addLoggedServices(): void;
347
451
  getProcedures(): Promise<relEnc.ProcedureDef[]>;
348
- inDbClient<T_5>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T_5>): Promise<T_5>;
349
- inTransaction<T_1_2>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_1_2>): Promise<T_1_2>;
452
+ isAdmin(): boolean;
453
+ canChangePass(): Promise<boolean>;
454
+ inDbClient<T_4>(req: relEnc.Request | null, doThisWithDbClient: (client: relEnc.Client) => Promise<T_4>): Promise<T_4>;
455
+ inTransaction<T_1>(req: relEnc.Request | null, doThisWithDbTransaction: (client: relEnc.Client) => Promise<T_1>): Promise<T_1>;
456
+ inTransactionProcedureContext<T_2>(req: relEnc.Request | null, coreFunction: (context: relEnc.ProcedureContext) => Promise<T_2>): Promise<T_2>;
350
457
  procedureDefCompleter(procedureDef: relEnc.ProcedureDef): relEnc.ProcedureDef;
351
458
  tableDefAdapt(tableDef: relEnc.TableDefinition, context: relEnc.Context): relEnc.TableDefinition;
352
459
  pushApp(dirname: string): void;
460
+ dumpDbTableFields(tableDefinition: relEnc.TableDefinition): string[];
353
461
  dumpDbSchemaPartial(partialTableStructures: relEnc.TableDefinitions, opts?: relEnc.DumpOptions | undefined): Promise<{
354
462
  mainSql: string;
355
463
  enancePart: string;
356
464
  }>;
357
465
  getContextForDump(): relEnc.ContextForDump;
358
- getClientSetupForSendToFrontEnd(req: relEnc.Request): relEnc.ClientSetup;
466
+ getClientSetupForSendToFrontEnd(req: relEnc.Request): Promise<relEnc.ClientSetup>;
359
467
  configList(): (string | object)[];
360
468
  setStaticConfig(defConfigYamlString: string): void;
361
469
  mainPage(req: {} | relEnc.Request, offlineMode?: boolean | undefined, opts?: relEnc.OptsClientPage | undefined): {
362
470
  toHtmlDoc: () => string;
363
471
  };
364
- isThisProcedureAllowed<T_2>(context: relEnc.Context, procedureDef: relEnc.ProcedureDef, params: {
365
- [key: string]: T_2;
472
+ isThisProcedureAllowed<T_3>(context: relEnc.Context, procedureDef: relEnc.ProcedureDef, params: {
473
+ [key: string]: T_3;
366
474
  }): Promise<boolean>;
475
+ i18n: {
476
+ messages: Record<relEnc.LangId, Record<string, string>>;
477
+ };
478
+ shootDownBackend(): Promise<void>;
479
+ setLog(opts: {
480
+ until: string;
481
+ results?: boolean | undefined;
482
+ }): void;
483
+ getDataDumpTransformations(rawData: string): Promise<{
484
+ rawData: string;
485
+ prepareTransformationSql: string[];
486
+ endTransformationSql: string[];
487
+ }>;
367
488
  };
368
489
  prefixTableName(tableName: string, prefix: string): string;
369
490
  } & typeof relEnc.AppBackend;
@@ -1,2 +1,3 @@
1
+ /// <reference types="backend-plus" />
1
2
  import { TableDefinition, TableContext } from "./types-meta-enc";
2
3
  export declare function casilleros(context: TableContext): TableDefinition;
@@ -1,2 +1,3 @@
1
+ /// <reference types="backend-plus" />
1
2
  import { TableDefinition, TableContext } from "./types-meta-enc";
2
3
  export declare function casilleros_principales(context: TableContext): TableDefinition;
@@ -1,2 +1,3 @@
1
+ /// <reference types="backend-plus" />
1
2
  import { TableDefinition, TableContext } from "./types-meta-enc";
2
3
  export declare function formularios_json(context: TableContext): TableDefinition;
@@ -1,2 +1,3 @@
1
+ /// <reference types="backend-plus" />
1
2
  import { TableDefinition, TableContext } from "./types-meta-enc";
2
3
  export declare function subcasilleros(context: TableContext): TableDefinition;
@@ -1,2 +1,3 @@
1
+ /// <reference types="backend-plus" />
1
2
  import { TableDefinition, TableContext } from "./types-meta-enc";
2
3
  export declare function tipoc(context: TableContext): TableDefinition;
@@ -1,2 +1,3 @@
1
+ /// <reference types="backend-plus" />
1
2
  import { TableDefinition, TableContext } from "./types-meta-enc";
2
3
  export declare function tipoc_tipoc(context: TableContext): TableDefinition;
@@ -1,2 +1,3 @@
1
+ /// <reference types="backend-plus" />
1
2
  import { TableDefinition, TableContext } from "./types-meta-enc";
2
3
  export declare function unidad_analisis(context: TableContext): TableDefinition;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "meta-enc",
3
3
  "description": "Metadatos de encuestas",
4
- "version": "1.4.10",
4
+ "version": "1.4.12",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/meta-enc",
@@ -13,7 +13,7 @@
13
13
  "unlogged"
14
14
  ],
15
15
  "dependencies": {
16
- "rel-enc": "^1.3.8"
16
+ "rel-enc": "^1.3.10"
17
17
  },
18
18
  "devDependencies": {
19
19
  "types.d.ts": "^0.6.7",