@kwirthmagnify/kwirth-common 0.5.33 → 0.5.35
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/ExtensionType.d.ts +2 -1
- package/dist/ExtensionType.js +1 -0
- package/dist/Global.d.ts +5 -0
- package/dist/Webhook.d.ts +31 -0
- package/dist/Webhook.js +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/ExtensionType.d.ts
CHANGED
package/dist/ExtensionType.js
CHANGED
package/dist/Global.d.ts
CHANGED
|
@@ -7,6 +7,11 @@ interface IUser {
|
|
|
7
7
|
resources: string;
|
|
8
8
|
idp?: string;
|
|
9
9
|
startChannel?: string;
|
|
10
|
+
startView?: string;
|
|
11
|
+
startNamespace?: string;
|
|
12
|
+
startGroup?: string;
|
|
13
|
+
startPod?: string;
|
|
14
|
+
startContainer?: string;
|
|
10
15
|
exitFullScreen?: boolean;
|
|
11
16
|
enabledChannels?: string[];
|
|
12
17
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface IWebhookEvent {
|
|
2
|
+
provider: string;
|
|
3
|
+
kind: string;
|
|
4
|
+
externalId: string;
|
|
5
|
+
status?: string;
|
|
6
|
+
receivedAt: string;
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
raw: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface IWebhookConfig {
|
|
11
|
+
name: string;
|
|
12
|
+
target: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface IWebhookStoredConfig {
|
|
16
|
+
configs: IWebhookConfig[];
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface IWebhookConsumer {
|
|
20
|
+
processWebhookEvent(event: IWebhookEvent): void;
|
|
21
|
+
}
|
|
22
|
+
export interface IWebhookAccess {
|
|
23
|
+
subscribe(target: string, consumer: IWebhookConsumer): void;
|
|
24
|
+
unsubscribe(target: string, consumer: IWebhookConsumer): void;
|
|
25
|
+
listWebhooks(): Array<{
|
|
26
|
+
id: string;
|
|
27
|
+
configNames: string[];
|
|
28
|
+
}>;
|
|
29
|
+
getUrl(webhookId: string, configName: string): string | undefined;
|
|
30
|
+
rotateToken(webhookId: string, configName: string): string;
|
|
31
|
+
}
|
package/dist/Webhook.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Tipo de extensión WEBHOOK: ingesta HTTP entrante, contraparte inbound de los senders (que son
|
|
3
|
+
// salientes). Un artefacto webhook sabe verificar y parsear los callbacks de un proveedor (Jira,
|
|
4
|
+
// ServiceNow, GitHub…) y entrega un evento NORMALIZADO a un consumidor (un channel/plugin).
|
|
5
|
+
// Direccionamiento: {host}{envRootPath}/webhook/<provider>/<token-opaco>. Ver plans/webhook-extension/PLAN.md.
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ limitations under the License.
|
|
|
31
31
|
*/
|
|
32
32
|
__exportStar(require("./Channel"), exports);
|
|
33
33
|
__exportStar(require("./Sender"), exports);
|
|
34
|
+
__exportStar(require("./Webhook"), exports);
|
|
34
35
|
__exportStar(require("./InstanceMessage"), exports);
|
|
35
36
|
__exportStar(require("./InstanceConfig"), exports);
|
|
36
37
|
__exportStar(require("./RouteMessage"), exports);
|