@arrowsphere/api-client 3.140.0-rc.cpu.1 → 3.140.0
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/CHANGELOG.md
CHANGED
|
@@ -3,11 +3,31 @@
|
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
4
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
5
|
|
|
6
|
-
## [3.140.0] - 2024.09.
|
|
6
|
+
## [3.140.0] - 2024.09.17
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- [quotes] add Post and Delete endpoints for quote comments context
|
|
10
|
+
|
|
11
|
+
## [3.139.4] - 2024.09.13
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- [quotes] Fix validate quote path
|
|
15
|
+
|
|
16
|
+
## [3.139.3] - 2024.09.12
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- [quotes] Fix publish quote path
|
|
20
|
+
|
|
21
|
+
## [3.139.2] - 2024.09.11
|
|
7
22
|
|
|
8
23
|
### Fixed
|
|
9
24
|
- [axios] Fix undefined user in clean request log
|
|
10
25
|
|
|
26
|
+
## [3.139.1] - 2024.09.11
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
- [quotes] Fixed createQuote payload, items is optional
|
|
30
|
+
|
|
11
31
|
## [3.139.0] - 2024.09.04
|
|
12
32
|
|
|
13
33
|
### Added
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
export declare enum QuoteCommentsFields {
|
|
3
|
+
BODY = "body"
|
|
4
|
+
}
|
|
5
|
+
export declare type QuoteCommentsType = {
|
|
6
|
+
[QuoteCommentsFields.BODY]: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class QuoteComments extends AbstractEntity<QuoteCommentsType> {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(quoteCommentsResponse: QuoteCommentsType);
|
|
11
|
+
get body(): string;
|
|
12
|
+
toJSON(): QuoteCommentsType;
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _QuoteComments_body;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.QuoteComments = exports.QuoteCommentsFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
17
|
+
var QuoteCommentsFields;
|
|
18
|
+
(function (QuoteCommentsFields) {
|
|
19
|
+
QuoteCommentsFields["BODY"] = "body";
|
|
20
|
+
})(QuoteCommentsFields = exports.QuoteCommentsFields || (exports.QuoteCommentsFields = {}));
|
|
21
|
+
class QuoteComments extends abstractEntity_1.AbstractEntity {
|
|
22
|
+
constructor(quoteCommentsResponse) {
|
|
23
|
+
super(quoteCommentsResponse);
|
|
24
|
+
_QuoteComments_body.set(this, void 0);
|
|
25
|
+
__classPrivateFieldSet(this, _QuoteComments_body, quoteCommentsResponse[QuoteCommentsFields.BODY], "f");
|
|
26
|
+
}
|
|
27
|
+
get body() {
|
|
28
|
+
return __classPrivateFieldGet(this, _QuoteComments_body, "f");
|
|
29
|
+
}
|
|
30
|
+
toJSON() {
|
|
31
|
+
return {
|
|
32
|
+
[QuoteCommentsFields.BODY]: this.body,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.QuoteComments = QuoteComments;
|
|
37
|
+
_QuoteComments_body = new WeakMap();
|
|
38
|
+
//# sourceMappingURL=QuoteComments.js.map
|
|
@@ -2,6 +2,7 @@ import { AbstractRestfulClient, Parameters } from '../abstractRestfulClient';
|
|
|
2
2
|
import { GetResult } from '../getResult';
|
|
3
3
|
import { QuoteRequest } from './entities/QuoteRequest';
|
|
4
4
|
import { PutQuoteResult } from './entities/PutQuoteResult';
|
|
5
|
+
import { QuoteComments } from './entities/QuoteComments';
|
|
5
6
|
export declare type RequestQuoteRequestType = {
|
|
6
7
|
agreeToReceiveCommunications: boolean;
|
|
7
8
|
agreeSharingInformation: boolean;
|
|
@@ -52,9 +53,12 @@ export declare type PublishQuoteRequestType = {
|
|
|
52
53
|
};
|
|
53
54
|
export declare type CreateQuoteRequestType = {
|
|
54
55
|
customer?: QuoteCustomerType;
|
|
55
|
-
items
|
|
56
|
+
items?: QuoteItemType[];
|
|
56
57
|
promotionCode?: string;
|
|
57
58
|
};
|
|
59
|
+
export declare type CreateCommentType = {
|
|
60
|
+
body: string;
|
|
61
|
+
};
|
|
58
62
|
export declare class QuotesClient extends AbstractRestfulClient {
|
|
59
63
|
protected basePath: string;
|
|
60
64
|
requestQuote(postData: RequestQuoteRequestType, parameters?: Parameters): Promise<GetResult<QuoteRequest>>;
|
|
@@ -63,5 +67,7 @@ export declare class QuotesClient extends AbstractRestfulClient {
|
|
|
63
67
|
validateQuote(quoteReference: string, parameters?: Parameters): Promise<GetResult<PutQuoteResult>>;
|
|
64
68
|
createQuote(postData: CreateQuoteRequestType, parameters?: Parameters): Promise<GetResult<PutQuoteResult>>;
|
|
65
69
|
publishQuote(quoteReference: string, postData: PublishQuoteRequestType, parameters?: Parameters): Promise<GetResult<PutQuoteResult>>;
|
|
70
|
+
addCommentToQuote(quoteReference: string, postData: CreateCommentType, parameters?: Parameters): Promise<GetResult<QuoteComments>>;
|
|
71
|
+
deleteQuoteComment(quoteReference: string, commentId: string, parameters?: Parameters): Promise<void>;
|
|
66
72
|
}
|
|
67
73
|
export {};
|
|
@@ -5,6 +5,7 @@ const abstractRestfulClient_1 = require("../abstractRestfulClient");
|
|
|
5
5
|
const getResult_1 = require("../getResult");
|
|
6
6
|
const QuoteRequest_1 = require("./entities/QuoteRequest");
|
|
7
7
|
const PutQuoteResult_1 = require("./entities/PutQuoteResult");
|
|
8
|
+
const QuoteComments_1 = require("./entities/QuoteComments");
|
|
8
9
|
class QuotesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
@@ -23,7 +24,7 @@ class QuotesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
23
24
|
return await this.delete(parameters);
|
|
24
25
|
}
|
|
25
26
|
async validateQuote(quoteReference, parameters = {}) {
|
|
26
|
-
this.path =
|
|
27
|
+
this.path = `/${quoteReference}/validate`;
|
|
27
28
|
return new getResult_1.GetResult(PutQuoteResult_1.PutQuoteResult, await this.get(parameters));
|
|
28
29
|
}
|
|
29
30
|
async createQuote(postData, parameters = {}) {
|
|
@@ -31,9 +32,17 @@ class QuotesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
31
32
|
return new getResult_1.GetResult(PutQuoteResult_1.PutQuoteResult, await this.post(postData, parameters));
|
|
32
33
|
}
|
|
33
34
|
async publishQuote(quoteReference, postData, parameters = {}) {
|
|
34
|
-
this.path =
|
|
35
|
+
this.path = `/${quoteReference}/publish`;
|
|
35
36
|
return new getResult_1.GetResult(PutQuoteResult_1.PutQuoteResult, await this.post(postData, parameters));
|
|
36
37
|
}
|
|
38
|
+
async addCommentToQuote(quoteReference, postData, parameters = {}) {
|
|
39
|
+
this.path = `/${quoteReference}/comments`;
|
|
40
|
+
return new getResult_1.GetResult(QuoteComments_1.QuoteComments, await this.post(postData, parameters));
|
|
41
|
+
}
|
|
42
|
+
async deleteQuoteComment(quoteReference, commentId, parameters = {}) {
|
|
43
|
+
this.path = `/${quoteReference}/comments/${commentId}`;
|
|
44
|
+
return await this.delete(parameters);
|
|
45
|
+
}
|
|
37
46
|
}
|
|
38
47
|
exports.QuotesClient = QuotesClient;
|
|
39
48
|
//# sourceMappingURL=quotesClient.js.map
|
package/package.json
CHANGED