@xemahq/platform-common 0.2.24 → 0.2.25
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/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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/platform-common",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.25",
|
|
4
4
|
"description": "Shared NestJS building blocks for Xema services — auth guards, response redaction, CORS configuration, and crypto helpers.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare enum AdapterKey {
|
|
2
|
-
SCM = "SCM",
|
|
3
|
-
TRACKER = "TRACKER",
|
|
4
|
-
DOCUMENTATION = "DOCUMENTATION",
|
|
5
|
-
NPM_REGISTRY = "NPM_REGISTRY",
|
|
6
|
-
CONTAINER_REGISTRY = "CONTAINER_REGISTRY",
|
|
7
|
-
MAIL_INTAKE = "MAIL_INTAKE",
|
|
8
|
-
MAIL_EGRESS = "MAIL_EGRESS",
|
|
9
|
-
CONVERSATION = "CONVERSATION"
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=adapter-key.enum.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-key.enum.d.ts","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/adapter-key.enum.ts"],"names":[],"mappings":"AAYA,oBAAY,UAAU;IACpB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,aAAa,kBAAkB;IAE/B,YAAY,iBAAiB;IAE7B,kBAAkB,uBAAuB;IAEzC,WAAW,gBAAgB;IAE3B,WAAW,gBAAgB;IAE3B,YAAY,iBAAiB;CAC9B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdapterKey = void 0;
|
|
4
|
-
var AdapterKey;
|
|
5
|
-
(function (AdapterKey) {
|
|
6
|
-
AdapterKey["SCM"] = "SCM";
|
|
7
|
-
AdapterKey["TRACKER"] = "TRACKER";
|
|
8
|
-
AdapterKey["DOCUMENTATION"] = "DOCUMENTATION";
|
|
9
|
-
AdapterKey["NPM_REGISTRY"] = "NPM_REGISTRY";
|
|
10
|
-
AdapterKey["CONTAINER_REGISTRY"] = "CONTAINER_REGISTRY";
|
|
11
|
-
AdapterKey["MAIL_INTAKE"] = "MAIL_INTAKE";
|
|
12
|
-
AdapterKey["MAIL_EGRESS"] = "MAIL_EGRESS";
|
|
13
|
-
AdapterKey["CONVERSATION"] = "CONVERSATION";
|
|
14
|
-
})(AdapterKey || (exports.AdapterKey = AdapterKey = {}));
|
|
15
|
-
//# sourceMappingURL=adapter-key.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-key.enum.js","sourceRoot":"","sources":["../../../src/lib/integration-webhooks/adapter-key.enum.ts"],"names":[],"mappings":";;;AAYA,IAAY,UAcX;AAdD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,iCAAmB,CAAA;IACnB,6CAA+B,CAAA;IAE/B,2CAA6B,CAAA;IAE7B,uDAAyC,CAAA;IAEzC,yCAA2B,CAAA;IAE3B,yCAA2B,CAAA;IAE3B,2CAA6B,CAAA;AAC/B,CAAC,EAdW,UAAU,0BAAV,UAAU,QAcrB"}
|
|
@@ -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,CA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from '@nestjs/common';
|
|
2
|
-
import type { WebhookEntityKind } from '../../lib/integration-webhooks';
|
|
3
|
-
import type { IntegrationWebhookEnvelopeDto } 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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A,6BAAmB,EAAC;QACnB,WAAW,EACT,gGAAgG;QAClG,OAAO,EAAE,cAAc;KACxB,CAAC;IACD,IAAA,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,CAAC;YAEnE,MAAM,IAAI,qCAAqB,CAC7B,2CAA2C,YAAY,KAAK,GAAG,EAAE,CAClE,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,qCAAqB,CAC7B,uCAAuC,YAAY,KAAK,QAAQ,CAAC,MAAM,EAAE,CAC1E,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA2B,CAAC;QAC9D,IAAI,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClE,MAAM,IAAI,qCAAqB,CAC7B,qBAAqB,YAAY,6BAA6B,CAC/D,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC/E,OAAO,GAAG,CAAC,QAAQ,CAAC;IACtB,CAAC;CACF;AA9CD,wDA8CC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export interface DecodedJwtHeader {
|
|
2
|
-
alg: string;
|
|
3
|
-
typ?: string;
|
|
4
|
-
kid?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface DecodedJwtPayload {
|
|
7
|
-
iss?: string;
|
|
8
|
-
sub?: string;
|
|
9
|
-
exp?: number;
|
|
10
|
-
iat?: number;
|
|
11
|
-
nbf?: number;
|
|
12
|
-
aud?: string | string[];
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
}
|
|
15
|
-
export interface Jwk {
|
|
16
|
-
kty: string;
|
|
17
|
-
kid: string;
|
|
18
|
-
use?: string;
|
|
19
|
-
n?: string;
|
|
20
|
-
e?: string;
|
|
21
|
-
x5c?: string[];
|
|
22
|
-
alg?: string;
|
|
23
|
-
}
|
|
24
|
-
export declare class JwksVerificationError extends Error {
|
|
25
|
-
constructor(message: string);
|
|
26
|
-
}
|
|
27
|
-
export interface JwksVerifyOptions {
|
|
28
|
-
jwksUrl: string;
|
|
29
|
-
cacheKey: string;
|
|
30
|
-
expectedIssuers?: readonly string[];
|
|
31
|
-
}
|
|
32
|
-
export declare class JwksVerifier {
|
|
33
|
-
private readonly cacheTtlMs;
|
|
34
|
-
private readonly caches;
|
|
35
|
-
constructor(cacheTtlMs?: number);
|
|
36
|
-
decode(jwt: string): {
|
|
37
|
-
header: DecodedJwtHeader;
|
|
38
|
-
payload: DecodedJwtPayload;
|
|
39
|
-
};
|
|
40
|
-
verify(jwt: string, options: JwksVerifyOptions): Promise<DecodedJwtPayload>;
|
|
41
|
-
private assertIssuer;
|
|
42
|
-
private verifySignature;
|
|
43
|
-
private getSigningKey;
|
|
44
|
-
private fetchJwks;
|
|
45
|
-
private resolveKey;
|
|
46
|
-
private mapAlgorithm;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=jwks-verifier.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jwks-verifier.d.ts","sourceRoot":"","sources":["../../../src/nestjs/jwks/jwks-verifier.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAOD,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAMD,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAuBD,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAKD,MAAM,WAAW,iBAAiB;IAKhC,OAAO,EAAE,MAAM,CAAC;IAMhB,QAAQ,EAAE,MAAM,CAAC;IASjB,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAkBD,qBAAa,YAAY;IASX,OAAO,CAAC,QAAQ,CAAC,UAAU;IAPvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoC;gBAO9B,UAAU,GAAE,MAAgB;IAQzD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,gBAAgB,CAAC;QAAC,OAAO,EAAE,iBAAiB,CAAA;KAAE;IAyBvE,MAAM,CACV,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,CAAC;IAoC7B,OAAO,CAAC,YAAY;IAsBpB,OAAO,CAAC,eAAe;YAqBT,aAAa;YAsBb,SAAS;IAiCvB,OAAO,CAAC,UAAU;IAkBlB,OAAO,CAAC,YAAY;CAYrB"}
|
|
@@ -1,177 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.JwksVerifier = exports.JwksVerificationError = void 0;
|
|
37
|
-
const crypto = __importStar(require("node:crypto"));
|
|
38
|
-
class JwksVerificationError extends Error {
|
|
39
|
-
constructor(message) {
|
|
40
|
-
super(message);
|
|
41
|
-
this.name = 'JwksVerificationError';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.JwksVerificationError = JwksVerificationError;
|
|
45
|
-
class JwksVerifier {
|
|
46
|
-
cacheTtlMs;
|
|
47
|
-
caches = new Map();
|
|
48
|
-
constructor(cacheTtlMs = 600_000) {
|
|
49
|
-
this.cacheTtlMs = cacheTtlMs;
|
|
50
|
-
}
|
|
51
|
-
decode(jwt) {
|
|
52
|
-
const [headerB64, payloadB64, signatureB64] = jwt.split('.');
|
|
53
|
-
if (!headerB64 || !payloadB64 || !signatureB64) {
|
|
54
|
-
throw new JwksVerificationError('Invalid token format');
|
|
55
|
-
}
|
|
56
|
-
let header;
|
|
57
|
-
let payload;
|
|
58
|
-
try {
|
|
59
|
-
header = JSON.parse(Buffer.from(headerB64, 'base64url').toString('utf8'));
|
|
60
|
-
payload = JSON.parse(Buffer.from(payloadB64, 'base64url').toString('utf8'));
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
throw new JwksVerificationError('Invalid token format');
|
|
64
|
-
}
|
|
65
|
-
return { header, payload };
|
|
66
|
-
}
|
|
67
|
-
async verify(jwt, options) {
|
|
68
|
-
const [headerB64, payloadB64, signatureB64] = jwt.split('.');
|
|
69
|
-
if (!headerB64 || !payloadB64 || !signatureB64) {
|
|
70
|
-
throw new JwksVerificationError('Invalid token format');
|
|
71
|
-
}
|
|
72
|
-
const { header, payload } = this.decode(jwt);
|
|
73
|
-
const nowMs = Date.now();
|
|
74
|
-
if (typeof payload.exp === 'number' && nowMs >= payload.exp * 1000) {
|
|
75
|
-
throw new JwksVerificationError('Token expired');
|
|
76
|
-
}
|
|
77
|
-
if (typeof payload.nbf === 'number' && nowMs < payload.nbf * 1000) {
|
|
78
|
-
throw new JwksVerificationError('Token not yet valid');
|
|
79
|
-
}
|
|
80
|
-
if (options.expectedIssuers && options.expectedIssuers.length > 0) {
|
|
81
|
-
this.assertIssuer(payload.iss, options.expectedIssuers);
|
|
82
|
-
}
|
|
83
|
-
const publicKey = await this.getSigningKey(options.cacheKey, options.jwksUrl, header.kid);
|
|
84
|
-
this.verifySignature(headerB64, payloadB64, signatureB64, header.alg, publicKey);
|
|
85
|
-
return payload;
|
|
86
|
-
}
|
|
87
|
-
assertIssuer(iss, expectedIssuers) {
|
|
88
|
-
if (!iss) {
|
|
89
|
-
throw new JwksVerificationError('Token missing required issuer claim');
|
|
90
|
-
}
|
|
91
|
-
const realmSuffixes = [
|
|
92
|
-
...new Set(expectedIssuers
|
|
93
|
-
.map((candidate) => candidate.match(/(\/realms\/[^/]+)$/)?.[1])
|
|
94
|
-
.filter((suffix) => Boolean(suffix))),
|
|
95
|
-
];
|
|
96
|
-
const matched = expectedIssuers.includes(iss) ||
|
|
97
|
-
realmSuffixes.some((suffix) => iss.endsWith(suffix));
|
|
98
|
-
if (!matched) {
|
|
99
|
-
throw new JwksVerificationError('Invalid token issuer');
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
verifySignature(headerB64, payloadB64, signatureB64, alg, publicKey) {
|
|
103
|
-
const data = `${headerB64}.${payloadB64}`;
|
|
104
|
-
const signature = Buffer.from(signatureB64, 'base64url');
|
|
105
|
-
const algorithm = this.mapAlgorithm(alg);
|
|
106
|
-
const isValid = crypto.verify(algorithm, Buffer.from(data), publicKey, signature);
|
|
107
|
-
if (!isValid) {
|
|
108
|
-
throw new JwksVerificationError('Invalid token signature');
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
async getSigningKey(cacheKey, jwksUrl, kid) {
|
|
112
|
-
let cache = this.caches.get(cacheKey);
|
|
113
|
-
if (cache &&
|
|
114
|
-
kid &&
|
|
115
|
-
cache.keys.has(kid) &&
|
|
116
|
-
Date.now() - cache.lastFetch < this.cacheTtlMs) {
|
|
117
|
-
return cache.keys.get(kid);
|
|
118
|
-
}
|
|
119
|
-
const keys = await this.fetchJwks(jwksUrl);
|
|
120
|
-
cache = { keys, lastFetch: Date.now() };
|
|
121
|
-
this.caches.set(cacheKey, cache);
|
|
122
|
-
return this.resolveKey(cache, kid);
|
|
123
|
-
}
|
|
124
|
-
async fetchJwks(jwksUrl) {
|
|
125
|
-
let response;
|
|
126
|
-
try {
|
|
127
|
-
response = await fetch(jwksUrl);
|
|
128
|
-
}
|
|
129
|
-
catch (error) {
|
|
130
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
131
|
-
throw new JwksVerificationError(`Failed to reach JWKS endpoint ${jwksUrl}: ${msg}`);
|
|
132
|
-
}
|
|
133
|
-
if (!response.ok) {
|
|
134
|
-
throw new JwksVerificationError(`Failed to fetch JWKS from ${jwksUrl}: ${response.status}`);
|
|
135
|
-
}
|
|
136
|
-
const jwks = (await response.json());
|
|
137
|
-
const keys = new Map();
|
|
138
|
-
for (const key of jwks.keys) {
|
|
139
|
-
if (key.kty === 'RSA' && key.n && key.e) {
|
|
140
|
-
const publicKey = crypto.createPublicKey({
|
|
141
|
-
key: { kty: 'RSA', n: key.n, e: key.e },
|
|
142
|
-
format: 'jwk',
|
|
143
|
-
});
|
|
144
|
-
keys.set(key.kid, publicKey);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return keys;
|
|
148
|
-
}
|
|
149
|
-
resolveKey(cache, kid) {
|
|
150
|
-
if (kid) {
|
|
151
|
-
const key = cache.keys.get(kid);
|
|
152
|
-
if (!key) {
|
|
153
|
-
throw new JwksVerificationError(`Signing key not found for kid: ${kid}`);
|
|
154
|
-
}
|
|
155
|
-
return key;
|
|
156
|
-
}
|
|
157
|
-
const firstKey = cache.keys.values().next().value;
|
|
158
|
-
if (!firstKey) {
|
|
159
|
-
throw new JwksVerificationError('No valid signing keys found in JWKS');
|
|
160
|
-
}
|
|
161
|
-
return firstKey;
|
|
162
|
-
}
|
|
163
|
-
mapAlgorithm(alg) {
|
|
164
|
-
switch (alg) {
|
|
165
|
-
case 'RS256':
|
|
166
|
-
return 'sha256';
|
|
167
|
-
case 'RS384':
|
|
168
|
-
return 'sha384';
|
|
169
|
-
case 'RS512':
|
|
170
|
-
return 'sha512';
|
|
171
|
-
default:
|
|
172
|
-
throw new JwksVerificationError(`Unsupported JWT algorithm: ${alg}`);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
exports.JwksVerifier = JwksVerifier;
|
|
177
|
-
//# sourceMappingURL=jwks-verifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jwks-verifier.js","sourceRoot":"","sources":["../../../src/nestjs/jwks/jwks-verifier.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AA6DtC,MAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AALD,sDAKC;AA4CD,MAAa,YAAY;IASM;IAPZ,MAAM,GAAG,IAAI,GAAG,EAAyB,CAAC;IAO3D,YAA6B,aAAqB,OAAO;QAA5B,eAAU,GAAV,UAAU,CAAkB;IAAG,CAAC;IAQ7D,MAAM,CAAC,GAAW;QAChB,MAAM,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE,CAAC;YAC/C,MAAM,IAAI,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,MAAwB,CAAC;QAC7B,IAAI,OAA0B,CAAC;QAC/B,IAAI,CAAC;YACH,MAAM,GAAG,IAAI,CAAC,KAAK,CACjB,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CACjC,CAAC;YACtB,OAAO,GAAG,IAAI,CAAC,KAAK,CAClB,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CACjC,CAAC;QACzB,CAAC;QAAC,MAAM,CAA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AC,CAAC;QACzE,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEO,YAAY,CAAC,GAAW;QAC9B,QAAQ,GAAG,EAAE,CAAC;YACZ,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC;YAClB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC;YAClB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC;YAClB;gBACE,MAAM,IAAI,qBAAqB,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CACF;AAjND,oCAiNC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"route-metadata-keys.d.ts","sourceRoot":"","sources":["../../src/nestjs/route-metadata-keys.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAGrD,eAAO,MAAM,mBAAmB,wBAAwB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.XEMA_INTERNAL_ROUTE = exports.XEMA_PUBLIC_ROUTE = void 0;
|
|
4
|
-
exports.XEMA_PUBLIC_ROUTE = 'xema:public-route';
|
|
5
|
-
exports.XEMA_INTERNAL_ROUTE = 'xema:internal-route';
|
|
6
|
-
//# sourceMappingURL=route-metadata-keys.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"route-metadata-keys.js","sourceRoot":"","sources":["../../src/nestjs/route-metadata-keys.ts"],"names":[],"mappings":";;;AAwBa,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AAGxC,QAAA,mBAAmB,GAAG,qBAAqB,CAAC"}
|