@kalutskii/foundation 0.7.16 → 0.7.17

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 CHANGED
@@ -912,10 +912,10 @@ declare const asQuery: <T extends z.ZodTypeAny>(schema: T) => z.ZodPreprocess<T>
912
912
  * Objects and arrays are copied while `null` and `undefined` retain their omission semantics.
913
913
  *
914
914
  * @example
915
- * preprocessQueryPayload({ page: 2, enabled: true });
915
+ * preprocessTransportPayload({ page: 2, enabled: true });
916
916
  * // { page: '2', enabled: 'true' }
917
917
  */
918
- declare function preprocessQueryPayload<TValue>(value: TValue): AsQuery<TValue>;
918
+ declare function preprocessTransportPayload<TValue>(value: TValue): AsQuery<TValue>;
919
919
 
920
920
  /**
921
921
  * Checks whether a value is a plain record backed by `Object.prototype`.
@@ -923,4 +923,4 @@ declare function preprocessQueryPayload<TValue>(value: TValue): AsQuery<TValue>;
923
923
  */
924
924
  declare const isPlainObject: (value: unknown) => value is Record<string, unknown>;
925
925
 
926
- export { type APIContractData, type APIContractError, type APIContractResult, type APIError, type APISuccess, type AsQuery, type AtLeastOne, DEFAULT_UPLOAD_MAX_FILE_SIZE, EXCEPTION_STATUS_CODES, type ExceptionStatusCode, type FetchResult, type FileFormat, type FileFormatConfig, type HonoFileRespondOptions, type HonoRespondOptions, type JWTServiceOptions, type JWTSignOptions, type LogLevel, type MeasuredExecution, type Payload, type PayloadSchema, REDACTED_LOG_VALUE, type ReplaceDotsWithUnderscores, type ReplaceHyphensWithUnderscores, SUCCESS_STATUS_CODES, type Simplify, type StringEnumRecord, type SuccessStatusCode, type UploadFilesValidationOptions, type UploadFilesValidationResult, type UploadPreset, type UploadValidationError, type ZodBulkExcludeSelection, type ZodBulkIncludeSelection, type ZodBulkSelection, ZodJWTService, type ZodPaginationOptions, type ZodSearchSchemaOptions, type ZodUploadFileSchemaOptions, asQuery, createStringEnumRecord, createUploadAccept, createZodSearchWhereSchema, defineUploadPreset, documentUploadPreset, failure, fetchAndThrow, fetchSafely, fileFormat, fileFormatsArray, fileFormatsConfig, fileFormatsRecord, fileRespond, formatTime, generateRandomString, getColoredHTTPStatus, getFileExtension, getFormattedDate, getFormattedTime, getUTCOffset, getZonedTime, httpStatusColors, imageTransparentUploadPreset, imageUploadPreset, isFileExtensionSupported, isFileFormatSupported, isFileMimeTypeSupported, isPlainObject, log, logLevel, logLevelColors, logLevelsArray, logLevelsRecord, loggingMiddleware, matchesMimeType, measureExecutionTime, normalizeFileExtension, onHandlerError, parseQueryValue, preprocessQueryPayload, redactSensitiveJSON, redactSensitiveSearchParams, respond, safeExecute, sensitiveLogKeyParts, sqlWhere, success, uploadValidationError, uploadValidationErrorsArray, uploadValidationErrorsRecord, validateUploadFile, validateUploadFiles, zodAtLeastOne, zodBulkSelectionSchema, zodPaginationSchema, zodPaginationShape, zodSearchQuerySchema, zodSearchSchema, zodUploadFileSchema };
926
+ export { type APIContractData, type APIContractError, type APIContractResult, type APIError, type APISuccess, type AsQuery, type AtLeastOne, DEFAULT_UPLOAD_MAX_FILE_SIZE, EXCEPTION_STATUS_CODES, type ExceptionStatusCode, type FetchResult, type FileFormat, type FileFormatConfig, type HonoFileRespondOptions, type HonoRespondOptions, type JWTServiceOptions, type JWTSignOptions, type LogLevel, type MeasuredExecution, type Payload, type PayloadSchema, REDACTED_LOG_VALUE, type ReplaceDotsWithUnderscores, type ReplaceHyphensWithUnderscores, SUCCESS_STATUS_CODES, type Simplify, type StringEnumRecord, type SuccessStatusCode, type UploadFilesValidationOptions, type UploadFilesValidationResult, type UploadPreset, type UploadValidationError, type ZodBulkExcludeSelection, type ZodBulkIncludeSelection, type ZodBulkSelection, ZodJWTService, type ZodPaginationOptions, type ZodSearchSchemaOptions, type ZodUploadFileSchemaOptions, asQuery, createStringEnumRecord, createUploadAccept, createZodSearchWhereSchema, defineUploadPreset, documentUploadPreset, failure, fetchAndThrow, fetchSafely, fileFormat, fileFormatsArray, fileFormatsConfig, fileFormatsRecord, fileRespond, formatTime, generateRandomString, getColoredHTTPStatus, getFileExtension, getFormattedDate, getFormattedTime, getUTCOffset, getZonedTime, httpStatusColors, imageTransparentUploadPreset, imageUploadPreset, isFileExtensionSupported, isFileFormatSupported, isFileMimeTypeSupported, isPlainObject, log, logLevel, logLevelColors, logLevelsArray, logLevelsRecord, loggingMiddleware, matchesMimeType, measureExecutionTime, normalizeFileExtension, onHandlerError, parseQueryValue, preprocessTransportPayload, redactSensitiveJSON, redactSensitiveSearchParams, respond, safeExecute, sensitiveLogKeyParts, sqlWhere, success, uploadValidationError, uploadValidationErrorsArray, uploadValidationErrorsRecord, validateUploadFile, validateUploadFiles, zodAtLeastOne, zodBulkSelectionSchema, zodPaginationSchema, zodPaginationShape, zodSearchQuerySchema, zodSearchSchema, zodUploadFileSchema };
package/dist/index.js CHANGED
@@ -524,13 +524,13 @@ var parseQueryValue = (value) => {
524
524
  return value;
525
525
  };
526
526
  var asQuery = (schema) => z5.preprocess(parseQueryValue, schema);
527
- function preprocessQueryPayload(value) {
527
+ function preprocessTransportPayload(value) {
528
528
  if (Array.isArray(value)) {
529
- return value.map(preprocessQueryPayload);
529
+ return value.map(preprocessTransportPayload);
530
530
  }
531
531
  if (isPlainObject(value)) {
532
532
  const entries = Object.entries(value).map(([key, entryValue]) => {
533
- return [key, preprocessQueryPayload(entryValue)];
533
+ return [key, preprocessTransportPayload(entryValue)];
534
534
  });
535
535
  return Object.fromEntries(entries);
536
536
  }
@@ -584,7 +584,7 @@ export {
584
584
  normalizeFileExtension,
585
585
  onHandlerError,
586
586
  parseQueryValue,
587
- preprocessQueryPayload,
587
+ preprocessTransportPayload,
588
588
  redactSensitiveJSON,
589
589
  redactSensitiveSearchParams,
590
590
  respond,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalutskii/foundation",
3
- "version": "0.7.16",
3
+ "version": "0.7.17",
4
4
  "description": "Typescript collection of most common utilities, schemas and functions among private projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",