@xemahq/platform-common 0.2.24 → 0.2.26
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/dist/lib/manifest/manifest.enums.d.ts +2 -2
- package/dist/lib/manifest/manifest.enums.d.ts.map +1 -1
- package/dist/lib/manifest/manifest.schema.d.ts +2 -2
- package/dist/lib/manifest/manifest.schema.js +2 -2
- package/dist/lib/manifest/manifest.schema.js.map +1 -1
- package/dist/lib/manifest/manifest.types.d.ts +7 -7
- package/dist/lib/manifest/manifest.types.d.ts.map +1 -1
- package/dist/lib/manifest/manifest.types.js +1 -1
- package/dist/lib/manifest/manifest.types.js.map +1 -1
- package/dist/lib/manifest/manifest.validation.d.ts +1 -1
- package/dist/lib/manifest/manifest.validation.d.ts.map +1 -1
- package/dist/lib/manifest/manifest.validation.js +12 -12
- package/dist/lib/manifest/manifest.validation.js.map +1 -1
- package/dist/lib/run-events/event-families.d.ts +3 -3
- package/dist/lib/run-events/event-families.d.ts.map +1 -1
- package/dist/lib/run-events/event-families.js +3 -3
- package/dist/lib/run-events/event-families.js.map +1 -1
- package/dist/lib/run-events/run-event.types.d.ts +1 -1
- package/dist/lib/run-events/run-event.types.d.ts.map +1 -1
- package/dist/lib/run-events/run-event.types.js +1 -1
- package/dist/lib/run-events/run-event.types.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/integration-webhooks/adapter-key.enum.d.ts +0 -11
- package/dist/lib/integration-webhooks/adapter-key.enum.d.ts.map +0 -1
- package/dist/lib/integration-webhooks/adapter-key.enum.js +0 -15
- package/dist/lib/integration-webhooks/adapter-key.enum.js.map +0 -1
- package/dist/lib/integration-webhooks/index.d.ts +0 -5
- package/dist/lib/integration-webhooks/index.d.ts.map +0 -1
- package/dist/lib/integration-webhooks/index.js +0 -21
- package/dist/lib/integration-webhooks/index.js.map +0 -1
- package/dist/lib/integration-webhooks/integration-provider.enum.d.ts +0 -29
- package/dist/lib/integration-webhooks/integration-provider.enum.d.ts.map +0 -1
- package/dist/lib/integration-webhooks/integration-provider.enum.js +0 -33
- package/dist/lib/integration-webhooks/integration-provider.enum.js.map +0 -1
- package/dist/lib/integration-webhooks/routes.d.ts +0 -3
- package/dist/lib/integration-webhooks/routes.d.ts.map +0 -1
- package/dist/lib/integration-webhooks/routes.js +0 -6
- package/dist/lib/integration-webhooks/routes.js.map +0 -1
- package/dist/lib/integration-webhooks/webhook-entity-kind.enum.d.ts +0 -13
- package/dist/lib/integration-webhooks/webhook-entity-kind.enum.d.ts.map +0 -1
- package/dist/lib/integration-webhooks/webhook-entity-kind.enum.js +0 -17
- package/dist/lib/integration-webhooks/webhook-entity-kind.enum.js.map +0 -1
- package/dist/nestjs/integration-webhooks/api-integration-envelope.decorator.d.ts +0 -9
- package/dist/nestjs/integration-webhooks/api-integration-envelope.decorator.d.ts.map +0 -1
- package/dist/nestjs/integration-webhooks/api-integration-envelope.decorator.js +0 -29
- package/dist/nestjs/integration-webhooks/api-integration-envelope.decorator.js.map +0 -1
- package/dist/nestjs/integration-webhooks/index.d.ts +0 -5
- package/dist/nestjs/integration-webhooks/index.d.ts.map +0 -1
- package/dist/nestjs/integration-webhooks/index.js +0 -13
- package/dist/nestjs/integration-webhooks/index.js.map +0 -1
- package/dist/nestjs/integration-webhooks/integration-envelope.pipe.d.ts +0 -11
- package/dist/nestjs/integration-webhooks/integration-envelope.pipe.d.ts.map +0 -1
- package/dist/nestjs/integration-webhooks/integration-envelope.pipe.js +0 -101
- package/dist/nestjs/integration-webhooks/integration-envelope.pipe.js.map +0 -1
- package/dist/nestjs/integration-webhooks/integration-envelope.types.d.ts +0 -8
- package/dist/nestjs/integration-webhooks/integration-envelope.types.d.ts.map +0 -1
- package/dist/nestjs/integration-webhooks/integration-envelope.types.js +0 -3
- package/dist/nestjs/integration-webhooks/integration-envelope.types.js.map +0 -1
- package/dist/nestjs/integration-webhooks/integration-webhook-envelope.dto.d.ts +0 -15
- package/dist/nestjs/integration-webhooks/integration-webhook-envelope.dto.d.ts.map +0 -1
- package/dist/nestjs/integration-webhooks/integration-webhook-envelope.dto.js +0 -102
- package/dist/nestjs/integration-webhooks/integration-webhook-envelope.dto.js.map +0 -1
- package/dist/nestjs/jwks/issuer-metadata-resolver.d.ts +0 -7
- package/dist/nestjs/jwks/issuer-metadata-resolver.d.ts.map +0 -1
- package/dist/nestjs/jwks/issuer-metadata-resolver.js +0 -36
- package/dist/nestjs/jwks/issuer-metadata-resolver.js.map +0 -1
- package/dist/nestjs/jwks/jwks-verifier.d.ts +0 -48
- package/dist/nestjs/jwks/jwks-verifier.d.ts.map +0 -1
- package/dist/nestjs/jwks/jwks-verifier.js +0 -177
- package/dist/nestjs/jwks/jwks-verifier.js.map +0 -1
- package/dist/nestjs/route-metadata-keys.d.ts +0 -3
- package/dist/nestjs/route-metadata-keys.d.ts.map +0 -1
- package/dist/nestjs/route-metadata-keys.js +0 -6
- package/dist/nestjs/route-metadata-keys.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/index.ts"],"names":[],"mappings":"AAYA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./integration-provider.enum"), exports);
|
|
18
|
-
__exportStar(require("./adapter-key.enum"), exports);
|
|
19
|
-
__exportStar(require("./webhook-entity-kind.enum"), exports);
|
|
20
|
-
__exportStar(require("./routes"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAYA,8DAA4C;AAC5C,qDAAmC;AACnC,6DAA2C;AAC3C,2CAAyB"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare enum ConnectorKind {
|
|
2
|
-
GITHUB = "GITHUB",
|
|
3
|
-
GITLAB = "GITLAB",
|
|
4
|
-
GITEA = "GITEA",
|
|
5
|
-
AZURE_DEVOPS = "AZURE_DEVOPS",
|
|
6
|
-
XEMA_GITEA = "XEMA_GITEA",
|
|
7
|
-
ATLASSIAN = "ATLASSIAN",
|
|
8
|
-
SLACK = "SLACK",
|
|
9
|
-
TELEGRAM = "TELEGRAM",
|
|
10
|
-
SMTP_GENERIC = "SMTP_GENERIC",
|
|
11
|
-
IMAP_GENERIC = "IMAP_GENERIC",
|
|
12
|
-
MICROSOFT_GRAPH = "MICROSOFT_GRAPH",
|
|
13
|
-
GMAIL = "GMAIL",
|
|
14
|
-
NPMJS = "NPMJS",
|
|
15
|
-
GITHUB_PACKAGES = "GITHUB_PACKAGES",
|
|
16
|
-
AZURE_ARTIFACTS = "AZURE_ARTIFACTS",
|
|
17
|
-
AWS_CODE_ARTIFACT = "AWS_CODE_ARTIFACT",
|
|
18
|
-
NPM_GENERIC = "NPM_GENERIC",
|
|
19
|
-
XEMA_NPM_REGISTRY = "XEMA_NPM_REGISTRY",
|
|
20
|
-
DOCKER_HUB = "DOCKER_HUB",
|
|
21
|
-
GITHUB_CONTAINER_REGISTRY = "GITHUB_CONTAINER_REGISTRY",
|
|
22
|
-
GITLAB_CONTAINER_REGISTRY = "GITLAB_CONTAINER_REGISTRY",
|
|
23
|
-
AZURE_CONTAINER_REGISTRY = "AZURE_CONTAINER_REGISTRY",
|
|
24
|
-
AWS_ECR = "AWS_ECR",
|
|
25
|
-
GCP_ARTIFACT_REGISTRY = "GCP_ARTIFACT_REGISTRY",
|
|
26
|
-
OCI_GENERIC = "OCI_GENERIC",
|
|
27
|
-
XEMA_CONTAINER_REGISTRY = "XEMA_CONTAINER_REGISTRY"
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=integration-provider.enum.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-provider.enum.d.ts","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/integration-provider.enum.ts"],"names":[],"mappings":"AAaA,oBAAY,aAAa;IAEvB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,YAAY,iBAAiB;IAE7B,UAAU,eAAe;IAGzB,SAAS,cAAc;IACvB,KAAK,UAAU;IAMf,QAAQ,aAAa;IAOrB,YAAY,iBAAiB;IAM7B,YAAY,iBAAiB;IAM7B,eAAe,oBAAoB;IAMnC,KAAK,UAAU;IAGf,KAAK,UAAU;IACf,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;IAEvC,WAAW,gBAAgB;IAE3B,iBAAiB,sBAAsB;IAGvC,UAAU,eAAe;IACzB,yBAAyB,8BAA8B;IACvD,yBAAyB,8BAA8B;IACvD,wBAAwB,6BAA6B;IACrD,OAAO,YAAY;IACnB,qBAAqB,0BAA0B;IAE/C,WAAW,gBAAgB;IAE3B,uBAAuB,4BAA4B;CACpD"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConnectorKind = void 0;
|
|
4
|
-
var ConnectorKind;
|
|
5
|
-
(function (ConnectorKind) {
|
|
6
|
-
ConnectorKind["GITHUB"] = "GITHUB";
|
|
7
|
-
ConnectorKind["GITLAB"] = "GITLAB";
|
|
8
|
-
ConnectorKind["GITEA"] = "GITEA";
|
|
9
|
-
ConnectorKind["AZURE_DEVOPS"] = "AZURE_DEVOPS";
|
|
10
|
-
ConnectorKind["XEMA_GITEA"] = "XEMA_GITEA";
|
|
11
|
-
ConnectorKind["ATLASSIAN"] = "ATLASSIAN";
|
|
12
|
-
ConnectorKind["SLACK"] = "SLACK";
|
|
13
|
-
ConnectorKind["TELEGRAM"] = "TELEGRAM";
|
|
14
|
-
ConnectorKind["SMTP_GENERIC"] = "SMTP_GENERIC";
|
|
15
|
-
ConnectorKind["IMAP_GENERIC"] = "IMAP_GENERIC";
|
|
16
|
-
ConnectorKind["MICROSOFT_GRAPH"] = "MICROSOFT_GRAPH";
|
|
17
|
-
ConnectorKind["GMAIL"] = "GMAIL";
|
|
18
|
-
ConnectorKind["NPMJS"] = "NPMJS";
|
|
19
|
-
ConnectorKind["GITHUB_PACKAGES"] = "GITHUB_PACKAGES";
|
|
20
|
-
ConnectorKind["AZURE_ARTIFACTS"] = "AZURE_ARTIFACTS";
|
|
21
|
-
ConnectorKind["AWS_CODE_ARTIFACT"] = "AWS_CODE_ARTIFACT";
|
|
22
|
-
ConnectorKind["NPM_GENERIC"] = "NPM_GENERIC";
|
|
23
|
-
ConnectorKind["XEMA_NPM_REGISTRY"] = "XEMA_NPM_REGISTRY";
|
|
24
|
-
ConnectorKind["DOCKER_HUB"] = "DOCKER_HUB";
|
|
25
|
-
ConnectorKind["GITHUB_CONTAINER_REGISTRY"] = "GITHUB_CONTAINER_REGISTRY";
|
|
26
|
-
ConnectorKind["GITLAB_CONTAINER_REGISTRY"] = "GITLAB_CONTAINER_REGISTRY";
|
|
27
|
-
ConnectorKind["AZURE_CONTAINER_REGISTRY"] = "AZURE_CONTAINER_REGISTRY";
|
|
28
|
-
ConnectorKind["AWS_ECR"] = "AWS_ECR";
|
|
29
|
-
ConnectorKind["GCP_ARTIFACT_REGISTRY"] = "GCP_ARTIFACT_REGISTRY";
|
|
30
|
-
ConnectorKind["OCI_GENERIC"] = "OCI_GENERIC";
|
|
31
|
-
ConnectorKind["XEMA_CONTAINER_REGISTRY"] = "XEMA_CONTAINER_REGISTRY";
|
|
32
|
-
})(ConnectorKind || (exports.ConnectorKind = ConnectorKind = {}));
|
|
33
|
-
//# sourceMappingURL=integration-provider.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-provider.enum.js","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/integration-provider.enum.ts"],"names":[],"mappings":";;;AAaA,IAAY,aAiEX;AAjED,WAAY,aAAa;IAEvB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,gCAAe,CAAA;IACf,8CAA6B,CAAA;IAE7B,0CAAyB,CAAA;IAGzB,wCAAuB,CAAA;IACvB,gCAAe,CAAA;IAMf,sCAAqB,CAAA;IAOrB,8CAA6B,CAAA;IAM7B,8CAA6B,CAAA;IAM7B,oDAAmC,CAAA;IAMnC,gCAAe,CAAA;IAGf,gCAAe,CAAA;IACf,oDAAmC,CAAA;IACnC,oDAAmC,CAAA;IACnC,wDAAuC,CAAA;IAEvC,4CAA2B,CAAA;IAE3B,wDAAuC,CAAA;IAGvC,0CAAyB,CAAA;IACzB,wEAAuD,CAAA;IACvD,wEAAuD,CAAA;IACvD,sEAAqD,CAAA;IACrD,oCAAmB,CAAA;IACnB,gEAA+C,CAAA;IAE/C,4CAA2B,CAAA;IAE3B,oEAAmD,CAAA;AACrD,CAAC,EAjEW,aAAa,6BAAb,aAAa,QAiExB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/routes.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,8BAA8B,EAAG,yBAAkC,CAAC;AAGjF,eAAO,MAAM,iCAAiC,EAAG,wBAAiC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WEBHOOK_INGESTION_CONTROLLER_PATH = exports.DOMAIN_WEBHOOK_INGESTION_ROUTE = void 0;
|
|
4
|
-
exports.DOMAIN_WEBHOOK_INGESTION_ROUTE = '/webhooks/provider-data';
|
|
5
|
-
exports.WEBHOOK_INGESTION_CONTROLLER_PATH = 'webhooks/provider-data';
|
|
6
|
-
//# sourceMappingURL=routes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/routes.ts"],"names":[],"mappings":";;;AAYa,QAAA,8BAA8B,GAAG,yBAAkC,CAAC;AAGpE,QAAA,iCAAiC,GAAG,wBAAiC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare enum WebhookEntityKind {
|
|
2
|
-
ISSUE = "issue",
|
|
3
|
-
CHANGE_REQUEST = "change_request",
|
|
4
|
-
PUSH = "push",
|
|
5
|
-
REPOSITORY = "repository",
|
|
6
|
-
INSTALLATION = "installation",
|
|
7
|
-
ITEM = "item",
|
|
8
|
-
COMMENT = "comment",
|
|
9
|
-
PAGE = "page",
|
|
10
|
-
SPACE = "space",
|
|
11
|
-
MESSAGE = "message"
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=webhook-entity-kind.enum.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-entity-kind.enum.d.ts","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/webhook-entity-kind.enum.ts"],"names":[],"mappings":"AAYA,oBAAY,iBAAiB;IAE3B,KAAK,UAAU;IACf,cAAc,mBAAmB;IACjC,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAG7B,IAAI,SAAS;IACb,OAAO,YAAY;IAGnB,IAAI,SAAS;IACb,KAAK,UAAU;IAGf,OAAO,YAAY;CACpB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebhookEntityKind = void 0;
|
|
4
|
-
var WebhookEntityKind;
|
|
5
|
-
(function (WebhookEntityKind) {
|
|
6
|
-
WebhookEntityKind["ISSUE"] = "issue";
|
|
7
|
-
WebhookEntityKind["CHANGE_REQUEST"] = "change_request";
|
|
8
|
-
WebhookEntityKind["PUSH"] = "push";
|
|
9
|
-
WebhookEntityKind["REPOSITORY"] = "repository";
|
|
10
|
-
WebhookEntityKind["INSTALLATION"] = "installation";
|
|
11
|
-
WebhookEntityKind["ITEM"] = "item";
|
|
12
|
-
WebhookEntityKind["COMMENT"] = "comment";
|
|
13
|
-
WebhookEntityKind["PAGE"] = "page";
|
|
14
|
-
WebhookEntityKind["SPACE"] = "space";
|
|
15
|
-
WebhookEntityKind["MESSAGE"] = "message";
|
|
16
|
-
})(WebhookEntityKind || (exports.WebhookEntityKind = WebhookEntityKind = {}));
|
|
17
|
-
//# sourceMappingURL=webhook-entity-kind.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-entity-kind.enum.js","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/webhook-entity-kind.enum.ts"],"names":[],"mappings":";;;AAYA,IAAY,iBAkBX;AAlBD,WAAY,iBAAiB;IAE3B,oCAAe,CAAA;IACf,sDAAiC,CAAA;IACjC,kCAAa,CAAA;IACb,8CAAyB,CAAA;IACzB,kDAA6B,CAAA;IAG7B,kCAAa,CAAA;IACb,wCAAmB,CAAA;IAGnB,kCAAa,CAAA;IACb,oCAAe,CAAA;IAGf,wCAAmB,CAAA;AACrB,CAAC,EAlBW,iBAAiB,iCAAjB,iBAAiB,QAkB5B"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { IntegrationEnvelopeVariant } from './integration-envelope.types';
|
|
2
|
-
export interface ApiIntegrationEnvelopeOptions {
|
|
3
|
-
variants: readonly IntegrationEnvelopeVariant[];
|
|
4
|
-
description?: string;
|
|
5
|
-
}
|
|
6
|
-
export type ApiConnectorEnvelopeOptions = ApiIntegrationEnvelopeOptions;
|
|
7
|
-
export declare function ApiIntegrationEnvelope(options: ApiIntegrationEnvelopeOptions): MethodDecorator;
|
|
8
|
-
export declare const ApiConnectorEnvelope: typeof ApiIntegrationEnvelope;
|
|
9
|
-
//# sourceMappingURL=api-integration-envelope.decorator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-integration-envelope.decorator.d.ts","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/api-integration-envelope.decorator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAiC/E,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAOxE,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,6BAA6B,GACrC,eAAe,CAiCjB;AAOD,eAAO,MAAM,oBAAoB,+BAAyB,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApiConnectorEnvelope = void 0;
|
|
4
|
-
exports.ApiIntegrationEnvelope = ApiIntegrationEnvelope;
|
|
5
|
-
const common_1 = require("@nestjs/common");
|
|
6
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
-
function ApiIntegrationEnvelope(options) {
|
|
8
|
-
const { variants, description } = options;
|
|
9
|
-
if (variants.length === 0) {
|
|
10
|
-
throw new Error('ApiIntegrationEnvelope requires at least one variant constructor.');
|
|
11
|
-
}
|
|
12
|
-
const variantList = [...variants];
|
|
13
|
-
return (0, common_1.applyDecorators)((0, swagger_1.ApiExtraModels)(...variantList), (0, swagger_1.ApiBody)({
|
|
14
|
-
description: description ??
|
|
15
|
-
'Normalized integration webhook envelope. One variant per entityKind discriminator.',
|
|
16
|
-
schema: {
|
|
17
|
-
oneOf: variantList.map((v) => ({ $ref: (0, swagger_1.getSchemaPath)(v) })),
|
|
18
|
-
discriminator: {
|
|
19
|
-
propertyName: 'entityKind',
|
|
20
|
-
mapping: variantList.reduce((acc, v) => {
|
|
21
|
-
acc[v.ENTITY_KIND] = (0, swagger_1.getSchemaPath)(v);
|
|
22
|
-
return acc;
|
|
23
|
-
}, {}),
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
exports.ApiConnectorEnvelope = ApiIntegrationEnvelope;
|
|
29
|
-
//# sourceMappingURL=api-integration-envelope.decorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-integration-envelope.decorator.js","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/api-integration-envelope.decorator.ts"],"names":[],"mappings":";;;AAqDA,wDAmCC;AAxFD,2CAAiD;AACjD,6CAAyE;AAoDzE,SAAgB,sBAAsB,CACpC,OAAsC;IAEtC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAE1C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;IACJ,CAAC;IAGD,MAAM,WAAW,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;IAElC,OAAO,IAAA,wBAAe,EACpB,IAAA,wBAAc,EAAC,GAAG,WAAW,CAAC,EAC9B,IAAA,iBAAO,EAAC;QACN,WAAW,EACT,WAAW;YACX,oFAAoF;QACtF,MAAM,EAAE;YACN,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC3D,aAAa,EAAE;gBACb,YAAY,EAAE,YAAY;gBAI1B,OAAO,EAAE,WAAW,CAAC,MAAM,CAAyB,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;oBAC7D,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,IAAA,uBAAa,EAAC,CAAC,CAAC,CAAC;oBACtC,OAAO,GAAG,CAAC;gBACb,CAAC,EAAE,EAAE,CAAC;aACP;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAOY,QAAA,oBAAoB,GAAG,sBAAsB,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { IntegrationWebhookEnvelopeDto, ConnectorWebhookEnvelopeDto, } from './integration-webhook-envelope.dto';
|
|
2
|
-
export { IntegrationEnvelopePipe, ConnectorEnvelopePipe, } from './integration-envelope.pipe';
|
|
3
|
-
export { ApiIntegrationEnvelope, ApiConnectorEnvelope, type ApiIntegrationEnvelopeOptions, type ApiConnectorEnvelopeOptions, } from './api-integration-envelope.decorator';
|
|
4
|
-
export type { IntegrationEnvelopeVariant, ConnectorEnvelopeVariant, } from './integration-envelope.types';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,GACjC,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApiConnectorEnvelope = exports.ApiIntegrationEnvelope = exports.ConnectorEnvelopePipe = exports.IntegrationEnvelopePipe = exports.ConnectorWebhookEnvelopeDto = exports.IntegrationWebhookEnvelopeDto = void 0;
|
|
4
|
-
var integration_webhook_envelope_dto_1 = require("./integration-webhook-envelope.dto");
|
|
5
|
-
Object.defineProperty(exports, "IntegrationWebhookEnvelopeDto", { enumerable: true, get: function () { return integration_webhook_envelope_dto_1.IntegrationWebhookEnvelopeDto; } });
|
|
6
|
-
Object.defineProperty(exports, "ConnectorWebhookEnvelopeDto", { enumerable: true, get: function () { return integration_webhook_envelope_dto_1.ConnectorWebhookEnvelopeDto; } });
|
|
7
|
-
var integration_envelope_pipe_1 = require("./integration-envelope.pipe");
|
|
8
|
-
Object.defineProperty(exports, "IntegrationEnvelopePipe", { enumerable: true, get: function () { return integration_envelope_pipe_1.IntegrationEnvelopePipe; } });
|
|
9
|
-
Object.defineProperty(exports, "ConnectorEnvelopePipe", { enumerable: true, get: function () { return integration_envelope_pipe_1.ConnectorEnvelopePipe; } });
|
|
10
|
-
var api_integration_envelope_decorator_1 = require("./api-integration-envelope.decorator");
|
|
11
|
-
Object.defineProperty(exports, "ApiIntegrationEnvelope", { enumerable: true, get: function () { return api_integration_envelope_decorator_1.ApiIntegrationEnvelope; } });
|
|
12
|
-
Object.defineProperty(exports, "ApiConnectorEnvelope", { enumerable: true, get: function () { return api_integration_envelope_decorator_1.ApiConnectorEnvelope; } });
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/index.ts"],"names":[],"mappings":";;;AAQA,uFAG4C;AAF1C,iJAAA,6BAA6B,OAAA;AAC7B,+IAAA,2BAA2B,OAAA;AAE7B,yEAGqC;AAFnC,oIAAA,uBAAuB,OAAA;AACvB,kIAAA,qBAAqB,OAAA;AAEvB,2FAK8C;AAJ5C,4IAAA,sBAAsB,OAAA;AACtB,0IAAA,oBAAoB,OAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@nestjs/common';
|
|
2
|
-
import type { IntegrationWebhookEnvelopeDto } from './integration-webhook-envelope.dto';
|
|
3
|
-
import type { IntegrationEnvelopeVariant } from './integration-envelope.types';
|
|
4
|
-
export declare class IntegrationEnvelopePipe<TVariant extends IntegrationWebhookEnvelopeDto<unknown>> implements PipeTransform<unknown, Promise<TVariant>> {
|
|
5
|
-
private readonly byEntityKind;
|
|
6
|
-
constructor(variants: readonly IntegrationEnvelopeVariant[]);
|
|
7
|
-
transform(value: unknown): Promise<TVariant>;
|
|
8
|
-
}
|
|
9
|
-
export declare const ConnectorEnvelopePipe: typeof IntegrationEnvelopePipe;
|
|
10
|
-
export type ConnectorEnvelopePipe<TVariant extends IntegrationWebhookEnvelopeDto<unknown>> = IntegrationEnvelopePipe<TVariant>;
|
|
11
|
-
//# sourceMappingURL=integration-envelope.pipe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-envelope.pipe.d.ts","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/integration-envelope.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACd,MAAM,gBAAgB,CAAC;AAMxB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAkC/E,qBACa,uBAAuB,CAClC,QAAQ,SAAS,6BAA6B,CAAC,OAAO,CAAC,CACvD,YAAW,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEpD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAG3B;gBAEU,QAAQ,EAAE,SAAS,0BAA0B,EAAE;IAyBrD,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;CA8CnD;AAQD,eAAO,MAAM,qBAAqB,gCAA0B,CAAC;AAK7D,MAAM,MAAM,qBAAqB,CAC/B,QAAQ,SAAS,6BAA6B,CAAC,OAAO,CAAC,IACrD,uBAAuB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ConnectorEnvelopePipe = exports.IntegrationEnvelopePipe = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const class_validator_1 = require("class-validator");
|
|
16
|
-
let IntegrationEnvelopePipe = class IntegrationEnvelopePipe {
|
|
17
|
-
byEntityKind;
|
|
18
|
-
constructor(variants) {
|
|
19
|
-
if (variants.length === 0) {
|
|
20
|
-
throw new Error('IntegrationEnvelopePipe requires at least one variant constructor.');
|
|
21
|
-
}
|
|
22
|
-
const map = new Map();
|
|
23
|
-
for (const ctor of variants) {
|
|
24
|
-
const entityKind = ctor.ENTITY_KIND;
|
|
25
|
-
if (entityKind === undefined) {
|
|
26
|
-
throw new Error(`IntegrationEnvelopePipe: variant ${ctor.name} is missing static ENTITY_KIND.`);
|
|
27
|
-
}
|
|
28
|
-
const existing = map.get(entityKind);
|
|
29
|
-
if (existing) {
|
|
30
|
-
throw new Error(`IntegrationEnvelopePipe: duplicate ENTITY_KIND "${entityKind}" shared by ${existing.name} and ${ctor.name}.`);
|
|
31
|
-
}
|
|
32
|
-
map.set(entityKind, ctor);
|
|
33
|
-
}
|
|
34
|
-
this.byEntityKind = map;
|
|
35
|
-
}
|
|
36
|
-
async transform(value) {
|
|
37
|
-
if (!isPlainObject(value)) {
|
|
38
|
-
throw new common_1.BadRequestException({
|
|
39
|
-
code: 'INVALID_ENVELOPE',
|
|
40
|
-
message: 'Webhook envelope body must be a JSON object.',
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
const rawEntityKind = value.entityKind;
|
|
44
|
-
if (typeof rawEntityKind !== 'string') {
|
|
45
|
-
throw new common_1.BadRequestException({
|
|
46
|
-
code: 'MISSING_ENTITY_KIND',
|
|
47
|
-
message: 'Webhook envelope is missing the required string field "entityKind".',
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
const ctor = this.byEntityKind.get(rawEntityKind);
|
|
51
|
-
if (!ctor) {
|
|
52
|
-
const accepted = [...this.byEntityKind.keys()].join(', ');
|
|
53
|
-
throw new common_1.BadRequestException({
|
|
54
|
-
code: 'UNKNOWN_ENTITY_KIND',
|
|
55
|
-
message: `Unknown entityKind "${rawEntityKind}". Expected one of: ${accepted}.`,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
const instance = (0, class_transformer_1.plainToInstance)(ctor, value, {
|
|
59
|
-
enableImplicitConversion: false,
|
|
60
|
-
});
|
|
61
|
-
const errors = await (0, class_validator_1.validate)(instance, {
|
|
62
|
-
whitelist: true,
|
|
63
|
-
forbidNonWhitelisted: true,
|
|
64
|
-
forbidUnknownValues: true,
|
|
65
|
-
});
|
|
66
|
-
if (errors.length > 0) {
|
|
67
|
-
throw new common_1.BadRequestException({
|
|
68
|
-
code: 'INVALID_ENVELOPE',
|
|
69
|
-
message: `Webhook envelope failed validation (entityKind=${rawEntityKind}).`,
|
|
70
|
-
details: flattenValidationErrors(errors),
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return instance;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
exports.IntegrationEnvelopePipe = IntegrationEnvelopePipe;
|
|
77
|
-
exports.IntegrationEnvelopePipe = IntegrationEnvelopePipe = __decorate([
|
|
78
|
-
(0, common_1.Injectable)(),
|
|
79
|
-
__metadata("design:paramtypes", [Array])
|
|
80
|
-
], IntegrationEnvelopePipe);
|
|
81
|
-
exports.ConnectorEnvelopePipe = IntegrationEnvelopePipe;
|
|
82
|
-
function isPlainObject(value) {
|
|
83
|
-
return (typeof value === 'object' &&
|
|
84
|
-
value !== null &&
|
|
85
|
-
!Array.isArray(value) &&
|
|
86
|
-
Object.getPrototypeOf(value) === Object.prototype);
|
|
87
|
-
}
|
|
88
|
-
function flattenValidationErrors(errors, parentPath = '') {
|
|
89
|
-
const flat = [];
|
|
90
|
-
for (const err of errors) {
|
|
91
|
-
const path = parentPath ? `${parentPath}.${err.property}` : err.property;
|
|
92
|
-
if (err.constraints && Object.keys(err.constraints).length > 0) {
|
|
93
|
-
flat.push({ path, constraints: err.constraints });
|
|
94
|
-
}
|
|
95
|
-
if (err.children && err.children.length > 0) {
|
|
96
|
-
flat.push(...flattenValidationErrors(err.children, path));
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return flat;
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=integration-envelope.pipe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-envelope.pipe.js","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/integration-envelope.pipe.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAIwB;AACxB,yDAAoD;AACpD,qDAA4D;AAwCrD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAIjB,YAAY,CAG3B;IAEF,YAAY,QAA+C;QACzD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAiD,CAAC;QACrE,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;YACpC,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC7B,MAAM,IAAI,KAAK,CACb,oCAAoC,IAAI,CAAC,IAAI,iCAAiC,CAC/E,CAAC;YACJ,CAAC;YACD,MAAM,QAAQ,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACrC,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,IAAI,KAAK,CACb,mDAAmD,UAAU,eAAe,QAAQ,CAAC,IAAI,QAAQ,IAAI,CAAC,IAAI,GAAG,CAC9G,CAAC;YACJ,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,KAAc;QAC5B,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,4BAAmB,CAAC;gBAC5B,IAA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ookEnvelopeDto } from './integration-webhook-envelope.dto';
|
|
4
|
-
export type IntegrationEnvelopeVariant<TPayload = any> = Type<IntegrationWebhookEnvelopeDto<TPayload>> & {
|
|
5
|
-
readonly ENTITY_KIND: WebhookEntityKind;
|
|
6
|
-
};
|
|
7
|
-
export type ConnectorEnvelopeVariant<TPayload = any> = IntegrationEnvelopeVariant<TPayload>;
|
|
8
|
-
//# sourceMappingURL=integration-envelope.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-envelope.types.d.ts","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/integration-envelope.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAgBxF,MAAM,MAAM,0BAA0B,CAAC,QAAQ,GAAG,GAAG,IAAI,IAAI,CAC3D,6BAA6B,CAAC,QAAQ,CAAC,CACxC,GAAG;IACF,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;CACzC,CAAC;AAQF,MAAM,MAAM,wBAAwB,CAAC,QAAQ,GAAG,GAAG,IACjD,0BAA0B,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-envelope.types.js","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/integration-envelope.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AdapterKey, WebhookEntityKind } from '../../lib/integration-webhooks';
|
|
2
|
-
export declare class IntegrationWebhookEnvelopeDto<TPayload = unknown> {
|
|
3
|
-
provider: string;
|
|
4
|
-
adapterKey: AdapterKey;
|
|
5
|
-
event: string;
|
|
6
|
-
entityKind: WebhookEntityKind;
|
|
7
|
-
deliveryId: string;
|
|
8
|
-
occurredAt: string;
|
|
9
|
-
correlationId: string;
|
|
10
|
-
externalId?: string;
|
|
11
|
-
externalSpaceKey?: string;
|
|
12
|
-
payload: TPayload;
|
|
13
|
-
}
|
|
14
|
-
export { IntegrationWebhookEnvelopeDto as ConnectorWebhookEnvelopeDto };
|
|
15
|
-
//# sourceMappingURL=integration-webhook-envelope.dto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-webhook-envelope.dto.d.ts","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/integration-webhook-envelope.dto.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,UAAU,EACV,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AA4BxC,qBAAa,6BAA6B,CAAC,QAAQ,GAAG,OAAO;IAa3D,QAAQ,EAAG,MAAM,CAAC;IASlB,UAAU,EAAG,UAAU,CAAC;IAQxB,KAAK,EAAG,MAAM,CAAC;IAIf,UAAU,EAAG,iBAAiB,CAAC;IAQ/B,UAAU,EAAG,MAAM,CAAC;IAOpB,UAAU,EAAG,MAAM,CAAC;IAQpB,aAAa,EAAG,MAAM,CAAC;IASvB,UAAU,CAAC,EAAE,MAAM,CAAC;IASpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAK1B,OAAO,EAAG,QAAQ,CAAC;CACpB;AASD,OAAO,EAAE,6BAA6B,IAAI,2BAA2B,EAAE,CAAC"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ConnectorWebhookEnvelopeDto = exports.IntegrationWebhookEnvelopeDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const integration_webhooks_1 = require("../../lib/integration-webhooks");
|
|
16
|
-
class IntegrationWebhookEnvelopeDto {
|
|
17
|
-
provider;
|
|
18
|
-
adapterKey;
|
|
19
|
-
event;
|
|
20
|
-
entityKind;
|
|
21
|
-
deliveryId;
|
|
22
|
-
occurredAt;
|
|
23
|
-
correlationId;
|
|
24
|
-
externalId;
|
|
25
|
-
externalSpaceKey;
|
|
26
|
-
payload;
|
|
27
|
-
}
|
|
28
|
-
exports.IntegrationWebhookEnvelopeDto = IntegrationWebhookEnvelopeDto;
|
|
29
|
-
exports.ConnectorWebhookEnvelopeDto = IntegrationWebhookEnvelopeDto;
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, swagger_1.ApiProperty)({
|
|
32
|
-
type: String,
|
|
33
|
-
description: 'Open provider key of the external provider that emitted the webhook. ' +
|
|
34
|
-
'Any curated ConnectorKind value (e.g. "GITHUB") OR a contributed ' +
|
|
35
|
-
'provider key (UPPER_SNAKE) is valid — validity is enforced at the ' +
|
|
36
|
-
'ingress seam by the connector registry (assertKnownConnectionProviderKey), ' +
|
|
37
|
-
'not by this DTO. See the H1 open-provider design.',
|
|
38
|
-
example: 'GITHUB',
|
|
39
|
-
}),
|
|
40
|
-
(0, class_validator_1.IsString)(),
|
|
41
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], IntegrationWebhookEnvelopeDto.prototype, "provider", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, class_validator_1.IsEnum)(integration_webhooks_1.AdapterKey),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], IntegrationWebhookEnvelopeDto.prototype, "adapterKey", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, swagger_1.ApiProperty)({
|
|
50
|
-
description: 'Canonical event name. Per-domain enums define the allowed values (ScmWebhookEvent, TrackerWebhookEvent, DocWebhookEvent).',
|
|
51
|
-
example: 'scm.issue.opened',
|
|
52
|
-
}),
|
|
53
|
-
(0, class_validator_1.IsString)(),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], IntegrationWebhookEnvelopeDto.prototype, "event", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, class_validator_1.IsEnum)(integration_webhooks_1.WebhookEntityKind),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], IntegrationWebhookEnvelopeDto.prototype, "entityKind", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, swagger_1.ApiProperty)({
|
|
62
|
-
description: "Provider-native delivery identifier. Stable across retries — the adapter's dedup table keys off (provider, deliveryId).",
|
|
63
|
-
example: '72d3162e-cc78-11e3-81ab-4c9367dc0958',
|
|
64
|
-
}),
|
|
65
|
-
(0, class_validator_1.IsString)(),
|
|
66
|
-
__metadata("design:type", String)
|
|
67
|
-
], IntegrationWebhookEnvelopeDto.prototype, "deliveryId", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, swagger_1.ApiProperty)({
|
|
70
|
-
description: 'ISO-8601 timestamp when the provider emitted this event.',
|
|
71
|
-
example: '2026-04-17T13:45:00.000Z',
|
|
72
|
-
}),
|
|
73
|
-
(0, class_validator_1.IsISO8601)(),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], IntegrationWebhookEnvelopeDto.prototype, "occurredAt", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, swagger_1.ApiProperty)({
|
|
78
|
-
description: 'Correlation id for tracing; propagated into domain service logs via X-Correlation-Id.',
|
|
79
|
-
example: '550e8400-e29b-41d4-a716-446655440000',
|
|
80
|
-
}),
|
|
81
|
-
(0, class_validator_1.IsUUID)(),
|
|
82
|
-
__metadata("design:type", String)
|
|
83
|
-
], IntegrationWebhookEnvelopeDto.prototype, "correlationId", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
86
|
-
description: 'External entity id in the provider (e.g. GitHub issue id, Jira issue key).',
|
|
87
|
-
example: '123456789',
|
|
88
|
-
}),
|
|
89
|
-
(0, class_validator_1.IsOptional)(),
|
|
90
|
-
(0, class_validator_1.IsString)(),
|
|
91
|
-
__metadata("design:type", String)
|
|
92
|
-
], IntegrationWebhookEnvelopeDto.prototype, "externalId", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
95
|
-
description: 'Provider-native grouping key — repoSlug for SCM, spaceKey for Confluence, projectKey for Jira.',
|
|
96
|
-
example: 'acme/billing',
|
|
97
|
-
}),
|
|
98
|
-
(0, class_validator_1.IsOptional)(),
|
|
99
|
-
(0, class_validator_1.IsString)(),
|
|
100
|
-
__metadata("design:type", String)
|
|
101
|
-
], IntegrationWebhookEnvelopeDto.prototype, "externalSpaceKey", void 0);
|
|
102
|
-
//# sourceMappingURL=integration-webhook-envelope.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-webhook-envelope.dto.js","sourceRoot":"","sources":["../../../src/nestjs/integration-webhooks/integration-webhook-envelope.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qDAOyB;AAEzB,yEAGwC;AA4BxC,MAAa,6BAA6B;IAaxC,QAAQ,CAAU;IASlB,UAAU,CAAc;IAQxB,KAAK,CAAU;IAIf,UAAU,CAAqB;IAQ/B,UAAU,CAAU;I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AA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uEACe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issuer-metadata-resolver.d.ts","sourceRoot":"","sources":["../../../src/nestjs/jwks/issuer-metadata-resolver.ts"],"names":[],"mappings":"AAuBA,qBAAa,sBAAsB;IAOrB,OAAO,CAAC,QAAQ,CAAC,UAAU;IANvC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6D;gBAMtD,UAAU,GAAE,MAAkB;IAOrD,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAgC5D"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IssuerMetadataResolver = void 0;
|
|
4
|
-
const jwks_verifier_1 = require("./jwks-verifier");
|
|
5
|
-
class IssuerMetadataResolver {
|
|
6
|
-
cacheTtlMs;
|
|
7
|
-
cache = new Map();
|
|
8
|
-
constructor(cacheTtlMs = 3_600_000) {
|
|
9
|
-
this.cacheTtlMs = cacheTtlMs;
|
|
10
|
-
}
|
|
11
|
-
async resolveJwksUri(discoveryUrl) {
|
|
12
|
-
const cached = this.cache.get(discoveryUrl);
|
|
13
|
-
if (cached && Date.now() - cached.fetchedAt < this.cacheTtlMs) {
|
|
14
|
-
return cached.jwksUri;
|
|
15
|
-
}
|
|
16
|
-
let response;
|
|
17
|
-
try {
|
|
18
|
-
response = await fetch(discoveryUrl);
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
22
|
-
throw new jwks_verifier_1.JwksVerificationError(`Failed to reach OIDC discovery endpoint ${discoveryUrl}: ${msg}`);
|
|
23
|
-
}
|
|
24
|
-
if (!response.ok) {
|
|
25
|
-
throw new jwks_verifier_1.JwksVerificationError(`Failed to fetch OIDC discovery from ${discoveryUrl}: ${response.status}`);
|
|
26
|
-
}
|
|
27
|
-
const doc = (await response.json());
|
|
28
|
-
if (typeof doc.jwks_uri !== 'string' || doc.jwks_uri.length === 0) {
|
|
29
|
-
throw new jwks_verifier_1.JwksVerificationError(`OIDC discovery at ${discoveryUrl} did not provide a jwks_uri`);
|
|
30
|
-
}
|
|
31
|
-
this.cache.set(discoveryUrl, { jwksUri: doc.jwks_uri, fetchedAt: Date.now() });
|
|
32
|
-
return doc.jwks_uri;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.IssuerMetadataResolver = IssuerMetadataResolver;
|
|
36
|
-
//# sourceMappingURL=issuer-metadata-resolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issuer-metadata-resolver.js","sourceRoot":"","sources":["../../../src/nestjs/jwks/issuer-metadata-resolver.ts"],"names":[],"mappings":";;;AAAA,mDAAwD;AAuBxD,MAAa,sBAAsB;IAOJ;IANZ,KAAK,GAAG,IAAI,GAAG,EAAkD,CAAC;IAMnF,YAA6B,aAAqB,SAAS;QAA9B,eAAU,GAAV,UAAU,CAAoB;IAAG,CAAC;IAO/D,KAAK,CAAC,cAAc,CAAC,YAAoB;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC5C,IAAI,MAAM,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YAC9D,OAAO,MAAM,CAAC,OAAO,CAAC;QACxB,CAAC;QAED,IAAI,QAAkB,CAAC;QACvB,IAAI,CAAC;YACH,QAAQ,GAAG,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAA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