@shipfox/api-integration-gitea-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 +10 -0
- package/dist/event-catalog.d.ts.map +1 -0
- package/dist/event-catalog.js +17 -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/schemas/webhooks.d.ts +1 -0
- package/dist/schemas/webhooks.d.ts.map +1 -1
- package/dist/schemas/webhooks.js +3 -0
- package/dist/schemas/webhooks.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/event-catalog.test.ts +9 -0
- package/src/event-catalog.ts +24 -0
- package/src/index.ts +1 -0
- package/src/schemas/webhooks.ts +2 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/api-integration-gitea-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,9 @@
|
|
|
1
|
+
import {giteaEventCatalog, giteaWebhookEventNames} from './index.js';
|
|
2
|
+
|
|
3
|
+
describe('giteaEventCatalog', () => {
|
|
4
|
+
it('lists exactly the event names the webhook handler accepts', () => {
|
|
5
|
+
expect(giteaEventCatalog.events.map((event) => event.name)).toEqual([
|
|
6
|
+
...giteaWebhookEventNames,
|
|
7
|
+
]);
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type {IntegrationEventCatalog} from '@shipfox/api-integration-core-dto';
|
|
2
|
+
import {giteaWebhookEventNames} from './schemas/index.js';
|
|
3
|
+
|
|
4
|
+
const eventDetails = {
|
|
5
|
+
push: {
|
|
6
|
+
summary: 'A Gitea repository receives one or more commits.',
|
|
7
|
+
emittedWhen: 'Gitea sends a push webhook for the connected organization.',
|
|
8
|
+
},
|
|
9
|
+
} as const satisfies Record<
|
|
10
|
+
(typeof giteaWebhookEventNames)[number],
|
|
11
|
+
{
|
|
12
|
+
summary: string;
|
|
13
|
+
emittedWhen: string;
|
|
14
|
+
}
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
export const giteaEventCatalog = {
|
|
18
|
+
provider: 'Gitea',
|
|
19
|
+
events: giteaWebhookEventNames.map((name) => ({
|
|
20
|
+
name,
|
|
21
|
+
...eventDetails[name],
|
|
22
|
+
payloadKind: 'raw-provider' as const,
|
|
23
|
+
})),
|
|
24
|
+
} as const satisfies IntegrationEventCatalog;
|
package/src/index.ts
CHANGED