@krak-stack/registry 0.1.60 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/components/ui/app-brand.js +17 -17
- package/dist/components/ui/code-block.js +6 -6
- package/dist/components/ui/color-picker.d.ts +30 -0
- package/dist/components/ui/color-picker.js +386 -0
- package/dist/components/ui/copy-button.js +4 -4
- package/dist/components/ui/data-table.js +468 -455
- package/dist/components/ui/editing-locale-switcher.js +10 -10
- package/dist/components/ui/effect-form.js +186 -185
- package/dist/components/ui/error-component.js +10 -18
- package/dist/components/ui/file-picker.js +2 -2
- package/dist/components/ui/form.d.ts +131 -335
- package/dist/components/ui/form.js +137 -136
- package/dist/components/ui/google-map.js +38 -6
- package/dist/components/ui/icon-input.js +48 -45
- package/dist/components/ui/krakstack-provider.js +2 -2
- package/dist/components/ui/locale-switcher.js +4 -4
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/search-menu.js +2 -2
- package/dist/components/ui/sidebar-layout.js +82 -80
- package/dist/components/ui/theme-switcher.js +6 -6
- package/dist/components/ui/virtualized-combobox.js +34 -31
- package/dist/lib/docs.d.ts +2 -2
- package/dist/lib/docs.js +187 -185
- package/dist/lib/docs.server.js +45 -23
- package/dist/lib/documentation-toolkit.d.ts +2 -2
- package/dist/lib/documentation-toolkit.js +45 -23
- package/dist/lib/httpapi-adapter.d.ts +11 -3
- package/dist/lib/httpapi-adapter.js +42 -15
- package/dist/lib/httpapi-cli.d.ts +13 -4
- package/dist/lib/httpapi-cli.js +70 -28
- package/dist/lib/httpapi-toolkit.js +40 -13
- package/dist/lib/query.d.ts +4 -4
- package/dist/lib/query.js +13 -13
- package/dist/lib/seo.js +2 -2
- package/dist/lib/webfetch-toolkit.js +7 -7
- package/dist/oxlint/anti-slop/index.js +2 -2
- package/dist/services/agent/client/index.js +155 -153
- package/dist/services/agent/index.js +3 -3
- package/dist/services/agent/schema.js +5 -5
- package/dist/services/events/browser.js +38 -23
- package/dist/services/events/client/audit-log-table.js +472 -459
- package/dist/services/events/client/tracking-notice.js +9 -4
- package/dist/services/events/index.d.ts +3 -1
- package/dist/services/events/index.js +79 -74
- package/dist/services/events/migrations.js +2 -2
- package/dist/services/events/record.js +2 -2
- package/dist/services/events/schema.d.ts +18 -10
- package/dist/services/events/schema.js +42 -42
- package/dist/services/file-extraction/index.js +4 -4
- package/dist/services/file-extraction/schema.d.ts +3 -1
- package/dist/services/file-extraction/schema.js +2 -2
- package/dist/services/health/api.builder.d.ts +8 -8
- package/dist/services/health/api.group.d.ts +8 -8
- package/dist/services/health/index.d.ts +10 -6
- package/dist/services/health/index.js +17 -13
- package/dist/services/health/schema.d.ts +7 -7
- package/dist/services/notification/channels/ses/index.js +2 -2
- package/dist/services/notification/channels/ses/schema.js +2 -2
- package/dist/services/notification/client/index.js +5 -5
- package/dist/services/notification/index.js +3 -3
- package/dist/services/notification/persistence/drizzle.js +2 -2
- package/dist/services/notification/persistence/index.js +15 -15
- package/dist/services/notification/persistence/schema.js +12 -12
- package/dist/services/notification/public.js +8 -8
- package/dist/services/notification/schema.d.ts +3 -1
- package/dist/services/notification/schema.js +2 -2
- package/dist/services/opentelemetry/api.js +7 -5
- package/dist/services/opentelemetry/browser.js +9 -9
- package/dist/services/opentelemetry/index.js +2 -2
- package/dist/services/opentelemetry/processor.d.ts +3 -1
- package/dist/services/opentelemetry/web-vitals.js +12 -7
- package/dist/services/s3/index.js +2 -2
- package/dist/services/s3/schema.d.ts +3 -1
- package/dist/services/s3/schema.js +2 -2
- package/dist/services/speech/api.js +3 -1
- package/dist/services/speech/index.js +15 -8
- package/dist/services/speech/schema.d.ts +3 -1
- package/dist/services/speech/schema.js +12 -10
- package/dist/services/webhooks/client/delivery-table.d.ts +62 -0
- package/dist/services/webhooks/client/delivery-table.js +4711 -0
- package/dist/services/webhooks/http-client.d.ts +1 -0
- package/dist/services/webhooks/http-client.js +17 -5
- package/dist/services/webhooks/index.d.ts +2 -0
- package/dist/services/webhooks/index.js +249 -114
- package/dist/services/webhooks/migrations.d.ts +3 -0
- package/dist/services/webhooks/migrations.js +21 -2
- package/dist/services/webhooks/receiver.d.ts +45 -0
- package/dist/services/webhooks/schema.d.ts +15 -5
- package/dist/services/webhooks/schema.js +41 -21
- package/dist/services/webhooks/url.d.ts +5 -0
- package/dist/services/webhooks/url.js +18 -2
- package/package.json +10 -1
|
@@ -129,7 +129,7 @@ class OtlpEvents extends Context.Service()("krakstack/opentelemetry/Events") {
|
|
|
129
129
|
}));
|
|
130
130
|
}
|
|
131
131
|
var event = Effect.fnUntraced(function* (name, properties, options) {
|
|
132
|
-
const decoded = yield* Schema2.
|
|
132
|
+
const decoded = yield* Schema2.decodeEffect(TelemetryEvent)({
|
|
133
133
|
name,
|
|
134
134
|
properties,
|
|
135
135
|
options
|
|
@@ -191,13 +191,15 @@ var ServerEventsLive = Layer2.unwrap(Effect2.gen(function* () {
|
|
|
191
191
|
|
|
192
192
|
class Otlp extends Context2.Service()("krakstack/opentelemetry/Otlp") {
|
|
193
193
|
static event = event;
|
|
194
|
-
static layer = Layer2.mergeAll(Layer2.succeed(this, { resource: OtlpResource2.fromConfig() }), EffectOtlp.layerFromConfig(),
|
|
194
|
+
static layer = Layer2.mergeAll(Layer2.succeed(this, { resource: OtlpResource2.fromConfig() }), ServerEventsLive).pipe(Layer2.provideMerge(EffectOtlp.layerFromConfig()), Layer2.provideMerge(OtlpExporter2.layerFlusher), Layer2.provide(OtlpSerialization2.layerJson), Layer2.provide(FetchHttpClient.layer));
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
// ../../src/services/opentelemetry/processor.ts
|
|
198
198
|
import { Context as Context3, Schema as Schema4 } from "effect";
|
|
199
199
|
|
|
200
|
-
class OtlpProcessingError extends Schema4.TaggedError()("OtlpProcessingError", {
|
|
200
|
+
class OtlpProcessingError extends Schema4.TaggedError()("OtlpProcessingError", {
|
|
201
|
+
status: Schema4.Literals([400, 403, 409, 413, 503])
|
|
202
|
+
}) {
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
class OtlpLogsProcessor extends Context3.Service()("krakstack/opentelemetry/OtlpLogsProcessor") {
|
|
@@ -281,7 +283,7 @@ class HttpApiOtlp {
|
|
|
281
283
|
static layer = Layer3.mergeAll(otlpProxyLayer, serverServices);
|
|
282
284
|
}
|
|
283
285
|
export {
|
|
284
|
-
|
|
286
|
+
OtlpProcessingError,
|
|
285
287
|
OtlpLogsProcessor,
|
|
286
|
-
|
|
288
|
+
HttpApiOtlp
|
|
287
289
|
};
|
|
@@ -117,7 +117,7 @@ class OtlpEvents extends Context.Service()("krakstack/opentelemetry/Events") {
|
|
|
117
117
|
}));
|
|
118
118
|
}
|
|
119
119
|
var event = Effect.fnUntraced(function* (name, properties, options) {
|
|
120
|
-
const decoded = yield* Schema2.
|
|
120
|
+
const decoded = yield* Schema2.decodeEffect(TelemetryEvent)({
|
|
121
121
|
name,
|
|
122
122
|
properties,
|
|
123
123
|
options
|
|
@@ -182,15 +182,15 @@ var sanitizeBrowserException = (input) => ({
|
|
|
182
182
|
});
|
|
183
183
|
var BrowserExceptionTrackingLive = Layer2.effectDiscard(Stream.merge(Stream.fromEventListener(globalThis, "error", {
|
|
184
184
|
bufferSize: 100
|
|
185
|
-
}).pipe(Stream.map((
|
|
186
|
-
const error =
|
|
185
|
+
}).pipe(Stream.map((event2) => {
|
|
186
|
+
const error = event2.error;
|
|
187
187
|
return new BrowserReportedError({
|
|
188
188
|
type: "window.error",
|
|
189
|
-
message:
|
|
189
|
+
message: event2.message,
|
|
190
190
|
stack: Predicate.isError(error) ? error.stack : undefined
|
|
191
191
|
});
|
|
192
|
-
})), Stream.fromEventListener(globalThis, "unhandledrejection", { bufferSize: 100 }).pipe(Stream.map((
|
|
193
|
-
const reason =
|
|
192
|
+
})), Stream.fromEventListener(globalThis, "unhandledrejection", { bufferSize: 100 }).pipe(Stream.map((event2) => {
|
|
193
|
+
const reason = event2.reason;
|
|
194
194
|
return new BrowserReportedError(Predicate.isError(reason) ? {
|
|
195
195
|
type: "unhandledrejection",
|
|
196
196
|
message: reason.message,
|
|
@@ -239,7 +239,7 @@ class BrowserOtlp {
|
|
|
239
239
|
const resource = { attributes, serviceName, serviceVersion };
|
|
240
240
|
const request = HttpClientRequest.get(baseUrl);
|
|
241
241
|
const signalUrl = (signal) => HttpClientRequest.appendUrl(request, `/v1/${signal}`).url;
|
|
242
|
-
const exporters = Layer2.mergeAll(
|
|
242
|
+
const exporters = Layer2.mergeAll(events !== false ? OtlpEvents.layer({
|
|
243
243
|
exportInterval: "30 seconds",
|
|
244
244
|
maxBatchSize: 100,
|
|
245
245
|
shutdownTimeout: "3 seconds",
|
|
@@ -271,6 +271,6 @@ class BrowserOtlp {
|
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
273
|
export {
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
sanitizeBrowserException,
|
|
275
|
+
BrowserOtlp
|
|
276
276
|
};
|
|
@@ -116,7 +116,7 @@ class OtlpEvents extends Context.Service()("krakstack/opentelemetry/Events") {
|
|
|
116
116
|
}));
|
|
117
117
|
}
|
|
118
118
|
var event = Effect.fnUntraced(function* (name, properties, options) {
|
|
119
|
-
const decoded = yield* Schema2.
|
|
119
|
+
const decoded = yield* Schema2.decodeEffect(TelemetryEvent)({
|
|
120
120
|
name,
|
|
121
121
|
properties,
|
|
122
122
|
options
|
|
@@ -178,7 +178,7 @@ var ServerEventsLive = Layer2.unwrap(Effect2.gen(function* () {
|
|
|
178
178
|
|
|
179
179
|
class Otlp extends Context2.Service()("krakstack/opentelemetry/Otlp") {
|
|
180
180
|
static event = event;
|
|
181
|
-
static layer = Layer2.mergeAll(Layer2.succeed(this, { resource: OtlpResource2.fromConfig() }), EffectOtlp.layerFromConfig(),
|
|
181
|
+
static layer = Layer2.mergeAll(Layer2.succeed(this, { resource: OtlpResource2.fromConfig() }), ServerEventsLive).pipe(Layer2.provideMerge(EffectOtlp.layerFromConfig()), Layer2.provideMerge(OtlpExporter2.layerFlusher), Layer2.provide(OtlpSerialization2.layerJson), Layer2.provide(FetchHttpClient.layer));
|
|
182
182
|
}
|
|
183
183
|
export {
|
|
184
184
|
Otlp
|
|
@@ -7,7 +7,9 @@ export interface OtlpLogsResult {
|
|
|
7
7
|
}
|
|
8
8
|
declare const OtlpProcessingError_base: Schema.Class<OtlpProcessingError, Schema.TaggedStruct<"OtlpProcessingError", {
|
|
9
9
|
readonly status: Schema.Literals<readonly [400, 403, 409, 413, 503]>;
|
|
10
|
-
}>, import("effect/Cause").YieldableError
|
|
10
|
+
}>, import("effect/Cause").YieldableError & {
|
|
11
|
+
readonly brand: unique symbol;
|
|
12
|
+
}>;
|
|
11
13
|
export declare class OtlpProcessingError extends OtlpProcessingError_base {
|
|
12
14
|
}
|
|
13
15
|
declare const OtlpLogsProcessor_base: Context.ServiceClass<OtlpLogsProcessor, "krakstack/opentelemetry/OtlpLogsProcessor", {
|
|
@@ -110,7 +110,7 @@ class OtlpEvents extends Context.Service()("krakstack/opentelemetry/Events") {
|
|
|
110
110
|
}));
|
|
111
111
|
}
|
|
112
112
|
var event = Effect.fnUntraced(function* (name, properties, options) {
|
|
113
|
-
const decoded = yield* Schema2.
|
|
113
|
+
const decoded = yield* Schema2.decodeEffect(TelemetryEvent)({
|
|
114
114
|
name,
|
|
115
115
|
properties,
|
|
116
116
|
options
|
|
@@ -146,8 +146,11 @@ var event = Effect.fnUntraced(function* (name, properties, options) {
|
|
|
146
146
|
});
|
|
147
147
|
|
|
148
148
|
// ../../src/services/opentelemetry/consent.ts
|
|
149
|
+
import * as Data from "effect/Data";
|
|
149
150
|
import { SecureRandom } from "effect/crypto";
|
|
150
151
|
import { Effect as Effect2, Option as Option2, Schema as Schema3 } from "effect";
|
|
152
|
+
class AnalyticsPreferenceStorageError extends Data.TaggedError("AnalyticsPreferenceStorageError") {
|
|
153
|
+
}
|
|
151
154
|
var ANALYTICS_CONSENT_COOKIE = "krakstack_analytics_consent";
|
|
152
155
|
var ANALYTICS_NOTICE_VERSION = "1";
|
|
153
156
|
var changedEvent = "krakstack:analytics-consent";
|
|
@@ -158,7 +161,7 @@ var analyticsPreference = (cookie, now = Date.now()) => {
|
|
|
158
161
|
const value = readCookie(cookie);
|
|
159
162
|
if (!value)
|
|
160
163
|
return;
|
|
161
|
-
const decoded = Schema3.
|
|
164
|
+
const decoded = Schema3.decodeOption(codec)(value);
|
|
162
165
|
if (Option2.isNone(decoded))
|
|
163
166
|
return;
|
|
164
167
|
const preference = decoded.value;
|
|
@@ -175,8 +178,10 @@ var browserPreference = () => {
|
|
|
175
178
|
return;
|
|
176
179
|
const cookie = Effect2.runSync(Effect2.try({
|
|
177
180
|
try: () => document.cookie,
|
|
178
|
-
catch: () => new
|
|
179
|
-
|
|
181
|
+
catch: () => new AnalyticsPreferenceStorageError({
|
|
182
|
+
message: "Analytics preference storage unavailable"
|
|
183
|
+
})
|
|
184
|
+
}).pipe(Effect2.orElseSucceed(() => "")));
|
|
180
185
|
return analyticsPreference(cookie);
|
|
181
186
|
};
|
|
182
187
|
var consentGeneration = 0;
|
|
@@ -261,7 +266,7 @@ var WebVitalsLive = (requireConsent, respectDoNotTrack) => Layer2.effectDiscard(
|
|
|
261
266
|
const report = (input) => {
|
|
262
267
|
if (!canExport())
|
|
263
268
|
return;
|
|
264
|
-
const parsed = Schema4.
|
|
269
|
+
const parsed = Schema4.decodeOption(BrowserWebVital)(input);
|
|
265
270
|
if (parsed._tag === "None")
|
|
266
271
|
return;
|
|
267
272
|
const metric = parsed.value;
|
|
@@ -328,7 +333,7 @@ class BrowserWebVitals {
|
|
|
328
333
|
} = {}) => WebVitalsLive(requireConsent, respectDoNotTrack);
|
|
329
334
|
}
|
|
330
335
|
export {
|
|
331
|
-
|
|
336
|
+
subscribeWebVitals,
|
|
332
337
|
WebVitals,
|
|
333
|
-
|
|
338
|
+
BrowserWebVitals
|
|
334
339
|
};
|
|
@@ -12,7 +12,9 @@ declare const S3ServiceError_base: Schema.Class<S3ServiceError, Schema.TaggedStr
|
|
|
12
12
|
readonly message: Schema.String;
|
|
13
13
|
readonly path: Schema.optional<Schema.String>;
|
|
14
14
|
readonly error: Schema.optional<Schema.Defect>;
|
|
15
|
-
}>, import("effect/Cause").YieldableError
|
|
15
|
+
}>, import("effect/Cause").YieldableError & {
|
|
16
|
+
readonly brand: unique symbol;
|
|
17
|
+
}>;
|
|
16
18
|
export declare class S3ServiceError extends S3ServiceError_base {
|
|
17
19
|
}
|
|
18
20
|
export {};
|
|
@@ -42,7 +42,9 @@ var MeloRequest = Schema.Struct({
|
|
|
42
42
|
}).annotate({ identifier: "GatewayMeloRequest" });
|
|
43
43
|
var MeloResponse = Schema.Struct({
|
|
44
44
|
success: Schema.Literal(true),
|
|
45
|
-
result: Schema.Struct({
|
|
45
|
+
result: Schema.Struct({
|
|
46
|
+
audio: Schema.Uint8ArrayFromBase64.check(Schema.isMinLength(1))
|
|
47
|
+
})
|
|
46
48
|
}).annotate({ identifier: "GatewayMeloResponse" });
|
|
47
49
|
|
|
48
50
|
// ../../src/services/speech/api.ts
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// ../../src/services/speech/index.ts
|
|
2
2
|
import { Context, Effect, Layer, Schema as Schema2 } from "effect";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
FetchHttpClient,
|
|
5
|
+
HttpClient,
|
|
6
|
+
HttpClientRequest,
|
|
7
|
+
HttpClientResponse
|
|
8
|
+
} from "effect/http";
|
|
4
9
|
|
|
5
10
|
// ../../src/services/speech/schema.ts
|
|
6
11
|
import { Schema } from "effect";
|
|
@@ -42,7 +47,9 @@ var MeloRequest = Schema.Struct({
|
|
|
42
47
|
}).annotate({ identifier: "GatewayMeloRequest" });
|
|
43
48
|
var MeloResponse = Schema.Struct({
|
|
44
49
|
success: Schema.Literal(true),
|
|
45
|
-
result: Schema.Struct({
|
|
50
|
+
result: Schema.Struct({
|
|
51
|
+
audio: Schema.Uint8ArrayFromBase64.check(Schema.isMinLength(1))
|
|
52
|
+
})
|
|
46
53
|
}).annotate({ identifier: "GatewayMeloResponse" });
|
|
47
54
|
|
|
48
55
|
// ../../src/services/speech/index.ts
|
|
@@ -50,8 +57,8 @@ class Speech extends Context.Service()("@krak-stack/registry/speech/Speech", {
|
|
|
50
57
|
make: (options) => Effect.gen(function* () {
|
|
51
58
|
const http = (yield* HttpClient.HttpClient).pipe(HttpClient.filterStatusOk);
|
|
52
59
|
const transcribe = Effect.fn("Speech.transcribe")(function* (input) {
|
|
53
|
-
const url = yield* Schema2.
|
|
54
|
-
const path = yield* Schema2.
|
|
60
|
+
const url = yield* Schema2.decodeEffect(Schema2.URLFromString)(options.baseUrl);
|
|
61
|
+
const path = yield* Schema2.decodeEffect(Schema2.String.check(Schema2.isPattern(/^\/.*accounts\/[^/]+\/ai\/(v1|run)\/?$/)))(url.pathname);
|
|
55
62
|
url.pathname = path.replace(/\/(v1|run)\/?$/, "/run/@cf/openai/whisper-large-v3-turbo");
|
|
56
63
|
url.search = "";
|
|
57
64
|
url.hash = "";
|
|
@@ -72,9 +79,9 @@ class Speech extends Context.Service()("@krak-stack/registry/speech/Speech", {
|
|
|
72
79
|
return { text: body.result.text.trim() };
|
|
73
80
|
}, Effect.timeout("60 seconds"), Effect.mapError(() => new SpeechUnavailable({})));
|
|
74
81
|
const synthesize = Effect.fn("Speech.synthesize")(function* (input) {
|
|
75
|
-
const payload = yield* Schema2.
|
|
76
|
-
const url = yield* Schema2.
|
|
77
|
-
const path = yield* Schema2.
|
|
82
|
+
const payload = yield* Schema2.decodeEffect(SynthesizeSpeech)(input);
|
|
83
|
+
const url = yield* Schema2.decodeEffect(Schema2.URLFromString)(options.baseUrl);
|
|
84
|
+
const path = yield* Schema2.decodeEffect(Schema2.String.check(Schema2.isPattern(/^\/.*accounts\/[^/]+\/ai\/(v1|run)\/?$/)))(url.pathname);
|
|
78
85
|
url.pathname = path.replace(/\/(v1|run)\/?$/, "/run/@cf/myshell-ai/melotts");
|
|
79
86
|
url.search = "";
|
|
80
87
|
url.hash = "";
|
|
@@ -90,7 +97,7 @@ class Speech extends Context.Service()("@krak-stack/registry/speech/Speech", {
|
|
|
90
97
|
const response = yield* http.execute(request);
|
|
91
98
|
if (response.headers["content-type"]?.split(";")[0]?.trim() === "audio/mpeg") {
|
|
92
99
|
const bytes = new Uint8Array(yield* response.arrayBuffer);
|
|
93
|
-
return yield* Schema2.
|
|
100
|
+
return yield* Schema2.decodeEffect(Schema2.Uint8Array.check(Schema2.isMinLength(1)))(bytes);
|
|
94
101
|
}
|
|
95
102
|
const body = yield* HttpClientResponse.schemaBodyJson(MeloResponse)(response);
|
|
96
103
|
return body.result.audio;
|
|
@@ -21,7 +21,9 @@ export declare const WhisperResponse: Schema.Struct<{
|
|
|
21
21
|
readonly text: Schema.String;
|
|
22
22
|
}>;
|
|
23
23
|
}>;
|
|
24
|
-
declare const SpeechUnavailable_base: Schema.Class<SpeechUnavailable, Schema.TaggedStruct<"SpeechUnavailable", {}>, import("effect/Cause").YieldableError
|
|
24
|
+
declare const SpeechUnavailable_base: Schema.Class<SpeechUnavailable, Schema.TaggedStruct<"SpeechUnavailable", {}>, import("effect/Cause").YieldableError & {
|
|
25
|
+
readonly brand: unique symbol;
|
|
26
|
+
}>;
|
|
25
27
|
export declare class SpeechUnavailable extends SpeechUnavailable_base {
|
|
26
28
|
}
|
|
27
29
|
export type TranscribeAudio = typeof TranscribeAudio.Type;
|
|
@@ -38,17 +38,19 @@ var MeloRequest = Schema.Struct({
|
|
|
38
38
|
}).annotate({ identifier: "GatewayMeloRequest" });
|
|
39
39
|
var MeloResponse = Schema.Struct({
|
|
40
40
|
success: Schema.Literal(true),
|
|
41
|
-
result: Schema.Struct({
|
|
41
|
+
result: Schema.Struct({
|
|
42
|
+
audio: Schema.Uint8ArrayFromBase64.check(Schema.isMinLength(1))
|
|
43
|
+
})
|
|
42
44
|
}).annotate({ identifier: "GatewayMeloResponse" });
|
|
43
45
|
export {
|
|
44
|
-
|
|
45
|
-
MAX_AUDIO_BYTES,
|
|
46
|
-
MeloRequest,
|
|
47
|
-
MeloResponse,
|
|
48
|
-
SpeechUnavailable,
|
|
49
|
-
SynthesizeSpeech,
|
|
50
|
-
TranscribeAudio,
|
|
51
|
-
Transcription,
|
|
46
|
+
WhisperResponse,
|
|
52
47
|
WhisperRequest,
|
|
53
|
-
|
|
48
|
+
Transcription,
|
|
49
|
+
TranscribeAudio,
|
|
50
|
+
SynthesizeSpeech,
|
|
51
|
+
SpeechUnavailable,
|
|
52
|
+
MeloResponse,
|
|
53
|
+
MeloRequest,
|
|
54
|
+
MAX_AUDIO_BYTES,
|
|
55
|
+
AudioMimeType
|
|
54
56
|
};
|
|
@@ -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 {};
|