Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.0.0"
".": "1.1.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-33841d833a48438cd79a13b2e70eeb61551b67e954ed788209ece1b0f5886e15.yml
openapi_spec_hash: 6a784691ea7c8cf7c2987c93f6a2ab25
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-b7fdba3d3f97c7debc22c7ca30b828bce81bcd64648df8c94029b27a3321ebb9.yml
openapi_spec_hash: 03f1315f1d32ada42445ca920f047dff
config_hash: c35d87a285c3e03721211e5585e57e54
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.1.0 (2025-08-18)

Full Changelog: [v1.0.0...v1.1.0](https://github.com/CASParser/cas-parser-node/compare/v1.0.0...v1.1.0)

### Features

* **api:** api update ([6108aea](https://github.com/CASParser/cas-parser-node/commit/6108aea7cb4622bb475866a49784a9f519bb487e))

## 1.0.0 (2025-08-18)

Full Changelog: [v0.0.1-alpha.0...v1.0.0](https://github.com/CASParser/cas-parser-node/compare/v0.0.1-alpha.0...v1.0.0)
Expand Down
29 changes: 0 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,35 +50,6 @@ const unifiedResponse: CasParser.UnifiedResponse = await client.casParser.camsKf

Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.

## File uploads

Request parameters that correspond to file uploads can be passed in many different forms:

- `File` (or an object with the same structure)
- a `fetch` `Response` (or an object with the same structure)
- an `fs.ReadStream`
- the return value of our `toFile` helper

```ts
import fs from 'fs';
import CasParser, { toFile } from 'cas-parser';

const client = new CasParser();

// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
await client.casParser.camsKfintech({ pdf_file: fs.createReadStream('/path/to/file') });

// Or if you have the web `File` API you can pass a `File` instance:
await client.casParser.camsKfintech({ pdf_file: new File(['my bytes'], 'file') });

// You can also pass a `fetch` `Response`:
await client.casParser.camsKfintech({ pdf_file: await fetch('https://somesite/file') });

// Finally, if none of the above are convenient, you can use our `toFile` helper:
await client.casParser.camsKfintech({ pdf_file: await toFile(Buffer.from('my bytes'), 'file') });
await client.casParser.camsKfintech({ pdf_file: await toFile(new Uint8Array([0, 1, 2]), 'file') });
```

## Handling errors

When the library is unable to connect to the API,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cas-parser",
"version": "1.0.0",
"version": "1.1.0",
"description": "The official TypeScript library for the Cas Parser API",
"author": "Cas Parser <sameer@casparser.in>",
"types": "dist/index.d.ts",
Expand Down
9 changes: 4 additions & 5 deletions src/resources/cas-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { APIResource } from '../core/resource';
import { APIPromise } from '../core/api-promise';
import { type Uploadable } from '../core/uploads';
import { RequestOptions } from '../internal/request-options';
import { maybeMultipartFormRequestOptions } from '../internal/uploads';

Expand Down Expand Up @@ -683,7 +682,7 @@ export interface CasParserCamsKfintechParams {
/**
* Base64 encoded CAS PDF file
*/
pdf_file?: Uploadable;
pdf_file?: string;

/**
* URL to the CAS PDF file
Expand All @@ -700,7 +699,7 @@ export interface CasParserCdslParams {
/**
* Base64 encoded CAS PDF file
*/
pdf_file?: Uploadable;
pdf_file?: string;

/**
* URL to the CAS PDF file
Expand All @@ -717,7 +716,7 @@ export interface CasParserNsdlParams {
/**
* Base64 encoded CAS PDF file
*/
pdf_file?: Uploadable;
pdf_file?: string;

/**
* URL to the CAS PDF file
Expand All @@ -734,7 +733,7 @@ export interface CasParserSmartParseParams {
/**
* Base64 encoded CAS PDF file
*/
pdf_file?: Uploadable;
pdf_file?: string;

/**
* URL to the CAS PDF file
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '1.0.0'; // x-release-please-version
export const VERSION = '1.1.0'; // x-release-please-version