diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f2ada20..099626f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.7.2" + ".": "1.8.0" } diff --git a/.stats.yml b/.stats.yml index 56f5a81..49508b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 17 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-56b0f699c5437d9e5326626d35dfc972c17d01f12cb416c7f4854c8ea6d0e95e.yml -openapi_spec_hash: 158f405c1880706266d83e6ff16b9d2f -config_hash: 41c337f5cda03b13880617490f82bad0 +configured_endpoints: 21 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-d9763d006969b49a1473851069fdfa429eb13133b64103a62963bb70ddb22305.yml +openapi_spec_hash: 6aee689b7a759b12c85c088c15e29bc0 +config_hash: 4ab3e1ee76a463e0ed214541260ee12e diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fd105c..02e2bc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 1.8.0 (2026-02-23) + +Full Changelog: [v1.7.2...v1.8.0](https://github.com/CASParser/cas-parser-node/compare/v1.7.2...v1.8.0) + +### Features + +* **api:** api update ([58b6b46](https://github.com/CASParser/cas-parser-node/commit/58b6b46652f008b870fa189dc960c2d53e1a3887)) +* **api:** api update ([a7e9bf9](https://github.com/CASParser/cas-parser-node/commit/a7e9bf9a5e23696d476b150f3149f853994d4f6c)) +* **api:** api update ([c7c17cd](https://github.com/CASParser/cas-parser-node/commit/c7c17cd05e594d81b830765d2904c95b6387c1d1)) +* **api:** manual updates ([d666a0b](https://github.com/CASParser/cas-parser-node/commit/d666a0b46b2d37de44fd443a92fd4b883a2ba98d)) + ## 1.7.2 (2026-02-20) Full Changelog: [v1.7.1...v1.7.2](https://github.com/CASParser/cas-parser-node/compare/v1.7.1...v1.7.2) diff --git a/api.md b/api.md index f660413..50ab7c8 100644 --- a/api.md +++ b/api.md @@ -6,7 +6,7 @@ Types: Methods: -- client.credits.check() -> CreditCheckResponse +- client.credits.check() -> CreditCheckResponse # Logs @@ -17,8 +17,8 @@ Types: Methods: -- client.logs.create({ ...params }) -> LogCreateResponse -- client.logs.getSummary({ ...params }) -> LogGetSummaryResponse +- client.logs.create({ ...params }) -> LogCreateResponse +- client.logs.getSummary({ ...params }) -> LogGetSummaryResponse # AccessToken @@ -28,7 +28,7 @@ Types: Methods: -- client.accessToken.create({ ...params }) -> AccessTokenCreateResponse +- client.accessToken.create({ ...params }) -> AccessTokenCreateResponse # VerifyToken @@ -38,7 +38,7 @@ Types: Methods: -- client.verifyToken.verify() -> VerifyTokenVerifyResponse +- client.verifyToken.verify() -> VerifyTokenVerifyResponse # CamsKfintech @@ -117,3 +117,19 @@ Methods: Methods: - client.smart.parseCasPdf({ ...params }) -> UnifiedResponse + +# InboundEmail + +Types: + +- InboundEmailCreateResponse +- InboundEmailRetrieveResponse +- InboundEmailListResponse +- InboundEmailDeleteResponse + +Methods: + +- client.inboundEmail.create({ ...params }) -> InboundEmailCreateResponse +- client.inboundEmail.retrieve(inboundEmailID) -> InboundEmailRetrieveResponse +- client.inboundEmail.list({ ...params }) -> InboundEmailListResponse +- client.inboundEmail.delete(inboundEmailID) -> InboundEmailDeleteResponse diff --git a/package.json b/package.json index 8f8f6af..9ee2bf9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cas-parser-node", - "version": "1.7.2", + "version": "1.8.0", "description": "The official TypeScript library for the Cas Parser API", "author": "Cas Parser ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index da878ae..d6d4673 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -1,7 +1,7 @@ { "dxt_version": "0.2", "name": "cas-parser-node-mcp", - "version": "1.7.2", + "version": "1.8.0", "description": "The official MCP Server for the Cas Parser API", "author": { "name": "Cas Parser", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 5b787e2..2ef90ea 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "cas-parser-node-mcp", - "version": "1.7.2", + "version": "1.8.0", "description": "The official MCP Server for the Cas Parser API", "author": "Cas Parser ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/methods.ts b/packages/mcp-server/src/methods.ts index cc3ccfe..61695cd 100644 --- a/packages/mcp-server/src/methods.ts +++ b/packages/mcp-server/src/methods.ts @@ -14,31 +14,31 @@ export const sdkMethods: SdkMethod[] = [ clientCallName: 'client.credits.check', fullyQualifiedName: 'credits.check', httpMethod: 'post', - httpPath: '/credits', + httpPath: '/v1/credits', }, { clientCallName: 'client.logs.create', fullyQualifiedName: 'logs.create', httpMethod: 'post', - httpPath: '/logs', + httpPath: '/v1/usage', }, { clientCallName: 'client.logs.getSummary', fullyQualifiedName: 'logs.getSummary', httpMethod: 'post', - httpPath: '/logs/summary', + httpPath: '/v1/usage/summary', }, { clientCallName: 'client.accessToken.create', fullyQualifiedName: 'accessToken.create', httpMethod: 'post', - httpPath: '/v1/access-token', + httpPath: '/v1/token', }, { clientCallName: 'client.verifyToken.verify', fullyQualifiedName: 'verifyToken.verify', httpMethod: 'post', - httpPath: '/v1/verify-token', + httpPath: '/v1/token/verify', }, { clientCallName: 'client.camsKfintech.parse', @@ -112,6 +112,30 @@ export const sdkMethods: SdkMethod[] = [ httpMethod: 'post', httpPath: '/v4/smart/parse', }, + { + clientCallName: 'client.inboundEmail.create', + fullyQualifiedName: 'inboundEmail.create', + httpMethod: 'post', + httpPath: '/v4/inbound-email', + }, + { + clientCallName: 'client.inboundEmail.retrieve', + fullyQualifiedName: 'inboundEmail.retrieve', + httpMethod: 'get', + httpPath: '/v4/inbound-email/{inbound_email_id}', + }, + { + clientCallName: 'client.inboundEmail.list', + fullyQualifiedName: 'inboundEmail.list', + httpMethod: 'get', + httpPath: '/v4/inbound-email', + }, + { + clientCallName: 'client.inboundEmail.delete', + fullyQualifiedName: 'inboundEmail.delete', + httpMethod: 'delete', + httpPath: '/v4/inbound-email/{inbound_email_id}', + }, ]; function allowedMethodsForCodeTool(options: McpOptions | undefined): SdkMethod[] | undefined { diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 9112f69..aa20a3e 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -21,7 +21,7 @@ export const newMcpServer = async (stainlessApiKey: string | undefined) => new McpServer( { name: 'cas_parser_node_api', - version: '1.7.2', + version: '1.8.0', }, { instructions: await getInstructions(stainlessApiKey), diff --git a/src/client.ts b/src/client.ts index bc8fec0..7a361c3 100644 --- a/src/client.ts +++ b/src/client.ts @@ -26,6 +26,15 @@ import { } from './resources/cams-kfintech'; import { ContractNote, ContractNoteParseParams, ContractNoteParseResponse } from './resources/contract-note'; import { CreditCheckResponse, Credits } from './resources/credits'; +import { + InboundEmail, + InboundEmailCreateParams, + InboundEmailCreateResponse, + InboundEmailDeleteResponse, + InboundEmailListParams, + InboundEmailListResponse, + InboundEmailRetrieveResponse, +} from './resources/inbound-email'; import { Inbox, InboxCheckConnectionStatusParams, @@ -800,6 +809,7 @@ export class CasParser { kfintech: API.Kfintech = new API.Kfintech(this); nsdl: API.Nsdl = new API.Nsdl(this); smart: API.Smart = new API.Smart(this); + inboundEmail: API.InboundEmail = new API.InboundEmail(this); } CasParser.Credits = Credits; @@ -813,6 +823,7 @@ CasParser.Inbox = Inbox; CasParser.Kfintech = Kfintech; CasParser.Nsdl = Nsdl; CasParser.Smart = Smart; +CasParser.InboundEmail = InboundEmail; export declare namespace CasParser { export type RequestOptions = Opts.RequestOptions; @@ -872,4 +883,14 @@ export declare namespace CasParser { export { Nsdl as Nsdl, type NsdlParseParams as NsdlParseParams }; export { Smart as Smart, type SmartParseCasPdfParams as SmartParseCasPdfParams }; + + export { + InboundEmail as InboundEmail, + type InboundEmailCreateResponse as InboundEmailCreateResponse, + type InboundEmailRetrieveResponse as InboundEmailRetrieveResponse, + type InboundEmailListResponse as InboundEmailListResponse, + type InboundEmailDeleteResponse as InboundEmailDeleteResponse, + type InboundEmailCreateParams as InboundEmailCreateParams, + type InboundEmailListParams as InboundEmailListParams, + }; } diff --git a/src/resources/access-token.ts b/src/resources/access-token.ts index e6927fc..14b5bb7 100644 --- a/src/resources/access-token.ts +++ b/src/resources/access-token.ts @@ -11,6 +11,8 @@ export class AccessToken extends APIResource { * **Use this endpoint from your backend** to create tokens that can be safely * passed to frontend/SDK. * + * **Legacy path:** `/v1/access-token` (still supported) + * * Access tokens: * * - Are prefixed with `at_` for easy identification @@ -27,7 +29,7 @@ export class AccessToken extends APIResource { body: AccessTokenCreateParams | null | undefined = {}, options?: RequestOptions, ): APIPromise { - return this._client.post('/v1/access-token', { body, ...options }); + return this._client.post('/v1/token', { body, ...options }); } } diff --git a/src/resources/credits.ts b/src/resources/credits.ts index a174cfd..b72459e 100644 --- a/src/resources/credits.ts +++ b/src/resources/credits.ts @@ -17,7 +17,7 @@ export class Credits extends APIResource { * Credits reset at the start of each billing period. */ check(options?: RequestOptions): APIPromise { - return this._client.post('/credits', options); + return this._client.post('/v1/credits', options); } } diff --git a/src/resources/inbound-email.ts b/src/resources/inbound-email.ts new file mode 100644 index 0000000..7fb4d39 --- /dev/null +++ b/src/resources/inbound-email.ts @@ -0,0 +1,332 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../core/resource'; +import { APIPromise } from '../core/api-promise'; +import { RequestOptions } from '../internal/request-options'; +import { path } from '../internal/utils/path'; + +export class InboundEmail extends APIResource { + /** + * Create a dedicated inbound email address for collecting CAS statements via email + * forwarding. + * + * **How it works:** + * + * 1. Create an inbound email with your webhook URL + * 2. Display the email address to your user (e.g., "Forward your CAS to + * ie_xxx@import.casparser.in") + * 3. When an investor forwards a CAS email, we verify the sender and deliver to + * your webhook + * + * **Webhook Delivery:** + * + * - We POST to your `callback_url` with JSON body containing files (matching + * EmailCASFile schema) + * - Failed deliveries are retried automatically with exponential backoff + * + * **Inactivity:** + * + * - Inbound emails with no activity in 30 days are marked inactive + * - Active inbound emails remain operational indefinitely + * + * @example + * ```ts + * const inboundEmail = await client.inboundEmail.create({ + * callback_url: + * 'https://api.yourapp.com/webhooks/cas-email', + * }); + * ``` + */ + create(body: InboundEmailCreateParams, options?: RequestOptions): APIPromise { + return this._client.post('/v4/inbound-email', { body, ...options }); + } + + /** + * Retrieve details of a specific mailbox including statistics. + * + * @example + * ```ts + * const inboundEmail = await client.inboundEmail.retrieve( + * 'ie_a1b2c3d4e5f6', + * ); + * ``` + */ + retrieve(inboundEmailID: string, options?: RequestOptions): APIPromise { + return this._client.get(path`/v4/inbound-email/${inboundEmailID}`, options); + } + + /** + * List all mailboxes associated with your API key. Returns active and inactive + * mailboxes (deleted mailboxes are excluded). + * + * @example + * ```ts + * const inboundEmails = await client.inboundEmail.list(); + * ``` + */ + list( + query: InboundEmailListParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + return this._client.get('/v4/inbound-email', { query, ...options }); + } + + /** + * Permanently delete an inbound email address. It will stop accepting emails. + * + * **Note:** Deletion is immediate and cannot be undone. Any emails received after + * deletion will be rejected. + * + * @example + * ```ts + * const inboundEmail = await client.inboundEmail.delete( + * 'inbound_email_id', + * ); + * ``` + */ + delete(inboundEmailID: string, options?: RequestOptions): APIPromise { + return this._client.delete(path`/v4/inbound-email/${inboundEmailID}`, options); + } +} + +/** + * An inbound email address for receiving forwarded CAS emails + */ +export interface InboundEmailCreateResponse { + /** + * Accepted CAS providers (empty = all) + */ + allowed_sources?: Array<'cdsl' | 'nsdl' | 'cams' | 'kfintech'>; + + /** + * Webhook URL for email notifications + */ + callback_url?: string; + + /** + * When the mailbox was created + */ + created_at?: string; + + /** + * The inbound email address to forward CAS statements to + */ + email?: string; + + /** + * Unique inbound email identifier + */ + inbound_email_id?: string; + + /** + * Custom key-value metadata + */ + metadata?: { [key: string]: string }; + + /** + * Your internal reference identifier + */ + reference?: string | null; + + /** + * Current mailbox status + */ + status?: 'active' | 'paused'; + + /** + * When the mailbox was last updated + */ + updated_at?: string; +} + +/** + * An inbound email address for receiving forwarded CAS emails + */ +export interface InboundEmailRetrieveResponse { + /** + * Accepted CAS providers (empty = all) + */ + allowed_sources?: Array<'cdsl' | 'nsdl' | 'cams' | 'kfintech'>; + + /** + * Webhook URL for email notifications + */ + callback_url?: string; + + /** + * When the mailbox was created + */ + created_at?: string; + + /** + * The inbound email address to forward CAS statements to + */ + email?: string; + + /** + * Unique inbound email identifier + */ + inbound_email_id?: string; + + /** + * Custom key-value metadata + */ + metadata?: { [key: string]: string }; + + /** + * Your internal reference identifier + */ + reference?: string | null; + + /** + * Current mailbox status + */ + status?: 'active' | 'paused'; + + /** + * When the mailbox was last updated + */ + updated_at?: string; +} + +export interface InboundEmailListResponse { + inbound_emails?: Array; + + limit?: number; + + offset?: number; + + status?: string; + + /** + * Total number of inbound emails (for pagination) + */ + total?: number; +} + +export namespace InboundEmailListResponse { + /** + * An inbound email address for receiving forwarded CAS emails + */ + export interface InboundEmail { + /** + * Accepted CAS providers (empty = all) + */ + allowed_sources?: Array<'cdsl' | 'nsdl' | 'cams' | 'kfintech'>; + + /** + * Webhook URL for email notifications + */ + callback_url?: string; + + /** + * When the mailbox was created + */ + created_at?: string; + + /** + * The inbound email address to forward CAS statements to + */ + email?: string; + + /** + * Unique inbound email identifier + */ + inbound_email_id?: string; + + /** + * Custom key-value metadata + */ + metadata?: { [key: string]: string }; + + /** + * Your internal reference identifier + */ + reference?: string | null; + + /** + * Current mailbox status + */ + status?: 'active' | 'paused'; + + /** + * When the mailbox was last updated + */ + updated_at?: string; + } +} + +export interface InboundEmailDeleteResponse { + msg?: string; + + status?: string; +} + +export interface InboundEmailCreateParams { + /** + * Webhook URL where we POST email notifications. Must be HTTPS in production (HTTP + * allowed for localhost during development). + */ + callback_url: string; + + /** + * Optional custom email prefix for user-friendly addresses. + * + * - Must be 3-32 characters + * - Alphanumeric + hyphens only + * - Must start and end with letter/number + * - Example: `john-portfolio@import.casparser.in` + * - If omitted, generates random ID like `ie_abc123xyz@import.casparser.in` + */ + alias?: string; + + /** + * Filter emails by CAS provider. If omitted, accepts all providers. + * + * - `cdsl` → eCAS@cdslstatement.com + * - `nsdl` → NSDL-CAS@nsdl.co.in + * - `cams` → donotreply@camsonline.com + * - `kfintech` → samfS@kfintech.com + */ + allowed_sources?: Array<'cdsl' | 'nsdl' | 'cams' | 'kfintech'>; + + /** + * Optional key-value pairs (max 10) to include in webhook payload. Useful for + * passing context like plan_type, campaign_id, etc. + */ + metadata?: { [key: string]: string }; + + /** + * Your internal identifier (e.g., user_id, account_id). Returned in webhook + * payload for correlation. + */ + reference?: string; +} + +export interface InboundEmailListParams { + /** + * Maximum number of inbound emails to return + */ + limit?: number; + + /** + * Pagination offset + */ + offset?: number; + + /** + * Filter by status + */ + status?: 'active' | 'paused' | 'all'; +} + +export declare namespace InboundEmail { + export { + type InboundEmailCreateResponse as InboundEmailCreateResponse, + type InboundEmailRetrieveResponse as InboundEmailRetrieveResponse, + type InboundEmailListResponse as InboundEmailListResponse, + type InboundEmailDeleteResponse as InboundEmailDeleteResponse, + type InboundEmailCreateParams as InboundEmailCreateParams, + type InboundEmailListParams as InboundEmailListParams, + }; +} diff --git a/src/resources/inbox.ts b/src/resources/inbox.ts index a10151f..693d7b9 100644 --- a/src/resources/inbox.ts +++ b/src/resources/inbox.ts @@ -204,6 +204,12 @@ export namespace InboxListCasFilesResponse { */ original_filename?: string; + /** + * Email address of the CAS authority (CDSL, NSDL, CAMS, or KFintech) who + * originally sent this statement + */ + sender_email?: string; + /** * File size in bytes */ diff --git a/src/resources/index.ts b/src/resources/index.ts index ec82ade..6ff779e 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -11,6 +11,15 @@ export { export { Cdsl, type CdslParsePdfParams } from './cdsl/cdsl'; export { ContractNote, type ContractNoteParseResponse, type ContractNoteParseParams } from './contract-note'; export { Credits, type CreditCheckResponse } from './credits'; +export { + InboundEmail, + type InboundEmailCreateResponse, + type InboundEmailRetrieveResponse, + type InboundEmailListResponse, + type InboundEmailDeleteResponse, + type InboundEmailCreateParams, + type InboundEmailListParams, +} from './inbound-email'; export { Inbox, type InboxCheckConnectionStatusResponse, diff --git a/src/resources/logs.ts b/src/resources/logs.ts index 0279193..9e235bc 100644 --- a/src/resources/logs.ts +++ b/src/resources/logs.ts @@ -11,6 +11,8 @@ export class Logs extends APIResource { * Returns a list of API calls with timestamps, features used, status codes, and * credits consumed. Useful for monitoring usage patterns and debugging. * + * **Legacy path:** `/logs` (still supported) + * * @example * ```ts * const log = await client.logs.create(); @@ -20,7 +22,7 @@ export class Logs extends APIResource { body: LogCreateParams | null | undefined = {}, options?: RequestOptions, ): APIPromise { - return this._client.post('/logs', { body, ...options }); + return this._client.post('/v1/usage', { body, ...options }); } /** @@ -29,6 +31,8 @@ export class Logs extends APIResource { * Useful for understanding which API features are being used most and tracking * usage trends. * + * **Legacy path:** `/logs/summary` (still supported) + * * @example * ```ts * const response = await client.logs.getSummary(); @@ -38,7 +42,7 @@ export class Logs extends APIResource { body: LogGetSummaryParams | null | undefined = {}, options?: RequestOptions, ): APIPromise { - return this._client.post('/logs/summary', { body, ...options }); + return this._client.post('/v1/usage/summary', { body, ...options }); } } diff --git a/src/resources/verify-token.ts b/src/resources/verify-token.ts index 7e0f3c7..46dfd64 100644 --- a/src/resources/verify-token.ts +++ b/src/resources/verify-token.ts @@ -10,7 +10,7 @@ export class VerifyToken extends APIResource { * issues. */ verify(options?: RequestOptions): APIPromise { - return this._client.post('/v1/verify-token', options); + return this._client.post('/v1/token/verify', options); } } diff --git a/src/version.ts b/src/version.ts index c742ace..29d3ce7 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '1.7.2'; // x-release-please-version +export const VERSION = '1.8.0'; // x-release-please-version diff --git a/tests/api-resources/inbound-email.test.ts b/tests/api-resources/inbound-email.test.ts new file mode 100644 index 0000000..6a69ced --- /dev/null +++ b/tests/api-resources/inbound-email.test.ts @@ -0,0 +1,86 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import CasParser from 'cas-parser-node'; + +const client = new CasParser({ + apiKey: 'My API Key', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource inboundEmail', () => { + // Mock server tests are disabled + test.skip('create: only required params', async () => { + const responsePromise = client.inboundEmail.create({ + callback_url: 'https://api.yourapp.com/webhooks/cas-email', + }); + 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); + }); + + // Mock server tests are disabled + test.skip('create: required and optional params', async () => { + const response = await client.inboundEmail.create({ + callback_url: 'https://api.yourapp.com/webhooks/cas-email', + alias: 'john-portfolio', + allowed_sources: ['cdsl', 'nsdl'], + metadata: { plan: 'premium', source: 'onboarding' }, + reference: 'user_12345', + }); + }); + + // Mock server tests are disabled + test.skip('retrieve', async () => { + const responsePromise = client.inboundEmail.retrieve('ie_a1b2c3d4e5f6'); + 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); + }); + + // Mock server tests are disabled + test.skip('list', async () => { + const responsePromise = client.inboundEmail.list(); + 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); + }); + + // Mock server tests are disabled + test.skip('list: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect( + client.inboundEmail.list( + { + limit: 1, + offset: 0, + status: 'active', + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(CasParser.NotFoundError); + }); + + // Mock server tests are disabled + test.skip('delete', async () => { + const responsePromise = client.inboundEmail.delete('inbound_email_id'); + 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); + }); +});