@carbonorm/carbonnode 3.3.3 → 3.3.5

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.
@@ -153,7 +153,9 @@ export type C6RestfulModel<RestShortTableName extends string, RestTableInterface
153
153
  TABLE_REFERENCED_BY: {
154
154
  [columnName: string]: iConstraint[];
155
155
  };
156
- };
156
+ } & Required<{
157
+ [K in keyof RestTableInterface as Uppercase<string & K>]: string;
158
+ }>;
157
159
  export type iRestReactiveLifecycle<G extends OrmGenerics> = {
158
160
  beforeProcessing?: {
159
161
  [key: string]: (args: {
@@ -201,26 +203,13 @@ export interface iRestApiFunctions<RestData extends {
201
203
  Get: (request?: RequestQueryBody<'GET', RestData>) => iGetC6RestResponse<RestData>;
202
204
  Put: (request?: RequestQueryBody<'PUT', RestData>) => iPutC6RestResponse<RestData>;
203
205
  }
204
- export interface iC6Object<RestShortTableName extends string = any, RestTableInterface extends {
205
- [key: string]: any;
206
- } = any, PrimaryKey extends keyof RestTableInterface & string = keyof RestTableInterface & string> {
206
+ export interface iC6Object<Tables extends Record<string, C6RestfulModel<any, any, any>> = Record<string, C6RestfulModel<any, any, any>>> {
207
207
  C6VERSION: string;
208
- TABLES: {
209
- [key: string]: C6RestfulModel<RestShortTableName, RestTableInterface, PrimaryKey> & {
210
- [key: string]: string | number;
211
- };
212
- };
208
+ TABLES: Tables;
213
209
  PREFIX: string;
214
210
  IMPORT: (tableName: string) => Promise<iDynamicApiImport>;
215
211
  [key: string]: any;
216
212
  }
217
- export interface tC6Tables<RestShortTableName extends string = any, RestTableInterface extends {
218
- [key: string]: any;
219
- } = any, PrimaryKey extends keyof RestTableInterface & string = keyof RestTableInterface & string> {
220
- [key: string]: C6RestfulModel<RestShortTableName, RestTableInterface, PrimaryKey> & {
221
- [key: string]: any;
222
- };
223
- }
224
213
  export interface tC6RestApi {
225
214
  [key: string]: {
226
215
  REST: iRestApiFunctions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonnode",
3
- "version": "3.3.3",
3
+ "version": "3.3.5",
4
4
  "browser": "dist/index.umd.js",
5
5
  "exports": {
6
6
  ".": {
@@ -45,8 +45,7 @@ const {{TABLE_NAME_SHORT}}:
45
45
  '{{TABLE_NAME_SHORT}}',
46
46
  i{{TABLE_NAME_SHORT_PASCAL_CASE}},
47
47
  {{TABLE_NAME_SHORT_PASCAL_CASE}}PrimaryKeys
48
- >
49
- & { [K in keyof i{{TABLE_NAME_SHORT_PASCAL_CASE}} as Uppercase<string & K>]: string } = {
48
+ > = {
50
49
  TABLE_NAME: '{{TABLE_NAME}}',
51
50
  {{#each COLUMNS_UPPERCASE}}
52
51
  {{@key}}: '{{this}}',
@@ -190,7 +190,7 @@ export type C6RestfulModel<
190
190
  LIFECYCLE_HOOKS: iRestHooks<OrmGenerics<any, RestShortTableName, RestTableInterface, PrimaryKey>>;
191
191
  TABLE_REFERENCES: { [columnName: string]: iConstraint[] };
192
192
  TABLE_REFERENCED_BY: { [columnName: string]: iConstraint[] };
193
- }
193
+ } & Required<{ [K in keyof RestTableInterface as Uppercase<string & K>]: string }>
194
194
 
195
195
  export type iRestReactiveLifecycle<G extends OrmGenerics> = {
196
196
  beforeProcessing?: {
@@ -240,30 +240,15 @@ export interface iRestApiFunctions<RestData extends { [key: string]: any } = any
240
240
  }
241
241
 
242
242
  export interface iC6Object<
243
- RestShortTableName extends string = any,
244
- RestTableInterface extends { [key: string]: any } = any,
245
- PrimaryKey extends keyof RestTableInterface & string = keyof RestTableInterface & string
243
+ Tables extends Record<string, C6RestfulModel<any, any, any>> = Record<string, C6RestfulModel<any, any, any>>
246
244
  > {
247
245
  C6VERSION: string;
248
- TABLES: {
249
- [key: string]: C6RestfulModel<RestShortTableName, RestTableInterface, PrimaryKey> & {
250
- [key: string]: string | number;
251
- };
252
- };
246
+ TABLES: Tables;
253
247
  PREFIX: string;
254
248
  IMPORT: (tableName: string) => Promise<iDynamicApiImport>;
255
-
256
249
  [key: string]: any;
257
250
  }
258
251
 
259
- export interface tC6Tables<
260
- RestShortTableName extends string = any,
261
- RestTableInterface extends { [key: string]: any } = any,
262
- PrimaryKey extends keyof RestTableInterface & string = keyof RestTableInterface & string
263
- > {
264
- [key: string]: C6RestfulModel<RestShortTableName, RestTableInterface, PrimaryKey> & { [key: string]: any };
265
- }
266
-
267
252
  export interface tC6RestApi {
268
253
  [key: string]: {
269
254
  REST: iRestApiFunctions;