@lustre/sdk 2.0.5-dev.5 → 2.0.6-dev.1

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 (305) hide show
  1. package/dist/api/FetchOptions.js +2 -2
  2. package/dist/api/QueryError.js +54 -54
  3. package/dist/api/QueryResolver.js +98 -98
  4. package/dist/api/WrappedQuery.js +2 -2
  5. package/dist/api/fast1a64utf.js +135 -135
  6. package/dist/api/fetchEntity.js +41 -41
  7. package/dist/api/fetchQuery.js +31 -31
  8. package/dist/api/getHash.js +27 -27
  9. package/dist/api/getQueryHash.js +9 -9
  10. package/dist/index.js +39 -39
  11. package/dist/schema/builtins.js +433 -433
  12. package/dist/schema/entities/alias.js +2 -2
  13. package/dist/schema/entities/brand.js +2 -2
  14. package/dist/schema/entities/category.js +2 -2
  15. package/dist/schema/entities/crawl.js +2 -2
  16. package/dist/schema/entities/index.js +29 -29
  17. package/dist/schema/entities/media.js +2 -2
  18. package/dist/schema/entities/offer.js +2 -2
  19. package/dist/schema/entities/productConfiguration.js +2 -2
  20. package/dist/schema/entities/productFamily.js +2 -2
  21. package/dist/schema/entities/productGeneration.js +2 -2
  22. package/dist/schema/entities/productType.js +2 -2
  23. package/dist/schema/entities/rating.js +2 -2
  24. package/dist/schema/entities/source.js +2 -2
  25. package/dist/schema/entities/spec.js +2 -2
  26. package/dist/schema/entities/specType.js +2 -2
  27. package/dist/schema/entities/specTypeChoice.js +2 -2
  28. package/dist/schema/entities/storePage.js +2 -2
  29. package/dist/schema/entities/storePageQueueGroup.js +2 -2
  30. package/dist/schema/entities/user.js +2 -2
  31. package/dist/schema/index.js +29 -29
  32. package/dist/schema/mutations/createBrand.js +2 -2
  33. package/dist/schema/mutations/createCategory.js +2 -2
  34. package/dist/schema/mutations/createProductConfiguration.js +2 -2
  35. package/dist/schema/mutations/createProductFamily.js +2 -2
  36. package/dist/schema/mutations/createProductGeneration.js +2 -2
  37. package/dist/schema/mutations/createProductType.js +2 -2
  38. package/dist/schema/mutations/createUser.js +2 -2
  39. package/dist/schema/mutations/storePageQueueClaimById.js +2 -2
  40. package/dist/schema/mutations/storePageQueueClaimNext.js +2 -2
  41. package/dist/schema/mutations/storePageQueueHandle.js +2 -2
  42. package/dist/schema/mutations/storePageQueueHandleStorePageIdSet.js +2 -2
  43. package/dist/schema/mutations/updateAlias.js +2 -2
  44. package/dist/schema/mutations/updateBrand.js +2 -2
  45. package/dist/schema/mutations/updateCategory.js +2 -2
  46. package/dist/schema/mutations/updateOffer.js +2 -2
  47. package/dist/schema/mutations/updateProductConfiguration.js +2 -2
  48. package/dist/schema/mutations/updateProductConfigurationProductType.js +2 -2
  49. package/dist/schema/mutations/updateProductFamily.js +2 -2
  50. package/dist/schema/mutations/updateProductFamilyBrand.js +2 -2
  51. package/dist/schema/mutations/updateProductGeneration.js +2 -2
  52. package/dist/schema/mutations/updateProductGenerationProductFamily.js +2 -2
  53. package/dist/schema/mutations/updateProductType.js +2 -2
  54. package/dist/schema/mutations/updateProductTypeProductGeneration.js +2 -2
  55. package/dist/schema/mutations/updateSource.js +2 -2
  56. package/dist/schema/mutations/updateStorePage.js +2 -2
  57. package/dist/schema/queries/affiliateLink.js +2 -2
  58. package/dist/schema/queries/affiliateUrl.js +2 -2
  59. package/dist/schema/queries/aliasIdListBySomeId.js +2 -2
  60. package/dist/schema/queries/analyticsTrack.js +2 -2
  61. package/dist/schema/queries/appliedCategoryIdListBySomeId.js +2 -2
  62. package/dist/schema/queries/baseScore.js +2 -2
  63. package/dist/schema/queries/baseScoreRatingIdList.js +2 -2
  64. package/dist/schema/queries/baseScoresByCategoryId.js +2 -2
  65. package/dist/schema/queries/bestInClass.js +2 -2
  66. package/dist/schema/queries/brandAliasResolution.js +2 -2
  67. package/dist/schema/queries/brandCategoryRankings.js +2 -2
  68. package/dist/schema/queries/brandIdBySomeId.js +2 -2
  69. package/dist/schema/queries/brandIdList.js +2 -2
  70. package/dist/schema/queries/brandIdListBySearch.js +2 -2
  71. package/dist/schema/queries/brandSocialMediaPostList.js +2 -2
  72. package/dist/schema/queries/categoryAliasResolution.js +2 -2
  73. package/dist/schema/queries/categoryDisplayMode.js +2 -2
  74. package/dist/schema/queries/categoryIdByUrlSlug.js +2 -2
  75. package/dist/schema/queries/categoryIdList.js +2 -2
  76. package/dist/schema/queries/categoryIdListBySomeId.js +2 -2
  77. package/dist/schema/queries/categoryIdListBySourceId.js +2 -2
  78. package/dist/schema/queries/categoryModifierSearchList.js +2 -2
  79. package/dist/schema/queries/categoryRankings.js +2 -2
  80. package/dist/schema/queries/categorySearchList.js +2 -2
  81. package/dist/schema/queries/categoryStatusList.js +2 -2
  82. package/dist/schema/queries/competitorsAnalysis.js +2 -2
  83. package/dist/schema/queries/crawlIdList.js +2 -2
  84. package/dist/schema/queries/crawlIdListByUrl.js +2 -2
  85. package/dist/schema/queries/descriptionMarkdown.js +2 -2
  86. package/dist/schema/queries/domainAnalysis.js +2 -2
  87. package/dist/schema/queries/domainSupport.js +2 -2
  88. package/dist/schema/queries/entityType.js +2 -2
  89. package/dist/schema/queries/fallbackPriceByProductTypeId.js +2 -2
  90. package/dist/schema/queries/inputLayerVersion.js +2 -2
  91. package/dist/schema/queries/latestRatingIdList.js +2 -2
  92. package/dist/schema/queries/latestRatingIdListBySomeId.js +2 -2
  93. package/dist/schema/queries/mediaIdListBySomeId.js +2 -2
  94. package/dist/schema/queries/mlCategoryDisplayMode.js +2 -2
  95. package/dist/schema/queries/noteMarkdown.js +2 -2
  96. package/dist/schema/queries/offerIdListByStorePageId.js +2 -2
  97. package/dist/schema/queries/possibleAliasIdListBySomeId.js +2 -2
  98. package/dist/schema/queries/possibleStorePageIdListBySomeId.js +2 -2
  99. package/dist/schema/queries/preferredCategoryIdListByProductId.js +2 -2
  100. package/dist/schema/queries/preferredLatestRatingIdListBySomeId.js +2 -2
  101. package/dist/schema/queries/preferredStorePageList.js +2 -2
  102. package/dist/schema/queries/priceHistoryLookup.js +2 -2
  103. package/dist/schema/queries/pricePointCompetitors.js +2 -2
  104. package/dist/schema/queries/priceRangeByCategoryId.js +2 -2
  105. package/dist/schema/queries/productConfigurationIdListBySomeId.js +2 -2
  106. package/dist/schema/queries/productDealList.js +2 -2
  107. package/dist/schema/queries/productDocumentByStoreUrl.js +2 -2
  108. package/dist/schema/queries/productDocumentsByProductIds.js +2 -2
  109. package/dist/schema/queries/productFamilyIdBySomeId.js +2 -2
  110. package/dist/schema/queries/productFamilyIdListBySomeId.js +2 -2
  111. package/dist/schema/queries/productGenerationIdBySomeId.js +2 -2
  112. package/dist/schema/queries/productGenerationIdListBySomeId.js +2 -2
  113. package/dist/schema/queries/productListSort.js +2 -2
  114. package/dist/schema/queries/productPricePointList.js +2 -2
  115. package/dist/schema/queries/productSearchList.js +2 -2
  116. package/dist/schema/queries/productTypeIdBySomeId.js +2 -2
  117. package/dist/schema/queries/productTypeIdByStoreUrl.js +2 -2
  118. package/dist/schema/queries/productTypeIdListByCategoryId.js +2 -2
  119. package/dist/schema/queries/productTypeIdListByModifiers.js +2 -2
  120. package/dist/schema/queries/productTypeIdListBySomeId.js +2 -2
  121. package/dist/schema/queries/saleMetrics.js +2 -2
  122. package/dist/schema/queries/searchSuggestionList.js +2 -2
  123. package/dist/schema/queries/sectionDataByCrawlId.js +2 -2
  124. package/dist/schema/queries/sourceIdList.js +2 -2
  125. package/dist/schema/queries/specIdListBySomeId.js +2 -2
  126. package/dist/schema/queries/specTypeIdList.js +2 -2
  127. package/dist/schema/queries/specTypeValidValues.js +2 -2
  128. package/dist/schema/queries/specValueRangeListByCategoryId.js +2 -2
  129. package/dist/schema/queries/stablePriceByProductId.js +2 -2
  130. package/dist/schema/queries/stablePriceByProductIdAndStoreName.js +2 -2
  131. package/dist/schema/queries/stablePriceByStorePageId.js +2 -2
  132. package/dist/schema/queries/storePageFetchData.js +2 -2
  133. package/dist/schema/queries/storePageIdByUrl.js +2 -2
  134. package/dist/schema/queries/storePageIdListBySomeId.js +2 -2
  135. package/dist/schema/queries/storePageInfo.js +2 -2
  136. package/dist/schema/queries/storePageInfoBySku.js +2 -2
  137. package/dist/schema/queries/storePageScrapeData.js +2 -2
  138. package/dist/schema/queries/subCategoryIdListByCategoryId.js +2 -2
  139. package/dist/schema/queries/subsetModifierDataByModifiers.js +2 -2
  140. package/dist/schema/queries/topProductDocumentList.js +2 -2
  141. package/dist/schema/queries/unstableMediaIdListByCategoryId.js +2 -2
  142. package/dist/schema/queries/unstableSourceTrust.js +2 -2
  143. package/dist/schema/queries/unstableUpdatableResponseTest.js +3 -0
  144. package/dist/schema/queries/unstableUpdatableResponseTest.js.map +1 -0
  145. package/dist/schema/queries/userIdList.js +2 -2
  146. package/dist/schema/queries/userPermissionsByUserId.js +2 -2
  147. package/dist/schema/queries/userRestictedData.js +2 -2
  148. package/dist/schema/queries/userReviewAnalysis.js +2 -2
  149. package/dist/schema/queries/whoAmI.js +2 -2
  150. package/dist/schema/queries.js +2 -2
  151. package/dist/schema/responses.js +2 -2
  152. package/package.json +1 -1
  153. package/types/api/FetchOptions.d.ts +5 -5
  154. package/types/api/QueryError.d.ts +29 -29
  155. package/types/api/QueryResolver.d.ts +31 -31
  156. package/types/api/WrappedQuery.d.ts +8 -8
  157. package/types/api/fast1a64utf.d.ts +2 -2
  158. package/types/api/fetchEntity.d.ts +6 -6
  159. package/types/api/fetchQuery.d.ts +6 -6
  160. package/types/api/getHash.d.ts +6 -6
  161. package/types/api/getQueryHash.d.ts +2 -2
  162. package/types/index.d.ts +10 -10
  163. package/types/schema/builtins.d.ts +155 -123
  164. package/types/schema/builtins.d.ts.map +1 -1
  165. package/types/schema/entities/alias.d.ts +5 -5
  166. package/types/schema/entities/brand.d.ts +4 -4
  167. package/types/schema/entities/category.d.ts +6 -6
  168. package/types/schema/entities/crawl.d.ts +11 -11
  169. package/types/schema/entities/index.d.ts +17 -17
  170. package/types/schema/entities/media.d.ts +5 -5
  171. package/types/schema/entities/offer.d.ts +10 -10
  172. package/types/schema/entities/productConfiguration.d.ts +4 -4
  173. package/types/schema/entities/productFamily.d.ts +4 -4
  174. package/types/schema/entities/productGeneration.d.ts +4 -4
  175. package/types/schema/entities/productType.d.ts +4 -4
  176. package/types/schema/entities/rating.d.ts +52 -52
  177. package/types/schema/entities/source.d.ts +7 -7
  178. package/types/schema/entities/spec.d.ts +21 -21
  179. package/types/schema/entities/specType.d.ts +5 -5
  180. package/types/schema/entities/specTypeChoice.d.ts +6 -6
  181. package/types/schema/entities/storePage.d.ts +7 -7
  182. package/types/schema/entities/storePageQueueGroup.d.ts +5 -5
  183. package/types/schema/entities/user.d.ts +4 -4
  184. package/types/schema/index.d.ts +267 -267
  185. package/types/schema/mutations/createBrand.d.ts +8 -8
  186. package/types/schema/mutations/createCategory.d.ts +8 -8
  187. package/types/schema/mutations/createProductConfiguration.d.ts +9 -9
  188. package/types/schema/mutations/createProductFamily.d.ts +9 -9
  189. package/types/schema/mutations/createProductGeneration.d.ts +9 -9
  190. package/types/schema/mutations/createProductType.d.ts +9 -9
  191. package/types/schema/mutations/createUser.d.ts +9 -9
  192. package/types/schema/mutations/storePageQueueClaimById.d.ts +16 -16
  193. package/types/schema/mutations/storePageQueueClaimNext.d.ts +14 -14
  194. package/types/schema/mutations/storePageQueueHandle.d.ts +14 -14
  195. package/types/schema/mutations/storePageQueueHandleStorePageIdSet.d.ts +14 -14
  196. package/types/schema/mutations/updateAlias.d.ts +7 -7
  197. package/types/schema/mutations/updateBrand.d.ts +7 -7
  198. package/types/schema/mutations/updateCategory.d.ts +9 -9
  199. package/types/schema/mutations/updateOffer.d.ts +7 -7
  200. package/types/schema/mutations/updateProductConfiguration.d.ts +7 -7
  201. package/types/schema/mutations/updateProductConfigurationProductType.d.ts +7 -7
  202. package/types/schema/mutations/updateProductFamily.d.ts +7 -7
  203. package/types/schema/mutations/updateProductFamilyBrand.d.ts +7 -7
  204. package/types/schema/mutations/updateProductGeneration.d.ts +7 -7
  205. package/types/schema/mutations/updateProductGenerationProductFamily.d.ts +7 -7
  206. package/types/schema/mutations/updateProductType.d.ts +7 -7
  207. package/types/schema/mutations/updateProductTypeProductGeneration.d.ts +7 -7
  208. package/types/schema/mutations/updateSource.d.ts +9 -9
  209. package/types/schema/mutations/updateStorePage.d.ts +7 -7
  210. package/types/schema/queries/affiliateLink.d.ts +11 -11
  211. package/types/schema/queries/affiliateUrl.d.ts +11 -11
  212. package/types/schema/queries/aliasIdListBySomeId.d.ts +6 -6
  213. package/types/schema/queries/analyticsTrack.d.ts +5 -5
  214. package/types/schema/queries/appliedCategoryIdListBySomeId.d.ts +6 -6
  215. package/types/schema/queries/baseScore.d.ts +8 -8
  216. package/types/schema/queries/baseScoreRatingIdList.d.ts +7 -7
  217. package/types/schema/queries/baseScoresByCategoryId.d.ts +11 -11
  218. package/types/schema/queries/bestInClass.d.ts +19 -19
  219. package/types/schema/queries/brandAliasResolution.d.ts +10 -10
  220. package/types/schema/queries/brandCategoryRankings.d.ts +36 -36
  221. package/types/schema/queries/brandIdBySomeId.d.ts +5 -5
  222. package/types/schema/queries/brandIdList.d.ts +8 -8
  223. package/types/schema/queries/brandIdListBySearch.d.ts +6 -6
  224. package/types/schema/queries/brandSocialMediaPostList.d.ts +21 -21
  225. package/types/schema/queries/categoryAliasResolution.d.ts +12 -12
  226. package/types/schema/queries/categoryDisplayMode.d.ts +10 -10
  227. package/types/schema/queries/categoryIdByUrlSlug.d.ts +5 -5
  228. package/types/schema/queries/categoryIdList.d.ts +8 -8
  229. package/types/schema/queries/categoryIdListBySomeId.d.ts +10 -10
  230. package/types/schema/queries/categoryIdListBySourceId.d.ts +6 -6
  231. package/types/schema/queries/categoryModifierSearchList.d.ts +21 -21
  232. package/types/schema/queries/categoryRankings.d.ts +13 -13
  233. package/types/schema/queries/categorySearchList.d.ts +16 -16
  234. package/types/schema/queries/categoryStatusList.d.ts +9 -9
  235. package/types/schema/queries/competitorsAnalysis.d.ts +36 -36
  236. package/types/schema/queries/crawlIdList.d.ts +11 -11
  237. package/types/schema/queries/crawlIdListByUrl.d.ts +6 -6
  238. package/types/schema/queries/descriptionMarkdown.d.ts +5 -5
  239. package/types/schema/queries/domainAnalysis.d.ts +18 -18
  240. package/types/schema/queries/domainSupport.d.ts +4 -3
  241. package/types/schema/queries/domainSupport.d.ts.map +1 -1
  242. package/types/schema/queries/entityType.d.ts +54 -54
  243. package/types/schema/queries/fallbackPriceByProductTypeId.d.ts +6 -6
  244. package/types/schema/queries/inputLayerVersion.d.ts +5 -5
  245. package/types/schema/queries/latestRatingIdList.d.ts +6 -6
  246. package/types/schema/queries/latestRatingIdListBySomeId.d.ts +6 -6
  247. package/types/schema/queries/mediaIdListBySomeId.d.ts +6 -6
  248. package/types/schema/queries/mlCategoryDisplayMode.d.ts +8 -8
  249. package/types/schema/queries/noteMarkdown.d.ts +5 -5
  250. package/types/schema/queries/offerIdListByStorePageId.d.ts +12 -12
  251. package/types/schema/queries/possibleAliasIdListBySomeId.d.ts +6 -6
  252. package/types/schema/queries/possibleStorePageIdListBySomeId.d.ts +6 -6
  253. package/types/schema/queries/preferredCategoryIdListByProductId.d.ts +6 -6
  254. package/types/schema/queries/preferredLatestRatingIdListBySomeId.d.ts +6 -6
  255. package/types/schema/queries/preferredStorePageList.d.ts +11 -11
  256. package/types/schema/queries/priceHistoryLookup.d.ts +16 -16
  257. package/types/schema/queries/pricePointCompetitors.d.ts +16 -16
  258. package/types/schema/queries/priceRangeByCategoryId.d.ts +10 -10
  259. package/types/schema/queries/productConfigurationIdListBySomeId.d.ts +6 -6
  260. package/types/schema/queries/productDealList.d.ts +13 -13
  261. package/types/schema/queries/productDocumentByStoreUrl.d.ts +7 -7
  262. package/types/schema/queries/productDocumentsByProductIds.d.ts +6 -6
  263. package/types/schema/queries/productFamilyIdBySomeId.d.ts +5 -5
  264. package/types/schema/queries/productFamilyIdListBySomeId.d.ts +6 -6
  265. package/types/schema/queries/productGenerationIdBySomeId.d.ts +5 -5
  266. package/types/schema/queries/productGenerationIdListBySomeId.d.ts +6 -6
  267. package/types/schema/queries/productListSort.d.ts +9 -9
  268. package/types/schema/queries/productPricePointList.d.ts +13 -13
  269. package/types/schema/queries/productSearchList.d.ts +39 -39
  270. package/types/schema/queries/productTypeIdBySomeId.d.ts +5 -5
  271. package/types/schema/queries/productTypeIdByStoreUrl.d.ts +6 -6
  272. package/types/schema/queries/productTypeIdListByCategoryId.d.ts +10 -10
  273. package/types/schema/queries/productTypeIdListByModifiers.d.ts +7 -7
  274. package/types/schema/queries/productTypeIdListBySomeId.d.ts +6 -6
  275. package/types/schema/queries/saleMetrics.d.ts +8 -8
  276. package/types/schema/queries/searchSuggestionList.d.ts +9 -9
  277. package/types/schema/queries/sectionDataByCrawlId.d.ts +19 -19
  278. package/types/schema/queries/sourceIdList.d.ts +4 -4
  279. package/types/schema/queries/specIdListBySomeId.d.ts +6 -6
  280. package/types/schema/queries/specTypeIdList.d.ts +12 -12
  281. package/types/schema/queries/specTypeValidValues.d.ts +15 -15
  282. package/types/schema/queries/specValueRangeListByCategoryId.d.ts +36 -36
  283. package/types/schema/queries/stablePriceByProductId.d.ts +6 -6
  284. package/types/schema/queries/stablePriceByProductIdAndStoreName.d.ts +7 -7
  285. package/types/schema/queries/stablePriceByStorePageId.d.ts +6 -6
  286. package/types/schema/queries/storePageFetchData.d.ts +12 -12
  287. package/types/schema/queries/storePageIdByUrl.d.ts +6 -6
  288. package/types/schema/queries/storePageIdListBySomeId.d.ts +6 -6
  289. package/types/schema/queries/storePageInfo.d.ts +13 -13
  290. package/types/schema/queries/storePageInfoBySku.d.ts +20 -20
  291. package/types/schema/queries/storePageScrapeData.d.ts +9 -9
  292. package/types/schema/queries/subCategoryIdListByCategoryId.d.ts +6 -6
  293. package/types/schema/queries/subsetModifierDataByModifiers.d.ts +12 -12
  294. package/types/schema/queries/topProductDocumentList.d.ts +8 -8
  295. package/types/schema/queries/unstableMediaIdListByCategoryId.d.ts +6 -6
  296. package/types/schema/queries/unstableSourceTrust.d.ts +9 -9
  297. package/types/schema/queries/unstableUpdatableResponseTest.d.ts +12 -0
  298. package/types/schema/queries/unstableUpdatableResponseTest.d.ts.map +1 -0
  299. package/types/schema/queries/userIdList.d.ts +4 -4
  300. package/types/schema/queries/userPermissionsByUserId.d.ts +7 -7
  301. package/types/schema/queries/userRestictedData.d.ts +10 -10
  302. package/types/schema/queries/userReviewAnalysis.d.ts +39 -39
  303. package/types/schema/queries/whoAmI.d.ts +5 -5
  304. package/types/schema/queries.d.ts +86 -86
  305. package/types/schema/responses.d.ts +86 -86
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=FetchOptions.js.map
@@ -1,55 +1,55 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QueryHttpError = exports.QueryResponseError = exports.QueryValidationError = exports.QueryReferenceError = exports.QueryFetchError = exports.QueryError = void 0;
4
- class QueryError extends Error {
5
- constructor(query, message = "") {
6
- super(message);
7
- this.query = query;
8
- Object.setPrototypeOf(this, QueryError.prototype);
9
- }
10
- }
11
- exports.QueryError = QueryError;
12
- class QueryFetchError extends QueryError {
13
- constructor(query, message = "") {
14
- super(query, message);
15
- this.name = "QueryFetchError";
16
- Object.setPrototypeOf(this, QueryFetchError.prototype);
17
- }
18
- }
19
- exports.QueryFetchError = QueryFetchError;
20
- class QueryReferenceError extends QueryError {
21
- constructor(query, message = "") {
22
- super(query, message);
23
- this.name = "QueryReferenceError";
24
- Object.setPrototypeOf(this, QueryReferenceError.prototype);
25
- }
26
- }
27
- exports.QueryReferenceError = QueryReferenceError;
28
- class QueryValidationError extends QueryError {
29
- constructor(query, message = "") {
30
- super(query, message);
31
- this.name = "QueryValidationError";
32
- Object.setPrototypeOf(this, QueryReferenceError.prototype);
33
- }
34
- }
35
- exports.QueryValidationError = QueryValidationError;
36
- class QueryResponseError extends QueryError {
37
- constructor(query, errors, message = "") {
38
- super(query, message);
39
- this.name = "QueryResponseError";
40
- this.errors = errors;
41
- Object.setPrototypeOf(this, QueryResponseError.prototype);
42
- }
43
- }
44
- exports.QueryResponseError = QueryResponseError;
45
- class QueryHttpError extends QueryError {
46
- constructor(query, status, body, message = "") {
47
- super(query, message);
48
- this.name = "QueryHttpError";
49
- this.status = status;
50
- this.body = body;
51
- Object.setPrototypeOf(this, QueryHttpError.prototype);
52
- }
53
- }
54
- exports.QueryHttpError = QueryHttpError;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueryHttpError = exports.QueryResponseError = exports.QueryValidationError = exports.QueryReferenceError = exports.QueryFetchError = exports.QueryError = void 0;
4
+ class QueryError extends Error {
5
+ constructor(query, message = "") {
6
+ super(message);
7
+ this.query = query;
8
+ Object.setPrototypeOf(this, QueryError.prototype);
9
+ }
10
+ }
11
+ exports.QueryError = QueryError;
12
+ class QueryFetchError extends QueryError {
13
+ constructor(query, message = "") {
14
+ super(query, message);
15
+ this.name = "QueryFetchError";
16
+ Object.setPrototypeOf(this, QueryFetchError.prototype);
17
+ }
18
+ }
19
+ exports.QueryFetchError = QueryFetchError;
20
+ class QueryReferenceError extends QueryError {
21
+ constructor(query, message = "") {
22
+ super(query, message);
23
+ this.name = "QueryReferenceError";
24
+ Object.setPrototypeOf(this, QueryReferenceError.prototype);
25
+ }
26
+ }
27
+ exports.QueryReferenceError = QueryReferenceError;
28
+ class QueryValidationError extends QueryError {
29
+ constructor(query, message = "") {
30
+ super(query, message);
31
+ this.name = "QueryValidationError";
32
+ Object.setPrototypeOf(this, QueryReferenceError.prototype);
33
+ }
34
+ }
35
+ exports.QueryValidationError = QueryValidationError;
36
+ class QueryResponseError extends QueryError {
37
+ constructor(query, errors, message = "") {
38
+ super(query, message);
39
+ this.name = "QueryResponseError";
40
+ this.errors = errors;
41
+ Object.setPrototypeOf(this, QueryResponseError.prototype);
42
+ }
43
+ }
44
+ exports.QueryResponseError = QueryResponseError;
45
+ class QueryHttpError extends QueryError {
46
+ constructor(query, status, body, message = "") {
47
+ super(query, message);
48
+ this.name = "QueryHttpError";
49
+ this.status = status;
50
+ this.body = body;
51
+ Object.setPrototypeOf(this, QueryHttpError.prototype);
52
+ }
53
+ }
54
+ exports.QueryHttpError = QueryHttpError;
55
55
  //# sourceMappingURL=QueryError.js.map
@@ -1,99 +1,99 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports._setDefaultQueryResolver = exports._getDefaultQueryResolver = exports._defaultBatchKey = void 0;
13
- require("cross-fetch/polyfill");
14
- const getQueryHash_1 = require("./getQueryHash");
15
- const QueryError_1 = require("./QueryError");
16
- exports._defaultBatchKey = "__DEFAULT_BATCH_KEY__";
17
- class QueryResolver {
18
- constructor(options = {}) {
19
- const { apiHost, apiKey, apiPath } = options;
20
- this.apiHost = apiHost !== null && apiHost !== void 0 ? apiHost : "https://lustre-api.com";
21
- this.apiKey = apiKey;
22
- this.apiPath = apiPath;
23
- this.resolverQueues = {};
24
- }
25
- addQueryToQueue(query, options = {}) {
26
- const { batchKey = exports._defaultBatchKey } = options;
27
- const promise = new Promise((resolve, reject) => {
28
- var _a, _b;
29
- var _c;
30
- const queryResolver = { query, resolve, reject };
31
- const queue = (_a = this.resolverQueues[batchKey]) !== null && _a !== void 0 ? _a : [];
32
- queue.push(queryResolver);
33
- (_b = (_c = this.resolverQueues)[batchKey]) !== null && _b !== void 0 ? _b : (_c[batchKey] = queue);
34
- });
35
- setTimeout(() => this.performQueryRequest(), 1);
36
- return promise;
37
- }
38
- performQueryRequest() {
39
- const resolverValues = Object.values(this.resolverQueues);
40
- this.resolverQueues = {};
41
- resolverValues.forEach((resolverQueue) => {
42
- var _a;
43
- if (resolverQueue.length === 0) {
44
- return;
45
- }
46
- const queries = resolverQueue.reduce((output, resolver) => {
47
- var _a;
48
- var _b;
49
- const query = resolver.query;
50
- const queryHash = getQueryHash_1.getQueryHash(query);
51
- (_a = output[_b = query.name]) !== null && _a !== void 0 ? _a : (output[_b] = {});
52
- const dict = output[query.name];
53
- dict[queryHash] = query.body;
54
- return output;
55
- }, {});
56
- const headers = new Headers({
57
- "Content-type": "application/json",
58
- });
59
- if (this.apiKey) {
60
- headers.append("Authorization", `Bearer ${this.apiKey}`);
61
- }
62
- const endpointUrl = `${this.apiHost}${(_a = this.apiPath) !== null && _a !== void 0 ? _a : "/queries"}`;
63
- const request = new Request(endpointUrl, {
64
- body: JSON.stringify({ queries }),
65
- method: "POST",
66
- headers,
67
- });
68
- fetch(request)
69
- .then((response) => __awaiter(this, void 0, void 0, function* () {
70
- if (response.ok) {
71
- const json = yield response.json();
72
- resolverQueue.forEach((resolver) => {
73
- resolver.resolve(json);
74
- });
75
- }
76
- else {
77
- const body = yield response.text();
78
- resolverQueue.forEach((resolver) => {
79
- resolver.reject(new QueryError_1.QueryHttpError(resolver.query, response.status, body));
80
- });
81
- }
82
- }))
83
- .catch((error) => {
84
- resolverQueue.forEach((resolver) => {
85
- resolver.reject(new QueryError_1.QueryFetchError(resolver.query, error.message));
86
- });
87
- });
88
- });
89
- }
90
- }
91
- let defaultQueryResolver = new QueryResolver();
92
- const _getDefaultQueryResolver = () => defaultQueryResolver;
93
- exports._getDefaultQueryResolver = _getDefaultQueryResolver;
94
- const _setDefaultQueryResolver = (queryResolver) => {
95
- defaultQueryResolver = queryResolver;
96
- };
97
- exports._setDefaultQueryResolver = _setDefaultQueryResolver;
98
- exports.default = QueryResolver;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports._setDefaultQueryResolver = exports._getDefaultQueryResolver = exports._defaultBatchKey = void 0;
13
+ require("cross-fetch/polyfill");
14
+ const getQueryHash_1 = require("./getQueryHash");
15
+ const QueryError_1 = require("./QueryError");
16
+ exports._defaultBatchKey = "__DEFAULT_BATCH_KEY__";
17
+ class QueryResolver {
18
+ constructor(options = {}) {
19
+ const { apiHost, apiKey, apiPath } = options;
20
+ this.apiHost = apiHost !== null && apiHost !== void 0 ? apiHost : "https://lustre-api.com";
21
+ this.apiKey = apiKey;
22
+ this.apiPath = apiPath;
23
+ this.resolverQueues = {};
24
+ }
25
+ addQueryToQueue(query, options = {}) {
26
+ const { batchKey = exports._defaultBatchKey } = options;
27
+ const promise = new Promise((resolve, reject) => {
28
+ var _a, _b;
29
+ var _c;
30
+ const queryResolver = { query, resolve, reject };
31
+ const queue = (_a = this.resolverQueues[batchKey]) !== null && _a !== void 0 ? _a : [];
32
+ queue.push(queryResolver);
33
+ (_b = (_c = this.resolverQueues)[batchKey]) !== null && _b !== void 0 ? _b : (_c[batchKey] = queue);
34
+ });
35
+ setTimeout(() => this.performQueryRequest(), 1);
36
+ return promise;
37
+ }
38
+ performQueryRequest() {
39
+ const resolverValues = Object.values(this.resolverQueues);
40
+ this.resolverQueues = {};
41
+ resolverValues.forEach((resolverQueue) => {
42
+ var _a;
43
+ if (resolverQueue.length === 0) {
44
+ return;
45
+ }
46
+ const queries = resolverQueue.reduce((output, resolver) => {
47
+ var _a;
48
+ var _b;
49
+ const query = resolver.query;
50
+ const queryHash = getQueryHash_1.getQueryHash(query);
51
+ (_a = output[_b = query.name]) !== null && _a !== void 0 ? _a : (output[_b] = {});
52
+ const dict = output[query.name];
53
+ dict[queryHash] = query.body;
54
+ return output;
55
+ }, {});
56
+ const headers = new Headers({
57
+ "Content-type": "application/json",
58
+ });
59
+ if (this.apiKey) {
60
+ headers.append("Authorization", `Bearer ${this.apiKey}`);
61
+ }
62
+ const endpointUrl = `${this.apiHost}${(_a = this.apiPath) !== null && _a !== void 0 ? _a : "/queries"}`;
63
+ const request = new Request(endpointUrl, {
64
+ body: JSON.stringify({ queries }),
65
+ method: "POST",
66
+ headers,
67
+ });
68
+ fetch(request)
69
+ .then((response) => __awaiter(this, void 0, void 0, function* () {
70
+ if (response.ok) {
71
+ const json = yield response.json();
72
+ resolverQueue.forEach((resolver) => {
73
+ resolver.resolve(json);
74
+ });
75
+ }
76
+ else {
77
+ const body = yield response.text();
78
+ resolverQueue.forEach((resolver) => {
79
+ resolver.reject(new QueryError_1.QueryHttpError(resolver.query, response.status, body));
80
+ });
81
+ }
82
+ }))
83
+ .catch((error) => {
84
+ resolverQueue.forEach((resolver) => {
85
+ resolver.reject(new QueryError_1.QueryFetchError(resolver.query, error.message));
86
+ });
87
+ });
88
+ });
89
+ }
90
+ }
91
+ let defaultQueryResolver = new QueryResolver();
92
+ const _getDefaultQueryResolver = () => defaultQueryResolver;
93
+ exports._getDefaultQueryResolver = _getDefaultQueryResolver;
94
+ const _setDefaultQueryResolver = (queryResolver) => {
95
+ defaultQueryResolver = queryResolver;
96
+ };
97
+ exports._setDefaultQueryResolver = _setDefaultQueryResolver;
98
+ exports.default = QueryResolver;
99
99
  //# sourceMappingURL=QueryResolver.js.map
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=WrappedQuery.js.map
@@ -1,136 +1,136 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const hl = [];
4
- for (let i = 0; i < 256; i++) {
5
- hl[i] = ((i >> 4) & 15).toString(16) + (i & 15).toString(16);
6
- }
7
- function fast1a64utf(str) {
8
- var _a, _b, _c, _d, _e, _f, _g, _h;
9
- const l = str.length;
10
- let c;
11
- let i;
12
- let t0 = 0;
13
- let v0 = 0x2325;
14
- let t1 = 0;
15
- let v1 = 0x8422;
16
- let t2 = 0;
17
- let v2 = 0x9ce4;
18
- let t3 = 0;
19
- let v3 = 0xcbf2;
20
- for (i = 0; i < l; i++) {
21
- c = str.charCodeAt(i);
22
- if (c < 128) {
23
- v0 ^= c;
24
- }
25
- else if (c < 2048) {
26
- v0 ^= (c >> 6) | 192;
27
- t0 = v0 * 435;
28
- t1 = v1 * 435;
29
- t2 = v2 * 435;
30
- t3 = v3 * 435;
31
- t2 += v0 << 8;
32
- t3 += v1 << 8;
33
- t1 += t0 >>> 16;
34
- v0 = t0 & 65535;
35
- t2 += t1 >>> 16;
36
- v1 = t1 & 65535;
37
- v3 = (t3 + (t2 >>> 16)) & 65535;
38
- v2 = t2 & 65535;
39
- v0 ^= (c & 63) | 128;
40
- }
41
- else if ((c & 64512) === 55296 && i + 1 < l && (str.charCodeAt(i + 1) & 64512) === 56320) {
42
- c = 65536 + ((c & 1023) << 10) + (str.charCodeAt(++i) & 1023);
43
- v0 ^= (c >> 18) | 240;
44
- t0 = v0 * 435;
45
- t1 = v1 * 435;
46
- t2 = v2 * 435;
47
- t3 = v3 * 435;
48
- t2 += v0 << 8;
49
- t3 += v1 << 8;
50
- t1 += t0 >>> 16;
51
- v0 = t0 & 65535;
52
- t2 += t1 >>> 16;
53
- v1 = t1 & 65535;
54
- v3 = (t3 + (t2 >>> 16)) & 65535;
55
- v2 = t2 & 65535;
56
- v0 ^= ((c >> 12) & 63) | 128;
57
- t0 = v0 * 435;
58
- t1 = v1 * 435;
59
- t2 = v2 * 435;
60
- t3 = v3 * 435;
61
- t2 += v0 << 8;
62
- t3 += v1 << 8;
63
- t1 += t0 >>> 16;
64
- v0 = t0 & 65535;
65
- t2 += t1 >>> 16;
66
- v1 = t1 & 65535;
67
- v3 = (t3 + (t2 >>> 16)) & 65535;
68
- v2 = t2 & 65535;
69
- v0 ^= ((c >> 6) & 63) | 128;
70
- t0 = v0 * 435;
71
- t1 = v1 * 435;
72
- t2 = v2 * 435;
73
- t3 = v3 * 435;
74
- t2 += v0 << 8;
75
- t3 += v1 << 8;
76
- t1 += t0 >>> 16;
77
- v0 = t0 & 65535;
78
- t2 += t1 >>> 16;
79
- v1 = t1 & 65535;
80
- v3 = (t3 + (t2 >>> 16)) & 65535;
81
- v2 = t2 & 65535;
82
- v0 ^= (c & 63) | 128;
83
- }
84
- else {
85
- v0 ^= (c >> 12) | 224;
86
- t0 = v0 * 435;
87
- t1 = v1 * 435;
88
- t2 = v2 * 435;
89
- t3 = v3 * 435;
90
- t2 += v0 << 8;
91
- t3 += v1 << 8;
92
- t1 += t0 >>> 16;
93
- v0 = t0 & 65535;
94
- t2 += t1 >>> 16;
95
- v1 = t1 & 65535;
96
- v3 = (t3 + (t2 >>> 16)) & 65535;
97
- v2 = t2 & 65535;
98
- v0 ^= ((c >> 6) & 63) | 128;
99
- t0 = v0 * 435;
100
- t1 = v1 * 435;
101
- t2 = v2 * 435;
102
- t3 = v3 * 435;
103
- t2 += v0 << 8;
104
- t3 += v1 << 8;
105
- t1 += t0 >>> 16;
106
- v0 = t0 & 65535;
107
- t2 += t1 >>> 16;
108
- v1 = t1 & 65535;
109
- v3 = (t3 + (t2 >>> 16)) & 65535;
110
- v2 = t2 & 65535;
111
- v0 ^= (c & 63) | 128;
112
- }
113
- t0 = v0 * 435;
114
- t1 = v1 * 435;
115
- t2 = v2 * 435;
116
- t3 = v3 * 435;
117
- t2 += v0 << 8;
118
- t3 += v1 << 8;
119
- t1 += t0 >>> 16;
120
- v0 = t0 & 65535;
121
- t2 += t1 >>> 16;
122
- v1 = t1 & 65535;
123
- v3 = (t3 + (t2 >>> 16)) & 65535;
124
- v2 = t2 & 65535;
125
- }
126
- return (((_a = hl[v3 >> 8]) !== null && _a !== void 0 ? _a : "") +
127
- ((_b = hl[v3 & 255]) !== null && _b !== void 0 ? _b : "") +
128
- ((_c = hl[v2 >> 8]) !== null && _c !== void 0 ? _c : "") +
129
- ((_d = hl[v2 & 255]) !== null && _d !== void 0 ? _d : "") +
130
- ((_e = hl[v1 >> 8]) !== null && _e !== void 0 ? _e : "") +
131
- ((_f = hl[v1 & 255]) !== null && _f !== void 0 ? _f : "") +
132
- ((_g = hl[v0 >> 8]) !== null && _g !== void 0 ? _g : "") +
133
- ((_h = hl[v0 & 255]) !== null && _h !== void 0 ? _h : ""));
134
- }
135
- exports.default = fast1a64utf;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const hl = [];
4
+ for (let i = 0; i < 256; i++) {
5
+ hl[i] = ((i >> 4) & 15).toString(16) + (i & 15).toString(16);
6
+ }
7
+ function fast1a64utf(str) {
8
+ var _a, _b, _c, _d, _e, _f, _g, _h;
9
+ const l = str.length;
10
+ let c;
11
+ let i;
12
+ let t0 = 0;
13
+ let v0 = 0x2325;
14
+ let t1 = 0;
15
+ let v1 = 0x8422;
16
+ let t2 = 0;
17
+ let v2 = 0x9ce4;
18
+ let t3 = 0;
19
+ let v3 = 0xcbf2;
20
+ for (i = 0; i < l; i++) {
21
+ c = str.charCodeAt(i);
22
+ if (c < 128) {
23
+ v0 ^= c;
24
+ }
25
+ else if (c < 2048) {
26
+ v0 ^= (c >> 6) | 192;
27
+ t0 = v0 * 435;
28
+ t1 = v1 * 435;
29
+ t2 = v2 * 435;
30
+ t3 = v3 * 435;
31
+ t2 += v0 << 8;
32
+ t3 += v1 << 8;
33
+ t1 += t0 >>> 16;
34
+ v0 = t0 & 65535;
35
+ t2 += t1 >>> 16;
36
+ v1 = t1 & 65535;
37
+ v3 = (t3 + (t2 >>> 16)) & 65535;
38
+ v2 = t2 & 65535;
39
+ v0 ^= (c & 63) | 128;
40
+ }
41
+ else if ((c & 64512) === 55296 && i + 1 < l && (str.charCodeAt(i + 1) & 64512) === 56320) {
42
+ c = 65536 + ((c & 1023) << 10) + (str.charCodeAt(++i) & 1023);
43
+ v0 ^= (c >> 18) | 240;
44
+ t0 = v0 * 435;
45
+ t1 = v1 * 435;
46
+ t2 = v2 * 435;
47
+ t3 = v3 * 435;
48
+ t2 += v0 << 8;
49
+ t3 += v1 << 8;
50
+ t1 += t0 >>> 16;
51
+ v0 = t0 & 65535;
52
+ t2 += t1 >>> 16;
53
+ v1 = t1 & 65535;
54
+ v3 = (t3 + (t2 >>> 16)) & 65535;
55
+ v2 = t2 & 65535;
56
+ v0 ^= ((c >> 12) & 63) | 128;
57
+ t0 = v0 * 435;
58
+ t1 = v1 * 435;
59
+ t2 = v2 * 435;
60
+ t3 = v3 * 435;
61
+ t2 += v0 << 8;
62
+ t3 += v1 << 8;
63
+ t1 += t0 >>> 16;
64
+ v0 = t0 & 65535;
65
+ t2 += t1 >>> 16;
66
+ v1 = t1 & 65535;
67
+ v3 = (t3 + (t2 >>> 16)) & 65535;
68
+ v2 = t2 & 65535;
69
+ v0 ^= ((c >> 6) & 63) | 128;
70
+ t0 = v0 * 435;
71
+ t1 = v1 * 435;
72
+ t2 = v2 * 435;
73
+ t3 = v3 * 435;
74
+ t2 += v0 << 8;
75
+ t3 += v1 << 8;
76
+ t1 += t0 >>> 16;
77
+ v0 = t0 & 65535;
78
+ t2 += t1 >>> 16;
79
+ v1 = t1 & 65535;
80
+ v3 = (t3 + (t2 >>> 16)) & 65535;
81
+ v2 = t2 & 65535;
82
+ v0 ^= (c & 63) | 128;
83
+ }
84
+ else {
85
+ v0 ^= (c >> 12) | 224;
86
+ t0 = v0 * 435;
87
+ t1 = v1 * 435;
88
+ t2 = v2 * 435;
89
+ t3 = v3 * 435;
90
+ t2 += v0 << 8;
91
+ t3 += v1 << 8;
92
+ t1 += t0 >>> 16;
93
+ v0 = t0 & 65535;
94
+ t2 += t1 >>> 16;
95
+ v1 = t1 & 65535;
96
+ v3 = (t3 + (t2 >>> 16)) & 65535;
97
+ v2 = t2 & 65535;
98
+ v0 ^= ((c >> 6) & 63) | 128;
99
+ t0 = v0 * 435;
100
+ t1 = v1 * 435;
101
+ t2 = v2 * 435;
102
+ t3 = v3 * 435;
103
+ t2 += v0 << 8;
104
+ t3 += v1 << 8;
105
+ t1 += t0 >>> 16;
106
+ v0 = t0 & 65535;
107
+ t2 += t1 >>> 16;
108
+ v1 = t1 & 65535;
109
+ v3 = (t3 + (t2 >>> 16)) & 65535;
110
+ v2 = t2 & 65535;
111
+ v0 ^= (c & 63) | 128;
112
+ }
113
+ t0 = v0 * 435;
114
+ t1 = v1 * 435;
115
+ t2 = v2 * 435;
116
+ t3 = v3 * 435;
117
+ t2 += v0 << 8;
118
+ t3 += v1 << 8;
119
+ t1 += t0 >>> 16;
120
+ v0 = t0 & 65535;
121
+ t2 += t1 >>> 16;
122
+ v1 = t1 & 65535;
123
+ v3 = (t3 + (t2 >>> 16)) & 65535;
124
+ v2 = t2 & 65535;
125
+ }
126
+ return (((_a = hl[v3 >> 8]) !== null && _a !== void 0 ? _a : "") +
127
+ ((_b = hl[v3 & 255]) !== null && _b !== void 0 ? _b : "") +
128
+ ((_c = hl[v2 >> 8]) !== null && _c !== void 0 ? _c : "") +
129
+ ((_d = hl[v2 & 255]) !== null && _d !== void 0 ? _d : "") +
130
+ ((_e = hl[v1 >> 8]) !== null && _e !== void 0 ? _e : "") +
131
+ ((_f = hl[v1 & 255]) !== null && _f !== void 0 ? _f : "") +
132
+ ((_g = hl[v0 >> 8]) !== null && _g !== void 0 ? _g : "") +
133
+ ((_h = hl[v0 & 255]) !== null && _h !== void 0 ? _h : ""));
134
+ }
135
+ exports.default = fast1a64utf;
136
136
  //# sourceMappingURL=fast1a64utf.js.map