@devvit/public-api 0.11.0-next-2024-07-25-e11c6b2a8.0 → 0.11.0-next-2024-07-25-3d6075a47.0
Sign up to get free protection for your applications and to get access to all the features.
- package/apis/redis/RedisClient.d.ts +30 -0
- package/apis/redis/RedisClient.d.ts.map +1 -1
- package/apis/redis/RedisClient.js +66 -0
- package/meta.json +4 -4
- package/meta.min.json +5 -5
- package/package.json +7 -7
- package/public-api.d.ts +190 -0
- package/public-api.iife.js +67 -1
- package/public-api.min.js +5 -5
- package/public-api.min.js.map +2 -2
- package/types/redis.d.ts +190 -0
- package/types/redis.d.ts.map +1 -1
package/public-api.d.ts
CHANGED
@@ -46031,10 +46031,19 @@ export declare type RedisClient = {
|
|
46031
46031
|
* Returns the length of the string value stored at key.
|
46032
46032
|
* An error is returned when key holds a non-string value.
|
46033
46033
|
* https://redis.io/commands/strlen/
|
46034
|
+
* @deprecated Use {@link RedisClient.strLen} instead.
|
46034
46035
|
* @arg {} key
|
46035
46036
|
* @returns length of the string stored at key
|
46036
46037
|
*/
|
46037
46038
|
strlen(key: string): Promise<number>;
|
46039
|
+
/**
|
46040
|
+
* Returns the length of the string value stored at key.
|
46041
|
+
* An error is returned when key holds a non-string value.
|
46042
|
+
* https://redis.io/commands/strlen/
|
46043
|
+
* @arg {} key
|
46044
|
+
* @returns length of the string stored at key
|
46045
|
+
*/
|
46046
|
+
strLen(key: string): Promise<number>;
|
46038
46047
|
/**
|
46039
46048
|
* Increments the number stored at key by increment.
|
46040
46049
|
* https://redis.io/commands/incrby/
|
@@ -46046,18 +46055,35 @@ export declare type RedisClient = {
|
|
46046
46055
|
/**
|
46047
46056
|
* Returns the values of all specified keys.
|
46048
46057
|
* https://redis.io/commands/mget/
|
46058
|
+
* @deprecated Use {@link RedisClient.mGet} instead.
|
46049
46059
|
* @arg {} keys
|
46050
46060
|
* @returns list of values at the specified keys
|
46051
46061
|
*/
|
46052
46062
|
mget(keys: string[]): Promise<(string | null)[]>;
|
46063
|
+
/**
|
46064
|
+
* Returns the values of all specified keys.
|
46065
|
+
* https://redis.io/commands/mget/
|
46066
|
+
* @arg {} keys
|
46067
|
+
* @returns list of values at the specified keys
|
46068
|
+
*/
|
46069
|
+
mGet(keys: string[]): Promise<(string | null)[]>;
|
46053
46070
|
/**
|
46054
46071
|
* Sets the given keys to their respective values.
|
46055
46072
|
* https://redis.io/commands/mset/
|
46073
|
+
* @deprecated Use {@link RedisClient.mSet} instead.
|
46056
46074
|
* @arg {} keyValues
|
46057
46075
|
*/
|
46058
46076
|
mset(keyValues: {
|
46059
46077
|
[key: string]: string;
|
46060
46078
|
}): Promise<void>;
|
46079
|
+
/**
|
46080
|
+
* Sets the given keys to their respective values.
|
46081
|
+
* https://redis.io/commands/mset/
|
46082
|
+
* @arg {} keyValues
|
46083
|
+
*/
|
46084
|
+
mSet(keyValues: {
|
46085
|
+
[key: string]: string;
|
46086
|
+
}): Promise<void>;
|
46061
46087
|
/**
|
46062
46088
|
* Set a timeout on key.
|
46063
46089
|
* https://redis.io/commands/expire/
|
@@ -46172,6 +46198,7 @@ export declare type RedisClient = {
|
|
46172
46198
|
/**
|
46173
46199
|
* Sets the specified fields to their respective values in the hash stored at key.
|
46174
46200
|
* https://redis.io/commands/hset
|
46201
|
+
* @deprecated Use {@link RedisClient.hSet} instead.
|
46175
46202
|
* @arg {} key
|
46176
46203
|
* @arg {} fieldValues
|
46177
46204
|
* @returns number of fields that were added
|
@@ -46179,42 +46206,93 @@ export declare type RedisClient = {
|
|
46179
46206
|
hset(key: string, fieldValues: {
|
46180
46207
|
[field: string]: string;
|
46181
46208
|
}): Promise<number>;
|
46209
|
+
/**
|
46210
|
+
* Sets the specified fields to their respective values in the hash stored at key.
|
46211
|
+
* https://redis.io/commands/hset
|
46212
|
+
* @arg {} key
|
46213
|
+
* @arg {} fieldValues
|
46214
|
+
* @returns number of fields that were added
|
46215
|
+
*/
|
46216
|
+
hSet(key: string, fieldValues: {
|
46217
|
+
[field: string]: string;
|
46218
|
+
}): Promise<number>;
|
46182
46219
|
/**
|
46183
46220
|
* Returns the value associated with field in the hash stored at key.
|
46184
46221
|
* https://redis.io/commands/hget
|
46222
|
+
* @deprecated Use {@link RedisClient.hGet} instead.
|
46185
46223
|
* @arg {} key
|
46186
46224
|
* @arg {} field
|
46187
46225
|
* @returns value associated with field
|
46188
46226
|
*/
|
46189
46227
|
hget(key: string, field: string): Promise<string | undefined>;
|
46228
|
+
/**
|
46229
|
+
* Returns the value associated with field in the hash stored at key.
|
46230
|
+
* https://redis.io/commands/hget
|
46231
|
+
* @arg {} key
|
46232
|
+
* @arg {} field
|
46233
|
+
* @returns value associated with field
|
46234
|
+
*/
|
46235
|
+
hGet(key: string, field: string): Promise<string | undefined>;
|
46190
46236
|
/**
|
46191
46237
|
* Returns all fields and values of the hash stored at key
|
46192
46238
|
* https://redis.io/commands/hgetall
|
46239
|
+
* @deprecated Use {@link RedisClient.hGetAll} instead.
|
46193
46240
|
* @arg {} key
|
46194
46241
|
* @returns a map of fields and their values stored in the hash,
|
46195
46242
|
*/
|
46196
46243
|
hgetall(key: string): Promise<Record<string, string> | undefined>;
|
46244
|
+
/**
|
46245
|
+
* Returns all fields and values of the hash stored at key
|
46246
|
+
* https://redis.io/commands/hgetall
|
46247
|
+
* @arg {} key
|
46248
|
+
* @returns a map of fields and their values stored in the hash,
|
46249
|
+
*/
|
46250
|
+
hGetAll(key: string): Promise<Record<string, string> | undefined>;
|
46197
46251
|
/**
|
46198
46252
|
* Removes the specified fields from the hash stored at key.
|
46199
46253
|
* https://redis.io/commands/hdel/
|
46254
|
+
* @deprecated Use {@link RedisClient.hDel} instead.
|
46200
46255
|
* @arg {} key
|
46201
46256
|
* @arg {} fields
|
46202
46257
|
* @returns number of fields that were removed from the hash
|
46203
46258
|
*/
|
46204
46259
|
hdel(key: string, fields: string[]): Promise<number>;
|
46260
|
+
/**
|
46261
|
+
* Removes the specified fields from the hash stored at key.
|
46262
|
+
* https://redis.io/commands/hdel/
|
46263
|
+
* @arg {} key
|
46264
|
+
* @arg {} fields
|
46265
|
+
* @returns number of fields that were removed from the hash
|
46266
|
+
*/
|
46267
|
+
hDel(key: string, fields: string[]): Promise<number>;
|
46205
46268
|
/**
|
46206
46269
|
* Iterates fields of Hash types and their associated values.
|
46270
|
+
* @deprecated Use {@link RedisClient.hScan} instead.
|
46207
46271
|
* @arg {} key
|
46208
46272
|
* @arg {} cursor
|
46209
46273
|
* @arg {} pattern
|
46210
46274
|
* @arg {} count
|
46211
46275
|
*/
|
46212
46276
|
hscan(key: string, cursor: number, pattern?: string | undefined, count?: number | undefined): Promise<HScanResponse>;
|
46277
|
+
/**
|
46278
|
+
* Iterates fields of Hash types and their associated values.
|
46279
|
+
* @arg {} key
|
46280
|
+
* @arg {} cursor
|
46281
|
+
* @arg {} pattern
|
46282
|
+
* @arg {} count
|
46283
|
+
*/
|
46284
|
+
hScan(key: string, cursor: number, pattern?: string | undefined, count?: number | undefined): Promise<HScanResponse>;
|
46213
46285
|
/**
|
46214
46286
|
* Returns all field names in the hash stored at key.
|
46287
|
+
* @deprecated Use {@link RedisClient.hKeys} instead.
|
46215
46288
|
* @arg {} key
|
46216
46289
|
*/
|
46217
46290
|
hkeys(key: string): Promise<string[]>;
|
46291
|
+
/**
|
46292
|
+
* Returns all field names in the hash stored at key.
|
46293
|
+
* @arg {} key
|
46294
|
+
*/
|
46295
|
+
hKeys(key: string): Promise<string[]>;
|
46218
46296
|
/**
|
46219
46297
|
* Increments the number stored at field in the hash stored at key by increment.
|
46220
46298
|
* https://redis.io/commands/hincrby/
|
@@ -46224,12 +46302,29 @@ export declare type RedisClient = {
|
|
46224
46302
|
* @returns value of key after the increment
|
46225
46303
|
*/
|
46226
46304
|
hincrby(key: string, field: string, value: number): Promise<number>;
|
46305
|
+
/**
|
46306
|
+
* Increments the number stored at field in the hash stored at key by increment.
|
46307
|
+
* https://redis.io/commands/hincrby/
|
46308
|
+
* @deprecated Use {@link RedisClient.hIncrBy} instead.
|
46309
|
+
* @arg {} key
|
46310
|
+
* @arg {} field
|
46311
|
+
* @arg {} value
|
46312
|
+
* @returns value of key after the increment
|
46313
|
+
*/
|
46314
|
+
hIncrBy(key: string, field: string, value: number): Promise<number>;
|
46227
46315
|
/**
|
46228
46316
|
* Returns the number of fields contained in the hash stored at key.
|
46317
|
+
* @deprecated Use {@link RedisClient.hLen} instead.
|
46229
46318
|
* @arg {} key
|
46230
46319
|
* @returns the number of fields in the hash, or 0 when the key does not exist.
|
46231
46320
|
*/
|
46232
46321
|
hlen(key: string): Promise<number>;
|
46322
|
+
/**
|
46323
|
+
* Returns the number of fields contained in the hash stored at key.
|
46324
|
+
* @arg {} key
|
46325
|
+
* @returns the number of fields in the hash, or 0 when the key does not exist.
|
46326
|
+
*/
|
46327
|
+
hLen(key: string): Promise<number>;
|
46233
46328
|
/**
|
46234
46329
|
* Allows read/write operations to global keys in Redis
|
46235
46330
|
* Global redis enables apps to persist and access state across subreddit installations
|
@@ -66171,25 +66266,51 @@ export declare type TxClientLike = {
|
|
66171
66266
|
* Returns the length of the string value stored at key.
|
66172
66267
|
* An error is returned when key holds a non-string value.
|
66173
66268
|
* https://redis.io/commands/strlen/
|
66269
|
+
* @deprecated Use {@link TxClientLike.strLen} instead.
|
66174
66270
|
* @arg {} key
|
66175
66271
|
* @returns length of the string stored at key
|
66176
66272
|
*/
|
66177
66273
|
strlen(key: string): Promise<TxClientLike>;
|
66274
|
+
/**
|
66275
|
+
* Returns the length of the string value stored at key.
|
66276
|
+
* An error is returned when key holds a non-string value.
|
66277
|
+
* https://redis.io/commands/strlen/
|
66278
|
+
* @arg {} key
|
66279
|
+
* @returns length of the string stored at key
|
66280
|
+
*/
|
66281
|
+
strLen(key: string): Promise<TxClientLike>;
|
66178
66282
|
/**
|
66179
66283
|
* Returns the values of all specified keys.
|
66180
66284
|
* https://redis.io/commands/mget/
|
66285
|
+
* @deprecated Use {@link TxClientLike.mGet} instead.
|
66181
66286
|
* @arg {} keys
|
66182
66287
|
* @returns list of values at the specified keys
|
66183
66288
|
*/
|
66184
66289
|
mget(keys: string[]): Promise<TxClientLike>;
|
66290
|
+
/**
|
66291
|
+
* Returns the values of all specified keys.
|
66292
|
+
* https://redis.io/commands/mget/
|
66293
|
+
* @arg {} keys
|
66294
|
+
* @returns list of values at the specified keys
|
66295
|
+
*/
|
66296
|
+
mGet(keys: string[]): Promise<TxClientLike>;
|
66185
66297
|
/**
|
66186
66298
|
* Sets the given keys to their respective values.
|
66187
66299
|
* https://redis.io/commands/mset/
|
66300
|
+
* @deprecated Use {@link TxClientLike.mSet} instead.
|
66188
66301
|
* @arg {} keyValues
|
66189
66302
|
*/
|
66190
66303
|
mset(keyValues: {
|
66191
66304
|
[key: string]: string;
|
66192
66305
|
}): Promise<TxClientLike>;
|
66306
|
+
/**
|
66307
|
+
* Sets the given keys to their respective values.
|
66308
|
+
* https://redis.io/commands/mset/
|
66309
|
+
* @arg {} keyValues
|
66310
|
+
*/
|
66311
|
+
mSet(keyValues: {
|
66312
|
+
[key: string]: string;
|
66313
|
+
}): Promise<TxClientLike>;
|
66193
66314
|
/**
|
66194
66315
|
* Set a timeout on key.
|
66195
66316
|
* https://redis.io/commands/expire/
|
@@ -66301,6 +66422,7 @@ export declare type TxClientLike = {
|
|
66301
66422
|
/**
|
66302
66423
|
* Sets the specified fields to their respective values in the hash stored at key.
|
66303
66424
|
* https://redis.io/commands/hset
|
66425
|
+
* @deprecated Use {@link TxClientLike.hSet} instead.
|
66304
66426
|
* @arg {} key
|
66305
66427
|
* @arg {} fieldValues
|
66306
66428
|
* @returns number of fields that were added
|
@@ -66308,57 +66430,125 @@ export declare type TxClientLike = {
|
|
66308
66430
|
hset(key: string, fieldValues: {
|
66309
66431
|
[field: string]: string;
|
66310
66432
|
}): Promise<TxClientLike>;
|
66433
|
+
/**
|
66434
|
+
* Sets the specified fields to their respective values in the hash stored at key.
|
66435
|
+
* https://redis.io/commands/hset
|
66436
|
+
* @arg {} key
|
66437
|
+
* @arg {} fieldValues
|
66438
|
+
* @returns number of fields that were added
|
66439
|
+
*/
|
66440
|
+
hSet(key: string, fieldValues: {
|
66441
|
+
[field: string]: string;
|
66442
|
+
}): Promise<TxClientLike>;
|
66311
66443
|
/**
|
66312
66444
|
* Returns the value associated with field in the hash stored at key.
|
66313
66445
|
* https://redis.io/commands/hget
|
66446
|
+
* @deprecated Use {@link TxClientLike.hGet} instead.
|
66314
66447
|
* @arg {} key
|
66315
66448
|
* @arg {} field
|
66316
66449
|
* @returns value associated with field
|
66317
66450
|
*/
|
66318
66451
|
hget(key: string, field: string): Promise<TxClientLike>;
|
66452
|
+
/**
|
66453
|
+
* Returns the value associated with field in the hash stored at key.
|
66454
|
+
* https://redis.io/commands/hget
|
66455
|
+
* @arg {} key
|
66456
|
+
* @arg {} field
|
66457
|
+
* @returns value associated with field
|
66458
|
+
*/
|
66459
|
+
hGet(key: string, field: string): Promise<TxClientLike>;
|
66319
66460
|
/**
|
66320
66461
|
* Returns all fields and values of the hash stored at key
|
66321
66462
|
* https://redis.io/commands/hgetall
|
66463
|
+
* @deprecated Use {@link TxClientLike.hGetAll} instead.
|
66322
66464
|
* @arg {} key
|
66323
66465
|
* @returns a map of fields and their values stored in the hash,
|
66324
66466
|
*/
|
66325
66467
|
hgetall(key: string): Promise<TxClientLike>;
|
66468
|
+
/**
|
66469
|
+
* Returns all fields and values of the hash stored at key
|
66470
|
+
* https://redis.io/commands/hgetall
|
66471
|
+
* @arg {} key
|
66472
|
+
* @returns a map of fields and their values stored in the hash,
|
66473
|
+
*/
|
66474
|
+
hGetAll(key: string): Promise<TxClientLike>;
|
66326
66475
|
/**
|
66327
66476
|
* Removes the specified fields from the hash stored at key.
|
66328
66477
|
* https://redis.io/commands/hdel/
|
66478
|
+
* @deprecated Use {@link TxClientLike.hDel} instead.
|
66329
66479
|
* @arg {} key
|
66330
66480
|
* @arg {} fields
|
66331
66481
|
* @returns number of fields that were removed from the hash
|
66332
66482
|
*/
|
66333
66483
|
hdel(key: string, fields: string[]): Promise<TxClientLike>;
|
66484
|
+
/**
|
66485
|
+
* Removes the specified fields from the hash stored at key.
|
66486
|
+
* https://redis.io/commands/hdel/
|
66487
|
+
* @arg {} key
|
66488
|
+
* @arg {} fields
|
66489
|
+
* @returns number of fields that were removed from the hash
|
66490
|
+
*/
|
66491
|
+
hDel(key: string, fields: string[]): Promise<TxClientLike>;
|
66334
66492
|
/**
|
66335
66493
|
* Iterates fields of Hash types and their associated values.
|
66494
|
+
* @deprecated Use {@link TxClientLike.hScan} instead.
|
66336
66495
|
* @arg {} key
|
66337
66496
|
* @arg {} cursor
|
66338
66497
|
* @arg {} pattern
|
66339
66498
|
* @arg {} count
|
66340
66499
|
*/
|
66341
66500
|
hscan(key: string, cursor: number, pattern?: string | undefined, count?: number | undefined): Promise<TxClientLike>;
|
66501
|
+
/**
|
66502
|
+
* Iterates fields of Hash types and their associated values.
|
66503
|
+
* @arg {} key
|
66504
|
+
* @arg {} cursor
|
66505
|
+
* @arg {} pattern
|
66506
|
+
* @arg {} count
|
66507
|
+
*/
|
66508
|
+
hScan(key: string, cursor: number, pattern?: string | undefined, count?: number | undefined): Promise<TxClientLike>;
|
66342
66509
|
/**
|
66343
66510
|
* Returns all field names in the hash stored at key.
|
66511
|
+
* @deprecated Use {@link TxClientLike.hKeys} instead.
|
66344
66512
|
* @arg {} key
|
66345
66513
|
*/
|
66346
66514
|
hkeys(key: string): Promise<TxClientLike>;
|
66515
|
+
/**
|
66516
|
+
* Returns all field names in the hash stored at key.
|
66517
|
+
* @arg {} key
|
66518
|
+
*/
|
66519
|
+
hKeys(key: string): Promise<TxClientLike>;
|
66347
66520
|
/**
|
66348
66521
|
* Increments the number stored at field in the hash stored at key by increment.
|
66349
66522
|
* https://redis.io/commands/hincrby/
|
66523
|
+
* @deprecated Use {@link TxClientLike.hIncrBy} instead.
|
66350
66524
|
* @arg {} key
|
66351
66525
|
* @arg {} field
|
66352
66526
|
* @arg {} value
|
66353
66527
|
* @returns value of key after the increment
|
66354
66528
|
*/
|
66355
66529
|
hincrby(key: string, field: string, value: number): Promise<TxClientLike>;
|
66530
|
+
/**
|
66531
|
+
* Increments the number stored at field in the hash stored at key by increment.
|
66532
|
+
* https://redis.io/commands/hincrby/
|
66533
|
+
* @arg {} key
|
66534
|
+
* @arg {} field
|
66535
|
+
* @arg {} value
|
66536
|
+
* @returns value of key after the increment
|
66537
|
+
*/
|
66538
|
+
hIncrBy(key: string, field: string, value: number): Promise<TxClientLike>;
|
66356
66539
|
/**
|
66357
66540
|
* Returns the number of fields contained in the hash stored at key.
|
66541
|
+
* @deprecated Use {@link TxClientLike.hLen} instead.
|
66358
66542
|
* @arg {} key
|
66359
66543
|
* @returns the number of fields in the hash, or 0 when the key does not exist.
|
66360
66544
|
*/
|
66361
66545
|
hlen(key: string): Promise<TxClientLike>;
|
66546
|
+
/**
|
66547
|
+
* Returns the number of fields contained in the hash stored at key.
|
66548
|
+
* @arg {} key
|
66549
|
+
* @returns the number of fields in the hash, or 0 when the key does not exist.
|
66550
|
+
*/
|
66551
|
+
hLen(key: string): Promise<TxClientLike>;
|
66362
66552
|
};
|
66363
66553
|
|
66364
66554
|
/**
|