@seedprotocol/sdk 0.4.32 → 0.5.2

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 (335) hide show
  1. package/dist/BasePathResolver-BDgc7c4T.js +485 -0
  2. package/dist/BasePathResolver-BDgc7c4T.js.map +1 -0
  3. package/dist/{ModelProperty-e_hXSFvf.js → ModelProperty-BBXBvgvy.js} +38 -43
  4. package/dist/ModelProperty-BBXBvgvy.js.map +1 -0
  5. package/dist/{Schema-DonRkUOJ.js → Schema-xAt7jWlW.js} +40 -40
  6. package/dist/{Schema-DonRkUOJ.js.map → Schema-xAt7jWlW.js.map} +1 -1
  7. package/dist/{SchemaValidationService-DcmfhQae.js → SchemaValidationService-CLzAdBm-.js} +10 -5
  8. package/dist/{SchemaValidationService-DcmfhQae.js.map → SchemaValidationService-CLzAdBm-.js.map} +1 -1
  9. package/dist/{backfillMetadataPropertyIds-CKTfvFgQ.js → backfillMetadataPropertyIds-DBVaIs7O.js} +3 -11
  10. package/dist/{backfillMetadataPropertyIds-CKTfvFgQ.js.map → backfillMetadataPropertyIds-DBVaIs7O.js.map} +1 -1
  11. package/dist/cjs/{ModelProperty-BQYU5hPQ.js → ModelProperty-Dgd4tGrB.js} +25 -26
  12. package/dist/cjs/{ModelProperty-BQYU5hPQ.js.map → ModelProperty-Dgd4tGrB.js.map} +1 -1
  13. package/dist/cjs/{Schema-BcRHcQ0W.js → Schema-dkd-eo3B.js} +28 -29
  14. package/dist/cjs/{Schema-BcRHcQ0W.js.map → Schema-dkd-eo3B.js.map} +1 -1
  15. package/dist/cjs/{SchemaValidationService-CQNDgyZl.js → SchemaValidationService-BMnjcVWV.js} +9 -10
  16. package/dist/cjs/{SchemaValidationService-CQNDgyZl.js.map → SchemaValidationService-BMnjcVWV.js.map} +1 -1
  17. package/dist/cjs/{backfillMetadataPropertyIds-Dn4oVmEv.js → backfillMetadataPropertyIds-ClLuj3s6.js} +11 -12
  18. package/dist/cjs/{backfillMetadataPropertyIds-Dn4oVmEv.js.map → backfillMetadataPropertyIds-ClLuj3s6.js.map} +1 -1
  19. package/dist/cjs/eas-nWAzbl_F.js +112 -0
  20. package/dist/cjs/eas-nWAzbl_F.js.map +1 -0
  21. package/dist/cjs/{getItem-DpnPrzl3.js → getItem-B08FgglK.js} +11 -12
  22. package/dist/cjs/{getItem-DpnPrzl3.js.map → getItem-B08FgglK.js.map} +1 -1
  23. package/dist/cjs/{getPublishPayload-CGKMEL3H.js → getPublishPayload-B_G_6qkE.js} +93 -83
  24. package/dist/cjs/getPublishPayload-B_G_6qkE.js.map +1 -0
  25. package/dist/cjs/{getPublishUploads-DeI0f2UN.js → getPublishUploads-Dt-DS-lo.js} +17 -18
  26. package/dist/cjs/{getPublishUploads-DeI0f2UN.js.map → getPublishUploads-Dt-DS-lo.js.map} +1 -1
  27. package/dist/cjs/{getSegmentedItemProperties-BgS_FhAx.js → getSegmentedItemProperties-BDGbeDW7.js} +64 -15
  28. package/dist/cjs/getSegmentedItemProperties-BDGbeDW7.js.map +1 -0
  29. package/dist/cjs/{index-ByozbTn_.js → index-CRBI6dSD.js} +1663 -3244
  30. package/dist/cjs/index-CRBI6dSD.js.map +1 -0
  31. package/dist/cjs/{index-BnAqr2le.js → index-Dx19j60c.js} +12 -13
  32. package/dist/cjs/index-Dx19j60c.js.map +1 -0
  33. package/dist/cjs/index.browser-BSf8HpnU.js +22 -0
  34. package/dist/cjs/index.browser-BSf8HpnU.js.map +1 -0
  35. package/dist/cjs/{ownership-CsWuaNfH.js → ownership-3Tc1-Yrc.js} +11 -25
  36. package/dist/cjs/{ownership-CsWuaNfH.js.map → ownership-3Tc1-Yrc.js.map} +1 -1
  37. package/dist/cjs/{property-CeR45LMx.js → property-628qAHpN.js} +13 -14
  38. package/dist/cjs/{property-CeR45LMx.js.map → property-628qAHpN.js.map} +1 -1
  39. package/dist/cjs/{syncDbWithEas-CA2Lum5V.js → syncDbWithEas-DOBtMPw-.js} +65 -81
  40. package/dist/cjs/syncDbWithEas-DOBtMPw-.js.map +1 -0
  41. package/dist/configurePlatform-Ce6NIKRP.js +28 -0
  42. package/dist/configurePlatform-Ce6NIKRP.js.map +1 -0
  43. package/dist/constants-DMHTYMgJ.js +120 -0
  44. package/dist/constants-DMHTYMgJ.js.map +1 -0
  45. package/dist/constants-slkc9uq0.js +655 -0
  46. package/dist/constants-slkc9uq0.js.map +1 -0
  47. package/dist/db-CSmK0c3e.js +1972 -0
  48. package/dist/db-CSmK0c3e.js.map +1 -0
  49. package/dist/eas-rx1grht5.js +69 -0
  50. package/dist/eas-rx1grht5.js.map +1 -0
  51. package/dist/{getItem-GOXWo_Iy.js → getItem-hPBJU5JF.js} +11 -6
  52. package/dist/{getItem-GOXWo_Iy.js.map → getItem-hPBJU5JF.js.map} +1 -1
  53. package/dist/{getPublishPayload-D16enahU.js → getPublishPayload-5ugovGK5.js} +88 -74
  54. package/dist/getPublishPayload-5ugovGK5.js.map +1 -0
  55. package/dist/{getPublishUploads-wGqH19UY.js → getPublishUploads-CdWeci-s.js} +15 -10
  56. package/dist/{getPublishUploads-wGqH19UY.js.map → getPublishUploads-CdWeci-s.js.map} +1 -1
  57. package/dist/{getSegmentedItemProperties-Be3kYWY3.js → getSegmentedItemProperties-DV2LHElJ.js} +18 -15
  58. package/dist/getSegmentedItemProperties-DV2LHElJ.js.map +1 -0
  59. package/dist/index-CcH2e0Zr.js +23 -0
  60. package/dist/index-CcH2e0Zr.js.map +1 -0
  61. package/dist/{index-BcXKZQpX.js → index-ClwdGWfr.js} +1625 -5474
  62. package/dist/index-ClwdGWfr.js.map +1 -0
  63. package/dist/{index-BFyMxc7e.js → index-QMrBK-L3.js} +2 -2
  64. package/dist/index-QMrBK-L3.js.map +1 -0
  65. package/dist/index.node-CrXwRoiB.js +503 -0
  66. package/dist/index.node-CrXwRoiB.js.map +1 -0
  67. package/dist/main.cjs +12 -14
  68. package/dist/main.cjs.map +1 -1
  69. package/dist/main.js +32 -22
  70. package/dist/main.js.map +1 -1
  71. package/dist/node.js +41 -346
  72. package/dist/node.js.map +1 -1
  73. package/dist/{ownership-C17YhE7J.js → ownership-58i0iyD9.js} +14 -9
  74. package/dist/{ownership-C17YhE7J.js.map → ownership-58i0iyD9.js.map} +1 -1
  75. package/dist/platform.browser.js +3512 -0
  76. package/dist/platform.browser.js.map +1 -0
  77. package/dist/platform.node.js +19 -0
  78. package/dist/platform.node.js.map +1 -0
  79. package/dist/{property-CRAau-Q-.js → property-CKhOxRNt.js} +15 -11
  80. package/dist/property-CKhOxRNt.js.map +1 -0
  81. package/dist/src/Item/Item.d.ts.map +1 -1
  82. package/dist/src/Item/service/actors/fetchDataFromEas.d.ts.map +1 -1
  83. package/dist/src/Item/service/actors/saveDataToDb.d.ts.map +1 -1
  84. package/dist/src/Model/service/actors/createModelProperties.d.ts.map +1 -1
  85. package/dist/src/Model/service/modelMachine.d.ts +1 -1
  86. package/dist/src/browser/db/Db.d.ts +17 -18
  87. package/dist/src/browser/db/Db.d.ts.map +1 -1
  88. package/dist/src/browser/helpers/ArweaveClient.d.ts +10 -27
  89. package/dist/src/browser/helpers/ArweaveClient.d.ts.map +1 -1
  90. package/dist/src/browser/helpers/EasClient.d.ts +6 -4
  91. package/dist/src/browser/helpers/EasClient.d.ts.map +1 -1
  92. package/dist/src/browser/helpers/FileManager.d.ts +27 -26
  93. package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
  94. package/dist/src/browser/helpers/PathResolver.d.ts +6 -5
  95. package/dist/src/browser/helpers/PathResolver.d.ts.map +1 -1
  96. package/dist/src/browser/helpers/QueryClient.d.ts +6 -5
  97. package/dist/src/browser/helpers/QueryClient.d.ts.map +1 -1
  98. package/dist/src/browser/workers/filesDownload.d.ts.map +1 -1
  99. package/dist/src/client/ClientManager.d.ts.map +1 -1
  100. package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -1
  101. package/dist/src/client/actors/processSchemaFiles.d.ts.map +1 -1
  102. package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
  103. package/dist/src/db/Db/BaseDb.d.ts +6 -26
  104. package/dist/src/db/Db/BaseDb.d.ts.map +1 -1
  105. package/dist/src/db/read/getItemData.d.ts +8 -0
  106. package/dist/src/db/read/getItemData.d.ts.map +1 -1
  107. package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
  108. package/dist/src/db/write/createMetadata.d.ts.map +1 -1
  109. package/dist/src/db/write/updateMetadata.d.ts.map +1 -1
  110. package/dist/src/eas.d.ts +4 -37
  111. package/dist/src/eas.d.ts.map +1 -1
  112. package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
  113. package/dist/src/helpers/ArweaveClient/BaseArweaveClient.d.ts +1 -101
  114. package/dist/src/helpers/ArweaveClient/BaseArweaveClient.d.ts.map +1 -1
  115. package/dist/src/helpers/ArweaveClient/arweaveL1UploadApi.d.ts +1 -51
  116. package/dist/src/helpers/ArweaveClient/arweaveL1UploadApi.d.ts.map +1 -1
  117. package/dist/src/helpers/ArweaveClient/index.d.ts +2 -2
  118. package/dist/src/helpers/ArweaveClient/index.d.ts.map +1 -1
  119. package/dist/src/helpers/ArweaveClient/selectReadGateway.d.ts +1 -15
  120. package/dist/src/helpers/ArweaveClient/selectReadGateway.d.ts.map +1 -1
  121. package/dist/src/helpers/ArweaveClient/uploadApiVerification.d.ts +1 -22
  122. package/dist/src/helpers/ArweaveClient/uploadApiVerification.d.ts.map +1 -1
  123. package/dist/src/helpers/EasClient/BaseEasClient.d.ts +1 -9
  124. package/dist/src/helpers/EasClient/BaseEasClient.d.ts.map +1 -1
  125. package/dist/src/helpers/FileManager/BaseFileManager.d.ts +4 -2
  126. package/dist/src/helpers/FileManager/BaseFileManager.d.ts.map +1 -1
  127. package/dist/src/helpers/FileManager/IFileManager.d.ts +44 -0
  128. package/dist/src/helpers/FileManager/IFileManager.d.ts.map +1 -0
  129. package/dist/src/helpers/PathResolver/BasePathResolver.d.ts +16 -12
  130. package/dist/src/helpers/PathResolver/BasePathResolver.d.ts.map +1 -1
  131. package/dist/src/helpers/PathResolver/IPathResolver.d.ts +16 -0
  132. package/dist/src/helpers/PathResolver/IPathResolver.d.ts.map +1 -0
  133. package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts +1 -6
  134. package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts.map +1 -1
  135. package/dist/src/helpers/constants.d.ts +4 -22
  136. package/dist/src/helpers/constants.d.ts.map +1 -1
  137. package/dist/src/helpers/db.d.ts.map +1 -1
  138. package/dist/src/helpers/easPropertyCanonical.d.ts +1 -14
  139. package/dist/src/helpers/easPropertyCanonical.d.ts.map +1 -1
  140. package/dist/src/helpers/easRevokedFilter.d.ts +1 -9
  141. package/dist/src/helpers/easRevokedFilter.d.ts.map +1 -1
  142. package/dist/src/helpers/easUid.d.ts +1 -12
  143. package/dist/src/helpers/easUid.d.ts.map +1 -1
  144. package/dist/src/helpers/ethereumUtils.d.ts +5 -0
  145. package/dist/src/helpers/ethereumUtils.d.ts.map +1 -0
  146. package/dist/src/helpers/file/fetchAll/index.d.ts +1 -1
  147. package/dist/src/helpers/file/fetchAll/index.d.ts.map +1 -1
  148. package/dist/src/helpers/gateway/gatewayState.d.ts +2 -0
  149. package/dist/src/helpers/gateway/gatewayState.d.ts.map +1 -0
  150. package/dist/src/helpers/gateway/resolveSeedGatewayEndpoints.d.ts +2 -0
  151. package/dist/src/helpers/gateway/resolveSeedGatewayEndpoints.d.ts.map +1 -0
  152. package/dist/src/helpers/gateway/seedGatewayConfig.d.ts +2 -0
  153. package/dist/src/helpers/gateway/seedGatewayConfig.d.ts.map +1 -0
  154. package/dist/src/helpers/generateId.d.ts +2 -0
  155. package/dist/src/helpers/generateId.d.ts.map +1 -0
  156. package/dist/src/helpers/getSchemaForItemProperty.d.ts +1 -1
  157. package/dist/src/helpers/getSchemaForItemProperty.d.ts.map +1 -1
  158. package/dist/src/helpers/getSegmentedItemProperties.d.ts.map +1 -1
  159. package/dist/src/helpers/index.d.ts +16 -15
  160. package/dist/src/helpers/index.d.ts.map +1 -1
  161. package/dist/src/helpers/isSqliteUniqueConstraintError.d.ts +7 -0
  162. package/dist/src/helpers/isSqliteUniqueConstraintError.d.ts.map +1 -0
  163. package/dist/src/helpers/mediaRef.d.ts +3 -0
  164. package/dist/src/helpers/mediaRef.d.ts.map +1 -1
  165. package/dist/src/helpers/property/index.d.ts.map +1 -1
  166. package/dist/src/index.d.ts +13 -7
  167. package/dist/src/index.d.ts.map +1 -1
  168. package/dist/src/interfaces/IDb.d.ts +11 -0
  169. package/dist/src/interfaces/IDb.d.ts.map +1 -1
  170. package/dist/src/node/db/Db.d.ts +22 -37
  171. package/dist/src/node/db/Db.d.ts.map +1 -1
  172. package/dist/src/node/helpers/ArweaveClient.d.ts +4 -30
  173. package/dist/src/node/helpers/ArweaveClient.d.ts.map +1 -1
  174. package/dist/src/node/helpers/EasClient.d.ts +4 -6
  175. package/dist/src/node/helpers/EasClient.d.ts.map +1 -1
  176. package/dist/src/node/helpers/FileManager.d.ts +26 -25
  177. package/dist/src/node/helpers/FileManager.d.ts.map +1 -1
  178. package/dist/src/node/helpers/PathResolver.d.ts +6 -5
  179. package/dist/src/node/helpers/PathResolver.d.ts.map +1 -1
  180. package/dist/src/node/helpers/QueryClient.d.ts +4 -6
  181. package/dist/src/node/helpers/QueryClient.d.ts.map +1 -1
  182. package/dist/src/node/helpers/scripts.d.ts +5 -7
  183. package/dist/src/node/helpers/scripts.d.ts.map +1 -1
  184. package/dist/src/node/index.d.ts +2 -9
  185. package/dist/src/node/index.d.ts.map +1 -1
  186. package/dist/src/node/webpack/index.d.ts +3 -0
  187. package/dist/src/node/webpack/index.d.ts.map +1 -1
  188. package/dist/src/platform/configurePlatform.d.ts +6 -0
  189. package/dist/src/platform/configurePlatform.d.ts.map +1 -0
  190. package/dist/src/platform/index.browser.d.ts +3 -0
  191. package/dist/src/platform/index.browser.d.ts.map +1 -0
  192. package/dist/src/platform/index.d.ts +9 -0
  193. package/dist/src/platform/index.d.ts.map +1 -0
  194. package/dist/src/platform/index.node.d.ts +3 -0
  195. package/dist/src/platform/index.node.d.ts.map +1 -0
  196. package/dist/src/platform/types.d.ts +14 -0
  197. package/dist/src/platform/types.d.ts.map +1 -0
  198. package/dist/src/query/createLocalQueryDataSource.d.ts +6 -0
  199. package/dist/src/query/createLocalQueryDataSource.d.ts.map +1 -0
  200. package/dist/src/query/index.d.ts +4 -0
  201. package/dist/src/query/index.d.ts.map +1 -0
  202. package/dist/src/query/registerSeedQueryLocalSource.d.ts +25 -0
  203. package/dist/src/query/registerSeedQueryLocalSource.d.ts.map +1 -0
  204. package/dist/src/stores/eas.d.ts +1 -18
  205. package/dist/src/stores/eas.d.ts.map +1 -1
  206. package/dist/src/testing/platformTestHandle.d.ts +8 -0
  207. package/dist/src/testing/platformTestHandle.d.ts.map +1 -0
  208. package/dist/src/types/gateway.d.ts +2 -0
  209. package/dist/src/types/gateway.d.ts.map +1 -0
  210. package/dist/src/types/index.d.ts +5 -0
  211. package/dist/src/types/index.d.ts.map +1 -1
  212. package/dist/src/types/item.d.ts +1 -1
  213. package/dist/src/types/item.d.ts.map +1 -1
  214. package/dist/src/types/machines.d.ts +12 -0
  215. package/dist/src/types/machines.d.ts.map +1 -1
  216. package/dist/src/types/seedProtocol.d.ts +1 -1
  217. package/dist/src/types/seedProtocol.d.ts.map +1 -1
  218. package/dist/src/vite/index.d.ts +2 -47
  219. package/dist/src/vite/index.d.ts.map +1 -1
  220. package/dist/{syncDbWithEas-CB5aXPtf.js → syncDbWithEas-GsaXzTIY.js} +59 -56
  221. package/dist/syncDbWithEas-GsaXzTIY.js.map +1 -0
  222. package/dist/{updateSeedRevokedAt-BIu5Q4Po.js → updateSeedRevokedAt-Ba0OhDQj.js} +2 -2
  223. package/dist/{updateSeedRevokedAt-BIu5Q4Po.js.map → updateSeedRevokedAt-Ba0OhDQj.js.map} +1 -1
  224. package/dist/vite.cjs +5 -481
  225. package/dist/vite.cjs.map +1 -1
  226. package/dist/vite.js +1 -483
  227. package/dist/vite.js.map +1 -1
  228. package/package.json +42 -37
  229. package/dist/ArweaveClient-CZpZgmR2.js +0 -204
  230. package/dist/ArweaveClient-CZpZgmR2.js.map +0 -1
  231. package/dist/ArweaveClient-Cs7AL9dp.js +0 -204
  232. package/dist/ArweaveClient-Cs7AL9dp.js.map +0 -1
  233. package/dist/Db-CF6R7HIy.js +0 -2098
  234. package/dist/Db-CF6R7HIy.js.map +0 -1
  235. package/dist/Db-CZkONsdT.js +0 -248
  236. package/dist/Db-CZkONsdT.js.map +0 -1
  237. package/dist/EasClient-PXOzSzPG.js +0 -29
  238. package/dist/EasClient-PXOzSzPG.js.map +0 -1
  239. package/dist/EasClient-qfTiM2we.js +0 -29
  240. package/dist/EasClient-qfTiM2we.js.map +0 -1
  241. package/dist/FileManager-5GkHtxF7.js +0 -1256
  242. package/dist/FileManager-5GkHtxF7.js.map +0 -1
  243. package/dist/FileManager-jORQ8Bb6.js +0 -177
  244. package/dist/FileManager-jORQ8Bb6.js.map +0 -1
  245. package/dist/ModelProperty-e_hXSFvf.js.map +0 -1
  246. package/dist/PathResolver-B4_X69Rd.js +0 -204
  247. package/dist/PathResolver-B4_X69Rd.js.map +0 -1
  248. package/dist/PathResolver-Dz0RVGIz.js +0 -78
  249. package/dist/PathResolver-Dz0RVGIz.js.map +0 -1
  250. package/dist/QueryClient-CXHZ239d.js +0 -51
  251. package/dist/QueryClient-CXHZ239d.js.map +0 -1
  252. package/dist/QueryClient-D_UK4YLm.js +0 -35
  253. package/dist/QueryClient-D_UK4YLm.js.map +0 -1
  254. package/dist/arweave-default-shim.js +0 -6
  255. package/dist/cjs/getPublishPayload-CGKMEL3H.js.map +0 -1
  256. package/dist/cjs/getSegmentedItemProperties-BgS_FhAx.js.map +0 -1
  257. package/dist/cjs/index-BnAqr2le.js.map +0 -1
  258. package/dist/cjs/index-ByozbTn_.js.map +0 -1
  259. package/dist/cjs/syncDbWithEas-CA2Lum5V.js.map +0 -1
  260. package/dist/debug-default-shim.js +0 -27
  261. package/dist/getPublishPayload-D16enahU.js.map +0 -1
  262. package/dist/getSegmentedItemProperties-Be3kYWY3.js.map +0 -1
  263. package/dist/index-BFyMxc7e.js.map +0 -1
  264. package/dist/index-BcXKZQpX.js.map +0 -1
  265. package/dist/index-C9p-skT3.js +0 -18
  266. package/dist/index-C9p-skT3.js.map +0 -1
  267. package/dist/property-CRAau-Q-.js.map +0 -1
  268. package/dist/queries-Ct7CcQ3g.js +0 -16
  269. package/dist/queries-Ct7CcQ3g.js.map +0 -1
  270. package/dist/src/Item/queries.d.ts +0 -27
  271. package/dist/src/Item/queries.d.ts.map +0 -1
  272. package/dist/src/graphql/fragments/Attestation.d.ts +0 -2
  273. package/dist/src/graphql/fragments/Attestation.d.ts.map +0 -1
  274. package/dist/src/graphql/fragments/Schema.d.ts +0 -2
  275. package/dist/src/graphql/fragments/Schema.d.ts.map +0 -1
  276. package/dist/src/graphql/fragments/index.d.ts +0 -3
  277. package/dist/src/graphql/fragments/index.d.ts.map +0 -1
  278. package/dist/src/graphql/gql/fragment-masking.d.ts +0 -20
  279. package/dist/src/graphql/gql/fragment-masking.d.ts.map +0 -1
  280. package/dist/src/graphql/gql/gql.d.ts +0 -107
  281. package/dist/src/graphql/gql/gql.d.ts.map +0 -1
  282. package/dist/src/graphql/gql/graphql.d.ts +0 -2969
  283. package/dist/src/graphql/gql/graphql.d.ts.map +0 -1
  284. package/dist/src/graphql/gql/index.d.ts +0 -3
  285. package/dist/src/graphql/gql/index.d.ts.map +0 -1
  286. package/dist/src/helpers/ArweaveClient/queries.d.ts +0 -13
  287. package/dist/src/helpers/ArweaveClient/queries.d.ts.map +0 -1
  288. package/dist/src/helpers/file/queries.d.ts +0 -9
  289. package/dist/src/helpers/file/queries.d.ts.map +0 -1
  290. package/dist/src/helpers/image/queries.d.ts +0 -7
  291. package/dist/src/helpers/image/queries.d.ts.map +0 -1
  292. package/dist/src/node/codegen/drizzle.d.ts +0 -5
  293. package/dist/src/node/codegen/drizzle.d.ts.map +0 -1
  294. package/dist/src/node/codegen/index.d.ts +0 -2
  295. package/dist/src/node/codegen/index.d.ts.map +0 -1
  296. package/dist/src/node/codegen/ts-to-proto.d.ts +0 -9
  297. package/dist/src/node/codegen/ts-to-proto.d.ts.map +0 -1
  298. package/dist/src/node/db/node.app.db.config.d.ts +0 -4
  299. package/dist/src/node/db/node.app.db.config.d.ts.map +0 -1
  300. package/dist/src/node/helpers/index.d.ts +0 -3
  301. package/dist/src/node/helpers/index.d.ts.map +0 -1
  302. package/dist/src/vite/arweave-default-shim.d.ts +0 -4
  303. package/dist/src/vite/arweave-default-shim.d.ts.map +0 -1
  304. package/dist/src/vite/debug-default-shim.d.ts +0 -3
  305. package/dist/src/vite/debug-default-shim.d.ts.map +0 -1
  306. package/dist/src/vite/easFix.d.ts +0 -2
  307. package/dist/src/vite/easFix.d.ts.map +0 -1
  308. package/dist/syncDbWithEas-CB5aXPtf.js.map +0 -1
  309. /package/dist/db/drizzle/{drizzle/0000_married_malice.sql → 0000_married_malice.sql} +0 -0
  310. /package/dist/db/drizzle/{drizzle/0001_sweet_bruce_banner.sql → 0001_sweet_bruce_banner.sql} +0 -0
  311. /package/dist/db/drizzle/{drizzle/0002_bitter_proudstar.sql → 0002_bitter_proudstar.sql} +0 -0
  312. /package/dist/db/drizzle/{drizzle/0003_cultured_senator_kelly.sql → 0003_cultured_senator_kelly.sql} +0 -0
  313. /package/dist/db/drizzle/{drizzle/0004_add_publisher_to_seeds.sql → 0004_add_publisher_to_seeds.sql} +0 -0
  314. /package/dist/db/drizzle/{drizzle/0005_bright_lily_hollister.sql → 0005_bright_lily_hollister.sql} +0 -0
  315. /package/dist/db/drizzle/{drizzle/0006_add_publisher_to_versions_and_metadata.sql → 0006_add_publisher_to_versions_and_metadata.sql} +0 -0
  316. /package/dist/db/drizzle/{drizzle/0007_add_required_to_properties.sql → 0007_add_required_to_properties.sql} +0 -0
  317. /package/dist/db/drizzle/{drizzle/0008_add_revoked_at_to_seeds.sql → 0008_add_revoked_at_to_seeds.sql} +0 -0
  318. /package/dist/db/drizzle/{drizzle/0009_happy_namor.sql → 0009_happy_namor.sql} +0 -0
  319. /package/dist/db/drizzle/{drizzle/0010_add_arweave_l1_finalize_jobs.sql → 0010_add_arweave_l1_finalize_jobs.sql} +0 -0
  320. /package/dist/db/drizzle/{drizzle/0011_normalize_placeholder_uids.sql → 0011_normalize_placeholder_uids.sql} +0 -0
  321. /package/dist/db/drizzle/{drizzle/0012_html_embedded_image_co_publish.sql → 0012_html_embedded_image_co_publish.sql} +0 -0
  322. /package/dist/db/drizzle/{drizzle/0013_eas_sync_processes.sql → 0013_eas_sync_processes.sql} +0 -0
  323. /package/dist/db/drizzle/{drizzle/meta → meta}/0000_snapshot.json +0 -0
  324. /package/dist/db/drizzle/{drizzle/meta → meta}/0001_snapshot.json +0 -0
  325. /package/dist/db/drizzle/{drizzle/meta → meta}/0002_snapshot.json +0 -0
  326. /package/dist/db/drizzle/{drizzle/meta → meta}/0003_snapshot.json +0 -0
  327. /package/dist/db/drizzle/{drizzle/meta → meta}/0004_snapshot.json +0 -0
  328. /package/dist/db/drizzle/{drizzle/meta → meta}/0005_snapshot.json +0 -0
  329. /package/dist/db/drizzle/{drizzle/meta → meta}/0006_snapshot.json +0 -0
  330. /package/dist/db/drizzle/{drizzle/meta → meta}/0007_snapshot.json +0 -0
  331. /package/dist/db/drizzle/{drizzle/meta → meta}/0008_snapshot.json +0 -0
  332. /package/dist/db/drizzle/{drizzle/meta → meta}/0009_snapshot.json +0 -0
  333. /package/dist/db/drizzle/{drizzle/meta → meta}/0010_snapshot.json +0 -0
  334. /package/dist/db/drizzle/{drizzle/meta → meta}/0013_snapshot.json +0 -0
  335. /package/dist/db/drizzle/{drizzle/meta → meta}/_journal.json +0 -0
@@ -0,0 +1,69 @@
1
+ import { BaseQueryClient, BaseEasClient, GET_SCHEMAS } from '@seedprotocol/eas';
2
+ export { getCanonicalItemPropertiesFromEas, getEasSchemaUidBySchemaName, getItemPropertiesFromEas, getItemVersionsFromEas, getSeedUidsBySchemaName, getSeedsBySchemaName, getSeedsFromSchemaUids } from '@seedprotocol/eas';
3
+ import { t as toSnakeCase } from './constants-slkc9uq0.js';
4
+ import 'debug';
5
+ import './BasePathResolver-BDgc7c4T.js';
6
+ import 'drizzle-orm/sqlite-core';
7
+ import 'drizzle-orm';
8
+ import '@seedprotocol/arweave';
9
+ import 'xstate';
10
+ import 'pluralize';
11
+ import '@sinclair/typebox';
12
+ import 'nanoid';
13
+ import 'nanoid-dictionary';
14
+ import '@seedprotocol/query';
15
+
16
+ /** Stays in SDK: depends on local Model registry. */
17
+ const getModelSchemasFromEas = async () => {
18
+ const queryClient = BaseQueryClient.getQueryClient();
19
+ const easClient = BaseEasClient.getEasClient();
20
+ const _mod_0 = await import('./index-ClwdGWfr.js');
21
+ const _ns_0 = _mod_0.am;
22
+ const modelMod = _ns_0;
23
+ const { Model } = modelMod;
24
+ const allModels = await Model.all();
25
+ const modelNames = allModels.map((m) => m.modelName).filter((name) => !!name);
26
+ if (modelNames.length === 0) {
27
+ return [];
28
+ }
29
+ const OR = [];
30
+ const hasImageModel = modelNames.includes('Image');
31
+ for (const modelName of modelNames) {
32
+ const snake = toSnakeCase(modelName);
33
+ OR.push({
34
+ schema: {
35
+ equals: `bytes32 ${snake}`,
36
+ },
37
+ });
38
+ const altSchema = `bytes32 ${modelName}`;
39
+ if (altSchema !== `bytes32 ${snake}`) {
40
+ OR.push({
41
+ schema: {
42
+ equals: altSchema,
43
+ },
44
+ });
45
+ }
46
+ }
47
+ if (hasImageModel) {
48
+ OR.push({
49
+ schema: {
50
+ equals: `bytes32 image`,
51
+ },
52
+ });
53
+ }
54
+ const modelSchemas = await queryClient.fetchQuery({
55
+ queryKey: [`getSchemasAllModels`],
56
+ queryFn: async () => easClient.request(GET_SCHEMAS, {
57
+ where: {
58
+ OR,
59
+ },
60
+ }),
61
+ });
62
+ if (!modelSchemas?.schemas?.length) {
63
+ return [];
64
+ }
65
+ return modelSchemas.schemas;
66
+ };
67
+
68
+ export { getModelSchemasFromEas };
69
+ //# sourceMappingURL=eas-rx1grht5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eas-rx1grht5.js","sources":["../../src/eas.ts"],"sourcesContent":["export {\n getItemVersionsFromEas,\n getItemPropertiesFromEas,\n getCanonicalItemPropertiesFromEas,\n getEasSchemaUidBySchemaName,\n getSeedsFromSchemaUids,\n getSeedsBySchemaName,\n getSeedUidsBySchemaName,\n} from '@seedprotocol/eas'\nexport type { Attestation, EASSchema } from '@seedprotocol/eas'\n\nimport { toSnakeCase } from '@/helpers'\nimport { withExcludeRevokedFilter } from '@seedprotocol/eas'\nimport { BaseEasClient } from '@seedprotocol/eas'\nimport { BaseQueryClient } from '@seedprotocol/eas'\nimport { GET_SCHEMAS } from '@seedprotocol/eas'\nimport type { EASSchema } from '@seedprotocol/eas'\n\ntype GetModelSchemasFromEas = () => Promise<EASSchema[]>\n\n/** Stays in SDK: depends on local Model registry. */\nexport const getModelSchemasFromEas: GetModelSchemasFromEas = async () => {\n const queryClient = BaseQueryClient.getQueryClient()\n const easClient = BaseEasClient.getEasClient()\n\n const modelMod = await import('./Model/Model')\n const { Model } = modelMod\n const allModels = await Model.all()\n const modelNames = allModels.map((m) => m.modelName).filter((name): name is string => !!name)\n\n if (modelNames.length === 0) {\n return []\n }\n\n const OR: Record<string, unknown>[] = []\n const hasImageModel = modelNames.includes('Image')\n\n for (const modelName of modelNames) {\n const snake = toSnakeCase(modelName)\n OR.push({\n schema: {\n equals: `bytes32 ${snake}`,\n },\n })\n const altSchema = `bytes32 ${modelName}`\n if (altSchema !== `bytes32 ${snake}`) {\n OR.push({\n schema: {\n equals: altSchema,\n },\n })\n }\n }\n\n if (hasImageModel) {\n OR.push({\n schema: {\n equals: `bytes32 image`,\n },\n })\n }\n\n const modelSchemas = await queryClient.fetchQuery({\n queryKey: [`getSchemasAllModels`],\n queryFn: async () =>\n easClient.request(GET_SCHEMAS, {\n where: {\n OR,\n },\n }),\n })\n\n if (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, u as Item } from './index-BcXKZQpX.js';
1
+ import { c as getItemData, I as Item } from './index-ClwdGWfr.js';
2
2
  import { startCase } from 'lodash-es';
3
3
  import 'xstate';
4
+ import './BasePathResolver-BDgc7c4T.js';
4
5
  import 'drizzle-orm/sqlite-core';
5
6
  import 'drizzle-orm';
6
- import 'nanoid';
7
- import 'nanoid-dictionary';
7
+ import './constants-slkc9uq0.js';
8
8
  import 'debug';
9
- import 'ethers';
9
+ import '@seedprotocol/arweave';
10
+ import '@seedprotocol/eas';
10
11
  import 'pluralize';
11
12
  import '@sinclair/typebox';
13
+ import 'nanoid';
14
+ import 'nanoid-dictionary';
15
+ import '@seedprotocol/query';
16
+ import './db-CSmK0c3e.js';
12
17
  import 'drizzle-orm/casing';
18
+ import './constants-DMHTYMgJ.js';
13
19
  import 'rxjs';
14
- import 'arweave';
15
20
  import 'js-sha3';
16
21
 
17
22
  const getItem = async ({ modelName, seedLocalId, seedUid }) => {
@@ -37,4 +42,4 @@ const getItem = async ({ modelName, seedLocalId, seedUid }) => {
37
42
  };
38
43
 
39
44
  export { getItem };
40
- //# sourceMappingURL=getItem-GOXWo_Iy.js.map
45
+ //# sourceMappingURL=getItem-hPBJU5JF.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getItem-GOXWo_Iy.js","sources":["../../src/db/read/getItem.ts"],"sourcesContent":["import { getItemData } from './getItemData'\nimport { GetItem } from '@/types'\nimport { Item } from '@/Item/Item'\nimport { startCase } from 'lodash-es'\n\nexport const getItem: GetItem = async ({ modelName, seedLocalId, seedUid }) => {\n const itemInitObj = await getItemData({\n modelName,\n seedLocalId,\n seedUid,\n })\n\n if (!itemInitObj) {\n console.error(\n `[db/queries] [getItem] no itemInitObj modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.seedLocalId) {\n console.error(\n `[db/queries] [getItem] no itemInitObj.seedLocalId modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.modelName && itemInitObj.type) {\n itemInitObj.modelName = startCase(itemInitObj.type)\n }\n\n // DB + loadOrCreateItem + concurrent property saves (e.g. during publish) can exceed the default 5s idle wait.\n const getItemReadyTimeoutMs = 120_000\n return Item.create(itemInitObj, { readyTimeout: getItemReadyTimeoutMs })\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKO,MAAM,OAAO,GAAY,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAI;AAC5E,IAAA,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC;QACpC,SAAS;QACT,WAAW;QACX,OAAO;AACR,KAAA,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,CAAC,KAAK,CACX,CAAA,iDAAA,EAAoD,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAChH;QACD;IACF;AAEA,IAAA,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;QAC5B,OAAO,CAAC,KAAK,CACX,CAAA,6DAAA,EAAgE,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAC5H;QACD;IACF;IAEA,IAAI,CAAC,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,IAAI,EAAE;QAC9C,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD;;IAGA,MAAM,qBAAqB,GAAG,MAAO;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAC1E;;;;"}
1
+ {"version":3,"file":"getItem-hPBJU5JF.js","sources":["../../src/db/read/getItem.ts"],"sourcesContent":["import { getItemData } from './getItemData'\nimport { GetItem } from '@/types'\nimport { Item } from '@/Item/Item'\nimport { startCase } from 'lodash-es'\n\nexport const getItem: GetItem = async ({ modelName, seedLocalId, seedUid }) => {\n const itemInitObj = await getItemData({\n modelName,\n seedLocalId,\n seedUid,\n })\n\n if (!itemInitObj) {\n console.error(\n `[db/queries] [getItem] no itemInitObj modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.seedLocalId) {\n console.error(\n `[db/queries] [getItem] no itemInitObj.seedLocalId modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.modelName && itemInitObj.type) {\n itemInitObj.modelName = startCase(itemInitObj.type)\n }\n\n // DB + loadOrCreateItem + concurrent property saves (e.g. during publish) can exceed the default 5s idle wait.\n const getItemReadyTimeoutMs = 120_000\n return Item.create(itemInitObj, { readyTimeout: getItemReadyTimeoutMs })\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,OAAO,GAAY,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAI;AAC5E,IAAA,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC;QACpC,SAAS;QACT,WAAW;QACX,OAAO;AACR,KAAA,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,CAAC,KAAK,CACX,CAAA,iDAAA,EAAoD,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAChH;QACD;IACF;AAEA,IAAA,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;QAC5B,OAAO,CAAC,KAAK,CACX,CAAA,6DAAA,EAAgE,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAC5H;QACD;IACF;IAEA,IAAI,CAAC,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,IAAI,EAAE;QAC9C,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD;;IAGA,MAAM,qBAAqB,GAAG,MAAO;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAC1E;;;;"}
@@ -1,25 +1,45 @@
1
- import { Z as ZERO_BYTES32, z as getEasSchemaUidForModel, p as BaseDb, A as models, C as properties, V as VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, E as isValidEasAttestationUid, G as getLatestPublishedVersionRow, K as modelPropertiesToObject, b as ModelPropertyDataTypes, r as resolveSeedIdsFromRefString, t as normalizeRelationPropertyValue, x as htmlEmbeddedImageCoPublish, O as parseListPropertyValueFromStorage, Q as getCorrectId, S as INTERNAL_PROPERTY_NAMES, U as defaultAttestationData, W as INTERNAL_DATA_TYPES, X as toSnakeCase$1, Y as getEasSchemaUidForSchemaDefinition, _ as getEasSchemaForItemProperty } from './index-BcXKZQpX.js';
1
+ import { ZERO_BYTES32, VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, INTERNAL_PROPERTY_NAMES, defaultAttestationData, INTERNAL_DATA_TYPES } from './constants-DMHTYMgJ.js';
2
+ import { SchemaEncoder } from '@ethereum-attestation-service/eas-sdk';
3
+ import { d as getEasSchemaUidForModel, e as getLatestPublishedVersionRow, m as modelPropertiesToObject, p as parseListPropertyValueFromStorage, f as getEasSchemaForItemProperty } from './index-ClwdGWfr.js';
4
+ import { M as ModelPropertyDataTypes, r as resolveSeedIdsFromRefString, k as normalizeRelationPropertyValue, l as getCorrectId, n as normalizeDataType, t as toSnakeCase$1 } from './constants-slkc9uq0.js';
2
5
  import { toSnakeCase } from 'drizzle-orm/casing';
3
6
  import pluralize from 'pluralize';
4
- import { g as getSegmentedItemProperties } from './getSegmentedItemProperties-Be3kYWY3.js';
5
- import { getPropertySchema } from './property-CRAau-Q-.js';
7
+ import { isValidEasAttestationUid, getEasSchemaUidForSchemaDefinition } from '@seedprotocol/eas';
8
+ import { g as getSegmentedItemProperties } from './getSegmentedItemProperties-DV2LHElJ.js';
9
+ import { getPropertySchema } from './property-CKhOxRNt.js';
6
10
  import { upperFirst, camelCase } from 'lodash-es';
11
+ import { B as BaseDb, m as models, p as properties, h as htmlEmbeddedImageCoPublish } from './BasePathResolver-BDgc7c4T.js';
7
12
  import { eq, and } from 'drizzle-orm';
8
13
  import debug from 'debug';
9
- import { ethers } from 'ethers';
14
+ import 'js-sha3';
10
15
  import 'reflect-metadata';
16
+ import '@seedprotocol/arweave';
11
17
  import 'xstate';
12
- import 'drizzle-orm/sqlite-core';
13
18
  import 'nanoid';
14
19
  import 'nanoid-dictionary';
15
- import '@sinclair/typebox';
20
+ import './db-CSmK0c3e.js';
16
21
  import 'rxjs';
17
- import 'arweave';
18
- import 'js-sha3';
22
+ import '@seedprotocol/query';
23
+ import '@sinclair/typebox';
24
+ import 'drizzle-orm/sqlite-core';
25
+
26
+ /** UTF-8 string to 0x-prefixed bytes32 hex (right-padded with zeros). */
27
+ function encodeBytes32String(value) {
28
+ const bytes = new TextEncoder().encode(value);
29
+ if (bytes.length > 32) {
30
+ throw new Error(`encodeBytes32String: value exceeds 32 bytes (${bytes.length})`);
31
+ }
32
+ const hex = Array.from(bytes)
33
+ .map((b) => b.toString(16).padStart(2, '0'))
34
+ .join('');
35
+ return `0x${hex.padEnd(64, '0')}`;
36
+ }
19
37
 
20
38
  // Dynamic import to break circular dependency with getItem -> BaseItem
21
39
  // import { getItem } from '@/db/read/getItem'
22
40
  debug('seedSdk:db:getPublishPayload');
41
+ /** Case-insensitive dataType match (schema JSON may use "text" vs "Text"). */
42
+ const matchesDataType = (actual, expected) => normalizeDataType(actual) === expected;
23
43
  function addValidationError(ctx, message, field, code = 'publish_validation') {
24
44
  ctx.errors.push({ field: field ?? '', message, code });
25
45
  }
@@ -92,9 +112,7 @@ async function resolveVersionUid(seedLocalId, seedUid) {
92
112
  if (published?.uid)
93
113
  return published.uid;
94
114
  try {
95
- const _mod_0 = await import('./index-BcXKZQpX.js');
96
- const _ns_0 = _mod_0.c8;
97
- const { getItemVersionsFromEas } = _ns_0;
115
+ const { getItemVersionsFromEas } = await import('./eas-rx1grht5.js');
98
116
  const attestations = await getItemVersionsFromEas({ seedUids: [seedUid] });
99
117
  const latest = attestations?.[0];
100
118
  if (latest?.id)
@@ -106,12 +124,15 @@ async function resolveVersionUid(seedLocalId, seedUid) {
106
124
  return ZERO_BYTES32;
107
125
  }
108
126
  const getPropertyData = async (itemProperty, ctx) => {
109
- const dataType = itemProperty.propertyDef?.dataType;
110
- const entry = dataType != null ? INTERNAL_DATA_TYPES[dataType] : undefined;
127
+ const rawDataType = itemProperty.propertyDef?.dataType;
128
+ const dataType = rawDataType ? normalizeDataType(String(rawDataType)) : undefined;
129
+ const entry = dataType
130
+ ? INTERNAL_DATA_TYPES[dataType]
131
+ : undefined;
111
132
  const easDataType = entry?.eas;
112
133
  if (!easDataType) {
113
134
  if (ctx) {
114
- addValidationError(ctx, `Unknown or unsupported property data type "${dataType ?? 'undefined'}" for property: ${itemProperty.propertyName}. Supported types: ${Object.keys(INTERNAL_DATA_TYPES).join(', ')}.`, itemProperty.propertyName);
135
+ addValidationError(ctx, `Unknown or unsupported property data type "${rawDataType ?? 'undefined'}" for property: ${itemProperty.propertyName}. Supported types: ${Object.keys(INTERNAL_DATA_TYPES).join(', ')}.`, itemProperty.propertyName);
115
136
  }
116
137
  return null;
117
138
  }
@@ -122,10 +143,10 @@ const getPropertyData = async (itemProperty, ctx) => {
122
143
  ? ip.storagePropertyName
123
144
  : itemProperty.propertyName;
124
145
  // Align List-of-relation EAS field name with processListProperty (authorIdentityIds for authors → Identity)
125
- if (propertyDefForName?.dataType === ModelPropertyDataTypes.List &&
126
- (propertyDefForName.ref || propertyDefForName.refModelName) &&
146
+ if (matchesDataType(propertyDefForName?.dataType, ModelPropertyDataTypes.List) &&
147
+ (propertyDefForName?.ref || propertyDefForName?.refModelName) &&
127
148
  !(ip.storagePropertyName && ip.storagePropertyName.length > 0)) {
128
- const ref = propertyDefForName.ref ?? propertyDefForName.refModelName;
149
+ const ref = propertyDefForName?.ref ?? propertyDefForName?.refModelName;
129
150
  if (ref) {
130
151
  const singular = pluralize.singular(itemProperty.propertyName);
131
152
  nameForEas = `${singular}${ref}Ids`;
@@ -157,16 +178,18 @@ const getPropertyData = async (itemProperty, ctx) => {
157
178
  * Also ensures Relation/Image properties have required from schema when missing (for publish validation). */
158
179
  const ensurePropertyDefs = async (targetItem) => {
159
180
  targetItem.properties.filter((p) => targetItem.modelName &&
160
- (!p.propertyDef || (p.propertyDef?.dataType === 'Relation' && p.propertyDef?.required === undefined)));
181
+ (!p.propertyDef ||
182
+ (matchesDataType(p.propertyDef?.dataType, ModelPropertyDataTypes.Relation) &&
183
+ p.propertyDef?.required === undefined)));
161
184
  let schema;
162
185
  for (const itemProperty of targetItem.properties) {
163
186
  if (!itemProperty.propertyDef && targetItem.modelName) {
164
187
  schema = await getPropertySchema(targetItem.modelName, itemProperty.propertyName);
165
188
  if (!schema) {
166
189
  try {
167
- const _mod_1 = await import('./index-BcXKZQpX.js');
168
- const _ns_1 = _mod_1.cd;
169
- const { Model } = _ns_1;
190
+ const _mod_0 = await import('./index-ClwdGWfr.js');
191
+ const _ns_0 = _mod_0.am;
192
+ const { Model } = _ns_0;
170
193
  const normalizedModelName = upperFirst(camelCase(targetItem.modelName));
171
194
  let model = Model.getByName(normalizedModelName);
172
195
  if (!model?.properties?.length) {
@@ -238,15 +261,6 @@ const ensurePropertyDefs = async (targetItem) => {
238
261
  }
239
262
  }
240
263
  };
241
- // Lazy import SchemaEncoder to avoid module resolution issues with ts-import
242
- let SchemaEncoderClass = null;
243
- const getSchemaEncoder = async () => {
244
- if (!SchemaEncoderClass) {
245
- const easSdk = await import('@ethereum-attestation-service/eas-sdk');
246
- SchemaEncoderClass = easSdk.SchemaEncoder;
247
- }
248
- return SchemaEncoderClass;
249
- };
250
264
  const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx, buildOpts) => {
251
265
  const forceFullSnapshot = buildOpts?.forceFullSnapshot === true;
252
266
  for (const basicProperty of itemBasicProperties) {
@@ -257,12 +271,12 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
257
271
  const snapshot = basicProperty.getService().getSnapshot();
258
272
  const context = 'context' in snapshot ? snapshot.context : null;
259
273
  const propertyDef = basicProperty.propertyDef ?? (context ? context.propertyRecordSchema : undefined);
260
- const isFileImageHtml = propertyDef?.dataType === ModelPropertyDataTypes.File ||
261
- propertyDef?.dataType === ModelPropertyDataTypes.Image ||
262
- propertyDef?.dataType === ModelPropertyDataTypes.Html;
263
- const isJsonStorage = propertyDef?.dataType === ModelPropertyDataTypes.Json ||
264
- propertyDef?.refValueType === ModelPropertyDataTypes.Json;
265
- const isRelation = propertyDef?.dataType === ModelPropertyDataTypes.Relation;
274
+ const isFileImageHtml = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.File) ||
275
+ matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Image) ||
276
+ matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Html);
277
+ const isJsonStorage = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Json) ||
278
+ matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Json);
279
+ const isRelation = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Relation);
266
280
  // storageTransactionId is usually Text in the schema; .value still prefers renderValue (URL, label).
267
281
  const isStorageTransactionIdProp = isStorageTransactionPropertyName(basicProperty.propertyName);
268
282
  // File/Image/Html + Relation + Json storage + storage tx id: use propertyValue (canonical).
@@ -277,7 +291,7 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
277
291
  continue;
278
292
  }
279
293
  // Relation + Image/File/Html/Json refs often expose seedLocalId on context.propertyValue while .value is an object — align for encode + resolve hints
280
- if (propertyDef?.dataType === ModelPropertyDataTypes.Relation ||
294
+ if (matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Relation) ||
281
295
  isFileImageHtml ||
282
296
  isJsonStorage) {
283
297
  const pv = context.propertyValue;
@@ -332,9 +346,11 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
332
346
  }
333
347
  // Validate against property validation rules (enum, pattern, minLength, maxLength) before encoding
334
348
  if (propertyDef?.validation) {
335
- const { SchemaValidationService } = await import('./SchemaValidationService-DcmfhQae.js');
349
+ const { SchemaValidationService } = await import('./SchemaValidationService-CLzAdBm-.js');
336
350
  const validationService = new SchemaValidationService();
337
- const validationResult = validationService.validatePropertyValue(value, propertyDef.dataType, propertyDef.validation, propertyDef.refValueType);
351
+ const validationResult = validationService.validatePropertyValue(value, normalizeDataType(propertyDef.dataType), propertyDef.validation, propertyDef.refValueType
352
+ ? normalizeDataType(propertyDef.refValueType)
353
+ : undefined);
338
354
  if (!validationResult.isValid && validationResult.errors.length > 0) {
339
355
  const firstError = validationResult.errors[0];
340
356
  addValidationError(ctx, firstError.message, basicProperty.propertyName, firstError.code ?? 'publish_validation');
@@ -366,7 +382,7 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
366
382
  continue;
367
383
  rawIds.push(trimmed);
368
384
  if (trimmed.length !== 66 && !trimmed.startsWith('0x')) {
369
- newValues.push(ethers.encodeBytes32String(trimmed));
385
+ newValues.push(encodeBytes32String(trimmed));
370
386
  }
371
387
  else {
372
388
  newValues.push(trimmed);
@@ -392,7 +408,6 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
392
408
  ];
393
409
  let encodedData;
394
410
  try {
395
- const SchemaEncoder = await getSchemaEncoder();
396
411
  const dataEncoder = new SchemaEncoder(schemaDef);
397
412
  encodedData = dataEncoder.encodeData(data);
398
413
  }
@@ -459,19 +474,19 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
459
474
  let value = context.propertyValue;
460
475
  // File/Image/Html/Json metadata is stored with Id suffix (e.g. "textId"); context may not have propertyValue
461
476
  // if the property was created from schema before metadata loaded. Fallback to metadata lookup.
462
- const isStorageSeed = relationOrImageProperty.propertyDef?.dataType === ModelPropertyDataTypes.File ||
463
- relationOrImageProperty.propertyDef?.dataType === ModelPropertyDataTypes.Image ||
464
- relationOrImageProperty.propertyDef?.dataType === ModelPropertyDataTypes.Html ||
465
- relationOrImageProperty.propertyDef?.dataType === ModelPropertyDataTypes.Json ||
466
- (relationOrImageProperty.propertyDef?.dataType === ModelPropertyDataTypes.Relation &&
467
- (relationOrImageProperty.propertyDef?.refValueType === ModelPropertyDataTypes.File ||
468
- relationOrImageProperty.propertyDef?.refValueType === ModelPropertyDataTypes.Image ||
469
- relationOrImageProperty.propertyDef?.refValueType === ModelPropertyDataTypes.Html ||
470
- relationOrImageProperty.propertyDef?.refValueType === ModelPropertyDataTypes.Json));
477
+ const isStorageSeed = matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.File) ||
478
+ matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Image) ||
479
+ matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Html) ||
480
+ matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Json) ||
481
+ (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Relation) &&
482
+ (matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.File) ||
483
+ matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Image) ||
484
+ matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Html) ||
485
+ matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Json)));
471
486
  if (isStorageSeed && (context.seedLocalId || context.seedUid)) {
472
- const _mod_2 = await import('./index-BcXKZQpX.js');
473
- const _ns_2 = _mod_2.c9;
474
- const { getPropertyData: getPropertyDataFromDb } = _ns_2;
487
+ const _mod_1 = await import('./index-ClwdGWfr.js');
488
+ const _ns_1 = _mod_1.ai;
489
+ const { getPropertyData: getPropertyDataFromDb } = _ns_1;
475
490
  const metaRow = await getPropertyDataFromDb({
476
491
  propertyName: relationOrImageProperty.propertyName,
477
492
  seedLocalId: context.seedLocalId,
@@ -522,17 +537,17 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
522
537
  }
523
538
  // Required relation/image/file/html/json with no value: cannot publish
524
539
  if (isRequired && !value) {
525
- const typeLabel = propertyDef?.dataType === ModelPropertyDataTypes.File ||
526
- propertyDef?.refValueType === ModelPropertyDataTypes.File
540
+ const typeLabel = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.File) ||
541
+ matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.File)
527
542
  ? 'file'
528
- : propertyDef?.dataType === ModelPropertyDataTypes.Image ||
529
- propertyDef?.refValueType === ModelPropertyDataTypes.Image
543
+ : matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Image) ||
544
+ matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Image)
530
545
  ? 'image'
531
- : propertyDef?.dataType === ModelPropertyDataTypes.Html ||
532
- propertyDef?.refValueType === ModelPropertyDataTypes.Html
546
+ : matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Html) ||
547
+ matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Html)
533
548
  ? 'html'
534
- : propertyDef?.dataType === ModelPropertyDataTypes.Json ||
535
- propertyDef?.refValueType === ModelPropertyDataTypes.Json
549
+ : matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Json) ||
550
+ matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Json)
536
551
  ? 'json'
537
552
  : 'relation';
538
553
  const refLabel = propertyDef?.ref ?? propertyDef?.refModelName ?? 'related';
@@ -557,7 +572,7 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
557
572
  return multiPublishPayload;
558
573
  }
559
574
  // Use dynamic import to break circular dependency
560
- const getItemMod = await import('./getItem-GOXWo_Iy.js');
575
+ const getItemMod = await import('./getItem-hPBJU5JF.js');
561
576
  const { getItem } = getItemMod;
562
577
  const relatedItem = await getItem({
563
578
  seedLocalId,
@@ -578,16 +593,16 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
578
593
  }
579
594
  const versionUid = getVersionUid(relatedItem);
580
595
  let modelName;
581
- if (relationOrImageProperty.propertyDef?.dataType === ModelPropertyDataTypes.Image) {
596
+ if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Image)) {
582
597
  modelName = 'Image';
583
598
  }
584
- if (relationOrImageProperty.propertyDef?.dataType === ModelPropertyDataTypes.File) {
599
+ if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.File)) {
585
600
  modelName = 'File';
586
601
  }
587
- if (relationOrImageProperty.propertyDef?.dataType === ModelPropertyDataTypes.Html) {
602
+ if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Html)) {
588
603
  modelName = 'Html';
589
604
  }
590
- if (relationOrImageProperty.propertyDef?.dataType === ModelPropertyDataTypes.Relation) {
605
+ if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Relation)) {
591
606
  const def = relationOrImageProperty.propertyDef;
592
607
  modelName = def.ref ?? def.refModelName;
593
608
  }
@@ -655,7 +670,7 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
655
670
  async function resolveHtmlPropertySchemaUidByHtmlSeed(item, htmlSeedLocalId, ctx) {
656
671
  const want = htmlSeedLocalId.trim();
657
672
  for (const p of item.properties) {
658
- if (p.propertyDef?.dataType !== ModelPropertyDataTypes.Html)
673
+ if (!matchesDataType(p.propertyDef?.dataType, ModelPropertyDataTypes.Html))
659
674
  continue;
660
675
  const snap = p.getService().getSnapshot();
661
676
  const c = 'context' in snap ? snap.context : null;
@@ -683,7 +698,7 @@ async function processHtmlEmbeddedCoPublishImagePayloads(item, multiPublishPaylo
683
698
  if (rows.length === 0)
684
699
  return multiPublishPayload;
685
700
  const forceFullSnapshot = buildOpts?.forceFullSnapshot === true;
686
- const getItemMod = await import('./getItem-GOXWo_Iy.js');
701
+ const getItemMod = await import('./getItem-hPBJU5JF.js');
687
702
  const { getItem } = getItemMod;
688
703
  const doneImages = new Set();
689
704
  for (const row of rows) {
@@ -810,7 +825,7 @@ const processListProperty = async (listProperty, multiPublishPayload, originalSe
810
825
  if (!seedLocalId && !seedUid)
811
826
  continue;
812
827
  // Use dynamic import to break circular dependency
813
- const getItemMod = await import('./getItem-GOXWo_Iy.js');
828
+ const getItemMod = await import('./getItem-hPBJU5JF.js');
814
829
  const { getItem } = getItemMod;
815
830
  const relatedItem = await getItem({
816
831
  seedLocalId,
@@ -829,13 +844,13 @@ const processListProperty = async (listProperty, multiPublishPayload, originalSe
829
844
  const def = listProperty.propertyDef;
830
845
  modelName = def.ref ?? def.refModelName;
831
846
  }
832
- if (listProperty.propertyDef?.dataType === ModelPropertyDataTypes.Image) {
847
+ if (matchesDataType(listProperty.propertyDef?.dataType, ModelPropertyDataTypes.Image)) {
833
848
  modelName = 'Image';
834
849
  }
835
- if (listProperty.propertyDef?.dataType === ModelPropertyDataTypes.File) {
850
+ if (matchesDataType(listProperty.propertyDef?.dataType, ModelPropertyDataTypes.File)) {
836
851
  modelName = 'File';
837
852
  }
838
- if (listProperty.propertyDef?.dataType === ModelPropertyDataTypes.Html) {
853
+ if (matchesDataType(listProperty.propertyDef?.dataType, ModelPropertyDataTypes.Html)) {
839
854
  modelName = 'Html';
840
855
  }
841
856
  if (!modelName) {
@@ -1317,7 +1332,6 @@ const resolvePublishPayloadValues = async (multiPayload, resolvedUids) => {
1317
1332
  if (Object.keys(resolvedUids).length === 0) {
1318
1333
  return multiPayload;
1319
1334
  }
1320
- const SchemaEncoder = await getSchemaEncoder();
1321
1335
  const result = [];
1322
1336
  for (const payload of multiPayload) {
1323
1337
  const updatedAttestations = [];
@@ -1418,4 +1432,4 @@ const resolvePublishPayloadValues = async (multiPayload, resolvedUids) => {
1418
1432
  };
1419
1433
 
1420
1434
  export { PublishValidationFailedError, getPublishPayload, resolvePublishPayloadValues, validateItemForPublish };
1421
- //# sourceMappingURL=getPublishPayload-D16enahU.js.map
1435
+ //# sourceMappingURL=getPublishPayload-5ugovGK5.js.map