@shipfox/client-triggers 5.0.0 → 6.0.2
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +50 -0
- package/dist/components/events-filter-bar.d.ts +3 -4
- package/dist/components/events-filter-bar.d.ts.map +1 -1
- package/dist/components/events-filter-bar.js +8 -16
- package/dist/components/events-filter-bar.js.map +1 -1
- package/dist/components/events-list.d.ts.map +1 -1
- package/dist/components/events-list.js +2 -4
- package/dist/components/events-list.js.map +1 -1
- package/dist/components/events-list.stories.d.ts +1 -16
- package/dist/components/events-list.stories.d.ts.map +1 -1
- package/dist/components/events-list.stories.js +2 -1
- package/dist/components/events-list.stories.js.map +1 -1
- package/dist/components/trigger-event-detail.d.ts +2 -2
- package/dist/components/trigger-event-detail.d.ts.map +1 -1
- package/dist/components/trigger-event-detail.js +7 -7
- package/dist/components/trigger-event-detail.js.map +1 -1
- package/dist/components/trigger-event-detail.stories.d.ts +1 -36
- package/dist/components/trigger-event-detail.stories.d.ts.map +1 -1
- package/dist/components/trigger-event-detail.stories.js +6 -3
- package/dist/components/trigger-event-detail.stories.js.map +1 -1
- package/dist/components/trigger-event-result.d.ts +2 -2
- package/dist/components/trigger-event-result.d.ts.map +1 -1
- package/dist/components/trigger-event-result.js +8 -16
- package/dist/components/trigger-event-result.js.map +1 -1
- package/dist/components/trigger-event-row.d.ts +2 -2
- package/dist/components/trigger-event-row.d.ts.map +1 -1
- package/dist/components/trigger-event-row.js +1 -1
- package/dist/components/trigger-event-row.js.map +1 -1
- package/dist/components/trigger-source-icon.d.ts +8 -6
- package/dist/components/trigger-source-icon.d.ts.map +1 -1
- package/dist/components/trigger-source-icon.js +4 -3
- package/dist/components/trigger-source-icon.js.map +1 -1
- package/dist/components/types.d.ts +3 -4
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/types.js.map +1 -1
- package/dist/core/trigger-event.d.ts +78 -0
- package/dist/core/trigger-event.d.ts.map +1 -0
- package/dist/core/trigger-event.js +71 -0
- package/dist/core/trigger-event.js.map +1 -0
- package/dist/feature.d.ts +7 -0
- package/dist/feature.d.ts.map +1 -1
- package/dist/feature.js +10 -9
- package/dist/feature.js.map +1 -1
- package/dist/hooks/api/trigger-event-mapper.d.ts +7 -0
- package/dist/hooks/api/trigger-event-mapper.d.ts.map +1 -0
- package/dist/hooks/api/trigger-event-mapper.js +57 -0
- package/dist/hooks/api/trigger-event-mapper.js.map +1 -0
- package/dist/hooks/api/trigger-events.d.ts +15 -138
- package/dist/hooks/api/trigger-events.d.ts.map +1 -1
- package/dist/hooks/api/trigger-events.js +44 -47
- package/dist/hooks/api/trigger-events.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pages/events-page.d.ts +1 -1
- package/dist/pages/events-page.d.ts.map +1 -1
- package/dist/pages/events-page.js +1 -1
- package/dist/pages/events-page.js.map +1 -1
- package/dist/routes/events-settings.js.map +1 -1
- package/dist/search.d.ts +3 -3
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +3 -4
- package/dist/search.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/components/events-filter-bar.tsx +16 -11
- package/src/components/events-list.stories.tsx +3 -2
- package/src/components/events-list.test.tsx +4 -3
- package/src/components/events-list.tsx +2 -12
- package/src/components/trigger-event-detail.stories.tsx +7 -3
- package/src/components/trigger-event-detail.test.tsx +6 -1
- package/src/components/trigger-event-detail.tsx +21 -18
- package/src/components/trigger-event-result.test.ts +6 -6
- package/src/components/trigger-event-result.ts +9 -13
- package/src/components/trigger-event-row.tsx +5 -5
- package/src/components/trigger-source-icon.tsx +9 -7
- package/src/components/types.ts +7 -7
- package/src/core/trigger-event.test.ts +40 -0
- package/src/core/trigger-event.ts +126 -0
- package/src/feature.ts +6 -4
- package/src/hooks/api/trigger-event-mapper.test.ts +88 -0
- package/src/hooks/api/trigger-event-mapper.ts +76 -0
- package/src/hooks/api/trigger-events.test.ts +49 -12
- package/src/hooks/api/trigger-events.ts +96 -56
- package/src/index.ts +1 -0
- package/src/pages/events-page.test.tsx +4 -4
- package/src/pages/events-page.tsx +3 -4
- package/src/routes/events-settings.tsx +1 -1
- package/src/search.ts +4 -5
- package/tsconfig.build.tsbuildinfo +1 -1
- package/vercel.json +5 -0
|
@@ -3,6 +3,7 @@ import { argosScreenshot } from '@argos-ci/storybook/vitest';
|
|
|
3
3
|
import { RelativeTimeProvider } from '@shipfox/react-ui/relative-time';
|
|
4
4
|
import { createMemoryHistory, createRootRoute, createRoute, createRouter, Outlet, RouterProvider } from '@tanstack/react-router';
|
|
5
5
|
import { screen } from 'storybook/test';
|
|
6
|
+
import { toTriggerEventDetail } from '#hooks/api/trigger-event-mapper.js';
|
|
6
7
|
import { TriggerEventDetailView } from './trigger-event-detail.js';
|
|
7
8
|
const WORKSPACE_ID = '11111111-1111-4111-8111-111111111111';
|
|
8
9
|
const PROJECT_ID = '22222222-2222-4222-8222-222222222222';
|
|
@@ -50,7 +51,7 @@ const withRouter = (Story)=>{
|
|
|
50
51
|
router: router
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
|
-
const
|
|
54
|
+
const routedEventDto = {
|
|
54
55
|
id: '44444444-4444-4444-8444-444444444444',
|
|
55
56
|
event_ref: 'github:delivery-179:push',
|
|
56
57
|
origin: 'integration',
|
|
@@ -115,8 +116,8 @@ const routedEvent = {
|
|
|
115
116
|
}
|
|
116
117
|
]
|
|
117
118
|
};
|
|
118
|
-
const
|
|
119
|
-
...
|
|
119
|
+
const discardedEventDto = {
|
|
120
|
+
...routedEventDto,
|
|
120
121
|
id: 'dddddddd-dddd-4ddd-8ddd-dddddddddddd',
|
|
121
122
|
event_ref: 'github:delivery-180:issue_comment',
|
|
122
123
|
event: 'issue_comment',
|
|
@@ -132,6 +133,8 @@ const discardedEvent = {
|
|
|
132
133
|
processed_at: '2026-06-25T19:33:01.000Z',
|
|
133
134
|
decisions: []
|
|
134
135
|
};
|
|
136
|
+
const routedEvent = toTriggerEventDetail(routedEventDto);
|
|
137
|
+
const discardedEvent = toTriggerEventDetail(discardedEventDto);
|
|
135
138
|
const meta = {
|
|
136
139
|
title: 'Triggers/EventDetail',
|
|
137
140
|
component: TriggerEventDetailView,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/trigger-event-detail.stories.tsx"],"sourcesContent":["import {argosScreenshot} from '@argos-ci/storybook/vitest';\nimport type {TriggerEventDetailResponseDto} from '@shipfox/api-triggers-dto';\nimport {RelativeTimeProvider} from '@shipfox/react-ui/relative-time';\nimport type {Decorator, Meta, StoryObj} from '@storybook/react';\nimport {\n createMemoryHistory,\n createRootRoute,\n createRoute,\n createRouter,\n Outlet,\n RouterProvider,\n} from '@tanstack/react-router';\nimport {screen} from 'storybook/test';\nimport {TriggerEventDetailView} from './trigger-event-detail.js';\n\nconst WORKSPACE_ID = '11111111-1111-4111-8111-111111111111';\nconst PROJECT_ID = '22222222-2222-4222-8222-222222222222';\nconst RUN_ID = '33333333-3333-4333-8333-333333333333';\n\nfunction minutesAgo(minutes: number): string {\n return new Date(Date.now() - minutes * 60_000).toISOString();\n}\n\nconst withRouter: Decorator = (Story) => {\n function StoryRoute() {\n return (\n <RelativeTimeProvider>\n <div className=\"min-h-screen bg-background-subtle-base p-24\">\n <div className=\"ml-auto w-[400px]\">\n <Story />\n </div>\n </div>\n </RelativeTimeProvider>\n );\n }\n\n const rootRoute = createRootRoute({component: Outlet});\n const storyRoute = createRoute({\n getParentRoute: () => rootRoute,\n path: '/',\n component: StoryRoute,\n });\n const runRoute = createRoute({\n getParentRoute: () => rootRoute,\n path: '/workspaces/$wid/projects/$pid/runs/$workflowRunId',\n component: StoryRoute,\n });\n const router = createRouter({\n history: createMemoryHistory({initialEntries: ['/']}),\n routeTree: rootRoute.addChildren([storyRoute, runRoute]),\n });\n\n return <RouterProvider router={router} />;\n};\n\nconst
|
|
1
|
+
{"version":3,"sources":["../../src/components/trigger-event-detail.stories.tsx"],"sourcesContent":["import {argosScreenshot} from '@argos-ci/storybook/vitest';\nimport type {TriggerEventDetailResponseDto} from '@shipfox/api-triggers-dto';\nimport {RelativeTimeProvider} from '@shipfox/react-ui/relative-time';\nimport type {Decorator, Meta, StoryObj} from '@storybook/react';\nimport {\n createMemoryHistory,\n createRootRoute,\n createRoute,\n createRouter,\n Outlet,\n RouterProvider,\n} from '@tanstack/react-router';\nimport {screen} from 'storybook/test';\nimport {toTriggerEventDetail} from '#hooks/api/trigger-event-mapper.js';\nimport {TriggerEventDetailView} from './trigger-event-detail.js';\n\nconst WORKSPACE_ID = '11111111-1111-4111-8111-111111111111';\nconst PROJECT_ID = '22222222-2222-4222-8222-222222222222';\nconst RUN_ID = '33333333-3333-4333-8333-333333333333';\n\nfunction minutesAgo(minutes: number): string {\n return new Date(Date.now() - minutes * 60_000).toISOString();\n}\n\nconst withRouter: Decorator = (Story) => {\n function StoryRoute() {\n return (\n <RelativeTimeProvider>\n <div className=\"min-h-screen bg-background-subtle-base p-24\">\n <div className=\"ml-auto w-[400px]\">\n <Story />\n </div>\n </div>\n </RelativeTimeProvider>\n );\n }\n\n const rootRoute = createRootRoute({component: Outlet});\n const storyRoute = createRoute({\n getParentRoute: () => rootRoute,\n path: '/',\n component: StoryRoute,\n });\n const runRoute = createRoute({\n getParentRoute: () => rootRoute,\n path: '/workspaces/$wid/projects/$pid/runs/$workflowRunId',\n component: StoryRoute,\n });\n const router = createRouter({\n history: createMemoryHistory({initialEntries: ['/']}),\n routeTree: rootRoute.addChildren([storyRoute, runRoute]),\n });\n\n return <RouterProvider router={router} />;\n};\n\nconst routedEventDto: TriggerEventDetailResponseDto = {\n id: '44444444-4444-4444-8444-444444444444',\n event_ref: 'github:delivery-179:push',\n origin: 'integration',\n workspace_id: WORKSPACE_ID,\n provider: 'github',\n source: 'github_acme',\n event: 'push',\n delivery_id: 'delivery-179',\n connection_id: '55555555-5555-4555-8555-555555555555',\n connection_name: 'ShipfoxHQ Production',\n outcome: 'routed',\n matched_count: 2,\n payload: {\n ref: 'refs/heads/main',\n repository: {full_name: 'ShipfoxHQ/platform'},\n head_commit: {id: '9f1a0f2c7a1b', message: 'Deploy event detail'},\n },\n received_at: minutesAgo(15),\n processed_at: '2026-06-25T19:30:02.000Z',\n created_at: '2026-06-25T19:30:00.000Z',\n decisions: [\n {\n id: '66666666-6666-4666-8666-666666666666',\n received_event_id: '44444444-4444-4444-8444-444444444444',\n subscription_kind: 'trigger',\n subscription_id: '77777777-7777-4777-8777-777777777777',\n subscription_name: 'Deploy production',\n workflow_definition_id: '88888888-8888-4888-8888-888888888888',\n project_id: PROJECT_ID,\n workflow_run_id: null,\n job_id: null,\n matcher_kind: null,\n matcher_ordinal: null,\n decision: 'triggered',\n run_id: RUN_ID,\n run_name: 'deploy-web #184',\n reason: null,\n created_at: '2026-06-25T19:30:02.000Z',\n },\n {\n id: '99999999-9999-4999-8999-999999999999',\n received_event_id: '44444444-4444-4444-8444-444444444444',\n subscription_kind: 'trigger',\n subscription_id: 'aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa',\n subscription_name: 'Mirror staging',\n workflow_definition_id: 'bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb',\n project_id: PROJECT_ID,\n workflow_run_id: null,\n job_id: null,\n matcher_kind: null,\n matcher_ordinal: null,\n decision: 'triggered',\n run_id: 'cccccccc-cccc-4ccc-8ccc-cccccccccccc',\n run_name: 'mirror-staging #51',\n reason: null,\n created_at: '2026-06-25T19:30:02.000Z',\n },\n ],\n};\n\nconst discardedEventDto: TriggerEventDetailResponseDto = {\n ...routedEventDto,\n id: 'dddddddd-dddd-4ddd-8ddd-dddddddddddd',\n event_ref: 'github:delivery-180:issue_comment',\n event: 'issue_comment',\n delivery_id: 'delivery-180',\n outcome: 'discarded',\n matched_count: 0,\n payload: {action: 'created', comment: {body: '/preview'}},\n processed_at: '2026-06-25T19:33:01.000Z',\n decisions: [],\n};\n\nconst routedEvent = toTriggerEventDetail(routedEventDto);\nconst discardedEvent = toTriggerEventDetail(discardedEventDto);\n\nconst meta = {\n title: 'Triggers/EventDetail',\n component: TriggerEventDetailView,\n parameters: {\n layout: 'fullscreen',\n argos: {\n modes: {\n light: {theme: 'light'},\n dark: {theme: 'dark'},\n },\n },\n },\n decorators: [withRouter],\n args: {\n workspaceId: WORKSPACE_ID,\n event: routedEvent,\n onBack: () => undefined,\n },\n} satisfies Meta<typeof TriggerEventDetailView>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nasync function captureDetail(ctx: Parameters<NonNullable<Story['play']>>[0], name: string) {\n await screen.findByRole('complementary', {name: 'Event details'});\n await argosScreenshot(ctx, name);\n}\n\nexport const Playground: Story = {\n play: async (ctx) => {\n await captureDetail(ctx, 'Trigger Event Detail Playground');\n },\n};\n\nexport const Discarded: Story = {\n args: {event: discardedEvent},\n play: async (ctx) => {\n await captureDetail(ctx, 'Trigger Event Detail Discarded');\n },\n};\n"],"names":["argosScreenshot","RelativeTimeProvider","createMemoryHistory","createRootRoute","createRoute","createRouter","Outlet","RouterProvider","screen","toTriggerEventDetail","TriggerEventDetailView","WORKSPACE_ID","PROJECT_ID","RUN_ID","minutesAgo","minutes","Date","now","toISOString","withRouter","Story","StoryRoute","div","className","rootRoute","component","storyRoute","getParentRoute","path","runRoute","router","history","initialEntries","routeTree","addChildren","routedEventDto","id","event_ref","origin","workspace_id","provider","source","event","delivery_id","connection_id","connection_name","outcome","matched_count","payload","ref","repository","full_name","head_commit","message","received_at","processed_at","created_at","decisions","received_event_id","subscription_kind","subscription_id","subscription_name","workflow_definition_id","project_id","workflow_run_id","job_id","matcher_kind","matcher_ordinal","decision","run_id","run_name","reason","discardedEventDto","action","comment","body","routedEvent","discardedEvent","meta","title","parameters","layout","argos","modes","light","theme","dark","decorators","args","workspaceId","onBack","undefined","captureDetail","ctx","name","findByRole","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AAEC,IAAY;IACvF,MAAMtF,OAAOuF,UAAU,CAAC,iBAAiB;QAACD,MAAM;IAAe;IAC/D,MAAM9F,gBAAgB6F,KAAKC;AAC7B;AAEA,OAAO,MAAME,aAAoB;IAC/BC,MAAM,OAAOJ;QACX,MAAMD,cAAcC,KAAK;IAC3B;AACF,EAAE;AAEF,OAAO,MAAMK,YAAmB;IAC9BV,MAAM;QAAC9C,OAAOmC;IAAc;IAC5BoB,MAAM,OAAOJ;QACX,MAAMD,cAAcC,KAAK;IAC3B;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TriggerEventListItemDto } from '@shipfox/api-triggers-dto';
|
|
2
1
|
import type { BadgeVariant } from '@shipfox/react-ui/badge';
|
|
2
|
+
import { type TriggerEventSummary } from '#core/trigger-event.js';
|
|
3
3
|
export interface TriggerEventResult {
|
|
4
4
|
label: string;
|
|
5
5
|
badge: BadgeVariant;
|
|
@@ -11,5 +11,5 @@ export interface TriggerEventResult {
|
|
|
11
11
|
* surfaced as distinct states - both are successfully-processed events that differ
|
|
12
12
|
* only by match count.
|
|
13
13
|
*/
|
|
14
|
-
export declare function triggerEventResult(event: Pick<
|
|
14
|
+
export declare function triggerEventResult(event: Pick<TriggerEventSummary, 'outcome' | 'matchedCount'>): TriggerEventResult;
|
|
15
15
|
//# sourceMappingURL=trigger-event-result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-event-result.d.ts","sourceRoot":"","sources":["../../src/components/trigger-event-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"trigger-event-result.d.ts","sourceRoot":"","sources":["../../src/components/trigger-event-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAwB,KAAK,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;AAEvF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,cAAc,CAAC,GAC3D,kBAAkB,CAkBpB"}
|
|
@@ -1,47 +1,39 @@
|
|
|
1
|
+
import { getTriggerEventResult } from '#core/trigger-event.js';
|
|
1
2
|
/**
|
|
2
3
|
* Collapses the raw event outcome into the single result an operator cares about:
|
|
3
4
|
* how many workflows it triggered (or that it failed). `routed`/`discarded` are not
|
|
4
5
|
* surfaced as distinct states - both are successfully-processed events that differ
|
|
5
6
|
* only by match count.
|
|
6
7
|
*/ export function triggerEventResult(event) {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const result = getTriggerEventResult(event);
|
|
9
|
+
switch(result.kind){
|
|
10
|
+
case 'triggered':
|
|
9
11
|
{
|
|
10
|
-
const plural =
|
|
12
|
+
const plural = result.matchedWorkflowCount === 1 ? '' : 's';
|
|
11
13
|
return {
|
|
12
|
-
label: `Triggered ${
|
|
14
|
+
label: `Triggered ${result.matchedWorkflowCount} workflow${plural}`,
|
|
13
15
|
badge: 'info',
|
|
14
16
|
isFailure: false
|
|
15
17
|
};
|
|
16
18
|
}
|
|
17
|
-
case '
|
|
19
|
+
case 'no-match':
|
|
18
20
|
return {
|
|
19
21
|
label: 'No workflows triggered',
|
|
20
22
|
badge: 'neutral',
|
|
21
23
|
isFailure: false
|
|
22
24
|
};
|
|
23
25
|
case 'failed':
|
|
24
|
-
case 'errored':
|
|
25
26
|
return {
|
|
26
27
|
label: 'Failed',
|
|
27
28
|
badge: 'error',
|
|
28
29
|
isFailure: true
|
|
29
30
|
};
|
|
30
|
-
case '
|
|
31
|
+
case 'evaluating':
|
|
31
32
|
return {
|
|
32
33
|
label: 'Evaluating…',
|
|
33
34
|
badge: 'neutral',
|
|
34
35
|
isFailure: false
|
|
35
36
|
};
|
|
36
|
-
default:
|
|
37
|
-
{
|
|
38
|
-
const _exhaustive = event.outcome;
|
|
39
|
-
return {
|
|
40
|
-
label: 'Unknown',
|
|
41
|
-
badge: 'warning',
|
|
42
|
-
isFailure: false
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
37
|
}
|
|
46
38
|
}
|
|
47
39
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/trigger-event-result.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../src/components/trigger-event-result.ts"],"sourcesContent":["import type {BadgeVariant} from '@shipfox/react-ui/badge';\nimport {getTriggerEventResult, type TriggerEventSummary} from '#core/trigger-event.js';\n\nexport interface TriggerEventResult {\n label: string;\n badge: BadgeVariant;\n isFailure: boolean;\n}\n\n/**\n * Collapses the raw event outcome into the single result an operator cares about:\n * how many workflows it triggered (or that it failed). `routed`/`discarded` are not\n * surfaced as distinct states - both are successfully-processed events that differ\n * only by match count.\n */\nexport function triggerEventResult(\n event: Pick<TriggerEventSummary, 'outcome' | 'matchedCount'>,\n): TriggerEventResult {\n const result = getTriggerEventResult(event);\n switch (result.kind) {\n case 'triggered': {\n const plural = result.matchedWorkflowCount === 1 ? '' : 's';\n return {\n label: `Triggered ${result.matchedWorkflowCount} workflow${plural}`,\n badge: 'info',\n isFailure: false,\n };\n }\n case 'no-match':\n return {label: 'No workflows triggered', badge: 'neutral', isFailure: false};\n case 'failed':\n return {label: 'Failed', badge: 'error', isFailure: true};\n case 'evaluating':\n return {label: 'Evaluating…', badge: 'neutral', isFailure: false};\n }\n}\n"],"names":["getTriggerEventResult","triggerEventResult","event","result","kind","plural","matchedWorkflowCount","label","badge","isFailure"],"mappings":"AACA,SAAQA,qBAAqB,QAAiC,yBAAyB;AAQvF;;;;;CAKC,GACD,OAAO,SAASC,mBACdC,KAA4D;IAE5D,MAAMC,SAASH,sBAAsBE;IACrC,OAAQC,OAAOC,IAAI;QACjB,KAAK;YAAa;gBAChB,MAAMC,SAASF,OAAOG,oBAAoB,KAAK,IAAI,KAAK;gBACxD,OAAO;oBACLC,OAAO,CAAC,UAAU,EAAEJ,OAAOG,oBAAoB,CAAC,SAAS,EAAED,QAAQ;oBACnEG,OAAO;oBACPC,WAAW;gBACb;YACF;QACA,KAAK;YACH,OAAO;gBAACF,OAAO;gBAA0BC,OAAO;gBAAWC,WAAW;YAAK;QAC7E,KAAK;YACH,OAAO;gBAACF,OAAO;gBAAUC,OAAO;gBAASC,WAAW;YAAI;QAC1D,KAAK;YACH,OAAO;gBAACF,OAAO;gBAAeC,OAAO;gBAAWC,WAAW;YAAK;IACpE;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TriggerEventSummary } from '#core/trigger-event.js';
|
|
2
2
|
interface TriggerEventRowProps {
|
|
3
|
-
event:
|
|
3
|
+
event: TriggerEventSummary;
|
|
4
4
|
selected: boolean;
|
|
5
5
|
onSelect: (eventId: string) => void;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-event-row.d.ts","sourceRoot":"","sources":["../../src/components/trigger-event-row.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"trigger-event-row.d.ts","sourceRoot":"","sources":["../../src/components/trigger-event-row.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;AAIhE,UAAU,oBAAoB;IAC5B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,eAAe,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAC,EAAE,oBAAoB,+BA6DhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/trigger-event-row.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../src/components/trigger-event-row.tsx"],"sourcesContent":["import {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {TableCell, TableRow} from '@shipfox/react-ui/table';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport type {MouseEvent} from 'react';\nimport type {TriggerEventSummary} from '#core/trigger-event.js';\nimport {triggerEventResult} from './trigger-event-result.js';\nimport {TriggerSourceIcon} from './trigger-source-icon.js';\n\ninterface TriggerEventRowProps {\n event: TriggerEventSummary;\n selected: boolean;\n onSelect: (eventId: string) => void;\n}\n\nexport function TriggerEventRow({event, selected, onSelect}: TriggerEventRowProps) {\n const result = triggerEventResult(event);\n const eventLabel = triggerEventDisplayLabel(event);\n const fullEventLabel = triggerEventFullLabel(event);\n\n function handleRowClick(clickEvent: MouseEvent<HTMLTableRowElement>) {\n const target = clickEvent.target;\n if (target instanceof HTMLElement && target.closest('button,a')) return;\n onSelect(event.id);\n }\n\n return (\n <TableRow\n data-selected={selected ? 'true' : undefined}\n className=\"cursor-pointer\"\n onClick={handleRowClick}\n >\n <TableCell>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n className=\"flex min-w-0 items-center gap-6 rounded-6 text-left outline-none focus-visible:shadow-button-neutral-focus\"\n onClick={() => onSelect(event.id)}\n aria-label={`Open details for ${fullEventLabel}`}\n >\n <TriggerSourceIcon\n provider={event.provider}\n source={event.source}\n aria-hidden=\"true\"\n className=\"size-16 shrink-0 text-foreground-neutral-muted\"\n />\n <Code as=\"span\" variant=\"label\" className=\"truncate text-foreground-neutral-base\">\n {eventLabel}\n </Code>\n </button>\n </TooltipTrigger>\n <TooltipContent>\n <Code as=\"span\" variant=\"label\" className=\"block max-w-[360px] break-words\">\n {fullEventLabel}\n </Code>\n </TooltipContent>\n </Tooltip>\n </TableCell>\n <TableCell>\n <Text\n size=\"sm\"\n className={cn(\n result.isFailure ? 'text-foreground-highlight-error' : 'text-foreground-neutral-subtle',\n )}\n >\n {result.label}\n </Text>\n </TableCell>\n <TableCell className=\"text-right\">\n <Code as=\"span\" variant=\"label\" className=\"text-foreground-neutral-muted\">\n <RelativeTime value={event.receivedAt} />\n </Code>\n </TableCell>\n </TableRow>\n );\n}\n\nfunction triggerEventDisplayLabel(event: Pick<TriggerEventSummary, 'event' | 'source'>) {\n return event.event || event.source;\n}\n\nfunction triggerEventFullLabel(event: Pick<TriggerEventSummary, 'event' | 'source'>) {\n return [event.source, event.event].filter(Boolean).join(' · ');\n}\n"],"names":["RelativeTime","TableCell","TableRow","Tooltip","TooltipContent","TooltipTrigger","Code","Text","cn","triggerEventResult","TriggerSourceIcon","TriggerEventRow","event","selected","onSelect","result","eventLabel","triggerEventDisplayLabel","fullEventLabel","triggerEventFullLabel","handleRowClick","clickEvent","target","HTMLElement","closest","id","data-selected","undefined","className","onClick","asChild","button","type","aria-label","provider","source","aria-hidden","as","variant","size","isFailure","label","value","receivedAt","filter","Boolean","join"],"mappings":";AAAA,SAAQA,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,SAAS,EAAEC,QAAQ,QAAO,0BAA0B;AAC5D,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,EAAEC,IAAI,QAAO,+BAA+B;AACxD,SAAQC,EAAE,QAAO,0BAA0B;AAG3C,SAAQC,kBAAkB,QAAO,4BAA4B;AAC7D,SAAQC,iBAAiB,QAAO,2BAA2B;AAQ3D,OAAO,SAASC,gBAAgB,EAACC,KAAK,EAAEC,QAAQ,EAAEC,QAAQ,EAAuB;IAC/E,MAAMC,SAASN,mBAAmBG;IAClC,MAAMI,aAAaC,yBAAyBL;IAC5C,MAAMM,iBAAiBC,sBAAsBP;IAE7C,SAASQ,eAAeC,UAA2C;QACjE,MAAMC,SAASD,WAAWC,MAAM;QAChC,IAAIA,kBAAkBC,eAAeD,OAAOE,OAAO,CAAC,aAAa;QACjEV,SAASF,MAAMa,EAAE;IACnB;IAEA,qBACE,MAACvB;QACCwB,iBAAeb,WAAW,SAASc;QACnCC,WAAU;QACVC,SAAST;;0BAET,KAACnB;0BACC,cAAA,MAACE;;sCACC,KAACE;4BAAeyB,OAAO;sCACrB,cAAA,MAACC;gCACCC,MAAK;gCACLJ,WAAU;gCACVC,SAAS,IAAMf,SAASF,MAAMa,EAAE;gCAChCQ,cAAY,CAAC,iBAAiB,EAAEf,gBAAgB;;kDAEhD,KAACR;wCACCwB,UAAUtB,MAAMsB,QAAQ;wCACxBC,QAAQvB,MAAMuB,MAAM;wCACpBC,eAAY;wCACZR,WAAU;;kDAEZ,KAACtB;wCAAK+B,IAAG;wCAAOC,SAAQ;wCAAQV,WAAU;kDACvCZ;;;;;sCAIP,KAACZ;sCACC,cAAA,KAACE;gCAAK+B,IAAG;gCAAOC,SAAQ;gCAAQV,WAAU;0CACvCV;;;;;;0BAKT,KAACjB;0BACC,cAAA,KAACM;oBACCgC,MAAK;oBACLX,WAAWpB,GACTO,OAAOyB,SAAS,GAAG,oCAAoC;8BAGxDzB,OAAO0B,KAAK;;;0BAGjB,KAACxC;gBAAU2B,WAAU;0BACnB,cAAA,KAACtB;oBAAK+B,IAAG;oBAAOC,SAAQ;oBAAQV,WAAU;8BACxC,cAAA,KAAC5B;wBAAa0C,OAAO9B,MAAM+B,UAAU;;;;;;AAK/C;AAEA,SAAS1B,yBAAyBL,KAAoD;IACpF,OAAOA,MAAMA,KAAK,IAAIA,MAAMuB,MAAM;AACpC;AAEA,SAAShB,sBAAsBP,KAAoD;IACjF,OAAO;QAACA,MAAMuB,MAAM;QAAEvB,MAAMA,KAAK;KAAC,CAACgC,MAAM,CAACC,SAASC,IAAI,CAAC;AAC1D"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { Icon, type IconName } from '@shipfox/react-ui/icon';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
|
+
import type { TriggerEventSource } from '#core/trigger-event.js';
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
5
|
+
* Stable presentation seam for trigger-source icons. System sources have
|
|
6
|
+
* first-class icons; integration sources delegate to the shared provider
|
|
7
|
+
* catalog so a new provider's icon shows up here without a second edit.
|
|
6
8
|
*/
|
|
7
9
|
export declare function getTriggerSourceIcon({ provider, source, }: {
|
|
8
|
-
provider
|
|
9
|
-
source
|
|
10
|
+
provider?: TriggerEventSource['provider'] | undefined;
|
|
11
|
+
source?: TriggerEventSource['source'] | undefined;
|
|
10
12
|
}): IconName;
|
|
11
13
|
export interface TriggerSourceIconProps extends Omit<ComponentProps<typeof Icon>, 'name'> {
|
|
12
|
-
provider
|
|
13
|
-
source
|
|
14
|
+
provider?: TriggerEventSource['provider'] | undefined;
|
|
15
|
+
source?: TriggerEventSource['source'] | undefined;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Preserves the base icon props so callers can decide whether the glyph is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-source-icon.d.ts","sourceRoot":"","sources":["../../src/components/trigger-source-icon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAE,KAAK,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"trigger-source-icon.d.ts","sourceRoot":"","sources":["../../src/components/trigger-source-icon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAE,KAAK,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAO/D;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;IACtD,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;CACnD,GAAG,QAAQ,CAGX;AAED,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,MAAM,CAAC;IACvF,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;IACtD,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;CACnD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAC,EAAE,sBAAsB,+BAErF"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getIntegrationIcon } from '@shipfox/
|
|
2
|
+
import { getIntegrationIcon } from '@shipfox/integration-icons';
|
|
3
3
|
import { Icon } from '@shipfox/react-ui/icon';
|
|
4
4
|
const SYSTEM_TRIGGER_SOURCE_ICONS = {
|
|
5
5
|
manual: 'cursorLine',
|
|
6
6
|
cron: 'timeLine'
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Stable presentation seam for trigger-source icons. System sources have
|
|
10
|
+
* first-class icons; integration sources delegate to the shared provider
|
|
11
|
+
* catalog so a new provider's icon shows up here without a second edit.
|
|
11
12
|
*/ export function getTriggerSourceIcon({ provider, source }) {
|
|
12
13
|
const systemIcon = source ? SYSTEM_TRIGGER_SOURCE_ICONS[source] : undefined;
|
|
13
14
|
return systemIcon ?? getIntegrationIcon(provider);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/trigger-source-icon.tsx"],"sourcesContent":["import {getIntegrationIcon} from '@shipfox/
|
|
1
|
+
{"version":3,"sources":["../../src/components/trigger-source-icon.tsx"],"sourcesContent":["import {getIntegrationIcon} from '@shipfox/integration-icons';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport type {ComponentProps} from 'react';\nimport type {TriggerEventSource} from '#core/trigger-event.js';\n\nconst SYSTEM_TRIGGER_SOURCE_ICONS: Record<string, IconName> = {\n manual: 'cursorLine',\n cron: 'timeLine',\n};\n\n/**\n * Stable presentation seam for trigger-source icons. System sources have\n * first-class icons; integration sources delegate to the shared provider\n * catalog so a new provider's icon shows up here without a second edit.\n */\nexport function getTriggerSourceIcon({\n provider,\n source,\n}: {\n provider?: TriggerEventSource['provider'] | undefined;\n source?: TriggerEventSource['source'] | undefined;\n}): IconName {\n const systemIcon = source ? SYSTEM_TRIGGER_SOURCE_ICONS[source] : undefined;\n return systemIcon ?? getIntegrationIcon(provider);\n}\n\nexport interface TriggerSourceIconProps extends Omit<ComponentProps<typeof Icon>, 'name'> {\n provider?: TriggerEventSource['provider'] | undefined;\n source?: TriggerEventSource['source'] | undefined;\n}\n\n/**\n * Preserves the base icon props so callers can decide whether the glyph is\n * decorative or labeled.\n */\nexport function TriggerSourceIcon({provider, source, ...props}: TriggerSourceIconProps) {\n return <Icon name={getTriggerSourceIcon({provider, source})} {...props} />;\n}\n"],"names":["getIntegrationIcon","Icon","SYSTEM_TRIGGER_SOURCE_ICONS","manual","cron","getTriggerSourceIcon","provider","source","systemIcon","undefined","TriggerSourceIcon","props","name"],"mappings":";AAAA,SAAQA,kBAAkB,QAAO,6BAA6B;AAC9D,SAAQC,IAAI,QAAsB,yBAAyB;AAI3D,MAAMC,8BAAwD;IAC5DC,QAAQ;IACRC,MAAM;AACR;AAEA;;;;CAIC,GACD,OAAO,SAASC,qBAAqB,EACnCC,QAAQ,EACRC,MAAM,EAIP;IACC,MAAMC,aAAaD,SAASL,2BAA2B,CAACK,OAAO,GAAGE;IAClE,OAAOD,cAAcR,mBAAmBM;AAC1C;AAOA;;;CAGC,GACD,OAAO,SAASI,kBAAkB,EAACJ,QAAQ,EAAEC,MAAM,EAAE,GAAGI,OAA8B;IACpF,qBAAO,KAACV;QAAKW,MAAMP,qBAAqB;YAACC;YAAUC;QAAM;QAAK,GAAGI,KAAK;;AACxE"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type { TriggerEventFacetsResponseDto, TriggerEventListItemDto } from '@shipfox/api-triggers-dto';
|
|
2
1
|
import type { QueryLoadErrorQuery } from '@shipfox/client-ui';
|
|
3
|
-
import type { TriggerEventFilters } from '#
|
|
2
|
+
import type { TriggerEventFacets, TriggerEventFilters, TriggerEventSummary } from '#core/trigger-event.js';
|
|
4
3
|
export type TriggerEventsListQuery = QueryLoadErrorQuery & {
|
|
5
4
|
isPending: boolean;
|
|
6
5
|
};
|
|
7
6
|
export interface EventsListProps {
|
|
8
|
-
events:
|
|
7
|
+
events: TriggerEventSummary[];
|
|
9
8
|
query: TriggerEventsListQuery;
|
|
10
|
-
facets:
|
|
9
|
+
facets: TriggerEventFacets | undefined;
|
|
11
10
|
filters: TriggerEventFilters;
|
|
12
11
|
onFiltersChange: (patch: Partial<TriggerEventFilters>) => void;
|
|
13
12
|
workspaceId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,GAAG;IAAC,SAAS,EAAE,OAAO,CAAA;CAAC,CAAC;AAEhF,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,KAAK,EAAE,sBAAsB,CAAC;IAC9B,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/types.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../src/components/types.ts"],"sourcesContent":["import type {QueryLoadErrorQuery} from '@shipfox/client-ui';\nimport type {\n TriggerEventFacets,\n TriggerEventFilters,\n TriggerEventSummary,\n} from '#core/trigger-event.js';\n\nexport type TriggerEventsListQuery = QueryLoadErrorQuery & {isPending: boolean};\n\nexport interface EventsListProps {\n events: TriggerEventSummary[];\n query: TriggerEventsListQuery;\n facets: TriggerEventFacets | undefined;\n filters: TriggerEventFilters;\n onFiltersChange: (patch: Partial<TriggerEventFilters>) => void;\n workspaceId: string;\n hasNextPage: boolean;\n isFetchingNextPage: boolean;\n onLoadMore: () => void;\n selectedEventId?: string | undefined;\n onSelectEvent: (eventId: string) => void;\n}\n"],"names":[],"mappings":"AASA,WAYC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export type TriggerEventOrigin = 'integration' | 'manual' | 'cron';
|
|
2
|
+
export type TriggerEventOutcome = 'received' | 'routed' | 'discarded' | 'failed' | 'errored';
|
|
3
|
+
export declare const triggerEventOutcomes: readonly ["received", "routed", "discarded", "failed", "errored"];
|
|
4
|
+
export type TriggerEventDecisionOutcome = 'triggered' | 'filter-error' | 'dispatch-error';
|
|
5
|
+
export interface TriggerEventSource {
|
|
6
|
+
provider: string | null;
|
|
7
|
+
source: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TriggerEventSummary extends TriggerEventSource {
|
|
10
|
+
id: string;
|
|
11
|
+
eventRef: string;
|
|
12
|
+
origin: TriggerEventOrigin;
|
|
13
|
+
workspaceId: string;
|
|
14
|
+
event: string;
|
|
15
|
+
deliveryId: string | null;
|
|
16
|
+
connectionId: string | null;
|
|
17
|
+
outcome: TriggerEventOutcome;
|
|
18
|
+
matchedCount: number;
|
|
19
|
+
receivedAt: string;
|
|
20
|
+
processedAt: string | null;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
}
|
|
23
|
+
export interface TriggerEventMatchedWorkflowResult {
|
|
24
|
+
id: string;
|
|
25
|
+
subscriptionName: string;
|
|
26
|
+
decision: TriggerEventDecisionOutcome;
|
|
27
|
+
projectId: string | null;
|
|
28
|
+
runId: string | null;
|
|
29
|
+
runName: string | null;
|
|
30
|
+
reason: string | null;
|
|
31
|
+
}
|
|
32
|
+
export interface TriggerEventDetail extends TriggerEventSummary {
|
|
33
|
+
connectionName: string | null;
|
|
34
|
+
payload: Record<string, unknown> | null;
|
|
35
|
+
decisions: TriggerEventMatchedWorkflowResult[];
|
|
36
|
+
}
|
|
37
|
+
export interface TriggerEventFacetItem {
|
|
38
|
+
value: string;
|
|
39
|
+
count: number;
|
|
40
|
+
}
|
|
41
|
+
export interface TriggerEventFacets {
|
|
42
|
+
sources: TriggerEventFacetItem[];
|
|
43
|
+
events: TriggerEventFacetItem[];
|
|
44
|
+
}
|
|
45
|
+
export interface TriggerEventListPage {
|
|
46
|
+
events: TriggerEventSummary[];
|
|
47
|
+
nextCursor: string | null;
|
|
48
|
+
}
|
|
49
|
+
export interface TriggerEventFilters {
|
|
50
|
+
source?: string[] | undefined;
|
|
51
|
+
event?: string[] | undefined;
|
|
52
|
+
outcome?: TriggerEventOutcome[] | undefined;
|
|
53
|
+
from?: string | undefined;
|
|
54
|
+
to?: string | undefined;
|
|
55
|
+
}
|
|
56
|
+
export declare function normalizeTriggerEventFilterValues(values: readonly string[] | undefined): string[] | null;
|
|
57
|
+
export declare function normalizeTriggerEventFilters(filters: TriggerEventFilters): {
|
|
58
|
+
source: string[] | null;
|
|
59
|
+
event: string[] | null;
|
|
60
|
+
outcome: string[] | null;
|
|
61
|
+
from: string | null;
|
|
62
|
+
to: string | null;
|
|
63
|
+
};
|
|
64
|
+
export declare function hasTriggerEventFilters(filters: TriggerEventFilters): boolean;
|
|
65
|
+
export type TriggerEventResultKind = 'triggered' | 'no-match' | 'failed' | 'evaluating';
|
|
66
|
+
export interface TriggerEventResult {
|
|
67
|
+
kind: TriggerEventResultKind;
|
|
68
|
+
matchedWorkflowCount: number;
|
|
69
|
+
isFailure: boolean;
|
|
70
|
+
}
|
|
71
|
+
export declare function getTriggerEventResult(event: Pick<TriggerEventSummary, 'outcome' | 'matchedCount'>): TriggerEventResult;
|
|
72
|
+
export declare const triggerEventResultFilterOutcomes: {
|
|
73
|
+
readonly triggered: readonly ["routed"];
|
|
74
|
+
readonly 'no-match': readonly ["discarded"];
|
|
75
|
+
readonly failed: readonly ["failed", "errored"];
|
|
76
|
+
readonly evaluating: readonly ["received"];
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=trigger-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger-event.d.ts","sourceRoot":"","sources":["../../src/core/trigger-event.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEnE,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE7F,eAAO,MAAM,oBAAoB,mEAMkB,CAAC;AAEpD,MAAM,MAAM,2BAA2B,GAAG,WAAW,GAAG,cAAc,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
+
export function normalizeTriggerEventFilterValues(values) {
|
|
9
|
+
return values && values.length > 0 ? [
|
|
10
|
+
...new Set(values)
|
|
11
|
+
].sort() : null;
|
|
12
|
+
}
|
|
13
|
+
export function normalizeTriggerEventFilters(filters) {
|
|
14
|
+
return {
|
|
15
|
+
source: normalizeTriggerEventFilterValues(filters.source),
|
|
16
|
+
event: normalizeTriggerEventFilterValues(filters.event),
|
|
17
|
+
outcome: normalizeTriggerEventFilterValues(filters.outcome),
|
|
18
|
+
from: filters.from ?? null,
|
|
19
|
+
to: filters.to ?? null
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export function hasTriggerEventFilters(filters) {
|
|
23
|
+
const normalized = normalizeTriggerEventFilters(filters);
|
|
24
|
+
return Boolean(normalized.source || normalized.event || normalized.outcome || normalized.from || normalized.to);
|
|
25
|
+
}
|
|
26
|
+
export function getTriggerEventResult(event) {
|
|
27
|
+
switch(event.outcome){
|
|
28
|
+
case 'routed':
|
|
29
|
+
return {
|
|
30
|
+
kind: 'triggered',
|
|
31
|
+
matchedWorkflowCount: event.matchedCount,
|
|
32
|
+
isFailure: false
|
|
33
|
+
};
|
|
34
|
+
case 'discarded':
|
|
35
|
+
return {
|
|
36
|
+
kind: 'no-match',
|
|
37
|
+
matchedWorkflowCount: 0,
|
|
38
|
+
isFailure: false
|
|
39
|
+
};
|
|
40
|
+
case 'failed':
|
|
41
|
+
case 'errored':
|
|
42
|
+
return {
|
|
43
|
+
kind: 'failed',
|
|
44
|
+
matchedWorkflowCount: event.matchedCount,
|
|
45
|
+
isFailure: true
|
|
46
|
+
};
|
|
47
|
+
case 'received':
|
|
48
|
+
return {
|
|
49
|
+
kind: 'evaluating',
|
|
50
|
+
matchedWorkflowCount: 0,
|
|
51
|
+
isFailure: false
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export const triggerEventResultFilterOutcomes = {
|
|
56
|
+
triggered: [
|
|
57
|
+
'routed'
|
|
58
|
+
],
|
|
59
|
+
'no-match': [
|
|
60
|
+
'discarded'
|
|
61
|
+
],
|
|
62
|
+
failed: [
|
|
63
|
+
'failed',
|
|
64
|
+
'errored'
|
|
65
|
+
],
|
|
66
|
+
evaluating: [
|
|
67
|
+
'received'
|
|
68
|
+
]
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=trigger-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/core/trigger-event.ts"],"sourcesContent":["export type TriggerEventOrigin = 'integration' | 'manual' | 'cron';\n\nexport type TriggerEventOutcome = 'received' | 'routed' | 'discarded' | 'failed' | 'errored';\n\nexport const triggerEventOutcomes = [\n 'received',\n 'routed',\n 'discarded',\n 'failed',\n 'errored',\n] as const satisfies readonly TriggerEventOutcome[];\n\nexport type TriggerEventDecisionOutcome = 'triggered' | 'filter-error' | 'dispatch-error';\n\nexport interface TriggerEventSource {\n provider: string | null;\n source: string;\n}\n\nexport interface TriggerEventSummary extends TriggerEventSource {\n id: string;\n eventRef: string;\n origin: TriggerEventOrigin;\n workspaceId: string;\n event: string;\n deliveryId: string | null;\n connectionId: string | null;\n outcome: TriggerEventOutcome;\n matchedCount: number;\n receivedAt: string;\n processedAt: string | null;\n createdAt: string;\n}\n\nexport interface TriggerEventMatchedWorkflowResult {\n id: string;\n subscriptionName: string;\n decision: TriggerEventDecisionOutcome;\n projectId: string | null;\n runId: string | null;\n runName: string | null;\n reason: string | null;\n}\n\nexport interface TriggerEventDetail extends TriggerEventSummary {\n connectionName: string | null;\n payload: Record<string, unknown> | null;\n decisions: TriggerEventMatchedWorkflowResult[];\n}\n\nexport interface TriggerEventFacetItem {\n value: string;\n count: number;\n}\n\nexport interface TriggerEventFacets {\n sources: TriggerEventFacetItem[];\n events: TriggerEventFacetItem[];\n}\n\nexport interface TriggerEventListPage {\n events: TriggerEventSummary[];\n nextCursor: string | null;\n}\n\nexport interface TriggerEventFilters {\n source?: string[] | undefined;\n event?: string[] | undefined;\n outcome?: TriggerEventOutcome[] | undefined;\n from?: string | undefined;\n to?: string | undefined;\n}\n\nexport function normalizeTriggerEventFilterValues(\n values: readonly string[] | undefined,\n): string[] | null {\n return values && values.length > 0 ? [...new Set(values)].sort() : null;\n}\n\nexport function normalizeTriggerEventFilters(filters: TriggerEventFilters) {\n return {\n source: normalizeTriggerEventFilterValues(filters.source),\n event: normalizeTriggerEventFilterValues(filters.event),\n outcome: normalizeTriggerEventFilterValues(filters.outcome),\n from: filters.from ?? null,\n to: filters.to ?? null,\n };\n}\n\nexport function hasTriggerEventFilters(filters: TriggerEventFilters): boolean {\n const normalized = normalizeTriggerEventFilters(filters);\n return Boolean(\n normalized.source || normalized.event || normalized.outcome || normalized.from || normalized.to,\n );\n}\n\nexport type TriggerEventResultKind = 'triggered' | 'no-match' | 'failed' | 'evaluating';\n\nexport interface TriggerEventResult {\n kind: TriggerEventResultKind;\n matchedWorkflowCount: number;\n isFailure: boolean;\n}\n\nexport function getTriggerEventResult(\n event: Pick<TriggerEventSummary, 'outcome' | 'matchedCount'>,\n): TriggerEventResult {\n switch (event.outcome) {\n case 'routed':\n return {kind: 'triggered', matchedWorkflowCount: event.matchedCount, isFailure: false};\n case 'discarded':\n return {kind: 'no-match', matchedWorkflowCount: 0, isFailure: false};\n case 'failed':\n case 'errored':\n return {kind: 'failed', matchedWorkflowCount: event.matchedCount, isFailure: true};\n case 'received':\n return {kind: 'evaluating', matchedWorkflowCount: 0, isFailure: false};\n }\n}\n\nexport const triggerEventResultFilterOutcomes = {\n triggered: ['routed'],\n 'no-match': ['discarded'],\n failed: ['failed', 'errored'],\n evaluating: ['received'],\n} as const satisfies Record<TriggerEventResultKind, readonly TriggerEventOutcome[]>;\n"],"names":["triggerEventOutcomes","normalizeTriggerEventFilterValues","values","length","Set","sort","normalizeTriggerEventFilters","filters","source","event","outcome","from","to","hasTriggerEventFilters","normalized","Boolean","getTriggerEventResult","kind","matchedWorkflowCount","matchedCount","isFailure","triggerEventResultFilter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GED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export declare const triggersSettingsSections: readonly [{
|
|
2
|
+
readonly id: "settings.events";
|
|
3
|
+
readonly pathSegment: "events";
|
|
4
|
+
readonly label: "Events";
|
|
5
|
+
readonly icon: "pulseLine";
|
|
6
|
+
readonly order: 800;
|
|
7
|
+
}];
|
|
1
8
|
export declare const triggersFeature: {
|
|
2
9
|
readonly id: "shipfox.triggers";
|
|
3
10
|
readonly routes: readonly [{
|
package/dist/feature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../src/feature.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../src/feature.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB;;;;;;EAEe,CAAC;AAErD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;CAU1B,CAAC"}
|
package/dist/feature.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { defineClientFeature } from '@shipfox/client-shell';
|
|
2
|
+
export const triggersSettingsSections = [
|
|
3
|
+
{
|
|
4
|
+
id: 'settings.events',
|
|
5
|
+
pathSegment: 'events',
|
|
6
|
+
label: 'Events',
|
|
7
|
+
icon: 'pulseLine',
|
|
8
|
+
order: 800
|
|
9
|
+
}
|
|
10
|
+
];
|
|
2
11
|
export const triggersFeature = defineClientFeature({
|
|
3
12
|
id: 'shipfox.triggers',
|
|
4
13
|
routes: [
|
|
@@ -8,15 +17,7 @@ export const triggersFeature = defineClientFeature({
|
|
|
8
17
|
impl: '@shipfox/client-triggers/routes/events-settings'
|
|
9
18
|
}
|
|
10
19
|
],
|
|
11
|
-
settingsSections:
|
|
12
|
-
{
|
|
13
|
-
id: 'settings.events',
|
|
14
|
-
pathSegment: 'events',
|
|
15
|
-
label: 'Events',
|
|
16
|
-
icon: 'pulseLine',
|
|
17
|
-
order: 800
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
+
settingsSections: triggersSettingsSections
|
|
20
21
|
});
|
|
21
22
|
|
|
22
23
|
//# sourceMappingURL=feature.js.map
|
package/dist/feature.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/feature.ts"],"sourcesContent":["import {defineClientFeature} from '@shipfox/client-shell';\n\nexport const triggersFeature = defineClientFeature({\n id: 'shipfox.triggers',\n routes: [\n {\n path: '/workspaces/$wid/settings/events',\n parent: 'workspaceSettings',\n impl: '@shipfox/client-triggers/routes/events-settings',\n },\n ],\n settingsSections:
|
|
1
|
+
{"version":3,"sources":["../src/feature.ts"],"sourcesContent":["import {defineClientFeature, type SettingsSectionEntry} from '@shipfox/client-shell';\n\nexport const triggersSettingsSections = [\n {id: 'settings.events', pathSegment: 'events', label: 'Events', icon: 'pulseLine', order: 800},\n] as const satisfies readonly SettingsSectionEntry[];\n\nexport const triggersFeature = defineClientFeature({\n id: 'shipfox.triggers',\n routes: [\n {\n path: '/workspaces/$wid/settings/events',\n parent: 'workspaceSettings',\n impl: '@shipfox/client-triggers/routes/events-settings',\n },\n ],\n settingsSections: triggersSettingsSections,\n});\n"],"names":["defineClientFeature","triggersSettingsSections","id","pathSegment","label","icon","order","triggersFeature","routes","path","parent","impl","settingsSections"],"mappings":"AAAA,SAAQA,mBAAmB,QAAkC,wBAAwB;AAErF,OAAO,MAAMC,2BAA2B;IACtC;QAACC,IAAI;QAAmBC,aAAa;QAAUC,OAAO;QAAUC,MAAM;QAAaC,OAAO;IAAG;CAC9F,CAAoD;AAErD,OAAO,MAAMC,kBAAkBP,oBAAoB;IACjDE,IAAI;IACJM,QAAQ;QACN;YACEC,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;KACD;IACDC,kBAAkBX;AACpB,GAAG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TriggerEventDetailResponseDto, TriggerEventFacetsResponseDto, TriggerEventListItemDto, TriggerEventListResponseDto } from '@shipfox/api-triggers-dto';
|
|
2
|
+
import type { TriggerEventDetail, TriggerEventFacets, TriggerEventListPage, TriggerEventSummary } from '#core/trigger-event.js';
|
|
3
|
+
export declare function toTriggerEventSummary(event: TriggerEventListItemDto): TriggerEventSummary;
|
|
4
|
+
export declare function toTriggerEventListPage(response: TriggerEventListResponseDto): TriggerEventListPage;
|
|
5
|
+
export declare function toTriggerEventDetail(response: TriggerEventDetailResponseDto): TriggerEventDetail;
|
|
6
|
+
export declare function toTriggerEventFacets(response: TriggerEventFacetsResponseDto): TriggerEventFacets;
|
|
7
|
+
//# sourceMappingURL=trigger-event-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger-event-mapper.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/trigger-event-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,6BAA6B,EAE7B,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,kBAAkB,EAElB,kBAAkB,EAClB,oBAAoB,EAEpB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,uBAAuB,GAAG,mBAAmB,CAiBzF;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,2BAA2B,GACpC,oBAAoB,CAKtB;AAcD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,6BAA6B,GAAG,kBAAkB,CAOhG;AAMD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,6BAA6B,GAAG,kBAAkB,CAKhG"}
|