@forklaunch/core 1.3.16 → 1.4.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/lib/cache/index.d.mts +2 -1
- package/lib/cache/index.d.ts +2 -1
- package/lib/http/index.d.mts +2 -1
- package/lib/http/index.d.ts +2 -1
- package/lib/http/index.js +12 -0
- package/lib/http/index.js.map +1 -1
- package/lib/http/index.mjs +12 -0
- package/lib/http/index.mjs.map +1 -1
- package/lib/objectstore/index.d.mts +18 -44
- package/lib/objectstore/index.d.ts +18 -44
- package/lib/persistence/index.js +29 -11
- package/lib/persistence/index.js.map +1 -1
- package/lib/persistence/index.mjs +29 -11
- package/lib/persistence/index.mjs.map +1 -1
- package/lib/services/index.js +6 -0
- package/lib/services/index.js.map +1 -1
- package/lib/services/index.mjs +6 -0
- package/lib/services/index.mjs.map +1 -1
- package/lib/ttlCache.interface-B3xaLT00.d.ts +77 -0
- package/lib/ttlCache.interface-CEOkrt8d.d.mts +77 -0
- package/lib/ttlCacheRecord.types-oX0ti5SP.d.mts +25 -0
- package/lib/ttlCacheRecord.types-oX0ti5SP.d.ts +25 -0
- package/package.json +3 -3
- package/lib/ttlCache.interface-DClm-lSa.d.mts +0 -133
- package/lib/ttlCache.interface-DClm-lSa.d.ts +0 -133
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type representing a TTL (Time-To-Live) cache record.
|
|
3
|
-
*
|
|
4
|
-
* @typedef {Object} TtlCacheRecord
|
|
5
|
-
* @property {string} key - The key of the cache record.
|
|
6
|
-
* @property {any} value - The value of the cache record.
|
|
7
|
-
* @property {number} ttlMilliseconds - The time-to-live of the cache record in milliseconds.
|
|
8
|
-
*/
|
|
9
|
-
type TtlCacheRecord<T> = {
|
|
10
|
-
key: string;
|
|
11
|
-
value: T;
|
|
12
|
-
ttlMilliseconds: number;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Interface representing a TTL (Time-To-Live) cache.
|
|
17
|
-
*/
|
|
18
|
-
interface TtlCache {
|
|
19
|
-
/**
|
|
20
|
-
* Puts a record into the cache.
|
|
21
|
-
*
|
|
22
|
-
* @param {TtlCacheRecord} cacheRecord - The cache record to put into the cache.
|
|
23
|
-
* @returns {Promise<void>} - A promise that resolves when the record is put into the cache.
|
|
24
|
-
*/
|
|
25
|
-
putRecord<T>(cacheRecord: TtlCacheRecord<T>): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Puts a batch of records into the cache.
|
|
28
|
-
*
|
|
29
|
-
* @param {TtlCacheRecord<T>[]} cacheRecords - The cache records to put into the cache.
|
|
30
|
-
* @returns {Promise<void>} - A promise that resolves when the records are put into the cache.
|
|
31
|
-
*/
|
|
32
|
-
putBatchRecords<T>(cacheRecords: TtlCacheRecord<T>[]): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* Enqueues a record into the cache.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} cacheRecordKey - The key of the cache record to enqueue.
|
|
37
|
-
* @returns {Promise<void>} - A promise that resolves when the record is enqueued into the cache.
|
|
38
|
-
*/
|
|
39
|
-
enqueueRecord<T>(queueName: string, cacheRecord: T): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* Enqueues a batch of records into the cache.
|
|
43
|
-
*
|
|
44
|
-
* @param {string[]} cacheRecordKeys - The keys of the cache records to enqueue.
|
|
45
|
-
* @returns {Promise<void>} - A promise that resolves when the records are enqueued into the cache.
|
|
46
|
-
*/
|
|
47
|
-
enqueueBatchRecords<T>(queueName: string, cacheRecords: T[]): Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* Deletes a record from the cache.
|
|
50
|
-
*
|
|
51
|
-
* @param {string} cacheRecordKey - The key of the cache record to delete.
|
|
52
|
-
* @returns {Promise<void>} - A promise that resolves when the record is deleted from the cache.
|
|
53
|
-
*/
|
|
54
|
-
deleteRecord(cacheRecordKey: string): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* Deletes a batch of records from the cache.
|
|
57
|
-
*
|
|
58
|
-
* @param {string[]} cacheRecordKeys - The keys of the cache records to delete.
|
|
59
|
-
* @returns {Promise<void>} - A promise that resolves when the records are deleted from the cache.
|
|
60
|
-
*/
|
|
61
|
-
deleteBatchRecords(cacheRecordKeys: string[]): Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
* Dequeues a record from the cache.
|
|
64
|
-
*
|
|
65
|
-
* @param {string} cacheRecordKey - The key of the cache record to dequeue.
|
|
66
|
-
* @returns {Promise<void>} - A promise that resolves when the record is dequeued from the cache.
|
|
67
|
-
*/
|
|
68
|
-
dequeueRecord<T>(queueName: string): Promise<T>;
|
|
69
|
-
/**
|
|
70
|
-
* Dequeues a batch of records from the cache.
|
|
71
|
-
*
|
|
72
|
-
* @param {string[]} cacheRecordKeys - The keys of the cache records to dequeue.
|
|
73
|
-
* @returns {Promise<void>} - A promise that resolves when the records are dequeued from the cache.
|
|
74
|
-
*/
|
|
75
|
-
dequeueBatchRecords<T>(queueName: string, pageSize: number): Promise<T[]>;
|
|
76
|
-
/**
|
|
77
|
-
* Reads a record from the cache.
|
|
78
|
-
*
|
|
79
|
-
* @param {string} cacheRecordKey - The key of the cache record to read.
|
|
80
|
-
* @returns {Promise<TtlCacheRecord>} - A promise that resolves with the cache record.
|
|
81
|
-
*/
|
|
82
|
-
readRecord<T>(cacheRecordKey: string): Promise<TtlCacheRecord<T>>;
|
|
83
|
-
/**
|
|
84
|
-
* Reads a batch of records from the cache.
|
|
85
|
-
*
|
|
86
|
-
* @param {string[] | string} cacheRecordKeysOrPrefix - The keys of the cache records to read or a prefix to match.
|
|
87
|
-
* @returns {Promise<TtlCacheRecord<T>[]>} - A promise that resolves with the cache records.
|
|
88
|
-
*/
|
|
89
|
-
readBatchRecords<T>(cacheRecordKeysOrPrefix: string[] | string): Promise<TtlCacheRecord<T>[]>;
|
|
90
|
-
/**
|
|
91
|
-
* Peeks at a record in the cache to check if it exists.
|
|
92
|
-
*
|
|
93
|
-
* @param {string} cacheRecordKey - The key of the cache record to peek at.
|
|
94
|
-
* @returns {Promise<boolean>} - A promise that resolves with a boolean indicating if the record exists.
|
|
95
|
-
*/
|
|
96
|
-
peekRecord(cacheRecordKey: string): Promise<boolean>;
|
|
97
|
-
/**
|
|
98
|
-
* Peeks at a batch of records in the cache to check if they exist.
|
|
99
|
-
*
|
|
100
|
-
* @param {string[] | string} cacheRecordKeysOrPrefix - The keys of the cache records to peek at or a prefix to match.
|
|
101
|
-
* @returns {Promise<boolean[]>} - A promise that resolves with an array of booleans indicating if the records exist.
|
|
102
|
-
*/
|
|
103
|
-
peekBatchRecords(cacheRecordKeysOrPrefix: string[] | string): Promise<boolean[]>;
|
|
104
|
-
/**
|
|
105
|
-
* Peeks at a record in the cache to check if it exists.
|
|
106
|
-
*
|
|
107
|
-
* @param {string} queueName - The name of the queue to peek at.
|
|
108
|
-
* @returns {Promise<T>} - A promise that resolves with the record.
|
|
109
|
-
*/
|
|
110
|
-
peekQueueRecord<T>(queueName: string): Promise<T>;
|
|
111
|
-
/**
|
|
112
|
-
* Peeks at a batch of records in the cache to check if they exist.
|
|
113
|
-
*
|
|
114
|
-
* @param {string} queueName - The name of the queue to peek at.
|
|
115
|
-
* @returns {Promise<T[]>} - A promise that resolves with the records.
|
|
116
|
-
*/
|
|
117
|
-
peekQueueRecords<T>(queueName: string, pageSize: number): Promise<T[]>;
|
|
118
|
-
/**
|
|
119
|
-
* Gets the TTL (Time-To-Live) in milliseconds.
|
|
120
|
-
*
|
|
121
|
-
* @returns {number} - The TTL in milliseconds.
|
|
122
|
-
*/
|
|
123
|
-
getTtlMilliseconds(): number;
|
|
124
|
-
/**
|
|
125
|
-
* Lists the keys in the cache that match a pattern prefix.
|
|
126
|
-
*
|
|
127
|
-
* @param {string} pattern_prefix - The pattern prefix to match.
|
|
128
|
-
* @returns {Promise<string[]>} - A promise that resolves with an array of keys matching the pattern prefix.
|
|
129
|
-
*/
|
|
130
|
-
listKeys(pattern_prefix: string): Promise<string[]>;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export type { TtlCache as T, TtlCacheRecord as a };
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type representing a TTL (Time-To-Live) cache record.
|
|
3
|
-
*
|
|
4
|
-
* @typedef {Object} TtlCacheRecord
|
|
5
|
-
* @property {string} key - The key of the cache record.
|
|
6
|
-
* @property {any} value - The value of the cache record.
|
|
7
|
-
* @property {number} ttlMilliseconds - The time-to-live of the cache record in milliseconds.
|
|
8
|
-
*/
|
|
9
|
-
type TtlCacheRecord<T> = {
|
|
10
|
-
key: string;
|
|
11
|
-
value: T;
|
|
12
|
-
ttlMilliseconds: number;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Interface representing a TTL (Time-To-Live) cache.
|
|
17
|
-
*/
|
|
18
|
-
interface TtlCache {
|
|
19
|
-
/**
|
|
20
|
-
* Puts a record into the cache.
|
|
21
|
-
*
|
|
22
|
-
* @param {TtlCacheRecord} cacheRecord - The cache record to put into the cache.
|
|
23
|
-
* @returns {Promise<void>} - A promise that resolves when the record is put into the cache.
|
|
24
|
-
*/
|
|
25
|
-
putRecord<T>(cacheRecord: TtlCacheRecord<T>): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Puts a batch of records into the cache.
|
|
28
|
-
*
|
|
29
|
-
* @param {TtlCacheRecord<T>[]} cacheRecords - The cache records to put into the cache.
|
|
30
|
-
* @returns {Promise<void>} - A promise that resolves when the records are put into the cache.
|
|
31
|
-
*/
|
|
32
|
-
putBatchRecords<T>(cacheRecords: TtlCacheRecord<T>[]): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* Enqueues a record into the cache.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} cacheRecordKey - The key of the cache record to enqueue.
|
|
37
|
-
* @returns {Promise<void>} - A promise that resolves when the record is enqueued into the cache.
|
|
38
|
-
*/
|
|
39
|
-
enqueueRecord<T>(queueName: string, cacheRecord: T): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* Enqueues a batch of records into the cache.
|
|
43
|
-
*
|
|
44
|
-
* @param {string[]} cacheRecordKeys - The keys of the cache records to enqueue.
|
|
45
|
-
* @returns {Promise<void>} - A promise that resolves when the records are enqueued into the cache.
|
|
46
|
-
*/
|
|
47
|
-
enqueueBatchRecords<T>(queueName: string, cacheRecords: T[]): Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* Deletes a record from the cache.
|
|
50
|
-
*
|
|
51
|
-
* @param {string} cacheRecordKey - The key of the cache record to delete.
|
|
52
|
-
* @returns {Promise<void>} - A promise that resolves when the record is deleted from the cache.
|
|
53
|
-
*/
|
|
54
|
-
deleteRecord(cacheRecordKey: string): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* Deletes a batch of records from the cache.
|
|
57
|
-
*
|
|
58
|
-
* @param {string[]} cacheRecordKeys - The keys of the cache records to delete.
|
|
59
|
-
* @returns {Promise<void>} - A promise that resolves when the records are deleted from the cache.
|
|
60
|
-
*/
|
|
61
|
-
deleteBatchRecords(cacheRecordKeys: string[]): Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
* Dequeues a record from the cache.
|
|
64
|
-
*
|
|
65
|
-
* @param {string} cacheRecordKey - The key of the cache record to dequeue.
|
|
66
|
-
* @returns {Promise<void>} - A promise that resolves when the record is dequeued from the cache.
|
|
67
|
-
*/
|
|
68
|
-
dequeueRecord<T>(queueName: string): Promise<T>;
|
|
69
|
-
/**
|
|
70
|
-
* Dequeues a batch of records from the cache.
|
|
71
|
-
*
|
|
72
|
-
* @param {string[]} cacheRecordKeys - The keys of the cache records to dequeue.
|
|
73
|
-
* @returns {Promise<void>} - A promise that resolves when the records are dequeued from the cache.
|
|
74
|
-
*/
|
|
75
|
-
dequeueBatchRecords<T>(queueName: string, pageSize: number): Promise<T[]>;
|
|
76
|
-
/**
|
|
77
|
-
* Reads a record from the cache.
|
|
78
|
-
*
|
|
79
|
-
* @param {string} cacheRecordKey - The key of the cache record to read.
|
|
80
|
-
* @returns {Promise<TtlCacheRecord>} - A promise that resolves with the cache record.
|
|
81
|
-
*/
|
|
82
|
-
readRecord<T>(cacheRecordKey: string): Promise<TtlCacheRecord<T>>;
|
|
83
|
-
/**
|
|
84
|
-
* Reads a batch of records from the cache.
|
|
85
|
-
*
|
|
86
|
-
* @param {string[] | string} cacheRecordKeysOrPrefix - The keys of the cache records to read or a prefix to match.
|
|
87
|
-
* @returns {Promise<TtlCacheRecord<T>[]>} - A promise that resolves with the cache records.
|
|
88
|
-
*/
|
|
89
|
-
readBatchRecords<T>(cacheRecordKeysOrPrefix: string[] | string): Promise<TtlCacheRecord<T>[]>;
|
|
90
|
-
/**
|
|
91
|
-
* Peeks at a record in the cache to check if it exists.
|
|
92
|
-
*
|
|
93
|
-
* @param {string} cacheRecordKey - The key of the cache record to peek at.
|
|
94
|
-
* @returns {Promise<boolean>} - A promise that resolves with a boolean indicating if the record exists.
|
|
95
|
-
*/
|
|
96
|
-
peekRecord(cacheRecordKey: string): Promise<boolean>;
|
|
97
|
-
/**
|
|
98
|
-
* Peeks at a batch of records in the cache to check if they exist.
|
|
99
|
-
*
|
|
100
|
-
* @param {string[] | string} cacheRecordKeysOrPrefix - The keys of the cache records to peek at or a prefix to match.
|
|
101
|
-
* @returns {Promise<boolean[]>} - A promise that resolves with an array of booleans indicating if the records exist.
|
|
102
|
-
*/
|
|
103
|
-
peekBatchRecords(cacheRecordKeysOrPrefix: string[] | string): Promise<boolean[]>;
|
|
104
|
-
/**
|
|
105
|
-
* Peeks at a record in the cache to check if it exists.
|
|
106
|
-
*
|
|
107
|
-
* @param {string} queueName - The name of the queue to peek at.
|
|
108
|
-
* @returns {Promise<T>} - A promise that resolves with the record.
|
|
109
|
-
*/
|
|
110
|
-
peekQueueRecord<T>(queueName: string): Promise<T>;
|
|
111
|
-
/**
|
|
112
|
-
* Peeks at a batch of records in the cache to check if they exist.
|
|
113
|
-
*
|
|
114
|
-
* @param {string} queueName - The name of the queue to peek at.
|
|
115
|
-
* @returns {Promise<T[]>} - A promise that resolves with the records.
|
|
116
|
-
*/
|
|
117
|
-
peekQueueRecords<T>(queueName: string, pageSize: number): Promise<T[]>;
|
|
118
|
-
/**
|
|
119
|
-
* Gets the TTL (Time-To-Live) in milliseconds.
|
|
120
|
-
*
|
|
121
|
-
* @returns {number} - The TTL in milliseconds.
|
|
122
|
-
*/
|
|
123
|
-
getTtlMilliseconds(): number;
|
|
124
|
-
/**
|
|
125
|
-
* Lists the keys in the cache that match a pattern prefix.
|
|
126
|
-
*
|
|
127
|
-
* @param {string} pattern_prefix - The pattern prefix to match.
|
|
128
|
-
* @returns {Promise<string[]>} - A promise that resolves with an array of keys matching the pattern prefix.
|
|
129
|
-
*/
|
|
130
|
-
listKeys(pattern_prefix: string): Promise<string[]>;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export type { TtlCache as T, TtlCacheRecord as a };
|