@pliancy/salesforce-cpq-sdk 3.4.0 → 3.5.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.
|
@@ -103,8 +103,12 @@ export declare enum QuoteType {
|
|
|
103
103
|
export type QuoteWithLineItems = Quote & {
|
|
104
104
|
lineItems: QuoteLine[];
|
|
105
105
|
};
|
|
106
|
-
export type
|
|
107
|
-
export
|
|
106
|
+
export type UpdateQuoteLineQuantities = Pick<QuoteLine, 'Id' | 'SBQQ__Quantity__c'>;
|
|
107
|
+
export interface UpdateQuoteLine {
|
|
108
|
+
Id: string;
|
|
109
|
+
[index: string]: keyof QuoteLine;
|
|
110
|
+
}
|
|
111
|
+
export type UpdateQuoteLinesRequest = UpdateQuoteLineQuantities[] | UpdateQuoteLine[];
|
|
108
112
|
export declare enum ApprovalStatus {
|
|
109
113
|
APPROVED = "Approved",
|
|
110
114
|
REJECTED = "Rejected",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Connection, SaveResult } from 'jsforce';
|
|
2
|
-
import { Quote, QuoteQuery, QuoteWithLineItems, UpdateQuoteLine, UpdateQuoteQuery } from './quote.types';
|
|
2
|
+
import { Quote, QuoteQuery, QuoteWithLineItems, UpdateQuoteLineQuantities, UpdateQuoteLine, UpdateQuoteQuery } from './quote.types';
|
|
3
3
|
export declare class Quotes {
|
|
4
4
|
private readonly connection;
|
|
5
5
|
private readonly client;
|
|
@@ -10,7 +10,9 @@ export declare class Quotes {
|
|
|
10
10
|
getByAccountId(accountId: string, options?: QuoteQuery): Promise<QuoteWithLineItems[]>;
|
|
11
11
|
getOriginal(accountId: string): Promise<Quote | undefined>;
|
|
12
12
|
update(quoteId: string, query: Partial<Omit<Quote, 'Id'>>): Promise<SaveResult>;
|
|
13
|
-
updateLineItemQuantities(lineItems:
|
|
13
|
+
updateLineItemQuantities(lineItems: UpdateQuoteLineQuantities[]): Promise<SaveResult[]>;
|
|
14
|
+
updateLineItems(lineItems: UpdateQuoteLine[]): Promise<SaveResult[]>;
|
|
15
|
+
deleteLineItems(ids: string[]): Promise<SaveResult[]>;
|
|
14
16
|
order(quoteId: string, options?: UpdateQuoteQuery): Promise<SaveResult>;
|
|
15
17
|
submitAndApprove(quoteId: string, comments?: string): Promise<{
|
|
16
18
|
success: boolean;
|
|
@@ -62,6 +62,12 @@ class Quotes {
|
|
|
62
62
|
async updateLineItemQuantities(lineItems) {
|
|
63
63
|
return this.items.update(lineItems);
|
|
64
64
|
}
|
|
65
|
+
async updateLineItems(lineItems) {
|
|
66
|
+
return this.items.update(lineItems);
|
|
67
|
+
}
|
|
68
|
+
async deleteLineItems(ids) {
|
|
69
|
+
return this.items.delete(ids);
|
|
70
|
+
}
|
|
65
71
|
async order(quoteId, options) {
|
|
66
72
|
const query = this.buildQuery({ Id: quoteId, SBQQ__Ordered__c: true }, options);
|
|
67
73
|
return this.client.update(query);
|