@carbonorm/carbonnode 3.3.4 → 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.
|
@@ -203,26 +203,13 @@ export interface iRestApiFunctions<RestData extends {
|
|
|
203
203
|
Get: (request?: RequestQueryBody<'GET', RestData>) => iGetC6RestResponse<RestData>;
|
|
204
204
|
Put: (request?: RequestQueryBody<'PUT', RestData>) => iPutC6RestResponse<RestData>;
|
|
205
205
|
}
|
|
206
|
-
export interface iC6Object<
|
|
207
|
-
[key: string]: any;
|
|
208
|
-
} = 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>>> {
|
|
209
207
|
C6VERSION: string;
|
|
210
|
-
TABLES:
|
|
211
|
-
[key: string]: C6RestfulModel<RestShortTableName, RestTableInterface, PrimaryKey> & {
|
|
212
|
-
[key: string]: string | number;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
208
|
+
TABLES: Tables;
|
|
215
209
|
PREFIX: string;
|
|
216
210
|
IMPORT: (tableName: string) => Promise<iDynamicApiImport>;
|
|
217
211
|
[key: string]: any;
|
|
218
212
|
}
|
|
219
|
-
export interface tC6Tables<RestShortTableName extends string = any, RestTableInterface extends {
|
|
220
|
-
[key: string]: any;
|
|
221
|
-
} = any, PrimaryKey extends keyof RestTableInterface & string = keyof RestTableInterface & string> {
|
|
222
|
-
[key: string]: C6RestfulModel<RestShortTableName, RestTableInterface, PrimaryKey> & {
|
|
223
|
-
[key: string]: any;
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
213
|
export interface tC6RestApi {
|
|
227
214
|
[key: string]: {
|
|
228
215
|
REST: iRestApiFunctions;
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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;
|