@graphty/graph-io 0.3.46 → 0.3.48

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 (460) hide show
  1. package/dist/chunks/{approximations-wWjCRzKj.js → approximations-C2riR4NT.js} +2 -2
  2. package/dist/chunks/{approximations-wWjCRzKj.js.map → approximations-C2riR4NT.js.map} +1 -1
  3. package/dist/chunks/{block-DiGq58c3.js → block-Cu22ewuS.js} +92 -21
  4. package/dist/chunks/block-Cu22ewuS.js.map +1 -0
  5. package/dist/chunks/{choose--jM0yYCo.js → choose-Cdx6Enl2.js} +3 -3
  6. package/dist/chunks/{choose--jM0yYCo.js.map → choose-Cdx6Enl2.js.map} +1 -1
  7. package/dist/chunks/codes-CV_Bhcyi.js +153 -0
  8. package/dist/chunks/codes-CV_Bhcyi.js.map +1 -0
  9. package/dist/chunks/{constants-BKwqelYD.js → constants-D0LqcsLJ.js} +2 -2
  10. package/dist/chunks/{constants-BKwqelYD.js.map → constants-D0LqcsLJ.js.map} +1 -1
  11. package/dist/chunks/context-cgmmOxZ2.js +663 -0
  12. package/dist/chunks/context-cgmmOxZ2.js.map +1 -0
  13. package/dist/chunks/credentials-BiQsnMTb.js +347 -0
  14. package/dist/chunks/credentials-BiQsnMTb.js.map +1 -0
  15. package/dist/chunks/cx-export-BEeF6ymo.js +259 -0
  16. package/dist/chunks/cx-export-BEeF6ymo.js.map +1 -0
  17. package/dist/chunks/descriptor-BJ-W0Jd-.js +137 -0
  18. package/dist/chunks/descriptor-BJ-W0Jd-.js.map +1 -0
  19. package/dist/chunks/descriptor-C-YDhtsn.js +48 -0
  20. package/dist/chunks/descriptor-C-YDhtsn.js.map +1 -0
  21. package/dist/chunks/{emit-CwU8cUmG.js → emit-CD8xnY8s.js} +70 -10
  22. package/dist/chunks/emit-CD8xnY8s.js.map +1 -0
  23. package/dist/chunks/{escape-CgzxiYPg.js → escape-DH2Egt-l.js} +12 -12
  24. package/dist/chunks/{escape-CgzxiYPg.js.map → escape-DH2Egt-l.js.map} +1 -1
  25. package/dist/chunks/{export-BvqAXCKh.js → export-CZ7VRm4I.js} +53 -1443
  26. package/dist/chunks/export-CZ7VRm4I.js.map +1 -0
  27. package/dist/chunks/{exporter-DndFlGSa.js → exporter-BIdaoIgh.js} +7 -6
  28. package/dist/chunks/{exporter-DndFlGSa.js.map → exporter-BIdaoIgh.js.map} +1 -1
  29. package/dist/chunks/{exporter-CJgfhF-l.js → exporter-ChjL5fmP.js} +8 -7
  30. package/dist/chunks/{exporter-CJgfhF-l.js.map → exporter-ChjL5fmP.js.map} +1 -1
  31. package/dist/chunks/{exporter--Mk9gXCJ.js → exporter-Dcw7Ldtq.js} +6 -4
  32. package/dist/chunks/{exporter--Mk9gXCJ.js.map → exporter-Dcw7Ldtq.js.map} +1 -1
  33. package/dist/chunks/exporter-DtVU80Fa.js +1008 -0
  34. package/dist/chunks/exporter-DtVU80Fa.js.map +1 -0
  35. package/dist/chunks/{exporter-CrDWIyiq.js → exporter-bxxjOrDZ.js} +11 -9
  36. package/dist/chunks/{exporter-CrDWIyiq.js.map → exporter-bxxjOrDZ.js.map} +1 -1
  37. package/dist/chunks/format-BMS-1Nxb.js +64 -0
  38. package/dist/chunks/format-BMS-1Nxb.js.map +1 -0
  39. package/dist/chunks/{generic-Dq1ntt9q.js → generic-CP6YD34u.js} +4 -4
  40. package/dist/chunks/{generic-Dq1ntt9q.js.map → generic-CP6YD34u.js.map} +1 -1
  41. package/dist/chunks/{importer-DiZRmOQG.js → importer-B87_fmVx.js} +13 -17
  42. package/dist/chunks/importer-B87_fmVx.js.map +1 -0
  43. package/dist/chunks/{importer-BSvfrX_h.js → importer-Bji2MeWr.js} +18 -1014
  44. package/dist/chunks/importer-Bji2MeWr.js.map +1 -0
  45. package/dist/chunks/{importer-COTK9Tsl.js → importer-CB_zV5_L.js} +14 -11
  46. package/dist/chunks/importer-CB_zV5_L.js.map +1 -0
  47. package/dist/chunks/{importer-e6LGpqHB.js → importer-CVT-JyDE.js} +12 -9
  48. package/dist/chunks/importer-CVT-JyDE.js.map +1 -0
  49. package/dist/chunks/{importer-yh_aBCU6.js → importer-Cyy6UseH.js} +7 -6
  50. package/dist/chunks/{importer-yh_aBCU6.js.map → importer-Cyy6UseH.js.map} +1 -1
  51. package/dist/chunks/{importer-iFYPEKaJ.js → importer-DPZDN40-.js} +14 -10
  52. package/dist/chunks/{importer-iFYPEKaJ.js.map → importer-DPZDN40-.js.map} +1 -1
  53. package/dist/chunks/{importer-CMmeMWlC.js → importer-e3huMZbm.js} +8 -260
  54. package/dist/chunks/importer-e3huMZbm.js.map +1 -0
  55. package/dist/chunks/input-Ccg9I22A.js +1397 -0
  56. package/dist/chunks/input-Ccg9I22A.js.map +1 -0
  57. package/dist/chunks/{json-elements-DJZRZ6jd.js → json-elements-By172SVq.js} +4 -4
  58. package/dist/chunks/{json-elements-DJZRZ6jd.js.map → json-elements-By172SVq.js.map} +1 -1
  59. package/dist/chunks/{lexicon-CT69Kd87.js → lexicon-u2SI5xcx.js} +19 -5
  60. package/dist/chunks/lexicon-u2SI5xcx.js.map +1 -0
  61. package/dist/chunks/{ontology-export-G4MqRdux.js → ontology-export-BwgMyuF0.js} +4 -3
  62. package/dist/chunks/{ontology-export-G4MqRdux.js.map → ontology-export-BwgMyuF0.js.map} +1 -1
  63. package/dist/chunks/{records-CiaWZrFH.js → records-Cgvxz-Vx.js} +2 -2
  64. package/dist/chunks/{records-CiaWZrFH.js.map → records-Cgvxz-Vx.js.map} +1 -1
  65. package/dist/chunks/{format-BpQBx8MZ.js → report-CgdsL9Hb.js} +72 -129
  66. package/dist/chunks/report-CgdsL9Hb.js.map +1 -0
  67. package/dist/chunks/sigv4-LkAzsLAu.js +247 -0
  68. package/dist/chunks/sigv4-LkAzsLAu.js.map +1 -0
  69. package/dist/chunks/{styles-BQnsga7p.js → styles-CaABMoO1.js} +76 -43
  70. package/dist/chunks/styles-CaABMoO1.js.map +1 -0
  71. package/dist/chunks/{styles-D3fRphrO.js → styles-P_gmFAOi.js} +101 -21
  72. package/dist/chunks/styles-P_gmFAOi.js.map +1 -0
  73. package/dist/chunks/{styles-yed-BF5x3_Y5.js → styles-yed-Cs1nmrjn.js} +60 -20
  74. package/dist/chunks/styles-yed-Cs1nmrjn.js.map +1 -0
  75. package/dist/chunks/{text-CzJNFOS9.js → text-BuKQVMz2.js} +2 -2
  76. package/dist/chunks/{text-CzJNFOS9.js.map → text-BuKQVMz2.js.map} +1 -1
  77. package/dist/chunks/{writer-DMKvthQE.js → writer-DvHTl36J.js} +5 -4
  78. package/dist/chunks/writer-DvHTl36J.js.map +1 -0
  79. package/dist/csv.js +7 -5
  80. package/dist/csv.js.map +1 -1
  81. package/dist/cx.js +5 -4
  82. package/dist/cx.js.map +1 -1
  83. package/dist/cx2.js +2 -2
  84. package/dist/cys.js +1 -1
  85. package/dist/dot.js +2 -2
  86. package/dist/gexf.js +7 -5
  87. package/dist/gexf.js.map +1 -1
  88. package/dist/gml.js +16 -13
  89. package/dist/gml.js.map +1 -1
  90. package/dist/graph-io.js +1181 -224
  91. package/dist/graph-io.js.map +1 -1
  92. package/dist/graphml.js +3 -3
  93. package/dist/json.js +1 -1
  94. package/dist/neo4j.js +6 -4
  95. package/dist/neo4j.js.map +1 -1
  96. package/dist/obo.js +1 -1
  97. package/dist/pajek.js +1 -1
  98. package/dist/sources-cypher.d.ts +1 -0
  99. package/dist/sources-cypher.js +1236 -0
  100. package/dist/sources-cypher.js.map +1 -0
  101. package/dist/sources-ndex.d.ts +1 -0
  102. package/dist/sources-ndex.js +278 -0
  103. package/dist/sources-ndex.js.map +1 -0
  104. package/dist/sources-rest.d.ts +1 -0
  105. package/dist/sources-rest.js +1367 -0
  106. package/dist/sources-rest.js.map +1 -0
  107. package/dist/src/common/report.d.ts +6 -3
  108. package/dist/src/common/report.d.ts.map +1 -1
  109. package/dist/src/common/report.js +15 -9
  110. package/dist/src/common/report.js.map +1 -1
  111. package/dist/src/formats/cx/styles.d.ts.map +1 -1
  112. package/dist/src/formats/cx/styles.js +1 -0
  113. package/dist/src/formats/cx/styles.js.map +1 -1
  114. package/dist/src/formats/dot/styles.d.ts.map +1 -1
  115. package/dist/src/formats/dot/styles.js +3 -1
  116. package/dist/src/formats/dot/styles.js.map +1 -1
  117. package/dist/src/formats/gexf/styles.d.ts +29 -12
  118. package/dist/src/formats/gexf/styles.d.ts.map +1 -1
  119. package/dist/src/formats/gexf/styles.js +160 -31
  120. package/dist/src/formats/gexf/styles.js.map +1 -1
  121. package/dist/src/formats/gml/styles.d.ts.map +1 -1
  122. package/dist/src/formats/gml/styles.js +5 -4
  123. package/dist/src/formats/gml/styles.js.map +1 -1
  124. package/dist/src/formats/graphml/styles-plain.d.ts.map +1 -1
  125. package/dist/src/formats/graphml/styles-plain.js +3 -3
  126. package/dist/src/formats/graphml/styles-plain.js.map +1 -1
  127. package/dist/src/formats/graphml/styles-yed.d.ts.map +1 -1
  128. package/dist/src/formats/graphml/styles-yed.js +89 -19
  129. package/dist/src/formats/graphml/styles-yed.js.map +1 -1
  130. package/dist/src/formats/pajek/styles.d.ts.map +1 -1
  131. package/dist/src/formats/pajek/styles.js +1 -0
  132. package/dist/src/formats/pajek/styles.js.map +1 -1
  133. package/dist/src/formats/xgmml/styles.d.ts.map +1 -1
  134. package/dist/src/formats/xgmml/styles.js +1 -0
  135. package/dist/src/formats/xgmml/styles.js.map +1 -1
  136. package/dist/src/index.d.ts +8 -1
  137. package/dist/src/index.d.ts.map +1 -1
  138. package/dist/src/index.js +9 -1
  139. package/dist/src/index.js.map +1 -1
  140. package/dist/src/registry.d.ts +173 -1
  141. package/dist/src/registry.d.ts.map +1 -1
  142. package/dist/src/registry.js +196 -1
  143. package/dist/src/registry.js.map +1 -1
  144. package/dist/src/sources/builtins.d.ts +11 -0
  145. package/dist/src/sources/builtins.d.ts.map +1 -0
  146. package/dist/src/sources/builtins.js +47 -0
  147. package/dist/src/sources/builtins.js.map +1 -0
  148. package/dist/src/sources/codes.d.ts +230 -0
  149. package/dist/src/sources/codes.d.ts.map +1 -0
  150. package/dist/src/sources/codes.js +58 -0
  151. package/dist/src/sources/codes.js.map +1 -0
  152. package/dist/src/sources/context.d.ts +112 -0
  153. package/dist/src/sources/context.d.ts.map +1 -0
  154. package/dist/src/sources/context.js +739 -0
  155. package/dist/src/sources/context.js.map +1 -0
  156. package/dist/src/sources/credentials.d.ts +179 -0
  157. package/dist/src/sources/credentials.d.ts.map +1 -0
  158. package/dist/src/sources/credentials.js +301 -0
  159. package/dist/src/sources/credentials.js.map +1 -0
  160. package/dist/src/sources/cypher/descriptor.d.ts +21 -0
  161. package/dist/src/sources/cypher/descriptor.d.ts.map +1 -0
  162. package/dist/src/sources/cypher/descriptor.js +119 -0
  163. package/dist/src/sources/cypher/descriptor.js.map +1 -0
  164. package/dist/src/sources/cypher/flatten.d.ts +72 -0
  165. package/dist/src/sources/cypher/flatten.d.ts.map +1 -0
  166. package/dist/src/sources/cypher/flatten.js +279 -0
  167. package/dist/src/sources/cypher/flatten.js.map +1 -0
  168. package/dist/src/sources/cypher/index.d.ts +33 -0
  169. package/dist/src/sources/cypher/index.d.ts.map +1 -0
  170. package/dist/src/sources/cypher/index.js +405 -0
  171. package/dist/src/sources/cypher/index.js.map +1 -0
  172. package/dist/src/sources/cypher/params.d.ts +40 -0
  173. package/dist/src/sources/cypher/params.d.ts.map +1 -0
  174. package/dist/src/sources/cypher/params.js +6 -0
  175. package/dist/src/sources/cypher/params.js.map +1 -0
  176. package/dist/src/sources/cypher/profiles.d.ts +44 -0
  177. package/dist/src/sources/cypher/profiles.d.ts.map +1 -0
  178. package/dist/src/sources/cypher/profiles.js +61 -0
  179. package/dist/src/sources/cypher/profiles.js.map +1 -0
  180. package/dist/src/sources/cypher/query-builder.d.ts +106 -0
  181. package/dist/src/sources/cypher/query-builder.d.ts.map +1 -0
  182. package/dist/src/sources/cypher/query-builder.js +236 -0
  183. package/dist/src/sources/cypher/query-builder.js.map +1 -0
  184. package/dist/src/sources/cypher/transports/bolt.d.ts +21 -0
  185. package/dist/src/sources/cypher/transports/bolt.d.ts.map +1 -0
  186. package/dist/src/sources/cypher/transports/bolt.js +185 -0
  187. package/dist/src/sources/cypher/transports/bolt.js.map +1 -0
  188. package/dist/src/sources/cypher/transports/neptune-analytics.d.ts +15 -0
  189. package/dist/src/sources/cypher/transports/neptune-analytics.d.ts.map +1 -0
  190. package/dist/src/sources/cypher/transports/neptune-analytics.js +38 -0
  191. package/dist/src/sources/cypher/transports/neptune-analytics.js.map +1 -0
  192. package/dist/src/sources/cypher/transports/neptune-https.d.ts +31 -0
  193. package/dist/src/sources/cypher/transports/neptune-https.d.ts.map +1 -0
  194. package/dist/src/sources/cypher/transports/neptune-https.js +104 -0
  195. package/dist/src/sources/cypher/transports/neptune-https.js.map +1 -0
  196. package/dist/src/sources/cypher/transports/query-api.d.ts +14 -0
  197. package/dist/src/sources/cypher/transports/query-api.d.ts.map +1 -0
  198. package/dist/src/sources/cypher/transports/query-api.js +80 -0
  199. package/dist/src/sources/cypher/transports/query-api.js.map +1 -0
  200. package/dist/src/sources/cypher/transports/transport.d.ts +78 -0
  201. package/dist/src/sources/cypher/transports/transport.d.ts.map +1 -0
  202. package/dist/src/sources/cypher/transports/transport.js +77 -0
  203. package/dist/src/sources/cypher/transports/transport.js.map +1 -0
  204. package/dist/src/sources/cypher/types-map.d.ts +91 -0
  205. package/dist/src/sources/cypher/types-map.d.ts.map +1 -0
  206. package/dist/src/sources/cypher/types-map.js +306 -0
  207. package/dist/src/sources/cypher/types-map.js.map +1 -0
  208. package/dist/src/sources/define.d.ts +47 -0
  209. package/dist/src/sources/define.d.ts.map +1 -0
  210. package/dist/src/sources/define.js +173 -0
  211. package/dist/src/sources/define.js.map +1 -0
  212. package/dist/src/sources/fail.d.ts +33 -0
  213. package/dist/src/sources/fail.d.ts.map +1 -0
  214. package/dist/src/sources/fail.js +49 -0
  215. package/dist/src/sources/fail.js.map +1 -0
  216. package/dist/src/sources/ids.d.ts +64 -0
  217. package/dist/src/sources/ids.d.ts.map +1 -0
  218. package/dist/src/sources/ids.js +64 -0
  219. package/dist/src/sources/ids.js.map +1 -0
  220. package/dist/src/sources/ndex/client.d.ts +31 -0
  221. package/dist/src/sources/ndex/client.d.ts.map +1 -0
  222. package/dist/src/sources/ndex/client.js +90 -0
  223. package/dist/src/sources/ndex/client.js.map +1 -0
  224. package/dist/src/sources/ndex/descriptor.d.ts +10 -0
  225. package/dist/src/sources/ndex/descriptor.d.ts.map +1 -0
  226. package/dist/src/sources/ndex/descriptor.js +55 -0
  227. package/dist/src/sources/ndex/descriptor.js.map +1 -0
  228. package/dist/src/sources/ndex/expand.d.ts +20 -0
  229. package/dist/src/sources/ndex/expand.d.ts.map +1 -0
  230. package/dist/src/sources/ndex/expand.js +87 -0
  231. package/dist/src/sources/ndex/expand.js.map +1 -0
  232. package/dist/src/sources/ndex/index.d.ts +25 -0
  233. package/dist/src/sources/ndex/index.d.ts.map +1 -0
  234. package/dist/src/sources/ndex/index.js +191 -0
  235. package/dist/src/sources/ndex/index.js.map +1 -0
  236. package/dist/src/sources/ndex/params.d.ts +17 -0
  237. package/dist/src/sources/ndex/params.d.ts.map +1 -0
  238. package/dist/src/sources/ndex/params.js +6 -0
  239. package/dist/src/sources/ndex/params.js.map +1 -0
  240. package/dist/src/sources/ndex/share-url.d.ts +40 -0
  241. package/dist/src/sources/ndex/share-url.d.ts.map +1 -0
  242. package/dist/src/sources/ndex/share-url.js +64 -0
  243. package/dist/src/sources/ndex/share-url.js.map +1 -0
  244. package/dist/src/sources/params.d.ts +28 -0
  245. package/dist/src/sources/params.d.ts.map +1 -0
  246. package/dist/src/sources/params.js +6 -0
  247. package/dist/src/sources/params.js.map +1 -0
  248. package/dist/src/sources/registry.d.ts +118 -0
  249. package/dist/src/sources/registry.d.ts.map +1 -0
  250. package/dist/src/sources/registry.js +193 -0
  251. package/dist/src/sources/registry.js.map +1 -0
  252. package/dist/src/sources/rest/descriptor.d.ts +16 -0
  253. package/dist/src/sources/rest/descriptor.d.ts.map +1 -0
  254. package/dist/src/sources/rest/descriptor.js +71 -0
  255. package/dist/src/sources/rest/descriptor.js.map +1 -0
  256. package/dist/src/sources/rest/index.d.ts +14 -0
  257. package/dist/src/sources/rest/index.d.ts.map +1 -0
  258. package/dist/src/sources/rest/index.js +13 -0
  259. package/dist/src/sources/rest/index.js.map +1 -0
  260. package/dist/src/sources/rest/mapping.d.ts +30 -0
  261. package/dist/src/sources/rest/mapping.d.ts.map +1 -0
  262. package/dist/src/sources/rest/mapping.js +362 -0
  263. package/dist/src/sources/rest/mapping.js.map +1 -0
  264. package/dist/src/sources/rest/openalex.d.ts +27 -0
  265. package/dist/src/sources/rest/openalex.d.ts.map +1 -0
  266. package/dist/src/sources/rest/openalex.js +269 -0
  267. package/dist/src/sources/rest/openalex.js.map +1 -0
  268. package/dist/src/sources/rest/paging.d.ts +53 -0
  269. package/dist/src/sources/rest/paging.d.ts.map +1 -0
  270. package/dist/src/sources/rest/paging.js +138 -0
  271. package/dist/src/sources/rest/paging.js.map +1 -0
  272. package/dist/src/sources/rest/params.d.ts +216 -0
  273. package/dist/src/sources/rest/params.d.ts.map +1 -0
  274. package/dist/src/sources/rest/params.js +7 -0
  275. package/dist/src/sources/rest/params.js.map +1 -0
  276. package/dist/src/sources/rest/records.d.ts +41 -0
  277. package/dist/src/sources/rest/records.d.ts.map +1 -0
  278. package/dist/src/sources/rest/records.js +240 -0
  279. package/dist/src/sources/rest/records.js.map +1 -0
  280. package/dist/src/sources/rest/samples/deps-dev.d.ts +10 -0
  281. package/dist/src/sources/rest/samples/deps-dev.d.ts.map +1 -0
  282. package/dist/src/sources/rest/samples/deps-dev.js +47 -0
  283. package/dist/src/sources/rest/samples/deps-dev.js.map +1 -0
  284. package/dist/src/sources/rest/samples/string.d.ts +9 -0
  285. package/dist/src/sources/rest/samples/string.d.ts.map +1 -0
  286. package/dist/src/sources/rest/samples/string.js +42 -0
  287. package/dist/src/sources/rest/samples/string.js.map +1 -0
  288. package/dist/src/sources/rest/selectors.d.ts +41 -0
  289. package/dist/src/sources/rest/selectors.d.ts.map +1 -0
  290. package/dist/src/sources/rest/selectors.js +81 -0
  291. package/dist/src/sources/rest/selectors.js.map +1 -0
  292. package/dist/src/sources/rest/source.d.ts +67 -0
  293. package/dist/src/sources/rest/source.d.ts.map +1 -0
  294. package/dist/src/sources/rest/source.js +635 -0
  295. package/dist/src/sources/rest/source.js.map +1 -0
  296. package/dist/src/sources/rest/templates.d.ts +38 -0
  297. package/dist/src/sources/rest/templates.d.ts.map +1 -0
  298. package/dist/src/sources/rest/templates.js +125 -0
  299. package/dist/src/sources/rest/templates.js.map +1 -0
  300. package/dist/src/sources/run.d.ts +93 -0
  301. package/dist/src/sources/run.d.ts.map +1 -0
  302. package/dist/src/sources/run.js +673 -0
  303. package/dist/src/sources/run.js.map +1 -0
  304. package/dist/src/sources/sha256.d.ts +12 -0
  305. package/dist/src/sources/sha256.d.ts.map +1 -0
  306. package/dist/src/sources/sha256.js +95 -0
  307. package/dist/src/sources/sha256.js.map +1 -0
  308. package/dist/src/sources/sigv4.d.ts +24 -0
  309. package/dist/src/sources/sigv4.d.ts.map +1 -0
  310. package/dist/src/sources/sigv4.js +182 -0
  311. package/dist/src/sources/sigv4.js.map +1 -0
  312. package/dist/src/sources/testing.d.ts +96 -0
  313. package/dist/src/sources/testing.d.ts.map +1 -0
  314. package/dist/src/sources/testing.js +138 -0
  315. package/dist/src/sources/testing.js.map +1 -0
  316. package/dist/src/sources/types.d.ts +665 -0
  317. package/dist/src/sources/types.d.ts.map +1 -0
  318. package/dist/src/sources/types.js +10 -0
  319. package/dist/src/sources/types.js.map +1 -0
  320. package/dist/src/styles/canon/enums.d.ts.map +1 -1
  321. package/dist/src/styles/canon/enums.js +1 -0
  322. package/dist/src/styles/canon/enums.js.map +1 -1
  323. package/dist/src/styles/cyjs/cascade.d.ts.map +1 -1
  324. package/dist/src/styles/cyjs/cascade.js +68 -2
  325. package/dist/src/styles/cyjs/cascade.js.map +1 -1
  326. package/dist/src/styles/cyjs/defaults-table.d.ts.map +1 -1
  327. package/dist/src/styles/cyjs/defaults-table.js +2 -0
  328. package/dist/src/styles/cyjs/defaults-table.js.map +1 -1
  329. package/dist/src/styles/cyjs/emit.d.ts.map +1 -1
  330. package/dist/src/styles/cyjs/emit.js +18 -7
  331. package/dist/src/styles/cyjs/emit.js.map +1 -1
  332. package/dist/src/styles/cyjs/mappers.d.ts +4 -1
  333. package/dist/src/styles/cyjs/mappers.d.ts.map +1 -1
  334. package/dist/src/styles/cyjs/mappers.js +2 -0
  335. package/dist/src/styles/cyjs/mappers.js.map +1 -1
  336. package/dist/src/styles/cytoscape/emit.d.ts.map +1 -1
  337. package/dist/src/styles/cytoscape/emit.js +59 -7
  338. package/dist/src/styles/cytoscape/emit.js.map +1 -1
  339. package/dist/src/styles/cytoscape/lexicon.d.ts +6 -0
  340. package/dist/src/styles/cytoscape/lexicon.d.ts.map +1 -1
  341. package/dist/src/styles/cytoscape/lexicon.js +26 -2
  342. package/dist/src/styles/cytoscape/lexicon.js.map +1 -1
  343. package/dist/src/styles/cytoscape/resolve.d.ts +4 -1
  344. package/dist/src/styles/cytoscape/resolve.d.ts.map +1 -1
  345. package/dist/src/styles/cytoscape/resolve.js +10 -6
  346. package/dist/src/styles/cytoscape/resolve.js.map +1 -1
  347. package/dist/src/styles/cytoscape/translate.d.ts.map +1 -1
  348. package/dist/src/styles/cytoscape/translate.js +10 -10
  349. package/dist/src/styles/cytoscape/translate.js.map +1 -1
  350. package/dist/src/styles/defaults.d.ts +30 -0
  351. package/dist/src/styles/defaults.d.ts.map +1 -1
  352. package/dist/src/styles/defaults.js +45 -4
  353. package/dist/src/styles/defaults.js.map +1 -1
  354. package/dist/src/styles/io/block.d.ts.map +1 -1
  355. package/dist/src/styles/io/block.js +9 -0
  356. package/dist/src/styles/io/block.js.map +1 -1
  357. package/dist/src/styles/io/writer.d.ts.map +1 -1
  358. package/dist/src/styles/io/writer.js +7 -3
  359. package/dist/src/styles/io/writer.js.map +1 -1
  360. package/dist/src/styles/plan/resolve.d.ts +2 -1
  361. package/dist/src/styles/plan/resolve.d.ts.map +1 -1
  362. package/dist/src/styles/plan/resolve.js +13 -2
  363. package/dist/src/styles/plan/resolve.js.map +1 -1
  364. package/dist/src/styles/types.d.ts +19 -2
  365. package/dist/src/styles/types.d.ts.map +1 -1
  366. package/dist/src/styles/vocabulary.d.ts.map +1 -1
  367. package/dist/src/styles/vocabulary.js +15 -1
  368. package/dist/src/styles/vocabulary.js.map +1 -1
  369. package/dist/src/types.d.ts +19 -5
  370. package/dist/src/types.d.ts.map +1 -1
  371. package/dist/src/types.js.map +1 -1
  372. package/dist/styles.js +11 -11
  373. package/dist/xgmml.js +3 -3
  374. package/docs/samples/people.json +6 -0
  375. package/package.json +29 -4
  376. package/src/common/report.ts +27 -7
  377. package/src/formats/cx/styles.ts +1 -0
  378. package/src/formats/dot/styles.ts +3 -1
  379. package/src/formats/gexf/styles.ts +185 -37
  380. package/src/formats/gml/styles.ts +5 -4
  381. package/src/formats/graphml/styles-plain.ts +3 -9
  382. package/src/formats/graphml/styles-yed.ts +93 -20
  383. package/src/formats/pajek/styles.ts +1 -0
  384. package/src/formats/xgmml/styles.ts +1 -0
  385. package/src/index.ts +90 -0
  386. package/src/registry.ts +326 -1
  387. package/src/sources/builtins.ts +56 -0
  388. package/src/sources/codes.ts +235 -0
  389. package/src/sources/context.ts +893 -0
  390. package/src/sources/credentials.ts +409 -0
  391. package/src/sources/cypher/descriptor.ts +125 -0
  392. package/src/sources/cypher/flatten.ts +323 -0
  393. package/src/sources/cypher/index.ts +498 -0
  394. package/src/sources/cypher/params.ts +41 -0
  395. package/src/sources/cypher/profiles.ts +78 -0
  396. package/src/sources/cypher/query-builder.ts +294 -0
  397. package/src/sources/cypher/transports/bolt.ts +228 -0
  398. package/src/sources/cypher/transports/neptune-analytics.ts +41 -0
  399. package/src/sources/cypher/transports/neptune-https.ts +122 -0
  400. package/src/sources/cypher/transports/query-api.ts +100 -0
  401. package/src/sources/cypher/transports/transport.ts +139 -0
  402. package/src/sources/cypher/types-map.ts +418 -0
  403. package/src/sources/define.ts +195 -0
  404. package/src/sources/fail.ts +70 -0
  405. package/src/sources/ids.ts +74 -0
  406. package/src/sources/ndex/client.ts +102 -0
  407. package/src/sources/ndex/descriptor.ts +64 -0
  408. package/src/sources/ndex/expand.ts +100 -0
  409. package/src/sources/ndex/index.ts +235 -0
  410. package/src/sources/ndex/params.ts +17 -0
  411. package/src/sources/ndex/share-url.ts +84 -0
  412. package/src/sources/params.ts +29 -0
  413. package/src/sources/registry.ts +325 -0
  414. package/src/sources/rest/descriptor.ts +74 -0
  415. package/src/sources/rest/index.ts +22 -0
  416. package/src/sources/rest/mapping.ts +401 -0
  417. package/src/sources/rest/openalex.ts +288 -0
  418. package/src/sources/rest/paging.ts +180 -0
  419. package/src/sources/rest/params.ts +243 -0
  420. package/src/sources/rest/records.ts +289 -0
  421. package/src/sources/rest/samples/deps-dev.ts +49 -0
  422. package/src/sources/rest/samples/string.ts +44 -0
  423. package/src/sources/rest/selectors.ts +91 -0
  424. package/src/sources/rest/source.ts +760 -0
  425. package/src/sources/rest/templates.ts +151 -0
  426. package/src/sources/run.ts +793 -0
  427. package/src/sources/sha256.ts +99 -0
  428. package/src/sources/sigv4.ts +207 -0
  429. package/src/sources/testing.ts +210 -0
  430. package/src/sources/types.ts +741 -0
  431. package/src/styles/canon/enums.ts +1 -0
  432. package/src/styles/cyjs/cascade.ts +81 -2
  433. package/src/styles/cyjs/defaults-table.ts +2 -0
  434. package/src/styles/cyjs/emit.ts +18 -7
  435. package/src/styles/cyjs/mappers.ts +6 -1
  436. package/src/styles/cytoscape/emit.ts +61 -7
  437. package/src/styles/cytoscape/lexicon.ts +28 -2
  438. package/src/styles/cytoscape/resolve.ts +22 -6
  439. package/src/styles/cytoscape/translate.ts +11 -11
  440. package/src/styles/defaults.ts +93 -4
  441. package/src/styles/io/block.ts +10 -0
  442. package/src/styles/io/writer.ts +8 -3
  443. package/src/styles/plan/resolve.ts +14 -2
  444. package/src/styles/types.ts +28 -2
  445. package/src/styles/vocabulary.ts +15 -1
  446. package/src/types.ts +19 -5
  447. package/dist/chunks/block-DiGq58c3.js.map +0 -1
  448. package/dist/chunks/emit-CwU8cUmG.js.map +0 -1
  449. package/dist/chunks/export-BvqAXCKh.js.map +0 -1
  450. package/dist/chunks/format-BpQBx8MZ.js.map +0 -1
  451. package/dist/chunks/importer-BSvfrX_h.js.map +0 -1
  452. package/dist/chunks/importer-CMmeMWlC.js.map +0 -1
  453. package/dist/chunks/importer-COTK9Tsl.js.map +0 -1
  454. package/dist/chunks/importer-DiZRmOQG.js.map +0 -1
  455. package/dist/chunks/importer-e6LGpqHB.js.map +0 -1
  456. package/dist/chunks/lexicon-CT69Kd87.js.map +0 -1
  457. package/dist/chunks/styles-BQnsga7p.js.map +0 -1
  458. package/dist/chunks/styles-D3fRphrO.js.map +0 -1
  459. package/dist/chunks/styles-yed-BF5x3_Y5.js.map +0 -1
  460. package/dist/chunks/writer-DMKvthQE.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openalex.js","sourceRoot":"","sources":["../../../../src/sources/rest/openalex.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAmC,MAAM,aAAa,CAAC;AAE3E,+CAA+C;AAC/C,MAAM,MAAM,GAAG,uBAAuB,CAAC;AAEvC,mDAAmD;AACnD,MAAM,WAAW,GAAG,+EAA+E,CAAC;AAEpG;;;;;;GAMG;AACH,SAAS,KAAK,CAAC,MAAc,EAAE,OAAe,EAAE,KAAc;IAC1D,OAAO;QACH,IAAI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in the body. A position is a string or a number, so it fits a SourceCursor;
4
+ * a position that is a URL is checked against the mapping's origin before it is followed.
5
+ */
6
+ import { type ImportReportBuilder } from "../../common/report.js";
7
+ import { type RestPaging } from "./params.js";
8
+ /** Where a paged request is: the first page (null), a cursor or offset, or a full URL. */
9
+ export type PagePosition = string | number | null;
10
+ /**
11
+ * The URL of a page.
12
+ * @param url - the request's first-page URL
13
+ * @param paging - the request's paging
14
+ * @param position - where to read
15
+ * @param endpoint - the mapping's endpoint, which a full URL must stay on
16
+ * @param report - the load's report
17
+ * @returns the page's URL
18
+ */
19
+ export declare function pageUrl(url: URL, paging: RestPaging | undefined, position: PagePosition, endpoint: URL, report: ImportReportBuilder): URL;
20
+ /**
21
+ * The first page's URL with its paging parameters, so an offset request carries its size.
22
+ * @param url - the request's URL
23
+ * @param paging - the request's paging
24
+ * @param endpoint - the mapping's endpoint
25
+ * @param report - the load's report
26
+ * @returns the URL
27
+ */
28
+ export declare function firstPageUrl(url: URL, paging: RestPaging | undefined, endpoint: URL, report: ImportReportBuilder): URL;
29
+ /** What `nextPosition` reads. */
30
+ interface PageResponse {
31
+ /** The parsed body. */
32
+ readonly body: unknown;
33
+ /** The response headers. */
34
+ readonly headers: Headers;
35
+ /** The URL the page was read from. */
36
+ readonly url: URL;
37
+ /** How many records the page held. */
38
+ readonly records: number;
39
+ /** Where the load runs: a missing Link header in a browser may be one the service hides. */
40
+ readonly runtime: string;
41
+ }
42
+ /**
43
+ * Where the next page is, or null after the last one.
44
+ * @param paging - the request's paging
45
+ * @param position - this page's position
46
+ * @param page - this page's response
47
+ * @param endpoint - the mapping's endpoint
48
+ * @param report - the load's report
49
+ * @returns the next position
50
+ */
51
+ export declare function nextPosition(paging: RestPaging | undefined, position: PagePosition, page: PageResponse, endpoint: URL, report: ImportReportBuilder): PagePosition;
52
+ export {};
53
+ //# sourceMappingURL=paging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paging.d.ts","sourceRoot":"","sources":["../../../../src/sources/rest/paging.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAI9C,0FAA0F;AAC1F,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAkBlD;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CACnB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,mBAAmB,GAC5B,GAAG,CAiBL;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CACxB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,mBAAmB,GAC5B,GAAG,CAEL;AAsBD,iCAAiC;AACjC,UAAU,YAAY;IAClB,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,4BAA4B;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,sCAAsC;IACtC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AA0BD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CACxB,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,mBAAmB,GAC5B,YAAY,CAwBd"}
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Paging of the REST mapping (design section 13.2): a cursor in the body, an offset, the `Link`
3
+ * header, or a next URL in the body. A position is a string or a number, so it fits a SourceCursor;
4
+ * a position that is a URL is checked against the mapping's origin before it is followed.
5
+ */
6
+ import { failOn } from "../fail.js";
7
+ import { selectOne } from "./selectors.js";
8
+ import { checkOrigin } from "./templates.js";
9
+ /**
10
+ * The position of the first page.
11
+ * @param paging - the request's paging
12
+ * @returns the position
13
+ */
14
+ function firstPosition(paging) {
15
+ switch (paging?.style) {
16
+ case "cursor":
17
+ return paging.first;
18
+ case "offset":
19
+ return paging.base ?? 0;
20
+ default:
21
+ return null;
22
+ }
23
+ }
24
+ /**
25
+ * The URL of a page.
26
+ * @param url - the request's first-page URL
27
+ * @param paging - the request's paging
28
+ * @param position - where to read
29
+ * @param endpoint - the mapping's endpoint, which a full URL must stay on
30
+ * @param report - the load's report
31
+ * @returns the page's URL
32
+ */
33
+ export function pageUrl(url, paging, position, endpoint, report) {
34
+ if (position === null) {
35
+ return url;
36
+ }
37
+ const out = new URL(url);
38
+ switch (paging?.style) {
39
+ case "cursor":
40
+ out.searchParams.set(paging.param, String(position));
41
+ return out;
42
+ case "offset":
43
+ out.searchParams.set(paging.param, String(position));
44
+ out.searchParams.set(paging.size.param, String(paging.size.value));
45
+ return out;
46
+ default:
47
+ // link-header and next-url positions are full URLs from a response (or a recorded cursor)
48
+ return checkOrigin(new URL(String(position), url), endpoint, report);
49
+ }
50
+ }
51
+ /**
52
+ * The first page's URL with its paging parameters, so an offset request carries its size.
53
+ * @param url - the request's URL
54
+ * @param paging - the request's paging
55
+ * @param endpoint - the mapping's endpoint
56
+ * @param report - the load's report
57
+ * @returns the URL
58
+ */
59
+ export function firstPageUrl(url, paging, endpoint, report) {
60
+ return pageUrl(url, paging, firstPosition(paging), endpoint, report);
61
+ }
62
+ /**
63
+ * The `rel` URL of a Link header.
64
+ * @param header - the header's value
65
+ * @param rel - the relation
66
+ * @returns the URL text, or null
67
+ */
68
+ function linkOf(header, rel) {
69
+ for (const part of header.split(/,(?=\s*<)/)) {
70
+ const m = /^\s*<([^>]*)>(.*)$/.exec(part);
71
+ if (m === null) {
72
+ continue;
73
+ }
74
+ const rels = /;\s*rel="?([^";]+)"?/i.exec(m[2]);
75
+ if (rels?.[1].split(/\s+/).includes(rel)) {
76
+ return m[1];
77
+ }
78
+ }
79
+ return null;
80
+ }
81
+ /**
82
+ * The next page's URL from the Link header, or null after the last one.
83
+ * @param rel - the relation that names the next page
84
+ * @param page - this page's response
85
+ * @param endpoint - the mapping's endpoint
86
+ * @param report - the load's report
87
+ * @returns the next position
88
+ */
89
+ function nextLink(rel, page, endpoint, report) {
90
+ const header = page.headers.get("link");
91
+ if (header === null) {
92
+ if (page.runtime === "browser") {
93
+ // a browser reads Link only when the service exposes it: never a silent single page
94
+ failOn(report, "E_SOURCE_RESPONSE", "the Link header cannot be read", {
95
+ expected: "link-header",
96
+ contentType: page.headers.get("content-type"),
97
+ });
98
+ }
99
+ return null;
100
+ }
101
+ const next = linkOf(header, rel);
102
+ return next === null ? null : checkOrigin(new URL(next, page.url), endpoint, report).href;
103
+ }
104
+ /**
105
+ * Where the next page is, or null after the last one.
106
+ * @param paging - the request's paging
107
+ * @param position - this page's position
108
+ * @param page - this page's response
109
+ * @param endpoint - the mapping's endpoint
110
+ * @param report - the load's report
111
+ * @returns the next position
112
+ */
113
+ export function nextPosition(paging, position, page, endpoint, report) {
114
+ switch (paging?.style) {
115
+ case "cursor": {
116
+ const next = selectOne(page.body, paging.next);
117
+ return (typeof next === "string" && next !== "") || typeof next === "number" ? next : null;
118
+ }
119
+ case "offset": {
120
+ if (page.records < paging.size.value || page.records === 0) {
121
+ return null;
122
+ }
123
+ const step = paging.unit === "pages" ? 1 : paging.size.value;
124
+ return Number(position) + step;
125
+ }
126
+ case "link-header":
127
+ return nextLink(paging.rel ?? "next", page, endpoint, report);
128
+ case "next-url": {
129
+ const next = selectOne(page.body, paging.next);
130
+ return typeof next === "string" && next !== ""
131
+ ? checkOrigin(new URL(next, page.url), endpoint, report).href
132
+ : null;
133
+ }
134
+ default:
135
+ return null;
136
+ }
137
+ }
138
+ //# sourceMappingURL=paging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paging.js","sourceRoot":"","sources":["../../../../src/sources/rest/paging.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C;;;;GAIG;AACH,SAAS,aAAa,CAAC,MAA8B;IACjD,QAAQ,MAAM,EAAE,KAAK,EAAE,CAAC;QACpB,KAAK,QAAQ;YACT,OAAO,MAAM,CAAC,KAAK,CAAC;QACxB,KAAK,QAAQ;YACT,OAAO,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;QAC5B;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CACnB,GAAQ,EACR,MAA8B,EAC9B,QAAsB,EACtB,QAAa,EACb,MAA2B;IAE3B,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,GAAG,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,QAAQ,MAAM,EAAE,KAAK,EAAE,CAAC;QACpB,KAAK,QAAQ;YACT,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrD,OAAO,GAAG,CAAC;QACf,KAAK,QAAQ;YACT,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrD,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,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,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YAC7D,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,KAAK,aAAa;YACd,OAAO,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAClE,KAAK,UAAU,CAAC,CAAC,CAAC;YACd,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;YAC/C,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE;gBAC1C,CAAC,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,IAAI;gBAC7D,CAAC,CAAC,IAAI,CAAC;QACf,CAAC;QACD;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC"}
@@ -0,0 +1,216 @@
1
+ /**
2
+ * The REST mapping format and the parameters of the `rest` source and its `openalex` preset (design
3
+ * sections 13.2 and 13.3). Experimental: the mapping carries `version: 1`. The REST work may add
4
+ * optional fields only.
5
+ */
6
+ import { type SourceParamDescriptor } from "../types.js";
7
+ /**
8
+ * How a paged request moves to its next page. Experimental.
9
+ * @category Network sources
10
+ */
11
+ export type RestPaging = {
12
+ /** The paging style. */
13
+ readonly style: "cursor";
14
+ /** The query parameter that carries the position. */
15
+ readonly param: string;
16
+ /** The position of the first page. */
17
+ readonly first: string;
18
+ /** The selector of the next position in the body. */
19
+ readonly next: string;
20
+ } | {
21
+ /** The paging style. */
22
+ readonly style: "offset";
23
+ /** The query parameter that carries the position. */
24
+ readonly param: string;
25
+ /** The page size and its query parameter. */
26
+ readonly size: {
27
+ /** The query parameter that carries the page size. */
28
+ readonly param: string;
29
+ /** The page size. */
30
+ readonly value: number;
31
+ };
32
+ /** Whether the offset counts items or pages. */
33
+ readonly unit?: "items" | "pages" | undefined;
34
+ /** The first offset. */
35
+ readonly base?: 0 | 1 | undefined;
36
+ } | {
37
+ /** The paging style. */
38
+ readonly style: "link-header";
39
+ /** The link relation of the next page. */
40
+ readonly rel?: string | undefined;
41
+ } | {
42
+ /** The paging style. */
43
+ readonly style: "next-url";
44
+ /** The selector of the next position in the body. */
45
+ readonly next: string;
46
+ };
47
+ /**
48
+ * One named request of a mapping. Experimental.
49
+ * @category Network sources
50
+ */
51
+ export interface RestRequest {
52
+ /** GET (default) or POST. */
53
+ readonly method?: "GET" | "POST" | undefined;
54
+ /** A path template: "/works/{id}". */
55
+ readonly path: string;
56
+ /** Query templates: `{ filter: "cites:{work}" }`. */
57
+ readonly query?: Readonly<Record<string, string>> | undefined;
58
+ /** A POST body; templates in string leaves. */
59
+ readonly body?: unknown;
60
+ /** The selector of the record array, "." for one record. */
61
+ readonly records: string;
62
+ /** Which entity the records are. */
63
+ readonly entity: string;
64
+ /** How it pages. */
65
+ readonly paging?: RestPaging | undefined;
66
+ /** `{ids}` holds up to `max` ids joined by `join`. */
67
+ readonly batch?: {
68
+ /** At most this many ids per request. */
69
+ readonly max: number;
70
+ /** What joins the ids. */
71
+ readonly join: string;
72
+ } | undefined;
73
+ }
74
+ /**
75
+ * One rule that makes edges from a record. Experimental.
76
+ * @category Network sources
77
+ */
78
+ export type RestEdgeRule = {
79
+ /** A selector the rule repeats over. */
80
+ readonly each?: string | undefined;
81
+ /** The selector of the edge's source; the record's id by default. */
82
+ readonly from?: string | undefined;
83
+ /** The selector of the edge's target ids. */
84
+ readonly to: string;
85
+ /** The edge type. */
86
+ readonly type: string;
87
+ /** The entity the target or record is. */
88
+ readonly entity?: string | undefined;
89
+ /** Attribute name to selector. */
90
+ readonly fields?: Readonly<Record<string, string>> | undefined;
91
+ } | {
92
+ /** A selector the rule repeats over. */
93
+ readonly each?: string | undefined;
94
+ /** A selector of ids joined pairwise, undirected. */
95
+ readonly pairs: string;
96
+ /** The edge type. */
97
+ readonly type: string;
98
+ /** The entity the ids are, for its `stripPrefix` and for stubs; the record's own by default. */
99
+ readonly entity?: string | undefined;
100
+ };
101
+ /**
102
+ * How records of one kind become nodes and edges. Experimental.
103
+ * @category Network sources
104
+ */
105
+ export interface RestEntity {
106
+ /** The id selector within the record; `#` is the record's position in its array. */
107
+ readonly id: string;
108
+ /**
109
+ * false: the records are containers, not nodes; only their edge rules and embedded records
110
+ * count (a body holding a node array and an edge array).
111
+ */
112
+ readonly node?: false | undefined;
113
+ /** The node label; the entity's name by default. */
114
+ readonly label?: string | undefined;
115
+ /** A prefix stripped from ids ("https://openalex.org/"). */
116
+ readonly stripPrefix?: string | undefined;
117
+ /** Attribute name to selector; without it every top-level scalar is kept. */
118
+ readonly fields?: Readonly<Record<string, string>> | undefined;
119
+ /** The edge rules. */
120
+ readonly edges?: readonly RestEdgeRule[] | undefined;
121
+ /** Nested records that are nodes of their own entity. */
122
+ readonly embedded?: readonly {
123
+ /** The selector of the nested records. */
124
+ readonly at: string;
125
+ /** The entity the target or record is. */
126
+ readonly entity: string;
127
+ }[] | undefined;
128
+ }
129
+ /**
130
+ * A declarative mapping from a REST API to a graph, as JSON data. Experimental.
131
+ * @category Network sources
132
+ */
133
+ export interface RestMapping {
134
+ /** The format version. */
135
+ readonly version: 1;
136
+ /** Every request must stay on this origin. */
137
+ readonly endpoint: string;
138
+ /** The named requests. */
139
+ readonly requests: Readonly<Record<string, RestRequest>>;
140
+ /** How records become nodes and edges. */
141
+ readonly entities: Readonly<Record<string, RestEntity>>;
142
+ /** The request a load runs. */
143
+ readonly load: string;
144
+ /** The request an expansion runs per batch of seeds. */
145
+ readonly expand?: string | {
146
+ /** The request for incoming edges. */
147
+ readonly in?: string | undefined;
148
+ /** The request for outgoing edges. */
149
+ readonly out?: string | undefined;
150
+ } | undefined;
151
+ /** The request that fetches stub nodes' full records (an expansion of depth 0). */
152
+ readonly hydrate?: string | undefined;
153
+ /** A request run once before the load, for the seeds' own records. */
154
+ readonly seed?: string | undefined;
155
+ /** Whether the graph is directed; the builder's default when absent. */
156
+ readonly directed?: boolean | undefined;
157
+ /**
158
+ * The selector of a record's modification time (ISO-8601). The newest one loaded becomes
159
+ * `report.source.validators.modified`, which `validateSource` compares against.
160
+ */
161
+ readonly modified?: string | undefined;
162
+ /** What credential a form should ask for. */
163
+ readonly auth?: {
164
+ /** The credential kind. */
165
+ readonly kind: "bearer";
166
+ } | {
167
+ /** The credential kind. */
168
+ readonly kind: "api-key";
169
+ /** The request header the key goes in. */
170
+ readonly header?: string | undefined;
171
+ /** The query parameter the key goes in. */
172
+ readonly query?: string | undefined;
173
+ } | undefined;
174
+ /** Paces requests. */
175
+ readonly rateLimit?: {
176
+ /** At most this many requests per period. */
177
+ readonly requests: number;
178
+ /** The period, in milliseconds. */
179
+ readonly perMs: number;
180
+ /** At most this many requests at once. */
181
+ readonly concurrent?: number;
182
+ } | undefined;
183
+ /** Response headers telling what budget is left. */
184
+ readonly budgetHeaders?: {
185
+ /** What the service says is left. */
186
+ readonly remaining: string;
187
+ /** The header naming when the budget resets. */
188
+ readonly reset?: string | undefined;
189
+ } | undefined;
190
+ /** What a form asks for. */
191
+ readonly params?: readonly SourceParamDescriptor[] | undefined;
192
+ }
193
+ /**
194
+ * The params of the generic `rest` source: the mapping and the values its templates use.
195
+ * Experimental.
196
+ * @category Network sources
197
+ */
198
+ export type RestParams = {
199
+ /** The mapping. */
200
+ readonly mapping: RestMapping;
201
+ } & Readonly<Record<string, unknown>>;
202
+ /**
203
+ * The params of the `openalex` preset. Experimental.
204
+ * @category Network sources
205
+ */
206
+ export interface OpenAlexParams {
207
+ /** The seed work ("W2112090702"). */
208
+ readonly work?: string | undefined;
209
+ /** The seed author. */
210
+ readonly author?: string | undefined;
211
+ /** "citation" (default) or "coauthorship". */
212
+ readonly graph?: "citation" | "coauthorship" | undefined;
213
+ /** What else becomes nodes, as a list or a comma-separated string. @defaultValue [] */
214
+ readonly include?: readonly ("authors" | "institutions" | "topics")[] | string | undefined;
215
+ }
216
+ //# sourceMappingURL=params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../../src/sources/rest/params.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAChB;IACI,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB,GACD;IACI,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,EAAE;QACX,sDAAsD;QACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,qBAAqB;QACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,gDAAgD;IAChD,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9C,wBAAwB;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;CACrC,GACD;IACI,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,0CAA0C;IAC1C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,GACD;IACI,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,qDAAqD;I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(design
3
+ * sections 13.2 and 13.3). Experimental: the mapping carries `version: 1`. The REST work may add
4
+ * optional fields only.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.js","sourceRoot":"","sources":["../../../../src/sources/rest/params.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Turning a REST API's records into nodes and edges (design section 13.2): each record of an
3
+ * entity is a node, each edge rule makes edges, a target with no record yet becomes a stub, and
4
+ * embedded records are nodes of their own entity. A stub never overwrites a full record.
5
+ */
6
+ import { type EdgeRecord, type NodeRecord } from "../types.js";
7
+ import { type RestMapping } from "./params.js";
8
+ /** What one load or expansion knows about the ids it wrote, across its pages. */
9
+ export interface RecordState {
10
+ /** Ids written with a full record. */
11
+ readonly full: Set<string>;
12
+ /** Ids written as stubs. */
13
+ readonly stubs: Set<string>;
14
+ /** Ids the caller already holds (an expansion's seeds and `exclude`): never stubbed. */
15
+ readonly known: ReadonlySet<string>;
16
+ /** The newest modification time seen, for the validators. */
17
+ modified: string | null;
18
+ }
19
+ /** The nodes and edges of one page. */
20
+ export interface PageRecords {
21
+ readonly nodes: NodeRecord[];
22
+ readonly edges: EdgeRecord[];
23
+ }
24
+ /**
25
+ * A fresh state.
26
+ * @param known - ids the caller holds already
27
+ * @returns the state
28
+ */
29
+ export declare function newState(known?: Iterable<string>): RecordState;
30
+ /**
31
+ * The nodes and edges of one page of records.
32
+ * @param mapping - the mapping
33
+ * @param groups - the page's records, by entity (a seed's records first)
34
+ * @param state - the load's state, updated
35
+ * @returns the nodes and edges
36
+ */
37
+ export declare function toRecords(mapping: RestMapping, groups: readonly {
38
+ readonly records: readonly unknown[];
39
+ readonly entity: string;
40
+ }[], state: RecordState): PageRecords;
41
+ //# sourceMappingURL=records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../../src/sources/rest/records.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAGnF,iFAAiF;AACjF,MAAM,WAAW,WAAW;IACxB,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,4BAA4B;IAC5B,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,wFAAwF;IACxF,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,uCAAuC;AACvC,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,GAAE,QAAQ,CAAC,MAAM,CAAM,GAAG,WAAW,CAElE;AA2OD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACrB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,SAAS;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,EACpF,KAAK,EAAE,WAAW,GACnB,WAAW,CAMb"}