@or-sdk/qna
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -6,2 +6,11 @@ # Change Log | ||
## [3.1.2](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/qna@3.1.1...@or-sdk/qna@3.1.2) (2023-07-03) | ||
### Bug Fixes | ||
* **qna:** add error parser ([89db24a](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/89db24a08e3c202e784619d58521df465f392354)) | ||
## [3.1.1](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/qna@3.1.0...@or-sdk/qna@3.1.1) (2023-07-03) | ||
@@ -8,0 +17,0 @@ |
@@ -57,2 +57,4 @@ "use strict"; | ||
var constants_1 = require("./constants"); | ||
var error_parser_1 = require("./error-parser"); | ||
var errorParser = (0, error_parser_1.createErrorParser)(error_parser_1.processors.AXIOS); | ||
var QnA = (function (_super) { | ||
@@ -70,2 +72,5 @@ __extends(QnA, _super); | ||
} | ||
QnA.prototype.parseError = function (err) { | ||
return errorParser(err); | ||
}; | ||
QnA.prototype.loadDocument = function (collectionId, params) { | ||
@@ -72,0 +77,0 @@ return __awaiter(this, void 0, void 0, function () { |
@@ -12,2 +12,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import { SERVICE_KEY } from './constants'; | ||
import { createErrorParser, processors } from './error-parser'; | ||
const errorParser = createErrorParser(processors.AXIOS); | ||
export class QnA extends Base { | ||
@@ -24,2 +26,5 @@ constructor(params) { | ||
} | ||
parseError(err) { | ||
return errorParser(err); | ||
} | ||
loadDocument(collectionId, params) { | ||
@@ -26,0 +31,0 @@ return __awaiter(this, void 0, void 0, function* () { |
@@ -5,2 +5,3 @@ import { Base, List } from '@or-sdk/base'; | ||
constructor(params: QnAConfig); | ||
parseError(err: unknown): Error; | ||
loadDocument(collectionId: string, params: LoadDocument): Promise<Document>; | ||
@@ -7,0 +8,0 @@ createCollection(params: CreateCollection): Promise<Collection>; |
{ | ||
"name": "@or-sdk/qna", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"main": "dist/cjs/index.js", | ||
@@ -16,4 +16,7 @@ "module": "dist/esm/index.js", | ||
"build:watch:types": "tsc --project tsconfig.types.json -w", | ||
"coverage": "vitest run --coverage", | ||
"clean": "rm -rf ./dist", | ||
"dev": "pnpm build:watch:esm" | ||
"dev": "pnpm build:watch:esm", | ||
"test": "vitest", | ||
"test:watch": "vitest --watch" | ||
}, | ||
@@ -26,4 +29,7 @@ "dependencies": { | ||
"@types/lodash": "^4.14.176", | ||
"@vitest/coverage-c8": "^0.31.1", | ||
"concurrently": "^6.4.0", | ||
"typescript": "^4.4.4" | ||
"msw": "^1.2.1", | ||
"typescript": "^4.4.4", | ||
"vitest": "^0.31.1" | ||
}, | ||
@@ -33,3 +39,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "cb08cd6bc42394dbaf8b5307a55f417752708ea9" | ||
"gitHead": "be37739041df8c2d4694c2dc978eaaafb3dbfcd6" | ||
} |
@@ -14,3 +14,6 @@ import { Base, List, makeList } from '@or-sdk/base'; | ||
} from './types'; | ||
import { createErrorParser, processors } from './error-parser'; | ||
const errorParser = createErrorParser(processors.AXIOS); | ||
export class QnA extends Base { | ||
@@ -29,2 +32,6 @@ constructor(params: QnAConfig) { | ||
parseError(err: unknown) { | ||
return errorParser(err); | ||
} | ||
async loadDocument(collectionId: string, params: LoadDocument): Promise<Document> { | ||
@@ -31,0 +38,0 @@ const response = await this.callApiV2<Document>({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
154061
81
2427
6