diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ec03d72..23b0e13 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.14.0" + ".": "11.15.0" } diff --git a/.stats.yml b/.stats.yml index 1424601..c4e3e0d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 147 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-56d44b9cbf8ebf60afcfd0a7a215d2a2c6b73f4e5c687503a79fea1300753fd4.yml +configured_endpoints: 151 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-797ef7a04107cfa340b1c27ed13941b34649748674f3e4806b9e60e9ac68e765.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index c43eec2..2d79907 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 11.15.0 (2025-01-29) + +Full Changelog: [v11.14.0...v11.15.0](https://github.com/conductor-is/conductor-node/compare/v11.14.0...v11.15.0) + +### Features + +* **api:** api update ([#57](https://github.com/conductor-is/conductor-node/issues/57)) ([b542b14](https://github.com/conductor-is/conductor-node/commit/b542b145cacbe14b13bae5d3b6c3e4baab98354e)) +* **api:** api update ([#59](https://github.com/conductor-is/conductor-node/issues/59)) ([d4677e4](https://github.com/conductor-is/conductor-node/commit/d4677e48ee63e4b0b4d86bc9233d21f8c7bf0de3)) +* **api:** api update ([#60](https://github.com/conductor-is/conductor-node/issues/60)) ([dd7631e](https://github.com/conductor-is/conductor-node/commit/dd7631e69616b7f0f1be9540eb57c3a822b61e3f)) +* **api:** api update ([#61](https://github.com/conductor-is/conductor-node/issues/61)) ([24a527b](https://github.com/conductor-is/conductor-node/commit/24a527b80266f1c400fc5edd9ec9b013ffb83323)) +* **api:** api update ([#62](https://github.com/conductor-is/conductor-node/issues/62)) ([5f7902e](https://github.com/conductor-is/conductor-node/commit/5f7902e772f347e4335d15907c266f81b08d7efe)) +* **api:** api update ([#63](https://github.com/conductor-is/conductor-node/issues/63)) ([6aec063](https://github.com/conductor-is/conductor-node/commit/6aec06378c6f6b6c459677acb7e270d23062fa1f)) + ## 11.14.0 (2025-01-29) Full Changelog: [v11.13.0...v11.14.0](https://github.com/conductor-is/conductor-node/compare/v11.13.0...v11.14.0) diff --git a/api.md b/api.md index d710021..ad60bed 100644 --- a/api.md +++ b/api.md @@ -371,6 +371,20 @@ Methods: - client.qbd.salesReceipts.list({ ...params }) -> SalesReceiptsCursorPage - client.qbd.salesReceipts.delete(id, { ...params }) -> SalesReceiptDeleteResponse +## SalesRepresentatives + +Types: + +- SalesRepresentative +- SalesRepresentativeListResponse + +Methods: + +- client.qbd.salesRepresentatives.create({ ...params }) -> SalesRepresentative +- client.qbd.salesRepresentatives.retrieve(id, { ...params }) -> SalesRepresentative +- client.qbd.salesRepresentatives.update(id, { ...params }) -> SalesRepresentative +- client.qbd.salesRepresentatives.list({ ...params }) -> SalesRepresentativeListResponse + ## SalesTaxCodes Types: diff --git a/package.json b/package.json index 4e1b464..0fcaa29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "conductor-node", - "version": "11.14.0", + "version": "11.15.0", "description": "The official TypeScript library for the Conductor API", "author": "Conductor ", "types": "dist/index.d.ts", diff --git a/src/resources/qbd/employees.ts b/src/resources/qbd/employees.ts index 7e304d3..c8443ed 100644 --- a/src/resources/qbd/employees.ts +++ b/src/resources/qbd/employees.ts @@ -411,6 +411,11 @@ export namespace Employee { */ city: string | null; + /** + * The country name of the employee address. + */ + country: string | null; + /** * The first line of the employee address (e.g., street, PO Box, or company name). */ @@ -422,6 +427,21 @@ export namespace Employee { */ line2: string | null; + /** + * The third line of the employee address, if needed. + */ + line3: string | null; + + /** + * The fourth line of the employee address, if needed. + */ + line4: string | null; + + /** + * The fifth line of the employee address, if needed. + */ + line5: string | null; + /** * The postal code or ZIP code of the employee address. */ @@ -464,6 +484,7 @@ export namespace Employee { | 'MO' | 'MS' | 'MT' + | 'NB' | 'NC' | 'ND' | 'NE' @@ -1144,6 +1165,11 @@ export namespace EmployeeCreateParams { */ city?: string; + /** + * The country name of the employee address. + */ + country?: string; + /** * The first line of the employee address (e.g., street, PO Box, or company name). */ @@ -1155,6 +1181,21 @@ export namespace EmployeeCreateParams { */ line2?: string; + /** + * The third line of the employee address, if needed. + */ + line3?: string; + + /** + * The fourth line of the employee address, if needed. + */ + line4?: string; + + /** + * The fifth line of the employee address, if needed. + */ + line5?: string; + /** * The postal code or ZIP code of the employee address. */ @@ -1197,6 +1238,7 @@ export namespace EmployeeCreateParams { | 'MO' | 'MS' | 'MT' + | 'NB' | 'NC' | 'ND' | 'NE' @@ -1751,6 +1793,11 @@ export namespace EmployeeUpdateParams { */ city?: string; + /** + * The country name of the employee address. + */ + country?: string; + /** * The first line of the employee address (e.g., street, PO Box, or company name). */ @@ -1762,6 +1809,21 @@ export namespace EmployeeUpdateParams { */ line2?: string; + /** + * The third line of the employee address, if needed. + */ + line3?: string; + + /** + * The fourth line of the employee address, if needed. + */ + line4?: string; + + /** + * The fifth line of the employee address, if needed. + */ + line5?: string; + /** * The postal code or ZIP code of the employee address. */ @@ -1804,6 +1866,7 @@ export namespace EmployeeUpdateParams { | 'MO' | 'MS' | 'MT' + | 'NB' | 'NC' | 'ND' | 'NE' diff --git a/src/resources/qbd/index.ts b/src/resources/qbd/index.ts index eff9834..d78de35 100644 --- a/src/resources/qbd/index.ts +++ b/src/resources/qbd/index.ts @@ -242,6 +242,15 @@ export { type SalesReceiptListParams, type SalesReceiptDeleteParams, } from './sales-receipts'; +export { + SalesRepresentatives, + type SalesRepresentative, + type SalesRepresentativeListResponse, + type SalesRepresentativeCreateParams, + type SalesRepresentativeRetrieveParams, + type SalesRepresentativeUpdateParams, + type SalesRepresentativeListParams, +} from './sales-representatives'; export { SalesTaxCodes, type SalesTaxCode, diff --git a/src/resources/qbd/qbd.ts b/src/resources/qbd/qbd.ts index 5289e98..1e48b24 100644 --- a/src/resources/qbd/qbd.ts +++ b/src/resources/qbd/qbd.ts @@ -266,6 +266,16 @@ import { SalesReceipts, SalesReceiptsCursorPage, } from './sales-receipts'; +import * as SalesRepresentativesAPI from './sales-representatives'; +import { + SalesRepresentative, + SalesRepresentativeCreateParams, + SalesRepresentativeListParams, + SalesRepresentativeListResponse, + SalesRepresentativeRetrieveParams, + SalesRepresentativeUpdateParams, + SalesRepresentatives, +} from './sales-representatives'; import * as SalesTaxCodesAPI from './sales-tax-codes'; import { SalesTaxCode, @@ -385,6 +395,8 @@ export class Qbd extends APIResource { receivePayments: ReceivePaymentsAPI.ReceivePayments = new ReceivePaymentsAPI.ReceivePayments(this._client); salesOrders: SalesOrdersAPI.SalesOrders = new SalesOrdersAPI.SalesOrders(this._client); salesReceipts: SalesReceiptsAPI.SalesReceipts = new SalesReceiptsAPI.SalesReceipts(this._client); + salesRepresentatives: SalesRepresentativesAPI.SalesRepresentatives = + new SalesRepresentativesAPI.SalesRepresentatives(this._client); salesTaxCodes: SalesTaxCodesAPI.SalesTaxCodes = new SalesTaxCodesAPI.SalesTaxCodes(this._client); salesTaxItems: SalesTaxItemsAPI.SalesTaxItems = new SalesTaxItemsAPI.SalesTaxItems(this._client); serviceItems: ServiceItemsAPI.ServiceItems = new ServiceItemsAPI.ServiceItems(this._client); @@ -439,6 +451,7 @@ Qbd.SalesOrders = SalesOrders; Qbd.SalesOrdersCursorPage = SalesOrdersCursorPage; Qbd.SalesReceipts = SalesReceipts; Qbd.SalesReceiptsCursorPage = SalesReceiptsCursorPage; +Qbd.SalesRepresentatives = SalesRepresentatives; Qbd.SalesTaxCodes = SalesTaxCodes; Qbd.SalesTaxItems = SalesTaxItems; Qbd.SalesTaxItemsCursorPage = SalesTaxItemsCursorPage; @@ -720,6 +733,16 @@ export declare namespace Qbd { type SalesReceiptDeleteParams as SalesReceiptDeleteParams, }; + export { + SalesRepresentatives as SalesRepresentatives, + type SalesRepresentative as SalesRepresentative, + type SalesRepresentativeListResponse as SalesRepresentativeListResponse, + type SalesRepresentativeCreateParams as SalesRepresentativeCreateParams, + type SalesRepresentativeRetrieveParams as SalesRepresentativeRetrieveParams, + type SalesRepresentativeUpdateParams as SalesRepresentativeUpdateParams, + type SalesRepresentativeListParams as SalesRepresentativeListParams, + }; + export { SalesTaxCodes as SalesTaxCodes, type SalesTaxCode as SalesTaxCode, diff --git a/src/resources/qbd/sales-representatives.ts b/src/resources/qbd/sales-representatives.ts new file mode 100644 index 0000000..513e166 --- /dev/null +++ b/src/resources/qbd/sales-representatives.ts @@ -0,0 +1,334 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; + +export class SalesRepresentatives extends APIResource { + /** + * Creates a new sales representative. + */ + create( + params: SalesRepresentativeCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { 'Conductor-End-User-Id': conductorEndUserId, ...body } = params; + return this._client.post('/quickbooks-desktop/sales-representatives', { + body, + ...options, + headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers }, + }); + } + + /** + * Retrieves a sales representative by ID. + */ + retrieve( + id: string, + params: SalesRepresentativeRetrieveParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { 'Conductor-End-User-Id': conductorEndUserId } = params; + return this._client.get(`/quickbooks-desktop/sales-representatives/${id}`, { + ...options, + headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers }, + }); + } + + /** + * Updates an existing sales representative. + */ + update( + id: string, + params: SalesRepresentativeUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { 'Conductor-End-User-Id': conductorEndUserId, ...body } = params; + return this._client.post(`/quickbooks-desktop/sales-representatives/${id}`, { + body, + ...options, + headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers }, + }); + } + + /** + * Returns a list of sales representatives. NOTE: QuickBooks Desktop does not + * support pagination for sales representatives; hence, there is no `cursor` + * parameter. Users typically have few sales representatives. + */ + list( + params: SalesRepresentativeListParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { 'Conductor-End-User-Id': conductorEndUserId, ...query } = params; + return this._client.get('/quickbooks-desktop/sales-representatives', { + query, + ...options, + headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers }, + }); + } +} + +export interface SalesRepresentative { + /** + * The unique identifier assigned by QuickBooks to this sales representative. This + * ID is unique across all sales representatives but not across different + * QuickBooks object types. + */ + id: string; + + /** + * The date and time when this sales representative was created, in ISO 8601 format + * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone + * in QuickBooks. + */ + createdAt: string; + + /** + * The sales representative's corresponding person entity in QuickBooks, stored as + * either an employee, vendor, or other-name entry. + */ + entity: SalesRepresentative.Entity; + + /** + * The initials of this sales representative's name. + */ + initial: string | null; + + /** + * Indicates whether this sales representative is active. Inactive objects are + * typically hidden from views and reports in QuickBooks. Defaults to `true`. + */ + isActive: boolean; + + /** + * The type of object. This value is always `"qbd_sales_representative"`. + */ + objectType: 'qbd_sales_representative'; + + /** + * The current revision number of this sales representative object, which changes + * each time the object is modified. When updating this object, you must provide + * the most recent `revisionNumber` to ensure you're working with the latest data; + * otherwise, the update will return an error. + */ + revisionNumber: string; + + /** + * The date and time when this sales representative was last updated, in ISO 8601 + * format (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time + * zone in QuickBooks. + */ + updatedAt: string; +} + +export namespace SalesRepresentative { + /** + * The sales representative's corresponding person entity in QuickBooks, stored as + * either an employee, vendor, or other-name entry. + */ + export interface Entity { + /** + * The unique identifier assigned by QuickBooks to this object. This ID is unique + * across all objects of the same type, but not across different QuickBooks object + * types. + */ + id: string | null; + + /** + * The fully-qualified unique name for this object, formed by combining the names + * of its parent objects with its own `name`, separated by colons. Not + * case-sensitive. + */ + fullName: string | null; + } +} + +export interface SalesRepresentativeListResponse { + /** + * The array of sales representatives. + */ + data: Array; + + /** + * The type of object. This value is always `"list"`. + */ + objectType: 'list'; + + /** + * The endpoint URL where this list can be accessed. + */ + url: string; +} + +export interface SalesRepresentativeCreateParams { + /** + * Body param: The sales representative's corresponding person entity in + * QuickBooks, stored as either an employee, vendor, or other-name entry. + */ + entityId: string; + + /** + * Header param: The ID of the EndUser to receive this request (e.g., + * `"Conductor-End-User-Id: {{END_USER_ID}}"`). + */ + 'Conductor-End-User-Id': string; + + /** + * Body param: The initials of this sales representative's name. + */ + initial?: string; + + /** + * Body param: Indicates whether this sales representative is active. Inactive + * objects are typically hidden from views and reports in QuickBooks. Defaults to + * `true`. + */ + isActive?: boolean; +} + +export interface SalesRepresentativeRetrieveParams { + /** + * The ID of the EndUser to receive this request (e.g., + * `"Conductor-End-User-Id: {{END_USER_ID}}"`). + */ + 'Conductor-End-User-Id': string; +} + +export interface SalesRepresentativeUpdateParams { + /** + * Body param: The current revision number of the sales representative object you + * are updating, which you can get by fetching the object first. Provide the most + * recent `revisionNumber` to ensure you're working with the latest data; + * otherwise, the update will return an error. + */ + revisionNumber: string; + + /** + * Header param: The ID of the EndUser to receive this request (e.g., + * `"Conductor-End-User-Id: {{END_USER_ID}}"`). + */ + 'Conductor-End-User-Id': string; + + /** + * Body param: The sales representative's corresponding person entity in + * QuickBooks, stored as either an employee, vendor, or other-name entry. + */ + entityId?: string; + + /** + * Body param: The initials of this sales representative's name. + */ + initial?: string; + + /** + * Body param: Indicates whether this sales representative is active. Inactive + * objects are typically hidden from views and reports in QuickBooks. Defaults to + * `true`. + */ + isActive?: boolean; +} + +export interface SalesRepresentativeListParams { + /** + * Header param: The ID of the EndUser to receive this request (e.g., + * `"Conductor-End-User-Id: {{END_USER_ID}}"`). + */ + 'Conductor-End-User-Id': string; + + /** + * Query param: Filter for specific sales representatives by their + * QuickBooks-assigned unique identifier(s). + * + * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other + * query parameters for this request. + */ + ids?: Array; + + /** + * Query param: The maximum number of objects to return. + * + * **IMPORTANT**: QuickBooks Desktop does not support cursor-based pagination for + * sales representatives. This parameter will limit the response size, but you + * cannot fetch subsequent results using a cursor. For pagination, use the + * name-range parameters instead (e.g., `nameFrom=A&nameTo=B`). + * + * When this parameter is omitted, the endpoint returns all sales representatives + * without limit, unlike paginated endpoints which default to 150 records. This is + * acceptable because sales representatives typically have low record counts. + */ + limit?: number; + + /** + * Query param: Filter for sales representatives whose `name` contains this + * substring, case-insensitive. NOTE: If you use this parameter, you cannot also + * use `nameStartsWith` or `nameEndsWith`. + */ + nameContains?: string; + + /** + * Query param: Filter for sales representatives whose `name` ends with this + * substring, case-insensitive. NOTE: If you use this parameter, you cannot also + * use `nameContains` or `nameStartsWith`. + */ + nameEndsWith?: string; + + /** + * Query param: Filter for sales representatives whose `name` is alphabetically + * greater than or equal to this value. + */ + nameFrom?: string; + + /** + * Query param: Filter for specific sales representatives by their name(s), + * case-insensitive. Like `id`, `name` is a unique identifier for a sales + * representative. + * + * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other + * query parameters for this request. + */ + names?: Array; + + /** + * Query param: Filter for sales representatives whose `name` starts with this + * substring, case-insensitive. NOTE: If you use this parameter, you cannot also + * use `nameContains` or `nameEndsWith`. + */ + nameStartsWith?: string; + + /** + * Query param: Filter for sales representatives whose `name` is alphabetically + * less than or equal to this value. + */ + nameTo?: string; + + /** + * Query param: Filter for sales representatives that are active, inactive, or + * both. + */ + status?: 'active' | 'all' | 'inactive'; + + /** + * Query param: Filter for sales representatives updated on or after this date and + * time, in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date + * (YYYY-MM-DD), the time is assumed to be 00:00:00 of that day. + */ + updatedAfter?: string; + + /** + * Query param: Filter for sales representatives updated on or before this date and + * time, in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date + * (YYYY-MM-DD), the time is assumed to be 23:59:59 of that day. + */ + updatedBefore?: string; +} + +export declare namespace SalesRepresentatives { + export { + type SalesRepresentative as SalesRepresentative, + type SalesRepresentativeListResponse as SalesRepresentativeListResponse, + type SalesRepresentativeCreateParams as SalesRepresentativeCreateParams, + type SalesRepresentativeRetrieveParams as SalesRepresentativeRetrieveParams, + type SalesRepresentativeUpdateParams as SalesRepresentativeUpdateParams, + type SalesRepresentativeListParams as SalesRepresentativeListParams, + }; +} diff --git a/src/version.ts b/src/version.ts index a17835a..102569a 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '11.14.0'; // x-release-please-version +export const VERSION = '11.15.0'; // x-release-please-version diff --git a/tests/api-resources/qbd/employees.test.ts b/tests/api-resources/qbd/employees.test.ts index 0e5a2db..07ae068 100644 --- a/tests/api-resources/qbd/employees.test.ts +++ b/tests/api-resources/qbd/employees.test.ts @@ -29,8 +29,12 @@ describe('resource employees', () => { additionalNotes: [{ note: 'This is a fun note.' }], address: { city: 'San Francisco', + country: 'United States', line1: 'Conductor Labs Inc.', line2: '540 Market St.', + line3: 'Suite 100', + line4: '', + line5: '', postalCode: '94110', state: 'none', }, @@ -147,8 +151,12 @@ describe('resource employees', () => { additionalNotes: [{ id: 1, note: 'This is a fun note.' }], address: { city: 'San Francisco', + country: 'United States', line1: 'Conductor Labs Inc.', line2: '540 Market St.', + line3: 'Suite 100', + line4: '', + line5: '', postalCode: '94110', state: 'none', }, diff --git a/tests/api-resources/qbd/sales-representatives.test.ts b/tests/api-resources/qbd/sales-representatives.test.ts new file mode 100644 index 0000000..e82f3ff --- /dev/null +++ b/tests/api-resources/qbd/sales-representatives.test.ts @@ -0,0 +1,107 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Conductor from 'conductor-node'; +import { Response } from 'node-fetch'; + +const client = new Conductor({ + apiKey: 'My API Key', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource salesRepresentatives', () => { + test('create: only required params', async () => { + const responsePromise = client.qbd.salesRepresentatives.create({ + entityId: '80000001-1234567890', + 'Conductor-End-User-Id': 'end_usr_1234567abcdefg', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('create: required and optional params', async () => { + const response = await client.qbd.salesRepresentatives.create({ + entityId: '80000001-1234567890', + 'Conductor-End-User-Id': 'end_usr_1234567abcdefg', + initial: 'JD', + isActive: true, + }); + }); + + test('retrieve: only required params', async () => { + const responsePromise = client.qbd.salesRepresentatives.retrieve('80000001-1234567890', { + 'Conductor-End-User-Id': 'end_usr_1234567abcdefg', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('retrieve: required and optional params', async () => { + const response = await client.qbd.salesRepresentatives.retrieve('80000001-1234567890', { + 'Conductor-End-User-Id': 'end_usr_1234567abcdefg', + }); + }); + + test('update: only required params', async () => { + const responsePromise = client.qbd.salesRepresentatives.update('80000001-1234567890', { + revisionNumber: '1721172183', + 'Conductor-End-User-Id': 'end_usr_1234567abcdefg', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('update: required and optional params', async () => { + const response = await client.qbd.salesRepresentatives.update('80000001-1234567890', { + revisionNumber: '1721172183', + 'Conductor-End-User-Id': 'end_usr_1234567abcdefg', + entityId: '80000001-1234567890', + initial: 'JD', + isActive: true, + }); + }); + + test('list: only required params', async () => { + const responsePromise = client.qbd.salesRepresentatives.list({ + 'Conductor-End-User-Id': 'end_usr_1234567abcdefg', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('list: required and optional params', async () => { + const response = await client.qbd.salesRepresentatives.list({ + 'Conductor-End-User-Id': 'end_usr_1234567abcdefg', + ids: ['80000001-1234567890'], + limit: 10, + nameContains: 'ABC', + nameEndsWith: 'ABC', + nameFrom: 'A', + names: ['John Doe'], + nameStartsWith: 'ABC', + nameTo: 'Z', + status: 'active', + updatedAfter: 'updatedAfter', + updatedBefore: 'updatedBefore', + }); + }); +});