@prismicio/client 7.21.0-alpha.2 → 7.21.0-canary.31d5815

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 (775) hide show
  1. package/dist/Client.cjs +966 -0
  2. package/dist/Client.cjs.map +1 -0
  3. package/dist/Client.d.cts +749 -0
  4. package/dist/Client.d.cts.map +1 -0
  5. package/dist/Client.d.ts +749 -0
  6. package/dist/Client.d.ts.map +1 -0
  7. package/dist/Client.js +966 -0
  8. package/dist/Client.js.map +1 -0
  9. package/dist/Migration.cjs +284 -0
  10. package/dist/Migration.cjs.map +1 -0
  11. package/dist/Migration.d.cts +216 -0
  12. package/dist/Migration.d.cts.map +1 -0
  13. package/dist/Migration.d.ts +216 -0
  14. package/dist/Migration.d.ts.map +1 -0
  15. package/dist/Migration.js +284 -0
  16. package/dist/Migration.js.map +1 -0
  17. package/dist/WriteClient.cjs +491 -0
  18. package/dist/WriteClient.cjs.map +1 -0
  19. package/dist/WriteClient.d.cts +262 -0
  20. package/dist/WriteClient.d.cts.map +1 -0
  21. package/dist/WriteClient.d.ts +262 -0
  22. package/dist/WriteClient.d.ts.map +1 -0
  23. package/dist/WriteClient.js +491 -0
  24. package/dist/WriteClient.js.map +1 -0
  25. package/dist/_virtual/rolldown_runtime.cjs +14 -0
  26. package/dist/_virtual/rolldown_runtime.js +13 -0
  27. package/dist/buildQueryURL.cjs +96 -0
  28. package/dist/buildQueryURL.cjs.map +1 -0
  29. package/dist/buildQueryURL.d.cts +220 -0
  30. package/dist/buildQueryURL.d.cts.map +1 -0
  31. package/dist/buildQueryURL.d.ts +220 -0
  32. package/dist/buildQueryURL.d.ts.map +1 -0
  33. package/dist/buildQueryURL.js +96 -0
  34. package/dist/buildQueryURL.js.map +1 -0
  35. package/dist/cookie.cjs +19 -0
  36. package/dist/cookie.cjs.map +1 -0
  37. package/dist/cookie.d.cts +11 -0
  38. package/dist/cookie.d.cts.map +1 -0
  39. package/dist/cookie.d.ts +11 -0
  40. package/dist/cookie.d.ts.map +1 -0
  41. package/dist/cookie.js +13 -0
  42. package/dist/cookie.js.map +1 -0
  43. package/dist/createClient.cjs +33 -0
  44. package/dist/createClient.cjs.map +1 -0
  45. package/dist/createClient.d.cts +41 -0
  46. package/dist/createClient.d.cts.map +1 -0
  47. package/dist/createClient.d.ts +41 -0
  48. package/dist/createClient.d.ts.map +1 -0
  49. package/dist/createClient.js +33 -0
  50. package/dist/createClient.js.map +1 -0
  51. package/dist/createMigration.cjs +22 -0
  52. package/dist/createMigration.cjs.map +1 -0
  53. package/dist/createMigration.d.cts +30 -0
  54. package/dist/createMigration.d.cts.map +1 -0
  55. package/dist/createMigration.d.ts +30 -0
  56. package/dist/createMigration.d.ts.map +1 -0
  57. package/dist/createMigration.js +22 -0
  58. package/dist/createMigration.js.map +1 -0
  59. package/dist/createWriteClient.cjs +30 -0
  60. package/dist/createWriteClient.cjs.map +1 -0
  61. package/dist/createWriteClient.d.cts +38 -0
  62. package/dist/createWriteClient.d.cts.map +1 -0
  63. package/dist/createWriteClient.d.ts +38 -0
  64. package/dist/createWriteClient.d.ts.map +1 -0
  65. package/dist/createWriteClient.js +30 -0
  66. package/dist/createWriteClient.js.map +1 -0
  67. package/dist/errors/ForbiddenError.cjs +8 -0
  68. package/dist/errors/ForbiddenError.cjs.map +1 -0
  69. package/dist/errors/ForbiddenError.d.cts +14 -0
  70. package/dist/errors/ForbiddenError.d.cts.map +1 -0
  71. package/dist/errors/ForbiddenError.d.ts +14 -0
  72. package/dist/errors/ForbiddenError.d.ts.map +1 -0
  73. package/dist/errors/ForbiddenError.js +8 -0
  74. package/dist/errors/ForbiddenError.js.map +1 -0
  75. package/dist/errors/InvalidDataError.cjs +8 -0
  76. package/dist/errors/InvalidDataError.cjs.map +1 -0
  77. package/dist/errors/InvalidDataError.d.cts +7 -0
  78. package/dist/errors/InvalidDataError.d.cts.map +1 -0
  79. package/dist/errors/InvalidDataError.d.ts +7 -0
  80. package/dist/errors/InvalidDataError.d.ts.map +1 -0
  81. package/dist/errors/InvalidDataError.js +8 -0
  82. package/dist/errors/InvalidDataError.js.map +1 -0
  83. package/dist/errors/NotFoundError.cjs +8 -0
  84. package/dist/errors/NotFoundError.cjs.map +1 -0
  85. package/dist/errors/NotFoundError.d.cts +7 -0
  86. package/dist/errors/NotFoundError.d.cts.map +1 -0
  87. package/dist/errors/NotFoundError.d.ts +7 -0
  88. package/dist/errors/NotFoundError.d.ts.map +1 -0
  89. package/dist/errors/NotFoundError.js +8 -0
  90. package/dist/errors/NotFoundError.js.map +1 -0
  91. package/dist/errors/ParsingError.cjs +8 -0
  92. package/dist/errors/ParsingError.cjs.map +1 -0
  93. package/dist/errors/ParsingError.d.cts +17 -0
  94. package/dist/errors/ParsingError.d.cts.map +1 -0
  95. package/dist/errors/ParsingError.d.ts +17 -0
  96. package/dist/errors/ParsingError.d.ts.map +1 -0
  97. package/dist/errors/ParsingError.js +8 -0
  98. package/dist/errors/ParsingError.js.map +1 -0
  99. package/dist/errors/PreviewTokenExpired.cjs +8 -0
  100. package/dist/errors/PreviewTokenExpired.cjs.map +1 -0
  101. package/dist/errors/PreviewTokenExpired.d.cts +11 -0
  102. package/dist/errors/PreviewTokenExpired.d.cts.map +1 -0
  103. package/dist/errors/PreviewTokenExpired.d.ts +11 -0
  104. package/dist/errors/PreviewTokenExpired.d.ts.map +1 -0
  105. package/dist/errors/PreviewTokenExpired.js +8 -0
  106. package/dist/errors/PreviewTokenExpired.js.map +1 -0
  107. package/dist/errors/PrismicError.cjs +15 -0
  108. package/dist/errors/PrismicError.cjs.map +1 -0
  109. package/dist/errors/PrismicError.d.cts +9 -0
  110. package/dist/errors/PrismicError.d.cts.map +1 -0
  111. package/dist/errors/PrismicError.d.ts +9 -0
  112. package/dist/errors/PrismicError.d.ts.map +1 -0
  113. package/dist/errors/PrismicError.js +14 -0
  114. package/dist/errors/PrismicError.js.map +1 -0
  115. package/dist/errors/RefExpiredError.cjs +8 -0
  116. package/dist/errors/RefExpiredError.cjs.map +1 -0
  117. package/dist/errors/RefExpiredError.d.cts +11 -0
  118. package/dist/errors/RefExpiredError.d.cts.map +1 -0
  119. package/dist/errors/RefExpiredError.d.ts +11 -0
  120. package/dist/errors/RefExpiredError.d.ts.map +1 -0
  121. package/dist/errors/RefExpiredError.js +8 -0
  122. package/dist/errors/RefExpiredError.js.map +1 -0
  123. package/dist/errors/RefNotFoundError.cjs +8 -0
  124. package/dist/errors/RefNotFoundError.cjs.map +1 -0
  125. package/dist/errors/RefNotFoundError.d.cts +11 -0
  126. package/dist/errors/RefNotFoundError.d.cts.map +1 -0
  127. package/dist/errors/RefNotFoundError.d.ts +11 -0
  128. package/dist/errors/RefNotFoundError.d.ts.map +1 -0
  129. package/dist/errors/RefNotFoundError.js +8 -0
  130. package/dist/errors/RefNotFoundError.js.map +1 -0
  131. package/dist/errors/RepositoryNotFoundError.cjs +8 -0
  132. package/dist/errors/RepositoryNotFoundError.cjs.map +1 -0
  133. package/dist/errors/RepositoryNotFoundError.d.cts +7 -0
  134. package/dist/errors/RepositoryNotFoundError.d.cts.map +1 -0
  135. package/dist/errors/RepositoryNotFoundError.d.ts +7 -0
  136. package/dist/errors/RepositoryNotFoundError.d.ts.map +1 -0
  137. package/dist/errors/RepositoryNotFoundError.js +8 -0
  138. package/dist/errors/RepositoryNotFoundError.js.map +1 -0
  139. package/dist/filter.cjs +104 -0
  140. package/dist/filter.cjs.map +1 -0
  141. package/dist/filter.d.cts +213 -0
  142. package/dist/filter.d.cts.map +1 -0
  143. package/dist/filter.d.ts +213 -0
  144. package/dist/filter.d.ts.map +1 -0
  145. package/dist/filter.js +103 -0
  146. package/dist/filter.js.map +1 -0
  147. package/dist/getGraphQLEndpoint.cjs +21 -0
  148. package/dist/getGraphQLEndpoint.cjs.map +1 -0
  149. package/dist/getGraphQLEndpoint.d.cts +14 -0
  150. package/dist/getGraphQLEndpoint.d.cts.map +1 -0
  151. package/dist/getGraphQLEndpoint.d.ts +14 -0
  152. package/dist/getGraphQLEndpoint.d.ts.map +1 -0
  153. package/dist/getGraphQLEndpoint.js +21 -0
  154. package/dist/getGraphQLEndpoint.js.map +1 -0
  155. package/dist/getRepositoryEndpoint.cjs +30 -0
  156. package/dist/getRepositoryEndpoint.cjs.map +1 -0
  157. package/dist/getRepositoryEndpoint.d.cts +23 -0
  158. package/dist/getRepositoryEndpoint.d.cts.map +1 -0
  159. package/dist/getRepositoryEndpoint.d.ts +23 -0
  160. package/dist/getRepositoryEndpoint.d.ts.map +1 -0
  161. package/dist/getRepositoryEndpoint.js +30 -0
  162. package/dist/getRepositoryEndpoint.js.map +1 -0
  163. package/dist/getRepositoryName.cjs +25 -0
  164. package/dist/getRepositoryName.cjs.map +1 -0
  165. package/dist/getRepositoryName.d.cts +16 -0
  166. package/dist/getRepositoryName.d.cts.map +1 -0
  167. package/dist/getRepositoryName.d.ts +16 -0
  168. package/dist/getRepositoryName.d.ts.map +1 -0
  169. package/dist/getRepositoryName.js +25 -0
  170. package/dist/getRepositoryName.js.map +1 -0
  171. package/dist/getToolbarSrc.cjs +45 -0
  172. package/dist/getToolbarSrc.cjs.map +1 -0
  173. package/dist/getToolbarSrc.d.cts +38 -0
  174. package/dist/getToolbarSrc.d.cts.map +1 -0
  175. package/dist/getToolbarSrc.d.ts +38 -0
  176. package/dist/getToolbarSrc.d.ts.map +1 -0
  177. package/dist/getToolbarSrc.js +45 -0
  178. package/dist/getToolbarSrc.js.map +1 -0
  179. package/dist/helpers/asDate.cjs +39 -0
  180. package/dist/helpers/asDate.cjs.map +1 -0
  181. package/dist/helpers/asDate.d.cts +29 -0
  182. package/dist/helpers/asDate.d.cts.map +1 -0
  183. package/dist/helpers/asDate.d.ts +29 -0
  184. package/dist/helpers/asDate.d.ts.map +1 -0
  185. package/dist/helpers/asDate.js +38 -0
  186. package/dist/helpers/asDate.js.map +1 -0
  187. package/dist/helpers/asHTML.cjs +83 -0
  188. package/dist/helpers/asHTML.cjs.map +1 -0
  189. package/dist/helpers/asHTML.d.cts +147 -0
  190. package/dist/helpers/asHTML.d.cts.map +1 -0
  191. package/dist/helpers/asHTML.d.ts +147 -0
  192. package/dist/helpers/asHTML.d.ts.map +1 -0
  193. package/dist/helpers/asHTML.js +83 -0
  194. package/dist/helpers/asHTML.js.map +1 -0
  195. package/dist/helpers/asImagePixelDensitySrcSet.cjs +60 -0
  196. package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -0
  197. package/dist/helpers/asImagePixelDensitySrcSet.d.cts +59 -0
  198. package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -0
  199. package/dist/helpers/asImagePixelDensitySrcSet.d.ts +59 -0
  200. package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -0
  201. package/dist/helpers/asImagePixelDensitySrcSet.js +60 -0
  202. package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -0
  203. package/dist/helpers/asImageSrc.cjs +33 -0
  204. package/dist/helpers/asImageSrc.cjs.map +1 -0
  205. package/dist/helpers/asImageSrc.d.cts +34 -0
  206. package/dist/helpers/asImageSrc.d.cts.map +1 -0
  207. package/dist/helpers/asImageSrc.d.ts +34 -0
  208. package/dist/helpers/asImageSrc.d.ts.map +1 -0
  209. package/dist/helpers/asImageSrc.js +33 -0
  210. package/dist/helpers/asImageSrc.js.map +1 -0
  211. package/dist/helpers/asImageWidthSrcSet.cjs +79 -0
  212. package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -0
  213. package/dist/helpers/asImageWidthSrcSet.d.cts +67 -0
  214. package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -0
  215. package/dist/helpers/asImageWidthSrcSet.d.ts +67 -0
  216. package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -0
  217. package/dist/helpers/asImageWidthSrcSet.js +79 -0
  218. package/dist/helpers/asImageWidthSrcSet.js.map +1 -0
  219. package/dist/helpers/asLink.cjs +29 -0
  220. package/dist/helpers/asLink.cjs.map +1 -0
  221. package/dist/helpers/asLink.d.cts +83 -0
  222. package/dist/helpers/asLink.d.cts.map +1 -0
  223. package/dist/helpers/asLink.d.ts +83 -0
  224. package/dist/helpers/asLink.d.ts.map +1 -0
  225. package/dist/helpers/asLink.js +29 -0
  226. package/dist/helpers/asLink.js.map +1 -0
  227. package/dist/helpers/asLinkAttrs.cjs +47 -0
  228. package/dist/helpers/asLinkAttrs.cjs.map +1 -0
  229. package/dist/helpers/asLinkAttrs.d.cts +51 -0
  230. package/dist/helpers/asLinkAttrs.d.cts.map +1 -0
  231. package/dist/helpers/asLinkAttrs.d.ts +51 -0
  232. package/dist/helpers/asLinkAttrs.d.ts.map +1 -0
  233. package/dist/helpers/asLinkAttrs.js +47 -0
  234. package/dist/helpers/asLinkAttrs.js.map +1 -0
  235. package/dist/helpers/asText.cjs +16 -0
  236. package/dist/helpers/asText.cjs.map +1 -0
  237. package/dist/helpers/asText.d.cts +62 -0
  238. package/dist/helpers/asText.d.cts.map +1 -0
  239. package/dist/helpers/asText.d.ts +62 -0
  240. package/dist/helpers/asText.d.ts.map +1 -0
  241. package/dist/helpers/asText.js +16 -0
  242. package/dist/helpers/asText.js.map +1 -0
  243. package/dist/helpers/documentToLinkField.cjs +33 -0
  244. package/dist/helpers/documentToLinkField.cjs.map +1 -0
  245. package/dist/helpers/documentToLinkField.d.cts +21 -0
  246. package/dist/helpers/documentToLinkField.d.cts.map +1 -0
  247. package/dist/helpers/documentToLinkField.d.ts +21 -0
  248. package/dist/helpers/documentToLinkField.d.ts.map +1 -0
  249. package/dist/helpers/documentToLinkField.js +33 -0
  250. package/dist/helpers/documentToLinkField.js.map +1 -0
  251. package/dist/helpers/isFilled.cjs +250 -0
  252. package/dist/helpers/isFilled.cjs.map +1 -0
  253. package/dist/helpers/isFilled.d.cts +199 -0
  254. package/dist/helpers/isFilled.d.cts.map +1 -0
  255. package/dist/helpers/isFilled.d.ts +199 -0
  256. package/dist/helpers/isFilled.d.ts.map +1 -0
  257. package/dist/helpers/isFilled.js +243 -0
  258. package/dist/helpers/isFilled.js.map +1 -0
  259. package/dist/helpers/mapSliceZone.cjs +53 -0
  260. package/dist/helpers/mapSliceZone.cjs.map +1 -0
  261. package/dist/helpers/mapSliceZone.d.cts +139 -0
  262. package/dist/helpers/mapSliceZone.d.cts.map +1 -0
  263. package/dist/helpers/mapSliceZone.d.ts +139 -0
  264. package/dist/helpers/mapSliceZone.d.ts.map +1 -0
  265. package/dist/helpers/mapSliceZone.js +52 -0
  266. package/dist/helpers/mapSliceZone.js.map +1 -0
  267. package/dist/index.cjs +117 -3882
  268. package/dist/index.cjs.map +1 -1
  269. package/dist/index.d.cts +151 -4394
  270. package/dist/index.d.cts.map +1 -0
  271. package/dist/index.d.ts +151 -4394
  272. package/dist/index.d.ts.map +1 -0
  273. package/dist/index.js +63 -0
  274. package/dist/index.js.map +1 -0
  275. package/dist/isRepositoryEndpoint.cjs +23 -0
  276. package/dist/isRepositoryEndpoint.cjs.map +1 -0
  277. package/dist/isRepositoryEndpoint.d.cts +14 -0
  278. package/dist/isRepositoryEndpoint.d.cts.map +1 -0
  279. package/dist/isRepositoryEndpoint.d.ts +14 -0
  280. package/dist/isRepositoryEndpoint.d.ts.map +1 -0
  281. package/dist/isRepositoryEndpoint.js +22 -0
  282. package/dist/isRepositoryEndpoint.js.map +1 -0
  283. package/dist/isRepositoryName.cjs +17 -0
  284. package/dist/isRepositoryName.cjs.map +1 -0
  285. package/dist/isRepositoryName.d.cts +13 -0
  286. package/dist/isRepositoryName.d.cts.map +1 -0
  287. package/dist/isRepositoryName.d.ts +13 -0
  288. package/dist/isRepositoryName.d.ts.map +1 -0
  289. package/dist/isRepositoryName.js +16 -0
  290. package/dist/isRepositoryName.js.map +1 -0
  291. package/dist/lib/appendFilters.cjs +24 -0
  292. package/dist/lib/appendFilters.cjs.map +1 -0
  293. package/dist/lib/appendFilters.js +24 -0
  294. package/dist/lib/appendFilters.js.map +1 -0
  295. package/dist/lib/castArray.cjs +20 -0
  296. package/dist/lib/castArray.cjs.map +1 -0
  297. package/dist/lib/castArray.js +19 -0
  298. package/dist/lib/castArray.js.map +1 -0
  299. package/dist/lib/devMsg.cjs +25 -0
  300. package/dist/lib/devMsg.cjs.map +1 -0
  301. package/dist/lib/devMsg.js +25 -0
  302. package/dist/lib/devMsg.js.map +1 -0
  303. package/dist/lib/escapeHTML.cjs +40 -0
  304. package/dist/lib/escapeHTML.cjs.map +1 -0
  305. package/dist/lib/escapeHTML.js +39 -0
  306. package/dist/lib/escapeHTML.js.map +1 -0
  307. package/dist/lib/everyTagFilter.cjs +19 -0
  308. package/dist/lib/everyTagFilter.cjs.map +1 -0
  309. package/dist/lib/everyTagFilter.js +19 -0
  310. package/dist/lib/everyTagFilter.js.map +1 -0
  311. package/dist/lib/findMasterRef.cjs +19 -0
  312. package/dist/lib/findMasterRef.cjs.map +1 -0
  313. package/dist/lib/findMasterRef.js +19 -0
  314. package/dist/lib/findMasterRef.js.map +1 -0
  315. package/dist/lib/findRef.cjs +24 -0
  316. package/dist/lib/findRef.cjs.map +1 -0
  317. package/dist/lib/findRef.js +24 -0
  318. package/dist/lib/findRef.js.map +1 -0
  319. package/dist/lib/findRefByID.cjs +20 -0
  320. package/dist/lib/findRefByID.cjs.map +1 -0
  321. package/dist/lib/findRefByID.js +20 -0
  322. package/dist/lib/findRefByID.js.map +1 -0
  323. package/dist/lib/findRefByLabel.cjs +20 -0
  324. package/dist/lib/findRefByLabel.cjs.map +1 -0
  325. package/dist/lib/findRefByLabel.js +20 -0
  326. package/dist/lib/findRefByLabel.js.map +1 -0
  327. package/dist/lib/getOptionalLinkProperties.cjs +22 -0
  328. package/dist/lib/getOptionalLinkProperties.cjs.map +1 -0
  329. package/dist/lib/getOptionalLinkProperties.js +21 -0
  330. package/dist/lib/getOptionalLinkProperties.js.map +1 -0
  331. package/dist/lib/getPreviewCookie.cjs +30 -0
  332. package/dist/lib/getPreviewCookie.cjs.map +1 -0
  333. package/dist/lib/getPreviewCookie.js +30 -0
  334. package/dist/lib/getPreviewCookie.js.map +1 -0
  335. package/dist/lib/isInternalURL.cjs +18 -0
  336. package/dist/lib/isInternalURL.cjs.map +1 -0
  337. package/dist/lib/isInternalURL.js +17 -0
  338. package/dist/lib/isInternalURL.js.map +1 -0
  339. package/dist/lib/isMigrationValue.cjs +77 -0
  340. package/dist/lib/isMigrationValue.cjs.map +1 -0
  341. package/dist/lib/isMigrationValue.js +74 -0
  342. package/dist/lib/isMigrationValue.js.map +1 -0
  343. package/dist/lib/isValue.cjs +110 -0
  344. package/dist/lib/isValue.cjs.map +1 -0
  345. package/dist/lib/isValue.js +106 -0
  346. package/dist/lib/isValue.js.map +1 -0
  347. package/dist/lib/minifyGraphQLQuery.cjs +16 -0
  348. package/dist/lib/minifyGraphQLQuery.cjs.map +1 -0
  349. package/dist/lib/minifyGraphQLQuery.js +15 -0
  350. package/dist/lib/minifyGraphQLQuery.js.map +1 -0
  351. package/dist/lib/pLimit.cjs +55 -0
  352. package/dist/lib/pLimit.cjs.map +1 -0
  353. package/dist/lib/pLimit.js +54 -0
  354. package/dist/lib/pLimit.js.map +1 -0
  355. package/dist/lib/request.cjs +60 -0
  356. package/dist/lib/request.cjs.map +1 -0
  357. package/dist/lib/request.d.cts +61 -0
  358. package/dist/lib/request.d.cts.map +1 -0
  359. package/dist/lib/request.d.ts +61 -0
  360. package/dist/lib/request.d.ts.map +1 -0
  361. package/dist/lib/request.js +60 -0
  362. package/dist/lib/request.js.map +1 -0
  363. package/dist/lib/resolveMigrationDocumentData.cjs +156 -0
  364. package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -0
  365. package/dist/lib/resolveMigrationDocumentData.js +155 -0
  366. package/dist/lib/resolveMigrationDocumentData.js.map +1 -0
  367. package/dist/lib/serializerHelpers.cjs +95 -0
  368. package/dist/lib/serializerHelpers.cjs.map +1 -0
  369. package/dist/lib/serializerHelpers.js +90 -0
  370. package/dist/lib/serializerHelpers.js.map +1 -0
  371. package/dist/lib/someTagsFilter.cjs +19 -0
  372. package/dist/lib/someTagsFilter.cjs.map +1 -0
  373. package/dist/lib/someTagsFilter.js +19 -0
  374. package/dist/lib/someTagsFilter.js.map +1 -0
  375. package/dist/lib/throttledLog.cjs +28 -0
  376. package/dist/lib/throttledLog.cjs.map +1 -0
  377. package/dist/lib/throttledLog.js +27 -0
  378. package/dist/lib/throttledLog.js.map +1 -0
  379. package/dist/lib/typeFilter.cjs +17 -0
  380. package/dist/lib/typeFilter.cjs.map +1 -0
  381. package/dist/lib/typeFilter.js +17 -0
  382. package/dist/lib/typeFilter.js.map +1 -0
  383. package/dist/lib/validateAssetMetadata.cjs +48 -0
  384. package/dist/lib/validateAssetMetadata.cjs.map +1 -0
  385. package/dist/lib/validateAssetMetadata.js +48 -0
  386. package/dist/lib/validateAssetMetadata.js.map +1 -0
  387. package/dist/package.cjs +19 -0
  388. package/dist/package.cjs.map +1 -0
  389. package/dist/package.js +7 -0
  390. package/dist/package.js.map +1 -0
  391. package/dist/richtext/asText.cjs +21 -0
  392. package/dist/richtext/asText.cjs.map +1 -0
  393. package/dist/richtext/asText.d.cts +18 -0
  394. package/dist/richtext/asText.d.cts.map +1 -0
  395. package/dist/richtext/asText.d.ts +18 -0
  396. package/dist/richtext/asText.d.ts.map +1 -0
  397. package/dist/richtext/asText.js +20 -0
  398. package/dist/richtext/asText.js.map +1 -0
  399. package/dist/richtext/asTree.cjs +122 -0
  400. package/dist/richtext/asTree.cjs.map +1 -0
  401. package/dist/richtext/asTree.d.cts +20 -0
  402. package/dist/richtext/asTree.d.cts.map +1 -0
  403. package/dist/richtext/asTree.d.ts +20 -0
  404. package/dist/richtext/asTree.d.ts.map +1 -0
  405. package/dist/richtext/asTree.js +122 -0
  406. package/dist/richtext/asTree.js.map +1 -0
  407. package/dist/richtext/composeSerializers.cjs +31 -0
  408. package/dist/richtext/composeSerializers.cjs.map +1 -0
  409. package/dist/richtext/composeSerializers.d.cts +22 -0
  410. package/dist/richtext/composeSerializers.d.cts.map +1 -0
  411. package/dist/richtext/composeSerializers.d.ts +22 -0
  412. package/dist/richtext/composeSerializers.d.ts.map +1 -0
  413. package/dist/richtext/composeSerializers.js +30 -0
  414. package/dist/richtext/composeSerializers.js.map +1 -0
  415. package/dist/richtext/serialize.cjs +35 -0
  416. package/dist/richtext/serialize.cjs.map +1 -0
  417. package/dist/richtext/serialize.d.cts +25 -0
  418. package/dist/richtext/serialize.d.cts.map +1 -0
  419. package/dist/richtext/serialize.d.ts +25 -0
  420. package/dist/richtext/serialize.d.ts.map +1 -0
  421. package/dist/richtext/serialize.js +35 -0
  422. package/dist/richtext/serialize.js.map +1 -0
  423. package/dist/richtext/types.cjs +13 -0
  424. package/dist/richtext/types.cjs.map +1 -0
  425. package/dist/richtext/types.d.cts +71 -0
  426. package/dist/richtext/types.d.cts.map +1 -0
  427. package/dist/richtext/types.d.ts +71 -0
  428. package/dist/richtext/types.d.ts.map +1 -0
  429. package/dist/richtext/types.js +13 -0
  430. package/dist/richtext/types.js.map +1 -0
  431. package/dist/richtext/wrapMapSerializer.cjs +32 -0
  432. package/dist/richtext/wrapMapSerializer.cjs.map +1 -0
  433. package/dist/richtext/wrapMapSerializer.d.cts +21 -0
  434. package/dist/richtext/wrapMapSerializer.d.cts.map +1 -0
  435. package/dist/richtext/wrapMapSerializer.d.ts +21 -0
  436. package/dist/richtext/wrapMapSerializer.d.ts.map +1 -0
  437. package/dist/richtext/wrapMapSerializer.js +32 -0
  438. package/dist/richtext/wrapMapSerializer.js.map +1 -0
  439. package/dist/richtext.cjs +13 -0
  440. package/dist/richtext.d.cts +8 -0
  441. package/dist/richtext.d.ts +8 -0
  442. package/dist/richtext.js +8 -0
  443. package/dist/types/api/asset/asset.d.cts +97 -0
  444. package/dist/types/api/asset/asset.d.cts.map +1 -0
  445. package/dist/types/api/asset/asset.d.ts +97 -0
  446. package/dist/types/api/asset/asset.d.ts.map +1 -0
  447. package/dist/types/api/asset/tag.d.cts +35 -0
  448. package/dist/types/api/asset/tag.d.cts.map +1 -0
  449. package/dist/types/api/asset/tag.d.ts +35 -0
  450. package/dist/types/api/asset/tag.d.ts.map +1 -0
  451. package/dist/types/api/integration.d.cts +34 -0
  452. package/dist/types/api/integration.d.cts.map +1 -0
  453. package/dist/types/api/integration.d.ts +34 -0
  454. package/dist/types/api/integration.d.ts.map +1 -0
  455. package/dist/types/api/query.d.cts +49 -0
  456. package/dist/types/api/query.d.cts.map +1 -0
  457. package/dist/types/api/query.d.ts +49 -0
  458. package/dist/types/api/query.d.ts.map +1 -0
  459. package/dist/types/api/ref.d.cts +36 -0
  460. package/dist/types/api/ref.d.cts.map +1 -0
  461. package/dist/types/api/ref.d.ts +36 -0
  462. package/dist/types/api/ref.d.ts.map +1 -0
  463. package/dist/types/api/release.d.cts +17 -0
  464. package/dist/types/api/release.d.cts.map +1 -0
  465. package/dist/types/api/release.d.ts +17 -0
  466. package/dist/types/api/release.d.ts.map +1 -0
  467. package/dist/types/api/repository.d.cts +115 -0
  468. package/dist/types/api/repository.d.cts.map +1 -0
  469. package/dist/types/api/repository.d.ts +115 -0
  470. package/dist/types/api/repository.d.ts.map +1 -0
  471. package/dist/types/api/tags.d.cts +13 -0
  472. package/dist/types/api/tags.d.cts.map +1 -0
  473. package/dist/types/api/tags.d.ts +13 -0
  474. package/dist/types/api/tags.d.ts.map +1 -0
  475. package/dist/types/migration/Asset.cjs +35 -0
  476. package/dist/types/migration/Asset.cjs.map +1 -0
  477. package/dist/types/migration/Asset.d.cts +109 -0
  478. package/dist/types/migration/Asset.d.cts.map +1 -0
  479. package/dist/types/migration/Asset.d.ts +109 -0
  480. package/dist/types/migration/Asset.d.ts.map +1 -0
  481. package/dist/types/migration/Asset.js +34 -0
  482. package/dist/types/migration/Asset.js.map +1 -0
  483. package/dist/types/migration/ContentRelationship.d.cts +15 -0
  484. package/dist/types/migration/ContentRelationship.d.cts.map +1 -0
  485. package/dist/types/migration/ContentRelationship.d.ts +15 -0
  486. package/dist/types/migration/ContentRelationship.d.ts.map +1 -0
  487. package/dist/types/migration/Document.cjs +51 -0
  488. package/dist/types/migration/Document.cjs.map +1 -0
  489. package/dist/types/migration/Document.d.cts +97 -0
  490. package/dist/types/migration/Document.d.cts.map +1 -0
  491. package/dist/types/migration/Document.d.ts +97 -0
  492. package/dist/types/migration/Document.d.ts.map +1 -0
  493. package/dist/types/migration/Document.js +50 -0
  494. package/dist/types/migration/Document.js.map +1 -0
  495. package/dist/types/model/boolean.d.cts +21 -0
  496. package/dist/types/model/boolean.d.cts.map +1 -0
  497. package/dist/types/model/boolean.d.ts +21 -0
  498. package/dist/types/model/boolean.d.ts.map +1 -0
  499. package/dist/types/model/color.d.cts +19 -0
  500. package/dist/types/model/color.d.cts.map +1 -0
  501. package/dist/types/model/color.d.ts +19 -0
  502. package/dist/types/model/color.d.ts.map +1 -0
  503. package/dist/types/model/contentRelationship.d.cts +59 -0
  504. package/dist/types/model/contentRelationship.d.cts.map +1 -0
  505. package/dist/types/model/contentRelationship.d.ts +59 -0
  506. package/dist/types/model/contentRelationship.d.ts.map +1 -0
  507. package/dist/types/model/customType.d.cts +54 -0
  508. package/dist/types/model/customType.d.cts.map +1 -0
  509. package/dist/types/model/customType.d.ts +54 -0
  510. package/dist/types/model/customType.d.ts.map +1 -0
  511. package/dist/types/model/date.d.cts +20 -0
  512. package/dist/types/model/date.d.cts.map +1 -0
  513. package/dist/types/model/date.d.ts +20 -0
  514. package/dist/types/model/date.d.ts.map +1 -0
  515. package/dist/types/model/embed.d.cts +19 -0
  516. package/dist/types/model/embed.d.cts.map +1 -0
  517. package/dist/types/model/embed.d.ts +19 -0
  518. package/dist/types/model/embed.d.ts.map +1 -0
  519. package/dist/types/model/geoPoint.d.cts +18 -0
  520. package/dist/types/model/geoPoint.d.cts.map +1 -0
  521. package/dist/types/model/geoPoint.d.ts +18 -0
  522. package/dist/types/model/geoPoint.d.ts.map +1 -0
  523. package/dist/types/model/group.d.cts +29 -0
  524. package/dist/types/model/group.d.cts.map +1 -0
  525. package/dist/types/model/group.d.ts +29 -0
  526. package/dist/types/model/group.d.ts.map +1 -0
  527. package/dist/types/model/image.d.cts +37 -0
  528. package/dist/types/model/image.d.cts.map +1 -0
  529. package/dist/types/model/image.d.ts +37 -0
  530. package/dist/types/model/image.d.ts.map +1 -0
  531. package/dist/types/model/integration.d.cts +20 -0
  532. package/dist/types/model/integration.d.cts.map +1 -0
  533. package/dist/types/model/integration.d.ts +20 -0
  534. package/dist/types/model/integration.d.ts.map +1 -0
  535. package/dist/types/model/keyText.d.cts +19 -0
  536. package/dist/types/model/keyText.d.cts.map +1 -0
  537. package/dist/types/model/keyText.d.ts +19 -0
  538. package/dist/types/model/keyText.d.ts.map +1 -0
  539. package/dist/types/model/link.cjs +16 -0
  540. package/dist/types/model/link.cjs.map +1 -0
  541. package/dist/types/model/link.d.cts +34 -0
  542. package/dist/types/model/link.d.cts.map +1 -0
  543. package/dist/types/model/link.d.ts +34 -0
  544. package/dist/types/model/link.d.ts.map +1 -0
  545. package/dist/types/model/link.js +15 -0
  546. package/dist/types/model/link.js.map +1 -0
  547. package/dist/types/model/linkToMedia.d.cts +23 -0
  548. package/dist/types/model/linkToMedia.d.cts.map +1 -0
  549. package/dist/types/model/linkToMedia.d.ts +23 -0
  550. package/dist/types/model/linkToMedia.d.ts.map +1 -0
  551. package/dist/types/model/number.d.cts +21 -0
  552. package/dist/types/model/number.d.cts.map +1 -0
  553. package/dist/types/model/number.d.ts +21 -0
  554. package/dist/types/model/number.d.ts.map +1 -0
  555. package/dist/types/model/range.d.cts +20 -0
  556. package/dist/types/model/range.d.cts.map +1 -0
  557. package/dist/types/model/range.d.ts +20 -0
  558. package/dist/types/model/range.d.ts.map +1 -0
  559. package/dist/types/model/richText.d.cts +43 -0
  560. package/dist/types/model/richText.d.cts.map +1 -0
  561. package/dist/types/model/richText.d.ts +43 -0
  562. package/dist/types/model/richText.d.ts.map +1 -0
  563. package/dist/types/model/select.d.cts +24 -0
  564. package/dist/types/model/select.d.cts.map +1 -0
  565. package/dist/types/model/select.d.ts +24 -0
  566. package/dist/types/model/select.d.ts.map +1 -0
  567. package/dist/types/model/separator.d.cts +16 -0
  568. package/dist/types/model/separator.d.cts.map +1 -0
  569. package/dist/types/model/separator.d.ts +16 -0
  570. package/dist/types/model/separator.d.ts.map +1 -0
  571. package/dist/types/model/sharedSlice.d.cts +22 -0
  572. package/dist/types/model/sharedSlice.d.cts.map +1 -0
  573. package/dist/types/model/sharedSlice.d.ts +22 -0
  574. package/dist/types/model/sharedSlice.d.ts.map +1 -0
  575. package/dist/types/model/sharedSliceVariation.d.cts +25 -0
  576. package/dist/types/model/sharedSliceVariation.d.cts.map +1 -0
  577. package/dist/types/model/sharedSliceVariation.d.ts +25 -0
  578. package/dist/types/model/sharedSliceVariation.d.ts.map +1 -0
  579. package/dist/types/model/slice.cjs +15 -0
  580. package/dist/types/model/slice.cjs.map +1 -0
  581. package/dist/types/model/slice.d.cts +39 -0
  582. package/dist/types/model/slice.d.cts.map +1 -0
  583. package/dist/types/model/slice.d.ts +39 -0
  584. package/dist/types/model/slice.d.ts.map +1 -0
  585. package/dist/types/model/slice.js +14 -0
  586. package/dist/types/model/slice.js.map +1 -0
  587. package/dist/types/model/sliceZone.cjs +15 -0
  588. package/dist/types/model/sliceZone.cjs.map +1 -0
  589. package/dist/types/model/sliceZone.d.cts +47 -0
  590. package/dist/types/model/sliceZone.d.cts.map +1 -0
  591. package/dist/types/model/sliceZone.d.ts +47 -0
  592. package/dist/types/model/sliceZone.d.ts.map +1 -0
  593. package/dist/types/model/sliceZone.js +14 -0
  594. package/dist/types/model/sliceZone.js.map +1 -0
  595. package/dist/types/model/table.d.cts +18 -0
  596. package/dist/types/model/table.d.cts.map +1 -0
  597. package/dist/types/model/table.d.ts +18 -0
  598. package/dist/types/model/table.d.ts.map +1 -0
  599. package/dist/types/model/timestamp.d.cts +20 -0
  600. package/dist/types/model/timestamp.d.cts.map +1 -0
  601. package/dist/types/model/timestamp.d.ts +20 -0
  602. package/dist/types/model/timestamp.d.ts.map +1 -0
  603. package/dist/types/model/title.d.cts +13 -0
  604. package/dist/types/model/title.d.cts.map +1 -0
  605. package/dist/types/model/title.d.ts +13 -0
  606. package/dist/types/model/title.d.ts.map +1 -0
  607. package/dist/types/model/types.cjs +32 -0
  608. package/dist/types/model/types.cjs.map +1 -0
  609. package/dist/types/model/types.d.cts +82 -0
  610. package/dist/types/model/types.d.cts.map +1 -0
  611. package/dist/types/model/types.d.ts +82 -0
  612. package/dist/types/model/types.d.ts.map +1 -0
  613. package/dist/types/model/types.js +31 -0
  614. package/dist/types/model/types.js.map +1 -0
  615. package/dist/types/model/uid.d.cts +19 -0
  616. package/dist/types/model/uid.d.cts.map +1 -0
  617. package/dist/types/model/uid.d.ts +19 -0
  618. package/dist/types/model/uid.d.ts.map +1 -0
  619. package/dist/types/value/boolean.d.cts +10 -0
  620. package/dist/types/value/boolean.d.cts.map +1 -0
  621. package/dist/types/value/boolean.d.ts +10 -0
  622. package/dist/types/value/boolean.d.ts.map +1 -0
  623. package/dist/types/value/color.d.cts +15 -0
  624. package/dist/types/value/color.d.cts.map +1 -0
  625. package/dist/types/value/color.d.ts +15 -0
  626. package/dist/types/value/color.d.ts.map +1 -0
  627. package/dist/types/value/contentRelationship.d.cts +37 -0
  628. package/dist/types/value/contentRelationship.d.cts.map +1 -0
  629. package/dist/types/value/contentRelationship.d.ts +37 -0
  630. package/dist/types/value/contentRelationship.d.ts.map +1 -0
  631. package/dist/types/value/date.d.cts +15 -0
  632. package/dist/types/value/date.d.cts.map +1 -0
  633. package/dist/types/value/date.d.ts +15 -0
  634. package/dist/types/value/date.d.ts.map +1 -0
  635. package/dist/types/value/document.d.cts +120 -0
  636. package/dist/types/value/document.d.cts.map +1 -0
  637. package/dist/types/value/document.d.ts +120 -0
  638. package/dist/types/value/document.d.ts.map +1 -0
  639. package/dist/types/value/embed.cjs +17 -0
  640. package/dist/types/value/embed.cjs.map +1 -0
  641. package/dist/types/value/embed.d.cts +173 -0
  642. package/dist/types/value/embed.d.cts.map +1 -0
  643. package/dist/types/value/embed.d.ts +173 -0
  644. package/dist/types/value/embed.d.ts.map +1 -0
  645. package/dist/types/value/embed.js +16 -0
  646. package/dist/types/value/embed.js.map +1 -0
  647. package/dist/types/value/geoPoint.d.cts +18 -0
  648. package/dist/types/value/geoPoint.d.cts.map +1 -0
  649. package/dist/types/value/geoPoint.d.ts +18 -0
  650. package/dist/types/value/geoPoint.d.ts.map +1 -0
  651. package/dist/types/value/group.d.cts +19 -0
  652. package/dist/types/value/group.d.cts.map +1 -0
  653. package/dist/types/value/group.d.ts +19 -0
  654. package/dist/types/value/group.d.ts.map +1 -0
  655. package/dist/types/value/image.d.cts +53 -0
  656. package/dist/types/value/image.d.cts.map +1 -0
  657. package/dist/types/value/image.d.ts +53 -0
  658. package/dist/types/value/image.d.ts.map +1 -0
  659. package/dist/types/value/integration.d.cts +22 -0
  660. package/dist/types/value/integration.d.cts.map +1 -0
  661. package/dist/types/value/integration.d.ts +22 -0
  662. package/dist/types/value/integration.d.ts.map +1 -0
  663. package/dist/types/value/keyText.d.cts +15 -0
  664. package/dist/types/value/keyText.d.cts.map +1 -0
  665. package/dist/types/value/keyText.d.ts +15 -0
  666. package/dist/types/value/keyText.d.ts.map +1 -0
  667. package/dist/types/value/link.cjs +15 -0
  668. package/dist/types/value/link.cjs.map +1 -0
  669. package/dist/types/value/link.d.cts +74 -0
  670. package/dist/types/value/link.d.cts.map +1 -0
  671. package/dist/types/value/link.d.ts +74 -0
  672. package/dist/types/value/link.d.ts.map +1 -0
  673. package/dist/types/value/link.js +14 -0
  674. package/dist/types/value/link.js.map +1 -0
  675. package/dist/types/value/linkToMedia.d.cts +33 -0
  676. package/dist/types/value/linkToMedia.d.cts.map +1 -0
  677. package/dist/types/value/linkToMedia.d.ts +33 -0
  678. package/dist/types/value/linkToMedia.d.ts.map +1 -0
  679. package/dist/types/value/number.d.cts +15 -0
  680. package/dist/types/value/number.d.cts.map +1 -0
  681. package/dist/types/value/number.d.ts +15 -0
  682. package/dist/types/value/number.d.ts.map +1 -0
  683. package/dist/types/value/richText.cjs +32 -0
  684. package/dist/types/value/richText.cjs.map +1 -0
  685. package/dist/types/value/richText.d.cts +221 -0
  686. package/dist/types/value/richText.d.cts.map +1 -0
  687. package/dist/types/value/richText.d.ts +221 -0
  688. package/dist/types/value/richText.d.ts.map +1 -0
  689. package/dist/types/value/richText.js +31 -0
  690. package/dist/types/value/richText.js.map +1 -0
  691. package/dist/types/value/select.d.cts +16 -0
  692. package/dist/types/value/select.d.cts.map +1 -0
  693. package/dist/types/value/select.d.ts +16 -0
  694. package/dist/types/value/select.d.ts.map +1 -0
  695. package/dist/types/value/sharedSlice.d.cts +17 -0
  696. package/dist/types/value/sharedSlice.d.cts.map +1 -0
  697. package/dist/types/value/sharedSlice.d.ts +17 -0
  698. package/dist/types/value/sharedSlice.d.ts.map +1 -0
  699. package/dist/types/value/sharedSliceVariation.d.cts +16 -0
  700. package/dist/types/value/sharedSliceVariation.d.cts.map +1 -0
  701. package/dist/types/value/sharedSliceVariation.d.ts +16 -0
  702. package/dist/types/value/sharedSliceVariation.d.ts.map +1 -0
  703. package/dist/types/value/slice.d.cts +19 -0
  704. package/dist/types/value/slice.d.cts.map +1 -0
  705. package/dist/types/value/slice.d.ts +19 -0
  706. package/dist/types/value/slice.d.ts.map +1 -0
  707. package/dist/types/value/sliceZone.d.cts +18 -0
  708. package/dist/types/value/sliceZone.d.cts.map +1 -0
  709. package/dist/types/value/sliceZone.d.ts +18 -0
  710. package/dist/types/value/sliceZone.d.ts.map +1 -0
  711. package/dist/types/value/table.d.cts +97 -0
  712. package/dist/types/value/table.d.cts.map +1 -0
  713. package/dist/types/value/table.d.ts +97 -0
  714. package/dist/types/value/table.d.ts.map +1 -0
  715. package/dist/types/value/timestamp.d.cts +13 -0
  716. package/dist/types/value/timestamp.d.cts.map +1 -0
  717. package/dist/types/value/timestamp.d.ts +13 -0
  718. package/dist/types/value/timestamp.d.ts.map +1 -0
  719. package/dist/types/value/title.d.cts +16 -0
  720. package/dist/types/value/title.d.cts.map +1 -0
  721. package/dist/types/value/title.d.ts +16 -0
  722. package/dist/types/value/title.d.ts.map +1 -0
  723. package/dist/types/value/types.d.cts +61 -0
  724. package/dist/types/value/types.d.cts.map +1 -0
  725. package/dist/types/value/types.d.ts +61 -0
  726. package/dist/types/value/types.d.ts.map +1 -0
  727. package/dist/types/webhook/apiUpdate.d.cts +57 -0
  728. package/dist/types/webhook/apiUpdate.d.cts.map +1 -0
  729. package/dist/types/webhook/apiUpdate.d.ts +57 -0
  730. package/dist/types/webhook/apiUpdate.d.ts.map +1 -0
  731. package/dist/types/webhook/testTrigger.d.cts +15 -0
  732. package/dist/types/webhook/testTrigger.d.cts.map +1 -0
  733. package/dist/types/webhook/testTrigger.d.ts +15 -0
  734. package/dist/types/webhook/testTrigger.d.ts.map +1 -0
  735. package/dist/types/webhook/types.cjs +15 -0
  736. package/dist/types/webhook/types.cjs.map +1 -0
  737. package/dist/types/webhook/types.d.cts +23 -0
  738. package/dist/types/webhook/types.d.cts.map +1 -0
  739. package/dist/types/webhook/types.d.ts +23 -0
  740. package/dist/types/webhook/types.d.ts.map +1 -0
  741. package/dist/types/webhook/types.js +14 -0
  742. package/dist/types/webhook/types.js.map +1 -0
  743. package/package.json +29 -35
  744. package/src/Client.ts +378 -657
  745. package/src/WriteClient.ts +38 -42
  746. package/src/buildQueryURL.ts +4 -1
  747. package/src/createClient.ts +1 -1
  748. package/src/helpers/asHTML.ts +4 -4
  749. package/src/helpers/asImageWidthSrcSet.ts +1 -5
  750. package/src/helpers/asLink.ts +0 -3
  751. package/src/helpers/asLinkAttrs.ts +0 -4
  752. package/src/helpers/mapSliceZone.ts +5 -5
  753. package/src/index.ts +1 -0
  754. package/src/lib/isValue.ts +0 -6
  755. package/src/lib/pLimit.ts +1 -1
  756. package/src/lib/request.ts +3 -3
  757. package/src/lib/throttledLog.ts +0 -1
  758. package/src/types/migration/Document.ts +1 -1
  759. package/src/types/model/contentRelationship.ts +1 -0
  760. package/src/types/value/date.ts +1 -1
  761. package/src/types/value/document.ts +3 -3
  762. package/src/types/value/timestamp.ts +1 -5
  763. package/dist/index.d.mts +0 -4424
  764. package/dist/index.mjs +0 -3837
  765. package/dist/index.mjs.map +0 -1
  766. package/dist/richtext/index.cjs +0 -244
  767. package/dist/richtext/index.cjs.map +0 -1
  768. package/dist/richtext/index.d.cts +0 -78
  769. package/dist/richtext/index.d.mts +0 -78
  770. package/dist/richtext/index.d.ts +0 -78
  771. package/dist/richtext/index.mjs +0 -237
  772. package/dist/richtext/index.mjs.map +0 -1
  773. package/dist/shared/client.TSGr56lO.d.cts +0 -899
  774. package/dist/shared/client.TSGr56lO.d.mts +0 -899
  775. package/dist/shared/client.TSGr56lO.d.ts +0 -899
@@ -0,0 +1,749 @@
1
+ import { PrismicDocument } from "./types/value/document.js";
2
+ import { LinkResolverFunction } from "./helpers/asLink.js";
3
+ import { AbortSignalLike, FetchLike, RequestInitLike } from "./lib/request.js";
4
+ import { Query } from "./types/api/query.js";
5
+ import { Ref } from "./types/api/ref.js";
6
+ import { Repository } from "./types/api/repository.js";
7
+ import { BuildQueryURLArgs } from "./buildQueryURL.js";
8
+
9
+ //#region src/Client.d.ts
10
+
11
+ /**
12
+ * Extracts one or more Prismic document types that match a given Prismic
13
+ * document type. If no matches are found, no extraction is performed and the
14
+ * union of all provided Prismic document types are returned.
15
+ *
16
+ * @typeParam TDocuments - Prismic document types from which to extract.
17
+ * @typeParam TDocumentType - Type(s) to match `TDocuments` against.
18
+ */
19
+ type ExtractDocumentType<TDocuments extends PrismicDocument, TDocumentType extends TDocuments["type"]> = Extract<TDocuments, {
20
+ type: TDocumentType;
21
+ }> extends never ? TDocuments : Extract<TDocuments, {
22
+ type: TDocumentType;
23
+ }>;
24
+ /**
25
+ * The minimum required properties to treat as an HTTP Request for automatic
26
+ * Prismic preview support.
27
+ */
28
+ type HttpRequestLike =
29
+ /**
30
+ * Web API Request
31
+ *
32
+ * @see http://developer.mozilla.org/en-US/docs/Web/API/Request
33
+ */
34
+ {
35
+ headers?: {
36
+ get(name: string): string | null;
37
+ };
38
+ url?: string;
39
+ }
40
+ /**
41
+ * Express-style Request
42
+ */ | {
43
+ headers?: {
44
+ cookie?: string;
45
+ };
46
+ query?: Record<string, unknown>;
47
+ };
48
+ /**
49
+ * A function that returns a ref string. Used to configure which ref the client
50
+ * queries content from.
51
+ */
52
+ type GetRef = (params?: Pick<BuildQueryURLArgs, "accessToken"> & FetchParams) => string | undefined | Promise<string | undefined>;
53
+ /**
54
+ * Parameters for any client method that use `fetch()`.
55
+ */
56
+ type FetchParams = {
57
+ /**
58
+ * Options provided to the client's `fetch()` on all network requests. These
59
+ * options will be merged with internally required options. They can also be
60
+ * overriden on a per-query basis using the query's `fetchOptions` parameter.
61
+ */
62
+ fetchOptions?: RequestInitLike;
63
+ /**
64
+ * An `AbortSignal` provided by an `AbortController`. This allows the network
65
+ * request to be cancelled if necessary.
66
+ *
67
+ * @deprecated Move the `signal` parameter into `fetchOptions.signal`:
68
+ *
69
+ * @see \<https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\>
70
+ */
71
+ signal?: AbortSignalLike;
72
+ };
73
+ /**
74
+ * Configuration for clients that determine how content is queried.
75
+ */
76
+ type ClientConfig = {
77
+ /**
78
+ * The full Rest API V2 endpoint for the repository. This is only helpful if
79
+ * you're using Prismic behind a proxy which we do not recommend.
80
+ *
81
+ * @defaultValue `getRepositoryEndpoint(repositoryNameOrEndpoint)`
82
+ */
83
+ documentAPIEndpoint?: string;
84
+ /**
85
+ * The secure token for accessing the Prismic repository. This is only
86
+ * required if the repository is set to private.
87
+ */
88
+ accessToken?: string;
89
+ /**
90
+ * A string representing a version of the Prismic repository's content. This
91
+ * may point to the latest version (called the "master ref"), or a preview
92
+ * with draft content.
93
+ */
94
+ ref?: string | GetRef;
95
+ /**
96
+ * A list of route resolver objects that define how a document's `url`
97
+ * property is resolved.
98
+ *
99
+ * {@link https://prismic.io/docs/route-resolver}
100
+ */
101
+ routes?: NonNullable<BuildQueryURLArgs["routes"]>;
102
+ /**
103
+ * The `brokenRoute` option allows you to define the route populated in the
104
+ * `url` property for broken link or content relationship fields. A broken
105
+ * link is a link or content relationship field whose linked document has been
106
+ * unpublished or deleted.
107
+ *
108
+ * {@link https://prismic.io/docs/route-resolver}
109
+ */
110
+ brokenRoute?: NonNullable<BuildQueryURLArgs["brokenRoute"]>;
111
+ /**
112
+ * Default parameters that will be sent with each query. These parameters can
113
+ * be overridden on each query if needed.
114
+ */
115
+ defaultParams?: Omit<BuildQueryURLArgs, "ref" | "integrationFieldsRef" | "accessToken" | "routes" | "brokenRoute">;
116
+ /**
117
+ * The function used to make network requests to the Prismic REST API. In
118
+ * environments where a global `fetch` function does not exist, such as
119
+ * Node.js, this function must be provided.
120
+ */
121
+ fetch?: FetchLike;
122
+ /**
123
+ * Options provided to the client's `fetch()` on all network requests. These
124
+ * options will be merged with internally required options. They can also be
125
+ * overriden on a per-query basis using the query's `fetchOptions` parameter.
126
+ */
127
+ fetchOptions?: RequestInitLike;
128
+ };
129
+ /**
130
+ * Parameters specific to client methods that fetch all documents. These methods
131
+ * start with `getAll` (for example, `getAllByType`).
132
+ */
133
+ type GetAllParams = {
134
+ /**
135
+ * Limit the number of documents queried. If a number is not provided, there
136
+ * will be no limit and all matching documents will be returned.
137
+ */
138
+ limit?: number;
139
+ };
140
+ /**
141
+ * Arguments to determine how the URL for a preview session is resolved.
142
+ */
143
+ type ResolvePreviewArgs<LinkResolverReturnType> = {
144
+ /**
145
+ * A function that maps a Prismic document to a URL within your app.
146
+ */
147
+ linkResolver?: LinkResolverFunction<LinkResolverReturnType>;
148
+ /**
149
+ * A fallback URL if the link resolver does not return a value.
150
+ */
151
+ defaultURL: string;
152
+ /**
153
+ * The preview token (also known as a ref) that will be used to query preview
154
+ * content from the Prismic repository.
155
+ */
156
+ previewToken?: string;
157
+ /**
158
+ * The previewed document that will be used to determine the destination URL.
159
+ */
160
+ documentID?: string;
161
+ };
162
+ /**
163
+ * A client that allows querying content from a Prismic repository.
164
+ *
165
+ * If used in an environment where a global `fetch` function is unavailable,
166
+ * such as Node.js, the `fetch` option must be provided as part of the `options`
167
+ * parameter.
168
+ *
169
+ * @typeParam TDocuments - Document types that are registered for the Prismic
170
+ * repository. Query methods will automatically be typed based on this type.
171
+ */
172
+ declare class Client<TDocuments extends PrismicDocument = PrismicDocument> {
173
+ #private;
174
+ /**
175
+ * The function used to make network requests to the Prismic REST API. In
176
+ * environments where a global `fetch` function does not exist, such as
177
+ * Node.js, this function must be provided.
178
+ */
179
+ fetchFn: FetchLike;
180
+ fetchOptions?: RequestInitLike;
181
+ /**
182
+ * The Prismic repository's name.
183
+ */
184
+ set repositoryName(value: string);
185
+ /**
186
+ * The Prismic repository's name.
187
+ */
188
+ get repositoryName(): string;
189
+ /**
190
+ * The Prismic REST API V2 endpoint for the repository (use
191
+ * `prismic.getRepositoryEndpoint` for the default endpoint).
192
+ */
193
+ documentAPIEndpoint: string;
194
+ /**
195
+ * The Prismic REST API V2 endpoint for the repository (use
196
+ * `prismic.getRepositoryEndpoint` for the default endpoint).
197
+ *
198
+ * @deprecated Use `documentAPIEndpoint` instead.
199
+ */
200
+ set endpoint(value: string);
201
+ /**
202
+ * The Prismic REST API V2 endpoint for the repository (use
203
+ * `prismic.getRepositoryEndpoint` for the default endpoint).
204
+ *
205
+ * @deprecated Use `documentAPIEndpoint` instead.
206
+ */
207
+ get endpoint(): string;
208
+ /**
209
+ * The secure token for accessing the API (only needed if your repository is
210
+ * set to private).
211
+ *
212
+ * {@link https://user-guides.prismic.io/en/articles/1036153-generating-an-access-token}
213
+ */
214
+ accessToken?: string;
215
+ /**
216
+ * A list of route resolver objects that define how a document's `url` field
217
+ * is resolved.
218
+ *
219
+ * {@link https://prismic.io/docs/route-resolver}
220
+ */
221
+ routes?: NonNullable<BuildQueryURLArgs["routes"]>;
222
+ /**
223
+ * The `brokenRoute` option allows you to define the route populated in the
224
+ * `url` property for broken link or content relationship fields. A broken
225
+ * link is a link or content relationship field whose linked document has been
226
+ * unpublished or deleted.
227
+ *
228
+ * {@link https://prismic.io/docs/route-resolver}
229
+ */
230
+ brokenRoute?: NonNullable<BuildQueryURLArgs["brokenRoute"]>;
231
+ /**
232
+ * Default parameters that will be sent with each query. These parameters can
233
+ * be overridden on each query if needed.
234
+ */
235
+ defaultParams?: Omit<BuildQueryURLArgs, "ref" | "integrationFieldsRef" | "accessToken" | "routes">;
236
+ /**
237
+ * Creates a Prismic client that can be used to query a repository.
238
+ *
239
+ * If used in an environment where a global `fetch` function is unavailable,
240
+ * such as in some Node.js versions, the `fetch` option must be provided as
241
+ * part of the `options` parameter.
242
+ *
243
+ * @param repositoryNameOrEndpoint - The Prismic repository name or full Rest
244
+ * API V2 endpoint for the repository.
245
+ * @param options - Configuration that determines how content will be queried
246
+ * from the Prismic repository.
247
+ *
248
+ * @returns A client that can query content from the repository.
249
+ */
250
+ constructor(repositoryNameOrEndpoint: string, options?: ClientConfig);
251
+ /**
252
+ * Enables the client to automatically query content from a preview session.
253
+ *
254
+ * @example
255
+ *
256
+ * ```ts
257
+ * client.enableAutoPreviews()
258
+ * ```
259
+ *
260
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#enableautopreviews}
261
+ */
262
+ enableAutoPreviews(): void;
263
+ /**
264
+ * Enables the client to automatically query content from a preview session
265
+ * using an HTTP request object.
266
+ *
267
+ * @example
268
+ *
269
+ * ```ts
270
+ * client.enableAutoPreviewsFromReq(req)
271
+ * ```
272
+ *
273
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#enableautopreviewsfromreq}
274
+ */
275
+ enableAutoPreviewsFromReq(request: HttpRequestLike): void;
276
+ /**
277
+ * Disables the client from automatically querying content from a preview
278
+ * session.
279
+ *
280
+ * @example
281
+ *
282
+ * ```ts
283
+ * client.disableAutoPreviews()
284
+ * ```
285
+ *
286
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#disableautopreviews}
287
+ */
288
+ disableAutoPreviews(): void;
289
+ /**
290
+ * Fetches pages based on the `params` argument. Results are paginated.
291
+ *
292
+ * @example
293
+ *
294
+ * ```ts
295
+ * const response = await client.get({ pageSize: 10 })
296
+ * ```
297
+ *
298
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#get}
299
+ */
300
+ get<TDocument extends TDocuments>(params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<Query<TDocument>>;
301
+ /**
302
+ * Fetches the first page returned based on the `params` argument.
303
+ *
304
+ * @example
305
+ *
306
+ * ```ts
307
+ * const page = await client.getFirst()
308
+ * ```
309
+ *
310
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getfirst}
311
+ */
312
+ getFirst<TDocument extends TDocuments>(params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<TDocument>;
313
+ /**
314
+ * Fetches all pages based on the `params` argument. This method may make
315
+ * multiple network requests to fetch all matching pages.
316
+ *
317
+ * @example
318
+ *
319
+ * ```ts
320
+ * const pages = await client.dangerouslyGetAll()
321
+ * ```
322
+ *
323
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#dangerouslygetall}
324
+ */
325
+ dangerouslyGetAll<TDocument extends TDocuments>(params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<TDocument[]>;
326
+ /**
327
+ * Fetches a page with a specific ID.
328
+ *
329
+ * @example
330
+ *
331
+ * ```ts
332
+ * const page = await client.getByID("WW4bKScAAMAqmluX")
333
+ * ```
334
+ *
335
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getbyid}
336
+ */
337
+ getByID<TDocument extends TDocuments>(id: string, params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<TDocument>;
338
+ /**
339
+ * Fetches pages with specific IDs. Results are paginated.
340
+ *
341
+ * @example
342
+ *
343
+ * ```ts
344
+ * const response = await client.getByIDs([
345
+ * "WW4bKScAAMAqmluX",
346
+ * "U1kTRgEAAC8A5ldS",
347
+ * ])
348
+ * ```
349
+ *
350
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getbyids}
351
+ */
352
+ getByIDs<TDocument extends TDocuments>(ids: string[], params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<Query<TDocument>>;
353
+ /**
354
+ * Fetches pages with specific IDs. This method may make multiple network
355
+ * requests to fetch all matching pages.
356
+ *
357
+ * @example
358
+ *
359
+ * ```ts
360
+ * const pages = await client.getAllByIDs([
361
+ * "WW4bKScAAMAqmluX",
362
+ * "U1kTRgEAAC8A5ldS",
363
+ * ])
364
+ * ```
365
+ *
366
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getallbyids}
367
+ */
368
+ getAllByIDs<TDocument extends TDocuments>(ids: string[], params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<TDocument[]>;
369
+ /**
370
+ * Fetches a page with a specific UID and type.
371
+ *
372
+ * @example
373
+ *
374
+ * ```ts
375
+ * const page = await client.getByUID("blog_post", "my-first-post")
376
+ * ```
377
+ *
378
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getbyuid}
379
+ */
380
+ getByUID<TDocument extends TDocuments, TDocumentType extends TDocument["type"] = TDocument["type"]>(documentType: TDocumentType, uid: string, params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<ExtractDocumentType<TDocument, TDocumentType>>;
381
+ /**
382
+ * Fetches pages with specific UIDs and a specific type. Results are
383
+ * paginated.
384
+ *
385
+ * @example
386
+ *
387
+ * ```ts
388
+ * const response = await client.getByUIDs("blog_post", [
389
+ * "my-first-post",
390
+ * "my-second-post",
391
+ * ])
392
+ * ```
393
+ *
394
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getbyuids}
395
+ */
396
+ getByUIDs<TDocument extends TDocuments, TDocumentType extends TDocument["type"] = TDocument["type"]>(documentType: TDocumentType, uids: string[], params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<Query<ExtractDocumentType<TDocument, TDocumentType>>>;
397
+ /**
398
+ * Fetches pages with specific UIDs and a specific type. This method may make
399
+ * multiple network requests to fetch all matching pages.
400
+ *
401
+ * @example
402
+ *
403
+ * ```ts
404
+ * const pages = await client.getAllByUIDs("blog_post", [
405
+ * "my-first-post",
406
+ * "my-second-post",
407
+ * ])
408
+ * ```
409
+ *
410
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getallbyuids}
411
+ */
412
+ getAllByUIDs<TDocument extends TDocuments, TDocumentType extends TDocument["type"] = TDocument["type"]>(documentType: TDocumentType, uids: string[], params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<ExtractDocumentType<TDocument, TDocumentType>[]>;
413
+ /**
414
+ * Fetches a specific single type page.
415
+ *
416
+ * @example
417
+ *
418
+ * ```ts
419
+ * const page = await client.getSingle("settings")
420
+ * ```
421
+ *
422
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getsingle}
423
+ */
424
+ getSingle<TDocument extends TDocuments, TDocumentType extends TDocument["type"] = TDocument["type"]>(documentType: TDocumentType, params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<ExtractDocumentType<TDocument, TDocumentType>>;
425
+ /**
426
+ * Fetches pages with a specific type. Results are paginated.
427
+ *
428
+ * @example
429
+ *
430
+ * ```ts
431
+ * const response = await client.getByType("blog_post")
432
+ * ```
433
+ *
434
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getbytype}
435
+ */
436
+ getByType<TDocument extends TDocuments, TDocumentType extends TDocument["type"] = TDocument["type"]>(documentType: TDocumentType, params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<Query<ExtractDocumentType<TDocument, TDocumentType>>>;
437
+ /**
438
+ * Fetches pages with a specific type. This method may make multiple network
439
+ * requests to fetch all matching documents.
440
+ *
441
+ * @example
442
+ *
443
+ * ```ts
444
+ * const pages = await client.getAllByType("blog_post")
445
+ * ```
446
+ *
447
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getallbytype}
448
+ */
449
+ getAllByType<TDocument extends TDocuments, TDocumentType extends TDocument["type"] = TDocument["type"]>(documentType: TDocumentType, params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<ExtractDocumentType<TDocument, TDocumentType>[]>;
450
+ /**
451
+ * Fetches pages with a specific tag. Results are paginated.
452
+ *
453
+ * @example
454
+ *
455
+ * ```ts
456
+ * const response = await client.getByTag("featured")
457
+ * ```
458
+ *
459
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getbytag}
460
+ */
461
+ getByTag<TDocument extends TDocuments>(tag: string, params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<Query<TDocument>>;
462
+ /**
463
+ * Fetches pages with a specific tag. This method may make multiple network
464
+ * requests to fetch all matching documents.
465
+ *
466
+ * @example
467
+ *
468
+ * ```ts
469
+ * const pages = await client.getAllByTag("featured")
470
+ * ```
471
+ *
472
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getallbytag}
473
+ */
474
+ getAllByTag<TDocument extends TDocuments>(tag: string, params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<TDocument[]>;
475
+ /**
476
+ * Fetches pages with every tag from a list of tags. Results are paginated.
477
+ *
478
+ * @example
479
+ *
480
+ * ```ts
481
+ * const response = await client.getByEveryTag(["featured", "homepage"])
482
+ * ```
483
+ *
484
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getbyeverytag}
485
+ */
486
+ getByEveryTag<TDocument extends TDocuments>(tags: string[], params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<Query<TDocument>>;
487
+ /**
488
+ * Fetches pages with every tag from a list of tags. This method may make
489
+ * multiple network requests to fetch all matching pages.
490
+ *
491
+ * @example
492
+ *
493
+ * ```ts
494
+ * const pages = await client.getAllByEveryTag(["featured", "homepage"])
495
+ * ```
496
+ *
497
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getallbyeverytag}
498
+ */
499
+ getAllByEveryTag<TDocument extends TDocuments>(tags: string[], params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<TDocument[]>;
500
+ /**
501
+ * Fetches pages with at least one tag from a list of tags. Results are
502
+ * paginated.
503
+ *
504
+ * @example
505
+ *
506
+ * ```ts
507
+ * const response = await client.getBySomeTags(["featured", "homepage"])
508
+ * ```
509
+ *
510
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getbysometags}
511
+ */
512
+ getBySomeTags<TDocument extends TDocuments>(tags: string[], params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<Query<TDocument>>;
513
+ /**
514
+ * Fetches pages with at least one tag from a list of tags. This method may
515
+ * make multiple network requests to fetch all matching documents.
516
+ *
517
+ * @example
518
+ *
519
+ * ```ts
520
+ * const pages = await client.getAllBySomeTags(["featured", "homepage"])
521
+ * ```
522
+ *
523
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getallbysometags}
524
+ */
525
+ getAllBySomeTags<TDocument extends TDocuments>(tags: string[], params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<TDocument[]>;
526
+ /**
527
+ * Fetches metadata about the client's Prismic repository.
528
+ *
529
+ * @example
530
+ *
531
+ * ```ts
532
+ * const repository = await client.getRepository()
533
+ * ```
534
+ *
535
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getrepository}
536
+ */
537
+ getRepository(params?: Pick<BuildQueryURLArgs, "accessToken"> & FetchParams): Promise<Repository>;
538
+ /**
539
+ * Fetches the repository's active refs.
540
+ *
541
+ * @example
542
+ *
543
+ * ```ts
544
+ * const refs = await client.getRefs()
545
+ * ```
546
+ *
547
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getrefs}
548
+ */
549
+ getRefs(params?: FetchParams): Promise<Ref[]>;
550
+ /**
551
+ * Fetches a ref by its ID.
552
+ *
553
+ * @example
554
+ *
555
+ * ```ts
556
+ * const ref = await client.getRefByID("YhE3YhEAACIA4321")
557
+ * ```
558
+ *
559
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getrefbyid}
560
+ */
561
+ getRefByID(id: string, params?: FetchParams): Promise<Ref>;
562
+ /**
563
+ * Fetches a ref by its label. A release ref's label is its name shown in the
564
+ * Page Builder.
565
+ *
566
+ * @example
567
+ *
568
+ * ```ts
569
+ * const ref = await client.getRefByLabel("My Release")
570
+ * ```
571
+ *
572
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getrefbylabel}
573
+ */
574
+ getRefByLabel(label: string, params?: FetchParams): Promise<Ref>;
575
+ /**
576
+ * Fetches the repository's master ref.
577
+ *
578
+ * @example
579
+ *
580
+ * ```ts
581
+ * const masterRef = await client.getMasterRef()
582
+ * ```
583
+ *
584
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getmasterref}
585
+ */
586
+ getMasterRef(params?: FetchParams): Promise<Ref>;
587
+ /**
588
+ * Fetches the repository's active releases.
589
+ *
590
+ * @example
591
+ *
592
+ * ```ts
593
+ * const releases = await client.getReleases()
594
+ * ```
595
+ *
596
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getreleases}
597
+ */
598
+ getReleases(params?: FetchParams): Promise<Ref[]>;
599
+ /**
600
+ * Fetches a release with a specific ID.
601
+ *
602
+ * @example
603
+ *
604
+ * ```ts
605
+ * const release = await client.getReleaseByID("YhE3YhEAACIA4321")
606
+ * ```
607
+ *
608
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getreleasebyid}
609
+ */
610
+ getReleaseByID(id: string, params?: FetchParams): Promise<Ref>;
611
+ /**
612
+ * Fetches a release by its label. A release ref's label is its name shown in
613
+ * the Page Builder.
614
+ *
615
+ * @example
616
+ *
617
+ * ```ts
618
+ * const release = await client.getReleaseByLabel("My Release")
619
+ * ```
620
+ *
621
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#getreleasebylabel}
622
+ */
623
+ getReleaseByLabel(label: string, params?: FetchParams): Promise<Ref>;
624
+ /**
625
+ * Fetches the repository's page tags.
626
+ *
627
+ * @example
628
+ *
629
+ * ```ts
630
+ * const tags = await client.getTags()
631
+ * ```
632
+ *
633
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#gettags}
634
+ */
635
+ getTags(params?: FetchParams): Promise<string[]>;
636
+ /**
637
+ * Builds a Content API query URL with a set of parameters.
638
+ *
639
+ * @example
640
+ *
641
+ * ```ts
642
+ * const url = await client.buildQueryURL({
643
+ * filters: [filter.at("document.type", "blog_post")],
644
+ * })
645
+ * ```
646
+ *
647
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#buildqueryurl}
648
+ */
649
+ buildQueryURL({
650
+ signal,
651
+ fetchOptions,
652
+ ...params
653
+ }?: Partial<BuildQueryURLArgs> & FetchParams): Promise<string>;
654
+ /**
655
+ * Fetches a previewed page's URL using a preview token and page ID.
656
+ *
657
+ * @example
658
+ *
659
+ * ```ts
660
+ * const url = await client.resolvePreviewURL({
661
+ * linkResolver,
662
+ * defaultURL: "/",
663
+ * })
664
+ * ```
665
+ *
666
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#resolvepreviewurl}
667
+ */
668
+ resolvePreviewURL<LinkResolverReturnType>(args: ResolvePreviewArgs<LinkResolverReturnType> & FetchParams): Promise<string>;
669
+ /**
670
+ * Configures the client to query the latest published content. This is the
671
+ * client's default mode.
672
+ *
673
+ * @example
674
+ *
675
+ * ```ts
676
+ * client.queryLatestContent()
677
+ * ```
678
+ *
679
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#querylatestcontent}
680
+ */
681
+ queryLatestContent(): void;
682
+ /**
683
+ * Configures the client to query content from a release with a specific ID.
684
+ *
685
+ * @example
686
+ *
687
+ * ```ts
688
+ * client.queryContentFromReleaseByID("YhE3YhEAACIA4321")
689
+ * ```
690
+ *
691
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#querycontentfromreleasebyid}
692
+ */
693
+ queryContentFromReleaseByID(id: string): void;
694
+ /**
695
+ * Configures the client to query content from a release with a specific
696
+ * label.
697
+ *
698
+ * @example
699
+ *
700
+ * ```ts
701
+ * client.queryContentFromReleaseByLabel("My Release")
702
+ * ```
703
+ *
704
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#querycontentfromreleasebylabel}
705
+ */
706
+ queryContentFromReleaseByLabel(label: string): void;
707
+ /**
708
+ * Configures the client to query content from a specific ref.
709
+ *
710
+ * @example
711
+ *
712
+ * ```ts
713
+ * client.queryContentFromRef("my-ref")
714
+ * ```
715
+ *
716
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#querycontentfromref}
717
+ */
718
+ queryContentFromRef(ref: string | GetRef): void;
719
+ /**
720
+ * A preconfigured `fetch()` function for Prismic's GraphQL API that can be
721
+ * provided to GraphQL clients.
722
+ *
723
+ * @example
724
+ *
725
+ * ```ts
726
+ * import { createClient, getGraphQLEndpoint } from "@prismicio/client"
727
+ *
728
+ * const client = createClient("example-prismic-repo")
729
+ * const graphQLClient = new ApolloClient({
730
+ * link: new HttpLink({
731
+ * uri: getGraphQLEndpoint(client.repositoryName),
732
+ * // Provide `client.graphQLFetch` as the fetch implementation.
733
+ * fetch: client.graphQLFetch,
734
+ * // Using GET is required.
735
+ * useGETForQueries: true,
736
+ * }),
737
+ * cache: new InMemoryCache(),
738
+ * })
739
+ * ```
740
+ *
741
+ * @see {@link https://prismic.io/docs/technical-reference/prismicio-client/v7#graphqlfetch}
742
+ */
743
+ graphQLFetch(input: RequestInfo, init?: Omit<RequestInit, "signal"> & {
744
+ signal?: AbortSignalLike;
745
+ }): Promise<Response>;
746
+ }
747
+ //#endregion
748
+ export { Client, ClientConfig, FetchParams, HttpRequestLike };
749
+ //# sourceMappingURL=Client.d.ts.map