@lustre/sdk 1.5.2-dev.7 → 1.5.2-dev.8
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.
- package/dist/Context.js +5 -5
- package/dist/Provider.js +13 -13
- package/dist/actions.js +2 -2
- package/dist/api/QueryError.js +54 -54
- package/dist/api/QueryResolver.js +103 -103
- package/dist/api/WrappedQuery.js +2 -2
- package/dist/api/fast1a64utf.js +134 -134
- package/dist/api/fetchEntity.js +41 -41
- package/dist/api/fetchQuery.js +31 -31
- package/dist/api/getHash.js +26 -26
- package/dist/api/getQueryHash.js +9 -9
- package/dist/hooks/index.js +17 -17
- package/dist/hooks/useApiDispatch.js +9 -9
- package/dist/hooks/useApiSelector.js +9 -9
- package/dist/hooks/useApiStore.js +9 -9
- package/dist/hooks/useEntities.js +40 -40
- package/dist/hooks/useEntity.js +9 -9
- package/dist/hooks/useQueries.js +54 -54
- package/dist/hooks/useQuery.js +9 -9
- package/dist/index.js +49 -49
- package/dist/schema/builtins.js +433 -433
- package/dist/schema/entities/alias.js +2 -2
- package/dist/schema/entities/brand.js +2 -2
- package/dist/schema/entities/category.js +2 -2
- package/dist/schema/entities/crawl.js +2 -2
- package/dist/schema/entities/index.js +29 -29
- package/dist/schema/entities/media.js +2 -2
- package/dist/schema/entities/offer.js +2 -2
- package/dist/schema/entities/productConfiguration.js +2 -2
- package/dist/schema/entities/productFamily.js +2 -2
- package/dist/schema/entities/productGeneration.js +2 -2
- package/dist/schema/entities/productType.js +2 -2
- package/dist/schema/entities/rating.js +2 -2
- package/dist/schema/entities/source.js +2 -2
- package/dist/schema/entities/spec.js +2 -2
- package/dist/schema/entities/specType.js +2 -2
- package/dist/schema/entities/specTypeChoice.js +2 -2
- package/dist/schema/entities/storePage.js +2 -2
- package/dist/schema/entities/storePageQueueGroup.js +2 -2
- package/dist/schema/entities/user.js +2 -2
- package/dist/schema/index.js +29 -29
- package/dist/schema/mutations/createBrand.js +2 -2
- package/dist/schema/mutations/createCategory.js +2 -2
- package/dist/schema/mutations/createProductConfiguration.js +2 -2
- package/dist/schema/mutations/createProductFamily.js +2 -2
- package/dist/schema/mutations/createProductGeneration.js +2 -2
- package/dist/schema/mutations/createProductType.js +2 -2
- package/dist/schema/mutations/createUser.js +2 -2
- package/dist/schema/mutations/storePageQueueClaimById.js +2 -2
- package/dist/schema/mutations/storePageQueueClaimNext.js +2 -2
- package/dist/schema/mutations/storePageQueueHandle.js +2 -2
- package/dist/schema/mutations/storePageQueueHandleStorePageIdSet.js +2 -2
- package/dist/schema/mutations/updateAlias.js +2 -2
- package/dist/schema/mutations/updateBrand.js +2 -2
- package/dist/schema/mutations/updateCategory.js +2 -2
- package/dist/schema/mutations/updateOffer.js +2 -2
- package/dist/schema/mutations/updateProductConfiguration.js +2 -2
- package/dist/schema/mutations/updateProductConfigurationProductType.js +2 -2
- package/dist/schema/mutations/updateProductFamily.js +2 -2
- package/dist/schema/mutations/updateProductFamilyBrand.js +2 -2
- package/dist/schema/mutations/updateProductGeneration.js +2 -2
- package/dist/schema/mutations/updateProductGenerationProductFamily.js +2 -2
- package/dist/schema/mutations/updateProductType.js +2 -2
- package/dist/schema/mutations/updateProductTypeProductGeneration.js +2 -2
- package/dist/schema/mutations/updateSource.js +2 -2
- package/dist/schema/mutations/updateStorePage.js +2 -2
- package/dist/schema/queries/affiliateUrl.js +2 -2
- package/dist/schema/queries/aliasIdListBySomeId.js +2 -2
- package/dist/schema/queries/analyticsTrack.js +2 -2
- package/dist/schema/queries/appliedCategoryIdListBySomeId.js +2 -2
- package/dist/schema/queries/baseScore.js +2 -2
- package/dist/schema/queries/baseScoreRatingIdList.js +2 -2
- package/dist/schema/queries/baseScoresByCategoryId.js +2 -2
- package/dist/schema/queries/bestInClass.js +2 -2
- package/dist/schema/queries/brandAliasResolution.js +2 -2
- package/dist/schema/queries/brandCategoryRankings.js +2 -2
- package/dist/schema/queries/brandIdBySomeId.js +2 -2
- package/dist/schema/queries/brandIdList.js +2 -2
- package/dist/schema/queries/brandIdListBySearch.js +2 -2
- package/dist/schema/queries/brandSocialMediaPostList.js +2 -2
- package/dist/schema/queries/categoryAliasResolution.js +2 -2
- package/dist/schema/queries/categoryDisplayMode.js +2 -2
- package/dist/schema/queries/categoryIdByUrlSlug.js +2 -2
- package/dist/schema/queries/categoryIdList.js +2 -2
- package/dist/schema/queries/categoryIdListBySomeId.js +2 -2
- package/dist/schema/queries/categoryIdListBySourceId.js +2 -2
- package/dist/schema/queries/categoryModifierSearchList.js +2 -2
- package/dist/schema/queries/categoryRankings.js +2 -2
- package/dist/schema/queries/categorySearchList.js +2 -2
- package/dist/schema/queries/categoryStatusList.js +2 -2
- package/dist/schema/queries/crawlIdList.js +2 -2
- package/dist/schema/queries/crawlIdListByUrl.js +2 -2
- package/dist/schema/queries/descriptionMarkdown.js +2 -2
- package/dist/schema/queries/entityType.js +2 -2
- package/dist/schema/queries/fallbackPriceByProductTypeId.js +2 -2
- package/dist/schema/queries/inputLayerVersion.js +2 -2
- package/dist/schema/queries/latestRatingIdList.js +2 -2
- package/dist/schema/queries/latestRatingIdListBySomeId.js +2 -2
- package/dist/schema/queries/mediaIdListBySomeId.js +2 -2
- package/dist/schema/queries/mlCategoryDisplayMode.js +2 -2
- package/dist/schema/queries/noteMarkdown.js +2 -2
- package/dist/schema/queries/offerIdListByStorePageId.js +2 -2
- package/dist/schema/queries/possibleAliasIdListBySomeId.js +2 -2
- package/dist/schema/queries/possibleStorePageIdListBySomeId.js +2 -2
- package/dist/schema/queries/preferredCategoryIdListByProductId.js +2 -2
- package/dist/schema/queries/preferredLatestRatingIdListBySomeId.js +2 -2
- package/dist/schema/queries/preferredStorePageList.js +2 -2
- package/dist/schema/queries/priceHistoryLookup.js +2 -2
- package/dist/schema/queries/pricePointCompetitors.js +2 -2
- package/dist/schema/queries/priceRangeByCategoryId.js +2 -2
- package/dist/schema/queries/productConfigurationIdListBySomeId.js +2 -2
- package/dist/schema/queries/productDealList.js +2 -2
- package/dist/schema/queries/productDocumentByStoreUrl.js +2 -2
- package/dist/schema/queries/productDocumentsByProductIds.js +2 -2
- package/dist/schema/queries/productFamilyIdBySomeId.js +2 -2
- package/dist/schema/queries/productFamilyIdListBySomeId.js +2 -2
- package/dist/schema/queries/productGenerationIdBySomeId.js +2 -2
- package/dist/schema/queries/productGenerationIdListBySomeId.js +2 -2
- package/dist/schema/queries/productListSort.js +2 -2
- package/dist/schema/queries/productPricePointList.js +2 -2
- package/dist/schema/queries/productSearchList.js +2 -2
- package/dist/schema/queries/productTypeIdBySomeId.js +2 -2
- package/dist/schema/queries/productTypeIdByStoreUrl.js +2 -2
- package/dist/schema/queries/productTypeIdListByCategoryId.js +2 -2
- package/dist/schema/queries/productTypeIdListByModifiers.js +2 -2
- package/dist/schema/queries/productTypeIdListBySomeId.js +2 -2
- package/dist/schema/queries/saleMetrics.js +2 -2
- package/dist/schema/queries/searchSuggestionList.js +2 -2
- package/dist/schema/queries/sectionDataByCrawlId.js +2 -2
- package/dist/schema/queries/sourceIdList.js +2 -2
- package/dist/schema/queries/specIdListBySomeId.js +2 -2
- package/dist/schema/queries/specTypeIdList.js +2 -2
- package/dist/schema/queries/specTypeValidValues.js +2 -2
- package/dist/schema/queries/specValueRangeListByCategoryId.js +2 -2
- package/dist/schema/queries/stablePriceByProductId.js +2 -2
- package/dist/schema/queries/stablePriceByProductIdAndStoreName.js +2 -2
- package/dist/schema/queries/stablePriceByStorePageId.js +2 -2
- package/dist/schema/queries/storePageFetchData.js +2 -2
- package/dist/schema/queries/storePageIdByUrl.js +2 -2
- package/dist/schema/queries/storePageIdListBySomeId.js +2 -2
- package/dist/schema/queries/storePageInfoBySku.js +2 -2
- package/dist/schema/queries/storePageScrapeData.js +2 -2
- package/dist/schema/queries/subCategoryIdListByCategoryId.js +2 -2
- package/dist/schema/queries/subsetModifierDataByModifiers.js +2 -2
- package/dist/schema/queries/topProductDocumentList.js +2 -2
- package/dist/schema/queries/unstableMediaIdListByCategoryId.js +2 -2
- package/dist/schema/queries/unstableSourceTrust.js +2 -2
- package/dist/schema/queries/userIdList.js +2 -2
- package/dist/schema/queries/userPermissionsByUserId.js +2 -2
- package/dist/schema/queries/userRestictedData.js +2 -2
- package/dist/schema/queries/userReviewAnalysis.js +2 -2
- package/dist/schema/queries/whoAmI.js +2 -2
- package/dist/schema/queries.js +2 -2
- package/dist/schema/responses.js +2 -2
- package/dist/store/entities/index.js +25 -25
- package/dist/store/entities/makeEntityReducer.js +23 -23
- package/dist/store/errors/index.js +23 -23
- package/dist/store/errors/makeErrorReducer.js +23 -23
- package/dist/store/index.js +16 -16
- package/dist/store/responses/index.js +90 -90
- package/dist/store/responses/makeResponseReducer.js +23 -23
- package/package.json +1 -1
- package/types/Context.d.ts +4 -4
- package/types/Provider.d.ts +3 -3
- package/types/actions.d.ts +7 -7
- package/types/api/QueryError.d.ts +29 -29
- package/types/api/QueryResolver.d.ts +32 -32
- package/types/api/WrappedQuery.d.ts +8 -8
- package/types/api/fast1a64utf.d.ts +2 -2
- package/types/api/fetchEntity.d.ts +6 -6
- package/types/api/fetchQuery.d.ts +6 -6
- package/types/api/getHash.d.ts +6 -6
- package/types/api/getQueryHash.d.ts +2 -2
- package/types/hooks/index.d.ts +7 -7
- package/types/hooks/useApiDispatch.d.ts +3 -3
- package/types/hooks/useApiSelector.d.ts +4 -4
- package/types/hooks/useApiStore.d.ts +2 -2
- package/types/hooks/useEntities.d.ts +7 -7
- package/types/hooks/useEntity.d.ts +7 -7
- package/types/hooks/useQueries.d.ts +7 -7
- package/types/hooks/useQuery.d.ts +7 -7
- package/types/index.d.ts +11 -11
- package/types/schema/builtins.d.ts +123 -123
- package/types/schema/entities/alias.d.ts +5 -5
- package/types/schema/entities/brand.d.ts +4 -4
- package/types/schema/entities/category.d.ts +6 -6
- package/types/schema/entities/crawl.d.ts +11 -11
- package/types/schema/entities/index.d.ts +17 -17
- package/types/schema/entities/media.d.ts +5 -5
- package/types/schema/entities/offer.d.ts +10 -10
- package/types/schema/entities/productConfiguration.d.ts +4 -4
- package/types/schema/entities/productFamily.d.ts +4 -4
- package/types/schema/entities/productGeneration.d.ts +4 -4
- package/types/schema/entities/productType.d.ts +4 -4
- package/types/schema/entities/rating.d.ts +52 -52
- package/types/schema/entities/source.d.ts +7 -7
- package/types/schema/entities/spec.d.ts +21 -21
- package/types/schema/entities/specType.d.ts +5 -5
- package/types/schema/entities/specTypeChoice.d.ts +6 -6
- package/types/schema/entities/storePage.d.ts +7 -7
- package/types/schema/entities/storePageQueueGroup.d.ts +5 -5
- package/types/schema/entities/user.d.ts +4 -4
- package/types/schema/index.d.ts +257 -257
- package/types/schema/mutations/createBrand.d.ts +8 -8
- package/types/schema/mutations/createCategory.d.ts +8 -8
- package/types/schema/mutations/createProductConfiguration.d.ts +9 -9
- package/types/schema/mutations/createProductFamily.d.ts +9 -9
- package/types/schema/mutations/createProductGeneration.d.ts +9 -9
- package/types/schema/mutations/createProductType.d.ts +9 -9
- package/types/schema/mutations/createUser.d.ts +9 -9
- package/types/schema/mutations/storePageQueueClaimById.d.ts +16 -16
- package/types/schema/mutations/storePageQueueClaimNext.d.ts +14 -14
- package/types/schema/mutations/storePageQueueHandle.d.ts +14 -14
- package/types/schema/mutations/storePageQueueHandleStorePageIdSet.d.ts +14 -14
- package/types/schema/mutations/updateAlias.d.ts +7 -7
- package/types/schema/mutations/updateBrand.d.ts +7 -7
- package/types/schema/mutations/updateCategory.d.ts +9 -9
- package/types/schema/mutations/updateOffer.d.ts +7 -7
- package/types/schema/mutations/updateProductConfiguration.d.ts +7 -7
- package/types/schema/mutations/updateProductConfigurationProductType.d.ts +7 -7
- package/types/schema/mutations/updateProductFamily.d.ts +7 -7
- package/types/schema/mutations/updateProductFamilyBrand.d.ts +7 -7
- package/types/schema/mutations/updateProductGeneration.d.ts +7 -7
- package/types/schema/mutations/updateProductGenerationProductFamily.d.ts +7 -7
- package/types/schema/mutations/updateProductType.d.ts +7 -7
- package/types/schema/mutations/updateProductTypeProductGeneration.d.ts +7 -7
- package/types/schema/mutations/updateSource.d.ts +9 -9
- package/types/schema/mutations/updateStorePage.d.ts +7 -7
- package/types/schema/queries/affiliateUrl.d.ts +11 -11
- package/types/schema/queries/aliasIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/analyticsTrack.d.ts +5 -5
- package/types/schema/queries/appliedCategoryIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/baseScore.d.ts +8 -8
- package/types/schema/queries/baseScoreRatingIdList.d.ts +7 -7
- package/types/schema/queries/baseScoresByCategoryId.d.ts +11 -11
- package/types/schema/queries/bestInClass.d.ts +19 -19
- package/types/schema/queries/brandAliasResolution.d.ts +7 -7
- package/types/schema/queries/brandCategoryRankings.d.ts +29 -28
- package/types/schema/queries/brandCategoryRankings.d.ts.map +1 -1
- package/types/schema/queries/brandIdBySomeId.d.ts +5 -5
- package/types/schema/queries/brandIdList.d.ts +8 -8
- package/types/schema/queries/brandIdListBySearch.d.ts +6 -6
- package/types/schema/queries/brandSocialMediaPostList.d.ts +21 -21
- package/types/schema/queries/categoryAliasResolution.d.ts +8 -8
- package/types/schema/queries/categoryDisplayMode.d.ts +10 -10
- package/types/schema/queries/categoryIdByUrlSlug.d.ts +5 -5
- package/types/schema/queries/categoryIdList.d.ts +8 -8
- package/types/schema/queries/categoryIdListBySomeId.d.ts +10 -10
- package/types/schema/queries/categoryIdListBySourceId.d.ts +6 -6
- package/types/schema/queries/categoryModifierSearchList.d.ts +21 -21
- package/types/schema/queries/categoryRankings.d.ts +13 -13
- package/types/schema/queries/categorySearchList.d.ts +16 -16
- package/types/schema/queries/categoryStatusList.d.ts +9 -9
- package/types/schema/queries/crawlIdList.d.ts +11 -11
- package/types/schema/queries/crawlIdListByUrl.d.ts +6 -6
- package/types/schema/queries/descriptionMarkdown.d.ts +5 -5
- package/types/schema/queries/entityType.d.ts +54 -54
- package/types/schema/queries/fallbackPriceByProductTypeId.d.ts +6 -6
- package/types/schema/queries/inputLayerVersion.d.ts +5 -5
- package/types/schema/queries/latestRatingIdList.d.ts +6 -6
- package/types/schema/queries/latestRatingIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/mediaIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/mlCategoryDisplayMode.d.ts +8 -8
- package/types/schema/queries/noteMarkdown.d.ts +5 -5
- package/types/schema/queries/offerIdListByStorePageId.d.ts +12 -12
- package/types/schema/queries/possibleAliasIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/possibleStorePageIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/preferredCategoryIdListByProductId.d.ts +6 -6
- package/types/schema/queries/preferredLatestRatingIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/preferredStorePageList.d.ts +11 -11
- package/types/schema/queries/priceHistoryLookup.d.ts +16 -16
- package/types/schema/queries/pricePointCompetitors.d.ts +16 -16
- package/types/schema/queries/priceRangeByCategoryId.d.ts +10 -10
- package/types/schema/queries/productConfigurationIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/productDealList.d.ts +13 -13
- package/types/schema/queries/productDocumentByStoreUrl.d.ts +7 -7
- package/types/schema/queries/productDocumentsByProductIds.d.ts +6 -6
- package/types/schema/queries/productFamilyIdBySomeId.d.ts +5 -5
- package/types/schema/queries/productFamilyIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/productGenerationIdBySomeId.d.ts +5 -5
- package/types/schema/queries/productGenerationIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/productListSort.d.ts +9 -9
- package/types/schema/queries/productPricePointList.d.ts +13 -13
- package/types/schema/queries/productSearchList.d.ts +39 -39
- package/types/schema/queries/productTypeIdBySomeId.d.ts +5 -5
- package/types/schema/queries/productTypeIdByStoreUrl.d.ts +6 -6
- package/types/schema/queries/productTypeIdListByCategoryId.d.ts +10 -10
- package/types/schema/queries/productTypeIdListByModifiers.d.ts +7 -7
- package/types/schema/queries/productTypeIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/saleMetrics.d.ts +8 -8
- package/types/schema/queries/searchSuggestionList.d.ts +9 -9
- package/types/schema/queries/sectionDataByCrawlId.d.ts +19 -19
- package/types/schema/queries/sourceIdList.d.ts +4 -4
- package/types/schema/queries/specIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/specTypeIdList.d.ts +12 -12
- package/types/schema/queries/specTypeValidValues.d.ts +15 -15
- package/types/schema/queries/specValueRangeListByCategoryId.d.ts +36 -36
- package/types/schema/queries/stablePriceByProductId.d.ts +6 -6
- package/types/schema/queries/stablePriceByProductIdAndStoreName.d.ts +7 -7
- package/types/schema/queries/stablePriceByStorePageId.d.ts +6 -6
- package/types/schema/queries/storePageFetchData.d.ts +12 -12
- package/types/schema/queries/storePageIdByUrl.d.ts +6 -6
- package/types/schema/queries/storePageIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/storePageInfoBySku.d.ts +20 -20
- package/types/schema/queries/storePageScrapeData.d.ts +9 -9
- package/types/schema/queries/subCategoryIdListByCategoryId.d.ts +6 -6
- package/types/schema/queries/subsetModifierDataByModifiers.d.ts +12 -12
- package/types/schema/queries/topProductDocumentList.d.ts +8 -8
- package/types/schema/queries/unstableMediaIdListByCategoryId.d.ts +6 -6
- package/types/schema/queries/unstableSourceTrust.d.ts +9 -9
- package/types/schema/queries/userIdList.d.ts +4 -4
- package/types/schema/queries/userPermissionsByUserId.d.ts +7 -7
- package/types/schema/queries/userRestictedData.d.ts +10 -10
- package/types/schema/queries/userReviewAnalysis.d.ts +36 -36
- package/types/schema/queries/whoAmI.d.ts +5 -5
- package/types/schema/queries.d.ts +81 -81
- package/types/schema/responses.d.ts +81 -81
- package/types/store/entities/index.d.ts +23 -23
- package/types/store/entities/makeEntityReducer.d.ts +5 -5
- package/types/store/errors/index.d.ts +4 -4
- package/types/store/errors/makeErrorReducer.d.ts +5 -5
- package/types/store/index.d.ts +116 -116
- package/types/store/responses/index.d.ts +88 -88
- package/types/store/responses/makeResponseReducer.d.ts +5 -5
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const makeErrorReducer = (name) => {
|
|
4
|
-
return (state, action) => {
|
|
5
|
-
if (state === undefined) {
|
|
6
|
-
return {};
|
|
7
|
-
}
|
|
8
|
-
if (action.type !== "response_arrived") {
|
|
9
|
-
return state;
|
|
10
|
-
}
|
|
11
|
-
const allRawErrors = action.response.errors;
|
|
12
|
-
if (allRawErrors === undefined) {
|
|
13
|
-
return state;
|
|
14
|
-
}
|
|
15
|
-
const rawErrors = allRawErrors[name];
|
|
16
|
-
if (rawErrors === undefined) {
|
|
17
|
-
return state;
|
|
18
|
-
}
|
|
19
|
-
const next = Object.assign({}, state, rawErrors);
|
|
20
|
-
return next;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
exports.default = makeErrorReducer;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const makeErrorReducer = (name) => {
|
|
4
|
+
return (state, action) => {
|
|
5
|
+
if (state === undefined) {
|
|
6
|
+
return {};
|
|
7
|
+
}
|
|
8
|
+
if (action.type !== "response_arrived") {
|
|
9
|
+
return state;
|
|
10
|
+
}
|
|
11
|
+
const allRawErrors = action.response.errors;
|
|
12
|
+
if (allRawErrors === undefined) {
|
|
13
|
+
return state;
|
|
14
|
+
}
|
|
15
|
+
const rawErrors = allRawErrors[name];
|
|
16
|
+
if (rawErrors === undefined) {
|
|
17
|
+
return state;
|
|
18
|
+
}
|
|
19
|
+
const next = Object.assign({}, state, rawErrors);
|
|
20
|
+
return next;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
exports.default = makeErrorReducer;
|
|
24
24
|
//# sourceMappingURL=makeErrorReducer.js.map
|
package/dist/store/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const redux_1 = require("redux");
|
|
7
|
-
const entities_1 = __importDefault(require("./entities"));
|
|
8
|
-
const errors_1 = __importDefault(require("./errors"));
|
|
9
|
-
const responses_1 = __importDefault(require("./responses"));
|
|
10
|
-
const reducers = redux_1.combineReducers({
|
|
11
|
-
entities: entities_1.default,
|
|
12
|
-
responses: responses_1.default,
|
|
13
|
-
errors: errors_1.default,
|
|
14
|
-
});
|
|
15
|
-
const store = redux_1.createStore(reducers);
|
|
16
|
-
exports.default = store;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const redux_1 = require("redux");
|
|
7
|
+
const entities_1 = __importDefault(require("./entities"));
|
|
8
|
+
const errors_1 = __importDefault(require("./errors"));
|
|
9
|
+
const responses_1 = __importDefault(require("./responses"));
|
|
10
|
+
const reducers = redux_1.combineReducers({
|
|
11
|
+
entities: entities_1.default,
|
|
12
|
+
responses: responses_1.default,
|
|
13
|
+
errors: errors_1.default,
|
|
14
|
+
});
|
|
15
|
+
const store = redux_1.createStore(reducers);
|
|
16
|
+
exports.default = store;
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const redux_1 = require("redux");
|
|
7
|
-
const makeResponseReducer_1 = __importDefault(require("./makeResponseReducer"));
|
|
8
|
-
exports.default = redux_1.combineReducers({
|
|
9
|
-
affiliateUrl: makeResponseReducer_1.default("affiliateUrl"),
|
|
10
|
-
analyticsTrack: makeResponseReducer_1.default("analyticsTrack"),
|
|
11
|
-
appliedCategoryIdListBySomeId: makeResponseReducer_1.default("appliedCategoryIdListBySomeId"),
|
|
12
|
-
baseScore: makeResponseReducer_1.default("baseScore"),
|
|
13
|
-
baseScoreRatingIdList: makeResponseReducer_1.default("baseScoreRatingIdList"),
|
|
14
|
-
baseScoresByCategoryId: makeResponseReducer_1.default("baseScoresByCategoryId"),
|
|
15
|
-
bestInClass: makeResponseReducer_1.default("bestInClass"),
|
|
16
|
-
brandIdBySomeId: makeResponseReducer_1.default("brandIdBySomeId"),
|
|
17
|
-
brandIdList: makeResponseReducer_1.default("brandIdList"),
|
|
18
|
-
brandAliasResolution: makeResponseReducer_1.default("brandAliasResolution"),
|
|
19
|
-
brandCategoryRankings: makeResponseReducer_1.default("brandCategoryRankings"),
|
|
20
|
-
brandSocialMediaPostList: makeResponseReducer_1.default("brandSocialMediaPostList"),
|
|
21
|
-
categoryAliasResolution: makeResponseReducer_1.default("categoryAliasResolution"),
|
|
22
|
-
categoryDisplayMode: makeResponseReducer_1.default("categoryDisplayMode"),
|
|
23
|
-
categoryIdByUrlSlug: makeResponseReducer_1.default("categoryIdByUrlSlug"),
|
|
24
|
-
categoryIdList: makeResponseReducer_1.default("categoryIdList"),
|
|
25
|
-
categoryIdListBySomeId: makeResponseReducer_1.default("categoryIdListBySomeId"),
|
|
26
|
-
categoryIdListBySourceId: makeResponseReducer_1.default("categoryIdListBySourceId"),
|
|
27
|
-
categoryRankings: makeResponseReducer_1.default("categoryRankings"),
|
|
28
|
-
categorySearchList: makeResponseReducer_1.default("categorySearchList"),
|
|
29
|
-
categoryStatusList: makeResponseReducer_1.default("categoryStatusList"),
|
|
30
|
-
crawlIdList: makeResponseReducer_1.default("crawlIdList"),
|
|
31
|
-
crawlIdListByUrl: makeResponseReducer_1.default("crawlIdListByUrl"),
|
|
32
|
-
descriptionMarkdown: makeResponseReducer_1.default("descriptionMarkdown"),
|
|
33
|
-
entityType: makeResponseReducer_1.default("entityType"),
|
|
34
|
-
fallbackPriceByProductTypeId: makeResponseReducer_1.default("fallbackPriceByProductTypeId"),
|
|
35
|
-
inputLayerVersion: makeResponseReducer_1.default("inputLayerVersion"),
|
|
36
|
-
latestRatingIdList: makeResponseReducer_1.default("latestRatingIdList"),
|
|
37
|
-
latestRatingIdListBySomeId: makeResponseReducer_1.default("latestRatingIdListBySomeId"),
|
|
38
|
-
mediaIdListBySomeId: makeResponseReducer_1.default("mediaIdListBySomeId"),
|
|
39
|
-
categoryModifierSearchList: makeResponseReducer_1.default("categoryModifierSearchList"),
|
|
40
|
-
noteMarkdown: makeResponseReducer_1.default("noteMarkdown"),
|
|
41
|
-
offerIdListByStorePageId: makeResponseReducer_1.default("offerIdListByStorePageId"),
|
|
42
|
-
possibleAliasIdListBySomeId: makeResponseReducer_1.default("possibleAliasIdListBySomeId"),
|
|
43
|
-
possibleStorePageIdListBySomeId: makeResponseReducer_1.default("possibleStorePageIdListBySomeId"),
|
|
44
|
-
preferredCategoryIdListByProductId: makeResponseReducer_1.default("preferredCategoryIdListByProductId"),
|
|
45
|
-
preferredLatestRatingIdListBySomeId: makeResponseReducer_1.default("preferredLatestRatingIdListBySomeId"),
|
|
46
|
-
preferredStorePageList: makeResponseReducer_1.default("preferredStorePageList"),
|
|
47
|
-
priceHistoryLookup: makeResponseReducer_1.default("priceHistoryLookup"),
|
|
48
|
-
pricePointCompetitors: makeResponseReducer_1.default("pricePointCompetitors"),
|
|
49
|
-
priceRangeByCategoryId: makeResponseReducer_1.default("priceRangeByCategoryId"),
|
|
50
|
-
productConfigurationIdListBySomeId: makeResponseReducer_1.default("productConfigurationIdListBySomeId"),
|
|
51
|
-
productDealList: makeResponseReducer_1.default("productDealList"),
|
|
52
|
-
productDocumentByStoreUrl: makeResponseReducer_1.default("productDocumentByStoreUrl"),
|
|
53
|
-
productDocumentsByProductIds: makeResponseReducer_1.default("productDocumentsByProductIds"),
|
|
54
|
-
productFamilyIdBySomeId: makeResponseReducer_1.default("productFamilyIdBySomeId"),
|
|
55
|
-
productFamilyIdListBySomeId: makeResponseReducer_1.default("productFamilyIdListBySomeId"),
|
|
56
|
-
productGenerationIdBySomeId: makeResponseReducer_1.default("productGenerationIdBySomeId"),
|
|
57
|
-
productGenerationIdListBySomeId: makeResponseReducer_1.default("productGenerationIdListBySomeId"),
|
|
58
|
-
productListSort: makeResponseReducer_1.default("productListSort"),
|
|
59
|
-
productPricePointList: makeResponseReducer_1.default("productPricePointList"),
|
|
60
|
-
productSearchList: makeResponseReducer_1.default("productSearchList"),
|
|
61
|
-
productTypeIdBySomeId: makeResponseReducer_1.default("productTypeIdBySomeId"),
|
|
62
|
-
productTypeIdByStoreUrl: makeResponseReducer_1.default("productTypeIdByStoreUrl"),
|
|
63
|
-
productTypeIdListByCategoryId: makeResponseReducer_1.default("productTypeIdListByCategoryId"),
|
|
64
|
-
productTypeIdListByModifiers: makeResponseReducer_1.default("productTypeIdListByModifiers"),
|
|
65
|
-
productTypeIdListBySomeId: makeResponseReducer_1.default("productTypeIdListBySomeId"),
|
|
66
|
-
saleMetrics: makeResponseReducer_1.default("saleMetrics"),
|
|
67
|
-
searchSuggestionList: makeResponseReducer_1.default("searchSuggestionList"),
|
|
68
|
-
sectionDataByCrawlId: makeResponseReducer_1.default("sectionDataByCrawlId"),
|
|
69
|
-
sourceIdList: makeResponseReducer_1.default("sourceIdList"),
|
|
70
|
-
specIdListBySomeId: makeResponseReducer_1.default("specIdListBySomeId"),
|
|
71
|
-
specTypeIdList: makeResponseReducer_1.default("specTypeIdList"),
|
|
72
|
-
specTypeValidValues: makeResponseReducer_1.default("specTypeValidValues"),
|
|
73
|
-
specValueRangeListByCategoryId: makeResponseReducer_1.default("specValueRangeListByCategoryId"),
|
|
74
|
-
stablePriceByProductId: makeResponseReducer_1.default("stablePriceByProductId"),
|
|
75
|
-
stablePriceByProductIdAndStoreName: makeResponseReducer_1.default("stablePriceByProductIdAndStoreName"),
|
|
76
|
-
stablePriceByStorePageId: makeResponseReducer_1.default("stablePriceByStorePageId"),
|
|
77
|
-
storePageFetchData: makeResponseReducer_1.default("storePageFetchData"),
|
|
78
|
-
storePageIdByUrl: makeResponseReducer_1.default("storePageIdByUrl"),
|
|
79
|
-
storePageIdListBySomeId: makeResponseReducer_1.default("storePageIdListBySomeId"),
|
|
80
|
-
storePageInfoBySku: makeResponseReducer_1.default("storePageInfoBySku"),
|
|
81
|
-
storePageScrapeData: makeResponseReducer_1.default("storePageScrapeData"),
|
|
82
|
-
subCategoryIdListByCategoryId: makeResponseReducer_1.default("subCategoryIdListByCategoryId"),
|
|
83
|
-
subsetModifierDataByModifiers: makeResponseReducer_1.default("subsetModifierDataByModifiers"),
|
|
84
|
-
topProductDocumentList: makeResponseReducer_1.default("topProductDocumentList"),
|
|
85
|
-
unstableMediaIdListByCategoryId: makeResponseReducer_1.default("unstableMediaIdListByCategoryId"),
|
|
86
|
-
userReviewAnalysis: makeResponseReducer_1.default("userReviewAnalysis"),
|
|
87
|
-
unstableSourceTrust: makeResponseReducer_1.default("unstableSourceTrust"),
|
|
88
|
-
userIdList: makeResponseReducer_1.default("userIdList"),
|
|
89
|
-
userPermissionsByUserId: makeResponseReducer_1.default("userPermissionsByUserId"),
|
|
90
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const redux_1 = require("redux");
|
|
7
|
+
const makeResponseReducer_1 = __importDefault(require("./makeResponseReducer"));
|
|
8
|
+
exports.default = redux_1.combineReducers({
|
|
9
|
+
affiliateUrl: makeResponseReducer_1.default("affiliateUrl"),
|
|
10
|
+
analyticsTrack: makeResponseReducer_1.default("analyticsTrack"),
|
|
11
|
+
appliedCategoryIdListBySomeId: makeResponseReducer_1.default("appliedCategoryIdListBySomeId"),
|
|
12
|
+
baseScore: makeResponseReducer_1.default("baseScore"),
|
|
13
|
+
baseScoreRatingIdList: makeResponseReducer_1.default("baseScoreRatingIdList"),
|
|
14
|
+
baseScoresByCategoryId: makeResponseReducer_1.default("baseScoresByCategoryId"),
|
|
15
|
+
bestInClass: makeResponseReducer_1.default("bestInClass"),
|
|
16
|
+
brandIdBySomeId: makeResponseReducer_1.default("brandIdBySomeId"),
|
|
17
|
+
brandIdList: makeResponseReducer_1.default("brandIdList"),
|
|
18
|
+
brandAliasResolution: makeResponseReducer_1.default("brandAliasResolution"),
|
|
19
|
+
brandCategoryRankings: makeResponseReducer_1.default("brandCategoryRankings"),
|
|
20
|
+
brandSocialMediaPostList: makeResponseReducer_1.default("brandSocialMediaPostList"),
|
|
21
|
+
categoryAliasResolution: makeResponseReducer_1.default("categoryAliasResolution"),
|
|
22
|
+
categoryDisplayMode: makeResponseReducer_1.default("categoryDisplayMode"),
|
|
23
|
+
categoryIdByUrlSlug: makeResponseReducer_1.default("categoryIdByUrlSlug"),
|
|
24
|
+
categoryIdList: makeResponseReducer_1.default("categoryIdList"),
|
|
25
|
+
categoryIdListBySomeId: makeResponseReducer_1.default("categoryIdListBySomeId"),
|
|
26
|
+
categoryIdListBySourceId: makeResponseReducer_1.default("categoryIdListBySourceId"),
|
|
27
|
+
categoryRankings: makeResponseReducer_1.default("categoryRankings"),
|
|
28
|
+
categorySearchList: makeResponseReducer_1.default("categorySearchList"),
|
|
29
|
+
categoryStatusList: makeResponseReducer_1.default("categoryStatusList"),
|
|
30
|
+
crawlIdList: makeResponseReducer_1.default("crawlIdList"),
|
|
31
|
+
crawlIdListByUrl: makeResponseReducer_1.default("crawlIdListByUrl"),
|
|
32
|
+
descriptionMarkdown: makeResponseReducer_1.default("descriptionMarkdown"),
|
|
33
|
+
entityType: makeResponseReducer_1.default("entityType"),
|
|
34
|
+
fallbackPriceByProductTypeId: makeResponseReducer_1.default("fallbackPriceByProductTypeId"),
|
|
35
|
+
inputLayerVersion: makeResponseReducer_1.default("inputLayerVersion"),
|
|
36
|
+
latestRatingIdList: makeResponseReducer_1.default("latestRatingIdList"),
|
|
37
|
+
latestRatingIdListBySomeId: makeResponseReducer_1.default("latestRatingIdListBySomeId"),
|
|
38
|
+
mediaIdListBySomeId: makeResponseReducer_1.default("mediaIdListBySomeId"),
|
|
39
|
+
categoryModifierSearchList: makeResponseReducer_1.default("categoryModifierSearchList"),
|
|
40
|
+
noteMarkdown: makeResponseReducer_1.default("noteMarkdown"),
|
|
41
|
+
offerIdListByStorePageId: makeResponseReducer_1.default("offerIdListByStorePageId"),
|
|
42
|
+
possibleAliasIdListBySomeId: makeResponseReducer_1.default("possibleAliasIdListBySomeId"),
|
|
43
|
+
possibleStorePageIdListBySomeId: makeResponseReducer_1.default("possibleStorePageIdListBySomeId"),
|
|
44
|
+
preferredCategoryIdListByProductId: makeResponseReducer_1.default("preferredCategoryIdListByProductId"),
|
|
45
|
+
preferredLatestRatingIdListBySomeId: makeResponseReducer_1.default("preferredLatestRatingIdListBySomeId"),
|
|
46
|
+
preferredStorePageList: makeResponseReducer_1.default("preferredStorePageList"),
|
|
47
|
+
priceHistoryLookup: makeResponseReducer_1.default("priceHistoryLookup"),
|
|
48
|
+
pricePointCompetitors: makeResponseReducer_1.default("pricePointCompetitors"),
|
|
49
|
+
priceRangeByCategoryId: makeResponseReducer_1.default("priceRangeByCategoryId"),
|
|
50
|
+
productConfigurationIdListBySomeId: makeResponseReducer_1.default("productConfigurationIdListBySomeId"),
|
|
51
|
+
productDealList: makeResponseReducer_1.default("productDealList"),
|
|
52
|
+
productDocumentByStoreUrl: makeResponseReducer_1.default("productDocumentByStoreUrl"),
|
|
53
|
+
productDocumentsByProductIds: makeResponseReducer_1.default("productDocumentsByProductIds"),
|
|
54
|
+
productFamilyIdBySomeId: makeResponseReducer_1.default("productFamilyIdBySomeId"),
|
|
55
|
+
productFamilyIdListBySomeId: makeResponseReducer_1.default("productFamilyIdListBySomeId"),
|
|
56
|
+
productGenerationIdBySomeId: makeResponseReducer_1.default("productGenerationIdBySomeId"),
|
|
57
|
+
productGenerationIdListBySomeId: makeResponseReducer_1.default("productGenerationIdListBySomeId"),
|
|
58
|
+
productListSort: makeResponseReducer_1.default("productListSort"),
|
|
59
|
+
productPricePointList: makeResponseReducer_1.default("productPricePointList"),
|
|
60
|
+
productSearchList: makeResponseReducer_1.default("productSearchList"),
|
|
61
|
+
productTypeIdBySomeId: makeResponseReducer_1.default("productTypeIdBySomeId"),
|
|
62
|
+
productTypeIdByStoreUrl: makeResponseReducer_1.default("productTypeIdByStoreUrl"),
|
|
63
|
+
productTypeIdListByCategoryId: makeResponseReducer_1.default("productTypeIdListByCategoryId"),
|
|
64
|
+
productTypeIdListByModifiers: makeResponseReducer_1.default("productTypeIdListByModifiers"),
|
|
65
|
+
productTypeIdListBySomeId: makeResponseReducer_1.default("productTypeIdListBySomeId"),
|
|
66
|
+
saleMetrics: makeResponseReducer_1.default("saleMetrics"),
|
|
67
|
+
searchSuggestionList: makeResponseReducer_1.default("searchSuggestionList"),
|
|
68
|
+
sectionDataByCrawlId: makeResponseReducer_1.default("sectionDataByCrawlId"),
|
|
69
|
+
sourceIdList: makeResponseReducer_1.default("sourceIdList"),
|
|
70
|
+
specIdListBySomeId: makeResponseReducer_1.default("specIdListBySomeId"),
|
|
71
|
+
specTypeIdList: makeResponseReducer_1.default("specTypeIdList"),
|
|
72
|
+
specTypeValidValues: makeResponseReducer_1.default("specTypeValidValues"),
|
|
73
|
+
specValueRangeListByCategoryId: makeResponseReducer_1.default("specValueRangeListByCategoryId"),
|
|
74
|
+
stablePriceByProductId: makeResponseReducer_1.default("stablePriceByProductId"),
|
|
75
|
+
stablePriceByProductIdAndStoreName: makeResponseReducer_1.default("stablePriceByProductIdAndStoreName"),
|
|
76
|
+
stablePriceByStorePageId: makeResponseReducer_1.default("stablePriceByStorePageId"),
|
|
77
|
+
storePageFetchData: makeResponseReducer_1.default("storePageFetchData"),
|
|
78
|
+
storePageIdByUrl: makeResponseReducer_1.default("storePageIdByUrl"),
|
|
79
|
+
storePageIdListBySomeId: makeResponseReducer_1.default("storePageIdListBySomeId"),
|
|
80
|
+
storePageInfoBySku: makeResponseReducer_1.default("storePageInfoBySku"),
|
|
81
|
+
storePageScrapeData: makeResponseReducer_1.default("storePageScrapeData"),
|
|
82
|
+
subCategoryIdListByCategoryId: makeResponseReducer_1.default("subCategoryIdListByCategoryId"),
|
|
83
|
+
subsetModifierDataByModifiers: makeResponseReducer_1.default("subsetModifierDataByModifiers"),
|
|
84
|
+
topProductDocumentList: makeResponseReducer_1.default("topProductDocumentList"),
|
|
85
|
+
unstableMediaIdListByCategoryId: makeResponseReducer_1.default("unstableMediaIdListByCategoryId"),
|
|
86
|
+
userReviewAnalysis: makeResponseReducer_1.default("userReviewAnalysis"),
|
|
87
|
+
unstableSourceTrust: makeResponseReducer_1.default("unstableSourceTrust"),
|
|
88
|
+
userIdList: makeResponseReducer_1.default("userIdList"),
|
|
89
|
+
userPermissionsByUserId: makeResponseReducer_1.default("userPermissionsByUserId"),
|
|
90
|
+
});
|
|
91
91
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const makeResponseReducer = (name) => {
|
|
4
|
-
return (state, action) => {
|
|
5
|
-
if (state === undefined) {
|
|
6
|
-
return {};
|
|
7
|
-
}
|
|
8
|
-
if (action.type !== "response_arrived") {
|
|
9
|
-
return state;
|
|
10
|
-
}
|
|
11
|
-
const allRawResponses = action.response.responses;
|
|
12
|
-
if (allRawResponses === undefined) {
|
|
13
|
-
return state;
|
|
14
|
-
}
|
|
15
|
-
const rawResponses = allRawResponses[name];
|
|
16
|
-
if (rawResponses === undefined) {
|
|
17
|
-
return state;
|
|
18
|
-
}
|
|
19
|
-
const next = Object.assign({}, state, rawResponses);
|
|
20
|
-
return next;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
exports.default = makeResponseReducer;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const makeResponseReducer = (name) => {
|
|
4
|
+
return (state, action) => {
|
|
5
|
+
if (state === undefined) {
|
|
6
|
+
return {};
|
|
7
|
+
}
|
|
8
|
+
if (action.type !== "response_arrived") {
|
|
9
|
+
return state;
|
|
10
|
+
}
|
|
11
|
+
const allRawResponses = action.response.responses;
|
|
12
|
+
if (allRawResponses === undefined) {
|
|
13
|
+
return state;
|
|
14
|
+
}
|
|
15
|
+
const rawResponses = allRawResponses[name];
|
|
16
|
+
if (rawResponses === undefined) {
|
|
17
|
+
return state;
|
|
18
|
+
}
|
|
19
|
+
const next = Object.assign({}, state, rawResponses);
|
|
20
|
+
return next;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
exports.default = makeResponseReducer;
|
|
24
24
|
//# sourceMappingURL=makeResponseReducer.js.map
|
package/package.json
CHANGED
package/types/Context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context } from "react";
|
|
2
|
-
import { ReactReduxContextValue } from "react-redux";
|
|
3
|
-
declare const _default;
|
|
4
|
-
export default _default;
|
|
1
|
+
import { Context } from "react";
|
|
2
|
+
import { ReactReduxContextValue } from "react-redux";
|
|
3
|
+
declare const _default;
|
|
4
|
+
export default _default;
|
|
5
5
|
//# sourceMappingURL=Context.d.ts.map
|
package/types/Provider.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare const ApiProvider: React.FC<React.PropsWithChildren<unknown>>;
|
|
3
|
-
export default ApiProvider;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const ApiProvider: React.FC<React.PropsWithChildren<unknown>>;
|
|
3
|
+
export default ApiProvider;
|
|
4
4
|
//# sourceMappingURL=Provider.d.ts.map
|
package/types/actions.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Api } from "./schema";
|
|
2
|
-
export declare type ApiAction<Type extends string, Body extends Record<string, unknown>> = {
|
|
3
|
-
type: Type;
|
|
4
|
-
} & Body;
|
|
5
|
-
export declare type ApiActions = ApiAction<"response_arrived", {
|
|
6
|
-
response: Api;
|
|
7
|
-
}>;
|
|
1
|
+
import type { Api } from "./schema";
|
|
2
|
+
export declare type ApiAction<Type extends string, Body extends Record<string, unknown>> = {
|
|
3
|
+
type: Type;
|
|
4
|
+
} & Body;
|
|
5
|
+
export declare type ApiActions = ApiAction<"response_arrived", {
|
|
6
|
+
response: Api;
|
|
7
|
+
}>;
|
|
8
8
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { ServerError } from "../schema";
|
|
2
|
-
import { WrappedQuery } from "./WrappedQuery";
|
|
3
|
-
export declare class QueryError extends Error {
|
|
4
|
-
readonly query: WrappedQuery;
|
|
5
|
-
constructor(query: WrappedQuery, message?: string);
|
|
6
|
-
}
|
|
7
|
-
export declare class QueryFetchError extends QueryError {
|
|
8
|
-
readonly name = "QueryFetchError";
|
|
9
|
-
constructor(query: WrappedQuery, message?: string);
|
|
10
|
-
}
|
|
11
|
-
export declare class QueryReferenceError extends QueryError {
|
|
12
|
-
readonly name = "QueryReferenceError";
|
|
13
|
-
constructor(query: WrappedQuery, message?: string);
|
|
14
|
-
}
|
|
15
|
-
export declare class QueryValidationError extends QueryError {
|
|
16
|
-
readonly name = "QueryValidationError";
|
|
17
|
-
constructor(query: WrappedQuery, message?: string);
|
|
18
|
-
}
|
|
19
|
-
export declare class QueryResponseError extends QueryError {
|
|
20
|
-
readonly name = "QueryResponseError";
|
|
21
|
-
readonly errors: ServerError[];
|
|
22
|
-
constructor(query: WrappedQuery, errors: ServerError[], message?: string);
|
|
23
|
-
}
|
|
24
|
-
export declare class QueryHttpError extends QueryError {
|
|
25
|
-
readonly name = "QueryHttpError";
|
|
26
|
-
readonly status: number;
|
|
27
|
-
readonly body: string;
|
|
28
|
-
constructor(query: WrappedQuery, status: number, body: string, message?: string);
|
|
29
|
-
}
|
|
1
|
+
import { ServerError } from "../schema";
|
|
2
|
+
import { WrappedQuery } from "./WrappedQuery";
|
|
3
|
+
export declare class QueryError extends Error {
|
|
4
|
+
readonly query: WrappedQuery;
|
|
5
|
+
constructor(query: WrappedQuery, message?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare class QueryFetchError extends QueryError {
|
|
8
|
+
readonly name = "QueryFetchError";
|
|
9
|
+
constructor(query: WrappedQuery, message?: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class QueryReferenceError extends QueryError {
|
|
12
|
+
readonly name = "QueryReferenceError";
|
|
13
|
+
constructor(query: WrappedQuery, message?: string);
|
|
14
|
+
}
|
|
15
|
+
export declare class QueryValidationError extends QueryError {
|
|
16
|
+
readonly name = "QueryValidationError";
|
|
17
|
+
constructor(query: WrappedQuery, message?: string);
|
|
18
|
+
}
|
|
19
|
+
export declare class QueryResponseError extends QueryError {
|
|
20
|
+
readonly name = "QueryResponseError";
|
|
21
|
+
readonly errors: ServerError[];
|
|
22
|
+
constructor(query: WrappedQuery, errors: ServerError[], message?: string);
|
|
23
|
+
}
|
|
24
|
+
export declare class QueryHttpError extends QueryError {
|
|
25
|
+
readonly name = "QueryHttpError";
|
|
26
|
+
readonly status: number;
|
|
27
|
+
readonly body: string;
|
|
28
|
+
constructor(query: WrappedQuery, status: number, body: string, message?: string);
|
|
29
|
+
}
|
|
30
30
|
//# sourceMappingURL=QueryError.d.ts.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import "cross-fetch/polyfill";
|
|
2
|
-
import { Api } from "../schema";
|
|
3
|
-
import { WrappedQuery } from "./WrappedQuery";
|
|
4
|
-
import { QueryError } from "./QueryError";
|
|
5
|
-
import { ApiDispatch } from "../hooks/useApiDispatch";
|
|
6
|
-
export declare const _defaultBatchKey = "__DEFAULT_BATCH_KEY__";
|
|
7
|
-
declare type ResponseResolver = (response: Api) => void;
|
|
8
|
-
declare type ResponseRejector = (error: QueryError) => void;
|
|
9
|
-
declare type QueryHandler = {
|
|
10
|
-
query: WrappedQuery;
|
|
11
|
-
resolve: ResponseResolver;
|
|
12
|
-
reject: ResponseRejector;
|
|
13
|
-
dispatch?: ApiDispatch;
|
|
14
|
-
};
|
|
15
|
-
interface QueryResolverOptions {
|
|
16
|
-
apiHost?: string;
|
|
17
|
-
apiKey?: string;
|
|
18
|
-
}
|
|
19
|
-
declare class QueryResolver {
|
|
20
|
-
resolverQueues: Record<string, QueryHandler[]>;
|
|
21
|
-
readonly apiHost: string;
|
|
22
|
-
readonly apiKey?: string;
|
|
23
|
-
constructor(options?: QueryResolverOptions);
|
|
24
|
-
addQueryToQueue(query: WrappedQuery, options?: {
|
|
25
|
-
batchKey?: string;
|
|
26
|
-
dispatch?: ApiDispatch;
|
|
27
|
-
}): Promise<Api>;
|
|
28
|
-
performQueryRequest(): Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
export declare const _getDefaultQueryResolver: () => QueryResolver;
|
|
31
|
-
export declare const _setDefaultQueryResolver: (queryResolver: QueryResolver) => void;
|
|
32
|
-
export default QueryResolver;
|
|
1
|
+
import "cross-fetch/polyfill";
|
|
2
|
+
import { Api } from "../schema";
|
|
3
|
+
import { WrappedQuery } from "./WrappedQuery";
|
|
4
|
+
import { QueryError } from "./QueryError";
|
|
5
|
+
import { ApiDispatch } from "../hooks/useApiDispatch";
|
|
6
|
+
export declare const _defaultBatchKey = "__DEFAULT_BATCH_KEY__";
|
|
7
|
+
declare type ResponseResolver = (response: Api) => void;
|
|
8
|
+
declare type ResponseRejector = (error: QueryError) => void;
|
|
9
|
+
declare type QueryHandler = {
|
|
10
|
+
query: WrappedQuery;
|
|
11
|
+
resolve: ResponseResolver;
|
|
12
|
+
reject: ResponseRejector;
|
|
13
|
+
dispatch?: ApiDispatch;
|
|
14
|
+
};
|
|
15
|
+
interface QueryResolverOptions {
|
|
16
|
+
apiHost?: string;
|
|
17
|
+
apiKey?: string;
|
|
18
|
+
}
|
|
19
|
+
declare class QueryResolver {
|
|
20
|
+
resolverQueues: Record<string, QueryHandler[]>;
|
|
21
|
+
readonly apiHost: string;
|
|
22
|
+
readonly apiKey?: string;
|
|
23
|
+
constructor(options?: QueryResolverOptions);
|
|
24
|
+
addQueryToQueue(query: WrappedQuery, options?: {
|
|
25
|
+
batchKey?: string;
|
|
26
|
+
dispatch?: ApiDispatch;
|
|
27
|
+
}): Promise<Api>;
|
|
28
|
+
performQueryRequest(): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
export declare const _getDefaultQueryResolver: () => QueryResolver;
|
|
31
|
+
export declare const _setDefaultQueryResolver: (queryResolver: QueryResolver) => void;
|
|
32
|
+
export default QueryResolver;
|
|
33
33
|
//# sourceMappingURL=QueryResolver.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ApiQueries } from "../schema";
|
|
2
|
-
declare type WrapQuery<T extends keyof ApiQueries> = {
|
|
3
|
-
name: T;
|
|
4
|
-
body: ApiQueries[T][string];
|
|
5
|
-
};
|
|
6
|
-
declare type DistributeWrapQuery<T extends keyof ApiQueries> = T extends keyof ApiQueries ? WrapQuery<T> : never;
|
|
7
|
-
export declare type WrappedQuery = DistributeWrapQuery<keyof ApiQueries>;
|
|
8
|
-
export {};
|
|
1
|
+
import { ApiQueries } from "../schema";
|
|
2
|
+
declare type WrapQuery<T extends keyof ApiQueries> = {
|
|
3
|
+
name: T;
|
|
4
|
+
body: ApiQueries[T][string];
|
|
5
|
+
};
|
|
6
|
+
declare type DistributeWrapQuery<T extends keyof ApiQueries> = T extends keyof ApiQueries ? WrapQuery<T> : never;
|
|
7
|
+
export declare type WrappedQuery = DistributeWrapQuery<keyof ApiQueries>;
|
|
8
|
+
export {};
|
|
9
9
|
//# sourceMappingURL=WrappedQuery.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare function fast1a64utf(str: string): string;
|
|
2
|
-
export default fast1a64utf;
|
|
1
|
+
declare function fast1a64utf(str: string): string;
|
|
2
|
+
export default fast1a64utf;
|
|
3
3
|
//# sourceMappingURL=fast1a64utf.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApiEntities, Id } from "../schema";
|
|
2
|
-
import QueryResolver from "./QueryResolver";
|
|
3
|
-
export declare const fetchEntity: <EntityName extends keyof ApiEntities, IdType extends Id<EntityName>, Entity extends ApiEntities[EntityName][string]>(type: EntityName, id: IdType, options?: {
|
|
4
|
-
queryResolver?: QueryResolver;
|
|
5
|
-
batchKey?: string;
|
|
6
|
-
}) => Promise<Entity>;
|
|
1
|
+
import { ApiEntities, Id } from "../schema";
|
|
2
|
+
import QueryResolver from "./QueryResolver";
|
|
3
|
+
export declare const fetchEntity: <EntityName extends keyof ApiEntities, IdType extends Id<EntityName>, Entity extends ApiEntities[EntityName][string]>(type: EntityName, id: IdType, options?: {
|
|
4
|
+
queryResolver?: QueryResolver;
|
|
5
|
+
batchKey?: string;
|
|
6
|
+
}) => Promise<Entity>;
|
|
7
7
|
//# sourceMappingURL=fetchEntity.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApiQueries, ApiResponses } from "../schema";
|
|
2
|
-
import QueryResolver from "./QueryResolver";
|
|
3
|
-
export declare const fetchQuery: <QueryName extends keyof ApiQueries, QueryBody extends ApiQueries[QueryName][string], QueryResult extends NonNullable<ApiResponses[QueryName][string]>>(name: QueryName, body: QueryBody, options?: {
|
|
4
|
-
queryResolver?: QueryResolver;
|
|
5
|
-
batchKey?: string;
|
|
6
|
-
}) => Promise<QueryResult>;
|
|
1
|
+
import { ApiQueries, ApiResponses } from "../schema";
|
|
2
|
+
import QueryResolver from "./QueryResolver";
|
|
3
|
+
export declare const fetchQuery: <QueryName extends keyof ApiQueries, QueryBody extends ApiQueries[QueryName][string], QueryResult extends NonNullable<ApiResponses[QueryName][string]>>(name: QueryName, body: QueryBody, options?: {
|
|
4
|
+
queryResolver?: QueryResolver;
|
|
5
|
+
batchKey?: string;
|
|
6
|
+
}) => Promise<QueryResult>;
|
|
7
7
|
//# sourceMappingURL=fetchQuery.d.ts.map
|
package/types/api/getHash.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
interface HashableObject {
|
|
2
|
-
[key: string]: any;
|
|
3
|
-
}
|
|
4
|
-
export declare const objectToString: (data: HashableObject) => string;
|
|
5
|
-
declare const getHash: (object: HashableObject) => string;
|
|
6
|
-
export default getHash;
|
|
1
|
+
interface HashableObject {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export declare const objectToString: (data: HashableObject) => string;
|
|
5
|
+
declare const getHash: (object: HashableObject) => string;
|
|
6
|
+
export default getHash;
|
|
7
7
|
//# sourceMappingURL=getHash.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { WrappedQuery } from "./WrappedQuery";
|
|
2
|
-
export declare const getQueryHash: (query: WrappedQuery) => string;
|
|
1
|
+
import { WrappedQuery } from "./WrappedQuery";
|
|
2
|
+
export declare const getQueryHash: (query: WrappedQuery) => string;
|
|
3
3
|
//# sourceMappingURL=getQueryHash.d.ts.map
|
package/types/hooks/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { useApiDispatch } from "./useApiDispatch";
|
|
2
|
-
export { useApiSelector } from "./useApiSelector";
|
|
3
|
-
export { useApiStore } from "./useApiStore";
|
|
4
|
-
export { useEntities } from "./useEntities";
|
|
5
|
-
export { useEntity } from "./useEntity";
|
|
6
|
-
export { useQueries } from "./useQueries";
|
|
7
|
-
export { useQuery } from "./useQuery";
|
|
1
|
+
export { useApiDispatch } from "./useApiDispatch";
|
|
2
|
+
export { useApiSelector } from "./useApiSelector";
|
|
3
|
+
export { useApiStore } from "./useApiStore";
|
|
4
|
+
export { useEntities } from "./useEntities";
|
|
5
|
+
export { useEntity } from "./useEntity";
|
|
6
|
+
export { useQueries } from "./useQueries";
|
|
7
|
+
export { useQuery } from "./useQuery";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiActions } from "../actions";
|
|
2
|
-
export declare const useApiDispatch: () => (dispatch: ApiActions) => void;
|
|
3
|
-
export declare type ApiDispatch = ReturnType<typeof useApiDispatch>;
|
|
1
|
+
import { ApiActions } from "../actions";
|
|
2
|
+
export declare const useApiDispatch: () => (dispatch: ApiActions) => void;
|
|
3
|
+
export declare type ApiDispatch = ReturnType<typeof useApiDispatch>;
|
|
4
4
|
//# sourceMappingURL=useApiDispatch.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Store } from "../store";
|
|
2
|
-
declare type ApiStateSelector<R> = (state: Store) => R;
|
|
3
|
-
export declare const useApiSelector: <T>(sel: ApiStateSelector<T>, eq?: ((prev: Store, next: Store) => boolean) | undefined) => T;
|
|
4
|
-
export {};
|
|
1
|
+
import { Store } from "../store";
|
|
2
|
+
declare type ApiStateSelector<R> = (state: Store) => R;
|
|
3
|
+
export declare const useApiSelector: <T>(sel: ApiStateSelector<T>, eq?: ((prev: Store, next: Store) => boolean) | undefined) => T;
|
|
4
|
+
export {};
|
|
5
5
|
//# sourceMappingURL=useApiSelector.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Store } from "redux";
|
|
2
|
-
export declare const useApiStore: () => Store;
|
|
1
|
+
import { Store } from "redux";
|
|
2
|
+
export declare const useApiStore: () => Store;
|
|
3
3
|
//# sourceMappingURL=useApiStore.d.ts.map
|