@pliancy/salesforce-cpq-sdk 3.3.0 → 3.4.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.
@@ -1,8 +1,9 @@
1
- import { Connection } from 'jsforce';
1
+ import { Connection, QueryCondition, Schema } from 'jsforce';
2
2
  import { Product } from './product.types';
3
3
  export declare class Products {
4
4
  private readonly connection;
5
5
  private readonly client;
6
6
  constructor(connection: Connection);
7
+ get(query: QueryCondition<Schema, 'Product2'>): Promise<Product[]>;
7
8
  getById(id: string): Promise<Product | null>;
8
9
  }
@@ -6,6 +6,9 @@ class Products {
6
6
  this.connection = connection;
7
7
  this.client = this.connection.sobject('Product2');
8
8
  }
9
+ async get(query) {
10
+ return this.client.find(query);
11
+ }
9
12
  async getById(id) {
10
13
  return this.client.findOne({ Id: id });
11
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pliancy/salesforce-cpq-sdk",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "description": "Salesforce CPQ SDK for Node.js",