@krak-stack/registry 0.1.60 → 0.1.61
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/CHANGELOG.md +9 -0
- package/dist/services/webhooks/client/delivery-table.d.ts +62 -0
- package/dist/services/webhooks/client/delivery-table.js +4698 -0
- package/dist/services/webhooks/http-client.d.ts +1 -0
- package/dist/services/webhooks/http-client.js +13 -1
- package/dist/services/webhooks/index.d.ts +2 -0
- package/dist/services/webhooks/index.js +221 -86
- package/dist/services/webhooks/migrations.d.ts +3 -0
- package/dist/services/webhooks/migrations.js +20 -1
- package/dist/services/webhooks/receiver.d.ts +41 -0
- package/dist/services/webhooks/schema.d.ts +8 -0
- package/dist/services/webhooks/schema.js +21 -1
- package/dist/services/webhooks/url.d.ts +5 -0
- package/dist/services/webhooks/url.js +16 -0
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @krak-stack/registry
|
|
2
2
|
|
|
3
|
+
## 0.1.61
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9ea9e42: Sign the stable webhook-id header with the timestamp and raw body, and use it automatically for transactional receiver deduplication. Remove the receiver eventId extraction callback. This changes the signature protocol; senders and receivers must upgrade together. Legacy timestamp/body signatures are rejected.
|
|
8
|
+
|
|
9
|
+
- 7fcaf6f: Add WebhooksReceiver with HMAC verification, timestamp checks, schema validation, and transactional receipt deduplication. Receiver-only applications migrate only receipt storage and do not start outbound workers.
|
|
10
|
+
- 9ea9e42: Add `@krak-stack/registry/webhooks/client` with a shared delivery activity table, failed-attempt status, retry details, JSON inspection, localized labels, and application-owned links.
|
|
11
|
+
|
|
3
12
|
## 0.1.60
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Schema } from "effect";
|
|
2
|
+
import { type DataTableColDef, type DataTableProps } from "../../../components/ui/data-table.js";
|
|
3
|
+
export interface WebhookDeliveryRow {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly event: string;
|
|
6
|
+
readonly status: "pending" | "success" | "failed";
|
|
7
|
+
readonly retries: number;
|
|
8
|
+
readonly error: string | null;
|
|
9
|
+
readonly retryAt: Date;
|
|
10
|
+
readonly createdAt: Date;
|
|
11
|
+
readonly completedAt: Date | null;
|
|
12
|
+
readonly data: Schema.Json;
|
|
13
|
+
}
|
|
14
|
+
declare const translations: {
|
|
15
|
+
en: {
|
|
16
|
+
identifier: string;
|
|
17
|
+
event: string;
|
|
18
|
+
status: string;
|
|
19
|
+
pending: string;
|
|
20
|
+
success: string;
|
|
21
|
+
failed: string;
|
|
22
|
+
retries: string;
|
|
23
|
+
retryAt: string;
|
|
24
|
+
errorUnavailable: string;
|
|
25
|
+
payload: string;
|
|
26
|
+
viewPayload: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
completedAt: string;
|
|
29
|
+
};
|
|
30
|
+
fr: {
|
|
31
|
+
identifier: string;
|
|
32
|
+
event: string;
|
|
33
|
+
status: string;
|
|
34
|
+
pending: string;
|
|
35
|
+
success: string;
|
|
36
|
+
failed: string;
|
|
37
|
+
retries: string;
|
|
38
|
+
retryAt: string;
|
|
39
|
+
errorUnavailable: string;
|
|
40
|
+
payload: string;
|
|
41
|
+
viewPayload: string;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
completedAt: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export type WebhookDeliveryMessages = typeof translations.en;
|
|
47
|
+
/** A failed attempt remains failed while its next retry is pending. */
|
|
48
|
+
export declare const webhookDeliveryStatus: (delivery: Pick<WebhookDeliveryRow, "status" | "retries">) => "failed" | "pending" | "success";
|
|
49
|
+
export type WebhookDeliveryTableProps<T extends WebhookDeliveryRow> = Pick<DataTableProps<T>, "state" | "onStateChange" | "status"> & {
|
|
50
|
+
entries: readonly T[];
|
|
51
|
+
rowCount: number;
|
|
52
|
+
locale?: string;
|
|
53
|
+
messages?: Readonly<Record<string, Partial<WebhookDeliveryMessages>>>;
|
|
54
|
+
events?: readonly {
|
|
55
|
+
value: string;
|
|
56
|
+
label: string;
|
|
57
|
+
}[];
|
|
58
|
+
/** Application-owned navigation and resource references. */
|
|
59
|
+
linksColumn?: DataTableColDef<T>;
|
|
60
|
+
};
|
|
61
|
+
export declare const WebhookDeliveryTable: <T extends WebhookDeliveryRow>({ entries, rowCount, locale: localeOverride, messages, events, linksColumn, state, onStateChange, status, }: WebhookDeliveryTableProps<T>) => import("react").JSX.Element;
|
|
62
|
+
export {};
|