@maixio/pstore 0.1.0
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/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +515 -0
- package/README.zh-CN.md +610 -0
- package/dist/api/batarang.d.ts +25 -0
- package/dist/api/browse.d.ts +64 -0
- package/dist/api/catalog-discovery.d.ts +40 -0
- package/dist/api/catalog-registry.d.ts +21 -0
- package/dist/api/catalog-validation.d.ts +21 -0
- package/dist/api/category-names.d.ts +2 -0
- package/dist/api/graphql.d.ts +216 -0
- package/dist/api/search.d.ts +23 -0
- package/dist/api/status.d.ts +81 -0
- package/dist/build-record.d.ts +20 -0
- package/dist/cache.d.ts +25 -0
- package/dist/cli.js +5500 -0
- package/dist/client.d.ts +47 -0
- package/dist/config.d.ts +30 -0
- package/dist/fetch.d.ts +19 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +2107 -0
- package/dist/locale.d.ts +12 -0
- package/dist/log.d.ts +31 -0
- package/dist/perf.d.ts +16 -0
- package/dist/provider.d.ts +16 -0
- package/dist/types.d.ts +253 -0
- package/dist/utils.d.ts +54 -0
- package/package.json +76 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { PsnLocale } from "../types.js";
|
|
2
|
+
export interface CatalogDiscoveryPage {
|
|
3
|
+
alias: string;
|
|
4
|
+
url: string;
|
|
5
|
+
depth: number;
|
|
6
|
+
title?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CatalogDiscoveryCatalog {
|
|
9
|
+
id: string;
|
|
10
|
+
url: string;
|
|
11
|
+
depth: number;
|
|
12
|
+
label?: string;
|
|
13
|
+
displayName?: string;
|
|
14
|
+
localizedName?: string;
|
|
15
|
+
reportingName?: string;
|
|
16
|
+
sourcePageAlias?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CatalogDiscoveryResult {
|
|
19
|
+
pages: CatalogDiscoveryPage[];
|
|
20
|
+
catalogs: CatalogDiscoveryCatalog[];
|
|
21
|
+
}
|
|
22
|
+
export interface DiscoverCatalogsOptions {
|
|
23
|
+
locale?: PsnLocale;
|
|
24
|
+
maxDepth?: number;
|
|
25
|
+
concurrency?: number;
|
|
26
|
+
maxPages?: number;
|
|
27
|
+
maxCatalogs?: number;
|
|
28
|
+
}
|
|
29
|
+
export declare function discoverCatalogs(opts?: DiscoverCatalogsOptions): Promise<CatalogDiscoveryResult>;
|
|
30
|
+
export declare function extractPageAliases(html: string): string[];
|
|
31
|
+
export declare function extractCategoryIds(html: string): string[];
|
|
32
|
+
export declare function extractCategoryTitles(html: string): Map<string, string>;
|
|
33
|
+
export interface CategoryDiscoveryMetadata {
|
|
34
|
+
id: string;
|
|
35
|
+
displayName?: string;
|
|
36
|
+
localizedName?: string;
|
|
37
|
+
reportingName?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function extractCategoryMetadata(html: string, locale?: PsnLocale): Map<string, CategoryDiscoveryMetadata>;
|
|
40
|
+
export declare function extractPageTitle(html: string): string | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PsnLocale } from "../types.js";
|
|
2
|
+
export type CatalogRegistrySource = "built-in" | "manual" | "live" | "validated";
|
|
3
|
+
export type CatalogVisibility = "visible" | "hidden" | "unknown";
|
|
4
|
+
export interface CatalogRegistryEntry {
|
|
5
|
+
id: string;
|
|
6
|
+
alias: string;
|
|
7
|
+
localizedName?: string;
|
|
8
|
+
displayName?: Partial<Record<PsnLocale, string>> & {
|
|
9
|
+
default?: string;
|
|
10
|
+
};
|
|
11
|
+
visibility?: Partial<Record<PsnLocale, CatalogVisibility>> & {
|
|
12
|
+
default?: CatalogVisibility;
|
|
13
|
+
};
|
|
14
|
+
source: CatalogRegistrySource;
|
|
15
|
+
notes?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const BUILTIN_CATALOGS: CatalogRegistryEntry[];
|
|
18
|
+
export declare const CATALOG_ALIASES: Record<string, string>;
|
|
19
|
+
export declare function resolveCatalogAlias(input: string): CatalogRegistryEntry | undefined;
|
|
20
|
+
export declare function resolveCatalogDisplayName(entry: CatalogRegistryEntry, locale?: PsnLocale): string | undefined;
|
|
21
|
+
export declare function resolveCatalogVisibility(entry: CatalogRegistryEntry, locale?: PsnLocale): CatalogVisibility;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PsnLocale } from "../types.js";
|
|
2
|
+
import { type CatalogRegistryEntry } from "./catalog-registry.js";
|
|
3
|
+
export interface CatalogValidationOptions {
|
|
4
|
+
locale?: PsnLocale;
|
|
5
|
+
entries?: CatalogRegistryEntry[];
|
|
6
|
+
size?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface CatalogValidationResult {
|
|
9
|
+
alias: string;
|
|
10
|
+
id: string;
|
|
11
|
+
locale: PsnLocale;
|
|
12
|
+
ok: boolean;
|
|
13
|
+
totalCount?: number;
|
|
14
|
+
itemCount?: number;
|
|
15
|
+
localizedName?: string;
|
|
16
|
+
displayName?: string;
|
|
17
|
+
reportingName?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function validateCatalog(entry: CatalogRegistryEntry, options?: Omit<CatalogValidationOptions, "entries">): Promise<CatalogValidationResult>;
|
|
21
|
+
export declare function validateCatalogs(options?: CatalogValidationOptions): Promise<CatalogValidationResult[]>;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import type { ConceptId, ProductId, PsnLocale, Price, StarRating, ContentRating } from "../types.js";
|
|
2
|
+
export interface TelemetryResult {
|
|
3
|
+
idType?: "concept" | "product";
|
|
4
|
+
conceptId: string;
|
|
5
|
+
productId?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
productName?: string;
|
|
8
|
+
edition?: string;
|
|
9
|
+
genres?: string[];
|
|
10
|
+
skus?: Array<{
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
displayPrice?: string;
|
|
14
|
+
price?: number;
|
|
15
|
+
type?: string;
|
|
16
|
+
}>;
|
|
17
|
+
starRating?: {
|
|
18
|
+
averageRating: number;
|
|
19
|
+
};
|
|
20
|
+
price?: {
|
|
21
|
+
basePrice?: string | null;
|
|
22
|
+
basePriceValue?: number | null;
|
|
23
|
+
discountedPrice?: string | null;
|
|
24
|
+
discountedValue?: number | null;
|
|
25
|
+
discountText?: string | null;
|
|
26
|
+
currencyCode?: string | null;
|
|
27
|
+
endTime?: string | null;
|
|
28
|
+
};
|
|
29
|
+
npTitleId?: string;
|
|
30
|
+
classification?: string;
|
|
31
|
+
topCategory?: string;
|
|
32
|
+
platforms?: string[];
|
|
33
|
+
releaseDate?: string;
|
|
34
|
+
contentRating?: ContentRating | null;
|
|
35
|
+
}
|
|
36
|
+
export declare function fetchTelemetry(conceptId: ConceptId, locale?: string): Promise<TelemetryResult | null>;
|
|
37
|
+
export declare function fetchTelemetryByProduct(productId: ProductId, locale?: string): Promise<TelemetryResult | null>;
|
|
38
|
+
export interface PriceResult {
|
|
39
|
+
price?: Price;
|
|
40
|
+
conceptId?: string;
|
|
41
|
+
productId?: string;
|
|
42
|
+
products?: Array<{
|
|
43
|
+
id: string;
|
|
44
|
+
name?: string;
|
|
45
|
+
edition?: string;
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
48
|
+
export declare function fetchPrice(conceptId: ConceptId, locale?: string): Promise<PriceResult | null>;
|
|
49
|
+
export declare function fetchPriceByProduct(productId: ProductId, locale?: string): Promise<PriceResult | null>;
|
|
50
|
+
export interface RatingResult {
|
|
51
|
+
conceptId?: string;
|
|
52
|
+
productId?: string;
|
|
53
|
+
name?: string;
|
|
54
|
+
starRating?: StarRating;
|
|
55
|
+
classification?: string;
|
|
56
|
+
topCategory?: string;
|
|
57
|
+
releaseDate?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function fetchRating(conceptId: ConceptId, locale?: string): Promise<RatingResult | null>;
|
|
60
|
+
export declare function fetchRatingByProduct(productId: ProductId, locale?: string): Promise<RatingResult | null>;
|
|
61
|
+
export interface UpsellResult {
|
|
62
|
+
conceptId?: string;
|
|
63
|
+
productId?: string;
|
|
64
|
+
media?: Array<{
|
|
65
|
+
role: string;
|
|
66
|
+
type: string;
|
|
67
|
+
url: string;
|
|
68
|
+
}>;
|
|
69
|
+
products?: Array<{
|
|
70
|
+
id: string;
|
|
71
|
+
name?: string;
|
|
72
|
+
edition?: string;
|
|
73
|
+
editionType?: string;
|
|
74
|
+
platforms?: string[];
|
|
75
|
+
classification?: string;
|
|
76
|
+
price?: Price;
|
|
77
|
+
media?: Array<{
|
|
78
|
+
role: string;
|
|
79
|
+
type: string;
|
|
80
|
+
url: string;
|
|
81
|
+
}>;
|
|
82
|
+
}>;
|
|
83
|
+
}
|
|
84
|
+
export declare function fetchUpsell(conceptId: ConceptId, locale?: string): Promise<UpsellResult | null>;
|
|
85
|
+
export declare function fetchUpsellByProduct(productId: ProductId, locale?: string): Promise<UpsellResult | null>;
|
|
86
|
+
export interface SearchParams {
|
|
87
|
+
searchTerm: string;
|
|
88
|
+
countryCode?: string;
|
|
89
|
+
languageCode?: string;
|
|
90
|
+
pageSize?: number;
|
|
91
|
+
pageOffset?: number;
|
|
92
|
+
nextCursor?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface SearchResultItem {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
type: "concept" | "product";
|
|
98
|
+
price?: string;
|
|
99
|
+
platforms?: string[];
|
|
100
|
+
classification?: string;
|
|
101
|
+
}
|
|
102
|
+
export interface SearchResponseData {
|
|
103
|
+
universalSearch?: {
|
|
104
|
+
results?: Array<Record<string, unknown>>;
|
|
105
|
+
};
|
|
106
|
+
[key: string]: unknown;
|
|
107
|
+
}
|
|
108
|
+
export declare function fetchSearchResults(params: SearchParams): Promise<SearchResultItem[] | null>;
|
|
109
|
+
export declare function parseSearchResults(data: SearchResponseData | null | undefined): SearchResultItem[];
|
|
110
|
+
export interface CategoryGridParams {
|
|
111
|
+
id: string;
|
|
112
|
+
offset?: number;
|
|
113
|
+
size?: number;
|
|
114
|
+
sortBy?: string | Record<string, unknown> | null;
|
|
115
|
+
filterBy?: string[];
|
|
116
|
+
maxResults?: number | null;
|
|
117
|
+
locale?: PsnLocale;
|
|
118
|
+
}
|
|
119
|
+
export interface CategoryGridItem {
|
|
120
|
+
id: string;
|
|
121
|
+
name: string;
|
|
122
|
+
type: "concept" | "product";
|
|
123
|
+
price?: string;
|
|
124
|
+
platforms?: string[];
|
|
125
|
+
classification?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface CategoryGridPageInfo {
|
|
128
|
+
totalCount: number;
|
|
129
|
+
offset: number;
|
|
130
|
+
size: number;
|
|
131
|
+
isLast: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface CategorySortingOption {
|
|
134
|
+
name: string;
|
|
135
|
+
displayName?: string;
|
|
136
|
+
isAscending: boolean;
|
|
137
|
+
}
|
|
138
|
+
export interface CategoryFacetValue {
|
|
139
|
+
key: string;
|
|
140
|
+
displayName?: string;
|
|
141
|
+
count: number;
|
|
142
|
+
}
|
|
143
|
+
export interface CategoryFacet {
|
|
144
|
+
name: string;
|
|
145
|
+
displayName?: string;
|
|
146
|
+
values: CategoryFacetValue[];
|
|
147
|
+
}
|
|
148
|
+
export interface CategoryGridResult {
|
|
149
|
+
id: string;
|
|
150
|
+
localizedName?: string;
|
|
151
|
+
displayName?: string;
|
|
152
|
+
reportingName?: string;
|
|
153
|
+
pageInfo?: CategoryGridPageInfo;
|
|
154
|
+
sortedBy?: CategorySortingOption;
|
|
155
|
+
sortingOptions?: CategorySortingOption[];
|
|
156
|
+
facets?: CategoryFacet[];
|
|
157
|
+
items: CategoryGridItem[];
|
|
158
|
+
}
|
|
159
|
+
interface CategoryGridRawResponse {
|
|
160
|
+
categoryGridRetrieve?: {
|
|
161
|
+
concepts?: Array<{
|
|
162
|
+
__typename?: string;
|
|
163
|
+
id: string;
|
|
164
|
+
name?: string;
|
|
165
|
+
price?: {
|
|
166
|
+
basePrice?: string;
|
|
167
|
+
discountedPrice?: string;
|
|
168
|
+
};
|
|
169
|
+
platforms?: string[];
|
|
170
|
+
storeDisplayClassification?: string;
|
|
171
|
+
localizedStoreDisplayClassification?: string;
|
|
172
|
+
}>;
|
|
173
|
+
products?: Array<{
|
|
174
|
+
__typename?: string;
|
|
175
|
+
id: string;
|
|
176
|
+
name?: string;
|
|
177
|
+
displayPrice?: string;
|
|
178
|
+
platforms?: string[];
|
|
179
|
+
storeDisplayClassification?: string;
|
|
180
|
+
localizedStoreDisplayClassification?: string;
|
|
181
|
+
}>;
|
|
182
|
+
pageInfo?: {
|
|
183
|
+
totalCount: number;
|
|
184
|
+
offset: number;
|
|
185
|
+
size: number;
|
|
186
|
+
isLast: boolean;
|
|
187
|
+
};
|
|
188
|
+
sortedBy?: {
|
|
189
|
+
name: string;
|
|
190
|
+
displayName?: string;
|
|
191
|
+
isAscending: boolean;
|
|
192
|
+
};
|
|
193
|
+
sortingOptions?: Array<{
|
|
194
|
+
name: string;
|
|
195
|
+
displayName?: string;
|
|
196
|
+
isAscending: boolean;
|
|
197
|
+
}>;
|
|
198
|
+
facetOptions?: Array<{
|
|
199
|
+
name: string;
|
|
200
|
+
displayName?: string;
|
|
201
|
+
values?: Array<{
|
|
202
|
+
key: string;
|
|
203
|
+
displayName?: string;
|
|
204
|
+
count: number;
|
|
205
|
+
}>;
|
|
206
|
+
}>;
|
|
207
|
+
localizedName?: string;
|
|
208
|
+
reportingName?: string;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
export declare function fetchCategoryGrid(params: CategoryGridParams): Promise<CategoryGridItem[] | null>;
|
|
212
|
+
export declare function fetchCategoryGridResult(params: CategoryGridParams): Promise<CategoryGridResult | null>;
|
|
213
|
+
export declare function parseCategoryGridResult(id: string, grid: NonNullable<CategoryGridRawResponse["categoryGridRetrieve"]>, locale?: PsnLocale): CategoryGridResult;
|
|
214
|
+
export declare function parseCategoryGridItems(grid: NonNullable<CategoryGridRawResponse["categoryGridRetrieve"]>): CategoryGridItem[];
|
|
215
|
+
export declare function clearCategoryCache(): void;
|
|
216
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PsnLocale } from "../types.js";
|
|
2
|
+
import { type SearchResultItem } from "./graphql.js";
|
|
3
|
+
export interface SearchOptions {
|
|
4
|
+
term: string;
|
|
5
|
+
locale?: PsnLocale;
|
|
6
|
+
page?: number;
|
|
7
|
+
size?: number;
|
|
8
|
+
nextCursor?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SearchResponse {
|
|
11
|
+
hits: SearchResultItem[];
|
|
12
|
+
page: number;
|
|
13
|
+
size: number;
|
|
14
|
+
nextCursor?: string;
|
|
15
|
+
isLast?: boolean;
|
|
16
|
+
total?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Search PSN Store games.
|
|
20
|
+
*/
|
|
21
|
+
export declare function searchGames(options: SearchOptions): Promise<SearchResponse>;
|
|
22
|
+
export declare function parseSearchResponse(rawData: Record<string, unknown> | null | undefined, page: number, size: number): SearchResponse;
|
|
23
|
+
export declare function clearSearchCache(): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { PsnLocale } from "../types.js";
|
|
2
|
+
export type PsnStatusRegion = "SCEA" | "SCEE" | "SCEJA";
|
|
3
|
+
export type PsnServiceStatus = "ok" | "degraded" | "maintenance" | "outage";
|
|
4
|
+
export interface PsnStatusOptions {
|
|
5
|
+
locale?: PsnLocale;
|
|
6
|
+
region?: PsnStatusRegion;
|
|
7
|
+
country?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PsnStatusService {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
status: PsnServiceStatus;
|
|
13
|
+
incidents: PsnStatusIncident[];
|
|
14
|
+
resources?: PsnStatusServiceResource[];
|
|
15
|
+
}
|
|
16
|
+
export interface PsnStatusServiceResource {
|
|
17
|
+
name: string;
|
|
18
|
+
status: PsnServiceStatus;
|
|
19
|
+
incidents: PsnStatusIncident[];
|
|
20
|
+
}
|
|
21
|
+
export interface PsnStatusIncident {
|
|
22
|
+
id?: string;
|
|
23
|
+
statusType: string;
|
|
24
|
+
message?: string;
|
|
25
|
+
startDate?: string;
|
|
26
|
+
modifiedDate?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface PsnStatusResult {
|
|
29
|
+
region: PsnStatusRegion;
|
|
30
|
+
country: string;
|
|
31
|
+
locale: PsnLocale;
|
|
32
|
+
overallStatus: PsnServiceStatus;
|
|
33
|
+
generatedAt?: string;
|
|
34
|
+
updatedAt?: string;
|
|
35
|
+
refreshIntervalMs?: number;
|
|
36
|
+
services: PsnStatusService[];
|
|
37
|
+
incidents: PsnStatusIncident[];
|
|
38
|
+
}
|
|
39
|
+
interface RawStatusResponse {
|
|
40
|
+
regionName?: string;
|
|
41
|
+
generatedAt?: string;
|
|
42
|
+
status?: RawStatusEntry[];
|
|
43
|
+
countries?: RawCountryStatus[];
|
|
44
|
+
}
|
|
45
|
+
interface RawCountryStatus {
|
|
46
|
+
countryCode?: string;
|
|
47
|
+
countryName?: string;
|
|
48
|
+
status?: RawStatusEntry[];
|
|
49
|
+
services?: RawServiceStatus[];
|
|
50
|
+
}
|
|
51
|
+
interface RawServiceStatus {
|
|
52
|
+
serviceId?: string;
|
|
53
|
+
serviceName?: string;
|
|
54
|
+
i18n?: Record<string, string>;
|
|
55
|
+
status?: RawStatusEntry[];
|
|
56
|
+
resources?: RawServiceResource[];
|
|
57
|
+
}
|
|
58
|
+
interface RawServiceResource {
|
|
59
|
+
resourceName?: string;
|
|
60
|
+
i18n?: Record<string, string>;
|
|
61
|
+
status?: RawStatusEntry[];
|
|
62
|
+
}
|
|
63
|
+
interface RawStatusEntry {
|
|
64
|
+
statusId?: string;
|
|
65
|
+
statusType?: string;
|
|
66
|
+
startDate?: string;
|
|
67
|
+
modifiedDate?: string;
|
|
68
|
+
message?: {
|
|
69
|
+
messageKey?: string;
|
|
70
|
+
messages?: Record<string, string>;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export declare function fetchPsnStatus(options?: PsnStatusOptions): Promise<PsnStatusResult>;
|
|
74
|
+
export declare function parsePsnStatus(raw: RawStatusResponse, context: {
|
|
75
|
+
locale: PsnLocale;
|
|
76
|
+
country: string;
|
|
77
|
+
region: PsnStatusRegion;
|
|
78
|
+
refreshIntervalMs?: number;
|
|
79
|
+
}): PsnStatusResult;
|
|
80
|
+
export declare function regionForCountry(country: string): PsnStatusRegion;
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LookupResult, PsnLocale, BatarangData, LookupWarning } from "./types.js";
|
|
2
|
+
import type { TelemetryResult, PriceResult, RatingResult, UpsellResult } from "./api/graphql.js";
|
|
3
|
+
export interface RawLookupData {
|
|
4
|
+
inputId?: string;
|
|
5
|
+
idType?: "concept" | "product";
|
|
6
|
+
telemetry?: TelemetryResult | null;
|
|
7
|
+
price?: PriceResult | null;
|
|
8
|
+
rating?: RatingResult | null;
|
|
9
|
+
upsell?: UpsellResult | null;
|
|
10
|
+
batarang?: BatarangData | null;
|
|
11
|
+
concept?: LookupResult | null;
|
|
12
|
+
locale?: PsnLocale;
|
|
13
|
+
timing?: Record<string, number>;
|
|
14
|
+
includeProducts?: boolean;
|
|
15
|
+
warnings?: LookupWarning[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build a unified LookupResult from raw API responses.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildLookupRecord(data: RawLookupData): LookupResult;
|
package/dist/cache.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare class Cache<T> {
|
|
2
|
+
private store;
|
|
3
|
+
private readonly defaultTtl;
|
|
4
|
+
constructor(defaultTtlMs?: number);
|
|
5
|
+
/** Get a cached value. Returns undefined if missing or expired. */
|
|
6
|
+
get(key: string): T | undefined;
|
|
7
|
+
/** Set a cached value with optional TTL override. */
|
|
8
|
+
set(key: string, value: T, ttlMs?: number): void;
|
|
9
|
+
/** Check if a key exists and is still valid. */
|
|
10
|
+
has(key: string): boolean;
|
|
11
|
+
/** Delete a cached entry. */
|
|
12
|
+
delete(key: string): void;
|
|
13
|
+
/** Clear all cached entries. */
|
|
14
|
+
clear(): void;
|
|
15
|
+
/** Get the number of entries in the cache. */
|
|
16
|
+
get size(): number;
|
|
17
|
+
}
|
|
18
|
+
/** Cache TTL constants (in milliseconds) */
|
|
19
|
+
export declare const TTL: {
|
|
20
|
+
readonly GAME_LOOKUP: number;
|
|
21
|
+
readonly PRODUCT_TO_CONCEPT: number;
|
|
22
|
+
readonly SEARCH: number;
|
|
23
|
+
readonly CATEGORY: number;
|
|
24
|
+
readonly BATARANG: number;
|
|
25
|
+
};
|