@lustre/sdk 2.0.1-dev.2 → 2.0.1-dev.4
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/api/FetchOptions.js +2 -2
- package/dist/api/QueryError.js +54 -54
- package/dist/api/QueryResolver.js +98 -98
- package/dist/api/WrappedQuery.js +2 -2
- package/dist/api/fast1a64utf.js +135 -135
- package/dist/api/fetchEntity.js +41 -41
- package/dist/api/fetchQuery.js +31 -31
- package/dist/api/getHash.js +27 -27
- package/dist/api/getQueryHash.js +9 -9
- package/dist/index.js +39 -39
- 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/storePageInfo.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/package.json +1 -1
- package/types/api/FetchOptions.d.ts +5 -5
- package/types/api/QueryError.d.ts +29 -29
- package/types/api/QueryResolver.d.ts +31 -31
- 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/index.d.ts +10 -10
- 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 +259 -259
- 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 +10 -10
- package/types/schema/queries/brandCategoryRankings.d.ts +36 -29
- 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 +12 -12
- 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/storePageInfo.d.ts +11 -11
- 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 +37 -37
- package/types/schema/queries/whoAmI.d.ts +5 -5
- package/types/schema/queries.d.ts +82 -82
- package/types/schema/responses.d.ts +82 -82
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import "cross-fetch/polyfill";
|
|
2
|
-
import { Api } from "../schema";
|
|
3
|
-
import { WrappedQuery } from "./WrappedQuery";
|
|
4
|
-
import { QueryError } from "./QueryError";
|
|
5
|
-
export declare const _defaultBatchKey = "__DEFAULT_BATCH_KEY__";
|
|
6
|
-
declare type ResponseResolver = (response: Api) => void;
|
|
7
|
-
declare type ResponseRejector = (error: QueryError) => void;
|
|
8
|
-
declare type QueryHandler = {
|
|
9
|
-
query: WrappedQuery;
|
|
10
|
-
resolve: ResponseResolver;
|
|
11
|
-
reject: ResponseRejector;
|
|
12
|
-
};
|
|
13
|
-
interface QueryResolverOptions {
|
|
14
|
-
apiHost?: string;
|
|
15
|
-
apiKey?: string;
|
|
16
|
-
apiPath?: string;
|
|
17
|
-
}
|
|
18
|
-
declare class QueryResolver {
|
|
19
|
-
resolverQueues: Record<string, QueryHandler[]>;
|
|
20
|
-
readonly apiHost: string;
|
|
21
|
-
readonly apiKey?: string;
|
|
22
|
-
readonly apiPath?: string;
|
|
23
|
-
constructor(options?: QueryResolverOptions);
|
|
24
|
-
addQueryToQueue(query: WrappedQuery, options?: {
|
|
25
|
-
batchKey?: string;
|
|
26
|
-
}): Promise<Api>;
|
|
27
|
-
performQueryRequest(): void;
|
|
28
|
-
}
|
|
29
|
-
export declare const _getDefaultQueryResolver: () => QueryResolver;
|
|
30
|
-
export declare const _setDefaultQueryResolver: (queryResolver: QueryResolver) => void;
|
|
31
|
-
export default QueryResolver;
|
|
1
|
+
import "cross-fetch/polyfill";
|
|
2
|
+
import { Api } from "../schema";
|
|
3
|
+
import { WrappedQuery } from "./WrappedQuery";
|
|
4
|
+
import { QueryError } from "./QueryError";
|
|
5
|
+
export declare const _defaultBatchKey = "__DEFAULT_BATCH_KEY__";
|
|
6
|
+
declare type ResponseResolver = (response: Api) => void;
|
|
7
|
+
declare type ResponseRejector = (error: QueryError) => void;
|
|
8
|
+
declare type QueryHandler = {
|
|
9
|
+
query: WrappedQuery;
|
|
10
|
+
resolve: ResponseResolver;
|
|
11
|
+
reject: ResponseRejector;
|
|
12
|
+
};
|
|
13
|
+
interface QueryResolverOptions {
|
|
14
|
+
apiHost?: string;
|
|
15
|
+
apiKey?: string;
|
|
16
|
+
apiPath?: string;
|
|
17
|
+
}
|
|
18
|
+
declare class QueryResolver {
|
|
19
|
+
resolverQueues: Record<string, QueryHandler[]>;
|
|
20
|
+
readonly apiHost: string;
|
|
21
|
+
readonly apiKey?: string;
|
|
22
|
+
readonly apiPath?: string;
|
|
23
|
+
constructor(options?: QueryResolverOptions);
|
|
24
|
+
addQueryToQueue(query: WrappedQuery, options?: {
|
|
25
|
+
batchKey?: string;
|
|
26
|
+
}): Promise<Api>;
|
|
27
|
+
performQueryRequest(): void;
|
|
28
|
+
}
|
|
29
|
+
export declare const _getDefaultQueryResolver: () => QueryResolver;
|
|
30
|
+
export declare const _setDefaultQueryResolver: (queryResolver: QueryResolver) => void;
|
|
31
|
+
export default QueryResolver;
|
|
32
32
|
//# 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/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { Api, ApiEntities, ApiQueries, ApiResponses, ApiErrors, BuiltIns, Entities, Queries, Responses, HttpError, FutureError, ServerError, } from "./schema";
|
|
2
|
-
export { ALL_CURRENCY_CODES, ALL_COUNTRY_CODES } from "./schema/builtins";
|
|
3
|
-
export { fetchQuery } from "./api/fetchQuery";
|
|
4
|
-
export { fetchEntity } from "./api/fetchEntity";
|
|
5
|
-
export { getQueryHash } from "./api/getQueryHash";
|
|
6
|
-
export type { FetchOptions } from "./api/FetchOptions";
|
|
7
|
-
export type { WrappedQuery } from "./api/WrappedQuery";
|
|
8
|
-
import QueryResolver, { _getDefaultQueryResolver, _setDefaultQueryResolver } from "./api/QueryResolver";
|
|
9
|
-
export { QueryResolver, _getDefaultQueryResolver, _setDefaultQueryResolver };
|
|
10
|
-
export * from "./api/QueryError";
|
|
1
|
+
export { Api, ApiEntities, ApiQueries, ApiResponses, ApiErrors, BuiltIns, Entities, Queries, Responses, HttpError, FutureError, ServerError, } from "./schema";
|
|
2
|
+
export { ALL_CURRENCY_CODES, ALL_COUNTRY_CODES } from "./schema/builtins";
|
|
3
|
+
export { fetchQuery } from "./api/fetchQuery";
|
|
4
|
+
export { fetchEntity } from "./api/fetchEntity";
|
|
5
|
+
export { getQueryHash } from "./api/getQueryHash";
|
|
6
|
+
export type { FetchOptions } from "./api/FetchOptions";
|
|
7
|
+
export type { WrappedQuery } from "./api/WrappedQuery";
|
|
8
|
+
import QueryResolver, { _getDefaultQueryResolver, _setDefaultQueryResolver } from "./api/QueryResolver";
|
|
9
|
+
export { QueryResolver, _getDefaultQueryResolver, _setDefaultQueryResolver };
|
|
10
|
+
export * from "./api/QueryError";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
import { ApiEntities } from "../schema";
|
|
2
|
-
import * as Entities from "./entities";
|
|
3
|
-
export declare const ALL_COUNTRY_CODES: readonly ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CD", "CG", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "SZ", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"];
|
|
4
|
-
export declare const ALL_CURRENCY_CODES: readonly ["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XUA", "YER", "ZAR", "ZMW", "ZWL"];
|
|
5
|
-
interface Flavoring<FlavorT> {
|
|
6
|
-
_type?: FlavorT;
|
|
7
|
-
}
|
|
8
|
-
export declare type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
|
|
9
|
-
export declare type HtmlString = Flavor<string, string>;
|
|
10
|
-
export declare type Id<T extends keyof ApiEntities> = Flavor<string, T>;
|
|
11
|
-
export interface Entity<T extends keyof ApiEntities> {
|
|
12
|
-
id: Id<T>;
|
|
13
|
-
}
|
|
14
|
-
export declare type SortedIds<T extends AnyId> = T[];
|
|
15
|
-
export interface NonEmptySortedIds<T extends AnyId> extends Array<T> {
|
|
16
|
-
0: T;
|
|
17
|
-
}
|
|
18
|
-
export declare type AnyId = Id<keyof ApiEntities>;
|
|
19
|
-
export interface Mutation {
|
|
20
|
-
}
|
|
21
|
-
export interface Effect {
|
|
22
|
-
}
|
|
23
|
-
export declare type TimeInterval = number;
|
|
24
|
-
export declare type Timestamp = number;
|
|
25
|
-
export declare type Nullable<T> = T | null;
|
|
26
|
-
export declare type Url = string;
|
|
27
|
-
export declare type UrlSlug = string;
|
|
28
|
-
export declare type ArraySet<T> = Array<T>;
|
|
29
|
-
export declare type ArraySorted<T> = T[];
|
|
30
|
-
export interface ListQuery<F extends Record<string, any> = Record<string, never>> {
|
|
31
|
-
filters?: F;
|
|
32
|
-
}
|
|
33
|
-
export interface ListResponse<T> {
|
|
34
|
-
results: T[];
|
|
35
|
-
}
|
|
36
|
-
export declare type SortedListResponse<T> = ListResponse<T>;
|
|
37
|
-
export declare type IsoCountry = typeof ALL_COUNTRY_CODES[number];
|
|
38
|
-
export interface Money {
|
|
39
|
-
amount: MoneyAmount;
|
|
40
|
-
currency: IsoCurrency | IsoNoCurrency;
|
|
41
|
-
}
|
|
42
|
-
export declare type MoneyAmount = string;
|
|
43
|
-
export declare type IsoCurrency = typeof ALL_CURRENCY_CODES[number];
|
|
44
|
-
export declare type IsoNoCurrency = "XXX";
|
|
45
|
-
export declare type IsoTestCurrency = "XTS";
|
|
46
|
-
export declare type AnyCurrency = IsoCurrency | IsoTestCurrency | IsoNoCurrency;
|
|
47
|
-
export declare type SpecFilter = SpecFilterBool | SpecFilterNumber | SpecFilterEnum | SpecFilterSet;
|
|
48
|
-
export interface SpecFilterBool {
|
|
49
|
-
specTypeId: Entities.SpecType["id"];
|
|
50
|
-
type: "bool";
|
|
51
|
-
bool: boolean;
|
|
52
|
-
}
|
|
53
|
-
export interface SpecFilterNumber {
|
|
54
|
-
specTypeId: Entities.SpecType["id"];
|
|
55
|
-
type: "number";
|
|
56
|
-
number: {
|
|
57
|
-
min?: number;
|
|
58
|
-
max?: number;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
export interface SpecFilterEnum {
|
|
62
|
-
specTypeId: Entities.SpecType["id"];
|
|
63
|
-
type: "enum";
|
|
64
|
-
enum: Entities.SpecTypeChoice["id"];
|
|
65
|
-
}
|
|
66
|
-
export interface SpecFilterSet {
|
|
67
|
-
specTypeId: Entities.SpecType["id"];
|
|
68
|
-
type: "set";
|
|
69
|
-
set: Entities.SpecTypeChoice["id"][];
|
|
70
|
-
}
|
|
71
|
-
interface SearchSpecFilterBase<Type, Value> {
|
|
72
|
-
type: Type;
|
|
73
|
-
name: string;
|
|
74
|
-
value: Value;
|
|
75
|
-
}
|
|
76
|
-
export declare type SearchSpecFilterString = SearchSpecFilterBase<"string", string>;
|
|
77
|
-
export declare type SearchSpecFilterBoolean = SearchSpecFilterBase<"boolean", boolean>;
|
|
78
|
-
export declare type SearchSpecFilterDouble = SearchSpecFilterBase<"double", number>;
|
|
79
|
-
export declare type SearchSpecFilterRange = SearchSpecFilterBase<"range", {
|
|
80
|
-
min: number;
|
|
81
|
-
max: number;
|
|
82
|
-
}>;
|
|
83
|
-
export declare type SearchSpecFilter = SearchSpecFilterString | SearchSpecFilterBoolean | SearchSpecFilterDouble | SearchSpecFilterRange;
|
|
84
|
-
interface SpecAggregationBase<Type extends string, Value> {
|
|
85
|
-
type: Type;
|
|
86
|
-
name: string;
|
|
87
|
-
unit: string;
|
|
88
|
-
buckets: {
|
|
89
|
-
value: Value;
|
|
90
|
-
count: number;
|
|
91
|
-
}[];
|
|
92
|
-
}
|
|
93
|
-
export declare type SpecAggregationDouble = SpecAggregationBase<"double", number>;
|
|
94
|
-
export declare type SpecAggregationBoolean = SpecAggregationBase<"boolean", boolean>;
|
|
95
|
-
export declare type SpecAggregationString = SpecAggregationBase<"string", string>;
|
|
96
|
-
export declare type SpecAggregation = SpecAggregationDouble | SpecAggregationBoolean | SpecAggregationString;
|
|
97
|
-
export declare type DisplayMode = "winners" | "hidden";
|
|
98
|
-
export declare type DisplayModeWithDefault = DisplayMode | "default";
|
|
99
|
-
export declare type SearchDisplayMode = "all" | "broad" | "default";
|
|
100
|
-
export declare type BadgeStates = "yes" | "no" | "maybe" | "low_data";
|
|
101
|
-
export declare type MarkdownString = string;
|
|
102
|
-
export interface ProductDocument {
|
|
103
|
-
name: string;
|
|
104
|
-
baseScore: number;
|
|
105
|
-
category: string;
|
|
106
|
-
modifiers: string[];
|
|
107
|
-
stablePrice: Money;
|
|
108
|
-
productTypeId: Entities.ProductType["id"];
|
|
109
|
-
productFamilyId: Entities.ProductFamily["id"];
|
|
110
|
-
productGenerationId: Entities.ProductGeneration["id"];
|
|
111
|
-
productBrandId: Entities.Brand["id"];
|
|
112
|
-
media: Entities.Media[];
|
|
113
|
-
storePages: Entities.StorePage[];
|
|
114
|
-
preferredRatingData: {
|
|
115
|
-
rating: Entities.Rating;
|
|
116
|
-
source: Entities.Source & {
|
|
117
|
-
trust: 0 | 1 | 2 | 3 | null;
|
|
118
|
-
};
|
|
119
|
-
crawl: Entities.Crawl;
|
|
120
|
-
}[];
|
|
121
|
-
preferredRatingCount: number;
|
|
122
|
-
}
|
|
123
|
-
export {};
|
|
1
|
+
import { ApiEntities } from "../schema";
|
|
2
|
+
import * as Entities from "./entities";
|
|
3
|
+
export declare const ALL_COUNTRY_CODES: readonly ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CD", "CG", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "SZ", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"];
|
|
4
|
+
export declare const ALL_CURRENCY_CODES: readonly ["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XUA", "YER", "ZAR", "ZMW", "ZWL"];
|
|
5
|
+
interface Flavoring<FlavorT> {
|
|
6
|
+
_type?: FlavorT;
|
|
7
|
+
}
|
|
8
|
+
export declare type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
|
|
9
|
+
export declare type HtmlString = Flavor<string, string>;
|
|
10
|
+
export declare type Id<T extends keyof ApiEntities> = Flavor<string, T>;
|
|
11
|
+
export interface Entity<T extends keyof ApiEntities> {
|
|
12
|
+
id: Id<T>;
|
|
13
|
+
}
|
|
14
|
+
export declare type SortedIds<T extends AnyId> = T[];
|
|
15
|
+
export interface NonEmptySortedIds<T extends AnyId> extends Array<T> {
|
|
16
|
+
0: T;
|
|
17
|
+
}
|
|
18
|
+
export declare type AnyId = Id<keyof ApiEntities>;
|
|
19
|
+
export interface Mutation {
|
|
20
|
+
}
|
|
21
|
+
export interface Effect {
|
|
22
|
+
}
|
|
23
|
+
export declare type TimeInterval = number;
|
|
24
|
+
export declare type Timestamp = number;
|
|
25
|
+
export declare type Nullable<T> = T | null;
|
|
26
|
+
export declare type Url = string;
|
|
27
|
+
export declare type UrlSlug = string;
|
|
28
|
+
export declare type ArraySet<T> = Array<T>;
|
|
29
|
+
export declare type ArraySorted<T> = T[];
|
|
30
|
+
export interface ListQuery<F extends Record<string, any> = Record<string, never>> {
|
|
31
|
+
filters?: F;
|
|
32
|
+
}
|
|
33
|
+
export interface ListResponse<T> {
|
|
34
|
+
results: T[];
|
|
35
|
+
}
|
|
36
|
+
export declare type SortedListResponse<T> = ListResponse<T>;
|
|
37
|
+
export declare type IsoCountry = typeof ALL_COUNTRY_CODES[number];
|
|
38
|
+
export interface Money {
|
|
39
|
+
amount: MoneyAmount;
|
|
40
|
+
currency: IsoCurrency | IsoNoCurrency;
|
|
41
|
+
}
|
|
42
|
+
export declare type MoneyAmount = string;
|
|
43
|
+
export declare type IsoCurrency = typeof ALL_CURRENCY_CODES[number];
|
|
44
|
+
export declare type IsoNoCurrency = "XXX";
|
|
45
|
+
export declare type IsoTestCurrency = "XTS";
|
|
46
|
+
export declare type AnyCurrency = IsoCurrency | IsoTestCurrency | IsoNoCurrency;
|
|
47
|
+
export declare type SpecFilter = SpecFilterBool | SpecFilterNumber | SpecFilterEnum | SpecFilterSet;
|
|
48
|
+
export interface SpecFilterBool {
|
|
49
|
+
specTypeId: Entities.SpecType["id"];
|
|
50
|
+
type: "bool";
|
|
51
|
+
bool: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface SpecFilterNumber {
|
|
54
|
+
specTypeId: Entities.SpecType["id"];
|
|
55
|
+
type: "number";
|
|
56
|
+
number: {
|
|
57
|
+
min?: number;
|
|
58
|
+
max?: number;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export interface SpecFilterEnum {
|
|
62
|
+
specTypeId: Entities.SpecType["id"];
|
|
63
|
+
type: "enum";
|
|
64
|
+
enum: Entities.SpecTypeChoice["id"];
|
|
65
|
+
}
|
|
66
|
+
export interface SpecFilterSet {
|
|
67
|
+
specTypeId: Entities.SpecType["id"];
|
|
68
|
+
type: "set";
|
|
69
|
+
set: Entities.SpecTypeChoice["id"][];
|
|
70
|
+
}
|
|
71
|
+
interface SearchSpecFilterBase<Type, Value> {
|
|
72
|
+
type: Type;
|
|
73
|
+
name: string;
|
|
74
|
+
value: Value;
|
|
75
|
+
}
|
|
76
|
+
export declare type SearchSpecFilterString = SearchSpecFilterBase<"string", string>;
|
|
77
|
+
export declare type SearchSpecFilterBoolean = SearchSpecFilterBase<"boolean", boolean>;
|
|
78
|
+
export declare type SearchSpecFilterDouble = SearchSpecFilterBase<"double", number>;
|
|
79
|
+
export declare type SearchSpecFilterRange = SearchSpecFilterBase<"range", {
|
|
80
|
+
min: number;
|
|
81
|
+
max: number;
|
|
82
|
+
}>;
|
|
83
|
+
export declare type SearchSpecFilter = SearchSpecFilterString | SearchSpecFilterBoolean | SearchSpecFilterDouble | SearchSpecFilterRange;
|
|
84
|
+
interface SpecAggregationBase<Type extends string, Value> {
|
|
85
|
+
type: Type;
|
|
86
|
+
name: string;
|
|
87
|
+
unit: string;
|
|
88
|
+
buckets: {
|
|
89
|
+
value: Value;
|
|
90
|
+
count: number;
|
|
91
|
+
}[];
|
|
92
|
+
}
|
|
93
|
+
export declare type SpecAggregationDouble = SpecAggregationBase<"double", number>;
|
|
94
|
+
export declare type SpecAggregationBoolean = SpecAggregationBase<"boolean", boolean>;
|
|
95
|
+
export declare type SpecAggregationString = SpecAggregationBase<"string", string>;
|
|
96
|
+
export declare type SpecAggregation = SpecAggregationDouble | SpecAggregationBoolean | SpecAggregationString;
|
|
97
|
+
export declare type DisplayMode = "winners" | "hidden";
|
|
98
|
+
export declare type DisplayModeWithDefault = DisplayMode | "default";
|
|
99
|
+
export declare type SearchDisplayMode = "all" | "broad" | "default";
|
|
100
|
+
export declare type BadgeStates = "yes" | "no" | "maybe" | "low_data";
|
|
101
|
+
export declare type MarkdownString = string;
|
|
102
|
+
export interface ProductDocument {
|
|
103
|
+
name: string;
|
|
104
|
+
baseScore: number;
|
|
105
|
+
category: string;
|
|
106
|
+
modifiers: string[];
|
|
107
|
+
stablePrice: Money;
|
|
108
|
+
productTypeId: Entities.ProductType["id"];
|
|
109
|
+
productFamilyId: Entities.ProductFamily["id"];
|
|
110
|
+
productGenerationId: Entities.ProductGeneration["id"];
|
|
111
|
+
productBrandId: Entities.Brand["id"];
|
|
112
|
+
media: Entities.Media[];
|
|
113
|
+
storePages: Entities.StorePage[];
|
|
114
|
+
preferredRatingData: {
|
|
115
|
+
rating: Entities.Rating;
|
|
116
|
+
source: Entities.Source & {
|
|
117
|
+
trust: 0 | 1 | 2 | 3 | null;
|
|
118
|
+
};
|
|
119
|
+
crawl: Entities.Crawl;
|
|
120
|
+
}[];
|
|
121
|
+
preferredRatingCount: number;
|
|
122
|
+
}
|
|
123
|
+
export {};
|
|
124
124
|
//# sourceMappingURL=builtins.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Entity } from "../builtins";
|
|
2
|
-
export interface Alias extends Entity<"alias"> {
|
|
3
|
-
isInvalid: boolean;
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
1
|
+
import { Entity } from "../builtins";
|
|
2
|
+
export interface Alias extends Entity<"alias"> {
|
|
3
|
+
isInvalid: boolean;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=alias.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Entity } from "../builtins";
|
|
2
|
-
export interface Brand extends Entity<"brand"> {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
1
|
+
import { Entity } from "../builtins";
|
|
2
|
+
export interface Brand extends Entity<"brand"> {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=brand.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Entity, Nullable, UrlSlug } from "../builtins";
|
|
2
|
-
export interface Category extends Entity<"category"> {
|
|
3
|
-
name: string;
|
|
4
|
-
pluralName: Nullable<string>;
|
|
5
|
-
urlSlug: UrlSlug;
|
|
6
|
-
}
|
|
1
|
+
import { Entity, Nullable, UrlSlug } from "../builtins";
|
|
2
|
+
export interface Category extends Entity<"category"> {
|
|
3
|
+
name: string;
|
|
4
|
+
pluralName: Nullable<string>;
|
|
5
|
+
urlSlug: UrlSlug;
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=category.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Entity, Nullable, Timestamp, Url } from "../builtins";
|
|
2
|
-
import { Source } from "./source";
|
|
3
|
-
export interface Crawl extends Entity<"crawl"> {
|
|
4
|
-
accessedAt: Timestamp;
|
|
5
|
-
kind: "review" | "roundup";
|
|
6
|
-
publishedAt: Nullable<Timestamp>;
|
|
7
|
-
sourceId: Source["id"];
|
|
8
|
-
title: string;
|
|
9
|
-
updatedAt: Nullable<Timestamp>;
|
|
10
|
-
url: Url;
|
|
11
|
-
}
|
|
1
|
+
import { Entity, Nullable, Timestamp, Url } from "../builtins";
|
|
2
|
+
import { Source } from "./source";
|
|
3
|
+
export interface Crawl extends Entity<"crawl"> {
|
|
4
|
+
accessedAt: Timestamp;
|
|
5
|
+
kind: "review" | "roundup";
|
|
6
|
+
publishedAt: Nullable<Timestamp>;
|
|
7
|
+
sourceId: Source["id"];
|
|
8
|
+
title: string;
|
|
9
|
+
updatedAt: Nullable<Timestamp>;
|
|
10
|
+
url: Url;
|
|
11
|
+
}
|
|
12
12
|
//# sourceMappingURL=crawl.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * from "./alias";
|
|
2
|
-
export * from "./brand";
|
|
3
|
-
export * from "./category";
|
|
4
|
-
export * from "./crawl";
|
|
5
|
-
export * from "./media";
|
|
6
|
-
export * from "./offer";
|
|
7
|
-
export * from "./productConfiguration";
|
|
8
|
-
export * from "./productFamily";
|
|
9
|
-
export * from "./productGeneration";
|
|
10
|
-
export * from "./productType";
|
|
11
|
-
export * from "./rating";
|
|
12
|
-
export * from "./source";
|
|
13
|
-
export * from "./spec";
|
|
14
|
-
export * from "./specTypeChoice";
|
|
15
|
-
export * from "./specType";
|
|
16
|
-
export * from "./storePage";
|
|
17
|
-
export * from "./user";
|
|
1
|
+
export * from "./alias";
|
|
2
|
+
export * from "./brand";
|
|
3
|
+
export * from "./category";
|
|
4
|
+
export * from "./crawl";
|
|
5
|
+
export * from "./media";
|
|
6
|
+
export * from "./offer";
|
|
7
|
+
export * from "./productConfiguration";
|
|
8
|
+
export * from "./productFamily";
|
|
9
|
+
export * from "./productGeneration";
|
|
10
|
+
export * from "./productType";
|
|
11
|
+
export * from "./rating";
|
|
12
|
+
export * from "./source";
|
|
13
|
+
export * from "./spec";
|
|
14
|
+
export * from "./specTypeChoice";
|
|
15
|
+
export * from "./specType";
|
|
16
|
+
export * from "./storePage";
|
|
17
|
+
export * from "./user";
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Entity, Url } from "../builtins";
|
|
2
|
-
export interface Media extends Entity<"media"> {
|
|
3
|
-
hostedUrl: Url;
|
|
4
|
-
sourceUrl: Url;
|
|
5
|
-
}
|
|
1
|
+
import { Entity, Url } from "../builtins";
|
|
2
|
+
export interface Media extends Entity<"media"> {
|
|
3
|
+
hostedUrl: Url;
|
|
4
|
+
sourceUrl: Url;
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=media.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Entity, Timestamp, Money, Nullable } from "../builtins";
|
|
2
|
-
export interface Offer extends Entity<"offer"> {
|
|
3
|
-
at: Timestamp;
|
|
4
|
-
isFirstParty: Nullable<boolean>;
|
|
5
|
-
isInStock: Nullable<boolean>;
|
|
6
|
-
isPrimaryListing: Nullable<boolean>;
|
|
7
|
-
isValid: boolean;
|
|
8
|
-
list: Money;
|
|
9
|
-
sale: Money;
|
|
10
|
-
}
|
|
1
|
+
import { Entity, Timestamp, Money, Nullable } from "../builtins";
|
|
2
|
+
export interface Offer extends Entity<"offer"> {
|
|
3
|
+
at: Timestamp;
|
|
4
|
+
isFirstParty: Nullable<boolean>;
|
|
5
|
+
isInStock: Nullable<boolean>;
|
|
6
|
+
isPrimaryListing: Nullable<boolean>;
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
list: Money;
|
|
9
|
+
sale: Money;
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=offer.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Entity } from "../builtins";
|
|
2
|
-
export interface ProductConfiguration extends Entity<"productConfiguration"> {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
1
|
+
import { Entity } from "../builtins";
|
|
2
|
+
export interface ProductConfiguration extends Entity<"productConfiguration"> {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=productConfiguration.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Entity } from "../builtins";
|
|
2
|
-
export interface ProductFamily extends Entity<"productFamily"> {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
1
|
+
import { Entity } from "../builtins";
|
|
2
|
+
export interface ProductFamily extends Entity<"productFamily"> {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=productFamily.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Entity } from "../builtins";
|
|
2
|
-
export interface ProductGeneration extends Entity<"productGeneration"> {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
1
|
+
import { Entity } from "../builtins";
|
|
2
|
+
export interface ProductGeneration extends Entity<"productGeneration"> {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=productGeneration.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Entity } from "../builtins";
|
|
2
|
-
export interface ProductType extends Entity<"productType"> {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
1
|
+
import { Entity } from "../builtins";
|
|
2
|
+
export interface ProductType extends Entity<"productType"> {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=productType.d.ts.map
|