@shipfox/client-triggers 22.0.3 → 23.0.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/client-triggers",
3
3
  "license": "MIT",
4
- "version": "22.0.3",
4
+ "version": "23.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -26,13 +26,13 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@swc/helpers": "^0.5.17",
29
- "@shipfox/api-triggers-dto": "9.0.2",
30
29
  "@shipfox/client-api": "6.0.1",
31
- "@shipfox/client-projects": "22.0.3",
32
- "@shipfox/client-shell": "22.0.3",
30
+ "@shipfox/client-projects": "23.0.0",
31
+ "@shipfox/api-triggers-dto": "14.0.0",
32
+ "@shipfox/client-shell": "23.0.0",
33
33
  "@shipfox/client-ui": "22.0.3",
34
- "@shipfox/integration-icons": "0.3.7",
35
- "@shipfox/react-ui": "2.2.0"
34
+ "@shipfox/react-ui": "2.2.0",
35
+ "@shipfox/integration-icons": "0.3.7"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@tanstack/react-query": "^5.101.0",
@@ -53,6 +53,7 @@ function makeEvent(
53
53
  provider,
54
54
  source,
55
55
  event,
56
+ replay_of_event_id: null,
56
57
  delivery_id: `delivery-${String(seq).padStart(6, '0')}`,
57
58
  connection_id: 'conn-demo',
58
59
  outcome,
@@ -82,6 +83,7 @@ const SAMPLE_FACETS: TriggerEventFacetsResponseDto = {
82
83
  {value: 'pull_request', count: 1},
83
84
  {value: 'issue_comment', count: 1},
84
85
  ],
86
+ origins: [{value: 'integration', count: 5}],
85
87
  };
86
88
 
87
89
  const meta = {
@@ -15,6 +15,7 @@ function makeEvent(overrides: Partial<TriggerEventListItemDto> = {}) {
15
15
  provider: 'github',
16
16
  source: 'github_acme',
17
17
  event: 'push',
18
+ replay_of_event_id: null,
18
19
  delivery_id: 'delivery-1',
19
20
  connection_id: 'conn-1',
20
21
  outcome: 'routed',
@@ -79,6 +79,7 @@ const routedEventDto: TriggerEventDetailResponseDto = {
79
79
  provider: 'github',
80
80
  source: 'github_acme',
81
81
  event: 'push',
82
+ replay_of_event_id: null,
82
83
  delivery_id: 'delivery-179',
83
84
  connection_id: '55555555-5555-4555-8555-555555555555',
84
85
  connection_name: 'ShipfoxHQ Production',
@@ -130,6 +131,7 @@ const routedEventDto: TriggerEventDetailResponseDto = {
130
131
  created_at: '2026-06-25T19:30:02.000Z',
131
132
  },
132
133
  ],
134
+ replays: [],
133
135
  };
134
136
 
135
137
  const discardedEventDto: TriggerEventDetailResponseDto = {
@@ -29,6 +29,7 @@ function makeEvent(
29
29
  provider: 'github',
30
30
  source: 'github',
31
31
  event: 'push',
32
+ replay_of_event_id: null,
32
33
  delivery_id: 'delivery-179',
33
34
  connection_id: '55555555-5555-4555-8555-555555555555',
34
35
  connection_name: 'ShipfoxHQ Production',
@@ -58,6 +59,7 @@ function makeEvent(
58
59
  created_at: '2026-06-25T19:30:02.000Z',
59
60
  },
60
61
  ],
62
+ replays: [],
61
63
  ...overrides,
62
64
  };
63
65
  }
@@ -1,4 +1,4 @@
1
- export type TriggerEventOrigin = 'integration' | 'manual' | 'cron';
1
+ export type TriggerEventOrigin = 'integration' | 'manual' | 'cron' | 'dev';
2
2
 
3
3
  export type TriggerEventOutcome = 'received' | 'routed' | 'discarded' | 'failed' | 'errored';
4
4
 
@@ -18,6 +18,7 @@ function triggerEventDto(
18
18
  provider: 'github',
19
19
  source: 'github',
20
20
  event: 'push',
21
+ replay_of_event_id: null,
21
22
  delivery_id: 'delivery-1',
22
23
  connection_id: '33333333-3333-4333-8333-333333333333',
23
24
  outcome: 'routed' as const,
@@ -71,6 +72,7 @@ describe('trigger event mapper', () => {
71
72
  created_at: '2026-06-01T00:00:01.000Z',
72
73
  },
73
74
  ],
75
+ replays: [],
74
76
  } satisfies TriggerEventDetailResponseDto);
75
77
 
76
78
  expect(detail.decisions).toEqual([
@@ -30,6 +30,7 @@ function triggerEventDto(overrides: Record<string, unknown> = {}) {
30
30
  provider: 'github',
31
31
  source: 'github',
32
32
  event: 'push',
33
+ replay_of_event_id: null,
33
34
  delivery_id: 'delivery-1',
34
35
  connection_id: '33333333-3333-4333-8333-333333333333',
35
36
  outcome: 'routed',
@@ -257,6 +258,7 @@ describe('getTriggerEvent', () => {
257
258
  jsonResponse({
258
259
  ...triggerEventDto({id, connection_name: null, payload: null}),
259
260
  decisions: [],
261
+ replays: [],
260
262
  }),
261
263
  );
262
264
  configureApiClient({fetchImpl});
@@ -276,7 +278,7 @@ describe('getTriggerEventFacets', () => {
276
278
 
277
279
  test('requests the workspace facets', async () => {
278
280
  const workspaceId = WORKSPACE_ID;
279
- const fetchImpl = vi.fn(async () => jsonResponse({sources: [], events: []}));
281
+ const fetchImpl = vi.fn(async () => jsonResponse({sources: [], events: [], origins: []}));
280
282
  configureApiClient({fetchImpl});
281
283
 
282
284
  await getTriggerEventFacets({workspaceId});
@@ -28,6 +28,7 @@ function makeEvent(overrides: Partial<TriggerEventListItemDto> = {}): TriggerEve
28
28
  provider: 'github',
29
29
  source: 'github',
30
30
  event: 'push',
31
+ replay_of_event_id: null,
31
32
  delivery_id: 'delivery-179',
32
33
  connection_id: '33333333-3333-4333-8333-333333333333',
33
34
  outcome: 'routed',
@@ -45,6 +46,7 @@ function makeDetail(overrides: Partial<TriggerEventDetailResponseDto> = {}) {
45
46
  connection_name: 'ShipfoxHQ Production',
46
47
  payload: {ref: 'refs/heads/main'},
47
48
  decisions: [],
49
+ replays: [],
48
50
  ...overrides,
49
51
  };
50
52
  }