@pliancy/salesforce-cpq-sdk 3.5.0 → 3.6.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.
@@ -8,4 +8,5 @@ export declare class QuoteLines {
8
8
  getByQuoteId(id: string): Promise<QuoteLine[]>;
9
9
  update(items: UpdateQuoteLinesRequest): Promise<SaveResult[]>;
10
10
  delete(ids: string[]): Promise<SaveResult[]>;
11
+ create(items: Partial<Omit<QuoteLine, 'Id'>>[]): Promise<SaveResult[]>;
11
12
  }
@@ -15,5 +15,8 @@ class QuoteLines {
15
15
  async delete(ids) {
16
16
  return this.client.delete(ids);
17
17
  }
18
+ async create(items) {
19
+ return this.client.create(items);
20
+ }
18
21
  }
19
22
  exports.QuoteLines = QuoteLines;
@@ -1,5 +1,6 @@
1
1
  import { Connection, SaveResult } from 'jsforce';
2
2
  import { Quote, QuoteQuery, QuoteWithLineItems, UpdateQuoteLineQuantities, UpdateQuoteLine, UpdateQuoteQuery } from './quote.types';
3
+ import { QuoteLine } from './quote-lines/quote-line.types';
3
4
  export declare class Quotes {
4
5
  private readonly connection;
5
6
  private readonly client;
@@ -13,6 +14,7 @@ export declare class Quotes {
13
14
  updateLineItemQuantities(lineItems: UpdateQuoteLineQuantities[]): Promise<SaveResult[]>;
14
15
  updateLineItems(lineItems: UpdateQuoteLine[]): Promise<SaveResult[]>;
15
16
  deleteLineItems(ids: string[]): Promise<SaveResult[]>;
17
+ addLineItems(lineItems: Partial<Omit<QuoteLine, 'Id'>>[]): Promise<SaveResult[]>;
16
18
  order(quoteId: string, options?: UpdateQuoteQuery): Promise<SaveResult>;
17
19
  submitAndApprove(quoteId: string, comments?: string): Promise<{
18
20
  success: boolean;
@@ -68,6 +68,9 @@ class Quotes {
68
68
  async deleteLineItems(ids) {
69
69
  return this.items.delete(ids);
70
70
  }
71
+ async addLineItems(lineItems) {
72
+ return this.items.create(lineItems);
73
+ }
71
74
  async order(quoteId, options) {
72
75
  const query = this.buildQuery({ Id: quoteId, SBQQ__Ordered__c: true }, options);
73
76
  return this.client.update(query);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pliancy/salesforce-cpq-sdk",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "description": "Salesforce CPQ SDK for Node.js",