@datocms/cma-client 5.1.1 → 5.1.3

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 (444) hide show
  1. package/dist/cjs/fieldTypes/boolean.js +7 -1
  2. package/dist/cjs/fieldTypes/boolean.js.map +1 -1
  3. package/dist/cjs/fieldTypes/color.js +7 -1
  4. package/dist/cjs/fieldTypes/color.js.map +1 -1
  5. package/dist/cjs/fieldTypes/date.js +7 -1
  6. package/dist/cjs/fieldTypes/date.js.map +1 -1
  7. package/dist/cjs/fieldTypes/date_time.js +7 -1
  8. package/dist/cjs/fieldTypes/date_time.js.map +1 -1
  9. package/dist/cjs/fieldTypes/file.js +7 -1
  10. package/dist/cjs/fieldTypes/file.js.map +1 -1
  11. package/dist/cjs/fieldTypes/float.js +7 -1
  12. package/dist/cjs/fieldTypes/float.js.map +1 -1
  13. package/dist/cjs/fieldTypes/gallery.js +7 -1
  14. package/dist/cjs/fieldTypes/gallery.js.map +1 -1
  15. package/dist/cjs/fieldTypes/integer.js +7 -1
  16. package/dist/cjs/fieldTypes/integer.js.map +1 -1
  17. package/dist/cjs/fieldTypes/json.js +7 -1
  18. package/dist/cjs/fieldTypes/json.js.map +1 -1
  19. package/dist/cjs/fieldTypes/lat_lon.js +7 -1
  20. package/dist/cjs/fieldTypes/lat_lon.js.map +1 -1
  21. package/dist/cjs/fieldTypes/link.js +7 -1
  22. package/dist/cjs/fieldTypes/link.js.map +1 -1
  23. package/dist/cjs/fieldTypes/links.js +7 -1
  24. package/dist/cjs/fieldTypes/links.js.map +1 -1
  25. package/dist/cjs/fieldTypes/rich_text.js +23 -5
  26. package/dist/cjs/fieldTypes/rich_text.js.map +1 -1
  27. package/dist/cjs/fieldTypes/seo.js +7 -1
  28. package/dist/cjs/fieldTypes/seo.js.map +1 -1
  29. package/dist/cjs/fieldTypes/single_block.js +37 -17
  30. package/dist/cjs/fieldTypes/single_block.js.map +1 -1
  31. package/dist/cjs/fieldTypes/slug.js +8 -2
  32. package/dist/cjs/fieldTypes/slug.js.map +1 -1
  33. package/dist/cjs/fieldTypes/string.js +7 -1
  34. package/dist/cjs/fieldTypes/string.js.map +1 -1
  35. package/dist/cjs/fieldTypes/structured_text.js +28 -22
  36. package/dist/cjs/fieldTypes/structured_text.js.map +1 -1
  37. package/dist/cjs/fieldTypes/text.js +7 -1
  38. package/dist/cjs/fieldTypes/text.js.map +1 -1
  39. package/dist/cjs/fieldTypes/video.js +7 -1
  40. package/dist/cjs/fieldTypes/video.js.map +1 -1
  41. package/dist/cjs/generated/{SchemaTypes.js → ApiTypes.js} +1 -1
  42. package/dist/cjs/generated/ApiTypes.js.map +1 -0
  43. package/dist/cjs/generated/Client.js +1 -1
  44. package/dist/cjs/generated/{SimpleSchemaTypes.js → RawApiTypes.js} +1 -1
  45. package/dist/cjs/generated/RawApiTypes.js.map +1 -0
  46. package/dist/cjs/generated/resources/AccessToken.js.map +1 -1
  47. package/dist/cjs/generated/resources/AuditLogEvent.js.map +1 -1
  48. package/dist/cjs/generated/resources/BuildEvent.js.map +1 -1
  49. package/dist/cjs/generated/resources/BuildTrigger.js.map +1 -1
  50. package/dist/cjs/generated/resources/EditingSession.js.map +1 -1
  51. package/dist/cjs/generated/resources/EmojiSuggestions.js.map +1 -1
  52. package/dist/cjs/generated/resources/Environment.js.map +1 -1
  53. package/dist/cjs/generated/resources/Field.js.map +1 -1
  54. package/dist/cjs/generated/resources/Fieldset.js.map +1 -1
  55. package/dist/cjs/generated/resources/Item.js.map +1 -1
  56. package/dist/cjs/generated/resources/ItemType.js.map +1 -1
  57. package/dist/cjs/generated/resources/ItemTypeFilter.js.map +1 -1
  58. package/dist/cjs/generated/resources/ItemVersion.js.map +1 -1
  59. package/dist/cjs/generated/resources/JobResult.js.map +1 -1
  60. package/dist/cjs/generated/resources/MaintenanceMode.js.map +1 -1
  61. package/dist/cjs/generated/resources/MenuItem.js.map +1 -1
  62. package/dist/cjs/generated/resources/Plugin.js.map +1 -1
  63. package/dist/cjs/generated/resources/PublicInfo.js.map +1 -1
  64. package/dist/cjs/generated/resources/Role.js.map +1 -1
  65. package/dist/cjs/generated/resources/ScheduledPublication.js.map +1 -1
  66. package/dist/cjs/generated/resources/ScheduledUnpublishing.js.map +1 -1
  67. package/dist/cjs/generated/resources/SchemaMenuItem.js.map +1 -1
  68. package/dist/cjs/generated/resources/SearchResult.js.map +1 -1
  69. package/dist/cjs/generated/resources/Session.js.map +1 -1
  70. package/dist/cjs/generated/resources/Site.js.map +1 -1
  71. package/dist/cjs/generated/resources/SiteInvitation.js.map +1 -1
  72. package/dist/cjs/generated/resources/SsoGroup.js.map +1 -1
  73. package/dist/cjs/generated/resources/SsoSettings.js.map +1 -1
  74. package/dist/cjs/generated/resources/SsoUser.js.map +1 -1
  75. package/dist/cjs/generated/resources/SubscriptionLimit.js.map +1 -1
  76. package/dist/cjs/generated/resources/Upload.js.map +1 -1
  77. package/dist/cjs/generated/resources/UploadCollection.js.map +1 -1
  78. package/dist/cjs/generated/resources/UploadFilter.js.map +1 -1
  79. package/dist/cjs/generated/resources/UploadRequest.js.map +1 -1
  80. package/dist/cjs/generated/resources/UploadSmartTag.js.map +1 -1
  81. package/dist/cjs/generated/resources/UploadTag.js.map +1 -1
  82. package/dist/cjs/generated/resources/UploadTrack.js.map +1 -1
  83. package/dist/cjs/generated/resources/UsageCounter.js.map +1 -1
  84. package/dist/cjs/generated/resources/User.js.map +1 -1
  85. package/dist/cjs/generated/resources/Webhook.js.map +1 -1
  86. package/dist/cjs/generated/resources/WebhookCall.js.map +1 -1
  87. package/dist/cjs/generated/resources/WhiteLabelSettings.js.map +1 -1
  88. package/dist/cjs/generated/resources/Workflow.js.map +1 -1
  89. package/dist/cjs/index.js +3 -5
  90. package/dist/cjs/index.js.map +1 -1
  91. package/dist/cjs/resources/Role.js.map +1 -1
  92. package/dist/cjs/utilities/blocks.js +7 -7
  93. package/dist/cjs/utilities/blocks.js.map +1 -1
  94. package/dist/cjs/utilities/buildBlockRecord.js.map +1 -1
  95. package/dist/cjs/utilities/{fieldValueLocalization.js → fieldValue.js} +52 -52
  96. package/dist/cjs/utilities/fieldValue.js.map +1 -0
  97. package/dist/cjs/utilities/fieldsContainingReferences.js.map +1 -1
  98. package/dist/cjs/utilities/recursiveBlocks.js +18 -19
  99. package/dist/cjs/utilities/recursiveBlocks.js.map +1 -1
  100. package/dist/cjs/utilities/schemaRepository.js.map +1 -1
  101. package/dist/esm/fieldTypes/boolean.d.ts +2 -0
  102. package/dist/esm/fieldTypes/boolean.js +5 -0
  103. package/dist/esm/fieldTypes/boolean.js.map +1 -1
  104. package/dist/esm/fieldTypes/color.d.ts +2 -0
  105. package/dist/esm/fieldTypes/color.js +5 -0
  106. package/dist/esm/fieldTypes/color.js.map +1 -1
  107. package/dist/esm/fieldTypes/date.d.ts +2 -0
  108. package/dist/esm/fieldTypes/date.js +5 -0
  109. package/dist/esm/fieldTypes/date.js.map +1 -1
  110. package/dist/esm/fieldTypes/date_time.d.ts +2 -0
  111. package/dist/esm/fieldTypes/date_time.js +5 -0
  112. package/dist/esm/fieldTypes/date_time.js.map +1 -1
  113. package/dist/esm/fieldTypes/file.d.ts +2 -0
  114. package/dist/esm/fieldTypes/file.js +5 -0
  115. package/dist/esm/fieldTypes/file.js.map +1 -1
  116. package/dist/esm/fieldTypes/float.d.ts +2 -0
  117. package/dist/esm/fieldTypes/float.js +5 -0
  118. package/dist/esm/fieldTypes/float.js.map +1 -1
  119. package/dist/esm/fieldTypes/gallery.d.ts +2 -0
  120. package/dist/esm/fieldTypes/gallery.js +5 -0
  121. package/dist/esm/fieldTypes/gallery.js.map +1 -1
  122. package/dist/esm/fieldTypes/integer.d.ts +2 -0
  123. package/dist/esm/fieldTypes/integer.js +5 -0
  124. package/dist/esm/fieldTypes/integer.js.map +1 -1
  125. package/dist/esm/fieldTypes/json.d.ts +2 -0
  126. package/dist/esm/fieldTypes/json.js +5 -0
  127. package/dist/esm/fieldTypes/json.js.map +1 -1
  128. package/dist/esm/fieldTypes/lat_lon.d.ts +2 -0
  129. package/dist/esm/fieldTypes/lat_lon.js +5 -0
  130. package/dist/esm/fieldTypes/lat_lon.js.map +1 -1
  131. package/dist/esm/fieldTypes/link.d.ts +2 -0
  132. package/dist/esm/fieldTypes/link.js +5 -0
  133. package/dist/esm/fieldTypes/link.js.map +1 -1
  134. package/dist/esm/fieldTypes/links.d.ts +2 -0
  135. package/dist/esm/fieldTypes/links.js +5 -0
  136. package/dist/esm/fieldTypes/links.js.map +1 -1
  137. package/dist/esm/fieldTypes/rich_text.d.ts +13 -9
  138. package/dist/esm/fieldTypes/rich_text.js +20 -5
  139. package/dist/esm/fieldTypes/rich_text.js.map +1 -1
  140. package/dist/esm/fieldTypes/seo.d.ts +2 -0
  141. package/dist/esm/fieldTypes/seo.js +5 -0
  142. package/dist/esm/fieldTypes/seo.js.map +1 -1
  143. package/dist/esm/fieldTypes/single_block.d.ts +33 -23
  144. package/dist/esm/fieldTypes/single_block.js +30 -13
  145. package/dist/esm/fieldTypes/single_block.js.map +1 -1
  146. package/dist/esm/fieldTypes/slug.d.ts +2 -0
  147. package/dist/esm/fieldTypes/slug.js +6 -1
  148. package/dist/esm/fieldTypes/slug.js.map +1 -1
  149. package/dist/esm/fieldTypes/string.d.ts +2 -0
  150. package/dist/esm/fieldTypes/string.js +5 -0
  151. package/dist/esm/fieldTypes/string.js.map +1 -1
  152. package/dist/esm/fieldTypes/structured_text.d.ts +22 -83
  153. package/dist/esm/fieldTypes/structured_text.js +25 -22
  154. package/dist/esm/fieldTypes/structured_text.js.map +1 -1
  155. package/dist/esm/fieldTypes/text.d.ts +2 -0
  156. package/dist/esm/fieldTypes/text.js +5 -0
  157. package/dist/esm/fieldTypes/text.js.map +1 -1
  158. package/dist/esm/fieldTypes/video.d.ts +2 -0
  159. package/dist/esm/fieldTypes/video.js +5 -0
  160. package/dist/esm/fieldTypes/video.js.map +1 -1
  161. package/dist/esm/generated/{SimpleSchemaTypes.d.ts → ApiTypes.d.ts} +2 -2
  162. package/dist/esm/generated/ApiTypes.js +2 -0
  163. package/dist/esm/generated/ApiTypes.js.map +1 -0
  164. package/dist/esm/generated/Client.d.ts +1 -1
  165. package/dist/esm/generated/Client.js +1 -1
  166. package/dist/esm/generated/{SchemaTypes.d.ts → RawApiTypes.d.ts} +2 -2
  167. package/dist/esm/generated/RawApiTypes.js +2 -0
  168. package/dist/esm/generated/RawApiTypes.js.map +1 -0
  169. package/dist/esm/generated/resources/AccessToken.d.ts +14 -14
  170. package/dist/esm/generated/resources/AccessToken.js.map +1 -1
  171. package/dist/esm/generated/resources/AuditLogEvent.d.ts +4 -4
  172. package/dist/esm/generated/resources/AuditLogEvent.js.map +1 -1
  173. package/dist/esm/generated/resources/BuildEvent.d.ts +8 -8
  174. package/dist/esm/generated/resources/BuildEvent.js.map +1 -1
  175. package/dist/esm/generated/resources/BuildTrigger.d.ts +16 -16
  176. package/dist/esm/generated/resources/BuildTrigger.js.map +1 -1
  177. package/dist/esm/generated/resources/DailyUsage.d.ts +4 -4
  178. package/dist/esm/generated/resources/EditingSession.d.ts +7 -7
  179. package/dist/esm/generated/resources/EditingSession.js.map +1 -1
  180. package/dist/esm/generated/resources/EmojiSuggestions.d.ts +4 -4
  181. package/dist/esm/generated/resources/EmojiSuggestions.js.map +1 -1
  182. package/dist/esm/generated/resources/Environment.d.ts +14 -14
  183. package/dist/esm/generated/resources/Environment.js.map +1 -1
  184. package/dist/esm/generated/resources/Field.d.ts +713 -713
  185. package/dist/esm/generated/resources/Field.js.map +1 -1
  186. package/dist/esm/generated/resources/Fieldset.d.ts +12 -12
  187. package/dist/esm/generated/resources/Fieldset.js.map +1 -1
  188. package/dist/esm/generated/resources/Item.d.ts +36 -36
  189. package/dist/esm/generated/resources/Item.js.map +1 -1
  190. package/dist/esm/generated/resources/ItemType.d.ts +15 -15
  191. package/dist/esm/generated/resources/ItemType.js.map +1 -1
  192. package/dist/esm/generated/resources/ItemTypeFilter.d.ts +12 -12
  193. package/dist/esm/generated/resources/ItemTypeFilter.js.map +1 -1
  194. package/dist/esm/generated/resources/ItemVersion.d.ts +10 -10
  195. package/dist/esm/generated/resources/ItemVersion.js.map +1 -1
  196. package/dist/esm/generated/resources/JobResult.d.ts +4 -4
  197. package/dist/esm/generated/resources/JobResult.js.map +1 -1
  198. package/dist/esm/generated/resources/MaintenanceMode.d.ts +8 -8
  199. package/dist/esm/generated/resources/MaintenanceMode.js.map +1 -1
  200. package/dist/esm/generated/resources/MenuItem.d.ts +14 -14
  201. package/dist/esm/generated/resources/MenuItem.js.map +1 -1
  202. package/dist/esm/generated/resources/Plugin.d.ts +14 -14
  203. package/dist/esm/generated/resources/Plugin.js.map +1 -1
  204. package/dist/esm/generated/resources/PublicInfo.d.ts +4 -4
  205. package/dist/esm/generated/resources/PublicInfo.js.map +1 -1
  206. package/dist/esm/generated/resources/Role.d.ts +14 -14
  207. package/dist/esm/generated/resources/Role.js.map +1 -1
  208. package/dist/esm/generated/resources/ScheduledPublication.d.ts +6 -6
  209. package/dist/esm/generated/resources/ScheduledPublication.js.map +1 -1
  210. package/dist/esm/generated/resources/ScheduledUnpublishing.d.ts +6 -6
  211. package/dist/esm/generated/resources/ScheduledUnpublishing.js.map +1 -1
  212. package/dist/esm/generated/resources/SchemaMenuItem.d.ts +14 -14
  213. package/dist/esm/generated/resources/SchemaMenuItem.js.map +1 -1
  214. package/dist/esm/generated/resources/SearchResult.d.ts +6 -6
  215. package/dist/esm/generated/resources/SearchResult.js.map +1 -1
  216. package/dist/esm/generated/resources/Session.d.ts +4 -4
  217. package/dist/esm/generated/resources/Session.js.map +1 -1
  218. package/dist/esm/generated/resources/Site.d.ts +24 -24
  219. package/dist/esm/generated/resources/Site.js.map +1 -1
  220. package/dist/esm/generated/resources/SiteInvitation.d.ts +14 -14
  221. package/dist/esm/generated/resources/SiteInvitation.js.map +1 -1
  222. package/dist/esm/generated/resources/SsoGroup.d.ts +10 -10
  223. package/dist/esm/generated/resources/SsoGroup.js.map +1 -1
  224. package/dist/esm/generated/resources/SsoSettings.d.ts +8 -8
  225. package/dist/esm/generated/resources/SsoSettings.js.map +1 -1
  226. package/dist/esm/generated/resources/SsoUser.d.ts +10 -10
  227. package/dist/esm/generated/resources/SsoUser.js.map +1 -1
  228. package/dist/esm/generated/resources/SubscriptionFeature.d.ts +4 -4
  229. package/dist/esm/generated/resources/SubscriptionLimit.d.ts +6 -6
  230. package/dist/esm/generated/resources/SubscriptionLimit.js.map +1 -1
  231. package/dist/esm/generated/resources/Upload.d.ts +22 -22
  232. package/dist/esm/generated/resources/Upload.js.map +1 -1
  233. package/dist/esm/generated/resources/UploadCollection.d.ts +14 -14
  234. package/dist/esm/generated/resources/UploadCollection.js.map +1 -1
  235. package/dist/esm/generated/resources/UploadFilter.d.ts +12 -12
  236. package/dist/esm/generated/resources/UploadFilter.js.map +1 -1
  237. package/dist/esm/generated/resources/UploadRequest.d.ts +4 -4
  238. package/dist/esm/generated/resources/UploadRequest.js.map +1 -1
  239. package/dist/esm/generated/resources/UploadSmartTag.d.ts +6 -6
  240. package/dist/esm/generated/resources/UploadSmartTag.js.map +1 -1
  241. package/dist/esm/generated/resources/UploadTag.d.ts +8 -8
  242. package/dist/esm/generated/resources/UploadTag.js.map +1 -1
  243. package/dist/esm/generated/resources/UploadTrack.d.ts +10 -10
  244. package/dist/esm/generated/resources/UploadTrack.js.map +1 -1
  245. package/dist/esm/generated/resources/UsageCounter.d.ts +4 -4
  246. package/dist/esm/generated/resources/UsageCounter.js.map +1 -1
  247. package/dist/esm/generated/resources/User.d.ts +12 -12
  248. package/dist/esm/generated/resources/User.js.map +1 -1
  249. package/dist/esm/generated/resources/Webhook.d.ts +12 -12
  250. package/dist/esm/generated/resources/Webhook.js.map +1 -1
  251. package/dist/esm/generated/resources/WebhookCall.d.ts +9 -9
  252. package/dist/esm/generated/resources/WebhookCall.js.map +1 -1
  253. package/dist/esm/generated/resources/WhiteLabelSettings.d.ts +6 -6
  254. package/dist/esm/generated/resources/WhiteLabelSettings.js.map +1 -1
  255. package/dist/esm/generated/resources/Workflow.d.ts +11 -11
  256. package/dist/esm/generated/resources/Workflow.js.map +1 -1
  257. package/dist/esm/index.d.ts +6 -4
  258. package/dist/esm/index.js +2 -4
  259. package/dist/esm/index.js.map +1 -1
  260. package/dist/esm/resources/Role.d.ts +4 -4
  261. package/dist/esm/resources/Role.js.map +1 -1
  262. package/dist/esm/utilities/blocks.d.ts +17 -17
  263. package/dist/esm/utilities/blocks.js +3 -3
  264. package/dist/esm/utilities/blocks.js.map +1 -1
  265. package/dist/esm/utilities/buildBlockRecord.d.ts +5 -5
  266. package/dist/esm/utilities/buildBlockRecord.js.map +1 -1
  267. package/dist/{types/utilities/fieldValueLocalization.d.ts → esm/utilities/fieldValue.d.ts} +30 -29
  268. package/dist/esm/utilities/{fieldValueLocalization.js → fieldValue.js} +39 -39
  269. package/dist/esm/utilities/fieldValue.js.map +1 -0
  270. package/dist/esm/utilities/fieldsContainingReferences.d.ts +4 -4
  271. package/dist/esm/utilities/fieldsContainingReferences.js.map +1 -1
  272. package/dist/esm/utilities/recursiveBlocks.d.ts +13 -10
  273. package/dist/esm/utilities/recursiveBlocks.js +19 -20
  274. package/dist/esm/utilities/recursiveBlocks.js.map +1 -1
  275. package/dist/esm/utilities/schemaRepository.d.ts +29 -26
  276. package/dist/esm/utilities/schemaRepository.js.map +1 -1
  277. package/dist/types/fieldTypes/boolean.d.ts +2 -0
  278. package/dist/types/fieldTypes/color.d.ts +2 -0
  279. package/dist/types/fieldTypes/date.d.ts +2 -0
  280. package/dist/types/fieldTypes/date_time.d.ts +2 -0
  281. package/dist/types/fieldTypes/file.d.ts +2 -0
  282. package/dist/types/fieldTypes/float.d.ts +2 -0
  283. package/dist/types/fieldTypes/gallery.d.ts +2 -0
  284. package/dist/types/fieldTypes/integer.d.ts +2 -0
  285. package/dist/types/fieldTypes/json.d.ts +2 -0
  286. package/dist/types/fieldTypes/lat_lon.d.ts +2 -0
  287. package/dist/types/fieldTypes/link.d.ts +2 -0
  288. package/dist/types/fieldTypes/links.d.ts +2 -0
  289. package/dist/types/fieldTypes/rich_text.d.ts +13 -9
  290. package/dist/types/fieldTypes/seo.d.ts +2 -0
  291. package/dist/types/fieldTypes/single_block.d.ts +33 -23
  292. package/dist/types/fieldTypes/slug.d.ts +2 -0
  293. package/dist/types/fieldTypes/string.d.ts +2 -0
  294. package/dist/types/fieldTypes/structured_text.d.ts +22 -83
  295. package/dist/types/fieldTypes/text.d.ts +2 -0
  296. package/dist/types/fieldTypes/video.d.ts +2 -0
  297. package/dist/types/generated/{SimpleSchemaTypes.d.ts → ApiTypes.d.ts} +2 -2
  298. package/dist/types/generated/Client.d.ts +1 -1
  299. package/dist/types/generated/{SchemaTypes.d.ts → RawApiTypes.d.ts} +2 -2
  300. package/dist/types/generated/resources/AccessToken.d.ts +14 -14
  301. package/dist/types/generated/resources/AuditLogEvent.d.ts +4 -4
  302. package/dist/types/generated/resources/BuildEvent.d.ts +8 -8
  303. package/dist/types/generated/resources/BuildTrigger.d.ts +16 -16
  304. package/dist/types/generated/resources/DailyUsage.d.ts +4 -4
  305. package/dist/types/generated/resources/EditingSession.d.ts +7 -7
  306. package/dist/types/generated/resources/EmojiSuggestions.d.ts +4 -4
  307. package/dist/types/generated/resources/Environment.d.ts +14 -14
  308. package/dist/types/generated/resources/Field.d.ts +713 -713
  309. package/dist/types/generated/resources/Fieldset.d.ts +12 -12
  310. package/dist/types/generated/resources/Item.d.ts +36 -36
  311. package/dist/types/generated/resources/ItemType.d.ts +15 -15
  312. package/dist/types/generated/resources/ItemTypeFilter.d.ts +12 -12
  313. package/dist/types/generated/resources/ItemVersion.d.ts +10 -10
  314. package/dist/types/generated/resources/JobResult.d.ts +4 -4
  315. package/dist/types/generated/resources/MaintenanceMode.d.ts +8 -8
  316. package/dist/types/generated/resources/MenuItem.d.ts +14 -14
  317. package/dist/types/generated/resources/Plugin.d.ts +14 -14
  318. package/dist/types/generated/resources/PublicInfo.d.ts +4 -4
  319. package/dist/types/generated/resources/Role.d.ts +14 -14
  320. package/dist/types/generated/resources/ScheduledPublication.d.ts +6 -6
  321. package/dist/types/generated/resources/ScheduledUnpublishing.d.ts +6 -6
  322. package/dist/types/generated/resources/SchemaMenuItem.d.ts +14 -14
  323. package/dist/types/generated/resources/SearchResult.d.ts +6 -6
  324. package/dist/types/generated/resources/Session.d.ts +4 -4
  325. package/dist/types/generated/resources/Site.d.ts +24 -24
  326. package/dist/types/generated/resources/SiteInvitation.d.ts +14 -14
  327. package/dist/types/generated/resources/SsoGroup.d.ts +10 -10
  328. package/dist/types/generated/resources/SsoSettings.d.ts +8 -8
  329. package/dist/types/generated/resources/SsoUser.d.ts +10 -10
  330. package/dist/types/generated/resources/SubscriptionFeature.d.ts +4 -4
  331. package/dist/types/generated/resources/SubscriptionLimit.d.ts +6 -6
  332. package/dist/types/generated/resources/Upload.d.ts +22 -22
  333. package/dist/types/generated/resources/UploadCollection.d.ts +14 -14
  334. package/dist/types/generated/resources/UploadFilter.d.ts +12 -12
  335. package/dist/types/generated/resources/UploadRequest.d.ts +4 -4
  336. package/dist/types/generated/resources/UploadSmartTag.d.ts +6 -6
  337. package/dist/types/generated/resources/UploadTag.d.ts +8 -8
  338. package/dist/types/generated/resources/UploadTrack.d.ts +10 -10
  339. package/dist/types/generated/resources/UsageCounter.d.ts +4 -4
  340. package/dist/types/generated/resources/User.d.ts +12 -12
  341. package/dist/types/generated/resources/Webhook.d.ts +12 -12
  342. package/dist/types/generated/resources/WebhookCall.d.ts +9 -9
  343. package/dist/types/generated/resources/WhiteLabelSettings.d.ts +6 -6
  344. package/dist/types/generated/resources/Workflow.d.ts +11 -11
  345. package/dist/types/index.d.ts +6 -4
  346. package/dist/types/resources/Role.d.ts +4 -4
  347. package/dist/types/utilities/blocks.d.ts +17 -17
  348. package/dist/types/utilities/buildBlockRecord.d.ts +5 -5
  349. package/dist/{esm/utilities/fieldValueLocalization.d.ts → types/utilities/fieldValue.d.ts} +30 -29
  350. package/dist/types/utilities/fieldsContainingReferences.d.ts +4 -4
  351. package/dist/types/utilities/recursiveBlocks.d.ts +13 -10
  352. package/dist/types/utilities/schemaRepository.d.ts +29 -26
  353. package/package.json +5 -5
  354. package/src/fieldTypes/boolean.ts +11 -0
  355. package/src/fieldTypes/color.ts +11 -0
  356. package/src/fieldTypes/date.ts +11 -0
  357. package/src/fieldTypes/date_time.ts +11 -0
  358. package/src/fieldTypes/file.ts +11 -0
  359. package/src/fieldTypes/float.ts +11 -0
  360. package/src/fieldTypes/gallery.ts +11 -0
  361. package/src/fieldTypes/integer.ts +11 -0
  362. package/src/fieldTypes/json.ts +11 -0
  363. package/src/fieldTypes/lat_lon.ts +11 -0
  364. package/src/fieldTypes/link.ts +11 -0
  365. package/src/fieldTypes/links.ts +11 -0
  366. package/src/fieldTypes/rich_text.ts +45 -15
  367. package/src/fieldTypes/seo.ts +11 -0
  368. package/src/fieldTypes/single_block.ts +76 -30
  369. package/src/fieldTypes/slug.ts +12 -1
  370. package/src/fieldTypes/string.ts +11 -0
  371. package/src/fieldTypes/structured_text.ts +63 -148
  372. package/src/fieldTypes/text.ts +11 -0
  373. package/src/fieldTypes/video.ts +11 -0
  374. package/src/generated/{SimpleSchemaTypes.ts → ApiTypes.ts} +2 -2
  375. package/src/generated/Client.ts +2 -2
  376. package/src/generated/{SchemaTypes.ts → RawApiTypes.ts} +2 -2
  377. package/src/generated/resources/AccessToken.ts +32 -34
  378. package/src/generated/resources/AuditLogEvent.ts +8 -8
  379. package/src/generated/resources/BuildEvent.ts +16 -18
  380. package/src/generated/resources/BuildTrigger.ts +30 -30
  381. package/src/generated/resources/DailyUsage.ts +5 -5
  382. package/src/generated/resources/EditingSession.ts +12 -12
  383. package/src/generated/resources/EmojiSuggestions.ts +7 -7
  384. package/src/generated/resources/Environment.ts +33 -39
  385. package/src/generated/resources/Field.ts +40 -54
  386. package/src/generated/resources/Fieldset.ts +28 -36
  387. package/src/generated/resources/Item.ts +99 -126
  388. package/src/generated/resources/ItemType.ts +37 -45
  389. package/src/generated/resources/ItemTypeFilter.ts +26 -26
  390. package/src/generated/resources/ItemVersion.ts +22 -26
  391. package/src/generated/resources/JobResult.ts +6 -8
  392. package/src/generated/resources/MaintenanceMode.ts +13 -13
  393. package/src/generated/resources/MenuItem.ts +34 -44
  394. package/src/generated/resources/Plugin.ts +30 -42
  395. package/src/generated/resources/PublicInfo.ts +5 -7
  396. package/src/generated/resources/Role.ts +29 -44
  397. package/src/generated/resources/ScheduledPublication.ts +13 -13
  398. package/src/generated/resources/ScheduledUnpublishing.ts +13 -13
  399. package/src/generated/resources/SchemaMenuItem.ts +34 -34
  400. package/src/generated/resources/SearchResult.ts +12 -12
  401. package/src/generated/resources/Session.ts +8 -10
  402. package/src/generated/resources/Site.ts +43 -47
  403. package/src/generated/resources/SiteInvitation.ts +30 -30
  404. package/src/generated/resources/SsoGroup.ts +20 -24
  405. package/src/generated/resources/SsoSettings.ts +14 -16
  406. package/src/generated/resources/SsoUser.ts +18 -22
  407. package/src/generated/resources/SubscriptionFeature.ts +5 -5
  408. package/src/generated/resources/SubscriptionLimit.ts +9 -9
  409. package/src/generated/resources/Upload.ts +57 -73
  410. package/src/generated/resources/UploadCollection.ts +34 -34
  411. package/src/generated/resources/UploadFilter.ts +26 -26
  412. package/src/generated/resources/UploadRequest.ts +8 -8
  413. package/src/generated/resources/UploadSmartTag.ts +12 -12
  414. package/src/generated/resources/UploadTag.ts +18 -20
  415. package/src/generated/resources/UploadTrack.ts +25 -29
  416. package/src/generated/resources/UsageCounter.ts +8 -8
  417. package/src/generated/resources/User.ts +28 -39
  418. package/src/generated/resources/Webhook.ts +26 -34
  419. package/src/generated/resources/WebhookCall.ts +17 -19
  420. package/src/generated/resources/WhiteLabelSettings.ts +11 -11
  421. package/src/generated/resources/Workflow.ts +23 -29
  422. package/src/index.ts +8 -4
  423. package/src/resources/Role.ts +6 -6
  424. package/src/utilities/blocks.ts +30 -30
  425. package/src/utilities/buildBlockRecord.ts +4 -4
  426. package/src/utilities/{fieldValueLocalization.ts → fieldValue.ts} +59 -74
  427. package/src/utilities/fieldsContainingReferences.ts +4 -4
  428. package/src/utilities/recursiveBlocks.ts +47 -44
  429. package/src/utilities/schemaRepository.ts +53 -56
  430. package/dist/cjs/generated/SchemaTypes.js.map +0 -1
  431. package/dist/cjs/generated/SimpleSchemaTypes.js.map +0 -1
  432. package/dist/cjs/utilities/fieldValueLocalization.js.map +0 -1
  433. package/dist/cjs/utilities/structuredText.js +0 -371
  434. package/dist/cjs/utilities/structuredText.js.map +0 -1
  435. package/dist/esm/generated/SchemaTypes.js +0 -2
  436. package/dist/esm/generated/SchemaTypes.js.map +0 -1
  437. package/dist/esm/generated/SimpleSchemaTypes.js +0 -2
  438. package/dist/esm/generated/SimpleSchemaTypes.js.map +0 -1
  439. package/dist/esm/utilities/fieldValueLocalization.js.map +0 -1
  440. package/dist/esm/utilities/structuredText.d.ts +0 -177
  441. package/dist/esm/utilities/structuredText.js +0 -354
  442. package/dist/esm/utilities/structuredText.js.map +0 -1
  443. package/dist/types/utilities/structuredText.d.ts +0 -177
  444. package/src/utilities/structuredText.ts +0 -590
@@ -1,371 +0,0 @@
1
- "use strict";
2
- /**
3
- * Tree manipulation utilities for DatoCMS structured text documents.
4
- *
5
- * Provides a set of low-level utilities for visiting, transforming, and querying
6
- * structured text trees. Works with all tree variants (regular, request, nested).
7
- */
8
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10
- return new (P || (P = Promise))(function (resolve, reject) {
11
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
12
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
13
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14
- step((generator = generator.apply(thisArg, _arguments || [])).next());
15
- });
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.everyNodeAsync = exports.everyNode = exports.someNodeAsync = exports.someNode = exports.reduceNodesAsync = exports.reduceNodes = exports.filterNodesAsync = exports.filterNodes = exports.findAllNodesAsync = exports.findAllNodes = exports.mapNodesAsync = exports.mapNodes = exports.forEachNodeAsync = exports.forEachNode = void 0;
19
- /**
20
- * Check if a value has children property that is an array
21
- */
22
- function hasChildren(node) {
23
- return (typeof node === 'object' &&
24
- node !== null &&
25
- 'children' in node &&
26
- Array.isArray(node.children));
27
- }
28
- /**
29
- * Visit every node in the Structured Text tree, calling the visitor function for each.
30
- * Uses pre-order traversal (parent is visited before its children).
31
- *
32
- * @template T - The type of the root node in the Structured Text tree
33
- * @param node - The root node to start visiting from
34
- * @param visitor - Synchronous function called for each node. Receives the node, its parent, and path through the Structured Text tree
35
- */
36
- function forEachNode(node, visitor, parent = null, path = []) {
37
- // Visit current node
38
- visitor(node, parent, path);
39
- // Recursively visit children
40
- if (hasChildren(node)) {
41
- for (let index = 0; index < node.children.length; index++) {
42
- const child = node.children[index];
43
- forEachNode(child, visitor, node, [
44
- ...path,
45
- 'children',
46
- index,
47
- ]);
48
- }
49
- }
50
- }
51
- exports.forEachNode = forEachNode;
52
- /**
53
- * Visit every node in the Structured Text tree, calling the visitor function for each.
54
- * Uses pre-order traversal (parent is visited before its children).
55
- *
56
- * @template T - The type of the root node in the Structured Text tree
57
- * @param node - The root node to start visiting from
58
- * @param visitor - Asynchronous function called for each node. Receives the node, its parent, and path through the Structured Text tree
59
- * @returns Promise that resolves when all nodes have been visited
60
- */
61
- function forEachNodeAsync(node, visitor, parent = null, path = []) {
62
- return __awaiter(this, void 0, void 0, function* () {
63
- // Visit current node
64
- yield visitor(node, parent, path);
65
- // Recursively visit children
66
- if (hasChildren(node)) {
67
- for (let index = 0; index < node.children.length; index++) {
68
- const child = node.children[index];
69
- yield forEachNodeAsync(child, visitor, node, [
70
- ...path,
71
- 'children',
72
- index,
73
- ]);
74
- }
75
- }
76
- });
77
- }
78
- exports.forEachNodeAsync = forEachNodeAsync;
79
- /**
80
- * Transform nodes in the Structured Text tree by applying a mapping function.
81
- * Creates a new tree structure with transformed nodes while preserving the Structured Text tree hierarchy.
82
- *
83
- * @template T - The type of nodes in the input Structured Text tree
84
- * @template R - The type of nodes in the output tree
85
- * @param node - The root node to start mapping from
86
- * @param mapper - Synchronous function that transforms each node. Receives the node, its parent, and path
87
- * @returns The transformed tree
88
- */
89
- function mapNodes(node, mapper, parent = null, path = []) {
90
- // Transform current node
91
- const transformedNode = mapper(node, parent, path);
92
- // If the original node has children, recursively transform them
93
- if (hasChildren(node) &&
94
- typeof transformedNode === 'object' &&
95
- transformedNode !== null) {
96
- const transformedChildren = node.children.map((child, index) => mapNodes(child, mapper, node, [
97
- ...path,
98
- 'children',
99
- index,
100
- ]));
101
- return Object.assign(Object.assign({}, transformedNode), { children: transformedChildren });
102
- }
103
- return transformedNode;
104
- }
105
- exports.mapNodes = mapNodes;
106
- /**
107
- * Transform nodes in the Structured Text tree by applying a mapping function.
108
- * Creates a new tree structure with transformed nodes while preserving the Structured Text tree hierarchy.
109
- *
110
- * @template T - The type of nodes in the input Structured Text tree
111
- * @template R - The type of nodes in the output tree
112
- * @param node - The root node to start mapping from
113
- * @param mapper - Asynchronous function that transforms each node. Receives the node, its parent, and path
114
- * @returns Promise that resolves to the transformed tree
115
- */
116
- function mapNodesAsync(node, mapper, parent = null, path = []) {
117
- return __awaiter(this, void 0, void 0, function* () {
118
- // Transform current node
119
- const transformedNode = yield mapper(node, parent, path);
120
- // If the original node has children, recursively transform them
121
- if (hasChildren(node) &&
122
- typeof transformedNode === 'object' &&
123
- transformedNode !== null) {
124
- const transformedChildren = yield Promise.all(node.children.map((child, index) => mapNodesAsync(child, mapper, node, [
125
- ...path,
126
- 'children',
127
- index,
128
- ])));
129
- return Object.assign(Object.assign({}, transformedNode), { children: transformedChildren });
130
- }
131
- return transformedNode;
132
- });
133
- }
134
- exports.mapNodesAsync = mapNodesAsync;
135
- /**
136
- * Find all nodes that match the predicate function using depth-first search.
137
- * Returns an array containing all matching nodes along with their paths through the Structured Text tree.
138
- *
139
- * @template T - The type of nodes in the Structured Text tree
140
- * @param node - The root node to start searching from
141
- * @param predicate - Synchronous function that tests each node. Should return true for desired nodes
142
- * @returns Array of objects, each containing a matching node and its path
143
- */
144
- function findAllNodes(node, predicate, parent = null, path = []) {
145
- const results = [];
146
- forEachNode(node, (currentNode, currentParent, currentPath) => {
147
- if (predicate(currentNode, currentParent, currentPath)) {
148
- results.push({ node: currentNode, path: currentPath });
149
- }
150
- }, parent, path);
151
- return results;
152
- }
153
- exports.findAllNodes = findAllNodes;
154
- /**
155
- * Find all nodes that match the predicate function using depth-first search.
156
- * Returns an array containing all matching nodes along with their paths through the Structured Text tree.
157
- *
158
- * @template T - The type of nodes in the Structured Text tree
159
- * @param node - The root node to start searching from
160
- * @param predicate - Asynchronous function that tests each node. Should return true for desired nodes
161
- * @returns Promise that resolves to an array of objects, each containing a matching node and its path
162
- */
163
- function findAllNodesAsync(node, predicate, parent = null, path = []) {
164
- return __awaiter(this, void 0, void 0, function* () {
165
- const results = [];
166
- yield forEachNodeAsync(node, (currentNode, currentParent, currentPath) => __awaiter(this, void 0, void 0, function* () {
167
- if (yield predicate(currentNode, currentParent, currentPath)) {
168
- results.push({ node: currentNode, path: currentPath });
169
- }
170
- }), parent, path);
171
- return results;
172
- });
173
- }
174
- exports.findAllNodesAsync = findAllNodesAsync;
175
- /**
176
- * Filter nodes in the Structured Text tree, removing those that don't match the predicate.
177
- * Creates a new tree structure containing only nodes that pass the predicate test.
178
- * Maintains the Structured Text tree hierarchy - if a parent node is kept, its structure is preserved.
179
- *
180
- * @template T - The type of nodes in the Structured Text tree
181
- * @param node - The root node to start filtering from
182
- * @param predicate - Synchronous function that tests each node. Nodes returning false are removed
183
- * @returns The filtered tree, or null if root node is filtered out
184
- */
185
- function filterNodes(node, predicate, parent = null, path = []) {
186
- // If current node doesn't match predicate, return null
187
- if (!predicate(node, parent, path)) {
188
- return null;
189
- }
190
- // If node has no children, return it as-is
191
- if (!hasChildren(node)) {
192
- return node;
193
- }
194
- // Filter children recursively
195
- const childrenResults = node.children.map((child, index) => filterNodes(child, predicate, node, [
196
- ...path,
197
- 'children',
198
- index,
199
- ]));
200
- const filteredChildren = childrenResults.filter((child) => child !== null);
201
- return Object.assign(Object.assign({}, node), { children: filteredChildren });
202
- }
203
- exports.filterNodes = filterNodes;
204
- /**
205
- * Filter nodes in the Structured Text tree, removing those that don't match the predicate.
206
- * Creates a new tree structure containing only nodes that pass the predicate test.
207
- * Maintains the Structured Text tree hierarchy - if a parent node is kept, its structure is preserved.
208
- *
209
- * @template T - The type of nodes in the Structured Text tree
210
- * @param node - The root node to start filtering from
211
- * @param predicate - Asynchronous function that tests each node. Nodes returning false are removed
212
- * @returns Promise that resolves to the filtered tree, or null if root node is filtered out
213
- */
214
- function filterNodesAsync(node, predicate, parent = null, path = []) {
215
- return __awaiter(this, void 0, void 0, function* () {
216
- // If current node doesn't match predicate, return null
217
- if (!(yield predicate(node, parent, path))) {
218
- return null;
219
- }
220
- // If node has no children, return it as-is
221
- if (!hasChildren(node)) {
222
- return node;
223
- }
224
- // Filter children recursively
225
- const childrenResults = yield Promise.all(node.children.map((child, index) => filterNodesAsync(child, predicate, node, [
226
- ...path,
227
- 'children',
228
- index,
229
- ])));
230
- const filteredChildren = childrenResults.filter((child) => child !== null);
231
- return Object.assign(Object.assign({}, node), { children: filteredChildren });
232
- });
233
- }
234
- exports.filterNodesAsync = filterNodesAsync;
235
- /**
236
- * Reduce the Structured Text tree to a single value by applying a reducer function to each node.
237
- * Uses pre-order traversal (parent is processed before its children).
238
- * The reducer function is called for each node with the current accumulator value.
239
- *
240
- * @template T - The type of nodes in the Structured Text tree
241
- * @template R - The type of the accumulated result
242
- * @param node - The root node to start reducing from
243
- * @param reducer - Synchronous function that processes each node and updates the accumulator
244
- * @param initialValue - The initial value for the accumulator
245
- * @returns The final accumulated value
246
- */
247
- function reduceNodes(node, reducer, initialValue, parent = null, path = []) {
248
- let accumulator = initialValue;
249
- forEachNode(node, (currentNode, currentParent, currentPath) => {
250
- accumulator = reducer(accumulator, currentNode, currentParent, currentPath);
251
- }, parent, path);
252
- return accumulator;
253
- }
254
- exports.reduceNodes = reduceNodes;
255
- /**
256
- * Reduce the Structured Text tree to a single value by applying a reducer function to each node.
257
- * Uses pre-order traversal (parent is processed before its children).
258
- * The reducer function is called for each node with the current accumulator value.
259
- *
260
- * @template T - The type of nodes in the Structured Text tree
261
- * @template R - The type of the accumulated result
262
- * @param node - The root node to start reducing from
263
- * @param reducer - Asynchronous function that processes each node and updates the accumulator
264
- * @param initialValue - The initial value for the accumulator
265
- * @returns Promise that resolves to the final accumulated value
266
- */
267
- function reduceNodesAsync(node, reducer, initialValue, parent = null, path = []) {
268
- return __awaiter(this, void 0, void 0, function* () {
269
- let accumulator = initialValue;
270
- yield forEachNodeAsync(node, (currentNode, currentParent, currentPath) => __awaiter(this, void 0, void 0, function* () {
271
- accumulator = yield reducer(accumulator, currentNode, currentParent, currentPath);
272
- }), parent, path);
273
- return accumulator;
274
- });
275
- }
276
- exports.reduceNodesAsync = reduceNodesAsync;
277
- /**
278
- * Check if any node in the Structured Text tree matches the predicate function.
279
- * Returns true as soon as the first matching node is found (short-circuit evaluation).
280
- *
281
- * @template T - The type of nodes in the Structured Text tree
282
- * @param node - The root node to start searching from
283
- * @param predicate - Synchronous function that tests each node. Should return true for matching nodes
284
- * @returns True if any node matches, false otherwise
285
- */
286
- function someNode(node, predicate, parent = null, path = []) {
287
- // Check current node
288
- if (predicate(node, parent, path)) {
289
- return true;
290
- }
291
- // Recursively check children
292
- if (hasChildren(node)) {
293
- for (let index = 0; index < node.children.length; index++) {
294
- const child = node.children[index];
295
- if (someNode(child, predicate, node, [
296
- ...path,
297
- 'children',
298
- index,
299
- ])) {
300
- return true;
301
- }
302
- }
303
- }
304
- return false;
305
- }
306
- exports.someNode = someNode;
307
- /**
308
- * Check if any node in the Structured Text tree matches the predicate function.
309
- * Returns true as soon as the first matching node is found (short-circuit evaluation).
310
- *
311
- * @template T - The type of nodes in the Structured Text tree
312
- * @param node - The root node to start searching from
313
- * @param predicate - Asynchronous function that tests each node. Should return true for matching nodes
314
- * @returns Promise that resolves to true if any node matches, false otherwise
315
- */
316
- function someNodeAsync(node, predicate, parent = null, path = []) {
317
- return __awaiter(this, void 0, void 0, function* () {
318
- // Check current node
319
- if (yield predicate(node, parent, path)) {
320
- return true;
321
- }
322
- // Recursively check children
323
- if (hasChildren(node)) {
324
- for (let index = 0; index < node.children.length; index++) {
325
- const child = node.children[index];
326
- if (yield someNodeAsync(child, predicate, node, [
327
- ...path,
328
- 'children',
329
- index,
330
- ])) {
331
- return true;
332
- }
333
- }
334
- }
335
- return false;
336
- });
337
- }
338
- exports.someNodeAsync = someNodeAsync;
339
- /**
340
- * Check if every node in the Structured Text tree matches the predicate function.
341
- * Returns false as soon as the first non-matching node is found (short-circuit evaluation).
342
- *
343
- * @template T - The type of nodes in the Structured Text tree
344
- * @param node - The root node to start testing from
345
- * @param predicate - Synchronous function that tests each node. Should return true for valid nodes
346
- * @returns True if all nodes match, false otherwise
347
- */
348
- function everyNode(node, predicate, parent = null, path = []) {
349
- return !someNode(node, (currentNode, currentParent, currentPath) => {
350
- return !predicate(currentNode, currentParent, currentPath);
351
- }, parent, path);
352
- }
353
- exports.everyNode = everyNode;
354
- /**
355
- * Check if every node in the Structured Text tree matches the predicate function.
356
- * Returns false as soon as the first non-matching node is found (short-circuit evaluation).
357
- *
358
- * @template T - The type of nodes in the Structured Text tree
359
- * @param node - The root node to start testing from
360
- * @param predicate - Asynchronous function that tests each node. Should return true for valid nodes
361
- * @returns Promise that resolves to true if all nodes match, false otherwise
362
- */
363
- function everyNodeAsync(node, predicate, parent = null, path = []) {
364
- return __awaiter(this, void 0, void 0, function* () {
365
- return !(yield someNodeAsync(node, (currentNode, currentParent, currentPath) => __awaiter(this, void 0, void 0, function* () {
366
- return !(yield predicate(currentNode, currentParent, currentPath));
367
- }), parent, path));
368
- });
369
- }
370
- exports.everyNodeAsync = everyNodeAsync;
371
- //# sourceMappingURL=structuredText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"structuredText.js","sourceRoot":"","sources":["../../../src/utilities/structuredText.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;AAqDH;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa;IAChC,OAAO,CACL,OAAO,IAAI,KAAK,QAAQ;QACxB,IAAI,KAAK,IAAI;QACb,UAAU,IAAI,IAAI;QAClB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAC7B,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,WAAW,CACzB,IAAO,EACP,OAA+B,EAC/B,SAAmC,IAAI,EACvC,OAAiB,EAAE;IAEnB,qBAAqB;IACrB,OAAO,CAAC,IAAyB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAEjD,6BAA6B;IAC7B,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE;QACrB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACzD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACnC,WAAW,CAAC,KAAU,EAAE,OAAO,EAAE,IAAyB,EAAE;gBAC1D,GAAG,IAAI;gBACP,UAAU;gBACV,KAAK;aACN,CAAC,CAAC;SACJ;KACF;AACH,CAAC;AApBD,kCAoBC;AAED;;;;;;;;GAQG;AACH,SAAsB,gBAAgB,CACpC,IAAO,EACP,OAAwC,EACxC,SAAmC,IAAI,EACvC,OAAiB,EAAE;;QAEnB,qBAAqB;QACrB,MAAM,OAAO,CAAC,IAAyB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAEvD,6BAA6B;QAC7B,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE;YACrB,KAAK,IAAI,KAAK,GAAG,CAA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MAAM,aAAa,CAAC,KAAU,EAAE,SAAS,EAAE,IAAyB,EAAE;oBACpE,GAAG,IAAI;oBACP,UAAU;oBACV,KAAK;iBACN,CAAC,EACF;oBACA,OAAO,IAAI,CAAC;iBACb;aACF;SACF;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CAAA;AA5BD,sCA4BC;AAED;;;;;;;;GAQG;AACH,SAAgB,SAAS,CACvB,IAAO,EACP,SAAoC,EACpC,SAAmC,IAAI,EACvC,OAAiB,EAAE;IAEnB,OAAO,CAAC,QAAQ,CACd,IAAI,EACJ,CACE,WAA8B,EAC9B,aAAuC,EACvC,WAAqB,EACrB,EAAE;QACF,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;IAC7D,CAAC,EACD,MAAM,EACN,IAAI,CACL,CAAC;AACJ,CAAC;AAlBD,8BAkBC;AAED;;;;;;;;GAQG;AACH,SAAsB,cAAc,CAClC,IAAO,EACP,SAA6C,EAC7C,SAAmC,IAAI,EACvC,OAAiB,EAAE;;QAEnB,OAAO,CAAC,CAAC,MAAM,aAAa,CAC1B,IAAI,EACJ,CACE,WAA8B,EAC9B,aAAuC,EACvC,WAAqB,EACrB,EAAE;YACF,OAAO,CAAC,CAAC,MAAM,SAAS,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;QACrE,CAAC,CAAA,EACD,MAAM,EACN,IAAI,CACL,CAAC,CAAC;IACL,CAAC;CAAA;AAlBD,wCAkBC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=SchemaTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SchemaTypes.js","sourceRoot":"","sources":["../../../src/generated/SchemaTypes.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=SimpleSchemaTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SimpleSchemaTypes.js","sourceRoot":"","sources":["../../../src/generated/SimpleSchemaTypes.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fieldValueLocalization.js","sourceRoot":"","sources":["../../../src/utilities/fieldValueLocalization.ts"],"names":[],"mappings":";;;;;;;;;AAgDA;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CACzB,KAAkD;IAElD,OAAO,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;AAC9E,CAAC;AAeD;;;;;;;;;GASG;AACH,MAAM,UAAU,oCAAoC,CAClD,KAAkD,EAClD,KAAc;IAEd,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;QACtB,MAAM,cAAc,GAAG,KAA4B,CAAC;QAEpD,OAAO,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,GAAG,CACvC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CACzC,CAAC;KACH;IAED,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oCAAoC,CAClD,KAAkD,EAClD,wBAAkD;;IAElD,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;QACtB,OAAO,MAAM,CAAC,WAAW,CACvB,wBAAwB,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CACrE,CAAC;KACH;IAED,OAAO,MAAA,wBAAwB,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC;AAC5C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAkD,EAClD,KAAc,EACd,KAA8D;IAE9D,MAAM,OAAO,GAAG,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AAK,CAAC,CAAC;IACnE,KAAK,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,OAAO,EAAE;QACvC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;KACxB;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAgB,8BAA8B,CAClD,KAAkD,EAClD,KAAc,EACd,OAA4E;;QAE5E,MAAM,OAAO,GAAG,oCAAoC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACnE,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;CAAA"}
@@ -1,177 +0,0 @@
1
- /**
2
- * Tree manipulation utilities for DatoCMS structured text documents.
3
- *
4
- * Provides a set of low-level utilities for visiting, transforming, and querying
5
- * structured text trees. Works with all tree variants (regular, request, nested).
6
- */
7
- /**
8
- * Recursively extract all possible node types that can appear in a tree structure
9
- */
10
- type AllNodesInTree<T, Depth extends number = 10> = Depth extends 0 ? T extends readonly unknown[] ? never : T : T extends readonly (infer U)[] ? AllNodesInTree<U, Prev<Depth>> : T extends {
11
- children: infer Children;
12
- } ? T | AllNodesInTree<Children, Prev<Depth>> : T;
13
- type Prev<T extends number> = T extends 0 ? 0 : T extends 1 ? 0 : T extends 2 ? 1 : T extends 3 ? 2 : T extends 4 ? 3 : T extends 5 ? 4 : T extends 6 ? 5 : T extends 7 ? 6 : T extends 8 ? 7 : T extends 9 ? 8 : T extends 10 ? 9 : number;
14
- /**
15
- * Path through the Structured Text tree structure
16
- */
17
- export type TreePath = readonly (string | number)[];
18
- /**
19
- * Generic predicate function type for Structured Text tree node filtering
20
- */
21
- export type NodePredicate<T, R> = (node: AllNodesInTree<T>, parent: AllNodesInTree<T> | null, path: TreePath) => R;
22
- /**
23
- * Visit every node in the Structured Text tree, calling the visitor function for each.
24
- * Uses pre-order traversal (parent is visited before its children).
25
- *
26
- * @template T - The type of the root node in the Structured Text tree
27
- * @param node - The root node to start visiting from
28
- * @param visitor - Synchronous function called for each node. Receives the node, its parent, and path through the Structured Text tree
29
- */
30
- export declare function forEachNode<T>(node: T, visitor: NodePredicate<T, void>, parent?: AllNodesInTree<T> | null, path?: TreePath): void;
31
- /**
32
- * Visit every node in the Structured Text tree, calling the visitor function for each.
33
- * Uses pre-order traversal (parent is visited before its children).
34
- *
35
- * @template T - The type of the root node in the Structured Text tree
36
- * @param node - The root node to start visiting from
37
- * @param visitor - Asynchronous function called for each node. Receives the node, its parent, and path through the Structured Text tree
38
- * @returns Promise that resolves when all nodes have been visited
39
- */
40
- export declare function forEachNodeAsync<T>(node: T, visitor: NodePredicate<T, Promise<void>>, parent?: AllNodesInTree<T> | null, path?: TreePath): Promise<void>;
41
- /**
42
- * Transform nodes in the Structured Text tree by applying a mapping function.
43
- * Creates a new tree structure with transformed nodes while preserving the Structured Text tree hierarchy.
44
- *
45
- * @template T - The type of nodes in the input Structured Text tree
46
- * @template R - The type of nodes in the output tree
47
- * @param node - The root node to start mapping from
48
- * @param mapper - Synchronous function that transforms each node. Receives the node, its parent, and path
49
- * @returns The transformed tree
50
- */
51
- export declare function mapNodes<T, R>(node: T, mapper: NodePredicate<T, R>, parent?: AllNodesInTree<T> | null, path?: TreePath): R;
52
- /**
53
- * Transform nodes in the Structured Text tree by applying a mapping function.
54
- * Creates a new tree structure with transformed nodes while preserving the Structured Text tree hierarchy.
55
- *
56
- * @template T - The type of nodes in the input Structured Text tree
57
- * @template R - The type of nodes in the output tree
58
- * @param node - The root node to start mapping from
59
- * @param mapper - Asynchronous function that transforms each node. Receives the node, its parent, and path
60
- * @returns Promise that resolves to the transformed tree
61
- */
62
- export declare function mapNodesAsync<T, R>(node: T, mapper: NodePredicate<T, Promise<R>>, parent?: AllNodesInTree<T> | null, path?: TreePath): Promise<R>;
63
- /**
64
- * Find all nodes that match the predicate function using depth-first search.
65
- * Returns an array containing all matching nodes along with their paths through the Structured Text tree.
66
- *
67
- * @template T - The type of nodes in the Structured Text tree
68
- * @param node - The root node to start searching from
69
- * @param predicate - Synchronous function that tests each node. Should return true for desired nodes
70
- * @returns Array of objects, each containing a matching node and its path
71
- */
72
- export declare function findAllNodes<T>(node: T, predicate: NodePredicate<T, boolean>, parent?: AllNodesInTree<T> | null, path?: TreePath): Array<{
73
- node: AllNodesInTree<T>;
74
- path: TreePath;
75
- }>;
76
- /**
77
- * Find all nodes that match the predicate function using depth-first search.
78
- * Returns an array containing all matching nodes along with their paths through the Structured Text tree.
79
- *
80
- * @template T - The type of nodes in the Structured Text tree
81
- * @param node - The root node to start searching from
82
- * @param predicate - Asynchronous function that tests each node. Should return true for desired nodes
83
- * @returns Promise that resolves to an array of objects, each containing a matching node and its path
84
- */
85
- export declare function findAllNodesAsync<T>(node: T, predicate: NodePredicate<T, Promise<boolean>>, parent?: AllNodesInTree<T> | null, path?: TreePath): Promise<Array<{
86
- node: AllNodesInTree<T>;
87
- path: TreePath;
88
- }>>;
89
- /**
90
- * Filter nodes in the Structured Text tree, removing those that don't match the predicate.
91
- * Creates a new tree structure containing only nodes that pass the predicate test.
92
- * Maintains the Structured Text tree hierarchy - if a parent node is kept, its structure is preserved.
93
- *
94
- * @template T - The type of nodes in the Structured Text tree
95
- * @param node - The root node to start filtering from
96
- * @param predicate - Synchronous function that tests each node. Nodes returning false are removed
97
- * @returns The filtered tree, or null if root node is filtered out
98
- */
99
- export declare function filterNodes<T>(node: T, predicate: NodePredicate<T, boolean>, parent?: AllNodesInTree<T> | null, path?: TreePath): T | null;
100
- /**
101
- * Filter nodes in the Structured Text tree, removing those that don't match the predicate.
102
- * Creates a new tree structure containing only nodes that pass the predicate test.
103
- * Maintains the Structured Text tree hierarchy - if a parent node is kept, its structure is preserved.
104
- *
105
- * @template T - The type of nodes in the Structured Text tree
106
- * @param node - The root node to start filtering from
107
- * @param predicate - Asynchronous function that tests each node. Nodes returning false are removed
108
- * @returns Promise that resolves to the filtered tree, or null if root node is filtered out
109
- */
110
- export declare function filterNodesAsync<T>(node: T, predicate: NodePredicate<T, Promise<boolean>>, parent?: AllNodesInTree<T> | null, path?: TreePath): Promise<T | null>;
111
- /**
112
- * Reduce the Structured Text tree to a single value by applying a reducer function to each node.
113
- * Uses pre-order traversal (parent is processed before its children).
114
- * The reducer function is called for each node with the current accumulator value.
115
- *
116
- * @template T - The type of nodes in the Structured Text tree
117
- * @template R - The type of the accumulated result
118
- * @param node - The root node to start reducing from
119
- * @param reducer - Synchronous function that processes each node and updates the accumulator
120
- * @param initialValue - The initial value for the accumulator
121
- * @returns The final accumulated value
122
- */
123
- export declare function reduceNodes<T, R>(node: T, reducer: (accumulator: R, node: AllNodesInTree<T>, parent: AllNodesInTree<T> | null, path: TreePath) => R, initialValue: R, parent?: AllNodesInTree<T> | null, path?: TreePath): R;
124
- /**
125
- * Reduce the Structured Text tree to a single value by applying a reducer function to each node.
126
- * Uses pre-order traversal (parent is processed before its children).
127
- * The reducer function is called for each node with the current accumulator value.
128
- *
129
- * @template T - The type of nodes in the Structured Text tree
130
- * @template R - The type of the accumulated result
131
- * @param node - The root node to start reducing from
132
- * @param reducer - Asynchronous function that processes each node and updates the accumulator
133
- * @param initialValue - The initial value for the accumulator
134
- * @returns Promise that resolves to the final accumulated value
135
- */
136
- export declare function reduceNodesAsync<T, R>(node: T, reducer: (accumulator: R, node: AllNodesInTree<T>, parent: AllNodesInTree<T> | null, path: TreePath) => Promise<R>, initialValue: R, parent?: AllNodesInTree<T> | null, path?: TreePath): Promise<R>;
137
- /**
138
- * Check if any node in the Structured Text tree matches the predicate function.
139
- * Returns true as soon as the first matching node is found (short-circuit evaluation).
140
- *
141
- * @template T - The type of nodes in the Structured Text tree
142
- * @param node - The root node to start searching from
143
- * @param predicate - Synchronous function that tests each node. Should return true for matching nodes
144
- * @returns True if any node matches, false otherwise
145
- */
146
- export declare function someNode<T>(node: T, predicate: NodePredicate<T, boolean>, parent?: AllNodesInTree<T> | null, path?: TreePath): boolean;
147
- /**
148
- * Check if any node in the Structured Text tree matches the predicate function.
149
- * Returns true as soon as the first matching node is found (short-circuit evaluation).
150
- *
151
- * @template T - The type of nodes in the Structured Text tree
152
- * @param node - The root node to start searching from
153
- * @param predicate - Asynchronous function that tests each node. Should return true for matching nodes
154
- * @returns Promise that resolves to true if any node matches, false otherwise
155
- */
156
- export declare function someNodeAsync<T>(node: T, predicate: NodePredicate<T, Promise<boolean>>, parent?: AllNodesInTree<T> | null, path?: TreePath): Promise<boolean>;
157
- /**
158
- * Check if every node in the Structured Text tree matches the predicate function.
159
- * Returns false as soon as the first non-matching node is found (short-circuit evaluation).
160
- *
161
- * @template T - The type of nodes in the Structured Text tree
162
- * @param node - The root node to start testing from
163
- * @param predicate - Synchronous function that tests each node. Should return true for valid nodes
164
- * @returns True if all nodes match, false otherwise
165
- */
166
- export declare function everyNode<T>(node: T, predicate: NodePredicate<T, boolean>, parent?: AllNodesInTree<T> | null, path?: TreePath): boolean;
167
- /**
168
- * Check if every node in the Structured Text tree matches the predicate function.
169
- * Returns false as soon as the first non-matching node is found (short-circuit evaluation).
170
- *
171
- * @template T - The type of nodes in the Structured Text tree
172
- * @param node - The root node to start testing from
173
- * @param predicate - Asynchronous function that tests each node. Should return true for valid nodes
174
- * @returns Promise that resolves to true if all nodes match, false otherwise
175
- */
176
- export declare function everyNodeAsync<T>(node: T, predicate: NodePredicate<T, Promise<boolean>>, parent?: AllNodesInTree<T> | null, path?: TreePath): Promise<boolean>;
177
- export {};