web-dc-api 0.0.69 → 0.0.70

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/index.d.ts CHANGED
@@ -26984,7 +26984,7 @@ interface IKeyValueOperations {
26984
26984
  * @param key 键名
26985
26985
  * @param writerPubkey 写入者的公钥,如果不指定,则获取所有用户写入的该key的最新值
26986
26986
  * @param vaccount 可选的虚拟账户
26987
- * @returns [值内容, 错误信息]
26987
+ * @returns [值内容, 错误信息] 值的格式: value$$$dckv_extra$$${'timestamp':'%d','opuser':'%s'}
26988
26988
  */
26989
26989
  get(kvdb: KeyValueDB, key: string, writerPubkey?: string, vaccount?: string): Promise<[string | null, Error | null]>;
26990
26990
  /**
@@ -26996,7 +26996,7 @@ interface IKeyValueOperations {
26996
26996
  * @param direction 查询方向
26997
26997
  * @param offset 结果偏移量
26998
26998
  * @param vaccount 可选的虚拟账户
26999
- * @returns [值列表生成的json字符串, 错误信息]
26999
+ * @returns [值列表生成的json字符串, 错误信息] 每个值的格式: value$$$dckv_extra$$${'timestamp':'%d','opuser':'%s'}
27000
27000
  */
27001
27001
  getValues(kvdb: KeyValueDB, key: string, options: {
27002
27002
  limit?: number;
@@ -27010,7 +27010,7 @@ interface IKeyValueOperations {
27010
27010
  * @param keys 多个键名,逗号分隔
27011
27011
  * @param writerPubkey 写入者的公钥,可选,默认为主题作者
27012
27012
  * @param vaccount 可选的虚拟账户
27013
- * @returns [JSON格式值内容, 错误信息]
27013
+ * @returns [JSON格式值内容, 错误信息] 每个值的格式: value$$$dckv_extra$$${'timestamp':'%d','opuser':'%s'}
27014
27014
  */
27015
27015
  getBatch(kvdb: KeyValueDB, keys: string, writerPubkey?: string, vaccount?: string): Promise<[string | null, Error | null]>;
27016
27016
  /**
@@ -27024,7 +27024,7 @@ interface IKeyValueOperations {
27024
27024
  * @param direction 查询方向 (Forward/Backward)
27025
27025
  * @param limit 返回结果数量限制
27026
27026
  * @param vaccount 可选的虚拟账户
27027
- * @returns [JSON格式查询结果, 错误信息]
27027
+ * @returns [JSON格式查询结果, 错误信息] 每个值的格式: value$$$dckv_extra$$${'timestamp':'%d','opuser':'%s'}
27028
27028
  */
27029
27029
  getWithIndex(kvdb: KeyValueDB, indexKey: string, indexValue: string, options: {
27030
27030
  type?: string;
@@ -28076,6 +28076,14 @@ declare class KeyValueModule implements DCModule, IKeyValueOperations {
28076
28076
  getAuthList(kvdb: KeyValueDB, vaccount?: string): Promise<[ThemeAuthInfo[] | null, ThemeComment[] | null, Error | null]>;
28077
28077
  set(kvdb: KeyValueDB, key: string, value: string, indexs: string, //索引列表,格式为json字符串:[{key:"indexkey1",type:"string",value:"value"},{key:"indexkey2",type:"number", value:12}],这里统一转换格式为key1:value1$$$key2:value2
28078
28078
  vaccount?: string): Promise<[boolean | null, Error | null]>;
28079
+ /**
28080
+ * 获取指定键的元数据
28081
+ * @param kvdb
28082
+ * @param key
28083
+ * @param writerPubkey
28084
+ * @param vaccount
28085
+ * @returns [值, 错误信息],值的格式: value$$$dckv_extra$$${'timestamp':'%d','opuser':'%s'}
28086
+ */
28079
28087
  get(kvdb: KeyValueDB, key: string, writerPubkey?: string, vaccount?: string): Promise<[string | null, Error | null]>;
28080
28088
  /**
28081
28089
  * 获取指定键的值列表
@@ -28085,7 +28093,7 @@ declare class KeyValueModule implements DCModule, IKeyValueOperations {
28085
28093
  * @param seekKey 查询起始键,用于分页查询
28086
28094
  * @param offset 结果偏移量
28087
28095
  * @param vaccount 可选的虚拟账户
28088
- * @returns [值列表生成的json字符串, 错误信息]
28096
+ * @returns [值列表生成的json字符串, 错误信息] 每个值的格式: value$$$dckv_extra$$${'timestamp':'%d','opuser':'%s'}
28089
28097
  */
28090
28098
  getValues(kvdb: KeyValueDB, key: string, options: {
28091
28099
  limit?: number;
@@ -28093,7 +28101,27 @@ declare class KeyValueModule implements DCModule, IKeyValueOperations {
28093
28101
  direction?: Direction;
28094
28102
  offset?: number;
28095
28103
  }, vaccount?: string): Promise<[string | null, Error | null]>;
28104
+ /**
28105
+ * 批量获取指定键的值
28106
+ * @param kvdb KeyValueDB实例
28107
+ * @param keys 逗号分隔的键列表
28108
+ * @param writerPubkey 可选,指定写入者公钥
28109
+ * @param vaccount 可选的虚拟账户
28110
+ * @returns [值的JSON字符串, 错误信息] 每个值的格式: value$$$dckv_extra$$${'timestamp':'%d','opuser':'%s'}
28111
+ */
28096
28112
  getBatch(kvdb: KeyValueDB, keys: string, writerPubkey?: string, vaccount?: string): Promise<[string | null, Error | null]>;
28113
+ /**
28114
+ * 获取指定索引的值
28115
+ * @param kvdb KeyValueDB实例
28116
+ * @param indexKey 索引键名
28117
+ * @param indexValue 索引值
28118
+ * @param type 索引值类型
28119
+ * @param seekKey 查询起始键,用于分页查询
28120
+ * @param direction 查询方向
28121
+ * @param offset 结果偏移量
28122
+ * @param vaccount 可选的虚拟账户
28123
+ * @returns [值的JSON字符串, 错误信息] 每个值的格式: value$$$dckv_extra$$${'timestamp':'%d','opuser':'%s'}
28124
+ */
28097
28125
  getWithIndex(kvdb: KeyValueDB, indexKey: string, indexValue: string, options: {
28098
28126
  type?: string;
28099
28127
  limit?: number;