@exyconn/common 1.0.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.
Files changed (88) hide show
  1. package/README.md +259 -0
  2. package/dist/client/http/index.d.mts +85 -0
  3. package/dist/client/http/index.d.ts +85 -0
  4. package/dist/client/http/index.js +127 -0
  5. package/dist/client/http/index.js.map +1 -0
  6. package/dist/client/http/index.mjs +109 -0
  7. package/dist/client/http/index.mjs.map +1 -0
  8. package/dist/client/index.d.mts +7 -0
  9. package/dist/client/index.d.ts +7 -0
  10. package/dist/client/index.js +964 -0
  11. package/dist/client/index.js.map +1 -0
  12. package/dist/client/index.mjs +889 -0
  13. package/dist/client/index.mjs.map +1 -0
  14. package/dist/client/logger/index.d.mts +53 -0
  15. package/dist/client/logger/index.d.ts +53 -0
  16. package/dist/client/logger/index.js +120 -0
  17. package/dist/client/logger/index.js.map +1 -0
  18. package/dist/client/logger/index.mjs +116 -0
  19. package/dist/client/logger/index.mjs.map +1 -0
  20. package/dist/client/utils/index.d.mts +285 -0
  21. package/dist/client/utils/index.d.ts +285 -0
  22. package/dist/client/utils/index.js +403 -0
  23. package/dist/client/utils/index.js.map +1 -0
  24. package/dist/client/utils/index.mjs +362 -0
  25. package/dist/client/utils/index.mjs.map +1 -0
  26. package/dist/index-BNdT-2X4.d.ts +229 -0
  27. package/dist/index-CcrANHAQ.d.mts +59 -0
  28. package/dist/index-ClWtDfwk.d.ts +833 -0
  29. package/dist/index-DSW6JfD-.d.mts +833 -0
  30. package/dist/index-Du0LLt9f.d.mts +229 -0
  31. package/dist/index-iTKxFa78.d.ts +59 -0
  32. package/dist/index.d.mts +171 -0
  33. package/dist/index.d.ts +171 -0
  34. package/dist/index.js +3806 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/index.mjs +3792 -0
  37. package/dist/index.mjs.map +1 -0
  38. package/dist/response.types-D--UhLJq.d.mts +67 -0
  39. package/dist/response.types-D--UhLJq.d.ts +67 -0
  40. package/dist/server/db/index.d.mts +38 -0
  41. package/dist/server/db/index.d.ts +38 -0
  42. package/dist/server/db/index.js +68 -0
  43. package/dist/server/db/index.js.map +1 -0
  44. package/dist/server/db/index.mjs +60 -0
  45. package/dist/server/db/index.mjs.map +1 -0
  46. package/dist/server/enums/index.d.mts +46 -0
  47. package/dist/server/enums/index.d.ts +46 -0
  48. package/dist/server/enums/index.js +48 -0
  49. package/dist/server/enums/index.js.map +1 -0
  50. package/dist/server/enums/index.mjs +43 -0
  51. package/dist/server/enums/index.mjs.map +1 -0
  52. package/dist/server/index.d.mts +9 -0
  53. package/dist/server/index.d.ts +9 -0
  54. package/dist/server/index.js +569 -0
  55. package/dist/server/index.js.map +1 -0
  56. package/dist/server/index.mjs +523 -0
  57. package/dist/server/index.mjs.map +1 -0
  58. package/dist/server/logger/index.d.mts +34 -0
  59. package/dist/server/logger/index.d.ts +34 -0
  60. package/dist/server/logger/index.js +125 -0
  61. package/dist/server/logger/index.js.map +1 -0
  62. package/dist/server/logger/index.mjs +113 -0
  63. package/dist/server/logger/index.mjs.map +1 -0
  64. package/dist/server/middleware/index.d.mts +56 -0
  65. package/dist/server/middleware/index.d.ts +56 -0
  66. package/dist/server/middleware/index.js +128 -0
  67. package/dist/server/middleware/index.js.map +1 -0
  68. package/dist/server/middleware/index.mjs +118 -0
  69. package/dist/server/middleware/index.mjs.map +1 -0
  70. package/dist/server/response/index.d.mts +86 -0
  71. package/dist/server/response/index.d.ts +86 -0
  72. package/dist/server/response/index.js +140 -0
  73. package/dist/server/response/index.js.map +1 -0
  74. package/dist/server/response/index.mjs +126 -0
  75. package/dist/server/response/index.mjs.map +1 -0
  76. package/dist/server/utils/index.d.mts +69 -0
  77. package/dist/server/utils/index.d.ts +69 -0
  78. package/dist/server/utils/index.js +114 -0
  79. package/dist/server/utils/index.js.map +1 -0
  80. package/dist/server/utils/index.mjs +106 -0
  81. package/dist/server/utils/index.mjs.map +1 -0
  82. package/dist/shared/index.d.mts +4 -0
  83. package/dist/shared/index.d.ts +4 -0
  84. package/dist/shared/index.js +933 -0
  85. package/dist/shared/index.js.map +1 -0
  86. package/dist/shared/index.mjs +612 -0
  87. package/dist/shared/index.mjs.map +1 -0
  88. package/package.json +202 -0
@@ -0,0 +1,229 @@
1
+ import { ApiResponse, HttpClientOptions, PaginatedResponse, createHttpClient, isForbidden, isNotFound, isServerError, isStatusError, isSuccess, isUnauthorized, parseError, parseFullResponse, parseResponse, withAbortSignal, withFormData, withTimeout } from './client/http/index.mjs';
2
+ import { ClientLogger, ClientLoggerConfig, LogLevel, clientLogger, createClientLogger } from './client/logger/index.mjs';
3
+ import { ApiUrlBuilder, ApiUrlConfig, EventEmitter, addDays, appEvents, camelToKebab, capitalize, capitalizeWords, copyToClipboard, createApiEndpoints, createApiUrlBuilder, createEmptyPaginationMeta, createErrorResponse, createEventEmitter, createSuccessResponse, endOfDay, formatDate, formatDateForInput, formatDateTime, formatDateTimeForInput, formatRelativeTime, getErrorMessage, getNextPage, getPrevPage, getResponseData, hasData, hasMorePages, isClipboardAvailable, isErrorResponse, isFuture, isPast, isSuccessResponse, isToday, kebabToCamel, readFromClipboard, slugify, slugifyUnique, startOfDay, truncate, truncateWords, unslugify } from './client/utils/index.mjs';
4
+ import { RefObject } from 'react';
5
+
6
+ type SetValue<T> = T | ((prevValue: T) => T);
7
+ interface UseLocalStorageOptions<T> {
8
+ /** Serialize function (default: JSON.stringify) */
9
+ serializer?: (value: T) => string;
10
+ /** Deserialize function (default: JSON.parse) */
11
+ deserializer?: (value: string) => T;
12
+ /** Enable cross-tab synchronization (default: true) */
13
+ syncTabs?: boolean;
14
+ /** Enable logging (default: false) */
15
+ debug?: boolean;
16
+ }
17
+ /**
18
+ * Hook to persist state in localStorage with cross-tab sync
19
+ * @param key - localStorage key
20
+ * @param initialValue - initial/fallback value
21
+ * @param options - configuration options
22
+ */
23
+ declare function useLocalStorage<T>(key: string, initialValue: T, options?: UseLocalStorageOptions<T>): [T, (value: SetValue<T>) => void, () => void];
24
+
25
+ /**
26
+ * Debounce a value with configurable delay
27
+ * @param value - Value to debounce
28
+ * @param delay - Delay in milliseconds (default: 500)
29
+ */
30
+ declare function useDebounce<T>(value: T, delay?: number): T;
31
+
32
+ interface UseCopyToClipboardReturn {
33
+ /** Copy text to clipboard */
34
+ copy: (text: string) => Promise<boolean>;
35
+ /** Whether copy was successful (resets after timeout) */
36
+ copied: boolean;
37
+ /** Error message if copy failed */
38
+ error: string | null;
39
+ /** Reset state */
40
+ reset: () => void;
41
+ }
42
+ /**
43
+ * Copy text to clipboard with feedback
44
+ * @param resetDelay - Time in ms before copied state resets (default: 2000)
45
+ */
46
+ declare function useCopyToClipboard(resetDelay?: number): UseCopyToClipboardReturn;
47
+
48
+ interface UsePageTitleOptions {
49
+ /** Suffix to append to the title (e.g., organization name) */
50
+ suffix?: string;
51
+ /** Separator between title and suffix (default: ' | ') */
52
+ separator?: string;
53
+ /** Whether to restore original title on unmount (default: true) */
54
+ restoreOnUnmount?: boolean;
55
+ }
56
+ /**
57
+ * Set the document title with optional suffix
58
+ * @param title - Page title
59
+ * @param options - Configuration options
60
+ */
61
+ declare function usePageTitle(title: string, options?: UsePageTitleOptions): void;
62
+
63
+ /**
64
+ * Run a callback on an interval
65
+ * @param callback - Function to call on each interval
66
+ * @param delay - Interval delay in ms (null to pause)
67
+ */
68
+ declare function useInterval(callback: () => void, delay: number | null): void;
69
+
70
+ type ThemeMode = 'light' | 'dark';
71
+ /**
72
+ * Detect and track system color scheme preference
73
+ * @returns Current theme mode based on system preference
74
+ */
75
+ declare function useThemeDetector(): ThemeMode;
76
+
77
+ type SnackbarSeverity = 'success' | 'error' | 'warning' | 'info';
78
+ interface SnackbarState {
79
+ open: boolean;
80
+ message: string;
81
+ severity: SnackbarSeverity;
82
+ autoHideDuration?: number;
83
+ }
84
+ interface UseSnackbarReturn {
85
+ /** Current snackbar state */
86
+ state: SnackbarState;
87
+ /** Show snackbar with message */
88
+ show: (message: string, severity?: SnackbarSeverity, duration?: number) => void;
89
+ /** Show success snackbar */
90
+ success: (message: string, duration?: number) => void;
91
+ /** Show error snackbar */
92
+ error: (message: string, duration?: number) => void;
93
+ /** Show warning snackbar */
94
+ warning: (message: string, duration?: number) => void;
95
+ /** Show info snackbar */
96
+ info: (message: string, duration?: number) => void;
97
+ /** Close snackbar */
98
+ close: () => void;
99
+ }
100
+ /**
101
+ * Manage snackbar/toast notification state
102
+ * @param defaultDuration - Default auto-hide duration in ms
103
+ */
104
+ declare function useSnackbar(defaultDuration?: number): UseSnackbarReturn;
105
+
106
+ /**
107
+ * Track a media query match
108
+ * @param query - CSS media query string (e.g., '(min-width: 768px)')
109
+ */
110
+ declare function useMediaQuery(query: string): boolean;
111
+ declare const useIsMobile: () => boolean;
112
+ declare const useIsTablet: () => boolean;
113
+ declare const useIsDesktop: () => boolean;
114
+ declare const useIsMobileOrTablet: () => boolean;
115
+
116
+ /**
117
+ * useOnClickOutside Hook
118
+ * Detect clicks outside of a referenced element
119
+ */
120
+
121
+ type Handler = (event: MouseEvent | TouchEvent) => void;
122
+ /**
123
+ * Detect clicks outside of a referenced element
124
+ * @param ref - React ref to the element
125
+ * @param handler - Callback when click outside occurs
126
+ * @param enabled - Whether the hook is enabled (default: true)
127
+ */
128
+ declare function useOnClickOutside<T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: Handler, enabled?: boolean): void;
129
+
130
+ interface WindowSize {
131
+ width: number;
132
+ height: number;
133
+ }
134
+ /**
135
+ * Track window dimensions with resize updates
136
+ * @param debounceMs - Debounce resize events (default: 100ms)
137
+ */
138
+ declare function useWindowSize(debounceMs?: number): WindowSize;
139
+
140
+ declare const index_ApiResponse: typeof ApiResponse;
141
+ declare const index_ApiUrlBuilder: typeof ApiUrlBuilder;
142
+ declare const index_ApiUrlConfig: typeof ApiUrlConfig;
143
+ declare const index_ClientLogger: typeof ClientLogger;
144
+ declare const index_ClientLoggerConfig: typeof ClientLoggerConfig;
145
+ declare const index_EventEmitter: typeof EventEmitter;
146
+ declare const index_HttpClientOptions: typeof HttpClientOptions;
147
+ declare const index_LogLevel: typeof LogLevel;
148
+ declare const index_PaginatedResponse: typeof PaginatedResponse;
149
+ type index_SetValue<T> = SetValue<T>;
150
+ type index_SnackbarSeverity = SnackbarSeverity;
151
+ type index_SnackbarState = SnackbarState;
152
+ type index_ThemeMode = ThemeMode;
153
+ type index_UseCopyToClipboardReturn = UseCopyToClipboardReturn;
154
+ type index_UseLocalStorageOptions<T> = UseLocalStorageOptions<T>;
155
+ type index_UsePageTitleOptions = UsePageTitleOptions;
156
+ type index_UseSnackbarReturn = UseSnackbarReturn;
157
+ type index_WindowSize = WindowSize;
158
+ declare const index_addDays: typeof addDays;
159
+ declare const index_appEvents: typeof appEvents;
160
+ declare const index_camelToKebab: typeof camelToKebab;
161
+ declare const index_capitalize: typeof capitalize;
162
+ declare const index_capitalizeWords: typeof capitalizeWords;
163
+ declare const index_clientLogger: typeof clientLogger;
164
+ declare const index_copyToClipboard: typeof copyToClipboard;
165
+ declare const index_createApiEndpoints: typeof createApiEndpoints;
166
+ declare const index_createApiUrlBuilder: typeof createApiUrlBuilder;
167
+ declare const index_createClientLogger: typeof createClientLogger;
168
+ declare const index_createEmptyPaginationMeta: typeof createEmptyPaginationMeta;
169
+ declare const index_createErrorResponse: typeof createErrorResponse;
170
+ declare const index_createEventEmitter: typeof createEventEmitter;
171
+ declare const index_createHttpClient: typeof createHttpClient;
172
+ declare const index_createSuccessResponse: typeof createSuccessResponse;
173
+ declare const index_endOfDay: typeof endOfDay;
174
+ declare const index_formatDate: typeof formatDate;
175
+ declare const index_formatDateForInput: typeof formatDateForInput;
176
+ declare const index_formatDateTime: typeof formatDateTime;
177
+ declare const index_formatDateTimeForInput: typeof formatDateTimeForInput;
178
+ declare const index_formatRelativeTime: typeof formatRelativeTime;
179
+ declare const index_getErrorMessage: typeof getErrorMessage;
180
+ declare const index_getNextPage: typeof getNextPage;
181
+ declare const index_getPrevPage: typeof getPrevPage;
182
+ declare const index_getResponseData: typeof getResponseData;
183
+ declare const index_hasData: typeof hasData;
184
+ declare const index_hasMorePages: typeof hasMorePages;
185
+ declare const index_isClipboardAvailable: typeof isClipboardAvailable;
186
+ declare const index_isErrorResponse: typeof isErrorResponse;
187
+ declare const index_isForbidden: typeof isForbidden;
188
+ declare const index_isFuture: typeof isFuture;
189
+ declare const index_isNotFound: typeof isNotFound;
190
+ declare const index_isPast: typeof isPast;
191
+ declare const index_isServerError: typeof isServerError;
192
+ declare const index_isStatusError: typeof isStatusError;
193
+ declare const index_isSuccess: typeof isSuccess;
194
+ declare const index_isSuccessResponse: typeof isSuccessResponse;
195
+ declare const index_isToday: typeof isToday;
196
+ declare const index_isUnauthorized: typeof isUnauthorized;
197
+ declare const index_kebabToCamel: typeof kebabToCamel;
198
+ declare const index_parseError: typeof parseError;
199
+ declare const index_parseFullResponse: typeof parseFullResponse;
200
+ declare const index_parseResponse: typeof parseResponse;
201
+ declare const index_readFromClipboard: typeof readFromClipboard;
202
+ declare const index_slugify: typeof slugify;
203
+ declare const index_slugifyUnique: typeof slugifyUnique;
204
+ declare const index_startOfDay: typeof startOfDay;
205
+ declare const index_truncate: typeof truncate;
206
+ declare const index_truncateWords: typeof truncateWords;
207
+ declare const index_unslugify: typeof unslugify;
208
+ declare const index_useCopyToClipboard: typeof useCopyToClipboard;
209
+ declare const index_useDebounce: typeof useDebounce;
210
+ declare const index_useInterval: typeof useInterval;
211
+ declare const index_useIsDesktop: typeof useIsDesktop;
212
+ declare const index_useIsMobile: typeof useIsMobile;
213
+ declare const index_useIsMobileOrTablet: typeof useIsMobileOrTablet;
214
+ declare const index_useIsTablet: typeof useIsTablet;
215
+ declare const index_useLocalStorage: typeof useLocalStorage;
216
+ declare const index_useMediaQuery: typeof useMediaQuery;
217
+ declare const index_useOnClickOutside: typeof useOnClickOutside;
218
+ declare const index_usePageTitle: typeof usePageTitle;
219
+ declare const index_useSnackbar: typeof useSnackbar;
220
+ declare const index_useThemeDetector: typeof useThemeDetector;
221
+ declare const index_useWindowSize: typeof useWindowSize;
222
+ declare const index_withAbortSignal: typeof withAbortSignal;
223
+ declare const index_withFormData: typeof withFormData;
224
+ declare const index_withTimeout: typeof withTimeout;
225
+ declare namespace index {
226
+ export { index_ApiResponse as ApiResponse, index_ApiUrlBuilder as ApiUrlBuilder, index_ApiUrlConfig as ApiUrlConfig, index_ClientLogger as ClientLogger, index_ClientLoggerConfig as ClientLoggerConfig, index_EventEmitter as EventEmitter, index_HttpClientOptions as HttpClientOptions, index_LogLevel as LogLevel, index_PaginatedResponse as PaginatedResponse, type index_SetValue as SetValue, type index_SnackbarSeverity as SnackbarSeverity, type index_SnackbarState as SnackbarState, type index_ThemeMode as ThemeMode, type index_UseCopyToClipboardReturn as UseCopyToClipboardReturn, type index_UseLocalStorageOptions as UseLocalStorageOptions, type index_UsePageTitleOptions as UsePageTitleOptions, type index_UseSnackbarReturn as UseSnackbarReturn, type index_WindowSize as WindowSize, index_addDays as addDays, index_appEvents as appEvents, index_camelToKebab as camelToKebab, index_capitalize as capitalize, index_capitalizeWords as capitalizeWords, index_clientLogger as clientLogger, index_copyToClipboard as copyToClipboard, index_createApiEndpoints as createApiEndpoints, index_createApiUrlBuilder as createApiUrlBuilder, index_createClientLogger as createClientLogger, index_createEmptyPaginationMeta as createEmptyPaginationMeta, index_createErrorResponse as createErrorResponse, index_createEventEmitter as createEventEmitter, index_createHttpClient as createHttpClient, index_createSuccessResponse as createSuccessResponse, index_endOfDay as endOfDay, index_formatDate as formatDate, index_formatDateForInput as formatDateForInput, index_formatDateTime as formatDateTime, index_formatDateTimeForInput as formatDateTimeForInput, index_formatRelativeTime as formatRelativeTime, index_getErrorMessage as getErrorMessage, index_getNextPage as getNextPage, index_getPrevPage as getPrevPage, index_getResponseData as getResponseData, index_hasData as hasData, index_hasMorePages as hasMorePages, index_isClipboardAvailable as isClipboardAvailable, index_isErrorResponse as isErrorResponse, index_isForbidden as isForbidden, index_isFuture as isFuture, index_isNotFound as isNotFound, index_isPast as isPast, index_isServerError as isServerError, index_isStatusError as isStatusError, index_isSuccess as isSuccess, index_isSuccessResponse as isSuccessResponse, index_isToday as isToday, index_isUnauthorized as isUnauthorized, index_kebabToCamel as kebabToCamel, index_parseError as parseError, index_parseFullResponse as parseFullResponse, index_parseResponse as parseResponse, index_readFromClipboard as readFromClipboard, index_slugify as slugify, index_slugifyUnique as slugifyUnique, index_startOfDay as startOfDay, index_truncate as truncate, index_truncateWords as truncateWords, index_unslugify as unslugify, index_useCopyToClipboard as useCopyToClipboard, index_useDebounce as useDebounce, index_useInterval as useInterval, index_useIsDesktop as useIsDesktop, index_useIsMobile as useIsMobile, index_useIsMobileOrTablet as useIsMobileOrTablet, index_useIsTablet as useIsTablet, index_useLocalStorage as useLocalStorage, index_useMediaQuery as useMediaQuery, index_useOnClickOutside as useOnClickOutside, index_usePageTitle as usePageTitle, index_useSnackbar as useSnackbar, index_useThemeDetector as useThemeDetector, index_useWindowSize as useWindowSize, index_withAbortSignal as withAbortSignal, index_withFormData as withFormData, index_withTimeout as withTimeout };
227
+ }
228
+
229
+ export { type SetValue as S, type ThemeMode as T, type UseLocalStorageOptions as U, type WindowSize as W, useDebounce as a, useCopyToClipboard as b, usePageTitle as c, useInterval as d, useThemeDetector as e, useSnackbar as f, useMediaQuery as g, useOnClickOutside as h, index as i, useWindowSize as j, type UseCopyToClipboardReturn as k, type UsePageTitleOptions as l, type SnackbarSeverity as m, type SnackbarState as n, type UseSnackbarReturn as o, useIsMobile as p, useIsTablet as q, useIsDesktop as r, useIsMobileOrTablet as s, useLocalStorage as u };
@@ -0,0 +1,59 @@
1
+ import { ApiResponse, ColumnMetadata, PaginationData, badRequestResponse, conflictResponse, createdResponse, errorResponse, extractColumns, forbiddenResponse, noContentResponse, notFoundResponse, rateLimitResponse, successResponse, successResponseArr, unauthorizedResponse, validationErrorResponse } from './server/response/index.js';
2
+ import { StatusCode, StatusMessage, statusCode, statusMessage } from './server/enums/index.js';
3
+ import { LoggerConfig, createLogger, createMorganStream, logger, simpleLogger, stream } from './server/logger/index.js';
4
+ import { DbConnectionOptions, connectDB, disconnectDB, getConnectionStatus } from './server/db/index.js';
5
+ import { AuthRequest, JWTPayload, authenticateApiKey, authenticateJWT, extractOrganization, optionalAuthenticateJWT, requireOrganization } from './server/middleware/index.js';
6
+ import { FilterOptions, PaginationOptions, PaginationResult, buildFilter, buildPagination, buildPaginationMeta, omitFields, pickFields, sanitizeDocument, sanitizeUser } from './server/utils/index.js';
7
+
8
+ declare const index_ApiResponse: typeof ApiResponse;
9
+ declare const index_AuthRequest: typeof AuthRequest;
10
+ declare const index_ColumnMetadata: typeof ColumnMetadata;
11
+ declare const index_DbConnectionOptions: typeof DbConnectionOptions;
12
+ declare const index_FilterOptions: typeof FilterOptions;
13
+ declare const index_JWTPayload: typeof JWTPayload;
14
+ declare const index_LoggerConfig: typeof LoggerConfig;
15
+ declare const index_PaginationData: typeof PaginationData;
16
+ declare const index_PaginationOptions: typeof PaginationOptions;
17
+ declare const index_PaginationResult: typeof PaginationResult;
18
+ declare const index_StatusCode: typeof StatusCode;
19
+ declare const index_StatusMessage: typeof StatusMessage;
20
+ declare const index_authenticateApiKey: typeof authenticateApiKey;
21
+ declare const index_authenticateJWT: typeof authenticateJWT;
22
+ declare const index_badRequestResponse: typeof badRequestResponse;
23
+ declare const index_buildFilter: typeof buildFilter;
24
+ declare const index_buildPagination: typeof buildPagination;
25
+ declare const index_buildPaginationMeta: typeof buildPaginationMeta;
26
+ declare const index_conflictResponse: typeof conflictResponse;
27
+ declare const index_connectDB: typeof connectDB;
28
+ declare const index_createLogger: typeof createLogger;
29
+ declare const index_createMorganStream: typeof createMorganStream;
30
+ declare const index_createdResponse: typeof createdResponse;
31
+ declare const index_disconnectDB: typeof disconnectDB;
32
+ declare const index_errorResponse: typeof errorResponse;
33
+ declare const index_extractColumns: typeof extractColumns;
34
+ declare const index_extractOrganization: typeof extractOrganization;
35
+ declare const index_forbiddenResponse: typeof forbiddenResponse;
36
+ declare const index_getConnectionStatus: typeof getConnectionStatus;
37
+ declare const index_logger: typeof logger;
38
+ declare const index_noContentResponse: typeof noContentResponse;
39
+ declare const index_notFoundResponse: typeof notFoundResponse;
40
+ declare const index_omitFields: typeof omitFields;
41
+ declare const index_optionalAuthenticateJWT: typeof optionalAuthenticateJWT;
42
+ declare const index_pickFields: typeof pickFields;
43
+ declare const index_rateLimitResponse: typeof rateLimitResponse;
44
+ declare const index_requireOrganization: typeof requireOrganization;
45
+ declare const index_sanitizeDocument: typeof sanitizeDocument;
46
+ declare const index_sanitizeUser: typeof sanitizeUser;
47
+ declare const index_simpleLogger: typeof simpleLogger;
48
+ declare const index_statusCode: typeof statusCode;
49
+ declare const index_statusMessage: typeof statusMessage;
50
+ declare const index_stream: typeof stream;
51
+ declare const index_successResponse: typeof successResponse;
52
+ declare const index_successResponseArr: typeof successResponseArr;
53
+ declare const index_unauthorizedResponse: typeof unauthorizedResponse;
54
+ declare const index_validationErrorResponse: typeof validationErrorResponse;
55
+ declare namespace index {
56
+ export { index_ApiResponse as ApiResponse, index_AuthRequest as AuthRequest, index_ColumnMetadata as ColumnMetadata, index_DbConnectionOptions as DbConnectionOptions, index_FilterOptions as FilterOptions, index_JWTPayload as JWTPayload, index_LoggerConfig as LoggerConfig, index_PaginationData as PaginationData, index_PaginationOptions as PaginationOptions, index_PaginationResult as PaginationResult, index_StatusCode as StatusCode, index_StatusMessage as StatusMessage, index_authenticateApiKey as authenticateApiKey, index_authenticateJWT as authenticateJWT, index_badRequestResponse as badRequestResponse, index_buildFilter as buildFilter, index_buildPagination as buildPagination, index_buildPaginationMeta as buildPaginationMeta, index_conflictResponse as conflictResponse, index_connectDB as connectDB, index_createLogger as createLogger, index_createMorganStream as createMorganStream, index_createdResponse as createdResponse, index_disconnectDB as disconnectDB, index_errorResponse as errorResponse, index_extractColumns as extractColumns, index_extractOrganization as extractOrganization, index_forbiddenResponse as forbiddenResponse, index_getConnectionStatus as getConnectionStatus, index_logger as logger, index_noContentResponse as noContentResponse, index_notFoundResponse as notFoundResponse, index_omitFields as omitFields, index_optionalAuthenticateJWT as optionalAuthenticateJWT, index_pickFields as pickFields, index_rateLimitResponse as rateLimitResponse, index_requireOrganization as requireOrganization, index_sanitizeDocument as sanitizeDocument, index_sanitizeUser as sanitizeUser, index_simpleLogger as simpleLogger, index_statusCode as statusCode, index_statusMessage as statusMessage, index_stream as stream, index_successResponse as successResponse, index_successResponseArr as successResponseArr, index_unauthorizedResponse as unauthorizedResponse, index_validationErrorResponse as validationErrorResponse };
57
+ }
58
+
59
+ export { index as i };
@@ -0,0 +1,171 @@
1
+ export { i as server } from './index-CcrANHAQ.mjs';
2
+ export { i as client } from './index-Du0LLt9f.mjs';
3
+ export { i as shared } from './index-DSW6JfD-.mjs';
4
+ import './server/response/index.mjs';
5
+ import 'express';
6
+ import './server/enums/index.mjs';
7
+ import './server/logger/index.mjs';
8
+ import 'winston';
9
+ import './server/db/index.mjs';
10
+ import 'mongoose';
11
+ import './server/middleware/index.mjs';
12
+ import './server/utils/index.mjs';
13
+ import './client/http/index.mjs';
14
+ import 'axios';
15
+ import './client/logger/index.mjs';
16
+ import './client/utils/index.mjs';
17
+ import './response.types-D--UhLJq.mjs';
18
+ import 'react';
19
+ import 'date-fns';
20
+ import 'date-fns-tz';
21
+
22
+ /**
23
+ * Country with nested cities data
24
+ */
25
+ interface City {
26
+ name: string;
27
+ stateCode?: string;
28
+ }
29
+ interface State {
30
+ name: string;
31
+ code: string;
32
+ cities: City[];
33
+ }
34
+ interface Country {
35
+ name: string;
36
+ code: string;
37
+ code3: string;
38
+ phoneCode: string;
39
+ currency: string;
40
+ currencySymbol: string;
41
+ continent: string;
42
+ capital: string;
43
+ timezone: string;
44
+ states: State[];
45
+ }
46
+ declare const countries: Country[];
47
+ declare const getCountryByCode: (code: string) => Country | undefined;
48
+ declare const getCountryByName: (name: string) => Country | undefined;
49
+ declare const getStatesByCountry: (countryCode: string) => State[];
50
+ declare const getCitiesByState: (countryCode: string, stateCode: string) => City[];
51
+ declare const getAllCities: (countryCode: string) => City[];
52
+ declare const getCountriesByContinent: (continent: string) => Country[];
53
+ declare const searchCountries: (query: string) => Country[];
54
+
55
+ /**
56
+ * Phone codes by country
57
+ */
58
+ interface PhoneCode {
59
+ country: string;
60
+ code: string;
61
+ phoneCode: string;
62
+ flag: string;
63
+ }
64
+ declare const phoneCodes: PhoneCode[];
65
+ declare const getPhoneCodeByCountry: (countryCode: string) => PhoneCode | undefined;
66
+ declare const searchPhoneCodes: (query: string) => PhoneCode[];
67
+ declare const getPhoneCodesByPrefix: (prefix: string) => PhoneCode[];
68
+
69
+ /**
70
+ * Currency data with symbols and formatting
71
+ */
72
+ interface Currency {
73
+ code: string;
74
+ name: string;
75
+ symbol: string;
76
+ symbolNative: string;
77
+ decimalDigits: number;
78
+ rounding: number;
79
+ namePlural: string;
80
+ }
81
+ declare const currencies: Currency[];
82
+ declare const getCurrencyByCode: (code: string) => Currency | undefined;
83
+ declare const searchCurrencies: (query: string) => Currency[];
84
+ declare const formatCurrency: (amount: number, currencyCode: string, locale?: string) => string;
85
+ declare const formatCurrencyNative: (amount: number, currencyCode: string) => string;
86
+
87
+ /**
88
+ * Timezones data with UTC offsets
89
+ */
90
+ interface Timezone {
91
+ name: string;
92
+ label: string;
93
+ offset: string;
94
+ offsetMinutes: number;
95
+ }
96
+ declare const timezones: Timezone[];
97
+ declare const getTimezoneByName: (name: string) => Timezone | undefined;
98
+ declare const searchTimezones: (query: string) => Timezone[];
99
+ declare const getTimezonesByOffset: (offsetMinutes: number) => Timezone[];
100
+ declare const sortTimezonesByOffset: (ascending?: boolean) => Timezone[];
101
+
102
+ /**
103
+ * Company Logos for all 5 Exyconn projects
104
+ * Contains light and dark mode variants
105
+ */
106
+ interface LogoVariants {
107
+ light: string;
108
+ dark: string;
109
+ }
110
+ interface Logo {
111
+ full: LogoVariants;
112
+ icon: LogoVariants;
113
+ favicon: string;
114
+ }
115
+ interface CompanyBrand {
116
+ name: string;
117
+ domain: string;
118
+ tagline: string;
119
+ primaryColor: string;
120
+ secondaryColor: string;
121
+ logo: Logo;
122
+ }
123
+ declare const brands: Record<string, CompanyBrand>;
124
+ declare const getBrand: (key: string) => CompanyBrand | undefined;
125
+ declare const getBrandByDomain: (domain: string) => CompanyBrand | undefined;
126
+ declare const getLogo: (brandKey: string, mode: "light" | "dark", type?: "full" | "icon") => string | undefined;
127
+ declare const getAllBrands: () => CompanyBrand[];
128
+ declare const getAllBrandKeys: () => string[];
129
+
130
+ type index_City = City;
131
+ type index_CompanyBrand = CompanyBrand;
132
+ type index_Country = Country;
133
+ type index_Currency = Currency;
134
+ type index_Logo = Logo;
135
+ type index_LogoVariants = LogoVariants;
136
+ type index_PhoneCode = PhoneCode;
137
+ type index_State = State;
138
+ type index_Timezone = Timezone;
139
+ declare const index_brands: typeof brands;
140
+ declare const index_countries: typeof countries;
141
+ declare const index_currencies: typeof currencies;
142
+ declare const index_formatCurrency: typeof formatCurrency;
143
+ declare const index_formatCurrencyNative: typeof formatCurrencyNative;
144
+ declare const index_getAllBrandKeys: typeof getAllBrandKeys;
145
+ declare const index_getAllBrands: typeof getAllBrands;
146
+ declare const index_getAllCities: typeof getAllCities;
147
+ declare const index_getBrand: typeof getBrand;
148
+ declare const index_getBrandByDomain: typeof getBrandByDomain;
149
+ declare const index_getCitiesByState: typeof getCitiesByState;
150
+ declare const index_getCountriesByContinent: typeof getCountriesByContinent;
151
+ declare const index_getCountryByCode: typeof getCountryByCode;
152
+ declare const index_getCountryByName: typeof getCountryByName;
153
+ declare const index_getCurrencyByCode: typeof getCurrencyByCode;
154
+ declare const index_getLogo: typeof getLogo;
155
+ declare const index_getPhoneCodeByCountry: typeof getPhoneCodeByCountry;
156
+ declare const index_getPhoneCodesByPrefix: typeof getPhoneCodesByPrefix;
157
+ declare const index_getStatesByCountry: typeof getStatesByCountry;
158
+ declare const index_getTimezoneByName: typeof getTimezoneByName;
159
+ declare const index_getTimezonesByOffset: typeof getTimezonesByOffset;
160
+ declare const index_phoneCodes: typeof phoneCodes;
161
+ declare const index_searchCountries: typeof searchCountries;
162
+ declare const index_searchCurrencies: typeof searchCurrencies;
163
+ declare const index_searchPhoneCodes: typeof searchPhoneCodes;
164
+ declare const index_searchTimezones: typeof searchTimezones;
165
+ declare const index_sortTimezonesByOffset: typeof sortTimezonesByOffset;
166
+ declare const index_timezones: typeof timezones;
167
+ declare namespace index {
168
+ export { type index_City as City, type index_CompanyBrand as CompanyBrand, type index_Country as Country, type index_Currency as Currency, type index_Logo as Logo, type index_LogoVariants as LogoVariants, type index_PhoneCode as PhoneCode, type index_State as State, type index_Timezone as Timezone, index_brands as brands, index_countries as countries, index_currencies as currencies, index_formatCurrency as formatCurrency, index_formatCurrencyNative as formatCurrencyNative, index_getAllBrandKeys as getAllBrandKeys, index_getAllBrands as getAllBrands, index_getAllCities as getAllCities, index_getBrand as getBrand, index_getBrandByDomain as getBrandByDomain, index_getCitiesByState as getCitiesByState, index_getCountriesByContinent as getCountriesByContinent, index_getCountryByCode as getCountryByCode, index_getCountryByName as getCountryByName, index_getCurrencyByCode as getCurrencyByCode, index_getLogo as getLogo, index_getPhoneCodeByCountry as getPhoneCodeByCountry, index_getPhoneCodesByPrefix as getPhoneCodesByPrefix, index_getStatesByCountry as getStatesByCountry, index_getTimezoneByName as getTimezoneByName, index_getTimezonesByOffset as getTimezonesByOffset, index_phoneCodes as phoneCodes, index_searchCountries as searchCountries, index_searchCurrencies as searchCurrencies, index_searchPhoneCodes as searchPhoneCodes, index_searchTimezones as searchTimezones, index_sortTimezonesByOffset as sortTimezonesByOffset, index_timezones as timezones };
169
+ }
170
+
171
+ export { index as data };
@@ -0,0 +1,171 @@
1
+ export { i as server } from './index-iTKxFa78.js';
2
+ export { i as client } from './index-BNdT-2X4.js';
3
+ export { i as shared } from './index-ClWtDfwk.js';
4
+ import './server/response/index.js';
5
+ import 'express';
6
+ import './server/enums/index.js';
7
+ import './server/logger/index.js';
8
+ import 'winston';
9
+ import './server/db/index.js';
10
+ import 'mongoose';
11
+ import './server/middleware/index.js';
12
+ import './server/utils/index.js';
13
+ import './client/http/index.js';
14
+ import 'axios';
15
+ import './client/logger/index.js';
16
+ import './client/utils/index.js';
17
+ import './response.types-D--UhLJq.js';
18
+ import 'react';
19
+ import 'date-fns';
20
+ import 'date-fns-tz';
21
+
22
+ /**
23
+ * Country with nested cities data
24
+ */
25
+ interface City {
26
+ name: string;
27
+ stateCode?: string;
28
+ }
29
+ interface State {
30
+ name: string;
31
+ code: string;
32
+ cities: City[];
33
+ }
34
+ interface Country {
35
+ name: string;
36
+ code: string;
37
+ code3: string;
38
+ phoneCode: string;
39
+ currency: string;
40
+ currencySymbol: string;
41
+ continent: string;
42
+ capital: string;
43
+ timezone: string;
44
+ states: State[];
45
+ }
46
+ declare const countries: Country[];
47
+ declare const getCountryByCode: (code: string) => Country | undefined;
48
+ declare const getCountryByName: (name: string) => Country | undefined;
49
+ declare const getStatesByCountry: (countryCode: string) => State[];
50
+ declare const getCitiesByState: (countryCode: string, stateCode: string) => City[];
51
+ declare const getAllCities: (countryCode: string) => City[];
52
+ declare const getCountriesByContinent: (continent: string) => Country[];
53
+ declare const searchCountries: (query: string) => Country[];
54
+
55
+ /**
56
+ * Phone codes by country
57
+ */
58
+ interface PhoneCode {
59
+ country: string;
60
+ code: string;
61
+ phoneCode: string;
62
+ flag: string;
63
+ }
64
+ declare const phoneCodes: PhoneCode[];
65
+ declare const getPhoneCodeByCountry: (countryCode: string) => PhoneCode | undefined;
66
+ declare const searchPhoneCodes: (query: string) => PhoneCode[];
67
+ declare const getPhoneCodesByPrefix: (prefix: string) => PhoneCode[];
68
+
69
+ /**
70
+ * Currency data with symbols and formatting
71
+ */
72
+ interface Currency {
73
+ code: string;
74
+ name: string;
75
+ symbol: string;
76
+ symbolNative: string;
77
+ decimalDigits: number;
78
+ rounding: number;
79
+ namePlural: string;
80
+ }
81
+ declare const currencies: Currency[];
82
+ declare const getCurrencyByCode: (code: string) => Currency | undefined;
83
+ declare const searchCurrencies: (query: string) => Currency[];
84
+ declare const formatCurrency: (amount: number, currencyCode: string, locale?: string) => string;
85
+ declare const formatCurrencyNative: (amount: number, currencyCode: string) => string;
86
+
87
+ /**
88
+ * Timezones data with UTC offsets
89
+ */
90
+ interface Timezone {
91
+ name: string;
92
+ label: string;
93
+ offset: string;
94
+ offsetMinutes: number;
95
+ }
96
+ declare const timezones: Timezone[];
97
+ declare const getTimezoneByName: (name: string) => Timezone | undefined;
98
+ declare const searchTimezones: (query: string) => Timezone[];
99
+ declare const getTimezonesByOffset: (offsetMinutes: number) => Timezone[];
100
+ declare const sortTimezonesByOffset: (ascending?: boolean) => Timezone[];
101
+
102
+ /**
103
+ * Company Logos for all 5 Exyconn projects
104
+ * Contains light and dark mode variants
105
+ */
106
+ interface LogoVariants {
107
+ light: string;
108
+ dark: string;
109
+ }
110
+ interface Logo {
111
+ full: LogoVariants;
112
+ icon: LogoVariants;
113
+ favicon: string;
114
+ }
115
+ interface CompanyBrand {
116
+ name: string;
117
+ domain: string;
118
+ tagline: string;
119
+ primaryColor: string;
120
+ secondaryColor: string;
121
+ logo: Logo;
122
+ }
123
+ declare const brands: Record<string, CompanyBrand>;
124
+ declare const getBrand: (key: string) => CompanyBrand | undefined;
125
+ declare const getBrandByDomain: (domain: string) => CompanyBrand | undefined;
126
+ declare const getLogo: (brandKey: string, mode: "light" | "dark", type?: "full" | "icon") => string | undefined;
127
+ declare const getAllBrands: () => CompanyBrand[];
128
+ declare const getAllBrandKeys: () => string[];
129
+
130
+ type index_City = City;
131
+ type index_CompanyBrand = CompanyBrand;
132
+ type index_Country = Country;
133
+ type index_Currency = Currency;
134
+ type index_Logo = Logo;
135
+ type index_LogoVariants = LogoVariants;
136
+ type index_PhoneCode = PhoneCode;
137
+ type index_State = State;
138
+ type index_Timezone = Timezone;
139
+ declare const index_brands: typeof brands;
140
+ declare const index_countries: typeof countries;
141
+ declare const index_currencies: typeof currencies;
142
+ declare const index_formatCurrency: typeof formatCurrency;
143
+ declare const index_formatCurrencyNative: typeof formatCurrencyNative;
144
+ declare const index_getAllBrandKeys: typeof getAllBrandKeys;
145
+ declare const index_getAllBrands: typeof getAllBrands;
146
+ declare const index_getAllCities: typeof getAllCities;
147
+ declare const index_getBrand: typeof getBrand;
148
+ declare const index_getBrandByDomain: typeof getBrandByDomain;
149
+ declare const index_getCitiesByState: typeof getCitiesByState;
150
+ declare const index_getCountriesByContinent: typeof getCountriesByContinent;
151
+ declare const index_getCountryByCode: typeof getCountryByCode;
152
+ declare const index_getCountryByName: typeof getCountryByName;
153
+ declare const index_getCurrencyByCode: typeof getCurrencyByCode;
154
+ declare const index_getLogo: typeof getLogo;
155
+ declare const index_getPhoneCodeByCountry: typeof getPhoneCodeByCountry;
156
+ declare const index_getPhoneCodesByPrefix: typeof getPhoneCodesByPrefix;
157
+ declare const index_getStatesByCountry: typeof getStatesByCountry;
158
+ declare const index_getTimezoneByName: typeof getTimezoneByName;
159
+ declare const index_getTimezonesByOffset: typeof getTimezonesByOffset;
160
+ declare const index_phoneCodes: typeof phoneCodes;
161
+ declare const index_searchCountries: typeof searchCountries;
162
+ declare const index_searchCurrencies: typeof searchCurrencies;
163
+ declare const index_searchPhoneCodes: typeof searchPhoneCodes;
164
+ declare const index_searchTimezones: typeof searchTimezones;
165
+ declare const index_sortTimezonesByOffset: typeof sortTimezonesByOffset;
166
+ declare const index_timezones: typeof timezones;
167
+ declare namespace index {
168
+ export { type index_City as City, type index_CompanyBrand as CompanyBrand, type index_Country as Country, type index_Currency as Currency, type index_Logo as Logo, type index_LogoVariants as LogoVariants, type index_PhoneCode as PhoneCode, type index_State as State, type index_Timezone as Timezone, index_brands as brands, index_countries as countries, index_currencies as currencies, index_formatCurrency as formatCurrency, index_formatCurrencyNative as formatCurrencyNative, index_getAllBrandKeys as getAllBrandKeys, index_getAllBrands as getAllBrands, index_getAllCities as getAllCities, index_getBrand as getBrand, index_getBrandByDomain as getBrandByDomain, index_getCitiesByState as getCitiesByState, index_getCountriesByContinent as getCountriesByContinent, index_getCountryByCode as getCountryByCode, index_getCountryByName as getCountryByName, index_getCurrencyByCode as getCurrencyByCode, index_getLogo as getLogo, index_getPhoneCodeByCountry as getPhoneCodeByCountry, index_getPhoneCodesByPrefix as getPhoneCodesByPrefix, index_getStatesByCountry as getStatesByCountry, index_getTimezoneByName as getTimezoneByName, index_getTimezonesByOffset as getTimezonesByOffset, index_phoneCodes as phoneCodes, index_searchCountries as searchCountries, index_searchCurrencies as searchCurrencies, index_searchPhoneCodes as searchPhoneCodes, index_searchTimezones as searchTimezones, index_sortTimezonesByOffset as sortTimezonesByOffset, index_timezones as timezones };
169
+ }
170
+
171
+ export { index as data };