@pdfvector/instance-contract 0.0.41 → 0.0.42

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.
@@ -32,6 +32,15 @@ export declare const getUsageRecords: import("@orpc/contract").ContractProcedure
32
32
  actualModel: z.ZodNullable<z.ZodString>;
33
33
  apiKey: z.ZodNullable<z.ZodString>;
34
34
  workspaceId: z.ZodNullable<z.ZodNumber>;
35
+ source: z.ZodDefault<z.ZodEnum<{
36
+ make: "make";
37
+ zapier: "zapier";
38
+ n8n: "n8n";
39
+ sdk: "sdk";
40
+ playground: "playground";
41
+ api: "api";
42
+ unknown: "unknown";
43
+ }>>;
35
44
  createdAt: z.ZodNumber;
36
45
  }, z.core.$strip>>;
37
46
  hasMore: z.ZodBoolean;
@@ -1,5 +1,5 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { errorStages, usageStatuses } from "@pdfvector/util";
2
+ import { apiSources, errorStages, usageStatuses } from "@pdfvector/util";
3
3
  import { z } from "zod";
4
4
  const usageRecordSchema = z.object({
5
5
  id: z.number(),
@@ -21,6 +21,7 @@ const usageRecordSchema = z.object({
21
21
  actualModel: z.string().nullable(),
22
22
  apiKey: z.string().nullable(),
23
23
  workspaceId: z.number().nullable(),
24
+ source: z.enum(apiSources).default("unknown"),
24
25
  createdAt: z.number(),
25
26
  });
26
27
  export const getUsageRecords = oc
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @pdfvector/instance-contract
2
2
 
3
+ ## 0.0.42
4
+ ### Patch Changes
5
+
6
+
7
+
8
+ - [#225](https://github.com/phuctm97/pdfvector/pull/225) [`5d72a6c`](https://github.com/phuctm97/pdfvector/commit/5d72a6cb2dc5535b8c624f25709f8ae7fd9cc15b) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Track API caller source per usage record
9
+
10
+ - Updated dependencies [[`5d72a6c`](https://github.com/phuctm97/pdfvector/commit/5d72a6cb2dc5535b8c624f25709f8ae7fd9cc15b)]:
11
+ - @pdfvector/util@0.0.21
12
+
3
13
  ## 0.0.41
4
14
  ### Patch Changes
5
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfvector/instance-contract",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "type": "module",
5
5
  "description": "API contract definitions for PDF Vector instance server",
6
6
  "license": "MIT",
@@ -22,10 +22,10 @@
22
22
  "dependencies": {
23
23
  "@orpc/client": "^1.14.0",
24
24
  "@orpc/contract": "^1.14.0",
25
- "@pdfvector/util": "0.0.20"
25
+ "@pdfvector/util": "0.0.21"
26
26
  },
27
27
  "peerDependencies": {
28
- "zod": "^4.3.6"
28
+ "zod": "^4.4.1"
29
29
  },
30
30
  "files": [
31
31
  ".tsc",