@croct/sdk 0.17.11 → 0.18.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 (512) hide show
  1. package/activeRecord.cjs +1 -2
  2. package/activeRecord.d.cts +26 -0
  3. package/activeRecord.js +1 -2
  4. package/apiKey.cjs +0 -1
  5. package/apiKey.d.cts +48 -0
  6. package/apiKey.js +0 -1
  7. package/base64Url.cjs +0 -1
  8. package/base64Url.d.cts +4 -0
  9. package/base64Url.js +0 -1
  10. package/cache/cache.cjs +0 -1
  11. package/cache/cache.d.cts +17 -0
  12. package/cache/cache.js +0 -1
  13. package/cache/cookieCache.cjs +0 -1
  14. package/cache/cookieCache.d.cts +22 -0
  15. package/cache/cookieCache.js +0 -1
  16. package/cache/fallbackCache.cjs +0 -1
  17. package/cache/fallbackCache.d.cts +11 -0
  18. package/cache/fallbackCache.js +0 -1
  19. package/cache/inMemoryCache.cjs +0 -1
  20. package/cache/inMemoryCache.d.cts +11 -0
  21. package/cache/inMemoryCache.js +0 -1
  22. package/cache/index.cjs +5 -6
  23. package/cache/index.d.cts +4 -0
  24. package/cache/index.js +4 -5
  25. package/cache/localStorageCache.cjs +0 -1
  26. package/cache/localStorageCache.d.cts +19 -0
  27. package/cache/localStorageCache.js +0 -1
  28. package/channel/channel.cjs +1 -2
  29. package/channel/channel.d.cts +24 -0
  30. package/channel/channel.js +1 -2
  31. package/channel/encodedChannel.cjs +0 -1
  32. package/channel/encodedChannel.d.cts +12 -0
  33. package/channel/encodedChannel.js +0 -1
  34. package/channel/guaranteedChannel.cjs +2 -3
  35. package/channel/guaranteedChannel.d.cts +33 -0
  36. package/channel/guaranteedChannel.js +2 -3
  37. package/channel/httpBeaconChannel.cjs +5 -6
  38. package/channel/httpBeaconChannel.d.cts +26 -0
  39. package/channel/httpBeaconChannel.js +5 -6
  40. package/channel/index.cjs +8 -9
  41. package/channel/index.d.cts +12 -0
  42. package/channel/index.js +7 -8
  43. package/channel/queuedChannel.cjs +2 -3
  44. package/channel/queuedChannel.d.cts +21 -0
  45. package/channel/queuedChannel.js +2 -3
  46. package/channel/retryChannel.cjs +2 -3
  47. package/channel/retryChannel.d.cts +21 -0
  48. package/channel/retryChannel.js +2 -3
  49. package/channel/sandboxChannel.cjs +1 -2
  50. package/channel/sandboxChannel.d.cts +15 -0
  51. package/channel/sandboxChannel.js +1 -2
  52. package/cid/assigner.cjs +0 -1
  53. package/cid/assigner.d.cts +5 -0
  54. package/cid/assigner.js +0 -1
  55. package/cid/cachedAssigner.cjs +1 -2
  56. package/cid/cachedAssigner.d.cts +17 -0
  57. package/cid/cachedAssigner.js +1 -2
  58. package/cid/fixedAssigner.cjs +0 -1
  59. package/cid/fixedAssigner.d.cts +9 -0
  60. package/cid/fixedAssigner.js +0 -1
  61. package/cid/index.cjs +5 -6
  62. package/cid/index.d.cts +6 -0
  63. package/cid/index.js +4 -5
  64. package/cid/remoteAssigner.cjs +3 -4
  65. package/cid/remoteAssigner.d.cts +13 -0
  66. package/cid/remoteAssigner.js +3 -4
  67. package/constants.cjs +1 -2
  68. package/constants.d.cts +6 -0
  69. package/constants.d.ts +2 -2
  70. package/constants.js +1 -2
  71. package/container.cjs +18 -19
  72. package/container.d.cts +95 -0
  73. package/container.js +18 -19
  74. package/contentFetcher.cjs +4 -5
  75. package/contentFetcher.d.cts +69 -0
  76. package/contentFetcher.js +4 -5
  77. package/context.cjs +4 -5
  78. package/context.d.cts +36 -0
  79. package/context.js +4 -5
  80. package/error.cjs +0 -1
  81. package/error.d.cts +4 -0
  82. package/error.js +0 -1
  83. package/evaluator.cjs +5 -6
  84. package/evaluator.d.cts +86 -0
  85. package/evaluator.js +5 -6
  86. package/eventManager.cjs +0 -1
  87. package/eventManager.d.cts +21 -0
  88. package/eventManager.js +0 -1
  89. package/eventSubjectProcessor.cjs +0 -1
  90. package/eventSubjectProcessor.d.cts +22 -0
  91. package/eventSubjectProcessor.js +0 -1
  92. package/facade/contentFetcherFacade.cjs +2 -3
  93. package/facade/contentFetcherFacade.d.cts +36 -0
  94. package/facade/contentFetcherFacade.js +2 -3
  95. package/facade/evaluatorFacade.cjs +2 -3
  96. package/facade/evaluatorFacade.d.cts +41 -0
  97. package/facade/evaluatorFacade.js +2 -3
  98. package/facade/index.cjs +7 -10
  99. package/facade/index.d.cts +29 -0
  100. package/facade/index.js +7 -9
  101. package/facade/sdkFacade.cjs +10 -11
  102. package/facade/sdkFacade.d.cts +86 -0
  103. package/facade/sdkFacade.js +10 -11
  104. package/facade/sessionFacade.cjs +1 -2
  105. package/facade/sessionFacade.d.cts +22 -0
  106. package/facade/sessionFacade.js +1 -2
  107. package/facade/sessionPatch.cjs +1 -2
  108. package/facade/sessionPatch.d.cts +21 -0
  109. package/facade/sessionPatch.js +1 -2
  110. package/facade/trackerFacade.cjs +2 -3
  111. package/facade/trackerFacade.d.cts +25 -0
  112. package/facade/trackerFacade.js +2 -3
  113. package/facade/userFacade.cjs +1 -2
  114. package/facade/userFacade.d.cts +28 -0
  115. package/facade/userFacade.js +1 -2
  116. package/facade/userPatch.cjs +1 -2
  117. package/facade/userPatch.d.cts +21 -0
  118. package/facade/userPatch.js +1 -2
  119. package/help.cjs +0 -1
  120. package/help.d.cts +5 -0
  121. package/help.js +0 -1
  122. package/index.cjs +2 -5
  123. package/index.d.cts +25 -0
  124. package/index.js +2 -4
  125. package/logging/consoleLogger.cjs +0 -1
  126. package/logging/consoleLogger.d.cts +13 -0
  127. package/logging/consoleLogger.js +0 -1
  128. package/logging/filteredLogger.cjs +0 -1
  129. package/logging/filteredLogger.d.cts +22 -0
  130. package/logging/filteredLogger.js +0 -1
  131. package/logging/index.cjs +6 -7
  132. package/logging/index.d.cts +5 -0
  133. package/logging/index.js +5 -6
  134. package/logging/logger.cjs +0 -1
  135. package/logging/logger.d.cts +11 -0
  136. package/logging/logger.js +0 -1
  137. package/logging/namespacedLogger.cjs +0 -1
  138. package/logging/namespacedLogger.d.cts +14 -0
  139. package/logging/namespacedLogger.js +0 -1
  140. package/logging/nullLogger.cjs +0 -1
  141. package/logging/nullLogger.d.cts +10 -0
  142. package/logging/nullLogger.js +0 -1
  143. package/namespacedStorage.cjs +0 -1
  144. package/namespacedStorage.d.cts +16 -0
  145. package/namespacedStorage.js +0 -1
  146. package/package.json +4 -1
  147. package/patch.cjs +0 -1
  148. package/patch.d.cts +46 -0
  149. package/patch.js +0 -1
  150. package/queue/capacityRestrictedQueue.cjs +0 -1
  151. package/queue/capacityRestrictedQueue.d.cts +16 -0
  152. package/queue/capacityRestrictedQueue.js +0 -1
  153. package/queue/inMemoryQueue.cjs +0 -1
  154. package/queue/inMemoryQueue.d.cts +15 -0
  155. package/queue/inMemoryQueue.js +0 -1
  156. package/queue/index.cjs +6 -7
  157. package/queue/index.d.cts +6 -0
  158. package/queue/index.js +5 -6
  159. package/queue/monitoredQueue.cjs +1 -2
  160. package/queue/monitoredQueue.d.cts +28 -0
  161. package/queue/monitoredQueue.js +1 -2
  162. package/queue/persistentQueue.cjs +0 -1
  163. package/queue/persistentQueue.d.cts +18 -0
  164. package/queue/persistentQueue.js +0 -1
  165. package/queue/queue.cjs +0 -1
  166. package/queue/queue.d.cts +11 -0
  167. package/queue/queue.js +0 -1
  168. package/retry/arbitraryPolicy.cjs +0 -1
  169. package/retry/arbitraryPolicy.d.cts +10 -0
  170. package/retry/arbitraryPolicy.js +0 -1
  171. package/retry/backoffPolicy.cjs +0 -1
  172. package/retry/backoffPolicy.d.cts +26 -0
  173. package/retry/backoffPolicy.js +0 -1
  174. package/retry/index.cjs +6 -7
  175. package/retry/index.d.cts +5 -0
  176. package/retry/index.js +5 -6
  177. package/retry/maxAttemptsPolicy.cjs +0 -1
  178. package/retry/maxAttemptsPolicy.d.cts +11 -0
  179. package/retry/maxAttemptsPolicy.js +0 -1
  180. package/retry/neverPolicy.cjs +0 -1
  181. package/retry/neverPolicy.d.cts +8 -0
  182. package/retry/neverPolicy.js +0 -1
  183. package/retry/policy.cjs +0 -1
  184. package/retry/policy.d.cts +6 -0
  185. package/retry/policy.js +0 -1
  186. package/schema/attributeSchema.cjs +1 -2
  187. package/schema/attributeSchema.d.cts +6 -0
  188. package/schema/attributeSchema.js +1 -2
  189. package/schema/contentFetcherSchemas.cjs +1 -2
  190. package/schema/contentFetcherSchemas.d.cts +6 -0
  191. package/schema/contentFetcherSchemas.js +1 -2
  192. package/schema/contentSchemas.cjs +1 -2
  193. package/schema/contentSchemas.d.cts +6 -0
  194. package/schema/contentSchemas.js +1 -2
  195. package/schema/contextSchemas.cjs +1 -2
  196. package/schema/contextSchemas.d.cts +6 -0
  197. package/schema/contextSchemas.js +1 -2
  198. package/schema/ecommerceSchemas.cjs +1 -2
  199. package/schema/ecommerceSchemas.d.cts +10 -0
  200. package/schema/ecommerceSchemas.js +1 -2
  201. package/schema/evaluatorSchemas.cjs +1 -2
  202. package/schema/evaluatorSchemas.d.cts +6 -0
  203. package/schema/evaluatorSchemas.js +1 -2
  204. package/schema/eventSchemas.cjs +4 -5
  205. package/schema/eventSchemas.d.cts +16 -0
  206. package/schema/eventSchemas.js +4 -5
  207. package/schema/index.cjs +22 -23
  208. package/schema/index.d.cts +14 -0
  209. package/schema/index.js +11 -12
  210. package/schema/loggerSchema.cjs +1 -2
  211. package/schema/loggerSchema.d.cts +6 -0
  212. package/schema/loggerSchema.js +1 -2
  213. package/schema/operationSchemas.cjs +2 -3
  214. package/schema/operationSchemas.d.cts +14 -0
  215. package/schema/operationSchemas.js +2 -3
  216. package/schema/sdkFacadeSchemas.cjs +4 -5
  217. package/schema/sdkFacadeSchemas.d.cts +6 -0
  218. package/schema/sdkFacadeSchemas.js +4 -5
  219. package/schema/sdkSchemas.cjs +3 -4
  220. package/schema/sdkSchemas.d.cts +8 -0
  221. package/schema/sdkSchemas.js +3 -4
  222. package/schema/tokenSchema.cjs +1 -2
  223. package/schema/tokenSchema.d.cts +6 -0
  224. package/schema/tokenSchema.js +1 -2
  225. package/schema/userSchema.cjs +2 -3
  226. package/schema/userSchema.d.cts +6 -0
  227. package/schema/userSchema.js +2 -3
  228. package/sdk.cjs +4 -5
  229. package/sdk.d.cts +69 -0
  230. package/sdk.js +4 -5
  231. package/sdkEvents.cjs +0 -1
  232. package/sdkEvents.d.cts +15 -0
  233. package/sdkEvents.js +0 -1
  234. package/sourceLocation.cjs +0 -1
  235. package/sourceLocation.d.cts +14 -0
  236. package/sourceLocation.js +0 -1
  237. package/tab.cjs +1 -2
  238. package/tab.d.cts +40 -0
  239. package/tab.js +1 -2
  240. package/token/cachedTokenStore.cjs +1 -2
  241. package/token/cachedTokenStore.d.cts +13 -0
  242. package/token/cachedTokenStore.js +1 -2
  243. package/token/inMemoryTokenStore.cjs +0 -1
  244. package/token/inMemoryTokenStore.d.cts +11 -0
  245. package/token/inMemoryTokenStore.js +0 -1
  246. package/token/index.cjs +5 -6
  247. package/token/index.d.cts +7 -0
  248. package/token/index.js +4 -5
  249. package/token/replicatedTokenStore.cjs +0 -1
  250. package/token/replicatedTokenStore.d.cts +13 -0
  251. package/token/replicatedTokenStore.js +0 -1
  252. package/token/token.cjs +3 -4
  253. package/token/token.d.cts +70 -0
  254. package/token/token.js +3 -4
  255. package/tracker.cjs +3 -4
  256. package/tracker.d.cts +82 -0
  257. package/tracker.js +3 -4
  258. package/trackingEvents.cjs +0 -1
  259. package/trackingEvents.d.cts +309 -0
  260. package/trackingEvents.js +0 -1
  261. package/transformer.cjs +0 -1
  262. package/transformer.d.cts +6 -0
  263. package/transformer.js +0 -1
  264. package/utilityTypes.cjs +0 -1
  265. package/utilityTypes.d.cts +4 -0
  266. package/utilityTypes.js +0 -1
  267. package/uuid.cjs +0 -1
  268. package/uuid.d.cts +3 -0
  269. package/uuid.js +0 -1
  270. package/validation/arrayType.cjs +2 -3
  271. package/validation/arrayType.d.cts +16 -0
  272. package/validation/arrayType.js +2 -3
  273. package/validation/booleanType.cjs +2 -3
  274. package/validation/booleanType.d.cts +9 -0
  275. package/validation/booleanType.js +2 -3
  276. package/validation/functionType.cjs +2 -3
  277. package/validation/functionType.d.cts +9 -0
  278. package/validation/functionType.js +2 -3
  279. package/validation/index.cjs +14 -15
  280. package/validation/index.d.cts +12 -0
  281. package/validation/index.js +12 -13
  282. package/validation/jsonType.cjs +2 -3
  283. package/validation/jsonType.d.cts +35 -0
  284. package/validation/jsonType.js +2 -3
  285. package/validation/mixedSchema.cjs +0 -1
  286. package/validation/mixedSchema.d.cts +7 -0
  287. package/validation/mixedSchema.js +0 -1
  288. package/validation/nullType.cjs +2 -3
  289. package/validation/nullType.d.cts +9 -0
  290. package/validation/nullType.js +2 -3
  291. package/validation/numberType.cjs +2 -3
  292. package/validation/numberType.d.cts +16 -0
  293. package/validation/numberType.js +2 -3
  294. package/validation/objectType.cjs +3 -4
  295. package/validation/objectType.d.cts +30 -0
  296. package/validation/objectType.js +3 -4
  297. package/validation/schema.cjs +0 -1
  298. package/validation/schema.d.cts +18 -0
  299. package/validation/schema.js +0 -1
  300. package/validation/stringType.cjs +2 -3
  301. package/validation/stringType.d.cts +24 -0
  302. package/validation/stringType.js +2 -3
  303. package/validation/unionType.cjs +2 -3
  304. package/validation/unionType.d.cts +11 -0
  305. package/validation/unionType.js +2 -3
  306. package/validation/violation.cjs +0 -1
  307. package/validation/violation.d.cts +4 -0
  308. package/validation/violation.js +0 -1
  309. package/activeRecord.cjs.map +0 -1
  310. package/activeRecord.js.map +0 -1
  311. package/apiKey.cjs.map +0 -1
  312. package/apiKey.js.map +0 -1
  313. package/base64Url.cjs.map +0 -1
  314. package/base64Url.js.map +0 -1
  315. package/cache/cache.cjs.map +0 -1
  316. package/cache/cache.js.map +0 -1
  317. package/cache/cookieCache.cjs.map +0 -1
  318. package/cache/cookieCache.js.map +0 -1
  319. package/cache/fallbackCache.cjs.map +0 -1
  320. package/cache/fallbackCache.js.map +0 -1
  321. package/cache/inMemoryCache.cjs.map +0 -1
  322. package/cache/inMemoryCache.js.map +0 -1
  323. package/cache/index.cjs.map +0 -1
  324. package/cache/index.js.map +0 -1
  325. package/cache/localStorageCache.cjs.map +0 -1
  326. package/cache/localStorageCache.js.map +0 -1
  327. package/channel/channel.cjs.map +0 -1
  328. package/channel/channel.js.map +0 -1
  329. package/channel/encodedChannel.cjs.map +0 -1
  330. package/channel/encodedChannel.js.map +0 -1
  331. package/channel/guaranteedChannel.cjs.map +0 -1
  332. package/channel/guaranteedChannel.js.map +0 -1
  333. package/channel/httpBeaconChannel.cjs.map +0 -1
  334. package/channel/httpBeaconChannel.js.map +0 -1
  335. package/channel/index.cjs.map +0 -1
  336. package/channel/index.js.map +0 -1
  337. package/channel/queuedChannel.cjs.map +0 -1
  338. package/channel/queuedChannel.js.map +0 -1
  339. package/channel/retryChannel.cjs.map +0 -1
  340. package/channel/retryChannel.js.map +0 -1
  341. package/channel/sandboxChannel.cjs.map +0 -1
  342. package/channel/sandboxChannel.js.map +0 -1
  343. package/cid/assigner.cjs.map +0 -1
  344. package/cid/assigner.js.map +0 -1
  345. package/cid/cachedAssigner.cjs.map +0 -1
  346. package/cid/cachedAssigner.js.map +0 -1
  347. package/cid/fixedAssigner.cjs.map +0 -1
  348. package/cid/fixedAssigner.js.map +0 -1
  349. package/cid/index.cjs.map +0 -1
  350. package/cid/index.js.map +0 -1
  351. package/cid/remoteAssigner.cjs.map +0 -1
  352. package/cid/remoteAssigner.js.map +0 -1
  353. package/constants.cjs.map +0 -1
  354. package/constants.js.map +0 -1
  355. package/container.cjs.map +0 -1
  356. package/container.js.map +0 -1
  357. package/contentFetcher.cjs.map +0 -1
  358. package/contentFetcher.js.map +0 -1
  359. package/context.cjs.map +0 -1
  360. package/context.js.map +0 -1
  361. package/error.cjs.map +0 -1
  362. package/error.js.map +0 -1
  363. package/evaluator.cjs.map +0 -1
  364. package/evaluator.js.map +0 -1
  365. package/eventManager.cjs.map +0 -1
  366. package/eventManager.js.map +0 -1
  367. package/eventSubjectProcessor.cjs.map +0 -1
  368. package/eventSubjectProcessor.js.map +0 -1
  369. package/facade/contentFetcherFacade.cjs.map +0 -1
  370. package/facade/contentFetcherFacade.js.map +0 -1
  371. package/facade/evaluatorFacade.cjs.map +0 -1
  372. package/facade/evaluatorFacade.js.map +0 -1
  373. package/facade/index.cjs.map +0 -1
  374. package/facade/index.js.map +0 -1
  375. package/facade/sdkFacade.cjs.map +0 -1
  376. package/facade/sdkFacade.js.map +0 -1
  377. package/facade/sessionFacade.cjs.map +0 -1
  378. package/facade/sessionFacade.js.map +0 -1
  379. package/facade/sessionPatch.cjs.map +0 -1
  380. package/facade/sessionPatch.js.map +0 -1
  381. package/facade/trackerFacade.cjs.map +0 -1
  382. package/facade/trackerFacade.js.map +0 -1
  383. package/facade/userFacade.cjs.map +0 -1
  384. package/facade/userFacade.js.map +0 -1
  385. package/facade/userPatch.cjs.map +0 -1
  386. package/facade/userPatch.js.map +0 -1
  387. package/help.cjs.map +0 -1
  388. package/help.js.map +0 -1
  389. package/index.cjs.map +0 -1
  390. package/index.js.map +0 -1
  391. package/logging/consoleLogger.cjs.map +0 -1
  392. package/logging/consoleLogger.js.map +0 -1
  393. package/logging/filteredLogger.cjs.map +0 -1
  394. package/logging/filteredLogger.js.map +0 -1
  395. package/logging/index.cjs.map +0 -1
  396. package/logging/index.js.map +0 -1
  397. package/logging/logger.cjs.map +0 -1
  398. package/logging/logger.js.map +0 -1
  399. package/logging/namespacedLogger.cjs.map +0 -1
  400. package/logging/namespacedLogger.js.map +0 -1
  401. package/logging/nullLogger.cjs.map +0 -1
  402. package/logging/nullLogger.js.map +0 -1
  403. package/namespacedStorage.cjs.map +0 -1
  404. package/namespacedStorage.js.map +0 -1
  405. package/patch.cjs.map +0 -1
  406. package/patch.js.map +0 -1
  407. package/queue/capacityRestrictedQueue.cjs.map +0 -1
  408. package/queue/capacityRestrictedQueue.js.map +0 -1
  409. package/queue/inMemoryQueue.cjs.map +0 -1
  410. package/queue/inMemoryQueue.js.map +0 -1
  411. package/queue/index.cjs.map +0 -1
  412. package/queue/index.js.map +0 -1
  413. package/queue/monitoredQueue.cjs.map +0 -1
  414. package/queue/monitoredQueue.js.map +0 -1
  415. package/queue/persistentQueue.cjs.map +0 -1
  416. package/queue/persistentQueue.js.map +0 -1
  417. package/queue/queue.cjs.map +0 -1
  418. package/queue/queue.js.map +0 -1
  419. package/retry/arbitraryPolicy.cjs.map +0 -1
  420. package/retry/arbitraryPolicy.js.map +0 -1
  421. package/retry/backoffPolicy.cjs.map +0 -1
  422. package/retry/backoffPolicy.js.map +0 -1
  423. package/retry/index.cjs.map +0 -1
  424. package/retry/index.js.map +0 -1
  425. package/retry/maxAttemptsPolicy.cjs.map +0 -1
  426. package/retry/maxAttemptsPolicy.js.map +0 -1
  427. package/retry/neverPolicy.cjs.map +0 -1
  428. package/retry/neverPolicy.js.map +0 -1
  429. package/retry/policy.cjs.map +0 -1
  430. package/retry/policy.js.map +0 -1
  431. package/schema/attributeSchema.cjs.map +0 -1
  432. package/schema/attributeSchema.js.map +0 -1
  433. package/schema/contentFetcherSchemas.cjs.map +0 -1
  434. package/schema/contentFetcherSchemas.js.map +0 -1
  435. package/schema/contentSchemas.cjs.map +0 -1
  436. package/schema/contentSchemas.js.map +0 -1
  437. package/schema/contextSchemas.cjs.map +0 -1
  438. package/schema/contextSchemas.js.map +0 -1
  439. package/schema/ecommerceSchemas.cjs.map +0 -1
  440. package/schema/ecommerceSchemas.js.map +0 -1
  441. package/schema/evaluatorSchemas.cjs.map +0 -1
  442. package/schema/evaluatorSchemas.js.map +0 -1
  443. package/schema/eventSchemas.cjs.map +0 -1
  444. package/schema/eventSchemas.js.map +0 -1
  445. package/schema/index.cjs.map +0 -1
  446. package/schema/index.js.map +0 -1
  447. package/schema/loggerSchema.cjs.map +0 -1
  448. package/schema/loggerSchema.js.map +0 -1
  449. package/schema/operationSchemas.cjs.map +0 -1
  450. package/schema/operationSchemas.js.map +0 -1
  451. package/schema/sdkFacadeSchemas.cjs.map +0 -1
  452. package/schema/sdkFacadeSchemas.js.map +0 -1
  453. package/schema/sdkSchemas.cjs.map +0 -1
  454. package/schema/sdkSchemas.js.map +0 -1
  455. package/schema/tokenSchema.cjs.map +0 -1
  456. package/schema/tokenSchema.js.map +0 -1
  457. package/schema/userSchema.cjs.map +0 -1
  458. package/schema/userSchema.js.map +0 -1
  459. package/sdk.cjs.map +0 -1
  460. package/sdk.js.map +0 -1
  461. package/sdkEvents.cjs.map +0 -1
  462. package/sdkEvents.js.map +0 -1
  463. package/sourceLocation.cjs.map +0 -1
  464. package/sourceLocation.js.map +0 -1
  465. package/tab.cjs.map +0 -1
  466. package/tab.js.map +0 -1
  467. package/token/cachedTokenStore.cjs.map +0 -1
  468. package/token/cachedTokenStore.js.map +0 -1
  469. package/token/inMemoryTokenStore.cjs.map +0 -1
  470. package/token/inMemoryTokenStore.js.map +0 -1
  471. package/token/index.cjs.map +0 -1
  472. package/token/index.js.map +0 -1
  473. package/token/replicatedTokenStore.cjs.map +0 -1
  474. package/token/replicatedTokenStore.js.map +0 -1
  475. package/token/token.cjs.map +0 -1
  476. package/token/token.js.map +0 -1
  477. package/tracker.cjs.map +0 -1
  478. package/tracker.js.map +0 -1
  479. package/trackingEvents.cjs.map +0 -1
  480. package/trackingEvents.js.map +0 -1
  481. package/transformer.cjs.map +0 -1
  482. package/transformer.js.map +0 -1
  483. package/utilityTypes.cjs.map +0 -1
  484. package/utilityTypes.js.map +0 -1
  485. package/uuid.cjs.map +0 -1
  486. package/uuid.js.map +0 -1
  487. package/validation/arrayType.cjs.map +0 -1
  488. package/validation/arrayType.js.map +0 -1
  489. package/validation/booleanType.cjs.map +0 -1
  490. package/validation/booleanType.js.map +0 -1
  491. package/validation/functionType.cjs.map +0 -1
  492. package/validation/functionType.js.map +0 -1
  493. package/validation/index.cjs.map +0 -1
  494. package/validation/index.js.map +0 -1
  495. package/validation/jsonType.cjs.map +0 -1
  496. package/validation/jsonType.js.map +0 -1
  497. package/validation/mixedSchema.cjs.map +0 -1
  498. package/validation/mixedSchema.js.map +0 -1
  499. package/validation/nullType.cjs.map +0 -1
  500. package/validation/nullType.js.map +0 -1
  501. package/validation/numberType.cjs.map +0 -1
  502. package/validation/numberType.js.map +0 -1
  503. package/validation/objectType.cjs.map +0 -1
  504. package/validation/objectType.js.map +0 -1
  505. package/validation/schema.cjs.map +0 -1
  506. package/validation/schema.js.map +0 -1
  507. package/validation/stringType.cjs.map +0 -1
  508. package/validation/stringType.js.map +0 -1
  509. package/validation/unionType.cjs.map +0 -1
  510. package/validation/unionType.js.map +0 -1
  511. package/validation/violation.cjs.map +0 -1
  512. package/validation/violation.js.map +0 -1
@@ -0,0 +1,309 @@
1
+ import { Patch } from './patch.cjs';
2
+ import { DistributiveOmit, Optional } from './utilityTypes.cjs';
3
+ import '@croct/json';
4
+
5
+ type ProductDetails = {
6
+ productId: string;
7
+ sku?: string;
8
+ name: string;
9
+ category?: string;
10
+ brand?: string;
11
+ variant?: string;
12
+ displayPrice: number;
13
+ originalPrice?: number;
14
+ url?: string;
15
+ imageUrl?: string;
16
+ };
17
+ type CartItem = {
18
+ index: number;
19
+ product: ProductDetails;
20
+ quantity: number;
21
+ total: number;
22
+ discount?: number;
23
+ coupon?: string;
24
+ };
25
+ type Cart = {
26
+ currency: string;
27
+ items: CartItem[];
28
+ subtotal?: number;
29
+ shippingPrice?: number;
30
+ taxes?: {
31
+ [key: string]: number;
32
+ };
33
+ costs?: {
34
+ [key: string]: number;
35
+ };
36
+ discount?: number;
37
+ total: number;
38
+ coupon?: string;
39
+ lastUpdateTime: number;
40
+ };
41
+ type OrderItem = {
42
+ index: number;
43
+ product: ProductDetails;
44
+ quantity?: number;
45
+ total: number;
46
+ discount?: number;
47
+ coupon?: string;
48
+ };
49
+ type OrderStatus = 'placed' | 'paid' | 'completed';
50
+ type Order = {
51
+ orderId: string;
52
+ currency: string;
53
+ items: OrderItem[];
54
+ subtotal?: number;
55
+ shippingPrice?: number;
56
+ taxes?: {
57
+ [key: string]: number;
58
+ };
59
+ costs?: {
60
+ [key: string]: number;
61
+ };
62
+ discount?: number;
63
+ total: number;
64
+ coupon?: string;
65
+ paymentMethod?: string;
66
+ installments?: number;
67
+ status?: OrderStatus;
68
+ };
69
+ type Gender = 'male' | 'female' | 'neutral' | 'unknown';
70
+ declare const pageEventTypes: readonly ["pageLoaded", "pageOpened"];
71
+ declare const tabEventTypes: readonly ["tabOpened", "tabUrlChanged", "tabVisibilityChanged"];
72
+ declare const cartEventTypes: readonly ["cartModified", "cartViewed", "checkoutStarted"];
73
+ declare const ecommerceEventTypes: readonly ["cartModified", "cartViewed", "checkoutStarted", "orderPlaced", "productViewed"];
74
+ declare const identifiedUserEventTypes: string[];
75
+ declare const userEventTypes: readonly [...string[], "userProfileChanged"];
76
+ declare const miscEventTypes: readonly ["nothingChanged", "sessionAttributesChanged", "goalCompleted", "interestShown", "postViewed", "eventOccurred", "linkOpened"];
77
+ declare const eventTypes: readonly ["pageLoaded", "pageOpened", "cartModified", "cartViewed", "checkoutStarted", "orderPlaced", "productViewed", ...string[], "userProfileChanged", "nothingChanged", "sessionAttributesChanged", "goalCompleted", "interestShown", "postViewed", "eventOccurred", "linkOpened"];
78
+ interface BaseEvent {
79
+ type: string;
80
+ }
81
+ interface UserProfileChanged extends BaseEvent {
82
+ type: 'userProfileChanged';
83
+ patch: Patch;
84
+ }
85
+ type Primitive = null | string | number | boolean;
86
+ type PrimitiveMap = {
87
+ [member: string]: Primitive;
88
+ };
89
+ type PrimitiveArray = Primitive[];
90
+ type TwoLevelMap = {
91
+ [member: string]: Primitive | PrimitiveMap | PrimitiveArray;
92
+ };
93
+ type TwoLevelArray = PrimitiveArray | PrimitiveMap[] | PrimitiveArray[];
94
+ type CustomAttribute = Primitive | TwoLevelMap | TwoLevelArray;
95
+ type UserProfile = {
96
+ firstName?: string;
97
+ lastName?: string;
98
+ birthDate?: string;
99
+ gender?: Gender;
100
+ email?: string;
101
+ alternateEmail?: string;
102
+ phone?: string;
103
+ alternatePhone?: string;
104
+ address?: {
105
+ street?: string;
106
+ district?: string;
107
+ city?: string;
108
+ region?: string;
109
+ country?: string;
110
+ postalCode?: string;
111
+ };
112
+ avatar?: string;
113
+ company?: string;
114
+ companyUrl?: string;
115
+ jobTitle?: string;
116
+ interests?: string[];
117
+ activities?: string[];
118
+ custom?: {
119
+ [member: string]: CustomAttribute;
120
+ };
121
+ };
122
+ interface UserSignedUp extends BaseEvent {
123
+ type: 'userSignedUp';
124
+ userId: string;
125
+ profile?: UserProfile;
126
+ }
127
+ interface UserSignedIn extends BaseEvent {
128
+ type: 'userSignedIn';
129
+ userId: string;
130
+ }
131
+ interface UserSignedOut extends BaseEvent {
132
+ type: 'userSignedOut';
133
+ userId: string;
134
+ }
135
+ type IdentifiedUserEvent = UserSignedIn | UserSignedOut | UserSignedUp;
136
+ type UserEvent = UserProfileChanged | IdentifiedUserEvent;
137
+ type CartEventType = typeof cartEventTypes[number];
138
+ interface BaseCartEvent extends BaseEvent {
139
+ type: CartEventType;
140
+ cart: Cart;
141
+ }
142
+ interface CartViewed extends BaseCartEvent {
143
+ type: 'cartViewed';
144
+ }
145
+ interface CartModified extends BaseCartEvent {
146
+ type: 'cartModified';
147
+ }
148
+ interface CheckoutStarted extends BaseCartEvent {
149
+ type: 'checkoutStarted';
150
+ orderId?: string;
151
+ }
152
+ type CartEvent = CartModified | CartViewed | CheckoutStarted;
153
+ interface OrderPlaced extends BaseEvent {
154
+ type: 'orderPlaced';
155
+ order: Order;
156
+ }
157
+ interface ProductViewed extends BaseEvent {
158
+ type: 'productViewed';
159
+ product: ProductDetails;
160
+ }
161
+ type EcommerceEvent = OrderPlaced | ProductViewed | CartEvent;
162
+ /**
163
+ * Tab event
164
+ */
165
+ type TabEventType = typeof tabEventTypes[number];
166
+ interface BaseTabEvent extends BaseEvent {
167
+ type: TabEventType;
168
+ tabId: string;
169
+ }
170
+ interface TabOpened extends BaseTabEvent {
171
+ type: 'tabOpened';
172
+ }
173
+ interface TabUrlChanged extends BaseTabEvent {
174
+ type: 'tabUrlChanged';
175
+ url: string;
176
+ }
177
+ interface TabVisibilityChanged extends BaseTabEvent {
178
+ type: 'tabVisibilityChanged';
179
+ visibility: 'visible' | 'hidden';
180
+ }
181
+ type TabEvent = TabVisibilityChanged | TabUrlChanged | TabOpened;
182
+ type PageEventType = typeof pageEventTypes[number];
183
+ interface BasePageEvent extends BaseEvent {
184
+ type: PageEventType;
185
+ url: string;
186
+ }
187
+ interface PageOpened extends BasePageEvent {
188
+ type: 'pageOpened';
189
+ referrer?: string;
190
+ }
191
+ interface PageLoaded extends BasePageEvent {
192
+ type: 'pageLoaded';
193
+ title: string;
194
+ lastModifiedTime: number;
195
+ }
196
+ type PageEvent = PageLoaded | PageOpened;
197
+ interface NothingChanged extends BaseEvent {
198
+ type: 'nothingChanged';
199
+ sinceTime: number;
200
+ }
201
+ interface SessionAttributesChanged extends BaseEvent {
202
+ type: 'sessionAttributesChanged';
203
+ patch: Patch;
204
+ }
205
+ interface GoalCompleted extends BaseEvent {
206
+ type: 'goalCompleted';
207
+ goalId: string;
208
+ value?: number;
209
+ currency?: string;
210
+ }
211
+ interface InterestShown extends BaseEvent {
212
+ type: 'interestShown';
213
+ interests: string[];
214
+ }
215
+ interface PostDetails {
216
+ postId: string;
217
+ url?: string;
218
+ title: string;
219
+ tags?: string[];
220
+ categories?: string[];
221
+ authors?: string[];
222
+ publishTime: number;
223
+ updateTime?: number;
224
+ }
225
+ interface PostViewed extends BaseEvent {
226
+ type: 'postViewed';
227
+ post: PostDetails;
228
+ }
229
+ interface EventOccurred extends BaseEvent {
230
+ type: 'eventOccurred';
231
+ name: string;
232
+ details?: {
233
+ [key: string]: string | number | boolean | null;
234
+ };
235
+ }
236
+ interface LinkOpened extends BaseEvent {
237
+ type: 'linkOpened';
238
+ link: string;
239
+ }
240
+ type MiscEvent = NothingChanged | SessionAttributesChanged | EventOccurred | GoalCompleted | InterestShown | PostViewed | LinkOpened;
241
+ type EventMap = {
242
+ tabVisibilityChanged: TabVisibilityChanged;
243
+ tabUrlChanged: TabUrlChanged;
244
+ tabOpened: TabOpened;
245
+ pageLoaded: PageLoaded;
246
+ pageOpened: PageOpened;
247
+ userSignedIn: UserSignedIn;
248
+ userSignedOut: UserSignedOut;
249
+ userSignedUp: UserSignedUp;
250
+ userProfileChanged: UserProfileChanged;
251
+ productViewed: ProductViewed;
252
+ cartViewed: CartViewed;
253
+ cartModified: CartModified;
254
+ checkoutStarted: CheckoutStarted;
255
+ orderPlaced: OrderPlaced;
256
+ nothingChanged: NothingChanged;
257
+ sessionAttributesChanged: SessionAttributesChanged;
258
+ goalCompleted: GoalCompleted;
259
+ interestShown: InterestShown;
260
+ postViewed: PostViewed;
261
+ eventOccurred: EventOccurred;
262
+ linkOpened: LinkOpened;
263
+ };
264
+ type TrackingEventType = keyof EventMap;
265
+ type TrackingEvent<T extends TrackingEventType = TrackingEventType> = T extends TrackingEventType ? EventMap[T] : EventMap[TrackingEventType];
266
+ /**
267
+ * Partial Events
268
+ */
269
+ type CartPartialEvent<T extends CartEvent = CartEvent> = DistributiveOmit<T, 'cart'> & Record<'cart', Optional<Cart, 'lastUpdateTime'>>;
270
+ type PartialTrackingEvent = Exclude<TrackingEvent, PageEvent | TabEvent | CartEvent> | CartPartialEvent;
271
+ /**
272
+ * External Events
273
+ */
274
+ type ExternalEventMap = {
275
+ cartModified: CartPartialEvent<CartModified>;
276
+ cartViewed: CartPartialEvent<CartViewed>;
277
+ checkoutStarted: CartPartialEvent<CheckoutStarted>;
278
+ orderPlaced: OrderPlaced;
279
+ productViewed: ProductViewed;
280
+ userSignedUp: UserSignedUp;
281
+ goalCompleted: GoalCompleted;
282
+ interestShown: InterestShown;
283
+ postViewed: PostViewed;
284
+ linkOpened: LinkOpened;
285
+ eventOccurred: EventOccurred;
286
+ };
287
+ type ExternalTrackingEventType = keyof ExternalEventMap;
288
+ type ExternalTrackingEvent<T extends ExternalTrackingEventType = ExternalTrackingEventType> = T extends ExternalTrackingEventType ? ExternalEventMap[T] : ExternalEventMap[ExternalTrackingEventType];
289
+ type ExternalTrackingEventPayload<T extends ExternalTrackingEventType> = Omit<ExternalEventMap[T], 'type'>;
290
+ declare function isIdentifiedUserEvent(event: TrackingEvent): event is IdentifiedUserEvent;
291
+ declare function isCartPartialEvent(event: PartialTrackingEvent): event is CartPartialEvent;
292
+ type TrackingEventContext = {
293
+ tabId: string;
294
+ url: string;
295
+ metadata?: {
296
+ [key: string]: string;
297
+ };
298
+ };
299
+ type BeaconPayload = Exclude<TrackingEvent, IdentifiedUserEvent> | DistributiveOmit<Exclude<IdentifiedUserEvent, UserSignedUp>, 'userId'> & Record<'externalUserId', IdentifiedUserEvent['userId']> | Omit<UserSignedUp, 'userId' | 'profile'> & Record<'externalUserId', IdentifiedUserEvent['userId']> & {
300
+ patch?: Patch;
301
+ };
302
+ type Beacon = {
303
+ timestamp: number;
304
+ token?: string;
305
+ context: TrackingEventContext;
306
+ payload: BeaconPayload;
307
+ };
308
+
309
+ export { type Beacon, type BeaconPayload, type Cart, type CartEvent, type CartEventType, type CartItem, type CartModified, type CartViewed, type CheckoutStarted, type EcommerceEvent, type EventOccurred, type ExternalTrackingEvent, type ExternalTrackingEventPayload, type ExternalTrackingEventType, type Gender, type GoalCompleted, type IdentifiedUserEvent, type InterestShown, type LinkOpened, type MiscEvent, type NothingChanged, type Order, type OrderItem, type OrderPlaced, type OrderStatus, type PageEvent, type PageEventType, type PageLoaded, type PageOpened, type PartialTrackingEvent, type PostDetails, type PostViewed, type ProductDetails, type ProductViewed, type SessionAttributesChanged, type TabEvent, type TabEventType, type TabOpened, type TabUrlChanged, type TabVisibilityChanged, type TrackingEvent, type TrackingEventContext, type TrackingEventType, type UserEvent, type UserProfile, type UserProfileChanged, type UserSignedIn, type UserSignedOut, type UserSignedUp, cartEventTypes, ecommerceEventTypes, eventTypes, identifiedUserEventTypes, isCartPartialEvent, isIdentifiedUserEvent, miscEventTypes, pageEventTypes, tabEventTypes, userEventTypes };
package/trackingEvents.js CHANGED
@@ -59,4 +59,3 @@ export {
59
59
  tabEventTypes,
60
60
  userEventTypes
61
61
  };
62
- //# sourceMappingURL=trackingEvents.js.map
package/transformer.cjs CHANGED
@@ -27,4 +27,3 @@ const encodeJson = function encodeJson2(input) {
27
27
  0 && (module.exports = {
28
28
  encodeJson
29
29
  });
30
- //# sourceMappingURL=transformer.cjs.map
@@ -0,0 +1,6 @@
1
+ interface Transformer<I, O> {
2
+ (input: I): Promise<O>;
3
+ }
4
+ declare const encodeJson: Transformer<any, string>;
5
+
6
+ export { type Transformer, encodeJson };
package/transformer.js CHANGED
@@ -4,4 +4,3 @@ const encodeJson = function encodeJson2(input) {
4
4
  export {
5
5
  encodeJson
6
6
  };
7
- //# sourceMappingURL=transformer.js.map
package/utilityTypes.cjs CHANGED
@@ -13,4 +13,3 @@ var __copyProps = (to, from, except, desc) => {
13
13
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
14
  var utilityTypes_exports = {};
15
15
  module.exports = __toCommonJS(utilityTypes_exports);
16
- //# sourceMappingURL=utilityTypes.cjs.map
@@ -0,0 +1,4 @@
1
+ type DistributiveOmit<T, K extends keyof T> = T extends unknown ? Omit<T, K> : never;
2
+ type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
3
+
4
+ export type { DistributiveOmit, Optional };
package/utilityTypes.js CHANGED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=utilityTypes.js.map
package/uuid.cjs CHANGED
@@ -52,4 +52,3 @@ function uuid4(sortable = false) {
52
52
  0 && (module.exports = {
53
53
  uuid4
54
54
  });
55
- //# sourceMappingURL=uuid.cjs.map
package/uuid.d.cts ADDED
@@ -0,0 +1,3 @@
1
+ declare function uuid4(sortable?: boolean): string;
2
+
3
+ export { uuid4 };
package/uuid.js CHANGED
@@ -29,4 +29,3 @@ function uuid4(sortable = false) {
29
29
  export {
30
30
  uuid4
31
31
  };
32
- //# sourceMappingURL=uuid.js.map
@@ -20,8 +20,8 @@ __export(arrayType_exports, {
20
20
  ArrayType: () => ArrayType
21
21
  });
22
22
  module.exports = __toCommonJS(arrayType_exports);
23
- var import_schema = require("./schema");
24
- var import_violation = require("./violation");
23
+ var import_schema = require('./schema.cjs');
24
+ var import_violation = require('./violation.cjs');
25
25
  class ArrayType {
26
26
  constructor(definition = {}) {
27
27
  this.definition = {
@@ -72,4 +72,3 @@ class ArrayType {
72
72
  0 && (module.exports = {
73
73
  ArrayType
74
74
  });
75
- //# sourceMappingURL=arrayType.cjs.map
@@ -0,0 +1,16 @@
1
+ import { TypeSchema, Schema } from './schema.cjs';
2
+
3
+ type ArrayDefinition = {
4
+ minItems: number;
5
+ maxItems: number;
6
+ items?: Schema;
7
+ };
8
+ declare class ArrayType implements TypeSchema {
9
+ private readonly definition;
10
+ constructor(definition?: Partial<ArrayDefinition>);
11
+ getTypes(): string[];
12
+ isValidType(value: unknown): value is unknown[];
13
+ validate(value: unknown, path?: string[]): void;
14
+ }
15
+
16
+ export { ArrayType };
@@ -1,5 +1,5 @@
1
- import { Violation } from "./schema";
2
- import { describe, formatPath } from "./violation";
1
+ import { Violation } from "./schema.js";
2
+ import { describe, formatPath } from "./violation.js";
3
3
  class ArrayType {
4
4
  constructor(definition = {}) {
5
5
  this.definition = {
@@ -49,4 +49,3 @@ class ArrayType {
49
49
  export {
50
50
  ArrayType
51
51
  };
52
- //# sourceMappingURL=arrayType.js.map
@@ -20,8 +20,8 @@ __export(booleanType_exports, {
20
20
  BooleanType: () => BooleanType
21
21
  });
22
22
  module.exports = __toCommonJS(booleanType_exports);
23
- var import_schema = require("./schema");
24
- var import_violation = require("./violation");
23
+ var import_schema = require('./schema.cjs');
24
+ var import_violation = require('./violation.cjs');
25
25
  class BooleanType {
26
26
  getTypes() {
27
27
  return ["boolean"];
@@ -43,4 +43,3 @@ class BooleanType {
43
43
  0 && (module.exports = {
44
44
  BooleanType
45
45
  });
46
- //# sourceMappingURL=booleanType.cjs.map
@@ -0,0 +1,9 @@
1
+ import { TypeSchema } from './schema.cjs';
2
+
3
+ declare class BooleanType implements TypeSchema {
4
+ getTypes(): string[];
5
+ isValidType(value: unknown): value is boolean;
6
+ validate(value: unknown, path?: string[]): void;
7
+ }
8
+
9
+ export { BooleanType };
@@ -1,5 +1,5 @@
1
- import { Violation } from "./schema";
2
- import { describe, formatPath } from "./violation";
1
+ import { Violation } from "./schema.js";
2
+ import { describe, formatPath } from "./violation.js";
3
3
  class BooleanType {
4
4
  getTypes() {
5
5
  return ["boolean"];
@@ -20,4 +20,3 @@ class BooleanType {
20
20
  export {
21
21
  BooleanType
22
22
  };
23
- //# sourceMappingURL=booleanType.js.map
@@ -20,8 +20,8 @@ __export(functionType_exports, {
20
20
  FunctionType: () => FunctionType
21
21
  });
22
22
  module.exports = __toCommonJS(functionType_exports);
23
- var import_schema = require("./schema");
24
- var import_violation = require("./violation");
23
+ var import_schema = require('./schema.cjs');
24
+ var import_violation = require('./violation.cjs');
25
25
  class FunctionType {
26
26
  getTypes() {
27
27
  return ["function"];
@@ -43,4 +43,3 @@ class FunctionType {
43
43
  0 && (module.exports = {
44
44
  FunctionType
45
45
  });
46
- //# sourceMappingURL=functionType.cjs.map
@@ -0,0 +1,9 @@
1
+ import { TypeSchema } from './schema.cjs';
2
+
3
+ declare class FunctionType implements TypeSchema {
4
+ getTypes(): string[];
5
+ isValidType(value: unknown): value is boolean;
6
+ validate(value: unknown, path?: string[]): void;
7
+ }
8
+
9
+ export { FunctionType };
@@ -1,5 +1,5 @@
1
- import { Violation } from "./schema";
2
- import { describe, formatPath } from "./violation";
1
+ import { Violation } from "./schema.js";
2
+ import { describe, formatPath } from "./violation.js";
3
3
  class FunctionType {
4
4
  getTypes() {
5
5
  return ["function"];
@@ -20,4 +20,3 @@ class FunctionType {
20
20
  export {
21
21
  FunctionType
22
22
  };
23
- //# sourceMappingURL=functionType.js.map
@@ -33,18 +33,18 @@ __export(validation_exports, {
33
33
  UnionType: () => import_unionType.UnionType
34
34
  });
35
35
  module.exports = __toCommonJS(validation_exports);
36
- __reExport(validation_exports, require("./schema"), module.exports);
37
- __reExport(validation_exports, require("./violation"), module.exports);
38
- var import_arrayType = require("./arrayType");
39
- var import_booleanType = require("./booleanType");
40
- var import_functionType = require("./functionType");
41
- var import_jsonType = require("./jsonType");
42
- var import_mixedSchema = require("./mixedSchema");
43
- var import_nullType = require("./nullType");
44
- var import_numberType = require("./numberType");
45
- var import_objectType = require("./objectType");
46
- var import_stringType = require("./stringType");
47
- var import_unionType = require("./unionType");
36
+ __reExport(validation_exports, require('./schema.cjs'), module.exports);
37
+ __reExport(validation_exports, require('./violation.cjs'), module.exports);
38
+ var import_arrayType = require('./arrayType.cjs');
39
+ var import_booleanType = require('./booleanType.cjs');
40
+ var import_functionType = require('./functionType.cjs');
41
+ var import_jsonType = require('./jsonType.cjs');
42
+ var import_mixedSchema = require('./mixedSchema.cjs');
43
+ var import_nullType = require('./nullType.cjs');
44
+ var import_numberType = require('./numberType.cjs');
45
+ var import_objectType = require('./objectType.cjs');
46
+ var import_stringType = require('./stringType.cjs');
47
+ var import_unionType = require('./unionType.cjs');
48
48
  // Annotate the CommonJS export names for ESM import in node:
49
49
  0 && (module.exports = {
50
50
  ArrayType,
@@ -60,7 +60,6 @@ var import_unionType = require("./unionType");
60
60
  ObjectType,
61
61
  StringType,
62
62
  UnionType,
63
- ...require("./schema"),
64
- ...require("./violation")
63
+ ...require('./schema.cjs'),
64
+ ...require('./violation.cjs')
65
65
  });
66
- //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,12 @@
1
+ export { Schema, TypeSchema, Violation } from './schema.cjs';
2
+ export { describe, formatPath } from './violation.cjs';
3
+ export { ArrayType } from './arrayType.cjs';
4
+ export { BooleanType } from './booleanType.cjs';
5
+ export { FunctionType } from './functionType.cjs';
6
+ export { JsonArrayType, JsonObjectType, JsonPrimitiveType, JsonType } from './jsonType.cjs';
7
+ export { MixedSchema } from './mixedSchema.cjs';
8
+ export { NullType } from './nullType.cjs';
9
+ export { NumberType } from './numberType.cjs';
10
+ export { ObjectType } from './objectType.cjs';
11
+ export { StringType } from './stringType.cjs';
12
+ export { UnionType } from './unionType.cjs';
@@ -1,15 +1,15 @@
1
- export * from "./schema";
2
- export * from "./violation";
3
- import { ArrayType } from "./arrayType";
4
- import { BooleanType } from "./booleanType";
5
- import { FunctionType } from "./functionType";
6
- import { JsonType, JsonArrayType, JsonObjectType, JsonPrimitiveType } from "./jsonType";
7
- import { MixedSchema } from "./mixedSchema";
8
- import { NullType } from "./nullType";
9
- import { NumberType } from "./numberType";
10
- import { ObjectType } from "./objectType";
11
- import { StringType } from "./stringType";
12
- import { UnionType } from "./unionType";
1
+ export * from "./schema.js";
2
+ export * from "./violation.js";
3
+ import { ArrayType } from "./arrayType.js";
4
+ import { BooleanType } from "./booleanType.js";
5
+ import { FunctionType } from "./functionType.js";
6
+ import { JsonType, JsonArrayType, JsonObjectType, JsonPrimitiveType } from "./jsonType.js";
7
+ import { MixedSchema } from "./mixedSchema.js";
8
+ import { NullType } from "./nullType.js";
9
+ import { NumberType } from "./numberType.js";
10
+ import { ObjectType } from "./objectType.js";
11
+ import { StringType } from "./stringType.js";
12
+ import { UnionType } from "./unionType.js";
13
13
  export {
14
14
  ArrayType,
15
15
  BooleanType,
@@ -25,4 +25,3 @@ export {
25
25
  StringType,
26
26
  UnionType
27
27
  };
28
- //# sourceMappingURL=index.js.map
@@ -23,8 +23,8 @@ __export(jsonType_exports, {
23
23
  JsonType: () => JsonType
24
24
  });
25
25
  module.exports = __toCommonJS(jsonType_exports);
26
- var import_schema = require("./schema");
27
- var import_violation = require("./violation");
26
+ var import_schema = require('./schema.cjs');
27
+ var import_violation = require('./violation.cjs');
28
28
  function isJsonPrimitive(value) {
29
29
  return value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number";
30
30
  }
@@ -139,4 +139,3 @@ class JsonType {
139
139
  JsonPrimitiveType,
140
140
  JsonType
141
141
  });
142
- //# sourceMappingURL=jsonType.cjs.map
@@ -0,0 +1,35 @@
1
+ import { TypeSchema, Schema } from './schema.cjs';
2
+
3
+ type JsonObjectDefinition = {
4
+ properties?: Schema;
5
+ propertyNames?: Schema;
6
+ };
7
+ declare class JsonObjectType implements TypeSchema {
8
+ private readonly definition;
9
+ constructor(definition?: JsonObjectDefinition);
10
+ getTypes(): string[];
11
+ isValidType(value: unknown): boolean;
12
+ validate(value: unknown, path?: string[]): void;
13
+ }
14
+ type JsonArrayDefinition = {
15
+ items?: Schema;
16
+ };
17
+ declare class JsonArrayType implements TypeSchema {
18
+ private readonly definition;
19
+ constructor(definition?: JsonArrayDefinition);
20
+ getTypes(): string[];
21
+ isValidType(value: unknown): boolean;
22
+ validate(value: unknown, path?: string[]): void;
23
+ }
24
+ declare class JsonPrimitiveType implements TypeSchema {
25
+ getTypes(): string[];
26
+ isValidType(value: unknown): boolean;
27
+ validate(value: unknown, path?: string[]): void;
28
+ }
29
+ declare class JsonType implements TypeSchema {
30
+ getTypes(): string[];
31
+ isValidType(value: unknown): boolean;
32
+ validate(value: unknown, path?: string[]): void;
33
+ }
34
+
35
+ export { JsonArrayType, JsonObjectType, JsonPrimitiveType, JsonType };
@@ -1,5 +1,5 @@
1
- import { Violation } from "./schema";
2
- import { describe, formatPath } from "./violation";
1
+ import { Violation } from "./schema.js";
2
+ import { describe, formatPath } from "./violation.js";
3
3
  function isJsonPrimitive(value) {
4
4
  return value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number";
5
5
  }
@@ -113,4 +113,3 @@ export {
113
113
  JsonPrimitiveType,
114
114
  JsonType
115
115
  };
116
- //# sourceMappingURL=jsonType.js.map
@@ -28,4 +28,3 @@ class MixedSchema {
28
28
  0 && (module.exports = {
29
29
  MixedSchema
30
30
  });
31
- //# sourceMappingURL=mixedSchema.cjs.map
@@ -0,0 +1,7 @@
1
+ import { Schema } from './schema.cjs';
2
+
3
+ declare class MixedSchema implements Schema {
4
+ validate(): void;
5
+ }
6
+
7
+ export { MixedSchema };