@shipfox/api-integration-webhook-dto 2.0.0 → 3.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 +11 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +11 -0
- package/dist/constants.js.map +1 -0
- package/dist/event-catalog.d.ts +10 -0
- package/dist/event-catalog.d.ts.map +1 -0
- package/dist/event-catalog.js +14 -0
- package/dist/event-catalog.js.map +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/constants.ts +3 -0
- package/src/event-catalog.ts +14 -0
- package/src/index.ts +8 -3
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled:
|
|
2
|
+
Successfully compiled: 3 files with swc (289.24ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @shipfox/api-integration-webhook-dto
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6b23868: Adds provider event and GitHub agent-tool catalogs for generated integration reference documentation.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [6b23868]
|
|
12
|
+
- @shipfox/api-integration-core-dto@3.0.0
|
|
13
|
+
|
|
3
14
|
## 2.0.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,SAAkB,CAAC;AACnD,eAAO,MAAM,sBAAsB,EAAG,UAAmB,CAAC;AAC1D,eAAO,MAAM,sBAAsB,0DAA2D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const WEBHOOK_PROVIDER = 'webhook' as const;\nexport const WEBHOOK_RECEIVED_EVENT = 'received' as const;\nexport const WEBHOOK_RESERVED_SLUGS = ['github', 'gitea', 'sentry', 'manual', 'cron'] as const;\n"],"names":["WEBHOOK_PROVIDER","WEBHOOK_RECEIVED_EVENT","WEBHOOK_RESERVED_SLUGS"],"mappings":"AAAA,OAAO,MAAMA,mBAAmB,UAAmB;AACnD,OAAO,MAAMC,yBAAyB,WAAoB;AAC1D,OAAO,MAAMC,yBAAyB;IAAC;IAAU;IAAS;IAAU;IAAU;CAAO,CAAU"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const webhookEventCatalog: {
|
|
2
|
+
readonly provider: "Custom webhook";
|
|
3
|
+
readonly events: readonly [{
|
|
4
|
+
readonly name: "received";
|
|
5
|
+
readonly summary: "A custom webhook request is accepted.";
|
|
6
|
+
readonly emittedWhen: "Shipfox accepts a request at the integration connection ingest URL.";
|
|
7
|
+
readonly payloadKind: "shipfox-normalized";
|
|
8
|
+
}];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=event-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-catalog.d.ts","sourceRoot":"","sources":["../src/event-catalog.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;;;;;;;;CAUY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WEBHOOK_RECEIVED_EVENT } from './constants.js';
|
|
2
|
+
export const webhookEventCatalog = {
|
|
3
|
+
provider: 'Custom webhook',
|
|
4
|
+
events: [
|
|
5
|
+
{
|
|
6
|
+
name: WEBHOOK_RECEIVED_EVENT,
|
|
7
|
+
summary: 'A custom webhook request is accepted.',
|
|
8
|
+
emittedWhen: 'Shipfox accepts a request at the integration connection ingest URL.',
|
|
9
|
+
payloadKind: 'shipfox-normalized'
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=event-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/event-catalog.ts"],"sourcesContent":["import type {IntegrationEventCatalog} from '@shipfox/api-integration-core-dto';\nimport {WEBHOOK_RECEIVED_EVENT} from './constants.js';\n\nexport const webhookEventCatalog = {\n provider: 'Custom webhook',\n events: [\n {\n name: WEBHOOK_RECEIVED_EVENT,\n summary: 'A custom webhook request is accepted.',\n emittedWhen: 'Shipfox accepts a request at the integration connection ingest URL.',\n payloadKind: 'shipfox-normalized',\n },\n ],\n} as const satisfies IntegrationEventCatalog;\n"],"names":["WEBHOOK_RECEIVED_EVENT","webhookEventCatalog","provider","events","name","summary","emittedWhen","payloadKind"],"mappings":"AACA,SAAQA,sBAAsB,QAAO,iBAAiB;AAEtD,OAAO,MAAMC,sBAAsB;IACjCC,UAAU;IACVC,QAAQ;QACN;YACEC,MAAMJ;YACNK,SAAS;YACTC,aAAa;YACbC,aAAa;QACf;KACD;AACH,EAA6C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
export * from './event-catalog.js';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
export
|
|
3
|
-
export declare const WEBHOOK_RECEIVED_EVENT: "received";
|
|
4
|
-
export declare const WEBHOOK_RESERVED_SLUGS: readonly ["github", "gitea", "sentry", "manual", "cron"];
|
|
3
|
+
export { WEBHOOK_PROVIDER, WEBHOOK_RECEIVED_EVENT, WEBHOOK_RESERVED_SLUGS, } from './constants.js';
|
|
5
4
|
export declare const webhookSlugSchema: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
6
5
|
export declare const createWebhookConnectionBodySchema: z.ZodObject<{
|
|
7
6
|
workspace_id: z.ZodString;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAIxB,eAAO,MAAM,iBAAiB,qCAK1B,CAAC;AAEL,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE/F,eAAO,MAAM,iCAAiC;;;;;iBAE5C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE/F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;iBASrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,iCAAiC;;iBAE5C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE/F,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;iBAE/C,CAAC;AACH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,oCAAoC,CAC5C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
+
export * from './event-catalog.js';
|
|
1
2
|
import { connectionSlugSchema } from '@shipfox/api-integration-core-dto';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export const WEBHOOK_RESERVED_SLUGS = [
|
|
6
|
-
'github',
|
|
7
|
-
'gitea',
|
|
8
|
-
'sentry',
|
|
9
|
-
'manual',
|
|
10
|
-
'cron'
|
|
11
|
-
];
|
|
4
|
+
import { WEBHOOK_RESERVED_SLUGS } from './constants.js';
|
|
5
|
+
export { WEBHOOK_PROVIDER, WEBHOOK_RECEIVED_EVENT, WEBHOOK_RESERVED_SLUGS } from './constants.js';
|
|
12
6
|
const webhookReservedSlugSet = new Set(WEBHOOK_RESERVED_SLUGS);
|
|
13
7
|
export const webhookSlugSchema = z.string().pipe(connectionSlugSchema).refine((slug)=>!webhookReservedSlugSet.has(slug), {
|
|
14
8
|
message: 'Slug is reserved'
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './event-catalog.js';\n\nimport {connectionSlugSchema} from '@shipfox/api-integration-core-dto';\nimport {z} from 'zod';\nimport {WEBHOOK_RESERVED_SLUGS} from './constants.js';\n\nexport {\n WEBHOOK_PROVIDER,\n WEBHOOK_RECEIVED_EVENT,\n WEBHOOK_RESERVED_SLUGS,\n} from './constants.js';\n\nconst webhookReservedSlugSet = new Set<string>(WEBHOOK_RESERVED_SLUGS);\n\nexport const webhookSlugSchema = z\n .string()\n .pipe(connectionSlugSchema)\n .refine((slug) => !webhookReservedSlugSet.has(slug), {\n message: 'Slug is reserved',\n });\n\nexport const createWebhookConnectionBodySchema = z.object({\n workspace_id: z.string().uuid(),\n name: z.string().min(1).max(100),\n slug: webhookSlugSchema,\n});\nexport type CreateWebhookConnectionBodyDto = z.infer<typeof createWebhookConnectionBodySchema>;\n\nexport const updateWebhookConnectionBodySchema = z.object({\n lifecycle_status: z.enum(['active', 'disabled']),\n});\nexport type UpdateWebhookConnectionBodyDto = z.infer<typeof updateWebhookConnectionBodySchema>;\n\nexport const webhookConnectionDtoSchema = z.object({\n id: z.string().uuid(),\n workspace_id: z.string().uuid(),\n name: z.string(),\n slug: connectionSlugSchema,\n lifecycle_status: z.enum(['active', 'disabled', 'error']),\n inbound_url: z.string().url(),\n created_at: z.string(),\n updated_at: z.string(),\n});\nexport type WebhookConnectionDto = z.infer<typeof webhookConnectionDtoSchema>;\n\nexport const listWebhookConnectionsQuerySchema = z.object({\n workspace_id: z.string().uuid(),\n});\nexport type ListWebhookConnectionsQueryDto = z.infer<typeof listWebhookConnectionsQuerySchema>;\n\nexport const listWebhookConnectionsResponseSchema = z.object({\n connections: z.array(webhookConnectionDtoSchema),\n});\nexport type ListWebhookConnectionsResponseDto = z.infer<\n typeof listWebhookConnectionsResponseSchema\n>;\n"],"names":["connectionSlugSchema","z","WEBHOOK_RESERVED_SLUGS","WEBHOOK_PROVIDER","WEBHOOK_RECEIVED_EVENT","webhookReservedSlugSet","Set","webhookSlugSchema","string","pipe","refine","slug","has","message","createWebhookConnectionBodySchema","object","workspace_id","uuid","name","min","max","updateWebhookConnectionBodySchema","lifecycle_status","enum","webhookConnectionDtoSchema","id","inbound_url","url","created_at","updated_at","listWebhookConnectionsQuerySchema","listWebhookConnectionsResponseSchema","connections","array"],"mappings":"AAAA,cAAc,qBAAqB;AAEnC,SAAQA,oBAAoB,QAAO,oCAAoC;AACvE,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,sBAAsB,QAAO,iBAAiB;AAEtD,SACEC,gBAAgB,EAChBC,sBAAsB,EACtBF,sBAAsB,QACjB,iBAAiB;AAExB,MAAMG,yBAAyB,IAAIC,IAAYJ;AAE/C,OAAO,MAAMK,oBAAoBN,EAC9BO,MAAM,GACNC,IAAI,CAACT,sBACLU,MAAM,CAAC,CAACC,OAAS,CAACN,uBAAuBO,GAAG,CAACD,OAAO;IACnDE,SAAS;AACX,GAAG;AAEL,OAAO,MAAMC,oC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