@restura/core 1.6.0 → 1.7.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.
- package/dist/index.d.ts +17 -4
- package/dist/index.js +373 -168
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ declare const responseDataSchema: z.ZodObject<{
|
|
|
168
168
|
OR: "OR";
|
|
169
169
|
}>>;
|
|
170
170
|
}, z.core.$strict>>;
|
|
171
|
-
properties: z.ZodArray<z.ZodObject
|
|
171
|
+
properties: z.ZodArray<z.ZodObject</*elided*/ any, z.core.$strict>>;
|
|
172
172
|
groupBy: z.ZodOptional<z.ZodObject<{
|
|
173
173
|
columnName: z.ZodString;
|
|
174
174
|
tableName: z.ZodString;
|
|
@@ -311,7 +311,7 @@ declare const standardRouteSchema: z.ZodObject<{
|
|
|
311
311
|
OR: "OR";
|
|
312
312
|
}>>;
|
|
313
313
|
}, z.core.$strict>>;
|
|
314
|
-
properties: z.ZodArray<z.ZodObject
|
|
314
|
+
properties: z.ZodArray<z.ZodObject</*elided*/ any, z.core.$strict>>;
|
|
315
315
|
groupBy: z.ZodOptional<z.ZodObject<{
|
|
316
316
|
columnName: z.ZodString;
|
|
317
317
|
tableName: z.ZodString;
|
|
@@ -736,7 +736,7 @@ declare const resturaSchema: z.ZodObject<{
|
|
|
736
736
|
OR: "OR";
|
|
737
737
|
}>>;
|
|
738
738
|
}, z.core.$strict>>;
|
|
739
|
-
properties: z.ZodArray<z.ZodObject
|
|
739
|
+
properties: z.ZodArray<z.ZodObject</*elided*/ any, z.core.$strict>>;
|
|
740
740
|
groupBy: z.ZodOptional<z.ZodObject<{
|
|
741
741
|
columnName: z.ZodString;
|
|
742
742
|
tableName: z.ZodString;
|
|
@@ -1216,5 +1216,18 @@ declare function isValueNumber(value: unknown): value is number;
|
|
|
1216
1216
|
* @returns An escaped query with user input
|
|
1217
1217
|
*/
|
|
1218
1218
|
declare function SQL(strings: TemplateStringsArray, ...values: unknown[]): string;
|
|
1219
|
+
/**
|
|
1220
|
+
* Converts a JavaScript value to its PostgreSQL literal representation.
|
|
1221
|
+
* Used for debug logging of SQL queries — NOT for building actual queries
|
|
1222
|
+
* (use parameterized queries for that).
|
|
1223
|
+
*
|
|
1224
|
+
* @example
|
|
1225
|
+
* toSqlLiteral('hello') // "'hello'"
|
|
1226
|
+
* toSqlLiteral(42) // "42"
|
|
1227
|
+
* toSqlLiteral(true) // "TRUE"
|
|
1228
|
+
* toSqlLiteral(null) // "NULL"
|
|
1229
|
+
* toSqlLiteral([1, 2]) // "ARRAY[1, 2]"
|
|
1230
|
+
*/
|
|
1231
|
+
declare function toSqlLiteral(value: unknown): string;
|
|
1219
1232
|
|
|
1220
|
-
export { type ActionColumnChangeData, type ActionColumnChangeFilter, type ActionRowDeleteData, type ActionRowDeleteFilter, type ActionRowInsertData, type ActionRowInsertFilter, type ApiMethod, type AsyncExpressApplication, type AuthenticateHandler, type AuthenticatedRequesterDetails, type ConjunctionTypes, type DatabaseActionData, type DynamicObject, type ErrorCode, type EventType, HtmlStatusCodes, type LoggerConfigSchema, type MatchTypes, type MutationType, type OnValidAuthenticationCallback, type PageQuery, PsqlConnection, PsqlEngine, PsqlPool, PsqlTransaction, type QueryMetadata, type RequesterDetails, type ResturaConfigSchema, type ResturaSchema, RsError, type RsErrorData, type RsErrorInternalData, type RsHeaders, type RsPagedResponseData, type RsRequest, type RsResponse, type RsResponseData, type RsRouteHandler, SQL, type SchemaChangeValue, type SchemaPreview, type SqlMutationData, type StandardOrderTypes, type TriggerResult, apiGenerator, escapeColumnName, eventManager, filterPsqlParser, insertObjectQuery, isSchemaValid, isValueNumber, logger, modelGenerator, questionMarksToOrderedParams, restura, resturaGlobalTypesGenerator, resturaSchema, updateObjectQuery };
|
|
1233
|
+
export { type ActionColumnChangeData, type ActionColumnChangeFilter, type ActionRowDeleteData, type ActionRowDeleteFilter, type ActionRowInsertData, type ActionRowInsertFilter, type ApiMethod, type AsyncExpressApplication, type AuthenticateHandler, type AuthenticatedRequesterDetails, type ConjunctionTypes, type DatabaseActionData, type DynamicObject, type ErrorCode, type EventType, HtmlStatusCodes, type LoggerConfigSchema, type MatchTypes, type MutationType, type OnValidAuthenticationCallback, type PageQuery, PsqlConnection, PsqlEngine, PsqlPool, PsqlTransaction, type QueryMetadata, type RequesterDetails, type ResturaConfigSchema, type ResturaSchema, RsError, type RsErrorData, type RsErrorInternalData, type RsHeaders, type RsPagedResponseData, type RsRequest, type RsResponse, type RsResponseData, type RsRouteHandler, SQL, type SchemaChangeValue, type SchemaPreview, type SqlMutationData, type StandardOrderTypes, type TriggerResult, apiGenerator, escapeColumnName, eventManager, filterPsqlParser, insertObjectQuery, isSchemaValid, isValueNumber, logger, modelGenerator, questionMarksToOrderedParams, restura, resturaGlobalTypesGenerator, resturaSchema, toSqlLiteral, updateObjectQuery };
|