@antfly/sdk 0.0.3 → 0.0.5

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.js CHANGED
@@ -128,9 +128,9 @@ var AntflyClient = class {
128
128
  /**
129
129
  * Create a new index
130
130
  */
131
- create: async (tableName, indexName, config) => {
131
+ create: async (tableName, config) => {
132
132
  const { error } = await this.client.POST("/table/{tableName}/index/{indexName}", {
133
- params: { path: { tableName, indexName } },
133
+ params: { path: { tableName, indexName: config.name } },
134
134
  body: config
135
135
  });
136
136
  if (error) throw new Error(`Failed to create index: ${error.error}`);
@@ -276,9 +276,18 @@ var AntflyClient = class {
276
276
  }
277
277
  };
278
278
 
279
+ // src/types.ts
280
+ var providers = [
281
+ "ollama",
282
+ "gemini",
283
+ "openai",
284
+ "bedrock"
285
+ ];
286
+
279
287
  // src/index.ts
280
288
  var index_default = AntflyClient;
281
289
  export {
282
290
  AntflyClient,
283
- index_default as default
291
+ index_default as default,
292
+ providers
284
293
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@antfly/sdk",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "TypeScript SDK for Antfly API",
5
5
  "type": "module",
6
- "main": "./dist/index.ts",
7
- "module": "./dist/index.mjs",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/index.d.ts",
12
- "import": "./dist/index.mjs",
13
- "require": "./dist/index.ts"
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
14
  }
15
15
  },
16
16
  "files": [
@@ -21,13 +21,13 @@
21
21
  "scripts": {
22
22
  "build": "tsup src/index.ts --format cjs,esm --dts --clean",
23
23
  "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
24
- "test": "jest",
25
- "test:coverage": "jest --coverage",
24
+ "test": "node --experimental-vm-modules node_modules/.bin/jest",
25
+ "test:coverage": "node --experimental-vm-modules node_modules/.bin/jest --coverage",
26
26
  "test:ts": "tsc --noEmit",
27
27
  "lint": "eslint src/**/*.ts",
28
28
  "lint:fix": "eslint src/**/*.ts --fix",
29
29
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
30
- "generate": "npx openapi-typescript ../antfly/openapi.yaml -o ./src/antfly-api.d.ts",
30
+ "generate": "npx openapi-typescript ../antfly/openapi.yaml -o ./src/antfly-api.d.ts && npx openapi-typescript bleve-query-openapi.yaml --client fetch -o ./src/bleve-query.d.ts",
31
31
  "prepublishOnly": "npm run test:ts && npm run lint && npm run test && npm run build",
32
32
  "example:node": "tsx examples/node-example.ts"
33
33
  },
@@ -53,16 +53,16 @@
53
53
  "homepage": "https://github.com/antflydb/antfly-ts#readme",
54
54
  "devDependencies": {
55
55
  "@eslint/js": "^9.35.0",
56
- "@types/jest": "^30.0.0",
56
+ "@types/jest": "^25.1.0",
57
57
  "@types/node": "^24.3.1",
58
58
  "@typescript-eslint/eslint-plugin": "^8.42.0",
59
59
  "@typescript-eslint/parser": "^8.42.0",
60
60
  "eslint": "^9.35.0",
61
- "jest": "^30.1.3",
62
- "openapi-typescript": "^7.9.1",
61
+ "jest": "^28.1.0",
62
+ "openapi-typescript": "^5.4.2",
63
63
  "prettier": "^3.6.2",
64
- "ts-jest": "^29.4.1",
65
- "tsup": "^8.5.0",
64
+ "ts-jest": "^28.0.5",
65
+ "tsup": "^8.1.0",
66
66
  "tsx": "^4.20.5",
67
67
  "typescript": "^5.9.2"
68
68
  },