@pdfvector/instance-client 0.0.19 → 0.0.21
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.
- package/.tsc/lib/index.d.ts +5 -2
- package/.tsc/lib/index.js +5 -1
- package/.tsc/lib/internal.d.ts +5 -0
- package/.tsc/lib/internal.js +4 -0
- package/CHANGELOG.md +13 -0
- package/package.json +2 -2
package/.tsc/lib/index.d.ts
CHANGED
|
@@ -51,6 +51,9 @@ export declare class PDFVectorError extends Error {
|
|
|
51
51
|
*/
|
|
52
52
|
static is(error: unknown): error is PDFVectorError;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
export
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare function _buildClient(options?: CreateClientOptions): Client;
|
|
56
|
+
export declare function createClient(options?: CreateClientOptions): PublicClient;
|
|
57
|
+
type Client = ContractRouterClient<typeof contract, ClientContext>;
|
|
58
|
+
export type PublicClient = Omit<ContractRouterClient<typeof contract, ClientContext>, "admin" | "free">;
|
|
56
59
|
export type { ContractInputs, ContractOutputs, PDFVectorModel, } from "@pdfvector/instance-contract";
|
package/.tsc/lib/index.js
CHANGED
|
@@ -42,7 +42,8 @@ export class PDFVectorError extends Error {
|
|
|
42
42
|
return error instanceof PDFVectorError;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
/** @internal */
|
|
46
|
+
export function _buildClient(options) {
|
|
46
47
|
const domain = options?.domain ?? DEFAULT_DOMAIN;
|
|
47
48
|
const isLocal = domain.startsWith("localhost") || domain.startsWith("127.0.0.1");
|
|
48
49
|
const baseUrl = `${isLocal ? "http" : "https"}://${domain}`;
|
|
@@ -77,3 +78,6 @@ export function createClient(options) {
|
|
|
77
78
|
});
|
|
78
79
|
return createORPCClient(link);
|
|
79
80
|
}
|
|
81
|
+
export function createClient(options) {
|
|
82
|
+
return _buildClient(options);
|
|
83
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ContractRouterClient } from "@orpc/contract";
|
|
2
|
+
import type { contract } from "@pdfvector/instance-contract";
|
|
3
|
+
import { type ClientContext, type CreateClientOptions } from ".";
|
|
4
|
+
export type Client = ContractRouterClient<typeof contract, ClientContext>;
|
|
5
|
+
export declare function createInternalClient(options?: CreateClientOptions): Client;
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @pdfvector/instance-client
|
|
2
2
|
|
|
3
|
+
## 0.0.21
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [[`41110b1`](https://github.com/phuctm97/pdfvector/commit/41110b1a1c078183c1014fbf45828c3da40d7971)]:
|
|
7
|
+
- @pdfvector/instance-contract@0.0.23
|
|
8
|
+
|
|
9
|
+
## 0.0.20
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- [#129](https://github.com/phuctm97/pdfvector/pull/129) [`111c98f`](https://github.com/phuctm97/pdfvector/commit/111c98f003f1ffb29c0515b08ad3567505396d86) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Add public/internal SDK client split, hide free API from docs, and update landing page code examples
|
|
15
|
+
|
|
3
16
|
## 0.0.19
|
|
4
17
|
### Patch Changes
|
|
5
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdfvector/instance-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Official TypeScript/JavaScript SDK for PDFVector API - Parse PDF/Word/Image/Excel documents to clean, structured markdown format and search academic publications across multiple databases",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@orpc/client": "^1.13.13",
|
|
37
37
|
"@orpc/contract": "^1.13.13",
|
|
38
|
-
"@pdfvector/instance-contract": "^0.0.
|
|
38
|
+
"@pdfvector/instance-contract": "^0.0.22"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
".tsc",
|