@stackone/utils 0.23.0 → 0.24.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.
@@ -87,6 +87,17 @@ declare const getDocumentFileFormatFromExtension: (fileExtension: unknown) => st
87
87
  //#region src/shared/exponentialBackoff.d.ts
88
88
  declare const exponentialBackoffInMS: (retryCount: number, baseRetryDelayInMS?: number, jitterFactor?: number) => number;
89
89
  //#endregion
90
+ //#region src/shared/extractSchema.d.ts
91
+ type SchemaToken = 'null' | 'undefined' | 'string' | 'number' | 'boolean' | 'bigint' | 'symbol' | 'function' | '{}' | '...';
92
+ type ExtractedSchema = SchemaToken | {
93
+ type: 'array';
94
+ items: number;
95
+ schema: ExtractedSchema | null;
96
+ } | {
97
+ [key: string]: ExtractedSchema;
98
+ };
99
+ declare const extractSchema: (value: unknown, depth?: number) => ExtractedSchema;
100
+ //#endregion
90
101
  //#region src/shared/getByDotPath.d.ts
91
102
  declare function getByDotPath(obj: unknown, path: string): unknown;
92
103
  //#endregion
@@ -212,4 +223,4 @@ declare const getContentHash: (content: unknown) => string;
212
223
  declare const isValidUUID: (uuid: string) => boolean;
213
224
  declare const generateRequestId: (randomUUIDGenerator?: () => string) => string;
214
225
  //#endregion
215
- export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, type ZodType, calculateNextAnniversary, calculateSize, calculateYearsElapsed, camelToSnake, convertKeysToCamelCase, convertKeysToSnakeCase, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exceedsSize, exponentialBackoffInMS, generateRequestId, generateSamlAssertion, getByDotPath, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, snakeToCamel, z, zStrictObject };
226
+ export { type ExtractedSchema, NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, type SchemaToken, type ZodType, calculateNextAnniversary, calculateSize, calculateYearsElapsed, camelToSnake, convertKeysToCamelCase, convertKeysToSnakeCase, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exceedsSize, exponentialBackoffInMS, extractSchema, generateRequestId, generateSamlAssertion, getByDotPath, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, snakeToCamel, z, zStrictObject };