@futdevpro/fsm-dynamo 1.14.12 → 1.14.13

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 (123) hide show
  1. package/build/_collections/utils/async.util.js +3 -5
  2. package/build/_collections/utils/async.util.js.map +1 -1
  3. package/build/_collections/utils/log.util.js +48 -50
  4. package/build/_collections/utils/log.util.js.map +1 -1
  5. package/build/_collections/utils/math/box-bounds.util.js +6 -2
  6. package/build/_collections/utils/math/box-bounds.util.js.map +1 -1
  7. package/build/_collections/utils/math/math.util.js +1 -3
  8. package/build/_collections/utils/math/math.util.js.map +1 -1
  9. package/build/_collections/utils/math/vector2.util.js +60 -62
  10. package/build/_collections/utils/math/vector2.util.js.map +1 -1
  11. package/build/_collections/utils/object.util.js +7 -9
  12. package/build/_collections/utils/object.util.js.map +1 -1
  13. package/build/_collections/utils/stack.util.spec.js +13 -0
  14. package/build/_collections/utils/stack.util.spec.js.map +1 -1
  15. package/build/_collections/utils/time.util.js +28 -28
  16. package/build/_collections/utils/time.util.js.map +1 -1
  17. package/build/_models/control-models/data-model-params.control-model.js +21 -0
  18. package/build/_models/control-models/data-model-params.control-model.js.map +1 -1
  19. package/build/_models/control-models/data-property-params.control-model.js +59 -3
  20. package/build/_models/control-models/data-property-params.control-model.js.map +1 -1
  21. package/build/_models/control-models/error.control-model.js +25 -8
  22. package/build/_models/control-models/error.control-model.js.map +1 -1
  23. package/build/_models/control-models/http/http-error-response.control-model.js +7 -5
  24. package/build/_models/control-models/http/http-error-response.control-model.js.map +1 -1
  25. package/build/_models/control-models/http/http-headers.control-model.js +17 -4
  26. package/build/_models/control-models/http/http-headers.control-model.js.map +1 -1
  27. package/build/_models/control-models/http/http-response.model-base.js +26 -14
  28. package/build/_models/control-models/http/http-response.model-base.js.map +1 -1
  29. package/build/_models/control-models/poll.control-model.js +26 -4
  30. package/build/_models/control-models/poll.control-model.js.map +1 -1
  31. package/build/_models/control-models/range-value.control-model.js +4 -2
  32. package/build/_models/control-models/range-value.control-model.js.map +1 -1
  33. package/build/_models/control-models/server-status.control-model.js +12 -0
  34. package/build/_models/control-models/server-status.control-model.js.map +1 -1
  35. package/build/_models/control-models/service-endpoint-settings-base.control-model.js +14 -1
  36. package/build/_models/control-models/service-endpoint-settings-base.control-model.js.map +1 -1
  37. package/build/_models/data-models/errors.data-model.js +18 -3
  38. package/build/_models/data-models/errors.data-model.js.map +1 -1
  39. package/build/_models/data-models/metadata.data-model.js +12 -0
  40. package/build/_models/data-models/metadata.data-model.js.map +1 -1
  41. package/build/_modules/ai/_models/ai-call-settings.interface.js +49 -46
  42. package/build/_modules/ai/_models/ai-call-settings.interface.js.map +1 -1
  43. package/build/_modules/ai/_models/ai-settings.interface.js +3 -0
  44. package/build/_modules/ai/_models/ai-settings.interface.js.map +1 -1
  45. package/build/_modules/ai/_modules/anthropic/_models/aai-call-settings.control-model.js +2 -2
  46. package/build/_modules/ai/_modules/anthropic/_models/aai-call-settings.control-model.js.map +1 -1
  47. package/build/_modules/ai/_modules/anthropic/_models/aai-settings.control-model.js +3 -3
  48. package/build/_modules/ai/_modules/anthropic/_models/aai-settings.control-model.js.map +1 -1
  49. package/build/_modules/ai/_modules/google-ai/_models/gai-call-settings.control-model.js +2 -2
  50. package/build/_modules/ai/_modules/google-ai/_models/gai-call-settings.control-model.js.map +1 -1
  51. package/build/_modules/ai/_modules/google-ai/_models/gai-settings.control-model.js +3 -3
  52. package/build/_modules/ai/_modules/google-ai/_models/gai-settings.control-model.js.map +1 -1
  53. package/build/_modules/ai/_modules/local-ai/_models/lai-call-settings.control-model.js +1 -1
  54. package/build/_modules/ai/_modules/local-ai/_models/lai-call-settings.control-model.js.map +1 -1
  55. package/build/_modules/ai/_modules/local-ai/_models/lai-settings.control-model.js +3 -3
  56. package/build/_modules/ai/_modules/local-ai/_models/lai-settings.control-model.js.map +1 -1
  57. package/build/_modules/ai/_modules/open-ai/_models/oai-call-settings.control-model.js +2 -2
  58. package/build/_modules/ai/_modules/open-ai/_models/oai-call-settings.control-model.js.map +1 -1
  59. package/build/_modules/ai/_modules/open-ai/_models/oai-settings.control-model.js +3 -3
  60. package/build/_modules/ai/_modules/open-ai/_models/oai-settings.control-model.js.map +1 -1
  61. package/build/_modules/ci-tools/_models/cit-ci-result-info.data-models.js +12 -1
  62. package/build/_modules/ci-tools/_models/cit-ci-result-info.data-models.js.map +1 -1
  63. package/build/_modules/crypto/_collections/{crypto-2-non-stable.util.d.ts → crypto-v1.util.d.ts} +1 -1
  64. package/build/_modules/crypto/_collections/crypto-v1.util.d.ts.map +1 -0
  65. package/build/_modules/crypto/_collections/{crypto-2-non-stable.util.js → crypto-v1.util.js} +3 -3
  66. package/build/_modules/crypto/_collections/crypto-v1.util.js.map +1 -0
  67. package/build/_modules/crypto/_collections/{crypto-old.util.d.ts → crypto-v2.util.d.ts} +1 -1
  68. package/build/_modules/crypto/_collections/crypto-v2.util.d.ts.map +1 -0
  69. package/build/_modules/crypto/_collections/{crypto-old.util.js → crypto-v2.util.js} +9 -9
  70. package/build/_modules/crypto/_collections/crypto-v2.util.js.map +1 -0
  71. package/build/_modules/crypto/_collections/crypto-v4.util.d.ts +165 -0
  72. package/build/_modules/crypto/_collections/crypto-v4.util.d.ts.map +1 -0
  73. package/build/_modules/crypto/_collections/crypto-v4.util.js +611 -0
  74. package/build/_modules/crypto/_collections/crypto-v4.util.js.map +1 -0
  75. package/build/_modules/crypto/_collections/crypto.util.js +9 -9
  76. package/build/_modules/crypto/_collections/crypto.util.js.map +1 -1
  77. package/build/_modules/crypto/index.d.ts.map +1 -1
  78. package/build/_modules/crypto/index.js +7 -7
  79. package/build/_modules/crypto/index.js.map +1 -1
  80. package/build/_modules/custom-data/_models/cud.data-model.js +1 -0
  81. package/build/_modules/custom-data/_models/cud.data-model.js.map +1 -1
  82. package/build/_modules/data-handler/_models/data-handler-settings.control-model.js +42 -0
  83. package/build/_modules/data-handler/_models/data-handler-settings.control-model.js.map +1 -1
  84. package/build/_modules/data-handler/_models/data-handler.control-model.js +51 -11
  85. package/build/_modules/data-handler/_models/data-handler.control-model.js.map +1 -1
  86. package/build/_modules/data-handler/_models/data-list-handler.control-model.js +20 -0
  87. package/build/_modules/data-handler/_models/data-list-handler.control-model.js.map +1 -1
  88. package/build/_modules/data-handler/_models/data-search-handler.control-model.js +42 -36
  89. package/build/_modules/data-handler/_models/data-search-handler.control-model.js.map +1 -1
  90. package/build/_modules/data-handler/_models/list-collector-data-handler.control-model.js +25 -0
  91. package/build/_modules/data-handler/_models/list-collector-data-handler.control-model.js.map +1 -1
  92. package/build/_modules/location/_collections/loc-regions.util.js +4 -4
  93. package/build/_modules/location/_collections/loc-regions.util.js.map +1 -1
  94. package/build/_modules/messaging/_models/msg-conversation.data-model.js +23 -0
  95. package/build/_modules/messaging/_models/msg-conversation.data-model.js.map +1 -1
  96. package/build/_modules/messaging/_models/msg-message.data-model.js +34 -0
  97. package/build/_modules/messaging/_models/msg-message.data-model.js.map +1 -1
  98. package/build/_modules/socket/_models/sck-client-params.control-model.js +7 -2
  99. package/build/_modules/socket/_models/sck-client-params.control-model.js.map +1 -1
  100. package/build/_modules/socket/_models/sck-socket-event.control-model.js +8 -0
  101. package/build/_modules/socket/_models/sck-socket-event.control-model.js.map +1 -1
  102. package/build/_modules/socket/_services/sck-client.service-base.js +72 -69
  103. package/build/_modules/socket/_services/sck-client.service-base.js.map +1 -1
  104. package/build/_modules/usage/_models/usg-action.control-model.js +4 -0
  105. package/build/_modules/usage/_models/usg-action.control-model.js.map +1 -1
  106. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.js +12 -10
  107. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.js.map +1 -1
  108. package/build/_modules/usage/_models/usg-data.control-model.js +8 -2
  109. package/build/_modules/usage/_models/usg-data.control-model.js.map +1 -1
  110. package/build/_modules/usage/_models/usg-session.data-model.js +18 -2
  111. package/build/_modules/usage/_models/usg-session.data-model.js.map +1 -1
  112. package/futdevpro-fsm-dynamo-01.14.13.tgz +0 -0
  113. package/package.json +2 -2
  114. package/src/_modules/crypto/_collections/crypto-v4.util.ts +702 -0
  115. package/src/_modules/crypto/index.ts +4 -3
  116. package/tsconfig.json +2 -2
  117. package/build/_modules/crypto/_collections/crypto-2-non-stable.util.d.ts.map +0 -1
  118. package/build/_modules/crypto/_collections/crypto-2-non-stable.util.js.map +0 -1
  119. package/build/_modules/crypto/_collections/crypto-old.util.d.ts.map +0 -1
  120. package/build/_modules/crypto/_collections/crypto-old.util.js.map +0 -1
  121. package/futdevpro-fsm-dynamo-01.14.12.tgz +0 -0
  122. /package/src/_modules/crypto/_collections/{crypto-2-non-stable.util.ts → crypto-v1.util.ts} +0 -0
  123. /package/src/_modules/crypto/_collections/{crypto-old.util.ts → crypto-v2.util.ts} +0 -0
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Configuration options for encryption/decryption
3
+ */
4
+ export interface CryptoConfig {
5
+ ivLength?: number;
6
+ saltLength?: number;
7
+ keyIterations?: number;
8
+ keySize?: number;
9
+ }
10
+ /**
11
+ * A utility class for stable encryption and decryption of data
12
+ * Uses AES-256-CBC with deterministic IV and salt for consistent results across systems
13
+ * Prioritizes reliability and cross-platform compatibility over security
14
+ *
15
+ * @important DETERMINISTIC ENCRYPTION: This implementation produces identical encrypted
16
+ * output for identical input data and key across different systems and multiple calls.
17
+ * The same input will ALWAYS generate the same encrypted string on any platform.
18
+ *
19
+ * @warning SECURITY NOTICE: This deterministic behavior is intentional for cross-platform
20
+ * compatibility but reduces security. Identical inputs produce identical outputs, which
21
+ * can be exploited for pattern analysis attacks. Use only when consistency across
22
+ * systems is more important than cryptographic security.
23
+ */
24
+ export declare class DyFM_Crypto {
25
+ private static readonly CRYPTO_VERSION;
26
+ private static readonly DEFAULT_CONFIG;
27
+ private static readonly defaultErrorUserMsg;
28
+ private static keyCache;
29
+ private static readonly MAX_CACHE_SIZE;
30
+ /**
31
+ * Validates the input data and key with comprehensive error messages
32
+ * @throws {DyFM_Error} if validation fails
33
+ */
34
+ private static validateInput;
35
+ /**
36
+ * Validates data for encryption
37
+ */
38
+ private static validateEncryptData;
39
+ /**
40
+ * Validates data for decryption
41
+ */
42
+ private static validateDecryptData;
43
+ /**
44
+ * Generates a deterministic IV based on the input data and key
45
+ * Uses SHA-256 with proper truncation for maximum stability
46
+ *
47
+ * @important DETERMINISTIC: Same data + key will ALWAYS produce the same IV
48
+ * across all systems and CryptoJS versions for consistent encryption results
49
+ */
50
+ private static generateIV;
51
+ /**
52
+ * Generates a deterministic salt based on the input data and key
53
+ * Uses SHA-256 with proper truncation for maximum stability
54
+ *
55
+ * @important DETERMINISTIC: Same data + key will ALWAYS produce the same salt
56
+ * across all systems and CryptoJS versions for consistent encryption results
57
+ */
58
+ private static generateSalt;
59
+ /**
60
+ * Creates a deterministic seed for IV/salt generation
61
+ * Ensures consistent output across all environments and versions
62
+ */
63
+ private static createDeterministicSeed;
64
+ /**
65
+ * Generates a cache key for the derived key based on the input key and salt
66
+ */
67
+ private static generateCacheKey;
68
+ /**
69
+ * Manages cache size by removing oldest entries when limit is exceeded
70
+ */
71
+ private static manageCacheSize;
72
+ /**
73
+ * Derives a key using PBKDF2 with reduced iterations for stability
74
+ * Uses caching to avoid redundant PBKDF2 computations for better performance
75
+ */
76
+ private static deriveKey;
77
+ /**
78
+ * Safely serializes data to JSON with deterministic ordering
79
+ * Uses regular JSON.stringify but ensures consistency through other means
80
+ */
81
+ private static safeSerialize;
82
+ /**
83
+ * Deterministic JSON stringify that produces identical output across environments
84
+ * Uses a hybrid approach: sorts keys for consistency but preserves order for arrays
85
+ */
86
+ private static deterministicStringify;
87
+ /**
88
+ * Safely deserializes JSON data with enhanced error handling
89
+ */
90
+ private static safeDeserialize;
91
+ /**
92
+ * Encrypts data using AES-256-CBC with deterministic IV and salt
93
+ *
94
+ * @important DETERMINISTIC BEHAVIOR: This method will produce identical encrypted
95
+ * output for identical input parameters across different systems, Node.js versions,
96
+ * and multiple function calls. The same data + key combination will ALWAYS generate
97
+ * the same encrypted string.
98
+ *
99
+ * @param data The data to encrypt
100
+ * @param key The encryption key
101
+ * @param config Optional configuration
102
+ * @returns URL-safe encrypted string that is identical across systems for same input
103
+ * @throws {DyFM_Error} if encryption fails
104
+ *
105
+ * @example
106
+ * // These will produce identical results on any system:
107
+ * const result1 = DyFM_Crypto.encrypt({id: 1}, "mykey");
108
+ * const result2 = DyFM_Crypto.encrypt({id: 1}, "mykey");
109
+ * console.log(result1 === result2); // Always true
110
+ */
111
+ static encrypt<T>(data: T, key: string, config?: CryptoConfig): string;
112
+ /**
113
+ * Decrypts data that was encrypted using encrypt()
114
+ * @param encryptedData The encrypted data
115
+ * @param key The decryption key
116
+ * @param config Optional configuration
117
+ * @returns The decrypted data
118
+ * @throws {DyFM_Error} if decryption fails
119
+ */
120
+ static decrypt<T>(encryptedData: string, key: string, config?: CryptoConfig): T;
121
+ /**
122
+ * Generates a secure random key with enhanced complexity
123
+ * @param length Length of the key in characters (default: 32)
124
+ * @param customChars Optional custom character set to use
125
+ * @returns A secure random key with mixed case letters, numbers, and special characters
126
+ */
127
+ static generateKey(length?: number, customChars?: string): string;
128
+ /**
129
+ * Validates if a string is a valid encrypted data
130
+ * @param encryptedData The data to validate
131
+ * @returns true if the data appears to be valid encrypted data
132
+ */
133
+ static isValidEncryptedData(encryptedData: string): boolean;
134
+ /**
135
+ * Analyzes encrypted data to help with debugging
136
+ * @param encryptedData The encrypted data to analyze
137
+ * @returns Analysis information about the encrypted data
138
+ */
139
+ static analyzeEncryptedData(encryptedData: string): {
140
+ isValid: boolean;
141
+ version?: string;
142
+ dataLength: number;
143
+ hasValidFormat: boolean;
144
+ error?: string;
145
+ };
146
+ /**
147
+ * Clears the key derivation cache
148
+ * Useful for testing and memory management
149
+ */
150
+ static clearKeyCache(): void;
151
+ /**
152
+ * Gets cache statistics for debugging and monitoring
153
+ * @returns Cache statistics including size and hit ratio
154
+ */
155
+ static getCacheStats(): {
156
+ size: number;
157
+ maxSize: number;
158
+ utilizationPercent: number;
159
+ };
160
+ /**
161
+ * Gets default error settings with enhanced debugging information
162
+ */
163
+ private static getDefaultErrorSettings;
164
+ }
165
+ //# sourceMappingURL=crypto-v4.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto-v4.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/crypto/_collections/crypto-v4.util.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAMD;;;;;;;;;;;;;GAaG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAS;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAKpC;IACF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAEY;IAGvD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA6C;IACpE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAO;IAE7C;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAuC5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IA8BlC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAmDlC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IAazB;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAa3B;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAOtC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAM/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAS9B;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAqBxB;;;OAGG;IACH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