@pinet/pinet-core 0.2.4 → 0.2.7

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.
@@ -1,6 +1,16 @@
1
1
  export type PinetOutputFormat = "cli" | "json";
2
+ type PinetOutputFormatInput = string | number | boolean | null | undefined;
3
+ type PinetOutputFullInput = boolean | string | number | null | undefined;
4
+ export interface PinetOutputOptionsArgs {
5
+ format?: PinetOutputFormatInput;
6
+ f?: PinetOutputFormatInput;
7
+ "-f"?: PinetOutputFormatInput;
8
+ full?: PinetOutputFullInput;
9
+ "--full"?: PinetOutputFullInput;
10
+ }
2
11
  export interface PinetOutputOptions {
3
12
  format: PinetOutputFormat;
4
13
  full: boolean;
5
14
  }
6
- export declare function normalizePinetOutputOptions(args: Record<string, unknown>): PinetOutputOptions;
15
+ export declare function normalizePinetOutputOptions(args: PinetOutputOptionsArgs): PinetOutputOptions;
16
+ export {};
@@ -1,4 +1,8 @@
1
1
  import { type PinetMailClass } from "@pinet/broker-core/mail-classification";
2
+ export type PinetReadMetadataValue = unknown;
3
+ export interface PinetReadMessageMetadata {
4
+ [key: string]: PinetReadMetadataValue;
5
+ }
2
6
  export interface PinetInboxItem {
3
7
  inboxId: number;
4
8
  delivered: boolean;
@@ -10,7 +14,7 @@ export interface PinetInboxItem {
10
14
  direction: string;
11
15
  sender: string;
12
16
  body: string;
13
- metadata: Record<string, unknown> | null;
17
+ metadata: PinetReadMessageMetadata | null;
14
18
  createdAt: string;
15
19
  };
16
20
  }
@@ -43,7 +47,34 @@ export interface PinetReadOptions {
43
47
  unreadOnly?: boolean;
44
48
  markRead?: boolean;
45
49
  }
50
+ export interface CompactPinetReadMessageDetails {
51
+ id: number;
52
+ threadId: string;
53
+ source: string;
54
+ sender: string;
55
+ class: PinetMailClass;
56
+ }
57
+ export interface CompactPinetReadUnreadThreadDetails {
58
+ threadId: string;
59
+ source: string;
60
+ unread: number;
61
+ latestMessageId: number;
62
+ class: PinetMailClass;
63
+ summary: string;
64
+ }
65
+ export interface CompactPinetReadDetails {
66
+ summary: string;
67
+ messageCount: number;
68
+ unreadBefore: number;
69
+ unreadAfter: number;
70
+ markedReadCount?: number;
71
+ messages?: CompactPinetReadMessageDetails[];
72
+ exactBodies?: string;
73
+ messagesTruncated?: number;
74
+ unreadThreads?: CompactPinetReadUnreadThreadDetails[];
75
+ unreadThreadsTruncated?: number;
76
+ }
46
77
  export declare function formatPinetReadResultFull(result: PinetReadResult, options: PinetReadOptions): string;
47
78
  export declare function summarizeUnreadThreadCounts(thread: PinetUnreadThreadSummary): string;
48
- export declare function buildCompactPinetReadDetails(result: PinetReadResult): Record<string, unknown>;
79
+ export declare function buildCompactPinetReadDetails(result: PinetReadResult): CompactPinetReadDetails;
49
80
  export declare function formatPinetReadResultCompact(result: PinetReadResult, options: PinetReadOptions): string;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@pinet/pinet-core",
3
- "version": "0.2.4",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "description": "Pinet runtime core for pi — broker/follower orchestration and mesh tooling",
6
6
  "author": "Will Porcellini <5994936+gugu91@users.noreply.github.com>",
7
7
  "license": "MIT",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "git+https://github.com/gugu91/extensions.git",
10
+ "url": "git+https://github.com/gugu91/pinet.git",
11
11
  "directory": "pinet-core"
12
12
  },
13
13
  "publishConfig": {
@@ -30,13 +30,13 @@
30
30
  "scripts": {
31
31
  "build": "node ../scripts/build-package.mjs",
32
32
  "prepack": "pnpm run build",
33
- "lint": "eslint . --ext .ts",
33
+ "lint": "oxlint .",
34
34
  "typecheck": "tsc --noEmit",
35
- "test": "vitest run *.test.ts"
35
+ "test": "vitest run --config ../vitest.config.ts *.test.ts"
36
36
  },
37
37
  "dependencies": {
38
- "@pinet/broker-core": "0.2.4",
39
- "@pinet/transport-core": "0.2.4"
38
+ "@pinet/broker-core": "0.2.7",
39
+ "@pinet/transport-core": "0.2.7"
40
40
  },
41
41
  "types": "./dist/index.d.ts"
42
42
  }