@taico/events 0.9.1 → 0.10.0

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/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # @taico/events
2
2
 
3
- [![Socket Badge](https://badge.socket.dev/npm/package/@taico/events/0.9.1)](https://badge.socket.dev/npm/package/@taico/events/0.9.1)
3
+ [![Socket Badge](https://badge.socket.dev/npm/package/@taico/events/0.10.0)](https://badge.socket.dev/npm/package/@taico/events/0.10.0)
package/dist/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export * from './types/thread-events.js';
3
3
  export * from './types/execution-events.js';
4
4
  export * from './types/execution-traces.js';
5
5
  export * from './types/worker-events.js';
6
+ export * from './types/pull-request-events.js';
package/dist/index.js CHANGED
@@ -3,3 +3,4 @@ export * from './types/thread-events.js';
3
3
  export * from './types/execution-events.js';
4
4
  export * from './types/execution-traces.js';
5
5
  export * from './types/worker-events.js';
6
+ export * from './types/pull-request-events.js';
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Pull Request Wire Event Types for WebSocket Communication
3
+ *
4
+ * Contract between the backend pull requests gateway and frontend consumers.
5
+ */
6
+ export declare const PullRequestWireEvents: {
7
+ readonly PULL_REQUEST_UPDATED: "pull_request.updated";
8
+ };
9
+ export type PullRequestWireEventName = (typeof PullRequestWireEvents)[keyof typeof PullRequestWireEvents];
10
+ /** Matches PullRequestResponseDto from the backend. */
11
+ export interface PullRequestWirePayload {
12
+ id: string;
13
+ key: string;
14
+ owner: string;
15
+ repo: string;
16
+ number: number;
17
+ url: string;
18
+ title: string | null;
19
+ state: 'open' | 'closed' | 'merged' | null;
20
+ draft: boolean;
21
+ authorLogin: string | null;
22
+ headRef: string | null;
23
+ baseRef: string | null;
24
+ additions: number | null;
25
+ deletions: number | null;
26
+ changedFiles: number | null;
27
+ commentCount: number | null;
28
+ checksStatus: 'none' | 'pending' | 'success' | 'failure';
29
+ checksTotal: number;
30
+ checksPassed: number;
31
+ checksFailed: number;
32
+ checksPending: number;
33
+ failedChecks: string[];
34
+ reviewDecision: 'none' | 'approved' | 'changes_requested';
35
+ approvals: number;
36
+ mergedAt: string | null;
37
+ closedAt: string | null;
38
+ githubUpdatedAt: string | null;
39
+ lastFetchedAt: string | null;
40
+ lastError: string | null;
41
+ }
42
+ /** Emitted to everyone subscribed to pull requests when Taico's copy of one changes. */
43
+ export interface PullRequestUpdatedWireEvent {
44
+ pullRequest: PullRequestWirePayload;
45
+ /** What happened since the last look, e.g. "merged", "checks_failed". Empty for display-only changes. */
46
+ changes: string[];
47
+ occurredAt: string;
48
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Pull Request Wire Event Types for WebSocket Communication
3
+ *
4
+ * Contract between the backend pull requests gateway and frontend consumers.
5
+ */
6
+ export const PullRequestWireEvents = {
7
+ PULL_REQUEST_UPDATED: 'pull_request.updated',
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taico/events",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "PolyForm-Small-Business-1.0.0",