@pdfvector/util 0.4.0 → 0.5.1

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.
Files changed (32) hide show
  1. package/.tsc/lib/billing-hold-error-codes.d.ts +14 -0
  2. package/.tsc/lib/billing-hold-error-codes.d.ts.map +1 -0
  3. package/.tsc/lib/billing-hold-error-codes.js +11 -0
  4. package/.tsc/lib/contract/gateway/router/admin/billing-holds.d.ts +71 -0
  5. package/.tsc/lib/contract/gateway/router/admin/billing-holds.d.ts.map +1 -0
  6. package/.tsc/lib/contract/gateway/router/admin/billing-holds.js +58 -0
  7. package/.tsc/lib/contract/gateway/router/admin/billing.d.ts +21 -0
  8. package/.tsc/lib/contract/gateway/router/admin/billing.d.ts.map +1 -1
  9. package/.tsc/lib/contract/gateway/router/admin/billing.js +20 -0
  10. package/.tsc/lib/contract/gateway/router/admin/usage/free.d.ts +59 -1
  11. package/.tsc/lib/contract/gateway/router/admin/usage/free.d.ts.map +1 -1
  12. package/.tsc/lib/contract/gateway/router/admin/usage/free.js +35 -22
  13. package/.tsc/lib/contract/gateway/router/admin/usage/overview.d.ts +24 -0
  14. package/.tsc/lib/contract/gateway/router/admin/usage/overview.d.ts.map +1 -1
  15. package/.tsc/lib/contract/gateway/router/admin/usage/overview.js +15 -8
  16. package/.tsc/lib/contract/gateway/router/admin/usage/records.d.ts +2 -0
  17. package/.tsc/lib/contract/gateway/router/admin/usage/records.d.ts.map +1 -1
  18. package/.tsc/lib/contract/gateway/router/admin/usage/records.js +2 -0
  19. package/.tsc/lib/contract/gateway/router/admin.d.ts +1 -0
  20. package/.tsc/lib/contract/gateway/router/admin.d.ts.map +1 -1
  21. package/.tsc/lib/contract/gateway/router/admin.js +1 -0
  22. package/.tsc/lib/contract/gateway/router/billing.d.ts +54 -0
  23. package/.tsc/lib/contract/gateway/router/billing.d.ts.map +1 -1
  24. package/.tsc/lib/contract/gateway/router/billing.js +50 -0
  25. package/.tsc/lib/contract/gateway/router/instance/instances.d.ts +8 -0
  26. package/.tsc/lib/contract/gateway/router/instance/instances.d.ts.map +1 -1
  27. package/.tsc/lib/contract/gateway/router/instance/instances.js +2 -0
  28. package/.tsc/lib/index.d.ts +1 -0
  29. package/.tsc/lib/index.d.ts.map +1 -1
  30. package/.tsc/lib/index.js +1 -0
  31. package/CHANGELOG.md +12 -0
  32. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ export declare const billingHoldErrorCodes: readonly ["BILLING_UNPAID_INVOICE", "BILLING_DISPUTE", "BILLING_PAYMENT_METHOD_REQUIRED", "BILLING_LINKED_UNPAID_BALANCE", "BILLING_ACCOUNT_HOLD"];
2
+ export type BillingHoldErrorCode = (typeof billingHoldErrorCodes)[number];
3
+ export declare const creditsExhaustedErrorCode = "CREDITS_EXHAUSTED";
4
+ export type BillingHoldErrorData = {
5
+ code: BillingHoldErrorCode;
6
+ reason: string;
7
+ invoiceCount: number;
8
+ amountDue: number;
9
+ currency: string;
10
+ billingUrl: string;
11
+ payUrl: string | null;
12
+ };
13
+ export declare function isBillingHoldErrorCode(value: unknown): value is BillingHoldErrorCode;
14
+ //# sourceMappingURL=billing-hold-error-codes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-hold-error-codes.d.ts","sourceRoot":"","sources":["../../lib/billing-hold-error-codes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,YACjC,wBAAwB,EACxB,iBAAiB,EACjB,iCAAiC,EACjC,+BAA+B,EAC/B,sBAAsB,CACb,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,OAAO,GACZ,KAAK,IAAI,oBAAoB,CAE/B"}
@@ -0,0 +1,11 @@
1
+ export const billingHoldErrorCodes = [
2
+ "BILLING_UNPAID_INVOICE",
3
+ "BILLING_DISPUTE",
4
+ "BILLING_PAYMENT_METHOD_REQUIRED",
5
+ "BILLING_LINKED_UNPAID_BALANCE",
6
+ "BILLING_ACCOUNT_HOLD",
7
+ ];
8
+ export const creditsExhaustedErrorCode = "CREDITS_EXHAUSTED";
9
+ export function isBillingHoldErrorCode(value) {
10
+ return billingHoldErrorCodes.some((code) => code === value);
11
+ }
@@ -0,0 +1,71 @@
1
+ import * as z from "zod";
2
+ export declare const listBillingHolds: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3
+ includeResolved: z.ZodDefault<z.ZodBoolean>;
4
+ }, z.core.$strip>, z.ZodObject<{
5
+ mode: z.ZodEnum<{
6
+ enforce: "enforce";
7
+ off: "off";
8
+ shadow: "shadow";
9
+ }>;
10
+ holds: z.ZodArray<z.ZodObject<{
11
+ workspaceId: z.ZodNumber;
12
+ workspaceName: z.ZodString;
13
+ ownerEmail: z.ZodNullable<z.ZodString>;
14
+ stripeDashboardUrl: z.ZodNullable<z.ZodString>;
15
+ status: z.ZodEnum<{
16
+ active: "active";
17
+ exempt: "exempt";
18
+ resolved: "resolved";
19
+ }>;
20
+ reason: z.ZodString;
21
+ code: z.ZodString;
22
+ message: z.ZodString;
23
+ invoiceCount: z.ZodNumber;
24
+ amountDue: z.ZodNumber;
25
+ currency: z.ZodString;
26
+ invoices: z.ZodArray<z.ZodObject<{
27
+ id: z.ZodString;
28
+ number: z.ZodNullable<z.ZodString>;
29
+ status: z.ZodString;
30
+ amountRemaining: z.ZodNumber;
31
+ currency: z.ZodString;
32
+ created: z.ZodDate;
33
+ dueDate: z.ZodNullable<z.ZodDate>;
34
+ hostedInvoiceUrl: z.ZodNullable<z.ZodString>;
35
+ }, z.core.$strip>>;
36
+ dispute: z.ZodNullable<z.ZodObject<{
37
+ id: z.ZodString;
38
+ status: z.ZodString;
39
+ amount: z.ZodNumber;
40
+ currency: z.ZodString;
41
+ reason: z.ZodString;
42
+ created: z.ZodDate;
43
+ }, z.core.$strip>>;
44
+ paymentMethodRequired: z.ZodBoolean;
45
+ linkedWorkspaceId: z.ZodNullable<z.ZodNumber>;
46
+ linkedWorkspaceName: z.ZodNullable<z.ZodString>;
47
+ matchedBy: z.ZodNullable<z.ZodString>;
48
+ manual: z.ZodBoolean;
49
+ since: z.ZodDate;
50
+ resolvedAt: z.ZodNullable<z.ZodDate>;
51
+ exemptUntil: z.ZodNullable<z.ZodDate>;
52
+ emailsSent: z.ZodNumber;
53
+ lastEmailAt: z.ZodNullable<z.ZodDate>;
54
+ }, z.core.$strip>>;
55
+ registry: z.ZodArray<z.ZodObject<{
56
+ kind: z.ZodString;
57
+ count: z.ZodNumber;
58
+ }, z.core.$strip>>;
59
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
60
+ export declare const overrideBillingHold: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
61
+ workspaceId: z.ZodNumber;
62
+ action: z.ZodEnum<{
63
+ clear: "clear";
64
+ hold: "hold";
65
+ unexempt: "unexempt";
66
+ }>;
67
+ days: z.ZodDefault<z.ZodNumber>;
68
+ }, z.core.$strip>, z.ZodObject<{
69
+ success: z.ZodBoolean;
70
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
71
+ //# sourceMappingURL=billing-holds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-holds.d.ts","sourceRoot":"","sources":["../../../../../../lib/contract/gateway/router/admin/billing-holds.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAsD3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;8DAQY,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { oc } from "@orpc/contract";
2
+ import * as z from "zod";
3
+ export const listBillingHolds = oc
4
+ .input(z.object({ includeResolved: z.boolean().default(false) }))
5
+ .output(z.object({
6
+ mode: z.enum(["off", "shadow", "enforce"]),
7
+ holds: z.array(z.object({
8
+ workspaceId: z.number(),
9
+ workspaceName: z.string(),
10
+ ownerEmail: z.string().nullable(),
11
+ stripeDashboardUrl: z.string().nullable(),
12
+ status: z.enum(["active", "exempt", "resolved"]),
13
+ reason: z.string(),
14
+ code: z.string(),
15
+ message: z.string(),
16
+ invoiceCount: z.number(),
17
+ amountDue: z.number(),
18
+ currency: z.string(),
19
+ invoices: z.array(z.object({
20
+ id: z.string(),
21
+ number: z.string().nullable(),
22
+ status: z.string(),
23
+ amountRemaining: z.number(),
24
+ currency: z.string(),
25
+ created: z.date(),
26
+ dueDate: z.date().nullable(),
27
+ hostedInvoiceUrl: z.string().nullable(),
28
+ })),
29
+ dispute: z
30
+ .object({
31
+ id: z.string(),
32
+ status: z.string(),
33
+ amount: z.number(),
34
+ currency: z.string(),
35
+ reason: z.string(),
36
+ created: z.date(),
37
+ })
38
+ .nullable(),
39
+ paymentMethodRequired: z.boolean(),
40
+ linkedWorkspaceId: z.number().nullable(),
41
+ linkedWorkspaceName: z.string().nullable(),
42
+ matchedBy: z.string().nullable(),
43
+ manual: z.boolean(),
44
+ since: z.date(),
45
+ resolvedAt: z.date().nullable(),
46
+ exemptUntil: z.date().nullable(),
47
+ emailsSent: z.number(),
48
+ lastEmailAt: z.date().nullable(),
49
+ })),
50
+ registry: z.array(z.object({ kind: z.string(), count: z.number() })),
51
+ }));
52
+ export const overrideBillingHold = oc
53
+ .input(z.object({
54
+ workspaceId: z.number().int().positive(),
55
+ action: z.enum(["hold", "clear", "unexempt"]),
56
+ days: z.number().int().min(1).max(3650).default(30),
57
+ }))
58
+ .output(z.object({ success: z.boolean() }));
@@ -4,19 +4,39 @@ export declare const listBilling: import("@orpc/contract").ContractProcedureBuil
4
4
  }, z.core.$strip>, z.ZodObject<{
5
5
  users: z.ZodArray<z.ZodObject<{
6
6
  stripeCustomerId: z.ZodString;
7
+ stripeDashboardUrl: z.ZodString;
8
+ workspaceId: z.ZodNumber;
9
+ userId: z.ZodNullable<z.ZodString>;
10
+ organizationId: z.ZodNullable<z.ZodString>;
7
11
  userName: z.ZodString;
8
12
  userEmail: z.ZodString;
9
13
  planKey: z.ZodString;
14
+ annual: z.ZodNullable<z.ZodBoolean>;
10
15
  usedCredits: z.ZodNumber;
11
16
  aggregatedCredits: z.ZodNumber;
12
17
  subscriptionStatus: z.ZodNullable<z.ZodString>;
13
18
  subscriptionId: z.ZodNullable<z.ZodString>;
14
19
  currentPeriodStart: z.ZodNullable<z.ZodDate>;
15
20
  currentPeriodEnd: z.ZodNullable<z.ZodDate>;
21
+ nextRenewalAt: z.ZodNullable<z.ZodDate>;
16
22
  cancelAtPeriodEnd: z.ZodBoolean;
23
+ currency: z.ZodString;
24
+ mrr: z.ZodNumber;
25
+ addOnCount: z.ZodNumber;
26
+ paymentMethod: z.ZodNullable<z.ZodObject<{
27
+ brand: z.ZodString;
28
+ last4: z.ZodString;
29
+ expMonth: z.ZodNumber;
30
+ expYear: z.ZodNumber;
31
+ expired: z.ZodBoolean;
32
+ }, z.core.$strip>>;
17
33
  openInvoiceCount: z.ZodNumber;
18
34
  uncollectibleInvoiceCount: z.ZodNumber;
19
35
  totalAmountDue: z.ZodNumber;
36
+ amountOwed: z.ZodArray<z.ZodObject<{
37
+ currency: z.ZodString;
38
+ amount: z.ZodNumber;
39
+ }, z.core.$strip>>;
20
40
  hasIssues: z.ZodBoolean;
21
41
  reasons: z.ZodArray<z.ZodString>;
22
42
  oldestIssueDate: z.ZodNullable<z.ZodDate>;
@@ -46,5 +66,6 @@ export declare const listBilling: import("@orpc/contract").ContractProcedureBuil
46
66
  }, z.core.$strip>>;
47
67
  }, z.core.$strip>>;
48
68
  cachedAt: z.ZodNullable<z.ZodDate>;
69
+ truncated: z.ZodBoolean;
49
70
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
50
71
  //# sourceMappingURL=billing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../../../lib/contract/gateway/router/admin/billing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA0BzB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DA6BtB,CAAC"}
1
+ {"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../../../lib/contract/gateway/router/admin/billing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA0BzB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAmDtB,CAAC"}
@@ -28,19 +28,38 @@ export const listBilling = oc
28
28
  .output(z.object({
29
29
  users: z.array(z.object({
30
30
  stripeCustomerId: z.string(),
31
+ stripeDashboardUrl: z.string(),
32
+ workspaceId: z.number(),
33
+ userId: z.string().nullable(),
34
+ organizationId: z.string().nullable(),
31
35
  userName: z.string(),
32
36
  userEmail: z.string(),
33
37
  planKey: z.string(),
38
+ annual: z.boolean().nullable(),
34
39
  usedCredits: z.number(),
35
40
  aggregatedCredits: z.number(),
36
41
  subscriptionStatus: z.string().nullable(),
37
42
  subscriptionId: z.string().nullable(),
38
43
  currentPeriodStart: z.date().nullable(),
39
44
  currentPeriodEnd: z.date().nullable(),
45
+ nextRenewalAt: z.date().nullable(),
40
46
  cancelAtPeriodEnd: z.boolean(),
47
+ currency: z.string(),
48
+ mrr: z.number(),
49
+ addOnCount: z.number(),
50
+ paymentMethod: z
51
+ .object({
52
+ brand: z.string(),
53
+ last4: z.string(),
54
+ expMonth: z.number(),
55
+ expYear: z.number(),
56
+ expired: z.boolean(),
57
+ })
58
+ .nullable(),
41
59
  openInvoiceCount: z.number(),
42
60
  uncollectibleInvoiceCount: z.number(),
43
61
  totalAmountDue: z.number(),
62
+ amountOwed: z.array(z.object({ currency: z.string(), amount: z.number() })),
44
63
  hasIssues: z.boolean(),
45
64
  reasons: z.array(z.string()),
46
65
  oldestIssueDate: z.date().nullable(),
@@ -48,4 +67,5 @@ export const listBilling = oc
48
67
  invoices: z.array(invoiceSchema),
49
68
  })),
50
69
  cachedAt: z.date().nullable(),
70
+ truncated: z.boolean(),
51
71
  }));
@@ -2,7 +2,21 @@ import * as z from "zod";
2
2
  export declare const syncFreeUsage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
3
3
  success: z.ZodBoolean;
4
4
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
5
- export declare const getFreeUsageOverview: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
5
+ export declare const getFreeUsageOverview: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
6
+ period: z.ZodDefault<z.ZodEnum<{
7
+ "30d": "30d";
8
+ "7d": "7d";
9
+ "90d": "90d";
10
+ all: "all";
11
+ }>>;
12
+ }, z.core.$strip>, z.ZodObject<{
13
+ period: z.ZodEnum<{
14
+ "30d": "30d";
15
+ "7d": "7d";
16
+ "90d": "90d";
17
+ all: "all";
18
+ }>;
19
+ from: z.ZodNullable<z.ZodDate>;
6
20
  totalRequests: z.ZodNumber;
7
21
  successCount: z.ZodNumber;
8
22
  userErrorCount: z.ZodNumber;
@@ -12,6 +26,10 @@ export declare const getFreeUsageOverview: import("@orpc/contract").ContractProc
12
26
  uniqueIps: z.ZodNumber;
13
27
  avgPages: z.ZodNullable<z.ZodNumber>;
14
28
  totalFileSize: z.ZodNumber;
29
+ previous: z.ZodNullable<z.ZodObject<{
30
+ totalRequests: z.ZodNumber;
31
+ uniqueIps: z.ZodNumber;
32
+ }, z.core.$strip>>;
15
33
  daily: z.ZodArray<z.ZodObject<{
16
34
  date: z.ZodString;
17
35
  counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
@@ -20,10 +38,14 @@ export declare const getFreeUsageOverview: import("@orpc/contract").ContractProc
20
38
  byOperation: z.ZodArray<z.ZodObject<{
21
39
  label: z.ZodString;
22
40
  count: z.ZodNumber;
41
+ dailyLimit: z.ZodNullable<z.ZodNumber>;
42
+ cappedIpDays: z.ZodNumber;
23
43
  }, z.core.$strip>>;
24
44
  byIp: z.ZodArray<z.ZodObject<{
25
45
  label: z.ZodString;
26
46
  count: z.ZodNumber;
47
+ lastSeenAt: z.ZodDate;
48
+ cappedDays: z.ZodNumber;
27
49
  }, z.core.$strip>>;
28
50
  byModel: z.ZodArray<z.ZodObject<{
29
51
  label: z.ZodString;
@@ -33,13 +55,31 @@ export declare const getFreeUsageOverview: import("@orpc/contract").ContractProc
33
55
  label: z.ZodString;
34
56
  count: z.ZodNumber;
35
57
  }, z.core.$strip>>;
58
+ bySource: z.ZodArray<z.ZodObject<{
59
+ label: z.ZodString;
60
+ count: z.ZodNumber;
61
+ }, z.core.$strip>>;
62
+ cappedIpDays: z.ZodNumber;
63
+ cappedRecent: z.ZodArray<z.ZodObject<{
64
+ ip: z.ZodString;
65
+ operation: z.ZodString;
66
+ date: z.ZodString;
67
+ count: z.ZodNumber;
68
+ limit: z.ZodNumber;
69
+ }, z.core.$strip>>;
36
70
  topSystemErrors: z.ZodArray<z.ZodObject<{
37
71
  message: z.ZodString;
72
+ code: z.ZodNullable<z.ZodString>;
38
73
  count: z.ZodNumber;
74
+ operations: z.ZodArray<z.ZodString>;
75
+ lastSeenAt: z.ZodDate;
39
76
  }, z.core.$strip>>;
40
77
  topUserErrors: z.ZodArray<z.ZodObject<{
41
78
  message: z.ZodString;
79
+ code: z.ZodNullable<z.ZodString>;
42
80
  count: z.ZodNumber;
81
+ operations: z.ZodArray<z.ZodString>;
82
+ lastSeenAt: z.ZodDate;
43
83
  }, z.core.$strip>>;
44
84
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
45
85
  export declare const listFreeUsage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
@@ -61,6 +101,19 @@ export declare const listFreeUsage: import("@orpc/contract").ContractProcedureBu
61
101
  asc: "asc";
62
102
  desc: "desc";
63
103
  }>>;
104
+ operation: z.ZodOptional<z.ZodString>;
105
+ source: z.ZodOptional<z.ZodEnum<{
106
+ api: "api";
107
+ internal: "internal";
108
+ make: "make";
109
+ mcp: "mcp";
110
+ n8n: "n8n";
111
+ playground: "playground";
112
+ sdk: "sdk";
113
+ unknown: "unknown";
114
+ zapier: "zapier";
115
+ }>>;
116
+ ip: z.ZodOptional<z.ZodString>;
64
117
  }, z.core.$strip>, z.ZodObject<{
65
118
  items: z.ZodArray<z.ZodObject<{
66
119
  id: z.ZodNumber;
@@ -91,6 +144,11 @@ export declare const listFreeUsage: import("@orpc/contract").ContractProcedureBu
91
144
  system_error: "system_error";
92
145
  user_error: "user_error";
93
146
  }>;
147
+ recordedStatus: z.ZodEnum<{
148
+ success: "success";
149
+ system_error: "system_error";
150
+ user_error: "user_error";
151
+ }>;
94
152
  errorStage: z.ZodNullable<z.ZodEnum<{
95
153
  auth: "auth";
96
154
  preprocessing: "preprocessing";
@@ -1 +1 @@
1
- {"version":3,"file":"free.d.ts","sourceRoot":"","sources":["../../../../../../../lib/contract/gateway/router/admin/usage/free.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,aAAa;;8DAEkB,CAAC;AAE7C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAuDhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DA6CxB,CAAC"}
1
+ {"version":3,"file":"free.d.ts","sourceRoot":"","sources":["../../../../../../../lib/contract/gateway/router/admin/usage/free.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,aAAa;;8DAEkB,CAAC;AAW7C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAoD/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAiDxB,CAAC"}
@@ -4,7 +4,19 @@ import * as z from "zod";
4
4
  export const syncFreeUsage = oc
5
5
  .input(z.object({}))
6
6
  .output(z.object({ success: z.boolean() }));
7
- export const getFreeUsageOverview = oc.input(z.object({})).output(z.object({
7
+ const labelCount = z.object({ label: z.string(), count: z.number() });
8
+ const topError = z.object({
9
+ message: z.string(),
10
+ code: z.string().nullable(),
11
+ count: z.number(),
12
+ operations: z.array(z.string()),
13
+ lastSeenAt: z.date(),
14
+ });
15
+ export const getFreeUsageOverview = oc
16
+ .input(z.object({ period: z.enum(["7d", "30d", "90d", "all"]).default("30d") }))
17
+ .output(z.object({
18
+ period: z.enum(["7d", "30d", "90d", "all"]),
19
+ from: z.date().nullable(),
8
20
  totalRequests: z.number(),
9
21
  successCount: z.number(),
10
22
  userErrorCount: z.number(),
@@ -14,35 +26,32 @@ export const getFreeUsageOverview = oc.input(z.object({})).output(z.object({
14
26
  uniqueIps: z.number(),
15
27
  avgPages: z.number().nullable(),
16
28
  totalFileSize: z.number(),
29
+ previous: z
30
+ .object({ totalRequests: z.number(), uniqueIps: z.number() })
31
+ .nullable(),
17
32
  daily: z.array(z.object({
18
33
  date: z.string(),
19
34
  counts: z.record(z.string(), z.number()),
20
35
  })),
21
36
  dailyOperations: z.array(z.string()),
22
- byOperation: z.array(z.object({
23
- label: z.string(),
24
- count: z.number(),
25
- })),
26
- byIp: z.array(z.object({
27
- label: z.string(),
28
- count: z.number(),
37
+ byOperation: z.array(labelCount.extend({
38
+ dailyLimit: z.number().nullable(),
39
+ cappedIpDays: z.number(),
29
40
  })),
30
- byModel: z.array(z.object({
31
- label: z.string(),
32
- count: z.number(),
33
- })),
34
- byDocumentType: z.array(z.object({
35
- label: z.string(),
36
- count: z.number(),
37
- })),
38
- topSystemErrors: z.array(z.object({
39
- message: z.string(),
40
- count: z.number(),
41
- })),
42
- topUserErrors: z.array(z.object({
43
- message: z.string(),
41
+ byIp: z.array(labelCount.extend({ lastSeenAt: z.date(), cappedDays: z.number() })),
42
+ byModel: z.array(labelCount),
43
+ byDocumentType: z.array(labelCount),
44
+ bySource: z.array(labelCount),
45
+ cappedIpDays: z.number(),
46
+ cappedRecent: z.array(z.object({
47
+ ip: z.string(),
48
+ operation: z.string(),
49
+ date: z.string(),
44
50
  count: z.number(),
51
+ limit: z.number(),
45
52
  })),
53
+ topSystemErrors: z.array(topError),
54
+ topUserErrors: z.array(topError),
46
55
  }));
47
56
  export const listFreeUsage = oc
48
57
  .input(z.object({
@@ -55,6 +64,9 @@ export const listFreeUsage = oc
55
64
  .enum(["createdAt", "operation", "ip", "duration"])
56
65
  .default("createdAt"),
57
66
  sortOrder: z.enum(["asc", "desc"]).default("desc"),
67
+ operation: z.string().max(64).optional(),
68
+ source: z.enum(apiSources).optional(),
69
+ ip: z.string().max(64).optional(),
58
70
  }))
59
71
  .output(z.object({
60
72
  items: z.array(z.object({
@@ -72,6 +84,7 @@ export const listFreeUsage = oc
72
84
  pageCount: z.number().nullable(),
73
85
  error: z.string().nullable(),
74
86
  status: z.enum(["success", "user_error", "system_error"]),
87
+ recordedStatus: z.enum(["success", "user_error", "system_error"]),
75
88
  errorStage: z
76
89
  .enum(["auth", "validation", "preprocessing", "processing"])
77
90
  .nullable(),
@@ -90,11 +90,35 @@ export declare const getUsageOverview: import("@orpc/contract").ContractProcedur
90
90
  }, z.core.$strip>>;
91
91
  topSystemErrors: z.ZodArray<z.ZodObject<{
92
92
  message: z.ZodString;
93
+ code: z.ZodNullable<z.ZodString>;
93
94
  count: z.ZodNumber;
95
+ share: z.ZodNumber;
96
+ operations: z.ZodArray<z.ZodObject<{
97
+ operation: z.ZodString;
98
+ count: z.ZodNumber;
99
+ }, z.core.$strip>>;
100
+ workspaces: z.ZodNumber;
101
+ topModel: z.ZodNullable<z.ZodString>;
102
+ topSource: z.ZodNullable<z.ZodString>;
103
+ firstSeen: z.ZodDate;
104
+ lastSeen: z.ZodDate;
105
+ daily: z.ZodArray<z.ZodNumber>;
94
106
  }, z.core.$strip>>;
95
107
  topUserErrors: z.ZodArray<z.ZodObject<{
96
108
  message: z.ZodString;
109
+ code: z.ZodNullable<z.ZodString>;
97
110
  count: z.ZodNumber;
111
+ share: z.ZodNumber;
112
+ operations: z.ZodArray<z.ZodObject<{
113
+ operation: z.ZodString;
114
+ count: z.ZodNumber;
115
+ }, z.core.$strip>>;
116
+ workspaces: z.ZodNumber;
117
+ topModel: z.ZodNullable<z.ZodString>;
118
+ topSource: z.ZodNullable<z.ZodString>;
119
+ firstSeen: z.ZodDate;
120
+ lastSeen: z.ZodDate;
121
+ daily: z.ZodArray<z.ZodNumber>;
98
122
  }, z.core.$strip>>;
99
123
  topUsers: z.ZodArray<z.ZodObject<{
100
124
  workspaceId: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"overview.d.ts","sourceRoot":"","sources":["../../../../../../../lib/contract/gateway/router/admin/usage/overview.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAOzB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAyE3B,CAAC"}
1
+ {"version":3,"file":"overview.d.ts","sourceRoot":"","sources":["../../../../../../../lib/contract/gateway/router/admin/usage/overview.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAqBzB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DA+D3B,CAAC"}
@@ -5,6 +5,19 @@ const breakdownItemSchema = z.object({
5
5
  label: z.string(),
6
6
  count: z.number(),
7
7
  });
8
+ const topErrorSchema = z.object({
9
+ message: z.string(),
10
+ code: z.string().nullable(),
11
+ count: z.number(),
12
+ share: z.number(),
13
+ operations: z.array(z.object({ operation: z.string(), count: z.number() })),
14
+ workspaces: z.number(),
15
+ topModel: z.string().nullable(),
16
+ topSource: z.string().nullable(),
17
+ firstSeen: z.date(),
18
+ lastSeen: z.date(),
19
+ daily: z.array(z.number()),
20
+ });
8
21
  export const getUsageOverview = oc
9
22
  .input(z.object({
10
23
  period: z.enum(["7d", "30d", "90d", "all"]).default("30d"),
@@ -47,14 +60,8 @@ export const getUsageOverview = oc
47
60
  topModels: z.array(breakdownItemSchema),
48
61
  topRequestedModels: z.array(breakdownItemSchema),
49
62
  topSources: z.array(breakdownItemSchema),
50
- topSystemErrors: z.array(z.object({
51
- message: z.string(),
52
- count: z.number(),
53
- })),
54
- topUserErrors: z.array(z.object({
55
- message: z.string(),
56
- count: z.number(),
57
- })),
63
+ topSystemErrors: z.array(topErrorSchema),
64
+ topUserErrors: z.array(topErrorSchema),
58
65
  topUsers: z.array(z.object({
59
66
  workspaceId: z.number(),
60
67
  label: z.string(),
@@ -10,6 +10,8 @@ export declare const listUsage: import("@orpc/contract").ContractProcedureBuilde
10
10
  user_error: "user_error";
11
11
  }>>;
12
12
  instanceId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13
+ error: z.ZodOptional<z.ZodString>;
14
+ errorCode: z.ZodOptional<z.ZodString>;
13
15
  sortBy: z.ZodDefault<z.ZodEnum<{
14
16
  createdAt: "createdAt";
15
17
  credits: "credits";
@@ -1 +1 @@
1
- {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../../../../../lib/contract/gateway/router/admin/usage/records.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAyDpB,CAAC"}
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../../../../../lib/contract/gateway/router/admin/usage/records.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DA2DpB,CAAC"}
@@ -10,6 +10,8 @@ export const listUsage = oc
10
10
  .enum(["all", "success", "user_error", "system_error"])
11
11
  .default("all"),
12
12
  instanceId: z.number().nullable().optional(),
13
+ error: z.string().max(5000).optional(),
14
+ errorCode: z.string().max(200).optional(),
13
15
  sortBy: z
14
16
  .enum([
15
17
  "createdAt",
@@ -1,4 +1,5 @@
1
1
  export * from "./admin/billing.js";
2
+ export * from "./admin/billing-holds.js";
2
3
  export * from "./admin/blog.js";
3
4
  export * from "./admin/feedback.js";
4
5
  export * from "./admin/instances.js";
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../../../lib/contract/gateway/router/admin.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../../../lib/contract/gateway/router/admin.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from "./admin/billing.js";
2
+ export * from "./admin/billing-holds.js";
2
3
  export * from "./admin/blog.js";
3
4
  export * from "./admin/feedback.js";
4
5
  export * from "./admin/instances.js";
@@ -15,4 +15,58 @@ export declare const update: import("@orpc/contract").ContractProcedureBuilderWi
15
15
  succeedURL: z.ZodString;
16
16
  returnURL: z.ZodString;
17
17
  }, z.core.$strip>, z.ZodOptional<z.ZodString>, Record<never, never>, Record<never, never>>;
18
+ /** The workspace's billing hold (unpaid invoices or a payment dispute), if any. */
19
+ export declare const hold: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
20
+ mode: z.ZodEnum<{
21
+ enforce: "enforce";
22
+ off: "off";
23
+ shadow: "shadow";
24
+ }>;
25
+ hold: z.ZodNullable<z.ZodObject<{
26
+ reason: z.ZodEnum<{
27
+ canceled_unpaid: "canceled_unpaid";
28
+ dispute: "dispute";
29
+ dispute_lost: "dispute_lost";
30
+ linked_unpaid: "linked_unpaid";
31
+ manual: "manual";
32
+ overdue_invoice: "overdue_invoice";
33
+ payment_failed: "payment_failed";
34
+ uncollectible: "uncollectible";
35
+ unpaid_invoice: "unpaid_invoice";
36
+ }>;
37
+ code: z.ZodEnum<{
38
+ BILLING_ACCOUNT_HOLD: "BILLING_ACCOUNT_HOLD";
39
+ BILLING_DISPUTE: "BILLING_DISPUTE";
40
+ BILLING_LINKED_UNPAID_BALANCE: "BILLING_LINKED_UNPAID_BALANCE";
41
+ BILLING_PAYMENT_METHOD_REQUIRED: "BILLING_PAYMENT_METHOD_REQUIRED";
42
+ BILLING_UNPAID_INVOICE: "BILLING_UNPAID_INVOICE";
43
+ }>;
44
+ message: z.ZodString;
45
+ linked: z.ZodBoolean;
46
+ paymentMethodRequired: z.ZodBoolean;
47
+ since: z.ZodDate;
48
+ blocking: z.ZodBoolean;
49
+ invoices: z.ZodArray<z.ZodObject<{
50
+ id: z.ZodString;
51
+ number: z.ZodNullable<z.ZodString>;
52
+ status: z.ZodString;
53
+ amountRemaining: z.ZodNumber;
54
+ currency: z.ZodString;
55
+ created: z.ZodNumber;
56
+ dueDate: z.ZodNullable<z.ZodNumber>;
57
+ attemptCount: z.ZodNumber;
58
+ nextPaymentAttempt: z.ZodNullable<z.ZodNumber>;
59
+ hostedInvoiceUrl: z.ZodNullable<z.ZodString>;
60
+ collectionMethod: z.ZodString;
61
+ }, z.core.$strip>>;
62
+ dispute: z.ZodNullable<z.ZodObject<{
63
+ id: z.ZodString;
64
+ status: z.ZodString;
65
+ amount: z.ZodNumber;
66
+ currency: z.ZodString;
67
+ reason: z.ZodString;
68
+ created: z.ZodNumber;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>>;
71
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
18
72
  //# sourceMappingURL=billing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../../lib/contract/gateway/router/billing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,MAAM;;2EAEC,CAAC;AAErB,eAAO,MAAM,MAAM;;;;;;;;;;;;0FAgBY,CAAC"}
1
+ {"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../../lib/contract/gateway/router/billing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,eAAO,MAAM,MAAM;;2EAEC,CAAC;AAErB,eAAO,MAAM,MAAM;;;;;;;;;;;;0FAgBY,CAAC;AAgBhC,mFAAmF;AACnF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAoChB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import * as z from "zod";
3
+ import { billingHoldErrorCodes } from "../../../billing-hold-error-codes.js";
3
4
  export const manage = oc
4
5
  .input(z.object({ returnURL: z.string() }))
5
6
  .output(z.string());
@@ -18,3 +19,52 @@ export const update = oc
18
19
  path: ["plan", "annual"],
19
20
  }))
20
21
  .output(z.string().optional());
22
+ const billingHoldInvoice = z.object({
23
+ id: z.string(),
24
+ number: z.string().nullable(),
25
+ status: z.string(),
26
+ amountRemaining: z.number(),
27
+ currency: z.string(),
28
+ created: z.number(),
29
+ dueDate: z.number().nullable(),
30
+ attemptCount: z.number(),
31
+ nextPaymentAttempt: z.number().nullable(),
32
+ hostedInvoiceUrl: z.string().nullable(),
33
+ collectionMethod: z.string(),
34
+ });
35
+ /** The workspace's billing hold (unpaid invoices or a payment dispute), if any. */
36
+ export const hold = oc.output(z.object({
37
+ mode: z.enum(["off", "shadow", "enforce"]),
38
+ hold: z
39
+ .object({
40
+ reason: z.enum([
41
+ "dispute",
42
+ "dispute_lost",
43
+ "uncollectible",
44
+ "payment_failed",
45
+ "unpaid_invoice",
46
+ "overdue_invoice",
47
+ "canceled_unpaid",
48
+ "linked_unpaid",
49
+ "manual",
50
+ ]),
51
+ code: z.enum(billingHoldErrorCodes),
52
+ message: z.string(),
53
+ linked: z.boolean(),
54
+ paymentMethodRequired: z.boolean(),
55
+ since: z.date(),
56
+ blocking: z.boolean(),
57
+ invoices: z.array(billingHoldInvoice),
58
+ dispute: z
59
+ .object({
60
+ id: z.string(),
61
+ status: z.string(),
62
+ amount: z.number(),
63
+ currency: z.string(),
64
+ reason: z.string(),
65
+ created: z.number(),
66
+ })
67
+ .nullable(),
68
+ })
69
+ .nullable(),
70
+ }));
@@ -16,6 +16,8 @@ export declare const list: import("@orpc/contract").ContractProcedureBuilderWith
16
16
  kind: z.ZodDefault<z.ZodString>;
17
17
  managedStatus: z.ZodDefault<z.ZodString>;
18
18
  lastError: z.ZodDefault<z.ZodNullable<z.ZodString>>;
19
+ imageVersion: z.ZodDefault<z.ZodNullable<z.ZodString>>;
20
+ imageOutdated: z.ZodDefault<z.ZodBoolean>;
19
21
  id: z.ZodNumber;
20
22
  name: z.ZodString;
21
23
  description: z.ZodNullable<z.ZodString>;
@@ -43,6 +45,8 @@ export declare const get: import("@orpc/contract").ContractProcedureBuilderWithI
43
45
  kind: z.ZodDefault<z.ZodString>;
44
46
  managedStatus: z.ZodDefault<z.ZodString>;
45
47
  lastError: z.ZodDefault<z.ZodNullable<z.ZodString>>;
48
+ imageVersion: z.ZodDefault<z.ZodNullable<z.ZodString>>;
49
+ imageOutdated: z.ZodDefault<z.ZodBoolean>;
46
50
  id: z.ZodNumber;
47
51
  name: z.ZodString;
48
52
  description: z.ZodNullable<z.ZodString>;
@@ -96,6 +100,8 @@ export declare const create: import("@orpc/contract").ContractProcedureBuilderWi
96
100
  kind: z.ZodDefault<z.ZodString>;
97
101
  managedStatus: z.ZodDefault<z.ZodString>;
98
102
  lastError: z.ZodDefault<z.ZodNullable<z.ZodString>>;
103
+ imageVersion: z.ZodDefault<z.ZodNullable<z.ZodString>>;
104
+ imageOutdated: z.ZodDefault<z.ZodBoolean>;
99
105
  id: z.ZodNumber;
100
106
  name: z.ZodString;
101
107
  description: z.ZodNullable<z.ZodString>;
@@ -123,6 +129,8 @@ export declare const retry: import("@orpc/contract").ContractProcedureBuilderWit
123
129
  kind: z.ZodDefault<z.ZodString>;
124
130
  managedStatus: z.ZodDefault<z.ZodString>;
125
131
  lastError: z.ZodDefault<z.ZodNullable<z.ZodString>>;
132
+ imageVersion: z.ZodDefault<z.ZodNullable<z.ZodString>>;
133
+ imageOutdated: z.ZodDefault<z.ZodBoolean>;
126
134
  id: z.ZodNumber;
127
135
  name: z.ZodString;
128
136
  description: z.ZodNullable<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../../../../lib/contract/gateway/router/instance/instances.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA+BzB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;+DAAqC,CAAC;AAEvD,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAEsD,CAAC;AAEvE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAUK,CAAC;AAEzB,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;8DAEM,CAAC;AAEzB,eAAO,MAAM,MAAM;;;;8DAEyB,CAAC;AAE7C,eAAO,MAAM,UAAU;;;;;;;;;+DAarB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;+DAW1B,CAAC"}
1
+ {"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../../../../lib/contract/gateway/router/instance/instances.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAiCzB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;+DAAqC,CAAC;AAEvD,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAEsD,CAAC;AAEvE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAUK,CAAC;AAEzB,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAEM,CAAC;AAEzB,eAAO,MAAM,MAAM;;;;8DAEyB,CAAC;AAE7C,eAAO,MAAM,UAAU;;;;;;;;;+DAarB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;+DAW1B,CAAC"}
@@ -18,6 +18,8 @@ const instanceSchema = z.object({
18
18
  kind: z.string().default("full"),
19
19
  managedStatus: z.string().default("ready"),
20
20
  lastError: z.string().nullable().default(null),
21
+ imageVersion: z.string().nullable().default(null),
22
+ imageOutdated: z.boolean().default(false),
21
23
  id: z.number(),
22
24
  name: z.string(),
23
25
  description: z.string().nullable(),
@@ -1,4 +1,5 @@
1
1
  export * from "./api-source.js";
2
+ export * from "./billing-hold-error-codes.js";
2
3
  export * from "./date.js";
3
4
  export * from "./dedicated-instance-monthly-credits.js";
4
5
  export * from "./environment.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,sCAAsC,CAAC;AACrD,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,QAAQ,CAAC;AACvB,cAAc,sCAAsC,CAAC;AACrD,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
package/.tsc/lib/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./api-source.js";
2
+ export * from "./billing-hold-error-codes.js";
2
3
  export * from "./date.js";
3
4
  export * from "./dedicated-instance-monthly-credits.js";
4
5
  export * from "./environment.js";
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @pdfvector/util
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#516](https://github.com/phuctm97/pdfvector/pull/516) [`1b5e378`](https://github.com/phuctm97/pdfvector/commit/1b5e3786741f1d34b663be68211cb2c887e239b4) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Redesign the Overview, Instances and instance Overview pages as a dashboard: KPI cards with trends against the previous period, a usage-over-time chart (requests by outcome, credits or pages) with a 7/30/90-day and all-time range, a breakdown by operation, source and model, recent requests, plan credits with low and out-of-credit states, and an instances table with search, status and type filters, sorting, column visibility, pagination, row actions, a mobile list, region, version and update badges. The Overview page opens on Usage; the API tab keeps the endpoint, API key, code examples and automations. Admin pages move into their own area with a dedicated sidebar, a new admin overview and a rebuilt billing holds page; the app sidebar shows a single Admin link. `instance.list` and `instance.get` now return the managed image `imageVersion` and whether a newer image is pending (`imageOutdated`).
8
+
9
+ ## 0.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#507](https://github.com/phuctm97/pdfvector/pull/507) [`fbe51ca`](https://github.com/phuctm97/pdfvector/commit/fbe51ca228221c31d36565b14c284c1259ddcef1) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Billing holds: workspaces with unpaid invoices, payment disputes or a card/sign-in linked to another account's unpaid balance are blocked with HTTP 402 and a stable code (`BILLING_UNPAID_INVOICE`, `BILLING_DISPUTE`, `BILLING_PAYMENT_METHOD_REQUIRED`, `BILLING_LINKED_UNPAID_BALANCE`, `BILLING_ACCOUNT_HOLD`), cannot resubscribe until paid, and see their invoices with Pay buttons in billing. Out-of-credit errors now carry `CREDITS_EXHAUSTED`. Holds come from webhooks plus an hourly sweep, never from Stripe calls on the request path.
14
+
3
15
  ## 0.4.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfvector/util",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "main": "./.tsc/lib/index.js",
6
6
  "exports": {