@pdfvector/instance-client 0.0.4
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 +8 -0
- package/.tsc/lib/index.js +11 -0
- package/CHANGELOG.md +42 -0
- package/package.json +15 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ContractRouterClient } from "@orpc/contract";
|
|
2
|
+
import type { contract } from "@pdfvector/instance-contract";
|
|
3
|
+
export interface CreateClientOptions {
|
|
4
|
+
url: string;
|
|
5
|
+
secret: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createClient(options: CreateClientOptions): Client;
|
|
8
|
+
export type Client = ContractRouterClient<typeof contract>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createORPCClient } from "@orpc/client";
|
|
2
|
+
import { RPCLink } from "@orpc/client/fetch";
|
|
3
|
+
export function createClient(options) {
|
|
4
|
+
const link = new RPCLink({
|
|
5
|
+
url: `${options.url}/rpc`,
|
|
6
|
+
headers: () => ({
|
|
7
|
+
authorization: `Bearer ${options.secret}`,
|
|
8
|
+
}),
|
|
9
|
+
});
|
|
10
|
+
return createORPCClient(link);
|
|
11
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @pdfvector/instance-client
|
|
2
|
+
|
|
3
|
+
## 0.0.4
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#54](https://github.com/phuctm97/pdfvector/pull/54) [`6c00753`](https://github.com/phuctm97/pdfvector/commit/6c0075399cd90d42c38017bc5dbcd8df142fefbd) Thanks [@phuctm97](https://github.com/phuctm97)! - Re-release all packages
|
|
9
|
+
|
|
10
|
+
- Updated dependencies [[`6c00753`](https://github.com/phuctm97/pdfvector/commit/6c0075399cd90d42c38017bc5dbcd8df142fefbd)]:
|
|
11
|
+
- @pdfvector/instance-contract@0.0.7
|
|
12
|
+
|
|
13
|
+
## 0.0.3
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
- [#52](https://github.com/phuctm97/pdfvector/pull/52) [`fb83b42`](https://github.com/phuctm97/pdfvector/commit/fb83b42ca2ed186d3e5822677b945db100ec7877) Thanks [@phuctm97](https://github.com/phuctm97)! - Transpile with Bun instead of Node.js
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
- [#51](https://github.com/phuctm97/pdfvector/pull/51) [`02e4d4f`](https://github.com/phuctm97/pdfvector/commit/02e4d4f8b08cd2dc86f588c1520bbb95a0e1c5ed) Thanks [@phuctm97](https://github.com/phuctm97)! - Rename all instance stuff to instance-contract, instance-server, instance-client, etc.
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [[`fb83b42`](https://github.com/phuctm97/pdfvector/commit/fb83b42ca2ed186d3e5822677b945db100ec7877), [`02e4d4f`](https://github.com/phuctm97/pdfvector/commit/02e4d4f8b08cd2dc86f588c1520bbb95a0e1c5ed)]:
|
|
25
|
+
- @pdfvector/instance-contract@0.0.6
|
|
26
|
+
|
|
27
|
+
## 0.0.2
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
- [#50](https://github.com/phuctm97/pdfvector/pull/50) [`89bfcc2`](https://github.com/phuctm97/pdfvector/commit/89bfcc27cfd37fc0cbcded9381db748d31514456) Thanks [@phuctm97](https://github.com/phuctm97)! - Release client SDK
|
|
33
|
+
|
|
34
|
+
## 0.0.1
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
- [#49](https://github.com/phuctm97/pdfvector/pull/49) [`ffcac7c`](https://github.com/phuctm97/pdfvector/commit/ffcac7c7a8e67b88e37397b45e0b824233927287) Thanks [@phuctm97](https://github.com/phuctm97)! - Add client SDK
|
|
40
|
+
|
|
41
|
+
- Updated dependencies [[`50de78b`](https://github.com/phuctm97/pdfvector/commit/50de78bf39eabc2edd8d3f1288d1d7a44e5d6a75)]:
|
|
42
|
+
- @pdfvector/instance-contract@0.0.5
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pdfvector/instance-client",
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": ".tsc/lib/index.js",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@orpc/client": "^1.13.5",
|
|
8
|
+
"@orpc/contract": "^1.13.5",
|
|
9
|
+
"@pdfvector/instance-contract": "^0.0.5"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
".tsc",
|
|
13
|
+
"CHANGELOG.md"
|
|
14
|
+
]
|
|
15
|
+
}
|