@shipfox/api-integration-jira-dto 12.2.0 → 14.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +13 -0
- package/dist/event-catalog.d.ts +35 -0
- package/dist/event-catalog.d.ts.map +1 -0
- package/dist/event-catalog.js +37 -0
- package/dist/event-catalog.js.map +1 -0
- 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/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/event-catalog.test.ts +7 -0
- package/src/event-catalog.ts +44 -0
- package/src/index.ts +1 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/api-integration-jira-dto",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "14.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/ShipfoxHQ/shipfox.git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"zod": "^4.4.3",
|
|
22
|
-
"@shipfox/api-integration-core-dto": "
|
|
22
|
+
"@shipfox/api-integration-core-dto": "14.0.0"
|
|
23
23
|
},
|
|
24
24
|
"imports": {
|
|
25
25
|
"#*": "./dist/*"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {jiraEventCatalog, jiraWebhookEventNames} from './index.js';
|
|
2
|
+
|
|
3
|
+
describe('jiraEventCatalog', () => {
|
|
4
|
+
it('lists exactly the event names the webhook handler accepts', () => {
|
|
5
|
+
expect(jiraEventCatalog.events.map((event) => event.name)).toEqual([...jiraWebhookEventNames]);
|
|
6
|
+
});
|
|
7
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type {IntegrationEventCatalog} from '@shipfox/api-integration-core-dto';
|
|
2
|
+
import {jiraWebhookEventNames} from './schemas/index.js';
|
|
3
|
+
|
|
4
|
+
const eventDetails = {
|
|
5
|
+
'jira:issue_created': {
|
|
6
|
+
summary: 'A Jira issue is created.',
|
|
7
|
+
emittedWhen: 'Jira sends an issue-created webhook.',
|
|
8
|
+
},
|
|
9
|
+
'jira:issue_updated': {
|
|
10
|
+
summary: 'A Jira issue changes.',
|
|
11
|
+
emittedWhen: 'Jira sends an issue-updated webhook.',
|
|
12
|
+
},
|
|
13
|
+
'jira:issue_deleted': {
|
|
14
|
+
summary: 'A Jira issue is deleted.',
|
|
15
|
+
emittedWhen: 'Jira sends an issue-deleted webhook.',
|
|
16
|
+
},
|
|
17
|
+
comment_created: {
|
|
18
|
+
summary: 'A comment is added to a Jira issue.',
|
|
19
|
+
emittedWhen: 'Jira sends a comment-created webhook.',
|
|
20
|
+
},
|
|
21
|
+
comment_updated: {
|
|
22
|
+
summary: 'A comment on a Jira issue changes.',
|
|
23
|
+
emittedWhen: 'Jira sends a comment-updated webhook.',
|
|
24
|
+
},
|
|
25
|
+
comment_deleted: {
|
|
26
|
+
summary: 'A comment is deleted from a Jira issue.',
|
|
27
|
+
emittedWhen: 'Jira sends a comment-deleted webhook.',
|
|
28
|
+
},
|
|
29
|
+
} as const satisfies Record<
|
|
30
|
+
(typeof jiraWebhookEventNames)[number],
|
|
31
|
+
{
|
|
32
|
+
summary: string;
|
|
33
|
+
emittedWhen: string;
|
|
34
|
+
}
|
|
35
|
+
>;
|
|
36
|
+
|
|
37
|
+
export const jiraEventCatalog = {
|
|
38
|
+
provider: 'Jira',
|
|
39
|
+
events: jiraWebhookEventNames.map((name) => ({
|
|
40
|
+
name,
|
|
41
|
+
...eventDetails[name],
|
|
42
|
+
payloadKind: 'shipfox-normalized' as const,
|
|
43
|
+
})),
|
|
44
|
+
} as const satisfies IntegrationEventCatalog;
|
package/src/index.ts
CHANGED