@redocly/config 0.41.0 → 0.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common.d.ts +3 -3
- package/lib/common.js +6 -0
- package/lib/default-theme-config-schema.d.ts +36 -0
- package/lib/ex-theme-config-schemas.d.ts +18 -0
- package/lib/product-override-schema.d.ts +18 -0
- package/lib/root-config-schema.d.ts +342 -0
- package/lib/types/api-functions-types.d.ts +10 -11
- package/lib-esm/common.d.ts +3 -3
- package/lib-esm/common.js +6 -0
- package/lib-esm/default-theme-config-schema.d.ts +36 -0
- package/lib-esm/ex-theme-config-schemas.d.ts +18 -0
- package/lib-esm/product-override-schema.d.ts +18 -0
- package/lib-esm/root-config-schema.d.ts +342 -0
- package/lib-esm/types/api-functions-types.d.ts +10 -11
- package/package.json +1 -1
|
@@ -41,12 +41,11 @@ export type ApiFunctionsContext = {
|
|
|
41
41
|
};
|
|
42
42
|
} & ApiFunctionsContextMethods;
|
|
43
43
|
export type KvService = {
|
|
44
|
-
get: <T extends KvValue = KvValue>(key: KvKey) => Promise<
|
|
45
|
-
getMany: <T extends KvValue = KvValue>(keys: KvKey[]) => Promise<(
|
|
44
|
+
get: <T extends KvValue = KvValue>(key: KvKey) => Promise<T | null>;
|
|
45
|
+
getMany: <T extends KvValue = KvValue>(keys: KvKey[]) => Promise<(KvListEntry<T> | null)[]>;
|
|
46
46
|
list: <T extends KvValue = KvValue>(selector: KvListSelector, options?: KvListOptions) => Promise<KvListResponse<T>>;
|
|
47
|
-
set: <T extends KvValue = KvValue>(key: KvKey, value: T, options?: KvSetOptions) => Promise<
|
|
48
|
-
delete: (key: KvKey) => Promise<
|
|
49
|
-
clearExpired: () => Promise<void>;
|
|
47
|
+
set: <T extends KvValue = KvValue>(key: KvKey, value: T, options?: KvSetOptions) => Promise<KvListEntry<T> | null>;
|
|
48
|
+
delete: (key: KvKey) => Promise<void>;
|
|
50
49
|
transaction: <T>(operation: (tx: KvTransaction) => Promise<T>) => Promise<T>;
|
|
51
50
|
};
|
|
52
51
|
export type KvValue = Record<string, unknown> | unknown[] | unknown;
|
|
@@ -55,7 +54,7 @@ export type KvKey = KvKeyPart[];
|
|
|
55
54
|
export type KvSetOptions = {
|
|
56
55
|
ttlInSeconds?: number;
|
|
57
56
|
};
|
|
58
|
-
export type
|
|
57
|
+
export type KvListEntry<T extends KvValue = KvValue> = {
|
|
59
58
|
key: KvKey;
|
|
60
59
|
value: T | null;
|
|
61
60
|
};
|
|
@@ -77,15 +76,15 @@ export type KvListOptions = {
|
|
|
77
76
|
cursor?: string;
|
|
78
77
|
};
|
|
79
78
|
export type KvListResponse<T extends KvValue = KvValue> = {
|
|
80
|
-
items:
|
|
79
|
+
items: KvListEntry<T>[];
|
|
81
80
|
total: number;
|
|
82
81
|
cursor: string | null;
|
|
83
82
|
};
|
|
84
83
|
export type KvTransaction = {
|
|
85
|
-
get: <T extends KvValue = KvValue>(key: KvKey) => Promise<
|
|
86
|
-
getMany: <T extends KvValue = KvValue>(keys: KvKey[]) => Promise<(
|
|
87
|
-
set: <T extends KvValue = KvValue>(key: KvKey, value: T, options?: KvSetOptions) => Promise<
|
|
88
|
-
delete: (key: KvKey) => Promise<
|
|
84
|
+
get: <T extends KvValue = KvValue>(key: KvKey) => Promise<T | null>;
|
|
85
|
+
getMany: <T extends KvValue = KvValue>(keys: KvKey[]) => Promise<(KvListEntry<T> | null)[]>;
|
|
86
|
+
set: <T extends KvValue = KvValue>(key: KvKey, value: T, options?: KvSetOptions) => Promise<KvListEntry<T> | null>;
|
|
87
|
+
delete: (key: KvKey) => Promise<void>;
|
|
89
88
|
};
|
|
90
89
|
export type ApiRoutesHandler = (request: Request, context: ApiFunctionsContext,
|
|
91
90
|
/**
|