Skip to content

Commit

Permalink
5.11.0 (#6)
Browse files Browse the repository at this point in the history
* feat: list create

* feat: batch write policy ttl

* chore: new statuses

* chore: version bump
  • Loading branch information
bit0r1n authored Feb 21, 2024
1 parent 29af079 commit 9659435
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# aerospike-typings
Since typings in [original repo](https://github.com/aerospike/aerospike-client-nodejs/blob/master/typings/index.d.ts) are kinda messy, like why `export const Client: typeof import("client");`, it results in `object` type?? And there also a lot of any =((

Actual for version 5.9.0/5.10.0
Actual for version 5.11.0

## Workaround to use it
1. Add this repo as submodule
Expand Down
20 changes: 19 additions & 1 deletion aerospike.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,12 @@ declare module "aerospike" {
AEROSPIKE_ERR_QUERY_TIMEOUT,
AEROSPIKE_ERR_QUERY,
AEROSPIKE_ERR_UDF_NOT_FOUND = 1301,
AEROSPIKE_ERR_LUA_FILE_NOT_FOUND
AEROSPIKE_ERR_LUA_FILE_NOT_FOUND,
AEROSPIKE_BATCH_FAILED,
AEROSPIKE_NO_RESPONSE,
AEROSPIKE_MAX_ERROR_RATE,
AEROSPIKE_USE_NORMAL_RETRY,
AEROSPIKE_ERR_MAX_RETRIES_EXCEEDED
}

enum PrivilegeCode {
Expand Down Expand Up @@ -1164,6 +1169,7 @@ declare module "aerospike" {

interface IBatchWritePolicyProps {
filterExpression?: AerospikeExp;
ttl?: number;
key?: PolicyKey;
commitLevel?: PolicyCommitLevel;
gen?: PolicyGen;
Expand All @@ -1173,6 +1179,7 @@ declare module "aerospike" {

export class BatchWritePolicy implements IBatchWritePolicyProps {
public filterExpression?: AerospikeExp;
public ttl?: number;
public key?: PolicyKey;
public commitLevel?: PolicyCommitLevel;
public gen?: PolicyGen;
Expand Down Expand Up @@ -1760,6 +1767,7 @@ declare module "aerospike" {
removeByRank(bin: string, rank: number, returnType?: ListReturnType): ListOperation;
removeByRankRange(bin: string, rank: number, count?: number, returnType?: ListReturnType): InvertibleListOp;
clear(bin: string): ListOperation;
create(bin: string, order: ListOrder, pad?: boolean, persistIndex?: boolean, ctx?: CdtContext): ListOperation;
set(bin: string, index: number, value: AerospikeRecordValue, policy?: IListPolicyProps): ListOperation;
trim(bin: string, index: number, count: number): ListOperation;
get(bin: string, index: number): ListOperation;
Expand Down Expand Up @@ -1954,6 +1962,16 @@ declare module "aerospike" {
ERR_QUERY: Status;
ERR_UDF_NOT_FOUND: Status;
ERR_LUA_FILE_NOT_FOUND: Status;
BATCH_FAILED: Status;
AEROSPIKE_BATCH_FAILED: Status;
NO_RESPONSE: Status;
AEROSPIKE_NO_RESPONSE: Status;
MAX_ERROR_RATE: Status;
AEROSPIKE_MAX_ERROR_RATE: Status;
USE_NORMAL_RETRY: Status;
AEROSPIKE_USE_NORMAL_RETRY: Status;
ERR_MAX_RETRIES_EXCEEDED: Status;
AEROSPIKE_ERR_MAX_RETRIES_EXCEEDED: Status;
getMessage(code: Status): string;
}

Expand Down

0 comments on commit 9659435

Please sign in to comment.